]> git.saurik.com Git - bison.git/blobdiff - data/c.m4
tests: remove useless location initialization.
[bison.git] / data / c.m4
index fd2203ebbe595688859f109704fd3425f565c6ca..136b46e105ecb305bdbedb3955cf3711f12e3217 100644 (file)
--- a/data/c.m4
+++ b/data/c.m4
@@ -184,7 +184,7 @@ m4_define([b4_table_value_equals],
 [m4_if(m4_eval($3 < m4_indir([b4_]$1[_min])
                || m4_indir([b4_]$1[_max]) < $3), [1],
        [[YYID (0)]],
-       [[((]$2[) == (]$3[))]])])
+       [(!!(($2) == ($3)))])])
 
 
 ## ---------##
@@ -602,7 +602,7 @@ m4_define([b4_YYDEBUG_define],
 #  endif
 # else /* ! defined YYDEBUG */
 #  define ]b4_api_PREFIX[DEBUG ]b4_debug_flag[
-# endif /* ! defined ]b4_api_PREFIX[DEBUG */
+# endif /* ! defined YYDEBUG */
 #endif  /* ! defined ]b4_api_PREFIX[DEBUG */]])[]dnl
 ])
 
@@ -643,3 +643,19 @@ m4_define([b4_yylloc_default_define],
     while (YYID (0))
 #endif
 ]])
+
+# b4_yyloc_default_define
+# ------------------------
+# Define yyloc_default, which can be used to initialize location
+# variables.
+m4_define([b4_yyloc_default_define],
+[[static YYLTYPE yyloc_default
+# if defined ]b4_api_PREFIX[LTYPE_IS_TRIVIAL && ]b4_api_PREFIX[LTYPE_IS_TRIVIAL
+  = { ]m4_join([, ],
+               m4_defn([b4_location_initial_line]),
+               m4_defn([b4_location_initial_column]),
+               m4_defn([b4_location_initial_line]),
+               m4_defn([b4_location_initial_column]))[ }
+# endif
+  ;]dnl
+])