lexyy.c, pars0grm.c, pars0lex.l, pars0grm.y:

  Remove potential memory leak caused by redefined alloca, remove include of unistd.h to allow compilation on Windows
parent df5d7a5b
......@@ -583,8 +583,33 @@ SQL parser lexical analyzer: input file for the GNU Flex lexer generator
Created 12/14/1997 Heikki Tuuri
Published under the GPL version 2
The InnoDB parser is frozen because MySQL takes care of SQL parsing.
Therefore we normally keep the InnoDB parser C files as they are, and do
not automatically generate them from pars0grm.y and pars0lex.l.
How to make the InnoDB parser and lexer C files:
1. First do
bison -d pars0grm.y
That generates pars0grm.tab.c and pars0grm.tab.h.
2. Rename pars0grm.tab.c to pars0grm.c and pars0grm.tab.h to pars0grm.h.
3. Copy pars0grm.h also to /innobase/include
4. Do
flex pars0lex.l
That generates lex.yy.c.
5. Rename lex.yy.c to lexyy.c.
6. Remove the #include of unistd.h from about line 2500 of lexyy.c
These instructions seem to work at least with bison-1.28 and flex-2.5.4 on
Linux.
*******************************************************/
#line 11 "pars0lex.l"
#line 36 "pars0lex.l"
#define YYSTYPE que_node_t*
#include "univ.i"
......@@ -603,7 +628,7 @@ Published under the GPL version 2
#define YY_INPUT(buf, result, max_size) pars_get_lex_chars(buf, &result, max_size)
#define comment 1
#line 607 "lex.yy.c"
#line 632 "lex.yy.c"
/* Macros after this point can all be overridden by user definitions in
* section 1.
......@@ -754,10 +779,10 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
#line 32 "pars0lex.l"
#line 57 "pars0lex.l"
#line 761 "lex.yy.c"
#line 786 "lex.yy.c"
if ( yy_init )
{
......@@ -842,7 +867,7 @@ YY_DECL
case 1:
YY_RULE_SETUP
#line 34 "pars0lex.l"
#line 59 "pars0lex.l"
{
yylval = sym_tab_add_int_lit(pars_sym_tab_global,
atoi(yytext));
......@@ -851,7 +876,7 @@ YY_RULE_SETUP
YY_BREAK
case 2:
YY_RULE_SETUP
#line 40 "pars0lex.l"
#line 65 "pars0lex.l"
{
ut_error; /* not implemented */
......@@ -860,7 +885,7 @@ YY_RULE_SETUP
YY_BREAK
case 3:
YY_RULE_SETUP
#line 46 "pars0lex.l"
#line 71 "pars0lex.l"
{
/* Remove the single quotes around the string */
......@@ -872,7 +897,7 @@ YY_RULE_SETUP
YY_BREAK
case 4:
YY_RULE_SETUP
#line 55 "pars0lex.l"
#line 80 "pars0lex.l"
{
yylval = sym_tab_add_null_lit(pars_sym_tab_global);
......@@ -881,7 +906,7 @@ YY_RULE_SETUP
YY_BREAK
case 5:
YY_RULE_SETUP
#line 61 "pars0lex.l"
#line 86 "pars0lex.l"
{
/* Implicit cursor name */
yylval = sym_tab_add_str_lit(pars_sym_tab_global,
......@@ -891,511 +916,511 @@ YY_RULE_SETUP
YY_BREAK
case 6:
YY_RULE_SETUP
#line 68 "pars0lex.l"
#line 93 "pars0lex.l"
{
return(PARS_AND_TOKEN);
}
YY_BREAK
case 7:
YY_RULE_SETUP
#line 72 "pars0lex.l"
#line 97 "pars0lex.l"
{
return(PARS_OR_TOKEN);
}
YY_BREAK
case 8:
YY_RULE_SETUP
#line 76 "pars0lex.l"
#line 101 "pars0lex.l"
{
return(PARS_NOT_TOKEN);
}
YY_BREAK
case 9:
YY_RULE_SETUP
#line 80 "pars0lex.l"
#line 105 "pars0lex.l"
{
return(PARS_PROCEDURE_TOKEN);
}
YY_BREAK
case 10:
YY_RULE_SETUP
#line 84 "pars0lex.l"
#line 109 "pars0lex.l"
{
return(PARS_IN_TOKEN);
}
YY_BREAK
case 11:
YY_RULE_SETUP
#line 88 "pars0lex.l"
#line 113 "pars0lex.l"
{
return(PARS_OUT_TOKEN);
}
YY_BREAK
case 12:
YY_RULE_SETUP
#line 92 "pars0lex.l"
#line 117 "pars0lex.l"
{
return(PARS_INT_TOKEN);
}
YY_BREAK
case 13:
YY_RULE_SETUP
#line 96 "pars0lex.l"
#line 121 "pars0lex.l"
{
return(PARS_INT_TOKEN);
}
YY_BREAK
case 14:
YY_RULE_SETUP
#line 100 "pars0lex.l"
#line 125 "pars0lex.l"
{
return(PARS_FLOAT_TOKEN);
}
YY_BREAK
case 15:
YY_RULE_SETUP
#line 104 "pars0lex.l"
#line 129 "pars0lex.l"
{
return(PARS_CHAR_TOKEN);
}
YY_BREAK
case 16:
YY_RULE_SETUP
#line 108 "pars0lex.l"
#line 133 "pars0lex.l"
{
return(PARS_IS_TOKEN);
}
YY_BREAK
case 17:
YY_RULE_SETUP
#line 112 "pars0lex.l"
#line 137 "pars0lex.l"
{
return(PARS_BEGIN_TOKEN);
}
YY_BREAK
case 18:
YY_RULE_SETUP
#line 116 "pars0lex.l"
#line 141 "pars0lex.l"
{
return(PARS_END_TOKEN);
}
YY_BREAK
case 19:
YY_RULE_SETUP
#line 120 "pars0lex.l"
#line 145 "pars0lex.l"
{
return(PARS_IF_TOKEN);
}
YY_BREAK
case 20:
YY_RULE_SETUP
#line 124 "pars0lex.l"
#line 149 "pars0lex.l"
{
return(PARS_THEN_TOKEN);
}
YY_BREAK
case 21:
YY_RULE_SETUP
#line 128 "pars0lex.l"
#line 153 "pars0lex.l"
{
return(PARS_ELSE_TOKEN);
}
YY_BREAK
case 22:
YY_RULE_SETUP
#line 132 "pars0lex.l"
#line 157 "pars0lex.l"
{
return(PARS_ELSIF_TOKEN);
}
YY_BREAK
case 23:
YY_RULE_SETUP
#line 136 "pars0lex.l"
#line 161 "pars0lex.l"
{
return(PARS_LOOP_TOKEN);
}
YY_BREAK
case 24:
YY_RULE_SETUP
#line 140 "pars0lex.l"
#line 165 "pars0lex.l"
{
return(PARS_WHILE_TOKEN);
}
YY_BREAK
case 25:
YY_RULE_SETUP
#line 144 "pars0lex.l"
#line 169 "pars0lex.l"
{
return(PARS_RETURN_TOKEN);
}
YY_BREAK
case 26:
YY_RULE_SETUP
#line 148 "pars0lex.l"
#line 173 "pars0lex.l"
{
return(PARS_SELECT_TOKEN);
}
YY_BREAK
case 27:
YY_RULE_SETUP
#line 152 "pars0lex.l"
#line 177 "pars0lex.l"
{
return(PARS_SUM_TOKEN);
}
YY_BREAK
case 28:
YY_RULE_SETUP
#line 156 "pars0lex.l"
#line 181 "pars0lex.l"
{
return(PARS_COUNT_TOKEN);
}
YY_BREAK
case 29:
YY_RULE_SETUP
#line 160 "pars0lex.l"
#line 185 "pars0lex.l"
{
return(PARS_DISTINCT_TOKEN);
}
YY_BREAK
case 30:
YY_RULE_SETUP
#line 164 "pars0lex.l"
#line 189 "pars0lex.l"
{
return(PARS_FROM_TOKEN);
}
YY_BREAK
case 31:
YY_RULE_SETUP
#line 168 "pars0lex.l"
#line 193 "pars0lex.l"
{
return(PARS_WHERE_TOKEN);
}
YY_BREAK
case 32:
YY_RULE_SETUP
#line 172 "pars0lex.l"
#line 197 "pars0lex.l"
{
return(PARS_FOR_TOKEN);
}
YY_BREAK
case 33:
YY_RULE_SETUP
#line 176 "pars0lex.l"
#line 201 "pars0lex.l"
{
return(PARS_CONSISTENT_TOKEN);
}
YY_BREAK
case 34:
YY_RULE_SETUP
#line 180 "pars0lex.l"
#line 205 "pars0lex.l"
{
return(PARS_READ_TOKEN);
}
YY_BREAK
case 35:
YY_RULE_SETUP
#line 184 "pars0lex.l"
#line 209 "pars0lex.l"
{
return(PARS_ORDER_TOKEN);
}
YY_BREAK
case 36:
YY_RULE_SETUP
#line 188 "pars0lex.l"
#line 213 "pars0lex.l"
{
return(PARS_BY_TOKEN);
}
YY_BREAK
case 37:
YY_RULE_SETUP
#line 192 "pars0lex.l"
#line 217 "pars0lex.l"
{
return(PARS_ASC_TOKEN);
}
YY_BREAK
case 38:
YY_RULE_SETUP
#line 196 "pars0lex.l"
#line 221 "pars0lex.l"
{
return(PARS_DESC_TOKEN);
}
YY_BREAK
case 39:
YY_RULE_SETUP
#line 200 "pars0lex.l"
#line 225 "pars0lex.l"
{
return(PARS_INSERT_TOKEN);
}
YY_BREAK
case 40:
YY_RULE_SETUP
#line 204 "pars0lex.l"
#line 229 "pars0lex.l"
{
return(PARS_INTO_TOKEN);
}
YY_BREAK
case 41:
YY_RULE_SETUP
#line 208 "pars0lex.l"
#line 233 "pars0lex.l"
{
return(PARS_VALUES_TOKEN);
}
YY_BREAK
case 42:
YY_RULE_SETUP
#line 212 "pars0lex.l"
#line 237 "pars0lex.l"
{
return(PARS_UPDATE_TOKEN);
}
YY_BREAK
case 43:
YY_RULE_SETUP
#line 216 "pars0lex.l"
#line 241 "pars0lex.l"
{
return(PARS_SET_TOKEN);
}
YY_BREAK
case 44:
YY_RULE_SETUP
#line 220 "pars0lex.l"
#line 245 "pars0lex.l"
{
return(PARS_DELETE_TOKEN);
}
YY_BREAK
case 45:
YY_RULE_SETUP
#line 224 "pars0lex.l"
#line 249 "pars0lex.l"
{
return(PARS_CURRENT_TOKEN);
}
YY_BREAK
case 46:
YY_RULE_SETUP
#line 228 "pars0lex.l"
#line 253 "pars0lex.l"
{
return(PARS_OF_TOKEN);
}
YY_BREAK
case 47:
YY_RULE_SETUP
#line 232 "pars0lex.l"
#line 257 "pars0lex.l"
{
return(PARS_CREATE_TOKEN);
}
YY_BREAK
case 48:
YY_RULE_SETUP
#line 236 "pars0lex.l"
#line 261 "pars0lex.l"
{
return(PARS_TABLE_TOKEN);
}
YY_BREAK
case 49:
YY_RULE_SETUP
#line 240 "pars0lex.l"
#line 265 "pars0lex.l"
{
return(PARS_INDEX_TOKEN);
}
YY_BREAK
case 50:
YY_RULE_SETUP
#line 244 "pars0lex.l"
#line 269 "pars0lex.l"
{
return(PARS_UNIQUE_TOKEN);
}
YY_BREAK
case 51:
YY_RULE_SETUP
#line 248 "pars0lex.l"
#line 273 "pars0lex.l"
{
return(PARS_CLUSTERED_TOKEN);
}
YY_BREAK
case 52:
YY_RULE_SETUP
#line 252 "pars0lex.l"
#line 277 "pars0lex.l"
{
return(PARS_DOES_NOT_FIT_IN_MEM_TOKEN);
}
YY_BREAK
case 53:
YY_RULE_SETUP
#line 256 "pars0lex.l"
#line 281 "pars0lex.l"
{
return(PARS_ON_TOKEN);
}
YY_BREAK
case 54:
YY_RULE_SETUP
#line 260 "pars0lex.l"
#line 285 "pars0lex.l"
{
return(PARS_DECLARE_TOKEN);
}
YY_BREAK
case 55:
YY_RULE_SETUP
#line 264 "pars0lex.l"
#line 289 "pars0lex.l"
{
return(PARS_CURSOR_TOKEN);
}
YY_BREAK
case 56:
YY_RULE_SETUP
#line 268 "pars0lex.l"
#line 293 "pars0lex.l"
{
return(PARS_OPEN_TOKEN);
}
YY_BREAK
case 57:
YY_RULE_SETUP
#line 272 "pars0lex.l"
#line 297 "pars0lex.l"
{
return(PARS_FETCH_TOKEN);
}
YY_BREAK
case 58:
YY_RULE_SETUP
#line 276 "pars0lex.l"
#line 301 "pars0lex.l"
{
return(PARS_CLOSE_TOKEN);
}
YY_BREAK
case 59:
YY_RULE_SETUP
#line 280 "pars0lex.l"
#line 305 "pars0lex.l"
{
return(PARS_NOTFOUND_TOKEN);
}
YY_BREAK
case 60:
YY_RULE_SETUP
#line 284 "pars0lex.l"
#line 309 "pars0lex.l"
{
return(PARS_TO_CHAR_TOKEN);
}
YY_BREAK
case 61:
YY_RULE_SETUP
#line 288 "pars0lex.l"
#line 313 "pars0lex.l"
{
return(PARS_TO_NUMBER_TOKEN);
}
YY_BREAK
case 62:
YY_RULE_SETUP
#line 292 "pars0lex.l"
#line 317 "pars0lex.l"
{
return(PARS_TO_BINARY_TOKEN);
}
YY_BREAK
case 63:
YY_RULE_SETUP
#line 296 "pars0lex.l"
#line 321 "pars0lex.l"
{
return(PARS_BINARY_TO_NUMBER_TOKEN);
}
YY_BREAK
case 64:
YY_RULE_SETUP
#line 300 "pars0lex.l"
#line 325 "pars0lex.l"
{
return(PARS_SUBSTR_TOKEN);
}
YY_BREAK
case 65:
YY_RULE_SETUP
#line 304 "pars0lex.l"
#line 329 "pars0lex.l"
{
return(PARS_REPLSTR_TOKEN);
}
YY_BREAK
case 66:
YY_RULE_SETUP
#line 308 "pars0lex.l"
#line 333 "pars0lex.l"
{
return(PARS_CONCAT_TOKEN);
}
YY_BREAK
case 67:
YY_RULE_SETUP
#line 312 "pars0lex.l"
#line 337 "pars0lex.l"
{
return(PARS_INSTR_TOKEN);
}
YY_BREAK
case 68:
YY_RULE_SETUP
#line 316 "pars0lex.l"
#line 341 "pars0lex.l"
{
return(PARS_LENGTH_TOKEN);
}
YY_BREAK
case 69:
YY_RULE_SETUP
#line 320 "pars0lex.l"
#line 345 "pars0lex.l"
{
return(PARS_SYSDATE_TOKEN);
}
YY_BREAK
case 70:
YY_RULE_SETUP
#line 324 "pars0lex.l"
#line 349 "pars0lex.l"
{
return(PARS_PRINTF_TOKEN);
}
YY_BREAK
case 71:
YY_RULE_SETUP
#line 328 "pars0lex.l"
#line 353 "pars0lex.l"
{
return(PARS_ASSERT_TOKEN);
}
YY_BREAK
case 72:
YY_RULE_SETUP
#line 332 "pars0lex.l"
#line 357 "pars0lex.l"
{
return(PARS_RND_TOKEN);
}
YY_BREAK
case 73:
YY_RULE_SETUP
#line 336 "pars0lex.l"
#line 361 "pars0lex.l"
{
return(PARS_RND_STR_TOKEN);
}
YY_BREAK
case 74:
YY_RULE_SETUP
#line 340 "pars0lex.l"
#line 365 "pars0lex.l"
{
return(PARS_ROW_PRINTF_TOKEN);
}
YY_BREAK
case 75:
YY_RULE_SETUP
#line 344 "pars0lex.l"
#line 369 "pars0lex.l"
{
return(PARS_COMMIT_TOKEN);
}
YY_BREAK
case 76:
YY_RULE_SETUP
#line 348 "pars0lex.l"
#line 373 "pars0lex.l"
{
return(PARS_ROLLBACK_TOKEN);
}
YY_BREAK
case 77:
YY_RULE_SETUP
#line 352 "pars0lex.l"
#line 377 "pars0lex.l"
{
return(PARS_WORK_TOKEN);
}
YY_BREAK
case 78:
YY_RULE_SETUP
#line 356 "pars0lex.l"
#line 381 "pars0lex.l"
{
yylval = sym_tab_add_id(pars_sym_tab_global,
(byte*)yytext,
......@@ -1405,42 +1430,42 @@ YY_RULE_SETUP
YY_BREAK
case 79:
YY_RULE_SETUP
#line 363 "pars0lex.l"
#line 388 "pars0lex.l"
{
return(PARS_DDOT_TOKEN);
}
YY_BREAK
case 80:
YY_RULE_SETUP
#line 367 "pars0lex.l"
#line 392 "pars0lex.l"
{
return(PARS_ASSIGN_TOKEN);
}
YY_BREAK
case 81:
YY_RULE_SETUP
#line 371 "pars0lex.l"
#line 396 "pars0lex.l"
{
return(PARS_LE_TOKEN);
}
YY_BREAK
case 82:
YY_RULE_SETUP
#line 375 "pars0lex.l"
#line 400 "pars0lex.l"
{
return(PARS_GE_TOKEN);
}
YY_BREAK
case 83:
YY_RULE_SETUP
#line 379 "pars0lex.l"
#line 404 "pars0lex.l"
{
return(PARS_NE_TOKEN);
}
YY_BREAK
case 84:
YY_RULE_SETUP
#line 383 "pars0lex.l"
#line 408 "pars0lex.l"
{
return((int)(*yytext));
......@@ -1448,7 +1473,7 @@ YY_RULE_SETUP
YY_BREAK
case 85:
YY_RULE_SETUP
#line 388 "pars0lex.l"
#line 413 "pars0lex.l"
{
return((int)(*yytext));
......@@ -1456,7 +1481,7 @@ YY_RULE_SETUP
YY_BREAK
case 86:
YY_RULE_SETUP
#line 393 "pars0lex.l"
#line 418 "pars0lex.l"
{
return((int)(*yytext));
......@@ -1464,7 +1489,7 @@ YY_RULE_SETUP
YY_BREAK
case 87:
YY_RULE_SETUP
#line 398 "pars0lex.l"
#line 423 "pars0lex.l"
{
return((int)(*yytext));
......@@ -1472,7 +1497,7 @@ YY_RULE_SETUP
YY_BREAK
case 88:
YY_RULE_SETUP
#line 403 "pars0lex.l"
#line 428 "pars0lex.l"
{
return((int)(*yytext));
......@@ -1480,7 +1505,7 @@ YY_RULE_SETUP
YY_BREAK
case 89:
YY_RULE_SETUP
#line 408 "pars0lex.l"
#line 433 "pars0lex.l"
{
return((int)(*yytext));
......@@ -1488,7 +1513,7 @@ YY_RULE_SETUP
YY_BREAK
case 90:
YY_RULE_SETUP
#line 413 "pars0lex.l"
#line 438 "pars0lex.l"
{
return((int)(*yytext));
......@@ -1496,7 +1521,7 @@ YY_RULE_SETUP
YY_BREAK
case 91:
YY_RULE_SETUP
#line 418 "pars0lex.l"
#line 443 "pars0lex.l"
{
return((int)(*yytext));
......@@ -1504,7 +1529,7 @@ YY_RULE_SETUP
YY_BREAK
case 92:
YY_RULE_SETUP
#line 423 "pars0lex.l"
#line 448 "pars0lex.l"
{
return((int)(*yytext));
......@@ -1512,7 +1537,7 @@ YY_RULE_SETUP
YY_BREAK
case 93:
YY_RULE_SETUP
#line 428 "pars0lex.l"
#line 453 "pars0lex.l"
{
return((int)(*yytext));
......@@ -1520,7 +1545,7 @@ YY_RULE_SETUP
YY_BREAK
case 94:
YY_RULE_SETUP
#line 433 "pars0lex.l"
#line 458 "pars0lex.l"
{
return((int)(*yytext));
......@@ -1528,7 +1553,7 @@ YY_RULE_SETUP
YY_BREAK
case 95:
YY_RULE_SETUP
#line 438 "pars0lex.l"
#line 463 "pars0lex.l"
{
return((int)(*yytext));
......@@ -1536,7 +1561,7 @@ YY_RULE_SETUP
YY_BREAK
case 96:
YY_RULE_SETUP
#line 443 "pars0lex.l"
#line 468 "pars0lex.l"
{
return((int)(*yytext));
......@@ -1544,7 +1569,7 @@ YY_RULE_SETUP
YY_BREAK
case 97:
YY_RULE_SETUP
#line 448 "pars0lex.l"
#line 473 "pars0lex.l"
{
return((int)(*yytext));
......@@ -1552,7 +1577,7 @@ YY_RULE_SETUP
YY_BREAK
case 98:
YY_RULE_SETUP
#line 453 "pars0lex.l"
#line 478 "pars0lex.l"
{
return((int)(*yytext));
......@@ -1560,42 +1585,42 @@ YY_RULE_SETUP
YY_BREAK
case 99:
YY_RULE_SETUP
#line 458 "pars0lex.l"
#line 483 "pars0lex.l"
BEGIN(comment); /* eat up comment */
YY_BREAK
case 100:
YY_RULE_SETUP
#line 460 "pars0lex.l"
#line 485 "pars0lex.l"
YY_BREAK
case 101:
YY_RULE_SETUP
#line 461 "pars0lex.l"
#line 486 "pars0lex.l"
YY_BREAK
case 102:
YY_RULE_SETUP
#line 462 "pars0lex.l"
#line 487 "pars0lex.l"
YY_BREAK
case 103:
YY_RULE_SETUP
#line 463 "pars0lex.l"
#line 488 "pars0lex.l"
YY_BREAK
case 104:
YY_RULE_SETUP
#line 464 "pars0lex.l"
#line 489 "pars0lex.l"
BEGIN(INITIAL);
YY_BREAK
case 105:
YY_RULE_SETUP
#line 466 "pars0lex.l"
#line 491 "pars0lex.l"
/* eat up whitespace */
YY_BREAK
case 106:
YY_RULE_SETUP
#line 469 "pars0lex.l"
#line 494 "pars0lex.l"
{
printf("Unrecognized character: %s\n", yytext);
......@@ -1606,10 +1631,10 @@ YY_RULE_SETUP
YY_BREAK
case 107:
YY_RULE_SETUP
#line 477 "pars0lex.l"
#line 502 "pars0lex.l"
ECHO;
YY_BREAK
#line 1613 "lex.yy.c"
#line 1638 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(comment):
yyterminate();
......@@ -2176,7 +2201,7 @@ YY_BUFFER_STATE b;
#ifndef YY_ALWAYS_INTERACTIVE
#ifndef YY_NEVER_INTERACTIVE
#include<unistd.h>
#endif
#endif
......@@ -2496,5 +2521,5 @@ int main()
return 0;
}
#endif
#line 477 "pars0lex.l"
#line 502 "pars0lex.l"
......@@ -89,12 +89,10 @@
#define PARS_WORK_TOKEN 339
#define NEG 340
#line 10 "pars0grm.y"
#line 13 "pars0grm.y"
/* The value of the semantic attribute is a pointer to a query tree node
que_node_t */
#define YYSTYPE que_node_t*
#define alloca mem_alloc
#include <math.h>
......@@ -105,6 +103,8 @@ que_node_t */
#include "que0que.h"
#include "row0sel.h"
#define YYSTYPE que_node_t*
/* #define __STDC__ */
int
......@@ -242,22 +242,22 @@ static const short yyrhs[] = { 162,
#if YYDEBUG != 0
static const short yyrline[] = { 0,
126, 128, 129, 130, 131, 132, 133, 134, 135, 136,
137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
147, 148, 151, 153, 157, 159, 161, 162, 163, 164,
165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
175, 176, 177, 178, 179, 180, 181, 183, 187, 189,
190, 191, 193, 194, 195, 196, 197, 198, 199, 202,
204, 205, 208, 213, 218, 220, 221, 224, 226, 230,
232, 233, 237, 239, 240, 243, 245, 250, 256, 262,
264, 265, 269, 272, 274, 277, 279, 282, 284, 288,
290, 294, 296, 297, 300, 302, 306, 316, 321, 324,
328, 332, 334, 338, 344, 351, 356, 361, 367, 372,
377, 382, 387, 393, 395, 399, 401, 403, 406, 413,
419, 427, 431, 437, 443, 448, 452, 454, 458, 460,
465, 471, 473, 477, 479, 482, 484, 487, 495, 500,
505, 507, 510, 514, 519, 521, 522, 526, 531, 533,
534, 537, 543, 545, 546, 549
129, 131, 132, 133, 134, 135, 136, 137, 138, 139,
140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
150, 151, 154, 156, 160, 162, 164, 165, 166, 167,
168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
178, 179, 180, 181, 182, 183, 184, 186, 190, 192,
193, 194, 196, 197, 198, 199, 200, 201, 202, 205,
207, 208, 211, 216, 221, 223, 224, 227, 229, 233,
235, 236, 240, 242, 243, 246, 248, 253, 259, 265,
267, 268, 272, 275, 277, 280, 282, 285, 287, 291,
293, 297, 299, 300, 303, 305, 309, 319, 324, 327,
331, 335, 337, 341, 347, 354, 359, 364, 370, 375,
380, 385, 390, 396, 398, 402, 404, 406, 409, 416,
422, 430, 434, 440, 446, 451, 455, 457, 461, 463,
468, 474, 476, 480, 482, 485, 487, 490, 498, 503,
508, 510, 513, 517, 522, 524, 525, 529, 534, 536,
537, 540, 546, 548, 549, 552
};
#endif
......@@ -1122,218 +1122,218 @@ yyparse(YYPARSE_PARAM_ARG)
switch (yyn) {
case 23:
#line 152 "pars0grm.y"
#line 155 "pars0grm.y"
{ yyval = que_node_list_add_last(NULL, yyvsp[0]); ;
break;}
case 24:
#line 154 "pars0grm.y"
#line 157 "pars0grm.y"
{ yyval = que_node_list_add_last(yyvsp[-1], yyvsp[0]); ;
break;}
case 25:
#line 158 "pars0grm.y"
#line 161 "pars0grm.y"
{ yyval = yyvsp[0];;
break;}
case 26:
#line 160 "pars0grm.y"
#line 163 "pars0grm.y"
{ yyval = pars_func(yyvsp[-3], yyvsp[-1]); ;
break;}
case 27:
#line 161 "pars0grm.y"
#line 164 "pars0grm.y"
{ yyval = yyvsp[0];;
break;}
case 28:
#line 162 "pars0grm.y"
#line 165 "pars0grm.y"
{ yyval = yyvsp[0];;
break;}
case 29:
#line 163 "pars0grm.y"
#line 166 "pars0grm.y"
{ yyval = yyvsp[0];;
break;}
case 30:
#line 164 "pars0grm.y"
#line 167 "pars0grm.y"
{ yyval = yyvsp[0];;
break;}
case 31:
#line 165 "pars0grm.y"
#line 168 "pars0grm.y"
{ yyval = yyvsp[0];;
break;}
case 32:
#line 166 "pars0grm.y"
#line 169 "pars0grm.y"
{ yyval = pars_op('+', yyvsp[-2], yyvsp[0]); ;
break;}
case 33:
#line 167 "pars0grm.y"
#line 170 "pars0grm.y"
{ yyval = pars_op('-', yyvsp[-2], yyvsp[0]); ;
break;}
case 34:
#line 168 "pars0grm.y"
#line 171 "pars0grm.y"
{ yyval = pars_op('*', yyvsp[-2], yyvsp[0]); ;
break;}
case 35:
#line 169 "pars0grm.y"
#line 172 "pars0grm.y"
{ yyval = pars_op('/', yyvsp[-2], yyvsp[0]); ;
break;}
case 36:
#line 170 "pars0grm.y"
#line 173 "pars0grm.y"
{ yyval = pars_op('-', yyvsp[0], NULL); ;
break;}
case 37:
#line 171 "pars0grm.y"
#line 174 "pars0grm.y"
{ yyval = yyvsp[-1]; ;
break;}
case 38:
#line 172 "pars0grm.y"
#line 175 "pars0grm.y"
{ yyval = pars_op('=', yyvsp[-2], yyvsp[0]); ;
break;}
case 39:
#line 173 "pars0grm.y"
#line 176 "pars0grm.y"
{ yyval = pars_op('<', yyvsp[-2], yyvsp[0]); ;
break;}
case 40:
#line 174 "pars0grm.y"
#line 177 "pars0grm.y"
{ yyval = pars_op('>', yyvsp[-2], yyvsp[0]); ;
break;}
case 41:
#line 175 "pars0grm.y"
#line 178 "pars0grm.y"
{ yyval = pars_op(PARS_GE_TOKEN, yyvsp[-2], yyvsp[0]); ;
break;}
case 42:
#line 176 "pars0grm.y"
#line 179 "pars0grm.y"
{ yyval = pars_op(PARS_LE_TOKEN, yyvsp[-2], yyvsp[0]); ;
break;}
case 43:
#line 177 "pars0grm.y"
#line 180 "pars0grm.y"
{ yyval = pars_op(PARS_NE_TOKEN, yyvsp[-2], yyvsp[0]); ;
break;}
case 44:
#line 178 "pars0grm.y"
#line 181 "pars0grm.y"
{ yyval = pars_op(PARS_AND_TOKEN, yyvsp[-2], yyvsp[0]); ;
break;}
case 45:
#line 179 "pars0grm.y"
#line 182 "pars0grm.y"
{ yyval = pars_op(PARS_OR_TOKEN, yyvsp[-2], yyvsp[0]); ;
break;}
case 46:
#line 180 "pars0grm.y"
#line 183 "pars0grm.y"
{ yyval = pars_op(PARS_NOT_TOKEN, yyvsp[0], NULL); ;
break;}
case 47:
#line 182 "pars0grm.y"
#line 185 "pars0grm.y"
{ yyval = pars_op(PARS_NOTFOUND_TOKEN, yyvsp[-2], NULL); ;
break;}
case 48:
#line 184 "pars0grm.y"
#line 187 "pars0grm.y"
{ yyval = pars_op(PARS_NOTFOUND_TOKEN, yyvsp[-2], NULL); ;
break;}
case 49:
#line 188 "pars0grm.y"
#line 191 "pars0grm.y"
{ yyval = &pars_to_char_token; ;
break;}
case 50:
#line 189 "pars0grm.y"
#line 192 "pars0grm.y"
{ yyval = &pars_to_number_token; ;
break;}
case 51:
#line 190 "pars0grm.y"
#line 193 "pars0grm.y"
{ yyval = &pars_to_binary_token; ;
break;}
case 52:
#line 192 "pars0grm.y"
#line 195 "pars0grm.y"
{ yyval = &pars_binary_to_number_token; ;
break;}
case 53:
#line 193 "pars0grm.y"
#line 196 "pars0grm.y"
{ yyval = &pars_substr_token; ;
break;}
case 54:
#line 194 "pars0grm.y"
#line 197 "pars0grm.y"
{ yyval = &pars_concat_token; ;
break;}
case 55:
#line 195 "pars0grm.y"
#line 198 "pars0grm.y"
{ yyval = &pars_instr_token; ;
break;}
case 56:
#line 196 "pars0grm.y"
#line 199 "pars0grm.y"
{ yyval = &pars_length_token; ;
break;}
case 57:
#line 197 "pars0grm.y"
#line 200 "pars0grm.y"
{ yyval = &pars_sysdate_token; ;
break;}
case 58:
#line 198 "pars0grm.y"
#line 201 "pars0grm.y"
{ yyval = &pars_rnd_token; ;
break;}
case 59:
#line 199 "pars0grm.y"
#line 202 "pars0grm.y"
{ yyval = &pars_rnd_str_token; ;
break;}
case 63:
#line 210 "pars0grm.y"
#line 213 "pars0grm.y"
{ yyval = pars_stored_procedure_call(yyvsp[-4]); ;
break;}
case 64:
#line 215 "pars0grm.y"
#line 218 "pars0grm.y"
{ yyval = pars_procedure_call(yyvsp[-3], yyvsp[-1]); ;
break;}
case 65:
#line 219 "pars0grm.y"
#line 222 "pars0grm.y"
{ yyval = &pars_replstr_token; ;
break;}
case 66:
#line 220 "pars0grm.y"
#line 223 "pars0grm.y"
{ yyval = &pars_printf_token; ;
break;}
case 67:
#line 221 "pars0grm.y"
#line 224 "pars0grm.y"
{ yyval = &pars_assert_token; ;
break;}
case 68:
#line 225 "pars0grm.y"
#line 228 "pars0grm.y"
{ yyval = que_node_list_add_last(NULL, yyvsp[0]); ;
break;}
case 69:
#line 227 "pars0grm.y"
#line 230 "pars0grm.y"
{ yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;
break;}
case 70:
#line 231 "pars0grm.y"
#line 234 "pars0grm.y"
{ yyval = NULL; ;
break;}
case 71:
#line 232 "pars0grm.y"
#line 235 "pars0grm.y"
{ yyval = que_node_list_add_last(NULL, yyvsp[0]); ;
break;}
case 72:
#line 234 "pars0grm.y"
#line 237 "pars0grm.y"
{ yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;
break;}
case 73:
#line 238 "pars0grm.y"
#line 241 "pars0grm.y"
{ yyval = NULL; ;
break;}
case 74:
#line 239 "pars0grm.y"
#line 242 "pars0grm.y"
{ yyval = que_node_list_add_last(NULL, yyvsp[0]);;
break;}
case 75:
#line 240 "pars0grm.y"
#line 243 "pars0grm.y"
{ yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;
break;}
case 76:
#line 244 "pars0grm.y"
#line 247 "pars0grm.y"
{ yyval = yyvsp[0]; ;
break;}
case 77:
#line 246 "pars0grm.y"
#line 249 "pars0grm.y"
{ yyval = pars_func(&pars_count_token,
que_node_list_add_last(NULL,
sym_tab_add_int_lit(
pars_sym_tab_global, 1))); ;
break;}
case 78:
#line 251 "pars0grm.y"
#line 254 "pars0grm.y"
{ yyval = pars_func(&pars_count_token,
que_node_list_add_last(NULL,
pars_func(&pars_distinct_token,
......@@ -1341,302 +1341,302 @@ case 78:
NULL, yyvsp[-1])))); ;
break;}
case 79:
#line 257 "pars0grm.y"
#line 260 "pars0grm.y"
{ yyval = pars_func(&pars_sum_token,
que_node_list_add_last(NULL,
yyvsp[-1])); ;
break;}
case 80:
#line 263 "pars0grm.y"
#line 266 "pars0grm.y"
{ yyval = NULL; ;
break;}
case 81:
#line 264 "pars0grm.y"
#line 267 "pars0grm.y"
{ yyval = que_node_list_add_last(NULL, yyvsp[0]); ;
break;}
case 82:
#line 266 "pars0grm.y"
#line 269 "pars0grm.y"
{ yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;
break;}
case 83:
#line 270 "pars0grm.y"
#line 273 "pars0grm.y"
{ yyval = pars_select_list(&pars_star_denoter,
NULL); ;
break;}
case 84:
#line 273 "pars0grm.y"
#line 276 "pars0grm.y"
{ yyval = pars_select_list(yyvsp[-2], yyvsp[0]); ;
break;}
case 85:
#line 274 "pars0grm.y"
#line 277 "pars0grm.y"
{ yyval = pars_select_list(yyvsp[0], NULL); ;
break;}
case 86:
#line 278 "pars0grm.y"
#line 281 "pars0grm.y"
{ yyval = NULL; ;
break;}
case 87:
#line 279 "pars0grm.y"
#line 282 "pars0grm.y"
{ yyval = yyvsp[0]; ;
break;}
case 88:
#line 283 "pars0grm.y"
#line 286 "pars0grm.y"
{ yyval = NULL; ;
break;}
case 89:
#line 285 "pars0grm.y"
#line 288 "pars0grm.y"
{ yyval = &pars_update_token; ;
break;}
case 90:
#line 289 "pars0grm.y"
#line 292 "pars0grm.y"
{ yyval = NULL; ;
break;}
case 91:
#line 291 "pars0grm.y"
#line 294 "pars0grm.y"
{ yyval = &pars_consistent_token; ;
break;}
case 92:
#line 295 "pars0grm.y"
#line 298 "pars0grm.y"
{ yyval = &pars_asc_token; ;
break;}
case 93:
#line 296 "pars0grm.y"
#line 299 "pars0grm.y"
{ yyval = &pars_asc_token; ;
break;}
case 94:
#line 297 "pars0grm.y"
#line 300 "pars0grm.y"
{ yyval = &pars_desc_token; ;
break;}
case 95:
#line 301 "pars0grm.y"
#line 304 "pars0grm.y"
{ yyval = NULL; ;
break;}
case 96:
#line 303 "pars0grm.y"
#line 306 "pars0grm.y"
{ yyval = pars_order_by(yyvsp[-1], yyvsp[0]); ;
break;}
case 97:
#line 312 "pars0grm.y"
#line 315 "pars0grm.y"
{ yyval = pars_select_statement(yyvsp[-6], yyvsp[-4], yyvsp[-3],
yyvsp[-2], yyvsp[-1], yyvsp[0]); ;
break;}
case 98:
#line 318 "pars0grm.y"
#line 321 "pars0grm.y"
{ yyval = yyvsp[0]; ;
break;}
case 99:
#line 323 "pars0grm.y"
#line 326 "pars0grm.y"
{ yyval = pars_insert_statement(yyvsp[-4], yyvsp[-1], NULL); ;
break;}
case 100:
#line 325 "pars0grm.y"
#line 328 "pars0grm.y"
{ yyval = pars_insert_statement(yyvsp[-1], NULL, yyvsp[0]); ;
break;}
case 101:
#line 329 "pars0grm.y"
#line 332 "pars0grm.y"
{ yyval = pars_column_assignment(yyvsp[-2], yyvsp[0]); ;
break;}
case 102:
#line 333 "pars0grm.y"
#line 336 "pars0grm.y"
{ yyval = que_node_list_add_last(NULL, yyvsp[0]); ;
break;}
case 103:
#line 335 "pars0grm.y"
#line 338 "pars0grm.y"
{ yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;
break;}
case 104:
#line 341 "pars0grm.y"
#line 344 "pars0grm.y"
{ yyval = yyvsp[0]; ;
break;}
case 105:
#line 347 "pars0grm.y"
#line 350 "pars0grm.y"
{ yyval = pars_update_statement_start(FALSE,
yyvsp[-2], yyvsp[0]); ;
break;}
case 106:
#line 353 "pars0grm.y"
#line 356 "pars0grm.y"
{ yyval = pars_update_statement(yyvsp[-1], NULL, yyvsp[0]); ;
break;}
case 107:
#line 358 "pars0grm.y"
#line 361 "pars0grm.y"
{ yyval = pars_update_statement(yyvsp[-1], yyvsp[0], NULL); ;
break;}
case 108:
#line 363 "pars0grm.y"
#line 366 "pars0grm.y"
{ yyval = pars_update_statement_start(TRUE,
yyvsp[0], NULL); ;
break;}
case 109:
#line 369 "pars0grm.y"
#line 372 "pars0grm.y"
{ yyval = pars_update_statement(yyvsp[-1], NULL, yyvsp[0]); ;
break;}
case 110:
#line 374 "pars0grm.y"
#line 377 "pars0grm.y"
{ yyval = pars_update_statement(yyvsp[-1], yyvsp[0], NULL); ;
break;}
case 111:
#line 379 "pars0grm.y"
#line 382 "pars0grm.y"
{ yyval = pars_row_printf_statement(yyvsp[0]); ;
break;}
case 112:
#line 384 "pars0grm.y"
#line 387 "pars0grm.y"
{ yyval = pars_assignment_statement(yyvsp[-2], yyvsp[0]); ;
break;}
case 113:
#line 390 "pars0grm.y"
#line 393 "pars0grm.y"
{ yyval = pars_elsif_element(yyvsp[-2], yyvsp[0]); ;
break;}
case 114:
#line 394 "pars0grm.y"
#line 397 "pars0grm.y"
{ yyval = que_node_list_add_last(NULL, yyvsp[0]); ;
break;}
case 115:
#line 396 "pars0grm.y"
#line 399 "pars0grm.y"
{ yyval = que_node_list_add_last(yyvsp[-1], yyvsp[0]); ;
break;}
case 116:
#line 400 "pars0grm.y"
#line 403 "pars0grm.y"
{ yyval = NULL; ;
break;}
case 117:
#line 402 "pars0grm.y"
#line 405 "pars0grm.y"
{ yyval = yyvsp[0]; ;
break;}
case 118:
#line 403 "pars0grm.y"
#line 406 "pars0grm.y"
{ yyval = yyvsp[0]; ;
break;}
case 119:
#line 410 "pars0grm.y"
#line 413 "pars0grm.y"
{ yyval = pars_if_statement(yyvsp[-5], yyvsp[-3], yyvsp[-2]); ;
break;}
case 120:
#line 416 "pars0grm.y"
#line 419 "pars0grm.y"
{ yyval = pars_while_statement(yyvsp[-4], yyvsp[-2]); ;
break;}
case 121:
#line 424 "pars0grm.y"
#line 427 "pars0grm.y"
{ yyval = pars_for_statement(yyvsp[-8], yyvsp[-6], yyvsp[-4], yyvsp[-2]); ;
break;}
case 122:
#line 428 "pars0grm.y"
#line 431 "pars0grm.y"
{ yyval = pars_return_statement(); ;
break;}
case 123:
#line 433 "pars0grm.y"
#line 436 "pars0grm.y"
{ yyval = pars_open_statement(
ROW_SEL_OPEN_CURSOR, yyvsp[0]); ;
break;}
case 124:
#line 439 "pars0grm.y"
#line 442 "pars0grm.y"
{ yyval = pars_open_statement(
ROW_SEL_CLOSE_CURSOR, yyvsp[0]); ;
break;}
case 125:
#line 445 "pars0grm.y"
#line 448 "pars0grm.y"
{ yyval = pars_fetch_statement(yyvsp[-2], yyvsp[0]); ;
break;}
case 126:
#line 449 "pars0grm.y"
#line 452 "pars0grm.y"
{ yyval = pars_column_def(yyvsp[-1], yyvsp[0]); ;
break;}
case 127:
#line 453 "pars0grm.y"
#line 456 "pars0grm.y"
{ yyval = que_node_list_add_last(NULL, yyvsp[0]); ;
break;}
case 128:
#line 455 "pars0grm.y"
#line 458 "pars0grm.y"
{ yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;
break;}
case 129:
#line 459 "pars0grm.y"
#line 462 "pars0grm.y"
{ yyval = NULL; ;
break;}
case 130:
#line 461 "pars0grm.y"
#line 464 "pars0grm.y"
{ yyval = &pars_int_token;
/* pass any non-NULL pointer */ ;
break;}
case 131:
#line 468 "pars0grm.y"
#line 471 "pars0grm.y"
{ yyval = pars_create_table(yyvsp[-4], yyvsp[-2], yyvsp[0]); ;
break;}
case 132:
#line 472 "pars0grm.y"
#line 475 "pars0grm.y"
{ yyval = que_node_list_add_last(NULL, yyvsp[0]); ;
break;}
case 133:
#line 474 "pars0grm.y"
#line 477 "pars0grm.y"
{ yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;
break;}
case 134:
#line 478 "pars0grm.y"
#line 481 "pars0grm.y"
{ yyval = NULL; ;
break;}
case 135:
#line 479 "pars0grm.y"
#line 482 "pars0grm.y"
{ yyval = &pars_unique_token; ;
break;}
case 136:
#line 483 "pars0grm.y"
#line 486 "pars0grm.y"
{ yyval = NULL; ;
break;}
case 137:
#line 484 "pars0grm.y"
#line 487 "pars0grm.y"
{ yyval = &pars_clustered_token; ;
break;}
case 138:
#line 492 "pars0grm.y"
#line 495 "pars0grm.y"
{ yyval = pars_create_index(yyvsp[-8], yyvsp[-7], yyvsp[-5], yyvsp[-3], yyvsp[-1]); ;
break;}
case 139:
#line 497 "pars0grm.y"
#line 500 "pars0grm.y"
{ yyval = pars_commit_statement(); ;
break;}
case 140:
#line 502 "pars0grm.y"
#line 505 "pars0grm.y"
{ yyval = pars_rollback_statement(); ;
break;}
case 141:
#line 506 "pars0grm.y"
#line 509 "pars0grm.y"
{ yyval = &pars_int_token; ;
break;}
case 142:
#line 507 "pars0grm.y"
#line 510 "pars0grm.y"
{ yyval = &pars_char_token; ;
break;}
case 143:
#line 512 "pars0grm.y"
#line 515 "pars0grm.y"
{ yyval = pars_parameter_declaration(yyvsp[-2],
PARS_INPUT, yyvsp[0]); ;
break;}
case 144:
#line 515 "pars0grm.y"
#line 518 "pars0grm.y"
{ yyval = pars_parameter_declaration(yyvsp[-2],
PARS_OUTPUT, yyvsp[0]); ;
break;}
case 145:
#line 520 "pars0grm.y"
#line 523 "pars0grm.y"
{ yyval = NULL; ;
break;}
case 146:
#line 521 "pars0grm.y"
#line 524 "pars0grm.y"
{ yyval = que_node_list_add_last(NULL, yyvsp[0]); ;
break;}
case 147:
#line 523 "pars0grm.y"
#line 526 "pars0grm.y"
{ yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;
break;}
case 148:
#line 528 "pars0grm.y"
#line 531 "pars0grm.y"
{ yyval = pars_variable_declaration(yyvsp[-2], yyvsp[-1]); ;
break;}
case 152:
#line 540 "pars0grm.y"
#line 543 "pars0grm.y"
{ yyval = pars_cursor_declaration(yyvsp[-3], yyvsp[-1]); ;
break;}
case 156:
#line 556 "pars0grm.y"
#line 559 "pars0grm.y"
{ yyval = pars_procedure_definition(yyvsp[-9], yyvsp[-7],
yyvsp[-1]); ;
break;}
......@@ -1866,5 +1866,5 @@ case 156:
#endif
return 1;
}
#line 560 "pars0grm.y"
#line 563 "pars0grm.y"
......@@ -13,8 +13,6 @@ the InnoDB parser.
%{
/* The value of the semantic attribute is a pointer to a query tree node
que_node_t */
#define YYSTYPE que_node_t*
#define alloca mem_alloc
#include <math.h>
......@@ -25,6 +23,8 @@ que_node_t */
#include "que0que.h"
#include "row0sel.h"
#define YYSTYPE que_node_t*
/* #define __STDC__ */
int
......
......@@ -26,6 +26,8 @@ How to make the InnoDB parser and lexer C files:
5. Rename lex.yy.c to lexyy.c.
6. Remove the #include of unistd.h from about line 2500 of lexyy.c
These instructions seem to work at least with bison-1.28 and flex-2.5.4 on
Linux.
*******************************************************/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment