1tree grammar t049treeparseriWalker; 2options { 3 language=JavaScript; 4 ASTLabelType=CommonTree; 5} 6a @init {var x=0;} : ^(ID {x=1;} {x=2;} INT?) 7 {this.capture($ID+", "+x);} 8 ; 9