sql.c 256.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
/*
** 2000-05-29
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** Driver template for the LEMON parser generator.
**
** The "lemon" program processes an LALR(1) input grammar file, then uses
** this template to construct a parser.  The "lemon" program inserts text
** at each "%%" line.  Also, any "P-a-r-s-e" identifer prefix (without the
** interstitial "-" characters) contained in this template is changed into
** the value of the %name directive from the grammar.  Otherwise, the content
** of this template is copied straight through into the generate parser
** source file.
**
** The following is the concatenation of all %include directives from the
** input grammar file:
*/
X
Xiaoyu Wang 已提交
25 26
#include <stdio.h>
#include <assert.h>
27
/************ Begin %include sections from the grammar ************************/
X
Xiaoyu Wang 已提交
28

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

D
dapan1121 已提交
35 36
#define ALLOW_FORBID_FUNC

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

#define YYSTACKDEPTH 0
44
/**************** End of %include directives **********************************/
X
Xiaoyu Wang 已提交
45 46 47 48 49
/* These constants specify the various numeric values for terminal symbols
** in a format understandable to "makeheaders".  This section is blank unless
** "lemon" is run with the "-m" command-line option.
***************** Begin makeheaders token definitions *************************/
/**************** End makeheaders token definitions ***************************/
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66

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

#ifndef NDEBUG
/* For tracing reduce actions, the names of all rules are required.
*/
static const char *const yyRuleName[] = {
1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666
 /*   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 已提交
1667
 /*  24 */ "cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt",
1668
 /*  25 */ "cmd ::= ALTER USER user_name PASS NK_STRING",
X
Xiaoyu Wang 已提交
1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708
 /*  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 已提交
1709
 /*  66 */ "cmd ::= FLUSH DATABASE db_name",
X
Xiaoyu Wang 已提交
1710 1711 1712 1713 1714 1715 1716
 /*  67 */ "cmd ::= TRIM DATABASE db_name",
 /*  68 */ "not_exists_opt ::= IF NOT EXISTS",
 /*  69 */ "not_exists_opt ::=",
 /*  70 */ "exists_opt ::= IF EXISTS",
 /*  71 */ "exists_opt ::=",
 /*  72 */ "db_options ::=",
 /*  73 */ "db_options ::= db_options BUFFER NK_INTEGER",
1717 1718
 /*  74 */ "db_options ::= db_options CACHEMODEL NK_STRING",
 /*  75 */ "db_options ::= db_options CACHESIZE NK_INTEGER",
X
Xiaoyu Wang 已提交
1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730
 /*  76 */ "db_options ::= db_options COMP NK_INTEGER",
 /*  77 */ "db_options ::= db_options DURATION NK_INTEGER",
 /*  78 */ "db_options ::= db_options DURATION NK_VARIABLE",
 /*  79 */ "db_options ::= db_options FSYNC NK_INTEGER",
 /*  80 */ "db_options ::= db_options MAXROWS NK_INTEGER",
 /*  81 */ "db_options ::= db_options MINROWS NK_INTEGER",
 /*  82 */ "db_options ::= db_options KEEP integer_list",
 /*  83 */ "db_options ::= db_options KEEP variable_list",
 /*  84 */ "db_options ::= db_options PAGES NK_INTEGER",
 /*  85 */ "db_options ::= db_options PAGESIZE NK_INTEGER",
 /*  86 */ "db_options ::= db_options PRECISION NK_STRING",
 /*  87 */ "db_options ::= db_options REPLICA NK_INTEGER",
1731
 /*  88 */ "db_options ::= db_options STRICT NK_STRING",
X
Xiaoyu Wang 已提交
1732 1733 1734 1735 1736 1737 1738
 /*  89 */ "db_options ::= db_options WAL NK_INTEGER",
 /*  90 */ "db_options ::= db_options VGROUPS NK_INTEGER",
 /*  91 */ "db_options ::= db_options SINGLE_STABLE NK_INTEGER",
 /*  92 */ "db_options ::= db_options RETENTIONS retention_list",
 /*  93 */ "db_options ::= db_options SCHEMALESS NK_INTEGER",
 /*  94 */ "alter_db_options ::= alter_db_option",
 /*  95 */ "alter_db_options ::= alter_db_options alter_db_option",
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 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
 /*  96 */ "alter_db_option ::= CACHEMODEL NK_STRING",
 /*  97 */ "alter_db_option ::= CACHESIZE NK_INTEGER",
 /*  98 */ "alter_db_option ::= FSYNC NK_INTEGER",
 /*  99 */ "alter_db_option ::= KEEP integer_list",
 /* 100 */ "alter_db_option ::= KEEP variable_list",
 /* 101 */ "alter_db_option ::= WAL NK_INTEGER",
 /* 102 */ "integer_list ::= NK_INTEGER",
 /* 103 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER",
 /* 104 */ "variable_list ::= NK_VARIABLE",
 /* 105 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE",
 /* 106 */ "retention_list ::= retention",
 /* 107 */ "retention_list ::= retention_list NK_COMMA retention",
 /* 108 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE",
 /* 109 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options",
 /* 110 */ "cmd ::= CREATE TABLE multi_create_clause",
 /* 111 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options",
 /* 112 */ "cmd ::= DROP TABLE multi_drop_clause",
 /* 113 */ "cmd ::= DROP STABLE exists_opt full_table_name",
 /* 114 */ "cmd ::= ALTER TABLE alter_table_clause",
 /* 115 */ "cmd ::= ALTER STABLE alter_table_clause",
 /* 116 */ "alter_table_clause ::= full_table_name alter_table_options",
 /* 117 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name",
 /* 118 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name",
 /* 119 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name",
 /* 120 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name",
 /* 121 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name",
 /* 122 */ "alter_table_clause ::= full_table_name DROP TAG column_name",
 /* 123 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name",
 /* 124 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name",
 /* 125 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal",
 /* 126 */ "multi_create_clause ::= create_subtable_clause",
 /* 127 */ "multi_create_clause ::= multi_create_clause create_subtable_clause",
 /* 128 */ "create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options",
 /* 129 */ "multi_drop_clause ::= drop_table_clause",
 /* 130 */ "multi_drop_clause ::= multi_drop_clause drop_table_clause",
 /* 131 */ "drop_table_clause ::= exists_opt full_table_name",
 /* 132 */ "specific_cols_opt ::=",
 /* 133 */ "specific_cols_opt ::= NK_LP col_name_list NK_RP",
 /* 134 */ "full_table_name ::= table_name",
 /* 135 */ "full_table_name ::= db_name NK_DOT table_name",
 /* 136 */ "column_def_list ::= column_def",
 /* 137 */ "column_def_list ::= column_def_list NK_COMMA column_def",
 /* 138 */ "column_def ::= column_name type_name",
 /* 139 */ "column_def ::= column_name type_name COMMENT NK_STRING",
 /* 140 */ "type_name ::= BOOL",
 /* 141 */ "type_name ::= TINYINT",
 /* 142 */ "type_name ::= SMALLINT",
 /* 143 */ "type_name ::= INT",
 /* 144 */ "type_name ::= INTEGER",
 /* 145 */ "type_name ::= BIGINT",
 /* 146 */ "type_name ::= FLOAT",
 /* 147 */ "type_name ::= DOUBLE",
 /* 148 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP",
 /* 149 */ "type_name ::= TIMESTAMP",
 /* 150 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP",
 /* 151 */ "type_name ::= TINYINT UNSIGNED",
 /* 152 */ "type_name ::= SMALLINT UNSIGNED",
 /* 153 */ "type_name ::= INT UNSIGNED",
 /* 154 */ "type_name ::= BIGINT UNSIGNED",
 /* 155 */ "type_name ::= JSON",
 /* 156 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP",
 /* 157 */ "type_name ::= MEDIUMBLOB",
 /* 158 */ "type_name ::= BLOB",
 /* 159 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP",
 /* 160 */ "type_name ::= DECIMAL",
 /* 161 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP",
 /* 162 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP",
 /* 163 */ "tags_def_opt ::=",
 /* 164 */ "tags_def_opt ::= tags_def",
 /* 165 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP",
 /* 166 */ "table_options ::=",
 /* 167 */ "table_options ::= table_options COMMENT NK_STRING",
 /* 168 */ "table_options ::= table_options MAX_DELAY duration_list",
 /* 169 */ "table_options ::= table_options WATERMARK duration_list",
 /* 170 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP",
 /* 171 */ "table_options ::= table_options TTL NK_INTEGER",
 /* 172 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP",
 /* 173 */ "alter_table_options ::= alter_table_option",
 /* 174 */ "alter_table_options ::= alter_table_options alter_table_option",
 /* 175 */ "alter_table_option ::= COMMENT NK_STRING",
 /* 176 */ "alter_table_option ::= TTL NK_INTEGER",
 /* 177 */ "duration_list ::= duration_literal",
 /* 178 */ "duration_list ::= duration_list NK_COMMA duration_literal",
 /* 179 */ "rollup_func_list ::= rollup_func_name",
 /* 180 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name",
 /* 181 */ "rollup_func_name ::= function_name",
 /* 182 */ "rollup_func_name ::= FIRST",
 /* 183 */ "rollup_func_name ::= LAST",
 /* 184 */ "col_name_list ::= col_name",
 /* 185 */ "col_name_list ::= col_name_list NK_COMMA col_name",
 /* 186 */ "col_name ::= column_name",
 /* 187 */ "cmd ::= SHOW DNODES",
 /* 188 */ "cmd ::= SHOW USERS",
 /* 189 */ "cmd ::= SHOW DATABASES",
 /* 190 */ "cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt",
 /* 191 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt",
 /* 192 */ "cmd ::= SHOW db_name_cond_opt VGROUPS",
 /* 193 */ "cmd ::= SHOW MNODES",
 /* 194 */ "cmd ::= SHOW MODULES",
 /* 195 */ "cmd ::= SHOW QNODES",
 /* 196 */ "cmd ::= SHOW FUNCTIONS",
 /* 197 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt",
 /* 198 */ "cmd ::= SHOW STREAMS",
 /* 199 */ "cmd ::= SHOW ACCOUNTS",
 /* 200 */ "cmd ::= SHOW APPS",
 /* 201 */ "cmd ::= SHOW CONNECTIONS",
 /* 202 */ "cmd ::= SHOW LICENCE",
 /* 203 */ "cmd ::= SHOW GRANTS",
 /* 204 */ "cmd ::= SHOW CREATE DATABASE db_name",
 /* 205 */ "cmd ::= SHOW CREATE TABLE full_table_name",
 /* 206 */ "cmd ::= SHOW CREATE STABLE full_table_name",
 /* 207 */ "cmd ::= SHOW QUERIES",
 /* 208 */ "cmd ::= SHOW SCORES",
 /* 209 */ "cmd ::= SHOW TOPICS",
 /* 210 */ "cmd ::= SHOW VARIABLES",
 /* 211 */ "cmd ::= SHOW LOCAL VARIABLES",
 /* 212 */ "cmd ::= SHOW DNODE NK_INTEGER VARIABLES",
 /* 213 */ "cmd ::= SHOW BNODES",
 /* 214 */ "cmd ::= SHOW SNODES",
 /* 215 */ "cmd ::= SHOW CLUSTER",
 /* 216 */ "cmd ::= SHOW TRANSACTIONS",
 /* 217 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name",
 /* 218 */ "cmd ::= SHOW CONSUMERS",
 /* 219 */ "cmd ::= SHOW SUBSCRIPTIONS",
 /* 220 */ "cmd ::= SHOW TAGS FROM table_name_cond from_db_opt",
 /* 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",
 /* 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 */ "cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_expression",
 /* 284 */ "cmd ::= INSERT INTO full_table_name query_expression",
 /* 285 */ "literal ::= NK_INTEGER",
 /* 286 */ "literal ::= NK_FLOAT",
 /* 287 */ "literal ::= NK_STRING",
 /* 288 */ "literal ::= NK_BOOL",
 /* 289 */ "literal ::= TIMESTAMP NK_STRING",
 /* 290 */ "literal ::= duration_literal",
 /* 291 */ "literal ::= NULL",
 /* 292 */ "literal ::= NK_QUESTION",
 /* 293 */ "duration_literal ::= NK_VARIABLE",
 /* 294 */ "signed ::= NK_INTEGER",
 /* 295 */ "signed ::= NK_PLUS NK_INTEGER",
 /* 296 */ "signed ::= NK_MINUS NK_INTEGER",
 /* 297 */ "signed ::= NK_FLOAT",
 /* 298 */ "signed ::= NK_PLUS NK_FLOAT",
 /* 299 */ "signed ::= NK_MINUS NK_FLOAT",
 /* 300 */ "signed_literal ::= signed",
 /* 301 */ "signed_literal ::= NK_STRING",
 /* 302 */ "signed_literal ::= NK_BOOL",
 /* 303 */ "signed_literal ::= TIMESTAMP NK_STRING",
 /* 304 */ "signed_literal ::= duration_literal",
 /* 305 */ "signed_literal ::= NULL",
 /* 306 */ "signed_literal ::= literal_func",
 /* 307 */ "signed_literal ::= NK_QUESTION",
 /* 308 */ "literal_list ::= signed_literal",
 /* 309 */ "literal_list ::= literal_list NK_COMMA signed_literal",
 /* 310 */ "db_name ::= NK_ID",
 /* 311 */ "table_name ::= NK_ID",
 /* 312 */ "column_name ::= NK_ID",
 /* 313 */ "function_name ::= NK_ID",
 /* 314 */ "table_alias ::= NK_ID",
 /* 315 */ "column_alias ::= NK_ID",
 /* 316 */ "user_name ::= NK_ID",
 /* 317 */ "index_name ::= NK_ID",
 /* 318 */ "topic_name ::= NK_ID",
 /* 319 */ "stream_name ::= NK_ID",
 /* 320 */ "cgroup_name ::= NK_ID",
 /* 321 */ "expression ::= literal",
 /* 322 */ "expression ::= pseudo_column",
 /* 323 */ "expression ::= column_reference",
 /* 324 */ "expression ::= function_expression",
 /* 325 */ "expression ::= subquery",
 /* 326 */ "expression ::= NK_LP expression NK_RP",
 /* 327 */ "expression ::= NK_PLUS expression",
 /* 328 */ "expression ::= NK_MINUS expression",
 /* 329 */ "expression ::= expression NK_PLUS expression",
 /* 330 */ "expression ::= expression NK_MINUS expression",
 /* 331 */ "expression ::= expression NK_STAR expression",
 /* 332 */ "expression ::= expression NK_SLASH expression",
 /* 333 */ "expression ::= expression NK_REM expression",
 /* 334 */ "expression ::= column_reference NK_ARROW NK_STRING",
 /* 335 */ "expression ::= expression NK_BITAND expression",
 /* 336 */ "expression ::= expression NK_BITOR expression",
 /* 337 */ "expression_list ::= expression",
 /* 338 */ "expression_list ::= expression_list NK_COMMA expression",
 /* 339 */ "column_reference ::= column_name",
 /* 340 */ "column_reference ::= table_name NK_DOT column_name",
 /* 341 */ "pseudo_column ::= ROWTS",
 /* 342 */ "pseudo_column ::= TBNAME",
 /* 343 */ "pseudo_column ::= table_name NK_DOT TBNAME",
 /* 344 */ "pseudo_column ::= QSTART",
 /* 345 */ "pseudo_column ::= QEND",
 /* 346 */ "pseudo_column ::= QDURATION",
 /* 347 */ "pseudo_column ::= WSTART",
 /* 348 */ "pseudo_column ::= WEND",
 /* 349 */ "pseudo_column ::= WDURATION",
 /* 350 */ "function_expression ::= function_name NK_LP expression_list NK_RP",
 /* 351 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP",
 /* 352 */ "function_expression ::= CAST NK_LP expression AS type_name NK_RP",
 /* 353 */ "function_expression ::= literal_func",
 /* 354 */ "literal_func ::= noarg_func NK_LP NK_RP",
 /* 355 */ "literal_func ::= NOW",
 /* 356 */ "noarg_func ::= NOW",
 /* 357 */ "noarg_func ::= TODAY",
 /* 358 */ "noarg_func ::= TIMEZONE",
 /* 359 */ "noarg_func ::= DATABASE",
 /* 360 */ "noarg_func ::= CLIENT_VERSION",
 /* 361 */ "noarg_func ::= SERVER_VERSION",
 /* 362 */ "noarg_func ::= SERVER_STATUS",
 /* 363 */ "noarg_func ::= CURRENT_USER",
 /* 364 */ "noarg_func ::= USER",
 /* 365 */ "star_func ::= COUNT",
 /* 366 */ "star_func ::= FIRST",
 /* 367 */ "star_func ::= LAST",
 /* 368 */ "star_func ::= LAST_ROW",
 /* 369 */ "star_func_para_list ::= NK_STAR",
 /* 370 */ "star_func_para_list ::= other_para_list",
 /* 371 */ "other_para_list ::= star_func_para",
 /* 372 */ "other_para_list ::= other_para_list NK_COMMA star_func_para",
 /* 373 */ "star_func_para ::= expression",
 /* 374 */ "star_func_para ::= table_name NK_DOT NK_STAR",
 /* 375 */ "predicate ::= expression compare_op expression",
 /* 376 */ "predicate ::= expression BETWEEN expression AND expression",
 /* 377 */ "predicate ::= expression NOT BETWEEN expression AND expression",
 /* 378 */ "predicate ::= expression IS NULL",
 /* 379 */ "predicate ::= expression IS NOT NULL",
 /* 380 */ "predicate ::= expression in_op in_predicate_value",
 /* 381 */ "compare_op ::= NK_LT",
 /* 382 */ "compare_op ::= NK_GT",
 /* 383 */ "compare_op ::= NK_LE",
 /* 384 */ "compare_op ::= NK_GE",
 /* 385 */ "compare_op ::= NK_NE",
 /* 386 */ "compare_op ::= NK_EQ",
 /* 387 */ "compare_op ::= LIKE",
 /* 388 */ "compare_op ::= NOT LIKE",
 /* 389 */ "compare_op ::= MATCH",
 /* 390 */ "compare_op ::= NMATCH",
 /* 391 */ "compare_op ::= CONTAINS",
 /* 392 */ "in_op ::= IN",
 /* 393 */ "in_op ::= NOT IN",
 /* 394 */ "in_predicate_value ::= NK_LP literal_list NK_RP",
 /* 395 */ "boolean_value_expression ::= boolean_primary",
 /* 396 */ "boolean_value_expression ::= NOT boolean_primary",
 /* 397 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression",
 /* 398 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression",
 /* 399 */ "boolean_primary ::= predicate",
 /* 400 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP",
 /* 401 */ "common_expression ::= expression",
 /* 402 */ "common_expression ::= boolean_value_expression",
 /* 403 */ "from_clause_opt ::=",
 /* 404 */ "from_clause_opt ::= FROM table_reference_list",
 /* 405 */ "table_reference_list ::= table_reference",
 /* 406 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference",
 /* 407 */ "table_reference ::= table_primary",
 /* 408 */ "table_reference ::= joined_table",
 /* 409 */ "table_primary ::= table_name alias_opt",
 /* 410 */ "table_primary ::= db_name NK_DOT table_name alias_opt",
 /* 411 */ "table_primary ::= subquery alias_opt",
 /* 412 */ "table_primary ::= parenthesized_joined_table",
 /* 413 */ "alias_opt ::=",
 /* 414 */ "alias_opt ::= table_alias",
 /* 415 */ "alias_opt ::= AS table_alias",
 /* 416 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP",
 /* 417 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP",
 /* 418 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition",
 /* 419 */ "join_type ::=",
 /* 420 */ "join_type ::= INNER",
 /* 421 */ "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",
 /* 422 */ "set_quantifier_opt ::=",
 /* 423 */ "set_quantifier_opt ::= DISTINCT",
 /* 424 */ "set_quantifier_opt ::= ALL",
 /* 425 */ "select_list ::= select_item",
 /* 426 */ "select_list ::= select_list NK_COMMA select_item",
 /* 427 */ "select_item ::= NK_STAR",
 /* 428 */ "select_item ::= common_expression",
 /* 429 */ "select_item ::= common_expression column_alias",
 /* 430 */ "select_item ::= common_expression AS column_alias",
 /* 431 */ "select_item ::= table_name NK_DOT NK_STAR",
 /* 432 */ "where_clause_opt ::=",
 /* 433 */ "where_clause_opt ::= WHERE search_condition",
 /* 434 */ "partition_by_clause_opt ::=",
 /* 435 */ "partition_by_clause_opt ::= PARTITION BY expression_list",
 /* 436 */ "twindow_clause_opt ::=",
 /* 437 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP",
 /* 438 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP",
 /* 439 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt",
 /* 440 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt",
 /* 441 */ "sliding_opt ::=",
 /* 442 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP",
 /* 443 */ "fill_opt ::=",
 /* 444 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP",
 /* 445 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP",
 /* 446 */ "fill_mode ::= NONE",
 /* 447 */ "fill_mode ::= PREV",
 /* 448 */ "fill_mode ::= NULL",
 /* 449 */ "fill_mode ::= LINEAR",
 /* 450 */ "fill_mode ::= NEXT",
 /* 451 */ "group_by_clause_opt ::=",
 /* 452 */ "group_by_clause_opt ::= GROUP BY group_by_list",
 /* 453 */ "group_by_list ::= expression",
 /* 454 */ "group_by_list ::= group_by_list NK_COMMA expression",
 /* 455 */ "having_clause_opt ::=",
 /* 456 */ "having_clause_opt ::= HAVING search_condition",
 /* 457 */ "range_opt ::=",
 /* 458 */ "range_opt ::= RANGE NK_LP expression NK_COMMA expression NK_RP",
 /* 459 */ "every_opt ::=",
 /* 460 */ "every_opt ::= EVERY NK_LP duration_literal NK_RP",
 /* 461 */ "query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt",
 /* 462 */ "query_expression_body ::= query_primary",
 /* 463 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body",
 /* 464 */ "query_expression_body ::= query_expression_body UNION query_expression_body",
 /* 465 */ "query_primary ::= query_specification",
 /* 466 */ "query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP",
 /* 467 */ "order_by_clause_opt ::=",
 /* 468 */ "order_by_clause_opt ::= ORDER BY sort_specification_list",
 /* 469 */ "slimit_clause_opt ::=",
 /* 470 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER",
 /* 471 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER",
 /* 472 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER",
 /* 473 */ "limit_clause_opt ::=",
 /* 474 */ "limit_clause_opt ::= LIMIT NK_INTEGER",
 /* 475 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER",
 /* 476 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER",
 /* 477 */ "subquery ::= NK_LP query_expression NK_RP",
 /* 478 */ "search_condition ::= common_expression",
 /* 479 */ "sort_specification_list ::= sort_specification",
 /* 480 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification",
 /* 481 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt",
 /* 482 */ "ordering_specification_opt ::=",
 /* 483 */ "ordering_specification_opt ::= ASC",
 /* 484 */ "ordering_specification_opt ::= DESC",
 /* 485 */ "null_ordering_opt ::=",
 /* 486 */ "null_ordering_opt ::= NULLS FIRST",
 /* 487 */ "null_ordering_opt ::= NULLS LAST",
2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147
};
#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 已提交
2148
    pNew = malloc(newSize*sizeof(pNew[0]));
2149 2150
    if( pNew ) pNew[0] = p->yystk0;
  }else{
X
Xiaoyu Wang 已提交
2151
    pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168
  }
  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 已提交
2169
** second argument to ParseAlloc() below.  This can be changed by
2170 2171 2172 2173 2174 2175 2176 2177 2178
** 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 已提交
2179
void ParseInit(void *yypRawParser ParseCTX_PDECL){
2180
  yyParser *yypParser = (yyParser*)yypRawParser;
X
Xiaoyu Wang 已提交
2181
  ParseCTX_STORE
2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204
#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 已提交
2205
#ifndef Parse_ENGINEALWAYSONSTACK
2206 2207 2208 2209 2210 2211 2212 2213 2214 2215
/* 
** 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 已提交
2216
** to Parse and ParseFree.
2217
*/
X
Xiaoyu Wang 已提交
2218
void *ParseAlloc(void *(*mallocProc)(YYMALLOCARGTYPE) ParseCTX_PDECL){
2219 2220 2221
  yyParser *yypParser;
  yypParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
  if( yypParser ){
X
Xiaoyu Wang 已提交
2222 2223
    ParseCTX_STORE
    ParseInit(yypParser ParseCTX_PARAM);
2224 2225 2226
  }
  return (void*)yypParser;
}
X
Xiaoyu Wang 已提交
2227
#endif /* Parse_ENGINEALWAYSONSTACK */
2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241


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

X
Xiaoyu Wang 已提交
2473
#ifndef Parse_ENGINEALWAYSONSTACK
2474 2475 2476 2477 2478 2479 2480 2481
/* 
** 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 已提交
2482
void ParseFree(
2483 2484 2485 2486 2487 2488
  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 已提交
2489
  ParseFinalize(p);
2490 2491
  (*freeProc)(p);
}
X
Xiaoyu Wang 已提交
2492
#endif /* Parse_ENGINEALWAYSONSTACK */
2493 2494 2495 2496 2497

/*
** Return the peak depth of the stack for a parser.
*/
#ifdef YYTRACKMAXSTACKDEPTH
X
Xiaoyu Wang 已提交
2498
int ParseStackPeak(void *p){
2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521
  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 已提交
2522
int ParseCoverage(FILE *out){
2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558
  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 已提交
2559
    /* assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD ); */
2560 2561 2562
    assert( iLookAhead!=YYNOCODE );
    assert( iLookAhead < YYNTOKEN );
    i += iLookAhead;
X
Xiaoyu Wang 已提交
2563
    if( i>=YY_NLOOKAHEAD || yy_lookahead[i]!=iLookAhead ){
2564 2565
#ifdef YYFALLBACK
      YYCODETYPE iFallback;            /* Fallback token */
X
Xiaoyu Wang 已提交
2566 2567
      if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
             && (iFallback = yyFallback[iLookAhead])!=0 ){
2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581
#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 已提交
2582 2583 2584 2585 2586 2587 2588 2589 2590 2591
        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
        ){
2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643
#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 已提交
2644 2645
   ParseARG_FETCH
   ParseCTX_FETCH
2646 2647 2648 2649 2650 2651 2652 2653 2654 2655
#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 已提交
2656 2657
   ParseARG_STORE /* Suppress warning about unused %extra_argument var */
   ParseCTX_STORE
2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687
}

/*
** 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 已提交
2688
  ParseTOKENTYPE yyMinor        /* The minor token to shift in */
2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722
){
  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 已提交
2723 2724 2725 2726 2727 2728 2729
/* 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[] = {
2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 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
  {  256,   -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */
  {  256,   -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */
  {  257,    0 }, /* (2) account_options ::= */
  {  257,   -3 }, /* (3) account_options ::= account_options PPS literal */
  {  257,   -3 }, /* (4) account_options ::= account_options TSERIES literal */
  {  257,   -3 }, /* (5) account_options ::= account_options STORAGE literal */
  {  257,   -3 }, /* (6) account_options ::= account_options STREAMS literal */
  {  257,   -3 }, /* (7) account_options ::= account_options QTIME literal */
  {  257,   -3 }, /* (8) account_options ::= account_options DBS literal */
  {  257,   -3 }, /* (9) account_options ::= account_options USERS literal */
  {  257,   -3 }, /* (10) account_options ::= account_options CONNS literal */
  {  257,   -3 }, /* (11) account_options ::= account_options STATE literal */
  {  258,   -1 }, /* (12) alter_account_options ::= alter_account_option */
  {  258,   -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */
  {  260,   -2 }, /* (14) alter_account_option ::= PASS literal */
  {  260,   -2 }, /* (15) alter_account_option ::= PPS literal */
  {  260,   -2 }, /* (16) alter_account_option ::= TSERIES literal */
  {  260,   -2 }, /* (17) alter_account_option ::= STORAGE literal */
  {  260,   -2 }, /* (18) alter_account_option ::= STREAMS literal */
  {  260,   -2 }, /* (19) alter_account_option ::= QTIME literal */
  {  260,   -2 }, /* (20) alter_account_option ::= DBS literal */
  {  260,   -2 }, /* (21) alter_account_option ::= USERS literal */
  {  260,   -2 }, /* (22) alter_account_option ::= CONNS literal */
  {  260,   -2 }, /* (23) alter_account_option ::= STATE literal */
  {  256,   -6 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */
  {  256,   -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */
  {  256,   -5 }, /* (26) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */
  {  256,   -5 }, /* (27) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */
  {  256,   -3 }, /* (28) cmd ::= DROP USER user_name */
  {  262,    0 }, /* (29) sysinfo_opt ::= */
  {  262,   -2 }, /* (30) sysinfo_opt ::= SYSINFO NK_INTEGER */
  {  256,   -6 }, /* (31) cmd ::= GRANT privileges ON priv_level TO user_name */
  {  256,   -6 }, /* (32) cmd ::= REVOKE privileges ON priv_level FROM user_name */
  {  263,   -1 }, /* (33) privileges ::= ALL */
  {  263,   -1 }, /* (34) privileges ::= priv_type_list */
  {  265,   -1 }, /* (35) priv_type_list ::= priv_type */
  {  265,   -3 }, /* (36) priv_type_list ::= priv_type_list NK_COMMA priv_type */
  {  266,   -1 }, /* (37) priv_type ::= READ */
  {  266,   -1 }, /* (38) priv_type ::= WRITE */
  {  264,   -3 }, /* (39) priv_level ::= NK_STAR NK_DOT NK_STAR */
  {  264,   -3 }, /* (40) priv_level ::= db_name NK_DOT NK_STAR */
  {  256,   -3 }, /* (41) cmd ::= CREATE DNODE dnode_endpoint */
  {  256,   -5 }, /* (42) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */
  {  256,   -3 }, /* (43) cmd ::= DROP DNODE NK_INTEGER */
  {  256,   -3 }, /* (44) cmd ::= DROP DNODE dnode_endpoint */
  {  256,   -4 }, /* (45) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */
  {  256,   -5 }, /* (46) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */
  {  256,   -4 }, /* (47) cmd ::= ALTER ALL DNODES NK_STRING */
  {  256,   -5 }, /* (48) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */
  {  268,   -1 }, /* (49) dnode_endpoint ::= NK_STRING */
  {  268,   -1 }, /* (50) dnode_endpoint ::= NK_ID */
  {  268,   -1 }, /* (51) dnode_endpoint ::= NK_IPTOKEN */
  {  256,   -3 }, /* (52) cmd ::= ALTER LOCAL NK_STRING */
  {  256,   -4 }, /* (53) cmd ::= ALTER LOCAL NK_STRING NK_STRING */
  {  256,   -5 }, /* (54) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */
  {  256,   -5 }, /* (55) cmd ::= DROP QNODE ON DNODE NK_INTEGER */
  {  256,   -5 }, /* (56) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */
  {  256,   -5 }, /* (57) cmd ::= DROP BNODE ON DNODE NK_INTEGER */
  {  256,   -5 }, /* (58) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */
  {  256,   -5 }, /* (59) cmd ::= DROP SNODE ON DNODE NK_INTEGER */
  {  256,   -5 }, /* (60) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */
  {  256,   -5 }, /* (61) cmd ::= DROP MNODE ON DNODE NK_INTEGER */
  {  256,   -5 }, /* (62) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
  {  256,   -4 }, /* (63) cmd ::= DROP DATABASE exists_opt db_name */
  {  256,   -2 }, /* (64) cmd ::= USE db_name */
  {  256,   -4 }, /* (65) cmd ::= ALTER DATABASE db_name alter_db_options */
  {  256,   -3 }, /* (66) cmd ::= FLUSH DATABASE db_name */
  {  256,   -3 }, /* (67) cmd ::= TRIM DATABASE db_name */
  {  269,   -3 }, /* (68) not_exists_opt ::= IF NOT EXISTS */
  {  269,    0 }, /* (69) not_exists_opt ::= */
  {  271,   -2 }, /* (70) exists_opt ::= IF EXISTS */
  {  271,    0 }, /* (71) exists_opt ::= */
  {  270,    0 }, /* (72) db_options ::= */
  {  270,   -3 }, /* (73) db_options ::= db_options BUFFER NK_INTEGER */
2804 2805
  {  270,   -3 }, /* (74) db_options ::= db_options CACHEMODEL NK_STRING */
  {  270,   -3 }, /* (75) db_options ::= db_options CACHESIZE NK_INTEGER */
2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817
  {  270,   -3 }, /* (76) db_options ::= db_options COMP NK_INTEGER */
  {  270,   -3 }, /* (77) db_options ::= db_options DURATION NK_INTEGER */
  {  270,   -3 }, /* (78) db_options ::= db_options DURATION NK_VARIABLE */
  {  270,   -3 }, /* (79) db_options ::= db_options FSYNC NK_INTEGER */
  {  270,   -3 }, /* (80) db_options ::= db_options MAXROWS NK_INTEGER */
  {  270,   -3 }, /* (81) db_options ::= db_options MINROWS NK_INTEGER */
  {  270,   -3 }, /* (82) db_options ::= db_options KEEP integer_list */
  {  270,   -3 }, /* (83) db_options ::= db_options KEEP variable_list */
  {  270,   -3 }, /* (84) db_options ::= db_options PAGES NK_INTEGER */
  {  270,   -3 }, /* (85) db_options ::= db_options PAGESIZE NK_INTEGER */
  {  270,   -3 }, /* (86) db_options ::= db_options PRECISION NK_STRING */
  {  270,   -3 }, /* (87) db_options ::= db_options REPLICA NK_INTEGER */
2818
  {  270,   -3 }, /* (88) db_options ::= db_options STRICT NK_STRING */
2819 2820 2821 2822 2823 2824 2825
  {  270,   -3 }, /* (89) db_options ::= db_options WAL NK_INTEGER */
  {  270,   -3 }, /* (90) db_options ::= db_options VGROUPS NK_INTEGER */
  {  270,   -3 }, /* (91) db_options ::= db_options SINGLE_STABLE NK_INTEGER */
  {  270,   -3 }, /* (92) db_options ::= db_options RETENTIONS retention_list */
  {  270,   -3 }, /* (93) db_options ::= db_options SCHEMALESS NK_INTEGER */
  {  272,   -1 }, /* (94) alter_db_options ::= alter_db_option */
  {  272,   -2 }, /* (95) alter_db_options ::= alter_db_options alter_db_option */
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
  {  276,   -2 }, /* (96) alter_db_option ::= CACHEMODEL NK_STRING */
  {  276,   -2 }, /* (97) alter_db_option ::= CACHESIZE NK_INTEGER */
  {  276,   -2 }, /* (98) alter_db_option ::= FSYNC NK_INTEGER */
  {  276,   -2 }, /* (99) alter_db_option ::= KEEP integer_list */
  {  276,   -2 }, /* (100) alter_db_option ::= KEEP variable_list */
  {  276,   -2 }, /* (101) alter_db_option ::= WAL NK_INTEGER */
  {  273,   -1 }, /* (102) integer_list ::= NK_INTEGER */
  {  273,   -3 }, /* (103) integer_list ::= integer_list NK_COMMA NK_INTEGER */
  {  274,   -1 }, /* (104) variable_list ::= NK_VARIABLE */
  {  274,   -3 }, /* (105) variable_list ::= variable_list NK_COMMA NK_VARIABLE */
  {  275,   -1 }, /* (106) retention_list ::= retention */
  {  275,   -3 }, /* (107) retention_list ::= retention_list NK_COMMA retention */
  {  277,   -3 }, /* (108) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */
  {  256,   -9 }, /* (109) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */
  {  256,   -3 }, /* (110) cmd ::= CREATE TABLE multi_create_clause */
  {  256,   -9 }, /* (111) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */
  {  256,   -3 }, /* (112) cmd ::= DROP TABLE multi_drop_clause */
  {  256,   -4 }, /* (113) cmd ::= DROP STABLE exists_opt full_table_name */
  {  256,   -3 }, /* (114) cmd ::= ALTER TABLE alter_table_clause */
  {  256,   -3 }, /* (115) cmd ::= ALTER STABLE alter_table_clause */
  {  285,   -2 }, /* (116) alter_table_clause ::= full_table_name alter_table_options */
  {  285,   -5 }, /* (117) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */
  {  285,   -4 }, /* (118) alter_table_clause ::= full_table_name DROP COLUMN column_name */
  {  285,   -5 }, /* (119) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */
  {  285,   -5 }, /* (120) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */
  {  285,   -5 }, /* (121) alter_table_clause ::= full_table_name ADD TAG column_name type_name */
  {  285,   -4 }, /* (122) alter_table_clause ::= full_table_name DROP TAG column_name */
  {  285,   -5 }, /* (123) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */
  {  285,   -5 }, /* (124) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */
  {  285,   -6 }, /* (125) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */
  {  282,   -1 }, /* (126) multi_create_clause ::= create_subtable_clause */
  {  282,   -2 }, /* (127) multi_create_clause ::= multi_create_clause create_subtable_clause */
  {  290,  -10 }, /* (128) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */
  {  284,   -1 }, /* (129) multi_drop_clause ::= drop_table_clause */
  {  284,   -2 }, /* (130) multi_drop_clause ::= multi_drop_clause drop_table_clause */
  {  293,   -2 }, /* (131) drop_table_clause ::= exists_opt full_table_name */
  {  291,    0 }, /* (132) specific_cols_opt ::= */
  {  291,   -3 }, /* (133) specific_cols_opt ::= NK_LP col_name_list NK_RP */
  {  278,   -1 }, /* (134) full_table_name ::= table_name */
  {  278,   -3 }, /* (135) full_table_name ::= db_name NK_DOT table_name */
  {  279,   -1 }, /* (136) column_def_list ::= column_def */
  {  279,   -3 }, /* (137) column_def_list ::= column_def_list NK_COMMA column_def */
  {  296,   -2 }, /* (138) column_def ::= column_name type_name */
  {  296,   -4 }, /* (139) column_def ::= column_name type_name COMMENT NK_STRING */
  {  288,   -1 }, /* (140) type_name ::= BOOL */
  {  288,   -1 }, /* (141) type_name ::= TINYINT */
  {  288,   -1 }, /* (142) type_name ::= SMALLINT */
  {  288,   -1 }, /* (143) type_name ::= INT */
  {  288,   -1 }, /* (144) type_name ::= INTEGER */
  {  288,   -1 }, /* (145) type_name ::= BIGINT */
  {  288,   -1 }, /* (146) type_name ::= FLOAT */
  {  288,   -1 }, /* (147) type_name ::= DOUBLE */
  {  288,   -4 }, /* (148) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
  {  288,   -1 }, /* (149) type_name ::= TIMESTAMP */
  {  288,   -4 }, /* (150) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
  {  288,   -2 }, /* (151) type_name ::= TINYINT UNSIGNED */
  {  288,   -2 }, /* (152) type_name ::= SMALLINT UNSIGNED */
  {  288,   -2 }, /* (153) type_name ::= INT UNSIGNED */
  {  288,   -2 }, /* (154) type_name ::= BIGINT UNSIGNED */
  {  288,   -1 }, /* (155) type_name ::= JSON */
  {  288,   -4 }, /* (156) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
  {  288,   -1 }, /* (157) type_name ::= MEDIUMBLOB */
  {  288,   -1 }, /* (158) type_name ::= BLOB */
  {  288,   -4 }, /* (159) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
  {  288,   -1 }, /* (160) type_name ::= DECIMAL */
  {  288,   -4 }, /* (161) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
  {  288,   -6 }, /* (162) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
  {  280,    0 }, /* (163) tags_def_opt ::= */
  {  280,   -1 }, /* (164) tags_def_opt ::= tags_def */
  {  283,   -4 }, /* (165) tags_def ::= TAGS NK_LP column_def_list NK_RP */
  {  281,    0 }, /* (166) table_options ::= */
  {  281,   -3 }, /* (167) table_options ::= table_options COMMENT NK_STRING */
  {  281,   -3 }, /* (168) table_options ::= table_options MAX_DELAY duration_list */
  {  281,   -3 }, /* (169) table_options ::= table_options WATERMARK duration_list */
  {  281,   -5 }, /* (170) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */
  {  281,   -3 }, /* (171) table_options ::= table_options TTL NK_INTEGER */
  {  281,   -5 }, /* (172) table_options ::= table_options SMA NK_LP col_name_list NK_RP */
  {  286,   -1 }, /* (173) alter_table_options ::= alter_table_option */
  {  286,   -2 }, /* (174) alter_table_options ::= alter_table_options alter_table_option */
  {  299,   -2 }, /* (175) alter_table_option ::= COMMENT NK_STRING */
  {  299,   -2 }, /* (176) alter_table_option ::= TTL NK_INTEGER */
  {  297,   -1 }, /* (177) duration_list ::= duration_literal */
  {  297,   -3 }, /* (178) duration_list ::= duration_list NK_COMMA duration_literal */
  {  298,   -1 }, /* (179) rollup_func_list ::= rollup_func_name */
  {  298,   -3 }, /* (180) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */
  {  301,   -1 }, /* (181) rollup_func_name ::= function_name */
  {  301,   -1 }, /* (182) rollup_func_name ::= FIRST */
  {  301,   -1 }, /* (183) rollup_func_name ::= LAST */
  {  294,   -1 }, /* (184) col_name_list ::= col_name */
  {  294,   -3 }, /* (185) col_name_list ::= col_name_list NK_COMMA col_name */
  {  303,   -1 }, /* (186) col_name ::= column_name */
  {  256,   -2 }, /* (187) cmd ::= SHOW DNODES */
  {  256,   -2 }, /* (188) cmd ::= SHOW USERS */
  {  256,   -2 }, /* (189) cmd ::= SHOW DATABASES */
  {  256,   -4 }, /* (190) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */
  {  256,   -4 }, /* (191) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */
  {  256,   -3 }, /* (192) cmd ::= SHOW db_name_cond_opt VGROUPS */
  {  256,   -2 }, /* (193) cmd ::= SHOW MNODES */
  {  256,   -2 }, /* (194) cmd ::= SHOW MODULES */
  {  256,   -2 }, /* (195) cmd ::= SHOW QNODES */
  {  256,   -2 }, /* (196) cmd ::= SHOW FUNCTIONS */
  {  256,   -5 }, /* (197) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */
  {  256,   -2 }, /* (198) cmd ::= SHOW STREAMS */
  {  256,   -2 }, /* (199) cmd ::= SHOW ACCOUNTS */
  {  256,   -2 }, /* (200) cmd ::= SHOW APPS */
  {  256,   -2 }, /* (201) cmd ::= SHOW CONNECTIONS */
  {  256,   -2 }, /* (202) cmd ::= SHOW LICENCE */
  {  256,   -2 }, /* (203) cmd ::= SHOW GRANTS */
  {  256,   -4 }, /* (204) cmd ::= SHOW CREATE DATABASE db_name */
  {  256,   -4 }, /* (205) cmd ::= SHOW CREATE TABLE full_table_name */
  {  256,   -4 }, /* (206) cmd ::= SHOW CREATE STABLE full_table_name */
  {  256,   -2 }, /* (207) cmd ::= SHOW QUERIES */
  {  256,   -2 }, /* (208) cmd ::= SHOW SCORES */
  {  256,   -2 }, /* (209) cmd ::= SHOW TOPICS */
  {  256,   -2 }, /* (210) cmd ::= SHOW VARIABLES */
  {  256,   -3 }, /* (211) cmd ::= SHOW LOCAL VARIABLES */
  {  256,   -4 }, /* (212) cmd ::= SHOW DNODE NK_INTEGER VARIABLES */
  {  256,   -2 }, /* (213) cmd ::= SHOW BNODES */
  {  256,   -2 }, /* (214) cmd ::= SHOW SNODES */
  {  256,   -2 }, /* (215) cmd ::= SHOW CLUSTER */
  {  256,   -2 }, /* (216) cmd ::= SHOW TRANSACTIONS */
  {  256,   -4 }, /* (217) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */
  {  256,   -2 }, /* (218) cmd ::= SHOW CONSUMERS */
  {  256,   -2 }, /* (219) cmd ::= SHOW SUBSCRIPTIONS */
  {  256,   -5 }, /* (220) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */
  {  304,    0 }, /* (221) db_name_cond_opt ::= */
  {  304,   -2 }, /* (222) db_name_cond_opt ::= db_name NK_DOT */
  {  305,    0 }, /* (223) like_pattern_opt ::= */
  {  305,   -2 }, /* (224) like_pattern_opt ::= LIKE NK_STRING */
  {  306,   -1 }, /* (225) table_name_cond ::= table_name */
  {  307,    0 }, /* (226) from_db_opt ::= */
  {  307,   -2 }, /* (227) from_db_opt ::= FROM db_name */
  {  256,   -8 }, /* (228) cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */
  {  256,   -4 }, /* (229) cmd ::= DROP INDEX exists_opt index_name */
  {  309,  -10 }, /* (230) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */
  {  309,  -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 */
  {  310,   -1 }, /* (232) func_list ::= func */
  {  310,   -3 }, /* (233) func_list ::= func_list NK_COMMA func */
  {  313,   -4 }, /* (234) func ::= function_name NK_LP expression_list NK_RP */
  {  312,    0 }, /* (235) sma_stream_opt ::= */
  {  312,   -3 }, /* (236) sma_stream_opt ::= stream_options WATERMARK duration_literal */
  {  312,   -3 }, /* (237) sma_stream_opt ::= stream_options MAX_DELAY duration_literal */
  {  256,   -6 }, /* (238) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */
  {  256,   -7 }, /* (239) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */
  {  256,   -9 }, /* (240) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */
  {  256,   -7 }, /* (241) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */
  {  256,   -9 }, /* (242) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */
  {  256,   -4 }, /* (243) cmd ::= DROP TOPIC exists_opt topic_name */
  {  256,   -7 }, /* (244) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */
  {  256,   -2 }, /* (245) cmd ::= DESC full_table_name */
  {  256,   -2 }, /* (246) cmd ::= DESCRIBE full_table_name */
  {  256,   -3 }, /* (247) cmd ::= RESET QUERY CACHE */
  {  256,   -4 }, /* (248) cmd ::= EXPLAIN analyze_opt explain_options query_expression */
  {  318,    0 }, /* (249) analyze_opt ::= */
  {  318,   -1 }, /* (250) analyze_opt ::= ANALYZE */
  {  319,    0 }, /* (251) explain_options ::= */
  {  319,   -3 }, /* (252) explain_options ::= explain_options VERBOSE NK_BOOL */
  {  319,   -3 }, /* (253) explain_options ::= explain_options RATIO NK_FLOAT */
  {  256,   -6 }, /* (254) cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */
  {  256,  -10 }, /* (255) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */
  {  256,   -4 }, /* (256) cmd ::= DROP FUNCTION exists_opt function_name */
  {  320,    0 }, /* (257) agg_func_opt ::= */
  {  320,   -1 }, /* (258) agg_func_opt ::= AGGREGATE */
  {  321,    0 }, /* (259) bufsize_opt ::= */
  {  321,   -2 }, /* (260) bufsize_opt ::= BUFSIZE NK_INTEGER */
  {  256,   -8 }, /* (261) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */
  {  256,   -4 }, /* (262) cmd ::= DROP STREAM exists_opt stream_name */
  {  323,    0 }, /* (263) into_opt ::= */
  {  323,   -2 }, /* (264) into_opt ::= INTO full_table_name */
  {  314,    0 }, /* (265) stream_options ::= */
  {  314,   -3 }, /* (266) stream_options ::= stream_options TRIGGER AT_ONCE */
  {  314,   -3 }, /* (267) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */
  {  314,   -4 }, /* (268) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
  {  314,   -3 }, /* (269) stream_options ::= stream_options WATERMARK duration_literal */
  {  314,   -3 }, /* (270) stream_options ::= stream_options IGNORE EXPIRED */
  {  256,   -3 }, /* (271) cmd ::= KILL CONNECTION NK_INTEGER */
  {  256,   -3 }, /* (272) cmd ::= KILL QUERY NK_STRING */
  {  256,   -3 }, /* (273) cmd ::= KILL TRANSACTION NK_INTEGER */
  {  256,   -2 }, /* (274) cmd ::= BALANCE VGROUP */
  {  256,   -4 }, /* (275) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */
  {  256,   -4 }, /* (276) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */
  {  256,   -3 }, /* (277) cmd ::= SPLIT VGROUP NK_INTEGER */
  {  324,   -2 }, /* (278) dnode_list ::= DNODE NK_INTEGER */
  {  324,   -3 }, /* (279) dnode_list ::= dnode_list DNODE NK_INTEGER */
  {  256,   -3 }, /* (280) cmd ::= SYNCDB db_name REPLICA */
  {  256,   -4 }, /* (281) cmd ::= DELETE FROM full_table_name where_clause_opt */
  {  256,   -1 }, /* (282) cmd ::= query_expression */
  {  256,   -7 }, /* (283) cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_expression */
  {  256,   -4 }, /* (284) cmd ::= INSERT INTO full_table_name query_expression */
  {  259,   -1 }, /* (285) literal ::= NK_INTEGER */
  {  259,   -1 }, /* (286) literal ::= NK_FLOAT */
  {  259,   -1 }, /* (287) literal ::= NK_STRING */
  {  259,   -1 }, /* (288) literal ::= NK_BOOL */
  {  259,   -2 }, /* (289) literal ::= TIMESTAMP NK_STRING */
  {  259,   -1 }, /* (290) literal ::= duration_literal */
  {  259,   -1 }, /* (291) literal ::= NULL */
  {  259,   -1 }, /* (292) literal ::= NK_QUESTION */
  {  300,   -1 }, /* (293) duration_literal ::= NK_VARIABLE */
  {  326,   -1 }, /* (294) signed ::= NK_INTEGER */
  {  326,   -2 }, /* (295) signed ::= NK_PLUS NK_INTEGER */
  {  326,   -2 }, /* (296) signed ::= NK_MINUS NK_INTEGER */
  {  326,   -1 }, /* (297) signed ::= NK_FLOAT */
  {  326,   -2 }, /* (298) signed ::= NK_PLUS NK_FLOAT */
  {  326,   -2 }, /* (299) signed ::= NK_MINUS NK_FLOAT */
  {  289,   -1 }, /* (300) signed_literal ::= signed */
  {  289,   -1 }, /* (301) signed_literal ::= NK_STRING */
  {  289,   -1 }, /* (302) signed_literal ::= NK_BOOL */
  {  289,   -2 }, /* (303) signed_literal ::= TIMESTAMP NK_STRING */
  {  289,   -1 }, /* (304) signed_literal ::= duration_literal */
  {  289,   -1 }, /* (305) signed_literal ::= NULL */
  {  289,   -1 }, /* (306) signed_literal ::= literal_func */
  {  289,   -1 }, /* (307) signed_literal ::= NK_QUESTION */
  {  328,   -1 }, /* (308) literal_list ::= signed_literal */
  {  328,   -3 }, /* (309) literal_list ::= literal_list NK_COMMA signed_literal */
  {  267,   -1 }, /* (310) db_name ::= NK_ID */
  {  295,   -1 }, /* (311) table_name ::= NK_ID */
  {  287,   -1 }, /* (312) column_name ::= NK_ID */
  {  302,   -1 }, /* (313) function_name ::= NK_ID */
  {  329,   -1 }, /* (314) table_alias ::= NK_ID */
  {  330,   -1 }, /* (315) column_alias ::= NK_ID */
  {  261,   -1 }, /* (316) user_name ::= NK_ID */
  {  308,   -1 }, /* (317) index_name ::= NK_ID */
  {  315,   -1 }, /* (318) topic_name ::= NK_ID */
  {  322,   -1 }, /* (319) stream_name ::= NK_ID */
  {  317,   -1 }, /* (320) cgroup_name ::= NK_ID */
  {  331,   -1 }, /* (321) expression ::= literal */
  {  331,   -1 }, /* (322) expression ::= pseudo_column */
  {  331,   -1 }, /* (323) expression ::= column_reference */
  {  331,   -1 }, /* (324) expression ::= function_expression */
  {  331,   -1 }, /* (325) expression ::= subquery */
  {  331,   -3 }, /* (326) expression ::= NK_LP expression NK_RP */
  {  331,   -2 }, /* (327) expression ::= NK_PLUS expression */
  {  331,   -2 }, /* (328) expression ::= NK_MINUS expression */
  {  331,   -3 }, /* (329) expression ::= expression NK_PLUS expression */
  {  331,   -3 }, /* (330) expression ::= expression NK_MINUS expression */
  {  331,   -3 }, /* (331) expression ::= expression NK_STAR expression */
  {  331,   -3 }, /* (332) expression ::= expression NK_SLASH expression */
  {  331,   -3 }, /* (333) expression ::= expression NK_REM expression */
  {  331,   -3 }, /* (334) expression ::= column_reference NK_ARROW NK_STRING */
  {  331,   -3 }, /* (335) expression ::= expression NK_BITAND expression */
  {  331,   -3 }, /* (336) expression ::= expression NK_BITOR expression */
  {  292,   -1 }, /* (337) expression_list ::= expression */
  {  292,   -3 }, /* (338) expression_list ::= expression_list NK_COMMA expression */
  {  333,   -1 }, /* (339) column_reference ::= column_name */
  {  333,   -3 }, /* (340) column_reference ::= table_name NK_DOT column_name */
  {  332,   -1 }, /* (341) pseudo_column ::= ROWTS */
  {  332,   -1 }, /* (342) pseudo_column ::= TBNAME */
  {  332,   -3 }, /* (343) pseudo_column ::= table_name NK_DOT TBNAME */
  {  332,   -1 }, /* (344) pseudo_column ::= QSTART */
  {  332,   -1 }, /* (345) pseudo_column ::= QEND */
  {  332,   -1 }, /* (346) pseudo_column ::= QDURATION */
  {  332,   -1 }, /* (347) pseudo_column ::= WSTART */
  {  332,   -1 }, /* (348) pseudo_column ::= WEND */
  {  332,   -1 }, /* (349) pseudo_column ::= WDURATION */
  {  334,   -4 }, /* (350) function_expression ::= function_name NK_LP expression_list NK_RP */
  {  334,   -4 }, /* (351) function_expression ::= star_func NK_LP star_func_para_list NK_RP */
  {  334,   -6 }, /* (352) function_expression ::= CAST NK_LP expression AS type_name NK_RP */
  {  334,   -1 }, /* (353) function_expression ::= literal_func */
  {  327,   -3 }, /* (354) literal_func ::= noarg_func NK_LP NK_RP */
  {  327,   -1 }, /* (355) literal_func ::= NOW */
  {  338,   -1 }, /* (356) noarg_func ::= NOW */
  {  338,   -1 }, /* (357) noarg_func ::= TODAY */
  {  338,   -1 }, /* (358) noarg_func ::= TIMEZONE */
  {  338,   -1 }, /* (359) noarg_func ::= DATABASE */
  {  338,   -1 }, /* (360) noarg_func ::= CLIENT_VERSION */
  {  338,   -1 }, /* (361) noarg_func ::= SERVER_VERSION */
  {  338,   -1 }, /* (362) noarg_func ::= SERVER_STATUS */
  {  338,   -1 }, /* (363) noarg_func ::= CURRENT_USER */
  {  338,   -1 }, /* (364) noarg_func ::= USER */
  {  336,   -1 }, /* (365) star_func ::= COUNT */
  {  336,   -1 }, /* (366) star_func ::= FIRST */
  {  336,   -1 }, /* (367) star_func ::= LAST */
  {  336,   -1 }, /* (368) star_func ::= LAST_ROW */
  {  337,   -1 }, /* (369) star_func_para_list ::= NK_STAR */
  {  337,   -1 }, /* (370) star_func_para_list ::= other_para_list */
  {  339,   -1 }, /* (371) other_para_list ::= star_func_para */
  {  339,   -3 }, /* (372) other_para_list ::= other_para_list NK_COMMA star_func_para */
  {  340,   -1 }, /* (373) star_func_para ::= expression */
  {  340,   -3 }, /* (374) star_func_para ::= table_name NK_DOT NK_STAR */
  {  341,   -3 }, /* (375) predicate ::= expression compare_op expression */
  {  341,   -5 }, /* (376) predicate ::= expression BETWEEN expression AND expression */
  {  341,   -6 }, /* (377) predicate ::= expression NOT BETWEEN expression AND expression */
  {  341,   -3 }, /* (378) predicate ::= expression IS NULL */
  {  341,   -4 }, /* (379) predicate ::= expression IS NOT NULL */
  {  341,   -3 }, /* (380) predicate ::= expression in_op in_predicate_value */
  {  342,   -1 }, /* (381) compare_op ::= NK_LT */
  {  342,   -1 }, /* (382) compare_op ::= NK_GT */
  {  342,   -1 }, /* (383) compare_op ::= NK_LE */
  {  342,   -1 }, /* (384) compare_op ::= NK_GE */
  {  342,   -1 }, /* (385) compare_op ::= NK_NE */
  {  342,   -1 }, /* (386) compare_op ::= NK_EQ */
  {  342,   -1 }, /* (387) compare_op ::= LIKE */
  {  342,   -2 }, /* (388) compare_op ::= NOT LIKE */
  {  342,   -1 }, /* (389) compare_op ::= MATCH */
  {  342,   -1 }, /* (390) compare_op ::= NMATCH */
  {  342,   -1 }, /* (391) compare_op ::= CONTAINS */
  {  343,   -1 }, /* (392) in_op ::= IN */
  {  343,   -2 }, /* (393) in_op ::= NOT IN */
  {  344,   -3 }, /* (394) in_predicate_value ::= NK_LP literal_list NK_RP */
  {  345,   -1 }, /* (395) boolean_value_expression ::= boolean_primary */
  {  345,   -2 }, /* (396) boolean_value_expression ::= NOT boolean_primary */
  {  345,   -3 }, /* (397) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
  {  345,   -3 }, /* (398) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
  {  346,   -1 }, /* (399) boolean_primary ::= predicate */
  {  346,   -3 }, /* (400) boolean_primary ::= NK_LP boolean_value_expression NK_RP */
  {  347,   -1 }, /* (401) common_expression ::= expression */
  {  347,   -1 }, /* (402) common_expression ::= boolean_value_expression */
  {  348,    0 }, /* (403) from_clause_opt ::= */
  {  348,   -2 }, /* (404) from_clause_opt ::= FROM table_reference_list */
  {  349,   -1 }, /* (405) table_reference_list ::= table_reference */
  {  349,   -3 }, /* (406) table_reference_list ::= table_reference_list NK_COMMA table_reference */
  {  350,   -1 }, /* (407) table_reference ::= table_primary */
  {  350,   -1 }, /* (408) table_reference ::= joined_table */
  {  351,   -2 }, /* (409) table_primary ::= table_name alias_opt */
  {  351,   -4 }, /* (410) table_primary ::= db_name NK_DOT table_name alias_opt */
  {  351,   -2 }, /* (411) table_primary ::= subquery alias_opt */
  {  351,   -1 }, /* (412) table_primary ::= parenthesized_joined_table */
  {  353,    0 }, /* (413) alias_opt ::= */
  {  353,   -1 }, /* (414) alias_opt ::= table_alias */
  {  353,   -2 }, /* (415) alias_opt ::= AS table_alias */
  {  354,   -3 }, /* (416) parenthesized_joined_table ::= NK_LP joined_table NK_RP */
  {  354,   -3 }, /* (417) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */
  {  352,   -6 }, /* (418) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
  {  355,    0 }, /* (419) join_type ::= */
  {  355,   -1 }, /* (420) join_type ::= INNER */
  {  357,  -12 }, /* (421) 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 */
  {  358,    0 }, /* (422) set_quantifier_opt ::= */
  {  358,   -1 }, /* (423) set_quantifier_opt ::= DISTINCT */
  {  358,   -1 }, /* (424) set_quantifier_opt ::= ALL */
  {  359,   -1 }, /* (425) select_list ::= select_item */
  {  359,   -3 }, /* (426) select_list ::= select_list NK_COMMA select_item */
  {  367,   -1 }, /* (427) select_item ::= NK_STAR */
  {  367,   -1 }, /* (428) select_item ::= common_expression */
  {  367,   -2 }, /* (429) select_item ::= common_expression column_alias */
  {  367,   -3 }, /* (430) select_item ::= common_expression AS column_alias */
  {  367,   -3 }, /* (431) select_item ::= table_name NK_DOT NK_STAR */
  {  325,    0 }, /* (432) where_clause_opt ::= */
  {  325,   -2 }, /* (433) where_clause_opt ::= WHERE search_condition */
  {  360,    0 }, /* (434) partition_by_clause_opt ::= */
  {  360,   -3 }, /* (435) partition_by_clause_opt ::= PARTITION BY expression_list */
  {  364,    0 }, /* (436) twindow_clause_opt ::= */
  {  364,   -6 }, /* (437) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
  {  364,   -4 }, /* (438) twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */
  {  364,   -6 }, /* (439) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
  {  364,   -8 }, /* (440) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
  {  311,    0 }, /* (441) sliding_opt ::= */
  {  311,   -4 }, /* (442) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
  {  363,    0 }, /* (443) fill_opt ::= */
  {  363,   -4 }, /* (444) fill_opt ::= FILL NK_LP fill_mode NK_RP */
  {  363,   -6 }, /* (445) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
  {  368,   -1 }, /* (446) fill_mode ::= NONE */
  {  368,   -1 }, /* (447) fill_mode ::= PREV */
  {  368,   -1 }, /* (448) fill_mode ::= NULL */
  {  368,   -1 }, /* (449) fill_mode ::= LINEAR */
  {  368,   -1 }, /* (450) fill_mode ::= NEXT */
  {  365,    0 }, /* (451) group_by_clause_opt ::= */
  {  365,   -3 }, /* (452) group_by_clause_opt ::= GROUP BY group_by_list */
  {  369,   -1 }, /* (453) group_by_list ::= expression */
  {  369,   -3 }, /* (454) group_by_list ::= group_by_list NK_COMMA expression */
  {  366,    0 }, /* (455) having_clause_opt ::= */
  {  366,   -2 }, /* (456) having_clause_opt ::= HAVING search_condition */
  {  361,    0 }, /* (457) range_opt ::= */
  {  361,   -6 }, /* (458) range_opt ::= RANGE NK_LP expression NK_COMMA expression NK_RP */
  {  362,    0 }, /* (459) every_opt ::= */
  {  362,   -4 }, /* (460) every_opt ::= EVERY NK_LP duration_literal NK_RP */
  {  316,   -4 }, /* (461) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */
  {  370,   -1 }, /* (462) query_expression_body ::= query_primary */
  {  370,   -4 }, /* (463) query_expression_body ::= query_expression_body UNION ALL query_expression_body */
  {  370,   -3 }, /* (464) query_expression_body ::= query_expression_body UNION query_expression_body */
  {  374,   -1 }, /* (465) query_primary ::= query_specification */
  {  374,   -6 }, /* (466) query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */
  {  371,    0 }, /* (467) order_by_clause_opt ::= */
  {  371,   -3 }, /* (468) order_by_clause_opt ::= ORDER BY sort_specification_list */
  {  372,    0 }, /* (469) slimit_clause_opt ::= */
  {  372,   -2 }, /* (470) slimit_clause_opt ::= SLIMIT NK_INTEGER */
  {  372,   -4 }, /* (471) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
  {  372,   -4 }, /* (472) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
  {  373,    0 }, /* (473) limit_clause_opt ::= */
  {  373,   -2 }, /* (474) limit_clause_opt ::= LIMIT NK_INTEGER */
  {  373,   -4 }, /* (475) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */
  {  373,   -4 }, /* (476) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */
  {  335,   -3 }, /* (477) subquery ::= NK_LP query_expression NK_RP */
  {  356,   -1 }, /* (478) search_condition ::= common_expression */
  {  375,   -1 }, /* (479) sort_specification_list ::= sort_specification */
  {  375,   -3 }, /* (480) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */
  {  376,   -3 }, /* (481) sort_specification ::= expression ordering_specification_opt null_ordering_opt */
  {  377,    0 }, /* (482) ordering_specification_opt ::= */
  {  377,   -1 }, /* (483) ordering_specification_opt ::= ASC */
  {  377,   -1 }, /* (484) ordering_specification_opt ::= DESC */
  {  378,    0 }, /* (485) null_ordering_opt ::= */
  {  378,   -2 }, /* (486) null_ordering_opt ::= NULLS FIRST */
  {  378,   -2 }, /* (487) null_ordering_opt ::= NULLS LAST */
3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235
};

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 已提交
3236 3237
  ParseTOKENTYPE yyLookaheadToken  /* Value of the lookahead token */
  ParseCTX_PDECL                   /* %extra_context */
3238 3239 3240 3241 3242
){
  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 已提交
3243
  ParseARG_FETCH
3244 3245 3246
  (void)yyLookahead;
  (void)yyLookaheadToken;
  yymsp = yypParser->yytos;
X
Xiaoyu Wang 已提交
3247 3248
#ifndef NDEBUG
  if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){
X
Xiaoyu Wang 已提交
3249
    yysize = yyRuleInfo[yyruleno].nrhs;
X
Xiaoyu Wang 已提交
3250
    if( yysize ){
X
Xiaoyu Wang 已提交
3251
      fprintf(yyTraceFILE, "%sReduce %d [%s], go to state %d.\n",
X
Xiaoyu Wang 已提交
3252
        yyTracePrompt,
X
Xiaoyu Wang 已提交
3253
        yyruleno, yyRuleName[yyruleno], yymsp[yysize].stateno);
X
Xiaoyu Wang 已提交
3254
    }else{
X
Xiaoyu Wang 已提交
3255 3256
      fprintf(yyTraceFILE, "%sReduce %d [%s].\n",
        yyTracePrompt, yyruleno, yyRuleName[yyruleno]);
X
Xiaoyu Wang 已提交
3257 3258 3259 3260 3261 3262 3263
    }
  }
#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 已提交
3264
  if( yyRuleInfo[yyruleno].nrhs==0 ){
X
Xiaoyu Wang 已提交
3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291
#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
  }
3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303

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

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

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

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

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