Suppose we have a computer with single register and only three instructions given below:
$$\begin{array}{ll} \text{LOAD addren} & \text{; load register} \\ \text{} & \text{; from addren}\\ \text{STORE addren} & \text{; store register}\\ \text{} & \text{; at addren}\\ \text{ADD addren} & \text{; add register to}\\ \text{} & \text{; contents of addren}\\ \text{} & \text{; and place the result}\\ \text{} & \text{; in the register}\\ \end{array}$$
Consider the following grammar:
- $A \rightarrow id : =E$
- $E \rightarrow E+T\mid T$
- $T \rightarrow (E)\mid id$
Write a syntax directed translation to generate code using this grammar for the computer described above.