edited by
611 views
1 votes
1 votes

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.  $1 \; 3 \; 2 $ 
  2.  $2 \; 2 \; 3  $ 
  3.  $2 \; 3 \; 1 $ 
  4.  Syntax Error
edited by

1 Answer

Related questions

1 votes
1 votes
0 answers
4
soujanyareddy13 asked Apr 12, 2022
896 views
Match the following:$$\begin{array} {ll} \qquad \quad\textbf{List-I} & \qquad \quad \textbf{List-II} \\ \text{(P) Condition coverage} & \text{(1) Black-box testing} \\ \t...