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

#ifndef NDEBUG
/* For tracing reduce actions, the names of all rules are required.
*/
static const char *const yyRuleName[] = {
1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542
 /*   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",
1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553
 /*  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",
1554
 /*  39 */ "cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER",
1555 1556 1557 1558 1559 1560 1561
 /*  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",
1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 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
 /*  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",
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
 /* 212 */ "cmd ::= SHOW TABLE DISTRIBUTED full_table_name",
 /* 213 */ "db_name_cond_opt ::=",
 /* 214 */ "db_name_cond_opt ::= db_name NK_DOT",
 /* 215 */ "like_pattern_opt ::=",
 /* 216 */ "like_pattern_opt ::= LIKE NK_STRING",
 /* 217 */ "table_name_cond ::= table_name",
 /* 218 */ "from_db_opt ::=",
 /* 219 */ "from_db_opt ::= FROM db_name",
 /* 220 */ "cmd ::= CREATE SMA INDEX not_exists_opt index_name ON table_name index_options",
 /* 221 */ "cmd ::= CREATE FULLTEXT INDEX not_exists_opt index_name ON table_name NK_LP col_name_list NK_RP",
 /* 222 */ "cmd ::= DROP INDEX exists_opt index_name ON table_name",
 /* 223 */ "index_options ::=",
 /* 224 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt",
 /* 225 */ "index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt",
 /* 226 */ "func_list ::= func",
 /* 227 */ "func_list ::= func_list NK_COMMA func",
 /* 228 */ "func ::= function_name NK_LP expression_list NK_RP",
 /* 229 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression",
 /* 230 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name",
 /* 231 */ "cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name",
 /* 232 */ "cmd ::= DROP TOPIC exists_opt topic_name",
 /* 233 */ "cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name",
 /* 234 */ "cmd ::= DESC full_table_name",
 /* 235 */ "cmd ::= DESCRIBE full_table_name",
 /* 236 */ "cmd ::= RESET QUERY CACHE",
 /* 237 */ "cmd ::= EXPLAIN analyze_opt explain_options query_expression",
 /* 238 */ "analyze_opt ::=",
 /* 239 */ "analyze_opt ::= ANALYZE",
 /* 240 */ "explain_options ::=",
 /* 241 */ "explain_options ::= explain_options VERBOSE NK_BOOL",
 /* 242 */ "explain_options ::= explain_options RATIO NK_FLOAT",
 /* 243 */ "cmd ::= COMPACT VNODES IN NK_LP integer_list NK_RP",
 /* 244 */ "cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt",
 /* 245 */ "cmd ::= DROP FUNCTION exists_opt function_name",
 /* 246 */ "agg_func_opt ::=",
 /* 247 */ "agg_func_opt ::= AGGREGATE",
 /* 248 */ "bufsize_opt ::=",
 /* 249 */ "bufsize_opt ::= BUFSIZE NK_INTEGER",
 /* 250 */ "cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression",
 /* 251 */ "cmd ::= DROP STREAM exists_opt stream_name",
 /* 252 */ "into_opt ::=",
 /* 253 */ "into_opt ::= INTO full_table_name",
 /* 254 */ "stream_options ::=",
 /* 255 */ "stream_options ::= stream_options TRIGGER AT_ONCE",
 /* 256 */ "stream_options ::= stream_options TRIGGER WINDOW_CLOSE",
 /* 257 */ "stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal",
 /* 258 */ "stream_options ::= stream_options WATERMARK duration_literal",
 /* 259 */ "cmd ::= KILL CONNECTION NK_INTEGER",
 /* 260 */ "cmd ::= KILL QUERY NK_STRING",
 /* 261 */ "cmd ::= KILL TRANSACTION NK_INTEGER",
 /* 262 */ "cmd ::= BALANCE VGROUP",
 /* 263 */ "cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER",
 /* 264 */ "cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list",
 /* 265 */ "cmd ::= SPLIT VGROUP NK_INTEGER",
 /* 266 */ "dnode_list ::= DNODE NK_INTEGER",
 /* 267 */ "dnode_list ::= dnode_list DNODE NK_INTEGER",
 /* 268 */ "cmd ::= SYNCDB db_name REPLICA",
 /* 269 */ "cmd ::= DELETE FROM full_table_name where_clause_opt",
 /* 270 */ "cmd ::= query_expression",
 /* 271 */ "literal ::= NK_INTEGER",
 /* 272 */ "literal ::= NK_FLOAT",
 /* 273 */ "literal ::= NK_STRING",
 /* 274 */ "literal ::= NK_BOOL",
 /* 275 */ "literal ::= TIMESTAMP NK_STRING",
 /* 276 */ "literal ::= duration_literal",
 /* 277 */ "literal ::= NULL",
 /* 278 */ "literal ::= NK_QUESTION",
 /* 279 */ "duration_literal ::= NK_VARIABLE",
 /* 280 */ "signed ::= NK_INTEGER",
 /* 281 */ "signed ::= NK_PLUS NK_INTEGER",
 /* 282 */ "signed ::= NK_MINUS NK_INTEGER",
 /* 283 */ "signed ::= NK_FLOAT",
 /* 284 */ "signed ::= NK_PLUS NK_FLOAT",
 /* 285 */ "signed ::= NK_MINUS NK_FLOAT",
 /* 286 */ "signed_literal ::= signed",
 /* 287 */ "signed_literal ::= NK_STRING",
 /* 288 */ "signed_literal ::= NK_BOOL",
 /* 289 */ "signed_literal ::= TIMESTAMP NK_STRING",
 /* 290 */ "signed_literal ::= duration_literal",
 /* 291 */ "signed_literal ::= NULL",
 /* 292 */ "signed_literal ::= literal_func",
 /* 293 */ "literal_list ::= signed_literal",
 /* 294 */ "literal_list ::= literal_list NK_COMMA signed_literal",
 /* 295 */ "db_name ::= NK_ID",
 /* 296 */ "table_name ::= NK_ID",
 /* 297 */ "column_name ::= NK_ID",
 /* 298 */ "function_name ::= NK_ID",
 /* 299 */ "table_alias ::= NK_ID",
 /* 300 */ "column_alias ::= NK_ID",
 /* 301 */ "user_name ::= NK_ID",
 /* 302 */ "index_name ::= NK_ID",
 /* 303 */ "topic_name ::= NK_ID",
 /* 304 */ "stream_name ::= NK_ID",
 /* 305 */ "cgroup_name ::= NK_ID",
 /* 306 */ "expression ::= literal",
 /* 307 */ "expression ::= pseudo_column",
 /* 308 */ "expression ::= column_reference",
 /* 309 */ "expression ::= function_expression",
 /* 310 */ "expression ::= subquery",
 /* 311 */ "expression ::= NK_LP expression NK_RP",
 /* 312 */ "expression ::= NK_PLUS expression",
 /* 313 */ "expression ::= NK_MINUS expression",
 /* 314 */ "expression ::= expression NK_PLUS expression",
 /* 315 */ "expression ::= expression NK_MINUS expression",
 /* 316 */ "expression ::= expression NK_STAR expression",
 /* 317 */ "expression ::= expression NK_SLASH expression",
 /* 318 */ "expression ::= expression NK_REM expression",
 /* 319 */ "expression ::= column_reference NK_ARROW NK_STRING",
 /* 320 */ "expression_list ::= expression",
 /* 321 */ "expression_list ::= expression_list NK_COMMA expression",
 /* 322 */ "column_reference ::= column_name",
 /* 323 */ "column_reference ::= table_name NK_DOT column_name",
 /* 324 */ "pseudo_column ::= ROWTS",
 /* 325 */ "pseudo_column ::= TBNAME",
 /* 326 */ "pseudo_column ::= table_name NK_DOT TBNAME",
 /* 327 */ "pseudo_column ::= QSTARTTS",
 /* 328 */ "pseudo_column ::= QENDTS",
 /* 329 */ "pseudo_column ::= WSTARTTS",
 /* 330 */ "pseudo_column ::= WENDTS",
 /* 331 */ "pseudo_column ::= WDURATION",
 /* 332 */ "function_expression ::= function_name NK_LP expression_list NK_RP",
 /* 333 */ "function_expression ::= star_func NK_LP star_func_para_list NK_RP",
 /* 334 */ "function_expression ::= CAST NK_LP expression AS type_name NK_RP",
 /* 335 */ "function_expression ::= literal_func",
 /* 336 */ "literal_func ::= noarg_func NK_LP NK_RP",
 /* 337 */ "literal_func ::= NOW",
 /* 338 */ "noarg_func ::= NOW",
 /* 339 */ "noarg_func ::= TODAY",
 /* 340 */ "noarg_func ::= TIMEZONE",
 /* 341 */ "star_func ::= COUNT",
 /* 342 */ "star_func ::= FIRST",
 /* 343 */ "star_func ::= LAST",
 /* 344 */ "star_func ::= LAST_ROW",
 /* 345 */ "star_func_para_list ::= NK_STAR",
 /* 346 */ "star_func_para_list ::= other_para_list",
 /* 347 */ "other_para_list ::= star_func_para",
 /* 348 */ "other_para_list ::= other_para_list NK_COMMA star_func_para",
 /* 349 */ "star_func_para ::= expression",
 /* 350 */ "star_func_para ::= table_name NK_DOT NK_STAR",
 /* 351 */ "predicate ::= expression compare_op expression",
 /* 352 */ "predicate ::= expression BETWEEN expression AND expression",
 /* 353 */ "predicate ::= expression NOT BETWEEN expression AND expression",
 /* 354 */ "predicate ::= expression IS NULL",
 /* 355 */ "predicate ::= expression IS NOT NULL",
 /* 356 */ "predicate ::= expression in_op in_predicate_value",
 /* 357 */ "compare_op ::= NK_LT",
 /* 358 */ "compare_op ::= NK_GT",
 /* 359 */ "compare_op ::= NK_LE",
 /* 360 */ "compare_op ::= NK_GE",
 /* 361 */ "compare_op ::= NK_NE",
 /* 362 */ "compare_op ::= NK_EQ",
 /* 363 */ "compare_op ::= LIKE",
 /* 364 */ "compare_op ::= NOT LIKE",
 /* 365 */ "compare_op ::= MATCH",
 /* 366 */ "compare_op ::= NMATCH",
 /* 367 */ "compare_op ::= CONTAINS",
 /* 368 */ "in_op ::= IN",
 /* 369 */ "in_op ::= NOT IN",
 /* 370 */ "in_predicate_value ::= NK_LP expression_list NK_RP",
 /* 371 */ "boolean_value_expression ::= boolean_primary",
 /* 372 */ "boolean_value_expression ::= NOT boolean_primary",
 /* 373 */ "boolean_value_expression ::= boolean_value_expression OR boolean_value_expression",
 /* 374 */ "boolean_value_expression ::= boolean_value_expression AND boolean_value_expression",
 /* 375 */ "boolean_primary ::= predicate",
 /* 376 */ "boolean_primary ::= NK_LP boolean_value_expression NK_RP",
 /* 377 */ "common_expression ::= expression",
 /* 378 */ "common_expression ::= boolean_value_expression",
 /* 379 */ "from_clause ::= FROM table_reference_list",
 /* 380 */ "table_reference_list ::= table_reference",
 /* 381 */ "table_reference_list ::= table_reference_list NK_COMMA table_reference",
 /* 382 */ "table_reference ::= table_primary",
 /* 383 */ "table_reference ::= joined_table",
 /* 384 */ "table_primary ::= table_name alias_opt",
 /* 385 */ "table_primary ::= db_name NK_DOT table_name alias_opt",
 /* 386 */ "table_primary ::= subquery alias_opt",
 /* 387 */ "table_primary ::= parenthesized_joined_table",
 /* 388 */ "alias_opt ::=",
 /* 389 */ "alias_opt ::= table_alias",
 /* 390 */ "alias_opt ::= AS table_alias",
 /* 391 */ "parenthesized_joined_table ::= NK_LP joined_table NK_RP",
 /* 392 */ "parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP",
 /* 393 */ "joined_table ::= table_reference join_type JOIN table_reference ON search_condition",
 /* 394 */ "join_type ::=",
 /* 395 */ "join_type ::= INNER",
 /* 396 */ "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",
 /* 397 */ "set_quantifier_opt ::=",
 /* 398 */ "set_quantifier_opt ::= DISTINCT",
 /* 399 */ "set_quantifier_opt ::= ALL",
 /* 400 */ "select_list ::= NK_STAR",
 /* 401 */ "select_list ::= select_sublist",
 /* 402 */ "select_sublist ::= select_item",
 /* 403 */ "select_sublist ::= select_sublist NK_COMMA select_item",
 /* 404 */ "select_item ::= common_expression",
 /* 405 */ "select_item ::= common_expression column_alias",
 /* 406 */ "select_item ::= common_expression AS column_alias",
 /* 407 */ "select_item ::= table_name NK_DOT NK_STAR",
 /* 408 */ "where_clause_opt ::=",
 /* 409 */ "where_clause_opt ::= WHERE search_condition",
 /* 410 */ "partition_by_clause_opt ::=",
 /* 411 */ "partition_by_clause_opt ::= PARTITION BY expression_list",
 /* 412 */ "twindow_clause_opt ::=",
 /* 413 */ "twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP",
 /* 414 */ "twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP",
 /* 415 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt",
 /* 416 */ "twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt",
 /* 417 */ "sliding_opt ::=",
 /* 418 */ "sliding_opt ::= SLIDING NK_LP duration_literal NK_RP",
 /* 419 */ "fill_opt ::=",
 /* 420 */ "fill_opt ::= FILL NK_LP fill_mode NK_RP",
 /* 421 */ "fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP",
 /* 422 */ "fill_mode ::= NONE",
 /* 423 */ "fill_mode ::= PREV",
 /* 424 */ "fill_mode ::= NULL",
 /* 425 */ "fill_mode ::= LINEAR",
 /* 426 */ "fill_mode ::= NEXT",
 /* 427 */ "group_by_clause_opt ::=",
 /* 428 */ "group_by_clause_opt ::= GROUP BY group_by_list",
 /* 429 */ "group_by_list ::= expression",
 /* 430 */ "group_by_list ::= group_by_list NK_COMMA expression",
 /* 431 */ "having_clause_opt ::=",
 /* 432 */ "having_clause_opt ::= HAVING search_condition",
 /* 433 */ "query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt",
 /* 434 */ "query_expression_body ::= query_primary",
 /* 435 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body",
 /* 436 */ "query_expression_body ::= query_expression_body UNION query_expression_body",
 /* 437 */ "query_primary ::= query_specification",
 /* 438 */ "query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP",
 /* 439 */ "order_by_clause_opt ::=",
 /* 440 */ "order_by_clause_opt ::= ORDER BY sort_specification_list",
 /* 441 */ "slimit_clause_opt ::=",
 /* 442 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER",
 /* 443 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER",
 /* 444 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER",
 /* 445 */ "limit_clause_opt ::=",
 /* 446 */ "limit_clause_opt ::= LIMIT NK_INTEGER",
 /* 447 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER",
 /* 448 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER",
 /* 449 */ "subquery ::= NK_LP query_expression NK_RP",
 /* 450 */ "search_condition ::= common_expression",
 /* 451 */ "sort_specification_list ::= sort_specification",
 /* 452 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification",
 /* 453 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt",
 /* 454 */ "ordering_specification_opt ::=",
 /* 455 */ "ordering_specification_opt ::= ASC",
 /* 456 */ "ordering_specification_opt ::= DESC",
 /* 457 */ "null_ordering_opt ::=",
 /* 458 */ "null_ordering_opt ::= NULLS FIRST",
 /* 459 */ "null_ordering_opt ::= NULLS LAST",
1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991
};
#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 已提交
1992
    pNew = malloc(newSize*sizeof(pNew[0]));
1993 1994
    if( pNew ) pNew[0] = p->yystk0;
  }else{
X
Xiaoyu Wang 已提交
1995
    pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012
  }
  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 已提交
2013
** second argument to ParseAlloc() below.  This can be changed by
2014 2015 2016 2017 2018 2019 2020 2021 2022
** 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 已提交
2023
void ParseInit(void *yypRawParser ParseCTX_PDECL){
2024
  yyParser *yypParser = (yyParser*)yypRawParser;
X
Xiaoyu Wang 已提交
2025
  ParseCTX_STORE
2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048
#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 已提交
2049
#ifndef Parse_ENGINEALWAYSONSTACK
2050 2051 2052 2053 2054 2055 2056 2057 2058 2059
/* 
** 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 已提交
2060
** to Parse and ParseFree.
2061
*/
X
Xiaoyu Wang 已提交
2062
void *ParseAlloc(void *(*mallocProc)(YYMALLOCARGTYPE) ParseCTX_PDECL){
2063 2064 2065
  yyParser *yypParser;
  yypParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
  if( yypParser ){
X
Xiaoyu Wang 已提交
2066 2067
    ParseCTX_STORE
    ParseInit(yypParser ParseCTX_PARAM);
2068 2069 2070
  }
  return (void*)yypParser;
}
X
Xiaoyu Wang 已提交
2071
#endif /* Parse_ENGINEALWAYSONSTACK */
2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085


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

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

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

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

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

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

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

  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 已提交
4602
  do{
4603 4604 4605
    assert( yyact==yypParser->yytos->stateno );
    yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact);
    if( yyact >= YY_MIN_REDUCE ){
X
Xiaoyu Wang 已提交
4606 4607
      yyact = yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor,
                        yyminor ParseCTX_PARAM);
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 4660 4661 4662
    }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 已提交
4663 4664 4665 4666 4667
        while( yypParser->yytos >= yypParser->yystack
            && (yyact = yy_find_reduce_action(
                        yypParser->yytos->stateno,
                        YYERRORSYMBOL)) > YY_MAX_SHIFTREDUCE
        ){
4668 4669
          yy_pop_parser_stack(yypParser);
        }
X
Xiaoyu Wang 已提交
4670
        if( yypParser->yytos < yypParser->yystack || yymajor==0 ){
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 4717 4718 4719
          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 已提交
4720
  }while( yypParser->yytos>yypParser->yystack );
4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739
#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 已提交
4740
int ParseFallback(int iToken){
4741
#ifdef YYFALLBACK
X
Xiaoyu Wang 已提交
4742 4743 4744
  if( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) ){
    return yyFallback[iToken];
  }
4745 4746
#else
  (void)iToken;
D
dapan1121 已提交
4747
#endif
X
Xiaoyu Wang 已提交
4748
  return 0;
4749
}