Given the following syntax directed translation rules: Rule 1: π β π΄π΅ {π΅.β¦
GATE Β· 2025 Β· CS Β· Set 2 Β· Computer Science & IT
Given the following syntax directed translation rules:
Rule 1: π β π΄π΅ {π΅. π = π . π β 1; π΄. π = π΅. π; π . π = π΄. π + 1;}
Rule 2: π β πΆπ· {π. π = πΆ. π + π·. π;π·. π = πΆ. π + 2;}
Rule 3: π β πΈπΉ {π. π = πΈ. π + πΉ. π;}
Which ONE is the CORRECT option among the following?
- A.
Rule 1 is S-attributed and L-attributed; Rule 2 is S-attributed and not L-attributed; Rule 3 is neither S-attributed nor L-attributed
- B.
Rule 1 is neither S-attributed nor L-attributed; Rule 2 is S-attributed and L-attributed; Rule 3 is S-attributed and L-attributed
- C.
Rule 1 is neither S-attributed nor L-attributed; Rule 2 is not S-attributed and is L-attributed; Rule 3 is S-attributed and L-attributed
- D.
Rule 1 is S-attributed and not L-attributed; Rule 2 is not S-attributed and is L-attributed; Rule 3 is S-attributed and L-attributed
Attempted by 103 students.
Sign up free to check your answer
Sign up freeLoading lessonβ¦