[antlr-interest] Tree output syntax

Gavin Lambert antlr at mirality.co.nz
Thu Apr 5 13:10:04 PDT 2007


At 05:05 6/04/2007, Terence Parr wrote:
 >Works for me.
[...]
 >grammar A;
 >options {output=AST;}
 >
 >declaration
 >   :  K_CLASS^ classDef
 >   |  K_FIELD^ fieldDef
 >   |  K_PROP^  propertyDef
 >   ;

Try putting in 'backtrack=true;' as well.  That seems to be one of 
the triggers, after further experimentation.



More information about the antlr-interest mailing list