in Compiler Design retagged by
9,464 views
13 votes
13 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 retagged by
by
9.5k views

4 Comments

D is the correct answer.
0
0
D. produces a rightmost derivation in reverse
2
2
Isn't LR leftmost in reverse?
0
0

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

https://gateoverflow.in/299818/go-compiler1-parsing-6

9
9

4 Answers

28 votes
28 votes
Best answer

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

edited by
5 votes
5 votes

Bottom Up parser – Rightmost derivation in reverse

Top Down parser – Leftmost Derivation 

0 votes
0 votes

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

https://en.wikipedia.org/wiki/LR_parser

0 votes
0 votes
LR parsers have Rightmost derivation in reverse.
Answer:

Related questions