# --------------------------------
# `YYUSE' VAL, LOC if locations are enabled, and all the parse-params.
m4_define([b4_parse_param_use],
-[m4_ifval([$1], [ YYUSE([$1]);
-])dnl
-m4_ifval([$2], [b4_locations_if([ YYUSE ([$2]);
-])])dnl
+[m4_ifvaln([$1], [ YYUSE([$1]);])dnl
+b4_locations_if([m4_ifvaln([$2], [ YYUSE ([$2]);])])dnl
b4_parse_param_for([Decl], [Formal], [ YYUSE (Formal);
])dnl
])
[[YYID (0)]],
[[((]$2[) == (]$3[))]])])
+
## ---------##
## Values. ##
## ---------##
-# b4_null
----------
-# Return a null pointer constant. NULL infringes on the user name
-# space in C, so use 0 rather than NULL.
-m4_define([b4_null], [0])
+# b4_null_define
+# --------------
+# Portability issues: define a YY_NULL appropriate for the current
+# language (C, C++98, or C++11).
+m4_define([b4_null_define],
+[# ifndef YY_NULL
+# if defined __cplusplus && 201103L <= __cplusplus
+# define YY_NULL nullptr
+# else
+# define YY_NULL 0
+# endif
+# endif[]dnl
+])
+
+
+# b4_null
+# -------
+# Return a null pointer constant.
+m4_define([b4_null], [YY_NULL])
# b4_integral_parser_table_define(TABLE-NAME, CONTENT, COMMENT)
# -------------------------------------------------------------
# Define "yy<TABLE-NAME>" which contents is CONTENT.
m4_define([b4_integral_parser_table_define],
-[m4_ifval([$3], [b4_c_comment([$3], [ ])
-])dnl
+[m4_ifvaln([$3], [b4_c_comment([$3], [ ])])dnl
static const b4_int_type_for([$2]) yy$1[[]] =
{
$2
b4_locations_if( [, [[YYLTYPE *yylocationp], [yylocationp]]])[]dnl
m4_ifset([b4_parse_param], [, b4_parse_param]))[
{
-]b4_parse_param_use([yyvaluep], [yylocationp])[
- if (!yymsg)
+]b4_parse_param_use([yyvaluep], [yylocationp])dnl
+[ if (!yymsg)
yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
b4_locations_if([, [[YYLTYPE const * const yylocationp], [yylocationp]]])[]dnl
m4_ifset([b4_parse_param], [, b4_parse_param]))[
{
-]b4_parse_param_use([yyoutput], [yylocationp])[
- if (!yyvaluep)
+]b4_parse_param_use([yyoutput], [yylocationp])dnl
+[ if (!yyvaluep)
return;]
dnl glr.c does not feature yytoknum.
m4_if(b4_skeleton, ["yacc.c"],