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

$$S \rightarrow d a T \mid \underline{\ (1)}$$

$$T \rightarrow a S \mid b T \mid \ \underline{(2)}$$

$$R \rightarrow \underline{(3)} \mid \epsilon$$

The set of terminals is $\{a, b, c, d, f\}$. The FIRST and FOLLOW sets of the different non-terminals are as follows.

FIRST($S$) = $\{c, d, f\}$, FIRST($T$) = $\{a, b, \epsilon\}$, FIRST($R$) = $\{c, \epsilon\}$

FOLLOW($S$) = FOLLOW($T$) = $\{c, f, \#\}$, FOLLOW($R$) = $\{f\}$

Which one of the following options CORRECTLY fills in the incomplete productions?

Consider the following statements.

S_{1} : Every SLR(1) grammar is unambiguous but there are certain unambiguous grammars that are not SLR(1).

S_{2} : For any context-free grammar, there is a parser that takes at most O(n^{3}) time to parse a string of length n.

Which one of the following option is correct?

Rule 1 : P.i = A.i + 2, Q.i = P.i + A.i, and A.s = P.s + Q.s

Rule 2 : X.i = A.i + Y.s and Y.i = X.s + A.i

Which one of the following is TRUE?

S' → S

S → 〈L〉 | id

L → L,S | S

Let I

_{0}= CLOSURE ({[S' → ●S]}). The number of items in the set GOTO (I

_{0}, 〈 ) is: _____.