[antlr-interest] optional node in tree parser...
Oliver Zeigermann
oliver.zeigermann at gmail.com
Fri Jan 2 04:50:25 PST 2009
rule
: {$p}=> ^(A B) (^(C .))?
;
2009/1/2 Pady Srinivasan <padysrini at hotmail.com>:
>
> Can I have some rule as follows ?
>
> rule
> : {$p}=> ^(A B) ^(C .)?
> ;
>
> When I do this, I get an error about "unexpected token '?'". How do I
> indicate that the second subtree might not exist ?
>
>
> Thanks
>
> -- pady
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>
More information about the antlr-interest
mailing list