search
Log In
16 votes
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
in Compiler Design
recategorized by
2.9k views
1
1
Repeated $\mathbf{thrice}$ in GATE.

10 Answers

21 votes
 
Best answer

so only $1$st one is correct ans

Correct Answer: $A$


edited by
4 votes

(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.

Reference: http://stackoverflow.com/questions/2676144/what-is-the-difference-between-lr-slr-and-lalr-parsers

2 votes
CLR is most powerful among all.lr(k) parsers.
2 votes
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.
Answer:

Related questions

32 votes
5 answers
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}$
asked Feb 14, 2017 in Compiler Design Madhav 4k views
11 votes
5 answers
2
4.2k views
We lived in a culture that denied any merit to literary works, considering them important only when they were handmaidens to something seemingly more urgent - namely ideology. This was a country where all gestures, even the most private, were interpreted in political ... s belief that ideology is not as important as literature is revealed by the word: culture' seemingly' urgent' political'
asked Feb 14, 2017 in Verbal Ability Arjun 4.2k views
24 votes
6 answers
3
4k views
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$
asked Feb 14, 2017 in Compiler Design Arjun 4k views
38 votes
7 answers
4
8.9k views
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$.
asked Feb 14, 2017 in Compiler Design Arjun 8.9k views
...