#include <sys/types.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <locale.h>#include <ctype.h>#include <err.h>#include <errno.h>#include <regex.h>#include <limits.h>#include <asterisk/ast_expr.h>#include <asterisk/logger.h>Go to the source code of this file.
Data Structures | |
| struct | parser_control |
| struct | val |
| union | yyalloc |
| struct | yyltype |
| union | yystype |
Defines | |
| #define | YYBISON 1 |
| #define | yyparse ast_yyparse |
| #define | yylex ast_yylex |
| #define | yyerror ast_yyerror |
| #define | yylval ast_yylval |
| #define | yychar ast_yychar |
| #define | yydebug ast_yydebug |
| #define | yynerrs ast_yynerrs |
| #define | YYLSP_NEEDED 1 |
| #define | GE 257 |
| #define | LE 258 |
| #define | NE 259 |
| #define | TOKEN 260 |
| #define | QUAD_MIN (-0x7fffffffffffffffL-1) |
| #define | QUAD_MAX (0x7fffffffffffffffL) |
| #define | YYPARSE_PARAM kota |
| #define | YYLEX_PARAM kota |
| #define | YYLTYPE yyltype |
| #define | YYLTYPE_IS_TRIVIAL 1 |
| #define | ast_yyerror(x) ast_yyerror(x,&yyloc,kota) |
| #define | YYSTYPE yystype |
| #define | YYSTYPE_IS_TRIVIAL 1 |
| #define | YYDEBUG 0 |
| #define | YYFINAL 36 |
| #define | YYFLAG -32768 |
| #define | YYNTBASE 20 |
| #define | YYTRANSLATE(x) ((unsigned)(x) <= 260 ? yytranslate[x] : 22) |
| #define | YYLAST 83 |
| #define | YYPURE 1 |
| #define | YYSTACK_ALLOC malloc |
| #define | YYSTACK_FREE free |
| #define | YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1) |
| #define | YYSTACK_BYTES(N) |
| #define | YYCOPY(To, From, Count) |
| #define | YYSTACK_RELOCATE(Stack) |
| #define | YYSIZE_T unsigned int |
| #define | yyerrok (yyerrstatus = 0) |
| #define | yyclearin (yychar = YYEMPTY) |
| #define | YYEMPTY -2 |
| #define | YYEOF 0 |
| #define | YYACCEPT goto yyacceptlab |
| #define | YYABORT goto yyabortlab |
| #define | YYERROR goto yyerrlab1 |
| #define | YYFAIL goto yyerrlab |
| #define | YYRECOVERING() (!!yyerrstatus) |
| #define | YYBACKUP(Token, Value) |
| #define | YYTERROR 1 |
| #define | YYERRCODE 256 |
| #define | YYLLOC_DEFAULT(Current, Rhs, N) |
| #define | YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) |
| #define | YYDPRINTF(Args) |
| #define | YYINITDEPTH 200 |
| #define | YYMAXDEPTH 10000 |
| #define | YYPARSE_PARAM_ARG YYPARSE_PARAM |
| #define | YYPARSE_PARAM_DECL void *YYPARSE_PARAM; |
| #define | YY_DECL_NON_LSP_VARIABLES |
| #define | YY_DECL_VARIABLES |
| #define | YYPOPSTACK (yyvsp--, yyssp--, yylsp--) |
| #define | ast_yyerror(x) ast_yyerror(x, YYLTYPE *yylloc, struct parser_control *karoto) |
Typedefs | |
| typedef yyltype | yyltype |
Enumerations | |
| enum | valtype { integer, numeric_string, string } |
Functions | |
| int | yyparse (YYPARSE_PARAM_ARG) YYPARSE_PARAM_DECL |
Variables | |
| * | b |
| r | |
|
|
Definition at line 125 of file ast_expr.c. |
|
|
Definition at line 125 of file ast_expr.c. |
|
|
Definition at line 15 of file ast_expr.c. |
|
|
Definition at line 16 of file ast_expr.c. |
|
|
Definition at line 17 of file ast_expr.c. |
|
|
Definition at line 54 of file ast_expr.c. |
|
|
Definition at line 51 of file ast_expr.c. |
|
|
Definition at line 18 of file ast_expr.c. |
|
|
Definition at line 662 of file ast_expr.c. |
|
|
Value: YY_DECL_NON_LSP_VARIABLES \ \ \ YYLTYPE yylloc; Definition at line 673 of file ast_expr.c. Referenced by yyparse(). |
|
|
Definition at line 473 of file ast_expr.c. Referenced by yyparse(). |
|
|
Definition at line 472 of file ast_expr.c. Referenced by yyparse(). |
|
|
Definition at line 480 of file ast_expr.c. |
|
|
Definition at line 4 of file ast_expr.c. |
|
|
Definition at line 10 of file ast_expr.c. Referenced by yyparse(). |
|
|
Definition at line 469 of file ast_expr.c. |
|
|
Definition at line 422 of file ast_expr.c. |
|
|
Definition at line 156 of file ast_expr.c. |
|
|
Definition at line 11 of file ast_expr.c. |
|
|
Definition at line 553 of file ast_expr.c. Referenced by yyparse(). |
|
|
Definition at line 470 of file ast_expr.c. Referenced by yyparse(). |
|
|
Definition at line 471 of file ast_expr.c. Referenced by yyparse(). |
|
|
Definition at line 498 of file ast_expr.c. |
|
|
Definition at line 468 of file ast_expr.c. |
|
|
Definition at line 474 of file ast_expr.c. |
|
|
Definition at line 8 of file ast_expr.c. Referenced by yyparse(). |
|
|
Definition at line 478 of file ast_expr.c. |
|
|
Definition at line 161 of file ast_expr.c. Referenced by yyparse(). |
|
|
Definition at line 162 of file ast_expr.c. Referenced by yyparse(). |
|
|
Definition at line 558 of file ast_expr.c. Referenced by yyparse(). |
|
|
Definition at line 284 of file ast_expr.c. Referenced by yyparse(). |
|
|
Definition at line 520 of file ast_expr.c. Referenced by yyparse(). |
|
|
Definition at line 7 of file ast_expr.c. |
|
|
Definition at line 58 of file ast_expr.c. |
|
|
Value: Current.last_line = Rhs[N].last_line; \ Current.last_column = Rhs[N].last_column; Definition at line 509 of file ast_expr.c. Referenced by yyparse(). |
|
|
Definition at line 13 of file ast_expr.c. |
|
|
Definition at line 120 of file ast_expr.c. Referenced by yyparse(). |
|
|
Definition at line 121 of file ast_expr.c. |
|
|
Definition at line 9 of file ast_expr.c. Referenced by yyparse(). |
|
|
Definition at line 573 of file ast_expr.c. Referenced by yyparse(). |
|
|
Definition at line 12 of file ast_expr.c. Referenced by yyparse(). |
|
|
Definition at line 163 of file ast_expr.c. Referenced by yyparse(). |
|
|
Definition at line 6 of file ast_expr.c. |
|
|
Definition at line 57 of file ast_expr.c. |
|
|
Definition at line 642 of file ast_expr.c. Referenced by yyparse(). |
|
|
Definition at line 643 of file ast_expr.c. Referenced by yyparse(). |
|
|
|
|
|
Definition at line 312 of file ast_expr.c. |
|
|
Definition at line 479 of file ast_expr.c. |
|
|
Definition at line 465 of file ast_expr.c. Referenced by yyparse(). |
|
|
Definition at line 380 of file ast_expr.c. Referenced by yyparse(). |
|
|
Value: ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
+ 2 * YYSTACK_GAP_MAX)Definition at line 406 of file ast_expr.c. |
|
|
Definition at line 381 of file ast_expr.c. Referenced by yyparse(). |
|
|
Definition at line 401 of file ast_expr.c. |
|
|
Definition at line 438 of file ast_expr.c. Referenced by yyparse(). |
|
|
Definition at line 134 of file ast_expr.c. Referenced by yyparse(). |
|
|
Definition at line 135 of file ast_expr.c. |
|
|
Definition at line 497 of file ast_expr.c. Referenced by yyparse(). |
|
|
Definition at line 166 of file ast_expr.c. Referenced by yyparse(). |
|
|
|
|
|
Definition at line 63 of file ast_expr.c.
00063 {
00064 integer, numeric_string, string
00065 } ;
|
|
|
Definition at line 691 of file ast_expr.c. References YY_DECL_VARIABLES, YYABORT, YYACCEPT, yychar, YYDPRINTF, YYEMPTY, YYEOF, yyerror, YYFINAL, YYFLAG, YYINITDEPTH, YYLAST, YYLEX, YYLLOC_DEFAULT, YYLTYPE, yylval, YYMAXDEPTH, yynerrs, YYNTBASE, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL, YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE, YYSTACK_RELOCATE, YYSTYPE, YYTERROR, and YYTRANSLATE.
00693 {
00694 /* If reentrant, generate the variables here. */
00695 #if YYPURE
00696 YY_DECL_VARIABLES
00697 #endif /* !YYPURE */
00698
00699 register int yystate;
00700 register int yyn;
00701 int yyresult;
00702 /* Number of tokens to shift before error messages enabled. */
00703 int yyerrstatus;
00704 /* Lookahead token as an internal (translated) token number. */
00705 int yychar1 = 0;
00706
00707 /* Three stacks and their tools:
00708 `yyss': related to states,
00709 `yyvs': related to semantic values,
00710 `yyls': related to locations.
00711
00712 Refer to the stacks thru separate pointers, to allow yyoverflow
00713 to reallocate them elsewhere. */
00714
00715 /* The state stack. */
00716 short yyssa[YYINITDEPTH];
00717 short *yyss = yyssa;
00718 register short *yyssp;
00719
00720 /* The semantic value stack. */
00721 YYSTYPE yyvsa[YYINITDEPTH];
00722 YYSTYPE *yyvs = yyvsa;
00723 register YYSTYPE *yyvsp;
00724
00725 #if YYLSP_NEEDED
00726 /* The location stack. */
00727 YYLTYPE yylsa[YYINITDEPTH];
00728 YYLTYPE *yyls = yylsa;
00729 YYLTYPE *yylsp;
00730 #endif
00731
00732 #if YYLSP_NEEDED
00733 # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
00734 #else
00735 # define YYPOPSTACK (yyvsp--, yyssp--)
00736 #endif
00737
00738 YYSIZE_T yystacksize = YYINITDEPTH;
00739
00740
00741 /* The variables used to return semantic value and location from the
00742 action routines. */
00743 YYSTYPE yyval;
00744 #if YYLSP_NEEDED
00745 YYLTYPE yyloc;
00746 #endif
00747
00748 /* When reducing, the number of symbols on the RHS of the reduced
00749 rule. */
00750 int yylen;
00751
00752 YYDPRINTF ((stderr, "Starting parse\n"));
00753
00754 yystate = 0;
00755 yyerrstatus = 0;
00756 yynerrs = 0;
00757 yychar = YYEMPTY; /* Cause a token to be read. */
00758
00759 /* Initialize stack pointers.
00760 Waste one element of value and location stack
00761 so that they stay on the same level as the state stack.
00762 The wasted elements are never initialized. */
00763
00764 yyssp = yyss;
00765 yyvsp = yyvs;
00766 #if YYLSP_NEEDED
00767 yylsp = yyls;
00768 #endif
00769 goto yysetstate;
00770
00771 /*------------------------------------------------------------.
00772 | yynewstate -- Push a new state, which is found in yystate. |
00773 `------------------------------------------------------------*/
00774 yynewstate:
00775 /* In all cases, when you get here, the value and location stacks
00776 have just been pushed. so pushing a state here evens the stacks.
00777 */
00778 yyssp++;
00779
00780 yysetstate:
00781 *yyssp = yystate;
00782
00783 if (yyssp >= yyss + yystacksize - 1)
00784 {
00785 /* Get the current used size of the three stacks, in elements. */
00786 YYSIZE_T yysize = yyssp - yyss + 1;
00787
00788 #ifdef yyoverflow
00789 {
00790 /* Give user a chance to reallocate the stack. Use copies of
00791 these so that the &'s don't force the real ones into
00792 memory. */
00793 YYSTYPE *yyvs1 = yyvs;
00794 short *yyss1 = yyss;
00795
00796 /* Each stack pointer address is followed by the size of the
00797 data in use in that stack, in bytes. */
00798 # if YYLSP_NEEDED
00799 YYLTYPE *yyls1 = yyls;
00800 /* This used to be a conditional around just the two extra args,
00801 but that might be undefined if yyoverflow is a macro. */
00802 yyoverflow ("parser stack overflow",
00803 &yyss1, yysize * sizeof (*yyssp),
00804 &yyvs1, yysize * sizeof (*yyvsp),
00805 &yyls1, yysize * sizeof (*yylsp),
00806 &yystacksize);
00807 yyls = yyls1;
00808 # else
00809 yyoverflow ("parser stack overflow",
00810 &yyss1, yysize * sizeof (*yyssp),
00811 &yyvs1, yysize * sizeof (*yyvsp),
00812 &yystacksize);
00813 # endif
00814 yyss = yyss1;
00815 yyvs = yyvs1;
00816 }
00817 #else /* no yyoverflow */
00818 # ifndef YYSTACK_RELOCATE
00819 goto yyoverflowlab;
00820 # else
00821 /* Extend the stack our own way. */
00822 if (yystacksize >= YYMAXDEPTH)
00823 goto yyoverflowlab;
00824 yystacksize *= 2;
00825 if (yystacksize > YYMAXDEPTH)
00826 yystacksize = YYMAXDEPTH;
00827
00828 {
00829 short *yyss1 = yyss;
00830 union yyalloc *yyptr =
00831 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
00832 if (! yyptr)
00833 goto yyoverflowlab;
00834 YYSTACK_RELOCATE (yyss);
00835 YYSTACK_RELOCATE (yyvs);
00836 # if YYLSP_NEEDED
00837 YYSTACK_RELOCATE (yyls);
00838 # endif
00839 # undef YYSTACK_RELOCATE
00840 if (yyss1 != yyssa)
00841 YYSTACK_FREE (yyss1);
00842 }
00843 # endif
00844 #endif /* no yyoverflow */
00845
00846 yyssp = yyss + yysize - 1;
00847 yyvsp = yyvs + yysize - 1;
00848 #if YYLSP_NEEDED
00849 yylsp = yyls + yysize - 1;
00850 #endif
00851
00852 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
00853 (unsigned long int) yystacksize));
00854
00855 if (yyssp >= yyss + yystacksize - 1)
00856 YYABORT;
00857 }
00858
00859 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
00860
00861 goto yybackup;
00862
00863
00864 /*-----------.
00865 | yybackup. |
00866 `-----------*/
00867 yybackup:
00868
00869 /* Do appropriate processing given the current state. */
00870 /* Read a lookahead token if we need one and don't already have one. */
00871 /* yyresume: */
00872
00873 /* First try to decide what to do without reference to lookahead token. */
00874
00875 yyn = yypact[yystate];
00876 if (yyn == YYFLAG)
00877 goto yydefault;
00878
00879 /* Not known => get a lookahead token if don't already have one. */
00880
00881 /* yychar is either YYEMPTY or YYEOF
00882 or a valid token in external form. */
00883
00884 if (yychar == YYEMPTY)
00885 {
00886 YYDPRINTF ((stderr, "Reading a token: "));
00887 yychar = YYLEX;
00888 }
00889
00890 /* Convert token to internal form (in yychar1) for indexing tables with */
00891
00892 if (yychar <= 0) /* This means end of input. */
00893 {
00894 yychar1 = 0;
00895 yychar = YYEOF; /* Don't call YYLEX any more */
00896
00897 YYDPRINTF ((stderr, "Now at end of input.\n"));
00898 }
00899 else
00900 {
00901 yychar1 = YYTRANSLATE (yychar);
00902
00903 #if YYDEBUG
00904 /* We have to keep this `#if YYDEBUG', since we use variables
00905 which are defined only if `YYDEBUG' is set. */
00906 if (yydebug)
00907 {
00908 YYFPRINTF (stderr, "Next token is %d (%s",
00909 yychar, yytname[yychar1]);
00910 /* Give the individual parser a way to print the precise
00911 meaning of a token, for further debugging info. */
00912 # ifdef YYPRINT
00913 YYPRINT (stderr, yychar, yylval);
00914 # endif
00915 YYFPRINTF (stderr, ")\n");
00916 }
00917 #endif
00918 }
00919
00920 yyn += yychar1;
00921 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
00922 goto yydefault;
00923
00924 yyn = yytable[yyn];
00925
00926 /* yyn is what to do for this token type in this state.
00927 Negative => reduce, -yyn is rule number.
00928 Positive => shift, yyn is new state.
00929 New state is final state => don't bother to shift,
00930 just return success.
00931 0, or most negative number => error. */
00932
00933 if (yyn < 0)
00934 {
00935 if (yyn == YYFLAG)
00936 goto yyerrlab;
00937 yyn = -yyn;
00938 goto yyreduce;
00939 }
00940 else if (yyn == 0)
00941 goto yyerrlab;
00942
00943 if (yyn == YYFINAL)
00944 YYACCEPT;
00945
00946 /* Shift the lookahead token. */
00947 YYDPRINTF ((stderr, "Shifting token %d (%s), ",
00948 yychar, yytname[yychar1]));
00949
00950 /* Discard the token being shifted unless it is eof. */
00951 if (yychar != YYEOF)
00952 yychar = YYEMPTY;
00953
00954 *++yyvsp = yylval;
00955 #if YYLSP_NEEDED
00956 *++yylsp = yylloc;
00957 #endif
00958
00959 /* Count tokens shifted since error; after three, turn off error
00960 status. */
00961 if (yyerrstatus)
00962 yyerrstatus--;
00963
00964 yystate = yyn;
00965 goto yynewstate;
00966
00967
00968 /*-----------------------------------------------------------.
00969 | yydefault -- do the default action for the current state. |
00970 `-----------------------------------------------------------*/
00971 yydefault:
00972 yyn = yydefact[yystate];
00973 if (yyn == 0)
00974 goto yyerrlab;
00975 goto yyreduce;
00976
00977
00978 /*-----------------------------.
00979 | yyreduce -- Do a reduction. |
00980 `-----------------------------*/
00981 yyreduce:
00982 /* yyn is the number of a rule to reduce with. */
00983 yylen = yyr2[yyn];
00984
00985 /* If YYLEN is nonzero, implement the default value of the action:
00986 `$$ = $1'.
00987
00988 Otherwise, the following line sets YYVAL to the semantic value of
00989 the lookahead token. This behavior is undocumented and Bison
00990 users should not rely upon it. Assigning to YYVAL
00991 unconditionally makes the parser a bit smaller, and it avoids a
00992 GCC warning that YYVAL may be used uninitialized. */
00993 yyval = yyvsp[1-yylen];
00994
00995 #if YYLSP_NEEDED
00996 /* Similarly for the default location. Let the user run additional
00997 commands if for instance locations are ranges. */
00998 yyloc = yylsp[1-yylen];
00999 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
01000 #endif
01001
01002 #if YYDEBUG
01003 /* We have to keep this `#if YYDEBUG', since we use variables which
01004 are defined only if `YYDEBUG' is set. */
01005 if (yydebug)
01006 {
01007 int yyi;
01008
01009 YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
01010 yyn, yyrline[yyn]);
01011
01012 /* Print the symbols being reduced, and their result. */
01013 for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
01014 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
01015 YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
01016 }
01017 #endif
01018
01019 switch (yyn) {
01020
01021 case 1:
01022 #line 137 "ast_expr.y"
01023 { ((struct parser_control *)kota)->result = yyval.val; ;
01024 break;}
01025 case 3:
01026 #line 141 "ast_expr.y"
01027 { yyval.val = yyvsp[-1].val; yyloc.first_column = yylsp[-2].first_column; yyloc.last_column = yylsp[0].last_column; yyloc.first_line=0; yyloc.last_line=0;;
01028 break;}
01029 case 4:
01030 #line 142 "ast_expr.y"
01031 { yyval.val = op_or (yyvsp[-2].val, yyvsp[0].val); yyloc.first_column = yylsp[-2].first_column; yyloc.last_column = yylsp[0].last_column; yyloc.first_line=0; yyloc.last_line=0;;
01032 break;}
01033 case 5:
01034 #line 143 "ast_expr.y"
01035 { yyval.val = op_and (yyvsp[-2].val, yyvsp[0].val); yyloc.first_column = yylsp[-2].first_column; yyloc.last_column = yylsp[0].last_column; yyloc.first_line=0; yyloc.last_line=0;;
01036 break;}
01037 case 6:
01038 #line 144 "ast_expr.y"
01039 { yyval.val = op_eq (yyvsp[-2].val, yyvsp[0].val); yyloc.first_column = yylsp[-2].first_column; yyloc.last_column = yylsp[0].last_column; yyloc.first_line=0; yyloc.last_line=0;;
01040 break;}
01041 case 7:
01042 #line 145 "ast_expr.y"
01043 { yyval.val = op_gt (yyvsp[-2].val, yyvsp[0].val); yyloc.first_column = yylsp[-2].first_column; yyloc.last_column = yylsp[0].last_column; yyloc.first_line=0; yyloc.last_line=0;;
01044 break;}
01045 case 8:
01046 #line 146 "ast_expr.y"
01047 { yyval.val = op_lt (yyvsp[-2].val, yyvsp[0].val); yyloc.first_column = yylsp[-2].first_column; yyloc.last_column = yylsp[0].last_column; yyloc.first_line=0; yyloc.last_line=0;;
01048 break;}
01049 case 9:
01050 #line 147 "ast_expr.y"
01051 { yyval.val = op_ge (yyvsp[-2].val, yyvsp[0].val); yyloc.first_column = yylsp[-2].first_column; yyloc.last_column = yylsp[0].last_column; yyloc.first_line=0; yyloc.last_line=0;;
01052 break;}
01053 case 10:
01054 #line 148 "ast_expr.y"
01055 { yyval.val = op_le (yyvsp[-2].val, yyvsp[0].val); yyloc.first_column = yylsp[-2].first_column; yyloc.last_column = yylsp[0].last_column; yyloc.first_line=0; yyloc.last_line=0;;
01056 break;}
01057 case 11:
01058 #line 149 "ast_expr.y"
01059 { yyval.val = op_ne (yyvsp[-2].val, yyvsp[0].val); yyloc.first_column = yylsp[-2].first_column; yyloc.last_column = yylsp[0].last_column; yyloc.first_line=0; yyloc.last_line=0;;
01060 break;}
01061 case 12:
01062 #line 150 "ast_expr.y"
01063 { yyval.val = op_plus (yyvsp[-2].val, yyvsp[0].val); yyloc.first_column = yylsp[-2].first_column; yyloc.last_column = yylsp[0].last_column; yyloc.first_line=0; yyloc.last_line=0;;
01064 break;}
01065 case 13:
01066 #line 151 "ast_expr.y"
01067 { yyval.val = op_minus (yyvsp[-2].val, yyvsp[0].val); yyloc.first_column = yylsp[-2].first_column; yyloc.last_column = yylsp[0].last_column; yyloc.first_line=0; yyloc.last_line=0;;
01068 break;}
01069 case 14:
01070 #line 152 "ast_expr.y"
01071 { yyval.val = op_times (yyvsp[-2].val, yyvsp[0].val); yyloc.first_column = yylsp[-2].first_column; yyloc.last_column = yylsp[0].last_column; yyloc.first_line=0; yyloc.last_line=0;;
01072 break;}
01073 case 15:
01074 #line 153 "ast_expr.y"
01075 { yyval.val = op_div (yyvsp[-2].val, yyvsp[0].val); yyloc.first_column = yylsp[-2].first_column; yyloc.last_column = yylsp[0].last_column; yyloc.first_line=0; yyloc.last_line=0;;
01076 break;}
01077 case 16:
01078 #line 154 "ast_expr.y"
01079 { yyval.val = op_rem (yyvsp[-2].val, yyvsp[0].val); yyloc.first_column = yylsp[-2].first_column; yyloc.last_column = yylsp[0].last_column; yyloc.first_line=0; yyloc.last_line=0;;
01080 break;}
01081 case 17:
01082 #line 155 "ast_expr.y"
01083 { yyval.val = op_colon (yyvsp[-2].val, yyvsp[0].val); yyloc.first_column = yylsp[-2].first_column; yyloc.last_column = yylsp[0].last_column; yyloc.first_line=0; yyloc.last_line=0;;
01084 break;}
01085 }
01086
01087 #line 705 "/usr/share/bison/bison.simple"
01088
01089
01090 yyvsp -= yylen;
01091 yyssp -= yylen;
01092 #if YYLSP_NEEDED
01093 yylsp -= yylen;
01094 #endif
01095
01096 #if YYDEBUG
01097 if (yydebug)
01098 {
01099 short *yyssp1 = yyss - 1;
01100 YYFPRINTF (stderr, "state stack now");
01101 while (yyssp1 != yyssp)
01102 YYFPRINTF (stderr, " %d", *++yyssp1);
01103 YYFPRINTF (stderr, "\n");
01104 }
01105 #endif
01106
01107 *++yyvsp = yyval;
01108 #if YYLSP_NEEDED
01109 *++yylsp = yyloc;
01110 #endif
01111
01112 /* Now `shift' the result of the reduction. Determine what state
01113 that goes to, based on the state we popped back to and the rule
01114 number reduced by. */
01115
01116 yyn = yyr1[yyn];
01117
01118 yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
01119 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
01120 yystate = yytable[yystate];
01121 else
01122 yystate = yydefgoto[yyn - YYNTBASE];
01123
01124 goto yynewstate;
01125
01126
01127 /*------------------------------------.
01128 | yyerrlab -- here on detecting error |
01129 `------------------------------------*/
01130 yyerrlab:
01131 /* If not already recovering from an error, report this error. */
01132 if (!yyerrstatus)
01133 {
01134 ++yynerrs;
01135
01136 #ifdef YYERROR_VERBOSE
01137 yyn = yypact[yystate];
01138
01139 if (yyn > YYFLAG && yyn < YYLAST)
01140 {
01141 YYSIZE_T yysize = 0;
01142 char *yymsg;
01143 int yyx, yycount;
01144
01145 yycount = 0;
01146 /* Start YYX at -YYN if negative to avoid negative indexes in
01147 YYCHECK. */
01148 for (yyx = yyn < 0 ? -yyn : 0;
01149 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
01150 if (yycheck[yyx + yyn] == yyx)
01151 yysize += yystrlen (yytname[yyx]) + 15, yycount++;
01152 yysize += yystrlen ("parse error, unexpected ") + 1;
01153 yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
01154 yymsg = (char *) YYSTACK_ALLOC (yysize);
01155 if (yymsg != 0)
01156 {
01157 char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
01158 yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
01159
01160 if (yycount < 5)
01161 {
01162 yycount = 0;
01163 for (yyx = yyn < 0 ? -yyn : 0;
01164 yyx < (int) (sizeof (yytname) / sizeof (char *));
01165 yyx++)
01166 if (yycheck[yyx + yyn] == yyx)
01167 {
01168 const char *yyq = ! yycount ? ", expecting " : " or ";
01169 yyp = yystpcpy (yyp, yyq);
01170 yyp = yystpcpy (yyp, yytname[yyx]);
01171 yycount++;
01172 }
01173 }
01174 yyerror (yymsg);
01175 YYSTACK_FREE (yymsg);
01176 }
01177 else
01178 yyerror ("parse error; also virtual memory exhausted");
01179 }
01180 else
01181 #endif /* defined (YYERROR_VERBOSE) */
01182 yyerror ("parse error");
01183 }
01184 goto yyerrlab1;
01185
01186
01187 /*--------------------------------------------------.
01188 | yyerrlab1 -- error raised explicitly by an action |
01189 `--------------------------------------------------*/
01190 yyerrlab1:
01191 if (yyerrstatus == 3)
01192 {
01193 /* If just tried and failed to reuse lookahead token after an
01194 error, discard it. */
01195
01196 /* return failure if at end of input */
01197 if (yychar == YYEOF)
01198 YYABORT;
01199 YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
01200 yychar, yytname[yychar1]));
01201 yychar = YYEMPTY;
01202 }
01203
01204 /* Else will try to reuse lookahead token after shifting the error
01205 token. */
01206
01207 yyerrstatus = 3; /* Each real token shifted decrements this */
01208
01209 goto yyerrhandle;
01210
01211
01212 /*-------------------------------------------------------------------.
01213 | yyerrdefault -- current state does not do anything special for the |
01214 | error token. |
01215 `-------------------------------------------------------------------*/
01216 yyerrdefault:
01217 #if 0
01218 /* This is wrong; only states that explicitly want error tokens
01219 should shift them. */
01220
01221 /* If its default is to accept any token, ok. Otherwise pop it. */
01222 yyn = yydefact[yystate];
01223 if (yyn)
01224 goto yydefault;
01225 #endif
01226
01227
01228 /*---------------------------------------------------------------.
01229 | yyerrpop -- pop the current state because it cannot handle the |
01230 | error token |
01231 `---------------------------------------------------------------*/
01232 yyerrpop:
01233 if (yyssp == yyss)
01234 YYABORT;
01235 yyvsp--;
01236 yystate = *--yyssp;
01237 #if YYLSP_NEEDED
01238 yylsp--;
01239 #endif
01240
01241 #if YYDEBUG
01242 if (yydebug)
01243 {
01244 short *yyssp1 = yyss - 1;
01245 YYFPRINTF (stderr, "Error: state stack now");
01246 while (yyssp1 != yyssp)
01247 YYFPRINTF (stderr, " %d", *++yyssp1);
01248 YYFPRINTF (stderr, "\n");
01249 }
01250 #endif
01251
01252 /*--------------.
01253 | yyerrhandle. |
01254 `--------------*/
01255 yyerrhandle:
01256 yyn = yypact[yystate];
01257 if (yyn == YYFLAG)
01258 goto yyerrdefault;
01259
01260 yyn += YYTERROR;
01261 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
01262 goto yyerrdefault;
01263
01264 yyn = yytable[yyn];
01265 if (yyn < 0)
01266 {
01267 if (yyn == YYFLAG)
01268 goto yyerrpop;
01269 yyn = -yyn;
01270 goto yyreduce;
01271 }
01272 else if (yyn == 0)
01273 goto yyerrpop;
01274
01275 if (yyn == YYFINAL)
01276 YYACCEPT;
01277
01278 YYDPRINTF ((stderr, "Shifting error token, "));
01279
01280 *++yyvsp = yylval;
01281 #if YYLSP_NEEDED
01282 *++yylsp = yylloc;
01283 #endif
01284
01285 yystate = yyn;
01286 goto yynewstate;
01287
01288
01289 /*-------------------------------------.
01290 | yyacceptlab -- YYACCEPT comes here. |
01291 `-------------------------------------*/
01292 yyacceptlab:
01293 yyresult = 0;
01294 goto yyreturn;
01295
01296 /*-----------------------------------.
01297 | yyabortlab -- YYABORT comes here. |
01298 `-----------------------------------*/
01299 yyabortlab:
01300 yyresult = 1;
01301 goto yyreturn;
01302
01303 /*---------------------------------------------.
01304 | yyoverflowab -- parser overflow comes here. |
01305 `---------------------------------------------*/
01306 yyoverflowlab:
01307 yyerror ("parser stack overflow");
01308 yyresult = 2;
01309 /* Fall through. */
01310
01311 yyreturn:
01312 #ifndef yyoverflow
01313 if (yyss != yyssa)
01314 YYSTACK_FREE (yyss);
01315 #endif
01316 return yyresult;
01317 }
|
|
|
Definition at line 1983 of file ast_expr.c. Referenced by ast_getformatname_multiple(), callerid_feed(), MD5Transform(), and tdd_feed(). |
|
|
Definition at line 1874 of file ast_expr.c. |
1.2.15