doc: clean up terminology for mysterious conflicts.

* doc/bison.texinfo (Mystery Conflicts): Rename node to...
(Mysterious Conflicts): ... this, which is already the section
title and the name used in the index.  Update all cross-references
to this node.  Also, don't imply that R/R conflicts are the only
kind of mysterious conflict.
(cherry picked from commit 5da0355aff)
This commit is contained in:
Joel E. Denny
2011-03-06 12:54:35 -05:00
parent 32493bc84d
commit cc09e5beb9
2 changed files with 21 additions and 12 deletions

View File

@@ -1,3 +1,12 @@
2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
doc: clean up terminology for mysterious conflicts.
* doc/bison.texinfo (Mystery Conflicts): Rename node to...
(Mysterious Conflicts): ... this, which is already the section
title and the name used in the index. Update all cross-references
to this node. Also, don't imply that R/R conflicts are the only
kind of mysterious conflict.
2011-03-06 Joel E. Denny <joeldenny@joeldenny.org> 2011-03-06 Joel E. Denny <joeldenny@joeldenny.org>
lr.default-reductions: rename "all" value to "full". lr.default-reductions: rename "all" value to "full".

View File

@@ -265,7 +265,7 @@ The Bison Parser Algorithm
* Contextual Precedence:: When an operator's precedence depends on context. * Contextual Precedence:: When an operator's precedence depends on context.
* Parser States:: The parser is a finite-state-machine with stack. * Parser States:: The parser is a finite-state-machine with stack.
* Reduce/Reduce:: When two rules are applicable in the same situation. * Reduce/Reduce:: When two rules are applicable in the same situation.
* Mystery Conflicts:: Reduce/reduce conflicts that look unjustified. * Mysterious Conflicts:: Conflicts that look unjustified.
* Tuning LR:: How to tune fundamental aspects of LR-based parsing. * Tuning LR:: How to tune fundamental aspects of LR-based parsing.
* Generalized LR Parsing:: Parsing arbitrary context-free grammars. * Generalized LR Parsing:: Parsing arbitrary context-free grammars.
* Memory Management:: What happens when memory is exhausted. How to avoid it. * Memory Management:: What happens when memory is exhausted. How to avoid it.
@@ -490,10 +490,10 @@ are called LR(1) grammars. In brief, in these grammars, it must be possible
to tell how to parse any portion of an input string with just a single token to tell how to parse any portion of an input string with just a single token
of lookahead. For historical reasons, Bison by default is limited by the of lookahead. For historical reasons, Bison by default is limited by the
additional restrictions of LALR(1), which is hard to explain simply. additional restrictions of LALR(1), which is hard to explain simply.
@xref{Mystery Conflicts, ,Mysterious Reduce/Reduce Conflicts}, for more @xref{Mysterious Conflicts}, for more information on this. As an
information on this. As an experimental feature, you can escape these experimental feature, you can escape these additional restrictions by
additional restrictions by requesting IELR(1) or canonical LR(1) parser requesting IELR(1) or canonical LR(1) parser tables. @xref{LR Table
tables. @xref{LR Table Construction}, to learn how. Construction}, to learn how.
@cindex GLR parsing @cindex GLR parsing
@cindex generalized LR (GLR) parsing @cindex generalized LR (GLR) parsing
@@ -6516,7 +6516,7 @@ This kind of parser is known in the literature as a bottom-up parser.
* Contextual Precedence:: When an operator's precedence depends on context. * Contextual Precedence:: When an operator's precedence depends on context.
* Parser States:: The parser is a finite-state-machine with stack. * Parser States:: The parser is a finite-state-machine with stack.
* Reduce/Reduce:: When two rules are applicable in the same situation. * Reduce/Reduce:: When two rules are applicable in the same situation.
* Mystery Conflicts:: Reduce/reduce conflicts that look unjustified. * Mysterious Conflicts:: Conflicts that look unjustified.
* Tuning LR:: How to tune fundamental aspects of LR-based parsing. * Tuning LR:: How to tune fundamental aspects of LR-based parsing.
* Generalized LR Parsing:: Parsing arbitrary context-free grammars. * Generalized LR Parsing:: Parsing arbitrary context-free grammars.
* Memory Management:: What happens when memory is exhausted. How to avoid it. * Memory Management:: What happens when memory is exhausted. How to avoid it.
@@ -7085,8 +7085,8 @@ redirects:redirect
; ;
@end example @end example
@node Mystery Conflicts @node Mysterious Conflicts
@section Mysterious Reduce/Reduce Conflicts @section Mysterious Conflicts
@cindex Mysterious Conflicts @cindex Mysterious Conflicts
Sometimes reduce/reduce conflicts can occur that don't look warranted. Sometimes reduce/reduce conflicts can occur that don't look warranted.
@@ -7242,7 +7242,7 @@ user feedback will help to stabilize them.
For historical reasons, Bison constructs LALR(1) parser tables by default. For historical reasons, Bison constructs LALR(1) parser tables by default.
However, LALR does not possess the full language-recognition power of LR. However, LALR does not possess the full language-recognition power of LR.
As a result, the behavior of parsers employing LALR parser tables is often As a result, the behavior of parsers employing LALR parser tables is often
mysterious. We presented a simple example of this effect in @ref{Mystery mysterious. We presented a simple example of this effect in @ref{Mysterious
Conflicts}. Conflicts}.
As we also demonstrated in that example, the traditional approach to As we also demonstrated in that example, the traditional approach to
@@ -7277,7 +7277,7 @@ grammar file:
%define lr.type ielr %define lr.type ielr
@end example @end example
@noindent For the example in @ref{Mystery Conflicts}, the mysterious @noindent For the example in @ref{Mysterious Conflicts}, the mysterious
conflict is then eliminated, so there is no need to invest time in conflict is then eliminated, so there is no need to invest time in
comprehending the conflict or restructuring the grammar to fix it. If, comprehending the conflict or restructuring the grammar to fix it. If,
during future development, the grammar evolves such that all mysterious during future development, the grammar evolves such that all mysterious
@@ -7622,7 +7622,7 @@ sequence of reductions cannot have deterministic parsers in this sense.
The same is true of languages that require more than one symbol of The same is true of languages that require more than one symbol of
lookahead, since the parser lacks the information necessary to make a lookahead, since the parser lacks the information necessary to make a
decision at the point it must be made in a shift-reduce parser. decision at the point it must be made in a shift-reduce parser.
Finally, as previously mentioned (@pxref{Mystery Conflicts}), Finally, as previously mentioned (@pxref{Mysterious Conflicts}),
there are languages where Bison's default choice of how to there are languages where Bison's default choice of how to
summarize the input seen so far loses necessary information. summarize the input seen so far loses necessary information.
@@ -11619,7 +11619,7 @@ Tokens}.
@item LALR(1) @item LALR(1)
The class of context-free grammars that Bison (like most other parser The class of context-free grammars that Bison (like most other parser
generators) can handle by default; a subset of LR(1). generators) can handle by default; a subset of LR(1).
@xref{Mystery Conflicts, ,Mysterious Reduce/Reduce Conflicts}. @xref{Mysterious Conflicts}.
@item LR(1) @item LR(1)
The class of context-free grammars in which at most one token of The class of context-free grammars in which at most one token of