retagged by
268 views
3 votes
3 votes

Assume that the SLR(1) parser for a grammar has P1 states, and the CLR(1) parser for the same has P2 states. Which of the following clearly depicts the relationship between P1 and P2?

  1. $P1 \leq P2$
  2. $P1 = P2$
  3. $P1 \geq P2$
  4. It depends on the grammar.
retagged by

1 Answer

Best answer
2 votes
2 votes

Number of states all three parser will be same but there might be increase coming to CLR(1)

A is Correct.

selected by
Answer:

Related questions

2 votes
2 votes
0 answers
1
Bikram asked Nov 25, 2016
445 views
$\textbf{goto}$ function of LR class of grammar is represented as:Deterministic Finite Automata transitionsNon-deterministic Finite Automata transitionsPDA transitionsPar...
3 votes
3 votes
1 answer
2
Bikram asked Nov 25, 2016
444 views
Consider the following grammar:$E \rightarrow E + T \mid T$$T \rightarrow T ^* F \mid F$$F \rightarrow (E) \mid id$What are the productions for E, T and F after convertin...
2 votes
2 votes
1 answer
3
Bikram asked Nov 25, 2016
300 views
Which one of the following statements is TRUE?SLR parser has more states than LALR parser.LALR parser has more states than Canonical LR.Canonical LR has fewer states than...
3 votes
3 votes
1 answer
4
Bikram asked Nov 25, 2016
977 views
Which one of the following can be handled by predictive parsers?Left recursionLeft factorsAmbiguityNon-determinism