Compiler Design
5IT4-02 · Semester 5
0/69 topics
Objective
Scope
Outcome
Course objective
Course scope
Course outcome
Compiler
Translator
Interpreter definition
Phases of compiler
Bootstrapping
Review of Finite Automata
Lexical analyzer
Input buffering
Recognition of tokens
LEX: A lexical analyzer generator
Error handling
Context-Free Grammars (CFG)
Ambiguity of grammars
Introduction to parsing
Top-down parsing
LL grammars
LL parsers
Error handling of LL parser
Recursive descent parsing
Predictive parsers
Bottom-up parsing
Shift-reduce parsing
LR parsers
Construction of SLR parsing tables
Canonical LR parsing tables
LALR parsing tables
Parsing with ambiguous grammar
Operator precedence parsing
YACC: Automatic parser generator
Error handling in LR parsers
Syntax-directed definitions
Construction of syntax trees
S-attributed definitions
L-attributed definitions
Top-down translation
Intermediate code forms using postfix notation
Directed Acyclic Graph (DAG)
Three-Address Code (TAC)
TAC for control structures
Representing TAC using triples
Representing TAC using quadruples
Boolean expressions
Control structures
Storage organization
Storage allocation strategies
Activation records
Accessing local names in block-structured language
Accessing non-local names in block-structured language
Parameter passing
Symbol table organization
Data structures used in symbol tables
Basic blocks
Control flow graphs
DAG representation of basic blocks
Advantages of DAG
Sources of optimization
Loop optimization
Global data flow analysis
Loop invariant computation
Peephole optimization
Issues in design of code generator
A simple code generator
Code generation from DAG