Compiler Design

Overview of Compilation : Phases of compilation - Lexical analysis, Regular grammar and regular expression for common programming language features, Pass and phases of translation, Interpretation, Bootstrapping, Data structures in compilation - LEX lexical analyzer generator.Top Down Parsing : Context free grammars, Top down parsing, Backtracking, LL (1), Recursive descent parsing, Predictive parsing, Preprocessing steps required for predictive parsing.Bottom up Parsing : Shift reduce parsing, LR and LALR parsing, Error recovery in parsing, Handling ambiguous grammar, YACC - automatic parser generator.Semantic Analysis : Intermediate forms of source programs - abstract syntax tree, Polish notation and three address codes. Attributed grammars, Syntax directed translation, Conversion of popular programming languages language constructs into intermediate code forms, Type checker.Symbol Tables : Symbol table format, Organization for block structures languages, Hashing, Tree structures representation of scope information. Block structures and non block structure storage allocation : Static, Runtime stack and heap storage allocation, Storage allocation for arrays, strings and records.Code Optimization : Consideration for optimization, Scope of optimization, Local optimization, Loop optimization, Frequency reduction, Folding, DAG representation.Data Flow Analysis : Flow graph, Data flow equation, Global optimization, Redundant subexpression elimination, Induction variable elements, Live variable analysis, Copy propagation.Object Code Generation : Object code forms, Machine dependent code optimization, Register allocation and assignment generic code generation algorithms, DAG for register allocation.