• edited by
1,426 views
1 1 vote

Which state is having SR/RR conflict?

Consider the following Grammar :
$S \rightarrow A B A$
$A \rightarrow B c|d A| \in \mid e$
$B \rightarrow$ ed $\mid e$
During construction of SLR (1) parser for the above grammar we came across many intermediate states. Then which of the following is correct ?

  1. There is only one shiff-reduce conflict is an intermediate state.
  2. There is only one reduce-reduce conflict in intermediate state.
  3. $V$ There is both shift-reduce and reduce-reduce conflict in an intermediate state.
  4. There is no such intermediate state.

2 Answers

1 1 vote

See the pic

0 0 votes
in I4.. states having
A-> e.
B-> e.
A-> e.d
in this state as
there is intersection in follow of A and B.. so there will be reduce conflict.... and also A-> e.d shidt entry will also be in d column so shift-reduce conflict will be in d column...
• edited by
Position:
Show:

Related questions

0 0 votes
2 2 answers
672
672 views
Deepalitrapti asked Jul 19, 2018
672 views
8:14 AM37\%Deepali bansal's doubt7 hrsJaipurCompiler DesignCS \& IT EnggWhere €,; IF THEN and all capital letters are terminal and stmt, ifstmt, whilestmt and bexpr are n...
0 0 votes
1 1 answer
428
428 views
Shivani gaikawad asked Jun 3, 2018
428 views
How many states are there in CLR parsing table for the given grammar? $\qquad$\[\mathrm{S} \rightarrow \mathrm{~S} \mathrm{~S}+\left|\mathrm{S} \mathrm{~S}^{*}\right| \ma...
0 0 votes
1 1 answer
430
430 views
Shivani gaikawad asked May 31, 2018
430 views
The given grammar is:\[\mathrm{G}=\{(\mathrm{S}),\{\mathrm{a}, \mathrm{~b}\},\{\mathrm{S} \rightarrow \mathrm{SaS}, \mathrm{~S} \rightarrow \mathrm{~b}\}, \mathrm{S}\}\]L...
2 2 votes
1 answers 1 answer
517
517 views
Prince Sindhiya asked May 31, 2018
517 views
For the next 2 questions, consider the following grammar:\[\begin{array}{l}\mathrm{S} \rightarrow(\mathrm{~T} \\\mathrm{T} \rightarrow \mathrm{~S}) \mathrm{U} \\\mathrm{~...