ECS 142: Compiler Design
Spring 2011
Administrative Details
Instructor
- Raju Pandey (pandey@cs.ucdavis.edu)
- Office: 3041 Kemper Hall
- Office hours: T/Th: 1:40-3:00 PM
TA
- Saigopal Thota (sthota@ucdavis.edu)
- Office: 55
Kemper
- Office hours: M (5:00-6:00 PM); W(2:00-3:00 PM)
Final Grades
Lecture Notes
- Schedule (pdf)
- Introduction (pdf)
- Lexical Analysis (pdf)
- Syntax Analysis
- Part 1: Introduction to CFG (pdf)
- Part 2: Top Down Parsing (pdf)
- Part 3: Bottom Up Parsing (pdf)
- Semantic Analysis (pdf)
- Runtime Organization (pdf)
- Code Generation (Part 1; Part 2)
- MIPS Assembly (pdf)
- Final Code Generation (pdf)
- Code optimization (pdf)
Examinations
- Midterm:
- Date: 5/5/2011 (In class).
- Sample Midterm (pdf);
Solution(pdf)
- Final:
- Pick up time: 6/2 ( in class)
- Submit: 9 AM 6/3.
Homeworks
- Homework 1: Topdown and Bottom up Parsers (pdf); Solution (pdf);
- Due Date: April 28, 2011 (In class)
Projects
- Part 1: Symbol Table (pdf)
- Submission Directions: You do not need to submit this project.
Please keep a tarred version of the project with time stamps.
- Part 2: Lexical and Syntactic Analysis (Due Date: April 22,
2011: 11:59 PM).
- Language Specification ((pdf))
- Language EBNF (txt)
- How to deal with Yacc conflicts?
http://proquest.safaribooksonline.com/book/programming/lex-and-yacc/9781565920002
(Chapter 8)
- More details on Yacc internals:
http://proquest.safaribooksonline.com/book/programming/lex-and-yacc/9781565920002
(Chapter 7)
- ***** Deadline extended to April 4/26: 11:59 PM) ******
- Andy Pimental's YACC tutorial (pdf)
- **** Error Reporting: See section 9.1 of Lex and Yacc book: it
describes how to print better error. The solution suggested in 9.1.1 is
good enough for now. *****
- Test Programs (.zip
file)
- Submission Directions: You do not need to submit this project.
Please keep a tarred version of the project with time stamps.
- Part 3: Semantic Analysis (pdf)
- Project 4: Code Generation (pdf)
- Test Programs (.zip file)
- Demo Schedule
Resources
Announcements
- (4/19)
- Added Project part 3 specification
- Added homework 1
- (4/21)
- Added syllabus that includes reading assignments
- Added lecture notes for semantic analysis
- Added extension for Part 2.
- (4/22)
- Added link to yacc tutorial
- (4/25)
- Fixed link to language manual
- Added link to test programs for part 3
- (4/26)
- Added hints for Part 3
- Added submission details for Part 2
- (4/27)
- Midterm will be held on 5/5/2011 (In class).
- (5/11)
- Added resources for unit testing and subversion
Text book and references
- Aho, Lam, Sethi and Ulman
- Other excellent books and reference
on Compiler Design
- Modern
Compiler Implementation in Java by Andrew W. Appel
- Engineering
a Compiler, by Keith D. Cooper and Linda Torczon.
- Programming
Language Processors in Java, by David A Watt and Deryck F. Brown
- Crafting
a Compiler, by Charles N. Fischer and Richard J. LeBlanc, Jr.
- Compiler
Construction: Principle and Practice, by Kenneth C. Louden
- Object-oriented
Compiler Construction, by Jim Holmes
- Lex
and Yacc related resources