MODULE-I (5 Hrs)
Introduction: Translator, types of translator, Compiler, types of compiler,
Compiler Vs. Interpreter. Overview and phases of compilation.
Lexical Analysis: Non-deterministic and deterministic finite automata (NFA & DFA),
NFA Vs. DFA, regular grammar, regular expressions and regular languages
Assignment 1:Explain Compiler Vs. Interpreter ?
Assignment 2:Explain Overview and phases of compilation ?
1. Write a program to implement the lexical analyzer.
Role of a parser, context free grammars and context free languages, parse trees
andderivations, ambiguous grammar, Eliminate the left recursion and null
Recursive descent parsing, LL (1) grammars
Assignment 3:Explain Role of a parser ?
2. Write a Lexical Analyzer
SLR parsers and construction of SLR parsing tables
LR(1) parsers and construction of LR(1) parsing tables
LALR parsers and construction of efficient LALR parsing tables
parsing using ambiguous grammars
error reporting and recovery parser generator.
application of syntax directed translation.
Syntax directed definitions (SDD)
Assignment 4: Construct LR(1) parsers and construction of LR(1) parsing tables?
Assignment 5: Construct LALR parsers and construction of efficient LALR parsing
3. Write a program to left factor the given grammar.
Structure and features of symbol tables,
Handle pruning and shift reduces parsing,
symbol attributes and scopes.
Assignment 6:Explain Structure and features of symbol tables ?
4. Write a program to remove the Left Recursion from a given grammar.
MODULE-V (5 Hrs)
Introduction, benefits and types of intermediate code generation, three address
codes - quadruples and triples, DAG for expressions, types and declarations,
translation of expressions, translation of Boolean expressions and control flow
Assignment 7: Construct DAG for expressions ?
Assignment 8:Explain benefits and types of intermediate code generation ?
5. Implement Recursive Descendent Parsing for the given Grammar
MODULE-VI (5 Hrs)
back patching, intermediate code generation for procedures.
Storage organizations, static and dynamic storage allocations, stack allocation,
Activation of the procedure and the activation record.
Introduction, Major Issues of Code generation
Assignment 9: Explain Storage organizations ?
6. Implement Predictive Parser for the given grammar
MODULE-VII (3 Hrs)
simple codegeneration using basic blocks.
Objective, peephole optimization, redundant and un-reachable codes, concepts of
elimination of local common sub-expressions, basics of flow of control
Assignment 10: Explain peephole optimization ?
1. Compilers - Principles, Techniques & Tools, Alfred V. Aho, Monica S. Lam, Ravi
Sethi& Jeffrey D. Ullman Pearson
1. Compiler Design, Author: O. G. Kakde , Publisher: Laxmi Publication.
2.Compiler Design, Authors: S K Sahu, A B Biswal, Publisher: Alok