###
Compiler Construction

Fall 1998

Assignment IV

Due : October 27.
Now that we know how to use the tree-walker routine, let's do something a
little more elaborate. Expand the tree-walker so that arithmetic and logical
expressions are printed in postfix order, and the name of the resulting type
appears next to the operator. For example. given the program:
procedure test2 is
x, y, z : integer := 15;
begin
if x > 0 then
y := x * z + 1;
end if;
end;
The output should be:
(4) x 0 > (boolean)
(5) x z * (integer) 1 + (integer)
Output should also include the line number at which the expression occurs.