Finished implementation of parser and semantics