CS241 — Foundations of Sequential Programs
I took this course in the winter term of 2001. The assignments are centered around building your own compiler for a C-like language. The target platform is MIPS simulated environment. The goal is to create a context-free grammar for the language and then add a code generator using Java-based CUP parser and JLex scanner. My implementation of the compiler was granted 110% (counting bonuses).
Disclaimer
I am giving out the source code along with my comments and explanations. These materials can be used for educational purposes only. You may learn from the presented materials, but under no circumstances you may use it in your own solutions (this is treated as cheating and plagiarism and will be severely penalized should you get caught). If you are going to use the solutions for some other purpose, include the reference to the author, i.e. me. The original assignments are copyrighted by the University of Waterloo and their respective authors.
mindon.net