Compiler-Design
October 8, 2023Disk-scheduling
October 8, 2023Compiler-Design
| Question 50 |
Consider the following translation scheme.
S → ER
R → *E{print("*");}R|ε
E → F + E {print("+");}|F
F → (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
| 2 * 3 + 4 | |
| 2 * +3 4
| |
| 2 3 * 4 + | |
| 2 3 4+* |
Question 50 Explanation:

Now perform post order evaluation, you will get output as,
2 3 4 + *
Correct Answer: D
Question 50 Explanation:

Now perform post order evaluation, you will get output as,
2 3 4 + *
