Compiler Design

Teacher

Sanjib Kumar Naik

Category

Core Courses

Course Attendees

Still no participant

Course Reviews

Still no reviews

Course Name : Compiler Design

Code(Credit) : BSIT3602(3-2-1)

Course Objectives

To introduce the major concept areas of language translation and compiler design.
To enrich the knowledge in various phases of compiler ant its use

  • I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

Learning Outcomes

To apply the knowledge of lex tool & yacc tool to devleop a scanner & parser.
To design & conduct experiments for Intermediate Code Generation in compiler.

  • I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

Course Syllabus

MODULE-I (5 Hrs)
Introduction: Translator, types of translator, Compiler, types of compiler,

Compiler Vs. Interpreter. Overview and phases of compilation.
Lexical Analysis: Non-deterministic and deterministic finite automata (NFA & DFA),

NFA Vs. DFA, regular grammar, regular expressions and regular languages
Assignment 1:Explain Compiler Vs. Interpreter ?
Assignment 2:Explain Overview and phases of compilation ?
Practice 1:
1. Write a program to implement the lexical analyzer.

Module-II(5 Hrs)
Role of a parser, context free grammars and context free languages, parse trees

andderivations, ambiguous grammar, Eliminate the left recursion and null

production.
Recursive descent parsing, LL (1) grammars
Assignment 3:Explain Role of a parser ?
Practice 2:
2. Write a Lexical Analyzer

Module-III(5 Hrs)
SLR parsers and construction of SLR parsing tables
LR(1) parsers and construction of LR(1) parsing tables
LALR parsers and construction of efficient LALR parsing tables
parsing using ambiguous grammars
error reporting and recovery parser generator.
application of syntax directed translation.
Syntax directed definitions (SDD)
Assignment 4: Construct LR(1) parsers and construction of LR(1) parsing tables?
Assignment 5: Construct LALR parsers and construction of efficient LALR parsing

tables ?
Practice 3:
3. Write a program to left factor the given grammar.

Module-IV(2 Hrs)
Structure and features of symbol tables,
Handle pruning and shift reduces parsing,
symbol attributes and scopes.
Assignment 6:Explain Structure and features of symbol tables ?
Practice 4:
4. Write a program to remove the Left Recursion from a given grammar.

MODULE-V (5 Hrs)
Introduction, benefits and types of intermediate code generation, three address

codes - quadruples and triples, DAG for expressions, types and declarations,

translation of expressions, translation of Boolean expressions and control flow

statements
Assignment 7: Construct DAG for expressions ?
Assignment 8:Explain benefits and types of intermediate code generation ?
Practice 5:
5. Implement Recursive Descendent Parsing for the given Grammar

MODULE-VI (5 Hrs)
back patching, intermediate code generation for procedures.
Storage organizations, static and dynamic storage allocations, stack allocation,

Activation of the procedure and the activation record.
Introduction, Major Issues of Code generation
Assignment 9: Explain Storage organizations ?
Practice 6:
6. Implement Predictive Parser for the given grammar

MODULE-VII (3 Hrs)
simple codegeneration using basic blocks.
Objective, peephole optimization, redundant and un-reachable codes, concepts of

elimination of local common sub-expressions, basics of flow of control

optimization.
Assignment 10: Explain peephole optimization ?

TEXT BOOKS:
1. Compilers - Principles, Techniques & Tools, Alfred V. Aho, Monica S. Lam, Ravi

Sethi& Jeffrey D. Ullman Pearson

REFERENCE BOOKS:
1. Compiler Design, Author: O. G. Kakde , Publisher: Laxmi Publication.
2.Compiler Design, Authors: S K Sahu, A B Biswal, Publisher: Alok

I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

Session Plan

Session 1

Translator, types of translator

http://ecomputernotes.com/compiler-design/translators-and-its-type

Session 2

Compiler, types of compiler

https://www.quora.com/What-are-the-types-of-compilers

Session 5

Non-deterministic and deterministic finite automata (NFA & DFA)

https://www.slideshare.net/AnimeshChaturvedi/nfa-to-dfa

Session 15

Eliminate the left recursion and null production

https://www.geeksforgeeks.org/removing-direct-and-indirect-left-recursion-in-a-grammar/

Session 14

Ambiguous grammar

https://www.geeksforgeeks.org/ambiguous-grammar/

 

Session 16

Recursive descent parsing

https://www.geeksforgeeks.org/recursive-descent-parser/

 

I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

Session 28

translation of Boolean  expressions and control flow statements

https://www.javatpoint.com/boolean-expressions

Session 23

Structure and features of symbol tables

https://www.geeksforgeeks.org/symbol-table-compiler/

Session 22

Application of syntax directed translation

https://www.geeksforgeeks.org/syntax-directed-translation-in-compiler-design/

Session 21

Syntax directed definitions (SDD)

https://www.geeksforgeeks.org/compiler-design-syntax-directed-definition/

 

Session 20

LALR parsers and construction of  parsing tables

https://www.geeksforgeeks.org/slr-clr-and-lalr-parsers-set-3/

 

Session 19

LR(1) parsers and construction of LR(1) parsing tables

https://www.geeksforgeeks.org/slr-clr-and-lalr-parsers-set-3/

Session 18

SLR parsers and construction of SLR parsing tables

https://www.geeksforgeeks.org/slr-clr-and-lalr-parsers-set-3/

Session 26

Three address codes - quadruples and triples

https://www.geeksforgeeks.org/intermediate-code-generation-in-compiler-design/

Session 25

types of intermediate code generation

https://www.geeksforgeeks.org/intermediate-code-generation-in-compiler-design/

 

Session 35

Simple code generation using basic Blocks

https://www.javatpoint.com/basic-block

Session 34

Major Issues of Code generation

https://www.javatpoint.com/design-issues

Session 33

Activation  of the  procedure and the activation record

https://www.javatpoint.com/activation-record

Session 31

intermediate code generation for procedures

https://www.youtube.com/watch?v=jFLeMZXhdVw

Session 37

elimination of local common sub-expressions

https://en.wikipedia.org/wiki/Common_subexpression_elimination

I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.

Case Studies

Case Studies

Recent Comments

    Our Main Teachers

    Sanjib Kumar Naik

    Asst Prof Dept of IT
    VIEW PROFILE