I would like to set precedence rules (for example for math operators of multiplication and addition -- i.e. * and +) however in flat manner.
Take a look: http://www.gregbugaj.com/?p=251 (in short it solves above example by stating the expression is addition of mult-expressions).
This does the job at cost of very deep parse tree, because precedence is solved using nesting rules. I would like to have one ("flat") rule for parsing plus declaration of precedence (so, like it was solved in Yacc).
Question: how this (Yacc-like, i.e. flat one) approach can be achieved in ANTLR?