Syntax directed translation of boolean expressions
E E 1 or E2
E.place := newtmp
emit(E.place ':=' E 1 .place 'or' E2 .place)
E E1 and E 2
E.place:= newtmp
emit(E.place ':=' E 1 .place 'and' E2 .place)
E not E1
E.place := newtmp
emit(E.place ':=' 'not' E1 .place)
E (E1 ) E.place = E1 .place
The above written translation scheme produces three address code for Boolean expressions. It is continued to the next page.
|