[antlr-interest] Switching lexer rules on/off from parser

Martin Probst mail at martin-probst.com
Mon Mar 21 12:01:25 PST 2005


I'm wrong on this, the code has been fixed.

Am Montag, den 21.03.2005, 18:26 +0100 schrieb Martin Probst:
> Hi,
> 
> > The "be careful" has to do with lookahead.  If the lexer gets a few
> > tokens ahead of the parser, it's possible to "see" a newline in
> > declaration mode that should, in fact, terminate a statement.
> 
> This "be careful" should be taken very seriously. If you are using C++
> code generation you will definetly run into problems as the current
> implementation always looks one token ahead of the parser. I once wrote
> a mail and a small patch to the list but Ric apparently didn't have the
> time to look into that. If you run into the problem I can give you that
> patch.
> 
> mfg
> Martin
> 
> 



More information about the antlr-interest mailing list