aboutsummaryrefslogtreecommitdiff
path: root/grammar
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2025-05-14 16:39:23 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2025-05-14 16:39:23 +0200
commit9c0f41abba755ae000b058af137b2925b571d6a1 (patch)
treed9b44d3f13b3a8d14f1c0c84961f286484bc40c3 /grammar
parent3fa83926b88a8000c3183377c0ddfe3222503c76 (diff)
add new grammar tests
Diffstat (limited to 'grammar')
-rw-r--r--grammar/middle-recursion.grm3
-rw-r--r--grammar/simple-cross-recursive.grm4
2 files changed, 5 insertions, 2 deletions
diff --git a/grammar/middle-recursion.grm b/grammar/middle-recursion.grm
new file mode 100644
index 0000000..71cc71f
--- /dev/null
+++ b/grammar/middle-recursion.grm
@@ -0,0 +1,3 @@
+main -> 'a' main B | B
+A -> 'ab'
+B -> A | 'b'
diff --git a/grammar/simple-cross-recursive.grm b/grammar/simple-cross-recursive.grm
index 6377886..d061cf7 100644
--- a/grammar/simple-cross-recursive.grm
+++ b/grammar/simple-cross-recursive.grm
@@ -1,2 +1,2 @@
-main -> other 'b'
-other -> main | 'b'
+main -> other 'a'
+other -> main | 'a'