1 1 vote How many DFA states are constructed for the following augmented grammar using LR(0) parser? S'->S$ S->x|(A) A->A,S|S Where S is the start symbol and S′ → S$ is augmented production. i got 11 state but ans is 10 . can you plz explain i don't know where i am wrong Compiler Design compiler-design parsing lr-parser numerical-answers test-series + – 92komal 1.6k views answer comment Share Follow Print See all 6 Comments 6 6 Comments reply Show 3 previous comments 92komal commented Dec 24, 2017 reply Follow flag that is the solution my dobut in the state I3 in that state why is not add S transition after A->.S 0 0 replyShare Yogesh Mandge commented Dec 24, 2017 reply Follow flag Yes they haven't added the S transitions but even after adding the production rule of S it wouldn't have made any difference. Because on reading x from I3 it would have gone to I2 and on reading ( from I3 it would have gone to I3 itself (self loop). 0 0 replyShare 92komal commented Dec 24, 2017 reply Follow flag ok thank u i got it where i m wrong 0 0 replyShare Please log in or register to add a comment.
0 0 votes but, why are we going from state I1 to state I4? Is state I4 necessary state or it should be removed? Someone help me clearing this doubt. Rohit Kumar 2 answered Nov 9, 2018 Rohit Kumar 2 comment Share Follow See 1 comment 1 1 comment reply PiratedVirus commented Nov 9, 2018 reply Follow flag Please prefer to answer only if you are sure. Doubts are always welcomed in comments! Best Luck :) 0 0 replyShare Please log in or register to add a comment.