# GATE2017-2-6

2.9k views

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

1. Canonical LR is more powerful than SLR
2. SLR is more powerful than LALR
3. SLR is more powerful than Canonical LR
1. I only
2. II only
3. III only
4. II and III only

recategorized
1
1
Repeated $\mathbf{thrice}$ in GATE. so only $1$st one is correct ans

Correct Answer: $A$

edited

(A)

• LALR is more powerful than SLR because SLR has more restrictive reduction rules.
• Canonical LR means LR(1). It is more powerful than SLR.
CLR is most powerful among all.lr(k) parsers.
A)Only 1

CLR is more powerful than SLR

CLR>LALR>SLR
1 vote
option 1
1 vote
CLR(1)>LALR(1)>SLR(1)>LR(0)>LL(1)
1 vote
CLR > LALR > SLR

CLR is more powerful than LALR

LALR is more powerful than SLR

Only option (A) is correct....
1 vote
CLR parser is more powerful parser than SLR , LALR.

## Related questions

1
4k views
Match the following according to input (from the left column) to the compiler phase (in the right column) that processes it: ... $\text{P-iii; Q-iv; R-i; S-ii}$ $\text{P-i; Q-iv; R-ii; S-iii}$
Consider the following expression grammar $G$: $E \rightarrow E-T \mid T$ $T \rightarrow T + F \mid F$ $F \rightarrow (E) \mid id$ Which of the following grammars is not left recursive, but is equivalent to $G$? $E \rightarrow E-T \mid T$ $T \rightarrow T +F \mid F$ ... $F \rightarrow (E) \mid id$ $E \rightarrow TX \mid (TX)$ $X \rightarrow -TX \mid +TX \mid \epsilon$ $T \rightarrow id$
Consider the following grammar: stmt $\rightarrow$ if expr then expr else expr; stmt | $0$ expr $\rightarrow$ term relop term | term term $\rightarrow$ id | number id $\rightarrow$ a | b | c number $\rightarrow [0-9]$ where relop is a relational operator (e.g.. $<$ ... example. the program if $e_1$ then $e_2$ else $e_3$ has $2$ control flow paths. $e_1 \rightarrow e_2$ and $e_1 \rightarrow e_3$.