Chapter 8: Intermediate Code Generation

Boolean Expressions

E E1 or M E2

| E1 and M E 2

| not E1

| (E 1 )

| id 1 relop id 2

| true

| false M ? ε

. Insert a marker non terminal M into the grammar to pick up index of next quadruple.

. attributes truelist and falselist are used to generate jump code for boolean expressions

. incomplete jumps are placed on lists pointed to by E.truelist and E.falselist

E.truelist and E.falselist have just incomplete jumps as of now. The entries in this list will be given targets (subsequent filling of labels) later on - backpatching.