GATE 2019 CS – Question 13
Compiler Design · Parsing and Syntax Analysis · 1 mark · Multiple choice
Which one of the following kinds of derivation is used by LR parsers?
- Leftmost
- Leftmost in reverse
- Rightmost
- Rightmost in reverse
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (D) Rightmost in reverse
Explanation
An LR parser scans the input left to right and constructs a rightmost derivation in reverse, reducing handles.
More Parsing and Syntax Analysis questions
- GATE 2019 CS Q29 – Consider the grammar given below: S → Aa A → BD B → b ε D → d ε Let a, b, d, and 36 be…
- GATE 2019 CS Q53 – Consider the augmented grammar given below: S' → S S → ⟨L⟩ id L → L,S S Let I…
- GATE 2018 CS Q48 – Consider the following parse tree for the expression a\#b36c36d\#e\#f, involving two…
- GATE 2015 CS (CS1) Q18 – Which one of the following is TRUE at any valid state in shift-reduce parsing?
- GATE 2016 CS (CS1) Q55 – The attributes of three arithmetic operators in some programming language are given below.…
- GATE 2017 CS (CS1) Q27 – Consider the following grammar: P xQRS Q yz z R w S y What is FOLLOW(Q)?
All Parsing and Syntax Analysis questions →