X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/42ee26bb96ea939c40c1c922ba404456e718b823..2de160e12ea0b0313a3a4f2120b30a3eeaad0c76:/data/bison.m4 diff --git a/data/bison.m4 b/data/bison.m4 index 8c210e8d..585fb1d0 100644 --- a/data/bison.m4 +++ b/data/bison.m4 @@ -1,8 +1,8 @@ -*- Autoconf -*- # Language-independent M4 Macros for Bison. -# Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, -# Inc. +# Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software +# Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -317,8 +317,8 @@ b4_define_user_code([stype]) # but is not used by Bison (as recorded by macros in the namespace # BISON-NAMESPACE). # -# USER-LIST must expand to a list specifying all grammar occurrences of all -# names of type WHAT. Each item in the list must be a triplet specifying one +# USER-LIST must expand to a list specifying all user occurrences of all names +# of type WHAT. Each item in the list must be a triplet specifying one # occurrence: name, start boundary, and end boundary. Empty string names are # fine. An empty list is fine. # @@ -464,10 +464,9 @@ m4_define([b4_percent_define_default], [m4_ifndef([b4_percent_define(]$1[)], [m4_define([b4_percent_define(]$1[)], [$2])dnl m4_define([b4_percent_define_loc(]$1[)], - [[[[[Bison:b4_percent_define_default]:1.0]], [[[Bison:b4_percent_define_default]:1.0]]]])dnl - m4_define([b4_percent_define_syncline(]$1[)], - [[]b4_syncline(1, [["[Bison:b4_percent_define_default]"]])[ -]])])]) + [[[[:-1.-1]], + [[:-1.-1]]]])dnl + m4_define([b4_percent_define_syncline(]$1[)], [[]])])]) # b4_percent_define_check_values(VALUES) # -------------------------------------- @@ -500,7 +499,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])])]) @@ -550,7 +553,7 @@ m4_define([b4_check_user_names_wrap], [b4_percent_]$1[_user_]$2[s], [[b4_percent_]$1[_bison_]$2[s]])])]) -m4_wrap([ +m4_wrap_lifo([ b4_check_user_names_wrap([[define]], [[variable]]) b4_check_user_names_wrap([[code]], [[qualifier]]) ])