1 votes 1 votes Consider the following grammer: S-> aAb | Sc A-> d | Sd | S The above grammer is: a) SLR(1) b) LL(1) c) LR(0) d) none of the above Compiler Design compiler-design parsing lr-parser + – Nishu asked Mar 3, 2016 • retagged Jun 18, 2022 by Lakshman Bhaiya Nishu 9.4k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 6 votes 6 votes ==>as the given grammar is left recursive (S->Sc),so it is not LL(1) grammar. ==>as the given grammar has SR conflict,it is not LR(0) grammar(A->S.d and A->S.) ==>it is SLR(1) as there is no any SR conflict so answer is A) SLR(1) sourav. answered Mar 4, 2016 • selected Mar 4, 2016 by Nishu sourav. comment Share Follow See all 11 Comments See all 11 11 Comments reply Show 8 previous comments Nishu commented Mar 4, 2016 reply Follow Share Ok sir.. 0 votes 0 votes abhilashpanicker29 commented Mar 4, 2016 reply Follow Share http://stackoverflow.com/questions/7378337/what-is-the-difference-between-lr0-and-slr-parsing You can see this to clear the difference between LR(0) and SLR(1) 0 votes 0 votes Nishu commented Mar 4, 2016 reply Follow Share Ok thanku abhilash... 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes I am getting A as answer . Correct me if I am wrong OO7 answered Jul 6, 2018 • edited Jul 6, 2018 by OO7 OO7 comment Share Follow See all 2 Comments See all 2 2 Comments reply abhishekmehta4u commented Jul 6, 2018 reply Follow Share Follow of A is d . So there is no conflict 0 votes 0 votes OO7 commented Jul 6, 2018 reply Follow Share I took follow(A) =d mistakenly but it is b. thank you for your comment plz check for any mistake 0 votes 0 votes Please log in or register to add a comment.