Boolean expressions are used to control branch and loop statements

B OOLEAN EXPRESSIONS are constructed using boolean operators. We will consider here the following rules.

E E E
E E E
E E
E E
E
E
E

W HILE STATEMENTS WITH THE NUMERICAL METHOD.

The following syntax-directed translation generates code for a while statement.
Production Semantic Rule
S E S 1 S . begin := newlabel
S . after := newlabel
code 1 := generate ( S . begin ' : ') | | E . code | |
code 2 := generate (' if ' E . place ' = 0 ' ' goto ' S . after ) | | S 1 . code
code 3 := generate (' goto ' S . begin ) | | generate ( S . after )
S . code := code 1 | | code 2 | | code 3

F LOW OF CONTROL STATEMENTS WITH THE JUMP METHOD. We will consider here the following rules.

S E S 1
S E S 1 S 2
S E S 1