mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
Complain about unused %define variables and %code qualifiers.
* NEWS (2.5): Document. * data/bison.m4 (b4_check_user_names): Complain instead of warn. * doc/bison.texinfo (Decl Summary): Document complaint, and improve %define documentation a little otherwise. * tests/input.at (Reject unused %code qualifiers): Update. (%define errors): Update. (%define, --define, --force-define): Update. (%define backward compatibility): Update. (Unused %define api.pure): Update. * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
This commit is contained in:
@@ -4763,7 +4763,9 @@ use this form instead.
|
||||
|
||||
@var{qualifier} identifies the purpose of @var{code} and thus the location(s)
|
||||
where Bison should generate it.
|
||||
Not all values of @var{qualifier} are available for all target languages:
|
||||
Not all @var{qualifier}s are accepted for all target languages.
|
||||
Unaccepted @var{qualifier}s produce an error.
|
||||
Some of the accepted @var{qualifier}s are:
|
||||
|
||||
@itemize @bullet
|
||||
@item requires
|
||||
@@ -4845,9 +4847,6 @@ parse.trace}.
|
||||
@deffnx {Directive} %define @var{variable} @var{value}
|
||||
@deffnx {Directive} %define @var{variable} "@var{value}"
|
||||
Define a variable to adjust Bison's behavior.
|
||||
The possible choices for @var{variable}, as well as their meanings, depend on
|
||||
the selected target language and/or the parser skeleton (@pxref{Decl
|
||||
Summary,,%language}, @pxref{Decl Summary,,%skeleton}).
|
||||
|
||||
It is an error if a @var{variable} is defined by @code{%define} multiple
|
||||
times, but see @ref{Bison Options,,-D @var{name}[=@var{value}]}.
|
||||
@@ -4859,7 +4858,7 @@ digit.
|
||||
Omitting @code{"@var{value}"} entirely is always equivalent to specifying
|
||||
@code{""}.
|
||||
|
||||
Some @var{variable}s may be used as Booleans.
|
||||
Some @var{variable}s take Boolean values.
|
||||
In this case, Bison will complain if the variable definition does not meet one
|
||||
of the following four conditions:
|
||||
|
||||
@@ -4872,10 +4871,14 @@ This is equivalent to @code{true}.
|
||||
@item @code{@var{value}} is @code{false}.
|
||||
|
||||
@item @var{variable} is never defined.
|
||||
In this case, Bison selects a default value, which may depend on the selected
|
||||
target language and/or parser skeleton.
|
||||
In this case, Bison selects a default value.
|
||||
@end enumerate
|
||||
|
||||
What @var{variable}s are accepted, as well as their meanings and default
|
||||
values, depend on the selected target language and/or the parser
|
||||
skeleton (@pxref{Decl Summary,,%language}, @pxref{Decl
|
||||
Summary,,%skeleton}).
|
||||
Unaccepted @var{variable}s produce an error.
|
||||
Some of the accepted @var{variable}s are:
|
||||
|
||||
@table @code
|
||||
|
||||
Reference in New Issue
Block a user