Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004770OCamlOCaml generalpublic2009-04-15 15:402009-04-29 15:53
Reporterdra 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusacknowledgedResolutionopen 
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))+
  {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


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker