0 votes 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 asked Jun 28, 2017 retagged Jun 22, 2022 by Lakshman Bhaiya akankshadewangan24 654 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes 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 See all 8 8 Comments reply Show 5 previous comments akankshadewangan24 commented Jun 29, 2017 reply Follow Share 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 votes 0 votes joshi_nitish commented Jun 29, 2017 reply Follow Share Yes, while is terminal 0 votes 0 votes akankshadewangan24 commented Jun 29, 2017 reply Follow Share thanku 0 votes 0 votes Please log in or register to add a comment.