Which of the following statements is/are true?
GATE CS - 2026,
Answer: C
The true statement is For a grammar to be LL(1), it must be left-factored.
An LL(1) parser chooses a production by looking at one input symbol. If two alternatives of a non-terminal begin with the same prefix, their FIRST sets overlap and one symbol of lookahead cannot choose between them, so the grammar is not LL(1). Left factoring removes such common prefixes.
The other statements are false. An LL(1) parser is predictive and never backtracks. Left recursion is forbidden, not required, because it sends a top-down parser into an endless loop. And LL(1) parsers are not more powerful than SLR parsers: left-recursive grammars such as the usual expression grammar are SLR(1) but cannot be LL(1).
Please log in or register to report this question.