This was a piece of coursework I submitted for the Compilers module of the 2nd year of my Computer Science degree at Durham.
I think it's respectable code but honestly the bit I like the most about it is the write_image() routine which plots very pretty syntax trees.
I don't think the assignment is being set any more, hence why I'm making this public, but on the off chance that someone comes across this while completing the same assignment, I implore you not to compromise the integrity of your degree and our university by plagerising it.