[antlr-interest] Lexer ambiguities
Amal Khailtash
akhailtash at gmail.com
Sun Feb 10 09:59:38 PST 2008
How does one resolve lexer ambiguities? I have a grammar like:
a : NUMBER UNIT ;
b : VALUE NAME ;
NUMBER : ('0'..'9')+ ;
UNIT : 'kg' | 'lb' ;
VALUE : '0' | '1' ;
NAME : ('!'..'~')+ ;
How can I distinguish between a NUMBER and a VALUE and between a UNIT and a
NAME?
-- Amal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080210/fce1523a/attachment.html
More information about the antlr-interest
mailing list