The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+3 votes
2.2k views

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
asked in Compiler Design by Veteran (405k points)
edited by | 2.2k views
0
D is the correct answer.
+2
D. produces a rightmost derivation in reverse
0
Isn't LR leftmost in reverse?
+3

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

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

2 Answers

+14 votes
Best answer

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

answered by Veteran (59.7k 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.

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

answered by (433 points)
Answer:

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
49,541 questions
54,080 answers
187,200 comments
70,990 users