diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2018-12-22 21:38:02 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2018-12-22 21:38:02 +0100 |
commit | 8975a83c3532e56f97b2555db71d957dd69cda81 (patch) | |
tree | 5438ad833e5d0675d8b83dea8855229cd3445ecb /old | |
parent | 2244c65cdb0bfa2cc88ebe04cfdeba7349251f33 (diff) | |
download | compilertests-8975a83c3532e56f97b2555db71d957dd69cda81.tar.gz compilertests-8975a83c3532e56f97b2555db71d957dd69cda81.tar.bz2 |
some work on arrays and reading from stdin
Diffstat (limited to 'old')
-rw-r--r-- | old/minie.ebnf | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/old/minie.ebnf b/old/minie.ebnf index 2562aaa..ef38829 100644 --- a/old/minie.ebnf +++ b/old/minie.ebnf @@ -19,9 +19,12 @@ ProdecureCall = QualifiedIdentifier ParameterList . Statement = Assignment | IfStatement | ProcedureCall . StatementBlock = "begin" StatementList "end" . VariableName = Identifier . +SimpleType = Identifier . +ArrayType = "array" Length "of" Type . +Type = SimpleType | ArrayType . VariableDeclaration = VariableName ":" Type . -VariableBlock = "VAR" { VariableDeclaration ";" } . -ImportBlock = "IMPORT" Identifier { "," Identifier } . -ProcedureDeclaration = "PROCEDURE" Identifier ";" DeclarationBlock StatementBlock . +VariableBlock = "var" { VariableDeclaration ";" } . +ImportBlock = "import" Identifier { "," Identifier } . +ProcedureDeclaration = "procedure" Identifier ";" DeclarationBlock StatementBlock . DeclarationBlock = [ VariableBlock ] { ProcedureDeclaration ";" } . Module = "module" Identifier ";" [ ImportBlock ] DeclarationBlock StatementBlock . |