summaryrefslogtreecommitdiff
path: root/old
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2018-08-23 11:04:14 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2018-08-23 11:04:14 +0200
commit21f6eb821811cd3c93cb6604da236a44d47e0749 (patch)
tree628ded96540f93b669240f89df6c495c9b8f276e /old
parent8b33ba7fab06c77fcf3fd438439c885dc30a5a3d (diff)
downloadcompilertests-21f6eb821811cd3c93cb6604da236a44d47e0749.tar.gz
compilertests-21f6eb821811cd3c93cb6604da236a44d47e0749.tar.bz2
crenshaw: "END" and blocks with assignments
Diffstat (limited to 'old')
-rw-r--r--old/crenshaw.ebnf6
1 files changed, 5 insertions, 1 deletions
diff --git a/old/crenshaw.ebnf b/old/crenshaw.ebnf
index 89192e8..107f225 100644
--- a/old/crenshaw.ebnf
+++ b/old/crenshaw.ebnf
@@ -1,4 +1,5 @@
Whitespace = " " | "\t" .
+Newline = "\n" .
Digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" .
Letter = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z" |
"a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z".
@@ -11,4 +12,7 @@ Ident = Variable | Function .
Expression = Term { ( "+" | "-" ) Term } .
Term = Factor { ( "*" | "/" ) Factor } .
Factor = Num | "(" Expression ")" | Ident .
-Assignment = Expression .
+Assignment = Variable "=" Expression .
+Statement = Assignment Newline .
+Block = { Statement } .
+Program = Block "e" .