WITH EFFECT FROM THE ACADEMIC YEAR 2016 - 2017

 

CS 352

 

COMPILER CONSTRUCTION

 

Instruction

4

Periods per week

Duration of University Examination

3

Hours

University Examination

75

Marks

Sessional

25

Marks

 

UNIT-I

 

Introduction – Programs related to compilers. Translation process. Major data structures. Other issues in compiler structure. Boot strapping and porting.

 

Lexical analysis – The role of Lexical Analyzer. Input Buffering. Specification of Tokens. Recognition of Tokens. The Lexical-Analyzer Generator Lex.

 

UNIT-II

 

Syntax Analysis – Introduction. Top-Down parsing, Brute Forcing, Recursive Descent, Predicative LL(1), Bottom-Up parsing : Introduction to LR Parsing, Powerful LR parsers SLR, CALR, LALR, Using Ambiguous Grammars, Parser Generators - Yacc.

 

UNIT-III

 

Syntax Directed Translation – Syntax Directed Definitions. Evaluation Orders for SDDs. Applications of Syntax Directed Translation.

 

Symbol Table Organization - Structure of Symbol table, Symbol Table organization for Block Structured and non block Structure languages, Data Structures of symbol Table.

 

UNIT-IV

 

Intermediate code generation : Variants of syntax trees. Three-Address Code, Types and Declarations. Translation of Expressions. Type Checking. Control Flow.

 

Storage Organization. Stack Allocation of Space. Access to Non local Data on the Stack. Heap Management. Introduction to Garbage Collection.

UNIT-V

 

Code Generation – Issues in the Design of a Code Generator. The Target Language. Addresses in the Target Code Basic Blocks and Flow Graphs. Optimization of Basic Blocks. Peephole Optimization. Register Allocation and Assignment. Machine Independent Optimizations – The Principal Sources of Optimizations, Introduction to data flow analysis, Foundation of data flow analysis.

 

Error Recovery : Introduction, Error detecting and Reporting in various Phases, Lexical Errors, Syntax Errors handling, and error Recovery in various Phases.

 

Suggested Reading:

 

  1. 1.Alfred V Aho, Monica S Lam, Ravi Sethi, Jeffrey D Ullman –

 

Compilers: Principles, Techniques & Tools, Pearson Education 2nd Edition 2007.

 

  1. 2.Keith D Cooper & Linda Tarezon, Engineering a Compiler, Morgan Kafman, Second edition.

 

  1. 3.Lex & Yacc, John R Levine, Tony Mason, Doug Brown, Shroff Publishers.

 

  1. 4.Kenneth C Louden, Compiler Construction: Principles and Practice, Cengage Learning.

 

Lex & Yacc, John R Levine, Oreilly Publishers.

Articles View Hits
11923005
   Mon, 24-Jun-2019, 02:25 PMCOMPILER CONSTRUCTION.
Powered by Joomla 1.7 Templates
Developed by MVSREC