GateAI
Parsing

GATE CSE 2026 Set 1 · Q28

MSQ1 markEasy

Time

Which of the following statements is/are true?

Select all that applyOne or more correct

Pick every correct option

Solution

Step-by-step verified solution

Official answer: C) For a grammar to be LL(1), it must be left-factored

Parsing

Let us analyze the given statements about LL(1)\text{LL}(1) parsers:

  • (A) False: An LL(1)\text{LL}(1) parser is a predictive, deterministic top-down parser that makes parsing decisions using a single lookahead token without backtracking.

  • (B) False: If a grammar contains left recursion, the LL(1)\text{LL}(1) parser will enter an infinite loop or encounter multiple entries in the parsing table. Hence, an LL(1)\text{LL}(1) grammar must not be left-recursive.

  • (C) True: Left-factoring is necessary to remove common prefixes from the right-hand sides of production rules so that the parser can deterministically choose the correct rule using a single lookahead token. Thus, a grammar must be left-factored to be LL(1)\text{LL}(1).

  • (D) False: SLR(1)\text{SLR}(1) is a bottom-up parsing method that is strictly more powerful than top-down LL(1)\text{LL}(1) parsing (i.e., every LL(1)\text{LL}(1) grammar is LR(1)\text{LR}(1), and SLR(1)\text{SLR}(1) can handle a broader class of grammars than LL(1)\text{LL}(1)).

Hence, only statement (C) is correct.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Parsing previous year question is Q28 of the GATE CSE 2026 Set 1 paper. Find more GATE CSE PYQs on Parsing in Compiler Design, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Parsing PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Parsing in GATE CSE

Parsing has 23 GATE CSE PYQs across 16 papers from 2012 to 2026. 2 of them are 1-mark MSQs like this one, and it is the only one in GATE CSE 2026 Set 1.

How GATE tests Parsing

More from GATE CSE 2026 Set 1

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2026 Set 1 · Q28 · MSQ

Which of the following statements is/are true?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.