edited by
25,748 views
44 votes
44 votes

A canonical set of items is given below

  • $S \to L .> R $
  • $Q \to R.$

On input symbol $<$ the set has

  1. a shift-reduce conflict and a reduce-reduce conflict.
  2. a shift-reduce conflict but not a reduce-reduce conflict.
  3. a reduce-reduce conflict but not a shift-reduce conflict.
  4. neither a shift-reduce nor a reduce-reduce conflict.
edited by

7 Answers

Best answer
48 votes
48 votes

The question is asked with respect to the symbol  ' $<$ '  which is not present in the given canonical set of items. Hence it is neither a shift-reduce conflict nor a reduce-reduce conflict on symbol '$<$'. Hence D is the correct option. But if the question would have asked with respect to the symbol  ' $>$ '  then it would have been a shift-reduce conflict.

edited by
25 votes
25 votes

Ans : The given input symbol no where in the given grammar so with given symbol we have neither a shift-reduce nor a reduce-reduce conflict. So, correct answer is (D.) ...

edited by
1 votes
1 votes
The input symbol is “<” which is not in canonical set of item, so it is neither a shift-reduce nor a reduce-reduce conflict with reference to “<” symbol.
But if it would have asked about “>” then it will be a SR conflict.
Answer:

Related questions

12.1k
views
1 answers
32 votes
go_editor asked Sep 26, 2014
12,149 views
Which one of the following is FALSE?A basic block is a sequence of instructions where control enters the sequence at the beginning and exits at the end. ... $x=4*5 \Rightarrow x=20$ is an example of common subexpression elimination.
19.5k
views
2 answers
53 votes
makhdoom ghaya asked Feb 12, 2015
19,466 views
Which one of the following is TRUE at any valid state in shift-reduce parsing?Viable prefixes appear only at the bottom of the stack and not ... insideThe stack contains only a set of viable prefixesThe stack never contains viable prefixes
1.1k
views
2 answers
1 votes
gaurav456 asked Jan 1, 2018
1,096 views
A canonical set of items is given belowS→L.>RQ→R.On input symbol > the set has(a).a shift-reduce conflict and a reduce-reduce conflict.(b).a shift-reduce ... a shift-reduce conflict.(d).neither a shift-reduce nor a reduce-reduce conflict.
8.8k
views
2 answers
29 votes
go_editor asked Feb 14, 2015
8,779 views
Among simple LR (SLR), canonical LR, and look-ahead LR (LALR), which of the following pairs identify the method that is very easy to implement and ... powerful, in that order?SLR, LALRCanonical LR, LALRSLR, canonical LRLALR, canonical LR