Contents
Page-10
Prev
Next
Page+10
Index
Arithmetic Expressions
Code for arithmetic expressions on a multi-register
machine can be
generated from trees using a simple recursive algorithm.
The specifications of the recursive algorithm are:
- Input: an arithmetic expression tree
- Side Effect: outputs instructions to the output file
- Output: returns the number of a register that contains
the result.