I'm trying to parse a language. The follow ANTLR4 parser rules are directly copied from the language specification :
physical_value
: raw_value DIV factor MUL factor PLUS offset
;
raw_value
: (physical_value MINUS offset) DIV factor
;
but antlr reports an error:The following sets of rules are mutually left-recursive I don't know how to modify the grammar, Hope someone can help me. Thanks.