Compilers, Analysis of the source program, The phases of the compiler, Cousins of the compiler
UNIT 2
Lexical Analysis
6 hrs
The role of the lexical analyzer, Tokens, Patterns, 6 Lexemes, Input buffering, Specifications of a token, Recognition of a token, Finite automata, From a regular expression to an NFA, From a regular expression to DFA, Design of a lexical analyzer generator (Lex).
UNIT 3
Syntax Analysis
9 hrs
The role of a parser, Context free grammars, Writing a grammar, Top down Parsing, Nonrecursive Predictive parsing (LL), Bottom up parsing, Handles, Viable prefixes, Operator precedence parsing, LR parsers (SLR, LALR), Parser generators (YACC). Error Recovery strategies for different parsing techniques.
UNIT 4
Syntax directed translation
5 hrs
Syntax directed definitions, Construction of syntax trees, Bottom-up evaluation of S attributed definitions, L attributed definitions, Bottom-up evaluation of inherited attributes.
UNIT 5
Type checking
4 hrs
Type systems, Specification of a simple type checker, Equivalence of type expressions, Type conversions
UNIT 6
Run time environments
5 hrs
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
UNIT 7
Intermediate code generation
4 hrs
Intermediate languages, Graphical representation, Three-address code, Implementation of three address statements (Quadruples, Triples, Indirect triples).
UNIT 8
Code optimization
5 hrs
Introduction, Basic blocks & flow graphs, Transformation of basic blocks, Dag representation of basic blocks, The principle sources of optimization, Loops in flow graph, Peephole optimization.
UNIT 9
Code generation
4 hrs
Issues in the design of code generator, a simple code generator, Register allocation & assignment
Course Outcomes & Bloom's Taxonomy (6 COs)
K2: 1K3: 3K6: 2
CO1Understand
Bloom K2
Understand and list the different stages in the process of compilation.
CO2Identify
Bloom K3
Identify different methods of lexical analysis
CO3Design
Bloom K6
Design top-down and bottom-up parsers
CO4Identify
Bloom K3
Identify synthesized and inherited attributes
CO5Develop
Bloom K3
Develop syntax directed translation schemes
CO6Develop
Bloom K6
Develop algorithms to generate code for a target machine
CO-PO Correlation Matrix
Mapping Scale:
3Substantial (High)
2Moderate (Medium)
1Slight (Low)
—No Correlation
CO
PO1
PO2
PO3
PO4
PO5
PO6
PO7
PO8
PO9
PO10
PO11
PO12
PSO1
PSO2
CO1
3
3
3
3
2
—
—
2
2
3
2
2
3
1
CO2
3
3
3
3
3
1
—
—
2
2
1
2
3
2
CO3
3
3
3
1
3
—
2
1
3
—
—
2
3
2
CO4
3
3
3
3
—
2
2
2
3
3
2
2
3
2
CO5
3
3
3
3
2
—
—
3
—
2
2
2
2
2
CO6
3
3
3
2
3
—
—
3
2
2
2
3
3
3
AVG
3
3
3
2.50
2.60
1.50
2
2.20
2.40
2.40
1.80
2.60
2.83
2
Hover or click on any column heading (PO1–PO12, PSO1, PSO2) to read its official MAKAUT definition.