Compiler design

COMPILER DESIGN   L–T–P : 3–0–3   Credit : 5

1. Introduction to Compilers : Compilers and translators, The phases of a compiler, Compiler writing tools, The lexical and System structure of a language, Operators, Assignment statements and parameter translation. Lecture : 2

2. Lexical Analysis : The role of the lexical analyzer, Specification of tokens, Lexical analysis tool. Lecture : 2

3. Syntax Analysis : Role of Parser, CFG, Top – down parsing, Operator – precedence parsing, LR Parsers, The Canonical Collection of LR (0) items, Constructing SLR, Canonical LR and LALR parsing tables, Uase of ambiguous grammars in LR parsing, An automatic parser generator, Implementation of LR parsing tables and constructing LALR sets of items. Lecture : 10

4. Syntax Directed Translation : Syntax tree, Bottom-up evolution of S-attributed definitions, L-attributed common top-down translation, Bottom-up evaluation of inherited attributed, Recursive evaluators. Lecture : 5

5. Type Checking : Static Dynamic Checking, Type expression, Type Checking, Type Equivalence, Type Conversion. Lecture : 2

6. Symbol Tables : Structure of Symbol Table, Simple Symbol Table (Linear Table, Ordered List, Tree, Hash Table, Scoped Symbol Table (Nested Lexical Scoping, One Table per Scope, One Table for all Scopes). Lecture : 3

7. Intermediate Code Generation : Intermediate Language, Intermediate representation Technique, Threeaddress code, Translation of assignment statements, Boolean expressions, Control Flow, Case Statement and Function Call. Lecture : 4

8. Code Generation : Factors affecting code generation, Basic Block, Code generation for tree, Register and assignment, DAG representation, Code generation using dynamic programming, code- generator generators. Lecture : 4

9. Error Detection and Recovery : Errors, Lexical-Phase errors, Syntactic-Phase errors, Semantic errors. Lecture : 2

10. Code Optimization : Need for optimization of Basic Blocks, Loops in flow graph, Optimizing transformation Compile time evaluation, common sub-expression elimination, Variable Propagation, Code Movement Optimization, Strength Reduction, Dead code optimization, Loop Optimization), Local Optimization, Global Optimization, Computing Global data flow equation, Setting up data flow Equations, Data Flow Analysis. Lecture : 10

Text Books: 1. Compilers Principles .Techniques. And Tools by Alfred V. Aho. Ravi Sethi Jeffery D. Ullman. Pearson Education.
2. Compiler Design by Santanu Chattopadhyay. PHI Reference Book Modern Compiler Design by Dick Grune . E. Bal. Ceriel J.H.Jacobs. And Koen G. Langendoen Viley Dreamtech.

Programming Lab (System Programming) Design of lexical analyzers. Design of parsers like recursive – descent parser for a block structured language with typical constructs, Typical exercises using LEX and YACC, Quadruples/Triplex generation using LAX and YACC for a subset of a block structured language,LR (0), SLR, LALR error detection and recovering with code optimization.


Short Notes Pdf Download Click here


Compiler design Learn more

Tagged .

Leave a Reply

Your email address will not be published. Required fields are marked *