Home | History | Annotate | Download | only in functional
      1 grammar t053heteroT12;
      2 options {
      3     language=JavaScript;
      4     output=AST;
      5 }
      6 @header {
      7 function V() {
      8     V.superclass.constructor.apply(this, arguments);
      9 };
     10 
     11 org.antlr.lang.extend(V, org.antlr.runtime.tree.CommonTree, {
     12     toString: function() {
     13         return this.getText() + "<V>";
     14     }
     15 });
     16 }
     17 a : 'begin' INT -> ^('begin'<V> INT) ;
     18 ID : 'a'..'z'+ ;
     19 INT : '0'..'9'+ ;
     20 WS : (' '|'\n') {$channel=HIDDEN;} ;
     21 
     22