GATEverse
← GATE CSE 2024 Set 2

Q30

MCQ2 marks, −0.67

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

S→AaAb∣BbBaA→cS∣ϵB→dS∣ϵ\begin{array}{l} S \rightarrow A a A b \mid B b B a \\ A \rightarrow c S \mid \epsilon \\ B \rightarrow d S \mid \epsilon \end{array}

The following is a partially-filled LL(1)\text{LL}(1) parsing table. $\begin{array}{|c|c|c|c|c|c|c|}\hline &a&b&c&d&\$ \\ \hline S &S\rightarrow AaAb &S\rightarrow BbBa &\text{(1)} & \text{(2)} & \\ \hline A & A \rightarrow \varepsilon &\text{(3)} & A\rightarrow cS& & \\ \hline B & \text{(4)} &{B \rightarrow \varepsilon} & &B\rightarrow dS& \\ \hline \end{array}$ 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.

Sign in to save attempts.

Loading…