[antlr-interest] Can't figure out the ambiguity leading to this unreachable token def
nopik at data.pl
Sun Apr 6 01:06:29 PDT 2008
> NAME: ('a'..'z' | 'A'..'Z' | '0'..'9')+;
> VALUE: ('a'..'z' | 'A'..'Z')+;
If lexer will see 'hi' in the input, it should produce NAME or VALUE?
This is the ambiguity, so ANTLR disabled second alternative (VALUE),
leaving only NAME. I think that if you would look into generated source
code, you would confirm that.
Best regards from
More information about the antlr-interest