[antlr-interest] rewrite rule element cardinality

joestelmach at gmail.com joestelmach at gmail.com
Tue Feb 23 17:24:07 PST 2010


>
> Ack! perhaps that I did not take into account flat trees...i'll bet that is it. To confirm this, can you change 'c' to just FOO? If that works, then I know exactly what the problem is.
>

Yes, changing the c rule to:

    c : C -> FOO;

results in the correct AST of:

    (GROUP FOO BAZ) (GROUP FOO BAZ) (GROUP FOO BAZ)


More information about the antlr-interest mailing list