mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
doc: document the exit status
Suggested by Alexandre Duret-Lutz. https://lists.gnu.org/r/bug-bison/2013-09/msg00015.html * doc/bison.texi (Invocation): Here.
This commit is contained in:
@@ -9645,10 +9645,10 @@ and understand the parser run-time traces (@pxref{Tracing}).
|
|||||||
@node Understanding
|
@node Understanding
|
||||||
@section Understanding Your Parser
|
@section Understanding Your Parser
|
||||||
|
|
||||||
As documented elsewhere (@pxref{Algorithm})
|
As documented elsewhere (@pxref{Algorithm}) Bison parsers are
|
||||||
Bison parsers are @dfn{shift/reduce automata}. In some cases (much more
|
@dfn{shift/reduce automata}. In some cases (much more frequent than one
|
||||||
frequent than one would hope), looking at this automaton is required to
|
would hope), looking at this automaton is required to tune or simply fix a
|
||||||
tune or simply fix a parser.
|
parser.
|
||||||
|
|
||||||
The textual file is generated when the options @option{--report} or
|
The textual file is generated when the options @option{--report} or
|
||||||
@option{--verbose} are specified, see @ref{Invocation}. Its name is made by
|
@option{--verbose} are specified, see @ref{Invocation}. Its name is made by
|
||||||
@@ -10604,6 +10604,26 @@ For compatibility with POSIX, the standard Bison distribution also contains
|
|||||||
a shell script called @command{yacc} that invokes Bison with the @option{-y}
|
a shell script called @command{yacc} that invokes Bison with the @option{-y}
|
||||||
option.
|
option.
|
||||||
|
|
||||||
|
@sp 1
|
||||||
|
|
||||||
|
The exit status of @command{bison} is:
|
||||||
|
@table @asis
|
||||||
|
@item 0 (success)
|
||||||
|
when there were no errors. Warnings, which are diagnostics about dubious
|
||||||
|
constructs, do not change the exit status, unless they are turned into
|
||||||
|
errors (@pxref{-Werror,,@option{-Werror}}).
|
||||||
|
|
||||||
|
@item 1 (failure)
|
||||||
|
when there were errors. No file was generated (except the reports generated
|
||||||
|
by @option{--verbose}, etc.). In particular, the output files that possibly
|
||||||
|
existed were not changed.
|
||||||
|
|
||||||
|
@item 63 (mistmatch)
|
||||||
|
when @command{bison} does not meet the version requirements of the grammar
|
||||||
|
file. @xref{Require Decl}. No file was generated or changed.
|
||||||
|
@end table
|
||||||
|
|
||||||
|
|
||||||
@menu
|
@menu
|
||||||
* Bison Options:: All the options described in detail,
|
* Bison Options:: All the options described in detail,
|
||||||
in alphabetical order by short options.
|
in alphabetical order by short options.
|
||||||
@@ -10997,6 +11017,7 @@ instance, @option{-Wno-yacc} will hide the warnings about
|
|||||||
POSIX Yacc incompatibilities.
|
POSIX Yacc incompatibilities.
|
||||||
|
|
||||||
@item -Werror
|
@item -Werror
|
||||||
|
@anchor{-Werror}
|
||||||
Turn enabled warnings for every @var{category} into errors, unless they are
|
Turn enabled warnings for every @var{category} into errors, unless they are
|
||||||
explicitly disabled by @option{-Wno-error=@var{category}}.
|
explicitly disabled by @option{-Wno-error=@var{category}}.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user