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

#ifndef NDEBUG
/* For tracing reduce actions, the names of all rules are required.
*/
static const char *const yyRuleName[] = {
1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980
 /*   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 已提交
1981
 /*  24 */ "cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt",
1982
 /*  25 */ "cmd ::= ALTER USER user_name PASS NK_STRING",
X
Xiaoyu Wang 已提交
1983 1984 1985 1986 1987
 /*  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",
X
Xiaoyu Wang 已提交
1988 1989
 /*  31 */ "cmd ::= GRANT privileges ON priv_level with_opt TO user_name",
 /*  32 */ "cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name",
X
Xiaoyu Wang 已提交
1990 1991
 /*  33 */ "privileges ::= ALL",
 /*  34 */ "privileges ::= priv_type_list",
1992 1993 1994 1995 1996 1997 1998
 /*  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",
X
Xiaoyu Wang 已提交
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
 /*  42 */ "priv_level ::= db_name NK_DOT table_name",
 /*  43 */ "priv_level ::= topic_name",
 /*  44 */ "with_opt ::=",
 /*  45 */ "with_opt ::= WITH search_condition",
 /*  46 */ "cmd ::= CREATE DNODE dnode_endpoint",
 /*  47 */ "cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER",
 /*  48 */ "cmd ::= DROP DNODE NK_INTEGER force_opt",
 /*  49 */ "cmd ::= DROP DNODE dnode_endpoint force_opt",
 /*  50 */ "cmd ::= ALTER DNODE NK_INTEGER NK_STRING",
 /*  51 */ "cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING",
 /*  52 */ "cmd ::= ALTER ALL DNODES NK_STRING",
 /*  53 */ "cmd ::= ALTER ALL DNODES NK_STRING NK_STRING",
 /*  54 */ "dnode_endpoint ::= NK_STRING",
 /*  55 */ "dnode_endpoint ::= NK_ID",
 /*  56 */ "dnode_endpoint ::= NK_IPTOKEN",
 /*  57 */ "force_opt ::=",
 /*  58 */ "force_opt ::= FORCE",
 /*  59 */ "cmd ::= ALTER LOCAL NK_STRING",
 /*  60 */ "cmd ::= ALTER LOCAL NK_STRING NK_STRING",
 /*  61 */ "cmd ::= CREATE QNODE ON DNODE NK_INTEGER",
 /*  62 */ "cmd ::= DROP QNODE ON DNODE NK_INTEGER",
 /*  63 */ "cmd ::= CREATE BNODE ON DNODE NK_INTEGER",
 /*  64 */ "cmd ::= DROP BNODE ON DNODE NK_INTEGER",
 /*  65 */ "cmd ::= CREATE SNODE ON DNODE NK_INTEGER",
 /*  66 */ "cmd ::= DROP SNODE ON DNODE NK_INTEGER",
 /*  67 */ "cmd ::= CREATE MNODE ON DNODE NK_INTEGER",
 /*  68 */ "cmd ::= DROP MNODE ON DNODE NK_INTEGER",
 /*  69 */ "cmd ::= CREATE DATABASE not_exists_opt db_name db_options",
 /*  70 */ "cmd ::= DROP DATABASE exists_opt db_name",
 /*  71 */ "cmd ::= USE db_name",
 /*  72 */ "cmd ::= ALTER DATABASE db_name alter_db_options",
 /*  73 */ "cmd ::= FLUSH DATABASE db_name",
 /*  74 */ "cmd ::= TRIM DATABASE db_name speed_opt",
 /*  75 */ "cmd ::= COMPACT DATABASE db_name start_opt end_opt",
 /*  76 */ "not_exists_opt ::= IF NOT EXISTS",
 /*  77 */ "not_exists_opt ::=",
 /*  78 */ "exists_opt ::= IF EXISTS",
 /*  79 */ "exists_opt ::=",
 /*  80 */ "db_options ::=",
 /*  81 */ "db_options ::= db_options BUFFER NK_INTEGER",
 /*  82 */ "db_options ::= db_options CACHEMODEL NK_STRING",
 /*  83 */ "db_options ::= db_options CACHESIZE NK_INTEGER",
 /*  84 */ "db_options ::= db_options COMP NK_INTEGER",
 /*  85 */ "db_options ::= db_options DURATION NK_INTEGER",
 /*  86 */ "db_options ::= db_options DURATION NK_VARIABLE",
 /*  87 */ "db_options ::= db_options MAXROWS NK_INTEGER",
 /*  88 */ "db_options ::= db_options MINROWS NK_INTEGER",
 /*  89 */ "db_options ::= db_options KEEP integer_list",
 /*  90 */ "db_options ::= db_options KEEP variable_list",
 /*  91 */ "db_options ::= db_options PAGES NK_INTEGER",
 /*  92 */ "db_options ::= db_options PAGESIZE NK_INTEGER",
 /*  93 */ "db_options ::= db_options TSDB_PAGESIZE NK_INTEGER",
 /*  94 */ "db_options ::= db_options PRECISION NK_STRING",
 /*  95 */ "db_options ::= db_options REPLICA NK_INTEGER",
 /*  96 */ "db_options ::= db_options VGROUPS NK_INTEGER",
 /*  97 */ "db_options ::= db_options SINGLE_STABLE NK_INTEGER",
 /*  98 */ "db_options ::= db_options RETENTIONS retention_list",
 /*  99 */ "db_options ::= db_options SCHEMALESS NK_INTEGER",
 /* 100 */ "db_options ::= db_options WAL_LEVEL NK_INTEGER",
 /* 101 */ "db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER",
 /* 102 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER",
 /* 103 */ "db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER",
 /* 104 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER",
 /* 105 */ "db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER",
 /* 106 */ "db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER",
 /* 107 */ "db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER",
 /* 108 */ "db_options ::= db_options STT_TRIGGER NK_INTEGER",
2066 2067
 /* 109 */ "db_options ::= db_options TABLE_PREFIX signed",
 /* 110 */ "db_options ::= db_options TABLE_SUFFIX signed",
X
Xiaoyu Wang 已提交
2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080
 /* 111 */ "alter_db_options ::= alter_db_option",
 /* 112 */ "alter_db_options ::= alter_db_options alter_db_option",
 /* 113 */ "alter_db_option ::= BUFFER NK_INTEGER",
 /* 114 */ "alter_db_option ::= CACHEMODEL NK_STRING",
 /* 115 */ "alter_db_option ::= CACHESIZE NK_INTEGER",
 /* 116 */ "alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER",
 /* 117 */ "alter_db_option ::= KEEP integer_list",
 /* 118 */ "alter_db_option ::= KEEP variable_list",
 /* 119 */ "alter_db_option ::= PAGES NK_INTEGER",
 /* 120 */ "alter_db_option ::= REPLICA NK_INTEGER",
 /* 121 */ "alter_db_option ::= WAL_LEVEL NK_INTEGER",
 /* 122 */ "alter_db_option ::= STT_TRIGGER NK_INTEGER",
 /* 123 */ "alter_db_option ::= MINROWS NK_INTEGER",
X
Xiaoyu Wang 已提交
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
 /* 124 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER",
 /* 125 */ "alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER",
 /* 126 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER",
 /* 127 */ "alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER",
 /* 128 */ "integer_list ::= NK_INTEGER",
 /* 129 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER",
 /* 130 */ "variable_list ::= NK_VARIABLE",
 /* 131 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE",
 /* 132 */ "retention_list ::= retention",
 /* 133 */ "retention_list ::= retention_list NK_COMMA retention",
 /* 134 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE",
 /* 135 */ "speed_opt ::=",
 /* 136 */ "speed_opt ::= MAX_SPEED NK_INTEGER",
 /* 137 */ "start_opt ::=",
 /* 138 */ "start_opt ::= START WITH NK_INTEGER",
 /* 139 */ "start_opt ::= START WITH NK_STRING",
 /* 140 */ "start_opt ::= START WITH TIMESTAMP NK_STRING",
 /* 141 */ "end_opt ::=",
 /* 142 */ "end_opt ::= END WITH NK_INTEGER",
 /* 143 */ "end_opt ::= END WITH NK_STRING",
 /* 144 */ "end_opt ::= END WITH TIMESTAMP NK_STRING",
 /* 145 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options",
 /* 146 */ "cmd ::= CREATE TABLE multi_create_clause",
 /* 147 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options",
 /* 148 */ "cmd ::= DROP TABLE multi_drop_clause",
 /* 149 */ "cmd ::= DROP STABLE exists_opt full_table_name",
 /* 150 */ "cmd ::= ALTER TABLE alter_table_clause",
 /* 151 */ "cmd ::= ALTER STABLE alter_table_clause",
 /* 152 */ "alter_table_clause ::= full_table_name alter_table_options",
 /* 153 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name",
 /* 154 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name",
 /* 155 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name",
 /* 156 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name",
 /* 157 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name",
 /* 158 */ "alter_table_clause ::= full_table_name DROP TAG column_name",
 /* 159 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name",
 /* 160 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name",
 /* 161 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal",
 /* 162 */ "multi_create_clause ::= create_subtable_clause",
 /* 163 */ "multi_create_clause ::= multi_create_clause create_subtable_clause",
 /* 164 */ "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",
 /* 165 */ "multi_drop_clause ::= drop_table_clause",
 /* 166 */ "multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause",
 /* 167 */ "drop_table_clause ::= exists_opt full_table_name",
 /* 168 */ "specific_cols_opt ::=",
 /* 169 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP",
 /* 170 */ "full_table_name ::= table_name",
 /* 171 */ "full_table_name ::= db_name NK_DOT table_name",
 /* 172 */ "column_def_list ::= column_def",
 /* 173 */ "column_def_list ::= column_def_list NK_COMMA column_def",
 /* 174 */ "column_def ::= column_name type_name",
 /* 175 */ "type_name ::= BOOL",
 /* 176 */ "type_name ::= TINYINT",
 /* 177 */ "type_name ::= SMALLINT",
 /* 178 */ "type_name ::= INT",
 /* 179 */ "type_name ::= INTEGER",
 /* 180 */ "type_name ::= BIGINT",
 /* 181 */ "type_name ::= FLOAT",
 /* 182 */ "type_name ::= DOUBLE",
 /* 183 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP",
 /* 184 */ "type_name ::= TIMESTAMP",
 /* 185 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP",
 /* 186 */ "type_name ::= TINYINT UNSIGNED",
 /* 187 */ "type_name ::= SMALLINT UNSIGNED",
 /* 188 */ "type_name ::= INT UNSIGNED",
 /* 189 */ "type_name ::= BIGINT UNSIGNED",
 /* 190 */ "type_name ::= JSON",
 /* 191 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP",
 /* 192 */ "type_name ::= MEDIUMBLOB",
 /* 193 */ "type_name ::= BLOB",
 /* 194 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP",
 /* 195 */ "type_name ::= DECIMAL",
 /* 196 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP",
 /* 197 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP",
 /* 198 */ "tags_def_opt ::=",
 /* 199 */ "tags_def_opt ::= tags_def",
 /* 200 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP",
 /* 201 */ "table_options ::=",
 /* 202 */ "table_options ::= table_options COMMENT NK_STRING",
 /* 203 */ "table_options ::= table_options MAX_DELAY duration_list",
 /* 204 */ "table_options ::= table_options WATERMARK duration_list",
 /* 205 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP",
 /* 206 */ "table_options ::= table_options TTL NK_INTEGER",
 /* 207 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP",
 /* 208 */ "table_options ::= table_options DELETE_MARK duration_list",
 /* 209 */ "alter_table_options ::= alter_table_option",
 /* 210 */ "alter_table_options ::= alter_table_options alter_table_option",
 /* 211 */ "alter_table_option ::= COMMENT NK_STRING",
 /* 212 */ "alter_table_option ::= TTL NK_INTEGER",
 /* 213 */ "duration_list ::= duration_literal",
 /* 214 */ "duration_list ::= duration_list NK_COMMA duration_literal",
 /* 215 */ "rollup_func_list ::= rollup_func_name",
 /* 216 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name",
 /* 217 */ "rollup_func_name ::= function_name",
 /* 218 */ "rollup_func_name ::= FIRST",
 /* 219 */ "rollup_func_name ::= LAST",
 /* 220 */ "col_name_list ::= col_name",
 /* 221 */ "col_name_list ::= col_name_list NK_COMMA col_name",
 /* 222 */ "col_name ::= column_name",
 /* 223 */ "cmd ::= SHOW DNODES",
 /* 224 */ "cmd ::= SHOW USERS",
 /* 225 */ "cmd ::= SHOW USER PRIVILEGES",
 /* 226 */ "cmd ::= SHOW DATABASES",
 /* 227 */ "cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt",
 /* 228 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt",
 /* 229 */ "cmd ::= SHOW db_name_cond_opt VGROUPS",
 /* 230 */ "cmd ::= SHOW MNODES",
 /* 231 */ "cmd ::= SHOW QNODES",
 /* 232 */ "cmd ::= SHOW FUNCTIONS",
 /* 233 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt",
 /* 234 */ "cmd ::= SHOW STREAMS",
 /* 235 */ "cmd ::= SHOW ACCOUNTS",
 /* 236 */ "cmd ::= SHOW APPS",
 /* 237 */ "cmd ::= SHOW CONNECTIONS",
 /* 238 */ "cmd ::= SHOW LICENCES",
 /* 239 */ "cmd ::= SHOW GRANTS",
 /* 240 */ "cmd ::= SHOW CREATE DATABASE db_name",
 /* 241 */ "cmd ::= SHOW CREATE TABLE full_table_name",
 /* 242 */ "cmd ::= SHOW CREATE STABLE full_table_name",
 /* 243 */ "cmd ::= SHOW QUERIES",
 /* 244 */ "cmd ::= SHOW SCORES",
 /* 245 */ "cmd ::= SHOW TOPICS",
 /* 246 */ "cmd ::= SHOW VARIABLES",
 /* 247 */ "cmd ::= SHOW CLUSTER VARIABLES",
 /* 248 */ "cmd ::= SHOW LOCAL VARIABLES",
 /* 249 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt",
 /* 250 */ "cmd ::= SHOW BNODES",
 /* 251 */ "cmd ::= SHOW SNODES",
 /* 252 */ "cmd ::= SHOW CLUSTER",
 /* 253 */ "cmd ::= SHOW TRANSACTIONS",
 /* 254 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name",
 /* 255 */ "cmd ::= SHOW CONSUMERS",
 /* 256 */ "cmd ::= SHOW SUBSCRIPTIONS",
 /* 257 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt",
 /* 258 */ "cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt",
 /* 259 */ "cmd ::= SHOW VNODES NK_INTEGER",
 /* 260 */ "cmd ::= SHOW VNODES NK_STRING",
 /* 261 */ "cmd ::= SHOW db_name_cond_opt ALIVE",
 /* 262 */ "cmd ::= SHOW CLUSTER ALIVE",
 /* 263 */ "db_name_cond_opt ::=",
 /* 264 */ "db_name_cond_opt ::= db_name NK_DOT",
 /* 265 */ "like_pattern_opt ::=",
 /* 266 */ "like_pattern_opt ::= LIKE NK_STRING",
 /* 267 */ "table_name_cond ::= table_name",
 /* 268 */ "from_db_opt ::=",
 /* 269 */ "from_db_opt ::= FROM db_name",
 /* 270 */ "tag_list_opt ::=",
 /* 271 */ "tag_list_opt ::= tag_item",
 /* 272 */ "tag_list_opt ::= tag_list_opt NK_COMMA tag_item",
 /* 273 */ "tag_item ::= TBNAME",
 /* 274 */ "tag_item ::= QTAGS",
 /* 275 */ "tag_item ::= column_name",
 /* 276 */ "tag_item ::= column_name column_alias",
 /* 277 */ "tag_item ::= column_name AS column_alias",
 /* 278 */ "cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options",
 /* 279 */ "cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP",
 /* 280 */ "cmd ::= DROP INDEX exists_opt full_index_name",
 /* 281 */ "full_index_name ::= index_name",
 /* 282 */ "full_index_name ::= db_name NK_DOT index_name",
 /* 283 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt",
 /* 284 */ "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",
 /* 285 */ "func_list ::= func",
 /* 286 */ "func_list ::= func_list NK_COMMA func",
 /* 287 */ "func ::= sma_func_name NK_LP expression_list NK_RP",
 /* 288 */ "sma_func_name ::= function_name",
 /* 289 */ "sma_func_name ::= COUNT",
 /* 290 */ "sma_func_name ::= FIRST",
 /* 291 */ "sma_func_name ::= LAST",
 /* 292 */ "sma_func_name ::= LAST_ROW",
 /* 293 */ "sma_stream_opt ::=",
 /* 294 */ "sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal",
 /* 295 */ "sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal",
 /* 296 */ "sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal",
 /* 297 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery",
 /* 298 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name",
 /* 299 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name",
2257 2258
 /* 300 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name where_clause_opt",
 /* 301 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name where_clause_opt",
X
Xiaoyu Wang 已提交
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 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 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539
 /* 302 */ "cmd ::= DROP TOPIC exists_opt topic_name",
 /* 303 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name",
 /* 304 */ "cmd ::= DESC full_table_name",
 /* 305 */ "cmd ::= DESCRIBE full_table_name",
 /* 306 */ "cmd ::= RESET QUERY CACHE",
 /* 307 */ "cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery",
 /* 308 */ "cmd ::= EXPLAIN analyze_opt explain_options insert_query",
 /* 309 */ "analyze_opt ::=",
 /* 310 */ "analyze_opt ::= ANALYZE",
 /* 311 */ "explain_options ::=",
 /* 312 */ "explain_options ::= explain_options VERBOSE NK_BOOL",
 /* 313 */ "explain_options ::= explain_options RATIO NK_FLOAT",
 /* 314 */ "cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt",
 /* 315 */ "cmd ::= DROP FUNCTION exists_opt function_name",
 /* 316 */ "agg_func_opt ::=",
 /* 317 */ "agg_func_opt ::= AGGREGATE",
 /* 318 */ "bufsize_opt ::=",
 /* 319 */ "bufsize_opt ::= BUFSIZE NK_INTEGER",
 /* 320 */ "language_opt ::=",
 /* 321 */ "language_opt ::= LANGUAGE NK_STRING",
 /* 322 */ "or_replace_opt ::=",
 /* 323 */ "or_replace_opt ::= OR REPLACE",
 /* 324 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery",
 /* 325 */ "cmd ::= DROP STREAM exists_opt stream_name",
 /* 326 */ "col_list_opt ::=",
 /* 327 */ "col_list_opt ::= NK_LP col_name_list NK_RP",
 /* 328 */ "tag_def_or_ref_opt ::=",
 /* 329 */ "tag_def_or_ref_opt ::= tags_def",
 /* 330 */ "tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP",
 /* 331 */ "stream_options ::=",
 /* 332 */ "stream_options ::= stream_options TRIGGER AT_ONCE",
 /* 333 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE",
 /* 334 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal",
 /* 335 */ "stream_options ::= stream_options WATERMARK duration_literal",
 /* 336 */ "stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER",
 /* 337 */ "stream_options ::= stream_options FILL_HISTORY NK_INTEGER",
 /* 338 */ "stream_options ::= stream_options DELETE_MARK duration_literal",
 /* 339 */ "stream_options ::= stream_options IGNORE UPDATE NK_INTEGER",
 /* 340 */ "subtable_opt ::=",
 /* 341 */ "subtable_opt ::= SUBTABLE NK_LP expression NK_RP",
 /* 342 */ "cmd ::= KILL CONNECTION NK_INTEGER",
 /* 343 */ "cmd ::= KILL QUERY NK_STRING",
 /* 344 */ "cmd ::= KILL TRANSACTION NK_INTEGER",
 /* 345 */ "cmd ::= BALANCE VGROUP",
 /* 346 */ "cmd ::= BALANCE VGROUP LEADER",
 /* 347 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER",
 /* 348 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list",
 /* 349 */ "cmd ::= SPLIT VGROUP NK_INTEGER",
 /* 350 */ "dnode_list ::= DNODE NK_INTEGER",
 /* 351 */ "dnode_list ::= dnode_list DNODE NK_INTEGER",
 /* 352 */ "cmd ::= DELETE FROM full_table_name where_clause_opt",
 /* 353 */ "cmd ::= query_or_subquery",
 /* 354 */ "cmd ::= insert_query",
 /* 355 */ "insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery",
 /* 356 */ "insert_query ::= INSERT INTO full_table_name query_or_subquery",
 /* 357 */ "literal ::= NK_INTEGER",
 /* 358 */ "literal ::= NK_FLOAT",
 /* 359 */ "literal ::= NK_STRING",
 /* 360 */ "literal ::= NK_BOOL",
 /* 361 */ "literal ::= TIMESTAMP NK_STRING",
 /* 362 */ "literal ::= duration_literal",
 /* 363 */ "literal ::= NULL",
 /* 364 */ "literal ::= NK_QUESTION",
 /* 365 */ "duration_literal ::= NK_VARIABLE",
 /* 366 */ "signed ::= NK_INTEGER",
 /* 367 */ "signed ::= NK_PLUS NK_INTEGER",
 /* 368 */ "signed ::= NK_MINUS NK_INTEGER",
 /* 369 */ "signed ::= NK_FLOAT",
 /* 370 */ "signed ::= NK_PLUS NK_FLOAT",
 /* 371 */ "signed ::= NK_MINUS NK_FLOAT",
 /* 372 */ "signed_literal ::= signed",
 /* 373 */ "signed_literal ::= NK_STRING",
 /* 374 */ "signed_literal ::= NK_BOOL",
 /* 375 */ "signed_literal ::= TIMESTAMP NK_STRING",
 /* 376 */ "signed_literal ::= duration_literal",
 /* 377 */ "signed_literal ::= NULL",
 /* 378 */ "signed_literal ::= literal_func",
 /* 379 */ "signed_literal ::= NK_QUESTION",
 /* 380 */ "literal_list ::= signed_literal",
 /* 381 */ "literal_list ::= literal_list NK_COMMA signed_literal",
 /* 382 */ "db_name ::= NK_ID",
 /* 383 */ "table_name ::= NK_ID",
 /* 384 */ "column_name ::= NK_ID",
 /* 385 */ "function_name ::= NK_ID",
 /* 386 */ "table_alias ::= NK_ID",
 /* 387 */ "column_alias ::= NK_ID",
 /* 388 */ "user_name ::= NK_ID",
 /* 389 */ "topic_name ::= NK_ID",
 /* 390 */ "stream_name ::= NK_ID",
 /* 391 */ "cgroup_name ::= NK_ID",
 /* 392 */ "index_name ::= NK_ID",
 /* 393 */ "expr_or_subquery ::= expression",
 /* 394 */ "expression ::= literal",
 /* 395 */ "expression ::= pseudo_column",
 /* 396 */ "expression ::= column_reference",
 /* 397 */ "expression ::= function_expression",
 /* 398 */ "expression ::= case_when_expression",
 /* 399 */ "expression ::= NK_LP expression NK_RP",
 /* 400 */ "expression ::= NK_PLUS expr_or_subquery",
 /* 401 */ "expression ::= NK_MINUS expr_or_subquery",
 /* 402 */ "expression ::= expr_or_subquery NK_PLUS expr_or_subquery",
 /* 403 */ "expression ::= expr_or_subquery NK_MINUS expr_or_subquery",
 /* 404 */ "expression ::= expr_or_subquery NK_STAR expr_or_subquery",
 /* 405 */ "expression ::= expr_or_subquery NK_SLASH expr_or_subquery",
 /* 406 */ "expression ::= expr_or_subquery NK_REM expr_or_subquery",
 /* 407 */ "expression ::= column_reference NK_ARROW NK_STRING",
 /* 408 */ "expression ::= expr_or_subquery NK_BITAND expr_or_subquery",
 /* 409 */ "expression ::= expr_or_subquery NK_BITOR expr_or_subquery",
 /* 410 */ "expression_list ::= expr_or_subquery",
 /* 411 */ "expression_list ::= expression_list NK_COMMA expr_or_subquery",
 /* 412 */ "column_reference ::= column_name",
 /* 413 */ "column_reference ::= table_name NK_DOT column_name",
 /* 414 */ "pseudo_column ::= ROWTS",
 /* 415 */ "pseudo_column ::= TBNAME",
 /* 416 */ "pseudo_column ::= table_name NK_DOT TBNAME",
 /* 417 */ "pseudo_column ::= QSTART",
 /* 418 */ "pseudo_column ::= QEND",
 /* 419 */ "pseudo_column ::= QDURATION",
 /* 420 */ "pseudo_column ::= WSTART",
 /* 421 */ "pseudo_column ::= WEND",
 /* 422 */ "pseudo_column ::= WDURATION",
 /* 423 */ "pseudo_column ::= IROWTS",
 /* 424 */ "pseudo_column ::= ISFILLED",
 /* 425 */ "pseudo_column ::= QTAGS",
 /* 426 */ "function_expression ::= function_name NK_LP expression_list NK_RP",
 /* 427 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP",
 /* 428 */ "function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP",
 /* 429 */ "function_expression ::= literal_func",
 /* 430 */ "literal_func ::= noarg_func NK_LP NK_RP",
 /* 431 */ "literal_func ::= NOW",
 /* 432 */ "noarg_func ::= NOW",
 /* 433 */ "noarg_func ::= TODAY",
 /* 434 */ "noarg_func ::= TIMEZONE",
 /* 435 */ "noarg_func ::= DATABASE",
 /* 436 */ "noarg_func ::= CLIENT_VERSION",
 /* 437 */ "noarg_func ::= SERVER_VERSION",
 /* 438 */ "noarg_func ::= SERVER_STATUS",
 /* 439 */ "noarg_func ::= CURRENT_USER",
 /* 440 */ "noarg_func ::= USER",
 /* 441 */ "star_func ::= COUNT",
 /* 442 */ "star_func ::= FIRST",
 /* 443 */ "star_func ::= LAST",
 /* 444 */ "star_func ::= LAST_ROW",
 /* 445 */ "star_func_para_list ::= NK_STAR",
 /* 446 */ "star_func_para_list ::= other_para_list",
 /* 447 */ "other_para_list ::= star_func_para",
 /* 448 */ "other_para_list ::= other_para_list NK_COMMA star_func_para",
 /* 449 */ "star_func_para ::= expr_or_subquery",
 /* 450 */ "star_func_para ::= table_name NK_DOT NK_STAR",
 /* 451 */ "case_when_expression ::= CASE when_then_list case_when_else_opt END",
 /* 452 */ "case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END",
 /* 453 */ "when_then_list ::= when_then_expr",
 /* 454 */ "when_then_list ::= when_then_list when_then_expr",
 /* 455 */ "when_then_expr ::= WHEN common_expression THEN common_expression",
 /* 456 */ "case_when_else_opt ::=",
 /* 457 */ "case_when_else_opt ::= ELSE common_expression",
 /* 458 */ "predicate ::= expr_or_subquery compare_op expr_or_subquery",
 /* 459 */ "predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery",
 /* 460 */ "predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery",
 /* 461 */ "predicate ::= expr_or_subquery IS NULL",
 /* 462 */ "predicate ::= expr_or_subquery IS NOT NULL",
 /* 463 */ "predicate ::= expr_or_subquery in_op in_predicate_value",
 /* 464 */ "compare_op ::= NK_LT",
 /* 465 */ "compare_op ::= NK_GT",
 /* 466 */ "compare_op ::= NK_LE",
 /* 467 */ "compare_op ::= NK_GE",
 /* 468 */ "compare_op ::= NK_NE",
 /* 469 */ "compare_op ::= NK_EQ",
 /* 470 */ "compare_op ::= LIKE",
 /* 471 */ "compare_op ::= NOT LIKE",
 /* 472 */ "compare_op ::= MATCH",
 /* 473 */ "compare_op ::= NMATCH",
 /* 474 */ "compare_op ::= CONTAINS",
 /* 475 */ "in_op ::= IN",
 /* 476 */ "in_op ::= NOT IN",
 /* 477 */ "in_predicate_value ::= NK_LP literal_list NK_RP",
 /* 478 */ "boolean_value_expression ::= boolean_primary",
 /* 479 */ "boolean_value_expression ::= NOT boolean_primary",
 /* 480 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression",
 /* 481 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression",
 /* 482 */ "boolean_primary ::= predicate",
 /* 483 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP",
 /* 484 */ "common_expression ::= expr_or_subquery",
 /* 485 */ "common_expression ::= boolean_value_expression",
 /* 486 */ "from_clause_opt ::=",
 /* 487 */ "from_clause_opt ::= FROM table_reference_list",
 /* 488 */ "table_reference_list ::= table_reference",
 /* 489 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference",
 /* 490 */ "table_reference ::= table_primary",
 /* 491 */ "table_reference ::= joined_table",
 /* 492 */ "table_primary ::= table_name alias_opt",
 /* 493 */ "table_primary ::= db_name NK_DOT table_name alias_opt",
 /* 494 */ "table_primary ::= subquery alias_opt",
 /* 495 */ "table_primary ::= parenthesized_joined_table",
 /* 496 */ "alias_opt ::=",
 /* 497 */ "alias_opt ::= table_alias",
 /* 498 */ "alias_opt ::= AS table_alias",
 /* 499 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP",
 /* 500 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP",
 /* 501 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition",
 /* 502 */ "join_type ::=",
 /* 503 */ "join_type ::= INNER",
 /* 504 */ "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",
 /* 505 */ "set_quantifier_opt ::=",
 /* 506 */ "set_quantifier_opt ::= DISTINCT",
 /* 507 */ "set_quantifier_opt ::= ALL",
 /* 508 */ "select_list ::= select_item",
 /* 509 */ "select_list ::= select_list NK_COMMA select_item",
 /* 510 */ "select_item ::= NK_STAR",
 /* 511 */ "select_item ::= common_expression",
 /* 512 */ "select_item ::= common_expression column_alias",
 /* 513 */ "select_item ::= common_expression AS column_alias",
 /* 514 */ "select_item ::= table_name NK_DOT NK_STAR",
 /* 515 */ "where_clause_opt ::=",
 /* 516 */ "where_clause_opt ::= WHERE search_condition",
 /* 517 */ "partition_by_clause_opt ::=",
 /* 518 */ "partition_by_clause_opt ::= PARTITION BY partition_list",
 /* 519 */ "partition_list ::= partition_item",
 /* 520 */ "partition_list ::= partition_list NK_COMMA partition_item",
 /* 521 */ "partition_item ::= expr_or_subquery",
 /* 522 */ "partition_item ::= expr_or_subquery column_alias",
 /* 523 */ "partition_item ::= expr_or_subquery AS column_alias",
 /* 524 */ "twindow_clause_opt ::=",
 /* 525 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP",
 /* 526 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP",
 /* 527 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt",
 /* 528 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt",
 /* 529 */ "twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition",
 /* 530 */ "sliding_opt ::=",
 /* 531 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP",
 /* 532 */ "fill_opt ::=",
 /* 533 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP",
 /* 534 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP",
 /* 535 */ "fill_opt ::= FILL NK_LP VALUE_F NK_COMMA literal_list NK_RP",
 /* 536 */ "fill_mode ::= NONE",
 /* 537 */ "fill_mode ::= PREV",
 /* 538 */ "fill_mode ::= NULL",
 /* 539 */ "fill_mode ::= NULL_F",
 /* 540 */ "fill_mode ::= LINEAR",
 /* 541 */ "fill_mode ::= NEXT",
 /* 542 */ "group_by_clause_opt ::=",
 /* 543 */ "group_by_clause_opt ::= GROUP BY group_by_list",
 /* 544 */ "group_by_list ::= expr_or_subquery",
 /* 545 */ "group_by_list ::= group_by_list NK_COMMA expr_or_subquery",
 /* 546 */ "having_clause_opt ::=",
 /* 547 */ "having_clause_opt ::= HAVING search_condition",
 /* 548 */ "range_opt ::=",
 /* 549 */ "range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP",
 /* 550 */ "every_opt ::=",
 /* 551 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP",
 /* 552 */ "query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt",
 /* 553 */ "query_simple ::= query_specification",
 /* 554 */ "query_simple ::= union_query_expression",
 /* 555 */ "union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery",
 /* 556 */ "union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery",
 /* 557 */ "query_simple_or_subquery ::= query_simple",
 /* 558 */ "query_simple_or_subquery ::= subquery",
 /* 559 */ "query_or_subquery ::= query_expression",
 /* 560 */ "query_or_subquery ::= subquery",
 /* 561 */ "order_by_clause_opt ::=",
 /* 562 */ "order_by_clause_opt ::= ORDER BY sort_specification_list",
 /* 563 */ "slimit_clause_opt ::=",
 /* 564 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER",
 /* 565 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER",
 /* 566 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER",
 /* 567 */ "limit_clause_opt ::=",
 /* 568 */ "limit_clause_opt ::= LIMIT NK_INTEGER",
 /* 569 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER",
 /* 570 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER",
 /* 571 */ "subquery ::= NK_LP query_expression NK_RP",
 /* 572 */ "subquery ::= NK_LP subquery NK_RP",
 /* 573 */ "search_condition ::= common_expression",
 /* 574 */ "sort_specification_list ::= sort_specification",
 /* 575 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification",
 /* 576 */ "sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt",
 /* 577 */ "ordering_specification_opt ::=",
 /* 578 */ "ordering_specification_opt ::= ASC",
 /* 579 */ "ordering_specification_opt ::= DESC",
 /* 580 */ "null_ordering_opt ::=",
 /* 581 */ "null_ordering_opt ::= NULLS FIRST",
 /* 582 */ "null_ordering_opt ::= NULLS LAST",
2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556
};
#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 已提交
2557
    pNew = malloc(newSize*sizeof(pNew[0]));
2558 2559
    if( pNew ) pNew[0] = p->yystk0;
  }else{
X
Xiaoyu Wang 已提交
2560
    pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577
  }
  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 已提交
2578
** second argument to ParseAlloc() below.  This can be changed by
2579 2580 2581 2582 2583 2584 2585 2586 2587
** 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 已提交
2588
void ParseInit(void *yypRawParser ParseCTX_PDECL){
2589
  yyParser *yypParser = (yyParser*)yypRawParser;
X
Xiaoyu Wang 已提交
2590
  ParseCTX_STORE
2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613
#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 已提交
2614
#ifndef Parse_ENGINEALWAYSONSTACK
2615 2616 2617 2618 2619 2620 2621 2622 2623 2624
/* 
** 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 已提交
2625
** to Parse and ParseFree.
2626
*/
X
Xiaoyu Wang 已提交
2627
void *ParseAlloc(void *(*mallocProc)(YYMALLOCARGTYPE) ParseCTX_PDECL){
2628 2629 2630
  yyParser *yypParser;
  yypParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
  if( yypParser ){
X
Xiaoyu Wang 已提交
2631 2632
    ParseCTX_STORE
    ParseInit(yypParser ParseCTX_PARAM);
2633 2634 2635
  }
  return (void*)yypParser;
}
X
Xiaoyu Wang 已提交
2636
#endif /* Parse_ENGINEALWAYSONSTACK */
2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650


/* 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 已提交
2651 2652
  ParseARG_FETCH
  ParseCTX_FETCH
2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665
  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 */
2666 2667
    case 330: /* cmd */
    case 333: /* literal */
X
Xiaoyu Wang 已提交
2668 2669 2670 2671 2672 2673
    case 339: /* with_opt */
    case 345: /* search_condition */
    case 349: /* db_options */
    case 351: /* alter_db_options */
    case 353: /* start_opt */
    case 354: /* end_opt */
2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697
    case 358: /* signed */
    case 360: /* retention */
    case 361: /* full_table_name */
    case 364: /* table_options */
    case 368: /* alter_table_clause */
    case 369: /* alter_table_options */
    case 372: /* signed_literal */
    case 373: /* create_subtable_clause */
    case 376: /* drop_table_clause */
    case 378: /* column_def */
    case 382: /* duration_literal */
    case 383: /* rollup_func_name */
    case 385: /* col_name */
    case 386: /* db_name_cond_opt */
    case 387: /* like_pattern_opt */
    case 388: /* table_name_cond */
    case 389: /* from_db_opt */
    case 391: /* tag_item */
    case 393: /* full_index_name */
    case 394: /* index_options */
    case 397: /* sliding_opt */
    case 398: /* sma_stream_opt */
    case 399: /* func */
    case 401: /* query_or_subquery */
2698 2699 2700 2701 2702 2703
    case 402: /* where_clause_opt */
    case 405: /* explain_options */
    case 406: /* insert_query */
    case 412: /* stream_options */
    case 415: /* subtable_opt */
    case 416: /* expression */
X
Xiaoyu Wang 已提交
2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739
    case 418: /* literal_func */
    case 421: /* expr_or_subquery */
    case 422: /* pseudo_column */
    case 423: /* column_reference */
    case 424: /* function_expression */
    case 425: /* case_when_expression */
    case 430: /* star_func_para */
    case 432: /* case_when_else_opt */
    case 433: /* common_expression */
    case 434: /* when_then_expr */
    case 435: /* predicate */
    case 438: /* in_predicate_value */
    case 439: /* boolean_value_expression */
    case 440: /* boolean_primary */
    case 441: /* from_clause_opt */
    case 442: /* table_reference_list */
    case 443: /* table_reference */
    case 444: /* table_primary */
    case 445: /* joined_table */
    case 447: /* subquery */
    case 448: /* parenthesized_joined_table */
    case 450: /* query_specification */
    case 454: /* range_opt */
    case 455: /* every_opt */
    case 456: /* fill_opt */
    case 457: /* twindow_clause_opt */
    case 459: /* having_clause_opt */
    case 460: /* select_item */
    case 462: /* partition_item */
    case 465: /* query_expression */
    case 466: /* query_simple */
    case 468: /* slimit_clause_opt */
    case 469: /* limit_clause_opt */
    case 470: /* union_query_expression */
    case 471: /* query_simple_or_subquery */
    case 473: /* sort_specification */
X
Xiaoyu Wang 已提交
2740
{
X
Xiaoyu Wang 已提交
2741
 nodesDestroyNode((yypminor->yy448)); 
X
Xiaoyu Wang 已提交
2742 2743
}
      break;
2744 2745 2746
    case 331: /* account_options */
    case 332: /* alter_account_options */
    case 334: /* alter_account_option */
X
Xiaoyu Wang 已提交
2747
    case 352: /* speed_opt */
2748
    case 409: /* bufsize_opt */
2749
{
X
Xiaoyu Wang 已提交
2750
 
2751 2752
}
      break;
2753
    case 335: /* user_name */
X
Xiaoyu Wang 已提交
2754 2755 2756 2757
    case 342: /* db_name */
    case 343: /* table_name */
    case 344: /* topic_name */
    case 346: /* dnode_endpoint */
2758 2759 2760 2761 2762
    case 370: /* column_name */
    case 384: /* function_name */
    case 392: /* column_alias */
    case 395: /* index_name */
    case 400: /* sma_func_name */
2763 2764 2765
    case 403: /* cgroup_name */
    case 410: /* language_opt */
    case 411: /* stream_name */
X
Xiaoyu Wang 已提交
2766 2767 2768 2769
    case 420: /* table_alias */
    case 426: /* star_func */
    case 428: /* noarg_func */
    case 446: /* alias_opt */
2770
{
2771
 
2772 2773
}
      break;
2774
    case 336: /* sysinfo_opt */
2775
{
2776
 
2777 2778
}
      break;
2779
    case 337: /* privileges */
X
Xiaoyu Wang 已提交
2780 2781
    case 340: /* priv_type_list */
    case 341: /* priv_type */
X
Xiaoyu Wang 已提交
2782 2783 2784 2785
{
 
}
      break;
X
Xiaoyu Wang 已提交
2786
    case 338: /* priv_level */
2787
{
2788
 
2789 2790
}
      break;
X
Xiaoyu Wang 已提交
2791 2792 2793
    case 347: /* force_opt */
    case 348: /* not_exists_opt */
    case 350: /* exists_opt */
2794 2795 2796
    case 404: /* analyze_opt */
    case 407: /* or_replace_opt */
    case 408: /* agg_func_opt */
X
Xiaoyu Wang 已提交
2797
    case 451: /* set_quantifier_opt */
2798
{
2799 2800 2801
 
}
      break;
X
Xiaoyu Wang 已提交
2802 2803 2804
    case 355: /* integer_list */
    case 356: /* variable_list */
    case 357: /* retention_list */
2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816
    case 362: /* column_def_list */
    case 363: /* tags_def_opt */
    case 365: /* multi_create_clause */
    case 366: /* tags_def */
    case 367: /* multi_drop_clause */
    case 374: /* specific_cols_opt */
    case 375: /* expression_list */
    case 377: /* col_name_list */
    case 379: /* duration_list */
    case 380: /* rollup_func_list */
    case 390: /* tag_list_opt */
    case 396: /* func_list */
2817 2818 2819
    case 413: /* col_list_opt */
    case 414: /* tag_def_or_ref_opt */
    case 417: /* dnode_list */
X
Xiaoyu Wang 已提交
2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830
    case 419: /* literal_list */
    case 427: /* star_func_para_list */
    case 429: /* other_para_list */
    case 431: /* when_then_list */
    case 452: /* select_list */
    case 453: /* partition_by_clause_opt */
    case 458: /* group_by_clause_opt */
    case 461: /* partition_list */
    case 464: /* group_by_list */
    case 467: /* order_by_clause_opt */
    case 472: /* sort_specification_list */
2831
{
X
Xiaoyu Wang 已提交
2832
 nodesDestroyList((yypminor->yy432)); 
2833 2834
}
      break;
2835 2836
    case 359: /* alter_db_option */
    case 381: /* alter_table_option */
2837
{
X
Xiaoyu Wang 已提交
2838
 
2839 2840
}
      break;
2841
    case 371: /* type_name */
2842
{
2843
 
2844 2845
}
      break;
X
Xiaoyu Wang 已提交
2846 2847
    case 436: /* compare_op */
    case 437: /* in_op */
2848
{
2849
 
2850 2851
}
      break;
X
Xiaoyu Wang 已提交
2852
    case 449: /* join_type */
2853
{
2854
 
2855 2856
}
      break;
X
Xiaoyu Wang 已提交
2857
    case 463: /* fill_mode */
2858
{
2859
 
2860 2861
}
      break;
X
Xiaoyu Wang 已提交
2862
    case 474: /* ordering_specification_opt */
2863
{
2864
 
2865 2866
}
      break;
X
Xiaoyu Wang 已提交
2867
    case 475: /* null_ordering_opt */
2868
{
2869
 
2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900
}
      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 已提交
2901
void ParseFinalize(void *p){
2902 2903 2904
  yyParser *pParser = (yyParser*)p;
  while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser);
#if YYSTACKDEPTH<=0
X
Xiaoyu Wang 已提交
2905
  if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack);
2906 2907 2908
#endif
}

X
Xiaoyu Wang 已提交
2909
#ifndef Parse_ENGINEALWAYSONSTACK
2910 2911 2912 2913 2914 2915 2916 2917
/* 
** 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 已提交
2918
void ParseFree(
2919 2920 2921 2922 2923 2924
  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 已提交
2925
  ParseFinalize(p);
2926 2927
  (*freeProc)(p);
}
X
Xiaoyu Wang 已提交
2928
#endif /* Parse_ENGINEALWAYSONSTACK */
2929 2930 2931 2932 2933

/*
** Return the peak depth of the stack for a parser.
*/
#ifdef YYTRACKMAXSTACKDEPTH
X
Xiaoyu Wang 已提交
2934
int ParseStackPeak(void *p){
2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957
  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 已提交
2958
int ParseCoverage(FILE *out){
2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994
  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 );
2995 2996
    assert( i<=YY_ACTTAB_COUNT );
    assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD );
2997 2998 2999
    assert( iLookAhead!=YYNOCODE );
    assert( iLookAhead < YYNTOKEN );
    i += iLookAhead;
3000 3001
    assert( i<(int)YY_NLOOKAHEAD );
    if( yy_lookahead[i]!=iLookAhead ){
3002 3003
#ifdef YYFALLBACK
      YYCODETYPE iFallback;            /* Fallback token */
3004 3005 3006
      assert( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0]) );
      iFallback = yyFallback[iLookAhead];
      if( iFallback!=0 ){
3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020
#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;
3021 3022
        assert( j<(int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])) );
        if( yy_lookahead[j]==YYWILDCARD && iLookAhead>0 ){
3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035
#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{
3036
      assert( i>=0 && i<sizeof(yy_action)/sizeof(yy_action[0]) );
3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 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
      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 已提交
3076 3077
   ParseARG_FETCH
   ParseCTX_FETCH
3078 3079 3080 3081 3082 3083 3084 3085 3086 3087
#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 已提交
3088 3089
   ParseARG_STORE /* Suppress warning about unused %extra_argument var */
   ParseCTX_STORE
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
}

/*
** 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 已提交
3120
  ParseTOKENTYPE yyMinor        /* The minor token to shift in */
3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154
){
  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");
}

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
/* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side
** of that rule */
static const YYCODETYPE yyRuleInfoLhs[] = {
   330,  /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */
   330,  /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */
   331,  /* (2) account_options ::= */
   331,  /* (3) account_options ::= account_options PPS literal */
   331,  /* (4) account_options ::= account_options TSERIES literal */
   331,  /* (5) account_options ::= account_options STORAGE literal */
   331,  /* (6) account_options ::= account_options STREAMS literal */
   331,  /* (7) account_options ::= account_options QTIME literal */
   331,  /* (8) account_options ::= account_options DBS literal */
   331,  /* (9) account_options ::= account_options USERS literal */
   331,  /* (10) account_options ::= account_options CONNS literal */
   331,  /* (11) account_options ::= account_options STATE literal */
   332,  /* (12) alter_account_options ::= alter_account_option */
   332,  /* (13) alter_account_options ::= alter_account_options alter_account_option */
   334,  /* (14) alter_account_option ::= PASS literal */
   334,  /* (15) alter_account_option ::= PPS literal */
   334,  /* (16) alter_account_option ::= TSERIES literal */
   334,  /* (17) alter_account_option ::= STORAGE literal */
   334,  /* (18) alter_account_option ::= STREAMS literal */
   334,  /* (19) alter_account_option ::= QTIME literal */
   334,  /* (20) alter_account_option ::= DBS literal */
   334,  /* (21) alter_account_option ::= USERS literal */
   334,  /* (22) alter_account_option ::= CONNS literal */
   334,  /* (23) alter_account_option ::= STATE literal */
   330,  /* (24) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */
   330,  /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */
   330,  /* (26) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */
   330,  /* (27) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */
   330,  /* (28) cmd ::= DROP USER user_name */
   336,  /* (29) sysinfo_opt ::= */
   336,  /* (30) sysinfo_opt ::= SYSINFO NK_INTEGER */
   330,  /* (31) cmd ::= GRANT privileges ON priv_level with_opt TO user_name */
   330,  /* (32) cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */
   337,  /* (33) privileges ::= ALL */
   337,  /* (34) privileges ::= priv_type_list */
   337,  /* (35) privileges ::= SUBSCRIBE */
   340,  /* (36) priv_type_list ::= priv_type */
   340,  /* (37) priv_type_list ::= priv_type_list NK_COMMA priv_type */
   341,  /* (38) priv_type ::= READ */
   341,  /* (39) priv_type ::= WRITE */
   338,  /* (40) priv_level ::= NK_STAR NK_DOT NK_STAR */
   338,  /* (41) priv_level ::= db_name NK_DOT NK_STAR */
   338,  /* (42) priv_level ::= db_name NK_DOT table_name */
   338,  /* (43) priv_level ::= topic_name */
   339,  /* (44) with_opt ::= */
   339,  /* (45) with_opt ::= WITH search_condition */
   330,  /* (46) cmd ::= CREATE DNODE dnode_endpoint */
   330,  /* (47) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */
   330,  /* (48) cmd ::= DROP DNODE NK_INTEGER force_opt */
   330,  /* (49) cmd ::= DROP DNODE dnode_endpoint force_opt */
   330,  /* (50) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */
   330,  /* (51) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */
   330,  /* (52) cmd ::= ALTER ALL DNODES NK_STRING */
   330,  /* (53) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */
   346,  /* (54) dnode_endpoint ::= NK_STRING */
   346,  /* (55) dnode_endpoint ::= NK_ID */
   346,  /* (56) dnode_endpoint ::= NK_IPTOKEN */
   347,  /* (57) force_opt ::= */
   347,  /* (58) force_opt ::= FORCE */
   330,  /* (59) cmd ::= ALTER LOCAL NK_STRING */
   330,  /* (60) cmd ::= ALTER LOCAL NK_STRING NK_STRING */
   330,  /* (61) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */
   330,  /* (62) cmd ::= DROP QNODE ON DNODE NK_INTEGER */
   330,  /* (63) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */
   330,  /* (64) cmd ::= DROP BNODE ON DNODE NK_INTEGER */
   330,  /* (65) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */
   330,  /* (66) cmd ::= DROP SNODE ON DNODE NK_INTEGER */
   330,  /* (67) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */
   330,  /* (68) cmd ::= DROP MNODE ON DNODE NK_INTEGER */
   330,  /* (69) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
   330,  /* (70) cmd ::= DROP DATABASE exists_opt db_name */
   330,  /* (71) cmd ::= USE db_name */
   330,  /* (72) cmd ::= ALTER DATABASE db_name alter_db_options */
   330,  /* (73) cmd ::= FLUSH DATABASE db_name */
   330,  /* (74) cmd ::= TRIM DATABASE db_name speed_opt */
   330,  /* (75) cmd ::= COMPACT DATABASE db_name start_opt end_opt */
   348,  /* (76) not_exists_opt ::= IF NOT EXISTS */
   348,  /* (77) not_exists_opt ::= */
   350,  /* (78) exists_opt ::= IF EXISTS */
   350,  /* (79) exists_opt ::= */
   349,  /* (80) db_options ::= */
   349,  /* (81) db_options ::= db_options BUFFER NK_INTEGER */
   349,  /* (82) db_options ::= db_options CACHEMODEL NK_STRING */
   349,  /* (83) db_options ::= db_options CACHESIZE NK_INTEGER */
   349,  /* (84) db_options ::= db_options COMP NK_INTEGER */
   349,  /* (85) db_options ::= db_options DURATION NK_INTEGER */
   349,  /* (86) db_options ::= db_options DURATION NK_VARIABLE */
   349,  /* (87) db_options ::= db_options MAXROWS NK_INTEGER */
   349,  /* (88) db_options ::= db_options MINROWS NK_INTEGER */
   349,  /* (89) db_options ::= db_options KEEP integer_list */
   349,  /* (90) db_options ::= db_options KEEP variable_list */
   349,  /* (91) db_options ::= db_options PAGES NK_INTEGER */
   349,  /* (92) db_options ::= db_options PAGESIZE NK_INTEGER */
   349,  /* (93) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */
   349,  /* (94) db_options ::= db_options PRECISION NK_STRING */
   349,  /* (95) db_options ::= db_options REPLICA NK_INTEGER */
   349,  /* (96) db_options ::= db_options VGROUPS NK_INTEGER */
   349,  /* (97) db_options ::= db_options SINGLE_STABLE NK_INTEGER */
   349,  /* (98) db_options ::= db_options RETENTIONS retention_list */
   349,  /* (99) db_options ::= db_options SCHEMALESS NK_INTEGER */
   349,  /* (100) db_options ::= db_options WAL_LEVEL NK_INTEGER */
   349,  /* (101) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */
   349,  /* (102) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */
   349,  /* (103) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */
   349,  /* (104) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */
   349,  /* (105) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */
   349,  /* (106) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */
   349,  /* (107) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */
   349,  /* (108) db_options ::= db_options STT_TRIGGER NK_INTEGER */
   349,  /* (109) db_options ::= db_options TABLE_PREFIX signed */
   349,  /* (110) db_options ::= db_options TABLE_SUFFIX signed */
   351,  /* (111) alter_db_options ::= alter_db_option */
   351,  /* (112) alter_db_options ::= alter_db_options alter_db_option */
   359,  /* (113) alter_db_option ::= BUFFER NK_INTEGER */
   359,  /* (114) alter_db_option ::= CACHEMODEL NK_STRING */
   359,  /* (115) alter_db_option ::= CACHESIZE NK_INTEGER */
   359,  /* (116) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */
   359,  /* (117) alter_db_option ::= KEEP integer_list */
   359,  /* (118) alter_db_option ::= KEEP variable_list */
   359,  /* (119) alter_db_option ::= PAGES NK_INTEGER */
   359,  /* (120) alter_db_option ::= REPLICA NK_INTEGER */
   359,  /* (121) alter_db_option ::= WAL_LEVEL NK_INTEGER */
   359,  /* (122) alter_db_option ::= STT_TRIGGER NK_INTEGER */
   359,  /* (123) alter_db_option ::= MINROWS NK_INTEGER */
   359,  /* (124) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */
   359,  /* (125) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */
   359,  /* (126) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */
   359,  /* (127) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */
   355,  /* (128) integer_list ::= NK_INTEGER */
   355,  /* (129) integer_list ::= integer_list NK_COMMA NK_INTEGER */
   356,  /* (130) variable_list ::= NK_VARIABLE */
   356,  /* (131) variable_list ::= variable_list NK_COMMA NK_VARIABLE */
   357,  /* (132) retention_list ::= retention */
   357,  /* (133) retention_list ::= retention_list NK_COMMA retention */
   360,  /* (134) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */
   352,  /* (135) speed_opt ::= */
   352,  /* (136) speed_opt ::= MAX_SPEED NK_INTEGER */
   353,  /* (137) start_opt ::= */
   353,  /* (138) start_opt ::= START WITH NK_INTEGER */
   353,  /* (139) start_opt ::= START WITH NK_STRING */
   353,  /* (140) start_opt ::= START WITH TIMESTAMP NK_STRING */
   354,  /* (141) end_opt ::= */
   354,  /* (142) end_opt ::= END WITH NK_INTEGER */
   354,  /* (143) end_opt ::= END WITH NK_STRING */
   354,  /* (144) end_opt ::= END WITH TIMESTAMP NK_STRING */
   330,  /* (145) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */
   330,  /* (146) cmd ::= CREATE TABLE multi_create_clause */
   330,  /* (147) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */
   330,  /* (148) cmd ::= DROP TABLE multi_drop_clause */
   330,  /* (149) cmd ::= DROP STABLE exists_opt full_table_name */
   330,  /* (150) cmd ::= ALTER TABLE alter_table_clause */
   330,  /* (151) cmd ::= ALTER STABLE alter_table_clause */
   368,  /* (152) alter_table_clause ::= full_table_name alter_table_options */
   368,  /* (153) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */
   368,  /* (154) alter_table_clause ::= full_table_name DROP COLUMN column_name */
   368,  /* (155) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */
   368,  /* (156) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */
   368,  /* (157) alter_table_clause ::= full_table_name ADD TAG column_name type_name */
   368,  /* (158) alter_table_clause ::= full_table_name DROP TAG column_name */
   368,  /* (159) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */
   368,  /* (160) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */
   368,  /* (161) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */
   365,  /* (162) multi_create_clause ::= create_subtable_clause */
   365,  /* (163) multi_create_clause ::= multi_create_clause create_subtable_clause */
   373,  /* (164) 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 */
   367,  /* (165) multi_drop_clause ::= drop_table_clause */
   367,  /* (166) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */
   376,  /* (167) drop_table_clause ::= exists_opt full_table_name */
   374,  /* (168) specific_cols_opt ::= */
   374,  /* (169) specific_cols_opt ::= NK_LP col_name_list NK_RP */
   361,  /* (170) full_table_name ::= table_name */
   361,  /* (171) full_table_name ::= db_name NK_DOT table_name */
   362,  /* (172) column_def_list ::= column_def */
   362,  /* (173) column_def_list ::= column_def_list NK_COMMA column_def */
   378,  /* (174) column_def ::= column_name type_name */
   371,  /* (175) type_name ::= BOOL */
   371,  /* (176) type_name ::= TINYINT */
   371,  /* (177) type_name ::= SMALLINT */
   371,  /* (178) type_name ::= INT */
   371,  /* (179) type_name ::= INTEGER */
   371,  /* (180) type_name ::= BIGINT */
   371,  /* (181) type_name ::= FLOAT */
   371,  /* (182) type_name ::= DOUBLE */
   371,  /* (183) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
   371,  /* (184) type_name ::= TIMESTAMP */
   371,  /* (185) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
   371,  /* (186) type_name ::= TINYINT UNSIGNED */
   371,  /* (187) type_name ::= SMALLINT UNSIGNED */
   371,  /* (188) type_name ::= INT UNSIGNED */
   371,  /* (189) type_name ::= BIGINT UNSIGNED */
   371,  /* (190) type_name ::= JSON */
   371,  /* (191) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
   371,  /* (192) type_name ::= MEDIUMBLOB */
   371,  /* (193) type_name ::= BLOB */
   371,  /* (194) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
   371,  /* (195) type_name ::= DECIMAL */
   371,  /* (196) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
   371,  /* (197) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
   363,  /* (198) tags_def_opt ::= */
   363,  /* (199) tags_def_opt ::= tags_def */
   366,  /* (200) tags_def ::= TAGS NK_LP column_def_list NK_RP */
   364,  /* (201) table_options ::= */
   364,  /* (202) table_options ::= table_options COMMENT NK_STRING */
   364,  /* (203) table_options ::= table_options MAX_DELAY duration_list */
   364,  /* (204) table_options ::= table_options WATERMARK duration_list */
   364,  /* (205) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */
   364,  /* (206) table_options ::= table_options TTL NK_INTEGER */
   364,  /* (207) table_options ::= table_options SMA NK_LP col_name_list NK_RP */
   364,  /* (208) table_options ::= table_options DELETE_MARK duration_list */
   369,  /* (209) alter_table_options ::= alter_table_option */
   369,  /* (210) alter_table_options ::= alter_table_options alter_table_option */
   381,  /* (211) alter_table_option ::= COMMENT NK_STRING */
   381,  /* (212) alter_table_option ::= TTL NK_INTEGER */
   379,  /* (213) duration_list ::= duration_literal */
   379,  /* (214) duration_list ::= duration_list NK_COMMA duration_literal */
   380,  /* (215) rollup_func_list ::= rollup_func_name */
   380,  /* (216) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */
   383,  /* (217) rollup_func_name ::= function_name */
   383,  /* (218) rollup_func_name ::= FIRST */
   383,  /* (219) rollup_func_name ::= LAST */
   377,  /* (220) col_name_list ::= col_name */
   377,  /* (221) col_name_list ::= col_name_list NK_COMMA col_name */
   385,  /* (222) col_name ::= column_name */
   330,  /* (223) cmd ::= SHOW DNODES */
   330,  /* (224) cmd ::= SHOW USERS */
   330,  /* (225) cmd ::= SHOW USER PRIVILEGES */
   330,  /* (226) cmd ::= SHOW DATABASES */
   330,  /* (227) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */
   330,  /* (228) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */
   330,  /* (229) cmd ::= SHOW db_name_cond_opt VGROUPS */
   330,  /* (230) cmd ::= SHOW MNODES */
   330,  /* (231) cmd ::= SHOW QNODES */
   330,  /* (232) cmd ::= SHOW FUNCTIONS */
   330,  /* (233) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */
   330,  /* (234) cmd ::= SHOW STREAMS */
   330,  /* (235) cmd ::= SHOW ACCOUNTS */
   330,  /* (236) cmd ::= SHOW APPS */
   330,  /* (237) cmd ::= SHOW CONNECTIONS */
   330,  /* (238) cmd ::= SHOW LICENCES */
   330,  /* (239) cmd ::= SHOW GRANTS */
   330,  /* (240) cmd ::= SHOW CREATE DATABASE db_name */
   330,  /* (241) cmd ::= SHOW CREATE TABLE full_table_name */
   330,  /* (242) cmd ::= SHOW CREATE STABLE full_table_name */
   330,  /* (243) cmd ::= SHOW QUERIES */
   330,  /* (244) cmd ::= SHOW SCORES */
   330,  /* (245) cmd ::= SHOW TOPICS */
   330,  /* (246) cmd ::= SHOW VARIABLES */
   330,  /* (247) cmd ::= SHOW CLUSTER VARIABLES */
   330,  /* (248) cmd ::= SHOW LOCAL VARIABLES */
   330,  /* (249) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */
   330,  /* (250) cmd ::= SHOW BNODES */
   330,  /* (251) cmd ::= SHOW SNODES */
   330,  /* (252) cmd ::= SHOW CLUSTER */
   330,  /* (253) cmd ::= SHOW TRANSACTIONS */
   330,  /* (254) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */
   330,  /* (255) cmd ::= SHOW CONSUMERS */
   330,  /* (256) cmd ::= SHOW SUBSCRIPTIONS */
   330,  /* (257) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */
   330,  /* (258) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */
   330,  /* (259) cmd ::= SHOW VNODES NK_INTEGER */
   330,  /* (260) cmd ::= SHOW VNODES NK_STRING */
   330,  /* (261) cmd ::= SHOW db_name_cond_opt ALIVE */
   330,  /* (262) cmd ::= SHOW CLUSTER ALIVE */
   386,  /* (263) db_name_cond_opt ::= */
   386,  /* (264) db_name_cond_opt ::= db_name NK_DOT */
   387,  /* (265) like_pattern_opt ::= */
   387,  /* (266) like_pattern_opt ::= LIKE NK_STRING */
   388,  /* (267) table_name_cond ::= table_name */
   389,  /* (268) from_db_opt ::= */
   389,  /* (269) from_db_opt ::= FROM db_name */
   390,  /* (270) tag_list_opt ::= */
   390,  /* (271) tag_list_opt ::= tag_item */
   390,  /* (272) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */
   391,  /* (273) tag_item ::= TBNAME */
   391,  /* (274) tag_item ::= QTAGS */
   391,  /* (275) tag_item ::= column_name */
   391,  /* (276) tag_item ::= column_name column_alias */
   391,  /* (277) tag_item ::= column_name AS column_alias */
   330,  /* (278) cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */
   330,  /* (279) cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */
   330,  /* (280) cmd ::= DROP INDEX exists_opt full_index_name */
   393,  /* (281) full_index_name ::= index_name */
   393,  /* (282) full_index_name ::= db_name NK_DOT index_name */
   394,  /* (283) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */
   394,  /* (284) 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 */
   396,  /* (285) func_list ::= func */
   396,  /* (286) func_list ::= func_list NK_COMMA func */
   399,  /* (287) func ::= sma_func_name NK_LP expression_list NK_RP */
   400,  /* (288) sma_func_name ::= function_name */
   400,  /* (289) sma_func_name ::= COUNT */
   400,  /* (290) sma_func_name ::= FIRST */
   400,  /* (291) sma_func_name ::= LAST */
   400,  /* (292) sma_func_name ::= LAST_ROW */
   398,  /* (293) sma_stream_opt ::= */
   398,  /* (294) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */
   398,  /* (295) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */
   398,  /* (296) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */
   330,  /* (297) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */
   330,  /* (298) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */
   330,  /* (299) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */
3458 3459
   330,  /* (300) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name where_clause_opt */
   330,  /* (301) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name where_clause_opt */
3460 3461 3462 3463 3464 3465 3466
   330,  /* (302) cmd ::= DROP TOPIC exists_opt topic_name */
   330,  /* (303) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */
   330,  /* (304) cmd ::= DESC full_table_name */
   330,  /* (305) cmd ::= DESCRIBE full_table_name */
   330,  /* (306) cmd ::= RESET QUERY CACHE */
   330,  /* (307) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */
   330,  /* (308) cmd ::= EXPLAIN analyze_opt explain_options insert_query */
3467 3468 3469 3470 3471
   404,  /* (309) analyze_opt ::= */
   404,  /* (310) analyze_opt ::= ANALYZE */
   405,  /* (311) explain_options ::= */
   405,  /* (312) explain_options ::= explain_options VERBOSE NK_BOOL */
   405,  /* (313) explain_options ::= explain_options RATIO NK_FLOAT */
3472 3473
   330,  /* (314) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */
   330,  /* (315) cmd ::= DROP FUNCTION exists_opt function_name */
3474 3475 3476 3477 3478 3479 3480 3481
   408,  /* (316) agg_func_opt ::= */
   408,  /* (317) agg_func_opt ::= AGGREGATE */
   409,  /* (318) bufsize_opt ::= */
   409,  /* (319) bufsize_opt ::= BUFSIZE NK_INTEGER */
   410,  /* (320) language_opt ::= */
   410,  /* (321) language_opt ::= LANGUAGE NK_STRING */
   407,  /* (322) or_replace_opt ::= */
   407,  /* (323) or_replace_opt ::= OR REPLACE */
3482 3483
   330,  /* (324) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */
   330,  /* (325) cmd ::= DROP STREAM exists_opt stream_name */
3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499
   413,  /* (326) col_list_opt ::= */
   413,  /* (327) col_list_opt ::= NK_LP col_name_list NK_RP */
   414,  /* (328) tag_def_or_ref_opt ::= */
   414,  /* (329) tag_def_or_ref_opt ::= tags_def */
   414,  /* (330) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */
   412,  /* (331) stream_options ::= */
   412,  /* (332) stream_options ::= stream_options TRIGGER AT_ONCE */
   412,  /* (333) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */
   412,  /* (334) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
   412,  /* (335) stream_options ::= stream_options WATERMARK duration_literal */
   412,  /* (336) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */
   412,  /* (337) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */
   412,  /* (338) stream_options ::= stream_options DELETE_MARK duration_literal */
   412,  /* (339) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */
   415,  /* (340) subtable_opt ::= */
   415,  /* (341) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */
3500 3501 3502 3503 3504 3505 3506 3507
   330,  /* (342) cmd ::= KILL CONNECTION NK_INTEGER */
   330,  /* (343) cmd ::= KILL QUERY NK_STRING */
   330,  /* (344) cmd ::= KILL TRANSACTION NK_INTEGER */
   330,  /* (345) cmd ::= BALANCE VGROUP */
   330,  /* (346) cmd ::= BALANCE VGROUP LEADER */
   330,  /* (347) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */
   330,  /* (348) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */
   330,  /* (349) cmd ::= SPLIT VGROUP NK_INTEGER */
3508 3509
   417,  /* (350) dnode_list ::= DNODE NK_INTEGER */
   417,  /* (351) dnode_list ::= dnode_list DNODE NK_INTEGER */
3510 3511 3512
   330,  /* (352) cmd ::= DELETE FROM full_table_name where_clause_opt */
   330,  /* (353) cmd ::= query_or_subquery */
   330,  /* (354) cmd ::= insert_query */
3513 3514
   406,  /* (355) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */
   406,  /* (356) insert_query ::= INSERT INTO full_table_name query_or_subquery */
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
   333,  /* (357) literal ::= NK_INTEGER */
   333,  /* (358) literal ::= NK_FLOAT */
   333,  /* (359) literal ::= NK_STRING */
   333,  /* (360) literal ::= NK_BOOL */
   333,  /* (361) literal ::= TIMESTAMP NK_STRING */
   333,  /* (362) literal ::= duration_literal */
   333,  /* (363) literal ::= NULL */
   333,  /* (364) literal ::= NK_QUESTION */
   382,  /* (365) duration_literal ::= NK_VARIABLE */
   358,  /* (366) signed ::= NK_INTEGER */
   358,  /* (367) signed ::= NK_PLUS NK_INTEGER */
   358,  /* (368) signed ::= NK_MINUS NK_INTEGER */
   358,  /* (369) signed ::= NK_FLOAT */
   358,  /* (370) signed ::= NK_PLUS NK_FLOAT */
   358,  /* (371) signed ::= NK_MINUS NK_FLOAT */
   372,  /* (372) signed_literal ::= signed */
   372,  /* (373) signed_literal ::= NK_STRING */
   372,  /* (374) signed_literal ::= NK_BOOL */
   372,  /* (375) signed_literal ::= TIMESTAMP NK_STRING */
   372,  /* (376) signed_literal ::= duration_literal */
   372,  /* (377) signed_literal ::= NULL */
   372,  /* (378) signed_literal ::= literal_func */
   372,  /* (379) signed_literal ::= NK_QUESTION */
   419,  /* (380) literal_list ::= signed_literal */
   419,  /* (381) literal_list ::= literal_list NK_COMMA signed_literal */
   342,  /* (382) db_name ::= NK_ID */
   343,  /* (383) table_name ::= NK_ID */
   370,  /* (384) column_name ::= NK_ID */
   384,  /* (385) function_name ::= NK_ID */
   420,  /* (386) table_alias ::= NK_ID */
   392,  /* (387) column_alias ::= NK_ID */
   335,  /* (388) user_name ::= NK_ID */
   344,  /* (389) topic_name ::= NK_ID */
3548 3549
   411,  /* (390) stream_name ::= NK_ID */
   403,  /* (391) cgroup_name ::= NK_ID */
3550 3551
   395,  /* (392) index_name ::= NK_ID */
   421,  /* (393) expr_or_subquery ::= expression */
3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567
   416,  /* (394) expression ::= literal */
   416,  /* (395) expression ::= pseudo_column */
   416,  /* (396) expression ::= column_reference */
   416,  /* (397) expression ::= function_expression */
   416,  /* (398) expression ::= case_when_expression */
   416,  /* (399) expression ::= NK_LP expression NK_RP */
   416,  /* (400) expression ::= NK_PLUS expr_or_subquery */
   416,  /* (401) expression ::= NK_MINUS expr_or_subquery */
   416,  /* (402) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */
   416,  /* (403) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */
   416,  /* (404) expression ::= expr_or_subquery NK_STAR expr_or_subquery */
   416,  /* (405) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */
   416,  /* (406) expression ::= expr_or_subquery NK_REM expr_or_subquery */
   416,  /* (407) expression ::= column_reference NK_ARROW NK_STRING */
   416,  /* (408) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */
   416,  /* (409) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */
3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 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 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672
   375,  /* (410) expression_list ::= expr_or_subquery */
   375,  /* (411) expression_list ::= expression_list NK_COMMA expr_or_subquery */
   423,  /* (412) column_reference ::= column_name */
   423,  /* (413) column_reference ::= table_name NK_DOT column_name */
   422,  /* (414) pseudo_column ::= ROWTS */
   422,  /* (415) pseudo_column ::= TBNAME */
   422,  /* (416) pseudo_column ::= table_name NK_DOT TBNAME */
   422,  /* (417) pseudo_column ::= QSTART */
   422,  /* (418) pseudo_column ::= QEND */
   422,  /* (419) pseudo_column ::= QDURATION */
   422,  /* (420) pseudo_column ::= WSTART */
   422,  /* (421) pseudo_column ::= WEND */
   422,  /* (422) pseudo_column ::= WDURATION */
   422,  /* (423) pseudo_column ::= IROWTS */
   422,  /* (424) pseudo_column ::= ISFILLED */
   422,  /* (425) pseudo_column ::= QTAGS */
   424,  /* (426) function_expression ::= function_name NK_LP expression_list NK_RP */
   424,  /* (427) function_expression ::= star_func NK_LP star_func_para_list NK_RP */
   424,  /* (428) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */
   424,  /* (429) function_expression ::= literal_func */
   418,  /* (430) literal_func ::= noarg_func NK_LP NK_RP */
   418,  /* (431) literal_func ::= NOW */
   428,  /* (432) noarg_func ::= NOW */
   428,  /* (433) noarg_func ::= TODAY */
   428,  /* (434) noarg_func ::= TIMEZONE */
   428,  /* (435) noarg_func ::= DATABASE */
   428,  /* (436) noarg_func ::= CLIENT_VERSION */
   428,  /* (437) noarg_func ::= SERVER_VERSION */
   428,  /* (438) noarg_func ::= SERVER_STATUS */
   428,  /* (439) noarg_func ::= CURRENT_USER */
   428,  /* (440) noarg_func ::= USER */
   426,  /* (441) star_func ::= COUNT */
   426,  /* (442) star_func ::= FIRST */
   426,  /* (443) star_func ::= LAST */
   426,  /* (444) star_func ::= LAST_ROW */
   427,  /* (445) star_func_para_list ::= NK_STAR */
   427,  /* (446) star_func_para_list ::= other_para_list */
   429,  /* (447) other_para_list ::= star_func_para */
   429,  /* (448) other_para_list ::= other_para_list NK_COMMA star_func_para */
   430,  /* (449) star_func_para ::= expr_or_subquery */
   430,  /* (450) star_func_para ::= table_name NK_DOT NK_STAR */
   425,  /* (451) case_when_expression ::= CASE when_then_list case_when_else_opt END */
   425,  /* (452) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */
   431,  /* (453) when_then_list ::= when_then_expr */
   431,  /* (454) when_then_list ::= when_then_list when_then_expr */
   434,  /* (455) when_then_expr ::= WHEN common_expression THEN common_expression */
   432,  /* (456) case_when_else_opt ::= */
   432,  /* (457) case_when_else_opt ::= ELSE common_expression */
   435,  /* (458) predicate ::= expr_or_subquery compare_op expr_or_subquery */
   435,  /* (459) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */
   435,  /* (460) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */
   435,  /* (461) predicate ::= expr_or_subquery IS NULL */
   435,  /* (462) predicate ::= expr_or_subquery IS NOT NULL */
   435,  /* (463) predicate ::= expr_or_subquery in_op in_predicate_value */
   436,  /* (464) compare_op ::= NK_LT */
   436,  /* (465) compare_op ::= NK_GT */
   436,  /* (466) compare_op ::= NK_LE */
   436,  /* (467) compare_op ::= NK_GE */
   436,  /* (468) compare_op ::= NK_NE */
   436,  /* (469) compare_op ::= NK_EQ */
   436,  /* (470) compare_op ::= LIKE */
   436,  /* (471) compare_op ::= NOT LIKE */
   436,  /* (472) compare_op ::= MATCH */
   436,  /* (473) compare_op ::= NMATCH */
   436,  /* (474) compare_op ::= CONTAINS */
   437,  /* (475) in_op ::= IN */
   437,  /* (476) in_op ::= NOT IN */
   438,  /* (477) in_predicate_value ::= NK_LP literal_list NK_RP */
   439,  /* (478) boolean_value_expression ::= boolean_primary */
   439,  /* (479) boolean_value_expression ::= NOT boolean_primary */
   439,  /* (480) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
   439,  /* (481) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
   440,  /* (482) boolean_primary ::= predicate */
   440,  /* (483) boolean_primary ::= NK_LP boolean_value_expression NK_RP */
   433,  /* (484) common_expression ::= expr_or_subquery */
   433,  /* (485) common_expression ::= boolean_value_expression */
   441,  /* (486) from_clause_opt ::= */
   441,  /* (487) from_clause_opt ::= FROM table_reference_list */
   442,  /* (488) table_reference_list ::= table_reference */
   442,  /* (489) table_reference_list ::= table_reference_list NK_COMMA table_reference */
   443,  /* (490) table_reference ::= table_primary */
   443,  /* (491) table_reference ::= joined_table */
   444,  /* (492) table_primary ::= table_name alias_opt */
   444,  /* (493) table_primary ::= db_name NK_DOT table_name alias_opt */
   444,  /* (494) table_primary ::= subquery alias_opt */
   444,  /* (495) table_primary ::= parenthesized_joined_table */
   446,  /* (496) alias_opt ::= */
   446,  /* (497) alias_opt ::= table_alias */
   446,  /* (498) alias_opt ::= AS table_alias */
   448,  /* (499) parenthesized_joined_table ::= NK_LP joined_table NK_RP */
   448,  /* (500) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */
   445,  /* (501) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
   449,  /* (502) join_type ::= */
   449,  /* (503) join_type ::= INNER */
   450,  /* (504) 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 */
   451,  /* (505) set_quantifier_opt ::= */
   451,  /* (506) set_quantifier_opt ::= DISTINCT */
   451,  /* (507) set_quantifier_opt ::= ALL */
   452,  /* (508) select_list ::= select_item */
   452,  /* (509) select_list ::= select_list NK_COMMA select_item */
   460,  /* (510) select_item ::= NK_STAR */
   460,  /* (511) select_item ::= common_expression */
   460,  /* (512) select_item ::= common_expression column_alias */
   460,  /* (513) select_item ::= common_expression AS column_alias */
   460,  /* (514) select_item ::= table_name NK_DOT NK_STAR */
3673 3674
   402,  /* (515) where_clause_opt ::= */
   402,  /* (516) where_clause_opt ::= WHERE search_condition */
3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045
   453,  /* (517) partition_by_clause_opt ::= */
   453,  /* (518) partition_by_clause_opt ::= PARTITION BY partition_list */
   461,  /* (519) partition_list ::= partition_item */
   461,  /* (520) partition_list ::= partition_list NK_COMMA partition_item */
   462,  /* (521) partition_item ::= expr_or_subquery */
   462,  /* (522) partition_item ::= expr_or_subquery column_alias */
   462,  /* (523) partition_item ::= expr_or_subquery AS column_alias */
   457,  /* (524) twindow_clause_opt ::= */
   457,  /* (525) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
   457,  /* (526) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */
   457,  /* (527) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
   457,  /* (528) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
   457,  /* (529) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */
   397,  /* (530) sliding_opt ::= */
   397,  /* (531) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
   456,  /* (532) fill_opt ::= */
   456,  /* (533) fill_opt ::= FILL NK_LP fill_mode NK_RP */
   456,  /* (534) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
   456,  /* (535) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA literal_list NK_RP */
   463,  /* (536) fill_mode ::= NONE */
   463,  /* (537) fill_mode ::= PREV */
   463,  /* (538) fill_mode ::= NULL */
   463,  /* (539) fill_mode ::= NULL_F */
   463,  /* (540) fill_mode ::= LINEAR */
   463,  /* (541) fill_mode ::= NEXT */
   458,  /* (542) group_by_clause_opt ::= */
   458,  /* (543) group_by_clause_opt ::= GROUP BY group_by_list */
   464,  /* (544) group_by_list ::= expr_or_subquery */
   464,  /* (545) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */
   459,  /* (546) having_clause_opt ::= */
   459,  /* (547) having_clause_opt ::= HAVING search_condition */
   454,  /* (548) range_opt ::= */
   454,  /* (549) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */
   455,  /* (550) every_opt ::= */
   455,  /* (551) every_opt ::= EVERY NK_LP duration_literal NK_RP */
   465,  /* (552) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */
   466,  /* (553) query_simple ::= query_specification */
   466,  /* (554) query_simple ::= union_query_expression */
   470,  /* (555) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */
   470,  /* (556) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */
   471,  /* (557) query_simple_or_subquery ::= query_simple */
   471,  /* (558) query_simple_or_subquery ::= subquery */
   401,  /* (559) query_or_subquery ::= query_expression */
   401,  /* (560) query_or_subquery ::= subquery */
   467,  /* (561) order_by_clause_opt ::= */
   467,  /* (562) order_by_clause_opt ::= ORDER BY sort_specification_list */
   468,  /* (563) slimit_clause_opt ::= */
   468,  /* (564) slimit_clause_opt ::= SLIMIT NK_INTEGER */
   468,  /* (565) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
   468,  /* (566) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
   469,  /* (567) limit_clause_opt ::= */
   469,  /* (568) limit_clause_opt ::= LIMIT NK_INTEGER */
   469,  /* (569) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */
   469,  /* (570) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */
   447,  /* (571) subquery ::= NK_LP query_expression NK_RP */
   447,  /* (572) subquery ::= NK_LP subquery NK_RP */
   345,  /* (573) search_condition ::= common_expression */
   472,  /* (574) sort_specification_list ::= sort_specification */
   472,  /* (575) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */
   473,  /* (576) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */
   474,  /* (577) ordering_specification_opt ::= */
   474,  /* (578) ordering_specification_opt ::= ASC */
   474,  /* (579) ordering_specification_opt ::= DESC */
   475,  /* (580) null_ordering_opt ::= */
   475,  /* (581) null_ordering_opt ::= NULLS FIRST */
   475,  /* (582) null_ordering_opt ::= NULLS LAST */
};

/* For rule J, yyRuleInfoNRhs[J] contains the negative of the number
** of symbols on the right-hand side of that rule. */
static const signed char yyRuleInfoNRhs[] = {
   -6,  /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */
   -4,  /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */
    0,  /* (2) account_options ::= */
   -3,  /* (3) account_options ::= account_options PPS literal */
   -3,  /* (4) account_options ::= account_options TSERIES literal */
   -3,  /* (5) account_options ::= account_options STORAGE literal */
   -3,  /* (6) account_options ::= account_options STREAMS literal */
   -3,  /* (7) account_options ::= account_options QTIME literal */
   -3,  /* (8) account_options ::= account_options DBS literal */
   -3,  /* (9) account_options ::= account_options USERS literal */
   -3,  /* (10) account_options ::= account_options CONNS literal */
   -3,  /* (11) account_options ::= account_options STATE literal */
   -1,  /* (12) alter_account_options ::= alter_account_option */
   -2,  /* (13) alter_account_options ::= alter_account_options alter_account_option */
   -2,  /* (14) alter_account_option ::= PASS literal */
   -2,  /* (15) alter_account_option ::= PPS literal */
   -2,  /* (16) alter_account_option ::= TSERIES literal */
   -2,  /* (17) alter_account_option ::= STORAGE literal */
   -2,  /* (18) alter_account_option ::= STREAMS literal */
   -2,  /* (19) alter_account_option ::= QTIME literal */
   -2,  /* (20) alter_account_option ::= DBS literal */
   -2,  /* (21) alter_account_option ::= USERS literal */
   -2,  /* (22) alter_account_option ::= CONNS literal */
   -2,  /* (23) alter_account_option ::= STATE literal */
   -6,  /* (24) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */
   -5,  /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */
   -5,  /* (26) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */
   -5,  /* (27) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */
   -3,  /* (28) cmd ::= DROP USER user_name */
    0,  /* (29) sysinfo_opt ::= */
   -2,  /* (30) sysinfo_opt ::= SYSINFO NK_INTEGER */
   -7,  /* (31) cmd ::= GRANT privileges ON priv_level with_opt TO user_name */
   -7,  /* (32) cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */
   -1,  /* (33) privileges ::= ALL */
   -1,  /* (34) privileges ::= priv_type_list */
   -1,  /* (35) privileges ::= SUBSCRIBE */
   -1,  /* (36) priv_type_list ::= priv_type */
   -3,  /* (37) priv_type_list ::= priv_type_list NK_COMMA priv_type */
   -1,  /* (38) priv_type ::= READ */
   -1,  /* (39) priv_type ::= WRITE */
   -3,  /* (40) priv_level ::= NK_STAR NK_DOT NK_STAR */
   -3,  /* (41) priv_level ::= db_name NK_DOT NK_STAR */
   -3,  /* (42) priv_level ::= db_name NK_DOT table_name */
   -1,  /* (43) priv_level ::= topic_name */
    0,  /* (44) with_opt ::= */
   -2,  /* (45) with_opt ::= WITH search_condition */
   -3,  /* (46) cmd ::= CREATE DNODE dnode_endpoint */
   -5,  /* (47) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */
   -4,  /* (48) cmd ::= DROP DNODE NK_INTEGER force_opt */
   -4,  /* (49) cmd ::= DROP DNODE dnode_endpoint force_opt */
   -4,  /* (50) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */
   -5,  /* (51) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */
   -4,  /* (52) cmd ::= ALTER ALL DNODES NK_STRING */
   -5,  /* (53) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */
   -1,  /* (54) dnode_endpoint ::= NK_STRING */
   -1,  /* (55) dnode_endpoint ::= NK_ID */
   -1,  /* (56) dnode_endpoint ::= NK_IPTOKEN */
    0,  /* (57) force_opt ::= */
   -1,  /* (58) force_opt ::= FORCE */
   -3,  /* (59) cmd ::= ALTER LOCAL NK_STRING */
   -4,  /* (60) cmd ::= ALTER LOCAL NK_STRING NK_STRING */
   -5,  /* (61) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */
   -5,  /* (62) cmd ::= DROP QNODE ON DNODE NK_INTEGER */
   -5,  /* (63) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */
   -5,  /* (64) cmd ::= DROP BNODE ON DNODE NK_INTEGER */
   -5,  /* (65) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */
   -5,  /* (66) cmd ::= DROP SNODE ON DNODE NK_INTEGER */
   -5,  /* (67) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */
   -5,  /* (68) cmd ::= DROP MNODE ON DNODE NK_INTEGER */
   -5,  /* (69) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
   -4,  /* (70) cmd ::= DROP DATABASE exists_opt db_name */
   -2,  /* (71) cmd ::= USE db_name */
   -4,  /* (72) cmd ::= ALTER DATABASE db_name alter_db_options */
   -3,  /* (73) cmd ::= FLUSH DATABASE db_name */
   -4,  /* (74) cmd ::= TRIM DATABASE db_name speed_opt */
   -5,  /* (75) cmd ::= COMPACT DATABASE db_name start_opt end_opt */
   -3,  /* (76) not_exists_opt ::= IF NOT EXISTS */
    0,  /* (77) not_exists_opt ::= */
   -2,  /* (78) exists_opt ::= IF EXISTS */
    0,  /* (79) exists_opt ::= */
    0,  /* (80) db_options ::= */
   -3,  /* (81) db_options ::= db_options BUFFER NK_INTEGER */
   -3,  /* (82) db_options ::= db_options CACHEMODEL NK_STRING */
   -3,  /* (83) db_options ::= db_options CACHESIZE NK_INTEGER */
   -3,  /* (84) db_options ::= db_options COMP NK_INTEGER */
   -3,  /* (85) db_options ::= db_options DURATION NK_INTEGER */
   -3,  /* (86) db_options ::= db_options DURATION NK_VARIABLE */
   -3,  /* (87) db_options ::= db_options MAXROWS NK_INTEGER */
   -3,  /* (88) db_options ::= db_options MINROWS NK_INTEGER */
   -3,  /* (89) db_options ::= db_options KEEP integer_list */
   -3,  /* (90) db_options ::= db_options KEEP variable_list */
   -3,  /* (91) db_options ::= db_options PAGES NK_INTEGER */
   -3,  /* (92) db_options ::= db_options PAGESIZE NK_INTEGER */
   -3,  /* (93) db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */
   -3,  /* (94) db_options ::= db_options PRECISION NK_STRING */
   -3,  /* (95) db_options ::= db_options REPLICA NK_INTEGER */
   -3,  /* (96) db_options ::= db_options VGROUPS NK_INTEGER */
   -3,  /* (97) db_options ::= db_options SINGLE_STABLE NK_INTEGER */
   -3,  /* (98) db_options ::= db_options RETENTIONS retention_list */
   -3,  /* (99) db_options ::= db_options SCHEMALESS NK_INTEGER */
   -3,  /* (100) db_options ::= db_options WAL_LEVEL NK_INTEGER */
   -3,  /* (101) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */
   -3,  /* (102) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */
   -4,  /* (103) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */
   -3,  /* (104) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */
   -4,  /* (105) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */
   -3,  /* (106) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */
   -3,  /* (107) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */
   -3,  /* (108) db_options ::= db_options STT_TRIGGER NK_INTEGER */
   -3,  /* (109) db_options ::= db_options TABLE_PREFIX signed */
   -3,  /* (110) db_options ::= db_options TABLE_SUFFIX signed */
   -1,  /* (111) alter_db_options ::= alter_db_option */
   -2,  /* (112) alter_db_options ::= alter_db_options alter_db_option */
   -2,  /* (113) alter_db_option ::= BUFFER NK_INTEGER */
   -2,  /* (114) alter_db_option ::= CACHEMODEL NK_STRING */
   -2,  /* (115) alter_db_option ::= CACHESIZE NK_INTEGER */
   -2,  /* (116) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */
   -2,  /* (117) alter_db_option ::= KEEP integer_list */
   -2,  /* (118) alter_db_option ::= KEEP variable_list */
   -2,  /* (119) alter_db_option ::= PAGES NK_INTEGER */
   -2,  /* (120) alter_db_option ::= REPLICA NK_INTEGER */
   -2,  /* (121) alter_db_option ::= WAL_LEVEL NK_INTEGER */
   -2,  /* (122) alter_db_option ::= STT_TRIGGER NK_INTEGER */
   -2,  /* (123) alter_db_option ::= MINROWS NK_INTEGER */
   -2,  /* (124) alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */
   -3,  /* (125) alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */
   -2,  /* (126) alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */
   -3,  /* (127) alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */
   -1,  /* (128) integer_list ::= NK_INTEGER */
   -3,  /* (129) integer_list ::= integer_list NK_COMMA NK_INTEGER */
   -1,  /* (130) variable_list ::= NK_VARIABLE */
   -3,  /* (131) variable_list ::= variable_list NK_COMMA NK_VARIABLE */
   -1,  /* (132) retention_list ::= retention */
   -3,  /* (133) retention_list ::= retention_list NK_COMMA retention */
   -3,  /* (134) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */
    0,  /* (135) speed_opt ::= */
   -2,  /* (136) speed_opt ::= MAX_SPEED NK_INTEGER */
    0,  /* (137) start_opt ::= */
   -3,  /* (138) start_opt ::= START WITH NK_INTEGER */
   -3,  /* (139) start_opt ::= START WITH NK_STRING */
   -4,  /* (140) start_opt ::= START WITH TIMESTAMP NK_STRING */
    0,  /* (141) end_opt ::= */
   -3,  /* (142) end_opt ::= END WITH NK_INTEGER */
   -3,  /* (143) end_opt ::= END WITH NK_STRING */
   -4,  /* (144) end_opt ::= END WITH TIMESTAMP NK_STRING */
   -9,  /* (145) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */
   -3,  /* (146) cmd ::= CREATE TABLE multi_create_clause */
   -9,  /* (147) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */
   -3,  /* (148) cmd ::= DROP TABLE multi_drop_clause */
   -4,  /* (149) cmd ::= DROP STABLE exists_opt full_table_name */
   -3,  /* (150) cmd ::= ALTER TABLE alter_table_clause */
   -3,  /* (151) cmd ::= ALTER STABLE alter_table_clause */
   -2,  /* (152) alter_table_clause ::= full_table_name alter_table_options */
   -5,  /* (153) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */
   -4,  /* (154) alter_table_clause ::= full_table_name DROP COLUMN column_name */
   -5,  /* (155) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */
   -5,  /* (156) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */
   -5,  /* (157) alter_table_clause ::= full_table_name ADD TAG column_name type_name */
   -4,  /* (158) alter_table_clause ::= full_table_name DROP TAG column_name */
   -5,  /* (159) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */
   -5,  /* (160) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */
   -6,  /* (161) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */
   -1,  /* (162) multi_create_clause ::= create_subtable_clause */
   -2,  /* (163) multi_create_clause ::= multi_create_clause create_subtable_clause */
  -10,  /* (164) 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 */
   -1,  /* (165) multi_drop_clause ::= drop_table_clause */
   -3,  /* (166) multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */
   -2,  /* (167) drop_table_clause ::= exists_opt full_table_name */
    0,  /* (168) specific_cols_opt ::= */
   -3,  /* (169) specific_cols_opt ::= NK_LP col_name_list NK_RP */
   -1,  /* (170) full_table_name ::= table_name */
   -3,  /* (171) full_table_name ::= db_name NK_DOT table_name */
   -1,  /* (172) column_def_list ::= column_def */
   -3,  /* (173) column_def_list ::= column_def_list NK_COMMA column_def */
   -2,  /* (174) column_def ::= column_name type_name */
   -1,  /* (175) type_name ::= BOOL */
   -1,  /* (176) type_name ::= TINYINT */
   -1,  /* (177) type_name ::= SMALLINT */
   -1,  /* (178) type_name ::= INT */
   -1,  /* (179) type_name ::= INTEGER */
   -1,  /* (180) type_name ::= BIGINT */
   -1,  /* (181) type_name ::= FLOAT */
   -1,  /* (182) type_name ::= DOUBLE */
   -4,  /* (183) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
   -1,  /* (184) type_name ::= TIMESTAMP */
   -4,  /* (185) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
   -2,  /* (186) type_name ::= TINYINT UNSIGNED */
   -2,  /* (187) type_name ::= SMALLINT UNSIGNED */
   -2,  /* (188) type_name ::= INT UNSIGNED */
   -2,  /* (189) type_name ::= BIGINT UNSIGNED */
   -1,  /* (190) type_name ::= JSON */
   -4,  /* (191) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
   -1,  /* (192) type_name ::= MEDIUMBLOB */
   -1,  /* (193) type_name ::= BLOB */
   -4,  /* (194) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
   -1,  /* (195) type_name ::= DECIMAL */
   -4,  /* (196) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
   -6,  /* (197) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
    0,  /* (198) tags_def_opt ::= */
   -1,  /* (199) tags_def_opt ::= tags_def */
   -4,  /* (200) tags_def ::= TAGS NK_LP column_def_list NK_RP */
    0,  /* (201) table_options ::= */
   -3,  /* (202) table_options ::= table_options COMMENT NK_STRING */
   -3,  /* (203) table_options ::= table_options MAX_DELAY duration_list */
   -3,  /* (204) table_options ::= table_options WATERMARK duration_list */
   -5,  /* (205) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */
   -3,  /* (206) table_options ::= table_options TTL NK_INTEGER */
   -5,  /* (207) table_options ::= table_options SMA NK_LP col_name_list NK_RP */
   -3,  /* (208) table_options ::= table_options DELETE_MARK duration_list */
   -1,  /* (209) alter_table_options ::= alter_table_option */
   -2,  /* (210) alter_table_options ::= alter_table_options alter_table_option */
   -2,  /* (211) alter_table_option ::= COMMENT NK_STRING */
   -2,  /* (212) alter_table_option ::= TTL NK_INTEGER */
   -1,  /* (213) duration_list ::= duration_literal */
   -3,  /* (214) duration_list ::= duration_list NK_COMMA duration_literal */
   -1,  /* (215) rollup_func_list ::= rollup_func_name */
   -3,  /* (216) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */
   -1,  /* (217) rollup_func_name ::= function_name */
   -1,  /* (218) rollup_func_name ::= FIRST */
   -1,  /* (219) rollup_func_name ::= LAST */
   -1,  /* (220) col_name_list ::= col_name */
   -3,  /* (221) col_name_list ::= col_name_list NK_COMMA col_name */
   -1,  /* (222) col_name ::= column_name */
   -2,  /* (223) cmd ::= SHOW DNODES */
   -2,  /* (224) cmd ::= SHOW USERS */
   -3,  /* (225) cmd ::= SHOW USER PRIVILEGES */
   -2,  /* (226) cmd ::= SHOW DATABASES */
   -4,  /* (227) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */
   -4,  /* (228) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */
   -3,  /* (229) cmd ::= SHOW db_name_cond_opt VGROUPS */
   -2,  /* (230) cmd ::= SHOW MNODES */
   -2,  /* (231) cmd ::= SHOW QNODES */
   -2,  /* (232) cmd ::= SHOW FUNCTIONS */
   -5,  /* (233) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */
   -2,  /* (234) cmd ::= SHOW STREAMS */
   -2,  /* (235) cmd ::= SHOW ACCOUNTS */
   -2,  /* (236) cmd ::= SHOW APPS */
   -2,  /* (237) cmd ::= SHOW CONNECTIONS */
   -2,  /* (238) cmd ::= SHOW LICENCES */
   -2,  /* (239) cmd ::= SHOW GRANTS */
   -4,  /* (240) cmd ::= SHOW CREATE DATABASE db_name */
   -4,  /* (241) cmd ::= SHOW CREATE TABLE full_table_name */
   -4,  /* (242) cmd ::= SHOW CREATE STABLE full_table_name */
   -2,  /* (243) cmd ::= SHOW QUERIES */
   -2,  /* (244) cmd ::= SHOW SCORES */
   -2,  /* (245) cmd ::= SHOW TOPICS */
   -2,  /* (246) cmd ::= SHOW VARIABLES */
   -3,  /* (247) cmd ::= SHOW CLUSTER VARIABLES */
   -3,  /* (248) cmd ::= SHOW LOCAL VARIABLES */
   -5,  /* (249) cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */
   -2,  /* (250) cmd ::= SHOW BNODES */
   -2,  /* (251) cmd ::= SHOW SNODES */
   -2,  /* (252) cmd ::= SHOW CLUSTER */
   -2,  /* (253) cmd ::= SHOW TRANSACTIONS */
   -4,  /* (254) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */
   -2,  /* (255) cmd ::= SHOW CONSUMERS */
   -2,  /* (256) cmd ::= SHOW SUBSCRIPTIONS */
   -5,  /* (257) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */
   -7,  /* (258) cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */
   -3,  /* (259) cmd ::= SHOW VNODES NK_INTEGER */
   -3,  /* (260) cmd ::= SHOW VNODES NK_STRING */
   -3,  /* (261) cmd ::= SHOW db_name_cond_opt ALIVE */
   -3,  /* (262) cmd ::= SHOW CLUSTER ALIVE */
    0,  /* (263) db_name_cond_opt ::= */
   -2,  /* (264) db_name_cond_opt ::= db_name NK_DOT */
    0,  /* (265) like_pattern_opt ::= */
   -2,  /* (266) like_pattern_opt ::= LIKE NK_STRING */
   -1,  /* (267) table_name_cond ::= table_name */
    0,  /* (268) from_db_opt ::= */
   -2,  /* (269) from_db_opt ::= FROM db_name */
    0,  /* (270) tag_list_opt ::= */
   -1,  /* (271) tag_list_opt ::= tag_item */
   -3,  /* (272) tag_list_opt ::= tag_list_opt NK_COMMA tag_item */
   -1,  /* (273) tag_item ::= TBNAME */
   -1,  /* (274) tag_item ::= QTAGS */
   -1,  /* (275) tag_item ::= column_name */
   -2,  /* (276) tag_item ::= column_name column_alias */
   -3,  /* (277) tag_item ::= column_name AS column_alias */
   -8,  /* (278) cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */
   -9,  /* (279) cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */
   -4,  /* (280) cmd ::= DROP INDEX exists_opt full_index_name */
   -1,  /* (281) full_index_name ::= index_name */
   -3,  /* (282) full_index_name ::= db_name NK_DOT index_name */
  -10,  /* (283) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */
  -12,  /* (284) 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 */
   -1,  /* (285) func_list ::= func */
   -3,  /* (286) func_list ::= func_list NK_COMMA func */
   -4,  /* (287) func ::= sma_func_name NK_LP expression_list NK_RP */
   -1,  /* (288) sma_func_name ::= function_name */
   -1,  /* (289) sma_func_name ::= COUNT */
   -1,  /* (290) sma_func_name ::= FIRST */
   -1,  /* (291) sma_func_name ::= LAST */
   -1,  /* (292) sma_func_name ::= LAST_ROW */
    0,  /* (293) sma_stream_opt ::= */
   -3,  /* (294) sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */
   -3,  /* (295) sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */
   -3,  /* (296) sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */
   -6,  /* (297) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */
   -7,  /* (298) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */
   -9,  /* (299) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */
4046 4047
   -8,  /* (300) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name where_clause_opt */
  -10,  /* (301) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name where_clause_opt */
4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328
   -4,  /* (302) cmd ::= DROP TOPIC exists_opt topic_name */
   -7,  /* (303) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */
   -2,  /* (304) cmd ::= DESC full_table_name */
   -2,  /* (305) cmd ::= DESCRIBE full_table_name */
   -3,  /* (306) cmd ::= RESET QUERY CACHE */
   -4,  /* (307) cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */
   -4,  /* (308) cmd ::= EXPLAIN analyze_opt explain_options insert_query */
    0,  /* (309) analyze_opt ::= */
   -1,  /* (310) analyze_opt ::= ANALYZE */
    0,  /* (311) explain_options ::= */
   -3,  /* (312) explain_options ::= explain_options VERBOSE NK_BOOL */
   -3,  /* (313) explain_options ::= explain_options RATIO NK_FLOAT */
  -12,  /* (314) cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */
   -4,  /* (315) cmd ::= DROP FUNCTION exists_opt function_name */
    0,  /* (316) agg_func_opt ::= */
   -1,  /* (317) agg_func_opt ::= AGGREGATE */
    0,  /* (318) bufsize_opt ::= */
   -2,  /* (319) bufsize_opt ::= BUFSIZE NK_INTEGER */
    0,  /* (320) language_opt ::= */
   -2,  /* (321) language_opt ::= LANGUAGE NK_STRING */
    0,  /* (322) or_replace_opt ::= */
   -2,  /* (323) or_replace_opt ::= OR REPLACE */
  -12,  /* (324) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */
   -4,  /* (325) cmd ::= DROP STREAM exists_opt stream_name */
    0,  /* (326) col_list_opt ::= */
   -3,  /* (327) col_list_opt ::= NK_LP col_name_list NK_RP */
    0,  /* (328) tag_def_or_ref_opt ::= */
   -1,  /* (329) tag_def_or_ref_opt ::= tags_def */
   -4,  /* (330) tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */
    0,  /* (331) stream_options ::= */
   -3,  /* (332) stream_options ::= stream_options TRIGGER AT_ONCE */
   -3,  /* (333) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */
   -4,  /* (334) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
   -3,  /* (335) stream_options ::= stream_options WATERMARK duration_literal */
   -4,  /* (336) stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */
   -3,  /* (337) stream_options ::= stream_options FILL_HISTORY NK_INTEGER */
   -3,  /* (338) stream_options ::= stream_options DELETE_MARK duration_literal */
   -4,  /* (339) stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */
    0,  /* (340) subtable_opt ::= */
   -4,  /* (341) subtable_opt ::= SUBTABLE NK_LP expression NK_RP */
   -3,  /* (342) cmd ::= KILL CONNECTION NK_INTEGER */
   -3,  /* (343) cmd ::= KILL QUERY NK_STRING */
   -3,  /* (344) cmd ::= KILL TRANSACTION NK_INTEGER */
   -2,  /* (345) cmd ::= BALANCE VGROUP */
   -3,  /* (346) cmd ::= BALANCE VGROUP LEADER */
   -4,  /* (347) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */
   -4,  /* (348) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */
   -3,  /* (349) cmd ::= SPLIT VGROUP NK_INTEGER */
   -2,  /* (350) dnode_list ::= DNODE NK_INTEGER */
   -3,  /* (351) dnode_list ::= dnode_list DNODE NK_INTEGER */
   -4,  /* (352) cmd ::= DELETE FROM full_table_name where_clause_opt */
   -1,  /* (353) cmd ::= query_or_subquery */
   -1,  /* (354) cmd ::= insert_query */
   -7,  /* (355) insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */
   -4,  /* (356) insert_query ::= INSERT INTO full_table_name query_or_subquery */
   -1,  /* (357) literal ::= NK_INTEGER */
   -1,  /* (358) literal ::= NK_FLOAT */
   -1,  /* (359) literal ::= NK_STRING */
   -1,  /* (360) literal ::= NK_BOOL */
   -2,  /* (361) literal ::= TIMESTAMP NK_STRING */
   -1,  /* (362) literal ::= duration_literal */
   -1,  /* (363) literal ::= NULL */
   -1,  /* (364) literal ::= NK_QUESTION */
   -1,  /* (365) duration_literal ::= NK_VARIABLE */
   -1,  /* (366) signed ::= NK_INTEGER */
   -2,  /* (367) signed ::= NK_PLUS NK_INTEGER */
   -2,  /* (368) signed ::= NK_MINUS NK_INTEGER */
   -1,  /* (369) signed ::= NK_FLOAT */
   -2,  /* (370) signed ::= NK_PLUS NK_FLOAT */
   -2,  /* (371) signed ::= NK_MINUS NK_FLOAT */
   -1,  /* (372) signed_literal ::= signed */
   -1,  /* (373) signed_literal ::= NK_STRING */
   -1,  /* (374) signed_literal ::= NK_BOOL */
   -2,  /* (375) signed_literal ::= TIMESTAMP NK_STRING */
   -1,  /* (376) signed_literal ::= duration_literal */
   -1,  /* (377) signed_literal ::= NULL */
   -1,  /* (378) signed_literal ::= literal_func */
   -1,  /* (379) signed_literal ::= NK_QUESTION */
   -1,  /* (380) literal_list ::= signed_literal */
   -3,  /* (381) literal_list ::= literal_list NK_COMMA signed_literal */
   -1,  /* (382) db_name ::= NK_ID */
   -1,  /* (383) table_name ::= NK_ID */
   -1,  /* (384) column_name ::= NK_ID */
   -1,  /* (385) function_name ::= NK_ID */
   -1,  /* (386) table_alias ::= NK_ID */
   -1,  /* (387) column_alias ::= NK_ID */
   -1,  /* (388) user_name ::= NK_ID */
   -1,  /* (389) topic_name ::= NK_ID */
   -1,  /* (390) stream_name ::= NK_ID */
   -1,  /* (391) cgroup_name ::= NK_ID */
   -1,  /* (392) index_name ::= NK_ID */
   -1,  /* (393) expr_or_subquery ::= expression */
   -1,  /* (394) expression ::= literal */
   -1,  /* (395) expression ::= pseudo_column */
   -1,  /* (396) expression ::= column_reference */
   -1,  /* (397) expression ::= function_expression */
   -1,  /* (398) expression ::= case_when_expression */
   -3,  /* (399) expression ::= NK_LP expression NK_RP */
   -2,  /* (400) expression ::= NK_PLUS expr_or_subquery */
   -2,  /* (401) expression ::= NK_MINUS expr_or_subquery */
   -3,  /* (402) expression ::= expr_or_subquery NK_PLUS expr_or_subquery */
   -3,  /* (403) expression ::= expr_or_subquery NK_MINUS expr_or_subquery */
   -3,  /* (404) expression ::= expr_or_subquery NK_STAR expr_or_subquery */
   -3,  /* (405) expression ::= expr_or_subquery NK_SLASH expr_or_subquery */
   -3,  /* (406) expression ::= expr_or_subquery NK_REM expr_or_subquery */
   -3,  /* (407) expression ::= column_reference NK_ARROW NK_STRING */
   -3,  /* (408) expression ::= expr_or_subquery NK_BITAND expr_or_subquery */
   -3,  /* (409) expression ::= expr_or_subquery NK_BITOR expr_or_subquery */
   -1,  /* (410) expression_list ::= expr_or_subquery */
   -3,  /* (411) expression_list ::= expression_list NK_COMMA expr_or_subquery */
   -1,  /* (412) column_reference ::= column_name */
   -3,  /* (413) column_reference ::= table_name NK_DOT column_name */
   -1,  /* (414) pseudo_column ::= ROWTS */
   -1,  /* (415) pseudo_column ::= TBNAME */
   -3,  /* (416) pseudo_column ::= table_name NK_DOT TBNAME */
   -1,  /* (417) pseudo_column ::= QSTART */
   -1,  /* (418) pseudo_column ::= QEND */
   -1,  /* (419) pseudo_column ::= QDURATION */
   -1,  /* (420) pseudo_column ::= WSTART */
   -1,  /* (421) pseudo_column ::= WEND */
   -1,  /* (422) pseudo_column ::= WDURATION */
   -1,  /* (423) pseudo_column ::= IROWTS */
   -1,  /* (424) pseudo_column ::= ISFILLED */
   -1,  /* (425) pseudo_column ::= QTAGS */
   -4,  /* (426) function_expression ::= function_name NK_LP expression_list NK_RP */
   -4,  /* (427) function_expression ::= star_func NK_LP star_func_para_list NK_RP */
   -6,  /* (428) function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */
   -1,  /* (429) function_expression ::= literal_func */
   -3,  /* (430) literal_func ::= noarg_func NK_LP NK_RP */
   -1,  /* (431) literal_func ::= NOW */
   -1,  /* (432) noarg_func ::= NOW */
   -1,  /* (433) noarg_func ::= TODAY */
   -1,  /* (434) noarg_func ::= TIMEZONE */
   -1,  /* (435) noarg_func ::= DATABASE */
   -1,  /* (436) noarg_func ::= CLIENT_VERSION */
   -1,  /* (437) noarg_func ::= SERVER_VERSION */
   -1,  /* (438) noarg_func ::= SERVER_STATUS */
   -1,  /* (439) noarg_func ::= CURRENT_USER */
   -1,  /* (440) noarg_func ::= USER */
   -1,  /* (441) star_func ::= COUNT */
   -1,  /* (442) star_func ::= FIRST */
   -1,  /* (443) star_func ::= LAST */
   -1,  /* (444) star_func ::= LAST_ROW */
   -1,  /* (445) star_func_para_list ::= NK_STAR */
   -1,  /* (446) star_func_para_list ::= other_para_list */
   -1,  /* (447) other_para_list ::= star_func_para */
   -3,  /* (448) other_para_list ::= other_para_list NK_COMMA star_func_para */
   -1,  /* (449) star_func_para ::= expr_or_subquery */
   -3,  /* (450) star_func_para ::= table_name NK_DOT NK_STAR */
   -4,  /* (451) case_when_expression ::= CASE when_then_list case_when_else_opt END */
   -5,  /* (452) case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */
   -1,  /* (453) when_then_list ::= when_then_expr */
   -2,  /* (454) when_then_list ::= when_then_list when_then_expr */
   -4,  /* (455) when_then_expr ::= WHEN common_expression THEN common_expression */
    0,  /* (456) case_when_else_opt ::= */
   -2,  /* (457) case_when_else_opt ::= ELSE common_expression */
   -3,  /* (458) predicate ::= expr_or_subquery compare_op expr_or_subquery */
   -5,  /* (459) predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */
   -6,  /* (460) predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */
   -3,  /* (461) predicate ::= expr_or_subquery IS NULL */
   -4,  /* (462) predicate ::= expr_or_subquery IS NOT NULL */
   -3,  /* (463) predicate ::= expr_or_subquery in_op in_predicate_value */
   -1,  /* (464) compare_op ::= NK_LT */
   -1,  /* (465) compare_op ::= NK_GT */
   -1,  /* (466) compare_op ::= NK_LE */
   -1,  /* (467) compare_op ::= NK_GE */
   -1,  /* (468) compare_op ::= NK_NE */
   -1,  /* (469) compare_op ::= NK_EQ */
   -1,  /* (470) compare_op ::= LIKE */
   -2,  /* (471) compare_op ::= NOT LIKE */
   -1,  /* (472) compare_op ::= MATCH */
   -1,  /* (473) compare_op ::= NMATCH */
   -1,  /* (474) compare_op ::= CONTAINS */
   -1,  /* (475) in_op ::= IN */
   -2,  /* (476) in_op ::= NOT IN */
   -3,  /* (477) in_predicate_value ::= NK_LP literal_list NK_RP */
   -1,  /* (478) boolean_value_expression ::= boolean_primary */
   -2,  /* (479) boolean_value_expression ::= NOT boolean_primary */
   -3,  /* (480) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
   -3,  /* (481) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
   -1,  /* (482) boolean_primary ::= predicate */
   -3,  /* (483) boolean_primary ::= NK_LP boolean_value_expression NK_RP */
   -1,  /* (484) common_expression ::= expr_or_subquery */
   -1,  /* (485) common_expression ::= boolean_value_expression */
    0,  /* (486) from_clause_opt ::= */
   -2,  /* (487) from_clause_opt ::= FROM table_reference_list */
   -1,  /* (488) table_reference_list ::= table_reference */
   -3,  /* (489) table_reference_list ::= table_reference_list NK_COMMA table_reference */
   -1,  /* (490) table_reference ::= table_primary */
   -1,  /* (491) table_reference ::= joined_table */
   -2,  /* (492) table_primary ::= table_name alias_opt */
   -4,  /* (493) table_primary ::= db_name NK_DOT table_name alias_opt */
   -2,  /* (494) table_primary ::= subquery alias_opt */
   -1,  /* (495) table_primary ::= parenthesized_joined_table */
    0,  /* (496) alias_opt ::= */
   -1,  /* (497) alias_opt ::= table_alias */
   -2,  /* (498) alias_opt ::= AS table_alias */
   -3,  /* (499) parenthesized_joined_table ::= NK_LP joined_table NK_RP */
   -3,  /* (500) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */
   -6,  /* (501) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
    0,  /* (502) join_type ::= */
   -1,  /* (503) join_type ::= INNER */
  -12,  /* (504) 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 */
    0,  /* (505) set_quantifier_opt ::= */
   -1,  /* (506) set_quantifier_opt ::= DISTINCT */
   -1,  /* (507) set_quantifier_opt ::= ALL */
   -1,  /* (508) select_list ::= select_item */
   -3,  /* (509) select_list ::= select_list NK_COMMA select_item */
   -1,  /* (510) select_item ::= NK_STAR */
   -1,  /* (511) select_item ::= common_expression */
   -2,  /* (512) select_item ::= common_expression column_alias */
   -3,  /* (513) select_item ::= common_expression AS column_alias */
   -3,  /* (514) select_item ::= table_name NK_DOT NK_STAR */
    0,  /* (515) where_clause_opt ::= */
   -2,  /* (516) where_clause_opt ::= WHERE search_condition */
    0,  /* (517) partition_by_clause_opt ::= */
   -3,  /* (518) partition_by_clause_opt ::= PARTITION BY partition_list */
   -1,  /* (519) partition_list ::= partition_item */
   -3,  /* (520) partition_list ::= partition_list NK_COMMA partition_item */
   -1,  /* (521) partition_item ::= expr_or_subquery */
   -2,  /* (522) partition_item ::= expr_or_subquery column_alias */
   -3,  /* (523) partition_item ::= expr_or_subquery AS column_alias */
    0,  /* (524) twindow_clause_opt ::= */
   -6,  /* (525) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
   -4,  /* (526) twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */
   -6,  /* (527) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
   -8,  /* (528) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
   -7,  /* (529) twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */
    0,  /* (530) sliding_opt ::= */
   -4,  /* (531) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
    0,  /* (532) fill_opt ::= */
   -4,  /* (533) fill_opt ::= FILL NK_LP fill_mode NK_RP */
   -6,  /* (534) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
   -6,  /* (535) fill_opt ::= FILL NK_LP VALUE_F NK_COMMA literal_list NK_RP */
   -1,  /* (536) fill_mode ::= NONE */
   -1,  /* (537) fill_mode ::= PREV */
   -1,  /* (538) fill_mode ::= NULL */
   -1,  /* (539) fill_mode ::= NULL_F */
   -1,  /* (540) fill_mode ::= LINEAR */
   -1,  /* (541) fill_mode ::= NEXT */
    0,  /* (542) group_by_clause_opt ::= */
   -3,  /* (543) group_by_clause_opt ::= GROUP BY group_by_list */
   -1,  /* (544) group_by_list ::= expr_or_subquery */
   -3,  /* (545) group_by_list ::= group_by_list NK_COMMA expr_or_subquery */
    0,  /* (546) having_clause_opt ::= */
   -2,  /* (547) having_clause_opt ::= HAVING search_condition */
    0,  /* (548) range_opt ::= */
   -6,  /* (549) range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */
    0,  /* (550) every_opt ::= */
   -4,  /* (551) every_opt ::= EVERY NK_LP duration_literal NK_RP */
   -4,  /* (552) query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */
   -1,  /* (553) query_simple ::= query_specification */
   -1,  /* (554) query_simple ::= union_query_expression */
   -4,  /* (555) union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */
   -3,  /* (556) union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */
   -1,  /* (557) query_simple_or_subquery ::= query_simple */
   -1,  /* (558) query_simple_or_subquery ::= subquery */
   -1,  /* (559) query_or_subquery ::= query_expression */
   -1,  /* (560) query_or_subquery ::= subquery */
    0,  /* (561) order_by_clause_opt ::= */
   -3,  /* (562) order_by_clause_opt ::= ORDER BY sort_specification_list */
    0,  /* (563) slimit_clause_opt ::= */
   -2,  /* (564) slimit_clause_opt ::= SLIMIT NK_INTEGER */
   -4,  /* (565) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
   -4,  /* (566) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
    0,  /* (567) limit_clause_opt ::= */
   -2,  /* (568) limit_clause_opt ::= LIMIT NK_INTEGER */
   -4,  /* (569) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */
   -4,  /* (570) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */
   -3,  /* (571) subquery ::= NK_LP query_expression NK_RP */
   -3,  /* (572) subquery ::= NK_LP subquery NK_RP */
   -1,  /* (573) search_condition ::= common_expression */
   -1,  /* (574) sort_specification_list ::= sort_specification */
   -3,  /* (575) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */
   -3,  /* (576) sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */
    0,  /* (577) ordering_specification_opt ::= */
   -1,  /* (578) ordering_specification_opt ::= ASC */
   -1,  /* (579) ordering_specification_opt ::= DESC */
    0,  /* (580) null_ordering_opt ::= */
   -2,  /* (581) null_ordering_opt ::= NULLS FIRST */
   -2,  /* (582) null_ordering_opt ::= NULLS LAST */
4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346
};

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 已提交
4347 4348
  ParseTOKENTYPE yyLookaheadToken  /* Value of the lookahead token */
  ParseCTX_PDECL                   /* %extra_context */
4349 4350 4351 4352 4353
){
  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 已提交
4354
  ParseARG_FETCH
4355 4356 4357
  (void)yyLookahead;
  (void)yyLookaheadToken;
  yymsp = yypParser->yytos;
X
Xiaoyu Wang 已提交
4358 4359
#ifndef NDEBUG
  if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){
4360
    yysize = yyRuleInfoNRhs[yyruleno];
X
Xiaoyu Wang 已提交
4361
    if( yysize ){
4362
      fprintf(yyTraceFILE, "%sReduce %d [%s]%s, pop back to state %d.\n",
X
Xiaoyu Wang 已提交
4363
        yyTracePrompt,
4364 4365 4366
        yyruleno, yyRuleName[yyruleno],
        yyruleno<YYNRULE_WITH_ACTION ? "" : " without external action",
        yymsp[yysize].stateno);
X
Xiaoyu Wang 已提交
4367
    }else{
4368 4369 4370
      fprintf(yyTraceFILE, "%sReduce %d [%s]%s.\n",
        yyTracePrompt, yyruleno, yyRuleName[yyruleno],
        yyruleno<YYNRULE_WITH_ACTION ? "" : " without external action");
X
Xiaoyu Wang 已提交
4371 4372 4373 4374 4375 4376 4377
    }
  }
#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 */
4378
  if( yyRuleInfoNRhs[yyruleno]==0 ){
X
Xiaoyu Wang 已提交
4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405
#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
  }
4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417

  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;
4418
      case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */
4419
{ pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); }
4420
  yy_destructor(yypParser,331,&yymsp[0].minor);
4421
        break;
4422
      case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */
4423
{ pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); }
4424
  yy_destructor(yypParser,332,&yymsp[0].minor);
4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437
        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);
4438
{  yy_destructor(yypParser,331,&yymsp[-2].minor);
4439
{ }
4440
  yy_destructor(yypParser,333,&yymsp[0].minor);
4441
}
4442
        break;
4443
      case 12: /* alter_account_options ::= alter_account_option */
4444
{  yy_destructor(yypParser,334,&yymsp[0].minor);
4445 4446 4447
{ }
}
        break;
4448
      case 13: /* alter_account_options ::= alter_account_options alter_account_option */
4449
{  yy_destructor(yypParser,332,&yymsp[-1].minor);
4450
{ }
4451
  yy_destructor(yypParser,334,&yymsp[0].minor);
4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463
}
        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);
4464
{ }
4465
  yy_destructor(yypParser,333,&yymsp[0].minor);
4466
        break;
X
Xiaoyu Wang 已提交
4467
      case 24: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */
X
Xiaoyu Wang 已提交
4468
{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy113, &yymsp[-1].minor.yy0, yymsp[0].minor.yy551); }
4469
        break;
4470
      case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */
X
Xiaoyu Wang 已提交
4471
{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy113, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); }
4472
        break;
X
Xiaoyu Wang 已提交
4473
      case 26: /* cmd ::= ALTER USER user_name ENABLE NK_INTEGER */
X
Xiaoyu Wang 已提交
4474
{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy113, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); }
4475
        break;
X
Xiaoyu Wang 已提交
4476
      case 27: /* cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */
X
Xiaoyu Wang 已提交
4477
{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy113, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); }
4478
        break;
X
Xiaoyu Wang 已提交
4479
      case 28: /* cmd ::= DROP USER user_name */
X
Xiaoyu Wang 已提交
4480
{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy113); }
4481
        break;
X
Xiaoyu Wang 已提交
4482
      case 29: /* sysinfo_opt ::= */
X
Xiaoyu Wang 已提交
4483
{ yymsp[1].minor.yy551 = 1; }
4484
        break;
X
Xiaoyu Wang 已提交
4485
      case 30: /* sysinfo_opt ::= SYSINFO NK_INTEGER */
X
Xiaoyu Wang 已提交
4486
{ yymsp[-1].minor.yy551 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); }
4487
        break;
X
Xiaoyu Wang 已提交
4488
      case 31: /* cmd ::= GRANT privileges ON priv_level with_opt TO user_name */
X
Xiaoyu Wang 已提交
4489
{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-5].minor.yy837, &yymsp[-3].minor.yy777, &yymsp[0].minor.yy113, yymsp[-2].minor.yy448); }
4490
        break;
X
Xiaoyu Wang 已提交
4491
      case 32: /* cmd ::= REVOKE privileges ON priv_level with_opt FROM user_name */
X
Xiaoyu Wang 已提交
4492
{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-5].minor.yy837, &yymsp[-3].minor.yy777, &yymsp[0].minor.yy113, yymsp[-2].minor.yy448); }
4493
        break;
X
Xiaoyu Wang 已提交
4494
      case 33: /* privileges ::= ALL */
X
Xiaoyu Wang 已提交
4495
{ yymsp[0].minor.yy837 = PRIVILEGE_TYPE_ALL; }
4496
        break;
X
Xiaoyu Wang 已提交
4497
      case 34: /* privileges ::= priv_type_list */
4498
      case 36: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==36);
X
Xiaoyu Wang 已提交
4499 4500
{ yylhsminor.yy837 = yymsp[0].minor.yy837; }
  yymsp[0].minor.yy837 = yylhsminor.yy837;
4501
        break;
4502
      case 35: /* privileges ::= SUBSCRIBE */
X
Xiaoyu Wang 已提交
4503
{ yymsp[0].minor.yy837 = PRIVILEGE_TYPE_SUBSCRIBE; }
4504
        break;
4505
      case 37: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */
X
Xiaoyu Wang 已提交
4506 4507
{ yylhsminor.yy837 = yymsp[-2].minor.yy837 | yymsp[0].minor.yy837; }
  yymsp[-2].minor.yy837 = yylhsminor.yy837;
4508
        break;
4509
      case 38: /* priv_type ::= READ */
X
Xiaoyu Wang 已提交
4510
{ yymsp[0].minor.yy837 = PRIVILEGE_TYPE_READ; }
4511
        break;
4512
      case 39: /* priv_type ::= WRITE */
X
Xiaoyu Wang 已提交
4513
{ yymsp[0].minor.yy837 = PRIVILEGE_TYPE_WRITE; }
4514
        break;
4515
      case 40: /* priv_level ::= NK_STAR NK_DOT NK_STAR */
X
Xiaoyu Wang 已提交
4516 4517
{ yylhsminor.yy777.first = yymsp[-2].minor.yy0; yylhsminor.yy777.second = yymsp[0].minor.yy0; }
  yymsp[-2].minor.yy777 = yylhsminor.yy777;
X
Xiaoyu Wang 已提交
4518
        break;
4519
      case 41: /* priv_level ::= db_name NK_DOT NK_STAR */
X
Xiaoyu Wang 已提交
4520 4521
{ yylhsminor.yy777.first = yymsp[-2].minor.yy113; yylhsminor.yy777.second = yymsp[0].minor.yy0; }
  yymsp[-2].minor.yy777 = yylhsminor.yy777;
X
Xiaoyu Wang 已提交
4522 4523
        break;
      case 42: /* priv_level ::= db_name NK_DOT table_name */
X
Xiaoyu Wang 已提交
4524 4525
{ yylhsminor.yy777.first = yymsp[-2].minor.yy113; yylhsminor.yy777.second = yymsp[0].minor.yy113; }
  yymsp[-2].minor.yy777 = yylhsminor.yy777;
X
Xiaoyu Wang 已提交
4526 4527
        break;
      case 43: /* priv_level ::= topic_name */
X
Xiaoyu Wang 已提交
4528 4529
{ yylhsminor.yy777.first = yymsp[0].minor.yy113; yylhsminor.yy777.second = nil_token; }
  yymsp[0].minor.yy777 = yylhsminor.yy777;
X
Xiaoyu Wang 已提交
4530 4531
        break;
      case 44: /* with_opt ::= */
X
Xiaoyu Wang 已提交
4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547
      case 137: /* start_opt ::= */ yytestcase(yyruleno==137);
      case 141: /* end_opt ::= */ yytestcase(yyruleno==141);
      case 265: /* like_pattern_opt ::= */ yytestcase(yyruleno==265);
      case 340: /* subtable_opt ::= */ yytestcase(yyruleno==340);
      case 456: /* case_when_else_opt ::= */ yytestcase(yyruleno==456);
      case 486: /* from_clause_opt ::= */ yytestcase(yyruleno==486);
      case 515: /* where_clause_opt ::= */ yytestcase(yyruleno==515);
      case 524: /* twindow_clause_opt ::= */ yytestcase(yyruleno==524);
      case 530: /* sliding_opt ::= */ yytestcase(yyruleno==530);
      case 532: /* fill_opt ::= */ yytestcase(yyruleno==532);
      case 546: /* having_clause_opt ::= */ yytestcase(yyruleno==546);
      case 548: /* range_opt ::= */ yytestcase(yyruleno==548);
      case 550: /* every_opt ::= */ yytestcase(yyruleno==550);
      case 563: /* slimit_clause_opt ::= */ yytestcase(yyruleno==563);
      case 567: /* limit_clause_opt ::= */ yytestcase(yyruleno==567);
{ yymsp[1].minor.yy448 = NULL; }
X
Xiaoyu Wang 已提交
4548 4549
        break;
      case 45: /* with_opt ::= WITH search_condition */
X
Xiaoyu Wang 已提交
4550 4551 4552 4553
      case 487: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==487);
      case 516: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==516);
      case 547: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==547);
{ yymsp[-1].minor.yy448 = yymsp[0].minor.yy448; }
X
Xiaoyu Wang 已提交
4554 4555
        break;
      case 46: /* cmd ::= CREATE DNODE dnode_endpoint */
X
Xiaoyu Wang 已提交
4556
{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy113, NULL); }
X
Xiaoyu Wang 已提交
4557 4558
        break;
      case 47: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */
X
Xiaoyu Wang 已提交
4559
{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy113, &yymsp[0].minor.yy0); }
X
Xiaoyu Wang 已提交
4560 4561
        break;
      case 48: /* cmd ::= DROP DNODE NK_INTEGER force_opt */
X
Xiaoyu Wang 已提交
4562
{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy369); }
X
Xiaoyu Wang 已提交
4563 4564
        break;
      case 49: /* cmd ::= DROP DNODE dnode_endpoint force_opt */
X
Xiaoyu Wang 已提交
4565
{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[-1].minor.yy113, yymsp[0].minor.yy369); }
X
Xiaoyu Wang 已提交
4566 4567
        break;
      case 50: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */
4568 4569
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); }
        break;
X
Xiaoyu Wang 已提交
4570
      case 51: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */
4571 4572
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-2].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
        break;
X
Xiaoyu Wang 已提交
4573
      case 52: /* cmd ::= ALTER ALL DNODES NK_STRING */
4574 4575
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[0].minor.yy0, NULL); }
        break;
X
Xiaoyu Wang 已提交
4576
      case 53: /* cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */
4577 4578
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
        break;
X
Xiaoyu Wang 已提交
4579 4580 4581
      case 54: /* dnode_endpoint ::= NK_STRING */
      case 55: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==55);
      case 56: /* dnode_endpoint ::= NK_IPTOKEN */ yytestcase(yyruleno==56);
X
Xiaoyu Wang 已提交
4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611
      case 289: /* sma_func_name ::= COUNT */ yytestcase(yyruleno==289);
      case 290: /* sma_func_name ::= FIRST */ yytestcase(yyruleno==290);
      case 291: /* sma_func_name ::= LAST */ yytestcase(yyruleno==291);
      case 292: /* sma_func_name ::= LAST_ROW */ yytestcase(yyruleno==292);
      case 382: /* db_name ::= NK_ID */ yytestcase(yyruleno==382);
      case 383: /* table_name ::= NK_ID */ yytestcase(yyruleno==383);
      case 384: /* column_name ::= NK_ID */ yytestcase(yyruleno==384);
      case 385: /* function_name ::= NK_ID */ yytestcase(yyruleno==385);
      case 386: /* table_alias ::= NK_ID */ yytestcase(yyruleno==386);
      case 387: /* column_alias ::= NK_ID */ yytestcase(yyruleno==387);
      case 388: /* user_name ::= NK_ID */ yytestcase(yyruleno==388);
      case 389: /* topic_name ::= NK_ID */ yytestcase(yyruleno==389);
      case 390: /* stream_name ::= NK_ID */ yytestcase(yyruleno==390);
      case 391: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==391);
      case 392: /* index_name ::= NK_ID */ yytestcase(yyruleno==392);
      case 432: /* noarg_func ::= NOW */ yytestcase(yyruleno==432);
      case 433: /* noarg_func ::= TODAY */ yytestcase(yyruleno==433);
      case 434: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==434);
      case 435: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==435);
      case 436: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==436);
      case 437: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==437);
      case 438: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==438);
      case 439: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==439);
      case 440: /* noarg_func ::= USER */ yytestcase(yyruleno==440);
      case 441: /* star_func ::= COUNT */ yytestcase(yyruleno==441);
      case 442: /* star_func ::= FIRST */ yytestcase(yyruleno==442);
      case 443: /* star_func ::= LAST */ yytestcase(yyruleno==443);
      case 444: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==444);
{ yylhsminor.yy113 = yymsp[0].minor.yy0; }
  yymsp[0].minor.yy113 = yylhsminor.yy113;
X
Xiaoyu Wang 已提交
4612 4613 4614 4615
        break;
      case 57: /* force_opt ::= */
      case 77: /* not_exists_opt ::= */ yytestcase(yyruleno==77);
      case 79: /* exists_opt ::= */ yytestcase(yyruleno==79);
X
Xiaoyu Wang 已提交
4616 4617 4618 4619 4620
      case 309: /* analyze_opt ::= */ yytestcase(yyruleno==309);
      case 316: /* agg_func_opt ::= */ yytestcase(yyruleno==316);
      case 322: /* or_replace_opt ::= */ yytestcase(yyruleno==322);
      case 505: /* set_quantifier_opt ::= */ yytestcase(yyruleno==505);
{ yymsp[1].minor.yy369 = false; }
X
Xiaoyu Wang 已提交
4621 4622
        break;
      case 58: /* force_opt ::= FORCE */
X
Xiaoyu Wang 已提交
4623 4624 4625 4626
      case 310: /* analyze_opt ::= ANALYZE */ yytestcase(yyruleno==310);
      case 317: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==317);
      case 506: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==506);
{ yymsp[0].minor.yy369 = true; }
X
Xiaoyu Wang 已提交
4627 4628
        break;
      case 59: /* cmd ::= ALTER LOCAL NK_STRING */
4629 4630
{ pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); }
        break;
X
Xiaoyu Wang 已提交
4631
      case 60: /* cmd ::= ALTER LOCAL NK_STRING NK_STRING */
4632 4633
{ pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
        break;
X
Xiaoyu Wang 已提交
4634
      case 61: /* cmd ::= CREATE QNODE ON DNODE NK_INTEGER */
4635
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_QNODE_STMT, &yymsp[0].minor.yy0); }
X
Xiaoyu Wang 已提交
4636
        break;
X
Xiaoyu Wang 已提交
4637
      case 62: /* cmd ::= DROP QNODE ON DNODE NK_INTEGER */
4638
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_QNODE_STMT, &yymsp[0].minor.yy0); }
4639
        break;
X
Xiaoyu Wang 已提交
4640
      case 63: /* cmd ::= CREATE BNODE ON DNODE NK_INTEGER */
4641
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_BNODE_STMT, &yymsp[0].minor.yy0); }
X
Xiaoyu Wang 已提交
4642
        break;
X
Xiaoyu Wang 已提交
4643
      case 64: /* cmd ::= DROP BNODE ON DNODE NK_INTEGER */
4644
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_BNODE_STMT, &yymsp[0].minor.yy0); }
X
Xiaoyu Wang 已提交
4645
        break;
X
Xiaoyu Wang 已提交
4646
      case 65: /* cmd ::= CREATE SNODE ON DNODE NK_INTEGER */
4647
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_SNODE_STMT, &yymsp[0].minor.yy0); }
4648
        break;
X
Xiaoyu Wang 已提交
4649
      case 66: /* cmd ::= DROP SNODE ON DNODE NK_INTEGER */
4650
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_SNODE_STMT, &yymsp[0].minor.yy0); }
4651
        break;
X
Xiaoyu Wang 已提交
4652
      case 67: /* cmd ::= CREATE MNODE ON DNODE NK_INTEGER */
4653
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_MNODE_STMT, &yymsp[0].minor.yy0); }
4654
        break;
X
Xiaoyu Wang 已提交
4655
      case 68: /* cmd ::= DROP MNODE ON DNODE NK_INTEGER */
4656
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); }
4657
        break;
X
Xiaoyu Wang 已提交
4658
      case 69: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
X
Xiaoyu Wang 已提交
4659
{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy369, &yymsp[-1].minor.yy113, yymsp[0].minor.yy448); }
4660
        break;
X
Xiaoyu Wang 已提交
4661
      case 70: /* cmd ::= DROP DATABASE exists_opt db_name */
X
Xiaoyu Wang 已提交
4662
{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy369, &yymsp[0].minor.yy113); }
4663
        break;
X
Xiaoyu Wang 已提交
4664
      case 71: /* cmd ::= USE db_name */
X
Xiaoyu Wang 已提交
4665
{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy113); }
4666
        break;
X
Xiaoyu Wang 已提交
4667
      case 72: /* cmd ::= ALTER DATABASE db_name alter_db_options */
X
Xiaoyu Wang 已提交
4668
{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy113, yymsp[0].minor.yy448); }
X
Xiaoyu Wang 已提交
4669
        break;
X
Xiaoyu Wang 已提交
4670
      case 73: /* cmd ::= FLUSH DATABASE db_name */
X
Xiaoyu Wang 已提交
4671
{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy113); }
X
Xiaoyu Wang 已提交
4672
        break;
X
Xiaoyu Wang 已提交
4673
      case 74: /* cmd ::= TRIM DATABASE db_name speed_opt */
X
Xiaoyu Wang 已提交
4674
{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[-1].minor.yy113, yymsp[0].minor.yy788); }
X
Xiaoyu Wang 已提交
4675
        break;
X
Xiaoyu Wang 已提交
4676
      case 75: /* cmd ::= COMPACT DATABASE db_name start_opt end_opt */
X
Xiaoyu Wang 已提交
4677
{ pCxt->pRootNode = createCompactStmt(pCxt, &yymsp[-2].minor.yy113, yymsp[-1].minor.yy448, yymsp[0].minor.yy448); }
X
Xiaoyu Wang 已提交
4678
        break;
X
Xiaoyu Wang 已提交
4679
      case 76: /* not_exists_opt ::= IF NOT EXISTS */
X
Xiaoyu Wang 已提交
4680
{ yymsp[-2].minor.yy369 = true; }
X
Xiaoyu Wang 已提交
4681
        break;
X
Xiaoyu Wang 已提交
4682
      case 78: /* exists_opt ::= IF EXISTS */
X
Xiaoyu Wang 已提交
4683 4684
      case 323: /* or_replace_opt ::= OR REPLACE */ yytestcase(yyruleno==323);
{ yymsp[-1].minor.yy369 = true; }
X
Xiaoyu Wang 已提交
4685
        break;
X
Xiaoyu Wang 已提交
4686
      case 80: /* db_options ::= */
X
Xiaoyu Wang 已提交
4687
{ yymsp[1].minor.yy448 = createDefaultDatabaseOptions(pCxt); }
X
Xiaoyu Wang 已提交
4688
        break;
X
Xiaoyu Wang 已提交
4689
      case 81: /* db_options ::= db_options BUFFER NK_INTEGER */
X
Xiaoyu Wang 已提交
4690 4691
{ yylhsminor.yy448 = setDatabaseOption(pCxt, yymsp[-2].minor.yy448, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
4692
        break;
X
Xiaoyu Wang 已提交
4693
      case 82: /* db_options ::= db_options CACHEMODEL NK_STRING */
X
Xiaoyu Wang 已提交
4694 4695
{ yylhsminor.yy448 = setDatabaseOption(pCxt, yymsp[-2].minor.yy448, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
4696
        break;
X
Xiaoyu Wang 已提交
4697
      case 83: /* db_options ::= db_options CACHESIZE NK_INTEGER */
X
Xiaoyu Wang 已提交
4698 4699
{ yylhsminor.yy448 = setDatabaseOption(pCxt, yymsp[-2].minor.yy448, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
4700
        break;
X
Xiaoyu Wang 已提交
4701
      case 84: /* db_options ::= db_options COMP NK_INTEGER */
X
Xiaoyu Wang 已提交
4702 4703
{ yylhsminor.yy448 = setDatabaseOption(pCxt, yymsp[-2].minor.yy448, DB_OPTION_COMP, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
X
Xiaoyu Wang 已提交
4704
        break;
X
Xiaoyu Wang 已提交
4705 4706
      case 85: /* db_options ::= db_options DURATION NK_INTEGER */
      case 86: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==86);
X
Xiaoyu Wang 已提交
4707 4708
{ yylhsminor.yy448 = setDatabaseOption(pCxt, yymsp[-2].minor.yy448, DB_OPTION_DAYS, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
4709
        break;
X
Xiaoyu Wang 已提交
4710
      case 87: /* db_options ::= db_options MAXROWS NK_INTEGER */
X
Xiaoyu Wang 已提交
4711 4712
{ yylhsminor.yy448 = setDatabaseOption(pCxt, yymsp[-2].minor.yy448, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
4713
        break;
X
Xiaoyu Wang 已提交
4714
      case 88: /* db_options ::= db_options MINROWS NK_INTEGER */
X
Xiaoyu Wang 已提交
4715 4716
{ yylhsminor.yy448 = setDatabaseOption(pCxt, yymsp[-2].minor.yy448, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
4717
        break;
X
Xiaoyu Wang 已提交
4718 4719
      case 89: /* db_options ::= db_options KEEP integer_list */
      case 90: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==90);
X
Xiaoyu Wang 已提交
4720 4721
{ yylhsminor.yy448 = setDatabaseOption(pCxt, yymsp[-2].minor.yy448, DB_OPTION_KEEP, yymsp[0].minor.yy432); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
4722
        break;
X
Xiaoyu Wang 已提交
4723
      case 91: /* db_options ::= db_options PAGES NK_INTEGER */
X
Xiaoyu Wang 已提交
4724 4725
{ yylhsminor.yy448 = setDatabaseOption(pCxt, yymsp[-2].minor.yy448, DB_OPTION_PAGES, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
X
Xiaoyu Wang 已提交
4726
        break;
X
Xiaoyu Wang 已提交
4727
      case 92: /* db_options ::= db_options PAGESIZE NK_INTEGER */
X
Xiaoyu Wang 已提交
4728 4729
{ yylhsminor.yy448 = setDatabaseOption(pCxt, yymsp[-2].minor.yy448, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
X
Xiaoyu Wang 已提交
4730
        break;
X
Xiaoyu Wang 已提交
4731
      case 93: /* db_options ::= db_options TSDB_PAGESIZE NK_INTEGER */
X
Xiaoyu Wang 已提交
4732 4733
{ yylhsminor.yy448 = setDatabaseOption(pCxt, yymsp[-2].minor.yy448, DB_OPTION_TSDB_PAGESIZE, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
4734
        break;
X
Xiaoyu Wang 已提交
4735
      case 94: /* db_options ::= db_options PRECISION NK_STRING */
X
Xiaoyu Wang 已提交
4736 4737
{ yylhsminor.yy448 = setDatabaseOption(pCxt, yymsp[-2].minor.yy448, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
X
Xiaoyu Wang 已提交
4738
        break;
X
Xiaoyu Wang 已提交
4739
      case 95: /* db_options ::= db_options REPLICA NK_INTEGER */
X
Xiaoyu Wang 已提交
4740 4741
{ yylhsminor.yy448 = setDatabaseOption(pCxt, yymsp[-2].minor.yy448, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
X
Xiaoyu Wang 已提交
4742
        break;
X
Xiaoyu Wang 已提交
4743
      case 96: /* db_options ::= db_options VGROUPS NK_INTEGER */
X
Xiaoyu Wang 已提交
4744 4745
{ yylhsminor.yy448 = setDatabaseOption(pCxt, yymsp[-2].minor.yy448, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
X
Xiaoyu Wang 已提交
4746
        break;
X
Xiaoyu Wang 已提交
4747
      case 97: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */
X
Xiaoyu Wang 已提交
4748 4749
{ yylhsminor.yy448 = setDatabaseOption(pCxt, yymsp[-2].minor.yy448, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
X
Xiaoyu Wang 已提交
4750
        break;
X
Xiaoyu Wang 已提交
4751
      case 98: /* db_options ::= db_options RETENTIONS retention_list */
X
Xiaoyu Wang 已提交
4752 4753
{ yylhsminor.yy448 = setDatabaseOption(pCxt, yymsp[-2].minor.yy448, DB_OPTION_RETENTIONS, yymsp[0].minor.yy432); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
X
Xiaoyu Wang 已提交
4754
        break;
X
Xiaoyu Wang 已提交
4755
      case 99: /* db_options ::= db_options SCHEMALESS NK_INTEGER */
X
Xiaoyu Wang 已提交
4756 4757
{ yylhsminor.yy448 = setDatabaseOption(pCxt, yymsp[-2].minor.yy448, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
X
Xiaoyu Wang 已提交
4758
        break;
X
Xiaoyu Wang 已提交
4759
      case 100: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */
X
Xiaoyu Wang 已提交
4760 4761
{ yylhsminor.yy448 = setDatabaseOption(pCxt, yymsp[-2].minor.yy448, DB_OPTION_WAL, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
X
Xiaoyu Wang 已提交
4762
        break;
X
Xiaoyu Wang 已提交
4763
      case 101: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */
X
Xiaoyu Wang 已提交
4764 4765
{ yylhsminor.yy448 = setDatabaseOption(pCxt, yymsp[-2].minor.yy448, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
X
Xiaoyu Wang 已提交
4766
        break;
X
Xiaoyu Wang 已提交
4767
      case 102: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */
X
Xiaoyu Wang 已提交
4768 4769
{ yylhsminor.yy448 = setDatabaseOption(pCxt, yymsp[-2].minor.yy448, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
4770
        break;
X
Xiaoyu Wang 已提交
4771
      case 103: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */
X
Xiaoyu Wang 已提交
4772 4773 4774
{ 
                                                                                    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 已提交
4775
                                                                                    yylhsminor.yy448 = setDatabaseOption(pCxt, yymsp[-3].minor.yy448, DB_OPTION_WAL_RETENTION_PERIOD, &t);
X
Xiaoyu Wang 已提交
4776
                                                                                  }
X
Xiaoyu Wang 已提交
4777
  yymsp[-3].minor.yy448 = yylhsminor.yy448;
X
Xiaoyu Wang 已提交
4778
        break;
X
Xiaoyu Wang 已提交
4779
      case 104: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */
X
Xiaoyu Wang 已提交
4780 4781
{ yylhsminor.yy448 = setDatabaseOption(pCxt, yymsp[-2].minor.yy448, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
X
Xiaoyu Wang 已提交
4782
        break;
X
Xiaoyu Wang 已提交
4783
      case 105: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */
X
Xiaoyu Wang 已提交
4784 4785 4786
{ 
                                                                                    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 已提交
4787
                                                                                    yylhsminor.yy448 = setDatabaseOption(pCxt, yymsp[-3].minor.yy448, DB_OPTION_WAL_RETENTION_SIZE, &t);
X
Xiaoyu Wang 已提交
4788
                                                                                  }
X
Xiaoyu Wang 已提交
4789
  yymsp[-3].minor.yy448 = yylhsminor.yy448;
4790
        break;
X
Xiaoyu Wang 已提交
4791
      case 106: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */
X
Xiaoyu Wang 已提交
4792 4793
{ yylhsminor.yy448 = setDatabaseOption(pCxt, yymsp[-2].minor.yy448, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
4794
        break;
X
Xiaoyu Wang 已提交
4795
      case 107: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */
X
Xiaoyu Wang 已提交
4796 4797
{ yylhsminor.yy448 = setDatabaseOption(pCxt, yymsp[-2].minor.yy448, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
4798
        break;
X
Xiaoyu Wang 已提交
4799
      case 108: /* db_options ::= db_options STT_TRIGGER NK_INTEGER */
X
Xiaoyu Wang 已提交
4800 4801
{ yylhsminor.yy448 = setDatabaseOption(pCxt, yymsp[-2].minor.yy448, DB_OPTION_STT_TRIGGER, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
4802
        break;
4803 4804
      case 109: /* db_options ::= db_options TABLE_PREFIX signed */
{ yylhsminor.yy448 = setDatabaseOption(pCxt, yymsp[-2].minor.yy448, DB_OPTION_TABLE_PREFIX, yymsp[0].minor.yy448); }
X
Xiaoyu Wang 已提交
4805
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
4806
        break;
4807 4808
      case 110: /* db_options ::= db_options TABLE_SUFFIX signed */
{ yylhsminor.yy448 = setDatabaseOption(pCxt, yymsp[-2].minor.yy448, DB_OPTION_TABLE_SUFFIX, yymsp[0].minor.yy448); }
X
Xiaoyu Wang 已提交
4809
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
4810
        break;
X
Xiaoyu Wang 已提交
4811
      case 111: /* alter_db_options ::= alter_db_option */
X
Xiaoyu Wang 已提交
4812 4813
{ yylhsminor.yy448 = createAlterDatabaseOptions(pCxt); yylhsminor.yy448 = setAlterDatabaseOption(pCxt, yylhsminor.yy448, &yymsp[0].minor.yy53); }
  yymsp[0].minor.yy448 = yylhsminor.yy448;
4814
        break;
X
Xiaoyu Wang 已提交
4815
      case 112: /* alter_db_options ::= alter_db_options alter_db_option */
X
Xiaoyu Wang 已提交
4816 4817
{ yylhsminor.yy448 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy448, &yymsp[0].minor.yy53); }
  yymsp[-1].minor.yy448 = yylhsminor.yy448;
4818
        break;
X
Xiaoyu Wang 已提交
4819
      case 113: /* alter_db_option ::= BUFFER NK_INTEGER */
X
Xiaoyu Wang 已提交
4820
{ yymsp[-1].minor.yy53.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy53.val = yymsp[0].minor.yy0; }
4821
        break;
X
Xiaoyu Wang 已提交
4822
      case 114: /* alter_db_option ::= CACHEMODEL NK_STRING */
X
Xiaoyu Wang 已提交
4823
{ yymsp[-1].minor.yy53.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy53.val = yymsp[0].minor.yy0; }
4824
        break;
X
Xiaoyu Wang 已提交
4825
      case 115: /* alter_db_option ::= CACHESIZE NK_INTEGER */
X
Xiaoyu Wang 已提交
4826
{ yymsp[-1].minor.yy53.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy53.val = yymsp[0].minor.yy0; }
4827
        break;
X
Xiaoyu Wang 已提交
4828
      case 116: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */
X
Xiaoyu Wang 已提交
4829
{ yymsp[-1].minor.yy53.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy53.val = yymsp[0].minor.yy0; }
4830
        break;
X
Xiaoyu Wang 已提交
4831 4832
      case 117: /* alter_db_option ::= KEEP integer_list */
      case 118: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==118);
X
Xiaoyu Wang 已提交
4833
{ yymsp[-1].minor.yy53.type = DB_OPTION_KEEP; yymsp[-1].minor.yy53.pList = yymsp[0].minor.yy432; }
4834
        break;
X
Xiaoyu Wang 已提交
4835
      case 119: /* alter_db_option ::= PAGES NK_INTEGER */
X
Xiaoyu Wang 已提交
4836
{ yymsp[-1].minor.yy53.type = DB_OPTION_PAGES; yymsp[-1].minor.yy53.val = yymsp[0].minor.yy0; }
4837
        break;
X
Xiaoyu Wang 已提交
4838
      case 120: /* alter_db_option ::= REPLICA NK_INTEGER */
X
Xiaoyu Wang 已提交
4839
{ yymsp[-1].minor.yy53.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy53.val = yymsp[0].minor.yy0; }
4840
        break;
X
Xiaoyu Wang 已提交
4841
      case 121: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */
X
Xiaoyu Wang 已提交
4842
{ yymsp[-1].minor.yy53.type = DB_OPTION_WAL; yymsp[-1].minor.yy53.val = yymsp[0].minor.yy0; }
4843
        break;
X
Xiaoyu Wang 已提交
4844
      case 122: /* alter_db_option ::= STT_TRIGGER NK_INTEGER */
X
Xiaoyu Wang 已提交
4845
{ yymsp[-1].minor.yy53.type = DB_OPTION_STT_TRIGGER; yymsp[-1].minor.yy53.val = yymsp[0].minor.yy0; }
4846
        break;
X
Xiaoyu Wang 已提交
4847
      case 123: /* alter_db_option ::= MINROWS NK_INTEGER */
X
Xiaoyu Wang 已提交
4848
{ yymsp[-1].minor.yy53.type = DB_OPTION_MINROWS; yymsp[-1].minor.yy53.val = yymsp[0].minor.yy0; }
4849
        break;
X
Xiaoyu Wang 已提交
4850 4851
      case 124: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_INTEGER */
{ yymsp[-1].minor.yy53.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-1].minor.yy53.val = yymsp[0].minor.yy0; }
4852
        break;
X
Xiaoyu Wang 已提交
4853
      case 125: /* alter_db_option ::= WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */
4854 4855 4856
{ 
                                                                                    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 已提交
4857
                                                                                    yymsp[-2].minor.yy53.type = DB_OPTION_WAL_RETENTION_PERIOD; yymsp[-2].minor.yy53.val = t;
4858 4859
                                                                                  }
        break;
X
Xiaoyu Wang 已提交
4860 4861
      case 126: /* alter_db_option ::= WAL_RETENTION_SIZE NK_INTEGER */
{ yymsp[-1].minor.yy53.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-1].minor.yy53.val = yymsp[0].minor.yy0; }
4862
        break;
X
Xiaoyu Wang 已提交
4863
      case 127: /* alter_db_option ::= WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */
4864 4865 4866
{ 
                                                                                    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 已提交
4867
                                                                                    yymsp[-2].minor.yy53.type = DB_OPTION_WAL_RETENTION_SIZE; yymsp[-2].minor.yy53.val = t;
4868 4869
                                                                                  }
        break;
X
Xiaoyu Wang 已提交
4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998
      case 128: /* integer_list ::= NK_INTEGER */
{ yylhsminor.yy432 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy432 = yylhsminor.yy432;
        break;
      case 129: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */
      case 351: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==351);
{ yylhsminor.yy432 = addNodeToList(pCxt, yymsp[-2].minor.yy432, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
  yymsp[-2].minor.yy432 = yylhsminor.yy432;
        break;
      case 130: /* variable_list ::= NK_VARIABLE */
{ yylhsminor.yy432 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy432 = yylhsminor.yy432;
        break;
      case 131: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */
{ yylhsminor.yy432 = addNodeToList(pCxt, yymsp[-2].minor.yy432, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
  yymsp[-2].minor.yy432 = yylhsminor.yy432;
        break;
      case 132: /* retention_list ::= retention */
      case 162: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==162);
      case 165: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==165);
      case 172: /* column_def_list ::= column_def */ yytestcase(yyruleno==172);
      case 215: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==215);
      case 220: /* col_name_list ::= col_name */ yytestcase(yyruleno==220);
      case 271: /* tag_list_opt ::= tag_item */ yytestcase(yyruleno==271);
      case 285: /* func_list ::= func */ yytestcase(yyruleno==285);
      case 380: /* literal_list ::= signed_literal */ yytestcase(yyruleno==380);
      case 447: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==447);
      case 453: /* when_then_list ::= when_then_expr */ yytestcase(yyruleno==453);
      case 508: /* select_list ::= select_item */ yytestcase(yyruleno==508);
      case 519: /* partition_list ::= partition_item */ yytestcase(yyruleno==519);
      case 574: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==574);
{ yylhsminor.yy432 = createNodeList(pCxt, yymsp[0].minor.yy448); }
  yymsp[0].minor.yy432 = yylhsminor.yy432;
        break;
      case 133: /* retention_list ::= retention_list NK_COMMA retention */
      case 166: /* multi_drop_clause ::= multi_drop_clause NK_COMMA drop_table_clause */ yytestcase(yyruleno==166);
      case 173: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==173);
      case 216: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==216);
      case 221: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==221);
      case 272: /* tag_list_opt ::= tag_list_opt NK_COMMA tag_item */ yytestcase(yyruleno==272);
      case 286: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==286);
      case 381: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==381);
      case 448: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==448);
      case 509: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==509);
      case 520: /* partition_list ::= partition_list NK_COMMA partition_item */ yytestcase(yyruleno==520);
      case 575: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==575);
{ yylhsminor.yy432 = addNodeToList(pCxt, yymsp[-2].minor.yy432, yymsp[0].minor.yy448); }
  yymsp[-2].minor.yy432 = yylhsminor.yy432;
        break;
      case 134: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */
{ yylhsminor.yy448 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
        break;
      case 135: /* speed_opt ::= */
      case 318: /* bufsize_opt ::= */ yytestcase(yyruleno==318);
{ yymsp[1].minor.yy788 = 0; }
        break;
      case 136: /* speed_opt ::= MAX_SPEED NK_INTEGER */
      case 319: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==319);
{ yymsp[-1].minor.yy788 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); }
        break;
      case 138: /* start_opt ::= START WITH NK_INTEGER */
      case 142: /* end_opt ::= END WITH NK_INTEGER */ yytestcase(yyruleno==142);
{ yymsp[-2].minor.yy448 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); }
        break;
      case 139: /* start_opt ::= START WITH NK_STRING */
      case 143: /* end_opt ::= END WITH NK_STRING */ yytestcase(yyruleno==143);
{ yymsp[-2].minor.yy448 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); }
        break;
      case 140: /* start_opt ::= START WITH TIMESTAMP NK_STRING */
      case 144: /* end_opt ::= END WITH TIMESTAMP NK_STRING */ yytestcase(yyruleno==144);
{ yymsp[-3].minor.yy448 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); }
        break;
      case 145: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */
      case 147: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==147);
{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy369, yymsp[-5].minor.yy448, yymsp[-3].minor.yy432, yymsp[-1].minor.yy432, yymsp[0].minor.yy448); }
        break;
      case 146: /* cmd ::= CREATE TABLE multi_create_clause */
{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy432); }
        break;
      case 148: /* cmd ::= DROP TABLE multi_drop_clause */
{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy432); }
        break;
      case 149: /* cmd ::= DROP STABLE exists_opt full_table_name */
{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy369, yymsp[0].minor.yy448); }
        break;
      case 150: /* cmd ::= ALTER TABLE alter_table_clause */
      case 353: /* cmd ::= query_or_subquery */ yytestcase(yyruleno==353);
      case 354: /* cmd ::= insert_query */ yytestcase(yyruleno==354);
{ pCxt->pRootNode = yymsp[0].minor.yy448; }
        break;
      case 151: /* cmd ::= ALTER STABLE alter_table_clause */
{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy448); }
        break;
      case 152: /* alter_table_clause ::= full_table_name alter_table_options */
{ yylhsminor.yy448 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy448, yymsp[0].minor.yy448); }
  yymsp[-1].minor.yy448 = yylhsminor.yy448;
        break;
      case 153: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */
{ yylhsminor.yy448 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy448, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy113, yymsp[0].minor.yy728); }
  yymsp[-4].minor.yy448 = yylhsminor.yy448;
        break;
      case 154: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */
{ yylhsminor.yy448 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy448, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy113); }
  yymsp[-3].minor.yy448 = yylhsminor.yy448;
        break;
      case 155: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */
{ yylhsminor.yy448 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy448, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy113, yymsp[0].minor.yy728); }
  yymsp[-4].minor.yy448 = yylhsminor.yy448;
        break;
      case 156: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */
{ yylhsminor.yy448 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy448, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy113, &yymsp[0].minor.yy113); }
  yymsp[-4].minor.yy448 = yylhsminor.yy448;
        break;
      case 157: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */
{ yylhsminor.yy448 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy448, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy113, yymsp[0].minor.yy728); }
  yymsp[-4].minor.yy448 = yylhsminor.yy448;
        break;
      case 158: /* alter_table_clause ::= full_table_name DROP TAG column_name */
{ yylhsminor.yy448 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy448, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy113); }
  yymsp[-3].minor.yy448 = yylhsminor.yy448;
        break;
      case 159: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */
{ yylhsminor.yy448 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy448, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy113, yymsp[0].minor.yy728); }
  yymsp[-4].minor.yy448 = yylhsminor.yy448;
        break;
      case 160: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */
{ yylhsminor.yy448 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy448, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy113, &yymsp[0].minor.yy113); }
  yymsp[-4].minor.yy448 = yylhsminor.yy448;
4999
        break;
X
Xiaoyu Wang 已提交
5000 5001 5002
      case 161: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */
{ yylhsminor.yy448 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy448, &yymsp[-2].minor.yy113, yymsp[0].minor.yy448); }
  yymsp[-5].minor.yy448 = yylhsminor.yy448;
5003
        break;
X
Xiaoyu Wang 已提交
5004 5005 5006 5007
      case 163: /* multi_create_clause ::= multi_create_clause create_subtable_clause */
      case 454: /* when_then_list ::= when_then_list when_then_expr */ yytestcase(yyruleno==454);
{ yylhsminor.yy432 = addNodeToList(pCxt, yymsp[-1].minor.yy432, yymsp[0].minor.yy448); }
  yymsp[-1].minor.yy432 = yylhsminor.yy432;
5008
        break;
X
Xiaoyu Wang 已提交
5009 5010 5011
      case 164: /* 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 */
{ yylhsminor.yy448 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy369, yymsp[-8].minor.yy448, yymsp[-6].minor.yy448, yymsp[-5].minor.yy432, yymsp[-2].minor.yy432, yymsp[0].minor.yy448); }
  yymsp[-9].minor.yy448 = yylhsminor.yy448;
5012
        break;
X
Xiaoyu Wang 已提交
5013 5014 5015
      case 167: /* drop_table_clause ::= exists_opt full_table_name */
{ yylhsminor.yy448 = createDropTableClause(pCxt, yymsp[-1].minor.yy369, yymsp[0].minor.yy448); }
  yymsp[-1].minor.yy448 = yylhsminor.yy448;
5016
        break;
X
Xiaoyu Wang 已提交
5017 5018 5019 5020 5021 5022 5023 5024 5025
      case 168: /* specific_cols_opt ::= */
      case 198: /* tags_def_opt ::= */ yytestcase(yyruleno==198);
      case 270: /* tag_list_opt ::= */ yytestcase(yyruleno==270);
      case 326: /* col_list_opt ::= */ yytestcase(yyruleno==326);
      case 328: /* tag_def_or_ref_opt ::= */ yytestcase(yyruleno==328);
      case 517: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==517);
      case 542: /* group_by_clause_opt ::= */ yytestcase(yyruleno==542);
      case 561: /* order_by_clause_opt ::= */ yytestcase(yyruleno==561);
{ yymsp[1].minor.yy432 = NULL; }
5026
        break;
X
Xiaoyu Wang 已提交
5027 5028 5029
      case 169: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */
      case 327: /* col_list_opt ::= NK_LP col_name_list NK_RP */ yytestcase(yyruleno==327);
{ yymsp[-2].minor.yy432 = yymsp[-1].minor.yy432; }
5030
        break;
X
Xiaoyu Wang 已提交
5031 5032 5033
      case 170: /* full_table_name ::= table_name */
{ yylhsminor.yy448 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy113, NULL); }
  yymsp[0].minor.yy448 = yylhsminor.yy448;
5034
        break;
X
Xiaoyu Wang 已提交
5035 5036 5037
      case 171: /* full_table_name ::= db_name NK_DOT table_name */
{ yylhsminor.yy448 = createRealTableNode(pCxt, &yymsp[-2].minor.yy113, &yymsp[0].minor.yy113, NULL); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
5038
        break;
X
Xiaoyu Wang 已提交
5039 5040 5041
      case 174: /* column_def ::= column_name type_name */
{ yylhsminor.yy448 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy113, yymsp[0].minor.yy728, NULL); }
  yymsp[-1].minor.yy448 = yylhsminor.yy448;
5042
        break;
X
Xiaoyu Wang 已提交
5043 5044
      case 175: /* type_name ::= BOOL */
{ yymsp[0].minor.yy728 = createDataType(TSDB_DATA_TYPE_BOOL); }
5045
        break;
X
Xiaoyu Wang 已提交
5046 5047
      case 176: /* type_name ::= TINYINT */
{ yymsp[0].minor.yy728 = createDataType(TSDB_DATA_TYPE_TINYINT); }
5048
        break;
X
Xiaoyu Wang 已提交
5049 5050
      case 177: /* type_name ::= SMALLINT */
{ yymsp[0].minor.yy728 = createDataType(TSDB_DATA_TYPE_SMALLINT); }
5051
        break;
X
Xiaoyu Wang 已提交
5052 5053 5054
      case 178: /* type_name ::= INT */
      case 179: /* type_name ::= INTEGER */ yytestcase(yyruleno==179);
{ yymsp[0].minor.yy728 = createDataType(TSDB_DATA_TYPE_INT); }
5055
        break;
X
Xiaoyu Wang 已提交
5056 5057
      case 180: /* type_name ::= BIGINT */
{ yymsp[0].minor.yy728 = createDataType(TSDB_DATA_TYPE_BIGINT); }
5058
        break;
X
Xiaoyu Wang 已提交
5059 5060
      case 181: /* type_name ::= FLOAT */
{ yymsp[0].minor.yy728 = createDataType(TSDB_DATA_TYPE_FLOAT); }
5061
        break;
X
Xiaoyu Wang 已提交
5062 5063
      case 182: /* type_name ::= DOUBLE */
{ yymsp[0].minor.yy728 = createDataType(TSDB_DATA_TYPE_DOUBLE); }
5064
        break;
X
Xiaoyu Wang 已提交
5065 5066
      case 183: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
{ yymsp[-3].minor.yy728 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); }
5067
        break;
X
Xiaoyu Wang 已提交
5068 5069
      case 184: /* type_name ::= TIMESTAMP */
{ yymsp[0].minor.yy728 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); }
5070
        break;
X
Xiaoyu Wang 已提交
5071 5072
      case 185: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
{ yymsp[-3].minor.yy728 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); }
5073
        break;
X
Xiaoyu Wang 已提交
5074 5075
      case 186: /* type_name ::= TINYINT UNSIGNED */
{ yymsp[-1].minor.yy728 = createDataType(TSDB_DATA_TYPE_UTINYINT); }
5076
        break;
X
Xiaoyu Wang 已提交
5077 5078
      case 187: /* type_name ::= SMALLINT UNSIGNED */
{ yymsp[-1].minor.yy728 = createDataType(TSDB_DATA_TYPE_USMALLINT); }
5079
        break;
X
Xiaoyu Wang 已提交
5080 5081
      case 188: /* type_name ::= INT UNSIGNED */
{ yymsp[-1].minor.yy728 = createDataType(TSDB_DATA_TYPE_UINT); }
5082
        break;
X
Xiaoyu Wang 已提交
5083 5084
      case 189: /* type_name ::= BIGINT UNSIGNED */
{ yymsp[-1].minor.yy728 = createDataType(TSDB_DATA_TYPE_UBIGINT); }
5085
        break;
X
Xiaoyu Wang 已提交
5086 5087
      case 190: /* type_name ::= JSON */
{ yymsp[0].minor.yy728 = createDataType(TSDB_DATA_TYPE_JSON); }
5088
        break;
X
Xiaoyu Wang 已提交
5089 5090
      case 191: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
{ yymsp[-3].minor.yy728 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); }
5091
        break;
X
Xiaoyu Wang 已提交
5092 5093
      case 192: /* type_name ::= MEDIUMBLOB */
{ yymsp[0].minor.yy728 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); }
5094
        break;
X
Xiaoyu Wang 已提交
5095 5096
      case 193: /* type_name ::= BLOB */
{ yymsp[0].minor.yy728 = createDataType(TSDB_DATA_TYPE_BLOB); }
5097
        break;
X
Xiaoyu Wang 已提交
5098 5099
      case 194: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
{ yymsp[-3].minor.yy728 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); }
5100
        break;
X
Xiaoyu Wang 已提交
5101 5102
      case 195: /* type_name ::= DECIMAL */
{ yymsp[0].minor.yy728 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
5103
        break;
X
Xiaoyu Wang 已提交
5104 5105
      case 196: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
{ yymsp[-3].minor.yy728 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
5106
        break;
X
Xiaoyu Wang 已提交
5107 5108
      case 197: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
{ yymsp[-5].minor.yy728 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
5109
        break;
X
Xiaoyu Wang 已提交
5110 5111 5112 5113 5114
      case 199: /* tags_def_opt ::= tags_def */
      case 329: /* tag_def_or_ref_opt ::= tags_def */ yytestcase(yyruleno==329);
      case 446: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==446);
{ yylhsminor.yy432 = yymsp[0].minor.yy432; }
  yymsp[0].minor.yy432 = yylhsminor.yy432;
5115
        break;
X
Xiaoyu Wang 已提交
5116 5117 5118
      case 200: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */
      case 330: /* tag_def_or_ref_opt ::= TAGS NK_LP col_name_list NK_RP */ yytestcase(yyruleno==330);
{ yymsp[-3].minor.yy432 = yymsp[-1].minor.yy432; }
5119
        break;
X
Xiaoyu Wang 已提交
5120 5121
      case 201: /* table_options ::= */
{ yymsp[1].minor.yy448 = createDefaultTableOptions(pCxt); }
5122
        break;
X
Xiaoyu Wang 已提交
5123 5124 5125
      case 202: /* table_options ::= table_options COMMENT NK_STRING */
{ yylhsminor.yy448 = setTableOption(pCxt, yymsp[-2].minor.yy448, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
5126
        break;
X
Xiaoyu Wang 已提交
5127 5128 5129
      case 203: /* table_options ::= table_options MAX_DELAY duration_list */
{ yylhsminor.yy448 = setTableOption(pCxt, yymsp[-2].minor.yy448, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy432); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
5130
        break;
X
Xiaoyu Wang 已提交
5131 5132 5133
      case 204: /* table_options ::= table_options WATERMARK duration_list */
{ yylhsminor.yy448 = setTableOption(pCxt, yymsp[-2].minor.yy448, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy432); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
5134
        break;
X
Xiaoyu Wang 已提交
5135 5136 5137
      case 205: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */
{ yylhsminor.yy448 = setTableOption(pCxt, yymsp[-4].minor.yy448, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy432); }
  yymsp[-4].minor.yy448 = yylhsminor.yy448;
5138
        break;
X
Xiaoyu Wang 已提交
5139 5140 5141
      case 206: /* table_options ::= table_options TTL NK_INTEGER */
{ yylhsminor.yy448 = setTableOption(pCxt, yymsp[-2].minor.yy448, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
5142
        break;
X
Xiaoyu Wang 已提交
5143 5144 5145
      case 207: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */
{ yylhsminor.yy448 = setTableOption(pCxt, yymsp[-4].minor.yy448, TABLE_OPTION_SMA, yymsp[-1].minor.yy432); }
  yymsp[-4].minor.yy448 = yylhsminor.yy448;
5146
        break;
X
Xiaoyu Wang 已提交
5147 5148 5149
      case 208: /* table_options ::= table_options DELETE_MARK duration_list */
{ yylhsminor.yy448 = setTableOption(pCxt, yymsp[-2].minor.yy448, TABLE_OPTION_DELETE_MARK, yymsp[0].minor.yy432); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
5150
        break;
X
Xiaoyu Wang 已提交
5151 5152 5153
      case 209: /* alter_table_options ::= alter_table_option */
{ yylhsminor.yy448 = createAlterTableOptions(pCxt); yylhsminor.yy448 = setTableOption(pCxt, yylhsminor.yy448, yymsp[0].minor.yy53.type, &yymsp[0].minor.yy53.val); }
  yymsp[0].minor.yy448 = yylhsminor.yy448;
5154
        break;
X
Xiaoyu Wang 已提交
5155 5156 5157
      case 210: /* alter_table_options ::= alter_table_options alter_table_option */
{ yylhsminor.yy448 = setTableOption(pCxt, yymsp[-1].minor.yy448, yymsp[0].minor.yy53.type, &yymsp[0].minor.yy53.val); }
  yymsp[-1].minor.yy448 = yylhsminor.yy448;
5158
        break;
X
Xiaoyu Wang 已提交
5159 5160
      case 211: /* alter_table_option ::= COMMENT NK_STRING */
{ yymsp[-1].minor.yy53.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy53.val = yymsp[0].minor.yy0; }
X
Xiaoyu Wang 已提交
5161
        break;
X
Xiaoyu Wang 已提交
5162 5163
      case 212: /* alter_table_option ::= TTL NK_INTEGER */
{ yymsp[-1].minor.yy53.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy53.val = yymsp[0].minor.yy0; }
5164
        break;
X
Xiaoyu Wang 已提交
5165 5166 5167 5168
      case 213: /* duration_list ::= duration_literal */
      case 410: /* expression_list ::= expr_or_subquery */ yytestcase(yyruleno==410);
{ yylhsminor.yy432 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy448)); }
  yymsp[0].minor.yy432 = yylhsminor.yy432;
5169
        break;
X
Xiaoyu Wang 已提交
5170 5171 5172 5173
      case 214: /* duration_list ::= duration_list NK_COMMA duration_literal */
      case 411: /* expression_list ::= expression_list NK_COMMA expr_or_subquery */ yytestcase(yyruleno==411);
{ yylhsminor.yy432 = addNodeToList(pCxt, yymsp[-2].minor.yy432, releaseRawExprNode(pCxt, yymsp[0].minor.yy448)); }
  yymsp[-2].minor.yy432 = yylhsminor.yy432;
5174
        break;
X
Xiaoyu Wang 已提交
5175 5176 5177
      case 217: /* rollup_func_name ::= function_name */
{ yylhsminor.yy448 = createFunctionNode(pCxt, &yymsp[0].minor.yy113, NULL); }
  yymsp[0].minor.yy448 = yylhsminor.yy448;
5178
        break;
X
Xiaoyu Wang 已提交
5179 5180 5181 5182 5183
      case 218: /* rollup_func_name ::= FIRST */
      case 219: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==219);
      case 274: /* tag_item ::= QTAGS */ yytestcase(yyruleno==274);
{ yylhsminor.yy448 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); }
  yymsp[0].minor.yy448 = yylhsminor.yy448;
5184
        break;
X
Xiaoyu Wang 已提交
5185 5186 5187 5188
      case 222: /* col_name ::= column_name */
      case 275: /* tag_item ::= column_name */ yytestcase(yyruleno==275);
{ yylhsminor.yy448 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy113); }
  yymsp[0].minor.yy448 = yylhsminor.yy448;
5189
        break;
X
Xiaoyu Wang 已提交
5190
      case 223: /* cmd ::= SHOW DNODES */
X
Xiaoyu Wang 已提交
5191
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); }
5192
        break;
X
Xiaoyu Wang 已提交
5193
      case 224: /* cmd ::= SHOW USERS */
X
Xiaoyu Wang 已提交
5194
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT); }
5195
        break;
X
Xiaoyu Wang 已提交
5196
      case 225: /* cmd ::= SHOW USER PRIVILEGES */
X
Xiaoyu Wang 已提交
5197
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USER_PRIVILEGES_STMT); }
5198
        break;
X
Xiaoyu Wang 已提交
5199
      case 226: /* cmd ::= SHOW DATABASES */
X
Xiaoyu Wang 已提交
5200
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); }
5201
        break;
X
Xiaoyu Wang 已提交
5202 5203
      case 227: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy448, yymsp[0].minor.yy448, OP_TYPE_LIKE); }
5204
        break;
X
Xiaoyu Wang 已提交
5205 5206
      case 228: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy448, yymsp[0].minor.yy448, OP_TYPE_LIKE); }
5207
        break;
X
Xiaoyu Wang 已提交
5208 5209
      case 229: /* cmd ::= SHOW db_name_cond_opt VGROUPS */
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy448, NULL, OP_TYPE_LIKE); }
5210
        break;
X
Xiaoyu Wang 已提交
5211
      case 230: /* cmd ::= SHOW MNODES */
5212
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); }
5213
        break;
X
Xiaoyu Wang 已提交
5214
      case 231: /* cmd ::= SHOW QNODES */
5215
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT); }
5216
        break;
X
Xiaoyu Wang 已提交
5217
      case 232: /* cmd ::= SHOW FUNCTIONS */
5218
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); }
5219
        break;
X
Xiaoyu Wang 已提交
5220 5221
      case 233: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy448, yymsp[-1].minor.yy448, OP_TYPE_EQUAL); }
5222
        break;
X
Xiaoyu Wang 已提交
5223
      case 234: /* cmd ::= SHOW STREAMS */
5224
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); }
5225
        break;
X
Xiaoyu Wang 已提交
5226
      case 235: /* cmd ::= SHOW ACCOUNTS */
5227
{ pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); }
5228
        break;
X
Xiaoyu Wang 已提交
5229
      case 236: /* cmd ::= SHOW APPS */
5230
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT); }
5231
        break;
X
Xiaoyu Wang 已提交
5232
      case 237: /* cmd ::= SHOW CONNECTIONS */
5233
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); }
5234
        break;
X
Xiaoyu Wang 已提交
5235 5236
      case 238: /* cmd ::= SHOW LICENCES */
      case 239: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==239);
X
Xiaoyu Wang 已提交
5237
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); }
5238
        break;
X
Xiaoyu Wang 已提交
5239 5240
      case 240: /* cmd ::= SHOW CREATE DATABASE db_name */
{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy113); }
5241
        break;
X
Xiaoyu Wang 已提交
5242 5243
      case 241: /* cmd ::= SHOW CREATE TABLE full_table_name */
{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy448); }
5244
        break;
X
Xiaoyu Wang 已提交
5245 5246
      case 242: /* cmd ::= SHOW CREATE STABLE full_table_name */
{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy448); }
5247
        break;
X
Xiaoyu Wang 已提交
5248
      case 243: /* cmd ::= SHOW QUERIES */
5249
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); }
5250
        break;
X
Xiaoyu Wang 已提交
5251
      case 244: /* cmd ::= SHOW SCORES */
5252
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT); }
5253
        break;
X
Xiaoyu Wang 已提交
5254
      case 245: /* cmd ::= SHOW TOPICS */
5255
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT); }
5256
        break;
X
Xiaoyu Wang 已提交
5257 5258
      case 246: /* cmd ::= SHOW VARIABLES */
      case 247: /* cmd ::= SHOW CLUSTER VARIABLES */ yytestcase(yyruleno==247);
5259
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLES_STMT); }
X
Xiaoyu Wang 已提交
5260
        break;
X
Xiaoyu Wang 已提交
5261
      case 248: /* cmd ::= SHOW LOCAL VARIABLES */
5262 5263
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); }
        break;
X
Xiaoyu Wang 已提交
5264 5265
      case 249: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES like_pattern_opt */
{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-2].minor.yy0), yymsp[0].minor.yy448); }
5266
        break;
X
Xiaoyu Wang 已提交
5267
      case 250: /* cmd ::= SHOW BNODES */
5268
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); }
5269
        break;
X
Xiaoyu Wang 已提交
5270
      case 251: /* cmd ::= SHOW SNODES */
5271
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT); }
5272
        break;
X
Xiaoyu Wang 已提交
5273
      case 252: /* cmd ::= SHOW CLUSTER */
5274
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT); }
5275
        break;
X
Xiaoyu Wang 已提交
5276
      case 253: /* cmd ::= SHOW TRANSACTIONS */
5277 5278
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); }
        break;
X
Xiaoyu Wang 已提交
5279 5280
      case 254: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */
{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy448); }
X
Xiaoyu Wang 已提交
5281
        break;
X
Xiaoyu Wang 已提交
5282
      case 255: /* cmd ::= SHOW CONSUMERS */
5283
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); }
X
Xiaoyu Wang 已提交
5284
        break;
X
Xiaoyu Wang 已提交
5285
      case 256: /* cmd ::= SHOW SUBSCRIPTIONS */
5286
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); }
X
Xiaoyu Wang 已提交
5287
        break;
X
Xiaoyu Wang 已提交
5288 5289
      case 257: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy448, yymsp[-1].minor.yy448, OP_TYPE_EQUAL); }
5290
        break;
X
Xiaoyu Wang 已提交
5291 5292
      case 258: /* cmd ::= SHOW TABLE TAGS tag_list_opt FROM table_name_cond from_db_opt */
{ pCxt->pRootNode = createShowTableTagsStmt(pCxt, yymsp[-1].minor.yy448, yymsp[0].minor.yy448, yymsp[-3].minor.yy432); }
5293
        break;
X
Xiaoyu Wang 已提交
5294
      case 259: /* cmd ::= SHOW VNODES NK_INTEGER */
5295 5296
{ pCxt->pRootNode = createShowVnodesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0), NULL); }
        break;
X
Xiaoyu Wang 已提交
5297
      case 260: /* cmd ::= SHOW VNODES NK_STRING */
5298
{ pCxt->pRootNode = createShowVnodesStmt(pCxt, NULL, createValueNode(pCxt, TSDB_DATA_TYPE_VARCHAR, &yymsp[0].minor.yy0)); }
5299
        break;
X
Xiaoyu Wang 已提交
5300 5301
      case 261: /* cmd ::= SHOW db_name_cond_opt ALIVE */
{ pCxt->pRootNode = createShowAliveStmt(pCxt, yymsp[-1].minor.yy448,    QUERY_NODE_SHOW_DB_ALIVE_STMT); }
5302
        break;
X
Xiaoyu Wang 已提交
5303
      case 262: /* cmd ::= SHOW CLUSTER ALIVE */
5304
{ pCxt->pRootNode = createShowAliveStmt(pCxt, NULL, QUERY_NODE_SHOW_CLUSTER_ALIVE_STMT); }
5305
        break;
X
Xiaoyu Wang 已提交
5306 5307 5308
      case 263: /* db_name_cond_opt ::= */
      case 268: /* from_db_opt ::= */ yytestcase(yyruleno==268);
{ yymsp[1].minor.yy448 = createDefaultDatabaseCondValue(pCxt); }
X
Xiaoyu Wang 已提交
5309
        break;
X
Xiaoyu Wang 已提交
5310 5311 5312
      case 264: /* db_name_cond_opt ::= db_name NK_DOT */
{ yylhsminor.yy448 = createIdentifierValueNode(pCxt, &yymsp[-1].minor.yy113); }
  yymsp[-1].minor.yy448 = yylhsminor.yy448;
X
Xiaoyu Wang 已提交
5313
        break;
X
Xiaoyu Wang 已提交
5314 5315
      case 266: /* like_pattern_opt ::= LIKE NK_STRING */
{ yymsp[-1].minor.yy448 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
X
Xiaoyu Wang 已提交
5316
        break;
X
Xiaoyu Wang 已提交
5317 5318 5319
      case 267: /* table_name_cond ::= table_name */
{ yylhsminor.yy448 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy113); }
  yymsp[0].minor.yy448 = yylhsminor.yy448;
X
Xiaoyu Wang 已提交
5320
        break;
X
Xiaoyu Wang 已提交
5321 5322
      case 269: /* from_db_opt ::= FROM db_name */
{ yymsp[-1].minor.yy448 = createIdentifierValueNode(pCxt, &yymsp[0].minor.yy113); }
5323
        break;
X
Xiaoyu Wang 已提交
5324 5325 5326
      case 273: /* tag_item ::= TBNAME */
{ yylhsminor.yy448 = setProjectionAlias(pCxt, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL), &yymsp[0].minor.yy0); }
  yymsp[0].minor.yy448 = yylhsminor.yy448;
5327
        break;
X
Xiaoyu Wang 已提交
5328 5329 5330
      case 276: /* tag_item ::= column_name column_alias */
{ yylhsminor.yy448 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-1].minor.yy113), &yymsp[0].minor.yy113); }
  yymsp[-1].minor.yy448 = yylhsminor.yy448;
5331
        break;
X
Xiaoyu Wang 已提交
5332 5333 5334
      case 277: /* tag_item ::= column_name AS column_alias */
{ yylhsminor.yy448 = setProjectionAlias(pCxt, createColumnNode(pCxt, NULL, &yymsp[-2].minor.yy113), &yymsp[0].minor.yy113); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
X
Xiaoyu Wang 已提交
5335
        break;
X
Xiaoyu Wang 已提交
5336 5337
      case 278: /* cmd ::= CREATE SMA INDEX not_exists_opt full_index_name ON full_table_name index_options */
{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy369, yymsp[-3].minor.yy448, yymsp[-1].minor.yy448, NULL, yymsp[0].minor.yy448); }
X
Xiaoyu Wang 已提交
5338
        break;
X
Xiaoyu Wang 已提交
5339 5340
      case 279: /* cmd ::= CREATE INDEX not_exists_opt full_index_name ON full_table_name NK_LP col_name_list NK_RP */
{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_NORMAL, yymsp[-6].minor.yy369, yymsp[-5].minor.yy448, yymsp[-3].minor.yy448, yymsp[-1].minor.yy432, NULL); }
X
Xiaoyu Wang 已提交
5341
        break;
X
Xiaoyu Wang 已提交
5342 5343
      case 280: /* cmd ::= DROP INDEX exists_opt full_index_name */
{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy369, yymsp[0].minor.yy448); }
X
Xiaoyu Wang 已提交
5344
        break;
X
Xiaoyu Wang 已提交
5345 5346 5347
      case 281: /* full_index_name ::= index_name */
{ yylhsminor.yy448 = createRealTableNodeForIndexName(pCxt, NULL, &yymsp[0].minor.yy113); }
  yymsp[0].minor.yy448 = yylhsminor.yy448;
X
Xiaoyu Wang 已提交
5348
        break;
X
Xiaoyu Wang 已提交
5349 5350 5351
      case 282: /* full_index_name ::= db_name NK_DOT index_name */
{ yylhsminor.yy448 = createRealTableNodeForIndexName(pCxt, &yymsp[-2].minor.yy113, &yymsp[0].minor.yy113); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
5352
        break;
X
Xiaoyu Wang 已提交
5353 5354
      case 283: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */
{ yymsp[-9].minor.yy448 = createIndexOption(pCxt, yymsp[-7].minor.yy432, releaseRawExprNode(pCxt, yymsp[-3].minor.yy448), NULL, yymsp[-1].minor.yy448, yymsp[0].minor.yy448); }
5355
        break;
X
Xiaoyu Wang 已提交
5356 5357
      case 284: /* 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 */
{ yymsp[-11].minor.yy448 = createIndexOption(pCxt, yymsp[-9].minor.yy432, releaseRawExprNode(pCxt, yymsp[-5].minor.yy448), releaseRawExprNode(pCxt, yymsp[-3].minor.yy448), yymsp[-1].minor.yy448, yymsp[0].minor.yy448); }
X
Xiaoyu Wang 已提交
5358
        break;
X
Xiaoyu Wang 已提交
5359 5360 5361
      case 287: /* func ::= sma_func_name NK_LP expression_list NK_RP */
{ yylhsminor.yy448 = createFunctionNode(pCxt, &yymsp[-3].minor.yy113, yymsp[-1].minor.yy432); }
  yymsp[-3].minor.yy448 = yylhsminor.yy448;
X
Xiaoyu Wang 已提交
5362
        break;
X
Xiaoyu Wang 已提交
5363 5364 5365 5366
      case 288: /* sma_func_name ::= function_name */
      case 497: /* alias_opt ::= table_alias */ yytestcase(yyruleno==497);
{ yylhsminor.yy113 = yymsp[0].minor.yy113; }
  yymsp[0].minor.yy113 = yylhsminor.yy113;
X
Xiaoyu Wang 已提交
5367
        break;
X
Xiaoyu Wang 已提交
5368 5369 5370
      case 293: /* sma_stream_opt ::= */
      case 331: /* stream_options ::= */ yytestcase(yyruleno==331);
{ yymsp[1].minor.yy448 = createStreamOptions(pCxt); }
X
Xiaoyu Wang 已提交
5371
        break;
X
Xiaoyu Wang 已提交
5372 5373 5374
      case 294: /* sma_stream_opt ::= sma_stream_opt WATERMARK duration_literal */
{ ((SStreamOptions*)yymsp[-2].minor.yy448)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy448); yylhsminor.yy448 = yymsp[-2].minor.yy448; }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
5375
        break;
X
Xiaoyu Wang 已提交
5376 5377 5378
      case 295: /* sma_stream_opt ::= sma_stream_opt MAX_DELAY duration_literal */
{ ((SStreamOptions*)yymsp[-2].minor.yy448)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy448); yylhsminor.yy448 = yymsp[-2].minor.yy448; }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
X
Xiaoyu Wang 已提交
5379
        break;
X
Xiaoyu Wang 已提交
5380 5381 5382
      case 296: /* sma_stream_opt ::= sma_stream_opt DELETE_MARK duration_literal */
{ ((SStreamOptions*)yymsp[-2].minor.yy448)->pDeleteMark = releaseRawExprNode(pCxt, yymsp[0].minor.yy448); yylhsminor.yy448 = yymsp[-2].minor.yy448; }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
5383
        break;
X
Xiaoyu Wang 已提交
5384 5385
      case 297: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_or_subquery */
{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy369, &yymsp[-2].minor.yy113, yymsp[0].minor.yy448); }
5386
        break;
X
Xiaoyu Wang 已提交
5387 5388
      case 298: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */
{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy369, &yymsp[-3].minor.yy113, &yymsp[0].minor.yy113, false); }
5389
        break;
X
Xiaoyu Wang 已提交
5390 5391
      case 299: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */
{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy369, &yymsp[-5].minor.yy113, &yymsp[0].minor.yy113, true); }
5392
        break;
5393 5394
      case 300: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name where_clause_opt */
{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-5].minor.yy369, &yymsp[-4].minor.yy113, yymsp[-1].minor.yy448, false, yymsp[0].minor.yy448); }
5395
        break;
5396 5397
      case 301: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name where_clause_opt */
{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-7].minor.yy369, &yymsp[-6].minor.yy113, yymsp[-1].minor.yy448, true, yymsp[0].minor.yy448); }
5398
        break;
X
Xiaoyu Wang 已提交
5399 5400
      case 302: /* cmd ::= DROP TOPIC exists_opt topic_name */
{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy369, &yymsp[0].minor.yy113); }
X
Xiaoyu Wang 已提交
5401
        break;
X
Xiaoyu Wang 已提交
5402 5403
      case 303: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */
{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy369, &yymsp[-2].minor.yy113, &yymsp[0].minor.yy113); }
5404
        break;
X
Xiaoyu Wang 已提交
5405 5406 5407
      case 304: /* cmd ::= DESC full_table_name */
      case 305: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==305);
{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy448); }
X
Xiaoyu Wang 已提交
5408
        break;
X
Xiaoyu Wang 已提交
5409
      case 306: /* cmd ::= RESET QUERY CACHE */
5410
{ pCxt->pRootNode = createResetQueryCacheStmt(pCxt); }
5411
        break;
X
Xiaoyu Wang 已提交
5412 5413 5414
      case 307: /* cmd ::= EXPLAIN analyze_opt explain_options query_or_subquery */
      case 308: /* cmd ::= EXPLAIN analyze_opt explain_options insert_query */ yytestcase(yyruleno==308);
{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy369, yymsp[-1].minor.yy448, yymsp[0].minor.yy448); }
5415
        break;
X
Xiaoyu Wang 已提交
5416 5417
      case 311: /* explain_options ::= */
{ yymsp[1].minor.yy448 = createDefaultExplainOptions(pCxt); }
5418
        break;
X
Xiaoyu Wang 已提交
5419 5420 5421
      case 312: /* explain_options ::= explain_options VERBOSE NK_BOOL */
{ yylhsminor.yy448 = setExplainVerbose(pCxt, yymsp[-2].minor.yy448, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
5422
        break;
X
Xiaoyu Wang 已提交
5423 5424 5425
      case 313: /* explain_options ::= explain_options RATIO NK_FLOAT */
{ yylhsminor.yy448 = setExplainRatio(pCxt, yymsp[-2].minor.yy448, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
5426
        break;
X
Xiaoyu Wang 已提交
5427 5428
      case 314: /* cmd ::= CREATE or_replace_opt agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt language_opt */
{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-7].minor.yy369, yymsp[-9].minor.yy369, &yymsp[-6].minor.yy113, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy728, yymsp[-1].minor.yy788, &yymsp[0].minor.yy113, yymsp[-10].minor.yy369); }
5429
        break;
X
Xiaoyu Wang 已提交
5430 5431
      case 315: /* cmd ::= DROP FUNCTION exists_opt function_name */
{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy369, &yymsp[0].minor.yy113); }
5432
        break;
X
Xiaoyu Wang 已提交
5433 5434
      case 320: /* language_opt ::= */
{ yymsp[1].minor.yy113 = nil_token; }
5435
        break;
X
Xiaoyu Wang 已提交
5436 5437
      case 321: /* language_opt ::= LANGUAGE NK_STRING */
{ yymsp[-1].minor.yy113 = yymsp[0].minor.yy0; }
5438
        break;
X
Xiaoyu Wang 已提交
5439 5440
      case 324: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options INTO full_table_name col_list_opt tag_def_or_ref_opt subtable_opt AS query_or_subquery */
{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-9].minor.yy369, &yymsp[-8].minor.yy113, yymsp[-5].minor.yy448, yymsp[-7].minor.yy448, yymsp[-3].minor.yy432, yymsp[-2].minor.yy448, yymsp[0].minor.yy448, yymsp[-4].minor.yy432); }
5441
        break;
X
Xiaoyu Wang 已提交
5442 5443
      case 325: /* cmd ::= DROP STREAM exists_opt stream_name */
{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy369, &yymsp[0].minor.yy113); }
5444
        break;
X
Xiaoyu Wang 已提交
5445 5446 5447 5448
      case 332: /* stream_options ::= stream_options TRIGGER AT_ONCE */
      case 333: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ yytestcase(yyruleno==333);
{ yylhsminor.yy448 = setStreamOptions(pCxt, yymsp[-2].minor.yy448, SOPT_TRIGGER_TYPE_SET, &yymsp[0].minor.yy0, NULL); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
5449
        break;
X
Xiaoyu Wang 已提交
5450 5451 5452
      case 334: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
{ yylhsminor.yy448 = setStreamOptions(pCxt, yymsp[-3].minor.yy448, SOPT_TRIGGER_TYPE_SET, &yymsp[-1].minor.yy0, releaseRawExprNode(pCxt, yymsp[0].minor.yy448)); }
  yymsp[-3].minor.yy448 = yylhsminor.yy448;
5453
        break;
X
Xiaoyu Wang 已提交
5454 5455 5456
      case 335: /* stream_options ::= stream_options WATERMARK duration_literal */
{ yylhsminor.yy448 = setStreamOptions(pCxt, yymsp[-2].minor.yy448, SOPT_WATERMARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy448)); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
5457
        break;
X
Xiaoyu Wang 已提交
5458 5459 5460
      case 336: /* stream_options ::= stream_options IGNORE EXPIRED NK_INTEGER */
{ yylhsminor.yy448 = setStreamOptions(pCxt, yymsp[-3].minor.yy448, SOPT_IGNORE_EXPIRED_SET, &yymsp[0].minor.yy0, NULL); }
  yymsp[-3].minor.yy448 = yylhsminor.yy448;
5461
        break;
X
Xiaoyu Wang 已提交
5462 5463 5464
      case 337: /* stream_options ::= stream_options FILL_HISTORY NK_INTEGER */
{ yylhsminor.yy448 = setStreamOptions(pCxt, yymsp[-2].minor.yy448, SOPT_FILL_HISTORY_SET, &yymsp[0].minor.yy0, NULL); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
5465
        break;
X
Xiaoyu Wang 已提交
5466 5467 5468
      case 338: /* stream_options ::= stream_options DELETE_MARK duration_literal */
{ yylhsminor.yy448 = setStreamOptions(pCxt, yymsp[-2].minor.yy448, SOPT_DELETE_MARK_SET, NULL, releaseRawExprNode(pCxt, yymsp[0].minor.yy448)); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
5469
        break;
X
Xiaoyu Wang 已提交
5470 5471 5472
      case 339: /* stream_options ::= stream_options IGNORE UPDATE NK_INTEGER */
{ yylhsminor.yy448 = setStreamOptions(pCxt, yymsp[-3].minor.yy448, SOPT_IGNORE_UPDATE_SET, &yymsp[0].minor.yy0, NULL); }
  yymsp[-3].minor.yy448 = yylhsminor.yy448;
5473
        break;
X
Xiaoyu Wang 已提交
5474 5475 5476 5477
      case 341: /* subtable_opt ::= SUBTABLE NK_LP expression NK_RP */
      case 531: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ yytestcase(yyruleno==531);
      case 551: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==551);
{ yymsp[-3].minor.yy448 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy448); }
5478
        break;
X
Xiaoyu Wang 已提交
5479
      case 342: /* cmd ::= KILL CONNECTION NK_INTEGER */
5480 5481
{ pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); }
        break;
X
Xiaoyu Wang 已提交
5482
      case 343: /* cmd ::= KILL QUERY NK_STRING */
X
Xiaoyu Wang 已提交
5483
{ pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); }
5484
        break;
X
Xiaoyu Wang 已提交
5485
      case 344: /* cmd ::= KILL TRANSACTION NK_INTEGER */
5486 5487
{ pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); }
        break;
X
Xiaoyu Wang 已提交
5488
      case 345: /* cmd ::= BALANCE VGROUP */
5489 5490
{ pCxt->pRootNode = createBalanceVgroupStmt(pCxt); }
        break;
X
Xiaoyu Wang 已提交
5491
      case 346: /* cmd ::= BALANCE VGROUP LEADER */
C
cadem 已提交
5492
{ pCxt->pRootNode = createBalanceVgroupLeaderStmt(pCxt); }
X
Xiaoyu Wang 已提交
5493
        break;
X
Xiaoyu Wang 已提交
5494
      case 347: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */
5495 5496
{ pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
        break;
X
Xiaoyu Wang 已提交
5497 5498
      case 348: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */
{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy432); }
5499
        break;
X
Xiaoyu Wang 已提交
5500
      case 349: /* cmd ::= SPLIT VGROUP NK_INTEGER */
5501 5502
{ pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); }
        break;
X
Xiaoyu Wang 已提交
5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578
      case 350: /* dnode_list ::= DNODE NK_INTEGER */
{ yymsp[-1].minor.yy432 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
        break;
      case 352: /* cmd ::= DELETE FROM full_table_name where_clause_opt */
{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy448, yymsp[0].minor.yy448); }
        break;
      case 355: /* insert_query ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_or_subquery */
{ yymsp[-6].minor.yy448 = createInsertStmt(pCxt, yymsp[-4].minor.yy448, yymsp[-2].minor.yy432, yymsp[0].minor.yy448); }
        break;
      case 356: /* insert_query ::= INSERT INTO full_table_name query_or_subquery */
{ yymsp[-3].minor.yy448 = createInsertStmt(pCxt, yymsp[-1].minor.yy448, NULL, yymsp[0].minor.yy448); }
        break;
      case 357: /* literal ::= NK_INTEGER */
{ yylhsminor.yy448 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy448 = yylhsminor.yy448;
        break;
      case 358: /* literal ::= NK_FLOAT */
{ yylhsminor.yy448 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy448 = yylhsminor.yy448;
        break;
      case 359: /* literal ::= NK_STRING */
{ yylhsminor.yy448 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy448 = yylhsminor.yy448;
        break;
      case 360: /* literal ::= NK_BOOL */
{ yylhsminor.yy448 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy448 = yylhsminor.yy448;
        break;
      case 361: /* literal ::= TIMESTAMP NK_STRING */
{ yylhsminor.yy448 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); }
  yymsp[-1].minor.yy448 = yylhsminor.yy448;
        break;
      case 362: /* literal ::= duration_literal */
      case 372: /* signed_literal ::= signed */ yytestcase(yyruleno==372);
      case 393: /* expr_or_subquery ::= expression */ yytestcase(yyruleno==393);
      case 394: /* expression ::= literal */ yytestcase(yyruleno==394);
      case 395: /* expression ::= pseudo_column */ yytestcase(yyruleno==395);
      case 396: /* expression ::= column_reference */ yytestcase(yyruleno==396);
      case 397: /* expression ::= function_expression */ yytestcase(yyruleno==397);
      case 398: /* expression ::= case_when_expression */ yytestcase(yyruleno==398);
      case 429: /* function_expression ::= literal_func */ yytestcase(yyruleno==429);
      case 478: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==478);
      case 482: /* boolean_primary ::= predicate */ yytestcase(yyruleno==482);
      case 484: /* common_expression ::= expr_or_subquery */ yytestcase(yyruleno==484);
      case 485: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==485);
      case 488: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==488);
      case 490: /* table_reference ::= table_primary */ yytestcase(yyruleno==490);
      case 491: /* table_reference ::= joined_table */ yytestcase(yyruleno==491);
      case 495: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==495);
      case 553: /* query_simple ::= query_specification */ yytestcase(yyruleno==553);
      case 554: /* query_simple ::= union_query_expression */ yytestcase(yyruleno==554);
      case 557: /* query_simple_or_subquery ::= query_simple */ yytestcase(yyruleno==557);
      case 559: /* query_or_subquery ::= query_expression */ yytestcase(yyruleno==559);
{ yylhsminor.yy448 = yymsp[0].minor.yy448; }
  yymsp[0].minor.yy448 = yylhsminor.yy448;
        break;
      case 363: /* literal ::= NULL */
{ yylhsminor.yy448 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy448 = yylhsminor.yy448;
        break;
      case 364: /* literal ::= NK_QUESTION */
{ yylhsminor.yy448 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy448 = yylhsminor.yy448;
        break;
      case 365: /* duration_literal ::= NK_VARIABLE */
{ yylhsminor.yy448 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy448 = yylhsminor.yy448;
        break;
      case 366: /* signed ::= NK_INTEGER */
{ yylhsminor.yy448 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); }
  yymsp[0].minor.yy448 = yylhsminor.yy448;
        break;
      case 367: /* signed ::= NK_PLUS NK_INTEGER */
{ yymsp[-1].minor.yy448 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); }
        break;
      case 368: /* signed ::= NK_MINUS NK_INTEGER */
X
Xiaoyu Wang 已提交
5579 5580 5581
{ 
                                                                                    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 已提交
5582
                                                                                    yylhsminor.yy448 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t);
X
Xiaoyu Wang 已提交
5583
                                                                                  }
X
Xiaoyu Wang 已提交
5584
  yymsp[-1].minor.yy448 = yylhsminor.yy448;
X
Xiaoyu Wang 已提交
5585
        break;
X
Xiaoyu Wang 已提交
5586 5587 5588
      case 369: /* signed ::= NK_FLOAT */
{ yylhsminor.yy448 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
  yymsp[0].minor.yy448 = yylhsminor.yy448;
X
Xiaoyu Wang 已提交
5589
        break;
X
Xiaoyu Wang 已提交
5590 5591
      case 370: /* signed ::= NK_PLUS NK_FLOAT */
{ yymsp[-1].minor.yy448 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
X
Xiaoyu Wang 已提交
5592
        break;
X
Xiaoyu Wang 已提交
5593
      case 371: /* signed ::= NK_MINUS NK_FLOAT */
X
Xiaoyu Wang 已提交
5594 5595 5596
{ 
                                                                                    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 已提交
5597
                                                                                    yylhsminor.yy448 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t);
X
Xiaoyu Wang 已提交
5598
                                                                                  }
X
Xiaoyu Wang 已提交
5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637
  yymsp[-1].minor.yy448 = yylhsminor.yy448;
        break;
      case 373: /* signed_literal ::= NK_STRING */
{ yylhsminor.yy448 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
  yymsp[0].minor.yy448 = yylhsminor.yy448;
        break;
      case 374: /* signed_literal ::= NK_BOOL */
{ yylhsminor.yy448 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); }
  yymsp[0].minor.yy448 = yylhsminor.yy448;
        break;
      case 375: /* signed_literal ::= TIMESTAMP NK_STRING */
{ yymsp[-1].minor.yy448 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); }
        break;
      case 376: /* signed_literal ::= duration_literal */
      case 378: /* signed_literal ::= literal_func */ yytestcase(yyruleno==378);
      case 449: /* star_func_para ::= expr_or_subquery */ yytestcase(yyruleno==449);
      case 511: /* select_item ::= common_expression */ yytestcase(yyruleno==511);
      case 521: /* partition_item ::= expr_or_subquery */ yytestcase(yyruleno==521);
      case 558: /* query_simple_or_subquery ::= subquery */ yytestcase(yyruleno==558);
      case 560: /* query_or_subquery ::= subquery */ yytestcase(yyruleno==560);
      case 573: /* search_condition ::= common_expression */ yytestcase(yyruleno==573);
{ yylhsminor.yy448 = releaseRawExprNode(pCxt, yymsp[0].minor.yy448); }
  yymsp[0].minor.yy448 = yylhsminor.yy448;
        break;
      case 377: /* signed_literal ::= NULL */
{ yylhsminor.yy448 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); }
  yymsp[0].minor.yy448 = yylhsminor.yy448;
        break;
      case 379: /* signed_literal ::= NK_QUESTION */
{ yylhsminor.yy448 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); }
  yymsp[0].minor.yy448 = yylhsminor.yy448;
        break;
      case 399: /* expression ::= NK_LP expression NK_RP */
      case 483: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==483);
      case 572: /* subquery ::= NK_LP subquery NK_RP */ yytestcase(yyruleno==572);
{ yylhsminor.yy448 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy448)); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
        break;
      case 400: /* expression ::= NK_PLUS expr_or_subquery */
X
Xiaoyu Wang 已提交
5638
{
X
Xiaoyu Wang 已提交
5639 5640
                                                                                    SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy448);
                                                                                    yylhsminor.yy448 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy448));
X
Xiaoyu Wang 已提交
5641
                                                                                  }
X
Xiaoyu Wang 已提交
5642
  yymsp[-1].minor.yy448 = yylhsminor.yy448;
X
Xiaoyu Wang 已提交
5643
        break;
X
Xiaoyu Wang 已提交
5644
      case 401: /* expression ::= NK_MINUS expr_or_subquery */
X
Xiaoyu Wang 已提交
5645
{
X
Xiaoyu Wang 已提交
5646 5647
                                                                                    SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy448);
                                                                                    yylhsminor.yy448 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy448), NULL));
X
Xiaoyu Wang 已提交
5648
                                                                                  }
X
Xiaoyu Wang 已提交
5649
  yymsp[-1].minor.yy448 = yylhsminor.yy448;
5650
        break;
X
Xiaoyu Wang 已提交
5651
      case 402: /* expression ::= expr_or_subquery NK_PLUS expr_or_subquery */
5652
{
X
Xiaoyu Wang 已提交
5653 5654 5655
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy448);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy448);
                                                                                    yylhsminor.yy448 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy448), releaseRawExprNode(pCxt, yymsp[0].minor.yy448))); 
5656
                                                                                  }
X
Xiaoyu Wang 已提交
5657
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
X
Xiaoyu Wang 已提交
5658
        break;
X
Xiaoyu Wang 已提交
5659
      case 403: /* expression ::= expr_or_subquery NK_MINUS expr_or_subquery */
5660
{
X
Xiaoyu Wang 已提交
5661 5662 5663
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy448);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy448);
                                                                                    yylhsminor.yy448 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy448), releaseRawExprNode(pCxt, yymsp[0].minor.yy448))); 
5664
                                                                                  }
X
Xiaoyu Wang 已提交
5665
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
5666
        break;
X
Xiaoyu Wang 已提交
5667
      case 404: /* expression ::= expr_or_subquery NK_STAR expr_or_subquery */
5668
{
X
Xiaoyu Wang 已提交
5669 5670 5671
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy448);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy448);
                                                                                    yylhsminor.yy448 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy448), releaseRawExprNode(pCxt, yymsp[0].minor.yy448))); 
5672
                                                                                  }
X
Xiaoyu Wang 已提交
5673
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
5674
        break;
X
Xiaoyu Wang 已提交
5675
      case 405: /* expression ::= expr_or_subquery NK_SLASH expr_or_subquery */
5676
{
X
Xiaoyu Wang 已提交
5677 5678 5679
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy448);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy448);
                                                                                    yylhsminor.yy448 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy448), releaseRawExprNode(pCxt, yymsp[0].minor.yy448))); 
5680
                                                                                  }
X
Xiaoyu Wang 已提交
5681
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
5682
        break;
X
Xiaoyu Wang 已提交
5683
      case 406: /* expression ::= expr_or_subquery NK_REM expr_or_subquery */
5684
{
X
Xiaoyu Wang 已提交
5685 5686 5687
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy448);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy448);
                                                                                    yylhsminor.yy448 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy448), releaseRawExprNode(pCxt, yymsp[0].minor.yy448)));
5688
                                                                                  }
X
Xiaoyu Wang 已提交
5689
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
5690
        break;
X
Xiaoyu Wang 已提交
5691
      case 407: /* expression ::= column_reference NK_ARROW NK_STRING */
5692
{
X
Xiaoyu Wang 已提交
5693 5694
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy448);
                                                                                    yylhsminor.yy448 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy448), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); 
5695
                                                                                  }
X
Xiaoyu Wang 已提交
5696
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
5697
        break;
X
Xiaoyu Wang 已提交
5698
      case 408: /* expression ::= expr_or_subquery NK_BITAND expr_or_subquery */
5699
{
X
Xiaoyu Wang 已提交
5700 5701 5702
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy448);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy448);
                                                                                    yylhsminor.yy448 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy448), releaseRawExprNode(pCxt, yymsp[0].minor.yy448)));
5703
                                                                                  }
X
Xiaoyu Wang 已提交
5704
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
5705
        break;
X
Xiaoyu Wang 已提交
5706
      case 409: /* expression ::= expr_or_subquery NK_BITOR expr_or_subquery */
5707
{
X
Xiaoyu Wang 已提交
5708 5709 5710
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy448);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy448);
                                                                                    yylhsminor.yy448 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy448), releaseRawExprNode(pCxt, yymsp[0].minor.yy448)));
5711
                                                                                  }
X
Xiaoyu Wang 已提交
5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
        break;
      case 412: /* column_reference ::= column_name */
{ yylhsminor.yy448 = createRawExprNode(pCxt, &yymsp[0].minor.yy113, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy113)); }
  yymsp[0].minor.yy448 = yylhsminor.yy448;
        break;
      case 413: /* column_reference ::= table_name NK_DOT column_name */
{ yylhsminor.yy448 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy113, &yymsp[0].minor.yy113, createColumnNode(pCxt, &yymsp[-2].minor.yy113, &yymsp[0].minor.yy113)); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
        break;
      case 414: /* pseudo_column ::= ROWTS */
      case 415: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==415);
      case 417: /* pseudo_column ::= QSTART */ yytestcase(yyruleno==417);
      case 418: /* pseudo_column ::= QEND */ yytestcase(yyruleno==418);
      case 419: /* pseudo_column ::= QDURATION */ yytestcase(yyruleno==419);
      case 420: /* pseudo_column ::= WSTART */ yytestcase(yyruleno==420);
      case 421: /* pseudo_column ::= WEND */ yytestcase(yyruleno==421);
      case 422: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==422);
      case 423: /* pseudo_column ::= IROWTS */ yytestcase(yyruleno==423);
      case 424: /* pseudo_column ::= ISFILLED */ yytestcase(yyruleno==424);
      case 425: /* pseudo_column ::= QTAGS */ yytestcase(yyruleno==425);
      case 431: /* literal_func ::= NOW */ yytestcase(yyruleno==431);
{ yylhsminor.yy448 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); }
  yymsp[0].minor.yy448 = yylhsminor.yy448;
        break;
      case 416: /* pseudo_column ::= table_name NK_DOT TBNAME */
{ yylhsminor.yy448 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy113, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy113)))); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
        break;
      case 426: /* function_expression ::= function_name NK_LP expression_list NK_RP */
      case 427: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==427);
{ yylhsminor.yy448 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy113, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy113, yymsp[-1].minor.yy432)); }
  yymsp[-3].minor.yy448 = yylhsminor.yy448;
        break;
      case 428: /* function_expression ::= CAST NK_LP expr_or_subquery AS type_name NK_RP */
{ yylhsminor.yy448 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy448), yymsp[-1].minor.yy728)); }
  yymsp[-5].minor.yy448 = yylhsminor.yy448;
        break;
      case 430: /* literal_func ::= noarg_func NK_LP NK_RP */
{ yylhsminor.yy448 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy113, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy113, NULL)); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
        break;
      case 445: /* star_func_para_list ::= NK_STAR */
{ yylhsminor.yy432 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy432 = yylhsminor.yy432;
        break;
      case 450: /* star_func_para ::= table_name NK_DOT NK_STAR */
      case 514: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==514);
{ yylhsminor.yy448 = createColumnNode(pCxt, &yymsp[-2].minor.yy113, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
        break;
      case 451: /* case_when_expression ::= CASE when_then_list case_when_else_opt END */
{ yylhsminor.yy448 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, NULL, yymsp[-2].minor.yy432, yymsp[-1].minor.yy448)); }
  yymsp[-3].minor.yy448 = yylhsminor.yy448;
        break;
      case 452: /* case_when_expression ::= CASE common_expression when_then_list case_when_else_opt END */
{ yylhsminor.yy448 = createRawExprNodeExt(pCxt, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0, createCaseWhenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy448), yymsp[-2].minor.yy432, yymsp[-1].minor.yy448)); }
  yymsp[-4].minor.yy448 = yylhsminor.yy448;
        break;
      case 455: /* when_then_expr ::= WHEN common_expression THEN common_expression */
{ yymsp[-3].minor.yy448 = createWhenThenNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy448), releaseRawExprNode(pCxt, yymsp[0].minor.yy448)); }
        break;
      case 457: /* case_when_else_opt ::= ELSE common_expression */
{ yymsp[-1].minor.yy448 = releaseRawExprNode(pCxt, yymsp[0].minor.yy448); }
        break;
      case 458: /* predicate ::= expr_or_subquery compare_op expr_or_subquery */
      case 463: /* predicate ::= expr_or_subquery in_op in_predicate_value */ yytestcase(yyruleno==463);
5779
{
X
Xiaoyu Wang 已提交
5780 5781 5782
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy448);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy448);
                                                                                    yylhsminor.yy448 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy156, releaseRawExprNode(pCxt, yymsp[-2].minor.yy448), releaseRawExprNode(pCxt, yymsp[0].minor.yy448)));
5783
                                                                                  }
X
Xiaoyu Wang 已提交
5784
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
5785
        break;
X
Xiaoyu Wang 已提交
5786
      case 459: /* predicate ::= expr_or_subquery BETWEEN expr_or_subquery AND expr_or_subquery */
5787
{
X
Xiaoyu Wang 已提交
5788 5789 5790
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy448);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy448);
                                                                                    yylhsminor.yy448 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy448), releaseRawExprNode(pCxt, yymsp[-2].minor.yy448), releaseRawExprNode(pCxt, yymsp[0].minor.yy448)));
5791
                                                                                  }
X
Xiaoyu Wang 已提交
5792
  yymsp[-4].minor.yy448 = yylhsminor.yy448;
5793
        break;
X
Xiaoyu Wang 已提交
5794
      case 460: /* predicate ::= expr_or_subquery NOT BETWEEN expr_or_subquery AND expr_or_subquery */
5795
{
X
Xiaoyu Wang 已提交
5796 5797 5798
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy448);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy448);
                                                                                    yylhsminor.yy448 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy448), releaseRawExprNode(pCxt, yymsp[-2].minor.yy448), releaseRawExprNode(pCxt, yymsp[0].minor.yy448)));
5799
                                                                                  }
X
Xiaoyu Wang 已提交
5800
  yymsp[-5].minor.yy448 = yylhsminor.yy448;
5801
        break;
X
Xiaoyu Wang 已提交
5802
      case 461: /* predicate ::= expr_or_subquery IS NULL */
5803
{
X
Xiaoyu Wang 已提交
5804 5805
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy448);
                                                                                    yylhsminor.yy448 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy448), NULL));
5806
                                                                                  }
X
Xiaoyu Wang 已提交
5807
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
5808
        break;
X
Xiaoyu Wang 已提交
5809
      case 462: /* predicate ::= expr_or_subquery IS NOT NULL */
5810
{
X
Xiaoyu Wang 已提交
5811 5812
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy448);
                                                                                    yylhsminor.yy448 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy448), NULL));
5813
                                                                                  }
X
Xiaoyu Wang 已提交
5814
  yymsp[-3].minor.yy448 = yylhsminor.yy448;
5815
        break;
X
Xiaoyu Wang 已提交
5816 5817
      case 464: /* compare_op ::= NK_LT */
{ yymsp[0].minor.yy156 = OP_TYPE_LOWER_THAN; }
5818
        break;
X
Xiaoyu Wang 已提交
5819 5820
      case 465: /* compare_op ::= NK_GT */
{ yymsp[0].minor.yy156 = OP_TYPE_GREATER_THAN; }
5821
        break;
X
Xiaoyu Wang 已提交
5822 5823
      case 466: /* compare_op ::= NK_LE */
{ yymsp[0].minor.yy156 = OP_TYPE_LOWER_EQUAL; }
5824
        break;
X
Xiaoyu Wang 已提交
5825 5826
      case 467: /* compare_op ::= NK_GE */
{ yymsp[0].minor.yy156 = OP_TYPE_GREATER_EQUAL; }
5827
        break;
X
Xiaoyu Wang 已提交
5828 5829
      case 468: /* compare_op ::= NK_NE */
{ yymsp[0].minor.yy156 = OP_TYPE_NOT_EQUAL; }
5830
        break;
X
Xiaoyu Wang 已提交
5831 5832
      case 469: /* compare_op ::= NK_EQ */
{ yymsp[0].minor.yy156 = OP_TYPE_EQUAL; }
5833
        break;
X
Xiaoyu Wang 已提交
5834 5835
      case 470: /* compare_op ::= LIKE */
{ yymsp[0].minor.yy156 = OP_TYPE_LIKE; }
5836
        break;
X
Xiaoyu Wang 已提交
5837 5838
      case 471: /* compare_op ::= NOT LIKE */
{ yymsp[-1].minor.yy156 = OP_TYPE_NOT_LIKE; }
5839
        break;
X
Xiaoyu Wang 已提交
5840 5841
      case 472: /* compare_op ::= MATCH */
{ yymsp[0].minor.yy156 = OP_TYPE_MATCH; }
5842
        break;
X
Xiaoyu Wang 已提交
5843 5844
      case 473: /* compare_op ::= NMATCH */
{ yymsp[0].minor.yy156 = OP_TYPE_NMATCH; }
5845
        break;
X
Xiaoyu Wang 已提交
5846 5847
      case 474: /* compare_op ::= CONTAINS */
{ yymsp[0].minor.yy156 = OP_TYPE_JSON_CONTAINS; }
5848
        break;
X
Xiaoyu Wang 已提交
5849 5850
      case 475: /* in_op ::= IN */
{ yymsp[0].minor.yy156 = OP_TYPE_IN; }
5851
        break;
X
Xiaoyu Wang 已提交
5852 5853
      case 476: /* in_op ::= NOT IN */
{ yymsp[-1].minor.yy156 = OP_TYPE_NOT_IN; }
5854
        break;
X
Xiaoyu Wang 已提交
5855 5856 5857
      case 477: /* in_predicate_value ::= NK_LP literal_list NK_RP */
{ yylhsminor.yy448 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy432)); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
5858
        break;
X
Xiaoyu Wang 已提交
5859
      case 479: /* boolean_value_expression ::= NOT boolean_primary */
5860
{
X
Xiaoyu Wang 已提交
5861 5862
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy448);
                                                                                    yylhsminor.yy448 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy448), NULL));
5863
                                                                                  }
X
Xiaoyu Wang 已提交
5864
  yymsp[-1].minor.yy448 = yylhsminor.yy448;
5865
        break;
X
Xiaoyu Wang 已提交
5866
      case 480: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
5867
{
X
Xiaoyu Wang 已提交
5868 5869 5870
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy448);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy448);
                                                                                    yylhsminor.yy448 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy448), releaseRawExprNode(pCxt, yymsp[0].minor.yy448)));
5871
                                                                                  }
X
Xiaoyu Wang 已提交
5872
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
5873
        break;
X
Xiaoyu Wang 已提交
5874
      case 481: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
5875
{
X
Xiaoyu Wang 已提交
5876 5877 5878
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy448);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy448);
                                                                                    yylhsminor.yy448 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy448), releaseRawExprNode(pCxt, yymsp[0].minor.yy448)));
5879
                                                                                  }
X
Xiaoyu Wang 已提交
5880
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
5881
        break;
X
Xiaoyu Wang 已提交
5882 5883 5884
      case 489: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */
{ yylhsminor.yy448 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy448, yymsp[0].minor.yy448, NULL); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
5885
        break;
X
Xiaoyu Wang 已提交
5886 5887 5888
      case 492: /* table_primary ::= table_name alias_opt */
{ yylhsminor.yy448 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy113, &yymsp[0].minor.yy113); }
  yymsp[-1].minor.yy448 = yylhsminor.yy448;
5889
        break;
X
Xiaoyu Wang 已提交
5890 5891 5892
      case 493: /* table_primary ::= db_name NK_DOT table_name alias_opt */
{ yylhsminor.yy448 = createRealTableNode(pCxt, &yymsp[-3].minor.yy113, &yymsp[-1].minor.yy113, &yymsp[0].minor.yy113); }
  yymsp[-3].minor.yy448 = yylhsminor.yy448;
5893
        break;
X
Xiaoyu Wang 已提交
5894 5895 5896
      case 494: /* table_primary ::= subquery alias_opt */
{ yylhsminor.yy448 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy448), &yymsp[0].minor.yy113); }
  yymsp[-1].minor.yy448 = yylhsminor.yy448;
5897
        break;
X
Xiaoyu Wang 已提交
5898 5899
      case 496: /* alias_opt ::= */
{ yymsp[1].minor.yy113 = nil_token;  }
5900
        break;
X
Xiaoyu Wang 已提交
5901 5902
      case 498: /* alias_opt ::= AS table_alias */
{ yymsp[-1].minor.yy113 = yymsp[0].minor.yy113; }
5903
        break;
X
Xiaoyu Wang 已提交
5904 5905 5906
      case 499: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */
      case 500: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==500);
{ yymsp[-2].minor.yy448 = yymsp[-1].minor.yy448; }
5907
        break;
X
Xiaoyu Wang 已提交
5908 5909 5910
      case 501: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
{ yylhsminor.yy448 = createJoinTableNode(pCxt, yymsp[-4].minor.yy596, yymsp[-5].minor.yy448, yymsp[-2].minor.yy448, yymsp[0].minor.yy448); }
  yymsp[-5].minor.yy448 = yylhsminor.yy448;
5911
        break;
X
Xiaoyu Wang 已提交
5912 5913
      case 502: /* join_type ::= */
{ yymsp[1].minor.yy596 = JOIN_TYPE_INNER; }
5914
        break;
X
Xiaoyu Wang 已提交
5915 5916
      case 503: /* join_type ::= INNER */
{ yymsp[0].minor.yy596 = JOIN_TYPE_INNER; }
5917
        break;
X
Xiaoyu Wang 已提交
5918
      case 504: /* 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 */
5919
{ 
X
Xiaoyu Wang 已提交
5920 5921 5922 5923 5924 5925 5926 5927 5928
                                                                                    yymsp[-11].minor.yy448 = createSelectStmt(pCxt, yymsp[-10].minor.yy369, yymsp[-9].minor.yy432, yymsp[-8].minor.yy448);
                                                                                    yymsp[-11].minor.yy448 = addWhereClause(pCxt, yymsp[-11].minor.yy448, yymsp[-7].minor.yy448);
                                                                                    yymsp[-11].minor.yy448 = addPartitionByClause(pCxt, yymsp[-11].minor.yy448, yymsp[-6].minor.yy432);
                                                                                    yymsp[-11].minor.yy448 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy448, yymsp[-2].minor.yy448);
                                                                                    yymsp[-11].minor.yy448 = addGroupByClause(pCxt, yymsp[-11].minor.yy448, yymsp[-1].minor.yy432);
                                                                                    yymsp[-11].minor.yy448 = addHavingClause(pCxt, yymsp[-11].minor.yy448, yymsp[0].minor.yy448);
                                                                                    yymsp[-11].minor.yy448 = addRangeClause(pCxt, yymsp[-11].minor.yy448, yymsp[-5].minor.yy448);
                                                                                    yymsp[-11].minor.yy448 = addEveryClause(pCxt, yymsp[-11].minor.yy448, yymsp[-4].minor.yy448);
                                                                                    yymsp[-11].minor.yy448 = addFillClause(pCxt, yymsp[-11].minor.yy448, yymsp[-3].minor.yy448);
5929 5930
                                                                                  }
        break;
X
Xiaoyu Wang 已提交
5931 5932
      case 507: /* set_quantifier_opt ::= ALL */
{ yymsp[0].minor.yy369 = false; }
5933
        break;
X
Xiaoyu Wang 已提交
5934 5935 5936
      case 510: /* select_item ::= NK_STAR */
{ yylhsminor.yy448 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); }
  yymsp[0].minor.yy448 = yylhsminor.yy448;
5937
        break;
X
Xiaoyu Wang 已提交
5938 5939 5940 5941
      case 512: /* select_item ::= common_expression column_alias */
      case 522: /* partition_item ::= expr_or_subquery column_alias */ yytestcase(yyruleno==522);
{ yylhsminor.yy448 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy448), &yymsp[0].minor.yy113); }
  yymsp[-1].minor.yy448 = yylhsminor.yy448;
5942
        break;
X
Xiaoyu Wang 已提交
5943 5944 5945 5946
      case 513: /* select_item ::= common_expression AS column_alias */
      case 523: /* partition_item ::= expr_or_subquery AS column_alias */ yytestcase(yyruleno==523);
{ yylhsminor.yy448 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy448), &yymsp[0].minor.yy113); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
5947
        break;
X
Xiaoyu Wang 已提交
5948 5949 5950 5951
      case 518: /* partition_by_clause_opt ::= PARTITION BY partition_list */
      case 543: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==543);
      case 562: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==562);
{ yymsp[-2].minor.yy432 = yymsp[0].minor.yy432; }
5952
        break;
X
Xiaoyu Wang 已提交
5953 5954
      case 525: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
{ yymsp[-5].minor.yy448 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy448), releaseRawExprNode(pCxt, yymsp[-1].minor.yy448)); }
5955
        break;
X
Xiaoyu Wang 已提交
5956 5957
      case 526: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expr_or_subquery NK_RP */
{ yymsp[-3].minor.yy448 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy448)); }
5958
        break;
X
Xiaoyu Wang 已提交
5959 5960
      case 527: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
{ yymsp[-5].minor.yy448 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy448), NULL, yymsp[-1].minor.yy448, yymsp[0].minor.yy448); }
5961
        break;
X
Xiaoyu Wang 已提交
5962 5963
      case 528: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
{ yymsp[-7].minor.yy448 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy448), releaseRawExprNode(pCxt, yymsp[-3].minor.yy448), yymsp[-1].minor.yy448, yymsp[0].minor.yy448); }
X
Xiaoyu Wang 已提交
5964
        break;
X
Xiaoyu Wang 已提交
5965 5966
      case 529: /* twindow_clause_opt ::= EVENT_WINDOW START WITH search_condition END WITH search_condition */
{ yymsp[-6].minor.yy448 = createEventWindowNode(pCxt, yymsp[-3].minor.yy448, yymsp[0].minor.yy448); }
5967
        break;
X
Xiaoyu Wang 已提交
5968 5969
      case 533: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */
{ yymsp[-3].minor.yy448 = createFillNode(pCxt, yymsp[-1].minor.yy46, NULL); }
5970
        break;
X
Xiaoyu Wang 已提交
5971 5972
      case 534: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
{ yymsp[-5].minor.yy448 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy432)); }
5973
        break;
X
Xiaoyu Wang 已提交
5974 5975
      case 535: /* fill_opt ::= FILL NK_LP VALUE_F NK_COMMA literal_list NK_RP */
{ yymsp[-5].minor.yy448 = createFillNode(pCxt, FILL_MODE_VALUE_F, createNodeListNode(pCxt, yymsp[-1].minor.yy432)); }
5976
        break;
X
Xiaoyu Wang 已提交
5977 5978
      case 536: /* fill_mode ::= NONE */
{ yymsp[0].minor.yy46 = FILL_MODE_NONE; }
5979
        break;
X
Xiaoyu Wang 已提交
5980 5981
      case 537: /* fill_mode ::= PREV */
{ yymsp[0].minor.yy46 = FILL_MODE_PREV; }
5982
        break;
X
Xiaoyu Wang 已提交
5983 5984
      case 538: /* fill_mode ::= NULL */
{ yymsp[0].minor.yy46 = FILL_MODE_NULL; }
5985
        break;
X
Xiaoyu Wang 已提交
5986 5987
      case 539: /* fill_mode ::= NULL_F */
{ yymsp[0].minor.yy46 = FILL_MODE_NULL_F; }
5988
        break;
X
Xiaoyu Wang 已提交
5989 5990
      case 540: /* fill_mode ::= LINEAR */
{ yymsp[0].minor.yy46 = FILL_MODE_LINEAR; }
5991
        break;
X
Xiaoyu Wang 已提交
5992 5993
      case 541: /* fill_mode ::= NEXT */
{ yymsp[0].minor.yy46 = FILL_MODE_NEXT; }
5994
        break;
X
Xiaoyu Wang 已提交
5995 5996 5997
      case 544: /* group_by_list ::= expr_or_subquery */
{ yylhsminor.yy432 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy448))); }
  yymsp[0].minor.yy432 = yylhsminor.yy432;
5998
        break;
X
Xiaoyu Wang 已提交
5999 6000 6001
      case 545: /* group_by_list ::= group_by_list NK_COMMA expr_or_subquery */
{ yylhsminor.yy432 = addNodeToList(pCxt, yymsp[-2].minor.yy432, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy448))); }
  yymsp[-2].minor.yy432 = yylhsminor.yy432;
X
Xiaoyu Wang 已提交
6002
        break;
X
Xiaoyu Wang 已提交
6003 6004
      case 549: /* range_opt ::= RANGE NK_LP expr_or_subquery NK_COMMA expr_or_subquery NK_RP */
{ yymsp[-5].minor.yy448 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy448), releaseRawExprNode(pCxt, yymsp[-1].minor.yy448)); }
6005
        break;
X
Xiaoyu Wang 已提交
6006
      case 552: /* query_expression ::= query_simple order_by_clause_opt slimit_clause_opt limit_clause_opt */
X
Xiaoyu Wang 已提交
6007
{
X
Xiaoyu Wang 已提交
6008 6009 6010
                                                                                    yylhsminor.yy448 = addOrderByClause(pCxt, yymsp[-3].minor.yy448, yymsp[-2].minor.yy432);
                                                                                    yylhsminor.yy448 = addSlimitClause(pCxt, yylhsminor.yy448, yymsp[-1].minor.yy448);
                                                                                    yylhsminor.yy448 = addLimitClause(pCxt, yylhsminor.yy448, yymsp[0].minor.yy448);
6011
                                                                                  }
X
Xiaoyu Wang 已提交
6012
  yymsp[-3].minor.yy448 = yylhsminor.yy448;
6013
        break;
X
Xiaoyu Wang 已提交
6014 6015 6016
      case 555: /* union_query_expression ::= query_simple_or_subquery UNION ALL query_simple_or_subquery */
{ yylhsminor.yy448 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy448, yymsp[0].minor.yy448); }
  yymsp[-3].minor.yy448 = yylhsminor.yy448;
X
Xiaoyu Wang 已提交
6017
        break;
X
Xiaoyu Wang 已提交
6018 6019 6020
      case 556: /* union_query_expression ::= query_simple_or_subquery UNION query_simple_or_subquery */
{ yylhsminor.yy448 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy448, yymsp[0].minor.yy448); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
X
Xiaoyu Wang 已提交
6021
        break;
X
Xiaoyu Wang 已提交
6022 6023 6024
      case 564: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */
      case 568: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==568);
{ yymsp[-1].minor.yy448 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); }
6025
        break;
X
Xiaoyu Wang 已提交
6026 6027 6028
      case 565: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
      case 569: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==569);
{ yymsp[-3].minor.yy448 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); }
6029
        break;
X
Xiaoyu Wang 已提交
6030 6031 6032
      case 566: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
      case 570: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==570);
{ yymsp[-3].minor.yy448 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); }
6033
        break;
X
Xiaoyu Wang 已提交
6034 6035 6036
      case 571: /* subquery ::= NK_LP query_expression NK_RP */
{ yylhsminor.yy448 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy448); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
6037
        break;
X
Xiaoyu Wang 已提交
6038 6039 6040
      case 576: /* sort_specification ::= expr_or_subquery ordering_specification_opt null_ordering_opt */
{ yylhsminor.yy448 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy448), yymsp[-1].minor.yy666, yymsp[0].minor.yy585); }
  yymsp[-2].minor.yy448 = yylhsminor.yy448;
6041
        break;
X
Xiaoyu Wang 已提交
6042 6043
      case 577: /* ordering_specification_opt ::= */
{ yymsp[1].minor.yy666 = ORDER_ASC; }
6044
        break;
X
Xiaoyu Wang 已提交
6045 6046
      case 578: /* ordering_specification_opt ::= ASC */
{ yymsp[0].minor.yy666 = ORDER_ASC; }
6047
        break;
X
Xiaoyu Wang 已提交
6048 6049
      case 579: /* ordering_specification_opt ::= DESC */
{ yymsp[0].minor.yy666 = ORDER_DESC; }
6050
        break;
X
Xiaoyu Wang 已提交
6051 6052
      case 580: /* null_ordering_opt ::= */
{ yymsp[1].minor.yy585 = NULL_ORDER_DEFAULT; }
6053
        break;
X
Xiaoyu Wang 已提交
6054 6055
      case 581: /* null_ordering_opt ::= NULLS FIRST */
{ yymsp[-1].minor.yy585 = NULL_ORDER_FIRST; }
6056
        break;
X
Xiaoyu Wang 已提交
6057 6058
      case 582: /* null_ordering_opt ::= NULLS LAST */
{ yymsp[-1].minor.yy585 = NULL_ORDER_LAST; }
C
cadem 已提交
6059
        break;
6060 6061 6062 6063
      default:
        break;
/********** End reduce actions ************************************************/
  };
6064 6065 6066
  assert( yyruleno<sizeof(yyRuleInfoLhs)/sizeof(yyRuleInfoLhs[0]) );
  yygoto = yyRuleInfoLhs[yyruleno];
  yysize = yyRuleInfoNRhs[yyruleno];
6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090
  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 已提交
6091 6092
  ParseARG_FETCH
  ParseCTX_FETCH
6093 6094 6095 6096 6097 6098 6099 6100 6101 6102
#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 已提交
6103 6104
  ParseARG_STORE /* Suppress warning about unused %extra_argument variable */
  ParseCTX_STORE
6105 6106 6107 6108 6109 6110 6111 6112 6113
}
#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 已提交
6114
  ParseTOKENTYPE yyminor         /* The minor type of the error token */
6115
){
X
Xiaoyu Wang 已提交
6116 6117
  ParseARG_FETCH
  ParseCTX_FETCH
6118 6119
#define TOKEN yyminor
/************ Begin %syntax_error code ****************************************/
6120

6121
  if (TSDB_CODE_SUCCESS == pCxt->errCode) {
6122
    if(TOKEN.z) {
6123
      pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR, TOKEN.z);
6124
    } else {
6125
      pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INCOMPLETE_SQL);
6126
    }
6127 6128
  } 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);
6129 6130
  }
/************ End %syntax_error code ******************************************/
X
Xiaoyu Wang 已提交
6131 6132
  ParseARG_STORE /* Suppress warning about unused %extra_argument variable */
  ParseCTX_STORE
6133 6134 6135 6136 6137 6138 6139 6140
}

/*
** The following is executed when the parser accepts
*/
static void yy_accept(
  yyParser *yypParser           /* The parser */
){
X
Xiaoyu Wang 已提交
6141 6142
  ParseARG_FETCH
  ParseCTX_FETCH
6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155
#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 已提交
6156 6157
  ParseARG_STORE /* Suppress warning about unused %extra_argument variable */
  ParseCTX_STORE
6158 6159 6160 6161
}

/* The main parser program.
** The first argument is a pointer to a structure obtained from
X
Xiaoyu Wang 已提交
6162
** "ParseAlloc" which describes the current state of the parser.
6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178
** 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 已提交
6179
void Parse(
6180 6181
  void *yyp,                   /* The parser */
  int yymajor,                 /* The major token code number */
X
Xiaoyu Wang 已提交
6182 6183
  ParseTOKENTYPE yyminor       /* The value for the token */
  ParseARG_PDECL               /* Optional %extra_argument parameter */
6184 6185 6186 6187 6188 6189 6190 6191 6192 6193
){
  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 已提交
6194 6195
  ParseCTX_FETCH
  ParseARG_STORE
6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214

  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 已提交
6215
  do{
6216 6217 6218
    assert( yyact==yypParser->yytos->stateno );
    yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact);
    if( yyact >= YY_MIN_REDUCE ){
X
Xiaoyu Wang 已提交
6219 6220
      yyact = yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor,
                        yyminor ParseCTX_PARAM);
6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275
    }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 已提交
6276 6277 6278 6279 6280
        while( yypParser->yytos >= yypParser->yystack
            && (yyact = yy_find_reduce_action(
                        yypParser->yytos->stateno,
                        YYERRORSYMBOL)) > YY_MAX_SHIFTREDUCE
        ){
6281 6282
          yy_pop_parser_stack(yypParser);
        }
X
Xiaoyu Wang 已提交
6283
        if( yypParser->yytos < yypParser->yystack || yymajor==0 ){
6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332
          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 已提交
6333
  }while( yypParser->yytos>yypParser->yystack );
6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352
#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 已提交
6353
int ParseFallback(int iToken){
6354
#ifdef YYFALLBACK
6355 6356
  assert( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) );
  return yyFallback[iToken];
6357 6358
#else
  (void)iToken;
X
Xiaoyu Wang 已提交
6359
  return 0;
6360
#endif
6361
}