mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
List accepted values for a %define enum variable with an invalid value.
Suggested by Akim Demaille at
<http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
* data/bison.m4 (_b4_percent_define_check_values): Implement.
* src/muscle-tab.c (muscle_percent_define_check_values): Implement.
* tests/input.at (%define lr.default_reductions invalid values): Merge
into...
(%define enum variables): ... here, and update output.
(cherry picked from commit 25029e164a)
This commit is contained in:
@@ -724,7 +724,11 @@ m4_define([_b4_percent_define_check_values],
|
||||
[b4_complain_at(b4_percent_define_get_loc([$1]),
|
||||
[[invalid value for %%define variable `%s': `%s']],
|
||||
[$1],
|
||||
m4_dquote(m4_indir([b4_percent_define(]$1[)])))])dnl
|
||||
m4_dquote(m4_indir([b4_percent_define(]$1[)])))
|
||||
m4_foreach([b4_value], m4_dquote(m4_shift($@)),
|
||||
[b4_complain_at(b4_percent_define_get_loc([$1]),
|
||||
[[accepted value: `%s']],
|
||||
m4_dquote(b4_value))])])dnl
|
||||
m4_popdef([b4_good_value])],
|
||||
[b4_fatal([[undefined %%define variable `%s' passed to b4_percent_define_check_values]], [$1])])])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user