GATEverse
← GATE CSE 2012

Q52

MCQ2 marks, −0.67

For the grammar below, a partial LL(1)LL(1) parsing table is also presented along with the grammar. Entries that need to be filled are indicated as E1,E2,E1, E2, and E3E3. ε\varepsilon is the empty string, \$$ indicates end of input, and, \mid$ separates alternate right hand sides of productions. S→aS\rightarrow a A b B∣B \mid b AA a B∣εB \mid \varepsilon A→SA\rightarrow S B→SB\rightarrow S

ab$SE1E2S→εAA→SA→SerrorBB→SB→SE3\begin{array}{|l|l|l|l|}\hline \text{} & {\textbf{a}} & \textbf{b} & \textbf{\$} \\\hline \text{$S$} & \text{E1} & \text{E2} & \text{$S\rightarrow \varepsilon $} \\\hline \text{$A$} & \text{$A\rightarrow S$} & \text{$A\rightarrow S$} & \text{error} \\\hline \text{$B$} & \text{$B\rightarrow S$} & \text{$B\rightarrow S$} & \text{$E3$} \\\hline \end{array}

The FIRST and FOLLOW sets for the non-terminals AA and BB are

Sign in to save attempts.

Loading…