Commit e8b80a5a authored by osku's avatar osku

Add support for bound ids in InnoDB's SQL parser.

parent d35c4375
...@@ -531,6 +531,16 @@ pars_info_add_function( ...@@ -531,6 +531,16 @@ pars_info_add_function(
pars_user_func_cb_t func, /* in: function address */ pars_user_func_cb_t func, /* in: function address */
void* arg); /* in: user-supplied argument */ void* arg); /* in: user-supplied argument */
/********************************************************************
Add bound id. */
void
pars_info_add_id(
/*=============*/
pars_info_t* info, /* in: info struct */
const char* name, /* in: name */
const char* id); /* in: id */
/******************************************************************** /********************************************************************
Get user function with the given name.*/ Get user function with the given name.*/
...@@ -553,6 +563,17 @@ pars_info_get_bound_lit( ...@@ -553,6 +563,17 @@ pars_info_get_bound_lit(
pars_info_t* info, /* in: info struct */ pars_info_t* info, /* in: info struct */
const char* name); /* in: bound literal name to find */ const char* name); /* in: bound literal name to find */
/********************************************************************
Get bound id with the given name.*/
pars_bound_id_t*
pars_info_get_bound_id(
/*===================*/
/* out: bound id, or NULL if not
found */
pars_info_t* info, /* in: info struct */
const char* name); /* in: bound id name to find */
/* Extra information supplied for pars_sql(). */ /* Extra information supplied for pars_sql(). */
struct pars_info_struct { struct pars_info_struct {
...@@ -562,6 +583,8 @@ struct pars_info_struct { ...@@ -562,6 +583,8 @@ struct pars_info_struct {
(pars_user_func_t*) */ (pars_user_func_t*) */
ib_vector_t* bound_lits; /* bound literals, or NULL ib_vector_t* bound_lits; /* bound literals, or NULL
(pars_bound_lit_t*) */ (pars_bound_lit_t*) */
ib_vector_t* bound_ids; /* bound ids, or NULL
(pars_bound_id_t*) */
ibool graph_owns_us; /* if TRUE (which is the default), ibool graph_owns_us; /* if TRUE (which is the default),
que_graph_free() will free us */ que_graph_free() will free us */
...@@ -583,6 +606,12 @@ struct pars_bound_lit_struct { ...@@ -583,6 +606,12 @@ struct pars_bound_lit_struct {
ulint prtype; /* precise type, e.g. DATA_UNSIGNED */ ulint prtype; /* precise type, e.g. DATA_UNSIGNED */
}; };
/* Bound id. */
struct pars_bound_id_struct {
const char* name; /* name */
const char* id; /* id */
};
/* Struct used to denote a reserved word in a parsing tree */ /* Struct used to denote a reserved word in a parsing tree */
struct pars_res_word_struct{ struct pars_res_word_struct{
int code; /* the token code for the reserved word from int code; /* the token code for the reserved word from
......
...@@ -82,6 +82,16 @@ sym_tab_add_id( ...@@ -82,6 +82,16 @@ sym_tab_add_id(
byte* name, /* in: identifier name */ byte* name, /* in: identifier name */
ulint len); /* in: identifier length */ ulint len); /* in: identifier length */
/**********************************************************************
Add a bound identifier to a symbol table. */
sym_node_t*
sym_tab_add_bound_id(
/*===========*/
/* out: symbol table node */
sym_tab_t* sym_tab, /* in: symbol table */
const char* name); /* in: name of bound id */
#define SYM_CLUST_FIELD_NO 0 #define SYM_CLUST_FIELD_NO 0
#define SYM_SEC_FIELD_NO 1 #define SYM_SEC_FIELD_NO 1
......
...@@ -12,6 +12,7 @@ Created 1/11/1998 Heikki Tuuri ...@@ -12,6 +12,7 @@ Created 1/11/1998 Heikki Tuuri
typedef struct pars_info_struct pars_info_t; typedef struct pars_info_struct pars_info_t;
typedef struct pars_user_func_struct pars_user_func_t; typedef struct pars_user_func_struct pars_user_func_t;
typedef struct pars_bound_lit_struct pars_bound_lit_t; typedef struct pars_bound_lit_struct pars_bound_lit_t;
typedef struct pars_bound_id_struct pars_bound_id_t;
typedef struct sym_node_struct sym_node_t; typedef struct sym_node_struct sym_node_t;
typedef struct sym_tab_struct sym_tab_t; typedef struct sym_tab_struct sym_tab_t;
typedef struct pars_res_word_struct pars_res_word_t; typedef struct pars_res_word_struct pars_res_word_t;
......
...@@ -356,8 +356,8 @@ static void yy_fatal_error (yyconst char msg[] ); ...@@ -356,8 +356,8 @@ static void yy_fatal_error (yyconst char msg[] );
*yy_cp = '\0'; \ *yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp; (yy_c_buf_p) = yy_cp;
#define YY_NUM_RULES 116 #define YY_NUM_RULES 117
#define YY_END_OF_BUFFER 117 #define YY_END_OF_BUFFER 118
/* This struct is not used in this scanner, /* This struct is not used in this scanner,
but its presence is necessary. */ but its presence is necessary. */
struct yy_trans_info struct yy_trans_info
...@@ -365,51 +365,51 @@ struct yy_trans_info ...@@ -365,51 +365,51 @@ struct yy_trans_info
flex_int32_t yy_verify; flex_int32_t yy_verify;
flex_int32_t yy_nxt; flex_int32_t yy_nxt;
}; };
static yyconst flex_int16_t yy_accept[394] = static yyconst flex_int16_t yy_accept[396] =
{ 0, { 0,
0, 0, 111, 111, 0, 0, 0, 0, 117, 115, 0, 0, 112, 112, 0, 0, 0, 0, 118, 116,
114, 114, 7, 106, 4, 95, 101, 104, 102, 99, 115, 115, 8, 116, 107, 5, 96, 102, 105, 103,
103, 115, 105, 1, 115, 100, 98, 96, 97, 109, 100, 104, 116, 106, 1, 116, 101, 99, 97, 98,
89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 110, 90, 90, 90, 90, 90, 90, 90, 90, 90,
89, 89, 89, 89, 89, 89, 89, 89, 107, 108, 90, 90, 90, 90, 90, 90, 90, 90, 90, 108,
111, 112, 5, 6, 8, 9, 114, 90, 110, 2, 109, 112, 113, 6, 7, 9, 10, 115, 4, 91,
1, 3, 91, 92, 94, 93, 89, 89, 89, 89, 111, 2, 1, 3, 92, 93, 95, 94, 90, 90,
89, 89, 44, 89, 89, 89, 89, 89, 89, 89, 90, 90, 90, 90, 45, 90, 90, 90, 90, 90,
89, 89, 89, 89, 89, 89, 89, 89, 89, 27, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
16, 24, 89, 89, 89, 89, 54, 61, 89, 13, 90, 28, 17, 25, 90, 90, 90, 90, 55, 62,
89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 90, 14, 90, 90, 90, 90, 90, 90, 90, 90,
89, 89, 89, 89, 89, 89, 89, 111, 112, 112, 90, 90, 90, 90, 90, 90, 90, 90, 90, 112,
113, 5, 6, 8, 9, 2, 12, 45, 89, 89, 113, 113, 114, 6, 7, 9, 10, 2, 13, 46,
89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
89, 89, 89, 89, 89, 89, 26, 89, 89, 89, 90, 90, 90, 90, 90, 90, 90, 90, 27, 90,
40, 89, 89, 89, 89, 20, 89, 89, 14, 89, 90, 90, 41, 90, 90, 90, 90, 21, 90, 90,
89, 89, 17, 89, 89, 89, 89, 89, 80, 89, 15, 90, 90, 90, 18, 90, 90, 90, 90, 90,
89, 89, 51, 11, 89, 35, 89, 89, 89, 89, 81, 90, 90, 90, 52, 12, 90, 36, 90, 90,
89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
19, 23, 89, 89, 89, 89, 89, 89, 89, 89, 90, 90, 20, 24, 90, 90, 90, 90, 90, 90,
89, 89, 89, 46, 89, 89, 29, 89, 87, 89, 90, 90, 90, 90, 90, 47, 90, 90, 30, 90,
89, 38, 89, 89, 89, 89, 89, 48, 89, 31, 88, 90, 90, 39, 90, 90, 90, 90, 90, 49,
89, 10, 64, 89, 89, 89, 42, 89, 89, 89, 90, 32, 90, 11, 65, 90, 90, 90, 43, 90,
89, 89, 89, 89, 89, 89, 28, 89, 89, 89, 90, 90, 90, 90, 90, 90, 90, 90, 29, 90,
89, 89, 89, 89, 89, 89, 85, 89, 25, 89, 90, 90, 90, 90, 90, 90, 90, 90, 86, 90,
66, 89, 89, 89, 89, 36, 89, 89, 89, 89, 26, 90, 67, 90, 90, 90, 90, 37, 90, 90,
89, 89, 89, 30, 65, 22, 89, 57, 89, 75, 90, 90, 90, 90, 90, 31, 66, 23, 90, 58,
89, 89, 89, 43, 89, 89, 89, 89, 89, 89, 90, 76, 90, 90, 90, 44, 90, 90, 90, 90,
89, 89, 89, 89, 56, 89, 89, 89, 89, 89, 90, 90, 90, 90, 90, 90, 57, 90, 90, 90,
89, 89, 39, 32, 79, 18, 89, 83, 74, 89, 90, 90, 90, 90, 40, 33, 80, 19, 90, 84,
55, 89, 63, 89, 52, 89, 89, 89, 47, 89, 75, 90, 56, 90, 64, 90, 53, 90, 90, 90,
76, 89, 78, 89, 89, 33, 89, 89, 89, 34, 48, 90, 77, 90, 79, 90, 90, 34, 90, 90,
72, 89, 89, 89, 89, 58, 89, 50, 49, 89, 90, 35, 73, 90, 90, 90, 90, 59, 90, 51,
89, 89, 53, 62, 89, 89, 89, 21, 89, 89, 50, 90, 90, 90, 54, 63, 90, 90, 90, 22,
73, 81, 89, 89, 77, 89, 68, 89, 89, 89, 90, 90, 74, 82, 90, 90, 78, 90, 69, 90,
89, 89, 37, 89, 88, 67, 89, 84, 89, 89, 90, 90, 90, 90, 38, 90, 89, 68, 90, 85,
89, 86, 89, 59, 89, 89, 15, 89, 70, 69, 90, 90, 90, 87, 90, 60, 90, 90, 16, 90,
89, 41, 89, 82, 89, 89, 89, 89, 89, 89, 71, 70, 90, 42, 90, 83, 90, 90, 90, 90,
89, 89, 89, 89, 71, 89, 89, 89, 89, 89, 90, 90, 90, 90, 90, 90, 72, 90, 90, 90,
89, 60, 0 90, 90, 90, 61, 0
} ; } ;
...@@ -418,17 +418,17 @@ static yyconst flex_int32_t yy_ec[256] = ...@@ -418,17 +418,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, 2, 3,
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, 2, 1, 4, 1, 1, 5, 1, 6, 7, 1, 2, 1, 4, 1, 5, 6, 1, 7, 8,
8, 9, 10, 11, 12, 13, 14, 15, 15, 15, 9, 10, 11, 12, 13, 14, 15, 16, 16, 16,
15, 15, 15, 15, 15, 15, 15, 16, 17, 18, 16, 16, 16, 16, 16, 16, 16, 17, 18, 19,
19, 20, 21, 1, 22, 23, 24, 25, 26, 27, 20, 21, 22, 1, 23, 24, 25, 26, 27, 28,
28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
38, 39, 40, 41, 42, 43, 44, 45, 46, 31, 39, 40, 41, 42, 43, 44, 45, 46, 47, 32,
1, 1, 1, 1, 47, 1, 31, 31, 31, 31, 1, 1, 1, 1, 48, 1, 32, 32, 32, 32,
31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
31, 31, 48, 1, 49, 1, 1, 1, 1, 1, 32, 32, 49, 1, 50, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
...@@ -445,228 +445,228 @@ static yyconst flex_int32_t yy_ec[256] = ...@@ -445,228 +445,228 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1 1, 1, 1, 1, 1
} ; } ;
static yyconst flex_int32_t yy_meta[50] = static yyconst flex_int32_t yy_meta[51] =
{ 0, { 0,
1, 1, 1, 2, 1, 3, 1, 1, 4, 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 4,
1, 1, 1, 1, 5, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 6,
1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 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, 5, 5,
5, 5, 5, 5, 5, 5, 5, 1, 1 5, 5, 5, 5, 5, 5, 5, 5, 1, 1
} ; } ;
static yyconst flex_int16_t yy_base[403] = static yyconst flex_int16_t yy_base[406] =
{ 0, { 0,
0, 0, 434, 433, 435, 434, 435, 434, 437, 444, 0, 0, 435, 434, 436, 435, 437, 436, 439, 446,
48, 50, 444, 444, 444, 444, 444, 444, 444, 444, 49, 51, 446, 0, 446, 446, 446, 446, 446, 446,
444, 423, 426, 41, 415, 444, 38, 444, 414, 444, 446, 446, 424, 427, 41, 416, 446, 38, 446, 415,
20, 33, 32, 46, 40, 44, 0, 54, 52, 48, 446, 20, 33, 32, 46, 40, 44, 0, 54, 52,
60, 393, 65, 66, 74, 27, 409, 69, 444, 444, 48, 60, 394, 65, 66, 74, 27, 410, 69, 446,
0, 97, 0, 424, 0, 425, 111, 444, 444, 413, 446, 0, 97, 0, 425, 0, 427, 112, 0, 446,
54, 408, 444, 444, 444, 444, 0, 401, 69, 397, 446, 414, 54, 409, 446, 446, 446, 446, 0, 402,
389, 387, 0, 400, 79, 82, 395, 381, 94, 379, 69, 398, 390, 388, 0, 401, 79, 82, 396, 382,
392, 377, 391, 385, 373, 377, 373, 375, 375, 0, 94, 380, 393, 378, 392, 386, 374, 378, 374, 376,
82, 0, 374, 372, 366, 373, 0, 0, 379, 379, 376, 0, 82, 0, 375, 373, 367, 374, 0, 0,
362, 89, 98, 377, 93, 95, 368, 106, 360, 376, 380, 380, 363, 89, 98, 378, 93, 95, 369, 106,
372, 350, 101, 371, 362, 112, 355, 0, 134, 135, 361, 377, 373, 351, 101, 372, 363, 112, 356, 0,
444, 0, 387, 0, 388, 376, 0, 0, 364, 359, 134, 135, 446, 0, 388, 0, 390, 377, 0, 0,
366, 364, 347, 345, 344, 349, 106, 347, 359, 93, 365, 360, 367, 365, 348, 346, 345, 350, 106, 348,
347, 353, 354, 336, 336, 121, 0, 334, 350, 351, 360, 93, 348, 354, 355, 337, 337, 121, 0, 335,
0, 338, 347, 344, 119, 126, 341, 331, 340, 333, 351, 352, 0, 339, 348, 345, 119, 126, 342, 332,
330, 338, 0, 328, 338, 336, 327, 317, 311, 324, 341, 334, 331, 339, 0, 329, 339, 337, 328, 318,
309, 329, 0, 0, 314, 0, 328, 319, 316, 130, 312, 325, 310, 330, 0, 0, 315, 0, 329, 320,
312, 319, 326, 305, 307, 312, 312, 304, 307, 302, 317, 130, 313, 320, 327, 306, 308, 313, 313, 305,
0, 0, 314, 298, 308, 315, 306, 294, 293, 307, 308, 303, 0, 0, 315, 299, 309, 316, 307, 295,
296, 309, 289, 0, 299, 281, 0, 300, 0, 297, 294, 308, 297, 310, 290, 0, 300, 282, 0, 301,
284, 0, 283, 278, 283, 282, 292, 0, 278, 0, 0, 298, 285, 0, 284, 279, 284, 283, 293, 0,
282, 0, 0, 278, 275, 289, 0, 274, 274, 272, 279, 0, 283, 0, 0, 279, 276, 290, 0, 275,
288, 273, 285, 267, 285, 280, 0, 275, 275, 261, 275, 273, 289, 274, 286, 268, 286, 281, 0, 276,
260, 273, 259, 273, 272, 271, 0, 255, 0, 249, 276, 262, 261, 274, 260, 274, 273, 272, 0, 256,
0, 268, 252, 251, 251, 0, 264, 254, 249, 248, 0, 250, 0, 269, 253, 252, 252, 0, 265, 255,
260, 250, 249, 0, 0, 0, 253, 0, 241, 0, 250, 249, 261, 251, 250, 0, 0, 0, 254, 0,
255, 251, 237, 0, 251, 252, 235, 240, 233, 251, 242, 0, 256, 252, 238, 0, 252, 253, 236, 241,
233, 230, 231, 228, 0, 233, 245, 232, 239, 229, 234, 252, 234, 231, 232, 229, 0, 234, 246, 233,
237, 222, 0, 0, 0, 214, 221, 0, 0, 218, 240, 230, 238, 223, 0, 0, 0, 215, 222, 0,
0, 217, 0, 231, 0, 232, 219, 218, 0, 214, 0, 219, 0, 218, 0, 232, 0, 233, 220, 219,
0, 217, 0, 209, 211, 0, 210, 224, 217, 0, 0, 215, 0, 218, 0, 210, 212, 0, 211, 225,
0, 220, 223, 205, 220, 0, 216, 0, 0, 200, 218, 0, 0, 221, 224, 206, 221, 0, 217, 0,
214, 213, 0, 0, 197, 196, 201, 0, 210, 195, 0, 201, 215, 214, 0, 0, 198, 197, 202, 0,
0, 0, 201, 197, 0, 192, 0, 204, 204, 192, 211, 196, 0, 0, 202, 198, 0, 193, 0, 205,
202, 191, 0, 178, 0, 0, 198, 0, 182, 176, 205, 193, 203, 192, 0, 179, 0, 0, 199, 0,
182, 0, 173, 0, 178, 191, 0, 190, 0, 0, 183, 177, 183, 0, 174, 0, 179, 192, 0, 191,
181, 0, 185, 0, 172, 172, 178, 164, 187, 175, 0, 0, 182, 0, 186, 0, 173, 173, 179, 165,
174, 154, 125, 116, 0, 127, 133, 124, 121, 117, 188, 180, 179, 165, 150, 117, 0, 129, 135, 125,
109, 0, 444, 165, 171, 177, 179, 145, 185, 191, 122, 118, 110, 0, 446, 166, 172, 178, 151, 180,
197, 203 146, 186, 192, 198, 204
} ; } ;
static yyconst flex_int16_t yy_def[403] = static yyconst flex_int16_t yy_def[406] =
{ 0, { 0,
393, 1, 394, 394, 395, 395, 396, 396, 393, 393, 395, 1, 396, 396, 397, 397, 398, 398, 395, 395,
393, 393, 393, 393, 393, 393, 393, 393, 393, 393, 395, 395, 395, 399, 395, 395, 395, 395, 395, 395,
393, 393, 393, 393, 397, 393, 393, 393, 393, 393, 395, 395, 395, 395, 395, 400, 395, 395, 395, 395,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 395, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 393, 393, 401, 401, 401, 401, 401, 401, 401, 401, 401, 395,
399, 400, 401, 393, 402, 393, 393, 393, 393, 393, 395, 402, 403, 404, 395, 405, 395, 395, 399, 395,
393, 397, 393, 393, 393, 393, 398, 398, 398, 398, 395, 395, 395, 400, 395, 395, 395, 395, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 399, 400, 400, 401, 401, 401, 401, 401, 401, 401, 401, 401, 402,
393, 401, 393, 402, 393, 393, 398, 398, 398, 398, 403, 403, 395, 404, 395, 405, 395, 395, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
398, 398, 0, 393, 393, 393, 393, 393, 393, 393, 401, 401, 401, 401, 0, 395, 395, 395, 395, 395,
393, 393 395, 395, 395, 395, 395
} ; } ;
static yyconst flex_int16_t yy_nxt[494] = static yyconst flex_int16_t yy_nxt[497] =
{ 0, { 0,
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
30, 31, 32, 33, 34, 35, 36, 37, 37, 38, 30, 31, 32, 33, 34, 35, 36, 37, 38, 38,
37, 37, 39, 37, 40, 41, 42, 37, 43, 44, 39, 38, 38, 40, 38, 41, 42, 43, 38, 44,
45, 46, 47, 48, 37, 37, 37, 49, 50, 57, 45, 46, 47, 48, 49, 38, 38, 38, 50, 51,
57, 57, 57, 60, 68, 61, 64, 65, 70, 69, 58, 58, 58, 58, 62, 70, 63, 66, 67, 72,
74, 113, 71, 114, 75, 72, 60, 76, 61, 85, 71, 76, 115, 73, 116, 77, 74, 62, 78, 63,
77, 79, 82, 78, 83, 80, 86, 93, 73, 87, 87, 79, 81, 84, 80, 85, 82, 88, 95, 75,
90, 81, 88, 95, 84, 89, 97, 94, 91, 96, 89, 92, 83, 90, 97, 86, 91, 99, 96, 93,
103, 106, 128, 92, 98, 110, 99, 116, 100, 104, 98, 105, 108, 130, 94, 100, 112, 101, 118, 102,
105, 101, 111, 107, 117, 120, 154, 108, 129, 112, 106, 107, 103, 113, 109, 119, 122, 156, 110, 131,
121, 109, 57, 57, 134, 136, 137, 141, 164, 166, 114, 123, 111, 58, 58, 136, 138, 139, 143, 166,
135, 155, 156, 138, 165, 170, 142, 172, 175, 196, 168, 137, 157, 158, 140, 167, 172, 144, 174, 177,
181, 200, 201, 143, 167, 173, 171, 185, 168, 176, 198, 183, 202, 203, 145, 169, 175, 173, 187, 170,
182, 186, 393, 120, 215, 197, 207, 393, 121, 67, 178, 184, 188, 395, 122, 217, 199, 209, 395, 123,
208, 217, 238, 239, 392, 391, 390, 389, 388, 216, 69, 210, 219, 240, 241, 59, 394, 393, 392, 391,
387, 218, 386, 385, 240, 51, 51, 51, 51, 51, 218, 390, 220, 389, 388, 242, 52, 52, 52, 52,
51, 53, 53, 53, 53, 53, 53, 55, 55, 55, 52, 52, 54, 54, 54, 54, 54, 54, 56, 56,
55, 55, 55, 62, 62, 118, 118, 118, 384, 118, 56, 56, 56, 56, 64, 64, 120, 120, 120, 387,
118, 119, 119, 119, 119, 119, 119, 122, 122, 383, 120, 120, 121, 121, 121, 121, 121, 121, 124, 124,
122, 122, 122, 124, 382, 124, 124, 124, 124, 381, 386, 124, 124, 124, 126, 385, 126, 126, 126, 126,
380, 379, 378, 377, 376, 375, 374, 373, 372, 371, 384, 383, 382, 381, 380, 379, 378, 377, 376, 375,
370, 369, 368, 367, 366, 365, 364, 363, 362, 361, 374, 373, 372, 371, 370, 369, 368, 367, 366, 365,
360, 359, 358, 357, 356, 355, 354, 353, 352, 351, 364, 363, 362, 361, 360, 359, 358, 357, 356, 355,
350, 349, 348, 347, 346, 345, 344, 343, 342, 341, 354, 353, 352, 351, 350, 349, 348, 347, 346, 345,
340, 339, 338, 337, 336, 335, 334, 333, 332, 331, 344, 343, 342, 341, 340, 339, 338, 337, 336, 335,
330, 329, 328, 327, 326, 325, 324, 323, 322, 321, 334, 333, 332, 331, 330, 329, 328, 327, 326, 325,
320, 319, 318, 317, 316, 315, 314, 313, 312, 311, 324, 323, 322, 321, 320, 319, 318, 317, 316, 315,
310, 309, 308, 307, 306, 305, 304, 303, 302, 301, 314, 313, 312, 311, 310, 309, 308, 307, 306, 305,
300, 299, 298, 297, 296, 295, 294, 293, 292, 291, 304, 303, 302, 301, 300, 299, 298, 297, 296, 295,
290, 289, 288, 287, 286, 285, 284, 283, 282, 281, 294, 293, 292, 291, 290, 289, 288, 287, 286, 285,
280, 279, 278, 277, 276, 275, 274, 273, 272, 271, 284, 283, 282, 281, 280, 279, 278, 277, 276, 275,
270, 269, 268, 267, 266, 265, 264, 263, 262, 261, 274, 273, 272, 271, 270, 269, 268, 267, 266, 265,
260, 259, 258, 257, 256, 255, 254, 253, 252, 251, 264, 263, 262, 261, 260, 259, 258, 257, 256, 255,
250, 249, 248, 247, 246, 245, 244, 243, 242, 241, 254, 253, 252, 251, 250, 249, 248, 247, 246, 245,
237, 236, 235, 234, 233, 232, 231, 230, 229, 228, 244, 243, 239, 238, 237, 236, 235, 234, 233, 232,
227, 226, 225, 224, 223, 222, 221, 220, 219, 214, 231, 230, 229, 228, 227, 226, 225, 224, 223, 222,
213, 212, 211, 210, 209, 206, 205, 204, 203, 202, 221, 216, 215, 214, 213, 212, 211, 208, 207, 206,
199, 198, 195, 194, 193, 192, 191, 190, 189, 188, 205, 204, 201, 200, 197, 196, 195, 194, 193, 192,
126, 125, 123, 187, 184, 183, 180, 179, 178, 177, 191, 190, 128, 127, 125, 189, 186, 185, 182, 181,
174, 169, 163, 162, 161, 160, 159, 158, 157, 153, 180, 179, 176, 171, 165, 164, 163, 162, 161, 160,
152, 151, 150, 149, 148, 147, 146, 145, 144, 140, 159, 155, 154, 153, 152, 151, 150, 149, 148, 147,
139, 133, 132, 131, 130, 127, 393, 126, 125, 123, 146, 142, 141, 135, 134, 133, 132, 129, 395, 128,
115, 102, 66, 63, 59, 58, 393, 56, 56, 54, 127, 125, 117, 104, 68, 65, 61, 60, 395, 57,
54, 52, 52, 9, 393, 393, 393, 393, 393, 393, 57, 55, 55, 53, 53, 9, 395, 395, 395, 395,
393, 393, 393, 393, 393, 393, 393, 393, 393, 393, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395,
393, 393, 393, 393, 393, 393, 393, 393, 393, 393, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395,
393, 393, 393, 393, 393, 393, 393, 393, 393, 393, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395,
393, 393, 393, 393, 393, 393, 393, 393, 393, 393, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395,
393, 393, 393 395, 395, 395, 395, 395, 395
} ; } ;
static yyconst flex_int16_t yy_chk[494] = static yyconst flex_int16_t yy_chk[497] =
{ 0, { 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, 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, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
11, 12, 12, 24, 31, 24, 27, 27, 32, 31, 11, 11, 12, 12, 25, 32, 25, 28, 28, 33,
33, 46, 32, 46, 33, 32, 61, 33, 61, 36, 32, 34, 47, 33, 47, 34, 33, 63, 34, 63,
33, 34, 35, 33, 35, 34, 36, 39, 32, 36, 37, 34, 35, 36, 34, 36, 35, 37, 40, 33,
38, 34, 36, 40, 35, 36, 41, 39, 38, 40, 37, 39, 35, 37, 41, 36, 37, 42, 40, 39,
43, 44, 69, 38, 41, 45, 41, 48, 41, 43, 41, 44, 45, 71, 39, 42, 46, 42, 49, 42,
43, 41, 45, 44, 48, 52, 91, 44, 69, 45, 44, 44, 42, 46, 45, 49, 53, 93, 45, 71,
52, 44, 57, 57, 75, 76, 76, 79, 102, 103, 46, 53, 45, 58, 58, 77, 78, 78, 81, 104,
75, 91, 91, 76, 102, 105, 79, 106, 108, 137, 105, 77, 93, 93, 78, 104, 107, 81, 108, 110,
113, 140, 140, 79, 103, 106, 105, 116, 103, 108, 139, 115, 142, 142, 81, 105, 108, 107, 118, 105,
113, 116, 119, 120, 155, 137, 146, 119, 120, 398, 110, 115, 118, 121, 122, 157, 139, 148, 121, 122,
146, 156, 180, 180, 391, 390, 389, 388, 387, 155, 401, 148, 158, 182, 182, 399, 393, 392, 391, 390,
386, 156, 384, 383, 180, 394, 394, 394, 394, 394, 157, 389, 158, 388, 386, 182, 396, 396, 396, 396,
394, 395, 395, 395, 395, 395, 395, 396, 396, 396, 396, 396, 397, 397, 397, 397, 397, 397, 398, 398,
396, 396, 396, 397, 397, 399, 399, 399, 382, 399, 398, 398, 398, 398, 400, 400, 402, 402, 402, 385,
399, 400, 400, 400, 400, 400, 400, 401, 401, 381, 402, 402, 403, 403, 403, 403, 403, 403, 404, 404,
401, 401, 401, 402, 380, 402, 402, 402, 402, 379, 384, 404, 404, 404, 405, 383, 405, 405, 405, 405,
378, 377, 376, 375, 373, 371, 368, 366, 365, 363, 382, 381, 380, 379, 378, 377, 375, 373, 370, 368,
361, 360, 359, 357, 354, 352, 351, 350, 349, 348, 367, 365, 363, 362, 361, 359, 356, 354, 353, 352,
346, 344, 343, 340, 339, 337, 336, 335, 332, 331, 351, 350, 348, 346, 345, 342, 341, 339, 338, 337,
330, 327, 325, 324, 323, 322, 319, 318, 317, 315, 334, 333, 332, 329, 327, 326, 325, 324, 321, 320,
314, 312, 310, 308, 307, 306, 304, 302, 300, 297, 319, 317, 316, 314, 312, 310, 309, 308, 306, 304,
296, 292, 291, 290, 289, 288, 287, 286, 284, 283, 302, 299, 298, 294, 293, 292, 291, 290, 289, 288,
282, 281, 280, 279, 278, 277, 276, 275, 273, 272, 286, 285, 284, 283, 282, 281, 280, 279, 278, 277,
271, 269, 267, 263, 262, 261, 260, 259, 258, 257, 275, 274, 273, 271, 269, 265, 264, 263, 262, 261,
255, 254, 253, 252, 250, 248, 246, 245, 244, 243, 260, 259, 257, 256, 255, 254, 252, 250, 248, 247,
242, 241, 240, 239, 238, 236, 235, 234, 233, 232, 246, 245, 244, 243, 242, 241, 240, 238, 237, 236,
231, 230, 229, 228, 226, 225, 224, 221, 219, 217, 235, 234, 233, 232, 231, 230, 228, 227, 226, 223,
216, 215, 214, 213, 211, 210, 208, 206, 205, 203, 221, 219, 218, 217, 216, 215, 213, 212, 210, 208,
202, 201, 200, 199, 198, 197, 196, 195, 194, 193, 207, 205, 204, 203, 202, 201, 200, 199, 198, 197,
190, 189, 188, 187, 186, 185, 184, 183, 182, 181, 196, 195, 192, 191, 190, 189, 188, 187, 186, 185,
179, 178, 177, 175, 172, 171, 170, 169, 168, 167, 184, 183, 181, 180, 179, 177, 174, 173, 172, 171,
166, 165, 164, 162, 161, 160, 159, 158, 157, 154, 170, 169, 168, 167, 166, 164, 163, 162, 161, 160,
153, 152, 150, 149, 148, 145, 144, 143, 142, 141, 159, 156, 155, 154, 152, 151, 150, 147, 146, 145,
139, 138, 136, 135, 134, 133, 132, 131, 130, 129, 144, 143, 141, 140, 138, 137, 136, 135, 134, 133,
126, 125, 123, 117, 115, 114, 112, 111, 110, 109, 132, 131, 128, 127, 125, 119, 117, 116, 114, 113,
107, 104, 101, 100, 99, 96, 95, 94, 93, 89, 112, 111, 109, 106, 103, 102, 101, 98, 97, 96,
88, 87, 86, 85, 84, 83, 82, 81, 80, 78, 95, 91, 90, 89, 88, 87, 86, 85, 84, 83,
77, 74, 72, 71, 70, 68, 62, 60, 56, 54, 82, 80, 79, 76, 74, 73, 72, 70, 64, 62,
47, 42, 29, 25, 23, 22, 9, 8, 7, 6, 57, 55, 48, 43, 30, 26, 24, 23, 9, 8,
5, 4, 3, 393, 393, 393, 393, 393, 393, 393, 7, 6, 5, 4, 3, 395, 395, 395, 395, 395,
393, 393, 393, 393, 393, 393, 393, 393, 393, 393, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395,
393, 393, 393, 393, 393, 393, 393, 393, 393, 393, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395,
393, 393, 393, 393, 393, 393, 393, 393, 393, 393, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395,
393, 393, 393, 393, 393, 393, 393, 393, 393, 393, 395, 395, 395, 395, 395, 395, 395, 395, 395, 395,
393, 393, 393 395, 395, 395, 395, 395, 395
} ; } ;
...@@ -908,7 +908,7 @@ YY_DECL ...@@ -908,7 +908,7 @@ YY_DECL
register char *yy_cp, *yy_bp; register char *yy_cp, *yy_bp;
register int yy_act; register int yy_act;
#line 91 "pars0lex.l" #line 92 "pars0lex.l"
#line 914 "_flex_tmp.c" #line 914 "_flex_tmp.c"
...@@ -964,13 +964,13 @@ yy_match: ...@@ -964,13 +964,13 @@ yy_match:
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{ {
yy_current_state = (int) yy_def[yy_current_state]; yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 394 ) if ( yy_current_state >= 396 )
yy_c = yy_meta[(unsigned int) yy_c]; yy_c = yy_meta[(unsigned int) yy_c];
} }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp; ++yy_cp;
} }
while ( yy_current_state != 393 ); while ( yy_current_state != 395 );
yy_cp = (yy_last_accepting_cpos); yy_cp = (yy_last_accepting_cpos);
yy_current_state = (yy_last_accepting_state); yy_current_state = (yy_last_accepting_state);
...@@ -992,7 +992,7 @@ do_action: /* This label is used only to access EOF actions. */ ...@@ -992,7 +992,7 @@ do_action: /* This label is used only to access EOF actions. */
case 1: case 1:
YY_RULE_SETUP YY_RULE_SETUP
#line 93 "pars0lex.l" #line 94 "pars0lex.l"
{ {
yylval = sym_tab_add_int_lit(pars_sym_tab_global, yylval = sym_tab_add_int_lit(pars_sym_tab_global,
atoi(yytext)); atoi(yytext));
...@@ -1001,7 +1001,7 @@ YY_RULE_SETUP ...@@ -1001,7 +1001,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 2: case 2:
YY_RULE_SETUP YY_RULE_SETUP
#line 99 "pars0lex.l" #line 100 "pars0lex.l"
{ {
ut_error; /* not implemented */ ut_error; /* not implemented */
...@@ -1010,7 +1010,7 @@ YY_RULE_SETUP ...@@ -1010,7 +1010,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 3: case 3:
YY_RULE_SETUP YY_RULE_SETUP
#line 105 "pars0lex.l" #line 106 "pars0lex.l"
{ {
ulint type; ulint type;
...@@ -1022,7 +1022,17 @@ YY_RULE_SETUP ...@@ -1022,7 +1022,17 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 4: case 4:
YY_RULE_SETUP YY_RULE_SETUP
#line 114 "pars0lex.l" #line 115 "pars0lex.l"
{
yylval = sym_tab_add_bound_id(pars_sym_tab_global,
yytext + 1);
return(PARS_ID_TOKEN);
}
YY_BREAK
case 5:
YY_RULE_SETUP
#line 122 "pars0lex.l"
{ {
/* Quoted character string literals are handled in an explicit /* Quoted character string literals are handled in an explicit
start state 'quoted'. This state is entered and the buffer for start state 'quoted'. This state is entered and the buffer for
...@@ -1033,19 +1043,19 @@ In the state 'quoted', only two actions are possible (defined below). */ ...@@ -1033,19 +1043,19 @@ In the state 'quoted', only two actions are possible (defined below). */
stringbuf_len = 0; stringbuf_len = 0;
} }
YY_BREAK YY_BREAK
case 5: case 6:
/* rule 5 can match eol */ /* rule 6 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 123 "pars0lex.l" #line 131 "pars0lex.l"
{ {
/* Got a sequence of characters other than "'": /* Got a sequence of characters other than "'":
append to string buffer */ append to string buffer */
string_append(yytext, yyleng); string_append(yytext, yyleng);
} }
YY_BREAK YY_BREAK
case 6: case 7:
YY_RULE_SETUP YY_RULE_SETUP
#line 128 "pars0lex.l" #line 136 "pars0lex.l"
{ {
/* Got a sequence of "'" characters: /* Got a sequence of "'" characters:
append half of them to string buffer, append half of them to string buffer,
...@@ -1070,9 +1080,9 @@ YY_RULE_SETUP ...@@ -1070,9 +1080,9 @@ YY_RULE_SETUP
} }
} }
YY_BREAK YY_BREAK
case 7: case 8:
YY_RULE_SETUP YY_RULE_SETUP
#line 152 "pars0lex.l" #line 160 "pars0lex.l"
{ {
/* Quoted identifiers are handled in an explicit start state 'id'. /* Quoted identifiers are handled in an explicit start state 'id'.
This state is entered and the buffer for the scanned string is emptied This state is entered and the buffer for the scanned string is emptied
...@@ -1083,19 +1093,19 @@ In the state 'id', only two actions are possible (defined below). */ ...@@ -1083,19 +1093,19 @@ In the state 'id', only two actions are possible (defined below). */
stringbuf_len = 0; stringbuf_len = 0;
} }
YY_BREAK YY_BREAK
case 8: case 9:
/* rule 8 can match eol */ /* rule 9 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 161 "pars0lex.l" #line 169 "pars0lex.l"
{ {
/* Got a sequence of characters other than '"': /* Got a sequence of characters other than '"':
append to string buffer */ append to string buffer */
string_append(yytext, yyleng); string_append(yytext, yyleng);
} }
YY_BREAK YY_BREAK
case 9: case 10:
YY_RULE_SETUP YY_RULE_SETUP
#line 166 "pars0lex.l" #line 174 "pars0lex.l"
{ {
/* Got a sequence of '"' characters: /* Got a sequence of '"' characters:
append half of them to string buffer, append half of them to string buffer,
...@@ -1121,18 +1131,18 @@ YY_RULE_SETUP ...@@ -1121,18 +1131,18 @@ YY_RULE_SETUP
} }
} }
YY_BREAK YY_BREAK
case 10: case 11:
YY_RULE_SETUP YY_RULE_SETUP
#line 191 "pars0lex.l" #line 199 "pars0lex.l"
{ {
yylval = sym_tab_add_null_lit(pars_sym_tab_global); yylval = sym_tab_add_null_lit(pars_sym_tab_global);
return(PARS_NULL_LIT); return(PARS_NULL_LIT);
} }
YY_BREAK YY_BREAK
case 11: case 12:
YY_RULE_SETUP YY_RULE_SETUP
#line 197 "pars0lex.l" #line 205 "pars0lex.l"
{ {
/* Implicit cursor name */ /* Implicit cursor name */
yylval = sym_tab_add_str_lit(pars_sym_tab_global, yylval = sym_tab_add_str_lit(pars_sym_tab_global,
...@@ -1140,548 +1150,548 @@ YY_RULE_SETUP ...@@ -1140,548 +1150,548 @@ YY_RULE_SETUP
return(PARS_SQL_TOKEN); return(PARS_SQL_TOKEN);
} }
YY_BREAK YY_BREAK
case 12: case 13:
YY_RULE_SETUP YY_RULE_SETUP
#line 204 "pars0lex.l" #line 212 "pars0lex.l"
{ {
return(PARS_AND_TOKEN); return(PARS_AND_TOKEN);
} }
YY_BREAK YY_BREAK
case 13: case 14:
YY_RULE_SETUP YY_RULE_SETUP
#line 208 "pars0lex.l" #line 216 "pars0lex.l"
{ {
return(PARS_OR_TOKEN); return(PARS_OR_TOKEN);
} }
YY_BREAK YY_BREAK
case 14: case 15:
YY_RULE_SETUP YY_RULE_SETUP
#line 212 "pars0lex.l" #line 220 "pars0lex.l"
{ {
return(PARS_NOT_TOKEN); return(PARS_NOT_TOKEN);
} }
YY_BREAK YY_BREAK
case 15: case 16:
YY_RULE_SETUP YY_RULE_SETUP
#line 216 "pars0lex.l" #line 224 "pars0lex.l"
{ {
return(PARS_PROCEDURE_TOKEN); return(PARS_PROCEDURE_TOKEN);
} }
YY_BREAK YY_BREAK
case 16: case 17:
YY_RULE_SETUP YY_RULE_SETUP
#line 220 "pars0lex.l" #line 228 "pars0lex.l"
{ {
return(PARS_IN_TOKEN); return(PARS_IN_TOKEN);
} }
YY_BREAK YY_BREAK
case 17: case 18:
YY_RULE_SETUP YY_RULE_SETUP
#line 224 "pars0lex.l" #line 232 "pars0lex.l"
{ {
return(PARS_OUT_TOKEN); return(PARS_OUT_TOKEN);
} }
YY_BREAK YY_BREAK
case 18: case 19:
YY_RULE_SETUP YY_RULE_SETUP
#line 228 "pars0lex.l" #line 236 "pars0lex.l"
{ {
return(PARS_BINARY_TOKEN); return(PARS_BINARY_TOKEN);
} }
YY_BREAK YY_BREAK
case 19: case 20:
YY_RULE_SETUP YY_RULE_SETUP
#line 232 "pars0lex.l" #line 240 "pars0lex.l"
{ {
return(PARS_BLOB_TOKEN); return(PARS_BLOB_TOKEN);
} }
YY_BREAK YY_BREAK
case 20: case 21:
YY_RULE_SETUP YY_RULE_SETUP
#line 236 "pars0lex.l" #line 244 "pars0lex.l"
{ {
return(PARS_INT_TOKEN); return(PARS_INT_TOKEN);
} }
YY_BREAK YY_BREAK
case 21: case 22:
YY_RULE_SETUP YY_RULE_SETUP
#line 240 "pars0lex.l" #line 248 "pars0lex.l"
{ {
return(PARS_INT_TOKEN); return(PARS_INT_TOKEN);
} }
YY_BREAK YY_BREAK
case 22: case 23:
YY_RULE_SETUP YY_RULE_SETUP
#line 244 "pars0lex.l" #line 252 "pars0lex.l"
{ {
return(PARS_FLOAT_TOKEN); return(PARS_FLOAT_TOKEN);
} }
YY_BREAK YY_BREAK
case 23: case 24:
YY_RULE_SETUP YY_RULE_SETUP
#line 248 "pars0lex.l" #line 256 "pars0lex.l"
{ {
return(PARS_CHAR_TOKEN); return(PARS_CHAR_TOKEN);
} }
YY_BREAK YY_BREAK
case 24: case 25:
YY_RULE_SETUP YY_RULE_SETUP
#line 252 "pars0lex.l" #line 260 "pars0lex.l"
{ {
return(PARS_IS_TOKEN); return(PARS_IS_TOKEN);
} }
YY_BREAK YY_BREAK
case 25: case 26:
YY_RULE_SETUP YY_RULE_SETUP
#line 256 "pars0lex.l" #line 264 "pars0lex.l"
{ {
return(PARS_BEGIN_TOKEN); return(PARS_BEGIN_TOKEN);
} }
YY_BREAK YY_BREAK
case 26: case 27:
YY_RULE_SETUP YY_RULE_SETUP
#line 260 "pars0lex.l" #line 268 "pars0lex.l"
{ {
return(PARS_END_TOKEN); return(PARS_END_TOKEN);
} }
YY_BREAK YY_BREAK
case 27: case 28:
YY_RULE_SETUP YY_RULE_SETUP
#line 264 "pars0lex.l" #line 272 "pars0lex.l"
{ {
return(PARS_IF_TOKEN); return(PARS_IF_TOKEN);
} }
YY_BREAK YY_BREAK
case 28: case 29:
YY_RULE_SETUP YY_RULE_SETUP
#line 268 "pars0lex.l" #line 276 "pars0lex.l"
{ {
return(PARS_THEN_TOKEN); return(PARS_THEN_TOKEN);
} }
YY_BREAK YY_BREAK
case 29: case 30:
YY_RULE_SETUP YY_RULE_SETUP
#line 272 "pars0lex.l" #line 280 "pars0lex.l"
{ {
return(PARS_ELSE_TOKEN); return(PARS_ELSE_TOKEN);
} }
YY_BREAK YY_BREAK
case 30: case 31:
YY_RULE_SETUP YY_RULE_SETUP
#line 276 "pars0lex.l" #line 284 "pars0lex.l"
{ {
return(PARS_ELSIF_TOKEN); return(PARS_ELSIF_TOKEN);
} }
YY_BREAK YY_BREAK
case 31: case 32:
YY_RULE_SETUP YY_RULE_SETUP
#line 280 "pars0lex.l" #line 288 "pars0lex.l"
{ {
return(PARS_LOOP_TOKEN); return(PARS_LOOP_TOKEN);
} }
YY_BREAK YY_BREAK
case 32: case 33:
YY_RULE_SETUP YY_RULE_SETUP
#line 284 "pars0lex.l" #line 292 "pars0lex.l"
{ {
return(PARS_WHILE_TOKEN); return(PARS_WHILE_TOKEN);
} }
YY_BREAK YY_BREAK
case 33: case 34:
YY_RULE_SETUP YY_RULE_SETUP
#line 288 "pars0lex.l" #line 296 "pars0lex.l"
{ {
return(PARS_RETURN_TOKEN); return(PARS_RETURN_TOKEN);
} }
YY_BREAK YY_BREAK
case 34: case 35:
YY_RULE_SETUP YY_RULE_SETUP
#line 292 "pars0lex.l" #line 300 "pars0lex.l"
{ {
return(PARS_SELECT_TOKEN); return(PARS_SELECT_TOKEN);
} }
YY_BREAK YY_BREAK
case 35: case 36:
YY_RULE_SETUP YY_RULE_SETUP
#line 296 "pars0lex.l" #line 304 "pars0lex.l"
{ {
return(PARS_SUM_TOKEN); return(PARS_SUM_TOKEN);
} }
YY_BREAK YY_BREAK
case 36: case 37:
YY_RULE_SETUP YY_RULE_SETUP
#line 300 "pars0lex.l" #line 308 "pars0lex.l"
{ {
return(PARS_COUNT_TOKEN); return(PARS_COUNT_TOKEN);
} }
YY_BREAK YY_BREAK
case 37: case 38:
YY_RULE_SETUP YY_RULE_SETUP
#line 304 "pars0lex.l" #line 312 "pars0lex.l"
{ {
return(PARS_DISTINCT_TOKEN); return(PARS_DISTINCT_TOKEN);
} }
YY_BREAK YY_BREAK
case 38: case 39:
YY_RULE_SETUP YY_RULE_SETUP
#line 308 "pars0lex.l" #line 316 "pars0lex.l"
{ {
return(PARS_FROM_TOKEN); return(PARS_FROM_TOKEN);
} }
YY_BREAK YY_BREAK
case 39: case 40:
YY_RULE_SETUP YY_RULE_SETUP
#line 312 "pars0lex.l" #line 320 "pars0lex.l"
{ {
return(PARS_WHERE_TOKEN); return(PARS_WHERE_TOKEN);
} }
YY_BREAK YY_BREAK
case 40: case 41:
YY_RULE_SETUP YY_RULE_SETUP
#line 316 "pars0lex.l" #line 324 "pars0lex.l"
{ {
return(PARS_FOR_TOKEN); return(PARS_FOR_TOKEN);
} }
YY_BREAK YY_BREAK
case 41: case 42:
YY_RULE_SETUP YY_RULE_SETUP
#line 320 "pars0lex.l" #line 328 "pars0lex.l"
{ {
return(PARS_CONSISTENT_TOKEN); return(PARS_CONSISTENT_TOKEN);
} }
YY_BREAK YY_BREAK
case 42: case 43:
YY_RULE_SETUP YY_RULE_SETUP
#line 324 "pars0lex.l" #line 332 "pars0lex.l"
{ {
return(PARS_READ_TOKEN); return(PARS_READ_TOKEN);
} }
YY_BREAK YY_BREAK
case 43: case 44:
YY_RULE_SETUP YY_RULE_SETUP
#line 328 "pars0lex.l" #line 336 "pars0lex.l"
{ {
return(PARS_ORDER_TOKEN); return(PARS_ORDER_TOKEN);
} }
YY_BREAK YY_BREAK
case 44: case 45:
YY_RULE_SETUP YY_RULE_SETUP
#line 332 "pars0lex.l" #line 340 "pars0lex.l"
{ {
return(PARS_BY_TOKEN); return(PARS_BY_TOKEN);
} }
YY_BREAK YY_BREAK
case 45: case 46:
YY_RULE_SETUP YY_RULE_SETUP
#line 336 "pars0lex.l" #line 344 "pars0lex.l"
{ {
return(PARS_ASC_TOKEN); return(PARS_ASC_TOKEN);
} }
YY_BREAK YY_BREAK
case 46: case 47:
YY_RULE_SETUP YY_RULE_SETUP
#line 340 "pars0lex.l" #line 348 "pars0lex.l"
{ {
return(PARS_DESC_TOKEN); return(PARS_DESC_TOKEN);
} }
YY_BREAK YY_BREAK
case 47: case 48:
YY_RULE_SETUP YY_RULE_SETUP
#line 344 "pars0lex.l" #line 352 "pars0lex.l"
{ {
return(PARS_INSERT_TOKEN); return(PARS_INSERT_TOKEN);
} }
YY_BREAK YY_BREAK
case 48: case 49:
YY_RULE_SETUP YY_RULE_SETUP
#line 348 "pars0lex.l" #line 356 "pars0lex.l"
{ {
return(PARS_INTO_TOKEN); return(PARS_INTO_TOKEN);
} }
YY_BREAK YY_BREAK
case 49: case 50:
YY_RULE_SETUP YY_RULE_SETUP
#line 352 "pars0lex.l" #line 360 "pars0lex.l"
{ {
return(PARS_VALUES_TOKEN); return(PARS_VALUES_TOKEN);
} }
YY_BREAK YY_BREAK
case 50: case 51:
YY_RULE_SETUP YY_RULE_SETUP
#line 356 "pars0lex.l" #line 364 "pars0lex.l"
{ {
return(PARS_UPDATE_TOKEN); return(PARS_UPDATE_TOKEN);
} }
YY_BREAK YY_BREAK
case 51: case 52:
YY_RULE_SETUP YY_RULE_SETUP
#line 360 "pars0lex.l" #line 368 "pars0lex.l"
{ {
return(PARS_SET_TOKEN); return(PARS_SET_TOKEN);
} }
YY_BREAK YY_BREAK
case 52: case 53:
YY_RULE_SETUP YY_RULE_SETUP
#line 364 "pars0lex.l" #line 372 "pars0lex.l"
{ {
return(PARS_DELETE_TOKEN); return(PARS_DELETE_TOKEN);
} }
YY_BREAK YY_BREAK
case 53: case 54:
YY_RULE_SETUP YY_RULE_SETUP
#line 368 "pars0lex.l" #line 376 "pars0lex.l"
{ {
return(PARS_CURRENT_TOKEN); return(PARS_CURRENT_TOKEN);
} }
YY_BREAK YY_BREAK
case 54: case 55:
YY_RULE_SETUP YY_RULE_SETUP
#line 372 "pars0lex.l" #line 380 "pars0lex.l"
{ {
return(PARS_OF_TOKEN); return(PARS_OF_TOKEN);
} }
YY_BREAK YY_BREAK
case 55: case 56:
YY_RULE_SETUP YY_RULE_SETUP
#line 376 "pars0lex.l" #line 384 "pars0lex.l"
{ {
return(PARS_CREATE_TOKEN); return(PARS_CREATE_TOKEN);
} }
YY_BREAK YY_BREAK
case 56: case 57:
YY_RULE_SETUP YY_RULE_SETUP
#line 380 "pars0lex.l" #line 388 "pars0lex.l"
{ {
return(PARS_TABLE_TOKEN); return(PARS_TABLE_TOKEN);
} }
YY_BREAK YY_BREAK
case 57: case 58:
YY_RULE_SETUP YY_RULE_SETUP
#line 384 "pars0lex.l" #line 392 "pars0lex.l"
{ {
return(PARS_INDEX_TOKEN); return(PARS_INDEX_TOKEN);
} }
YY_BREAK YY_BREAK
case 58: case 59:
YY_RULE_SETUP YY_RULE_SETUP
#line 388 "pars0lex.l" #line 396 "pars0lex.l"
{ {
return(PARS_UNIQUE_TOKEN); return(PARS_UNIQUE_TOKEN);
} }
YY_BREAK YY_BREAK
case 59: case 60:
YY_RULE_SETUP YY_RULE_SETUP
#line 392 "pars0lex.l" #line 400 "pars0lex.l"
{ {
return(PARS_CLUSTERED_TOKEN); return(PARS_CLUSTERED_TOKEN);
} }
YY_BREAK YY_BREAK
case 60: case 61:
YY_RULE_SETUP YY_RULE_SETUP
#line 396 "pars0lex.l" #line 404 "pars0lex.l"
{ {
return(PARS_DOES_NOT_FIT_IN_MEM_TOKEN); return(PARS_DOES_NOT_FIT_IN_MEM_TOKEN);
} }
YY_BREAK YY_BREAK
case 61: case 62:
YY_RULE_SETUP YY_RULE_SETUP
#line 400 "pars0lex.l" #line 408 "pars0lex.l"
{ {
return(PARS_ON_TOKEN); return(PARS_ON_TOKEN);
} }
YY_BREAK YY_BREAK
case 62: case 63:
YY_RULE_SETUP YY_RULE_SETUP
#line 404 "pars0lex.l" #line 412 "pars0lex.l"
{ {
return(PARS_DECLARE_TOKEN); return(PARS_DECLARE_TOKEN);
} }
YY_BREAK YY_BREAK
case 63: case 64:
YY_RULE_SETUP YY_RULE_SETUP
#line 408 "pars0lex.l" #line 416 "pars0lex.l"
{ {
return(PARS_CURSOR_TOKEN); return(PARS_CURSOR_TOKEN);
} }
YY_BREAK YY_BREAK
case 64: case 65:
YY_RULE_SETUP YY_RULE_SETUP
#line 412 "pars0lex.l" #line 420 "pars0lex.l"
{ {
return(PARS_OPEN_TOKEN); return(PARS_OPEN_TOKEN);
} }
YY_BREAK YY_BREAK
case 65: case 66:
YY_RULE_SETUP YY_RULE_SETUP
#line 416 "pars0lex.l" #line 424 "pars0lex.l"
{ {
return(PARS_FETCH_TOKEN); return(PARS_FETCH_TOKEN);
} }
YY_BREAK YY_BREAK
case 66: case 67:
YY_RULE_SETUP YY_RULE_SETUP
#line 420 "pars0lex.l" #line 428 "pars0lex.l"
{ {
return(PARS_CLOSE_TOKEN); return(PARS_CLOSE_TOKEN);
} }
YY_BREAK YY_BREAK
case 67: case 68:
YY_RULE_SETUP YY_RULE_SETUP
#line 424 "pars0lex.l" #line 432 "pars0lex.l"
{ {
return(PARS_NOTFOUND_TOKEN); return(PARS_NOTFOUND_TOKEN);
} }
YY_BREAK YY_BREAK
case 68: case 69:
YY_RULE_SETUP YY_RULE_SETUP
#line 428 "pars0lex.l" #line 436 "pars0lex.l"
{ {
return(PARS_TO_CHAR_TOKEN); return(PARS_TO_CHAR_TOKEN);
} }
YY_BREAK YY_BREAK
case 69: case 70:
YY_RULE_SETUP YY_RULE_SETUP
#line 432 "pars0lex.l" #line 440 "pars0lex.l"
{ {
return(PARS_TO_NUMBER_TOKEN); return(PARS_TO_NUMBER_TOKEN);
} }
YY_BREAK YY_BREAK
case 70: case 71:
YY_RULE_SETUP YY_RULE_SETUP
#line 436 "pars0lex.l" #line 444 "pars0lex.l"
{ {
return(PARS_TO_BINARY_TOKEN); return(PARS_TO_BINARY_TOKEN);
} }
YY_BREAK YY_BREAK
case 71: case 72:
YY_RULE_SETUP YY_RULE_SETUP
#line 440 "pars0lex.l" #line 448 "pars0lex.l"
{ {
return(PARS_BINARY_TO_NUMBER_TOKEN); return(PARS_BINARY_TO_NUMBER_TOKEN);
} }
YY_BREAK YY_BREAK
case 72: case 73:
YY_RULE_SETUP YY_RULE_SETUP
#line 444 "pars0lex.l" #line 452 "pars0lex.l"
{ {
return(PARS_SUBSTR_TOKEN); return(PARS_SUBSTR_TOKEN);
} }
YY_BREAK YY_BREAK
case 73: case 74:
YY_RULE_SETUP YY_RULE_SETUP
#line 448 "pars0lex.l" #line 456 "pars0lex.l"
{ {
return(PARS_REPLSTR_TOKEN); return(PARS_REPLSTR_TOKEN);
} }
YY_BREAK YY_BREAK
case 74: case 75:
YY_RULE_SETUP YY_RULE_SETUP
#line 452 "pars0lex.l" #line 460 "pars0lex.l"
{ {
return(PARS_CONCAT_TOKEN); return(PARS_CONCAT_TOKEN);
} }
YY_BREAK YY_BREAK
case 75: case 76:
YY_RULE_SETUP YY_RULE_SETUP
#line 456 "pars0lex.l" #line 464 "pars0lex.l"
{ {
return(PARS_INSTR_TOKEN); return(PARS_INSTR_TOKEN);
} }
YY_BREAK YY_BREAK
case 76: case 77:
YY_RULE_SETUP YY_RULE_SETUP
#line 460 "pars0lex.l" #line 468 "pars0lex.l"
{ {
return(PARS_LENGTH_TOKEN); return(PARS_LENGTH_TOKEN);
} }
YY_BREAK YY_BREAK
case 77: case 78:
YY_RULE_SETUP YY_RULE_SETUP
#line 464 "pars0lex.l" #line 472 "pars0lex.l"
{ {
return(PARS_SYSDATE_TOKEN); return(PARS_SYSDATE_TOKEN);
} }
YY_BREAK YY_BREAK
case 78: case 79:
YY_RULE_SETUP YY_RULE_SETUP
#line 468 "pars0lex.l" #line 476 "pars0lex.l"
{ {
return(PARS_PRINTF_TOKEN); return(PARS_PRINTF_TOKEN);
} }
YY_BREAK YY_BREAK
case 79: case 80:
YY_RULE_SETUP YY_RULE_SETUP
#line 472 "pars0lex.l" #line 480 "pars0lex.l"
{ {
return(PARS_ASSERT_TOKEN); return(PARS_ASSERT_TOKEN);
} }
YY_BREAK YY_BREAK
case 80: case 81:
YY_RULE_SETUP YY_RULE_SETUP
#line 476 "pars0lex.l" #line 484 "pars0lex.l"
{ {
return(PARS_RND_TOKEN); return(PARS_RND_TOKEN);
} }
YY_BREAK YY_BREAK
case 81: case 82:
YY_RULE_SETUP YY_RULE_SETUP
#line 480 "pars0lex.l" #line 488 "pars0lex.l"
{ {
return(PARS_RND_STR_TOKEN); return(PARS_RND_STR_TOKEN);
} }
YY_BREAK YY_BREAK
case 82: case 83:
YY_RULE_SETUP YY_RULE_SETUP
#line 484 "pars0lex.l" #line 492 "pars0lex.l"
{ {
return(PARS_ROW_PRINTF_TOKEN); return(PARS_ROW_PRINTF_TOKEN);
} }
YY_BREAK YY_BREAK
case 83: case 84:
YY_RULE_SETUP YY_RULE_SETUP
#line 488 "pars0lex.l" #line 496 "pars0lex.l"
{ {
return(PARS_COMMIT_TOKEN); return(PARS_COMMIT_TOKEN);
} }
YY_BREAK YY_BREAK
case 84: case 85:
YY_RULE_SETUP YY_RULE_SETUP
#line 492 "pars0lex.l" #line 500 "pars0lex.l"
{ {
return(PARS_ROLLBACK_TOKEN); return(PARS_ROLLBACK_TOKEN);
} }
YY_BREAK YY_BREAK
case 85: case 86:
YY_RULE_SETUP YY_RULE_SETUP
#line 496 "pars0lex.l" #line 504 "pars0lex.l"
{ {
return(PARS_WORK_TOKEN); return(PARS_WORK_TOKEN);
} }
YY_BREAK YY_BREAK
case 86: case 87:
YY_RULE_SETUP YY_RULE_SETUP
#line 500 "pars0lex.l" #line 508 "pars0lex.l"
{ {
return(PARS_UNSIGNED_TOKEN); return(PARS_UNSIGNED_TOKEN);
} }
YY_BREAK YY_BREAK
case 87: case 88:
YY_RULE_SETUP YY_RULE_SETUP
#line 504 "pars0lex.l" #line 512 "pars0lex.l"
{ {
return(PARS_EXIT_TOKEN); return(PARS_EXIT_TOKEN);
} }
YY_BREAK YY_BREAK
case 88: case 89:
YY_RULE_SETUP YY_RULE_SETUP
#line 508 "pars0lex.l" #line 516 "pars0lex.l"
{ {
return(PARS_FUNCTION_TOKEN); return(PARS_FUNCTION_TOKEN);
} }
YY_BREAK YY_BREAK
case 89: case 90:
YY_RULE_SETUP YY_RULE_SETUP
#line 512 "pars0lex.l" #line 520 "pars0lex.l"
{ {
yylval = sym_tab_add_id(pars_sym_tab_global, yylval = sym_tab_add_id(pars_sym_tab_global,
(byte*)yytext, (byte*)yytext,
...@@ -1689,52 +1699,44 @@ YY_RULE_SETUP ...@@ -1689,52 +1699,44 @@ YY_RULE_SETUP
return(PARS_ID_TOKEN); return(PARS_ID_TOKEN);
} }
YY_BREAK YY_BREAK
case 90:
YY_RULE_SETUP
#line 519 "pars0lex.l"
{
return(PARS_DDOT_TOKEN);
}
YY_BREAK
case 91: case 91:
YY_RULE_SETUP YY_RULE_SETUP
#line 523 "pars0lex.l" #line 527 "pars0lex.l"
{ {
return(PARS_ASSIGN_TOKEN); return(PARS_DDOT_TOKEN);
} }
YY_BREAK YY_BREAK
case 92: case 92:
YY_RULE_SETUP YY_RULE_SETUP
#line 527 "pars0lex.l" #line 531 "pars0lex.l"
{ {
return(PARS_LE_TOKEN); return(PARS_ASSIGN_TOKEN);
} }
YY_BREAK YY_BREAK
case 93: case 93:
YY_RULE_SETUP YY_RULE_SETUP
#line 531 "pars0lex.l" #line 535 "pars0lex.l"
{ {
return(PARS_GE_TOKEN); return(PARS_LE_TOKEN);
} }
YY_BREAK YY_BREAK
case 94: case 94:
YY_RULE_SETUP YY_RULE_SETUP
#line 535 "pars0lex.l" #line 539 "pars0lex.l"
{ {
return(PARS_NE_TOKEN); return(PARS_GE_TOKEN);
} }
YY_BREAK YY_BREAK
case 95: case 95:
YY_RULE_SETUP YY_RULE_SETUP
#line 539 "pars0lex.l" #line 543 "pars0lex.l"
{ {
return(PARS_NE_TOKEN);
return((int)(*yytext));
} }
YY_BREAK YY_BREAK
case 96: case 96:
YY_RULE_SETUP YY_RULE_SETUP
#line 544 "pars0lex.l" #line 547 "pars0lex.l"
{ {
return((int)(*yytext)); return((int)(*yytext));
...@@ -1742,7 +1744,7 @@ YY_RULE_SETUP ...@@ -1742,7 +1744,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 97: case 97:
YY_RULE_SETUP YY_RULE_SETUP
#line 549 "pars0lex.l" #line 552 "pars0lex.l"
{ {
return((int)(*yytext)); return((int)(*yytext));
...@@ -1750,7 +1752,7 @@ YY_RULE_SETUP ...@@ -1750,7 +1752,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 98: case 98:
YY_RULE_SETUP YY_RULE_SETUP
#line 554 "pars0lex.l" #line 557 "pars0lex.l"
{ {
return((int)(*yytext)); return((int)(*yytext));
...@@ -1758,7 +1760,7 @@ YY_RULE_SETUP ...@@ -1758,7 +1760,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 99: case 99:
YY_RULE_SETUP YY_RULE_SETUP
#line 559 "pars0lex.l" #line 562 "pars0lex.l"
{ {
return((int)(*yytext)); return((int)(*yytext));
...@@ -1766,7 +1768,7 @@ YY_RULE_SETUP ...@@ -1766,7 +1768,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 100: case 100:
YY_RULE_SETUP YY_RULE_SETUP
#line 564 "pars0lex.l" #line 567 "pars0lex.l"
{ {
return((int)(*yytext)); return((int)(*yytext));
...@@ -1774,7 +1776,7 @@ YY_RULE_SETUP ...@@ -1774,7 +1776,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 101: case 101:
YY_RULE_SETUP YY_RULE_SETUP
#line 569 "pars0lex.l" #line 572 "pars0lex.l"
{ {
return((int)(*yytext)); return((int)(*yytext));
...@@ -1782,7 +1784,7 @@ YY_RULE_SETUP ...@@ -1782,7 +1784,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 102: case 102:
YY_RULE_SETUP YY_RULE_SETUP
#line 574 "pars0lex.l" #line 577 "pars0lex.l"
{ {
return((int)(*yytext)); return((int)(*yytext));
...@@ -1790,7 +1792,7 @@ YY_RULE_SETUP ...@@ -1790,7 +1792,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 103: case 103:
YY_RULE_SETUP YY_RULE_SETUP
#line 579 "pars0lex.l" #line 582 "pars0lex.l"
{ {
return((int)(*yytext)); return((int)(*yytext));
...@@ -1798,7 +1800,7 @@ YY_RULE_SETUP ...@@ -1798,7 +1800,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 104: case 104:
YY_RULE_SETUP YY_RULE_SETUP
#line 584 "pars0lex.l" #line 587 "pars0lex.l"
{ {
return((int)(*yytext)); return((int)(*yytext));
...@@ -1806,7 +1808,7 @@ YY_RULE_SETUP ...@@ -1806,7 +1808,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 105: case 105:
YY_RULE_SETUP YY_RULE_SETUP
#line 589 "pars0lex.l" #line 592 "pars0lex.l"
{ {
return((int)(*yytext)); return((int)(*yytext));
...@@ -1814,7 +1816,7 @@ YY_RULE_SETUP ...@@ -1814,7 +1816,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 106: case 106:
YY_RULE_SETUP YY_RULE_SETUP
#line 594 "pars0lex.l" #line 597 "pars0lex.l"
{ {
return((int)(*yytext)); return((int)(*yytext));
...@@ -1822,7 +1824,7 @@ YY_RULE_SETUP ...@@ -1822,7 +1824,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 107: case 107:
YY_RULE_SETUP YY_RULE_SETUP
#line 599 "pars0lex.l" #line 602 "pars0lex.l"
{ {
return((int)(*yytext)); return((int)(*yytext));
...@@ -1830,7 +1832,7 @@ YY_RULE_SETUP ...@@ -1830,7 +1832,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 108: case 108:
YY_RULE_SETUP YY_RULE_SETUP
#line 604 "pars0lex.l" #line 607 "pars0lex.l"
{ {
return((int)(*yytext)); return((int)(*yytext));
...@@ -1838,7 +1840,7 @@ YY_RULE_SETUP ...@@ -1838,7 +1840,7 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 109: case 109:
YY_RULE_SETUP YY_RULE_SETUP
#line 609 "pars0lex.l" #line 612 "pars0lex.l"
{ {
return((int)(*yytext)); return((int)(*yytext));
...@@ -1846,35 +1848,43 @@ YY_RULE_SETUP ...@@ -1846,35 +1848,43 @@ YY_RULE_SETUP
YY_BREAK YY_BREAK
case 110: case 110:
YY_RULE_SETUP YY_RULE_SETUP
#line 614 "pars0lex.l" #line 617 "pars0lex.l"
BEGIN(comment); /* eat up comment */ {
return((int)(*yytext));
}
YY_BREAK YY_BREAK
case 111: case 111:
/* rule 111 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 616 "pars0lex.l" #line 622 "pars0lex.l"
BEGIN(comment); /* eat up comment */
YY_BREAK YY_BREAK
case 112: case 112:
/* rule 112 can match eol */ /* rule 112 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 617 "pars0lex.l" #line 624 "pars0lex.l"
YY_BREAK YY_BREAK
case 113: case 113:
/* rule 113 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 618 "pars0lex.l" #line 625 "pars0lex.l"
BEGIN(INITIAL);
YY_BREAK YY_BREAK
case 114: case 114:
/* rule 114 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 620 "pars0lex.l" #line 626 "pars0lex.l"
/* eat up whitespace */ BEGIN(INITIAL);
YY_BREAK YY_BREAK
case 115: case 115:
/* rule 115 can match eol */
YY_RULE_SETUP YY_RULE_SETUP
#line 623 "pars0lex.l" #line 628 "pars0lex.l"
/* eat up whitespace */
YY_BREAK
case 116:
YY_RULE_SETUP
#line 631 "pars0lex.l"
{ {
fprintf(stderr,"Unrecognized character: %02x\n", fprintf(stderr,"Unrecognized character: %02x\n",
*yytext); *yytext);
...@@ -1884,12 +1894,12 @@ YY_RULE_SETUP ...@@ -1884,12 +1894,12 @@ YY_RULE_SETUP
return(0); return(0);
} }
YY_BREAK YY_BREAK
case 116: case 117:
YY_RULE_SETUP YY_RULE_SETUP
#line 632 "pars0lex.l" #line 640 "pars0lex.l"
YY_FATAL_ERROR( "flex scanner jammed" ); YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK YY_BREAK
#line 1892 "_flex_tmp.c" #line 1902 "_flex_tmp.c"
case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(comment): case YY_STATE_EOF(comment):
case YY_STATE_EOF(quoted): case YY_STATE_EOF(quoted):
...@@ -2177,7 +2187,7 @@ static int yy_get_next_buffer (void) ...@@ -2177,7 +2187,7 @@ static int yy_get_next_buffer (void)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{ {
yy_current_state = (int) yy_def[yy_current_state]; yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 394 ) if ( yy_current_state >= 396 )
yy_c = yy_meta[(unsigned int) yy_c]; yy_c = yy_meta[(unsigned int) yy_c];
} }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
...@@ -2205,11 +2215,11 @@ static int yy_get_next_buffer (void) ...@@ -2205,11 +2215,11 @@ static int yy_get_next_buffer (void)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{ {
yy_current_state = (int) yy_def[yy_current_state]; yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 394 ) if ( yy_current_state >= 396 )
yy_c = yy_meta[(unsigned int) yy_c]; yy_c = yy_meta[(unsigned int) yy_c];
} }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 393); yy_is_jam = (yy_current_state == 395);
return yy_is_jam ? 0 : yy_current_state; return yy_is_jam ? 0 : yy_current_state;
} }
...@@ -2732,7 +2742,7 @@ void yyfree (void * ptr ) ...@@ -2732,7 +2742,7 @@ void yyfree (void * ptr )
#undef YY_DECL_IS_OURS #undef YY_DECL_IS_OURS
#undef YY_DECL #undef YY_DECL
#endif #endif
#line 632 "pars0lex.l" #line 640 "pars0lex.l"
...@@ -84,6 +84,7 @@ string_append( ...@@ -84,6 +84,7 @@ string_append(
DIGIT [0-9] DIGIT [0-9]
ID [a-z_A-Z][a-z_A-Z0-9]* ID [a-z_A-Z][a-z_A-Z0-9]*
BOUND_LIT \:[a-z_A-Z0-9]+ BOUND_LIT \:[a-z_A-Z0-9]+
BOUND_ID \$[a-z_A-Z0-9]+
%x comment %x comment
%x quoted %x quoted
...@@ -111,6 +112,13 @@ BOUND_LIT \:[a-z_A-Z0-9]+ ...@@ -111,6 +112,13 @@ BOUND_LIT \:[a-z_A-Z0-9]+
return(type); return(type);
} }
{BOUND_ID} {
yylval = sym_tab_add_bound_id(pars_sym_tab_global,
yytext + 1);
return(PARS_ID_TOKEN);
}
"'" { "'" {
/* Quoted character string literals are handled in an explicit /* Quoted character string literals are handled in an explicit
start state 'quoted'. This state is entered and the buffer for start state 'quoted'. This state is entered and the buffer for
......
...@@ -1931,6 +1931,7 @@ pars_info_create(void) ...@@ -1931,6 +1931,7 @@ pars_info_create(void)
info->heap = heap; info->heap = heap;
info->funcs = NULL; info->funcs = NULL;
info->bound_lits = NULL; info->bound_lits = NULL;
info->bound_ids = NULL;
info->graph_owns_us = TRUE; info->graph_owns_us = TRUE;
return(info); return(info);
...@@ -2070,6 +2071,32 @@ pars_info_add_function( ...@@ -2070,6 +2071,32 @@ pars_info_add_function(
ib_vector_push(info->funcs, puf); ib_vector_push(info->funcs, puf);
} }
/********************************************************************
Add bound id. */
void
pars_info_add_id(
/*=============*/
pars_info_t* info, /* in: info struct */
const char* name, /* in: name */
const char* id) /* in: id */
{
pars_bound_id_t* bid;
ut_ad(!pars_info_get_bound_id(info, name));
bid = mem_heap_alloc(info->heap, sizeof(*bid));
bid->name = name;
bid->id = id;
if (!info->bound_ids) {
info->bound_ids = ib_vector_create(info->heap, 8);
}
ib_vector_push(info->bound_ids, bid);
}
/******************************************************************** /********************************************************************
Get user function with the given name.*/ Get user function with the given name.*/
...@@ -2131,3 +2158,34 @@ pars_info_get_bound_lit( ...@@ -2131,3 +2158,34 @@ pars_info_get_bound_lit(
return(NULL); return(NULL);
} }
/********************************************************************
Get bound id with the given name.*/
pars_bound_id_t*
pars_info_get_bound_id(
/*===================*/
/* out: bound id, or NULL if not
found */
pars_info_t* info, /* in: info struct */
const char* name) /* in: bound id name to find */
{
ulint i;
ib_vector_t* vec;
if (!info || !info->bound_ids) {
return(NULL);
}
vec = info->bound_ids;
for (i = 0; i < ib_vector_size(vec); i++) {
pars_bound_id_t* bid = ib_vector_get(vec, i);
if (strcmp(bid->name, name) == 0) {
return(bid);
}
}
return(NULL);
}
...@@ -304,3 +304,42 @@ sym_tab_add_id( ...@@ -304,3 +304,42 @@ sym_tab_add_id(
return(node); return(node);
} }
/**********************************************************************
Add a bound identifier to a symbol table. */
sym_node_t*
sym_tab_add_bound_id(
/*===========*/
/* out: symbol table node */
sym_tab_t* sym_tab, /* in: symbol table */
const char* name) /* in: name of bound id */
{
sym_node_t* node;
pars_bound_id_t* bid;
bid = pars_info_get_bound_id(sym_tab->info, name);
ut_a(bid);
node = mem_heap_alloc(sym_tab->heap, sizeof(sym_node_t));
node->common.type = QUE_NODE_SYMBOL;
node->resolved = FALSE;
node->indirection = NULL;
node->name = mem_heap_strdup(sym_tab->heap, bid->id);
node->name_len = strlen(node->name);
UT_LIST_ADD_LAST(sym_list, sym_tab->sym_list, node);
dfield_set_data(&(node->common.val), NULL, UNIV_SQL_NULL);
node->common.val_buf_size = 0;
node->prefetch_buf = NULL;
node->cursor_def = NULL;
node->sym_table = sym_tab;
return(node);
}
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