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.
(cherry picked from commit c6abeab182)

Conflicts:

	ChangeLog
This commit is contained in:
Joel E. Denny
2009-09-03 16:04:10 -04:00
parent c842365a01
commit 628be6c97d
6 changed files with 82 additions and 60 deletions

View File

@@ -4755,7 +4755,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
@@ -4837,9 +4839,6 @@ already defined, so that the debugging facilities are compiled.
@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}]}.
@@ -4851,7 +4850,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:
@@ -4864,10 +4863,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:
@itemize @bullet