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

#ifndef NDEBUG
/* For tracing reduce actions, the names of all rules are required.
*/
static const char *const yyRuleName[] = {
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
 /*   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",
 /*  24 */ "cmd ::= CREATE USER user_name PASS NK_STRING",
 /*  25 */ "cmd ::= ALTER USER user_name PASS NK_STRING",
 /*  26 */ "cmd ::= ALTER USER user_name PRIVILEGE NK_STRING",
 /*  27 */ "cmd ::= DROP USER user_name",
1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555
 /*  28 */ "cmd ::= GRANT privileges ON priv_level TO user_name",
 /*  29 */ "cmd ::= REVOKE privileges ON priv_level FROM user_name",
 /*  30 */ "privileges ::= ALL",
 /*  31 */ "privileges ::= priv_type_list",
 /*  32 */ "priv_type_list ::= priv_type",
 /*  33 */ "priv_type_list ::= priv_type_list NK_COMMA priv_type",
 /*  34 */ "priv_type ::= READ",
 /*  35 */ "priv_type ::= WRITE",
 /*  36 */ "priv_level ::= NK_STAR NK_DOT NK_STAR",
 /*  37 */ "priv_level ::= db_name NK_DOT NK_STAR",
 /*  38 */ "cmd ::= CREATE DNODE dnode_endpoint",
1556
 /*  39 */ "cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER",
1557 1558 1559 1560 1561 1562 1563
 /*  40 */ "cmd ::= DROP DNODE NK_INTEGER",
 /*  41 */ "cmd ::= DROP DNODE dnode_endpoint",
 /*  42 */ "cmd ::= ALTER DNODE NK_INTEGER NK_STRING",
 /*  43 */ "cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING",
 /*  44 */ "cmd ::= ALTER ALL DNODES NK_STRING",
 /*  45 */ "cmd ::= ALTER ALL DNODES NK_STRING NK_STRING",
 /*  46 */ "dnode_endpoint ::= NK_STRING",
1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 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
 /*  47 */ "dnode_endpoint ::= NK_ID",
 /*  48 */ "dnode_endpoint ::= NK_IPTOKEN",
 /*  49 */ "cmd ::= ALTER LOCAL NK_STRING",
 /*  50 */ "cmd ::= ALTER LOCAL NK_STRING NK_STRING",
 /*  51 */ "cmd ::= CREATE QNODE ON DNODE NK_INTEGER",
 /*  52 */ "cmd ::= DROP QNODE ON DNODE NK_INTEGER",
 /*  53 */ "cmd ::= CREATE BNODE ON DNODE NK_INTEGER",
 /*  54 */ "cmd ::= DROP BNODE ON DNODE NK_INTEGER",
 /*  55 */ "cmd ::= CREATE SNODE ON DNODE NK_INTEGER",
 /*  56 */ "cmd ::= DROP SNODE ON DNODE NK_INTEGER",
 /*  57 */ "cmd ::= CREATE MNODE ON DNODE NK_INTEGER",
 /*  58 */ "cmd ::= DROP MNODE ON DNODE NK_INTEGER",
 /*  59 */ "cmd ::= CREATE DATABASE not_exists_opt db_name db_options",
 /*  60 */ "cmd ::= DROP DATABASE exists_opt db_name",
 /*  61 */ "cmd ::= USE db_name",
 /*  62 */ "cmd ::= ALTER DATABASE db_name alter_db_options",
 /*  63 */ "not_exists_opt ::= IF NOT EXISTS",
 /*  64 */ "not_exists_opt ::=",
 /*  65 */ "exists_opt ::= IF EXISTS",
 /*  66 */ "exists_opt ::=",
 /*  67 */ "db_options ::=",
 /*  68 */ "db_options ::= db_options BUFFER NK_INTEGER",
 /*  69 */ "db_options ::= db_options CACHELAST NK_INTEGER",
 /*  70 */ "db_options ::= db_options COMP NK_INTEGER",
 /*  71 */ "db_options ::= db_options DURATION NK_INTEGER",
 /*  72 */ "db_options ::= db_options DURATION NK_VARIABLE",
 /*  73 */ "db_options ::= db_options FSYNC NK_INTEGER",
 /*  74 */ "db_options ::= db_options MAXROWS NK_INTEGER",
 /*  75 */ "db_options ::= db_options MINROWS NK_INTEGER",
 /*  76 */ "db_options ::= db_options KEEP integer_list",
 /*  77 */ "db_options ::= db_options KEEP variable_list",
 /*  78 */ "db_options ::= db_options PAGES NK_INTEGER",
 /*  79 */ "db_options ::= db_options PAGESIZE NK_INTEGER",
 /*  80 */ "db_options ::= db_options PRECISION NK_STRING",
 /*  81 */ "db_options ::= db_options REPLICA NK_INTEGER",
 /*  82 */ "db_options ::= db_options STRICT NK_INTEGER",
 /*  83 */ "db_options ::= db_options WAL NK_INTEGER",
 /*  84 */ "db_options ::= db_options VGROUPS NK_INTEGER",
 /*  85 */ "db_options ::= db_options SINGLE_STABLE NK_INTEGER",
 /*  86 */ "db_options ::= db_options RETENTIONS retention_list",
 /*  87 */ "db_options ::= db_options SCHEMALESS NK_INTEGER",
 /*  88 */ "alter_db_options ::= alter_db_option",
 /*  89 */ "alter_db_options ::= alter_db_options alter_db_option",
 /*  90 */ "alter_db_option ::= BUFFER NK_INTEGER",
 /*  91 */ "alter_db_option ::= CACHELAST NK_INTEGER",
 /*  92 */ "alter_db_option ::= FSYNC NK_INTEGER",
 /*  93 */ "alter_db_option ::= KEEP integer_list",
 /*  94 */ "alter_db_option ::= KEEP variable_list",
 /*  95 */ "alter_db_option ::= PAGES NK_INTEGER",
 /*  96 */ "alter_db_option ::= REPLICA NK_INTEGER",
 /*  97 */ "alter_db_option ::= STRICT NK_INTEGER",
 /*  98 */ "alter_db_option ::= WAL NK_INTEGER",
 /*  99 */ "integer_list ::= NK_INTEGER",
 /* 100 */ "integer_list ::= integer_list NK_COMMA NK_INTEGER",
 /* 101 */ "variable_list ::= NK_VARIABLE",
 /* 102 */ "variable_list ::= variable_list NK_COMMA NK_VARIABLE",
 /* 103 */ "retention_list ::= retention",
 /* 104 */ "retention_list ::= retention_list NK_COMMA retention",
 /* 105 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE",
 /* 106 */ "cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options",
 /* 107 */ "cmd ::= CREATE TABLE multi_create_clause",
 /* 108 */ "cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options",
 /* 109 */ "cmd ::= DROP TABLE multi_drop_clause",
 /* 110 */ "cmd ::= DROP STABLE exists_opt full_table_name",
 /* 111 */ "cmd ::= ALTER TABLE alter_table_clause",
 /* 112 */ "cmd ::= ALTER STABLE alter_table_clause",
 /* 113 */ "alter_table_clause ::= full_table_name alter_table_options",
 /* 114 */ "alter_table_clause ::= full_table_name ADD COLUMN column_name type_name",
 /* 115 */ "alter_table_clause ::= full_table_name DROP COLUMN column_name",
 /* 116 */ "alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name",
 /* 117 */ "alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name",
 /* 118 */ "alter_table_clause ::= full_table_name ADD TAG column_name type_name",
 /* 119 */ "alter_table_clause ::= full_table_name DROP TAG column_name",
 /* 120 */ "alter_table_clause ::= full_table_name MODIFY TAG column_name type_name",
 /* 121 */ "alter_table_clause ::= full_table_name RENAME TAG column_name column_name",
 /* 122 */ "alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal",
 /* 123 */ "multi_create_clause ::= create_subtable_clause",
 /* 124 */ "multi_create_clause ::= multi_create_clause create_subtable_clause",
 /* 125 */ "create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP table_options",
 /* 126 */ "multi_drop_clause ::= drop_table_clause",
 /* 127 */ "multi_drop_clause ::= multi_drop_clause drop_table_clause",
 /* 128 */ "drop_table_clause ::= exists_opt full_table_name",
 /* 129 */ "specific_tags_opt ::=",
 /* 130 */ "specific_tags_opt ::= NK_LP col_name_list NK_RP",
 /* 131 */ "full_table_name ::= table_name",
 /* 132 */ "full_table_name ::= db_name NK_DOT table_name",
 /* 133 */ "column_def_list ::= column_def",
 /* 134 */ "column_def_list ::= column_def_list NK_COMMA column_def",
 /* 135 */ "column_def ::= column_name type_name",
 /* 136 */ "column_def ::= column_name type_name COMMENT NK_STRING",
 /* 137 */ "type_name ::= BOOL",
 /* 138 */ "type_name ::= TINYINT",
 /* 139 */ "type_name ::= SMALLINT",
 /* 140 */ "type_name ::= INT",
 /* 141 */ "type_name ::= INTEGER",
 /* 142 */ "type_name ::= BIGINT",
 /* 143 */ "type_name ::= FLOAT",
 /* 144 */ "type_name ::= DOUBLE",
 /* 145 */ "type_name ::= BINARY NK_LP NK_INTEGER NK_RP",
 /* 146 */ "type_name ::= TIMESTAMP",
 /* 147 */ "type_name ::= NCHAR NK_LP NK_INTEGER NK_RP",
 /* 148 */ "type_name ::= TINYINT UNSIGNED",
 /* 149 */ "type_name ::= SMALLINT UNSIGNED",
 /* 150 */ "type_name ::= INT UNSIGNED",
 /* 151 */ "type_name ::= BIGINT UNSIGNED",
 /* 152 */ "type_name ::= JSON",
 /* 153 */ "type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP",
 /* 154 */ "type_name ::= MEDIUMBLOB",
 /* 155 */ "type_name ::= BLOB",
 /* 156 */ "type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP",
 /* 157 */ "type_name ::= DECIMAL",
 /* 158 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP",
 /* 159 */ "type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP",
 /* 160 */ "tags_def_opt ::=",
 /* 161 */ "tags_def_opt ::= tags_def",
 /* 162 */ "tags_def ::= TAGS NK_LP column_def_list NK_RP",
 /* 163 */ "table_options ::=",
 /* 164 */ "table_options ::= table_options COMMENT NK_STRING",
 /* 165 */ "table_options ::= table_options MAX_DELAY duration_list",
 /* 166 */ "table_options ::= table_options WATERMARK duration_list",
 /* 167 */ "table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP",
 /* 168 */ "table_options ::= table_options TTL NK_INTEGER",
 /* 169 */ "table_options ::= table_options SMA NK_LP col_name_list NK_RP",
 /* 170 */ "alter_table_options ::= alter_table_option",
 /* 171 */ "alter_table_options ::= alter_table_options alter_table_option",
 /* 172 */ "alter_table_option ::= COMMENT NK_STRING",
 /* 173 */ "alter_table_option ::= TTL NK_INTEGER",
 /* 174 */ "duration_list ::= duration_literal",
 /* 175 */ "duration_list ::= duration_list NK_COMMA duration_literal",
 /* 176 */ "rollup_func_list ::= rollup_func_name",
 /* 177 */ "rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name",
 /* 178 */ "rollup_func_name ::= function_name",
 /* 179 */ "rollup_func_name ::= FIRST",
 /* 180 */ "rollup_func_name ::= LAST",
 /* 181 */ "col_name_list ::= col_name",
 /* 182 */ "col_name_list ::= col_name_list NK_COMMA col_name",
 /* 183 */ "col_name ::= column_name",
 /* 184 */ "cmd ::= SHOW DNODES",
 /* 185 */ "cmd ::= SHOW USERS",
 /* 186 */ "cmd ::= SHOW DATABASES",
 /* 187 */ "cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt",
 /* 188 */ "cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt",
 /* 189 */ "cmd ::= SHOW db_name_cond_opt VGROUPS",
 /* 190 */ "cmd ::= SHOW MNODES",
 /* 191 */ "cmd ::= SHOW MODULES",
 /* 192 */ "cmd ::= SHOW QNODES",
 /* 193 */ "cmd ::= SHOW FUNCTIONS",
 /* 194 */ "cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt",
 /* 195 */ "cmd ::= SHOW STREAMS",
 /* 196 */ "cmd ::= SHOW ACCOUNTS",
 /* 197 */ "cmd ::= SHOW APPS",
 /* 198 */ "cmd ::= SHOW CONNECTIONS",
 /* 199 */ "cmd ::= SHOW LICENCE",
 /* 200 */ "cmd ::= SHOW GRANTS",
 /* 201 */ "cmd ::= SHOW CREATE DATABASE db_name",
 /* 202 */ "cmd ::= SHOW CREATE TABLE full_table_name",
 /* 203 */ "cmd ::= SHOW CREATE STABLE full_table_name",
 /* 204 */ "cmd ::= SHOW QUERIES",
 /* 205 */ "cmd ::= SHOW SCORES",
 /* 206 */ "cmd ::= SHOW TOPICS",
 /* 207 */ "cmd ::= SHOW VARIABLES",
 /* 208 */ "cmd ::= SHOW BNODES",
 /* 209 */ "cmd ::= SHOW SNODES",
 /* 210 */ "cmd ::= SHOW CLUSTER",
 /* 211 */ "cmd ::= SHOW TRANSACTIONS",
 /* 212 */ "db_name_cond_opt ::=",
 /* 213 */ "db_name_cond_opt ::= db_name NK_DOT",
 /* 214 */ "like_pattern_opt ::=",
 /* 215 */ "like_pattern_opt ::= LIKE NK_STRING",
 /* 216 */ "table_name_cond ::= table_name",
 /* 217 */ "from_db_opt ::=",
 /* 218 */ "from_db_opt ::= FROM db_name",
 /* 219 */ "cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options",
 /* 220 */ "cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP",
 /* 221 */ "cmd ::= DROP INDEX exists_opt index_name ON table_name",
 /* 222 */ "index_options ::=",
 /* 223 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt",
 /* 224 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt",
 /* 225 */ "func_list ::= func",
 /* 226 */ "func_list ::= func_list NK_COMMA func",
 /* 227 */ "func ::= function_name NK_LP expression_list NK_RP",
 /* 228 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression",
 /* 229 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name",
 /* 230 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name",
 /* 231 */ "cmd ::= DROP TOPIC exists_opt topic_name",
 /* 232 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name",
 /* 233 */ "cmd ::= DESC full_table_name",
 /* 234 */ "cmd ::= DESCRIBE full_table_name",
 /* 235 */ "cmd ::= RESET QUERY CACHE",
 /* 236 */ "cmd ::= EXPLAIN analyze_opt explain_options query_expression",
 /* 237 */ "analyze_opt ::=",
 /* 238 */ "analyze_opt ::= ANALYZE",
 /* 239 */ "explain_options ::=",
 /* 240 */ "explain_options ::= explain_options VERBOSE NK_BOOL",
 /* 241 */ "explain_options ::= explain_options RATIO NK_FLOAT",
 /* 242 */ "cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP",
 /* 243 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt",
 /* 244 */ "cmd ::= DROP FUNCTION exists_opt function_name",
 /* 245 */ "agg_func_opt ::=",
 /* 246 */ "agg_func_opt ::= AGGREGATE",
 /* 247 */ "bufsize_opt ::=",
 /* 248 */ "bufsize_opt ::= BUFSIZE NK_INTEGER",
 /* 249 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression",
 /* 250 */ "cmd ::= DROP STREAM exists_opt stream_name",
 /* 251 */ "into_opt ::=",
 /* 252 */ "into_opt ::= INTO full_table_name",
 /* 253 */ "stream_options ::=",
 /* 254 */ "stream_options ::= stream_options TRIGGER AT_ONCE",
 /* 255 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE",
 /* 256 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal",
 /* 257 */ "stream_options ::= stream_options WATERMARK duration_literal",
 /* 258 */ "cmd ::= KILL CONNECTION NK_INTEGER",
 /* 259 */ "cmd ::= KILL QUERY NK_STRING",
 /* 260 */ "cmd ::= KILL TRANSACTION NK_INTEGER",
 /* 261 */ "cmd ::= BALANCE VGROUP",
 /* 262 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER",
 /* 263 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list",
 /* 264 */ "cmd ::= SPLIT VGROUP NK_INTEGER",
 /* 265 */ "dnode_list ::= DNODE NK_INTEGER",
 /* 266 */ "dnode_list ::= dnode_list DNODE NK_INTEGER",
 /* 267 */ "cmd ::= SYNCDB db_name REPLICA",
 /* 268 */ "cmd ::= DELETE FROM full_table_name where_clause_opt",
 /* 269 */ "cmd ::= query_expression",
 /* 270 */ "literal ::= NK_INTEGER",
 /* 271 */ "literal ::= NK_FLOAT",
 /* 272 */ "literal ::= NK_STRING",
 /* 273 */ "literal ::= NK_BOOL",
 /* 274 */ "literal ::= TIMESTAMP NK_STRING",
 /* 275 */ "literal ::= duration_literal",
 /* 276 */ "literal ::= NULL",
 /* 277 */ "literal ::= NK_QUESTION",
 /* 278 */ "duration_literal ::= NK_VARIABLE",
 /* 279 */ "signed ::= NK_INTEGER",
 /* 280 */ "signed ::= NK_PLUS NK_INTEGER",
 /* 281 */ "signed ::= NK_MINUS NK_INTEGER",
 /* 282 */ "signed ::= NK_FLOAT",
 /* 283 */ "signed ::= NK_PLUS NK_FLOAT",
 /* 284 */ "signed ::= NK_MINUS NK_FLOAT",
 /* 285 */ "signed_literal ::= signed",
 /* 286 */ "signed_literal ::= NK_STRING",
 /* 287 */ "signed_literal ::= NK_BOOL",
 /* 288 */ "signed_literal ::= TIMESTAMP NK_STRING",
 /* 289 */ "signed_literal ::= duration_literal",
 /* 290 */ "signed_literal ::= NULL",
 /* 291 */ "signed_literal ::= literal_func",
 /* 292 */ "literal_list ::= signed_literal",
 /* 293 */ "literal_list ::= literal_list NK_COMMA signed_literal",
 /* 294 */ "db_name ::= NK_ID",
 /* 295 */ "table_name ::= NK_ID",
 /* 296 */ "column_name ::= NK_ID",
 /* 297 */ "function_name ::= NK_ID",
 /* 298 */ "table_alias ::= NK_ID",
 /* 299 */ "column_alias ::= NK_ID",
 /* 300 */ "user_name ::= NK_ID",
 /* 301 */ "index_name ::= NK_ID",
 /* 302 */ "topic_name ::= NK_ID",
 /* 303 */ "stream_name ::= NK_ID",
 /* 304 */ "cgroup_name ::= NK_ID",
 /* 305 */ "expression ::= literal",
 /* 306 */ "expression ::= pseudo_column",
 /* 307 */ "expression ::= column_reference",
 /* 308 */ "expression ::= function_expression",
 /* 309 */ "expression ::= subquery",
 /* 310 */ "expression ::= NK_LP expression NK_RP",
 /* 311 */ "expression ::= NK_PLUS expression",
 /* 312 */ "expression ::= NK_MINUS expression",
 /* 313 */ "expression ::= expression NK_PLUS expression",
 /* 314 */ "expression ::= expression NK_MINUS expression",
 /* 315 */ "expression ::= expression NK_STAR expression",
 /* 316 */ "expression ::= expression NK_SLASH expression",
 /* 317 */ "expression ::= expression NK_REM expression",
 /* 318 */ "expression ::= column_reference NK_ARROW NK_STRING",
 /* 319 */ "expression_list ::= expression",
 /* 320 */ "expression_list ::= expression_list NK_COMMA expression",
 /* 321 */ "column_reference ::= column_name",
 /* 322 */ "column_reference ::= table_name NK_DOT column_name",
 /* 323 */ "pseudo_column ::= ROWTS",
 /* 324 */ "pseudo_column ::= TBNAME",
 /* 325 */ "pseudo_column ::= table_name NK_DOT TBNAME",
 /* 326 */ "pseudo_column ::= QSTARTTS",
 /* 327 */ "pseudo_column ::= QENDTS",
 /* 328 */ "pseudo_column ::= WSTARTTS",
 /* 329 */ "pseudo_column ::= WENDTS",
 /* 330 */ "pseudo_column ::= WDURATION",
 /* 331 */ "function_expression ::= function_name NK_LP expression_list NK_RP",
 /* 332 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP",
 /* 333 */ "function_expression ::= CAST NK_LP expression AS type_name NK_RP",
 /* 334 */ "function_expression ::= literal_func",
 /* 335 */ "literal_func ::= noarg_func NK_LP NK_RP",
 /* 336 */ "literal_func ::= NOW",
 /* 337 */ "noarg_func ::= NOW",
 /* 338 */ "noarg_func ::= TODAY",
 /* 339 */ "noarg_func ::= TIMEZONE",
 /* 340 */ "star_func ::= COUNT",
 /* 341 */ "star_func ::= FIRST",
 /* 342 */ "star_func ::= LAST",
 /* 343 */ "star_func ::= LAST_ROW",
 /* 344 */ "star_func_para_list ::= NK_STAR",
 /* 345 */ "star_func_para_list ::= other_para_list",
 /* 346 */ "other_para_list ::= star_func_para",
 /* 347 */ "other_para_list ::= other_para_list NK_COMMA star_func_para",
 /* 348 */ "star_func_para ::= expression",
 /* 349 */ "star_func_para ::= table_name NK_DOT NK_STAR",
 /* 350 */ "predicate ::= expression compare_op expression",
 /* 351 */ "predicate ::= expression BETWEEN expression AND expression",
 /* 352 */ "predicate ::= expression NOT BETWEEN expression AND expression",
 /* 353 */ "predicate ::= expression IS NULL",
 /* 354 */ "predicate ::= expression IS NOT NULL",
 /* 355 */ "predicate ::= expression in_op in_predicate_value",
 /* 356 */ "compare_op ::= NK_LT",
 /* 357 */ "compare_op ::= NK_GT",
 /* 358 */ "compare_op ::= NK_LE",
 /* 359 */ "compare_op ::= NK_GE",
 /* 360 */ "compare_op ::= NK_NE",
 /* 361 */ "compare_op ::= NK_EQ",
 /* 362 */ "compare_op ::= LIKE",
 /* 363 */ "compare_op ::= NOT LIKE",
 /* 364 */ "compare_op ::= MATCH",
 /* 365 */ "compare_op ::= NMATCH",
 /* 366 */ "compare_op ::= CONTAINS",
 /* 367 */ "in_op ::= IN",
 /* 368 */ "in_op ::= NOT IN",
 /* 369 */ "in_predicate_value ::= NK_LP expression_list NK_RP",
 /* 370 */ "boolean_value_expression ::= boolean_primary",
 /* 371 */ "boolean_value_expression ::= NOT boolean_primary",
 /* 372 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression",
 /* 373 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression",
 /* 374 */ "boolean_primary ::= predicate",
 /* 375 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP",
 /* 376 */ "common_expression ::= expression",
 /* 377 */ "common_expression ::= boolean_value_expression",
 /* 378 */ "from_clause ::= FROM table_reference_list",
 /* 379 */ "table_reference_list ::= table_reference",
 /* 380 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference",
 /* 381 */ "table_reference ::= table_primary",
 /* 382 */ "table_reference ::= joined_table",
 /* 383 */ "table_primary ::= table_name alias_opt",
 /* 384 */ "table_primary ::= db_name NK_DOT table_name alias_opt",
 /* 385 */ "table_primary ::= subquery alias_opt",
 /* 386 */ "table_primary ::= parenthesized_joined_table",
 /* 387 */ "alias_opt ::=",
 /* 388 */ "alias_opt ::= table_alias",
 /* 389 */ "alias_opt ::= AS table_alias",
 /* 390 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP",
 /* 391 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP",
 /* 392 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition",
 /* 393 */ "join_type ::=",
 /* 394 */ "join_type ::= INNER",
 /* 395 */ "query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt",
 /* 396 */ "set_quantifier_opt ::=",
 /* 397 */ "set_quantifier_opt ::= DISTINCT",
 /* 398 */ "set_quantifier_opt ::= ALL",
 /* 399 */ "select_list ::= NK_STAR",
 /* 400 */ "select_list ::= select_sublist",
 /* 401 */ "select_sublist ::= select_item",
 /* 402 */ "select_sublist ::= select_sublist NK_COMMA select_item",
 /* 403 */ "select_item ::= common_expression",
 /* 404 */ "select_item ::= common_expression column_alias",
 /* 405 */ "select_item ::= common_expression AS column_alias",
 /* 406 */ "select_item ::= table_name NK_DOT NK_STAR",
 /* 407 */ "where_clause_opt ::=",
 /* 408 */ "where_clause_opt ::= WHERE search_condition",
 /* 409 */ "partition_by_clause_opt ::=",
 /* 410 */ "partition_by_clause_opt ::= PARTITION BY expression_list",
 /* 411 */ "twindow_clause_opt ::=",
 /* 412 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP",
 /* 413 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP",
 /* 414 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt",
 /* 415 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt",
 /* 416 */ "sliding_opt ::=",
 /* 417 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP",
 /* 418 */ "fill_opt ::=",
 /* 419 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP",
 /* 420 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP",
 /* 421 */ "fill_mode ::= NONE",
 /* 422 */ "fill_mode ::= PREV",
 /* 423 */ "fill_mode ::= NULL",
 /* 424 */ "fill_mode ::= LINEAR",
 /* 425 */ "fill_mode ::= NEXT",
 /* 426 */ "group_by_clause_opt ::=",
 /* 427 */ "group_by_clause_opt ::= GROUP BY group_by_list",
 /* 428 */ "group_by_list ::= expression",
 /* 429 */ "group_by_list ::= group_by_list NK_COMMA expression",
 /* 430 */ "having_clause_opt ::=",
 /* 431 */ "having_clause_opt ::= HAVING search_condition",
 /* 432 */ "query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt",
 /* 433 */ "query_expression_body ::= query_primary",
 /* 434 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body",
 /* 435 */ "query_expression_body ::= query_expression_body UNION query_expression_body",
 /* 436 */ "query_primary ::= query_specification",
 /* 437 */ "query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP",
 /* 438 */ "order_by_clause_opt ::=",
 /* 439 */ "order_by_clause_opt ::= ORDER BY sort_specification_list",
 /* 440 */ "slimit_clause_opt ::=",
 /* 441 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER",
 /* 442 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER",
 /* 443 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER",
 /* 444 */ "limit_clause_opt ::=",
 /* 445 */ "limit_clause_opt ::= LIMIT NK_INTEGER",
 /* 446 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER",
 /* 447 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER",
 /* 448 */ "subquery ::= NK_LP query_expression NK_RP",
 /* 449 */ "search_condition ::= common_expression",
 /* 450 */ "sort_specification_list ::= sort_specification",
 /* 451 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification",
 /* 452 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt",
 /* 453 */ "ordering_specification_opt ::=",
 /* 454 */ "ordering_specification_opt ::= ASC",
 /* 455 */ "ordering_specification_opt ::= DESC",
 /* 456 */ "null_ordering_opt ::=",
 /* 457 */ "null_ordering_opt ::= NULLS FIRST",
 /* 458 */ "null_ordering_opt ::= NULLS LAST",
1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992
};
#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 已提交
1993
    pNew = malloc(newSize*sizeof(pNew[0]));
1994 1995
    if( pNew ) pNew[0] = p->yystk0;
  }else{
X
Xiaoyu Wang 已提交
1996
    pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013
  }
  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 已提交
2014
** second argument to ParseAlloc() below.  This can be changed by
2015 2016 2017 2018 2019 2020 2021 2022 2023
** 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 已提交
2024
void ParseInit(void *yypRawParser ParseCTX_PDECL){
2025
  yyParser *yypParser = (yyParser*)yypRawParser;
X
Xiaoyu Wang 已提交
2026
  ParseCTX_STORE
2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049
#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 已提交
2050
#ifndef Parse_ENGINEALWAYSONSTACK
2051 2052 2053 2054 2055 2056 2057 2058 2059 2060
/* 
** 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 已提交
2061
** to Parse and ParseFree.
2062
*/
X
Xiaoyu Wang 已提交
2063
void *ParseAlloc(void *(*mallocProc)(YYMALLOCARGTYPE) ParseCTX_PDECL){
2064 2065 2066
  yyParser *yypParser;
  yypParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
  if( yypParser ){
X
Xiaoyu Wang 已提交
2067 2068
    ParseCTX_STORE
    ParseInit(yypParser ParseCTX_PARAM);
2069 2070 2071
  }
  return (void*)yypParser;
}
X
Xiaoyu Wang 已提交
2072
#endif /* Parse_ENGINEALWAYSONSTACK */
2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086


/* 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 已提交
2087 2088
  ParseARG_FETCH
  ParseCTX_FETCH
2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101
  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 */
2102 2103
    case 239: /* cmd */
    case 242: /* literal */
2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159
    case 252: /* db_options */
    case 254: /* alter_db_options */
    case 259: /* retention */
    case 260: /* full_table_name */
    case 263: /* table_options */
    case 267: /* alter_table_clause */
    case 268: /* alter_table_options */
    case 271: /* signed_literal */
    case 272: /* create_subtable_clause */
    case 275: /* drop_table_clause */
    case 278: /* column_def */
    case 282: /* duration_literal */
    case 283: /* rollup_func_name */
    case 285: /* col_name */
    case 286: /* db_name_cond_opt */
    case 287: /* like_pattern_opt */
    case 288: /* table_name_cond */
    case 289: /* from_db_opt */
    case 291: /* index_options */
    case 293: /* sliding_opt */
    case 294: /* func */
    case 297: /* query_expression */
    case 300: /* explain_options */
    case 304: /* stream_options */
    case 305: /* into_opt */
    case 307: /* where_clause_opt */
    case 308: /* signed */
    case 309: /* literal_func */
    case 312: /* expression */
    case 313: /* pseudo_column */
    case 314: /* column_reference */
    case 315: /* function_expression */
    case 316: /* subquery */
    case 321: /* star_func_para */
    case 322: /* predicate */
    case 325: /* in_predicate_value */
    case 326: /* boolean_value_expression */
    case 327: /* boolean_primary */
    case 328: /* common_expression */
    case 329: /* from_clause */
    case 330: /* table_reference_list */
    case 331: /* table_reference */
    case 332: /* table_primary */
    case 333: /* joined_table */
    case 335: /* parenthesized_joined_table */
    case 337: /* search_condition */
    case 338: /* query_specification */
    case 342: /* twindow_clause_opt */
    case 344: /* having_clause_opt */
    case 346: /* select_item */
    case 347: /* fill_opt */
    case 350: /* query_expression_body */
    case 352: /* slimit_clause_opt */
    case 353: /* limit_clause_opt */
    case 354: /* query_primary */
    case 356: /* sort_specification */
2160
{
2161
 nodesDestroyNode((yypminor->yy674)); 
2162 2163
}
      break;
2164 2165 2166
    case 240: /* account_options */
    case 241: /* alter_account_options */
    case 243: /* alter_account_option */
2167
    case 302: /* bufsize_opt */
2168
{
2169
 
2170 2171
}
      break;
2172 2173 2174 2175
    case 244: /* user_name */
    case 246: /* priv_level */
    case 249: /* db_name */
    case 250: /* dnode_endpoint */
2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187
    case 269: /* column_name */
    case 277: /* table_name */
    case 284: /* function_name */
    case 290: /* index_name */
    case 296: /* topic_name */
    case 298: /* cgroup_name */
    case 303: /* stream_name */
    case 310: /* table_alias */
    case 311: /* column_alias */
    case 317: /* star_func */
    case 319: /* noarg_func */
    case 334: /* alias_opt */
2188
{
2189
 
2190 2191
}
      break;
2192 2193 2194
    case 245: /* privileges */
    case 247: /* priv_type_list */
    case 248: /* priv_type */
2195
{
2196
 
2197 2198
}
      break;
2199 2200 2201 2202 2203
    case 251: /* not_exists_opt */
    case 253: /* exists_opt */
    case 299: /* analyze_opt */
    case 301: /* agg_func_opt */
    case 339: /* set_quantifier_opt */
2204
{
2205 2206 2207
 
}
      break;
2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232
    case 255: /* integer_list */
    case 256: /* variable_list */
    case 257: /* retention_list */
    case 261: /* column_def_list */
    case 262: /* tags_def_opt */
    case 264: /* multi_create_clause */
    case 265: /* tags_def */
    case 266: /* multi_drop_clause */
    case 273: /* specific_tags_opt */
    case 274: /* literal_list */
    case 276: /* col_name_list */
    case 279: /* duration_list */
    case 280: /* rollup_func_list */
    case 292: /* func_list */
    case 295: /* expression_list */
    case 306: /* dnode_list */
    case 318: /* star_func_para_list */
    case 320: /* other_para_list */
    case 340: /* select_list */
    case 341: /* partition_by_clause_opt */
    case 343: /* group_by_clause_opt */
    case 345: /* select_sublist */
    case 349: /* group_by_list */
    case 351: /* order_by_clause_opt */
    case 355: /* sort_specification_list */
2233
{
2234
 nodesDestroyList((yypminor->yy530)); 
2235 2236
}
      break;
2237 2238
    case 258: /* alter_db_option */
    case 281: /* alter_table_option */
2239
{
X
Xiaoyu Wang 已提交
2240
 
2241 2242
}
      break;
2243
    case 270: /* type_name */
2244
{
2245
 
2246 2247
}
      break;
2248 2249
    case 323: /* compare_op */
    case 324: /* in_op */
2250
{
2251
 
2252 2253
}
      break;
2254
    case 336: /* join_type */
2255
{
2256
 
2257 2258
}
      break;
2259
    case 348: /* fill_mode */
2260
{
2261
 
2262 2263
}
      break;
2264
    case 357: /* ordering_specification_opt */
2265
{
2266
 
2267 2268
}
      break;
2269
    case 358: /* null_ordering_opt */
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
}
      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 已提交
2303
void ParseFinalize(void *p){
2304 2305 2306
  yyParser *pParser = (yyParser*)p;
  while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser);
#if YYSTACKDEPTH<=0
X
Xiaoyu Wang 已提交
2307
  if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack);
2308 2309 2310
#endif
}

X
Xiaoyu Wang 已提交
2311
#ifndef Parse_ENGINEALWAYSONSTACK
2312 2313 2314 2315 2316 2317 2318 2319
/* 
** 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 已提交
2320
void ParseFree(
2321 2322 2323 2324 2325 2326
  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 已提交
2327
  ParseFinalize(p);
2328 2329
  (*freeProc)(p);
}
X
Xiaoyu Wang 已提交
2330
#endif /* Parse_ENGINEALWAYSONSTACK */
2331 2332 2333 2334 2335

/*
** Return the peak depth of the stack for a parser.
*/
#ifdef YYTRACKMAXSTACKDEPTH
X
Xiaoyu Wang 已提交
2336
int ParseStackPeak(void *p){
2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359
  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 已提交
2360
int ParseCoverage(FILE *out){
2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396
  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 已提交
2397
    /* assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD ); */
2398 2399 2400
    assert( iLookAhead!=YYNOCODE );
    assert( iLookAhead < YYNTOKEN );
    i += iLookAhead;
X
Xiaoyu Wang 已提交
2401
    if( i>=YY_NLOOKAHEAD || yy_lookahead[i]!=iLookAhead ){
2402 2403
#ifdef YYFALLBACK
      YYCODETYPE iFallback;            /* Fallback token */
X
Xiaoyu Wang 已提交
2404 2405
      if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
             && (iFallback = yyFallback[iLookAhead])!=0 ){
2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419
#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 已提交
2420 2421 2422 2423 2424 2425 2426 2427 2428 2429
        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
        ){
2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481
#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 已提交
2482 2483
   ParseARG_FETCH
   ParseCTX_FETCH
2484 2485 2486 2487 2488 2489 2490 2491 2492 2493
#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 已提交
2494 2495
   ParseARG_STORE /* Suppress warning about unused %extra_argument var */
   ParseCTX_STORE
2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525
}

/*
** 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 已提交
2526
  ParseTOKENTYPE yyMinor        /* The minor token to shift in */
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 2559 2560
){
  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 已提交
2561 2562 2563 2564 2565 2566 2567
/* 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[] = {
2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 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 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 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 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026
  {  239,   -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */
  {  239,   -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */
  {  240,    0 }, /* (2) account_options ::= */
  {  240,   -3 }, /* (3) account_options ::= account_options PPS literal */
  {  240,   -3 }, /* (4) account_options ::= account_options TSERIES literal */
  {  240,   -3 }, /* (5) account_options ::= account_options STORAGE literal */
  {  240,   -3 }, /* (6) account_options ::= account_options STREAMS literal */
  {  240,   -3 }, /* (7) account_options ::= account_options QTIME literal */
  {  240,   -3 }, /* (8) account_options ::= account_options DBS literal */
  {  240,   -3 }, /* (9) account_options ::= account_options USERS literal */
  {  240,   -3 }, /* (10) account_options ::= account_options CONNS literal */
  {  240,   -3 }, /* (11) account_options ::= account_options STATE literal */
  {  241,   -1 }, /* (12) alter_account_options ::= alter_account_option */
  {  241,   -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */
  {  243,   -2 }, /* (14) alter_account_option ::= PASS literal */
  {  243,   -2 }, /* (15) alter_account_option ::= PPS literal */
  {  243,   -2 }, /* (16) alter_account_option ::= TSERIES literal */
  {  243,   -2 }, /* (17) alter_account_option ::= STORAGE literal */
  {  243,   -2 }, /* (18) alter_account_option ::= STREAMS literal */
  {  243,   -2 }, /* (19) alter_account_option ::= QTIME literal */
  {  243,   -2 }, /* (20) alter_account_option ::= DBS literal */
  {  243,   -2 }, /* (21) alter_account_option ::= USERS literal */
  {  243,   -2 }, /* (22) alter_account_option ::= CONNS literal */
  {  243,   -2 }, /* (23) alter_account_option ::= STATE literal */
  {  239,   -5 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING */
  {  239,   -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */
  {  239,   -5 }, /* (26) cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */
  {  239,   -3 }, /* (27) cmd ::= DROP USER user_name */
  {  239,   -6 }, /* (28) cmd ::= GRANT privileges ON priv_level TO user_name */
  {  239,   -6 }, /* (29) cmd ::= REVOKE privileges ON priv_level FROM user_name */
  {  245,   -1 }, /* (30) privileges ::= ALL */
  {  245,   -1 }, /* (31) privileges ::= priv_type_list */
  {  247,   -1 }, /* (32) priv_type_list ::= priv_type */
  {  247,   -3 }, /* (33) priv_type_list ::= priv_type_list NK_COMMA priv_type */
  {  248,   -1 }, /* (34) priv_type ::= READ */
  {  248,   -1 }, /* (35) priv_type ::= WRITE */
  {  246,   -3 }, /* (36) priv_level ::= NK_STAR NK_DOT NK_STAR */
  {  246,   -3 }, /* (37) priv_level ::= db_name NK_DOT NK_STAR */
  {  239,   -3 }, /* (38) cmd ::= CREATE DNODE dnode_endpoint */
  {  239,   -5 }, /* (39) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */
  {  239,   -3 }, /* (40) cmd ::= DROP DNODE NK_INTEGER */
  {  239,   -3 }, /* (41) cmd ::= DROP DNODE dnode_endpoint */
  {  239,   -4 }, /* (42) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */
  {  239,   -5 }, /* (43) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */
  {  239,   -4 }, /* (44) cmd ::= ALTER ALL DNODES NK_STRING */
  {  239,   -5 }, /* (45) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */
  {  250,   -1 }, /* (46) dnode_endpoint ::= NK_STRING */
  {  250,   -1 }, /* (47) dnode_endpoint ::= NK_ID */
  {  250,   -1 }, /* (48) dnode_endpoint ::= NK_IPTOKEN */
  {  239,   -3 }, /* (49) cmd ::= ALTER LOCAL NK_STRING */
  {  239,   -4 }, /* (50) cmd ::= ALTER LOCAL NK_STRING NK_STRING */
  {  239,   -5 }, /* (51) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */
  {  239,   -5 }, /* (52) cmd ::= DROP QNODE ON DNODE NK_INTEGER */
  {  239,   -5 }, /* (53) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */
  {  239,   -5 }, /* (54) cmd ::= DROP BNODE ON DNODE NK_INTEGER */
  {  239,   -5 }, /* (55) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */
  {  239,   -5 }, /* (56) cmd ::= DROP SNODE ON DNODE NK_INTEGER */
  {  239,   -5 }, /* (57) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */
  {  239,   -5 }, /* (58) cmd ::= DROP MNODE ON DNODE NK_INTEGER */
  {  239,   -5 }, /* (59) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
  {  239,   -4 }, /* (60) cmd ::= DROP DATABASE exists_opt db_name */
  {  239,   -2 }, /* (61) cmd ::= USE db_name */
  {  239,   -4 }, /* (62) cmd ::= ALTER DATABASE db_name alter_db_options */
  {  251,   -3 }, /* (63) not_exists_opt ::= IF NOT EXISTS */
  {  251,    0 }, /* (64) not_exists_opt ::= */
  {  253,   -2 }, /* (65) exists_opt ::= IF EXISTS */
  {  253,    0 }, /* (66) exists_opt ::= */
  {  252,    0 }, /* (67) db_options ::= */
  {  252,   -3 }, /* (68) db_options ::= db_options BUFFER NK_INTEGER */
  {  252,   -3 }, /* (69) db_options ::= db_options CACHELAST NK_INTEGER */
  {  252,   -3 }, /* (70) db_options ::= db_options COMP NK_INTEGER */
  {  252,   -3 }, /* (71) db_options ::= db_options DURATION NK_INTEGER */
  {  252,   -3 }, /* (72) db_options ::= db_options DURATION NK_VARIABLE */
  {  252,   -3 }, /* (73) db_options ::= db_options FSYNC NK_INTEGER */
  {  252,   -3 }, /* (74) db_options ::= db_options MAXROWS NK_INTEGER */
  {  252,   -3 }, /* (75) db_options ::= db_options MINROWS NK_INTEGER */
  {  252,   -3 }, /* (76) db_options ::= db_options KEEP integer_list */
  {  252,   -3 }, /* (77) db_options ::= db_options KEEP variable_list */
  {  252,   -3 }, /* (78) db_options ::= db_options PAGES NK_INTEGER */
  {  252,   -3 }, /* (79) db_options ::= db_options PAGESIZE NK_INTEGER */
  {  252,   -3 }, /* (80) db_options ::= db_options PRECISION NK_STRING */
  {  252,   -3 }, /* (81) db_options ::= db_options REPLICA NK_INTEGER */
  {  252,   -3 }, /* (82) db_options ::= db_options STRICT NK_INTEGER */
  {  252,   -3 }, /* (83) db_options ::= db_options WAL NK_INTEGER */
  {  252,   -3 }, /* (84) db_options ::= db_options VGROUPS NK_INTEGER */
  {  252,   -3 }, /* (85) db_options ::= db_options SINGLE_STABLE NK_INTEGER */
  {  252,   -3 }, /* (86) db_options ::= db_options RETENTIONS retention_list */
  {  252,   -3 }, /* (87) db_options ::= db_options SCHEMALESS NK_INTEGER */
  {  254,   -1 }, /* (88) alter_db_options ::= alter_db_option */
  {  254,   -2 }, /* (89) alter_db_options ::= alter_db_options alter_db_option */
  {  258,   -2 }, /* (90) alter_db_option ::= BUFFER NK_INTEGER */
  {  258,   -2 }, /* (91) alter_db_option ::= CACHELAST NK_INTEGER */
  {  258,   -2 }, /* (92) alter_db_option ::= FSYNC NK_INTEGER */
  {  258,   -2 }, /* (93) alter_db_option ::= KEEP integer_list */
  {  258,   -2 }, /* (94) alter_db_option ::= KEEP variable_list */
  {  258,   -2 }, /* (95) alter_db_option ::= PAGES NK_INTEGER */
  {  258,   -2 }, /* (96) alter_db_option ::= REPLICA NK_INTEGER */
  {  258,   -2 }, /* (97) alter_db_option ::= STRICT NK_INTEGER */
  {  258,   -2 }, /* (98) alter_db_option ::= WAL NK_INTEGER */
  {  255,   -1 }, /* (99) integer_list ::= NK_INTEGER */
  {  255,   -3 }, /* (100) integer_list ::= integer_list NK_COMMA NK_INTEGER */
  {  256,   -1 }, /* (101) variable_list ::= NK_VARIABLE */
  {  256,   -3 }, /* (102) variable_list ::= variable_list NK_COMMA NK_VARIABLE */
  {  257,   -1 }, /* (103) retention_list ::= retention */
  {  257,   -3 }, /* (104) retention_list ::= retention_list NK_COMMA retention */
  {  259,   -3 }, /* (105) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */
  {  239,   -9 }, /* (106) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */
  {  239,   -3 }, /* (107) cmd ::= CREATE TABLE multi_create_clause */
  {  239,   -9 }, /* (108) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */
  {  239,   -3 }, /* (109) cmd ::= DROP TABLE multi_drop_clause */
  {  239,   -4 }, /* (110) cmd ::= DROP STABLE exists_opt full_table_name */
  {  239,   -3 }, /* (111) cmd ::= ALTER TABLE alter_table_clause */
  {  239,   -3 }, /* (112) cmd ::= ALTER STABLE alter_table_clause */
  {  267,   -2 }, /* (113) alter_table_clause ::= full_table_name alter_table_options */
  {  267,   -5 }, /* (114) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */
  {  267,   -4 }, /* (115) alter_table_clause ::= full_table_name DROP COLUMN column_name */
  {  267,   -5 }, /* (116) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */
  {  267,   -5 }, /* (117) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */
  {  267,   -5 }, /* (118) alter_table_clause ::= full_table_name ADD TAG column_name type_name */
  {  267,   -4 }, /* (119) alter_table_clause ::= full_table_name DROP TAG column_name */
  {  267,   -5 }, /* (120) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */
  {  267,   -5 }, /* (121) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */
  {  267,   -6 }, /* (122) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */
  {  264,   -1 }, /* (123) multi_create_clause ::= create_subtable_clause */
  {  264,   -2 }, /* (124) multi_create_clause ::= multi_create_clause create_subtable_clause */
  {  272,  -10 }, /* (125) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP table_options */
  {  266,   -1 }, /* (126) multi_drop_clause ::= drop_table_clause */
  {  266,   -2 }, /* (127) multi_drop_clause ::= multi_drop_clause drop_table_clause */
  {  275,   -2 }, /* (128) drop_table_clause ::= exists_opt full_table_name */
  {  273,    0 }, /* (129) specific_tags_opt ::= */
  {  273,   -3 }, /* (130) specific_tags_opt ::= NK_LP col_name_list NK_RP */
  {  260,   -1 }, /* (131) full_table_name ::= table_name */
  {  260,   -3 }, /* (132) full_table_name ::= db_name NK_DOT table_name */
  {  261,   -1 }, /* (133) column_def_list ::= column_def */
  {  261,   -3 }, /* (134) column_def_list ::= column_def_list NK_COMMA column_def */
  {  278,   -2 }, /* (135) column_def ::= column_name type_name */
  {  278,   -4 }, /* (136) column_def ::= column_name type_name COMMENT NK_STRING */
  {  270,   -1 }, /* (137) type_name ::= BOOL */
  {  270,   -1 }, /* (138) type_name ::= TINYINT */
  {  270,   -1 }, /* (139) type_name ::= SMALLINT */
  {  270,   -1 }, /* (140) type_name ::= INT */
  {  270,   -1 }, /* (141) type_name ::= INTEGER */
  {  270,   -1 }, /* (142) type_name ::= BIGINT */
  {  270,   -1 }, /* (143) type_name ::= FLOAT */
  {  270,   -1 }, /* (144) type_name ::= DOUBLE */
  {  270,   -4 }, /* (145) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
  {  270,   -1 }, /* (146) type_name ::= TIMESTAMP */
  {  270,   -4 }, /* (147) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
  {  270,   -2 }, /* (148) type_name ::= TINYINT UNSIGNED */
  {  270,   -2 }, /* (149) type_name ::= SMALLINT UNSIGNED */
  {  270,   -2 }, /* (150) type_name ::= INT UNSIGNED */
  {  270,   -2 }, /* (151) type_name ::= BIGINT UNSIGNED */
  {  270,   -1 }, /* (152) type_name ::= JSON */
  {  270,   -4 }, /* (153) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
  {  270,   -1 }, /* (154) type_name ::= MEDIUMBLOB */
  {  270,   -1 }, /* (155) type_name ::= BLOB */
  {  270,   -4 }, /* (156) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
  {  270,   -1 }, /* (157) type_name ::= DECIMAL */
  {  270,   -4 }, /* (158) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
  {  270,   -6 }, /* (159) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
  {  262,    0 }, /* (160) tags_def_opt ::= */
  {  262,   -1 }, /* (161) tags_def_opt ::= tags_def */
  {  265,   -4 }, /* (162) tags_def ::= TAGS NK_LP column_def_list NK_RP */
  {  263,    0 }, /* (163) table_options ::= */
  {  263,   -3 }, /* (164) table_options ::= table_options COMMENT NK_STRING */
  {  263,   -3 }, /* (165) table_options ::= table_options MAX_DELAY duration_list */
  {  263,   -3 }, /* (166) table_options ::= table_options WATERMARK duration_list */
  {  263,   -5 }, /* (167) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */
  {  263,   -3 }, /* (168) table_options ::= table_options TTL NK_INTEGER */
  {  263,   -5 }, /* (169) table_options ::= table_options SMA NK_LP col_name_list NK_RP */
  {  268,   -1 }, /* (170) alter_table_options ::= alter_table_option */
  {  268,   -2 }, /* (171) alter_table_options ::= alter_table_options alter_table_option */
  {  281,   -2 }, /* (172) alter_table_option ::= COMMENT NK_STRING */
  {  281,   -2 }, /* (173) alter_table_option ::= TTL NK_INTEGER */
  {  279,   -1 }, /* (174) duration_list ::= duration_literal */
  {  279,   -3 }, /* (175) duration_list ::= duration_list NK_COMMA duration_literal */
  {  280,   -1 }, /* (176) rollup_func_list ::= rollup_func_name */
  {  280,   -3 }, /* (177) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */
  {  283,   -1 }, /* (178) rollup_func_name ::= function_name */
  {  283,   -1 }, /* (179) rollup_func_name ::= FIRST */
  {  283,   -1 }, /* (180) rollup_func_name ::= LAST */
  {  276,   -1 }, /* (181) col_name_list ::= col_name */
  {  276,   -3 }, /* (182) col_name_list ::= col_name_list NK_COMMA col_name */
  {  285,   -1 }, /* (183) col_name ::= column_name */
  {  239,   -2 }, /* (184) cmd ::= SHOW DNODES */
  {  239,   -2 }, /* (185) cmd ::= SHOW USERS */
  {  239,   -2 }, /* (186) cmd ::= SHOW DATABASES */
  {  239,   -4 }, /* (187) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */
  {  239,   -4 }, /* (188) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */
  {  239,   -3 }, /* (189) cmd ::= SHOW db_name_cond_opt VGROUPS */
  {  239,   -2 }, /* (190) cmd ::= SHOW MNODES */
  {  239,   -2 }, /* (191) cmd ::= SHOW MODULES */
  {  239,   -2 }, /* (192) cmd ::= SHOW QNODES */
  {  239,   -2 }, /* (193) cmd ::= SHOW FUNCTIONS */
  {  239,   -5 }, /* (194) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */
  {  239,   -2 }, /* (195) cmd ::= SHOW STREAMS */
  {  239,   -2 }, /* (196) cmd ::= SHOW ACCOUNTS */
  {  239,   -2 }, /* (197) cmd ::= SHOW APPS */
  {  239,   -2 }, /* (198) cmd ::= SHOW CONNECTIONS */
  {  239,   -2 }, /* (199) cmd ::= SHOW LICENCE */
  {  239,   -2 }, /* (200) cmd ::= SHOW GRANTS */
  {  239,   -4 }, /* (201) cmd ::= SHOW CREATE DATABASE db_name */
  {  239,   -4 }, /* (202) cmd ::= SHOW CREATE TABLE full_table_name */
  {  239,   -4 }, /* (203) cmd ::= SHOW CREATE STABLE full_table_name */
  {  239,   -2 }, /* (204) cmd ::= SHOW QUERIES */
  {  239,   -2 }, /* (205) cmd ::= SHOW SCORES */
  {  239,   -2 }, /* (206) cmd ::= SHOW TOPICS */
  {  239,   -2 }, /* (207) cmd ::= SHOW VARIABLES */
  {  239,   -2 }, /* (208) cmd ::= SHOW BNODES */
  {  239,   -2 }, /* (209) cmd ::= SHOW SNODES */
  {  239,   -2 }, /* (210) cmd ::= SHOW CLUSTER */
  {  239,   -2 }, /* (211) cmd ::= SHOW TRANSACTIONS */
  {  286,    0 }, /* (212) db_name_cond_opt ::= */
  {  286,   -2 }, /* (213) db_name_cond_opt ::= db_name NK_DOT */
  {  287,    0 }, /* (214) like_pattern_opt ::= */
  {  287,   -2 }, /* (215) like_pattern_opt ::= LIKE NK_STRING */
  {  288,   -1 }, /* (216) table_name_cond ::= table_name */
  {  289,    0 }, /* (217) from_db_opt ::= */
  {  289,   -2 }, /* (218) from_db_opt ::= FROM db_name */
  {  239,   -8 }, /* (219) cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */
  {  239,  -10 }, /* (220) cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */
  {  239,   -6 }, /* (221) cmd ::= DROP INDEX exists_opt index_name ON table_name */
  {  291,    0 }, /* (222) index_options ::= */
  {  291,   -9 }, /* (223) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */
  {  291,  -11 }, /* (224) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */
  {  292,   -1 }, /* (225) func_list ::= func */
  {  292,   -3 }, /* (226) func_list ::= func_list NK_COMMA func */
  {  294,   -4 }, /* (227) func ::= function_name NK_LP expression_list NK_RP */
  {  239,   -6 }, /* (228) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */
  {  239,   -7 }, /* (229) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */
  {  239,   -7 }, /* (230) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */
  {  239,   -4 }, /* (231) cmd ::= DROP TOPIC exists_opt topic_name */
  {  239,   -7 }, /* (232) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */
  {  239,   -2 }, /* (233) cmd ::= DESC full_table_name */
  {  239,   -2 }, /* (234) cmd ::= DESCRIBE full_table_name */
  {  239,   -3 }, /* (235) cmd ::= RESET QUERY CACHE */
  {  239,   -4 }, /* (236) cmd ::= EXPLAIN analyze_opt explain_options query_expression */
  {  299,    0 }, /* (237) analyze_opt ::= */
  {  299,   -1 }, /* (238) analyze_opt ::= ANALYZE */
  {  300,    0 }, /* (239) explain_options ::= */
  {  300,   -3 }, /* (240) explain_options ::= explain_options VERBOSE NK_BOOL */
  {  300,   -3 }, /* (241) explain_options ::= explain_options RATIO NK_FLOAT */
  {  239,   -6 }, /* (242) cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */
  {  239,  -10 }, /* (243) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */
  {  239,   -4 }, /* (244) cmd ::= DROP FUNCTION exists_opt function_name */
  {  301,    0 }, /* (245) agg_func_opt ::= */
  {  301,   -1 }, /* (246) agg_func_opt ::= AGGREGATE */
  {  302,    0 }, /* (247) bufsize_opt ::= */
  {  302,   -2 }, /* (248) bufsize_opt ::= BUFSIZE NK_INTEGER */
  {  239,   -8 }, /* (249) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */
  {  239,   -4 }, /* (250) cmd ::= DROP STREAM exists_opt stream_name */
  {  305,    0 }, /* (251) into_opt ::= */
  {  305,   -2 }, /* (252) into_opt ::= INTO full_table_name */
  {  304,    0 }, /* (253) stream_options ::= */
  {  304,   -3 }, /* (254) stream_options ::= stream_options TRIGGER AT_ONCE */
  {  304,   -3 }, /* (255) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */
  {  304,   -4 }, /* (256) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
  {  304,   -3 }, /* (257) stream_options ::= stream_options WATERMARK duration_literal */
  {  239,   -3 }, /* (258) cmd ::= KILL CONNECTION NK_INTEGER */
  {  239,   -3 }, /* (259) cmd ::= KILL QUERY NK_STRING */
  {  239,   -3 }, /* (260) cmd ::= KILL TRANSACTION NK_INTEGER */
  {  239,   -2 }, /* (261) cmd ::= BALANCE VGROUP */
  {  239,   -4 }, /* (262) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */
  {  239,   -4 }, /* (263) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */
  {  239,   -3 }, /* (264) cmd ::= SPLIT VGROUP NK_INTEGER */
  {  306,   -2 }, /* (265) dnode_list ::= DNODE NK_INTEGER */
  {  306,   -3 }, /* (266) dnode_list ::= dnode_list DNODE NK_INTEGER */
  {  239,   -3 }, /* (267) cmd ::= SYNCDB db_name REPLICA */
  {  239,   -4 }, /* (268) cmd ::= DELETE FROM full_table_name where_clause_opt */
  {  239,   -1 }, /* (269) cmd ::= query_expression */
  {  242,   -1 }, /* (270) literal ::= NK_INTEGER */
  {  242,   -1 }, /* (271) literal ::= NK_FLOAT */
  {  242,   -1 }, /* (272) literal ::= NK_STRING */
  {  242,   -1 }, /* (273) literal ::= NK_BOOL */
  {  242,   -2 }, /* (274) literal ::= TIMESTAMP NK_STRING */
  {  242,   -1 }, /* (275) literal ::= duration_literal */
  {  242,   -1 }, /* (276) literal ::= NULL */
  {  242,   -1 }, /* (277) literal ::= NK_QUESTION */
  {  282,   -1 }, /* (278) duration_literal ::= NK_VARIABLE */
  {  308,   -1 }, /* (279) signed ::= NK_INTEGER */
  {  308,   -2 }, /* (280) signed ::= NK_PLUS NK_INTEGER */
  {  308,   -2 }, /* (281) signed ::= NK_MINUS NK_INTEGER */
  {  308,   -1 }, /* (282) signed ::= NK_FLOAT */
  {  308,   -2 }, /* (283) signed ::= NK_PLUS NK_FLOAT */
  {  308,   -2 }, /* (284) signed ::= NK_MINUS NK_FLOAT */
  {  271,   -1 }, /* (285) signed_literal ::= signed */
  {  271,   -1 }, /* (286) signed_literal ::= NK_STRING */
  {  271,   -1 }, /* (287) signed_literal ::= NK_BOOL */
  {  271,   -2 }, /* (288) signed_literal ::= TIMESTAMP NK_STRING */
  {  271,   -1 }, /* (289) signed_literal ::= duration_literal */
  {  271,   -1 }, /* (290) signed_literal ::= NULL */
  {  271,   -1 }, /* (291) signed_literal ::= literal_func */
  {  274,   -1 }, /* (292) literal_list ::= signed_literal */
  {  274,   -3 }, /* (293) literal_list ::= literal_list NK_COMMA signed_literal */
  {  249,   -1 }, /* (294) db_name ::= NK_ID */
  {  277,   -1 }, /* (295) table_name ::= NK_ID */
  {  269,   -1 }, /* (296) column_name ::= NK_ID */
  {  284,   -1 }, /* (297) function_name ::= NK_ID */
  {  310,   -1 }, /* (298) table_alias ::= NK_ID */
  {  311,   -1 }, /* (299) column_alias ::= NK_ID */
  {  244,   -1 }, /* (300) user_name ::= NK_ID */
  {  290,   -1 }, /* (301) index_name ::= NK_ID */
  {  296,   -1 }, /* (302) topic_name ::= NK_ID */
  {  303,   -1 }, /* (303) stream_name ::= NK_ID */
  {  298,   -1 }, /* (304) cgroup_name ::= NK_ID */
  {  312,   -1 }, /* (305) expression ::= literal */
  {  312,   -1 }, /* (306) expression ::= pseudo_column */
  {  312,   -1 }, /* (307) expression ::= column_reference */
  {  312,   -1 }, /* (308) expression ::= function_expression */
  {  312,   -1 }, /* (309) expression ::= subquery */
  {  312,   -3 }, /* (310) expression ::= NK_LP expression NK_RP */
  {  312,   -2 }, /* (311) expression ::= NK_PLUS expression */
  {  312,   -2 }, /* (312) expression ::= NK_MINUS expression */
  {  312,   -3 }, /* (313) expression ::= expression NK_PLUS expression */
  {  312,   -3 }, /* (314) expression ::= expression NK_MINUS expression */
  {  312,   -3 }, /* (315) expression ::= expression NK_STAR expression */
  {  312,   -3 }, /* (316) expression ::= expression NK_SLASH expression */
  {  312,   -3 }, /* (317) expression ::= expression NK_REM expression */
  {  312,   -3 }, /* (318) expression ::= column_reference NK_ARROW NK_STRING */
  {  295,   -1 }, /* (319) expression_list ::= expression */
  {  295,   -3 }, /* (320) expression_list ::= expression_list NK_COMMA expression */
  {  314,   -1 }, /* (321) column_reference ::= column_name */
  {  314,   -3 }, /* (322) column_reference ::= table_name NK_DOT column_name */
  {  313,   -1 }, /* (323) pseudo_column ::= ROWTS */
  {  313,   -1 }, /* (324) pseudo_column ::= TBNAME */
  {  313,   -3 }, /* (325) pseudo_column ::= table_name NK_DOT TBNAME */
  {  313,   -1 }, /* (326) pseudo_column ::= QSTARTTS */
  {  313,   -1 }, /* (327) pseudo_column ::= QENDTS */
  {  313,   -1 }, /* (328) pseudo_column ::= WSTARTTS */
  {  313,   -1 }, /* (329) pseudo_column ::= WENDTS */
  {  313,   -1 }, /* (330) pseudo_column ::= WDURATION */
  {  315,   -4 }, /* (331) function_expression ::= function_name NK_LP expression_list NK_RP */
  {  315,   -4 }, /* (332) function_expression ::= star_func NK_LP star_func_para_list NK_RP */
  {  315,   -6 }, /* (333) function_expression ::= CAST NK_LP expression AS type_name NK_RP */
  {  315,   -1 }, /* (334) function_expression ::= literal_func */
  {  309,   -3 }, /* (335) literal_func ::= noarg_func NK_LP NK_RP */
  {  309,   -1 }, /* (336) literal_func ::= NOW */
  {  319,   -1 }, /* (337) noarg_func ::= NOW */
  {  319,   -1 }, /* (338) noarg_func ::= TODAY */
  {  319,   -1 }, /* (339) noarg_func ::= TIMEZONE */
  {  317,   -1 }, /* (340) star_func ::= COUNT */
  {  317,   -1 }, /* (341) star_func ::= FIRST */
  {  317,   -1 }, /* (342) star_func ::= LAST */
  {  317,   -1 }, /* (343) star_func ::= LAST_ROW */
  {  318,   -1 }, /* (344) star_func_para_list ::= NK_STAR */
  {  318,   -1 }, /* (345) star_func_para_list ::= other_para_list */
  {  320,   -1 }, /* (346) other_para_list ::= star_func_para */
  {  320,   -3 }, /* (347) other_para_list ::= other_para_list NK_COMMA star_func_para */
  {  321,   -1 }, /* (348) star_func_para ::= expression */
  {  321,   -3 }, /* (349) star_func_para ::= table_name NK_DOT NK_STAR */
  {  322,   -3 }, /* (350) predicate ::= expression compare_op expression */
  {  322,   -5 }, /* (351) predicate ::= expression BETWEEN expression AND expression */
  {  322,   -6 }, /* (352) predicate ::= expression NOT BETWEEN expression AND expression */
  {  322,   -3 }, /* (353) predicate ::= expression IS NULL */
  {  322,   -4 }, /* (354) predicate ::= expression IS NOT NULL */
  {  322,   -3 }, /* (355) predicate ::= expression in_op in_predicate_value */
  {  323,   -1 }, /* (356) compare_op ::= NK_LT */
  {  323,   -1 }, /* (357) compare_op ::= NK_GT */
  {  323,   -1 }, /* (358) compare_op ::= NK_LE */
  {  323,   -1 }, /* (359) compare_op ::= NK_GE */
  {  323,   -1 }, /* (360) compare_op ::= NK_NE */
  {  323,   -1 }, /* (361) compare_op ::= NK_EQ */
  {  323,   -1 }, /* (362) compare_op ::= LIKE */
  {  323,   -2 }, /* (363) compare_op ::= NOT LIKE */
  {  323,   -1 }, /* (364) compare_op ::= MATCH */
  {  323,   -1 }, /* (365) compare_op ::= NMATCH */
  {  323,   -1 }, /* (366) compare_op ::= CONTAINS */
  {  324,   -1 }, /* (367) in_op ::= IN */
  {  324,   -2 }, /* (368) in_op ::= NOT IN */
  {  325,   -3 }, /* (369) in_predicate_value ::= NK_LP expression_list NK_RP */
  {  326,   -1 }, /* (370) boolean_value_expression ::= boolean_primary */
  {  326,   -2 }, /* (371) boolean_value_expression ::= NOT boolean_primary */
  {  326,   -3 }, /* (372) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
  {  326,   -3 }, /* (373) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
  {  327,   -1 }, /* (374) boolean_primary ::= predicate */
  {  327,   -3 }, /* (375) boolean_primary ::= NK_LP boolean_value_expression NK_RP */
  {  328,   -1 }, /* (376) common_expression ::= expression */
  {  328,   -1 }, /* (377) common_expression ::= boolean_value_expression */
  {  329,   -2 }, /* (378) from_clause ::= FROM table_reference_list */
  {  330,   -1 }, /* (379) table_reference_list ::= table_reference */
  {  330,   -3 }, /* (380) table_reference_list ::= table_reference_list NK_COMMA table_reference */
  {  331,   -1 }, /* (381) table_reference ::= table_primary */
  {  331,   -1 }, /* (382) table_reference ::= joined_table */
  {  332,   -2 }, /* (383) table_primary ::= table_name alias_opt */
  {  332,   -4 }, /* (384) table_primary ::= db_name NK_DOT table_name alias_opt */
  {  332,   -2 }, /* (385) table_primary ::= subquery alias_opt */
  {  332,   -1 }, /* (386) table_primary ::= parenthesized_joined_table */
  {  334,    0 }, /* (387) alias_opt ::= */
  {  334,   -1 }, /* (388) alias_opt ::= table_alias */
  {  334,   -2 }, /* (389) alias_opt ::= AS table_alias */
  {  335,   -3 }, /* (390) parenthesized_joined_table ::= NK_LP joined_table NK_RP */
  {  335,   -3 }, /* (391) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */
  {  333,   -6 }, /* (392) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
  {  336,    0 }, /* (393) join_type ::= */
  {  336,   -1 }, /* (394) join_type ::= INNER */
  {  338,   -9 }, /* (395) query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */
  {  339,    0 }, /* (396) set_quantifier_opt ::= */
  {  339,   -1 }, /* (397) set_quantifier_opt ::= DISTINCT */
  {  339,   -1 }, /* (398) set_quantifier_opt ::= ALL */
  {  340,   -1 }, /* (399) select_list ::= NK_STAR */
  {  340,   -1 }, /* (400) select_list ::= select_sublist */
  {  345,   -1 }, /* (401) select_sublist ::= select_item */
  {  345,   -3 }, /* (402) select_sublist ::= select_sublist NK_COMMA select_item */
  {  346,   -1 }, /* (403) select_item ::= common_expression */
  {  346,   -2 }, /* (404) select_item ::= common_expression column_alias */
  {  346,   -3 }, /* (405) select_item ::= common_expression AS column_alias */
  {  346,   -3 }, /* (406) select_item ::= table_name NK_DOT NK_STAR */
  {  307,    0 }, /* (407) where_clause_opt ::= */
  {  307,   -2 }, /* (408) where_clause_opt ::= WHERE search_condition */
  {  341,    0 }, /* (409) partition_by_clause_opt ::= */
  {  341,   -3 }, /* (410) partition_by_clause_opt ::= PARTITION BY expression_list */
  {  342,    0 }, /* (411) twindow_clause_opt ::= */
  {  342,   -6 }, /* (412) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
  {  342,   -4 }, /* (413) twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */
  {  342,   -6 }, /* (414) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
  {  342,   -8 }, /* (415) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
  {  293,    0 }, /* (416) sliding_opt ::= */
  {  293,   -4 }, /* (417) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
  {  347,    0 }, /* (418) fill_opt ::= */
  {  347,   -4 }, /* (419) fill_opt ::= FILL NK_LP fill_mode NK_RP */
  {  347,   -6 }, /* (420) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
  {  348,   -1 }, /* (421) fill_mode ::= NONE */
  {  348,   -1 }, /* (422) fill_mode ::= PREV */
  {  348,   -1 }, /* (423) fill_mode ::= NULL */
  {  348,   -1 }, /* (424) fill_mode ::= LINEAR */
  {  348,   -1 }, /* (425) fill_mode ::= NEXT */
  {  343,    0 }, /* (426) group_by_clause_opt ::= */
  {  343,   -3 }, /* (427) group_by_clause_opt ::= GROUP BY group_by_list */
  {  349,   -1 }, /* (428) group_by_list ::= expression */
  {  349,   -3 }, /* (429) group_by_list ::= group_by_list NK_COMMA expression */
  {  344,    0 }, /* (430) having_clause_opt ::= */
  {  344,   -2 }, /* (431) having_clause_opt ::= HAVING search_condition */
  {  297,   -4 }, /* (432) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */
  {  350,   -1 }, /* (433) query_expression_body ::= query_primary */
  {  350,   -4 }, /* (434) query_expression_body ::= query_expression_body UNION ALL query_expression_body */
  {  350,   -3 }, /* (435) query_expression_body ::= query_expression_body UNION query_expression_body */
  {  354,   -1 }, /* (436) query_primary ::= query_specification */
  {  354,   -6 }, /* (437) query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */
  {  351,    0 }, /* (438) order_by_clause_opt ::= */
  {  351,   -3 }, /* (439) order_by_clause_opt ::= ORDER BY sort_specification_list */
  {  352,    0 }, /* (440) slimit_clause_opt ::= */
  {  352,   -2 }, /* (441) slimit_clause_opt ::= SLIMIT NK_INTEGER */
  {  352,   -4 }, /* (442) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
  {  352,   -4 }, /* (443) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
  {  353,    0 }, /* (444) limit_clause_opt ::= */
  {  353,   -2 }, /* (445) limit_clause_opt ::= LIMIT NK_INTEGER */
  {  353,   -4 }, /* (446) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */
  {  353,   -4 }, /* (447) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */
  {  316,   -3 }, /* (448) subquery ::= NK_LP query_expression NK_RP */
  {  337,   -1 }, /* (449) search_condition ::= common_expression */
  {  355,   -1 }, /* (450) sort_specification_list ::= sort_specification */
  {  355,   -3 }, /* (451) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */
  {  356,   -3 }, /* (452) sort_specification ::= expression ordering_specification_opt null_ordering_opt */
  {  357,    0 }, /* (453) ordering_specification_opt ::= */
  {  357,   -1 }, /* (454) ordering_specification_opt ::= ASC */
  {  357,   -1 }, /* (455) ordering_specification_opt ::= DESC */
  {  358,    0 }, /* (456) null_ordering_opt ::= */
  {  358,   -2 }, /* (457) null_ordering_opt ::= NULLS FIRST */
  {  358,   -2 }, /* (458) null_ordering_opt ::= NULLS LAST */
3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044
};

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 已提交
3045 3046
  ParseTOKENTYPE yyLookaheadToken  /* Value of the lookahead token */
  ParseCTX_PDECL                   /* %extra_context */
3047 3048 3049 3050 3051
){
  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 已提交
3052
  ParseARG_FETCH
3053 3054 3055
  (void)yyLookahead;
  (void)yyLookaheadToken;
  yymsp = yypParser->yytos;
X
Xiaoyu Wang 已提交
3056 3057
#ifndef NDEBUG
  if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){
X
Xiaoyu Wang 已提交
3058
    yysize = yyRuleInfo[yyruleno].nrhs;
X
Xiaoyu Wang 已提交
3059
    if( yysize ){
X
Xiaoyu Wang 已提交
3060
      fprintf(yyTraceFILE, "%sReduce %d [%s], go to state %d.\n",
X
Xiaoyu Wang 已提交
3061
        yyTracePrompt,
X
Xiaoyu Wang 已提交
3062
        yyruleno, yyRuleName[yyruleno], yymsp[yysize].stateno);
X
Xiaoyu Wang 已提交
3063
    }else{
X
Xiaoyu Wang 已提交
3064 3065
      fprintf(yyTraceFILE, "%sReduce %d [%s].\n",
        yyTracePrompt, yyruleno, yyRuleName[yyruleno]);
X
Xiaoyu Wang 已提交
3066 3067 3068 3069 3070 3071 3072
    }
  }
#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 已提交
3073
  if( yyRuleInfo[yyruleno].nrhs==0 ){
X
Xiaoyu Wang 已提交
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
#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
  }
3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112

  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;
3113
      case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */
3114
{ pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); }
3115
  yy_destructor(yypParser,240,&yymsp[0].minor);
3116
        break;
3117
      case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */
3118
{ pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); }
3119
  yy_destructor(yypParser,241,&yymsp[0].minor);
3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132
        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);
3133
{  yy_destructor(yypParser,240,&yymsp[-2].minor);
3134
{ }
3135
  yy_destructor(yypParser,242,&yymsp[0].minor);
3136
}
3137
        break;
3138
      case 12: /* alter_account_options ::= alter_account_option */
3139
{  yy_destructor(yypParser,243,&yymsp[0].minor);
3140 3141 3142
{ }
}
        break;
3143
      case 13: /* alter_account_options ::= alter_account_options alter_account_option */
3144
{  yy_destructor(yypParser,241,&yymsp[-1].minor);
3145
{ }
3146
  yy_destructor(yypParser,243,&yymsp[0].minor);
3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158
}
        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);
3159
{ }
3160
  yy_destructor(yypParser,242,&yymsp[0].minor);
3161
        break;
3162
      case 24: /* cmd ::= CREATE USER user_name PASS NK_STRING */
3163
{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy0); }
3164
        break;
3165
      case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */
3166
{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy421, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); }
3167
        break;
3168
      case 26: /* cmd ::= ALTER USER user_name PRIVILEGE NK_STRING */
3169
{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy421, TSDB_ALTER_USER_PRIVILEGES, &yymsp[0].minor.yy0); }
3170
        break;
3171
      case 27: /* cmd ::= DROP USER user_name */
3172
{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy421); }
3173
        break;
3174
      case 28: /* cmd ::= GRANT privileges ON priv_level TO user_name */
3175
{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy669, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy421); }
3176
        break;
3177
      case 29: /* cmd ::= REVOKE privileges ON priv_level FROM user_name */
3178
{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy669, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy421); }
3179
        break;
3180
      case 30: /* privileges ::= ALL */
3181
{ yymsp[0].minor.yy669 = PRIVILEGE_TYPE_ALL; }
3182 3183 3184
        break;
      case 31: /* privileges ::= priv_type_list */
      case 32: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==32);
3185 3186
{ yylhsminor.yy669 = yymsp[0].minor.yy669; }
  yymsp[0].minor.yy669 = yylhsminor.yy669;
3187 3188
        break;
      case 33: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */
3189 3190
{ yylhsminor.yy669 = yymsp[-2].minor.yy669 | yymsp[0].minor.yy669; }
  yymsp[-2].minor.yy669 = yylhsminor.yy669;
3191 3192
        break;
      case 34: /* priv_type ::= READ */
3193
{ yymsp[0].minor.yy669 = PRIVILEGE_TYPE_READ; }
3194 3195
        break;
      case 35: /* priv_type ::= WRITE */
3196
{ yymsp[0].minor.yy669 = PRIVILEGE_TYPE_WRITE; }
3197 3198
        break;
      case 36: /* priv_level ::= NK_STAR NK_DOT NK_STAR */
3199 3200
{ yylhsminor.yy421 = yymsp[-2].minor.yy0; }
  yymsp[-2].minor.yy421 = yylhsminor.yy421;
3201 3202
        break;
      case 37: /* priv_level ::= db_name NK_DOT NK_STAR */
3203 3204
{ yylhsminor.yy421 = yymsp[-2].minor.yy421; }
  yymsp[-2].minor.yy421 = yylhsminor.yy421;
3205 3206
        break;
      case 38: /* cmd ::= CREATE DNODE dnode_endpoint */
3207
{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy421, NULL); }
3208
        break;
3209
      case 39: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */
3210
{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy0); }
3211 3212
        break;
      case 40: /* cmd ::= DROP DNODE NK_INTEGER */
3213
{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy0); }
3214
        break;
3215
      case 41: /* cmd ::= DROP DNODE dnode_endpoint */
3216
{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy421); }
3217
        break;
3218
      case 42: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */
3219 3220
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); }
        break;
3221
      case 43: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */
3222 3223
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-2].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
        break;
3224
      case 44: /* cmd ::= ALTER ALL DNODES NK_STRING */
3225 3226
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[0].minor.yy0, NULL); }
        break;
3227
      case 45: /* cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */
3228 3229
{ pCxt->pRootNode = createAlterDnodeStmt(pCxt, NULL, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
        break;
3230
      case 46: /* dnode_endpoint ::= NK_STRING */
3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250
      case 47: /* dnode_endpoint ::= NK_ID */ yytestcase(yyruleno==47);
      case 48: /* dnode_endpoint ::= NK_IPTOKEN */ yytestcase(yyruleno==48);
      case 294: /* db_name ::= NK_ID */ yytestcase(yyruleno==294);
      case 295: /* table_name ::= NK_ID */ yytestcase(yyruleno==295);
      case 296: /* column_name ::= NK_ID */ yytestcase(yyruleno==296);
      case 297: /* function_name ::= NK_ID */ yytestcase(yyruleno==297);
      case 298: /* table_alias ::= NK_ID */ yytestcase(yyruleno==298);
      case 299: /* column_alias ::= NK_ID */ yytestcase(yyruleno==299);
      case 300: /* user_name ::= NK_ID */ yytestcase(yyruleno==300);
      case 301: /* index_name ::= NK_ID */ yytestcase(yyruleno==301);
      case 302: /* topic_name ::= NK_ID */ yytestcase(yyruleno==302);
      case 303: /* stream_name ::= NK_ID */ yytestcase(yyruleno==303);
      case 304: /* cgroup_name ::= NK_ID */ yytestcase(yyruleno==304);
      case 337: /* noarg_func ::= NOW */ yytestcase(yyruleno==337);
      case 338: /* noarg_func ::= TODAY */ yytestcase(yyruleno==338);
      case 339: /* noarg_func ::= TIMEZONE */ yytestcase(yyruleno==339);
      case 340: /* star_func ::= COUNT */ yytestcase(yyruleno==340);
      case 341: /* star_func ::= FIRST */ yytestcase(yyruleno==341);
      case 342: /* star_func ::= LAST */ yytestcase(yyruleno==342);
      case 343: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==343);
3251 3252 3253
{ yylhsminor.yy421 = yymsp[0].minor.yy0; }
  yymsp[0].minor.yy421 = yylhsminor.yy421;
        break;
3254
      case 49: /* cmd ::= ALTER LOCAL NK_STRING */
3255 3256
{ pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); }
        break;
3257
      case 50: /* cmd ::= ALTER LOCAL NK_STRING NK_STRING */
3258 3259
{ pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
        break;
3260
      case 51: /* cmd ::= CREATE QNODE ON DNODE NK_INTEGER */
3261
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_QNODE_STMT, &yymsp[0].minor.yy0); }
X
Xiaoyu Wang 已提交
3262
        break;
3263
      case 52: /* cmd ::= DROP QNODE ON DNODE NK_INTEGER */
3264
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_QNODE_STMT, &yymsp[0].minor.yy0); }
3265
        break;
3266
      case 53: /* cmd ::= CREATE BNODE ON DNODE NK_INTEGER */
3267
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_BNODE_STMT, &yymsp[0].minor.yy0); }
X
Xiaoyu Wang 已提交
3268
        break;
3269
      case 54: /* cmd ::= DROP BNODE ON DNODE NK_INTEGER */
3270
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_BNODE_STMT, &yymsp[0].minor.yy0); }
X
Xiaoyu Wang 已提交
3271
        break;
3272
      case 55: /* cmd ::= CREATE SNODE ON DNODE NK_INTEGER */
3273
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_SNODE_STMT, &yymsp[0].minor.yy0); }
3274
        break;
3275
      case 56: /* cmd ::= DROP SNODE ON DNODE NK_INTEGER */
3276
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_SNODE_STMT, &yymsp[0].minor.yy0); }
3277
        break;
3278
      case 57: /* cmd ::= CREATE MNODE ON DNODE NK_INTEGER */
3279
{ pCxt->pRootNode = createCreateComponentNodeStmt(pCxt, QUERY_NODE_CREATE_MNODE_STMT, &yymsp[0].minor.yy0); }
3280
        break;
3281
      case 58: /* cmd ::= DROP MNODE ON DNODE NK_INTEGER */
3282
{ pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); }
3283
        break;
3284
      case 59: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */
3285
{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy621, &yymsp[-1].minor.yy421, yymsp[0].minor.yy674); }
3286
        break;
3287
      case 60: /* cmd ::= DROP DATABASE exists_opt db_name */
3288
{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy621, &yymsp[0].minor.yy421); }
3289
        break;
3290
      case 61: /* cmd ::= USE db_name */
3291
{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy421); }
3292
        break;
3293
      case 62: /* cmd ::= ALTER DATABASE db_name alter_db_options */
3294
{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy421, yymsp[0].minor.yy674); }
3295
        break;
3296
      case 63: /* not_exists_opt ::= IF NOT EXISTS */
3297
{ yymsp[-2].minor.yy621 = true; }
3298
        break;
3299 3300 3301 3302 3303
      case 64: /* not_exists_opt ::= */
      case 66: /* exists_opt ::= */ yytestcase(yyruleno==66);
      case 237: /* analyze_opt ::= */ yytestcase(yyruleno==237);
      case 245: /* agg_func_opt ::= */ yytestcase(yyruleno==245);
      case 396: /* set_quantifier_opt ::= */ yytestcase(yyruleno==396);
3304
{ yymsp[1].minor.yy621 = false; }
3305
        break;
3306
      case 65: /* exists_opt ::= IF EXISTS */
3307
{ yymsp[-1].minor.yy621 = true; }
X
Xiaoyu Wang 已提交
3308
        break;
3309
      case 67: /* db_options ::= */
3310
{ yymsp[1].minor.yy674 = createDefaultDatabaseOptions(pCxt); }
3311
        break;
3312
      case 68: /* db_options ::= db_options BUFFER NK_INTEGER */
3313 3314
{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
3315
        break;
3316
      case 69: /* db_options ::= db_options CACHELAST NK_INTEGER */
3317 3318
{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_CACHELAST, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
X
Xiaoyu Wang 已提交
3319
        break;
3320
      case 70: /* db_options ::= db_options COMP NK_INTEGER */
3321 3322
{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_COMP, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
X
Xiaoyu Wang 已提交
3323
        break;
3324 3325
      case 71: /* db_options ::= db_options DURATION NK_INTEGER */
      case 72: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==72);
3326 3327
{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_DAYS, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
X
Xiaoyu Wang 已提交
3328
        break;
3329
      case 73: /* db_options ::= db_options FSYNC NK_INTEGER */
3330 3331
{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
X
Xiaoyu Wang 已提交
3332
        break;
3333
      case 74: /* db_options ::= db_options MAXROWS NK_INTEGER */
3334 3335
{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
X
Xiaoyu Wang 已提交
3336
        break;
3337
      case 75: /* db_options ::= db_options MINROWS NK_INTEGER */
3338 3339
{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
X
Xiaoyu Wang 已提交
3340
        break;
3341 3342
      case 76: /* db_options ::= db_options KEEP integer_list */
      case 77: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==77);
3343 3344
{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_KEEP, yymsp[0].minor.yy530); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
X
Xiaoyu Wang 已提交
3345
        break;
3346
      case 78: /* db_options ::= db_options PAGES NK_INTEGER */
3347 3348
{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_PAGES, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
3349
        break;
3350
      case 79: /* db_options ::= db_options PAGESIZE NK_INTEGER */
3351 3352
{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
3353
        break;
3354
      case 80: /* db_options ::= db_options PRECISION NK_STRING */
3355 3356 3357
{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
        break;
3358
      case 81: /* db_options ::= db_options REPLICA NK_INTEGER */
3359 3360 3361
{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
        break;
3362
      case 82: /* db_options ::= db_options STRICT NK_INTEGER */
3363 3364 3365
{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_STRICT, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
        break;
3366
      case 83: /* db_options ::= db_options WAL NK_INTEGER */
3367 3368 3369
{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_WAL, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
        break;
3370
      case 84: /* db_options ::= db_options VGROUPS NK_INTEGER */
3371 3372 3373
{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
        break;
3374
      case 85: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */
3375 3376 3377
{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
        break;
3378
      case 86: /* db_options ::= db_options RETENTIONS retention_list */
3379 3380 3381
{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_RETENTIONS, yymsp[0].minor.yy530); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
        break;
3382
      case 87: /* db_options ::= db_options SCHEMALESS NK_INTEGER */
3383 3384 3385
{ yylhsminor.yy674 = setDatabaseOption(pCxt, yymsp[-2].minor.yy674, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
        break;
3386
      case 88: /* alter_db_options ::= alter_db_option */
3387 3388 3389
{ yylhsminor.yy674 = createAlterDatabaseOptions(pCxt); yylhsminor.yy674 = setAlterDatabaseOption(pCxt, yylhsminor.yy674, &yymsp[0].minor.yy557); }
  yymsp[0].minor.yy674 = yylhsminor.yy674;
        break;
3390
      case 89: /* alter_db_options ::= alter_db_options alter_db_option */
3391 3392 3393
{ yylhsminor.yy674 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy674, &yymsp[0].minor.yy557); }
  yymsp[-1].minor.yy674 = yylhsminor.yy674;
        break;
3394
      case 90: /* alter_db_option ::= BUFFER NK_INTEGER */
3395 3396
{ yymsp[-1].minor.yy557.type = DB_OPTION_BUFFER; yymsp[-1].minor.yy557.val = yymsp[0].minor.yy0; }
        break;
3397
      case 91: /* alter_db_option ::= CACHELAST NK_INTEGER */
3398 3399
{ yymsp[-1].minor.yy557.type = DB_OPTION_CACHELAST; yymsp[-1].minor.yy557.val = yymsp[0].minor.yy0; }
        break;
3400
      case 92: /* alter_db_option ::= FSYNC NK_INTEGER */
3401 3402
{ yymsp[-1].minor.yy557.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy557.val = yymsp[0].minor.yy0; }
        break;
3403 3404
      case 93: /* alter_db_option ::= KEEP integer_list */
      case 94: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==94);
3405 3406
{ yymsp[-1].minor.yy557.type = DB_OPTION_KEEP; yymsp[-1].minor.yy557.pList = yymsp[0].minor.yy530; }
        break;
3407
      case 95: /* alter_db_option ::= PAGES NK_INTEGER */
3408 3409
{ yymsp[-1].minor.yy557.type = DB_OPTION_PAGES; yymsp[-1].minor.yy557.val = yymsp[0].minor.yy0; }
        break;
3410
      case 96: /* alter_db_option ::= REPLICA NK_INTEGER */
3411 3412
{ yymsp[-1].minor.yy557.type = DB_OPTION_REPLICA; yymsp[-1].minor.yy557.val = yymsp[0].minor.yy0; }
        break;
3413
      case 97: /* alter_db_option ::= STRICT NK_INTEGER */
3414 3415
{ yymsp[-1].minor.yy557.type = DB_OPTION_STRICT; yymsp[-1].minor.yy557.val = yymsp[0].minor.yy0; }
        break;
3416
      case 98: /* alter_db_option ::= WAL NK_INTEGER */
3417 3418
{ yymsp[-1].minor.yy557.type = DB_OPTION_WAL; yymsp[-1].minor.yy557.val = yymsp[0].minor.yy0; }
        break;
3419
      case 99: /* integer_list ::= NK_INTEGER */
3420 3421 3422
{ yylhsminor.yy530 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy530 = yylhsminor.yy530;
        break;
3423 3424
      case 100: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */
      case 266: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==266);
3425 3426 3427
{ yylhsminor.yy530 = addNodeToList(pCxt, yymsp[-2].minor.yy530, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
  yymsp[-2].minor.yy530 = yylhsminor.yy530;
        break;
3428
      case 101: /* variable_list ::= NK_VARIABLE */
3429 3430 3431
{ yylhsminor.yy530 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy530 = yylhsminor.yy530;
        break;
3432
      case 102: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */
3433 3434 3435
{ yylhsminor.yy530 = addNodeToList(pCxt, yymsp[-2].minor.yy530, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
  yymsp[-2].minor.yy530 = yylhsminor.yy530;
        break;
3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446
      case 103: /* retention_list ::= retention */
      case 123: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==123);
      case 126: /* multi_drop_clause ::= drop_table_clause */ yytestcase(yyruleno==126);
      case 133: /* column_def_list ::= column_def */ yytestcase(yyruleno==133);
      case 176: /* rollup_func_list ::= rollup_func_name */ yytestcase(yyruleno==176);
      case 181: /* col_name_list ::= col_name */ yytestcase(yyruleno==181);
      case 225: /* func_list ::= func */ yytestcase(yyruleno==225);
      case 292: /* literal_list ::= signed_literal */ yytestcase(yyruleno==292);
      case 346: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==346);
      case 401: /* select_sublist ::= select_item */ yytestcase(yyruleno==401);
      case 450: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==450);
3447 3448 3449
{ yylhsminor.yy530 = createNodeList(pCxt, yymsp[0].minor.yy674); }
  yymsp[0].minor.yy530 = yylhsminor.yy530;
        break;
3450 3451 3452 3453 3454 3455 3456 3457 3458
      case 104: /* retention_list ::= retention_list NK_COMMA retention */
      case 134: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==134);
      case 177: /* rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ yytestcase(yyruleno==177);
      case 182: /* col_name_list ::= col_name_list NK_COMMA col_name */ yytestcase(yyruleno==182);
      case 226: /* func_list ::= func_list NK_COMMA func */ yytestcase(yyruleno==226);
      case 293: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==293);
      case 347: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==347);
      case 402: /* select_sublist ::= select_sublist NK_COMMA select_item */ yytestcase(yyruleno==402);
      case 451: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==451);
3459 3460 3461
{ yylhsminor.yy530 = addNodeToList(pCxt, yymsp[-2].minor.yy530, yymsp[0].minor.yy674); }
  yymsp[-2].minor.yy530 = yylhsminor.yy530;
        break;
3462
      case 105: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */
3463 3464 3465
{ yylhsminor.yy674 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
        break;
3466 3467
      case 106: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */
      case 108: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==108);
3468 3469
{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy621, yymsp[-5].minor.yy674, yymsp[-3].minor.yy530, yymsp[-1].minor.yy530, yymsp[0].minor.yy674); }
        break;
3470
      case 107: /* cmd ::= CREATE TABLE multi_create_clause */
3471 3472
{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy530); }
        break;
3473
      case 109: /* cmd ::= DROP TABLE multi_drop_clause */
3474 3475
{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy530); }
        break;
3476
      case 110: /* cmd ::= DROP STABLE exists_opt full_table_name */
3477 3478
{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy621, yymsp[0].minor.yy674); }
        break;
3479 3480 3481
      case 111: /* cmd ::= ALTER TABLE alter_table_clause */
      case 112: /* cmd ::= ALTER STABLE alter_table_clause */ yytestcase(yyruleno==112);
      case 269: /* cmd ::= query_expression */ yytestcase(yyruleno==269);
3482 3483
{ pCxt->pRootNode = yymsp[0].minor.yy674; }
        break;
3484
      case 113: /* alter_table_clause ::= full_table_name alter_table_options */
3485 3486 3487
{ yylhsminor.yy674 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy674, yymsp[0].minor.yy674); }
  yymsp[-1].minor.yy674 = yylhsminor.yy674;
        break;
3488
      case 114: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */
3489 3490 3491
{ yylhsminor.yy674 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy674, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy421, yymsp[0].minor.yy690); }
  yymsp[-4].minor.yy674 = yylhsminor.yy674;
        break;
3492
      case 115: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */
3493 3494 3495
{ yylhsminor.yy674 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy674, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy421); }
  yymsp[-3].minor.yy674 = yylhsminor.yy674;
        break;
3496
      case 116: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */
3497 3498
{ yylhsminor.yy674 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy674, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy421, yymsp[0].minor.yy690); }
  yymsp[-4].minor.yy674 = yylhsminor.yy674;
3499
        break;
3500
      case 117: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */
3501 3502 3503
{ yylhsminor.yy674 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy674, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy421, &yymsp[0].minor.yy421); }
  yymsp[-4].minor.yy674 = yylhsminor.yy674;
        break;
3504
      case 118: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */
3505 3506 3507
{ yylhsminor.yy674 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy674, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy421, yymsp[0].minor.yy690); }
  yymsp[-4].minor.yy674 = yylhsminor.yy674;
        break;
3508
      case 119: /* alter_table_clause ::= full_table_name DROP TAG column_name */
3509 3510
{ yylhsminor.yy674 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy674, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy421); }
  yymsp[-3].minor.yy674 = yylhsminor.yy674;
3511
        break;
3512
      case 120: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */
3513 3514
{ yylhsminor.yy674 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy674, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy421, yymsp[0].minor.yy690); }
  yymsp[-4].minor.yy674 = yylhsminor.yy674;
3515
        break;
3516
      case 121: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */
3517 3518 3519
{ yylhsminor.yy674 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy674, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy421, &yymsp[0].minor.yy421); }
  yymsp[-4].minor.yy674 = yylhsminor.yy674;
        break;
3520
      case 122: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */
3521 3522
{ yylhsminor.yy674 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy674, &yymsp[-2].minor.yy421, yymsp[0].minor.yy674); }
  yymsp[-5].minor.yy674 = yylhsminor.yy674;
3523
        break;
3524 3525
      case 124: /* multi_create_clause ::= multi_create_clause create_subtable_clause */
      case 127: /* multi_drop_clause ::= multi_drop_clause drop_table_clause */ yytestcase(yyruleno==127);
3526 3527
{ yylhsminor.yy530 = addNodeToList(pCxt, yymsp[-1].minor.yy530, yymsp[0].minor.yy674); }
  yymsp[-1].minor.yy530 = yylhsminor.yy530;
3528
        break;
3529
      case 125: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_tags_opt TAGS NK_LP literal_list NK_RP table_options */
3530 3531
{ yylhsminor.yy674 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy621, yymsp[-8].minor.yy674, yymsp[-6].minor.yy674, yymsp[-5].minor.yy530, yymsp[-2].minor.yy530, yymsp[0].minor.yy674); }
  yymsp[-9].minor.yy674 = yylhsminor.yy674;
3532
        break;
3533
      case 128: /* drop_table_clause ::= exists_opt full_table_name */
3534 3535
{ yylhsminor.yy674 = createDropTableClause(pCxt, yymsp[-1].minor.yy621, yymsp[0].minor.yy674); }
  yymsp[-1].minor.yy674 = yylhsminor.yy674;
3536
        break;
3537 3538 3539 3540 3541
      case 129: /* specific_tags_opt ::= */
      case 160: /* tags_def_opt ::= */ yytestcase(yyruleno==160);
      case 409: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==409);
      case 426: /* group_by_clause_opt ::= */ yytestcase(yyruleno==426);
      case 438: /* order_by_clause_opt ::= */ yytestcase(yyruleno==438);
3542
{ yymsp[1].minor.yy530 = NULL; }
3543
        break;
3544
      case 130: /* specific_tags_opt ::= NK_LP col_name_list NK_RP */
3545
{ yymsp[-2].minor.yy530 = yymsp[-1].minor.yy530; }
3546
        break;
3547
      case 131: /* full_table_name ::= table_name */
3548 3549
{ yylhsminor.yy674 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy421, NULL); }
  yymsp[0].minor.yy674 = yylhsminor.yy674;
3550
        break;
3551
      case 132: /* full_table_name ::= db_name NK_DOT table_name */
3552 3553
{ yylhsminor.yy674 = createRealTableNode(pCxt, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy421, NULL); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
3554
        break;
3555
      case 135: /* column_def ::= column_name type_name */
3556 3557
{ yylhsminor.yy674 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy421, yymsp[0].minor.yy690, NULL); }
  yymsp[-1].minor.yy674 = yylhsminor.yy674;
3558
        break;
3559
      case 136: /* column_def ::= column_name type_name COMMENT NK_STRING */
3560 3561
{ yylhsminor.yy674 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy421, yymsp[-2].minor.yy690, &yymsp[0].minor.yy0); }
  yymsp[-3].minor.yy674 = yylhsminor.yy674;
3562
        break;
3563
      case 137: /* type_name ::= BOOL */
3564
{ yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_BOOL); }
3565
        break;
3566
      case 138: /* type_name ::= TINYINT */
3567
{ yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_TINYINT); }
3568
        break;
3569
      case 139: /* type_name ::= SMALLINT */
3570
{ yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_SMALLINT); }
3571
        break;
3572 3573
      case 140: /* type_name ::= INT */
      case 141: /* type_name ::= INTEGER */ yytestcase(yyruleno==141);
3574
{ yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_INT); }
3575
        break;
3576
      case 142: /* type_name ::= BIGINT */
3577
{ yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_BIGINT); }
3578
        break;
3579
      case 143: /* type_name ::= FLOAT */
3580
{ yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_FLOAT); }
3581
        break;
3582
      case 144: /* type_name ::= DOUBLE */
3583
{ yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_DOUBLE); }
3584
        break;
3585
      case 145: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */
3586
{ yymsp[-3].minor.yy690 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); }
3587
        break;
3588
      case 146: /* type_name ::= TIMESTAMP */
3589
{ yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); }
3590
        break;
3591
      case 147: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */
3592
{ yymsp[-3].minor.yy690 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); }
3593
        break;
3594
      case 148: /* type_name ::= TINYINT UNSIGNED */
3595
{ yymsp[-1].minor.yy690 = createDataType(TSDB_DATA_TYPE_UTINYINT); }
3596
        break;
3597
      case 149: /* type_name ::= SMALLINT UNSIGNED */
3598
{ yymsp[-1].minor.yy690 = createDataType(TSDB_DATA_TYPE_USMALLINT); }
3599
        break;
3600
      case 150: /* type_name ::= INT UNSIGNED */
3601
{ yymsp[-1].minor.yy690 = createDataType(TSDB_DATA_TYPE_UINT); }
3602
        break;
3603
      case 151: /* type_name ::= BIGINT UNSIGNED */
3604
{ yymsp[-1].minor.yy690 = createDataType(TSDB_DATA_TYPE_UBIGINT); }
3605
        break;
3606
      case 152: /* type_name ::= JSON */
3607
{ yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_JSON); }
3608
        break;
3609
      case 153: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */
3610
{ yymsp[-3].minor.yy690 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); }
3611
        break;
3612
      case 154: /* type_name ::= MEDIUMBLOB */
3613
{ yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); }
3614
        break;
3615
      case 155: /* type_name ::= BLOB */
3616
{ yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_BLOB); }
3617
        break;
3618
      case 156: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */
3619
{ yymsp[-3].minor.yy690 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); }
3620
        break;
3621
      case 157: /* type_name ::= DECIMAL */
3622
{ yymsp[0].minor.yy690 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
3623
        break;
3624
      case 158: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */
3625
{ yymsp[-3].minor.yy690 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
3626
        break;
3627
      case 159: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */
3628
{ yymsp[-5].minor.yy690 = createDataType(TSDB_DATA_TYPE_DECIMAL); }
3629
        break;
3630 3631 3632
      case 161: /* tags_def_opt ::= tags_def */
      case 345: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==345);
      case 400: /* select_list ::= select_sublist */ yytestcase(yyruleno==400);
3633 3634
{ yylhsminor.yy530 = yymsp[0].minor.yy530; }
  yymsp[0].minor.yy530 = yylhsminor.yy530;
3635
        break;
3636
      case 162: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */
3637
{ yymsp[-3].minor.yy530 = yymsp[-1].minor.yy530; }
3638
        break;
3639
      case 163: /* table_options ::= */
3640
{ yymsp[1].minor.yy674 = createDefaultTableOptions(pCxt); }
3641
        break;
3642
      case 164: /* table_options ::= table_options COMMENT NK_STRING */
3643 3644
{ yylhsminor.yy674 = setTableOption(pCxt, yymsp[-2].minor.yy674, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
3645
        break;
3646
      case 165: /* table_options ::= table_options MAX_DELAY duration_list */
3647 3648
{ yylhsminor.yy674 = setTableOption(pCxt, yymsp[-2].minor.yy674, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy530); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
X
Xiaoyu Wang 已提交
3649
        break;
3650
      case 166: /* table_options ::= table_options WATERMARK duration_list */
3651 3652
{ yylhsminor.yy674 = setTableOption(pCxt, yymsp[-2].minor.yy674, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy530); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
3653
        break;
3654
      case 167: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */
3655 3656
{ yylhsminor.yy674 = setTableOption(pCxt, yymsp[-4].minor.yy674, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy530); }
  yymsp[-4].minor.yy674 = yylhsminor.yy674;
3657
        break;
3658
      case 168: /* table_options ::= table_options TTL NK_INTEGER */
3659 3660
{ yylhsminor.yy674 = setTableOption(pCxt, yymsp[-2].minor.yy674, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
3661
        break;
3662
      case 169: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */
3663 3664
{ yylhsminor.yy674 = setTableOption(pCxt, yymsp[-4].minor.yy674, TABLE_OPTION_SMA, yymsp[-1].minor.yy530); }
  yymsp[-4].minor.yy674 = yylhsminor.yy674;
3665
        break;
3666
      case 170: /* alter_table_options ::= alter_table_option */
3667 3668
{ yylhsminor.yy674 = createAlterTableOptions(pCxt); yylhsminor.yy674 = setTableOption(pCxt, yylhsminor.yy674, yymsp[0].minor.yy557.type, &yymsp[0].minor.yy557.val); }
  yymsp[0].minor.yy674 = yylhsminor.yy674;
3669
        break;
3670
      case 171: /* alter_table_options ::= alter_table_options alter_table_option */
3671 3672
{ yylhsminor.yy674 = setTableOption(pCxt, yymsp[-1].minor.yy674, yymsp[0].minor.yy557.type, &yymsp[0].minor.yy557.val); }
  yymsp[-1].minor.yy674 = yylhsminor.yy674;
3673
        break;
3674
      case 172: /* alter_table_option ::= COMMENT NK_STRING */
3675
{ yymsp[-1].minor.yy557.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy557.val = yymsp[0].minor.yy0; }
3676
        break;
3677
      case 173: /* alter_table_option ::= TTL NK_INTEGER */
3678
{ yymsp[-1].minor.yy557.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy557.val = yymsp[0].minor.yy0; }
3679
        break;
3680 3681
      case 174: /* duration_list ::= duration_literal */
      case 319: /* expression_list ::= expression */ yytestcase(yyruleno==319);
3682 3683
{ yylhsminor.yy530 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy674)); }
  yymsp[0].minor.yy530 = yylhsminor.yy530;
X
Xiaoyu Wang 已提交
3684
        break;
3685 3686
      case 175: /* duration_list ::= duration_list NK_COMMA duration_literal */
      case 320: /* expression_list ::= expression_list NK_COMMA expression */ yytestcase(yyruleno==320);
3687 3688
{ yylhsminor.yy530 = addNodeToList(pCxt, yymsp[-2].minor.yy530, releaseRawExprNode(pCxt, yymsp[0].minor.yy674)); }
  yymsp[-2].minor.yy530 = yylhsminor.yy530;
X
Xiaoyu Wang 已提交
3689
        break;
3690
      case 178: /* rollup_func_name ::= function_name */
3691 3692
{ yylhsminor.yy674 = createFunctionNode(pCxt, &yymsp[0].minor.yy421, NULL); }
  yymsp[0].minor.yy674 = yylhsminor.yy674;
X
Xiaoyu Wang 已提交
3693
        break;
3694 3695
      case 179: /* rollup_func_name ::= FIRST */
      case 180: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==180);
3696 3697
{ yylhsminor.yy674 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); }
  yymsp[0].minor.yy674 = yylhsminor.yy674;
X
Xiaoyu Wang 已提交
3698
        break;
3699
      case 183: /* col_name ::= column_name */
3700 3701
{ yylhsminor.yy674 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy421); }
  yymsp[0].minor.yy674 = yylhsminor.yy674;
3702
        break;
3703
      case 184: /* cmd ::= SHOW DNODES */
X
Xiaoyu Wang 已提交
3704
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT, NULL, NULL); }
3705
        break;
3706
      case 185: /* cmd ::= SHOW USERS */
X
Xiaoyu Wang 已提交
3707
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_USERS_STMT, NULL, NULL); }
3708
        break;
3709
      case 186: /* cmd ::= SHOW DATABASES */
X
Xiaoyu Wang 已提交
3710
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT, NULL, NULL); }
3711
        break;
3712
      case 187: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */
3713
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy674, yymsp[0].minor.yy674); }
3714
        break;
3715
      case 188: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */
3716
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy674, yymsp[0].minor.yy674); }
3717
        break;
3718
      case 189: /* cmd ::= SHOW db_name_cond_opt VGROUPS */
3719
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy674, NULL); }
3720
        break;
3721
      case 190: /* cmd ::= SHOW MNODES */
X
Xiaoyu Wang 已提交
3722
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT, NULL, NULL); }
3723
        break;
3724
      case 191: /* cmd ::= SHOW MODULES */
X
Xiaoyu Wang 已提交
3725
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MODULES_STMT, NULL, NULL); }
3726
        break;
3727
      case 192: /* cmd ::= SHOW QNODES */
X
Xiaoyu Wang 已提交
3728
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QNODES_STMT, NULL, NULL); }
3729
        break;
3730
      case 193: /* cmd ::= SHOW FUNCTIONS */
X
Xiaoyu Wang 已提交
3731
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT, NULL, NULL); }
3732
        break;
3733
      case 194: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */
3734
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[-1].minor.yy674, yymsp[0].minor.yy674); }
3735
        break;
3736
      case 195: /* cmd ::= SHOW STREAMS */
X
Xiaoyu Wang 已提交
3737
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT, NULL, NULL); }
3738
        break;
3739
      case 196: /* cmd ::= SHOW ACCOUNTS */
3740
{ pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); }
3741
        break;
3742
      case 197: /* cmd ::= SHOW APPS */
3743
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT, NULL, NULL); }
3744
        break;
3745
      case 198: /* cmd ::= SHOW CONNECTIONS */
3746 3747
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT, NULL, NULL); }
        break;
3748 3749
      case 199: /* cmd ::= SHOW LICENCE */
      case 200: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==200);
3750 3751
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCE_STMT, NULL, NULL); }
        break;
3752
      case 201: /* cmd ::= SHOW CREATE DATABASE db_name */
3753
{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy421); }
3754
        break;
3755
      case 202: /* cmd ::= SHOW CREATE TABLE full_table_name */
3756
{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy674); }
3757
        break;
3758
      case 203: /* cmd ::= SHOW CREATE STABLE full_table_name */
3759
{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy674); }
3760
        break;
3761
      case 204: /* cmd ::= SHOW QUERIES */
3762 3763
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT, NULL, NULL); }
        break;
3764
      case 205: /* cmd ::= SHOW SCORES */
3765
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SCORES_STMT, NULL, NULL); }
3766
        break;
3767
      case 206: /* cmd ::= SHOW TOPICS */
3768 3769
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TOPICS_STMT, NULL, NULL); }
        break;
3770
      case 207: /* cmd ::= SHOW VARIABLES */
3771
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_VARIABLE_STMT, NULL, NULL); }
X
Xiaoyu Wang 已提交
3772
        break;
3773
      case 208: /* cmd ::= SHOW BNODES */
3774 3775
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_BNODES_STMT, NULL, NULL); }
        break;
3776
      case 209: /* cmd ::= SHOW SNODES */
3777 3778
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SNODES_STMT, NULL, NULL); }
        break;
3779
      case 210: /* cmd ::= SHOW CLUSTER */
3780 3781
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CLUSTER_STMT, NULL, NULL); }
        break;
3782
      case 211: /* cmd ::= SHOW TRANSACTIONS */
3783
{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT, NULL, NULL); }
X
Xiaoyu Wang 已提交
3784
        break;
3785 3786
      case 212: /* db_name_cond_opt ::= */
      case 217: /* from_db_opt ::= */ yytestcase(yyruleno==217);
3787
{ yymsp[1].minor.yy674 = createDefaultDatabaseCondValue(pCxt); }
X
Xiaoyu Wang 已提交
3788
        break;
3789
      case 213: /* db_name_cond_opt ::= db_name NK_DOT */
3790 3791
{ yylhsminor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy421); }
  yymsp[-1].minor.yy674 = yylhsminor.yy674;
X
Xiaoyu Wang 已提交
3792
        break;
3793 3794 3795 3796 3797 3798 3799 3800 3801 3802
      case 214: /* like_pattern_opt ::= */
      case 222: /* index_options ::= */ yytestcase(yyruleno==222);
      case 251: /* into_opt ::= */ yytestcase(yyruleno==251);
      case 407: /* where_clause_opt ::= */ yytestcase(yyruleno==407);
      case 411: /* twindow_clause_opt ::= */ yytestcase(yyruleno==411);
      case 416: /* sliding_opt ::= */ yytestcase(yyruleno==416);
      case 418: /* fill_opt ::= */ yytestcase(yyruleno==418);
      case 430: /* having_clause_opt ::= */ yytestcase(yyruleno==430);
      case 440: /* slimit_clause_opt ::= */ yytestcase(yyruleno==440);
      case 444: /* limit_clause_opt ::= */ yytestcase(yyruleno==444);
3803
{ yymsp[1].minor.yy674 = NULL; }
X
Xiaoyu Wang 已提交
3804
        break;
3805
      case 215: /* like_pattern_opt ::= LIKE NK_STRING */
3806
{ yymsp[-1].minor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
X
Xiaoyu Wang 已提交
3807
        break;
3808
      case 216: /* table_name_cond ::= table_name */
3809 3810
{ yylhsminor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy421); }
  yymsp[0].minor.yy674 = yylhsminor.yy674;
X
Xiaoyu Wang 已提交
3811
        break;
3812
      case 218: /* from_db_opt ::= FROM db_name */
3813
{ yymsp[-1].minor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy421); }
X
Xiaoyu Wang 已提交
3814
        break;
3815
      case 219: /* cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options */
3816
{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy621, &yymsp[-3].minor.yy421, &yymsp[-1].minor.yy421, NULL, yymsp[0].minor.yy674); }
X
Xiaoyu Wang 已提交
3817
        break;
3818
      case 220: /* cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP */
3819
{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_FULLTEXT, yymsp[-6].minor.yy621, &yymsp[-5].minor.yy421, &yymsp[-3].minor.yy421, yymsp[-1].minor.yy530, NULL); }
X
Xiaoyu Wang 已提交
3820
        break;
3821
      case 221: /* cmd ::= DROP INDEX exists_opt index_name ON table_name */
3822
{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-3].minor.yy621, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy421); }
X
Xiaoyu Wang 已提交
3823
        break;
3824
      case 223: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt */
3825
{ yymsp[-8].minor.yy674 = createIndexOption(pCxt, yymsp[-6].minor.yy530, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), NULL, yymsp[0].minor.yy674); }
X
Xiaoyu Wang 已提交
3826
        break;
3827
      case 224: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt */
3828
{ yymsp[-10].minor.yy674 = createIndexOption(pCxt, yymsp[-8].minor.yy530, releaseRawExprNode(pCxt, yymsp[-4].minor.yy674), releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), yymsp[0].minor.yy674); }
X
Xiaoyu Wang 已提交
3829
        break;
3830
      case 227: /* func ::= function_name NK_LP expression_list NK_RP */
3831 3832
{ yylhsminor.yy674 = createFunctionNode(pCxt, &yymsp[-3].minor.yy421, yymsp[-1].minor.yy530); }
  yymsp[-3].minor.yy674 = yylhsminor.yy674;
3833
        break;
3834
      case 228: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */
3835
{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-3].minor.yy621, &yymsp[-2].minor.yy421, yymsp[0].minor.yy674, NULL, NULL); }
3836
        break;
3837
      case 229: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */
3838
{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-4].minor.yy621, &yymsp[-3].minor.yy421, NULL, &yymsp[0].minor.yy421, NULL); }
X
Xiaoyu Wang 已提交
3839
        break;
3840
      case 230: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */
3841
{ pCxt->pRootNode = createCreateTopicStmt(pCxt, yymsp[-4].minor.yy621, &yymsp[-3].minor.yy421, NULL, NULL, yymsp[0].minor.yy674); }
X
Xiaoyu Wang 已提交
3842
        break;
3843
      case 231: /* cmd ::= DROP TOPIC exists_opt topic_name */
3844
{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy621, &yymsp[0].minor.yy421); }
X
Xiaoyu Wang 已提交
3845
        break;
3846
      case 232: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */
3847
{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy621, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy421); }
X
Xiaoyu Wang 已提交
3848
        break;
3849 3850
      case 233: /* cmd ::= DESC full_table_name */
      case 234: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==234);
3851
{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy674); }
3852
        break;
3853
      case 235: /* cmd ::= RESET QUERY CACHE */
3854 3855
{ pCxt->pRootNode = createResetQueryCacheStmt(pCxt); }
        break;
3856
      case 236: /* cmd ::= EXPLAIN analyze_opt explain_options query_expression */
3857
{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy621, yymsp[-1].minor.yy674, yymsp[0].minor.yy674); }
3858
        break;
3859 3860 3861
      case 238: /* analyze_opt ::= ANALYZE */
      case 246: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==246);
      case 397: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==397);
3862
{ yymsp[0].minor.yy621 = true; }
3863
        break;
3864
      case 239: /* explain_options ::= */
3865
{ yymsp[1].minor.yy674 = createDefaultExplainOptions(pCxt); }
3866
        break;
3867
      case 240: /* explain_options ::= explain_options VERBOSE NK_BOOL */
3868 3869
{ yylhsminor.yy674 = setExplainVerbose(pCxt, yymsp[-2].minor.yy674, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
3870
        break;
3871
      case 241: /* explain_options ::= explain_options RATIO NK_FLOAT */
3872 3873
{ yylhsminor.yy674 = setExplainRatio(pCxt, yymsp[-2].minor.yy674, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
3874
        break;
3875
      case 242: /* cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP */
3876
{ pCxt->pRootNode = createCompactStmt(pCxt, yymsp[-1].minor.yy530); }
3877
        break;
3878
      case 243: /* cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */
3879
{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy621, yymsp[-8].minor.yy621, &yymsp[-5].minor.yy421, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy690, yymsp[0].minor.yy42); }
3880
        break;
3881
      case 244: /* cmd ::= DROP FUNCTION exists_opt function_name */
3882
{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy621, &yymsp[0].minor.yy421); }
3883
        break;
3884
      case 247: /* bufsize_opt ::= */
3885
{ yymsp[1].minor.yy42 = 0; }
3886
        break;
3887
      case 248: /* bufsize_opt ::= BUFSIZE NK_INTEGER */
3888
{ yymsp[-1].minor.yy42 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); }
3889
        break;
3890
      case 249: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */
3891
{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-5].minor.yy621, &yymsp[-4].minor.yy421, yymsp[-2].minor.yy674, yymsp[-3].minor.yy674, yymsp[0].minor.yy674); }
3892
        break;
3893
      case 250: /* cmd ::= DROP STREAM exists_opt stream_name */
3894
{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy621, &yymsp[0].minor.yy421); }
3895
        break;
3896 3897 3898 3899
      case 252: /* into_opt ::= INTO full_table_name */
      case 378: /* from_clause ::= FROM table_reference_list */ yytestcase(yyruleno==378);
      case 408: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==408);
      case 431: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==431);
3900
{ yymsp[-1].minor.yy674 = yymsp[0].minor.yy674; }
3901
        break;
3902
      case 253: /* stream_options ::= */
3903
{ yymsp[1].minor.yy674 = createStreamOptions(pCxt); }
3904
        break;
3905
      case 254: /* stream_options ::= stream_options TRIGGER AT_ONCE */
3906 3907
{ ((SStreamOptions*)yymsp[-2].minor.yy674)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy674 = yymsp[-2].minor.yy674; }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
3908
        break;
3909
      case 255: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */
3910 3911
{ ((SStreamOptions*)yymsp[-2].minor.yy674)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy674 = yymsp[-2].minor.yy674; }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
3912
        break;
3913
      case 256: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */
3914 3915
{ ((SStreamOptions*)yymsp[-3].minor.yy674)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy674)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy674); yylhsminor.yy674 = yymsp[-3].minor.yy674; }
  yymsp[-3].minor.yy674 = yylhsminor.yy674;
3916
        break;
3917
      case 257: /* stream_options ::= stream_options WATERMARK duration_literal */
3918 3919
{ ((SStreamOptions*)yymsp[-2].minor.yy674)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy674); yylhsminor.yy674 = yymsp[-2].minor.yy674; }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
3920
        break;
3921
      case 258: /* cmd ::= KILL CONNECTION NK_INTEGER */
3922 3923
{ pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); }
        break;
3924
      case 259: /* cmd ::= KILL QUERY NK_STRING */
X
Xiaoyu Wang 已提交
3925
{ pCxt->pRootNode = createKillQueryStmt(pCxt, &yymsp[0].minor.yy0); }
3926
        break;
3927
      case 260: /* cmd ::= KILL TRANSACTION NK_INTEGER */
3928 3929
{ pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_TRANSACTION_STMT, &yymsp[0].minor.yy0); }
        break;
3930
      case 261: /* cmd ::= BALANCE VGROUP */
X
Xiaoyu Wang 已提交
3931 3932
{ pCxt->pRootNode = createBalanceVgroupStmt(pCxt); }
        break;
3933
      case 262: /* cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */
3934 3935
{ pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); }
        break;
3936
      case 263: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */
3937
{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy530); }
3938
        break;
3939
      case 264: /* cmd ::= SPLIT VGROUP NK_INTEGER */
3940 3941
{ pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); }
        break;
3942
      case 265: /* dnode_list ::= DNODE NK_INTEGER */
3943 3944
{ yymsp[-1].minor.yy530 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
        break;
3945
      case 267: /* cmd ::= SYNCDB db_name REPLICA */
3946 3947
{ pCxt->pRootNode = createSyncdbStmt(pCxt, &yymsp[-1].minor.yy421); }
        break;
3948
      case 268: /* cmd ::= DELETE FROM full_table_name where_clause_opt */
3949 3950
{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy674, yymsp[0].minor.yy674); }
        break;
3951
      case 270: /* literal ::= NK_INTEGER */
3952 3953 3954
{ yylhsminor.yy674 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy674 = yylhsminor.yy674;
        break;
3955
      case 271: /* literal ::= NK_FLOAT */
3956 3957 3958
{ yylhsminor.yy674 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy674 = yylhsminor.yy674;
        break;
3959
      case 272: /* literal ::= NK_STRING */
3960 3961 3962
{ yylhsminor.yy674 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy674 = yylhsminor.yy674;
        break;
3963
      case 273: /* literal ::= NK_BOOL */
3964 3965 3966
{ yylhsminor.yy674 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy674 = yylhsminor.yy674;
        break;
3967
      case 274: /* literal ::= TIMESTAMP NK_STRING */
3968 3969 3970
{ yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); }
  yymsp[-1].minor.yy674 = yylhsminor.yy674;
        break;
3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988
      case 275: /* literal ::= duration_literal */
      case 285: /* signed_literal ::= signed */ yytestcase(yyruleno==285);
      case 305: /* expression ::= literal */ yytestcase(yyruleno==305);
      case 306: /* expression ::= pseudo_column */ yytestcase(yyruleno==306);
      case 307: /* expression ::= column_reference */ yytestcase(yyruleno==307);
      case 308: /* expression ::= function_expression */ yytestcase(yyruleno==308);
      case 309: /* expression ::= subquery */ yytestcase(yyruleno==309);
      case 334: /* function_expression ::= literal_func */ yytestcase(yyruleno==334);
      case 370: /* boolean_value_expression ::= boolean_primary */ yytestcase(yyruleno==370);
      case 374: /* boolean_primary ::= predicate */ yytestcase(yyruleno==374);
      case 376: /* common_expression ::= expression */ yytestcase(yyruleno==376);
      case 377: /* common_expression ::= boolean_value_expression */ yytestcase(yyruleno==377);
      case 379: /* table_reference_list ::= table_reference */ yytestcase(yyruleno==379);
      case 381: /* table_reference ::= table_primary */ yytestcase(yyruleno==381);
      case 382: /* table_reference ::= joined_table */ yytestcase(yyruleno==382);
      case 386: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==386);
      case 433: /* query_expression_body ::= query_primary */ yytestcase(yyruleno==433);
      case 436: /* query_primary ::= query_specification */ yytestcase(yyruleno==436);
3989 3990 3991
{ yylhsminor.yy674 = yymsp[0].minor.yy674; }
  yymsp[0].minor.yy674 = yylhsminor.yy674;
        break;
3992
      case 276: /* literal ::= NULL */
3993 3994 3995
{ yylhsminor.yy674 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy674 = yylhsminor.yy674;
        break;
3996
      case 277: /* literal ::= NK_QUESTION */
3997 3998 3999
{ yylhsminor.yy674 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy674 = yylhsminor.yy674;
        break;
4000
      case 278: /* duration_literal ::= NK_VARIABLE */
4001 4002 4003
{ yylhsminor.yy674 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy674 = yylhsminor.yy674;
        break;
4004
      case 279: /* signed ::= NK_INTEGER */
4005 4006 4007
{ yylhsminor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); }
  yymsp[0].minor.yy674 = yylhsminor.yy674;
        break;
4008
      case 280: /* signed ::= NK_PLUS NK_INTEGER */
4009 4010
{ yymsp[-1].minor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0); }
        break;
4011
      case 281: /* signed ::= NK_MINUS NK_INTEGER */
X
Xiaoyu Wang 已提交
4012 4013 4014
{ 
                                                                                    SToken t = yymsp[-1].minor.yy0;
                                                                                    t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
4015
                                                                                    yylhsminor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t);
X
Xiaoyu Wang 已提交
4016
                                                                                  }
4017
  yymsp[-1].minor.yy674 = yylhsminor.yy674;
X
Xiaoyu Wang 已提交
4018
        break;
4019
      case 282: /* signed ::= NK_FLOAT */
4020 4021
{ yylhsminor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
  yymsp[0].minor.yy674 = yylhsminor.yy674;
X
Xiaoyu Wang 已提交
4022
        break;
4023
      case 283: /* signed ::= NK_PLUS NK_FLOAT */
4024
{ yymsp[-1].minor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); }
X
Xiaoyu Wang 已提交
4025
        break;
4026
      case 284: /* signed ::= NK_MINUS NK_FLOAT */
X
Xiaoyu Wang 已提交
4027 4028 4029
{ 
                                                                                    SToken t = yymsp[-1].minor.yy0;
                                                                                    t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z;
4030
                                                                                    yylhsminor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t);
X
Xiaoyu Wang 已提交
4031
                                                                                  }
4032
  yymsp[-1].minor.yy674 = yylhsminor.yy674;
4033
        break;
4034
      case 286: /* signed_literal ::= NK_STRING */
4035 4036
{ yylhsminor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); }
  yymsp[0].minor.yy674 = yylhsminor.yy674;
4037
        break;
4038
      case 287: /* signed_literal ::= NK_BOOL */
4039 4040
{ yylhsminor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); }
  yymsp[0].minor.yy674 = yylhsminor.yy674;
X
Xiaoyu Wang 已提交
4041
        break;
4042
      case 288: /* signed_literal ::= TIMESTAMP NK_STRING */
4043
{ yymsp[-1].minor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); }
X
Xiaoyu Wang 已提交
4044
        break;
4045 4046 4047 4048 4049
      case 289: /* signed_literal ::= duration_literal */
      case 291: /* signed_literal ::= literal_func */ yytestcase(yyruleno==291);
      case 348: /* star_func_para ::= expression */ yytestcase(yyruleno==348);
      case 403: /* select_item ::= common_expression */ yytestcase(yyruleno==403);
      case 449: /* search_condition ::= common_expression */ yytestcase(yyruleno==449);
4050 4051
{ yylhsminor.yy674 = releaseRawExprNode(pCxt, yymsp[0].minor.yy674); }
  yymsp[0].minor.yy674 = yylhsminor.yy674;
X
Xiaoyu Wang 已提交
4052
        break;
4053
      case 290: /* signed_literal ::= NULL */
4054 4055
{ yylhsminor.yy674 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); }
  yymsp[0].minor.yy674 = yylhsminor.yy674;
X
Xiaoyu Wang 已提交
4056
        break;
4057 4058
      case 310: /* expression ::= NK_LP expression NK_RP */
      case 375: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==375);
4059 4060
{ yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy674)); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
4061
        break;
4062
      case 311: /* expression ::= NK_PLUS expression */
4063
{
4064 4065
                                                                                    SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674);
                                                                                    yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy674));
4066
                                                                                  }
4067
  yymsp[-1].minor.yy674 = yylhsminor.yy674;
X
Xiaoyu Wang 已提交
4068
        break;
4069
      case 312: /* expression ::= NK_MINUS expression */
4070
{
4071 4072
                                                                                    SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674);
                                                                                    yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy674), NULL));
4073
                                                                                  }
4074
  yymsp[-1].minor.yy674 = yylhsminor.yy674;
4075
        break;
4076
      case 313: /* expression ::= expression NK_PLUS expression */
4077
{
4078 4079 4080
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674);
                                                                                    yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); 
4081
                                                                                  }
4082
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
4083
        break;
4084
      case 314: /* expression ::= expression NK_MINUS expression */
4085
{
4086 4087 4088
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674);
                                                                                    yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); 
4089
                                                                                  }
4090
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
4091
        break;
4092
      case 315: /* expression ::= expression NK_STAR expression */
4093
{
4094 4095 4096
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674);
                                                                                    yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); 
4097
                                                                                  }
4098
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
4099
        break;
4100
      case 316: /* expression ::= expression NK_SLASH expression */
4101
{
4102 4103 4104
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674);
                                                                                    yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); 
4105
                                                                                  }
4106
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
4107
        break;
4108
      case 317: /* expression ::= expression NK_REM expression */
4109
{
4110 4111 4112
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674);
                                                                                    yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674)));
4113
                                                                                  }
4114
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
4115
        break;
4116
      case 318: /* expression ::= column_reference NK_ARROW NK_STRING */
4117
{
4118 4119
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674);
                                                                                    yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); 
4120
                                                                                  }
4121 4122
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
        break;
4123
      case 321: /* column_reference ::= column_name */
4124 4125 4126
{ yylhsminor.yy674 = createRawExprNode(pCxt, &yymsp[0].minor.yy421, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy421)); }
  yymsp[0].minor.yy674 = yylhsminor.yy674;
        break;
4127
      case 322: /* column_reference ::= table_name NK_DOT column_name */
4128 4129 4130
{ yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy421, createColumnNode(pCxt, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy421)); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
        break;
4131 4132 4133 4134 4135 4136 4137 4138
      case 323: /* pseudo_column ::= ROWTS */
      case 324: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==324);
      case 326: /* pseudo_column ::= QSTARTTS */ yytestcase(yyruleno==326);
      case 327: /* pseudo_column ::= QENDTS */ yytestcase(yyruleno==327);
      case 328: /* pseudo_column ::= WSTARTTS */ yytestcase(yyruleno==328);
      case 329: /* pseudo_column ::= WENDTS */ yytestcase(yyruleno==329);
      case 330: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==330);
      case 336: /* literal_func ::= NOW */ yytestcase(yyruleno==336);
4139 4140 4141
{ yylhsminor.yy674 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); }
  yymsp[0].minor.yy674 = yylhsminor.yy674;
        break;
4142
      case 325: /* pseudo_column ::= table_name NK_DOT TBNAME */
4143 4144 4145
{ yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy421)))); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
        break;
4146 4147
      case 331: /* function_expression ::= function_name NK_LP expression_list NK_RP */
      case 332: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==332);
4148 4149 4150
{ yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy421, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy421, yymsp[-1].minor.yy530)); }
  yymsp[-3].minor.yy674 = yylhsminor.yy674;
        break;
4151
      case 333: /* function_expression ::= CAST NK_LP expression AS type_name NK_RP */
4152 4153 4154
{ yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy674), yymsp[-1].minor.yy690)); }
  yymsp[-5].minor.yy674 = yylhsminor.yy674;
        break;
4155
      case 335: /* literal_func ::= noarg_func NK_LP NK_RP */
4156 4157 4158
{ yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy421, NULL)); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
        break;
4159
      case 344: /* star_func_para_list ::= NK_STAR */
4160 4161 4162
{ yylhsminor.yy530 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); }
  yymsp[0].minor.yy530 = yylhsminor.yy530;
        break;
4163 4164
      case 349: /* star_func_para ::= table_name NK_DOT NK_STAR */
      case 406: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==406);
4165 4166 4167
{ yylhsminor.yy674 = createColumnNode(pCxt, &yymsp[-2].minor.yy421, &yymsp[0].minor.yy0); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
        break;
4168 4169
      case 350: /* predicate ::= expression compare_op expression */
      case 355: /* predicate ::= expression in_op in_predicate_value */ yytestcase(yyruleno==355);
4170
{
4171 4172 4173
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674);
                                                                                    yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy28, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674)));
4174
                                                                                  }
4175
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
4176
        break;
4177
      case 351: /* predicate ::= expression BETWEEN expression AND expression */
4178
{
4179 4180 4181
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy674);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674);
                                                                                    yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy674), releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674)));
4182
                                                                                  }
4183
  yymsp[-4].minor.yy674 = yylhsminor.yy674;
4184
        break;
4185
      case 352: /* predicate ::= expression NOT BETWEEN expression AND expression */
4186
{
4187 4188 4189
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy674);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674);
                                                                                    yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy674), releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674)));
4190
                                                                                  }
4191
  yymsp[-5].minor.yy674 = yylhsminor.yy674;
4192
        break;
4193
      case 353: /* predicate ::= expression IS NULL */
4194
{
4195 4196
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674);
                                                                                    yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), NULL));
4197
                                                                                  }
4198
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
4199
        break;
4200
      case 354: /* predicate ::= expression IS NOT NULL */
4201
{
4202 4203
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy674);
                                                                                    yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy674), NULL));
4204
                                                                                  }
4205
  yymsp[-3].minor.yy674 = yylhsminor.yy674;
4206
        break;
4207
      case 356: /* compare_op ::= NK_LT */
4208
{ yymsp[0].minor.yy28 = OP_TYPE_LOWER_THAN; }
4209
        break;
4210
      case 357: /* compare_op ::= NK_GT */
4211
{ yymsp[0].minor.yy28 = OP_TYPE_GREATER_THAN; }
4212
        break;
4213
      case 358: /* compare_op ::= NK_LE */
4214
{ yymsp[0].minor.yy28 = OP_TYPE_LOWER_EQUAL; }
4215
        break;
4216
      case 359: /* compare_op ::= NK_GE */
4217
{ yymsp[0].minor.yy28 = OP_TYPE_GREATER_EQUAL; }
4218
        break;
4219
      case 360: /* compare_op ::= NK_NE */
4220
{ yymsp[0].minor.yy28 = OP_TYPE_NOT_EQUAL; }
4221
        break;
4222
      case 361: /* compare_op ::= NK_EQ */
4223
{ yymsp[0].minor.yy28 = OP_TYPE_EQUAL; }
4224
        break;
4225
      case 362: /* compare_op ::= LIKE */
4226
{ yymsp[0].minor.yy28 = OP_TYPE_LIKE; }
4227
        break;
4228
      case 363: /* compare_op ::= NOT LIKE */
4229
{ yymsp[-1].minor.yy28 = OP_TYPE_NOT_LIKE; }
4230
        break;
4231
      case 364: /* compare_op ::= MATCH */
4232
{ yymsp[0].minor.yy28 = OP_TYPE_MATCH; }
4233
        break;
4234
      case 365: /* compare_op ::= NMATCH */
4235
{ yymsp[0].minor.yy28 = OP_TYPE_NMATCH; }
4236
        break;
4237
      case 366: /* compare_op ::= CONTAINS */
4238
{ yymsp[0].minor.yy28 = OP_TYPE_JSON_CONTAINS; }
4239
        break;
4240
      case 367: /* in_op ::= IN */
4241
{ yymsp[0].minor.yy28 = OP_TYPE_IN; }
4242
        break;
4243
      case 368: /* in_op ::= NOT IN */
4244
{ yymsp[-1].minor.yy28 = OP_TYPE_NOT_IN; }
4245
        break;
4246
      case 369: /* in_predicate_value ::= NK_LP expression_list NK_RP */
4247 4248
{ yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy530)); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
4249
        break;
4250
      case 371: /* boolean_value_expression ::= NOT boolean_primary */
4251
{
4252 4253
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674);
                                                                                    yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy674), NULL));
4254
                                                                                  }
4255
  yymsp[-1].minor.yy674 = yylhsminor.yy674;
4256
        break;
4257
      case 372: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */
4258
{
4259 4260 4261
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674);
                                                                                    yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674)));
4262
                                                                                  }
4263
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
4264
        break;
4265
      case 373: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */
4266
{
4267 4268 4269
                                                                                    SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy674);
                                                                                    SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy674);
                                                                                    yylhsminor.yy674 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), releaseRawExprNode(pCxt, yymsp[0].minor.yy674)));
4270
                                                                                  }
4271
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
4272
        break;
4273
      case 380: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */
4274 4275
{ yylhsminor.yy674 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy674, yymsp[0].minor.yy674, NULL); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
4276
        break;
4277
      case 383: /* table_primary ::= table_name alias_opt */
4278 4279
{ yylhsminor.yy674 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy421, &yymsp[0].minor.yy421); }
  yymsp[-1].minor.yy674 = yylhsminor.yy674;
4280
        break;
4281
      case 384: /* table_primary ::= db_name NK_DOT table_name alias_opt */
4282 4283
{ yylhsminor.yy674 = createRealTableNode(pCxt, &yymsp[-3].minor.yy421, &yymsp[-1].minor.yy421, &yymsp[0].minor.yy421); }
  yymsp[-3].minor.yy674 = yylhsminor.yy674;
4284
        break;
4285
      case 385: /* table_primary ::= subquery alias_opt */
4286 4287
{ yylhsminor.yy674 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy674), &yymsp[0].minor.yy421); }
  yymsp[-1].minor.yy674 = yylhsminor.yy674;
4288
        break;
4289
      case 387: /* alias_opt ::= */
4290
{ yymsp[1].minor.yy421 = nil_token;  }
4291
        break;
4292
      case 388: /* alias_opt ::= table_alias */
4293 4294
{ yylhsminor.yy421 = yymsp[0].minor.yy421; }
  yymsp[0].minor.yy421 = yylhsminor.yy421;
4295
        break;
4296
      case 389: /* alias_opt ::= AS table_alias */
4297
{ yymsp[-1].minor.yy421 = yymsp[0].minor.yy421; }
4298
        break;
4299 4300
      case 390: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */
      case 391: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==391);
4301
{ yymsp[-2].minor.yy674 = yymsp[-1].minor.yy674; }
4302
        break;
4303
      case 392: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */
4304 4305
{ yylhsminor.yy674 = createJoinTableNode(pCxt, yymsp[-4].minor.yy636, yymsp[-5].minor.yy674, yymsp[-2].minor.yy674, yymsp[0].minor.yy674); }
  yymsp[-5].minor.yy674 = yylhsminor.yy674;
4306
        break;
4307
      case 393: /* join_type ::= */
4308
{ yymsp[1].minor.yy636 = JOIN_TYPE_INNER; }
4309
        break;
4310
      case 394: /* join_type ::= INNER */
4311
{ yymsp[0].minor.yy636 = JOIN_TYPE_INNER; }
4312
        break;
4313
      case 395: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause where_clause_opt partition_by_clause_opt twindow_clause_opt group_by_clause_opt having_clause_opt */
4314
{ 
4315 4316 4317 4318 4319 4320
                                                                                    yymsp[-8].minor.yy674 = createSelectStmt(pCxt, yymsp[-7].minor.yy621, yymsp[-6].minor.yy530, yymsp[-5].minor.yy674);
                                                                                    yymsp[-8].minor.yy674 = addWhereClause(pCxt, yymsp[-8].minor.yy674, yymsp[-4].minor.yy674);
                                                                                    yymsp[-8].minor.yy674 = addPartitionByClause(pCxt, yymsp[-8].minor.yy674, yymsp[-3].minor.yy530);
                                                                                    yymsp[-8].minor.yy674 = addWindowClauseClause(pCxt, yymsp[-8].minor.yy674, yymsp[-2].minor.yy674);
                                                                                    yymsp[-8].minor.yy674 = addGroupByClause(pCxt, yymsp[-8].minor.yy674, yymsp[-1].minor.yy530);
                                                                                    yymsp[-8].minor.yy674 = addHavingClause(pCxt, yymsp[-8].minor.yy674, yymsp[0].minor.yy674);
4321 4322
                                                                                  }
        break;
4323
      case 398: /* set_quantifier_opt ::= ALL */
4324
{ yymsp[0].minor.yy621 = false; }
4325
        break;
4326
      case 399: /* select_list ::= NK_STAR */
4327
{ yymsp[0].minor.yy530 = NULL; }
4328
        break;
4329
      case 404: /* select_item ::= common_expression column_alias */
4330 4331
{ yylhsminor.yy674 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy674), &yymsp[0].minor.yy421); }
  yymsp[-1].minor.yy674 = yylhsminor.yy674;
4332
        break;
4333
      case 405: /* select_item ::= common_expression AS column_alias */
4334 4335
{ yylhsminor.yy674 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), &yymsp[0].minor.yy421); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
4336
        break;
4337 4338 4339
      case 410: /* partition_by_clause_opt ::= PARTITION BY expression_list */
      case 427: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==427);
      case 439: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==439);
4340
{ yymsp[-2].minor.yy530 = yymsp[0].minor.yy530; }
4341
        break;
4342
      case 412: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
4343
{ yymsp[-5].minor.yy674 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy674), releaseRawExprNode(pCxt, yymsp[-1].minor.yy674)); }
4344
        break;
4345
      case 413: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */
4346
{ yymsp[-3].minor.yy674 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy674)); }
4347
        break;
4348
      case 414: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */
4349
{ yymsp[-5].minor.yy674 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy674), NULL, yymsp[-1].minor.yy674, yymsp[0].minor.yy674); }
4350
        break;
4351
      case 415: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */
4352
{ yymsp[-7].minor.yy674 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy674), releaseRawExprNode(pCxt, yymsp[-3].minor.yy674), yymsp[-1].minor.yy674, yymsp[0].minor.yy674); }
4353
        break;
4354
      case 417: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */
4355
{ yymsp[-3].minor.yy674 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy674); }
4356
        break;
4357
      case 419: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */
4358
{ yymsp[-3].minor.yy674 = createFillNode(pCxt, yymsp[-1].minor.yy320, NULL); }
4359
        break;
4360
      case 420: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */
4361
{ yymsp[-5].minor.yy674 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy530)); }
4362
        break;
4363
      case 421: /* fill_mode ::= NONE */
4364
{ yymsp[0].minor.yy320 = FILL_MODE_NONE; }
4365
        break;
4366
      case 422: /* fill_mode ::= PREV */
4367
{ yymsp[0].minor.yy320 = FILL_MODE_PREV; }
4368
        break;
4369
      case 423: /* fill_mode ::= NULL */
4370
{ yymsp[0].minor.yy320 = FILL_MODE_NULL; }
4371
        break;
4372
      case 424: /* fill_mode ::= LINEAR */
4373
{ yymsp[0].minor.yy320 = FILL_MODE_LINEAR; }
4374
        break;
4375
      case 425: /* fill_mode ::= NEXT */
4376
{ yymsp[0].minor.yy320 = FILL_MODE_NEXT; }
4377
        break;
4378
      case 428: /* group_by_list ::= expression */
4379 4380
{ yylhsminor.yy530 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); }
  yymsp[0].minor.yy530 = yylhsminor.yy530;
4381
        break;
4382
      case 429: /* group_by_list ::= group_by_list NK_COMMA expression */
4383 4384
{ yylhsminor.yy530 = addNodeToList(pCxt, yymsp[-2].minor.yy530, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy674))); }
  yymsp[-2].minor.yy530 = yylhsminor.yy530;
4385
        break;
4386
      case 432: /* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */
4387
{ 
4388 4389 4390
                                                                                    yylhsminor.yy674 = addOrderByClause(pCxt, yymsp[-3].minor.yy674, yymsp[-2].minor.yy530);
                                                                                    yylhsminor.yy674 = addSlimitClause(pCxt, yylhsminor.yy674, yymsp[-1].minor.yy674);
                                                                                    yylhsminor.yy674 = addLimitClause(pCxt, yylhsminor.yy674, yymsp[0].minor.yy674);
4391
                                                                                  }
4392
  yymsp[-3].minor.yy674 = yylhsminor.yy674;
4393
        break;
4394
      case 434: /* query_expression_body ::= query_expression_body UNION ALL query_expression_body */
4395 4396
{ yylhsminor.yy674 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy674, yymsp[0].minor.yy674); }
  yymsp[-3].minor.yy674 = yylhsminor.yy674;
4397
        break;
4398
      case 435: /* query_expression_body ::= query_expression_body UNION query_expression_body */
4399 4400
{ yylhsminor.yy674 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy674, yymsp[0].minor.yy674); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
X
Xiaoyu Wang 已提交
4401
        break;
4402
      case 437: /* query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */
4403 4404 4405 4406
{ yymsp[-5].minor.yy674 = yymsp[-4].minor.yy674; }
  yy_destructor(yypParser,351,&yymsp[-3].minor);
  yy_destructor(yypParser,352,&yymsp[-2].minor);
  yy_destructor(yypParser,353,&yymsp[-1].minor);
X
Xiaoyu Wang 已提交
4407
        break;
4408 4409
      case 441: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */
      case 445: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==445);
4410
{ yymsp[-1].minor.yy674 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); }
4411
        break;
4412 4413
      case 442: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
      case 446: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==446);
4414
{ yymsp[-3].minor.yy674 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); }
4415
        break;
4416 4417
      case 443: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
      case 447: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==447);
4418
{ yymsp[-3].minor.yy674 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); }
4419
        break;
4420
      case 448: /* subquery ::= NK_LP query_expression NK_RP */
4421 4422
{ yylhsminor.yy674 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy674); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
4423
        break;
4424
      case 452: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */
4425 4426
{ yylhsminor.yy674 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy674), yymsp[-1].minor.yy610, yymsp[0].minor.yy107); }
  yymsp[-2].minor.yy674 = yylhsminor.yy674;
4427
        break;
4428
      case 453: /* ordering_specification_opt ::= */
4429
{ yymsp[1].minor.yy610 = ORDER_ASC; }
4430
        break;
4431
      case 454: /* ordering_specification_opt ::= ASC */
4432
{ yymsp[0].minor.yy610 = ORDER_ASC; }
4433
        break;
4434
      case 455: /* ordering_specification_opt ::= DESC */
4435
{ yymsp[0].minor.yy610 = ORDER_DESC; }
4436
        break;
4437
      case 456: /* null_ordering_opt ::= */
4438
{ yymsp[1].minor.yy107 = NULL_ORDER_DEFAULT; }
4439
        break;
4440
      case 457: /* null_ordering_opt ::= NULLS FIRST */
4441
{ yymsp[-1].minor.yy107 = NULL_ORDER_FIRST; }
4442
        break;
4443
      case 458: /* null_ordering_opt ::= NULLS LAST */
4444
{ yymsp[-1].minor.yy107 = NULL_ORDER_LAST; }
4445 4446 4447 4448 4449
        break;
      default:
        break;
/********** End reduce actions ************************************************/
  };
X
Xiaoyu Wang 已提交
4450 4451 4452
  assert( yyruleno<sizeof(yyRuleInfo)/sizeof(yyRuleInfo[0]) );
  yygoto = yyRuleInfo[yyruleno].lhs;
  yysize = yyRuleInfo[yyruleno].nrhs;
4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476
  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 已提交
4477 4478
  ParseARG_FETCH
  ParseCTX_FETCH
4479 4480 4481 4482 4483 4484 4485 4486 4487 4488
#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 已提交
4489 4490
  ParseARG_STORE /* Suppress warning about unused %extra_argument variable */
  ParseCTX_STORE
4491 4492 4493 4494 4495 4496 4497 4498 4499
}
#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 已提交
4500
  ParseTOKENTYPE yyminor         /* The minor type of the error token */
4501
){
X
Xiaoyu Wang 已提交
4502 4503
  ParseARG_FETCH
  ParseCTX_FETCH
4504 4505
#define TOKEN yyminor
/************ Begin %syntax_error code ****************************************/
4506

4507
  if (TSDB_CODE_SUCCESS == pCxt->errCode) {
4508
    if(TOKEN.z) {
4509
      pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR, TOKEN.z);
4510
    } else {
4511
      pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INCOMPLETE_SQL);
4512
    }
4513 4514
  }
/************ End %syntax_error code ******************************************/
X
Xiaoyu Wang 已提交
4515 4516
  ParseARG_STORE /* Suppress warning about unused %extra_argument variable */
  ParseCTX_STORE
4517 4518 4519 4520 4521 4522 4523 4524
}

/*
** The following is executed when the parser accepts
*/
static void yy_accept(
  yyParser *yypParser           /* The parser */
){
X
Xiaoyu Wang 已提交
4525 4526
  ParseARG_FETCH
  ParseCTX_FETCH
4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539
#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 已提交
4540 4541
  ParseARG_STORE /* Suppress warning about unused %extra_argument variable */
  ParseCTX_STORE
4542 4543 4544 4545
}

/* The main parser program.
** The first argument is a pointer to a structure obtained from
X
Xiaoyu Wang 已提交
4546
** "ParseAlloc" which describes the current state of the parser.
4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562
** 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 已提交
4563
void Parse(
4564 4565
  void *yyp,                   /* The parser */
  int yymajor,                 /* The major token code number */
X
Xiaoyu Wang 已提交
4566 4567
  ParseTOKENTYPE yyminor       /* The value for the token */
  ParseARG_PDECL               /* Optional %extra_argument parameter */
4568 4569 4570 4571 4572 4573 4574 4575 4576 4577
){
  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 已提交
4578 4579
  ParseCTX_FETCH
  ParseARG_STORE
4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598

  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 已提交
4599
  do{
4600 4601 4602
    assert( yyact==yypParser->yytos->stateno );
    yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact);
    if( yyact >= YY_MIN_REDUCE ){
X
Xiaoyu Wang 已提交
4603 4604
      yyact = yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor,
                        yyminor ParseCTX_PARAM);
4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659
    }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 已提交
4660 4661 4662 4663 4664
        while( yypParser->yytos >= yypParser->yystack
            && (yyact = yy_find_reduce_action(
                        yypParser->yytos->stateno,
                        YYERRORSYMBOL)) > YY_MAX_SHIFTREDUCE
        ){
4665 4666
          yy_pop_parser_stack(yypParser);
        }
X
Xiaoyu Wang 已提交
4667
        if( yypParser->yytos < yypParser->yystack || yymajor==0 ){
4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716
          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 已提交
4717
  }while( yypParser->yytos>yypParser->yystack );
4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736
#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 已提交
4737
int ParseFallback(int iToken){
4738
#ifdef YYFALLBACK
X
Xiaoyu Wang 已提交
4739 4740 4741
  if( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) ){
    return yyFallback[iToken];
  }
4742 4743
#else
  (void)iToken;
D
dapan1121 已提交
4744
#endif
X
Xiaoyu Wang 已提交
4745
  return 0;
4746
}