0 votes 0 votes For the below given grammar: S→-S S→S-a S→a The number of inadequate states (states which have conflicts) and number of shift reduce conflicts are _____ and _____ respectively. Compiler Design compiler-design parsing + – Parshu gate asked Nov 10, 2017 Parshu gate 1.1k views answer comment Share Follow See all 6 Comments See all 6 6 Comments reply Show 3 previous comments Shubhanshu commented Dec 30, 2017 reply Follow Share I am getting SR conflict $S \rightarrow -S.$ $S\rightarrow S.-a$ In same state. 0 votes 0 votes sourav. commented Dec 30, 2017 reply Follow Share i am not getting SR conflict becasuse it should be like $S \rightarrow -S\$$ so on $S$ ,the transition will be $S \rightarrow -S.\$$ and on $a$ it will be $S \rightarrow -a.$ and $S \rightarrow a.$ which is a RR conflict 0 votes 0 votes Shubhanshu commented Dec 30, 2017 reply Follow Share In I0 state I am considering only that production which will lead to conflict. I0: $S \rightarrow .-S$ I2: $1.S \rightarrow -.S$ $2. S \rightarrow .-S$ $3. S \rightarrow .S-a$ 1st and 3rd production go along with to next stage. I4:- $S \rightarrow -S. $ $S \rightarrow S.-a$ First one is creating reduce move while other is shifting. 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes whatever parsing you take the answer is 1 1 arch answered Nov 20, 2017 arch comment Share Follow See 1 comment See all 1 1 comment reply Parshu gate commented Nov 20, 2017 reply Follow Share can u explain how? 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes for LR(0) i am getting 0,0 suryaprakash answered Jun 13, 2018 suryaprakash comment Share Follow See all 0 reply Please log in or register to add a comment.