47 #define YYBISON_VERSION "2.7.12-4996"
50 #define YYSKELETON_NAME "yacc.c"
63 #define yyparse execute_parse
64 #define yylex execute_lex
65 #define yyerror execute_error
66 #define yylval execute_lval
67 #define yychar execute_char
68 #define yydebug execute_debug
69 #define yynerrs execute_nerrs
73 #line 40 "drizzled/execute/parser.yy"
79 #include "drizzled/execute/common.h"
80 #include <drizzled/execute/scanner.h>
83 #ifndef __INTEL_COMPILER
84 # pragma GCC diagnostic ignored "-Wold-style-cast"
88 #line 70 "drizzled/execute/parser.yy"
91 #define YYENABLE_NLS 0
92 #define YYLTYPE_IS_TRIVIAL 0
95 #define parser_abort(A, B) do { parser::abort_func((A), (B)); YYABORT; } while (0)
97 namespace drizzled {
namespace execute {
class Context; }}
101 if (not context->end())
111 #line 112 "drizzled/execute/parser.cc"
114 # if defined __cplusplus && 201103L <= __cplusplus
115 # define YY_NULL nullptr
122 #ifdef YYERROR_VERBOSE
123 # undef YYERROR_VERBOSE
124 # define YYERROR_VERBOSE 1
126 # define YYERROR_VERBOSE 1
131 #ifndef YY_EXECUTE_DRIZZLED_EXECUTE_PARSER_H_INCLUDED
132 # define YY_EXECUTE_DRIZZLED_EXECUTE_PARSER_H_INCLUDED
138 extern int execute_debug;
154 #define QUOTED_STRING 259
159 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
161 # define yystype YYSTYPE
162 # define YYSTYPE_IS_DECLARED 1
167 #if defined __STDC__ || defined __cplusplus
168 int execute_parse (
void *YYPARSE_PARAM);
170 int execute_parse ();
173 #if defined __STDC__ || defined __cplusplus
176 int execute_parse ();
185 #line 186 "drizzled/execute/parser.cc"
192 typedef YYTYPE_UINT8 yytype_uint8;
194 typedef unsigned char yytype_uint8;
198 typedef YYTYPE_INT8 yytype_int8;
199 #elif (defined __STDC__ || defined __C99__FUNC__ \
200 || defined __cplusplus || defined _MSC_VER)
201 typedef signed char yytype_int8;
203 typedef short int yytype_int8;
207 typedef YYTYPE_UINT16 yytype_uint16;
209 typedef unsigned short int yytype_uint16;
213 typedef YYTYPE_INT16 yytype_int16;
215 typedef short int yytype_int16;
219 # ifdef __SIZE_TYPE__
220 # define YYSIZE_T __SIZE_TYPE__
221 # elif defined size_t
222 # define YYSIZE_T size_t
223 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
224 || defined __cplusplus || defined _MSC_VER)
226 # define YYSIZE_T size_t
228 # define YYSIZE_T unsigned int
232 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
235 # if defined YYENABLE_NLS && YYENABLE_NLS
237 # include <libintl.h>
238 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
242 # define YY_(Msgid) Msgid
246 #ifndef __attribute__
248 # if (! defined __GNUC__ || __GNUC__ < 2 \
249 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
250 # define __attribute__(Spec)
255 #if ! defined lint || defined __GNUC__
256 # define YYUSE(E) ((void) (E))
266 #if (defined __STDC__ || defined __C99__FUNC__ \
267 || defined __cplusplus || defined _MSC_VER)
280 #if ! defined yyoverflow || YYERROR_VERBOSE
284 # ifdef YYSTACK_USE_ALLOCA
285 # if YYSTACK_USE_ALLOCA
287 # define YYSTACK_ALLOC __builtin_alloca
288 # elif defined __BUILTIN_VA_ARG_INCR
291 # define YYSTACK_ALLOC __alloca
292 # elif defined _MSC_VER
294 # define alloca _alloca
296 # define YYSTACK_ALLOC alloca
297 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
298 || defined __cplusplus || defined _MSC_VER)
301 # ifndef EXIT_SUCCESS
302 # define EXIT_SUCCESS 0
309 # ifdef YYSTACK_ALLOC
311 # define YYSTACK_FREE(Ptr) do { ; } while (YYID (0))
312 # ifndef YYSTACK_ALLOC_MAXIMUM
317 # define YYSTACK_ALLOC_MAXIMUM 4032
320 # define YYSTACK_ALLOC YYMALLOC
321 # define YYSTACK_FREE YYFREE
322 # ifndef YYSTACK_ALLOC_MAXIMUM
323 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
325 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
326 && ! ((defined YYMALLOC || defined malloc) \
327 && (defined YYFREE || defined free)))
329 # ifndef EXIT_SUCCESS
330 # define EXIT_SUCCESS 0
334 # define YYMALLOC malloc
335 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
336 || defined __cplusplus || defined _MSC_VER)
337 void *malloc (YYSIZE_T);
342 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
343 || defined __cplusplus || defined _MSC_VER)
351 #if (! defined yyoverflow \
352 && (! defined __cplusplus \
353 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
358 yytype_int16 yyss_alloc;
363 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
367 # define YYSTACK_BYTES(N) \
368 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
369 + YYSTACK_GAP_MAXIMUM)
371 # define YYCOPY_NEEDED 1
378 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
381 YYSIZE_T yynewbytes; \
382 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
383 Stack = &yyptr->Stack_alloc; \
384 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
385 yyptr += yynewbytes / sizeof (*yyptr); \
391 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
395 # if defined __GNUC__ && 1 < __GNUC__
396 # define YYCOPY(Dst, Src, Count) \
397 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
399 # define YYCOPY(Dst, Src, Count) \
403 for (yyi = 0; yyi < (Count); yyi++) \
404 (Dst)[yyi] = (Src)[yyi]; \
427 #define YYMAXUTOK 260
429 #define YYTRANSLATE(YYX) \
430 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
433 static const yytype_uint8 yytranslate[] =
435 0, 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, 2, 2, 2, 2,
442 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
443 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
444 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
445 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
446 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
447 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
448 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
449 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
450 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
451 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
452 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
453 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
454 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
455 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
456 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
457 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
458 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
459 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
460 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
467 static const yytype_uint8 yyprhs[] =
473 static const yytype_int8 yyrhs[] =
475 7, 0, -1, 3, -1, 7, 3, -1
479 static const yytype_uint8 yyrline[] =
485 #if YYDEBUG || YYERROR_VERBOSE || 1
488 static const char *
const yytname[] =
490 "$end",
"error",
"$undefined",
"STRING",
"QUOTED_STRING",
"UNKNOWN",
491 "$accept",
"begin", YY_NULL
498 static const yytype_uint16 yytoknum[] =
500 0, 256, 257, 258, 259, 260
505 static const yytype_uint8 yyr1[] =
511 static const yytype_uint8 yyr2[] =
519 static const yytype_uint8 yydefact[] =
525 static const yytype_int8 yydefgoto[] =
532 #define YYPACT_NINF -3
533 static const yytype_int8 yypact[] =
539 static const yytype_int8 yypgoto[] =
547 #define YYTABLE_NINF -1
548 static const yytype_uint8 yytable[] =
553 #define yypact_value_is_default(Yystate) \
554 (!!((Yystate) == (-3)))
556 #define yytable_value_is_error(Yytable_value) \
559 static const yytype_int8 yycheck[] =
566 static const yytype_uint8 yystos[] =
571 #define yyerrok (yyerrstatus = 0)
572 #define yyclearin (yychar = YYEMPTY)
576 #define YYACCEPT goto yyacceptlab
577 #define YYABORT goto yyabortlab
578 #define YYERROR goto yyerrorlab
588 #define YYFAIL goto yyerrlab
596 #define YYRECOVERING() (!!yyerrstatus)
598 #define YYBACKUP(Token, Value) \
600 if (yychar == YYEMPTY) \
604 YYPOPSTACK (yylen); \
610 yyerror (context, scanner, YY_("syntax error: cannot back up")); \
617 #define YYERRCODE 256
621 #ifndef YY_LOCATION_PRINT
622 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
628 # define YYLEX yylex (&yylval, YYLEX_PARAM)
630 # define YYLEX yylex (&yylval, scanner)
638 # define YYFPRINTF fprintf
641 # define YYDPRINTF(Args) \
647 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
651 YYFPRINTF (stderr, "%s ", Title); \
652 yy_symbol_print (stderr, \
653 Type, Value, context, scanner); \
654 YYFPRINTF (stderr, "\n"); \
664 #if (defined __STDC__ || defined __C99__FUNC__ \
665 || defined __cplusplus || defined _MSC_VER)
670 yy_symbol_value_print (yyoutput, yytype, yyvaluep, context, scanner)
673 YYSTYPE const * const yyvaluep;
674 class drizzled::execute::Context *context;
678 FILE *yyo = yyoutput;
685 if (yytype < YYNTOKENS)
686 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
698 #if (defined __STDC__ || defined __C99__FUNC__ \
699 || defined __cplusplus || defined _MSC_VER)
704 yy_symbol_print (yyoutput, yytype, yyvaluep, context, scanner)
707 YYSTYPE const * const yyvaluep;
708 class drizzled::execute::Context *context;
712 if (yytype < YYNTOKENS)
713 YYFPRINTF (yyoutput,
"token %s (", yytname[yytype]);
715 YYFPRINTF (yyoutput,
"nterm %s (", yytname[yytype]);
717 yy_symbol_value_print (yyoutput, yytype, yyvaluep, context, scanner);
718 YYFPRINTF (yyoutput,
")");
726 #if (defined __STDC__ || defined __C99__FUNC__ \
727 || defined __cplusplus || defined _MSC_VER)
729 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
732 yy_stack_print (yybottom, yytop)
733 yytype_int16 *yybottom;
737 YYFPRINTF (stderr,
"Stack now");
738 for (; yybottom <= yytop; yybottom++)
740 int yybot = *yybottom;
741 YYFPRINTF (stderr,
" %d", yybot);
743 YYFPRINTF (stderr,
"\n");
746 # define YY_STACK_PRINT(Bottom, Top) \
749 yy_stack_print ((Bottom), (Top)); \
757 #if (defined __STDC__ || defined __C99__FUNC__ \
758 || defined __cplusplus || defined _MSC_VER)
763 yy_reduce_print (yyvsp, yyrule, context, scanner)
766 class drizzled::execute::Context *context;
770 int yynrhs = yyr2[yyrule];
772 unsigned long int yylno = yyrline[yyrule];
773 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
776 for (yyi = 0; yyi < yynrhs; yyi++)
778 YYFPRINTF (stderr,
" $%d = ", yyi + 1);
779 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
780 &(yyvsp[(yyi + 1) - (yynrhs)])
782 YYFPRINTF (stderr,
"\n");
786 # define YY_REDUCE_PRINT(Rule) \
789 yy_reduce_print (yyvsp, Rule, context, scanner); \
796 # define YYDPRINTF(Args)
797 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
798 # define YY_STACK_PRINT(Bottom, Top)
799 # define YY_REDUCE_PRINT(Rule)
805 # define YYINITDEPTH 200
816 # define YYMAXDEPTH 10000
823 # if defined __GLIBC__ && defined _STRING_H
824 # define yystrlen strlen
827 #if (defined __STDC__ || defined __C99__FUNC__ \
828 || defined __cplusplus || defined _MSC_VER)
830 yystrlen (
const char *yystr)
838 for (yylen = 0; yystr[yylen]; yylen++)
846 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
847 # define yystpcpy stpcpy
851 #if (defined __STDC__ || defined __C99__FUNC__ \
852 || defined __cplusplus || defined _MSC_VER)
854 yystpcpy (
char *yydest,
const char *yysrc)
857 yystpcpy (yydest, yysrc)
863 const char *yys = yysrc;
865 while ((*yyd++ = *yys++) !=
'\0')
882 yytnamerr (
char *yyres,
const char *yystr)
887 char const *yyp = yystr;
894 goto do_not_strip_quotes;
898 goto do_not_strip_quotes;
911 do_not_strip_quotes: ;
915 return yystrlen (yystr);
917 return yystpcpy (yyres, yystr) - yyres;
930 yysyntax_error (YYSIZE_T *yymsg_alloc,
char **yymsg,
931 yytype_int16 *yyssp,
int yytoken)
933 YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
934 YYSIZE_T yysize = yysize0;
935 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
937 const char *yyformat = YY_NULL;
939 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
971 if (yytoken != YYEMPTY)
973 int yyn = yypact[*yyssp];
974 yyarg[yycount++] = yytname[yytoken];
975 if (!yypact_value_is_default (yyn))
980 int yyxbegin = yyn < 0 ? -yyn : 0;
982 int yychecklim = YYLAST - yyn + 1;
983 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
986 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
987 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
988 && !yytable_value_is_error (yytable[yyx + yyn]))
990 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
996 yyarg[yycount++] = yytname[yyx];
998 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
999 if (! (yysize <= yysize1
1000 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1010 # define YYCASE_(N, S) \
1014 YYCASE_(0, YY_(
"syntax error"));
1015 YYCASE_(1, YY_(
"syntax error, unexpected %s"));
1016 YYCASE_(2, YY_(
"syntax error, unexpected %s, expecting %s"));
1017 YYCASE_(3, YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1018 YYCASE_(4, YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1019 YYCASE_(5, YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1024 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1025 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1030 if (*yymsg_alloc < yysize)
1032 *yymsg_alloc = 2 * yysize;
1033 if (! (yysize <= *yymsg_alloc
1034 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1035 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1045 while ((*yyp = *yyformat) !=
'\0')
1046 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1048 yyp += yytnamerr (yyp, yyarg[yyi++]);
1066 #if (defined __STDC__ || defined __C99__FUNC__ \
1067 || defined __cplusplus || defined _MSC_VER)
1072 yydestruct (yymsg, yytype, yyvaluep, context, scanner)
1076 class drizzled::execute::Context *context;
1086 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1098 #ifdef YYPARSE_PARAM
1099 #if (defined __STDC__ || defined __C99__FUNC__ \
1100 || defined __cplusplus || defined _MSC_VER)
1102 yyparse (
void *YYPARSE_PARAM)
1105 yyparse (YYPARSE_PARAM)
1106 void *YYPARSE_PARAM;
1109 #if (defined __STDC__ || defined __C99__FUNC__ \
1110 || defined __cplusplus || defined _MSC_VER)
1115 yyparse (context, scanner)
1116 class drizzled::execute::Context *context;
1125 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
1127 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
1128 _Pragma ("GCC diagnostic push") \
1129 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
1130 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
1131 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
1132 _Pragma ("GCC diagnostic pop")
1137 # define YY_INITIAL_VALUE(Value) = Value
1139 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1140 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1141 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
1143 #ifndef YY_INITIAL_VALUE
1144 # define YY_INITIAL_VALUE(Value)
1148 YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
1165 yytype_int16 yyssa[YYINITDEPTH];
1167 yytype_int16 *yyssp;
1174 YYSIZE_T yystacksize;
1187 char *yymsg = yymsgbuf;
1188 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1191 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1197 yyssp = yyss = yyssa;
1198 yyvsp = yyvs = yyvsa;
1199 yystacksize = YYINITDEPTH;
1201 YYDPRINTF ((stderr,
"Starting parse\n"));
1220 if (yyss + yystacksize - 1 <= yyssp)
1223 YYSIZE_T yysize = yyssp - yyss + 1;
1231 yytype_int16 *yyss1 = yyss;
1237 yyoverflow (YY_(
"memory exhausted"),
1238 &yyss1, yysize *
sizeof (*yyssp),
1239 &yyvs1, yysize *
sizeof (*yyvsp),
1246 # ifndef YYSTACK_RELOCATE
1247 goto yyexhaustedlab;
1250 if (YYMAXDEPTH <= yystacksize)
1251 goto yyexhaustedlab;
1253 if (YYMAXDEPTH < yystacksize)
1254 yystacksize = YYMAXDEPTH;
1257 yytype_int16 *yyss1 = yyss;
1259 (
union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1261 goto yyexhaustedlab;
1262 YYSTACK_RELOCATE (yyss_alloc, yyss);
1263 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1264 # undef YYSTACK_RELOCATE
1266 YYSTACK_FREE (yyss1);
1271 yyssp = yyss + yysize - 1;
1272 yyvsp = yyvs + yysize - 1;
1274 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1275 (
unsigned long int) yystacksize));
1277 if (yyss + yystacksize - 1 <= yyssp)
1281 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1283 if (yystate == YYFINAL)
1297 yyn = yypact[yystate];
1298 if (yypact_value_is_default (yyn))
1304 if (yychar == YYEMPTY)
1306 YYDPRINTF ((stderr,
"Reading a token: "));
1310 if (yychar <= YYEOF)
1312 yychar = yytoken = YYEOF;
1313 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1317 yytoken = YYTRANSLATE (yychar);
1318 YY_SYMBOL_PRINT (
"Next token is", yytoken, &yylval, &yylloc);
1324 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1329 if (yytable_value_is_error (yyn))
1341 YY_SYMBOL_PRINT (
"Shifting", yytoken, &yylval, &yylloc);
1347 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1349 YY_IGNORE_MAYBE_UNINITIALIZED_END
1358 yyn = yydefact[yystate];
1379 yyval = yyvsp[1-yylen];
1382 YY_REDUCE_PRINT (yyn);
1387 #line 101 "drizzled/execute/parser.yy"
1389 query.append((yyvsp[(1) - (1)].
string).data(), (yyvsp[(1) - (1)].
string).size());
1390 query.push_back(
' ');
1396 #line 107 "drizzled/execute/parser.yy"
1398 query.append((yyvsp[(2) - (2)].
string).data(), (yyvsp[(2) - (2)].
string).size());
1399 query.push_back(
' ');
1405 #line 1406 "drizzled/execute/parser.cc"
1419 YY_SYMBOL_PRINT (
"-> $$ =", yyr1[yyn], &yyval, &yyloc);
1423 YY_STACK_PRINT (yyss, yyssp);
1433 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1434 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1435 yystate = yytable[yystate];
1437 yystate = yydefgoto[yyn - YYNTOKENS];
1448 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1454 #if ! YYERROR_VERBOSE
1455 yyerror (context, scanner, YY_(
"syntax error"));
1457 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1460 char const *yymsgp = YY_(
"syntax error");
1461 int yysyntax_error_status;
1462 yysyntax_error_status = YYSYNTAX_ERROR;
1463 if (yysyntax_error_status == 0)
1465 else if (yysyntax_error_status == 1)
1467 if (yymsg != yymsgbuf)
1468 YYSTACK_FREE (yymsg);
1469 yymsg = (
char *) YYSTACK_ALLOC (yymsg_alloc);
1473 yymsg_alloc =
sizeof yymsgbuf;
1474 yysyntax_error_status = 2;
1478 yysyntax_error_status = YYSYNTAX_ERROR;
1482 yyerror (context, scanner, yymsgp);
1483 if (yysyntax_error_status == 2)
1484 goto yyexhaustedlab;
1486 # undef YYSYNTAX_ERROR
1492 if (yyerrstatus == 3)
1497 if (yychar <= YYEOF)
1500 if (yychar == YYEOF)
1505 yydestruct (
"Error: discarding",
1506 yytoken, &yylval, context, scanner);
1531 YY_STACK_PRINT (yyss, yyssp);
1544 yyn = yypact[yystate];
1545 if (!yypact_value_is_default (yyn))
1548 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1561 yydestruct (
"Error: popping",
1562 yystos[yystate], yyvsp, context, scanner);
1565 YY_STACK_PRINT (yyss, yyssp);
1568 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1570 YY_IGNORE_MAYBE_UNINITIALIZED_END
1574 YY_SYMBOL_PRINT (
"Shifting", yystos[yyn], yyvsp, yylsp);
1594 #if !defined yyoverflow || YYERROR_VERBOSE
1599 yyerror (context, scanner, YY_(
"memory exhausted"));
1605 if (yychar != YYEMPTY)
1609 yytoken = YYTRANSLATE (yychar);
1610 yydestruct (
"Cleanup: discarding lookahead",
1611 yytoken, &yylval, context, scanner);
1616 YY_STACK_PRINT (yyss, yyssp);
1617 while (yyssp != yyss)
1619 yydestruct (
"Cleanup: popping",
1620 yystos[*yyssp], yyvsp, context, scanner);
1625 YYSTACK_FREE (yyss);
1628 if (yymsg != yymsgbuf)
1629 YYSTACK_FREE (yymsg);
1632 return YYID (yyresult);
1637 #line 114 "drizzled/execute/parser.yy"
1641 namespace drizzled {
1644 std::vector<std::string> Context::start()
1646 execute_parse(
this, (
void **)scanner);
1647 std::vector<std::string> parsed_queries;
1648 size_t start_pos= 0;
1649 while ((pos= query.find(
';', start_pos)) != std::string::npos)
1651 if ((pos > 0) && (query[pos-1] ==
'\\'))
1656 parsed_queries.push_back(query.substr(0, pos));
1658 if (query[pos] ==
' ')
1662 query.erase(0, pos);
1664 parsed_queries.push_back(query);
1667 return parsed_queries;