Unit 2 Questions
Unit 2 Questions
Unit 2 QP
PART - A
1. State the difference between CALR & LALR?
2. List three kinds of intermediate representation.
3. State any two error recovery strategies
4. Give example for Top-down parsing
5. Eliminate left recursive for the following grammar.
A -> AC | Aad | bd
6. What are the various conflicts that occurs during shift reduce parser?
7. Write the algorithm for FIRST and FOLLOW
8. What is a CFG?
9. Difference between SLR (1) and LALR (1).
PART B ( any 3)
1. Show that the following grammar
SAa | bAc | dc | bda
Aa
is LALR (1) but not SLR(1)
4. Construct stack implementation of shift reduce parser for the following grammar.
E -> E + E
E -> E * E
E -> ( E )
E -> id