GATE Assistant

Past questions › Computer Science and Information Technology › GATE 2024 set1

GATE 2024 set1 · CS · MCQ · 2 marks · Compiler Design › Syntax Analysis (Parsing)

GATE 2024 set1 Computer Science and Information Technology question: Consider the following grammar G, with S as the start symbol. The grammar G has three…

Consider the following grammar , with as the start symbol. The grammar has three incomplete productions denoted by (1), (2), and (3).

The set of terminals is . The FIRST and FOLLOW sets of the different non-terminals are as follows.

, ,

\text{FOLLOW}(S) = \text{FOLLOW}(T) = \{c, f, \}\text{FOLLOW}(R) = {f}$

Which one of the following options CORRECTLY fills in the incomplete productions?

  1. (A)

    (1) (2) (3)

  2. (B)

    (1) (2) (3)

  3. (C)

    (1) (2) (3)

  4. (D)

    (1) (2) (3)

Show answer

Official answer: A

Practise this question with exam-style marking

Discussion

No discussion yet.

Join the discussion