Parser partially generates code blocks. Compiles but does not function