CS 370 Lab #11: Fun with LinkLists and Trees
April 11
Build your TACode (link list of 3-address instructions) ADT
You need a struct, plus operations to:
- Allocate a single (list of length=1) instruction - gen(OP,dest,src1,src2)
- Concatenate lists of instructions
- Print lists of instructions
Practice Tree Traversals
Let's get concrete about these here tree traversals.
Suppose we have the following function:
void main()
{
printf("%d\n", 3+4*2);
}
What does the syntax tree look like? Write traversals for its
synthesized attributes.