diff options
Diffstat (limited to 'runtime/JavaScript/tests/functional/t053heteroT3.g')
-rwxr-xr-x | runtime/JavaScript/tests/functional/t053heteroT3.g | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/runtime/JavaScript/tests/functional/t053heteroT3.g b/runtime/JavaScript/tests/functional/t053heteroT3.g new file mode 100755 index 0000000..261c8a7 --- /dev/null +++ b/runtime/JavaScript/tests/functional/t053heteroT3.g @@ -0,0 +1,20 @@ +grammar t053heteroT3; +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 : x+=ID<V> ; +ID : 'a'..'z'+ ; +WS : (' '|'\n') {$channel=HIDDEN;} ; + |