11 11 votes Which statement is true? LALR parser is more powerful and costly as compare to other parsers All CFG's are LP and not all grammars are uniquely defined Every SLR grammar is unambiguous but not every unambiguous grammar is SLR $\text{LR(K)}$ is the most general back tracking shift reduce parsing method Compiler Design isro2015 compiler-design parsing + – go_editor 7.8k views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
Best answer 15 15 votes Answer : C A . Most powerful and costly order is LR(0) < SLR(1) < LALR(1) < CLR(1) B . The grammar generated by LP are CFG but not implying All CFG are LP. C . Every SLR grammar is unambiguous but not every unambiguous grammar is SLR D . LR(k) is the most general non back tracking shift reduce parsing method shekhar chauhan answered Jun 17, 2016 • selected Dec 13, 2017 by sourav. shekhar chauhan comment Share Follow See all 10 Comments 10 10 Comments reply Show 7 previous comments Regina Phalange commented Apr 2, 2017 reply Follow flag what is LP? 0 0 replyShare Ritwik commented May 3, 2017 i edited by Ritwik May 3, 2017 reply Follow flag Regarding Linear Precedence. Wiki link: https://en.m.wikipedia.org/wiki/ID%2FLP_grammar?wprov=sfla1 Ref. Book: Logic and Linguistics, Volume 2 Edited by Helmut Schnelle, Niels Ole Bernsen Ref. Link: https://books.google.co.in/books?id=CWr8YOnZZiYC&pg=PA82&lpg=PA82&dq=linear+precedence+rule+applies+to+sisters&source=bl&ots=CIXfoaROaF&sig=637BBidnV_hy0JUqf9horJSaAFo&hl=en&sa=X&ved=0ahUKEwjWyPq-uNPTAhWKTbwKHXc_CDQQ6AEIMDAE#v=onepage&q=linear%20precedence%20rule%20applies%20to%20sisters&f=false 2 2 replyShare sourav. commented Dec 13, 2017 reply Follow flag Reference -: https://gateoverflow.in/1470/gate1999_1-17 0 0 replyShare Please log in or register to add a comment.
0 0 votes Option C will be right option. According to more error capability along with cost order of different types of parser is given. CLR(1)>LALR(1)>SLR(1)>LR(0) But according to number of state . n4>=n3=n2=n1 There is no property of non back tracking shift reduce in any parser. So only option C will be right option bcz only operator precedence grammar will act with amgiguos grammar and all grammar act with unambiguos grammar along not all unambiguos grammar will be SLR(1). So option C will be right. Paras Nath answered Oct 14, 2016 Paras Nath comment Share Follow See 1 comment 1 1 comment reply Vishal Goyal commented May 21, 2017 reply Follow flag what do you mean by n4,n3,n2,n1 clearly specify naaa 0 0 replyShare Please log in or register to add a comment.