Introduction: Types of translators – Preprocessor, Compiler, Interpreter, Macro processor,
Assembler; Programming language concepts- their characteristics and applications. Basic concepts of
Compilers- Phases of the Compiler, Cross-Compiler, Compiler- Writing tools, Bootstrapping.
Lexical Analysis: Role of Lexical Analyzer, Tokens- Specifications & Recognition, Input buffering,
Design of Lexical Analyzer generator.
Syntax Analysis : Parsing techniques- Top–Down and Bottom–Up parsing; Basic concepts of Leftrecursions
and Left – factoring; Formation of FIRST and FOLLOW sets and checking for the LL(1)
acceptance. Basic concepts of Handles, Viable prefixes, Operator precedence parsing, LR parsers- SLR,
Canonical LR(1), LALR. Error recovery strategies for different parsing techniques.
Syntax Directed Translation : Syntax Directed Translation Scheme SDTSDefinitions,
Different rules for writing semantic actions and their applications; Construction of Syntax
trees, Definition of Abstract Translation Scheme (ATS) and its application. Bottom-Up evaluation of
inherited attributes.
Run Time Environments: Source language issues - Activation trees, Control stack, Scope of
declaration, Binding of names. Storage organization -Subdivision of run-time memory, Activation records.
Storage allocation strategies, Parameter passing - call by value, call by reference, copy restore, call by
name. Symbol tables, Dynamic storage allocation techniques.
Intermediate Code generation : Intermediate languages, Basic statement formation, Graphical
representation, Three-address code, Implementation of three address statements - Quadruples, Triples,
Indirect triples. Boolean expressions, Case statements, Backpatching.
Code Optimization and Generation : Introduction, Basic blocks & flow graphs, Transformation of
basic blocks, DAG representation of basic blocks, Types of optimization - Loops in flow graph, Dataflow
analysis using GEN and KILL, forming the IN and OUT of basic blocks; Peephole optimization; Simple
code generator; Code generation from DAGs; Allocation of Registers required for the generation.