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

#ifndef NDEBUG
/* For tracing reduce actions, the names of all rules are required.
*/
static const char *const yyRuleName[] = {
1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684
 /*   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 已提交
1685
 /*  24 */ "cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt",
1686
 /*  25 */ "cmd ::= ALTER USER user_name PASS NK_STRING",
X
Xiaoyu Wang 已提交
1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726
 /*  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",
 /*  35 */ "priv_type_list ::= priv_type",
 /*  36 */ "priv_type_list ::= priv_type_list NK_COMMA priv_type",
 /*  37 */ "priv_type ::= READ",
 /*  38 */ "priv_type ::= WRITE",
 /*  39 */ "priv_level ::= NK_STAR NK_DOT NK_STAR",
 /*  40 */ "priv_level ::= db_name NK_DOT NK_STAR",
 /*  41 */ "cmd ::= CREATE DNODE dnode_endpoint",
 /*  42 */ "cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER",
 /*  43 */ "cmd ::= DROP DNODE NK_INTEGER",
 /*  44 */ "cmd ::= DROP DNODE dnode_endpoint",
 /*  45 */ "cmd ::= ALTER DNODE NK_INTEGER NK_STRING",
 /*  46 */ "cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING",
 /*  47 */ "cmd ::= ALTER ALL DNODES NK_STRING",
 /*  48 */ "cmd ::= ALTER ALL DNODES NK_STRING NK_STRING",
 /*  49 */ "dnode_endpoint ::= NK_STRING",
 /*  50 */ "dnode_endpoint ::= NK_ID",
 /*  51 */ "dnode_endpoint ::= NK_IPTOKEN",
 /*  52 */ "cmd ::= ALTER LOCAL NK_STRING",
 /*  53 */ "cmd ::= ALTER LOCAL NK_STRING NK_STRING",
 /*  54 */ "cmd ::= CREATE QNODE ON DNODE NK_INTEGER",
 /*  55 */ "cmd ::= DROP QNODE ON DNODE NK_INTEGER",
 /*  56 */ "cmd ::= CREATE BNODE ON DNODE NK_INTEGER",
 /*  57 */ "cmd ::= DROP BNODE ON DNODE NK_INTEGER",
 /*  58 */ "cmd ::= CREATE SNODE ON DNODE NK_INTEGER",
 /*  59 */ "cmd ::= DROP SNODE ON DNODE NK_INTEGER",
 /*  60 */ "cmd ::= CREATE MNODE ON DNODE NK_INTEGER",
 /*  61 */ "cmd ::= DROP MNODE ON DNODE NK_INTEGER",
 /*  62 */ "cmd ::= CREATE DATABASE not_exists_opt db_name db_options",
 /*  63 */ "cmd ::= DROP DATABASE exists_opt db_name",
 /*  64 */ "cmd ::= USE db_name",
 /*  65 */ "cmd ::= ALTER DATABASE db_name alter_db_options",
X
Xiaoyu Wang 已提交
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 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930
 /*  66 */ "cmd ::= FLUSH DATABASE db_name",
 /*  67 */ "not_exists_opt ::= IF NOT EXISTS",
 /*  68 */ "not_exists_opt ::=",
 /*  69 */ "exists_opt ::= IF EXISTS",
 /*  70 */ "exists_opt ::=",
 /*  71 */ "db_options ::=",
 /*  72 */ "db_options ::= db_options BUFFER NK_INTEGER",
 /*  73 */ "db_options ::= db_options CACHELAST NK_INTEGER",
 /*  74 */ "db_options ::= db_options COMP NK_INTEGER",
 /*  75 */ "db_options ::= db_options DURATION NK_INTEGER",
 /*  76 */ "db_options ::= db_options DURATION NK_VARIABLE",
 /*  77 */ "db_options ::= db_options FSYNC NK_INTEGER",
 /*  78 */ "db_options ::= db_options MAXROWS NK_INTEGER",
 /*  79 */ "db_options ::= db_options MINROWS NK_INTEGER",
 /*  80 */ "db_options ::= db_options KEEP integer_list",
 /*  81 */ "db_options ::= db_options KEEP variable_list",
 /*  82 */ "db_options ::= db_options PAGES NK_INTEGER",
 /*  83 */ "db_options ::= db_options PAGESIZE NK_INTEGER",
 /*  84 */ "db_options ::= db_options PRECISION NK_STRING",
 /*  85 */ "db_options ::= db_options REPLICA NK_INTEGER",
 /*  86 */ "db_options ::= db_options STRICT NK_INTEGER",
 /*  87 */ "db_options ::= db_options WAL NK_INTEGER",
 /*  88 */ "db_options ::= db_options VGROUPS NK_INTEGER",
 /*  89 */ "db_options ::= db_options SINGLE_STABLE NK_INTEGER",
 /*  90 */ "db_options ::= db_options RETENTIONS retention_list",
 /*  91 */ "db_options ::= db_options SCHEMALESS NK_INTEGER",
 /*  92 */ "alter_db_options ::= alter_db_option",
 /*  93 */ "alter_db_options ::= alter_db_options alter_db_option",
 /*  94 */ "alter_db_option ::= BUFFER NK_INTEGER",
 /*  95 */ "alter_db_option ::= CACHELAST NK_INTEGER",
 /*  96 */ "alter_db_option ::= FSYNC NK_INTEGER",
 /*  97 */ "alter_db_option ::= KEEP integer_list",
 /*  98 */ "alter_db_option ::= KEEP variable_list",
 /*  99 */ "alter_db_option ::= PAGES NK_INTEGER",
 /* 100 */ "alter_db_option ::= REPLICA NK_INTEGER",
 /* 101 */ "alter_db_option ::= STRICT NK_INTEGER",
 /* 102 */ "alter_db_option ::= WAL NK_INTEGER",
 /* 103 */ "integer_list ::= NK_INTEGER",
 /* 104 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER",
 /* 105 */ "variable_list ::= NK_VARIABLE",
 /* 106 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE",
 /* 107 */ "retention_list ::= retention",
 /* 108 */ "retention_list ::= retention_list NK_COMMA retention",
 /* 109 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE",
 /* 110 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options",
 /* 111 */ "cmd ::= CREATE TABLE multi_create_clause",
 /* 112 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options",
 /* 113 */ "cmd ::= DROP TABLE multi_drop_clause",
 /* 114 */ "cmd ::= DROP STABLE exists_opt full_table_name",
 /* 115 */ "cmd ::= ALTER TABLE alter_table_clause",
 /* 116 */ "cmd ::= ALTER STABLE alter_table_clause",
 /* 117 */ "alter_table_clause ::= full_table_name alter_table_options",
 /* 118 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name",
 /* 119 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name",
 /* 120 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name",
 /* 121 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name",
 /* 122 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name",
 /* 123 */ "alter_table_clause ::= full_table_name DROP TAG column_name",
 /* 124 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name",
 /* 125 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name",
 /* 126 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal",
 /* 127 */ "multi_create_clause ::= create_subtable_clause",
 /* 128 */ "multi_create_clause ::= multi_create_clause create_subtable_clause",
 /* 129 */ "create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP table_options",
 /* 130 */ "multi_drop_clause ::= drop_table_clause",
 /* 131 */ "multi_drop_clause ::= multi_drop_clause drop_table_clause",
 /* 132 */ "drop_table_clause ::= exists_opt full_table_name",
 /* 133 */ "specific_tags_opt ::=",
 /* 134 */ "specific_tags_opt ::= NK_LP col_name_list NK_RP",
 /* 135 */ "full_table_name ::= table_name",
 /* 136 */ "full_table_name ::= db_name NK_DOT table_name",
 /* 137 */ "column_def_list ::= column_def",
 /* 138 */ "column_def_list ::= column_def_list NK_COMMA column_def",
 /* 139 */ "column_def ::= column_name type_name",
 /* 140 */ "column_def ::= column_name type_name COMMENT NK_STRING",
 /* 141 */ "type_name ::= BOOL",
 /* 142 */ "type_name ::= TINYINT",
 /* 143 */ "type_name ::= SMALLINT",
 /* 144 */ "type_name ::= INT",
 /* 145 */ "type_name ::= INTEGER",
 /* 146 */ "type_name ::= BIGINT",
 /* 147 */ "type_name ::= FLOAT",
 /* 148 */ "type_name ::= DOUBLE",
 /* 149 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP",
 /* 150 */ "type_name ::= TIMESTAMP",
 /* 151 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP",
 /* 152 */ "type_name ::= TINYINT UNSIGNED",
 /* 153 */ "type_name ::= SMALLINT UNSIGNED",
 /* 154 */ "type_name ::= INT UNSIGNED",
 /* 155 */ "type_name ::= BIGINT UNSIGNED",
 /* 156 */ "type_name ::= JSON",
 /* 157 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP",
 /* 158 */ "type_name ::= MEDIUMBLOB",
 /* 159 */ "type_name ::= BLOB",
 /* 160 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP",
 /* 161 */ "type_name ::= DECIMAL",
 /* 162 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP",
 /* 163 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP",
 /* 164 */ "tags_def_opt ::=",
 /* 165 */ "tags_def_opt ::= tags_def",
 /* 166 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP",
 /* 167 */ "table_options ::=",
 /* 168 */ "table_options ::= table_options COMMENT NK_STRING",
 /* 169 */ "table_options ::= table_options MAX_DELAY duration_list",
 /* 170 */ "table_options ::= table_options WATERMARK duration_list",
 /* 171 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP",
 /* 172 */ "table_options ::= table_options TTL NK_INTEGER",
 /* 173 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP",
 /* 174 */ "alter_table_options ::= alter_table_option",
 /* 175 */ "alter_table_options ::= alter_table_options alter_table_option",
 /* 176 */ "alter_table_option ::= COMMENT NK_STRING",
 /* 177 */ "alter_table_option ::= TTL NK_INTEGER",
 /* 178 */ "duration_list ::= duration_literal",
 /* 179 */ "duration_list ::= duration_list NK_COMMA duration_literal",
 /* 180 */ "rollup_func_list ::= rollup_func_name",
 /* 181 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name",
 /* 182 */ "rollup_func_name ::= function_name",
 /* 183 */ "rollup_func_name ::= FIRST",
 /* 184 */ "rollup_func_name ::= LAST",
 /* 185 */ "col_name_list ::= col_name",
 /* 186 */ "col_name_list ::= col_name_list NK_COMMA col_name",
 /* 187 */ "col_name ::= column_name",
 /* 188 */ "cmd ::= SHOW DNODES",
 /* 189 */ "cmd ::= SHOW USERS",
 /* 190 */ "cmd ::= SHOW DATABASES",
 /* 191 */ "cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt",
 /* 192 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt",
 /* 193 */ "cmd ::= SHOW db_name_cond_opt VGROUPS",
 /* 194 */ "cmd ::= SHOW MNODES",
 /* 195 */ "cmd ::= SHOW MODULES",
 /* 196 */ "cmd ::= SHOW QNODES",
 /* 197 */ "cmd ::= SHOW FUNCTIONS",
 /* 198 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt",
 /* 199 */ "cmd ::= SHOW STREAMS",
 /* 200 */ "cmd ::= SHOW ACCOUNTS",
 /* 201 */ "cmd ::= SHOW APPS",
 /* 202 */ "cmd ::= SHOW CONNECTIONS",
 /* 203 */ "cmd ::= SHOW LICENCE",
 /* 204 */ "cmd ::= SHOW GRANTS",
 /* 205 */ "cmd ::= SHOW CREATE DATABASE db_name",
 /* 206 */ "cmd ::= SHOW CREATE TABLE full_table_name",
 /* 207 */ "cmd ::= SHOW CREATE STABLE full_table_name",
 /* 208 */ "cmd ::= SHOW QUERIES",
 /* 209 */ "cmd ::= SHOW SCORES",
 /* 210 */ "cmd ::= SHOW TOPICS",
 /* 211 */ "cmd ::= SHOW VARIABLES",
 /* 212 */ "cmd ::= SHOW LOCAL VARIABLES",
 /* 213 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES",
 /* 214 */ "cmd ::= SHOW BNODES",
 /* 215 */ "cmd ::= SHOW SNODES",
 /* 216 */ "cmd ::= SHOW CLUSTER",
 /* 217 */ "cmd ::= SHOW TRANSACTIONS",
 /* 218 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name",
 /* 219 */ "cmd ::= SHOW CONSUMERS",
 /* 220 */ "cmd ::= SHOW SUBSCRIPTIONS",
 /* 221 */ "db_name_cond_opt ::=",
 /* 222 */ "db_name_cond_opt ::= db_name NK_DOT",
 /* 223 */ "like_pattern_opt ::=",
 /* 224 */ "like_pattern_opt ::= LIKE NK_STRING",
 /* 225 */ "table_name_cond ::= table_name",
 /* 226 */ "from_db_opt ::=",
 /* 227 */ "from_db_opt ::= FROM db_name",
 /* 228 */ "cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options",
 /* 229 */ "cmd ::= DROP INDEX exists_opt index_name",
 /* 230 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt",
 /* 231 */ "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",
 /* 232 */ "func_list ::= func",
 /* 233 */ "func_list ::= func_list NK_COMMA func",
 /* 234 */ "func ::= function_name NK_LP expression_list NK_RP",
 /* 235 */ "sma_stream_opt ::=",
 /* 236 */ "sma_stream_opt ::= stream_options WATERMARK duration_literal",
 /* 237 */ "sma_stream_opt ::= stream_options MAX_DELAY duration_literal",
 /* 238 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression",
 /* 239 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name",
 /* 240 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name",
 /* 241 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name",
 /* 242 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name",
 /* 243 */ "cmd ::= DROP TOPIC exists_opt topic_name",
 /* 244 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name",
 /* 245 */ "cmd ::= DESC full_table_name",
 /* 246 */ "cmd ::= DESCRIBE full_table_name",
 /* 247 */ "cmd ::= RESET QUERY CACHE",
 /* 248 */ "cmd ::= EXPLAIN analyze_opt explain_options query_expression",
 /* 249 */ "analyze_opt ::=",
 /* 250 */ "analyze_opt ::= ANALYZE",
 /* 251 */ "explain_options ::=",
 /* 252 */ "explain_options ::= explain_options VERBOSE NK_BOOL",
 /* 253 */ "explain_options ::= explain_options RATIO NK_FLOAT",
 /* 254 */ "cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP",
 /* 255 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt",
 /* 256 */ "cmd ::= DROP FUNCTION exists_opt function_name",
 /* 257 */ "agg_func_opt ::=",
 /* 258 */ "agg_func_opt ::= AGGREGATE",
 /* 259 */ "bufsize_opt ::=",
 /* 260 */ "bufsize_opt ::= BUFSIZE NK_INTEGER",
 /* 261 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression",
 /* 262 */ "cmd ::= DROP STREAM exists_opt stream_name",
 /* 263 */ "into_opt ::=",
 /* 264 */ "into_opt ::= INTO full_table_name",
 /* 265 */ "stream_options ::=",
 /* 266 */ "stream_options ::= stream_options TRIGGER AT_ONCE",
 /* 267 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE",
 /* 268 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal",
 /* 269 */ "stream_options ::= stream_options WATERMARK duration_literal",
X
Xiaoyu Wang 已提交
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 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 2138 2139 2140 2141 2142 2143 2144
 /* 270 */ "stream_options ::= stream_options IGNORE EXPIRED",
 /* 271 */ "cmd ::= KILL CONNECTION NK_INTEGER",
 /* 272 */ "cmd ::= KILL QUERY NK_STRING",
 /* 273 */ "cmd ::= KILL TRANSACTION NK_INTEGER",
 /* 274 */ "cmd ::= BALANCE VGROUP",
 /* 275 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER",
 /* 276 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list",
 /* 277 */ "cmd ::= SPLIT VGROUP NK_INTEGER",
 /* 278 */ "dnode_list ::= DNODE NK_INTEGER",
 /* 279 */ "dnode_list ::= dnode_list DNODE NK_INTEGER",
 /* 280 */ "cmd ::= SYNCDB db_name REPLICA",
 /* 281 */ "cmd ::= DELETE FROM full_table_name where_clause_opt",
 /* 282 */ "cmd ::= query_expression",
 /* 283 */ "literal ::= NK_INTEGER",
 /* 284 */ "literal ::= NK_FLOAT",
 /* 285 */ "literal ::= NK_STRING",
 /* 286 */ "literal ::= NK_BOOL",
 /* 287 */ "literal ::= TIMESTAMP NK_STRING",
 /* 288 */ "literal ::= duration_literal",
 /* 289 */ "literal ::= NULL",
 /* 290 */ "literal ::= NK_QUESTION",
 /* 291 */ "duration_literal ::= NK_VARIABLE",
 /* 292 */ "signed ::= NK_INTEGER",
 /* 293 */ "signed ::= NK_PLUS NK_INTEGER",
 /* 294 */ "signed ::= NK_MINUS NK_INTEGER",
 /* 295 */ "signed ::= NK_FLOAT",
 /* 296 */ "signed ::= NK_PLUS NK_FLOAT",
 /* 297 */ "signed ::= NK_MINUS NK_FLOAT",
 /* 298 */ "signed_literal ::= signed",
 /* 299 */ "signed_literal ::= NK_STRING",
 /* 300 */ "signed_literal ::= NK_BOOL",
 /* 301 */ "signed_literal ::= TIMESTAMP NK_STRING",
 /* 302 */ "signed_literal ::= duration_literal",
 /* 303 */ "signed_literal ::= NULL",
 /* 304 */ "signed_literal ::= literal_func",
 /* 305 */ "literal_list ::= signed_literal",
 /* 306 */ "literal_list ::= literal_list NK_COMMA signed_literal",
 /* 307 */ "db_name ::= NK_ID",
 /* 308 */ "table_name ::= NK_ID",
 /* 309 */ "column_name ::= NK_ID",
 /* 310 */ "function_name ::= NK_ID",
 /* 311 */ "table_alias ::= NK_ID",
 /* 312 */ "column_alias ::= NK_ID",
 /* 313 */ "user_name ::= NK_ID",
 /* 314 */ "index_name ::= NK_ID",
 /* 315 */ "topic_name ::= NK_ID",
 /* 316 */ "stream_name ::= NK_ID",
 /* 317 */ "cgroup_name ::= NK_ID",
 /* 318 */ "expression ::= literal",
 /* 319 */ "expression ::= pseudo_column",
 /* 320 */ "expression ::= column_reference",
 /* 321 */ "expression ::= function_expression",
 /* 322 */ "expression ::= subquery",
 /* 323 */ "expression ::= NK_LP expression NK_RP",
 /* 324 */ "expression ::= NK_PLUS expression",
 /* 325 */ "expression ::= NK_MINUS expression",
 /* 326 */ "expression ::= expression NK_PLUS expression",
 /* 327 */ "expression ::= expression NK_MINUS expression",
 /* 328 */ "expression ::= expression NK_STAR expression",
 /* 329 */ "expression ::= expression NK_SLASH expression",
 /* 330 */ "expression ::= expression NK_REM expression",
 /* 331 */ "expression ::= column_reference NK_ARROW NK_STRING",
 /* 332 */ "expression ::= expression NK_BITAND expression",
 /* 333 */ "expression ::= expression NK_BITOR expression",
 /* 334 */ "expression_list ::= expression",
 /* 335 */ "expression_list ::= expression_list NK_COMMA expression",
 /* 336 */ "column_reference ::= column_name",
 /* 337 */ "column_reference ::= table_name NK_DOT column_name",
 /* 338 */ "pseudo_column ::= ROWTS",
 /* 339 */ "pseudo_column ::= TBNAME",
 /* 340 */ "pseudo_column ::= table_name NK_DOT TBNAME",
 /* 341 */ "pseudo_column ::= QSTARTTS",
 /* 342 */ "pseudo_column ::= QENDTS",
 /* 343 */ "pseudo_column ::= WSTARTTS",
 /* 344 */ "pseudo_column ::= WENDTS",
 /* 345 */ "pseudo_column ::= WDURATION",
 /* 346 */ "function_expression ::= function_name NK_LP expression_list NK_RP",
 /* 347 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP",
 /* 348 */ "function_expression ::= CAST NK_LP expression AS type_name NK_RP",
 /* 349 */ "function_expression ::= literal_func",
 /* 350 */ "literal_func ::= noarg_func NK_LP NK_RP",
 /* 351 */ "literal_func ::= NOW",
 /* 352 */ "noarg_func ::= NOW",
 /* 353 */ "noarg_func ::= TODAY",
 /* 354 */ "noarg_func ::= TIMEZONE",
 /* 355 */ "noarg_func ::= DATABASE",
 /* 356 */ "noarg_func ::= CLIENT_VERSION",
 /* 357 */ "noarg_func ::= SERVER_VERSION",
 /* 358 */ "noarg_func ::= SERVER_STATUS",
 /* 359 */ "noarg_func ::= CURRENT_USER",
 /* 360 */ "noarg_func ::= USER",
 /* 361 */ "star_func ::= COUNT",
 /* 362 */ "star_func ::= FIRST",
 /* 363 */ "star_func ::= LAST",
 /* 364 */ "star_func ::= LAST_ROW",
 /* 365 */ "star_func_para_list ::= NK_STAR",
 /* 366 */ "star_func_para_list ::= other_para_list",
 /* 367 */ "other_para_list ::= star_func_para",
 /* 368 */ "other_para_list ::= other_para_list NK_COMMA star_func_para",
 /* 369 */ "star_func_para ::= expression",
 /* 370 */ "star_func_para ::= table_name NK_DOT NK_STAR",
 /* 371 */ "predicate ::= expression compare_op expression",
 /* 372 */ "predicate ::= expression BETWEEN expression AND expression",
 /* 373 */ "predicate ::= expression NOT BETWEEN expression AND expression",
 /* 374 */ "predicate ::= expression IS NULL",
 /* 375 */ "predicate ::= expression IS NOT NULL",
 /* 376 */ "predicate ::= expression in_op in_predicate_value",
 /* 377 */ "compare_op ::= NK_LT",
 /* 378 */ "compare_op ::= NK_GT",
 /* 379 */ "compare_op ::= NK_LE",
 /* 380 */ "compare_op ::= NK_GE",
 /* 381 */ "compare_op ::= NK_NE",
 /* 382 */ "compare_op ::= NK_EQ",
 /* 383 */ "compare_op ::= LIKE",
 /* 384 */ "compare_op ::= NOT LIKE",
 /* 385 */ "compare_op ::= MATCH",
 /* 386 */ "compare_op ::= NMATCH",
 /* 387 */ "compare_op ::= CONTAINS",
 /* 388 */ "in_op ::= IN",
 /* 389 */ "in_op ::= NOT IN",
 /* 390 */ "in_predicate_value ::= NK_LP expression_list NK_RP",
 /* 391 */ "boolean_value_expression ::= boolean_primary",
 /* 392 */ "boolean_value_expression ::= NOT boolean_primary",
 /* 393 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression",
 /* 394 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression",
 /* 395 */ "boolean_primary ::= predicate",
 /* 396 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP",
 /* 397 */ "common_expression ::= expression",
 /* 398 */ "common_expression ::= boolean_value_expression",
 /* 399 */ "from_clause_opt ::=",
 /* 400 */ "from_clause_opt ::= FROM table_reference_list",
 /* 401 */ "table_reference_list ::= table_reference",
 /* 402 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference",
 /* 403 */ "table_reference ::= table_primary",
 /* 404 */ "table_reference ::= joined_table",
 /* 405 */ "table_primary ::= table_name alias_opt",
 /* 406 */ "table_primary ::= db_name NK_DOT table_name alias_opt",
 /* 407 */ "table_primary ::= subquery alias_opt",
 /* 408 */ "table_primary ::= parenthesized_joined_table",
 /* 409 */ "alias_opt ::=",
 /* 410 */ "alias_opt ::= table_alias",
 /* 411 */ "alias_opt ::= AS table_alias",
 /* 412 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP",
 /* 413 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP",
 /* 414 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition",
 /* 415 */ "join_type ::=",
 /* 416 */ "join_type ::= INNER",
 /* 417 */ "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",
 /* 418 */ "set_quantifier_opt ::=",
 /* 419 */ "set_quantifier_opt ::= DISTINCT",
 /* 420 */ "set_quantifier_opt ::= ALL",
 /* 421 */ "select_list ::= select_item",
 /* 422 */ "select_list ::= select_list NK_COMMA select_item",
 /* 423 */ "select_item ::= NK_STAR",
 /* 424 */ "select_item ::= common_expression",
 /* 425 */ "select_item ::= common_expression column_alias",
 /* 426 */ "select_item ::= common_expression AS column_alias",
 /* 427 */ "select_item ::= table_name NK_DOT NK_STAR",
 /* 428 */ "where_clause_opt ::=",
 /* 429 */ "where_clause_opt ::= WHERE search_condition",
 /* 430 */ "partition_by_clause_opt ::=",
 /* 431 */ "partition_by_clause_opt ::= PARTITION BY expression_list",
 /* 432 */ "twindow_clause_opt ::=",
 /* 433 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP",
 /* 434 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP",
 /* 435 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt",
 /* 436 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt",
 /* 437 */ "sliding_opt ::=",
 /* 438 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP",
 /* 439 */ "fill_opt ::=",
 /* 440 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP",
 /* 441 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP",
 /* 442 */ "fill_mode ::= NONE",
 /* 443 */ "fill_mode ::= PREV",
 /* 444 */ "fill_mode ::= NULL",
 /* 445 */ "fill_mode ::= LINEAR",
 /* 446 */ "fill_mode ::= NEXT",
 /* 447 */ "group_by_clause_opt ::=",
 /* 448 */ "group_by_clause_opt ::= GROUP BY group_by_list",
 /* 449 */ "group_by_list ::= expression",
 /* 450 */ "group_by_list ::= group_by_list NK_COMMA expression",
 /* 451 */ "having_clause_opt ::=",
 /* 452 */ "having_clause_opt ::= HAVING search_condition",
 /* 453 */ "range_opt ::=",
 /* 454 */ "range_opt ::= RANGE NK_LP expression NK_COMMA expression NK_RP",
 /* 455 */ "every_opt ::=",
 /* 456 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP",
 /* 457 */ "query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt",
 /* 458 */ "query_expression_body ::= query_primary",
 /* 459 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body",
 /* 460 */ "query_expression_body ::= query_expression_body UNION query_expression_body",
 /* 461 */ "query_primary ::= query_specification",
 /* 462 */ "query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP",
 /* 463 */ "order_by_clause_opt ::=",
 /* 464 */ "order_by_clause_opt ::= ORDER BY sort_specification_list",
 /* 465 */ "slimit_clause_opt ::=",
 /* 466 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER",
 /* 467 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER",
 /* 468 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER",
 /* 469 */ "limit_clause_opt ::=",
 /* 470 */ "limit_clause_opt ::= LIMIT NK_INTEGER",
 /* 471 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER",
 /* 472 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER",
 /* 473 */ "subquery ::= NK_LP query_expression NK_RP",
 /* 474 */ "search_condition ::= common_expression",
 /* 475 */ "sort_specification_list ::= sort_specification",
 /* 476 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification",
 /* 477 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt",
 /* 478 */ "ordering_specification_opt ::=",
 /* 479 */ "ordering_specification_opt ::= ASC",
 /* 480 */ "ordering_specification_opt ::= DESC",
 /* 481 */ "null_ordering_opt ::=",
 /* 482 */ "null_ordering_opt ::= NULLS FIRST",
 /* 483 */ "null_ordering_opt ::= NULLS LAST",
2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161
};
#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 已提交
2162
    pNew = malloc(newSize*sizeof(pNew[0]));
2163 2164
    if( pNew ) pNew[0] = p->yystk0;
  }else{
X
Xiaoyu Wang 已提交
2165
    pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182
  }
  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 已提交
2183
** second argument to ParseAlloc() below.  This can be changed by
2184 2185 2186 2187 2188 2189 2190 2191 2192
** 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 已提交
2193
void ParseInit(void *yypRawParser ParseCTX_PDECL){
2194
  yyParser *yypParser = (yyParser*)yypRawParser;
X
Xiaoyu Wang 已提交
2195
  ParseCTX_STORE
2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218
#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 已提交
2219
#ifndef Parse_ENGINEALWAYSONSTACK
2220 2221 2222 2223 2224 2225 2226 2227 2228 2229
/* 
** 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 已提交
2230
** to Parse and ParseFree.
2231
*/
X
Xiaoyu Wang 已提交
2232
void *ParseAlloc(void *(*mallocProc)(YYMALLOCARGTYPE) ParseCTX_PDECL){
2233 2234 2235
  yyParser *yypParser;
  yypParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
  if( yypParser ){
X
Xiaoyu Wang 已提交
2236 2237
    ParseCTX_STORE
    ParseInit(yypParser ParseCTX_PARAM);
2238 2239 2240
  }
  return (void*)yypParser;
}
X
Xiaoyu Wang 已提交
2241
#endif /* Parse_ENGINEALWAYSONSTACK */
2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255


/* 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 已提交
2256 2257
  ParseARG_FETCH
  ParseCTX_FETCH
2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270
  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 已提交
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
    case 253: /* cmd */
    case 256: /* literal */
    case 267: /* db_options */
    case 269: /* alter_db_options */
    case 274: /* retention */
    case 275: /* full_table_name */
    case 278: /* table_options */
    case 282: /* alter_table_clause */
    case 283: /* alter_table_options */
    case 286: /* signed_literal */
    case 287: /* create_subtable_clause */
    case 290: /* drop_table_clause */
    case 293: /* column_def */
    case 297: /* duration_literal */
    case 298: /* rollup_func_name */
    case 300: /* col_name */
    case 301: /* db_name_cond_opt */
    case 302: /* like_pattern_opt */
    case 303: /* table_name_cond */
    case 304: /* from_db_opt */
    case 306: /* index_options */
    case 308: /* sliding_opt */
    case 309: /* sma_stream_opt */
    case 310: /* func */
    case 312: /* stream_options */
    case 314: /* query_expression */
    case 317: /* explain_options */
    case 321: /* into_opt */
    case 323: /* where_clause_opt */
    case 324: /* signed */
    case 325: /* literal_func */
    case 328: /* expression */
    case 329: /* pseudo_column */
    case 330: /* column_reference */
    case 331: /* function_expression */
    case 332: /* subquery */
    case 337: /* star_func_para */
    case 338: /* predicate */
    case 341: /* in_predicate_value */
    case 342: /* boolean_value_expression */
    case 343: /* boolean_primary */
    case 344: /* common_expression */
    case 345: /* from_clause_opt */
    case 346: /* table_reference_list */
    case 347: /* table_reference */
    case 348: /* table_primary */
    case 349: /* joined_table */
    case 351: /* parenthesized_joined_table */
    case 353: /* search_condition */
    case 354: /* query_specification */
    case 358: /* range_opt */
    case 359: /* every_opt */
    case 360: /* fill_opt */
    case 361: /* twindow_clause_opt */
    case 363: /* having_clause_opt */
    case 364: /* select_item */
    case 367: /* query_expression_body */
    case 369: /* slimit_clause_opt */
    case 370: /* limit_clause_opt */
    case 371: /* query_primary */
    case 373: /* sort_specification */
X
Xiaoyu Wang 已提交
2332
{
X
Xiaoyu Wang 已提交
2333
 nodesDestroyNode((yypminor->yy248)); 
X
Xiaoyu Wang 已提交
2334 2335
}
      break;
X
Xiaoyu Wang 已提交
2336 2337 2338 2339
    case 254: /* account_options */
    case 255: /* alter_account_options */
    case 257: /* alter_account_option */
    case 319: /* bufsize_opt */
2340
{
X
Xiaoyu Wang 已提交
2341
 
2342 2343
}
      break;
X
Xiaoyu Wang 已提交
2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359
    case 258: /* user_name */
    case 261: /* priv_level */
    case 264: /* db_name */
    case 265: /* dnode_endpoint */
    case 284: /* column_name */
    case 292: /* table_name */
    case 299: /* function_name */
    case 305: /* index_name */
    case 313: /* topic_name */
    case 315: /* cgroup_name */
    case 320: /* stream_name */
    case 326: /* table_alias */
    case 327: /* column_alias */
    case 333: /* star_func */
    case 335: /* noarg_func */
    case 350: /* alias_opt */
2360
{
2361
 
2362 2363
}
      break;
X
Xiaoyu Wang 已提交
2364
    case 259: /* sysinfo_opt */
2365
{
2366
 
2367 2368
}
      break;
X
Xiaoyu Wang 已提交
2369 2370 2371
    case 260: /* privileges */
    case 262: /* priv_type_list */
    case 263: /* priv_type */
2372
{
2373
 
2374 2375
}
      break;
X
Xiaoyu Wang 已提交
2376 2377 2378 2379 2380
    case 266: /* not_exists_opt */
    case 268: /* exists_opt */
    case 316: /* analyze_opt */
    case 318: /* agg_func_opt */
    case 355: /* set_quantifier_opt */
2381
{
2382 2383 2384
 
}
      break;
X
Xiaoyu Wang 已提交
2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408
    case 270: /* integer_list */
    case 271: /* variable_list */
    case 272: /* retention_list */
    case 276: /* column_def_list */
    case 277: /* tags_def_opt */
    case 279: /* multi_create_clause */
    case 280: /* tags_def */
    case 281: /* multi_drop_clause */
    case 288: /* specific_tags_opt */
    case 289: /* literal_list */
    case 291: /* col_name_list */
    case 294: /* duration_list */
    case 295: /* rollup_func_list */
    case 307: /* func_list */
    case 311: /* expression_list */
    case 322: /* dnode_list */
    case 334: /* star_func_para_list */
    case 336: /* other_para_list */
    case 356: /* select_list */
    case 357: /* partition_by_clause_opt */
    case 362: /* group_by_clause_opt */
    case 366: /* group_by_list */
    case 368: /* order_by_clause_opt */
    case 372: /* sort_specification_list */
2409
{
X
Xiaoyu Wang 已提交
2410
 nodesDestroyList((yypminor->yy552)); 
2411 2412
}
      break;
X
Xiaoyu Wang 已提交
2413 2414
    case 273: /* alter_db_option */
    case 296: /* alter_table_option */
2415
{
X
Xiaoyu Wang 已提交
2416
 
2417 2418
}
      break;
X
Xiaoyu Wang 已提交
2419
    case 285: /* type_name */
2420
{
2421
 
2422 2423
}
      break;
X
Xiaoyu Wang 已提交
2424 2425
    case 339: /* compare_op */
    case 340: /* in_op */
2426
{
2427
 
2428 2429
}
      break;
X
Xiaoyu Wang 已提交
2430
    case 352: /* join_type */
2431
{
2432
 
2433 2434
}
      break;
X
Xiaoyu Wang 已提交
2435
    case 365: /* fill_mode */
2436
{
2437
 
2438 2439
}
      break;
X
Xiaoyu Wang 已提交
2440
    case 374: /* ordering_specification_opt */
2441
{
2442
 
2443 2444
}
      break;
X
Xiaoyu Wang 已提交
2445
    case 375: /* null_ordering_opt */
2446
{
2447
 
2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478
}
      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 已提交
2479
void ParseFinalize(void *p){
2480 2481 2482
  yyParser *pParser = (yyParser*)p;
  while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser);
#if YYSTACKDEPTH<=0
X
Xiaoyu Wang 已提交
2483
  if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack);
2484 2485 2486
#endif
}

X
Xiaoyu Wang 已提交
2487
#ifndef Parse_ENGINEALWAYSONSTACK
2488 2489 2490 2491 2492 2493 2494 2495
/* 
** 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 已提交
2496
void ParseFree(
2497 2498 2499 2500 2501 2502
  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 已提交
2503
  ParseFinalize(p);
2504 2505
  (*freeProc)(p);
}
X
Xiaoyu Wang 已提交
2506
#endif /* Parse_ENGINEALWAYSONSTACK */
2507 2508 2509 2510 2511

/*
** Return the peak depth of the stack for a parser.
*/
#ifdef YYTRACKMAXSTACKDEPTH
X
Xiaoyu Wang 已提交
2512
int ParseStackPeak(void *p){
2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535
  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 已提交
2536
int ParseCoverage(FILE *out){
2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572
  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 已提交
2573
    /* assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD ); */
2574 2575 2576
    assert( iLookAhead!=YYNOCODE );
    assert( iLookAhead < YYNTOKEN );
    i += iLookAhead;
X
Xiaoyu Wang 已提交
2577
    if( i>=YY_NLOOKAHEAD || yy_lookahead[i]!=iLookAhead ){
2578 2579
#ifdef YYFALLBACK
      YYCODETYPE iFallback;            /* Fallback token */
X
Xiaoyu Wang 已提交
2580 2581
      if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
             && (iFallback = yyFallback[iLookAhead])!=0 ){
2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595
#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 已提交
2596 2597 2598 2599 2600 2601 2602 2603 2604 2605
        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
        ){
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 2650 2651 2652 2653 2654 2655 2656 2657
#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 已提交
2658 2659
   ParseARG_FETCH
   ParseCTX_FETCH
2660 2661 2662 2663 2664 2665 2666 2667 2668 2669
#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 已提交
2670 2671
   ParseARG_STORE /* Suppress warning about unused %extra_argument var */
   ParseCTX_STORE
2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701
}

/*
** 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 已提交
2702
  ParseTOKENTYPE yyMinor        /* The minor token to shift in */
2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736
){
  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 已提交
2737 2738 2739 2740 2741 2742 2743
/* 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 已提交
2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 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 3028 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 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227
  {  253,   -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */
  {  253,   -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */
  {  254,    0 }, /* (2) account_options ::= */
  {  254,   -3 }, /* (3) account_options ::= account_options PPS literal */
  {  254,   -3 }, /* (4) account_options ::= account_options TSERIES literal */
  {  254,   -3 }, /* (5) account_options ::= account_options STORAGE literal */
  {  254,   -3 }, /* (6) account_options ::= account_options STREAMS literal */
  {  254,   -3 }, /* (7) account_options ::= account_options QTIME literal */
  {  254,   -3 }, /* (8) account_options ::= account_options DBS literal */
  {  254,   -3 }, /* (9) account_options ::= account_options USERS literal */
  {  254,   -3 }, /* (10) account_options ::= account_options CONNS literal */
  {  254,   -3 }, /* (11) account_options ::= account_options STATE literal */
  {  255,   -1 }, /* (12) alter_account_options ::= alter_account_option */
  {  255,   -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */
  {  257,   -2 }, /* (14) alter_account_option ::= PASS literal */
  {  257,   -2 }, /* (15) alter_account_option ::= PPS literal */
  {  257,   -2 }, /* (16) alter_account_option ::= TSERIES literal */
  {  257,   -2 }, /* (17) alter_account_option ::= STORAGE literal */
  {  257,   -2 }, /* (18) alter_account_option ::= STREAMS literal */
  {  257,   -2 }, /* (19) alter_account_option ::= QTIME literal */
  {  257,   -2 }, /* (20) alter_account_option ::= DBS literal */
  {  257,   -2 }, /* (21) alter_account_option ::= USERS literal */
  {  257,   -2 }, /* (22) alter_account_option ::= CONNS literal */
  {  257,   -2 }, /* (23) alter_account_option ::= STATE literal */
  {  253,   -6 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */
  {  253,   -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */
  {  253,   -5 }, /* (26) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */
  {  253,   -5 }, /* (27) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */
  {  253,   -3 }, /* (28) cmd ::= DROP USER user_name */
  {  259,    0 }, /* (29) sysinfo_opt ::= */
  {  259,   -2 }, /* (30) sysinfo_opt ::= SYSINFO NK_INTEGER */
  {  253,   -6 }, /* (31) cmd ::= GRANT privileges ON priv_level TO user_name */
  {  253,   -6 }, /* (32) cmd ::= REVOKE privileges ON priv_level FROM user_name */
  {  260,   -1 }, /* (33) privileges ::= ALL */
  {  260,   -1 }, /* (34) privileges ::= priv_type_list */
  {  262,   -1 }, /* (35) priv_type_list ::= priv_type */
  {  262,   -3 }, /* (36) priv_type_list ::= priv_type_list NK_COMMA priv_type */
  {  263,   -1 }, /* (37) priv_type ::= READ */
  {  263,   -1 }, /* (38) priv_type ::= WRITE */
  {  261,   -3 }, /* (39) priv_level ::= NK_STAR NK_DOT NK_STAR */
  {  261,   -3 }, /* (40) priv_level ::= db_name NK_DOT NK_STAR */
  {  253,   -3 }, /* (41) cmd ::= CREATE DNODE dnode_endpoint */
  {  253,   -5 }, /* (42) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */
  {  253,   -3 }, /* (43) cmd ::= DROP DNODE NK_INTEGER */
  {  253,   -3 }, /* (44) cmd ::= DROP DNODE dnode_endpoint */
  {  253,   -4 }, /* (45) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */
  {  253,   -5 }, /* (46) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */
  {  253,   -4 }, /* (47) cmd ::= ALTER ALL DNODES NK_STRING */
  {  253,   -5 }, /* (48) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */
  {  265,   -1 }, /* (49) dnode_endpoint ::= NK_STRING */
  {  265,   -1 }, /* (50) dnode_endpoint ::= NK_ID */
  {  265,   -1 }, /* (51) dnode_endpoint ::= NK_IPTOKEN */
  {  253,   -3 }, /* (52) cmd ::= ALTER LOCAL NK_STRING */
  {  253,   -4 }, /* (53) cmd ::= ALTER LOCAL NK_STRING NK_STRING */
  {  253,   -5 }, /* (54) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */
  {  253,   -5 }, /* (55) cmd ::= DROP QNODE ON DNODE NK_INTEGER */
  {  253,   -5 }, /* (56) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */
  {  253,   -5 }, /* (57) cmd ::= DROP BNODE ON DNODE NK_INTEGER */
  {  253,   -5 }, /* (58) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */
  {  253,   -5 }, /* (59) cmd ::= DROP SNODE ON DNODE NK_INTEGER */
  {  253,   -5 }, /* (60) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */
  {  253,   -5 }, /* (61) cmd ::= DROP MNODE ON DNODE NK_INTEGER */
  {  253,   -5 }, /* (62) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
  {  253,   -4 }, /* (63) cmd ::= DROP DATABASE exists_opt db_name */
  {  253,   -2 }, /* (64) cmd ::= USE db_name */
  {  253,   -4 }, /* (65) cmd ::= ALTER DATABASE db_name alter_db_options */
  {  253,   -3 }, /* (66) cmd ::= FLUSH DATABASE db_name */
  {  266,   -3 }, /* (67) not_exists_opt ::= IF NOT EXISTS */
  {  266,    0 }, /* (68) not_exists_opt ::= */
  {  268,   -2 }, /* (69) exists_opt ::= IF EXISTS */
  {  268,    0 }, /* (70) exists_opt ::= */
  {  267,    0 }, /* (71) db_options ::= */
  {  267,   -3 }, /* (72) db_options ::= db_options BUFFER NK_INTEGER */
  {  267,   -3 }, /* (73) db_options ::= db_options CACHELAST NK_INTEGER */
  {  267,   -3 }, /* (74) db_options ::= db_options COMP NK_INTEGER */
  {  267,   -3 }, /* (75) db_options ::= db_options DURATION NK_INTEGER */
  {  267,   -3 }, /* (76) db_options ::= db_options DURATION NK_VARIABLE */
  {  267,   -3 }, /* (77) db_options ::= db_options FSYNC NK_INTEGER */
  {  267,   -3 }, /* (78) db_options ::= db_options MAXROWS NK_INTEGER */
  {  267,   -3 }, /* (79) db_options ::= db_options MINROWS NK_INTEGER */
  {  267,   -3 }, /* (80) db_options ::= db_options KEEP integer_list */
  {  267,   -3 }, /* (81) db_options ::= db_options KEEP variable_list */
  {  267,   -3 }, /* (82) db_options ::= db_options PAGES NK_INTEGER */
  {  267,   -3 }, /* (83) db_options ::= db_options PAGESIZE NK_INTEGER */
  {  267,   -3 }, /* (84) db_options ::= db_options PRECISION NK_STRING */
  {  267,   -3 }, /* (85) db_options ::= db_options REPLICA NK_INTEGER */
  {  267,   -3 }, /* (86) db_options ::= db_options STRICT NK_INTEGER */
  {  267,   -3 }, /* (87) db_options ::= db_options WAL NK_INTEGER */
  {  267,   -3 }, /* (88) db_options ::= db_options VGROUPS NK_INTEGER */
  {  267,   -3 }, /* (89) db_options ::= db_options SINGLE_STABLE NK_INTEGER */
  {  267,   -3 }, /* (90) db_options ::= db_options RETENTIONS retention_list */
  {  267,   -3 }, /* (91) db_options ::= db_options SCHEMALESS NK_INTEGER */
  {  269,   -1 }, /* (92) alter_db_options ::= alter_db_option */
  {  269,   -2 }, /* (93) alter_db_options ::= alter_db_options alter_db_option */
  {  273,   -2 }, /* (94) alter_db_option ::= BUFFER NK_INTEGER */
  {  273,   -2 }, /* (95) alter_db_option ::= CACHELAST NK_INTEGER */
  {  273,   -2 }, /* (96) alter_db_option ::= FSYNC NK_INTEGER */
  {  273,   -2 }, /* (97) alter_db_option ::= KEEP integer_list */
  {  273,   -2 }, /* (98) alter_db_option ::= KEEP variable_list */
  {  273,   -2 }, /* (99) alter_db_option ::= PAGES NK_INTEGER */
  {  273,   -2 }, /* (100) alter_db_option ::= REPLICA NK_INTEGER */
  {  273,   -2 }, /* (101) alter_db_option ::= STRICT NK_INTEGER */
  {  273,   -2 }, /* (102) alter_db_option ::= WAL NK_INTEGER */
  {  270,   -1 }, /* (103) integer_list ::= NK_INTEGER */
  {  270,   -3 }, /* (104) integer_list ::= integer_list NK_COMMA NK_INTEGER */
  {  271,   -1 }, /* (105) variable_list ::= NK_VARIABLE */
  {  271,   -3 }, /* (106) variable_list ::= variable_list NK_COMMA NK_VARIABLE */
  {  272,   -1 }, /* (107) retention_list ::= retention */
  {  272,   -3 }, /* (108) retention_list ::= retention_list NK_COMMA retention */
  {  274,   -3 }, /* (109) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */
  {  253,   -9 }, /* (110) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */
  {  253,   -3 }, /* (111) cmd ::= CREATE TABLE multi_create_clause */
  {  253,   -9 }, /* (112) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */
  {  253,   -3 }, /* (113) cmd ::= DROP TABLE multi_drop_clause */
  {  253,   -4 }, /* (114) cmd ::= DROP STABLE exists_opt full_table_name */
  {  253,   -3 }, /* (115) cmd ::= ALTER TABLE alter_table_clause */
  {  253,   -3 }, /* (116) cmd ::= ALTER STABLE alter_table_clause */
  {  282,   -2 }, /* (117) alter_table_clause ::= full_table_name alter_table_options */
  {  282,   -5 }, /* (118) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */
  {  282,   -4 }, /* (119) alter_table_clause ::= full_table_name DROP COLUMN column_name */
  {  282,   -5 }, /* (120) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */
  {  282,   -5 }, /* (121) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */
  {  282,   -5 }, /* (122) alter_table_clause ::= full_table_name ADD TAG column_name type_name */
  {  282,   -4 }, /* (123) alter_table_clause ::= full_table_name DROP TAG column_name */
  {  282,   -5 }, /* (124) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */
  {  282,   -5 }, /* (125) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */
  {  282,   -6 }, /* (126) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */
  {  279,   -1 }, /* (127) multi_create_clause ::= create_subtable_clause */
  {  279,   -2 }, /* (128) multi_create_clause ::= multi_create_clause create_subtable_clause */
  {  287,  -10 }, /* (129) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP table_options */
  {  281,   -1 }, /* (130) multi_drop_clause ::= drop_table_clause */
  {  281,   -2 }, /* (131) multi_drop_clause ::= multi_drop_clause drop_table_clause */
  {  290,   -2 }, /* (132) drop_table_clause ::= exists_opt full_table_name */
  {  288,    0 }, /* (133) specific_tags_opt ::= */
  {  288,   -3 }, /* (134) specific_tags_opt ::= NK_LP col_name_list NK_RP */
  {  275,   -1 }, /* (135) full_table_name ::= table_name */
  {  275,   -3 }, /* (136) full_table_name ::= db_name NK_DOT table_name */
  {  276,   -1 }, /* (137) column_def_list ::= column_def */
  {  276,   -3 }, /* (138) column_def_list ::= column_def_list NK_COMMA column_def */
  {  293,   -2 }, /* (139) column_def ::= column_name type_name */
  {  293,   -4 }, /* (140) column_def ::= column_name type_name COMMENT NK_STRING */
  {  285,   -1 }, /* (141) type_name ::= BOOL */
  {  285,   -1 }, /* (142) type_name ::= TINYINT */
  {  285,   -1 }, /* (143) type_name ::= SMALLINT */
  {  285,   -1 }, /* (144) type_name ::= INT */
  {  285,   -1 }, /* (145) type_name ::= INTEGER */
  {  285,   -1 }, /* (146) type_name ::= BIGINT */
  {  285,   -1 }, /* (147) type_name ::= FLOAT */
  {  285,   -1 }, /* (148) type_name ::= DOUBLE */
  {  285,   -4 }, /* (149) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
  {  285,   -1 }, /* (150) type_name ::= TIMESTAMP */
  {  285,   -4 }, /* (151) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
  {  285,   -2 }, /* (152) type_name ::= TINYINT UNSIGNED */
  {  285,   -2 }, /* (153) type_name ::= SMALLINT UNSIGNED */
  {  285,   -2 }, /* (154) type_name ::= INT UNSIGNED */
  {  285,   -2 }, /* (155) type_name ::= BIGINT UNSIGNED */
  {  285,   -1 }, /* (156) type_name ::= JSON */
  {  285,   -4 }, /* (157) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
  {  285,   -1 }, /* (158) type_name ::= MEDIUMBLOB */
  {  285,   -1 }, /* (159) type_name ::= BLOB */
  {  285,   -4 }, /* (160) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
  {  285,   -1 }, /* (161) type_name ::= DECIMAL */
  {  285,   -4 }, /* (162) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
  {  285,   -6 }, /* (163) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
  {  277,    0 }, /* (164) tags_def_opt ::= */
  {  277,   -1 }, /* (165) tags_def_opt ::= tags_def */
  {  280,   -4 }, /* (166) tags_def ::= TAGS NK_LP column_def_list NK_RP */
  {  278,    0 }, /* (167) table_options ::= */
  {  278,   -3 }, /* (168) table_options ::= table_options COMMENT NK_STRING */
  {  278,   -3 }, /* (169) table_options ::= table_options MAX_DELAY duration_list */
  {  278,   -3 }, /* (170) table_options ::= table_options WATERMARK duration_list */
  {  278,   -5 }, /* (171) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */
  {  278,   -3 }, /* (172) table_options ::= table_options TTL NK_INTEGER */
  {  278,   -5 }, /* (173) table_options ::= table_options SMA NK_LP col_name_list NK_RP */
  {  283,   -1 }, /* (174) alter_table_options ::= alter_table_option */
  {  283,   -2 }, /* (175) alter_table_options ::= alter_table_options alter_table_option */
  {  296,   -2 }, /* (176) alter_table_option ::= COMMENT NK_STRING */
  {  296,   -2 }, /* (177) alter_table_option ::= TTL NK_INTEGER */
  {  294,   -1 }, /* (178) duration_list ::= duration_literal */
  {  294,   -3 }, /* (179) duration_list ::= duration_list NK_COMMA duration_literal */
  {  295,   -1 }, /* (180) rollup_func_list ::= rollup_func_name */
  {  295,   -3 }, /* (181) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */
  {  298,   -1 }, /* (182) rollup_func_name ::= function_name */
  {  298,   -1 }, /* (183) rollup_func_name ::= FIRST */
  {  298,   -1 }, /* (184) rollup_func_name ::= LAST */
  {  291,   -1 }, /* (185) col_name_list ::= col_name */
  {  291,   -3 }, /* (186) col_name_list ::= col_name_list NK_COMMA col_name */
  {  300,   -1 }, /* (187) col_name ::= column_name */
  {  253,   -2 }, /* (188) cmd ::= SHOW DNODES */
  {  253,   -2 }, /* (189) cmd ::= SHOW USERS */
  {  253,   -2 }, /* (190) cmd ::= SHOW DATABASES */
  {  253,   -4 }, /* (191) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */
  {  253,   -4 }, /* (192) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */
  {  253,   -3 }, /* (193) cmd ::= SHOW db_name_cond_opt VGROUPS */
  {  253,   -2 }, /* (194) cmd ::= SHOW MNODES */
  {  253,   -2 }, /* (195) cmd ::= SHOW MODULES */
  {  253,   -2 }, /* (196) cmd ::= SHOW QNODES */
  {  253,   -2 }, /* (197) cmd ::= SHOW FUNCTIONS */
  {  253,   -5 }, /* (198) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */
  {  253,   -2 }, /* (199) cmd ::= SHOW STREAMS */
  {  253,   -2 }, /* (200) cmd ::= SHOW ACCOUNTS */
  {  253,   -2 }, /* (201) cmd ::= SHOW APPS */
  {  253,   -2 }, /* (202) cmd ::= SHOW CONNECTIONS */
  {  253,   -2 }, /* (203) cmd ::= SHOW LICENCE */
  {  253,   -2 }, /* (204) cmd ::= SHOW GRANTS */
  {  253,   -4 }, /* (205) cmd ::= SHOW CREATE DATABASE db_name */
  {  253,   -4 }, /* (206) cmd ::= SHOW CREATE TABLE full_table_name */
  {  253,   -4 }, /* (207) cmd ::= SHOW CREATE STABLE full_table_name */
  {  253,   -2 }, /* (208) cmd ::= SHOW QUERIES */
  {  253,   -2 }, /* (209) cmd ::= SHOW SCORES */
  {  253,   -2 }, /* (210) cmd ::= SHOW TOPICS */
  {  253,   -2 }, /* (211) cmd ::= SHOW VARIABLES */
  {  253,   -3 }, /* (212) cmd ::= SHOW LOCAL VARIABLES */
  {  253,   -4 }, /* (213) cmd ::= SHOW DNODE NK_INTEGER VARIABLES */
  {  253,   -2 }, /* (214) cmd ::= SHOW BNODES */
  {  253,   -2 }, /* (215) cmd ::= SHOW SNODES */
  {  253,   -2 }, /* (216) cmd ::= SHOW CLUSTER */
  {  253,   -2 }, /* (217) cmd ::= SHOW TRANSACTIONS */
  {  253,   -4 }, /* (218) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */
  {  253,   -2 }, /* (219) cmd ::= SHOW CONSUMERS */
  {  253,   -2 }, /* (220) cmd ::= SHOW SUBSCRIPTIONS */
  {  301,    0 }, /* (221) db_name_cond_opt ::= */
  {  301,   -2 }, /* (222) db_name_cond_opt ::= db_name NK_DOT */
  {  302,    0 }, /* (223) like_pattern_opt ::= */
  {  302,   -2 }, /* (224) like_pattern_opt ::= LIKE NK_STRING */
  {  303,   -1 }, /* (225) table_name_cond ::= table_name */
  {  304,    0 }, /* (226) from_db_opt ::= */
  {  304,   -2 }, /* (227) from_db_opt ::= FROM db_name */
  {  253,   -8 }, /* (228) cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */
  {  253,   -4 }, /* (229) cmd ::= DROP INDEX exists_opt index_name */
  {  306,  -10 }, /* (230) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */
  {  306,  -12 }, /* (231) 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 */
  {  307,   -1 }, /* (232) func_list ::= func */
  {  307,   -3 }, /* (233) func_list ::= func_list NK_COMMA func */
  {  310,   -4 }, /* (234) func ::= function_name NK_LP expression_list NK_RP */
  {  309,    0 }, /* (235) sma_stream_opt ::= */
  {  309,   -3 }, /* (236) sma_stream_opt ::= stream_options WATERMARK duration_literal */
  {  309,   -3 }, /* (237) sma_stream_opt ::= stream_options MAX_DELAY duration_literal */
  {  253,   -6 }, /* (238) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */
  {  253,   -7 }, /* (239) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */
  {  253,   -9 }, /* (240) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */
  {  253,   -7 }, /* (241) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */
  {  253,   -9 }, /* (242) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */
  {  253,   -4 }, /* (243) cmd ::= DROP TOPIC exists_opt topic_name */
  {  253,   -7 }, /* (244) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */
  {  253,   -2 }, /* (245) cmd ::= DESC full_table_name */
  {  253,   -2 }, /* (246) cmd ::= DESCRIBE full_table_name */
  {  253,   -3 }, /* (247) cmd ::= RESET QUERY CACHE */
  {  253,   -4 }, /* (248) cmd ::= EXPLAIN analyze_opt explain_options query_expression */
  {  316,    0 }, /* (249) analyze_opt ::= */
  {  316,   -1 }, /* (250) analyze_opt ::= ANALYZE */
  {  317,    0 }, /* (251) explain_options ::= */
  {  317,   -3 }, /* (252) explain_options ::= explain_options VERBOSE NK_BOOL */
  {  317,   -3 }, /* (253) explain_options ::= explain_options RATIO NK_FLOAT */
  {  253,   -6 }, /* (254) cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */
  {  253,  -10 }, /* (255) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */
  {  253,   -4 }, /* (256) cmd ::= DROP FUNCTION exists_opt function_name */
  {  318,    0 }, /* (257) agg_func_opt ::= */
  {  318,   -1 }, /* (258) agg_func_opt ::= AGGREGATE */
  {  319,    0 }, /* (259) bufsize_opt ::= */
  {  319,   -2 }, /* (260) bufsize_opt ::= BUFSIZE NK_INTEGER */
  {  253,   -8 }, /* (261) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */
  {  253,   -4 }, /* (262) cmd ::= DROP STREAM exists_opt stream_name */
  {  321,    0 }, /* (263) into_opt ::= */
  {  321,   -2 }, /* (264) into_opt ::= INTO full_table_name */
  {  312,    0 }, /* (265) stream_options ::= */
  {  312,   -3 }, /* (266) stream_options ::= stream_options TRIGGER AT_ONCE */
  {  312,   -3 }, /* (267) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */
  {  312,   -4 }, /* (268) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
  {  312,   -3 }, /* (269) stream_options ::= stream_options WATERMARK duration_literal */
  {  312,   -3 }, /* (270) stream_options ::= stream_options IGNORE EXPIRED */
  {  253,   -3 }, /* (271) cmd ::= KILL CONNECTION NK_INTEGER */
  {  253,   -3 }, /* (272) cmd ::= KILL QUERY NK_STRING */
  {  253,   -3 }, /* (273) cmd ::= KILL TRANSACTION NK_INTEGER */
  {  253,   -2 }, /* (274) cmd ::= BALANCE VGROUP */
  {  253,   -4 }, /* (275) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */
  {  253,   -4 }, /* (276) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */
  {  253,   -3 }, /* (277) cmd ::= SPLIT VGROUP NK_INTEGER */
  {  322,   -2 }, /* (278) dnode_list ::= DNODE NK_INTEGER */
  {  322,   -3 }, /* (279) dnode_list ::= dnode_list DNODE NK_INTEGER */
  {  253,   -3 }, /* (280) cmd ::= SYNCDB db_name REPLICA */
  {  253,   -4 }, /* (281) cmd ::= DELETE FROM full_table_name where_clause_opt */
  {  253,   -1 }, /* (282) cmd ::= query_expression */
  {  256,   -1 }, /* (283) literal ::= NK_INTEGER */
  {  256,   -1 }, /* (284) literal ::= NK_FLOAT */
  {  256,   -1 }, /* (285) literal ::= NK_STRING */
  {  256,   -1 }, /* (286) literal ::= NK_BOOL */
  {  256,   -2 }, /* (287) literal ::= TIMESTAMP NK_STRING */
  {  256,   -1 }, /* (288) literal ::= duration_literal */
  {  256,   -1 }, /* (289) literal ::= NULL */
  {  256,   -1 }, /* (290) literal ::= NK_QUESTION */
  {  297,   -1 }, /* (291) duration_literal ::= NK_VARIABLE */
  {  324,   -1 }, /* (292) signed ::= NK_INTEGER */
  {  324,   -2 }, /* (293) signed ::= NK_PLUS NK_INTEGER */
  {  324,   -2 }, /* (294) signed ::= NK_MINUS NK_INTEGER */
  {  324,   -1 }, /* (295) signed ::= NK_FLOAT */
  {  324,   -2 }, /* (296) signed ::= NK_PLUS NK_FLOAT */
  {  324,   -2 }, /* (297) signed ::= NK_MINUS NK_FLOAT */
  {  286,   -1 }, /* (298) signed_literal ::= signed */
  {  286,   -1 }, /* (299) signed_literal ::= NK_STRING */
  {  286,   -1 }, /* (300) signed_literal ::= NK_BOOL */
  {  286,   -2 }, /* (301) signed_literal ::= TIMESTAMP NK_STRING */
  {  286,   -1 }, /* (302) signed_literal ::= duration_literal */
  {  286,   -1 }, /* (303) signed_literal ::= NULL */
  {  286,   -1 }, /* (304) signed_literal ::= literal_func */
  {  289,   -1 }, /* (305) literal_list ::= signed_literal */
  {  289,   -3 }, /* (306) literal_list ::= literal_list NK_COMMA signed_literal */
  {  264,   -1 }, /* (307) db_name ::= NK_ID */
  {  292,   -1 }, /* (308) table_name ::= NK_ID */
  {  284,   -1 }, /* (309) column_name ::= NK_ID */
  {  299,   -1 }, /* (310) function_name ::= NK_ID */
  {  326,   -1 }, /* (311) table_alias ::= NK_ID */
  {  327,   -1 }, /* (312) column_alias ::= NK_ID */
  {  258,   -1 }, /* (313) user_name ::= NK_ID */
  {  305,   -1 }, /* (314) index_name ::= NK_ID */
  {  313,   -1 }, /* (315) topic_name ::= NK_ID */
  {  320,   -1 }, /* (316) stream_name ::= NK_ID */
  {  315,   -1 }, /* (317) cgroup_name ::= NK_ID */
  {  328,   -1 }, /* (318) expression ::= literal */
  {  328,   -1 }, /* (319) expression ::= pseudo_column */
  {  328,   -1 }, /* (320) expression ::= column_reference */
  {  328,   -1 }, /* (321) expression ::= function_expression */
  {  328,   -1 }, /* (322) expression ::= subquery */
  {  328,   -3 }, /* (323) expression ::= NK_LP expression NK_RP */
  {  328,   -2 }, /* (324) expression ::= NK_PLUS expression */
  {  328,   -2 }, /* (325) expression ::= NK_MINUS expression */
  {  328,   -3 }, /* (326) expression ::= expression NK_PLUS expression */
  {  328,   -3 }, /* (327) expression ::= expression NK_MINUS expression */
  {  328,   -3 }, /* (328) expression ::= expression NK_STAR expression */
  {  328,   -3 }, /* (329) expression ::= expression NK_SLASH expression */
  {  328,   -3 }, /* (330) expression ::= expression NK_REM expression */
  {  328,   -3 }, /* (331) expression ::= column_reference NK_ARROW NK_STRING */
  {  328,   -3 }, /* (332) expression ::= expression NK_BITAND expression */
  {  328,   -3 }, /* (333) expression ::= expression NK_BITOR expression */
  {  311,   -1 }, /* (334) expression_list ::= expression */
  {  311,   -3 }, /* (335) expression_list ::= expression_list NK_COMMA expression */
  {  330,   -1 }, /* (336) column_reference ::= column_name */
  {  330,   -3 }, /* (337) column_reference ::= table_name NK_DOT column_name */
  {  329,   -1 }, /* (338) pseudo_column ::= ROWTS */
  {  329,   -1 }, /* (339) pseudo_column ::= TBNAME */
  {  329,   -3 }, /* (340) pseudo_column ::= table_name NK_DOT TBNAME */
  {  329,   -1 }, /* (341) pseudo_column ::= QSTARTTS */
  {  329,   -1 }, /* (342) pseudo_column ::= QENDTS */
  {  329,   -1 }, /* (343) pseudo_column ::= WSTARTTS */
  {  329,   -1 }, /* (344) pseudo_column ::= WENDTS */
  {  329,   -1 }, /* (345) pseudo_column ::= WDURATION */
  {  331,   -4 }, /* (346) function_expression ::= function_name NK_LP expression_list NK_RP */
  {  331,   -4 }, /* (347) function_expression ::= star_func NK_LP star_func_para_list NK_RP */
  {  331,   -6 }, /* (348) function_expression ::= CAST NK_LP expression AS type_name NK_RP */
  {  331,   -1 }, /* (349) function_expression ::= literal_func */
  {  325,   -3 }, /* (350) literal_func ::= noarg_func NK_LP NK_RP */
  {  325,   -1 }, /* (351) literal_func ::= NOW */
  {  335,   -1 }, /* (352) noarg_func ::= NOW */
  {  335,   -1 }, /* (353) noarg_func ::= TODAY */
  {  335,   -1 }, /* (354) noarg_func ::= TIMEZONE */
  {  335,   -1 }, /* (355) noarg_func ::= DATABASE */
  {  335,   -1 }, /* (356) noarg_func ::= CLIENT_VERSION */
  {  335,   -1 }, /* (357) noarg_func ::= SERVER_VERSION */
  {  335,   -1 }, /* (358) noarg_func ::= SERVER_STATUS */
  {  335,   -1 }, /* (359) noarg_func ::= CURRENT_USER */
  {  335,   -1 }, /* (360) noarg_func ::= USER */
  {  333,   -1 }, /* (361) star_func ::= COUNT */
  {  333,   -1 }, /* (362) star_func ::= FIRST */
  {  333,   -1 }, /* (363) star_func ::= LAST */
  {  333,   -1 }, /* (364) star_func ::= LAST_ROW */
  {  334,   -1 }, /* (365) star_func_para_list ::= NK_STAR */
  {  334,   -1 }, /* (366) star_func_para_list ::= other_para_list */
  {  336,   -1 }, /* (367) other_para_list ::= star_func_para */
  {  336,   -3 }, /* (368) other_para_list ::= other_para_list NK_COMMA star_func_para */
  {  337,   -1 }, /* (369) star_func_para ::= expression */
  {  337,   -3 }, /* (370) star_func_para ::= table_name NK_DOT NK_STAR */
  {  338,   -3 }, /* (371) predicate ::= expression compare_op expression */
  {  338,   -5 }, /* (372) predicate ::= expression BETWEEN expression AND expression */
  {  338,   -6 }, /* (373) predicate ::= expression NOT BETWEEN expression AND expression */
  {  338,   -3 }, /* (374) predicate ::= expression IS NULL */
  {  338,   -4 }, /* (375) predicate ::= expression IS NOT NULL */
  {  338,   -3 }, /* (376) predicate ::= expression in_op in_predicate_value */
  {  339,   -1 }, /* (377) compare_op ::= NK_LT */
  {  339,   -1 }, /* (378) compare_op ::= NK_GT */
  {  339,   -1 }, /* (379) compare_op ::= NK_LE */
  {  339,   -1 }, /* (380) compare_op ::= NK_GE */
  {  339,   -1 }, /* (381) compare_op ::= NK_NE */
  {  339,   -1 }, /* (382) compare_op ::= NK_EQ */
  {  339,   -1 }, /* (383) compare_op ::= LIKE */
  {  339,   -2 }, /* (384) compare_op ::= NOT LIKE */
  {  339,   -1 }, /* (385) compare_op ::= MATCH */
  {  339,   -1 }, /* (386) compare_op ::= NMATCH */
  {  339,   -1 }, /* (387) compare_op ::= CONTAINS */
  {  340,   -1 }, /* (388) in_op ::= IN */
  {  340,   -2 }, /* (389) in_op ::= NOT IN */
  {  341,   -3 }, /* (390) in_predicate_value ::= NK_LP expression_list NK_RP */
  {  342,   -1 }, /* (391) boolean_value_expression ::= boolean_primary */
  {  342,   -2 }, /* (392) boolean_value_expression ::= NOT boolean_primary */
  {  342,   -3 }, /* (393) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
  {  342,   -3 }, /* (394) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
  {  343,   -1 }, /* (395) boolean_primary ::= predicate */
  {  343,   -3 }, /* (396) boolean_primary ::= NK_LP boolean_value_expression NK_RP */
  {  344,   -1 }, /* (397) common_expression ::= expression */
  {  344,   -1 }, /* (398) common_expression ::= boolean_value_expression */
  {  345,    0 }, /* (399) from_clause_opt ::= */
  {  345,   -2 }, /* (400) from_clause_opt ::= FROM table_reference_list */
  {  346,   -1 }, /* (401) table_reference_list ::= table_reference */
  {  346,   -3 }, /* (402) table_reference_list ::= table_reference_list NK_COMMA table_reference */
  {  347,   -1 }, /* (403) table_reference ::= table_primary */
  {  347,   -1 }, /* (404) table_reference ::= joined_table */
  {  348,   -2 }, /* (405) table_primary ::= table_name alias_opt */
  {  348,   -4 }, /* (406) table_primary ::= db_name NK_DOT table_name alias_opt */
  {  348,   -2 }, /* (407) table_primary ::= subquery alias_opt */
  {  348,   -1 }, /* (408) table_primary ::= parenthesized_joined_table */
  {  350,    0 }, /* (409) alias_opt ::= */
  {  350,   -1 }, /* (410) alias_opt ::= table_alias */
  {  350,   -2 }, /* (411) alias_opt ::= AS table_alias */
  {  351,   -3 }, /* (412) parenthesized_joined_table ::= NK_LP joined_table NK_RP */
  {  351,   -3 }, /* (413) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */
  {  349,   -6 }, /* (414) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
  {  352,    0 }, /* (415) join_type ::= */
  {  352,   -1 }, /* (416) join_type ::= INNER */
  {  354,  -12 }, /* (417) 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 */
  {  355,    0 }, /* (418) set_quantifier_opt ::= */
  {  355,   -1 }, /* (419) set_quantifier_opt ::= DISTINCT */
  {  355,   -1 }, /* (420) set_quantifier_opt ::= ALL */
  {  356,   -1 }, /* (421) select_list ::= select_item */
  {  356,   -3 }, /* (422) select_list ::= select_list NK_COMMA select_item */
  {  364,   -1 }, /* (423) select_item ::= NK_STAR */
  {  364,   -1 }, /* (424) select_item ::= common_expression */
  {  364,   -2 }, /* (425) select_item ::= common_expression column_alias */
  {  364,   -3 }, /* (426) select_item ::= common_expression AS column_alias */
  {  364,   -3 }, /* (427) select_item ::= table_name NK_DOT NK_STAR */
  {  323,    0 }, /* (428) where_clause_opt ::= */
  {  323,   -2 }, /* (429) where_clause_opt ::= WHERE search_condition */
  {  357,    0 }, /* (430) partition_by_clause_opt ::= */
  {  357,   -3 }, /* (431) partition_by_clause_opt ::= PARTITION BY expression_list */
  {  361,    0 }, /* (432) twindow_clause_opt ::= */
  {  361,   -6 }, /* (433) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
  {  361,   -4 }, /* (434) twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */
  {  361,   -6 }, /* (435) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
  {  361,   -8 }, /* (436) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
  {  308,    0 }, /* (437) sliding_opt ::= */
  {  308,   -4 }, /* (438) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
  {  360,    0 }, /* (439) fill_opt ::= */
  {  360,   -4 }, /* (440) fill_opt ::= FILL NK_LP fill_mode NK_RP */
  {  360,   -6 }, /* (441) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
  {  365,   -1 }, /* (442) fill_mode ::= NONE */
  {  365,   -1 }, /* (443) fill_mode ::= PREV */
  {  365,   -1 }, /* (444) fill_mode ::= NULL */
  {  365,   -1 }, /* (445) fill_mode ::= LINEAR */
  {  365,   -1 }, /* (446) fill_mode ::= NEXT */
  {  362,    0 }, /* (447) group_by_clause_opt ::= */
  {  362,   -3 }, /* (448) group_by_clause_opt ::= GROUP BY group_by_list */
  {  366,   -1 }, /* (449) group_by_list ::= expression */
  {  366,   -3 }, /* (450) group_by_list ::= group_by_list NK_COMMA expression */
  {  363,    0 }, /* (451) having_clause_opt ::= */
  {  363,   -2 }, /* (452) having_clause_opt ::= HAVING search_condition */
  {  358,    0 }, /* (453) range_opt ::= */
  {  358,   -6 }, /* (454) range_opt ::= RANGE NK_LP expression NK_COMMA expression NK_RP */
  {  359,    0 }, /* (455) every_opt ::= */
  {  359,   -4 }, /* (456) every_opt ::= EVERY NK_LP duration_literal NK_RP */
  {  314,   -4 }, /* (457) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */
  {  367,   -1 }, /* (458) query_expression_body ::= query_primary */
  {  367,   -4 }, /* (459) query_expression_body ::= query_expression_body UNION ALL query_expression_body */
  {  367,   -3 }, /* (460) query_expression_body ::= query_expression_body UNION query_expression_body */
  {  371,   -1 }, /* (461) query_primary ::= query_specification */
  {  371,   -6 }, /* (462) query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */
  {  368,    0 }, /* (463) order_by_clause_opt ::= */
  {  368,   -3 }, /* (464) order_by_clause_opt ::= ORDER BY sort_specification_list */
  {  369,    0 }, /* (465) slimit_clause_opt ::= */
  {  369,   -2 }, /* (466) slimit_clause_opt ::= SLIMIT NK_INTEGER */
  {  369,   -4 }, /* (467) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
  {  369,   -4 }, /* (468) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
  {  370,    0 }, /* (469) limit_clause_opt ::= */
  {  370,   -2 }, /* (470) limit_clause_opt ::= LIMIT NK_INTEGER */
  {  370,   -4 }, /* (471) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */
  {  370,   -4 }, /* (472) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */
  {  332,   -3 }, /* (473) subquery ::= NK_LP query_expression NK_RP */
  {  353,   -1 }, /* (474) search_condition ::= common_expression */
  {  372,   -1 }, /* (475) sort_specification_list ::= sort_specification */
  {  372,   -3 }, /* (476) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */
  {  373,   -3 }, /* (477) sort_specification ::= expression ordering_specification_opt null_ordering_opt */
  {  374,    0 }, /* (478) ordering_specification_opt ::= */
  {  374,   -1 }, /* (479) ordering_specification_opt ::= ASC */
  {  374,   -1 }, /* (480) ordering_specification_opt ::= DESC */
  {  375,    0 }, /* (481) null_ordering_opt ::= */
  {  375,   -2 }, /* (482) null_ordering_opt ::= NULLS FIRST */
  {  375,   -2 }, /* (483) null_ordering_opt ::= NULLS LAST */
3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245
};

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 已提交
3246 3247
  ParseTOKENTYPE yyLookaheadToken  /* Value of the lookahead token */
  ParseCTX_PDECL                   /* %extra_context */
3248 3249 3250 3251 3252
){
  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 已提交
3253
  ParseARG_FETCH
3254 3255 3256
  (void)yyLookahead;
  (void)yyLookaheadToken;
  yymsp = yypParser->yytos;
X
Xiaoyu Wang 已提交
3257 3258
#ifndef NDEBUG
  if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){
X
Xiaoyu Wang 已提交
3259
    yysize = yyRuleInfo[yyruleno].nrhs;
X
Xiaoyu Wang 已提交
3260
    if( yysize ){
X
Xiaoyu Wang 已提交
3261
      fprintf(yyTraceFILE, "%sReduce %d [%s], go to state %d.\n",
X
Xiaoyu Wang 已提交
3262
        yyTracePrompt,
X
Xiaoyu Wang 已提交
3263
        yyruleno, yyRuleName[yyruleno], yymsp[yysize].stateno);
X
Xiaoyu Wang 已提交
3264
    }else{
X
Xiaoyu Wang 已提交
3265 3266
      fprintf(yyTraceFILE, "%sReduce %d [%s].\n",
        yyTracePrompt, yyruleno, yyRuleName[yyruleno]);
X
Xiaoyu Wang 已提交
3267 3268 3269 3270 3271 3272 3273
    }
  }
#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 已提交
3274
  if( yyRuleInfo[yyruleno].nrhs==0 ){
X
Xiaoyu Wang 已提交
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
#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
  }
3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313

  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;
3314
      case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */
3315
{ pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); }
X
Xiaoyu Wang 已提交
3316
  yy_destructor(yypParser,254,&yymsp[0].minor);
3317
        break;
3318
      case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */
3319
{ pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); }
X
Xiaoyu Wang 已提交
3320
  yy_destructor(yypParser,255,&yymsp[0].minor);
3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333
        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 已提交
3334
{  yy_destructor(yypParser,254,&yymsp[-2].minor);
3335
{ }
X
Xiaoyu Wang 已提交
3336
  yy_destructor(yypParser,256,&yymsp[0].minor);
3337
}
3338
        break;
3339
      case 12: /* alter_account_options ::= alter_account_option */
X
Xiaoyu Wang 已提交
3340
{  yy_destructor(yypParser,257,&yymsp[0].minor);
3341 3342 3343
{ }
}
        break;
3344
      case 13: /* alter_account_options ::= alter_account_options alter_account_option */
X
Xiaoyu Wang 已提交
3345
{  yy_destructor(yypParser,255,&yymsp[-1].minor);
3346
{ }
X
Xiaoyu Wang 已提交
3347
  yy_destructor(yypParser,257,&yymsp[0].minor);
3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359
}
        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);
3360
{ }
X
Xiaoyu Wang 已提交
3361
  yy_destructor(yypParser,256,&yymsp[0].minor);
3362
        break;
X
Xiaoyu Wang 已提交
3363
      case 24: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */
X
Xiaoyu Wang 已提交
3364
{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy401, &yymsp[-1].minor.yy0, yymsp[0].minor.yy695); }
3365
        break;
3366
      case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */
X
Xiaoyu Wang 已提交
3367
{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy401, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); }
3368
        break;
X
Xiaoyu Wang 已提交
3369
      case 26: /* cmd ::= ALTER USER user_name ENABLE NK_INTEGER */
X
Xiaoyu Wang 已提交
3370
{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy401, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); }
3371
        break;
X
Xiaoyu Wang 已提交
3372
      case 27: /* cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */
X
Xiaoyu Wang 已提交
3373
{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy401, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); }
3374
        break;
X
Xiaoyu Wang 已提交
3375
      case 28: /* cmd ::= DROP USER user_name */
X
Xiaoyu Wang 已提交
3376
{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy401); }
3377
        break;
X
Xiaoyu Wang 已提交
3378
      case 29: /* sysinfo_opt ::= */
X
Xiaoyu Wang 已提交
3379
{ yymsp[1].minor.yy695 = 1; }
3380
        break;
X
Xiaoyu Wang 已提交
3381
      case 30: /* sysinfo_opt ::= SYSINFO NK_INTEGER */
X
Xiaoyu Wang 已提交
3382
{ yymsp[-1].minor.yy695 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); }
3383
        break;
X
Xiaoyu Wang 已提交
3384
      case 31: /* cmd ::= GRANT privileges ON priv_level TO user_name */
X
Xiaoyu Wang 已提交
3385
{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy525, &yymsp[-2].minor.yy401, &yymsp[0].minor.yy401); }
3386
        break;
X
Xiaoyu Wang 已提交
3387
      case 32: /* cmd ::= REVOKE privileges ON priv_level FROM user_name */
X
Xiaoyu Wang 已提交
3388
{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy525, &yymsp[-2].minor.yy401, &yymsp[0].minor.yy401); }
3389
        break;
X
Xiaoyu Wang 已提交
3390
      case 33: /* privileges ::= ALL */
X
Xiaoyu Wang 已提交
3391
{ yymsp[0].minor.yy525 = PRIVILEGE_TYPE_ALL; }
3392
        break;
X
Xiaoyu Wang 已提交
3393 3394
      case 34: /* privileges ::= priv_type_list */
      case 35: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==35);
X
Xiaoyu Wang 已提交
3395 3396
{ yylhsminor.yy525 = yymsp[0].minor.yy525; }
  yymsp[0].minor.yy525 = yylhsminor.yy525;
3397
        break;
X
Xiaoyu Wang 已提交
3398
      case 36: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */
X
Xiaoyu Wang 已提交
3399 3400
{ yylhsminor.yy525 = yymsp[-2].minor.yy525 | yymsp[0].minor.yy525; }
  yymsp[-2].minor.yy525 = yylhsminor.yy525;
3401
        break;
X
Xiaoyu Wang 已提交
3402
      case 37: /* priv_type ::= READ */
X
Xiaoyu Wang 已提交
3403
{ yymsp[0].minor.yy525 = PRIVILEGE_TYPE_READ; }
3404
        break;
X
Xiaoyu Wang 已提交
3405
      case 38: /* priv_type ::= WRITE */
X
Xiaoyu Wang 已提交
3406
{ yymsp[0].minor.yy525 = PRIVILEGE_TYPE_WRITE; }
3407
        break;
X
Xiaoyu Wang 已提交
3408
      case 39: /* priv_level ::= NK_STAR NK_DOT NK_STAR */
X
Xiaoyu Wang 已提交
3409 3410
{ yylhsminor.yy401 = yymsp[-2].minor.yy0; }
  yymsp[-2].minor.yy401 = yylhsminor.yy401;
3411
        break;
X
Xiaoyu Wang 已提交
3412
      case 40: /* priv_level ::= db_name NK_DOT NK_STAR */
X
Xiaoyu Wang 已提交
3413 3414
{ yylhsminor.yy401 = yymsp[-2].minor.yy401; }
  yymsp[-2].minor.yy401 = yylhsminor.yy401;
X
Xiaoyu Wang 已提交
3415 3416
        break;
      case 41: /* cmd ::= CREATE DNODE dnode_endpoint */
X
Xiaoyu Wang 已提交
3417
{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy401, NULL); }
X
Xiaoyu Wang 已提交
3418 3419
        break;
      case 42: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */
X
Xiaoyu Wang 已提交
3420
{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy401, &yymsp[0].minor.yy0); }
X
Xiaoyu Wang 已提交
3421 3422
        break;
      case 43: /* cmd ::= DROP DNODE NK_INTEGER */
3423
{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy0); }
3424
        break;
X
Xiaoyu Wang 已提交
3425
      case 44: /* cmd ::= DROP DNODE dnode_endpoint */
X
Xiaoyu Wang 已提交
3426
{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy401); }
3427
        break;
X
Xiaoyu Wang 已提交
3428
      case 45: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */
3429 3430
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); }
        break;
X
Xiaoyu Wang 已提交
3431
      case 46: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */
3432 3433
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-2].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
        break;
X
Xiaoyu Wang 已提交
3434
      case 47: /* cmd ::= ALTER ALL DNODES NK_STRING */
3435 3436
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[0].minor.yy0, NULL); }
        break;
X
Xiaoyu Wang 已提交
3437
      case 48: /* cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */
3438 3439
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
        break;
X
Xiaoyu Wang 已提交
3440 3441 3442
      case 49: /* dnode_endpoint ::= NK_STRING */
      case 50: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==50);
      case 51: /* dnode_endpoint ::= NK_IPTOKEN */ yytestcase(yyruleno==51);
X
Xiaoyu Wang 已提交
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
      case 307: /* db_name ::= NK_ID */ yytestcase(yyruleno==307);
      case 308: /* table_name ::= NK_ID */ yytestcase(yyruleno==308);
      case 309: /* column_name ::= NK_ID */ yytestcase(yyruleno==309);
      case 310: /* function_name ::= NK_ID */ yytestcase(yyruleno==310);
      case 311: /* table_alias ::= NK_ID */ yytestcase(yyruleno==311);
      case 312: /* column_alias ::= NK_ID */ yytestcase(yyruleno==312);
      case 313: /* user_name ::= NK_ID */ yytestcase(yyruleno==313);
      case 314: /* index_name ::= NK_ID */ yytestcase(yyruleno==314);
      case 315: /* topic_name ::= NK_ID */ yytestcase(yyruleno==315);
      case 316: /* stream_name ::= NK_ID */ yytestcase(yyruleno==316);
      case 317: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==317);
      case 352: /* noarg_func ::= NOW */ yytestcase(yyruleno==352);
      case 353: /* noarg_func ::= TODAY */ yytestcase(yyruleno==353);
      case 354: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==354);
      case 355: /* noarg_func ::= DATABASE */ yytestcase(yyruleno==355);
      case 356: /* noarg_func ::= CLIENT_VERSION */ yytestcase(yyruleno==356);
      case 357: /* noarg_func ::= SERVER_VERSION */ yytestcase(yyruleno==357);
      case 358: /* noarg_func ::= SERVER_STATUS */ yytestcase(yyruleno==358);
      case 359: /* noarg_func ::= CURRENT_USER */ yytestcase(yyruleno==359);
      case 360: /* noarg_func ::= USER */ yytestcase(yyruleno==360);
      case 361: /* star_func ::= COUNT */ yytestcase(yyruleno==361);
      case 362: /* star_func ::= FIRST */ yytestcase(yyruleno==362);
      case 363: /* star_func ::= LAST */ yytestcase(yyruleno==363);
      case 364: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==364);
{ yylhsminor.yy401 = yymsp[0].minor.yy0; }
  yymsp[0].minor.yy401 = yylhsminor.yy401;
X
Xiaoyu Wang 已提交
3469 3470
        break;
      case 52: /* cmd ::= ALTER LOCAL NK_STRING */
3471 3472
{ pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); }
        break;
X
Xiaoyu Wang 已提交
3473
      case 53: /* cmd ::= ALTER LOCAL NK_STRING NK_STRING */
3474 3475
{ pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
        break;
X
Xiaoyu Wang 已提交
3476
      case 54: /* cmd ::= CREATE QNODE ON DNODE NK_INTEGER */
3477
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_QNODE_STMT, &yymsp[0].minor.yy0); }
X
Xiaoyu Wang 已提交
3478
        break;
X
Xiaoyu Wang 已提交
3479
      case 55: /* cmd ::= DROP QNODE ON DNODE NK_INTEGER */
3480
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_QNODE_STMT, &yymsp[0].minor.yy0); }
3481
        break;
X
Xiaoyu Wang 已提交
3482
      case 56: /* cmd ::= CREATE BNODE ON DNODE NK_INTEGER */
3483
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_BNODE_STMT, &yymsp[0].minor.yy0); }
X
Xiaoyu Wang 已提交
3484
        break;
X
Xiaoyu Wang 已提交
3485
      case 57: /* cmd ::= DROP BNODE ON DNODE NK_INTEGER */
3486
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_BNODE_STMT, &yymsp[0].minor.yy0); }
X
Xiaoyu Wang 已提交
3487
        break;
X
Xiaoyu Wang 已提交
3488
      case 58: /* cmd ::= CREATE SNODE ON DNODE NK_INTEGER */
3489
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_SNODE_STMT, &yymsp[0].minor.yy0); }
3490
        break;
X
Xiaoyu Wang 已提交
3491
      case 59: /* cmd ::= DROP SNODE ON DNODE NK_INTEGER */
3492
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_SNODE_STMT, &yymsp[0].minor.yy0); }
3493
        break;
X
Xiaoyu Wang 已提交
3494
      case 60: /* cmd ::= CREATE MNODE ON DNODE NK_INTEGER */
3495
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_MNODE_STMT, &yymsp[0].minor.yy0); }
3496
        break;
X
Xiaoyu Wang 已提交
3497
      case 61: /* cmd ::= DROP MNODE ON DNODE NK_INTEGER */
3498
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); }
3499
        break;
X
Xiaoyu Wang 已提交
3500
      case 62: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
X
Xiaoyu Wang 已提交
3501
{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy89, &yymsp[-1].minor.yy401, yymsp[0].minor.yy248); }
3502
        break;
X
Xiaoyu Wang 已提交
3503
      case 63: /* cmd ::= DROP DATABASE exists_opt db_name */
X
Xiaoyu Wang 已提交
3504
{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy89, &yymsp[0].minor.yy401); }
3505
        break;
X
Xiaoyu Wang 已提交
3506
      case 64: /* cmd ::= USE db_name */
X
Xiaoyu Wang 已提交
3507
{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy401); }
3508
        break;
X
Xiaoyu Wang 已提交
3509
      case 65: /* cmd ::= ALTER DATABASE db_name alter_db_options */
X
Xiaoyu Wang 已提交
3510
{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy401, yymsp[0].minor.yy248); }
X
Xiaoyu Wang 已提交
3511 3512
        break;
      case 66: /* cmd ::= FLUSH DATABASE db_name */
X
Xiaoyu Wang 已提交
3513
{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy401); }
X
Xiaoyu Wang 已提交
3514 3515
        break;
      case 67: /* not_exists_opt ::= IF NOT EXISTS */
X
Xiaoyu Wang 已提交
3516
{ yymsp[-2].minor.yy89 = true; }
X
Xiaoyu Wang 已提交
3517 3518 3519 3520 3521
        break;
      case 68: /* not_exists_opt ::= */
      case 70: /* exists_opt ::= */ yytestcase(yyruleno==70);
      case 249: /* analyze_opt ::= */ yytestcase(yyruleno==249);
      case 257: /* agg_func_opt ::= */ yytestcase(yyruleno==257);
X
Xiaoyu Wang 已提交
3522 3523
      case 418: /* set_quantifier_opt ::= */ yytestcase(yyruleno==418);
{ yymsp[1].minor.yy89 = false; }
3524
        break;
X
Xiaoyu Wang 已提交
3525
      case 69: /* exists_opt ::= IF EXISTS */
X
Xiaoyu Wang 已提交
3526
{ yymsp[-1].minor.yy89 = true; }
3527
        break;
X
Xiaoyu Wang 已提交
3528
      case 71: /* db_options ::= */
X
Xiaoyu Wang 已提交
3529
{ yymsp[1].minor.yy248 = createDefaultDatabaseOptions(pCxt); }
3530
        break;
X
Xiaoyu Wang 已提交
3531
      case 72: /* db_options ::= db_options BUFFER NK_INTEGER */
X
Xiaoyu Wang 已提交
3532 3533
{ yylhsminor.yy248 = setDatabaseOption(pCxt, yymsp[-2].minor.yy248, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
3534
        break;
X
Xiaoyu Wang 已提交
3535
      case 73: /* db_options ::= db_options CACHELAST NK_INTEGER */
X
Xiaoyu Wang 已提交
3536 3537
{ yylhsminor.yy248 = setDatabaseOption(pCxt, yymsp[-2].minor.yy248, DB_OPTION_CACHELAST, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
3538
        break;
X
Xiaoyu Wang 已提交
3539
      case 74: /* db_options ::= db_options COMP NK_INTEGER */
X
Xiaoyu Wang 已提交
3540 3541
{ yylhsminor.yy248 = setDatabaseOption(pCxt, yymsp[-2].minor.yy248, DB_OPTION_COMP, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
3542
        break;
X
Xiaoyu Wang 已提交
3543 3544
      case 75: /* db_options ::= db_options DURATION NK_INTEGER */
      case 76: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==76);
X
Xiaoyu Wang 已提交
3545 3546
{ yylhsminor.yy248 = setDatabaseOption(pCxt, yymsp[-2].minor.yy248, DB_OPTION_DAYS, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
3547
        break;
X
Xiaoyu Wang 已提交
3548
      case 77: /* db_options ::= db_options FSYNC NK_INTEGER */
X
Xiaoyu Wang 已提交
3549 3550
{ yylhsminor.yy248 = setDatabaseOption(pCxt, yymsp[-2].minor.yy248, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
3551
        break;
X
Xiaoyu Wang 已提交
3552
      case 78: /* db_options ::= db_options MAXROWS NK_INTEGER */
X
Xiaoyu Wang 已提交
3553 3554
{ yylhsminor.yy248 = setDatabaseOption(pCxt, yymsp[-2].minor.yy248, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
3555
        break;
X
Xiaoyu Wang 已提交
3556
      case 79: /* db_options ::= db_options MINROWS NK_INTEGER */
X
Xiaoyu Wang 已提交
3557 3558
{ yylhsminor.yy248 = setDatabaseOption(pCxt, yymsp[-2].minor.yy248, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
3559
        break;
X
Xiaoyu Wang 已提交
3560 3561
      case 80: /* db_options ::= db_options KEEP integer_list */
      case 81: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==81);
X
Xiaoyu Wang 已提交
3562 3563
{ yylhsminor.yy248 = setDatabaseOption(pCxt, yymsp[-2].minor.yy248, DB_OPTION_KEEP, yymsp[0].minor.yy552); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
3564
        break;
X
Xiaoyu Wang 已提交
3565
      case 82: /* db_options ::= db_options PAGES NK_INTEGER */
X
Xiaoyu Wang 已提交
3566 3567
{ yylhsminor.yy248 = setDatabaseOption(pCxt, yymsp[-2].minor.yy248, DB_OPTION_PAGES, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
3568
        break;
X
Xiaoyu Wang 已提交
3569
      case 83: /* db_options ::= db_options PAGESIZE NK_INTEGER */
X
Xiaoyu Wang 已提交
3570 3571
{ yylhsminor.yy248 = setDatabaseOption(pCxt, yymsp[-2].minor.yy248, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
3572 3573
        break;
      case 84: /* db_options ::= db_options PRECISION NK_STRING */
X
Xiaoyu Wang 已提交
3574 3575
{ yylhsminor.yy248 = setDatabaseOption(pCxt, yymsp[-2].minor.yy248, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
3576 3577
        break;
      case 85: /* db_options ::= db_options REPLICA NK_INTEGER */
X
Xiaoyu Wang 已提交
3578 3579
{ yylhsminor.yy248 = setDatabaseOption(pCxt, yymsp[-2].minor.yy248, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
3580 3581
        break;
      case 86: /* db_options ::= db_options STRICT NK_INTEGER */
X
Xiaoyu Wang 已提交
3582 3583
{ yylhsminor.yy248 = setDatabaseOption(pCxt, yymsp[-2].minor.yy248, DB_OPTION_STRICT, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
3584 3585
        break;
      case 87: /* db_options ::= db_options WAL NK_INTEGER */
X
Xiaoyu Wang 已提交
3586 3587
{ yylhsminor.yy248 = setDatabaseOption(pCxt, yymsp[-2].minor.yy248, DB_OPTION_WAL, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
3588 3589
        break;
      case 88: /* db_options ::= db_options VGROUPS NK_INTEGER */
X
Xiaoyu Wang 已提交
3590 3591
{ yylhsminor.yy248 = setDatabaseOption(pCxt, yymsp[-2].minor.yy248, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
3592 3593
        break;
      case 89: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */
X
Xiaoyu Wang 已提交
3594 3595
{ yylhsminor.yy248 = setDatabaseOption(pCxt, yymsp[-2].minor.yy248, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
3596 3597
        break;
      case 90: /* db_options ::= db_options RETENTIONS retention_list */
X
Xiaoyu Wang 已提交
3598 3599
{ yylhsminor.yy248 = setDatabaseOption(pCxt, yymsp[-2].minor.yy248, DB_OPTION_RETENTIONS, yymsp[0].minor.yy552); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
3600 3601
        break;
      case 91: /* db_options ::= db_options SCHEMALESS NK_INTEGER */
X
Xiaoyu Wang 已提交
3602 3603
{ yylhsminor.yy248 = setDatabaseOption(pCxt, yymsp[-2].minor.yy248, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
3604 3605
        break;
      case 92: /* alter_db_options ::= alter_db_option */
X
Xiaoyu Wang 已提交
3606 3607
{ yylhsminor.yy248 = createAlterDatabaseOptions(pCxt); yylhsminor.yy248 = setAlterDatabaseOption(pCxt, yylhsminor.yy248, &yymsp[0].minor.yy301); }
  yymsp[0].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
3608 3609
        break;
      case 93: /* alter_db_options ::= alter_db_options alter_db_option */
X
Xiaoyu Wang 已提交
3610 3611
{ yylhsminor.yy248 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy248, &yymsp[0].minor.yy301); }
  yymsp[-1].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
3612 3613
        break;
      case 94: /* alter_db_option ::= BUFFER NK_INTEGER */
X
Xiaoyu Wang 已提交
3614
{ yymsp[-1].minor.yy301.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy301.val = yymsp[0].minor.yy0; }
X
Xiaoyu Wang 已提交
3615 3616
        break;
      case 95: /* alter_db_option ::= CACHELAST NK_INTEGER */
X
Xiaoyu Wang 已提交
3617
{ yymsp[-1].minor.yy301.type = DB_OPTION_CACHELAST; yymsp[-1].minor.yy301.val = yymsp[0].minor.yy0; }
X
Xiaoyu Wang 已提交
3618 3619
        break;
      case 96: /* alter_db_option ::= FSYNC NK_INTEGER */
X
Xiaoyu Wang 已提交
3620
{ yymsp[-1].minor.yy301.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy301.val = yymsp[0].minor.yy0; }
X
Xiaoyu Wang 已提交
3621 3622 3623
        break;
      case 97: /* alter_db_option ::= KEEP integer_list */
      case 98: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==98);
X
Xiaoyu Wang 已提交
3624
{ yymsp[-1].minor.yy301.type = DB_OPTION_KEEP; yymsp[-1].minor.yy301.pList = yymsp[0].minor.yy552; }
X
Xiaoyu Wang 已提交
3625 3626
        break;
      case 99: /* alter_db_option ::= PAGES NK_INTEGER */
X
Xiaoyu Wang 已提交
3627
{ yymsp[-1].minor.yy301.type = DB_OPTION_PAGES; yymsp[-1].minor.yy301.val = yymsp[0].minor.yy0; }
X
Xiaoyu Wang 已提交
3628 3629
        break;
      case 100: /* alter_db_option ::= REPLICA NK_INTEGER */
X
Xiaoyu Wang 已提交
3630
{ yymsp[-1].minor.yy301.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy301.val = yymsp[0].minor.yy0; }
X
Xiaoyu Wang 已提交
3631 3632
        break;
      case 101: /* alter_db_option ::= STRICT NK_INTEGER */
X
Xiaoyu Wang 已提交
3633
{ yymsp[-1].minor.yy301.type = DB_OPTION_STRICT; yymsp[-1].minor.yy301.val = yymsp[0].minor.yy0; }
X
Xiaoyu Wang 已提交
3634 3635
        break;
      case 102: /* alter_db_option ::= WAL NK_INTEGER */
X
Xiaoyu Wang 已提交
3636
{ yymsp[-1].minor.yy301.type = DB_OPTION_WAL; yymsp[-1].minor.yy301.val = yymsp[0].minor.yy0; }
X
Xiaoyu Wang 已提交
3637 3638
        break;
      case 103: /* integer_list ::= NK_INTEGER */
X
Xiaoyu Wang 已提交
3639 3640
{ yylhsminor.yy552 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy552 = yylhsminor.yy552;
X
Xiaoyu Wang 已提交
3641 3642
        break;
      case 104: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */
X
Xiaoyu Wang 已提交
3643 3644 3645
      case 279: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==279);
{ yylhsminor.yy552 = addNodeToList(pCxt, yymsp[-2].minor.yy552, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
  yymsp[-2].minor.yy552 = yylhsminor.yy552;
X
Xiaoyu Wang 已提交
3646 3647
        break;
      case 105: /* variable_list ::= NK_VARIABLE */
X
Xiaoyu Wang 已提交
3648 3649
{ yylhsminor.yy552 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy552 = yylhsminor.yy552;
X
Xiaoyu Wang 已提交
3650 3651
        break;
      case 106: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */
X
Xiaoyu Wang 已提交
3652 3653
{ yylhsminor.yy552 = addNodeToList(pCxt, yymsp[-2].minor.yy552, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
  yymsp[-2].minor.yy552 = yylhsminor.yy552;
X
Xiaoyu Wang 已提交
3654 3655 3656 3657 3658 3659 3660 3661
        break;
      case 107: /* retention_list ::= retention */
      case 127: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==127);
      case 130: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==130);
      case 137: /* column_def_list ::= column_def */ yytestcase(yyruleno==137);
      case 180: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==180);
      case 185: /* col_name_list ::= col_name */ yytestcase(yyruleno==185);
      case 232: /* func_list ::= func */ yytestcase(yyruleno==232);
X
Xiaoyu Wang 已提交
3662 3663 3664 3665 3666 3667
      case 305: /* literal_list ::= signed_literal */ yytestcase(yyruleno==305);
      case 367: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==367);
      case 421: /* select_list ::= select_item */ yytestcase(yyruleno==421);
      case 475: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==475);
{ yylhsminor.yy552 = createNodeList(pCxt, yymsp[0].minor.yy248); }
  yymsp[0].minor.yy552 = yylhsminor.yy552;
X
Xiaoyu Wang 已提交
3668 3669 3670 3671 3672 3673
        break;
      case 108: /* retention_list ::= retention_list NK_COMMA retention */
      case 138: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==138);
      case 181: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==181);
      case 186: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==186);
      case 233: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==233);
X
Xiaoyu Wang 已提交
3674 3675 3676 3677 3678 3679
      case 306: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==306);
      case 368: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==368);
      case 422: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==422);
      case 476: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==476);
{ yylhsminor.yy552 = addNodeToList(pCxt, yymsp[-2].minor.yy552, yymsp[0].minor.yy248); }
  yymsp[-2].minor.yy552 = yylhsminor.yy552;
X
Xiaoyu Wang 已提交
3680 3681
        break;
      case 109: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */
X
Xiaoyu Wang 已提交
3682 3683
{ yylhsminor.yy248 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
3684 3685 3686
        break;
      case 110: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */
      case 112: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==112);
X
Xiaoyu Wang 已提交
3687
{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy89, yymsp[-5].minor.yy248, yymsp[-3].minor.yy552, yymsp[-1].minor.yy552, yymsp[0].minor.yy248); }
X
Xiaoyu Wang 已提交
3688 3689
        break;
      case 111: /* cmd ::= CREATE TABLE multi_create_clause */
X
Xiaoyu Wang 已提交
3690
{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy552); }
X
Xiaoyu Wang 已提交
3691 3692
        break;
      case 113: /* cmd ::= DROP TABLE multi_drop_clause */
X
Xiaoyu Wang 已提交
3693
{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy552); }
X
Xiaoyu Wang 已提交
3694 3695
        break;
      case 114: /* cmd ::= DROP STABLE exists_opt full_table_name */
X
Xiaoyu Wang 已提交
3696
{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy89, yymsp[0].minor.yy248); }
X
Xiaoyu Wang 已提交
3697 3698 3699
        break;
      case 115: /* cmd ::= ALTER TABLE alter_table_clause */
      case 116: /* cmd ::= ALTER STABLE alter_table_clause */ yytestcase(yyruleno==116);
X
Xiaoyu Wang 已提交
3700 3701
      case 282: /* cmd ::= query_expression */ yytestcase(yyruleno==282);
{ pCxt->pRootNode = yymsp[0].minor.yy248; }
X
Xiaoyu Wang 已提交
3702 3703
        break;
      case 117: /* alter_table_clause ::= full_table_name alter_table_options */
X
Xiaoyu Wang 已提交
3704 3705
{ yylhsminor.yy248 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy248, yymsp[0].minor.yy248); }
  yymsp[-1].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
3706 3707
        break;
      case 118: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */
X
Xiaoyu Wang 已提交
3708 3709
{ yylhsminor.yy248 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy248, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy401, yymsp[0].minor.yy224); }
  yymsp[-4].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
3710 3711
        break;
      case 119: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */
X
Xiaoyu Wang 已提交
3712 3713
{ yylhsminor.yy248 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy248, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy401); }
  yymsp[-3].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
3714 3715
        break;
      case 120: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */
X
Xiaoyu Wang 已提交
3716 3717
{ yylhsminor.yy248 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy248, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy401, yymsp[0].minor.yy224); }
  yymsp[-4].minor.yy248 = yylhsminor.yy248;
3718
        break;
X
Xiaoyu Wang 已提交
3719
      case 121: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */
X
Xiaoyu Wang 已提交
3720 3721
{ yylhsminor.yy248 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy248, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy401, &yymsp[0].minor.yy401); }
  yymsp[-4].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
3722 3723
        break;
      case 122: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */
X
Xiaoyu Wang 已提交
3724 3725
{ yylhsminor.yy248 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy248, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy401, yymsp[0].minor.yy224); }
  yymsp[-4].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
3726 3727
        break;
      case 123: /* alter_table_clause ::= full_table_name DROP TAG column_name */
X
Xiaoyu Wang 已提交
3728 3729
{ yylhsminor.yy248 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy248, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy401); }
  yymsp[-3].minor.yy248 = yylhsminor.yy248;
3730
        break;
X
Xiaoyu Wang 已提交
3731
      case 124: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */
X
Xiaoyu Wang 已提交
3732 3733
{ yylhsminor.yy248 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy248, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy401, yymsp[0].minor.yy224); }
  yymsp[-4].minor.yy248 = yylhsminor.yy248;
3734
        break;
X
Xiaoyu Wang 已提交
3735
      case 125: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */
X
Xiaoyu Wang 已提交
3736 3737
{ yylhsminor.yy248 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy248, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy401, &yymsp[0].minor.yy401); }
  yymsp[-4].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
3738 3739
        break;
      case 126: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */
X
Xiaoyu Wang 已提交
3740 3741
{ yylhsminor.yy248 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy248, &yymsp[-2].minor.yy401, yymsp[0].minor.yy248); }
  yymsp[-5].minor.yy248 = yylhsminor.yy248;
3742
        break;
X
Xiaoyu Wang 已提交
3743 3744
      case 128: /* multi_create_clause ::= multi_create_clause create_subtable_clause */
      case 131: /* multi_drop_clause ::= multi_drop_clause drop_table_clause */ yytestcase(yyruleno==131);
X
Xiaoyu Wang 已提交
3745 3746
{ yylhsminor.yy552 = addNodeToList(pCxt, yymsp[-1].minor.yy552, yymsp[0].minor.yy248); }
  yymsp[-1].minor.yy552 = yylhsminor.yy552;
3747
        break;
X
Xiaoyu Wang 已提交
3748
      case 129: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP table_options */
X
Xiaoyu Wang 已提交
3749 3750
{ yylhsminor.yy248 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy89, yymsp[-8].minor.yy248, yymsp[-6].minor.yy248, yymsp[-5].minor.yy552, yymsp[-2].minor.yy552, yymsp[0].minor.yy248); }
  yymsp[-9].minor.yy248 = yylhsminor.yy248;
3751
        break;
X
Xiaoyu Wang 已提交
3752
      case 132: /* drop_table_clause ::= exists_opt full_table_name */
X
Xiaoyu Wang 已提交
3753 3754
{ yylhsminor.yy248 = createDropTableClause(pCxt, yymsp[-1].minor.yy89, yymsp[0].minor.yy248); }
  yymsp[-1].minor.yy248 = yylhsminor.yy248;
3755
        break;
X
Xiaoyu Wang 已提交
3756 3757
      case 133: /* specific_tags_opt ::= */
      case 164: /* tags_def_opt ::= */ yytestcase(yyruleno==164);
X
Xiaoyu Wang 已提交
3758 3759 3760 3761
      case 430: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==430);
      case 447: /* group_by_clause_opt ::= */ yytestcase(yyruleno==447);
      case 463: /* order_by_clause_opt ::= */ yytestcase(yyruleno==463);
{ yymsp[1].minor.yy552 = NULL; }
3762
        break;
X
Xiaoyu Wang 已提交
3763
      case 134: /* specific_tags_opt ::= NK_LP col_name_list NK_RP */
X
Xiaoyu Wang 已提交
3764
{ yymsp[-2].minor.yy552 = yymsp[-1].minor.yy552; }
3765
        break;
X
Xiaoyu Wang 已提交
3766
      case 135: /* full_table_name ::= table_name */
X
Xiaoyu Wang 已提交
3767 3768
{ yylhsminor.yy248 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy401, NULL); }
  yymsp[0].minor.yy248 = yylhsminor.yy248;
3769
        break;
X
Xiaoyu Wang 已提交
3770
      case 136: /* full_table_name ::= db_name NK_DOT table_name */
X
Xiaoyu Wang 已提交
3771 3772
{ yylhsminor.yy248 = createRealTableNode(pCxt, &yymsp[-2].minor.yy401, &yymsp[0].minor.yy401, NULL); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
3773
        break;
X
Xiaoyu Wang 已提交
3774
      case 139: /* column_def ::= column_name type_name */
X
Xiaoyu Wang 已提交
3775 3776
{ yylhsminor.yy248 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy401, yymsp[0].minor.yy224, NULL); }
  yymsp[-1].minor.yy248 = yylhsminor.yy248;
3777
        break;
X
Xiaoyu Wang 已提交
3778
      case 140: /* column_def ::= column_name type_name COMMENT NK_STRING */
X
Xiaoyu Wang 已提交
3779 3780
{ yylhsminor.yy248 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy401, yymsp[-2].minor.yy224, &yymsp[0].minor.yy0); }
  yymsp[-3].minor.yy248 = yylhsminor.yy248;
3781
        break;
X
Xiaoyu Wang 已提交
3782
      case 141: /* type_name ::= BOOL */
X
Xiaoyu Wang 已提交
3783
{ yymsp[0].minor.yy224 = createDataType(TSDB_DATA_TYPE_BOOL); }
3784
        break;
X
Xiaoyu Wang 已提交
3785
      case 142: /* type_name ::= TINYINT */
X
Xiaoyu Wang 已提交
3786
{ yymsp[0].minor.yy224 = createDataType(TSDB_DATA_TYPE_TINYINT); }
3787
        break;
X
Xiaoyu Wang 已提交
3788
      case 143: /* type_name ::= SMALLINT */
X
Xiaoyu Wang 已提交
3789
{ yymsp[0].minor.yy224 = createDataType(TSDB_DATA_TYPE_SMALLINT); }
3790
        break;
X
Xiaoyu Wang 已提交
3791 3792
      case 144: /* type_name ::= INT */
      case 145: /* type_name ::= INTEGER */ yytestcase(yyruleno==145);
X
Xiaoyu Wang 已提交
3793
{ yymsp[0].minor.yy224 = createDataType(TSDB_DATA_TYPE_INT); }
3794
        break;
X
Xiaoyu Wang 已提交
3795
      case 146: /* type_name ::= BIGINT */
X
Xiaoyu Wang 已提交
3796
{ yymsp[0].minor.yy224 = createDataType(TSDB_DATA_TYPE_BIGINT); }
3797
        break;
X
Xiaoyu Wang 已提交
3798
      case 147: /* type_name ::= FLOAT */
X
Xiaoyu Wang 已提交
3799
{ yymsp[0].minor.yy224 = createDataType(TSDB_DATA_TYPE_FLOAT); }
3800
        break;
X
Xiaoyu Wang 已提交
3801
      case 148: /* type_name ::= DOUBLE */
X
Xiaoyu Wang 已提交
3802
{ yymsp[0].minor.yy224 = createDataType(TSDB_DATA_TYPE_DOUBLE); }
3803
        break;
X
Xiaoyu Wang 已提交
3804
      case 149: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
X
Xiaoyu Wang 已提交
3805
{ yymsp[-3].minor.yy224 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); }
3806
        break;
X
Xiaoyu Wang 已提交
3807
      case 150: /* type_name ::= TIMESTAMP */
X
Xiaoyu Wang 已提交
3808
{ yymsp[0].minor.yy224 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); }
3809
        break;
X
Xiaoyu Wang 已提交
3810
      case 151: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
X
Xiaoyu Wang 已提交
3811
{ yymsp[-3].minor.yy224 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); }
3812
        break;
X
Xiaoyu Wang 已提交
3813
      case 152: /* type_name ::= TINYINT UNSIGNED */
X
Xiaoyu Wang 已提交
3814
{ yymsp[-1].minor.yy224 = createDataType(TSDB_DATA_TYPE_UTINYINT); }
3815
        break;
X
Xiaoyu Wang 已提交
3816
      case 153: /* type_name ::= SMALLINT UNSIGNED */
X
Xiaoyu Wang 已提交
3817
{ yymsp[-1].minor.yy224 = createDataType(TSDB_DATA_TYPE_USMALLINT); }
3818
        break;
X
Xiaoyu Wang 已提交
3819
      case 154: /* type_name ::= INT UNSIGNED */
X
Xiaoyu Wang 已提交
3820
{ yymsp[-1].minor.yy224 = createDataType(TSDB_DATA_TYPE_UINT); }
3821
        break;
X
Xiaoyu Wang 已提交
3822
      case 155: /* type_name ::= BIGINT UNSIGNED */
X
Xiaoyu Wang 已提交
3823
{ yymsp[-1].minor.yy224 = createDataType(TSDB_DATA_TYPE_UBIGINT); }
3824
        break;
X
Xiaoyu Wang 已提交
3825
      case 156: /* type_name ::= JSON */
X
Xiaoyu Wang 已提交
3826
{ yymsp[0].minor.yy224 = createDataType(TSDB_DATA_TYPE_JSON); }
3827
        break;
X
Xiaoyu Wang 已提交
3828
      case 157: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
X
Xiaoyu Wang 已提交
3829
{ yymsp[-3].minor.yy224 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); }
3830
        break;
X
Xiaoyu Wang 已提交
3831
      case 158: /* type_name ::= MEDIUMBLOB */
X
Xiaoyu Wang 已提交
3832
{ yymsp[0].minor.yy224 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); }
3833
        break;
X
Xiaoyu Wang 已提交
3834
      case 159: /* type_name ::= BLOB */
X
Xiaoyu Wang 已提交
3835
{ yymsp[0].minor.yy224 = createDataType(TSDB_DATA_TYPE_BLOB); }
3836
        break;
X
Xiaoyu Wang 已提交
3837
      case 160: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
X
Xiaoyu Wang 已提交
3838
{ yymsp[-3].minor.yy224 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); }
3839
        break;
X
Xiaoyu Wang 已提交
3840
      case 161: /* type_name ::= DECIMAL */
X
Xiaoyu Wang 已提交
3841
{ yymsp[0].minor.yy224 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
3842
        break;
X
Xiaoyu Wang 已提交
3843
      case 162: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
X
Xiaoyu Wang 已提交
3844
{ yymsp[-3].minor.yy224 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
3845
        break;
X
Xiaoyu Wang 已提交
3846
      case 163: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
X
Xiaoyu Wang 已提交
3847
{ yymsp[-5].minor.yy224 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
3848
        break;
X
Xiaoyu Wang 已提交
3849
      case 165: /* tags_def_opt ::= tags_def */
X
Xiaoyu Wang 已提交
3850 3851 3852
      case 366: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==366);
{ yylhsminor.yy552 = yymsp[0].minor.yy552; }
  yymsp[0].minor.yy552 = yylhsminor.yy552;
3853
        break;
X
Xiaoyu Wang 已提交
3854
      case 166: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */
X
Xiaoyu Wang 已提交
3855
{ yymsp[-3].minor.yy552 = yymsp[-1].minor.yy552; }
3856
        break;
X
Xiaoyu Wang 已提交
3857
      case 167: /* table_options ::= */
X
Xiaoyu Wang 已提交
3858
{ yymsp[1].minor.yy248 = createDefaultTableOptions(pCxt); }
3859
        break;
X
Xiaoyu Wang 已提交
3860
      case 168: /* table_options ::= table_options COMMENT NK_STRING */
X
Xiaoyu Wang 已提交
3861 3862
{ yylhsminor.yy248 = setTableOption(pCxt, yymsp[-2].minor.yy248, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
3863
        break;
X
Xiaoyu Wang 已提交
3864
      case 169: /* table_options ::= table_options MAX_DELAY duration_list */
X
Xiaoyu Wang 已提交
3865 3866
{ yylhsminor.yy248 = setTableOption(pCxt, yymsp[-2].minor.yy248, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy552); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
3867
        break;
X
Xiaoyu Wang 已提交
3868
      case 170: /* table_options ::= table_options WATERMARK duration_list */
X
Xiaoyu Wang 已提交
3869 3870
{ yylhsminor.yy248 = setTableOption(pCxt, yymsp[-2].minor.yy248, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy552); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
3871
        break;
X
Xiaoyu Wang 已提交
3872
      case 171: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */
X
Xiaoyu Wang 已提交
3873 3874
{ yylhsminor.yy248 = setTableOption(pCxt, yymsp[-4].minor.yy248, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy552); }
  yymsp[-4].minor.yy248 = yylhsminor.yy248;
3875
        break;
X
Xiaoyu Wang 已提交
3876
      case 172: /* table_options ::= table_options TTL NK_INTEGER */
X
Xiaoyu Wang 已提交
3877 3878
{ yylhsminor.yy248 = setTableOption(pCxt, yymsp[-2].minor.yy248, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
3879
        break;
X
Xiaoyu Wang 已提交
3880
      case 173: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */
X
Xiaoyu Wang 已提交
3881 3882
{ yylhsminor.yy248 = setTableOption(pCxt, yymsp[-4].minor.yy248, TABLE_OPTION_SMA, yymsp[-1].minor.yy552); }
  yymsp[-4].minor.yy248 = yylhsminor.yy248;
3883
        break;
X
Xiaoyu Wang 已提交
3884
      case 174: /* alter_table_options ::= alter_table_option */
X
Xiaoyu Wang 已提交
3885 3886
{ yylhsminor.yy248 = createAlterTableOptions(pCxt); yylhsminor.yy248 = setTableOption(pCxt, yylhsminor.yy248, yymsp[0].minor.yy301.type, &yymsp[0].minor.yy301.val); }
  yymsp[0].minor.yy248 = yylhsminor.yy248;
3887
        break;
X
Xiaoyu Wang 已提交
3888
      case 175: /* alter_table_options ::= alter_table_options alter_table_option */
X
Xiaoyu Wang 已提交
3889 3890
{ yylhsminor.yy248 = setTableOption(pCxt, yymsp[-1].minor.yy248, yymsp[0].minor.yy301.type, &yymsp[0].minor.yy301.val); }
  yymsp[-1].minor.yy248 = yylhsminor.yy248;
3891
        break;
X
Xiaoyu Wang 已提交
3892
      case 176: /* alter_table_option ::= COMMENT NK_STRING */
X
Xiaoyu Wang 已提交
3893
{ yymsp[-1].minor.yy301.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy301.val = yymsp[0].minor.yy0; }
3894
        break;
X
Xiaoyu Wang 已提交
3895
      case 177: /* alter_table_option ::= TTL NK_INTEGER */
X
Xiaoyu Wang 已提交
3896
{ yymsp[-1].minor.yy301.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy301.val = yymsp[0].minor.yy0; }
3897
        break;
X
Xiaoyu Wang 已提交
3898
      case 178: /* duration_list ::= duration_literal */
X
Xiaoyu Wang 已提交
3899 3900 3901
      case 334: /* expression_list ::= expression */ yytestcase(yyruleno==334);
{ yylhsminor.yy552 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy248)); }
  yymsp[0].minor.yy552 = yylhsminor.yy552;
X
Xiaoyu Wang 已提交
3902
        break;
X
Xiaoyu Wang 已提交
3903
      case 179: /* duration_list ::= duration_list NK_COMMA duration_literal */
X
Xiaoyu Wang 已提交
3904 3905 3906
      case 335: /* expression_list ::= expression_list NK_COMMA expression */ yytestcase(yyruleno==335);
{ yylhsminor.yy552 = addNodeToList(pCxt, yymsp[-2].minor.yy552, releaseRawExprNode(pCxt, yymsp[0].minor.yy248)); }
  yymsp[-2].minor.yy552 = yylhsminor.yy552;
X
Xiaoyu Wang 已提交
3907
        break;
X
Xiaoyu Wang 已提交
3908
      case 182: /* rollup_func_name ::= function_name */
X
Xiaoyu Wang 已提交
3909 3910
{ yylhsminor.yy248 = createFunctionNode(pCxt, &yymsp[0].minor.yy401, NULL); }
  yymsp[0].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
3911
        break;
X
Xiaoyu Wang 已提交
3912 3913
      case 183: /* rollup_func_name ::= FIRST */
      case 184: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==184);
X
Xiaoyu Wang 已提交
3914 3915
{ yylhsminor.yy248 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); }
  yymsp[0].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
3916
        break;
X
Xiaoyu Wang 已提交
3917
      case 187: /* col_name ::= column_name */
X
Xiaoyu Wang 已提交
3918 3919
{ yylhsminor.yy248 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy401); }
  yymsp[0].minor.yy248 = yylhsminor.yy248;
3920
        break;
X
Xiaoyu Wang 已提交
3921
      case 188: /* cmd ::= SHOW DNODES */
3922
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); }
3923
        break;
X
Xiaoyu Wang 已提交
3924
      case 189: /* cmd ::= SHOW USERS */
3925
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT); }
3926
        break;
X
Xiaoyu Wang 已提交
3927
      case 190: /* cmd ::= SHOW DATABASES */
3928
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); }
3929
        break;
X
Xiaoyu Wang 已提交
3930
      case 191: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */
X
Xiaoyu Wang 已提交
3931
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy248, yymsp[0].minor.yy248, OP_TYPE_LIKE); }
3932
        break;
X
Xiaoyu Wang 已提交
3933
      case 192: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */
X
Xiaoyu Wang 已提交
3934
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy248, yymsp[0].minor.yy248, OP_TYPE_LIKE); }
3935
        break;
X
Xiaoyu Wang 已提交
3936
      case 193: /* cmd ::= SHOW db_name_cond_opt VGROUPS */
X
Xiaoyu Wang 已提交
3937
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy248, NULL, OP_TYPE_LIKE); }
3938
        break;
X
Xiaoyu Wang 已提交
3939
      case 194: /* cmd ::= SHOW MNODES */
3940
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); }
3941
        break;
X
Xiaoyu Wang 已提交
3942
      case 195: /* cmd ::= SHOW MODULES */
3943
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MODULES_STMT); }
3944
        break;
X
Xiaoyu Wang 已提交
3945
      case 196: /* cmd ::= SHOW QNODES */
3946
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT); }
3947
        break;
X
Xiaoyu Wang 已提交
3948
      case 197: /* cmd ::= SHOW FUNCTIONS */
3949
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); }
3950
        break;
X
Xiaoyu Wang 已提交
3951
      case 198: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */
X
Xiaoyu Wang 已提交
3952
{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy248, yymsp[-1].minor.yy248, OP_TYPE_EQUAL); }
3953
        break;
X
Xiaoyu Wang 已提交
3954
      case 199: /* cmd ::= SHOW STREAMS */
3955
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); }
3956
        break;
X
Xiaoyu Wang 已提交
3957
      case 200: /* cmd ::= SHOW ACCOUNTS */
3958
{ pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); }
3959
        break;
X
Xiaoyu Wang 已提交
3960
      case 201: /* cmd ::= SHOW APPS */
3961
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT); }
3962
        break;
X
Xiaoyu Wang 已提交
3963
      case 202: /* cmd ::= SHOW CONNECTIONS */
3964
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); }
3965
        break;
X
Xiaoyu Wang 已提交
3966 3967
      case 203: /* cmd ::= SHOW LICENCE */
      case 204: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==204);
3968
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCE_STMT); }
3969
        break;
X
Xiaoyu Wang 已提交
3970
      case 205: /* cmd ::= SHOW CREATE DATABASE db_name */
X
Xiaoyu Wang 已提交
3971
{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy401); }
3972
        break;
X
Xiaoyu Wang 已提交
3973
      case 206: /* cmd ::= SHOW CREATE TABLE full_table_name */
X
Xiaoyu Wang 已提交
3974
{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy248); }
3975
        break;
X
Xiaoyu Wang 已提交
3976
      case 207: /* cmd ::= SHOW CREATE STABLE full_table_name */
X
Xiaoyu Wang 已提交
3977
{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy248); }
3978
        break;
X
Xiaoyu Wang 已提交
3979
      case 208: /* cmd ::= SHOW QUERIES */
3980
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); }
3981
        break;
X
Xiaoyu Wang 已提交
3982
      case 209: /* cmd ::= SHOW SCORES */
3983
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT); }
3984
        break;
X
Xiaoyu Wang 已提交
3985
      case 210: /* cmd ::= SHOW TOPICS */
3986
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT); }
3987
        break;
X
Xiaoyu Wang 已提交
3988
      case 211: /* cmd ::= SHOW VARIABLES */
3989
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLES_STMT); }
X
Xiaoyu Wang 已提交
3990
        break;
X
Xiaoyu Wang 已提交
3991
      case 212: /* cmd ::= SHOW LOCAL VARIABLES */
3992 3993
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT); }
        break;
X
Xiaoyu Wang 已提交
3994
      case 213: /* cmd ::= SHOW DNODE NK_INTEGER VARIABLES */
3995 3996
{ pCxt->pRootNode = createShowDnodeVariablesStmt(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[-1].minor.yy0)); }
        break;
X
Xiaoyu Wang 已提交
3997
      case 214: /* cmd ::= SHOW BNODES */
3998
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT); }
3999
        break;
X
Xiaoyu Wang 已提交
4000
      case 215: /* cmd ::= SHOW SNODES */
4001
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT); }
4002
        break;
X
Xiaoyu Wang 已提交
4003
      case 216: /* cmd ::= SHOW CLUSTER */
4004
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT); }
4005
        break;
X
Xiaoyu Wang 已提交
4006
      case 217: /* cmd ::= SHOW TRANSACTIONS */
4007 4008
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); }
        break;
X
Xiaoyu Wang 已提交
4009
      case 218: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */
X
Xiaoyu Wang 已提交
4010
{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy248); }
X
Xiaoyu Wang 已提交
4011
        break;
X
Xiaoyu Wang 已提交
4012
      case 219: /* cmd ::= SHOW CONSUMERS */
4013
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); }
X
Xiaoyu Wang 已提交
4014
        break;
X
Xiaoyu Wang 已提交
4015
      case 220: /* cmd ::= SHOW SUBSCRIPTIONS */
4016
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); }
X
Xiaoyu Wang 已提交
4017
        break;
X
Xiaoyu Wang 已提交
4018 4019
      case 221: /* db_name_cond_opt ::= */
      case 226: /* from_db_opt ::= */ yytestcase(yyruleno==226);
X
Xiaoyu Wang 已提交
4020
{ yymsp[1].minor.yy248 = createDefaultDatabaseCondValue(pCxt); }
X
Xiaoyu Wang 已提交
4021
        break;
X
Xiaoyu Wang 已提交
4022
      case 222: /* db_name_cond_opt ::= db_name NK_DOT */
X
Xiaoyu Wang 已提交
4023 4024
{ yylhsminor.yy248 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy401); }
  yymsp[-1].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
4025
        break;
X
Xiaoyu Wang 已提交
4026 4027
      case 223: /* like_pattern_opt ::= */
      case 263: /* into_opt ::= */ yytestcase(yyruleno==263);
X
Xiaoyu Wang 已提交
4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038
      case 399: /* from_clause_opt ::= */ yytestcase(yyruleno==399);
      case 428: /* where_clause_opt ::= */ yytestcase(yyruleno==428);
      case 432: /* twindow_clause_opt ::= */ yytestcase(yyruleno==432);
      case 437: /* sliding_opt ::= */ yytestcase(yyruleno==437);
      case 439: /* fill_opt ::= */ yytestcase(yyruleno==439);
      case 451: /* having_clause_opt ::= */ yytestcase(yyruleno==451);
      case 453: /* range_opt ::= */ yytestcase(yyruleno==453);
      case 455: /* every_opt ::= */ yytestcase(yyruleno==455);
      case 465: /* slimit_clause_opt ::= */ yytestcase(yyruleno==465);
      case 469: /* limit_clause_opt ::= */ yytestcase(yyruleno==469);
{ yymsp[1].minor.yy248 = NULL; }
X
Xiaoyu Wang 已提交
4039
        break;
X
Xiaoyu Wang 已提交
4040
      case 224: /* like_pattern_opt ::= LIKE NK_STRING */
X
Xiaoyu Wang 已提交
4041
{ yymsp[-1].minor.yy248 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
X
Xiaoyu Wang 已提交
4042
        break;
X
Xiaoyu Wang 已提交
4043
      case 225: /* table_name_cond ::= table_name */
X
Xiaoyu Wang 已提交
4044 4045
{ yylhsminor.yy248 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy401); }
  yymsp[0].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
4046
        break;
X
Xiaoyu Wang 已提交
4047
      case 227: /* from_db_opt ::= FROM db_name */
X
Xiaoyu Wang 已提交
4048
{ yymsp[-1].minor.yy248 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy401); }
X
Xiaoyu Wang 已提交
4049
        break;
X
Xiaoyu Wang 已提交
4050
      case 228: /* cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */
X
Xiaoyu Wang 已提交
4051
{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy89, &yymsp[-3].minor.yy401, &yymsp[-1].minor.yy401, NULL, yymsp[0].minor.yy248); }
X
Xiaoyu Wang 已提交
4052
        break;
X
Xiaoyu Wang 已提交
4053
      case 229: /* cmd ::= DROP INDEX exists_opt index_name */
X
Xiaoyu Wang 已提交
4054
{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy89, &yymsp[0].minor.yy401); }
X
Xiaoyu Wang 已提交
4055
        break;
X
Xiaoyu Wang 已提交
4056
      case 230: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */
X
Xiaoyu Wang 已提交
4057
{ yymsp[-9].minor.yy248 = createIndexOption(pCxt, yymsp[-7].minor.yy552, releaseRawExprNode(pCxt, yymsp[-3].minor.yy248), NULL, yymsp[-1].minor.yy248, yymsp[0].minor.yy248); }
X
Xiaoyu Wang 已提交
4058
        break;
X
Xiaoyu Wang 已提交
4059
      case 231: /* 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 已提交
4060
{ yymsp[-11].minor.yy248 = createIndexOption(pCxt, yymsp[-9].minor.yy552, releaseRawExprNode(pCxt, yymsp[-5].minor.yy248), releaseRawExprNode(pCxt, yymsp[-3].minor.yy248), yymsp[-1].minor.yy248, yymsp[0].minor.yy248); }
4061
        break;
X
Xiaoyu Wang 已提交
4062
      case 234: /* func ::= function_name NK_LP expression_list NK_RP */
X
Xiaoyu Wang 已提交
4063 4064
{ yylhsminor.yy248 = createFunctionNode(pCxt, &yymsp[-3].minor.yy401, yymsp[-1].minor.yy552); }
  yymsp[-3].minor.yy248 = yylhsminor.yy248;
4065
        break;
X
Xiaoyu Wang 已提交
4066 4067
      case 235: /* sma_stream_opt ::= */
      case 265: /* stream_options ::= */ yytestcase(yyruleno==265);
X
Xiaoyu Wang 已提交
4068
{ yymsp[1].minor.yy248 = createStreamOptions(pCxt); }
X
Xiaoyu Wang 已提交
4069
        break;
X
Xiaoyu Wang 已提交
4070 4071
      case 236: /* sma_stream_opt ::= stream_options WATERMARK duration_literal */
      case 269: /* stream_options ::= stream_options WATERMARK duration_literal */ yytestcase(yyruleno==269);
X
Xiaoyu Wang 已提交
4072 4073
{ ((SStreamOptions*)yymsp[-2].minor.yy248)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy248); yylhsminor.yy248 = yymsp[-2].minor.yy248; }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
4074
        break;
X
Xiaoyu Wang 已提交
4075
      case 237: /* sma_stream_opt ::= stream_options MAX_DELAY duration_literal */
X
Xiaoyu Wang 已提交
4076 4077
{ ((SStreamOptions*)yymsp[-2].minor.yy248)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy248); yylhsminor.yy248 = yymsp[-2].minor.yy248; }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
4078
        break;
X
Xiaoyu Wang 已提交
4079
      case 238: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */
X
Xiaoyu Wang 已提交
4080
{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy89, &yymsp[-2].minor.yy401, yymsp[0].minor.yy248); }
X
Xiaoyu Wang 已提交
4081
        break;
X
Xiaoyu Wang 已提交
4082
      case 239: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */
X
Xiaoyu Wang 已提交
4083
{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy89, &yymsp[-3].minor.yy401, &yymsp[0].minor.yy401, false); }
4084
        break;
X
Xiaoyu Wang 已提交
4085
      case 240: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */
X
Xiaoyu Wang 已提交
4086
{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy89, &yymsp[-5].minor.yy401, &yymsp[0].minor.yy401, true); }
X
Xiaoyu Wang 已提交
4087
        break;
X
Xiaoyu Wang 已提交
4088
      case 241: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */
X
Xiaoyu Wang 已提交
4089
{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy89, &yymsp[-3].minor.yy401, yymsp[0].minor.yy248, false); }
4090
        break;
X
Xiaoyu Wang 已提交
4091
      case 242: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */
X
Xiaoyu Wang 已提交
4092
{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy89, &yymsp[-5].minor.yy401, yymsp[0].minor.yy248, true); }
4093
        break;
X
Xiaoyu Wang 已提交
4094
      case 243: /* cmd ::= DROP TOPIC exists_opt topic_name */
X
Xiaoyu Wang 已提交
4095
{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy89, &yymsp[0].minor.yy401); }
4096
        break;
X
Xiaoyu Wang 已提交
4097
      case 244: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */
X
Xiaoyu Wang 已提交
4098
{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy89, &yymsp[-2].minor.yy401, &yymsp[0].minor.yy401); }
4099
        break;
X
Xiaoyu Wang 已提交
4100 4101
      case 245: /* cmd ::= DESC full_table_name */
      case 246: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==246);
X
Xiaoyu Wang 已提交
4102
{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy248); }
4103
        break;
X
Xiaoyu Wang 已提交
4104
      case 247: /* cmd ::= RESET QUERY CACHE */
4105
{ pCxt->pRootNode = createResetQueryCacheStmt(pCxt); }
4106
        break;
X
Xiaoyu Wang 已提交
4107
      case 248: /* cmd ::= EXPLAIN analyze_opt explain_options query_expression */
X
Xiaoyu Wang 已提交
4108
{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy89, yymsp[-1].minor.yy248, yymsp[0].minor.yy248); }
4109
        break;
X
Xiaoyu Wang 已提交
4110 4111
      case 250: /* analyze_opt ::= ANALYZE */
      case 258: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==258);
X
Xiaoyu Wang 已提交
4112 4113
      case 419: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==419);
{ yymsp[0].minor.yy89 = true; }
4114
        break;
X
Xiaoyu Wang 已提交
4115
      case 251: /* explain_options ::= */
X
Xiaoyu Wang 已提交
4116
{ yymsp[1].minor.yy248 = createDefaultExplainOptions(pCxt); }
4117
        break;
X
Xiaoyu Wang 已提交
4118
      case 252: /* explain_options ::= explain_options VERBOSE NK_BOOL */
X
Xiaoyu Wang 已提交
4119 4120
{ yylhsminor.yy248 = setExplainVerbose(pCxt, yymsp[-2].minor.yy248, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
4121
        break;
X
Xiaoyu Wang 已提交
4122
      case 253: /* explain_options ::= explain_options RATIO NK_FLOAT */
X
Xiaoyu Wang 已提交
4123 4124
{ yylhsminor.yy248 = setExplainRatio(pCxt, yymsp[-2].minor.yy248, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
4125
        break;
X
Xiaoyu Wang 已提交
4126
      case 254: /* cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */
X
Xiaoyu Wang 已提交
4127
{ pCxt->pRootNode = createCompactStmt(pCxt, yymsp[-1].minor.yy552); }
4128
        break;
X
Xiaoyu Wang 已提交
4129
      case 255: /* cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */
X
Xiaoyu Wang 已提交
4130
{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy89, yymsp[-8].minor.yy89, &yymsp[-5].minor.yy401, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy224, yymsp[0].minor.yy228); }
4131
        break;
X
Xiaoyu Wang 已提交
4132
      case 256: /* cmd ::= DROP FUNCTION exists_opt function_name */
X
Xiaoyu Wang 已提交
4133
{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy89, &yymsp[0].minor.yy401); }
4134
        break;
X
Xiaoyu Wang 已提交
4135
      case 259: /* bufsize_opt ::= */
X
Xiaoyu Wang 已提交
4136
{ yymsp[1].minor.yy228 = 0; }
4137
        break;
X
Xiaoyu Wang 已提交
4138
      case 260: /* bufsize_opt ::= BUFSIZE NK_INTEGER */
X
Xiaoyu Wang 已提交
4139
{ yymsp[-1].minor.yy228 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); }
4140
        break;
X
Xiaoyu Wang 已提交
4141
      case 261: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */
X
Xiaoyu Wang 已提交
4142
{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-5].minor.yy89, &yymsp[-4].minor.yy401, yymsp[-2].minor.yy248, yymsp[-3].minor.yy248, yymsp[0].minor.yy248); }
4143
        break;
X
Xiaoyu Wang 已提交
4144
      case 262: /* cmd ::= DROP STREAM exists_opt stream_name */
X
Xiaoyu Wang 已提交
4145
{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy89, &yymsp[0].minor.yy401); }
4146
        break;
X
Xiaoyu Wang 已提交
4147
      case 264: /* into_opt ::= INTO full_table_name */
X
Xiaoyu Wang 已提交
4148 4149 4150 4151
      case 400: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==400);
      case 429: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==429);
      case 452: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==452);
{ yymsp[-1].minor.yy248 = yymsp[0].minor.yy248; }
4152
        break;
X
Xiaoyu Wang 已提交
4153
      case 266: /* stream_options ::= stream_options TRIGGER AT_ONCE */
X
Xiaoyu Wang 已提交
4154 4155
{ ((SStreamOptions*)yymsp[-2].minor.yy248)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy248 = yymsp[-2].minor.yy248; }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
4156
        break;
X
Xiaoyu Wang 已提交
4157
      case 267: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */
X
Xiaoyu Wang 已提交
4158 4159
{ ((SStreamOptions*)yymsp[-2].minor.yy248)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy248 = yymsp[-2].minor.yy248; }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
4160
        break;
X
Xiaoyu Wang 已提交
4161
      case 268: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
X
Xiaoyu Wang 已提交
4162 4163
{ ((SStreamOptions*)yymsp[-3].minor.yy248)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy248)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy248); yylhsminor.yy248 = yymsp[-3].minor.yy248; }
  yymsp[-3].minor.yy248 = yylhsminor.yy248;
4164
        break;
X
Xiaoyu Wang 已提交
4165 4166 4167
      case 270: /* stream_options ::= stream_options IGNORE EXPIRED */
{ ((SStreamOptions*)yymsp[-2].minor.yy248)->ignoreExpired = true; yylhsminor.yy248 = yymsp[-2].minor.yy248; }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
4168
        break;
X
Xiaoyu Wang 已提交
4169
      case 271: /* cmd ::= KILL CONNECTION NK_INTEGER */
4170 4171
{ pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); }
        break;
X
Xiaoyu Wang 已提交
4172
      case 272: /* cmd ::= KILL QUERY NK_STRING */
X
Xiaoyu Wang 已提交
4173
{ pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); }
4174
        break;
X
Xiaoyu Wang 已提交
4175
      case 273: /* cmd ::= KILL TRANSACTION NK_INTEGER */
4176 4177
{ pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); }
        break;
X
Xiaoyu Wang 已提交
4178
      case 274: /* cmd ::= BALANCE VGROUP */
X
Xiaoyu Wang 已提交
4179 4180
{ pCxt->pRootNode = createBalanceVgroupStmt(pCxt); }
        break;
X
Xiaoyu Wang 已提交
4181
      case 275: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */
4182 4183
{ pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
        break;
X
Xiaoyu Wang 已提交
4184 4185
      case 276: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */
{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy552); }
4186
        break;
X
Xiaoyu Wang 已提交
4187
      case 277: /* cmd ::= SPLIT VGROUP NK_INTEGER */
4188 4189
{ pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); }
        break;
X
Xiaoyu Wang 已提交
4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259
      case 278: /* dnode_list ::= DNODE NK_INTEGER */
{ yymsp[-1].minor.yy552 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
        break;
      case 280: /* cmd ::= SYNCDB db_name REPLICA */
{ pCxt->pRootNode = createSyncdbStmt(pCxt, &yymsp[-1].minor.yy401); }
        break;
      case 281: /* cmd ::= DELETE FROM full_table_name where_clause_opt */
{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy248, yymsp[0].minor.yy248); }
        break;
      case 283: /* literal ::= NK_INTEGER */
{ yylhsminor.yy248 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy248 = yylhsminor.yy248;
        break;
      case 284: /* literal ::= NK_FLOAT */
{ yylhsminor.yy248 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy248 = yylhsminor.yy248;
        break;
      case 285: /* literal ::= NK_STRING */
{ yylhsminor.yy248 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy248 = yylhsminor.yy248;
        break;
      case 286: /* literal ::= NK_BOOL */
{ yylhsminor.yy248 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy248 = yylhsminor.yy248;
        break;
      case 287: /* literal ::= TIMESTAMP NK_STRING */
{ yylhsminor.yy248 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); }
  yymsp[-1].minor.yy248 = yylhsminor.yy248;
        break;
      case 288: /* literal ::= duration_literal */
      case 298: /* signed_literal ::= signed */ yytestcase(yyruleno==298);
      case 318: /* expression ::= literal */ yytestcase(yyruleno==318);
      case 319: /* expression ::= pseudo_column */ yytestcase(yyruleno==319);
      case 320: /* expression ::= column_reference */ yytestcase(yyruleno==320);
      case 321: /* expression ::= function_expression */ yytestcase(yyruleno==321);
      case 322: /* expression ::= subquery */ yytestcase(yyruleno==322);
      case 349: /* function_expression ::= literal_func */ yytestcase(yyruleno==349);
      case 391: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==391);
      case 395: /* boolean_primary ::= predicate */ yytestcase(yyruleno==395);
      case 397: /* common_expression ::= expression */ yytestcase(yyruleno==397);
      case 398: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==398);
      case 401: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==401);
      case 403: /* table_reference ::= table_primary */ yytestcase(yyruleno==403);
      case 404: /* table_reference ::= joined_table */ yytestcase(yyruleno==404);
      case 408: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==408);
      case 458: /* query_expression_body ::= query_primary */ yytestcase(yyruleno==458);
      case 461: /* query_primary ::= query_specification */ yytestcase(yyruleno==461);
{ yylhsminor.yy248 = yymsp[0].minor.yy248; }
  yymsp[0].minor.yy248 = yylhsminor.yy248;
        break;
      case 289: /* literal ::= NULL */
{ yylhsminor.yy248 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy248 = yylhsminor.yy248;
        break;
      case 290: /* literal ::= NK_QUESTION */
{ yylhsminor.yy248 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy248 = yylhsminor.yy248;
        break;
      case 291: /* duration_literal ::= NK_VARIABLE */
{ yylhsminor.yy248 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy248 = yylhsminor.yy248;
        break;
      case 292: /* signed ::= NK_INTEGER */
{ yylhsminor.yy248 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); }
  yymsp[0].minor.yy248 = yylhsminor.yy248;
        break;
      case 293: /* signed ::= NK_PLUS NK_INTEGER */
{ yymsp[-1].minor.yy248 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); }
        break;
      case 294: /* signed ::= NK_MINUS NK_INTEGER */
X
Xiaoyu Wang 已提交
4260 4261 4262
{ 
                                                                                    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 已提交
4263
                                                                                    yylhsminor.yy248 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t);
X
Xiaoyu Wang 已提交
4264
                                                                                  }
X
Xiaoyu Wang 已提交
4265
  yymsp[-1].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
4266
        break;
X
Xiaoyu Wang 已提交
4267 4268 4269
      case 295: /* signed ::= NK_FLOAT */
{ yylhsminor.yy248 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
  yymsp[0].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
4270
        break;
X
Xiaoyu Wang 已提交
4271 4272
      case 296: /* signed ::= NK_PLUS NK_FLOAT */
{ yymsp[-1].minor.yy248 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
X
Xiaoyu Wang 已提交
4273
        break;
X
Xiaoyu Wang 已提交
4274
      case 297: /* signed ::= NK_MINUS NK_FLOAT */
X
Xiaoyu Wang 已提交
4275 4276 4277
{ 
                                                                                    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 已提交
4278
                                                                                    yylhsminor.yy248 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t);
X
Xiaoyu Wang 已提交
4279
                                                                                  }
X
Xiaoyu Wang 已提交
4280
  yymsp[-1].minor.yy248 = yylhsminor.yy248;
4281
        break;
X
Xiaoyu Wang 已提交
4282 4283 4284
      case 299: /* signed_literal ::= NK_STRING */
{ yylhsminor.yy248 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
  yymsp[0].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
4285
        break;
X
Xiaoyu Wang 已提交
4286 4287 4288
      case 300: /* signed_literal ::= NK_BOOL */
{ yylhsminor.yy248 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); }
  yymsp[0].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
4289
        break;
X
Xiaoyu Wang 已提交
4290 4291
      case 301: /* signed_literal ::= TIMESTAMP NK_STRING */
{ yymsp[-1].minor.yy248 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); }
X
Xiaoyu Wang 已提交
4292
        break;
X
Xiaoyu Wang 已提交
4293 4294 4295 4296 4297 4298 4299
      case 302: /* signed_literal ::= duration_literal */
      case 304: /* signed_literal ::= literal_func */ yytestcase(yyruleno==304);
      case 369: /* star_func_para ::= expression */ yytestcase(yyruleno==369);
      case 424: /* select_item ::= common_expression */ yytestcase(yyruleno==424);
      case 474: /* search_condition ::= common_expression */ yytestcase(yyruleno==474);
{ yylhsminor.yy248 = releaseRawExprNode(pCxt, yymsp[0].minor.yy248); }
  yymsp[0].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
4300
        break;
X
Xiaoyu Wang 已提交
4301 4302 4303
      case 303: /* signed_literal ::= NULL */
{ yylhsminor.yy248 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); }
  yymsp[0].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
4304
        break;
X
Xiaoyu Wang 已提交
4305 4306 4307 4308
      case 323: /* expression ::= NK_LP expression NK_RP */
      case 396: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==396);
{ yylhsminor.yy248 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy248)); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
4309
        break;
X
Xiaoyu Wang 已提交
4310
      case 324: /* expression ::= NK_PLUS expression */
4311
{
X
Xiaoyu Wang 已提交
4312 4313
                                                                                    SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy248);
                                                                                    yylhsminor.yy248 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy248));
4314
                                                                                  }
X
Xiaoyu Wang 已提交
4315
  yymsp[-1].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
4316
        break;
X
Xiaoyu Wang 已提交
4317
      case 325: /* expression ::= NK_MINUS expression */
4318
{
X
Xiaoyu Wang 已提交
4319 4320
                                                                                    SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy248);
                                                                                    yylhsminor.yy248 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy248), NULL));
4321
                                                                                  }
X
Xiaoyu Wang 已提交
4322
  yymsp[-1].minor.yy248 = yylhsminor.yy248;
4323
        break;
X
Xiaoyu Wang 已提交
4324
      case 326: /* expression ::= expression NK_PLUS expression */
4325
{
X
Xiaoyu Wang 已提交
4326 4327 4328
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy248);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy248);
                                                                                    yylhsminor.yy248 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy248), releaseRawExprNode(pCxt, yymsp[0].minor.yy248))); 
4329
                                                                                  }
X
Xiaoyu Wang 已提交
4330
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
4331
        break;
X
Xiaoyu Wang 已提交
4332
      case 327: /* expression ::= expression NK_MINUS expression */
4333
{
X
Xiaoyu Wang 已提交
4334 4335 4336
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy248);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy248);
                                                                                    yylhsminor.yy248 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy248), releaseRawExprNode(pCxt, yymsp[0].minor.yy248))); 
4337
                                                                                  }
X
Xiaoyu Wang 已提交
4338
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
4339
        break;
X
Xiaoyu Wang 已提交
4340
      case 328: /* expression ::= expression NK_STAR expression */
4341
{
X
Xiaoyu Wang 已提交
4342 4343 4344
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy248);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy248);
                                                                                    yylhsminor.yy248 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy248), releaseRawExprNode(pCxt, yymsp[0].minor.yy248))); 
4345
                                                                                  }
X
Xiaoyu Wang 已提交
4346
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
4347
        break;
X
Xiaoyu Wang 已提交
4348
      case 329: /* expression ::= expression NK_SLASH expression */
4349
{
X
Xiaoyu Wang 已提交
4350 4351 4352
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy248);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy248);
                                                                                    yylhsminor.yy248 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy248), releaseRawExprNode(pCxt, yymsp[0].minor.yy248))); 
4353
                                                                                  }
X
Xiaoyu Wang 已提交
4354
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
4355
        break;
X
Xiaoyu Wang 已提交
4356
      case 330: /* expression ::= expression NK_REM expression */
4357
{
X
Xiaoyu Wang 已提交
4358 4359 4360
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy248);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy248);
                                                                                    yylhsminor.yy248 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy248), releaseRawExprNode(pCxt, yymsp[0].minor.yy248)));
4361
                                                                                  }
X
Xiaoyu Wang 已提交
4362
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
4363
        break;
X
Xiaoyu Wang 已提交
4364
      case 331: /* expression ::= column_reference NK_ARROW NK_STRING */
4365
{
X
Xiaoyu Wang 已提交
4366 4367
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy248);
                                                                                    yylhsminor.yy248 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy248), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); 
X
Xiaoyu Wang 已提交
4368
                                                                                  }
X
Xiaoyu Wang 已提交
4369
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
4370
        break;
X
Xiaoyu Wang 已提交
4371
      case 332: /* expression ::= expression NK_BITAND expression */
X
Xiaoyu Wang 已提交
4372
{
X
Xiaoyu Wang 已提交
4373 4374 4375
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy248);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy248);
                                                                                    yylhsminor.yy248 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy248), releaseRawExprNode(pCxt, yymsp[0].minor.yy248)));
X
Xiaoyu Wang 已提交
4376
                                                                                  }
X
Xiaoyu Wang 已提交
4377
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
4378
        break;
X
Xiaoyu Wang 已提交
4379
      case 333: /* expression ::= expression NK_BITOR expression */
X
Xiaoyu Wang 已提交
4380
{
X
Xiaoyu Wang 已提交
4381 4382 4383
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy248);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy248);
                                                                                    yylhsminor.yy248 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy248), releaseRawExprNode(pCxt, yymsp[0].minor.yy248)));
X
Xiaoyu Wang 已提交
4384
                                                                                  }
X
Xiaoyu Wang 已提交
4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
        break;
      case 336: /* column_reference ::= column_name */
{ yylhsminor.yy248 = createRawExprNode(pCxt, &yymsp[0].minor.yy401, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy401)); }
  yymsp[0].minor.yy248 = yylhsminor.yy248;
        break;
      case 337: /* column_reference ::= table_name NK_DOT column_name */
{ yylhsminor.yy248 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy401, &yymsp[0].minor.yy401, createColumnNode(pCxt, &yymsp[-2].minor.yy401, &yymsp[0].minor.yy401)); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
        break;
      case 338: /* pseudo_column ::= ROWTS */
      case 339: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==339);
      case 341: /* pseudo_column ::= QSTARTTS */ yytestcase(yyruleno==341);
      case 342: /* pseudo_column ::= QENDTS */ yytestcase(yyruleno==342);
      case 343: /* pseudo_column ::= WSTARTTS */ yytestcase(yyruleno==343);
      case 344: /* pseudo_column ::= WENDTS */ yytestcase(yyruleno==344);
      case 345: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==345);
      case 351: /* literal_func ::= NOW */ yytestcase(yyruleno==351);
{ yylhsminor.yy248 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); }
  yymsp[0].minor.yy248 = yylhsminor.yy248;
        break;
      case 340: /* pseudo_column ::= table_name NK_DOT TBNAME */
{ yylhsminor.yy248 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy401, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy401)))); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
        break;
      case 346: /* function_expression ::= function_name NK_LP expression_list NK_RP */
      case 347: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==347);
{ yylhsminor.yy248 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy401, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy401, yymsp[-1].minor.yy552)); }
  yymsp[-3].minor.yy248 = yylhsminor.yy248;
        break;
      case 348: /* function_expression ::= CAST NK_LP expression AS type_name NK_RP */
{ yylhsminor.yy248 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy248), yymsp[-1].minor.yy224)); }
  yymsp[-5].minor.yy248 = yylhsminor.yy248;
        break;
      case 350: /* literal_func ::= noarg_func NK_LP NK_RP */
{ yylhsminor.yy248 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy401, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy401, NULL)); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
        break;
      case 365: /* star_func_para_list ::= NK_STAR */
{ yylhsminor.yy552 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy552 = yylhsminor.yy552;
        break;
      case 370: /* star_func_para ::= table_name NK_DOT NK_STAR */
      case 427: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==427);
{ yylhsminor.yy248 = createColumnNode(pCxt, &yymsp[-2].minor.yy401, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
        break;
      case 371: /* predicate ::= expression compare_op expression */
      case 376: /* predicate ::= expression in_op in_predicate_value */ yytestcase(yyruleno==376);
4434
{
X
Xiaoyu Wang 已提交
4435 4436 4437
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy248);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy248);
                                                                                    yylhsminor.yy248 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy716, releaseRawExprNode(pCxt, yymsp[-2].minor.yy248), releaseRawExprNode(pCxt, yymsp[0].minor.yy248)));
4438
                                                                                  }
X
Xiaoyu Wang 已提交
4439
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
4440
        break;
X
Xiaoyu Wang 已提交
4441
      case 372: /* predicate ::= expression BETWEEN expression AND expression */
4442
{
X
Xiaoyu Wang 已提交
4443 4444 4445
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy248);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy248);
                                                                                    yylhsminor.yy248 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy248), releaseRawExprNode(pCxt, yymsp[-2].minor.yy248), releaseRawExprNode(pCxt, yymsp[0].minor.yy248)));
4446
                                                                                  }
X
Xiaoyu Wang 已提交
4447
  yymsp[-4].minor.yy248 = yylhsminor.yy248;
4448
        break;
X
Xiaoyu Wang 已提交
4449
      case 373: /* predicate ::= expression NOT BETWEEN expression AND expression */
4450
{
X
Xiaoyu Wang 已提交
4451 4452 4453
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy248);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy248);
                                                                                    yylhsminor.yy248 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy248), releaseRawExprNode(pCxt, yymsp[-2].minor.yy248), releaseRawExprNode(pCxt, yymsp[0].minor.yy248)));
4454
                                                                                  }
X
Xiaoyu Wang 已提交
4455
  yymsp[-5].minor.yy248 = yylhsminor.yy248;
4456
        break;
X
Xiaoyu Wang 已提交
4457
      case 374: /* predicate ::= expression IS NULL */
4458
{
X
Xiaoyu Wang 已提交
4459 4460
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy248);
                                                                                    yylhsminor.yy248 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy248), NULL));
4461
                                                                                  }
X
Xiaoyu Wang 已提交
4462
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
4463
        break;
X
Xiaoyu Wang 已提交
4464
      case 375: /* predicate ::= expression IS NOT NULL */
4465
{
X
Xiaoyu Wang 已提交
4466 4467
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy248);
                                                                                    yylhsminor.yy248 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy248), NULL));
4468
                                                                                  }
X
Xiaoyu Wang 已提交
4469
  yymsp[-3].minor.yy248 = yylhsminor.yy248;
4470
        break;
X
Xiaoyu Wang 已提交
4471 4472
      case 377: /* compare_op ::= NK_LT */
{ yymsp[0].minor.yy716 = OP_TYPE_LOWER_THAN; }
4473
        break;
X
Xiaoyu Wang 已提交
4474 4475
      case 378: /* compare_op ::= NK_GT */
{ yymsp[0].minor.yy716 = OP_TYPE_GREATER_THAN; }
4476
        break;
X
Xiaoyu Wang 已提交
4477 4478
      case 379: /* compare_op ::= NK_LE */
{ yymsp[0].minor.yy716 = OP_TYPE_LOWER_EQUAL; }
4479
        break;
X
Xiaoyu Wang 已提交
4480 4481
      case 380: /* compare_op ::= NK_GE */
{ yymsp[0].minor.yy716 = OP_TYPE_GREATER_EQUAL; }
4482
        break;
X
Xiaoyu Wang 已提交
4483 4484
      case 381: /* compare_op ::= NK_NE */
{ yymsp[0].minor.yy716 = OP_TYPE_NOT_EQUAL; }
4485
        break;
X
Xiaoyu Wang 已提交
4486 4487
      case 382: /* compare_op ::= NK_EQ */
{ yymsp[0].minor.yy716 = OP_TYPE_EQUAL; }
4488
        break;
X
Xiaoyu Wang 已提交
4489 4490
      case 383: /* compare_op ::= LIKE */
{ yymsp[0].minor.yy716 = OP_TYPE_LIKE; }
4491
        break;
X
Xiaoyu Wang 已提交
4492 4493
      case 384: /* compare_op ::= NOT LIKE */
{ yymsp[-1].minor.yy716 = OP_TYPE_NOT_LIKE; }
4494
        break;
X
Xiaoyu Wang 已提交
4495 4496
      case 385: /* compare_op ::= MATCH */
{ yymsp[0].minor.yy716 = OP_TYPE_MATCH; }
4497
        break;
X
Xiaoyu Wang 已提交
4498 4499
      case 386: /* compare_op ::= NMATCH */
{ yymsp[0].minor.yy716 = OP_TYPE_NMATCH; }
4500
        break;
X
Xiaoyu Wang 已提交
4501 4502
      case 387: /* compare_op ::= CONTAINS */
{ yymsp[0].minor.yy716 = OP_TYPE_JSON_CONTAINS; }
4503
        break;
X
Xiaoyu Wang 已提交
4504 4505
      case 388: /* in_op ::= IN */
{ yymsp[0].minor.yy716 = OP_TYPE_IN; }
4506
        break;
X
Xiaoyu Wang 已提交
4507 4508
      case 389: /* in_op ::= NOT IN */
{ yymsp[-1].minor.yy716 = OP_TYPE_NOT_IN; }
4509
        break;
X
Xiaoyu Wang 已提交
4510 4511 4512
      case 390: /* in_predicate_value ::= NK_LP expression_list NK_RP */
{ yylhsminor.yy248 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy552)); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
4513
        break;
X
Xiaoyu Wang 已提交
4514
      case 392: /* boolean_value_expression ::= NOT boolean_primary */
4515
{
X
Xiaoyu Wang 已提交
4516 4517
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy248);
                                                                                    yylhsminor.yy248 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy248), NULL));
4518
                                                                                  }
X
Xiaoyu Wang 已提交
4519
  yymsp[-1].minor.yy248 = yylhsminor.yy248;
4520
        break;
X
Xiaoyu Wang 已提交
4521
      case 393: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
4522
{
X
Xiaoyu Wang 已提交
4523 4524 4525
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy248);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy248);
                                                                                    yylhsminor.yy248 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy248), releaseRawExprNode(pCxt, yymsp[0].minor.yy248)));
4526
                                                                                  }
X
Xiaoyu Wang 已提交
4527
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
4528
        break;
X
Xiaoyu Wang 已提交
4529
      case 394: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
4530
{
X
Xiaoyu Wang 已提交
4531 4532 4533
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy248);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy248);
                                                                                    yylhsminor.yy248 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy248), releaseRawExprNode(pCxt, yymsp[0].minor.yy248)));
4534
                                                                                  }
X
Xiaoyu Wang 已提交
4535
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
4536
        break;
X
Xiaoyu Wang 已提交
4537 4538 4539
      case 402: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */
{ yylhsminor.yy248 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy248, yymsp[0].minor.yy248, NULL); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
4540
        break;
X
Xiaoyu Wang 已提交
4541 4542 4543
      case 405: /* table_primary ::= table_name alias_opt */
{ yylhsminor.yy248 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy401, &yymsp[0].minor.yy401); }
  yymsp[-1].minor.yy248 = yylhsminor.yy248;
4544
        break;
X
Xiaoyu Wang 已提交
4545 4546 4547
      case 406: /* table_primary ::= db_name NK_DOT table_name alias_opt */
{ yylhsminor.yy248 = createRealTableNode(pCxt, &yymsp[-3].minor.yy401, &yymsp[-1].minor.yy401, &yymsp[0].minor.yy401); }
  yymsp[-3].minor.yy248 = yylhsminor.yy248;
4548
        break;
X
Xiaoyu Wang 已提交
4549 4550 4551
      case 407: /* table_primary ::= subquery alias_opt */
{ yylhsminor.yy248 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy248), &yymsp[0].minor.yy401); }
  yymsp[-1].minor.yy248 = yylhsminor.yy248;
4552
        break;
X
Xiaoyu Wang 已提交
4553 4554
      case 409: /* alias_opt ::= */
{ yymsp[1].minor.yy401 = nil_token;  }
4555
        break;
X
Xiaoyu Wang 已提交
4556 4557 4558
      case 410: /* alias_opt ::= table_alias */
{ yylhsminor.yy401 = yymsp[0].minor.yy401; }
  yymsp[0].minor.yy401 = yylhsminor.yy401;
4559
        break;
X
Xiaoyu Wang 已提交
4560 4561
      case 411: /* alias_opt ::= AS table_alias */
{ yymsp[-1].minor.yy401 = yymsp[0].minor.yy401; }
4562
        break;
X
Xiaoyu Wang 已提交
4563 4564 4565
      case 412: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */
      case 413: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==413);
{ yymsp[-2].minor.yy248 = yymsp[-1].minor.yy248; }
4566
        break;
X
Xiaoyu Wang 已提交
4567 4568 4569
      case 414: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
{ yylhsminor.yy248 = createJoinTableNode(pCxt, yymsp[-4].minor.yy52, yymsp[-5].minor.yy248, yymsp[-2].minor.yy248, yymsp[0].minor.yy248); }
  yymsp[-5].minor.yy248 = yylhsminor.yy248;
4570
        break;
X
Xiaoyu Wang 已提交
4571 4572
      case 415: /* join_type ::= */
{ yymsp[1].minor.yy52 = JOIN_TYPE_INNER; }
4573
        break;
X
Xiaoyu Wang 已提交
4574 4575
      case 416: /* join_type ::= INNER */
{ yymsp[0].minor.yy52 = JOIN_TYPE_INNER; }
4576
        break;
X
Xiaoyu Wang 已提交
4577
      case 417: /* 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 */
4578
{ 
X
Xiaoyu Wang 已提交
4579 4580 4581 4582 4583 4584 4585 4586 4587
                                                                                    yymsp[-11].minor.yy248 = createSelectStmt(pCxt, yymsp[-10].minor.yy89, yymsp[-9].minor.yy552, yymsp[-8].minor.yy248);
                                                                                    yymsp[-11].minor.yy248 = addWhereClause(pCxt, yymsp[-11].minor.yy248, yymsp[-7].minor.yy248);
                                                                                    yymsp[-11].minor.yy248 = addPartitionByClause(pCxt, yymsp[-11].minor.yy248, yymsp[-6].minor.yy552);
                                                                                    yymsp[-11].minor.yy248 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy248, yymsp[-2].minor.yy248);
                                                                                    yymsp[-11].minor.yy248 = addGroupByClause(pCxt, yymsp[-11].minor.yy248, yymsp[-1].minor.yy552);
                                                                                    yymsp[-11].minor.yy248 = addHavingClause(pCxt, yymsp[-11].minor.yy248, yymsp[0].minor.yy248);
                                                                                    yymsp[-11].minor.yy248 = addRangeClause(pCxt, yymsp[-11].minor.yy248, yymsp[-5].minor.yy248);
                                                                                    yymsp[-11].minor.yy248 = addEveryClause(pCxt, yymsp[-11].minor.yy248, yymsp[-4].minor.yy248);
                                                                                    yymsp[-11].minor.yy248 = addFillClause(pCxt, yymsp[-11].minor.yy248, yymsp[-3].minor.yy248);
4588 4589
                                                                                  }
        break;
X
Xiaoyu Wang 已提交
4590 4591
      case 420: /* set_quantifier_opt ::= ALL */
{ yymsp[0].minor.yy89 = false; }
4592
        break;
X
Xiaoyu Wang 已提交
4593 4594 4595
      case 423: /* select_item ::= NK_STAR */
{ yylhsminor.yy248 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); }
  yymsp[0].minor.yy248 = yylhsminor.yy248;
4596
        break;
X
Xiaoyu Wang 已提交
4597 4598 4599
      case 425: /* select_item ::= common_expression column_alias */
{ yylhsminor.yy248 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy248), &yymsp[0].minor.yy401); }
  yymsp[-1].minor.yy248 = yylhsminor.yy248;
4600
        break;
X
Xiaoyu Wang 已提交
4601 4602 4603
      case 426: /* select_item ::= common_expression AS column_alias */
{ yylhsminor.yy248 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy248), &yymsp[0].minor.yy401); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
4604
        break;
X
Xiaoyu Wang 已提交
4605 4606 4607 4608
      case 431: /* partition_by_clause_opt ::= PARTITION BY expression_list */
      case 448: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==448);
      case 464: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==464);
{ yymsp[-2].minor.yy552 = yymsp[0].minor.yy552; }
4609
        break;
X
Xiaoyu Wang 已提交
4610 4611
      case 433: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
{ yymsp[-5].minor.yy248 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy248), releaseRawExprNode(pCxt, yymsp[-1].minor.yy248)); }
4612
        break;
X
Xiaoyu Wang 已提交
4613 4614
      case 434: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */
{ yymsp[-3].minor.yy248 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy248)); }
4615
        break;
X
Xiaoyu Wang 已提交
4616 4617
      case 435: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
{ yymsp[-5].minor.yy248 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy248), NULL, yymsp[-1].minor.yy248, yymsp[0].minor.yy248); }
4618
        break;
X
Xiaoyu Wang 已提交
4619 4620
      case 436: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
{ yymsp[-7].minor.yy248 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy248), releaseRawExprNode(pCxt, yymsp[-3].minor.yy248), yymsp[-1].minor.yy248, yymsp[0].minor.yy248); }
4621
        break;
X
Xiaoyu Wang 已提交
4622 4623 4624
      case 438: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
      case 456: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==456);
{ yymsp[-3].minor.yy248 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy248); }
4625
        break;
X
Xiaoyu Wang 已提交
4626 4627
      case 440: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */
{ yymsp[-3].minor.yy248 = createFillNode(pCxt, yymsp[-1].minor.yy582, NULL); }
4628
        break;
X
Xiaoyu Wang 已提交
4629 4630
      case 441: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
{ yymsp[-5].minor.yy248 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy552)); }
4631
        break;
X
Xiaoyu Wang 已提交
4632 4633
      case 442: /* fill_mode ::= NONE */
{ yymsp[0].minor.yy582 = FILL_MODE_NONE; }
4634
        break;
X
Xiaoyu Wang 已提交
4635 4636
      case 443: /* fill_mode ::= PREV */
{ yymsp[0].minor.yy582 = FILL_MODE_PREV; }
4637
        break;
X
Xiaoyu Wang 已提交
4638 4639
      case 444: /* fill_mode ::= NULL */
{ yymsp[0].minor.yy582 = FILL_MODE_NULL; }
4640
        break;
X
Xiaoyu Wang 已提交
4641 4642
      case 445: /* fill_mode ::= LINEAR */
{ yymsp[0].minor.yy582 = FILL_MODE_LINEAR; }
4643
        break;
X
Xiaoyu Wang 已提交
4644 4645
      case 446: /* fill_mode ::= NEXT */
{ yymsp[0].minor.yy582 = FILL_MODE_NEXT; }
4646
        break;
X
Xiaoyu Wang 已提交
4647 4648 4649
      case 449: /* group_by_list ::= expression */
{ yylhsminor.yy552 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy248))); }
  yymsp[0].minor.yy552 = yylhsminor.yy552;
4650
        break;
X
Xiaoyu Wang 已提交
4651 4652 4653
      case 450: /* group_by_list ::= group_by_list NK_COMMA expression */
{ yylhsminor.yy552 = addNodeToList(pCxt, yymsp[-2].minor.yy552, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy248))); }
  yymsp[-2].minor.yy552 = yylhsminor.yy552;
X
Xiaoyu Wang 已提交
4654
        break;
X
Xiaoyu Wang 已提交
4655 4656
      case 454: /* range_opt ::= RANGE NK_LP expression NK_COMMA expression NK_RP */
{ yymsp[-5].minor.yy248 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy248), releaseRawExprNode(pCxt, yymsp[-1].minor.yy248)); }
4657
        break;
X
Xiaoyu Wang 已提交
4658
      case 457: /* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */
4659
{ 
X
Xiaoyu Wang 已提交
4660 4661 4662
                                                                                    yylhsminor.yy248 = addOrderByClause(pCxt, yymsp[-3].minor.yy248, yymsp[-2].minor.yy552);
                                                                                    yylhsminor.yy248 = addSlimitClause(pCxt, yylhsminor.yy248, yymsp[-1].minor.yy248);
                                                                                    yylhsminor.yy248 = addLimitClause(pCxt, yylhsminor.yy248, yymsp[0].minor.yy248);
4663
                                                                                  }
X
Xiaoyu Wang 已提交
4664
  yymsp[-3].minor.yy248 = yylhsminor.yy248;
4665
        break;
X
Xiaoyu Wang 已提交
4666 4667 4668
      case 459: /* query_expression_body ::= query_expression_body UNION ALL query_expression_body */
{ yylhsminor.yy248 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy248, yymsp[0].minor.yy248); }
  yymsp[-3].minor.yy248 = yylhsminor.yy248;
4669
        break;
X
Xiaoyu Wang 已提交
4670 4671 4672
      case 460: /* query_expression_body ::= query_expression_body UNION query_expression_body */
{ yylhsminor.yy248 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy248, yymsp[0].minor.yy248); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
X
Xiaoyu Wang 已提交
4673
        break;
X
Xiaoyu Wang 已提交
4674 4675 4676 4677 4678
      case 462: /* query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */
{ yymsp[-5].minor.yy248 = yymsp[-4].minor.yy248; }
  yy_destructor(yypParser,368,&yymsp[-3].minor);
  yy_destructor(yypParser,369,&yymsp[-2].minor);
  yy_destructor(yypParser,370,&yymsp[-1].minor);
X
Xiaoyu Wang 已提交
4679
        break;
X
Xiaoyu Wang 已提交
4680 4681 4682
      case 466: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */
      case 470: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==470);
{ yymsp[-1].minor.yy248 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); }
4683
        break;
X
Xiaoyu Wang 已提交
4684 4685 4686
      case 467: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
      case 471: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==471);
{ yymsp[-3].minor.yy248 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); }
4687
        break;
X
Xiaoyu Wang 已提交
4688 4689 4690
      case 468: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
      case 472: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==472);
{ yymsp[-3].minor.yy248 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); }
4691
        break;
X
Xiaoyu Wang 已提交
4692 4693 4694
      case 473: /* subquery ::= NK_LP query_expression NK_RP */
{ yylhsminor.yy248 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy248); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
4695
        break;
X
Xiaoyu Wang 已提交
4696 4697 4698
      case 477: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */
{ yylhsminor.yy248 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy248), yymsp[-1].minor.yy482, yymsp[0].minor.yy345); }
  yymsp[-2].minor.yy248 = yylhsminor.yy248;
4699
        break;
X
Xiaoyu Wang 已提交
4700 4701
      case 478: /* ordering_specification_opt ::= */
{ yymsp[1].minor.yy482 = ORDER_ASC; }
4702
        break;
X
Xiaoyu Wang 已提交
4703 4704
      case 479: /* ordering_specification_opt ::= ASC */
{ yymsp[0].minor.yy482 = ORDER_ASC; }
4705
        break;
X
Xiaoyu Wang 已提交
4706 4707
      case 480: /* ordering_specification_opt ::= DESC */
{ yymsp[0].minor.yy482 = ORDER_DESC; }
4708
        break;
X
Xiaoyu Wang 已提交
4709 4710
      case 481: /* null_ordering_opt ::= */
{ yymsp[1].minor.yy345 = NULL_ORDER_DEFAULT; }
4711
        break;
X
Xiaoyu Wang 已提交
4712 4713
      case 482: /* null_ordering_opt ::= NULLS FIRST */
{ yymsp[-1].minor.yy345 = NULL_ORDER_FIRST; }
4714
        break;
X
Xiaoyu Wang 已提交
4715 4716
      case 483: /* null_ordering_opt ::= NULLS LAST */
{ yymsp[-1].minor.yy345 = NULL_ORDER_LAST; }
4717 4718 4719 4720 4721
        break;
      default:
        break;
/********** End reduce actions ************************************************/
  };
X
Xiaoyu Wang 已提交
4722 4723 4724
  assert( yyruleno<sizeof(yyRuleInfo)/sizeof(yyRuleInfo[0]) );
  yygoto = yyRuleInfo[yyruleno].lhs;
  yysize = yyRuleInfo[yyruleno].nrhs;
4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748
  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 已提交
4749 4750
  ParseARG_FETCH
  ParseCTX_FETCH
4751 4752 4753 4754 4755 4756 4757 4758 4759 4760
#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 已提交
4761 4762
  ParseARG_STORE /* Suppress warning about unused %extra_argument variable */
  ParseCTX_STORE
4763 4764 4765 4766 4767 4768 4769 4770 4771
}
#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 已提交
4772
  ParseTOKENTYPE yyminor         /* The minor type of the error token */
4773
){
X
Xiaoyu Wang 已提交
4774 4775
  ParseARG_FETCH
  ParseCTX_FETCH
4776 4777
#define TOKEN yyminor
/************ Begin %syntax_error code ****************************************/
4778

4779
  if (TSDB_CODE_SUCCESS == pCxt->errCode) {
4780
    if(TOKEN.z) {
4781
      pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR, TOKEN.z);
4782
    } else {
4783
      pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INCOMPLETE_SQL);
4784
    }
4785 4786
  }
/************ End %syntax_error code ******************************************/
X
Xiaoyu Wang 已提交
4787 4788
  ParseARG_STORE /* Suppress warning about unused %extra_argument variable */
  ParseCTX_STORE
4789 4790 4791 4792 4793 4794 4795 4796
}

/*
** The following is executed when the parser accepts
*/
static void yy_accept(
  yyParser *yypParser           /* The parser */
){
X
Xiaoyu Wang 已提交
4797 4798
  ParseARG_FETCH
  ParseCTX_FETCH
4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811
#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 已提交
4812 4813
  ParseARG_STORE /* Suppress warning about unused %extra_argument variable */
  ParseCTX_STORE
4814 4815 4816 4817
}

/* The main parser program.
** The first argument is a pointer to a structure obtained from
X
Xiaoyu Wang 已提交
4818
** "ParseAlloc" which describes the current state of the parser.
4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834
** 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 已提交
4835
void Parse(
4836 4837
  void *yyp,                   /* The parser */
  int yymajor,                 /* The major token code number */
X
Xiaoyu Wang 已提交
4838 4839
  ParseTOKENTYPE yyminor       /* The value for the token */
  ParseARG_PDECL               /* Optional %extra_argument parameter */
4840 4841 4842 4843 4844 4845 4846 4847 4848 4849
){
  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 已提交
4850 4851
  ParseCTX_FETCH
  ParseARG_STORE
4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870

  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 已提交
4871
  do{
4872 4873 4874
    assert( yyact==yypParser->yytos->stateno );
    yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact);
    if( yyact >= YY_MIN_REDUCE ){
X
Xiaoyu Wang 已提交
4875 4876
      yyact = yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor,
                        yyminor ParseCTX_PARAM);
4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931
    }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 已提交
4932 4933 4934 4935 4936
        while( yypParser->yytos >= yypParser->yystack
            && (yyact = yy_find_reduce_action(
                        yypParser->yytos->stateno,
                        YYERRORSYMBOL)) > YY_MAX_SHIFTREDUCE
        ){
4937 4938
          yy_pop_parser_stack(yypParser);
        }
X
Xiaoyu Wang 已提交
4939
        if( yypParser->yytos < yypParser->yystack || yymajor==0 ){
4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988
          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 已提交
4989
  }while( yypParser->yytos>yypParser->yystack );
4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008
#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 已提交
5009
int ParseFallback(int iToken){
5010
#ifdef YYFALLBACK
X
Xiaoyu Wang 已提交
5011 5012 5013
  if( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) ){
    return yyFallback[iToken];
  }
5014 5015
#else
  (void)iToken;
D
dapan1121 已提交
5016
#endif
X
Xiaoyu Wang 已提交
5017
  return 0;
5018
}