CD Practical Solution GTU




LIST OF PRACTICALS

Sr. Title of Practical ANSWER
1 Implementation of Finite Automata and String Validation Solution
2 Introduction to Lex Tool Solution
3 Implement following Programs Using Lex

  1. Generate Histogram of words
  2. Ceasor Cypher
  3. Extract single and multiline comments from C Program
Solution
4 Implement following Programs Using Lex

  1. Convert Roman to Decimal
  2. Check weather given statement is compound or simple
  3. Extract html tags from .html file
Solution
5 Implementation of Recursive Descent Parser without backtracking

  • Input: The string to be parsed.
  • Output: Whether string parsed successfully or not.
  • Explanation: Students have to implement the recursive procedure for RDP for a typical grammar. The production no. are displayed as they are used to derive the string.
Solution
6 Finding “First” set

  • Input: The string consists of grammar symbols.
  • Output: The First set for a given string.
  • Explanation: The student has to assume a typical grammar. The program when run will ask for the string to be entered. The program will find the First set of the given string.
Solution
7 Generate 3-tuple intermediate code for given infix expression Solution
8 Extract Predecessor and Successor from given Control Flow Graph Solution
9 Introduction to YACC and generate Calculator Program Solution
10 Finding “Follow” set

Input: The string consists of grammar symbols.

Output: The Follow set for a given string.

Solution