Commit cf058e65 authored by osku's avatar osku

Support quoted identifiers in InnoDB's SQL parser. Original patch by marko,

testing and a few fixes by me.
parent 68908aba
#include "univ.i"
#line 2 "_flex_tmp.c"
#line 3 "lex.yy.c"
#line 4 "_flex_tmp.c"
#define YY_INT_ALIGNED short int
......@@ -13,8 +15,6 @@
#define FLEX_BETA
#endif
#include "univ.i"
/* First, we deal with platform-specific or compiler-specific issues. */
/* begin standard C headers. */
......@@ -356,8 +356,8 @@ static void yy_fatal_error (yyconst char msg[] );
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
#define YY_NUM_RULES 111
#define YY_END_OF_BUFFER 112
#define YY_NUM_RULES 114
#define YY_END_OF_BUFFER 115
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
......@@ -365,49 +365,50 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
static yyconst flex_int16_t yy_accept[379] =
static yyconst flex_int16_t yy_accept[386] =
{ 0,
0, 0, 106, 106, 0, 0, 112, 110, 109, 109,
101, 3, 90, 96, 99, 97, 94, 98, 110, 100,
1, 110, 95, 93, 91, 92, 104, 84, 84, 84,
84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
84, 84, 84, 84, 84, 102, 103, 106, 107, 4,
5, 109, 85, 105, 2, 1, 86, 87, 89, 88,
84, 84, 84, 84, 84, 84, 40, 84, 84, 84,
84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
84, 84, 23, 12, 20, 84, 84, 84, 84, 50,
57, 84, 9, 84, 84, 84, 84, 84, 84, 84,
84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
106, 107, 107, 108, 4, 5, 2, 8, 41, 84,
84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
84, 84, 84, 84, 84, 84, 84, 22, 84, 84,
84, 36, 84, 84, 84, 16, 84, 84, 10, 84,
84, 84, 13, 84, 84, 84, 84, 84, 76, 84,
84, 84, 47, 7, 84, 31, 84, 84, 84, 84,
84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
15, 19, 84, 84, 84, 84, 84, 84, 84, 84,
84, 84, 84, 42, 84, 84, 25, 84, 83, 84,
84, 34, 84, 84, 84, 84, 44, 84, 27, 84,
6, 60, 84, 84, 84, 38, 84, 84, 84, 84,
84, 84, 84, 84, 84, 24, 84, 84, 84, 84,
84, 84, 84, 84, 84, 81, 84, 21, 84, 62,
84, 84, 84, 84, 32, 84, 84, 84, 84, 84,
84, 84, 26, 61, 18, 53, 84, 71, 84, 84,
84, 39, 84, 84, 84, 84, 84, 84, 84, 84,
84, 84, 52, 84, 84, 84, 84, 84, 84, 84,
35, 28, 75, 14, 84, 79, 70, 84, 51, 84,
59, 84, 48, 84, 84, 43, 84, 72, 84, 74,
84, 84, 29, 84, 84, 84, 30, 68, 84, 84,
84, 84, 54, 84, 46, 45, 84, 84, 84, 49,
58, 84, 84, 17, 84, 84, 69, 77, 84, 84,
73, 84, 64, 84, 84, 84, 84, 84, 33, 84,
63, 84, 80, 84, 84, 84, 82, 84, 55, 84,
84, 11, 84, 66, 65, 84, 37, 84, 78, 84,
84, 84, 84, 84, 84, 84, 84, 84, 84, 67,
84, 84, 84, 84, 84, 84, 56, 0
0, 0, 109, 109, 0, 0, 0, 0, 115, 113,
112, 112, 6, 104, 3, 93, 99, 102, 100, 97,
101, 113, 103, 1, 113, 98, 96, 94, 95, 107,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 105, 106,
109, 110, 4, 5, 7, 8, 112, 88, 108, 2,
1, 89, 90, 92, 91, 87, 87, 87, 87, 87,
87, 43, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 26, 15, 23,
87, 87, 87, 87, 53, 60, 87, 12, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 109, 110, 110, 111, 4,
5, 7, 8, 2, 11, 44, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 25, 87, 87, 87, 39, 87,
87, 87, 19, 87, 87, 13, 87, 87, 87, 16,
87, 87, 87, 87, 87, 79, 87, 87, 87, 50,
10, 87, 34, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 18, 22, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
45, 87, 87, 28, 87, 86, 87, 87, 37, 87,
87, 87, 87, 47, 87, 30, 87, 9, 63, 87,
87, 87, 41, 87, 87, 87, 87, 87, 87, 87,
87, 87, 27, 87, 87, 87, 87, 87, 87, 87,
87, 87, 84, 87, 24, 87, 65, 87, 87, 87,
87, 35, 87, 87, 87, 87, 87, 87, 87, 29,
64, 21, 56, 87, 74, 87, 87, 87, 42, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 55,
87, 87, 87, 87, 87, 87, 87, 38, 31, 78,
17, 87, 82, 73, 87, 54, 87, 62, 87, 51,
87, 87, 46, 87, 75, 87, 77, 87, 87, 32,
87, 87, 87, 33, 71, 87, 87, 87, 87, 57,
87, 49, 48, 87, 87, 87, 52, 61, 87, 87,
20, 87, 87, 72, 80, 87, 87, 76, 87, 67,
87, 87, 87, 87, 87, 36, 87, 66, 87, 83,
87, 87, 87, 85, 87, 58, 87, 87, 14, 87,
69, 68, 87, 40, 87, 81, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 70, 87, 87, 87,
87, 87, 87, 59, 0
} ;
static yyconst flex_int32_t yy_ec[256] =
......@@ -415,17 +416,17 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 2, 1, 1, 1, 1, 4, 1, 5, 6,
7, 8, 9, 10, 11, 12, 13, 14, 14, 14,
14, 14, 14, 14, 14, 14, 14, 15, 16, 17,
18, 19, 20, 1, 21, 22, 23, 24, 25, 26,
27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 30,
1, 1, 1, 1, 46, 1, 30, 30, 30, 30,
30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
30, 30, 47, 1, 48, 1, 1, 1, 1, 1,
1, 2, 1, 4, 1, 1, 5, 1, 6, 7,
8, 9, 10, 11, 12, 13, 14, 15, 15, 15,
15, 15, 15, 15, 15, 15, 15, 16, 17, 18,
19, 20, 21, 1, 22, 23, 24, 25, 26, 27,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
38, 39, 40, 41, 42, 43, 44, 45, 46, 31,
1, 1, 1, 1, 47, 1, 31, 31, 31, 31,
31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
31, 31, 48, 1, 49, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
......@@ -442,213 +443,221 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1
} ;
static yyconst flex_int32_t yy_meta[49] =
static yyconst flex_int32_t yy_meta[50] =
{ 0,
1, 1, 1, 1, 2, 1, 1, 3, 1, 1,
1, 1, 1, 4, 1, 1, 1, 1, 1, 1,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 1, 1
1, 1, 1, 2, 1, 3, 1, 1, 4, 1,
1, 1, 1, 1, 5, 1, 1, 1, 1, 1,
1, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 1, 1
} ;
static yyconst flex_int16_t yy_base[385] =
static yyconst flex_int16_t yy_base[394] =
{ 0,
0, 0, 399, 398, 400, 399, 403, 408, 47, 49,
408, 408, 408, 408, 408, 408, 408, 408, 390, 393,
41, 382, 408, 38, 408, 381, 408, 20, 33, 32,
46, 40, 44, 0, 51, 58, 45, 61, 360, 66,
67, 68, 27, 376, 70, 408, 408, 0, 98, 0,
391, 107, 408, 408, 381, 54, 408, 408, 408, 408,
0, 370, 84, 366, 358, 356, 0, 369, 53, 80,
364, 350, 92, 348, 361, 346, 360, 354, 342, 346,
342, 344, 0, 93, 0, 344, 342, 336, 343, 0,
0, 349, 349, 332, 87, 98, 347, 86, 88, 338,
103, 330, 346, 342, 320, 98, 341, 332, 101, 325,
0, 127, 131, 408, 0, 357, 347, 0, 0, 335,
330, 337, 335, 318, 316, 315, 320, 118, 318, 330,
104, 318, 324, 325, 307, 307, 120, 0, 305, 321,
322, 0, 309, 316, 121, 123, 313, 303, 312, 305,
302, 310, 0, 300, 310, 308, 299, 289, 283, 296,
281, 301, 0, 0, 286, 0, 300, 291, 288, 128,
284, 291, 298, 277, 279, 284, 284, 276, 279, 274,
0, 0, 286, 270, 280, 287, 278, 266, 265, 279,
268, 281, 261, 0, 271, 253, 0, 272, 0, 269,
256, 0, 251, 256, 255, 265, 0, 251, 0, 255,
0, 0, 251, 248, 262, 0, 247, 247, 245, 261,
246, 258, 240, 258, 253, 0, 248, 248, 234, 233,
246, 232, 246, 245, 244, 0, 228, 0, 222, 0,
241, 225, 224, 224, 0, 237, 227, 222, 221, 233,
223, 222, 0, 0, 0, 0, 215, 0, 229, 225,
211, 0, 225, 226, 209, 214, 207, 225, 207, 204,
205, 202, 0, 207, 219, 206, 213, 203, 211, 196,
0, 0, 0, 188, 195, 0, 0, 192, 0, 191,
0, 205, 0, 206, 193, 0, 189, 0, 192, 0,
184, 186, 0, 185, 199, 192, 0, 0, 195, 198,
180, 195, 0, 191, 0, 0, 175, 189, 188, 0,
0, 172, 171, 0, 186, 171, 0, 0, 177, 173,
0, 168, 0, 180, 180, 168, 178, 167, 0, 154,
0, 174, 0, 158, 152, 158, 0, 149, 0, 154,
167, 0, 166, 0, 0, 157, 0, 161, 0, 148,
148, 154, 140, 163, 155, 158, 146, 135, 114, 0,
126, 131, 122, 119, 115, 107, 0, 408, 162, 166,
143, 170, 174, 178
0, 0, 417, 416, 418, 417, 418, 417, 420, 427,
48, 50, 427, 427, 427, 427, 427, 427, 427, 427,
427, 406, 409, 41, 398, 427, 38, 427, 397, 427,
20, 33, 32, 46, 40, 44, 0, 51, 58, 45,
61, 376, 66, 67, 68, 27, 392, 70, 427, 427,
0, 98, 0, 407, 0, 408, 108, 427, 427, 396,
54, 427, 427, 427, 427, 0, 385, 84, 381, 373,
371, 0, 384, 53, 80, 379, 365, 92, 363, 376,
361, 375, 369, 357, 361, 357, 359, 0, 93, 0,
359, 357, 351, 358, 0, 0, 364, 364, 347, 87,
98, 362, 86, 88, 353, 103, 345, 361, 357, 335,
98, 356, 347, 101, 340, 0, 127, 131, 427, 0,
372, 0, 373, 361, 0, 0, 349, 344, 351, 349,
332, 330, 329, 334, 118, 332, 344, 104, 332, 338,
339, 321, 321, 120, 0, 319, 335, 336, 0, 323,
330, 121, 123, 327, 317, 326, 319, 316, 324, 0,
314, 324, 322, 313, 303, 297, 310, 295, 315, 0,
0, 300, 0, 314, 305, 302, 128, 298, 305, 312,
291, 293, 298, 298, 290, 293, 288, 0, 0, 300,
284, 294, 301, 292, 280, 279, 293, 282, 295, 275,
0, 285, 267, 0, 286, 0, 283, 270, 0, 265,
270, 269, 279, 0, 265, 0, 269, 0, 0, 265,
262, 276, 0, 261, 261, 259, 275, 260, 272, 254,
272, 267, 0, 262, 262, 248, 247, 260, 246, 260,
259, 258, 0, 242, 0, 236, 0, 255, 239, 238,
238, 0, 251, 241, 236, 235, 247, 237, 236, 0,
0, 0, 0, 229, 0, 243, 239, 225, 0, 239,
240, 223, 228, 221, 239, 221, 218, 219, 216, 0,
221, 233, 220, 227, 217, 225, 210, 0, 0, 0,
202, 209, 0, 0, 206, 0, 205, 0, 219, 0,
220, 207, 0, 203, 0, 206, 0, 198, 200, 0,
199, 213, 206, 0, 0, 209, 212, 194, 209, 0,
205, 0, 0, 189, 203, 202, 0, 0, 186, 185,
0, 200, 185, 0, 0, 191, 187, 0, 182, 0,
194, 194, 182, 192, 181, 0, 168, 0, 188, 0,
172, 166, 172, 0, 163, 0, 168, 181, 0, 180,
0, 0, 171, 0, 175, 0, 162, 162, 168, 154,
177, 169, 169, 156, 143, 114, 0, 126, 131, 122,
119, 115, 107, 0, 427, 163, 168, 173, 143, 178,
183, 188, 193
} ;
static yyconst flex_int16_t yy_def[385] =
static yyconst flex_int16_t yy_def[394] =
{ 0,
378, 1, 379, 379, 380, 380, 378, 378, 378, 378,
378, 378, 378, 378, 378, 378, 378, 378, 378, 378,
378, 378, 378, 378, 378, 378, 378, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 378, 378, 382, 383, 384,
378, 378, 378, 378, 378, 378, 378, 378, 378, 378,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
382, 383, 383, 378, 384, 378, 378, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 381, 381, 381,
381, 381, 381, 381, 381, 381, 381, 0, 378, 378,
378, 378, 378, 378
385, 1, 386, 386, 387, 387, 388, 388, 385, 385,
385, 385, 385, 385, 385, 385, 385, 385, 385, 385,
385, 385, 385, 385, 385, 385, 385, 385, 385, 385,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 385, 385,
390, 391, 392, 385, 393, 385, 385, 385, 385, 385,
385, 385, 385, 385, 385, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 390, 391, 391, 385, 392,
385, 393, 385, 385, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 389, 389, 389, 389, 389, 389,
389, 389, 389, 389, 0, 385, 385, 385, 385, 385,
385, 385, 385
} ;
static yyconst flex_int16_t yy_nxt[457] =
static yyconst flex_int16_t yy_nxt[477] =
{ 0,
8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
28, 29, 30, 31, 32, 33, 34, 34, 35, 34,
34, 36, 34, 37, 38, 39, 34, 40, 41, 42,
43, 44, 45, 34, 34, 34, 46, 47, 52, 52,
52, 52, 55, 62, 56, 58, 59, 64, 63, 68,
106, 65, 107, 69, 66, 55, 70, 56, 79, 71,
73, 76, 72, 77, 74, 80, 83, 67, 81, 88,
75, 82, 86, 78, 84, 89, 90, 125, 103, 85,
96, 99, 87, 126, 91, 104, 92, 109, 93, 97,
98, 94, 105, 100, 110, 113, 119, 101, 52, 52,
114, 102, 127, 128, 132, 154, 144, 160, 156, 162,
129, 155, 120, 133, 165, 175, 171, 163, 161, 176,
134, 145, 146, 157, 378, 166, 172, 158, 113, 378,
186, 190, 191, 114, 197, 204, 61, 206, 198, 227,
228, 377, 376, 375, 374, 373, 187, 207, 372, 371,
205, 229, 48, 48, 48, 48, 50, 50, 50, 50,
111, 111, 370, 111, 112, 112, 112, 112, 115, 369,
115, 115, 368, 367, 366, 365, 364, 363, 362, 361,
360, 359, 358, 357, 356, 355, 354, 353, 352, 351,
350, 349, 348, 347, 346, 345, 344, 343, 342, 341,
340, 339, 338, 337, 336, 335, 334, 333, 332, 331,
330, 329, 328, 327, 326, 325, 324, 323, 322, 321,
320, 319, 318, 317, 316, 315, 314, 313, 312, 311,
310, 309, 308, 307, 306, 305, 304, 303, 302, 301,
300, 299, 298, 297, 296, 295, 294, 293, 292, 291,
290, 289, 288, 287, 286, 285, 284, 283, 282, 281,
280, 279, 278, 277, 276, 275, 274, 273, 272, 271,
270, 269, 268, 267, 266, 265, 264, 263, 262, 261,
260, 259, 258, 257, 256, 255, 254, 253, 252, 251,
250, 249, 248, 247, 246, 245, 244, 243, 242, 241,
240, 239, 238, 237, 236, 235, 234, 233, 232, 231,
230, 226, 225, 224, 223, 222, 221, 220, 219, 218,
217, 216, 215, 214, 213, 212, 211, 210, 209, 208,
203, 202, 201, 200, 199, 196, 195, 194, 193, 192,
189, 188, 185, 184, 183, 182, 181, 180, 179, 178,
117, 116, 177, 174, 173, 170, 169, 168, 167, 164,
159, 153, 152, 151, 150, 149, 148, 147, 143, 142,
141, 140, 139, 138, 137, 136, 135, 131, 130, 124,
123, 122, 121, 118, 117, 116, 108, 95, 60, 57,
54, 53, 378, 51, 51, 49, 49, 7, 378, 378,
378, 378, 378, 378, 378, 378, 378, 378, 378, 378,
378, 378, 378, 378, 378, 378, 378, 378, 378, 378,
378, 378, 378, 378, 378, 378, 378, 378, 378, 378,
378, 378, 378, 378, 378, 378, 378, 378, 378, 378,
378, 378, 378, 378, 378, 378
10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
30, 31, 32, 33, 34, 35, 36, 37, 37, 38,
37, 37, 39, 37, 40, 41, 42, 37, 43, 44,
45, 46, 47, 48, 37, 37, 37, 49, 50, 57,
57, 57, 57, 60, 67, 61, 63, 64, 69, 68,
73, 111, 70, 112, 74, 71, 60, 75, 61, 84,
76, 78, 81, 77, 82, 79, 85, 88, 72, 86,
93, 80, 87, 91, 83, 89, 94, 95, 132, 108,
90, 101, 104, 92, 133, 96, 109, 97, 114, 98,
102, 103, 99, 110, 105, 115, 118, 126, 106, 57,
57, 119, 107, 134, 135, 139, 161, 151, 167, 163,
169, 136, 162, 127, 140, 172, 182, 178, 170, 168,
183, 141, 152, 153, 164, 385, 173, 179, 165, 118,
385, 193, 197, 198, 119, 204, 211, 66, 213, 205,
234, 235, 384, 383, 382, 381, 380, 194, 214, 379,
378, 212, 236, 51, 51, 51, 51, 51, 53, 53,
53, 53, 53, 55, 55, 55, 55, 55, 116, 116,
116, 377, 116, 117, 117, 117, 117, 117, 120, 120,
376, 120, 120, 122, 375, 122, 122, 122, 374, 373,
372, 371, 370, 369, 368, 367, 366, 365, 364, 363,
362, 361, 360, 359, 358, 357, 356, 355, 354, 353,
352, 351, 350, 349, 348, 347, 346, 345, 344, 343,
342, 341, 340, 339, 338, 337, 336, 335, 334, 333,
332, 331, 330, 329, 328, 327, 326, 325, 324, 323,
322, 321, 320, 319, 318, 317, 316, 315, 314, 313,
312, 311, 310, 309, 308, 307, 306, 305, 304, 303,
302, 301, 300, 299, 298, 297, 296, 295, 294, 293,
292, 291, 290, 289, 288, 287, 286, 285, 284, 283,
282, 281, 280, 279, 278, 277, 276, 275, 274, 273,
272, 271, 270, 269, 268, 267, 266, 265, 264, 263,
262, 261, 260, 259, 258, 257, 256, 255, 254, 253,
252, 251, 250, 249, 248, 247, 246, 245, 244, 243,
242, 241, 240, 239, 238, 237, 233, 232, 231, 230,
229, 228, 227, 226, 225, 224, 223, 222, 221, 220,
219, 218, 217, 216, 215, 210, 209, 208, 207, 206,
203, 202, 201, 200, 199, 196, 195, 192, 191, 190,
189, 188, 187, 186, 185, 124, 123, 121, 184, 181,
180, 177, 176, 175, 174, 171, 166, 160, 159, 158,
157, 156, 155, 154, 150, 149, 148, 147, 146, 145,
144, 143, 142, 138, 137, 131, 130, 129, 128, 125,
124, 123, 121, 113, 100, 65, 62, 59, 58, 385,
56, 56, 54, 54, 52, 52, 9, 385, 385, 385,
385, 385, 385, 385, 385, 385, 385, 385, 385, 385,
385, 385, 385, 385, 385, 385, 385, 385, 385, 385,
385, 385, 385, 385, 385, 385, 385, 385, 385, 385,
385, 385, 385, 385, 385, 385, 385, 385, 385, 385,
385, 385, 385, 385, 385, 385
} ;
static yyconst flex_int16_t yy_chk[457] =
static yyconst flex_int16_t yy_chk[477] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 9, 9,
10, 10, 21, 28, 21, 24, 24, 29, 28, 30,
43, 29, 43, 30, 29, 56, 30, 56, 33, 30,
31, 32, 30, 32, 31, 33, 35, 29, 33, 37,
31, 33, 36, 32, 35, 37, 38, 69, 42, 35,
40, 41, 36, 69, 38, 42, 38, 45, 38, 40,
40, 38, 42, 41, 45, 49, 63, 41, 52, 52,
49, 41, 70, 70, 73, 95, 84, 98, 96, 99,
70, 95, 63, 73, 101, 109, 106, 99, 98, 109,
73, 84, 84, 96, 112, 101, 106, 96, 113, 112,
128, 131, 131, 113, 137, 145, 381, 146, 137, 170,
170, 376, 375, 374, 373, 372, 128, 146, 371, 369,
145, 170, 379, 379, 379, 379, 380, 380, 380, 380,
382, 382, 368, 382, 383, 383, 383, 383, 384, 367,
384, 384, 366, 365, 364, 363, 362, 361, 360, 358,
356, 353, 351, 350, 348, 346, 345, 344, 342, 340,
338, 337, 336, 335, 334, 332, 330, 329, 326, 325,
323, 322, 319, 318, 317, 314, 312, 311, 310, 309,
306, 305, 304, 302, 301, 299, 297, 295, 294, 292,
290, 288, 285, 284, 280, 279, 278, 277, 276, 275,
274, 272, 271, 270, 269, 268, 267, 266, 265, 264,
263, 261, 260, 259, 257, 252, 251, 250, 249, 248,
247, 246, 244, 243, 242, 241, 239, 237, 235, 234,
233, 232, 231, 230, 229, 228, 227, 225, 224, 223,
222, 221, 220, 219, 218, 217, 215, 214, 213, 210,
208, 206, 205, 204, 203, 201, 200, 198, 196, 195,
193, 192, 191, 190, 189, 188, 187, 186, 185, 184,
183, 180, 179, 178, 177, 176, 175, 174, 173, 172,
171, 169, 168, 167, 165, 162, 161, 160, 159, 158,
157, 156, 155, 154, 152, 151, 150, 149, 148, 147,
144, 143, 141, 140, 139, 136, 135, 134, 133, 132,
130, 129, 127, 126, 125, 124, 123, 122, 121, 120,
117, 116, 110, 108, 107, 105, 104, 103, 102, 100,
97, 94, 93, 92, 89, 88, 87, 86, 82, 81,
80, 79, 78, 77, 76, 75, 74, 72, 71, 68,
66, 65, 64, 62, 55, 51, 44, 39, 26, 22,
20, 19, 7, 6, 5, 4, 3, 378, 378, 378,
378, 378, 378, 378, 378, 378, 378, 378, 378, 378,
378, 378, 378, 378, 378, 378, 378, 378, 378, 378,
378, 378, 378, 378, 378, 378, 378, 378, 378, 378,
378, 378, 378, 378, 378, 378, 378, 378, 378, 378,
378, 378, 378, 378, 378, 378
1, 1, 1, 1, 1, 1, 1, 1, 1, 11,
11, 12, 12, 24, 31, 24, 27, 27, 32, 31,
33, 46, 32, 46, 33, 32, 61, 33, 61, 36,
33, 34, 35, 33, 35, 34, 36, 38, 32, 36,
40, 34, 36, 39, 35, 38, 40, 41, 74, 45,
38, 43, 44, 39, 74, 41, 45, 41, 48, 41,
43, 43, 41, 45, 44, 48, 52, 68, 44, 57,
57, 52, 44, 75, 75, 78, 100, 89, 103, 101,
104, 75, 100, 68, 78, 106, 114, 111, 104, 103,
114, 78, 89, 89, 101, 117, 106, 111, 101, 118,
117, 135, 138, 138, 118, 144, 152, 389, 153, 144,
177, 177, 383, 382, 381, 380, 379, 135, 153, 378,
376, 152, 177, 386, 386, 386, 386, 386, 387, 387,
387, 387, 387, 388, 388, 388, 388, 388, 390, 390,
390, 375, 390, 391, 391, 391, 391, 391, 392, 392,
374, 392, 392, 393, 373, 393, 393, 393, 372, 371,
370, 369, 368, 367, 365, 363, 360, 358, 357, 355,
353, 352, 351, 349, 347, 345, 344, 343, 342, 341,
339, 337, 336, 333, 332, 330, 329, 326, 325, 324,
321, 319, 318, 317, 316, 313, 312, 311, 309, 308,
306, 304, 302, 301, 299, 297, 295, 292, 291, 287,
286, 285, 284, 283, 282, 281, 279, 278, 277, 276,
275, 274, 273, 272, 271, 270, 268, 267, 266, 264,
259, 258, 257, 256, 255, 254, 253, 251, 250, 249,
248, 246, 244, 242, 241, 240, 239, 238, 237, 236,
235, 234, 232, 231, 230, 229, 228, 227, 226, 225,
224, 222, 221, 220, 217, 215, 213, 212, 211, 210,
208, 207, 205, 203, 202, 200, 199, 198, 197, 196,
195, 194, 193, 192, 191, 190, 187, 186, 185, 184,
183, 182, 181, 180, 179, 178, 176, 175, 174, 172,
169, 168, 167, 166, 165, 164, 163, 162, 161, 159,
158, 157, 156, 155, 154, 151, 150, 148, 147, 146,
143, 142, 141, 140, 139, 137, 136, 134, 133, 132,
131, 130, 129, 128, 127, 124, 123, 121, 115, 113,
112, 110, 109, 108, 107, 105, 102, 99, 98, 97,
94, 93, 92, 91, 87, 86, 85, 84, 83, 82,
81, 80, 79, 77, 76, 73, 71, 70, 69, 67,
60, 56, 54, 47, 42, 29, 25, 23, 22, 9,
8, 7, 6, 5, 4, 3, 385, 385, 385, 385,
385, 385, 385, 385, 385, 385, 385, 385, 385, 385,
385, 385, 385, 385, 385, 385, 385, 385, 385, 385,
385, 385, 385, 385, 385, 385, 385, 385, 385, 385,
385, 385, 385, 385, 385, 385, 385, 385, 385, 385,
385, 385, 385, 385, 385, 385
} ;
static yy_state_type yy_last_accepting_state;
......@@ -680,32 +689,16 @@ 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
1. Run ./make_flex.sh to generate lexer files.
4. Do
flex pars0lex.l
That generates lex.yy.c.
2. Run ./make_bison.sh to generate parser files.
5. Rename lex.yy.c to lexyy.c.
6. Add '#include "univ.i"' before #include <stdio.h> in lexyy.c
(Needed for AIX)
7. Add a type cast to int to the assignment below the comment
'need more input.' (Removes a warning on Win64)
These instructions seem to work at least with bison-1.28 and flex-2.5.4 on
These instructions seem to work at least with bison-1.875d and flex-2.5.31 on
Linux.
*******************************************************/
#define YY_NO_INPUT 1
#define YY_NO_UNISTD_H 1
#line 54 "pars0lex.l"
#line 38 "pars0lex.l"
#define YYSTYPE que_node_t*
#include "univ.i"
......@@ -752,11 +745,13 @@ string_append(
#line 754 "lex.yy.c"
#line 749 "_flex_tmp.c"
#define INITIAL 0
#define comment 1
#define quoted 2
#define id 3
#ifndef YY_NO_UNISTD_H
/* Special case for "unistd.h", since it is non-ANSI. We include it way
......@@ -903,10 +898,10 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
#line 104 "pars0lex.l"
#line 89 "pars0lex.l"
#line 908 "lex.yy.c"
#line 904 "_flex_tmp.c"
if ( (yy_init) )
{
......@@ -959,13 +954,13 @@ yy_match:
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 379 )
if ( yy_current_state >= 386 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
while ( yy_current_state != 378 );
while ( yy_current_state != 385 );
yy_cp = (yy_last_accepting_cpos);
yy_current_state = (yy_last_accepting_state);
......@@ -987,7 +982,7 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
#line 106 "pars0lex.l"
#line 91 "pars0lex.l"
{
yylval = sym_tab_add_int_lit(pars_sym_tab_global,
atoi(yytext));
......@@ -996,7 +991,7 @@ YY_RULE_SETUP
YY_BREAK
case 2:
YY_RULE_SETUP
#line 112 "pars0lex.l"
#line 97 "pars0lex.l"
{
ut_error; /* not implemented */
......@@ -1005,7 +1000,7 @@ YY_RULE_SETUP
YY_BREAK
case 3:
YY_RULE_SETUP
#line 118 "pars0lex.l"
#line 103 "pars0lex.l"
{
/* Quoted character string literals are handled in an explicit
start state 'quoted'. This state is entered and the buffer for
......@@ -1019,7 +1014,7 @@ In the state 'quoted', only two actions are possible (defined below). */
case 4:
/* rule 4 can match eol */
YY_RULE_SETUP
#line 127 "pars0lex.l"
#line 112 "pars0lex.l"
{
/* Got a sequence of characters other than "'":
append to string buffer */
......@@ -1028,7 +1023,7 @@ YY_RULE_SETUP
YY_BREAK
case 5:
YY_RULE_SETUP
#line 132 "pars0lex.l"
#line 117 "pars0lex.l"
{
/* Got a sequence of "'" characters:
append half of them to string buffer,
......@@ -1055,627 +1050,654 @@ YY_RULE_SETUP
YY_BREAK
case 6:
YY_RULE_SETUP
#line 156 "pars0lex.l"
#line 141 "pars0lex.l"
{
yylval = sym_tab_add_null_lit(pars_sym_tab_global);
/* Quoted identifiers are handled in an explicit start state 'id'.
This state is entered and the buffer for the scanned string is emptied
upon encountering a starting quote.
return(PARS_NULL_LIT);
In the state 'id', only two actions are possible (defined below). */
BEGIN(id);
stringbuf_len = 0;
}
YY_BREAK
case 7:
/* rule 7 can match eol */
YY_RULE_SETUP
#line 162 "pars0lex.l"
#line 150 "pars0lex.l"
{
/* Implicit cursor name */
yylval = sym_tab_add_str_lit(pars_sym_tab_global,
(byte*) yytext, yyleng);
return(PARS_SQL_TOKEN);
/* Got a sequence of characters other than '"':
append to string buffer */
string_append(yytext, yyleng);
}
YY_BREAK
case 8:
YY_RULE_SETUP
#line 169 "pars0lex.l"
#line 155 "pars0lex.l"
{
return(PARS_AND_TOKEN);
/* Got a sequence of '"' characters:
append half of them to string buffer,
as '""' represents a single '"'.
We apply truncating division,
so that '"""' will result in '"'. */
string_append(yytext, yyleng / 2);
/* If we got an odd number of quotes, then the
last quote we got is the terminating quote.
At the end of the string, we return to the
initial start state and report the scanned
identifier. */
if (yyleng % 2) {
BEGIN(INITIAL);
yylval = sym_tab_add_id(
pars_sym_tab_global,
(byte*) stringbuf, stringbuf_len);
return(PARS_ID_TOKEN);
}
}
YY_BREAK
case 9:
YY_RULE_SETUP
#line 173 "pars0lex.l"
#line 180 "pars0lex.l"
{
return(PARS_OR_TOKEN);
yylval = sym_tab_add_null_lit(pars_sym_tab_global);
return(PARS_NULL_LIT);
}
YY_BREAK
case 10:
YY_RULE_SETUP
#line 177 "pars0lex.l"
#line 186 "pars0lex.l"
{
return(PARS_NOT_TOKEN);
/* Implicit cursor name */
yylval = sym_tab_add_str_lit(pars_sym_tab_global,
(byte*) yytext, yyleng);
return(PARS_SQL_TOKEN);
}
YY_BREAK
case 11:
YY_RULE_SETUP
#line 181 "pars0lex.l"
#line 193 "pars0lex.l"
{
return(PARS_PROCEDURE_TOKEN);
return(PARS_AND_TOKEN);
}
YY_BREAK
case 12:
YY_RULE_SETUP
#line 185 "pars0lex.l"
#line 197 "pars0lex.l"
{
return(PARS_IN_TOKEN);
return(PARS_OR_TOKEN);
}
YY_BREAK
case 13:
YY_RULE_SETUP
#line 189 "pars0lex.l"
#line 201 "pars0lex.l"
{
return(PARS_OUT_TOKEN);
return(PARS_NOT_TOKEN);
}
YY_BREAK
case 14:
YY_RULE_SETUP
#line 193 "pars0lex.l"
#line 205 "pars0lex.l"
{
return(PARS_BINARY_TOKEN);
return(PARS_PROCEDURE_TOKEN);
}
YY_BREAK
case 15:
YY_RULE_SETUP
#line 197 "pars0lex.l"
#line 209 "pars0lex.l"
{
return(PARS_BLOB_TOKEN);
return(PARS_IN_TOKEN);
}
YY_BREAK
case 16:
YY_RULE_SETUP
#line 201 "pars0lex.l"
#line 213 "pars0lex.l"
{
return(PARS_INT_TOKEN);
return(PARS_OUT_TOKEN);
}
YY_BREAK
case 17:
YY_RULE_SETUP
#line 205 "pars0lex.l"
#line 217 "pars0lex.l"
{
return(PARS_INT_TOKEN);
return(PARS_BINARY_TOKEN);
}
YY_BREAK
case 18:
YY_RULE_SETUP
#line 209 "pars0lex.l"
#line 221 "pars0lex.l"
{
return(PARS_FLOAT_TOKEN);
return(PARS_BLOB_TOKEN);
}
YY_BREAK
case 19:
YY_RULE_SETUP
#line 213 "pars0lex.l"
#line 225 "pars0lex.l"
{
return(PARS_CHAR_TOKEN);
return(PARS_INT_TOKEN);
}
YY_BREAK
case 20:
YY_RULE_SETUP
#line 217 "pars0lex.l"
#line 229 "pars0lex.l"
{
return(PARS_IS_TOKEN);
return(PARS_INT_TOKEN);
}
YY_BREAK
case 21:
YY_RULE_SETUP
#line 221 "pars0lex.l"
#line 233 "pars0lex.l"
{
return(PARS_BEGIN_TOKEN);
return(PARS_FLOAT_TOKEN);
}
YY_BREAK
case 22:
YY_RULE_SETUP
#line 225 "pars0lex.l"
#line 237 "pars0lex.l"
{
return(PARS_END_TOKEN);
return(PARS_CHAR_TOKEN);
}
YY_BREAK
case 23:
YY_RULE_SETUP
#line 229 "pars0lex.l"
#line 241 "pars0lex.l"
{
return(PARS_IF_TOKEN);
return(PARS_IS_TOKEN);
}
YY_BREAK
case 24:
YY_RULE_SETUP
#line 233 "pars0lex.l"
#line 245 "pars0lex.l"
{
return(PARS_THEN_TOKEN);
return(PARS_BEGIN_TOKEN);
}
YY_BREAK
case 25:
YY_RULE_SETUP
#line 237 "pars0lex.l"
#line 249 "pars0lex.l"
{
return(PARS_ELSE_TOKEN);
return(PARS_END_TOKEN);
}
YY_BREAK
case 26:
YY_RULE_SETUP
#line 241 "pars0lex.l"
#line 253 "pars0lex.l"
{
return(PARS_ELSIF_TOKEN);
return(PARS_IF_TOKEN);
}
YY_BREAK
case 27:
YY_RULE_SETUP
#line 245 "pars0lex.l"
#line 257 "pars0lex.l"
{
return(PARS_LOOP_TOKEN);
return(PARS_THEN_TOKEN);
}
YY_BREAK
case 28:
YY_RULE_SETUP
#line 249 "pars0lex.l"
#line 261 "pars0lex.l"
{
return(PARS_WHILE_TOKEN);
return(PARS_ELSE_TOKEN);
}
YY_BREAK
case 29:
YY_RULE_SETUP
#line 253 "pars0lex.l"
#line 265 "pars0lex.l"
{
return(PARS_RETURN_TOKEN);
return(PARS_ELSIF_TOKEN);
}
YY_BREAK
case 30:
YY_RULE_SETUP
#line 257 "pars0lex.l"
#line 269 "pars0lex.l"
{
return(PARS_SELECT_TOKEN);
return(PARS_LOOP_TOKEN);
}
YY_BREAK
case 31:
YY_RULE_SETUP
#line 261 "pars0lex.l"
#line 273 "pars0lex.l"
{
return(PARS_SUM_TOKEN);
return(PARS_WHILE_TOKEN);
}
YY_BREAK
case 32:
YY_RULE_SETUP
#line 265 "pars0lex.l"
#line 277 "pars0lex.l"
{
return(PARS_COUNT_TOKEN);
return(PARS_RETURN_TOKEN);
}
YY_BREAK
case 33:
YY_RULE_SETUP
#line 269 "pars0lex.l"
#line 281 "pars0lex.l"
{
return(PARS_DISTINCT_TOKEN);
return(PARS_SELECT_TOKEN);
}
YY_BREAK
case 34:
YY_RULE_SETUP
#line 273 "pars0lex.l"
#line 285 "pars0lex.l"
{
return(PARS_FROM_TOKEN);
return(PARS_SUM_TOKEN);
}
YY_BREAK
case 35:
YY_RULE_SETUP
#line 277 "pars0lex.l"
#line 289 "pars0lex.l"
{
return(PARS_WHERE_TOKEN);
return(PARS_COUNT_TOKEN);
}
YY_BREAK
case 36:
YY_RULE_SETUP
#line 281 "pars0lex.l"
#line 293 "pars0lex.l"
{
return(PARS_FOR_TOKEN);
return(PARS_DISTINCT_TOKEN);
}
YY_BREAK
case 37:
YY_RULE_SETUP
#line 285 "pars0lex.l"
#line 297 "pars0lex.l"
{
return(PARS_CONSISTENT_TOKEN);
return(PARS_FROM_TOKEN);
}
YY_BREAK
case 38:
YY_RULE_SETUP
#line 289 "pars0lex.l"
#line 301 "pars0lex.l"
{
return(PARS_READ_TOKEN);
return(PARS_WHERE_TOKEN);
}
YY_BREAK
case 39:
YY_RULE_SETUP
#line 293 "pars0lex.l"
#line 305 "pars0lex.l"
{
return(PARS_ORDER_TOKEN);
return(PARS_FOR_TOKEN);
}
YY_BREAK
case 40:
YY_RULE_SETUP
#line 297 "pars0lex.l"
#line 309 "pars0lex.l"
{
return(PARS_BY_TOKEN);
return(PARS_CONSISTENT_TOKEN);
}
YY_BREAK
case 41:
YY_RULE_SETUP
#line 301 "pars0lex.l"
#line 313 "pars0lex.l"
{
return(PARS_ASC_TOKEN);
return(PARS_READ_TOKEN);
}
YY_BREAK
case 42:
YY_RULE_SETUP
#line 305 "pars0lex.l"
#line 317 "pars0lex.l"
{
return(PARS_DESC_TOKEN);
return(PARS_ORDER_TOKEN);
}
YY_BREAK
case 43:
YY_RULE_SETUP
#line 309 "pars0lex.l"
#line 321 "pars0lex.l"
{
return(PARS_INSERT_TOKEN);
return(PARS_BY_TOKEN);
}
YY_BREAK
case 44:
YY_RULE_SETUP
#line 313 "pars0lex.l"
#line 325 "pars0lex.l"
{
return(PARS_INTO_TOKEN);
return(PARS_ASC_TOKEN);
}
YY_BREAK
case 45:
YY_RULE_SETUP
#line 317 "pars0lex.l"
#line 329 "pars0lex.l"
{
return(PARS_VALUES_TOKEN);
return(PARS_DESC_TOKEN);
}
YY_BREAK
case 46:
YY_RULE_SETUP
#line 321 "pars0lex.l"
#line 333 "pars0lex.l"
{
return(PARS_UPDATE_TOKEN);
return(PARS_INSERT_TOKEN);
}
YY_BREAK
case 47:
YY_RULE_SETUP
#line 325 "pars0lex.l"
#line 337 "pars0lex.l"
{
return(PARS_SET_TOKEN);
return(PARS_INTO_TOKEN);
}
YY_BREAK
case 48:
YY_RULE_SETUP
#line 329 "pars0lex.l"
#line 341 "pars0lex.l"
{
return(PARS_DELETE_TOKEN);
return(PARS_VALUES_TOKEN);
}
YY_BREAK
case 49:
YY_RULE_SETUP
#line 333 "pars0lex.l"
#line 345 "pars0lex.l"
{
return(PARS_CURRENT_TOKEN);
return(PARS_UPDATE_TOKEN);
}
YY_BREAK
case 50:
YY_RULE_SETUP
#line 337 "pars0lex.l"
#line 349 "pars0lex.l"
{
return(PARS_OF_TOKEN);
return(PARS_SET_TOKEN);
}
YY_BREAK
case 51:
YY_RULE_SETUP
#line 341 "pars0lex.l"
#line 353 "pars0lex.l"
{
return(PARS_CREATE_TOKEN);
return(PARS_DELETE_TOKEN);
}
YY_BREAK
case 52:
YY_RULE_SETUP
#line 345 "pars0lex.l"
#line 357 "pars0lex.l"
{
return(PARS_TABLE_TOKEN);
return(PARS_CURRENT_TOKEN);
}
YY_BREAK
case 53:
YY_RULE_SETUP
#line 349 "pars0lex.l"
#line 361 "pars0lex.l"
{
return(PARS_INDEX_TOKEN);
return(PARS_OF_TOKEN);
}
YY_BREAK
case 54:
YY_RULE_SETUP
#line 353 "pars0lex.l"
#line 365 "pars0lex.l"
{
return(PARS_UNIQUE_TOKEN);
return(PARS_CREATE_TOKEN);
}
YY_BREAK
case 55:
YY_RULE_SETUP
#line 357 "pars0lex.l"
#line 369 "pars0lex.l"
{
return(PARS_CLUSTERED_TOKEN);
return(PARS_TABLE_TOKEN);
}
YY_BREAK
case 56:
YY_RULE_SETUP
#line 361 "pars0lex.l"
#line 373 "pars0lex.l"
{
return(PARS_DOES_NOT_FIT_IN_MEM_TOKEN);
return(PARS_INDEX_TOKEN);
}
YY_BREAK
case 57:
YY_RULE_SETUP
#line 365 "pars0lex.l"
#line 377 "pars0lex.l"
{
return(PARS_ON_TOKEN);
return(PARS_UNIQUE_TOKEN);
}
YY_BREAK
case 58:
YY_RULE_SETUP
#line 369 "pars0lex.l"
#line 381 "pars0lex.l"
{
return(PARS_DECLARE_TOKEN);
return(PARS_CLUSTERED_TOKEN);
}
YY_BREAK
case 59:
YY_RULE_SETUP
#line 373 "pars0lex.l"
#line 385 "pars0lex.l"
{
return(PARS_CURSOR_TOKEN);
return(PARS_DOES_NOT_FIT_IN_MEM_TOKEN);
}
YY_BREAK
case 60:
YY_RULE_SETUP
#line 377 "pars0lex.l"
#line 389 "pars0lex.l"
{
return(PARS_OPEN_TOKEN);
return(PARS_ON_TOKEN);
}
YY_BREAK
case 61:
YY_RULE_SETUP
#line 381 "pars0lex.l"
#line 393 "pars0lex.l"
{
return(PARS_FETCH_TOKEN);
return(PARS_DECLARE_TOKEN);
}
YY_BREAK
case 62:
YY_RULE_SETUP
#line 385 "pars0lex.l"
#line 397 "pars0lex.l"
{
return(PARS_CLOSE_TOKEN);
return(PARS_CURSOR_TOKEN);
}
YY_BREAK
case 63:
YY_RULE_SETUP
#line 389 "pars0lex.l"
#line 401 "pars0lex.l"
{
return(PARS_NOTFOUND_TOKEN);
return(PARS_OPEN_TOKEN);
}
YY_BREAK
case 64:
YY_RULE_SETUP
#line 393 "pars0lex.l"
#line 405 "pars0lex.l"
{
return(PARS_TO_CHAR_TOKEN);
return(PARS_FETCH_TOKEN);
}
YY_BREAK
case 65:
YY_RULE_SETUP
#line 397 "pars0lex.l"
#line 409 "pars0lex.l"
{
return(PARS_TO_NUMBER_TOKEN);
return(PARS_CLOSE_TOKEN);
}
YY_BREAK
case 66:
YY_RULE_SETUP
#line 401 "pars0lex.l"
#line 413 "pars0lex.l"
{
return(PARS_TO_BINARY_TOKEN);
return(PARS_NOTFOUND_TOKEN);
}
YY_BREAK
case 67:
YY_RULE_SETUP
#line 405 "pars0lex.l"
#line 417 "pars0lex.l"
{
return(PARS_BINARY_TO_NUMBER_TOKEN);
return(PARS_TO_CHAR_TOKEN);
}
YY_BREAK
case 68:
YY_RULE_SETUP
#line 409 "pars0lex.l"
#line 421 "pars0lex.l"
{
return(PARS_SUBSTR_TOKEN);
return(PARS_TO_NUMBER_TOKEN);
}
YY_BREAK
case 69:
YY_RULE_SETUP
#line 413 "pars0lex.l"
#line 425 "pars0lex.l"
{
return(PARS_REPLSTR_TOKEN);
return(PARS_TO_BINARY_TOKEN);
}
YY_BREAK
case 70:
YY_RULE_SETUP
#line 417 "pars0lex.l"
#line 429 "pars0lex.l"
{
return(PARS_CONCAT_TOKEN);
return(PARS_BINARY_TO_NUMBER_TOKEN);
}
YY_BREAK
case 71:
YY_RULE_SETUP
#line 421 "pars0lex.l"
#line 433 "pars0lex.l"
{
return(PARS_INSTR_TOKEN);
return(PARS_SUBSTR_TOKEN);
}
YY_BREAK
case 72:
YY_RULE_SETUP
#line 425 "pars0lex.l"
#line 437 "pars0lex.l"
{
return(PARS_LENGTH_TOKEN);
return(PARS_REPLSTR_TOKEN);
}
YY_BREAK
case 73:
YY_RULE_SETUP
#line 429 "pars0lex.l"
#line 441 "pars0lex.l"
{
return(PARS_SYSDATE_TOKEN);
return(PARS_CONCAT_TOKEN);
}
YY_BREAK
case 74:
YY_RULE_SETUP
#line 433 "pars0lex.l"
#line 445 "pars0lex.l"
{
return(PARS_PRINTF_TOKEN);
return(PARS_INSTR_TOKEN);
}
YY_BREAK
case 75:
YY_RULE_SETUP
#line 437 "pars0lex.l"
#line 449 "pars0lex.l"
{
return(PARS_ASSERT_TOKEN);
return(PARS_LENGTH_TOKEN);
}
YY_BREAK
case 76:
YY_RULE_SETUP
#line 441 "pars0lex.l"
#line 453 "pars0lex.l"
{
return(PARS_RND_TOKEN);
return(PARS_SYSDATE_TOKEN);
}
YY_BREAK
case 77:
YY_RULE_SETUP
#line 445 "pars0lex.l"
#line 457 "pars0lex.l"
{
return(PARS_RND_STR_TOKEN);
return(PARS_PRINTF_TOKEN);
}
YY_BREAK
case 78:
YY_RULE_SETUP
#line 449 "pars0lex.l"
#line 461 "pars0lex.l"
{
return(PARS_ROW_PRINTF_TOKEN);
return(PARS_ASSERT_TOKEN);
}
YY_BREAK
case 79:
YY_RULE_SETUP
#line 453 "pars0lex.l"
#line 465 "pars0lex.l"
{
return(PARS_COMMIT_TOKEN);
return(PARS_RND_TOKEN);
}
YY_BREAK
case 80:
YY_RULE_SETUP
#line 457 "pars0lex.l"
#line 469 "pars0lex.l"
{
return(PARS_ROLLBACK_TOKEN);
return(PARS_RND_STR_TOKEN);
}
YY_BREAK
case 81:
YY_RULE_SETUP
#line 461 "pars0lex.l"
#line 473 "pars0lex.l"
{
return(PARS_WORK_TOKEN);
return(PARS_ROW_PRINTF_TOKEN);
}
YY_BREAK
case 82:
YY_RULE_SETUP
#line 465 "pars0lex.l"
#line 477 "pars0lex.l"
{
return(PARS_UNSIGNED_TOKEN);
return(PARS_COMMIT_TOKEN);
}
YY_BREAK
case 83:
YY_RULE_SETUP
#line 469 "pars0lex.l"
#line 481 "pars0lex.l"
{
return(PARS_EXIT_TOKEN);
return(PARS_ROLLBACK_TOKEN);
}
YY_BREAK
case 84:
YY_RULE_SETUP
#line 473 "pars0lex.l"
#line 485 "pars0lex.l"
{
yylval = sym_tab_add_id(pars_sym_tab_global,
(byte*)yytext,
ut_strlen(yytext));
return(PARS_ID_TOKEN);
return(PARS_WORK_TOKEN);
}
YY_BREAK
case 85:
YY_RULE_SETUP
#line 480 "pars0lex.l"
#line 489 "pars0lex.l"
{
return(PARS_DDOT_TOKEN);
return(PARS_UNSIGNED_TOKEN);
}
YY_BREAK
case 86:
YY_RULE_SETUP
#line 484 "pars0lex.l"
#line 493 "pars0lex.l"
{
return(PARS_ASSIGN_TOKEN);
return(PARS_EXIT_TOKEN);
}
YY_BREAK
case 87:
YY_RULE_SETUP
#line 488 "pars0lex.l"
#line 497 "pars0lex.l"
{
return(PARS_LE_TOKEN);
yylval = sym_tab_add_id(pars_sym_tab_global,
(byte*)yytext,
ut_strlen(yytext));
return(PARS_ID_TOKEN);
}
YY_BREAK
case 88:
YY_RULE_SETUP
#line 492 "pars0lex.l"
#line 504 "pars0lex.l"
{
return(PARS_GE_TOKEN);
return(PARS_DDOT_TOKEN);
}
YY_BREAK
case 89:
YY_RULE_SETUP
#line 496 "pars0lex.l"
#line 508 "pars0lex.l"
{
return(PARS_NE_TOKEN);
return(PARS_ASSIGN_TOKEN);
}
YY_BREAK
case 90:
YY_RULE_SETUP
#line 500 "pars0lex.l"
#line 512 "pars0lex.l"
{
return((int)(*yytext));
return(PARS_LE_TOKEN);
}
YY_BREAK
case 91:
YY_RULE_SETUP
#line 505 "pars0lex.l"
#line 516 "pars0lex.l"
{
return((int)(*yytext));
return(PARS_GE_TOKEN);
}
YY_BREAK
case 92:
YY_RULE_SETUP
#line 510 "pars0lex.l"
#line 520 "pars0lex.l"
{
return((int)(*yytext));
return(PARS_NE_TOKEN);
}
YY_BREAK
case 93:
YY_RULE_SETUP
#line 515 "pars0lex.l"
#line 524 "pars0lex.l"
{
return((int)(*yytext));
......@@ -1683,7 +1705,7 @@ YY_RULE_SETUP
YY_BREAK
case 94:
YY_RULE_SETUP
#line 520 "pars0lex.l"
#line 529 "pars0lex.l"
{
return((int)(*yytext));
......@@ -1691,7 +1713,7 @@ YY_RULE_SETUP
YY_BREAK
case 95:
YY_RULE_SETUP
#line 525 "pars0lex.l"
#line 534 "pars0lex.l"
{
return((int)(*yytext));
......@@ -1699,7 +1721,7 @@ YY_RULE_SETUP
YY_BREAK
case 96:
YY_RULE_SETUP
#line 530 "pars0lex.l"
#line 539 "pars0lex.l"
{
return((int)(*yytext));
......@@ -1707,7 +1729,7 @@ YY_RULE_SETUP
YY_BREAK
case 97:
YY_RULE_SETUP
#line 535 "pars0lex.l"
#line 544 "pars0lex.l"
{
return((int)(*yytext));
......@@ -1715,7 +1737,7 @@ YY_RULE_SETUP
YY_BREAK
case 98:
YY_RULE_SETUP
#line 540 "pars0lex.l"
#line 549 "pars0lex.l"
{
return((int)(*yytext));
......@@ -1723,7 +1745,7 @@ YY_RULE_SETUP
YY_BREAK
case 99:
YY_RULE_SETUP
#line 545 "pars0lex.l"
#line 554 "pars0lex.l"
{
return((int)(*yytext));
......@@ -1731,7 +1753,7 @@ YY_RULE_SETUP
YY_BREAK
case 100:
YY_RULE_SETUP
#line 550 "pars0lex.l"
#line 559 "pars0lex.l"
{
return((int)(*yytext));
......@@ -1739,7 +1761,7 @@ YY_RULE_SETUP
YY_BREAK
case 101:
YY_RULE_SETUP
#line 555 "pars0lex.l"
#line 564 "pars0lex.l"
{
return((int)(*yytext));
......@@ -1747,7 +1769,7 @@ YY_RULE_SETUP
YY_BREAK
case 102:
YY_RULE_SETUP
#line 560 "pars0lex.l"
#line 569 "pars0lex.l"
{
return((int)(*yytext));
......@@ -1755,7 +1777,7 @@ YY_RULE_SETUP
YY_BREAK
case 103:
YY_RULE_SETUP
#line 565 "pars0lex.l"
#line 574 "pars0lex.l"
{
return((int)(*yytext));
......@@ -1763,7 +1785,7 @@ YY_RULE_SETUP
YY_BREAK
case 104:
YY_RULE_SETUP
#line 570 "pars0lex.l"
#line 579 "pars0lex.l"
{
return((int)(*yytext));
......@@ -1771,35 +1793,59 @@ YY_RULE_SETUP
YY_BREAK
case 105:
YY_RULE_SETUP
#line 575 "pars0lex.l"
BEGIN(comment); /* eat up comment */
#line 584 "pars0lex.l"
{
return((int)(*yytext));
}
YY_BREAK
case 106:
/* rule 106 can match eol */
YY_RULE_SETUP
#line 577 "pars0lex.l"
#line 589 "pars0lex.l"
{
return((int)(*yytext));
}
YY_BREAK
case 107:
/* rule 107 can match eol */
YY_RULE_SETUP
#line 578 "pars0lex.l"
#line 594 "pars0lex.l"
{
return((int)(*yytext));
}
YY_BREAK
case 108:
YY_RULE_SETUP
#line 579 "pars0lex.l"
BEGIN(INITIAL);
#line 599 "pars0lex.l"
BEGIN(comment); /* eat up comment */
YY_BREAK
case 109:
/* rule 109 can match eol */
YY_RULE_SETUP
#line 581 "pars0lex.l"
/* eat up whitespace */
#line 601 "pars0lex.l"
YY_BREAK
case 110:
/* rule 110 can match eol */
YY_RULE_SETUP
#line 584 "pars0lex.l"
#line 602 "pars0lex.l"
YY_BREAK
case 111:
YY_RULE_SETUP
#line 603 "pars0lex.l"
BEGIN(INITIAL);
YY_BREAK
case 112:
/* rule 112 can match eol */
YY_RULE_SETUP
#line 605 "pars0lex.l"
/* eat up whitespace */
YY_BREAK
case 113:
YY_RULE_SETUP
#line 608 "pars0lex.l"
{
fprintf(stderr,"Unrecognized character: %02x\n",
*yytext);
......@@ -1809,15 +1855,16 @@ YY_RULE_SETUP
return(0);
}
YY_BREAK
case 111:
case 114:
YY_RULE_SETUP
#line 593 "pars0lex.l"
#line 617 "pars0lex.l"
YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK
#line 1816 "lex.yy.c"
#line 1863 "_flex_tmp.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(comment):
case YY_STATE_EOF(quoted):
case YY_STATE_EOF(id):
yyterminate();
case YY_END_OF_BUFFER:
......@@ -2101,7 +2148,7 @@ static int yy_get_next_buffer (void)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 379 )
if ( yy_current_state >= 386 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
......@@ -2129,11 +2176,11 @@ static int yy_get_next_buffer (void)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 379 )
if ( yy_current_state >= 386 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 378);
yy_is_jam = (yy_current_state == 385);
return yy_is_jam ? 0 : yy_current_state;
}
......@@ -2656,7 +2703,7 @@ void yyfree (void * ptr )
#undef YY_DECL_IS_OURS
#undef YY_DECL
#endif
#line 593 "pars0lex.l"
#line 617 "pars0lex.l"
......@@ -85,6 +85,7 @@ DIGIT [0-9]
ID [a-z_A-Z][a-z_A-Z0-9]*
%x comment
%x quoted
%x id
%%
{DIGIT}+ {
......@@ -137,6 +138,45 @@ In the state 'quoted', only two actions are possible (defined below). */
}
}
\" {
/* Quoted identifiers are handled in an explicit start state 'id'.
This state is entered and the buffer for the scanned string is emptied
upon encountering a starting quote.
In the state 'id', only two actions are possible (defined below). */
BEGIN(id);
stringbuf_len = 0;
}
<id>[^\"]+ {
/* Got a sequence of characters other than '"':
append to string buffer */
string_append(yytext, yyleng);
}
<id>\"+ {
/* Got a sequence of '"' characters:
append half of them to string buffer,
as '""' represents a single '"'.
We apply truncating division,
so that '"""' will result in '"'. */
string_append(yytext, yyleng / 2);
/* If we got an odd number of quotes, then the
last quote we got is the terminating quote.
At the end of the string, we return to the
initial start state and report the scanned
identifier. */
if (yyleng % 2) {
BEGIN(INITIAL);
yylval = sym_tab_add_id(
pars_sym_tab_global,
(byte*) stringbuf, stringbuf_len);
return(PARS_ID_TOKEN);
}
}
"NULL" {
yylval = sym_tab_add_null_lit(pars_sym_tab_global);
......
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