]> git.saurik.com Git - bison.git/blobdiff - tests/calc.at
tests: remove useless location initializations
[bison.git] / tests / calc.at
index a1c11e5f561073b02e7d342d88b364e93554d7a0..d912832f0ee87f9245f95049d0a6aa2638fc442f 100644 (file)
@@ -280,25 +280,10 @@ AT_SKEL_CC_IF(
 FILE *input;
 static int power (int base, int exponent);
 
-]AT_SKEL_CC_IF(,
-[static void yyerror (AT_YYERROR_ARG_LOC_IF([AT_YYLTYPE *llocp, ])
-                     AT_PARAM_IF([semantic_value *result, int *count, ])
-                     const char *s
-                     );])[
+]AT_YYERROR_DECLARE[
 ]AT_YYLEX_DECLARE_EXTERN[
 }
 
-]AT_SKEL_CC_IF([AT_LOCATION_TYPE_IF([], [[
-/* The lalr1.cc skeleton, for backward compatibility, defines
-   a constructor for position that initializes the filename.  The
-   glr.cc skeleton does not (and in fact cannot: location/position
-   are stored in a union, from which objects with constructors are
-   excluded in C++). */
-%initial-action {
-  @$.initialize ();
-}
-]])])[
-
 /* Bison Declarations */
 %token CALC_EOF 0 "end of input"
 %token <ival> NUM "number"
@@ -365,27 +350,8 @@ power (int base, int exponent)
       o << '-' << s.last.c - 1;
     return o;
   }
-]])
-AT_YYERROR_DEFINE],
-[/* A C error reporting function.  */
-static void
-yyerror (AT_YYERROR_ARG_LOC_IF([AT_YYLTYPE *llocp, ])
-         AT_PARAM_IF([semantic_value *result, int *count, ])
-         const char *s)
-{
-AT_PARAM_IF([(void) result; (void) count;])
-AT_YYERROR_SEES_LOC_IF([
-  fprintf (stderr, "%d.%d",
-           AT_LOC_FIRST_LINE, AT_LOC_FIRST_COLUMN);
-  if (AT_LOC_FIRST_LINE != AT_LOC_LAST_LINE)
-    fprintf (stderr, "-%d.%d",
-             AT_LOC_LAST_LINE,  AT_LOC_LAST_COLUMN - 1);
-  else if (AT_LOC_FIRST_COLUMN != AT_LOC_LAST_COLUMN - 1)
-    fprintf (stderr, "-%d",
-             AT_LOC_LAST_COLUMN - 1);
-  fprintf (stderr, ": ");])
-  fprintf (stderr, "%s\n", s);
-}])[
+]])])[
+]AT_YYERROR_DEFINE[
 ]AT_DEFINES_IF([],
 [AT_CALC_LEX
 AT_CALC_MAIN])])
@@ -503,7 +469,7 @@ AT_CHECK([cat stderr], 0, [expout])
 # Make sure we did not introduce bad spaces.  Checked here because all
 # the skeletons are (or should be) exercized here.
 m4_define([AT_CHECK_SPACES],
-[AT_CHECK([perl -ne '
+[AT_CHECK([$PERL -ne '
   chomp;
   print "$.: {$_}\n"
     if (# No starting/ending empty lines.