The Gateway to Computer Science Excellence
+4 votes
2.4k 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
in Compiler Design by Veteran (423k points)
edited by | 2.4k views
0
D is the correct answer.
+2
D. produces a rightmost derivation in reverse
0
Isn't LR leftmost in reverse?
+4

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

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

2 Answers

+17 votes
Best answer

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

by Veteran (60.4k 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

by (487 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,650 questions
56,228 answers
194,225 comments
95,678 users