Compiler Syllabus TCE 2017
Compiler Syllabus TCE 2017
This course studies programming language translation and compiler design concepts; language
recognition, symbol table management, syntax analysis ,code generation and code optimization.
Prerequisite
14CS240 : Computer Organization and Microprocessors
14CS370 : Object Oriented Programming
14CS390 : Assembly Language Programming Lab
14CS530 : Theory of Computation
On the successful completion of the course, students will be able to
Describe the role of each phase of a compiler with its construction tools. (CO1)
Understand Develop a Lexical Analyzer for recognizing the tokens of a given language with an
understanding of symbol table management and errorhandling. (CO2)
Construct parsers like top-down, bottom-up, operator precedence and SLR with an understanding of
Context Free Grammars and syntax analysis (CO3)
Develop semantic analyzers for type-checking and intermediate code generators to translate the
source program into an intermediate code. (CO4)
Construct code optimizers to optimize the target code generated. (CO5)
Syllabus
Introduction to compiling: Introduction of Compilers-Analysis of the source program-The phases of
compiler- The grouping of phases.
Lexical Analysis: The role of the lexical analyzer- Input buffering-Specification of tokens Recognition
of tokens- Regular Expression- Context-free grammars-Writing a grammar
Finite Automata – Conversion of Regular Expression into NFA- Conversion of NFA to minimized DFA.
Syntax Analysis : The role of the parser- Top down parsing -Non-recursive predictive parsing- LL(1)
grammar- Bottom-up Parsing- Shift Reduce Parser- Operator precedence parsing-Precedence
functions-LR Parser: SLR Parser.
Intermediate Code Generation: Three address Codes- Boolean expressionsCase statements.
Code Generation: basic blocks and flow graphs -The DAG representation of basic blocks Generating
code from DAGs.
Code Optimization: Code improving transformations - Loop optimization -Peephole Optimization.
Text Book 1. Alfred V. Aho, Ravi Sethi, Jeffrey D Ullman – Principles of Compiler Design, Pears