Question

Which of the following is/are Bottom-Up Parser(s)?

Choose every correct option
Official answer and solution
Official answer
A and D
From
Official GATE 2024 answer key

Solution

Classify standard compiler parsers into Top-Down (LL / Predictive) vs. Bottom-Up (Shift-Reduce / LR).

  • (A) Shift-reduce Parser and (D) LR Parser build the parse tree from the leaves (input tokens) up toward the start symbol (root) by reducing handles, so both are Bottom-Up Parsers.
  • (B) Predictive Parser and (C) LL(1) Parser expand non-terminals from the start symbol down to the leaves, so both are Top-Down Parsers.
Final answer

Options (A), (D)

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2024 Computer Science and Information Technology - Set 1 (CS1)
Question
26 of 65
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.