The Gateway to Computer Science Excellence
+5 votes

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

  1. Leftmost
  2. Leftmost in reverse
  3. Rightmost
  4. Rightmost in reverse
in Compiler Design by Veteran (434k points)
edited by | 3k views
D is the correct answer.
D. produces a rightmost derivation in reverse
Isn't LR leftmost in reverse?

No. 'L' for left-to-right scan and 'R' for rightmost derivation.

2 Answers

+19 votes
Best answer

A bottom-up parser traces a rightmost derivation in reverse. Answer (D).

by Veteran (61k points)
edited by
0 votes

LR parser are type of bottom up parser and LR(Left-to-right, Rightmost derivation in reverse)  uses rightmost in reverse.

by Junior (547 points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,833 questions
57,742 answers
108,054 users