A compiler written in Python to translate KLEIN programs into TM assembly language. A group project for the Translation of Programming Languages class at University of Northern Iowa.
The current adhoc implementation of the runtime system in which main's arguments are gathered is inefficient. This can be improved.
Currently, load operations are being output every time an identifier is called for code_gen(). These can be redundant. The reason for this implementation is to ensure an identifier can be printed to std out. The root of the cause is the fact identifier code generation occurs within a function call, rather the implementation prior did not generate any code for an identifierNode when the method was called and only allocated a self.place position. This is a case of separation of responsibilities nixing us as we did not adhere to it.
The current adhoc implementation of the runtime system in which main's arguments are gathered is inefficient. This can be improved.
Currently, load operations are being output every time an identifier is called for code_gen(). These can be redundant. The reason for this implementation is to ensure an identifier can be printed to std out. The root of the cause is the fact identifier code generation occurs within a function call, rather the implementation prior did not generate any code for an identifierNode when the method was called and only allocated a self.place position. This is a case of separation of responsibilities nixing us as we did not adhere to it.