diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2018-09-05 14:20:02 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2018-09-05 14:20:02 +0200 |
commit | 74a7a96124548a28d06116fcc96e9542041ea5ae (patch) | |
tree | c869e58e1c70905bb717e4233c74afa7e00129aa /old | |
parent | 1edf603d623fe0bc71c520d84414e8a302c6588e (diff) | |
download | compilertests-74a7a96124548a28d06116fcc96e9542041ea5ae.tar.gz compilertests-74a7a96124548a28d06116fcc96e9542041ea5ae.tar.bz2 |
variable declarations
Diffstat (limited to 'old')
-rw-r--r-- | old/minie.ebnf | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/old/minie.ebnf b/old/minie.ebnf index 9940516..2407766 100644 --- a/old/minie.ebnf +++ b/old/minie.ebnf @@ -1,12 +1,14 @@ -Digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" . -Letter = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z" | - "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z". -Identifier = Letter { Letter | Digit } . -Number = Digit { Digit } . -Constant = Number . -Expression = Constant . -VariableName = Identifier . -Assignment = VariableName ":=" Expression . -Statement = Assignment . -Block = "begin" "end" | ( Statement { ";" Statement } "end" ) . -Module = "module" Identifier ";" Block . +Digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" . +Letter = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z" | + "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z". +Identifier = Letter { Letter | Digit } . +Number = Digit { Digit } . +Constant = Number . +Expression = Constant . +VariableName = Identifier . +Assignment = VariableName ":=" Expression . +Statement = Assignment . +StatementBlock = "begin" "end" | ( Statement { ";" Statement } "end" ) . +VariableDeclaration = Identifier ":" Type . +DeclarationBlock = "VAR" VariableDeclaration { ";" VariableDeclaration } . +Module = "module" Identifier ";" DeclarationBlock StatementBlock . |