diff options
Diffstat (limited to 'grammar')
| -rw-r--r-- | grammar/expr.gr | 9 | ||||
| -rw-r--r-- | grammar/simple-cross-recursive.grm | 2 | ||||
| -rw-r--r-- | grammar/simple-left-recursive.grm | 1 | ||||
| -rw-r--r-- | grammar/simple-non-terminal.grm | 1 | ||||
| -rw-r--r-- | grammar/simple-right-recursive.grm | 1 | ||||
| -rw-r--r-- | grammar/simple-stupid.grm | 1 | ||||
| -rw-r--r-- | grammar/simple.gr | 7 |
7 files changed, 5 insertions, 17 deletions
diff --git a/grammar/expr.gr b/grammar/expr.gr deleted file mode 100644 index 9705a4b..0000000 --- a/grammar/expr.gr +++ /dev/null @@ -1,9 +0,0 @@ -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-cross-recursive.grm b/grammar/simple-cross-recursive.grm new file mode 100644 index 0000000..6377886 --- /dev/null +++ b/grammar/simple-cross-recursive.grm @@ -0,0 +1,2 @@ +main -> other 'b' +other -> main | 'b' diff --git a/grammar/simple-left-recursive.grm b/grammar/simple-left-recursive.grm new file mode 100644 index 0000000..ed3797d --- /dev/null +++ b/grammar/simple-left-recursive.grm @@ -0,0 +1 @@ +main -> 'a' | main 'a' diff --git a/grammar/simple-non-terminal.grm b/grammar/simple-non-terminal.grm new file mode 100644 index 0000000..b43f786 --- /dev/null +++ b/grammar/simple-non-terminal.grm @@ -0,0 +1 @@ +main -> 'a' | 'aa' | 'aaa' diff --git a/grammar/simple-right-recursive.grm b/grammar/simple-right-recursive.grm new file mode 100644 index 0000000..1efcbb4 --- /dev/null +++ b/grammar/simple-right-recursive.grm @@ -0,0 +1 @@ +main -> 'a' | 'a' main diff --git a/grammar/simple-stupid.grm b/grammar/simple-stupid.grm deleted file mode 100644 index 1fa8992..0000000 --- a/grammar/simple-stupid.grm +++ /dev/null @@ -1 +0,0 @@ -main -> main 'b' | '' diff --git a/grammar/simple.gr b/grammar/simple.gr deleted file mode 100644 index 42b256f..0000000 --- a/grammar/simple.gr +++ /dev/null @@ -1,7 +0,0 @@ -S -> A S d -S -> B S -S -> _ -A -> a -A -> c -B -> a -B -> b |