Which of the following statements is/are true?
GATE CSE 2026Compiler Design › Grammars & ParsingVerified
GATE CSE 2026 PYQ: Which of the following statements is/are true?
- Aparser uses backtracking
- BFor a grammar to be , it must be left-recursive
- CFor a grammar to be , it must be left-factoredCorrect answer
- DThe parsers are more powerful than the SLR parsers
Answer
(C) For a grammar to be LL(1) \text{LL(1)} LL(1) , it must be left-factored
Approach
Evaluate each statement about LL(1) parsers against their defining properties: LL(1) is a table-driven predictive (non-backtracking) parser that scans input left-to-right, builds a leftmost derivation, and uses exactly one lookahead token to select a production deterministically.
Only statement C holds. LL(1) parsing is deterministic and backtrack-free, requires the absence (not presence) of left recursion, requires the grammar to be free of common-prefix/FIRST conflicts (i.e., left-factored), and is not more powerful than SLR - the two classes are incomparable.
Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.