]> git.saurik.com Git - bison.git/blobdiff - data/yacc.c
* src/output.c (escaped_output): Renamed from
[bison.git] / data / yacc.c
index 5d9b8bd1c128b8ce7d6239aca5f09de6f27bc835..9a778556c28ffaa8cb36be678348e82fbb2c9eb6 100644 (file)
@@ -1,7 +1,8 @@
 m4_divert(-1)                                                       -*- C -*-
 
 # Yacc compatible skeleton for Bison
-# Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004
+
+# Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005
 # Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -226,14 +227,10 @@ b4_syncline([@oline@], [@ofile@])[
 
 # ifdef YYSTACK_USE_ALLOCA
 #  if YYSTACK_USE_ALLOCA
-#   define YYSTACK_ALLOC alloca
-#  endif
-# else
-#  if defined (alloca) || defined (_ALLOCA_H)
-#   define YYSTACK_ALLOC alloca
-#  else
 #   ifdef __GNUC__
 #    define YYSTACK_ALLOC __builtin_alloca
+#   else
+#    define YYSTACK_ALLOC alloca
 #   endif
 #  endif
 # endif
@@ -289,7 +286,7 @@ union yyalloc
 #   define YYCOPY(To, From, Count)             \
       do                                       \
        {                                       \
-         register YYSIZE_T yyi;                \
+         YYSIZE_T yyi;                         \
          for (yyi = 0; yyi < (Count); yyi++)   \
            (To)[yyi] = (From)[yyi];            \
        }                                       \
@@ -515,17 +512,17 @@ while (0)
     do                                                                 \
       if (N)                                                           \
        {                                                               \
-         (Current).first_line   = YYRHSLOC(Rhs, 1).first_line;         \
-         (Current).first_column = YYRHSLOC(Rhs, 1).first_column;       \
-         (Current).last_line    = YYRHSLOC(Rhs, N).last_line;          \
-         (Current).last_column  = YYRHSLOC(Rhs, N).last_column;        \
+         (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
+         (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
+         (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
+         (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
        }                                                               \
       else                                                             \
        {                                                               \
          (Current).first_line   = (Current).last_line   =              \
-           YYRHSLOC(Rhs, 0).last_line;                                 \
+           YYRHSLOC (Rhs, 0).last_line;                                \
          (Current).first_column = (Current).last_column =              \
-           YYRHSLOC(Rhs, 0).last_column;                               \
+           YYRHSLOC (Rhs, 0).last_column;                              \
        }                                                               \
     while (0)
 #endif
@@ -648,10 +645,6 @@ int yydebug;
    SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
    evaluated with infinite-precision integer arithmetic.  */
 
-#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0
-# undef YYMAXDEPTH
-#endif
-
 #ifndef YYMAXDEPTH
 # define YYMAXDEPTH ]b4_stack_depth_max[
 #endif
@@ -673,7 +666,7 @@ yystrlen (yystr)
      const char *yystr;
 #   endif
 {
-  register const char *yys = yystr;
+  const char *yys = yystr;
 
   while (*yys++ != '\0')
     continue;
@@ -698,8 +691,8 @@ yystpcpy (yydest, yysrc)
      const char *yysrc;
 #   endif
 {
-  register char *yyd = yydest;
-  register const char *yys = yysrc;
+  char *yyd = yydest;
+  const char *yys = yysrc;
 
   while ((*yyd++ = *yys++) != '\0')
     continue;
@@ -771,8 +764,8 @@ b4_c_function_def([yyparse], [int], b4_parse_param)
 #endif
 {[
   ]b4_pure_if([b4_declare_parser_variables])[
-  register int yystate;
-  register int yyn;
+  int yystate;
+  int yyn;
   int yyresult;
   /* Number of tokens to shift before error messages enabled.  */
   int yyerrstatus;
@@ -790,12 +783,12 @@ b4_c_function_def([yyparse], [int], b4_parse_param)
   /* The state stack.  */
   short int yyssa[YYINITDEPTH];
   short int *yyss = yyssa;
-  register short int *yyssp;
+  short int *yyssp;
 
   /* The semantic value stack.  */
   YYSTYPE yyvsa[YYINITDEPTH];
   YYSTYPE *yyvs = yyvsa;
-  register YYSTYPE *yyvsp;
+  YYSTYPE *yyvsp;
 
 ]b4_location_if(
 [[  /* The location stack.  */
@@ -1040,6 +1033,7 @@ yyreduce:
   switch (yyn)
     ]{
       b4_actions
+      default: break;
     }
 
 /* Line __line__ of yacc.c.  */
@@ -1178,12 +1172,11 @@ yyerrlab:
 `---------------------------------------------------*/
 yyerrorlab:
 
-#ifdef __GNUC__
-  /* Pacify GCC when the user code never invokes YYERROR and the label
-     yyerrorlab therefore never appears in user code.  */
+  /* Pacify compilers like GCC when the user code never invokes
+     YYERROR and the label yyerrorlab therefore never appears in user
+     code.  */
   if (0)
      goto yyerrorlab;
-#endif
 
 ]b4_location_if([[  yyerror_range[0] = yylsp[1-yylen];
   yylsp -= yylen;