Two LR(1) item sets share core {X→c·X, X→·cX, X→·d}. Their lookaheads are respectively {c,d} and {end-marker}. Which claims about their LALR merge are false? 1: Cannot merge because lookaheads differ. 2: Merge creates shift/reduce conflict. 3: Merge creates reduce/reduce conflict. 4: Cannot merge because goto on c leads to different sets.
LALR merges equal LR(0) cores and unions their lookaheads, so differing lookaheads do not prevent merging. Neither set contains a completed item, so no reduction exists here to cause either conflict. Goto states with equal cores merge consistently as well. All four assertions are false, D.
More Parsing and Syntax Analysis questions
GATE 2011 CS (CS1) Q37– Binary operator ↓ has lower precedence than ↑. Operator ↑ is right-associative and ↓…