edited by
1,881 views
0 votes
0 votes

Consider the grammar-

$S \rightarrow BB$

$B \rightarrow aB/bB/a/b$

How many shift-reduce conflicts will occur when we try to make SLR parsing table for the above grammar?

A. 0

B. 1

C. 2

D. None

edited by

2 Answers

0 votes
0 votes
There will be only two SR conflicts in two states one conflict is with  B->b.(R), B->.bB(S) {b comes in follow of B} and the other one is with B->a.(R) , B->.aB(S) {a comes in Follow of B so conflict}

Related questions

0 votes
0 votes
2 answers
1
dhruba asked Jun 5, 2023
314 views
0 votes
0 votes
0 answers
4
rahul sharma 5 asked Oct 14, 2017
1,326 views
Consider the following augmented grammar G which is used to build LR (0) parsing table.E' __ EE __ E+T/TT __ T*F/FF >(E)/idHow many rows are there in the parsing rable ?...