CS8602 - COMPILER DESIGN (Syllabus) 2017-regulation Anna University

CS8602 - COMPILER DESIGN (Syllabus) 2017-regulation Anna University

CS8602

COMPILER DESIGN

 LPTC

3003

OBJECTIVES:
• To learn the various phases of compiler.
• To learn the various parsing techniques.
• To understand intermediate code generation and run-time environment.
• To learn to implement front-end of the compiler.
• To learn to implement code generator.

We're excited to announce the launch of our new website! Visit NameWheelSpinner.com to explore its features and benefits.

UNIT I

INTRODUCTION TO COMPILERS

9

Structure of a compiler – 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

12

Role of Parser – Grammars – Error Handling – Context-free grammars – Writing a grammar – Top Down Parsing - General Strategies Recursive Descent Parser Predictive Parser-LL(1) Parser-Shift Reduce Parser-LR Parser-LR (0)Item Construction of SLR Parsing Table - Introduction to LALR Parser - Error Handling and Recovery in Syntax Analyzer-YACC.


UNIT III

INTERMEDIATE CODE GENERATION

8

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 AND CODE GENERATION

8

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.

UNIT V

CODE OPTIMIZATION

8

Principal Sources of Optimization – Peep-hole optimization - DAG- Optimization of Basic Blocks- Global Data Flow Analysis - Efficient Data Flow Algorithm.

LIST OF EXPERIMENTS:
1. Develop a lexical analyzer to recognize a few patterns in C. (Ex. identifiers, constants, comments, operators etc.). Create a symbol table, while recognizing identifiers.
2. Implement a Lexical Analyzer using Lex Tool
3. Implement an Arithmetic Calculator using LEX and YACC
4. Generate three address code for a simple program using LEX and YACC.
5. Implement simple code optimization techniques (Constant folding, Strength reduction and Algebraic transformation)
6. Implement back-end of the compiler for which the three address code is given as input and the 8086 assembly language code is produced as output.

PRACTICALS: 30 PERIODS

THEORY: 45 PERIODS

TOTAL: 75 PERIODS

OUTCOMES: On Completion of the course, the students should be able to:
• Understand the different phases of compiler.
• Design a lexical analyzer for a sample language.
• Apply different parsing algorithms to develop the parsers for a given grammar.
• Understand syntax-directed translation and run-time environment.
• Learn to implement code optimization techniques and a simple code generator.
• Design and implement a scanner and a parser using LEX and YACC tools.

TEXT BOOK:
1. Alfred V. Aho, Monica S. Lam, Ravi Sethi, Jeffrey D. Ullman, Compilers: Principles, Techniques and Tools‖, Second Edition, Pearson Education, 2009.

REFERENCES:
1. Randy Allen, Ken Kennedy, Optimizing Compilers for Modern Architectures: A Dependence based Approach, Morgan Kaufmann Publishers, 2002.
2. Steven S. Muchnick, Advanced Compiler Design and Implementation‖, Morgan Kaufmann Publishers - Elsevier Science, India, Indian Reprint 2003.
3. Keith D Cooper and Linda Torczon, Engineering a Compiler‖, Morgan Kaufmann Publishers Elsevier Science, 2004.
4. V. Raghavan, Principles of Compiler Design‖, Tata McGraw Hill Education Publishers, 2010.
5. Allen I. Holub, Compiler Design in C‖, Prentice-Hall Software Series, 1993.

Comments

Popular posts from this blog

CS3491 Syllabus - Artificial Intelligence And Machine Learning - 2021 Regulation Anna University

BE3251 - Basic Electrical and Electronics Engineering (Syllabus) 2021-regulation Anna University

CS3401 Syllabus - Algorithms - 2021 Regulation Anna University