Question 37Asked in BEL PE Computer Science, 20 Dec 2025 (5:00 PM)
Consider the following given grammar: S → L = R | R
Consider the following given grammar:
S → L = R | R
L → *R | id
R → L
Which of the following statements is true about this grammar with respect to LR parsing techniques?
AThe grammar contains a shift-reduce conflict in simple LR parsing and is not LR(0) or SLR(1).
BThe grammar is SLR(1) and can be parsed without shift-reduce conflicts.
CThe grammar is LR(0) and can be parsed by an LR(0) parser without conflicts.
DThe grammar is ambiguous and cannot be parsed by any LR parser.
Show answerHide answer
Correct answer: (A) The grammar contains a shift-reduce conflict in simple LR parsing and is not LR(0) or SLR(1).
From BEL PE Computer Science PYQ, 20 Dec 2025 (5:00 PM)