HW3 for compilers class