Compiler Design Lab
Syllabus
List of Experiments
Write a C/C++ program to search the number of occurrences of any word
string and sub sequence in a given string
Write a C/C++ program to find the number of occurrences of any word in a file and replace that with another word
Implement the lexical analyzer using JLex, Flex or other lexical analyzer generating tools and write the following program using LEX
Program to count the number of characters, words, spaces and lines in a given input file
Program to count the number of comment lines in a given C program. Also eliminate them and copy the resulting program into separate file
Program to recognize a valid arithmetic expression and to recognize the identifiers and operators present
Print them separately
Program to recognize and count the number of identifiers in a given input file
Write a program to check whether a string belongs to the grammar or not. Write a program to generate a parse tree
Write a program to check whether a grammar is left recursive and left factoring
Write a program to remove left recursion and left factoring
Write a program to implementation FIRST and FOLLOW for the given grammar
Write a program to implementation to implement recursive-Descent and Non-recursive Predictive parser
Write a program to check whether a given grammar is LL (1) or not
Write a C/C+ + program to implementation of shift reduce parsing Algorithm
Write a C/C++ program to construct i) LR Parsing table and Implement LR parsing algorithm, ii) CLR Parsing table and implement CLR parsing algorithm, iii) LALR Parsing table and implement LALR parsing algorithm
YACC program to recognize i) a valid arithmetic expression that uses operators +, -,* and /, ii) strings 'aabb','abbb', 'ab' and 'a' using the grammar
Write a C program to implement i) the syntax-directed definition of “if E then S1” and “if E then S1 else S2”, ii) a Symbol Table with function to create, insert, modify, search and display
Median SGPI: 9
Highest SGPI: 10