Is there a simple transformation or workaround to make this work in ANTLR4?
a : a p
| b q
| c
;
b : b r
| a s
| d
;
That is, a
and b
are self-left-recursive and mutual-left-recursive, the other rules (c
, d
, p
, q
, r
, s
) are just placeholders for simple rules.