GATEverse Practice, past papers & mock tests
GATE 2024 · CS2 - Afternoon
Compiler DesignParsing TechniqueshardMCQ2 marks

Consider the following context-free grammar where the start symbol is S and the set of terminals is {a,b,c,d}.

GRAMMAR RULES
SAaAb | BbBa
AcS | ε
BdS | ε The following is a partially-filled LL(1) parsing table. Row S: col a:
SAaAb, col b:
SBbBa, col c: (1), col d: (2) Row A: col a:
Aε, col b: (3), col c:
AcS Row B: col a: (4), col b:
Bε, col d:
BdS

Which one of the following options represents the CORRECT combination for the numbered cells in the parsing table? Note: In the options, "blank" denotes that the corresponding cell is empty.

Save your progress

Related Compiler Design PYQs