EBNF Grammar of Taste
Taste = "PROGRAM" ident ";" Body ident ".".
Body = { "VAR" {ident ":" TypeId ";"}
| "PROCEDURE" ident ";" Body Ident ";"
}
"BEGIN" StatSeq "END".
StatSeq = Stat {";" Stat}.
Stat = [ ident [":" "=" Expression]
| "IF" Expression "THEN" StatSeq ["ELSE" StatSeq ] "END"
| "WHILE" Expression "DO" StatSeq "END"
| "READ" ident
| "WRITE" Expression
].
Expression = SimExpr [RelOp SimExpr].
SimExpr = Term {AddOp Term}.
Term = Factor {MulOp Factor}.
Factor = (ident | "TRUE" | "FALSE" | number | "-" Factor).
AddOp = "+" | "-".
MulOp = "*" | "/".
RelOp = "=" | "<" | ">".
TypeId = "INTEGER" | "BOOLEAN".