sql.c 288.6 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 469
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
  EOperatorType yy2;
  SNode* yy42;
  bool yy103;
  EOrder yy106;
  SNodeList* yy110;
  SToken yy225;
  EFillMode yy410;
  SDataType yy448;
  SAlterOption yy459;
  int32_t yy508;
  ENullOrder yy599;
  EJoinType yy638;
  int64_t yy641;
  int8_t yy705;
127 128 129 130
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 100
#endif
X
Xiaoyu Wang 已提交
131 132 133 134 135 136 137 138 139 140
#define ParseARG_SDECL  SAstCreateContext* pCxt ;
#define ParseARG_PDECL , SAstCreateContext* pCxt 
#define ParseARG_PARAM ,pCxt 
#define ParseARG_FETCH  SAstCreateContext* pCxt =yypParser->pCxt ;
#define ParseARG_STORE yypParser->pCxt =pCxt ;
#define ParseCTX_SDECL
#define ParseCTX_PDECL
#define ParseCTX_PARAM
#define ParseCTX_FETCH
#define ParseCTX_STORE
X
Xiaoyu Wang 已提交
141
#define YYFALLBACK 1
X
Xiaoyu Wang 已提交
142 143
#define YYNSTATE             740
#define YYNRULE              561
X
Xiaoyu Wang 已提交
144
#define YYNTOKEN             328
X
Xiaoyu Wang 已提交
145 146 147 148 149 150 151 152
#define YY_MAX_SHIFT         739
#define YY_MIN_SHIFTREDUCE   1097
#define YY_MAX_SHIFTREDUCE   1657
#define YY_ERROR_ACTION      1658
#define YY_ACCEPT_ACTION     1659
#define YY_NO_ACTION         1660
#define YY_MIN_REDUCE        1661
#define YY_MAX_REDUCE        2221
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218
/************* End control #defines *******************************************/
#define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))

/* Define the yytestcase() macro to be a no-op if is not already defined
** otherwise.
**
** Applications can choose to define yytestcase() in the %include section
** to a macro that can assist in verifying code coverage.  For production
** code the yytestcase() macro should be turned off.  But it is useful
** for testing.
*/
#ifndef yytestcase
# define yytestcase(X)
#endif


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

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


/* 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 已提交
2564 2565
  ParseARG_FETCH
  ParseCTX_FETCH
2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578
  switch( yymajor ){
    /* Here is inserted the actions which take place when a
    ** terminal or non-terminal is destroyed.  This can happen
    ** when the symbol is popped from the stack during a
    ** reduce or during error processing or when a parser is 
    ** being destroyed before it is finished parsing.
    **
    ** Note: during a reduce, the only symbols destroyed are those
    ** which appear on the RHS of the rule, but which are *not* used
    ** inside the C code.
    */
/********* Begin destructor definitions ***************************************/
      /* Default NON-TERMINAL Destructor */
X
Xiaoyu Wang 已提交
2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649
    case 328: /* cmd */
    case 331: /* literal */
    case 344: /* db_options */
    case 346: /* alter_db_options */
    case 352: /* retention */
    case 353: /* full_table_name */
    case 356: /* table_options */
    case 360: /* alter_table_clause */
    case 361: /* alter_table_options */
    case 364: /* signed_literal */
    case 365: /* create_subtable_clause */
    case 368: /* drop_table_clause */
    case 371: /* column_def */
    case 375: /* duration_literal */
    case 376: /* rollup_func_name */
    case 378: /* col_name */
    case 379: /* db_name_cond_opt */
    case 380: /* like_pattern_opt */
    case 381: /* table_name_cond */
    case 382: /* from_db_opt */
    case 384: /* tag_item */
    case 386: /* full_index_name */
    case 387: /* index_options */
    case 390: /* sliding_opt */
    case 391: /* sma_stream_opt */
    case 392: /* func */
    case 394: /* query_or_subquery */
    case 397: /* explain_options */
    case 398: /* insert_query */
    case 402: /* stream_options */
    case 405: /* subtable_opt */
    case 406: /* expression */
    case 408: /* where_clause_opt */
    case 409: /* signed */
    case 410: /* literal_func */
    case 413: /* expr_or_subquery */
    case 414: /* pseudo_column */
    case 415: /* column_reference */
    case 416: /* function_expression */
    case 417: /* case_when_expression */
    case 422: /* star_func_para */
    case 424: /* case_when_else_opt */
    case 425: /* common_expression */
    case 426: /* when_then_expr */
    case 427: /* predicate */
    case 430: /* in_predicate_value */
    case 431: /* boolean_value_expression */
    case 432: /* boolean_primary */
    case 433: /* from_clause_opt */
    case 434: /* table_reference_list */
    case 435: /* table_reference */
    case 436: /* table_primary */
    case 437: /* joined_table */
    case 439: /* subquery */
    case 440: /* parenthesized_joined_table */
    case 442: /* search_condition */
    case 443: /* query_specification */
    case 447: /* range_opt */
    case 448: /* every_opt */
    case 449: /* fill_opt */
    case 450: /* twindow_clause_opt */
    case 452: /* having_clause_opt */
    case 453: /* select_item */
    case 455: /* partition_item */
    case 458: /* query_expression */
    case 459: /* query_simple */
    case 461: /* slimit_clause_opt */
    case 462: /* limit_clause_opt */
    case 463: /* union_query_expression */
    case 464: /* query_simple_or_subquery */
    case 466: /* sort_specification */
X
Xiaoyu Wang 已提交
2650
{
X
Xiaoyu Wang 已提交
2651
 nodesDestroyNode((yypminor->yy42)); 
X
Xiaoyu Wang 已提交
2652 2653
}
      break;
X
Xiaoyu Wang 已提交
2654 2655 2656 2657 2658
    case 329: /* account_options */
    case 330: /* alter_account_options */
    case 332: /* alter_account_option */
    case 347: /* speed_opt */
    case 400: /* bufsize_opt */
2659
{
X
Xiaoyu Wang 已提交
2660
 
2661 2662
}
      break;
X
Xiaoyu Wang 已提交
2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679
    case 333: /* user_name */
    case 336: /* priv_level */
    case 339: /* db_name */
    case 340: /* topic_name */
    case 341: /* dnode_endpoint */
    case 362: /* column_name */
    case 370: /* table_name */
    case 377: /* function_name */
    case 385: /* column_alias */
    case 388: /* index_name */
    case 393: /* sma_func_name */
    case 395: /* cgroup_name */
    case 401: /* stream_name */
    case 412: /* table_alias */
    case 418: /* star_func */
    case 420: /* noarg_func */
    case 438: /* alias_opt */
2680
{
2681
 
2682 2683
}
      break;
X
Xiaoyu Wang 已提交
2684
    case 334: /* sysinfo_opt */
2685
{
2686
 
2687 2688
}
      break;
X
Xiaoyu Wang 已提交
2689 2690 2691
    case 335: /* privileges */
    case 337: /* priv_type_list */
    case 338: /* priv_type */
2692
{
2693
 
2694 2695
}
      break;
X
Xiaoyu Wang 已提交
2696 2697 2698 2699 2700 2701
    case 342: /* force_opt */
    case 343: /* not_exists_opt */
    case 345: /* exists_opt */
    case 396: /* analyze_opt */
    case 399: /* agg_func_opt */
    case 444: /* set_quantifier_opt */
2702
{
2703 2704 2705
 
}
      break;
X
Xiaoyu Wang 已提交
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
    case 348: /* integer_list */
    case 349: /* variable_list */
    case 350: /* retention_list */
    case 354: /* column_def_list */
    case 355: /* tags_def_opt */
    case 357: /* multi_create_clause */
    case 358: /* tags_def */
    case 359: /* multi_drop_clause */
    case 366: /* specific_cols_opt */
    case 367: /* expression_list */
    case 369: /* col_name_list */
    case 372: /* duration_list */
    case 373: /* rollup_func_list */
    case 383: /* tag_list_opt */
    case 389: /* func_list */
    case 403: /* col_list_opt */
    case 404: /* tag_def_or_ref_opt */
    case 407: /* dnode_list */
    case 411: /* literal_list */
    case 419: /* star_func_para_list */
    case 421: /* other_para_list */
    case 423: /* when_then_list */
    case 445: /* select_list */
    case 446: /* partition_by_clause_opt */
    case 451: /* group_by_clause_opt */
    case 454: /* partition_list */
    case 457: /* group_by_list */
    case 460: /* order_by_clause_opt */
    case 465: /* sort_specification_list */
2735
{
X
Xiaoyu Wang 已提交
2736
 nodesDestroyList((yypminor->yy110)); 
2737 2738
}
      break;
X
Xiaoyu Wang 已提交
2739 2740
    case 351: /* alter_db_option */
    case 374: /* alter_table_option */
2741
{
X
Xiaoyu Wang 已提交
2742
 
2743 2744
}
      break;
X
Xiaoyu Wang 已提交
2745
    case 363: /* type_name */
2746
{
2747
 
2748 2749
}
      break;
X
Xiaoyu Wang 已提交
2750 2751
    case 428: /* compare_op */
    case 429: /* in_op */
2752
{
2753
 
2754 2755
}
      break;
X
Xiaoyu Wang 已提交
2756
    case 441: /* join_type */
2757
{
2758
 
2759 2760
}
      break;
X
Xiaoyu Wang 已提交
2761
    case 456: /* fill_mode */
2762
{
2763
 
2764 2765
}
      break;
X
Xiaoyu Wang 已提交
2766
    case 467: /* ordering_specification_opt */
2767
{
2768
 
2769 2770
}
      break;
X
Xiaoyu Wang 已提交
2771
    case 468: /* null_ordering_opt */
2772
{
2773
 
2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804
}
      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 已提交
2805
void ParseFinalize(void *p){
2806 2807 2808
  yyParser *pParser = (yyParser*)p;
  while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser);
#if YYSTACKDEPTH<=0
X
Xiaoyu Wang 已提交
2809
  if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack);
2810 2811 2812
#endif
}

X
Xiaoyu Wang 已提交
2813
#ifndef Parse_ENGINEALWAYSONSTACK
2814 2815 2816 2817 2818 2819 2820 2821
/* 
** 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 已提交
2822
void ParseFree(
2823 2824 2825 2826 2827 2828
  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 已提交
2829
  ParseFinalize(p);
2830 2831
  (*freeProc)(p);
}
X
Xiaoyu Wang 已提交
2832
#endif /* Parse_ENGINEALWAYSONSTACK */
2833 2834 2835 2836 2837

/*
** Return the peak depth of the stack for a parser.
*/
#ifdef YYTRACKMAXSTACKDEPTH
X
Xiaoyu Wang 已提交
2838
int ParseStackPeak(void *p){
2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861
  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 已提交
2862
int ParseCoverage(FILE *out){
2863 2864 2865 2866 2867 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
  int stateno, iLookAhead, i;
  int nMissed = 0;
  for(stateno=0; stateno<YYNSTATE; stateno++){
    i = yy_shift_ofst[stateno];
    for(iLookAhead=0; iLookAhead<YYNTOKEN; iLookAhead++){
      if( yy_lookahead[i+iLookAhead]!=iLookAhead ) continue;
      if( yycoverage[stateno][iLookAhead]==0 ) nMissed++;
      if( out ){
        fprintf(out,"State %d lookahead %s %s\n", stateno,
                yyTokenName[iLookAhead],
                yycoverage[stateno][iLookAhead] ? "ok" : "missed");
      }
    }
  }
  return nMissed;
}
#endif

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

  if( stateno>YY_MAX_SHIFT ) return stateno;
  assert( stateno <= YY_SHIFT_COUNT );
#if defined(YYCOVERAGE)
  yycoverage[stateno][iLookAhead] = 1;
#endif
  do{
    i = yy_shift_ofst[stateno];
    assert( i>=0 );
X
Xiaoyu Wang 已提交
2899
    /* assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD ); */
2900 2901 2902
    assert( iLookAhead!=YYNOCODE );
    assert( iLookAhead < YYNTOKEN );
    i += iLookAhead;
X
Xiaoyu Wang 已提交
2903
    if( i>=YY_NLOOKAHEAD || yy_lookahead[i]!=iLookAhead ){
2904 2905
#ifdef YYFALLBACK
      YYCODETYPE iFallback;            /* Fallback token */
X
Xiaoyu Wang 已提交
2906 2907
      if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
             && (iFallback = yyFallback[iLookAhead])!=0 ){
2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921
#ifndef NDEBUG
        if( yyTraceFILE ){
          fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
             yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
        }
#endif
        assert( yyFallback[iFallback]==0 ); /* Fallback loop must terminate */
        iLookAhead = iFallback;
        continue;
      }
#endif
#ifdef YYWILDCARD
      {
        int j = i - iLookAhead + YYWILDCARD;
X
Xiaoyu Wang 已提交
2922 2923 2924 2925 2926 2927 2928 2929 2930 2931
        if( 
#if YY_SHIFT_MIN+YYWILDCARD<0
          j>=0 &&
#endif
#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT
          j<YY_ACTTAB_COUNT &&
#endif
          j<(int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])) &&
          yy_lookahead[j]==YYWILDCARD && iLookAhead>0
        ){
2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983
#ifndef NDEBUG
          if( yyTraceFILE ){
            fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n",
               yyTracePrompt, yyTokenName[iLookAhead],
               yyTokenName[YYWILDCARD]);
          }
#endif /* NDEBUG */
          return yy_action[j];
        }
      }
#endif /* YYWILDCARD */
      return yy_default[stateno];
    }else{
      return yy_action[i];
    }
  }while(1);
}

/*
** Find the appropriate action for a parser given the non-terminal
** look-ahead token iLookAhead.
*/
static YYACTIONTYPE yy_find_reduce_action(
  YYACTIONTYPE stateno,     /* Current state number */
  YYCODETYPE iLookAhead     /* The look-ahead token */
){
  int i;
#ifdef YYERRORSYMBOL
  if( stateno>YY_REDUCE_COUNT ){
    return yy_default[stateno];
  }
#else
  assert( stateno<=YY_REDUCE_COUNT );
#endif
  i = yy_reduce_ofst[stateno];
  assert( iLookAhead!=YYNOCODE );
  i += iLookAhead;
#ifdef YYERRORSYMBOL
  if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){
    return yy_default[stateno];
  }
#else
  assert( i>=0 && i<YY_ACTTAB_COUNT );
  assert( yy_lookahead[i]==iLookAhead );
#endif
  return yy_action[i];
}

/*
** The following routine is called if the stack overflows.
*/
static void yyStackOverflow(yyParser *yypParser){
X
Xiaoyu Wang 已提交
2984 2985
   ParseARG_FETCH
   ParseCTX_FETCH
2986 2987 2988 2989 2990 2991 2992 2993 2994 2995
#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 已提交
2996 2997
   ParseARG_STORE /* Suppress warning about unused %extra_argument var */
   ParseCTX_STORE
2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027
}

/*
** 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 已提交
3028
  ParseTOKENTYPE yyMinor        /* The minor token to shift in */
3029 3030 3031 3032 3033 3034 3035 3036 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
){
  yyStackEntry *yytos;
  yypParser->yytos++;
#ifdef YYTRACKMAXSTACKDEPTH
  if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
    yypParser->yyhwm++;
    assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack) );
  }
#endif
#if YYSTACKDEPTH>0 
  if( yypParser->yytos>yypParser->yystackEnd ){
    yypParser->yytos--;
    yyStackOverflow(yypParser);
    return;
  }
#else
  if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz] ){
    if( yyGrowStack(yypParser) ){
      yypParser->yytos--;
      yyStackOverflow(yypParser);
      return;
    }
  }
#endif
  if( yyNewState > YY_MAX_SHIFT ){
    yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE;
  }
  yytos = yypParser->yytos;
  yytos->stateno = yyNewState;
  yytos->major = yyMajor;
  yytos->minor.yy0 = yyMinor;
  yyTraceShift(yypParser, yyNewState, "Shift");
}

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

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 已提交
3649 3650
  ParseTOKENTYPE yyLookaheadToken  /* Value of the lookahead token */
  ParseCTX_PDECL                   /* %extra_context */
3651 3652 3653 3654 3655
){
  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 已提交
3656
  ParseARG_FETCH
3657 3658 3659
  (void)yyLookahead;
  (void)yyLookaheadToken;
  yymsp = yypParser->yytos;
X
Xiaoyu Wang 已提交
3660 3661
#ifndef NDEBUG
  if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){
X
Xiaoyu Wang 已提交
3662
    yysize = yyRuleInfo[yyruleno].nrhs;
X
Xiaoyu Wang 已提交
3663
    if( yysize ){
X
Xiaoyu Wang 已提交
3664
      fprintf(yyTraceFILE, "%sReduce %d [%s], go to state %d.\n",
X
Xiaoyu Wang 已提交
3665
        yyTracePrompt,
X
Xiaoyu Wang 已提交
3666
        yyruleno, yyRuleName[yyruleno], yymsp[yysize].stateno);
X
Xiaoyu Wang 已提交
3667
    }else{
X
Xiaoyu Wang 已提交
3668 3669
      fprintf(yyTraceFILE, "%sReduce %d [%s].\n",
        yyTracePrompt, yyruleno, yyRuleName[yyruleno]);
X
Xiaoyu Wang 已提交
3670 3671 3672 3673 3674 3675 3676
    }
  }
#endif /* NDEBUG */

  /* Check that the stack is large enough to grow by a single entry
  ** if the RHS of the rule is empty.  This ensures that there is room
  ** enough on the stack to push the LHS value */
X
Xiaoyu Wang 已提交
3677
  if( yyRuleInfo[yyruleno].nrhs==0 ){
X
Xiaoyu Wang 已提交
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
#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
  }
3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716

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

5359
  if (TSDB_CODE_SUCCESS == pCxt->errCode) {
5360
    if(TOKEN.z) {
5361
      pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR, TOKEN.z);
5362
    } else {
5363
      pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INCOMPLETE_SQL);
5364
    }
5365 5366
  } 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);
5367 5368
  }
/************ End %syntax_error code ******************************************/
X
Xiaoyu Wang 已提交
5369 5370
  ParseARG_STORE /* Suppress warning about unused %extra_argument variable */
  ParseCTX_STORE
5371 5372 5373 5374 5375 5376 5377 5378
}

/*
** The following is executed when the parser accepts
*/
static void yy_accept(
  yyParser *yypParser           /* The parser */
){
X
Xiaoyu Wang 已提交
5379 5380
  ParseARG_FETCH
  ParseCTX_FETCH
5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393
#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 已提交
5394 5395
  ParseARG_STORE /* Suppress warning about unused %extra_argument variable */
  ParseCTX_STORE
5396 5397 5398 5399
}

/* The main parser program.
** The first argument is a pointer to a structure obtained from
X
Xiaoyu Wang 已提交
5400
** "ParseAlloc" which describes the current state of the parser.
5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416
** 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 已提交
5417
void Parse(
5418 5419
  void *yyp,                   /* The parser */
  int yymajor,                 /* The major token code number */
X
Xiaoyu Wang 已提交
5420 5421
  ParseTOKENTYPE yyminor       /* The value for the token */
  ParseARG_PDECL               /* Optional %extra_argument parameter */
5422 5423 5424 5425 5426 5427 5428 5429 5430 5431
){
  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 已提交
5432 5433
  ParseCTX_FETCH
  ParseARG_STORE
5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452

  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 已提交
5453
  do{
5454 5455 5456
    assert( yyact==yypParser->yytos->stateno );
    yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact);
    if( yyact >= YY_MIN_REDUCE ){
X
Xiaoyu Wang 已提交
5457 5458
      yyact = yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor,
                        yyminor ParseCTX_PARAM);
5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513
    }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 已提交
5514 5515 5516 5517 5518
        while( yypParser->yytos >= yypParser->yystack
            && (yyact = yy_find_reduce_action(
                        yypParser->yytos->stateno,
                        YYERRORSYMBOL)) > YY_MAX_SHIFTREDUCE
        ){
5519 5520
          yy_pop_parser_stack(yypParser);
        }
X
Xiaoyu Wang 已提交
5521
        if( yypParser->yytos < yypParser->yystack || yymajor==0 ){
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
          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 已提交
5571
  }while( yypParser->yytos>yypParser->yystack );
5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590
#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 已提交
5591
int ParseFallback(int iToken){
5592
#ifdef YYFALLBACK
X
Xiaoyu Wang 已提交
5593 5594 5595
  if( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) ){
    return yyFallback[iToken];
  }
5596 5597
#else
  (void)iToken;
5598
#endif
X
Xiaoyu Wang 已提交
5599
  return 0;
5600
}