aboutsummaryrefslogtreecommitdiff
path: root/antlr-3.4/runtime/JavaScript/tests/functional/t045dfabug.g
diff options
context:
space:
mode:
Diffstat (limited to 'antlr-3.4/runtime/JavaScript/tests/functional/t045dfabug.g')
-rwxr-xr-xantlr-3.4/runtime/JavaScript/tests/functional/t045dfabug.g31
1 files changed, 31 insertions, 0 deletions
diff --git a/antlr-3.4/runtime/JavaScript/tests/functional/t045dfabug.g b/antlr-3.4/runtime/JavaScript/tests/functional/t045dfabug.g
new file mode 100755
index 0000000..722c572
--- /dev/null
+++ b/antlr-3.4/runtime/JavaScript/tests/functional/t045dfabug.g
@@ -0,0 +1,31 @@
+grammar t045dfabug;
+options {
+ language = JavaScript;
+ output = AST;
+}
+
+
+r
+options { backtrack=true; }
+ : (modifier+ INT)=> modifier+ expression
+ | modifier+ statement
+ ;
+
+expression
+ : INT '+' INT
+ ;
+
+statement
+ : 'fooze'
+ | 'fooze2'
+ ;
+
+modifier
+ : 'public'
+ | 'private'
+ ;
+
+ID : 'a'..'z' + ;
+INT : '0'..'9' +;
+WS: (' ' | '\n' | '\t')+ {$channel = HIDDEN;};
+