/* ** 2000-05-29 ** ** The author disclaims copyright to this source code. In place of ** a legal notice, here is a blessing: ** ** May you do good and not evil. ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** Driver template for the LEMON parser generator. ** ** The "lemon" program processes an LALR(1) input grammar file, then uses ** this template to construct a parser. The "lemon" program inserts text ** at each "%%" line. Also, any "P-a-r-s-e" identifer prefix (without the ** interstitial "-" characters) contained in this template is changed into ** the value of the %name directive from the grammar. Otherwise, the content ** of this template is copied straight through into the generate parser ** source file. ** ** The following is the concatenation of all %include directives from the ** input grammar file: */ #include #include /************ Begin %include sections from the grammar ************************/ #include #include #include #include #include #include "functionMgt.h" #include "nodes.h" #include "parToken.h" #include "ttokendef.h" #include "parAst.h" /**************** End of %include directives **********************************/ /* These constants specify the various numeric values for terminal symbols ** in a format understandable to "makeheaders". This section is blank unless ** "lemon" is run with the "-m" command-line option. ***************** Begin makeheaders token definitions *************************/ /**************** End makeheaders token definitions ***************************/ /* The next sections is a series of control #defines. ** various aspects of the generated parser. ** YYCODETYPE is the data type used to store the integer codes ** that represent terminal and non-terminal symbols. ** "unsigned char" is used if there are fewer than ** 256 symbols. Larger types otherwise. ** YYNOCODE is a number of type YYCODETYPE that is not used for ** any terminal or nonterminal symbol. ** YYFALLBACK If defined, this indicates that one or more tokens ** (also known as: "terminal symbols") have fall-back ** values which should be used if the original symbol ** would not parse. This permits keywords to sometimes ** be used as identifiers, for example. ** YYACTIONTYPE is the data type used for "action codes" - numbers ** that indicate what to do in response to the next ** token. ** ParseTOKENTYPE is the data type used for minor type for terminal ** symbols. Background: A "minor type" is a semantic ** value associated with a terminal or non-terminal ** symbols. For example, for an "ID" terminal symbol, ** the minor type might be the name of the identifier. ** Each non-terminal can have a different minor type. ** Terminal symbols all have the same minor type, though. ** This macros defines the minor type for terminal ** symbols. ** YYMINORTYPE is the data type used for all minor types. ** This is typically a union of many types, one of ** which is ParseTOKENTYPE. The entry in the union ** for terminal symbols is called "yy0". ** YYSTACKDEPTH is the maximum depth of the parser's stack. If ** zero the stack is dynamically sized using realloc() ** ParseARG_SDECL A static variable declaration for the %extra_argument ** ParseARG_PDECL A parameter declaration for the %extra_argument ** ParseARG_PARAM Code to pass %extra_argument as a subroutine parameter ** ParseARG_STORE Code to store %extra_argument into yypParser ** ParseARG_FETCH Code to extract %extra_argument from yypParser ** ParseCTX_* As ParseARG_ except for %extra_context ** YYERRORSYMBOL is the code number of the error symbol. If not ** defined, then do no error processing. ** YYNSTATE the combined number of states. ** YYNRULE the number of rules in the grammar ** YYNTOKEN Number of terminal symbols ** YY_MAX_SHIFT Maximum value for shift actions ** YY_MIN_SHIFTREDUCE Minimum value for shift-reduce actions ** YY_MAX_SHIFTREDUCE Maximum value for shift-reduce actions ** YY_ERROR_ACTION The yy_action[] code for syntax error ** YY_ACCEPT_ACTION The yy_action[] code for accept ** YY_NO_ACTION The yy_action[] code for no-op ** YY_MIN_REDUCE Minimum value for reduce actions ** YY_MAX_REDUCE Maximum value for reduce actions */ #ifndef INTERFACE # define INTERFACE 1 #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int #define YYNOCODE 316 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; SAlterOption yy21; EFillMode yy22; EOperatorType yy84; bool yy121; SDataType yy160; ENullOrder yy281; SToken yy409; int32_t yy452; SNodeList* yy488; SNode* yy504; EOrder yy522; EJoinType yy556; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 #endif #define ParseARG_SDECL SAstCreateContext* pCxt ; #define ParseARG_PDECL , SAstCreateContext* pCxt #define ParseARG_PARAM ,pCxt #define ParseARG_FETCH SAstCreateContext* pCxt =yypParser->pCxt ; #define ParseARG_STORE yypParser->pCxt =pCxt ; #define ParseCTX_SDECL #define ParseCTX_PDECL #define ParseCTX_PARAM #define ParseCTX_FETCH #define ParseCTX_STORE #define YYNSTATE 550 #define YYNRULE 411 #define YYNTOKEN 210 #define YY_MAX_SHIFT 549 #define YY_MIN_SHIFTREDUCE 810 #define YY_MAX_SHIFTREDUCE 1220 #define YY_ERROR_ACTION 1221 #define YY_ACCEPT_ACTION 1222 #define YY_NO_ACTION 1223 #define YY_MIN_REDUCE 1224 #define YY_MAX_REDUCE 1634 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) /* Define the yytestcase() macro to be a no-op if is not already defined ** otherwise. ** ** Applications can choose to define yytestcase() in the %include section ** to a macro that can assist in verifying code coverage. For production ** code the yytestcase() macro should be turned off. But it is useful ** for testing. */ #ifndef yytestcase # define yytestcase(X) #endif /* Next are the tables used to determine what action to take based on the ** current state and lookahead token. These tables are used to implement ** functions that take a state number and lookahead value and return an ** action integer. ** ** Suppose the action integer is N. Then the action is determined as ** follows ** ** 0 <= N <= YY_MAX_SHIFT Shift N. That is, push the lookahead ** token onto the stack and goto state N. ** ** N between YY_MIN_SHIFTREDUCE Shift to an arbitrary state then ** and YY_MAX_SHIFTREDUCE reduce by rule N-YY_MIN_SHIFTREDUCE. ** ** N == YY_ERROR_ACTION A syntax error has occurred. ** ** N == YY_ACCEPT_ACTION The parser accepts its input. ** ** N == YY_NO_ACTION No such action. Denotes unused ** slots in the yy_action[] table. ** ** N between YY_MIN_REDUCE Reduce by rule N-YY_MIN_REDUCE ** and YY_MAX_REDUCE ** ** The action table is constructed as a single large table named yy_action[]. ** Given state S and lookahead X, the action is computed as either: ** ** (A) N = yy_action[ yy_shift_ofst[S] + X ] ** (B) N = yy_default[S] ** ** The (A) formula is preferred. The B formula is used instead if ** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X. ** ** The formulas above are for computing the action when the lookahead is ** a terminal symbol. If the lookahead is a non-terminal (as occurs after ** a reduce action) then the yy_reduce_ofst[] array is used in place of ** the yy_shift_ofst[] array. ** ** The following are the tables generated in this section: ** ** yy_action[] A single table containing all actions. ** yy_lookahead[] A table containing the lookahead for each entry in ** yy_action. Used to detect hash collisions. ** yy_shift_ofst[] For each state, the offset into yy_action for ** shifting terminals. ** yy_reduce_ofst[] For each state, the offset into yy_action for ** shifting non-terminals after a reduce. ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ #define YY_ACTTAB_COUNT (1556) static const YYACTIONTYPE yy_action[] = { /* 0 */ 452, 258, 1485, 270, 275, 452, 1434, 25, 195, 313, /* 10 */ 465, 1435, 30, 28, 1481, 1488, 307, 1501, 1485, 311, /* 20 */ 267, 1485, 1055, 1613, 1335, 32, 31, 29, 27, 26, /* 30 */ 1481, 1487, 21, 1481, 1487, 1344, 1612, 1078, 1053, 239, /* 40 */ 1611, 1518, 32, 31, 29, 27, 26, 1613, 447, 464, /* 50 */ 11, 30, 28, 1163, 118, 407, 1236, 1060, 451, 267, /* 60 */ 132, 1055, 1472, 1162, 1611, 30, 28, 435, 165, 1472, /* 70 */ 431, 1075, 373, 267, 1, 1055, 465, 1053, 69, 1502, /* 80 */ 1503, 1507, 1552, 542, 541, 73, 241, 1548, 1177, 11, /* 90 */ 1501, 1053, 370, 1518, 375, 101, 1060, 546, 1613, 408, /* 100 */ 447, 1344, 446, 11, 32, 31, 29, 27, 26, 1054, /* 110 */ 1060, 132, 23, 1, 1518, 1611, 32, 31, 29, 27, /* 120 */ 26, 434, 32, 31, 29, 27, 26, 1, 99, 119, /* 130 */ 1613, 451, 424, 1302, 123, 1472, 546, 433, 128, 1559, /* 140 */ 1560, 1077, 1564, 132, 464, 1384, 1056, 1611, 1054, 278, /* 150 */ 546, 70, 1502, 1503, 1507, 1552, 1425, 1427, 349, 260, /* 160 */ 1548, 127, 1054, 1059, 1079, 1080, 449, 1106, 1107, 1108, /* 170 */ 1109, 1110, 1111, 1112, 1113, 1114, 29, 27, 26, 1094, /* 180 */ 1580, 1079, 1080, 1222, 425, 1056, 85, 133, 1276, 84, /* 190 */ 83, 82, 81, 80, 79, 78, 77, 76, 12, 1056, /* 200 */ 382, 381, 1059, 1079, 1080, 449, 1106, 1107, 1108, 1109, /* 210 */ 1110, 1111, 1112, 1113, 1114, 1118, 1059, 1079, 1080, 449, /* 220 */ 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 30, /* 230 */ 28, 1217, 442, 398, 1501, 53, 283, 267, 133, 1055, /* 240 */ 384, 465, 378, 306, 1247, 305, 383, 1161, 97, 98, /* 250 */ 73, 379, 377, 1322, 380, 1053, 1339, 376, 1518, 32, /* 260 */ 31, 29, 27, 26, 1613, 434, 1344, 1613, 30, 28, /* 270 */ 450, 1246, 1055, 133, 1060, 451, 267, 132, 1055, 1472, /* 280 */ 132, 1611, 30, 28, 1611, 133, 421, 1501, 1053, 1472, /* 290 */ 267, 7, 1055, 138, 1053, 70, 1502, 1503, 1507, 1552, /* 300 */ 1216, 464, 349, 260, 1548, 127, 465, 1060, 1053, 1224, /* 310 */ 898, 1518, 396, 1060, 546, 312, 1472, 191, 447, 51, /* 320 */ 9, 8, 50, 414, 1579, 394, 1054, 1060, 451, 900, /* 330 */ 7, 1344, 1472, 94, 93, 92, 91, 90, 89, 88, /* 340 */ 87, 86, 426, 422, 7, 1225, 271, 546, 71, 1502, /* 350 */ 1503, 1507, 1552, 546, 116, 12, 1551, 1548, 847, 1054, /* 360 */ 846, 335, 1346, 1056, 500, 1054, 85, 546, 443, 84, /* 370 */ 83, 82, 81, 80, 79, 78, 77, 76, 848, 1054, /* 380 */ 1059, 1079, 1080, 449, 1106, 1107, 1108, 1109, 1110, 1111, /* 390 */ 1112, 1113, 1114, 431, 1139, 1391, 1056, 32, 31, 29, /* 400 */ 27, 26, 1056, 384, 133, 378, 1426, 142, 141, 383, /* 410 */ 1245, 53, 98, 1059, 379, 377, 1056, 380, 101, 1059, /* 420 */ 1079, 1080, 449, 1106, 1107, 1108, 1109, 1110, 1111, 1112, /* 430 */ 1113, 1114, 1340, 1059, 1079, 1080, 449, 1106, 1107, 1108, /* 440 */ 1109, 1110, 1111, 1112, 1113, 1114, 30, 28, 238, 438, /* 450 */ 1075, 99, 1566, 1566, 267, 1472, 1055, 328, 60, 1422, /* 460 */ 340, 129, 1559, 1560, 1244, 1564, 140, 1187, 133, 341, /* 470 */ 1563, 1562, 1053, 32, 31, 29, 27, 26, 1076, 1337, /* 480 */ 936, 488, 487, 486, 940, 485, 942, 943, 484, 945, /* 490 */ 481, 1060, 951, 478, 953, 954, 475, 472, 389, 1391, /* 500 */ 418, 1185, 1186, 1188, 1189, 257, 1391, 465, 1, 1472, /* 510 */ 1389, 242, 465, 397, 431, 465, 320, 1390, 1243, 1571, /* 520 */ 1158, 321, 1391, 115, 348, 465, 502, 167, 272, 1081, /* 530 */ 392, 546, 1344, 1389, 1341, 386, 1094, 1344, 1082, 101, /* 540 */ 1344, 166, 339, 1054, 1126, 334, 333, 332, 331, 330, /* 550 */ 1344, 327, 326, 325, 324, 323, 319, 318, 317, 316, /* 560 */ 315, 314, 1273, 1472, 117, 465, 503, 43, 1316, 223, /* 570 */ 42, 66, 99, 1566, 462, 32, 31, 29, 27, 26, /* 580 */ 1056, 221, 130, 1559, 1560, 102, 1564, 465, 6, 1242, /* 590 */ 1344, 1561, 1336, 1127, 143, 491, 463, 1059, 1079, 1080, /* 600 */ 449, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, /* 610 */ 465, 1131, 1344, 242, 522, 521, 520, 519, 282, 209, /* 620 */ 518, 517, 516, 103, 511, 510, 509, 508, 507, 506, /* 630 */ 505, 504, 109, 1128, 1472, 1344, 549, 24, 265, 1121, /* 640 */ 1122, 1123, 1124, 1125, 1129, 1130, 1126, 190, 1320, 437, /* 650 */ 214, 1132, 277, 96, 1241, 1240, 176, 68, 280, 538, /* 660 */ 116, 534, 530, 526, 213, 1391, 116, 846, 1346, 1239, /* 670 */ 1238, 279, 515, 513, 1346, 251, 1389, 22, 1170, 1235, /* 680 */ 116, 1234, 439, 368, 1077, 49, 48, 310, 1347, 137, /* 690 */ 67, 1233, 1333, 207, 304, 1127, 298, 500, 1329, 1472, /* 700 */ 1472, 165, 247, 465, 296, 373, 292, 288, 134, 1492, /* 710 */ 1232, 300, 281, 1131, 1472, 1472, 1461, 252, 1231, 250, /* 720 */ 249, 1490, 372, 461, 1472, 1501, 1472, 375, 1344, 1230, /* 730 */ 1229, 1158, 1228, 133, 217, 1227, 1472, 1374, 1263, 24, /* 740 */ 265, 1121, 1122, 1123, 1124, 1125, 1129, 1130, 1063, 1518, /* 750 */ 1258, 413, 290, 514, 172, 1472, 447, 301, 1331, 158, /* 760 */ 385, 1501, 156, 1472, 160, 162, 451, 159, 161, 1039, /* 770 */ 1472, 169, 387, 1501, 1472, 1472, 164, 1472, 1256, 163, /* 780 */ 1472, 9, 8, 1219, 1220, 1518, 70, 1502, 1503, 1507, /* 790 */ 1552, 65, 447, 1327, 260, 1548, 1625, 1518, 406, 107, /* 800 */ 390, 62, 451, 410, 447, 1586, 1472, 45, 179, 1062, /* 810 */ 170, 1184, 181, 34, 451, 1501, 440, 1133, 1472, 1066, /* 820 */ 448, 1501, 70, 1502, 1503, 1507, 1552, 490, 1237, 34, /* 830 */ 260, 1548, 1625, 1090, 70, 1502, 1503, 1507, 1552, 1518, /* 840 */ 192, 1609, 260, 1548, 1625, 1518, 447, 34, 1303, 419, /* 850 */ 198, 1022, 447, 1570, 200, 95, 451, 344, 153, 457, /* 860 */ 1472, 126, 451, 1385, 105, 435, 1472, 366, 206, 362, /* 870 */ 358, 354, 152, 1501, 405, 185, 229, 1502, 1503, 1507, /* 880 */ 1065, 872, 71, 1502, 1503, 1507, 1552, 367, 107, 45, /* 890 */ 445, 1548, 929, 924, 1582, 470, 1613, 1518, 54, 957, /* 900 */ 873, 150, 432, 105, 447, 1519, 106, 961, 107, 132, /* 910 */ 967, 105, 966, 1611, 451, 108, 1075, 194, 1472, 2, /* 920 */ 1501, 285, 289, 246, 248, 898, 1031, 215, 322, 139, /* 930 */ 1424, 329, 337, 336, 120, 1502, 1503, 1507, 338, 342, /* 940 */ 1086, 343, 1085, 431, 1518, 1084, 345, 145, 346, 347, /* 950 */ 148, 447, 52, 350, 151, 1083, 369, 399, 149, 371, /* 960 */ 122, 451, 146, 75, 1334, 1472, 401, 155, 101, 1330, /* 970 */ 374, 256, 436, 1626, 400, 1501, 157, 110, 171, 144, /* 980 */ 111, 71, 1502, 1503, 1507, 1552, 1332, 435, 1328, 112, /* 990 */ 1549, 113, 402, 174, 1082, 274, 273, 409, 420, 1518, /* 1000 */ 412, 99, 1501, 411, 1593, 1068, 447, 177, 455, 1592, /* 1010 */ 1501, 188, 1559, 430, 1060, 429, 451, 5, 1613, 1583, /* 1020 */ 1472, 1061, 417, 266, 180, 259, 1518, 423, 428, 100, /* 1030 */ 4, 132, 416, 447, 1518, 1611, 234, 1502, 1503, 1507, /* 1040 */ 1060, 447, 1158, 451, 1501, 1081, 1567, 1472, 35, 441, /* 1050 */ 415, 451, 1501, 125, 1573, 1472, 261, 1501, 187, 444, /* 1060 */ 186, 184, 17, 234, 1502, 1503, 1507, 1610, 1518, 1534, /* 1070 */ 1433, 233, 1502, 1503, 1507, 447, 1518, 193, 453, 454, /* 1080 */ 466, 1518, 1432, 447, 269, 451, 1501, 1628, 447, 1472, /* 1090 */ 458, 460, 1064, 451, 459, 202, 204, 1472, 451, 216, /* 1100 */ 264, 59, 1472, 427, 1345, 120, 1502, 1503, 1507, 61, /* 1110 */ 1518, 1501, 468, 234, 1502, 1503, 1507, 447, 226, 1502, /* 1120 */ 1503, 1507, 497, 218, 1317, 212, 545, 451, 41, 1069, /* 1130 */ 220, 1472, 224, 225, 268, 1518, 1466, 222, 1465, 284, /* 1140 */ 1462, 286, 447, 287, 1627, 1049, 1072, 234, 1502, 1503, /* 1150 */ 1507, 1050, 451, 135, 291, 1460, 1472, 1501, 293, 295, /* 1160 */ 294, 1459, 297, 1458, 299, 1501, 1449, 136, 302, 303, /* 1170 */ 1034, 1443, 232, 1502, 1503, 1507, 1033, 1442, 308, 1441, /* 1180 */ 309, 1518, 1440, 1005, 1417, 1416, 1415, 1414, 447, 1518, /* 1190 */ 1413, 1412, 1411, 1501, 104, 1401, 447, 1410, 451, 1501, /* 1200 */ 1007, 1395, 1472, 1409, 1408, 1407, 451, 1406, 1405, 1404, /* 1210 */ 1472, 1403, 1402, 1400, 1399, 1398, 1397, 1518, 235, 1502, /* 1220 */ 1503, 1507, 1396, 1518, 447, 1394, 227, 1502, 1503, 1507, /* 1230 */ 447, 1393, 1392, 1275, 451, 1457, 1451, 1439, 1472, 1430, /* 1240 */ 451, 147, 1323, 1274, 1472, 1501, 352, 865, 1272, 353, /* 1250 */ 1501, 1270, 1268, 356, 236, 1502, 1503, 1507, 1501, 351, /* 1260 */ 228, 1502, 1503, 1507, 355, 359, 357, 361, 1266, 1518, /* 1270 */ 360, 365, 1255, 1254, 1518, 1251, 447, 364, 363, 1325, /* 1280 */ 154, 447, 1518, 974, 972, 74, 451, 1324, 897, 447, /* 1290 */ 1472, 451, 896, 895, 894, 1472, 891, 890, 1264, 451, /* 1300 */ 1501, 514, 253, 1472, 1259, 254, 237, 1502, 1503, 1507, /* 1310 */ 388, 1515, 1502, 1503, 1507, 512, 1257, 255, 1250, 1514, /* 1320 */ 1502, 1503, 1507, 391, 1518, 1501, 1249, 393, 395, 72, /* 1330 */ 1456, 447, 1041, 1450, 1501, 168, 403, 1438, 1437, 114, /* 1340 */ 1429, 451, 173, 55, 14, 1472, 1490, 3, 34, 1518, /* 1350 */ 15, 189, 39, 124, 36, 10, 447, 44, 1518, 178, /* 1360 */ 121, 244, 1502, 1503, 1507, 447, 451, 404, 1183, 57, /* 1370 */ 1472, 182, 183, 1205, 19, 451, 38, 1176, 1155, 1472, /* 1380 */ 175, 56, 20, 1154, 37, 1210, 1513, 1502, 1503, 1507, /* 1390 */ 16, 1204, 262, 1209, 1208, 245, 1502, 1503, 1507, 263, /* 1400 */ 8, 131, 1501, 196, 1092, 33, 13, 1501, 1428, 1091, /* 1410 */ 18, 203, 1119, 1501, 197, 205, 1181, 199, 201, 46, /* 1420 */ 58, 1070, 40, 469, 456, 276, 1518, 1321, 1489, 473, /* 1430 */ 476, 1518, 1319, 447, 62, 208, 467, 1518, 447, 958, /* 1440 */ 471, 479, 955, 451, 447, 474, 477, 1472, 451, 952, /* 1450 */ 946, 480, 1472, 944, 451, 482, 483, 950, 1472, 1501, /* 1460 */ 935, 949, 948, 243, 1502, 1503, 1507, 489, 240, 1502, /* 1470 */ 1503, 1507, 947, 969, 230, 1502, 1503, 1507, 63, 968, /* 1480 */ 47, 64, 965, 1518, 963, 863, 499, 904, 210, 211, /* 1490 */ 447, 501, 496, 210, 886, 885, 884, 496, 883, 882, /* 1500 */ 451, 881, 880, 879, 1472, 901, 899, 876, 875, 874, /* 1510 */ 871, 870, 869, 868, 498, 1271, 523, 1269, 524, 498, /* 1520 */ 231, 1502, 1503, 1507, 527, 528, 525, 529, 1267, 531, /* 1530 */ 532, 533, 1265, 495, 494, 493, 535, 492, 495, 494, /* 1540 */ 493, 536, 492, 537, 1253, 539, 540, 1252, 1248, 543, /* 1550 */ 544, 1223, 1057, 219, 547, 548, }; static const YYCODETYPE yy_lookahead[] = { /* 0 */ 254, 241, 258, 257, 241, 254, 260, 279, 280, 219, /* 10 */ 219, 260, 12, 13, 270, 271, 263, 213, 258, 228, /* 20 */ 20, 258, 22, 294, 213, 12, 13, 14, 15, 16, /* 30 */ 270, 271, 2, 270, 271, 244, 307, 20, 38, 249, /* 40 */ 311, 237, 12, 13, 14, 15, 16, 294, 244, 20, /* 50 */ 50, 12, 13, 14, 212, 219, 214, 57, 254, 20, /* 60 */ 307, 22, 258, 4, 311, 12, 13, 263, 61, 258, /* 70 */ 219, 20, 65, 20, 74, 22, 219, 38, 274, 275, /* 80 */ 276, 277, 278, 216, 217, 228, 282, 283, 75, 50, /* 90 */ 213, 38, 235, 237, 87, 244, 57, 97, 294, 263, /* 100 */ 244, 244, 50, 50, 12, 13, 14, 15, 16, 109, /* 110 */ 57, 307, 2, 74, 237, 311, 12, 13, 14, 15, /* 120 */ 16, 244, 12, 13, 14, 15, 16, 74, 277, 222, /* 130 */ 294, 254, 276, 226, 236, 258, 97, 286, 287, 288, /* 140 */ 289, 20, 291, 307, 20, 247, 146, 311, 109, 246, /* 150 */ 97, 274, 275, 276, 277, 278, 253, 254, 49, 282, /* 160 */ 283, 284, 109, 163, 164, 165, 166, 167, 168, 169, /* 170 */ 170, 171, 172, 173, 174, 175, 14, 15, 16, 75, /* 180 */ 303, 164, 165, 210, 20, 146, 21, 187, 0, 24, /* 190 */ 25, 26, 27, 28, 29, 30, 31, 32, 74, 146, /* 200 */ 223, 224, 163, 164, 165, 166, 167, 168, 169, 170, /* 210 */ 171, 172, 173, 174, 175, 163, 163, 164, 165, 166, /* 220 */ 167, 168, 169, 170, 171, 172, 173, 174, 175, 12, /* 230 */ 13, 139, 71, 263, 213, 221, 263, 20, 187, 22, /* 240 */ 52, 219, 54, 145, 213, 147, 58, 188, 234, 61, /* 250 */ 228, 63, 64, 0, 66, 38, 242, 235, 237, 12, /* 260 */ 13, 14, 15, 16, 294, 244, 244, 294, 12, 13, /* 270 */ 14, 213, 22, 187, 57, 254, 20, 307, 22, 258, /* 280 */ 307, 311, 12, 13, 311, 187, 136, 213, 38, 258, /* 290 */ 20, 74, 22, 47, 38, 274, 275, 276, 277, 278, /* 300 */ 208, 20, 49, 282, 283, 284, 219, 57, 38, 0, /* 310 */ 38, 237, 21, 57, 97, 228, 258, 296, 244, 73, /* 320 */ 1, 2, 76, 302, 303, 34, 109, 57, 254, 57, /* 330 */ 74, 244, 258, 24, 25, 26, 27, 28, 29, 30, /* 340 */ 31, 32, 192, 193, 74, 0, 229, 97, 274, 275, /* 350 */ 276, 277, 278, 97, 237, 74, 282, 283, 20, 109, /* 360 */ 22, 67, 245, 146, 49, 109, 21, 97, 207, 24, /* 370 */ 25, 26, 27, 28, 29, 30, 31, 32, 40, 109, /* 380 */ 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, /* 390 */ 173, 174, 175, 219, 75, 237, 146, 12, 13, 14, /* 400 */ 15, 16, 146, 52, 187, 54, 248, 113, 114, 58, /* 410 */ 213, 221, 61, 163, 63, 64, 146, 66, 244, 163, /* 420 */ 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, /* 430 */ 174, 175, 242, 163, 164, 165, 166, 167, 168, 169, /* 440 */ 170, 171, 172, 173, 174, 175, 12, 13, 18, 3, /* 450 */ 20, 277, 272, 272, 20, 258, 22, 27, 218, 244, /* 460 */ 30, 287, 288, 289, 213, 291, 251, 163, 187, 39, /* 470 */ 290, 290, 38, 12, 13, 14, 15, 16, 20, 239, /* 480 */ 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, /* 490 */ 98, 57, 100, 101, 102, 103, 104, 105, 4, 237, /* 500 */ 196, 197, 198, 199, 200, 243, 237, 219, 74, 258, /* 510 */ 248, 50, 219, 19, 219, 219, 228, 248, 213, 185, /* 520 */ 186, 228, 237, 138, 228, 219, 57, 33, 243, 20, /* 530 */ 36, 97, 244, 248, 228, 41, 75, 244, 20, 244, /* 540 */ 244, 47, 112, 109, 83, 115, 116, 117, 118, 119, /* 550 */ 244, 121, 122, 123, 124, 125, 126, 127, 128, 129, /* 560 */ 130, 131, 0, 258, 18, 219, 225, 73, 227, 23, /* 570 */ 76, 218, 277, 272, 228, 12, 13, 14, 15, 16, /* 580 */ 146, 35, 287, 288, 289, 232, 291, 219, 43, 213, /* 590 */ 244, 290, 239, 132, 48, 85, 228, 163, 164, 165, /* 600 */ 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, /* 610 */ 219, 150, 244, 50, 52, 53, 54, 55, 56, 228, /* 620 */ 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, /* 630 */ 68, 69, 70, 132, 258, 244, 19, 176, 177, 178, /* 640 */ 179, 180, 181, 182, 183, 184, 83, 138, 0, 203, /* 650 */ 33, 150, 229, 36, 213, 213, 138, 111, 229, 42, /* 660 */ 237, 44, 45, 46, 47, 237, 237, 22, 245, 213, /* 670 */ 213, 243, 223, 224, 245, 35, 248, 176, 14, 213, /* 680 */ 237, 213, 71, 38, 20, 139, 140, 141, 245, 143, /* 690 */ 73, 213, 238, 76, 148, 132, 142, 49, 238, 258, /* 700 */ 258, 61, 156, 219, 158, 65, 160, 161, 162, 74, /* 710 */ 213, 157, 228, 150, 258, 258, 0, 77, 213, 79, /* 720 */ 80, 86, 82, 106, 258, 213, 258, 87, 244, 213, /* 730 */ 213, 186, 213, 187, 230, 213, 258, 233, 0, 176, /* 740 */ 177, 178, 179, 180, 181, 182, 183, 184, 38, 237, /* 750 */ 0, 134, 36, 71, 137, 258, 244, 75, 238, 78, /* 760 */ 22, 213, 81, 258, 78, 78, 254, 81, 81, 152, /* 770 */ 258, 154, 22, 213, 258, 258, 78, 258, 0, 81, /* 780 */ 258, 1, 2, 164, 165, 237, 274, 275, 276, 277, /* 790 */ 278, 74, 244, 238, 282, 283, 284, 237, 266, 71, /* 800 */ 22, 84, 254, 75, 244, 293, 258, 71, 71, 38, /* 810 */ 238, 75, 75, 71, 254, 213, 205, 75, 258, 109, /* 820 */ 238, 213, 274, 275, 276, 277, 278, 238, 214, 71, /* 830 */ 282, 283, 284, 75, 274, 275, 276, 277, 278, 237, /* 840 */ 314, 293, 282, 283, 284, 237, 244, 71, 226, 305, /* 850 */ 71, 75, 244, 293, 75, 71, 254, 254, 33, 75, /* 860 */ 258, 36, 254, 247, 71, 263, 258, 42, 75, 44, /* 870 */ 45, 46, 47, 213, 254, 299, 274, 275, 276, 277, /* 880 */ 109, 38, 274, 275, 276, 277, 278, 216, 71, 71, /* 890 */ 282, 283, 75, 75, 273, 71, 294, 237, 73, 75, /* 900 */ 57, 76, 292, 71, 244, 237, 71, 75, 71, 307, /* 910 */ 75, 71, 75, 311, 254, 75, 20, 308, 258, 295, /* 920 */ 213, 219, 36, 269, 223, 38, 144, 264, 219, 120, /* 930 */ 219, 252, 132, 250, 274, 275, 276, 277, 250, 219, /* 940 */ 20, 268, 20, 219, 237, 20, 262, 221, 244, 255, /* 950 */ 221, 244, 221, 219, 221, 20, 215, 244, 133, 237, /* 960 */ 135, 254, 137, 219, 237, 258, 153, 237, 244, 237, /* 970 */ 223, 215, 312, 313, 268, 213, 237, 237, 218, 154, /* 980 */ 237, 274, 275, 276, 277, 278, 237, 263, 237, 237, /* 990 */ 283, 237, 267, 218, 20, 12, 13, 262, 195, 237, /* 1000 */ 255, 277, 213, 244, 304, 22, 244, 259, 194, 304, /* 1010 */ 213, 287, 288, 289, 57, 291, 254, 202, 294, 273, /* 1020 */ 258, 38, 258, 261, 259, 258, 237, 258, 201, 244, /* 1030 */ 189, 307, 190, 244, 237, 311, 274, 275, 276, 277, /* 1040 */ 57, 244, 186, 254, 213, 20, 272, 258, 120, 204, /* 1050 */ 261, 254, 213, 298, 301, 258, 209, 213, 285, 206, /* 1060 */ 297, 300, 74, 274, 275, 276, 277, 310, 237, 281, /* 1070 */ 259, 274, 275, 276, 277, 244, 237, 309, 258, 258, /* 1080 */ 97, 237, 259, 244, 258, 254, 213, 315, 244, 258, /* 1090 */ 135, 255, 109, 254, 256, 244, 218, 258, 254, 233, /* 1100 */ 261, 218, 258, 306, 244, 274, 275, 276, 277, 74, /* 1110 */ 237, 213, 240, 274, 275, 276, 277, 244, 274, 275, /* 1120 */ 276, 277, 223, 219, 227, 218, 215, 254, 265, 146, /* 1130 */ 220, 258, 231, 231, 261, 237, 0, 211, 0, 64, /* 1140 */ 0, 38, 244, 159, 313, 38, 163, 274, 275, 276, /* 1150 */ 277, 38, 254, 38, 159, 0, 258, 213, 38, 159, /* 1160 */ 38, 0, 38, 0, 38, 213, 0, 74, 150, 149, /* 1170 */ 109, 0, 274, 275, 276, 277, 146, 0, 53, 0, /* 1180 */ 142, 237, 0, 86, 0, 0, 0, 0, 244, 237, /* 1190 */ 0, 0, 0, 213, 120, 0, 244, 0, 254, 213, /* 1200 */ 22, 0, 258, 0, 0, 0, 254, 0, 0, 0, /* 1210 */ 258, 0, 0, 0, 0, 0, 0, 237, 274, 275, /* 1220 */ 276, 277, 0, 237, 244, 0, 274, 275, 276, 277, /* 1230 */ 244, 0, 0, 0, 254, 0, 0, 0, 258, 0, /* 1240 */ 254, 43, 0, 0, 258, 213, 36, 51, 0, 43, /* 1250 */ 213, 0, 0, 36, 274, 275, 276, 277, 213, 38, /* 1260 */ 274, 275, 276, 277, 38, 38, 43, 43, 0, 237, /* 1270 */ 36, 43, 0, 0, 237, 0, 244, 36, 38, 0, /* 1280 */ 81, 244, 237, 38, 22, 83, 254, 0, 38, 244, /* 1290 */ 258, 254, 38, 38, 38, 258, 38, 38, 0, 254, /* 1300 */ 213, 71, 22, 258, 0, 22, 274, 275, 276, 277, /* 1310 */ 39, 274, 275, 276, 277, 71, 0, 22, 0, 274, /* 1320 */ 275, 276, 277, 38, 237, 213, 0, 22, 22, 20, /* 1330 */ 0, 244, 38, 0, 213, 155, 22, 0, 0, 151, /* 1340 */ 0, 254, 43, 74, 191, 258, 86, 71, 71, 237, /* 1350 */ 191, 86, 71, 135, 185, 191, 244, 138, 237, 75, /* 1360 */ 74, 274, 275, 276, 277, 244, 254, 138, 75, 4, /* 1370 */ 258, 74, 71, 38, 74, 254, 138, 75, 75, 258, /* 1380 */ 133, 74, 71, 75, 71, 75, 274, 275, 276, 277, /* 1390 */ 71, 38, 38, 38, 38, 274, 275, 276, 277, 38, /* 1400 */ 2, 86, 213, 86, 75, 74, 74, 213, 0, 75, /* 1410 */ 74, 43, 163, 213, 75, 133, 75, 74, 74, 74, /* 1420 */ 74, 22, 74, 38, 136, 38, 237, 0, 86, 38, /* 1430 */ 38, 237, 0, 244, 84, 86, 85, 237, 244, 75, /* 1440 */ 74, 38, 75, 254, 244, 74, 74, 258, 254, 75, /* 1450 */ 75, 74, 258, 75, 254, 38, 74, 99, 258, 213, /* 1460 */ 22, 99, 99, 274, 275, 276, 277, 87, 274, 275, /* 1470 */ 276, 277, 99, 38, 274, 275, 276, 277, 74, 109, /* 1480 */ 74, 74, 38, 237, 22, 51, 50, 57, 61, 71, /* 1490 */ 244, 72, 65, 61, 38, 38, 38, 65, 38, 38, /* 1500 */ 254, 38, 38, 22, 258, 57, 38, 38, 38, 38, /* 1510 */ 38, 38, 38, 38, 87, 0, 38, 0, 36, 87, /* 1520 */ 274, 275, 276, 277, 38, 36, 43, 43, 0, 38, /* 1530 */ 36, 43, 0, 106, 107, 108, 38, 110, 106, 107, /* 1540 */ 108, 36, 110, 43, 0, 38, 37, 0, 0, 22, /* 1550 */ 21, 316, 22, 22, 21, 20, 316, 316, 316, 316, /* 1560 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, /* 1570 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, /* 1580 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, /* 1590 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, /* 1600 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, /* 1610 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, /* 1620 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, /* 1630 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, /* 1640 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, /* 1650 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, /* 1660 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, /* 1670 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, /* 1680 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, /* 1690 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, /* 1700 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, /* 1710 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, /* 1720 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, /* 1730 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, /* 1740 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, /* 1750 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316, /* 1760 */ 316, 316, 316, 316, 316, 316, }; #define YY_SHIFT_COUNT (549) #define YY_SHIFT_MIN (0) #define YY_SHIFT_MAX (1548) static const unsigned short int yy_shift_ofst[] = { /* 0 */ 546, 0, 39, 53, 53, 53, 53, 217, 53, 53, /* 10 */ 270, 434, 281, 256, 270, 270, 270, 270, 270, 270, /* 20 */ 270, 270, 270, 270, 270, 270, 270, 270, 270, 270, /* 30 */ 270, 270, 270, 270, 270, 124, 124, 124, 51, 983, /* 40 */ 983, 98, 29, 29, 86, 983, 17, 17, 29, 29, /* 50 */ 29, 29, 29, 29, 109, 121, 164, 86, 121, 29, /* 60 */ 29, 121, 29, 121, 121, 121, 29, 315, 430, 461, /* 70 */ 563, 563, 165, 640, 250, 351, 250, 250, 250, 250, /* 80 */ 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, /* 90 */ 250, 250, 250, 250, 250, 17, 338, 253, 272, 509, /* 100 */ 509, 509, 648, 272, 458, 121, 121, 121, 510, 469, /* 110 */ 392, 392, 392, 392, 392, 392, 392, 617, 345, 188, /* 120 */ 92, 304, 17, 7, 17, 150, 645, 518, 334, 545, /* 130 */ 334, 664, 446, 59, 896, 886, 887, 782, 896, 896, /* 140 */ 809, 800, 800, 896, 920, 922, 109, 458, 925, 109, /* 150 */ 109, 896, 109, 935, 121, 121, 121, 121, 121, 121, /* 160 */ 121, 121, 121, 121, 121, 887, 896, 935, 458, 920, /* 170 */ 813, 922, 315, 458, 925, 315, 974, 803, 814, 957, /* 180 */ 803, 814, 957, 957, 815, 827, 842, 841, 856, 458, /* 190 */ 1025, 928, 847, 853, 845, 988, 121, 814, 957, 957, /* 200 */ 814, 957, 955, 458, 925, 315, 510, 315, 458, 1035, /* 210 */ 887, 469, 896, 315, 935, 1556, 1556, 1556, 1556, 1556, /* 220 */ 562, 825, 309, 494, 1427, 1432, 13, 30, 110, 104, /* 230 */ 385, 247, 247, 247, 247, 247, 247, 247, 246, 294, /* 240 */ 162, 319, 501, 162, 162, 162, 716, 554, 682, 681, /* 250 */ 686, 687, 698, 738, 750, 778, 291, 728, 736, 737, /* 260 */ 780, 619, 611, 161, 742, 52, 758, 635, 776, 779, /* 270 */ 784, 793, 817, 710, 771, 818, 824, 832, 835, 837, /* 280 */ 840, 717, 843, 1136, 1138, 1075, 1140, 1103, 984, 1107, /* 290 */ 1113, 1115, 995, 1155, 1120, 1122, 1000, 1161, 1124, 1163, /* 300 */ 1126, 1166, 1093, 1018, 1020, 1061, 1030, 1171, 1177, 1125, /* 310 */ 1038, 1179, 1182, 1097, 1184, 1185, 1186, 1187, 1190, 1191, /* 320 */ 1192, 1197, 1203, 1204, 1205, 1207, 1208, 1209, 1211, 1212, /* 330 */ 1074, 1195, 1213, 1214, 1215, 1216, 1222, 1178, 1201, 1225, /* 340 */ 1231, 1232, 1233, 1235, 1236, 1237, 1239, 1198, 1242, 1196, /* 350 */ 1243, 1248, 1221, 1210, 1206, 1251, 1226, 1217, 1223, 1252, /* 360 */ 1227, 1234, 1224, 1268, 1240, 1241, 1228, 1272, 1273, 1275, /* 370 */ 1279, 1202, 1199, 1245, 1230, 1262, 1287, 1250, 1254, 1255, /* 380 */ 1256, 1244, 1230, 1258, 1259, 1298, 1280, 1304, 1283, 1271, /* 390 */ 1316, 1295, 1285, 1318, 1305, 1326, 1306, 1309, 1330, 1219, /* 400 */ 1180, 1294, 1333, 1188, 1314, 1229, 1218, 1337, 1338, 1238, /* 410 */ 1340, 1269, 1299, 1247, 1276, 1277, 1153, 1284, 1281, 1293, /* 420 */ 1286, 1297, 1300, 1302, 1301, 1260, 1307, 1311, 1159, 1303, /* 430 */ 1308, 1265, 1169, 1313, 1315, 1310, 1319, 1164, 1365, 1335, /* 440 */ 1353, 1354, 1355, 1356, 1361, 1398, 1249, 1317, 1329, 1331, /* 450 */ 1334, 1332, 1336, 1339, 1341, 1343, 1344, 1288, 1345, 1408, /* 460 */ 1368, 1282, 1346, 1350, 1342, 1349, 1399, 1348, 1351, 1364, /* 470 */ 1385, 1387, 1366, 1367, 1391, 1371, 1374, 1392, 1372, 1375, /* 480 */ 1403, 1377, 1378, 1417, 1382, 1358, 1362, 1363, 1373, 1438, /* 490 */ 1380, 1404, 1435, 1370, 1406, 1407, 1444, 1230, 1462, 1434, /* 500 */ 1436, 1430, 1419, 1418, 1456, 1457, 1458, 1460, 1461, 1463, /* 510 */ 1464, 1481, 1448, 1244, 1468, 1230, 1469, 1470, 1471, 1472, /* 520 */ 1473, 1474, 1475, 1515, 1478, 1482, 1483, 1517, 1486, 1489, /* 530 */ 1484, 1528, 1491, 1494, 1488, 1532, 1498, 1505, 1500, 1544, /* 540 */ 1507, 1509, 1547, 1548, 1527, 1529, 1530, 1531, 1533, 1535, }; #define YY_REDUCE_COUNT (219) #define YY_REDUCE_MIN (-272) #define YY_REDUCE_MAX (1246) static const short yy_reduce_ofst[] = { /* 0 */ -27, -196, 21, -123, 512, 548, 560, 602, 74, 608, /* 10 */ 660, 707, 724, 762, 789, 797, 831, 839, 873, 844, /* 20 */ 898, 944, 952, 980, 986, 1032, 1037, 1045, 1087, 1112, /* 30 */ 1121, 1189, 1194, 1200, 1246, -149, 174, 295, -164, -240, /* 40 */ -237, -247, -143, 22, -30, -256, -254, -97, -209, 87, /* 50 */ 288, 293, 296, 306, 14, 262, -144, -271, 117, 346, /* 60 */ 368, 285, 391, 423, 428, 429, 484, 353, -210, -272, /* 70 */ -272, -272, -158, -102, -189, -93, 31, 58, 197, 251, /* 80 */ 305, 376, 441, 442, 456, 457, 466, 468, 478, 497, /* 90 */ 505, 516, 517, 519, 522, -249, -133, 190, -23, 180, /* 100 */ 181, 301, 240, 449, 215, 443, 158, 269, 504, 341, /* 110 */ 454, 460, 520, 555, 572, 582, 589, 532, 614, 622, /* 120 */ 526, 544, 603, 616, 620, 576, 671, 621, 610, 610, /* 130 */ 610, 668, 609, 624, 702, 654, 701, 663, 709, 711, /* 140 */ 679, 683, 688, 720, 673, 684, 726, 704, 694, 729, /* 150 */ 731, 734, 733, 741, 722, 727, 730, 732, 739, 740, /* 160 */ 743, 749, 751, 752, 754, 747, 744, 756, 713, 706, /* 170 */ 725, 735, 760, 759, 745, 775, 746, 700, 748, 764, /* 180 */ 705, 765, 767, 769, 753, 761, 755, 763, 610, 785, /* 190 */ 774, 773, 772, 757, 768, 788, 668, 811, 820, 821, /* 200 */ 823, 826, 838, 851, 836, 878, 866, 883, 860, 872, /* 210 */ 899, 897, 904, 907, 911, 863, 901, 902, 910, 926, }; static const YYACTIONTYPE yy_default[] = { /* 0 */ 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, /* 10 */ 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, /* 20 */ 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, /* 30 */ 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, /* 40 */ 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, /* 50 */ 1221, 1221, 1221, 1221, 1280, 1221, 1221, 1221, 1221, 1221, /* 60 */ 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1278, 1418, 1221, /* 70 */ 1554, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, /* 80 */ 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, /* 90 */ 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1280, 1221, 1565, /* 100 */ 1565, 1565, 1278, 1221, 1221, 1221, 1221, 1221, 1373, 1221, /* 110 */ 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1452, 1221, 1221, /* 120 */ 1629, 1221, 1221, 1326, 1221, 1589, 1221, 1581, 1557, 1571, /* 130 */ 1558, 1221, 1614, 1574, 1221, 1221, 1221, 1444, 1221, 1221, /* 140 */ 1423, 1420, 1420, 1221, 1221, 1221, 1280, 1221, 1221, 1280, /* 150 */ 1280, 1221, 1280, 1221, 1221, 1221, 1221, 1221, 1221, 1221, /* 160 */ 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, /* 170 */ 1454, 1221, 1278, 1221, 1221, 1278, 1221, 1596, 1594, 1221, /* 180 */ 1596, 1594, 1221, 1221, 1608, 1604, 1587, 1585, 1571, 1221, /* 190 */ 1221, 1221, 1632, 1620, 1616, 1221, 1221, 1594, 1221, 1221, /* 200 */ 1594, 1221, 1431, 1221, 1221, 1278, 1221, 1278, 1221, 1342, /* 210 */ 1221, 1221, 1221, 1278, 1221, 1446, 1376, 1376, 1281, 1226, /* 220 */ 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, /* 230 */ 1221, 1517, 1607, 1606, 1516, 1531, 1530, 1529, 1221, 1221, /* 240 */ 1511, 1221, 1221, 1512, 1510, 1509, 1221, 1221, 1221, 1221, /* 250 */ 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, /* 260 */ 1555, 1221, 1617, 1621, 1221, 1221, 1221, 1491, 1221, 1221, /* 270 */ 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, /* 280 */ 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, /* 290 */ 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, /* 300 */ 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, /* 310 */ 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, /* 320 */ 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, /* 330 */ 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, /* 340 */ 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, /* 350 */ 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, /* 360 */ 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, /* 370 */ 1221, 1221, 1221, 1221, 1387, 1221, 1221, 1221, 1221, 1221, /* 380 */ 1221, 1307, 1306, 1221, 1221, 1221, 1221, 1221, 1221, 1221, /* 390 */ 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, /* 400 */ 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, /* 410 */ 1221, 1221, 1221, 1221, 1578, 1588, 1221, 1221, 1221, 1221, /* 420 */ 1221, 1221, 1221, 1221, 1221, 1491, 1221, 1605, 1221, 1564, /* 430 */ 1560, 1221, 1221, 1556, 1221, 1221, 1615, 1221, 1221, 1221, /* 440 */ 1221, 1221, 1221, 1221, 1221, 1550, 1221, 1221, 1221, 1221, /* 450 */ 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, /* 460 */ 1221, 1221, 1221, 1221, 1490, 1221, 1221, 1221, 1221, 1221, /* 470 */ 1221, 1221, 1370, 1221, 1221, 1221, 1221, 1221, 1221, 1221, /* 480 */ 1221, 1221, 1221, 1221, 1221, 1355, 1353, 1352, 1351, 1221, /* 490 */ 1348, 1221, 1221, 1221, 1221, 1221, 1221, 1378, 1221, 1221, /* 500 */ 1221, 1221, 1221, 1301, 1221, 1221, 1221, 1221, 1221, 1221, /* 510 */ 1221, 1221, 1221, 1292, 1221, 1291, 1221, 1221, 1221, 1221, /* 520 */ 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, /* 530 */ 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, /* 540 */ 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, 1221, }; /********** End of lemon-generated parsing tables *****************************/ /* The next table maps tokens (terminal symbols) into fallback tokens. ** If a construct like the following: ** ** %fallback ID X Y Z. ** ** appears in the grammar, then ID becomes a fallback token for X, Y, ** and Z. Whenever one of the tokens X, Y, or Z is input to the parser ** but it does not parse, the type of the token is changed to ID and ** the parse is retried before an error is thrown. ** ** This feature can be used, for example, to cause some keywords in a language ** to revert to identifiers if they keyword does not apply in the context where ** it appears. */ #ifdef YYFALLBACK static const YYCODETYPE yyFallback[] = { }; #endif /* YYFALLBACK */ /* The following structure represents a single element of the ** parser's stack. Information stored includes: ** ** + The state number for the parser at this level of the stack. ** ** + The value of the token stored at this level of the stack. ** (In other words, the "major" token.) ** ** + The semantic value stored at this level of the stack. This is ** the information used by the action routines in the grammar. ** It is sometimes called the "minor" token. ** ** After the "shift" half of a SHIFTREDUCE action, the stateno field ** actually contains the reduce action for the second half of the ** SHIFTREDUCE. */ struct yyStackEntry { YYACTIONTYPE stateno; /* The state-number, or reduce action in SHIFTREDUCE */ YYCODETYPE major; /* The major token value. This is the code ** number for the token at this stack level */ YYMINORTYPE minor; /* The user-supplied minor token value. This ** is the value of the token */ }; typedef struct yyStackEntry yyStackEntry; /* The state of the parser is completely contained in an instance of ** the following structure */ struct yyParser { yyStackEntry *yytos; /* Pointer to top element of the stack */ #ifdef YYTRACKMAXSTACKDEPTH int yyhwm; /* High-water mark of the stack */ #endif #ifndef YYNOERRORRECOVERY int yyerrcnt; /* Shifts left before out of the error */ #endif ParseARG_SDECL /* A place to hold %extra_argument */ ParseCTX_SDECL /* A place to hold %extra_context */ #if YYSTACKDEPTH<=0 int yystksz; /* Current side of the stack */ yyStackEntry *yystack; /* The parser's stack */ yyStackEntry yystk0; /* First stack entry */ #else yyStackEntry yystack[YYSTACKDEPTH]; /* The parser's stack */ yyStackEntry *yystackEnd; /* Last entry in the stack */ #endif }; typedef struct yyParser yyParser; #ifndef NDEBUG #include static FILE *yyTraceFILE = 0; static char *yyTracePrompt = 0; #endif /* NDEBUG */ #ifndef NDEBUG /* ** Turn parser tracing on by giving a stream to which to write the trace ** and a prompt to preface each trace message. Tracing is turned off ** by making either argument NULL ** ** Inputs: **
    **
  • A FILE* to which trace output should be written. ** If NULL, then tracing is turned off. **
  • A prefix string written at the beginning of every ** line of trace output. If NULL, then tracing is ** turned off. **
** ** Outputs: ** None. */ void ParseTrace(FILE *TraceFILE, char *zTracePrompt){ yyTraceFILE = TraceFILE; yyTracePrompt = zTracePrompt; if( yyTraceFILE==0 ) yyTracePrompt = 0; else if( yyTracePrompt==0 ) yyTraceFILE = 0; } #endif /* NDEBUG */ #if defined(YYCOVERAGE) || !defined(NDEBUG) /* For tracing shifts, the names of all terminals and nonterminals ** are required. The following table supplies these names */ static const char *const yyTokenName[] = { /* 0 */ "$", /* 1 */ "OR", /* 2 */ "AND", /* 3 */ "UNION", /* 4 */ "ALL", /* 5 */ "MINUS", /* 6 */ "EXCEPT", /* 7 */ "INTERSECT", /* 8 */ "NK_BITAND", /* 9 */ "NK_BITOR", /* 10 */ "NK_LSHIFT", /* 11 */ "NK_RSHIFT", /* 12 */ "NK_PLUS", /* 13 */ "NK_MINUS", /* 14 */ "NK_STAR", /* 15 */ "NK_SLASH", /* 16 */ "NK_REM", /* 17 */ "NK_CONCAT", /* 18 */ "CREATE", /* 19 */ "ACCOUNT", /* 20 */ "NK_ID", /* 21 */ "PASS", /* 22 */ "NK_STRING", /* 23 */ "ALTER", /* 24 */ "PPS", /* 25 */ "TSERIES", /* 26 */ "STORAGE", /* 27 */ "STREAMS", /* 28 */ "QTIME", /* 29 */ "DBS", /* 30 */ "USERS", /* 31 */ "CONNS", /* 32 */ "STATE", /* 33 */ "USER", /* 34 */ "PRIVILEGE", /* 35 */ "DROP", /* 36 */ "DNODE", /* 37 */ "PORT", /* 38 */ "NK_INTEGER", /* 39 */ "DNODES", /* 40 */ "NK_IPTOKEN", /* 41 */ "LOCAL", /* 42 */ "QNODE", /* 43 */ "ON", /* 44 */ "BNODE", /* 45 */ "SNODE", /* 46 */ "MNODE", /* 47 */ "DATABASE", /* 48 */ "USE", /* 49 */ "IF", /* 50 */ "NOT", /* 51 */ "EXISTS", /* 52 */ "BLOCKS", /* 53 */ "CACHE", /* 54 */ "CACHELAST", /* 55 */ "COMP", /* 56 */ "DAYS", /* 57 */ "NK_VARIABLE", /* 58 */ "FSYNC", /* 59 */ "MAXROWS", /* 60 */ "MINROWS", /* 61 */ "KEEP", /* 62 */ "PRECISION", /* 63 */ "QUORUM", /* 64 */ "REPLICA", /* 65 */ "TTL", /* 66 */ "WAL", /* 67 */ "VGROUPS", /* 68 */ "SINGLE_STABLE", /* 69 */ "STREAM_MODE", /* 70 */ "RETENTIONS", /* 71 */ "NK_COMMA", /* 72 */ "NK_COLON", /* 73 */ "TABLE", /* 74 */ "NK_LP", /* 75 */ "NK_RP", /* 76 */ "STABLE", /* 77 */ "ADD", /* 78 */ "COLUMN", /* 79 */ "MODIFY", /* 80 */ "RENAME", /* 81 */ "TAG", /* 82 */ "SET", /* 83 */ "NK_EQ", /* 84 */ "USING", /* 85 */ "TAGS", /* 86 */ "NK_DOT", /* 87 */ "COMMENT", /* 88 */ "BOOL", /* 89 */ "TINYINT", /* 90 */ "SMALLINT", /* 91 */ "INT", /* 92 */ "INTEGER", /* 93 */ "BIGINT", /* 94 */ "FLOAT", /* 95 */ "DOUBLE", /* 96 */ "BINARY", /* 97 */ "TIMESTAMP", /* 98 */ "NCHAR", /* 99 */ "UNSIGNED", /* 100 */ "JSON", /* 101 */ "VARCHAR", /* 102 */ "MEDIUMBLOB", /* 103 */ "BLOB", /* 104 */ "VARBINARY", /* 105 */ "DECIMAL", /* 106 */ "SMA", /* 107 */ "ROLLUP", /* 108 */ "FILE_FACTOR", /* 109 */ "NK_FLOAT", /* 110 */ "DELAY", /* 111 */ "SHOW", /* 112 */ "DATABASES", /* 113 */ "TABLES", /* 114 */ "STABLES", /* 115 */ "MNODES", /* 116 */ "MODULES", /* 117 */ "QNODES", /* 118 */ "FUNCTIONS", /* 119 */ "INDEXES", /* 120 */ "FROM", /* 121 */ "ACCOUNTS", /* 122 */ "APPS", /* 123 */ "CONNECTIONS", /* 124 */ "LICENCE", /* 125 */ "GRANTS", /* 126 */ "QUERIES", /* 127 */ "SCORES", /* 128 */ "TOPICS", /* 129 */ "VARIABLES", /* 130 */ "BNODES", /* 131 */ "SNODES", /* 132 */ "LIKE", /* 133 */ "INDEX", /* 134 */ "FULLTEXT", /* 135 */ "FUNCTION", /* 136 */ "INTERVAL", /* 137 */ "TOPIC", /* 138 */ "AS", /* 139 */ "DESC", /* 140 */ "DESCRIBE", /* 141 */ "RESET", /* 142 */ "QUERY", /* 143 */ "EXPLAIN", /* 144 */ "ANALYZE", /* 145 */ "VERBOSE", /* 146 */ "NK_BOOL", /* 147 */ "RATIO", /* 148 */ "COMPACT", /* 149 */ "VNODES", /* 150 */ "IN", /* 151 */ "OUTPUTTYPE", /* 152 */ "AGGREGATE", /* 153 */ "BUFSIZE", /* 154 */ "STREAM", /* 155 */ "INTO", /* 156 */ "KILL", /* 157 */ "CONNECTION", /* 158 */ "MERGE", /* 159 */ "VGROUP", /* 160 */ "REDISTRIBUTE", /* 161 */ "SPLIT", /* 162 */ "SYNCDB", /* 163 */ "NULL", /* 164 */ "FIRST", /* 165 */ "LAST", /* 166 */ "CAST", /* 167 */ "NOW", /* 168 */ "TODAY", /* 169 */ "ROWTS", /* 170 */ "TBNAME", /* 171 */ "QSTARTTS", /* 172 */ "QENDTS", /* 173 */ "WSTARTTS", /* 174 */ "WENDTS", /* 175 */ "WDURATION", /* 176 */ "BETWEEN", /* 177 */ "IS", /* 178 */ "NK_LT", /* 179 */ "NK_GT", /* 180 */ "NK_LE", /* 181 */ "NK_GE", /* 182 */ "NK_NE", /* 183 */ "MATCH", /* 184 */ "NMATCH", /* 185 */ "JOIN", /* 186 */ "INNER", /* 187 */ "SELECT", /* 188 */ "DISTINCT", /* 189 */ "WHERE", /* 190 */ "PARTITION", /* 191 */ "BY", /* 192 */ "SESSION", /* 193 */ "STATE_WINDOW", /* 194 */ "SLIDING", /* 195 */ "FILL", /* 196 */ "VALUE", /* 197 */ "NONE", /* 198 */ "PREV", /* 199 */ "LINEAR", /* 200 */ "NEXT", /* 201 */ "GROUP", /* 202 */ "HAVING", /* 203 */ "ORDER", /* 204 */ "SLIMIT", /* 205 */ "SOFFSET", /* 206 */ "LIMIT", /* 207 */ "OFFSET", /* 208 */ "ASC", /* 209 */ "NULLS", /* 210 */ "cmd", /* 211 */ "account_options", /* 212 */ "alter_account_options", /* 213 */ "literal", /* 214 */ "alter_account_option", /* 215 */ "user_name", /* 216 */ "dnode_endpoint", /* 217 */ "dnode_host_name", /* 218 */ "not_exists_opt", /* 219 */ "db_name", /* 220 */ "db_options", /* 221 */ "exists_opt", /* 222 */ "alter_db_options", /* 223 */ "integer_list", /* 224 */ "variable_list", /* 225 */ "retention_list", /* 226 */ "alter_db_option", /* 227 */ "retention", /* 228 */ "full_table_name", /* 229 */ "column_def_list", /* 230 */ "tags_def_opt", /* 231 */ "table_options", /* 232 */ "multi_create_clause", /* 233 */ "tags_def", /* 234 */ "multi_drop_clause", /* 235 */ "alter_table_clause", /* 236 */ "alter_table_options", /* 237 */ "column_name", /* 238 */ "type_name", /* 239 */ "create_subtable_clause", /* 240 */ "specific_tags_opt", /* 241 */ "literal_list", /* 242 */ "drop_table_clause", /* 243 */ "col_name_list", /* 244 */ "table_name", /* 245 */ "column_def", /* 246 */ "func_name_list", /* 247 */ "alter_table_option", /* 248 */ "col_name", /* 249 */ "db_name_cond_opt", /* 250 */ "like_pattern_opt", /* 251 */ "table_name_cond", /* 252 */ "from_db_opt", /* 253 */ "func_name", /* 254 */ "function_name", /* 255 */ "index_name", /* 256 */ "index_options", /* 257 */ "func_list", /* 258 */ "duration_literal", /* 259 */ "sliding_opt", /* 260 */ "func", /* 261 */ "expression_list", /* 262 */ "topic_name", /* 263 */ "query_expression", /* 264 */ "analyze_opt", /* 265 */ "explain_options", /* 266 */ "agg_func_opt", /* 267 */ "bufsize_opt", /* 268 */ "stream_name", /* 269 */ "dnode_list", /* 270 */ "signed", /* 271 */ "signed_literal", /* 272 */ "table_alias", /* 273 */ "column_alias", /* 274 */ "expression", /* 275 */ "pseudo_column", /* 276 */ "column_reference", /* 277 */ "subquery", /* 278 */ "predicate", /* 279 */ "compare_op", /* 280 */ "in_op", /* 281 */ "in_predicate_value", /* 282 */ "boolean_value_expression", /* 283 */ "boolean_primary", /* 284 */ "common_expression", /* 285 */ "from_clause", /* 286 */ "table_reference_list", /* 287 */ "table_reference", /* 288 */ "table_primary", /* 289 */ "joined_table", /* 290 */ "alias_opt", /* 291 */ "parenthesized_joined_table", /* 292 */ "join_type", /* 293 */ "search_condition", /* 294 */ "query_specification", /* 295 */ "set_quantifier_opt", /* 296 */ "select_list", /* 297 */ "where_clause_opt", /* 298 */ "partition_by_clause_opt", /* 299 */ "twindow_clause_opt", /* 300 */ "group_by_clause_opt", /* 301 */ "having_clause_opt", /* 302 */ "select_sublist", /* 303 */ "select_item", /* 304 */ "fill_opt", /* 305 */ "fill_mode", /* 306 */ "group_by_list", /* 307 */ "query_expression_body", /* 308 */ "order_by_clause_opt", /* 309 */ "slimit_clause_opt", /* 310 */ "limit_clause_opt", /* 311 */ "query_primary", /* 312 */ "sort_specification_list", /* 313 */ "sort_specification", /* 314 */ "ordering_specification_opt", /* 315 */ "null_ordering_opt", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ #ifndef NDEBUG /* For tracing reduce actions, the names of all rules are required. */ static const char *const yyRuleName[] = { /* 0 */ "cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options", /* 1 */ "cmd ::= ALTER ACCOUNT NK_ID alter_account_options", /* 2 */ "account_options ::=", /* 3 */ "account_options ::= account_options PPS literal", /* 4 */ "account_options ::= account_options TSERIES literal", /* 5 */ "account_options ::= account_options STORAGE literal", /* 6 */ "account_options ::= account_options STREAMS literal", /* 7 */ "account_options ::= account_options QTIME literal", /* 8 */ "account_options ::= account_options DBS literal", /* 9 */ "account_options ::= account_options USERS literal", /* 10 */ "account_options ::= account_options CONNS literal", /* 11 */ "account_options ::= account_options STATE literal", /* 12 */ "alter_account_options ::= alter_account_option", /* 13 */ "alter_account_options ::= alter_account_options alter_account_option", /* 14 */ "alter_account_option ::= PASS literal", /* 15 */ "alter_account_option ::= PPS literal", /* 16 */ "alter_account_option ::= TSERIES literal", /* 17 */ "alter_account_option ::= STORAGE literal", /* 18 */ "alter_account_option ::= STREAMS literal", /* 19 */ "alter_account_option ::= QTIME literal", /* 20 */ "alter_account_option ::= DBS literal", /* 21 */ "alter_account_option ::= USERS literal", /* 22 */ "alter_account_option ::= CONNS literal", /* 23 */ "alter_account_option ::= STATE literal", /* 24 */ "cmd ::= CREATE USER user_name PASS NK_STRING", /* 25 */ "cmd ::= ALTER USER user_name PASS NK_STRING", /* 26 */ "cmd ::= ALTER USER user_name PRIVILEGE NK_STRING", /* 27 */ "cmd ::= DROP USER user_name", /* 28 */ "cmd ::= CREATE DNODE dnode_endpoint", /* 29 */ "cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER", /* 30 */ "cmd ::= DROP DNODE NK_INTEGER", /* 31 */ "cmd ::= DROP DNODE dnode_endpoint", /* 32 */ "cmd ::= ALTER DNODE NK_INTEGER NK_STRING", /* 33 */ "cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING", /* 34 */ "cmd ::= ALTER ALL DNODES NK_STRING", /* 35 */ "cmd ::= ALTER ALL DNODES NK_STRING NK_STRING", /* 36 */ "dnode_endpoint ::= NK_STRING", /* 37 */ "dnode_host_name ::= NK_ID", /* 38 */ "dnode_host_name ::= NK_IPTOKEN", /* 39 */ "cmd ::= ALTER LOCAL NK_STRING", /* 40 */ "cmd ::= ALTER LOCAL NK_STRING NK_STRING", /* 41 */ "cmd ::= CREATE QNODE ON DNODE NK_INTEGER", /* 42 */ "cmd ::= DROP QNODE ON DNODE NK_INTEGER", /* 43 */ "cmd ::= CREATE BNODE ON DNODE NK_INTEGER", /* 44 */ "cmd ::= DROP BNODE ON DNODE NK_INTEGER", /* 45 */ "cmd ::= CREATE SNODE ON DNODE NK_INTEGER", /* 46 */ "cmd ::= DROP SNODE ON DNODE NK_INTEGER", /* 47 */ "cmd ::= CREATE MNODE ON DNODE NK_INTEGER", /* 48 */ "cmd ::= DROP MNODE ON DNODE NK_INTEGER", /* 49 */ "cmd ::= CREATE DATABASE not_exists_opt db_name db_options", /* 50 */ "cmd ::= DROP DATABASE exists_opt db_name", /* 51 */ "cmd ::= USE db_name", /* 52 */ "cmd ::= ALTER DATABASE db_name alter_db_options", /* 53 */ "not_exists_opt ::= IF NOT EXISTS", /* 54 */ "not_exists_opt ::=", /* 55 */ "exists_opt ::= IF EXISTS", /* 56 */ "exists_opt ::=", /* 57 */ "db_options ::=", /* 58 */ "db_options ::= db_options BLOCKS NK_INTEGER", /* 59 */ "db_options ::= db_options CACHE NK_INTEGER", /* 60 */ "db_options ::= db_options CACHELAST NK_INTEGER", /* 61 */ "db_options ::= db_options COMP NK_INTEGER", /* 62 */ "db_options ::= db_options DAYS NK_INTEGER", /* 63 */ "db_options ::= db_options DAYS NK_VARIABLE", /* 64 */ "db_options ::= db_options FSYNC NK_INTEGER", /* 65 */ "db_options ::= db_options MAXROWS NK_INTEGER", /* 66 */ "db_options ::= db_options MINROWS NK_INTEGER", /* 67 */ "db_options ::= db_options KEEP integer_list", /* 68 */ "db_options ::= db_options KEEP variable_list", /* 69 */ "db_options ::= db_options PRECISION NK_STRING", /* 70 */ "db_options ::= db_options QUORUM NK_INTEGER", /* 71 */ "db_options ::= db_options REPLICA NK_INTEGER", /* 72 */ "db_options ::= db_options TTL NK_INTEGER", /* 73 */ "db_options ::= db_options WAL NK_INTEGER", /* 74 */ "db_options ::= db_options VGROUPS NK_INTEGER", /* 75 */ "db_options ::= db_options SINGLE_STABLE NK_INTEGER", /* 76 */ "db_options ::= db_options STREAM_MODE NK_INTEGER", /* 77 */ "db_options ::= db_options RETENTIONS retention_list", /* 78 */ "alter_db_options ::= alter_db_option", /* 79 */ "alter_db_options ::= alter_db_options alter_db_option", /* 80 */ "alter_db_option ::= BLOCKS NK_INTEGER", /* 81 */ "alter_db_option ::= FSYNC NK_INTEGER", /* 82 */ "alter_db_option ::= KEEP integer_list", /* 83 */ "alter_db_option ::= KEEP variable_list", /* 84 */ "alter_db_option ::= WAL NK_INTEGER", /* 85 */ "alter_db_option ::= QUORUM NK_INTEGER", /* 86 */ "alter_db_option ::= CACHELAST NK_INTEGER", /* 87 */ "alter_db_option ::= REPLICA NK_INTEGER", /* 88 */ "integer_list ::= NK_INTEGER", /* 89 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER", /* 90 */ "variable_list ::= NK_VARIABLE", /* 91 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE", /* 92 */ "retention_list ::= retention", /* 93 */ "retention_list ::= retention_list NK_COMMA retention", /* 94 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE", /* 95 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options", /* 96 */ "cmd ::= CREATE TABLE multi_create_clause", /* 97 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options", /* 98 */ "cmd ::= DROP TABLE multi_drop_clause", /* 99 */ "cmd ::= DROP STABLE exists_opt full_table_name", /* 100 */ "cmd ::= ALTER TABLE alter_table_clause", /* 101 */ "cmd ::= ALTER STABLE alter_table_clause", /* 102 */ "alter_table_clause ::= full_table_name alter_table_options", /* 103 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name", /* 104 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name", /* 105 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name", /* 106 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name", /* 107 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name", /* 108 */ "alter_table_clause ::= full_table_name DROP TAG column_name", /* 109 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name", /* 110 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name", /* 111 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ literal", /* 112 */ "multi_create_clause ::= create_subtable_clause", /* 113 */ "multi_create_clause ::= multi_create_clause create_subtable_clause", /* 114 */ "create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP", /* 115 */ "multi_drop_clause ::= drop_table_clause", /* 116 */ "multi_drop_clause ::= multi_drop_clause drop_table_clause", /* 117 */ "drop_table_clause ::= exists_opt full_table_name", /* 118 */ "specific_tags_opt ::=", /* 119 */ "specific_tags_opt ::= NK_LP col_name_list NK_RP", /* 120 */ "full_table_name ::= table_name", /* 121 */ "full_table_name ::= db_name NK_DOT table_name", /* 122 */ "column_def_list ::= column_def", /* 123 */ "column_def_list ::= column_def_list NK_COMMA column_def", /* 124 */ "column_def ::= column_name type_name", /* 125 */ "column_def ::= column_name type_name COMMENT NK_STRING", /* 126 */ "type_name ::= BOOL", /* 127 */ "type_name ::= TINYINT", /* 128 */ "type_name ::= SMALLINT", /* 129 */ "type_name ::= INT", /* 130 */ "type_name ::= INTEGER", /* 131 */ "type_name ::= BIGINT", /* 132 */ "type_name ::= FLOAT", /* 133 */ "type_name ::= DOUBLE", /* 134 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", /* 135 */ "type_name ::= TIMESTAMP", /* 136 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", /* 137 */ "type_name ::= TINYINT UNSIGNED", /* 138 */ "type_name ::= SMALLINT UNSIGNED", /* 139 */ "type_name ::= INT UNSIGNED", /* 140 */ "type_name ::= BIGINT UNSIGNED", /* 141 */ "type_name ::= JSON", /* 142 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", /* 143 */ "type_name ::= MEDIUMBLOB", /* 144 */ "type_name ::= BLOB", /* 145 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", /* 146 */ "type_name ::= DECIMAL", /* 147 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", /* 148 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", /* 149 */ "tags_def_opt ::=", /* 150 */ "tags_def_opt ::= tags_def", /* 151 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP", /* 152 */ "table_options ::=", /* 153 */ "table_options ::= table_options COMMENT NK_STRING", /* 154 */ "table_options ::= table_options KEEP integer_list", /* 155 */ "table_options ::= table_options TTL NK_INTEGER", /* 156 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", /* 157 */ "table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP", /* 158 */ "table_options ::= table_options FILE_FACTOR NK_FLOAT", /* 159 */ "table_options ::= table_options DELAY NK_INTEGER", /* 160 */ "alter_table_options ::= alter_table_option", /* 161 */ "alter_table_options ::= alter_table_options alter_table_option", /* 162 */ "alter_table_option ::= COMMENT NK_STRING", /* 163 */ "alter_table_option ::= KEEP integer_list", /* 164 */ "alter_table_option ::= TTL NK_INTEGER", /* 165 */ "col_name_list ::= col_name", /* 166 */ "col_name_list ::= col_name_list NK_COMMA col_name", /* 167 */ "col_name ::= column_name", /* 168 */ "cmd ::= SHOW DNODES", /* 169 */ "cmd ::= SHOW USERS", /* 170 */ "cmd ::= SHOW DATABASES", /* 171 */ "cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt", /* 172 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", /* 173 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", /* 174 */ "cmd ::= SHOW MNODES", /* 175 */ "cmd ::= SHOW MODULES", /* 176 */ "cmd ::= SHOW QNODES", /* 177 */ "cmd ::= SHOW FUNCTIONS", /* 178 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", /* 179 */ "cmd ::= SHOW STREAMS", /* 180 */ "cmd ::= SHOW ACCOUNTS", /* 181 */ "cmd ::= SHOW APPS", /* 182 */ "cmd ::= SHOW CONNECTIONS", /* 183 */ "cmd ::= SHOW LICENCE", /* 184 */ "cmd ::= SHOW GRANTS", /* 185 */ "cmd ::= SHOW CREATE DATABASE db_name", /* 186 */ "cmd ::= SHOW CREATE TABLE full_table_name", /* 187 */ "cmd ::= SHOW CREATE STABLE full_table_name", /* 188 */ "cmd ::= SHOW QUERIES", /* 189 */ "cmd ::= SHOW SCORES", /* 190 */ "cmd ::= SHOW TOPICS", /* 191 */ "cmd ::= SHOW VARIABLES", /* 192 */ "cmd ::= SHOW BNODES", /* 193 */ "cmd ::= SHOW SNODES", /* 194 */ "db_name_cond_opt ::=", /* 195 */ "db_name_cond_opt ::= db_name NK_DOT", /* 196 */ "like_pattern_opt ::=", /* 197 */ "like_pattern_opt ::= LIKE NK_STRING", /* 198 */ "table_name_cond ::= table_name", /* 199 */ "from_db_opt ::=", /* 200 */ "from_db_opt ::= FROM db_name", /* 201 */ "func_name_list ::= func_name", /* 202 */ "func_name_list ::= func_name_list NK_COMMA col_name", /* 203 */ "func_name ::= function_name", /* 204 */ "cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options", /* 205 */ "cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP", /* 206 */ "cmd ::= DROP INDEX exists_opt index_name ON table_name", /* 207 */ "index_options ::=", /* 208 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt", /* 209 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt", /* 210 */ "func_list ::= func", /* 211 */ "func_list ::= func_list NK_COMMA func", /* 212 */ "func ::= function_name NK_LP expression_list NK_RP", /* 213 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression", /* 214 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS db_name", /* 215 */ "cmd ::= DROP TOPIC exists_opt topic_name", /* 216 */ "cmd ::= DESC full_table_name", /* 217 */ "cmd ::= DESCRIBE full_table_name", /* 218 */ "cmd ::= RESET QUERY CACHE", /* 219 */ "cmd ::= EXPLAIN analyze_opt explain_options query_expression", /* 220 */ "analyze_opt ::=", /* 221 */ "analyze_opt ::= ANALYZE", /* 222 */ "explain_options ::=", /* 223 */ "explain_options ::= explain_options VERBOSE NK_BOOL", /* 224 */ "explain_options ::= explain_options RATIO NK_FLOAT", /* 225 */ "cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP", /* 226 */ "cmd ::= CREATE agg_func_opt FUNCTION function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt", /* 227 */ "cmd ::= DROP FUNCTION function_name", /* 228 */ "agg_func_opt ::=", /* 229 */ "agg_func_opt ::= AGGREGATE", /* 230 */ "bufsize_opt ::=", /* 231 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", /* 232 */ "cmd ::= CREATE STREAM stream_name INTO table_name AS query_expression", /* 233 */ "cmd ::= DROP STREAM stream_name", /* 234 */ "cmd ::= KILL CONNECTION NK_INTEGER", /* 235 */ "cmd ::= KILL QUERY NK_INTEGER", /* 236 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", /* 237 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", /* 238 */ "cmd ::= SPLIT VGROUP NK_INTEGER", /* 239 */ "dnode_list ::= DNODE NK_INTEGER", /* 240 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", /* 241 */ "cmd ::= SYNCDB db_name REPLICA", /* 242 */ "cmd ::= query_expression", /* 243 */ "literal ::= NK_INTEGER", /* 244 */ "literal ::= NK_FLOAT", /* 245 */ "literal ::= NK_STRING", /* 246 */ "literal ::= NK_BOOL", /* 247 */ "literal ::= TIMESTAMP NK_STRING", /* 248 */ "literal ::= duration_literal", /* 249 */ "literal ::= NULL", /* 250 */ "duration_literal ::= NK_VARIABLE", /* 251 */ "signed ::= NK_INTEGER", /* 252 */ "signed ::= NK_PLUS NK_INTEGER", /* 253 */ "signed ::= NK_MINUS NK_INTEGER", /* 254 */ "signed ::= NK_FLOAT", /* 255 */ "signed ::= NK_PLUS NK_FLOAT", /* 256 */ "signed ::= NK_MINUS NK_FLOAT", /* 257 */ "signed_literal ::= signed", /* 258 */ "signed_literal ::= NK_STRING", /* 259 */ "signed_literal ::= NK_BOOL", /* 260 */ "signed_literal ::= TIMESTAMP NK_STRING", /* 261 */ "signed_literal ::= duration_literal", /* 262 */ "signed_literal ::= NULL", /* 263 */ "literal_list ::= signed_literal", /* 264 */ "literal_list ::= literal_list NK_COMMA signed_literal", /* 265 */ "db_name ::= NK_ID", /* 266 */ "table_name ::= NK_ID", /* 267 */ "column_name ::= NK_ID", /* 268 */ "function_name ::= NK_ID", /* 269 */ "function_name ::= FIRST", /* 270 */ "function_name ::= LAST", /* 271 */ "table_alias ::= NK_ID", /* 272 */ "column_alias ::= NK_ID", /* 273 */ "user_name ::= NK_ID", /* 274 */ "index_name ::= NK_ID", /* 275 */ "topic_name ::= NK_ID", /* 276 */ "stream_name ::= NK_ID", /* 277 */ "expression ::= literal", /* 278 */ "expression ::= pseudo_column", /* 279 */ "expression ::= column_reference", /* 280 */ "expression ::= function_name NK_LP expression_list NK_RP", /* 281 */ "expression ::= function_name NK_LP NK_STAR NK_RP", /* 282 */ "expression ::= CAST NK_LP expression AS type_name NK_RP", /* 283 */ "expression ::= subquery", /* 284 */ "expression ::= NK_LP expression NK_RP", /* 285 */ "expression ::= NK_PLUS expression", /* 286 */ "expression ::= NK_MINUS expression", /* 287 */ "expression ::= expression NK_PLUS expression", /* 288 */ "expression ::= expression NK_MINUS expression", /* 289 */ "expression ::= expression NK_STAR expression", /* 290 */ "expression ::= expression NK_SLASH expression", /* 291 */ "expression ::= expression NK_REM expression", /* 292 */ "expression_list ::= expression", /* 293 */ "expression_list ::= expression_list NK_COMMA expression", /* 294 */ "column_reference ::= column_name", /* 295 */ "column_reference ::= table_name NK_DOT column_name", /* 296 */ "pseudo_column ::= NOW", /* 297 */ "pseudo_column ::= TODAY", /* 298 */ "pseudo_column ::= ROWTS", /* 299 */ "pseudo_column ::= TBNAME", /* 300 */ "pseudo_column ::= QSTARTTS", /* 301 */ "pseudo_column ::= QENDTS", /* 302 */ "pseudo_column ::= WSTARTTS", /* 303 */ "pseudo_column ::= WENDTS", /* 304 */ "pseudo_column ::= WDURATION", /* 305 */ "predicate ::= expression compare_op expression", /* 306 */ "predicate ::= expression BETWEEN expression AND expression", /* 307 */ "predicate ::= expression NOT BETWEEN expression AND expression", /* 308 */ "predicate ::= expression IS NULL", /* 309 */ "predicate ::= expression IS NOT NULL", /* 310 */ "predicate ::= expression in_op in_predicate_value", /* 311 */ "compare_op ::= NK_LT", /* 312 */ "compare_op ::= NK_GT", /* 313 */ "compare_op ::= NK_LE", /* 314 */ "compare_op ::= NK_GE", /* 315 */ "compare_op ::= NK_NE", /* 316 */ "compare_op ::= NK_EQ", /* 317 */ "compare_op ::= LIKE", /* 318 */ "compare_op ::= NOT LIKE", /* 319 */ "compare_op ::= MATCH", /* 320 */ "compare_op ::= NMATCH", /* 321 */ "in_op ::= IN", /* 322 */ "in_op ::= NOT IN", /* 323 */ "in_predicate_value ::= NK_LP expression_list NK_RP", /* 324 */ "boolean_value_expression ::= boolean_primary", /* 325 */ "boolean_value_expression ::= NOT boolean_primary", /* 326 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", /* 327 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", /* 328 */ "boolean_primary ::= predicate", /* 329 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", /* 330 */ "common_expression ::= expression", /* 331 */ "common_expression ::= boolean_value_expression", /* 332 */ "from_clause ::= FROM table_reference_list", /* 333 */ "table_reference_list ::= table_reference", /* 334 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", /* 335 */ "table_reference ::= table_primary", /* 336 */ "table_reference ::= joined_table", /* 337 */ "table_primary ::= table_name alias_opt", /* 338 */ "table_primary ::= db_name NK_DOT table_name alias_opt", /* 339 */ "table_primary ::= subquery alias_opt", /* 340 */ "table_primary ::= parenthesized_joined_table", /* 341 */ "alias_opt ::=", /* 342 */ "alias_opt ::= table_alias", /* 343 */ "alias_opt ::= AS table_alias", /* 344 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", /* 345 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", /* 346 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", /* 347 */ "join_type ::=", /* 348 */ "join_type ::= INNER", /* 349 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt", /* 350 */ "set_quantifier_opt ::=", /* 351 */ "set_quantifier_opt ::= DISTINCT", /* 352 */ "set_quantifier_opt ::= ALL", /* 353 */ "select_list ::= NK_STAR", /* 354 */ "select_list ::= select_sublist", /* 355 */ "select_sublist ::= select_item", /* 356 */ "select_sublist ::= select_sublist NK_COMMA select_item", /* 357 */ "select_item ::= common_expression", /* 358 */ "select_item ::= common_expression column_alias", /* 359 */ "select_item ::= common_expression AS column_alias", /* 360 */ "select_item ::= table_name NK_DOT NK_STAR", /* 361 */ "where_clause_opt ::=", /* 362 */ "where_clause_opt ::= WHERE search_condition", /* 363 */ "partition_by_clause_opt ::=", /* 364 */ "partition_by_clause_opt ::= PARTITION BY expression_list", /* 365 */ "twindow_clause_opt ::=", /* 366 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", /* 367 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP", /* 368 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", /* 369 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", /* 370 */ "sliding_opt ::=", /* 371 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", /* 372 */ "fill_opt ::=", /* 373 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", /* 374 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", /* 375 */ "fill_mode ::= NONE", /* 376 */ "fill_mode ::= PREV", /* 377 */ "fill_mode ::= NULL", /* 378 */ "fill_mode ::= LINEAR", /* 379 */ "fill_mode ::= NEXT", /* 380 */ "group_by_clause_opt ::=", /* 381 */ "group_by_clause_opt ::= GROUP BY group_by_list", /* 382 */ "group_by_list ::= expression", /* 383 */ "group_by_list ::= group_by_list NK_COMMA expression", /* 384 */ "having_clause_opt ::=", /* 385 */ "having_clause_opt ::= HAVING search_condition", /* 386 */ "query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt", /* 387 */ "query_expression_body ::= query_primary", /* 388 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body", /* 389 */ "query_primary ::= query_specification", /* 390 */ "order_by_clause_opt ::=", /* 391 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", /* 392 */ "slimit_clause_opt ::=", /* 393 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", /* 394 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", /* 395 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", /* 396 */ "limit_clause_opt ::=", /* 397 */ "limit_clause_opt ::= LIMIT NK_INTEGER", /* 398 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", /* 399 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", /* 400 */ "subquery ::= NK_LP query_expression NK_RP", /* 401 */ "search_condition ::= common_expression", /* 402 */ "sort_specification_list ::= sort_specification", /* 403 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", /* 404 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt", /* 405 */ "ordering_specification_opt ::=", /* 406 */ "ordering_specification_opt ::= ASC", /* 407 */ "ordering_specification_opt ::= DESC", /* 408 */ "null_ordering_opt ::=", /* 409 */ "null_ordering_opt ::= NULLS FIRST", /* 410 */ "null_ordering_opt ::= NULLS LAST", }; #endif /* NDEBUG */ #if YYSTACKDEPTH<=0 /* ** Try to increase the size of the parser stack. Return the number ** of errors. Return 0 on success. */ static int yyGrowStack(yyParser *p){ int newSize; int idx; yyStackEntry *pNew; newSize = p->yystksz*2 + 100; idx = p->yytos ? (int)(p->yytos - p->yystack) : 0; if( p->yystack==&p->yystk0 ){ pNew = malloc(newSize*sizeof(pNew[0])); if( pNew ) pNew[0] = p->yystk0; }else{ pNew = realloc(p->yystack, newSize*sizeof(pNew[0])); } if( pNew ){ p->yystack = pNew; p->yytos = &p->yystack[idx]; #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE,"%sStack grows from %d to %d entries.\n", yyTracePrompt, p->yystksz, newSize); } #endif p->yystksz = newSize; } return pNew==0; } #endif /* Datatype of the argument to the memory allocated passed as the ** second argument to ParseAlloc() below. This can be changed by ** putting an appropriate #define in the %include section of the input ** grammar. */ #ifndef YYMALLOCARGTYPE # define YYMALLOCARGTYPE size_t #endif /* Initialize a new parser that has already been allocated. */ void ParseInit(void *yypRawParser ParseCTX_PDECL){ yyParser *yypParser = (yyParser*)yypRawParser; ParseCTX_STORE #ifdef YYTRACKMAXSTACKDEPTH yypParser->yyhwm = 0; #endif #if YYSTACKDEPTH<=0 yypParser->yytos = NULL; yypParser->yystack = NULL; yypParser->yystksz = 0; if( yyGrowStack(yypParser) ){ yypParser->yystack = &yypParser->yystk0; yypParser->yystksz = 1; } #endif #ifndef YYNOERRORRECOVERY yypParser->yyerrcnt = -1; #endif yypParser->yytos = yypParser->yystack; yypParser->yystack[0].stateno = 0; yypParser->yystack[0].major = 0; #if YYSTACKDEPTH>0 yypParser->yystackEnd = &yypParser->yystack[YYSTACKDEPTH-1]; #endif } #ifndef Parse_ENGINEALWAYSONSTACK /* ** This function allocates a new parser. ** The only argument is a pointer to a function which works like ** malloc. ** ** Inputs: ** A pointer to the function used to allocate memory. ** ** Outputs: ** A pointer to a parser. This pointer is used in subsequent calls ** to Parse and ParseFree. */ void *ParseAlloc(void *(*mallocProc)(YYMALLOCARGTYPE) ParseCTX_PDECL){ yyParser *yypParser; yypParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) ); if( yypParser ){ ParseCTX_STORE ParseInit(yypParser ParseCTX_PARAM); } return (void*)yypParser; } #endif /* Parse_ENGINEALWAYSONSTACK */ /* The following function deletes the "minor type" or semantic value ** associated with a symbol. The symbol can be either a terminal ** or nonterminal. "yymajor" is the symbol code, and "yypminor" is ** a pointer to the value to be deleted. The code used to do the ** deletions is derived from the %destructor and/or %token_destructor ** directives of the input grammar. */ static void yy_destructor( yyParser *yypParser, /* The parser */ YYCODETYPE yymajor, /* Type code for object to destroy */ YYMINORTYPE *yypminor /* The object to be destroyed */ ){ ParseARG_FETCH ParseCTX_FETCH switch( yymajor ){ /* Here is inserted the actions which take place when a ** terminal or non-terminal is destroyed. This can happen ** when the symbol is popped from the stack during a ** reduce or during error processing or when a parser is ** being destroyed before it is finished parsing. ** ** Note: during a reduce, the only symbols destroyed are those ** which appear on the RHS of the rule, but which are *not* used ** inside the C code. */ /********* Begin destructor definitions ***************************************/ /* Default NON-TERMINAL Destructor */ case 210: /* cmd */ case 213: /* literal */ case 220: /* db_options */ case 222: /* alter_db_options */ case 227: /* retention */ case 228: /* full_table_name */ case 231: /* table_options */ case 235: /* alter_table_clause */ case 236: /* alter_table_options */ case 239: /* create_subtable_clause */ case 242: /* drop_table_clause */ case 245: /* column_def */ case 248: /* col_name */ case 249: /* db_name_cond_opt */ case 250: /* like_pattern_opt */ case 251: /* table_name_cond */ case 252: /* from_db_opt */ case 253: /* func_name */ case 256: /* index_options */ case 258: /* duration_literal */ case 259: /* sliding_opt */ case 260: /* func */ case 263: /* query_expression */ case 265: /* explain_options */ case 270: /* signed */ case 271: /* signed_literal */ case 274: /* expression */ case 275: /* pseudo_column */ case 276: /* column_reference */ case 277: /* subquery */ case 278: /* predicate */ case 281: /* in_predicate_value */ case 282: /* boolean_value_expression */ case 283: /* boolean_primary */ case 284: /* common_expression */ case 285: /* from_clause */ case 286: /* table_reference_list */ case 287: /* table_reference */ case 288: /* table_primary */ case 289: /* joined_table */ case 291: /* parenthesized_joined_table */ case 293: /* search_condition */ case 294: /* query_specification */ case 297: /* where_clause_opt */ case 299: /* twindow_clause_opt */ case 301: /* having_clause_opt */ case 303: /* select_item */ case 304: /* fill_opt */ case 307: /* query_expression_body */ case 309: /* slimit_clause_opt */ case 310: /* limit_clause_opt */ case 311: /* query_primary */ case 313: /* sort_specification */ { nodesDestroyNode((yypminor->yy504)); } break; case 211: /* account_options */ case 212: /* alter_account_options */ case 214: /* alter_account_option */ case 267: /* bufsize_opt */ { } break; case 215: /* user_name */ case 216: /* dnode_endpoint */ case 217: /* dnode_host_name */ case 219: /* db_name */ case 237: /* column_name */ case 244: /* table_name */ case 254: /* function_name */ case 255: /* index_name */ case 262: /* topic_name */ case 268: /* stream_name */ case 272: /* table_alias */ case 273: /* column_alias */ case 290: /* alias_opt */ { } break; case 218: /* not_exists_opt */ case 221: /* exists_opt */ case 264: /* analyze_opt */ case 266: /* agg_func_opt */ case 295: /* set_quantifier_opt */ { } break; case 223: /* integer_list */ case 224: /* variable_list */ case 225: /* retention_list */ case 229: /* column_def_list */ case 230: /* tags_def_opt */ case 232: /* multi_create_clause */ case 233: /* tags_def */ case 234: /* multi_drop_clause */ case 240: /* specific_tags_opt */ case 241: /* literal_list */ case 243: /* col_name_list */ case 246: /* func_name_list */ case 257: /* func_list */ case 261: /* expression_list */ case 269: /* dnode_list */ case 296: /* select_list */ case 298: /* partition_by_clause_opt */ case 300: /* group_by_clause_opt */ case 302: /* select_sublist */ case 306: /* group_by_list */ case 308: /* order_by_clause_opt */ case 312: /* sort_specification_list */ { nodesDestroyList((yypminor->yy488)); } break; case 226: /* alter_db_option */ case 247: /* alter_table_option */ { } break; case 238: /* type_name */ { } break; case 279: /* compare_op */ case 280: /* in_op */ { } break; case 292: /* join_type */ { } break; case 305: /* fill_mode */ { } break; case 314: /* ordering_specification_opt */ { } break; case 315: /* null_ordering_opt */ { } break; /********* End destructor definitions *****************************************/ default: break; /* If no destructor action specified: do nothing */ } } /* ** Pop the parser's stack once. ** ** If there is a destructor routine associated with the token which ** is popped from the stack, then call it. */ static void yy_pop_parser_stack(yyParser *pParser){ yyStackEntry *yytos; assert( pParser->yytos!=0 ); assert( pParser->yytos > pParser->yystack ); yytos = pParser->yytos--; #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE,"%sPopping %s\n", yyTracePrompt, yyTokenName[yytos->major]); } #endif yy_destructor(pParser, yytos->major, &yytos->minor); } /* ** Clear all secondary memory allocations from the parser */ void ParseFinalize(void *p){ yyParser *pParser = (yyParser*)p; while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser); #if YYSTACKDEPTH<=0 if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack); #endif } #ifndef Parse_ENGINEALWAYSONSTACK /* ** Deallocate and destroy a parser. Destructors are called for ** all stack elements before shutting the parser down. ** ** If the YYPARSEFREENEVERNULL macro exists (for example because it ** is defined in a %include section of the input grammar) then it is ** assumed that the input pointer is never NULL. */ void ParseFree( void *p, /* The parser to be deleted */ void (*freeProc)(void*) /* Function used to reclaim memory */ ){ #ifndef YYPARSEFREENEVERNULL if( p==0 ) return; #endif ParseFinalize(p); (*freeProc)(p); } #endif /* Parse_ENGINEALWAYSONSTACK */ /* ** Return the peak depth of the stack for a parser. */ #ifdef YYTRACKMAXSTACKDEPTH int ParseStackPeak(void *p){ yyParser *pParser = (yyParser*)p; return pParser->yyhwm; } #endif /* This array of booleans keeps track of the parser statement ** coverage. The element yycoverage[X][Y] is set when the parser ** is in state X and has a lookahead token Y. In a well-tested ** systems, every element of this matrix should end up being set. */ #if defined(YYCOVERAGE) static unsigned char yycoverage[YYNSTATE][YYNTOKEN]; #endif /* ** Write into out a description of every state/lookahead combination that ** ** (1) has not been used by the parser, and ** (2) is not a syntax error. ** ** Return the number of missed state/lookahead combinations. */ #if defined(YYCOVERAGE) int ParseCoverage(FILE *out){ int stateno, iLookAhead, i; int nMissed = 0; for(stateno=0; statenoYY_MAX_SHIFT ) return stateno; assert( stateno <= YY_SHIFT_COUNT ); #if defined(YYCOVERAGE) yycoverage[stateno][iLookAhead] = 1; #endif do{ i = yy_shift_ofst[stateno]; assert( i>=0 ); /* assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD ); */ assert( iLookAhead!=YYNOCODE ); assert( iLookAhead < YYNTOKEN ); i += iLookAhead; if( i>=YY_NLOOKAHEAD || yy_lookahead[i]!=iLookAhead ){ #ifdef YYFALLBACK YYCODETYPE iFallback; /* Fallback token */ if( iLookAhead %s\n", yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]); } #endif assert( yyFallback[iFallback]==0 ); /* Fallback loop must terminate */ iLookAhead = iFallback; continue; } #endif #ifdef YYWILDCARD { int j = i - iLookAhead + YYWILDCARD; if( #if YY_SHIFT_MIN+YYWILDCARD<0 j>=0 && #endif #if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT j0 ){ #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n", yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[YYWILDCARD]); } #endif /* NDEBUG */ return yy_action[j]; } } #endif /* YYWILDCARD */ return yy_default[stateno]; }else{ return yy_action[i]; } }while(1); } /* ** Find the appropriate action for a parser given the non-terminal ** look-ahead token iLookAhead. */ static YYACTIONTYPE yy_find_reduce_action( YYACTIONTYPE stateno, /* Current state number */ YYCODETYPE iLookAhead /* The look-ahead token */ ){ int i; #ifdef YYERRORSYMBOL if( stateno>YY_REDUCE_COUNT ){ return yy_default[stateno]; } #else assert( stateno<=YY_REDUCE_COUNT ); #endif i = yy_reduce_ofst[stateno]; assert( iLookAhead!=YYNOCODE ); i += iLookAhead; #ifdef YYERRORSYMBOL if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){ return yy_default[stateno]; } #else assert( i>=0 && iyytos>yypParser->yystack ) yy_pop_parser_stack(yypParser); /* Here code is inserted which will execute if the parser ** stack every overflows */ /******** Begin %stack_overflow code ******************************************/ /******** End %stack_overflow code ********************************************/ ParseARG_STORE /* Suppress warning about unused %extra_argument var */ ParseCTX_STORE } /* ** Print tracing information for a SHIFT action */ #ifndef NDEBUG static void yyTraceShift(yyParser *yypParser, int yyNewState, const char *zTag){ if( yyTraceFILE ){ if( yyNewStateyytos->major], yyNewState); }else{ fprintf(yyTraceFILE,"%s%s '%s', pending reduce %d\n", yyTracePrompt, zTag, yyTokenName[yypParser->yytos->major], yyNewState - YY_MIN_REDUCE); } } } #else # define yyTraceShift(X,Y,Z) #endif /* ** Perform a shift action. */ static void yy_shift( yyParser *yypParser, /* The parser to be shifted */ YYACTIONTYPE yyNewState, /* The new state to shift in */ YYCODETYPE yyMajor, /* The major token to shift in */ ParseTOKENTYPE yyMinor /* The minor token to shift in */ ){ yyStackEntry *yytos; yypParser->yytos++; #ifdef YYTRACKMAXSTACKDEPTH if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){ yypParser->yyhwm++; assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack) ); } #endif #if YYSTACKDEPTH>0 if( yypParser->yytos>yypParser->yystackEnd ){ yypParser->yytos--; yyStackOverflow(yypParser); return; } #else if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz] ){ if( yyGrowStack(yypParser) ){ yypParser->yytos--; yyStackOverflow(yypParser); return; } } #endif if( yyNewState > YY_MAX_SHIFT ){ yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE; } yytos = yypParser->yytos; yytos->stateno = yyNewState; yytos->major = yyMajor; yytos->minor.yy0 = yyMinor; yyTraceShift(yypParser, yyNewState, "Shift"); } /* The following table contains information about every rule that ** is used during the reduce. */ static const struct { YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */ signed char nrhs; /* Negative of the number of RHS symbols in the rule */ } yyRuleInfo[] = { { 210, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ { 210, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ { 211, 0 }, /* (2) account_options ::= */ { 211, -3 }, /* (3) account_options ::= account_options PPS literal */ { 211, -3 }, /* (4) account_options ::= account_options TSERIES literal */ { 211, -3 }, /* (5) account_options ::= account_options STORAGE literal */ { 211, -3 }, /* (6) account_options ::= account_options STREAMS literal */ { 211, -3 }, /* (7) account_options ::= account_options QTIME literal */ { 211, -3 }, /* (8) account_options ::= account_options DBS literal */ { 211, -3 }, /* (9) account_options ::= account_options USERS literal */ { 211, -3 }, /* (10) account_options ::= account_options CONNS literal */ { 211, -3 }, /* (11) account_options ::= account_options STATE literal */ { 212, -1 }, /* (12) alter_account_options ::= alter_account_option */ { 212, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */ { 214, -2 }, /* (14) alter_account_option ::= PASS literal */ { 214, -2 }, /* (15) alter_account_option ::= PPS literal */ { 214, -2 }, /* (16) alter_account_option ::= TSERIES literal */ { 214, -2 }, /* (17) alter_account_option ::= STORAGE literal */ { 214, -2 }, /* (18) alter_account_option ::= STREAMS literal */ { 214, -2 }, /* (19) alter_account_option ::= QTIME literal */ { 214, -2 }, /* (20) alter_account_option ::= DBS literal */ { 214, -2 }, /* (21) alter_account_option ::= USERS literal */ { 214, -2 }, /* (22) alter_account_option ::= CONNS literal */ { 214, -2 }, /* (23) alter_account_option ::= STATE literal */ { 210, -5 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING */ { 210, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ { 210, -5 }, /* (26) cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ { 210, -3 }, /* (27) cmd ::= DROP USER user_name */ { 210, -3 }, /* (28) cmd ::= CREATE DNODE dnode_endpoint */ { 210, -5 }, /* (29) cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ { 210, -3 }, /* (30) cmd ::= DROP DNODE NK_INTEGER */ { 210, -3 }, /* (31) cmd ::= DROP DNODE dnode_endpoint */ { 210, -4 }, /* (32) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ { 210, -5 }, /* (33) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ { 210, -4 }, /* (34) cmd ::= ALTER ALL DNODES NK_STRING */ { 210, -5 }, /* (35) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ { 216, -1 }, /* (36) dnode_endpoint ::= NK_STRING */ { 217, -1 }, /* (37) dnode_host_name ::= NK_ID */ { 217, -1 }, /* (38) dnode_host_name ::= NK_IPTOKEN */ { 210, -3 }, /* (39) cmd ::= ALTER LOCAL NK_STRING */ { 210, -4 }, /* (40) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ { 210, -5 }, /* (41) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ { 210, -5 }, /* (42) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ { 210, -5 }, /* (43) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ { 210, -5 }, /* (44) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ { 210, -5 }, /* (45) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ { 210, -5 }, /* (46) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ { 210, -5 }, /* (47) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ { 210, -5 }, /* (48) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ { 210, -5 }, /* (49) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ { 210, -4 }, /* (50) cmd ::= DROP DATABASE exists_opt db_name */ { 210, -2 }, /* (51) cmd ::= USE db_name */ { 210, -4 }, /* (52) cmd ::= ALTER DATABASE db_name alter_db_options */ { 218, -3 }, /* (53) not_exists_opt ::= IF NOT EXISTS */ { 218, 0 }, /* (54) not_exists_opt ::= */ { 221, -2 }, /* (55) exists_opt ::= IF EXISTS */ { 221, 0 }, /* (56) exists_opt ::= */ { 220, 0 }, /* (57) db_options ::= */ { 220, -3 }, /* (58) db_options ::= db_options BLOCKS NK_INTEGER */ { 220, -3 }, /* (59) db_options ::= db_options CACHE NK_INTEGER */ { 220, -3 }, /* (60) db_options ::= db_options CACHELAST NK_INTEGER */ { 220, -3 }, /* (61) db_options ::= db_options COMP NK_INTEGER */ { 220, -3 }, /* (62) db_options ::= db_options DAYS NK_INTEGER */ { 220, -3 }, /* (63) db_options ::= db_options DAYS NK_VARIABLE */ { 220, -3 }, /* (64) db_options ::= db_options FSYNC NK_INTEGER */ { 220, -3 }, /* (65) db_options ::= db_options MAXROWS NK_INTEGER */ { 220, -3 }, /* (66) db_options ::= db_options MINROWS NK_INTEGER */ { 220, -3 }, /* (67) db_options ::= db_options KEEP integer_list */ { 220, -3 }, /* (68) db_options ::= db_options KEEP variable_list */ { 220, -3 }, /* (69) db_options ::= db_options PRECISION NK_STRING */ { 220, -3 }, /* (70) db_options ::= db_options QUORUM NK_INTEGER */ { 220, -3 }, /* (71) db_options ::= db_options REPLICA NK_INTEGER */ { 220, -3 }, /* (72) db_options ::= db_options TTL NK_INTEGER */ { 220, -3 }, /* (73) db_options ::= db_options WAL NK_INTEGER */ { 220, -3 }, /* (74) db_options ::= db_options VGROUPS NK_INTEGER */ { 220, -3 }, /* (75) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ { 220, -3 }, /* (76) db_options ::= db_options STREAM_MODE NK_INTEGER */ { 220, -3 }, /* (77) db_options ::= db_options RETENTIONS retention_list */ { 222, -1 }, /* (78) alter_db_options ::= alter_db_option */ { 222, -2 }, /* (79) alter_db_options ::= alter_db_options alter_db_option */ { 226, -2 }, /* (80) alter_db_option ::= BLOCKS NK_INTEGER */ { 226, -2 }, /* (81) alter_db_option ::= FSYNC NK_INTEGER */ { 226, -2 }, /* (82) alter_db_option ::= KEEP integer_list */ { 226, -2 }, /* (83) alter_db_option ::= KEEP variable_list */ { 226, -2 }, /* (84) alter_db_option ::= WAL NK_INTEGER */ { 226, -2 }, /* (85) alter_db_option ::= QUORUM NK_INTEGER */ { 226, -2 }, /* (86) alter_db_option ::= CACHELAST NK_INTEGER */ { 226, -2 }, /* (87) alter_db_option ::= REPLICA NK_INTEGER */ { 223, -1 }, /* (88) integer_list ::= NK_INTEGER */ { 223, -3 }, /* (89) integer_list ::= integer_list NK_COMMA NK_INTEGER */ { 224, -1 }, /* (90) variable_list ::= NK_VARIABLE */ { 224, -3 }, /* (91) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ { 225, -1 }, /* (92) retention_list ::= retention */ { 225, -3 }, /* (93) retention_list ::= retention_list NK_COMMA retention */ { 227, -3 }, /* (94) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ { 210, -9 }, /* (95) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ { 210, -3 }, /* (96) cmd ::= CREATE TABLE multi_create_clause */ { 210, -9 }, /* (97) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ { 210, -3 }, /* (98) cmd ::= DROP TABLE multi_drop_clause */ { 210, -4 }, /* (99) cmd ::= DROP STABLE exists_opt full_table_name */ { 210, -3 }, /* (100) cmd ::= ALTER TABLE alter_table_clause */ { 210, -3 }, /* (101) cmd ::= ALTER STABLE alter_table_clause */ { 235, -2 }, /* (102) alter_table_clause ::= full_table_name alter_table_options */ { 235, -5 }, /* (103) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ { 235, -4 }, /* (104) alter_table_clause ::= full_table_name DROP COLUMN column_name */ { 235, -5 }, /* (105) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ { 235, -5 }, /* (106) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ { 235, -5 }, /* (107) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ { 235, -4 }, /* (108) alter_table_clause ::= full_table_name DROP TAG column_name */ { 235, -5 }, /* (109) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ { 235, -5 }, /* (110) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ { 235, -6 }, /* (111) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ literal */ { 232, -1 }, /* (112) multi_create_clause ::= create_subtable_clause */ { 232, -2 }, /* (113) multi_create_clause ::= multi_create_clause create_subtable_clause */ { 239, -9 }, /* (114) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP */ { 234, -1 }, /* (115) multi_drop_clause ::= drop_table_clause */ { 234, -2 }, /* (116) multi_drop_clause ::= multi_drop_clause drop_table_clause */ { 242, -2 }, /* (117) drop_table_clause ::= exists_opt full_table_name */ { 240, 0 }, /* (118) specific_tags_opt ::= */ { 240, -3 }, /* (119) specific_tags_opt ::= NK_LP col_name_list NK_RP */ { 228, -1 }, /* (120) full_table_name ::= table_name */ { 228, -3 }, /* (121) full_table_name ::= db_name NK_DOT table_name */ { 229, -1 }, /* (122) column_def_list ::= column_def */ { 229, -3 }, /* (123) column_def_list ::= column_def_list NK_COMMA column_def */ { 245, -2 }, /* (124) column_def ::= column_name type_name */ { 245, -4 }, /* (125) column_def ::= column_name type_name COMMENT NK_STRING */ { 238, -1 }, /* (126) type_name ::= BOOL */ { 238, -1 }, /* (127) type_name ::= TINYINT */ { 238, -1 }, /* (128) type_name ::= SMALLINT */ { 238, -1 }, /* (129) type_name ::= INT */ { 238, -1 }, /* (130) type_name ::= INTEGER */ { 238, -1 }, /* (131) type_name ::= BIGINT */ { 238, -1 }, /* (132) type_name ::= FLOAT */ { 238, -1 }, /* (133) type_name ::= DOUBLE */ { 238, -4 }, /* (134) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ { 238, -1 }, /* (135) type_name ::= TIMESTAMP */ { 238, -4 }, /* (136) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ { 238, -2 }, /* (137) type_name ::= TINYINT UNSIGNED */ { 238, -2 }, /* (138) type_name ::= SMALLINT UNSIGNED */ { 238, -2 }, /* (139) type_name ::= INT UNSIGNED */ { 238, -2 }, /* (140) type_name ::= BIGINT UNSIGNED */ { 238, -1 }, /* (141) type_name ::= JSON */ { 238, -4 }, /* (142) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ { 238, -1 }, /* (143) type_name ::= MEDIUMBLOB */ { 238, -1 }, /* (144) type_name ::= BLOB */ { 238, -4 }, /* (145) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ { 238, -1 }, /* (146) type_name ::= DECIMAL */ { 238, -4 }, /* (147) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ { 238, -6 }, /* (148) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ { 230, 0 }, /* (149) tags_def_opt ::= */ { 230, -1 }, /* (150) tags_def_opt ::= tags_def */ { 233, -4 }, /* (151) tags_def ::= TAGS NK_LP column_def_list NK_RP */ { 231, 0 }, /* (152) table_options ::= */ { 231, -3 }, /* (153) table_options ::= table_options COMMENT NK_STRING */ { 231, -3 }, /* (154) table_options ::= table_options KEEP integer_list */ { 231, -3 }, /* (155) table_options ::= table_options TTL NK_INTEGER */ { 231, -5 }, /* (156) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ { 231, -5 }, /* (157) table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP */ { 231, -3 }, /* (158) table_options ::= table_options FILE_FACTOR NK_FLOAT */ { 231, -3 }, /* (159) table_options ::= table_options DELAY NK_INTEGER */ { 236, -1 }, /* (160) alter_table_options ::= alter_table_option */ { 236, -2 }, /* (161) alter_table_options ::= alter_table_options alter_table_option */ { 247, -2 }, /* (162) alter_table_option ::= COMMENT NK_STRING */ { 247, -2 }, /* (163) alter_table_option ::= KEEP integer_list */ { 247, -2 }, /* (164) alter_table_option ::= TTL NK_INTEGER */ { 243, -1 }, /* (165) col_name_list ::= col_name */ { 243, -3 }, /* (166) col_name_list ::= col_name_list NK_COMMA col_name */ { 248, -1 }, /* (167) col_name ::= column_name */ { 210, -2 }, /* (168) cmd ::= SHOW DNODES */ { 210, -2 }, /* (169) cmd ::= SHOW USERS */ { 210, -2 }, /* (170) cmd ::= SHOW DATABASES */ { 210, -4 }, /* (171) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ { 210, -4 }, /* (172) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ { 210, -3 }, /* (173) cmd ::= SHOW db_name_cond_opt VGROUPS */ { 210, -2 }, /* (174) cmd ::= SHOW MNODES */ { 210, -2 }, /* (175) cmd ::= SHOW MODULES */ { 210, -2 }, /* (176) cmd ::= SHOW QNODES */ { 210, -2 }, /* (177) cmd ::= SHOW FUNCTIONS */ { 210, -5 }, /* (178) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ { 210, -2 }, /* (179) cmd ::= SHOW STREAMS */ { 210, -2 }, /* (180) cmd ::= SHOW ACCOUNTS */ { 210, -2 }, /* (181) cmd ::= SHOW APPS */ { 210, -2 }, /* (182) cmd ::= SHOW CONNECTIONS */ { 210, -2 }, /* (183) cmd ::= SHOW LICENCE */ { 210, -2 }, /* (184) cmd ::= SHOW GRANTS */ { 210, -4 }, /* (185) cmd ::= SHOW CREATE DATABASE db_name */ { 210, -4 }, /* (186) cmd ::= SHOW CREATE TABLE full_table_name */ { 210, -4 }, /* (187) cmd ::= SHOW CREATE STABLE full_table_name */ { 210, -2 }, /* (188) cmd ::= SHOW QUERIES */ { 210, -2 }, /* (189) cmd ::= SHOW SCORES */ { 210, -2 }, /* (190) cmd ::= SHOW TOPICS */ { 210, -2 }, /* (191) cmd ::= SHOW VARIABLES */ { 210, -2 }, /* (192) cmd ::= SHOW BNODES */ { 210, -2 }, /* (193) cmd ::= SHOW SNODES */ { 249, 0 }, /* (194) db_name_cond_opt ::= */ { 249, -2 }, /* (195) db_name_cond_opt ::= db_name NK_DOT */ { 250, 0 }, /* (196) like_pattern_opt ::= */ { 250, -2 }, /* (197) like_pattern_opt ::= LIKE NK_STRING */ { 251, -1 }, /* (198) table_name_cond ::= table_name */ { 252, 0 }, /* (199) from_db_opt ::= */ { 252, -2 }, /* (200) from_db_opt ::= FROM db_name */ { 246, -1 }, /* (201) func_name_list ::= func_name */ { 246, -3 }, /* (202) func_name_list ::= func_name_list NK_COMMA col_name */ { 253, -1 }, /* (203) func_name ::= function_name */ { 210, -8 }, /* (204) cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ { 210, -10 }, /* (205) cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ { 210, -6 }, /* (206) cmd ::= DROP INDEX exists_opt index_name ON table_name */ { 256, 0 }, /* (207) index_options ::= */ { 256, -9 }, /* (208) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ { 256, -11 }, /* (209) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ { 257, -1 }, /* (210) func_list ::= func */ { 257, -3 }, /* (211) func_list ::= func_list NK_COMMA func */ { 260, -4 }, /* (212) func ::= function_name NK_LP expression_list NK_RP */ { 210, -6 }, /* (213) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */ { 210, -6 }, /* (214) cmd ::= CREATE TOPIC not_exists_opt topic_name AS db_name */ { 210, -4 }, /* (215) cmd ::= DROP TOPIC exists_opt topic_name */ { 210, -2 }, /* (216) cmd ::= DESC full_table_name */ { 210, -2 }, /* (217) cmd ::= DESCRIBE full_table_name */ { 210, -3 }, /* (218) cmd ::= RESET QUERY CACHE */ { 210, -4 }, /* (219) cmd ::= EXPLAIN analyze_opt explain_options query_expression */ { 264, 0 }, /* (220) analyze_opt ::= */ { 264, -1 }, /* (221) analyze_opt ::= ANALYZE */ { 265, 0 }, /* (222) explain_options ::= */ { 265, -3 }, /* (223) explain_options ::= explain_options VERBOSE NK_BOOL */ { 265, -3 }, /* (224) explain_options ::= explain_options RATIO NK_FLOAT */ { 210, -6 }, /* (225) cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ { 210, -9 }, /* (226) cmd ::= CREATE agg_func_opt FUNCTION function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ { 210, -3 }, /* (227) cmd ::= DROP FUNCTION function_name */ { 266, 0 }, /* (228) agg_func_opt ::= */ { 266, -1 }, /* (229) agg_func_opt ::= AGGREGATE */ { 267, 0 }, /* (230) bufsize_opt ::= */ { 267, -2 }, /* (231) bufsize_opt ::= BUFSIZE NK_INTEGER */ { 210, -7 }, /* (232) cmd ::= CREATE STREAM stream_name INTO table_name AS query_expression */ { 210, -3 }, /* (233) cmd ::= DROP STREAM stream_name */ { 210, -3 }, /* (234) cmd ::= KILL CONNECTION NK_INTEGER */ { 210, -3 }, /* (235) cmd ::= KILL QUERY NK_INTEGER */ { 210, -4 }, /* (236) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ { 210, -4 }, /* (237) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ { 210, -3 }, /* (238) cmd ::= SPLIT VGROUP NK_INTEGER */ { 269, -2 }, /* (239) dnode_list ::= DNODE NK_INTEGER */ { 269, -3 }, /* (240) dnode_list ::= dnode_list DNODE NK_INTEGER */ { 210, -3 }, /* (241) cmd ::= SYNCDB db_name REPLICA */ { 210, -1 }, /* (242) cmd ::= query_expression */ { 213, -1 }, /* (243) literal ::= NK_INTEGER */ { 213, -1 }, /* (244) literal ::= NK_FLOAT */ { 213, -1 }, /* (245) literal ::= NK_STRING */ { 213, -1 }, /* (246) literal ::= NK_BOOL */ { 213, -2 }, /* (247) literal ::= TIMESTAMP NK_STRING */ { 213, -1 }, /* (248) literal ::= duration_literal */ { 213, -1 }, /* (249) literal ::= NULL */ { 258, -1 }, /* (250) duration_literal ::= NK_VARIABLE */ { 270, -1 }, /* (251) signed ::= NK_INTEGER */ { 270, -2 }, /* (252) signed ::= NK_PLUS NK_INTEGER */ { 270, -2 }, /* (253) signed ::= NK_MINUS NK_INTEGER */ { 270, -1 }, /* (254) signed ::= NK_FLOAT */ { 270, -2 }, /* (255) signed ::= NK_PLUS NK_FLOAT */ { 270, -2 }, /* (256) signed ::= NK_MINUS NK_FLOAT */ { 271, -1 }, /* (257) signed_literal ::= signed */ { 271, -1 }, /* (258) signed_literal ::= NK_STRING */ { 271, -1 }, /* (259) signed_literal ::= NK_BOOL */ { 271, -2 }, /* (260) signed_literal ::= TIMESTAMP NK_STRING */ { 271, -1 }, /* (261) signed_literal ::= duration_literal */ { 271, -1 }, /* (262) signed_literal ::= NULL */ { 241, -1 }, /* (263) literal_list ::= signed_literal */ { 241, -3 }, /* (264) literal_list ::= literal_list NK_COMMA signed_literal */ { 219, -1 }, /* (265) db_name ::= NK_ID */ { 244, -1 }, /* (266) table_name ::= NK_ID */ { 237, -1 }, /* (267) column_name ::= NK_ID */ { 254, -1 }, /* (268) function_name ::= NK_ID */ { 254, -1 }, /* (269) function_name ::= FIRST */ { 254, -1 }, /* (270) function_name ::= LAST */ { 272, -1 }, /* (271) table_alias ::= NK_ID */ { 273, -1 }, /* (272) column_alias ::= NK_ID */ { 215, -1 }, /* (273) user_name ::= NK_ID */ { 255, -1 }, /* (274) index_name ::= NK_ID */ { 262, -1 }, /* (275) topic_name ::= NK_ID */ { 268, -1 }, /* (276) stream_name ::= NK_ID */ { 274, -1 }, /* (277) expression ::= literal */ { 274, -1 }, /* (278) expression ::= pseudo_column */ { 274, -1 }, /* (279) expression ::= column_reference */ { 274, -4 }, /* (280) expression ::= function_name NK_LP expression_list NK_RP */ { 274, -4 }, /* (281) expression ::= function_name NK_LP NK_STAR NK_RP */ { 274, -6 }, /* (282) expression ::= CAST NK_LP expression AS type_name NK_RP */ { 274, -1 }, /* (283) expression ::= subquery */ { 274, -3 }, /* (284) expression ::= NK_LP expression NK_RP */ { 274, -2 }, /* (285) expression ::= NK_PLUS expression */ { 274, -2 }, /* (286) expression ::= NK_MINUS expression */ { 274, -3 }, /* (287) expression ::= expression NK_PLUS expression */ { 274, -3 }, /* (288) expression ::= expression NK_MINUS expression */ { 274, -3 }, /* (289) expression ::= expression NK_STAR expression */ { 274, -3 }, /* (290) expression ::= expression NK_SLASH expression */ { 274, -3 }, /* (291) expression ::= expression NK_REM expression */ { 261, -1 }, /* (292) expression_list ::= expression */ { 261, -3 }, /* (293) expression_list ::= expression_list NK_COMMA expression */ { 276, -1 }, /* (294) column_reference ::= column_name */ { 276, -3 }, /* (295) column_reference ::= table_name NK_DOT column_name */ { 275, -1 }, /* (296) pseudo_column ::= NOW */ { 275, -1 }, /* (297) pseudo_column ::= TODAY */ { 275, -1 }, /* (298) pseudo_column ::= ROWTS */ { 275, -1 }, /* (299) pseudo_column ::= TBNAME */ { 275, -1 }, /* (300) pseudo_column ::= QSTARTTS */ { 275, -1 }, /* (301) pseudo_column ::= QENDTS */ { 275, -1 }, /* (302) pseudo_column ::= WSTARTTS */ { 275, -1 }, /* (303) pseudo_column ::= WENDTS */ { 275, -1 }, /* (304) pseudo_column ::= WDURATION */ { 278, -3 }, /* (305) predicate ::= expression compare_op expression */ { 278, -5 }, /* (306) predicate ::= expression BETWEEN expression AND expression */ { 278, -6 }, /* (307) predicate ::= expression NOT BETWEEN expression AND expression */ { 278, -3 }, /* (308) predicate ::= expression IS NULL */ { 278, -4 }, /* (309) predicate ::= expression IS NOT NULL */ { 278, -3 }, /* (310) predicate ::= expression in_op in_predicate_value */ { 279, -1 }, /* (311) compare_op ::= NK_LT */ { 279, -1 }, /* (312) compare_op ::= NK_GT */ { 279, -1 }, /* (313) compare_op ::= NK_LE */ { 279, -1 }, /* (314) compare_op ::= NK_GE */ { 279, -1 }, /* (315) compare_op ::= NK_NE */ { 279, -1 }, /* (316) compare_op ::= NK_EQ */ { 279, -1 }, /* (317) compare_op ::= LIKE */ { 279, -2 }, /* (318) compare_op ::= NOT LIKE */ { 279, -1 }, /* (319) compare_op ::= MATCH */ { 279, -1 }, /* (320) compare_op ::= NMATCH */ { 280, -1 }, /* (321) in_op ::= IN */ { 280, -2 }, /* (322) in_op ::= NOT IN */ { 281, -3 }, /* (323) in_predicate_value ::= NK_LP expression_list NK_RP */ { 282, -1 }, /* (324) boolean_value_expression ::= boolean_primary */ { 282, -2 }, /* (325) boolean_value_expression ::= NOT boolean_primary */ { 282, -3 }, /* (326) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { 282, -3 }, /* (327) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { 283, -1 }, /* (328) boolean_primary ::= predicate */ { 283, -3 }, /* (329) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ { 284, -1 }, /* (330) common_expression ::= expression */ { 284, -1 }, /* (331) common_expression ::= boolean_value_expression */ { 285, -2 }, /* (332) from_clause ::= FROM table_reference_list */ { 286, -1 }, /* (333) table_reference_list ::= table_reference */ { 286, -3 }, /* (334) table_reference_list ::= table_reference_list NK_COMMA table_reference */ { 287, -1 }, /* (335) table_reference ::= table_primary */ { 287, -1 }, /* (336) table_reference ::= joined_table */ { 288, -2 }, /* (337) table_primary ::= table_name alias_opt */ { 288, -4 }, /* (338) table_primary ::= db_name NK_DOT table_name alias_opt */ { 288, -2 }, /* (339) table_primary ::= subquery alias_opt */ { 288, -1 }, /* (340) table_primary ::= parenthesized_joined_table */ { 290, 0 }, /* (341) alias_opt ::= */ { 290, -1 }, /* (342) alias_opt ::= table_alias */ { 290, -2 }, /* (343) alias_opt ::= AS table_alias */ { 291, -3 }, /* (344) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ { 291, -3 }, /* (345) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ { 289, -6 }, /* (346) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ { 292, 0 }, /* (347) join_type ::= */ { 292, -1 }, /* (348) join_type ::= INNER */ { 294, -9 }, /* (349) query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ { 295, 0 }, /* (350) set_quantifier_opt ::= */ { 295, -1 }, /* (351) set_quantifier_opt ::= DISTINCT */ { 295, -1 }, /* (352) set_quantifier_opt ::= ALL */ { 296, -1 }, /* (353) select_list ::= NK_STAR */ { 296, -1 }, /* (354) select_list ::= select_sublist */ { 302, -1 }, /* (355) select_sublist ::= select_item */ { 302, -3 }, /* (356) select_sublist ::= select_sublist NK_COMMA select_item */ { 303, -1 }, /* (357) select_item ::= common_expression */ { 303, -2 }, /* (358) select_item ::= common_expression column_alias */ { 303, -3 }, /* (359) select_item ::= common_expression AS column_alias */ { 303, -3 }, /* (360) select_item ::= table_name NK_DOT NK_STAR */ { 297, 0 }, /* (361) where_clause_opt ::= */ { 297, -2 }, /* (362) where_clause_opt ::= WHERE search_condition */ { 298, 0 }, /* (363) partition_by_clause_opt ::= */ { 298, -3 }, /* (364) partition_by_clause_opt ::= PARTITION BY expression_list */ { 299, 0 }, /* (365) twindow_clause_opt ::= */ { 299, -6 }, /* (366) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ { 299, -4 }, /* (367) twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ { 299, -6 }, /* (368) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ { 299, -8 }, /* (369) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ { 259, 0 }, /* (370) sliding_opt ::= */ { 259, -4 }, /* (371) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ { 304, 0 }, /* (372) fill_opt ::= */ { 304, -4 }, /* (373) fill_opt ::= FILL NK_LP fill_mode NK_RP */ { 304, -6 }, /* (374) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ { 305, -1 }, /* (375) fill_mode ::= NONE */ { 305, -1 }, /* (376) fill_mode ::= PREV */ { 305, -1 }, /* (377) fill_mode ::= NULL */ { 305, -1 }, /* (378) fill_mode ::= LINEAR */ { 305, -1 }, /* (379) fill_mode ::= NEXT */ { 300, 0 }, /* (380) group_by_clause_opt ::= */ { 300, -3 }, /* (381) group_by_clause_opt ::= GROUP BY group_by_list */ { 306, -1 }, /* (382) group_by_list ::= expression */ { 306, -3 }, /* (383) group_by_list ::= group_by_list NK_COMMA expression */ { 301, 0 }, /* (384) having_clause_opt ::= */ { 301, -2 }, /* (385) having_clause_opt ::= HAVING search_condition */ { 263, -4 }, /* (386) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ { 307, -1 }, /* (387) query_expression_body ::= query_primary */ { 307, -4 }, /* (388) query_expression_body ::= query_expression_body UNION ALL query_expression_body */ { 311, -1 }, /* (389) query_primary ::= query_specification */ { 308, 0 }, /* (390) order_by_clause_opt ::= */ { 308, -3 }, /* (391) order_by_clause_opt ::= ORDER BY sort_specification_list */ { 309, 0 }, /* (392) slimit_clause_opt ::= */ { 309, -2 }, /* (393) slimit_clause_opt ::= SLIMIT NK_INTEGER */ { 309, -4 }, /* (394) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ { 309, -4 }, /* (395) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ { 310, 0 }, /* (396) limit_clause_opt ::= */ { 310, -2 }, /* (397) limit_clause_opt ::= LIMIT NK_INTEGER */ { 310, -4 }, /* (398) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ { 310, -4 }, /* (399) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ { 277, -3 }, /* (400) subquery ::= NK_LP query_expression NK_RP */ { 293, -1 }, /* (401) search_condition ::= common_expression */ { 312, -1 }, /* (402) sort_specification_list ::= sort_specification */ { 312, -3 }, /* (403) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ { 313, -3 }, /* (404) sort_specification ::= expression ordering_specification_opt null_ordering_opt */ { 314, 0 }, /* (405) ordering_specification_opt ::= */ { 314, -1 }, /* (406) ordering_specification_opt ::= ASC */ { 314, -1 }, /* (407) ordering_specification_opt ::= DESC */ { 315, 0 }, /* (408) null_ordering_opt ::= */ { 315, -2 }, /* (409) null_ordering_opt ::= NULLS FIRST */ { 315, -2 }, /* (410) null_ordering_opt ::= NULLS LAST */ }; static void yy_accept(yyParser*); /* Forward Declaration */ /* ** Perform a reduce action and the shift that must immediately ** follow the reduce. ** ** The yyLookahead and yyLookaheadToken parameters provide reduce actions ** access to the lookahead token (if any). The yyLookahead will be YYNOCODE ** if the lookahead token has already been consumed. As this procedure is ** only called from one place, optimizing compilers will in-line it, which ** means that the extra parameters have no performance impact. */ static YYACTIONTYPE yy_reduce( yyParser *yypParser, /* The parser */ unsigned int yyruleno, /* Number of the rule by which to reduce */ int yyLookahead, /* Lookahead token, or YYNOCODE if none */ ParseTOKENTYPE yyLookaheadToken /* Value of the lookahead token */ ParseCTX_PDECL /* %extra_context */ ){ int yygoto; /* The next state */ YYACTIONTYPE yyact; /* The next action */ yyStackEntry *yymsp; /* The top of the parser's stack */ int yysize; /* Amount to pop the stack */ ParseARG_FETCH (void)yyLookahead; (void)yyLookaheadToken; yymsp = yypParser->yytos; #ifndef NDEBUG if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){ yysize = yyRuleInfo[yyruleno].nrhs; if( yysize ){ fprintf(yyTraceFILE, "%sReduce %d [%s], go to state %d.\n", yyTracePrompt, yyruleno, yyRuleName[yyruleno], yymsp[yysize].stateno); }else{ fprintf(yyTraceFILE, "%sReduce %d [%s].\n", yyTracePrompt, yyruleno, yyRuleName[yyruleno]); } } #endif /* NDEBUG */ /* Check that the stack is large enough to grow by a single entry ** if the RHS of the rule is empty. This ensures that there is room ** enough on the stack to push the LHS value */ if( yyRuleInfo[yyruleno].nrhs==0 ){ #ifdef YYTRACKMAXSTACKDEPTH if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){ yypParser->yyhwm++; assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack)); } #endif #if YYSTACKDEPTH>0 if( yypParser->yytos>=yypParser->yystackEnd ){ yyStackOverflow(yypParser); /* The call to yyStackOverflow() above pops the stack until it is ** empty, causing the main parser loop to exit. So the return value ** is never used and does not matter. */ return 0; } #else if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){ if( yyGrowStack(yypParser) ){ yyStackOverflow(yypParser); /* The call to yyStackOverflow() above pops the stack until it is ** empty, causing the main parser loop to exit. So the return value ** is never used and does not matter. */ return 0; } yymsp = yypParser->yytos; } #endif } switch( yyruleno ){ /* Beginning here are the reduction cases. A typical example ** follows: ** case 0: ** #line ** { ... } // User supplied code ** #line ** break; */ /********** Begin reduce actions **********************************************/ YYMINORTYPE yylhsminor; case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ { pCxt->valid = false; generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } yy_destructor(yypParser,211,&yymsp[0].minor); break; case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ { pCxt->valid = false; generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } yy_destructor(yypParser,212,&yymsp[0].minor); break; case 2: /* account_options ::= */ { } break; case 3: /* account_options ::= account_options PPS literal */ case 4: /* account_options ::= account_options TSERIES literal */ yytestcase(yyruleno==4); case 5: /* account_options ::= account_options STORAGE literal */ yytestcase(yyruleno==5); case 6: /* account_options ::= account_options STREAMS literal */ yytestcase(yyruleno==6); case 7: /* account_options ::= account_options QTIME literal */ yytestcase(yyruleno==7); case 8: /* account_options ::= account_options DBS literal */ yytestcase(yyruleno==8); case 9: /* account_options ::= account_options USERS literal */ yytestcase(yyruleno==9); case 10: /* account_options ::= account_options CONNS literal */ yytestcase(yyruleno==10); case 11: /* account_options ::= account_options STATE literal */ yytestcase(yyruleno==11); { yy_destructor(yypParser,211,&yymsp[-2].minor); { } yy_destructor(yypParser,213,&yymsp[0].minor); } break; case 12: /* alter_account_options ::= alter_account_option */ { yy_destructor(yypParser,214,&yymsp[0].minor); { } } break; case 13: /* alter_account_options ::= alter_account_options alter_account_option */ { yy_destructor(yypParser,212,&yymsp[-1].minor); { } yy_destructor(yypParser,214,&yymsp[0].minor); } break; case 14: /* alter_account_option ::= PASS literal */ case 15: /* alter_account_option ::= PPS literal */ yytestcase(yyruleno==15); case 16: /* alter_account_option ::= TSERIES literal */ yytestcase(yyruleno==16); case 17: /* alter_account_option ::= STORAGE literal */ yytestcase(yyruleno==17); case 18: /* alter_account_option ::= STREAMS literal */ yytestcase(yyruleno==18); case 19: /* alter_account_option ::= QTIME literal */ yytestcase(yyruleno==19); case 20: /* alter_account_option ::= DBS literal */ yytestcase(yyruleno==20); case 21: /* alter_account_option ::= USERS literal */ yytestcase(yyruleno==21); case 22: /* alter_account_option ::= CONNS literal */ yytestcase(yyruleno==22); case 23: /* alter_account_option ::= STATE literal */ yytestcase(yyruleno==23); { } yy_destructor(yypParser,213,&yymsp[0].minor); break; case 24: /* cmd ::= CREATE USER user_name PASS NK_STRING */ { pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-2].minor.yy409, &yymsp[0].minor.yy0); } break; case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */ { pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy409, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } break; case 26: /* cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ { pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy409, TSDB_ALTER_USER_PRIVILEGES, &yymsp[0].minor.yy0); } break; case 27: /* cmd ::= DROP USER user_name */ { pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy409); } break; case 28: /* cmd ::= CREATE DNODE dnode_endpoint */ { pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy409, NULL); } break; case 29: /* cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ { pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy409, &yymsp[0].minor.yy0); } break; case 30: /* cmd ::= DROP DNODE NK_INTEGER */ { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy0); } break; case 31: /* cmd ::= DROP DNODE dnode_endpoint */ { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy409); } break; case 32: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } break; case 33: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-2].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; case 34: /* cmd ::= ALTER ALL DNODES NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[0].minor.yy0, NULL); } break; case 35: /* cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; case 36: /* dnode_endpoint ::= NK_STRING */ case 37: /* dnode_host_name ::= NK_ID */ yytestcase(yyruleno==37); case 38: /* dnode_host_name ::= NK_IPTOKEN */ yytestcase(yyruleno==38); case 265: /* db_name ::= NK_ID */ yytestcase(yyruleno==265); case 266: /* table_name ::= NK_ID */ yytestcase(yyruleno==266); case 267: /* column_name ::= NK_ID */ yytestcase(yyruleno==267); case 268: /* function_name ::= NK_ID */ yytestcase(yyruleno==268); case 269: /* function_name ::= FIRST */ yytestcase(yyruleno==269); case 270: /* function_name ::= LAST */ yytestcase(yyruleno==270); case 271: /* table_alias ::= NK_ID */ yytestcase(yyruleno==271); case 272: /* column_alias ::= NK_ID */ yytestcase(yyruleno==272); case 273: /* user_name ::= NK_ID */ yytestcase(yyruleno==273); case 274: /* index_name ::= NK_ID */ yytestcase(yyruleno==274); case 275: /* topic_name ::= NK_ID */ yytestcase(yyruleno==275); case 276: /* stream_name ::= NK_ID */ yytestcase(yyruleno==276); { yylhsminor.yy409 = yymsp[0].minor.yy0; } yymsp[0].minor.yy409 = yylhsminor.yy409; break; case 39: /* cmd ::= ALTER LOCAL NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } break; case 40: /* cmd ::= ALTER LOCAL NK_STRING NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; case 41: /* cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_QNODE_STMT, &yymsp[0].minor.yy0); } break; case 42: /* cmd ::= DROP QNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_QNODE_STMT, &yymsp[0].minor.yy0); } break; case 43: /* cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_BNODE_STMT, &yymsp[0].minor.yy0); } break; case 44: /* cmd ::= DROP BNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_BNODE_STMT, &yymsp[0].minor.yy0); } break; case 45: /* cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_SNODE_STMT, &yymsp[0].minor.yy0); } break; case 46: /* cmd ::= DROP SNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_SNODE_STMT, &yymsp[0].minor.yy0); } break; case 47: /* cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_MNODE_STMT, &yymsp[0].minor.yy0); } break; case 48: /* cmd ::= DROP MNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); } break; case 49: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ { pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy121, &yymsp[-1].minor.yy409, yymsp[0].minor.yy504); } break; case 50: /* cmd ::= DROP DATABASE exists_opt db_name */ { pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy121, &yymsp[0].minor.yy409); } break; case 51: /* cmd ::= USE db_name */ { pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy409); } break; case 52: /* cmd ::= ALTER DATABASE db_name alter_db_options */ { pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy409, yymsp[0].minor.yy504); } break; case 53: /* not_exists_opt ::= IF NOT EXISTS */ { yymsp[-2].minor.yy121 = true; } break; case 54: /* not_exists_opt ::= */ case 56: /* exists_opt ::= */ yytestcase(yyruleno==56); case 220: /* analyze_opt ::= */ yytestcase(yyruleno==220); case 228: /* agg_func_opt ::= */ yytestcase(yyruleno==228); case 350: /* set_quantifier_opt ::= */ yytestcase(yyruleno==350); { yymsp[1].minor.yy121 = false; } break; case 55: /* exists_opt ::= IF EXISTS */ { yymsp[-1].minor.yy121 = true; } break; case 57: /* db_options ::= */ { yymsp[1].minor.yy504 = createDatabaseOptions(pCxt); } break; case 58: /* db_options ::= db_options BLOCKS NK_INTEGER */ { ((SDatabaseOptions*)yymsp[-2].minor.yy504)->pNumOfBlocks = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy504 = yymsp[-2].minor.yy504; } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 59: /* db_options ::= db_options CACHE NK_INTEGER */ { ((SDatabaseOptions*)yymsp[-2].minor.yy504)->pCacheBlockSize = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy504 = yymsp[-2].minor.yy504; } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 60: /* db_options ::= db_options CACHELAST NK_INTEGER */ { ((SDatabaseOptions*)yymsp[-2].minor.yy504)->pCachelast = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy504 = yymsp[-2].minor.yy504; } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 61: /* db_options ::= db_options COMP NK_INTEGER */ { ((SDatabaseOptions*)yymsp[-2].minor.yy504)->pCompressionLevel = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy504 = yymsp[-2].minor.yy504; } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 62: /* db_options ::= db_options DAYS NK_INTEGER */ { ((SDatabaseOptions*)yymsp[-2].minor.yy504)->pDaysPerFile = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy504 = yymsp[-2].minor.yy504; } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 63: /* db_options ::= db_options DAYS NK_VARIABLE */ { ((SDatabaseOptions*)yymsp[-2].minor.yy504)->pDaysPerFile = (SValueNode*)createDurationValueNode(pCxt, &yymsp[0].minor.yy0); yylhsminor.yy504 = yymsp[-2].minor.yy504; } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 64: /* db_options ::= db_options FSYNC NK_INTEGER */ { ((SDatabaseOptions*)yymsp[-2].minor.yy504)->pFsyncPeriod = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy504 = yymsp[-2].minor.yy504; } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 65: /* db_options ::= db_options MAXROWS NK_INTEGER */ { ((SDatabaseOptions*)yymsp[-2].minor.yy504)->pMaxRowsPerBlock = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy504 = yymsp[-2].minor.yy504; } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 66: /* db_options ::= db_options MINROWS NK_INTEGER */ { ((SDatabaseOptions*)yymsp[-2].minor.yy504)->pMinRowsPerBlock = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy504 = yymsp[-2].minor.yy504; } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 67: /* db_options ::= db_options KEEP integer_list */ case 68: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==68); { ((SDatabaseOptions*)yymsp[-2].minor.yy504)->pKeep = yymsp[0].minor.yy488; yylhsminor.yy504 = yymsp[-2].minor.yy504; } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 69: /* db_options ::= db_options PRECISION NK_STRING */ { ((SDatabaseOptions*)yymsp[-2].minor.yy504)->pPrecision = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); yylhsminor.yy504 = yymsp[-2].minor.yy504; } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 70: /* db_options ::= db_options QUORUM NK_INTEGER */ { ((SDatabaseOptions*)yymsp[-2].minor.yy504)->pQuorum = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy504 = yymsp[-2].minor.yy504; } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 71: /* db_options ::= db_options REPLICA NK_INTEGER */ { ((SDatabaseOptions*)yymsp[-2].minor.yy504)->pReplica = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy504 = yymsp[-2].minor.yy504; } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 72: /* db_options ::= db_options TTL NK_INTEGER */ { ((SDatabaseOptions*)yymsp[-2].minor.yy504)->pTtl = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy504 = yymsp[-2].minor.yy504; } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 73: /* db_options ::= db_options WAL NK_INTEGER */ { ((SDatabaseOptions*)yymsp[-2].minor.yy504)->pWalLevel = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy504 = yymsp[-2].minor.yy504; } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 74: /* db_options ::= db_options VGROUPS NK_INTEGER */ { ((SDatabaseOptions*)yymsp[-2].minor.yy504)->pNumOfVgroups = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy504 = yymsp[-2].minor.yy504; } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 75: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ { ((SDatabaseOptions*)yymsp[-2].minor.yy504)->pSingleStable = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy504 = yymsp[-2].minor.yy504; } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 76: /* db_options ::= db_options STREAM_MODE NK_INTEGER */ { ((SDatabaseOptions*)yymsp[-2].minor.yy504)->pStreamMode = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy504 = yymsp[-2].minor.yy504; } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 77: /* db_options ::= db_options RETENTIONS retention_list */ { ((SDatabaseOptions*)yymsp[-2].minor.yy504)->pRetentions = yymsp[0].minor.yy488; yylhsminor.yy504 = yymsp[-2].minor.yy504; } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 78: /* alter_db_options ::= alter_db_option */ { yylhsminor.yy504 = createDatabaseOptions(pCxt); yylhsminor.yy504 = setDatabaseAlterOption(pCxt, yylhsminor.yy504, &yymsp[0].minor.yy21); } yymsp[0].minor.yy504 = yylhsminor.yy504; break; case 79: /* alter_db_options ::= alter_db_options alter_db_option */ { yylhsminor.yy504 = setDatabaseAlterOption(pCxt, yymsp[-1].minor.yy504, &yymsp[0].minor.yy21); } yymsp[-1].minor.yy504 = yylhsminor.yy504; break; case 80: /* alter_db_option ::= BLOCKS NK_INTEGER */ { yymsp[-1].minor.yy21.type = DB_OPTION_BLOCKS; yymsp[-1].minor.yy21.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; case 81: /* alter_db_option ::= FSYNC NK_INTEGER */ { yymsp[-1].minor.yy21.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy21.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; case 82: /* alter_db_option ::= KEEP integer_list */ case 83: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==83); { yymsp[-1].minor.yy21.type = DB_OPTION_KEEP; yymsp[-1].minor.yy21.pList = yymsp[0].minor.yy488; } break; case 84: /* alter_db_option ::= WAL NK_INTEGER */ { yymsp[-1].minor.yy21.type = DB_OPTION_WAL; yymsp[-1].minor.yy21.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; case 85: /* alter_db_option ::= QUORUM NK_INTEGER */ { yymsp[-1].minor.yy21.type = DB_OPTION_QUORUM; yymsp[-1].minor.yy21.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; case 86: /* alter_db_option ::= CACHELAST NK_INTEGER */ { yymsp[-1].minor.yy21.type = DB_OPTION_CACHELAST; yymsp[-1].minor.yy21.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; case 87: /* alter_db_option ::= REPLICA NK_INTEGER */ { yymsp[-1].minor.yy21.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy21.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; case 88: /* integer_list ::= NK_INTEGER */ { yylhsminor.yy488 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy488 = yylhsminor.yy488; break; case 89: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ case 240: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==240); { yylhsminor.yy488 = addNodeToList(pCxt, yymsp[-2].minor.yy488, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } yymsp[-2].minor.yy488 = yylhsminor.yy488; break; case 90: /* variable_list ::= NK_VARIABLE */ { yylhsminor.yy488 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy488 = yylhsminor.yy488; break; case 91: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ { yylhsminor.yy488 = addNodeToList(pCxt, yymsp[-2].minor.yy488, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[-2].minor.yy488 = yylhsminor.yy488; break; case 92: /* retention_list ::= retention */ case 112: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==112); case 115: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==115); case 122: /* column_def_list ::= column_def */ yytestcase(yyruleno==122); case 165: /* col_name_list ::= col_name */ yytestcase(yyruleno==165); case 201: /* func_name_list ::= func_name */ yytestcase(yyruleno==201); case 210: /* func_list ::= func */ yytestcase(yyruleno==210); case 263: /* literal_list ::= signed_literal */ yytestcase(yyruleno==263); case 355: /* select_sublist ::= select_item */ yytestcase(yyruleno==355); case 402: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==402); { yylhsminor.yy488 = createNodeList(pCxt, yymsp[0].minor.yy504); } yymsp[0].minor.yy488 = yylhsminor.yy488; break; case 93: /* retention_list ::= retention_list NK_COMMA retention */ case 123: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==123); case 166: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==166); case 202: /* func_name_list ::= func_name_list NK_COMMA col_name */ yytestcase(yyruleno==202); case 211: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==211); case 264: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==264); case 356: /* select_sublist ::= select_sublist NK_COMMA select_item */ yytestcase(yyruleno==356); case 403: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==403); { yylhsminor.yy488 = addNodeToList(pCxt, yymsp[-2].minor.yy488, yymsp[0].minor.yy504); } yymsp[-2].minor.yy488 = yylhsminor.yy488; break; case 94: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ { yylhsminor.yy504 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 95: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ case 97: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==97); { pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy121, yymsp[-5].minor.yy504, yymsp[-3].minor.yy488, yymsp[-1].minor.yy488, yymsp[0].minor.yy504); } break; case 96: /* cmd ::= CREATE TABLE multi_create_clause */ { pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy488); } break; case 98: /* cmd ::= DROP TABLE multi_drop_clause */ { pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy488); } break; case 99: /* cmd ::= DROP STABLE exists_opt full_table_name */ { pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy121, yymsp[0].minor.yy504); } break; case 100: /* cmd ::= ALTER TABLE alter_table_clause */ case 101: /* cmd ::= ALTER STABLE alter_table_clause */ yytestcase(yyruleno==101); case 242: /* cmd ::= query_expression */ yytestcase(yyruleno==242); { pCxt->pRootNode = yymsp[0].minor.yy504; } break; case 102: /* alter_table_clause ::= full_table_name alter_table_options */ { yylhsminor.yy504 = createAlterTableOption(pCxt, yymsp[-1].minor.yy504, yymsp[0].minor.yy504); } yymsp[-1].minor.yy504 = yylhsminor.yy504; break; case 103: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ { yylhsminor.yy504 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy504, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy409, yymsp[0].minor.yy160); } yymsp[-4].minor.yy504 = yylhsminor.yy504; break; case 104: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ { yylhsminor.yy504 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy504, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy409); } yymsp[-3].minor.yy504 = yylhsminor.yy504; break; case 105: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ { yylhsminor.yy504 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy504, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy409, yymsp[0].minor.yy160); } yymsp[-4].minor.yy504 = yylhsminor.yy504; break; case 106: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ { yylhsminor.yy504 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy504, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy409, &yymsp[0].minor.yy409); } yymsp[-4].minor.yy504 = yylhsminor.yy504; break; case 107: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ { yylhsminor.yy504 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy504, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy409, yymsp[0].minor.yy160); } yymsp[-4].minor.yy504 = yylhsminor.yy504; break; case 108: /* alter_table_clause ::= full_table_name DROP TAG column_name */ { yylhsminor.yy504 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy504, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy409); } yymsp[-3].minor.yy504 = yylhsminor.yy504; break; case 109: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ { yylhsminor.yy504 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy504, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy409, yymsp[0].minor.yy160); } yymsp[-4].minor.yy504 = yylhsminor.yy504; break; case 110: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ { yylhsminor.yy504 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy504, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy409, &yymsp[0].minor.yy409); } yymsp[-4].minor.yy504 = yylhsminor.yy504; break; case 111: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ literal */ { yylhsminor.yy504 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy504, &yymsp[-2].minor.yy409, yymsp[0].minor.yy504); } yymsp[-5].minor.yy504 = yylhsminor.yy504; break; case 113: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ case 116: /* multi_drop_clause ::= multi_drop_clause drop_table_clause */ yytestcase(yyruleno==116); { yylhsminor.yy488 = addNodeToList(pCxt, yymsp[-1].minor.yy488, yymsp[0].minor.yy504); } yymsp[-1].minor.yy488 = yylhsminor.yy488; break; case 114: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP */ { yylhsminor.yy504 = createCreateSubTableClause(pCxt, yymsp[-8].minor.yy121, yymsp[-7].minor.yy504, yymsp[-5].minor.yy504, yymsp[-4].minor.yy488, yymsp[-1].minor.yy488); } yymsp[-8].minor.yy504 = yylhsminor.yy504; break; case 117: /* drop_table_clause ::= exists_opt full_table_name */ { yylhsminor.yy504 = createDropTableClause(pCxt, yymsp[-1].minor.yy121, yymsp[0].minor.yy504); } yymsp[-1].minor.yy504 = yylhsminor.yy504; break; case 118: /* specific_tags_opt ::= */ case 149: /* tags_def_opt ::= */ yytestcase(yyruleno==149); case 363: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==363); case 380: /* group_by_clause_opt ::= */ yytestcase(yyruleno==380); case 390: /* order_by_clause_opt ::= */ yytestcase(yyruleno==390); { yymsp[1].minor.yy488 = NULL; } break; case 119: /* specific_tags_opt ::= NK_LP col_name_list NK_RP */ { yymsp[-2].minor.yy488 = yymsp[-1].minor.yy488; } break; case 120: /* full_table_name ::= table_name */ { yylhsminor.yy504 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy409, NULL); } yymsp[0].minor.yy504 = yylhsminor.yy504; break; case 121: /* full_table_name ::= db_name NK_DOT table_name */ { yylhsminor.yy504 = createRealTableNode(pCxt, &yymsp[-2].minor.yy409, &yymsp[0].minor.yy409, NULL); } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 124: /* column_def ::= column_name type_name */ { yylhsminor.yy504 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy409, yymsp[0].minor.yy160, NULL); } yymsp[-1].minor.yy504 = yylhsminor.yy504; break; case 125: /* column_def ::= column_name type_name COMMENT NK_STRING */ { yylhsminor.yy504 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy409, yymsp[-2].minor.yy160, &yymsp[0].minor.yy0); } yymsp[-3].minor.yy504 = yylhsminor.yy504; break; case 126: /* type_name ::= BOOL */ { yymsp[0].minor.yy160 = createDataType(TSDB_DATA_TYPE_BOOL); } break; case 127: /* type_name ::= TINYINT */ { yymsp[0].minor.yy160 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; case 128: /* type_name ::= SMALLINT */ { yymsp[0].minor.yy160 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; case 129: /* type_name ::= INT */ case 130: /* type_name ::= INTEGER */ yytestcase(yyruleno==130); { yymsp[0].minor.yy160 = createDataType(TSDB_DATA_TYPE_INT); } break; case 131: /* type_name ::= BIGINT */ { yymsp[0].minor.yy160 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; case 132: /* type_name ::= FLOAT */ { yymsp[0].minor.yy160 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; case 133: /* type_name ::= DOUBLE */ { yymsp[0].minor.yy160 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; case 134: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy160 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; case 135: /* type_name ::= TIMESTAMP */ { yymsp[0].minor.yy160 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; case 136: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy160 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; case 137: /* type_name ::= TINYINT UNSIGNED */ { yymsp[-1].minor.yy160 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; case 138: /* type_name ::= SMALLINT UNSIGNED */ { yymsp[-1].minor.yy160 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; case 139: /* type_name ::= INT UNSIGNED */ { yymsp[-1].minor.yy160 = createDataType(TSDB_DATA_TYPE_UINT); } break; case 140: /* type_name ::= BIGINT UNSIGNED */ { yymsp[-1].minor.yy160 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; case 141: /* type_name ::= JSON */ { yymsp[0].minor.yy160 = createDataType(TSDB_DATA_TYPE_JSON); } break; case 142: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy160 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; case 143: /* type_name ::= MEDIUMBLOB */ { yymsp[0].minor.yy160 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; case 144: /* type_name ::= BLOB */ { yymsp[0].minor.yy160 = createDataType(TSDB_DATA_TYPE_BLOB); } break; case 145: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy160 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; case 146: /* type_name ::= DECIMAL */ { yymsp[0].minor.yy160 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 147: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy160 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 148: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ { yymsp[-5].minor.yy160 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 150: /* tags_def_opt ::= tags_def */ case 354: /* select_list ::= select_sublist */ yytestcase(yyruleno==354); { yylhsminor.yy488 = yymsp[0].minor.yy488; } yymsp[0].minor.yy488 = yylhsminor.yy488; break; case 151: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ { yymsp[-3].minor.yy488 = yymsp[-1].minor.yy488; } break; case 152: /* table_options ::= */ { yymsp[1].minor.yy504 = createTableOptions(pCxt); } break; case 153: /* table_options ::= table_options COMMENT NK_STRING */ { ((STableOptions*)yymsp[-2].minor.yy504)->pComments = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); yylhsminor.yy504 = yymsp[-2].minor.yy504; } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 154: /* table_options ::= table_options KEEP integer_list */ { ((STableOptions*)yymsp[-2].minor.yy504)->pKeep = yymsp[0].minor.yy488; yylhsminor.yy504 = yymsp[-2].minor.yy504; } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 155: /* table_options ::= table_options TTL NK_INTEGER */ { ((STableOptions*)yymsp[-2].minor.yy504)->pTtl = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy504 = yymsp[-2].minor.yy504; } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 156: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ { ((STableOptions*)yymsp[-4].minor.yy504)->pSma = yymsp[-1].minor.yy488; yylhsminor.yy504 = yymsp[-4].minor.yy504; } yymsp[-4].minor.yy504 = yylhsminor.yy504; break; case 157: /* table_options ::= table_options ROLLUP NK_LP func_name_list NK_RP */ { ((STableOptions*)yymsp[-4].minor.yy504)->pFuncs = yymsp[-1].minor.yy488; yylhsminor.yy504 = yymsp[-4].minor.yy504; } yymsp[-4].minor.yy504 = yylhsminor.yy504; break; case 158: /* table_options ::= table_options FILE_FACTOR NK_FLOAT */ { ((STableOptions*)yymsp[-2].minor.yy504)->pFilesFactor = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); yylhsminor.yy504 = yymsp[-2].minor.yy504; } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 159: /* table_options ::= table_options DELAY NK_INTEGER */ { ((STableOptions*)yymsp[-2].minor.yy504)->pDelay = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); yylhsminor.yy504 = yymsp[-2].minor.yy504; } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 160: /* alter_table_options ::= alter_table_option */ { yylhsminor.yy504 = createTableOptions(pCxt); yylhsminor.yy504 = setTableAlterOption(pCxt, yylhsminor.yy504, &yymsp[0].minor.yy21); } yymsp[0].minor.yy504 = yylhsminor.yy504; break; case 161: /* alter_table_options ::= alter_table_options alter_table_option */ { yylhsminor.yy504 = setTableAlterOption(pCxt, yymsp[-1].minor.yy504, &yymsp[0].minor.yy21); } yymsp[-1].minor.yy504 = yylhsminor.yy504; break; case 162: /* alter_table_option ::= COMMENT NK_STRING */ { yymsp[-1].minor.yy21.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy21.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; case 163: /* alter_table_option ::= KEEP integer_list */ { yymsp[-1].minor.yy21.type = TABLE_OPTION_KEEP; yymsp[-1].minor.yy21.pList = yymsp[0].minor.yy488; } break; case 164: /* alter_table_option ::= TTL NK_INTEGER */ { yymsp[-1].minor.yy21.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy21.pVal = (SValueNode*)createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; case 167: /* col_name ::= column_name */ { yylhsminor.yy504 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy409); } yymsp[0].minor.yy504 = yylhsminor.yy504; break; case 168: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT, NULL, NULL); } break; case 169: /* cmd ::= SHOW USERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT, NULL, NULL); } break; case 170: /* cmd ::= SHOW DATABASES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT, NULL, NULL); } break; case 171: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy504, yymsp[0].minor.yy504); } break; case 172: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy504, yymsp[0].minor.yy504); } break; case 173: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy504, NULL); } break; case 174: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT, NULL, NULL); } break; case 175: /* cmd ::= SHOW MODULES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MODULES_STMT, NULL, NULL); } break; case 176: /* cmd ::= SHOW QNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT, NULL, NULL); } break; case 177: /* cmd ::= SHOW FUNCTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT, NULL, NULL); } break; case 178: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[-1].minor.yy504, yymsp[0].minor.yy504); } break; case 179: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT, NULL, NULL); } break; case 180: /* cmd ::= SHOW ACCOUNTS */ { pCxt->valid = false; generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } break; case 181: /* cmd ::= SHOW APPS */ // { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT, NULL, NULL); } break; case 182: /* cmd ::= SHOW CONNECTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT, NULL, NULL); } break; case 183: /* cmd ::= SHOW LICENCE */ case 184: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==184); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCE_STMT, NULL, NULL); } break; case 185: /* cmd ::= SHOW CREATE DATABASE db_name */ // { pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy29); } break; case 186: /* cmd ::= SHOW CREATE TABLE full_table_name */ // { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy182); } break; case 187: /* cmd ::= SHOW CREATE STABLE full_table_name */ // { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy182); } break; case 188: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT, NULL, NULL); } break; case 189: /* cmd ::= SHOW SCORES */ // { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT, NULL, NULL); } break; case 190: /* cmd ::= SHOW TOPICS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT, NULL, NULL); } break; case 191: /* cmd ::= SHOW VARIABLES */ // { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLE_STMT, NULL, NULL); } break; case 192: /* cmd ::= SHOW BNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT, NULL, NULL); } break; case 193: /* cmd ::= SHOW SNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT, NULL, NULL); } break; case 194: /* db_name_cond_opt ::= */ case 199: /* from_db_opt ::= */ yytestcase(yyruleno==199); { yymsp[1].minor.yy504 = createDefaultDatabaseCondValue(pCxt); } break; case 195: /* db_name_cond_opt ::= db_name NK_DOT */ { yylhsminor.yy504 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy409); } yymsp[-1].minor.yy504 = yylhsminor.yy504; break; case 196: /* like_pattern_opt ::= */ case 207: /* index_options ::= */ yytestcase(yyruleno==207); case 361: /* where_clause_opt ::= */ yytestcase(yyruleno==361); case 365: /* twindow_clause_opt ::= */ yytestcase(yyruleno==365); case 370: /* sliding_opt ::= */ yytestcase(yyruleno==370); case 372: /* fill_opt ::= */ yytestcase(yyruleno==372); case 384: /* having_clause_opt ::= */ yytestcase(yyruleno==384); case 392: /* slimit_clause_opt ::= */ yytestcase(yyruleno==392); case 396: /* limit_clause_opt ::= */ yytestcase(yyruleno==396); { yymsp[1].minor.yy504 = NULL; } break; case 197: /* like_pattern_opt ::= LIKE NK_STRING */ { yymsp[-1].minor.yy504 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; case 198: /* table_name_cond ::= table_name */ { yylhsminor.yy504 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy409); } yymsp[0].minor.yy504 = yylhsminor.yy504; break; case 200: /* from_db_opt ::= FROM db_name */ { yymsp[-1].minor.yy504 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy409); } break; case 203: /* func_name ::= function_name */ { yylhsminor.yy504 = createFunctionNode(pCxt, &yymsp[0].minor.yy409, NULL); } yymsp[0].minor.yy504 = yylhsminor.yy504; break; case 204: /* cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ { pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy121, &yymsp[-3].minor.yy409, &yymsp[-1].minor.yy409, NULL, yymsp[0].minor.yy504); } break; case 205: /* cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ { pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_FULLTEXT, yymsp[-6].minor.yy121, &yymsp[-5].minor.yy409, &yymsp[-3].minor.yy409, yymsp[-1].minor.yy488, NULL); } break; case 206: /* cmd ::= DROP INDEX exists_opt index_name ON table_name */ { pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-3].minor.yy121, &yymsp[-2].minor.yy409, &yymsp[0].minor.yy409); } break; case 208: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ { yymsp[-8].minor.yy504 = createIndexOption(pCxt, yymsp[-6].minor.yy488, releaseRawExprNode(pCxt, yymsp[-2].minor.yy504), NULL, yymsp[0].minor.yy504); } break; case 209: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ { yymsp[-10].minor.yy504 = createIndexOption(pCxt, yymsp[-8].minor.yy488, releaseRawExprNode(pCxt, yymsp[-4].minor.yy504), releaseRawExprNode(pCxt, yymsp[-2].minor.yy504), yymsp[0].minor.yy504); } break; case 212: /* func ::= function_name NK_LP expression_list NK_RP */ { yylhsminor.yy504 = createFunctionNode(pCxt, &yymsp[-3].minor.yy409, yymsp[-1].minor.yy488); } yymsp[-3].minor.yy504 = yylhsminor.yy504; break; case 213: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */ { pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-3].minor.yy121, &yymsp[-2].minor.yy409, yymsp[0].minor.yy504, NULL); } break; case 214: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS db_name */ { pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-3].minor.yy121, &yymsp[-2].minor.yy409, NULL, &yymsp[0].minor.yy409); } break; case 215: /* cmd ::= DROP TOPIC exists_opt topic_name */ { pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy121, &yymsp[0].minor.yy409); } break; case 216: /* cmd ::= DESC full_table_name */ case 217: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==217); { pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy504); } break; case 218: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } break; case 219: /* cmd ::= EXPLAIN analyze_opt explain_options query_expression */ { pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy121, yymsp[-1].minor.yy504, yymsp[0].minor.yy504); } break; case 221: /* analyze_opt ::= ANALYZE */ case 229: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==229); case 351: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==351); { yymsp[0].minor.yy121 = true; } break; case 222: /* explain_options ::= */ { yymsp[1].minor.yy504 = createDefaultExplainOptions(pCxt); } break; case 223: /* explain_options ::= explain_options VERBOSE NK_BOOL */ { yylhsminor.yy504 = setExplainVerbose(pCxt, yymsp[-2].minor.yy504, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 224: /* explain_options ::= explain_options RATIO NK_FLOAT */ { yylhsminor.yy504 = setExplainRatio(pCxt, yymsp[-2].minor.yy504, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 225: /* cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ { pCxt->pRootNode = createCompactStmt(pCxt, yymsp[-1].minor.yy488); } break; case 226: /* cmd ::= CREATE agg_func_opt FUNCTION function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ { pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-7].minor.yy121, &yymsp[-5].minor.yy409, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy160, yymsp[0].minor.yy452); } break; case 227: /* cmd ::= DROP FUNCTION function_name */ { pCxt->pRootNode = createDropFunctionStmt(pCxt, &yymsp[0].minor.yy409); } break; case 230: /* bufsize_opt ::= */ { yymsp[1].minor.yy452 = 0; } break; case 231: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ { yymsp[-1].minor.yy452 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } break; case 232: /* cmd ::= CREATE STREAM stream_name INTO table_name AS query_expression */ { pCxt->pRootNode = createCreateStreamStmt(pCxt, &yymsp[-4].minor.yy409, &yymsp[-2].minor.yy409, yymsp[0].minor.yy504); } break; case 233: /* cmd ::= DROP STREAM stream_name */ { pCxt->pRootNode = createDropStreamStmt(pCxt, &yymsp[0].minor.yy409); } break; case 234: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } break; case 235: /* cmd ::= KILL QUERY NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_QUERY_STMT, &yymsp[0].minor.yy0); } break; case 236: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; case 237: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ { pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy488); } break; case 238: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; case 239: /* dnode_list ::= DNODE NK_INTEGER */ { yymsp[-1].minor.yy488 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; case 241: /* cmd ::= SYNCDB db_name REPLICA */ { pCxt->pRootNode = createSyncdbStmt(pCxt, &yymsp[-1].minor.yy409); } break; case 243: /* literal ::= NK_INTEGER */ { yylhsminor.yy504 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy504 = yylhsminor.yy504; break; case 244: /* literal ::= NK_FLOAT */ { yylhsminor.yy504 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy504 = yylhsminor.yy504; break; case 245: /* literal ::= NK_STRING */ { yylhsminor.yy504 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy504 = yylhsminor.yy504; break; case 246: /* literal ::= NK_BOOL */ { yylhsminor.yy504 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy504 = yylhsminor.yy504; break; case 247: /* literal ::= TIMESTAMP NK_STRING */ { yylhsminor.yy504 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } yymsp[-1].minor.yy504 = yylhsminor.yy504; break; case 248: /* literal ::= duration_literal */ case 257: /* signed_literal ::= signed */ yytestcase(yyruleno==257); case 277: /* expression ::= literal */ yytestcase(yyruleno==277); case 278: /* expression ::= pseudo_column */ yytestcase(yyruleno==278); case 279: /* expression ::= column_reference */ yytestcase(yyruleno==279); case 283: /* expression ::= subquery */ yytestcase(yyruleno==283); case 324: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==324); case 328: /* boolean_primary ::= predicate */ yytestcase(yyruleno==328); case 330: /* common_expression ::= expression */ yytestcase(yyruleno==330); case 331: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==331); case 333: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==333); case 335: /* table_reference ::= table_primary */ yytestcase(yyruleno==335); case 336: /* table_reference ::= joined_table */ yytestcase(yyruleno==336); case 340: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==340); case 387: /* query_expression_body ::= query_primary */ yytestcase(yyruleno==387); case 389: /* query_primary ::= query_specification */ yytestcase(yyruleno==389); { yylhsminor.yy504 = yymsp[0].minor.yy504; } yymsp[0].minor.yy504 = yylhsminor.yy504; break; case 249: /* literal ::= NULL */ { yylhsminor.yy504 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, NULL)); } yymsp[0].minor.yy504 = yylhsminor.yy504; break; case 250: /* duration_literal ::= NK_VARIABLE */ { yylhsminor.yy504 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy504 = yylhsminor.yy504; break; case 251: /* signed ::= NK_INTEGER */ { yylhsminor.yy504 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } yymsp[0].minor.yy504 = yylhsminor.yy504; break; case 252: /* signed ::= NK_PLUS NK_INTEGER */ { yymsp[-1].minor.yy504 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; case 253: /* signed ::= NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; yylhsminor.yy504 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } yymsp[-1].minor.yy504 = yylhsminor.yy504; break; case 254: /* signed ::= NK_FLOAT */ { yylhsminor.yy504 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } yymsp[0].minor.yy504 = yylhsminor.yy504; break; case 255: /* signed ::= NK_PLUS NK_FLOAT */ { yymsp[-1].minor.yy504 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; case 256: /* signed ::= NK_MINUS NK_FLOAT */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; yylhsminor.yy504 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } yymsp[-1].minor.yy504 = yylhsminor.yy504; break; case 258: /* signed_literal ::= NK_STRING */ { yylhsminor.yy504 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } yymsp[0].minor.yy504 = yylhsminor.yy504; break; case 259: /* signed_literal ::= NK_BOOL */ { yylhsminor.yy504 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } yymsp[0].minor.yy504 = yylhsminor.yy504; break; case 260: /* signed_literal ::= TIMESTAMP NK_STRING */ { yymsp[-1].minor.yy504 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; case 261: /* signed_literal ::= duration_literal */ case 357: /* select_item ::= common_expression */ yytestcase(yyruleno==357); case 401: /* search_condition ::= common_expression */ yytestcase(yyruleno==401); { yylhsminor.yy504 = releaseRawExprNode(pCxt, yymsp[0].minor.yy504); } yymsp[0].minor.yy504 = yylhsminor.yy504; break; case 262: /* signed_literal ::= NULL */ { yymsp[0].minor.yy504 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, NULL); } break; case 280: /* expression ::= function_name NK_LP expression_list NK_RP */ { yylhsminor.yy504 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy409, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy409, yymsp[-1].minor.yy488)); } yymsp[-3].minor.yy504 = yylhsminor.yy504; break; case 281: /* expression ::= function_name NK_LP NK_STAR NK_RP */ { yylhsminor.yy504 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy409, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy409, createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy0)))); } yymsp[-3].minor.yy504 = yylhsminor.yy504; break; case 282: /* expression ::= CAST NK_LP expression AS type_name NK_RP */ { yylhsminor.yy504 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy504), yymsp[-1].minor.yy160)); } yymsp[-5].minor.yy504 = yylhsminor.yy504; break; case 284: /* expression ::= NK_LP expression NK_RP */ case 329: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==329); { yylhsminor.yy504 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy504)); } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 285: /* expression ::= NK_PLUS expression */ { SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy504); yylhsminor.yy504 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy504)); } yymsp[-1].minor.yy504 = yylhsminor.yy504; break; case 286: /* expression ::= NK_MINUS expression */ { SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy504); yylhsminor.yy504 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy504), NULL)); } yymsp[-1].minor.yy504 = yylhsminor.yy504; break; case 287: /* expression ::= expression NK_PLUS expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy504); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy504); yylhsminor.yy504 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy504), releaseRawExprNode(pCxt, yymsp[0].minor.yy504))); } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 288: /* expression ::= expression NK_MINUS expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy504); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy504); yylhsminor.yy504 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy504), releaseRawExprNode(pCxt, yymsp[0].minor.yy504))); } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 289: /* expression ::= expression NK_STAR expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy504); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy504); yylhsminor.yy504 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy504), releaseRawExprNode(pCxt, yymsp[0].minor.yy504))); } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 290: /* expression ::= expression NK_SLASH expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy504); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy504); yylhsminor.yy504 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy504), releaseRawExprNode(pCxt, yymsp[0].minor.yy504))); } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 291: /* expression ::= expression NK_REM expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy504); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy504); yylhsminor.yy504 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MOD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy504), releaseRawExprNode(pCxt, yymsp[0].minor.yy504))); } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 292: /* expression_list ::= expression */ { yylhsminor.yy488 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy504)); } yymsp[0].minor.yy488 = yylhsminor.yy488; break; case 293: /* expression_list ::= expression_list NK_COMMA expression */ { yylhsminor.yy488 = addNodeToList(pCxt, yymsp[-2].minor.yy488, releaseRawExprNode(pCxt, yymsp[0].minor.yy504)); } yymsp[-2].minor.yy488 = yylhsminor.yy488; break; case 294: /* column_reference ::= column_name */ { yylhsminor.yy504 = createRawExprNode(pCxt, &yymsp[0].minor.yy409, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy409)); } yymsp[0].minor.yy504 = yylhsminor.yy504; break; case 295: /* column_reference ::= table_name NK_DOT column_name */ { yylhsminor.yy504 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy409, &yymsp[0].minor.yy409, createColumnNode(pCxt, &yymsp[-2].minor.yy409, &yymsp[0].minor.yy409)); } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 296: /* pseudo_column ::= NOW */ case 297: /* pseudo_column ::= TODAY */ yytestcase(yyruleno==297); case 298: /* pseudo_column ::= ROWTS */ yytestcase(yyruleno==298); case 299: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==299); case 300: /* pseudo_column ::= QSTARTTS */ yytestcase(yyruleno==300); case 301: /* pseudo_column ::= QENDTS */ yytestcase(yyruleno==301); case 302: /* pseudo_column ::= WSTARTTS */ yytestcase(yyruleno==302); case 303: /* pseudo_column ::= WENDTS */ yytestcase(yyruleno==303); case 304: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==304); { yylhsminor.yy504 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } yymsp[0].minor.yy504 = yylhsminor.yy504; break; case 305: /* predicate ::= expression compare_op expression */ case 310: /* predicate ::= expression in_op in_predicate_value */ yytestcase(yyruleno==310); { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy504); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy504); yylhsminor.yy504 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy84, releaseRawExprNode(pCxt, yymsp[-2].minor.yy504), releaseRawExprNode(pCxt, yymsp[0].minor.yy504))); } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 306: /* predicate ::= expression BETWEEN expression AND expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy504); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy504); yylhsminor.yy504 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy504), releaseRawExprNode(pCxt, yymsp[-2].minor.yy504), releaseRawExprNode(pCxt, yymsp[0].minor.yy504))); } yymsp[-4].minor.yy504 = yylhsminor.yy504; break; case 307: /* predicate ::= expression NOT BETWEEN expression AND expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy504); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy504); yylhsminor.yy504 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy504), releaseRawExprNode(pCxt, yymsp[-5].minor.yy504), releaseRawExprNode(pCxt, yymsp[0].minor.yy504))); } yymsp[-5].minor.yy504 = yylhsminor.yy504; break; case 308: /* predicate ::= expression IS NULL */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy504); yylhsminor.yy504 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy504), NULL)); } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 309: /* predicate ::= expression IS NOT NULL */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy504); yylhsminor.yy504 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy504), NULL)); } yymsp[-3].minor.yy504 = yylhsminor.yy504; break; case 311: /* compare_op ::= NK_LT */ { yymsp[0].minor.yy84 = OP_TYPE_LOWER_THAN; } break; case 312: /* compare_op ::= NK_GT */ { yymsp[0].minor.yy84 = OP_TYPE_GREATER_THAN; } break; case 313: /* compare_op ::= NK_LE */ { yymsp[0].minor.yy84 = OP_TYPE_LOWER_EQUAL; } break; case 314: /* compare_op ::= NK_GE */ { yymsp[0].minor.yy84 = OP_TYPE_GREATER_EQUAL; } break; case 315: /* compare_op ::= NK_NE */ { yymsp[0].minor.yy84 = OP_TYPE_NOT_EQUAL; } break; case 316: /* compare_op ::= NK_EQ */ { yymsp[0].minor.yy84 = OP_TYPE_EQUAL; } break; case 317: /* compare_op ::= LIKE */ { yymsp[0].minor.yy84 = OP_TYPE_LIKE; } break; case 318: /* compare_op ::= NOT LIKE */ { yymsp[-1].minor.yy84 = OP_TYPE_NOT_LIKE; } break; case 319: /* compare_op ::= MATCH */ { yymsp[0].minor.yy84 = OP_TYPE_MATCH; } break; case 320: /* compare_op ::= NMATCH */ { yymsp[0].minor.yy84 = OP_TYPE_NMATCH; } break; case 321: /* in_op ::= IN */ { yymsp[0].minor.yy84 = OP_TYPE_IN; } break; case 322: /* in_op ::= NOT IN */ { yymsp[-1].minor.yy84 = OP_TYPE_NOT_IN; } break; case 323: /* in_predicate_value ::= NK_LP expression_list NK_RP */ { yylhsminor.yy504 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy488)); } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 325: /* boolean_value_expression ::= NOT boolean_primary */ { SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy504); yylhsminor.yy504 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy504), NULL)); } yymsp[-1].minor.yy504 = yylhsminor.yy504; break; case 326: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy504); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy504); yylhsminor.yy504 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy504), releaseRawExprNode(pCxt, yymsp[0].minor.yy504))); } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 327: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy504); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy504); yylhsminor.yy504 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy504), releaseRawExprNode(pCxt, yymsp[0].minor.yy504))); } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 332: /* from_clause ::= FROM table_reference_list */ case 362: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==362); case 385: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==385); { yymsp[-1].minor.yy504 = yymsp[0].minor.yy504; } break; case 334: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ { yylhsminor.yy504 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy504, yymsp[0].minor.yy504, NULL); } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 337: /* table_primary ::= table_name alias_opt */ { yylhsminor.yy504 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy409, &yymsp[0].minor.yy409); } yymsp[-1].minor.yy504 = yylhsminor.yy504; break; case 338: /* table_primary ::= db_name NK_DOT table_name alias_opt */ { yylhsminor.yy504 = createRealTableNode(pCxt, &yymsp[-3].minor.yy409, &yymsp[-1].minor.yy409, &yymsp[0].minor.yy409); } yymsp[-3].minor.yy504 = yylhsminor.yy504; break; case 339: /* table_primary ::= subquery alias_opt */ { yylhsminor.yy504 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy504), &yymsp[0].minor.yy409); } yymsp[-1].minor.yy504 = yylhsminor.yy504; break; case 341: /* alias_opt ::= */ { yymsp[1].minor.yy409 = nil_token; } break; case 342: /* alias_opt ::= table_alias */ { yylhsminor.yy409 = yymsp[0].minor.yy409; } yymsp[0].minor.yy409 = yylhsminor.yy409; break; case 343: /* alias_opt ::= AS table_alias */ { yymsp[-1].minor.yy409 = yymsp[0].minor.yy409; } break; case 344: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ case 345: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==345); { yymsp[-2].minor.yy504 = yymsp[-1].minor.yy504; } break; case 346: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ { yylhsminor.yy504 = createJoinTableNode(pCxt, yymsp[-4].minor.yy556, yymsp[-5].minor.yy504, yymsp[-2].minor.yy504, yymsp[0].minor.yy504); } yymsp[-5].minor.yy504 = yylhsminor.yy504; break; case 347: /* join_type ::= */ { yymsp[1].minor.yy556 = JOIN_TYPE_INNER; } break; case 348: /* join_type ::= INNER */ { yymsp[0].minor.yy556 = JOIN_TYPE_INNER; } break; case 349: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ { yymsp[-8].minor.yy504 = createSelectStmt(pCxt, yymsp[-7].minor.yy121, yymsp[-6].minor.yy488, yymsp[-5].minor.yy504); yymsp[-8].minor.yy504 = addWhereClause(pCxt, yymsp[-8].minor.yy504, yymsp[-4].minor.yy504); yymsp[-8].minor.yy504 = addPartitionByClause(pCxt, yymsp[-8].minor.yy504, yymsp[-3].minor.yy488); yymsp[-8].minor.yy504 = addWindowClauseClause(pCxt, yymsp[-8].minor.yy504, yymsp[-2].minor.yy504); yymsp[-8].minor.yy504 = addGroupByClause(pCxt, yymsp[-8].minor.yy504, yymsp[-1].minor.yy488); yymsp[-8].minor.yy504 = addHavingClause(pCxt, yymsp[-8].minor.yy504, yymsp[0].minor.yy504); } break; case 352: /* set_quantifier_opt ::= ALL */ { yymsp[0].minor.yy121 = false; } break; case 353: /* select_list ::= NK_STAR */ { yymsp[0].minor.yy488 = NULL; } break; case 358: /* select_item ::= common_expression column_alias */ { yylhsminor.yy504 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy504), &yymsp[0].minor.yy409); } yymsp[-1].minor.yy504 = yylhsminor.yy504; break; case 359: /* select_item ::= common_expression AS column_alias */ { yylhsminor.yy504 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy504), &yymsp[0].minor.yy409); } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 360: /* select_item ::= table_name NK_DOT NK_STAR */ { yylhsminor.yy504 = createColumnNode(pCxt, &yymsp[-2].minor.yy409, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 364: /* partition_by_clause_opt ::= PARTITION BY expression_list */ case 381: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==381); case 391: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==391); { yymsp[-2].minor.yy488 = yymsp[0].minor.yy488; } break; case 366: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ { yymsp[-5].minor.yy504 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy504), releaseRawExprNode(pCxt, yymsp[-1].minor.yy504)); } break; case 367: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ { yymsp[-3].minor.yy504 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy504)); } break; case 368: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ { yymsp[-5].minor.yy504 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy504), NULL, yymsp[-1].minor.yy504, yymsp[0].minor.yy504); } break; case 369: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ { yymsp[-7].minor.yy504 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy504), releaseRawExprNode(pCxt, yymsp[-3].minor.yy504), yymsp[-1].minor.yy504, yymsp[0].minor.yy504); } break; case 371: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ { yymsp[-3].minor.yy504 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy504); } break; case 373: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ { yymsp[-3].minor.yy504 = createFillNode(pCxt, yymsp[-1].minor.yy22, NULL); } break; case 374: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ { yymsp[-5].minor.yy504 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy488)); } break; case 375: /* fill_mode ::= NONE */ { yymsp[0].minor.yy22 = FILL_MODE_NONE; } break; case 376: /* fill_mode ::= PREV */ { yymsp[0].minor.yy22 = FILL_MODE_PREV; } break; case 377: /* fill_mode ::= NULL */ { yymsp[0].minor.yy22 = FILL_MODE_NULL; } break; case 378: /* fill_mode ::= LINEAR */ { yymsp[0].minor.yy22 = FILL_MODE_LINEAR; } break; case 379: /* fill_mode ::= NEXT */ { yymsp[0].minor.yy22 = FILL_MODE_NEXT; } break; case 382: /* group_by_list ::= expression */ { yylhsminor.yy488 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy504))); } yymsp[0].minor.yy488 = yylhsminor.yy488; break; case 383: /* group_by_list ::= group_by_list NK_COMMA expression */ { yylhsminor.yy488 = addNodeToList(pCxt, yymsp[-2].minor.yy488, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy504))); } yymsp[-2].minor.yy488 = yylhsminor.yy488; break; case 386: /* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ { yylhsminor.yy504 = addOrderByClause(pCxt, yymsp[-3].minor.yy504, yymsp[-2].minor.yy488); yylhsminor.yy504 = addSlimitClause(pCxt, yylhsminor.yy504, yymsp[-1].minor.yy504); yylhsminor.yy504 = addLimitClause(pCxt, yylhsminor.yy504, yymsp[0].minor.yy504); } yymsp[-3].minor.yy504 = yylhsminor.yy504; break; case 388: /* query_expression_body ::= query_expression_body UNION ALL query_expression_body */ { yylhsminor.yy504 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy504, yymsp[0].minor.yy504); } yymsp[-3].minor.yy504 = yylhsminor.yy504; break; case 393: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ case 397: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==397); { yymsp[-1].minor.yy504 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; case 394: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ case 398: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==398); { yymsp[-3].minor.yy504 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; case 395: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ case 399: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==399); { yymsp[-3].minor.yy504 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; case 400: /* subquery ::= NK_LP query_expression NK_RP */ { yylhsminor.yy504 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy504); } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 404: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */ { yylhsminor.yy504 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy504), yymsp[-1].minor.yy522, yymsp[0].minor.yy281); } yymsp[-2].minor.yy504 = yylhsminor.yy504; break; case 405: /* ordering_specification_opt ::= */ { yymsp[1].minor.yy522 = ORDER_ASC; } break; case 406: /* ordering_specification_opt ::= ASC */ { yymsp[0].minor.yy522 = ORDER_ASC; } break; case 407: /* ordering_specification_opt ::= DESC */ { yymsp[0].minor.yy522 = ORDER_DESC; } break; case 408: /* null_ordering_opt ::= */ { yymsp[1].minor.yy281 = NULL_ORDER_DEFAULT; } break; case 409: /* null_ordering_opt ::= NULLS FIRST */ { yymsp[-1].minor.yy281 = NULL_ORDER_FIRST; } break; case 410: /* null_ordering_opt ::= NULLS LAST */ { yymsp[-1].minor.yy281 = NULL_ORDER_LAST; } break; default: break; /********** End reduce actions ************************************************/ }; assert( yyrulenoYY_MAX_SHIFT && yyact<=YY_MAX_SHIFTREDUCE) ); /* It is not possible for a REDUCE to be followed by an error */ assert( yyact!=YY_ERROR_ACTION ); yymsp += yysize+1; yypParser->yytos = yymsp; yymsp->stateno = (YYACTIONTYPE)yyact; yymsp->major = (YYCODETYPE)yygoto; yyTraceShift(yypParser, yyact, "... then shift"); return yyact; } /* ** The following code executes when the parse fails */ #ifndef YYNOERRORRECOVERY static void yy_parse_failed( yyParser *yypParser /* The parser */ ){ ParseARG_FETCH ParseCTX_FETCH #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt); } #endif while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser); /* Here code is inserted which will be executed whenever the ** parser fails */ /************ Begin %parse_failure code ***************************************/ /************ End %parse_failure code *****************************************/ ParseARG_STORE /* Suppress warning about unused %extra_argument variable */ ParseCTX_STORE } #endif /* YYNOERRORRECOVERY */ /* ** The following code executes when a syntax error first occurs. */ static void yy_syntax_error( yyParser *yypParser, /* The parser */ int yymajor, /* The major type of the error token */ ParseTOKENTYPE yyminor /* The minor type of the error token */ ){ ParseARG_FETCH ParseCTX_FETCH #define TOKEN yyminor /************ Begin %syntax_error code ****************************************/ if (pCxt->valid) { if(TOKEN.z) { generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR, TOKEN.z); } else { generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INCOMPLETE_SQL); } pCxt->valid = false; } /************ End %syntax_error code ******************************************/ ParseARG_STORE /* Suppress warning about unused %extra_argument variable */ ParseCTX_STORE } /* ** The following is executed when the parser accepts */ static void yy_accept( yyParser *yypParser /* The parser */ ){ ParseARG_FETCH ParseCTX_FETCH #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt); } #endif #ifndef YYNOERRORRECOVERY yypParser->yyerrcnt = -1; #endif assert( yypParser->yytos==yypParser->yystack ); /* Here code is inserted which will be executed whenever the ** parser accepts */ /*********** Begin %parse_accept code *****************************************/ /*********** End %parse_accept code *******************************************/ ParseARG_STORE /* Suppress warning about unused %extra_argument variable */ ParseCTX_STORE } /* The main parser program. ** The first argument is a pointer to a structure obtained from ** "ParseAlloc" which describes the current state of the parser. ** The second argument is the major token number. The third is ** the minor token. The fourth optional argument is whatever the ** user wants (and specified in the grammar) and is available for ** use by the action routines. ** ** Inputs: **
    **
  • A pointer to the parser (an opaque structure.) **
  • The major token number. **
  • The minor token number. **
  • An option argument of a grammar-specified type. **
** ** Outputs: ** None. */ void Parse( void *yyp, /* The parser */ int yymajor, /* The major token code number */ ParseTOKENTYPE yyminor /* The value for the token */ ParseARG_PDECL /* Optional %extra_argument parameter */ ){ YYMINORTYPE yyminorunion; YYACTIONTYPE yyact; /* The parser action. */ #if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY) int yyendofinput; /* True if we are at the end of input */ #endif #ifdef YYERRORSYMBOL int yyerrorhit = 0; /* True if yymajor has invoked an error */ #endif yyParser *yypParser = (yyParser*)yyp; /* The parser */ ParseCTX_FETCH ParseARG_STORE assert( yypParser->yytos!=0 ); #if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY) yyendofinput = (yymajor==0); #endif yyact = yypParser->yytos->stateno; #ifndef NDEBUG if( yyTraceFILE ){ if( yyact < YY_MIN_REDUCE ){ fprintf(yyTraceFILE,"%sInput '%s' in state %d\n", yyTracePrompt,yyTokenName[yymajor],yyact); }else{ fprintf(yyTraceFILE,"%sInput '%s' with pending reduce %d\n", yyTracePrompt,yyTokenName[yymajor],yyact-YY_MIN_REDUCE); } } #endif do{ assert( yyact==yypParser->yytos->stateno ); yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact); if( yyact >= YY_MIN_REDUCE ){ yyact = yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor, yyminor ParseCTX_PARAM); }else if( yyact <= YY_MAX_SHIFTREDUCE ){ yy_shift(yypParser,yyact,(YYCODETYPE)yymajor,yyminor); #ifndef YYNOERRORRECOVERY yypParser->yyerrcnt--; #endif break; }else if( yyact==YY_ACCEPT_ACTION ){ yypParser->yytos--; yy_accept(yypParser); return; }else{ assert( yyact == YY_ERROR_ACTION ); yyminorunion.yy0 = yyminor; #ifdef YYERRORSYMBOL int yymx; #endif #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt); } #endif #ifdef YYERRORSYMBOL /* A syntax error has occurred. ** The response to an error depends upon whether or not the ** grammar defines an error token "ERROR". ** ** This is what we do if the grammar does define ERROR: ** ** * Call the %syntax_error function. ** ** * Begin popping the stack until we enter a state where ** it is legal to shift the error symbol, then shift ** the error symbol. ** ** * Set the error count to three. ** ** * Begin accepting and shifting new tokens. No new error ** processing will occur until three tokens have been ** shifted successfully. ** */ if( yypParser->yyerrcnt<0 ){ yy_syntax_error(yypParser,yymajor,yyminor); } yymx = yypParser->yytos->major; if( yymx==YYERRORSYMBOL || yyerrorhit ){ #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE,"%sDiscard input token %s\n", yyTracePrompt,yyTokenName[yymajor]); } #endif yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion); yymajor = YYNOCODE; }else{ while( yypParser->yytos >= yypParser->yystack && (yyact = yy_find_reduce_action( yypParser->yytos->stateno, YYERRORSYMBOL)) > YY_MAX_SHIFTREDUCE ){ yy_pop_parser_stack(yypParser); } if( yypParser->yytos < yypParser->yystack || yymajor==0 ){ yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); yy_parse_failed(yypParser); #ifndef YYNOERRORRECOVERY yypParser->yyerrcnt = -1; #endif yymajor = YYNOCODE; }else if( yymx!=YYERRORSYMBOL ){ yy_shift(yypParser,yyact,YYERRORSYMBOL,yyminor); } } yypParser->yyerrcnt = 3; yyerrorhit = 1; if( yymajor==YYNOCODE ) break; yyact = yypParser->yytos->stateno; #elif defined(YYNOERRORRECOVERY) /* If the YYNOERRORRECOVERY macro is defined, then do not attempt to ** do any kind of error recovery. Instead, simply invoke the syntax ** error routine and continue going as if nothing had happened. ** ** Applications can set this macro (for example inside %include) if ** they intend to abandon the parse upon the first syntax error seen. */ yy_syntax_error(yypParser,yymajor, yyminor); yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); break; #else /* YYERRORSYMBOL is not defined */ /* This is what we do if the grammar does not define ERROR: ** ** * Report an error message, and throw away the input token. ** ** * If the input token is $, then fail the parse. ** ** As before, subsequent error messages are suppressed until ** three input tokens have been successfully shifted. */ if( yypParser->yyerrcnt<=0 ){ yy_syntax_error(yypParser,yymajor, yyminor); } yypParser->yyerrcnt = 3; yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); if( yyendofinput ){ yy_parse_failed(yypParser); #ifndef YYNOERRORRECOVERY yypParser->yyerrcnt = -1; #endif } break; #endif } }while( yypParser->yytos>yypParser->yystack ); #ifndef NDEBUG if( yyTraceFILE ){ yyStackEntry *i; char cDiv = '['; fprintf(yyTraceFILE,"%sReturn. Stack=",yyTracePrompt); for(i=&yypParser->yystack[1]; i<=yypParser->yytos; i++){ fprintf(yyTraceFILE,"%c%s", cDiv, yyTokenName[i->major]); cDiv = ' '; } fprintf(yyTraceFILE,"]\n"); } #endif return; } /* ** Return the fallback token corresponding to canonical token iToken, or ** 0 if iToken has no fallback. */ int ParseFallback(int iToken){ #ifdef YYFALLBACK if( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) ){ return yyFallback[iToken]; } #else (void)iToken; #endif return 0; }