edited by
24,288 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