aboutsummaryrefslogtreecommitdiff
path: root/grammar
diff options
context:
space:
mode:
Diffstat (limited to 'grammar')
-rw-r--r--grammar/expr.gr9
-rw-r--r--grammar/simple.gr7
2 files changed, 16 insertions, 0 deletions
diff --git a/grammar/expr.gr b/grammar/expr.gr
new file mode 100644
index 0000000..9705a4b
--- /dev/null
+++ b/grammar/expr.gr
@@ -0,0 +1,9 @@
+S -> B A
+A -> + B A
+A -> _
+B -> D C
+C -> * D C
+C -> _
+D -> ( S )
+D -> a
+D -> b
diff --git a/grammar/simple.gr b/grammar/simple.gr
new file mode 100644
index 0000000..42b256f
--- /dev/null
+++ b/grammar/simple.gr
@@ -0,0 +1,7 @@
+S -> A S d
+S -> B S
+S -> _
+A -> a
+A -> c
+B -> a
+B -> b