-*- 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
# 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.
#
[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]"]])[
-]])])])
+ [[[[<skeleton default value>:-1.-1]],
+ [[<skeleton default value>:-1.-1]]]])dnl
+ m4_define([b4_percent_define_syncline(]$1[)], [[]])])])
# b4_percent_define_check_values(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])])])
[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]])
])