Which of the following is/are Bottom-Up Parser(s)?
Topic-wise GATE CS PYQs with verified steps
GATE CSE 2024 Set 1 · Q26
Time
Select all that applyOne or more correct
Solution
Official answer: A) Shift-reduce Parser; D) LR Parser
ParsingParsing techniques are broadly categorized into Top-Down and Bottom-Up parsing:
Bottom-Up Parsers: Construct a parse tree for an input string beginning at the leaves (bottom) and working up towards the root. Examples include:
Shift-reduce Parser (Option A)
LR Parsers (e.g., SLR, CLR, LALR) (Option D)
Operator precedence parser
Top-Down Parsers: Construct a parse tree from the root down to the leaves. Examples include:
Recursive descent parser
Predictive Parser (Option B)
LL(1) Parser (Option C)
Therefore, the bottom-up parsers are A and D.
Try the question first, then check your work.
Examiner trap
LL parsers and predictive parsers build parse trees from root to leaves (top-down), whereas shift-reduce and LR parsers build parse trees from leaves to root (bottom-up).
This Parsing previous year question is Q26 of the GATE CSE 2024 Set 1 paper. Find more GATE CSE PYQs on Parsing in Compiler Design, or browse all GATE CSE PYQs.
Free diagnostic
Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Parsing PYQs now with no account.
An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.
Parsing has 23 GATE CSE PYQs across 16 papers from 2012 to 2026. 2 of them are 1-mark MSQs like this one, and GATE CSE 2024 Set 1 has 2.
How GATE tests ParsingIndependent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.