I'm very ashamed to ask... I wrote a grammar for the language with typecast from int to bool and vice versa.
logic_expr : expr NOT? OR | AND expr
| expr '|' expr SMALLER | LARGER
| NUMBER
| NUMBER_SHORT
| IDENT
| LOGIC_DEFINED
;
math_expr : expr ADD | SUB expr
| NUMBER
| NUMBER_SHORT
| IDENT
| LOGIC_FULL
;
expr : logic_expr
| math_expr
| IDENT
| LOGIC_DEFINED
| '(' expr ')'
;
But antlr tells me "The following sets of rules are mutually left-recursive [logic_expr, expr, math_expr]" I cant understand what's wrong in my grammar?