[antlr-interest] lookahead using multiple lexers is not possible to simulate in ANTLR?
Andrei Timisescu
andreitim at yahoo.com
Sat Jun 28 05:51:28 PDT 2003
I have multiple lexeres and would like to look ahead a token with one lexer, and if it is not the token I expect, try another lexer. Something like this is not possible in ANTLR I see:
host
: {selector->push("hostnameLexer");} HOSTNAME
| {selector->push("ipAddressLexer");} ADDRESS
;
ANTLR gets the first token (even if I only look ahead: LA(1)) using current parser and consumes the characteres from the input stream.
Is it possible to simulate someting like the above in ANTLR?
---------------------------------
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20030628/b46a694a/attachment.html
More information about the antlr-interest
mailing list