edited by
884 views
1 votes
1 votes

Which of the following statements about the parser is/are correct?

  1. Canonical $\text{LR}$ is more powerful than $\text{SLR}.$
  2. $\text{SLR}$ is more powerful than $\text{LALR}.$
  3. $\text{SLR}$ is more powerful than canonical $\text{LR}.$

 

  1. $\text{(I)}$ only
  2. $\text{(II)}$ only
  3. $\text{(III)}$ only
  4. $\text{(II)}$ and $\text{(III)}$ only
edited by

1 Answer

1 votes
1 votes


 

$CLR$ and $LR(1)$ parser is same.

  1. As we can see since $SLR \subseteq LR(1)$. Therefore this option is correct.
     
  2. $SLR \subseteq LALR(1)$ therefore $LALR(1)$ is more powerful than $SLR$.
     
  3. $SLR \subseteq CLR$ or $LR(1)$, therefore $CLR$ is more powerful.

    Answer: A
Answer:

Related questions

1 votes
1 votes
0 answers
4
soujanyareddy13 asked Apr 12, 2022
896 views
Match the following:$$\begin{array} {ll} \qquad \quad\textbf{List-I} & \qquad \quad \textbf{List-II} \\ \text{(P) Condition coverage} & \text{(1) Black-box testing} \\ \t...