Commit 5ea7253f authored by osku's avatar osku

Enhance InnoDB SQL parser:

 Add support for NOT NULL in column definitions.

 Support INTEGER as an alias for INT.

 Add pars/make_bison.sh to automate parser generation.
parent 490dbe09
...@@ -343,8 +343,10 @@ pars_column_def( ...@@ -343,8 +343,10 @@ pars_column_def(
sym_node_t* sym_node, /* in: column node in the sym_node_t* sym_node, /* in: column node in the
symbol table */ symbol table */
pars_res_word_t* type, /* in: data type */ pars_res_word_t* type, /* in: data type */
sym_node_t* len); /* in: length of column, or sym_node_t* len, /* in: length of column, or
NULL */ NULL */
void* is_not_null); /* in: if not NULL, column
is of type NOT NULL. */
/************************************************************************* /*************************************************************************
Parses a table creation operation. */ Parses a table creation operation. */
......
#!/bin/bash
#
# regenerate parser from bison input files as documented at the top of
# pars0lex.l.
set -eu
bison -d pars0grm.y
mv pars0grm.tab.c pars0grm.c
mv pars0grm.tab.h pars0grm.h
cp pars0grm.h ../include
...@@ -385,16 +385,16 @@ union yyalloc ...@@ -385,16 +385,16 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */ /* YYFINAL -- State number of the termination state. */
#define YYFINAL 95 #define YYFINAL 95
/* YYLAST -- Last index in YYTABLE. */ /* YYLAST -- Last index in YYTABLE. */
#define YYLAST 711 #define YYLAST 734
/* YYNTOKENS -- Number of terminals. */ /* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 104 #define YYNTOKENS 104
/* YYNNTS -- Number of nonterminals. */ /* YYNNTS -- Number of nonterminals. */
#define YYNNTS 63 #define YYNNTS 64
/* YYNRULES -- Number of rules. */ /* YYNRULES -- Number of rules. */
#define YYNRULES 161 #define YYNRULES 164
/* YYNRULES -- Number of states. */ /* YYNRULES -- Number of states. */
#define YYNSTATES 317 #define YYNSTATES 321
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2 #define YYUNDEFTOK 2
...@@ -460,23 +460,23 @@ static const unsigned short int yyprhs[] = ...@@ -460,23 +460,23 @@ static const unsigned short int yyprhs[] =
261, 264, 265, 268, 269, 271, 273, 274, 279, 288, 261, 264, 265, 268, 269, 271, 273, 274, 279, 288,
292, 298, 301, 305, 307, 311, 316, 321, 324, 327, 292, 298, 301, 305, 307, 311, 316, 321, 324, 327,
331, 334, 337, 340, 344, 349, 351, 354, 355, 358, 331, 334, 337, 340, 344, 349, 351, 354, 355, 358,
360, 368, 375, 386, 388, 391, 394, 399, 403, 405, 360, 368, 375, 386, 388, 391, 394, 399, 404, 406,
409, 410, 414, 415, 417, 425, 427, 431, 432, 434, 410, 411, 415, 416, 419, 420, 422, 430, 432, 436,
435, 437, 448, 451, 454, 456, 458, 460, 462, 466, 437, 439, 440, 442, 453, 456, 459, 461, 463, 465,
470, 471, 473, 477, 481, 482, 484, 487, 494, 495, 467, 469, 473, 477, 478, 480, 484, 488, 489, 491,
497, 500 494, 501, 502, 504, 507
}; };
/* YYRHS -- A `-1'-separated list of the rules' RHS. */ /* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const short int yyrhs[] = static const short int yyrhs[] =
{ {
105, 0, -1, 166, 97, -1, 110, -1, 111, 97, 105, 0, -1, 167, 97, -1, 110, -1, 111, 97,
-1, 142, 97, -1, 143, 97, -1, 141, 97, -1, -1, 142, 97, -1, 143, 97, -1, 141, 97, -1,
144, 97, -1, 137, 97, -1, 124, 97, -1, 126, 144, 97, -1, 137, 97, -1, 124, 97, -1, 126,
97, -1, 136, 97, -1, 134, 97, -1, 135, 97, 97, -1, 136, 97, -1, 134, 97, -1, 135, 97,
-1, 131, 97, -1, 132, 97, -1, 145, 97, -1, -1, 131, 97, -1, 132, 97, -1, 145, 97, -1,
147, 97, -1, 146, 97, -1, 157, 97, -1, 158, 147, 97, -1, 146, 97, -1, 158, 97, -1, 159,
97, -1, 152, 97, -1, 156, 97, -1, 105, -1, 97, -1, 153, 97, -1, 157, 97, -1, 105, -1,
106, 105, -1, 7, -1, 108, 98, 115, 99, -1, 106, 105, -1, 7, -1, 108, 98, 115, 99, -1,
3, -1, 4, -1, 5, -1, 6, -1, 65, -1, 3, -1, 4, -1, 5, -1, 6, -1, 65, -1,
107, 92, 107, -1, 107, 91, 107, -1, 107, 93, 107, 92, 107, -1, 107, 91, 107, -1, 107, 93,
...@@ -510,18 +510,18 @@ static const short int yyrhs[] = ...@@ -510,18 +510,18 @@ static const short int yyrhs[] =
30, 106, 25, 30, -1, 39, 7, 15, 107, 40, 30, 106, 25, 30, -1, 39, 7, 15, 107, 40,
107, 30, 106, 25, 30, -1, 32, -1, 66, 7, 107, 30, 106, 25, 30, -1, 32, -1, 66, 7,
-1, 68, 7, -1, 67, 7, 48, 114, -1, 7, -1, 68, 7, -1, 67, 7, 48, 114, -1, 7,
159, 150, -1, 148, -1, 149, 101, 148, -1, -1, 160, 150, 151, -1, 148, -1, 149, 101, 148, -1,
98, 3, 99, -1, -1, 60, -1, 55, 56, 7, -1, 98, 3, 99, -1, -1, 10, 6, -1, -1,
98, 149, 99, 151, -1, 7, -1, 153, 101, 7, 60, -1, 55, 56, 7, 98, 149, 99, 152, -1,
-1, -1, 58, -1, -1, 59, -1, 55, 154, 155, 7, -1, 154, 101, 7, -1, -1, 58, -1, -1,
57, 7, 61, 7, 98, 153, 99, -1, 85, 87, 59, -1, 55, 155, 156, 57, 7, 61, 7, 98,
-1, 86, 87, -1, 19, -1, 22, -1, 17, -1, 154, 99, -1, 85, 87, -1, 86, 87, -1, 19,
18, -1, 7, 15, 159, -1, 7, 16, 159, -1, -1, 20, -1, 22, -1, 17, -1, 18, -1, 7,
-1, 160, -1, 161, 101, 160, -1, 7, 159, 97, 15, 160, -1, 7, 16, 160, -1, -1, 161, -1,
-1, -1, 162, -1, 163, 162, -1, 63, 64, 7, 162, 101, 161, -1, 7, 160, 97, -1, -1, 163,
23, 124, 97, -1, -1, 164, -1, 165, 164, -1, -1, 164, 163, -1, 63, 64, 7, 23, 124, 97,
14, 7, 98, 161, 99, 23, 163, 165, 24, 106, -1, -1, 165, -1, 166, 165, -1, 14, 7, 98,
25, -1 162, 99, 23, 164, 166, 24, 106, 25, -1
}; };
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
...@@ -540,10 +540,10 @@ static const unsigned short int yyrline[] = ...@@ -540,10 +540,10 @@ static const unsigned short int yyrline[] =
326, 328, 333, 337, 338, 343, 349, 356, 361, 366, 326, 328, 333, 337, 338, 343, 349, 356, 361, 366,
372, 377, 382, 387, 392, 398, 399, 404, 405, 407, 372, 377, 382, 387, 392, 398, 399, 404, 405, 407,
411, 418, 424, 432, 436, 442, 448, 453, 458, 459, 411, 418, 424, 432, 436, 442, 448, 453, 458, 459,
464, 465, 469, 470, 476, 482, 483, 488, 489, 493, 464, 465, 470, 471, 477, 478, 484, 490, 491, 496,
494, 498, 506, 511, 516, 517, 518, 519, 523, 526, 497, 501, 502, 506, 514, 519, 524, 525, 526, 527,
532, 533, 534, 539, 543, 545, 546, 550, 555, 557, 528, 532, 535, 541, 542, 543, 548, 552, 554, 555,
558, 562 559, 564, 566, 567, 571
}; };
#endif #endif
...@@ -596,12 +596,13 @@ static const char *const yytname[] = ...@@ -596,12 +596,13 @@ static const char *const yytname[] =
"assignment_statement", "elsif_element", "elsif_list", "else_part", "assignment_statement", "elsif_element", "elsif_list", "else_part",
"if_statement", "while_statement", "for_statement", "return_statement", "if_statement", "while_statement", "for_statement", "return_statement",
"open_cursor_statement", "close_cursor_statement", "fetch_statement", "open_cursor_statement", "close_cursor_statement", "fetch_statement",
"column_def", "column_def_list", "opt_column_len", "not_fit_in_memory", "column_def", "column_def_list", "opt_column_len", "opt_not_null",
"create_table", "column_list", "unique_def", "clustered_def", "not_fit_in_memory", "create_table", "column_list", "unique_def",
"create_index", "commit_statement", "rollback_statement", "type_name", "clustered_def", "create_index", "commit_statement",
"parameter_declaration", "parameter_declaration_list", "rollback_statement", "type_name", "parameter_declaration",
"variable_declaration", "variable_declaration_list", "parameter_declaration_list", "variable_declaration",
"cursor_declaration", "declaration_list", "procedure_definition", 0 "variable_declaration_list", "cursor_declaration", "declaration_list",
"procedure_definition", 0
}; };
#endif #endif
...@@ -640,10 +641,10 @@ static const unsigned char yyr1[] = ...@@ -640,10 +641,10 @@ static const unsigned char yyr1[] =
126, 126, 127, 128, 128, 129, 130, 131, 132, 133, 126, 126, 127, 128, 128, 129, 130, 131, 132, 133,
134, 135, 136, 137, 138, 139, 139, 140, 140, 140, 134, 135, 136, 137, 138, 139, 139, 140, 140, 140,
141, 142, 143, 144, 145, 146, 147, 148, 149, 149, 141, 142, 143, 144, 145, 146, 147, 148, 149, 149,
150, 150, 151, 151, 152, 153, 153, 154, 154, 155, 150, 150, 151, 151, 152, 152, 153, 154, 154, 155,
155, 156, 157, 158, 159, 159, 159, 159, 160, 160, 155, 156, 156, 157, 158, 159, 160, 160, 160, 160,
161, 161, 161, 162, 163, 163, 163, 164, 165, 165, 160, 161, 161, 162, 162, 162, 163, 164, 164, 164,
165, 166 165, 166, 166, 166, 167
}; };
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
...@@ -661,11 +662,11 @@ static const unsigned char yyr2[] = ...@@ -661,11 +662,11 @@ static const unsigned char yyr2[] =
2, 0, 2, 0, 1, 1, 0, 4, 8, 3, 2, 0, 2, 0, 1, 1, 0, 4, 8, 3,
5, 2, 3, 1, 3, 4, 4, 2, 2, 3, 5, 2, 3, 1, 3, 4, 4, 2, 2, 3,
2, 2, 2, 3, 4, 1, 2, 0, 2, 1, 2, 2, 2, 3, 4, 1, 2, 0, 2, 1,
7, 6, 10, 1, 2, 2, 4, 3, 1, 3, 7, 6, 10, 1, 2, 2, 4, 4, 1, 3,
0, 3, 0, 1, 7, 1, 3, 0, 1, 0, 0, 3, 0, 2, 0, 1, 7, 1, 3, 0,
1, 10, 2, 2, 1, 1, 1, 1, 3, 3, 1, 0, 1, 10, 2, 2, 1, 1, 1, 1,
0, 1, 3, 3, 0, 1, 2, 6, 0, 1, 1, 3, 3, 0, 1, 3, 3, 0, 1, 2,
2, 11 6, 0, 1, 2, 11
}; };
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
...@@ -674,22 +675,22 @@ static const unsigned char yyr2[] = ...@@ -674,22 +675,22 @@ static const unsigned char yyr2[] =
static const unsigned char yydefact[] = static const unsigned char yydefact[] =
{ {
0, 0, 0, 0, 0, 123, 81, 0, 0, 0, 0, 0, 0, 0, 0, 123, 81, 0, 0, 0,
0, 137, 0, 0, 0, 66, 67, 68, 0, 0, 0, 139, 0, 0, 0, 66, 67, 68, 0, 0,
0, 0, 0, 3, 0, 0, 0, 0, 0, 87, 0, 0, 0, 3, 0, 0, 0, 0, 0, 87,
0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 28, 29, 30, 31, 26, 0, 32, 50, 51, 0, 28, 29, 30, 31, 26, 0, 32, 50, 51,
52, 53, 54, 55, 56, 57, 58, 59, 60, 0, 52, 53, 54, 55, 56, 57, 58, 59, 60, 0,
0, 0, 0, 0, 0, 0, 84, 77, 82, 86, 0, 0, 0, 0, 0, 0, 84, 77, 82, 86,
0, 0, 0, 0, 0, 0, 138, 139, 124, 0, 0, 0, 0, 0, 0, 0, 140, 141, 124, 0,
125, 112, 142, 143, 0, 1, 4, 74, 10, 0, 125, 112, 144, 145, 0, 1, 4, 74, 10, 0,
101, 11, 0, 107, 108, 15, 16, 110, 111, 13, 101, 11, 0, 107, 108, 15, 16, 110, 111, 13,
14, 12, 9, 7, 5, 6, 8, 17, 19, 18, 14, 12, 9, 7, 5, 6, 8, 17, 19, 18,
22, 23, 20, 21, 2, 113, 150, 0, 47, 0, 22, 23, 20, 21, 2, 113, 153, 0, 47, 0,
37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 74, 0, 0, 0, 71, 0, 0, 0, 0, 0, 74, 0, 0, 0, 71,
0, 0, 0, 99, 0, 109, 0, 140, 0, 71, 0, 0, 0, 99, 0, 109, 0, 142, 0, 71,
61, 75, 0, 74, 0, 88, 0, 151, 0, 48, 61, 75, 0, 74, 0, 88, 0, 154, 0, 48,
49, 38, 45, 46, 42, 43, 44, 24, 117, 39, 49, 38, 45, 46, 42, 43, 44, 24, 117, 39,
40, 41, 34, 33, 35, 36, 0, 0, 0, 0, 40, 41, 34, 33, 35, 36, 0, 0, 0, 0,
0, 72, 85, 83, 69, 87, 0, 0, 103, 106, 0, 72, 85, 83, 69, 87, 0, 0, 103, 106,
...@@ -697,77 +698,79 @@ static const unsigned char yydefact[] = ...@@ -697,77 +698,79 @@ static const unsigned char yydefact[] =
0, 0, 0, 0, 0, 25, 115, 119, 0, 27, 0, 0, 0, 0, 0, 25, 115, 119, 0, 27,
0, 80, 0, 78, 0, 0, 0, 89, 0, 0, 0, 80, 0, 78, 0, 0, 0, 89, 0, 0,
0, 0, 128, 0, 0, 0, 0, 76, 100, 105, 0, 0, 128, 0, 0, 0, 0, 76, 100, 105,
146, 147, 144, 145, 148, 149, 154, 152, 118, 0, 149, 150, 146, 147, 148, 151, 152, 157, 155, 118,
116, 0, 121, 79, 73, 70, 0, 91, 0, 102, 0, 116, 0, 121, 79, 73, 70, 0, 91, 0,
104, 130, 132, 0, 0, 64, 63, 0, 155, 158, 102, 104, 130, 134, 0, 0, 64, 63, 0, 158,
0, 120, 90, 0, 96, 0, 0, 127, 133, 134, 161, 0, 120, 90, 0, 96, 0, 0, 132, 135,
129, 0, 0, 0, 156, 159, 0, 114, 92, 0, 136, 129, 0, 0, 0, 159, 162, 0, 114, 92,
98, 0, 0, 0, 153, 0, 0, 160, 0, 0, 0, 98, 0, 0, 0, 127, 0, 156, 0, 0,
131, 135, 0, 0, 0, 93, 122, 141, 0, 0, 163, 0, 0, 131, 133, 137, 0, 0, 0, 93,
161, 94, 95, 97, 136, 0, 157 122, 143, 0, 0, 164, 94, 95, 97, 138, 0,
160
}; };
/* YYDEFGOTO[NTERM-NUM]. */ /* YYDEFGOTO[NTERM-NUM]. */
static const short int yydefgoto[] = static const short int yydefgoto[] =
{ {
-1, 177, 178, 161, 72, 204, 23, 24, 25, 195, -1, 177, 178, 161, 72, 204, 23, 24, 25, 195,
192, 162, 78, 79, 80, 103, 257, 274, 313, 290, 192, 162, 78, 79, 80, 103, 258, 275, 317, 291,
26, 27, 28, 198, 199, 104, 29, 30, 31, 32, 26, 27, 28, 198, 199, 104, 29, 30, 31, 32,
33, 34, 35, 36, 216, 217, 218, 37, 38, 39, 33, 34, 35, 36, 216, 217, 218, 37, 38, 39,
40, 41, 42, 43, 232, 233, 277, 279, 44, 302, 40, 41, 42, 43, 232, 233, 278, 295, 280, 44,
87, 158, 45, 46, 47, 244, 167, 168, 268, 269, 306, 87, 158, 45, 46, 47, 245, 167, 168, 269,
285, 286, 48 270, 286, 287, 48
}; };
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */ STATE-NUM. */
#define YYPACT_NINF -197 #define YYPACT_NINF -205
static const short int yypact[] = static const short int yypact[] =
{ {
466, -49, 47, 533, 533, -197, 26, 49, 9, 51, 454, -48, 30, 521, 521, -205, 12, 42, -18, 46,
22, -39, 55, 56, 59, -197, -197, -197, 34, -14, -4, -33, 67, 69, 71, -205, -205, -205, 47, -8,
-12, 67, 76, -197, -20, -19, -16, -11, -15, 40, -6, 85, 93, -205, 1, -2, 2, -20, 3, 59,
-5, -3, 40, -2, 10, 13, 16, 21, 23, 24, 5, 7, 59, 24, 27, 28, 31, 32, 33, 39,
25, 28, 29, 30, 31, 32, 33, 39, 50, 533, 50, 51, 55, 56, 57, 58, 60, 62, 63, 521,
-18, -197, -197, -197, -197, 27, 533, 48, -197, -197, 22, -205, -205, -205, -205, 48, 521, 65, -205, -205,
-197, -197, -197, -197, -197, -197, -197, -197, -197, 533, -205, -205, -205, -205, -205, -205, -205, -205, -205, 521,
533, 552, 8, 264, 54, 57, -197, 588, -197, -36, 521, 252, 64, 576, 66, 68, -205, 640, -205, -40,
46, 78, 141, 102, 147, 149, -197, 98, -197, 111, 86, 111, 120, 105, 156, 161, -205, 110, -205, 122,
-197, -197, -197, -197, 62, -197, -197, 533, -197, 63, -205, -205, -205, -205, 73, -205, -205, 521, -205, 74,
-197, -197, 504, -197, -197, -197, -197, -197, -197, -197, -205, -205, 492, -205, -205, -205, -205, -205, -205, -205,
-197, -197, -197, -197, -197, -197, -197, -197, -197, -197, -205, -205, -205, -205, -205, -205, -205, -205, -205, -205,
-197, -197, -197, -197, -197, 588, 155, 94, 378, 95, -205, -205, -205, -205, -205, 640, 167, 106, 309, 107,
153, 103, 533, 533, 533, 533, 533, 466, 533, 533, 168, 23, 521, 521, 521, 521, 521, 454, 521, 521,
533, 533, 533, 533, 533, 533, 466, 533, -21, 161, 521, 521, 521, 521, 521, 521, 454, 521, -27, 178,
235, 162, 533, -197, 163, -197, 74, -197, 116, 161, 204, 179, 521, -205, 181, -205, 91, -205, 134, 178,
75, 588, -81, 533, 120, 588, 11, -197, -62, -197, 92, 640, -75, 521, 139, 640, 29, -205, -59, -205,
-197, -197, 378, 378, -7, -7, 588, -197, 151, -7, -205, -205, 309, 309, 15, 15, 640, -205, 151, 15,
-7, -7, -4, -4, 153, 153, -59, 296, 248, 169, 15, 15, 25, 25, 168, 168, -58, 284, 535, 187,
82, -197, 84, -197, -197, -31, 580, 100, -197, 85, 96, -205, 95, -205, -205, -31, 568, 109, -205, 98,
182, 192, 84, -197, -58, -197, 533, -55, 193, 6, 193, 195, 95, -205, -49, -205, 521, -45, 197, 40,
6, 181, 155, 466, 533, -197, -197, 178, 183, -197, 40, 189, 167, 454, 521, -205, -205, 186, 191, -205,
179, -197, 112, -197, 203, 533, 205, 175, 533, 533, 190, -205, 123, -205, 214, 521, 216, 194, 521, 521,
163, 6, -197, -54, 154, 113, 121, 588, -197, -197, 181, 40, -205, -36, 164, 126, 130, 640, -205, -205,
-197, -197, -197, -197, -197, -197, 213, -197, 466, 610, -205, -205, -205, -205, -205, -205, -205, 227, -205, 454,
-197, 196, -197, -197, -197, -197, 173, 184, 617, 588, 605, -205, 215, -205, -205, -205, -205, 192, 199, 633,
-197, 131, 170, 182, 226, -197, -197, 6, -197, 1, 640, -205, 145, 184, 193, 238, -205, -205, 40, -205,
466, -197, -197, 201, 191, 466, 241, -197, -197, -197, 4, 454, -205, -205, 205, 203, 454, 245, 240, -205,
-197, 148, 150, 185, -197, -197, -13, 466, -197, 206, -205, -205, 153, 155, 198, -205, -205, -12, 454, -205,
-197, 353, 152, 245, -197, 247, 466, -197, 251, 225, 210, -205, 341, 157, 249, -205, 250, -205, 251, 454,
-197, -197, -50, 239, 410, 7, -197, -197, 256, 34, -205, 259, 229, -205, -205, -205, -26, 244, 398, 26,
-197, -197, -197, -197, -197, 167, -197 -205, -205, 261, 47, -205, -205, -205, -205, -205, 173,
-205
}; };
/* YYPGOTO[NTERM-NUM]. */ /* YYPGOTO[NTERM-NUM]. */
static const short int yypgoto[] = static const short int yypgoto[] =
{ {
-197, 0, -125, -1, -197, -197, -197, -197, -197, -197, -205, 0, -126, -1, -205, -205, -205, -205, -205, -205,
106, -129, 117, -197, -197, -28, -197, -197, -197, -197, 112, -124, 135, -205, -205, -28, -205, -205, -205, -205,
-17, -197, -197, 36, -197, 236, -197, -197, -197, -197, -17, -205, -205, 43, -205, 257, -205, -205, -205, -205,
-197, -197, -197, -197, 61, -197, -197, -197, -197, -197, -205, -205, -205, -205, 76, -205, -205, -205, -205, -205,
-197, -197, -197, -197, 17, -197, -197, -197, -197, -197, -205, -205, -205, -205, 8, -205, -205, -205, -205, -205,
-197, -197, -197, -197, -197, -196, 69, -197, 2, -197, -205, -205, -205, -205, -205, -205, -204, 72, -205, 20,
3, -197, -197 -205, 10, -205, -205
}; };
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
...@@ -777,154 +780,158 @@ static const short int yypgoto[] = ...@@ -777,154 +780,158 @@ static const short int yypgoto[] =
#define YYTABLE_NINF -1 #define YYTABLE_NINF -1
static const unsigned short int yytable[] = static const unsigned short int yytable[] =
{ {
22, 91, 71, 73, 107, 77, 136, 225, 267, 136, 22, 91, 71, 73, 107, 77, 246, 225, 149, 189,
100, 296, 149, 49, 245, 189, 186, 85, 205, 86, 100, 268, 299, 6, 49, 51, 52, 53, 54, 55,
206, 187, 6, 240, 241, 242, 209, 210, 243, 51, 187, 186, 56, 85, 205, 86, 206, 262, 136, 99,
52, 53, 54, 55, 207, 261, 56, 211, 99, 212, 82, 132, 133, 84, 134, 135, 136, 50, 136, 207,
219, 235, 206, 236, 238, 262, 206, 263, 125, 307, 211, 219, 212, 206, 209, 210, 74, 75, 125, 81,
283, 308, 311, 312, 50, 128, 81, 82, 83, 84, 235, 284, 236, 83, 238, 128, 206, 240, 241, 242,
74, 75, 88, 89, 283, 150, 90, 6, 130, 131, 243, 150, 244, 263, 283, 264, 190, 284, 130, 131,
226, 282, 190, 92, 94, 93, 95, 96, 102, 97, 226, 315, 316, 311, 88, 312, 89, 57, 90, 92,
126, 98, 101, 151, 141, 142, 143, 144, 248, 143, 6, 93, 58, 59, 60, 61, 62, 249, 63, 64,
144, 57, 105, 152, 106, 109, 58, 59, 60, 61, 65, 66, 94, 95, 67, 68, 97, 102, 96, 98,
62, 165, 63, 64, 65, 66, 145, 110, 67, 68, 101, 165, 105, 69, 106, 76, 141, 142, 143, 144,
111, 132, 133, 112, 134, 135, 136, 69, 113, 76, 70, 138, 139, 140, 141, 142, 143, 144, 143, 144,
114, 115, 116, 127, 70, 117, 118, 119, 120, 121, 126, 109, 171, 151, 110, 111, 152, 153, 112, 113,
122, 172, 173, 174, 175, 176, 123, 179, 180, 181, 114, 172, 173, 174, 175, 176, 115, 179, 180, 181,
182, 183, 184, 185, 129, 287, 188, 124, 153, 77, 182, 183, 184, 185, 127, 288, 188, 116, 117, 77,
291, 196, 147, 154, 155, 148, 156, 157, 1, 159, 292, 196, 118, 119, 120, 121, 154, 122, 1, 123,
160, 163, 166, 169, 170, 2, 136, 227, 191, 194, 124, 129, 145, 155, 147, 2, 148, 227, 156, 157,
197, 304, 200, 201, 208, 203, 222, 3, 215, 213, 159, 160, 163, 308, 166, 169, 170, 3, 215, 213,
214, 223, 4, 5, 6, 224, 230, 215, 229, 231, 214, 136, 4, 5, 6, 191, 194, 215, 197, 200,
7, 138, 139, 140, 141, 142, 143, 144, 8, 234, 7, 201, 203, 208, 222, 223, 224, 229, 8, 230,
239, 9, 171, 10, 246, 237, 11, 214, 251, 252, 231, 9, 234, 10, 239, 237, 11, 51, 52, 53,
254, 253, 255, 249, 256, 264, 265, 12, 13, 14, 54, 55, 247, 250, 56, 214, 252, 12, 13, 14,
267, 266, 271, 272, 165, 273, 15, 258, 259, 276, 253, 255, 254, 256, 165, 265, 15, 259, 260, 266,
278, 16, 17, 281, 289, 18, 19, 20, 51, 52, 267, 16, 17, 257, 268, 18, 19, 20, 74, 75,
53, 54, 55, 288, 292, 56, 293, 294, 215, 295, 274, 272, 273, 277, 279, 282, 290, 289, 293, 215,
298, 300, 301, 21, 303, 306, 132, 133, 305, 134, 294, 296, 297, 21, 301, 304, 303, 305, 307, 310,
135, 136, 309, 314, 316, 202, 260, 193, 108, 74, 132, 133, 298, 134, 135, 136, 309, 313, 318, 57,
75, 284, 132, 133, 0, 134, 135, 136, 250, 0, 320, 202, 281, 261, 58, 59, 60, 61, 62, 137,
280, 247, 0, 0, 0, 0, 0, 215, 0, 297, 63, 64, 65, 66, 248, 193, 67, 68, 215, 108,
0, 215, 315, 0, 146, 0, 0, 0, 0, 0, 285, 1, 215, 251, 0, 69, 319, 300, 2, 0,
57, 0, 0, 1, 215, 58, 59, 60, 61, 62, 0, 0, 70, 0, 0, 0, 0, 0, 215, 220,
2, 63, 64, 65, 66, 0, 0, 67, 68, 0, 3, 0, 0, 0, 0, 4, 5, 6, 0, 0,
0, 220, 3, 0, 0, 0, 69, 4, 5, 6, 134, 135, 136, 7, 0, 0, 0, 0, 0, 0,
0, 0, 0, 70, 0, 7, 138, 139, 140, 141, 0, 8, 0, 0, 9, 0, 10, 0, 0, 11,
142, 143, 144, 8, 0, 0, 9, 221, 10, 0, 138, 139, 140, 141, 142, 143, 144, 0, 1, 0,
0, 11, 138, 139, 140, 141, 142, 143, 144, 0, 12, 13, 14, 0, 0, 2, 0, 0, 0, 15,
1, 0, 12, 13, 14, 0, 0, 2, 0, 0, 0, 0, 0, 0, 16, 17, 302, 3, 18, 19,
0, 15, 0, 0, 0, 0, 16, 17, 299, 3, 20, 0, 4, 5, 6, 0, 0, 0, 0, 0,
18, 19, 20, 0, 4, 5, 6, 0, 0, 134, 7, 0, 0, 0, 0, 0, 21, 0, 8, 0,
135, 136, 7, 0, 0, 0, 0, 0, 21, 0, 0, 9, 0, 10, 0, 0, 11, 138, 139, 140,
8, 0, 0, 9, 0, 10, 0, 0, 11, 0, 141, 142, 143, 144, 0, 1, 0, 12, 13, 14,
0, 0, 0, 0, 0, 0, 0, 1, 0, 12, 0, 0, 2, 0, 0, 0, 15, 0, 0, 0,
13, 14, 0, 0, 2, 0, 0, 0, 15, 0, 0, 16, 17, 314, 3, 18, 19, 20, 0, 4,
0, 0, 0, 16, 17, 310, 3, 18, 19, 20, 5, 6, 0, 0, 0, 0, 0, 7, 0, 0,
0, 4, 5, 6, 0, 0, 0, 0, 0, 7, 0, 0, 0, 21, 0, 8, 0, 0, 9, 0,
0, 0, 0, 0, 0, 21, 0, 8, 0, 0, 10, 0, 0, 11, 0, 0, 0, 0, 0, 0,
9, 0, 10, 0, 0, 11, 138, 139, 140, 141, 0, 1, 0, 0, 12, 13, 14, 0, 2, 0,
142, 143, 144, 1, 0, 0, 12, 13, 14, 0, 0, 0, 0, 15, 0, 0, 0, 0, 16, 17,
2, 0, 0, 0, 0, 15, 0, 0, 0, 0, 3, 0, 18, 19, 20, 4, 5, 6, 0, 0,
16, 17, 3, 0, 18, 19, 20, 4, 5, 6, 0, 0, 0, 7, 0, 51, 52, 53, 54, 55,
0, 0, 0, 0, 0, 7, 0, 51, 52, 53, 21, 8, 56, 0, 9, 0, 10, 0, 0, 11,
54, 55, 21, 8, 56, 0, 9, 0, 10, 0,
0, 11, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 12, 13, 14, 0, 51, 52, 53, 54,
55, 15, 0, 56, 0, 0, 16, 17, 0, 0,
18, 19, 20, 0, 0, 0, 0, 164, 0, 0,
132, 133, 0, 134, 135, 136, 0, 0, 21, 57,
0, 0, 0, 0, 58, 59, 60, 61, 62, 137,
63, 64, 65, 66, 0, 0, 67, 68, 132, 133,
0, 134, 135, 136, 0, 69, 132, 133, 57, 134,
135, 136, 70, 58, 59, 60, 61, 62, 0, 63,
64, 65, 66, 0, 0, 67, 68, 0, 132, 133,
228, 134, 135, 136, 69, 132, 133, 0, 134, 135,
136, 70, 0, 0, 0, 0, 0, 270, 0, 0,
138, 139, 140, 141, 142, 143, 144, 275, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 138, 139, 12, 13, 14, 0, 51, 52, 53, 54, 55, 15,
140, 141, 142, 143, 144, 0, 138, 139, 140, 141, 0, 56, 0, 0, 16, 17, 0, 0, 18, 19,
142, 143, 144, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 132, 133, 164, 134, 135, 136, 0,
0, 0, 0, 0, 0, 0, 0, 0, 138, 139, 0, 0, 0, 0, 0, 0, 21, 57, 0, 0,
140, 141, 142, 143, 144, 138, 139, 140, 141, 142, 0, 0, 58, 59, 60, 61, 62, 0, 63, 64,
143, 144 65, 66, 0, 0, 67, 68, 132, 133, 0, 134,
135, 136, 0, 69, 132, 133, 57, 134, 135, 136,
70, 58, 59, 60, 61, 62, 0, 63, 64, 65,
66, 0, 0, 67, 68, 0, 146, 0, 228, 0,
0, 0, 69, 132, 133, 0, 134, 135, 136, 70,
0, 0, 0, 138, 139, 140, 141, 142, 143, 144,
0, 0, 271, 0, 221, 0, 0, 0, 0, 0,
0, 132, 133, 0, 134, 135, 136, 0, 132, 133,
0, 134, 135, 136, 0, 0, 138, 139, 140, 141,
142, 143, 144, 276, 138, 139, 140, 141, 142, 143,
144, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 138, 139, 140, 141, 142, 143, 144,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 138, 139, 140, 141, 142, 143, 144, 138, 139,
140, 141, 142, 143, 144
}; };
static const short int yycheck[] = static const short int yycheck[] =
{ {
0, 18, 3, 4, 32, 6, 13, 38, 7, 13, 0, 18, 3, 4, 32, 6, 210, 38, 48, 36,
27, 24, 48, 62, 210, 36, 145, 56, 99, 58, 27, 7, 24, 33, 62, 3, 4, 5, 6, 7,
101, 146, 33, 17, 18, 19, 15, 16, 22, 3, 146, 145, 10, 56, 99, 58, 101, 231, 13, 49,
4, 5, 6, 7, 163, 231, 10, 99, 49, 101, 48, 8, 9, 37, 11, 12, 13, 7, 13, 163,
99, 99, 101, 101, 99, 99, 101, 101, 49, 99, 99, 99, 101, 101, 15, 16, 34, 35, 49, 7,
63, 101, 45, 46, 7, 56, 7, 48, 7, 37, 99, 63, 101, 7, 99, 56, 101, 17, 18, 19,
34, 35, 7, 7, 63, 101, 7, 33, 69, 70, 20, 101, 22, 99, 268, 101, 93, 63, 69, 70,
101, 267, 93, 87, 7, 87, 0, 97, 38, 98, 101, 45, 46, 99, 7, 101, 7, 65, 7, 87,
98, 97, 97, 37, 91, 92, 93, 94, 213, 93, 33, 87, 70, 71, 72, 73, 74, 213, 76, 77,
94, 65, 97, 15, 97, 97, 70, 71, 72, 73, 78, 79, 7, 0, 82, 83, 98, 38, 97, 97,
74, 102, 76, 77, 78, 79, 98, 97, 82, 83, 97, 102, 97, 91, 97, 93, 91, 92, 93, 94,
97, 8, 9, 97, 11, 12, 13, 91, 97, 93, 98, 88, 89, 90, 91, 92, 93, 94, 93, 94,
97, 97, 97, 96, 98, 97, 97, 97, 97, 97, 98, 97, 99, 37, 97, 97, 15, 7, 97, 97,
97, 132, 133, 134, 135, 136, 97, 138, 139, 140, 97, 132, 133, 134, 135, 136, 97, 138, 139, 140,
141, 142, 143, 144, 96, 270, 147, 97, 7, 150, 141, 142, 143, 144, 96, 271, 147, 97, 97, 150,
275, 152, 98, 51, 7, 98, 7, 59, 7, 48, 276, 152, 97, 97, 97, 97, 51, 97, 7, 97,
98, 98, 7, 69, 69, 14, 13, 195, 7, 7, 97, 96, 98, 7, 98, 14, 98, 195, 7, 59,
7, 296, 98, 57, 54, 100, 7, 26, 178, 28, 48, 98, 98, 299, 7, 69, 69, 26, 178, 28,
29, 99, 31, 32, 33, 101, 101, 187, 88, 7, 29, 13, 31, 32, 33, 7, 7, 187, 7, 98,
39, 88, 89, 90, 91, 92, 93, 94, 47, 7, 39, 57, 100, 54, 7, 99, 101, 88, 47, 101,
7, 50, 99, 52, 23, 206, 55, 29, 25, 30, 7, 50, 7, 52, 7, 206, 55, 3, 4, 5,
7, 99, 7, 214, 39, 61, 103, 66, 67, 68, 6, 7, 23, 214, 10, 29, 25, 66, 67, 68,
7, 100, 26, 50, 225, 41, 75, 228, 229, 98, 30, 7, 99, 7, 225, 61, 75, 228, 229, 103,
60, 80, 81, 7, 43, 84, 85, 86, 3, 4, 100, 80, 81, 39, 7, 84, 85, 86, 34, 35,
5, 6, 7, 42, 3, 10, 98, 97, 248, 64, 41, 26, 50, 98, 60, 7, 43, 42, 3, 249,
44, 99, 7, 102, 7, 30, 8, 9, 7, 11, 10, 98, 97, 102, 44, 6, 99, 7, 7, 30,
12, 13, 23, 7, 97, 159, 230, 150, 32, 34, 8, 9, 64, 11, 12, 13, 7, 23, 7, 65,
35, 269, 8, 9, -1, 11, 12, 13, 217, -1, 97, 159, 264, 230, 70, 71, 72, 73, 74, 27,
263, 212, -1, -1, -1, -1, -1, 287, -1, 286, 76, 77, 78, 79, 212, 150, 82, 83, 288, 32,
-1, 291, 309, -1, 30, -1, -1, -1, -1, -1, 270, 7, 292, 217, -1, 91, 313, 287, 14, -1,
65, -1, -1, 7, 304, 70, 71, 72, 73, 74, -1, -1, 98, -1, -1, -1, -1, -1, 308, 25,
14, 76, 77, 78, 79, -1, -1, 82, 83, -1, 26, -1, -1, -1, -1, 31, 32, 33, -1, -1,
-1, 25, 26, -1, -1, -1, 91, 31, 32, 33, 11, 12, 13, 39, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 98, -1, 39, 88, 89, 90, 91, -1, 47, -1, -1, 50, -1, 52, -1, -1, 55,
92, 93, 94, 47, -1, -1, 50, 99, 52, -1, 88, 89, 90, 91, 92, 93, 94, -1, 7, -1,
-1, 55, 88, 89, 90, 91, 92, 93, 94, -1, 66, 67, 68, -1, -1, 14, -1, -1, -1, 75,
7, -1, 66, 67, 68, -1, -1, 14, -1, -1, -1, -1, -1, -1, 80, 81, 25, 26, 84, 85,
-1, 75, -1, -1, -1, -1, 80, 81, 25, 26, 86, -1, 31, 32, 33, -1, -1, -1, -1, -1,
84, 85, 86, -1, 31, 32, 33, -1, -1, 11, 39, -1, -1, -1, -1, -1, 102, -1, 47, -1,
12, 13, 39, -1, -1, -1, -1, -1, 102, -1, -1, 50, -1, 52, -1, -1, 55, 88, 89, 90,
47, -1, -1, 50, -1, 52, -1, -1, 55, -1, 91, 92, 93, 94, -1, 7, -1, 66, 67, 68,
-1, -1, -1, -1, -1, -1, -1, 7, -1, 66, -1, -1, 14, -1, -1, -1, 75, -1, -1, -1,
67, 68, -1, -1, 14, -1, -1, -1, 75, -1, -1, 80, 81, 25, 26, 84, 85, 86, -1, 31,
-1, -1, -1, 80, 81, 25, 26, 84, 85, 86, 32, 33, -1, -1, -1, -1, -1, 39, -1, -1,
-1, 31, 32, 33, -1, -1, -1, -1, -1, 39, -1, -1, -1, 102, -1, 47, -1, -1, 50, -1,
-1, -1, -1, -1, -1, 102, -1, 47, -1, -1, 52, -1, -1, 55, -1, -1, -1, -1, -1, -1,
50, -1, 52, -1, -1, 55, 88, 89, 90, 91, -1, 7, -1, -1, 66, 67, 68, -1, 14, -1,
92, 93, 94, 7, -1, -1, 66, 67, 68, -1, -1, -1, -1, 75, -1, -1, -1, -1, 80, 81,
14, -1, -1, -1, -1, 75, -1, -1, -1, -1, 26, -1, 84, 85, 86, 31, 32, 33, -1, -1,
80, 81, 26, -1, 84, 85, 86, 31, 32, 33, -1, -1, -1, 39, -1, 3, 4, 5, 6, 7,
-1, -1, -1, -1, -1, 39, -1, 3, 4, 5, 102, 47, 10, -1, 50, -1, 52, -1, -1, 55,
6, 7, 102, 47, 10, -1, 50, -1, 52, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 55, -1, -1, -1, -1, -1, -1, -1, -1, 66, 67, 68, -1, 3, 4, 5, 6, 7, 75,
-1, -1, 66, 67, 68, -1, 3, 4, 5, 6, -1, 10, -1, -1, 80, 81, -1, -1, 84, 85,
7, 75, -1, 10, -1, -1, 80, 81, -1, -1, 86, -1, -1, 8, 9, 53, 11, 12, 13, -1,
84, 85, 86, -1, -1, -1, -1, 53, -1, -1, -1, -1, -1, -1, -1, -1, 102, 65, -1, -1,
8, 9, -1, 11, 12, 13, -1, -1, 102, 65, -1, -1, 70, 71, 72, 73, 74, -1, 76, 77,
-1, -1, -1, -1, 70, 71, 72, 73, 74, 27, 78, 79, -1, -1, 82, 83, 8, 9, -1, 11,
76, 77, 78, 79, -1, -1, 82, 83, 8, 9, 12, 13, -1, 91, 8, 9, 65, 11, 12, 13,
-1, 11, 12, 13, -1, 91, 8, 9, 65, 11, 98, 70, 71, 72, 73, 74, -1, 76, 77, 78,
12, 13, 98, 70, 71, 72, 73, 74, -1, 76, 79, -1, -1, 82, 83, -1, 30, -1, 40, -1,
77, 78, 79, -1, -1, 82, 83, -1, 8, 9, -1, -1, 91, 8, 9, -1, 11, 12, 13, 98,
40, 11, 12, 13, 91, 8, 9, -1, 11, 12, -1, -1, -1, 88, 89, 90, 91, 92, 93, 94,
13, 98, -1, -1, -1, -1, -1, 27, -1, -1, -1, -1, 27, -1, 99, -1, -1, -1, -1, -1,
88, 89, 90, 91, 92, 93, 94, 30, -1, -1, -1, 8, 9, -1, 11, 12, 13, -1, 8, 9,
-1, 11, 12, 13, -1, -1, 88, 89, 90, 91,
92, 93, 94, 30, 88, 89, 90, 91, 92, 93,
94, -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, 88, 89, -1, -1, -1, 88, 89, 90, 91, 92, 93, 94,
90, 91, 92, 93, 94, -1, 88, 89, 90, 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
92, 93, 94, -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, 88, 89, -1, 88, 89, 90, 91, 92, 93, 94, 88, 89,
90, 91, 92, 93, 94, 88, 89, 90, 91, 92, 90, 91, 92, 93, 94
93, 94
}; };
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
...@@ -935,19 +942,19 @@ static const unsigned char yystos[] = ...@@ -935,19 +942,19 @@ static const unsigned char yystos[] =
52, 55, 66, 67, 68, 75, 80, 81, 84, 85, 52, 55, 66, 67, 68, 75, 80, 81, 84, 85,
86, 102, 105, 110, 111, 112, 124, 125, 126, 130, 86, 102, 105, 110, 111, 112, 124, 125, 126, 130,
131, 132, 133, 134, 135, 136, 137, 141, 142, 143, 131, 132, 133, 134, 135, 136, 137, 141, 142, 143,
144, 145, 146, 147, 152, 156, 157, 158, 166, 62, 144, 145, 146, 147, 153, 157, 158, 159, 167, 62,
7, 3, 4, 5, 6, 7, 10, 65, 70, 71, 7, 3, 4, 5, 6, 7, 10, 65, 70, 71,
72, 73, 74, 76, 77, 78, 79, 82, 83, 91, 72, 73, 74, 76, 77, 78, 79, 82, 83, 91,
98, 107, 108, 107, 34, 35, 93, 107, 116, 117, 98, 107, 108, 107, 34, 35, 93, 107, 116, 117,
118, 7, 48, 7, 37, 56, 58, 154, 7, 7, 118, 7, 48, 7, 37, 56, 58, 155, 7, 7,
7, 124, 87, 87, 7, 0, 97, 98, 97, 49, 7, 124, 87, 87, 7, 0, 97, 98, 97, 49,
124, 97, 38, 119, 129, 97, 97, 119, 129, 97, 124, 97, 38, 119, 129, 97, 97, 119, 129, 97,
97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
97, 97, 97, 97, 97, 107, 98, 96, 107, 96, 97, 97, 97, 97, 97, 107, 98, 96, 107, 96,
107, 107, 8, 9, 11, 12, 13, 27, 88, 89, 107, 107, 8, 9, 11, 12, 13, 27, 88, 89,
90, 91, 92, 93, 94, 98, 30, 98, 98, 48, 90, 91, 92, 93, 94, 98, 30, 98, 98, 48,
101, 37, 15, 7, 51, 7, 7, 59, 155, 48, 101, 37, 15, 7, 51, 7, 7, 59, 156, 48,
98, 107, 115, 98, 53, 107, 7, 160, 161, 69, 98, 107, 115, 98, 53, 107, 7, 161, 162, 69,
69, 99, 107, 107, 107, 107, 107, 105, 106, 107, 69, 99, 107, 107, 107, 107, 107, 105, 106, 107,
107, 107, 107, 107, 107, 107, 115, 106, 107, 36, 107, 107, 107, 107, 107, 107, 115, 106, 107, 36,
93, 7, 114, 116, 7, 113, 107, 7, 127, 128, 93, 7, 114, 116, 7, 113, 107, 7, 127, 128,
...@@ -955,14 +962,15 @@ static const unsigned char yystos[] = ...@@ -955,14 +962,15 @@ static const unsigned char yystos[] =
16, 99, 101, 28, 29, 105, 138, 139, 140, 99, 16, 99, 101, 28, 29, 105, 138, 139, 140, 99,
25, 99, 7, 99, 101, 38, 101, 119, 40, 88, 25, 99, 7, 99, 101, 38, 101, 119, 40, 88,
101, 7, 148, 149, 7, 99, 101, 107, 99, 7, 101, 7, 148, 149, 7, 99, 101, 107, 99, 7,
17, 18, 19, 22, 159, 159, 23, 160, 106, 107, 17, 18, 19, 20, 22, 160, 160, 23, 161, 106,
138, 25, 30, 99, 7, 7, 39, 120, 107, 107, 107, 138, 25, 30, 99, 7, 7, 39, 120, 107,
127, 159, 99, 101, 61, 103, 100, 7, 162, 163, 107, 127, 160, 99, 101, 61, 103, 100, 7, 163,
27, 26, 50, 41, 121, 30, 98, 150, 60, 151, 164, 27, 26, 50, 41, 121, 30, 98, 150, 60,
148, 7, 159, 63, 162, 164, 165, 106, 42, 43, 152, 148, 7, 160, 63, 163, 165, 166, 106, 42,
123, 106, 3, 98, 97, 64, 24, 164, 44, 25, 43, 123, 106, 3, 10, 151, 98, 97, 64, 24,
99, 7, 153, 7, 106, 7, 30, 99, 101, 23, 165, 44, 25, 99, 6, 7, 154, 7, 106, 7,
25, 45, 46, 122, 7, 124, 97 30, 99, 101, 23, 25, 45, 46, 122, 7, 124,
97
}; };
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
...@@ -2090,7 +2098,7 @@ yyreduce: ...@@ -2090,7 +2098,7 @@ yyreduce:
case 127: case 127:
#line 454 "pars0grm.y" #line 454 "pars0grm.y"
{ yyval = pars_column_def(yyvsp[-2], yyvsp[-1], yyvsp[0]); ;} { yyval = pars_column_def(yyvsp[-3], yyvsp[-2], yyvsp[-1], yyvsp[0]); ;}
break; break;
case 128: case 128:
...@@ -2114,125 +2122,141 @@ yyreduce: ...@@ -2114,125 +2122,141 @@ yyreduce:
break; break;
case 132: case 132:
#line 469 "pars0grm.y" #line 470 "pars0grm.y"
{ yyval = NULL; ;} { yyval = NULL; ;}
break; break;
case 133: case 133:
#line 471 "pars0grm.y" #line 472 "pars0grm.y"
{ yyval = &pars_int_token; { yyval = &pars_int_token;
/* pass any non-NULL pointer */ ;} /* pass any non-NULL pointer */ ;}
break; break;
case 134: case 134:
#line 478 "pars0grm.y" #line 477 "pars0grm.y"
{ yyval = pars_create_table(yyvsp[-4], yyvsp[-2], yyvsp[0]); ;} { yyval = NULL; ;}
break; break;
case 135: case 135:
#line 482 "pars0grm.y" #line 479 "pars0grm.y"
{ yyval = que_node_list_add_last(NULL, yyvsp[0]); ;} { yyval = &pars_int_token;
/* pass any non-NULL pointer */ ;}
break; break;
case 136: case 136:
#line 484 "pars0grm.y" #line 486 "pars0grm.y"
{ yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;} { yyval = pars_create_table(yyvsp[-4], yyvsp[-2], yyvsp[0]); ;}
break; break;
case 137: case 137:
#line 488 "pars0grm.y" #line 490 "pars0grm.y"
{ yyval = NULL; ;} { yyval = que_node_list_add_last(NULL, yyvsp[0]); ;}
break; break;
case 138: case 138:
#line 489 "pars0grm.y" #line 492 "pars0grm.y"
{ yyval = &pars_unique_token; ;} { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;}
break; break;
case 139: case 139:
#line 493 "pars0grm.y" #line 496 "pars0grm.y"
{ yyval = NULL; ;} { yyval = NULL; ;}
break; break;
case 140: case 140:
#line 494 "pars0grm.y" #line 497 "pars0grm.y"
{ yyval = &pars_clustered_token; ;} { yyval = &pars_unique_token; ;}
break; break;
case 141: case 141:
#line 501 "pars0grm.y"
{ yyval = NULL; ;}
break;
case 142:
#line 502 "pars0grm.y" #line 502 "pars0grm.y"
{ yyval = &pars_clustered_token; ;}
break;
case 143:
#line 510 "pars0grm.y"
{ yyval = pars_create_index(yyvsp[-8], yyvsp[-7], yyvsp[-5], yyvsp[-3], yyvsp[-1]); ;} { yyval = pars_create_index(yyvsp[-8], yyvsp[-7], yyvsp[-5], yyvsp[-3], yyvsp[-1]); ;}
break; break;
case 142: case 144:
#line 507 "pars0grm.y" #line 515 "pars0grm.y"
{ yyval = pars_commit_statement(); ;} { yyval = pars_commit_statement(); ;}
break; break;
case 143: case 145:
#line 512 "pars0grm.y" #line 520 "pars0grm.y"
{ yyval = pars_rollback_statement(); ;} { yyval = pars_rollback_statement(); ;}
break; break;
case 144: case 146:
#line 516 "pars0grm.y" #line 524 "pars0grm.y"
{ yyval = &pars_int_token; ;} { yyval = &pars_int_token; ;}
break; break;
case 145: case 147:
#line 517 "pars0grm.y" #line 525 "pars0grm.y"
{ yyval = &pars_int_token; ;}
break;
case 148:
#line 526 "pars0grm.y"
{ yyval = &pars_char_token; ;} { yyval = &pars_char_token; ;}
break; break;
case 146: case 149:
#line 518 "pars0grm.y" #line 527 "pars0grm.y"
{ yyval = &pars_binary_token; ;} { yyval = &pars_binary_token; ;}
break; break;
case 147: case 150:
#line 519 "pars0grm.y" #line 528 "pars0grm.y"
{ yyval = &pars_blob_token; ;} { yyval = &pars_blob_token; ;}
break; break;
case 148: case 151:
#line 524 "pars0grm.y" #line 533 "pars0grm.y"
{ yyval = pars_parameter_declaration(yyvsp[-2], { yyval = pars_parameter_declaration(yyvsp[-2],
PARS_INPUT, yyvsp[0]); ;} PARS_INPUT, yyvsp[0]); ;}
break; break;
case 149: case 152:
#line 527 "pars0grm.y" #line 536 "pars0grm.y"
{ yyval = pars_parameter_declaration(yyvsp[-2], { yyval = pars_parameter_declaration(yyvsp[-2],
PARS_OUTPUT, yyvsp[0]); ;} PARS_OUTPUT, yyvsp[0]); ;}
break; break;
case 150: case 153:
#line 532 "pars0grm.y" #line 541 "pars0grm.y"
{ yyval = NULL; ;} { yyval = NULL; ;}
break; break;
case 151: case 154:
#line 533 "pars0grm.y" #line 542 "pars0grm.y"
{ yyval = que_node_list_add_last(NULL, yyvsp[0]); ;} { yyval = que_node_list_add_last(NULL, yyvsp[0]); ;}
break; break;
case 152: case 155:
#line 535 "pars0grm.y" #line 544 "pars0grm.y"
{ yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;} { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;}
break; break;
case 153: case 156:
#line 540 "pars0grm.y" #line 549 "pars0grm.y"
{ yyval = pars_variable_declaration(yyvsp[-2], yyvsp[-1]); ;} { yyval = pars_variable_declaration(yyvsp[-2], yyvsp[-1]); ;}
break; break;
case 157: case 160:
#line 552 "pars0grm.y" #line 561 "pars0grm.y"
{ yyval = pars_cursor_declaration(yyvsp[-3], yyvsp[-1]); ;} { yyval = pars_cursor_declaration(yyvsp[-3], yyvsp[-1]); ;}
break; break;
case 161: case 164:
#line 568 "pars0grm.y" #line 577 "pars0grm.y"
{ yyval = pars_procedure_definition(yyvsp[-9], yyvsp[-7], { yyval = pars_procedure_definition(yyvsp[-9], yyvsp[-7],
yyvsp[-1]); ;} yyvsp[-1]); ;}
break; break;
...@@ -2241,7 +2265,7 @@ yyreduce: ...@@ -2241,7 +2265,7 @@ yyreduce:
} }
/* Line 1010 of yacc.c. */ /* Line 1010 of yacc.c. */
#line 2245 "pars0grm.tab.c" #line 2269 "pars0grm.tab.c"
yyvsp -= yylen; yyvsp -= yylen;
yyssp -= yylen; yyssp -= yylen;
...@@ -2466,6 +2490,6 @@ yyreturn: ...@@ -2466,6 +2490,6 @@ yyreturn:
} }
#line 572 "pars0grm.y" #line 581 "pars0grm.y"
...@@ -450,8 +450,8 @@ fetch_statement: ...@@ -450,8 +450,8 @@ fetch_statement:
; ;
column_def: column_def:
PARS_ID_TOKEN type_name opt_column_len PARS_ID_TOKEN type_name opt_column_len opt_not_null
{ $$ = pars_column_def($1, $2, $3); } { $$ = pars_column_def($1, $2, $3, $4); }
; ;
column_def_list: column_def_list:
...@@ -464,6 +464,14 @@ opt_column_len: ...@@ -464,6 +464,14 @@ opt_column_len:
/* Nothing */ { $$ = NULL; } /* Nothing */ { $$ = NULL; }
| '(' PARS_INT_LIT ')' | '(' PARS_INT_LIT ')'
{ $$ = $2; } { $$ = $2; }
;
opt_not_null:
/* Nothing */ { $$ = NULL; }
| PARS_NOT_TOKEN PARS_NULL_LIT
{ $$ = &pars_int_token;
/* pass any non-NULL pointer */ }
;
not_fit_in_memory: not_fit_in_memory:
/* Nothing */ { $$ = NULL; } /* Nothing */ { $$ = NULL; }
...@@ -514,6 +522,7 @@ rollback_statement: ...@@ -514,6 +522,7 @@ rollback_statement:
type_name: type_name:
PARS_INT_TOKEN { $$ = &pars_int_token; } PARS_INT_TOKEN { $$ = &pars_int_token; }
| PARS_INTEGER_TOKEN { $$ = &pars_int_token; }
| PARS_CHAR_TOKEN { $$ = &pars_char_token; } | PARS_CHAR_TOKEN { $$ = &pars_char_token; }
| PARS_BINARY_TOKEN { $$ = &pars_binary_token; } | PARS_BINARY_TOKEN { $$ = &pars_binary_token; }
| PARS_BLOB_TOKEN { $$ = &pars_blob_token; } | PARS_BLOB_TOKEN { $$ = &pars_blob_token; }
......
...@@ -1081,15 +1081,24 @@ void ...@@ -1081,15 +1081,24 @@ void
pars_set_dfield_type( pars_set_dfield_type(
/*=================*/ /*=================*/
dfield_t* dfield, /* in: dfield */ dfield_t* dfield, /* in: dfield */
pars_res_word_t* type, /* in: pointer to a type token */ pars_res_word_t* type, /* in: pointer to a type
ulint len) /* in: length, or 0 */ token */
ulint len, /* in: length, or 0 */
ibool is_not_null) /* in: if TRUE, column is
NOT NULL. */
{ {
ulint flags = 0;
if (is_not_null) {
flags |= DATA_NOT_NULL;
}
if (type == &pars_int_token) { if (type == &pars_int_token) {
if (len != 0) { if (len != 0) {
ut_error; ut_error;
} }
dtype_set(dfield_get_type(dfield), DATA_INT, 0, 4, 0); dtype_set(dfield_get_type(dfield), DATA_INT, flags, 4, 0);
} else if (type == &pars_char_token) { } else if (type == &pars_char_token) {
if (len != 0) { if (len != 0) {
...@@ -1097,7 +1106,21 @@ pars_set_dfield_type( ...@@ -1097,7 +1106,21 @@ pars_set_dfield_type(
} }
dtype_set(dfield_get_type(dfield), DATA_VARCHAR, dtype_set(dfield_get_type(dfield), DATA_VARCHAR,
DATA_ENGLISH, 0, 0); DATA_ENGLISH | flags, 0, 0);
} else if (type == &pars_binary_token) {
if (len == 0) {
ut_error;
}
dtype_set(dfield_get_type(dfield), DATA_FIXBINARY,
DATA_BINARY_TYPE | flags, len, 0);
} else if (type == &pars_blob_token) {
if (len != 0) {
ut_error;
}
dtype_set(dfield_get_type(dfield), DATA_BLOB,
DATA_BINARY_TYPE | flags, 0, 0);
} else if (type == &pars_binary_token) { } else if (type == &pars_binary_token) {
if (len == 0) { if (len == 0) {
ut_error; ut_error;
...@@ -1134,7 +1157,7 @@ pars_variable_declaration( ...@@ -1134,7 +1157,7 @@ pars_variable_declaration(
node->param_type = PARS_NOT_PARAM; node->param_type = PARS_NOT_PARAM;
pars_set_dfield_type(que_node_get_val(node), type, 0); pars_set_dfield_type(que_node_get_val(node), type, 0, FALSE);
return(node); return(node);
} }
...@@ -1503,8 +1526,10 @@ pars_column_def( ...@@ -1503,8 +1526,10 @@ pars_column_def(
sym_node_t* sym_node, /* in: column node in the sym_node_t* sym_node, /* in: column node in the
symbol table */ symbol table */
pars_res_word_t* type, /* in: data type */ pars_res_word_t* type, /* in: data type */
sym_node_t* len) /* in: length of column, or sym_node_t* len, /* in: length of column, or
NULL */ NULL */
void* is_not_null) /* in: if not NULL, column
is of type NOT NULL. */
{ {
ulint len2; ulint len2;
...@@ -1514,7 +1539,8 @@ pars_column_def( ...@@ -1514,7 +1539,8 @@ pars_column_def(
len2 = 0; len2 = 0;
} }
pars_set_dfield_type(que_node_get_val(sym_node), type, len2); pars_set_dfield_type(que_node_get_val(sym_node), type, len2,
is_not_null != NULL);
return(sym_node); return(sym_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