sql.c 284.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
/*
** 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:
*/
X
Xiaoyu Wang 已提交
25 26
#include <stdio.h>
#include <assert.h>
27
/************ Begin %include sections from the grammar ************************/
X
Xiaoyu Wang 已提交
28

29 30 31 32 33 34
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <stdbool.h>

D
dapan1121 已提交
35 36
#define ALLOW_FORBID_FUNC

37
#include "functionMgt.h"
38
#include "nodes.h"
X
Xiaoyu Wang 已提交
39
#include "parToken.h"
40
#include "ttokendef.h"
X
Xiaoyu Wang 已提交
41
#include "parAst.h"
D
dapan1121 已提交
42 43

#define YYSTACKDEPTH 0
44
/**************** End of %include directives **********************************/
X
Xiaoyu Wang 已提交
45 46 47 48 49
/* 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 ***************************/
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66

/* 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.
X
Xiaoyu Wang 已提交
67
**    ParseTOKENTYPE     is the data type used for minor type for terminal
68 69 70 71 72 73 74 75 76 77
**                       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
X
Xiaoyu Wang 已提交
78
**                       which is ParseTOKENTYPE.  The entry in the union
79 80
**                       for terminal symbols is called "yy0".
**    YYSTACKDEPTH       is the maximum depth of the parser's stack.  If
X
Xiaoyu Wang 已提交
81
**                       zero the stack is dynamically sized using realloc()
X
Xiaoyu Wang 已提交
82 83 84 85 86 87
**    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
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
**    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 *****************************************/
X
Xiaoyu Wang 已提交
106
#define YYCODETYPE unsigned short int
X
Xiaoyu Wang 已提交
107
#define YYNOCODE 459
108
#define YYACTIONTYPE unsigned short int
X
Xiaoyu Wang 已提交
109
#define ParseTOKENTYPE  SToken 
110 111
typedef union {
  int yyinit;
X
Xiaoyu Wang 已提交
112
  ParseTOKENTYPE yy0;
113
  EOperatorType yy20;
X
Xiaoyu Wang 已提交
114 115 116 117 118 119 120 121 122 123 124 125 126
  SNode* yy74;
  ENullOrder yy109;
  SToken yy317;
  EOrder yy326;
  bool yy335;
  int8_t yy449;
  int64_t yy531;
  EJoinType yy630;
  SAlterOption yy767;
  EFillMode yy828;
  int32_t yy856;
  SNodeList* yy874;
  SDataType yy898;
127 128 129 130
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 100
#endif
X
Xiaoyu Wang 已提交
131 132 133 134 135 136 137 138 139 140
#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
X
Xiaoyu Wang 已提交
141
#define YYFALLBACK 1
X
Xiaoyu Wang 已提交
142 143
#define YYNSTATE             714
#define YYNRULE              539
X
Xiaoyu Wang 已提交
144
#define YYNTOKEN             324
X
Xiaoyu Wang 已提交
145 146 147 148 149 150 151 152
#define YY_MAX_SHIFT         713
#define YY_MIN_SHIFTREDUCE   1055
#define YY_MAX_SHIFTREDUCE   1593
#define YY_ERROR_ACTION      1594
#define YY_ACCEPT_ACTION     1595
#define YY_NO_ACTION         1596
#define YY_MIN_REDUCE        1597
#define YY_MAX_REDUCE        2135
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218
/************* 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 **********************************************/
X
Xiaoyu Wang 已提交
219
#define YY_ACTTAB_COUNT (2968)
220
static const YYACTIONTYPE yy_action[] = {
X
Xiaoyu Wang 已提交
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517
 /*     0 */   460,  354,  461, 1633, 1739,  469, 1595,  461, 1633,  157,
 /*    10 */   542,   82,   45,   43, 1523, 1937,  169,  159, 1752, 1609,
 /*    20 */   362, 1401, 1374,   38,   37,  129, 1933,   44,   42,   41,
 /*    30 */    40,   39,  602, 1453, 1745, 1372, 1666,  334, 1850,  602,
 /*    40 */  1937,  367,   38,   37, 1796, 1798,   44,   42,   41,   40,
 /*    50 */    39, 1933,  407, 1846, 1929, 1935,  345,  583, 1448,   27,
 /*    60 */  1527,   31, 1728,   18,  183,  613, 1399,   38,   37,  377,
 /*    70 */  1380,   44,   42,   41,   40,   39,  171, 1950, 1803, 1929,
 /*    80 */  1935,  357,   64,   45,   43,  355, 1399, 1741,  133, 1790,
 /*    90 */   613,  362,  320, 1374, 1801,   14,  459,  327, 1933,  464,
 /*   100 */  1639,  514,  513,  512, 1453,  365, 1372,   48, 1968,  130,
 /*   110 */   508,  547,  466,  157,  507, 2106,  586,  710,  462,  506,
 /*   120 */   511, 1919, 1752,  619,  478,  505, 1929, 1935,  566, 1448,
 /*   130 */  2112,  175, 1455, 1456,   18, 2107,  572,  613, 1482,  468,
 /*   140 */   160, 1380,  464, 1639,  583, 1704, 1949,  174, 2045, 2046,
 /*   150 */  1984,  131, 2050,  102, 1951,  623, 1953, 1954,  618,  571,
 /*   160 */   613, 1429, 1438, 2106,  259,  172,   14, 2037,  514,  513,
 /*   170 */   512,  356, 2033,   60,  478,  133,  130,  508,  570,  175,
 /*   180 */  1375,  507, 1373, 2107,  572,  177,  506,  511,  710,  605,
 /*   190 */  1938, 2009,  505, 2063, 1483,  227,   44,   42,   41,   40,
 /*   200 */    39, 1933, 1088, 1455, 1456, 1378, 1379, 1430, 1428, 1431,
 /*   210 */  1432, 1433, 1434, 1435, 1436, 1437,  615,  611, 1446, 1447,
 /*   220 */  1449, 1450, 1451, 1452, 1454, 1457,    2, 1310, 1311, 1929,
 /*   230 */  1935, 1400, 1429, 1438,  257, 2045,  582,  368,  126,  581,
 /*   240 */   613, 1090, 2106, 1093, 1094,  157,   60, 1107, 1803, 1106,
 /*   250 */   339, 1375, 1550, 1373, 1752,   84,  322,  570,  175,  532,
 /*   260 */   443,  530, 2107,  572, 1802,   34,  360, 1477, 1478, 1479,
 /*   270 */  1480, 1481, 1485, 1486, 1487, 1488, 1378, 1379, 1108, 1428,
 /*   280 */  1431, 1432, 1433, 1434, 1435, 1436, 1437,  615,  611, 1446,
 /*   290 */  1447, 1449, 1450, 1451, 1452, 1454, 1457,    2, 2111,   11,
 /*   300 */    45,   43,  558, 1548, 1549, 1551, 1552,   11,  362,    9,
 /*   310 */  1374,  340,  602,  338,  337, 1401,  501,  583,  191,  190,
 /*   320 */   503, 1453,  178, 1372, 1214,  645,  644,  643, 1218,  642,
 /*   330 */  1220, 1221,  641, 1223,  638, 1598, 1229,  635, 1231, 1232,
 /*   340 */   632,  629,  502, 1257, 1258,  260, 1448,  235,  133,  187,
 /*   350 */  2111,   18,  228,  610, 2106,   99,  115,   11, 1380,  114,
 /*   360 */   113,  112,  111,  110,  109,  108,  107,  106,  169,  134,
 /*   370 */  2110,   45,   43, 1458, 2107, 2109,  607, 1742, 2009,  362,
 /*   380 */   401, 1374,   60,   14,   87,   79,   85,   48,   78,   60,
 /*   390 */  1851, 1583, 1453,  115, 1372,  178,  114,  113,  112,  111,
 /*   400 */   110,  109,  108,  107,  106,  710,  585,  173, 2045, 2046,
 /*   410 */    49,  131, 2050,  213,  590, 1351, 1352, 1448,  590, 2111,
 /*   420 */  1455, 1456,  547, 2106,  353,   82, 2106, 1861,  164, 1380,
 /*   430 */  1107, 1862, 1106,  561,  495,  491,  487,  483,  210, 2110,
 /*   440 */  1374, 2112,  175, 2107, 2108,  212, 2107,  572, 1746, 1429,
 /*   450 */  1438,  267,  268, 1372,   46, 1597,  266, 1399,  259,   38,
 /*   460 */    37, 1108, 1803,   44,   42,   41,   40,   39, 1375,  331,
 /*   470 */  1373, 1402, 1402,  400,   83,  399,  710,  208, 1801,  124,
 /*   480 */   123,  122,  121,  120,  119,  118,  117,  116, 1380, 2052,
 /*   490 */  1620, 1455, 1456, 1378, 1379, 1474, 1428, 1431, 1432, 1433,
 /*   500 */  1434, 1435, 1436, 1437,  615,  611, 1446, 1447, 1449, 1450,
 /*   510 */  1451, 1452, 1454, 1457,    2, 2049,  567,  562,  556, 1463,
 /*   520 */  1429, 1438,   38,   37, 1484, 1399,   44,   42,   41,   40,
 /*   530 */    39,  178,   60,  571, 1919,  710,  178, 2106,  178, 1375,
 /*   540 */   396, 1373, 1400, 1968,  207,  201, 1726,  206,   35,  276,
 /*   550 */   474,  565,  570,  175,  157,  589, 1399, 2107,  572,  178,
 /*   560 */  1950,  398,  394, 1753, 1378, 1379,  199, 1428, 1431, 1432,
 /*   570 */  1433, 1434, 1435, 1436, 1437,  615,  611, 1446, 1447, 1449,
 /*   580 */  1450, 1451, 1452, 1454, 1457,    2,   45,   43,  603,  603,
 /*   590 */   564, 1968, 1797, 1798,  362,   32, 1374,  547, 1375,  620,
 /*   600 */  1373, 2106,   54,  180, 1919, 1489,  619, 1453,  657, 1372,
 /*   610 */  1560,   41,   40,   39,  237,  184, 2112,  175, 1803, 1750,
 /*   620 */  1750, 2107,  572, 1378, 1379,  366,  375,  510,  509, 1949,
 /*   630 */  2110,  603, 1448, 1984, 1801,    8,  102, 1951,  623, 1953,
 /*   640 */  1954,  618, 1727,  613, 1380,  125,  136, 2052,  143, 2008,
 /*   650 */  2037, 1950,  499, 2052,  356, 2033,  374,   45,   43, 1402,
 /*   660 */   519,  528, 1750,  603, 1619,  362, 1430, 1374,  547,   46,
 /*   670 */    13,   12, 2106, 2048,  526,  529,  524,  125, 1453, 2047,
 /*   680 */  1372,  178, 1968,   93,  504, 1846, 1174, 2112,  175,  226,
 /*   690 */   586,  710, 2107,  572, 1750, 1919,  185,  619,  547,  681,
 /*   700 */   679, 1398, 2106, 1448,  522, 1743, 1455, 1456, 1919,  516,
 /*   710 */   135,  603,  648, 2008,  225, 1380, 1618, 2112,  175, 1617,
 /*   720 */  1949, 1176, 2107,  572, 1984,  405, 1846,  102, 1951,  623,
 /*   730 */  1953, 1954,  618,  603,  613, 1429, 1438,  189,  657,  172,
 /*   740 */    14, 2037, 1750,  603,  603,  356, 2033,  406,  229,  655,
 /*   750 */    66, 1780,  649,   65, 1375, 1794, 1373,  415,  429,  503,
 /*   760 */  1919, 1616,  710, 1919, 1750, 1496, 1640, 2064,  148,  147,
 /*   770 */   652,  651,  650,  145, 1750, 1750, 1380, 1455, 1456, 1378,
 /*   780 */  1379,  502, 1428, 1431, 1432, 1433, 1434, 1435, 1436, 1437,
 /*   790 */   615,  611, 1446, 1447, 1449, 1450, 1451, 1452, 1454, 1457,
 /*   800 */     2,  319,  236, 1397,  603, 1919, 1429, 1438, 1615,  653,
 /*   810 */   437,  654, 1794,  450, 1794,  705,  449,  290,  430,  669,
 /*   820 */  1780,  670,   50, 1720,    3, 1375, 1663, 1373, 1614, 1613,
 /*   830 */  1612,  421,  146,  451,   33, 1750,  423, 1093, 1094, 1516,
 /*   840 */    38,   37, 1725, 1833,   44,   42,   41,   40,   39, 1399,
 /*   850 */  1378, 1379, 1919, 1428, 1431, 1432, 1433, 1434, 1435, 1436,
 /*   860 */  1437,  615,  611, 1446, 1447, 1449, 1450, 1451, 1452, 1454,
 /*   870 */  1457,    2, 1919, 1919, 1919,   38,   37,  335, 1735,   44,
 /*   880 */    42,   41,   40,   39,   53,  218, 2057, 1516,  216,  411,
 /*   890 */   574,  687,  686,  685,  684,  372, 1520,  683,  682,  137,
 /*   900 */   677,  676,  675,  674,  673,  672,  671,  150,  667,  666,
 /*   910 */   665,  371,  370,  662,  661,  660,  659,  658,  139,  447,
 /*   920 */   127, 1383,  442,  441,  440,  439,  436,  435,  434,  433,
 /*   930 */   432,  428,  427,  426,  425,  336,  418,  417,  416,   69,
 /*   940 */   413,  412,  333,  158,  578,  535,   38,   37,  296,  655,
 /*   950 */    44,   42,   41,   40,   39,  220,  222, 1950,  219,  221,
 /*   960 */  1611, 1608,  294,   68,  224, 1610,   67,  223,  148,  147,
 /*   970 */   652,  651,  650,  145, 1737,   38,   37, 1950,  603,   44,
 /*   980 */    42,   41,   40,   39,  195,  456,  454,  547, 1968,   77,
 /*   990 */  1430, 2106,  476,  583,  424,  575,  620, 1607, 1606, 1605,
 /*  1000 */    98, 1919,  408,  619, 1919, 1919, 2112,  175, 1968, 1750,
 /*  1010 */    95, 2107,  572,  603,   52,  409,  620,  603,  603,  546,
 /*  1020 */    60, 1919, 1604,  619,  133, 1906, 1949,  477,   62,  241,
 /*  1030 */  1984, 1747,  141,  102, 1951,  623, 1953, 1954,  618, 1590,
 /*  1040 */   613, 1919, 1919, 1919, 1750, 2126, 1949, 2037, 1750, 1750,
 /*  1050 */  1984,  356, 2033,  102, 1951,  623, 1953, 1954,  618,  101,
 /*  1060 */   613, 1382, 2071, 1539,  603, 2126, 1919, 2037, 1386, 1950,
 /*  1070 */   655,  356, 2033,  384, 1603, 1592, 1593, 1602,  543, 1733,
 /*  1080 */  1547,  243, 2084,  176, 2045, 2046,  232,  131, 2050,  148,
 /*  1090 */   147,  652,  651,  650,  145, 1750,  614,   76,   75,  404,
 /*  1100 */  1968,  156,  182,  603,  647,  603, 1705, 2077,  620,  559,
 /*  1110 */   603, 1653, 1950, 1919,   47,  619, 1601,  587, 1919,  271,
 /*  1120 */   318, 1919,  254,  392,  598,  390,  386,  382,  379,  376,
 /*  1130 */   603,   13,   12,  515, 1750, 1589, 1750, 1519, 1949,  603,
 /*  1140 */   603, 1750, 1984, 1968,  600,  102, 1951,  623, 1953, 1954,
 /*  1150 */   618,  620,  613,  601,  277, 1950, 1919, 2126,  619, 2037,
 /*  1160 */  1919, 1750, 1646,  356, 2033, 1644, 1321,  579, 1600,  178,
 /*  1170 */  1750, 1750,   38,   37,  554,  264,   44,   42,   41,   40,
 /*  1180 */    39, 1949,  603,  211,  517, 1984, 1968,  520,  102, 1951,
 /*  1190 */   623, 1953, 1954,  618,  620,  613,  369,  248, 1940, 1919,
 /*  1200 */  2126,  619, 2037,  142,  144,  146,  356, 2033, 1385,  373,
 /*  1210 */    62,   47, 1919, 1750, 1634,   47,  576, 2100,  627,  359,
 /*  1220 */   358,  144, 1950,  146, 1949,  663,  128,  269, 1984, 1388,
 /*  1230 */   144,  102, 1951,  623, 1953, 1954,  618,  664,  613, 1136,
 /*  1240 */  1453, 1969, 1381, 2126, 1855, 2037, 1942, 1155, 1791,  356,
 /*  1250 */  2033, 2067,  584, 1968,  253,  595,  273, 1207,  256, 1153,
 /*  1260 */  2056,  620, 1490, 1439,    1, 1448, 1919,  289,  619,    4,
 /*  1270 */  1235,  378,  332, 1239, 1137, 1246, 1950, 1380, 1244,  383,
 /*  1280 */  1338,  188,  149,  284,  410, 1402,  414,  445, 1856,  419,
 /*  1290 */  1397, 1949,  431, 1848,  438, 1984,  444,  446,  102, 1951,
 /*  1300 */   623, 1953, 1954,  618,  452,  613,  192, 1968,  453,  455,
 /*  1310 */  2012,  457, 2037, 1403, 1405,  620,  356, 2033,  458,  467,
 /*  1320 */  1919,  470,  619,  198,  609,  471, 1404,  200,  472, 1406,
 /*  1330 */   473,  475,  203,  479,  205,   80, 1110,   81,  209,  496,
 /*  1340 */   497,  498,  321,  105, 1896, 1949,  500,  534, 1895, 1984,
 /*  1350 */   536,  538,  102, 1951,  623, 1953, 1954,  618, 1740,  613,
 /*  1360 */   230,  215, 1950, 1736, 2010,  217, 2037,  151,  152, 1738,
 /*  1370 */   356, 2033, 1734,  153,  154,  537,  285,  541,  233,  544,
 /*  1380 */  2068,    7,  560, 2083, 2082,  593,  569, 1389, 2059, 1384,
 /*  1390 */   551,  557,  249, 1968,  247,  346,  552,  550, 2078,  563,
 /*  1400 */   165,  620,  239,  250,  549,  251, 1919,  347,  619,  580,
 /*  1410 */   577,  242, 1392, 1394, 2129, 1516, 2105,  132, 1401,  255,
 /*  1420 */   252,  588,  261,  350,  611, 1446, 1447, 1449, 1450, 1451,
 /*  1430 */  1452, 1949, 2053,  286,  591, 1984, 1950,  592,  102, 1951,
 /*  1440 */   623, 1953, 1954,  618, 1867,  613, 1866, 1865,  287,  352,
 /*  1450 */   606,  596, 2037,  597,   90,  288,  356, 2033,   92, 1751,
 /*  1460 */    59, 2018,   94, 1795, 1721,  625,  706, 1968,  291,  707,
 /*  1470 */   709,   51,  300,  315,  280,  620,  323,  314,  304, 1950,
 /*  1480 */  1919,  324,  619,  295,  293, 1913, 1912,   73, 1911, 1910,
 /*  1490 */    74, 1907,  380, 1366,  381, 1367,  181,  385, 1905,  387,
 /*  1500 */   388,  389, 1904,  391, 1903, 1949,  393, 1902, 1901, 1984,
 /*  1510 */  1968,  397,  103, 1951,  623, 1953, 1954,  618,  620,  613,
 /*  1520 */  1341,  395, 1950, 1919, 1340,  619, 2037,  402,  403, 1876,
 /*  1530 */  2036, 2033, 1878, 1877, 1875, 1841, 1840, 1301, 1838,  138,
 /*  1540 */  1837, 1836, 1839, 1835, 1834, 1832, 1831, 1830, 1949,  420,
 /*  1550 */  1950,  186, 1984, 1968, 1829,  103, 1951,  623, 1953, 1954,
 /*  1560 */   618,  620,  613,  422, 1828, 1827, 1919, 1826,  619, 2037,
 /*  1570 */   140, 1813, 1812,  608, 2033, 1825, 1824, 1823, 1822, 1821,
 /*  1580 */  1820, 1968, 1819, 1818, 1817, 1816, 1815, 1814, 1811,  617,
 /*  1590 */  1810,  621, 1809, 1808, 1919, 1984,  619, 1807,  103, 1951,
 /*  1600 */   623, 1953, 1954,  618, 1806,  613, 1805,  448, 1804, 1182,
 /*  1610 */  1668, 1303, 2037,  193, 1667,  194,  326, 2033, 1665, 1949,
 /*  1620 */  1629, 1096,  713, 1984, 1628,  170,  312, 1951,  623, 1953,
 /*  1630 */  1954,  618,  616,  613,  604, 2002,  283,  196, 1950,   71,
 /*  1640 */  1095, 1939,  197,  463,   72,  465, 1891, 1885, 1874,  204,
 /*  1650 */   202,  168, 1873, 1858, 1729, 1129, 1664,  703,  699,  695,
 /*  1660 */   691,  281, 1662,  480,  481, 1660,  484,  485,  482, 1968,
 /*  1670 */  1658,  486,  488,  489,  490, 1656,  492,  620,  493,  494,
 /*  1680 */  1643, 1950, 1919, 1642,  619, 1625, 1731, 1730, 1250,  678,
 /*  1690 */  1251, 1165, 1173, 1172, 1171, 1170, 1654,  100, 1950, 1167,
 /*  1700 */   274,  341, 1166,   61, 1647,  680, 1164, 1949, 1645,  521,
 /*  1710 */   342, 1984, 1968,  518,  161, 1951,  623, 1953, 1954,  618,
 /*  1720 */   620,  613,  343,  214, 1624, 1919,  523,  619, 1623, 1968,
 /*  1730 */   525, 1622,  527,  599,  104, 1358, 1356,  620, 1355,   26,
 /*  1740 */   531, 1890, 1919, 1884,  619,  155, 1347,  539, 1872, 1870,
 /*  1750 */  1949,   19, 1950, 2111, 1984,  548, 2074,  162, 1951,  623,
 /*  1760 */  1953, 1954,  618,   16,  613,  555,  234, 1949, 1950, 1562,
 /*  1770 */   262, 1984,   55,  240,  103, 1951,  623, 1953, 1954,  618,
 /*  1780 */   540,  613,  545, 1968,   28,  344,  553, 1345, 2037,  231,
 /*  1790 */    58,  620,  238, 2034, 1546,  245, 1919,  163,  619, 1968,
 /*  1800 */   244,    5,    6,  246,   29, 1940,   30,  620, 1538,  573,
 /*  1810 */  2127,   86, 1919, 1582,  619, 1583,   20,   63,   21, 1513,
 /*  1820 */  1577, 1949, 1576,  348, 1581, 1984, 1580,  349,  161, 1951,
 /*  1830 */   623, 1953, 1954,  618, 1512,  613, 1871, 1949, 1950,   57,
 /*  1840 */   258, 1984, 1869,  166,  306, 1951,  623, 1953, 1954,  618,
 /*  1850 */  1868,  613,   22, 1857, 1950,  263, 1544,   56,  265,  270,
 /*  1860 */    17,   88,   89,   91,  275,   23,   95,   10,   12, 1968,
 /*  1870 */  2075, 1390,  594, 1475, 1987,  612, 1465,  620, 1464,  272,
 /*  1880 */   167,   36, 1919, 1421,  619, 1968, 1443,  179,  568,   15,
 /*  1890 */   351,  622,   24,  620, 1441, 1440, 1413, 1950, 1919,   25,
 /*  1900 */   619, 1236,  626,  364,  628, 1213, 1233, 1949,  624,  630,
 /*  1910 */   631, 1984, 1230,  633,  162, 1951,  623, 1953, 1954,  618,
 /*  1920 */   634,  613, 1224, 1949,  636,  637,  639, 1984, 1968,  640,
 /*  1930 */   313, 1951,  623, 1953, 1954,  618,  617,  613, 1228, 1222,
 /*  1940 */    96, 1919,  646,  619,  278, 1245, 1227, 1226, 1225,   97,
 /*  1950 */    70, 1241, 1127,  656, 1950, 1161, 1160, 1159, 1158, 1157,
 /*  1960 */  1156, 1154, 1152, 1151,  668, 1150, 1949, 2128, 1180, 1148,
 /*  1970 */  1984, 1147, 1145,  312, 1951,  623, 1953, 1954,  618,  279,
 /*  1980 */   613, 1146, 2003, 1144, 1143, 1968, 1142, 1177, 1175, 1139,
 /*  1990 */   361, 1138, 1135,  620, 1134, 1133, 1132, 1661, 1919,  688,
 /*  2000 */   619,  690, 1659,  692,  694, 1950,  689, 1657,  693,  696,
 /*  2010 */   698,  697, 1655,  700,  701,  702, 1641,  704, 1085, 1621,
 /*  2020 */   282,  708,  711, 1949,  712, 1376, 1950, 1984,  292, 1596,
 /*  2030 */   313, 1951,  623, 1953, 1954,  618, 1968,  613, 1596, 1596,
 /*  2040 */  1596,  363, 1596, 1596,  620, 1596, 1596, 1596, 1950, 1919,
 /*  2050 */  1596,  619, 1596, 1596, 1596, 1596, 1596, 1968, 1596, 1596,
 /*  2060 */  1596, 1596, 1596, 1596, 1596,  620, 1596, 1596, 1596, 1596,
 /*  2070 */  1919, 1596,  619, 1596, 1949, 1596, 1596, 1596, 1984, 1968,
 /*  2080 */  1596,  313, 1951,  623, 1953, 1954,  618,  620,  613, 1596,
 /*  2090 */  1596, 1596, 1919, 1596,  619,  533, 1596, 1596, 1596, 1984,
 /*  2100 */  1596, 1596,  308, 1951,  623, 1953, 1954,  618, 1596,  613,
 /*  2110 */  1596, 1950, 1596, 1596, 1596, 1596, 1596, 1949, 1596, 1596,
 /*  2120 */  1596, 1984, 1596, 1596,  297, 1951,  623, 1953, 1954,  618,
 /*  2130 */  1596,  613, 1596, 1596, 1596, 1950, 1596, 1596, 1596, 1596,
 /*  2140 */  1596, 1596, 1968, 1596, 1596, 1596, 1596, 1596, 1596, 1596,
 /*  2150 */   620, 1596, 1596, 1596, 1596, 1919, 1596,  619, 1596, 1596,
 /*  2160 */  1596, 1596, 1596, 1596, 1596, 1596, 1968, 1596, 1596, 1596,
 /*  2170 */  1596, 1596, 1596, 1596,  620, 1596, 1596, 1596, 1596, 1919,
 /*  2180 */  1949,  619, 1596, 1596, 1984, 1596, 1596,  298, 1951,  623,
 /*  2190 */  1953, 1954,  618, 1596,  613, 1596, 1596, 1950, 1596, 1596,
 /*  2200 */  1596, 1596, 1596, 1596, 1949, 1596, 1596, 1596, 1984, 1596,
 /*  2210 */  1596,  299, 1951,  623, 1953, 1954,  618, 1596,  613, 1596,
 /*  2220 */  1596, 1950, 1596, 1596, 1596, 1596, 1596, 1596, 1968, 1596,
 /*  2230 */  1596, 1596, 1596, 1596, 1596, 1596,  620, 1596, 1596, 1596,
 /*  2240 */  1596, 1919, 1596,  619, 1596, 1596, 1596, 1596, 1596, 1596,
 /*  2250 */  1596, 1596, 1968, 1596, 1596, 1596, 1596, 1596, 1596, 1596,
 /*  2260 */   620, 1596, 1596, 1596, 1950, 1919, 1949,  619, 1596, 1596,
 /*  2270 */  1984, 1596, 1596,  305, 1951,  623, 1953, 1954,  618, 1596,
 /*  2280 */   613, 1596, 1950, 1596, 1596, 1596, 1596, 1596, 1596, 1596,
 /*  2290 */  1949, 1596, 1596, 1596, 1984, 1968, 1596,  309, 1951,  623,
 /*  2300 */  1953, 1954,  618,  620,  613, 1596, 1596, 1596, 1919, 1596,
 /*  2310 */   619, 1596, 1596, 1968, 1596, 1596, 1596, 1596, 1596, 1596,
 /*  2320 */  1596,  620, 1596, 1596, 1596, 1596, 1919, 1596,  619, 1596,
 /*  2330 */  1596, 1596, 1596, 1949, 1596, 1596, 1596, 1984, 1596, 1596,
 /*  2340 */   301, 1951,  623, 1953, 1954,  618, 1596,  613, 1596, 1596,
 /*  2350 */  1596, 1949, 1596, 1596, 1950, 1984, 1596, 1596,  310, 1951,
 /*  2360 */   623, 1953, 1954,  618, 1596,  613, 1596, 1596, 1596, 1596,
 /*  2370 */  1596, 1596, 1950, 1596, 1596, 1596, 1596, 1596, 1596, 1596,
 /*  2380 */  1596, 1596, 1596, 1596, 1596, 1968, 1596, 1596, 1596, 1596,
 /*  2390 */  1596, 1596, 1596,  620, 1596, 1596, 1596, 1596, 1919, 1596,
 /*  2400 */   619, 1596, 1596, 1968, 1596, 1596, 1596, 1596, 1596, 1596,
 /*  2410 */  1596,  620, 1596, 1596, 1596, 1950, 1919, 1596,  619, 1596,
 /*  2420 */  1596, 1596, 1596, 1949, 1596, 1596, 1596, 1984, 1596, 1596,
 /*  2430 */   302, 1951,  623, 1953, 1954,  618, 1596,  613, 1596, 1950,
 /*  2440 */  1596, 1949, 1596, 1596, 1596, 1984, 1968, 1596,  311, 1951,
 /*  2450 */   623, 1953, 1954,  618,  620,  613, 1596, 1596, 1596, 1919,
 /*  2460 */  1596,  619, 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596,
 /*  2470 */  1968, 1596, 1596, 1596, 1596, 1596, 1596, 1596,  620, 1596,
 /*  2480 */  1596, 1596, 1596, 1919, 1949,  619, 1596, 1596, 1984, 1596,
 /*  2490 */  1596,  303, 1951,  623, 1953, 1954,  618, 1596,  613, 1596,
 /*  2500 */  1596, 1596, 1950, 1596, 1596, 1596, 1596, 1596, 1949, 1596,
 /*  2510 */  1596, 1596, 1984, 1596, 1596,  316, 1951,  623, 1953, 1954,
 /*  2520 */   618, 1596,  613, 1596, 1596, 1596, 1596, 1596, 1596, 1596,
 /*  2530 */  1596, 1596, 1596, 1968, 1596, 1596, 1596, 1596, 1596, 1596,
 /*  2540 */  1596,  620, 1596, 1596, 1596, 1596, 1919, 1596,  619, 1596,
 /*  2550 */  1596, 1596, 1596, 1596, 1596, 1596, 1950, 1596, 1596, 1596,
 /*  2560 */  1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596,
 /*  2570 */  1596, 1949, 1596, 1596, 1596, 1984, 1596, 1596,  317, 1951,
 /*  2580 */   623, 1953, 1954,  618, 1596,  613, 1596, 1968, 1596, 1596,
 /*  2590 */  1596, 1596, 1596, 1596, 1596,  620, 1596, 1596, 1596, 1596,
 /*  2600 */  1919, 1596,  619, 1596, 1596, 1596, 1596, 1596, 1596, 1596,
 /*  2610 */  1950, 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596,
 /*  2620 */  1596, 1596, 1596, 1596, 1596, 1949, 1950, 1596, 1596, 1984,
 /*  2630 */  1596, 1596, 1962, 1951,  623, 1953, 1954,  618, 1596,  613,
 /*  2640 */  1596, 1968, 1596, 1596, 1596, 1596, 1596, 1596, 1596,  620,
 /*  2650 */  1596, 1596, 1596, 1596, 1919, 1596,  619, 1968, 1596, 1596,
 /*  2660 */  1596, 1596, 1596, 1596, 1596,  620, 1596, 1596, 1596, 1950,
 /*  2670 */  1919, 1596,  619, 1596, 1596, 1596, 1596, 1596, 1596, 1949,
 /*  2680 */  1596, 1596, 1596, 1984, 1596, 1596, 1961, 1951,  623, 1953,
 /*  2690 */  1954,  618, 1596,  613, 1596, 1949, 1596, 1596, 1596, 1984,
 /*  2700 */  1968, 1596, 1960, 1951,  623, 1953, 1954,  618,  620,  613,
 /*  2710 */  1596, 1596, 1596, 1919, 1596,  619, 1596, 1596, 1596, 1596,
 /*  2720 */  1596, 1596, 1596, 1596, 1596, 1596, 1950, 1596, 1596, 1596,
 /*  2730 */  1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1949, 1596,
 /*  2740 */  1596, 1596, 1984, 1950, 1596,  328, 1951,  623, 1953, 1954,
 /*  2750 */   618, 1596,  613, 1596, 1596, 1596, 1596, 1968, 1596, 1596,
 /*  2760 */  1596, 1596, 1596, 1596, 1596,  620, 1596, 1596, 1596, 1950,
 /*  2770 */  1919, 1596,  619, 1596, 1968, 1596, 1596, 1596, 1596, 1596,
 /*  2780 */  1596, 1596,  620, 1596, 1596, 1596, 1596, 1919, 1596,  619,
 /*  2790 */  1596, 1596, 1596, 1596, 1596, 1949, 1596, 1596, 1596, 1984,
 /*  2800 */  1968, 1596,  329, 1951,  623, 1953, 1954,  618,  620,  613,
 /*  2810 */  1596, 1596, 1949, 1919, 1596,  619, 1984, 1596, 1596,  325,
 /*  2820 */  1951,  623, 1953, 1954,  618, 1596,  613, 1596, 1596, 1596,
 /*  2830 */  1950, 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1949, 1596,
 /*  2840 */  1596, 1596, 1984, 1596, 1596,  330, 1951,  623, 1953, 1954,
 /*  2850 */   618, 1596,  613, 1596, 1596, 1596, 1596, 1596, 1596, 1596,
 /*  2860 */  1596, 1968, 1596, 1596, 1596, 1596, 1596, 1596, 1596,  620,
 /*  2870 */  1596, 1596, 1596, 1596, 1919, 1596,  619, 1596, 1596, 1596,
 /*  2880 */  1596, 1596, 1596, 1596, 1950, 1596, 1596, 1596, 1596, 1596,
 /*  2890 */  1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596,  621,
 /*  2900 */  1596, 1596, 1596, 1984, 1596, 1596,  308, 1951,  623, 1953,
 /*  2910 */  1954,  618, 1596,  613, 1596, 1968, 1596, 1596, 1596, 1596,
 /*  2920 */  1596, 1596, 1596,  620, 1596, 1596, 1596, 1596, 1919, 1596,
 /*  2930 */   619, 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596,
 /*  2940 */  1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596, 1596,
 /*  2950 */  1596, 1596, 1596, 1949, 1596, 1596, 1596, 1984, 1596, 1596,
 /*  2960 */   307, 1951,  623, 1953, 1954,  618, 1596,  613,
518 519
};
static const YYCODETYPE yy_lookahead[] = {
X
Xiaoyu Wang 已提交
520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540
 /*     0 */   331,  350,  333,  334,  359,  331,  324,  333,  334,  358,
 /*    10 */   391,  341,   12,   13,   14,  360,  358,  326,  367,  328,
 /*    20 */    20,   20,   22,    8,    9,  355,  371,   12,   13,   14,
 /*    30 */    15,   16,   20,   33,  364,   35,    0,  379,  380,   20,
 /*    40 */   360,  369,    8,    9,  372,  373,   12,   13,   14,   15,
 /*    50 */    16,  371,  335,  366,  399,  400,  401,  335,   58,   44,
 /*    60 */    14,    2,    0,   63,  377,  410,   20,    8,    9,  387,
 /*    70 */    70,   12,   13,   14,   15,   16,  357,  327,  358,  399,
 /*    80 */   400,  401,    4,   12,   13,  365,   20,  360,  366,  370,
 /*    90 */   410,   20,  375,   22,  374,   95,  332,   63,  371,  335,
 /*   100 */   336,   65,   66,   67,   33,  350,   35,   95,  358,   73,
 /*   110 */    74,  429,   14,  358,   78,  433,  366,  117,   20,   83,
 /*   120 */    84,  371,  367,  373,   62,   89,  399,  400,   20,   58,
 /*   130 */   448,  449,  132,  133,   63,  453,  454,  410,  104,  332,
 /*   140 */   342,   70,  335,  336,  335,  347,  396,  425,  426,  427,
 /*   150 */   400,  429,  430,  403,  404,  405,  406,  407,  408,  429,
 /*   160 */   410,  161,  162,  433,  163,  415,   95,  417,   65,   66,
 /*   170 */    67,  421,  422,   95,   62,  366,   73,   74,  448,  449,
 /*   180 */   180,   78,  182,  453,  454,  435,   83,   84,  117,  414,
 /*   190 */   360,  416,   89,  443,  160,  127,   12,   13,   14,   15,
 /*   200 */    16,  371,    4,  132,  133,  205,  206,  161,  208,  209,
X
Xiaoyu Wang 已提交
541
 /*   210 */   210,  211,  212,  213,  214,  215,  216,  217,  218,  219,
X
Xiaoyu Wang 已提交
542 543 544 545 546 547
 /*   220 */   220,  221,  222,  223,  224,  225,  226,  161,  162,  399,
 /*   230 */   400,   20,  161,  162,  425,  426,  427,  350,  429,  430,
 /*   240 */   410,   43,  433,   45,   46,  358,   95,   20,  358,   22,
 /*   250 */    37,  180,  205,  182,  367,  187,  188,  448,  449,  191,
 /*   260 */    79,  193,  453,  454,  374,  231,  232,  233,  234,  235,
 /*   270 */   236,  237,  238,  239,  240,  241,  205,  206,   51,  208,
548
 /*   280 */   209,  210,  211,  212,  213,  214,  215,  216,  217,  218,
X
Xiaoyu Wang 已提交
549 550 551 552
 /*   290 */   219,  220,  221,  222,  223,  224,  225,  226,    3,  228,
 /*   300 */    12,   13,  255,  256,  257,  258,  259,  228,   20,  230,
 /*   310 */    22,   98,   20,  100,  101,   20,  103,  335,  137,  138,
 /*   320 */   107,   33,  244,   35,  108,  109,  110,  111,  112,  113,
553
 /*   330 */   114,  115,  116,  117,  118,    0,  120,  121,  122,  123,
X
Xiaoyu Wang 已提交
554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569
 /*   340 */   124,  125,  129,  132,  133,   58,   58,   58,  366,   58,
 /*   350 */   429,   63,  126,   63,  433,  339,   21,  228,   70,   24,
 /*   360 */    25,   26,   27,   28,   29,   30,   31,   32,  358,  353,
 /*   370 */   449,   12,   13,   14,  453,  454,  414,  361,  416,   20,
 /*   380 */   387,   22,   95,   95,   97,   94,   97,   95,   97,   95,
 /*   390 */   380,   96,   33,   21,   35,  244,   24,   25,   26,   27,
 /*   400 */    28,   29,   30,   31,   32,  117,  424,  425,  426,  427,
 /*   410 */    95,  429,  430,   33,  373,  189,  190,   58,  373,  429,
 /*   420 */   132,  133,  429,  433,  383,  341,  433,  386,   48,   70,
 /*   430 */    20,  386,   22,  166,   54,   55,   56,   57,   58,  449,
 /*   440 */    22,  448,  449,  453,  454,   35,  453,  454,  364,  161,
 /*   450 */   162,  126,  127,   35,   95,    0,  131,   20,  163,    8,
 /*   460 */     9,   51,  358,   12,   13,   14,   15,   16,  180,  365,
 /*   470 */   182,   20,   20,  179,   94,  181,  117,   97,  374,   24,
 /*   480 */    25,   26,   27,   28,   29,   30,   31,   32,   70,  402,
 /*   490 */   327,  132,  133,  205,  206,  205,  208,  209,  210,  211,
570
 /*   500 */   212,  213,  214,  215,  216,  217,  218,  219,  220,  221,
X
Xiaoyu Wang 已提交
571 572 573 574 575 576
 /*   510 */   222,  223,  224,  225,  226,  428,  249,  250,  251,   14,
 /*   520 */   161,  162,    8,    9,  160,   20,   12,   13,   14,   15,
 /*   530 */    16,  244,   95,  429,  371,  117,  244,  433,  244,  180,
 /*   540 */   175,  182,   20,  358,  164,  165,    0,  167,  418,  419,
 /*   550 */   170,  366,  448,  449,  358,  387,   20,  453,  454,  244,
 /*   560 */   327,  196,  197,  367,  205,  206,  186,  208,  209,  210,
577
 /*   570 */   211,  212,  213,  214,  215,  216,  217,  218,  219,  220,
X
Xiaoyu Wang 已提交
578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598
 /*   580 */   221,  222,  223,  224,  225,  226,   12,   13,  335,  335,
 /*   590 */   405,  358,  372,  373,   20,  231,   22,  429,  180,  366,
 /*   600 */   182,  433,  349,  349,  371,  241,  373,   33,   62,   35,
 /*   610 */    96,   14,   15,   16,  163,  163,  448,  449,  358,  366,
 /*   620 */   366,  453,  454,  205,  206,  365,  387,  344,  345,  396,
 /*   630 */     3,  335,   58,  400,  374,   39,  403,  404,  405,  406,
 /*   640 */   407,  408,    0,  410,   70,  349,  413,  402,  415,  416,
 /*   650 */   417,  327,  356,  402,  421,  422,  387,   12,   13,   20,
 /*   660 */     4,   21,  366,  335,  327,   20,  161,   22,  429,   95,
 /*   670 */     1,    2,  433,  428,   34,   19,   36,  349,   33,  428,
 /*   680 */    35,  244,  358,  339,  356,  366,   35,  448,  449,   33,
 /*   690 */   366,  117,  453,  454,  366,  371,  377,  373,  429,  344,
 /*   700 */   345,   20,  433,   58,   48,  361,  132,  133,  371,   53,
 /*   710 */   413,  335,  106,  416,   58,   70,  327,  448,  449,  327,
 /*   720 */   396,   70,  453,  454,  400,  349,  366,  403,  404,  405,
 /*   730 */   406,  407,  408,  335,  410,  161,  162,  377,   62,  415,
 /*   740 */    95,  417,  366,  335,  335,  421,  422,  349,  351,  107,
 /*   750 */    94,  354,  368,   97,  180,  371,  182,  349,  349,  107,
 /*   760 */   371,  327,  117,  371,  366,   96,    0,  443,  126,  127,
 /*   770 */   128,  129,  130,  131,  366,  366,   70,  132,  133,  205,
 /*   780 */   206,  129,  208,  209,  210,  211,  212,  213,  214,  215,
599
 /*   790 */   216,  217,  218,  219,  220,  221,  222,  223,  224,  225,
X
Xiaoyu Wang 已提交
600 601 602 603 604 605
 /*   800 */   226,   18,  163,   20,  335,  371,  161,  162,  327,  368,
 /*   810 */    27,  368,  371,   30,  371,   49,   33,  351,  349,   70,
 /*   820 */   354,  346,   42,  348,   44,  180,    0,  182,  327,  327,
 /*   830 */   327,   48,   44,   50,    2,  366,   53,   45,   46,  243,
 /*   840 */     8,    9,    0,    0,   12,   13,   14,   15,   16,   20,
 /*   850 */   205,  206,  371,  208,  209,  210,  211,  212,  213,  214,
606
 /*   860 */   215,  216,  217,  218,  219,  220,  221,  222,  223,  224,
X
Xiaoyu Wang 已提交
607 608 609
 /*   870 */   225,  226,  371,  371,  371,    8,    9,   94,  359,   12,
 /*   880 */    13,   14,   15,   16,   96,   99,  242,  243,  102,  106,
 /*   890 */   263,   65,   66,   67,   68,   69,    4,   71,   72,   73,
610
 /*   900 */    74,   75,   76,   77,   78,   79,   80,   81,   82,   83,
X
Xiaoyu Wang 已提交
611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773
 /*   910 */    84,   85,   86,   87,   88,   89,   90,   91,   42,  136,
 /*   920 */    44,   35,  139,  140,  141,  142,  143,  144,  145,  146,
 /*   930 */   147,  148,  149,  150,  151,  152,  153,  154,  155,  106,
 /*   940 */   157,  158,  159,   18,   44,  387,    8,    9,   23,  107,
 /*   950 */    12,   13,   14,   15,   16,   99,   99,  327,  102,  102,
 /*   960 */   327,  327,   37,   38,   99,  328,   41,  102,  126,  127,
 /*   970 */   128,  129,  130,  131,  359,    8,    9,  327,  335,   12,
 /*   980 */    13,   14,   15,   16,   59,   60,   61,  429,  358,  156,
 /*   990 */   161,  433,  349,  335,  151,   44,  366,  327,  327,  327,
 /*  1000 */    95,  371,   22,  373,  371,  371,  448,  449,  358,  366,
 /*  1010 */   105,  453,  454,  335,  163,   35,  366,  335,  335,  168,
 /*  1020 */    95,  371,  327,  373,  366,    0,  396,  349,   44,   44,
 /*  1030 */   400,  349,  349,  403,  404,  405,  406,  407,  408,  172,
 /*  1040 */   410,  371,  371,  371,  366,  415,  396,  417,  366,  366,
 /*  1050 */   400,  421,  422,  403,  404,  405,  406,  407,  408,  134,
 /*  1060 */   410,   35,  432,   96,  335,  415,  371,  417,  182,  327,
 /*  1070 */   107,  421,  422,   48,  327,  132,  133,  327,  349,  359,
 /*  1080 */    96,   96,  432,  425,  426,  427,  359,  429,  430,  126,
 /*  1090 */   127,  128,  129,  130,  131,  366,  359,  172,  173,  174,
 /*  1100 */   358,  163,  177,  335,  359,  335,  347,  381,  366,  446,
 /*  1110 */   335,    0,  327,  371,   44,  373,  327,  349,  371,  349,
 /*  1120 */   195,  371,  457,  198,  349,  200,  201,  202,  203,  204,
 /*  1130 */   335,    1,    2,   22,  366,  268,  366,  245,  396,  335,
 /*  1140 */   335,  366,  400,  358,  349,  403,  404,  405,  406,  407,
 /*  1150 */   408,  366,  410,  349,  349,  327,  371,  415,  373,  417,
 /*  1160 */   371,  366,    0,  421,  422,    0,   96,  267,  327,  244,
 /*  1170 */   366,  366,    8,    9,  432,   44,   12,   13,   14,   15,
 /*  1180 */    16,  396,  335,  337,   22,  400,  358,   22,  403,  404,
 /*  1190 */   405,  406,  407,  408,  366,  410,  349,  440,   47,  371,
 /*  1200 */   415,  373,  417,   44,   44,   44,  421,  422,  182,  337,
 /*  1210 */    44,   44,  371,  366,  334,   44,  265,  432,   44,   12,
 /*  1220 */    13,   44,  327,   44,  396,   13,   44,   96,  400,   22,
 /*  1230 */    44,  403,  404,  405,  406,  407,  408,   13,  410,   35,
 /*  1240 */    33,  358,   35,  415,  381,  417,   95,   35,  370,  421,
 /*  1250 */   422,  381,  431,  358,  423,   96,   96,   96,  450,   35,
 /*  1260 */   432,  366,   96,   96,  434,   58,  371,   96,  373,  246,
 /*  1270 */    96,  398,  397,   96,   70,   96,  327,   70,   96,   48,
 /*  1280 */   178,   42,   96,  389,  378,   20,  378,  160,  381,  376,
 /*  1290 */    20,  396,  335,  335,  378,  400,  376,  376,  403,  404,
 /*  1300 */   405,  406,  407,  408,   93,  410,  335,  358,  343,  335,
 /*  1310 */   415,  335,  417,   20,   20,  366,  421,  422,  329,  329,
 /*  1320 */   371,  393,  373,  341,  117,  373,   20,  341,  336,   20,
 /*  1330 */   388,  336,  341,  335,  341,  341,   52,  341,  341,  338,
 /*  1340 */   338,  329,  329,  335,  371,  396,  358,  194,  371,  400,
 /*  1350 */   395,  392,  403,  404,  405,  406,  407,  408,  358,  410,
 /*  1360 */   339,  358,  327,  358,  415,  358,  417,  358,  358,  358,
 /*  1370 */   421,  422,  358,  358,  358,  185,  393,  373,  339,  335,
 /*  1380 */   381,  260,  254,  439,  439,  253,  171,  180,  442,  182,
 /*  1390 */   371,  371,  438,  358,  441,  371,  262,  261,  381,  371,
 /*  1400 */   439,  366,  384,  437,  247,  436,  371,  269,  373,  266,
 /*  1410 */   264,  384,  205,  206,  458,  243,  452,  366,   20,  451,
 /*  1420 */   398,  335,  339,  336,  217,  218,  219,  220,  221,  222,
 /*  1430 */   223,  396,  402,  384,  371,  400,  327,  371,  403,  404,
 /*  1440 */   405,  406,  407,  408,  371,  410,  371,  371,  384,  371,
 /*  1450 */   415,  165,  417,  382,  339,  354,  421,  422,  339,  366,
 /*  1460 */    95,  420,   95,  371,  348,  362,   36,  358,  335,  330,
 /*  1470 */   329,  390,  352,  394,  339,  366,  385,  352,  352,  327,
 /*  1480 */   371,  385,  373,  325,  340,    0,    0,  187,    0,    0,
 /*  1490 */    42,    0,   35,   35,  199,   35,   35,  199,    0,   35,
 /*  1500 */    35,  199,    0,  199,    0,  396,   35,    0,    0,  400,
 /*  1510 */   358,   35,  403,  404,  405,  406,  407,  408,  366,  410,
 /*  1520 */   182,   22,  327,  371,  180,  373,  417,  176,  175,    0,
 /*  1530 */   421,  422,    0,    0,    0,    0,    0,   47,    0,   42,
 /*  1540 */     0,    0,    0,    0,    0,    0,    0,    0,  396,   35,
 /*  1550 */   327,  151,  400,  358,    0,  403,  404,  405,  406,  407,
 /*  1560 */   408,  366,  410,  151,    0,    0,  371,    0,  373,  417,
 /*  1570 */    42,    0,    0,  421,  422,    0,    0,    0,    0,    0,
 /*  1580 */     0,  358,    0,    0,    0,    0,    0,    0,    0,  366,
 /*  1590 */     0,  396,    0,    0,  371,  400,  373,    0,  403,  404,
 /*  1600 */   405,  406,  407,  408,    0,  410,    0,  135,    0,   35,
 /*  1610 */     0,   22,  417,   58,    0,   58,  421,  422,    0,  396,
 /*  1620 */     0,   14,   19,  400,    0,   44,  403,  404,  405,  406,
 /*  1630 */   407,  408,  409,  410,  411,  412,   33,   42,  327,   39,
 /*  1640 */    14,   47,   40,   47,   39,   47,    0,    0,    0,  171,
 /*  1650 */    39,   48,    0,    0,    0,   64,    0,   54,   55,   56,
 /*  1660 */    57,   58,    0,   35,   48,    0,   35,   48,   39,  358,
 /*  1670 */     0,   39,   35,   48,   39,    0,   35,  366,   48,   39,
 /*  1680 */     0,  327,  371,    0,  373,    0,    0,    0,   22,   44,
 /*  1690 */    35,   22,   35,   35,   35,   35,    0,   94,  327,   35,
 /*  1700 */    97,   22,   35,  104,    0,   44,   35,  396,    0,   35,
 /*  1710 */    22,  400,  358,   50,  403,  404,  405,  406,  407,  408,
 /*  1720 */   366,  410,   22,  102,    0,  371,   35,  373,    0,  358,
 /*  1730 */    35,    0,   22,  130,   20,   96,   35,  366,   35,   95,
 /*  1740 */   192,    0,  371,    0,  373,  183,   35,   22,    0,    0,
 /*  1750 */   396,   44,  327,    3,  400,  444,  445,  403,  404,  405,
 /*  1760 */   406,  407,  408,  248,  410,  252,  165,  396,  327,   96,
 /*  1770 */   167,  400,  163,   96,  403,  404,  405,  406,  407,  408,
 /*  1780 */   163,  410,  169,  358,   95,  163,  227,  184,  417,  186,
 /*  1790 */    44,  366,   95,  422,   96,   44,  371,   95,  373,  358,
 /*  1800 */    95,  168,  168,   47,   95,   47,   44,  366,   96,  455,
 /*  1810 */   456,   95,  371,   96,  373,   96,  248,    3,   44,   96,
 /*  1820 */    35,  396,   35,   35,   35,  400,   35,   35,  403,  404,
 /*  1830 */   405,  406,  407,  408,   96,  410,    0,  396,  327,   44,
 /*  1840 */    47,  400,    0,   47,  403,  404,  405,  406,  407,  408,
 /*  1850 */     0,  410,   95,    0,  327,   96,   96,  242,   95,   95,
 /*  1860 */   248,   95,   39,   95,   47,   44,  105,  229,    2,  358,
 /*  1870 */   445,   22,  166,  205,   95,   95,  227,  366,  227,  164,
 /*  1880 */    47,   95,  371,   22,  373,  358,   96,   47,  447,   95,
 /*  1890 */   363,  207,   95,  366,   96,   96,   96,  327,  371,   95,
 /*  1900 */   373,   96,   35,   35,   95,   22,   96,  396,  106,   35,
 /*  1910 */    95,  400,   96,   35,  403,  404,  405,  406,  407,  408,
 /*  1920 */    95,  410,   96,  396,   35,   95,   35,  400,  358,   95,
 /*  1930 */   403,  404,  405,  406,  407,  408,  366,  410,  119,   96,
 /*  1940 */    95,  371,  107,  373,   44,   35,  119,  119,  119,   95,
 /*  1950 */    95,   22,   64,   63,  327,   35,   35,   35,   35,   35,
 /*  1960 */    35,   35,   35,   35,   92,   35,  396,  456,   70,   35,
 /*  1970 */   400,   35,   22,  403,  404,  405,  406,  407,  408,   44,
 /*  1980 */   410,   35,  412,   35,   35,  358,   35,   70,   35,   35,
 /*  1990 */   363,   35,   35,  366,   35,   22,   35,    0,  371,   35,
 /*  2000 */   373,   39,    0,   35,   39,  327,   48,    0,   48,   35,
 /*  2010 */    39,   48,    0,   35,   48,   39,    0,   35,   35,    0,
 /*  2020 */    22,   21,   21,  396,   20,   22,  327,  400,   22,  459,
 /*  2030 */   403,  404,  405,  406,  407,  408,  358,  410,  459,  459,
 /*  2040 */   459,  363,  459,  459,  366,  459,  459,  459,  327,  371,
 /*  2050 */   459,  373,  459,  459,  459,  459,  459,  358,  459,  459,
 /*  2060 */   459,  459,  459,  459,  459,  366,  459,  459,  459,  459,
 /*  2070 */   371,  459,  373,  459,  396,  459,  459,  459,  400,  358,
 /*  2080 */   459,  403,  404,  405,  406,  407,  408,  366,  410,  459,
 /*  2090 */   459,  459,  371,  459,  373,  396,  459,  459,  459,  400,
 /*  2100 */   459,  459,  403,  404,  405,  406,  407,  408,  459,  410,
 /*  2110 */   459,  327,  459,  459,  459,  459,  459,  396,  459,  459,
 /*  2120 */   459,  400,  459,  459,  403,  404,  405,  406,  407,  408,
 /*  2130 */   459,  410,  459,  459,  459,  327,  459,  459,  459,  459,
 /*  2140 */   459,  459,  358,  459,  459,  459,  459,  459,  459,  459,
 /*  2150 */   366,  459,  459,  459,  459,  371,  459,  373,  459,  459,
 /*  2160 */   459,  459,  459,  459,  459,  459,  358,  459,  459,  459,
 /*  2170 */   459,  459,  459,  459,  366,  459,  459,  459,  459,  371,
 /*  2180 */   396,  373,  459,  459,  400,  459,  459,  403,  404,  405,
 /*  2190 */   406,  407,  408,  459,  410,  459,  459,  327,  459,  459,
 /*  2200 */   459,  459,  459,  459,  396,  459,  459,  459,  400,  459,
 /*  2210 */   459,  403,  404,  405,  406,  407,  408,  459,  410,  459,
 /*  2220 */   459,  327,  459,  459,  459,  459,  459,  459,  358,  459,
 /*  2230 */   459,  459,  459,  459,  459,  459,  366,  459,  459,  459,
 /*  2240 */   459,  371,  459,  373,  459,  459,  459,  459,  459,  459,
 /*  2250 */   459,  459,  358,  459,  459,  459,  459,  459,  459,  459,
 /*  2260 */   366,  459,  459,  459,  327,  371,  396,  373,  459,  459,
 /*  2270 */   400,  459,  459,  403,  404,  405,  406,  407,  408,  459,
 /*  2280 */   410,  459,  327,  459,  459,  459,  459,  459,  459,  459,
 /*  2290 */   396,  459,  459,  459,  400,  358,  459,  403,  404,  405,
 /*  2300 */   406,  407,  408,  366,  410,  459,  459,  459,  371,  459,
 /*  2310 */   373,  459,  459,  358,  459,  459,  459,  459,  459,  459,
 /*  2320 */   459,  366,  459,  459,  459,  459,  371,  459,  373,  459,
 /*  2330 */   459,  459,  459,  396,  459,  459,  459,  400,  459,  459,
 /*  2340 */   403,  404,  405,  406,  407,  408,  459,  410,  459,  459,
 /*  2350 */   459,  396,  459,  459,  327,  400,  459,  459,  403,  404,
 /*  2360 */   405,  406,  407,  408,  459,  410,  459,  459,  459,  459,
 /*  2370 */   459,  459,  327,  459,  459,  459,  459,  459,  459,  459,
 /*  2380 */   459,  459,  459,  459,  459,  358,  459,  459,  459,  459,
 /*  2390 */   459,  459,  459,  366,  459,  459,  459,  459,  371,  459,
 /*  2400 */   373,  459,  459,  358,  459,  459,  459,  459,  459,  459,
 /*  2410 */   459,  366,  459,  459,  459,  327,  371,  459,  373,  459,
 /*  2420 */   459,  459,  459,  396,  459,  459,  459,  400,  459,  459,
 /*  2430 */   403,  404,  405,  406,  407,  408,  459,  410,  459,  327,
 /*  2440 */   459,  396,  459,  459,  459,  400,  358,  459,  403,  404,
 /*  2450 */   405,  406,  407,  408,  366,  410,  459,  459,  459,  371,
 /*  2460 */   459,  373,  459,  459,  459,  459,  459,  459,  459,  459,
 /*  2470 */   358,  459,  459,  459,  459,  459,  459,  459,  366,  459,
 /*  2480 */   459,  459,  459,  371,  396,  373,  459,  459,  400,  459,
 /*  2490 */   459,  403,  404,  405,  406,  407,  408,  459,  410,  459,
 /*  2500 */   459,  459,  327,  459,  459,  459,  459,  459,  396,  459,
 /*  2510 */   459,  459,  400,  459,  459,  403,  404,  405,  406,  407,
 /*  2520 */   408,  459,  410,  459,  459,  459,  459,  459,  459,  459,
 /*  2530 */   459,  459,  459,  358,  459,  459,  459,  459,  459,  459,
X
Xiaoyu Wang 已提交
774
 /*  2540 */   459,  366,  459,  459,  459,  459,  371,  459,  373,  459,
X
Xiaoyu Wang 已提交
775 776
 /*  2550 */   459,  459,  459,  459,  459,  459,  327,  459,  459,  459,
 /*  2560 */   459,  459,  459,  459,  459,  459,  459,  459,  459,  459,
X
Xiaoyu Wang 已提交
777
 /*  2570 */   459,  396,  459,  459,  459,  400,  459,  459,  403,  404,
X
Xiaoyu Wang 已提交
778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816
 /*  2580 */   405,  406,  407,  408,  459,  410,  459,  358,  459,  459,
 /*  2590 */   459,  459,  459,  459,  459,  366,  459,  459,  459,  459,
 /*  2600 */   371,  459,  373,  459,  459,  459,  459,  459,  459,  459,
 /*  2610 */   327,  459,  459,  459,  459,  459,  459,  459,  459,  459,
 /*  2620 */   459,  459,  459,  459,  459,  396,  327,  459,  459,  400,
 /*  2630 */   459,  459,  403,  404,  405,  406,  407,  408,  459,  410,
 /*  2640 */   459,  358,  459,  459,  459,  459,  459,  459,  459,  366,
 /*  2650 */   459,  459,  459,  459,  371,  459,  373,  358,  459,  459,
 /*  2660 */   459,  459,  459,  459,  459,  366,  459,  459,  459,  327,
 /*  2670 */   371,  459,  373,  459,  459,  459,  459,  459,  459,  396,
 /*  2680 */   459,  459,  459,  400,  459,  459,  403,  404,  405,  406,
 /*  2690 */   407,  408,  459,  410,  459,  396,  459,  459,  459,  400,
 /*  2700 */   358,  459,  403,  404,  405,  406,  407,  408,  366,  410,
 /*  2710 */   459,  459,  459,  371,  459,  373,  459,  459,  459,  459,
 /*  2720 */   459,  459,  459,  459,  459,  459,  327,  459,  459,  459,
 /*  2730 */   459,  459,  459,  459,  459,  459,  459,  459,  396,  459,
 /*  2740 */   459,  459,  400,  327,  459,  403,  404,  405,  406,  407,
 /*  2750 */   408,  459,  410,  459,  459,  459,  459,  358,  459,  459,
 /*  2760 */   459,  459,  459,  459,  459,  366,  459,  459,  459,  327,
 /*  2770 */   371,  459,  373,  459,  358,  459,  459,  459,  459,  459,
 /*  2780 */   459,  459,  366,  459,  459,  459,  459,  371,  459,  373,
 /*  2790 */   459,  459,  459,  459,  459,  396,  459,  459,  459,  400,
 /*  2800 */   358,  459,  403,  404,  405,  406,  407,  408,  366,  410,
 /*  2810 */   459,  459,  396,  371,  459,  373,  400,  459,  459,  403,
 /*  2820 */   404,  405,  406,  407,  408,  459,  410,  459,  459,  459,
 /*  2830 */   327,  459,  459,  459,  459,  459,  459,  459,  396,  459,
 /*  2840 */   459,  459,  400,  459,  459,  403,  404,  405,  406,  407,
 /*  2850 */   408,  459,  410,  459,  459,  459,  459,  459,  459,  459,
 /*  2860 */   459,  358,  459,  459,  459,  459,  459,  459,  459,  366,
 /*  2870 */   459,  459,  459,  459,  371,  459,  373,  459,  459,  459,
 /*  2880 */   459,  459,  459,  459,  327,  459,  459,  459,  459,  459,
 /*  2890 */   459,  459,  459,  459,  459,  459,  459,  459,  459,  396,
 /*  2900 */   459,  459,  459,  400,  459,  459,  403,  404,  405,  406,
 /*  2910 */   407,  408,  459,  410,  459,  358,  459,  459,  459,  459,
 /*  2920 */   459,  459,  459,  366,  459,  459,  459,  459,  371,  459,
 /*  2930 */   373,  459,  459,  459,  459,  459,  459,  459,  459,  459,
 /*  2940 */   459,  459,  459,  459,  459,  459,  459,  459,  459,  459,
 /*  2950 */   459,  459,  459,  396,  459,  459,  459,  400,  459,  459,
 /*  2960 */   403,  404,  405,  406,  407,  408,  459,  410,
817
};
X
Xiaoyu Wang 已提交
818
#define YY_SHIFT_COUNT    (713)
819
#define YY_SHIFT_MIN      (0)
X
Xiaoyu Wang 已提交
820
#define YY_SHIFT_MAX      (2019)
821
static const unsigned short int yy_shift_ofst[] = {
822
 /*     0 */   925,    0,   71,    0,  288,  288,  288,  288,  288,  288,
X
Xiaoyu Wang 已提交
823
 /*    10 */   288,  288,  288,  288,  288,  359,  574,  574,  645,  574,
824 825
 /*    20 */   574,  574,  574,  574,  574,  574,  574,  574,  574,  574,
 /*    30 */   574,  574,  574,  574,  574,  574,  574,  574,  574,  574,
X
Xiaoyu Wang 已提交
826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893
 /*    40 */   574,  574,  574,  574,  574,  574,  574,  574,  292,  437,
 /*    50 */    12,  294,  287,  151,  315,  151,   12,   12, 1207, 1207,
 /*    60 */   151, 1207, 1207,   78,  151,   19,   19,  198,  198,   66,
 /*    70 */   211,   98,   98,   19,   19,   19,   19,   19,   19,   19,
 /*    80 */    19,   19,   19,  112,   19,   19,  108,   19,  522,   19,
 /*    90 */    19,  536,   19,   19,  536,   19,  536,  536,  536,   19,
 /*   100 */   676,  783,   34,   34,  372,  103,  418,  418,  418,  418,
 /*   110 */   418,  418,  418,  418,  418,  418,  418,  418,  418,  418,
 /*   120 */   418,  418,  418,  418,  418,  213,  295,   66,  211,   62,
 /*   130 */   651,    1,    1,    1,  546,   79,   79,  651,  681,  681,
 /*   140 */   681,  606,  522,  129,  536,  706,  536,  706,  706,  606,
 /*   150 */   749,  216,  216,  216,  216,  216,  216,  216, 1603,  335,
 /*   160 */    36,  451,  867,   47,  410,  267,   46,  505,  227,  452,
 /*   170 */   792,  652,  639,  644,  596,  627,  644,  780,  892,  829,
 /*   180 */  1023, 1231, 1102, 1239, 1265, 1239, 1127, 1270, 1270, 1239,
 /*   190 */  1127, 1127, 1211, 1270, 1270, 1270, 1293, 1293, 1294,  112,
 /*   200 */   522,  112, 1306, 1309,  112, 1306,  112,  112,  112, 1270,
 /*   210 */   112, 1284, 1284, 1293,  536,  536,  536,  536,  536,  536,
 /*   220 */   536,  536,  536,  536,  536, 1270, 1293,  706,  706, 1153,
 /*   230 */  1294,  676, 1190,  522,  676, 1270, 1265, 1265,  706, 1128,
 /*   240 */  1132,  706, 1128, 1132,  706,  706,  536, 1121, 1215, 1128,
 /*   250 */  1134, 1136, 1157, 1023, 1138, 1143, 1146, 1172,  681, 1398,
 /*   260 */  1270, 1306,  676, 1132,  706,  706,  706,  706,  706, 1132,
 /*   270 */   706, 1286,  676,  606,  676,  681, 1365, 1367,  706,  749,
 /*   280 */  1270,  676, 1430, 1293, 2968, 2968, 2968, 2968, 2968, 2968,
 /*   290 */  2968, 2968, 2968,  826,  380,  455,  656,  514,   15,  967,
 /*   300 */   642,   59,  832,  938,  842, 1164, 1164, 1164, 1164, 1164,
 /*   310 */  1164, 1164, 1164, 1164,  963,   68,  184,  184,  365,  291,
 /*   320 */   181,  640,  226,  325,  325,  597,  669,  364,  597,  597,
 /*   330 */   597,  788, 1025,  980,  876,  833,  843,  786,  856,  857,
 /*   340 */   865, 1111, 1162, 1165,  289,  984,  985,  943,  951,  900,
 /*   350 */   851, 1070, 1131, 1159, 1160, 1161, 1130, 1166,  886, 1026,
 /*   360 */   290, 1167, 1151, 1171, 1174, 1177, 1179, 1182, 1186,  905,
 /*   370 */  1212, 1224, 1204,  766, 1485, 1486, 1300, 1488, 1489, 1448,
 /*   380 */  1491, 1457, 1295, 1458, 1460, 1461, 1298, 1498, 1464, 1465,
 /*   390 */  1302, 1502, 1304, 1504, 1471, 1507, 1499, 1508, 1476, 1338,
 /*   400 */  1344, 1532, 1533, 1351, 1353, 1529, 1534, 1490, 1535, 1536,
 /*   410 */  1538, 1497, 1540, 1541, 1542, 1543, 1544, 1545, 1546, 1547,
 /*   420 */  1400, 1514, 1554, 1412, 1564, 1565, 1567, 1575, 1576, 1577,
 /*   430 */  1578, 1579, 1580, 1582, 1583, 1584, 1585, 1586, 1587, 1528,
 /*   440 */  1571, 1572, 1588, 1590, 1592, 1589, 1593, 1597, 1604, 1472,
 /*   450 */  1606, 1608, 1574, 1610, 1555, 1614, 1557, 1618, 1620, 1595,
 /*   460 */  1600, 1581, 1594, 1607, 1596, 1626, 1598, 1624, 1602, 1605,
 /*   470 */  1646, 1647, 1648, 1611, 1478, 1652, 1653, 1654, 1591, 1656,
 /*   480 */  1662, 1628, 1616, 1629, 1665, 1631, 1619, 1632, 1670, 1637,
 /*   490 */  1625, 1635, 1675, 1641, 1630, 1640, 1680, 1683, 1685, 1686,
 /*   500 */  1599, 1621, 1655, 1666, 1687, 1657, 1658, 1659, 1660, 1645,
 /*   510 */  1661, 1664, 1667, 1669, 1671, 1696, 1679, 1704, 1688, 1663,
 /*   520 */  1708, 1700, 1674, 1724, 1691, 1728, 1695, 1731, 1710, 1714,
 /*   530 */  1701, 1703, 1548, 1639, 1644, 1741, 1609, 1711, 1743, 1562,
 /*   540 */  1725, 1617, 1601, 1748, 1749, 1622, 1613, 1750, 1707, 1515,
 /*   550 */  1689, 1673, 1697, 1633, 1559, 1634, 1513, 1677, 1746, 1698,
 /*   560 */  1702, 1705, 1709, 1712, 1751, 1756, 1758, 1716, 1762, 1568,
 /*   570 */  1717, 1719, 1814, 1774, 1612, 1785, 1787, 1788, 1789, 1791,
 /*   580 */  1792, 1723, 1738, 1793, 1615, 1795, 1796, 1836, 1842, 1850,
 /*   590 */  1757, 1759, 1760, 1763, 1764, 1706, 1766, 1853, 1823, 1715,
 /*   600 */  1768, 1761, 1594, 1817, 1821, 1649, 1638, 1651, 1866, 1849,
 /*   610 */  1668, 1779, 1790, 1780, 1798, 1786, 1799, 1833, 1794, 1797,
 /*   620 */  1840, 1800, 1861, 1684, 1804, 1802, 1805, 1867, 1868, 1809,
 /*   630 */  1810, 1874, 1815, 1816, 1878, 1825, 1826, 1889, 1830, 1843,
 /*   640 */  1891, 1834, 1819, 1827, 1828, 1829, 1883, 1835, 1845, 1900,
 /*   650 */  1854, 1910, 1855, 1900, 1900, 1929, 1888, 1890, 1920, 1921,
 /*   660 */  1922, 1923, 1924, 1925, 1926, 1927, 1928, 1930, 1898, 1872,
 /*   670 */  1935, 1934, 1936, 1946, 1950, 1948, 1949, 1951, 1917, 1645,
 /*   680 */  1953, 1661, 1954, 1956, 1957, 1959, 1973, 1961, 1997, 1964,
 /*   690 */  1958, 1962, 2002, 1968, 1960, 1965, 2007, 1974, 1963, 1971,
 /*   700 */  2012, 1978, 1966, 1976, 2016, 1982, 1983, 2019, 1998, 2000,
 /*   710 */  2003, 2006, 2001, 2004,
894
};
X
Xiaoyu Wang 已提交
895
#define YY_REDUCE_COUNT (292)
X
Xiaoyu Wang 已提交
896 897
#define YY_REDUCE_MIN   (-381)
#define YY_REDUCE_MAX   (2557)
898
static const short yy_reduce_ofst[] = {
X
Xiaoyu Wang 已提交
899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928
 /*     0 */  -318, -250,  233,  324,  630,  650,  742,  785,  828,  895,
 /*    10 */   949, 1035, 1109, 1152, 1195, 1223, 1311, 1354, 1371, 1425,
 /*    20 */  1441, 1511, 1527, 1570, 1627, 1678, 1699, 1721, 1784, 1808,
 /*    30 */  1870, 1894, 1937, 1955, 2027, 2045, 2088, 2112, 2175, 2229,
 /*    40 */  2283, 2299, 2342, 2399, 2416, 2442, 2503, 2557, -191,  104,
 /*    50 */   -18,   -7,  168,  239,  269,  558, -278,  658, -345, -320,
 /*    60 */  -270, -273, -170,  -79,  -10,  296,  328, -331, -326, -342,
 /*    70 */  -328, -236, -193,  253,  254,  376,  398,  408,  409,  469,
 /*    80 */   643,  678,  682, -330,  683,  729,  185,  768,   41,  770,
 /*    90 */   775, -349,  795,  804, -280,  805, -245,  260, -113,  847,
 /*   100 */    16, -283,  130,  130, -309, -202,  163,  337,  389,  392,
 /*   110 */   434,  481,  501,  502,  503,  633,  634,  670,  671,  672,
 /*   120 */   695,  747,  750,  789,  841, -281,   87,   10,  220,   84,
 /*   130 */   283,   87,  245,  251,  344, -225,  -38,  355, -313,  319,
 /*   140 */   360,  397,   45,  297,  196,  384, -110,  441,  443,  466,
 /*   150 */   475, -355,  519,  615,  720,  727,  737,  745, -381,  637,
 /*   160 */   759,  726,  665,  663,  846,  757,  883,  883,  872,  863,
 /*   170 */   880,  878,  870,  821,  821,  808,  821,  831,  830,  883,
 /*   180 */   873,  875,  894,  906,  907,  908,  913,  957,  958,  916,
 /*   190 */   920,  921,  965,  971,  974,  976,  989,  990,  928,  982,
 /*   200 */   952,  986,  992,  942,  991,  995,  993,  994,  996,  998,
 /*   210 */   997, 1001, 1002, 1012,  988, 1000, 1003, 1005, 1007, 1009,
 /*   220 */  1010, 1011, 1014, 1015, 1016, 1008, 1013,  973,  977,  955,
 /*   230 */   983, 1021,  959, 1004, 1039, 1044,  999, 1017, 1019,  944,
 /*   240 */  1018, 1020,  945, 1027, 1024, 1028,  883,  946,  953,  961,
 /*   250 */   954,  966,  969, 1022,  956,  964,  968,  821, 1051, 1030,
 /*   260 */  1086, 1087, 1083, 1049, 1063, 1066, 1073, 1075, 1076, 1064,
 /*   270 */  1078, 1071, 1115, 1101, 1119, 1093, 1041, 1103, 1092, 1116,
 /*   280 */  1133, 1135, 1139, 1141, 1081, 1079, 1091, 1096, 1120, 1125,
 /*   290 */  1126, 1144, 1158,
929 930
};
static const YYACTIONTYPE yy_default[] = {
X
Xiaoyu Wang 已提交
931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002
 /*     0 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*    10 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*    20 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*    30 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*    40 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*    50 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*    60 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1849,
 /*    70 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*    80 */  1594, 1594, 1594, 1672, 1594, 1594, 1594, 1594, 1594, 1594,
 /*    90 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   100 */  1670, 1842, 2039, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   110 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   120 */  1594, 1594, 1594, 1594, 1594, 1594, 2051, 1594, 1594, 1672,
 /*   130 */  1594, 2051, 2051, 2051, 1670, 2011, 2011, 1594, 1594, 1594,
 /*   140 */  1594, 1779, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1779,
 /*   150 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1886, 1594,
 /*   160 */  1594, 2076, 2130, 1594, 1594, 2079, 1594, 1594, 1594, 1854,
 /*   170 */  1594, 1732, 2066, 2043, 2057, 2114, 2044, 2041, 2060, 1594,
 /*   180 */  2070, 1594, 1879, 1847, 1594, 1847, 1844, 1594, 1594, 1847,
 /*   190 */  1844, 1844, 1723, 1594, 1594, 1594, 1594, 1594, 1594, 1672,
 /*   200 */  1594, 1672, 1594, 1594, 1672, 1594, 1672, 1672, 1672, 1594,
 /*   210 */  1672, 1651, 1651, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   220 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1899,
 /*   230 */  1594, 1670, 1888, 1594, 1670, 1594, 1594, 1594, 1594, 2087,
 /*   240 */  2085, 1594, 2087, 2085, 1594, 1594, 1594, 2099, 2095, 2087,
 /*   250 */  2103, 2101, 2072, 2070, 2133, 2120, 2116, 2057, 1594, 1594,
 /*   260 */  1594, 1594, 1670, 2085, 1594, 1594, 1594, 1594, 1594, 2085,
 /*   270 */  1594, 1594, 1670, 1594, 1670, 1594, 1594, 1748, 1594, 1594,
 /*   280 */  1594, 1670, 1626, 1594, 1881, 1892, 1864, 1864, 1782, 1782,
 /*   290 */  1782, 1673, 1599, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   300 */  1594, 1594, 1594, 1594, 1594, 2098, 2097, 1967, 1594, 2015,
 /*   310 */  2014, 2013, 2004, 1966, 1744, 1594, 1965, 1964, 1594, 1594,
 /*   320 */  1594, 1594, 1594, 1860, 1859, 1958, 1594, 1594, 1959, 1957,
 /*   330 */  1956, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   340 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 2117, 2121,
 /*   350 */  1594, 1594, 1594, 1594, 1594, 1594, 2040, 1594, 1594, 1594,
 /*   360 */  1594, 1594, 1941, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   370 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   380 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   390 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   400 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   410 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   420 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   430 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   440 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   450 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   460 */  1594, 1631, 1946, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   470 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   480 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   490 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   500 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1711,
 /*   510 */  1710, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   520 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   530 */  1594, 1594, 1594, 1949, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   540 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 2113, 2073, 1594,
 /*   550 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   560 */  1594, 1594, 1594, 1594, 1594, 1594, 1941, 1594, 2096, 1594,
 /*   570 */  1594, 2111, 1594, 2115, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   580 */  1594, 2050, 2046, 1594, 1594, 2042, 1594, 1594, 1594, 1594,
 /*   590 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   600 */  1594, 1594, 1940, 1594, 2001, 1594, 1594, 1594, 2035, 1594,
 /*   610 */  1594, 1986, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   620 */  1594, 1949, 1594, 1952, 1594, 1594, 1594, 1594, 1594, 1776,
 /*   630 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   640 */  1594, 1594, 1761, 1759, 1758, 1757, 1594, 1754, 1594, 1789,
 /*   650 */  1594, 1594, 1594, 1785, 1784, 1594, 1594, 1594, 1594, 1594,
 /*   660 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   670 */  1691, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1683,
 /*   680 */  1594, 1682, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   690 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   700 */  1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594, 1594,
 /*   710 */  1594, 1594, 1594, 1594,
1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021
};
/********** 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[] = {
X
Xiaoyu Wang 已提交
1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055
    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 */
X
Xiaoyu Wang 已提交
1056 1057 1058
    0,  /*     ENABLE => nothing */
    0,  /* NK_INTEGER => nothing */
    0,  /*    SYSINFO => nothing */
X
Xiaoyu Wang 已提交
1059
    0,  /*       DROP => nothing */
1060 1061 1062 1063 1064
    0,  /*      GRANT => nothing */
    0,  /*         ON => nothing */
    0,  /*         TO => nothing */
    0,  /*     REVOKE => nothing */
    0,  /*       FROM => nothing */
1065
    0,  /*  SUBSCRIBE => nothing */
1066 1067 1068 1069
    0,  /*   NK_COMMA => nothing */
    0,  /*       READ => nothing */
    0,  /*      WRITE => nothing */
    0,  /*     NK_DOT => nothing */
X
Xiaoyu Wang 已提交
1070 1071 1072
    0,  /*      DNODE => nothing */
    0,  /*       PORT => nothing */
    0,  /*     DNODES => nothing */
1073
    0,  /* NK_IPTOKEN => nothing */
1074
    0,  /*      FORCE => nothing */
X
Xiaoyu Wang 已提交
1075 1076 1077 1078 1079 1080 1081
    0,  /*      LOCAL => nothing */
    0,  /*      QNODE => nothing */
    0,  /*      BNODE => nothing */
    0,  /*      SNODE => nothing */
    0,  /*      MNODE => nothing */
    0,  /*   DATABASE => nothing */
    0,  /*        USE => nothing */
X
Xiaoyu Wang 已提交
1082
    0,  /*      FLUSH => nothing */
X
Xiaoyu Wang 已提交
1083
    0,  /*       TRIM => nothing */
X
Xiaoyu Wang 已提交
1084 1085 1086
    0,  /*         IF => nothing */
    0,  /*        NOT => nothing */
    0,  /*     EXISTS => nothing */
X
Xiaoyu Wang 已提交
1087
    0,  /*     BUFFER => nothing */
1088 1089
    0,  /* CACHEMODEL => nothing */
    0,  /*  CACHESIZE => nothing */
X
Xiaoyu Wang 已提交
1090
    0,  /*       COMP => nothing */
X
Xiaoyu Wang 已提交
1091
    0,  /*   DURATION => nothing */
X
Xiaoyu Wang 已提交
1092 1093 1094 1095
    0,  /* NK_VARIABLE => nothing */
    0,  /*    MAXROWS => nothing */
    0,  /*    MINROWS => nothing */
    0,  /*       KEEP => nothing */
X
Xiaoyu Wang 已提交
1096 1097
    0,  /*      PAGES => nothing */
    0,  /*   PAGESIZE => nothing */
1098
    0,  /* TSDB_PAGESIZE => nothing */
X
Xiaoyu Wang 已提交
1099 1100 1101 1102 1103
    0,  /*  PRECISION => nothing */
    0,  /*    REPLICA => nothing */
    0,  /*    VGROUPS => nothing */
    0,  /* SINGLE_STABLE => nothing */
    0,  /* RETENTIONS => nothing */
X
Xiaoyu Wang 已提交
1104
    0,  /* SCHEMALESS => nothing */
X
Xiaoyu Wang 已提交
1105 1106
    0,  /*  WAL_LEVEL => nothing */
    0,  /* WAL_FSYNC_PERIOD => nothing */
X
Xiaoyu Wang 已提交
1107 1108 1109 1110
    0,  /* WAL_RETENTION_PERIOD => nothing */
    0,  /* WAL_RETENTION_SIZE => nothing */
    0,  /* WAL_ROLL_PERIOD => nothing */
    0,  /* WAL_SEGMENT_SIZE => nothing */
1111
    0,  /* STT_TRIGGER => nothing */
1112 1113
    0,  /* TABLE_PREFIX => nothing */
    0,  /* TABLE_SUFFIX => nothing */
X
Xiaoyu Wang 已提交
1114
    0,  /*   NK_COLON => nothing */
1115
    0,  /*  MAX_SPEED => nothing */
X
Xiaoyu Wang 已提交
1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147
    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 */
X
Xiaoyu Wang 已提交
1148 1149
    0,  /*  MAX_DELAY => nothing */
    0,  /*  WATERMARK => nothing */
X
Xiaoyu Wang 已提交
1150 1151 1152
    0,  /*     ROLLUP => nothing */
    0,  /*        TTL => nothing */
    0,  /*        SMA => nothing */
1153
    0,  /* DELETE_MARK => nothing */
X
Xiaoyu Wang 已提交
1154 1155
    0,  /*      FIRST => nothing */
    0,  /*       LAST => nothing */
X
Xiaoyu Wang 已提交
1156
    0,  /*       SHOW => nothing */
1157
    0,  /* PRIVILEGES => nothing */
X
Xiaoyu Wang 已提交
1158 1159 1160 1161 1162 1163 1164 1165 1166 1167
    0,  /*  DATABASES => nothing */
    0,  /*     TABLES => nothing */
    0,  /*    STABLES => nothing */
    0,  /*     MNODES => nothing */
    0,  /*     QNODES => nothing */
    0,  /*  FUNCTIONS => nothing */
    0,  /*    INDEXES => nothing */
    0,  /*   ACCOUNTS => nothing */
    0,  /*       APPS => nothing */
    0,  /* CONNECTIONS => nothing */
X
Xiaoyu Wang 已提交
1168
    0,  /*   LICENCES => nothing */
X
Xiaoyu Wang 已提交
1169 1170 1171 1172 1173
    0,  /*     GRANTS => nothing */
    0,  /*    QUERIES => nothing */
    0,  /*     SCORES => nothing */
    0,  /*     TOPICS => nothing */
    0,  /*  VARIABLES => nothing */
1174
    0,  /*    CLUSTER => nothing */
X
Xiaoyu Wang 已提交
1175 1176
    0,  /*     BNODES => nothing */
    0,  /*     SNODES => nothing */
1177
    0,  /* TRANSACTIONS => nothing */
1178
    0,  /* DISTRIBUTED => nothing */
1179 1180
    0,  /*  CONSUMERS => nothing */
    0,  /* SUBSCRIPTIONS => nothing */
1181
    0,  /*     VNODES => nothing */
X
Xiaoyu Wang 已提交
1182
    0,  /*       LIKE => nothing */
1183 1184 1185
    0,  /*     TBNAME => nothing */
    0,  /*      QTAGS => nothing */
    0,  /*         AS => nothing */
X
Xiaoyu Wang 已提交
1186 1187 1188 1189
    0,  /*      INDEX => nothing */
    0,  /*   FUNCTION => nothing */
    0,  /*   INTERVAL => nothing */
    0,  /*      TOPIC => nothing */
X
Xiaoyu Wang 已提交
1190 1191
    0,  /*       WITH => nothing */
    0,  /*       META => nothing */
1192 1193
    0,  /*   CONSUMER => nothing */
    0,  /*      GROUP => nothing */
X
Xiaoyu Wang 已提交
1194 1195 1196 1197
    0,  /*       DESC => nothing */
    0,  /*   DESCRIBE => nothing */
    0,  /*      RESET => nothing */
    0,  /*      QUERY => nothing */
X
Xiaoyu Wang 已提交
1198
    0,  /*      CACHE => nothing */
X
Xiaoyu Wang 已提交
1199 1200 1201 1202 1203
    0,  /*    EXPLAIN => nothing */
    0,  /*    ANALYZE => nothing */
    0,  /*    VERBOSE => nothing */
    0,  /*    NK_BOOL => nothing */
    0,  /*      RATIO => nothing */
X
Xiaoyu Wang 已提交
1204
    0,  /*   NK_FLOAT => nothing */
X
Xiaoyu Wang 已提交
1205 1206 1207 1208 1209 1210 1211 1212
    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 */
1213 1214
    0,  /*     IGNORE => nothing */
    0,  /*    EXPIRED => nothing */
1215
    0,  /* FILL_HISTORY => nothing */
1216
    0,  /*   SUBTABLE => nothing */
X
Xiaoyu Wang 已提交
1217 1218
    0,  /*       KILL => nothing */
    0,  /* CONNECTION => nothing */
1219
    0,  /* TRANSACTION => nothing */
X
Xiaoyu Wang 已提交
1220
    0,  /*    BALANCE => nothing */
X
Xiaoyu Wang 已提交
1221
    0,  /*     VGROUP => nothing */
X
Xiaoyu Wang 已提交
1222
    0,  /*      MERGE => nothing */
X
Xiaoyu Wang 已提交
1223
    0,  /* REDISTRIBUTE => nothing */
1224
    0,  /*      SPLIT => nothing */
X
Xiaoyu Wang 已提交
1225
    0,  /*     DELETE => nothing */
1226
    0,  /*     INSERT => nothing */
X
Xiaoyu Wang 已提交
1227 1228 1229 1230
    0,  /*       NULL => nothing */
    0,  /* NK_QUESTION => nothing */
    0,  /*   NK_ARROW => nothing */
    0,  /*      ROWTS => nothing */
1231 1232 1233 1234 1235
    0,  /*     QSTART => nothing */
    0,  /*       QEND => nothing */
    0,  /*  QDURATION => nothing */
    0,  /*     WSTART => nothing */
    0,  /*       WEND => nothing */
X
Xiaoyu Wang 已提交
1236
    0,  /*  WDURATION => nothing */
1237
    0,  /*     IROWTS => nothing */
X
Xiaoyu Wang 已提交
1238 1239 1240 1241
    0,  /*       CAST => nothing */
    0,  /*        NOW => nothing */
    0,  /*      TODAY => nothing */
    0,  /*   TIMEZONE => nothing */
1242 1243 1244 1245
    0,  /* CLIENT_VERSION => nothing */
    0,  /* SERVER_VERSION => nothing */
    0,  /* SERVER_STATUS => nothing */
    0,  /* CURRENT_USER => nothing */
X
Xiaoyu Wang 已提交
1246 1247
    0,  /*      COUNT => nothing */
    0,  /*   LAST_ROW => nothing */
X
Xiaoyu Wang 已提交
1248
    0,  /*       CASE => nothing */
X
Xiaoyu Wang 已提交
1249
  270,  /*        END => ABORT */
X
Xiaoyu Wang 已提交
1250 1251 1252
    0,  /*       WHEN => nothing */
    0,  /*       THEN => nothing */
    0,  /*       ELSE => nothing */
X
Xiaoyu Wang 已提交
1253 1254 1255 1256 1257 1258 1259 1260 1261 1262
    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 */
X
Xiaoyu Wang 已提交
1263
    0,  /*         IN => nothing */
X
Xiaoyu Wang 已提交
1264 1265 1266 1267 1268 1269 1270 1271 1272
    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 */
X
Xiaoyu Wang 已提交
1273 1274
    0,  /* EVENT_WINDOW => nothing */
    0,  /*      START => nothing */
X
Xiaoyu Wang 已提交
1275 1276 1277 1278 1279 1280 1281 1282
    0,  /*    SLIDING => nothing */
    0,  /*       FILL => nothing */
    0,  /*      VALUE => nothing */
    0,  /*       NONE => nothing */
    0,  /*       PREV => nothing */
    0,  /*     LINEAR => nothing */
    0,  /*       NEXT => nothing */
    0,  /*     HAVING => nothing */
X
Xiaoyu Wang 已提交
1283 1284
    0,  /*      RANGE => nothing */
    0,  /*      EVERY => nothing */
X
Xiaoyu Wang 已提交
1285 1286 1287 1288 1289 1290 1291
    0,  /*      ORDER => nothing */
    0,  /*     SLIMIT => nothing */
    0,  /*    SOFFSET => nothing */
    0,  /*      LIMIT => nothing */
    0,  /*     OFFSET => nothing */
    0,  /*        ASC => nothing */
    0,  /*      NULLS => nothing */
X
Xiaoyu Wang 已提交
1292
    0,  /*      ABORT => nothing */
X
Xiaoyu Wang 已提交
1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345
  270,  /*      AFTER => ABORT */
  270,  /*     ATTACH => ABORT */
  270,  /*     BEFORE => ABORT */
  270,  /*      BEGIN => ABORT */
  270,  /*     BITAND => ABORT */
  270,  /*     BITNOT => ABORT */
  270,  /*      BITOR => ABORT */
  270,  /*     BLOCKS => ABORT */
  270,  /*     CHANGE => ABORT */
  270,  /*      COMMA => ABORT */
  270,  /*    COMPACT => ABORT */
  270,  /*     CONCAT => ABORT */
  270,  /*   CONFLICT => ABORT */
  270,  /*       COPY => ABORT */
  270,  /*   DEFERRED => ABORT */
  270,  /* DELIMITERS => ABORT */
  270,  /*     DETACH => ABORT */
  270,  /*     DIVIDE => ABORT */
  270,  /*        DOT => ABORT */
  270,  /*       EACH => ABORT */
  270,  /*       FAIL => ABORT */
  270,  /*       FILE => ABORT */
  270,  /*        FOR => ABORT */
  270,  /*       GLOB => ABORT */
  270,  /*         ID => ABORT */
  270,  /*  IMMEDIATE => ABORT */
  270,  /*     IMPORT => ABORT */
  270,  /*  INITIALLY => ABORT */
  270,  /*    INSTEAD => ABORT */
  270,  /*     ISNULL => ABORT */
  270,  /*        KEY => ABORT */
  270,  /*    MODULES => ABORT */
  270,  /*  NK_BITNOT => ABORT */
  270,  /*    NK_SEMI => ABORT */
  270,  /*    NOTNULL => ABORT */
  270,  /*         OF => ABORT */
  270,  /*       PLUS => ABORT */
  270,  /*  PRIVILEGE => ABORT */
  270,  /*      RAISE => ABORT */
  270,  /*    REPLACE => ABORT */
  270,  /*   RESTRICT => ABORT */
  270,  /*        ROW => ABORT */
  270,  /*       SEMI => ABORT */
  270,  /*       STAR => ABORT */
  270,  /*  STATEMENT => ABORT */
  270,  /*     STRICT => ABORT */
  270,  /*     STRING => ABORT */
  270,  /*      TIMES => ABORT */
  270,  /*     UPDATE => ABORT */
  270,  /*     VALUES => ABORT */
  270,  /*   VARIABLE => ABORT */
  270,  /*       VIEW => ABORT */
  270,  /*        WAL => ABORT */
1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383
};
#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
X
Xiaoyu Wang 已提交
1384 1385
  ParseARG_SDECL                /* A place to hold %extra_argument */
  ParseCTX_SDECL                /* A place to hold %extra_context */
1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420
#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 <stdio.h>
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:
** <ul>
** <li> A FILE* to which trace output should be written.
**      If NULL, then tracing is turned off.
** <li> A prefix string written at the beginning of every
**      line of trace output.  If NULL, then tracing is
**      turned off.
** </ul>
**
** Outputs:
** None.
*/
X
Xiaoyu Wang 已提交
1421
void ParseTrace(FILE *TraceFILE, char *zTracePrompt){
1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433
  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 */ "$",
1434 1435
  /*    1 */ "OR",
  /*    2 */ "AND",
1436 1437 1438 1439 1440
  /*    3 */ "UNION",
  /*    4 */ "ALL",
  /*    5 */ "MINUS",
  /*    6 */ "EXCEPT",
  /*    7 */ "INTERSECT",
1441 1442 1443 1444 1445 1446 1447 1448 1449 1450
  /*    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",
1451
  /*   18 */ "CREATE",
1452 1453 1454
  /*   19 */ "ACCOUNT",
  /*   20 */ "NK_ID",
  /*   21 */ "PASS",
1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466
  /*   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",
X
Xiaoyu Wang 已提交
1467 1468 1469 1470 1471 1472 1473 1474 1475
  /*   34 */ "ENABLE",
  /*   35 */ "NK_INTEGER",
  /*   36 */ "SYSINFO",
  /*   37 */ "DROP",
  /*   38 */ "GRANT",
  /*   39 */ "ON",
  /*   40 */ "TO",
  /*   41 */ "REVOKE",
  /*   42 */ "FROM",
1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511
  /*   43 */ "SUBSCRIBE",
  /*   44 */ "NK_COMMA",
  /*   45 */ "READ",
  /*   46 */ "WRITE",
  /*   47 */ "NK_DOT",
  /*   48 */ "DNODE",
  /*   49 */ "PORT",
  /*   50 */ "DNODES",
  /*   51 */ "NK_IPTOKEN",
  /*   52 */ "FORCE",
  /*   53 */ "LOCAL",
  /*   54 */ "QNODE",
  /*   55 */ "BNODE",
  /*   56 */ "SNODE",
  /*   57 */ "MNODE",
  /*   58 */ "DATABASE",
  /*   59 */ "USE",
  /*   60 */ "FLUSH",
  /*   61 */ "TRIM",
  /*   62 */ "IF",
  /*   63 */ "NOT",
  /*   64 */ "EXISTS",
  /*   65 */ "BUFFER",
  /*   66 */ "CACHEMODEL",
  /*   67 */ "CACHESIZE",
  /*   68 */ "COMP",
  /*   69 */ "DURATION",
  /*   70 */ "NK_VARIABLE",
  /*   71 */ "MAXROWS",
  /*   72 */ "MINROWS",
  /*   73 */ "KEEP",
  /*   74 */ "PAGES",
  /*   75 */ "PAGESIZE",
  /*   76 */ "TSDB_PAGESIZE",
  /*   77 */ "PRECISION",
  /*   78 */ "REPLICA",
1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683
  /*   79 */ "VGROUPS",
  /*   80 */ "SINGLE_STABLE",
  /*   81 */ "RETENTIONS",
  /*   82 */ "SCHEMALESS",
  /*   83 */ "WAL_LEVEL",
  /*   84 */ "WAL_FSYNC_PERIOD",
  /*   85 */ "WAL_RETENTION_PERIOD",
  /*   86 */ "WAL_RETENTION_SIZE",
  /*   87 */ "WAL_ROLL_PERIOD",
  /*   88 */ "WAL_SEGMENT_SIZE",
  /*   89 */ "STT_TRIGGER",
  /*   90 */ "TABLE_PREFIX",
  /*   91 */ "TABLE_SUFFIX",
  /*   92 */ "NK_COLON",
  /*   93 */ "MAX_SPEED",
  /*   94 */ "TABLE",
  /*   95 */ "NK_LP",
  /*   96 */ "NK_RP",
  /*   97 */ "STABLE",
  /*   98 */ "ADD",
  /*   99 */ "COLUMN",
  /*  100 */ "MODIFY",
  /*  101 */ "RENAME",
  /*  102 */ "TAG",
  /*  103 */ "SET",
  /*  104 */ "NK_EQ",
  /*  105 */ "USING",
  /*  106 */ "TAGS",
  /*  107 */ "COMMENT",
  /*  108 */ "BOOL",
  /*  109 */ "TINYINT",
  /*  110 */ "SMALLINT",
  /*  111 */ "INT",
  /*  112 */ "INTEGER",
  /*  113 */ "BIGINT",
  /*  114 */ "FLOAT",
  /*  115 */ "DOUBLE",
  /*  116 */ "BINARY",
  /*  117 */ "TIMESTAMP",
  /*  118 */ "NCHAR",
  /*  119 */ "UNSIGNED",
  /*  120 */ "JSON",
  /*  121 */ "VARCHAR",
  /*  122 */ "MEDIUMBLOB",
  /*  123 */ "BLOB",
  /*  124 */ "VARBINARY",
  /*  125 */ "DECIMAL",
  /*  126 */ "MAX_DELAY",
  /*  127 */ "WATERMARK",
  /*  128 */ "ROLLUP",
  /*  129 */ "TTL",
  /*  130 */ "SMA",
  /*  131 */ "DELETE_MARK",
  /*  132 */ "FIRST",
  /*  133 */ "LAST",
  /*  134 */ "SHOW",
  /*  135 */ "PRIVILEGES",
  /*  136 */ "DATABASES",
  /*  137 */ "TABLES",
  /*  138 */ "STABLES",
  /*  139 */ "MNODES",
  /*  140 */ "QNODES",
  /*  141 */ "FUNCTIONS",
  /*  142 */ "INDEXES",
  /*  143 */ "ACCOUNTS",
  /*  144 */ "APPS",
  /*  145 */ "CONNECTIONS",
  /*  146 */ "LICENCES",
  /*  147 */ "GRANTS",
  /*  148 */ "QUERIES",
  /*  149 */ "SCORES",
  /*  150 */ "TOPICS",
  /*  151 */ "VARIABLES",
  /*  152 */ "CLUSTER",
  /*  153 */ "BNODES",
  /*  154 */ "SNODES",
  /*  155 */ "TRANSACTIONS",
  /*  156 */ "DISTRIBUTED",
  /*  157 */ "CONSUMERS",
  /*  158 */ "SUBSCRIPTIONS",
  /*  159 */ "VNODES",
  /*  160 */ "LIKE",
  /*  161 */ "TBNAME",
  /*  162 */ "QTAGS",
  /*  163 */ "AS",
  /*  164 */ "INDEX",
  /*  165 */ "FUNCTION",
  /*  166 */ "INTERVAL",
  /*  167 */ "TOPIC",
  /*  168 */ "WITH",
  /*  169 */ "META",
  /*  170 */ "CONSUMER",
  /*  171 */ "GROUP",
  /*  172 */ "DESC",
  /*  173 */ "DESCRIBE",
  /*  174 */ "RESET",
  /*  175 */ "QUERY",
  /*  176 */ "CACHE",
  /*  177 */ "EXPLAIN",
  /*  178 */ "ANALYZE",
  /*  179 */ "VERBOSE",
  /*  180 */ "NK_BOOL",
  /*  181 */ "RATIO",
  /*  182 */ "NK_FLOAT",
  /*  183 */ "OUTPUTTYPE",
  /*  184 */ "AGGREGATE",
  /*  185 */ "BUFSIZE",
  /*  186 */ "STREAM",
  /*  187 */ "INTO",
  /*  188 */ "TRIGGER",
  /*  189 */ "AT_ONCE",
  /*  190 */ "WINDOW_CLOSE",
  /*  191 */ "IGNORE",
  /*  192 */ "EXPIRED",
  /*  193 */ "FILL_HISTORY",
  /*  194 */ "SUBTABLE",
  /*  195 */ "KILL",
  /*  196 */ "CONNECTION",
  /*  197 */ "TRANSACTION",
  /*  198 */ "BALANCE",
  /*  199 */ "VGROUP",
  /*  200 */ "MERGE",
  /*  201 */ "REDISTRIBUTE",
  /*  202 */ "SPLIT",
  /*  203 */ "DELETE",
  /*  204 */ "INSERT",
  /*  205 */ "NULL",
  /*  206 */ "NK_QUESTION",
  /*  207 */ "NK_ARROW",
  /*  208 */ "ROWTS",
  /*  209 */ "QSTART",
  /*  210 */ "QEND",
  /*  211 */ "QDURATION",
  /*  212 */ "WSTART",
  /*  213 */ "WEND",
  /*  214 */ "WDURATION",
  /*  215 */ "IROWTS",
  /*  216 */ "CAST",
  /*  217 */ "NOW",
  /*  218 */ "TODAY",
  /*  219 */ "TIMEZONE",
  /*  220 */ "CLIENT_VERSION",
  /*  221 */ "SERVER_VERSION",
  /*  222 */ "SERVER_STATUS",
  /*  223 */ "CURRENT_USER",
  /*  224 */ "COUNT",
  /*  225 */ "LAST_ROW",
  /*  226 */ "CASE",
  /*  227 */ "END",
  /*  228 */ "WHEN",
  /*  229 */ "THEN",
  /*  230 */ "ELSE",
  /*  231 */ "BETWEEN",
  /*  232 */ "IS",
  /*  233 */ "NK_LT",
  /*  234 */ "NK_GT",
  /*  235 */ "NK_LE",
  /*  236 */ "NK_GE",
  /*  237 */ "NK_NE",
  /*  238 */ "MATCH",
  /*  239 */ "NMATCH",
  /*  240 */ "CONTAINS",
  /*  241 */ "IN",
  /*  242 */ "JOIN",
  /*  243 */ "INNER",
  /*  244 */ "SELECT",
  /*  245 */ "DISTINCT",
  /*  246 */ "WHERE",
  /*  247 */ "PARTITION",
  /*  248 */ "BY",
  /*  249 */ "SESSION",
  /*  250 */ "STATE_WINDOW",
X
Xiaoyu Wang 已提交
1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749
  /*  251 */ "EVENT_WINDOW",
  /*  252 */ "START",
  /*  253 */ "SLIDING",
  /*  254 */ "FILL",
  /*  255 */ "VALUE",
  /*  256 */ "NONE",
  /*  257 */ "PREV",
  /*  258 */ "LINEAR",
  /*  259 */ "NEXT",
  /*  260 */ "HAVING",
  /*  261 */ "RANGE",
  /*  262 */ "EVERY",
  /*  263 */ "ORDER",
  /*  264 */ "SLIMIT",
  /*  265 */ "SOFFSET",
  /*  266 */ "LIMIT",
  /*  267 */ "OFFSET",
  /*  268 */ "ASC",
  /*  269 */ "NULLS",
  /*  270 */ "ABORT",
  /*  271 */ "AFTER",
  /*  272 */ "ATTACH",
  /*  273 */ "BEFORE",
  /*  274 */ "BEGIN",
  /*  275 */ "BITAND",
  /*  276 */ "BITNOT",
  /*  277 */ "BITOR",
  /*  278 */ "BLOCKS",
  /*  279 */ "CHANGE",
  /*  280 */ "COMMA",
  /*  281 */ "COMPACT",
  /*  282 */ "CONCAT",
  /*  283 */ "CONFLICT",
  /*  284 */ "COPY",
  /*  285 */ "DEFERRED",
  /*  286 */ "DELIMITERS",
  /*  287 */ "DETACH",
  /*  288 */ "DIVIDE",
  /*  289 */ "DOT",
  /*  290 */ "EACH",
  /*  291 */ "FAIL",
  /*  292 */ "FILE",
  /*  293 */ "FOR",
  /*  294 */ "GLOB",
  /*  295 */ "ID",
  /*  296 */ "IMMEDIATE",
  /*  297 */ "IMPORT",
  /*  298 */ "INITIALLY",
  /*  299 */ "INSTEAD",
  /*  300 */ "ISNULL",
  /*  301 */ "KEY",
  /*  302 */ "MODULES",
  /*  303 */ "NK_BITNOT",
  /*  304 */ "NK_SEMI",
  /*  305 */ "NOTNULL",
  /*  306 */ "OF",
  /*  307 */ "PLUS",
  /*  308 */ "PRIVILEGE",
  /*  309 */ "RAISE",
  /*  310 */ "REPLACE",
  /*  311 */ "RESTRICT",
  /*  312 */ "ROW",
  /*  313 */ "SEMI",
  /*  314 */ "STAR",
  /*  315 */ "STATEMENT",
  /*  316 */ "STRICT",
X
Xiaoyu Wang 已提交
1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891
  /*  317 */ "STRING",
  /*  318 */ "TIMES",
  /*  319 */ "UPDATE",
  /*  320 */ "VALUES",
  /*  321 */ "VARIABLE",
  /*  322 */ "VIEW",
  /*  323 */ "WAL",
  /*  324 */ "cmd",
  /*  325 */ "account_options",
  /*  326 */ "alter_account_options",
  /*  327 */ "literal",
  /*  328 */ "alter_account_option",
  /*  329 */ "user_name",
  /*  330 */ "sysinfo_opt",
  /*  331 */ "privileges",
  /*  332 */ "priv_level",
  /*  333 */ "priv_type_list",
  /*  334 */ "priv_type",
  /*  335 */ "db_name",
  /*  336 */ "topic_name",
  /*  337 */ "dnode_endpoint",
  /*  338 */ "force_opt",
  /*  339 */ "not_exists_opt",
  /*  340 */ "db_options",
  /*  341 */ "exists_opt",
  /*  342 */ "alter_db_options",
  /*  343 */ "speed_opt",
  /*  344 */ "integer_list",
  /*  345 */ "variable_list",
  /*  346 */ "retention_list",
  /*  347 */ "alter_db_option",
  /*  348 */ "retention",
  /*  349 */ "full_table_name",
  /*  350 */ "column_def_list",
  /*  351 */ "tags_def_opt",
  /*  352 */ "table_options",
  /*  353 */ "multi_create_clause",
  /*  354 */ "tags_def",
  /*  355 */ "multi_drop_clause",
  /*  356 */ "alter_table_clause",
  /*  357 */ "alter_table_options",
  /*  358 */ "column_name",
  /*  359 */ "type_name",
  /*  360 */ "signed_literal",
  /*  361 */ "create_subtable_clause",
  /*  362 */ "specific_cols_opt",
  /*  363 */ "expression_list",
  /*  364 */ "drop_table_clause",
  /*  365 */ "col_name_list",
  /*  366 */ "table_name",
  /*  367 */ "column_def",
  /*  368 */ "duration_list",
  /*  369 */ "rollup_func_list",
  /*  370 */ "alter_table_option",
  /*  371 */ "duration_literal",
  /*  372 */ "rollup_func_name",
  /*  373 */ "function_name",
  /*  374 */ "col_name",
  /*  375 */ "db_name_cond_opt",
  /*  376 */ "like_pattern_opt",
  /*  377 */ "table_name_cond",
  /*  378 */ "from_db_opt",
  /*  379 */ "tag_list_opt",
  /*  380 */ "tag_item",
  /*  381 */ "column_alias",
  /*  382 */ "index_options",
  /*  383 */ "func_list",
  /*  384 */ "sliding_opt",
  /*  385 */ "sma_stream_opt",
  /*  386 */ "func",
  /*  387 */ "query_or_subquery",
  /*  388 */ "cgroup_name",
  /*  389 */ "analyze_opt",
  /*  390 */ "explain_options",
  /*  391 */ "agg_func_opt",
  /*  392 */ "bufsize_opt",
  /*  393 */ "stream_name",
  /*  394 */ "stream_options",
  /*  395 */ "subtable_opt",
  /*  396 */ "expression",
  /*  397 */ "dnode_list",
  /*  398 */ "where_clause_opt",
  /*  399 */ "signed",
  /*  400 */ "literal_func",
  /*  401 */ "literal_list",
  /*  402 */ "table_alias",
  /*  403 */ "expr_or_subquery",
  /*  404 */ "pseudo_column",
  /*  405 */ "column_reference",
  /*  406 */ "function_expression",
  /*  407 */ "case_when_expression",
  /*  408 */ "star_func",
  /*  409 */ "star_func_para_list",
  /*  410 */ "noarg_func",
  /*  411 */ "other_para_list",
  /*  412 */ "star_func_para",
  /*  413 */ "when_then_list",
  /*  414 */ "case_when_else_opt",
  /*  415 */ "common_expression",
  /*  416 */ "when_then_expr",
  /*  417 */ "predicate",
  /*  418 */ "compare_op",
  /*  419 */ "in_op",
  /*  420 */ "in_predicate_value",
  /*  421 */ "boolean_value_expression",
  /*  422 */ "boolean_primary",
  /*  423 */ "from_clause_opt",
  /*  424 */ "table_reference_list",
  /*  425 */ "table_reference",
  /*  426 */ "table_primary",
  /*  427 */ "joined_table",
  /*  428 */ "alias_opt",
  /*  429 */ "subquery",
  /*  430 */ "parenthesized_joined_table",
  /*  431 */ "join_type",
  /*  432 */ "search_condition",
  /*  433 */ "query_specification",
  /*  434 */ "set_quantifier_opt",
  /*  435 */ "select_list",
  /*  436 */ "partition_by_clause_opt",
  /*  437 */ "range_opt",
  /*  438 */ "every_opt",
  /*  439 */ "fill_opt",
  /*  440 */ "twindow_clause_opt",
  /*  441 */ "group_by_clause_opt",
  /*  442 */ "having_clause_opt",
  /*  443 */ "select_item",
  /*  444 */ "partition_list",
  /*  445 */ "partition_item",
  /*  446 */ "fill_mode",
  /*  447 */ "group_by_list",
  /*  448 */ "query_expression",
  /*  449 */ "query_simple",
  /*  450 */ "order_by_clause_opt",
  /*  451 */ "slimit_clause_opt",
  /*  452 */ "limit_clause_opt",
  /*  453 */ "union_query_expression",
  /*  454 */ "query_simple_or_subquery",
  /*  455 */ "sort_specification_list",
  /*  456 */ "sort_specification",
  /*  457 */ "ordering_specification_opt",
  /*  458 */ "null_ordering_opt",
1892 1893 1894 1895 1896 1897 1898
};
#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */

#ifndef NDEBUG
/* For tracing reduce actions, the names of all rules are required.
*/
static const char *const yyRuleName[] = {
1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922
 /*   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",
X
Xiaoyu Wang 已提交
1923
 /*  24 */ "cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt",
1924
 /*  25 */ "cmd ::= ALTER USER user_name PASS NK_STRING",
X
Xiaoyu Wang 已提交
1925 1926 1927 1928 1929 1930 1931 1932 1933
 /*  26 */ "cmd ::= ALTER USER user_name ENABLE NK_INTEGER",
 /*  27 */ "cmd ::= ALTER USER user_name SYSINFO NK_INTEGER",
 /*  28 */ "cmd ::= DROP USER user_name",
 /*  29 */ "sysinfo_opt ::=",
 /*  30 */ "sysinfo_opt ::= SYSINFO NK_INTEGER",
 /*  31 */ "cmd ::= GRANT privileges ON priv_level TO user_name",
 /*  32 */ "cmd ::= REVOKE privileges ON priv_level FROM user_name",
 /*  33 */ "privileges ::= ALL",
 /*  34 */ "privileges ::= priv_type_list",
1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990
 /*  35 */ "privileges ::= SUBSCRIBE",
 /*  36 */ "priv_type_list ::= priv_type",
 /*  37 */ "priv_type_list ::= priv_type_list NK_COMMA priv_type",
 /*  38 */ "priv_type ::= READ",
 /*  39 */ "priv_type ::= WRITE",
 /*  40 */ "priv_level ::= NK_STAR NK_DOT NK_STAR",
 /*  41 */ "priv_level ::= db_name NK_DOT NK_STAR",
 /*  42 */ "priv_level ::= topic_name",
 /*  43 */ "cmd ::= CREATE DNODE dnode_endpoint",
 /*  44 */ "cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER",
 /*  45 */ "cmd ::= DROP DNODE NK_INTEGER force_opt",
 /*  46 */ "cmd ::= DROP DNODE dnode_endpoint force_opt",
 /*  47 */ "cmd ::= ALTER DNODE NK_INTEGER NK_STRING",
 /*  48 */ "cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING",
 /*  49 */ "cmd ::= ALTER ALL DNODES NK_STRING",
 /*  50 */ "cmd ::= ALTER ALL DNODES NK_STRING NK_STRING",
 /*  51 */ "dnode_endpoint ::= NK_STRING",
 /*  52 */ "dnode_endpoint ::= NK_ID",
 /*  53 */ "dnode_endpoint ::= NK_IPTOKEN",
 /*  54 */ "force_opt ::=",
 /*  55 */ "force_opt ::= FORCE",
 /*  56 */ "cmd ::= ALTER LOCAL NK_STRING",
 /*  57 */ "cmd ::= ALTER LOCAL NK_STRING NK_STRING",
 /*  58 */ "cmd ::= CREATE QNODE ON DNODE NK_INTEGER",
 /*  59 */ "cmd ::= DROP QNODE ON DNODE NK_INTEGER",
 /*  60 */ "cmd ::= CREATE BNODE ON DNODE NK_INTEGER",
 /*  61 */ "cmd ::= DROP BNODE ON DNODE NK_INTEGER",
 /*  62 */ "cmd ::= CREATE SNODE ON DNODE NK_INTEGER",
 /*  63 */ "cmd ::= DROP SNODE ON DNODE NK_INTEGER",
 /*  64 */ "cmd ::= CREATE MNODE ON DNODE NK_INTEGER",
 /*  65 */ "cmd ::= DROP MNODE ON DNODE NK_INTEGER",
 /*  66 */ "cmd ::= CREATE DATABASE not_exists_opt db_name db_options",
 /*  67 */ "cmd ::= DROP DATABASE exists_opt db_name",
 /*  68 */ "cmd ::= USE db_name",
 /*  69 */ "cmd ::= ALTER DATABASE db_name alter_db_options",
 /*  70 */ "cmd ::= FLUSH DATABASE db_name",
 /*  71 */ "cmd ::= TRIM DATABASE db_name speed_opt",
 /*  72 */ "not_exists_opt ::= IF NOT EXISTS",
 /*  73 */ "not_exists_opt ::=",
 /*  74 */ "exists_opt ::= IF EXISTS",
 /*  75 */ "exists_opt ::=",
 /*  76 */ "db_options ::=",
 /*  77 */ "db_options ::= db_options BUFFER NK_INTEGER",
 /*  78 */ "db_options ::= db_options CACHEMODEL NK_STRING",
 /*  79 */ "db_options ::= db_options CACHESIZE NK_INTEGER",
 /*  80 */ "db_options ::= db_options COMP NK_INTEGER",
 /*  81 */ "db_options ::= db_options DURATION NK_INTEGER",
 /*  82 */ "db_options ::= db_options DURATION NK_VARIABLE",
 /*  83 */ "db_options ::= db_options MAXROWS NK_INTEGER",
 /*  84 */ "db_options ::= db_options MINROWS NK_INTEGER",
 /*  85 */ "db_options ::= db_options KEEP integer_list",
 /*  86 */ "db_options ::= db_options KEEP variable_list",
 /*  87 */ "db_options ::= db_options PAGES NK_INTEGER",
 /*  88 */ "db_options ::= db_options PAGESIZE NK_INTEGER",
 /*  89 */ "db_options ::= db_options TSDB_PAGESIZE NK_INTEGER",
 /*  90 */ "db_options ::= db_options PRECISION NK_STRING",
 /*  91 */ "db_options ::= db_options REPLICA NK_INTEGER",
1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385
 /*  92 */ "db_options ::= db_options VGROUPS NK_INTEGER",
 /*  93 */ "db_options ::= db_options SINGLE_STABLE NK_INTEGER",
 /*  94 */ "db_options ::= db_options RETENTIONS retention_list",
 /*  95 */ "db_options ::= db_options SCHEMALESS NK_INTEGER",
 /*  96 */ "db_options ::= db_options WAL_LEVEL NK_INTEGER",
 /*  97 */ "db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER",
 /*  98 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER",
 /*  99 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER",
 /* 100 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER",
 /* 101 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER",
 /* 102 */ "db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER",
 /* 103 */ "db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER",
 /* 104 */ "db_options ::= db_options STT_TRIGGER NK_INTEGER",
 /* 105 */ "db_options ::= db_options TABLE_PREFIX NK_INTEGER",
 /* 106 */ "db_options ::= db_options TABLE_SUFFIX NK_INTEGER",
 /* 107 */ "alter_db_options ::= alter_db_option",
 /* 108 */ "alter_db_options ::= alter_db_options alter_db_option",
 /* 109 */ "alter_db_option ::= BUFFER NK_INTEGER",
 /* 110 */ "alter_db_option ::= CACHEMODEL NK_STRING",
 /* 111 */ "alter_db_option ::= CACHESIZE NK_INTEGER",
 /* 112 */ "alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER",
 /* 113 */ "alter_db_option ::= KEEP integer_list",
 /* 114 */ "alter_db_option ::= KEEP variable_list",
 /* 115 */ "alter_db_option ::= PAGES NK_INTEGER",
 /* 116 */ "alter_db_option ::= REPLICA NK_INTEGER",
 /* 117 */ "alter_db_option ::= WAL_LEVEL NK_INTEGER",
 /* 118 */ "alter_db_option ::= STT_TRIGGER NK_INTEGER",
 /* 119 */ "integer_list ::= NK_INTEGER",
 /* 120 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER",
 /* 121 */ "variable_list ::= NK_VARIABLE",
 /* 122 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE",
 /* 123 */ "retention_list ::= retention",
 /* 124 */ "retention_list ::= retention_list NK_COMMA retention",
 /* 125 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE",
 /* 126 */ "speed_opt ::=",
 /* 127 */ "speed_opt ::= MAX_SPEED NK_INTEGER",
 /* 128 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options",
 /* 129 */ "cmd ::= CREATE TABLE multi_create_clause",
 /* 130 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options",
 /* 131 */ "cmd ::= DROP TABLE multi_drop_clause",
 /* 132 */ "cmd ::= DROP STABLE exists_opt full_table_name",
 /* 133 */ "cmd ::= ALTER TABLE alter_table_clause",
 /* 134 */ "cmd ::= ALTER STABLE alter_table_clause",
 /* 135 */ "alter_table_clause ::= full_table_name alter_table_options",
 /* 136 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name",
 /* 137 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name",
 /* 138 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name",
 /* 139 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name",
 /* 140 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name",
 /* 141 */ "alter_table_clause ::= full_table_name DROP TAG column_name",
 /* 142 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name",
 /* 143 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name",
 /* 144 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal",
 /* 145 */ "multi_create_clause ::= create_subtable_clause",
 /* 146 */ "multi_create_clause ::= multi_create_clause create_subtable_clause",
 /* 147 */ "create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options",
 /* 148 */ "multi_drop_clause ::= drop_table_clause",
 /* 149 */ "multi_drop_clause ::= multi_drop_clause drop_table_clause",
 /* 150 */ "drop_table_clause ::= exists_opt full_table_name",
 /* 151 */ "specific_cols_opt ::=",
 /* 152 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP",
 /* 153 */ "full_table_name ::= table_name",
 /* 154 */ "full_table_name ::= db_name NK_DOT table_name",
 /* 155 */ "column_def_list ::= column_def",
 /* 156 */ "column_def_list ::= column_def_list NK_COMMA column_def",
 /* 157 */ "column_def ::= column_name type_name",
 /* 158 */ "column_def ::= column_name type_name COMMENT NK_STRING",
 /* 159 */ "type_name ::= BOOL",
 /* 160 */ "type_name ::= TINYINT",
 /* 161 */ "type_name ::= SMALLINT",
 /* 162 */ "type_name ::= INT",
 /* 163 */ "type_name ::= INTEGER",
 /* 164 */ "type_name ::= BIGINT",
 /* 165 */ "type_name ::= FLOAT",
 /* 166 */ "type_name ::= DOUBLE",
 /* 167 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP",
 /* 168 */ "type_name ::= TIMESTAMP",
 /* 169 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP",
 /* 170 */ "type_name ::= TINYINT UNSIGNED",
 /* 171 */ "type_name ::= SMALLINT UNSIGNED",
 /* 172 */ "type_name ::= INT UNSIGNED",
 /* 173 */ "type_name ::= BIGINT UNSIGNED",
 /* 174 */ "type_name ::= JSON",
 /* 175 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP",
 /* 176 */ "type_name ::= MEDIUMBLOB",
 /* 177 */ "type_name ::= BLOB",
 /* 178 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP",
 /* 179 */ "type_name ::= DECIMAL",
 /* 180 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP",
 /* 181 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP",
 /* 182 */ "tags_def_opt ::=",
 /* 183 */ "tags_def_opt ::= tags_def",
 /* 184 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP",
 /* 185 */ "table_options ::=",
 /* 186 */ "table_options ::= table_options COMMENT NK_STRING",
 /* 187 */ "table_options ::= table_options MAX_DELAY duration_list",
 /* 188 */ "table_options ::= table_options WATERMARK duration_list",
 /* 189 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP",
 /* 190 */ "table_options ::= table_options TTL NK_INTEGER",
 /* 191 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP",
 /* 192 */ "table_options ::= table_options DELETE_MARK duration_list",
 /* 193 */ "alter_table_options ::= alter_table_option",
 /* 194 */ "alter_table_options ::= alter_table_options alter_table_option",
 /* 195 */ "alter_table_option ::= COMMENT NK_STRING",
 /* 196 */ "alter_table_option ::= TTL NK_INTEGER",
 /* 197 */ "duration_list ::= duration_literal",
 /* 198 */ "duration_list ::= duration_list NK_COMMA duration_literal",
 /* 199 */ "rollup_func_list ::= rollup_func_name",
 /* 200 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name",
 /* 201 */ "rollup_func_name ::= function_name",
 /* 202 */ "rollup_func_name ::= FIRST",
 /* 203 */ "rollup_func_name ::= LAST",
 /* 204 */ "col_name_list ::= col_name",
 /* 205 */ "col_name_list ::= col_name_list NK_COMMA col_name",
 /* 206 */ "col_name ::= column_name",
 /* 207 */ "cmd ::= SHOW DNODES",
 /* 208 */ "cmd ::= SHOW USERS",
 /* 209 */ "cmd ::= SHOW USER PRIVILEGES",
 /* 210 */ "cmd ::= SHOW DATABASES",
 /* 211 */ "cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt",
 /* 212 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt",
 /* 213 */ "cmd ::= SHOW db_name_cond_opt VGROUPS",
 /* 214 */ "cmd ::= SHOW MNODES",
 /* 215 */ "cmd ::= SHOW QNODES",
 /* 216 */ "cmd ::= SHOW FUNCTIONS",
 /* 217 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt",
 /* 218 */ "cmd ::= SHOW STREAMS",
 /* 219 */ "cmd ::= SHOW ACCOUNTS",
 /* 220 */ "cmd ::= SHOW APPS",
 /* 221 */ "cmd ::= SHOW CONNECTIONS",
 /* 222 */ "cmd ::= SHOW LICENCES",
 /* 223 */ "cmd ::= SHOW GRANTS",
 /* 224 */ "cmd ::= SHOW CREATE DATABASE db_name",
 /* 225 */ "cmd ::= SHOW CREATE TABLE full_table_name",
 /* 226 */ "cmd ::= SHOW CREATE STABLE full_table_name",
 /* 227 */ "cmd ::= SHOW QUERIES",
 /* 228 */ "cmd ::= SHOW SCORES",
 /* 229 */ "cmd ::= SHOW TOPICS",
 /* 230 */ "cmd ::= SHOW VARIABLES",
 /* 231 */ "cmd ::= SHOW CLUSTER VARIABLES",
 /* 232 */ "cmd ::= SHOW LOCAL VARIABLES",
 /* 233 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt",
 /* 234 */ "cmd ::= SHOW BNODES",
 /* 235 */ "cmd ::= SHOW SNODES",
 /* 236 */ "cmd ::= SHOW CLUSTER",
 /* 237 */ "cmd ::= SHOW TRANSACTIONS",
 /* 238 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name",
 /* 239 */ "cmd ::= SHOW CONSUMERS",
 /* 240 */ "cmd ::= SHOW SUBSCRIPTIONS",
 /* 241 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt",
 /* 242 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt",
 /* 243 */ "cmd ::= SHOW VNODES NK_INTEGER",
 /* 244 */ "cmd ::= SHOW VNODES NK_STRING",
 /* 245 */ "db_name_cond_opt ::=",
 /* 246 */ "db_name_cond_opt ::= db_name NK_DOT",
 /* 247 */ "like_pattern_opt ::=",
 /* 248 */ "like_pattern_opt ::= LIKE NK_STRING",
 /* 249 */ "table_name_cond ::= table_name",
 /* 250 */ "from_db_opt ::=",
 /* 251 */ "from_db_opt ::= FROM db_name",
 /* 252 */ "tag_list_opt ::=",
 /* 253 */ "tag_list_opt ::= tag_item",
 /* 254 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item",
 /* 255 */ "tag_item ::= TBNAME",
 /* 256 */ "tag_item ::= QTAGS",
 /* 257 */ "tag_item ::= column_name",
 /* 258 */ "tag_item ::= column_name column_alias",
 /* 259 */ "tag_item ::= column_name AS column_alias",
 /* 260 */ "cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options",
 /* 261 */ "cmd ::= DROP INDEX exists_opt full_table_name",
 /* 262 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt",
 /* 263 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt",
 /* 264 */ "func_list ::= func",
 /* 265 */ "func_list ::= func_list NK_COMMA func",
 /* 266 */ "func ::= function_name NK_LP expression_list NK_RP",
 /* 267 */ "sma_stream_opt ::=",
 /* 268 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal",
 /* 269 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal",
 /* 270 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal",
 /* 271 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery",
 /* 272 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name",
 /* 273 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name",
 /* 274 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name",
 /* 275 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name",
 /* 276 */ "cmd ::= DROP TOPIC exists_opt topic_name",
 /* 277 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name",
 /* 278 */ "cmd ::= DESC full_table_name",
 /* 279 */ "cmd ::= DESCRIBE full_table_name",
 /* 280 */ "cmd ::= RESET QUERY CACHE",
 /* 281 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery",
 /* 282 */ "analyze_opt ::=",
 /* 283 */ "analyze_opt ::= ANALYZE",
 /* 284 */ "explain_options ::=",
 /* 285 */ "explain_options ::= explain_options VERBOSE NK_BOOL",
 /* 286 */ "explain_options ::= explain_options RATIO NK_FLOAT",
 /* 287 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt",
 /* 288 */ "cmd ::= DROP FUNCTION exists_opt function_name",
 /* 289 */ "agg_func_opt ::=",
 /* 290 */ "agg_func_opt ::= AGGREGATE",
 /* 291 */ "bufsize_opt ::=",
 /* 292 */ "bufsize_opt ::= BUFSIZE NK_INTEGER",
 /* 293 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery",
 /* 294 */ "cmd ::= DROP STREAM exists_opt stream_name",
 /* 295 */ "stream_options ::=",
 /* 296 */ "stream_options ::= stream_options TRIGGER AT_ONCE",
 /* 297 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE",
 /* 298 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal",
 /* 299 */ "stream_options ::= stream_options WATERMARK duration_literal",
 /* 300 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER",
 /* 301 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER",
 /* 302 */ "subtable_opt ::=",
 /* 303 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP",
 /* 304 */ "cmd ::= KILL CONNECTION NK_INTEGER",
 /* 305 */ "cmd ::= KILL QUERY NK_STRING",
 /* 306 */ "cmd ::= KILL TRANSACTION NK_INTEGER",
 /* 307 */ "cmd ::= BALANCE VGROUP",
 /* 308 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER",
 /* 309 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list",
 /* 310 */ "cmd ::= SPLIT VGROUP NK_INTEGER",
 /* 311 */ "dnode_list ::= DNODE NK_INTEGER",
 /* 312 */ "dnode_list ::= dnode_list DNODE NK_INTEGER",
 /* 313 */ "cmd ::= DELETE FROM full_table_name where_clause_opt",
 /* 314 */ "cmd ::= query_or_subquery",
 /* 315 */ "cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery",
 /* 316 */ "cmd ::= INSERT INTO full_table_name query_or_subquery",
 /* 317 */ "literal ::= NK_INTEGER",
 /* 318 */ "literal ::= NK_FLOAT",
 /* 319 */ "literal ::= NK_STRING",
 /* 320 */ "literal ::= NK_BOOL",
 /* 321 */ "literal ::= TIMESTAMP NK_STRING",
 /* 322 */ "literal ::= duration_literal",
 /* 323 */ "literal ::= NULL",
 /* 324 */ "literal ::= NK_QUESTION",
 /* 325 */ "duration_literal ::= NK_VARIABLE",
 /* 326 */ "signed ::= NK_INTEGER",
 /* 327 */ "signed ::= NK_PLUS NK_INTEGER",
 /* 328 */ "signed ::= NK_MINUS NK_INTEGER",
 /* 329 */ "signed ::= NK_FLOAT",
 /* 330 */ "signed ::= NK_PLUS NK_FLOAT",
 /* 331 */ "signed ::= NK_MINUS NK_FLOAT",
 /* 332 */ "signed_literal ::= signed",
 /* 333 */ "signed_literal ::= NK_STRING",
 /* 334 */ "signed_literal ::= NK_BOOL",
 /* 335 */ "signed_literal ::= TIMESTAMP NK_STRING",
 /* 336 */ "signed_literal ::= duration_literal",
 /* 337 */ "signed_literal ::= NULL",
 /* 338 */ "signed_literal ::= literal_func",
 /* 339 */ "signed_literal ::= NK_QUESTION",
 /* 340 */ "literal_list ::= signed_literal",
 /* 341 */ "literal_list ::= literal_list NK_COMMA signed_literal",
 /* 342 */ "db_name ::= NK_ID",
 /* 343 */ "table_name ::= NK_ID",
 /* 344 */ "column_name ::= NK_ID",
 /* 345 */ "function_name ::= NK_ID",
 /* 346 */ "table_alias ::= NK_ID",
 /* 347 */ "column_alias ::= NK_ID",
 /* 348 */ "user_name ::= NK_ID",
 /* 349 */ "topic_name ::= NK_ID",
 /* 350 */ "stream_name ::= NK_ID",
 /* 351 */ "cgroup_name ::= NK_ID",
 /* 352 */ "expr_or_subquery ::= expression",
 /* 353 */ "expression ::= literal",
 /* 354 */ "expression ::= pseudo_column",
 /* 355 */ "expression ::= column_reference",
 /* 356 */ "expression ::= function_expression",
 /* 357 */ "expression ::= case_when_expression",
 /* 358 */ "expression ::= NK_LP expression NK_RP",
 /* 359 */ "expression ::= NK_PLUS expr_or_subquery",
 /* 360 */ "expression ::= NK_MINUS expr_or_subquery",
 /* 361 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery",
 /* 362 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery",
 /* 363 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery",
 /* 364 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery",
 /* 365 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery",
 /* 366 */ "expression ::= column_reference NK_ARROW NK_STRING",
 /* 367 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery",
 /* 368 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery",
 /* 369 */ "expression_list ::= expr_or_subquery",
 /* 370 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery",
 /* 371 */ "column_reference ::= column_name",
 /* 372 */ "column_reference ::= table_name NK_DOT column_name",
 /* 373 */ "pseudo_column ::= ROWTS",
 /* 374 */ "pseudo_column ::= TBNAME",
 /* 375 */ "pseudo_column ::= table_name NK_DOT TBNAME",
 /* 376 */ "pseudo_column ::= QSTART",
 /* 377 */ "pseudo_column ::= QEND",
 /* 378 */ "pseudo_column ::= QDURATION",
 /* 379 */ "pseudo_column ::= WSTART",
 /* 380 */ "pseudo_column ::= WEND",
 /* 381 */ "pseudo_column ::= WDURATION",
 /* 382 */ "pseudo_column ::= IROWTS",
 /* 383 */ "pseudo_column ::= QTAGS",
 /* 384 */ "function_expression ::= function_name NK_LP expression_list NK_RP",
 /* 385 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP",
 /* 386 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP",
 /* 387 */ "function_expression ::= literal_func",
 /* 388 */ "literal_func ::= noarg_func NK_LP NK_RP",
 /* 389 */ "literal_func ::= NOW",
 /* 390 */ "noarg_func ::= NOW",
 /* 391 */ "noarg_func ::= TODAY",
 /* 392 */ "noarg_func ::= TIMEZONE",
 /* 393 */ "noarg_func ::= DATABASE",
 /* 394 */ "noarg_func ::= CLIENT_VERSION",
 /* 395 */ "noarg_func ::= SERVER_VERSION",
 /* 396 */ "noarg_func ::= SERVER_STATUS",
 /* 397 */ "noarg_func ::= CURRENT_USER",
 /* 398 */ "noarg_func ::= USER",
 /* 399 */ "star_func ::= COUNT",
 /* 400 */ "star_func ::= FIRST",
 /* 401 */ "star_func ::= LAST",
 /* 402 */ "star_func ::= LAST_ROW",
 /* 403 */ "star_func_para_list ::= NK_STAR",
 /* 404 */ "star_func_para_list ::= other_para_list",
 /* 405 */ "other_para_list ::= star_func_para",
 /* 406 */ "other_para_list ::= other_para_list NK_COMMA star_func_para",
 /* 407 */ "star_func_para ::= expr_or_subquery",
 /* 408 */ "star_func_para ::= table_name NK_DOT NK_STAR",
 /* 409 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END",
 /* 410 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END",
 /* 411 */ "when_then_list ::= when_then_expr",
 /* 412 */ "when_then_list ::= when_then_list when_then_expr",
 /* 413 */ "when_then_expr ::= WHEN common_expression THEN common_expression",
 /* 414 */ "case_when_else_opt ::=",
 /* 415 */ "case_when_else_opt ::= ELSE common_expression",
 /* 416 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery",
 /* 417 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery",
 /* 418 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery",
 /* 419 */ "predicate ::= expr_or_subquery IS NULL",
 /* 420 */ "predicate ::= expr_or_subquery IS NOT NULL",
 /* 421 */ "predicate ::= expr_or_subquery in_op in_predicate_value",
 /* 422 */ "compare_op ::= NK_LT",
 /* 423 */ "compare_op ::= NK_GT",
 /* 424 */ "compare_op ::= NK_LE",
 /* 425 */ "compare_op ::= NK_GE",
 /* 426 */ "compare_op ::= NK_NE",
 /* 427 */ "compare_op ::= NK_EQ",
 /* 428 */ "compare_op ::= LIKE",
 /* 429 */ "compare_op ::= NOT LIKE",
 /* 430 */ "compare_op ::= MATCH",
 /* 431 */ "compare_op ::= NMATCH",
 /* 432 */ "compare_op ::= CONTAINS",
 /* 433 */ "in_op ::= IN",
 /* 434 */ "in_op ::= NOT IN",
 /* 435 */ "in_predicate_value ::= NK_LP literal_list NK_RP",
 /* 436 */ "boolean_value_expression ::= boolean_primary",
 /* 437 */ "boolean_value_expression ::= NOT boolean_primary",
 /* 438 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression",
 /* 439 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression",
 /* 440 */ "boolean_primary ::= predicate",
 /* 441 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP",
 /* 442 */ "common_expression ::= expr_or_subquery",
 /* 443 */ "common_expression ::= boolean_value_expression",
 /* 444 */ "from_clause_opt ::=",
 /* 445 */ "from_clause_opt ::= FROM table_reference_list",
 /* 446 */ "table_reference_list ::= table_reference",
 /* 447 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference",
 /* 448 */ "table_reference ::= table_primary",
 /* 449 */ "table_reference ::= joined_table",
 /* 450 */ "table_primary ::= table_name alias_opt",
 /* 451 */ "table_primary ::= db_name NK_DOT table_name alias_opt",
 /* 452 */ "table_primary ::= subquery alias_opt",
 /* 453 */ "table_primary ::= parenthesized_joined_table",
 /* 454 */ "alias_opt ::=",
 /* 455 */ "alias_opt ::= table_alias",
 /* 456 */ "alias_opt ::= AS table_alias",
 /* 457 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP",
 /* 458 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP",
 /* 459 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition",
 /* 460 */ "join_type ::=",
 /* 461 */ "join_type ::= INNER",
 /* 462 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt",
 /* 463 */ "set_quantifier_opt ::=",
 /* 464 */ "set_quantifier_opt ::= DISTINCT",
 /* 465 */ "set_quantifier_opt ::= ALL",
 /* 466 */ "select_list ::= select_item",
 /* 467 */ "select_list ::= select_list NK_COMMA select_item",
 /* 468 */ "select_item ::= NK_STAR",
 /* 469 */ "select_item ::= common_expression",
 /* 470 */ "select_item ::= common_expression column_alias",
 /* 471 */ "select_item ::= common_expression AS column_alias",
 /* 472 */ "select_item ::= table_name NK_DOT NK_STAR",
 /* 473 */ "where_clause_opt ::=",
 /* 474 */ "where_clause_opt ::= WHERE search_condition",
 /* 475 */ "partition_by_clause_opt ::=",
 /* 476 */ "partition_by_clause_opt ::= PARTITION BY partition_list",
 /* 477 */ "partition_list ::= partition_item",
 /* 478 */ "partition_list ::= partition_list NK_COMMA partition_item",
 /* 479 */ "partition_item ::= expr_or_subquery",
 /* 480 */ "partition_item ::= expr_or_subquery column_alias",
 /* 481 */ "partition_item ::= expr_or_subquery AS column_alias",
 /* 482 */ "twindow_clause_opt ::=",
 /* 483 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP",
 /* 484 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP",
 /* 485 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt",
 /* 486 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt",
X
Xiaoyu Wang 已提交
2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437
 /* 487 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition",
 /* 488 */ "sliding_opt ::=",
 /* 489 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP",
 /* 490 */ "fill_opt ::=",
 /* 491 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP",
 /* 492 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP",
 /* 493 */ "fill_mode ::= NONE",
 /* 494 */ "fill_mode ::= PREV",
 /* 495 */ "fill_mode ::= NULL",
 /* 496 */ "fill_mode ::= LINEAR",
 /* 497 */ "fill_mode ::= NEXT",
 /* 498 */ "group_by_clause_opt ::=",
 /* 499 */ "group_by_clause_opt ::= GROUP BY group_by_list",
 /* 500 */ "group_by_list ::= expr_or_subquery",
 /* 501 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery",
 /* 502 */ "having_clause_opt ::=",
 /* 503 */ "having_clause_opt ::= HAVING search_condition",
 /* 504 */ "range_opt ::=",
 /* 505 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP",
 /* 506 */ "every_opt ::=",
 /* 507 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP",
 /* 508 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt",
 /* 509 */ "query_simple ::= query_specification",
 /* 510 */ "query_simple ::= union_query_expression",
 /* 511 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery",
 /* 512 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery",
 /* 513 */ "query_simple_or_subquery ::= query_simple",
 /* 514 */ "query_simple_or_subquery ::= subquery",
 /* 515 */ "query_or_subquery ::= query_expression",
 /* 516 */ "query_or_subquery ::= subquery",
 /* 517 */ "order_by_clause_opt ::=",
 /* 518 */ "order_by_clause_opt ::= ORDER BY sort_specification_list",
 /* 519 */ "slimit_clause_opt ::=",
 /* 520 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER",
 /* 521 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER",
 /* 522 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER",
 /* 523 */ "limit_clause_opt ::=",
 /* 524 */ "limit_clause_opt ::= LIMIT NK_INTEGER",
 /* 525 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER",
 /* 526 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER",
 /* 527 */ "subquery ::= NK_LP query_expression NK_RP",
 /* 528 */ "subquery ::= NK_LP subquery NK_RP",
 /* 529 */ "search_condition ::= common_expression",
 /* 530 */ "sort_specification_list ::= sort_specification",
 /* 531 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification",
 /* 532 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt",
 /* 533 */ "ordering_specification_opt ::=",
 /* 534 */ "ordering_specification_opt ::= ASC",
 /* 535 */ "ordering_specification_opt ::= DESC",
 /* 536 */ "null_ordering_opt ::=",
 /* 537 */ "null_ordering_opt ::= NULLS FIRST",
 /* 538 */ "null_ordering_opt ::= NULLS LAST",
2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454
};
#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 ){
X
Xiaoyu Wang 已提交
2455
    pNew = malloc(newSize*sizeof(pNew[0]));
2456 2457
    if( pNew ) pNew[0] = p->yystk0;
  }else{
X
Xiaoyu Wang 已提交
2458
    pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475
  }
  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
X
Xiaoyu Wang 已提交
2476
** second argument to ParseAlloc() below.  This can be changed by
2477 2478 2479 2480 2481 2482 2483 2484 2485
** 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.
*/
X
Xiaoyu Wang 已提交
2486
void ParseInit(void *yypRawParser ParseCTX_PDECL){
2487
  yyParser *yypParser = (yyParser*)yypRawParser;
X
Xiaoyu Wang 已提交
2488
  ParseCTX_STORE
2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511
#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
}

X
Xiaoyu Wang 已提交
2512
#ifndef Parse_ENGINEALWAYSONSTACK
2513 2514 2515 2516 2517 2518 2519 2520 2521 2522
/* 
** 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
X
Xiaoyu Wang 已提交
2523
** to Parse and ParseFree.
2524
*/
X
Xiaoyu Wang 已提交
2525
void *ParseAlloc(void *(*mallocProc)(YYMALLOCARGTYPE) ParseCTX_PDECL){
2526 2527 2528
  yyParser *yypParser;
  yypParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
  if( yypParser ){
X
Xiaoyu Wang 已提交
2529 2530
    ParseCTX_STORE
    ParseInit(yypParser ParseCTX_PARAM);
2531 2532 2533
  }
  return (void*)yypParser;
}
X
Xiaoyu Wang 已提交
2534
#endif /* Parse_ENGINEALWAYSONSTACK */
2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548


/* 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 */
){
X
Xiaoyu Wang 已提交
2549 2550
  ParseARG_FETCH
  ParseCTX_FETCH
2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563
  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 */
X
Xiaoyu Wang 已提交
2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632
    case 324: /* cmd */
    case 327: /* literal */
    case 340: /* db_options */
    case 342: /* alter_db_options */
    case 348: /* retention */
    case 349: /* full_table_name */
    case 352: /* table_options */
    case 356: /* alter_table_clause */
    case 357: /* alter_table_options */
    case 360: /* signed_literal */
    case 361: /* create_subtable_clause */
    case 364: /* drop_table_clause */
    case 367: /* column_def */
    case 371: /* duration_literal */
    case 372: /* rollup_func_name */
    case 374: /* col_name */
    case 375: /* db_name_cond_opt */
    case 376: /* like_pattern_opt */
    case 377: /* table_name_cond */
    case 378: /* from_db_opt */
    case 380: /* tag_item */
    case 382: /* index_options */
    case 384: /* sliding_opt */
    case 385: /* sma_stream_opt */
    case 386: /* func */
    case 387: /* query_or_subquery */
    case 390: /* explain_options */
    case 394: /* stream_options */
    case 395: /* subtable_opt */
    case 396: /* expression */
    case 398: /* where_clause_opt */
    case 399: /* signed */
    case 400: /* literal_func */
    case 403: /* expr_or_subquery */
    case 404: /* pseudo_column */
    case 405: /* column_reference */
    case 406: /* function_expression */
    case 407: /* case_when_expression */
    case 412: /* star_func_para */
    case 414: /* case_when_else_opt */
    case 415: /* common_expression */
    case 416: /* when_then_expr */
    case 417: /* predicate */
    case 420: /* in_predicate_value */
    case 421: /* boolean_value_expression */
    case 422: /* boolean_primary */
    case 423: /* from_clause_opt */
    case 424: /* table_reference_list */
    case 425: /* table_reference */
    case 426: /* table_primary */
    case 427: /* joined_table */
    case 429: /* subquery */
    case 430: /* parenthesized_joined_table */
    case 432: /* search_condition */
    case 433: /* query_specification */
    case 437: /* range_opt */
    case 438: /* every_opt */
    case 439: /* fill_opt */
    case 440: /* twindow_clause_opt */
    case 442: /* having_clause_opt */
    case 443: /* select_item */
    case 445: /* partition_item */
    case 448: /* query_expression */
    case 449: /* query_simple */
    case 451: /* slimit_clause_opt */
    case 452: /* limit_clause_opt */
    case 453: /* union_query_expression */
    case 454: /* query_simple_or_subquery */
    case 456: /* sort_specification */
X
Xiaoyu Wang 已提交
2633
{
X
Xiaoyu Wang 已提交
2634
 nodesDestroyNode((yypminor->yy74)); 
X
Xiaoyu Wang 已提交
2635 2636
}
      break;
X
Xiaoyu Wang 已提交
2637 2638 2639 2640 2641
    case 325: /* account_options */
    case 326: /* alter_account_options */
    case 328: /* alter_account_option */
    case 343: /* speed_opt */
    case 392: /* bufsize_opt */
2642
{
X
Xiaoyu Wang 已提交
2643
 
2644 2645
}
      break;
X
Xiaoyu Wang 已提交
2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660
    case 329: /* user_name */
    case 332: /* priv_level */
    case 335: /* db_name */
    case 336: /* topic_name */
    case 337: /* dnode_endpoint */
    case 358: /* column_name */
    case 366: /* table_name */
    case 373: /* function_name */
    case 381: /* column_alias */
    case 388: /* cgroup_name */
    case 393: /* stream_name */
    case 402: /* table_alias */
    case 408: /* star_func */
    case 410: /* noarg_func */
    case 428: /* alias_opt */
2661
{
2662
 
2663 2664
}
      break;
X
Xiaoyu Wang 已提交
2665
    case 330: /* sysinfo_opt */
2666
{
2667
 
2668 2669
}
      break;
X
Xiaoyu Wang 已提交
2670 2671 2672
    case 331: /* privileges */
    case 333: /* priv_type_list */
    case 334: /* priv_type */
2673
{
2674
 
2675 2676
}
      break;
X
Xiaoyu Wang 已提交
2677 2678 2679 2680 2681 2682
    case 338: /* force_opt */
    case 339: /* not_exists_opt */
    case 341: /* exists_opt */
    case 389: /* analyze_opt */
    case 391: /* agg_func_opt */
    case 434: /* set_quantifier_opt */
2683
{
2684 2685 2686
 
}
      break;
X
Xiaoyu Wang 已提交
2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713
    case 344: /* integer_list */
    case 345: /* variable_list */
    case 346: /* retention_list */
    case 350: /* column_def_list */
    case 351: /* tags_def_opt */
    case 353: /* multi_create_clause */
    case 354: /* tags_def */
    case 355: /* multi_drop_clause */
    case 362: /* specific_cols_opt */
    case 363: /* expression_list */
    case 365: /* col_name_list */
    case 368: /* duration_list */
    case 369: /* rollup_func_list */
    case 379: /* tag_list_opt */
    case 383: /* func_list */
    case 397: /* dnode_list */
    case 401: /* literal_list */
    case 409: /* star_func_para_list */
    case 411: /* other_para_list */
    case 413: /* when_then_list */
    case 435: /* select_list */
    case 436: /* partition_by_clause_opt */
    case 441: /* group_by_clause_opt */
    case 444: /* partition_list */
    case 447: /* group_by_list */
    case 450: /* order_by_clause_opt */
    case 455: /* sort_specification_list */
2714
{
X
Xiaoyu Wang 已提交
2715
 nodesDestroyList((yypminor->yy874)); 
2716 2717
}
      break;
X
Xiaoyu Wang 已提交
2718 2719
    case 347: /* alter_db_option */
    case 370: /* alter_table_option */
2720
{
X
Xiaoyu Wang 已提交
2721
 
2722 2723
}
      break;
X
Xiaoyu Wang 已提交
2724
    case 359: /* type_name */
2725
{
2726
 
2727 2728
}
      break;
X
Xiaoyu Wang 已提交
2729 2730
    case 418: /* compare_op */
    case 419: /* in_op */
2731
{
2732
 
2733 2734
}
      break;
X
Xiaoyu Wang 已提交
2735
    case 431: /* join_type */
2736
{
2737
 
2738 2739
}
      break;
X
Xiaoyu Wang 已提交
2740
    case 446: /* fill_mode */
2741
{
2742
 
2743 2744
}
      break;
X
Xiaoyu Wang 已提交
2745
    case 457: /* ordering_specification_opt */
2746
{
2747
 
2748 2749
}
      break;
X
Xiaoyu Wang 已提交
2750
    case 458: /* null_ordering_opt */
2751
{
2752
 
2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783
}
      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
*/
X
Xiaoyu Wang 已提交
2784
void ParseFinalize(void *p){
2785 2786 2787
  yyParser *pParser = (yyParser*)p;
  while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser);
#if YYSTACKDEPTH<=0
X
Xiaoyu Wang 已提交
2788
  if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack);
2789 2790 2791
#endif
}

X
Xiaoyu Wang 已提交
2792
#ifndef Parse_ENGINEALWAYSONSTACK
2793 2794 2795 2796 2797 2798 2799 2800
/* 
** 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.
*/
X
Xiaoyu Wang 已提交
2801
void ParseFree(
2802 2803 2804 2805 2806 2807
  void *p,                    /* The parser to be deleted */
  void (*freeProc)(void*)     /* Function used to reclaim memory */
){
#ifndef YYPARSEFREENEVERNULL
  if( p==0 ) return;
#endif
X
Xiaoyu Wang 已提交
2808
  ParseFinalize(p);
2809 2810
  (*freeProc)(p);
}
X
Xiaoyu Wang 已提交
2811
#endif /* Parse_ENGINEALWAYSONSTACK */
2812 2813 2814 2815 2816

/*
** Return the peak depth of the stack for a parser.
*/
#ifdef YYTRACKMAXSTACKDEPTH
X
Xiaoyu Wang 已提交
2817
int ParseStackPeak(void *p){
2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840
  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)
X
Xiaoyu Wang 已提交
2841
int ParseCoverage(FILE *out){
2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877
  int stateno, iLookAhead, i;
  int nMissed = 0;
  for(stateno=0; stateno<YYNSTATE; stateno++){
    i = yy_shift_ofst[stateno];
    for(iLookAhead=0; iLookAhead<YYNTOKEN; iLookAhead++){
      if( yy_lookahead[i+iLookAhead]!=iLookAhead ) continue;
      if( yycoverage[stateno][iLookAhead]==0 ) nMissed++;
      if( out ){
        fprintf(out,"State %d lookahead %s %s\n", stateno,
                yyTokenName[iLookAhead],
                yycoverage[stateno][iLookAhead] ? "ok" : "missed");
      }
    }
  }
  return nMissed;
}
#endif

/*
** Find the appropriate action for a parser given the terminal
** look-ahead token iLookAhead.
*/
static YYACTIONTYPE yy_find_shift_action(
  YYCODETYPE iLookAhead,    /* The look-ahead token */
  YYACTIONTYPE stateno      /* Current state number */
){
  int i;

  if( stateno>YY_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 );
X
Xiaoyu Wang 已提交
2878
    /* assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD ); */
2879 2880 2881
    assert( iLookAhead!=YYNOCODE );
    assert( iLookAhead < YYNTOKEN );
    i += iLookAhead;
X
Xiaoyu Wang 已提交
2882
    if( i>=YY_NLOOKAHEAD || yy_lookahead[i]!=iLookAhead ){
2883 2884
#ifdef YYFALLBACK
      YYCODETYPE iFallback;            /* Fallback token */
X
Xiaoyu Wang 已提交
2885 2886
      if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
             && (iFallback = yyFallback[iLookAhead])!=0 ){
2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900
#ifndef NDEBUG
        if( yyTraceFILE ){
          fprintf(yyTraceFILE, "%sFALLBACK %s => %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;
X
Xiaoyu Wang 已提交
2901 2902 2903 2904 2905 2906 2907 2908 2909 2910
        if( 
#if YY_SHIFT_MIN+YYWILDCARD<0
          j>=0 &&
#endif
#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT
          j<YY_ACTTAB_COUNT &&
#endif
          j<(int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])) &&
          yy_lookahead[j]==YYWILDCARD && iLookAhead>0
        ){
2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962
#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 && i<YY_ACTTAB_COUNT );
  assert( yy_lookahead[i]==iLookAhead );
#endif
  return yy_action[i];
}

/*
** The following routine is called if the stack overflows.
*/
static void yyStackOverflow(yyParser *yypParser){
X
Xiaoyu Wang 已提交
2963 2964
   ParseARG_FETCH
   ParseCTX_FETCH
2965 2966 2967 2968 2969 2970 2971 2972 2973 2974
#ifndef NDEBUG
   if( yyTraceFILE ){
     fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
   }
#endif
   while( yypParser->yytos>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 ********************************************/
X
Xiaoyu Wang 已提交
2975 2976
   ParseARG_STORE /* Suppress warning about unused %extra_argument var */
   ParseCTX_STORE
2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006
}

/*
** Print tracing information for a SHIFT action
*/
#ifndef NDEBUG
static void yyTraceShift(yyParser *yypParser, int yyNewState, const char *zTag){
  if( yyTraceFILE ){
    if( yyNewState<YYNSTATE ){
      fprintf(yyTraceFILE,"%s%s '%s', go to state %d\n",
         yyTracePrompt, zTag, yyTokenName[yypParser->yytos->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 */
X
Xiaoyu Wang 已提交
3007
  ParseTOKENTYPE yyMinor        /* The minor token to shift in */
3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041
){
  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");
}

X
Xiaoyu Wang 已提交
3042 3043 3044 3045 3046 3047 3048
/* 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[] = {
X
Xiaoyu Wang 已提交
3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140
  {  324,   -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */
  {  324,   -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */
  {  325,    0 }, /* (2) account_options ::= */
  {  325,   -3 }, /* (3) account_options ::= account_options PPS literal */
  {  325,   -3 }, /* (4) account_options ::= account_options TSERIES literal */
  {  325,   -3 }, /* (5) account_options ::= account_options STORAGE literal */
  {  325,   -3 }, /* (6) account_options ::= account_options STREAMS literal */
  {  325,   -3 }, /* (7) account_options ::= account_options QTIME literal */
  {  325,   -3 }, /* (8) account_options ::= account_options DBS literal */
  {  325,   -3 }, /* (9) account_options ::= account_options USERS literal */
  {  325,   -3 }, /* (10) account_options ::= account_options CONNS literal */
  {  325,   -3 }, /* (11) account_options ::= account_options STATE literal */
  {  326,   -1 }, /* (12) alter_account_options ::= alter_account_option */
  {  326,   -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */
  {  328,   -2 }, /* (14) alter_account_option ::= PASS literal */
  {  328,   -2 }, /* (15) alter_account_option ::= PPS literal */
  {  328,   -2 }, /* (16) alter_account_option ::= TSERIES literal */
  {  328,   -2 }, /* (17) alter_account_option ::= STORAGE literal */
  {  328,   -2 }, /* (18) alter_account_option ::= STREAMS literal */
  {  328,   -2 }, /* (19) alter_account_option ::= QTIME literal */
  {  328,   -2 }, /* (20) alter_account_option ::= DBS literal */
  {  328,   -2 }, /* (21) alter_account_option ::= USERS literal */
  {  328,   -2 }, /* (22) alter_account_option ::= CONNS literal */
  {  328,   -2 }, /* (23) alter_account_option ::= STATE literal */
  {  324,   -6 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */
  {  324,   -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */
  {  324,   -5 }, /* (26) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */
  {  324,   -5 }, /* (27) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */
  {  324,   -3 }, /* (28) cmd ::= DROP USER user_name */
  {  330,    0 }, /* (29) sysinfo_opt ::= */
  {  330,   -2 }, /* (30) sysinfo_opt ::= SYSINFO NK_INTEGER */
  {  324,   -6 }, /* (31) cmd ::= GRANT privileges ON priv_level TO user_name */
  {  324,   -6 }, /* (32) cmd ::= REVOKE privileges ON priv_level FROM user_name */
  {  331,   -1 }, /* (33) privileges ::= ALL */
  {  331,   -1 }, /* (34) privileges ::= priv_type_list */
  {  331,   -1 }, /* (35) privileges ::= SUBSCRIBE */
  {  333,   -1 }, /* (36) priv_type_list ::= priv_type */
  {  333,   -3 }, /* (37) priv_type_list ::= priv_type_list NK_COMMA priv_type */
  {  334,   -1 }, /* (38) priv_type ::= READ */
  {  334,   -1 }, /* (39) priv_type ::= WRITE */
  {  332,   -3 }, /* (40) priv_level ::= NK_STAR NK_DOT NK_STAR */
  {  332,   -3 }, /* (41) priv_level ::= db_name NK_DOT NK_STAR */
  {  332,   -1 }, /* (42) priv_level ::= topic_name */
  {  324,   -3 }, /* (43) cmd ::= CREATE DNODE dnode_endpoint */
  {  324,   -5 }, /* (44) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */
  {  324,   -4 }, /* (45) cmd ::= DROP DNODE NK_INTEGER force_opt */
  {  324,   -4 }, /* (46) cmd ::= DROP DNODE dnode_endpoint force_opt */
  {  324,   -4 }, /* (47) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */
  {  324,   -5 }, /* (48) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */
  {  324,   -4 }, /* (49) cmd ::= ALTER ALL DNODES NK_STRING */
  {  324,   -5 }, /* (50) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */
  {  337,   -1 }, /* (51) dnode_endpoint ::= NK_STRING */
  {  337,   -1 }, /* (52) dnode_endpoint ::= NK_ID */
  {  337,   -1 }, /* (53) dnode_endpoint ::= NK_IPTOKEN */
  {  338,    0 }, /* (54) force_opt ::= */
  {  338,   -1 }, /* (55) force_opt ::= FORCE */
  {  324,   -3 }, /* (56) cmd ::= ALTER LOCAL NK_STRING */
  {  324,   -4 }, /* (57) cmd ::= ALTER LOCAL NK_STRING NK_STRING */
  {  324,   -5 }, /* (58) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */
  {  324,   -5 }, /* (59) cmd ::= DROP QNODE ON DNODE NK_INTEGER */
  {  324,   -5 }, /* (60) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */
  {  324,   -5 }, /* (61) cmd ::= DROP BNODE ON DNODE NK_INTEGER */
  {  324,   -5 }, /* (62) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */
  {  324,   -5 }, /* (63) cmd ::= DROP SNODE ON DNODE NK_INTEGER */
  {  324,   -5 }, /* (64) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */
  {  324,   -5 }, /* (65) cmd ::= DROP MNODE ON DNODE NK_INTEGER */
  {  324,   -5 }, /* (66) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
  {  324,   -4 }, /* (67) cmd ::= DROP DATABASE exists_opt db_name */
  {  324,   -2 }, /* (68) cmd ::= USE db_name */
  {  324,   -4 }, /* (69) cmd ::= ALTER DATABASE db_name alter_db_options */
  {  324,   -3 }, /* (70) cmd ::= FLUSH DATABASE db_name */
  {  324,   -4 }, /* (71) cmd ::= TRIM DATABASE db_name speed_opt */
  {  339,   -3 }, /* (72) not_exists_opt ::= IF NOT EXISTS */
  {  339,    0 }, /* (73) not_exists_opt ::= */
  {  341,   -2 }, /* (74) exists_opt ::= IF EXISTS */
  {  341,    0 }, /* (75) exists_opt ::= */
  {  340,    0 }, /* (76) db_options ::= */
  {  340,   -3 }, /* (77) db_options ::= db_options BUFFER NK_INTEGER */
  {  340,   -3 }, /* (78) db_options ::= db_options CACHEMODEL NK_STRING */
  {  340,   -3 }, /* (79) db_options ::= db_options CACHESIZE NK_INTEGER */
  {  340,   -3 }, /* (80) db_options ::= db_options COMP NK_INTEGER */
  {  340,   -3 }, /* (81) db_options ::= db_options DURATION NK_INTEGER */
  {  340,   -3 }, /* (82) db_options ::= db_options DURATION NK_VARIABLE */
  {  340,   -3 }, /* (83) db_options ::= db_options MAXROWS NK_INTEGER */
  {  340,   -3 }, /* (84) db_options ::= db_options MINROWS NK_INTEGER */
  {  340,   -3 }, /* (85) db_options ::= db_options KEEP integer_list */
  {  340,   -3 }, /* (86) db_options ::= db_options KEEP variable_list */
  {  340,   -3 }, /* (87) db_options ::= db_options PAGES NK_INTEGER */
  {  340,   -3 }, /* (88) db_options ::= db_options PAGESIZE NK_INTEGER */
  {  340,   -3 }, /* (89) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */
  {  340,   -3 }, /* (90) db_options ::= db_options PRECISION NK_STRING */
  {  340,   -3 }, /* (91) db_options ::= db_options REPLICA NK_INTEGER */
X
Xiaoyu Wang 已提交
3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587
  {  340,   -3 }, /* (92) db_options ::= db_options VGROUPS NK_INTEGER */
  {  340,   -3 }, /* (93) db_options ::= db_options SINGLE_STABLE NK_INTEGER */
  {  340,   -3 }, /* (94) db_options ::= db_options RETENTIONS retention_list */
  {  340,   -3 }, /* (95) db_options ::= db_options SCHEMALESS NK_INTEGER */
  {  340,   -3 }, /* (96) db_options ::= db_options WAL_LEVEL NK_INTEGER */
  {  340,   -3 }, /* (97) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */
  {  340,   -3 }, /* (98) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */
  {  340,   -4 }, /* (99) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */
  {  340,   -3 }, /* (100) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */
  {  340,   -4 }, /* (101) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */
  {  340,   -3 }, /* (102) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */
  {  340,   -3 }, /* (103) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */
  {  340,   -3 }, /* (104) db_options ::= db_options STT_TRIGGER NK_INTEGER */
  {  340,   -3 }, /* (105) db_options ::= db_options TABLE_PREFIX NK_INTEGER */
  {  340,   -3 }, /* (106) db_options ::= db_options TABLE_SUFFIX NK_INTEGER */
  {  342,   -1 }, /* (107) alter_db_options ::= alter_db_option */
  {  342,   -2 }, /* (108) alter_db_options ::= alter_db_options alter_db_option */
  {  347,   -2 }, /* (109) alter_db_option ::= BUFFER NK_INTEGER */
  {  347,   -2 }, /* (110) alter_db_option ::= CACHEMODEL NK_STRING */
  {  347,   -2 }, /* (111) alter_db_option ::= CACHESIZE NK_INTEGER */
  {  347,   -2 }, /* (112) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */
  {  347,   -2 }, /* (113) alter_db_option ::= KEEP integer_list */
  {  347,   -2 }, /* (114) alter_db_option ::= KEEP variable_list */
  {  347,   -2 }, /* (115) alter_db_option ::= PAGES NK_INTEGER */
  {  347,   -2 }, /* (116) alter_db_option ::= REPLICA NK_INTEGER */
  {  347,   -2 }, /* (117) alter_db_option ::= WAL_LEVEL NK_INTEGER */
  {  347,   -2 }, /* (118) alter_db_option ::= STT_TRIGGER NK_INTEGER */
  {  344,   -1 }, /* (119) integer_list ::= NK_INTEGER */
  {  344,   -3 }, /* (120) integer_list ::= integer_list NK_COMMA NK_INTEGER */
  {  345,   -1 }, /* (121) variable_list ::= NK_VARIABLE */
  {  345,   -3 }, /* (122) variable_list ::= variable_list NK_COMMA NK_VARIABLE */
  {  346,   -1 }, /* (123) retention_list ::= retention */
  {  346,   -3 }, /* (124) retention_list ::= retention_list NK_COMMA retention */
  {  348,   -3 }, /* (125) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */
  {  343,    0 }, /* (126) speed_opt ::= */
  {  343,   -2 }, /* (127) speed_opt ::= MAX_SPEED NK_INTEGER */
  {  324,   -9 }, /* (128) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */
  {  324,   -3 }, /* (129) cmd ::= CREATE TABLE multi_create_clause */
  {  324,   -9 }, /* (130) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */
  {  324,   -3 }, /* (131) cmd ::= DROP TABLE multi_drop_clause */
  {  324,   -4 }, /* (132) cmd ::= DROP STABLE exists_opt full_table_name */
  {  324,   -3 }, /* (133) cmd ::= ALTER TABLE alter_table_clause */
  {  324,   -3 }, /* (134) cmd ::= ALTER STABLE alter_table_clause */
  {  356,   -2 }, /* (135) alter_table_clause ::= full_table_name alter_table_options */
  {  356,   -5 }, /* (136) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */
  {  356,   -4 }, /* (137) alter_table_clause ::= full_table_name DROP COLUMN column_name */
  {  356,   -5 }, /* (138) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */
  {  356,   -5 }, /* (139) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */
  {  356,   -5 }, /* (140) alter_table_clause ::= full_table_name ADD TAG column_name type_name */
  {  356,   -4 }, /* (141) alter_table_clause ::= full_table_name DROP TAG column_name */
  {  356,   -5 }, /* (142) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */
  {  356,   -5 }, /* (143) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */
  {  356,   -6 }, /* (144) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */
  {  353,   -1 }, /* (145) multi_create_clause ::= create_subtable_clause */
  {  353,   -2 }, /* (146) multi_create_clause ::= multi_create_clause create_subtable_clause */
  {  361,  -10 }, /* (147) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */
  {  355,   -1 }, /* (148) multi_drop_clause ::= drop_table_clause */
  {  355,   -2 }, /* (149) multi_drop_clause ::= multi_drop_clause drop_table_clause */
  {  364,   -2 }, /* (150) drop_table_clause ::= exists_opt full_table_name */
  {  362,    0 }, /* (151) specific_cols_opt ::= */
  {  362,   -3 }, /* (152) specific_cols_opt ::= NK_LP col_name_list NK_RP */
  {  349,   -1 }, /* (153) full_table_name ::= table_name */
  {  349,   -3 }, /* (154) full_table_name ::= db_name NK_DOT table_name */
  {  350,   -1 }, /* (155) column_def_list ::= column_def */
  {  350,   -3 }, /* (156) column_def_list ::= column_def_list NK_COMMA column_def */
  {  367,   -2 }, /* (157) column_def ::= column_name type_name */
  {  367,   -4 }, /* (158) column_def ::= column_name type_name COMMENT NK_STRING */
  {  359,   -1 }, /* (159) type_name ::= BOOL */
  {  359,   -1 }, /* (160) type_name ::= TINYINT */
  {  359,   -1 }, /* (161) type_name ::= SMALLINT */
  {  359,   -1 }, /* (162) type_name ::= INT */
  {  359,   -1 }, /* (163) type_name ::= INTEGER */
  {  359,   -1 }, /* (164) type_name ::= BIGINT */
  {  359,   -1 }, /* (165) type_name ::= FLOAT */
  {  359,   -1 }, /* (166) type_name ::= DOUBLE */
  {  359,   -4 }, /* (167) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
  {  359,   -1 }, /* (168) type_name ::= TIMESTAMP */
  {  359,   -4 }, /* (169) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
  {  359,   -2 }, /* (170) type_name ::= TINYINT UNSIGNED */
  {  359,   -2 }, /* (171) type_name ::= SMALLINT UNSIGNED */
  {  359,   -2 }, /* (172) type_name ::= INT UNSIGNED */
  {  359,   -2 }, /* (173) type_name ::= BIGINT UNSIGNED */
  {  359,   -1 }, /* (174) type_name ::= JSON */
  {  359,   -4 }, /* (175) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
  {  359,   -1 }, /* (176) type_name ::= MEDIUMBLOB */
  {  359,   -1 }, /* (177) type_name ::= BLOB */
  {  359,   -4 }, /* (178) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
  {  359,   -1 }, /* (179) type_name ::= DECIMAL */
  {  359,   -4 }, /* (180) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
  {  359,   -6 }, /* (181) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
  {  351,    0 }, /* (182) tags_def_opt ::= */
  {  351,   -1 }, /* (183) tags_def_opt ::= tags_def */
  {  354,   -4 }, /* (184) tags_def ::= TAGS NK_LP column_def_list NK_RP */
  {  352,    0 }, /* (185) table_options ::= */
  {  352,   -3 }, /* (186) table_options ::= table_options COMMENT NK_STRING */
  {  352,   -3 }, /* (187) table_options ::= table_options MAX_DELAY duration_list */
  {  352,   -3 }, /* (188) table_options ::= table_options WATERMARK duration_list */
  {  352,   -5 }, /* (189) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */
  {  352,   -3 }, /* (190) table_options ::= table_options TTL NK_INTEGER */
  {  352,   -5 }, /* (191) table_options ::= table_options SMA NK_LP col_name_list NK_RP */
  {  352,   -3 }, /* (192) table_options ::= table_options DELETE_MARK duration_list */
  {  357,   -1 }, /* (193) alter_table_options ::= alter_table_option */
  {  357,   -2 }, /* (194) alter_table_options ::= alter_table_options alter_table_option */
  {  370,   -2 }, /* (195) alter_table_option ::= COMMENT NK_STRING */
  {  370,   -2 }, /* (196) alter_table_option ::= TTL NK_INTEGER */
  {  368,   -1 }, /* (197) duration_list ::= duration_literal */
  {  368,   -3 }, /* (198) duration_list ::= duration_list NK_COMMA duration_literal */
  {  369,   -1 }, /* (199) rollup_func_list ::= rollup_func_name */
  {  369,   -3 }, /* (200) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */
  {  372,   -1 }, /* (201) rollup_func_name ::= function_name */
  {  372,   -1 }, /* (202) rollup_func_name ::= FIRST */
  {  372,   -1 }, /* (203) rollup_func_name ::= LAST */
  {  365,   -1 }, /* (204) col_name_list ::= col_name */
  {  365,   -3 }, /* (205) col_name_list ::= col_name_list NK_COMMA col_name */
  {  374,   -1 }, /* (206) col_name ::= column_name */
  {  324,   -2 }, /* (207) cmd ::= SHOW DNODES */
  {  324,   -2 }, /* (208) cmd ::= SHOW USERS */
  {  324,   -3 }, /* (209) cmd ::= SHOW USER PRIVILEGES */
  {  324,   -2 }, /* (210) cmd ::= SHOW DATABASES */
  {  324,   -4 }, /* (211) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */
  {  324,   -4 }, /* (212) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */
  {  324,   -3 }, /* (213) cmd ::= SHOW db_name_cond_opt VGROUPS */
  {  324,   -2 }, /* (214) cmd ::= SHOW MNODES */
  {  324,   -2 }, /* (215) cmd ::= SHOW QNODES */
  {  324,   -2 }, /* (216) cmd ::= SHOW FUNCTIONS */
  {  324,   -5 }, /* (217) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */
  {  324,   -2 }, /* (218) cmd ::= SHOW STREAMS */
  {  324,   -2 }, /* (219) cmd ::= SHOW ACCOUNTS */
  {  324,   -2 }, /* (220) cmd ::= SHOW APPS */
  {  324,   -2 }, /* (221) cmd ::= SHOW CONNECTIONS */
  {  324,   -2 }, /* (222) cmd ::= SHOW LICENCES */
  {  324,   -2 }, /* (223) cmd ::= SHOW GRANTS */
  {  324,   -4 }, /* (224) cmd ::= SHOW CREATE DATABASE db_name */
  {  324,   -4 }, /* (225) cmd ::= SHOW CREATE TABLE full_table_name */
  {  324,   -4 }, /* (226) cmd ::= SHOW CREATE STABLE full_table_name */
  {  324,   -2 }, /* (227) cmd ::= SHOW QUERIES */
  {  324,   -2 }, /* (228) cmd ::= SHOW SCORES */
  {  324,   -2 }, /* (229) cmd ::= SHOW TOPICS */
  {  324,   -2 }, /* (230) cmd ::= SHOW VARIABLES */
  {  324,   -3 }, /* (231) cmd ::= SHOW CLUSTER VARIABLES */
  {  324,   -3 }, /* (232) cmd ::= SHOW LOCAL VARIABLES */
  {  324,   -5 }, /* (233) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */
  {  324,   -2 }, /* (234) cmd ::= SHOW BNODES */
  {  324,   -2 }, /* (235) cmd ::= SHOW SNODES */
  {  324,   -2 }, /* (236) cmd ::= SHOW CLUSTER */
  {  324,   -2 }, /* (237) cmd ::= SHOW TRANSACTIONS */
  {  324,   -4 }, /* (238) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */
  {  324,   -2 }, /* (239) cmd ::= SHOW CONSUMERS */
  {  324,   -2 }, /* (240) cmd ::= SHOW SUBSCRIPTIONS */
  {  324,   -5 }, /* (241) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */
  {  324,   -7 }, /* (242) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */
  {  324,   -3 }, /* (243) cmd ::= SHOW VNODES NK_INTEGER */
  {  324,   -3 }, /* (244) cmd ::= SHOW VNODES NK_STRING */
  {  375,    0 }, /* (245) db_name_cond_opt ::= */
  {  375,   -2 }, /* (246) db_name_cond_opt ::= db_name NK_DOT */
  {  376,    0 }, /* (247) like_pattern_opt ::= */
  {  376,   -2 }, /* (248) like_pattern_opt ::= LIKE NK_STRING */
  {  377,   -1 }, /* (249) table_name_cond ::= table_name */
  {  378,    0 }, /* (250) from_db_opt ::= */
  {  378,   -2 }, /* (251) from_db_opt ::= FROM db_name */
  {  379,    0 }, /* (252) tag_list_opt ::= */
  {  379,   -1 }, /* (253) tag_list_opt ::= tag_item */
  {  379,   -3 }, /* (254) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */
  {  380,   -1 }, /* (255) tag_item ::= TBNAME */
  {  380,   -1 }, /* (256) tag_item ::= QTAGS */
  {  380,   -1 }, /* (257) tag_item ::= column_name */
  {  380,   -2 }, /* (258) tag_item ::= column_name column_alias */
  {  380,   -3 }, /* (259) tag_item ::= column_name AS column_alias */
  {  324,   -8 }, /* (260) cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options */
  {  324,   -4 }, /* (261) cmd ::= DROP INDEX exists_opt full_table_name */
  {  382,  -10 }, /* (262) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */
  {  382,  -12 }, /* (263) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */
  {  383,   -1 }, /* (264) func_list ::= func */
  {  383,   -3 }, /* (265) func_list ::= func_list NK_COMMA func */
  {  386,   -4 }, /* (266) func ::= function_name NK_LP expression_list NK_RP */
  {  385,    0 }, /* (267) sma_stream_opt ::= */
  {  385,   -3 }, /* (268) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */
  {  385,   -3 }, /* (269) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */
  {  385,   -3 }, /* (270) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */
  {  324,   -6 }, /* (271) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */
  {  324,   -7 }, /* (272) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */
  {  324,   -9 }, /* (273) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */
  {  324,   -7 }, /* (274) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */
  {  324,   -9 }, /* (275) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */
  {  324,   -4 }, /* (276) cmd ::= DROP TOPIC exists_opt topic_name */
  {  324,   -7 }, /* (277) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */
  {  324,   -2 }, /* (278) cmd ::= DESC full_table_name */
  {  324,   -2 }, /* (279) cmd ::= DESCRIBE full_table_name */
  {  324,   -3 }, /* (280) cmd ::= RESET QUERY CACHE */
  {  324,   -4 }, /* (281) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */
  {  389,    0 }, /* (282) analyze_opt ::= */
  {  389,   -1 }, /* (283) analyze_opt ::= ANALYZE */
  {  390,    0 }, /* (284) explain_options ::= */
  {  390,   -3 }, /* (285) explain_options ::= explain_options VERBOSE NK_BOOL */
  {  390,   -3 }, /* (286) explain_options ::= explain_options RATIO NK_FLOAT */
  {  324,  -10 }, /* (287) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */
  {  324,   -4 }, /* (288) cmd ::= DROP FUNCTION exists_opt function_name */
  {  391,    0 }, /* (289) agg_func_opt ::= */
  {  391,   -1 }, /* (290) agg_func_opt ::= AGGREGATE */
  {  392,    0 }, /* (291) bufsize_opt ::= */
  {  392,   -2 }, /* (292) bufsize_opt ::= BUFSIZE NK_INTEGER */
  {  324,  -11 }, /* (293) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery */
  {  324,   -4 }, /* (294) cmd ::= DROP STREAM exists_opt stream_name */
  {  394,    0 }, /* (295) stream_options ::= */
  {  394,   -3 }, /* (296) stream_options ::= stream_options TRIGGER AT_ONCE */
  {  394,   -3 }, /* (297) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */
  {  394,   -4 }, /* (298) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
  {  394,   -3 }, /* (299) stream_options ::= stream_options WATERMARK duration_literal */
  {  394,   -4 }, /* (300) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */
  {  394,   -3 }, /* (301) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */
  {  395,    0 }, /* (302) subtable_opt ::= */
  {  395,   -4 }, /* (303) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */
  {  324,   -3 }, /* (304) cmd ::= KILL CONNECTION NK_INTEGER */
  {  324,   -3 }, /* (305) cmd ::= KILL QUERY NK_STRING */
  {  324,   -3 }, /* (306) cmd ::= KILL TRANSACTION NK_INTEGER */
  {  324,   -2 }, /* (307) cmd ::= BALANCE VGROUP */
  {  324,   -4 }, /* (308) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */
  {  324,   -4 }, /* (309) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */
  {  324,   -3 }, /* (310) cmd ::= SPLIT VGROUP NK_INTEGER */
  {  397,   -2 }, /* (311) dnode_list ::= DNODE NK_INTEGER */
  {  397,   -3 }, /* (312) dnode_list ::= dnode_list DNODE NK_INTEGER */
  {  324,   -4 }, /* (313) cmd ::= DELETE FROM full_table_name where_clause_opt */
  {  324,   -1 }, /* (314) cmd ::= query_or_subquery */
  {  324,   -7 }, /* (315) cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */
  {  324,   -4 }, /* (316) cmd ::= INSERT INTO full_table_name query_or_subquery */
  {  327,   -1 }, /* (317) literal ::= NK_INTEGER */
  {  327,   -1 }, /* (318) literal ::= NK_FLOAT */
  {  327,   -1 }, /* (319) literal ::= NK_STRING */
  {  327,   -1 }, /* (320) literal ::= NK_BOOL */
  {  327,   -2 }, /* (321) literal ::= TIMESTAMP NK_STRING */
  {  327,   -1 }, /* (322) literal ::= duration_literal */
  {  327,   -1 }, /* (323) literal ::= NULL */
  {  327,   -1 }, /* (324) literal ::= NK_QUESTION */
  {  371,   -1 }, /* (325) duration_literal ::= NK_VARIABLE */
  {  399,   -1 }, /* (326) signed ::= NK_INTEGER */
  {  399,   -2 }, /* (327) signed ::= NK_PLUS NK_INTEGER */
  {  399,   -2 }, /* (328) signed ::= NK_MINUS NK_INTEGER */
  {  399,   -1 }, /* (329) signed ::= NK_FLOAT */
  {  399,   -2 }, /* (330) signed ::= NK_PLUS NK_FLOAT */
  {  399,   -2 }, /* (331) signed ::= NK_MINUS NK_FLOAT */
  {  360,   -1 }, /* (332) signed_literal ::= signed */
  {  360,   -1 }, /* (333) signed_literal ::= NK_STRING */
  {  360,   -1 }, /* (334) signed_literal ::= NK_BOOL */
  {  360,   -2 }, /* (335) signed_literal ::= TIMESTAMP NK_STRING */
  {  360,   -1 }, /* (336) signed_literal ::= duration_literal */
  {  360,   -1 }, /* (337) signed_literal ::= NULL */
  {  360,   -1 }, /* (338) signed_literal ::= literal_func */
  {  360,   -1 }, /* (339) signed_literal ::= NK_QUESTION */
  {  401,   -1 }, /* (340) literal_list ::= signed_literal */
  {  401,   -3 }, /* (341) literal_list ::= literal_list NK_COMMA signed_literal */
  {  335,   -1 }, /* (342) db_name ::= NK_ID */
  {  366,   -1 }, /* (343) table_name ::= NK_ID */
  {  358,   -1 }, /* (344) column_name ::= NK_ID */
  {  373,   -1 }, /* (345) function_name ::= NK_ID */
  {  402,   -1 }, /* (346) table_alias ::= NK_ID */
  {  381,   -1 }, /* (347) column_alias ::= NK_ID */
  {  329,   -1 }, /* (348) user_name ::= NK_ID */
  {  336,   -1 }, /* (349) topic_name ::= NK_ID */
  {  393,   -1 }, /* (350) stream_name ::= NK_ID */
  {  388,   -1 }, /* (351) cgroup_name ::= NK_ID */
  {  403,   -1 }, /* (352) expr_or_subquery ::= expression */
  {  396,   -1 }, /* (353) expression ::= literal */
  {  396,   -1 }, /* (354) expression ::= pseudo_column */
  {  396,   -1 }, /* (355) expression ::= column_reference */
  {  396,   -1 }, /* (356) expression ::= function_expression */
  {  396,   -1 }, /* (357) expression ::= case_when_expression */
  {  396,   -3 }, /* (358) expression ::= NK_LP expression NK_RP */
  {  396,   -2 }, /* (359) expression ::= NK_PLUS expr_or_subquery */
  {  396,   -2 }, /* (360) expression ::= NK_MINUS expr_or_subquery */
  {  396,   -3 }, /* (361) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */
  {  396,   -3 }, /* (362) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */
  {  396,   -3 }, /* (363) expression ::= expr_or_subquery NK_STAR expr_or_subquery */
  {  396,   -3 }, /* (364) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */
  {  396,   -3 }, /* (365) expression ::= expr_or_subquery NK_REM expr_or_subquery */
  {  396,   -3 }, /* (366) expression ::= column_reference NK_ARROW NK_STRING */
  {  396,   -3 }, /* (367) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */
  {  396,   -3 }, /* (368) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */
  {  363,   -1 }, /* (369) expression_list ::= expr_or_subquery */
  {  363,   -3 }, /* (370) expression_list ::= expression_list NK_COMMA expr_or_subquery */
  {  405,   -1 }, /* (371) column_reference ::= column_name */
  {  405,   -3 }, /* (372) column_reference ::= table_name NK_DOT column_name */
  {  404,   -1 }, /* (373) pseudo_column ::= ROWTS */
  {  404,   -1 }, /* (374) pseudo_column ::= TBNAME */
  {  404,   -3 }, /* (375) pseudo_column ::= table_name NK_DOT TBNAME */
  {  404,   -1 }, /* (376) pseudo_column ::= QSTART */
  {  404,   -1 }, /* (377) pseudo_column ::= QEND */
  {  404,   -1 }, /* (378) pseudo_column ::= QDURATION */
  {  404,   -1 }, /* (379) pseudo_column ::= WSTART */
  {  404,   -1 }, /* (380) pseudo_column ::= WEND */
  {  404,   -1 }, /* (381) pseudo_column ::= WDURATION */
  {  404,   -1 }, /* (382) pseudo_column ::= IROWTS */
  {  404,   -1 }, /* (383) pseudo_column ::= QTAGS */
  {  406,   -4 }, /* (384) function_expression ::= function_name NK_LP expression_list NK_RP */
  {  406,   -4 }, /* (385) function_expression ::= star_func NK_LP star_func_para_list NK_RP */
  {  406,   -6 }, /* (386) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */
  {  406,   -1 }, /* (387) function_expression ::= literal_func */
  {  400,   -3 }, /* (388) literal_func ::= noarg_func NK_LP NK_RP */
  {  400,   -1 }, /* (389) literal_func ::= NOW */
  {  410,   -1 }, /* (390) noarg_func ::= NOW */
  {  410,   -1 }, /* (391) noarg_func ::= TODAY */
  {  410,   -1 }, /* (392) noarg_func ::= TIMEZONE */
  {  410,   -1 }, /* (393) noarg_func ::= DATABASE */
  {  410,   -1 }, /* (394) noarg_func ::= CLIENT_VERSION */
  {  410,   -1 }, /* (395) noarg_func ::= SERVER_VERSION */
  {  410,   -1 }, /* (396) noarg_func ::= SERVER_STATUS */
  {  410,   -1 }, /* (397) noarg_func ::= CURRENT_USER */
  {  410,   -1 }, /* (398) noarg_func ::= USER */
  {  408,   -1 }, /* (399) star_func ::= COUNT */
  {  408,   -1 }, /* (400) star_func ::= FIRST */
  {  408,   -1 }, /* (401) star_func ::= LAST */
  {  408,   -1 }, /* (402) star_func ::= LAST_ROW */
  {  409,   -1 }, /* (403) star_func_para_list ::= NK_STAR */
  {  409,   -1 }, /* (404) star_func_para_list ::= other_para_list */
  {  411,   -1 }, /* (405) other_para_list ::= star_func_para */
  {  411,   -3 }, /* (406) other_para_list ::= other_para_list NK_COMMA star_func_para */
  {  412,   -1 }, /* (407) star_func_para ::= expr_or_subquery */
  {  412,   -3 }, /* (408) star_func_para ::= table_name NK_DOT NK_STAR */
  {  407,   -4 }, /* (409) case_when_expression ::= CASE when_then_list case_when_else_opt END */
  {  407,   -5 }, /* (410) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */
  {  413,   -1 }, /* (411) when_then_list ::= when_then_expr */
  {  413,   -2 }, /* (412) when_then_list ::= when_then_list when_then_expr */
  {  416,   -4 }, /* (413) when_then_expr ::= WHEN common_expression THEN common_expression */
  {  414,    0 }, /* (414) case_when_else_opt ::= */
  {  414,   -2 }, /* (415) case_when_else_opt ::= ELSE common_expression */
  {  417,   -3 }, /* (416) predicate ::= expr_or_subquery compare_op expr_or_subquery */
  {  417,   -5 }, /* (417) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */
  {  417,   -6 }, /* (418) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */
  {  417,   -3 }, /* (419) predicate ::= expr_or_subquery IS NULL */
  {  417,   -4 }, /* (420) predicate ::= expr_or_subquery IS NOT NULL */
  {  417,   -3 }, /* (421) predicate ::= expr_or_subquery in_op in_predicate_value */
  {  418,   -1 }, /* (422) compare_op ::= NK_LT */
  {  418,   -1 }, /* (423) compare_op ::= NK_GT */
  {  418,   -1 }, /* (424) compare_op ::= NK_LE */
  {  418,   -1 }, /* (425) compare_op ::= NK_GE */
  {  418,   -1 }, /* (426) compare_op ::= NK_NE */
  {  418,   -1 }, /* (427) compare_op ::= NK_EQ */
  {  418,   -1 }, /* (428) compare_op ::= LIKE */
  {  418,   -2 }, /* (429) compare_op ::= NOT LIKE */
  {  418,   -1 }, /* (430) compare_op ::= MATCH */
  {  418,   -1 }, /* (431) compare_op ::= NMATCH */
  {  418,   -1 }, /* (432) compare_op ::= CONTAINS */
  {  419,   -1 }, /* (433) in_op ::= IN */
  {  419,   -2 }, /* (434) in_op ::= NOT IN */
  {  420,   -3 }, /* (435) in_predicate_value ::= NK_LP literal_list NK_RP */
  {  421,   -1 }, /* (436) boolean_value_expression ::= boolean_primary */
  {  421,   -2 }, /* (437) boolean_value_expression ::= NOT boolean_primary */
  {  421,   -3 }, /* (438) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
  {  421,   -3 }, /* (439) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
  {  422,   -1 }, /* (440) boolean_primary ::= predicate */
  {  422,   -3 }, /* (441) boolean_primary ::= NK_LP boolean_value_expression NK_RP */
  {  415,   -1 }, /* (442) common_expression ::= expr_or_subquery */
  {  415,   -1 }, /* (443) common_expression ::= boolean_value_expression */
  {  423,    0 }, /* (444) from_clause_opt ::= */
  {  423,   -2 }, /* (445) from_clause_opt ::= FROM table_reference_list */
  {  424,   -1 }, /* (446) table_reference_list ::= table_reference */
  {  424,   -3 }, /* (447) table_reference_list ::= table_reference_list NK_COMMA table_reference */
  {  425,   -1 }, /* (448) table_reference ::= table_primary */
  {  425,   -1 }, /* (449) table_reference ::= joined_table */
  {  426,   -2 }, /* (450) table_primary ::= table_name alias_opt */
  {  426,   -4 }, /* (451) table_primary ::= db_name NK_DOT table_name alias_opt */
  {  426,   -2 }, /* (452) table_primary ::= subquery alias_opt */
  {  426,   -1 }, /* (453) table_primary ::= parenthesized_joined_table */
  {  428,    0 }, /* (454) alias_opt ::= */
  {  428,   -1 }, /* (455) alias_opt ::= table_alias */
  {  428,   -2 }, /* (456) alias_opt ::= AS table_alias */
  {  430,   -3 }, /* (457) parenthesized_joined_table ::= NK_LP joined_table NK_RP */
  {  430,   -3 }, /* (458) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */
  {  427,   -6 }, /* (459) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
  {  431,    0 }, /* (460) join_type ::= */
  {  431,   -1 }, /* (461) join_type ::= INNER */
  {  433,  -12 }, /* (462) query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */
  {  434,    0 }, /* (463) set_quantifier_opt ::= */
  {  434,   -1 }, /* (464) set_quantifier_opt ::= DISTINCT */
  {  434,   -1 }, /* (465) set_quantifier_opt ::= ALL */
  {  435,   -1 }, /* (466) select_list ::= select_item */
  {  435,   -3 }, /* (467) select_list ::= select_list NK_COMMA select_item */
  {  443,   -1 }, /* (468) select_item ::= NK_STAR */
  {  443,   -1 }, /* (469) select_item ::= common_expression */
  {  443,   -2 }, /* (470) select_item ::= common_expression column_alias */
  {  443,   -3 }, /* (471) select_item ::= common_expression AS column_alias */
  {  443,   -3 }, /* (472) select_item ::= table_name NK_DOT NK_STAR */
  {  398,    0 }, /* (473) where_clause_opt ::= */
  {  398,   -2 }, /* (474) where_clause_opt ::= WHERE search_condition */
  {  436,    0 }, /* (475) partition_by_clause_opt ::= */
  {  436,   -3 }, /* (476) partition_by_clause_opt ::= PARTITION BY partition_list */
  {  444,   -1 }, /* (477) partition_list ::= partition_item */
  {  444,   -3 }, /* (478) partition_list ::= partition_list NK_COMMA partition_item */
  {  445,   -1 }, /* (479) partition_item ::= expr_or_subquery */
  {  445,   -2 }, /* (480) partition_item ::= expr_or_subquery column_alias */
  {  445,   -3 }, /* (481) partition_item ::= expr_or_subquery AS column_alias */
  {  440,    0 }, /* (482) twindow_clause_opt ::= */
  {  440,   -6 }, /* (483) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
  {  440,   -4 }, /* (484) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */
  {  440,   -6 }, /* (485) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
  {  440,   -8 }, /* (486) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
  {  440,   -7 }, /* (487) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */
  {  384,    0 }, /* (488) sliding_opt ::= */
  {  384,   -4 }, /* (489) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
  {  439,    0 }, /* (490) fill_opt ::= */
  {  439,   -4 }, /* (491) fill_opt ::= FILL NK_LP fill_mode NK_RP */
  {  439,   -6 }, /* (492) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
  {  446,   -1 }, /* (493) fill_mode ::= NONE */
  {  446,   -1 }, /* (494) fill_mode ::= PREV */
  {  446,   -1 }, /* (495) fill_mode ::= NULL */
  {  446,   -1 }, /* (496) fill_mode ::= LINEAR */
  {  446,   -1 }, /* (497) fill_mode ::= NEXT */
  {  441,    0 }, /* (498) group_by_clause_opt ::= */
  {  441,   -3 }, /* (499) group_by_clause_opt ::= GROUP BY group_by_list */
  {  447,   -1 }, /* (500) group_by_list ::= expr_or_subquery */
  {  447,   -3 }, /* (501) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */
  {  442,    0 }, /* (502) having_clause_opt ::= */
  {  442,   -2 }, /* (503) having_clause_opt ::= HAVING search_condition */
  {  437,    0 }, /* (504) range_opt ::= */
  {  437,   -6 }, /* (505) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */
  {  438,    0 }, /* (506) every_opt ::= */
  {  438,   -4 }, /* (507) every_opt ::= EVERY NK_LP duration_literal NK_RP */
  {  448,   -4 }, /* (508) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */
  {  449,   -1 }, /* (509) query_simple ::= query_specification */
  {  449,   -1 }, /* (510) query_simple ::= union_query_expression */
  {  453,   -4 }, /* (511) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */
  {  453,   -3 }, /* (512) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */
  {  454,   -1 }, /* (513) query_simple_or_subquery ::= query_simple */
  {  454,   -1 }, /* (514) query_simple_or_subquery ::= subquery */
  {  387,   -1 }, /* (515) query_or_subquery ::= query_expression */
  {  387,   -1 }, /* (516) query_or_subquery ::= subquery */
  {  450,    0 }, /* (517) order_by_clause_opt ::= */
  {  450,   -3 }, /* (518) order_by_clause_opt ::= ORDER BY sort_specification_list */
  {  451,    0 }, /* (519) slimit_clause_opt ::= */
  {  451,   -2 }, /* (520) slimit_clause_opt ::= SLIMIT NK_INTEGER */
  {  451,   -4 }, /* (521) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
  {  451,   -4 }, /* (522) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
  {  452,    0 }, /* (523) limit_clause_opt ::= */
  {  452,   -2 }, /* (524) limit_clause_opt ::= LIMIT NK_INTEGER */
  {  452,   -4 }, /* (525) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */
  {  452,   -4 }, /* (526) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */
  {  429,   -3 }, /* (527) subquery ::= NK_LP query_expression NK_RP */
  {  429,   -3 }, /* (528) subquery ::= NK_LP subquery NK_RP */
  {  432,   -1 }, /* (529) search_condition ::= common_expression */
  {  455,   -1 }, /* (530) sort_specification_list ::= sort_specification */
  {  455,   -3 }, /* (531) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */
  {  456,   -3 }, /* (532) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */
  {  457,    0 }, /* (533) ordering_specification_opt ::= */
  {  457,   -1 }, /* (534) ordering_specification_opt ::= ASC */
  {  457,   -1 }, /* (535) ordering_specification_opt ::= DESC */
  {  458,    0 }, /* (536) null_ordering_opt ::= */
  {  458,   -2 }, /* (537) null_ordering_opt ::= NULLS FIRST */
  {  458,   -2 }, /* (538) null_ordering_opt ::= NULLS LAST */
3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605
};

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 */
X
Xiaoyu Wang 已提交
3606 3607
  ParseTOKENTYPE yyLookaheadToken  /* Value of the lookahead token */
  ParseCTX_PDECL                   /* %extra_context */
3608 3609 3610 3611 3612
){
  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 */
X
Xiaoyu Wang 已提交
3613
  ParseARG_FETCH
3614 3615 3616
  (void)yyLookahead;
  (void)yyLookaheadToken;
  yymsp = yypParser->yytos;
X
Xiaoyu Wang 已提交
3617 3618
#ifndef NDEBUG
  if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){
X
Xiaoyu Wang 已提交
3619
    yysize = yyRuleInfo[yyruleno].nrhs;
X
Xiaoyu Wang 已提交
3620
    if( yysize ){
X
Xiaoyu Wang 已提交
3621
      fprintf(yyTraceFILE, "%sReduce %d [%s], go to state %d.\n",
X
Xiaoyu Wang 已提交
3622
        yyTracePrompt,
X
Xiaoyu Wang 已提交
3623
        yyruleno, yyRuleName[yyruleno], yymsp[yysize].stateno);
X
Xiaoyu Wang 已提交
3624
    }else{
X
Xiaoyu Wang 已提交
3625 3626
      fprintf(yyTraceFILE, "%sReduce %d [%s].\n",
        yyTracePrompt, yyruleno, yyRuleName[yyruleno]);
X
Xiaoyu Wang 已提交
3627 3628 3629 3630 3631 3632 3633
    }
  }
#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 */
X
Xiaoyu Wang 已提交
3634
  if( yyRuleInfo[yyruleno].nrhs==0 ){
X
Xiaoyu Wang 已提交
3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661
#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
  }
3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673

  switch( yyruleno ){
  /* Beginning here are the reduction cases.  A typical example
  ** follows:
  **   case 0:
  **  #line <lineno> <grammarfile>
  **     { ... }           // User supplied code
  **  #line <lineno> <thisfile>
  **     break;
  */
/********** Begin reduce actions **********************************************/
        YYMINORTYPE yylhsminor;
3674
      case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */
3675
{ pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); }
X
Xiaoyu Wang 已提交
3676
  yy_destructor(yypParser,325,&yymsp[0].minor);
3677
        break;
3678
      case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */
3679
{ pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); }
X
Xiaoyu Wang 已提交
3680
  yy_destructor(yypParser,326,&yymsp[0].minor);
3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693
        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);
X
Xiaoyu Wang 已提交
3694
{  yy_destructor(yypParser,325,&yymsp[-2].minor);
3695
{ }
X
Xiaoyu Wang 已提交
3696
  yy_destructor(yypParser,327,&yymsp[0].minor);
3697
}
3698
        break;
3699
      case 12: /* alter_account_options ::= alter_account_option */
X
Xiaoyu Wang 已提交
3700
{  yy_destructor(yypParser,328,&yymsp[0].minor);
3701 3702 3703
{ }
}
        break;
3704
      case 13: /* alter_account_options ::= alter_account_options alter_account_option */
X
Xiaoyu Wang 已提交
3705
{  yy_destructor(yypParser,326,&yymsp[-1].minor);
3706
{ }
X
Xiaoyu Wang 已提交
3707
  yy_destructor(yypParser,328,&yymsp[0].minor);
3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719
}
        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);
3720
{ }
X
Xiaoyu Wang 已提交
3721
  yy_destructor(yypParser,327,&yymsp[0].minor);
3722
        break;
X
Xiaoyu Wang 已提交
3723
      case 24: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */
X
Xiaoyu Wang 已提交
3724
{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy317, &yymsp[-1].minor.yy0, yymsp[0].minor.yy449); }
3725
        break;
3726
      case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */
X
Xiaoyu Wang 已提交
3727
{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy317, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); }
3728
        break;
X
Xiaoyu Wang 已提交
3729
      case 26: /* cmd ::= ALTER USER user_name ENABLE NK_INTEGER */
X
Xiaoyu Wang 已提交
3730
{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy317, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); }
3731
        break;
X
Xiaoyu Wang 已提交
3732
      case 27: /* cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */
X
Xiaoyu Wang 已提交
3733
{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy317, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); }
3734
        break;
X
Xiaoyu Wang 已提交
3735
      case 28: /* cmd ::= DROP USER user_name */
X
Xiaoyu Wang 已提交
3736
{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy317); }
3737
        break;
X
Xiaoyu Wang 已提交
3738
      case 29: /* sysinfo_opt ::= */
X
Xiaoyu Wang 已提交
3739
{ yymsp[1].minor.yy449 = 1; }
3740
        break;
X
Xiaoyu Wang 已提交
3741
      case 30: /* sysinfo_opt ::= SYSINFO NK_INTEGER */
X
Xiaoyu Wang 已提交
3742
{ yymsp[-1].minor.yy449 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); }
3743
        break;
X
Xiaoyu Wang 已提交
3744
      case 31: /* cmd ::= GRANT privileges ON priv_level TO user_name */
X
Xiaoyu Wang 已提交
3745
{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy531, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy317); }
3746
        break;
X
Xiaoyu Wang 已提交
3747
      case 32: /* cmd ::= REVOKE privileges ON priv_level FROM user_name */
X
Xiaoyu Wang 已提交
3748
{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy531, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy317); }
3749
        break;
X
Xiaoyu Wang 已提交
3750
      case 33: /* privileges ::= ALL */
X
Xiaoyu Wang 已提交
3751
{ yymsp[0].minor.yy531 = PRIVILEGE_TYPE_ALL; }
3752
        break;
X
Xiaoyu Wang 已提交
3753
      case 34: /* privileges ::= priv_type_list */
3754
      case 36: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==36);
X
Xiaoyu Wang 已提交
3755 3756
{ yylhsminor.yy531 = yymsp[0].minor.yy531; }
  yymsp[0].minor.yy531 = yylhsminor.yy531;
3757
        break;
3758
      case 35: /* privileges ::= SUBSCRIBE */
X
Xiaoyu Wang 已提交
3759
{ yymsp[0].minor.yy531 = PRIVILEGE_TYPE_SUBSCRIBE; }
3760
        break;
3761
      case 37: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */
X
Xiaoyu Wang 已提交
3762 3763
{ yylhsminor.yy531 = yymsp[-2].minor.yy531 | yymsp[0].minor.yy531; }
  yymsp[-2].minor.yy531 = yylhsminor.yy531;
3764
        break;
3765
      case 38: /* priv_type ::= READ */
X
Xiaoyu Wang 已提交
3766
{ yymsp[0].minor.yy531 = PRIVILEGE_TYPE_READ; }
3767
        break;
3768
      case 39: /* priv_type ::= WRITE */
X
Xiaoyu Wang 已提交
3769
{ yymsp[0].minor.yy531 = PRIVILEGE_TYPE_WRITE; }
3770
        break;
3771
      case 40: /* priv_level ::= NK_STAR NK_DOT NK_STAR */
X
Xiaoyu Wang 已提交
3772 3773
{ yylhsminor.yy317 = yymsp[-2].minor.yy0; }
  yymsp[-2].minor.yy317 = yylhsminor.yy317;
X
Xiaoyu Wang 已提交
3774
        break;
3775
      case 41: /* priv_level ::= db_name NK_DOT NK_STAR */
X
Xiaoyu Wang 已提交
3776 3777
{ yylhsminor.yy317 = yymsp[-2].minor.yy317; }
  yymsp[-2].minor.yy317 = yylhsminor.yy317;
X
Xiaoyu Wang 已提交
3778
        break;
3779
      case 42: /* priv_level ::= topic_name */
3780
      case 455: /* alias_opt ::= table_alias */ yytestcase(yyruleno==455);
X
Xiaoyu Wang 已提交
3781 3782
{ yylhsminor.yy317 = yymsp[0].minor.yy317; }
  yymsp[0].minor.yy317 = yylhsminor.yy317;
X
Xiaoyu Wang 已提交
3783
        break;
3784
      case 43: /* cmd ::= CREATE DNODE dnode_endpoint */
X
Xiaoyu Wang 已提交
3785
{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy317, NULL); }
3786
        break;
3787
      case 44: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */
X
Xiaoyu Wang 已提交
3788
{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy0); }
3789
        break;
3790
      case 45: /* cmd ::= DROP DNODE NK_INTEGER force_opt */
X
Xiaoyu Wang 已提交
3791
{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy335); }
3792 3793
        break;
      case 46: /* cmd ::= DROP DNODE dnode_endpoint force_opt */
X
Xiaoyu Wang 已提交
3794
{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy317, yymsp[0].minor.yy335); }
3795 3796
        break;
      case 47: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */
3797 3798
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); }
        break;
3799
      case 48: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */
3800 3801
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-2].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
        break;
3802
      case 49: /* cmd ::= ALTER ALL DNODES NK_STRING */
3803 3804
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[0].minor.yy0, NULL); }
        break;
3805
      case 50: /* cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */
3806 3807
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
        break;
3808 3809 3810
      case 51: /* dnode_endpoint ::= NK_STRING */
      case 52: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==52);
      case 53: /* dnode_endpoint ::= NK_IPTOKEN */ yytestcase(yyruleno==53);
3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833
      case 342: /* db_name ::= NK_ID */ yytestcase(yyruleno==342);
      case 343: /* table_name ::= NK_ID */ yytestcase(yyruleno==343);
      case 344: /* column_name ::= NK_ID */ yytestcase(yyruleno==344);
      case 345: /* function_name ::= NK_ID */ yytestcase(yyruleno==345);
      case 346: /* table_alias ::= NK_ID */ yytestcase(yyruleno==346);
      case 347: /* column_alias ::= NK_ID */ yytestcase(yyruleno==347);
      case 348: /* user_name ::= NK_ID */ yytestcase(yyruleno==348);
      case 349: /* topic_name ::= NK_ID */ yytestcase(yyruleno==349);
      case 350: /* stream_name ::= NK_ID */ yytestcase(yyruleno==350);
      case 351: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==351);
      case 390: /* noarg_func ::= NOW */ yytestcase(yyruleno==390);
      case 391: /* noarg_func ::= TODAY */ yytestcase(yyruleno==391);
      case 392: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==392);
      case 393: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==393);
      case 394: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==394);
      case 395: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==395);
      case 396: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==396);
      case 397: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==397);
      case 398: /* noarg_func ::= USER */ yytestcase(yyruleno==398);
      case 399: /* star_func ::= COUNT */ yytestcase(yyruleno==399);
      case 400: /* star_func ::= FIRST */ yytestcase(yyruleno==400);
      case 401: /* star_func ::= LAST */ yytestcase(yyruleno==401);
      case 402: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==402);
X
Xiaoyu Wang 已提交
3834 3835
{ yylhsminor.yy317 = yymsp[0].minor.yy0; }
  yymsp[0].minor.yy317 = yylhsminor.yy317;
3836 3837 3838 3839
        break;
      case 54: /* force_opt ::= */
      case 73: /* not_exists_opt ::= */ yytestcase(yyruleno==73);
      case 75: /* exists_opt ::= */ yytestcase(yyruleno==75);
3840 3841 3842
      case 282: /* analyze_opt ::= */ yytestcase(yyruleno==282);
      case 289: /* agg_func_opt ::= */ yytestcase(yyruleno==289);
      case 463: /* set_quantifier_opt ::= */ yytestcase(yyruleno==463);
X
Xiaoyu Wang 已提交
3843
{ yymsp[1].minor.yy335 = false; }
3844 3845
        break;
      case 55: /* force_opt ::= FORCE */
3846 3847 3848
      case 283: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==283);
      case 290: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==290);
      case 464: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==464);
X
Xiaoyu Wang 已提交
3849
{ yymsp[0].minor.yy335 = true; }
3850 3851
        break;
      case 56: /* cmd ::= ALTER LOCAL NK_STRING */
3852 3853
{ pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); }
        break;
3854
      case 57: /* cmd ::= ALTER LOCAL NK_STRING NK_STRING */
3855 3856
{ pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
        break;
3857
      case 58: /* cmd ::= CREATE QNODE ON DNODE NK_INTEGER */
3858
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_QNODE_STMT, &yymsp[0].minor.yy0); }
X
Xiaoyu Wang 已提交
3859
        break;
3860
      case 59: /* cmd ::= DROP QNODE ON DNODE NK_INTEGER */
3861
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_QNODE_STMT, &yymsp[0].minor.yy0); }
3862
        break;
3863
      case 60: /* cmd ::= CREATE BNODE ON DNODE NK_INTEGER */
3864
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_BNODE_STMT, &yymsp[0].minor.yy0); }
X
Xiaoyu Wang 已提交
3865
        break;
3866
      case 61: /* cmd ::= DROP BNODE ON DNODE NK_INTEGER */
3867
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_BNODE_STMT, &yymsp[0].minor.yy0); }
X
Xiaoyu Wang 已提交
3868
        break;
3869
      case 62: /* cmd ::= CREATE SNODE ON DNODE NK_INTEGER */
3870
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_SNODE_STMT, &yymsp[0].minor.yy0); }
3871
        break;
3872
      case 63: /* cmd ::= DROP SNODE ON DNODE NK_INTEGER */
3873
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_SNODE_STMT, &yymsp[0].minor.yy0); }
3874
        break;
3875
      case 64: /* cmd ::= CREATE MNODE ON DNODE NK_INTEGER */
3876
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_MNODE_STMT, &yymsp[0].minor.yy0); }
3877
        break;
3878
      case 65: /* cmd ::= DROP MNODE ON DNODE NK_INTEGER */
3879
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); }
3880
        break;
3881
      case 66: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
X
Xiaoyu Wang 已提交
3882
{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy335, &yymsp[-1].minor.yy317, yymsp[0].minor.yy74); }
3883
        break;
3884
      case 67: /* cmd ::= DROP DATABASE exists_opt db_name */
X
Xiaoyu Wang 已提交
3885
{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy335, &yymsp[0].minor.yy317); }
3886
        break;
3887
      case 68: /* cmd ::= USE db_name */
X
Xiaoyu Wang 已提交
3888
{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy317); }
3889
        break;
3890
      case 69: /* cmd ::= ALTER DATABASE db_name alter_db_options */
X
Xiaoyu Wang 已提交
3891
{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy317, yymsp[0].minor.yy74); }
X
Xiaoyu Wang 已提交
3892
        break;
3893
      case 70: /* cmd ::= FLUSH DATABASE db_name */
X
Xiaoyu Wang 已提交
3894
{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy317); }
X
Xiaoyu Wang 已提交
3895
        break;
3896
      case 71: /* cmd ::= TRIM DATABASE db_name speed_opt */
X
Xiaoyu Wang 已提交
3897
{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy317, yymsp[0].minor.yy856); }
X
Xiaoyu Wang 已提交
3898
        break;
3899
      case 72: /* not_exists_opt ::= IF NOT EXISTS */
X
Xiaoyu Wang 已提交
3900
{ yymsp[-2].minor.yy335 = true; }
X
Xiaoyu Wang 已提交
3901
        break;
3902
      case 74: /* exists_opt ::= IF EXISTS */
X
Xiaoyu Wang 已提交
3903
{ yymsp[-1].minor.yy335 = true; }
X
Xiaoyu Wang 已提交
3904
        break;
3905
      case 76: /* db_options ::= */
X
Xiaoyu Wang 已提交
3906
{ yymsp[1].minor.yy74 = createDefaultDatabaseOptions(pCxt); }
X
Xiaoyu Wang 已提交
3907
        break;
3908
      case 77: /* db_options ::= db_options BUFFER NK_INTEGER */
X
Xiaoyu Wang 已提交
3909 3910
{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
3911
        break;
3912
      case 78: /* db_options ::= db_options CACHEMODEL NK_STRING */
X
Xiaoyu Wang 已提交
3913 3914
{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
3915
        break;
3916
      case 79: /* db_options ::= db_options CACHESIZE NK_INTEGER */
X
Xiaoyu Wang 已提交
3917 3918
{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
3919
        break;
3920
      case 80: /* db_options ::= db_options COMP NK_INTEGER */
X
Xiaoyu Wang 已提交
3921 3922
{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_COMP, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
X
Xiaoyu Wang 已提交
3923
        break;
3924 3925
      case 81: /* db_options ::= db_options DURATION NK_INTEGER */
      case 82: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==82);
X
Xiaoyu Wang 已提交
3926 3927
{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_DAYS, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
3928
        break;
3929
      case 83: /* db_options ::= db_options MAXROWS NK_INTEGER */
X
Xiaoyu Wang 已提交
3930 3931
{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
3932
        break;
3933
      case 84: /* db_options ::= db_options MINROWS NK_INTEGER */
X
Xiaoyu Wang 已提交
3934 3935
{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
3936
        break;
3937 3938
      case 85: /* db_options ::= db_options KEEP integer_list */
      case 86: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==86);
X
Xiaoyu Wang 已提交
3939 3940
{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_KEEP, yymsp[0].minor.yy874); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
3941
        break;
3942
      case 87: /* db_options ::= db_options PAGES NK_INTEGER */
X
Xiaoyu Wang 已提交
3943 3944
{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_PAGES, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
X
Xiaoyu Wang 已提交
3945
        break;
3946
      case 88: /* db_options ::= db_options PAGESIZE NK_INTEGER */
X
Xiaoyu Wang 已提交
3947 3948
{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
X
Xiaoyu Wang 已提交
3949
        break;
3950
      case 89: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */
X
Xiaoyu Wang 已提交
3951 3952
{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
3953
        break;
3954
      case 90: /* db_options ::= db_options PRECISION NK_STRING */
X
Xiaoyu Wang 已提交
3955 3956
{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
X
Xiaoyu Wang 已提交
3957
        break;
3958
      case 91: /* db_options ::= db_options REPLICA NK_INTEGER */
X
Xiaoyu Wang 已提交
3959 3960
{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
X
Xiaoyu Wang 已提交
3961
        break;
3962
      case 92: /* db_options ::= db_options VGROUPS NK_INTEGER */
X
Xiaoyu Wang 已提交
3963 3964
{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
X
Xiaoyu Wang 已提交
3965
        break;
3966
      case 93: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */
X
Xiaoyu Wang 已提交
3967 3968
{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
X
Xiaoyu Wang 已提交
3969
        break;
3970
      case 94: /* db_options ::= db_options RETENTIONS retention_list */
X
Xiaoyu Wang 已提交
3971 3972
{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_RETENTIONS, yymsp[0].minor.yy874); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
X
Xiaoyu Wang 已提交
3973
        break;
3974
      case 95: /* db_options ::= db_options SCHEMALESS NK_INTEGER */
X
Xiaoyu Wang 已提交
3975 3976
{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
X
Xiaoyu Wang 已提交
3977
        break;
3978
      case 96: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */
X
Xiaoyu Wang 已提交
3979 3980
{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_WAL, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
X
Xiaoyu Wang 已提交
3981
        break;
3982
      case 97: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */
X
Xiaoyu Wang 已提交
3983 3984
{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
X
Xiaoyu Wang 已提交
3985
        break;
3986
      case 98: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */
X
Xiaoyu Wang 已提交
3987 3988
{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
3989
        break;
3990
      case 99: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */
X
Xiaoyu Wang 已提交
3991 3992 3993
{ 
                                                                                    SToken t = yymsp[-1].minor.yy0;
                                                                                    t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
X
Xiaoyu Wang 已提交
3994
                                                                                    yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-3].minor.yy74, DB_OPTION_WAL_RETENTION_PERIOD, &t);
X
Xiaoyu Wang 已提交
3995
                                                                                  }
X
Xiaoyu Wang 已提交
3996
  yymsp[-3].minor.yy74 = yylhsminor.yy74;
X
Xiaoyu Wang 已提交
3997
        break;
3998
      case 100: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */
X
Xiaoyu Wang 已提交
3999 4000
{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
X
Xiaoyu Wang 已提交
4001
        break;
4002
      case 101: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */
X
Xiaoyu Wang 已提交
4003 4004 4005
{ 
                                                                                    SToken t = yymsp[-1].minor.yy0;
                                                                                    t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
X
Xiaoyu Wang 已提交
4006
                                                                                    yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-3].minor.yy74, DB_OPTION_WAL_RETENTION_SIZE, &t);
X
Xiaoyu Wang 已提交
4007
                                                                                  }
X
Xiaoyu Wang 已提交
4008
  yymsp[-3].minor.yy74 = yylhsminor.yy74;
4009
        break;
4010
      case 102: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */
X
Xiaoyu Wang 已提交
4011 4012
{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4013
        break;
4014
      case 103: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */
X
Xiaoyu Wang 已提交
4015 4016
{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4017
        break;
4018
      case 104: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */
X
Xiaoyu Wang 已提交
4019 4020
{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4021
        break;
4022
      case 105: /* db_options ::= db_options TABLE_PREFIX NK_INTEGER */
X
Xiaoyu Wang 已提交
4023 4024
{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_TABLE_PREFIX, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4025
        break;
4026
      case 106: /* db_options ::= db_options TABLE_SUFFIX NK_INTEGER */
X
Xiaoyu Wang 已提交
4027 4028
{ yylhsminor.yy74 = setDatabaseOption(pCxt, yymsp[-2].minor.yy74, DB_OPTION_TABLE_SUFFIX, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4029
        break;
4030
      case 107: /* alter_db_options ::= alter_db_option */
X
Xiaoyu Wang 已提交
4031 4032
{ yylhsminor.yy74 = createAlterDatabaseOptions(pCxt); yylhsminor.yy74 = setAlterDatabaseOption(pCxt, yylhsminor.yy74, &yymsp[0].minor.yy767); }
  yymsp[0].minor.yy74 = yylhsminor.yy74;
4033
        break;
4034
      case 108: /* alter_db_options ::= alter_db_options alter_db_option */
X
Xiaoyu Wang 已提交
4035 4036
{ yylhsminor.yy74 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy74, &yymsp[0].minor.yy767); }
  yymsp[-1].minor.yy74 = yylhsminor.yy74;
4037
        break;
4038
      case 109: /* alter_db_option ::= BUFFER NK_INTEGER */
X
Xiaoyu Wang 已提交
4039
{ yymsp[-1].minor.yy767.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; }
4040
        break;
4041
      case 110: /* alter_db_option ::= CACHEMODEL NK_STRING */
X
Xiaoyu Wang 已提交
4042
{ yymsp[-1].minor.yy767.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; }
4043
        break;
4044
      case 111: /* alter_db_option ::= CACHESIZE NK_INTEGER */
X
Xiaoyu Wang 已提交
4045
{ yymsp[-1].minor.yy767.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; }
4046
        break;
4047
      case 112: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */
X
Xiaoyu Wang 已提交
4048
{ yymsp[-1].minor.yy767.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; }
4049
        break;
4050 4051
      case 113: /* alter_db_option ::= KEEP integer_list */
      case 114: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==114);
X
Xiaoyu Wang 已提交
4052
{ yymsp[-1].minor.yy767.type = DB_OPTION_KEEP; yymsp[-1].minor.yy767.pList = yymsp[0].minor.yy874; }
4053
        break;
4054
      case 115: /* alter_db_option ::= PAGES NK_INTEGER */
X
Xiaoyu Wang 已提交
4055
{ yymsp[-1].minor.yy767.type = DB_OPTION_PAGES; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; }
4056
        break;
4057
      case 116: /* alter_db_option ::= REPLICA NK_INTEGER */
X
Xiaoyu Wang 已提交
4058
{ yymsp[-1].minor.yy767.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; }
4059
        break;
4060
      case 117: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */
X
Xiaoyu Wang 已提交
4061
{ yymsp[-1].minor.yy767.type = DB_OPTION_WAL; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; }
4062
        break;
4063
      case 118: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */
X
Xiaoyu Wang 已提交
4064
{ yymsp[-1].minor.yy767.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; }
4065
        break;
4066
      case 119: /* integer_list ::= NK_INTEGER */
X
Xiaoyu Wang 已提交
4067 4068
{ yylhsminor.yy874 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy874 = yylhsminor.yy874;
4069
        break;
4070 4071
      case 120: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */
      case 312: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==312);
X
Xiaoyu Wang 已提交
4072 4073
{ yylhsminor.yy874 = addNodeToList(pCxt, yymsp[-2].minor.yy874, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
  yymsp[-2].minor.yy874 = yylhsminor.yy874;
4074
        break;
4075
      case 121: /* variable_list ::= NK_VARIABLE */
X
Xiaoyu Wang 已提交
4076 4077
{ yylhsminor.yy874 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy874 = yylhsminor.yy874;
4078
        break;
4079
      case 122: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */
X
Xiaoyu Wang 已提交
4080 4081
{ yylhsminor.yy874 = addNodeToList(pCxt, yymsp[-2].minor.yy874, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
  yymsp[-2].minor.yy874 = yylhsminor.yy874;
4082
        break;
4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095
      case 123: /* retention_list ::= retention */
      case 145: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==145);
      case 148: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==148);
      case 155: /* column_def_list ::= column_def */ yytestcase(yyruleno==155);
      case 199: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==199);
      case 204: /* col_name_list ::= col_name */ yytestcase(yyruleno==204);
      case 253: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==253);
      case 264: /* func_list ::= func */ yytestcase(yyruleno==264);
      case 340: /* literal_list ::= signed_literal */ yytestcase(yyruleno==340);
      case 405: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==405);
      case 411: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==411);
      case 466: /* select_list ::= select_item */ yytestcase(yyruleno==466);
      case 477: /* partition_list ::= partition_item */ yytestcase(yyruleno==477);
X
Xiaoyu Wang 已提交
4096
      case 530: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==530);
X
Xiaoyu Wang 已提交
4097 4098
{ yylhsminor.yy874 = createNodeList(pCxt, yymsp[0].minor.yy74); }
  yymsp[0].minor.yy874 = yylhsminor.yy874;
4099
        break;
4100 4101 4102 4103 4104 4105 4106 4107 4108 4109
      case 124: /* retention_list ::= retention_list NK_COMMA retention */
      case 156: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==156);
      case 200: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==200);
      case 205: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==205);
      case 254: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==254);
      case 265: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==265);
      case 341: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==341);
      case 406: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==406);
      case 467: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==467);
      case 478: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==478);
X
Xiaoyu Wang 已提交
4110
      case 531: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==531);
X
Xiaoyu Wang 已提交
4111 4112
{ yylhsminor.yy874 = addNodeToList(pCxt, yymsp[-2].minor.yy874, yymsp[0].minor.yy74); }
  yymsp[-2].minor.yy874 = yylhsminor.yy874;
4113
        break;
4114
      case 125: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */
X
Xiaoyu Wang 已提交
4115 4116
{ yylhsminor.yy74 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4117
        break;
4118 4119
      case 126: /* speed_opt ::= */
      case 291: /* bufsize_opt ::= */ yytestcase(yyruleno==291);
X
Xiaoyu Wang 已提交
4120
{ yymsp[1].minor.yy856 = 0; }
4121
        break;
4122 4123
      case 127: /* speed_opt ::= MAX_SPEED NK_INTEGER */
      case 292: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==292);
X
Xiaoyu Wang 已提交
4124
{ yymsp[-1].minor.yy856 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); }
4125
        break;
4126 4127
      case 128: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */
      case 130: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==130);
X
Xiaoyu Wang 已提交
4128
{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy335, yymsp[-5].minor.yy74, yymsp[-3].minor.yy874, yymsp[-1].minor.yy874, yymsp[0].minor.yy74); }
4129
        break;
4130
      case 129: /* cmd ::= CREATE TABLE multi_create_clause */
X
Xiaoyu Wang 已提交
4131
{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy874); }
4132
        break;
4133
      case 131: /* cmd ::= DROP TABLE multi_drop_clause */
X
Xiaoyu Wang 已提交
4134
{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy874); }
4135
        break;
4136
      case 132: /* cmd ::= DROP STABLE exists_opt full_table_name */
X
Xiaoyu Wang 已提交
4137
{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy335, yymsp[0].minor.yy74); }
4138
        break;
4139 4140
      case 133: /* cmd ::= ALTER TABLE alter_table_clause */
      case 314: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==314);
X
Xiaoyu Wang 已提交
4141
{ pCxt->pRootNode = yymsp[0].minor.yy74; }
4142
        break;
4143
      case 134: /* cmd ::= ALTER STABLE alter_table_clause */
X
Xiaoyu Wang 已提交
4144
{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy74); }
4145
        break;
4146
      case 135: /* alter_table_clause ::= full_table_name alter_table_options */
X
Xiaoyu Wang 已提交
4147 4148
{ yylhsminor.yy74 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy74, yymsp[0].minor.yy74); }
  yymsp[-1].minor.yy74 = yylhsminor.yy74;
4149
        break;
4150
      case 136: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */
X
Xiaoyu Wang 已提交
4151 4152
{ yylhsminor.yy74 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy74, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy317, yymsp[0].minor.yy898); }
  yymsp[-4].minor.yy74 = yylhsminor.yy74;
4153
        break;
4154
      case 137: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */
X
Xiaoyu Wang 已提交
4155 4156
{ yylhsminor.yy74 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy74, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy317); }
  yymsp[-3].minor.yy74 = yylhsminor.yy74;
4157
        break;
4158
      case 138: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */
X
Xiaoyu Wang 已提交
4159 4160
{ yylhsminor.yy74 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy74, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy317, yymsp[0].minor.yy898); }
  yymsp[-4].minor.yy74 = yylhsminor.yy74;
4161
        break;
4162
      case 139: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */
X
Xiaoyu Wang 已提交
4163 4164
{ yylhsminor.yy74 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy74, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy317, &yymsp[0].minor.yy317); }
  yymsp[-4].minor.yy74 = yylhsminor.yy74;
4165
        break;
4166
      case 140: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */
X
Xiaoyu Wang 已提交
4167 4168
{ yylhsminor.yy74 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy74, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy317, yymsp[0].minor.yy898); }
  yymsp[-4].minor.yy74 = yylhsminor.yy74;
4169
        break;
4170
      case 141: /* alter_table_clause ::= full_table_name DROP TAG column_name */
X
Xiaoyu Wang 已提交
4171 4172
{ yylhsminor.yy74 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy74, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy317); }
  yymsp[-3].minor.yy74 = yylhsminor.yy74;
4173
        break;
4174
      case 142: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */
X
Xiaoyu Wang 已提交
4175 4176
{ yylhsminor.yy74 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy74, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy317, yymsp[0].minor.yy898); }
  yymsp[-4].minor.yy74 = yylhsminor.yy74;
4177
        break;
4178
      case 143: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */
X
Xiaoyu Wang 已提交
4179 4180
{ yylhsminor.yy74 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy74, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy317, &yymsp[0].minor.yy317); }
  yymsp[-4].minor.yy74 = yylhsminor.yy74;
4181
        break;
4182
      case 144: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */
X
Xiaoyu Wang 已提交
4183 4184
{ yylhsminor.yy74 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy74, &yymsp[-2].minor.yy317, yymsp[0].minor.yy74); }
  yymsp[-5].minor.yy74 = yylhsminor.yy74;
4185
        break;
4186 4187 4188
      case 146: /* multi_create_clause ::= multi_create_clause create_subtable_clause */
      case 149: /* multi_drop_clause ::= multi_drop_clause drop_table_clause */ yytestcase(yyruleno==149);
      case 412: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==412);
X
Xiaoyu Wang 已提交
4189 4190
{ yylhsminor.yy874 = addNodeToList(pCxt, yymsp[-1].minor.yy874, yymsp[0].minor.yy74); }
  yymsp[-1].minor.yy874 = yylhsminor.yy874;
4191
        break;
4192
      case 147: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */
X
Xiaoyu Wang 已提交
4193 4194
{ yylhsminor.yy74 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy335, yymsp[-8].minor.yy74, yymsp[-6].minor.yy74, yymsp[-5].minor.yy874, yymsp[-2].minor.yy874, yymsp[0].minor.yy74); }
  yymsp[-9].minor.yy74 = yylhsminor.yy74;
4195
        break;
4196
      case 150: /* drop_table_clause ::= exists_opt full_table_name */
X
Xiaoyu Wang 已提交
4197 4198
{ yylhsminor.yy74 = createDropTableClause(pCxt, yymsp[-1].minor.yy335, yymsp[0].minor.yy74); }
  yymsp[-1].minor.yy74 = yylhsminor.yy74;
4199
        break;
4200 4201 4202 4203
      case 151: /* specific_cols_opt ::= */
      case 182: /* tags_def_opt ::= */ yytestcase(yyruleno==182);
      case 252: /* tag_list_opt ::= */ yytestcase(yyruleno==252);
      case 475: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==475);
X
Xiaoyu Wang 已提交
4204 4205
      case 498: /* group_by_clause_opt ::= */ yytestcase(yyruleno==498);
      case 517: /* order_by_clause_opt ::= */ yytestcase(yyruleno==517);
X
Xiaoyu Wang 已提交
4206
{ yymsp[1].minor.yy874 = NULL; }
4207
        break;
4208
      case 152: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */
X
Xiaoyu Wang 已提交
4209
{ yymsp[-2].minor.yy874 = yymsp[-1].minor.yy874; }
4210
        break;
4211
      case 153: /* full_table_name ::= table_name */
X
Xiaoyu Wang 已提交
4212 4213
{ yylhsminor.yy74 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy317, NULL); }
  yymsp[0].minor.yy74 = yylhsminor.yy74;
4214
        break;
4215
      case 154: /* full_table_name ::= db_name NK_DOT table_name */
X
Xiaoyu Wang 已提交
4216 4217
{ yylhsminor.yy74 = createRealTableNode(pCxt, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy317, NULL); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4218
        break;
4219
      case 157: /* column_def ::= column_name type_name */
X
Xiaoyu Wang 已提交
4220 4221
{ yylhsminor.yy74 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy317, yymsp[0].minor.yy898, NULL); }
  yymsp[-1].minor.yy74 = yylhsminor.yy74;
4222
        break;
4223
      case 158: /* column_def ::= column_name type_name COMMENT NK_STRING */
X
Xiaoyu Wang 已提交
4224 4225
{ yylhsminor.yy74 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy317, yymsp[-2].minor.yy898, &yymsp[0].minor.yy0); }
  yymsp[-3].minor.yy74 = yylhsminor.yy74;
4226
        break;
4227
      case 159: /* type_name ::= BOOL */
X
Xiaoyu Wang 已提交
4228
{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_BOOL); }
4229
        break;
4230
      case 160: /* type_name ::= TINYINT */
X
Xiaoyu Wang 已提交
4231
{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_TINYINT); }
4232
        break;
4233
      case 161: /* type_name ::= SMALLINT */
X
Xiaoyu Wang 已提交
4234
{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_SMALLINT); }
4235
        break;
4236 4237
      case 162: /* type_name ::= INT */
      case 163: /* type_name ::= INTEGER */ yytestcase(yyruleno==163);
X
Xiaoyu Wang 已提交
4238
{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_INT); }
4239
        break;
4240
      case 164: /* type_name ::= BIGINT */
X
Xiaoyu Wang 已提交
4241
{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_BIGINT); }
4242
        break;
4243
      case 165: /* type_name ::= FLOAT */
X
Xiaoyu Wang 已提交
4244
{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_FLOAT); }
4245
        break;
4246
      case 166: /* type_name ::= DOUBLE */
X
Xiaoyu Wang 已提交
4247
{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_DOUBLE); }
4248
        break;
4249
      case 167: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
X
Xiaoyu Wang 已提交
4250
{ yymsp[-3].minor.yy898 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); }
4251
        break;
4252
      case 168: /* type_name ::= TIMESTAMP */
X
Xiaoyu Wang 已提交
4253
{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); }
4254
        break;
4255
      case 169: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
X
Xiaoyu Wang 已提交
4256
{ yymsp[-3].minor.yy898 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); }
4257
        break;
4258
      case 170: /* type_name ::= TINYINT UNSIGNED */
X
Xiaoyu Wang 已提交
4259
{ yymsp[-1].minor.yy898 = createDataType(TSDB_DATA_TYPE_UTINYINT); }
4260
        break;
4261
      case 171: /* type_name ::= SMALLINT UNSIGNED */
X
Xiaoyu Wang 已提交
4262
{ yymsp[-1].minor.yy898 = createDataType(TSDB_DATA_TYPE_USMALLINT); }
4263
        break;
4264
      case 172: /* type_name ::= INT UNSIGNED */
X
Xiaoyu Wang 已提交
4265
{ yymsp[-1].minor.yy898 = createDataType(TSDB_DATA_TYPE_UINT); }
4266
        break;
4267
      case 173: /* type_name ::= BIGINT UNSIGNED */
X
Xiaoyu Wang 已提交
4268
{ yymsp[-1].minor.yy898 = createDataType(TSDB_DATA_TYPE_UBIGINT); }
4269
        break;
4270
      case 174: /* type_name ::= JSON */
X
Xiaoyu Wang 已提交
4271
{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_JSON); }
4272
        break;
4273
      case 175: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
X
Xiaoyu Wang 已提交
4274
{ yymsp[-3].minor.yy898 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); }
4275
        break;
4276
      case 176: /* type_name ::= MEDIUMBLOB */
X
Xiaoyu Wang 已提交
4277
{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); }
4278
        break;
4279
      case 177: /* type_name ::= BLOB */
X
Xiaoyu Wang 已提交
4280
{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_BLOB); }
4281
        break;
4282
      case 178: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
X
Xiaoyu Wang 已提交
4283
{ yymsp[-3].minor.yy898 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); }
4284
        break;
4285
      case 179: /* type_name ::= DECIMAL */
X
Xiaoyu Wang 已提交
4286
{ yymsp[0].minor.yy898 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
4287
        break;
4288
      case 180: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
X
Xiaoyu Wang 已提交
4289
{ yymsp[-3].minor.yy898 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
4290
        break;
4291
      case 181: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
X
Xiaoyu Wang 已提交
4292
{ yymsp[-5].minor.yy898 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
4293
        break;
4294 4295
      case 183: /* tags_def_opt ::= tags_def */
      case 404: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==404);
X
Xiaoyu Wang 已提交
4296 4297
{ yylhsminor.yy874 = yymsp[0].minor.yy874; }
  yymsp[0].minor.yy874 = yylhsminor.yy874;
4298
        break;
4299
      case 184: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */
X
Xiaoyu Wang 已提交
4300
{ yymsp[-3].minor.yy874 = yymsp[-1].minor.yy874; }
4301
        break;
4302
      case 185: /* table_options ::= */
X
Xiaoyu Wang 已提交
4303
{ yymsp[1].minor.yy74 = createDefaultTableOptions(pCxt); }
X
Xiaoyu Wang 已提交
4304
        break;
4305
      case 186: /* table_options ::= table_options COMMENT NK_STRING */
X
Xiaoyu Wang 已提交
4306 4307
{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-2].minor.yy74, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4308
        break;
4309
      case 187: /* table_options ::= table_options MAX_DELAY duration_list */
X
Xiaoyu Wang 已提交
4310 4311
{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-2].minor.yy74, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy874); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4312
        break;
4313
      case 188: /* table_options ::= table_options WATERMARK duration_list */
X
Xiaoyu Wang 已提交
4314 4315
{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-2].minor.yy74, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy874); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4316
        break;
4317
      case 189: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */
X
Xiaoyu Wang 已提交
4318 4319
{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-4].minor.yy74, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy874); }
  yymsp[-4].minor.yy74 = yylhsminor.yy74;
4320
        break;
4321
      case 190: /* table_options ::= table_options TTL NK_INTEGER */
X
Xiaoyu Wang 已提交
4322 4323
{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-2].minor.yy74, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4324
        break;
4325
      case 191: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */
X
Xiaoyu Wang 已提交
4326 4327
{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-4].minor.yy74, TABLE_OPTION_SMA, yymsp[-1].minor.yy874); }
  yymsp[-4].minor.yy74 = yylhsminor.yy74;
4328
        break;
4329
      case 192: /* table_options ::= table_options DELETE_MARK duration_list */
X
Xiaoyu Wang 已提交
4330 4331
{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-2].minor.yy74, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy874); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4332
        break;
4333
      case 193: /* alter_table_options ::= alter_table_option */
X
Xiaoyu Wang 已提交
4334 4335
{ yylhsminor.yy74 = createAlterTableOptions(pCxt); yylhsminor.yy74 = setTableOption(pCxt, yylhsminor.yy74, yymsp[0].minor.yy767.type, &yymsp[0].minor.yy767.val); }
  yymsp[0].minor.yy74 = yylhsminor.yy74;
4336
        break;
4337
      case 194: /* alter_table_options ::= alter_table_options alter_table_option */
X
Xiaoyu Wang 已提交
4338 4339
{ yylhsminor.yy74 = setTableOption(pCxt, yymsp[-1].minor.yy74, yymsp[0].minor.yy767.type, &yymsp[0].minor.yy767.val); }
  yymsp[-1].minor.yy74 = yylhsminor.yy74;
X
Xiaoyu Wang 已提交
4340
        break;
4341
      case 195: /* alter_table_option ::= COMMENT NK_STRING */
X
Xiaoyu Wang 已提交
4342
{ yymsp[-1].minor.yy767.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; }
X
Xiaoyu Wang 已提交
4343
        break;
4344
      case 196: /* alter_table_option ::= TTL NK_INTEGER */
X
Xiaoyu Wang 已提交
4345
{ yymsp[-1].minor.yy767.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy767.val = yymsp[0].minor.yy0; }
X
Xiaoyu Wang 已提交
4346
        break;
4347 4348
      case 197: /* duration_list ::= duration_literal */
      case 369: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==369);
X
Xiaoyu Wang 已提交
4349 4350
{ yylhsminor.yy874 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy74)); }
  yymsp[0].minor.yy874 = yylhsminor.yy874;
X
Xiaoyu Wang 已提交
4351
        break;
4352 4353
      case 198: /* duration_list ::= duration_list NK_COMMA duration_literal */
      case 370: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==370);
X
Xiaoyu Wang 已提交
4354 4355
{ yylhsminor.yy874 = addNodeToList(pCxt, yymsp[-2].minor.yy874, releaseRawExprNode(pCxt, yymsp[0].minor.yy74)); }
  yymsp[-2].minor.yy874 = yylhsminor.yy874;
4356
        break;
4357
      case 201: /* rollup_func_name ::= function_name */
X
Xiaoyu Wang 已提交
4358 4359
{ yylhsminor.yy74 = createFunctionNode(pCxt, &yymsp[0].minor.yy317, NULL); }
  yymsp[0].minor.yy74 = yylhsminor.yy74;
4360
        break;
4361 4362 4363
      case 202: /* rollup_func_name ::= FIRST */
      case 203: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==203);
      case 256: /* tag_item ::= QTAGS */ yytestcase(yyruleno==256);
X
Xiaoyu Wang 已提交
4364 4365
{ yylhsminor.yy74 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); }
  yymsp[0].minor.yy74 = yylhsminor.yy74;
4366
        break;
4367 4368
      case 206: /* col_name ::= column_name */
      case 257: /* tag_item ::= column_name */ yytestcase(yyruleno==257);
X
Xiaoyu Wang 已提交
4369 4370
{ yylhsminor.yy74 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy317); }
  yymsp[0].minor.yy74 = yylhsminor.yy74;
4371
        break;
4372
      case 207: /* cmd ::= SHOW DNODES */
4373
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); }
4374
        break;
4375
      case 208: /* cmd ::= SHOW USERS */
4376
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT); }
4377
        break;
4378
      case 209: /* cmd ::= SHOW USER PRIVILEGES */
4379 4380
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USER_PRIVILEGES_STMT); }
        break;
4381
      case 210: /* cmd ::= SHOW DATABASES */
4382
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); }
4383
        break;
4384
      case 211: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */
X
Xiaoyu Wang 已提交
4385
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy74, yymsp[0].minor.yy74, OP_TYPE_LIKE); }
4386
        break;
4387
      case 212: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */
X
Xiaoyu Wang 已提交
4388
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy74, yymsp[0].minor.yy74, OP_TYPE_LIKE); }
4389
        break;
4390
      case 213: /* cmd ::= SHOW db_name_cond_opt VGROUPS */
X
Xiaoyu Wang 已提交
4391
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy74, NULL, OP_TYPE_LIKE); }
4392
        break;
4393
      case 214: /* cmd ::= SHOW MNODES */
4394
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); }
4395
        break;
4396
      case 215: /* cmd ::= SHOW QNODES */
4397
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT); }
4398
        break;
4399
      case 216: /* cmd ::= SHOW FUNCTIONS */
4400
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); }
4401
        break;
4402
      case 217: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */
X
Xiaoyu Wang 已提交
4403
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy74, yymsp[-1].minor.yy74, OP_TYPE_EQUAL); }
4404
        break;
4405
      case 218: /* cmd ::= SHOW STREAMS */
4406
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); }
4407
        break;
4408
      case 219: /* cmd ::= SHOW ACCOUNTS */
4409
{ pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); }
4410
        break;
4411
      case 220: /* cmd ::= SHOW APPS */
4412
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT); }
4413
        break;
4414
      case 221: /* cmd ::= SHOW CONNECTIONS */
4415
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); }
4416
        break;
4417 4418
      case 222: /* cmd ::= SHOW LICENCES */
      case 223: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==223);
X
Xiaoyu Wang 已提交
4419
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); }
4420
        break;
4421
      case 224: /* cmd ::= SHOW CREATE DATABASE db_name */
X
Xiaoyu Wang 已提交
4422
{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy317); }
4423
        break;
4424
      case 225: /* cmd ::= SHOW CREATE TABLE full_table_name */
X
Xiaoyu Wang 已提交
4425
{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy74); }
4426
        break;
4427
      case 226: /* cmd ::= SHOW CREATE STABLE full_table_name */
X
Xiaoyu Wang 已提交
4428
{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy74); }
4429
        break;
4430
      case 227: /* cmd ::= SHOW QUERIES */
4431
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); }
4432
        break;
4433
      case 228: /* cmd ::= SHOW SCORES */
4434
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT); }
4435
        break;
4436
      case 229: /* cmd ::= SHOW TOPICS */
4437
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT); }
4438
        break;
4439 4440
      case 230: /* cmd ::= SHOW VARIABLES */
      case 231: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==231);
4441
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLES_STMT); }
X
Xiaoyu Wang 已提交
4442
        break;
4443
      case 232: /* cmd ::= SHOW LOCAL VARIABLES */
4444 4445
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); }
        break;
4446
      case 233: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */
X
Xiaoyu Wang 已提交
4447
{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy74); }
4448
        break;
4449
      case 234: /* cmd ::= SHOW BNODES */
4450
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); }
4451
        break;
4452
      case 235: /* cmd ::= SHOW SNODES */
4453
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT); }
4454
        break;
4455
      case 236: /* cmd ::= SHOW CLUSTER */
4456
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT); }
4457
        break;
4458
      case 237: /* cmd ::= SHOW TRANSACTIONS */
4459 4460
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); }
        break;
4461
      case 238: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */
X
Xiaoyu Wang 已提交
4462
{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy74); }
X
Xiaoyu Wang 已提交
4463
        break;
4464
      case 239: /* cmd ::= SHOW CONSUMERS */
4465
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); }
X
Xiaoyu Wang 已提交
4466
        break;
4467
      case 240: /* cmd ::= SHOW SUBSCRIPTIONS */
4468
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); }
X
Xiaoyu Wang 已提交
4469
        break;
4470
      case 241: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */
X
Xiaoyu Wang 已提交
4471
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy74, yymsp[-1].minor.yy74, OP_TYPE_EQUAL); }
4472
        break;
4473
      case 242: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */
X
Xiaoyu Wang 已提交
4474
{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy74, yymsp[0].minor.yy74, yymsp[-3].minor.yy874); }
4475
        break;
4476
      case 243: /* cmd ::= SHOW VNODES NK_INTEGER */
4477 4478
{ pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); }
        break;
4479
      case 244: /* cmd ::= SHOW VNODES NK_STRING */
4480
{ pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, createValueNode(pCxt, TSDB_DATA_TYPE_VARCHAR, &yymsp[0].minor.yy0)); }
4481
        break;
4482 4483
      case 245: /* db_name_cond_opt ::= */
      case 250: /* from_db_opt ::= */ yytestcase(yyruleno==250);
X
Xiaoyu Wang 已提交
4484
{ yymsp[1].minor.yy74 = createDefaultDatabaseCondValue(pCxt); }
4485
        break;
4486
      case 246: /* db_name_cond_opt ::= db_name NK_DOT */
X
Xiaoyu Wang 已提交
4487 4488
{ yylhsminor.yy74 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy317); }
  yymsp[-1].minor.yy74 = yylhsminor.yy74;
X
Xiaoyu Wang 已提交
4489
        break;
4490 4491 4492 4493 4494 4495
      case 247: /* like_pattern_opt ::= */
      case 302: /* subtable_opt ::= */ yytestcase(yyruleno==302);
      case 414: /* case_when_else_opt ::= */ yytestcase(yyruleno==414);
      case 444: /* from_clause_opt ::= */ yytestcase(yyruleno==444);
      case 473: /* where_clause_opt ::= */ yytestcase(yyruleno==473);
      case 482: /* twindow_clause_opt ::= */ yytestcase(yyruleno==482);
X
Xiaoyu Wang 已提交
4496 4497 4498 4499 4500 4501 4502
      case 488: /* sliding_opt ::= */ yytestcase(yyruleno==488);
      case 490: /* fill_opt ::= */ yytestcase(yyruleno==490);
      case 502: /* having_clause_opt ::= */ yytestcase(yyruleno==502);
      case 504: /* range_opt ::= */ yytestcase(yyruleno==504);
      case 506: /* every_opt ::= */ yytestcase(yyruleno==506);
      case 519: /* slimit_clause_opt ::= */ yytestcase(yyruleno==519);
      case 523: /* limit_clause_opt ::= */ yytestcase(yyruleno==523);
X
Xiaoyu Wang 已提交
4503
{ yymsp[1].minor.yy74 = NULL; }
X
Xiaoyu Wang 已提交
4504
        break;
4505
      case 248: /* like_pattern_opt ::= LIKE NK_STRING */
X
Xiaoyu Wang 已提交
4506
{ yymsp[-1].minor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
X
Xiaoyu Wang 已提交
4507
        break;
4508
      case 249: /* table_name_cond ::= table_name */
X
Xiaoyu Wang 已提交
4509 4510
{ yylhsminor.yy74 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy317); }
  yymsp[0].minor.yy74 = yylhsminor.yy74;
X
Xiaoyu Wang 已提交
4511
        break;
4512
      case 251: /* from_db_opt ::= FROM db_name */
X
Xiaoyu Wang 已提交
4513
{ yymsp[-1].minor.yy74 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy317); }
X
Xiaoyu Wang 已提交
4514
        break;
4515
      case 255: /* tag_item ::= TBNAME */
X
Xiaoyu Wang 已提交
4516 4517
{ yylhsminor.yy74 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); }
  yymsp[0].minor.yy74 = yylhsminor.yy74;
4518
        break;
4519
      case 258: /* tag_item ::= column_name column_alias */
X
Xiaoyu Wang 已提交
4520 4521
{ yylhsminor.yy74 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy317), &yymsp[0].minor.yy317); }
  yymsp[-1].minor.yy74 = yylhsminor.yy74;
4522
        break;
4523
      case 259: /* tag_item ::= column_name AS column_alias */
X
Xiaoyu Wang 已提交
4524 4525
{ yylhsminor.yy74 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy317), &yymsp[0].minor.yy317); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4526
        break;
4527
      case 260: /* cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options */
X
Xiaoyu Wang 已提交
4528
{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy335, yymsp[-3].minor.yy74, yymsp[-1].minor.yy74, NULL, yymsp[0].minor.yy74); }
X
Xiaoyu Wang 已提交
4529
        break;
4530
      case 261: /* cmd ::= DROP INDEX exists_opt full_table_name */
X
Xiaoyu Wang 已提交
4531
{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy335, yymsp[0].minor.yy74); }
X
Xiaoyu Wang 已提交
4532
        break;
4533
      case 262: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */
X
Xiaoyu Wang 已提交
4534
{ yymsp[-9].minor.yy74 = createIndexOption(pCxt, yymsp[-7].minor.yy874, releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), NULL, yymsp[-1].minor.yy74, yymsp[0].minor.yy74); }
X
Xiaoyu Wang 已提交
4535
        break;
4536
      case 263: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */
X
Xiaoyu Wang 已提交
4537
{ yymsp[-11].minor.yy74 = createIndexOption(pCxt, yymsp[-9].minor.yy874, releaseRawExprNode(pCxt, yymsp[-5].minor.yy74), releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), yymsp[-1].minor.yy74, yymsp[0].minor.yy74); }
X
Xiaoyu Wang 已提交
4538
        break;
4539
      case 266: /* func ::= function_name NK_LP expression_list NK_RP */
X
Xiaoyu Wang 已提交
4540 4541
{ yylhsminor.yy74 = createFunctionNode(pCxt, &yymsp[-3].minor.yy317, yymsp[-1].minor.yy874); }
  yymsp[-3].minor.yy74 = yylhsminor.yy74;
4542
        break;
4543 4544
      case 267: /* sma_stream_opt ::= */
      case 295: /* stream_options ::= */ yytestcase(yyruleno==295);
X
Xiaoyu Wang 已提交
4545
{ yymsp[1].minor.yy74 = createStreamOptions(pCxt); }
4546
        break;
4547 4548
      case 268: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */
      case 299: /* stream_options ::= stream_options WATERMARK duration_literal */ yytestcase(yyruleno==299);
X
Xiaoyu Wang 已提交
4549 4550
{ ((SStreamOptions*)yymsp[-2].minor.yy74)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy74); yylhsminor.yy74 = yymsp[-2].minor.yy74; }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
X
Xiaoyu Wang 已提交
4551
        break;
4552
      case 269: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */
X
Xiaoyu Wang 已提交
4553 4554
{ ((SStreamOptions*)yymsp[-2].minor.yy74)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy74); yylhsminor.yy74 = yymsp[-2].minor.yy74; }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
X
Xiaoyu Wang 已提交
4555
        break;
4556
      case 270: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */
X
Xiaoyu Wang 已提交
4557 4558
{ ((SStreamOptions*)yymsp[-2].minor.yy74)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy74); yylhsminor.yy74 = yymsp[-2].minor.yy74; }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
X
Xiaoyu Wang 已提交
4559
        break;
4560
      case 271: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */
X
Xiaoyu Wang 已提交
4561
{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy335, &yymsp[-2].minor.yy317, yymsp[0].minor.yy74); }
X
Xiaoyu Wang 已提交
4562
        break;
4563
      case 272: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */
X
Xiaoyu Wang 已提交
4564
{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy335, &yymsp[-3].minor.yy317, &yymsp[0].minor.yy317, false); }
4565
        break;
4566
      case 273: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */
X
Xiaoyu Wang 已提交
4567
{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy335, &yymsp[-5].minor.yy317, &yymsp[0].minor.yy317, true); }
X
Xiaoyu Wang 已提交
4568
        break;
4569
      case 274: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */
X
Xiaoyu Wang 已提交
4570
{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy335, &yymsp[-3].minor.yy317, yymsp[0].minor.yy74, false); }
4571
        break;
4572
      case 275: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */
X
Xiaoyu Wang 已提交
4573
{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy335, &yymsp[-5].minor.yy317, yymsp[0].minor.yy74, true); }
4574
        break;
4575
      case 276: /* cmd ::= DROP TOPIC exists_opt topic_name */
X
Xiaoyu Wang 已提交
4576
{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy335, &yymsp[0].minor.yy317); }
4577
        break;
4578
      case 277: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */
X
Xiaoyu Wang 已提交
4579
{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy335, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy317); }
4580
        break;
4581 4582
      case 278: /* cmd ::= DESC full_table_name */
      case 279: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==279);
X
Xiaoyu Wang 已提交
4583
{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy74); }
4584
        break;
4585
      case 280: /* cmd ::= RESET QUERY CACHE */
4586
{ pCxt->pRootNode = createResetQueryCacheStmt(pCxt); }
4587
        break;
4588
      case 281: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */
X
Xiaoyu Wang 已提交
4589
{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy335, yymsp[-1].minor.yy74, yymsp[0].minor.yy74); }
4590
        break;
4591
      case 284: /* explain_options ::= */
X
Xiaoyu Wang 已提交
4592
{ yymsp[1].minor.yy74 = createDefaultExplainOptions(pCxt); }
4593
        break;
4594
      case 285: /* explain_options ::= explain_options VERBOSE NK_BOOL */
X
Xiaoyu Wang 已提交
4595 4596
{ yylhsminor.yy74 = setExplainVerbose(pCxt, yymsp[-2].minor.yy74, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4597
        break;
4598
      case 286: /* explain_options ::= explain_options RATIO NK_FLOAT */
X
Xiaoyu Wang 已提交
4599 4600
{ yylhsminor.yy74 = setExplainRatio(pCxt, yymsp[-2].minor.yy74, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4601
        break;
4602
      case 287: /* cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */
X
Xiaoyu Wang 已提交
4603
{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy335, yymsp[-8].minor.yy335, &yymsp[-5].minor.yy317, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy898, yymsp[0].minor.yy856); }
4604
        break;
4605
      case 288: /* cmd ::= DROP FUNCTION exists_opt function_name */
X
Xiaoyu Wang 已提交
4606
{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy335, &yymsp[0].minor.yy317); }
4607
        break;
4608
      case 293: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name tags_def_opt subtable_opt AS query_or_subquery */
X
Xiaoyu Wang 已提交
4609
{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-8].minor.yy335, &yymsp[-7].minor.yy317, yymsp[-4].minor.yy74, yymsp[-6].minor.yy74, yymsp[-3].minor.yy874, yymsp[-2].minor.yy74, yymsp[0].minor.yy74); }
4610
        break;
4611
      case 294: /* cmd ::= DROP STREAM exists_opt stream_name */
X
Xiaoyu Wang 已提交
4612
{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy335, &yymsp[0].minor.yy317); }
4613
        break;
4614
      case 296: /* stream_options ::= stream_options TRIGGER AT_ONCE */
X
Xiaoyu Wang 已提交
4615 4616
{ ((SStreamOptions*)yymsp[-2].minor.yy74)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy74 = yymsp[-2].minor.yy74; }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4617
        break;
4618
      case 297: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */
X
Xiaoyu Wang 已提交
4619 4620
{ ((SStreamOptions*)yymsp[-2].minor.yy74)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy74 = yymsp[-2].minor.yy74; }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4621
        break;
4622
      case 298: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
X
Xiaoyu Wang 已提交
4623 4624
{ ((SStreamOptions*)yymsp[-3].minor.yy74)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy74)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy74); yylhsminor.yy74 = yymsp[-3].minor.yy74; }
  yymsp[-3].minor.yy74 = yylhsminor.yy74;
4625
        break;
4626
      case 300: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */
X
Xiaoyu Wang 已提交
4627 4628
{ ((SStreamOptions*)yymsp[-3].minor.yy74)->ignoreExpired = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy74 = yymsp[-3].minor.yy74; }
  yymsp[-3].minor.yy74 = yylhsminor.yy74;
4629
        break;
4630
      case 301: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */
X
Xiaoyu Wang 已提交
4631 4632
{ ((SStreamOptions*)yymsp[-2].minor.yy74)->fillHistory = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); yylhsminor.yy74 = yymsp[-2].minor.yy74; }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4633
        break;
4634
      case 303: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */
X
Xiaoyu Wang 已提交
4635 4636
      case 489: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==489);
      case 507: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==507);
X
Xiaoyu Wang 已提交
4637
{ yymsp[-3].minor.yy74 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy74); }
4638
        break;
4639
      case 304: /* cmd ::= KILL CONNECTION NK_INTEGER */
4640 4641
{ pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); }
        break;
4642
      case 305: /* cmd ::= KILL QUERY NK_STRING */
X
Xiaoyu Wang 已提交
4643
{ pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); }
4644
        break;
4645
      case 306: /* cmd ::= KILL TRANSACTION NK_INTEGER */
4646 4647
{ pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); }
        break;
4648
      case 307: /* cmd ::= BALANCE VGROUP */
X
Xiaoyu Wang 已提交
4649 4650
{ pCxt->pRootNode = createBalanceVgroupStmt(pCxt); }
        break;
4651
      case 308: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */
4652 4653
{ pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
        break;
4654
      case 309: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */
X
Xiaoyu Wang 已提交
4655
{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy874); }
4656
        break;
4657
      case 310: /* cmd ::= SPLIT VGROUP NK_INTEGER */
4658 4659
{ pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); }
        break;
4660
      case 311: /* dnode_list ::= DNODE NK_INTEGER */
X
Xiaoyu Wang 已提交
4661
{ yymsp[-1].minor.yy874 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
4662
        break;
4663
      case 313: /* cmd ::= DELETE FROM full_table_name where_clause_opt */
X
Xiaoyu Wang 已提交
4664
{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy74, yymsp[0].minor.yy74); }
4665
        break;
4666
      case 315: /* cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */
X
Xiaoyu Wang 已提交
4667
{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-4].minor.yy74, yymsp[-2].minor.yy874, yymsp[0].minor.yy74); }
4668
        break;
4669
      case 316: /* cmd ::= INSERT INTO full_table_name query_or_subquery */
X
Xiaoyu Wang 已提交
4670
{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-1].minor.yy74, NULL, yymsp[0].minor.yy74); }
4671
        break;
4672
      case 317: /* literal ::= NK_INTEGER */
X
Xiaoyu Wang 已提交
4673 4674
{ yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy74 = yylhsminor.yy74;
4675
        break;
4676
      case 318: /* literal ::= NK_FLOAT */
X
Xiaoyu Wang 已提交
4677 4678
{ yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy74 = yylhsminor.yy74;
4679
        break;
4680
      case 319: /* literal ::= NK_STRING */
X
Xiaoyu Wang 已提交
4681 4682
{ yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy74 = yylhsminor.yy74;
4683
        break;
4684
      case 320: /* literal ::= NK_BOOL */
X
Xiaoyu Wang 已提交
4685 4686
{ yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy74 = yylhsminor.yy74;
4687
        break;
4688
      case 321: /* literal ::= TIMESTAMP NK_STRING */
X
Xiaoyu Wang 已提交
4689 4690
{ yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); }
  yymsp[-1].minor.yy74 = yylhsminor.yy74;
4691
        break;
4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708
      case 322: /* literal ::= duration_literal */
      case 332: /* signed_literal ::= signed */ yytestcase(yyruleno==332);
      case 352: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==352);
      case 353: /* expression ::= literal */ yytestcase(yyruleno==353);
      case 354: /* expression ::= pseudo_column */ yytestcase(yyruleno==354);
      case 355: /* expression ::= column_reference */ yytestcase(yyruleno==355);
      case 356: /* expression ::= function_expression */ yytestcase(yyruleno==356);
      case 357: /* expression ::= case_when_expression */ yytestcase(yyruleno==357);
      case 387: /* function_expression ::= literal_func */ yytestcase(yyruleno==387);
      case 436: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==436);
      case 440: /* boolean_primary ::= predicate */ yytestcase(yyruleno==440);
      case 442: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==442);
      case 443: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==443);
      case 446: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==446);
      case 448: /* table_reference ::= table_primary */ yytestcase(yyruleno==448);
      case 449: /* table_reference ::= joined_table */ yytestcase(yyruleno==449);
      case 453: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==453);
X
Xiaoyu Wang 已提交
4709 4710 4711 4712
      case 509: /* query_simple ::= query_specification */ yytestcase(yyruleno==509);
      case 510: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==510);
      case 513: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==513);
      case 515: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==515);
X
Xiaoyu Wang 已提交
4713 4714
{ yylhsminor.yy74 = yymsp[0].minor.yy74; }
  yymsp[0].minor.yy74 = yylhsminor.yy74;
4715
        break;
4716
      case 323: /* literal ::= NULL */
X
Xiaoyu Wang 已提交
4717 4718
{ yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy74 = yylhsminor.yy74;
4719
        break;
4720
      case 324: /* literal ::= NK_QUESTION */
X
Xiaoyu Wang 已提交
4721 4722
{ yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy74 = yylhsminor.yy74;
4723
        break;
4724
      case 325: /* duration_literal ::= NK_VARIABLE */
X
Xiaoyu Wang 已提交
4725 4726
{ yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy74 = yylhsminor.yy74;
4727
        break;
4728
      case 326: /* signed ::= NK_INTEGER */
X
Xiaoyu Wang 已提交
4729 4730
{ yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); }
  yymsp[0].minor.yy74 = yylhsminor.yy74;
4731
        break;
4732
      case 327: /* signed ::= NK_PLUS NK_INTEGER */
X
Xiaoyu Wang 已提交
4733
{ yymsp[-1].minor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); }
4734
        break;
4735
      case 328: /* signed ::= NK_MINUS NK_INTEGER */
X
Xiaoyu Wang 已提交
4736 4737 4738
{ 
                                                                                    SToken t = yymsp[-1].minor.yy0;
                                                                                    t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
X
Xiaoyu Wang 已提交
4739
                                                                                    yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t);
X
Xiaoyu Wang 已提交
4740
                                                                                  }
X
Xiaoyu Wang 已提交
4741
  yymsp[-1].minor.yy74 = yylhsminor.yy74;
X
Xiaoyu Wang 已提交
4742
        break;
4743
      case 329: /* signed ::= NK_FLOAT */
X
Xiaoyu Wang 已提交
4744 4745
{ yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
  yymsp[0].minor.yy74 = yylhsminor.yy74;
X
Xiaoyu Wang 已提交
4746
        break;
4747
      case 330: /* signed ::= NK_PLUS NK_FLOAT */
X
Xiaoyu Wang 已提交
4748
{ yymsp[-1].minor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
X
Xiaoyu Wang 已提交
4749
        break;
4750
      case 331: /* signed ::= NK_MINUS NK_FLOAT */
X
Xiaoyu Wang 已提交
4751 4752 4753
{ 
                                                                                    SToken t = yymsp[-1].minor.yy0;
                                                                                    t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
X
Xiaoyu Wang 已提交
4754
                                                                                    yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t);
X
Xiaoyu Wang 已提交
4755
                                                                                  }
X
Xiaoyu Wang 已提交
4756
  yymsp[-1].minor.yy74 = yylhsminor.yy74;
4757
        break;
4758
      case 333: /* signed_literal ::= NK_STRING */
X
Xiaoyu Wang 已提交
4759 4760
{ yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
  yymsp[0].minor.yy74 = yylhsminor.yy74;
4761
        break;
4762
      case 334: /* signed_literal ::= NK_BOOL */
X
Xiaoyu Wang 已提交
4763 4764
{ yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); }
  yymsp[0].minor.yy74 = yylhsminor.yy74;
4765
        break;
4766
      case 335: /* signed_literal ::= TIMESTAMP NK_STRING */
X
Xiaoyu Wang 已提交
4767
{ yymsp[-1].minor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); }
4768
        break;
4769 4770 4771 4772 4773
      case 336: /* signed_literal ::= duration_literal */
      case 338: /* signed_literal ::= literal_func */ yytestcase(yyruleno==338);
      case 407: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==407);
      case 469: /* select_item ::= common_expression */ yytestcase(yyruleno==469);
      case 479: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==479);
X
Xiaoyu Wang 已提交
4774 4775 4776
      case 514: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==514);
      case 516: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==516);
      case 529: /* search_condition ::= common_expression */ yytestcase(yyruleno==529);
X
Xiaoyu Wang 已提交
4777 4778
{ yylhsminor.yy74 = releaseRawExprNode(pCxt, yymsp[0].minor.yy74); }
  yymsp[0].minor.yy74 = yylhsminor.yy74;
4779
        break;
4780
      case 337: /* signed_literal ::= NULL */
X
Xiaoyu Wang 已提交
4781 4782
{ yylhsminor.yy74 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); }
  yymsp[0].minor.yy74 = yylhsminor.yy74;
4783
        break;
4784
      case 339: /* signed_literal ::= NK_QUESTION */
X
Xiaoyu Wang 已提交
4785 4786
{ yylhsminor.yy74 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); }
  yymsp[0].minor.yy74 = yylhsminor.yy74;
4787
        break;
4788 4789
      case 358: /* expression ::= NK_LP expression NK_RP */
      case 441: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==441);
X
Xiaoyu Wang 已提交
4790
      case 528: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==528);
X
Xiaoyu Wang 已提交
4791 4792
{ yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy74)); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4793
        break;
4794
      case 359: /* expression ::= NK_PLUS expr_or_subquery */
X
Xiaoyu Wang 已提交
4795
{
X
Xiaoyu Wang 已提交
4796 4797
                                                                                    SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74);
                                                                                    yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy74));
X
Xiaoyu Wang 已提交
4798
                                                                                  }
X
Xiaoyu Wang 已提交
4799
  yymsp[-1].minor.yy74 = yylhsminor.yy74;
X
Xiaoyu Wang 已提交
4800
        break;
4801
      case 360: /* expression ::= NK_MINUS expr_or_subquery */
X
Xiaoyu Wang 已提交
4802
{
X
Xiaoyu Wang 已提交
4803 4804
                                                                                    SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74);
                                                                                    yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy74), NULL));
X
Xiaoyu Wang 已提交
4805
                                                                                  }
X
Xiaoyu Wang 已提交
4806
  yymsp[-1].minor.yy74 = yylhsminor.yy74;
4807
        break;
4808
      case 361: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */
4809
{
X
Xiaoyu Wang 已提交
4810 4811 4812
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74);
                                                                                    yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); 
4813
                                                                                  }
X
Xiaoyu Wang 已提交
4814
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
X
Xiaoyu Wang 已提交
4815
        break;
4816
      case 362: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */
4817
{
X
Xiaoyu Wang 已提交
4818 4819 4820
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74);
                                                                                    yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); 
4821
                                                                                  }
X
Xiaoyu Wang 已提交
4822
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4823
        break;
4824
      case 363: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */
4825
{
X
Xiaoyu Wang 已提交
4826 4827 4828
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74);
                                                                                    yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); 
4829
                                                                                  }
X
Xiaoyu Wang 已提交
4830
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4831
        break;
4832
      case 364: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */
4833
{
X
Xiaoyu Wang 已提交
4834 4835 4836
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74);
                                                                                    yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); 
4837
                                                                                  }
X
Xiaoyu Wang 已提交
4838
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4839
        break;
4840
      case 365: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */
4841
{
X
Xiaoyu Wang 已提交
4842 4843 4844
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74);
                                                                                    yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74)));
4845
                                                                                  }
X
Xiaoyu Wang 已提交
4846
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4847
        break;
4848
      case 366: /* expression ::= column_reference NK_ARROW NK_STRING */
4849
{
X
Xiaoyu Wang 已提交
4850 4851
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74);
                                                                                    yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); 
4852
                                                                                  }
X
Xiaoyu Wang 已提交
4853
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4854
        break;
4855
      case 367: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */
4856
{
X
Xiaoyu Wang 已提交
4857 4858 4859
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74);
                                                                                    yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74)));
4860
                                                                                  }
X
Xiaoyu Wang 已提交
4861
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4862
        break;
4863
      case 368: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */
4864
{
X
Xiaoyu Wang 已提交
4865 4866 4867
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74);
                                                                                    yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74)));
4868
                                                                                  }
X
Xiaoyu Wang 已提交
4869
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4870
        break;
4871
      case 371: /* column_reference ::= column_name */
X
Xiaoyu Wang 已提交
4872 4873
{ yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy317, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy317)); }
  yymsp[0].minor.yy74 = yylhsminor.yy74;
4874
        break;
4875
      case 372: /* column_reference ::= table_name NK_DOT column_name */
X
Xiaoyu Wang 已提交
4876 4877
{ yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy317, createColumnNode(pCxt, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy317)); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4878
        break;
4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889
      case 373: /* pseudo_column ::= ROWTS */
      case 374: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==374);
      case 376: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==376);
      case 377: /* pseudo_column ::= QEND */ yytestcase(yyruleno==377);
      case 378: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==378);
      case 379: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==379);
      case 380: /* pseudo_column ::= WEND */ yytestcase(yyruleno==380);
      case 381: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==381);
      case 382: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==382);
      case 383: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==383);
      case 389: /* literal_func ::= NOW */ yytestcase(yyruleno==389);
X
Xiaoyu Wang 已提交
4890 4891
{ yylhsminor.yy74 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); }
  yymsp[0].minor.yy74 = yylhsminor.yy74;
4892
        break;
4893
      case 375: /* pseudo_column ::= table_name NK_DOT TBNAME */
X
Xiaoyu Wang 已提交
4894 4895
{ yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy317)))); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4896
        break;
4897 4898
      case 384: /* function_expression ::= function_name NK_LP expression_list NK_RP */
      case 385: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==385);
X
Xiaoyu Wang 已提交
4899 4900
{ yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy317, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy317, yymsp[-1].minor.yy874)); }
  yymsp[-3].minor.yy74 = yylhsminor.yy74;
4901
        break;
4902
      case 386: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */
X
Xiaoyu Wang 已提交
4903 4904
{ yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), yymsp[-1].minor.yy898)); }
  yymsp[-5].minor.yy74 = yylhsminor.yy74;
4905
        break;
4906
      case 388: /* literal_func ::= noarg_func NK_LP NK_RP */
X
Xiaoyu Wang 已提交
4907 4908
{ yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy317, NULL)); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4909
        break;
4910
      case 403: /* star_func_para_list ::= NK_STAR */
X
Xiaoyu Wang 已提交
4911 4912
{ yylhsminor.yy874 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy874 = yylhsminor.yy874;
4913
        break;
4914 4915
      case 408: /* star_func_para ::= table_name NK_DOT NK_STAR */
      case 472: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==472);
X
Xiaoyu Wang 已提交
4916 4917
{ yylhsminor.yy74 = createColumnNode(pCxt, &yymsp[-2].minor.yy317, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4918
        break;
4919
      case 409: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */
X
Xiaoyu Wang 已提交
4920 4921
{ yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy874, yymsp[-1].minor.yy74)); }
  yymsp[-3].minor.yy74 = yylhsminor.yy74;
4922
        break;
4923
      case 410: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */
X
Xiaoyu Wang 已提交
4924 4925
{ yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), yymsp[-2].minor.yy874, yymsp[-1].minor.yy74)); }
  yymsp[-4].minor.yy74 = yylhsminor.yy74;
4926
        break;
4927
      case 413: /* when_then_expr ::= WHEN common_expression THEN common_expression */
X
Xiaoyu Wang 已提交
4928
{ yymsp[-3].minor.yy74 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74)); }
4929
        break;
4930
      case 415: /* case_when_else_opt ::= ELSE common_expression */
X
Xiaoyu Wang 已提交
4931
{ yymsp[-1].minor.yy74 = releaseRawExprNode(pCxt, yymsp[0].minor.yy74); }
4932
        break;
4933 4934
      case 416: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */
      case 421: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==421);
4935
{
X
Xiaoyu Wang 已提交
4936 4937 4938
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74);
                                                                                    yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy20, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74)));
4939
                                                                                  }
X
Xiaoyu Wang 已提交
4940
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4941
        break;
4942
      case 417: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */
4943
{
X
Xiaoyu Wang 已提交
4944 4945 4946
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy74);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74);
                                                                                    yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy74), releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74)));
4947
                                                                                  }
X
Xiaoyu Wang 已提交
4948
  yymsp[-4].minor.yy74 = yylhsminor.yy74;
4949
        break;
4950
      case 418: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */
4951
{
X
Xiaoyu Wang 已提交
4952 4953 4954
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy74);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74);
                                                                                    yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy74), releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74)));
4955
                                                                                  }
X
Xiaoyu Wang 已提交
4956
  yymsp[-5].minor.yy74 = yylhsminor.yy74;
4957
        break;
4958
      case 419: /* predicate ::= expr_or_subquery IS NULL */
4959
{
X
Xiaoyu Wang 已提交
4960 4961
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74);
                                                                                    yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), NULL));
4962
                                                                                  }
X
Xiaoyu Wang 已提交
4963
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
4964
        break;
4965
      case 420: /* predicate ::= expr_or_subquery IS NOT NULL */
4966
{
X
Xiaoyu Wang 已提交
4967 4968
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy74);
                                                                                    yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), NULL));
4969
                                                                                  }
X
Xiaoyu Wang 已提交
4970
  yymsp[-3].minor.yy74 = yylhsminor.yy74;
4971
        break;
4972
      case 422: /* compare_op ::= NK_LT */
4973
{ yymsp[0].minor.yy20 = OP_TYPE_LOWER_THAN; }
4974
        break;
4975
      case 423: /* compare_op ::= NK_GT */
4976
{ yymsp[0].minor.yy20 = OP_TYPE_GREATER_THAN; }
4977
        break;
4978
      case 424: /* compare_op ::= NK_LE */
4979
{ yymsp[0].minor.yy20 = OP_TYPE_LOWER_EQUAL; }
4980
        break;
4981
      case 425: /* compare_op ::= NK_GE */
4982
{ yymsp[0].minor.yy20 = OP_TYPE_GREATER_EQUAL; }
4983
        break;
4984
      case 426: /* compare_op ::= NK_NE */
4985
{ yymsp[0].minor.yy20 = OP_TYPE_NOT_EQUAL; }
4986
        break;
4987
      case 427: /* compare_op ::= NK_EQ */
4988
{ yymsp[0].minor.yy20 = OP_TYPE_EQUAL; }
4989
        break;
4990
      case 428: /* compare_op ::= LIKE */
4991
{ yymsp[0].minor.yy20 = OP_TYPE_LIKE; }
4992
        break;
4993
      case 429: /* compare_op ::= NOT LIKE */
4994
{ yymsp[-1].minor.yy20 = OP_TYPE_NOT_LIKE; }
4995
        break;
4996
      case 430: /* compare_op ::= MATCH */
4997
{ yymsp[0].minor.yy20 = OP_TYPE_MATCH; }
4998
        break;
4999
      case 431: /* compare_op ::= NMATCH */
5000
{ yymsp[0].minor.yy20 = OP_TYPE_NMATCH; }
5001
        break;
5002
      case 432: /* compare_op ::= CONTAINS */
5003
{ yymsp[0].minor.yy20 = OP_TYPE_JSON_CONTAINS; }
5004
        break;
5005
      case 433: /* in_op ::= IN */
5006
{ yymsp[0].minor.yy20 = OP_TYPE_IN; }
5007
        break;
5008
      case 434: /* in_op ::= NOT IN */
5009
{ yymsp[-1].minor.yy20 = OP_TYPE_NOT_IN; }
5010
        break;
5011
      case 435: /* in_predicate_value ::= NK_LP literal_list NK_RP */
X
Xiaoyu Wang 已提交
5012 5013
{ yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy874)); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
5014
        break;
5015
      case 437: /* boolean_value_expression ::= NOT boolean_primary */
5016
{
X
Xiaoyu Wang 已提交
5017 5018
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74);
                                                                                    yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy74), NULL));
5019
                                                                                  }
X
Xiaoyu Wang 已提交
5020
  yymsp[-1].minor.yy74 = yylhsminor.yy74;
5021
        break;
5022
      case 438: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
5023
{
X
Xiaoyu Wang 已提交
5024 5025 5026
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74);
                                                                                    yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74)));
5027
                                                                                  }
X
Xiaoyu Wang 已提交
5028
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
5029
        break;
5030
      case 439: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
5031
{
X
Xiaoyu Wang 已提交
5032 5033 5034
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy74);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy74);
                                                                                    yylhsminor.yy74 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), releaseRawExprNode(pCxt, yymsp[0].minor.yy74)));
5035
                                                                                  }
X
Xiaoyu Wang 已提交
5036
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
5037
        break;
5038 5039
      case 445: /* from_clause_opt ::= FROM table_reference_list */
      case 474: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==474);
X
Xiaoyu Wang 已提交
5040
      case 503: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==503);
X
Xiaoyu Wang 已提交
5041
{ yymsp[-1].minor.yy74 = yymsp[0].minor.yy74; }
5042
        break;
5043
      case 447: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */
X
Xiaoyu Wang 已提交
5044 5045
{ yylhsminor.yy74 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy74, yymsp[0].minor.yy74, NULL); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
5046
        break;
5047
      case 450: /* table_primary ::= table_name alias_opt */
X
Xiaoyu Wang 已提交
5048 5049
{ yylhsminor.yy74 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy317, &yymsp[0].minor.yy317); }
  yymsp[-1].minor.yy74 = yylhsminor.yy74;
5050
        break;
5051
      case 451: /* table_primary ::= db_name NK_DOT table_name alias_opt */
X
Xiaoyu Wang 已提交
5052 5053
{ yylhsminor.yy74 = createRealTableNode(pCxt, &yymsp[-3].minor.yy317, &yymsp[-1].minor.yy317, &yymsp[0].minor.yy317); }
  yymsp[-3].minor.yy74 = yylhsminor.yy74;
5054
        break;
5055
      case 452: /* table_primary ::= subquery alias_opt */
X
Xiaoyu Wang 已提交
5056 5057
{ yylhsminor.yy74 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy74), &yymsp[0].minor.yy317); }
  yymsp[-1].minor.yy74 = yylhsminor.yy74;
5058
        break;
5059
      case 454: /* alias_opt ::= */
X
Xiaoyu Wang 已提交
5060
{ yymsp[1].minor.yy317 = nil_token;  }
5061
        break;
5062
      case 456: /* alias_opt ::= AS table_alias */
X
Xiaoyu Wang 已提交
5063
{ yymsp[-1].minor.yy317 = yymsp[0].minor.yy317; }
5064
        break;
5065 5066
      case 457: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */
      case 458: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==458);
X
Xiaoyu Wang 已提交
5067
{ yymsp[-2].minor.yy74 = yymsp[-1].minor.yy74; }
5068
        break;
5069
      case 459: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
X
Xiaoyu Wang 已提交
5070 5071
{ yylhsminor.yy74 = createJoinTableNode(pCxt, yymsp[-4].minor.yy630, yymsp[-5].minor.yy74, yymsp[-2].minor.yy74, yymsp[0].minor.yy74); }
  yymsp[-5].minor.yy74 = yylhsminor.yy74;
5072
        break;
5073
      case 460: /* join_type ::= */
X
Xiaoyu Wang 已提交
5074
{ yymsp[1].minor.yy630 = JOIN_TYPE_INNER; }
5075
        break;
5076
      case 461: /* join_type ::= INNER */
X
Xiaoyu Wang 已提交
5077
{ yymsp[0].minor.yy630 = JOIN_TYPE_INNER; }
5078
        break;
5079
      case 462: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */
5080
{ 
X
Xiaoyu Wang 已提交
5081 5082 5083 5084 5085 5086 5087 5088 5089
                                                                                    yymsp[-11].minor.yy74 = createSelectStmt(pCxt, yymsp[-10].minor.yy335, yymsp[-9].minor.yy874, yymsp[-8].minor.yy74);
                                                                                    yymsp[-11].minor.yy74 = addWhereClause(pCxt, yymsp[-11].minor.yy74, yymsp[-7].minor.yy74);
                                                                                    yymsp[-11].minor.yy74 = addPartitionByClause(pCxt, yymsp[-11].minor.yy74, yymsp[-6].minor.yy874);
                                                                                    yymsp[-11].minor.yy74 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy74, yymsp[-2].minor.yy74);
                                                                                    yymsp[-11].minor.yy74 = addGroupByClause(pCxt, yymsp[-11].minor.yy74, yymsp[-1].minor.yy874);
                                                                                    yymsp[-11].minor.yy74 = addHavingClause(pCxt, yymsp[-11].minor.yy74, yymsp[0].minor.yy74);
                                                                                    yymsp[-11].minor.yy74 = addRangeClause(pCxt, yymsp[-11].minor.yy74, yymsp[-5].minor.yy74);
                                                                                    yymsp[-11].minor.yy74 = addEveryClause(pCxt, yymsp[-11].minor.yy74, yymsp[-4].minor.yy74);
                                                                                    yymsp[-11].minor.yy74 = addFillClause(pCxt, yymsp[-11].minor.yy74, yymsp[-3].minor.yy74);
5090 5091
                                                                                  }
        break;
5092
      case 465: /* set_quantifier_opt ::= ALL */
X
Xiaoyu Wang 已提交
5093
{ yymsp[0].minor.yy335 = false; }
5094
        break;
5095
      case 468: /* select_item ::= NK_STAR */
X
Xiaoyu Wang 已提交
5096 5097
{ yylhsminor.yy74 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); }
  yymsp[0].minor.yy74 = yylhsminor.yy74;
5098
        break;
5099 5100
      case 470: /* select_item ::= common_expression column_alias */
      case 480: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==480);
X
Xiaoyu Wang 已提交
5101 5102
{ yylhsminor.yy74 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy74), &yymsp[0].minor.yy317); }
  yymsp[-1].minor.yy74 = yylhsminor.yy74;
5103
        break;
5104 5105
      case 471: /* select_item ::= common_expression AS column_alias */
      case 481: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==481);
X
Xiaoyu Wang 已提交
5106 5107
{ yylhsminor.yy74 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), &yymsp[0].minor.yy317); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
5108
        break;
5109
      case 476: /* partition_by_clause_opt ::= PARTITION BY partition_list */
X
Xiaoyu Wang 已提交
5110 5111
      case 499: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==499);
      case 518: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==518);
X
Xiaoyu Wang 已提交
5112
{ yymsp[-2].minor.yy874 = yymsp[0].minor.yy874; }
5113
        break;
5114
      case 483: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
X
Xiaoyu Wang 已提交
5115
{ yymsp[-5].minor.yy74 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), releaseRawExprNode(pCxt, yymsp[-1].minor.yy74)); }
5116
        break;
5117
      case 484: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */
X
Xiaoyu Wang 已提交
5118
{ yymsp[-3].minor.yy74 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy74)); }
5119
        break;
5120
      case 485: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
X
Xiaoyu Wang 已提交
5121
{ yymsp[-5].minor.yy74 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), NULL, yymsp[-1].minor.yy74, yymsp[0].minor.yy74); }
5122
        break;
5123
      case 486: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
X
Xiaoyu Wang 已提交
5124 5125
{ yymsp[-7].minor.yy74 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy74), releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), yymsp[-1].minor.yy74, yymsp[0].minor.yy74); }
        break;
X
Xiaoyu Wang 已提交
5126
      case 487: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */
X
Xiaoyu Wang 已提交
5127
{ yymsp[-6].minor.yy74 = createEventWindowNode(pCxt, yymsp[-3].minor.yy74, yymsp[0].minor.yy74); }
5128
        break;
X
Xiaoyu Wang 已提交
5129
      case 491: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */
X
Xiaoyu Wang 已提交
5130
{ yymsp[-3].minor.yy74 = createFillNode(pCxt, yymsp[-1].minor.yy828, NULL); }
5131
        break;
X
Xiaoyu Wang 已提交
5132
      case 492: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
X
Xiaoyu Wang 已提交
5133
{ yymsp[-5].minor.yy74 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy874)); }
5134
        break;
X
Xiaoyu Wang 已提交
5135
      case 493: /* fill_mode ::= NONE */
X
Xiaoyu Wang 已提交
5136
{ yymsp[0].minor.yy828 = FILL_MODE_NONE; }
5137
        break;
X
Xiaoyu Wang 已提交
5138
      case 494: /* fill_mode ::= PREV */
X
Xiaoyu Wang 已提交
5139
{ yymsp[0].minor.yy828 = FILL_MODE_PREV; }
5140
        break;
X
Xiaoyu Wang 已提交
5141
      case 495: /* fill_mode ::= NULL */
X
Xiaoyu Wang 已提交
5142
{ yymsp[0].minor.yy828 = FILL_MODE_NULL; }
5143
        break;
X
Xiaoyu Wang 已提交
5144
      case 496: /* fill_mode ::= LINEAR */
X
Xiaoyu Wang 已提交
5145
{ yymsp[0].minor.yy828 = FILL_MODE_LINEAR; }
5146
        break;
X
Xiaoyu Wang 已提交
5147
      case 497: /* fill_mode ::= NEXT */
X
Xiaoyu Wang 已提交
5148
{ yymsp[0].minor.yy828 = FILL_MODE_NEXT; }
5149
        break;
X
Xiaoyu Wang 已提交
5150
      case 500: /* group_by_list ::= expr_or_subquery */
X
Xiaoyu Wang 已提交
5151 5152
{ yylhsminor.yy874 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); }
  yymsp[0].minor.yy874 = yylhsminor.yy874;
5153
        break;
X
Xiaoyu Wang 已提交
5154
      case 501: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */
X
Xiaoyu Wang 已提交
5155 5156
{ yylhsminor.yy874 = addNodeToList(pCxt, yymsp[-2].minor.yy874, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy74))); }
  yymsp[-2].minor.yy874 = yylhsminor.yy874;
X
Xiaoyu Wang 已提交
5157
        break;
X
Xiaoyu Wang 已提交
5158
      case 505: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */
X
Xiaoyu Wang 已提交
5159
{ yymsp[-5].minor.yy74 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy74), releaseRawExprNode(pCxt, yymsp[-1].minor.yy74)); }
5160
        break;
X
Xiaoyu Wang 已提交
5161
      case 508: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */
X
Xiaoyu Wang 已提交
5162
{
X
Xiaoyu Wang 已提交
5163 5164 5165
                                                                                    yylhsminor.yy74 = addOrderByClause(pCxt, yymsp[-3].minor.yy74, yymsp[-2].minor.yy874);
                                                                                    yylhsminor.yy74 = addSlimitClause(pCxt, yylhsminor.yy74, yymsp[-1].minor.yy74);
                                                                                    yylhsminor.yy74 = addLimitClause(pCxt, yylhsminor.yy74, yymsp[0].minor.yy74);
5166
                                                                                  }
X
Xiaoyu Wang 已提交
5167
  yymsp[-3].minor.yy74 = yylhsminor.yy74;
5168
        break;
X
Xiaoyu Wang 已提交
5169
      case 511: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */
X
Xiaoyu Wang 已提交
5170 5171
{ yylhsminor.yy74 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy74, yymsp[0].minor.yy74); }
  yymsp[-3].minor.yy74 = yylhsminor.yy74;
X
Xiaoyu Wang 已提交
5172
        break;
X
Xiaoyu Wang 已提交
5173
      case 512: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */
X
Xiaoyu Wang 已提交
5174 5175
{ yylhsminor.yy74 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy74, yymsp[0].minor.yy74); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
X
Xiaoyu Wang 已提交
5176
        break;
X
Xiaoyu Wang 已提交
5177 5178
      case 520: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */
      case 524: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==524);
X
Xiaoyu Wang 已提交
5179
{ yymsp[-1].minor.yy74 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); }
5180
        break;
X
Xiaoyu Wang 已提交
5181 5182
      case 521: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
      case 525: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==525);
X
Xiaoyu Wang 已提交
5183
{ yymsp[-3].minor.yy74 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); }
5184
        break;
X
Xiaoyu Wang 已提交
5185 5186
      case 522: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
      case 526: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==526);
X
Xiaoyu Wang 已提交
5187
{ yymsp[-3].minor.yy74 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); }
5188
        break;
X
Xiaoyu Wang 已提交
5189
      case 527: /* subquery ::= NK_LP query_expression NK_RP */
X
Xiaoyu Wang 已提交
5190 5191
{ yylhsminor.yy74 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy74); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
5192
        break;
X
Xiaoyu Wang 已提交
5193
      case 532: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */
X
Xiaoyu Wang 已提交
5194 5195
{ yylhsminor.yy74 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy74), yymsp[-1].minor.yy326, yymsp[0].minor.yy109); }
  yymsp[-2].minor.yy74 = yylhsminor.yy74;
5196
        break;
X
Xiaoyu Wang 已提交
5197
      case 533: /* ordering_specification_opt ::= */
X
Xiaoyu Wang 已提交
5198
{ yymsp[1].minor.yy326 = ORDER_ASC; }
5199
        break;
X
Xiaoyu Wang 已提交
5200
      case 534: /* ordering_specification_opt ::= ASC */
X
Xiaoyu Wang 已提交
5201
{ yymsp[0].minor.yy326 = ORDER_ASC; }
5202
        break;
X
Xiaoyu Wang 已提交
5203
      case 535: /* ordering_specification_opt ::= DESC */
X
Xiaoyu Wang 已提交
5204
{ yymsp[0].minor.yy326 = ORDER_DESC; }
5205
        break;
X
Xiaoyu Wang 已提交
5206
      case 536: /* null_ordering_opt ::= */
X
Xiaoyu Wang 已提交
5207
{ yymsp[1].minor.yy109 = NULL_ORDER_DEFAULT; }
5208
        break;
X
Xiaoyu Wang 已提交
5209
      case 537: /* null_ordering_opt ::= NULLS FIRST */
X
Xiaoyu Wang 已提交
5210
{ yymsp[-1].minor.yy109 = NULL_ORDER_FIRST; }
5211
        break;
X
Xiaoyu Wang 已提交
5212
      case 538: /* null_ordering_opt ::= NULLS LAST */
X
Xiaoyu Wang 已提交
5213
{ yymsp[-1].minor.yy109 = NULL_ORDER_LAST; }
5214 5215 5216 5217 5218
        break;
      default:
        break;
/********** End reduce actions ************************************************/
  };
X
Xiaoyu Wang 已提交
5219 5220 5221
  assert( yyruleno<sizeof(yyRuleInfo)/sizeof(yyRuleInfo[0]) );
  yygoto = yyRuleInfo[yyruleno].lhs;
  yysize = yyRuleInfo[yyruleno].nrhs;
5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245
  yyact = yy_find_reduce_action(yymsp[yysize].stateno,(YYCODETYPE)yygoto);

  /* There are no SHIFTREDUCE actions on nonterminals because the table
  ** generator has simplified them to pure REDUCE actions. */
  assert( !(yyact>YY_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 */
){
X
Xiaoyu Wang 已提交
5246 5247
  ParseARG_FETCH
  ParseCTX_FETCH
5248 5249 5250 5251 5252 5253 5254 5255 5256 5257
#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 *****************************************/
X
Xiaoyu Wang 已提交
5258 5259
  ParseARG_STORE /* Suppress warning about unused %extra_argument variable */
  ParseCTX_STORE
5260 5261 5262 5263 5264 5265 5266 5267 5268
}
#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 */
X
Xiaoyu Wang 已提交
5269
  ParseTOKENTYPE yyminor         /* The minor type of the error token */
5270
){
X
Xiaoyu Wang 已提交
5271 5272
  ParseARG_FETCH
  ParseCTX_FETCH
5273 5274
#define TOKEN yyminor
/************ Begin %syntax_error code ****************************************/
5275

5276
  if (TSDB_CODE_SUCCESS == pCxt->errCode) {
5277
    if(TOKEN.z) {
5278
      pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR, TOKEN.z);
5279
    } else {
5280
      pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INCOMPLETE_SQL);
5281
    }
5282 5283
  } else if (TSDB_CODE_PAR_DB_NOT_SPECIFIED == pCxt->errCode && TK_NK_FLOAT == TOKEN.type) {
    pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR, TOKEN.z);
5284 5285
  }
/************ End %syntax_error code ******************************************/
X
Xiaoyu Wang 已提交
5286 5287
  ParseARG_STORE /* Suppress warning about unused %extra_argument variable */
  ParseCTX_STORE
5288 5289 5290 5291 5292 5293 5294 5295
}

/*
** The following is executed when the parser accepts
*/
static void yy_accept(
  yyParser *yypParser           /* The parser */
){
X
Xiaoyu Wang 已提交
5296 5297
  ParseARG_FETCH
  ParseCTX_FETCH
5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310
#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 *******************************************/
X
Xiaoyu Wang 已提交
5311 5312
  ParseARG_STORE /* Suppress warning about unused %extra_argument variable */
  ParseCTX_STORE
5313 5314 5315 5316
}

/* The main parser program.
** The first argument is a pointer to a structure obtained from
X
Xiaoyu Wang 已提交
5317
** "ParseAlloc" which describes the current state of the parser.
5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333
** 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:
** <ul>
** <li> A pointer to the parser (an opaque structure.)
** <li> The major token number.
** <li> The minor token number.
** <li> An option argument of a grammar-specified type.
** </ul>
**
** Outputs:
** None.
*/
X
Xiaoyu Wang 已提交
5334
void Parse(
5335 5336
  void *yyp,                   /* The parser */
  int yymajor,                 /* The major token code number */
X
Xiaoyu Wang 已提交
5337 5338
  ParseTOKENTYPE yyminor       /* The value for the token */
  ParseARG_PDECL               /* Optional %extra_argument parameter */
5339 5340 5341 5342 5343 5344 5345 5346 5347 5348
){
  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 */
X
Xiaoyu Wang 已提交
5349 5350
  ParseCTX_FETCH
  ParseARG_STORE
5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369

  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

X
Xiaoyu Wang 已提交
5370
  do{
5371 5372 5373
    assert( yyact==yypParser->yytos->stateno );
    yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact);
    if( yyact >= YY_MIN_REDUCE ){
X
Xiaoyu Wang 已提交
5374 5375
      yyact = yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor,
                        yyminor ParseCTX_PARAM);
5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430
    }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{
X
Xiaoyu Wang 已提交
5431 5432 5433 5434 5435
        while( yypParser->yytos >= yypParser->yystack
            && (yyact = yy_find_reduce_action(
                        yypParser->yytos->stateno,
                        YYERRORSYMBOL)) > YY_MAX_SHIFTREDUCE
        ){
5436 5437
          yy_pop_parser_stack(yypParser);
        }
X
Xiaoyu Wang 已提交
5438
        if( yypParser->yytos < yypParser->yystack || yymajor==0 ){
5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487
          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
    }
X
Xiaoyu Wang 已提交
5488
  }while( yypParser->yytos>yypParser->yystack );
5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507
#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.
*/
X
Xiaoyu Wang 已提交
5508
int ParseFallback(int iToken){
5509
#ifdef YYFALLBACK
X
Xiaoyu Wang 已提交
5510 5511 5512
  if( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) ){
    return yyFallback[iToken];
  }
5513 5514
#else
  (void)iToken;
D
dapan1121 已提交
5515
#endif
X
Xiaoyu Wang 已提交
5516
  return 0;
5517
}