CS8602 - Compiler Design
CS8602 - Compiler Design
Objectives:
To enable the students
1. To learn the various phases of compiler.
2. To learn the various parsing techniques.
3. To understand intermediate code generation and run-time environment.
4. To learn to implement front-end of the compiler.
5. To learn to implement code generator.
Prerequisite :
Text Books:
Alfred V Aho, Monica S. Lam, Ravi Sethi and Jeffrey D Ullman, “Compilers –
T1
Principles, Techniques and Tools”, 2nd Edition, Pearson Education, 2009
References:
Randy Allen, Ken Kennedy, “Optimizing Compilers for Modern Architectures: A
R1
Dependence-based Approach”, Morgan Kaufmann Publishers, 2002.
Steven S. Muchnick, “Advanced Compiler Design and Implementation, “Morgan
R2
Kaufmann Publishers – Elsevier Science, India, Indian Reprint 2003.
Web Resources :
WR1 https://www.guru99.com/compiler-design-phases-of-compiler.html
WR2 https://www.geeksforgeeks.org/three-address-code-compiler/
Activities:
A1 – Bingo on Keywords
A2 – Criss Cross Quiz
A3 – Word Search
A4 – Padlet activity
No. of periods
Teaching Aid
Reference
Numbers
Cumulative
S.No. Teaching Outline
Page
Topic name
Periods
No. of
Pre- Assessment Test and Scope, Importance and
1. Introduction about the Forms 1 1 Application
subject
UNIT I - INTRODUCTION TOCOMPILERS (9/12)
The Structure of a compiler BB Lecture on phases of
2. T1 1-5 1 2
WR1 compiler
Lecture on Lexical analysis
3. Lexical Analysis T1 5-12 BB 1 3
phase
109- Discuss about tokens,
4. Role of Lexical Analyzer T1 BB 1 4
115 lexeme and pattern
Input Buffering, Lecture on buffering
115-
5. Specification of Tokens & T1 PPT 2 6 techniques and
136
Recognition of Tokens representation of tokens
LEX Tool and YAAC Tool 140- DEMO Discuss on lexical and
6. T1 1 7 syntax tool
145
Finite Automata–Regular 147- Solve the problems on
7. T1 BB 2 9
Expressions to Automata 156 finite automata
173- BB Solve the problems on
8. Minimizing DFA T1 1 10
187 A1 DFA
UNIT II – SYNTAX ANALYSIS (12/12)
Role of the Parser – 191- Lecture on syntax analyzer
9. T1 BB 1 11
Grammar & Error Handling 196 and error handling methods
Context Free Grammars & 197- Lecture on CFG and solve
10. T1 BB 1 12
Writing of Grammar 217 the problems on CFG
Top Down Parsing 217- Solve the problems on top
11. T1 BB 1 13
221 down parsing
Predictive Parser -LL(1) 222- Solve the problems on
12. T1 BB 1 14
Parser 233 LL(1) parsing
Bottom Up Parsing - Shift 233- Solve the problems on shift
13. T1 BB 2 16
Reduce Parser 241 reduce parser
LR Parser - LR(0) Item-
241- Construction of SLR
14. Construction of SLR Parsing T1 BB 2 18
259 parsing table
Table
Most Powerful LR Parsers –
259- Construction of LALR
15. LR(1) item - T1 BB 2 20
278 parsing table
Introduction to LALR Parser
Error Handling and
278- Dicsuss on error handling
16. Recovery in Syntax T1 BB 1 21
285 techniques of parser
Analyzer
287- Lecture on parser
17. YACC T1 Demo 1 22
297 construction tool
UNIT III – INTERMEDIATE CODE GENERATION (8/12)
18. Syntax directed Definitions T1 303- BB 1 23 Discuss about syntax
Assignment Topics:
Tentative Date of
Sl.No. Topic K Level CO Mapped
Submission
CO3 M M M - - - - - M - - M M M
CO4 M M M - - - - - L - - L M L
CO5 M M L - - - - - L - - L M L
H - High, M - Moderate, L - Low