GateAI
Lexical Analysis, Parsing and SDT

GATE CSE 2017 Set 2 · Q6

MCQ1 markEasy

Time

Which of the following statements about parser is/are CORRECT? I. Canonical LR is more powerful than SLR. II. SLR is more powerful than LALR. III. SLR is more powerful than Canonical LR.

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: A) I only

Lexical Analysis, Parsing and SDT

The relative expressive power (the set of grammars that can be parsed without conflicts) of LR parsers is:

LR(0)<SLR(1)<LALR(1)<CLR(1)\text{LR}(0) < \text{SLR}(1) < \text{LALR}(1) < \text{CLR}(1)
  • Statement I is TRUE: Canonical LR (CLR) is strictly more powerful than SLR.

  • Statement II is FALSE: LALR is strictly more powerful than SLR (SLR is less powerful than LALR).

  • Statement III is FALSE: SLR is less powerful than Canonical LR.

Thus, only statement I is correct, matching option (A).

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 Lexical Analysis, Parsing and SDT previous year question is Q6 of the GATE CSE 2017 Set 2 paper. Find more GATE CSE PYQs on Lexical Analysis, Parsing and SDT 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 Lexical Analysis, Parsing and SDT 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.

Lexical Analysis, Parsing and SDT in GATE CSE

Lexical Analysis, Parsing and SDT has 14 GATE CSE PYQs across 12 papers from 2011 to 2025. 9 of them are 1-mark MCQs like this one, and GATE CSE 2017 Set 2 has 2.

How GATE tests Lexical Analysis, Parsing and SDT

More from GATE CSE 2017 Set 2

Share this solution

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

GateAI solution cardGATE CSE 2017 Set 2 · Q6 · MCQ

Which of the following statements about parser is/are CORRECT? I. Canonical LR is more powerful than SLR. II. SLR is more powerful than LALR. III. SLR is more powerful than Canonical LR.

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.