GateAI
Parsing

GATE CSE 2015 Set 3 · Q16

MCQ1 markEasy

Time

Among simple LR (SLR) , canonical LR, and look-ahead LR (LALR), which of the following pairs identify the method that is very easy to implement and the method that is the most powerful , in that order?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: C) SLR, canonical LR

Parsing

Among bottom-up LR parsers:

  • Simple LR (SLR) uses LR(0) items and resolves conflicts using the FOLLOW sets of non-terminals. It has the smallest parsing table and is the easiest to construct and implement among the three.

  • Canonical LR (CLR or LR(1)) uses LR(1) items (items with lookahead components), making it the most powerful parser among them as it parses the largest class of deterministic context-free grammars.

  • LALR merges states of CLR that have identical cores, balancing table size and parsing power.

Hence, the method that is very easy to implement is SLR, and the most powerful method is canonical LR [Page 6].

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 Q16 of the GATE CSE 2015 Set 3 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. 5 of them are 1-mark MCQs like this one, and GATE CSE 2015 Set 3 has 2.

How GATE tests Parsing

More from GATE CSE 2015 Set 3

Share this solution

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

GateAI solution cardGATE CSE 2015 Set 3 · Q16 · MCQ

Among simple LR (SLR) , canonical LR, and look-ahead LR (LALR), which of the following pairs identify the method that is very easy to implement and the method that is the most powerful , in that order?

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.