1 grammar t053heteroTP16; 2 options { 3 language=JavaScript; 4 output=AST; 5 tokenVocab=t053heteroT16; 6 } 7 tokens { ROOT; } 8 @header { 9 function V16(ttype, x) { 10 V16.superclass.constructor.call(this, new org.antlr.runtime.CommonToken(ttype)); 11 this.foobar = x; 12 }; 13 org.antlr.lang.extend(V16, org.antlr.runtime.tree.CommonTree, { 14 toString: function() { 15 return t053heteroTP16Parser.tokenNames[this.getType()] + "<V>;" + this.foobar; 16 } 17 }); 18 } 19 a : ID -> ROOT<V16>[42] ID 20 ; 21 22