Skip to content
Mad4Study

Engineering & Science

GATE Computer Science

  • GATE CS
  • 2026–27 pattern practice
  • Compiler Design
  • LL(1) parsing
  • Easy

Which property prevents a grammar from being LL(1)?

Parsing

Pick an option to check your answer.

A left-recursive rule such as A→Aα∣βA \to A\alpha \mid \beta makes FIRST(Aα)\text{FIRST}(A\alpha) overlap FIRST(β)\text{FIRST}(\beta), so a one-token lookahead cannot choose, and a top-down parser would recurse forever. Left recursion must be eliminated before building an LL(1) table.

Why not the others

  • Having ε-productions is allowed if FIRST/FOLLOW sets do not conflict.
  • Having more than one non-terminal is irrelevant.
  • Right recursion is fine for top-down parsing.

Report an error

GATE CS · Compiler Design · Parsing