Finished implementing the generation of the AST.
Not yet thoroughly tested.