[antlr-interest] Identical characters cause error
Ngọc Minh Lê
ngocminh.oss at gmail.com
Sat Aug 6 20:10:38 PDT 2011
This simplistic grammar can't be compiled:
grammar T;
x : '\u006c';
y : '\u006C';
z : 'l';
ANTLR reports this error:
The following token definitions can never be matched because prior tokens
match the same input: T__5,T__6
In my grammar, by accident I had both ASCII character and Unicode escaped
character and it took me hours to figure out the problem. I think ANTLR
should recognize those are the same character before creating tokens for
them to avoid this error.
Best wishes,
Minh.
--
Lê Ngọc Minh
Hanoi University of Science and Technology, Computer Science
Skype: ngocminh_oss | Yahoo: ngocminh_oss | Tel: +84 988 456 037
More information about the antlr-interest
mailing list