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. */
/* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */ enum yytokentype {
FTS_OPER = 258,
FTS_TEXT = 259,
FTS_TERM = 260,
FTS_NUMB = 261
}; #endif
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedefunion YYSTYPE
{
/* Line 293 of yacc.c */
int oper;
fts_ast_string_t* token;
fts_ast_node_t* node;
/* Line 293 of yacc.c */
} YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif
#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 _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 3 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 52
/* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 16 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 8 /* YYNRULES -- Number of rules. */ #define YYNRULES 24 /* YYNRULES -- Number of states. */ #define YYNSTATES 33
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 261
/* 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
#define YYERRCLEANUP \ do \ switch (yylastchar) \
{ \ case FTS_NUMB: \ case FTS_TEXT: \ case FTS_TERM: \
YYTOKENFREE(yylval.token); \ break; \ default: \ break; \
} \ while (YYID (0))
/* 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) #else staticvoid
yydestruct (yymsg, yytype, yyvaluep) constchar *yymsg; int yytype;
YYSTYPE *yyvaluep; #endif
{
YYUSE (yyvaluep);
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 (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 #else/* ! YYPARSE_PARAM */ #if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER) int
yyparse (void) #else int
yyparse ()
#endif #endif
{ /* The lookahead symbol. */ int yychar; /* The backup of yychar when there is an error and we're in yyerrlab. */ int yylastchar;
/* 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;
/*------------------------------------------------------------. |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 */
{
(yyval.node) = (yyvsp[(1) - (1)].node);
((fts_ast_state_t*) state)->root = (yyval.node);
} break;
case3:
/* Line 1806 of yacc.c */
{
(yyval.node) = NULL;
} break;
case4:
/* Line 1806 of yacc.c */
{
(yyval.node) = (yyvsp[(1) - (2)].node);
/* Line 1806 of yacc.c */
{
(yyval.node) = fts_ast_create_node_list(state, (yyvsp[(1) - (2)].node));
fts_ast_add_node((yyval.node), (yyvsp[(2) - (2)].node));
} break;
case16:
/* Line 1806 of yacc.c */
{
(yyval.node) = fts_ast_create_node_oper(state, FTS_IGNORE);
} break;
case17:
/* Line 1806 of yacc.c */
{
(yyval.node) = fts_ast_create_node_oper(state, FTS_EXIST);
} break;
case18:
/* Line 1806 of yacc.c */
{
(yyval.node) = fts_ast_create_node_oper(state, FTS_NEGATE);
} break;
case19:
/* Line 1806 of yacc.c */
{
(yyval.node) = fts_ast_create_node_oper(state, FTS_DECR_RATING);
} break;
case20:
/* Line 1806 of yacc.c */
{
(yyval.node) = fts_ast_create_node_oper(state, FTS_INCR_RATING);
} break;
case21:
/* Line 1806 of yacc.c */
{
(yyval.node) = fts_ast_create_node_term(state, (yyvsp[(1) - (1)].token));
fts_ast_string_free((yyvsp[(1) - (1)].token));
} break;
case22:
/* Line 1806 of yacc.c */
{
(yyval.node) = fts_ast_create_node_term(state, (yyvsp[(1) - (1)].token));
fts_ast_string_free((yyvsp[(1) - (1)].token));
} break;
case23:
/* Line 1806 of yacc.c */
{
(yyval.node) = (yyvsp[(2) - (2)].node);
} break;
case24:
/* Line 1806 of yacc.c */
{
(yyval.node) = fts_ast_create_node_text(state, (yyvsp[(1) - (1)].token));
fts_ast_string_free((yyvsp[(1) - (1)].token));
} break;
/* Line 1806 of yacc.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: /* Backup yychar, in case we would change it. */
yylastchar = yychar; /* 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 (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 (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)
{ /* Since we don't need the token, we have to free it first. */
YYERRCLEANUP;
YYABORT;
}
} else
{
yydestruct ("Error: discarding",
yytoken, &yylval);
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)
{ /* Since we don't need the error token, we have to free it first. */
YYERRCLEANUP;
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);
} /* 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);
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);
}
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.