The following gives a day-by-day breakdown of topics covered, readings assigned, and assignment handouts/due dates. Each topic includes required readings that students should read before the topic is discussed in class – always look ahead a few days to see what readings you should be doing. Some topics also have supplemental (non-required) readings that students can look into if they want to delve more deeply into that topic.
The schedule in this class is flexible, and past dates will be updated to reflect what was actually covered. Future dates are always tentative and subject to change, but should be fairly accurate for a week or two into the future.
Reading: Chapter 1
Wednesday Topic: Class overview and syllabus review [Slides]
Reading: Finish Chapter 1 plus Sections 2.1–2.4
Monday Topic: Introduction to compilers and programming language features [Slides]
Wednesday Topic: Compiler tour – syntax, parsing, and translation [Slides]
Due Friday: Gradiance Homework 1
Reading: Sections 2.5–2.8 and 3.1–3.3
Outside Reading: A Two-Page Introduction to ANTLR by Stephen A. Edwards (note that this is very good from a high level, but details are a little outdated – you should use “fragment” instead of “protected” with current versions of ANTLR)
See Also: “The Compiler Project” pages in Canvas
Monday Topic: Compiler tour – expressions, lexical analysis, IC generation [Slides]
Wednesday Topic: Lexical Analysis – basics and regular expressions; ANTLR and project overview [Slides]
Due Friday: Gradiance Homework 2
Reading: Section 3.4
Wednesday Topic: Lexical Analysis – recognition of tokens [Slides]
Due Friday: Gradiance Homework 3
Reading: Sections 3.5–3.9
Monday Topic: Lexical Analysis – Scanner generators, finite automata, and regular expressions [Slides]
Wednesday Topic: Lexical Analysis – Practical application and optimization [slides continued from Monday]
Due Friday: Gradiance Homework 4
Due Monday: Compiler Part 1 – Lexical Analyzer
Reading: Sections 4.1–4.5
Monday Topic: Introduction and Context-Free Grammars [Slides]
Wednesday Topic: Top-Down and Bottom-Up Parsing [Slides]
Due Friday: Gradiance Homework 5
Reading: Sections 4.6–4.9
Monday Topic: LR Parsers - LR(0) sets and SLR(1) parsing [Slides]
Wednesday Topic: LR Parsers - LR(1) and LALR [Slides]
Due Friday: Gradiance Homework 6
Reading: No new reading this week
Monday Topic: Parsing wrap-up and midterm review
Wednesday: Midterm Exam 1
Note: No Gradiance homework this week
Due Monday: Compiler Part 2 – Basic Parser (only ints)
Reading: Chapter 5
Monday Topic: Syntax-Directed Translation – Part 1 [Slides]
Wednesday Topic: Syntax-Directed Translation – Part 2 (slides continued from before)
Due Friday: Gradiance Homework 7
Reading: Sections 6.1–6.6
Monday Topic: Intermediate-Code Generation – Part 1 [Slides]
Wednesday Topic: Intermediate-Code Generation – Part 2 [Slides]
Due Friday: Gradiance Homework 8
Due Monday: Compiler Part 3 – Complete Parser (with chars and arrays)
Reading: Sections 6.7–6.9 and Sections 7.1–7.3
Monday Topic: Intermediate-Code Generation – Part 3 [Slides]
Wednesday Topic: Run-Time Environments – Part 1 [Slides]
Due Friday: Gradiance Homework 9
Reading: Sections 7.4–7.5 and Sections 8.1–8.4
Monday Topic: Run-Time Environments – Part 2 [Slides]
Wednesday Topic: Code Generation – Part 1 [Slides]
Due Friday: Gradiance Homework 10
Due Monday: Compiler Part 4 – Intermediate Code Generation
Reading: Sections 8.5–8.11
Monday Topic: Code Generation – Part 2 [Slides]
Wednesday Topic: Code Generation – Part 3 [Slides]
Due Friday: Gradiance Homework 11
Reading: Sections 9.1–9.2 and Sections 7.6-7.7
Monday Topic: Basic Optimization
Wednesday Topic: Run-Time Environments – Part 3
Due Friday: Gradiance Homework 12
Special week – Class on Monday and Tuesday
Monday Topic: Catch-up, summary, and review
Tuesday: Midterm Exam 2
This class will have a final project in lieu of a final exam. The project is due at the university-scheduled final exam time, which is:
Monday, November 30, 2020, 3:30 PM
Due – All students: Compiler - part 5 - code generation (complete compiler)
Due – Graduate/Honors students: Final project due