Multiple choice

Consider the following translation scheme. S$\rightarrow$ER R$\rightarrow$E {print (''); R}$\in$ E $\rightarrow$F + E {print ('+');} F F$\rightarrow$ (S) | id {print (id.value);} Here id is a token that represents an integer and id.value represents the corresponding integer value. For an input '2 * 3 + 4', this translation scheme prints

  1. 2 * 3 + 4

  2. 2 * +3 4

  3. 2 3 * 4 +

  4. 2 3 4+*

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

Input String 2*3 + 4