0 0 votes the G is S-> while(E)S/a E-> a for nested while statement a.is not LR(1) b.is not SLR(1) c.is not LALR(1) d.is LR(0) Compiler Design compiler-design parsing lr-parser + – akankshadewangan24 1.4k views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
1 1 vote it is LR(0)...so it is also SLR(1), LALR(1), CLR(1).. joshi_nitish answered Jun 29, 2017 joshi_nitish comment Share Follow See all 8 Comments 8 8 Comments reply akankshadewangan24 commented Jun 29, 2017 reply Follow flag how it is LR(0) plz explain i can't able to get it 0 0 replyShare joshi_nitish commented Jun 29, 2017 reply Follow flag firstly it is not ambigous secondly it has neither RR nor SR conflicts.. 0 0 replyShare akankshadewangan24 commented Jun 29, 2017 reply Follow flag can u draw derivation tree for this 0 0 replyShare joshi_nitish commented Jun 29, 2017 reply Follow flag dfa will be, 0 0 replyShare akankshadewangan24 commented Jun 29, 2017 reply Follow flag here while is trated as token? 0 0 replyShare akankshadewangan24 commented Jun 29, 2017 reply Follow flag if S-> for(E;J;K) then S-> .for(E;J;K) S-> for . (E;J;K) S-> for( . E;J;K) S-> for(E . ;J;K) S-> for(E; . J;K) S-> for(E;J . ;K) S-> for(E;J; . K) S-> for(E;J; K . ) S-> for(E;J;K) . is this correct? 0 0 replyShare joshi_nitish commented Jun 29, 2017 reply Follow flag Yes, while is terminal 0 0 replyShare akankshadewangan24 commented Jun 29, 2017 reply Follow flag thanku 0 0 replyShare Please log in or register to add a comment.