0% found this document useful (0 votes)
24 views2 pages

Bce C711

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)
24 views2 pages

Bce C711

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/ 2

Batch 2019-2023 and onwards w.e.f.

2021(Revised 17/4/21)

BCE-C711
COMPILER DESIGN
MM : 100 Sessional : 30
Time : 3 hrs ESE : 70
LTP Credits 4
3 10

PREREQUISITE: Theory of Computation.

OBJECTIVES:

The course has following objectives

● To learn the process of translating a modern high-level language to executable code.


● Provide an understanding of the fundamental principles in compiler design.
● To learn about the different parsing techniques.
● To apply the code generation algorithms to get the machine code for the optimized
code.
● To represent the target code in any one of the code formats.
● To understand the machine dependent code.
● To draw the flow graph for the intermediate codes.
● To apply the optimization techniques to have a better code for code generation.

COURSE OUTCOME:

On completion of course, student will be able to:

● To realize the basics of compiler design and apply for real time applications.
● To learn about the parsing techniques.
● Apply for various optimization techniques for dataflow analysis.
● To know about compiler generation tools and techniques.
● Understand the application of finite state machines, recursive descent, production rules,
parsing, and language semantics.
● Construct the intermediate code representations and generation.
● Understand the major phases of compilation and to understand the knowledge of Lex
tool & YAAC tool.

NOTE: The question paper shall consist of two sections A and B. Section A contains 10 short
type questions of 6 marks each and student shall be required to attempt any five questions.
Section B contains 8 long type questions of ten marks each and student shall be required to
attempt any four questions. Questions shall be uniformly distributed from the entire syllabus.

Faculty of Engineering & Technology, GKV, Haridwar Computer Science & Engineering
149
UNIT-I

Introduction: What is system software. Introduction to system software. Assembler, Loader,


Linker, Interpreter, Compiler.

UNIT- II

Compiler Structure: Compiler and translator, various phases of compiler, pass structure of
compiler, bootstrapping of compiler.

Lexical Analysis: The role of lexical analyzer, a simple approach to the design of lexical
analyzer, regular expressions, transaction diagram, finite state machines, Implementation of
lexical analyzer,lexical analyzer generator : LEX, capabilities of lexical analyzer.

UNIT – III

Basic Parsing Techniques : Top down Parser with backtracking, recursive recent parsers,
predicate parsers, bottom-up parsers, Shift-reduce parsing, operator precedence parsers.

UNIT- IV

Intermediate Code Generator: Different intermediate forms - Three address code, Quadruplex
and triples, syntax direct translation mechanism and attributed definition. Translation of
Declaration, Assignment, Control flow, Boolean expression, Array in arithmetic expression,
produced calls, case statement, postfix translation.

UNIT – V

Code Optimization and Code Generation: Local optimization, loop, peephole optimization,
basic blocks and flow graphs DAG, data flow analyzer, machine model, order of evaluation,
register allocation of code selection.
Error Detection and Recovery: Lexical phases error, syntactic phase errors, semantic errors.
TEXT BOOKS:
 Alfred V Aho, Jeffrey D. Ullman, Principles of Compiler Design, Narosa.
 V. Aho, R. Sethi and J.D. Ullman, Compiler: Principle, Techniques and Tools, AW.
 H. C. Holub, Compiler Design in C, Prentice Hill Inc.

SUGGESTED READINGS:
 Apple, Modern Computer Implementation in C : Basic Design, Cambridge press.
 V Raghvan, “ Principles of Compiler Design”, TMH.
 Kenneth Louden,” Compiler Construction”, Cengage Learning.

Faculty of Engineering & Technology, GKV, Haridwar Computer Science & Engineering
150

You might also like