GATE Assistant

Past questions › Computer Science and Information Technology › GATE 2025 set2

GATE 2025 set2 · CS · MCQ · 1 mark · Compiler Design › Semantic Analysis

GATE 2025 set2 Computer Science and Information Technology question: Given the following syntax directed translation rules: Rule 1: R AB\ \ B.i = R.i - 1;\…

Given the following syntax directed translation rules:

Rule 1:

Rule 2:

Rule 3:

Which ONE is the CORRECT option among the following?

  1. (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

  2. (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

  3. (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

  4. (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

Show answer

This question is in an all-India live mock that is open now. Its answer appears here when the mock closes.

Practise this question with exam-style marking