Uploaded by Abhishek Lakhara

Lab Manuals CD 5 SEM

advertisement
Engineering College Bikaner
Department of CS & IT.
Practical Lists: B. Tech V SEM (IT)
Asst. Professor: DHANROOP MAL NAGAR
Compiler Design Lab (5CS4-22)
List of Experiments
Exam Hrs: 2
. 0L+ 0T + 2P
S. No.
(Cr: 01, IA: 30, ETE: 20, M.M. = 50)
List of Experiments
1
Introduction: Objective, scope and outcome of the course.
2
Study of LEX and YACC tools.
3
To identify whether given string is keyword or not
4
Count total no. of keywords in a file. [Taking file from user]
5
Count total no of operators in a file. [Taking file from user]
6
Write a program to Count no. of whitespaces and newline
7
Count total occurrence of each character in a given file. [Taking file from user]
8
Write a C program to insert, delete and display the entries in Symbol Table
9
Write a LEX program to identify following:
1. Valid mobile number
2. Valid url
3. Valid identifier
4. Valid date (dd/mm/yyyy)
5. Valid time (hh:mm:ss)
10
Write a lex program to count blank spaces, words, lines in a given file.
11
Write a lex program to count the no. of vowels and consonants in a C file
12
Write a YACC program to recognize strings aaab, abbb using a^nb^n, where
b>=0.
13
Write a YACC program to evaluate an arithmetic expression involving
operators +,-,* and /.
14
Write a YACC program to check validity of a strings abcd, aabbcd using
grammar a^nb^nc^md^m, where n , m>0
15
Write a program to find first of any grammar
16
Write a program for constructing of LL (1) parsing
17
18
Write a program for constructing recursive descent parsing
Write a program to implement operator precedence parsing.
19
Write a program to implement LALR parsing
Text Books:
1. Compilers Principles, Techniques and Tools, Second Edition, Alfred V.
Aho, Monica S. Lam, Ravi Sethi, Jeffrey D. Ullman., Pearson.
2. Compiler Design, K. Muneeswaran , Oxford University Press, 2012
Reference Books:
1. Compiler Construction, K.V.N Sunitha, Pearson, 2013
2. Engineering a Compiler, Second Edition, Keith D. Cooper & Linda
Torczon, Morgan Kaufmann, Elsevier.
3. Compilers Principles and Practice, Parag H. Dave, Himanshu B. Dave.,
Pearson
4. Compiler Design, Sandeep Saxena, Rajkumar Singh Rathore., S.Chand
publications
5. Compiler Design, Santanu Chattopadhyay
6. Principals of Compiler Design, Nadhni Prasad, Elsevier.
Download