summaryrefslogtreecommitdiff
path: root/ecomp-c/minie.ebnf
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2020-03-27 18:23:07 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2020-03-27 18:23:07 +0100
commita9e2a012b7b777fb015b827cd9203f025ea45713 (patch)
treebfd4b9350294fd7d3e76cc730576e2a6e1683f71 /ecomp-c/minie.ebnf
parentba1b75042fc18ce908ae377a0cdf463f24c4dd3e (diff)
downloadcompilertests-a9e2a012b7b777fb015b827cd9203f025ea45713.tar.gz
compilertests-a9e2a012b7b777fb015b827cd9203f025ea45713.tar.bz2
allow assignment in constant definitions from constant expressions (numbers and other constants for now)
more testing in constants added a boolean type with true and false as predefined constants
Diffstat (limited to 'ecomp-c/minie.ebnf')
-rw-r--r--ecomp-c/minie.ebnf2
1 files changed, 1 insertions, 1 deletions
diff --git a/ecomp-c/minie.ebnf b/ecomp-c/minie.ebnf
index 988b2b6..5a9c1d3 100644
--- a/ecomp-c/minie.ebnf
+++ b/ecomp-c/minie.ebnf
@@ -14,7 +14,7 @@ StatementList = Statement { ";" Statement } .
StatementBlock = "begin" StatementList "end" .
SimpleType = Identifier .
Type = SimpleType .
-ConstDeclaration = Identifier { "," Identifier } ":" Type "=" Number .
+ConstDeclaration = Identifier { "," Identifier } ":" Type "=" ( Number | Identifier ).
ConstBlock = "const" { ConstDeclaration ";" } .
VariableDeclaration = Identifier { "," Identifier } ":" Type .
VariableBlock = "var" { VariableDeclaration ";" } .