/* ** 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 #define ALLOW_FORBID_FUNC #include "functionMgt.h" #include "nodes.h" #include "parToken.h" #include "ttokendef.h" #include "parAst.h" #define YYSTACKDEPTH 0 /**************** 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 359 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; EOperatorType yy28; int32_t yy42; ENullOrder yy107; EFillMode yy320; SToken yy421; SNodeList* yy530; SAlterOption yy557; EOrder yy610; bool yy621; EJoinType yy636; int64_t yy669; SNode* yy674; SDataType yy690; } 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 YYFALLBACK 1 #define YYNSTATE 624 #define YYNRULE 458 #define YYNTOKEN 238 #define YY_MAX_SHIFT 623 #define YY_MIN_SHIFTREDUCE 912 #define YY_MAX_SHIFTREDUCE 1369 #define YY_ERROR_ACTION 1370 #define YY_ACCEPT_ACTION 1371 #define YY_NO_ACTION 1372 #define YY_MIN_REDUCE 1373 #define YY_MAX_REDUCE 1830 /************* 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 (2207) static const YYACTIONTYPE yy_action[] = { /* 0 */ 1494, 1492, 355, 1677, 1664, 536, 536, 300, 28, 233, /* 10 */ 135, 1661, 35, 33, 1460, 1661, 1664, 106, 106, 317, /* 20 */ 309, 535, 1183, 535, 434, 439, 394, 1661, 942, 398, /* 30 */ 395, 1693, 396, 1405, 1503, 1503, 496, 1657, 1663, 499, /* 40 */ 1209, 1657, 1663, 1808, 1647, 400, 519, 1181, 539, 535, /* 50 */ 472, 1205, 539, 1657, 1663, 149, 1371, 14, 1677, 1805, /* 60 */ 35, 33, 1310, 1189, 539, 114, 946, 947, 309, 144, /* 70 */ 1183, 1706, 1207, 1208, 83, 1678, 522, 1680, 1681, 518, /* 80 */ 1, 539, 1542, 38, 1746, 79, 1693, 1480, 302, 1742, /* 90 */ 145, 1808, 1693, 496, 520, 1181, 56, 1396, 115, 1647, /* 100 */ 489, 519, 620, 149, 112, 14, 1495, 1805, 1774, 39, /* 110 */ 403, 1189, 396, 1405, 500, 325, 1252, 1253, 498, 146, /* 120 */ 1753, 1754, 114, 1758, 11, 10, 1706, 413, 2, 82, /* 130 */ 1678, 522, 1680, 1681, 518, 1808, 539, 488, 1647, 1746, /* 140 */ 448, 447, 490, 283, 1742, 446, 1808, 1807, 111, 443, /* 150 */ 620, 1805, 442, 441, 440, 1808, 1808, 1184, 150, 1182, /* 160 */ 402, 112, 1805, 398, 1252, 1253, 224, 151, 149, 1090, /* 170 */ 1091, 1805, 1805, 134, 56, 1385, 147, 1753, 1754, 571, /* 180 */ 1758, 1187, 1188, 159, 1234, 1235, 1237, 1238, 1239, 1240, /* 190 */ 1241, 515, 537, 1249, 1250, 1251, 1254, 132, 122, 121, /* 200 */ 568, 567, 566, 24, 1286, 1184, 1506, 1182, 62, 152, /* 210 */ 26, 61, 152, 36, 34, 32, 31, 30, 35, 33, /* 220 */ 36, 34, 32, 31, 30, 152, 309, 346, 1183, 1187, /* 230 */ 1188, 1395, 1234, 1235, 1237, 1238, 1239, 1240, 1241, 515, /* 240 */ 537, 1249, 1250, 1251, 1254, 293, 496, 348, 344, 1010, /* 250 */ 354, 96, 353, 1181, 95, 94, 93, 92, 91, 90, /* 260 */ 89, 88, 87, 14, 1677, 1012, 35, 33, 453, 1189, /* 270 */ 182, 196, 1647, 1208, 309, 114, 1183, 36, 34, 32, /* 280 */ 31, 30, 143, 461, 57, 573, 2, 430, 426, 422, /* 290 */ 418, 181, 1693, 294, 1478, 292, 291, 195, 436, 1808, /* 300 */ 520, 1181, 438, 152, 1760, 1647, 1317, 519, 620, 456, /* 310 */ 1665, 1806, 1207, 450, 112, 1805, 65, 1189, 194, 179, /* 320 */ 500, 1661, 1252, 1253, 437, 1207, 66, 282, 1757, 148, /* 330 */ 1753, 1754, 1706, 1758, 8, 82, 1678, 522, 1680, 1681, /* 340 */ 518, 361, 539, 51, 1635, 1746, 50, 1657, 1663, 283, /* 350 */ 1742, 36, 34, 32, 31, 30, 620, 203, 539, 1555, /* 360 */ 56, 1808, 523, 1184, 321, 1182, 299, 1548, 1550, 385, /* 370 */ 1252, 1253, 1598, 149, 1206, 1553, 1394, 1805, 178, 281, /* 380 */ 170, 1334, 175, 56, 408, 67, 571, 1187, 1188, 334, /* 390 */ 1234, 1235, 1237, 1238, 1239, 1240, 1241, 515, 537, 1249, /* 400 */ 1250, 1251, 1254, 168, 565, 122, 121, 568, 567, 566, /* 410 */ 1393, 1184, 1189, 1182, 1366, 163, 162, 1647, 482, 1332, /* 420 */ 1333, 1335, 1336, 576, 35, 33, 1255, 36, 34, 32, /* 430 */ 31, 30, 309, 571, 1183, 1187, 1188, 496, 1234, 1235, /* 440 */ 1237, 1238, 1239, 1240, 1241, 515, 537, 1249, 1250, 1251, /* 450 */ 1254, 1647, 122, 121, 568, 567, 566, 1549, 1550, 1181, /* 460 */ 32, 31, 30, 152, 536, 1555, 114, 36, 34, 32, /* 470 */ 31, 30, 35, 33, 1677, 1189, 154, 1236, 612, 536, /* 480 */ 309, 1554, 1183, 445, 444, 131, 500, 536, 1555, 152, /* 490 */ 1236, 359, 9, 1503, 1365, 314, 1324, 589, 587, 360, /* 500 */ 462, 523, 1693, 1392, 1553, 112, 1373, 1181, 1503, 312, /* 510 */ 499, 1597, 152, 1391, 620, 1647, 1503, 519, 485, 1260, /* 520 */ 222, 1753, 495, 1189, 494, 1207, 1488, 1808, 1252, 1253, /* 530 */ 105, 104, 103, 102, 101, 100, 99, 98, 97, 151, /* 540 */ 9, 1808, 1706, 1805, 1647, 83, 1678, 522, 1680, 1681, /* 550 */ 518, 73, 539, 149, 1647, 1746, 1434, 1805, 536, 302, /* 560 */ 1742, 145, 620, 36, 34, 32, 31, 30, 64, 1184, /* 570 */ 370, 1182, 1496, 225, 1588, 1555, 1252, 1253, 478, 1773, /* 580 */ 536, 110, 320, 536, 1390, 161, 1490, 1503, 491, 486, /* 590 */ 1498, 1553, 371, 1187, 1188, 412, 1234, 1235, 1237, 1238, /* 600 */ 1239, 1240, 1241, 515, 537, 1249, 1250, 1251, 1254, 1503, /* 610 */ 536, 64, 1503, 1274, 536, 448, 447, 1184, 256, 1182, /* 620 */ 446, 1533, 1500, 111, 443, 1647, 1624, 442, 441, 440, /* 630 */ 35, 33, 1221, 1499, 197, 1279, 54, 1760, 309, 1503, /* 640 */ 1183, 1187, 1188, 1503, 1234, 1235, 1237, 1238, 1239, 1240, /* 650 */ 1241, 515, 537, 1249, 1250, 1251, 1254, 536, 1389, 313, /* 660 */ 1388, 1756, 536, 1387, 1486, 1181, 1481, 132, 536, 470, /* 670 */ 25, 536, 1479, 536, 533, 280, 1505, 1205, 1431, 1309, /* 680 */ 534, 1189, 1374, 246, 378, 323, 1503, 390, 1677, 1384, /* 690 */ 1236, 1503, 1165, 1166, 1760, 946, 947, 1503, 2, 1647, /* 700 */ 1503, 1647, 1503, 96, 1647, 391, 95, 94, 93, 92, /* 710 */ 91, 90, 89, 88, 87, 319, 1693, 1383, 1755, 577, /* 720 */ 620, 1475, 413, 132, 520, 1210, 1386, 1382, 573, 1647, /* 730 */ 1647, 519, 1505, 187, 1252, 1253, 185, 595, 594, 593, /* 740 */ 324, 7, 592, 591, 590, 116, 585, 584, 583, 582, /* 750 */ 581, 580, 579, 578, 124, 574, 1706, 1381, 1647, 84, /* 760 */ 1678, 522, 1680, 1681, 518, 507, 539, 569, 1647, 1746, /* 770 */ 1546, 616, 615, 1745, 1742, 1184, 389, 1182, 1380, 384, /* 780 */ 383, 382, 381, 380, 377, 376, 375, 374, 373, 369, /* 790 */ 368, 367, 366, 365, 364, 363, 362, 200, 1647, 1187, /* 800 */ 1188, 504, 1234, 1235, 1237, 1238, 1239, 1240, 1241, 515, /* 810 */ 537, 1249, 1250, 1251, 1254, 133, 588, 1379, 958, 1647, /* 820 */ 262, 1378, 36, 34, 32, 31, 30, 570, 1765, 1305, /* 830 */ 1546, 1377, 260, 53, 1376, 1677, 52, 36, 34, 32, /* 840 */ 31, 30, 322, 432, 438, 1183, 189, 1421, 120, 188, /* 850 */ 132, 209, 164, 46, 212, 514, 349, 502, 1647, 1505, /* 860 */ 512, 1677, 1647, 1693, 469, 191, 437, 284, 190, 449, /* 870 */ 1181, 520, 1647, 1417, 1415, 1647, 1647, 56, 519, 460, /* 880 */ 11, 10, 284, 37, 193, 1308, 1189, 192, 474, 1693, /* 890 */ 37, 1221, 458, 1331, 214, 451, 454, 517, 564, 1272, /* 900 */ 1368, 1369, 1647, 1706, 519, 1461, 83, 1678, 522, 1680, /* 910 */ 1681, 518, 1305, 539, 1272, 81, 1746, 1677, 228, 1667, /* 920 */ 302, 1742, 1821, 1280, 37, 620, 235, 118, 1192, 1706, /* 930 */ 1242, 1780, 277, 1678, 522, 1680, 1681, 518, 516, 539, /* 940 */ 513, 1718, 1191, 119, 483, 1693, 60, 59, 358, 463, /* 950 */ 1273, 158, 508, 520, 120, 1669, 46, 352, 1647, 544, /* 960 */ 519, 119, 1694, 1406, 1138, 1273, 237, 528, 279, 219, /* 970 */ 431, 342, 1278, 340, 336, 332, 155, 327, 120, 107, /* 980 */ 1184, 119, 1182, 243, 1264, 1706, 505, 1278, 84, 1678, /* 990 */ 522, 1680, 1681, 518, 1041, 539, 255, 1776, 1746, 1069, /* 1000 */ 1543, 1073, 511, 1742, 1187, 1188, 152, 27, 307, 1267, /* 1010 */ 1268, 1269, 1270, 1271, 1275, 1276, 1277, 1677, 1080, 1078, /* 1020 */ 982, 123, 27, 307, 1267, 1268, 1269, 1270, 1271, 1275, /* 1030 */ 1276, 1277, 78, 497, 227, 230, 983, 3, 232, 5, /* 1040 */ 1195, 326, 75, 1205, 333, 1693, 329, 289, 1010, 290, /* 1050 */ 252, 1149, 372, 520, 1194, 160, 1590, 379, 1647, 387, /* 1060 */ 519, 386, 392, 1211, 388, 393, 1214, 1048, 562, 561, /* 1070 */ 560, 1052, 559, 1054, 1055, 558, 1057, 555, 1677, 1063, /* 1080 */ 552, 1065, 1066, 549, 546, 1706, 401, 167, 83, 1678, /* 1090 */ 522, 1680, 1681, 518, 404, 539, 1213, 169, 1746, 405, /* 1100 */ 1215, 406, 302, 1742, 1821, 172, 1693, 407, 174, 410, /* 1110 */ 1212, 411, 409, 1803, 520, 177, 63, 414, 180, 1647, /* 1120 */ 433, 519, 435, 1493, 86, 184, 1489, 298, 186, 126, /* 1130 */ 127, 198, 1629, 1491, 253, 1487, 128, 129, 465, 201, /* 1140 */ 464, 1677, 471, 204, 473, 1210, 1706, 475, 207, 83, /* 1150 */ 1678, 522, 1680, 1681, 518, 1677, 539, 496, 484, 1746, /* 1160 */ 1628, 476, 1777, 302, 1742, 1821, 468, 1787, 6, 1693, /* 1170 */ 526, 481, 301, 1786, 1764, 487, 493, 520, 480, 1767, /* 1180 */ 210, 218, 1647, 1693, 519, 1305, 114, 139, 113, 1209, /* 1190 */ 40, 520, 213, 1804, 509, 506, 1647, 500, 519, 303, /* 1200 */ 18, 1761, 529, 1824, 524, 220, 500, 525, 311, 1706, /* 1210 */ 1596, 500, 269, 1678, 522, 1680, 1681, 518, 531, 539, /* 1220 */ 1595, 530, 241, 1706, 226, 112, 269, 1678, 522, 1680, /* 1230 */ 1681, 518, 221, 539, 1677, 1727, 239, 254, 1808, 72, /* 1240 */ 222, 1753, 495, 74, 494, 1677, 1547, 1808, 1476, 542, /* 1250 */ 151, 257, 1808, 229, 1805, 1504, 249, 503, 510, 149, /* 1260 */ 231, 619, 1693, 1805, 149, 623, 138, 1641, 1805, 263, /* 1270 */ 520, 270, 264, 1693, 259, 1647, 261, 519, 1640, 251, /* 1280 */ 47, 520, 58, 1639, 328, 1636, 1647, 330, 519, 331, /* 1290 */ 1176, 125, 1177, 335, 156, 1634, 611, 607, 603, 599, /* 1300 */ 250, 337, 1706, 338, 339, 136, 1678, 522, 1680, 1681, /* 1310 */ 518, 1677, 539, 1706, 1633, 341, 84, 1678, 522, 1680, /* 1320 */ 1681, 518, 1632, 539, 343, 80, 1746, 1677, 244, 1631, /* 1330 */ 345, 1743, 157, 347, 1614, 350, 1152, 351, 1151, 1693, /* 1340 */ 1630, 1608, 1607, 356, 357, 1606, 1605, 520, 501, 1822, /* 1350 */ 1124, 1583, 1647, 1582, 519, 1693, 1581, 1580, 1579, 1578, /* 1360 */ 1577, 532, 1576, 520, 1575, 479, 1574, 1573, 1647, 1572, /* 1370 */ 519, 1571, 1570, 1569, 1568, 1567, 1566, 117, 1565, 1706, /* 1380 */ 1564, 1563, 278, 1678, 522, 1680, 1681, 518, 477, 539, /* 1390 */ 1126, 205, 1562, 1677, 1561, 1706, 1560, 1559, 273, 1678, /* 1400 */ 522, 1680, 1681, 518, 1558, 539, 1557, 1556, 1433, 1402, /* 1410 */ 1157, 142, 199, 1401, 949, 948, 1677, 165, 1622, 108, /* 1420 */ 1616, 1693, 166, 397, 109, 1604, 171, 399, 173, 520, /* 1430 */ 1603, 1593, 176, 1482, 1647, 492, 519, 1432, 1430, 1428, /* 1440 */ 415, 1426, 417, 976, 1693, 419, 1424, 416, 420, 421, /* 1450 */ 1414, 425, 520, 1413, 429, 424, 1400, 1647, 1484, 519, /* 1460 */ 586, 1706, 423, 427, 136, 1678, 522, 1680, 1681, 518, /* 1470 */ 306, 539, 428, 1677, 1083, 45, 1084, 1483, 183, 1009, /* 1480 */ 1422, 1008, 1007, 1006, 1706, 588, 295, 278, 1678, 522, /* 1490 */ 1680, 1681, 518, 1418, 539, 1003, 1677, 296, 1002, 1416, /* 1500 */ 297, 1693, 1001, 1399, 457, 452, 455, 1398, 1823, 517, /* 1510 */ 459, 85, 1621, 1159, 1647, 1615, 519, 130, 466, 1602, /* 1520 */ 1601, 1600, 1592, 68, 1693, 4, 206, 37, 15, 217, /* 1530 */ 211, 43, 520, 216, 49, 1330, 23, 1647, 1667, 519, /* 1540 */ 16, 1706, 137, 215, 277, 1678, 522, 1680, 1681, 518, /* 1550 */ 308, 539, 1677, 1719, 22, 223, 41, 1323, 42, 69, /* 1560 */ 140, 1677, 208, 13, 1706, 202, 10, 278, 1678, 522, /* 1570 */ 1680, 1681, 518, 1677, 539, 17, 1354, 1353, 1302, 1301, /* 1580 */ 1693, 1359, 1348, 304, 1358, 1357, 467, 305, 520, 1693, /* 1590 */ 19, 48, 141, 1647, 1244, 519, 153, 520, 29, 1229, /* 1600 */ 1591, 1693, 1647, 12, 519, 1265, 310, 1243, 20, 520, /* 1610 */ 240, 521, 21, 236, 1647, 238, 519, 527, 1666, 70, /* 1620 */ 1706, 75, 234, 278, 1678, 522, 1680, 1681, 518, 1706, /* 1630 */ 539, 1677, 265, 1678, 522, 1680, 1681, 518, 1328, 539, /* 1640 */ 1677, 1706, 71, 242, 272, 1678, 522, 1680, 1681, 518, /* 1650 */ 245, 539, 1677, 1246, 1199, 1709, 538, 541, 44, 1693, /* 1660 */ 1070, 543, 318, 545, 547, 1067, 548, 520, 1693, 1064, /* 1670 */ 550, 551, 1647, 1058, 519, 553, 520, 554, 556, 1056, /* 1680 */ 1693, 1647, 1047, 519, 557, 1062, 1061, 563, 520, 1060, /* 1690 */ 76, 1059, 77, 1647, 1079, 519, 55, 247, 1075, 1706, /* 1700 */ 974, 1677, 274, 1678, 522, 1680, 1681, 518, 1706, 539, /* 1710 */ 1677, 266, 1678, 522, 1680, 1681, 518, 998, 539, 572, /* 1720 */ 1706, 1016, 575, 275, 1678, 522, 1680, 1681, 518, 1693, /* 1730 */ 539, 248, 996, 995, 994, 993, 992, 520, 1693, 991, /* 1740 */ 990, 989, 1647, 1013, 519, 1011, 520, 986, 985, 1429, /* 1750 */ 984, 1647, 981, 519, 980, 979, 596, 597, 598, 1427, /* 1760 */ 600, 601, 602, 1425, 605, 604, 1677, 606, 1423, 1706, /* 1770 */ 608, 609, 267, 1678, 522, 1680, 1681, 518, 1706, 539, /* 1780 */ 610, 276, 1678, 522, 1680, 1681, 518, 1677, 539, 1412, /* 1790 */ 1420, 1411, 613, 614, 1693, 1397, 617, 618, 1372, 1185, /* 1800 */ 258, 621, 520, 622, 1372, 1372, 1372, 1647, 1372, 519, /* 1810 */ 1372, 1372, 1372, 1372, 1372, 1693, 1372, 1372, 1372, 1372, /* 1820 */ 1372, 1372, 1372, 520, 1372, 1372, 1372, 1372, 1647, 1372, /* 1830 */ 519, 1372, 1372, 1372, 1706, 1372, 1372, 268, 1678, 522, /* 1840 */ 1680, 1681, 518, 1677, 539, 1372, 1372, 1372, 1372, 1372, /* 1850 */ 1372, 1372, 1372, 1372, 1372, 1706, 1372, 1372, 1689, 1678, /* 1860 */ 522, 1680, 1681, 518, 1372, 539, 1677, 1372, 1372, 1372, /* 1870 */ 1372, 1693, 1372, 1372, 1372, 1372, 1372, 1372, 1372, 520, /* 1880 */ 1372, 1372, 1372, 1372, 1647, 1372, 519, 1372, 1372, 1372, /* 1890 */ 1372, 1372, 1372, 1372, 1693, 1372, 1372, 1372, 1372, 1372, /* 1900 */ 1372, 1372, 520, 1372, 1372, 1372, 1372, 1647, 1372, 519, /* 1910 */ 1372, 1706, 1372, 1372, 1688, 1678, 522, 1680, 1681, 518, /* 1920 */ 1372, 539, 1677, 1372, 1372, 1372, 1372, 1372, 1372, 1372, /* 1930 */ 1372, 1372, 1372, 1372, 1706, 1372, 1372, 1687, 1678, 522, /* 1940 */ 1680, 1681, 518, 1677, 539, 1372, 1372, 1372, 1372, 1372, /* 1950 */ 1693, 1372, 1372, 1372, 1372, 1372, 1372, 1372, 520, 1372, /* 1960 */ 1372, 1372, 1372, 1647, 1372, 519, 1372, 1372, 1372, 1372, /* 1970 */ 1372, 1693, 1372, 1372, 1372, 1372, 1372, 1372, 1372, 520, /* 1980 */ 1372, 1372, 1372, 1372, 1647, 1372, 519, 1372, 1372, 1372, /* 1990 */ 1706, 1372, 1372, 287, 1678, 522, 1680, 1681, 518, 1372, /* 2000 */ 539, 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1677, 1372, /* 2010 */ 1372, 1706, 1372, 1372, 286, 1678, 522, 1680, 1681, 518, /* 2020 */ 1677, 539, 1372, 1372, 316, 315, 1372, 1372, 1372, 1677, /* 2030 */ 1372, 1372, 1372, 1372, 1197, 1372, 1693, 1372, 1372, 1372, /* 2040 */ 1372, 1372, 1372, 1372, 520, 1372, 1372, 1372, 1693, 1647, /* 2050 */ 1372, 519, 1372, 1372, 1372, 1372, 520, 1693, 1372, 1190, /* 2060 */ 1372, 1647, 1372, 519, 1372, 520, 1372, 1372, 1372, 1372, /* 2070 */ 1647, 1372, 519, 1372, 1372, 1189, 1706, 1372, 1372, 288, /* 2080 */ 1678, 522, 1680, 1681, 518, 1372, 539, 1372, 1706, 1372, /* 2090 */ 1372, 285, 1678, 522, 1680, 1681, 518, 1706, 539, 1372, /* 2100 */ 271, 1678, 522, 1680, 1681, 518, 1372, 539, 1372, 1372, /* 2110 */ 1372, 1372, 1372, 1372, 540, 1372, 1372, 1372, 1372, 1372, /* 2120 */ 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372, /* 2130 */ 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372, /* 2140 */ 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372, /* 2150 */ 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372, /* 2160 */ 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1198, /* 2170 */ 1372, 1193, 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372, /* 2180 */ 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372, 1372, /* 2190 */ 1372, 1372, 1372, 1201, 1372, 1372, 1372, 1372, 1372, 1372, /* 2200 */ 1372, 1372, 1372, 1372, 537, 1249, 1250, }; static const YYCODETYPE yy_lookahead[] = { /* 0 */ 271, 270, 297, 241, 271, 248, 248, 274, 323, 324, /* 10 */ 254, 282, 12, 13, 258, 282, 271, 260, 260, 274, /* 20 */ 20, 20, 22, 20, 267, 267, 245, 282, 4, 248, /* 30 */ 244, 269, 246, 247, 277, 277, 248, 308, 309, 277, /* 40 */ 20, 308, 309, 338, 282, 14, 284, 47, 319, 20, /* 50 */ 297, 20, 319, 308, 309, 350, 238, 57, 241, 354, /* 60 */ 12, 13, 14, 63, 319, 277, 42, 43, 20, 268, /* 70 */ 22, 309, 20, 20, 312, 313, 314, 315, 316, 317, /* 80 */ 80, 319, 281, 80, 322, 251, 269, 0, 326, 327, /* 90 */ 328, 338, 269, 248, 277, 47, 80, 241, 264, 282, /* 100 */ 277, 284, 102, 350, 316, 57, 272, 354, 346, 80, /* 110 */ 244, 63, 246, 247, 297, 297, 116, 117, 330, 331, /* 120 */ 332, 333, 277, 335, 1, 2, 309, 56, 80, 312, /* 130 */ 313, 314, 315, 316, 317, 338, 319, 314, 282, 322, /* 140 */ 59, 60, 20, 326, 327, 64, 338, 350, 67, 68, /* 150 */ 102, 354, 71, 72, 73, 338, 338, 157, 350, 159, /* 160 */ 245, 316, 354, 248, 116, 117, 146, 350, 350, 116, /* 170 */ 117, 354, 354, 240, 80, 242, 331, 332, 333, 92, /* 180 */ 335, 181, 182, 54, 184, 185, 186, 187, 188, 189, /* 190 */ 190, 191, 192, 193, 194, 195, 196, 269, 111, 112, /* 200 */ 113, 114, 115, 2, 81, 157, 278, 159, 79, 209, /* 210 */ 2, 82, 209, 12, 13, 14, 15, 16, 12, 13, /* 220 */ 12, 13, 14, 15, 16, 209, 20, 152, 22, 181, /* 230 */ 182, 241, 184, 185, 186, 187, 188, 189, 190, 191, /* 240 */ 192, 193, 194, 195, 196, 35, 248, 172, 173, 47, /* 250 */ 156, 21, 158, 47, 24, 25, 26, 27, 28, 29, /* 260 */ 30, 31, 32, 57, 241, 63, 12, 13, 4, 63, /* 270 */ 33, 112, 282, 20, 20, 277, 22, 12, 13, 14, /* 280 */ 15, 16, 45, 19, 4, 56, 80, 50, 51, 52, /* 290 */ 53, 54, 269, 83, 0, 85, 86, 33, 88, 338, /* 300 */ 277, 47, 92, 209, 310, 282, 14, 284, 102, 45, /* 310 */ 271, 350, 20, 49, 316, 354, 79, 63, 54, 82, /* 320 */ 297, 282, 116, 117, 114, 20, 167, 168, 334, 331, /* 330 */ 332, 333, 309, 335, 80, 312, 313, 314, 315, 316, /* 340 */ 317, 248, 319, 79, 0, 322, 82, 308, 309, 326, /* 350 */ 327, 12, 13, 14, 15, 16, 102, 54, 319, 269, /* 360 */ 80, 338, 284, 157, 280, 159, 276, 283, 284, 74, /* 370 */ 116, 117, 294, 350, 20, 285, 241, 354, 141, 286, /* 380 */ 143, 181, 145, 80, 147, 82, 92, 181, 182, 45, /* 390 */ 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, /* 400 */ 194, 195, 196, 166, 91, 111, 112, 113, 114, 115, /* 410 */ 241, 157, 63, 159, 149, 120, 121, 282, 218, 219, /* 420 */ 220, 221, 222, 63, 12, 13, 14, 12, 13, 14, /* 430 */ 15, 16, 20, 92, 22, 181, 182, 248, 184, 185, /* 440 */ 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, /* 450 */ 196, 282, 111, 112, 113, 114, 115, 283, 284, 47, /* 460 */ 14, 15, 16, 209, 248, 269, 277, 12, 13, 14, /* 470 */ 15, 16, 12, 13, 241, 63, 260, 185, 22, 248, /* 480 */ 20, 285, 22, 255, 256, 146, 297, 248, 269, 209, /* 490 */ 185, 260, 80, 277, 229, 276, 81, 255, 256, 260, /* 500 */ 297, 284, 269, 241, 285, 316, 0, 47, 277, 292, /* 510 */ 277, 294, 209, 241, 102, 282, 277, 284, 144, 14, /* 520 */ 331, 332, 333, 63, 335, 20, 270, 338, 116, 117, /* 530 */ 24, 25, 26, 27, 28, 29, 30, 31, 32, 350, /* 540 */ 80, 338, 309, 354, 282, 312, 313, 314, 315, 316, /* 550 */ 317, 251, 319, 350, 282, 322, 0, 354, 248, 326, /* 560 */ 327, 328, 102, 12, 13, 14, 15, 16, 253, 157, /* 570 */ 260, 159, 272, 340, 277, 269, 116, 117, 345, 346, /* 580 */ 248, 266, 276, 248, 241, 288, 270, 277, 214, 215, /* 590 */ 275, 285, 260, 181, 182, 260, 184, 185, 186, 187, /* 600 */ 188, 189, 190, 191, 192, 193, 194, 195, 196, 277, /* 610 */ 248, 253, 277, 140, 248, 59, 60, 157, 262, 159, /* 620 */ 64, 265, 260, 67, 68, 282, 260, 71, 72, 73, /* 630 */ 12, 13, 81, 275, 111, 162, 3, 310, 20, 277, /* 640 */ 22, 181, 182, 277, 184, 185, 186, 187, 188, 189, /* 650 */ 190, 191, 192, 193, 194, 195, 196, 248, 241, 261, /* 660 */ 241, 334, 248, 241, 270, 47, 0, 269, 248, 260, /* 670 */ 197, 248, 0, 248, 260, 18, 278, 20, 0, 4, /* 680 */ 260, 63, 0, 260, 27, 260, 277, 30, 241, 241, /* 690 */ 185, 277, 169, 170, 310, 42, 43, 277, 80, 282, /* 700 */ 277, 282, 277, 21, 282, 48, 24, 25, 26, 27, /* 710 */ 28, 29, 30, 31, 32, 261, 269, 241, 334, 257, /* 720 */ 102, 259, 56, 269, 277, 20, 242, 241, 56, 282, /* 730 */ 282, 284, 278, 84, 116, 117, 87, 59, 60, 61, /* 740 */ 62, 37, 64, 65, 66, 67, 68, 69, 70, 71, /* 750 */ 72, 73, 74, 75, 76, 77, 309, 241, 282, 312, /* 760 */ 313, 314, 315, 316, 317, 41, 319, 279, 282, 322, /* 770 */ 282, 249, 250, 326, 327, 157, 119, 159, 241, 122, /* 780 */ 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, /* 790 */ 133, 134, 135, 136, 137, 138, 139, 270, 282, 181, /* 800 */ 182, 41, 184, 185, 186, 187, 188, 189, 190, 191, /* 810 */ 192, 193, 194, 195, 196, 18, 41, 241, 22, 282, /* 820 */ 23, 241, 12, 13, 14, 15, 16, 279, 207, 208, /* 830 */ 282, 241, 35, 36, 241, 241, 39, 12, 13, 14, /* 840 */ 15, 16, 261, 47, 92, 22, 84, 0, 41, 87, /* 850 */ 269, 146, 55, 41, 41, 270, 81, 224, 282, 278, /* 860 */ 57, 241, 282, 269, 301, 84, 114, 57, 87, 22, /* 870 */ 47, 277, 282, 0, 0, 282, 282, 80, 284, 21, /* 880 */ 1, 2, 57, 41, 84, 210, 63, 87, 81, 269, /* 890 */ 41, 81, 34, 81, 81, 22, 22, 277, 270, 89, /* 900 */ 116, 117, 282, 309, 284, 258, 312, 313, 314, 315, /* 910 */ 316, 317, 208, 319, 89, 118, 322, 241, 357, 44, /* 920 */ 326, 327, 328, 81, 41, 102, 41, 41, 47, 309, /* 930 */ 81, 337, 312, 313, 314, 315, 316, 317, 318, 319, /* 940 */ 320, 321, 47, 41, 348, 269, 149, 150, 151, 305, /* 950 */ 140, 154, 228, 277, 41, 80, 41, 160, 282, 41, /* 960 */ 284, 41, 269, 247, 81, 140, 81, 81, 171, 342, /* 970 */ 249, 174, 162, 176, 177, 178, 179, 180, 41, 41, /* 980 */ 157, 41, 159, 81, 181, 309, 226, 162, 312, 313, /* 990 */ 314, 315, 316, 317, 81, 319, 81, 311, 322, 81, /* 1000 */ 281, 81, 326, 327, 181, 182, 209, 197, 198, 199, /* 1010 */ 200, 201, 202, 203, 204, 205, 206, 241, 81, 81, /* 1020 */ 47, 81, 197, 198, 199, 200, 201, 202, 203, 204, /* 1030 */ 205, 206, 80, 336, 351, 351, 63, 339, 351, 211, /* 1040 */ 159, 307, 90, 20, 45, 269, 248, 306, 47, 255, /* 1050 */ 299, 155, 248, 277, 159, 40, 248, 289, 282, 140, /* 1060 */ 284, 287, 248, 20, 287, 243, 20, 93, 94, 95, /* 1070 */ 96, 97, 98, 99, 100, 101, 102, 103, 241, 105, /* 1080 */ 106, 107, 108, 109, 110, 309, 243, 253, 312, 313, /* 1090 */ 314, 315, 316, 317, 303, 319, 20, 253, 322, 284, /* 1100 */ 20, 296, 326, 327, 328, 253, 269, 298, 253, 277, /* 1110 */ 20, 290, 296, 337, 277, 253, 253, 248, 253, 282, /* 1120 */ 243, 284, 269, 269, 248, 269, 269, 243, 269, 269, /* 1130 */ 269, 251, 282, 269, 303, 269, 269, 269, 302, 251, /* 1140 */ 165, 241, 248, 251, 296, 20, 309, 277, 251, 312, /* 1150 */ 313, 314, 315, 316, 317, 241, 319, 248, 217, 322, /* 1160 */ 282, 290, 311, 326, 327, 328, 284, 347, 223, 269, /* 1170 */ 216, 282, 282, 347, 337, 282, 148, 277, 212, 344, /* 1180 */ 293, 343, 282, 269, 284, 208, 277, 341, 277, 20, /* 1190 */ 40, 277, 293, 353, 227, 225, 282, 297, 284, 230, /* 1200 */ 80, 310, 143, 358, 282, 307, 297, 282, 282, 309, /* 1210 */ 293, 297, 312, 313, 314, 315, 316, 317, 290, 319, /* 1220 */ 293, 291, 251, 309, 352, 316, 312, 313, 314, 315, /* 1230 */ 316, 317, 329, 319, 241, 325, 277, 265, 338, 251, /* 1240 */ 331, 332, 333, 80, 335, 241, 282, 338, 259, 273, /* 1250 */ 350, 248, 338, 352, 354, 277, 251, 353, 353, 350, /* 1260 */ 352, 243, 269, 354, 350, 19, 304, 0, 354, 263, /* 1270 */ 277, 263, 263, 269, 252, 282, 239, 284, 0, 33, /* 1280 */ 300, 277, 40, 0, 71, 0, 282, 47, 284, 175, /* 1290 */ 47, 45, 47, 175, 47, 0, 50, 51, 52, 53, /* 1300 */ 54, 47, 309, 47, 175, 312, 313, 314, 315, 316, /* 1310 */ 317, 241, 319, 309, 0, 175, 312, 313, 314, 315, /* 1320 */ 316, 317, 0, 319, 47, 79, 322, 241, 82, 0, /* 1330 */ 22, 327, 80, 47, 0, 162, 159, 161, 157, 269, /* 1340 */ 0, 0, 0, 153, 152, 0, 0, 277, 355, 356, /* 1350 */ 44, 0, 282, 0, 284, 269, 0, 0, 0, 0, /* 1360 */ 0, 115, 0, 277, 0, 295, 0, 0, 282, 0, /* 1370 */ 284, 0, 0, 0, 0, 0, 0, 40, 0, 309, /* 1380 */ 0, 0, 312, 313, 314, 315, 316, 317, 142, 319, /* 1390 */ 22, 145, 0, 241, 0, 309, 0, 0, 312, 313, /* 1400 */ 314, 315, 316, 317, 0, 319, 0, 0, 0, 0, /* 1410 */ 164, 41, 166, 0, 14, 14, 241, 40, 0, 37, /* 1420 */ 0, 269, 38, 44, 37, 0, 37, 44, 148, 277, /* 1430 */ 0, 0, 37, 0, 282, 349, 284, 0, 0, 0, /* 1440 */ 47, 0, 37, 58, 269, 47, 0, 45, 45, 37, /* 1450 */ 0, 37, 277, 0, 37, 45, 0, 282, 0, 284, /* 1460 */ 41, 309, 47, 47, 312, 313, 314, 315, 316, 317, /* 1470 */ 295, 319, 45, 241, 22, 89, 47, 0, 87, 47, /* 1480 */ 0, 47, 47, 47, 309, 41, 22, 312, 313, 314, /* 1490 */ 315, 316, 317, 0, 319, 47, 241, 22, 47, 0, /* 1500 */ 22, 269, 47, 0, 22, 48, 47, 0, 356, 277, /* 1510 */ 22, 20, 0, 47, 282, 0, 284, 163, 22, 0, /* 1520 */ 0, 0, 0, 80, 269, 41, 37, 41, 213, 44, /* 1530 */ 81, 41, 277, 41, 146, 81, 41, 282, 44, 284, /* 1540 */ 213, 309, 80, 80, 312, 313, 314, 315, 316, 317, /* 1550 */ 295, 319, 241, 321, 80, 44, 207, 81, 41, 80, /* 1560 */ 44, 241, 141, 213, 309, 143, 2, 312, 313, 314, /* 1570 */ 315, 316, 317, 241, 319, 41, 47, 47, 81, 81, /* 1580 */ 269, 81, 81, 47, 47, 47, 146, 47, 277, 269, /* 1590 */ 41, 146, 44, 282, 81, 284, 44, 277, 80, 22, /* 1600 */ 0, 269, 282, 80, 284, 181, 295, 81, 80, 277, /* 1610 */ 37, 183, 80, 80, 282, 80, 284, 144, 44, 80, /* 1620 */ 309, 90, 81, 312, 313, 314, 315, 316, 317, 309, /* 1630 */ 319, 241, 312, 313, 314, 315, 316, 317, 81, 319, /* 1640 */ 241, 309, 80, 141, 312, 313, 314, 315, 316, 317, /* 1650 */ 44, 319, 241, 81, 22, 80, 80, 91, 80, 269, /* 1660 */ 81, 47, 47, 80, 47, 81, 80, 277, 269, 81, /* 1670 */ 47, 80, 282, 81, 284, 47, 277, 80, 47, 81, /* 1680 */ 269, 282, 22, 284, 80, 104, 104, 92, 277, 104, /* 1690 */ 80, 104, 80, 282, 47, 284, 80, 41, 22, 309, /* 1700 */ 58, 241, 312, 313, 314, 315, 316, 317, 309, 319, /* 1710 */ 241, 312, 313, 314, 315, 316, 317, 47, 319, 57, /* 1720 */ 309, 63, 78, 312, 313, 314, 315, 316, 317, 269, /* 1730 */ 319, 41, 47, 47, 47, 47, 47, 277, 269, 22, /* 1740 */ 47, 47, 282, 63, 284, 47, 277, 47, 47, 0, /* 1750 */ 47, 282, 47, 284, 47, 47, 47, 45, 37, 0, /* 1760 */ 47, 45, 37, 0, 45, 47, 241, 37, 0, 309, /* 1770 */ 47, 45, 312, 313, 314, 315, 316, 317, 309, 319, /* 1780 */ 37, 312, 313, 314, 315, 316, 317, 241, 319, 0, /* 1790 */ 46, 0, 47, 46, 269, 0, 22, 21, 359, 22, /* 1800 */ 22, 21, 277, 20, 359, 359, 359, 282, 359, 284, /* 1810 */ 359, 359, 359, 359, 359, 269, 359, 359, 359, 359, /* 1820 */ 359, 359, 359, 277, 359, 359, 359, 359, 282, 359, /* 1830 */ 284, 359, 359, 359, 309, 359, 359, 312, 313, 314, /* 1840 */ 315, 316, 317, 241, 319, 359, 359, 359, 359, 359, /* 1850 */ 359, 359, 359, 359, 359, 309, 359, 359, 312, 313, /* 1860 */ 314, 315, 316, 317, 359, 319, 241, 359, 359, 359, /* 1870 */ 359, 269, 359, 359, 359, 359, 359, 359, 359, 277, /* 1880 */ 359, 359, 359, 359, 282, 359, 284, 359, 359, 359, /* 1890 */ 359, 359, 359, 359, 269, 359, 359, 359, 359, 359, /* 1900 */ 359, 359, 277, 359, 359, 359, 359, 282, 359, 284, /* 1910 */ 359, 309, 359, 359, 312, 313, 314, 315, 316, 317, /* 1920 */ 359, 319, 241, 359, 359, 359, 359, 359, 359, 359, /* 1930 */ 359, 359, 359, 359, 309, 359, 359, 312, 313, 314, /* 1940 */ 315, 316, 317, 241, 319, 359, 359, 359, 359, 359, /* 1950 */ 269, 359, 359, 359, 359, 359, 359, 359, 277, 359, /* 1960 */ 359, 359, 359, 282, 359, 284, 359, 359, 359, 359, /* 1970 */ 359, 269, 359, 359, 359, 359, 359, 359, 359, 277, /* 1980 */ 359, 359, 359, 359, 282, 359, 284, 359, 359, 359, /* 1990 */ 309, 359, 359, 312, 313, 314, 315, 316, 317, 359, /* 2000 */ 319, 359, 359, 359, 359, 359, 359, 359, 241, 359, /* 2010 */ 359, 309, 359, 359, 312, 313, 314, 315, 316, 317, /* 2020 */ 241, 319, 359, 359, 12, 13, 359, 359, 359, 241, /* 2030 */ 359, 359, 359, 359, 22, 359, 269, 359, 359, 359, /* 2040 */ 359, 359, 359, 359, 277, 359, 359, 359, 269, 282, /* 2050 */ 359, 284, 359, 359, 359, 359, 277, 269, 359, 47, /* 2060 */ 359, 282, 359, 284, 359, 277, 359, 359, 359, 359, /* 2070 */ 282, 359, 284, 359, 359, 63, 309, 359, 359, 312, /* 2080 */ 313, 314, 315, 316, 317, 359, 319, 359, 309, 359, /* 2090 */ 359, 312, 313, 314, 315, 316, 317, 309, 319, 359, /* 2100 */ 312, 313, 314, 315, 316, 317, 359, 319, 359, 359, /* 2110 */ 359, 359, 359, 359, 102, 359, 359, 359, 359, 359, /* 2120 */ 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, /* 2130 */ 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, /* 2140 */ 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, /* 2150 */ 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, /* 2160 */ 359, 359, 359, 359, 359, 359, 359, 359, 359, 157, /* 2170 */ 359, 159, 359, 359, 359, 359, 359, 359, 359, 359, /* 2180 */ 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, /* 2190 */ 359, 359, 359, 181, 359, 359, 359, 359, 359, 359, /* 2200 */ 359, 359, 359, 359, 192, 193, 194, 359, 359, 359, /* 2210 */ 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, /* 2220 */ 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, /* 2230 */ 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, /* 2240 */ 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, /* 2250 */ 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, /* 2260 */ 359, 359, 359, }; #define YY_SHIFT_COUNT (623) #define YY_SHIFT_MIN (0) #define YY_SHIFT_MAX (2012) static const unsigned short int yy_shift_ofst[] = { /* 0 */ 797, 0, 0, 48, 206, 206, 206, 206, 254, 254, /* 10 */ 206, 206, 412, 460, 618, 460, 460, 460, 460, 460, /* 20 */ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, /* 30 */ 460, 460, 460, 460, 460, 460, 460, 460, 3, 3, /* 40 */ 29, 29, 29, 2012, 2012, 2012, 2012, 94, 303, 16, /* 50 */ 1, 1, 24, 24, 280, 53, 16, 16, 1, 1, /* 60 */ 1, 1, 1, 1, 1, 71, 1, 1, 52, 122, /* 70 */ 253, 52, 1, 1, 52, 1, 52, 52, 52, 1, /* 80 */ 229, 657, 810, 825, 825, 230, 81, 823, 823, 823, /* 90 */ 823, 823, 823, 823, 823, 823, 823, 823, 823, 823, /* 100 */ 823, 823, 823, 823, 823, 823, 210, 53, 31, 31, /* 110 */ 666, 202, 20, 20, 20, 672, 202, 354, 253, 52, /* 120 */ 52, 349, 349, 313, 360, 456, 974, 974, 974, 974, /* 130 */ 974, 974, 974, 1246, 682, 556, 265, 200, 159, 374, /* 140 */ 292, 505, 653, 796, 752, 705, 621, 704, 621, 633, /* 150 */ 633, 633, 675, 305, 828, 1023, 999, 1001, 896, 1023, /* 160 */ 1023, 1015, 919, 919, 1023, 1043, 1043, 1046, 71, 253, /* 170 */ 71, 1076, 1080, 71, 1076, 71, 354, 1090, 71, 71, /* 180 */ 1023, 71, 1043, 52, 52, 52, 52, 52, 52, 52, /* 190 */ 52, 52, 52, 52, 1023, 1043, 349, 349, 1046, 229, /* 200 */ 975, 253, 229, 1023, 1076, 229, 354, 1090, 229, 1125, /* 210 */ 941, 954, 349, 941, 954, 349, 349, 52, 945, 1028, /* 220 */ 966, 828, 977, 354, 1169, 1150, 967, 970, 969, 967, /* 230 */ 970, 967, 970, 1120, 954, 349, 349, 954, 349, 1059, /* 240 */ 354, 1090, 229, 313, 229, 354, 1163, 349, 360, 1023, /* 250 */ 229, 1043, 2207, 2207, 2207, 2207, 2207, 2207, 2207, 678, /* 260 */ 237, 506, 264, 87, 294, 415, 201, 208, 339, 551, /* 270 */ 341, 455, 455, 455, 455, 455, 455, 455, 455, 75, /* 280 */ 129, 295, 523, 123, 473, 446, 446, 446, 446, 344, /* 290 */ 775, 649, 762, 781, 800, 847, 873, 874, 858, 807, /* 300 */ 812, 813, 879, 784, 760, 724, 842, 803, 849, 875, /* 310 */ 883, 885, 886, 902, 913, 881, 895, 915, 918, 920, /* 320 */ 937, 938, 940, 952, 973, 1267, 1278, 1242, 1283, 1213, /* 330 */ 1285, 1240, 1114, 1243, 1245, 1247, 1118, 1295, 1254, 1256, /* 340 */ 1129, 1314, 1140, 1322, 1277, 1329, 1308, 1340, 1286, 1334, /* 350 */ 1252, 1173, 1176, 1177, 1181, 1341, 1342, 1190, 1192, 1345, /* 360 */ 1346, 1306, 1351, 1353, 1356, 1357, 1358, 1359, 1360, 1362, /* 370 */ 1364, 1366, 1367, 1369, 1371, 1372, 1373, 1374, 1375, 1376, /* 380 */ 1337, 1378, 1380, 1381, 1392, 1394, 1396, 1368, 1397, 1404, /* 390 */ 1406, 1407, 1408, 1409, 1377, 1382, 1370, 1400, 1379, 1401, /* 400 */ 1383, 1413, 1384, 1387, 1418, 1420, 1425, 1389, 1280, 1430, /* 410 */ 1431, 1395, 1433, 1385, 1437, 1438, 1393, 1402, 1405, 1439, /* 420 */ 1398, 1403, 1412, 1441, 1415, 1410, 1414, 1446, 1416, 1427, /* 430 */ 1417, 1450, 1453, 1456, 1458, 1386, 1391, 1429, 1452, 1477, /* 440 */ 1432, 1434, 1435, 1436, 1419, 1444, 1448, 1451, 1455, 1480, /* 450 */ 1464, 1493, 1475, 1457, 1499, 1478, 1459, 1503, 1482, 1507, /* 460 */ 1488, 1491, 1512, 1388, 1466, 1515, 1354, 1496, 1440, 1422, /* 470 */ 1519, 1520, 1521, 1445, 1522, 1443, 1489, 1421, 1484, 1486, /* 480 */ 1315, 1449, 1490, 1454, 1462, 1463, 1474, 1476, 1492, 1485, /* 490 */ 1494, 1479, 1495, 1327, 1497, 1498, 1511, 1349, 1517, 1516, /* 500 */ 1500, 1534, 1350, 1501, 1529, 1530, 1536, 1537, 1538, 1540, /* 510 */ 1501, 1564, 1424, 1549, 1513, 1518, 1526, 1548, 1523, 1528, /* 520 */ 1552, 1577, 1428, 1532, 1541, 1557, 1533, 1535, 1473, 1539, /* 530 */ 1600, 1573, 1502, 1562, 1531, 1574, 1606, 1575, 1572, 1576, /* 540 */ 1632, 1578, 1566, 1579, 1614, 1615, 1583, 1584, 1617, 1586, /* 550 */ 1588, 1623, 1591, 1592, 1628, 1597, 1598, 1631, 1604, 1581, /* 560 */ 1582, 1585, 1587, 1660, 1595, 1610, 1612, 1647, 1616, 1656, /* 570 */ 1656, 1676, 1642, 1662, 1670, 1658, 1644, 1690, 1685, 1686, /* 580 */ 1687, 1688, 1689, 1717, 1693, 1694, 1680, 1419, 1698, 1444, /* 590 */ 1700, 1701, 1703, 1705, 1707, 1708, 1749, 1709, 1712, 1721, /* 600 */ 1759, 1713, 1716, 1725, 1763, 1718, 1719, 1730, 1768, 1723, /* 610 */ 1726, 1743, 1744, 1789, 1745, 1747, 1791, 1795, 1774, 1776, /* 620 */ 1777, 1778, 1780, 1783, }; #define YY_REDUCE_COUNT (258) #define YY_REDUCE_MIN (-315) #define YY_REDUCE_MAX (1788) static const short yy_reduce_ofst[] = { /* 0 */ -182, -183, 23, 233, -238, 594, 776, 837, 900, 914, /* 10 */ 447, 676, 620, 993, 1004, 1070, 1086, 1152, 1175, 1232, /* 20 */ 1255, 1311, 1320, 1332, 1390, 1399, 1411, 1460, 1469, 1525, /* 30 */ 1546, 1602, 1625, 1681, 1702, 1767, 1779, 1788, 189, 909, /* 40 */ -212, -155, -2, -267, -255, -271, 39, -295, -247, 203, /* 50 */ -243, -242, -214, -134, -203, 84, -192, -39, 216, 231, /* 60 */ 239, 310, 332, 335, 362, 315, 366, 409, 90, -177, /* 70 */ 217, 398, 414, 420, 219, 423, 454, 306, 581, 425, /* 80 */ -166, 93, -315, -315, -315, -67, -244, -144, -10, 135, /* 90 */ 169, 262, 272, 343, 417, 419, 422, 448, 476, 486, /* 100 */ 516, 537, 576, 580, 590, 593, -199, 174, -219, -85, /* 110 */ 358, 228, -6, 327, 384, 300, 242, 297, 78, -72, /* 120 */ 196, 488, 548, 356, 462, 522, -269, 256, 316, 394, /* 130 */ 527, 585, 628, 563, 484, 647, 561, 596, 644, 627, /* 140 */ 693, 693, 716, 721, 719, 686, 697, 697, 697, 683, /* 150 */ 684, 687, 698, 693, 734, 798, 741, 794, 751, 804, /* 160 */ 808, 768, 774, 777, 814, 822, 843, 791, 834, 815, /* 170 */ 844, 805, 809, 852, 816, 855, 832, 821, 862, 863, /* 180 */ 869, 865, 877, 853, 854, 856, 857, 859, 860, 861, /* 190 */ 864, 866, 867, 868, 876, 884, 850, 878, 831, 880, /* 200 */ 836, 882, 888, 894, 848, 892, 870, 871, 897, 851, /* 210 */ 820, 887, 889, 826, 899, 890, 893, 693, 835, 838, /* 220 */ 846, 898, 697, 911, 891, 903, 840, 872, 845, 904, /* 230 */ 901, 905, 908, 910, 917, 922, 925, 927, 926, 930, /* 240 */ 959, 928, 971, 972, 988, 978, 976, 964, 989, 1003, /* 250 */ 1005, 1018, 980, 962, 1006, 1008, 1009, 1022, 1037, }; static const YYACTIONTYPE yy_default[] = { /* 0 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 10 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 20 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 30 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 40 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 50 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 60 */ 1370, 1370, 1370, 1370, 1370, 1438, 1370, 1370, 1370, 1370, /* 70 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 80 */ 1436, 1584, 1370, 1748, 1370, 1370, 1370, 1370, 1370, 1370, /* 90 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 100 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 110 */ 1438, 1370, 1759, 1759, 1759, 1436, 1370, 1370, 1370, 1370, /* 120 */ 1370, 1370, 1370, 1532, 1370, 1370, 1370, 1370, 1370, 1370, /* 130 */ 1370, 1370, 1370, 1617, 1370, 1370, 1825, 1370, 1623, 1783, /* 140 */ 1370, 1370, 1370, 1370, 1485, 1775, 1751, 1765, 1752, 1810, /* 150 */ 1810, 1810, 1768, 1370, 1779, 1370, 1370, 1370, 1609, 1370, /* 160 */ 1370, 1589, 1586, 1586, 1370, 1370, 1370, 1370, 1438, 1370, /* 170 */ 1438, 1370, 1370, 1438, 1370, 1438, 1370, 1370, 1438, 1438, /* 180 */ 1370, 1438, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 190 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1436, /* 200 */ 1619, 1370, 1436, 1370, 1370, 1436, 1370, 1370, 1436, 1370, /* 210 */ 1790, 1788, 1370, 1790, 1788, 1370, 1370, 1370, 1802, 1798, /* 220 */ 1781, 1779, 1765, 1370, 1370, 1370, 1816, 1812, 1828, 1816, /* 230 */ 1812, 1816, 1812, 1370, 1788, 1370, 1370, 1788, 1370, 1594, /* 240 */ 1370, 1370, 1436, 1370, 1436, 1370, 1501, 1370, 1370, 1370, /* 250 */ 1436, 1370, 1611, 1625, 1535, 1535, 1535, 1439, 1375, 1370, /* 260 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 270 */ 1497, 1692, 1801, 1800, 1724, 1723, 1722, 1720, 1691, 1370, /* 280 */ 1370, 1370, 1370, 1370, 1370, 1685, 1686, 1684, 1683, 1370, /* 290 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 300 */ 1370, 1370, 1749, 1370, 1813, 1817, 1370, 1370, 1370, 1668, /* 310 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 320 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 330 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 340 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 350 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 360 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 370 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 380 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 390 */ 1370, 1370, 1370, 1370, 1370, 1370, 1404, 1370, 1370, 1370, /* 400 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 410 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 420 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 430 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 440 */ 1370, 1370, 1370, 1370, 1466, 1465, 1370, 1370, 1370, 1370, /* 450 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 460 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 470 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1772, 1782, /* 480 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 490 */ 1668, 1370, 1799, 1370, 1758, 1754, 1370, 1370, 1750, 1370, /* 500 */ 1370, 1811, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 510 */ 1370, 1744, 1370, 1717, 1370, 1370, 1370, 1370, 1370, 1370, /* 520 */ 1370, 1370, 1679, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 530 */ 1370, 1370, 1370, 1370, 1370, 1667, 1370, 1708, 1370, 1370, /* 540 */ 1370, 1370, 1370, 1370, 1370, 1370, 1529, 1370, 1370, 1370, /* 550 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1514, /* 560 */ 1512, 1511, 1510, 1370, 1507, 1370, 1370, 1370, 1370, 1538, /* 570 */ 1537, 1370, 1370, 1370, 1370, 1370, 1370, 1458, 1370, 1370, /* 580 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1449, 1370, 1448, /* 590 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 600 */ 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 610 */ 1370, 1370, 1419, 1370, 1370, 1370, 1370, 1370, 1370, 1370, /* 620 */ 1370, 1370, 1370, 1370, }; /********** 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[] = { 0, /* $ => nothing */ 0, /* OR => nothing */ 0, /* AND => nothing */ 0, /* UNION => nothing */ 0, /* ALL => nothing */ 0, /* MINUS => nothing */ 0, /* EXCEPT => nothing */ 0, /* INTERSECT => nothing */ 0, /* NK_BITAND => nothing */ 0, /* NK_BITOR => nothing */ 0, /* NK_LSHIFT => nothing */ 0, /* NK_RSHIFT => nothing */ 0, /* NK_PLUS => nothing */ 0, /* NK_MINUS => nothing */ 0, /* NK_STAR => nothing */ 0, /* NK_SLASH => nothing */ 0, /* NK_REM => nothing */ 0, /* NK_CONCAT => nothing */ 0, /* CREATE => nothing */ 0, /* ACCOUNT => nothing */ 0, /* NK_ID => nothing */ 0, /* PASS => nothing */ 0, /* NK_STRING => nothing */ 0, /* ALTER => nothing */ 0, /* PPS => nothing */ 0, /* TSERIES => nothing */ 0, /* STORAGE => nothing */ 0, /* STREAMS => nothing */ 0, /* QTIME => nothing */ 0, /* DBS => nothing */ 0, /* USERS => nothing */ 0, /* CONNS => nothing */ 0, /* STATE => nothing */ 0, /* USER => nothing */ 0, /* PRIVILEGE => nothing */ 0, /* DROP => nothing */ 0, /* GRANT => nothing */ 0, /* ON => nothing */ 0, /* TO => nothing */ 0, /* REVOKE => nothing */ 0, /* FROM => nothing */ 0, /* NK_COMMA => nothing */ 0, /* READ => nothing */ 0, /* WRITE => nothing */ 0, /* NK_DOT => nothing */ 0, /* DNODE => nothing */ 0, /* PORT => nothing */ 0, /* NK_INTEGER => nothing */ 0, /* DNODES => nothing */ 0, /* LOCAL => nothing */ 0, /* QNODE => nothing */ 0, /* BNODE => nothing */ 0, /* SNODE => nothing */ 0, /* MNODE => nothing */ 0, /* DATABASE => nothing */ 0, /* USE => nothing */ 0, /* IF => nothing */ 0, /* NOT => nothing */ 0, /* EXISTS => nothing */ 0, /* BUFFER => nothing */ 0, /* CACHELAST => nothing */ 0, /* COMP => nothing */ 0, /* DURATION => nothing */ 0, /* NK_VARIABLE => nothing */ 0, /* FSYNC => nothing */ 0, /* MAXROWS => nothing */ 0, /* MINROWS => nothing */ 0, /* KEEP => nothing */ 0, /* PAGES => nothing */ 0, /* PAGESIZE => nothing */ 0, /* PRECISION => nothing */ 0, /* REPLICA => nothing */ 0, /* STRICT => nothing */ 0, /* WAL => nothing */ 0, /* VGROUPS => nothing */ 0, /* SINGLE_STABLE => nothing */ 0, /* RETENTIONS => nothing */ 0, /* SCHEMALESS => nothing */ 0, /* NK_COLON => nothing */ 0, /* TABLE => nothing */ 0, /* NK_LP => nothing */ 0, /* NK_RP => nothing */ 0, /* STABLE => nothing */ 0, /* ADD => nothing */ 0, /* COLUMN => nothing */ 0, /* MODIFY => nothing */ 0, /* RENAME => nothing */ 0, /* TAG => nothing */ 0, /* SET => nothing */ 0, /* NK_EQ => nothing */ 0, /* USING => nothing */ 0, /* TAGS => nothing */ 0, /* COMMENT => nothing */ 0, /* BOOL => nothing */ 0, /* TINYINT => nothing */ 0, /* SMALLINT => nothing */ 0, /* INT => nothing */ 0, /* INTEGER => nothing */ 0, /* BIGINT => nothing */ 0, /* FLOAT => nothing */ 0, /* DOUBLE => nothing */ 0, /* BINARY => nothing */ 0, /* TIMESTAMP => nothing */ 0, /* NCHAR => nothing */ 0, /* UNSIGNED => nothing */ 0, /* JSON => nothing */ 0, /* VARCHAR => nothing */ 0, /* MEDIUMBLOB => nothing */ 0, /* BLOB => nothing */ 0, /* VARBINARY => nothing */ 0, /* DECIMAL => nothing */ 0, /* MAX_DELAY => nothing */ 0, /* WATERMARK => nothing */ 0, /* ROLLUP => nothing */ 0, /* TTL => nothing */ 0, /* SMA => nothing */ 0, /* FIRST => nothing */ 0, /* LAST => nothing */ 0, /* SHOW => nothing */ 0, /* DATABASES => nothing */ 0, /* TABLES => nothing */ 0, /* STABLES => nothing */ 0, /* MNODES => nothing */ 0, /* MODULES => nothing */ 0, /* QNODES => nothing */ 0, /* FUNCTIONS => nothing */ 0, /* INDEXES => nothing */ 0, /* ACCOUNTS => nothing */ 0, /* APPS => nothing */ 0, /* CONNECTIONS => nothing */ 0, /* LICENCE => nothing */ 0, /* GRANTS => nothing */ 0, /* QUERIES => nothing */ 0, /* SCORES => nothing */ 0, /* TOPICS => nothing */ 0, /* VARIABLES => nothing */ 0, /* BNODES => nothing */ 0, /* SNODES => nothing */ 0, /* CLUSTER => nothing */ 0, /* TRANSACTIONS => nothing */ 0, /* LIKE => nothing */ 0, /* INDEX => nothing */ 0, /* FULLTEXT => nothing */ 0, /* FUNCTION => nothing */ 0, /* INTERVAL => nothing */ 0, /* TOPIC => nothing */ 0, /* AS => nothing */ 0, /* CONSUMER => nothing */ 0, /* GROUP => nothing */ 0, /* DESC => nothing */ 0, /* DESCRIBE => nothing */ 0, /* RESET => nothing */ 0, /* QUERY => nothing */ 0, /* CACHE => nothing */ 0, /* EXPLAIN => nothing */ 0, /* ANALYZE => nothing */ 0, /* VERBOSE => nothing */ 0, /* NK_BOOL => nothing */ 0, /* RATIO => nothing */ 0, /* NK_FLOAT => nothing */ 0, /* COMPACT => nothing */ 0, /* VNODES => nothing */ 0, /* IN => nothing */ 0, /* OUTPUTTYPE => nothing */ 0, /* AGGREGATE => nothing */ 0, /* BUFSIZE => nothing */ 0, /* STREAM => nothing */ 0, /* INTO => nothing */ 0, /* TRIGGER => nothing */ 0, /* AT_ONCE => nothing */ 0, /* WINDOW_CLOSE => nothing */ 0, /* KILL => nothing */ 0, /* CONNECTION => nothing */ 0, /* TRANSACTION => nothing */ 0, /* BALANCE => nothing */ 0, /* VGROUP => nothing */ 0, /* MERGE => nothing */ 0, /* REDISTRIBUTE => nothing */ 0, /* SPLIT => nothing */ 0, /* SYNCDB => nothing */ 0, /* DELETE => nothing */ 0, /* NULL => nothing */ 0, /* NK_QUESTION => nothing */ 0, /* NK_ARROW => nothing */ 0, /* ROWTS => nothing */ 0, /* TBNAME => nothing */ 0, /* QSTARTTS => nothing */ 0, /* QENDTS => nothing */ 0, /* WSTARTTS => nothing */ 0, /* WENDTS => nothing */ 0, /* WDURATION => nothing */ 0, /* CAST => nothing */ 0, /* NOW => nothing */ 0, /* TODAY => nothing */ 0, /* TIMEZONE => nothing */ 0, /* COUNT => nothing */ 0, /* LAST_ROW => nothing */ 0, /* BETWEEN => nothing */ 0, /* IS => nothing */ 0, /* NK_LT => nothing */ 0, /* NK_GT => nothing */ 0, /* NK_LE => nothing */ 0, /* NK_GE => nothing */ 0, /* NK_NE => nothing */ 0, /* MATCH => nothing */ 0, /* NMATCH => nothing */ 0, /* CONTAINS => nothing */ 0, /* JOIN => nothing */ 0, /* INNER => nothing */ 0, /* SELECT => nothing */ 0, /* DISTINCT => nothing */ 0, /* WHERE => nothing */ 0, /* PARTITION => nothing */ 0, /* BY => nothing */ 0, /* SESSION => nothing */ 0, /* STATE_WINDOW => nothing */ 0, /* SLIDING => nothing */ 0, /* FILL => nothing */ 0, /* VALUE => nothing */ 0, /* NONE => nothing */ 0, /* PREV => nothing */ 0, /* LINEAR => nothing */ 0, /* NEXT => nothing */ 0, /* HAVING => nothing */ 0, /* ORDER => nothing */ 0, /* SLIMIT => nothing */ 0, /* SOFFSET => nothing */ 0, /* LIMIT => nothing */ 0, /* OFFSET => nothing */ 0, /* ASC => nothing */ 0, /* NULLS => nothing */ 0, /* ID => nothing */ 231, /* NK_BITNOT => ID */ 231, /* INSERT => ID */ 231, /* VALUES => ID */ 231, /* IMPORT => ID */ 231, /* NK_SEMI => ID */ 231, /* FILE => ID */ }; #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 */ "GRANT", /* 37 */ "ON", /* 38 */ "TO", /* 39 */ "REVOKE", /* 40 */ "FROM", /* 41 */ "NK_COMMA", /* 42 */ "READ", /* 43 */ "WRITE", /* 44 */ "NK_DOT", /* 45 */ "DNODE", /* 46 */ "PORT", /* 47 */ "NK_INTEGER", /* 48 */ "DNODES", /* 49 */ "LOCAL", /* 50 */ "QNODE", /* 51 */ "BNODE", /* 52 */ "SNODE", /* 53 */ "MNODE", /* 54 */ "DATABASE", /* 55 */ "USE", /* 56 */ "IF", /* 57 */ "NOT", /* 58 */ "EXISTS", /* 59 */ "BUFFER", /* 60 */ "CACHELAST", /* 61 */ "COMP", /* 62 */ "DURATION", /* 63 */ "NK_VARIABLE", /* 64 */ "FSYNC", /* 65 */ "MAXROWS", /* 66 */ "MINROWS", /* 67 */ "KEEP", /* 68 */ "PAGES", /* 69 */ "PAGESIZE", /* 70 */ "PRECISION", /* 71 */ "REPLICA", /* 72 */ "STRICT", /* 73 */ "WAL", /* 74 */ "VGROUPS", /* 75 */ "SINGLE_STABLE", /* 76 */ "RETENTIONS", /* 77 */ "SCHEMALESS", /* 78 */ "NK_COLON", /* 79 */ "TABLE", /* 80 */ "NK_LP", /* 81 */ "NK_RP", /* 82 */ "STABLE", /* 83 */ "ADD", /* 84 */ "COLUMN", /* 85 */ "MODIFY", /* 86 */ "RENAME", /* 87 */ "TAG", /* 88 */ "SET", /* 89 */ "NK_EQ", /* 90 */ "USING", /* 91 */ "TAGS", /* 92 */ "COMMENT", /* 93 */ "BOOL", /* 94 */ "TINYINT", /* 95 */ "SMALLINT", /* 96 */ "INT", /* 97 */ "INTEGER", /* 98 */ "BIGINT", /* 99 */ "FLOAT", /* 100 */ "DOUBLE", /* 101 */ "BINARY", /* 102 */ "TIMESTAMP", /* 103 */ "NCHAR", /* 104 */ "UNSIGNED", /* 105 */ "JSON", /* 106 */ "VARCHAR", /* 107 */ "MEDIUMBLOB", /* 108 */ "BLOB", /* 109 */ "VARBINARY", /* 110 */ "DECIMAL", /* 111 */ "MAX_DELAY", /* 112 */ "WATERMARK", /* 113 */ "ROLLUP", /* 114 */ "TTL", /* 115 */ "SMA", /* 116 */ "FIRST", /* 117 */ "LAST", /* 118 */ "SHOW", /* 119 */ "DATABASES", /* 120 */ "TABLES", /* 121 */ "STABLES", /* 122 */ "MNODES", /* 123 */ "MODULES", /* 124 */ "QNODES", /* 125 */ "FUNCTIONS", /* 126 */ "INDEXES", /* 127 */ "ACCOUNTS", /* 128 */ "APPS", /* 129 */ "CONNECTIONS", /* 130 */ "LICENCE", /* 131 */ "GRANTS", /* 132 */ "QUERIES", /* 133 */ "SCORES", /* 134 */ "TOPICS", /* 135 */ "VARIABLES", /* 136 */ "BNODES", /* 137 */ "SNODES", /* 138 */ "CLUSTER", /* 139 */ "TRANSACTIONS", /* 140 */ "LIKE", /* 141 */ "INDEX", /* 142 */ "FULLTEXT", /* 143 */ "FUNCTION", /* 144 */ "INTERVAL", /* 145 */ "TOPIC", /* 146 */ "AS", /* 147 */ "CONSUMER", /* 148 */ "GROUP", /* 149 */ "DESC", /* 150 */ "DESCRIBE", /* 151 */ "RESET", /* 152 */ "QUERY", /* 153 */ "CACHE", /* 154 */ "EXPLAIN", /* 155 */ "ANALYZE", /* 156 */ "VERBOSE", /* 157 */ "NK_BOOL", /* 158 */ "RATIO", /* 159 */ "NK_FLOAT", /* 160 */ "COMPACT", /* 161 */ "VNODES", /* 162 */ "IN", /* 163 */ "OUTPUTTYPE", /* 164 */ "AGGREGATE", /* 165 */ "BUFSIZE", /* 166 */ "STREAM", /* 167 */ "INTO", /* 168 */ "TRIGGER", /* 169 */ "AT_ONCE", /* 170 */ "WINDOW_CLOSE", /* 171 */ "KILL", /* 172 */ "CONNECTION", /* 173 */ "TRANSACTION", /* 174 */ "BALANCE", /* 175 */ "VGROUP", /* 176 */ "MERGE", /* 177 */ "REDISTRIBUTE", /* 178 */ "SPLIT", /* 179 */ "SYNCDB", /* 180 */ "DELETE", /* 181 */ "NULL", /* 182 */ "NK_QUESTION", /* 183 */ "NK_ARROW", /* 184 */ "ROWTS", /* 185 */ "TBNAME", /* 186 */ "QSTARTTS", /* 187 */ "QENDTS", /* 188 */ "WSTARTTS", /* 189 */ "WENDTS", /* 190 */ "WDURATION", /* 191 */ "CAST", /* 192 */ "NOW", /* 193 */ "TODAY", /* 194 */ "TIMEZONE", /* 195 */ "COUNT", /* 196 */ "LAST_ROW", /* 197 */ "BETWEEN", /* 198 */ "IS", /* 199 */ "NK_LT", /* 200 */ "NK_GT", /* 201 */ "NK_LE", /* 202 */ "NK_GE", /* 203 */ "NK_NE", /* 204 */ "MATCH", /* 205 */ "NMATCH", /* 206 */ "CONTAINS", /* 207 */ "JOIN", /* 208 */ "INNER", /* 209 */ "SELECT", /* 210 */ "DISTINCT", /* 211 */ "WHERE", /* 212 */ "PARTITION", /* 213 */ "BY", /* 214 */ "SESSION", /* 215 */ "STATE_WINDOW", /* 216 */ "SLIDING", /* 217 */ "FILL", /* 218 */ "VALUE", /* 219 */ "NONE", /* 220 */ "PREV", /* 221 */ "LINEAR", /* 222 */ "NEXT", /* 223 */ "HAVING", /* 224 */ "ORDER", /* 225 */ "SLIMIT", /* 226 */ "SOFFSET", /* 227 */ "LIMIT", /* 228 */ "OFFSET", /* 229 */ "ASC", /* 230 */ "NULLS", /* 231 */ "ID", /* 232 */ "NK_BITNOT", /* 233 */ "INSERT", /* 234 */ "VALUES", /* 235 */ "IMPORT", /* 236 */ "NK_SEMI", /* 237 */ "FILE", /* 238 */ "cmd", /* 239 */ "account_options", /* 240 */ "alter_account_options", /* 241 */ "literal", /* 242 */ "alter_account_option", /* 243 */ "user_name", /* 244 */ "privileges", /* 245 */ "priv_level", /* 246 */ "priv_type_list", /* 247 */ "priv_type", /* 248 */ "db_name", /* 249 */ "dnode_endpoint", /* 250 */ "dnode_host_name", /* 251 */ "not_exists_opt", /* 252 */ "db_options", /* 253 */ "exists_opt", /* 254 */ "alter_db_options", /* 255 */ "integer_list", /* 256 */ "variable_list", /* 257 */ "retention_list", /* 258 */ "alter_db_option", /* 259 */ "retention", /* 260 */ "full_table_name", /* 261 */ "column_def_list", /* 262 */ "tags_def_opt", /* 263 */ "table_options", /* 264 */ "multi_create_clause", /* 265 */ "tags_def", /* 266 */ "multi_drop_clause", /* 267 */ "alter_table_clause", /* 268 */ "alter_table_options", /* 269 */ "column_name", /* 270 */ "type_name", /* 271 */ "signed_literal", /* 272 */ "create_subtable_clause", /* 273 */ "specific_tags_opt", /* 274 */ "literal_list", /* 275 */ "drop_table_clause", /* 276 */ "col_name_list", /* 277 */ "table_name", /* 278 */ "column_def", /* 279 */ "duration_list", /* 280 */ "rollup_func_list", /* 281 */ "alter_table_option", /* 282 */ "duration_literal", /* 283 */ "rollup_func_name", /* 284 */ "function_name", /* 285 */ "col_name", /* 286 */ "db_name_cond_opt", /* 287 */ "like_pattern_opt", /* 288 */ "table_name_cond", /* 289 */ "from_db_opt", /* 290 */ "index_name", /* 291 */ "index_options", /* 292 */ "func_list", /* 293 */ "sliding_opt", /* 294 */ "func", /* 295 */ "expression_list", /* 296 */ "topic_name", /* 297 */ "query_expression", /* 298 */ "cgroup_name", /* 299 */ "analyze_opt", /* 300 */ "explain_options", /* 301 */ "agg_func_opt", /* 302 */ "bufsize_opt", /* 303 */ "stream_name", /* 304 */ "stream_options", /* 305 */ "into_opt", /* 306 */ "dnode_list", /* 307 */ "where_clause_opt", /* 308 */ "signed", /* 309 */ "literal_func", /* 310 */ "table_alias", /* 311 */ "column_alias", /* 312 */ "expression", /* 313 */ "pseudo_column", /* 314 */ "column_reference", /* 315 */ "function_expression", /* 316 */ "subquery", /* 317 */ "star_func", /* 318 */ "star_func_para_list", /* 319 */ "noarg_func", /* 320 */ "other_para_list", /* 321 */ "star_func_para", /* 322 */ "predicate", /* 323 */ "compare_op", /* 324 */ "in_op", /* 325 */ "in_predicate_value", /* 326 */ "boolean_value_expression", /* 327 */ "boolean_primary", /* 328 */ "common_expression", /* 329 */ "from_clause", /* 330 */ "table_reference_list", /* 331 */ "table_reference", /* 332 */ "table_primary", /* 333 */ "joined_table", /* 334 */ "alias_opt", /* 335 */ "parenthesized_joined_table", /* 336 */ "join_type", /* 337 */ "search_condition", /* 338 */ "query_specification", /* 339 */ "set_quantifier_opt", /* 340 */ "select_list", /* 341 */ "partition_by_clause_opt", /* 342 */ "twindow_clause_opt", /* 343 */ "group_by_clause_opt", /* 344 */ "having_clause_opt", /* 345 */ "select_sublist", /* 346 */ "select_item", /* 347 */ "fill_opt", /* 348 */ "fill_mode", /* 349 */ "group_by_list", /* 350 */ "query_expression_body", /* 351 */ "order_by_clause_opt", /* 352 */ "slimit_clause_opt", /* 353 */ "limit_clause_opt", /* 354 */ "query_primary", /* 355 */ "sort_specification_list", /* 356 */ "sort_specification", /* 357 */ "ordering_specification_opt", /* 358 */ "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 ::= GRANT privileges ON priv_level TO user_name", /* 29 */ "cmd ::= REVOKE privileges ON priv_level FROM user_name", /* 30 */ "privileges ::= ALL", /* 31 */ "privileges ::= priv_type_list", /* 32 */ "priv_type_list ::= priv_type", /* 33 */ "priv_type_list ::= priv_type_list NK_COMMA priv_type", /* 34 */ "priv_type ::= READ", /* 35 */ "priv_type ::= WRITE", /* 36 */ "priv_level ::= NK_STAR NK_DOT NK_STAR", /* 37 */ "priv_level ::= db_name NK_DOT NK_STAR", /* 38 */ "cmd ::= CREATE DNODE dnode_endpoint", /* 39 */ "cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER", /* 40 */ "cmd ::= DROP DNODE NK_INTEGER", /* 41 */ "cmd ::= DROP DNODE dnode_endpoint", /* 42 */ "cmd ::= ALTER DNODE NK_INTEGER NK_STRING", /* 43 */ "cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING", /* 44 */ "cmd ::= ALTER ALL DNODES NK_STRING", /* 45 */ "cmd ::= ALTER ALL DNODES NK_STRING NK_STRING", /* 46 */ "dnode_endpoint ::= NK_STRING", /* 47 */ "dnode_host_name ::= NK_STRING", /* 48 */ "cmd ::= ALTER LOCAL NK_STRING", /* 49 */ "cmd ::= ALTER LOCAL NK_STRING NK_STRING", /* 50 */ "cmd ::= CREATE QNODE ON DNODE NK_INTEGER", /* 51 */ "cmd ::= DROP QNODE ON DNODE NK_INTEGER", /* 52 */ "cmd ::= CREATE BNODE ON DNODE NK_INTEGER", /* 53 */ "cmd ::= DROP BNODE ON DNODE NK_INTEGER", /* 54 */ "cmd ::= CREATE SNODE ON DNODE NK_INTEGER", /* 55 */ "cmd ::= DROP SNODE ON DNODE NK_INTEGER", /* 56 */ "cmd ::= CREATE MNODE ON DNODE NK_INTEGER", /* 57 */ "cmd ::= DROP MNODE ON DNODE NK_INTEGER", /* 58 */ "cmd ::= CREATE DATABASE not_exists_opt db_name db_options", /* 59 */ "cmd ::= DROP DATABASE exists_opt db_name", /* 60 */ "cmd ::= USE db_name", /* 61 */ "cmd ::= ALTER DATABASE db_name alter_db_options", /* 62 */ "not_exists_opt ::= IF NOT EXISTS", /* 63 */ "not_exists_opt ::=", /* 64 */ "exists_opt ::= IF EXISTS", /* 65 */ "exists_opt ::=", /* 66 */ "db_options ::=", /* 67 */ "db_options ::= db_options BUFFER NK_INTEGER", /* 68 */ "db_options ::= db_options CACHELAST NK_INTEGER", /* 69 */ "db_options ::= db_options COMP NK_INTEGER", /* 70 */ "db_options ::= db_options DURATION NK_INTEGER", /* 71 */ "db_options ::= db_options DURATION NK_VARIABLE", /* 72 */ "db_options ::= db_options FSYNC NK_INTEGER", /* 73 */ "db_options ::= db_options MAXROWS NK_INTEGER", /* 74 */ "db_options ::= db_options MINROWS NK_INTEGER", /* 75 */ "db_options ::= db_options KEEP integer_list", /* 76 */ "db_options ::= db_options KEEP variable_list", /* 77 */ "db_options ::= db_options PAGES NK_INTEGER", /* 78 */ "db_options ::= db_options PAGESIZE NK_INTEGER", /* 79 */ "db_options ::= db_options PRECISION NK_STRING", /* 80 */ "db_options ::= db_options REPLICA NK_INTEGER", /* 81 */ "db_options ::= db_options STRICT NK_INTEGER", /* 82 */ "db_options ::= db_options WAL NK_INTEGER", /* 83 */ "db_options ::= db_options VGROUPS NK_INTEGER", /* 84 */ "db_options ::= db_options SINGLE_STABLE NK_INTEGER", /* 85 */ "db_options ::= db_options RETENTIONS retention_list", /* 86 */ "db_options ::= db_options SCHEMALESS NK_INTEGER", /* 87 */ "alter_db_options ::= alter_db_option", /* 88 */ "alter_db_options ::= alter_db_options alter_db_option", /* 89 */ "alter_db_option ::= BUFFER NK_INTEGER", /* 90 */ "alter_db_option ::= CACHELAST NK_INTEGER", /* 91 */ "alter_db_option ::= FSYNC NK_INTEGER", /* 92 */ "alter_db_option ::= KEEP integer_list", /* 93 */ "alter_db_option ::= KEEP variable_list", /* 94 */ "alter_db_option ::= PAGES NK_INTEGER", /* 95 */ "alter_db_option ::= REPLICA NK_INTEGER", /* 96 */ "alter_db_option ::= STRICT NK_INTEGER", /* 97 */ "alter_db_option ::= WAL NK_INTEGER", /* 98 */ "integer_list ::= NK_INTEGER", /* 99 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER", /* 100 */ "variable_list ::= NK_VARIABLE", /* 101 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE", /* 102 */ "retention_list ::= retention", /* 103 */ "retention_list ::= retention_list NK_COMMA retention", /* 104 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE", /* 105 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options", /* 106 */ "cmd ::= CREATE TABLE multi_create_clause", /* 107 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options", /* 108 */ "cmd ::= DROP TABLE multi_drop_clause", /* 109 */ "cmd ::= DROP STABLE exists_opt full_table_name", /* 110 */ "cmd ::= ALTER TABLE alter_table_clause", /* 111 */ "cmd ::= ALTER STABLE alter_table_clause", /* 112 */ "alter_table_clause ::= full_table_name alter_table_options", /* 113 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name", /* 114 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name", /* 115 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name", /* 116 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name", /* 117 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name", /* 118 */ "alter_table_clause ::= full_table_name DROP TAG column_name", /* 119 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name", /* 120 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name", /* 121 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal", /* 122 */ "multi_create_clause ::= create_subtable_clause", /* 123 */ "multi_create_clause ::= multi_create_clause create_subtable_clause", /* 124 */ "create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP table_options", /* 125 */ "multi_drop_clause ::= drop_table_clause", /* 126 */ "multi_drop_clause ::= multi_drop_clause drop_table_clause", /* 127 */ "drop_table_clause ::= exists_opt full_table_name", /* 128 */ "specific_tags_opt ::=", /* 129 */ "specific_tags_opt ::= NK_LP col_name_list NK_RP", /* 130 */ "full_table_name ::= table_name", /* 131 */ "full_table_name ::= db_name NK_DOT table_name", /* 132 */ "column_def_list ::= column_def", /* 133 */ "column_def_list ::= column_def_list NK_COMMA column_def", /* 134 */ "column_def ::= column_name type_name", /* 135 */ "column_def ::= column_name type_name COMMENT NK_STRING", /* 136 */ "type_name ::= BOOL", /* 137 */ "type_name ::= TINYINT", /* 138 */ "type_name ::= SMALLINT", /* 139 */ "type_name ::= INT", /* 140 */ "type_name ::= INTEGER", /* 141 */ "type_name ::= BIGINT", /* 142 */ "type_name ::= FLOAT", /* 143 */ "type_name ::= DOUBLE", /* 144 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP", /* 145 */ "type_name ::= TIMESTAMP", /* 146 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP", /* 147 */ "type_name ::= TINYINT UNSIGNED", /* 148 */ "type_name ::= SMALLINT UNSIGNED", /* 149 */ "type_name ::= INT UNSIGNED", /* 150 */ "type_name ::= BIGINT UNSIGNED", /* 151 */ "type_name ::= JSON", /* 152 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP", /* 153 */ "type_name ::= MEDIUMBLOB", /* 154 */ "type_name ::= BLOB", /* 155 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP", /* 156 */ "type_name ::= DECIMAL", /* 157 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP", /* 158 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP", /* 159 */ "tags_def_opt ::=", /* 160 */ "tags_def_opt ::= tags_def", /* 161 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP", /* 162 */ "table_options ::=", /* 163 */ "table_options ::= table_options COMMENT NK_STRING", /* 164 */ "table_options ::= table_options MAX_DELAY duration_list", /* 165 */ "table_options ::= table_options WATERMARK duration_list", /* 166 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP", /* 167 */ "table_options ::= table_options TTL NK_INTEGER", /* 168 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP", /* 169 */ "alter_table_options ::= alter_table_option", /* 170 */ "alter_table_options ::= alter_table_options alter_table_option", /* 171 */ "alter_table_option ::= COMMENT NK_STRING", /* 172 */ "alter_table_option ::= TTL NK_INTEGER", /* 173 */ "duration_list ::= duration_literal", /* 174 */ "duration_list ::= duration_list NK_COMMA duration_literal", /* 175 */ "rollup_func_list ::= rollup_func_name", /* 176 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name", /* 177 */ "rollup_func_name ::= function_name", /* 178 */ "rollup_func_name ::= FIRST", /* 179 */ "rollup_func_name ::= LAST", /* 180 */ "col_name_list ::= col_name", /* 181 */ "col_name_list ::= col_name_list NK_COMMA col_name", /* 182 */ "col_name ::= column_name", /* 183 */ "cmd ::= SHOW DNODES", /* 184 */ "cmd ::= SHOW USERS", /* 185 */ "cmd ::= SHOW DATABASES", /* 186 */ "cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt", /* 187 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt", /* 188 */ "cmd ::= SHOW db_name_cond_opt VGROUPS", /* 189 */ "cmd ::= SHOW MNODES", /* 190 */ "cmd ::= SHOW MODULES", /* 191 */ "cmd ::= SHOW QNODES", /* 192 */ "cmd ::= SHOW FUNCTIONS", /* 193 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt", /* 194 */ "cmd ::= SHOW STREAMS", /* 195 */ "cmd ::= SHOW ACCOUNTS", /* 196 */ "cmd ::= SHOW APPS", /* 197 */ "cmd ::= SHOW CONNECTIONS", /* 198 */ "cmd ::= SHOW LICENCE", /* 199 */ "cmd ::= SHOW GRANTS", /* 200 */ "cmd ::= SHOW CREATE DATABASE db_name", /* 201 */ "cmd ::= SHOW CREATE TABLE full_table_name", /* 202 */ "cmd ::= SHOW CREATE STABLE full_table_name", /* 203 */ "cmd ::= SHOW QUERIES", /* 204 */ "cmd ::= SHOW SCORES", /* 205 */ "cmd ::= SHOW TOPICS", /* 206 */ "cmd ::= SHOW VARIABLES", /* 207 */ "cmd ::= SHOW BNODES", /* 208 */ "cmd ::= SHOW SNODES", /* 209 */ "cmd ::= SHOW CLUSTER", /* 210 */ "cmd ::= SHOW TRANSACTIONS", /* 211 */ "db_name_cond_opt ::=", /* 212 */ "db_name_cond_opt ::= db_name NK_DOT", /* 213 */ "like_pattern_opt ::=", /* 214 */ "like_pattern_opt ::= LIKE NK_STRING", /* 215 */ "table_name_cond ::= table_name", /* 216 */ "from_db_opt ::=", /* 217 */ "from_db_opt ::= FROM db_name", /* 218 */ "cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options", /* 219 */ "cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP", /* 220 */ "cmd ::= DROP INDEX exists_opt index_name ON table_name", /* 221 */ "index_options ::=", /* 222 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt", /* 223 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt", /* 224 */ "func_list ::= func", /* 225 */ "func_list ::= func_list NK_COMMA func", /* 226 */ "func ::= function_name NK_LP expression_list NK_RP", /* 227 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression", /* 228 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name", /* 229 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name", /* 230 */ "cmd ::= DROP TOPIC exists_opt topic_name", /* 231 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name", /* 232 */ "cmd ::= DESC full_table_name", /* 233 */ "cmd ::= DESCRIBE full_table_name", /* 234 */ "cmd ::= RESET QUERY CACHE", /* 235 */ "cmd ::= EXPLAIN analyze_opt explain_options query_expression", /* 236 */ "analyze_opt ::=", /* 237 */ "analyze_opt ::= ANALYZE", /* 238 */ "explain_options ::=", /* 239 */ "explain_options ::= explain_options VERBOSE NK_BOOL", /* 240 */ "explain_options ::= explain_options RATIO NK_FLOAT", /* 241 */ "cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP", /* 242 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt", /* 243 */ "cmd ::= DROP FUNCTION exists_opt function_name", /* 244 */ "agg_func_opt ::=", /* 245 */ "agg_func_opt ::= AGGREGATE", /* 246 */ "bufsize_opt ::=", /* 247 */ "bufsize_opt ::= BUFSIZE NK_INTEGER", /* 248 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression", /* 249 */ "cmd ::= DROP STREAM exists_opt stream_name", /* 250 */ "into_opt ::=", /* 251 */ "into_opt ::= INTO full_table_name", /* 252 */ "stream_options ::=", /* 253 */ "stream_options ::= stream_options TRIGGER AT_ONCE", /* 254 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE", /* 255 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal", /* 256 */ "stream_options ::= stream_options WATERMARK duration_literal", /* 257 */ "cmd ::= KILL CONNECTION NK_INTEGER", /* 258 */ "cmd ::= KILL QUERY NK_STRING", /* 259 */ "cmd ::= KILL TRANSACTION NK_INTEGER", /* 260 */ "cmd ::= BALANCE VGROUP", /* 261 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER", /* 262 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list", /* 263 */ "cmd ::= SPLIT VGROUP NK_INTEGER", /* 264 */ "dnode_list ::= DNODE NK_INTEGER", /* 265 */ "dnode_list ::= dnode_list DNODE NK_INTEGER", /* 266 */ "cmd ::= SYNCDB db_name REPLICA", /* 267 */ "cmd ::= DELETE FROM full_table_name where_clause_opt", /* 268 */ "cmd ::= query_expression", /* 269 */ "literal ::= NK_INTEGER", /* 270 */ "literal ::= NK_FLOAT", /* 271 */ "literal ::= NK_STRING", /* 272 */ "literal ::= NK_BOOL", /* 273 */ "literal ::= TIMESTAMP NK_STRING", /* 274 */ "literal ::= duration_literal", /* 275 */ "literal ::= NULL", /* 276 */ "literal ::= NK_QUESTION", /* 277 */ "duration_literal ::= NK_VARIABLE", /* 278 */ "signed ::= NK_INTEGER", /* 279 */ "signed ::= NK_PLUS NK_INTEGER", /* 280 */ "signed ::= NK_MINUS NK_INTEGER", /* 281 */ "signed ::= NK_FLOAT", /* 282 */ "signed ::= NK_PLUS NK_FLOAT", /* 283 */ "signed ::= NK_MINUS NK_FLOAT", /* 284 */ "signed_literal ::= signed", /* 285 */ "signed_literal ::= NK_STRING", /* 286 */ "signed_literal ::= NK_BOOL", /* 287 */ "signed_literal ::= TIMESTAMP NK_STRING", /* 288 */ "signed_literal ::= duration_literal", /* 289 */ "signed_literal ::= NULL", /* 290 */ "signed_literal ::= literal_func", /* 291 */ "literal_list ::= signed_literal", /* 292 */ "literal_list ::= literal_list NK_COMMA signed_literal", /* 293 */ "db_name ::= NK_ID", /* 294 */ "table_name ::= NK_ID", /* 295 */ "column_name ::= NK_ID", /* 296 */ "function_name ::= NK_ID", /* 297 */ "table_alias ::= NK_ID", /* 298 */ "column_alias ::= NK_ID", /* 299 */ "user_name ::= NK_ID", /* 300 */ "index_name ::= NK_ID", /* 301 */ "topic_name ::= NK_ID", /* 302 */ "stream_name ::= NK_ID", /* 303 */ "cgroup_name ::= NK_ID", /* 304 */ "expression ::= literal", /* 305 */ "expression ::= pseudo_column", /* 306 */ "expression ::= column_reference", /* 307 */ "expression ::= function_expression", /* 308 */ "expression ::= subquery", /* 309 */ "expression ::= NK_LP expression NK_RP", /* 310 */ "expression ::= NK_PLUS expression", /* 311 */ "expression ::= NK_MINUS expression", /* 312 */ "expression ::= expression NK_PLUS expression", /* 313 */ "expression ::= expression NK_MINUS expression", /* 314 */ "expression ::= expression NK_STAR expression", /* 315 */ "expression ::= expression NK_SLASH expression", /* 316 */ "expression ::= expression NK_REM expression", /* 317 */ "expression ::= column_reference NK_ARROW NK_STRING", /* 318 */ "expression_list ::= expression", /* 319 */ "expression_list ::= expression_list NK_COMMA expression", /* 320 */ "column_reference ::= column_name", /* 321 */ "column_reference ::= table_name NK_DOT column_name", /* 322 */ "pseudo_column ::= ROWTS", /* 323 */ "pseudo_column ::= TBNAME", /* 324 */ "pseudo_column ::= table_name NK_DOT TBNAME", /* 325 */ "pseudo_column ::= QSTARTTS", /* 326 */ "pseudo_column ::= QENDTS", /* 327 */ "pseudo_column ::= WSTARTTS", /* 328 */ "pseudo_column ::= WENDTS", /* 329 */ "pseudo_column ::= WDURATION", /* 330 */ "function_expression ::= function_name NK_LP expression_list NK_RP", /* 331 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP", /* 332 */ "function_expression ::= CAST NK_LP expression AS type_name NK_RP", /* 333 */ "function_expression ::= literal_func", /* 334 */ "literal_func ::= noarg_func NK_LP NK_RP", /* 335 */ "literal_func ::= NOW", /* 336 */ "noarg_func ::= NOW", /* 337 */ "noarg_func ::= TODAY", /* 338 */ "noarg_func ::= TIMEZONE", /* 339 */ "star_func ::= COUNT", /* 340 */ "star_func ::= FIRST", /* 341 */ "star_func ::= LAST", /* 342 */ "star_func ::= LAST_ROW", /* 343 */ "star_func_para_list ::= NK_STAR", /* 344 */ "star_func_para_list ::= other_para_list", /* 345 */ "other_para_list ::= star_func_para", /* 346 */ "other_para_list ::= other_para_list NK_COMMA star_func_para", /* 347 */ "star_func_para ::= expression", /* 348 */ "star_func_para ::= table_name NK_DOT NK_STAR", /* 349 */ "predicate ::= expression compare_op expression", /* 350 */ "predicate ::= expression BETWEEN expression AND expression", /* 351 */ "predicate ::= expression NOT BETWEEN expression AND expression", /* 352 */ "predicate ::= expression IS NULL", /* 353 */ "predicate ::= expression IS NOT NULL", /* 354 */ "predicate ::= expression in_op in_predicate_value", /* 355 */ "compare_op ::= NK_LT", /* 356 */ "compare_op ::= NK_GT", /* 357 */ "compare_op ::= NK_LE", /* 358 */ "compare_op ::= NK_GE", /* 359 */ "compare_op ::= NK_NE", /* 360 */ "compare_op ::= NK_EQ", /* 361 */ "compare_op ::= LIKE", /* 362 */ "compare_op ::= NOT LIKE", /* 363 */ "compare_op ::= MATCH", /* 364 */ "compare_op ::= NMATCH", /* 365 */ "compare_op ::= CONTAINS", /* 366 */ "in_op ::= IN", /* 367 */ "in_op ::= NOT IN", /* 368 */ "in_predicate_value ::= NK_LP expression_list NK_RP", /* 369 */ "boolean_value_expression ::= boolean_primary", /* 370 */ "boolean_value_expression ::= NOT boolean_primary", /* 371 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression", /* 372 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression", /* 373 */ "boolean_primary ::= predicate", /* 374 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP", /* 375 */ "common_expression ::= expression", /* 376 */ "common_expression ::= boolean_value_expression", /* 377 */ "from_clause ::= FROM table_reference_list", /* 378 */ "table_reference_list ::= table_reference", /* 379 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference", /* 380 */ "table_reference ::= table_primary", /* 381 */ "table_reference ::= joined_table", /* 382 */ "table_primary ::= table_name alias_opt", /* 383 */ "table_primary ::= db_name NK_DOT table_name alias_opt", /* 384 */ "table_primary ::= subquery alias_opt", /* 385 */ "table_primary ::= parenthesized_joined_table", /* 386 */ "alias_opt ::=", /* 387 */ "alias_opt ::= table_alias", /* 388 */ "alias_opt ::= AS table_alias", /* 389 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP", /* 390 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP", /* 391 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition", /* 392 */ "join_type ::=", /* 393 */ "join_type ::= INNER", /* 394 */ "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", /* 395 */ "set_quantifier_opt ::=", /* 396 */ "set_quantifier_opt ::= DISTINCT", /* 397 */ "set_quantifier_opt ::= ALL", /* 398 */ "select_list ::= NK_STAR", /* 399 */ "select_list ::= select_sublist", /* 400 */ "select_sublist ::= select_item", /* 401 */ "select_sublist ::= select_sublist NK_COMMA select_item", /* 402 */ "select_item ::= common_expression", /* 403 */ "select_item ::= common_expression column_alias", /* 404 */ "select_item ::= common_expression AS column_alias", /* 405 */ "select_item ::= table_name NK_DOT NK_STAR", /* 406 */ "where_clause_opt ::=", /* 407 */ "where_clause_opt ::= WHERE search_condition", /* 408 */ "partition_by_clause_opt ::=", /* 409 */ "partition_by_clause_opt ::= PARTITION BY expression_list", /* 410 */ "twindow_clause_opt ::=", /* 411 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP", /* 412 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP", /* 413 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt", /* 414 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt", /* 415 */ "sliding_opt ::=", /* 416 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP", /* 417 */ "fill_opt ::=", /* 418 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP", /* 419 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP", /* 420 */ "fill_mode ::= NONE", /* 421 */ "fill_mode ::= PREV", /* 422 */ "fill_mode ::= NULL", /* 423 */ "fill_mode ::= LINEAR", /* 424 */ "fill_mode ::= NEXT", /* 425 */ "group_by_clause_opt ::=", /* 426 */ "group_by_clause_opt ::= GROUP BY group_by_list", /* 427 */ "group_by_list ::= expression", /* 428 */ "group_by_list ::= group_by_list NK_COMMA expression", /* 429 */ "having_clause_opt ::=", /* 430 */ "having_clause_opt ::= HAVING search_condition", /* 431 */ "query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt", /* 432 */ "query_expression_body ::= query_primary", /* 433 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body", /* 434 */ "query_expression_body ::= query_expression_body UNION query_expression_body", /* 435 */ "query_primary ::= query_specification", /* 436 */ "query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP", /* 437 */ "order_by_clause_opt ::=", /* 438 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", /* 439 */ "slimit_clause_opt ::=", /* 440 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", /* 441 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", /* 442 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", /* 443 */ "limit_clause_opt ::=", /* 444 */ "limit_clause_opt ::= LIMIT NK_INTEGER", /* 445 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", /* 446 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", /* 447 */ "subquery ::= NK_LP query_expression NK_RP", /* 448 */ "search_condition ::= common_expression", /* 449 */ "sort_specification_list ::= sort_specification", /* 450 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", /* 451 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt", /* 452 */ "ordering_specification_opt ::=", /* 453 */ "ordering_specification_opt ::= ASC", /* 454 */ "ordering_specification_opt ::= DESC", /* 455 */ "null_ordering_opt ::=", /* 456 */ "null_ordering_opt ::= NULLS FIRST", /* 457 */ "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 238: /* cmd */ case 241: /* literal */ case 252: /* db_options */ case 254: /* alter_db_options */ case 259: /* retention */ case 260: /* full_table_name */ case 263: /* table_options */ case 267: /* alter_table_clause */ case 268: /* alter_table_options */ case 271: /* signed_literal */ case 272: /* create_subtable_clause */ case 275: /* drop_table_clause */ case 278: /* column_def */ case 282: /* duration_literal */ case 283: /* rollup_func_name */ case 285: /* col_name */ case 286: /* db_name_cond_opt */ case 287: /* like_pattern_opt */ case 288: /* table_name_cond */ case 289: /* from_db_opt */ case 291: /* index_options */ case 293: /* sliding_opt */ case 294: /* func */ case 297: /* query_expression */ case 300: /* explain_options */ case 304: /* stream_options */ case 305: /* into_opt */ case 307: /* where_clause_opt */ case 308: /* signed */ case 309: /* literal_func */ case 312: /* expression */ case 313: /* pseudo_column */ case 314: /* column_reference */ case 315: /* function_expression */ case 316: /* subquery */ case 321: /* star_func_para */ case 322: /* predicate */ case 325: /* in_predicate_value */ case 326: /* boolean_value_expression */ case 327: /* boolean_primary */ case 328: /* common_expression */ case 329: /* from_clause */ case 330: /* table_reference_list */ case 331: /* table_reference */ case 332: /* table_primary */ case 333: /* joined_table */ case 335: /* parenthesized_joined_table */ case 337: /* search_condition */ case 338: /* query_specification */ case 342: /* twindow_clause_opt */ case 344: /* having_clause_opt */ case 346: /* select_item */ case 347: /* fill_opt */ case 350: /* query_expression_body */ case 352: /* slimit_clause_opt */ case 353: /* limit_clause_opt */ case 354: /* query_primary */ case 356: /* sort_specification */ { nodesDestroyNode((yypminor->yy674)); } break; case 239: /* account_options */ case 240: /* alter_account_options */ case 242: /* alter_account_option */ case 302: /* bufsize_opt */ { } break; case 243: /* user_name */ case 245: /* priv_level */ case 248: /* db_name */ case 249: /* dnode_endpoint */ case 250: /* dnode_host_name */ case 269: /* column_name */ case 277: /* table_name */ case 284: /* function_name */ case 290: /* index_name */ case 296: /* topic_name */ case 298: /* cgroup_name */ case 303: /* stream_name */ case 310: /* table_alias */ case 311: /* column_alias */ case 317: /* star_func */ case 319: /* noarg_func */ case 334: /* alias_opt */ { } break; case 244: /* privileges */ case 246: /* priv_type_list */ case 247: /* priv_type */ { } break; case 251: /* not_exists_opt */ case 253: /* exists_opt */ case 299: /* analyze_opt */ case 301: /* agg_func_opt */ case 339: /* set_quantifier_opt */ { } break; case 255: /* integer_list */ case 256: /* variable_list */ case 257: /* retention_list */ case 261: /* column_def_list */ case 262: /* tags_def_opt */ case 264: /* multi_create_clause */ case 265: /* tags_def */ case 266: /* multi_drop_clause */ case 273: /* specific_tags_opt */ case 274: /* literal_list */ case 276: /* col_name_list */ case 279: /* duration_list */ case 280: /* rollup_func_list */ case 292: /* func_list */ case 295: /* expression_list */ case 306: /* dnode_list */ case 318: /* star_func_para_list */ case 320: /* other_para_list */ case 340: /* select_list */ case 341: /* partition_by_clause_opt */ case 343: /* group_by_clause_opt */ case 345: /* select_sublist */ case 349: /* group_by_list */ case 351: /* order_by_clause_opt */ case 355: /* sort_specification_list */ { nodesDestroyList((yypminor->yy530)); } break; case 258: /* alter_db_option */ case 281: /* alter_table_option */ { } break; case 270: /* type_name */ { } break; case 323: /* compare_op */ case 324: /* in_op */ { } break; case 336: /* join_type */ { } break; case 348: /* fill_mode */ { } break; case 357: /* ordering_specification_opt */ { } break; case 358: /* 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[] = { { 238, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ { 238, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ { 239, 0 }, /* (2) account_options ::= */ { 239, -3 }, /* (3) account_options ::= account_options PPS literal */ { 239, -3 }, /* (4) account_options ::= account_options TSERIES literal */ { 239, -3 }, /* (5) account_options ::= account_options STORAGE literal */ { 239, -3 }, /* (6) account_options ::= account_options STREAMS literal */ { 239, -3 }, /* (7) account_options ::= account_options QTIME literal */ { 239, -3 }, /* (8) account_options ::= account_options DBS literal */ { 239, -3 }, /* (9) account_options ::= account_options USERS literal */ { 239, -3 }, /* (10) account_options ::= account_options CONNS literal */ { 239, -3 }, /* (11) account_options ::= account_options STATE literal */ { 240, -1 }, /* (12) alter_account_options ::= alter_account_option */ { 240, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */ { 242, -2 }, /* (14) alter_account_option ::= PASS literal */ { 242, -2 }, /* (15) alter_account_option ::= PPS literal */ { 242, -2 }, /* (16) alter_account_option ::= TSERIES literal */ { 242, -2 }, /* (17) alter_account_option ::= STORAGE literal */ { 242, -2 }, /* (18) alter_account_option ::= STREAMS literal */ { 242, -2 }, /* (19) alter_account_option ::= QTIME literal */ { 242, -2 }, /* (20) alter_account_option ::= DBS literal */ { 242, -2 }, /* (21) alter_account_option ::= USERS literal */ { 242, -2 }, /* (22) alter_account_option ::= CONNS literal */ { 242, -2 }, /* (23) alter_account_option ::= STATE literal */ { 238, -5 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING */ { 238, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ { 238, -5 }, /* (26) cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */ { 238, -3 }, /* (27) cmd ::= DROP USER user_name */ { 238, -6 }, /* (28) cmd ::= GRANT privileges ON priv_level TO user_name */ { 238, -6 }, /* (29) cmd ::= REVOKE privileges ON priv_level FROM user_name */ { 244, -1 }, /* (30) privileges ::= ALL */ { 244, -1 }, /* (31) privileges ::= priv_type_list */ { 246, -1 }, /* (32) priv_type_list ::= priv_type */ { 246, -3 }, /* (33) priv_type_list ::= priv_type_list NK_COMMA priv_type */ { 247, -1 }, /* (34) priv_type ::= READ */ { 247, -1 }, /* (35) priv_type ::= WRITE */ { 245, -3 }, /* (36) priv_level ::= NK_STAR NK_DOT NK_STAR */ { 245, -3 }, /* (37) priv_level ::= db_name NK_DOT NK_STAR */ { 238, -3 }, /* (38) cmd ::= CREATE DNODE dnode_endpoint */ { 238, -5 }, /* (39) cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ { 238, -3 }, /* (40) cmd ::= DROP DNODE NK_INTEGER */ { 238, -3 }, /* (41) cmd ::= DROP DNODE dnode_endpoint */ { 238, -4 }, /* (42) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ { 238, -5 }, /* (43) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ { 238, -4 }, /* (44) cmd ::= ALTER ALL DNODES NK_STRING */ { 238, -5 }, /* (45) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ { 249, -1 }, /* (46) dnode_endpoint ::= NK_STRING */ { 250, -1 }, /* (47) dnode_host_name ::= NK_STRING */ { 238, -3 }, /* (48) cmd ::= ALTER LOCAL NK_STRING */ { 238, -4 }, /* (49) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ { 238, -5 }, /* (50) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ { 238, -5 }, /* (51) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ { 238, -5 }, /* (52) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ { 238, -5 }, /* (53) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ { 238, -5 }, /* (54) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ { 238, -5 }, /* (55) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ { 238, -5 }, /* (56) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ { 238, -5 }, /* (57) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ { 238, -5 }, /* (58) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ { 238, -4 }, /* (59) cmd ::= DROP DATABASE exists_opt db_name */ { 238, -2 }, /* (60) cmd ::= USE db_name */ { 238, -4 }, /* (61) cmd ::= ALTER DATABASE db_name alter_db_options */ { 251, -3 }, /* (62) not_exists_opt ::= IF NOT EXISTS */ { 251, 0 }, /* (63) not_exists_opt ::= */ { 253, -2 }, /* (64) exists_opt ::= IF EXISTS */ { 253, 0 }, /* (65) exists_opt ::= */ { 252, 0 }, /* (66) db_options ::= */ { 252, -3 }, /* (67) db_options ::= db_options BUFFER NK_INTEGER */ { 252, -3 }, /* (68) db_options ::= db_options CACHELAST NK_INTEGER */ { 252, -3 }, /* (69) db_options ::= db_options COMP NK_INTEGER */ { 252, -3 }, /* (70) db_options ::= db_options DURATION NK_INTEGER */ { 252, -3 }, /* (71) db_options ::= db_options DURATION NK_VARIABLE */ { 252, -3 }, /* (72) db_options ::= db_options FSYNC NK_INTEGER */ { 252, -3 }, /* (73) db_options ::= db_options MAXROWS NK_INTEGER */ { 252, -3 }, /* (74) db_options ::= db_options MINROWS NK_INTEGER */ { 252, -3 }, /* (75) db_options ::= db_options KEEP integer_list */ { 252, -3 }, /* (76) db_options ::= db_options KEEP variable_list */ { 252, -3 }, /* (77) db_options ::= db_options PAGES NK_INTEGER */ { 252, -3 }, /* (78) db_options ::= db_options PAGESIZE NK_INTEGER */ { 252, -3 }, /* (79) db_options ::= db_options PRECISION NK_STRING */ { 252, -3 }, /* (80) db_options ::= db_options REPLICA NK_INTEGER */ { 252, -3 }, /* (81) db_options ::= db_options STRICT NK_INTEGER */ { 252, -3 }, /* (82) db_options ::= db_options WAL NK_INTEGER */ { 252, -3 }, /* (83) db_options ::= db_options VGROUPS NK_INTEGER */ { 252, -3 }, /* (84) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ { 252, -3 }, /* (85) db_options ::= db_options RETENTIONS retention_list */ { 252, -3 }, /* (86) db_options ::= db_options SCHEMALESS NK_INTEGER */ { 254, -1 }, /* (87) alter_db_options ::= alter_db_option */ { 254, -2 }, /* (88) alter_db_options ::= alter_db_options alter_db_option */ { 258, -2 }, /* (89) alter_db_option ::= BUFFER NK_INTEGER */ { 258, -2 }, /* (90) alter_db_option ::= CACHELAST NK_INTEGER */ { 258, -2 }, /* (91) alter_db_option ::= FSYNC NK_INTEGER */ { 258, -2 }, /* (92) alter_db_option ::= KEEP integer_list */ { 258, -2 }, /* (93) alter_db_option ::= KEEP variable_list */ { 258, -2 }, /* (94) alter_db_option ::= PAGES NK_INTEGER */ { 258, -2 }, /* (95) alter_db_option ::= REPLICA NK_INTEGER */ { 258, -2 }, /* (96) alter_db_option ::= STRICT NK_INTEGER */ { 258, -2 }, /* (97) alter_db_option ::= WAL NK_INTEGER */ { 255, -1 }, /* (98) integer_list ::= NK_INTEGER */ { 255, -3 }, /* (99) integer_list ::= integer_list NK_COMMA NK_INTEGER */ { 256, -1 }, /* (100) variable_list ::= NK_VARIABLE */ { 256, -3 }, /* (101) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ { 257, -1 }, /* (102) retention_list ::= retention */ { 257, -3 }, /* (103) retention_list ::= retention_list NK_COMMA retention */ { 259, -3 }, /* (104) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ { 238, -9 }, /* (105) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ { 238, -3 }, /* (106) cmd ::= CREATE TABLE multi_create_clause */ { 238, -9 }, /* (107) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ { 238, -3 }, /* (108) cmd ::= DROP TABLE multi_drop_clause */ { 238, -4 }, /* (109) cmd ::= DROP STABLE exists_opt full_table_name */ { 238, -3 }, /* (110) cmd ::= ALTER TABLE alter_table_clause */ { 238, -3 }, /* (111) cmd ::= ALTER STABLE alter_table_clause */ { 267, -2 }, /* (112) alter_table_clause ::= full_table_name alter_table_options */ { 267, -5 }, /* (113) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ { 267, -4 }, /* (114) alter_table_clause ::= full_table_name DROP COLUMN column_name */ { 267, -5 }, /* (115) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ { 267, -5 }, /* (116) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ { 267, -5 }, /* (117) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ { 267, -4 }, /* (118) alter_table_clause ::= full_table_name DROP TAG column_name */ { 267, -5 }, /* (119) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ { 267, -5 }, /* (120) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ { 267, -6 }, /* (121) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ { 264, -1 }, /* (122) multi_create_clause ::= create_subtable_clause */ { 264, -2 }, /* (123) multi_create_clause ::= multi_create_clause create_subtable_clause */ { 272, -10 }, /* (124) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP table_options */ { 266, -1 }, /* (125) multi_drop_clause ::= drop_table_clause */ { 266, -2 }, /* (126) multi_drop_clause ::= multi_drop_clause drop_table_clause */ { 275, -2 }, /* (127) drop_table_clause ::= exists_opt full_table_name */ { 273, 0 }, /* (128) specific_tags_opt ::= */ { 273, -3 }, /* (129) specific_tags_opt ::= NK_LP col_name_list NK_RP */ { 260, -1 }, /* (130) full_table_name ::= table_name */ { 260, -3 }, /* (131) full_table_name ::= db_name NK_DOT table_name */ { 261, -1 }, /* (132) column_def_list ::= column_def */ { 261, -3 }, /* (133) column_def_list ::= column_def_list NK_COMMA column_def */ { 278, -2 }, /* (134) column_def ::= column_name type_name */ { 278, -4 }, /* (135) column_def ::= column_name type_name COMMENT NK_STRING */ { 270, -1 }, /* (136) type_name ::= BOOL */ { 270, -1 }, /* (137) type_name ::= TINYINT */ { 270, -1 }, /* (138) type_name ::= SMALLINT */ { 270, -1 }, /* (139) type_name ::= INT */ { 270, -1 }, /* (140) type_name ::= INTEGER */ { 270, -1 }, /* (141) type_name ::= BIGINT */ { 270, -1 }, /* (142) type_name ::= FLOAT */ { 270, -1 }, /* (143) type_name ::= DOUBLE */ { 270, -4 }, /* (144) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ { 270, -1 }, /* (145) type_name ::= TIMESTAMP */ { 270, -4 }, /* (146) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ { 270, -2 }, /* (147) type_name ::= TINYINT UNSIGNED */ { 270, -2 }, /* (148) type_name ::= SMALLINT UNSIGNED */ { 270, -2 }, /* (149) type_name ::= INT UNSIGNED */ { 270, -2 }, /* (150) type_name ::= BIGINT UNSIGNED */ { 270, -1 }, /* (151) type_name ::= JSON */ { 270, -4 }, /* (152) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ { 270, -1 }, /* (153) type_name ::= MEDIUMBLOB */ { 270, -1 }, /* (154) type_name ::= BLOB */ { 270, -4 }, /* (155) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ { 270, -1 }, /* (156) type_name ::= DECIMAL */ { 270, -4 }, /* (157) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ { 270, -6 }, /* (158) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ { 262, 0 }, /* (159) tags_def_opt ::= */ { 262, -1 }, /* (160) tags_def_opt ::= tags_def */ { 265, -4 }, /* (161) tags_def ::= TAGS NK_LP column_def_list NK_RP */ { 263, 0 }, /* (162) table_options ::= */ { 263, -3 }, /* (163) table_options ::= table_options COMMENT NK_STRING */ { 263, -3 }, /* (164) table_options ::= table_options MAX_DELAY duration_list */ { 263, -3 }, /* (165) table_options ::= table_options WATERMARK duration_list */ { 263, -5 }, /* (166) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ { 263, -3 }, /* (167) table_options ::= table_options TTL NK_INTEGER */ { 263, -5 }, /* (168) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ { 268, -1 }, /* (169) alter_table_options ::= alter_table_option */ { 268, -2 }, /* (170) alter_table_options ::= alter_table_options alter_table_option */ { 281, -2 }, /* (171) alter_table_option ::= COMMENT NK_STRING */ { 281, -2 }, /* (172) alter_table_option ::= TTL NK_INTEGER */ { 279, -1 }, /* (173) duration_list ::= duration_literal */ { 279, -3 }, /* (174) duration_list ::= duration_list NK_COMMA duration_literal */ { 280, -1 }, /* (175) rollup_func_list ::= rollup_func_name */ { 280, -3 }, /* (176) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ { 283, -1 }, /* (177) rollup_func_name ::= function_name */ { 283, -1 }, /* (178) rollup_func_name ::= FIRST */ { 283, -1 }, /* (179) rollup_func_name ::= LAST */ { 276, -1 }, /* (180) col_name_list ::= col_name */ { 276, -3 }, /* (181) col_name_list ::= col_name_list NK_COMMA col_name */ { 285, -1 }, /* (182) col_name ::= column_name */ { 238, -2 }, /* (183) cmd ::= SHOW DNODES */ { 238, -2 }, /* (184) cmd ::= SHOW USERS */ { 238, -2 }, /* (185) cmd ::= SHOW DATABASES */ { 238, -4 }, /* (186) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ { 238, -4 }, /* (187) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ { 238, -3 }, /* (188) cmd ::= SHOW db_name_cond_opt VGROUPS */ { 238, -2 }, /* (189) cmd ::= SHOW MNODES */ { 238, -2 }, /* (190) cmd ::= SHOW MODULES */ { 238, -2 }, /* (191) cmd ::= SHOW QNODES */ { 238, -2 }, /* (192) cmd ::= SHOW FUNCTIONS */ { 238, -5 }, /* (193) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ { 238, -2 }, /* (194) cmd ::= SHOW STREAMS */ { 238, -2 }, /* (195) cmd ::= SHOW ACCOUNTS */ { 238, -2 }, /* (196) cmd ::= SHOW APPS */ { 238, -2 }, /* (197) cmd ::= SHOW CONNECTIONS */ { 238, -2 }, /* (198) cmd ::= SHOW LICENCE */ { 238, -2 }, /* (199) cmd ::= SHOW GRANTS */ { 238, -4 }, /* (200) cmd ::= SHOW CREATE DATABASE db_name */ { 238, -4 }, /* (201) cmd ::= SHOW CREATE TABLE full_table_name */ { 238, -4 }, /* (202) cmd ::= SHOW CREATE STABLE full_table_name */ { 238, -2 }, /* (203) cmd ::= SHOW QUERIES */ { 238, -2 }, /* (204) cmd ::= SHOW SCORES */ { 238, -2 }, /* (205) cmd ::= SHOW TOPICS */ { 238, -2 }, /* (206) cmd ::= SHOW VARIABLES */ { 238, -2 }, /* (207) cmd ::= SHOW BNODES */ { 238, -2 }, /* (208) cmd ::= SHOW SNODES */ { 238, -2 }, /* (209) cmd ::= SHOW CLUSTER */ { 238, -2 }, /* (210) cmd ::= SHOW TRANSACTIONS */ { 286, 0 }, /* (211) db_name_cond_opt ::= */ { 286, -2 }, /* (212) db_name_cond_opt ::= db_name NK_DOT */ { 287, 0 }, /* (213) like_pattern_opt ::= */ { 287, -2 }, /* (214) like_pattern_opt ::= LIKE NK_STRING */ { 288, -1 }, /* (215) table_name_cond ::= table_name */ { 289, 0 }, /* (216) from_db_opt ::= */ { 289, -2 }, /* (217) from_db_opt ::= FROM db_name */ { 238, -8 }, /* (218) cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ { 238, -10 }, /* (219) cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */ { 238, -6 }, /* (220) cmd ::= DROP INDEX exists_opt index_name ON table_name */ { 291, 0 }, /* (221) index_options ::= */ { 291, -9 }, /* (222) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ { 291, -11 }, /* (223) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */ { 292, -1 }, /* (224) func_list ::= func */ { 292, -3 }, /* (225) func_list ::= func_list NK_COMMA func */ { 294, -4 }, /* (226) func ::= function_name NK_LP expression_list NK_RP */ { 238, -6 }, /* (227) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */ { 238, -7 }, /* (228) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ { 238, -7 }, /* (229) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ { 238, -4 }, /* (230) cmd ::= DROP TOPIC exists_opt topic_name */ { 238, -7 }, /* (231) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ { 238, -2 }, /* (232) cmd ::= DESC full_table_name */ { 238, -2 }, /* (233) cmd ::= DESCRIBE full_table_name */ { 238, -3 }, /* (234) cmd ::= RESET QUERY CACHE */ { 238, -4 }, /* (235) cmd ::= EXPLAIN analyze_opt explain_options query_expression */ { 299, 0 }, /* (236) analyze_opt ::= */ { 299, -1 }, /* (237) analyze_opt ::= ANALYZE */ { 300, 0 }, /* (238) explain_options ::= */ { 300, -3 }, /* (239) explain_options ::= explain_options VERBOSE NK_BOOL */ { 300, -3 }, /* (240) explain_options ::= explain_options RATIO NK_FLOAT */ { 238, -6 }, /* (241) cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ { 238, -10 }, /* (242) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ { 238, -4 }, /* (243) cmd ::= DROP FUNCTION exists_opt function_name */ { 301, 0 }, /* (244) agg_func_opt ::= */ { 301, -1 }, /* (245) agg_func_opt ::= AGGREGATE */ { 302, 0 }, /* (246) bufsize_opt ::= */ { 302, -2 }, /* (247) bufsize_opt ::= BUFSIZE NK_INTEGER */ { 238, -8 }, /* (248) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ { 238, -4 }, /* (249) cmd ::= DROP STREAM exists_opt stream_name */ { 305, 0 }, /* (250) into_opt ::= */ { 305, -2 }, /* (251) into_opt ::= INTO full_table_name */ { 304, 0 }, /* (252) stream_options ::= */ { 304, -3 }, /* (253) stream_options ::= stream_options TRIGGER AT_ONCE */ { 304, -3 }, /* (254) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ { 304, -4 }, /* (255) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ { 304, -3 }, /* (256) stream_options ::= stream_options WATERMARK duration_literal */ { 238, -3 }, /* (257) cmd ::= KILL CONNECTION NK_INTEGER */ { 238, -3 }, /* (258) cmd ::= KILL QUERY NK_STRING */ { 238, -3 }, /* (259) cmd ::= KILL TRANSACTION NK_INTEGER */ { 238, -2 }, /* (260) cmd ::= BALANCE VGROUP */ { 238, -4 }, /* (261) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ { 238, -4 }, /* (262) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ { 238, -3 }, /* (263) cmd ::= SPLIT VGROUP NK_INTEGER */ { 306, -2 }, /* (264) dnode_list ::= DNODE NK_INTEGER */ { 306, -3 }, /* (265) dnode_list ::= dnode_list DNODE NK_INTEGER */ { 238, -3 }, /* (266) cmd ::= SYNCDB db_name REPLICA */ { 238, -4 }, /* (267) cmd ::= DELETE FROM full_table_name where_clause_opt */ { 238, -1 }, /* (268) cmd ::= query_expression */ { 241, -1 }, /* (269) literal ::= NK_INTEGER */ { 241, -1 }, /* (270) literal ::= NK_FLOAT */ { 241, -1 }, /* (271) literal ::= NK_STRING */ { 241, -1 }, /* (272) literal ::= NK_BOOL */ { 241, -2 }, /* (273) literal ::= TIMESTAMP NK_STRING */ { 241, -1 }, /* (274) literal ::= duration_literal */ { 241, -1 }, /* (275) literal ::= NULL */ { 241, -1 }, /* (276) literal ::= NK_QUESTION */ { 282, -1 }, /* (277) duration_literal ::= NK_VARIABLE */ { 308, -1 }, /* (278) signed ::= NK_INTEGER */ { 308, -2 }, /* (279) signed ::= NK_PLUS NK_INTEGER */ { 308, -2 }, /* (280) signed ::= NK_MINUS NK_INTEGER */ { 308, -1 }, /* (281) signed ::= NK_FLOAT */ { 308, -2 }, /* (282) signed ::= NK_PLUS NK_FLOAT */ { 308, -2 }, /* (283) signed ::= NK_MINUS NK_FLOAT */ { 271, -1 }, /* (284) signed_literal ::= signed */ { 271, -1 }, /* (285) signed_literal ::= NK_STRING */ { 271, -1 }, /* (286) signed_literal ::= NK_BOOL */ { 271, -2 }, /* (287) signed_literal ::= TIMESTAMP NK_STRING */ { 271, -1 }, /* (288) signed_literal ::= duration_literal */ { 271, -1 }, /* (289) signed_literal ::= NULL */ { 271, -1 }, /* (290) signed_literal ::= literal_func */ { 274, -1 }, /* (291) literal_list ::= signed_literal */ { 274, -3 }, /* (292) literal_list ::= literal_list NK_COMMA signed_literal */ { 248, -1 }, /* (293) db_name ::= NK_ID */ { 277, -1 }, /* (294) table_name ::= NK_ID */ { 269, -1 }, /* (295) column_name ::= NK_ID */ { 284, -1 }, /* (296) function_name ::= NK_ID */ { 310, -1 }, /* (297) table_alias ::= NK_ID */ { 311, -1 }, /* (298) column_alias ::= NK_ID */ { 243, -1 }, /* (299) user_name ::= NK_ID */ { 290, -1 }, /* (300) index_name ::= NK_ID */ { 296, -1 }, /* (301) topic_name ::= NK_ID */ { 303, -1 }, /* (302) stream_name ::= NK_ID */ { 298, -1 }, /* (303) cgroup_name ::= NK_ID */ { 312, -1 }, /* (304) expression ::= literal */ { 312, -1 }, /* (305) expression ::= pseudo_column */ { 312, -1 }, /* (306) expression ::= column_reference */ { 312, -1 }, /* (307) expression ::= function_expression */ { 312, -1 }, /* (308) expression ::= subquery */ { 312, -3 }, /* (309) expression ::= NK_LP expression NK_RP */ { 312, -2 }, /* (310) expression ::= NK_PLUS expression */ { 312, -2 }, /* (311) expression ::= NK_MINUS expression */ { 312, -3 }, /* (312) expression ::= expression NK_PLUS expression */ { 312, -3 }, /* (313) expression ::= expression NK_MINUS expression */ { 312, -3 }, /* (314) expression ::= expression NK_STAR expression */ { 312, -3 }, /* (315) expression ::= expression NK_SLASH expression */ { 312, -3 }, /* (316) expression ::= expression NK_REM expression */ { 312, -3 }, /* (317) expression ::= column_reference NK_ARROW NK_STRING */ { 295, -1 }, /* (318) expression_list ::= expression */ { 295, -3 }, /* (319) expression_list ::= expression_list NK_COMMA expression */ { 314, -1 }, /* (320) column_reference ::= column_name */ { 314, -3 }, /* (321) column_reference ::= table_name NK_DOT column_name */ { 313, -1 }, /* (322) pseudo_column ::= ROWTS */ { 313, -1 }, /* (323) pseudo_column ::= TBNAME */ { 313, -3 }, /* (324) pseudo_column ::= table_name NK_DOT TBNAME */ { 313, -1 }, /* (325) pseudo_column ::= QSTARTTS */ { 313, -1 }, /* (326) pseudo_column ::= QENDTS */ { 313, -1 }, /* (327) pseudo_column ::= WSTARTTS */ { 313, -1 }, /* (328) pseudo_column ::= WENDTS */ { 313, -1 }, /* (329) pseudo_column ::= WDURATION */ { 315, -4 }, /* (330) function_expression ::= function_name NK_LP expression_list NK_RP */ { 315, -4 }, /* (331) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ { 315, -6 }, /* (332) function_expression ::= CAST NK_LP expression AS type_name NK_RP */ { 315, -1 }, /* (333) function_expression ::= literal_func */ { 309, -3 }, /* (334) literal_func ::= noarg_func NK_LP NK_RP */ { 309, -1 }, /* (335) literal_func ::= NOW */ { 319, -1 }, /* (336) noarg_func ::= NOW */ { 319, -1 }, /* (337) noarg_func ::= TODAY */ { 319, -1 }, /* (338) noarg_func ::= TIMEZONE */ { 317, -1 }, /* (339) star_func ::= COUNT */ { 317, -1 }, /* (340) star_func ::= FIRST */ { 317, -1 }, /* (341) star_func ::= LAST */ { 317, -1 }, /* (342) star_func ::= LAST_ROW */ { 318, -1 }, /* (343) star_func_para_list ::= NK_STAR */ { 318, -1 }, /* (344) star_func_para_list ::= other_para_list */ { 320, -1 }, /* (345) other_para_list ::= star_func_para */ { 320, -3 }, /* (346) other_para_list ::= other_para_list NK_COMMA star_func_para */ { 321, -1 }, /* (347) star_func_para ::= expression */ { 321, -3 }, /* (348) star_func_para ::= table_name NK_DOT NK_STAR */ { 322, -3 }, /* (349) predicate ::= expression compare_op expression */ { 322, -5 }, /* (350) predicate ::= expression BETWEEN expression AND expression */ { 322, -6 }, /* (351) predicate ::= expression NOT BETWEEN expression AND expression */ { 322, -3 }, /* (352) predicate ::= expression IS NULL */ { 322, -4 }, /* (353) predicate ::= expression IS NOT NULL */ { 322, -3 }, /* (354) predicate ::= expression in_op in_predicate_value */ { 323, -1 }, /* (355) compare_op ::= NK_LT */ { 323, -1 }, /* (356) compare_op ::= NK_GT */ { 323, -1 }, /* (357) compare_op ::= NK_LE */ { 323, -1 }, /* (358) compare_op ::= NK_GE */ { 323, -1 }, /* (359) compare_op ::= NK_NE */ { 323, -1 }, /* (360) compare_op ::= NK_EQ */ { 323, -1 }, /* (361) compare_op ::= LIKE */ { 323, -2 }, /* (362) compare_op ::= NOT LIKE */ { 323, -1 }, /* (363) compare_op ::= MATCH */ { 323, -1 }, /* (364) compare_op ::= NMATCH */ { 323, -1 }, /* (365) compare_op ::= CONTAINS */ { 324, -1 }, /* (366) in_op ::= IN */ { 324, -2 }, /* (367) in_op ::= NOT IN */ { 325, -3 }, /* (368) in_predicate_value ::= NK_LP expression_list NK_RP */ { 326, -1 }, /* (369) boolean_value_expression ::= boolean_primary */ { 326, -2 }, /* (370) boolean_value_expression ::= NOT boolean_primary */ { 326, -3 }, /* (371) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { 326, -3 }, /* (372) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { 327, -1 }, /* (373) boolean_primary ::= predicate */ { 327, -3 }, /* (374) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ { 328, -1 }, /* (375) common_expression ::= expression */ { 328, -1 }, /* (376) common_expression ::= boolean_value_expression */ { 329, -2 }, /* (377) from_clause ::= FROM table_reference_list */ { 330, -1 }, /* (378) table_reference_list ::= table_reference */ { 330, -3 }, /* (379) table_reference_list ::= table_reference_list NK_COMMA table_reference */ { 331, -1 }, /* (380) table_reference ::= table_primary */ { 331, -1 }, /* (381) table_reference ::= joined_table */ { 332, -2 }, /* (382) table_primary ::= table_name alias_opt */ { 332, -4 }, /* (383) table_primary ::= db_name NK_DOT table_name alias_opt */ { 332, -2 }, /* (384) table_primary ::= subquery alias_opt */ { 332, -1 }, /* (385) table_primary ::= parenthesized_joined_table */ { 334, 0 }, /* (386) alias_opt ::= */ { 334, -1 }, /* (387) alias_opt ::= table_alias */ { 334, -2 }, /* (388) alias_opt ::= AS table_alias */ { 335, -3 }, /* (389) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ { 335, -3 }, /* (390) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ { 333, -6 }, /* (391) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ { 336, 0 }, /* (392) join_type ::= */ { 336, -1 }, /* (393) join_type ::= INNER */ { 338, -9 }, /* (394) 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 */ { 339, 0 }, /* (395) set_quantifier_opt ::= */ { 339, -1 }, /* (396) set_quantifier_opt ::= DISTINCT */ { 339, -1 }, /* (397) set_quantifier_opt ::= ALL */ { 340, -1 }, /* (398) select_list ::= NK_STAR */ { 340, -1 }, /* (399) select_list ::= select_sublist */ { 345, -1 }, /* (400) select_sublist ::= select_item */ { 345, -3 }, /* (401) select_sublist ::= select_sublist NK_COMMA select_item */ { 346, -1 }, /* (402) select_item ::= common_expression */ { 346, -2 }, /* (403) select_item ::= common_expression column_alias */ { 346, -3 }, /* (404) select_item ::= common_expression AS column_alias */ { 346, -3 }, /* (405) select_item ::= table_name NK_DOT NK_STAR */ { 307, 0 }, /* (406) where_clause_opt ::= */ { 307, -2 }, /* (407) where_clause_opt ::= WHERE search_condition */ { 341, 0 }, /* (408) partition_by_clause_opt ::= */ { 341, -3 }, /* (409) partition_by_clause_opt ::= PARTITION BY expression_list */ { 342, 0 }, /* (410) twindow_clause_opt ::= */ { 342, -6 }, /* (411) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ { 342, -4 }, /* (412) twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ { 342, -6 }, /* (413) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ { 342, -8 }, /* (414) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ { 293, 0 }, /* (415) sliding_opt ::= */ { 293, -4 }, /* (416) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ { 347, 0 }, /* (417) fill_opt ::= */ { 347, -4 }, /* (418) fill_opt ::= FILL NK_LP fill_mode NK_RP */ { 347, -6 }, /* (419) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ { 348, -1 }, /* (420) fill_mode ::= NONE */ { 348, -1 }, /* (421) fill_mode ::= PREV */ { 348, -1 }, /* (422) fill_mode ::= NULL */ { 348, -1 }, /* (423) fill_mode ::= LINEAR */ { 348, -1 }, /* (424) fill_mode ::= NEXT */ { 343, 0 }, /* (425) group_by_clause_opt ::= */ { 343, -3 }, /* (426) group_by_clause_opt ::= GROUP BY group_by_list */ { 349, -1 }, /* (427) group_by_list ::= expression */ { 349, -3 }, /* (428) group_by_list ::= group_by_list NK_COMMA expression */ { 344, 0 }, /* (429) having_clause_opt ::= */ { 344, -2 }, /* (430) having_clause_opt ::= HAVING search_condition */ { 297, -4 }, /* (431) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ { 350, -1 }, /* (432) query_expression_body ::= query_primary */ { 350, -4 }, /* (433) query_expression_body ::= query_expression_body UNION ALL query_expression_body */ { 350, -3 }, /* (434) query_expression_body ::= query_expression_body UNION query_expression_body */ { 354, -1 }, /* (435) query_primary ::= query_specification */ { 354, -6 }, /* (436) query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ { 351, 0 }, /* (437) order_by_clause_opt ::= */ { 351, -3 }, /* (438) order_by_clause_opt ::= ORDER BY sort_specification_list */ { 352, 0 }, /* (439) slimit_clause_opt ::= */ { 352, -2 }, /* (440) slimit_clause_opt ::= SLIMIT NK_INTEGER */ { 352, -4 }, /* (441) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ { 352, -4 }, /* (442) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ { 353, 0 }, /* (443) limit_clause_opt ::= */ { 353, -2 }, /* (444) limit_clause_opt ::= LIMIT NK_INTEGER */ { 353, -4 }, /* (445) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ { 353, -4 }, /* (446) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ { 316, -3 }, /* (447) subquery ::= NK_LP query_expression NK_RP */ { 337, -1 }, /* (448) search_condition ::= common_expression */ { 355, -1 }, /* (449) sort_specification_list ::= sort_specification */ { 355, -3 }, /* (450) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ { 356, -3 }, /* (451) sort_specification ::= expression ordering_specification_opt null_ordering_opt */ { 357, 0 }, /* (452) ordering_specification_opt ::= */ { 357, -1 }, /* (453) ordering_specification_opt ::= ASC */ { 357, -1 }, /* (454) ordering_specification_opt ::= DESC */ { 358, 0 }, /* (455) null_ordering_opt ::= */ { 358, -2 }, /* (456) null_ordering_opt ::= NULLS FIRST */ { 358, -2 }, /* (457) 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->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } yy_destructor(yypParser,239,&yymsp[0].minor); break; case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } yy_destructor(yypParser,240,&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,239,&yymsp[-2].minor); { } yy_destructor(yypParser,241,&yymsp[0].minor); } break; case 12: /* alter_account_options ::= alter_account_option */ { yy_destructor(yypParser,242,&yymsp[0].minor); { } } break; case 13: /* alter_account_options ::= alter_account_options alter_account_option */ { yy_destructor(yypParser,240,&yymsp[-1].minor); { } yy_destructor(yypParser,242,&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,241,&yymsp[0].minor); break; case 24: /* cmd ::= CREATE USER user_name PASS NK_STRING */ { pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy0); } break; case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */ { pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy421, 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.yy421, TSDB_ALTER_USER_PRIVILEGES, &yymsp[0].minor.yy0); } break; case 27: /* cmd ::= DROP USER user_name */ { pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy421); } break; case 28: /* cmd ::= GRANT privileges ON priv_level TO user_name */ { pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy669, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy421); } break; case 29: /* cmd ::= REVOKE privileges ON priv_level FROM user_name */ { pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy669, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy421); } break; case 30: /* privileges ::= ALL */ { yymsp[0].minor.yy669 = PRIVILEGE_TYPE_ALL; } break; case 31: /* privileges ::= priv_type_list */ case 32: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==32); { yylhsminor.yy669 = yymsp[0].minor.yy669; } yymsp[0].minor.yy669 = yylhsminor.yy669; break; case 33: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */ { yylhsminor.yy669 = yymsp[-2].minor.yy669 | yymsp[0].minor.yy669; } yymsp[-2].minor.yy669 = yylhsminor.yy669; break; case 34: /* priv_type ::= READ */ { yymsp[0].minor.yy669 = PRIVILEGE_TYPE_READ; } break; case 35: /* priv_type ::= WRITE */ { yymsp[0].minor.yy669 = PRIVILEGE_TYPE_WRITE; } break; case 36: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ { yylhsminor.yy421 = yymsp[-2].minor.yy0; } yymsp[-2].minor.yy421 = yylhsminor.yy421; break; case 37: /* priv_level ::= db_name NK_DOT NK_STAR */ { yylhsminor.yy421 = yymsp[-2].minor.yy421; } yymsp[-2].minor.yy421 = yylhsminor.yy421; break; case 38: /* cmd ::= CREATE DNODE dnode_endpoint */ { pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy421, NULL); } break; case 39: /* cmd ::= CREATE DNODE dnode_host_name PORT NK_INTEGER */ { pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy0); } break; case 40: /* cmd ::= DROP DNODE NK_INTEGER */ { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy0); } break; case 41: /* cmd ::= DROP DNODE dnode_endpoint */ { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy421); } break; case 42: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } break; case 43: /* 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 44: /* cmd ::= ALTER ALL DNODES NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[0].minor.yy0, NULL); } break; case 45: /* cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; case 46: /* dnode_endpoint ::= NK_STRING */ case 47: /* dnode_host_name ::= NK_STRING */ yytestcase(yyruleno==47); case 293: /* db_name ::= NK_ID */ yytestcase(yyruleno==293); case 294: /* table_name ::= NK_ID */ yytestcase(yyruleno==294); case 295: /* column_name ::= NK_ID */ yytestcase(yyruleno==295); case 296: /* function_name ::= NK_ID */ yytestcase(yyruleno==296); case 297: /* table_alias ::= NK_ID */ yytestcase(yyruleno==297); case 298: /* column_alias ::= NK_ID */ yytestcase(yyruleno==298); case 299: /* user_name ::= NK_ID */ yytestcase(yyruleno==299); case 300: /* index_name ::= NK_ID */ yytestcase(yyruleno==300); case 301: /* topic_name ::= NK_ID */ yytestcase(yyruleno==301); case 302: /* stream_name ::= NK_ID */ yytestcase(yyruleno==302); case 303: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==303); case 336: /* noarg_func ::= NOW */ yytestcase(yyruleno==336); case 337: /* noarg_func ::= TODAY */ yytestcase(yyruleno==337); case 338: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==338); case 339: /* star_func ::= COUNT */ yytestcase(yyruleno==339); case 340: /* star_func ::= FIRST */ yytestcase(yyruleno==340); case 341: /* star_func ::= LAST */ yytestcase(yyruleno==341); case 342: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==342); { yylhsminor.yy421 = yymsp[0].minor.yy0; } yymsp[0].minor.yy421 = yylhsminor.yy421; break; case 48: /* cmd ::= ALTER LOCAL NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } break; case 49: /* cmd ::= ALTER LOCAL NK_STRING NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; case 50: /* cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_QNODE_STMT, &yymsp[0].minor.yy0); } break; case 51: /* cmd ::= DROP QNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_QNODE_STMT, &yymsp[0].minor.yy0); } break; case 52: /* cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_BNODE_STMT, &yymsp[0].minor.yy0); } break; case 53: /* cmd ::= DROP BNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_BNODE_STMT, &yymsp[0].minor.yy0); } break; case 54: /* cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_SNODE_STMT, &yymsp[0].minor.yy0); } break; case 55: /* cmd ::= DROP SNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_SNODE_STMT, &yymsp[0].minor.yy0); } break; case 56: /* cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_MNODE_STMT, &yymsp[0].minor.yy0); } break; case 57: /* cmd ::= DROP MNODE ON DNODE NK_INTEGER */ { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); } break; case 58: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ { pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy621, &yymsp[-1].minor.yy421, yymsp[0].minor.yy674); } break; case 59: /* cmd ::= DROP DATABASE exists_opt db_name */ { pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy621, &yymsp[0].minor.yy421); } break; case 60: /* cmd ::= USE db_name */ { pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy421); } break; case 61: /* cmd ::= ALTER DATABASE db_name alter_db_options */ { pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy421, yymsp[0].minor.yy674); } break; case 62: /* not_exists_opt ::= IF NOT EXISTS */ { yymsp[-2].minor.yy621 = true; } break; case 63: /* not_exists_opt ::= */ case 65: /* exists_opt ::= */ yytestcase(yyruleno==65); case 236: /* analyze_opt ::= */ yytestcase(yyruleno==236); case 244: /* agg_func_opt ::= */ yytestcase(yyruleno==244); case 395: /* set_quantifier_opt ::= */ yytestcase(yyruleno==395); { yymsp[1].minor.yy621 = false; } break; case 64: /* exists_opt ::= IF EXISTS */ { yymsp[-1].minor.yy621 = true; } break; case 66: /* db_options ::= */ { yymsp[1].minor.yy674 = createDefaultDatabaseOptions(pCxt); } break; case 67: /* db_options ::= db_options BUFFER NK_INTEGER */ { yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 68: /* db_options ::= db_options CACHELAST NK_INTEGER */ { yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_CACHELAST, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 69: /* db_options ::= db_options COMP NK_INTEGER */ { yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_COMP, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 70: /* db_options ::= db_options DURATION NK_INTEGER */ case 71: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==71); { yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 72: /* db_options ::= db_options FSYNC NK_INTEGER */ { yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 73: /* db_options ::= db_options MAXROWS NK_INTEGER */ { yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 74: /* db_options ::= db_options MINROWS NK_INTEGER */ { yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 75: /* db_options ::= db_options KEEP integer_list */ case 76: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==76); { yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_KEEP, yymsp[0].minor.yy530); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 77: /* db_options ::= db_options PAGES NK_INTEGER */ { yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 78: /* db_options ::= db_options PAGESIZE NK_INTEGER */ { yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 79: /* db_options ::= db_options PRECISION NK_STRING */ { yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 80: /* db_options ::= db_options REPLICA NK_INTEGER */ { yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 81: /* db_options ::= db_options STRICT NK_INTEGER */ { yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_STRICT, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 82: /* db_options ::= db_options WAL NK_INTEGER */ { yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_WAL, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 83: /* db_options ::= db_options VGROUPS NK_INTEGER */ { yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 84: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ { yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 85: /* db_options ::= db_options RETENTIONS retention_list */ { yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_RETENTIONS, yymsp[0].minor.yy530); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 86: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ { yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 87: /* alter_db_options ::= alter_db_option */ { yylhsminor.yy674 = createAlterDatabaseOptions(pCxt); yylhsminor.yy674 = setAlterDatabaseOption(pCxt, yylhsminor.yy674, &yymsp[0].minor.yy557); } yymsp[0].minor.yy674 = yylhsminor.yy674; break; case 88: /* alter_db_options ::= alter_db_options alter_db_option */ { yylhsminor.yy674 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy674, &yymsp[0].minor.yy557); } yymsp[-1].minor.yy674 = yylhsminor.yy674; break; case 89: /* alter_db_option ::= BUFFER NK_INTEGER */ { yymsp[-1].minor.yy557.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy557.val = yymsp[0].minor.yy0; } break; case 90: /* alter_db_option ::= CACHELAST NK_INTEGER */ { yymsp[-1].minor.yy557.type = DB_OPTION_CACHELAST; yymsp[-1].minor.yy557.val = yymsp[0].minor.yy0; } break; case 91: /* alter_db_option ::= FSYNC NK_INTEGER */ { yymsp[-1].minor.yy557.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy557.val = yymsp[0].minor.yy0; } break; case 92: /* alter_db_option ::= KEEP integer_list */ case 93: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==93); { yymsp[-1].minor.yy557.type = DB_OPTION_KEEP; yymsp[-1].minor.yy557.pList = yymsp[0].minor.yy530; } break; case 94: /* alter_db_option ::= PAGES NK_INTEGER */ { yymsp[-1].minor.yy557.type = DB_OPTION_PAGES; yymsp[-1].minor.yy557.val = yymsp[0].minor.yy0; } break; case 95: /* alter_db_option ::= REPLICA NK_INTEGER */ { yymsp[-1].minor.yy557.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy557.val = yymsp[0].minor.yy0; } break; case 96: /* alter_db_option ::= STRICT NK_INTEGER */ { yymsp[-1].minor.yy557.type = DB_OPTION_STRICT; yymsp[-1].minor.yy557.val = yymsp[0].minor.yy0; } break; case 97: /* alter_db_option ::= WAL NK_INTEGER */ { yymsp[-1].minor.yy557.type = DB_OPTION_WAL; yymsp[-1].minor.yy557.val = yymsp[0].minor.yy0; } break; case 98: /* integer_list ::= NK_INTEGER */ { yylhsminor.yy530 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy530 = yylhsminor.yy530; break; case 99: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ case 265: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==265); { yylhsminor.yy530 = addNodeToList(pCxt, yymsp[-2].minor.yy530, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } yymsp[-2].minor.yy530 = yylhsminor.yy530; break; case 100: /* variable_list ::= NK_VARIABLE */ { yylhsminor.yy530 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy530 = yylhsminor.yy530; break; case 101: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ { yylhsminor.yy530 = addNodeToList(pCxt, yymsp[-2].minor.yy530, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[-2].minor.yy530 = yylhsminor.yy530; break; case 102: /* retention_list ::= retention */ case 122: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==122); case 125: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==125); case 132: /* column_def_list ::= column_def */ yytestcase(yyruleno==132); case 175: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==175); case 180: /* col_name_list ::= col_name */ yytestcase(yyruleno==180); case 224: /* func_list ::= func */ yytestcase(yyruleno==224); case 291: /* literal_list ::= signed_literal */ yytestcase(yyruleno==291); case 345: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==345); case 400: /* select_sublist ::= select_item */ yytestcase(yyruleno==400); case 449: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==449); { yylhsminor.yy530 = createNodeList(pCxt, yymsp[0].minor.yy674); } yymsp[0].minor.yy530 = yylhsminor.yy530; break; case 103: /* retention_list ::= retention_list NK_COMMA retention */ case 133: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==133); case 176: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==176); case 181: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==181); case 225: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==225); case 292: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==292); case 346: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==346); case 401: /* select_sublist ::= select_sublist NK_COMMA select_item */ yytestcase(yyruleno==401); case 450: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==450); { yylhsminor.yy530 = addNodeToList(pCxt, yymsp[-2].minor.yy530, yymsp[0].minor.yy674); } yymsp[-2].minor.yy530 = yylhsminor.yy530; break; case 104: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ { yylhsminor.yy674 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 105: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ case 107: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==107); { pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy621, yymsp[-5].minor.yy674, yymsp[-3].minor.yy530, yymsp[-1].minor.yy530, yymsp[0].minor.yy674); } break; case 106: /* cmd ::= CREATE TABLE multi_create_clause */ { pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy530); } break; case 108: /* cmd ::= DROP TABLE multi_drop_clause */ { pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy530); } break; case 109: /* cmd ::= DROP STABLE exists_opt full_table_name */ { pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy621, yymsp[0].minor.yy674); } break; case 110: /* cmd ::= ALTER TABLE alter_table_clause */ case 111: /* cmd ::= ALTER STABLE alter_table_clause */ yytestcase(yyruleno==111); case 268: /* cmd ::= query_expression */ yytestcase(yyruleno==268); { pCxt->pRootNode = yymsp[0].minor.yy674; } break; case 112: /* alter_table_clause ::= full_table_name alter_table_options */ { yylhsminor.yy674 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy674, yymsp[0].minor.yy674); } yymsp[-1].minor.yy674 = yylhsminor.yy674; break; case 113: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ { yylhsminor.yy674 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy674, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy421, yymsp[0].minor.yy690); } yymsp[-4].minor.yy674 = yylhsminor.yy674; break; case 114: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ { yylhsminor.yy674 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy674, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy421); } yymsp[-3].minor.yy674 = yylhsminor.yy674; break; case 115: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ { yylhsminor.yy674 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy674, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy421, yymsp[0].minor.yy690); } yymsp[-4].minor.yy674 = yylhsminor.yy674; break; case 116: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ { yylhsminor.yy674 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy674, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy421, &yymsp[0].minor.yy421); } yymsp[-4].minor.yy674 = yylhsminor.yy674; break; case 117: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ { yylhsminor.yy674 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy674, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy421, yymsp[0].minor.yy690); } yymsp[-4].minor.yy674 = yylhsminor.yy674; break; case 118: /* alter_table_clause ::= full_table_name DROP TAG column_name */ { yylhsminor.yy674 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy674, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy421); } yymsp[-3].minor.yy674 = yylhsminor.yy674; break; case 119: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ { yylhsminor.yy674 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy674, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy421, yymsp[0].minor.yy690); } yymsp[-4].minor.yy674 = yylhsminor.yy674; break; case 120: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ { yylhsminor.yy674 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy674, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy421, &yymsp[0].minor.yy421); } yymsp[-4].minor.yy674 = yylhsminor.yy674; break; case 121: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ { yylhsminor.yy674 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy674, &yymsp[-2].minor.yy421, yymsp[0].minor.yy674); } yymsp[-5].minor.yy674 = yylhsminor.yy674; break; case 123: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ case 126: /* multi_drop_clause ::= multi_drop_clause drop_table_clause */ yytestcase(yyruleno==126); { yylhsminor.yy530 = addNodeToList(pCxt, yymsp[-1].minor.yy530, yymsp[0].minor.yy674); } yymsp[-1].minor.yy530 = yylhsminor.yy530; break; case 124: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP table_options */ { yylhsminor.yy674 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy621, yymsp[-8].minor.yy674, yymsp[-6].minor.yy674, yymsp[-5].minor.yy530, yymsp[-2].minor.yy530, yymsp[0].minor.yy674); } yymsp[-9].minor.yy674 = yylhsminor.yy674; break; case 127: /* drop_table_clause ::= exists_opt full_table_name */ { yylhsminor.yy674 = createDropTableClause(pCxt, yymsp[-1].minor.yy621, yymsp[0].minor.yy674); } yymsp[-1].minor.yy674 = yylhsminor.yy674; break; case 128: /* specific_tags_opt ::= */ case 159: /* tags_def_opt ::= */ yytestcase(yyruleno==159); case 408: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==408); case 425: /* group_by_clause_opt ::= */ yytestcase(yyruleno==425); case 437: /* order_by_clause_opt ::= */ yytestcase(yyruleno==437); { yymsp[1].minor.yy530 = NULL; } break; case 129: /* specific_tags_opt ::= NK_LP col_name_list NK_RP */ { yymsp[-2].minor.yy530 = yymsp[-1].minor.yy530; } break; case 130: /* full_table_name ::= table_name */ { yylhsminor.yy674 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy421, NULL); } yymsp[0].minor.yy674 = yylhsminor.yy674; break; case 131: /* full_table_name ::= db_name NK_DOT table_name */ { yylhsminor.yy674 = createRealTableNode(pCxt, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy421, NULL); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 134: /* column_def ::= column_name type_name */ { yylhsminor.yy674 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy421, yymsp[0].minor.yy690, NULL); } yymsp[-1].minor.yy674 = yylhsminor.yy674; break; case 135: /* column_def ::= column_name type_name COMMENT NK_STRING */ { yylhsminor.yy674 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy421, yymsp[-2].minor.yy690, &yymsp[0].minor.yy0); } yymsp[-3].minor.yy674 = yylhsminor.yy674; break; case 136: /* type_name ::= BOOL */ { yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_BOOL); } break; case 137: /* type_name ::= TINYINT */ { yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; case 138: /* type_name ::= SMALLINT */ { yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; case 139: /* type_name ::= INT */ case 140: /* type_name ::= INTEGER */ yytestcase(yyruleno==140); { yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_INT); } break; case 141: /* type_name ::= BIGINT */ { yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; case 142: /* type_name ::= FLOAT */ { yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; case 143: /* type_name ::= DOUBLE */ { yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; case 144: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy690 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; case 145: /* type_name ::= TIMESTAMP */ { yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; case 146: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy690 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; case 147: /* type_name ::= TINYINT UNSIGNED */ { yymsp[-1].minor.yy690 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; case 148: /* type_name ::= SMALLINT UNSIGNED */ { yymsp[-1].minor.yy690 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; case 149: /* type_name ::= INT UNSIGNED */ { yymsp[-1].minor.yy690 = createDataType(TSDB_DATA_TYPE_UINT); } break; case 150: /* type_name ::= BIGINT UNSIGNED */ { yymsp[-1].minor.yy690 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; case 151: /* type_name ::= JSON */ { yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_JSON); } break; case 152: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy690 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; case 153: /* type_name ::= MEDIUMBLOB */ { yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; case 154: /* type_name ::= BLOB */ { yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_BLOB); } break; case 155: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy690 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; case 156: /* type_name ::= DECIMAL */ { yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 157: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ { yymsp[-3].minor.yy690 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 158: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ { yymsp[-5].minor.yy690 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 160: /* tags_def_opt ::= tags_def */ case 344: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==344); case 399: /* select_list ::= select_sublist */ yytestcase(yyruleno==399); { yylhsminor.yy530 = yymsp[0].minor.yy530; } yymsp[0].minor.yy530 = yylhsminor.yy530; break; case 161: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ { yymsp[-3].minor.yy530 = yymsp[-1].minor.yy530; } break; case 162: /* table_options ::= */ { yymsp[1].minor.yy674 = createDefaultTableOptions(pCxt); } break; case 163: /* table_options ::= table_options COMMENT NK_STRING */ { yylhsminor.yy674 = setTableOption(pCxt, yymsp[-2].minor.yy674, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 164: /* table_options ::= table_options MAX_DELAY duration_list */ { yylhsminor.yy674 = setTableOption(pCxt, yymsp[-2].minor.yy674, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy530); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 165: /* table_options ::= table_options WATERMARK duration_list */ { yylhsminor.yy674 = setTableOption(pCxt, yymsp[-2].minor.yy674, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy530); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 166: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ { yylhsminor.yy674 = setTableOption(pCxt, yymsp[-4].minor.yy674, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy530); } yymsp[-4].minor.yy674 = yylhsminor.yy674; break; case 167: /* table_options ::= table_options TTL NK_INTEGER */ { yylhsminor.yy674 = setTableOption(pCxt, yymsp[-2].minor.yy674, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 168: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ { yylhsminor.yy674 = setTableOption(pCxt, yymsp[-4].minor.yy674, TABLE_OPTION_SMA, yymsp[-1].minor.yy530); } yymsp[-4].minor.yy674 = yylhsminor.yy674; break; case 169: /* alter_table_options ::= alter_table_option */ { yylhsminor.yy674 = createAlterTableOptions(pCxt); yylhsminor.yy674 = setTableOption(pCxt, yylhsminor.yy674, yymsp[0].minor.yy557.type, &yymsp[0].minor.yy557.val); } yymsp[0].minor.yy674 = yylhsminor.yy674; break; case 170: /* alter_table_options ::= alter_table_options alter_table_option */ { yylhsminor.yy674 = setTableOption(pCxt, yymsp[-1].minor.yy674, yymsp[0].minor.yy557.type, &yymsp[0].minor.yy557.val); } yymsp[-1].minor.yy674 = yylhsminor.yy674; break; case 171: /* alter_table_option ::= COMMENT NK_STRING */ { yymsp[-1].minor.yy557.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy557.val = yymsp[0].minor.yy0; } break; case 172: /* alter_table_option ::= TTL NK_INTEGER */ { yymsp[-1].minor.yy557.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy557.val = yymsp[0].minor.yy0; } break; case 173: /* duration_list ::= duration_literal */ case 318: /* expression_list ::= expression */ yytestcase(yyruleno==318); { yylhsminor.yy530 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy674)); } yymsp[0].minor.yy530 = yylhsminor.yy530; break; case 174: /* duration_list ::= duration_list NK_COMMA duration_literal */ case 319: /* expression_list ::= expression_list NK_COMMA expression */ yytestcase(yyruleno==319); { yylhsminor.yy530 = addNodeToList(pCxt, yymsp[-2].minor.yy530, releaseRawExprNode(pCxt, yymsp[0].minor.yy674)); } yymsp[-2].minor.yy530 = yylhsminor.yy530; break; case 177: /* rollup_func_name ::= function_name */ { yylhsminor.yy674 = createFunctionNode(pCxt, &yymsp[0].minor.yy421, NULL); } yymsp[0].minor.yy674 = yylhsminor.yy674; break; case 178: /* rollup_func_name ::= FIRST */ case 179: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==179); { yylhsminor.yy674 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } yymsp[0].minor.yy674 = yylhsminor.yy674; break; case 182: /* col_name ::= column_name */ { yylhsminor.yy674 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy421); } yymsp[0].minor.yy674 = yylhsminor.yy674; break; case 183: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT, NULL, NULL); } break; case 184: /* cmd ::= SHOW USERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT, NULL, NULL); } break; case 185: /* cmd ::= SHOW DATABASES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT, NULL, NULL); } break; case 186: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy674, yymsp[0].minor.yy674); } break; case 187: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy674, yymsp[0].minor.yy674); } break; case 188: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy674, NULL); } break; case 189: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT, NULL, NULL); } break; case 190: /* cmd ::= SHOW MODULES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MODULES_STMT, NULL, NULL); } break; case 191: /* cmd ::= SHOW QNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT, NULL, NULL); } break; case 192: /* cmd ::= SHOW FUNCTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT, NULL, NULL); } break; case 193: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[-1].minor.yy674, yymsp[0].minor.yy674); } break; case 194: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT, NULL, NULL); } break; case 195: /* cmd ::= SHOW ACCOUNTS */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } break; case 196: /* cmd ::= SHOW APPS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT, NULL, NULL); } break; case 197: /* cmd ::= SHOW CONNECTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT, NULL, NULL); } break; case 198: /* cmd ::= SHOW LICENCE */ case 199: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==199); { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCE_STMT, NULL, NULL); } break; case 200: /* cmd ::= SHOW CREATE DATABASE db_name */ { pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy421); } break; case 201: /* cmd ::= SHOW CREATE TABLE full_table_name */ { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy674); } break; case 202: /* cmd ::= SHOW CREATE STABLE full_table_name */ { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy674); } break; case 203: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT, NULL, NULL); } break; case 204: /* cmd ::= SHOW SCORES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT, NULL, NULL); } break; case 205: /* cmd ::= SHOW TOPICS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT, NULL, NULL); } break; case 206: /* cmd ::= SHOW VARIABLES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLE_STMT, NULL, NULL); } break; case 207: /* cmd ::= SHOW BNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT, NULL, NULL); } break; case 208: /* cmd ::= SHOW SNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT, NULL, NULL); } break; case 209: /* cmd ::= SHOW CLUSTER */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT, NULL, NULL); } break; case 210: /* cmd ::= SHOW TRANSACTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT, NULL, NULL); } break; case 211: /* db_name_cond_opt ::= */ case 216: /* from_db_opt ::= */ yytestcase(yyruleno==216); { yymsp[1].minor.yy674 = createDefaultDatabaseCondValue(pCxt); } break; case 212: /* db_name_cond_opt ::= db_name NK_DOT */ { yylhsminor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy421); } yymsp[-1].minor.yy674 = yylhsminor.yy674; break; case 213: /* like_pattern_opt ::= */ case 221: /* index_options ::= */ yytestcase(yyruleno==221); case 250: /* into_opt ::= */ yytestcase(yyruleno==250); case 406: /* where_clause_opt ::= */ yytestcase(yyruleno==406); case 410: /* twindow_clause_opt ::= */ yytestcase(yyruleno==410); case 415: /* sliding_opt ::= */ yytestcase(yyruleno==415); case 417: /* fill_opt ::= */ yytestcase(yyruleno==417); case 429: /* having_clause_opt ::= */ yytestcase(yyruleno==429); case 439: /* slimit_clause_opt ::= */ yytestcase(yyruleno==439); case 443: /* limit_clause_opt ::= */ yytestcase(yyruleno==443); { yymsp[1].minor.yy674 = NULL; } break; case 214: /* like_pattern_opt ::= LIKE NK_STRING */ { yymsp[-1].minor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; case 215: /* table_name_cond ::= table_name */ { yylhsminor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy421); } yymsp[0].minor.yy674 = yylhsminor.yy674; break; case 217: /* from_db_opt ::= FROM db_name */ { yymsp[-1].minor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy421); } break; case 218: /* cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */ { pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy621, &yymsp[-3].minor.yy421, &yymsp[-1].minor.yy421, NULL, yymsp[0].minor.yy674); } break; case 219: /* 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.yy621, &yymsp[-5].minor.yy421, &yymsp[-3].minor.yy421, yymsp[-1].minor.yy530, NULL); } break; case 220: /* cmd ::= DROP INDEX exists_opt index_name ON table_name */ { pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-3].minor.yy621, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy421); } break; case 222: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */ { yymsp[-8].minor.yy674 = createIndexOption(pCxt, yymsp[-6].minor.yy530, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), NULL, yymsp[0].minor.yy674); } break; case 223: /* 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.yy674 = createIndexOption(pCxt, yymsp[-8].minor.yy530, releaseRawExprNode(pCxt, yymsp[-4].minor.yy674), releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), yymsp[0].minor.yy674); } break; case 226: /* func ::= function_name NK_LP expression_list NK_RP */ { yylhsminor.yy674 = createFunctionNode(pCxt, &yymsp[-3].minor.yy421, yymsp[-1].minor.yy530); } yymsp[-3].minor.yy674 = yylhsminor.yy674; break; case 227: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */ { pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-3].minor.yy621, &yymsp[-2].minor.yy421, yymsp[0].minor.yy674, NULL, NULL); } break; case 228: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ { pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-4].minor.yy621, &yymsp[-3].minor.yy421, NULL, &yymsp[0].minor.yy421, NULL); } break; case 229: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ { pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-4].minor.yy621, &yymsp[-3].minor.yy421, NULL, NULL, yymsp[0].minor.yy674); } break; case 230: /* cmd ::= DROP TOPIC exists_opt topic_name */ { pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy621, &yymsp[0].minor.yy421); } break; case 231: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ { pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy621, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy421); } break; case 232: /* cmd ::= DESC full_table_name */ case 233: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==233); { pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy674); } break; case 234: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } break; case 235: /* cmd ::= EXPLAIN analyze_opt explain_options query_expression */ { pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy621, yymsp[-1].minor.yy674, yymsp[0].minor.yy674); } break; case 237: /* analyze_opt ::= ANALYZE */ case 245: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==245); case 396: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==396); { yymsp[0].minor.yy621 = true; } break; case 238: /* explain_options ::= */ { yymsp[1].minor.yy674 = createDefaultExplainOptions(pCxt); } break; case 239: /* explain_options ::= explain_options VERBOSE NK_BOOL */ { yylhsminor.yy674 = setExplainVerbose(pCxt, yymsp[-2].minor.yy674, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 240: /* explain_options ::= explain_options RATIO NK_FLOAT */ { yylhsminor.yy674 = setExplainRatio(pCxt, yymsp[-2].minor.yy674, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 241: /* cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */ { pCxt->pRootNode = createCompactStmt(pCxt, yymsp[-1].minor.yy530); } break; case 242: /* cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ { pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy621, yymsp[-8].minor.yy621, &yymsp[-5].minor.yy421, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy690, yymsp[0].minor.yy42); } break; case 243: /* cmd ::= DROP FUNCTION exists_opt function_name */ { pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy621, &yymsp[0].minor.yy421); } break; case 246: /* bufsize_opt ::= */ { yymsp[1].minor.yy42 = 0; } break; case 247: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ { yymsp[-1].minor.yy42 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } break; case 248: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ { pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-5].minor.yy621, &yymsp[-4].minor.yy421, yymsp[-2].minor.yy674, yymsp[-3].minor.yy674, yymsp[0].minor.yy674); } break; case 249: /* cmd ::= DROP STREAM exists_opt stream_name */ { pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy621, &yymsp[0].minor.yy421); } break; case 251: /* into_opt ::= INTO full_table_name */ case 377: /* from_clause ::= FROM table_reference_list */ yytestcase(yyruleno==377); case 407: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==407); case 430: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==430); { yymsp[-1].minor.yy674 = yymsp[0].minor.yy674; } break; case 252: /* stream_options ::= */ { yymsp[1].minor.yy674 = createStreamOptions(pCxt); } break; case 253: /* stream_options ::= stream_options TRIGGER AT_ONCE */ { ((SStreamOptions*)yymsp[-2].minor.yy674)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy674 = yymsp[-2].minor.yy674; } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 254: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ { ((SStreamOptions*)yymsp[-2].minor.yy674)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy674 = yymsp[-2].minor.yy674; } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 255: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ { ((SStreamOptions*)yymsp[-3].minor.yy674)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy674)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy674); yylhsminor.yy674 = yymsp[-3].minor.yy674; } yymsp[-3].minor.yy674 = yylhsminor.yy674; break; case 256: /* stream_options ::= stream_options WATERMARK duration_literal */ { ((SStreamOptions*)yymsp[-2].minor.yy674)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy674); yylhsminor.yy674 = yymsp[-2].minor.yy674; } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 257: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } break; case 258: /* cmd ::= KILL QUERY NK_STRING */ { pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); } break; case 259: /* cmd ::= KILL TRANSACTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); } break; case 260: /* cmd ::= BALANCE VGROUP */ { pCxt->pRootNode = createBalanceVgroupStmt(pCxt); } break; case 261: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; case 262: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ { pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy530); } break; case 263: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; case 264: /* dnode_list ::= DNODE NK_INTEGER */ { yymsp[-1].minor.yy530 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; case 266: /* cmd ::= SYNCDB db_name REPLICA */ { pCxt->pRootNode = createSyncdbStmt(pCxt, &yymsp[-1].minor.yy421); } break; case 267: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ { pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy674, yymsp[0].minor.yy674); } break; case 269: /* literal ::= NK_INTEGER */ { yylhsminor.yy674 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy674 = yylhsminor.yy674; break; case 270: /* literal ::= NK_FLOAT */ { yylhsminor.yy674 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy674 = yylhsminor.yy674; break; case 271: /* literal ::= NK_STRING */ { yylhsminor.yy674 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy674 = yylhsminor.yy674; break; case 272: /* literal ::= NK_BOOL */ { yylhsminor.yy674 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy674 = yylhsminor.yy674; break; case 273: /* literal ::= TIMESTAMP NK_STRING */ { yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } yymsp[-1].minor.yy674 = yylhsminor.yy674; break; case 274: /* literal ::= duration_literal */ case 284: /* signed_literal ::= signed */ yytestcase(yyruleno==284); case 304: /* expression ::= literal */ yytestcase(yyruleno==304); case 305: /* expression ::= pseudo_column */ yytestcase(yyruleno==305); case 306: /* expression ::= column_reference */ yytestcase(yyruleno==306); case 307: /* expression ::= function_expression */ yytestcase(yyruleno==307); case 308: /* expression ::= subquery */ yytestcase(yyruleno==308); case 333: /* function_expression ::= literal_func */ yytestcase(yyruleno==333); case 369: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==369); case 373: /* boolean_primary ::= predicate */ yytestcase(yyruleno==373); case 375: /* common_expression ::= expression */ yytestcase(yyruleno==375); case 376: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==376); case 378: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==378); case 380: /* table_reference ::= table_primary */ yytestcase(yyruleno==380); case 381: /* table_reference ::= joined_table */ yytestcase(yyruleno==381); case 385: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==385); case 432: /* query_expression_body ::= query_primary */ yytestcase(yyruleno==432); case 435: /* query_primary ::= query_specification */ yytestcase(yyruleno==435); { yylhsminor.yy674 = yymsp[0].minor.yy674; } yymsp[0].minor.yy674 = yylhsminor.yy674; break; case 275: /* literal ::= NULL */ { yylhsminor.yy674 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy674 = yylhsminor.yy674; break; case 276: /* literal ::= NK_QUESTION */ { yylhsminor.yy674 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy674 = yylhsminor.yy674; break; case 277: /* duration_literal ::= NK_VARIABLE */ { yylhsminor.yy674 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy674 = yylhsminor.yy674; break; case 278: /* signed ::= NK_INTEGER */ { yylhsminor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } yymsp[0].minor.yy674 = yylhsminor.yy674; break; case 279: /* signed ::= NK_PLUS NK_INTEGER */ { yymsp[-1].minor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); } break; case 280: /* 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.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } yymsp[-1].minor.yy674 = yylhsminor.yy674; break; case 281: /* signed ::= NK_FLOAT */ { yylhsminor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } yymsp[0].minor.yy674 = yylhsminor.yy674; break; case 282: /* signed ::= NK_PLUS NK_FLOAT */ { yymsp[-1].minor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; case 283: /* 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.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } yymsp[-1].minor.yy674 = yylhsminor.yy674; break; case 285: /* signed_literal ::= NK_STRING */ { yylhsminor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } yymsp[0].minor.yy674 = yylhsminor.yy674; break; case 286: /* signed_literal ::= NK_BOOL */ { yylhsminor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } yymsp[0].minor.yy674 = yylhsminor.yy674; break; case 287: /* signed_literal ::= TIMESTAMP NK_STRING */ { yymsp[-1].minor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; case 288: /* signed_literal ::= duration_literal */ case 290: /* signed_literal ::= literal_func */ yytestcase(yyruleno==290); case 347: /* star_func_para ::= expression */ yytestcase(yyruleno==347); case 402: /* select_item ::= common_expression */ yytestcase(yyruleno==402); case 448: /* search_condition ::= common_expression */ yytestcase(yyruleno==448); { yylhsminor.yy674 = releaseRawExprNode(pCxt, yymsp[0].minor.yy674); } yymsp[0].minor.yy674 = yylhsminor.yy674; break; case 289: /* signed_literal ::= NULL */ { yylhsminor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } yymsp[0].minor.yy674 = yylhsminor.yy674; break; case 309: /* expression ::= NK_LP expression NK_RP */ case 374: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==374); { yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy674)); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 310: /* expression ::= NK_PLUS expression */ { SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674); yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy674)); } yymsp[-1].minor.yy674 = yylhsminor.yy674; break; case 311: /* expression ::= NK_MINUS expression */ { SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674); yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy674), NULL)); } yymsp[-1].minor.yy674 = yylhsminor.yy674; break; case 312: /* expression ::= expression NK_PLUS expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674); yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 313: /* expression ::= expression NK_MINUS expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674); yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 314: /* expression ::= expression NK_STAR expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674); yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 315: /* expression ::= expression NK_SLASH expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674); yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 316: /* expression ::= expression NK_REM expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674); yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 317: /* expression ::= column_reference NK_ARROW NK_STRING */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674); yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 320: /* column_reference ::= column_name */ { yylhsminor.yy674 = createRawExprNode(pCxt, &yymsp[0].minor.yy421, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy421)); } yymsp[0].minor.yy674 = yylhsminor.yy674; break; case 321: /* column_reference ::= table_name NK_DOT column_name */ { yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy421, createColumnNode(pCxt, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy421)); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 322: /* pseudo_column ::= ROWTS */ case 323: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==323); case 325: /* pseudo_column ::= QSTARTTS */ yytestcase(yyruleno==325); case 326: /* pseudo_column ::= QENDTS */ yytestcase(yyruleno==326); case 327: /* pseudo_column ::= WSTARTTS */ yytestcase(yyruleno==327); case 328: /* pseudo_column ::= WENDTS */ yytestcase(yyruleno==328); case 329: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==329); case 335: /* literal_func ::= NOW */ yytestcase(yyruleno==335); { yylhsminor.yy674 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } yymsp[0].minor.yy674 = yylhsminor.yy674; break; case 324: /* pseudo_column ::= table_name NK_DOT TBNAME */ { yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy421)))); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 330: /* function_expression ::= function_name NK_LP expression_list NK_RP */ case 331: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==331); { yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy421, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy421, yymsp[-1].minor.yy530)); } yymsp[-3].minor.yy674 = yylhsminor.yy674; break; case 332: /* function_expression ::= CAST NK_LP expression AS type_name NK_RP */ { yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy674), yymsp[-1].minor.yy690)); } yymsp[-5].minor.yy674 = yylhsminor.yy674; break; case 334: /* literal_func ::= noarg_func NK_LP NK_RP */ { yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy421, NULL)); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 343: /* star_func_para_list ::= NK_STAR */ { yylhsminor.yy530 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } yymsp[0].minor.yy530 = yylhsminor.yy530; break; case 348: /* star_func_para ::= table_name NK_DOT NK_STAR */ case 405: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==405); { yylhsminor.yy674 = createColumnNode(pCxt, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 349: /* predicate ::= expression compare_op expression */ case 354: /* predicate ::= expression in_op in_predicate_value */ yytestcase(yyruleno==354); { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674); yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy28, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 350: /* predicate ::= expression BETWEEN expression AND expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy674); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674); yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy674), releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); } yymsp[-4].minor.yy674 = yylhsminor.yy674; break; case 351: /* predicate ::= expression NOT BETWEEN expression AND expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy674); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674); yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy674), releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); } yymsp[-5].minor.yy674 = yylhsminor.yy674; break; case 352: /* predicate ::= expression IS NULL */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674); yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), NULL)); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 353: /* predicate ::= expression IS NOT NULL */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy674); yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy674), NULL)); } yymsp[-3].minor.yy674 = yylhsminor.yy674; break; case 355: /* compare_op ::= NK_LT */ { yymsp[0].minor.yy28 = OP_TYPE_LOWER_THAN; } break; case 356: /* compare_op ::= NK_GT */ { yymsp[0].minor.yy28 = OP_TYPE_GREATER_THAN; } break; case 357: /* compare_op ::= NK_LE */ { yymsp[0].minor.yy28 = OP_TYPE_LOWER_EQUAL; } break; case 358: /* compare_op ::= NK_GE */ { yymsp[0].minor.yy28 = OP_TYPE_GREATER_EQUAL; } break; case 359: /* compare_op ::= NK_NE */ { yymsp[0].minor.yy28 = OP_TYPE_NOT_EQUAL; } break; case 360: /* compare_op ::= NK_EQ */ { yymsp[0].minor.yy28 = OP_TYPE_EQUAL; } break; case 361: /* compare_op ::= LIKE */ { yymsp[0].minor.yy28 = OP_TYPE_LIKE; } break; case 362: /* compare_op ::= NOT LIKE */ { yymsp[-1].minor.yy28 = OP_TYPE_NOT_LIKE; } break; case 363: /* compare_op ::= MATCH */ { yymsp[0].minor.yy28 = OP_TYPE_MATCH; } break; case 364: /* compare_op ::= NMATCH */ { yymsp[0].minor.yy28 = OP_TYPE_NMATCH; } break; case 365: /* compare_op ::= CONTAINS */ { yymsp[0].minor.yy28 = OP_TYPE_JSON_CONTAINS; } break; case 366: /* in_op ::= IN */ { yymsp[0].minor.yy28 = OP_TYPE_IN; } break; case 367: /* in_op ::= NOT IN */ { yymsp[-1].minor.yy28 = OP_TYPE_NOT_IN; } break; case 368: /* in_predicate_value ::= NK_LP expression_list NK_RP */ { yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy530)); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 370: /* boolean_value_expression ::= NOT boolean_primary */ { SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674); yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy674), NULL)); } yymsp[-1].minor.yy674 = yylhsminor.yy674; break; case 371: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674); yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 372: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674); SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674); yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 379: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ { yylhsminor.yy674 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy674, yymsp[0].minor.yy674, NULL); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 382: /* table_primary ::= table_name alias_opt */ { yylhsminor.yy674 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy421, &yymsp[0].minor.yy421); } yymsp[-1].minor.yy674 = yylhsminor.yy674; break; case 383: /* table_primary ::= db_name NK_DOT table_name alias_opt */ { yylhsminor.yy674 = createRealTableNode(pCxt, &yymsp[-3].minor.yy421, &yymsp[-1].minor.yy421, &yymsp[0].minor.yy421); } yymsp[-3].minor.yy674 = yylhsminor.yy674; break; case 384: /* table_primary ::= subquery alias_opt */ { yylhsminor.yy674 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy674), &yymsp[0].minor.yy421); } yymsp[-1].minor.yy674 = yylhsminor.yy674; break; case 386: /* alias_opt ::= */ { yymsp[1].minor.yy421 = nil_token; } break; case 387: /* alias_opt ::= table_alias */ { yylhsminor.yy421 = yymsp[0].minor.yy421; } yymsp[0].minor.yy421 = yylhsminor.yy421; break; case 388: /* alias_opt ::= AS table_alias */ { yymsp[-1].minor.yy421 = yymsp[0].minor.yy421; } break; case 389: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ case 390: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==390); { yymsp[-2].minor.yy674 = yymsp[-1].minor.yy674; } break; case 391: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ { yylhsminor.yy674 = createJoinTableNode(pCxt, yymsp[-4].minor.yy636, yymsp[-5].minor.yy674, yymsp[-2].minor.yy674, yymsp[0].minor.yy674); } yymsp[-5].minor.yy674 = yylhsminor.yy674; break; case 392: /* join_type ::= */ { yymsp[1].minor.yy636 = JOIN_TYPE_INNER; } break; case 393: /* join_type ::= INNER */ { yymsp[0].minor.yy636 = JOIN_TYPE_INNER; } break; case 394: /* 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.yy674 = createSelectStmt(pCxt, yymsp[-7].minor.yy621, yymsp[-6].minor.yy530, yymsp[-5].minor.yy674); yymsp[-8].minor.yy674 = addWhereClause(pCxt, yymsp[-8].minor.yy674, yymsp[-4].minor.yy674); yymsp[-8].minor.yy674 = addPartitionByClause(pCxt, yymsp[-8].minor.yy674, yymsp[-3].minor.yy530); yymsp[-8].minor.yy674 = addWindowClauseClause(pCxt, yymsp[-8].minor.yy674, yymsp[-2].minor.yy674); yymsp[-8].minor.yy674 = addGroupByClause(pCxt, yymsp[-8].minor.yy674, yymsp[-1].minor.yy530); yymsp[-8].minor.yy674 = addHavingClause(pCxt, yymsp[-8].minor.yy674, yymsp[0].minor.yy674); } break; case 397: /* set_quantifier_opt ::= ALL */ { yymsp[0].minor.yy621 = false; } break; case 398: /* select_list ::= NK_STAR */ { yymsp[0].minor.yy530 = NULL; } break; case 403: /* select_item ::= common_expression column_alias */ { yylhsminor.yy674 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy674), &yymsp[0].minor.yy421); } yymsp[-1].minor.yy674 = yylhsminor.yy674; break; case 404: /* select_item ::= common_expression AS column_alias */ { yylhsminor.yy674 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), &yymsp[0].minor.yy421); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 409: /* partition_by_clause_opt ::= PARTITION BY expression_list */ case 426: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==426); case 438: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==438); { yymsp[-2].minor.yy530 = yymsp[0].minor.yy530; } break; case 411: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ { yymsp[-5].minor.yy674 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy674), releaseRawExprNode(pCxt, yymsp[-1].minor.yy674)); } break; case 412: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ { yymsp[-3].minor.yy674 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy674)); } break; case 413: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ { yymsp[-5].minor.yy674 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy674), NULL, yymsp[-1].minor.yy674, yymsp[0].minor.yy674); } break; case 414: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ { yymsp[-7].minor.yy674 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy674), releaseRawExprNode(pCxt, yymsp[-3].minor.yy674), yymsp[-1].minor.yy674, yymsp[0].minor.yy674); } break; case 416: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ { yymsp[-3].minor.yy674 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy674); } break; case 418: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ { yymsp[-3].minor.yy674 = createFillNode(pCxt, yymsp[-1].minor.yy320, NULL); } break; case 419: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ { yymsp[-5].minor.yy674 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy530)); } break; case 420: /* fill_mode ::= NONE */ { yymsp[0].minor.yy320 = FILL_MODE_NONE; } break; case 421: /* fill_mode ::= PREV */ { yymsp[0].minor.yy320 = FILL_MODE_PREV; } break; case 422: /* fill_mode ::= NULL */ { yymsp[0].minor.yy320 = FILL_MODE_NULL; } break; case 423: /* fill_mode ::= LINEAR */ { yymsp[0].minor.yy320 = FILL_MODE_LINEAR; } break; case 424: /* fill_mode ::= NEXT */ { yymsp[0].minor.yy320 = FILL_MODE_NEXT; } break; case 427: /* group_by_list ::= expression */ { yylhsminor.yy530 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); } yymsp[0].minor.yy530 = yylhsminor.yy530; break; case 428: /* group_by_list ::= group_by_list NK_COMMA expression */ { yylhsminor.yy530 = addNodeToList(pCxt, yymsp[-2].minor.yy530, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); } yymsp[-2].minor.yy530 = yylhsminor.yy530; break; case 431: /* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ { yylhsminor.yy674 = addOrderByClause(pCxt, yymsp[-3].minor.yy674, yymsp[-2].minor.yy530); yylhsminor.yy674 = addSlimitClause(pCxt, yylhsminor.yy674, yymsp[-1].minor.yy674); yylhsminor.yy674 = addLimitClause(pCxt, yylhsminor.yy674, yymsp[0].minor.yy674); } yymsp[-3].minor.yy674 = yylhsminor.yy674; break; case 433: /* query_expression_body ::= query_expression_body UNION ALL query_expression_body */ { yylhsminor.yy674 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy674, yymsp[0].minor.yy674); } yymsp[-3].minor.yy674 = yylhsminor.yy674; break; case 434: /* query_expression_body ::= query_expression_body UNION query_expression_body */ { yylhsminor.yy674 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy674, yymsp[0].minor.yy674); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 436: /* query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ { yymsp[-5].minor.yy674 = yymsp[-4].minor.yy674; } yy_destructor(yypParser,351,&yymsp[-3].minor); yy_destructor(yypParser,352,&yymsp[-2].minor); yy_destructor(yypParser,353,&yymsp[-1].minor); break; case 440: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ case 444: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==444); { yymsp[-1].minor.yy674 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; case 441: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ case 445: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==445); { yymsp[-3].minor.yy674 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; case 442: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ case 446: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==446); { yymsp[-3].minor.yy674 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; case 447: /* subquery ::= NK_LP query_expression NK_RP */ { yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy674); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 451: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */ { yylhsminor.yy674 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), yymsp[-1].minor.yy610, yymsp[0].minor.yy107); } yymsp[-2].minor.yy674 = yylhsminor.yy674; break; case 452: /* ordering_specification_opt ::= */ { yymsp[1].minor.yy610 = ORDER_ASC; } break; case 453: /* ordering_specification_opt ::= ASC */ { yymsp[0].minor.yy610 = ORDER_ASC; } break; case 454: /* ordering_specification_opt ::= DESC */ { yymsp[0].minor.yy610 = ORDER_DESC; } break; case 455: /* null_ordering_opt ::= */ { yymsp[1].minor.yy107 = NULL_ORDER_DEFAULT; } break; case 456: /* null_ordering_opt ::= NULLS FIRST */ { yymsp[-1].minor.yy107 = NULL_ORDER_FIRST; } break; case 457: /* null_ordering_opt ::= NULLS LAST */ { yymsp[-1].minor.yy107 = 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 (TSDB_CODE_SUCCESS == pCxt->errCode) { if(TOKEN.z) { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR, TOKEN.z); } else { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INCOMPLETE_SQL); } } /************ 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; }