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

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


/* 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 已提交
2641 2642
  ParseARG_FETCH
  ParseCTX_FETCH
2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655
  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 */
2656 2657
    case 330: /* cmd */
    case 333: /* literal */
X
Xiaoyu Wang 已提交
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
    case 339: /* with_opt */
    case 345: /* search_condition */
    case 349: /* db_options */
    case 351: /* alter_db_options */
    case 353: /* start_opt */
    case 354: /* end_opt */
    case 359: /* retention */
    case 360: /* full_table_name */
    case 363: /* table_options */
    case 367: /* alter_table_clause */
    case 368: /* alter_table_options */
    case 371: /* signed_literal */
    case 372: /* create_subtable_clause */
    case 375: /* drop_table_clause */
    case 377: /* column_def */
    case 381: /* duration_literal */
    case 382: /* rollup_func_name */
    case 384: /* col_name */
    case 385: /* db_name_cond_opt */
    case 386: /* like_pattern_opt */
    case 387: /* table_name_cond */
    case 388: /* from_db_opt */
    case 390: /* tag_item */
    case 392: /* full_index_name */
    case 393: /* index_options */
    case 396: /* sliding_opt */
    case 397: /* sma_stream_opt */
    case 398: /* func */
    case 400: /* query_or_subquery */
    case 403: /* explain_options */
    case 404: /* insert_query */
    case 410: /* stream_options */
    case 413: /* subtable_opt */
    case 414: /* expression */
    case 416: /* where_clause_opt */
    case 417: /* signed */
    case 418: /* literal_func */
    case 421: /* expr_or_subquery */
    case 422: /* pseudo_column */
    case 423: /* column_reference */
    case 424: /* function_expression */
    case 425: /* case_when_expression */
    case 430: /* star_func_para */
    case 432: /* case_when_else_opt */
    case 433: /* common_expression */
    case 434: /* when_then_expr */
    case 435: /* predicate */
    case 438: /* in_predicate_value */
    case 439: /* boolean_value_expression */
    case 440: /* boolean_primary */
    case 441: /* from_clause_opt */
    case 442: /* table_reference_list */
    case 443: /* table_reference */
    case 444: /* table_primary */
    case 445: /* joined_table */
    case 447: /* subquery */
    case 448: /* parenthesized_joined_table */
    case 450: /* query_specification */
    case 454: /* range_opt */
    case 455: /* every_opt */
    case 456: /* fill_opt */
    case 457: /* twindow_clause_opt */
    case 459: /* having_clause_opt */
    case 460: /* select_item */
    case 462: /* partition_item */
    case 465: /* query_expression */
    case 466: /* query_simple */
    case 468: /* slimit_clause_opt */
    case 469: /* limit_clause_opt */
    case 470: /* union_query_expression */
    case 471: /* query_simple_or_subquery */
    case 473: /* sort_specification */
X
Xiaoyu Wang 已提交
2730
{
X
Xiaoyu Wang 已提交
2731
 nodesDestroyNode((yypminor->yy448)); 
X
Xiaoyu Wang 已提交
2732 2733
}
      break;
2734 2735 2736
    case 331: /* account_options */
    case 332: /* alter_account_options */
    case 334: /* alter_account_option */
X
Xiaoyu Wang 已提交
2737 2738
    case 352: /* speed_opt */
    case 407: /* bufsize_opt */
2739
{
X
Xiaoyu Wang 已提交
2740
 
2741 2742
}
      break;
2743
    case 335: /* user_name */
X
Xiaoyu Wang 已提交
2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759
    case 342: /* db_name */
    case 343: /* table_name */
    case 344: /* topic_name */
    case 346: /* dnode_endpoint */
    case 369: /* column_name */
    case 383: /* function_name */
    case 391: /* column_alias */
    case 394: /* index_name */
    case 399: /* sma_func_name */
    case 401: /* cgroup_name */
    case 408: /* language_opt */
    case 409: /* stream_name */
    case 420: /* table_alias */
    case 426: /* star_func */
    case 428: /* noarg_func */
    case 446: /* alias_opt */
2760
{
2761
 
2762 2763
}
      break;
2764
    case 336: /* sysinfo_opt */
2765
{
2766
 
2767 2768
}
      break;
2769
    case 337: /* privileges */
X
Xiaoyu Wang 已提交
2770 2771
    case 340: /* priv_type_list */
    case 341: /* priv_type */
X
Xiaoyu Wang 已提交
2772 2773 2774 2775
{
 
}
      break;
X
Xiaoyu Wang 已提交
2776
    case 338: /* priv_level */
2777
{
2778
 
2779 2780
}
      break;
X
Xiaoyu Wang 已提交
2781 2782 2783 2784 2785 2786 2787
    case 347: /* force_opt */
    case 348: /* not_exists_opt */
    case 350: /* exists_opt */
    case 402: /* analyze_opt */
    case 405: /* or_replace_opt */
    case 406: /* agg_func_opt */
    case 451: /* set_quantifier_opt */
2788
{
2789 2790 2791
 
}
      break;
X
Xiaoyu Wang 已提交
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
    case 355: /* integer_list */
    case 356: /* variable_list */
    case 357: /* retention_list */
    case 361: /* column_def_list */
    case 362: /* tags_def_opt */
    case 364: /* multi_create_clause */
    case 365: /* tags_def */
    case 366: /* multi_drop_clause */
    case 373: /* specific_cols_opt */
    case 374: /* expression_list */
    case 376: /* col_name_list */
    case 378: /* duration_list */
    case 379: /* rollup_func_list */
    case 389: /* tag_list_opt */
    case 395: /* func_list */
    case 411: /* col_list_opt */
    case 412: /* tag_def_or_ref_opt */
    case 415: /* dnode_list */
    case 419: /* literal_list */
    case 427: /* star_func_para_list */
    case 429: /* other_para_list */
    case 431: /* when_then_list */
    case 452: /* select_list */
    case 453: /* partition_by_clause_opt */
    case 458: /* group_by_clause_opt */
    case 461: /* partition_list */
    case 464: /* group_by_list */
    case 467: /* order_by_clause_opt */
    case 472: /* sort_specification_list */
2821
{
X
Xiaoyu Wang 已提交
2822
 nodesDestroyList((yypminor->yy432)); 
2823 2824
}
      break;
X
Xiaoyu Wang 已提交
2825 2826
    case 358: /* alter_db_option */
    case 380: /* alter_table_option */
2827
{
X
Xiaoyu Wang 已提交
2828
 
2829 2830
}
      break;
X
Xiaoyu Wang 已提交
2831
    case 370: /* type_name */
2832
{
2833
 
2834 2835
}
      break;
X
Xiaoyu Wang 已提交
2836 2837
    case 436: /* compare_op */
    case 437: /* in_op */
2838
{
2839
 
2840 2841
}
      break;
X
Xiaoyu Wang 已提交
2842
    case 449: /* join_type */
2843
{
2844
 
2845 2846
}
      break;
X
Xiaoyu Wang 已提交
2847
    case 463: /* fill_mode */
2848
{
2849
 
2850 2851
}
      break;
X
Xiaoyu Wang 已提交
2852
    case 474: /* ordering_specification_opt */
2853
{
2854
 
2855 2856
}
      break;
X
Xiaoyu Wang 已提交
2857
    case 475: /* null_ordering_opt */
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
}
      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 已提交
2891
void ParseFinalize(void *p){
2892 2893 2894
  yyParser *pParser = (yyParser*)p;
  while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser);
#if YYSTACKDEPTH<=0
X
Xiaoyu Wang 已提交
2895
  if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack);
2896 2897 2898
#endif
}

X
Xiaoyu Wang 已提交
2899
#ifndef Parse_ENGINEALWAYSONSTACK
2900 2901 2902 2903 2904 2905 2906 2907
/* 
** 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 已提交
2908
void ParseFree(
2909 2910 2911 2912 2913 2914
  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 已提交
2915
  ParseFinalize(p);
2916 2917
  (*freeProc)(p);
}
X
Xiaoyu Wang 已提交
2918
#endif /* Parse_ENGINEALWAYSONSTACK */
2919 2920 2921 2922 2923

/*
** Return the peak depth of the stack for a parser.
*/
#ifdef YYTRACKMAXSTACKDEPTH
X
Xiaoyu Wang 已提交
2924
int ParseStackPeak(void *p){
2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947
  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 已提交
2948
int ParseCoverage(FILE *out){
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
  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 已提交
2985
    /* assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD ); */
2986 2987 2988
    assert( iLookAhead!=YYNOCODE );
    assert( iLookAhead < YYNTOKEN );
    i += iLookAhead;
X
Xiaoyu Wang 已提交
2989
    if( i>=YY_NLOOKAHEAD || yy_lookahead[i]!=iLookAhead ){
2990 2991
#ifdef YYFALLBACK
      YYCODETYPE iFallback;            /* Fallback token */
X
Xiaoyu Wang 已提交
2992 2993
      if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
             && (iFallback = yyFallback[iLookAhead])!=0 ){
2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007
#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 已提交
3008 3009 3010 3011 3012 3013 3014 3015 3016 3017
        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
        ){
3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069
#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 已提交
3070 3071
   ParseARG_FETCH
   ParseCTX_FETCH
3072 3073 3074 3075 3076 3077 3078 3079 3080 3081
#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 已提交
3082 3083
   ParseARG_STORE /* Suppress warning about unused %extra_argument var */
   ParseCTX_STORE
3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113
}

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

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 已提交
3757 3758
  ParseTOKENTYPE yyLookaheadToken  /* Value of the lookahead token */
  ParseCTX_PDECL                   /* %extra_context */
3759 3760 3761 3762 3763
){
  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 已提交
3764
  ParseARG_FETCH
3765 3766 3767
  (void)yyLookahead;
  (void)yyLookaheadToken;
  yymsp = yypParser->yytos;
X
Xiaoyu Wang 已提交
3768 3769
#ifndef NDEBUG
  if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){
X
Xiaoyu Wang 已提交
3770
    yysize = yyRuleInfo[yyruleno].nrhs;
X
Xiaoyu Wang 已提交
3771
    if( yysize ){
X
Xiaoyu Wang 已提交
3772
      fprintf(yyTraceFILE, "%sReduce %d [%s], go to state %d.\n",
X
Xiaoyu Wang 已提交
3773
        yyTracePrompt,
X
Xiaoyu Wang 已提交
3774
        yyruleno, yyRuleName[yyruleno], yymsp[yysize].stateno);
X
Xiaoyu Wang 已提交
3775
    }else{
X
Xiaoyu Wang 已提交
3776 3777
      fprintf(yyTraceFILE, "%sReduce %d [%s].\n",
        yyTracePrompt, yyruleno, yyRuleName[yyruleno]);
X
Xiaoyu Wang 已提交
3778 3779 3780 3781 3782 3783 3784
    }
  }
#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 已提交
3785
  if( yyRuleInfo[yyruleno].nrhs==0 ){
X
Xiaoyu Wang 已提交
3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812
#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
  }
3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824

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

5528
  if (TSDB_CODE_SUCCESS == pCxt->errCode) {
5529
    if(TOKEN.z) {
5530
      pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR, TOKEN.z);
5531
    } else {
5532
      pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INCOMPLETE_SQL);
5533
    }
5534 5535
  } else if (TSDB_CODE_PAR_DB_NOT_SPECIFIED == pCxt->errCode && TK_NK_FLOAT == TOKEN.type) {
    pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR, TOKEN.z);
5536 5537
  }
/************ End %syntax_error code ******************************************/
X
Xiaoyu Wang 已提交
5538 5539
  ParseARG_STORE /* Suppress warning about unused %extra_argument variable */
  ParseCTX_STORE
5540 5541 5542 5543 5544 5545 5546 5547
}

/*
** The following is executed when the parser accepts
*/
static void yy_accept(
  yyParser *yypParser           /* The parser */
){
X
Xiaoyu Wang 已提交
5548 5549
  ParseARG_FETCH
  ParseCTX_FETCH
5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562
#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 已提交
5563 5564
  ParseARG_STORE /* Suppress warning about unused %extra_argument variable */
  ParseCTX_STORE
5565 5566 5567 5568
}

/* The main parser program.
** The first argument is a pointer to a structure obtained from
X
Xiaoyu Wang 已提交
5569
** "ParseAlloc" which describes the current state of the parser.
5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585
** 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 已提交
5586
void Parse(
5587 5588
  void *yyp,                   /* The parser */
  int yymajor,                 /* The major token code number */
X
Xiaoyu Wang 已提交
5589 5590
  ParseTOKENTYPE yyminor       /* The value for the token */
  ParseARG_PDECL               /* Optional %extra_argument parameter */
5591 5592 5593 5594 5595 5596 5597 5598 5599 5600
){
  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 已提交
5601 5602
  ParseCTX_FETCH
  ParseARG_STORE
5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621

  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 已提交
5622
  do{
5623 5624 5625
    assert( yyact==yypParser->yytos->stateno );
    yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact);
    if( yyact >= YY_MIN_REDUCE ){
X
Xiaoyu Wang 已提交
5626 5627
      yyact = yy_reduce(yypParser,yyact-YY_MIN_REDUCE,yymajor,
                        yyminor ParseCTX_PARAM);
5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682
    }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 已提交
5683 5684 5685 5686 5687
        while( yypParser->yytos >= yypParser->yystack
            && (yyact = yy_find_reduce_action(
                        yypParser->yytos->stateno,
                        YYERRORSYMBOL)) > YY_MAX_SHIFTREDUCE
        ){
5688 5689
          yy_pop_parser_stack(yypParser);
        }
X
Xiaoyu Wang 已提交
5690
        if( yypParser->yytos < yypParser->yystack || yymajor==0 ){
5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739
          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 已提交
5740
  }while( yypParser->yytos>yypParser->yystack );
5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759
#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 已提交
5760
int ParseFallback(int iToken){
5761
#ifdef YYFALLBACK
X
Xiaoyu Wang 已提交
5762 5763 5764
  if( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) ){
    return yyFallback[iToken];
  }
5765 5766
#else
  (void)iToken;
5767
#endif
X
Xiaoyu Wang 已提交
5768
  return 0;
5769
}