Complier construction all previous/ past question papers
Fall 21 Past paper
Complier construction Mid Term Exam 2021
- C# language is used for which kind of application.
- Design regular expression for relational operators.
- Design a regular expression for constants (digits plus floating point numbers):
- Defined EOF.
- Difference between compiler and interpreter.
- How to find the tokens/variables that are the ending symbols of a grammar with code.
- Defined tokens.
- Difference between Lexical Analyzer Syntax analysis.
- Design a regular expression for finding all the words starting with „t‟ and „m‟ in the following document.
- Defined Symbol Table.
- Defined hash table.
- How to find the tokens/variables that are the starting symbols of a grammar WITH CODE.
Prove that the following grammar is ambiguous or not.
Provide unambiguous grammar for the following ambiguous grammar.
Eliminate the left recursion from the grammar.
Perform left factoring on the following grammar.
- Construct the LL (1) parsing table for the following grammar. Also show the working of parsing algorithm to draw parse tree for the string int + int + int $.
Eà TX Xà +E | € Tà (E) | int Y Yà *T | €
- Find first () and follow () for the following grammar. Also determine whether the grammar is LL (1) or not?
Sà ACB| CbB |Ba Aà da | BC Bà g | € Cà h | €
Write a program to implement the recursive decent parser for the following grammar.
E à a + T Tà(E)|a