GATEverse
← GATE CSE 2012

Q53

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, | separates alternate right hand sides of productions. S→aAbB∣bAaB∣εS \rightarrow a A b B \mid b A a 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 appropriate entries for E1,E2,E1, E2, and E3E3 are

Sign in to save attempts.

Loading…