Compiler Design Syllabus & Notes

MODULE 1: Compiler Structure & Lexical Analysis

Compiler Structure & Lexical Analysis: Phases of a compiler; The evolution of programming languages; Applications of Compiler technology; Lexical analysis: The Role of Lexical Analyzer; Input Buffering; Specifications of Tokens; Recognition of Tokens.

MODULE 2: Syntax Analysis

Syntax Analysis: Context-free grammars; Writing a grammar, Top-down parsing, Bottom-up parsing; Introduction to LR parsing, Parser generators

MODULE 3: Syntax-Directed Translation

Syntax-Directed Translation: Inherited and synthesized attributes, dependency graph, evaluation order, Ordering evaluation of attributes, L- and S-attributed definitions. Construction of syntax trees.

MODULE 4: Intermediate Code Generation & Type Checking

Intermediate Code Generation & Type Checking: Variants of syntax trees, Three-address code; Types and declarations; Translation of expressions, Type checking; Control flow; Back patching; Switch statements; Intermediate code

MODULE 5: Run-Time Environments & Code Generation

Run-Time Environments & Code Generation: Storage Organization; Stack allocation of space; Access to non-local data on the stack; Heap management; Introduction to garbage collection. Issues in the design of Code Generator; The Target language; Addresses in the target code; Basic blocks and Flow graphs; Optimization of basic blocks, A Simple Code Generator.