separate parser that does typechecking and that does code generation