]> git.saurik.com Git - bison.git/blobdiff - data/glr.c
maint: fix an erroneous include
[bison.git] / data / glr.c
index c4b394a26f7de4341c72e81c9d42c447f4a6046c..97efe894bc9fc9f976d9e90f8823aefa43d34bec 100644 (file)
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-m4_include(b4_pkgdatadir/[c.m4])
+# If we are loaded by glr.cc, do not override c++.m4 definitions by
+# those of c.m4.
+m4_if(b4_skeleton, ["glr.c"],
+      [m4_include(b4_pkgdatadir/[c.m4])])
 
 ## ---------------- ##
 ## Default values.  ##
@@ -494,7 +497,6 @@ static const ]b4_int_type_for([b4_stos])[ yystos[] =
 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
 #endif
 
-
 /* YYLEX -- calling `yylex' with the right arguments.  */
 #define YYLEX ]b4_c_function_call([yylex], [int], b4_lex_param)[
 
@@ -2300,12 +2302,10 @@ yyrecoverSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
 #endif
 ])
 m4_ifdef([b4_initial_action], [
-m4_pushdef([b4_at_dollar],     [yylloc])dnl
-m4_pushdef([b4_dollar_dollar], [yylval])dnl
-  /* User initialization code.  */
-  b4_user_initial_action
-m4_popdef([b4_dollar_dollar])dnl
-m4_popdef([b4_at_dollar])])dnl
+b4_dollar_pushdef([yylval], [], [yylloc])dnl
+/* User initialization code.  */
+b4_user_initial_action
+b4_dollar_popdef])[]dnl
 [
   if (! yyinitGLRStack (yystackp, YYINITDEPTH))
     goto yyexhaustedlab;
@@ -2599,9 +2599,7 @@ yypdumpstack (yyGLRStack* yystackp)
   YYFPRINTF (stderr, "\n");
 }
 #endif
-]
-
-b4_epilogue
+]b4_epilogue[]dnl
 dnl
 dnl glr.cc produces its own header.
 dnl
@@ -2614,5 +2612,5 @@ b4_copyright([Skeleton interface for Bison GLR parsers in C],
 ]b4_cpp_guard_open([b4_spec_defines_file])[
 ]b4_shared_declarations[
 ]b4_cpp_guard_close([b4_spec_defines_file])[
-]])])
+]])])dnl
 m4_divert_pop(0)