aboutsummaryrefslogtreecommitdiff
path: root/runtime/JavaScript/tests/functional/t049treeparserh.g
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/JavaScript/tests/functional/t049treeparserh.g')
-rwxr-xr-xruntime/JavaScript/tests/functional/t049treeparserh.g10
1 files changed, 10 insertions, 0 deletions
diff --git a/runtime/JavaScript/tests/functional/t049treeparserh.g b/runtime/JavaScript/tests/functional/t049treeparserh.g
new file mode 100755
index 0000000..43753d2
--- /dev/null
+++ b/runtime/JavaScript/tests/functional/t049treeparserh.g
@@ -0,0 +1,10 @@
+grammar t049treeparserh;
+options {
+ language=JavaScript;
+ output=AST;
+}
+a : x=ID INT? (y=ID)? SEMI -> ^($x INT? $y?) SEMI ;
+ID : 'a'..'z'+ ;
+INT : '0'..'9'+;
+SEMI : ';' ;
+WS : (' '|'\\n') {$channel=HIDDEN;} ;