Chapter 8: Intermediate Code Generation

Scheme to implement translation .

S begin L end S.nextlist = L.nextlist
S A S.nextlist = makelist()
L L 1 ; M S backpatch(L 1 .nextlist, M.quad)
  L.nextlist = S.nextlist
L S L.nextlist = S.nextlist
N ε N.nextlist = makelist(nextquad)
  emit(goto ---)
M ε M.quad = nextquad