← ⬆️ Bottom-up Parsing (LR family)
Subtopic 3 of 6

5.3SLR(1)

Same states as LR(0). Reduce A → α only on terminals in FOLLOW(A). FOLLOW is an over-estimate, so SLR can report conflicts that real lookaheads would avoid.

StateACTIONGOTO
*=id$SLR
0s4s5123
1acc
2s6/r5r5
3r2
4s4s587
5r4r4
6s4s589
7r3r3
8r5r5
9r1

1 conflict(s): state 2 on =: s6/r5. Not SLR(1).

sN = shift to state N, rN = reduce by production N (production 0 is S′ → S). SLR reduces A → α only on FOLLOW(A).

Previous year questions: Bottom-up Parsing (LR family) (12)

PYQs are grouped by topic, so this is the full set for Bottom-up Parsing (LR family); try the ones that match this subtopic. Open all 12 on the topic page.