Skip to content
Snippets Groups Projects
ast_expr2.c 74 KiB
Newer Older
  • Learn to ignore specific revisions
  •    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 YYERROR_VERBOSE
    
    # ifndef yystrlen
    
    #  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 == '"')
        {
          size_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;
    
        {
          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;
          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;
    	  }
    
          yyf = YY_(yyformat);
          yysize1 = yysize + yystrlen (yyf);
          yysize_overflow |= (yysize1 < yysize);
          yysize = yysize1;
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
    
    
          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);
    
    
          case 3: /* "TOK_COLONCOLON" */
    #line 162 "ast_expr2.y"
    	{  free_value((yyvaluep->val)); };
    #line 1250 "ast_expr2.c"
    	break;
          case 4: /* "TOK_COND" */
    #line 162 "ast_expr2.y"
    	{  free_value((yyvaluep->val)); };
    #line 1255 "ast_expr2.c"
    	break;
          case 5: /* "TOK_OR" */
    #line 162 "ast_expr2.y"
    	{  free_value((yyvaluep->val)); };
    #line 1260 "ast_expr2.c"
    	break;
          case 6: /* "TOK_AND" */
    #line 162 "ast_expr2.y"
    	{  free_value((yyvaluep->val)); };
    #line 1265 "ast_expr2.c"
    	break;
          case 7: /* "TOK_NE" */
    #line 162 "ast_expr2.y"
    	{  free_value((yyvaluep->val)); };
    #line 1270 "ast_expr2.c"
    	break;
          case 8: /* "TOK_LE" */
    #line 162 "ast_expr2.y"
    	{  free_value((yyvaluep->val)); };
    #line 1275 "ast_expr2.c"
    	break;
          case 9: /* "TOK_GE" */
    #line 162 "ast_expr2.y"
    	{  free_value((yyvaluep->val)); };
    #line 1280 "ast_expr2.c"
    	break;
          case 10: /* "TOK_LT" */
    #line 162 "ast_expr2.y"
    	{  free_value((yyvaluep->val)); };
    #line 1285 "ast_expr2.c"
    	break;
          case 11: /* "TOK_GT" */
    #line 162 "ast_expr2.y"
    	{  free_value((yyvaluep->val)); };
    #line 1290 "ast_expr2.c"
    	break;
          case 12: /* "TOK_EQ" */
    #line 162 "ast_expr2.y"
    	{  free_value((yyvaluep->val)); };
    #line 1295 "ast_expr2.c"
    	break;
          case 13: /* "TOK_MINUS" */
    #line 162 "ast_expr2.y"
    	{  free_value((yyvaluep->val)); };
    #line 1300 "ast_expr2.c"
    	break;
          case 14: /* "TOK_PLUS" */
    #line 162 "ast_expr2.y"
    	{  free_value((yyvaluep->val)); };
    #line 1305 "ast_expr2.c"
    	break;
          case 15: /* "TOK_MOD" */
    #line 162 "ast_expr2.y"
    	{  free_value((yyvaluep->val)); };
    #line 1310 "ast_expr2.c"
    	break;
          case 16: /* "TOK_DIV" */
    #line 162 "ast_expr2.y"
    	{  free_value((yyvaluep->val)); };
    #line 1315 "ast_expr2.c"
    	break;
          case 17: /* "TOK_MULT" */
    #line 162 "ast_expr2.y"
    	{  free_value((yyvaluep->val)); };
    #line 1320 "ast_expr2.c"
    	break;
          case 18: /* "TOK_COMPL" */
    #line 162 "ast_expr2.y"
    	{  free_value((yyvaluep->val)); };
    #line 1325 "ast_expr2.c"
    	break;
          case 19: /* "TOK_EQTILDE" */
    #line 162 "ast_expr2.y"
    	{  free_value((yyvaluep->val)); };
    #line 1330 "ast_expr2.c"
    	break;
          case 20: /* "TOK_COLON" */
    #line 162 "ast_expr2.y"
    	{  free_value((yyvaluep->val)); };
    #line 1335 "ast_expr2.c"
    	break;
          case 21: /* "TOK_LP" */
    #line 162 "ast_expr2.y"
    	{  free_value((yyvaluep->val)); };
    #line 1340 "ast_expr2.c"
    	break;
          case 22: /* "TOK_RP" */
    #line 162 "ast_expr2.y"
    	{  free_value((yyvaluep->val)); };
    #line 1345 "ast_expr2.c"
    	break;
          case 23: /* "TOKEN" */
    #line 162 "ast_expr2.y"
    	{  free_value((yyvaluep->val)); };
    #line 1350 "ast_expr2.c"
    	break;
          case 26: /* "expr" */
    #line 162 "ast_expr2.y"
    	{  free_value((yyvaluep->val)); };
    #line 1355 "ast_expr2.c"
    	break;
    
        }
    }
    
    
    /* 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.  |
    `----------*/
    
    #ifdef YYPARSE_PARAM
    
    #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)
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
      /* The look-ahead symbol.  */
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
    /* The semantic value of the look-ahead symbol.  */
    
    YYSTYPE yylval;
    
    /* Number of syntax errors so far.  */
    int yynerrs;
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
    /* Location data for the look-ahead symbol.  */
    
      int yystate;
      int yyn;
    
      int yyresult;
      /* Number of tokens to shift before error messages enabled.  */
      int yyerrstatus;
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
      /* Look-ahead token as an internal (translated) token number.  */
    
    #if YYERROR_VERBOSE
      /* Buffer for error messages, and its allocated size.  */
      char yymsgbuf[128];
      char *yymsg = yymsgbuf;
      YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
    #endif
    
    
      /* Three 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 = yyssa;
      yytype_int16 *yyssp;
    
    
      /* The semantic value stack.  */
      YYSTYPE yyvsa[YYINITDEPTH];
      YYSTYPE *yyvs = yyvsa;
    
      YYSTYPE *yyvsp;
    
    
      /* The location stack.  */
      YYLTYPE yylsa[YYINITDEPTH];
      YYLTYPE *yyls = yylsa;
      YYLTYPE *yylsp;
    
      /* The locations where the error started and ended.  */
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
      YYLTYPE yyerror_range[2];
    
    #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
    
    
      YYSIZE_T yystacksize = YYINITDEPTH;
    
      /* The variables used to return semantic value and location from the
         action routines.  */
      YYSTYPE yyval;
      YYLTYPE yyloc;
    
    
      /* The number of symbols on the RHS of the reduced rule.
         Keep to zero when no symbol should be popped.  */
      int yylen = 0;
    
    
      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
    #if YYLTYPE_IS_TRIVIAL
      /* Initialize the default location before parsing starts.  */
      yylloc.first_line   = yylloc.last_line   = 1;
      yylloc.first_column = yylloc.last_column = 0;
    #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);
    	YYSTACK_RELOCATE (yyvs);
    	YYSTACK_RELOCATE (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));
    
      goto yybackup;
    
    /*-----------.
    | yybackup.  |
    `-----------*/
    yybackup:
    
    
      /* Do appropriate processing given the current state.  Read a
         look-ahead token if we need one and don't already have one.  */
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
      /* First try to decide what to do without reference to look-ahead token.  */
    
      yyn = yypact[yystate];
      if (yyn == YYPACT_NINF)
        goto yydefault;
    
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
      /* Not known => get a look-ahead token if don't already have one.  */
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
      /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead 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;
          yyn = -yyn;
          goto yyreduce;
        }
    
      if (yyn == YYFINAL)
        YYACCEPT;
    
    
      /* Count tokens shifted since error; after three, turn off error
         status.  */
      if (yyerrstatus)
        yyerrstatus--;
    
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
      /* Shift the look-ahead token.  */
      YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
    
      /* Discard the shifted token unless it is eof.  */
    
      *++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];
    
    
      /* Default location.  */
      YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
    
        { ((struct parse_io *)parseio)->val = (struct val *)calloc(sizeof(struct val),1);
    
                  ((struct parse_io *)parseio)->val->type = (yyvsp[(1) - (1)].val)->type;
                  if( (yyvsp[(1) - (1)].val)->type == AST_EXPR_integer )
    				  ((struct parse_io *)parseio)->val->u.i = (yyvsp[(1) - (1)].val)->u.i;
    
    				  ((struct parse_io *)parseio)->val->u.s = (yyvsp[(1) - (1)].val)->u.s; 
    			  free((yyvsp[(1) - (1)].val));
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
    			;}
    
    #line 176 "ast_expr2.y"
        {/* nothing */ ((struct parse_io *)parseio)->val = (struct val *)calloc(sizeof(struct val),1);
                  ((struct parse_io *)parseio)->val->type = AST_EXPR_string;
    			  ((struct parse_io *)parseio)->val->u.s = strdup(""); 
    			;}
    
    #line 183 "ast_expr2.y"
        { (yyval.val)= (yyvsp[(1) - (1)].val);;}
    
    #line 184 "ast_expr2.y"
        { (yyval.val) = (yyvsp[(2) - (3)].val); 
    	                       (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
    						   (yyloc).first_line=0; (yyloc).last_line=0;
    							DESTROY((yyvsp[(1) - (3)].val)); DESTROY((yyvsp[(3) - (3)].val)); ;}
    
    #line 188 "ast_expr2.y"
        { (yyval.val) = op_or ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
    						DESTROY((yyvsp[(2) - (3)].val));	
                             (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
    						 (yyloc).first_line=0; (yyloc).last_line=0;;}
    
    #line 192 "ast_expr2.y"
        { (yyval.val) = op_and ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
    						DESTROY((yyvsp[(2) - (3)].val));	
    	                      (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
                              (yyloc).first_line=0; (yyloc).last_line=0;;}
    
    #line 196 "ast_expr2.y"
        { (yyval.val) = op_eq ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
    						DESTROY((yyvsp[(2) - (3)].val));	
    	                     (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
    						 (yyloc).first_line=0; (yyloc).last_line=0;;}
    
    #line 200 "ast_expr2.y"
        { (yyval.val) = op_gt ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val));
    						DESTROY((yyvsp[(2) - (3)].val));	
                             (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column;
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
    						 (yyloc).first_line=0; (yyloc).last_line=0;;}
    
    #line 204 "ast_expr2.y"
        { (yyval.val) = op_lt ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
    						DESTROY((yyvsp[(2) - (3)].val));	
    	                     (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
    						 (yyloc).first_line=0; (yyloc).last_line=0;;}
    
    #line 208 "ast_expr2.y"
        { (yyval.val) = op_ge ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
    						DESTROY((yyvsp[(2) - (3)].val));	
    	                      (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
    						  (yyloc).first_line=0; (yyloc).last_line=0;;}
    
    #line 212 "ast_expr2.y"
        { (yyval.val) = op_le ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
    						DESTROY((yyvsp[(2) - (3)].val));	
    	                      (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
    						  (yyloc).first_line=0; (yyloc).last_line=0;;}
    
    #line 216 "ast_expr2.y"
        { (yyval.val) = op_ne ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
    						DESTROY((yyvsp[(2) - (3)].val));	
    	                      (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
    						  (yyloc).first_line=0; (yyloc).last_line=0;;}
    
    #line 220 "ast_expr2.y"
        { (yyval.val) = op_plus ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
    						DESTROY((yyvsp[(2) - (3)].val));	
    	                       (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
    						   (yyloc).first_line=0; (yyloc).last_line=0;;}
    
    #line 224 "ast_expr2.y"
        { (yyval.val) = op_minus ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
    						DESTROY((yyvsp[(2) - (3)].val));	
    	                        (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
    							(yyloc).first_line=0; (yyloc).last_line=0;;}
    
    #line 228 "ast_expr2.y"
        { (yyval.val) = op_negate ((yyvsp[(2) - (2)].val)); 
    						DESTROY((yyvsp[(1) - (2)].val));	
    	                        (yyloc).first_column = (yylsp[(1) - (2)]).first_column; (yyloc).last_column = (yylsp[(2) - (2)]).last_column; 
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
    							(yyloc).first_line=0; (yyloc).last_line=0;;}
    
    #line 232 "ast_expr2.y"
        { (yyval.val) = op_compl ((yyvsp[(2) - (2)].val)); 
    						DESTROY((yyvsp[(1) - (2)].val));	
    	                        (yyloc).first_column = (yylsp[(1) - (2)]).first_column; (yyloc).last_column = (yylsp[(2) - (2)]).last_column; 
    							(yyloc).first_line=0; (yyloc).last_line=0;;}
    
    #line 236 "ast_expr2.y"
        { (yyval.val) = op_times ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
    						DESTROY((yyvsp[(2) - (3)].val));	
    	                       (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
    						   (yyloc).first_line=0; (yyloc).last_line=0;;}
    
    #line 240 "ast_expr2.y"
        { (yyval.val) = op_div ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
    						DESTROY((yyvsp[(2) - (3)].val));	
    	                      (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
    						  (yyloc).first_line=0; (yyloc).last_line=0;;}
    
    #line 244 "ast_expr2.y"
        { (yyval.val) = op_rem ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
    						DESTROY((yyvsp[(2) - (3)].val));	
    	                      (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
    						  (yyloc).first_line=0; (yyloc).last_line=0;;}
    
    #line 248 "ast_expr2.y"
        { (yyval.val) = op_colon ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
    						DESTROY((yyvsp[(2) - (3)].val));	
    	                        (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
    							(yyloc).first_line=0; (yyloc).last_line=0;;}
    
    #line 252 "ast_expr2.y"
        { (yyval.val) = op_eqtilde ((yyvsp[(1) - (3)].val), (yyvsp[(3) - (3)].val)); 
    						DESTROY((yyvsp[(2) - (3)].val));	
    	                        (yyloc).first_column = (yylsp[(1) - (3)]).first_column; (yyloc).last_column = (yylsp[(3) - (3)]).last_column; 
    							(yyloc).first_line=0; (yyloc).last_line=0;;}
        break;
    
      case 23:
    #line 256 "ast_expr2.y"
        { (yyval.val) = op_cond ((yyvsp[(1) - (5)].val), (yyvsp[(3) - (5)].val), (yyvsp[(5) - (5)].val)); 
    						DESTROY((yyvsp[(2) - (5)].val));	
    						DESTROY((yyvsp[(4) - (5)].val));	
    	                        (yyloc).first_column = (yylsp[(1) - (5)]).first_column; (yyloc).last_column = (yylsp[(3) - (5)]).last_column; 
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
    							(yyloc).first_line=0; (yyloc).last_line=0;;}
    
    /* Line 1270 of yacc.c.  */
    #line 1857 "ast_expr2.c"
    
          default: break;
    
      YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
    
      YY_STACK_PRINT (yyss, yyssp);
    
      *++yyvsp = yyval;
      *++yylsp = yyloc;
    
      /* Now `shift' the result of the reduction.  Determine what state
         that goes to, based on the state we popped back to and the rule
         number reduced by.  */
    
      yyn = yyr1[yyn];
    
      yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
      if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
        yystate = yytable[yystate];
      else
        yystate = yydefgoto[yyn - YYNTOKENS];
    
      goto yynewstate;
    
    
    /*------------------------------------.
    | yyerrlab -- here on detecting error |
    `------------------------------------*/
    yyerrlab:
      /* If not already recovering from an error, report this error.  */
      if (!yyerrstatus)
        {
          ++yynerrs;
    
    #if ! YYERROR_VERBOSE
          yyerror (YY_("syntax error"));
    #else
          {
    	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
    	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
    	  {
    	    YYSIZE_T yyalloc = 2 * yysize;
    	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
    	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
    	    if (yymsg != yymsgbuf)
    	      YYSTACK_FREE (yymsg);
    	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
    	    if (yymsg)
    	      yymsg_alloc = yyalloc;
    	    else
    
    		yymsg = yymsgbuf;
    		yymsg_alloc = sizeof yymsgbuf;
    
    	if (0 < yysize && yysize <= yymsg_alloc)
    	  {
    	    (void) yysyntax_error (yymsg, yystate, yychar);
    	    yyerror (yymsg);
    	  }
    	else
    	  {
    	    yyerror (YY_("syntax error"));
    	    if (yysize != 0)
    
    	      goto yyexhaustedlab;
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
      yyerror_range[0] = yylloc;
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
          /* If just tried and failed to reuse look-ahead token after an
    
    	  /* Return failure if at end of input.  */
    
    	  yydestruct ("Error: discarding",
    		      yytoken, &yylval, &yylloc);
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
      /* Else will try to reuse look-ahead token after shifting the error
    
    /*---------------------------------------------------.
    | yyerrorlab -- error raised explicitly by YYERROR.  |
    `---------------------------------------------------*/
    yyerrorlab:
    
      /* Pacify compilers like GCC when the user code never invokes
         YYERROR and the label yyerrorlab therefore never appears in user
         code.  */
    
    Tilghman Lesher's avatar
     
    Tilghman Lesher committed
      yyerror_range[0] = yylsp[1-yylen];
    
      /* Do not reclaim the symbols of the rule which action triggered
         this YYERROR.  */
      YYPOPSTACK (yylen);
      yylen = 0;
      YY_STACK_PRINT (yyss, yyssp);
    
    /*-------------------------------------------------------------.
    | yyerrlab1 -- common code for both syntax error and YYERROR.  |
    `-------------------------------------------------------------*/
    yyerrlab1:
    
      yyerrstatus = 3;	/* Each real token shifted decrements this.  */
    
      for (;;)
        {
          yyn = yypact[yystate];
          if (yyn != YYPACT_NINF)
    	{
    	  yyn += YYTERROR;
    	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
    	    {
    	      yyn = yytable[yyn];
    	      if (0 < yyn)
    		break;
    	    }
    	}
    
          /* Pop the current state because it cannot handle the error token.  */