[antlr-interest] optional node in tree parser...

Pady Srinivasan padysrini at hotmail.com
Thu Jan 1 21:24:09 PST 2009


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 



More information about the antlr-interest mailing list