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