Skip to main content

GATE CSE 2026Compiler Design › Grammars & ParsingVerified

GATE CSE 2026 PYQ: Which of the following statements is/are true?

Which of the following statements is/are true?

  1. A
    LL(1)\text{LL(1)} parser uses backtracking
  2. B
    For a grammar to be LL(1)\text{LL(1)}, it must be left-recursive
  3. C
    For a grammar to be LL(1)\text{LL(1)}, it must be left-factored
    Correct answer
  4. D
    The LL(1)\text{LL(1)} 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.