stmt ::= assignment | cond boolexpr ::= numexpr cop numexpr numexpr ::= numexpr + term | term term ::= term * factor | factor factor ::= id | const | (numexpr) loop ::= while boolexpr do stmt od if ::= if boolexpr then stamt fi | if boolexpr then stmt else stmt fi assigment ::= id := expr expr ::= boolexpr | numexpr