How to write Antlr rules in a non-recursive way?
问题 I have the following the expressions I need to parse and(true, false) or(true, false, true) not(or(true, false, true)) and(and(true, false), false) or(or(true, false, true), true) so far I have the following grammar expr : orExpr ; orExpr : OR '(' andExpr (',' andExpr)+ ')' | andExpr ; andExpr : AND '(' equalityExpr (',' equalityExpr)+ ')' | equalityExpr ; equalityExpr : comparison ((EQUALS | NOT_EQUALS) comparison)* ; comparison : notExpr ((GREATER_THAN_EQUALS | LESS_THAN_EQUALS | GREATER