GATE Assistant

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

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

GATE 2021 set1 Computer Science and Information Technology question: Consider the following context-free grammar where the set of terminals is \ a, b, c, d,…

Consider the following context-free grammar where the set of terminals is .

The following is a partially-filled LL(1) parsing table.

\$
S ① ②
T ③ ④
R

Which one of the following choices represents the correct combination for the numbered cells in the parsing table ("blank" denotes that the corresponding cell is empty)?

  1. (A)

    ① ② ③ ④

  2. (B)

    ① blank ② ③ ④

  3. (C)

    ① ② blank ③ blank ④

  4. (D)

    ① blank ② ③ blank ④ blank

Show answer

Official answer: A

Practise this question with exam-style marking

Discussion

No discussion yet.

Join the discussion