1 votes 1 votes Compiler Design compiler-design parsing test-series + – Prince Sindhiya asked May 31, 2018 • retagged Jul 18, 2022 by makhdoom ghaya Prince Sindhiya 818 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes It is not LR( 1) so option a is true. It is SLR hence it is also LALR,CLR also. abhishekmehta4u answered May 31, 2018 abhishekmehta4u comment Share Follow See all 3 Comments See all 3 3 Comments reply Prince Sindhiya commented May 31, 2018 reply Follow Share What answer u got? it is option a) or d)? 0 votes 0 votes Prince Sindhiya commented May 31, 2018 reply Follow Share 2nd state will contain ${S->L.=R}$ ${R->L.}$ Since follow of R{$,=} So there must be shift reduce conflict and hence it should not be SLR(1) 0 votes 0 votes Prince Sindhiya commented May 31, 2018 reply Follow Share $\{ I am getting this DFA and according to this DFA it should be CLR and not LALR but the answer is D}$ 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes option d is correct Ananya Jaiswal 1 answered May 31, 2018 Ananya Jaiswal 1 comment Share Follow See all 4 Comments See all 4 4 Comments reply Prince Sindhiya commented Jun 5, 2018 reply Follow Share @Ananya why u didn't add the lookaheads In L-->.*R,=|$ L=.Id,$|= As there is .(dot) At the beginning of L In R->.L,$ so L production will be added again and then DFA will look like this $ANSWER is D$ 0 votes 0 votes Ananya Jaiswal 1 commented Jun 5, 2018 reply Follow Share i mentioned there the states to combine which will give the final dfa with al the lookaheads incorpoarted in respective states. 0 votes 0 votes Prince Sindhiya commented Jun 5, 2018 reply Follow Share Yeah that is ok but what about initial state in initial state( L )productionshould contain $ |= entry 0 votes 0 votes Ananya Jaiswal 1 commented Jun 5, 2018 reply Follow Share yes that's my mistake. thanks for pointing out. 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes if an G is LL(1) then it will be LALR(1) now ,the given G is not LL(1),so its not LALR(1). option C and D are eliminated . so option might be either A or B suryaprakash answered Jun 12, 2018 suryaprakash comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes it is both LR(1) as well as LALR(1). rosshan77 answered Aug 5, 2018 rosshan77 comment Share Follow See all 0 reply Please log in or register to add a comment.