Skip to content
GATEiit

GATE CSE 2022 Q13: True statement about LALR/LR(1) parsers and compiler phases

Question

Which one of the following statements is TRUE?

Try it: multiple choice: exactly one correct option

Select one option
Wrong answer costs 1/3 mark in GATE.
Show answer and explanation

Answer: D (official GATE 2022 final answer key)

Concept used: LALR(1) merges LR(1) states with equal cores, which can create new reduce-reduce conflicts; every DCFL has an LR(1) grammar.

First step: Recall that merging LR(1) states with the same core can only add reduce-reduce conflicts, then check what LR(1) can parse.

Full step-by-step solution

Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.

Share this question

WhatsAppDownload image

Source: official GATE 2022 CS question paper and final answer key, organised by IIT Kharagpur. Question paper · Answer key