CSPC-613 Compiler Design | |||||||
|---|---|---|---|---|---|---|---|
Teaching Scheme | Credit | Marks Distribution | Duration of End Semester Examination | ||||
| L | T | P | Internal Assessment | End Semester Examination | Total | ||
| 3 | 1 | 0 | 4 | Maximum Marks: 40 | Maximum Marks: 60 | 100 | 3 Hours |
| Minimum Marks: 16 | Minimum Marks: 24 | 40 | |||||
Unit-I
Introduction to Compilers: Definition of compiler, interpreter and its differences, Structure of a compiler, pass and phases of translation, bootstrapping, Lexical Analysis, Role of Lexical Analyzer, Input Buffering, Specification of Tokens, Recognition of Tokens, Lex, Finite Automata, Regular Expressions to Automata, Minimizing DFA.
Unit-II
Syntax Analysis: Parsing, Role of Parser, Grammars, Context-free grammars, derivations, ambiguity, classes of parsing, Top Down Parsing: Recursive Descent Parser, Predictive Parser-LL(1), Bottom Up Parsing: Shift Reduce Parser-LR Parser-LR(0), Introduction to SLR Parser, CLR Parser and LALR Parser, Error Handling and Recovery in Syntax Analyzer, YACC, Precedence Parser.
Unit-III
Intermediate Code Generation: Syntax Directed Definitions, Evaluation Orders for Syntax Directed Definitions, Intermediate Languages: Syntax Tree, Three Address Code, Types and Declarations, Translation of Expressions, Type Checking.
Unit-IV
Run-Time Environment: Need for runtime memory management, Address resolution of runtime objects at compile time, Type checking, Language features influencing run time memory management.
Code Generation: Storage Organization, Stack Allocation Space, Access to Non-local Data on the Stack, Heap Management, Issues in Code Generation, Design of a simple Code Generator.
Code Optimization: Principal Sources of Optimization, Basic Blocks, Peep-hole optimization, DAG, Data Flow Analysis.