-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Labels
Milestone
Description
When using parantheses around regular expressions in bindings, the binding result sometimes seems incorrect:
// recognize 'something' between X-es
rascal>[ <comment,rest> | /<comment:(X.*X)><rest:.*>/ := "before XcommentX after"]
lrel[str,str]: [<"XcommentX","XcommentX">]
The variables comment and rest should never match the same part of the string.
rascal>[ rest | /<comment:(X.*X)><rest:.*>/ := "before XcommentX after"]
list[str]: ["XcommentX"]
The result above is consistent with the first test but if you remove the first (unused) binding of comment, the result is different:
rascal>[ rest | /(X.*X)<rest:.*>/ := "before XcommentX after"]
list[str]: [" after"]
Reactions are currently unavailable