The GATE Grind

GATE 2015 CS (CS3) – Question 15

Compiler Design · Parsing and Syntax Analysis · 1 mark · Multiple choice

Among SLR, canonical LR and LALR, select the method easiest to implement followed by the most powerful method.

  1. SLR,LALR
  2. Canonical LR,LALR
  3. SLR,canonical LR
  4. LALR,canonical LR

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (C) SLR,canonical LR

Explanation

SLR uses LR(0) item sets plus FOLLOW sets for reductions, making it the simplest of these methods. Canonical LR keeps full item-specific lookaheads and handles a strictly larger grammar class than SLR or LALR. Thus C gives the requested pair.

More Parsing and Syntax Analysis questions

All Parsing and Syntax Analysis questions →