Multiple choice

Following are the production and the action.

  1. $L\rightarrow E \eta$
  2. $E \rightarrow \{ print('+'); \}E_1 + T$
  3. $E \rightarrow R$
  4. $E \rightarrow \{ print('+'); \}T_1 + F$
  5. $T\rightarrow F$
  6. $F\rightarrow (E)$
  7. $F\rightarrow \text{digit \{print (digit lexval)\} }$
    This is syntax directed translation for

  1. prefix to infix

  2. infix to prefix

  3. postfix to infix

  4. infix to postfix

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

It is very clear from the productions 2 and 4.