47 #define YYBISON_VERSION "2.5"
50 #define YYSKELETON_NAME "yacc.c"
62 #define YYLSP_NEEDED 0
65 #define yyparse ftsparse
67 #define yyerror ftserror
68 #define yylval ftslval
69 #define yychar ftschar
70 #define yydebug ftsdebug
71 #define yynerrs ftsnerrs
87 extern int fts_blexer(
YYSTYPE*, yyscan_t);
88 extern int fts_tlexer(
YYSTYPE*, yyscan_t);
90 typedef int (*fts_scan)();
92 extern int ftserror(
const char* p);
95 #define ftslex fts_lexer
97 #define YYERROR_VERBOSE
100 #define YYPARSE_PARAM state
101 #define YYLEX_PARAM ((fts_ast_state_t*) state)->lexer
103 typedef int (*fts_scanner_alt)(
YYSTYPE* val, yyscan_t yyscanner);
104 typedef int (*fts_scanner)();
114 #line 115 "fts0pars.cc"
122 #ifdef YYERROR_VERBOSE
123 # undef YYERROR_VERBOSE
124 # define YYERROR_VERBOSE 1
126 # define YYERROR_VERBOSE 0
130 #ifndef YYTOKEN_TABLE
131 # define YYTOKEN_TABLE 0
150 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
155 #line 61 "fts0pars.y"
164 #line 165 "fts0pars.cc"
166 # define YYSTYPE_IS_TRIVIAL 1
167 # define yystype YYSTYPE
168 # define YYSTYPE_IS_DECLARED 1
176 #line 177 "fts0pars.cc"
183 typedef YYTYPE_UINT8 yytype_uint8;
185 typedef unsigned char yytype_uint8;
189 typedef YYTYPE_INT8 yytype_int8;
190 #elif (defined __STDC__ || defined __C99__FUNC__ \
191 || defined __cplusplus || defined _MSC_VER)
192 typedef signed char yytype_int8;
194 typedef short int yytype_int8;
198 typedef YYTYPE_UINT16 yytype_uint16;
200 typedef unsigned short int yytype_uint16;
204 typedef YYTYPE_INT16 yytype_int16;
206 typedef short int yytype_int16;
210 # ifdef __SIZE_TYPE__
211 # define YYSIZE_T __SIZE_TYPE__
212 # elif defined size_t
213 # define YYSIZE_T size_t
214 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
215 || defined __cplusplus || defined _MSC_VER)
217 # define YYSIZE_T size_t
219 # define YYSIZE_T unsigned int
223 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
226 # if defined YYENABLE_NLS && YYENABLE_NLS
228 # include <libintl.h>
229 # define YY_(msgid) dgettext ("bison-runtime", msgid)
233 # define YY_(msgid) msgid
238 #if ! defined lint || defined __GNUC__
239 # define YYUSE(e) ((void) (e))
248 #if (defined __STDC__ || defined __C99__FUNC__ \
249 || defined __cplusplus || defined _MSC_VER)
262 #if ! defined yyoverflow || YYERROR_VERBOSE
266 # ifdef YYSTACK_USE_ALLOCA
267 # if YYSTACK_USE_ALLOCA
269 # define YYSTACK_ALLOC __builtin_alloca
270 # elif defined __BUILTIN_VA_ARG_INCR
273 # define YYSTACK_ALLOC __alloca
274 # elif defined _MSC_VER
276 # define alloca _alloca
278 # define YYSTACK_ALLOC alloca
279 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
280 || defined __cplusplus || defined _MSC_VER)
282 # ifndef EXIT_SUCCESS
283 # define EXIT_SUCCESS 0
290 # ifdef YYSTACK_ALLOC
292 # define YYSTACK_FREE(Ptr) do { ; } while (YYID (0))
293 # ifndef YYSTACK_ALLOC_MAXIMUM
298 # define YYSTACK_ALLOC_MAXIMUM 4032
301 # define YYSTACK_ALLOC YYMALLOC
302 # define YYSTACK_FREE YYFREE
303 # ifndef YYSTACK_ALLOC_MAXIMUM
304 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
306 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
307 && ! ((defined YYMALLOC || defined malloc) \
308 && (defined YYFREE || defined free)))
310 # ifndef EXIT_SUCCESS
311 # define EXIT_SUCCESS 0
315 # define YYMALLOC malloc
316 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
317 || defined __cplusplus || defined _MSC_VER)
318 void *malloc (YYSIZE_T);
323 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
324 || defined __cplusplus || defined _MSC_VER)
332 #if (! defined yyoverflow \
333 && (! defined __cplusplus \
334 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
339 yytype_int16 yyss_alloc;
344 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
348 # define YYSTACK_BYTES(N) \
349 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
350 + YYSTACK_GAP_MAXIMUM)
352 # define YYCOPY_NEEDED 1
359 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
362 YYSIZE_T yynewbytes; \
363 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
364 Stack = &yyptr->Stack_alloc; \
365 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
366 yyptr += yynewbytes / sizeof (*yyptr); \
372 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
376 # if defined __GNUC__ && 1 < __GNUC__
377 # define YYCOPY(To, From, Count) \
378 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
380 # define YYCOPY(To, From, Count) \
384 for (yyi = 0; yyi < (Count); yyi++) \
385 (To)[yyi] = (From)[yyi]; \
408 #define YYMAXUTOK 261
410 #define YYTRANSLATE(YYX) \
411 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
414 static const yytype_uint8 yytranslate[] =
416 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
417 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
418 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
419 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
420 12, 13, 14, 7, 2, 8, 2, 2, 2, 2,
421 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
422 10, 2, 11, 2, 15, 2, 2, 2, 2, 2,
423 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
424 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
425 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
426 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
427 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
428 2, 2, 2, 2, 2, 2, 9, 2, 2, 2,
429 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
430 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
431 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
432 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
433 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
434 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
435 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
436 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
437 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
438 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
439 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
440 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
441 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
448 static const yytype_uint8 yyprhs[] =
450 0, 0, 3, 5, 6, 9, 12, 16, 21, 23,
451 25, 28, 32, 36, 39, 44, 47, 49, 51, 53,
456 static const yytype_int8 yyrhs[] =
458 17, 0, -1, 18, -1, -1, 18, 20, -1, 18,
459 19, -1, 12, 18, 13, -1, 21, 12, 18, 13,
460 -1, 22, -1, 23, -1, 22, 14, -1, 23, 15,
461 6, -1, 21, 22, 14, -1, 21, 22, -1, 21,
462 23, 15, 6, -1, 21, 23, -1, 8, -1, 7,
463 -1, 9, -1, 10, -1, 11, -1, 5, -1, 6,
464 -1, 14, 22, -1, 4, -1
468 static const yytype_uint8 yyrline[] =
470 0, 79, 79, 85, 89, 99, 111, 115, 124, 128,
471 132, 136, 141, 147, 152, 159, 165, 169, 173, 177,
472 181, 186, 191, 197, 202
476 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
479 static const char *
const yytname[] =
481 "$end",
"error",
"$undefined",
"FTS_OPER",
"FTS_TEXT",
"FTS_TERM",
482 "FTS_NUMB",
"'+'",
"'-'",
"'~'",
"'<'",
"'>'",
"'('",
"')'",
"'*'",
483 "'@'",
"$accept",
"query",
"expr_lst",
"sub_expr",
"expr",
"prefix",
491 static const yytype_uint16 yytoknum[] =
493 0, 256, 257, 258, 259, 260, 261, 43, 45, 126,
494 60, 62, 40, 41, 42, 64
499 static const yytype_uint8 yyr1[] =
501 0, 16, 17, 18, 18, 18, 19, 19, 20, 20,
502 20, 20, 20, 20, 20, 20, 21, 21, 21, 21,
507 static const yytype_uint8 yyr2[] =
509 0, 2, 1, 0, 2, 2, 3, 4, 1, 1,
510 2, 3, 3, 2, 4, 2, 1, 1, 1, 1,
517 static const yytype_uint8 yydefact[] =
519 3, 0, 2, 1, 24, 21, 22, 17, 16, 18,
520 19, 20, 3, 0, 5, 4, 0, 8, 9, 0,
521 23, 3, 13, 15, 10, 0, 6, 0, 12, 0,
526 static const yytype_int8 yydefgoto[] =
528 -1, 1, 2, 14, 15, 16, 17, 18
533 #define YYPACT_NINF -5
534 static const yytype_int8 yypact[] =
536 -5, 38, 18, -5, -5, -5, -5, -5, -5, -5,
537 -5, -5, -5, 31, -5, -5, 29, 30, 32, -4,
538 -5, -5, 34, 35, -5, 40, -5, 7, -5, 43,
543 static const yytype_int8 yypgoto[] =
545 -5, -5, 19, -5, -5, -5, 26, 36
551 #define YYTABLE_NINF -1
552 static const yytype_uint8 yytable[] =
554 4, 5, 6, 7, 8, 9, 10, 11, 12, 26,
555 13, 4, 5, 6, 7, 8, 9, 10, 11, 12,
556 31, 13, 4, 5, 6, 7, 8, 9, 10, 11,
557 12, 19, 13, 4, 5, 6, 5, 6, 3, 20,
558 27, 21, 22, 13, 24, 13, 30, 25, 28, 32,
562 #define yypact_value_is_default(yystate) \
565 #define yytable_value_is_error(yytable_value) \
568 static const yytype_int8 yycheck[] =
570 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
571 14, 4, 5, 6, 7, 8, 9, 10, 11, 12,
572 13, 14, 4, 5, 6, 7, 8, 9, 10, 11,
573 12, 12, 14, 4, 5, 6, 5, 6, 0, 13,
574 21, 12, 16, 14, 14, 14, 6, 15, 14, 6,
580 static const yytype_uint8 yystos[] =
582 0, 17, 18, 0, 4, 5, 6, 7, 8, 9,
583 10, 11, 12, 14, 19, 20, 21, 22, 23, 18,
584 22, 12, 22, 23, 14, 15, 13, 18, 14, 15,
588 #define yyerrok (yyerrstatus = 0)
589 #define yyclearin (yychar = YYEMPTY)
593 #define YYACCEPT goto yyacceptlab
594 #define YYABORT goto yyabortlab
595 #define YYERROR goto yyerrorlab
605 #define YYFAIL goto yyerrlab
613 #define YYRECOVERING() (!!yyerrstatus)
615 #define YYBACKUP(Token, Value) \
617 if (yychar == YYEMPTY && yylen == 1) \
626 yyerror (YY_("syntax error: cannot back up")); \
633 #define YYERRCODE 256
640 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
641 #ifndef YYLLOC_DEFAULT
642 # define YYLLOC_DEFAULT(Current, Rhs, N) \
646 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
647 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
648 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
649 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
653 (Current).first_line = (Current).last_line = \
654 YYRHSLOC (Rhs, 0).last_line; \
655 (Current).first_column = (Current).last_column = \
656 YYRHSLOC (Rhs, 0).last_column; \
664 #ifndef YY_LOCATION_PRINT
665 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
672 # define YYLEX yylex (&yylval, YYLEX_PARAM)
674 # define YYLEX yylex (&yylval)
682 # define YYFPRINTF fprintf
685 # define YYDPRINTF(Args) \
691 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
695 YYFPRINTF (stderr, "%s ", Title); \
696 yy_symbol_print (stderr, \
698 YYFPRINTF (stderr, "\n"); \
708 #if (defined __STDC__ || defined __C99__FUNC__ \
709 || defined __cplusplus || defined _MSC_VER)
711 yy_symbol_value_print (FILE *yyoutput,
int yytype,
YYSTYPE const *
const yyvaluep)
714 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
717 YYSTYPE const * const yyvaluep;
723 if (yytype < YYNTOKENS)
724 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
740 #if (defined __STDC__ || defined __C99__FUNC__ \
741 || defined __cplusplus || defined _MSC_VER)
743 yy_symbol_print (FILE *yyoutput,
int yytype,
YYSTYPE const *
const yyvaluep)
746 yy_symbol_print (yyoutput, yytype, yyvaluep)
749 YYSTYPE const * const yyvaluep;
752 if (yytype < YYNTOKENS)
753 YYFPRINTF (yyoutput,
"token %s (", yytname[yytype]);
755 YYFPRINTF (yyoutput,
"nterm %s (", yytname[yytype]);
757 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
758 YYFPRINTF (yyoutput,
")");
766 #if (defined __STDC__ || defined __C99__FUNC__ \
767 || defined __cplusplus || defined _MSC_VER)
769 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
772 yy_stack_print (yybottom, yytop)
773 yytype_int16 *yybottom;
777 YYFPRINTF (stderr,
"Stack now");
778 for (; yybottom <= yytop; yybottom++)
780 int yybot = *yybottom;
781 YYFPRINTF (stderr,
" %d", yybot);
783 YYFPRINTF (stderr,
"\n");
786 # define YY_STACK_PRINT(Bottom, Top) \
789 yy_stack_print ((Bottom), (Top)); \
797 #if (defined __STDC__ || defined __C99__FUNC__ \
798 || defined __cplusplus || defined _MSC_VER)
800 yy_reduce_print (
YYSTYPE *yyvsp,
int yyrule)
803 yy_reduce_print (yyvsp, yyrule)
808 int yynrhs = yyr2[yyrule];
810 unsigned long int yylno = yyrline[yyrule];
811 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
814 for (yyi = 0; yyi < yynrhs; yyi++)
816 YYFPRINTF (stderr,
" $%d = ", yyi + 1);
817 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
818 &(yyvsp[(yyi + 1) - (yynrhs)])
820 YYFPRINTF (stderr,
"\n");
824 # define YY_REDUCE_PRINT(Rule) \
827 yy_reduce_print (yyvsp, Rule); \
834 # define YYDPRINTF(Args)
835 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
836 # define YY_STACK_PRINT(Bottom, Top)
837 # define YY_REDUCE_PRINT(Rule)
843 # define YYINITDEPTH 200
854 # define YYMAXDEPTH 10000
861 # if defined __GLIBC__ && defined _STRING_H
862 # define yystrlen strlen
865 #if (defined __STDC__ || defined __C99__FUNC__ \
866 || defined __cplusplus || defined _MSC_VER)
868 yystrlen (
const char *yystr)
876 for (yylen = 0; yystr[yylen]; yylen++)
884 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
885 # define yystpcpy stpcpy
889 #if (defined __STDC__ || defined __C99__FUNC__ \
890 || defined __cplusplus || defined _MSC_VER)
892 yystpcpy (
char *yydest,
const char *yysrc)
895 yystpcpy (yydest, yysrc)
901 const char *yys = yysrc;
903 while ((*yyd++ = *yys++) !=
'\0')
920 yytnamerr (
char *yyres,
const char *yystr)
925 char const *yyp = yystr;
932 goto do_not_strip_quotes;
936 goto do_not_strip_quotes;
949 do_not_strip_quotes: ;
953 return yystrlen (yystr);
955 return yystpcpy (yyres, yystr) - yyres;
968 yysyntax_error (YYSIZE_T *yymsg_alloc,
char **yymsg,
969 yytype_int16 *yyssp,
int yytoken)
971 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
972 YYSIZE_T yysize = yysize0;
974 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
976 const char *yyformat = 0;
978 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1010 if (yytoken != YYEMPTY)
1012 int yyn = yypact[*yyssp];
1013 yyarg[yycount++] = yytname[yytoken];
1014 if (!yypact_value_is_default (yyn))
1019 int yyxbegin = yyn < 0 ? -yyn : 0;
1021 int yychecklim = YYLAST - yyn + 1;
1022 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1025 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1026 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1027 && !yytable_value_is_error (yytable[yyx + yyn]))
1029 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1035 yyarg[yycount++] = yytname[yyx];
1036 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1037 if (! (yysize <= yysize1
1038 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1047 # define YYCASE_(N, S) \
1051 YYCASE_(0, YY_(
"syntax error"));
1052 YYCASE_(1, YY_(
"syntax error, unexpected %s"));
1053 YYCASE_(2, YY_(
"syntax error, unexpected %s, expecting %s"));
1054 YYCASE_(3, YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1055 YYCASE_(4, YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1056 YYCASE_(5, YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1060 yysize1 = yysize + yystrlen (yyformat);
1061 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1065 if (*yymsg_alloc < yysize)
1067 *yymsg_alloc = 2 * yysize;
1068 if (! (yysize <= *yymsg_alloc
1069 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1070 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1080 while ((*yyp = *yyformat) !=
'\0')
1081 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1083 yyp += yytnamerr (yyp, yyarg[yyi++]);
1101 #if (defined __STDC__ || defined __C99__FUNC__ \
1102 || defined __cplusplus || defined _MSC_VER)
1104 yydestruct (
const char *yymsg,
int yytype,
YYSTYPE *yyvaluep)
1107 yydestruct (yymsg, yytype, yyvaluep)
1117 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1129 #ifdef YYPARSE_PARAM
1130 #if defined __STDC__ || defined __cplusplus
1131 int yyparse (
void *YYPARSE_PARAM);
1136 #if defined __STDC__ || defined __cplusplus
1148 #ifdef YYPARSE_PARAM
1149 #if (defined __STDC__ || defined __C99__FUNC__ \
1150 || defined __cplusplus || defined _MSC_VER)
1152 yyparse (
void *YYPARSE_PARAM)
1155 yyparse (YYPARSE_PARAM)
1156 void *YYPARSE_PARAM;
1159 #if (defined __STDC__ || defined __C99__FUNC__ \
1160 || defined __cplusplus || defined _MSC_VER)
1191 yytype_int16 yyssa[YYINITDEPTH];
1193 yytype_int16 *yyssp;
1200 YYSIZE_T yystacksize;
1213 char *yymsg = yymsgbuf;
1214 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1217 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1226 yystacksize = YYINITDEPTH;
1228 YYDPRINTF ((stderr,
"Starting parse\n"));
1255 if (yyss + yystacksize - 1 <= yyssp)
1258 YYSIZE_T yysize = yyssp - yyss + 1;
1266 yytype_int16 *yyss1 = yyss;
1272 yyoverflow (YY_(
"memory exhausted"),
1273 &yyss1, yysize *
sizeof (*yyssp),
1274 &yyvs1, yysize *
sizeof (*yyvsp),
1281 # ifndef YYSTACK_RELOCATE
1282 goto yyexhaustedlab;
1285 if (YYMAXDEPTH <= yystacksize)
1286 goto yyexhaustedlab;
1288 if (YYMAXDEPTH < yystacksize)
1289 yystacksize = YYMAXDEPTH;
1292 yytype_int16 *yyss1 = yyss;
1294 (
union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1296 goto yyexhaustedlab;
1297 YYSTACK_RELOCATE (yyss_alloc, yyss);
1298 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1299 # undef YYSTACK_RELOCATE
1301 YYSTACK_FREE (yyss1);
1306 yyssp = yyss + yysize - 1;
1307 yyvsp = yyvs + yysize - 1;
1309 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1310 (
unsigned long int) yystacksize));
1312 if (yyss + yystacksize - 1 <= yyssp)
1316 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1318 if (yystate == YYFINAL)
1332 yyn = yypact[yystate];
1333 if (yypact_value_is_default (yyn))
1339 if (yychar == YYEMPTY)
1341 YYDPRINTF ((stderr,
"Reading a token: "));
1345 if (yychar <= YYEOF)
1347 yychar = yytoken = YYEOF;
1348 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1352 yytoken = YYTRANSLATE (yychar);
1353 YY_SYMBOL_PRINT (
"Next token is", yytoken, &yylval, &yylloc);
1359 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1364 if (yytable_value_is_error (yyn))
1376 YY_SYMBOL_PRINT (
"Shifting", yytoken, &yylval, &yylloc);
1391 yyn = yydefact[yystate];
1412 yyval = yyvsp[1-yylen];
1415 YY_REDUCE_PRINT (yyn);
1421 #line 79 "fts0pars.y"
1423 (yyval.node) = (yyvsp[(1) - (1)].node);
1431 #line 85 "fts0pars.y"
1433 (yyval.node) = NULL;
1440 #line 89 "fts0pars.y"
1442 (yyval.node) = (yyvsp[(1) - (2)].node);
1444 if (!(yyval.node)) {
1455 #line 99 "fts0pars.y"
1457 (yyval.node) = (yyvsp[(1) - (2)].node);
1460 if (!(yyval.node)) {
1471 #line 111 "fts0pars.y"
1473 (yyval.node) = (yyvsp[(2) - (3)].node);
1480 #line 115 "fts0pars.y"
1484 if ((yyvsp[(3) - (4)].node)) {
1493 #line 124 "fts0pars.y"
1495 (yyval.node) = (yyvsp[(1) - (1)].node);
1502 #line 128 "fts0pars.y"
1504 (yyval.node) = (yyvsp[(1) - (1)].node);
1511 #line 132 "fts0pars.y"
1520 #line 136 "fts0pars.y"
1523 free((yyvsp[(3) - (3)].token));
1530 #line 141 "fts0pars.y"
1541 #line 147 "fts0pars.y"
1551 #line 152 "fts0pars.y"
1556 free((yyvsp[(4) - (4)].token));
1563 #line 159 "fts0pars.y"
1573 #line 165 "fts0pars.y"
1582 #line 169 "fts0pars.y"
1591 #line 173 "fts0pars.y"
1600 #line 177 "fts0pars.y"
1609 #line 181 "fts0pars.y"
1618 #line 186 "fts0pars.y"
1621 free((yyvsp[(1) - (1)].token));
1628 #line 191 "fts0pars.y"
1631 free((yyvsp[(1) - (1)].token));
1638 #line 197 "fts0pars.y"
1640 (yyval.node) = (yyvsp[(2) - (2)].node);
1647 #line 202 "fts0pars.y"
1650 free((yyvsp[(1) - (1)].token));
1657 #line 1658 "fts0pars.cc"
1671 YY_SYMBOL_PRINT (
"-> $$ =", yyr1[yyn], &yyval, &yyloc);
1675 YY_STACK_PRINT (yyss, yyssp);
1685 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1686 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1687 yystate = yytable[yystate];
1689 yystate = yydefgoto[yyn - YYNTOKENS];
1700 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1706 #if ! YYERROR_VERBOSE
1707 yyerror (YY_(
"syntax error"));
1709 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1712 char const *yymsgp = YY_(
"syntax error");
1713 int yysyntax_error_status;
1714 yysyntax_error_status = YYSYNTAX_ERROR;
1715 if (yysyntax_error_status == 0)
1717 else if (yysyntax_error_status == 1)
1719 if (yymsg != yymsgbuf)
1720 YYSTACK_FREE (yymsg);
1721 yymsg = (
char *) YYSTACK_ALLOC (yymsg_alloc);
1725 yymsg_alloc =
sizeof yymsgbuf;
1726 yysyntax_error_status = 2;
1730 yysyntax_error_status = YYSYNTAX_ERROR;
1735 if (yysyntax_error_status == 2)
1736 goto yyexhaustedlab;
1738 # undef YYSYNTAX_ERROR
1744 if (yyerrstatus == 3)
1749 if (yychar <= YYEOF)
1752 if (yychar == YYEOF)
1757 yydestruct (
"Error: discarding",
1783 YY_STACK_PRINT (yyss, yyssp);
1796 yyn = yypact[yystate];
1797 if (!yypact_value_is_default (yyn))
1800 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1813 yydestruct (
"Error: popping",
1814 yystos[yystate], yyvsp);
1817 YY_STACK_PRINT (yyss, yyssp);
1824 YY_SYMBOL_PRINT (
"Shifting", yystos[yyn], yyvsp, yylsp);
1844 #if !defined(yyoverflow) || YYERROR_VERBOSE
1849 yyerror (YY_(
"memory exhausted"));
1855 if (yychar != YYEMPTY)
1859 yytoken = YYTRANSLATE (yychar);
1860 yydestruct (
"Cleanup: discarding lookahead",
1866 YY_STACK_PRINT (yyss, yyssp);
1867 while (yyssp != yyss)
1869 yydestruct (
"Cleanup: popping",
1870 yystos[*yyssp], yyvsp);
1875 YYSTACK_FREE (yyss);
1878 if (yymsg != yymsgbuf)
1879 YYSTACK_FREE (yymsg);
1882 return YYID (yyresult);
1888 #line 207 "fts0pars.y"
1898 my_printf_error(ER_PARSE_ERROR,
"%s", MYF(0), p);
1916 fts0blex_init(&fts_lexer->yyscanner);
1917 fts0b_scan_bytes((
char*) query, query_len, fts_lexer->yyscanner);
1918 fts_lexer->scanner = (fts_scan) fts_blexer;
1922 fts0tlex_init(&fts_lexer->yyscanner);
1923 fts0t_scan_bytes((
char*) query, query_len, fts_lexer->yyscanner);
1924 fts_lexer->scanner = (fts_scan) fts_tlexer;
1938 if (fts_lexer->scanner == (fts_scan) fts_blexer) {
1939 fts0blex_destroy(fts_lexer->yyscanner);
1941 fts0tlex_destroy(fts_lexer->yyscanner);
1956 fts_scanner_alt func_ptr;
1958 func_ptr = (fts_scanner_alt) fts_lexer->scanner;
1960 return(func_ptr(val, fts_lexer->yyscanner));
1970 return(ftsparse(state));