aboutsummaryrefslogtreecommitdiff
path: root/antlr-3.4/runtime/JavaScript/tests/functional/t053heteroT3.g
diff options
context:
space:
mode:
Diffstat (limited to 'antlr-3.4/runtime/JavaScript/tests/functional/t053heteroT3.g')
-rwxr-xr-xantlr-3.4/runtime/JavaScript/tests/functional/t053heteroT3.g20
1 files changed, 20 insertions, 0 deletions
diff --git a/antlr-3.4/runtime/JavaScript/tests/functional/t053heteroT3.g b/antlr-3.4/runtime/JavaScript/tests/functional/t053heteroT3.g
new file mode 100755
index 0000000..261c8a7
--- /dev/null
+++ b/antlr-3.4/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;} ;
+