cosmopolitan/third_party/sqlite3/parse.c

5426 lines
231 KiB
C
Raw Normal View History

/* This file is automatically generated by Lemon from input grammar
** source file "third_party/sqlite3/parse.y". */
/*
** 2001-09-15
**
** 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.
**
*************************************************************************
** This file contains SQLite's SQL parser.
**
** The canonical source code to this file ("third_party/sqlite3/parse.y") is a
*Lemon grammar
** file that specifies the input grammar and actions to take while parsing.
** That input file is processed by Lemon to generate a C-language
** implementation of a parser for the given grammer. You might be reading
** this comment as part of the translated C-code. Edits should be made
** to the original parse.y sources.
*/
/* clang-format off */
#include "third_party/sqlite3/sqliteInt.inc"
/*
** Disable all error recovery processing in the parser push-down
** automaton.
*/
#define YYNOERRORRECOVERY 1
/*
** Make yytestcase() the same as testcase()
*/
#define yytestcase(X) testcase(X)
/*
** Indicate that sqlite3ParserFree() will never be called with a null
** pointer.
*/
#define YYPARSEFREENEVERNULL 1
/*
** In the amalgamation, the parse.c file generated by lemon and the
** tokenize.c file are concatenated. In that case, sqlite3RunParser()
** has access to the the size of the yyParser object and so the parser
** engine can be allocated from stack. In that case, only the
** sqlite3ParserInit() and sqlite3ParserFinalize() routines are invoked
** and the sqlite3ParserAlloc() and sqlite3ParserFree() routines can be
** omitted.
*/
#ifdef SQLITE_AMALGAMATION
# define sqlite3Parser_ENGINEALWAYSONSTACK 1
#endif
/*
** Alternative datatype for the argument to the malloc() routine passed
** into sqlite3ParserAlloc(). The default is size_t.
*/
#define YYMALLOCARGTYPE u64
/*
** An instance of the following structure describes the event of a
** TRIGGER. "a" is the event type, one of TK_UPDATE, TK_INSERT,
** TK_DELETE, or TK_INSTEAD. If the event is of the form
**
** UPDATE ON (a,b,c)
**
** Then the "b" IdList records the list "a,b,c".
*/
struct TrigEvent { int a; IdList * b; };
struct FrameBound { int eType; Expr *pExpr; };
/*
** Disable lookaside memory allocation for objects that might be
** shared across database connections.
*/
static void disableLookaside(Parse *pParse){
sqlite3 *db = pParse->db;
pParse->disableLookaside++;
DisableLookaside;
}
#if !defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT) \
&& defined(SQLITE_UDL_CAPABLE_PARSER)
/*
** Issue an error message if an ORDER BY or LIMIT clause occurs on an
** UPDATE or DELETE statement.
*/
static void updateDeleteLimitError(
Parse *pParse,
ExprList *pOrderBy,
Expr *pLimit
){
if( pOrderBy ){
sqlite3ErrorMsg(pParse, "syntax error near \"ORDER BY\"");
}else{
sqlite3ErrorMsg(pParse, "syntax error near \"LIMIT\"");
}
sqlite3ExprListDelete(pParse->db, pOrderBy);
sqlite3ExprDelete(pParse->db, pLimit);
}
#endif /* SQLITE_ENABLE_UPDATE_DELETE_LIMIT */
/*
** For a compound SELECT statement, make sure p->pPrior->pNext==p for
** all elements in the list. And make sure list length does not exceed
** SQLITE_LIMIT_COMPOUND_SELECT.
*/
static void parserDoubleLinkSelect(Parse *pParse, Select *p){
assert( p!=0 );
if( p->pPrior ){
Select *pNext = 0, *pLoop = p;
int mxSelect, cnt = 1;
while(1){
pLoop->pNext = pNext;
pLoop->selFlags |= SF_Compound;
pNext = pLoop;
pLoop = pLoop->pPrior;
if( pLoop==0 ) break;
cnt++;
if( pLoop->pOrderBy || pLoop->pLimit ){
sqlite3ErrorMsg(pParse,"%s clause should come after %s not before",
pLoop->pOrderBy!=0 ? "ORDER BY" : "LIMIT",
sqlite3SelectOpName(pNext->op));
break;
}
}
if( (p->selFlags & SF_MultiValue)==0 &&
(mxSelect = pParse->db->aLimit[SQLITE_LIMIT_COMPOUND_SELECT])>0 &&
cnt>mxSelect
){
sqlite3ErrorMsg(pParse, "too many terms in compound SELECT");
}
}
}
/* Attach a With object describing the WITH clause to a Select
** object describing the query for which the WITH clause is a prefix.
*/
static Select *attachWithToSelect(Parse *pParse, Select *pSelect, With *pWith){
if( pSelect ){
pSelect->pWith = pWith;
parserDoubleLinkSelect(pParse, pSelect);
}else{
sqlite3WithDelete(pParse->db, pWith);
}
return pSelect;
}
/* Construct a new Expr object from a single identifier. Use the
** new Expr to populate pOut. Set the span of pOut to be the identifier
** that created the expression.
*/
static Expr *tokenExpr(Parse *pParse, int op, Token t){
Expr *p = sqlite3DbMallocRawNN(pParse->db, sizeof(Expr)+t.n+1);
if( p ){
/* memset(p, 0, sizeof(Expr)); */
p->op = (u8)op;
p->affExpr = 0;
p->flags = EP_Leaf;
ExprClearVVAProperties(p);
p->iAgg = -1;
p->pLeft = p->pRight = 0;
p->x.pList = 0;
p->pAggInfo = 0;
p->y.pTab = 0;
p->op2 = 0;
p->iTable = 0;
p->iColumn = 0;
p->u.zToken = (char*)&p[1];
memcpy(p->u.zToken, t.z, t.n);
p->u.zToken[t.n] = 0;
if( sqlite3Isquote(p->u.zToken[0]) ){
sqlite3DequoteExpr(p);
}
#if SQLITE_MAX_EXPR_DEPTH>0
p->nHeight = 1;
#endif
if( IN_RENAME_OBJECT ){
return (Expr*)sqlite3RenameTokenMap(pParse, (void*)p, &t);
}
}
return p;
}
/* A routine to convert a binary TK_IS or TK_ISNOT expression into a
** unary TK_ISNULL or TK_NOTNULL expression. */
static void binaryToUnaryIfNull(Parse *pParse, Expr *pY, Expr *pA, int op){
sqlite3 *db = pParse->db;
if( pA && pY && pY->op==TK_NULL && !IN_RENAME_OBJECT ){
pA->op = (u8)op;
sqlite3ExprDelete(db, pA->pRight);
pA->pRight = 0;
}
}
/* Add a single new term to an ExprList that is used to store a
** list of identifiers. Report an error if the ID list contains
** a COLLATE clause or an ASC or DESC keyword, except ignore the
** error while parsing a legacy schema.
*/
static ExprList *parserAddExprIdListTerm(
Parse *pParse,
ExprList *pPrior,
Token *pIdToken,
int hasCollate,
int sortOrder
){
ExprList *p = sqlite3ExprListAppend(pParse, pPrior, 0);
if( (hasCollate || sortOrder!=SQLITE_SO_UNDEFINED)
&& pParse->db->init.busy==0
){
sqlite3ErrorMsg(pParse, "syntax error after column name \"%.*s\"",
pIdToken->n, pIdToken->z);
}
sqlite3ExprListSetName(pParse, p, pIdToken, 1);
return p;
}
#if TK_SPAN>255
# error too many tokens in the grammar
#endif
/**************** End of %include directives **********************************/
/* These constants specify the various numeric values for terminal symbols.
***************** Begin token definitions *************************************/
#ifndef TK_SEMI
#define TK_SEMI 1
#define TK_EXPLAIN 2
#define TK_QUERY 3
#define TK_PLAN 4
#define TK_BEGIN 5
#define TK_TRANSACTION 6
#define TK_DEFERRED 7
#define TK_IMMEDIATE 8
#define TK_EXCLUSIVE 9
#define TK_COMMIT 10
#define TK_END 11
#define TK_ROLLBACK 12
#define TK_SAVEPOINT 13
#define TK_RELEASE 14
#define TK_TO 15
#define TK_TABLE 16
#define TK_CREATE 17
#define TK_IF 18
#define TK_NOT 19
#define TK_EXISTS 20
#define TK_TEMP 21
#define TK_LP 22
#define TK_RP 23
#define TK_AS 24
#define TK_WITHOUT 25
#define TK_COMMA 26
#define TK_ABORT 27
#define TK_ACTION 28
#define TK_AFTER 29
#define TK_ANALYZE 30
#define TK_ASC 31
#define TK_ATTACH 32
#define TK_BEFORE 33
#define TK_BY 34
#define TK_CASCADE 35
#define TK_CAST 36
#define TK_CONFLICT 37
#define TK_DATABASE 38
#define TK_DESC 39
#define TK_DETACH 40
#define TK_EACH 41
#define TK_FAIL 42
#define TK_OR 43
#define TK_AND 44
#define TK_IS 45
#define TK_MATCH 46
#define TK_LIKE_KW 47
#define TK_BETWEEN 48
#define TK_IN 49
#define TK_ISNULL 50
#define TK_NOTNULL 51
#define TK_NE 52
#define TK_EQ 53
#define TK_GT 54
#define TK_LE 55
#define TK_LT 56
#define TK_GE 57
#define TK_ESCAPE 58
#define TK_ID 59
#define TK_COLUMNKW 60
#define TK_DO 61
#define TK_FOR 62
#define TK_IGNORE 63
#define TK_INITIALLY 64
#define TK_INSTEAD 65
#define TK_NO 66
#define TK_KEY 67
#define TK_OF 68
#define TK_OFFSET 69
#define TK_PRAGMA 70
#define TK_RAISE 71
#define TK_RECURSIVE 72
#define TK_REPLACE 73
#define TK_RESTRICT 74
#define TK_ROW 75
#define TK_ROWS 76
#define TK_TRIGGER 77
#define TK_VACUUM 78
#define TK_VIEW 79
#define TK_VIRTUAL 80
#define TK_WITH 81
#define TK_NULLS 82
#define TK_FIRST 83
#define TK_LAST 84
#define TK_CURRENT 85
#define TK_FOLLOWING 86
#define TK_PARTITION 87
#define TK_PRECEDING 88
#define TK_RANGE 89
#define TK_UNBOUNDED 90
#define TK_EXCLUDE 91
#define TK_GROUPS 92
#define TK_OTHERS 93
#define TK_TIES 94
#define TK_GENERATED 95
#define TK_ALWAYS 96
#define TK_MATERIALIZED 97
#define TK_REINDEX 98
#define TK_RENAME 99
#define TK_CTIME_KW 100
#define TK_ANY 101
#define TK_BITAND 102
#define TK_BITOR 103
#define TK_LSHIFT 104
#define TK_RSHIFT 105
#define TK_PLUS 106
#define TK_MINUS 107
#define TK_STAR 108
#define TK_SLASH 109
#define TK_REM 110
#define TK_CONCAT 111
#define TK_COLLATE 112
#define TK_BITNOT 113
#define TK_ON 114
#define TK_INDEXED 115
#define TK_STRING 116
#define TK_JOIN_KW 117
#define TK_CONSTRAINT 118
#define TK_DEFAULT 119
#define TK_NULL 120
#define TK_PRIMARY 121
#define TK_UNIQUE 122
#define TK_CHECK 123
#define TK_REFERENCES 124
#define TK_AUTOINCR 125
#define TK_INSERT 126
#define TK_DELETE 127
#define TK_UPDATE 128
#define TK_SET 129
#define TK_DEFERRABLE 130
#define TK_FOREIGN 131
#define TK_DROP 132
#define TK_UNION 133
#define TK_ALL 134
#define TK_EXCEPT 135
#define TK_INTERSECT 136
#define TK_SELECT 137
#define TK_VALUES 138
#define TK_DISTINCT 139
#define TK_DOT 140
#define TK_FROM 141
#define TK_JOIN 142
#define TK_USING 143
#define TK_ORDER 144
#define TK_GROUP 145
#define TK_HAVING 146
#define TK_LIMIT 147
#define TK_WHERE 148
#define TK_RETURNING 149
#define TK_INTO 150
#define TK_NOTHING 151
#define TK_FLOAT 152
#define TK_BLOB 153
#define TK_INTEGER 154
#define TK_VARIABLE 155
#define TK_CASE 156
#define TK_WHEN 157
#define TK_THEN 158
#define TK_ELSE 159
#define TK_INDEX 160
#define TK_ALTER 161
#define TK_ADD 162
#define TK_WINDOW 163
#define TK_OVER 164
#define TK_FILTER 165
#define TK_COLUMN 166
#define TK_AGG_FUNCTION 167
#define TK_AGG_COLUMN 168
#define TK_TRUEFALSE 169
#define TK_ISNOT 170
#define TK_FUNCTION 171
#define TK_UMINUS 172
#define TK_UPLUS 173
#define TK_TRUTH 174
#define TK_REGISTER 175
#define TK_VECTOR 176
#define TK_SELECT_COLUMN 177
#define TK_IF_NULL_ROW 178
#define TK_ASTERISK 179
#define TK_SPAN 180
#define TK_SPACE 181
#define TK_ILLEGAL 182
#endif
/**************** End token definitions ***************************************/
/* 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.
** sqlite3ParserTOKENTYPE is the data type used for minor type for terminal
** 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
** which is sqlite3ParserTOKENTYPE. The entry in the union
** for terminal symbols is called "yy0".
** YYSTACKDEPTH is the maximum depth of the parser's stack. If
** zero the stack is dynamically sized using realloc()
** sqlite3ParserARG_SDECL A static variable declaration for the %extra_argument
** sqlite3ParserARG_PDECL A parameter declaration for the %extra_argument
** sqlite3ParserARG_PARAM Code to pass %extra_argument as a subroutine parameter
** sqlite3ParserARG_STORE Code to store %extra_argument into yypParser
** sqlite3ParserARG_FETCH Code to extract %extra_argument from yypParser
** sqlite3ParserCTX_* As sqlite3ParserARG_ except for %extra_context
** 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 *****************************************/
#define YYCODETYPE unsigned short int
#define YYNOCODE 316
#define YYACTIONTYPE unsigned short int
#define YYWILDCARD 101
#define sqlite3ParserTOKENTYPE Token
typedef union {
int yyinit;
sqlite3ParserTOKENTYPE yy0;
Window* yy19;
struct TrigEvent yy50;
int yy60;
struct FrameBound yy113;
Upsert* yy178;
With* yy195;
IdList* yy288;
SrcList* yy291;
Select* yy307;
ExprList* yy338;
TriggerStep* yy483;
const char* yy528;
u8 yy570;
Expr* yy602;
Cte* yy607;
struct {int value; int mask;} yy615;
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 100
#endif
#define sqlite3ParserARG_SDECL
#define sqlite3ParserARG_PDECL
#define sqlite3ParserARG_PARAM
#define sqlite3ParserARG_FETCH
#define sqlite3ParserARG_STORE
#define sqlite3ParserCTX_SDECL Parse *pParse;
#define sqlite3ParserCTX_PDECL ,Parse *pParse
#define sqlite3ParserCTX_PARAM ,pParse
#define sqlite3ParserCTX_FETCH Parse *pParse=yypParser->pParse;
#define sqlite3ParserCTX_STORE yypParser->pParse=pParse;
#define YYFALLBACK 1
#define YYNSTATE 570
#define YYNRULE 398
#define YYNRULE_WITH_ACTION 337
#define YYNTOKEN 183
#define YY_MAX_SHIFT 569
#define YY_MIN_SHIFTREDUCE 825
#define YY_MAX_SHIFTREDUCE 1222
#define YY_ERROR_ACTION 1223
#define YY_ACCEPT_ACTION 1224
#define YY_NO_ACTION 1225
#define YY_MIN_REDUCE 1226
#define YY_MAX_REDUCE 1623
/************* 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 **********************************************/
#define YY_ACTTAB_COUNT (2020)
static const YYACTIONTYPE yy_action[] = {
/* 0 */ 563, 1295, 563, 1274, 168, 361, 115, 112, 218, 373,
/* 10 */ 563, 1295, 374, 563, 488, 563, 115, 112, 218, 406,
/* 20 */ 1300, 1300, 41, 41, 41, 41, 514, 1504, 520, 1298,
/* 30 */ 1298, 959, 41, 41, 1257, 71, 71, 51, 51, 960,
/* 40 */ 557, 557, 557, 122, 123, 113, 1200, 1200, 1035, 1038,
/* 50 */ 1028, 1028, 120, 120, 121, 121, 121, 121, 414, 406,
/* 60 */ 273, 273, 273, 273, 115, 112, 218, 115, 112, 218,
/* 70 */ 197, 268, 545, 560, 515, 560, 1260, 563, 385, 248,
/* 80 */ 215, 521, 399, 122, 123, 113, 1200, 1200, 1035, 1038,
/* 90 */ 1028, 1028, 120, 120, 121, 121, 121, 121, 540, 13,
/* 100 */ 13, 1259, 119, 119, 119, 119, 118, 118, 117, 117,
/* 110 */ 117, 116, 441, 1176, 419, 1531, 446, 137, 512, 1539,
/* 120 */ 1545, 372, 1547, 6, 371, 1176, 1148, 1584, 1148, 406,
/* 130 */ 1545, 534, 115, 112, 218, 1267, 99, 441, 121, 121,
/* 140 */ 121, 121, 119, 119, 119, 119, 118, 118, 117, 117,
/* 150 */ 117, 116, 441, 122, 123, 113, 1200, 1200, 1035, 1038,
/* 160 */ 1028, 1028, 120, 120, 121, 121, 121, 121, 197, 1176,
/* 170 */ 1177, 1178, 241, 304, 554, 501, 498, 497, 473, 124,
/* 180 */ 394, 1176, 1177, 1178, 1176, 496, 119, 119, 119, 119,
/* 190 */ 118, 118, 117, 117, 117, 116, 441, 139, 540, 406,
/* 200 */ 121, 121, 121, 121, 114, 117, 117, 117, 116, 441,
/* 210 */ 541, 1532, 119, 119, 119, 119, 118, 118, 117, 117,
/* 220 */ 117, 116, 441, 122, 123, 113, 1200, 1200, 1035, 1038,
/* 230 */ 1028, 1028, 120, 120, 121, 121, 121, 121, 406, 320,
/* 240 */ 1176, 1177, 1178, 81, 342, 1590, 396, 80, 119, 119,
/* 250 */ 119, 119, 118, 118, 117, 117, 117, 116, 441, 1176,
/* 260 */ 211, 450, 122, 123, 113, 1200, 1200, 1035, 1038, 1028,
/* 270 */ 1028, 120, 120, 121, 121, 121, 121, 251, 450, 449,
/* 280 */ 273, 273, 119, 119, 119, 119, 118, 118, 117, 117,
/* 290 */ 117, 116, 441, 560, 1224, 1, 1, 569, 2, 1228,
/* 300 */ 317, 1176, 319, 1561, 305, 337, 140, 340, 406, 430,
/* 310 */ 469, 1533, 1197, 1308, 348, 1176, 1177, 1178, 168, 462,
/* 320 */ 330, 119, 119, 119, 119, 118, 118, 117, 117, 117,
/* 330 */ 116, 441, 122, 123, 113, 1200, 1200, 1035, 1038, 1028,
/* 340 */ 1028, 120, 120, 121, 121, 121, 121, 273, 273, 563,
/* 350 */ 83, 450, 416, 1564, 569, 2, 1228, 1176, 1177, 1178,
/* 360 */ 560, 305, 471, 140, 944, 995, 860, 563, 467, 1197,
/* 370 */ 1308, 13, 13, 137, 229, 118, 118, 117, 117, 117,
/* 380 */ 116, 441, 96, 318, 946, 504, 424, 361, 562, 71,
/* 390 */ 71, 119, 119, 119, 119, 118, 118, 117, 117, 117,
/* 400 */ 116, 441, 427, 205, 273, 273, 445, 1015, 259, 276,
/* 410 */ 356, 507, 351, 506, 246, 406, 959, 560, 328, 344,
/* 420 */ 347, 315, 860, 1006, 960, 126, 545, 1005, 313, 304,
/* 430 */ 554, 229, 538, 1539, 148, 544, 281, 6, 203, 122,
/* 440 */ 123, 113, 1200, 1200, 1035, 1038, 1028, 1028, 120, 120,
/* 450 */ 121, 121, 121, 121, 563, 217, 563, 12, 406, 1005,
/* 460 */ 1005, 1007, 502, 445, 119, 119, 119, 119, 118, 118,
/* 470 */ 117, 117, 117, 116, 441, 452, 71, 71, 70, 70,
/* 480 */ 944, 137, 122, 123, 113, 1200, 1200, 1035, 1038, 1028,
/* 490 */ 1028, 120, 120, 121, 121, 121, 121, 1530, 119, 119,
/* 500 */ 119, 119, 118, 118, 117, 117, 117, 116, 441, 403,
/* 510 */ 402, 241, 1176, 545, 501, 498, 497, 1468, 1143, 451,
/* 520 */ 267, 267, 513, 1540, 496, 142, 1176, 6, 406, 530,
/* 530 */ 194, 1143, 864, 560, 1143, 461, 182, 304, 554, 32,
/* 540 */ 379, 119, 119, 119, 119, 118, 118, 117, 117, 117,
/* 550 */ 116, 441, 122, 123, 113, 1200, 1200, 1035, 1038, 1028,
/* 560 */ 1028, 120, 120, 121, 121, 121, 121, 406, 1176, 1177,
/* 570 */ 1178, 857, 568, 1176, 1228, 925, 1176, 454, 361, 305,
/* 580 */ 189, 140, 1176, 1177, 1178, 519, 529, 404, 1308, 183,
/* 590 */ 1015, 122, 123, 113, 1200, 1200, 1035, 1038, 1028, 1028,
/* 600 */ 120, 120, 121, 121, 121, 121, 1006, 16, 16, 370,
/* 610 */ 1005, 119, 119, 119, 119, 118, 118, 117, 117, 117,
/* 620 */ 116, 441, 273, 273, 1537, 150, 1176, 98, 6, 1176,
/* 630 */ 1177, 1178, 1176, 1177, 1178, 560, 380, 406, 376, 438,
/* 640 */ 437, 1161, 1005, 1005, 1007, 1025, 1025, 1036, 1039, 229,
/* 650 */ 119, 119, 119, 119, 118, 118, 117, 117, 117, 116,
/* 660 */ 441, 122, 123, 113, 1200, 1200, 1035, 1038, 1028, 1028,
/* 670 */ 120, 120, 121, 121, 121, 121, 406, 1143, 1619, 392,
/* 680 */ 1016, 445, 1176, 1177, 1178, 1207, 525, 1207, 1530, 995,
/* 690 */ 1143, 304, 554, 1143, 5, 563, 543, 3, 361, 216,
/* 700 */ 122, 123, 113, 1200, 1200, 1035, 1038, 1028, 1028, 120,
/* 710 */ 120, 121, 121, 121, 121, 143, 563, 13, 13, 1029,
/* 720 */ 119, 119, 119, 119, 118, 118, 117, 117, 117, 116,
/* 730 */ 441, 1176, 426, 563, 1176, 563, 274, 274, 13, 13,
/* 740 */ 1078, 1176, 328, 457, 316, 147, 406, 211, 361, 560,
/* 750 */ 1000, 213, 511, 293, 477, 55, 55, 71, 71, 119,
/* 760 */ 119, 119, 119, 118, 118, 117, 117, 117, 116, 441,
/* 770 */ 122, 123, 113, 1200, 1200, 1035, 1038, 1028, 1028, 120,
/* 780 */ 120, 121, 121, 121, 121, 406, 455, 1176, 1177, 1178,
/* 790 */ 1176, 1177, 1178, 471, 526, 149, 404, 1176, 1177, 1178,
/* 800 */ 105, 270, 103, 563, 944, 563, 116, 441, 1530, 122,
/* 810 */ 123, 113, 1200, 1200, 1035, 1038, 1028, 1028, 120, 120,
/* 820 */ 121, 121, 121, 121, 945, 13, 13, 13, 13, 119,
/* 830 */ 119, 119, 119, 118, 118, 117, 117, 117, 116, 441,
/* 840 */ 191, 563, 192, 563, 416, 439, 439, 439, 1083, 1083,
/* 850 */ 485, 561, 285, 914, 914, 406, 462, 330, 1530, 830,
/* 860 */ 831, 832, 206, 71, 71, 71, 71, 286, 119, 119,
/* 870 */ 119, 119, 118, 118, 117, 117, 117, 116, 441, 122,
/* 880 */ 123, 113, 1200, 1200, 1035, 1038, 1028, 1028, 120, 120,
/* 890 */ 121, 121, 121, 121, 563, 217, 563, 1122, 1617, 406,
/* 900 */ 300, 1617, 301, 416, 1278, 1473, 244, 243, 242, 1249,
/* 910 */ 412, 556, 412, 282, 842, 279, 71, 71, 71, 71,
/* 920 */ 944, 1415, 1473, 1475, 101, 113, 1200, 1200, 1035, 1038,
/* 930 */ 1028, 1028, 120, 120, 121, 121, 121, 121, 119, 119,
/* 940 */ 119, 119, 118, 118, 117, 117, 117, 116, 441, 273,
/* 950 */ 273, 1099, 563, 436, 1143, 440, 563, 1122, 1618, 357,
/* 960 */ 1558, 1618, 560, 546, 488, 197, 1100, 1143, 378, 290,
/* 970 */ 1143, 1306, 284, 460, 71, 71, 1120, 405, 13, 13,
/* 980 */ 145, 1101, 119, 119, 119, 119, 118, 118, 117, 117,
/* 990 */ 117, 116, 441, 542, 104, 1473, 509, 273, 273, 294,
/* 1000 */ 1514, 294, 900, 273, 273, 273, 273, 563, 1503, 563,
/* 1010 */ 560, 545, 901, 464, 406, 1058, 560, 852, 560, 198,
/* 1020 */ 547, 1080, 920, 404, 1400, 1080, 146, 919, 38, 56,
/* 1030 */ 56, 15, 15, 563, 406, 12, 1120, 471, 122, 123,
/* 1040 */ 113, 1200, 1200, 1035, 1038, 1028, 1028, 120, 120, 121,
/* 1050 */ 121, 121, 121, 1460, 406, 43, 43, 483, 122, 123,
/* 1060 */ 113, 1200, 1200, 1035, 1038, 1028, 1028, 120, 120, 121,
/* 1070 */ 121, 121, 121, 563, 852, 9, 471, 251, 122, 111,
/* 1080 */ 113, 1200, 1200, 1035, 1038, 1028, 1028, 120, 120, 121,
/* 1090 */ 121, 121, 121, 563, 421, 57, 57, 119, 119, 119,
/* 1100 */ 119, 118, 118, 117, 117, 117, 116, 441, 1176, 493,
/* 1110 */ 563, 289, 1197, 478, 1516, 44, 44, 119, 119, 119,
/* 1120 */ 119, 118, 118, 117, 117, 117, 116, 441, 880, 563,
/* 1130 */ 536, 563, 58, 58, 488, 1414, 245, 119, 119, 119,
/* 1140 */ 119, 118, 118, 117, 117, 117, 116, 441, 563, 535,
/* 1150 */ 291, 59, 59, 60, 60, 438, 437, 406, 1154, 505,
/* 1160 */ 304, 554, 477, 1204, 1176, 1177, 1178, 881, 1206, 1197,
/* 1170 */ 61, 61, 1246, 357, 1558, 1538, 1205, 563, 1467, 6,
/* 1180 */ 1176, 488, 123, 113, 1200, 1200, 1035, 1038, 1028, 1028,
/* 1190 */ 120, 120, 121, 121, 121, 121, 1400, 1143, 410, 62,
/* 1200 */ 62, 1207, 1099, 1207, 411, 447, 273, 273, 537, 1154,
/* 1210 */ 1143, 108, 555, 1143, 4, 391, 1220, 1100, 1512, 560,
/* 1220 */ 347, 516, 428, 548, 308, 1307, 1536, 1077, 558, 1077,
/* 1230 */ 6, 488, 1101, 1400, 488, 309, 1176, 1177, 1178, 563,
/* 1240 */ 119, 119, 119, 119, 118, 118, 117, 117, 117, 116,
/* 1250 */ 441, 442, 278, 551, 563, 273, 273, 273, 273, 563,
/* 1260 */ 327, 45, 45, 552, 563, 528, 422, 563, 560, 1400,
/* 1270 */ 560, 108, 555, 137, 4, 1303, 46, 46, 335, 563,
/* 1280 */ 482, 47, 47, 477, 479, 307, 49, 49, 558, 50,
/* 1290 */ 50, 563, 1015, 563, 1221, 563, 1400, 563, 106, 106,
/* 1300 */ 8, 63, 63, 423, 563, 107, 312, 442, 565, 564,
/* 1310 */ 563, 442, 1005, 64, 64, 65, 65, 14, 14, 66,
/* 1320 */ 66, 391, 1121, 552, 1312, 1180, 128, 128, 563, 304,
/* 1330 */ 554, 563, 67, 67, 563, 359, 560, 532, 563, 484,
/* 1340 */ 563, 1196, 531, 222, 1005, 1005, 1007, 1008, 27, 522,
/* 1350 */ 52, 52, 1015, 68, 68, 563, 69, 69, 106, 106,
/* 1360 */ 53, 53, 156, 156, 563, 107, 434, 442, 565, 564,
/* 1370 */ 272, 215, 1005, 425, 563, 359, 563, 157, 157, 563,
/* 1380 */ 1535, 292, 1180, 98, 6, 1344, 76, 76, 1215, 475,
/* 1390 */ 413, 169, 226, 563, 245, 563, 54, 54, 72, 72,
/* 1400 */ 1221, 129, 129, 1343, 1005, 1005, 1007, 1008, 27, 1563,
/* 1410 */ 1165, 444, 456, 433, 277, 73, 73, 130, 130, 389,
/* 1420 */ 389, 388, 262, 386, 1165, 444, 839, 1519, 277, 108,
/* 1430 */ 555, 321, 4, 389, 389, 388, 262, 386, 563, 223,
/* 1440 */ 839, 311, 468, 84, 202, 523, 558, 1492, 303, 310,
/* 1450 */ 563, 110, 404, 223, 563, 311, 206, 30, 404, 277,
/* 1460 */ 131, 131, 411, 310, 389, 389, 388, 262, 386, 442,
/* 1470 */ 920, 839, 127, 127, 563, 919, 155, 155, 1491, 225,
/* 1480 */ 563, 552, 871, 563, 223, 476, 311, 161, 31, 563,
/* 1490 */ 135, 563, 480, 225, 310, 532, 154, 154, 332, 17,
/* 1500 */ 533, 161, 136, 136, 135, 134, 134, 224, 228, 355,
/* 1510 */ 1015, 132, 132, 133, 133, 1589, 106, 106, 889, 354,
/* 1520 */ 563, 224, 563, 107, 225, 442, 565, 564, 1117, 275,
/* 1530 */ 1005, 393, 161, 518, 563, 135, 108, 555, 417, 4,
/* 1540 */ 1340, 407, 75, 75, 77, 77, 304, 554, 867, 563,
/* 1550 */ 336, 563, 224, 558, 463, 407, 74, 74, 465, 1065,
/* 1560 */ 304, 554, 1005, 1005, 1007, 1008, 27, 962, 963, 543,
/* 1570 */ 448, 42, 42, 48, 48, 326, 442, 325, 98, 997,
/* 1580 */ 470, 287, 250, 250, 448, 1009, 407, 472, 552, 339,
/* 1590 */ 250, 304, 554, 879, 878, 331, 108, 555, 98, 4,
/* 1600 */ 1277, 494, 532, 345, 247, 867, 98, 531, 341, 886,
/* 1610 */ 887, 1126, 1076, 558, 1076, 448, 1065, 1015, 1061, 953,
/* 1620 */ 343, 247, 250, 106, 106, 1291, 917, 1276, 850, 110,
/* 1630 */ 107, 144, 442, 565, 564, 918, 442, 1005, 110, 1275,
/* 1640 */ 350, 360, 1009, 1331, 1352, 299, 1399, 1577, 552, 1327,
/* 1650 */ 1552, 550, 1338, 549, 1405, 1256, 1248, 1237, 1236, 1238,
/* 1660 */ 1571, 489, 265, 200, 1324, 363, 365, 367, 11, 1005,
/* 1670 */ 1005, 1007, 1008, 27, 390, 221, 1386, 1015, 280, 1391,
/* 1680 */ 1381, 208, 323, 106, 106, 924, 1374, 453, 283, 324,
/* 1690 */ 107, 474, 442, 565, 564, 1390, 499, 1005, 212, 288,
/* 1700 */ 1274, 397, 353, 108, 555, 195, 4, 1464, 369, 1463,
/* 1710 */ 1574, 1215, 1212, 329, 553, 171, 207, 383, 1511, 196,
/* 1720 */ 558, 254, 1509, 415, 100, 555, 83, 4, 204, 1005,
/* 1730 */ 1005, 1007, 1008, 27, 219, 79, 82, 1469, 180, 166,
/* 1740 */ 173, 558, 458, 442, 175, 176, 177, 178, 35, 1387,
/* 1750 */ 492, 459, 231, 1395, 96, 552, 1393, 1392, 395, 184,
/* 1760 */ 481, 466, 36, 235, 442, 89, 398, 266, 487, 1480,
/* 1770 */ 1458, 237, 188, 338, 508, 429, 552, 490, 400, 238,
/* 1780 */ 334, 1239, 239, 1294, 1015, 1293, 1292, 1285, 91, 871,
/* 1790 */ 106, 106, 213, 431, 1588, 432, 524, 107, 517, 442,
/* 1800 */ 565, 564, 401, 1264, 1005, 1015, 1263, 1587, 352, 1262,
/* 1810 */ 1557, 106, 106, 1586, 1284, 297, 298, 358, 107, 1335,
/* 1820 */ 442, 565, 564, 95, 362, 1005, 253, 252, 435, 125,
/* 1830 */ 543, 10, 1444, 1543, 377, 1542, 1005, 1005, 1007, 1008,
/* 1840 */ 27, 302, 102, 97, 527, 1336, 260, 1317, 364, 1245,
/* 1850 */ 1334, 34, 566, 1171, 366, 381, 375, 1005, 1005, 1007,
/* 1860 */ 1008, 27, 1333, 1359, 368, 1316, 199, 382, 261, 263,
/* 1870 */ 264, 1358, 158, 1496, 141, 1497, 1495, 567, 1234, 1229,
/* 1880 */ 1494, 295, 159, 209, 210, 78, 826, 443, 201, 306,
/* 1890 */ 220, 1075, 138, 1073, 160, 314, 162, 172, 1196, 174,
/* 1900 */ 903, 227, 230, 322, 1089, 179, 163, 164, 418, 85,
/* 1910 */ 420, 181, 170, 408, 409, 86, 87, 165, 88, 1092,
/* 1920 */ 232, 233, 1088, 151, 18, 234, 1081, 250, 333, 185,
/* 1930 */ 1209, 486, 236, 186, 37, 841, 491, 354, 240, 346,
/* 1940 */ 503, 187, 90, 167, 19, 495, 20, 869, 500, 349,
/* 1950 */ 92, 882, 296, 152, 93, 510, 1127, 1159, 153, 1041,
/* 1960 */ 214, 1128, 39, 94, 269, 271, 952, 190, 947, 110,
/* 1970 */ 1149, 1145, 1153, 249, 1133, 1147, 7, 33, 21, 193,
/* 1980 */ 22, 23, 24, 25, 1152, 539, 98, 1056, 26, 1042,
/* 1990 */ 1040, 1044, 1098, 1045, 1097, 256, 255, 28, 40, 387,
/* 2000 */ 1010, 851, 109, 29, 1167, 559, 384, 257, 913, 258,
/* 2010 */ 1166, 1579, 1225, 1225, 1225, 1225, 1225, 1225, 1225, 1578,
};
static const YYCODETYPE yy_lookahead[] = {
/* 0 */ 191, 220, 191, 222, 191, 191, 271, 272, 273, 216,
/* 10 */ 191, 230, 216, 191, 191, 191, 271, 272, 273, 19,
/* 20 */ 232, 233, 213, 214, 213, 214, 202, 292, 202, 232,
/* 30 */ 233, 31, 213, 214, 213, 213, 214, 213, 214, 39,
/* 40 */ 207, 208, 209, 43, 44, 45, 46, 47, 48, 49,
/* 50 */ 50, 51, 52, 53, 54, 55, 56, 57, 235, 19,
/* 60 */ 236, 237, 236, 237, 271, 272, 273, 271, 272, 273,
/* 70 */ 191, 210, 250, 249, 250, 249, 213, 191, 199, 253,
/* 80 */ 254, 259, 203, 43, 44, 45, 46, 47, 48, 49,
/* 90 */ 50, 51, 52, 53, 54, 55, 56, 57, 191, 213,
/* 100 */ 214, 213, 102, 103, 104, 105, 106, 107, 108, 109,
/* 110 */ 110, 111, 112, 59, 228, 301, 293, 81, 305, 306,
/* 120 */ 311, 312, 311, 310, 313, 59, 86, 212, 88, 19,
/* 130 */ 311, 312, 271, 272, 273, 220, 26, 112, 54, 55,
/* 140 */ 56, 57, 102, 103, 104, 105, 106, 107, 108, 109,
/* 150 */ 110, 111, 112, 43, 44, 45, 46, 47, 48, 49,
/* 160 */ 50, 51, 52, 53, 54, 55, 56, 57, 191, 115,
/* 170 */ 116, 117, 118, 137, 138, 121, 122, 123, 191, 69,
/* 180 */ 203, 115, 116, 117, 59, 131, 102, 103, 104, 105,
/* 190 */ 106, 107, 108, 109, 110, 111, 112, 72, 191, 19,
/* 200 */ 54, 55, 56, 57, 58, 108, 109, 110, 111, 112,
/* 210 */ 303, 304, 102, 103, 104, 105, 106, 107, 108, 109,
/* 220 */ 110, 111, 112, 43, 44, 45, 46, 47, 48, 49,
/* 230 */ 50, 51, 52, 53, 54, 55, 56, 57, 19, 16,
/* 240 */ 115, 116, 117, 24, 16, 227, 202, 67, 102, 103,
/* 250 */ 104, 105, 106, 107, 108, 109, 110, 111, 112, 59,
/* 260 */ 26, 191, 43, 44, 45, 46, 47, 48, 49, 50,
/* 270 */ 51, 52, 53, 54, 55, 56, 57, 24, 208, 209,
/* 280 */ 236, 237, 102, 103, 104, 105, 106, 107, 108, 109,
/* 290 */ 110, 111, 112, 249, 183, 184, 185, 186, 187, 188,
/* 300 */ 77, 59, 79, 191, 193, 77, 195, 79, 19, 19,
/* 310 */ 266, 304, 59, 202, 24, 115, 116, 117, 191, 127,
/* 320 */ 128, 102, 103, 104, 105, 106, 107, 108, 109, 110,
/* 330 */ 111, 112, 43, 44, 45, 46, 47, 48, 49, 50,
/* 340 */ 51, 52, 53, 54, 55, 56, 57, 236, 237, 191,
/* 350 */ 150, 281, 191, 185, 186, 187, 188, 115, 116, 117,
/* 360 */ 249, 193, 191, 195, 26, 73, 59, 191, 114, 116,
/* 370 */ 202, 213, 214, 81, 263, 106, 107, 108, 109, 110,
/* 380 */ 111, 112, 148, 160, 142, 95, 228, 191, 191, 213,
/* 390 */ 214, 102, 103, 104, 105, 106, 107, 108, 109, 110,
/* 400 */ 111, 112, 112, 149, 236, 237, 295, 100, 118, 119,
/* 410 */ 120, 121, 122, 123, 124, 19, 31, 249, 126, 23,
/* 420 */ 130, 260, 115, 116, 39, 22, 250, 120, 191, 137,
/* 430 */ 138, 263, 305, 306, 238, 259, 265, 310, 149, 43,
/* 440 */ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
/* 450 */ 54, 55, 56, 57, 191, 117, 191, 210, 19, 152,
/* 460 */ 153, 154, 23, 295, 102, 103, 104, 105, 106, 107,
/* 470 */ 108, 109, 110, 111, 112, 266, 213, 214, 213, 214,
/* 480 */ 142, 81, 43, 44, 45, 46, 47, 48, 49, 50,
/* 490 */ 51, 52, 53, 54, 55, 56, 57, 301, 102, 103,
/* 500 */ 104, 105, 106, 107, 108, 109, 110, 111, 112, 106,
/* 510 */ 107, 118, 59, 250, 121, 122, 123, 280, 76, 119,
/* 520 */ 236, 237, 259, 306, 131, 72, 59, 310, 19, 87,
/* 530 */ 283, 89, 23, 249, 92, 288, 22, 137, 138, 22,
/* 540 */ 275, 102, 103, 104, 105, 106, 107, 108, 109, 110,
/* 550 */ 111, 112, 43, 44, 45, 46, 47, 48, 49, 50,
/* 560 */ 51, 52, 53, 54, 55, 56, 57, 19, 115, 116,
/* 570 */ 117, 23, 186, 59, 188, 108, 59, 241, 191, 193,
/* 580 */ 26, 195, 115, 116, 117, 191, 144, 251, 202, 22,
/* 590 */ 100, 43, 44, 45, 46, 47, 48, 49, 50, 51,
/* 600 */ 52, 53, 54, 55, 56, 57, 116, 213, 214, 191,
/* 610 */ 120, 102, 103, 104, 105, 106, 107, 108, 109, 110,
/* 620 */ 111, 112, 236, 237, 306, 238, 59, 26, 310, 115,
/* 630 */ 116, 117, 115, 116, 117, 249, 246, 19, 248, 106,
/* 640 */ 107, 23, 152, 153, 154, 46, 47, 48, 49, 263,
/* 650 */ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
/* 660 */ 112, 43, 44, 45, 46, 47, 48, 49, 50, 51,
/* 670 */ 52, 53, 54, 55, 56, 57, 19, 76, 298, 299,
/* 680 */ 23, 295, 115, 116, 117, 152, 191, 154, 301, 73,
/* 690 */ 89, 137, 138, 92, 22, 191, 144, 22, 191, 191,
/* 700 */ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
/* 710 */ 53, 54, 55, 56, 57, 163, 191, 213, 214, 120,
/* 720 */ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
/* 730 */ 112, 59, 228, 191, 59, 191, 236, 237, 213, 214,
/* 740 */ 11, 59, 126, 127, 128, 238, 19, 26, 191, 249,
/* 750 */ 23, 164, 165, 228, 191, 213, 214, 213, 214, 102,
/* 760 */ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
/* 770 */ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
/* 780 */ 53, 54, 55, 56, 57, 19, 241, 115, 116, 117,
/* 790 */ 115, 116, 117, 191, 250, 238, 251, 115, 116, 117,
/* 800 */ 157, 23, 159, 191, 26, 191, 111, 112, 301, 43,
/* 810 */ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
/* 820 */ 54, 55, 56, 57, 142, 213, 214, 213, 214, 102,
/* 830 */ 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
/* 840 */ 228, 191, 228, 191, 191, 207, 208, 209, 126, 127,
/* 850 */ 128, 133, 289, 135, 136, 19, 127, 128, 301, 7,
/* 860 */ 8, 9, 141, 213, 214, 213, 214, 265, 102, 103,
/* 870 */ 104, 105, 106, 107, 108, 109, 110, 111, 112, 43,
/* 880 */ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
/* 890 */ 54, 55, 56, 57, 191, 117, 191, 22, 23, 19,
/* 900 */ 250, 26, 250, 191, 223, 191, 126, 127, 128, 205,
/* 910 */ 206, 205, 206, 260, 21, 202, 213, 214, 213, 214,
/* 920 */ 142, 270, 208, 209, 158, 45, 46, 47, 48, 49,
/* 930 */ 50, 51, 52, 53, 54, 55, 56, 57, 102, 103,
/* 940 */ 104, 105, 106, 107, 108, 109, 110, 111, 112, 236,
/* 950 */ 237, 12, 191, 250, 76, 250, 191, 22, 23, 308,
/* 960 */ 309, 26, 249, 202, 191, 191, 27, 89, 191, 202,
/* 970 */ 92, 202, 260, 80, 213, 214, 101, 203, 213, 214,
/* 980 */ 22, 42, 102, 103, 104, 105, 106, 107, 108, 109,
/* 990 */ 110, 111, 112, 228, 158, 281, 108, 236, 237, 225,
/* 1000 */ 191, 227, 63, 236, 237, 236, 237, 191, 235, 191,
/* 1010 */ 249, 250, 73, 241, 19, 122, 249, 59, 249, 24,
/* 1020 */ 259, 29, 134, 251, 191, 33, 22, 139, 24, 213,
/* 1030 */ 214, 213, 214, 191, 19, 210, 101, 191, 43, 44,
/* 1040 */ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
/* 1050 */ 55, 56, 57, 160, 19, 213, 214, 65, 43, 44,
/* 1060 */ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
/* 1070 */ 55, 56, 57, 191, 116, 22, 191, 24, 43, 44,
/* 1080 */ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
/* 1090 */ 55, 56, 57, 191, 261, 213, 214, 102, 103, 104,
/* 1100 */ 105, 106, 107, 108, 109, 110, 111, 112, 59, 19,
/* 1110 */ 191, 265, 59, 288, 191, 213, 214, 102, 103, 104,
/* 1120 */ 105, 106, 107, 108, 109, 110, 111, 112, 35, 191,
/* 1130 */ 66, 191, 213, 214, 191, 270, 46, 102, 103, 104,
/* 1140 */ 105, 106, 107, 108, 109, 110, 111, 112, 191, 85,
/* 1150 */ 265, 213, 214, 213, 214, 106, 107, 19, 94, 66,
/* 1160 */ 137, 138, 191, 114, 115, 116, 117, 74, 119, 116,
/* 1170 */ 213, 214, 202, 308, 309, 306, 127, 191, 235, 310,
/* 1180 */ 59, 191, 44, 45, 46, 47, 48, 49, 50, 51,
/* 1190 */ 52, 53, 54, 55, 56, 57, 191, 76, 196, 213,
/* 1200 */ 214, 152, 12, 154, 114, 191, 236, 237, 87, 145,
/* 1210 */ 89, 19, 20, 92, 22, 22, 23, 27, 191, 249,
/* 1220 */ 130, 202, 129, 202, 191, 235, 306, 152, 36, 154,
/* 1230 */ 310, 191, 42, 191, 191, 191, 115, 116, 117, 191,
/* 1240 */ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
/* 1250 */ 112, 59, 99, 63, 191, 236, 237, 236, 237, 191,
/* 1260 */ 289, 213, 214, 71, 191, 144, 261, 191, 249, 191,
/* 1270 */ 249, 19, 20, 81, 22, 235, 213, 214, 235, 191,
/* 1280 */ 278, 213, 214, 191, 282, 132, 213, 214, 36, 213,
/* 1290 */ 214, 191, 100, 191, 101, 191, 191, 191, 106, 107,
/* 1300 */ 48, 213, 214, 261, 191, 113, 191, 115, 116, 117,
/* 1310 */ 191, 59, 120, 213, 214, 213, 214, 213, 214, 213,
/* 1320 */ 214, 22, 23, 71, 237, 59, 213, 214, 191, 137,
/* 1330 */ 138, 191, 213, 214, 191, 191, 249, 85, 191, 261,
/* 1340 */ 191, 26, 90, 15, 152, 153, 154, 155, 156, 19,
/* 1350 */ 213, 214, 100, 213, 214, 191, 213, 214, 106, 107,
/* 1360 */ 213, 214, 213, 214, 191, 113, 261, 115, 116, 117,
/* 1370 */ 253, 254, 120, 229, 191, 191, 191, 213, 214, 191,
/* 1380 */ 306, 289, 116, 26, 310, 191, 213, 214, 60, 19,
/* 1390 */ 296, 297, 24, 191, 46, 191, 213, 214, 213, 214,
/* 1400 */ 101, 213, 214, 191, 152, 153, 154, 155, 156, 0,
/* 1410 */ 1, 2, 191, 229, 5, 213, 214, 213, 214, 10,
/* 1420 */ 11, 12, 13, 14, 1, 2, 17, 191, 5, 19,
/* 1430 */ 20, 191, 22, 10, 11, 12, 13, 14, 191, 30,
/* 1440 */ 17, 32, 241, 148, 149, 115, 36, 191, 241, 40,
/* 1450 */ 191, 26, 251, 30, 191, 32, 141, 22, 251, 5,
/* 1460 */ 213, 214, 114, 40, 10, 11, 12, 13, 14, 59,
/* 1470 */ 134, 17, 213, 214, 191, 139, 213, 214, 191, 70,
/* 1480 */ 191, 71, 125, 191, 30, 115, 32, 78, 53, 191,
/* 1490 */ 81, 191, 191, 70, 40, 85, 213, 214, 191, 22,
/* 1500 */ 90, 78, 213, 214, 81, 213, 214, 98, 140, 120,
/* 1510 */ 100, 213, 214, 213, 214, 23, 106, 107, 26, 130,
/* 1520 */ 191, 98, 191, 113, 70, 115, 116, 117, 23, 22,
/* 1530 */ 120, 26, 78, 19, 191, 81, 19, 20, 61, 22,
/* 1540 */ 191, 132, 213, 214, 213, 214, 137, 138, 59, 191,
/* 1550 */ 191, 191, 98, 36, 128, 132, 213, 214, 128, 59,
/* 1560 */ 137, 138, 152, 153, 154, 155, 156, 83, 84, 144,
/* 1570 */ 161, 213, 214, 213, 214, 23, 59, 151, 26, 23,
/* 1580 */ 23, 151, 26, 26, 161, 59, 132, 23, 71, 191,
/* 1590 */ 26, 137, 138, 119, 120, 23, 19, 20, 26, 22,
/* 1600 */ 223, 23, 85, 23, 26, 116, 26, 90, 191, 7,
/* 1610 */ 8, 97, 152, 36, 154, 161, 116, 100, 23, 23,
/* 1620 */ 191, 26, 26, 106, 107, 191, 23, 223, 23, 26,
/* 1630 */ 113, 26, 115, 116, 117, 23, 59, 120, 26, 191,
/* 1640 */ 191, 191, 116, 255, 191, 252, 191, 140, 71, 191,
/* 1650 */ 315, 233, 191, 191, 191, 191, 191, 191, 191, 191,
/* 1660 */ 191, 285, 284, 239, 252, 252, 252, 252, 240, 152,
/* 1670 */ 153, 154, 155, 156, 189, 294, 268, 100, 242, 268,
/* 1680 */ 264, 211, 290, 106, 107, 108, 264, 256, 256, 243,
/* 1690 */ 113, 290, 115, 116, 117, 268, 217, 120, 226, 243,
/* 1700 */ 222, 268, 216, 19, 20, 246, 22, 216, 256, 216,
/* 1710 */ 194, 60, 38, 242, 277, 294, 240, 242, 198, 246,
/* 1720 */ 36, 140, 198, 198, 19, 20, 150, 22, 149, 152,
/* 1730 */ 153, 154, 155, 156, 294, 291, 291, 280, 22, 43,
/* 1740 */ 231, 36, 18, 59, 234, 234, 234, 234, 267, 269,
/* 1750 */ 18, 198, 197, 231, 148, 71, 269, 269, 243, 231,
/* 1760 */ 198, 243, 267, 197, 59, 157, 243, 198, 62, 287,
/* 1770 */ 243, 197, 22, 198, 114, 64, 71, 218, 218, 197,
/* 1780 */ 286, 198, 197, 215, 100, 215, 215, 224, 22, 125,
/* 1790 */ 106, 107, 164, 24, 221, 112, 143, 113, 302, 115,
/* 1800 */ 116, 117, 218, 215, 120, 100, 217, 221, 215, 215,
/* 1810 */ 309, 106, 107, 215, 224, 279, 279, 218, 113, 258,
/* 1820 */ 115, 116, 117, 114, 257, 120, 91, 198, 82, 147,
/* 1830 */ 144, 22, 274, 314, 198, 314, 152, 153, 154, 155,
/* 1840 */ 156, 276, 157, 146, 145, 258, 25, 247, 257, 201,
/* 1850 */ 258, 26, 200, 13, 257, 244, 246, 152, 153, 154,
/* 1860 */ 155, 156, 258, 262, 257, 247, 245, 243, 192, 192,
/* 1870 */ 6, 262, 204, 210, 219, 210, 210, 190, 190, 190,
/* 1880 */ 210, 219, 204, 211, 211, 210, 4, 3, 22, 162,
/* 1890 */ 15, 23, 16, 23, 204, 138, 129, 150, 26, 141,
/* 1900 */ 20, 24, 143, 16, 1, 141, 129, 129, 61, 53,
/* 1910 */ 37, 150, 297, 300, 300, 53, 53, 129, 53, 115,
/* 1920 */ 34, 140, 1, 5, 22, 114, 68, 26, 160, 68,
/* 1930 */ 75, 41, 140, 114, 24, 20, 19, 130, 124, 23,
/* 1940 */ 96, 22, 22, 37, 22, 67, 22, 59, 67, 24,
/* 1950 */ 22, 28, 67, 23, 148, 22, 97, 23, 23, 23,
/* 1960 */ 140, 23, 22, 26, 23, 23, 115, 22, 142, 26,
/* 1970 */ 75, 88, 75, 34, 23, 86, 44, 22, 34, 26,
/* 1980 */ 34, 34, 34, 34, 93, 24, 26, 23, 34, 23,
/* 1990 */ 23, 23, 23, 11, 23, 22, 26, 22, 22, 15,
/* 2000 */ 23, 23, 22, 22, 1, 26, 23, 140, 134, 140,
/* 2010 */ 1, 140, 316, 316, 316, 316, 316, 316, 316, 140,
/* 2020 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316,
/* 2030 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316,
/* 2040 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316,
/* 2050 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316,
/* 2060 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316,
/* 2070 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316,
/* 2080 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316,
/* 2090 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316,
/* 2100 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316,
/* 2110 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316,
/* 2120 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316,
/* 2130 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316,
/* 2140 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316,
/* 2150 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316,
/* 2160 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316,
/* 2170 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316,
/* 2180 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316,
/* 2190 */ 316, 316, 316, 316, 316, 316, 316, 316, 316, 316,
/* 2200 */ 316, 316, 316,
};
#define YY_SHIFT_COUNT (569)
#define YY_SHIFT_MIN (0)
#define YY_SHIFT_MAX (2009)
static const unsigned short int yy_shift_ofst[] = {
/* 0 */ 1423, 1409, 1454, 1192, 1192, 36, 1252, 1410, 1517, 1684,
/* 10 */ 1684, 1684, 292, 0, 0, 180, 1015, 1684, 1684, 1684,
/* 20 */ 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684,
/* 30 */ 1049, 1049, 1121, 1121, 54, 400, 36, 36, 36, 36,
/* 40 */ 36, 40, 110, 219, 289, 396, 439, 509, 548, 618,
/* 50 */ 657, 727, 766, 836, 995, 1015, 1015, 1015, 1015, 1015,
/* 60 */ 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015, 1015,
/* 70 */ 1015, 1015, 1015, 1035, 1015, 1138, 880, 880, 1577, 1684,
/* 80 */ 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684,
/* 90 */ 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684,
/* 100 */ 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684, 1684,
/* 110 */ 1684, 1684, 1684, 1705, 1684, 1684, 1684, 1684, 1684, 1684,
/* 120 */ 1684, 1684, 1684, 1684, 1684, 1684, 1684, 146, 84, 84,
/* 130 */ 84, 84, 84, 362, 269, 125, 97, 453, 66, 66,
/* 140 */ 893, 1090, 66, 66, 533, 533, 66, 554, 554, 554,
/* 150 */ 554, 192, 587, 587, 695, 25, 2020, 2020, 290, 290,
/* 160 */ 290, 200, 514, 514, 514, 514, 939, 939, 442, 875,
/* 170 */ 935, 66, 66, 66, 66, 66, 66, 66, 66, 66,
/* 180 */ 66, 66, 66, 66, 66, 66, 66, 66, 66, 66,
/* 190 */ 66, 601, 601, 66, 729, 878, 878, 1266, 1266, 552,
/* 200 */ 1023, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 307, 490,
/* 210 */ 490, 567, 393, 517, 467, 672, 242, 682, 675, 66,
/* 220 */ 66, 66, 66, 66, 66, 66, 66, 66, 66, 616,
/* 230 */ 66, 66, 66, 66, 66, 66, 66, 66, 66, 66,
/* 240 */ 66, 66, 1093, 1093, 1093, 66, 66, 66, 778, 66,
/* 250 */ 66, 66, 1053, 1064, 66, 66, 1190, 66, 66, 66,
/* 260 */ 66, 66, 66, 66, 66, 722, 992, 718, 253, 253,
/* 270 */ 253, 253, 338, 718, 718, 888, 403, 852, 1328, 254,
/* 280 */ 1295, 721, 1330, 1295, 1330, 1370, 234, 254, 254, 234,
/* 290 */ 254, 721, 1370, 1357, 1492, 1348, 385, 385, 385, 1330,
/* 300 */ 1425, 1425, 643, 1315, 1336, 1004, 1651, 1651, 1581, 1581,
/* 310 */ 1674, 1674, 1581, 1576, 1579, 1716, 1696, 1724, 1724, 1724,
/* 320 */ 1724, 1581, 1732, 1606, 1579, 1579, 1606, 1716, 1696, 1606,
/* 330 */ 1696, 1606, 1581, 1732, 1608, 1706, 1581, 1732, 1750, 1581,
/* 340 */ 1732, 1581, 1732, 1750, 1660, 1660, 1660, 1711, 1766, 1766,
/* 350 */ 1750, 1660, 1664, 1660, 1711, 1660, 1660, 1628, 1769, 1683,
/* 360 */ 1683, 1750, 1653, 1709, 1653, 1709, 1653, 1709, 1653, 1709,
/* 370 */ 1581, 1735, 1735, 1746, 1746, 1682, 1686, 1809, 1581, 1685,
/* 380 */ 1682, 1697, 1699, 1606, 1821, 1825, 1840, 1840, 1864, 1864,
/* 390 */ 1864, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020,
/* 400 */ 2020, 2020, 2020, 2020, 2020, 2020, 599, 223, 1193, 1299,
/* 410 */ 228, 780, 958, 1505, 1153, 1435, 1368, 1426, 1430, 1552,
/* 420 */ 1477, 1556, 1557, 1564, 1572, 1578, 1580, 1489, 1474, 1602,
/* 430 */ 1389, 1514, 1500, 1595, 1596, 1484, 1603, 1075, 1460, 1605,
/* 440 */ 1612, 1526, 1507, 1882, 1884, 1866, 1727, 1875, 1876, 1868,
/* 450 */ 1870, 1757, 1747, 1767, 1872, 1872, 1877, 1758, 1880, 1759,
/* 460 */ 1887, 1903, 1764, 1777, 1872, 1778, 1847, 1873, 1872, 1761,
/* 470 */ 1856, 1862, 1863, 1865, 1788, 1804, 1886, 1781, 1921, 1918,
/* 480 */ 1902, 1811, 1768, 1858, 1901, 1861, 1855, 1890, 1792, 1819,
/* 490 */ 1910, 1915, 1917, 1807, 1814, 1919, 1878, 1920, 1922, 1916,
/* 500 */ 1924, 1881, 1888, 1925, 1844, 1923, 1928, 1885, 1906, 1930,
/* 510 */ 1806, 1933, 1934, 1935, 1936, 1937, 1938, 1940, 1859, 1820,
/* 520 */ 1941, 1942, 1851, 1939, 1945, 1826, 1943, 1944, 1946, 1947,
/* 530 */ 1948, 1883, 1895, 1889, 1932, 1897, 1891, 1949, 1951, 1955,
/* 540 */ 1961, 1953, 1960, 1954, 1964, 1943, 1966, 1967, 1968, 1969,
/* 550 */ 1970, 1971, 1973, 1982, 1975, 1976, 1977, 1978, 1980, 1981,
/* 560 */ 1979, 1874, 1867, 1869, 1871, 1879, 1983, 1984, 2003, 2009,
};
#define YY_REDUCE_COUNT (405)
#define YY_REDUCE_MIN (-265)
#define YY_REDUCE_MAX (1690)
static const short yy_reduce_ofst[] = {
/* 0 */ 111, 168, 386, 761, -176, -174, -191, -189, -181, -178,
/* 10 */ 176, 263, 44, -207, -204, -265, -139, -114, 158, 504,
/* 20 */ 525, 544, 612, 614, 650, 652, 765, 265, 703, 705,
/* 30 */ 70, 714, -187, 127, 774, 713, 767, 769, 970, 1019,
/* 40 */ 1021, -255, -255, -255, -255, -255, -255, -255, -255, -255,
/* 50 */ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
/* 60 */ -255, -255, -255, -255, -255, -255, -255, -255, -255, -255,
/* 70 */ -255, -255, -255, -255, -255, -255, -255, -255, 394, 542,
/* 80 */ 816, 818, 842, 882, 902, 919, 938, 940, 957, 986,
/* 90 */ 1048, 1063, 1068, 1073, 1076, 1088, 1100, 1102, 1104, 1106,
/* 100 */ 1113, 1119, 1137, 1140, 1143, 1147, 1149, 1164, 1173, 1183,
/* 110 */ 1185, 1188, 1202, 1204, 1247, 1259, 1263, 1283, 1289, 1292,
/* 120 */ 1298, 1300, 1329, 1331, 1343, 1358, 1360, -255, -255, -255,
/* 130 */ -255, -255, -255, -255, -255, 196, -255, 387, -177, 507,
/* 140 */ 1002, -219, 557, -93, -167, 638, -121, 284, 500, 284,
/* 150 */ 500, 247, 651, 865, -255, -255, -255, -255, -85, -85,
/* 160 */ -85, 237, 171, 602, 846, 885, -212, -203, 217, 380,
/* 170 */ 380, -23, 161, 653, 712, 773, 943, 990, 1040, 563,
/* 180 */ 833, 971, 1005, 1042, 1092, 1078, 1043, 1144, 1184, -186,
/* 190 */ 1105, 318, 869, 7, 825, 920, 1074, 704, 706, 390,
/* 200 */ 1087, 1094, 336, 545, 772, 1201, 1117, 1207, -179, -137,
/* 210 */ -112, -13, 18, 112, 197, 418, 495, 508, 777, 809,
/* 220 */ 923, 1014, 1027, 1033, 1044, 1115, 1194, 1212, 1221, 209,
/* 230 */ 1236, 1240, 1256, 1287, 1301, 1307, 1349, 1359, 1398, 1417,
/* 240 */ 1429, 1434, 681, 1377, 1404, 1448, 1449, 1450, 1388, 1453,
/* 250 */ 1455, 1458, 1393, 1335, 1461, 1462, 1418, 1463, 197, 1464,
/* 260 */ 1465, 1466, 1467, 1468, 1469, 1376, 1378, 1424, 1412, 1413,
/* 270 */ 1414, 1415, 1388, 1424, 1424, 1428, 1470, 1485, 1381, 1408,
/* 280 */ 1416, 1436, 1431, 1422, 1432, 1392, 1446, 1411, 1427, 1456,
/* 290 */ 1433, 1471, 1401, 1479, 1472, 1478, 1486, 1491, 1493, 1452,
/* 300 */ 1459, 1473, 1437, 1475, 1476, 1516, 1421, 1440, 1520, 1524,
/* 310 */ 1444, 1445, 1525, 1457, 1480, 1481, 1509, 1510, 1511, 1512,
/* 320 */ 1513, 1553, 1555, 1515, 1487, 1488, 1518, 1495, 1522, 1523,
/* 330 */ 1528, 1527, 1562, 1566, 1482, 1494, 1569, 1574, 1559, 1575,
/* 340 */ 1582, 1583, 1585, 1560, 1568, 1570, 1571, 1563, 1573, 1586,
/* 350 */ 1584, 1588, 1589, 1593, 1590, 1594, 1598, 1501, 1496, 1536,
/* 360 */ 1537, 1599, 1561, 1567, 1587, 1591, 1592, 1597, 1604, 1607,
/* 370 */ 1629, 1519, 1521, 1601, 1609, 1600, 1610, 1558, 1636, 1565,
/* 380 */ 1618, 1621, 1611, 1624, 1648, 1652, 1676, 1677, 1687, 1688,
/* 390 */ 1689, 1613, 1614, 1615, 1668, 1663, 1665, 1666, 1670, 1678,
/* 400 */ 1655, 1662, 1672, 1673, 1675, 1690,
};
static const YYACTIONTYPE yy_default[] = {
/* 0 */ 1623, 1623, 1623, 1453, 1223, 1332, 1223, 1223, 1223, 1453,
/* 10 */ 1453, 1453, 1223, 1362, 1362, 1506, 1254, 1223, 1223, 1223,
/* 20 */ 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1452, 1223, 1223,
/* 30 */ 1223, 1223, 1541, 1541, 1223, 1223, 1223, 1223, 1223, 1223,
/* 40 */ 1223, 1223, 1371, 1223, 1378, 1223, 1223, 1223, 1223, 1223,
/* 50 */ 1454, 1455, 1223, 1223, 1223, 1505, 1507, 1470, 1385, 1384,
/* 60 */ 1383, 1382, 1488, 1349, 1376, 1369, 1373, 1448, 1449, 1447,
/* 70 */ 1451, 1455, 1454, 1223, 1372, 1419, 1433, 1418, 1223, 1223,
/* 80 */ 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
/* 90 */ 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
/* 100 */ 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
/* 110 */ 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
/* 120 */ 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1427, 1432, 1438,
/* 130 */ 1431, 1428, 1421, 1420, 1422, 1223, 1423, 1223, 1223, 1223,
/* 140 */ 1244, 1296, 1223, 1223, 1223, 1223, 1223, 1525, 1524, 1223,
/* 150 */ 1223, 1254, 1413, 1412, 1424, 1425, 1435, 1434, 1513, 1576,
/* 160 */ 1575, 1471, 1223, 1223, 1223, 1223, 1223, 1223, 1541, 1223,
/* 170 */ 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
/* 180 */ 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
/* 190 */ 1223, 1541, 1541, 1223, 1254, 1541, 1541, 1250, 1250, 1356,
/* 200 */ 1223, 1520, 1323, 1323, 1323, 1323, 1332, 1323, 1223, 1223,
/* 210 */ 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
/* 220 */ 1223, 1223, 1223, 1510, 1508, 1223, 1223, 1223, 1223, 1223,
/* 230 */ 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
/* 240 */ 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
/* 250 */ 1223, 1223, 1328, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
/* 260 */ 1223, 1223, 1223, 1223, 1570, 1223, 1483, 1310, 1328, 1328,
/* 270 */ 1328, 1328, 1330, 1311, 1309, 1322, 1255, 1230, 1615, 1388,
/* 280 */ 1377, 1329, 1351, 1377, 1351, 1612, 1375, 1388, 1388, 1375,
/* 290 */ 1388, 1329, 1612, 1271, 1592, 1266, 1362, 1362, 1362, 1351,
/* 300 */ 1356, 1356, 1450, 1329, 1322, 1223, 1615, 1615, 1337, 1337,
/* 310 */ 1614, 1614, 1337, 1471, 1599, 1397, 1299, 1305, 1305, 1305,
/* 320 */ 1305, 1337, 1241, 1375, 1599, 1599, 1375, 1397, 1299, 1375,
/* 330 */ 1299, 1375, 1337, 1241, 1487, 1609, 1337, 1241, 1461, 1337,
/* 340 */ 1241, 1337, 1241, 1461, 1297, 1297, 1297, 1286, 1223, 1223,
/* 350 */ 1461, 1297, 1271, 1297, 1286, 1297, 1297, 1559, 1223, 1465,
/* 360 */ 1465, 1461, 1355, 1350, 1355, 1350, 1355, 1350, 1355, 1350,
/* 370 */ 1337, 1551, 1551, 1365, 1365, 1370, 1356, 1456, 1337, 1223,
/* 380 */ 1370, 1368, 1366, 1375, 1247, 1289, 1573, 1573, 1569, 1569,
/* 390 */ 1569, 1620, 1620, 1520, 1585, 1254, 1254, 1254, 1254, 1585,
/* 400 */ 1273, 1273, 1255, 1255, 1254, 1585, 1223, 1223, 1223, 1223,
/* 410 */ 1223, 1223, 1580, 1223, 1515, 1472, 1341, 1223, 1223, 1223,
/* 420 */ 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
/* 430 */ 1223, 1526, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
/* 440 */ 1223, 1223, 1402, 1223, 1226, 1517, 1223, 1223, 1223, 1223,
/* 450 */ 1223, 1223, 1223, 1223, 1379, 1380, 1342, 1223, 1223, 1223,
/* 460 */ 1223, 1223, 1223, 1223, 1394, 1223, 1223, 1223, 1389, 1223,
/* 470 */ 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1611, 1223, 1223,
/* 480 */ 1223, 1223, 1223, 1223, 1486, 1485, 1223, 1223, 1339, 1223,
/* 490 */ 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
/* 500 */ 1223, 1223, 1269, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
/* 510 */ 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
/* 520 */ 1223, 1223, 1223, 1223, 1223, 1223, 1367, 1223, 1223, 1223,
/* 530 */ 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
/* 540 */ 1223, 1556, 1357, 1223, 1223, 1602, 1223, 1223, 1223, 1223,
/* 550 */ 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223, 1223,
/* 560 */ 1596, 1313, 1404, 1223, 1403, 1407, 1223, 1235, 1223, 1223,
};
/********** 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[] = {
0, /* $ => nothing */
0, /* SEMI => nothing */
59, /* EXPLAIN => ID */
59, /* QUERY => ID */
59, /* PLAN => ID */
59, /* BEGIN => ID */
0, /* TRANSACTION => nothing */
59, /* DEFERRED => ID */
59, /* IMMEDIATE => ID */
59, /* EXCLUSIVE => ID */
0, /* COMMIT => nothing */
59, /* END => ID */
59, /* ROLLBACK => ID */
59, /* SAVEPOINT => ID */
59, /* RELEASE => ID */
0, /* TO => nothing */
0, /* TABLE => nothing */
0, /* CREATE => nothing */
59, /* IF => ID */
0, /* NOT => nothing */
0, /* EXISTS => nothing */
59, /* TEMP => ID */
0, /* LP => nothing */
0, /* RP => nothing */
0, /* AS => nothing */
59, /* WITHOUT => ID */
0, /* COMMA => nothing */
59, /* ABORT => ID */
59, /* ACTION => ID */
59, /* AFTER => ID */
59, /* ANALYZE => ID */
59, /* ASC => ID */
59, /* ATTACH => ID */
59, /* BEFORE => ID */
59, /* BY => ID */
59, /* CASCADE => ID */
59, /* CAST => ID */
59, /* CONFLICT => ID */
59, /* DATABASE => ID */
59, /* DESC => ID */
59, /* DETACH => ID */
59, /* EACH => ID */
59, /* FAIL => ID */
0, /* OR => nothing */
0, /* AND => nothing */
0, /* IS => nothing */
59, /* MATCH => ID */
59, /* LIKE_KW => ID */
0, /* BETWEEN => nothing */
0, /* IN => nothing */
0, /* ISNULL => nothing */
0, /* NOTNULL => nothing */
0, /* NE => nothing */
0, /* EQ => nothing */
0, /* GT => nothing */
0, /* LE => nothing */
0, /* LT => nothing */
0, /* GE => nothing */
0, /* ESCAPE => nothing */
0, /* ID => nothing */
59, /* COLUMNKW => ID */
59, /* DO => ID */
59, /* FOR => ID */
59, /* IGNORE => ID */
59, /* INITIALLY => ID */
59, /* INSTEAD => ID */
59, /* NO => ID */
59, /* KEY => ID */
59, /* OF => ID */
59, /* OFFSET => ID */
59, /* PRAGMA => ID */
59, /* RAISE => ID */
59, /* RECURSIVE => ID */
59, /* REPLACE => ID */
59, /* RESTRICT => ID */
59, /* ROW => ID */
59, /* ROWS => ID */
59, /* TRIGGER => ID */
59, /* VACUUM => ID */
59, /* VIEW => ID */
59, /* VIRTUAL => ID */
59, /* WITH => ID */
59, /* NULLS => ID */
59, /* FIRST => ID */
59, /* LAST => ID */
59, /* CURRENT => ID */
59, /* FOLLOWING => ID */
59, /* PARTITION => ID */
59, /* PRECEDING => ID */
59, /* RANGE => ID */
59, /* UNBOUNDED => ID */
59, /* EXCLUDE => ID */
59, /* GROUPS => ID */
59, /* OTHERS => ID */
59, /* TIES => ID */
59, /* GENERATED => ID */
59, /* ALWAYS => ID */
59, /* MATERIALIZED => ID */
59, /* REINDEX => ID */
59, /* RENAME => ID */
59, /* CTIME_KW => ID */
0, /* ANY => nothing */
0, /* BITAND => nothing */
0, /* BITOR => nothing */
0, /* LSHIFT => nothing */
0, /* RSHIFT => nothing */
0, /* PLUS => nothing */
0, /* MINUS => nothing */
0, /* STAR => nothing */
0, /* SLASH => nothing */
0, /* REM => nothing */
0, /* CONCAT => nothing */
0, /* COLLATE => nothing */
0, /* BITNOT => nothing */
0, /* ON => nothing */
0, /* INDEXED => nothing */
0, /* STRING => nothing */
0, /* JOIN_KW => nothing */
0, /* CONSTRAINT => nothing */
0, /* DEFAULT => nothing */
0, /* NULL => nothing */
0, /* PRIMARY => nothing */
0, /* UNIQUE => nothing */
0, /* CHECK => nothing */
0, /* REFERENCES => nothing */
0, /* AUTOINCR => nothing */
0, /* INSERT => nothing */
0, /* DELETE => nothing */
0, /* UPDATE => nothing */
0, /* SET => nothing */
0, /* DEFERRABLE => nothing */
0, /* FOREIGN => nothing */
0, /* DROP => nothing */
0, /* UNION => nothing */
0, /* ALL => nothing */
0, /* EXCEPT => nothing */
0, /* INTERSECT => nothing */
0, /* SELECT => nothing */
0, /* VALUES => nothing */
0, /* DISTINCT => nothing */
0, /* DOT => nothing */
0, /* FROM => nothing */
0, /* JOIN => nothing */
0, /* USING => nothing */
0, /* ORDER => nothing */
0, /* GROUP => nothing */
0, /* HAVING => nothing */
0, /* LIMIT => nothing */
0, /* WHERE => nothing */
0, /* RETURNING => nothing */
0, /* INTO => nothing */
0, /* NOTHING => nothing */
0, /* FLOAT => nothing */
0, /* BLOB => nothing */
0, /* INTEGER => nothing */
0, /* VARIABLE => nothing */
0, /* CASE => nothing */
0, /* WHEN => nothing */
0, /* THEN => nothing */
0, /* ELSE => nothing */
0, /* INDEX => nothing */
0, /* ALTER => nothing */
0, /* ADD => nothing */
0, /* WINDOW => nothing */
0, /* OVER => nothing */
0, /* FILTER => nothing */
0, /* COLUMN => nothing */
0, /* AGG_FUNCTION => nothing */
0, /* AGG_COLUMN => nothing */
0, /* TRUEFALSE => nothing */
0, /* ISNOT => nothing */
0, /* FUNCTION => nothing */
0, /* UMINUS => nothing */
0, /* UPLUS => nothing */
0, /* TRUTH => nothing */
0, /* REGISTER => nothing */
0, /* VECTOR => nothing */
0, /* SELECT_COLUMN => nothing */
0, /* IF_NULL_ROW => nothing */
0, /* ASTERISK => nothing */
0, /* SPAN => nothing */
0, /* SPACE => nothing */
0, /* ILLEGAL => nothing */
};
#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
sqlite3ParserARG_SDECL /* A place to hold %extra_argument */
sqlite3ParserCTX_SDECL /* A place to hold %extra_context */
#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 "libc/assert.h"
#include "libc/stdio/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.
*/
void sqlite3ParserTrace(FILE *TraceFILE, char *zTracePrompt){
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 */ "$",
/* 1 */ "SEMI",
/* 2 */ "EXPLAIN",
/* 3 */ "QUERY",
/* 4 */ "PLAN",
/* 5 */ "BEGIN",
/* 6 */ "TRANSACTION",
/* 7 */ "DEFERRED",
/* 8 */ "IMMEDIATE",
/* 9 */ "EXCLUSIVE",
/* 10 */ "COMMIT",
/* 11 */ "END",
/* 12 */ "ROLLBACK",
/* 13 */ "SAVEPOINT",
/* 14 */ "RELEASE",
/* 15 */ "TO",
/* 16 */ "TABLE",
/* 17 */ "CREATE",
/* 18 */ "IF",
/* 19 */ "NOT",
/* 20 */ "EXISTS",
/* 21 */ "TEMP",
/* 22 */ "LP",
/* 23 */ "RP",
/* 24 */ "AS",
/* 25 */ "WITHOUT",
/* 26 */ "COMMA",
/* 27 */ "ABORT",
/* 28 */ "ACTION",
/* 29 */ "AFTER",
/* 30 */ "ANALYZE",
/* 31 */ "ASC",
/* 32 */ "ATTACH",
/* 33 */ "BEFORE",
/* 34 */ "BY",
/* 35 */ "CASCADE",
/* 36 */ "CAST",
/* 37 */ "CONFLICT",
/* 38 */ "DATABASE",
/* 39 */ "DESC",
/* 40 */ "DETACH",
/* 41 */ "EACH",
/* 42 */ "FAIL",
/* 43 */ "OR",
/* 44 */ "AND",
/* 45 */ "IS",
/* 46 */ "MATCH",
/* 47 */ "LIKE_KW",
/* 48 */ "BETWEEN",
/* 49 */ "IN",
/* 50 */ "ISNULL",
/* 51 */ "NOTNULL",
/* 52 */ "NE",
/* 53 */ "EQ",
/* 54 */ "GT",
/* 55 */ "LE",
/* 56 */ "LT",
/* 57 */ "GE",
/* 58 */ "ESCAPE",
/* 59 */ "ID",
/* 60 */ "COLUMNKW",
/* 61 */ "DO",
/* 62 */ "FOR",
/* 63 */ "IGNORE",
/* 64 */ "INITIALLY",
/* 65 */ "INSTEAD",
/* 66 */ "NO",
/* 67 */ "KEY",
/* 68 */ "OF",
/* 69 */ "OFFSET",
/* 70 */ "PRAGMA",
/* 71 */ "RAISE",
/* 72 */ "RECURSIVE",
/* 73 */ "REPLACE",
/* 74 */ "RESTRICT",
/* 75 */ "ROW",
/* 76 */ "ROWS",
/* 77 */ "TRIGGER",
/* 78 */ "VACUUM",
/* 79 */ "VIEW",
/* 80 */ "VIRTUAL",
/* 81 */ "WITH",
/* 82 */ "NULLS",
/* 83 */ "FIRST",
/* 84 */ "LAST",
/* 85 */ "CURRENT",
/* 86 */ "FOLLOWING",
/* 87 */ "PARTITION",
/* 88 */ "PRECEDING",
/* 89 */ "RANGE",
/* 90 */ "UNBOUNDED",
/* 91 */ "EXCLUDE",
/* 92 */ "GROUPS",
/* 93 */ "OTHERS",
/* 94 */ "TIES",
/* 95 */ "GENERATED",
/* 96 */ "ALWAYS",
/* 97 */ "MATERIALIZED",
/* 98 */ "REINDEX",
/* 99 */ "RENAME",
/* 100 */ "CTIME_KW",
/* 101 */ "ANY",
/* 102 */ "BITAND",
/* 103 */ "BITOR",
/* 104 */ "LSHIFT",
/* 105 */ "RSHIFT",
/* 106 */ "PLUS",
/* 107 */ "MINUS",
/* 108 */ "STAR",
/* 109 */ "SLASH",
/* 110 */ "REM",
/* 111 */ "CONCAT",
/* 112 */ "COLLATE",
/* 113 */ "BITNOT",
/* 114 */ "ON",
/* 115 */ "INDEXED",
/* 116 */ "STRING",
/* 117 */ "JOIN_KW",
/* 118 */ "CONSTRAINT",
/* 119 */ "DEFAULT",
/* 120 */ "NULL",
/* 121 */ "PRIMARY",
/* 122 */ "UNIQUE",
/* 123 */ "CHECK",
/* 124 */ "REFERENCES",
/* 125 */ "AUTOINCR",
/* 126 */ "INSERT",
/* 127 */ "DELETE",
/* 128 */ "UPDATE",
/* 129 */ "SET",
/* 130 */ "DEFERRABLE",
/* 131 */ "FOREIGN",
/* 132 */ "DROP",
/* 133 */ "UNION",
/* 134 */ "ALL",
/* 135 */ "EXCEPT",
/* 136 */ "INTERSECT",
/* 137 */ "SELECT",
/* 138 */ "VALUES",
/* 139 */ "DISTINCT",
/* 140 */ "DOT",
/* 141 */ "FROM",
/* 142 */ "JOIN",
/* 143 */ "USING",
/* 144 */ "ORDER",
/* 145 */ "GROUP",
/* 146 */ "HAVING",
/* 147 */ "LIMIT",
/* 148 */ "WHERE",
/* 149 */ "RETURNING",
/* 150 */ "INTO",
/* 151 */ "NOTHING",
/* 152 */ "FLOAT",
/* 153 */ "BLOB",
/* 154 */ "INTEGER",
/* 155 */ "VARIABLE",
/* 156 */ "CASE",
/* 157 */ "WHEN",
/* 158 */ "THEN",
/* 159 */ "ELSE",
/* 160 */ "INDEX",
/* 161 */ "ALTER",
/* 162 */ "ADD",
/* 163 */ "WINDOW",
/* 164 */ "OVER",
/* 165 */ "FILTER",
/* 166 */ "COLUMN",
/* 167 */ "AGG_FUNCTION",
/* 168 */ "AGG_COLUMN",
/* 169 */ "TRUEFALSE",
/* 170 */ "ISNOT",
/* 171 */ "FUNCTION",
/* 172 */ "UMINUS",
/* 173 */ "UPLUS",
/* 174 */ "TRUTH",
/* 175 */ "REGISTER",
/* 176 */ "VECTOR",
/* 177 */ "SELECT_COLUMN",
/* 178 */ "IF_NULL_ROW",
/* 179 */ "ASTERISK",
/* 180 */ "SPAN",
/* 181 */ "SPACE",
/* 182 */ "ILLEGAL",
/* 183 */ "input",
/* 184 */ "cmdlist",
/* 185 */ "ecmd",
/* 186 */ "cmdx",
/* 187 */ "explain",
/* 188 */ "cmd",
/* 189 */ "transtype",
/* 190 */ "trans_opt",
/* 191 */ "nm",
/* 192 */ "savepoint_opt",
/* 193 */ "create_table",
/* 194 */ "create_table_args",
/* 195 */ "createkw",
/* 196 */ "temp",
/* 197 */ "ifnotexists",
/* 198 */ "dbnm",
/* 199 */ "columnlist",
/* 200 */ "conslist_opt",
/* 201 */ "table_options",
/* 202 */ "select",
/* 203 */ "columnname",
/* 204 */ "carglist",
/* 205 */ "typetoken",
/* 206 */ "typename",
/* 207 */ "signed",
/* 208 */ "plus_num",
/* 209 */ "minus_num",
/* 210 */ "scanpt",
/* 211 */ "scantok",
/* 212 */ "ccons",
/* 213 */ "term",
/* 214 */ "expr",
/* 215 */ "onconf",
/* 216 */ "sortorder",
/* 217 */ "autoinc",
/* 218 */ "eidlist_opt",
/* 219 */ "refargs",
/* 220 */ "defer_subclause",
/* 221 */ "generated",
/* 222 */ "refarg",
/* 223 */ "refact",
/* 224 */ "init_deferred_pred_opt",
/* 225 */ "conslist",
/* 226 */ "tconscomma",
/* 227 */ "tcons",
/* 228 */ "sortlist",
/* 229 */ "eidlist",
/* 230 */ "defer_subclause_opt",
/* 231 */ "orconf",
/* 232 */ "resolvetype",
/* 233 */ "raisetype",
/* 234 */ "ifexists",
/* 235 */ "fullname",
/* 236 */ "selectnowith",
/* 237 */ "oneselect",
/* 238 */ "wqlist",
/* 239 */ "multiselect_op",
/* 240 */ "distinct",
/* 241 */ "selcollist",
/* 242 */ "from",
/* 243 */ "where_opt",
/* 244 */ "groupby_opt",
/* 245 */ "having_opt",
/* 246 */ "orderby_opt",
/* 247 */ "limit_opt",
/* 248 */ "window_clause",
/* 249 */ "values",
/* 250 */ "nexprlist",
/* 251 */ "sclp",
/* 252 */ "as",
/* 253 */ "seltablist",
/* 254 */ "stl_prefix",
/* 255 */ "joinop",
/* 256 */ "indexed_opt",
/* 257 */ "on_opt",
/* 258 */ "using_opt",
/* 259 */ "exprlist",
/* 260 */ "xfullname",
/* 261 */ "idlist",
/* 262 */ "nulls",
/* 263 */ "with",
/* 264 */ "where_opt_ret",
/* 265 */ "setlist",
/* 266 */ "insert_cmd",
/* 267 */ "idlist_opt",
/* 268 */ "upsert",
/* 269 */ "returning",
/* 270 */ "filter_over",
/* 271 */ "likeop",
/* 272 */ "between_op",
/* 273 */ "in_op",
/* 274 */ "paren_exprlist",
/* 275 */ "case_operand",
/* 276 */ "case_exprlist",
/* 277 */ "case_else",
/* 278 */ "uniqueflag",
/* 279 */ "collate",
/* 280 */ "vinto",
/* 281 */ "nmnum",
/* 282 */ "trigger_decl",
/* 283 */ "trigger_cmd_list",
/* 284 */ "trigger_time",
/* 285 */ "trigger_event",
/* 286 */ "foreach_clause",
/* 287 */ "when_clause",
/* 288 */ "trigger_cmd",
/* 289 */ "trnm",
/* 290 */ "tridxby",
/* 291 */ "database_kw_opt",
/* 292 */ "key_opt",
/* 293 */ "add_column_fullname",
/* 294 */ "kwcolumn_opt",
/* 295 */ "create_vtab",
/* 296 */ "vtabarglist",
/* 297 */ "vtabarg",
/* 298 */ "vtabargtoken",
/* 299 */ "lp",
/* 300 */ "anylist",
/* 301 */ "wqitem",
/* 302 */ "wqas",
/* 303 */ "windowdefn_list",
/* 304 */ "windowdefn",
/* 305 */ "window",
/* 306 */ "frame_opt",
/* 307 */ "part_opt",
/* 308 */ "filter_clause",
/* 309 */ "over_clause",
/* 310 */ "range_or_rows",
/* 311 */ "frame_bound",
/* 312 */ "frame_bound_s",
/* 313 */ "frame_bound_e",
/* 314 */ "frame_exclude_opt",
/* 315 */ "frame_exclude",
};
#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */
#ifndef NDEBUG
/* For tracing reduce actions, the names of all rules are required.
*/
static const char *const yyRuleName[] = {
/* 0 */ "explain ::= EXPLAIN",
/* 1 */ "explain ::= EXPLAIN QUERY PLAN",
/* 2 */ "cmdx ::= cmd",
/* 3 */ "cmd ::= BEGIN transtype trans_opt",
/* 4 */ "transtype ::=",
/* 5 */ "transtype ::= DEFERRED",
/* 6 */ "transtype ::= IMMEDIATE",
/* 7 */ "transtype ::= EXCLUSIVE",
/* 8 */ "cmd ::= COMMIT|END trans_opt",
/* 9 */ "cmd ::= ROLLBACK trans_opt",
/* 10 */ "cmd ::= SAVEPOINT nm",
/* 11 */ "cmd ::= RELEASE savepoint_opt nm",
/* 12 */ "cmd ::= ROLLBACK trans_opt TO savepoint_opt nm",
/* 13 */ "create_table ::= createkw temp TABLE ifnotexists nm dbnm",
/* 14 */ "createkw ::= CREATE",
/* 15 */ "ifnotexists ::=",
/* 16 */ "ifnotexists ::= IF NOT EXISTS",
/* 17 */ "temp ::= TEMP",
/* 18 */ "temp ::=",
/* 19 */ "create_table_args ::= LP columnlist conslist_opt RP table_options",
/* 20 */ "create_table_args ::= AS select",
/* 21 */ "table_options ::=",
/* 22 */ "table_options ::= WITHOUT nm",
/* 23 */ "columnname ::= nm typetoken",
/* 24 */ "typetoken ::=",
/* 25 */ "typetoken ::= typename LP signed RP",
/* 26 */ "typetoken ::= typename LP signed COMMA signed RP",
/* 27 */ "typename ::= typename ID|STRING",
/* 28 */ "scanpt ::=",
/* 29 */ "scantok ::=",
/* 30 */ "ccons ::= CONSTRAINT nm",
/* 31 */ "ccons ::= DEFAULT scantok term",
/* 32 */ "ccons ::= DEFAULT LP expr RP",
/* 33 */ "ccons ::= DEFAULT PLUS scantok term",
/* 34 */ "ccons ::= DEFAULT MINUS scantok term",
/* 35 */ "ccons ::= DEFAULT scantok ID|INDEXED",
/* 36 */ "ccons ::= NOT NULL onconf",
/* 37 */ "ccons ::= PRIMARY KEY sortorder onconf autoinc",
/* 38 */ "ccons ::= UNIQUE onconf",
/* 39 */ "ccons ::= CHECK LP expr RP",
/* 40 */ "ccons ::= REFERENCES nm eidlist_opt refargs",
/* 41 */ "ccons ::= defer_subclause",
/* 42 */ "ccons ::= COLLATE ID|STRING",
/* 43 */ "generated ::= LP expr RP",
/* 44 */ "generated ::= LP expr RP ID",
/* 45 */ "autoinc ::=",
/* 46 */ "autoinc ::= AUTOINCR",
/* 47 */ "refargs ::=",
/* 48 */ "refargs ::= refargs refarg",
/* 49 */ "refarg ::= MATCH nm",
/* 50 */ "refarg ::= ON INSERT refact",
/* 51 */ "refarg ::= ON DELETE refact",
/* 52 */ "refarg ::= ON UPDATE refact",
/* 53 */ "refact ::= SET NULL",
/* 54 */ "refact ::= SET DEFAULT",
/* 55 */ "refact ::= CASCADE",
/* 56 */ "refact ::= RESTRICT",
/* 57 */ "refact ::= NO ACTION",
/* 58 */ "defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt",
/* 59 */ "defer_subclause ::= DEFERRABLE init_deferred_pred_opt",
/* 60 */ "init_deferred_pred_opt ::=",
/* 61 */ "init_deferred_pred_opt ::= INITIALLY DEFERRED",
/* 62 */ "init_deferred_pred_opt ::= INITIALLY IMMEDIATE",
/* 63 */ "conslist_opt ::=",
/* 64 */ "tconscomma ::= COMMA",
/* 65 */ "tcons ::= CONSTRAINT nm",
/* 66 */ "tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf",
/* 67 */ "tcons ::= UNIQUE LP sortlist RP onconf",
/* 68 */ "tcons ::= CHECK LP expr RP onconf",
/* 69 */ "tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt",
/* 70 */ "defer_subclause_opt ::=",
/* 71 */ "onconf ::=",
/* 72 */ "onconf ::= ON CONFLICT resolvetype",
/* 73 */ "orconf ::=",
/* 74 */ "orconf ::= OR resolvetype",
/* 75 */ "resolvetype ::= IGNORE",
/* 76 */ "resolvetype ::= REPLACE",
/* 77 */ "cmd ::= DROP TABLE ifexists fullname",
/* 78 */ "ifexists ::= IF EXISTS",
/* 79 */ "ifexists ::=",
/* 80 */ "cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select",
/* 81 */ "cmd ::= DROP VIEW ifexists fullname",
/* 82 */ "cmd ::= select",
/* 83 */ "select ::= WITH wqlist selectnowith",
/* 84 */ "select ::= WITH RECURSIVE wqlist selectnowith",
/* 85 */ "select ::= selectnowith",
/* 86 */ "selectnowith ::= selectnowith multiselect_op oneselect",
/* 87 */ "multiselect_op ::= UNION",
/* 88 */ "multiselect_op ::= UNION ALL",
/* 89 */ "multiselect_op ::= EXCEPT|INTERSECT",
/* 90 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt",
/* 91 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt",
/* 92 */ "values ::= VALUES LP nexprlist RP",
/* 93 */ "values ::= values COMMA LP nexprlist RP",
/* 94 */ "distinct ::= DISTINCT",
/* 95 */ "distinct ::= ALL",
/* 96 */ "distinct ::=",
/* 97 */ "sclp ::=",
/* 98 */ "selcollist ::= sclp scanpt expr scanpt as",
/* 99 */ "selcollist ::= sclp scanpt STAR",
/* 100 */ "selcollist ::= sclp scanpt nm DOT STAR",
/* 101 */ "as ::= AS nm",
/* 102 */ "as ::=",
/* 103 */ "from ::=",
/* 104 */ "from ::= FROM seltablist",
/* 105 */ "stl_prefix ::= seltablist joinop",
/* 106 */ "stl_prefix ::=",
/* 107 */ "seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt",
/* 108 */ "seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt",
/* 109 */ "seltablist ::= stl_prefix LP select RP as on_opt using_opt",
/* 110 */ "seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt",
/* 111 */ "dbnm ::=",
/* 112 */ "dbnm ::= DOT nm",
/* 113 */ "fullname ::= nm",
/* 114 */ "fullname ::= nm DOT nm",
/* 115 */ "xfullname ::= nm",
/* 116 */ "xfullname ::= nm DOT nm",
/* 117 */ "xfullname ::= nm DOT nm AS nm",
/* 118 */ "xfullname ::= nm AS nm",
/* 119 */ "joinop ::= COMMA|JOIN",
/* 120 */ "joinop ::= JOIN_KW JOIN",
/* 121 */ "joinop ::= JOIN_KW nm JOIN",
/* 122 */ "joinop ::= JOIN_KW nm nm JOIN",
/* 123 */ "on_opt ::= ON expr",
/* 124 */ "on_opt ::=",
/* 125 */ "indexed_opt ::=",
/* 126 */ "indexed_opt ::= INDEXED BY nm",
/* 127 */ "indexed_opt ::= NOT INDEXED",
/* 128 */ "using_opt ::= USING LP idlist RP",
/* 129 */ "using_opt ::=",
/* 130 */ "orderby_opt ::=",
/* 131 */ "orderby_opt ::= ORDER BY sortlist",
/* 132 */ "sortlist ::= sortlist COMMA expr sortorder nulls",
/* 133 */ "sortlist ::= expr sortorder nulls",
/* 134 */ "sortorder ::= ASC",
/* 135 */ "sortorder ::= DESC",
/* 136 */ "sortorder ::=",
/* 137 */ "nulls ::= NULLS FIRST",
/* 138 */ "nulls ::= NULLS LAST",
/* 139 */ "nulls ::=",
/* 140 */ "groupby_opt ::=",
/* 141 */ "groupby_opt ::= GROUP BY nexprlist",
/* 142 */ "having_opt ::=",
/* 143 */ "having_opt ::= HAVING expr",
/* 144 */ "limit_opt ::=",
/* 145 */ "limit_opt ::= LIMIT expr",
/* 146 */ "limit_opt ::= LIMIT expr OFFSET expr",
/* 147 */ "limit_opt ::= LIMIT expr COMMA expr",
/* 148 */ "cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret",
/* 149 */ "where_opt ::=",
/* 150 */ "where_opt ::= WHERE expr",
/* 151 */ "where_opt_ret ::=",
/* 152 */ "where_opt_ret ::= WHERE expr",
/* 153 */ "where_opt_ret ::= RETURNING selcollist",
/* 154 */ "where_opt_ret ::= WHERE expr RETURNING selcollist",
/* 155 */ "cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret",
/* 156 */ "setlist ::= setlist COMMA nm EQ expr",
/* 157 */ "setlist ::= setlist COMMA LP idlist RP EQ expr",
/* 158 */ "setlist ::= nm EQ expr",
/* 159 */ "setlist ::= LP idlist RP EQ expr",
/* 160 */ "cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert",
/* 161 */ "cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning",
/* 162 */ "upsert ::=",
/* 163 */ "upsert ::= RETURNING selcollist",
/* 164 */ "upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert",
/* 165 */ "upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert",
/* 166 */ "upsert ::= ON CONFLICT DO NOTHING returning",
/* 167 */ "upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning",
/* 168 */ "returning ::= RETURNING selcollist",
/* 169 */ "insert_cmd ::= INSERT orconf",
/* 170 */ "insert_cmd ::= REPLACE",
/* 171 */ "idlist_opt ::=",
/* 172 */ "idlist_opt ::= LP idlist RP",
/* 173 */ "idlist ::= idlist COMMA nm",
/* 174 */ "idlist ::= nm",
/* 175 */ "expr ::= LP expr RP",
/* 176 */ "expr ::= ID|INDEXED",
/* 177 */ "expr ::= JOIN_KW",
/* 178 */ "expr ::= nm DOT nm",
/* 179 */ "expr ::= nm DOT nm DOT nm",
/* 180 */ "term ::= NULL|FLOAT|BLOB",
/* 181 */ "term ::= STRING",
/* 182 */ "term ::= INTEGER",
/* 183 */ "expr ::= VARIABLE",
/* 184 */ "expr ::= expr COLLATE ID|STRING",
/* 185 */ "expr ::= CAST LP expr AS typetoken RP",
/* 186 */ "expr ::= ID|INDEXED LP distinct exprlist RP",
/* 187 */ "expr ::= ID|INDEXED LP STAR RP",
/* 188 */ "expr ::= ID|INDEXED LP distinct exprlist RP filter_over",
/* 189 */ "expr ::= ID|INDEXED LP STAR RP filter_over",
/* 190 */ "term ::= CTIME_KW",
/* 191 */ "expr ::= LP nexprlist COMMA expr RP",
/* 192 */ "expr ::= expr AND expr",
/* 193 */ "expr ::= expr OR expr",
/* 194 */ "expr ::= expr LT|GT|GE|LE expr",
/* 195 */ "expr ::= expr EQ|NE expr",
/* 196 */ "expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr",
/* 197 */ "expr ::= expr PLUS|MINUS expr",
/* 198 */ "expr ::= expr STAR|SLASH|REM expr",
/* 199 */ "expr ::= expr CONCAT expr",
/* 200 */ "likeop ::= NOT LIKE_KW|MATCH",
/* 201 */ "expr ::= expr likeop expr",
/* 202 */ "expr ::= expr likeop expr ESCAPE expr",
/* 203 */ "expr ::= expr ISNULL|NOTNULL",
/* 204 */ "expr ::= expr NOT NULL",
/* 205 */ "expr ::= expr IS expr",
/* 206 */ "expr ::= expr IS NOT expr",
/* 207 */ "expr ::= NOT expr",
/* 208 */ "expr ::= BITNOT expr",
/* 209 */ "expr ::= PLUS|MINUS expr",
/* 210 */ "between_op ::= BETWEEN",
/* 211 */ "between_op ::= NOT BETWEEN",
/* 212 */ "expr ::= expr between_op expr AND expr",
/* 213 */ "in_op ::= IN",
/* 214 */ "in_op ::= NOT IN",
/* 215 */ "expr ::= expr in_op LP exprlist RP",
/* 216 */ "expr ::= LP select RP",
/* 217 */ "expr ::= expr in_op LP select RP",
/* 218 */ "expr ::= expr in_op nm dbnm paren_exprlist",
/* 219 */ "expr ::= EXISTS LP select RP",
/* 220 */ "expr ::= CASE case_operand case_exprlist case_else END",
/* 221 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr",
/* 222 */ "case_exprlist ::= WHEN expr THEN expr",
/* 223 */ "case_else ::= ELSE expr",
/* 224 */ "case_else ::=",
/* 225 */ "case_operand ::= expr",
/* 226 */ "case_operand ::=",
/* 227 */ "exprlist ::=",
/* 228 */ "nexprlist ::= nexprlist COMMA expr",
/* 229 */ "nexprlist ::= expr",
/* 230 */ "paren_exprlist ::=",
/* 231 */ "paren_exprlist ::= LP exprlist RP",
/* 232 */ "cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt",
/* 233 */ "uniqueflag ::= UNIQUE",
/* 234 */ "uniqueflag ::=",
/* 235 */ "eidlist_opt ::=",
/* 236 */ "eidlist_opt ::= LP eidlist RP",
/* 237 */ "eidlist ::= eidlist COMMA nm collate sortorder",
/* 238 */ "eidlist ::= nm collate sortorder",
/* 239 */ "collate ::=",
/* 240 */ "collate ::= COLLATE ID|STRING",
/* 241 */ "cmd ::= DROP INDEX ifexists fullname",
/* 242 */ "cmd ::= VACUUM vinto",
/* 243 */ "cmd ::= VACUUM nm vinto",
/* 244 */ "vinto ::= INTO expr",
/* 245 */ "vinto ::=",
/* 246 */ "cmd ::= PRAGMA nm dbnm",
/* 247 */ "cmd ::= PRAGMA nm dbnm EQ nmnum",
/* 248 */ "cmd ::= PRAGMA nm dbnm LP nmnum RP",
/* 249 */ "cmd ::= PRAGMA nm dbnm EQ minus_num",
/* 250 */ "cmd ::= PRAGMA nm dbnm LP minus_num RP",
/* 251 */ "plus_num ::= PLUS INTEGER|FLOAT",
/* 252 */ "minus_num ::= MINUS INTEGER|FLOAT",
/* 253 */ "cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END",
/* 254 */ "trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause",
/* 255 */ "trigger_time ::= BEFORE|AFTER",
/* 256 */ "trigger_time ::= INSTEAD OF",
/* 257 */ "trigger_time ::=",
/* 258 */ "trigger_event ::= DELETE|INSERT",
/* 259 */ "trigger_event ::= UPDATE",
/* 260 */ "trigger_event ::= UPDATE OF idlist",
/* 261 */ "when_clause ::=",
/* 262 */ "when_clause ::= WHEN expr",
/* 263 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI",
/* 264 */ "trigger_cmd_list ::= trigger_cmd SEMI",
/* 265 */ "trnm ::= nm DOT nm",
/* 266 */ "tridxby ::= INDEXED BY nm",
/* 267 */ "tridxby ::= NOT INDEXED",
/* 268 */ "trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt",
/* 269 */ "trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt",
/* 270 */ "trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt",
/* 271 */ "trigger_cmd ::= scanpt select scanpt",
/* 272 */ "expr ::= RAISE LP IGNORE RP",
/* 273 */ "expr ::= RAISE LP raisetype COMMA nm RP",
/* 274 */ "raisetype ::= ROLLBACK",
/* 275 */ "raisetype ::= ABORT",
/* 276 */ "raisetype ::= FAIL",
/* 277 */ "cmd ::= DROP TRIGGER ifexists fullname",
/* 278 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt",
/* 279 */ "cmd ::= DETACH database_kw_opt expr",
/* 280 */ "key_opt ::=",
/* 281 */ "key_opt ::= KEY expr",
/* 282 */ "cmd ::= REINDEX",
/* 283 */ "cmd ::= REINDEX nm dbnm",
/* 284 */ "cmd ::= ANALYZE",
/* 285 */ "cmd ::= ANALYZE nm dbnm",
/* 286 */ "cmd ::= ALTER TABLE fullname RENAME TO nm",
/* 287 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist",
/* 288 */ "cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm",
/* 289 */ "add_column_fullname ::= fullname",
/* 290 */ "cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm",
/* 291 */ "cmd ::= create_vtab",
/* 292 */ "cmd ::= create_vtab LP vtabarglist RP",
/* 293 */ "create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm",
/* 294 */ "vtabarg ::=",
/* 295 */ "vtabargtoken ::= ANY",
/* 296 */ "vtabargtoken ::= lp anylist RP",
/* 297 */ "lp ::= LP",
/* 298 */ "with ::= WITH wqlist",
/* 299 */ "with ::= WITH RECURSIVE wqlist",
/* 300 */ "wqas ::= AS",
/* 301 */ "wqas ::= AS MATERIALIZED",
/* 302 */ "wqas ::= AS NOT MATERIALIZED",
/* 303 */ "wqitem ::= nm eidlist_opt wqas LP select RP",
/* 304 */ "wqlist ::= wqitem",
/* 305 */ "wqlist ::= wqlist COMMA wqitem",
/* 306 */ "windowdefn_list ::= windowdefn",
/* 307 */ "windowdefn_list ::= windowdefn_list COMMA windowdefn",
/* 308 */ "windowdefn ::= nm AS LP window RP",
/* 309 */ "window ::= PARTITION BY nexprlist orderby_opt frame_opt",
/* 310 */ "window ::= nm PARTITION BY nexprlist orderby_opt frame_opt",
/* 311 */ "window ::= ORDER BY sortlist frame_opt",
/* 312 */ "window ::= nm ORDER BY sortlist frame_opt",
/* 313 */ "window ::= frame_opt",
/* 314 */ "window ::= nm frame_opt",
/* 315 */ "frame_opt ::=",
/* 316 */ "frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt",
/* 317 */ "frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt",
/* 318 */ "range_or_rows ::= RANGE|ROWS|GROUPS",
/* 319 */ "frame_bound_s ::= frame_bound",
/* 320 */ "frame_bound_s ::= UNBOUNDED PRECEDING",
/* 321 */ "frame_bound_e ::= frame_bound",
/* 322 */ "frame_bound_e ::= UNBOUNDED FOLLOWING",
/* 323 */ "frame_bound ::= expr PRECEDING|FOLLOWING",
/* 324 */ "frame_bound ::= CURRENT ROW",
/* 325 */ "frame_exclude_opt ::=",
/* 326 */ "frame_exclude_opt ::= EXCLUDE frame_exclude",
/* 327 */ "frame_exclude ::= NO OTHERS",
/* 328 */ "frame_exclude ::= CURRENT ROW",
/* 329 */ "frame_exclude ::= GROUP|TIES",
/* 330 */ "window_clause ::= WINDOW windowdefn_list",
/* 331 */ "filter_over ::= filter_clause over_clause",
/* 332 */ "filter_over ::= over_clause",
/* 333 */ "filter_over ::= filter_clause",
/* 334 */ "over_clause ::= OVER LP window RP",
/* 335 */ "over_clause ::= OVER nm",
/* 336 */ "filter_clause ::= FILTER LP WHERE expr RP",
/* 337 */ "input ::= cmdlist",
/* 338 */ "cmdlist ::= cmdlist ecmd",
/* 339 */ "cmdlist ::= ecmd",
/* 340 */ "ecmd ::= SEMI",
/* 341 */ "ecmd ::= cmdx SEMI",
/* 342 */ "ecmd ::= explain cmdx SEMI",
/* 343 */ "trans_opt ::=",
/* 344 */ "trans_opt ::= TRANSACTION",
/* 345 */ "trans_opt ::= TRANSACTION nm",
/* 346 */ "savepoint_opt ::= SAVEPOINT",
/* 347 */ "savepoint_opt ::=",
/* 348 */ "cmd ::= create_table create_table_args",
/* 349 */ "columnlist ::= columnlist COMMA columnname carglist",
/* 350 */ "columnlist ::= columnname carglist",
/* 351 */ "nm ::= ID|INDEXED",
/* 352 */ "nm ::= STRING",
/* 353 */ "nm ::= JOIN_KW",
/* 354 */ "typetoken ::= typename",
/* 355 */ "typename ::= ID|STRING",
/* 356 */ "signed ::= plus_num",
/* 357 */ "signed ::= minus_num",
/* 358 */ "carglist ::= carglist ccons",
/* 359 */ "carglist ::=",
/* 360 */ "ccons ::= NULL onconf",
/* 361 */ "ccons ::= GENERATED ALWAYS AS generated",
/* 362 */ "ccons ::= AS generated",
/* 363 */ "conslist_opt ::= COMMA conslist",
/* 364 */ "conslist ::= conslist tconscomma tcons",
/* 365 */ "conslist ::= tcons",
/* 366 */ "tconscomma ::=",
/* 367 */ "defer_subclause_opt ::= defer_subclause",
/* 368 */ "resolvetype ::= raisetype",
/* 369 */ "selectnowith ::= oneselect",
/* 370 */ "oneselect ::= values",
/* 371 */ "sclp ::= selcollist COMMA",
/* 372 */ "as ::= ID|STRING",
/* 373 */ "returning ::=",
/* 374 */ "expr ::= term",
/* 375 */ "likeop ::= LIKE_KW|MATCH",
/* 376 */ "exprlist ::= nexprlist",
/* 377 */ "nmnum ::= plus_num",
/* 378 */ "nmnum ::= nm",
/* 379 */ "nmnum ::= ON",
/* 380 */ "nmnum ::= DELETE",
/* 381 */ "nmnum ::= DEFAULT",
/* 382 */ "plus_num ::= INTEGER|FLOAT",
/* 383 */ "foreach_clause ::=",
/* 384 */ "foreach_clause ::= FOR EACH ROW",
/* 385 */ "trnm ::= nm",
/* 386 */ "tridxby ::=",
/* 387 */ "database_kw_opt ::= DATABASE",
/* 388 */ "database_kw_opt ::=",
/* 389 */ "kwcolumn_opt ::=",
/* 390 */ "kwcolumn_opt ::= COLUMNKW",
/* 391 */ "vtabarglist ::= vtabarg",
/* 392 */ "vtabarglist ::= vtabarglist COMMA vtabarg",
/* 393 */ "vtabarg ::= vtabarg vtabargtoken",
/* 394 */ "anylist ::=",
/* 395 */ "anylist ::= anylist LP anylist RP",
/* 396 */ "anylist ::= anylist ANY",
/* 397 */ "with ::=",
};
#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 ){
pNew = malloc(newSize*sizeof(pNew[0]));
if( pNew ) pNew[0] = p->yystk0;
}else{
pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
}
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
** second argument to sqlite3ParserAlloc() below. This can be changed by
** 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.
*/
void sqlite3ParserInit(void *yypRawParser sqlite3ParserCTX_PDECL){
yyParser *yypParser = (yyParser*)yypRawParser;
sqlite3ParserCTX_STORE
#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
}
#ifndef sqlite3Parser_ENGINEALWAYSONSTACK
/*
** 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
** to sqlite3Parser and sqlite3ParserFree.
*/
void *sqlite3ParserAlloc(void *(*mallocProc)(YYMALLOCARGTYPE) sqlite3ParserCTX_PDECL){
yyParser *yypParser;
yypParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
if( yypParser ){
sqlite3ParserCTX_STORE
sqlite3ParserInit(yypParser sqlite3ParserCTX_PARAM);
}
return (void*)yypParser;
}
#endif /* sqlite3Parser_ENGINEALWAYSONSTACK */
/* 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 */
){
sqlite3ParserARG_FETCH
sqlite3ParserCTX_FETCH
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 ***************************************/
case 202: /* select */
case 236: /* selectnowith */
case 237: /* oneselect */
case 249: /* values */
{
sqlite3SelectDelete(pParse->db, (yypminor->yy307));
}
break;
case 213: /* term */
case 214: /* expr */
case 243: /* where_opt */
case 245: /* having_opt */
case 257: /* on_opt */
case 264: /* where_opt_ret */
case 275: /* case_operand */
case 277: /* case_else */
case 280: /* vinto */
case 287: /* when_clause */
case 292: /* key_opt */
case 308: /* filter_clause */
{
sqlite3ExprDelete(pParse->db, (yypminor->yy602));
}
break;
case 218: /* eidlist_opt */
case 228: /* sortlist */
case 229: /* eidlist */
case 241: /* selcollist */
case 244: /* groupby_opt */
case 246: /* orderby_opt */
case 250: /* nexprlist */
case 251: /* sclp */
case 259: /* exprlist */
case 265: /* setlist */
case 274: /* paren_exprlist */
case 276: /* case_exprlist */
case 307: /* part_opt */
{
sqlite3ExprListDelete(pParse->db, (yypminor->yy338));
}
break;
case 235: /* fullname */
case 242: /* from */
case 253: /* seltablist */
case 254: /* stl_prefix */
case 260: /* xfullname */
{
sqlite3SrcListDelete(pParse->db, (yypminor->yy291));
}
break;
case 238: /* wqlist */
{
sqlite3WithDelete(pParse->db, (yypminor->yy195));
}
break;
case 248: /* window_clause */
case 303: /* windowdefn_list */
#ifdef SQLITE_OMIT_WINDOWFUNC
goto SqliteOmitWindowfunc;
#else
{
sqlite3WindowListDelete(pParse->db, (yypminor->yy19));
}
#endif
break;
case 258: /* using_opt */
case 261: /* idlist */
case 267: /* idlist_opt */
{
sqlite3IdListDelete(pParse->db, (yypminor->yy288));
}
break;
case 270: /* filter_over */
case 304: /* windowdefn */
case 305: /* window */
case 306: /* frame_opt */
case 309: /* over_clause */
{
sqlite3WindowDelete(pParse->db, (yypminor->yy19));
}
break;
case 283: /* trigger_cmd_list */
case 288: /* trigger_cmd */
{
sqlite3DeleteTriggerStep(pParse->db, (yypminor->yy483));
}
break;
case 285: /* trigger_event */
{
sqlite3IdListDelete(pParse->db, (yypminor->yy50).b);
}
break;
case 311: /* frame_bound */
case 312: /* frame_bound_s */
case 313: /* frame_bound_e */
{
sqlite3ExprDelete(pParse->db, (yypminor->yy113).pExpr);
}
break;
/********* End destructor definitions *****************************************/
default: break; /* If no destructor action specified: do nothing */
#ifdef SQLITE_OMIT_WINDOWFUNC
SqliteOmitWindowfunc:
sqlite3ErrorMsg(pParse, "window functions not included in production builds");
break;
#endif
}
}
/*
** 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
*/
void sqlite3ParserFinalize(void *p){
yyParser *pParser = (yyParser*)p;
while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser);
#if YYSTACKDEPTH<=0
if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack);
#endif
}
#ifndef sqlite3Parser_ENGINEALWAYSONSTACK
/*
** 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.
*/
void sqlite3ParserFree(
void *p, /* The parser to be deleted */
void (*freeProc)(void*) /* Function used to reclaim memory */
){
#ifndef YYPARSEFREENEVERNULL
if( p==0 ) return;
#endif
sqlite3ParserFinalize(p);
(*freeProc)(p);
}
#endif /* sqlite3Parser_ENGINEALWAYSONSTACK */
/*
** Return the peak depth of the stack for a parser.
*/
#ifdef YYTRACKMAXSTACKDEPTH
int sqlite3ParserStackPeak(void *p){
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)
int sqlite3ParserCoverage(FILE *out){
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 );
assert( i<=YY_ACTTAB_COUNT );
assert( i+YYNTOKEN<=(int)YY_NLOOKAHEAD );
assert( iLookAhead!=YYNOCODE );
assert( iLookAhead < YYNTOKEN );
i += iLookAhead;
assert( i<(int)YY_NLOOKAHEAD );
if( yy_lookahead[i]!=iLookAhead ){
#ifdef YYFALLBACK
YYCODETYPE iFallback; /* Fallback token */
assert( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0]) );
iFallback = yyFallback[iLookAhead];
if( iFallback!=0 ){
#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;
assert( j<(int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])) );
if( yy_lookahead[j]==YYWILDCARD && iLookAhead>0 ){
#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{
assert( i>=0 && i<(int)(sizeof(yy_action)/sizeof(yy_action[0])) );
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){
sqlite3ParserARG_FETCH
sqlite3ParserCTX_FETCH
#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 ******************************************/
sqlite3ErrorMsg(pParse, "parser stack overflow");
/******** End %stack_overflow code ********************************************/
sqlite3ParserARG_STORE /* Suppress warning about unused %extra_argument var */
sqlite3ParserCTX_STORE
}
/*
** 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 */
sqlite3ParserTOKENTYPE yyMinor /* The minor token to shift in */
){
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");
}
/* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side
** of that rule */
static const YYCODETYPE yyRuleInfoLhs[] = {
187, /* (0) explain ::= EXPLAIN */
187, /* (1) explain ::= EXPLAIN QUERY PLAN */
186, /* (2) cmdx ::= cmd */
188, /* (3) cmd ::= BEGIN transtype trans_opt */
189, /* (4) transtype ::= */
189, /* (5) transtype ::= DEFERRED */
189, /* (6) transtype ::= IMMEDIATE */
189, /* (7) transtype ::= EXCLUSIVE */
188, /* (8) cmd ::= COMMIT|END trans_opt */
188, /* (9) cmd ::= ROLLBACK trans_opt */
188, /* (10) cmd ::= SAVEPOINT nm */
188, /* (11) cmd ::= RELEASE savepoint_opt nm */
188, /* (12) cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
193, /* (13) create_table ::= createkw temp TABLE ifnotexists nm dbnm */
195, /* (14) createkw ::= CREATE */
197, /* (15) ifnotexists ::= */
197, /* (16) ifnotexists ::= IF NOT EXISTS */
196, /* (17) temp ::= TEMP */
196, /* (18) temp ::= */
194, /* (19) create_table_args ::= LP columnlist conslist_opt RP table_options */
194, /* (20) create_table_args ::= AS select */
201, /* (21) table_options ::= */
201, /* (22) table_options ::= WITHOUT nm */
203, /* (23) columnname ::= nm typetoken */
205, /* (24) typetoken ::= */
205, /* (25) typetoken ::= typename LP signed RP */
205, /* (26) typetoken ::= typename LP signed COMMA signed RP */
206, /* (27) typename ::= typename ID|STRING */
210, /* (28) scanpt ::= */
211, /* (29) scantok ::= */
212, /* (30) ccons ::= CONSTRAINT nm */
212, /* (31) ccons ::= DEFAULT scantok term */
212, /* (32) ccons ::= DEFAULT LP expr RP */
212, /* (33) ccons ::= DEFAULT PLUS scantok term */
212, /* (34) ccons ::= DEFAULT MINUS scantok term */
212, /* (35) ccons ::= DEFAULT scantok ID|INDEXED */
212, /* (36) ccons ::= NOT NULL onconf */
212, /* (37) ccons ::= PRIMARY KEY sortorder onconf autoinc */
212, /* (38) ccons ::= UNIQUE onconf */
212, /* (39) ccons ::= CHECK LP expr RP */
212, /* (40) ccons ::= REFERENCES nm eidlist_opt refargs */
212, /* (41) ccons ::= defer_subclause */
212, /* (42) ccons ::= COLLATE ID|STRING */
221, /* (43) generated ::= LP expr RP */
221, /* (44) generated ::= LP expr RP ID */
217, /* (45) autoinc ::= */
217, /* (46) autoinc ::= AUTOINCR */
219, /* (47) refargs ::= */
219, /* (48) refargs ::= refargs refarg */
222, /* (49) refarg ::= MATCH nm */
222, /* (50) refarg ::= ON INSERT refact */
222, /* (51) refarg ::= ON DELETE refact */
222, /* (52) refarg ::= ON UPDATE refact */
223, /* (53) refact ::= SET NULL */
223, /* (54) refact ::= SET DEFAULT */
223, /* (55) refact ::= CASCADE */
223, /* (56) refact ::= RESTRICT */
223, /* (57) refact ::= NO ACTION */
220, /* (58) defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
220, /* (59) defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
224, /* (60) init_deferred_pred_opt ::= */
224, /* (61) init_deferred_pred_opt ::= INITIALLY DEFERRED */
224, /* (62) init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
200, /* (63) conslist_opt ::= */
226, /* (64) tconscomma ::= COMMA */
227, /* (65) tcons ::= CONSTRAINT nm */
227, /* (66) tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
227, /* (67) tcons ::= UNIQUE LP sortlist RP onconf */
227, /* (68) tcons ::= CHECK LP expr RP onconf */
227, /* (69) tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
230, /* (70) defer_subclause_opt ::= */
215, /* (71) onconf ::= */
215, /* (72) onconf ::= ON CONFLICT resolvetype */
231, /* (73) orconf ::= */
231, /* (74) orconf ::= OR resolvetype */
232, /* (75) resolvetype ::= IGNORE */
232, /* (76) resolvetype ::= REPLACE */
188, /* (77) cmd ::= DROP TABLE ifexists fullname */
234, /* (78) ifexists ::= IF EXISTS */
234, /* (79) ifexists ::= */
188, /* (80) cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
188, /* (81) cmd ::= DROP VIEW ifexists fullname */
188, /* (82) cmd ::= select */
202, /* (83) select ::= WITH wqlist selectnowith */
202, /* (84) select ::= WITH RECURSIVE wqlist selectnowith */
202, /* (85) select ::= selectnowith */
236, /* (86) selectnowith ::= selectnowith multiselect_op oneselect */
239, /* (87) multiselect_op ::= UNION */
239, /* (88) multiselect_op ::= UNION ALL */
239, /* (89) multiselect_op ::= EXCEPT|INTERSECT */
237, /* (90) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
237, /* (91) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
249, /* (92) values ::= VALUES LP nexprlist RP */
249, /* (93) values ::= values COMMA LP nexprlist RP */
240, /* (94) distinct ::= DISTINCT */
240, /* (95) distinct ::= ALL */
240, /* (96) distinct ::= */
251, /* (97) sclp ::= */
241, /* (98) selcollist ::= sclp scanpt expr scanpt as */
241, /* (99) selcollist ::= sclp scanpt STAR */
241, /* (100) selcollist ::= sclp scanpt nm DOT STAR */
252, /* (101) as ::= AS nm */
252, /* (102) as ::= */
242, /* (103) from ::= */
242, /* (104) from ::= FROM seltablist */
254, /* (105) stl_prefix ::= seltablist joinop */
254, /* (106) stl_prefix ::= */
253, /* (107) seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */
253, /* (108) seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt */
253, /* (109) seltablist ::= stl_prefix LP select RP as on_opt using_opt */
253, /* (110) seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
198, /* (111) dbnm ::= */
198, /* (112) dbnm ::= DOT nm */
235, /* (113) fullname ::= nm */
235, /* (114) fullname ::= nm DOT nm */
260, /* (115) xfullname ::= nm */
260, /* (116) xfullname ::= nm DOT nm */
260, /* (117) xfullname ::= nm DOT nm AS nm */
260, /* (118) xfullname ::= nm AS nm */
255, /* (119) joinop ::= COMMA|JOIN */
255, /* (120) joinop ::= JOIN_KW JOIN */
255, /* (121) joinop ::= JOIN_KW nm JOIN */
255, /* (122) joinop ::= JOIN_KW nm nm JOIN */
257, /* (123) on_opt ::= ON expr */
257, /* (124) on_opt ::= */
256, /* (125) indexed_opt ::= */
256, /* (126) indexed_opt ::= INDEXED BY nm */
256, /* (127) indexed_opt ::= NOT INDEXED */
258, /* (128) using_opt ::= USING LP idlist RP */
258, /* (129) using_opt ::= */
246, /* (130) orderby_opt ::= */
246, /* (131) orderby_opt ::= ORDER BY sortlist */
228, /* (132) sortlist ::= sortlist COMMA expr sortorder nulls */
228, /* (133) sortlist ::= expr sortorder nulls */
216, /* (134) sortorder ::= ASC */
216, /* (135) sortorder ::= DESC */
216, /* (136) sortorder ::= */
262, /* (137) nulls ::= NULLS FIRST */
262, /* (138) nulls ::= NULLS LAST */
262, /* (139) nulls ::= */
244, /* (140) groupby_opt ::= */
244, /* (141) groupby_opt ::= GROUP BY nexprlist */
245, /* (142) having_opt ::= */
245, /* (143) having_opt ::= HAVING expr */
247, /* (144) limit_opt ::= */
247, /* (145) limit_opt ::= LIMIT expr */
247, /* (146) limit_opt ::= LIMIT expr OFFSET expr */
247, /* (147) limit_opt ::= LIMIT expr COMMA expr */
188, /* (148) cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret */
243, /* (149) where_opt ::= */
243, /* (150) where_opt ::= WHERE expr */
264, /* (151) where_opt_ret ::= */
264, /* (152) where_opt_ret ::= WHERE expr */
264, /* (153) where_opt_ret ::= RETURNING selcollist */
264, /* (154) where_opt_ret ::= WHERE expr RETURNING selcollist */
188, /* (155) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */
265, /* (156) setlist ::= setlist COMMA nm EQ expr */
265, /* (157) setlist ::= setlist COMMA LP idlist RP EQ expr */
265, /* (158) setlist ::= nm EQ expr */
265, /* (159) setlist ::= LP idlist RP EQ expr */
188, /* (160) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
188, /* (161) cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning */
268, /* (162) upsert ::= */
268, /* (163) upsert ::= RETURNING selcollist */
268, /* (164) upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert */
268, /* (165) upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert */
268, /* (166) upsert ::= ON CONFLICT DO NOTHING returning */
268, /* (167) upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning */
269, /* (168) returning ::= RETURNING selcollist */
266, /* (169) insert_cmd ::= INSERT orconf */
266, /* (170) insert_cmd ::= REPLACE */
267, /* (171) idlist_opt ::= */
267, /* (172) idlist_opt ::= LP idlist RP */
261, /* (173) idlist ::= idlist COMMA nm */
261, /* (174) idlist ::= nm */
214, /* (175) expr ::= LP expr RP */
214, /* (176) expr ::= ID|INDEXED */
214, /* (177) expr ::= JOIN_KW */
214, /* (178) expr ::= nm DOT nm */
214, /* (179) expr ::= nm DOT nm DOT nm */
213, /* (180) term ::= NULL|FLOAT|BLOB */
213, /* (181) term ::= STRING */
213, /* (182) term ::= INTEGER */
214, /* (183) expr ::= VARIABLE */
214, /* (184) expr ::= expr COLLATE ID|STRING */
214, /* (185) expr ::= CAST LP expr AS typetoken RP */
214, /* (186) expr ::= ID|INDEXED LP distinct exprlist RP */
214, /* (187) expr ::= ID|INDEXED LP STAR RP */
214, /* (188) expr ::= ID|INDEXED LP distinct exprlist RP filter_over */
214, /* (189) expr ::= ID|INDEXED LP STAR RP filter_over */
213, /* (190) term ::= CTIME_KW */
214, /* (191) expr ::= LP nexprlist COMMA expr RP */
214, /* (192) expr ::= expr AND expr */
214, /* (193) expr ::= expr OR expr */
214, /* (194) expr ::= expr LT|GT|GE|LE expr */
214, /* (195) expr ::= expr EQ|NE expr */
214, /* (196) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */
214, /* (197) expr ::= expr PLUS|MINUS expr */
214, /* (198) expr ::= expr STAR|SLASH|REM expr */
214, /* (199) expr ::= expr CONCAT expr */
271, /* (200) likeop ::= NOT LIKE_KW|MATCH */
214, /* (201) expr ::= expr likeop expr */
214, /* (202) expr ::= expr likeop expr ESCAPE expr */
214, /* (203) expr ::= expr ISNULL|NOTNULL */
214, /* (204) expr ::= expr NOT NULL */
214, /* (205) expr ::= expr IS expr */
214, /* (206) expr ::= expr IS NOT expr */
214, /* (207) expr ::= NOT expr */
214, /* (208) expr ::= BITNOT expr */
214, /* (209) expr ::= PLUS|MINUS expr */
272, /* (210) between_op ::= BETWEEN */
272, /* (211) between_op ::= NOT BETWEEN */
214, /* (212) expr ::= expr between_op expr AND expr */
273, /* (213) in_op ::= IN */
273, /* (214) in_op ::= NOT IN */
214, /* (215) expr ::= expr in_op LP exprlist RP */
214, /* (216) expr ::= LP select RP */
214, /* (217) expr ::= expr in_op LP select RP */
214, /* (218) expr ::= expr in_op nm dbnm paren_exprlist */
214, /* (219) expr ::= EXISTS LP select RP */
214, /* (220) expr ::= CASE case_operand case_exprlist case_else END */
276, /* (221) case_exprlist ::= case_exprlist WHEN expr THEN expr */
276, /* (222) case_exprlist ::= WHEN expr THEN expr */
277, /* (223) case_else ::= ELSE expr */
277, /* (224) case_else ::= */
275, /* (225) case_operand ::= expr */
275, /* (226) case_operand ::= */
259, /* (227) exprlist ::= */
250, /* (228) nexprlist ::= nexprlist COMMA expr */
250, /* (229) nexprlist ::= expr */
274, /* (230) paren_exprlist ::= */
274, /* (231) paren_exprlist ::= LP exprlist RP */
188, /* (232) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
278, /* (233) uniqueflag ::= UNIQUE */
278, /* (234) uniqueflag ::= */
218, /* (235) eidlist_opt ::= */
218, /* (236) eidlist_opt ::= LP eidlist RP */
229, /* (237) eidlist ::= eidlist COMMA nm collate sortorder */
229, /* (238) eidlist ::= nm collate sortorder */
279, /* (239) collate ::= */
279, /* (240) collate ::= COLLATE ID|STRING */
188, /* (241) cmd ::= DROP INDEX ifexists fullname */
188, /* (242) cmd ::= VACUUM vinto */
188, /* (243) cmd ::= VACUUM nm vinto */
280, /* (244) vinto ::= INTO expr */
280, /* (245) vinto ::= */
188, /* (246) cmd ::= PRAGMA nm dbnm */
188, /* (247) cmd ::= PRAGMA nm dbnm EQ nmnum */
188, /* (248) cmd ::= PRAGMA nm dbnm LP nmnum RP */
188, /* (249) cmd ::= PRAGMA nm dbnm EQ minus_num */
188, /* (250) cmd ::= PRAGMA nm dbnm LP minus_num RP */
208, /* (251) plus_num ::= PLUS INTEGER|FLOAT */
209, /* (252) minus_num ::= MINUS INTEGER|FLOAT */
188, /* (253) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
282, /* (254) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
284, /* (255) trigger_time ::= BEFORE|AFTER */
284, /* (256) trigger_time ::= INSTEAD OF */
284, /* (257) trigger_time ::= */
285, /* (258) trigger_event ::= DELETE|INSERT */
285, /* (259) trigger_event ::= UPDATE */
285, /* (260) trigger_event ::= UPDATE OF idlist */
287, /* (261) when_clause ::= */
287, /* (262) when_clause ::= WHEN expr */
283, /* (263) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
283, /* (264) trigger_cmd_list ::= trigger_cmd SEMI */
289, /* (265) trnm ::= nm DOT nm */
290, /* (266) tridxby ::= INDEXED BY nm */
290, /* (267) tridxby ::= NOT INDEXED */
288, /* (268) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */
288, /* (269) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
288, /* (270) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
288, /* (271) trigger_cmd ::= scanpt select scanpt */
214, /* (272) expr ::= RAISE LP IGNORE RP */
214, /* (273) expr ::= RAISE LP raisetype COMMA nm RP */
233, /* (274) raisetype ::= ROLLBACK */
233, /* (275) raisetype ::= ABORT */
233, /* (276) raisetype ::= FAIL */
188, /* (277) cmd ::= DROP TRIGGER ifexists fullname */
188, /* (278) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
188, /* (279) cmd ::= DETACH database_kw_opt expr */
292, /* (280) key_opt ::= */
292, /* (281) key_opt ::= KEY expr */
188, /* (282) cmd ::= REINDEX */
188, /* (283) cmd ::= REINDEX nm dbnm */
188, /* (284) cmd ::= ANALYZE */
188, /* (285) cmd ::= ANALYZE nm dbnm */
188, /* (286) cmd ::= ALTER TABLE fullname RENAME TO nm */
188, /* (287) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
188, /* (288) cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */
293, /* (289) add_column_fullname ::= fullname */
188, /* (290) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
188, /* (291) cmd ::= create_vtab */
188, /* (292) cmd ::= create_vtab LP vtabarglist RP */
295, /* (293) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
297, /* (294) vtabarg ::= */
298, /* (295) vtabargtoken ::= ANY */
298, /* (296) vtabargtoken ::= lp anylist RP */
299, /* (297) lp ::= LP */
263, /* (298) with ::= WITH wqlist */
263, /* (299) with ::= WITH RECURSIVE wqlist */
302, /* (300) wqas ::= AS */
302, /* (301) wqas ::= AS MATERIALIZED */
302, /* (302) wqas ::= AS NOT MATERIALIZED */
301, /* (303) wqitem ::= nm eidlist_opt wqas LP select RP */
238, /* (304) wqlist ::= wqitem */
238, /* (305) wqlist ::= wqlist COMMA wqitem */
303, /* (306) windowdefn_list ::= windowdefn */
303, /* (307) windowdefn_list ::= windowdefn_list COMMA windowdefn */
304, /* (308) windowdefn ::= nm AS LP window RP */
305, /* (309) window ::= PARTITION BY nexprlist orderby_opt frame_opt */
305, /* (310) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
305, /* (311) window ::= ORDER BY sortlist frame_opt */
305, /* (312) window ::= nm ORDER BY sortlist frame_opt */
305, /* (313) window ::= frame_opt */
305, /* (314) window ::= nm frame_opt */
306, /* (315) frame_opt ::= */
306, /* (316) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
306, /* (317) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
310, /* (318) range_or_rows ::= RANGE|ROWS|GROUPS */
312, /* (319) frame_bound_s ::= frame_bound */
312, /* (320) frame_bound_s ::= UNBOUNDED PRECEDING */
313, /* (321) frame_bound_e ::= frame_bound */
313, /* (322) frame_bound_e ::= UNBOUNDED FOLLOWING */
311, /* (323) frame_bound ::= expr PRECEDING|FOLLOWING */
311, /* (324) frame_bound ::= CURRENT ROW */
314, /* (325) frame_exclude_opt ::= */
314, /* (326) frame_exclude_opt ::= EXCLUDE frame_exclude */
315, /* (327) frame_exclude ::= NO OTHERS */
315, /* (328) frame_exclude ::= CURRENT ROW */
315, /* (329) frame_exclude ::= GROUP|TIES */
248, /* (330) window_clause ::= WINDOW windowdefn_list */
270, /* (331) filter_over ::= filter_clause over_clause */
270, /* (332) filter_over ::= over_clause */
270, /* (333) filter_over ::= filter_clause */
309, /* (334) over_clause ::= OVER LP window RP */
309, /* (335) over_clause ::= OVER nm */
308, /* (336) filter_clause ::= FILTER LP WHERE expr RP */
183, /* (337) input ::= cmdlist */
184, /* (338) cmdlist ::= cmdlist ecmd */
184, /* (339) cmdlist ::= ecmd */
185, /* (340) ecmd ::= SEMI */
185, /* (341) ecmd ::= cmdx SEMI */
185, /* (342) ecmd ::= explain cmdx SEMI */
190, /* (343) trans_opt ::= */
190, /* (344) trans_opt ::= TRANSACTION */
190, /* (345) trans_opt ::= TRANSACTION nm */
192, /* (346) savepoint_opt ::= SAVEPOINT */
192, /* (347) savepoint_opt ::= */
188, /* (348) cmd ::= create_table create_table_args */
199, /* (349) columnlist ::= columnlist COMMA columnname carglist */
199, /* (350) columnlist ::= columnname carglist */
191, /* (351) nm ::= ID|INDEXED */
191, /* (352) nm ::= STRING */
191, /* (353) nm ::= JOIN_KW */
205, /* (354) typetoken ::= typename */
206, /* (355) typename ::= ID|STRING */
207, /* (356) signed ::= plus_num */
207, /* (357) signed ::= minus_num */
204, /* (358) carglist ::= carglist ccons */
204, /* (359) carglist ::= */
212, /* (360) ccons ::= NULL onconf */
212, /* (361) ccons ::= GENERATED ALWAYS AS generated */
212, /* (362) ccons ::= AS generated */
200, /* (363) conslist_opt ::= COMMA conslist */
225, /* (364) conslist ::= conslist tconscomma tcons */
225, /* (365) conslist ::= tcons */
226, /* (366) tconscomma ::= */
230, /* (367) defer_subclause_opt ::= defer_subclause */
232, /* (368) resolvetype ::= raisetype */
236, /* (369) selectnowith ::= oneselect */
237, /* (370) oneselect ::= values */
251, /* (371) sclp ::= selcollist COMMA */
252, /* (372) as ::= ID|STRING */
269, /* (373) returning ::= */
214, /* (374) expr ::= term */
271, /* (375) likeop ::= LIKE_KW|MATCH */
259, /* (376) exprlist ::= nexprlist */
281, /* (377) nmnum ::= plus_num */
281, /* (378) nmnum ::= nm */
281, /* (379) nmnum ::= ON */
281, /* (380) nmnum ::= DELETE */
281, /* (381) nmnum ::= DEFAULT */
208, /* (382) plus_num ::= INTEGER|FLOAT */
286, /* (383) foreach_clause ::= */
286, /* (384) foreach_clause ::= FOR EACH ROW */
289, /* (385) trnm ::= nm */
290, /* (386) tridxby ::= */
291, /* (387) database_kw_opt ::= DATABASE */
291, /* (388) database_kw_opt ::= */
294, /* (389) kwcolumn_opt ::= */
294, /* (390) kwcolumn_opt ::= COLUMNKW */
296, /* (391) vtabarglist ::= vtabarg */
296, /* (392) vtabarglist ::= vtabarglist COMMA vtabarg */
297, /* (393) vtabarg ::= vtabarg vtabargtoken */
300, /* (394) anylist ::= */
300, /* (395) anylist ::= anylist LP anylist RP */
300, /* (396) anylist ::= anylist ANY */
263, /* (397) with ::= */
};
/* For rule J, yyRuleInfoNRhs[J] contains the negative of the number
** of symbols on the right-hand side of that rule. */
static const signed char yyRuleInfoNRhs[] = {
-1, /* (0) explain ::= EXPLAIN */
-3, /* (1) explain ::= EXPLAIN QUERY PLAN */
-1, /* (2) cmdx ::= cmd */
-3, /* (3) cmd ::= BEGIN transtype trans_opt */
0, /* (4) transtype ::= */
-1, /* (5) transtype ::= DEFERRED */
-1, /* (6) transtype ::= IMMEDIATE */
-1, /* (7) transtype ::= EXCLUSIVE */
-2, /* (8) cmd ::= COMMIT|END trans_opt */
-2, /* (9) cmd ::= ROLLBACK trans_opt */
-2, /* (10) cmd ::= SAVEPOINT nm */
-3, /* (11) cmd ::= RELEASE savepoint_opt nm */
-5, /* (12) cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
-6, /* (13) create_table ::= createkw temp TABLE ifnotexists nm dbnm */
-1, /* (14) createkw ::= CREATE */
0, /* (15) ifnotexists ::= */
-3, /* (16) ifnotexists ::= IF NOT EXISTS */
-1, /* (17) temp ::= TEMP */
0, /* (18) temp ::= */
-5, /* (19) create_table_args ::= LP columnlist conslist_opt RP table_options */
-2, /* (20) create_table_args ::= AS select */
0, /* (21) table_options ::= */
-2, /* (22) table_options ::= WITHOUT nm */
-2, /* (23) columnname ::= nm typetoken */
0, /* (24) typetoken ::= */
-4, /* (25) typetoken ::= typename LP signed RP */
-6, /* (26) typetoken ::= typename LP signed COMMA signed RP */
-2, /* (27) typename ::= typename ID|STRING */
0, /* (28) scanpt ::= */
0, /* (29) scantok ::= */
-2, /* (30) ccons ::= CONSTRAINT nm */
-3, /* (31) ccons ::= DEFAULT scantok term */
-4, /* (32) ccons ::= DEFAULT LP expr RP */
-4, /* (33) ccons ::= DEFAULT PLUS scantok term */
-4, /* (34) ccons ::= DEFAULT MINUS scantok term */
-3, /* (35) ccons ::= DEFAULT scantok ID|INDEXED */
-3, /* (36) ccons ::= NOT NULL onconf */
-5, /* (37) ccons ::= PRIMARY KEY sortorder onconf autoinc */
-2, /* (38) ccons ::= UNIQUE onconf */
-4, /* (39) ccons ::= CHECK LP expr RP */
-4, /* (40) ccons ::= REFERENCES nm eidlist_opt refargs */
-1, /* (41) ccons ::= defer_subclause */
-2, /* (42) ccons ::= COLLATE ID|STRING */
-3, /* (43) generated ::= LP expr RP */
-4, /* (44) generated ::= LP expr RP ID */
0, /* (45) autoinc ::= */
-1, /* (46) autoinc ::= AUTOINCR */
0, /* (47) refargs ::= */
-2, /* (48) refargs ::= refargs refarg */
-2, /* (49) refarg ::= MATCH nm */
-3, /* (50) refarg ::= ON INSERT refact */
-3, /* (51) refarg ::= ON DELETE refact */
-3, /* (52) refarg ::= ON UPDATE refact */
-2, /* (53) refact ::= SET NULL */
-2, /* (54) refact ::= SET DEFAULT */
-1, /* (55) refact ::= CASCADE */
-1, /* (56) refact ::= RESTRICT */
-2, /* (57) refact ::= NO ACTION */
-3, /* (58) defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
-2, /* (59) defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
0, /* (60) init_deferred_pred_opt ::= */
-2, /* (61) init_deferred_pred_opt ::= INITIALLY DEFERRED */
-2, /* (62) init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
0, /* (63) conslist_opt ::= */
-1, /* (64) tconscomma ::= COMMA */
-2, /* (65) tcons ::= CONSTRAINT nm */
-7, /* (66) tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
-5, /* (67) tcons ::= UNIQUE LP sortlist RP onconf */
-5, /* (68) tcons ::= CHECK LP expr RP onconf */
-10, /* (69) tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
0, /* (70) defer_subclause_opt ::= */
0, /* (71) onconf ::= */
-3, /* (72) onconf ::= ON CONFLICT resolvetype */
0, /* (73) orconf ::= */
-2, /* (74) orconf ::= OR resolvetype */
-1, /* (75) resolvetype ::= IGNORE */
-1, /* (76) resolvetype ::= REPLACE */
-4, /* (77) cmd ::= DROP TABLE ifexists fullname */
-2, /* (78) ifexists ::= IF EXISTS */
0, /* (79) ifexists ::= */
-9, /* (80) cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
-4, /* (81) cmd ::= DROP VIEW ifexists fullname */
-1, /* (82) cmd ::= select */
-3, /* (83) select ::= WITH wqlist selectnowith */
-4, /* (84) select ::= WITH RECURSIVE wqlist selectnowith */
-1, /* (85) select ::= selectnowith */
-3, /* (86) selectnowith ::= selectnowith multiselect_op oneselect */
-1, /* (87) multiselect_op ::= UNION */
-2, /* (88) multiselect_op ::= UNION ALL */
-1, /* (89) multiselect_op ::= EXCEPT|INTERSECT */
-9, /* (90) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
-10, /* (91) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
-4, /* (92) values ::= VALUES LP nexprlist RP */
-5, /* (93) values ::= values COMMA LP nexprlist RP */
-1, /* (94) distinct ::= DISTINCT */
-1, /* (95) distinct ::= ALL */
0, /* (96) distinct ::= */
0, /* (97) sclp ::= */
-5, /* (98) selcollist ::= sclp scanpt expr scanpt as */
-3, /* (99) selcollist ::= sclp scanpt STAR */
-5, /* (100) selcollist ::= sclp scanpt nm DOT STAR */
-2, /* (101) as ::= AS nm */
0, /* (102) as ::= */
0, /* (103) from ::= */
-2, /* (104) from ::= FROM seltablist */
-2, /* (105) stl_prefix ::= seltablist joinop */
0, /* (106) stl_prefix ::= */
-7, /* (107) seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */
-9, /* (108) seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt */
-7, /* (109) seltablist ::= stl_prefix LP select RP as on_opt using_opt */
-7, /* (110) seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
0, /* (111) dbnm ::= */
-2, /* (112) dbnm ::= DOT nm */
-1, /* (113) fullname ::= nm */
-3, /* (114) fullname ::= nm DOT nm */
-1, /* (115) xfullname ::= nm */
-3, /* (116) xfullname ::= nm DOT nm */
-5, /* (117) xfullname ::= nm DOT nm AS nm */
-3, /* (118) xfullname ::= nm AS nm */
-1, /* (119) joinop ::= COMMA|JOIN */
-2, /* (120) joinop ::= JOIN_KW JOIN */
-3, /* (121) joinop ::= JOIN_KW nm JOIN */
-4, /* (122) joinop ::= JOIN_KW nm nm JOIN */
-2, /* (123) on_opt ::= ON expr */
0, /* (124) on_opt ::= */
0, /* (125) indexed_opt ::= */
-3, /* (126) indexed_opt ::= INDEXED BY nm */
-2, /* (127) indexed_opt ::= NOT INDEXED */
-4, /* (128) using_opt ::= USING LP idlist RP */
0, /* (129) using_opt ::= */
0, /* (130) orderby_opt ::= */
-3, /* (131) orderby_opt ::= ORDER BY sortlist */
-5, /* (132) sortlist ::= sortlist COMMA expr sortorder nulls */
-3, /* (133) sortlist ::= expr sortorder nulls */
-1, /* (134) sortorder ::= ASC */
-1, /* (135) sortorder ::= DESC */
0, /* (136) sortorder ::= */
-2, /* (137) nulls ::= NULLS FIRST */
-2, /* (138) nulls ::= NULLS LAST */
0, /* (139) nulls ::= */
0, /* (140) groupby_opt ::= */
-3, /* (141) groupby_opt ::= GROUP BY nexprlist */
0, /* (142) having_opt ::= */
-2, /* (143) having_opt ::= HAVING expr */
0, /* (144) limit_opt ::= */
-2, /* (145) limit_opt ::= LIMIT expr */
-4, /* (146) limit_opt ::= LIMIT expr OFFSET expr */
-4, /* (147) limit_opt ::= LIMIT expr COMMA expr */
-6, /* (148) cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret */
0, /* (149) where_opt ::= */
-2, /* (150) where_opt ::= WHERE expr */
0, /* (151) where_opt_ret ::= */
-2, /* (152) where_opt_ret ::= WHERE expr */
-2, /* (153) where_opt_ret ::= RETURNING selcollist */
-4, /* (154) where_opt_ret ::= WHERE expr RETURNING selcollist */
-9, /* (155) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */
-5, /* (156) setlist ::= setlist COMMA nm EQ expr */
-7, /* (157) setlist ::= setlist COMMA LP idlist RP EQ expr */
-3, /* (158) setlist ::= nm EQ expr */
-5, /* (159) setlist ::= LP idlist RP EQ expr */
-7, /* (160) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
-8, /* (161) cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning */
0, /* (162) upsert ::= */
-2, /* (163) upsert ::= RETURNING selcollist */
-12, /* (164) upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert */
-9, /* (165) upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert */
-5, /* (166) upsert ::= ON CONFLICT DO NOTHING returning */
-8, /* (167) upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning */
-2, /* (168) returning ::= RETURNING selcollist */
-2, /* (169) insert_cmd ::= INSERT orconf */
-1, /* (170) insert_cmd ::= REPLACE */
0, /* (171) idlist_opt ::= */
-3, /* (172) idlist_opt ::= LP idlist RP */
-3, /* (173) idlist ::= idlist COMMA nm */
-1, /* (174) idlist ::= nm */
-3, /* (175) expr ::= LP expr RP */
-1, /* (176) expr ::= ID|INDEXED */
-1, /* (177) expr ::= JOIN_KW */
-3, /* (178) expr ::= nm DOT nm */
-5, /* (179) expr ::= nm DOT nm DOT nm */
-1, /* (180) term ::= NULL|FLOAT|BLOB */
-1, /* (181) term ::= STRING */
-1, /* (182) term ::= INTEGER */
-1, /* (183) expr ::= VARIABLE */
-3, /* (184) expr ::= expr COLLATE ID|STRING */
-6, /* (185) expr ::= CAST LP expr AS typetoken RP */
-5, /* (186) expr ::= ID|INDEXED LP distinct exprlist RP */
-4, /* (187) expr ::= ID|INDEXED LP STAR RP */
-6, /* (188) expr ::= ID|INDEXED LP distinct exprlist RP filter_over */
-5, /* (189) expr ::= ID|INDEXED LP STAR RP filter_over */
-1, /* (190) term ::= CTIME_KW */
-5, /* (191) expr ::= LP nexprlist COMMA expr RP */
-3, /* (192) expr ::= expr AND expr */
-3, /* (193) expr ::= expr OR expr */
-3, /* (194) expr ::= expr LT|GT|GE|LE expr */
-3, /* (195) expr ::= expr EQ|NE expr */
-3, /* (196) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */
-3, /* (197) expr ::= expr PLUS|MINUS expr */
-3, /* (198) expr ::= expr STAR|SLASH|REM expr */
-3, /* (199) expr ::= expr CONCAT expr */
-2, /* (200) likeop ::= NOT LIKE_KW|MATCH */
-3, /* (201) expr ::= expr likeop expr */
-5, /* (202) expr ::= expr likeop expr ESCAPE expr */
-2, /* (203) expr ::= expr ISNULL|NOTNULL */
-3, /* (204) expr ::= expr NOT NULL */
-3, /* (205) expr ::= expr IS expr */
-4, /* (206) expr ::= expr IS NOT expr */
-2, /* (207) expr ::= NOT expr */
-2, /* (208) expr ::= BITNOT expr */
-2, /* (209) expr ::= PLUS|MINUS expr */
-1, /* (210) between_op ::= BETWEEN */
-2, /* (211) between_op ::= NOT BETWEEN */
-5, /* (212) expr ::= expr between_op expr AND expr */
-1, /* (213) in_op ::= IN */
-2, /* (214) in_op ::= NOT IN */
-5, /* (215) expr ::= expr in_op LP exprlist RP */
-3, /* (216) expr ::= LP select RP */
-5, /* (217) expr ::= expr in_op LP select RP */
-5, /* (218) expr ::= expr in_op nm dbnm paren_exprlist */
-4, /* (219) expr ::= EXISTS LP select RP */
-5, /* (220) expr ::= CASE case_operand case_exprlist case_else END */
-5, /* (221) case_exprlist ::= case_exprlist WHEN expr THEN expr */
-4, /* (222) case_exprlist ::= WHEN expr THEN expr */
-2, /* (223) case_else ::= ELSE expr */
0, /* (224) case_else ::= */
-1, /* (225) case_operand ::= expr */
0, /* (226) case_operand ::= */
0, /* (227) exprlist ::= */
-3, /* (228) nexprlist ::= nexprlist COMMA expr */
-1, /* (229) nexprlist ::= expr */
0, /* (230) paren_exprlist ::= */
-3, /* (231) paren_exprlist ::= LP exprlist RP */
-12, /* (232) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
-1, /* (233) uniqueflag ::= UNIQUE */
0, /* (234) uniqueflag ::= */
0, /* (235) eidlist_opt ::= */
-3, /* (236) eidlist_opt ::= LP eidlist RP */
-5, /* (237) eidlist ::= eidlist COMMA nm collate sortorder */
-3, /* (238) eidlist ::= nm collate sortorder */
0, /* (239) collate ::= */
-2, /* (240) collate ::= COLLATE ID|STRING */
-4, /* (241) cmd ::= DROP INDEX ifexists fullname */
-2, /* (242) cmd ::= VACUUM vinto */
-3, /* (243) cmd ::= VACUUM nm vinto */
-2, /* (244) vinto ::= INTO expr */
0, /* (245) vinto ::= */
-3, /* (246) cmd ::= PRAGMA nm dbnm */
-5, /* (247) cmd ::= PRAGMA nm dbnm EQ nmnum */
-6, /* (248) cmd ::= PRAGMA nm dbnm LP nmnum RP */
-5, /* (249) cmd ::= PRAGMA nm dbnm EQ minus_num */
-6, /* (250) cmd ::= PRAGMA nm dbnm LP minus_num RP */
-2, /* (251) plus_num ::= PLUS INTEGER|FLOAT */
-2, /* (252) minus_num ::= MINUS INTEGER|FLOAT */
-5, /* (253) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
-11, /* (254) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
-1, /* (255) trigger_time ::= BEFORE|AFTER */
-2, /* (256) trigger_time ::= INSTEAD OF */
0, /* (257) trigger_time ::= */
-1, /* (258) trigger_event ::= DELETE|INSERT */
-1, /* (259) trigger_event ::= UPDATE */
-3, /* (260) trigger_event ::= UPDATE OF idlist */
0, /* (261) when_clause ::= */
-2, /* (262) when_clause ::= WHEN expr */
-3, /* (263) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
-2, /* (264) trigger_cmd_list ::= trigger_cmd SEMI */
-3, /* (265) trnm ::= nm DOT nm */
-3, /* (266) tridxby ::= INDEXED BY nm */
-2, /* (267) tridxby ::= NOT INDEXED */
-9, /* (268) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */
-8, /* (269) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
-6, /* (270) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
-3, /* (271) trigger_cmd ::= scanpt select scanpt */
-4, /* (272) expr ::= RAISE LP IGNORE RP */
-6, /* (273) expr ::= RAISE LP raisetype COMMA nm RP */
-1, /* (274) raisetype ::= ROLLBACK */
-1, /* (275) raisetype ::= ABORT */
-1, /* (276) raisetype ::= FAIL */
-4, /* (277) cmd ::= DROP TRIGGER ifexists fullname */
-6, /* (278) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
-3, /* (279) cmd ::= DETACH database_kw_opt expr */
0, /* (280) key_opt ::= */
-2, /* (281) key_opt ::= KEY expr */
-1, /* (282) cmd ::= REINDEX */
-3, /* (283) cmd ::= REINDEX nm dbnm */
-1, /* (284) cmd ::= ANALYZE */
-3, /* (285) cmd ::= ANALYZE nm dbnm */
-6, /* (286) cmd ::= ALTER TABLE fullname RENAME TO nm */
-7, /* (287) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
-6, /* (288) cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */
-1, /* (289) add_column_fullname ::= fullname */
-8, /* (290) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
-1, /* (291) cmd ::= create_vtab */
-4, /* (292) cmd ::= create_vtab LP vtabarglist RP */
-8, /* (293) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
0, /* (294) vtabarg ::= */
-1, /* (295) vtabargtoken ::= ANY */
-3, /* (296) vtabargtoken ::= lp anylist RP */
-1, /* (297) lp ::= LP */
-2, /* (298) with ::= WITH wqlist */
-3, /* (299) with ::= WITH RECURSIVE wqlist */
-1, /* (300) wqas ::= AS */
-2, /* (301) wqas ::= AS MATERIALIZED */
-3, /* (302) wqas ::= AS NOT MATERIALIZED */
-6, /* (303) wqitem ::= nm eidlist_opt wqas LP select RP */
-1, /* (304) wqlist ::= wqitem */
-3, /* (305) wqlist ::= wqlist COMMA wqitem */
-1, /* (306) windowdefn_list ::= windowdefn */
-3, /* (307) windowdefn_list ::= windowdefn_list COMMA windowdefn */
-5, /* (308) windowdefn ::= nm AS LP window RP */
-5, /* (309) window ::= PARTITION BY nexprlist orderby_opt frame_opt */
-6, /* (310) window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
-4, /* (311) window ::= ORDER BY sortlist frame_opt */
-5, /* (312) window ::= nm ORDER BY sortlist frame_opt */
-1, /* (313) window ::= frame_opt */
-2, /* (314) window ::= nm frame_opt */
0, /* (315) frame_opt ::= */
-3, /* (316) frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
-6, /* (317) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
-1, /* (318) range_or_rows ::= RANGE|ROWS|GROUPS */
-1, /* (319) frame_bound_s ::= frame_bound */
-2, /* (320) frame_bound_s ::= UNBOUNDED PRECEDING */
-1, /* (321) frame_bound_e ::= frame_bound */
-2, /* (322) frame_bound_e ::= UNBOUNDED FOLLOWING */
-2, /* (323) frame_bound ::= expr PRECEDING|FOLLOWING */
-2, /* (324) frame_bound ::= CURRENT ROW */
0, /* (325) frame_exclude_opt ::= */
-2, /* (326) frame_exclude_opt ::= EXCLUDE frame_exclude */
-2, /* (327) frame_exclude ::= NO OTHERS */
-2, /* (328) frame_exclude ::= CURRENT ROW */
-1, /* (329) frame_exclude ::= GROUP|TIES */
-2, /* (330) window_clause ::= WINDOW windowdefn_list */
-2, /* (331) filter_over ::= filter_clause over_clause */
-1, /* (332) filter_over ::= over_clause */
-1, /* (333) filter_over ::= filter_clause */
-4, /* (334) over_clause ::= OVER LP window RP */
-2, /* (335) over_clause ::= OVER nm */
-5, /* (336) filter_clause ::= FILTER LP WHERE expr RP */
-1, /* (337) input ::= cmdlist */
-2, /* (338) cmdlist ::= cmdlist ecmd */
-1, /* (339) cmdlist ::= ecmd */
-1, /* (340) ecmd ::= SEMI */
-2, /* (341) ecmd ::= cmdx SEMI */
-3, /* (342) ecmd ::= explain cmdx SEMI */
0, /* (343) trans_opt ::= */
-1, /* (344) trans_opt ::= TRANSACTION */
-2, /* (345) trans_opt ::= TRANSACTION nm */
-1, /* (346) savepoint_opt ::= SAVEPOINT */
0, /* (347) savepoint_opt ::= */
-2, /* (348) cmd ::= create_table create_table_args */
-4, /* (349) columnlist ::= columnlist COMMA columnname carglist */
-2, /* (350) columnlist ::= columnname carglist */
-1, /* (351) nm ::= ID|INDEXED */
-1, /* (352) nm ::= STRING */
-1, /* (353) nm ::= JOIN_KW */
-1, /* (354) typetoken ::= typename */
-1, /* (355) typename ::= ID|STRING */
-1, /* (356) signed ::= plus_num */
-1, /* (357) signed ::= minus_num */
-2, /* (358) carglist ::= carglist ccons */
0, /* (359) carglist ::= */
-2, /* (360) ccons ::= NULL onconf */
-4, /* (361) ccons ::= GENERATED ALWAYS AS generated */
-2, /* (362) ccons ::= AS generated */
-2, /* (363) conslist_opt ::= COMMA conslist */
-3, /* (364) conslist ::= conslist tconscomma tcons */
-1, /* (365) conslist ::= tcons */
0, /* (366) tconscomma ::= */
-1, /* (367) defer_subclause_opt ::= defer_subclause */
-1, /* (368) resolvetype ::= raisetype */
-1, /* (369) selectnowith ::= oneselect */
-1, /* (370) oneselect ::= values */
-2, /* (371) sclp ::= selcollist COMMA */
-1, /* (372) as ::= ID|STRING */
0, /* (373) returning ::= */
-1, /* (374) expr ::= term */
-1, /* (375) likeop ::= LIKE_KW|MATCH */
-1, /* (376) exprlist ::= nexprlist */
-1, /* (377) nmnum ::= plus_num */
-1, /* (378) nmnum ::= nm */
-1, /* (379) nmnum ::= ON */
-1, /* (380) nmnum ::= DELETE */
-1, /* (381) nmnum ::= DEFAULT */
-1, /* (382) plus_num ::= INTEGER|FLOAT */
0, /* (383) foreach_clause ::= */
-3, /* (384) foreach_clause ::= FOR EACH ROW */
-1, /* (385) trnm ::= nm */
0, /* (386) tridxby ::= */
-1, /* (387) database_kw_opt ::= DATABASE */
0, /* (388) database_kw_opt ::= */
0, /* (389) kwcolumn_opt ::= */
-1, /* (390) kwcolumn_opt ::= COLUMNKW */
-1, /* (391) vtabarglist ::= vtabarg */
-3, /* (392) vtabarglist ::= vtabarglist COMMA vtabarg */
-2, /* (393) vtabarg ::= vtabarg vtabargtoken */
0, /* (394) anylist ::= */
-4, /* (395) anylist ::= anylist LP anylist RP */
-2, /* (396) anylist ::= anylist ANY */
0, /* (397) with ::= */
};
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 */
sqlite3ParserTOKENTYPE yyLookaheadToken /* Value of the lookahead token */
sqlite3ParserCTX_PDECL /* %extra_context */
){
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 */
sqlite3ParserARG_FETCH
(void)yyLookahead;
(void)yyLookaheadToken;
yymsp = yypParser->yytos;
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;
case 0: /* explain ::= EXPLAIN */
{ pParse->explain = 1; }
break;
case 1: /* explain ::= EXPLAIN QUERY PLAN */
{ pParse->explain = 2; }
break;
case 2: /* cmdx ::= cmd */
{ sqlite3FinishCoding(pParse); }
break;
case 3: /* cmd ::= BEGIN transtype trans_opt */
{sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy60);}
break;
case 4: /* transtype ::= */
{yymsp[1].minor.yy60 = TK_DEFERRED;}
break;
case 5: /* transtype ::= DEFERRED */
case 6: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==6);
case 7: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==7);
case 318: /* range_or_rows ::= RANGE|ROWS|GROUPS */ yytestcase(yyruleno==318);
{yymsp[0].minor.yy60 = yymsp[0].major; /*A-overwrites-X*/}
break;
case 8: /* cmd ::= COMMIT|END trans_opt */
case 9: /* cmd ::= ROLLBACK trans_opt */ yytestcase(yyruleno==9);
{sqlite3EndTransaction(pParse,yymsp[-1].major);}
break;
case 10: /* cmd ::= SAVEPOINT nm */
{
sqlite3Savepoint(pParse, SAVEPOINT_BEGIN, &yymsp[0].minor.yy0);
}
break;
case 11: /* cmd ::= RELEASE savepoint_opt nm */
{
sqlite3Savepoint(pParse, SAVEPOINT_RELEASE, &yymsp[0].minor.yy0);
}
break;
case 12: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
{
sqlite3Savepoint(pParse, SAVEPOINT_ROLLBACK, &yymsp[0].minor.yy0);
}
break;
case 13: /* create_table ::= createkw temp TABLE ifnotexists nm dbnm */
{
sqlite3StartTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,yymsp[-4].minor.yy60,0,0,yymsp[-2].minor.yy60);
}
break;
case 14: /* createkw ::= CREATE */
{disableLookaside(pParse);}
break;
case 15: /* ifnotexists ::= */
case 18: /* temp ::= */ yytestcase(yyruleno==18);
case 21: /* table_options ::= */ yytestcase(yyruleno==21);
case 45: /* autoinc ::= */ yytestcase(yyruleno==45);
case 60: /* init_deferred_pred_opt ::= */ yytestcase(yyruleno==60);
case 70: /* defer_subclause_opt ::= */ yytestcase(yyruleno==70);
case 79: /* ifexists ::= */ yytestcase(yyruleno==79);
case 96: /* distinct ::= */ yytestcase(yyruleno==96);
case 239: /* collate ::= */ yytestcase(yyruleno==239);
{yymsp[1].minor.yy60 = 0;}
break;
case 16: /* ifnotexists ::= IF NOT EXISTS */
{yymsp[-2].minor.yy60 = 1;}
break;
case 17: /* temp ::= TEMP */
case 46: /* autoinc ::= AUTOINCR */ yytestcase(yyruleno==46);
{yymsp[0].minor.yy60 = 1;}
break;
case 19: /* create_table_args ::= LP columnlist conslist_opt RP table_options */
{
sqlite3EndTable(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,yymsp[0].minor.yy60,0);
}
break;
case 20: /* create_table_args ::= AS select */
{
sqlite3EndTable(pParse,0,0,0,yymsp[0].minor.yy307);
sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy307);
}
break;
case 22: /* table_options ::= WITHOUT nm */
{
if( yymsp[0].minor.yy0.n==5 && sqlite3_strnicmp(yymsp[0].minor.yy0.z,"rowid",5)==0 ){
yymsp[-1].minor.yy60 = TF_WithoutRowid | TF_NoVisibleRowid;
}else{
yymsp[-1].minor.yy60 = 0;
sqlite3ErrorMsg(pParse, "unknown table option: %.*s", yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.z);
}
}
break;
case 23: /* columnname ::= nm typetoken */
{sqlite3AddColumn(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);}
break;
case 24: /* typetoken ::= */
case 63: /* conslist_opt ::= */ yytestcase(yyruleno==63);
case 102: /* as ::= */ yytestcase(yyruleno==102);
{yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = 0;}
break;
case 25: /* typetoken ::= typename LP signed RP */
{
yymsp[-3].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy0.z);
}
break;
case 26: /* typetoken ::= typename LP signed COMMA signed RP */
{
yymsp[-5].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy0.z);
}
break;
case 27: /* typename ::= typename ID|STRING */
{yymsp[-1].minor.yy0.n=yymsp[0].minor.yy0.n+(int)(yymsp[0].minor.yy0.z-yymsp[-1].minor.yy0.z);}
break;
case 28: /* scanpt ::= */
{
assert( yyLookahead!=YYNOCODE );
yymsp[1].minor.yy528 = yyLookaheadToken.z;
}
break;
case 29: /* scantok ::= */
{
assert( yyLookahead!=YYNOCODE );
yymsp[1].minor.yy0 = yyLookaheadToken;
}
break;
case 30: /* ccons ::= CONSTRAINT nm */
case 65: /* tcons ::= CONSTRAINT nm */ yytestcase(yyruleno==65);
{pParse->constraintName = yymsp[0].minor.yy0;}
break;
case 31: /* ccons ::= DEFAULT scantok term */
{sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy602,yymsp[-1].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);}
break;
case 32: /* ccons ::= DEFAULT LP expr RP */
{sqlite3AddDefaultValue(pParse,yymsp[-1].minor.yy602,yymsp[-2].minor.yy0.z+1,yymsp[0].minor.yy0.z);}
break;
case 33: /* ccons ::= DEFAULT PLUS scantok term */
{sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy602,yymsp[-2].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);}
break;
case 34: /* ccons ::= DEFAULT MINUS scantok term */
{
Expr *p = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy602, 0);
sqlite3AddDefaultValue(pParse,p,yymsp[-2].minor.yy0.z,&yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n]);
}
break;
case 35: /* ccons ::= DEFAULT scantok ID|INDEXED */
{
Expr *p = tokenExpr(pParse, TK_STRING, yymsp[0].minor.yy0);
if( p ){
sqlite3ExprIdToTrueFalse(p);
testcase( p->op==TK_TRUEFALSE && sqlite3ExprTruthValue(p) );
}
sqlite3AddDefaultValue(pParse,p,yymsp[0].minor.yy0.z,yymsp[0].minor.yy0.z+yymsp[0].minor.yy0.n);
}
break;
case 36: /* ccons ::= NOT NULL onconf */
{sqlite3AddNotNull(pParse, yymsp[0].minor.yy60);}
break;
case 37: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */
{sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy60,yymsp[0].minor.yy60,yymsp[-2].minor.yy60);}
break;
case 38: /* ccons ::= UNIQUE onconf */
{sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy60,0,0,0,0,
SQLITE_IDXTYPE_UNIQUE);}
break;
case 39: /* ccons ::= CHECK LP expr RP */
{sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy602,yymsp[-2].minor.yy0.z,yymsp[0].minor.yy0.z);}
break;
case 40: /* ccons ::= REFERENCES nm eidlist_opt refargs */
{sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy338,yymsp[0].minor.yy60);}
break;
case 41: /* ccons ::= defer_subclause */
{sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy60);}
break;
case 42: /* ccons ::= COLLATE ID|STRING */
{sqlite3AddCollateType(pParse, &yymsp[0].minor.yy0);}
break;
case 43: /* generated ::= LP expr RP */
{sqlite3AddGenerated(pParse,yymsp[-1].minor.yy602,0);}
break;
case 44: /* generated ::= LP expr RP ID */
{sqlite3AddGenerated(pParse,yymsp[-2].minor.yy602,&yymsp[0].minor.yy0);}
break;
case 47: /* refargs ::= */
{ yymsp[1].minor.yy60 = OE_None*0x0101; /* EV: R-19803-45884 */}
break;
case 48: /* refargs ::= refargs refarg */
{ yymsp[-1].minor.yy60 = (yymsp[-1].minor.yy60 & ~yymsp[0].minor.yy615.mask) | yymsp[0].minor.yy615.value; }
break;
case 49: /* refarg ::= MATCH nm */
{ yymsp[-1].minor.yy615.value = 0; yymsp[-1].minor.yy615.mask = 0x000000; }
break;
case 50: /* refarg ::= ON INSERT refact */
{ yymsp[-2].minor.yy615.value = 0; yymsp[-2].minor.yy615.mask = 0x000000; }
break;
case 51: /* refarg ::= ON DELETE refact */
{ yymsp[-2].minor.yy615.value = yymsp[0].minor.yy60; yymsp[-2].minor.yy615.mask = 0x0000ff; }
break;
case 52: /* refarg ::= ON UPDATE refact */
{ yymsp[-2].minor.yy615.value = yymsp[0].minor.yy60<<8; yymsp[-2].minor.yy615.mask = 0x00ff00; }
break;
case 53: /* refact ::= SET NULL */
{ yymsp[-1].minor.yy60 = OE_SetNull; /* EV: R-33326-45252 */}
break;
case 54: /* refact ::= SET DEFAULT */
{ yymsp[-1].minor.yy60 = OE_SetDflt; /* EV: R-33326-45252 */}
break;
case 55: /* refact ::= CASCADE */
{ yymsp[0].minor.yy60 = OE_Cascade; /* EV: R-33326-45252 */}
break;
case 56: /* refact ::= RESTRICT */
{ yymsp[0].minor.yy60 = OE_Restrict; /* EV: R-33326-45252 */}
break;
case 57: /* refact ::= NO ACTION */
{ yymsp[-1].minor.yy60 = OE_None; /* EV: R-33326-45252 */}
break;
case 58: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
{yymsp[-2].minor.yy60 = 0;}
break;
case 59: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
case 74: /* orconf ::= OR resolvetype */ yytestcase(yyruleno==74);
case 169: /* insert_cmd ::= INSERT orconf */ yytestcase(yyruleno==169);
{yymsp[-1].minor.yy60 = yymsp[0].minor.yy60;}
break;
case 61: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */
case 78: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==78);
case 211: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==211);
case 214: /* in_op ::= NOT IN */ yytestcase(yyruleno==214);
case 240: /* collate ::= COLLATE ID|STRING */ yytestcase(yyruleno==240);
{yymsp[-1].minor.yy60 = 1;}
break;
case 62: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
{yymsp[-1].minor.yy60 = 0;}
break;
case 64: /* tconscomma ::= COMMA */
{pParse->constraintName.n = 0;}
break;
case 66: /* tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */
{sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy338,yymsp[0].minor.yy60,yymsp[-2].minor.yy60,0);}
break;
case 67: /* tcons ::= UNIQUE LP sortlist RP onconf */
{sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy338,yymsp[0].minor.yy60,0,0,0,0,
SQLITE_IDXTYPE_UNIQUE);}
break;
case 68: /* tcons ::= CHECK LP expr RP onconf */
{sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy602,yymsp[-3].minor.yy0.z,yymsp[-1].minor.yy0.z);}
break;
case 69: /* tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */
{
sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy338, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy338, yymsp[-1].minor.yy60);
sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy60);
}
break;
case 71: /* onconf ::= */
case 73: /* orconf ::= */ yytestcase(yyruleno==73);
{yymsp[1].minor.yy60 = OE_Default;}
break;
case 72: /* onconf ::= ON CONFLICT resolvetype */
{yymsp[-2].minor.yy60 = yymsp[0].minor.yy60;}
break;
case 75: /* resolvetype ::= IGNORE */
{yymsp[0].minor.yy60 = OE_Ignore;}
break;
case 76: /* resolvetype ::= REPLACE */
case 170: /* insert_cmd ::= REPLACE */ yytestcase(yyruleno==170);
{yymsp[0].minor.yy60 = OE_Replace;}
break;
case 77: /* cmd ::= DROP TABLE ifexists fullname */
{
sqlite3DropTable(pParse, yymsp[0].minor.yy291, 0, yymsp[-1].minor.yy60);
}
break;
case 80: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */
{
sqlite3CreateView(pParse, &yymsp[-8].minor.yy0, &yymsp[-4].minor.yy0, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy338, yymsp[0].minor.yy307, yymsp[-7].minor.yy60, yymsp[-5].minor.yy60);
}
break;
case 81: /* cmd ::= DROP VIEW ifexists fullname */
{
sqlite3DropTable(pParse, yymsp[0].minor.yy291, 1, yymsp[-1].minor.yy60);
}
break;
case 82: /* cmd ::= select */
{
SelectDest dest = {SRT_Output, 0, 0, 0, 0, 0, 0};
sqlite3Select(pParse, yymsp[0].minor.yy307, &dest);
sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy307);
}
break;
case 83: /* select ::= WITH wqlist selectnowith */
{yymsp[-2].minor.yy307 = attachWithToSelect(pParse,yymsp[0].minor.yy307,yymsp[-1].minor.yy195);}
break;
case 84: /* select ::= WITH RECURSIVE wqlist selectnowith */
{yymsp[-3].minor.yy307 = attachWithToSelect(pParse,yymsp[0].minor.yy307,yymsp[-1].minor.yy195);}
break;
case 85: /* select ::= selectnowith */
{
Select *p = yymsp[0].minor.yy307;
if( p ){
parserDoubleLinkSelect(pParse, p);
}
yymsp[0].minor.yy307 = p; /*A-overwrites-X*/
}
break;
case 86: /* selectnowith ::= selectnowith multiselect_op oneselect */
{
Select *pRhs = yymsp[0].minor.yy307;
Select *pLhs = yymsp[-2].minor.yy307;
if( pRhs && pRhs->pPrior ){
SrcList *pFrom;
Token x;
x.n = 0;
parserDoubleLinkSelect(pParse, pRhs);
pFrom = sqlite3SrcListAppendFromTerm(pParse,0,0,0,&x,pRhs,0,0);
pRhs = sqlite3SelectNew(pParse,0,pFrom,0,0,0,0,0,0);
}
if( pRhs ){
pRhs->op = (u8)yymsp[-1].minor.yy60;
pRhs->pPrior = pLhs;
if( ALWAYS(pLhs) ) pLhs->selFlags &= ~SF_MultiValue;
pRhs->selFlags &= ~SF_MultiValue;
if( yymsp[-1].minor.yy60!=TK_ALL ) pParse->hasCompound = 1;
}else{
sqlite3SelectDelete(pParse->db, pLhs);
}
yymsp[-2].minor.yy307 = pRhs;
}
break;
case 87: /* multiselect_op ::= UNION */
case 89: /* multiselect_op ::= EXCEPT|INTERSECT */ yytestcase(yyruleno==89);
{yymsp[0].minor.yy60 = yymsp[0].major; /*A-overwrites-OP*/}
break;
case 88: /* multiselect_op ::= UNION ALL */
{yymsp[-1].minor.yy60 = TK_ALL;}
break;
case 90: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
{
yymsp[-8].minor.yy307 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy338,yymsp[-5].minor.yy291,yymsp[-4].minor.yy602,yymsp[-3].minor.yy338,yymsp[-2].minor.yy602,yymsp[-1].minor.yy338,yymsp[-7].minor.yy60,yymsp[0].minor.yy602);
}
break;
case 91: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */
#ifdef SQLITE_OMIT_WINDOWFUNC
goto SqliteOmitWindowfunc;
#else
{
yymsp[-9].minor.yy307 = sqlite3SelectNew(pParse,yymsp[-7].minor.yy338,yymsp[-6].minor.yy291,yymsp[-5].minor.yy602,yymsp[-4].minor.yy338,yymsp[-3].minor.yy602,yymsp[-1].minor.yy338,yymsp[-8].minor.yy60,yymsp[0].minor.yy602);
if( yymsp[-9].minor.yy307 ){
yymsp[-9].minor.yy307->pWinDefn = yymsp[-2].minor.yy19;
}else{
sqlite3WindowListDelete(pParse->db, yymsp[-2].minor.yy19);
}
}
#endif
break;
case 92: /* values ::= VALUES LP nexprlist RP */
{
yymsp[-3].minor.yy307 = sqlite3SelectNew(pParse,yymsp[-1].minor.yy338,0,0,0,0,0,SF_Values,0);
}
break;
case 93: /* values ::= values COMMA LP nexprlist RP */
{
Select *pRight, *pLeft = yymsp[-4].minor.yy307;
pRight = sqlite3SelectNew(pParse,yymsp[-1].minor.yy338,0,0,0,0,0,SF_Values|SF_MultiValue,0);
if( ALWAYS(pLeft) ) pLeft->selFlags &= ~SF_MultiValue;
if( pRight ){
pRight->op = TK_ALL;
pRight->pPrior = pLeft;
yymsp[-4].minor.yy307 = pRight;
}else{
yymsp[-4].minor.yy307 = pLeft;
}
}
break;
case 94: /* distinct ::= DISTINCT */
{yymsp[0].minor.yy60 = SF_Distinct;}
break;
case 95: /* distinct ::= ALL */
{yymsp[0].minor.yy60 = SF_All;}
break;
case 97: /* sclp ::= */
case 130: /* orderby_opt ::= */ yytestcase(yyruleno==130);
case 140: /* groupby_opt ::= */ yytestcase(yyruleno==140);
case 227: /* exprlist ::= */ yytestcase(yyruleno==227);
case 230: /* paren_exprlist ::= */ yytestcase(yyruleno==230);
case 235: /* eidlist_opt ::= */ yytestcase(yyruleno==235);
{yymsp[1].minor.yy338 = 0;}
break;
case 98: /* selcollist ::= sclp scanpt expr scanpt as */
{
yymsp[-4].minor.yy338 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy338, yymsp[-2].minor.yy602);
if( yymsp[0].minor.yy0.n>0 ) sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy338, &yymsp[0].minor.yy0, 1);
sqlite3ExprListSetSpan(pParse,yymsp[-4].minor.yy338,yymsp[-3].minor.yy528,yymsp[-1].minor.yy528);
}
break;
case 99: /* selcollist ::= sclp scanpt STAR */
{
Expr *p = sqlite3Expr(pParse->db, TK_ASTERISK, 0);
yymsp[-2].minor.yy338 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy338, p);
}
break;
case 100: /* selcollist ::= sclp scanpt nm DOT STAR */
{
Expr *pRight = sqlite3PExpr(pParse, TK_ASTERISK, 0, 0);
Expr *pLeft = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[-2].minor.yy0, 1);
Expr *pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight);
yymsp[-4].minor.yy338 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy338, pDot);
}
break;
case 101: /* as ::= AS nm */
case 112: /* dbnm ::= DOT nm */ yytestcase(yyruleno==112);
case 251: /* plus_num ::= PLUS INTEGER|FLOAT */ yytestcase(yyruleno==251);
case 252: /* minus_num ::= MINUS INTEGER|FLOAT */ yytestcase(yyruleno==252);
{yymsp[-1].minor.yy0 = yymsp[0].minor.yy0;}
break;
case 103: /* from ::= */
case 106: /* stl_prefix ::= */ yytestcase(yyruleno==106);
{yymsp[1].minor.yy291 = 0;}
break;
case 104: /* from ::= FROM seltablist */
{
yymsp[-1].minor.yy291 = yymsp[0].minor.yy291;
sqlite3SrcListShiftJoinType(yymsp[-1].minor.yy291);
}
break;
case 105: /* stl_prefix ::= seltablist joinop */
{
if( ALWAYS(yymsp[-1].minor.yy291 && yymsp[-1].minor.yy291->nSrc>0) ) yymsp[-1].minor.yy291->a[yymsp[-1].minor.yy291->nSrc-1].fg.jointype = (u8)yymsp[0].minor.yy60;
}
break;
case 107: /* seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */
{
yymsp[-6].minor.yy291 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy291,&yymsp[-5].minor.yy0,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,0,yymsp[-1].minor.yy602,yymsp[0].minor.yy288);
sqlite3SrcListIndexedBy(pParse, yymsp[-6].minor.yy291, &yymsp[-2].minor.yy0);
}
break;
case 108: /* seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt */
{
yymsp[-8].minor.yy291 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-8].minor.yy291,&yymsp[-7].minor.yy0,&yymsp[-6].minor.yy0,&yymsp[-2].minor.yy0,0,yymsp[-1].minor.yy602,yymsp[0].minor.yy288);
sqlite3SrcListFuncArgs(pParse, yymsp[-8].minor.yy291, yymsp[-4].minor.yy338);
}
break;
case 109: /* seltablist ::= stl_prefix LP select RP as on_opt using_opt */
{
yymsp[-6].minor.yy291 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy291,0,0,&yymsp[-2].minor.yy0,yymsp[-4].minor.yy307,yymsp[-1].minor.yy602,yymsp[0].minor.yy288);
}
break;
case 110: /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
{
if( yymsp[-6].minor.yy291==0 && yymsp[-2].minor.yy0.n==0 && yymsp[-1].minor.yy602==0 && yymsp[0].minor.yy288==0 ){
yymsp[-6].minor.yy291 = yymsp[-4].minor.yy291;
}else if( yymsp[-4].minor.yy291->nSrc==1 ){
yymsp[-6].minor.yy291 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy291,0,0,&yymsp[-2].minor.yy0,0,yymsp[-1].minor.yy602,yymsp[0].minor.yy288);
if( yymsp[-6].minor.yy291 ){
SrcItem *pNew = &yymsp[-6].minor.yy291->a[yymsp[-6].minor.yy291->nSrc-1];
SrcItem *pOld = yymsp[-4].minor.yy291->a;
pNew->zName = pOld->zName;
pNew->zDatabase = pOld->zDatabase;
pNew->pSelect = pOld->pSelect;
if( pOld->fg.isTabFunc ){
pNew->u1.pFuncArg = pOld->u1.pFuncArg;
pOld->u1.pFuncArg = 0;
pOld->fg.isTabFunc = 0;
pNew->fg.isTabFunc = 1;
}
pOld->zName = pOld->zDatabase = 0;
pOld->pSelect = 0;
}
sqlite3SrcListDelete(pParse->db, yymsp[-4].minor.yy291);
}else{
Select *pSubquery;
sqlite3SrcListShiftJoinType(yymsp[-4].minor.yy291);
pSubquery = sqlite3SelectNew(pParse,0,yymsp[-4].minor.yy291,0,0,0,0,SF_NestedFrom,0);
yymsp[-6].minor.yy291 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy291,0,0,&yymsp[-2].minor.yy0,pSubquery,yymsp[-1].minor.yy602,yymsp[0].minor.yy288);
}
}
break;
case 111: /* dbnm ::= */
case 125: /* indexed_opt ::= */ yytestcase(yyruleno==125);
{yymsp[1].minor.yy0.z=0; yymsp[1].minor.yy0.n=0;}
break;
case 113: /* fullname ::= nm */
{
yylhsminor.yy291 = sqlite3SrcListAppend(pParse,0,&yymsp[0].minor.yy0,0);
if( IN_RENAME_OBJECT && yylhsminor.yy291 ) sqlite3RenameTokenMap(pParse, yylhsminor.yy291->a[0].zName, &yymsp[0].minor.yy0);
}
yymsp[0].minor.yy291 = yylhsminor.yy291;
break;
case 114: /* fullname ::= nm DOT nm */
{
yylhsminor.yy291 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);
if( IN_RENAME_OBJECT && yylhsminor.yy291 ) sqlite3RenameTokenMap(pParse, yylhsminor.yy291->a[0].zName, &yymsp[0].minor.yy0);
}
yymsp[-2].minor.yy291 = yylhsminor.yy291;
break;
case 115: /* xfullname ::= nm */
{yymsp[0].minor.yy291 = sqlite3SrcListAppend(pParse,0,&yymsp[0].minor.yy0,0); /*A-overwrites-X*/}
break;
case 116: /* xfullname ::= nm DOT nm */
{yymsp[-2].minor.yy291 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-X*/}
break;
case 117: /* xfullname ::= nm DOT nm AS nm */
{
yymsp[-4].minor.yy291 = sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,&yymsp[-2].minor.yy0); /*A-overwrites-X*/
if( yymsp[-4].minor.yy291 ) yymsp[-4].minor.yy291->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0);
}
break;
case 118: /* xfullname ::= nm AS nm */
{
yymsp[-2].minor.yy291 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,0); /*A-overwrites-X*/
if( yymsp[-2].minor.yy291 ) yymsp[-2].minor.yy291->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0);
}
break;
case 119: /* joinop ::= COMMA|JOIN */
{ yymsp[0].minor.yy60 = JT_INNER; }
break;
case 120: /* joinop ::= JOIN_KW JOIN */
{yymsp[-1].minor.yy60 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0); /*X-overwrites-A*/}
break;
case 121: /* joinop ::= JOIN_KW nm JOIN */
{yymsp[-2].minor.yy60 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); /*X-overwrites-A*/}
break;
case 122: /* joinop ::= JOIN_KW nm nm JOIN */
{yymsp[-3].minor.yy60 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);/*X-overwrites-A*/}
break;
case 123: /* on_opt ::= ON expr */
case 143: /* having_opt ::= HAVING expr */ yytestcase(yyruleno==143);
case 150: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==150);
case 152: /* where_opt_ret ::= WHERE expr */ yytestcase(yyruleno==152);
case 223: /* case_else ::= ELSE expr */ yytestcase(yyruleno==223);
case 244: /* vinto ::= INTO expr */ yytestcase(yyruleno==244);
{yymsp[-1].minor.yy602 = yymsp[0].minor.yy602;}
break;
case 124: /* on_opt ::= */
case 142: /* having_opt ::= */ yytestcase(yyruleno==142);
case 144: /* limit_opt ::= */ yytestcase(yyruleno==144);
case 149: /* where_opt ::= */ yytestcase(yyruleno==149);
case 151: /* where_opt_ret ::= */ yytestcase(yyruleno==151);
case 224: /* case_else ::= */ yytestcase(yyruleno==224);
case 226: /* case_operand ::= */ yytestcase(yyruleno==226);
case 245: /* vinto ::= */ yytestcase(yyruleno==245);
{yymsp[1].minor.yy602 = 0;}
break;
case 126: /* indexed_opt ::= INDEXED BY nm */
{yymsp[-2].minor.yy0 = yymsp[0].minor.yy0;}
break;
case 127: /* indexed_opt ::= NOT INDEXED */
{yymsp[-1].minor.yy0.z=0; yymsp[-1].minor.yy0.n=1;}
break;
case 128: /* using_opt ::= USING LP idlist RP */
{yymsp[-3].minor.yy288 = yymsp[-1].minor.yy288;}
break;
case 129: /* using_opt ::= */
case 171: /* idlist_opt ::= */ yytestcase(yyruleno==171);
{yymsp[1].minor.yy288 = 0;}
break;
case 131: /* orderby_opt ::= ORDER BY sortlist */
case 141: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==141);
{yymsp[-2].minor.yy338 = yymsp[0].minor.yy338;}
break;
case 132: /* sortlist ::= sortlist COMMA expr sortorder nulls */
{
yymsp[-4].minor.yy338 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy338,yymsp[-2].minor.yy602);
sqlite3ExprListSetSortOrder(yymsp[-4].minor.yy338,yymsp[-1].minor.yy60,yymsp[0].minor.yy60);
}
break;
case 133: /* sortlist ::= expr sortorder nulls */
{
yymsp[-2].minor.yy338 = sqlite3ExprListAppend(pParse,0,yymsp[-2].minor.yy602); /*A-overwrites-Y*/
sqlite3ExprListSetSortOrder(yymsp[-2].minor.yy338,yymsp[-1].minor.yy60,yymsp[0].minor.yy60);
}
break;
case 134: /* sortorder ::= ASC */
{yymsp[0].minor.yy60 = SQLITE_SO_ASC;}
break;
case 135: /* sortorder ::= DESC */
{yymsp[0].minor.yy60 = SQLITE_SO_DESC;}
break;
case 136: /* sortorder ::= */
case 139: /* nulls ::= */ yytestcase(yyruleno==139);
{yymsp[1].minor.yy60 = SQLITE_SO_UNDEFINED;}
break;
case 137: /* nulls ::= NULLS FIRST */
{yymsp[-1].minor.yy60 = SQLITE_SO_ASC;}
break;
case 138: /* nulls ::= NULLS LAST */
{yymsp[-1].minor.yy60 = SQLITE_SO_DESC;}
break;
case 145: /* limit_opt ::= LIMIT expr */
{yymsp[-1].minor.yy602 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy602,0);}
break;
case 146: /* limit_opt ::= LIMIT expr OFFSET expr */
{yymsp[-3].minor.yy602 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[-2].minor.yy602,yymsp[0].minor.yy602);}
break;
case 147: /* limit_opt ::= LIMIT expr COMMA expr */
{yymsp[-3].minor.yy602 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy602,yymsp[-2].minor.yy602);}
break;
case 148: /* cmd ::= with DELETE FROM xfullname indexed_opt where_opt_ret */
{
sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy291, &yymsp[-1].minor.yy0);
sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy291,yymsp[0].minor.yy602,0,0);
}
break;
case 153: /* where_opt_ret ::= RETURNING selcollist */
{sqlite3AddReturning(pParse,yymsp[0].minor.yy338); yymsp[-1].minor.yy602 = 0;}
break;
case 154: /* where_opt_ret ::= WHERE expr RETURNING selcollist */
{sqlite3AddReturning(pParse,yymsp[0].minor.yy338); yymsp[-3].minor.yy602 = yymsp[-2].minor.yy602;}
break;
case 155: /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */
{
sqlite3SrcListIndexedBy(pParse, yymsp[-5].minor.yy291, &yymsp[-4].minor.yy0);
sqlite3ExprListCheckLength(pParse,yymsp[-2].minor.yy338,"set list");
yymsp[-5].minor.yy291 = sqlite3SrcListAppendList(pParse, yymsp[-5].minor.yy291, yymsp[-1].minor.yy291);
sqlite3Update(pParse,yymsp[-5].minor.yy291,yymsp[-2].minor.yy338,yymsp[0].minor.yy602,yymsp[-6].minor.yy60,0,0,0);
}
break;
case 156: /* setlist ::= setlist COMMA nm EQ expr */
{
yymsp[-4].minor.yy338 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy338, yymsp[0].minor.yy602);
sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy338, &yymsp[-2].minor.yy0, 1);
}
break;
case 157: /* setlist ::= setlist COMMA LP idlist RP EQ expr */
{
yymsp[-6].minor.yy338 = sqlite3ExprListAppendVector(pParse, yymsp[-6].minor.yy338, yymsp[-3].minor.yy288, yymsp[0].minor.yy602);
}
break;
case 158: /* setlist ::= nm EQ expr */
{
yylhsminor.yy338 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy602);
sqlite3ExprListSetName(pParse, yylhsminor.yy338, &yymsp[-2].minor.yy0, 1);
}
yymsp[-2].minor.yy338 = yylhsminor.yy338;
break;
case 159: /* setlist ::= LP idlist RP EQ expr */
{
yymsp[-4].minor.yy338 = sqlite3ExprListAppendVector(pParse, 0, yymsp[-3].minor.yy288, yymsp[0].minor.yy602);
}
break;
case 160: /* cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */
{
sqlite3Insert(pParse, yymsp[-3].minor.yy291, yymsp[-1].minor.yy307, yymsp[-2].minor.yy288, yymsp[-5].minor.yy60, yymsp[0].minor.yy178);
}
break;
case 161: /* cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES returning */
{
sqlite3Insert(pParse, yymsp[-4].minor.yy291, 0, yymsp[-3].minor.yy288, yymsp[-6].minor.yy60, 0);
}
break;
case 162: /* upsert ::= */
{ yymsp[1].minor.yy178 = 0; }
break;
case 163: /* upsert ::= RETURNING selcollist */
{ yymsp[-1].minor.yy178 = 0; sqlite3AddReturning(pParse,yymsp[0].minor.yy338); }
break;
case 164: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt upsert */
{ yymsp[-11].minor.yy178 = sqlite3UpsertNew(pParse->db,yymsp[-8].minor.yy338,yymsp[-6].minor.yy602,yymsp[-2].minor.yy338,yymsp[-1].minor.yy602,yymsp[0].minor.yy178);}
break;
case 165: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING upsert */
{ yymsp[-8].minor.yy178 = sqlite3UpsertNew(pParse->db,yymsp[-5].minor.yy338,yymsp[-3].minor.yy602,0,0,yymsp[0].minor.yy178); }
break;
case 166: /* upsert ::= ON CONFLICT DO NOTHING returning */
{ yymsp[-4].minor.yy178 = sqlite3UpsertNew(pParse->db,0,0,0,0,0); }
break;
case 167: /* upsert ::= ON CONFLICT DO UPDATE SET setlist where_opt returning */
{ yymsp[-7].minor.yy178 = sqlite3UpsertNew(pParse->db,0,0,yymsp[-2].minor.yy338,yymsp[-1].minor.yy602,0);}
break;
case 168: /* returning ::= RETURNING selcollist */
{sqlite3AddReturning(pParse,yymsp[0].minor.yy338);}
break;
case 172: /* idlist_opt ::= LP idlist RP */
{yymsp[-2].minor.yy288 = yymsp[-1].minor.yy288;}
break;
case 173: /* idlist ::= idlist COMMA nm */
{yymsp[-2].minor.yy288 = sqlite3IdListAppend(pParse,yymsp[-2].minor.yy288,&yymsp[0].minor.yy0);}
break;
case 174: /* idlist ::= nm */
{yymsp[0].minor.yy288 = sqlite3IdListAppend(pParse,0,&yymsp[0].minor.yy0); /*A-overwrites-Y*/}
break;
case 175: /* expr ::= LP expr RP */
{yymsp[-2].minor.yy602 = yymsp[-1].minor.yy602;}
break;
case 176: /* expr ::= ID|INDEXED */
case 177: /* expr ::= JOIN_KW */ yytestcase(yyruleno==177);
{yymsp[0].minor.yy602=tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0); /*A-overwrites-X*/}
break;
case 178: /* expr ::= nm DOT nm */
{
Expr *temp1 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[-2].minor.yy0, 1);
Expr *temp2 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[0].minor.yy0, 1);
if( IN_RENAME_OBJECT ){
sqlite3RenameTokenMap(pParse, (void*)temp2, &yymsp[0].minor.yy0);
sqlite3RenameTokenMap(pParse, (void*)temp1, &yymsp[-2].minor.yy0);
}
yylhsminor.yy602 = sqlite3PExpr(pParse, TK_DOT, temp1, temp2);
}
yymsp[-2].minor.yy602 = yylhsminor.yy602;
break;
case 179: /* expr ::= nm DOT nm DOT nm */
{
Expr *temp1 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[-4].minor.yy0, 1);
Expr *temp2 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[-2].minor.yy0, 1);
Expr *temp3 = sqlite3ExprAlloc(pParse->db, TK_ID, &yymsp[0].minor.yy0, 1);
Expr *temp4 = sqlite3PExpr(pParse, TK_DOT, temp2, temp3);
if( IN_RENAME_OBJECT ){
sqlite3RenameTokenMap(pParse, (void*)temp3, &yymsp[0].minor.yy0);
sqlite3RenameTokenMap(pParse, (void*)temp2, &yymsp[-2].minor.yy0);
}
yylhsminor.yy602 = sqlite3PExpr(pParse, TK_DOT, temp1, temp4);
}
yymsp[-4].minor.yy602 = yylhsminor.yy602;
break;
case 180: /* term ::= NULL|FLOAT|BLOB */
case 181: /* term ::= STRING */ yytestcase(yyruleno==181);
{yymsp[0].minor.yy602=tokenExpr(pParse,yymsp[0].major,yymsp[0].minor.yy0); /*A-overwrites-X*/}
break;
case 182: /* term ::= INTEGER */
{
yylhsminor.yy602 = sqlite3ExprAlloc(pParse->db, TK_INTEGER, &yymsp[0].minor.yy0, 1);
}
yymsp[0].minor.yy602 = yylhsminor.yy602;
break;
case 183: /* expr ::= VARIABLE */
{
if( !(yymsp[0].minor.yy0.z[0]=='#' && sqlite3Isdigit(yymsp[0].minor.yy0.z[1])) ){
u32 n = yymsp[0].minor.yy0.n;
yymsp[0].minor.yy602 = tokenExpr(pParse, TK_VARIABLE, yymsp[0].minor.yy0);
sqlite3ExprAssignVarNumber(pParse, yymsp[0].minor.yy602, n);
}else{
/* When doing a nested parse, one can include terms in an expression
** that look like this: #1 #2 ... These terms refer to registers
** in the virtual machine. #N is the N-th register. */
Token t = yymsp[0].minor.yy0; /*A-overwrites-X*/
assert( t.n>=2 );
if( pParse->nested==0 ){
sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &t);
yymsp[0].minor.yy602 = 0;
}else{
yymsp[0].minor.yy602 = sqlite3PExpr(pParse, TK_REGISTER, 0, 0);
if( yymsp[0].minor.yy602 ) sqlite3GetInt32(&t.z[1], &yymsp[0].minor.yy602->iTable);
}
}
}
break;
case 184: /* expr ::= expr COLLATE ID|STRING */
{
yymsp[-2].minor.yy602 = sqlite3ExprAddCollateToken(pParse, yymsp[-2].minor.yy602, &yymsp[0].minor.yy0, 1);
}
break;
case 185: /* expr ::= CAST LP expr AS typetoken RP */
{
yymsp[-5].minor.yy602 = sqlite3ExprAlloc(pParse->db, TK_CAST, &yymsp[-1].minor.yy0, 1);
sqlite3ExprAttachSubtrees(pParse->db, yymsp[-5].minor.yy602, yymsp[-3].minor.yy602, 0);
}
break;
case 186: /* expr ::= ID|INDEXED LP distinct exprlist RP */
{
yylhsminor.yy602 = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy338, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy60);
}
yymsp[-4].minor.yy602 = yylhsminor.yy602;
break;
case 187: /* expr ::= ID|INDEXED LP STAR RP */
{
yylhsminor.yy602 = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0, 0);
}
yymsp[-3].minor.yy602 = yylhsminor.yy602;
break;
case 188: /* expr ::= ID|INDEXED LP distinct exprlist RP filter_over */
{
yylhsminor.yy602 = sqlite3ExprFunction(pParse, yymsp[-2].minor.yy338, &yymsp[-5].minor.yy0, yymsp[-3].minor.yy60);
sqlite3WindowAttach(pParse, yylhsminor.yy602, yymsp[0].minor.yy19);
}
yymsp[-5].minor.yy602 = yylhsminor.yy602;
break;
case 189: /* expr ::= ID|INDEXED LP STAR RP filter_over */
{
yylhsminor.yy602 = sqlite3ExprFunction(pParse, 0, &yymsp[-4].minor.yy0, 0);
sqlite3WindowAttach(pParse, yylhsminor.yy602, yymsp[0].minor.yy19);
}
yymsp[-4].minor.yy602 = yylhsminor.yy602;
break;
case 190: /* term ::= CTIME_KW */
{
yylhsminor.yy602 = sqlite3ExprFunction(pParse, 0, &yymsp[0].minor.yy0, 0);
}
yymsp[0].minor.yy602 = yylhsminor.yy602;
break;
case 191: /* expr ::= LP nexprlist COMMA expr RP */
{
ExprList *pList = sqlite3ExprListAppend(pParse, yymsp[-3].minor.yy338, yymsp[-1].minor.yy602);
yymsp[-4].minor.yy602 = sqlite3PExpr(pParse, TK_VECTOR, 0, 0);
if( yymsp[-4].minor.yy602 ){
yymsp[-4].minor.yy602->x.pList = pList;
if( ALWAYS(pList->nExpr) ){
yymsp[-4].minor.yy602->flags |= pList->a[0].pExpr->flags & EP_Propagate;
}
}else{
sqlite3ExprListDelete(pParse->db, pList);
}
}
break;
case 192: /* expr ::= expr AND expr */
{yymsp[-2].minor.yy602=sqlite3ExprAnd(pParse,yymsp[-2].minor.yy602,yymsp[0].minor.yy602);}
break;
case 193: /* expr ::= expr OR expr */
case 194: /* expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==194);
case 195: /* expr ::= expr EQ|NE expr */ yytestcase(yyruleno==195);
case 196: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==196);
case 197: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==197);
case 198: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==198);
case 199: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==199);
{yymsp[-2].minor.yy602=sqlite3PExpr(pParse,yymsp[-1].major,yymsp[-2].minor.yy602,yymsp[0].minor.yy602);}
break;
case 200: /* likeop ::= NOT LIKE_KW|MATCH */
{yymsp[-1].minor.yy0=yymsp[0].minor.yy0; yymsp[-1].minor.yy0.n|=0x80000000; /*yymsp[-1].minor.yy0-overwrite-yymsp[0].minor.yy0*/}
break;
case 201: /* expr ::= expr likeop expr */
{
ExprList *pList;
int bNot = yymsp[-1].minor.yy0.n & 0x80000000;
yymsp[-1].minor.yy0.n &= 0x7fffffff;
pList = sqlite3ExprListAppend(pParse,0, yymsp[0].minor.yy602);
pList = sqlite3ExprListAppend(pParse,pList, yymsp[-2].minor.yy602);
yymsp[-2].minor.yy602 = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy0, 0);
if( bNot ) yymsp[-2].minor.yy602 = sqlite3PExpr(pParse, TK_NOT, yymsp[-2].minor.yy602, 0);
if( yymsp[-2].minor.yy602 ) yymsp[-2].minor.yy602->flags |= EP_InfixFunc;
}
break;
case 202: /* expr ::= expr likeop expr ESCAPE expr */
{
ExprList *pList;
int bNot = yymsp[-3].minor.yy0.n & 0x80000000;
yymsp[-3].minor.yy0.n &= 0x7fffffff;
pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy602);
pList = sqlite3ExprListAppend(pParse,pList, yymsp[-4].minor.yy602);
pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy602);
yymsp[-4].minor.yy602 = sqlite3ExprFunction(pParse, pList, &yymsp[-3].minor.yy0, 0);
if( bNot ) yymsp[-4].minor.yy602 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy602, 0);
if( yymsp[-4].minor.yy602 ) yymsp[-4].minor.yy602->flags |= EP_InfixFunc;
}
break;
case 203: /* expr ::= expr ISNULL|NOTNULL */
{yymsp[-1].minor.yy602 = sqlite3PExpr(pParse,yymsp[0].major,yymsp[-1].minor.yy602,0);}
break;
case 204: /* expr ::= expr NOT NULL */
{yymsp[-2].minor.yy602 = sqlite3PExpr(pParse,TK_NOTNULL,yymsp[-2].minor.yy602,0);}
break;
case 205: /* expr ::= expr IS expr */
{
yymsp[-2].minor.yy602 = sqlite3PExpr(pParse,TK_IS,yymsp[-2].minor.yy602,yymsp[0].minor.yy602);
binaryToUnaryIfNull(pParse, yymsp[0].minor.yy602, yymsp[-2].minor.yy602, TK_ISNULL);
}
break;
case 206: /* expr ::= expr IS NOT expr */
{
yymsp[-3].minor.yy602 = sqlite3PExpr(pParse,TK_ISNOT,yymsp[-3].minor.yy602,yymsp[0].minor.yy602);
binaryToUnaryIfNull(pParse, yymsp[0].minor.yy602, yymsp[-3].minor.yy602, TK_NOTNULL);
}
break;
case 207: /* expr ::= NOT expr */
case 208: /* expr ::= BITNOT expr */ yytestcase(yyruleno==208);
{yymsp[-1].minor.yy602 = sqlite3PExpr(pParse, yymsp[-1].major, yymsp[0].minor.yy602, 0);/*A-overwrites-B*/}
break;
case 209: /* expr ::= PLUS|MINUS expr */
{
yymsp[-1].minor.yy602 = sqlite3PExpr(pParse, yymsp[-1].major==TK_PLUS ? TK_UPLUS : TK_UMINUS, yymsp[0].minor.yy602, 0);
/*A-overwrites-B*/
}
break;
case 210: /* between_op ::= BETWEEN */
case 213: /* in_op ::= IN */ yytestcase(yyruleno==213);
{yymsp[0].minor.yy60 = 0;}
break;
case 212: /* expr ::= expr between_op expr AND expr */
{
ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy602);
pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy602);
yymsp[-4].minor.yy602 = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy602, 0);
if( yymsp[-4].minor.yy602 ){
yymsp[-4].minor.yy602->x.pList = pList;
}else{
sqlite3ExprListDelete(pParse->db, pList);
}
if( yymsp[-3].minor.yy60 ) yymsp[-4].minor.yy602 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy602, 0);
}
break;
case 215: /* expr ::= expr in_op LP exprlist RP */
{
if( yymsp[-1].minor.yy338==0 ){
/* Expressions of the form
**
** expr1 IN ()
** expr1 NOT IN ()
**
** simplify to constants 0 (false) and 1 (true), respectively,
** regardless of the value of expr1.
*/
sqlite3ExprUnmapAndDelete(pParse, yymsp[-4].minor.yy602);
yymsp[-4].minor.yy602 = sqlite3Expr(pParse->db, TK_INTEGER, yymsp[-3].minor.yy60 ? "1" : "0");
}else if( yymsp[-1].minor.yy338->nExpr==1 && sqlite3ExprIsConstant(yymsp[-1].minor.yy338->a[0].pExpr) ){
Expr *pRHS = yymsp[-1].minor.yy338->a[0].pExpr;
yymsp[-1].minor.yy338->a[0].pExpr = 0;
sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy338);
pRHS = sqlite3PExpr(pParse, TK_UPLUS, pRHS, 0);
yymsp[-4].minor.yy602 = sqlite3PExpr(pParse, TK_EQ, yymsp[-4].minor.yy602, pRHS);
if( yymsp[-3].minor.yy60 ) yymsp[-4].minor.yy602 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy602, 0);
}else{
yymsp[-4].minor.yy602 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy602, 0);
if( yymsp[-4].minor.yy602 ){
yymsp[-4].minor.yy602->x.pList = yymsp[-1].minor.yy338;
sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy602);
}else{
sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy338);
}
if( yymsp[-3].minor.yy60 ) yymsp[-4].minor.yy602 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy602, 0);
}
}
break;
case 216: /* expr ::= LP select RP */
{
yymsp[-2].minor.yy602 = sqlite3PExpr(pParse, TK_SELECT, 0, 0);
sqlite3PExprAddSelect(pParse, yymsp[-2].minor.yy602, yymsp[-1].minor.yy307);
}
break;
case 217: /* expr ::= expr in_op LP select RP */
{
yymsp[-4].minor.yy602 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy602, 0);
sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy602, yymsp[-1].minor.yy307);
if( yymsp[-3].minor.yy60 ) yymsp[-4].minor.yy602 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy602, 0);
}
break;
case 218: /* expr ::= expr in_op nm dbnm paren_exprlist */
{
SrcList *pSrc = sqlite3SrcListAppend(pParse, 0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);
Select *pSelect = sqlite3SelectNew(pParse, 0,pSrc,0,0,0,0,0,0);
if( yymsp[0].minor.yy338 ) sqlite3SrcListFuncArgs(pParse, pSelect ? pSrc : 0, yymsp[0].minor.yy338);
yymsp[-4].minor.yy602 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy602, 0);
sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy602, pSelect);
if( yymsp[-3].minor.yy60 ) yymsp[-4].minor.yy602 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy602, 0);
}
break;
case 219: /* expr ::= EXISTS LP select RP */
{
Expr *p;
p = yymsp[-3].minor.yy602 = sqlite3PExpr(pParse, TK_EXISTS, 0, 0);
sqlite3PExprAddSelect(pParse, p, yymsp[-1].minor.yy307);
}
break;
case 220: /* expr ::= CASE case_operand case_exprlist case_else END */
{
yymsp[-4].minor.yy602 = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy602, 0);
if( yymsp[-4].minor.yy602 ){
yymsp[-4].minor.yy602->x.pList = yymsp[-1].minor.yy602 ? sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy338,yymsp[-1].minor.yy602) : yymsp[-2].minor.yy338;
sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy602);
}else{
sqlite3ExprListDelete(pParse->db, yymsp[-2].minor.yy338);
sqlite3ExprDelete(pParse->db, yymsp[-1].minor.yy602);
}
}
break;
case 221: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */
{
yymsp[-4].minor.yy338 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy338, yymsp[-2].minor.yy602);
yymsp[-4].minor.yy338 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy338, yymsp[0].minor.yy602);
}
break;
case 222: /* case_exprlist ::= WHEN expr THEN expr */
{
yymsp[-3].minor.yy338 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy602);
yymsp[-3].minor.yy338 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy338, yymsp[0].minor.yy602);
}
break;
case 225: /* case_operand ::= expr */
{yymsp[0].minor.yy602 = yymsp[0].minor.yy602; /*A-overwrites-X*/}
break;
case 228: /* nexprlist ::= nexprlist COMMA expr */
{yymsp[-2].minor.yy338 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy338,yymsp[0].minor.yy602);}
break;
case 229: /* nexprlist ::= expr */
{yymsp[0].minor.yy338 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy602); /*A-overwrites-Y*/}
break;
case 231: /* paren_exprlist ::= LP exprlist RP */
case 236: /* eidlist_opt ::= LP eidlist RP */ yytestcase(yyruleno==236);
{yymsp[-2].minor.yy338 = yymsp[-1].minor.yy338;}
break;
case 232: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */
{
sqlite3CreateIndex(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0,
sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,0), yymsp[-2].minor.yy338, yymsp[-10].minor.yy60,
&yymsp[-11].minor.yy0, yymsp[0].minor.yy602, SQLITE_SO_ASC, yymsp[-8].minor.yy60, SQLITE_IDXTYPE_APPDEF);
if( IN_RENAME_OBJECT && pParse->pNewIndex ){
sqlite3RenameTokenMap(pParse, pParse->pNewIndex->zName, &yymsp[-4].minor.yy0);
}
}
break;
case 233: /* uniqueflag ::= UNIQUE */
case 275: /* raisetype ::= ABORT */ yytestcase(yyruleno==275);
{yymsp[0].minor.yy60 = OE_Abort;}
break;
case 234: /* uniqueflag ::= */
{yymsp[1].minor.yy60 = OE_None;}
break;
case 237: /* eidlist ::= eidlist COMMA nm collate sortorder */
{
yymsp[-4].minor.yy338 = parserAddExprIdListTerm(pParse, yymsp[-4].minor.yy338, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy60, yymsp[0].minor.yy60);
}
break;
case 238: /* eidlist ::= nm collate sortorder */
{
yymsp[-2].minor.yy338 = parserAddExprIdListTerm(pParse, 0, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy60, yymsp[0].minor.yy60); /*A-overwrites-Y*/
}
break;
case 241: /* cmd ::= DROP INDEX ifexists fullname */
{sqlite3DropIndex(pParse, yymsp[0].minor.yy291, yymsp[-1].minor.yy60);}
break;
case 242: /* cmd ::= VACUUM vinto */
#ifdef SQLITE_OMIT_VACUUM
goto SqliteOmitVacuum;
#else
{sqlite3Vacuum(pParse,0,yymsp[0].minor.yy602);}
#endif
break;
case 243: /* cmd ::= VACUUM nm vinto */
#ifdef SQLITE_OMIT_VACUUM
goto SqliteOmitVacuum;
#else
{sqlite3Vacuum(pParse,&yymsp[-1].minor.yy0,yymsp[0].minor.yy602);}
#endif
break;
case 246: /* cmd ::= PRAGMA nm dbnm */
{sqlite3Pragma(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0);}
break;
case 247: /* cmd ::= PRAGMA nm dbnm EQ nmnum */
{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);}
break;
case 248: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */
{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);}
break;
case 249: /* cmd ::= PRAGMA nm dbnm EQ minus_num */
{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);}
break;
case 250: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */
{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,1);}
break;
case 253: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
{
Token all;
all.z = yymsp[-3].minor.yy0.z;
all.n = (int)(yymsp[0].minor.yy0.z - yymsp[-3].minor.yy0.z) + yymsp[0].minor.yy0.n;
sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy483, &all);
}
break;
case 254: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
{
sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy60, yymsp[-4].minor.yy50.a, yymsp[-4].minor.yy50.b, yymsp[-2].minor.yy291, yymsp[0].minor.yy602, yymsp[-10].minor.yy60, yymsp[-8].minor.yy60);
yymsp[-10].minor.yy0 = (yymsp[-6].minor.yy0.n==0?yymsp[-7].minor.yy0:yymsp[-6].minor.yy0); /*A-overwrites-T*/
}
break;
case 255: /* trigger_time ::= BEFORE|AFTER */
{ yymsp[0].minor.yy60 = yymsp[0].major; /*A-overwrites-X*/ }
break;
case 256: /* trigger_time ::= INSTEAD OF */
{ yymsp[-1].minor.yy60 = TK_INSTEAD;}
break;
case 257: /* trigger_time ::= */
{ yymsp[1].minor.yy60 = TK_BEFORE; }
break;
case 258: /* trigger_event ::= DELETE|INSERT */
case 259: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==259);
{yymsp[0].minor.yy50.a = yymsp[0].major; /*A-overwrites-X*/ yymsp[0].minor.yy50.b = 0;}
break;
case 260: /* trigger_event ::= UPDATE OF idlist */
{yymsp[-2].minor.yy50.a = TK_UPDATE; yymsp[-2].minor.yy50.b = yymsp[0].minor.yy288;}
break;
case 261: /* when_clause ::= */
case 280: /* key_opt ::= */ yytestcase(yyruleno==280);
{ yymsp[1].minor.yy602 = 0; }
break;
case 262: /* when_clause ::= WHEN expr */
case 281: /* key_opt ::= KEY expr */ yytestcase(yyruleno==281);
{ yymsp[-1].minor.yy602 = yymsp[0].minor.yy602; }
break;
case 263: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
{
assert( yymsp[-2].minor.yy483!=0 );
yymsp[-2].minor.yy483->pLast->pNext = yymsp[-1].minor.yy483;
yymsp[-2].minor.yy483->pLast = yymsp[-1].minor.yy483;
}
break;
case 264: /* trigger_cmd_list ::= trigger_cmd SEMI */
{
assert( yymsp[-1].minor.yy483!=0 );
yymsp[-1].minor.yy483->pLast = yymsp[-1].minor.yy483;
}
break;
case 265: /* trnm ::= nm DOT nm */
{
yymsp[-2].minor.yy0 = yymsp[0].minor.yy0;
sqlite3ErrorMsg(pParse,
"qualified table names are not allowed on INSERT, UPDATE, and DELETE "
"statements within triggers");
}
break;
case 266: /* tridxby ::= INDEXED BY nm */
{
sqlite3ErrorMsg(pParse,
"the INDEXED BY clause is not allowed on UPDATE or DELETE statements "
"within triggers");
}
break;
case 267: /* tridxby ::= NOT INDEXED */
{
sqlite3ErrorMsg(pParse,
"the NOT INDEXED clause is not allowed on UPDATE or DELETE statements "
"within triggers");
}
break;
case 268: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */
{yylhsminor.yy483 = sqlite3TriggerUpdateStep(pParse, &yymsp[-6].minor.yy0, yymsp[-2].minor.yy291, yymsp[-3].minor.yy338, yymsp[-1].minor.yy602, yymsp[-7].minor.yy60, yymsp[-8].minor.yy0.z, yymsp[0].minor.yy528);}
yymsp[-8].minor.yy483 = yylhsminor.yy483;
break;
case 269: /* trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */
{
yylhsminor.yy483 = sqlite3TriggerInsertStep(pParse,&yymsp[-4].minor.yy0,yymsp[-3].minor.yy288,yymsp[-2].minor.yy307,yymsp[-6].minor.yy60,yymsp[-1].minor.yy178,yymsp[-7].minor.yy528,yymsp[0].minor.yy528);/*yylhsminor.yy483-overwrites-yymsp[-6].minor.yy60*/
}
yymsp[-7].minor.yy483 = yylhsminor.yy483;
break;
case 270: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */
{yylhsminor.yy483 = sqlite3TriggerDeleteStep(pParse, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy602, yymsp[-5].minor.yy0.z, yymsp[0].minor.yy528);}
yymsp[-5].minor.yy483 = yylhsminor.yy483;
break;
case 271: /* trigger_cmd ::= scanpt select scanpt */
{yylhsminor.yy483 = sqlite3TriggerSelectStep(pParse->db, yymsp[-1].minor.yy307, yymsp[-2].minor.yy528, yymsp[0].minor.yy528); /*yylhsminor.yy483-overwrites-yymsp[-1].minor.yy307*/}
yymsp[-2].minor.yy483 = yylhsminor.yy483;
break;
case 272: /* expr ::= RAISE LP IGNORE RP */
{
yymsp[-3].minor.yy602 = sqlite3PExpr(pParse, TK_RAISE, 0, 0);
if( yymsp[-3].minor.yy602 ){
yymsp[-3].minor.yy602->affExpr = OE_Ignore;
}
}
break;
case 273: /* expr ::= RAISE LP raisetype COMMA nm RP */
{
yymsp[-5].minor.yy602 = sqlite3ExprAlloc(pParse->db, TK_RAISE, &yymsp[-1].minor.yy0, 1);
if( yymsp[-5].minor.yy602 ) {
yymsp[-5].minor.yy602->affExpr = (char)yymsp[-3].minor.yy60;
}
}
break;
case 274: /* raisetype ::= ROLLBACK */
{yymsp[0].minor.yy60 = OE_Rollback;}
break;
case 276: /* raisetype ::= FAIL */
{yymsp[0].minor.yy60 = OE_Fail;}
break;
case 277: /* cmd ::= DROP TRIGGER ifexists fullname */
{
sqlite3DropTrigger(pParse,yymsp[0].minor.yy291,yymsp[-1].minor.yy60);
}
break;
case 278: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
{
sqlite3Attach(pParse, yymsp[-3].minor.yy602, yymsp[-1].minor.yy602, yymsp[0].minor.yy602);
}
break;
case 279: /* cmd ::= DETACH database_kw_opt expr */
{
sqlite3Detach(pParse, yymsp[0].minor.yy602);
}
break;
case 282: /* cmd ::= REINDEX */
{sqlite3Reindex(pParse, 0, 0);}
break;
case 283: /* cmd ::= REINDEX nm dbnm */
{sqlite3Reindex(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
break;
case 284: /* cmd ::= ANALYZE */
#ifdef SQLITE_OMIT_ANALYZE
goto SqliteOmitAnalyze;
#else
{sqlite3Analyze(pParse, 0, 0);}
#endif
break;
case 285: /* cmd ::= ANALYZE nm dbnm */
#ifdef SQLITE_OMIT_ANALYZE
goto SqliteOmitAnalyze;
#else
{sqlite3Analyze(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
#endif
break;
case 286: /* cmd ::= ALTER TABLE fullname RENAME TO nm */
#ifdef SQLITE_OMIT_ALTERTABLE
goto SqliteOmitAltertable;
#else
sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy291,&yymsp[0].minor.yy0);
#endif
break;
case 287: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */
#ifdef SQLITE_OMIT_ALTERTABLE
goto SqliteOmitAltertable;
#else
yymsp[-1].minor.yy0.n = (int)(pParse->sLastToken.z-yymsp[-1].minor.yy0.z) + pParse->sLastToken.n;
sqlite3AlterFinishAddColumn(pParse, &yymsp[-1].minor.yy0);
#endif
break;
case 288: /* cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */
#ifdef SQLITE_OMIT_ALTERTABLE
goto SqliteOmitAltertable;
#else
sqlite3AlterDropColumn(pParse, yymsp[-3].minor.yy291, &yymsp[0].minor.yy0);
#endif
break;
case 289: /* add_column_fullname ::= fullname */
#ifdef SQLITE_OMIT_ALTERTABLE
goto SqliteOmitAltertable;
#else
disableLookaside(pParse);
sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy291);
#endif
break;
case 290: /* cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */
#ifdef SQLITE_OMIT_ALTERTABLE
goto SqliteOmitAltertable;
#else
sqlite3AlterRenameColumn(pParse, yymsp[-5].minor.yy291, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
#endif
break;
case 291: /* cmd ::= create_vtab */
{sqlite3VtabFinishParse(pParse,0);}
break;
case 292: /* cmd ::= create_vtab LP vtabarglist RP */
{sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);}
break;
case 293: /* create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */
{
sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-4].minor.yy60);
}
break;
case 294: /* vtabarg ::= */
{sqlite3VtabArgInit(pParse);}
break;
case 295: /* vtabargtoken ::= ANY */
case 296: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==296);
case 297: /* lp ::= LP */ yytestcase(yyruleno==297);
{sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);}
break;
case 298: /* with ::= WITH wqlist */
case 299: /* with ::= WITH RECURSIVE wqlist */ yytestcase(yyruleno==299);
{ sqlite3WithPush(pParse, yymsp[0].minor.yy195, 1); }
break;
case 300: /* wqas ::= AS */
{yymsp[0].minor.yy570 = M10d_Any;}
break;
case 301: /* wqas ::= AS MATERIALIZED */
{yymsp[-1].minor.yy570 = M10d_Yes;}
break;
case 302: /* wqas ::= AS NOT MATERIALIZED */
{yymsp[-2].minor.yy570 = M10d_No;}
break;
case 303: /* wqitem ::= nm eidlist_opt wqas LP select RP */
{
yymsp[-5].minor.yy607 = sqlite3CteNew(pParse, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy338, yymsp[-1].minor.yy307, yymsp[-3].minor.yy570); /*A-overwrites-X*/
}
break;
case 304: /* wqlist ::= wqitem */
{
yymsp[0].minor.yy195 = sqlite3WithAdd(pParse, 0, yymsp[0].minor.yy607); /*A-overwrites-X*/
}
break;
case 305: /* wqlist ::= wqlist COMMA wqitem */
{
yymsp[-2].minor.yy195 = sqlite3WithAdd(pParse, yymsp[-2].minor.yy195, yymsp[0].minor.yy607);
}
break;
case 306: /* windowdefn_list ::= windowdefn */
{ yylhsminor.yy19 = yymsp[0].minor.yy19; }
yymsp[0].minor.yy19 = yylhsminor.yy19;
break;
case 307: /* windowdefn_list ::= windowdefn_list COMMA windowdefn */
#ifdef SQLITE_OMIT_WINDOWFUNC
goto SqliteOmitWindowfunc;
#else
{
assert( yymsp[0].minor.yy19!=0 );
sqlite3WindowChain(pParse, yymsp[0].minor.yy19, yymsp[-2].minor.yy19);
yymsp[0].minor.yy19->pNextWin = yymsp[-2].minor.yy19;
yylhsminor.yy19 = yymsp[0].minor.yy19;
}
yymsp[-2].minor.yy19 = yylhsminor.yy19;
#endif
break;
case 308: /* windowdefn ::= nm AS LP window RP */
{
if( ALWAYS(yymsp[-1].minor.yy19) ){
yymsp[-1].minor.yy19->zName = sqlite3DbStrNDup(pParse->db, yymsp[-4].minor.yy0.z, yymsp[-4].minor.yy0.n);
}
yylhsminor.yy19 = yymsp[-1].minor.yy19;
}
yymsp[-4].minor.yy19 = yylhsminor.yy19;
break;
case 309: /* window ::= PARTITION BY nexprlist orderby_opt frame_opt */
#ifdef SQLITE_OMIT_WINDOWFUNC
goto SqliteOmitWindowfunc;
#else
{
yymsp[-4].minor.yy19 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy19, yymsp[-2].minor.yy338, yymsp[-1].minor.yy338, 0);
}
#endif
break;
case 310: /* window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */
#ifdef SQLITE_OMIT_WINDOWFUNC
goto SqliteOmitWindowfunc;
#else
{
yylhsminor.yy19 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy19, yymsp[-2].minor.yy338, yymsp[-1].minor.yy338, &yymsp[-5].minor.yy0);
}
yymsp[-5].minor.yy19 = yylhsminor.yy19;
#endif
break;
case 311: /* window ::= ORDER BY sortlist frame_opt */
#ifdef SQLITE_OMIT_WINDOWFUNC
goto SqliteOmitWindowfunc;
#else
{
yymsp[-3].minor.yy19 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy19, 0, yymsp[-1].minor.yy338, 0);
}
#endif
break;
case 312: /* window ::= nm ORDER BY sortlist frame_opt */
#ifdef SQLITE_OMIT_WINDOWFUNC
goto SqliteOmitWindowfunc;
#else
{
yylhsminor.yy19 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy19, 0, yymsp[-1].minor.yy338, &yymsp[-4].minor.yy0);
}
yymsp[-4].minor.yy19 = yylhsminor.yy19;
#endif
break;
case 313: /* window ::= frame_opt */
case 332: /* filter_over ::= over_clause */ yytestcase(yyruleno==332);
{
yylhsminor.yy19 = yymsp[0].minor.yy19;
}
yymsp[0].minor.yy19 = yylhsminor.yy19;
break;
case 314: /* window ::= nm frame_opt */
#ifdef SQLITE_OMIT_WINDOWFUNC
goto SqliteOmitWindowfunc;
#else
{
yylhsminor.yy19 = sqlite3WindowAssemble(pParse, yymsp[0].minor.yy19, 0, 0, &yymsp[-1].minor.yy0);
}
yymsp[-1].minor.yy19 = yylhsminor.yy19;
#endif
break;
case 315: /* frame_opt ::= */
#ifdef SQLITE_OMIT_WINDOWFUNC
goto SqliteOmitWindowfunc;
#else
{
yymsp[1].minor.yy19 = sqlite3WindowAlloc(pParse, 0, TK_UNBOUNDED, 0, TK_CURRENT, 0, 0);
}
#endif
break;
case 316: /* frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */
#ifdef SQLITE_OMIT_WINDOWFUNC
goto SqliteOmitWindowfunc;
#else
{
yylhsminor.yy19 = sqlite3WindowAlloc(pParse, yymsp[-2].minor.yy60, yymsp[-1].minor.yy113.eType, yymsp[-1].minor.yy113.pExpr, TK_CURRENT, 0, yymsp[0].minor.yy570);
}
yymsp[-2].minor.yy19 = yylhsminor.yy19;
#endif
break;
case 317: /* frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */
#ifdef SQLITE_OMIT_WINDOWFUNC
goto SqliteOmitWindowfunc;
#else
{
yylhsminor.yy19 = sqlite3WindowAlloc(pParse, yymsp[-5].minor.yy60, yymsp[-3].minor.yy113.eType, yymsp[-3].minor.yy113.pExpr, yymsp[-1].minor.yy113.eType, yymsp[-1].minor.yy113.pExpr, yymsp[0].minor.yy570);
}
yymsp[-5].minor.yy19 = yylhsminor.yy19;
#endif
break;
case 319: /* frame_bound_s ::= frame_bound */
case 321: /* frame_bound_e ::= frame_bound */ yytestcase(yyruleno==321);
{yylhsminor.yy113 = yymsp[0].minor.yy113;}
yymsp[0].minor.yy113 = yylhsminor.yy113;
break;
case 320: /* frame_bound_s ::= UNBOUNDED PRECEDING */
case 322: /* frame_bound_e ::= UNBOUNDED FOLLOWING */ yytestcase(yyruleno==322);
case 324: /* frame_bound ::= CURRENT ROW */ yytestcase(yyruleno==324);
{yylhsminor.yy113.eType = yymsp[-1].major; yylhsminor.yy113.pExpr = 0;}
yymsp[-1].minor.yy113 = yylhsminor.yy113;
break;
case 323: /* frame_bound ::= expr PRECEDING|FOLLOWING */
{yylhsminor.yy113.eType = yymsp[0].major; yylhsminor.yy113.pExpr = yymsp[-1].minor.yy602;}
yymsp[-1].minor.yy113 = yylhsminor.yy113;
break;
case 325: /* frame_exclude_opt ::= */
{yymsp[1].minor.yy570 = 0;}
break;
case 326: /* frame_exclude_opt ::= EXCLUDE frame_exclude */
{yymsp[-1].minor.yy570 = yymsp[0].minor.yy570;}
break;
case 327: /* frame_exclude ::= NO OTHERS */
case 328: /* frame_exclude ::= CURRENT ROW */ yytestcase(yyruleno==328);
{yymsp[-1].minor.yy570 = yymsp[-1].major; /*A-overwrites-X*/}
break;
case 329: /* frame_exclude ::= GROUP|TIES */
{yymsp[0].minor.yy570 = yymsp[0].major; /*A-overwrites-X*/}
break;
case 330: /* window_clause ::= WINDOW windowdefn_list */
{ yymsp[-1].minor.yy19 = yymsp[0].minor.yy19; }
break;
case 331: /* filter_over ::= filter_clause over_clause */
{
yymsp[0].minor.yy19->pFilter = yymsp[-1].minor.yy602;
yylhsminor.yy19 = yymsp[0].minor.yy19;
}
yymsp[-1].minor.yy19 = yylhsminor.yy19;
break;
case 333: /* filter_over ::= filter_clause */
{
yylhsminor.yy19 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
if( yylhsminor.yy19 ){
yylhsminor.yy19->eFrmType = TK_FILTER;
yylhsminor.yy19->pFilter = yymsp[0].minor.yy602;
}else{
sqlite3ExprDelete(pParse->db, yymsp[0].minor.yy602);
}
}
yymsp[0].minor.yy19 = yylhsminor.yy19;
break;
case 334: /* over_clause ::= OVER LP window RP */
{
yymsp[-3].minor.yy19 = yymsp[-1].minor.yy19;
assert( yymsp[-3].minor.yy19!=0 );
}
break;
case 335: /* over_clause ::= OVER nm */
{
yymsp[-1].minor.yy19 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window));
if( yymsp[-1].minor.yy19 ){
yymsp[-1].minor.yy19->zName = sqlite3DbStrNDup(pParse->db, yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n);
}
}
break;
case 336: /* filter_clause ::= FILTER LP WHERE expr RP */
{ yymsp[-4].minor.yy602 = yymsp[-1].minor.yy602; }
break;
default:
/* (337) input ::= cmdlist */ yytestcase(yyruleno==337);
/* (338) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==338);
/* (339) cmdlist ::= ecmd (OPTIMIZED OUT) */ assert(yyruleno!=339);
/* (340) ecmd ::= SEMI */ yytestcase(yyruleno==340);
/* (341) ecmd ::= cmdx SEMI */ yytestcase(yyruleno==341);
/* (342) ecmd ::= explain cmdx SEMI (NEVER REDUCES) */ assert(yyruleno!=342);
/* (343) trans_opt ::= */ yytestcase(yyruleno==343);
/* (344) trans_opt ::= TRANSACTION */ yytestcase(yyruleno==344);
/* (345) trans_opt ::= TRANSACTION nm */ yytestcase(yyruleno==345);
/* (346) savepoint_opt ::= SAVEPOINT */ yytestcase(yyruleno==346);
/* (347) savepoint_opt ::= */ yytestcase(yyruleno==347);
/* (348) cmd ::= create_table create_table_args */ yytestcase(yyruleno==348);
/* (349) columnlist ::= columnlist COMMA columnname carglist */ yytestcase(yyruleno==349);
/* (350) columnlist ::= columnname carglist */ yytestcase(yyruleno==350);
/* (351) nm ::= ID|INDEXED */ yytestcase(yyruleno==351);
/* (352) nm ::= STRING */ yytestcase(yyruleno==352);
/* (353) nm ::= JOIN_KW */ yytestcase(yyruleno==353);
/* (354) typetoken ::= typename */ yytestcase(yyruleno==354);
/* (355) typename ::= ID|STRING */ yytestcase(yyruleno==355);
/* (356) signed ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=356);
/* (357) signed ::= minus_num (OPTIMIZED OUT) */ assert(yyruleno!=357);
/* (358) carglist ::= carglist ccons */ yytestcase(yyruleno==358);
/* (359) carglist ::= */ yytestcase(yyruleno==359);
/* (360) ccons ::= NULL onconf */ yytestcase(yyruleno==360);
/* (361) ccons ::= GENERATED ALWAYS AS generated */ yytestcase(yyruleno==361);
/* (362) ccons ::= AS generated */ yytestcase(yyruleno==362);
/* (363) conslist_opt ::= COMMA conslist */ yytestcase(yyruleno==363);
/* (364) conslist ::= conslist tconscomma tcons */ yytestcase(yyruleno==364);
/* (365) conslist ::= tcons (OPTIMIZED OUT) */ assert(yyruleno!=365);
/* (366) tconscomma ::= */ yytestcase(yyruleno==366);
/* (367) defer_subclause_opt ::= defer_subclause (OPTIMIZED OUT) */ assert(yyruleno!=367);
/* (368) resolvetype ::= raisetype (OPTIMIZED OUT) */ assert(yyruleno!=368);
/* (369) selectnowith ::= oneselect (OPTIMIZED OUT) */ assert(yyruleno!=369);
/* (370) oneselect ::= values */ yytestcase(yyruleno==370);
/* (371) sclp ::= selcollist COMMA */ yytestcase(yyruleno==371);
/* (372) as ::= ID|STRING */ yytestcase(yyruleno==372);
/* (373) returning ::= */ yytestcase(yyruleno==373);
/* (374) expr ::= term (OPTIMIZED OUT) */ assert(yyruleno!=374);
/* (375) likeop ::= LIKE_KW|MATCH */ yytestcase(yyruleno==375);
/* (376) exprlist ::= nexprlist */ yytestcase(yyruleno==376);
/* (377) nmnum ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=377);
/* (378) nmnum ::= nm (OPTIMIZED OUT) */ assert(yyruleno!=378);
/* (379) nmnum ::= ON */ yytestcase(yyruleno==379);
/* (380) nmnum ::= DELETE */ yytestcase(yyruleno==380);
/* (381) nmnum ::= DEFAULT */ yytestcase(yyruleno==381);
/* (382) plus_num ::= INTEGER|FLOAT */ yytestcase(yyruleno==382);
/* (383) foreach_clause ::= */ yytestcase(yyruleno==383);
/* (384) foreach_clause ::= FOR EACH ROW */ yytestcase(yyruleno==384);
/* (385) trnm ::= nm */ yytestcase(yyruleno==385);
/* (386) tridxby ::= */ yytestcase(yyruleno==386);
/* (387) database_kw_opt ::= DATABASE */ yytestcase(yyruleno==387);
/* (388) database_kw_opt ::= */ yytestcase(yyruleno==388);
/* (389) kwcolumn_opt ::= */ yytestcase(yyruleno==389);
/* (390) kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==390);
/* (391) vtabarglist ::= vtabarg */ yytestcase(yyruleno==391);
/* (392) vtabarglist ::= vtabarglist COMMA vtabarg */ yytestcase(yyruleno==392);
/* (393) vtabarg ::= vtabarg vtabargtoken */ yytestcase(yyruleno==393);
/* (394) anylist ::= */ yytestcase(yyruleno==394);
/* (395) anylist ::= anylist LP anylist RP */ yytestcase(yyruleno==395);
/* (396) anylist ::= anylist ANY */ yytestcase(yyruleno==396);
/* (397) with ::= */ yytestcase(yyruleno==397);
break;
/********** End reduce actions ************************************************/
#ifdef SQLITE_OMIT_ANALYZE
SqliteOmitAnalyze:
sqlite3ErrorMsg(pParse, "ANALYZE not included in production builds");
break;
#endif
#ifdef SQLITE_OMIT_ALTERTABLE
SqliteOmitAltertable:
sqlite3ErrorMsg(pParse, "ALTER not included in production builds");
break;
#endif
#ifdef SQLITE_OMIT_WINDOWFUNC
SqliteOmitWindowfunc:
sqlite3ErrorMsg(pParse, "window functions not included in production builds");
break;
#endif
#ifdef SQLITE_OMIT_VACUUM
SqliteOmitVacuum:
sqlite3ErrorMsg(pParse, "VACUUM not included in production builds");
break;
#endif
};
assert( yyruleno<sizeof(yyRuleInfoLhs)/sizeof(yyRuleInfoLhs[0]) );
yygoto = yyRuleInfoLhs[yyruleno];
yysize = yyRuleInfoNRhs[yyruleno];
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 */
){
sqlite3ParserARG_FETCH
sqlite3ParserCTX_FETCH
#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 *****************************************/
sqlite3ParserARG_STORE /* Suppress warning about unused %extra_argument variable */
sqlite3ParserCTX_STORE
}
#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 */
sqlite3ParserTOKENTYPE yyminor /* The minor type of the error token */
){
sqlite3ParserARG_FETCH
sqlite3ParserCTX_FETCH
#define TOKEN yyminor
/************ Begin %syntax_error code ****************************************/
UNUSED_PARAMETER(yymajor); /* Silence some compiler warnings */
if( TOKEN.z[0] ){
sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN);
}else{
sqlite3ErrorMsg(pParse, "incomplete input");
}
/************ End %syntax_error code ******************************************/
sqlite3ParserARG_STORE /* Suppress warning about unused %extra_argument variable */
sqlite3ParserCTX_STORE
}
/*
** The following is executed when the parser accepts
*/
static void yy_accept(
yyParser *yypParser /* The parser */
){
sqlite3ParserARG_FETCH
sqlite3ParserCTX_FETCH
#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 *******************************************/
sqlite3ParserARG_STORE /* Suppress warning about unused %extra_argument variable */
sqlite3ParserCTX_STORE
}
/* The main parser program.
** The first argument is a pointer to a structure obtained from
** "sqlite3ParserAlloc" which describes the current state of the parser.
** 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.
*/
void sqlite3Parser(
void *yyp, /* The parser */
int yymajor, /* The major token code number */
sqlite3ParserTOKENTYPE yyminor /* The value for the token */
sqlite3ParserARG_PDECL /* Optional %extra_argument parameter */
){
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 */
sqlite3ParserCTX_FETCH
sqlite3ParserARG_STORE
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
while(1){ /* Exit by "break" */
assert( yypParser->yytos>=yypParser->yystack );
assert( yyact==yypParser->yytos->stateno );
yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact);
if( yyact >= YY_MIN_REDUCE ){
unsigned int yyruleno = yyact - YY_MIN_REDUCE; /* Reduce by this rule */
assert( yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) );
#ifndef NDEBUG
if( yyTraceFILE ){
int yysize = yyRuleInfoNRhs[yyruleno];
if( yysize ){
fprintf(yyTraceFILE, "%sReduce %d [%s]%s, pop back to state %d.\n",
yyTracePrompt,
yyruleno, yyRuleName[yyruleno],
yyruleno<YYNRULE_WITH_ACTION ? "" : " without external action",
yypParser->yytos[yysize].stateno);
}else{
fprintf(yyTraceFILE, "%sReduce %d [%s]%s.\n",
yyTracePrompt, yyruleno, yyRuleName[yyruleno],
yyruleno<YYNRULE_WITH_ACTION ? "" : " without external action");
}
}
#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 */
if( yyRuleInfoNRhs[yyruleno]==0 ){
#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);
break;
}
#else
if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){
if( yyGrowStack(yypParser) ){
yyStackOverflow(yypParser);
break;
}
}
#endif
}
yyact = yy_reduce(yypParser,yyruleno,yymajor,yyminor sqlite3ParserCTX_PARAM);
}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{
while( yypParser->yytos >= yypParser->yystack
&& (yyact = yy_find_reduce_action(
yypParser->yytos->stateno,
YYERRORSYMBOL)) > YY_MAX_SHIFTREDUCE
){
yy_pop_parser_stack(yypParser);
}
if( yypParser->yytos < yypParser->yystack || yymajor==0 ){
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
}
}
#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.
*/
int sqlite3ParserFallback(int iToken){
#ifdef YYFALLBACK
assert( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) );
return yyFallback[iToken];
#else
(void)iToken;
return 0;
#endif
}