GATE CS 2026 Set 1 | Question 28
Compiler Design › Parser · MSQ · 1 mark · Answer: C
- Question 28Compiler Designmsq1 markWhich of the following statements is/are true?
- A.LL(1) parser uses backtracking
- B.For a grammar to be LL(1), it must be left-recursive
- C.For a grammar to be LL(1), it must be left-factored✓
- D.The LL(1) parsers are more powerful than the SLR parsers
Answer: C
Solution
Answer: C • (A) False: LL(1) is predictive and picks the production from one lookahead symbol, so it never backtracks. • (B) False: left recursion makes a grammar not LL(1). • (C) True: two alternatives with a common prefix share FIRST symbols and cause a table conflict, so the grammar must be left-factored. • (D) False: bottom-up SLR parsers handle grammars LL(1) cannot, such as left-recursive expression grammars. - A.
More GATE PYQ on Parser
All GATE CS Compiler Design PYQ →Attempt GATE CS 2026 Set 1 in real GATE exam mode
Full paper with a timer, the GATE interface and a topic-wise analysis — free.
Create free account →