1grammar t053heteroTP14; 2options { 3 language=JavaScript; 4 output=AST; 5 tokenVocab=t053heteroT14; 6} 7@header { 8function V() { 9 V.superclass.constructor.apply(this, arguments); 10}; 11org.antlr.lang.extend(V, org.antlr.runtime.tree.CommonTree, { 12 toString: function() { 13 return this.getText() + "<V>"; 14 } 15}); 16 17function W() { 18 W.superclass.constructor.apply(this, arguments); 19}; 20org.antlr.lang.extend(W, org.antlr.runtime.tree.CommonTree, { 21 toString: function() { 22 return this.getText() + "<W>"; 23 } 24}); 25} 26a : ID INT -> ^(INT<V> ID<W>) 27 ; 28 29