/* Bison implementation for Yacc-like parsers in C Copyright(C)1984,1989-1990,2000-2011FreeSoftwareFoundation,Inc. Thisprogramisfreesoftware:youcanredistributeitand/ormodify itunderthetermsoftheGNUGeneralPublicLicenseaspublishedby theFreeSoftwareFoundation,eitherversion3oftheLicense,or (atyouroption)anylaterversion. Thisprogramisdistributedinthehopethatitwillbeuseful, butWITHOUTANYWARRANTY;withouteventheimpliedwarrantyof MERCHANTABILITYorFITNESSFORAPARTICULARPURPOSE.Seethe GNUGeneralPublicLicenseformoredetails. YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains partoralloftheBisonparserskeletonanddistributethatwork undertermsofyourchoice,solongasthatworkisn'titselfa parsergeneratorusingtheskeletonoramodifiedversionthereof asaparserskeleton.Alternatively,ifyoumodifyorredistribute theparserskeletonitself,youmay(atyouroption)removethis specialexception,whichwillcausetheskeletonandtheresulting BisonoutputfilestobelicensedundertheGNUGeneralPublic Licensewithoutthisspecialexception. ThisspecialexceptionwasaddedbytheFreeSoftwareFoundationin
version 2.2 of Bison. */
/* C LALR(1) parser skeleton written by Richard Stallman, by
simplifying the original so-called "semantic" parser. */
/* All symbols defined below should begin with yy or YY, to avoid infringingonusernamespace.Thisshouldbedoneevenforlocal variables,astheymightotherwisebeexpandedbyusermacros. Therearesomeunavoidableexceptionswithinincludefilesto definenecessarylibrarysymbols;theyarenoted"INFRINGESON
USER NAME SPACE" below. */
#ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER) # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsignedint # endif #endif
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_ # ifdefined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) # endif # endif # ifndef YY_ # define YY_(msgid) msgid # endif #endif
/* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(e) ((void) (e)) #else # define YYUSE(e) /* empty */ #endif
/* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint # define YYID(n) (n) #else #if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER) staticint
YYID (int yyi) #else staticint
YYID (yyi) int yyi; #endif
{ return yyi;
} #endif
#if ! defined yyoverflow || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
# ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # endif # endif # endif
# ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, andapagesizecanbeassmallas4096bytes.Sowecannotsafely invokealloca(N)ifNexceeds4096.Useaslightlysmallernumber
to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032/* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
&& (defined YYFREE || defined free))) # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif/* ! defined yyoverflow || YYERROR_VERBOSE */
#if (! defined yyoverflow \
&& (! defined __cplusplus \
|| (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */ union yyalloc
{
yytype_int16 yyss_alloc;
YYSTYPE yyvs_alloc;
};
/* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
/* The size of an array large to enough to hold all stacks, each with
N elements. */ # define YYSTACK_BYTES(N) \
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
# define YYCOPY_NEEDED 1
/* Relocate STACK from its old location to the new one. The localvariablesYYSIZEandYYSTACKSIZEgivetheoldandnewnumberof elementsinthestack,andYYPTRgivesthenewlocationofthe stack.AdvanceYYPTRtoaproperlyalignedlocationforthenext
stack. */ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \
{ \
YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \ while (YYID (0))
#endif
#ifdefined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */ # ifndef YYCOPY # ifdefined __GNUC__ && 1 < __GNUC__ # define YYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \
{ \
YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \ while (YYID (0)) # endif # endif #endif/* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */ #define YYFINAL 28 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 128
/* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 45 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 14 /* YYNRULES -- Number of rules. */ #define YYNRULES 53 /* YYNRULES -- Number of states. */ #define YYNSTATES 96
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 293
/* Like YYERROR except do call yyerror. This remains here temporarily toeasethetransitiontothenewmeaningofYYERROR,forGCC. OnceGCCversion2hassupplantedversion1,thiscango.However, YYFAILappearstobeinuse.Nevertheless,itisformallydeprecated inBison2.4.2'sNEWSentry,whereaplantophaseitoutis
discussed. */
#define YYFAIL goto yyerrlab #ifdefined YYFAIL /* This is here to suppress warnings from the GCC cpp's -Wunused-macros.Normallywedon'tworryaboutthatwarning,but someusersdo,andwewanttomakeiteasyforuserstoremove
YYFAIL uses, which will produce warnings from Bison 2.5. */ #endif
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. IfNis0,thensetCURRENTtotheemptylocationwhichends
the previous symbol: RHS[0] (always defined). */
/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message abouttheunexpectedtokenYYTOKENforthestatestackwhosetopis YYSSP.
Return0if*YYMSGwassuccessfullywritten.Return1if*YYMSGis notlargeenoughtoholdthemessage.Inthatcase,alsoset *YYMSG_ALLOCtotherequirednumberofbytes.Return2ifthe
required number of bytes is too large to store. */ staticint
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
yytype_int16 *yyssp, int yytoken)
{
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
YYSIZE_T yysize = yysize0;
YYSIZE_T yysize1; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ constchar *yyformat = 0; /* Arguments of yyformat. */ charconst *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per
"expected"). */ int yycount = 0;
/* There are many possibilities here to consider: -AssumeYYFAILisnotused.It'stooflawedtoconsider.See <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> fordetails.YYERRORisfineasitdoesnotinvokethis function. -Ifthisstateisaconsistentstatewithadefaultaction,then theonlywaythisfunctionwasinvokedisifthedefaultaction isanerroraction.Inthatcase,don'tcheckforexpected tokensbecausetherearenone. -Theonlywaytherecanbenolookaheadpresent(inyychar)isif thisstateisaconsistentstatewithadefaultaction.Thus, detectingtheabsenceofalookaheadissufficienttodetermine thatthereisnounexpectedorexpectedtokentoreport.Inthat case,justreportasimple"syntaxerror". -Don'tassumethereisn'talookaheadjustbecausethisstateisa consistentstatewithadefaultaction.Theremighthavebeena previousinconsistentstate,consistentstatewithanon-default action,orusersemanticactionthatmanipulatedyychar. -Ofcourse,theexpectedtokenlistdependsonstatestohave correctlookaheadinformation,anditdependsontheparsernot toperformextrareductionsafterfetchingalookaheadfromthe scannerandbeforedetectingasyntaxerror.Thus,statemerging (fromLALRorIELR)anddefaultreductionscorrupttheexpected tokenlist.However,thelistiscorrectforcanonicalLRwith oneexception:itwillstillcontainanytokenthatwillnotbe acceptedduetoanerroractioninalaterstate.
*/ if (yytoken != YYEMPTY)
{ int yyn = yypact[*yyssp];
yyarg[yycount++] = yytname[yytoken]; if (!yypact_value_is_default (yyn))
{ /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK.Inotherwords,skipthefirst-YYNactionsfor
this state because they are default actions. */ 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 yyx;
/* Avoid sprintf, as that infringes on the user's name space. Don'thaveundefinedbehaviorevenifthetranslation
produced a string with the wrong number of "%s"s. */
{ char *yyp = *yymsg; int yyi = 0; while ((*yyp = *yyformat) != '\0') if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
{
yyp += yytnamerr (yyp, yyarg[yyi++]);
yyformat += 2;
} else
{
yyp++;
yyformat++;
}
} return0;
} #endif/* YYERROR_VERBOSE */
/*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER) staticvoid
yydestruct (constchar *yymsg, int yytype, YYSTYPE *yyvaluep, ap_expr_parse_ctx_t *ctx) #else staticvoid
yydestruct (yymsg, yytype, yyvaluep, ctx) constchar *yymsg; int yytype;
YYSTYPE *yyvaluep;
ap_expr_parse_ctx_t *ctx; #endif
{
YYUSE (yyvaluep);
YYUSE (ctx);
if (!yymsg)
yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
switch (yytype)
{
default: break;
}
}
/* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #ifdefined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); #else int yyparse (); #endif #else/* ! YYPARSE_PARAM */ #ifdefined __STDC__ || defined __cplusplus int yyparse (ap_expr_parse_ctx_t *ctx); #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 #else/* ! YYPARSE_PARAM */ #if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER) int
yyparse (ap_expr_parse_ctx_t *ctx) #else int
yyparse (ctx)
ap_expr_parse_ctx_t *ctx; #endif #endif
{ /* The lookahead symbol. */ int yychar;
/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
/* 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':relatedtostates. `yyvs':relatedtosemanticvalues.
Refertothestacksthruseparatepointers,toallowyyoverflow
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;
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;
#if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf;
YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers. Wasteoneelementofvalueandlocationstack sothattheystayonthesamelevelasthestatestack.
The wasted elements are never initialized. */
yyssp = yyss;
yyvsp = yyvs;
goto yysetstate;
/* TODO: compiler warning that this is unused, and it seems to */
(void)yynerrs; /*------------------------------------------------------------. |yynewstate--Pushanewstate,whichisfoundinyystate.|
`------------------------------------------------------------*/
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 thesesothatthe&'sdon'tforcetherealonesinto
memory. */
YYSTYPE *yyvs1 = yyvs;
yytype_int16 *yyss1 = yyss;
/* Each stack pointer address is followed by the size of the datainuseinthatstack,inbytes.Thisusedtobea conditionalaroundjustthetwoextraargs,butthatmight
be undefined if yyoverflow is a macro. */
yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
&yystacksize);
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;
/* 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. */
yyn = yypact[yystate]; if (yypact_value_is_default (yyn)) goto yydefault;
/* 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);
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 (yytable_value_is_error (yyn)) goto yyerrlab;
yyn = -yyn; goto yyreduce;
}
/* Count tokens shifted since error; after three, turn off error
status. */ if (yyerrstatus)
yyerrstatus--;
/*-----------------------------. |yyreduce--Doareduction.|
`-----------------------------*/
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,thefollowinglinesetsYYVALtogarbage. ThisbehaviorisundocumentedandBison usersshouldnotrelyuponit.AssigningtoYYVAL unconditionallymakestheparserabitsmaller,anditavoidsa
GCC warning that YYVAL may be used uninitialized. */
yyval = yyvsp[1-yylen];
YY_REDUCE_PRINT (yyn); switch (yyn)
{ case2:
/* Line 1806 of yacc.c */ #line112"util_expr_parse.y"
{ ctx->expr = (yyvsp[(2) - (2)].exVal); } break;
case3:
/* Line 1806 of yacc.c */ #line113"util_expr_parse.y"
{ ctx->expr = (yyvsp[(2) - (2)].exVal); } break;
case4:
/* Line 1806 of yacc.c */ #line114"util_expr_parse.y"
{ YYABORT; } break;
case5:
/* Line 1806 of yacc.c */ #line117"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_make(op_True, NULL, NULL, ctx); } break;
case6:
/* Line 1806 of yacc.c */ #line118"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_make(op_False, NULL, NULL, ctx); } break;
case7:
/* Line 1806 of yacc.c */ #line119"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_make(op_Not, (yyvsp[(2) - (2)].exVal), NULL, ctx); } break;
case8:
/* Line 1806 of yacc.c */ #line120"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_make(op_Or, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); } break;
case9:
/* Line 1806 of yacc.c */ #line121"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_make(op_And, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); } break;
case10:
/* Line 1806 of yacc.c */ #line122"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_make(op_Comp, (yyvsp[(1) - (1)].exVal), NULL, ctx); } break;
case11:
/* Line 1806 of yacc.c */ #line123"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_unary_op_make( (yyvsp[(1) - (2)].cpVal), (yyvsp[(2) - (2)].exVal), ctx); } break;
/* Line 1806 of yacc.c */ #line125"util_expr_parse.y"
{ (yyval.exVal) = (yyvsp[(2) - (3)].exVal); } break;
case14:
/* Line 1806 of yacc.c */ #line126"util_expr_parse.y"
{ YYABORT; } break;
case15:
/* Line 1806 of yacc.c */ #line129"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_make(op_EQ, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); } break;
case16:
/* Line 1806 of yacc.c */ #line130"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_make(op_NE, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); } break;
case17:
/* Line 1806 of yacc.c */ #line131"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_make(op_LT, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); } break;
case18:
/* Line 1806 of yacc.c */ #line132"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_make(op_LE, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); } break;
case19:
/* Line 1806 of yacc.c */ #line133"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_make(op_GT, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); } break;
case20:
/* Line 1806 of yacc.c */ #line134"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_make(op_GE, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); } break;
case21:
/* Line 1806 of yacc.c */ #line135"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_make(op_STR_EQ, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); } break;
case22:
/* Line 1806 of yacc.c */ #line136"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_make(op_STR_NE, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); } break;
case23:
/* Line 1806 of yacc.c */ #line137"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_make(op_STR_LT, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); } break;
case24:
/* Line 1806 of yacc.c */ #line138"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_make(op_STR_LE, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); } break;
case25:
/* Line 1806 of yacc.c */ #line139"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_make(op_STR_GT, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); } break;
case26:
/* Line 1806 of yacc.c */ #line140"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_make(op_STR_GE, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); } break;
case27:
/* Line 1806 of yacc.c */ #line141"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_make(op_IN, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); } break;
case28:
/* Line 1806 of yacc.c */ #line142"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_make(op_REG, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); } break;
case29:
/* Line 1806 of yacc.c */ #line143"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_make(op_NRE, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); } break;
case30:
/* Line 1806 of yacc.c */ #line146"util_expr_parse.y"
{ (yyval.exVal) = (yyvsp[(1) - (1)].exVal); } break;
case31:
/* Line 1806 of yacc.c */ #line147"util_expr_parse.y"
{ (yyval.exVal) = (yyvsp[(2) - (3)].exVal); } break;
case32:
/* Line 1806 of yacc.c */ #line150"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_make(op_ListElement, (yyvsp[(1) - (1)].exVal), NULL, ctx); } break;
case33:
/* Line 1806 of yacc.c */ #line151"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_make(op_ListElement, (yyvsp[(3) - (3)].exVal), (yyvsp[(1) - (3)].exVal), ctx); } break;
case34:
/* Line 1806 of yacc.c */ #line154"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_make(op_Concat, (yyvsp[(1) - (2)].exVal), (yyvsp[(2) - (2)].exVal), ctx); } break;
case35:
/* Line 1806 of yacc.c */ #line155"util_expr_parse.y"
{ (yyval.exVal) = (yyvsp[(1) - (1)].exVal); } break;
case36:
/* Line 1806 of yacc.c */ #line156"util_expr_parse.y"
{ YYABORT; } break;
case37:
/* Line 1806 of yacc.c */ #line159"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_make(op_String, (yyvsp[(1) - (1)].cpVal), NULL, ctx); } break;
case38:
/* Line 1806 of yacc.c */ #line160"util_expr_parse.y"
{ (yyval.exVal) = (yyvsp[(1) - (1)].exVal); } break;
case39:
/* Line 1806 of yacc.c */ #line161"util_expr_parse.y"
{ (yyval.exVal) = (yyvsp[(1) - (1)].exVal); } break;
case40:
/* Line 1806 of yacc.c */ #line164"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_var_make((yyvsp[(2) - (3)].cpVal), ctx); } break;
case41:
/* Line 1806 of yacc.c */ #line165"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_str_func_make((yyvsp[(2) - (5)].cpVal), (yyvsp[(4) - (5)].exVal), ctx); } break;
case42:
/* Line 1806 of yacc.c */ #line168"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_make(op_Digit, (yyvsp[(1) - (1)].cpVal), NULL, ctx); } break;
case43:
/* Line 1806 of yacc.c */ #line169"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_make(op_Concat, (yyvsp[(1) - (3)].exVal), (yyvsp[(3) - (3)].exVal), ctx); } break;
case44:
/* Line 1806 of yacc.c */ #line170"util_expr_parse.y"
{ (yyval.exVal) = (yyvsp[(1) - (1)].exVal); } break;
case45:
/* Line 1806 of yacc.c */ #line171"util_expr_parse.y"
{ (yyval.exVal) = (yyvsp[(1) - (1)].exVal); } break;
case46:
/* Line 1806 of yacc.c */ #line172"util_expr_parse.y"
{ (yyval.exVal) = (yyvsp[(1) - (1)].exVal); } break;
case47:
/* Line 1806 of yacc.c */ #line173"util_expr_parse.y"
{ (yyval.exVal) = (yyvsp[(2) - (3)].exVal); } break;
case48:
/* Line 1806 of yacc.c */ #line174"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_make(op_String, "", NULL, ctx); } break;
case49:
/* Line 1806 of yacc.c */ #line177"util_expr_parse.y"
{
ap_regex_t *regex; if ((regex = ap_pregcomp(ctx->pool, (yyvsp[(1) - (1)].cpVal),
AP_REG_EXTENDED|AP_REG_NOSUB)) == NULL) {
ctx->error = "Failed to compile regular expression";
YYERROR;
}
(yyval.exVal) = ap_expr_make(op_Regex, regex, NULL, ctx);
} break;
case50:
/* Line 1806 of yacc.c */ #line186"util_expr_parse.y"
{
ap_regex_t *regex; if ((regex = ap_pregcomp(ctx->pool, (yyvsp[(1) - (1)].cpVal),
AP_REG_EXTENDED|AP_REG_NOSUB|AP_REG_ICASE)) == NULL) {
ctx->error = "Failed to compile regular expression";
YYERROR;
}
(yyval.exVal) = ap_expr_make(op_Regex, regex, NULL, ctx);
} break;
case51:
/* Line 1806 of yacc.c */ #line197"util_expr_parse.y"
{ int *n = apr_palloc(ctx->pool, sizeof(int));
*n = (yyvsp[(1) - (1)].num);
(yyval.exVal) = ap_expr_make(op_RegexBackref, n, NULL, ctx);
} break;
case52:
/* Line 1806 of yacc.c */ #line204"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_list_func_make((yyvsp[(1) - (4)].cpVal), (yyvsp[(3) - (4)].exVal), ctx); } break;
case53:
/* Line 1806 of yacc.c */ #line207"util_expr_parse.y"
{ (yyval.exVal) = ap_expr_str_func_make((yyvsp[(1) - (4)].cpVal), (yyvsp[(3) - (4)].exVal), ctx); } break;
/* Line 1806 of yacc.c */ #line1891"util_expr_parse.c" default: break;
} /* User semantic actions sometimes alter yychar, and that requires thatyytokenbeupdatedwiththenewtranslation.Wetakethe approachoftranslatingimmediatelybeforeeveryuseofyytoken. Onealternativeistranslatinghereaftereverysemanticaction, butthattranslationwouldbemissedifthesemanticactioninvokes YYABORT,YYACCEPT,orYYERRORimmediatelyafteralteringyycharor ifitinvokesYYBACKUP.InthecaseofYYABORTorYYACCEPT,an incorrectdestructormightthenbeinvokedimmediately.Inthe caseofYYERRORorYYBACKUP,subsequentparseractionsmightlead toanincorrectdestructorcallorverbosesyntaxerrormessage
before the lookahead is translated. */
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
/*------------------------------------. |yyerrlab--hereondetectingerror|
`------------------------------------*/
yyerrlab: /* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
/* If not already recovering from an error, report this error. */ if (!yyerrstatus)
{
++yynerrs; #if ! YYERROR_VERBOSE
yyerror (ctx, YY_("syntax error")); #else # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
yyssp, yytoken)
{ charconst *yymsgp = YY_("syntax error"); int yysyntax_error_status;
yysyntax_error_status = YYSYNTAX_ERROR; if (yysyntax_error_status == 0)
yymsgp = yymsg; elseif (yysyntax_error_status == 1)
{ if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); if (!yymsg)
{
yymsg = yymsgbuf;
yymsg_alloc = sizeof yymsgbuf;
yysyntax_error_status = 2;
} else
{
yysyntax_error_status = YYSYNTAX_ERROR;
yymsgp = yymsg;
}
}
yyerror (ctx, yymsgp); if (yysyntax_error_status == 2) goto yyexhaustedlab;
} # undef YYSYNTAX_ERROR #endif
}
if (yyerrstatus == 3)
{ /* If just tried and failed to reuse lookahead token after an
error, discard it. */
if (yychar <= YYEOF)
{ /* Return failure if at end of input. */ if (yychar == YYEOF)
YYABORT;
} else
{
yydestruct ("Error: discarding",
yytoken, &yylval, ctx);
yychar = YYEMPTY;
}
}
/* Else will try to reuse lookahead token after shifting the error
token. */ goto yyerrlab1;
/* Pacify compilers like GCC when the user code never invokes YYERRORandthelabelyyerrorlabthereforeneverappearsinuser
code. */ if (/*CONSTCOND*/ 0) goto yyerrorlab;
/* Do not reclaim the symbols of the rule which action triggered
this YYERROR. */
YYPOPSTACK (yylen);
yylen = 0;
YY_STACK_PRINT (yyss, yyssp);
yystate = *yyssp; goto yyerrlab1;
/*-------------------------------------------------------------. |yyerrlab1--commoncodeforbothsyntaxerrorandYYERROR.|
`-------------------------------------------------------------*/
yyerrlab1:
yyerrstatus = 3; /* Each real token shifted decrements this. */
for (;;)
{
yyn = yypact[yystate]; if (!yypact_value_is_default (yyn))
{
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. */ if (yyssp == yyss)
YYABORT;
yyreturn: if (yychar != YYEMPTY)
{ /* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
yytoken = YYTRANSLATE (yychar);
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval, ctx);
} /* Do not reclaim the symbols of the rule which action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss)
{
yydestruct ("Cleanup: popping",
yystos[*yyssp], yyvsp, ctx);
YYPOPSTACK (1);
} #ifndef yyoverflow if (yyss != yyssa)
YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg); #endif /* Make sure YYID is used. */ return YYID (yyresult);
}
/* Line 2067 of yacc.c */ #line210"util_expr_parse.y"
void yyerror(ap_expr_parse_ctx_t *ctx, constchar *s)
{ /* s is allocated on the stack */
ctx->error = apr_pstrdup(ctx->ptemp, s);
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.41 Sekunden
(vorverarbeitet am 2026-09-29)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.