X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/e141f4d4bb6584bfbf13003047a2e48e9a6eab6a..b55b68608ff93cede27113663c6c0b0c82539ebc:/data/bison.m4 diff --git a/data/bison.m4 b/data/bison.m4 index 5a5df0f3..bbf90aae 100644 --- a/data/bison.m4 +++ b/data/bison.m4 @@ -1,7 +1,8 @@ -*- Autoconf -*- # Language-independent M4 Macros for Bison. -# Copyright (C) 2002, 2004-2010 Free Software Foundation, Inc. + +# Copyright (C) 2002, 2004-2011 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 @@ -563,10 +564,11 @@ m4_define([b4_percent_define_use], [m4_define([b4_percent_define_bison_variables(]$1[)])dnl ]) -# b4_percent_define_get(VARIABLE) -# ------------------------------- -# Mimic muscle_percent_define_get in ../src/muscle-tab.h exactly. That is, if -# the %define variable VARIABLE is defined, emit its value. Also, record +# b4_percent_define_get(VARIABLE, [DEFAULT]) +# ------------------------------------------ +# Mimic muscle_percent_define_get in ../src/muscle-tab.h. That is, if +# the %define variable VARIABLE is defined, emit its value. Contrary +# to its C counterpart, return DEFAULT otherwise. Also, record # Bison's usage of VARIABLE by defining # b4_percent_define_bison_variables(VARIABLE). # @@ -575,7 +577,9 @@ m4_define([b4_percent_define_use], # b4_percent_define_get([[foo]]) m4_define([b4_percent_define_get], [b4_percent_define_use([$1])dnl -m4_ifdef([b4_percent_define(]$1[)], [m4_indir([b4_percent_define(]$1[)])])]) +m4_ifdef([b4_percent_define(]$1[)], + [m4_indir([b4_percent_define(]$1[)])], + [$2])]) # b4_percent_define_get_loc(VARIABLE) # -----------------------------------