xref: /aosp_15_r20/external/antlr/runtime/JavaScript/tests/functional/t053heteroT3.g (revision 16467b971bd3e2009fad32dd79016f2c7e421deb)
1grammar t053heteroT3;
2options {
3    language=JavaScript;
4    output=AST;
5}
6@header {
7function V() {
8    V.superclass.constructor.apply(this, arguments);
9};
10
11org.antlr.lang.extend(V, org.antlr.runtime.tree.CommonTree, {
12    toString: function() {
13        return this.getText() + "<V>";
14    }
15});
16}
17a : x+=ID<V> ;
18ID : 'a'..'z'+ ;
19WS : (' '|'\n') {$channel=HIDDEN;} ;
20
21