Question:medium

Consider the following Syntax Directed Translation Scheme, with non-terminals \(\{S,A\}\) and terminals \(\{a,b\}\):
The output printed by a bottom-up parser for the input \(aab\) is

Show Hint

For bottom-up parsing, semantic actions are executed during reductions. Therefore: \[ \text{Output order} = \text{Reverse of derivation order}. \] Always construct the derivation first and then reverse the production sequence to obtain the output.
Updated On: Jun 25, 2026
  • \(1\;3\;2\)
  • \(2\;2\;3\)
  • \(2\;3\;1\)
  • \(3\;2\;1\)
Show Solution

The Correct Option is C

Solution and Explanation

Was this answer helpful?
0