[antlr-interest] non-determinism warning

Monty Zukowski monty at codetransform.com
Tue Jul 5 12:13:36 PDT 2005


Monty Zukowski wrote:

> Otherwise you could keep your own state and do something like
> 
>  (DOT
>    {!tabMatched}?(IDENT|TAB{tabMatched=true;})
>    | (SOME_IMAGINARY_TOKEN_THAT_YOUR_LEXER_NEVER_PRODUCES)
>  )*
> 

OK, I'm not used to thinking of stuff with k=1.  My example won't work.
  It's a neat trick, but not the right one :)

Convince me of a good reason not to use k=2 and I'll put some more
thought into it.

Monty



More information about the antlr-interest mailing list