47 #define YYBISON_VERSION "2.5"
50 #define YYSKELETON_NAME "yacc.c"
62 #define YYLSP_NEEDED 0
65 #define yyparse execute_parse
66 #define yylex execute_lex
67 #define yyerror execute_error
68 #define yylval execute_lval
69 #define yychar execute_char
70 #define yydebug execute_debug
71 #define yynerrs execute_nerrs
77 #line 55 "drizzled/execute/parser.yy"
83 #include <drizzled/execute/symbol.h>
84 #include <drizzled/execute/scanner.h>
85 #include <drizzled/execute/context.h>
88 #ifndef __INTEL_COMPILER
89 #pragma GCC diagnostic ignored "-Wold-style-cast"
92 #define YYENABLE_NLS 0
93 #define YYLTYPE_IS_TRIVIAL 0
95 int execute_lex(
YYSTYPE* lvalp,
void* scanner);
97 #define parser_abort(A, B) do { parser::abort_func((A), (B)); YYABORT; } while (0)
101 if (not context->end())
112 #line 113 "drizzled/execute/parser.cc"
120 #ifdef YYERROR_VERBOSE
121 # undef YYERROR_VERBOSE
122 # define YYERROR_VERBOSE 1
124 # define YYERROR_VERBOSE 1
128 #ifndef YYTOKEN_TABLE
129 # define YYTOKEN_TABLE 0
146 #define QUOTED_STRING 259
152 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
154 # define yystype YYSTYPE
155 # define YYSTYPE_IS_DECLARED 1
163 #line 164 "drizzled/execute/parser.cc"
170 typedef YYTYPE_UINT8 yytype_uint8;
172 typedef unsigned char yytype_uint8;
176 typedef YYTYPE_INT8 yytype_int8;
177 #elif (defined __STDC__ || defined __C99__FUNC__ \
178 || defined __cplusplus || defined _MSC_VER)
179 typedef signed char yytype_int8;
181 typedef short int yytype_int8;
185 typedef YYTYPE_UINT16 yytype_uint16;
187 typedef unsigned short int yytype_uint16;
191 typedef YYTYPE_INT16 yytype_int16;
193 typedef short int yytype_int16;
197 # ifdef __SIZE_TYPE__
198 # define YYSIZE_T __SIZE_TYPE__
199 # elif defined size_t
200 # define YYSIZE_T size_t
201 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
202 || defined __cplusplus || defined _MSC_VER)
204 # define YYSIZE_T size_t
206 # define YYSIZE_T unsigned int
210 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
213 # if defined YYENABLE_NLS && YYENABLE_NLS
215 # include <libintl.h>
216 # define YY_(msgid) dgettext ("bison-runtime", msgid)
220 # define YY_(msgid) msgid
225 #if ! defined lint || defined __GNUC__
226 # define YYUSE(e) ((void) (e))
235 #if (defined __STDC__ || defined __C99__FUNC__ \
236 || defined __cplusplus || defined _MSC_VER)
249 #if ! defined yyoverflow || YYERROR_VERBOSE
253 # ifdef YYSTACK_USE_ALLOCA
254 # if YYSTACK_USE_ALLOCA
256 # define YYSTACK_ALLOC __builtin_alloca
257 # elif defined __BUILTIN_VA_ARG_INCR
260 # define YYSTACK_ALLOC __alloca
261 # elif defined _MSC_VER
263 # define alloca _alloca
265 # define YYSTACK_ALLOC alloca
266 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
267 || defined __cplusplus || defined _MSC_VER)
269 # ifndef EXIT_SUCCESS
270 # define EXIT_SUCCESS 0
277 # ifdef YYSTACK_ALLOC
279 # define YYSTACK_FREE(Ptr) do { ; } while (YYID (0))
280 # ifndef YYSTACK_ALLOC_MAXIMUM
285 # define YYSTACK_ALLOC_MAXIMUM 4032
288 # define YYSTACK_ALLOC YYMALLOC
289 # define YYSTACK_FREE YYFREE
290 # ifndef YYSTACK_ALLOC_MAXIMUM
291 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
293 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
294 && ! ((defined YYMALLOC || defined malloc) \
295 && (defined YYFREE || defined free)))
297 # ifndef EXIT_SUCCESS
298 # define EXIT_SUCCESS 0
302 # define YYMALLOC malloc
303 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
304 || defined __cplusplus || defined _MSC_VER)
305 void *malloc (YYSIZE_T);
310 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
311 || defined __cplusplus || defined _MSC_VER)
319 #if (! defined yyoverflow \
320 && (! defined __cplusplus \
321 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
326 yytype_int16 yyss_alloc;
331 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
335 # define YYSTACK_BYTES(N) \
336 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
337 + YYSTACK_GAP_MAXIMUM)
339 # define YYCOPY_NEEDED 1
346 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
349 YYSIZE_T yynewbytes; \
350 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
351 Stack = &yyptr->Stack_alloc; \
352 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
353 yyptr += yynewbytes / sizeof (*yyptr); \
359 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
363 # if defined __GNUC__ && 1 < __GNUC__
364 # define YYCOPY(To, From, Count) \
365 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
367 # define YYCOPY(To, From, Count) \
371 for (yyi = 0; yyi < (Count); yyi++) \
372 (To)[yyi] = (From)[yyi]; \
395 #define YYMAXUTOK 260
397 #define YYTRANSLATE(YYX) \
398 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
401 static const yytype_uint8 yytranslate[] =
403 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
404 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
405 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
406 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
407 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
408 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
409 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
410 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
411 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
412 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
413 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
414 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
415 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
416 2, 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 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
421 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
422 2, 2, 2, 2, 2, 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, 1, 2, 3, 4,
435 static const yytype_uint8 yyprhs[] =
441 static const yytype_int8 yyrhs[] =
443 7, 0, -1, 3, -1, 7, 3, -1
447 static const yytype_uint8 yyrline[] =
453 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
456 static const char *
const yytname[] =
458 "$end",
"error",
"$undefined",
"STRING",
"QUOTED_STRING",
"UNKNOWN",
459 "$accept",
"begin", 0
466 static const yytype_uint16 yytoknum[] =
468 0, 256, 257, 258, 259, 260
473 static const yytype_uint8 yyr1[] =
479 static const yytype_uint8 yyr2[] =
487 static const yytype_uint8 yydefact[] =
493 static const yytype_int8 yydefgoto[] =
500 #define YYPACT_NINF -3
501 static const yytype_int8 yypact[] =
507 static const yytype_int8 yypgoto[] =
515 #define YYTABLE_NINF -1
516 static const yytype_uint8 yytable[] =
521 #define yypact_value_is_default(yystate) \
524 #define yytable_value_is_error(yytable_value) \
527 static const yytype_int8 yycheck[] =
534 static const yytype_uint8 yystos[] =
539 #define yyerrok (yyerrstatus = 0)
540 #define yyclearin (yychar = YYEMPTY)
544 #define YYACCEPT goto yyacceptlab
545 #define YYABORT goto yyabortlab
546 #define YYERROR goto yyerrorlab
556 #define YYFAIL goto yyerrlab
564 #define YYRECOVERING() (!!yyerrstatus)
566 #define YYBACKUP(Token, Value) \
568 if (yychar == YYEMPTY && yylen == 1) \
577 yyerror (context, scanner, YY_("syntax error: cannot back up")); \
584 #define YYERRCODE 256
591 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
592 #ifndef YYLLOC_DEFAULT
593 # define YYLLOC_DEFAULT(Current, Rhs, N) \
597 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
598 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
599 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
600 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
604 (Current).first_line = (Current).last_line = \
605 YYRHSLOC (Rhs, 0).last_line; \
606 (Current).first_column = (Current).last_column = \
607 YYRHSLOC (Rhs, 0).last_column; \
615 #ifndef YY_LOCATION_PRINT
616 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
623 # define YYLEX yylex (&yylval, YYLEX_PARAM)
625 # define YYLEX yylex (&yylval, scanner)
633 # define YYFPRINTF fprintf
636 # define YYDPRINTF(Args) \
642 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
646 YYFPRINTF (stderr, "%s ", Title); \
647 yy_symbol_print (stderr, \
648 Type, Value, context, scanner); \
649 YYFPRINTF (stderr, "\n"); \
659 #if (defined __STDC__ || defined __C99__FUNC__ \
660 || defined __cplusplus || defined _MSC_VER)
665 yy_symbol_value_print (yyoutput, yytype, yyvaluep, context, scanner)
668 YYSTYPE const * const yyvaluep;
669 ::drizzled::execute::Context *context;
678 if (yytype < YYNTOKENS)
679 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
695 #if (defined __STDC__ || defined __C99__FUNC__ \
696 || defined __cplusplus || defined _MSC_VER)
701 yy_symbol_print (yyoutput, yytype, yyvaluep, context, scanner)
704 YYSTYPE const * const yyvaluep;
705 ::drizzled::execute::Context *context;
709 if (yytype < YYNTOKENS)
710 YYFPRINTF (yyoutput,
"token %s (", yytname[yytype]);
712 YYFPRINTF (yyoutput,
"nterm %s (", yytname[yytype]);
714 yy_symbol_value_print (yyoutput, yytype, yyvaluep, context, scanner);
715 YYFPRINTF (yyoutput,
")");
723 #if (defined __STDC__ || defined __C99__FUNC__ \
724 || defined __cplusplus || defined _MSC_VER)
726 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
729 yy_stack_print (yybottom, yytop)
730 yytype_int16 *yybottom;
734 YYFPRINTF (stderr,
"Stack now");
735 for (; yybottom <= yytop; yybottom++)
737 int yybot = *yybottom;
738 YYFPRINTF (stderr,
" %d", yybot);
740 YYFPRINTF (stderr,
"\n");
743 # define YY_STACK_PRINT(Bottom, Top) \
746 yy_stack_print ((Bottom), (Top)); \
754 #if (defined __STDC__ || defined __C99__FUNC__ \
755 || defined __cplusplus || defined _MSC_VER)
760 yy_reduce_print (yyvsp, yyrule, context, scanner)
763 ::drizzled::execute::Context *context;
767 int yynrhs = yyr2[yyrule];
769 unsigned long int yylno = yyrline[yyrule];
770 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
773 for (yyi = 0; yyi < yynrhs; yyi++)
775 YYFPRINTF (stderr,
" $%d = ", yyi + 1);
776 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
777 &(yyvsp[(yyi + 1) - (yynrhs)])
779 YYFPRINTF (stderr,
"\n");
783 # define YY_REDUCE_PRINT(Rule) \
786 yy_reduce_print (yyvsp, Rule, context, scanner); \
793 # define YYDPRINTF(Args)
794 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
795 # define YY_STACK_PRINT(Bottom, Top)
796 # define YY_REDUCE_PRINT(Rule)
802 # define YYINITDEPTH 200
813 # define YYMAXDEPTH 10000
820 # if defined __GLIBC__ && defined _STRING_H
821 # define yystrlen strlen
824 #if (defined __STDC__ || defined __C99__FUNC__ \
825 || defined __cplusplus || defined _MSC_VER)
827 yystrlen (
const char *yystr)
835 for (yylen = 0; yystr[yylen]; yylen++)
843 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
844 # define yystpcpy stpcpy
848 #if (defined __STDC__ || defined __C99__FUNC__ \
849 || defined __cplusplus || defined _MSC_VER)
851 yystpcpy (
char *yydest,
const char *yysrc)
854 yystpcpy (yydest, yysrc)
860 const char *yys = yysrc;
862 while ((*yyd++ = *yys++) !=
'\0')
879 yytnamerr (
char *yyres,
const char *yystr)
884 char const *yyp = yystr;
891 goto do_not_strip_quotes;
895 goto do_not_strip_quotes;
908 do_not_strip_quotes: ;
912 return yystrlen (yystr);
914 return yystpcpy (yyres, yystr) - yyres;
927 yysyntax_error (YYSIZE_T *yymsg_alloc,
char **yymsg,
928 yytype_int16 *yyssp,
int yytoken)
930 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
931 YYSIZE_T yysize = yysize0;
933 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
935 const char *yyformat = 0;
937 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
969 if (yytoken != YYEMPTY)
971 int yyn = yypact[*yyssp];
972 yyarg[yycount++] = yytname[yytoken];
973 if (!yypact_value_is_default (yyn))
978 int yyxbegin = yyn < 0 ? -yyn : 0;
980 int yychecklim = YYLAST - yyn + 1;
981 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
984 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
985 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
986 && !yytable_value_is_error (yytable[yyx + yyn]))
988 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
994 yyarg[yycount++] = yytname[yyx];
995 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
996 if (! (yysize <= yysize1
997 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1006 # define YYCASE_(N, S) \
1010 YYCASE_(0, YY_(
"syntax error"));
1011 YYCASE_(1, YY_(
"syntax error, unexpected %s"));
1012 YYCASE_(2, YY_(
"syntax error, unexpected %s, expecting %s"));
1013 YYCASE_(3, YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1014 YYCASE_(4, YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1015 YYCASE_(5, YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1019 yysize1 = yysize + yystrlen (yyformat);
1020 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1024 if (*yymsg_alloc < yysize)
1026 *yymsg_alloc = 2 * yysize;
1027 if (! (yysize <= *yymsg_alloc
1028 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1029 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1039 while ((*yyp = *yyformat) !=
'\0')
1040 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1042 yyp += yytnamerr (yyp, yyarg[yyi++]);
1060 #if (defined __STDC__ || defined __C99__FUNC__ \
1061 || defined __cplusplus || defined _MSC_VER)
1066 yydestruct (yymsg, yytype, yyvaluep, context, scanner)
1070 ::drizzled::execute::Context *context;
1080 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1092 #ifdef YYPARSE_PARAM
1093 #if defined __STDC__ || defined __cplusplus
1094 int yyparse (
void *YYPARSE_PARAM);
1099 #if defined __STDC__ || defined __cplusplus
1111 #ifdef YYPARSE_PARAM
1112 #if (defined __STDC__ || defined __C99__FUNC__ \
1113 || defined __cplusplus || defined _MSC_VER)
1115 yyparse (
void *YYPARSE_PARAM)
1118 yyparse (YYPARSE_PARAM)
1119 void *YYPARSE_PARAM;
1122 #if (defined __STDC__ || defined __C99__FUNC__ \
1123 || defined __cplusplus || defined _MSC_VER)
1128 yyparse (context, scanner)
1129 ::drizzled::execute::Context *context;
1155 yytype_int16 yyssa[YYINITDEPTH];
1157 yytype_int16 *yyssp;
1164 YYSIZE_T yystacksize;
1177 char *yymsg = yymsgbuf;
1178 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1181 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1190 yystacksize = YYINITDEPTH;
1192 YYDPRINTF ((stderr,
"Starting parse\n"));
1219 if (yyss + yystacksize - 1 <= yyssp)
1222 YYSIZE_T yysize = yyssp - yyss + 1;
1230 yytype_int16 *yyss1 = yyss;
1236 yyoverflow (YY_(
"memory exhausted"),
1237 &yyss1, yysize *
sizeof (*yyssp),
1238 &yyvs1, yysize *
sizeof (*yyvsp),
1245 # ifndef YYSTACK_RELOCATE
1246 goto yyexhaustedlab;
1249 if (YYMAXDEPTH <= yystacksize)
1250 goto yyexhaustedlab;
1252 if (YYMAXDEPTH < yystacksize)
1253 yystacksize = YYMAXDEPTH;
1256 yytype_int16 *yyss1 = yyss;
1258 (
union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1260 goto yyexhaustedlab;
1261 YYSTACK_RELOCATE (yyss_alloc, yyss);
1262 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1263 # undef YYSTACK_RELOCATE
1265 YYSTACK_FREE (yyss1);
1270 yyssp = yyss + yysize - 1;
1271 yyvsp = yyvs + yysize - 1;
1273 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1274 (
unsigned long int) yystacksize));
1276 if (yyss + yystacksize - 1 <= yyssp)
1280 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1282 if (yystate == YYFINAL)
1296 yyn = yypact[yystate];
1297 if (yypact_value_is_default (yyn))
1303 if (yychar == YYEMPTY)
1305 YYDPRINTF ((stderr,
"Reading a token: "));
1309 if (yychar <= YYEOF)
1311 yychar = yytoken = YYEOF;
1312 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1316 yytoken = YYTRANSLATE (yychar);
1317 YY_SYMBOL_PRINT (
"Next token is", yytoken, &yylval, &yylloc);
1323 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1328 if (yytable_value_is_error (yyn))
1340 YY_SYMBOL_PRINT (
"Shifting", yytoken, &yylval, &yylloc);
1355 yyn = yydefact[yystate];
1376 yyval = yyvsp[1-yylen];
1379 YY_REDUCE_PRINT (yyn);
1385 #line 97 "drizzled/execute/parser.yy"
1387 query.append((yyvsp[(1) - (1)].
string).data(), (yyvsp[(1) - (1)].
string).size());
1388 query.push_back(
' ');
1395 #line 103 "drizzled/execute/parser.yy"
1397 query.append((yyvsp[(2) - (2)].
string).data(), (yyvsp[(2) - (2)].
string).size());
1398 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);
1572 YY_SYMBOL_PRINT (
"Shifting", yystos[yyn], yyvsp, yylsp);
1592 #if !defined(yyoverflow) || YYERROR_VERBOSE
1597 yyerror (context, scanner, YY_(
"memory exhausted"));
1603 if (yychar != YYEMPTY)
1607 yytoken = YYTRANSLATE (yychar);
1608 yydestruct (
"Cleanup: discarding lookahead",
1609 yytoken, &yylval, context, scanner);
1614 YY_STACK_PRINT (yyss, yyssp);
1615 while (yyssp != yyss)
1617 yydestruct (
"Cleanup: popping",
1618 yystos[*yyssp], yyvsp, context, scanner);
1623 YYSTACK_FREE (yyss);
1626 if (yymsg != yymsgbuf)
1627 YYSTACK_FREE (yymsg);
1630 return YYID (yyresult);
1636 #line 110 "drizzled/execute/parser.yy"
1640 namespace drizzled {
1643 std::vector<std::string> Context::start()
1645 execute_parse(
this, (
void **)scanner);
1646 std::vector<std::string> parsed_queries;
1647 size_t start_pos= 0;
1648 while ((pos= query.find(
';', start_pos)) != std::string::npos)
1650 if ((pos > 0) && (query[pos-1] ==
'\\'))
1655 parsed_queries.push_back(query.substr(0, pos));
1657 if (query[pos] ==
' ')
1661 query.erase(0, pos);
1663 parsed_queries.push_back(query);
1666 return parsed_queries;