Skip to content

Beta · Data may be lost.Your data may be reset or lost.

GateBrew
← GATE CSE 2025 Set 2
Questions

Q12

MCQ1 mark, −0.33Compiler design

Given the following syntax directed translation rules: Rule 1: R→AB{B.i=R.i−1;A.i=B.i;R.i=A.i+1;}R \rightarrow A B\{B . i=R . i-1 ; A . i=B . i ; R . i=A . i+1 ;\} Rule 2: P→CD{P.i=C.i+D.i;D.i=C.i+2;}P \rightarrow C D\{P . i=C . i+D . i ; D . i=C . i+2 ;\} Rule 3: Q→EF{Q.i=E.i+F.i;}Q \rightarrow E F\{Q . i=E . i+F . i ;\} Which ONE is the CORRECT option among the following?

Sign in to save attempts.

The solution is hidden while you attempt this question. It opens once you check or show the answer.