Syllabus
UNIT 1:
Introduction of Compiler, Major data Structure in compiler, BOOT Strapping & Porting,Compiler structure: analysis-synthesis model of compilation, various phases of acompiler, Lexical analysis: Input buffering , Specification & Recognition of Tokens,LEX.
UNIT 2:
Syntax analysis: CFGs, Top down parsing, Brute force approach, recursive descentparsing, transformation on the grammars, predictive parsing, bottom up parsing, operatorprecedence parsing, LR parsers (SLR,LALR, LR),Parser generation.Syntax directeddefinitions: Construction of Syntax trees, Bottom up evaluation of S-attributed definition,L-attribute definition, Top down translation, Bottom Up evaluation of inherited attributesRecursive Evaluation, Analysis of Syntax directed definition
UNIT 3:
Type checking: type system, specification of simple type checker, equivalence ofexpression, types, type conversion, overloading of functions and operations, polymorphicfunctions. Run time Environment: storage organization, Storage allocation strategies,parameter passing, dynamic storage allocation , Symbol table
UNIT 4:
Intermediate code generation: Declarations, Assignment statements, Boolean expressions,Case statements, Back patching, Procedure calls Code Generation: Issues in the design ofcode generator, Basic block and flow graphs, Register allocation and assignment, DAGrepresentation of basic blocks, peephole optimization, generating code from DAG.
UNIT 5:
Introduction to Code optimization: sources of optimization of basic blocks, loops in flowgraphs, dead code elimination, loop optimization, Introduction to global data flowanalysis, Code Improving transformations ,Data flow analysis of structure flow graphSymbolic debugging of optimized code
NOTES
- Unit 1
- Unit 2
- Unit 3
- Unit 4
- Unit 5
References
1. A. V. Aho, R. Sethi, and J. D. Ullman. Compilers:Principles, Techniques andTools , Pearson Education
2 Raghavan, Compiler Design, TMH Pub.
3. Louden. Compiler Construction: Principles and Practice, Cengage Learning
4. A. C. Holub. Compiler Design in C , Prentice-Hall Inc., 1993.
5. Mak, writing compiler & Interpreters, Willey Pub.
List of Experiments
Develop a lexical analyzer to recognize a few patterns.
Write a programme to parse using Brute force technique of Topdown parsing
Develop LL (1) parser (Construct parse table also).
Develop an operator precedence parser (Construct parse table also)
Develop a recursive descent parser
Write a program for generating for various intermediate code formsi) Three address code ii) Polish notation
Write a program to simulate Heap storage allocation strategy
Generate Lexical analyzer using LEX
Generate YACC specification for a few syntactic categories.
Given any intermediate code form implement code optimization techniques
Study of an Object Oriented Compiler