[antlr-interest] How to get rid of useless nodes in AST?
apalala at gmail.com
Fri Nov 16 05:17:01 PST 2012
Jim is right, but he doesn't make much of an explanation:
subtract : modulo ('-' modulo)* -> ^(SUBTRACT modulo (modulo)* ) ;
To get rid of the unneeded tokens you can write something like:
On Thu, Nov 15, 2012 at 11:56 PM, Jarrod Roberson <jarrod at vertigrated.com>wrote:
> I asked this question on stackoverflow.com, it has many details and
> graphics depicting what I am trying to do.
> Can anyone help me get rid of these intermediate nodes?
> Jarrod Roberson
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
More information about the antlr-interest