- Week 1
- Lecture 1. Philosophy.
- Lecture 2. Course Administration. Compilers Overview. Regular Expressions. Lecture Notes.
- Week 2
- Lecture 3. Addendum to Regular Expressions. Code overview.
- Lecture 4. Project jumpstart.
- Week 3
- Lecture 5. Jumpstart, continued: SimpleCodeGenerator.
- Lecture 6. Abstract Stack Machine. Context-Free Languages.
- Week 4
- Lecture 7. Eliminating left-recursion. Operator precedence in recursive descent parsers.
- Truth and Reconciliation Day. No lecture.
- Week 5
- Lecture 8. Miscellaneous items in Milestone 1.
- Lecture 9. Miscellaneous items in Milestone 1, continued. The Visitor Pattern and Casting.
- Week 6
- Lecture 10. Milestone 2. Milestone specification used as lecture notes. Additional notes.
- Lecture 11. Milestone 2, DFAs and NFAs. Notes.
- Week 7
- Lecture 12. Finite automata: DFAs and NFAs. Notes.
- Lecture 13. Type variables in Milestone 2.
- Week 8
- Midterm
- Lecture 14. Automatic Lexical Analysis and promotions in Milestone 2.
- Week 9
- Lecture 15. Top-Down Parsing.
- Lecture 16. Bottom-Up Parsing. Milestone 3.
- Week 10
- Lecture 17. Milestone 3 - procedure calls. Notes. Remembrance Day. No lecture.
- Week 11
- Lecture 18. Attribute grammars. Notes.
- Lecture 19. Symbol Tables and Procedures.
- Week 12
- Lecture 20. Intermediate Representations. Notes.
- Lecture 21. IRs, continued. Notes. Run-time Environments.
- Week 13
- Lecture 22. Optimization.
- Lecture 23. Optimization, part II. Dataflow.
From https://canvas.sfu.ca/courses/70682/pages/lectures
This course covers the theoretical foundations as well as practical techniques for the construction of a compiler for a high-level programming language. Topics include lexical analysis, parsing, type checking, code generation, and optimization. Students will implement an actual compiler for a high-level programming language.
Topics
- Formal-language theory: alphabets, words, languages, regular expressions, finite automata
- Compiler design and implementation principles
- Lexical Analysis: scanners, symbol tables
- Parsing: context-free grammars, parse trees, ambiguity, top-down and bottom-up parsing
- LL(1) parsing: efficient top-down parsing, left-factoring
- Shift-reduce and table-driven parsers: bottom-up parsing
- Type checking: typing rules, types as inferencing rules, Context checking for programs
- Context and code generation: from high-level to machine code
- Introduction to optimization: local, global, and interprocedural.