GATE CSE 2022 Q13: True statement about LALR/LR(1) parsers and compiler phases
- Compiler Design
- 1 mark
- MCQ
- −1/3 if wrong
Question
Which one of the following statements is TRUE?
Try it: multiple choice: exactly one correct 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
Source: official GATE 2022 CS question paper and final answer key, organised by IIT Kharagpur. Question paper · Answer key
More Compiler Design PYQs
- 2026 Session 1 · Q27Classify errors in three C string declarations
- 2026 Session 1 · Q28True statements about LL(1) parsing
- 2026 Session 1 · Q42Redundant (common) subexpressions in blocks B4 and B5 of a CFG
- 2026 Session 1 · Q53Compare two SDDs for type declarations
- 2026 Session 2 · Q35Count tokens produced by a lexer for a given string
- 2026 Session 2 · Q41Shift-reduce conflicts in the LR(0) table of a grammar