Holooly Plus Logo

Question 14.4.5: Give the definition of the shift/reduce and shift/shift conf......

Give the definition of the shift/reduce and shift/shift conflicts in the LR(1)-case.

Step-by-Step
The 'Blue Check Mark' means that this solution was answered by an expert.
Learn more on how do we answer questions.

Assume that a grammar is fixed. Let S be an arbitrary string of terminals and nonterminals. If the set State(S) contains a situation where the underscore sign is followed by a terminal t, we say that the pair (S, t) allows a shift. (This definition is the same as in the SLR(1)-case; we ignore the second components of pairs in State(S).)

If State(S) contains a situation whose first component ends with the underscore sign and the second component is a terminal t, we say that the pair (S, t) LR(1)-allows a reduction (via the corresponding rule). We say that there is a LR(1)-conflictof type shift/reduce for a pair (S, t) if this pair allows both shift and reduction. We say that there is a LR(1)-conflict of type reduce~reduce for a pair (S, t) if this pair allows reductions according to different rules.

Related Answered Questions

Question: 14.4.7

Verified Answer:

Assume that a grammar is fixed. The string S of te...
Question: 14.4.6

Verified Answer:

As before, at each stage of the LR-process we can ...
Question: 14.4.4

Verified Answer:

(1) If a string S is coherent with a situation [K ...
Question: 14.4.3

Verified Answer:

The string S (of terminals and nonterminals) is co...
Question: 14.4.2

Verified Answer:

Now a situation is defined as a pair [situation in...
Question: 14.3.3

Verified Answer:

Yes; both conflicts that prevent it from being a L...
Question: 14.4.1

Verified Answer:

Nonterminals are symbols (LeftK t) for any nonterm...
Question: 14.2.3

Verified Answer:

Yes, see the corresponding tables (a) and (b) (no ...