GATEverse
← GATE CSE 2024 Set 1

Q28

MCQ2 marks, −0.67

Consider the following grammar GG, with SS as the start symbol. The grammar GG has three incomplete productions denoted by (1),(2)(1), (2), and (3)(3).

S→daT∣(1)T→aS∣bT∣(2)R→(3)∣ϵ\begin{aligned} & S \rightarrow d a T \mid \quad(1) \\ & T \rightarrow a S|b T| \quad(2) \\ & R \rightarrow(3) \mid \epsilon\end{aligned}

The set of terminals is {a,b,c,d,f}\{a, b, c, d, f\}. The FIRST and FOLLOW sets of the different non-terminals are as follows. \begin{aligned} & \operatorname{FIRST}(S)=\{c, d, f\}, \operatorname{FIRST}(T)=\{a, b, \epsilon\}, \operatorname{FIRST}(R)=\{c, \epsilon\} \\ & \operatorname{FOLLOW}(S)=\operatorname{FOLLOW}(T)=\{c, f, \\}, \operatorname{FOLLOW}(R)=\{f\}\end{aligned}$ Which one of the following options CORRECTLY fills in the incomplete productions?

Sign in to save attempts.

Loading…