Department of Computer Science

Master of Computer Science

Semester –II



Paper-V (CS2211): Compiler Techniques


UNIT 1:                                                                                                                                  (15)

Introduction to Compiling: Compilers, Phases of a compiler, Compiler construction tools, cousins of compiler. Lexical Analysis: Role of a Lexical analyzer, input buffering, specification and recognition of tokens, finite automata implications, designing a lexical analyzer generator.


UNIT 2:                                                                                                                                  (15)

Syntax Analysis: Role of Parser, Writing grammars for context free environments, Top-down parsing, Recursive descent and predictive parsers (LL), Bottom-Up parsing, Operator precedence parsing, LR, SLR and LALR parsers.


UNIT 3:                                                                                                                                  (15)

Syntax Directed Translation: Syntax directed definitions, construction of syntax tree, Bottom-up evaluation of S-attributed definitions, L-attributed definitions, Top-down translation and Bottom up evaluation of inherited attributes. Intermediate Code Generation: Intermediate languages, declarations, assignment statements and Boolean expressions, case statements, back patching.


UNIT 4:                                                                                                                                  (15)

Code Generation: Issues in design of a code generator and target machine, Run time storage management, code generation from Dags and the dynamic code generation algorithm Code


Optimization: Sources of optimization, Data flow analysis and equations, code improving transformation and aliases, Data flow analysis and algorithms.



1. Compilers - Principles, Techniques and Tools - A.V. Aho, R. Shethi and J.D. Ullman (Pearson


2. Compiler Construction - Dhamdere (Mc-Millan)

3. Compilers - Principles, Techniques and Tools - A.V. Aho, R. Shethi and J.D.

Ullman (Addison Wesley publishing company)

4. Compiler Construction - Barret, Bates, Couch (Galgotia)