**Compiler Design** **Reed College CSCI 394 Fall 2026**       ![](images/gears-top.jpg)
`01000011010011110100110101010000010010010100110001000101010100100101001100100001`
(#) Overview An in-depth look at the design and construction of programming language compilers, covering the basic phases of the compilation process, including syntactic analysis and parsing, semantic analysis, intermediate representations of code, dataflow analysis, register allocation, code generation, and other optimizations. Students will develop a working compiler and run-time system for a programming language. Time permitting, the course surveys advanced techniques such as compilation of functional programming languages or compilation for high-performance hardware. Prerequisite: CSCI 221. Lecture-conference. This semester we will use C++ to compile Python to MIPS assembly. **Meets:** 10:30-11:50 TuTh in ETC 205, 6:10-7:30 in Physics 240.
**Instructor:** Jim Fix
**Office:** Library 314
Jim's office hours will be posted [here](http://jimfix.github.io/teaching.html) ---
`01000011010011110100110101010000010010010100110001000101010100100101001100100001` ![](images/gears-mid.jpg) `01000011010011110100110101010000010010010100110001000101010100100101001100100001`
(#) Core Dump **Week 1**: introduction to language tools
[Lecture 01-1](CSCI394-Lec00-Course-Overview.pdf): course overview
[Project 0](p0.html): straight Snek interpreter
•front end overview
•a grammar for "straight-line" Snek
•abstract syntax trees
•hand lexing
•recursive-descent parsing
**Reading**: Appel Ch 1 (and some of 2-4)
**Week 2**: lexicographic analysis
•regular expressions
•finite automata
•Kleene's theorem
•`lex` and `flex`
[Homework 1](hw1.html): some flexing
**Reading**: Appel Ch 2
**Weeks 3-4**: syntactic analysis
•grammars
[Lecture 03-1](LL-one-parsing.pdf): top-down parsing
•`yacc` and `bison` with `lex`/`flex`, *oh my!*
[Project 1](p1.html): crooked Snek
•LR parsing
**Reading**: Appel Ch 3 & 4
**Week *5*: semantic analysis
•inference rule notation
•type checking
**Reading**: Appel Ch 5
**Weeks 6-7**: IRs and CFGs; simple code generation
•syntax-driven translation into intermediate representation
•basic blocks with "goto" labels gives control flow as a graph
•MIPS calling conventions and frame layout
**Reading**: Appel Chs 6, 7, 8, & 9
**Week 8: FALL BREAK**
**Weeks 9-11** data-flow analysis; register allocation
**Reading**: Appel Chs 10, 11, & 17 (w/ 19)
(#) Control Flow Graph We will cover chapters 1-11; 17 (& 19) of the Tiger book as shown below.
![](images/tiger-DAG.gif)
(#) Source Text
![](images/tiger-cover.jpg width=300 height=300) ![](images/dragon-cover.jpg width=300 height=300))
**Recommended**
•Andrew Appel, [*Modern Compiler Implementation in C*](https://www.cs.princeton.edu/~appel/modern/c/), "The Tiger Book".
•Aho, Sethi, Ullman, [*Compilers: Principles, Techniques, and Tools*](https://en.wikipedia.org/wiki/Compilers:_Principles,_Techniques,_and_Tools#First_edition), "The Dragon Book".
•Andrew Myers, Cornell [*CS4120 Notes](https://www.cs.cornell.edu/courses/cs4120/2026sp/notes/)
(#) a.out
`01000011010011110100110101010000010010010100110001000101010100100101001100100001`
![](images/gears-bottom.jpg)