1 tree grammar t049treeparsercWalker; 2 options { 3 language=JavaScript; 4 ASTLabelType=CommonTree; 5 } 6 a : b b ; 7 b : ID INT {this.capture($ID+" "+$INT+"\n");} 8 | ^(ID INT) {this.capture("^("+$ID+" "+$INT+")");} 9 ; 10