[antlr-interest] Lexical rules
Sharon Li
hushlee83 at yahoo.com.sg
Mon Feb 17 21:33:14 PST 2003
Hello,
got a problem with non-determinism. how should i define my lexer rules so that I can have:
ALPHA : ( 'a'..'z' | 'A'..'Z' );
DIGIT : ('0'..'9');
NUMERIC : (DIGIT)+ ((DOT) (d:DIGIT)*)* ;
NAME : (ALPHA) (ALPHA|DIGIT|UNDERSCORE)* ;
all in my lexer without getting a non-determinism error? Coz I need a rule that finds a single digit as well as a rule that finds a numeric (i.e with decimal places), and a rule for a single letter as well as word.
Thanks in advance for any help rendered!
Yahoo! Biztools
- Promote your business from just $5 a month!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20030218/c391f700/attachment.html
More information about the antlr-interest
mailing list