Skip to content
GATEiit

GATE CSE 2019 Q13: Kind of derivation used by LR parsers

Syllabus topic: Lexical analysis, parsing and syntax-directed translation

Question

Which one of the following kinds of derivation is used by LR parsers?

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 2019 final answer key)

Concept used: Bottom-up (LR) parsing performs reductions that trace a rightmost derivation backwards.

Concept notes

Loading notes…

First step: Recall that LR parsers are bottom-up shift-reduce parsers and ask which derivation their sequence of reductions reverses.

Full step-by-step solution

Loading…

Answer from the official final answer key. Found a mistake? Use Report issue and we will fix it.

More questions on Lexical analysis, parsing and syntax-directed translation

Every PYQ on this topic →

Share this question

WhatsAppDownload image

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