Consider the following Syntax Directed Translation Scheme $\text{(SDTS)}$, with non-terminals $\{ \text{S,A} \}$ and terminals $\{ \text{a,b} \}$.
- $\text{S} \rightarrow \text{aA} \quad \{\text{print }1\}$
- $ \text{S} \rightarrow \text{a} \quad \{\text{print }2\}$
- $\text{A} \rightarrow \text{Sb} \quad \{\text{print }3\}$
Using the above $\text{SDTS}$, the output printed by a bottom-up parser, for the input $\text{aab}$ is:
- $1 \; 3 \; 2 $
- $2 \; 2 \; 3 $
- $2 \; 3 \; 1 $
- Syntax Error