The GATE Grind

GATE 2008 CS – Question 55

Compiler Design · Parsing and Syntax Analysis · 2 marks · Multiple choice

An LALR(1) parser for grammar G can have shift-reduce conflicts if and only if

  1. SLR(1) for G has shift-reduce conflicts.
  2. LR(1) for G has shift-reduce conflicts.
  3. LR(0) for G has shift-reduce conflicts.
  4. LALR(1) for G has reduce-reduce conflicts.

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (B) LR(1) for G has shift-reduce conflicts.

Explanation

We are sorry we couldn't write detailed soluition for this, we are working on it!, please consider asking your own AI, its just 2-3 clicks with very minimum effort

More Parsing and Syntax Analysis questions

All Parsing and Syntax Analysis questions →