diff options
Diffstat (limited to 'runtime/JavaScript/tests/functional/t053heteroT10.g')
-rwxr-xr-x | runtime/JavaScript/tests/functional/t053heteroT10.g | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/runtime/JavaScript/tests/functional/t053heteroT10.g b/runtime/JavaScript/tests/functional/t053heteroT10.g new file mode 100755 index 0000000..311b929 --- /dev/null +++ b/runtime/JavaScript/tests/functional/t053heteroT10.g @@ -0,0 +1,22 @@ +grammar t053heteroT10; +options { + language=JavaScript; + output=AST; +} +@header { +function V() { + V.superclass.constructor.apply(this, arguments); +}; + +org.antlr.lang.extend(V, org.antlr.runtime.tree.CommonTree, { + toString: function() { + return this.getText() + "<V>"; + } +}); +} +a : ID INT -> ^(ID<V> INT) ; +ID : 'a'..'z'+ ; +INT : '0'..'9'+ ; +WS : (' '|'\n') {$channel=HIDDEN;} ; + + |