doc: fix -W and %expect documentation some.

* NEWS (2.4.3): Mention that there are documentation fixes.
* doc/bison.texinfo (Expect Decl): Make it clear that %expect
turns conflicts into errors not warnings.
(Shift/Reduce): Likewise.
(Bison Options): Don't mention -Wsyntax.  It doesn't exist.
(cherry picked from commit 3ffdd5f125)
This commit is contained in:
Joel E. Denny
2010-08-04 20:17:40 -04:00
parent 4631c34fb7
commit cf22447c62
3 changed files with 19 additions and 6 deletions

View File

@@ -1,3 +1,12 @@
2010-08-04 Joel E. Denny <joeldenny@joeldenny.org>
doc: fix -W and %expect documentation some.
* NEWS (2.4.3): Mention that there are documentation fixes.
* doc/bison.texinfo (Expect Decl): Make it clear that %expect
turns conflicts into errors not warnings.
(Shift/Reduce): Likewise.
(Bison Options): Don't mention -Wsyntax. It doesn't exist.
2010-08-01 Joel E. Denny <joeldenny@joeldenny.org> 2010-08-01 Joel E. Denny <joeldenny@joeldenny.org>
-Werror: fix for rules useless in parser after conflicts. -Werror: fix for rules useless in parser after conflicts.

2
NEWS
View File

@@ -240,6 +240,8 @@ Bison News
errors in Bison 2.5. They will remain warnings, which should be errors in Bison 2.5. They will remain warnings, which should be
sufficient for POSIX while avoiding backward compatibility issues. sufficient for POSIX while avoiding backward compatibility issues.
** Minor documentation fixes.
* Changes in version 2.4.2 (2010-03-20): * Changes in version 2.4.2 (2010-03-20):
** Some portability problems that resulted in failures and livelocks ** Some portability problems that resulted in failures and livelocks

View File

@@ -4615,8 +4615,8 @@ number which Bison printed. With @acronym{GLR} parsers, add an
@code{%expect-rr} declaration as well. @code{%expect-rr} declaration as well.
@end itemize @end itemize
Now Bison will warn you if you introduce an unexpected conflict, but Now Bison will report an error if you introduce an unexpected conflict,
will keep silent otherwise. but will keep silent otherwise.
@node Start Decl @node Start Decl
@subsection The Start-Symbol @subsection The Start-Symbol
@@ -6451,8 +6451,10 @@ This particular ambiguity was first encountered in the specifications of
Algol 60 and is called the ``dangling @code{else}'' ambiguity. Algol 60 and is called the ``dangling @code{else}'' ambiguity.
To avoid warnings from Bison about predictable, legitimate shift/reduce To avoid warnings from Bison about predictable, legitimate shift/reduce
conflicts, use the @code{%expect @var{n}} declaration. There will be no conflicts, use the @code{%expect @var{n}} declaration.
warning as long as the number of shift/reduce conflicts is exactly @var{n}. There will be no warning as long as the number of shift/reduce conflicts
is exactly @var{n}, and Bison will report an error if there is a
different number.
@xref{Expect Decl, ,Suppressing Conflict Warnings}. @xref{Expect Decl, ,Suppressing Conflict Warnings}.
The definition of @code{if_stmt} above is solely to blame for the The definition of @code{if_stmt} above is solely to blame for the
@@ -8101,8 +8103,8 @@ Treat warnings as errors.
@end table @end table
A category can be turned off by prefixing its name with @samp{no-}. For A category can be turned off by prefixing its name with @samp{no-}. For
instance, @option{-Wno-syntax} will hide the warnings about unused instance, @option{-Wno-yacc} will hide the warnings about
variables. @acronym{POSIX} Yacc incompatibilities.
@end table @end table
@noindent @noindent