The dragon book says:

An ambiguous grammar can never be LR.

And then right away, he says:

For example, consider the pending grammar-else:

$ begin {align} stmt rightarrow & textbf {if} expr textbf {then} stmt \

& | textbf {if} expr textbf {then} stmt textbf {else} stmt \

& | textbf {other} end {align} $If we have an offset reduce the analyzer in configuration

$$

begin {matrix}

STACKING & ENTRY \

… textbf {if} expr textbf {then} stmt & textbf {else …}

end {matrix}

$$we can not say if $ textbf {if} expr textbf {then} stmt $ is the handle, no matter what appears below the pile. Here, there is a gap that reduces conflict. According to the following $ textbf {else} $** on the entry, it might be ok to reduce $ textbf {if} expr textbf {then} stmt $, or it might be ok to pass $ textbf {else} $ and then look for another $ stmt $

to complete the alternative $ textbf {if} expr textbf {then} stmt textbf {else} stmt $.

My question is quite simple. The author starts by saying facts about "ambiguous" grammar, then he gives an example of a problem with the same prefix of the right sides of two productions (for example, the non-deterministic grammar), but without any relation with the Ambiguity of the grammar.

Am I right? Also what does it mean? LR grammar can not work with both: non-deterministic and ambiguous grammars?