7CS3 COMPILER CONSTRUCTION (Comp. Engg.) 


Units  Contents of the subjects 
Finite Automata & Regular Expression: Basic Concepts of finite state system, Deterministic and nondeterministic finite automation and designing regular expressions, relationship between regular expression & Finite automata minimization of finite automation mealy & Moore Machines.Compiler, Translator, Interpreter definition, Phase of compiler introduction to one pass & Multipass compilers, Bootstrapping, Review of Finite automata lexical analyzer, Input, buffering, Recognition of tokens, Idea about LEX: A lexical analyzer generator, Error handling.  
Review of CFG Ambiguity of grammars, Introduction to parsing. Bottom up parsing Top down parsing techniques, Shift reduce parsing, Operator precedence parsing, Recursive descent parsing predictive parsers. LL grammars & passers error handling of LL parser. LR parsers, Construction of SLR, Conical LR & LALR parsing tables, parsing with ambiguous grammar. Introduction of automatic parser generator: YACC error handling in LR parsers.  
Syntax directed definitions; Construction of syntax trees, Lattributed definitions, Top down translation. Specification of a type checker, Intermediate code forms using postfix notation and three address code, Representing TAC using triples and quadruples, Translation of assignment statement. Boolean e xpression and control structures.  
Storage organization, Storage allocation, Strategies, Activation records, Accessing local and non local names in a block structured language, Parameters passing, Symbol table organization, Data structures used in symbol tables.  
Definition of basic block control flow graphs, DAG representation of basic block, Advantages of DAG, Sources of optimization, Loop optimization, Idea about global data flow analysis, Loop invariant computation, Peephole optimization, Issues in design of code generator, A simple code generator, Code generation from DAG. 
Text/References:
1. Aho, Ullman and Sethi: Compilers, Addison Wesley.
2. Holub, Compiler Design in C, PHI.