20 votes 20 votes Which of the following statements about parser is/are CORRECT? $\text{Canonical LR}$ is more powerful than $\text{SLR}$ $\text{SLR}$ is more powerful than $\text{LALR}$ $\text{SLR}$ is more powerful than $\text{Canonical LR}$ I only II only III only II and III only Compiler Design gatecse-2017-set2 compiler-design parsing + – Arjun asked Feb 14, 2017 • recategorized Feb 14, 2017 by khushtak Arjun 7.9k views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply Prashant. commented Feb 14, 2017 reply Follow Share previous year question. https://gateoverflow.in/1663/gate1998_1-26 2 votes 2 votes `JEET commented Dec 7, 2019 reply Follow Share Repeated $\mathbf{thrice}$ in GATE. 4 votes 4 votes Mitali gupta commented Aug 26, 2020 reply Follow Share I would like to mention one more fact : If number of states LR(0) = n1, number of states SLR = n2, number of states LALR = n3, number of states CLR = n4 then, n1 = n2 = n3 <= n4 5 votes 5 votes Please log in or register to add a comment.
Best answer 32 votes 32 votes For a parser more power means it can parse more strings. So, here only the first statement is correct. Correct Answer: $A$ 2018 answered Feb 14, 2017 • edited May 1, 2021 by gatecse 2018 comment Share Follow See all 0 reply Please log in or register to add a comment.
4 votes 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 Kloseup answered Feb 14, 2017 Kloseup comment Share Follow See all 0 reply Please log in or register to add a comment.
2 votes 2 votes CLR is the most powerful among all LR(k) parsers. gargshreya answered Feb 14, 2017 • edited Nov 7, 2023 by Hira Thakur gargshreya comment Share Follow See all 0 reply Please log in or register to add a comment.
2 votes 2 votes CLR(1)>LALR(1)>SLR(1)>LR(0)>LL(1) Purvi Agrawal answered Mar 6, 2017 Purvi Agrawal comment Share Follow See all 0 reply Please log in or register to add a comment.