Hi all,
Here's a small example for which the interpreter in ANTLRWorks 1.4.2
incorrectly gives MismatchedTokenExceptions:
grammar test;
sa : a EOF;
sb : b EOF;
sc : c EOF;
p : '(' ')';
x : p | '^' ;
a : (p | '^')*; // does not match ^ does match ()
b : ('^' | p)*; // does match ^ no match for ()
c : x *; // does match ^ does match ()
This bug also applies if the p rule is inlined into the others, but only if
p is a two-token rule. If p matches a single token, then the bug goes away
if p is inlined.
Cheers from a happy ANTLR user,
-- Ben
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en.