Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004770OCamltools (ocaml{lex,yacc,dep,debug,...})public2009-04-15 15:402016-12-07 14:17
Assigned To 
PlatformOSOS Version
Product Version3.11.0 
Target VersionFixed in Version 
Summary0004770: ocamllex extended to bind to list types for variable bindings with a + or * regexp
DescriptionIn the following ocamllex script:

rule test = parse
  "foo" (' '+ ("bar"+ as matched))+
  test (Lexing.from_string "foo bar barbar barbarbar")

The result is "barbarbar" - i.e. the variable [matched] corresponds to its final string match.

Would it be particularly difficult for [matched] to be inferred as of type string list and so map to ["bar"; "barbar"; "barbarbar"] in this instance?
Additional InformationI would think it's reasonable that noone would write a script like that at the moment as only returning the final match is probably both not useful and also undefined behaviour.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2009-04-15 15:40 dra New Issue
2009-04-29 15:53 doligez Status new => acknowledged
2016-12-07 14:17 shinwell Category OCaml general => OCaml tools (ocaml{lex,yacc,dep,browser,debug})
2016-12-07 16:37 doligez Category OCaml tools (ocaml{lex,yacc,dep,browser,debug}) => OCaml tools (ocaml{lex,yacc,dep,debug})
2017-02-23 16:45 doligez Category OCaml tools (ocaml{lex,yacc,dep,debug}) => tools (ocaml{lex,yacc,dep,debug,...})

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker