[antlr-interest] Re: Look-ahead changes when rules lifted up
Paul J. Lucas
dude at darkfigure.org
Tue Dec 3 11:24:47 PST 2002
--- In antlr-interest at y..., mzukowski at y... wrote:
> You can't go changing lexers from the parser. The parser has already
> recieved k more tokens beyond the token you are looking at in the parser.
> You must switch lexers from the lexer.
And how exactly does one do that (given that all the examples in the documentation show changing lexers from the parser, e.g., Java/JavaDoc)?
That aside, it doesn't answer my question since there should be no reason why moving the code should change the behavior.
Even that aside, for the '>' token, there is no reason it needs to look-ahead at all since no other token starts with '>', i.e., it doesn't need to look past it to disambiguate it.
- Paul
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list