Which of the following statements is/are true?
Topic-wise GATE CS PYQs with verified steps
GATE CSE 2026 Set 1 · Q28
Time
Select all that applyOne or more correct
Solution
Official answer: C) For a grammar to be LL(1), it must be left-factored
ParsingLet us analyze the given statements about parsers:
(A) False: An parser is a predictive, deterministic top-down parser that makes parsing decisions using a single lookahead token without backtracking.
(B) False: If a grammar contains left recursion, the parser will enter an infinite loop or encounter multiple entries in the parsing table. Hence, an grammar must not be left-recursive.
(C) True: Left-factoring is necessary to remove common prefixes from the right-hand sides of production rules so that the parser can deterministically choose the correct rule using a single lookahead token. Thus, a grammar must be left-factored to be .
(D) False: is a bottom-up parsing method that is strictly more powerful than top-down parsing (i.e., every grammar is , and can handle a broader class of grammars than ).
Hence, only statement (C) is correct.
Try the question first, then check your work.
Examiner trap
Recall the necessary conditions for top-down predictive parsing: elimination of left recursion and elimination of common prefixes (left-factoring).
This Parsing previous year question is Q28 of the GATE CSE 2026 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 it is the only one in GATE CSE 2026 Set 1.
How GATE tests ParsingIndependent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.