You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 4770 Reporter:@dra27 Status: acknowledged (set by @damiendoligez on 2009-04-29T13:53:18Z) Resolution: open Priority: normal Severity: feature Version: 3.11.0 Category: tools (ocaml{lex,yacc,dep,debug,...}) Monitored by:@glondu@yakobowski
Bug description
In 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 information
I 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.
The text was updated successfully, but these errors were encountered:
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.
Original bug ID: 4770
Reporter: @dra27
Status: acknowledged (set by @damiendoligez on 2009-04-29T13:53:18Z)
Resolution: open
Priority: normal
Severity: feature
Version: 3.11.0
Category: tools (ocaml{lex,yacc,dep,debug,...})
Monitored by: @glondu @yakobowski
Bug description
In 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 information
I 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.
The text was updated successfully, but these errors were encountered: