CSSE 404: Compiler Construction
Rose-Hulman Institute of Technology
Computer Science and Software Engineering Department
Course catalog description
Theory and practice of programming language translation. Lexical
analysis, syntax analysis, parser generators, abstract syntax, symbol
tables, semantic analysis, intermediate languages, code generation,
code optimization, run-time storage management, error
handling. Students will construct a complete compiler for a small
- CSSE 232: Computer Architecture I (So you'll have an idea of how
low-level languages and machines work)
- CSSE 304: Programming Language Concepts (Experience with language processors and with writing a
- CSSE/MA474: Theory of Computation (FSMs, REs, CFGs, and PDAs are
central to understanding compiler front-end tools.)
Students who successfully complete this course should be able to:
- Implement and test a program to tokenize an input stream based on
a regular language definition.
- Convert a left-recursive context-free grammar into a
- Construct the canonical set of LR(1) items and derive the tables
used by an LR(1) parser for a given context-free grammar.
- Implement and test , using a parser-generator such as ANTLR and CUP, a program to
parse a token stream and construct an intermediate representation
based on a context-free grammar.
- Implement and test code to perform context-sensitive analysis and
type-checking on a program encoded in some intermediate
- Implement and test code to construct symbol tables for a simple,
imperative programming language.
- Implement and test a program that takes code written in a
high-level language and generates corresponding code in a low-level
target language, such as MIPS or Java Bytecode.
- Clearly explain selected, more advanced programming language
implementation issues (such as optimization or adding non-mainstream
features), based on independent study, and extend a working compiler
to address them.
There is no TA assigned to this course.
- Required book: Engineering
a Compiler by Cooper and Torczon
site for the book
- Optional book, (only if you are looking for alternate explanations
and more details): Compilers:
Principles, Techniques, and Tools (2nd Edition),
by Alfred Aho, Monica S. Lam, Ravi Sethi, and Jeffrey D. Ullman
The original "Dragon" book is a classic in the field, but had become
quite dated. The updated version includes all the material from the
original, plus a substantial amount of additional material. The Dragon
book has a stronger theoretical emphasis than EAC. If you find that
you really enjoy compilers, you owe it to yourself to add this book to
This text is on reserve at Logan Library.
Please consult the schedule for class
materials, topics covered and assignments. [to be posted]
Meeting times and places
7thMTRF 7 in M103.
This course is heavily project oriented. You will be implementing, in
small teams, a complete compiler for a small, non-trivial language. It
is not unusual for such projects to include thousands of lines of
code. As such, you are making a significant commitment in taking this
course. But few programming projects will allow you to explore such a
variety of challenges as writing a compiler. Completing a working
compiler is incredibly satisfying.
Because of the amount of project effort required, you owe it to
your teammate to stick with the course. While I cannot enforce it, I
will be quite upset if anyone waits until as late as the drop deadline
to drop this course, because to do so would cause serious harm to your
partner’s experience in the course. Thus, if you wish to drop
this course, please do so by Tuesday of 2nd week.
Because of the size of the project in this course, I plan to have
regular class sessions only about three-fourths of the time after the
first few weeks. Please take advantage of this time off from class to
work with your partner on your project. You may, of course, take
advantage of this time to get help from me on your project as well.
I plan to use the weighting scheme shown in the table below when
assigning grades. Projects will be graded based on how well your
programs perform against a set of tests at each milestone. I reserve
the right to assign different project grades to two members of a pair
if I have reason to believe that one member is not carrying a fair
share of the load or is otherwise compromising the partnership.
Although they won't count directly towards your grade, I
plan to suggest homework problems. I hope these suggested problems
will help you both prepare for the exam and think about the issues
that you'll need to tackle for your projects. Such
optional problems are a common feature of graduate
classes and are a great chance for you to take responsibility for your
| 65% || Project
| 15% || Exam
| 15% || Assignments
| 5% || Class citizenship
Students who struggled in this class in the past largely did so
because they fell behind on the initial stages of the project. The
project is almost completely cummulative; failure to complete one
stage will prevent completion of subsequent stages. The late policy is
designed to encourage you to submit work on time, while still giving
credit for work completed somewhat late.
Your earned score on project milestones will be subject to the
| Time Handed In || Grade Multiplier
| On time || 100%
| < 24 hours late (1 day) || 90%
| < 36 hours late (1.5 days) || 80%
| < 48 hours late (2 days) || 70%
| < 72 hours late (3 days) || 50%
| < 96 hours late (4 days) || 25%
| ≥ 96 hours late (4 days) || 0%
Late test cases will not be accepted. Graduating seniors
will not be able to submit the final project late, since grades are
due at 9 AM on Monday.
Institute policy on academic misconduct states that:
"Rose-Hulman expects its students to be responsible adults
and to behave at all times with honor and integrity."
Exam and homework will be done on an individual basis. The simple rule of thumb for individual work is:
Never give or use someone else's code or written answers,
unless it is a team assignment and the person is on your team.
Such exchanges are definitely cheating and not cooperation. The
departmental statement on academic honesty has more detailed
Plagiarism or cheating will result in a grade of an "F" in the
course and they will also be report to the Dean of Students.