DR.
SUBHASH UNIVERSITY - Junagadh
School of Engineering and Technology
Syllabus for 6 Semester
COMPILER DESIGN - 1BTCO602
Name of Department in which this course is offered Semester in Which offered
B.TECH COMPUTER SCIENCE AND ENGINEERING 6
1. Type of Course :
2. Prerequisite : Algorithms, Data Structures, Assembly Language Program, Theory of Computation, C/C
++ Programming Skills.
3. RATIONALE :
4. COURSE OUTCOME :
Sr. No CO Statement
5. TEACHING AND EXAMINATION SCHEME :
Teaching Schemes Credit Examination Scheme
Theory Practical Total
L T P C E-ESE M-PA V-ESE I-PA
3 0 2 4 70 30 30 20 150
6. CONTENT
Sr. No. Total %
Content
Hrs Weightage
1 Introduction 7
Overview of the Translation Process, A Simple Compiler, and Difference
between interpreter, assembler and compiler., Overview and use of
linker and loader, types of Compiler, Analysis of the Source Program,
The Phases of a Compiler, Cousins of the Compiler, The Grouping of
Phases, Lexical Analysis, Hard Coding and Automatic Generation Lexical
Analyzers, Front-end and Back-end of compiler, pass structure
2 Lexical Analyzer 8
Introduction to Lexical Analyzer, Input Buffering, Specification of
Tokens, Recognition of Tokens, A Language for Specifying Lexical
Analyzers, Finite Automata From a Regular Expression, Design of a
Lexical Analyzer Generator, Optimization of DFA
3 Parsing Theory 10
Top Down and Bottom up Parsing Algorithms, Top-Down Parsing,
Bottom-Up Parsing, Operator-Precedence Parsing, LR Parsers, Using
Ambiguous Grammars, Parser Generators, Automatic Generation of
Parsers, Syntax-Directed Definitions, Construction of Syntax Trees,
Bottom-Up Evaluation of S-Attributed Definitions, L-Attributed
Definitions, syntax directed definitions and translation schemes
4 Error Recovery 2
Error recovery strategies
5 Intermediate Code Generation 5
Different Intermediate Forms, Different Intermediate Forms, Syntax
Directed Translation Mechanisms, Attributed Mechanisms, Attributed
Definition
6. CONTENT
Sr. No. Total %
Content
Hrs Weightage
6 Run Time Memory Management 5
Source Language Issues, Storage Organization, Storage - Allocation
Strategies, and Access to Non local Names, Parameter Passing, Symbol
Tables, and Language Facilities for Dynamic Storage Allocation,
Dynamic Storage Allocation Techniques
7 Code Optimization 5
Global Data Flow Analysis, A Few Selected Optimizations like Command
Sub Expression Removal, A Few Selected Optimizations like Command
Sub Expression Removal, Loop Invariant Code Motion, Strength
Reduction
8 Code Generation 5
Issues in the Design of a Code Generator, The Target Machine, Run-
Time Storage Management, Basic Blocks and Flow Graphs, Next-Use
Information, A Simple Code Generator, Register Allocation and
Assignment, The DAG Representation of Basic Blocks, Peephole
Optimization, Generating Code from DAGs, Dynamic Programming
Code-Generation Algorithm, Code Generator Generators
Total Hours 47
7. SUGGESTED SPECIFICATION TABLE WITH MARK ( THEORY )
Distribution of Theory Marks
R Level U Level A Level N Level E Level C Level
10.00 25.00 20.00 10.00 5.00 0.00
Legends : R : Remembrance U : Umderstamding A : Application
N : Analyze and E : Evaluate C : Create and Above Levels
Note : This Specification table shall be treated as a general guideline for student and teacher.The actual
distribution of marks in question paper may very slightly from above table.
8 . REFERENCES BOOKS :
1 Compilers: Principles, Techniques and Tools, Compilers: Principles, Techniques and Tools,
Aho, Lam, Sethi, and Ullman, Pearson, 2014
2 The Theory And Practice Of Compiler Writing, The Theory And Practice Of Compiler Writing,
Trembley J.P. And Sorenson P.G., Mcgraw-Hill, 2007
3 Modern Compiler Design, Modern Compiler Design, Dick Grune, Henri E. Bal, Jacob,
Langendoen, WILEY India, 2012
9 . LIST OF EXPERIMENTS :
1 Practical 1
Write a C program to implement Lexical Analyzer
2 Practical 2
Write a C program to identify whether a given line is comment or not
3 Practical 3
Write a C program to test whether a given identifier is valid or not
4 Practical 4
Write a Program to simulate lexical analyzer for validating operators
5 Practical 5
To study about lexical analyzer generator (LEX) and Flex (Fast Lexical Analyzer)
6 Practical 6
Write a C program for implementing the functionalities of predictive parser for the mini
language
7 Practical 7
Write a C program for constructing of LL (1) parsing.
9 . LIST OF EXPERIMENTS :
8 Practical 8
Write a C Program to for constructing recursive descent parsing
9 Practical 9
Practical Write a C Program to implement LALR parsing
10 Practical 10
Write a C Program to implement Operator Precedence Parsing
11 Practical 11
Create Yacc and Lex specification files to recognizes arithmetic expressions involving +, -, *
and /
10. LIST OF OPEN-SOURCE SOFTWARE/LEARNING WEBSITE :
1 NPTEL course/tutorials Swayam
2 www.coursera.org
3 www.udacity.com
4 Vlabs.iitb.ac.in
5 https://en.wikipedia.org/wiki/Theory_of_computation
6 http://meru.cecs.missouri.edu/courses/cecs341/tc.html