Stage 6 of the
Klein compiler project
OUT: Friday, November 10
DUE: Friday, December 1
STATUS CHECK DUE: Friday, November 17
This stage consists of a complete implementation of the fourth component of your Klein compiler and two auxiliary programs.
Write a code generator that produces executable TM assembly language for any semantically-valid Klein program.As defined in Project 5, the code generator is a function or object that takes as input:
Produce at least one new meaningful program written in Klein.Your test program should be at least at the level of a late CS1 program, minus the data structures. Feel free to write a more advanced program, say, a solution to a Project Euler problem. You certainly understand Klein well enough by this time to perform some interesting computations.
Modify your Unix command-line script kleinc, if necessary, to take the name of a Klein program as an argument, run your complete compiler on it, and produce as output a TM program of the same name.For example,
$ ls euclid.kln $ kleinc euclid.kln $ ls euclid.kln euclid.tmExtra Credit Opportunity: Implement kleinc so that the .kln extension is optional. (The extra credit is available only if you didn't earn credit for this on Project 5.)
Make sure that your project directory satisfies the course requirements and that your README clearly identifies any unimplemented behavior and any known bugs in your compiler.
As before, submit only one copy of each assignment per team, both electronically and on paper. The team captain or a designated team member can be responsible for the submission.