aboutsummaryrefslogtreecommitdiff
path: root/antlr-3.4/runtime/JavaScript/tests/functional/t051treeRewriteASTyWalker.g
diff options
context:
space:
mode:
Diffstat (limited to 'antlr-3.4/runtime/JavaScript/tests/functional/t051treeRewriteASTyWalker.g')
-rwxr-xr-xantlr-3.4/runtime/JavaScript/tests/functional/t051treeRewriteASTyWalker.g14
1 files changed, 14 insertions, 0 deletions
diff --git a/antlr-3.4/runtime/JavaScript/tests/functional/t051treeRewriteASTyWalker.g b/antlr-3.4/runtime/JavaScript/tests/functional/t051treeRewriteASTyWalker.g
new file mode 100755
index 0000000..e8a153e
--- /dev/null
+++ b/antlr-3.4/runtime/JavaScript/tests/functional/t051treeRewriteASTyWalker.g
@@ -0,0 +1,14 @@
+// @@ANTLR Tool Options@@: -trace
+tree grammar t051treeRewriteASTyWalker;
+options {
+ language=JavaScript;
+ output=AST;
+ ASTLabelType=CommonTree;
+ tokenVocab=t051treeRewriteASTy;
+ rewrite=true;
+}
+tokens { X; }
+s : 'boo' a* b ; // don't reset s.tree to b.tree due to 'boo'
+a : X ;
+b : ^(ID INT) -> INT
+ ;