Consider the following grammar:
Construct the collection of sets of $\text{LR (0)}$ items for this grammar and draw its goto graph.
Here S→ ϵ will take as reduce/ shift action or not effect on LR(0) DFA??
The augmented production is $S^{'} \rightarrow S$.
$\textbf{GOTO Graph:}$
Here, each of $I_0$, $I_1$, $I_2$, $I_3$ is a set of $LR(0)$ items. And hence $I_0$, $I_1$, $I_2$, $I_3$ are the collection of sets of $LR(0)$ items.
@abir_banerjee
Yes. s -> ss. and s->. is also one.
@Arjun sir do we consider augmented productions in RR conflict? for example a state with
S’->S. and S->a.
will these two be taken as rr conflict in LR(0) parser?
@Godlike
No, $S’→ S.$ is the acceptance state not the reduced state.
Augmented production S'-->S
64.3k questions
77.9k answers
244k comments
80.0k users