[antlr-interest] Weird problem with semantic predicates. Incorrect warning message

Gavin Lambert antlr at mirality.co.nz
Thu Apr 30 05:03:02 PDT 2009


At 09:48 30/04/2009, John B. Brodie wrote:
 >Also if you specify k=2; in an options{} block at the top of the 

 >file, the warning also goes away.

You can alternatively specify k=2 for that rule alone, to avoid 
affecting other rules:

p_ExprSingle
options { k = 2; }
   : p_IfExpr
   | {false}? => p_ExitExpr
   | p_StepExpr
   ;



More information about the antlr-interest mailing list