<compound <statement>{ <statement> } begin ; end ::= statement> <statement> ::= <simple | statement> <structured statement> <simple <assignment ::= statement> statement> | <read | statement> <write statement>| <if | statement> <for statement> <assignment <variable> := <expression> ::= statement> <read ::= read ( <input { , <input statement> variable> } ) variable> <input <variable> ::= variable> <write ::= write ( <output { , <output statement> value> } ) value> <output <expression> ::= value> <structured ::= <compound | <if | statement> statement> statement> <while statement> <if <expression> <statement> | if then ::= if <expression> then <statement> else <statement> statement> <while while <expression> do <statement> ::= statement>
<compound statement> ::= begin <statement>{ ; <statement> } end <statement> ::= <simple statement> | <structured statement> <simple statement> ::= <assignment statement> | <read statement> | <write statement>| <if statement> | <for statement> <assignment statement> ::= <variable> := <expression> <read statement> ::= read ( <input variable> { , <input variable> } ) <input variable> ::= <variable> <write statement> ::= write ( <output value> { , <output value> } ) <output value> ::= <expression> <structured statement> ::= <compound statement> | <if statement> | <while statement> <if statement> ::= if <expression> then <statement> | if <expression> then <statement> else <statement> <while statement> ::= while <expression> do <statement>