GATEverse
← GATE CSE 2003

Q58

MCQ2 marks, −0.5

Consider the translation scheme shown below. S→T  RS \rightarrow T\;R R→+T{print(‘+’);}R∣εR \rightarrow + T \{\text{print}(‘+’);\} R\mid \varepsilon T→T \rightarrow num {print\{\text{print}(num.val);};\} Here num is a token that represents an integer and num.val represents the corresponding integer value. For an input string ‘9+5+29 + 5 + 2’, this translation scheme will print

Sign in to save attempts.

Loading…