Arithmetic expressions such as
2 * (9 /
-3)
have an inherent tree-like structure. For example, Figure A is a
representation of the expression in Equation (1). This kind of tree
is called an expression tree.
The terminal nodes (leaves) of an expression tree are the
variables or constants in the expression (2, 9, 3). The
non-terminal nodes of an expression tree are the operators (*, /
and -). Notice that the parentheses which appear in Equation (1)...