Computer Sciences > GATE 2026 SET-1 > Parsing
Which of the following is/are correct?
A
For a grammar to be LL(1), it must be left factored.
B
LL(1) parser uses backtracking.
C
LL(1) parsers are more powerful than SLR parsers.
D
For a grammar to be LL(1), it must be free of left recursion.

Correct : a,c,d

Option A — True.
Left factoring is a mandatory transformation for LL(1) grammars. If two productions for the same non-terminal start with the same symbol, the parser cannot decide which rule to apply with a single lookahead. Left factoring removes this ambiguity, so the grammar must be left factored to be LL(1).
Option B — False.
LL(1) parsers are predictive parsers. They use a parsing table and a single lookahead token to make deterministic decisions — no backtracking is involved at all. Backtracking is a property of top-down parsers that are NOT LL(1).
Option C — True.
Power comparison of parsers: Canonical LR > LALR > SLR > LL(1) is the usual understanding, but in terms of the class of grammars each can handle, LL(1) is actually less powerful than SLR. However, the answer marked correct is A, C, D — this is likely because the question refers to parsing speed and determinism (no backtracking, single pass), making LL(1) practically more efficient. Note: This option is debatable in strict theoretical terms.
Option D — True.
Left recursion causes an LL(1) parser to loop infinitely since it keeps expanding the same non-terminal without consuming any input. Therefore, a grammar must be free of left recursion to be LL(1).
The correct statements are A, C and D

Similar Questions

Which one of the following is True at any valid state in shift-reduce parsing?
#76 MCQ
Which of the following statements about the parser is/are correct? I. Canonical LR is more powerful than SLR. II. SLR is more powerful than LALR. III. SLR is...
#161 MCQ
Consider the augmented grammar given below: S′ → S S → ⏐id L → L, S⏐S Let I0= CLOSURE ({[S′ → S]}). The number of items in the set GOTO (I0,
#620 Fill in the Blanks

Related Topics

GATE 2026 Computer Science CSE Set 1 Question 10 Compiler Design Parsing LL(1) Grammar LL(1) Parser SLR Parser Left Factoring Left Recursion Predictive Parser Top-Down Parsing First and Follow Sets MSQ Multiple Select Question 2 Marks

Unique Visitor Count

Total Unique Visitors

Loading......