1. LESSON PLAN
Subject : Compiler Design
Subject Code : CS6660
Staff In-Charge : R.Narmatha
Class/Section/Sem : III/-/VI
UNIT I - INTRODUCTION TO COMPILERS 5
Translators-Compilation and Interpretation-Language processors -The Phases of Compiler-Errors Encountered in
Different Phases-The Grouping of Phases-Compiler Construction Tools -Programming Language basics.
Sl.No Description of Portions to
be Taught
Required
Periods
Teaching
Aids
References
1. Translators - Compilation and
Interpretation-Language processors
1 BB T.B.1
2. The Phases of Compiler 1 BB T.B.1
3. Errors Encountered in Different
Phases - The Grouping of Phases
1 BB T.B.1
4. Compiler Construction Tools 1 BB T.B.1,R.B.1
5. Programming Language basics 1 BB T.B.1
UNIT II - LEXICAL ANALYSIS 9
Need and Role of Lexical Analyzer-Lexical Errors-Expressing Tokens by Regular Expressions-Converting Regular
Expression to DFA- Minimization of DFA-Language for Specifying Lexical Analyzers-LEX-Design of Lexical
Analyzer for a sample Language.
Sl.No Description of Portions to
be Taught
Required
Periods
Teaching
Aids
References
6. Need and Role of Lexical Analyzer 1 BB T.B.1,R.B.2
7. Lexical Errors- Expressing Tokens
by Regular
Expressions
1
BB
T.B.1, R.B.2
8. Converting Regular Expression to
DFA
2 BB T.B.1, R.B.2
9. Minimization of DFA 2 BB T.B.1, R.B.2
10. Language for Specifying Lexical
Analyzers
1 BB T.B.1, R.B.2
11. LEX Tool 1 BB T.B.1, R.B.2
12. Design of Lexical Analyzer for a
sample
Language.
1
BB
T.B.1, R.B.2
2. UNIT III - SYNTAX ANALYSIS 10
Need and Role of the Parser-Context Free Grammars -Top Down Parsing -General Strategies-
Recursive Descent Parser Predictive Parser-LL(1) Parser-Shift Reduce Parser-LR Parser-LR (0)Item-Construction
of SLR Parsing Table -Introduction to LALR Parser - Error Handling and Recovery inSyntax Analyzer-YACC-
Design of a syntaxAnalyzer for a Sample Language .
Sl.No Description of Portions to
be Taught
Required
Periods
Teaching
Aids
References
13. Need and Role of the Parser 1 BB T.R.1, R.B.3
14. Context Free Grammars 1 BB T.B.1, R.B.3
15. Top Down Parsing 1 BB T.B.1,W.1
16. General Strategies-Recursive
Descent Parser
Predictive Parser-LL(1) Parser
1
BB
T.B.1,W.1
17. Shift Reduce Parser-LR Parser-LR
(0)Item
2 BB T.B.1,W.1
18. Construction of SLR Parsing Table 1 BB T.B.1,W.1
19. Introduction to LALR Parser 1 BB T.B.1,W.1
20. Error Handling and Recovery in
Syntax
Analyzer
1
BB
T.B.1, R.B.2
21. YACC-Design of a syntax
Analyzer for a
Sample Language
1
BB
T.B.1,R.B.1
UNIT IV- SYNTAX DIRECTED TRANSLATION & RUN TIME ENVIRONMENT 12
Syntax directed Definitions-Construction of Syntax Tree-Bottom-up Evaluation of S-Attribute Definitions- Design
of predictive translator - Type Systems-Specification of a simple type checker-Equivalence of Type Expressions-
Type Conversions.
RUN-TIME ENVIRONMENT: Source Language Issues-Storage Organization-Storage Allocation-Parameter
Passing-Symbol Tables-Dynamic Storage Allocation-Storage Allocation in FORTAN.
Sl.No Description of Portions to
be Taught
Required
Periods
Teaching
Aids
References
22. Syntax directed Definitions 1 BB T.B.1, R.B.2
23. Construction of Syntax Tree-
Bottom-up
Evaluation of S-Attribute
Definitions
1
BB
T.B.1, R.B.2
24. Design of predictive translator 1 BB T.B.1, R.B.2
25. Type Systems-Specification of a
simple type
Checker
1
BB
T.B.1, R.B.2
26. Equivalence of Type Expressions-
Type 1
BB
T.B.1, R.B.2
3. Conversions.
27. Source Language Issues 1 BB T.B.1, R.B.2
28. Storage Organization and Storage
Allocation
1 BB T.B.1, R.B.2
29. Parameter Passing 1 BB T.B.1, R.B.2
30. Symbol Tables 2 BB T.B.1, R.B.2
31. Dynamic Storage Allocation 1 BB T.B.1, R.B.2
32. Storage Allocation in FORTAN 1 BB T.B.1,R.B.1
UNIT V - CODE OPTIMIZATION AND CODE GENERATION 9
Principal Sources of Optimization-DAG- Optimization of Basic Blocks-Global Data Flow Analysis-Efficient Data
Flow Algorithms-Issues in Design of a Code Generator - A Simple Code Generator Algorithm.
Sl.No Description of Portions to
be Taught
Required
Periods
Teaching
Aids
References
33. Principal Sources of Optimization 1 BB T.B.1, R.B.1
34. DAG 2 BB T.B.1, R.B.1
35. Optimization of Basic Blocks 1 BB T.B.1, R.B.1
36. Global Data Flow Analysis 1 BB T.B.1, R.B.1
37. Efficient Data Flow Algorithms 2 BB T.B.1, R.B.1
38. Issues in Design of a Code
Generator
1 BB T.B.1, R.B.1
39. A Simple Code Generator
Algorithm
1 BB T.B.1, R.B.1
TEXTBOOK:
1. Alfred V Aho, Monica S. Lam, Ravi Sethi and Jeffrey D Ullman, “Compilers – Principles,
Techniques and Tools”, 2nd Edition, Pearson Education, 2007.
REFERENCES:
1. Randy Allen, Ken Kennedy, “Optimizing Compilers for Modern Architectures: A Dependence-based
Approach”, Morgan Kaufmann Publishers, 2002.
2. Steven S. Muchnick, “Advanced Compiler Design and Implementation, “Morgan Kaufmann Publishers -
Elsevier Science, India, Indian Reprint 2003.
3. Keith D Cooper and Linda Torczon, “Engineering a Compiler”, Morgan Kaufmann Publishers Elsevier
Science, 2004.
4. Charles N. Fischer, Richard. J. LeBlanc, “Crafting a Compiler with C”, Pearson Education,2008.
FACULTY INCHARGE HOD