Você está na página 1de 4

Lovely Professional University, Punjab

Course Code

Course Title

Course Planner

CSE419

COMPILER DESIGN LABORATORY

14623::Pushpendra Kumar Pateriya

Course Weightage

ATT: 5

Course Orientation

CAP: 40

Lectures Tutorials Practicals Credits


0

ETP: 55

Exam Category: X6: Mid Term Exam: Not Applicable End Term Exam:
Practical
KNOWLEDGE ENHANCEMENT, SKILL ENHANCEMENT, SOFTWARE SKILL

Reference Books ( R )
Sr No

Title

Author

Year

Publisher Name

R-1

LEX & YACC

JOHN R. LEVINE, TONY 2nd


MASON, DOUG BROWN

Edition

1992

O'REILLY

R-2

COMPILERS PRINCIPLES,
TECHNIQUES AND TOOLS

ALFRED V. AHO,
JEFFREY D. ULLMAN,
MONICA S LAM, R
SETHI

2nd

2007

PEARSON

R-3

COMPILER DESIGN IN C

ALLEN I. HOLUB

1st

1994

PEARSON

Other Reading ( OR )
Sr No

Journals articles as Compulsary reading (specific articles, complete reference)

OR-1

Programming examples in C: http://mason.gmu.edu/~white/C/ ,

Relevant Websites ( RW )
Sr No

(Web address) (only if relevant to the course)

Salient Features

RW-1

http://www.cs.bilkent.edu.tr/~guvenir/courses/CS315/lex-yacc/linux.html

Running lex and yacc on Linux systems

RW-2

http://alumni.cs.ucr.edu/~lgao/teaching/bison.html

Bison Tutorial

RW-3

http://epaperpress.com/lexandyacc/index.html

Lex & Yacc Tutorial

RW-4

https://www.cs.princeton.edu/~appel/modern/c/software/flex/flex.html

Flex version 2.5

Audio Visual Aids ( AV )


Sr No

(AV aids) (only if relevant to the course)

Salient Features

AV-1

http://nptel.ac.in/courses/106104123/

Compiler Design video lectures by IIT Kanpur

AV-2

http://nptel.ac.in/courses/106108052/

Compiler Design video lectures by IISc Banglore

Software/Equipments/Databases
Sr No

(S/E/D) (only if relevant to the course)

Salient Features

SW-1

http://www.cs.arizona.edu/~debray/Teaching/CSc453/DOCS/tutorial-large.pdf

Lex and Yacc: A Brisk Tutorial

An instruction plan is a tentative plan only and a teacher may make some changes in his/her teaching plan. The students are advised to use syllabus for preparation of all examinations. The students are expected to keep themselves
updated on the contemporary issues related to the course. Upto 20% of the questions in any examination/Academic tasks can be asked from such issues even if not explicitly mentioned in the instruction plan.

SW-2

https://www.cs.princeton.edu/~appel/modern/c/software/bison/bison_toc.html

Bison The YACC-compatible Parser Generator

SW-3

https://www.l2f.inescThe YACC Parser Generator/Example: Calculator with Variables


id.pt/~david/w/pt/The_YACC_Parser_Generator/Example:_Calculator_with_Variables

Scheme for CA:


Component

Frequency

Practical

Out Of
3

Each Marks Total Marks


4

Total :-

10

30

10

30

Details of Academic Task(s)


AT No.

Objective

Topic of the Academic Task

Nature of Academic Task


(group/individuals/field
work

Evaluation Mode

Allottment /
submission Week

Practical1

To check the
theoratical and
practical subject
undestanding of
students.

Syllabus will covered up to 2nd practical.

Individual

Student
performance in viva
and execution.
Assign 50-50 Marks
for Viva and
Execution.

2/3

Practical2

To check the
theoratical and
practical subject
undestanding of
students.

Syllabus will be covered up to 5th practical.

Individual

Student
performance in viva
and execution.
Assign 50-50 Marks
for Viva and
Execution.

5/6

Practical3

To check the
theoratical and
practical subject
undestanding of
students.

The syllabus will be covered up to 8th practical.

Individual

Student
performance in viva
and execution.
Assign 50-50 Marks
for Viva and
Execution.

8/9

Practical4

To check the
theoratical and
practical subject
undestanding of
students.

Syllabus will be covered up to 11th practical.

Individual

Student
performance in viva
and execution.
Assign 50-50 Marks
for Viva and
Execution.

11 / 12

*Each experiment of the lab will be evaluated using following relative scheme:
An instruction plan is a tentative plan only and a teacher may make some changes in his/her teaching plan. The students are advised to use syllabus for preparation of all examinations. The students are expected to keep themselves
updated on the contemporary issues related to the course. Upto 20% of the questions in any examination/Academic tasks can be asked from such issues even if not explicitly mentioned in the instruction plan.

Component

% of Marks

Performance/Job
evaluation/conduct/executi
on/demonstration

50

Viva

50

Detailed Plan For Practicals


Practical No

Broad topic (Subtopic)

Practical Description

Learning Outcomes

Practical 1

Introduction to compiler design


(Keyword identification in a C/C++
program)

Write a program in C/C++ to identify


keywords in a C/C++ program.

The students will learn to identify and


C compiler and text editor.
count the number of keywords in a C/C++
program using C/C++ language.

Practical 2

Introduction to compiler design


(Operator identification in a C/C++
program)

Write a program in C/C++ to count the


number of operators in a C/C++ program.

The students will learn to identify and


count the operators available in a C/C++
program.

Practical 3

Introduction to compiler design


(Program execution time calculation)

Write a program in C/C++ language to find The students will learn to calculate the
out the execution time of your own
program execution time in C/C++
program. Practical Evaluation 1 will be
language.
taken.

Practical 4

Lexical Analyzer(Introduction to LEX) In this practical the description and


installation of LEX will be covered.

The students will got to know about the us Flex, Windows/Linux Platform
of flex and its installation steps.

Lexical Analyzer(Installation of flex)

The students will get to know about the


use of flex and its installation steps.

In this practical the description and


installation of LEX will be covered.

Equipment Used

C compiler and text editor.

C compiler and text editor.

Flex, Windows/Linux Platform

Practical 5

Programming with LEX(LEX Program Write a program in LEX to count the


The students will learn the use of flex.
to count number of vowels and
number of vowels and consonants present in
consonants in a file)
a file.

GCC, Flex, Bison, Linux

Practical 6

Programming with LEX(LEX Program Write a program to count number of blank


to count number of blank spaces,
spaces, characters, lines, words from given
characters, lines, words from given
input.
input)

The students will learn the basics of flex.

flex, bison, Linux

Practical 7

Syntax Analyzer(Introduction to
YACC)

In this practical the description and


installation of Bison will be covered.

The students will get to the use of YACC Bison/BYACC, Linux platform
and its installation steps.

Syntax Analyzer(Installation of
bison/byacc)

In this practical the description and


installation of Bison will be covered.

The students will get to the use of YACC Bison/BYACC, Linux platform
and its installation steps.

Practical 8

Syntax Analyzer(Computing FIRST of Write a program to to calculate the FIRST


Non terminals in C)
of non terminals of a given grammar.
Practical Evaluation 2 will be taken.

Students will learn how to calculate


FIRST of non terminals of a given
grammar using C language.

Practical 9

Syntax Analyzer(Computing FOLLOW Write a program to compute the FOLLOW The students will learn about YACC and
of Non terminals in C)
of Non terminals of a given grammar using its use to create desk calculator.
C language.

LEX, YACC, Linux platform

Practical 10

Programming with YACC(Desk


calculator with error recovery)

Write a program for desk calculator with


error recovery using YACC. Practical
evaluation 3 will be taken in 9th Lab.

LEX, YACC, Linux platform

Practical 11

Programming with YACC(Simple


specifications for desk calculator)

Write a program for simple specification of The students will learn about the desk
desk calculator.
calculator in YACC.

The students will learn about YACC and


its use to create desk calculator.

Lex, Bison, GCC, text editor

Bison, Flex, Linux Platform

An instruction plan is a tentative plan only and a teacher may make some changes in his/her teaching plan. The students are advised to use syllabus for preparation of all examinations. The students are expected to keep themselves
updated on the contemporary issues related to the course. Upto 20% of the questions in any examination/Academic tasks can be asked from such issues even if not explicitly mentioned in the instruction plan.

Practical 12

Programming with YACC(Variable


declarations in C)

Write a program for defining tokens and


values in flex/bison. Practical evaluation 4
will be taken.

The students will learn specification of


tokens in flex/bison.

Lex, Bison, Linux platform

Practical 13

Symbol table generation(Symbol table


generation in C)

Write a program in C to generate symbol


table for an input C program.

The students will learn the basic structure C compiler, a text editor, Linux
of symbol table and its generation and its Platform
updation.

Practical 14

Symbol table generation(Symbol table


generation in C)

Write a program in C to generate symbol


table for an input C program.

The students will learn the basic structure C compiler, a text editor, Linux
of symbol table and its generation and its Platform
updation.

SPILL OVER
Practical 15

Spill Over

An instruction plan is a tentative plan only and a teacher may make some changes in his/her teaching plan. The students are advised to use syllabus for preparation of all examinations. The students are expected to keep themselves
updated on the contemporary issues related to the course. Upto 20% of the questions in any examination/Academic tasks can be asked from such issues even if not explicitly mentioned in the instruction plan.

Você também pode gostar