Consider the following grammar
Consider the following LR(0) items corresponding to the grammar above
Given the items above, which two of them will appear in the same set in the canonical sets-of-items for the grammar?
As we can see in the below given LR(0) items, that all three belongs to different state (sets).
$\Rightarrow$ NOT possible for these three items to be in same state
Correct Answer: $D$
ans is D.
Just want to clarify,
1) Question is asked on the LR(0) items, so there is no need to add look ahead.
2) In the state I3, there is shift Reduce conflit , E->F.+E and E->F.
Please correct me
@ JPranavc Actually this is the answer. Here we have been tested about LR(0) rules rather than solving capabilities.It was 1 mark question so they dont want to solve the whole question rather use conflict concept.
There will be 9 sets I0 to I8
(I) will be in set I5
(II) will be in set I3
(III) will be in set I6
So (D)
D. is the answer.
Also, it is not LL(1) as it is left recursive and also it is not LR(0) because there is shift-reduce conflict and hence it is not SLR(1), LALR(1), CLR(1).