0 votes 0 votes Consider the following grammar: S --> aPbSQ/a Q --> tS/ ε P --> r Is the above grammar SLR(1) ? Compiler Design compiler-design parsing lr-parser made-easy-test-series + – User007 asked Oct 6, 2016 • retagged Jul 15, 2022 by Anjana5051 User007 506 views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply sudsho commented Oct 6, 2016 reply Follow Share again i cant see ur image file...please write down the grammar 0 votes 0 votes User007 commented Oct 6, 2016 reply Follow Share Done :) 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes no it is not SLR(1) u will get confused only in one state where we get S->aPbS.Q Q->.tS/. here there is reduce move also and shift move on t also....but we will keep this is\n follow of Q which is $ and t(follow of Q=follow of S which is t and $)... sudsho answered Oct 6, 2016 • edited Oct 6, 2016 by sudsho sudsho comment Share Follow See all 2 Comments See all 2 2 Comments reply User007 commented Oct 6, 2016 reply Follow Share Isn't follow of Q = Follow of S due to this production [S --> aPbSQ] ??? 1 votes 1 votes sudsho commented Oct 6, 2016 reply Follow Share oh sorry i mislooked it...u r right..it is not SLR(1)..we have reduce move in 1 and also a shift move in t..so shift reduce conflict i there..thanks for pointing it out...let me update the answer 0 votes 0 votes Please log in or register to add a comment.