]> git.saurik.com Git - bison.git/blobdiff - tests/local.at
2006-10-16 Paolo Bonzini <bonzini@gnu.org>
[bison.git] / tests / local.at
index daace07cc37b009ce2a5ab8daba8cf5dbd3f9288..b9cace013875abab3828660b27c2a63f546470af 100644 (file)
@@ -63,7 +63,10 @@ m4_pushdef([AT_PURE_AND_LOC_IF],
           [$1], [$2])])
 m4_pushdef([AT_GLR_OR_PARAM_IF],
 [m4_bmatch([$3], [%glr-parser\|%parse-param], [$1], [$2])])
-
+m4_pushdef([AT_NAME_PREFIX],
+[m4_bmatch([$3], [%name-prefix=".*"],
+           [m4_bregexp([$3], [name-prefix="\([^"]*\)"], [\1])],
+           [yy])])
 # yyerror receives the location if %location & %pure & (%glr or %parse-param).
 m4_pushdef([AT_YYERROR_ARG_LOC_IF],
 [AT_GLR_OR_PARAM_IF([AT_PURE_AND_LOC_IF([$1], [$2])],
@@ -80,7 +83,7 @@ m4_pushdef([AT_YYERROR_SEES_LOC_IF],
 # are using the C++ parsers.
 m4_pushdef([AT_PURE_LEX_IF],
 [AT_PURE_IF([$1],
-           [AT_LALR1_CC_IF([$1], [$2])])])
+           [AT_SKEL_CC_IF([$1], [$2])])])
 
 AT_PURE_LEX_IF(
 [m4_pushdef([AT_LOC], [(*llocp)])
@@ -120,6 +123,7 @@ m4_popdef([AT_LOC])
 m4_popdef([AT_PURE_LEX_IF])
 m4_popdef([AT_YYERROR_SEES_LOC_IF])
 m4_popdef([AT_YYERROR_ARG_LOC_IF])
+m4_popdef([AT_NAME_PREFIX])
 m4_popdef([AT_GLR_OR_PARAM_IF])
 m4_popdef([AT_PURE_AND_LOC_IF])
 m4_popdef([AT_LOCATION_IF])
@@ -144,13 +148,11 @@ m4_popdef([AT_LALR1_CC_IF])
 # meant to be compiled.
 m4_define([AT_DATA_GRAMMAR_PROLOGUE],
 [[%{
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-  /* We don't need perfect functions for these tests. */
-# undef malloc
-# undef memcmp
-# undef realloc
-#endif
+#include <config.h>
+/* We don't need perfect functions for these tests. */
+#undef malloc
+#undef memcmp
+#undef realloc
 %}]
 ])