OutStmt
::= output := Expr
IfStmt
::= if Test then StmtList [ else
StmtList ] end
WhileStmt
::= while Expr do StmtList end
ForStmt ::= for Id := Expr to Expr do
StmtList end
BreakStmt ::= break
ReturnStmt ::= return [ Expr ]
Relop
::= <= | <> | < | >=
| > | =
Exprs
::= Expr {, Expr }
Expr
::= Conjunction { or Conjunction }
Conjunction ::= Test { and Test }
Test ::= odd Sum | Sum Relop
Sum | Sum
Sum
::= Term { (+ | -) Term }
Term
::= Factor { (* | /) Factor }
Factor
::= - Factor | LValue | Id( [ Exprs ] )
| Integer | true | false | input
| ( Expr )