MCQ · 2 marks · Parsing

GATE CS 2024 CS-2 — Q40

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

S→AaAb∣BbBaS \to AaAb \mid BbBa
A→cS∣ϵA \to cS \mid \epsilon
B→dS∣ϵB \to dS \mid \epsilon

The following is a partially-filled LL(1) parsing table.
aabbccdd$\$
SSS→AaAbS \to AaAbS→BbBaS \to BbBa(1)(2)
AAA→ϵA \to \epsilon(3)A→cSA \to cS
BB(4)B→ϵB \to \epsilonB→dSB \to dS
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.
Select one option