Skip to content
Snippets Groups Projects
ast_expr2.c 95.8 KiB
Newer Older
  • Learn to ignore specific revisions
  • Tilghman Lesher's avatar
     
    Tilghman Lesher committed
    # define YYLLOC_DEFAULT(Current, Rhs, N)				\
        do									\
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
    	{								\
    	  (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;				\
    	  (Current).first_column = (Current).last_column =		\
    	    YYRHSLOC (Rhs, 0).last_column;				\
    	}								\
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
    #endif
    
    
    /* YY_LOCATION_PRINT -- Print the location on the stream.
       This macro was not mandated originally: define only if we know
       we won't break user code: when these are the locations we know.  */
    
    #ifndef YY_LOCATION_PRINT
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
    #  define YY_LOCATION_PRINT(File, Loc)			\
         fprintf (File, "%d.%d-%d.%d",			\
    
    	      (Loc).first_line, (Loc).first_column,	\
    	      (Loc).last_line,  (Loc).last_column)
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
    # else
    #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
    # endif
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
    
    
    /* YYLEX -- calling `yylex' with the right arguments.  */
    
    #ifdef YYLEX_PARAM
    # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
    #else
    # define YYLEX yylex (&yylval, &yylloc)
    #endif
    
    /* Enable debugging if requested.  */
    #if YYDEBUG
    
    # ifndef YYFPRINTF
    #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
    #  define YYFPRINTF fprintf
    # endif
    
    # define YYDPRINTF(Args)			\
    do {						\
      if (yydebug)					\
        YYFPRINTF Args;				\
    
    } while (YYID (0))
    
    # define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
    do {									  \
      if (yydebug)								  \
        {									  \
          YYFPRINTF (stderr, "%s ", Title);					  \
          yy_symbol_print (stderr,						  \
    		  Type, Value, Location); \
          YYFPRINTF (stderr, "\n");						  \
        }									  \
    } while (YYID (0))
    
    
    /*--------------------------------.
    | Print this symbol on YYOUTPUT.  |
    `--------------------------------*/
    
    /*ARGSUSED*/
    #if (defined __STDC__ || defined __C99__FUNC__ \
         || defined __cplusplus || defined _MSC_VER)
    static void
    
    Steve Murphy's avatar
    Steve Murphy committed
    yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
    
    #else
    static void
    yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp)
        FILE *yyoutput;
        int yytype;
    
    Steve Murphy's avatar
    Steve Murphy committed
        YYSTYPE const * const yyvaluep;
        YYLTYPE const * const yylocationp;
    
    #endif
    {
      if (!yyvaluep)
        return;
      YYUSE (yylocationp);
    # ifdef YYPRINT
      if (yytype < YYNTOKENS)
        YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
    # else
      YYUSE (yyoutput);
    # endif
      switch (yytype)
        {
          default:
    	break;
        }
    }
    
    
    /*--------------------------------.
    | Print this symbol on YYOUTPUT.  |
    `--------------------------------*/
    
    #if (defined __STDC__ || defined __C99__FUNC__ \
         || defined __cplusplus || defined _MSC_VER)
    static void
    
    Steve Murphy's avatar
    Steve Murphy committed
    yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
    
    #else
    static void
    yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp)
        FILE *yyoutput;
        int yytype;
    
    Steve Murphy's avatar
    Steve Murphy committed
        YYSTYPE const * const yyvaluep;
        YYLTYPE const * const yylocationp;
    
    #endif
    {
      if (yytype < YYNTOKENS)
        YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
      else
        YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
    
      YY_LOCATION_PRINT (yyoutput, *yylocationp);
      YYFPRINTF (yyoutput, ": ");
      yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp);
      YYFPRINTF (yyoutput, ")");
    }
    
    
    /*------------------------------------------------------------------.
    | yy_stack_print -- Print the state stack from its BOTTOM up to its |
    
    `------------------------------------------------------------------*/
    
    
    #if (defined __STDC__ || defined __C99__FUNC__ \
         || defined __cplusplus || defined _MSC_VER)
    
    yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
    
    yy_stack_print (yybottom, yytop)
        yytype_int16 *yybottom;
        yytype_int16 *yytop;
    
      for (; yybottom <= yytop; yybottom++)
        {
          int yybot = *yybottom;
          YYFPRINTF (stderr, " %d", yybot);
        }
    
      YYFPRINTF (stderr, "\n");
    }
    
    # define YY_STACK_PRINT(Bottom, Top)				\
    do {								\
      if (yydebug)							\
        yy_stack_print ((Bottom), (Top));				\
    
    
    
    /*------------------------------------------------.
    | Report that the YYRULE is going to be reduced.  |
    `------------------------------------------------*/
    
    
    #if (defined __STDC__ || defined __C99__FUNC__ \
         || defined __cplusplus || defined _MSC_VER)
    
    yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
    
    Steve Murphy's avatar
    Steve Murphy committed
    yy_reduce_print (yyvsp, yylsp, yyrule)
    
      unsigned long int yylno = yyrline[yyrule];
    
      YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
    	     yyrule - 1, yylno);
      /* The symbols being reduced.  */
      for (yyi = 0; yyi < yynrhs; yyi++)
        {
    
          YYFPRINTF (stderr, "   $%d = ", yyi + 1);
    
          yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
    		       &(yyvsp[(yyi + 1) - (yynrhs)])
    		       , &(yylsp[(yyi + 1) - (yynrhs)])		       );
    
          YYFPRINTF (stderr, "\n");
    
    }
    
    # define YY_REDUCE_PRINT(Rule)		\
    do {					\
      if (yydebug)				\
    
        yy_reduce_print (yyvsp, yylsp, Rule); \
    } while (YYID (0))
    
    
    /* Nonzero means print parse trace.  It is left uninitialized so that
       multiple parsers can coexist.  */
    int yydebug;
    #else /* !YYDEBUG */
    # define YYDPRINTF(Args)
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
    # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
    
    # define YY_STACK_PRINT(Bottom, Top)
    # define YY_REDUCE_PRINT(Rule)
    #endif /* !YYDEBUG */
    
    
    /* YYINITDEPTH -- initial size of the parser's stacks.  */
    #ifndef	YYINITDEPTH
    # define YYINITDEPTH 200
    #endif
    
    /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
       if the built-in stack extension method is used).
    
       Do not make this value too large; the results are undefined if
    
       YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
    
       evaluated with infinite-precision integer arithmetic.  */
    
    #ifndef YYMAXDEPTH
    # define YYMAXDEPTH 10000
    #endif
    
    
    #  if defined __GLIBC__ && defined _STRING_H
    
    #   define yystrlen strlen
    #  else
    /* Return the length of YYSTR.  */
    
    #if (defined __STDC__ || defined __C99__FUNC__ \
         || defined __cplusplus || defined _MSC_VER)
    
    static YYSIZE_T
    yystrlen (const char *yystr)
    
      YYSIZE_T yylen;
      for (yylen = 0; yystr[yylen]; yylen++)
    
    #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
    
    #   define yystpcpy stpcpy
    #  else
    /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
       YYDEST.  */
    
    #if (defined __STDC__ || defined __C99__FUNC__ \
         || defined __cplusplus || defined _MSC_VER)
    
    static char *
    yystpcpy (char *yydest, const char *yysrc)
    
      char *yyd = yydest;
      const char *yys = yysrc;
    
    
      while ((*yyd++ = *yys++) != '\0')
        continue;
    
      return yyd - 1;
    }
    #  endif
    # endif
    
    
    # ifndef yytnamerr
    /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
       quotes and backslashes, so that it's suitable for yyerror.  The
       heuristic is that double-quoting is unnecessary unless the string
       contains an apostrophe, a comma, or backslash (other than
       backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
       null, do not copy; instead, return the length of what the result
       would have been.  */
    static YYSIZE_T
    yytnamerr (char *yyres, const char *yystr)
    {
      if (*yystr == '"')
        {
    
    Steve Murphy's avatar
    Steve Murphy committed
          YYSIZE_T yyn = 0;
    
          char const *yyp = yystr;
    
          for (;;)
    	switch (*++yyp)
    	  {
    	  case '\'':
    	  case ',':
    	    goto do_not_strip_quotes;
    
    	  case '\\':
    	    if (*++yyp != '\\')
    	      goto do_not_strip_quotes;
    	    /* Fall through.  */
    	  default:
    	    if (yyres)
    	      yyres[yyn] = *yyp;
    	    yyn++;
    	    break;
    
    	  case '"':
    	    if (yyres)
    	      yyres[yyn] = '\0';
    	    return yyn;
    	  }
        do_not_strip_quotes: ;
        }
    
      if (! yyres)
        return yystrlen (yystr);
    
      return yystpcpy (yyres, yystr) - yyres;
    }
    # endif
    
    
    /* Copy into YYRESULT an error message about the unexpected token
       YYCHAR while in state YYSTATE.  Return the number of bytes copied,
       including the terminating null byte.  If YYRESULT is null, do not
       copy anything; just return the number of bytes that would be
       copied.  As a special case, return 0 if an ordinary "syntax error"
       message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
       size calculation.  */
    static YYSIZE_T
    yysyntax_error (char *yyresult, int yystate, int yychar)
    
      if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
        return 0;
      else
    
          int yytype = YYTRANSLATE (yychar);
          YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
          YYSIZE_T yysize = yysize0;
          YYSIZE_T yysize1;
          int yysize_overflow = 0;
          enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
          char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
          int yyx;
    
    # if 0
          /* This is so xgettext sees the translatable formats that are
    	 constructed on the fly.  */
          YY_("syntax error, unexpected %s");
          YY_("syntax error, unexpected %s, expecting %s");
          YY_("syntax error, unexpected %s, expecting %s or %s");
          YY_("syntax error, unexpected %s, expecting %s or %s or %s");
          YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
    # endif
          char *yyfmt;
          char const *yyf;
          static char const yyunexpected[] = "syntax error, unexpected %s";
          static char const yyexpecting[] = ", expecting %s";
          static char const yyor[] = " or %s";
          char yyformat[sizeof yyunexpected
    		    + sizeof yyexpecting - 1
    		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
    		       * (sizeof yyor - 1))];
          char const *yyprefix = yyexpecting;
    
          /* Start YYX at -YYN if negative to avoid negative indexes in
    	 YYCHECK.  */
          int yyxbegin = yyn < 0 ? -yyn : 0;
    
          /* Stay within bounds of both yycheck and yytname.  */
          int yychecklim = YYLAST - yyn + 1;
          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
          int yycount = 1;
    
          yyarg[0] = yytname[yytype];
          yyfmt = yystpcpy (yyformat, yyunexpected);
    
          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
    	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
    	  {
    	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
    	      {
    		yycount = 1;
    		yysize = yysize0;
    		yyformat[sizeof yyunexpected - 1] = '\0';
    		break;
    	      }
    	    yyarg[yycount++] = yytname[yyx];
    	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
    	    yysize_overflow |= (yysize1 < yysize);
    	    yysize = yysize1;
    	    yyfmt = yystpcpy (yyfmt, yyprefix);
    	    yyprefix = yyor;
    	  }
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
    
    
          yyf = YY_(yyformat);
          yysize1 = yysize + yystrlen (yyf);
          yysize_overflow |= (yysize1 < yysize);
          yysize = yysize1;
    
          if (yysize_overflow)
    	return YYSIZE_MAXIMUM;
    
          if (yyresult)
    	{
    	  /* Avoid sprintf, as that infringes on the user's name space.
    	     Don't have undefined behavior even if the translation
    	     produced a string with the wrong number of "%s"s.  */
    	  char *yyp = yyresult;
    	  int yyi = 0;
    	  while ((*yyp = *yyf) != '\0')
    	    {
    	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
    		{
    		  yyp += yytnamerr (yyp, yyarg[yyi++]);
    		  yyf += 2;
    		}
    	      else
    		{
    		  yyp++;
    		  yyf++;
    		}
    	    }
    	}
          return yysize;
        }
    
    
    /*-----------------------------------------------.
    | Release the memory associated to this symbol.  |
    `-----------------------------------------------*/
    
    
    /*ARGSUSED*/
    #if (defined __STDC__ || defined __C99__FUNC__ \
         || defined __cplusplus || defined _MSC_VER)
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
    yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
    yydestruct (yymsg, yytype, yyvaluep, yylocationp)
        const char *yymsg;
    
        int yytype;
        YYSTYPE *yyvaluep;
        YYLTYPE *yylocationp;
    #endif
    {
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
      if (!yymsg)
        yymsg = "Deleting";
      YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
    
    
    #line 368 "ast_expr2.y"
    
    /* Line 1000 of yacc.c  */
    #line 1479 "ast_expr2.c"
    
    #line 368 "ast_expr2.y"
    
    /* Line 1000 of yacc.c  */
    #line 1488 "ast_expr2.c"
    
    #line 368 "ast_expr2.y"
    
    /* Line 1000 of yacc.c  */
    #line 1497 "ast_expr2.c"
    
    #line 368 "ast_expr2.y"
    
    /* Line 1000 of yacc.c  */
    #line 1506 "ast_expr2.c"
    
    #line 368 "ast_expr2.y"
    
    /* Line 1000 of yacc.c  */
    #line 1515 "ast_expr2.c"
    
    #line 368 "ast_expr2.y"
    
    /* Line 1000 of yacc.c  */
    #line 1524 "ast_expr2.c"
    
    #line 368 "ast_expr2.y"
    
    /* Line 1000 of yacc.c  */
    #line 1533 "ast_expr2.c"
    
    #line 368 "ast_expr2.y"
    
    /* Line 1000 of yacc.c  */
    #line 1542 "ast_expr2.c"
    
    #line 368 "ast_expr2.y"
    
    /* Line 1000 of yacc.c  */
    #line 1551 "ast_expr2.c"
    
    #line 368 "ast_expr2.y"
    
    /* Line 1000 of yacc.c  */
    #line 1560 "ast_expr2.c"
    
    #line 368 "ast_expr2.y"
    
    /* Line 1000 of yacc.c  */
    #line 1569 "ast_expr2.c"
    
    #line 368 "ast_expr2.y"
    
    /* Line 1000 of yacc.c  */
    #line 1578 "ast_expr2.c"
    
    #line 368 "ast_expr2.y"
    
    /* Line 1000 of yacc.c  */
    #line 1587 "ast_expr2.c"
    
    #line 368 "ast_expr2.y"
    
    /* Line 1000 of yacc.c  */
    #line 1596 "ast_expr2.c"
    
    #line 368 "ast_expr2.y"
    
    /* Line 1000 of yacc.c  */
    #line 1605 "ast_expr2.c"
    
    #line 368 "ast_expr2.y"
    
    /* Line 1000 of yacc.c  */
    #line 1614 "ast_expr2.c"
    
    Steve Murphy's avatar
    Steve Murphy committed
          case 20: /* "TOK_TILDETILDE" */
    
    #line 368 "ast_expr2.y"
    
    /* Line 1000 of yacc.c  */
    #line 1623 "ast_expr2.c"
    
    Steve Murphy's avatar
    Steve Murphy committed
          case 21: /* "TOK_EQTILDE" */
    
    #line 368 "ast_expr2.y"
    
    /* Line 1000 of yacc.c  */
    #line 1632 "ast_expr2.c"
    
    Steve Murphy's avatar
    Steve Murphy committed
          case 22: /* "TOK_COLON" */
    
    #line 368 "ast_expr2.y"
    
    /* Line 1000 of yacc.c  */
    #line 1641 "ast_expr2.c"
    
    Steve Murphy's avatar
    Steve Murphy committed
          case 23: /* "TOK_LP" */
    
    #line 368 "ast_expr2.y"
    
    /* Line 1000 of yacc.c  */
    #line 1650 "ast_expr2.c"
    
    Steve Murphy's avatar
    Steve Murphy committed
          case 24: /* "TOK_RP" */
    
    #line 368 "ast_expr2.y"
    
    /* Line 1000 of yacc.c  */
    #line 1659 "ast_expr2.c"
    
    Steve Murphy's avatar
    Steve Murphy committed
          case 25: /* "TOKEN" */
    
    #line 368 "ast_expr2.y"
    
    /* Line 1000 of yacc.c  */
    #line 1668 "ast_expr2.c"
    
    Steve Murphy's avatar
    Steve Murphy committed
    	break;
          case 29: /* "expr" */
    
    #line 368 "ast_expr2.y"
    
    Steve Murphy's avatar
    Steve Murphy committed
    	{  free_value((yyvaluep->val)); };
    
    /* Line 1000 of yacc.c  */
    #line 1677 "ast_expr2.c"
    
        }
    }
    
    /* Prevent warnings from -Wmissing-prototypes.  */
    #ifdef YYPARSE_PARAM
    
    #if defined __STDC__ || defined __cplusplus
    
    int yyparse (void *YYPARSE_PARAM);
    
    #if defined __STDC__ || defined __cplusplus
    
    int yyparse (void);
    #else
    int yyparse ();
    #endif
    #endif /* ! YYPARSE_PARAM */
    
    
    
    
    
    
    /*-------------------------.
    | yyparse or yypush_parse.  |
    `-------------------------*/
    
    #if (defined __STDC__ || defined __C99__FUNC__ \
         || defined __cplusplus || defined _MSC_VER)
    int
    yyparse (void *YYPARSE_PARAM)
    #else
    int
    yyparse (YYPARSE_PARAM)
        void *YYPARSE_PARAM;
    #endif
    
    #if (defined __STDC__ || defined __C99__FUNC__ \
         || defined __cplusplus || defined _MSC_VER)
    
    /* The lookahead symbol.  */
    
    /* The semantic value of the lookahead symbol.  */
    
    /* Location data for the lookahead symbol.  */
    
        /* Number of syntax errors so far.  */
        int yynerrs;
    
        int yystate;
        /* Number of tokens to shift before error messages enabled.  */
        int yyerrstatus;
    
        /* The stacks and their tools:
           `yyss': related to states.
           `yyvs': related to semantic values.
           `yyls': related to locations.
    
           Refer to the stacks thru separate pointers, to allow yyoverflow
           to reallocate them elsewhere.  */
    
        /* The state stack.  */
        yytype_int16 yyssa[YYINITDEPTH];
        yytype_int16 *yyss;
        yytype_int16 *yyssp;
    
        /* The semantic value stack.  */
        YYSTYPE yyvsa[YYINITDEPTH];
        YYSTYPE *yyvs;
        YYSTYPE *yyvsp;
    
        /* The location stack.  */
        YYLTYPE yylsa[YYINITDEPTH];
        YYLTYPE *yyls;
        YYLTYPE *yylsp;
    
        /* The locations where the error started and ended.  */
    
        YYSIZE_T yystacksize;
    
      int yyn;
      int yyresult;
      /* Lookahead token as an internal (translated) token number.  */
      int yytoken;
    
      /* The variables used to return semantic value and location from the
         action routines.  */
      YYSTYPE yyval;
      YYLTYPE yyloc;
    
    
    #if YYERROR_VERBOSE
      /* Buffer for error messages, and its allocated size.  */
      char yymsgbuf[128];
      char *yymsg = yymsgbuf;
      YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
    #endif
    
    #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
    
    
      /* The number of symbols on the RHS of the reduced rule.
         Keep to zero when no symbol should be popped.  */
      int yylen = 0;
    
      yytoken = 0;
      yyss = yyssa;
      yyvs = yyvsa;
      yyls = yylsa;
      yystacksize = YYINITDEPTH;
    
    
      YYDPRINTF ((stderr, "Starting parse\n"));
    
      yystate = 0;
      yyerrstatus = 0;
      yynerrs = 0;
    
      yychar = YYEMPTY; /* Cause a token to be read.  */
    
    
      /* Initialize stack pointers.
         Waste one element of value and location stack
         so that they stay on the same level as the state stack.
         The wasted elements are never initialized.  */
      yyssp = yyss;
      yyvsp = yyvs;
      yylsp = yyls;
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
      /* Initialize the default location before parsing starts.  */
      yylloc.first_line   = yylloc.last_line   = 1;
    
      yylloc.first_column = yylloc.last_column = 1;
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
    #endif
    
    
      goto yysetstate;
    
    /*------------------------------------------------------------.
    | yynewstate -- Push a new state, which is found in yystate.  |
    `------------------------------------------------------------*/
     yynewstate:
      /* In all cases, when you get here, the value and location stacks
    
         have just been pushed.  So pushing a state here evens the stacks.  */
    
      yyssp++;
    
     yysetstate:
      *yyssp = yystate;
    
      if (yyss + yystacksize - 1 <= yyssp)
        {
          /* Get the current used size of the three stacks, in elements.  */
          YYSIZE_T yysize = yyssp - yyss + 1;
    
    #ifdef yyoverflow
          {
    
    	/* Give user a chance to reallocate the stack.  Use copies of
    
    	   these so that the &'s don't force the real ones into
    	   memory.  */
    	YYSTYPE *yyvs1 = yyvs;
    
    	YYLTYPE *yyls1 = yyls;
    
    	/* Each stack pointer address is followed by the size of the
    	   data in use in that stack, in bytes.  This used to be a
    	   conditional around just the two extra args, but that might
    	   be undefined if yyoverflow is a macro.  */
    
    	yyoverflow (YY_("memory exhausted"),
    
    		    &yyss1, yysize * sizeof (*yyssp),
    		    &yyvs1, yysize * sizeof (*yyvsp),
    		    &yyls1, yysize * sizeof (*yylsp),
    		    &yystacksize);
    
    	yyls = yyls1;
    	yyss = yyss1;
    	yyvs = yyvs1;
          }
    #else /* no yyoverflow */
    # ifndef YYSTACK_RELOCATE
    
          goto yyexhaustedlab;
    
    # else
          /* Extend the stack our own way.  */
          if (YYMAXDEPTH <= yystacksize)
    
    	goto yyexhaustedlab;
    
          yystacksize *= 2;
          if (YYMAXDEPTH < yystacksize)
    	yystacksize = YYMAXDEPTH;
    
          {
    
    	union yyalloc *yyptr =
    	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
    	if (! yyptr)
    
    	  goto yyexhaustedlab;
    
    	YYSTACK_RELOCATE (yyss_alloc, yyss);
    	YYSTACK_RELOCATE (yyvs_alloc, yyvs);
    	YYSTACK_RELOCATE (yyls_alloc, yyls);
    
    #  undef YYSTACK_RELOCATE
    	if (yyss1 != yyssa)
    	  YYSTACK_FREE (yyss1);
          }
    # endif
    #endif /* no yyoverflow */
    
          yyssp = yyss + yysize - 1;
          yyvsp = yyvs + yysize - 1;
          yylsp = yyls + yysize - 1;
    
          YYDPRINTF ((stderr, "Stack size increased to %lu\n",
    		  (unsigned long int) yystacksize));
    
          if (yyss + yystacksize - 1 <= yyssp)
    	YYABORT;
        }
    
      YYDPRINTF ((stderr, "Entering state %d\n", yystate));
    
    
      if (yystate == YYFINAL)
        YYACCEPT;
    
    
      goto yybackup;
    
    /*-----------.
    | yybackup.  |
    `-----------*/
    yybackup:
    
    
      /* Do appropriate processing given the current state.  Read a
    
         lookahead token if we need one and don't already have one.  */
    
      /* First try to decide what to do without reference to lookahead token.  */
    
      /* Not known => get a lookahead token if don't already have one.  */
    
      /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
    
      if (yychar == YYEMPTY)
        {
          YYDPRINTF ((stderr, "Reading a token: "));
          yychar = YYLEX;
        }
    
      if (yychar <= YYEOF)
        {
          yychar = yytoken = YYEOF;
          YYDPRINTF ((stderr, "Now at end of input.\n"));
        }
      else
        {
          yytoken = YYTRANSLATE (yychar);
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
          YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
    
        }
    
      /* If the proper action on seeing token YYTOKEN is to reduce or to
         detect an error, take that action.  */
      yyn += yytoken;
      if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
        goto yydefault;
      yyn = yytable[yyn];
      if (yyn <= 0)
        {
    
          if (yyn == 0 || yyn == YYTABLE_NINF)
    	goto yyerrlab;
    
      /* Count tokens shifted since error; after three, turn off error
         status.  */
      if (yyerrstatus)
        yyerrstatus--;
    
    
      /* Shift the lookahead token.  */
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
      YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
    
      /* Discard the shifted token.  */
      yychar = YYEMPTY;
    
      *++yyvsp = yylval;
      *++yylsp = yylloc;
      goto yynewstate;
    
    
    /*-----------------------------------------------------------.
    | yydefault -- do the default action for the current state.  |
    `-----------------------------------------------------------*/
    yydefault:
      yyn = yydefact[yystate];
      if (yyn == 0)
        goto yyerrlab;
      goto yyreduce;
    
    
    /*-----------------------------.
    | yyreduce -- Do a reduction.  |
    `-----------------------------*/
    yyreduce:
      /* yyn is the number of a rule to reduce with.  */
      yylen = yyr2[yyn];
    
      /* If YYLEN is nonzero, implement the default value of the action:
         `$$ = $1'.
    
         Otherwise, the following line sets YYVAL to garbage.
         This behavior is undocumented and Bison
         users should not rely upon it.  Assigning to YYVAL
         unconditionally makes the parser a bit smaller, and it avoids a
         GCC warning that YYVAL may be used uninitialized.  */
      yyval = yyvsp[1-yylen];