A canonical set of items is given below S → L. > R Q → R. On input symbol < the set has
Topic-wise GATE CS PYQs with verified steps
GATE CSE 2014 Set 1 · Q34
Time
Select one answerSingle correct
Solution
Official answer: D) neither a shift-reduce nor a reduce-reduce conflict.
ParsingIn the given canonical set of LR items:
The dot is followed by the terminal symbol $>$. A shift action can only occur on the input symbol $>$, not on $<$.
This is a completed reduce item. A reduction to might be placed in the lookahead set (or for SLR), but for a conflict to occur:
A shift-reduce conflict requires both a shift action and a reduce action on the *same* input symbol.
A reduce-reduce conflict requires two different reduction actions on the *same* input symbol.
On the input symbol $<$:
There is no shift action because the shift item only shifts on symbol $> $.
There is at most one reduce action (from ), so there is no reduce-reduce conflict.
Since there is no shift action on $<$, there is no shift-reduce conflict.
Therefore, on input symbol $<$, the set has neither a shift-reduce nor a reduce-reduce conflict (Option D).
Try the question first, then check your work.
Examiner trap
Notice that the only shift transition from this state is on the terminal symbol (not on ). Check the definitions of shift-reduce and reduce-reduce conflicts.
This Parsing previous year question is Q34 of the GATE CSE 2014 Set 1 paper. Find more GATE CSE PYQs on Parsing in Compiler Design, or browse all GATE CSE PYQs.
Free diagnostic
Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Parsing PYQs now with no account.
An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.
Parsing has 23 GATE CSE PYQs across 16 papers from 2012 to 2026. 11 of them are 2-mark MCQs like this one, and it is the only one in GATE CSE 2014 Set 1.
How GATE tests ParsingIndependent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.