0% found this document useful (0 votes)
9 views3 pages

Course Curriculum

Uploaded by

factcult1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views3 pages

Course Curriculum

Uploaded by

factcult1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Course Curriculam

Course Code: CSE304 Credit Units L T P/S SW AS/DS FW No. of PSDA Total Credit Unit
Course Level UG 3 0 2 0 0 0 0 4
Course Title Compiler Construction

Course
Description :

Course Objectives :

SN
Objectives
.
The objective of this course is to describe the utilization of formal Grammar using Parser representations, especially those on bottom-up and top-
down approaches and various algorithms; to learn techniques for designing parser using appropriate software. The theory and practice of
1
programming language translation, compilation, and run-time systems, organized around significant programming project to build a compiler for
simple but nontrivial programming language. To understand, design and implem

Pre-Requisites : General

SN. Course Code Course Name

Course Contents / Syllabus :

SN. Module Descriptors / Topics Weightage


Compilers – Analysis of the source program – Phases of a compiler – Cousins of the Compiler – Grouping of Phases
Compiler construction tools - Lexical Analysis - Role of Lexical Analyzer – Input Buffering – Specification of Tokens.
Text formatter, Text Editors, Phases and Passes, FSM & RE’s and their Analysis, application to Lexical
1 Introduction 22.00
Implementation of Lexical Analyzers, Lexical-Analyzer Generator, Lex – Compiler including case study, Formal
Grammar and Analysis, BNF Notation, YACC including case study. The Syntactic and Parse Trees, Capabilities of
CFG.
Role of the parser –Writing Grammars –Context-Free Grammars – Top Down parsing – Recursive Descent Parsing
Role of the
2 Predictive Parsing – Bottom-up parsing – Shift Reduce Parsing – Operator Precedent Parsing – LR Parsers - SLR 22.00
parser
Parser Canonical LR Parser.
LR Parsers, the canonical collection of LR (0) items, constructing SLR Parsing Tables, Constructing canonical LR
3 LR Parsers Parsing tables and LALR parsing tables, An Automatic Parser Generator, Implementation of LR parsing tables, 22.00
Constructing LALR sets of items.
Issues in the design of code generator – The target machine – Runtime Storage management – Basic Blocks and
Flow Graphs – Next-use Information – A simple Code generator – DAG representation of Basic Blocks – Peephole
Issues in Optimization Syntax directed Translation Schemes, Implementation of Syntax directed translators, Intermediate Code,
the design Postfix notation, Parse Trees and Syntax Trees, Three address Code, Quadruple & Triples, Translation of Assignment
4 19.00
of code Statements, Boolean expressions, Control Statements, Postfix Translation, Translation with a Top Down Parser, Array
generator references in Arithmetic expressions, Procedure Calls, Declarations and Case statements Translations. Data
Structure for Symbol Tables, representing scope information. Run Time Administration: Implementation of simple
Stack allocation scheme, storage allocation in block structured language.
Principal Sources of Optimization – Optimization of basic Blocks – Introduction to Global Data Flow Analysis –
Principal
Runtime Environments – Source Language issues – Storage Organization – Storage Allocation strategies – Access to
Sources of
5 non-local names – Parameter Passing. Lexical phase errors, syntax phase errors, semantic errors Code Optimization: 15.00
Optimizatio
Loop optimization, the DAG representation of basic blocks, value numbers and Algebraic Laws, Global Data – Flow
n
Analysis

Course Learning Outcomes :


SN. Course Learning Outcomes
1 Describe the compiler concepts with their utilization
2 Design various types of compilers
3 Analyze & implement SLR and LALR parsing techniques
4 Synthesize the code generation techniques.
5 Demonstrate the process of Implementation of optimization of source code.
6 Understand the structure of compilers
Understand the basic techniques used in compiler construction such as lexical analysis, top-down, bottom-up parsing, context-sensitive analysis,
7
and intermediate code generation
Understand the basic data structures used in compiler construction such as abstract syntax trees, symbol tables, three-address code, and stack
8
machines
9 Design and implement a compiler using a software engineering approach

Pedagogy for Course Delivery :

SN. Pedagogy Methods


The course pedagogy will include lectures, case studies, seminars, videos and presentations through Remote Learning using Four Quadrant
1 Approach. The class will be taught using audio-visual aids and problem based method. In addition to assigning the problems, the course instructor
will spend considerable time in understanding the concept of innovation in alignment with the industry.

Theory /VAC / Architecture Assessment (L,T & Self Work): 75.00 Max : 100

Attendance+CE+EE : 5+35+60

SN. Type Component Name Marks


1 Attendance 5.00
2 End Term Examination (OMR) 60.00
3 Internal CLASS TEST 15.00
4 Internal HOME ASSIGNMENT 10.00
5 Internal Viva 10.00

Lab/ Practical/ Studio/Arch. Studio/ Field Work Assessment : 25.00 Max : 100

Attendance+CE+EE : 5+35+60

SN. Type Component Name Marks


1 Attendance 5.00
2 External EXPERIMENT 30.00
3 External VIVA VOCE 30.00
4 Internal PERFORMANCE 15.00
5 Internal PRACTICAL / LAB RECORDS 10.00
6 Internal VIVA VOCE 10.00

Lab/ Practical details, if applicable :


SN
Lab / Practical Details
.
1 1. Consider the following regular expressions: a) (0 + 1)* + 0*1* b) (ab*c + (def)+ + a*d+e)+ c) ((a + b)*(c + d)*)+ + ab*c*d
2 Design a Lexical analyzer for identifying different types of token used in C language.
Write a program which accepts a regular expression from the user and generates a regular grammar which is equivalent to the R.E. entered by user.
The grammar will be printed to a text file, with only one production rule in eac h line. Also, make sure that all production rules are displayed in
3
compact forms e.g. the production rules: S--> aB, S--> cd S--> PQ Should be written as S--> aB | cd | PQ And not as three different production rules.
Also, there should not be any repetition of producti
4 Write a program to eliminate left recursion
5 Write a program for Recursive Descent Calculator.
6 Write that recognizes different a program types of English words
Consider the following grammar: S --> ABC A--> abA | ab B--> b | BC C--> c | cC Following any suitable parsing technique (prefer top-down), design
7
a parser which accepts a string and tells whether the string is accepted by above grammar or not.
Write a program which accepts a regular grammar with no left-recursion, and no null-production rules, and then it accepts a string and reports
8
whether the string is accepted by the grammar or not.
Design a parser which accepts a mathematical expression (containing integers only). If the expression is valid, then evaluate the expression else
9 report that the expression is invalid. [Note: Design first the Grammar and then implement using Shift-Reduce parsing technique. Your program should
generate an output file clearly showing each step of parsing/evaluation of the intermediate sub-expressions.]
10 Open Ended program: Designing of various type parser

List of Professional skill development activities :

No.of PSDA : 0
SN. PSDA Point

Text & References :

SN. Type Title/Name Description ISBN/ URL


Alfred V. Aho, Monica S. Lam, Ravi Sethi,
1 Book and Jeffrey D. Ullman Compilers:
Principles, Techniques, &
Compiler Construction By A.A.
2 Book
Puntambekar - 2009 - 572 pages
Compiler Construction Principles and
3 Book Practice By Kenneth C Louden Turbo
Codes: ... Compiler Design
“Introduction to Compiler Techniques”,
4 Book TATA McGraw Hill Publishing Co. ...... J.P.
Bennet Second Edi

You might also like