summaryrefslogtreecommitdiff
path: root/old
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2018-09-07 13:14:54 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2018-09-07 13:14:54 +0200
commitc34d5150cd44af39b12cf5af7ff627677bb82c02 (patch)
tree7c3f96ed532d2500268ce3bddd8e5ac530ab5615 /old
parent6b354f74920750e3bb36748b439d09a85d8f3364 (diff)
downloadcompilertests-c34d5150cd44af39b12cf5af7ff627677bb82c02.tar.gz
compilertests-c34d5150cd44af39b12cf5af7ff627677bb82c02.tar.bz2
some easy sign handling in expressions
Diffstat (limited to 'old')
-rw-r--r--old/minie.ebnf2
1 files changed, 1 insertions, 1 deletions
diff --git a/old/minie.ebnf b/old/minie.ebnf
index e8be909..65bbdec 100644
--- a/old/minie.ebnf
+++ b/old/minie.ebnf
@@ -6,7 +6,7 @@ Number = Digit { Digit } .
Constant = Number .
Factor = Constant | VariableName | "(" Expression ")" .
Term = Factor { ( "*" | "/" ) Factor } .
-Expression = Term { ( "+" | "-" ) Term } .
+Expression = [ "+" | "-" ] Term { ( "+" | "-" ) Term } .
VariableName = Identifier .
Assignment = VariableName ":=" Expression .
Statement = Assignment .