GATE CS 2026 Set 2 | Question 41

Compiler Design › Parser · MCQ · 2 marks · Answer: D

  1. Question 41Compiler Designmcq2 marks
    Consider the canonical parsing of the grammar below using terminals and non-terminals with as the start symbol.
    Which one of the following options gives the number of shift-reduce conflicts that will occur in the ACTION table?
    • A.
      2
    • B.
      3
    • C.
      4
    • D.
      5
      ✓

    Answer: D

    Solution

    Answer: (D) The -productions and force reductions in the same states where terminals , (and the following symbols) can be shifted, and adds a shift/reduce clash on . Building the canonical automaton and inspecting each state with a complete item against shiftable terminals yields 5 shift-reduce conflicts in total.

More GATE PYQ on Parser

All GATE CS Compiler Design PYQ →

Attempt GATE CS 2026 Set 2 in real GATE exam mode

Full paper with a timer, the GATE interface and a topic-wise analysis — free.

Create free account →