diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2018-09-24 10:06:56 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2018-09-24 10:06:56 +0200 |
commit | cdfa980cbf43e70123b1ec42becc58e657869259 (patch) | |
tree | 4f29155990ec6a937f1e142a4720eb6d4eacc651 /old | |
parent | f6aaa114af25bbbab270c2c242650c67669c0ed4 (diff) | |
download | compilertests-cdfa980cbf43e70123b1ec42becc58e657869259.tar.gz compilertests-cdfa980cbf43e70123b1ec42becc58e657869259.tar.bz2 |
playing with some procedures in minie
Diffstat (limited to 'old')
-rw-r--r-- | old/minie.ebnf | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/old/minie.ebnf b/old/minie.ebnf index 5d15a41..42dcc15 100644 --- a/old/minie.ebnf +++ b/old/minie.ebnf @@ -11,9 +11,14 @@ VariableName = Identifier . Assignment = VariableName ":=" Expression . StatementList = Statement { ";" Statement } IfStatement = "if" Condition "do" StatementList "else" StatementList "end" . -Statement = Assignment | IfStatement . +QualifiedIdentifier = Identifier [ "." Identifier ]; +ParameterList = "(" ")" . +ProdecureCall = QualifiedIdentifier ParameterList . +Statement = Assignment | IfStatement | ProcedureCall . StatementBlock = "begin" StatementList "end" . VariableDeclaration = Identifier ":" Type . +VariableBlock = "VAR" { VariableDeclaration ";" } . ImportBlock = "IMPORT" Identifier { "," Identifier } . -DeclarationBlock = "VAR" VariableDeclaration { ";" VariableDeclaration } . -Module = "module" Identifier ";" ImportBlock DeclarationBlock StatementBlock . +ProcedureDeclaration = "PROCEDURE" Identifier ";" DeclarationBlock StatementBlock . +DeclarationBlock = [ VariableBlock ] { ProcedureDeclaration ";" } . +Module = "module" Identifier ";" [ ImportBlock ] DeclarationBlock StatementBlock . |