diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2020-03-27 18:23:07 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2020-03-27 18:23:07 +0100 |
commit | a9e2a012b7b777fb015b827cd9203f025ea45713 (patch) | |
tree | bfd4b9350294fd7d3e76cc730576e2a6e1683f71 /ecomp-c/minie.ebnf | |
parent | ba1b75042fc18ce908ae377a0cdf463f24c4dd3e (diff) | |
download | compilertests-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.ebnf | 2 |
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 ";" } . |