From 74a7a96124548a28d06116fcc96e9542041ea5ae Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Wed, 5 Sep 2018 14:20:02 +0200 Subject: variable declarations --- old/minie.ebnf | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'old') 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 . -- cgit v1.2.3-54-g00ecf