/* ** 2000-05-29 ** ** The author disclaims copyright to this source code. In place of ** a legal notice, here is a blessing: ** ** May you do good and not evil. ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** Driver template for the LEMON parser generator. ** ** The "lemon" program processes an LALR(1) input grammar file, then uses ** this template to construct a parser. The "lemon" program inserts text ** at each "%%" line. Also, any "P-a-r-s-e" identifer prefix (without the ** interstitial "-" characters) contained in this template is changed into ** the value of the %name directive from the grammar. Otherwise, the content ** of this template is copied straight through into the generate parser ** source file. ** ** The following is the concatenation of all %include directives from the ** input grammar file: */ #include #include /************ Begin %include sections from the grammar ************************/ #line 52 "parse.y" #include "sqliteInt.h" /* ** 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){ pParse->disableLookaside++; pParse->db->lookaside.bDisable++; } #line 451 "parse.y" /* ** 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){ if( p->pPrior ){ Select *pNext = 0, *pLoop; int mxSelect, cnt = 0; for(pLoop=p; pLoop; pNext=pLoop, pLoop=pLoop->pPrior, cnt++){ pLoop->pNext = pNext; pLoop->selFlags |= SF_Compound; } 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"); } } } #line 937 "parse.y" /* 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->affinity = 0; p->flags = EP_Leaf; 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; } #line 1108 "parse.y" /* 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; } } #line 1328 "parse.y" /* 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; } #line 188 "parse.c" /**************** End of %include directives **********************************/ /* These constants specify the various numeric values for terminal symbols ** in a format understandable to "makeheaders". This section is blank unless ** "lemon" is run with the "-m" command-line option. ***************** Begin makeheaders token definitions *************************/ /**************** End makeheaders token definitions ***************************/ /* 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 278 #define YYACTIONTYPE unsigned short int #define YYWILDCARD 91 #define sqlite3ParserTOKENTYPE Token typedef union { int yyinit; sqlite3ParserTOKENTYPE yy0; ExprList* yy42; int yy96; TriggerStep* yy119; Window* yy147; SrcList* yy167; Upsert* yy266; struct FrameBound yy317; IdList* yy336; struct TrigEvent yy350; struct {int value; int mask;} yy367; Select* yy423; const char* yy464; Expr* yy490; With* yy499; } 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 528 #define YYNRULE 369 #define YYNTOKEN 155 #define YY_MAX_SHIFT 527 #define YY_MIN_SHIFTREDUCE 764 #define YY_MAX_SHIFTREDUCE 1132 #define YY_ERROR_ACTION 1133 #define YY_ACCEPT_ACTION 1134 #define YY_NO_ACTION 1135 #define YY_MIN_REDUCE 1136 #define YY_MAX_REDUCE 1504 /************* 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 (2009) static const YYACTIONTYPE yy_action[] = { /* 0 */ 381, 522, 375, 107, 104, 200, 1297, 522, 1134, 1, /* 10 */ 1, 527, 2, 1138, 522, 1207, 1207, 1266, 277, 377, /* 20 */ 129, 499, 37, 37, 1401, 1205, 1205, 1215, 65, 65, /* 30 */ 484, 895, 107, 104, 200, 37, 37, 1047, 1498, 896, /* 40 */ 350, 1498, 346, 114, 115, 105, 1110, 1110, 961, 964, /* 50 */ 954, 954, 112, 112, 113, 113, 113, 113, 285, 254, /* 60 */ 254, 522, 254, 254, 504, 522, 499, 522, 107, 104, /* 70 */ 200, 1089, 519, 485, 390, 519, 1468, 446, 505, 230, /* 80 */ 197, 443, 37, 37, 1176, 210, 65, 65, 65, 65, /* 90 */ 254, 254, 111, 111, 111, 111, 110, 110, 109, 109, /* 100 */ 109, 108, 408, 519, 408, 155, 1045, 435, 405, 404, /* 110 */ 254, 254, 377, 1435, 1431, 412, 1114, 1089, 1090, 1091, /* 120 */ 284, 1116, 504, 519, 504, 372, 1437, 1425, 1432, 1115, /* 130 */ 1265, 503, 377, 506, 108, 408, 114, 115, 105, 1110, /* 140 */ 1110, 961, 964, 954, 954, 112, 112, 113, 113, 113, /* 150 */ 113, 276, 513, 1117, 373, 1117, 114, 115, 105, 1110, /* 160 */ 1110, 961, 964, 954, 954, 112, 112, 113, 113, 113, /* 170 */ 113, 500, 1424, 1435, 497, 1472, 1069, 260, 1067, 437, /* 180 */ 74, 107, 104, 200, 502, 111, 111, 111, 111, 110, /* 190 */ 110, 109, 109, 109, 108, 408, 377, 113, 113, 113, /* 200 */ 113, 106, 131, 91, 1365, 111, 111, 111, 111, 110, /* 210 */ 110, 109, 109, 109, 108, 408, 113, 113, 113, 113, /* 220 */ 114, 115, 105, 1110, 1110, 961, 964, 954, 954, 112, /* 230 */ 112, 113, 113, 113, 113, 111, 111, 111, 111, 110, /* 240 */ 110, 109, 109, 109, 108, 408, 116, 110, 110, 109, /* 250 */ 109, 109, 108, 408, 111, 111, 111, 111, 110, 110, /* 260 */ 109, 109, 109, 108, 408, 921, 516, 516, 516, 111, /* 270 */ 111, 111, 111, 110, 110, 109, 109, 109, 108, 408, /* 280 */ 521, 1202, 1181, 181, 109, 109, 109, 108, 408, 377, /* 290 */ 1202, 406, 406, 406, 75, 364, 111, 111, 111, 111, /* 300 */ 110, 110, 109, 109, 109, 108, 408, 386, 303, 423, /* 310 */ 289, 170, 522, 114, 115, 105, 1110, 1110, 961, 964, /* 320 */ 954, 954, 112, 112, 113, 113, 113, 113, 1448, 527, /* 330 */ 2, 1138, 522, 13, 13, 341, 277, 1089, 129, 226, /* 340 */ 941, 1062, 1004, 475, 921, 1215, 457, 388, 1089, 399, /* 350 */ 162, 1061, 155, 45, 45, 420, 932, 405, 404, 483, /* 360 */ 931, 12, 111, 111, 111, 111, 110, 110, 109, 109, /* 370 */ 109, 108, 408, 226, 286, 254, 254, 254, 254, 522, /* 380 */ 16, 16, 377, 1089, 1090, 1091, 318, 303, 519, 476, /* 390 */ 519, 931, 931, 933, 1089, 1090, 1091, 382, 276, 513, /* 400 */ 65, 65, 1117, 210, 1117, 1089, 114, 115, 105, 1110, /* 410 */ 1110, 961, 964, 954, 954, 112, 112, 113, 113, 113, /* 420 */ 113, 1452, 222, 1138, 1093, 465, 462, 461, 277, 180, /* 430 */ 129, 382, 396, 412, 427, 460, 504, 1215, 240, 257, /* 440 */ 328, 468, 323, 467, 227, 474, 12, 321, 428, 304, /* 450 */ 321, 1089, 1090, 1091, 489, 111, 111, 111, 111, 110, /* 460 */ 110, 109, 109, 109, 108, 408, 181, 118, 1089, 254, /* 470 */ 254, 1093, 522, 90, 355, 377, 522, 1185, 369, 802, /* 480 */ 1444, 343, 519, 248, 248, 77, 329, 133, 1089, 249, /* 490 */ 428, 304, 798, 49, 49, 210, 519, 65, 65, 114, /* 500 */ 115, 105, 1110, 1110, 961, 964, 954, 954, 112, 112, /* 510 */ 113, 113, 113, 113, 1089, 1090, 1091, 222, 1089, 442, /* 520 */ 465, 462, 461, 941, 791, 412, 171, 861, 366, 1025, /* 530 */ 460, 136, 198, 490, 1089, 1090, 1091, 452, 798, 932, /* 540 */ 5, 193, 192, 931, 1026, 107, 104, 200, 111, 111, /* 550 */ 111, 111, 110, 110, 109, 109, 109, 108, 408, 1027, /* 560 */ 254, 254, 807, 1089, 1089, 1090, 1091, 441, 377, 1089, /* 570 */ 348, 791, 795, 519, 931, 931, 933, 1089, 1412, 1400, /* 580 */ 836, 1089, 176, 3, 856, 1089, 522, 1443, 433, 855, /* 590 */ 837, 522, 114, 115, 105, 1110, 1110, 961, 964, 954, /* 600 */ 954, 112, 112, 113, 113, 113, 113, 13, 13, 1089, /* 610 */ 1090, 1091, 13, 13, 522, 1089, 1090, 1091, 1500, 362, /* 620 */ 1089, 393, 1238, 1089, 1090, 1091, 395, 1089, 1090, 1091, /* 630 */ 452, 1089, 1090, 1091, 522, 65, 65, 951, 951, 962, /* 640 */ 965, 111, 111, 111, 111, 110, 110, 109, 109, 109, /* 650 */ 108, 408, 522, 386, 882, 13, 13, 522, 881, 522, /* 660 */ 263, 377, 522, 435, 452, 1074, 1089, 1090, 1091, 267, /* 670 */ 452, 492, 1364, 64, 64, 435, 816, 155, 50, 50, /* 680 */ 65, 65, 522, 65, 65, 114, 115, 105, 1110, 1110, /* 690 */ 961, 964, 954, 954, 112, 112, 113, 113, 113, 113, /* 700 */ 522, 955, 386, 13, 13, 419, 415, 466, 418, 1089, /* 710 */ 1370, 781, 1214, 296, 301, 817, 403, 501, 181, 407, /* 720 */ 261, 15, 15, 276, 513, 418, 417, 1370, 1372, 414, /* 730 */ 376, 349, 1213, 264, 111, 111, 111, 111, 110, 110, /* 740 */ 109, 109, 109, 108, 408, 265, 254, 254, 229, 1409, /* 750 */ 268, 1219, 268, 1107, 377, 1089, 1090, 1091, 942, 519, /* 760 */ 397, 413, 880, 519, 254, 254, 1156, 486, 477, 262, /* 770 */ 426, 480, 329, 507, 293, 522, 295, 519, 114, 115, /* 780 */ 105, 1110, 1110, 961, 964, 954, 954, 112, 112, 113, /* 790 */ 113, 113, 113, 418, 1025, 1370, 39, 39, 254, 254, /* 800 */ 254, 254, 984, 254, 254, 254, 254, 255, 255, 1026, /* 810 */ 279, 519, 520, 519, 850, 850, 519, 138, 519, 522, /* 820 */ 519, 1047, 1499, 251, 1027, 1499, 880, 111, 111, 111, /* 830 */ 111, 110, 110, 109, 109, 109, 108, 408, 522, 1357, /* 840 */ 51, 51, 522, 199, 522, 510, 294, 377, 522, 276, /* 850 */ 513, 926, 9, 487, 233, 1009, 1009, 449, 189, 52, /* 860 */ 52, 329, 280, 53, 53, 54, 54, 377, 880, 55, /* 870 */ 55, 114, 115, 105, 1110, 1110, 961, 964, 954, 954, /* 880 */ 112, 112, 113, 113, 113, 113, 97, 522, 95, 1108, /* 890 */ 1045, 114, 115, 105, 1110, 1110, 961, 964, 954, 954, /* 900 */ 112, 112, 113, 113, 113, 113, 135, 199, 56, 56, /* 910 */ 769, 770, 771, 225, 224, 223, 522, 283, 441, 233, /* 920 */ 111, 111, 111, 111, 110, 110, 109, 109, 109, 108, /* 930 */ 408, 1006, 880, 330, 522, 1006, 1108, 40, 40, 522, /* 940 */ 111, 111, 111, 111, 110, 110, 109, 109, 109, 108, /* 950 */ 408, 522, 452, 522, 1108, 41, 41, 522, 17, 522, /* 960 */ 43, 43, 1159, 383, 522, 452, 522, 447, 522, 394, /* 970 */ 522, 194, 44, 44, 57, 57, 1251, 522, 58, 58, /* 980 */ 59, 59, 522, 470, 330, 14, 14, 60, 60, 120, /* 990 */ 120, 61, 61, 453, 1210, 93, 522, 429, 46, 46, /* 1000 */ 522, 1108, 522, 62, 62, 522, 441, 309, 522, 856, /* 1010 */ 522, 302, 522, 1250, 855, 377, 522, 63, 63, 1297, /* 1020 */ 401, 47, 47, 142, 142, 1471, 143, 143, 825, 70, /* 1030 */ 70, 48, 48, 66, 66, 377, 522, 121, 121, 114, /* 1040 */ 115, 105, 1110, 1110, 961, 964, 954, 954, 112, 112, /* 1050 */ 113, 113, 113, 113, 522, 422, 522, 67, 67, 114, /* 1060 */ 115, 105, 1110, 1110, 961, 964, 954, 954, 112, 112, /* 1070 */ 113, 113, 113, 113, 316, 122, 122, 123, 123, 1297, /* 1080 */ 522, 361, 1130, 88, 522, 439, 329, 391, 111, 111, /* 1090 */ 111, 111, 110, 110, 109, 109, 109, 108, 408, 266, /* 1100 */ 522, 119, 119, 522, 1297, 141, 141, 522, 111, 111, /* 1110 */ 111, 111, 110, 110, 109, 109, 109, 108, 408, 522, /* 1120 */ 805, 140, 140, 522, 127, 127, 515, 383, 126, 126, /* 1130 */ 522, 137, 522, 1312, 522, 311, 522, 314, 522, 203, /* 1140 */ 124, 124, 1311, 96, 125, 125, 207, 392, 1445, 472, /* 1150 */ 1131, 69, 69, 71, 71, 68, 68, 38, 38, 42, /* 1160 */ 42, 361, 1046, 377, 1297, 276, 513, 805, 185, 473, /* 1170 */ 498, 440, 448, 6, 384, 156, 253, 197, 473, 134, /* 1180 */ 430, 33, 1042, 377, 1125, 363, 1415, 114, 115, 105, /* 1190 */ 1110, 1110, 961, 964, 954, 954, 112, 112, 113, 113, /* 1200 */ 113, 113, 918, 300, 27, 297, 90, 114, 103, 105, /* 1210 */ 1110, 1110, 961, 964, 954, 954, 112, 112, 113, 113, /* 1220 */ 113, 113, 923, 275, 434, 232, 895, 232, 436, 256, /* 1230 */ 1131, 232, 402, 374, 896, 28, 111, 111, 111, 111, /* 1240 */ 110, 110, 109, 109, 109, 108, 408, 305, 458, 1389, /* 1250 */ 90, 228, 209, 991, 815, 814, 111, 111, 111, 111, /* 1260 */ 110, 110, 109, 109, 109, 108, 408, 319, 822, 823, /* 1270 */ 90, 327, 987, 935, 889, 228, 377, 232, 1003, 853, /* 1280 */ 1003, 326, 102, 1002, 1388, 1002, 789, 854, 444, 132, /* 1290 */ 102, 306, 1247, 310, 313, 315, 377, 317, 1198, 1184, /* 1300 */ 991, 115, 105, 1110, 1110, 961, 964, 954, 954, 112, /* 1310 */ 112, 113, 113, 113, 113, 1182, 1183, 322, 331, 332, /* 1320 */ 935, 1259, 105, 1110, 1110, 961, 964, 954, 954, 112, /* 1330 */ 112, 113, 113, 113, 113, 1296, 1234, 1461, 273, 1245, /* 1340 */ 508, 509, 1302, 100, 514, 246, 4, 1165, 1158, 111, /* 1350 */ 111, 111, 111, 110, 110, 109, 109, 109, 108, 408, /* 1360 */ 517, 1147, 187, 1146, 202, 1148, 1455, 360, 1231, 111, /* 1370 */ 111, 111, 111, 110, 110, 109, 109, 109, 108, 408, /* 1380 */ 11, 288, 334, 409, 336, 338, 191, 1289, 368, 195, /* 1390 */ 299, 421, 292, 100, 514, 511, 4, 438, 463, 325, /* 1400 */ 1181, 353, 1361, 1360, 340, 155, 190, 1458, 1125, 158, /* 1410 */ 517, 512, 235, 1408, 941, 1406, 1122, 385, 77, 432, /* 1420 */ 98, 98, 8, 1286, 168, 30, 117, 99, 1281, 409, /* 1430 */ 524, 523, 502, 409, 931, 1366, 287, 152, 160, 73, /* 1440 */ 1278, 76, 290, 88, 291, 511, 424, 456, 425, 212, /* 1450 */ 163, 276, 513, 365, 164, 431, 495, 165, 166, 1292, /* 1460 */ 172, 494, 445, 367, 941, 931, 931, 933, 934, 24, /* 1470 */ 98, 98, 216, 31, 82, 1355, 1377, 99, 451, 409, /* 1480 */ 524, 523, 308, 247, 931, 218, 177, 312, 100, 514, /* 1490 */ 454, 4, 219, 370, 469, 1149, 220, 1201, 1200, 398, /* 1500 */ 1199, 1192, 807, 1191, 488, 517, 1173, 371, 324, 100, /* 1510 */ 514, 400, 4, 271, 1172, 931, 931, 933, 934, 24, /* 1520 */ 1447, 1078, 411, 1171, 1470, 258, 517, 272, 409, 479, /* 1530 */ 359, 359, 358, 243, 356, 482, 1242, 778, 87, 234, /* 1540 */ 511, 493, 342, 343, 1426, 10, 333, 184, 335, 409, /* 1550 */ 204, 495, 282, 347, 94, 345, 496, 1243, 1241, 941, /* 1560 */ 281, 511, 337, 89, 1240, 98, 98, 1224, 339, 1223, /* 1570 */ 186, 491, 99, 1341, 409, 524, 523, 274, 351, 931, /* 1580 */ 941, 352, 241, 1155, 29, 525, 98, 98, 860, 1084, /* 1590 */ 206, 245, 765, 99, 242, 409, 524, 523, 147, 526, /* 1600 */ 931, 149, 244, 1144, 1139, 1393, 1394, 157, 205, 379, /* 1610 */ 931, 931, 933, 934, 24, 144, 380, 410, 188, 278, /* 1620 */ 201, 100, 514, 145, 4, 1392, 1391, 1169, 146, 259, /* 1630 */ 130, 931, 931, 933, 934, 24, 269, 1168, 517, 128, /* 1640 */ 72, 1166, 378, 1001, 999, 915, 159, 276, 513, 148, /* 1650 */ 208, 839, 211, 161, 298, 1015, 167, 150, 919, 387, /* 1660 */ 78, 409, 389, 169, 79, 80, 81, 151, 1018, 213, /* 1670 */ 416, 214, 1014, 511, 139, 18, 215, 307, 1007, 1119, /* 1680 */ 450, 232, 217, 173, 495, 174, 32, 780, 326, 494, /* 1690 */ 175, 455, 941, 221, 459, 83, 19, 20, 98, 98, /* 1700 */ 320, 464, 84, 270, 818, 99, 182, 409, 524, 523, /* 1710 */ 1078, 411, 931, 85, 258, 153, 471, 154, 183, 359, /* 1720 */ 359, 358, 243, 356, 967, 86, 778, 1050, 34, 478, /* 1730 */ 1051, 100, 514, 35, 4, 888, 196, 481, 250, 204, /* 1740 */ 252, 282, 231, 931, 931, 933, 934, 24, 517, 281, /* 1750 */ 178, 883, 102, 21, 22, 1064, 1068, 1055, 7, 344, /* 1760 */ 237, 92, 514, 179, 4, 1066, 90, 23, 982, 968, /* 1770 */ 966, 409, 970, 1024, 236, 1023, 971, 25, 517, 206, /* 1780 */ 36, 849, 936, 511, 790, 101, 26, 147, 518, 238, /* 1790 */ 149, 239, 354, 1463, 1462, 357, 1079, 205, 1135, 1135, /* 1800 */ 1135, 409, 941, 1135, 1135, 1135, 1135, 1135, 98, 98, /* 1810 */ 1135, 1135, 1135, 511, 1135, 99, 1135, 409, 524, 523, /* 1820 */ 1135, 1135, 931, 1135, 1135, 1135, 1135, 1135, 1135, 1135, /* 1830 */ 1135, 378, 941, 1135, 1135, 1135, 276, 513, 98, 98, /* 1840 */ 1135, 1135, 1135, 1135, 1135, 99, 1135, 409, 524, 523, /* 1850 */ 1135, 1135, 931, 931, 931, 933, 934, 24, 1135, 416, /* 1860 */ 1135, 1135, 1135, 258, 1135, 1135, 1135, 1135, 359, 359, /* 1870 */ 358, 243, 356, 1135, 1135, 778, 1135, 1135, 1135, 1135, /* 1880 */ 1135, 1135, 1135, 931, 931, 933, 934, 24, 204, 1135, /* 1890 */ 282, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 281, 1135, /* 1900 */ 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, /* 1910 */ 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, /* 1920 */ 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 206, 1135, /* 1930 */ 1135, 1135, 1135, 1135, 1135, 1135, 147, 1135, 1135, 149, /* 1940 */ 1135, 1135, 1135, 1135, 1135, 1135, 205, 1135, 1135, 1135, /* 1950 */ 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, /* 1960 */ 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, /* 1970 */ 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, /* 1980 */ 378, 1135, 1135, 1135, 1135, 276, 513, 1135, 1135, 1135, /* 1990 */ 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, /* 2000 */ 1135, 1135, 1135, 1135, 1135, 1135, 1135, 1135, 416, }; static const YYCODETYPE yy_lookahead[] = { /* 0 */ 168, 163, 184, 238, 239, 240, 163, 163, 155, 156, /* 10 */ 157, 158, 159, 160, 163, 202, 203, 187, 165, 19, /* 20 */ 167, 163, 184, 185, 259, 202, 203, 174, 184, 185, /* 30 */ 174, 31, 238, 239, 240, 184, 185, 22, 23, 39, /* 40 */ 216, 26, 218, 43, 44, 45, 46, 47, 48, 49, /* 50 */ 50, 51, 52, 53, 54, 55, 56, 57, 174, 206, /* 60 */ 207, 163, 206, 207, 220, 163, 163, 163, 238, 239, /* 70 */ 240, 59, 219, 229, 231, 219, 183, 245, 174, 223, /* 80 */ 224, 249, 184, 185, 191, 232, 184, 185, 184, 185, /* 90 */ 206, 207, 92, 93, 94, 95, 96, 97, 98, 99, /* 100 */ 100, 101, 102, 219, 102, 81, 91, 163, 96, 97, /* 110 */ 206, 207, 19, 275, 276, 262, 104, 105, 106, 107, /* 120 */ 163, 109, 220, 219, 220, 184, 275, 269, 277, 117, /* 130 */ 187, 229, 19, 229, 101, 102, 43, 44, 45, 46, /* 140 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, /* 150 */ 57, 127, 128, 141, 184, 143, 43, 44, 45, 46, /* 160 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, /* 170 */ 57, 268, 269, 275, 276, 197, 83, 233, 85, 163, /* 180 */ 67, 238, 239, 240, 134, 92, 93, 94, 95, 96, /* 190 */ 97, 98, 99, 100, 101, 102, 19, 54, 55, 56, /* 200 */ 57, 58, 152, 26, 247, 92, 93, 94, 95, 96, /* 210 */ 97, 98, 99, 100, 101, 102, 54, 55, 56, 57, /* 220 */ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, /* 230 */ 53, 54, 55, 56, 57, 92, 93, 94, 95, 96, /* 240 */ 97, 98, 99, 100, 101, 102, 69, 96, 97, 98, /* 250 */ 99, 100, 101, 102, 92, 93, 94, 95, 96, 97, /* 260 */ 98, 99, 100, 101, 102, 73, 179, 180, 181, 92, /* 270 */ 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, /* 280 */ 163, 191, 192, 163, 98, 99, 100, 101, 102, 19, /* 290 */ 200, 179, 180, 181, 24, 175, 92, 93, 94, 95, /* 300 */ 96, 97, 98, 99, 100, 101, 102, 163, 116, 117, /* 310 */ 118, 22, 163, 43, 44, 45, 46, 47, 48, 49, /* 320 */ 50, 51, 52, 53, 54, 55, 56, 57, 157, 158, /* 330 */ 159, 160, 163, 184, 185, 163, 165, 59, 167, 46, /* 340 */ 90, 76, 11, 174, 73, 174, 19, 198, 59, 19, /* 350 */ 72, 86, 81, 184, 185, 234, 106, 96, 97, 163, /* 360 */ 110, 182, 92, 93, 94, 95, 96, 97, 98, 99, /* 370 */ 100, 101, 102, 46, 230, 206, 207, 206, 207, 163, /* 380 */ 184, 185, 19, 105, 106, 107, 23, 116, 219, 220, /* 390 */ 219, 141, 142, 143, 105, 106, 107, 104, 127, 128, /* 400 */ 184, 185, 141, 232, 143, 59, 43, 44, 45, 46, /* 410 */ 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, /* 420 */ 57, 158, 108, 160, 59, 111, 112, 113, 165, 250, /* 430 */ 167, 104, 102, 262, 255, 121, 220, 174, 108, 109, /* 440 */ 110, 111, 112, 113, 114, 229, 182, 120, 117, 118, /* 450 */ 120, 105, 106, 107, 163, 92, 93, 94, 95, 96, /* 460 */ 97, 98, 99, 100, 101, 102, 163, 22, 59, 206, /* 470 */ 207, 106, 163, 26, 171, 19, 163, 193, 175, 23, /* 480 */ 163, 22, 219, 206, 207, 139, 163, 22, 59, 182, /* 490 */ 117, 118, 59, 184, 185, 232, 219, 184, 185, 43, /* 500 */ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, /* 510 */ 54, 55, 56, 57, 105, 106, 107, 108, 59, 255, /* 520 */ 111, 112, 113, 90, 59, 262, 22, 98, 174, 12, /* 530 */ 121, 208, 163, 220, 105, 106, 107, 163, 105, 106, /* 540 */ 22, 96, 97, 110, 27, 238, 239, 240, 92, 93, /* 550 */ 94, 95, 96, 97, 98, 99, 100, 101, 102, 42, /* 560 */ 206, 207, 115, 59, 105, 106, 107, 163, 19, 59, /* 570 */ 163, 106, 23, 219, 141, 142, 143, 59, 163, 205, /* 580 */ 63, 59, 72, 22, 124, 59, 163, 270, 234, 129, /* 590 */ 73, 163, 43, 44, 45, 46, 47, 48, 49, 50, /* 600 */ 51, 52, 53, 54, 55, 56, 57, 184, 185, 105, /* 610 */ 106, 107, 184, 185, 163, 105, 106, 107, 265, 266, /* 620 */ 59, 198, 225, 105, 106, 107, 198, 105, 106, 107, /* 630 */ 163, 105, 106, 107, 163, 184, 185, 46, 47, 48, /* 640 */ 49, 92, 93, 94, 95, 96, 97, 98, 99, 100, /* 650 */ 101, 102, 163, 163, 132, 184, 185, 163, 132, 163, /* 660 */ 256, 19, 163, 163, 163, 23, 105, 106, 107, 198, /* 670 */ 163, 220, 205, 184, 185, 163, 35, 81, 184, 185, /* 680 */ 184, 185, 163, 184, 185, 43, 44, 45, 46, 47, /* 690 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, /* 700 */ 163, 110, 163, 184, 185, 109, 205, 66, 163, 59, /* 710 */ 163, 21, 205, 16, 174, 74, 220, 198, 163, 220, /* 720 */ 230, 184, 185, 127, 128, 180, 181, 180, 181, 163, /* 730 */ 175, 242, 174, 233, 92, 93, 94, 95, 96, 97, /* 740 */ 98, 99, 100, 101, 102, 233, 206, 207, 26, 163, /* 750 */ 195, 207, 197, 26, 19, 105, 106, 107, 23, 219, /* 760 */ 119, 260, 26, 219, 206, 207, 174, 19, 174, 230, /* 770 */ 80, 174, 163, 174, 77, 163, 79, 219, 43, 44, /* 780 */ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, /* 790 */ 55, 56, 57, 248, 12, 248, 184, 185, 206, 207, /* 800 */ 206, 207, 112, 206, 207, 206, 207, 206, 207, 27, /* 810 */ 163, 219, 123, 219, 125, 126, 219, 208, 219, 163, /* 820 */ 219, 22, 23, 23, 42, 26, 26, 92, 93, 94, /* 830 */ 95, 96, 97, 98, 99, 100, 101, 102, 163, 149, /* 840 */ 184, 185, 163, 107, 163, 63, 149, 19, 163, 127, /* 850 */ 128, 23, 22, 105, 24, 116, 117, 118, 131, 184, /* 860 */ 185, 163, 163, 184, 185, 184, 185, 19, 132, 184, /* 870 */ 185, 43, 44, 45, 46, 47, 48, 49, 50, 51, /* 880 */ 52, 53, 54, 55, 56, 57, 146, 163, 148, 59, /* 890 */ 91, 43, 44, 45, 46, 47, 48, 49, 50, 51, /* 900 */ 52, 53, 54, 55, 56, 57, 208, 107, 184, 185, /* 910 */ 7, 8, 9, 116, 117, 118, 163, 163, 163, 24, /* 920 */ 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, /* 930 */ 102, 29, 132, 163, 163, 33, 106, 184, 185, 163, /* 940 */ 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, /* 950 */ 102, 163, 163, 163, 59, 184, 185, 163, 22, 163, /* 960 */ 184, 185, 177, 178, 163, 163, 163, 65, 163, 199, /* 970 */ 163, 26, 184, 185, 184, 185, 163, 163, 184, 185, /* 980 */ 184, 185, 163, 98, 163, 184, 185, 184, 185, 184, /* 990 */ 185, 184, 185, 252, 205, 147, 163, 61, 184, 185, /* 1000 */ 163, 106, 163, 184, 185, 163, 163, 205, 163, 124, /* 1010 */ 163, 256, 163, 163, 129, 19, 163, 184, 185, 163, /* 1020 */ 199, 184, 185, 184, 185, 23, 184, 185, 26, 184, /* 1030 */ 185, 184, 185, 184, 185, 19, 163, 184, 185, 43, /* 1040 */ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, /* 1050 */ 54, 55, 56, 57, 163, 163, 163, 184, 185, 43, /* 1060 */ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, /* 1070 */ 54, 55, 56, 57, 16, 184, 185, 184, 185, 163, /* 1080 */ 163, 22, 23, 138, 163, 19, 163, 231, 92, 93, /* 1090 */ 94, 95, 96, 97, 98, 99, 100, 101, 102, 256, /* 1100 */ 163, 184, 185, 163, 163, 184, 185, 163, 92, 93, /* 1110 */ 94, 95, 96, 97, 98, 99, 100, 101, 102, 163, /* 1120 */ 59, 184, 185, 163, 184, 185, 177, 178, 184, 185, /* 1130 */ 163, 208, 163, 237, 163, 77, 163, 79, 163, 15, /* 1140 */ 184, 185, 237, 147, 184, 185, 24, 231, 153, 154, /* 1150 */ 91, 184, 185, 184, 185, 184, 185, 184, 185, 184, /* 1160 */ 185, 22, 23, 19, 163, 127, 128, 106, 24, 273, /* 1170 */ 271, 105, 231, 274, 263, 264, 223, 224, 273, 22, /* 1180 */ 118, 24, 23, 19, 60, 26, 163, 43, 44, 45, /* 1190 */ 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, /* 1200 */ 56, 57, 140, 23, 22, 163, 26, 43, 44, 45, /* 1210 */ 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, /* 1220 */ 56, 57, 23, 211, 23, 26, 31, 26, 23, 22, /* 1230 */ 91, 26, 231, 221, 39, 53, 92, 93, 94, 95, /* 1240 */ 96, 97, 98, 99, 100, 101, 102, 23, 23, 163, /* 1250 */ 26, 26, 130, 59, 109, 110, 92, 93, 94, 95, /* 1260 */ 96, 97, 98, 99, 100, 101, 102, 23, 7, 8, /* 1270 */ 26, 110, 23, 59, 23, 26, 19, 26, 141, 23, /* 1280 */ 143, 120, 26, 141, 163, 143, 23, 23, 163, 26, /* 1290 */ 26, 163, 163, 163, 163, 163, 19, 163, 163, 193, /* 1300 */ 106, 44, 45, 46, 47, 48, 49, 50, 51, 52, /* 1310 */ 53, 54, 55, 56, 57, 163, 193, 163, 163, 163, /* 1320 */ 106, 163, 45, 46, 47, 48, 49, 50, 51, 52, /* 1330 */ 53, 54, 55, 56, 57, 163, 163, 130, 222, 163, /* 1340 */ 163, 203, 163, 19, 20, 251, 22, 163, 163, 92, /* 1350 */ 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, /* 1360 */ 36, 163, 209, 163, 261, 163, 163, 161, 222, 92, /* 1370 */ 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, /* 1380 */ 210, 213, 222, 59, 222, 222, 182, 213, 213, 196, /* 1390 */ 257, 226, 226, 19, 20, 71, 22, 257, 188, 187, /* 1400 */ 192, 212, 187, 187, 226, 81, 210, 166, 60, 261, /* 1410 */ 36, 244, 130, 170, 90, 170, 38, 170, 139, 104, /* 1420 */ 96, 97, 48, 236, 22, 235, 137, 103, 217, 105, /* 1430 */ 106, 107, 134, 59, 110, 247, 216, 43, 201, 258, /* 1440 */ 217, 258, 216, 138, 213, 71, 18, 18, 170, 169, /* 1450 */ 204, 127, 128, 213, 204, 213, 82, 204, 204, 201, /* 1460 */ 201, 87, 170, 236, 90, 141, 142, 143, 144, 145, /* 1470 */ 96, 97, 169, 235, 146, 213, 254, 103, 62, 105, /* 1480 */ 106, 107, 253, 170, 110, 169, 22, 170, 19, 20, /* 1490 */ 189, 22, 169, 189, 104, 170, 169, 186, 186, 64, /* 1500 */ 186, 194, 115, 194, 133, 36, 186, 189, 186, 19, /* 1510 */ 20, 102, 22, 246, 188, 141, 142, 143, 144, 145, /* 1520 */ 0, 1, 2, 186, 186, 5, 36, 246, 59, 189, /* 1530 */ 10, 11, 12, 13, 14, 189, 228, 17, 104, 170, /* 1540 */ 71, 84, 272, 22, 270, 22, 227, 216, 227, 59, /* 1550 */ 30, 82, 32, 170, 146, 216, 87, 228, 228, 90, /* 1560 */ 40, 71, 227, 136, 228, 96, 97, 217, 227, 217, /* 1570 */ 215, 135, 103, 241, 105, 106, 107, 243, 214, 110, /* 1580 */ 90, 213, 25, 173, 26, 172, 96, 97, 98, 13, /* 1590 */ 70, 6, 4, 103, 164, 105, 106, 107, 78, 162, /* 1600 */ 110, 81, 164, 162, 162, 182, 182, 264, 88, 267, /* 1610 */ 141, 142, 143, 144, 145, 176, 267, 3, 22, 151, /* 1620 */ 15, 19, 20, 176, 22, 182, 182, 182, 176, 89, /* 1630 */ 190, 141, 142, 143, 144, 145, 190, 182, 36, 16, /* 1640 */ 182, 182, 122, 23, 23, 128, 139, 127, 128, 119, /* 1650 */ 24, 20, 133, 131, 16, 1, 131, 119, 140, 61, /* 1660 */ 53, 59, 37, 139, 53, 53, 53, 119, 105, 34, /* 1670 */ 150, 130, 1, 71, 5, 22, 104, 149, 68, 75, /* 1680 */ 41, 26, 130, 68, 82, 104, 24, 20, 120, 87, /* 1690 */ 22, 19, 90, 114, 67, 22, 22, 22, 96, 97, /* 1700 */ 23, 67, 22, 67, 28, 103, 23, 105, 106, 107, /* 1710 */ 1, 2, 110, 138, 5, 37, 22, 153, 23, 10, /* 1720 */ 11, 12, 13, 14, 23, 26, 17, 23, 22, 24, /* 1730 */ 23, 19, 20, 22, 22, 105, 130, 24, 23, 30, /* 1740 */ 23, 32, 34, 141, 142, 143, 144, 145, 36, 40, /* 1750 */ 22, 132, 26, 34, 34, 85, 75, 23, 44, 24, /* 1760 */ 22, 19, 20, 26, 22, 83, 26, 34, 23, 23, /* 1770 */ 23, 59, 23, 23, 26, 23, 11, 22, 36, 70, /* 1780 */ 22, 124, 23, 71, 23, 22, 22, 78, 26, 130, /* 1790 */ 81, 130, 23, 130, 130, 15, 1, 88, 278, 278, /* 1800 */ 278, 59, 90, 278, 278, 278, 278, 278, 96, 97, /* 1810 */ 278, 278, 278, 71, 278, 103, 278, 105, 106, 107, /* 1820 */ 278, 278, 110, 278, 278, 278, 278, 278, 278, 278, /* 1830 */ 278, 122, 90, 278, 278, 278, 127, 128, 96, 97, /* 1840 */ 278, 278, 278, 278, 278, 103, 278, 105, 106, 107, /* 1850 */ 278, 278, 110, 141, 142, 143, 144, 145, 278, 150, /* 1860 */ 278, 278, 278, 5, 278, 278, 278, 278, 10, 11, /* 1870 */ 12, 13, 14, 278, 278, 17, 278, 278, 278, 278, /* 1880 */ 278, 278, 278, 141, 142, 143, 144, 145, 30, 278, /* 1890 */ 32, 278, 278, 278, 278, 278, 278, 278, 40, 278, /* 1900 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, /* 1910 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, /* 1920 */ 278, 278, 278, 278, 278, 278, 278, 278, 70, 278, /* 1930 */ 278, 278, 278, 278, 278, 278, 78, 278, 278, 81, /* 1940 */ 278, 278, 278, 278, 278, 278, 88, 278, 278, 278, /* 1950 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, /* 1960 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, /* 1970 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, /* 1980 */ 122, 278, 278, 278, 278, 127, 128, 278, 278, 278, /* 1990 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, /* 2000 */ 278, 278, 278, 278, 278, 278, 278, 278, 150, 278, /* 2010 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, }; #define YY_SHIFT_COUNT (527) #define YY_SHIFT_MIN (0) #define YY_SHIFT_MAX (1858) static const unsigned short int yy_shift_ofst[] = { /* 0 */ 1709, 1520, 1858, 1324, 1324, 24, 1374, 1469, 1602, 1712, /* 10 */ 1712, 1712, 271, 0, 0, 113, 1016, 1712, 1712, 1712, /* 20 */ 1712, 1712, 1712, 1712, 1712, 1712, 1712, 12, 12, 409, /* 30 */ 596, 24, 24, 24, 24, 24, 24, 93, 177, 270, /* 40 */ 363, 456, 549, 642, 735, 828, 848, 996, 1144, 1016, /* 50 */ 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1016, /* 60 */ 1016, 1016, 1016, 1016, 1016, 1016, 1016, 1164, 1016, 1257, /* 70 */ 1277, 1277, 1490, 1712, 1712, 1712, 1712, 1712, 1712, 1712, /* 80 */ 1712, 1712, 1712, 1712, 1712, 1712, 1712, 1712, 1712, 1712, /* 90 */ 1712, 1712, 1712, 1712, 1712, 1712, 1712, 1712, 1712, 1712, /* 100 */ 1712, 1712, 1712, 1712, 1712, 1742, 1712, 1712, 1712, 1712, /* 110 */ 1712, 1712, 1712, 1712, 1712, 1712, 1712, 1712, 1712, 143, /* 120 */ 162, 162, 162, 162, 162, 204, 151, 186, 650, 690, /* 130 */ 327, 650, 261, 261, 650, 722, 722, 722, 722, 373, /* 140 */ 33, 2, 2009, 2009, 330, 330, 330, 346, 289, 278, /* 150 */ 289, 289, 517, 517, 459, 510, 15, 799, 650, 650, /* 160 */ 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, /* 170 */ 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, /* 180 */ 331, 365, 995, 995, 265, 365, 50, 1038, 2009, 2009, /* 190 */ 2009, 433, 250, 250, 504, 314, 429, 518, 522, 526, /* 200 */ 561, 650, 650, 650, 650, 650, 650, 650, 650, 650, /* 210 */ 192, 650, 650, 650, 650, 650, 650, 650, 650, 650, /* 220 */ 650, 650, 650, 641, 641, 641, 650, 650, 650, 650, /* 230 */ 800, 650, 650, 650, 830, 650, 650, 782, 650, 650, /* 240 */ 650, 650, 650, 650, 650, 650, 739, 902, 689, 895, /* 250 */ 895, 895, 895, 736, 689, 689, 885, 445, 903, 1124, /* 260 */ 945, 748, 748, 1066, 945, 945, 1066, 447, 1002, 293, /* 270 */ 1195, 1195, 1195, 748, 740, 727, 460, 1157, 1348, 1282, /* 280 */ 1282, 1378, 1378, 1282, 1279, 1315, 1402, 1289, 1298, 1394, /* 290 */ 1289, 1298, 1305, 1428, 1428, 1428, 1428, 1282, 1429, 1305, /* 300 */ 1305, 1315, 1402, 1394, 1394, 1305, 1282, 1429, 1328, 1416, /* 310 */ 1282, 1429, 1464, 1282, 1429, 1282, 1429, 1464, 1390, 1390, /* 320 */ 1390, 1435, 1464, 1390, 1387, 1390, 1435, 1390, 1390, 1464, /* 330 */ 1409, 1409, 1464, 1371, 1434, 1371, 1434, 1371, 1434, 1371, /* 340 */ 1434, 1282, 1298, 1457, 1521, 1289, 1298, 1523, 1282, 1408, /* 350 */ 1289, 1427, 1436, 1305, 1557, 1558, 1576, 1576, 1585, 1585, /* 360 */ 1585, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, 2009, /* 370 */ 2009, 2009, 2009, 2009, 2009, 2009, 2009, 591, 697, 1059, /* 380 */ 1139, 1058, 797, 465, 1159, 1182, 1122, 1062, 1180, 936, /* 390 */ 1199, 1201, 1205, 1224, 1225, 1244, 1061, 1145, 1261, 1161, /* 400 */ 1194, 1249, 1251, 1256, 1137, 1142, 1263, 1264, 1214, 1207, /* 410 */ 1588, 1614, 1596, 1468, 1605, 1540, 1623, 1620, 1621, 1517, /* 420 */ 1507, 1530, 1626, 1522, 1631, 1519, 1638, 1654, 1525, 1518, /* 430 */ 1538, 1598, 1625, 1524, 1607, 1611, 1612, 1613, 1548, 1563, /* 440 */ 1635, 1541, 1671, 1669, 1653, 1572, 1528, 1610, 1655, 1615, /* 450 */ 1604, 1639, 1552, 1581, 1662, 1667, 1672, 1568, 1579, 1668, /* 460 */ 1627, 1673, 1674, 1677, 1675, 1634, 1676, 1680, 1636, 1678, /* 470 */ 1683, 1575, 1694, 1564, 1695, 1701, 1699, 1704, 1706, 1705, /* 480 */ 1707, 1711, 1713, 1606, 1715, 1717, 1630, 1708, 1728, 1619, /* 490 */ 1726, 1719, 1726, 1720, 1670, 1681, 1682, 1714, 1734, 1735, /* 500 */ 1737, 1740, 1733, 1745, 1726, 1746, 1747, 1749, 1750, 1748, /* 510 */ 1752, 1738, 1765, 1755, 1758, 1759, 1761, 1763, 1764, 1762, /* 520 */ 1657, 1659, 1661, 1663, 1664, 1769, 1780, 1795, }; #define YY_REDUCE_COUNT (376) #define YY_REDUCE_MIN (-235) #define YY_REDUCE_MAX (1459) static const short yy_reduce_ofst[] = { /* 0 */ -147, 171, 263, -96, 169, -144, -162, -149, -102, -156, /* 10 */ -98, 216, 354, -170, -57, -235, 307, 149, 423, 428, /* 20 */ 471, 313, 451, 519, 489, 496, 499, 545, 547, 555, /* 30 */ -116, 540, 558, 592, 594, 597, 599, -206, -206, -206, /* 40 */ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, /* 50 */ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, /* 60 */ -206, -206, -206, -206, -206, -206, -206, -206, -206, -206, /* 70 */ -206, -206, 196, 309, 494, 537, 612, 656, 675, 679, /* 80 */ 681, 685, 724, 753, 771, 776, 788, 790, 794, 796, /* 90 */ 801, 803, 805, 807, 814, 819, 833, 837, 839, 842, /* 100 */ 845, 847, 849, 853, 873, 891, 893, 917, 921, 937, /* 110 */ 940, 944, 956, 960, 967, 969, 971, 973, 975, -206, /* 120 */ -206, -206, -206, -206, -206, -206, -206, -206, 501, -168, /* 130 */ 90, -97, 87, 112, 303, 277, 601, 277, 601, 179, /* 140 */ -206, -206, -206, -206, -107, -107, -107, -43, -56, 323, /* 150 */ 500, 512, -187, -177, 317, 609, 353, 353, 120, 144, /* 160 */ 490, 539, 698, 374, 467, 507, 789, 404, -157, 755, /* 170 */ 856, 916, 843, 941, 802, 770, 923, 821, 1001, -142, /* 180 */ 264, 785, 896, 905, 899, 949, -176, 544, 911, 953, /* 190 */ 1012, -182, -59, -30, 16, -22, 117, 172, 291, 369, /* 200 */ 407, 415, 566, 586, 647, 699, 754, 813, 850, 892, /* 210 */ 121, 1023, 1042, 1086, 1121, 1125, 1128, 1129, 1130, 1131, /* 220 */ 1132, 1134, 1135, 284, 1106, 1123, 1152, 1154, 1155, 1156, /* 230 */ 397, 1158, 1172, 1173, 1116, 1176, 1177, 1138, 1179, 117, /* 240 */ 1184, 1185, 1198, 1200, 1202, 1203, 741, 1094, 1153, 1146, /* 250 */ 1160, 1162, 1163, 397, 1153, 1153, 1170, 1204, 1206, 1103, /* 260 */ 1168, 1165, 1166, 1133, 1174, 1175, 1140, 1210, 1193, 1208, /* 270 */ 1212, 1215, 1216, 1178, 1167, 1189, 1196, 1241, 1148, 1243, /* 280 */ 1245, 1181, 1183, 1247, 1188, 1187, 1190, 1211, 1220, 1237, /* 290 */ 1223, 1226, 1231, 1246, 1250, 1253, 1254, 1278, 1280, 1240, /* 300 */ 1242, 1227, 1238, 1258, 1259, 1262, 1292, 1303, 1222, 1229, /* 310 */ 1313, 1316, 1301, 1317, 1323, 1325, 1327, 1304, 1311, 1312, /* 320 */ 1314, 1307, 1318, 1320, 1326, 1322, 1309, 1337, 1338, 1340, /* 330 */ 1267, 1281, 1346, 1308, 1319, 1329, 1321, 1330, 1335, 1336, /* 340 */ 1341, 1369, 1331, 1270, 1274, 1350, 1339, 1332, 1383, 1334, /* 350 */ 1352, 1355, 1364, 1368, 1410, 1413, 1430, 1438, 1437, 1441, /* 360 */ 1442, 1342, 1349, 1343, 1439, 1423, 1424, 1443, 1444, 1447, /* 370 */ 1440, 1446, 1445, 1455, 1458, 1459, 1452, }; static const YYACTIONTYPE yy_default[] = { /* 0 */ 1504, 1504, 1504, 1350, 1133, 1239, 1133, 1133, 1133, 1350, /* 10 */ 1350, 1350, 1133, 1269, 1269, 1403, 1164, 1133, 1133, 1133, /* 20 */ 1133, 1133, 1133, 1133, 1349, 1133, 1133, 1133, 1133, 1133, /* 30 */ 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1275, 1133, /* 40 */ 1133, 1133, 1133, 1133, 1351, 1352, 1133, 1133, 1133, 1402, /* 50 */ 1404, 1367, 1285, 1284, 1283, 1282, 1385, 1256, 1280, 1273, /* 60 */ 1277, 1345, 1346, 1344, 1348, 1352, 1351, 1133, 1276, 1316, /* 70 */ 1330, 1315, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, /* 80 */ 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, /* 90 */ 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, /* 100 */ 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, /* 110 */ 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1324, /* 120 */ 1329, 1335, 1328, 1325, 1318, 1317, 1319, 1320, 1133, 1154, /* 130 */ 1203, 1133, 1133, 1133, 1133, 1421, 1420, 1133, 1133, 1164, /* 140 */ 1321, 1322, 1332, 1331, 1410, 1460, 1459, 1368, 1133, 1133, /* 150 */ 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, /* 160 */ 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, /* 170 */ 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, /* 180 */ 1164, 1160, 1310, 1309, 1430, 1160, 1263, 1133, 1416, 1239, /* 190 */ 1230, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, /* 200 */ 1133, 1133, 1133, 1133, 1407, 1405, 1133, 1133, 1133, 1133, /* 210 */ 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, /* 220 */ 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, /* 230 */ 1133, 1133, 1133, 1133, 1235, 1133, 1133, 1133, 1133, 1133, /* 240 */ 1133, 1133, 1133, 1133, 1133, 1454, 1133, 1380, 1217, 1235, /* 250 */ 1235, 1235, 1235, 1237, 1218, 1216, 1229, 1164, 1140, 1496, /* 260 */ 1279, 1258, 1258, 1493, 1279, 1279, 1493, 1178, 1474, 1175, /* 270 */ 1269, 1269, 1269, 1258, 1347, 1236, 1229, 1133, 1496, 1244, /* 280 */ 1244, 1495, 1495, 1244, 1368, 1288, 1294, 1274, 1263, 1206, /* 290 */ 1274, 1263, 1279, 1212, 1212, 1212, 1212, 1244, 1151, 1279, /* 300 */ 1279, 1288, 1294, 1206, 1206, 1279, 1244, 1151, 1384, 1490, /* 310 */ 1244, 1151, 1358, 1244, 1151, 1244, 1151, 1358, 1204, 1204, /* 320 */ 1204, 1193, 1358, 1204, 1178, 1204, 1193, 1204, 1204, 1358, /* 330 */ 1362, 1362, 1358, 1262, 1257, 1262, 1257, 1262, 1257, 1262, /* 340 */ 1257, 1244, 1263, 1429, 1133, 1274, 1263, 1353, 1244, 1133, /* 350 */ 1274, 1272, 1270, 1279, 1157, 1196, 1457, 1457, 1453, 1453, /* 360 */ 1453, 1501, 1501, 1416, 1469, 1164, 1164, 1164, 1164, 1469, /* 370 */ 1180, 1180, 1164, 1164, 1164, 1164, 1469, 1133, 1133, 1133, /* 380 */ 1133, 1133, 1133, 1464, 1133, 1369, 1248, 1133, 1133, 1133, /* 390 */ 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, /* 400 */ 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1299, /* 410 */ 1133, 1136, 1413, 1133, 1133, 1411, 1133, 1133, 1133, 1133, /* 420 */ 1133, 1133, 1249, 1133, 1133, 1133, 1133, 1133, 1133, 1133, /* 430 */ 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, /* 440 */ 1133, 1492, 1133, 1133, 1133, 1133, 1133, 1133, 1383, 1382, /* 450 */ 1133, 1133, 1246, 1133, 1133, 1133, 1133, 1133, 1133, 1133, /* 460 */ 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, /* 470 */ 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, /* 480 */ 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, /* 490 */ 1271, 1133, 1428, 1133, 1133, 1133, 1133, 1133, 1133, 1133, /* 500 */ 1442, 1264, 1133, 1133, 1483, 1133, 1133, 1133, 1133, 1133, /* 510 */ 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1133, 1478, /* 520 */ 1220, 1301, 1133, 1300, 1304, 1133, 1145, 1133, }; /********** 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, /* CURRENT => ID */ 59, /* FOLLOWING => ID */ 59, /* PARTITION => ID */ 59, /* PRECEDING => ID */ 59, /* RANGE => ID */ 59, /* UNBOUNDED => ID */ 59, /* REINDEX => ID */ 59, /* RENAME => ID */ 59, /* CTIME_KW => ID */ }; #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 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: **
    **
  • A FILE* to which trace output should be written. ** If NULL, then tracing is turned off. **
  • A prefix string written at the beginning of every ** line of trace output. If NULL, then tracing is ** turned off. **
** ** 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 */ "CURRENT", /* 83 */ "FOLLOWING", /* 84 */ "PARTITION", /* 85 */ "PRECEDING", /* 86 */ "RANGE", /* 87 */ "UNBOUNDED", /* 88 */ "REINDEX", /* 89 */ "RENAME", /* 90 */ "CTIME_KW", /* 91 */ "ANY", /* 92 */ "BITAND", /* 93 */ "BITOR", /* 94 */ "LSHIFT", /* 95 */ "RSHIFT", /* 96 */ "PLUS", /* 97 */ "MINUS", /* 98 */ "STAR", /* 99 */ "SLASH", /* 100 */ "REM", /* 101 */ "CONCAT", /* 102 */ "COLLATE", /* 103 */ "BITNOT", /* 104 */ "ON", /* 105 */ "INDEXED", /* 106 */ "STRING", /* 107 */ "JOIN_KW", /* 108 */ "CONSTRAINT", /* 109 */ "DEFAULT", /* 110 */ "NULL", /* 111 */ "PRIMARY", /* 112 */ "UNIQUE", /* 113 */ "CHECK", /* 114 */ "REFERENCES", /* 115 */ "AUTOINCR", /* 116 */ "INSERT", /* 117 */ "DELETE", /* 118 */ "UPDATE", /* 119 */ "SET", /* 120 */ "DEFERRABLE", /* 121 */ "FOREIGN", /* 122 */ "DROP", /* 123 */ "UNION", /* 124 */ "ALL", /* 125 */ "EXCEPT", /* 126 */ "INTERSECT", /* 127 */ "SELECT", /* 128 */ "VALUES", /* 129 */ "DISTINCT", /* 130 */ "DOT", /* 131 */ "FROM", /* 132 */ "JOIN", /* 133 */ "USING", /* 134 */ "ORDER", /* 135 */ "GROUP", /* 136 */ "HAVING", /* 137 */ "LIMIT", /* 138 */ "WHERE", /* 139 */ "INTO", /* 140 */ "NOTHING", /* 141 */ "FLOAT", /* 142 */ "BLOB", /* 143 */ "INTEGER", /* 144 */ "VARIABLE", /* 145 */ "CASE", /* 146 */ "WHEN", /* 147 */ "THEN", /* 148 */ "ELSE", /* 149 */ "INDEX", /* 150 */ "ALTER", /* 151 */ "ADD", /* 152 */ "WINDOW", /* 153 */ "OVER", /* 154 */ "FILTER", /* 155 */ "input", /* 156 */ "cmdlist", /* 157 */ "ecmd", /* 158 */ "cmdx", /* 159 */ "explain", /* 160 */ "cmd", /* 161 */ "transtype", /* 162 */ "trans_opt", /* 163 */ "nm", /* 164 */ "savepoint_opt", /* 165 */ "create_table", /* 166 */ "create_table_args", /* 167 */ "createkw", /* 168 */ "temp", /* 169 */ "ifnotexists", /* 170 */ "dbnm", /* 171 */ "columnlist", /* 172 */ "conslist_opt", /* 173 */ "table_options", /* 174 */ "select", /* 175 */ "columnname", /* 176 */ "carglist", /* 177 */ "typetoken", /* 178 */ "typename", /* 179 */ "signed", /* 180 */ "plus_num", /* 181 */ "minus_num", /* 182 */ "scanpt", /* 183 */ "ccons", /* 184 */ "term", /* 185 */ "expr", /* 186 */ "onconf", /* 187 */ "sortorder", /* 188 */ "autoinc", /* 189 */ "eidlist_opt", /* 190 */ "refargs", /* 191 */ "defer_subclause", /* 192 */ "refarg", /* 193 */ "refact", /* 194 */ "init_deferred_pred_opt", /* 195 */ "conslist", /* 196 */ "tconscomma", /* 197 */ "tcons", /* 198 */ "sortlist", /* 199 */ "eidlist", /* 200 */ "defer_subclause_opt", /* 201 */ "orconf", /* 202 */ "resolvetype", /* 203 */ "raisetype", /* 204 */ "ifexists", /* 205 */ "fullname", /* 206 */ "selectnowith", /* 207 */ "oneselect", /* 208 */ "wqlist", /* 209 */ "multiselect_op", /* 210 */ "distinct", /* 211 */ "selcollist", /* 212 */ "from", /* 213 */ "where_opt", /* 214 */ "groupby_opt", /* 215 */ "having_opt", /* 216 */ "orderby_opt", /* 217 */ "limit_opt", /* 218 */ "window_clause", /* 219 */ "values", /* 220 */ "nexprlist", /* 221 */ "sclp", /* 222 */ "as", /* 223 */ "seltablist", /* 224 */ "stl_prefix", /* 225 */ "joinop", /* 226 */ "indexed_opt", /* 227 */ "on_opt", /* 228 */ "using_opt", /* 229 */ "exprlist", /* 230 */ "xfullname", /* 231 */ "idlist", /* 232 */ "with", /* 233 */ "setlist", /* 234 */ "insert_cmd", /* 235 */ "idlist_opt", /* 236 */ "upsert", /* 237 */ "over_clause", /* 238 */ "likeop", /* 239 */ "between_op", /* 240 */ "in_op", /* 241 */ "paren_exprlist", /* 242 */ "case_operand", /* 243 */ "case_exprlist", /* 244 */ "case_else", /* 245 */ "uniqueflag", /* 246 */ "collate", /* 247 */ "vinto", /* 248 */ "nmnum", /* 249 */ "trigger_decl", /* 250 */ "trigger_cmd_list", /* 251 */ "trigger_time", /* 252 */ "trigger_event", /* 253 */ "foreach_clause", /* 254 */ "when_clause", /* 255 */ "trigger_cmd", /* 256 */ "trnm", /* 257 */ "tridxby", /* 258 */ "database_kw_opt", /* 259 */ "key_opt", /* 260 */ "add_column_fullname", /* 261 */ "kwcolumn_opt", /* 262 */ "create_vtab", /* 263 */ "vtabarglist", /* 264 */ "vtabarg", /* 265 */ "vtabargtoken", /* 266 */ "lp", /* 267 */ "anylist", /* 268 */ "windowdefn_list", /* 269 */ "windowdefn", /* 270 */ "window", /* 271 */ "frame_opt", /* 272 */ "part_opt", /* 273 */ "filter_opt", /* 274 */ "range_or_rows", /* 275 */ "frame_bound", /* 276 */ "frame_bound_s", /* 277 */ "frame_bound_e", }; #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 */ "ccons ::= CONSTRAINT nm", /* 30 */ "ccons ::= DEFAULT scanpt term scanpt", /* 31 */ "ccons ::= DEFAULT LP expr RP", /* 32 */ "ccons ::= DEFAULT PLUS term scanpt", /* 33 */ "ccons ::= DEFAULT MINUS term scanpt", /* 34 */ "ccons ::= DEFAULT scanpt ID|INDEXED", /* 35 */ "ccons ::= NOT NULL onconf", /* 36 */ "ccons ::= PRIMARY KEY sortorder onconf autoinc", /* 37 */ "ccons ::= UNIQUE onconf", /* 38 */ "ccons ::= CHECK LP expr RP", /* 39 */ "ccons ::= REFERENCES nm eidlist_opt refargs", /* 40 */ "ccons ::= defer_subclause", /* 41 */ "ccons ::= COLLATE ID|STRING", /* 42 */ "autoinc ::=", /* 43 */ "autoinc ::= AUTOINCR", /* 44 */ "refargs ::=", /* 45 */ "refargs ::= refargs refarg", /* 46 */ "refarg ::= MATCH nm", /* 47 */ "refarg ::= ON INSERT refact", /* 48 */ "refarg ::= ON DELETE refact", /* 49 */ "refarg ::= ON UPDATE refact", /* 50 */ "refact ::= SET NULL", /* 51 */ "refact ::= SET DEFAULT", /* 52 */ "refact ::= CASCADE", /* 53 */ "refact ::= RESTRICT", /* 54 */ "refact ::= NO ACTION", /* 55 */ "defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt", /* 56 */ "defer_subclause ::= DEFERRABLE init_deferred_pred_opt", /* 57 */ "init_deferred_pred_opt ::=", /* 58 */ "init_deferred_pred_opt ::= INITIALLY DEFERRED", /* 59 */ "init_deferred_pred_opt ::= INITIALLY IMMEDIATE", /* 60 */ "conslist_opt ::=", /* 61 */ "tconscomma ::= COMMA", /* 62 */ "tcons ::= CONSTRAINT nm", /* 63 */ "tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf", /* 64 */ "tcons ::= UNIQUE LP sortlist RP onconf", /* 65 */ "tcons ::= CHECK LP expr RP onconf", /* 66 */ "tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt", /* 67 */ "defer_subclause_opt ::=", /* 68 */ "onconf ::=", /* 69 */ "onconf ::= ON CONFLICT resolvetype", /* 70 */ "orconf ::=", /* 71 */ "orconf ::= OR resolvetype", /* 72 */ "resolvetype ::= IGNORE", /* 73 */ "resolvetype ::= REPLACE", /* 74 */ "cmd ::= DROP TABLE ifexists fullname", /* 75 */ "ifexists ::= IF EXISTS", /* 76 */ "ifexists ::=", /* 77 */ "cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select", /* 78 */ "cmd ::= DROP VIEW ifexists fullname", /* 79 */ "cmd ::= select", /* 80 */ "select ::= WITH wqlist selectnowith", /* 81 */ "select ::= WITH RECURSIVE wqlist selectnowith", /* 82 */ "select ::= selectnowith", /* 83 */ "selectnowith ::= selectnowith multiselect_op oneselect", /* 84 */ "multiselect_op ::= UNION", /* 85 */ "multiselect_op ::= UNION ALL", /* 86 */ "multiselect_op ::= EXCEPT|INTERSECT", /* 87 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt", /* 88 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt", /* 89 */ "values ::= VALUES LP nexprlist RP", /* 90 */ "values ::= values COMMA LP nexprlist RP", /* 91 */ "distinct ::= DISTINCT", /* 92 */ "distinct ::= ALL", /* 93 */ "distinct ::=", /* 94 */ "sclp ::=", /* 95 */ "selcollist ::= sclp scanpt expr scanpt as", /* 96 */ "selcollist ::= sclp scanpt STAR", /* 97 */ "selcollist ::= sclp scanpt nm DOT STAR", /* 98 */ "as ::= AS nm", /* 99 */ "as ::=", /* 100 */ "from ::=", /* 101 */ "from ::= FROM seltablist", /* 102 */ "stl_prefix ::= seltablist joinop", /* 103 */ "stl_prefix ::=", /* 104 */ "seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt", /* 105 */ "seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt", /* 106 */ "seltablist ::= stl_prefix LP select RP as on_opt using_opt", /* 107 */ "seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt", /* 108 */ "dbnm ::=", /* 109 */ "dbnm ::= DOT nm", /* 110 */ "fullname ::= nm", /* 111 */ "fullname ::= nm DOT nm", /* 112 */ "xfullname ::= nm", /* 113 */ "xfullname ::= nm DOT nm", /* 114 */ "xfullname ::= nm DOT nm AS nm", /* 115 */ "xfullname ::= nm AS nm", /* 116 */ "joinop ::= COMMA|JOIN", /* 117 */ "joinop ::= JOIN_KW JOIN", /* 118 */ "joinop ::= JOIN_KW nm JOIN", /* 119 */ "joinop ::= JOIN_KW nm nm JOIN", /* 120 */ "on_opt ::= ON expr", /* 121 */ "on_opt ::=", /* 122 */ "indexed_opt ::=", /* 123 */ "indexed_opt ::= INDEXED BY nm", /* 124 */ "indexed_opt ::= NOT INDEXED", /* 125 */ "using_opt ::= USING LP idlist RP", /* 126 */ "using_opt ::=", /* 127 */ "orderby_opt ::=", /* 128 */ "orderby_opt ::= ORDER BY sortlist", /* 129 */ "sortlist ::= sortlist COMMA expr sortorder", /* 130 */ "sortlist ::= expr sortorder", /* 131 */ "sortorder ::= ASC", /* 132 */ "sortorder ::= DESC", /* 133 */ "sortorder ::=", /* 134 */ "groupby_opt ::=", /* 135 */ "groupby_opt ::= GROUP BY nexprlist", /* 136 */ "having_opt ::=", /* 137 */ "having_opt ::= HAVING expr", /* 138 */ "limit_opt ::=", /* 139 */ "limit_opt ::= LIMIT expr", /* 140 */ "limit_opt ::= LIMIT expr OFFSET expr", /* 141 */ "limit_opt ::= LIMIT expr COMMA expr", /* 142 */ "cmd ::= with DELETE FROM xfullname indexed_opt where_opt orderby_opt limit_opt", /* 143 */ "where_opt ::=", /* 144 */ "where_opt ::= WHERE expr", /* 145 */ "cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt orderby_opt limit_opt", /* 146 */ "setlist ::= setlist COMMA nm EQ expr", /* 147 */ "setlist ::= setlist COMMA LP idlist RP EQ expr", /* 148 */ "setlist ::= nm EQ expr", /* 149 */ "setlist ::= LP idlist RP EQ expr", /* 150 */ "cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert", /* 151 */ "cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES", /* 152 */ "upsert ::=", /* 153 */ "upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt", /* 154 */ "upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING", /* 155 */ "upsert ::= ON CONFLICT DO NOTHING", /* 156 */ "insert_cmd ::= INSERT orconf", /* 157 */ "insert_cmd ::= REPLACE", /* 158 */ "idlist_opt ::=", /* 159 */ "idlist_opt ::= LP idlist RP", /* 160 */ "idlist ::= idlist COMMA nm", /* 161 */ "idlist ::= nm", /* 162 */ "expr ::= LP expr RP", /* 163 */ "expr ::= ID|INDEXED", /* 164 */ "expr ::= JOIN_KW", /* 165 */ "expr ::= nm DOT nm", /* 166 */ "expr ::= nm DOT nm DOT nm", /* 167 */ "term ::= NULL|FLOAT|BLOB", /* 168 */ "term ::= STRING", /* 169 */ "term ::= INTEGER", /* 170 */ "expr ::= VARIABLE", /* 171 */ "expr ::= expr COLLATE ID|STRING", /* 172 */ "expr ::= CAST LP expr AS typetoken RP", /* 173 */ "expr ::= ID|INDEXED LP distinct exprlist RP", /* 174 */ "expr ::= ID|INDEXED LP STAR RP", /* 175 */ "expr ::= ID|INDEXED LP distinct exprlist RP over_clause", /* 176 */ "expr ::= ID|INDEXED LP STAR RP over_clause", /* 177 */ "term ::= CTIME_KW", /* 178 */ "expr ::= LP nexprlist COMMA expr RP", /* 179 */ "expr ::= expr AND expr", /* 180 */ "expr ::= expr OR expr", /* 181 */ "expr ::= expr LT|GT|GE|LE expr", /* 182 */ "expr ::= expr EQ|NE expr", /* 183 */ "expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr", /* 184 */ "expr ::= expr PLUS|MINUS expr", /* 185 */ "expr ::= expr STAR|SLASH|REM expr", /* 186 */ "expr ::= expr CONCAT expr", /* 187 */ "likeop ::= NOT LIKE_KW|MATCH", /* 188 */ "expr ::= expr likeop expr", /* 189 */ "expr ::= expr likeop expr ESCAPE expr", /* 190 */ "expr ::= expr ISNULL|NOTNULL", /* 191 */ "expr ::= expr NOT NULL", /* 192 */ "expr ::= expr IS expr", /* 193 */ "expr ::= expr IS NOT expr", /* 194 */ "expr ::= NOT expr", /* 195 */ "expr ::= BITNOT expr", /* 196 */ "expr ::= PLUS|MINUS expr", /* 197 */ "between_op ::= BETWEEN", /* 198 */ "between_op ::= NOT BETWEEN", /* 199 */ "expr ::= expr between_op expr AND expr", /* 200 */ "in_op ::= IN", /* 201 */ "in_op ::= NOT IN", /* 202 */ "expr ::= expr in_op LP exprlist RP", /* 203 */ "expr ::= LP select RP", /* 204 */ "expr ::= expr in_op LP select RP", /* 205 */ "expr ::= expr in_op nm dbnm paren_exprlist", /* 206 */ "expr ::= EXISTS LP select RP", /* 207 */ "expr ::= CASE case_operand case_exprlist case_else END", /* 208 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr", /* 209 */ "case_exprlist ::= WHEN expr THEN expr", /* 210 */ "case_else ::= ELSE expr", /* 211 */ "case_else ::=", /* 212 */ "case_operand ::= expr", /* 213 */ "case_operand ::=", /* 214 */ "exprlist ::=", /* 215 */ "nexprlist ::= nexprlist COMMA expr", /* 216 */ "nexprlist ::= expr", /* 217 */ "paren_exprlist ::=", /* 218 */ "paren_exprlist ::= LP exprlist RP", /* 219 */ "cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt", /* 220 */ "uniqueflag ::= UNIQUE", /* 221 */ "uniqueflag ::=", /* 222 */ "eidlist_opt ::=", /* 223 */ "eidlist_opt ::= LP eidlist RP", /* 224 */ "eidlist ::= eidlist COMMA nm collate sortorder", /* 225 */ "eidlist ::= nm collate sortorder", /* 226 */ "collate ::=", /* 227 */ "collate ::= COLLATE ID|STRING", /* 228 */ "cmd ::= DROP INDEX ifexists fullname", /* 229 */ "cmd ::= VACUUM vinto", /* 230 */ "cmd ::= VACUUM nm vinto", /* 231 */ "vinto ::= INTO expr", /* 232 */ "vinto ::=", /* 233 */ "cmd ::= PRAGMA nm dbnm", /* 234 */ "cmd ::= PRAGMA nm dbnm EQ nmnum", /* 235 */ "cmd ::= PRAGMA nm dbnm LP nmnum RP", /* 236 */ "cmd ::= PRAGMA nm dbnm EQ minus_num", /* 237 */ "cmd ::= PRAGMA nm dbnm LP minus_num RP", /* 238 */ "plus_num ::= PLUS INTEGER|FLOAT", /* 239 */ "minus_num ::= MINUS INTEGER|FLOAT", /* 240 */ "cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END", /* 241 */ "trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause", /* 242 */ "trigger_time ::= BEFORE|AFTER", /* 243 */ "trigger_time ::= INSTEAD OF", /* 244 */ "trigger_time ::=", /* 245 */ "trigger_event ::= DELETE|INSERT", /* 246 */ "trigger_event ::= UPDATE", /* 247 */ "trigger_event ::= UPDATE OF idlist", /* 248 */ "when_clause ::=", /* 249 */ "when_clause ::= WHEN expr", /* 250 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI", /* 251 */ "trigger_cmd_list ::= trigger_cmd SEMI", /* 252 */ "trnm ::= nm DOT nm", /* 253 */ "tridxby ::= INDEXED BY nm", /* 254 */ "tridxby ::= NOT INDEXED", /* 255 */ "trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt scanpt", /* 256 */ "trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt", /* 257 */ "trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt", /* 258 */ "trigger_cmd ::= scanpt select scanpt", /* 259 */ "expr ::= RAISE LP IGNORE RP", /* 260 */ "expr ::= RAISE LP raisetype COMMA nm RP", /* 261 */ "raisetype ::= ROLLBACK", /* 262 */ "raisetype ::= ABORT", /* 263 */ "raisetype ::= FAIL", /* 264 */ "cmd ::= DROP TRIGGER ifexists fullname", /* 265 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt", /* 266 */ "cmd ::= DETACH database_kw_opt expr", /* 267 */ "key_opt ::=", /* 268 */ "key_opt ::= KEY expr", /* 269 */ "cmd ::= REINDEX", /* 270 */ "cmd ::= REINDEX nm dbnm", /* 271 */ "cmd ::= ANALYZE", /* 272 */ "cmd ::= ANALYZE nm dbnm", /* 273 */ "cmd ::= ALTER TABLE fullname RENAME TO nm", /* 274 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist", /* 275 */ "add_column_fullname ::= fullname", /* 276 */ "cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm", /* 277 */ "cmd ::= create_vtab", /* 278 */ "cmd ::= create_vtab LP vtabarglist RP", /* 279 */ "create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm", /* 280 */ "vtabarg ::=", /* 281 */ "vtabargtoken ::= ANY", /* 282 */ "vtabargtoken ::= lp anylist RP", /* 283 */ "lp ::= LP", /* 284 */ "with ::= WITH wqlist", /* 285 */ "with ::= WITH RECURSIVE wqlist", /* 286 */ "wqlist ::= nm eidlist_opt AS LP select RP", /* 287 */ "wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP", /* 288 */ "windowdefn_list ::= windowdefn", /* 289 */ "windowdefn_list ::= windowdefn_list COMMA windowdefn", /* 290 */ "windowdefn ::= nm AS window", /* 291 */ "window ::= LP part_opt orderby_opt frame_opt RP", /* 292 */ "part_opt ::= PARTITION BY nexprlist", /* 293 */ "part_opt ::=", /* 294 */ "frame_opt ::=", /* 295 */ "frame_opt ::= range_or_rows frame_bound_s", /* 296 */ "frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e", /* 297 */ "range_or_rows ::= RANGE", /* 298 */ "range_or_rows ::= ROWS", /* 299 */ "frame_bound_s ::= frame_bound", /* 300 */ "frame_bound_s ::= UNBOUNDED PRECEDING", /* 301 */ "frame_bound_e ::= frame_bound", /* 302 */ "frame_bound_e ::= UNBOUNDED FOLLOWING", /* 303 */ "frame_bound ::= expr PRECEDING", /* 304 */ "frame_bound ::= CURRENT ROW", /* 305 */ "frame_bound ::= expr FOLLOWING", /* 306 */ "window_clause ::= WINDOW windowdefn_list", /* 307 */ "over_clause ::= filter_opt OVER window", /* 308 */ "over_clause ::= filter_opt OVER nm", /* 309 */ "filter_opt ::=", /* 310 */ "filter_opt ::= FILTER LP WHERE expr RP", /* 311 */ "input ::= cmdlist", /* 312 */ "cmdlist ::= cmdlist ecmd", /* 313 */ "cmdlist ::= ecmd", /* 314 */ "ecmd ::= SEMI", /* 315 */ "ecmd ::= cmdx SEMI", /* 316 */ "ecmd ::= explain cmdx", /* 317 */ "trans_opt ::=", /* 318 */ "trans_opt ::= TRANSACTION", /* 319 */ "trans_opt ::= TRANSACTION nm", /* 320 */ "savepoint_opt ::= SAVEPOINT", /* 321 */ "savepoint_opt ::=", /* 322 */ "cmd ::= create_table create_table_args", /* 323 */ "columnlist ::= columnlist COMMA columnname carglist", /* 324 */ "columnlist ::= columnname carglist", /* 325 */ "nm ::= ID|INDEXED", /* 326 */ "nm ::= STRING", /* 327 */ "nm ::= JOIN_KW", /* 328 */ "typetoken ::= typename", /* 329 */ "typename ::= ID|STRING", /* 330 */ "signed ::= plus_num", /* 331 */ "signed ::= minus_num", /* 332 */ "carglist ::= carglist ccons", /* 333 */ "carglist ::=", /* 334 */ "ccons ::= NULL onconf", /* 335 */ "conslist_opt ::= COMMA conslist", /* 336 */ "conslist ::= conslist tconscomma tcons", /* 337 */ "conslist ::= tcons", /* 338 */ "tconscomma ::=", /* 339 */ "defer_subclause_opt ::= defer_subclause", /* 340 */ "resolvetype ::= raisetype", /* 341 */ "selectnowith ::= oneselect", /* 342 */ "oneselect ::= values", /* 343 */ "sclp ::= selcollist COMMA", /* 344 */ "as ::= ID|STRING", /* 345 */ "expr ::= term", /* 346 */ "likeop ::= LIKE_KW|MATCH", /* 347 */ "exprlist ::= nexprlist", /* 348 */ "nmnum ::= plus_num", /* 349 */ "nmnum ::= nm", /* 350 */ "nmnum ::= ON", /* 351 */ "nmnum ::= DELETE", /* 352 */ "nmnum ::= DEFAULT", /* 353 */ "plus_num ::= INTEGER|FLOAT", /* 354 */ "foreach_clause ::=", /* 355 */ "foreach_clause ::= FOR EACH ROW", /* 356 */ "trnm ::= nm", /* 357 */ "tridxby ::=", /* 358 */ "database_kw_opt ::= DATABASE", /* 359 */ "database_kw_opt ::=", /* 360 */ "kwcolumn_opt ::=", /* 361 */ "kwcolumn_opt ::= COLUMNKW", /* 362 */ "vtabarglist ::= vtabarg", /* 363 */ "vtabarglist ::= vtabarglist COMMA vtabarg", /* 364 */ "vtabarg ::= vtabarg vtabargtoken", /* 365 */ "anylist ::=", /* 366 */ "anylist ::= anylist LP anylist RP", /* 367 */ "anylist ::= anylist ANY", /* 368 */ "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 174: /* select */ case 206: /* selectnowith */ case 207: /* oneselect */ case 219: /* values */ { #line 445 "parse.y" sqlite3SelectDelete(pParse->db, (yypminor->yy423)); #line 1911 "parse.c" } break; case 184: /* term */ case 185: /* expr */ case 213: /* where_opt */ case 215: /* having_opt */ case 227: /* on_opt */ case 242: /* case_operand */ case 244: /* case_else */ case 247: /* vinto */ case 254: /* when_clause */ case 259: /* key_opt */ case 273: /* filter_opt */ { #line 935 "parse.y" sqlite3ExprDelete(pParse->db, (yypminor->yy490)); #line 1928 "parse.c" } break; case 189: /* eidlist_opt */ case 198: /* sortlist */ case 199: /* eidlist */ case 211: /* selcollist */ case 214: /* groupby_opt */ case 216: /* orderby_opt */ case 220: /* nexprlist */ case 221: /* sclp */ case 229: /* exprlist */ case 233: /* setlist */ case 241: /* paren_exprlist */ case 243: /* case_exprlist */ case 272: /* part_opt */ { #line 1326 "parse.y" sqlite3ExprListDelete(pParse->db, (yypminor->yy42)); #line 1947 "parse.c" } break; case 205: /* fullname */ case 212: /* from */ case 223: /* seltablist */ case 224: /* stl_prefix */ case 230: /* xfullname */ { #line 691 "parse.y" sqlite3SrcListDelete(pParse->db, (yypminor->yy167)); #line 1958 "parse.c" } break; case 208: /* wqlist */ { #line 1609 "parse.y" sqlite3WithDelete(pParse->db, (yypminor->yy499)); #line 1965 "parse.c" } break; case 218: /* window_clause */ case 268: /* windowdefn_list */ { #line 1705 "parse.y" sqlite3WindowListDelete(pParse->db, (yypminor->yy147)); #line 1973 "parse.c" } break; case 228: /* using_opt */ case 231: /* idlist */ case 235: /* idlist_opt */ { #line 763 "parse.y" sqlite3IdListDelete(pParse->db, (yypminor->yy336)); #line 1982 "parse.c" } break; case 237: /* over_clause */ case 269: /* windowdefn */ case 270: /* window */ case 271: /* frame_opt */ { #line 1709 "parse.y" sqlite3WindowDelete(pParse->db, (yypminor->yy147)); #line 1992 "parse.c" } break; case 250: /* trigger_cmd_list */ case 255: /* trigger_cmd */ { #line 1443 "parse.y" sqlite3DeleteTriggerStep(pParse->db, (yypminor->yy119)); #line 2000 "parse.c" } break; case 252: /* trigger_event */ { #line 1429 "parse.y" sqlite3IdListDelete(pParse->db, (yypminor->yy350).b); #line 2007 "parse.c" } break; case 275: /* frame_bound */ case 276: /* frame_bound_s */ case 277: /* frame_bound_e */ { #line 1664 "parse.y" sqlite3ExprDelete(pParse->db, (yypminor->yy317).pExpr); #line 2016 "parse.c" } break; /********* End destructor definitions *****************************************/ default: break; /* If no destructor action specified: do nothing */ } } /* ** Pop the parser's stack once. ** ** If there is a destructor routine associated with the token which ** is popped from the stack, then call it. */ static void yy_pop_parser_stack(yyParser *pParser){ yyStackEntry *yytos; assert( pParser->yytos!=0 ); assert( pParser->yytos > pParser->yystack ); yytos = pParser->yytos--; #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE,"%sPopping %s\n", yyTracePrompt, yyTokenName[yytos->major]); } #endif yy_destructor(pParser, yytos->major, &yytos->minor); } /* ** Clear all secondary memory allocations from the parser */ 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; statenoYY_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+YYNTOKEN<=(int)YY_NLOOKAHEAD ); */ assert( iLookAhead!=YYNOCODE ); assert( iLookAhead < YYNTOKEN ); i += iLookAhead; if( i>=YY_NLOOKAHEAD || yy_lookahead[i]!=iLookAhead ){ #ifdef YYFALLBACK YYCODETYPE iFallback; /* Fallback token */ if( iLookAhead %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; if( #if YY_SHIFT_MIN+YYWILDCARD<0 j>=0 && #endif #if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT j0 ){ #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n", yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[YYWILDCARD]); } #endif /* NDEBUG */ return yy_action[j]; } } #endif /* YYWILDCARD */ return yy_default[stateno]; }else{ return yy_action[i]; } }while(1); } /* ** Find the appropriate action for a parser given the non-terminal ** look-ahead token iLookAhead. */ static YYACTIONTYPE yy_find_reduce_action( YYACTIONTYPE stateno, /* Current state number */ YYCODETYPE iLookAhead /* The look-ahead token */ ){ int i; #ifdef YYERRORSYMBOL if( stateno>YY_REDUCE_COUNT ){ return yy_default[stateno]; } #else assert( stateno<=YY_REDUCE_COUNT ); #endif i = yy_reduce_ofst[stateno]; assert( iLookAhead!=YYNOCODE ); i += iLookAhead; #ifdef YYERRORSYMBOL if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){ return yy_default[stateno]; } #else assert( i>=0 && iyytos>yypParser->yystack ) yy_pop_parser_stack(yypParser); /* Here code is inserted which will execute if the parser ** stack every overflows */ /******** Begin %stack_overflow code ******************************************/ #line 41 "parse.y" sqlite3ErrorMsg(pParse, "parser stack overflow"); #line 2241 "parse.c" /******** 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( yyNewStateyytos->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[] = { 159, /* (0) explain ::= EXPLAIN */ 159, /* (1) explain ::= EXPLAIN QUERY PLAN */ 158, /* (2) cmdx ::= cmd */ 160, /* (3) cmd ::= BEGIN transtype trans_opt */ 161, /* (4) transtype ::= */ 161, /* (5) transtype ::= DEFERRED */ 161, /* (6) transtype ::= IMMEDIATE */ 161, /* (7) transtype ::= EXCLUSIVE */ 160, /* (8) cmd ::= COMMIT|END trans_opt */ 160, /* (9) cmd ::= ROLLBACK trans_opt */ 160, /* (10) cmd ::= SAVEPOINT nm */ 160, /* (11) cmd ::= RELEASE savepoint_opt nm */ 160, /* (12) cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */ 165, /* (13) create_table ::= createkw temp TABLE ifnotexists nm dbnm */ 167, /* (14) createkw ::= CREATE */ 169, /* (15) ifnotexists ::= */ 169, /* (16) ifnotexists ::= IF NOT EXISTS */ 168, /* (17) temp ::= TEMP */ 168, /* (18) temp ::= */ 166, /* (19) create_table_args ::= LP columnlist conslist_opt RP table_options */ 166, /* (20) create_table_args ::= AS select */ 173, /* (21) table_options ::= */ 173, /* (22) table_options ::= WITHOUT nm */ 175, /* (23) columnname ::= nm typetoken */ 177, /* (24) typetoken ::= */ 177, /* (25) typetoken ::= typename LP signed RP */ 177, /* (26) typetoken ::= typename LP signed COMMA signed RP */ 178, /* (27) typename ::= typename ID|STRING */ 182, /* (28) scanpt ::= */ 183, /* (29) ccons ::= CONSTRAINT nm */ 183, /* (30) ccons ::= DEFAULT scanpt term scanpt */ 183, /* (31) ccons ::= DEFAULT LP expr RP */ 183, /* (32) ccons ::= DEFAULT PLUS term scanpt */ 183, /* (33) ccons ::= DEFAULT MINUS term scanpt */ 183, /* (34) ccons ::= DEFAULT scanpt ID|INDEXED */ 183, /* (35) ccons ::= NOT NULL onconf */ 183, /* (36) ccons ::= PRIMARY KEY sortorder onconf autoinc */ 183, /* (37) ccons ::= UNIQUE onconf */ 183, /* (38) ccons ::= CHECK LP expr RP */ 183, /* (39) ccons ::= REFERENCES nm eidlist_opt refargs */ 183, /* (40) ccons ::= defer_subclause */ 183, /* (41) ccons ::= COLLATE ID|STRING */ 188, /* (42) autoinc ::= */ 188, /* (43) autoinc ::= AUTOINCR */ 190, /* (44) refargs ::= */ 190, /* (45) refargs ::= refargs refarg */ 192, /* (46) refarg ::= MATCH nm */ 192, /* (47) refarg ::= ON INSERT refact */ 192, /* (48) refarg ::= ON DELETE refact */ 192, /* (49) refarg ::= ON UPDATE refact */ 193, /* (50) refact ::= SET NULL */ 193, /* (51) refact ::= SET DEFAULT */ 193, /* (52) refact ::= CASCADE */ 193, /* (53) refact ::= RESTRICT */ 193, /* (54) refact ::= NO ACTION */ 191, /* (55) defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */ 191, /* (56) defer_subclause ::= DEFERRABLE init_deferred_pred_opt */ 194, /* (57) init_deferred_pred_opt ::= */ 194, /* (58) init_deferred_pred_opt ::= INITIALLY DEFERRED */ 194, /* (59) init_deferred_pred_opt ::= INITIALLY IMMEDIATE */ 172, /* (60) conslist_opt ::= */ 196, /* (61) tconscomma ::= COMMA */ 197, /* (62) tcons ::= CONSTRAINT nm */ 197, /* (63) tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */ 197, /* (64) tcons ::= UNIQUE LP sortlist RP onconf */ 197, /* (65) tcons ::= CHECK LP expr RP onconf */ 197, /* (66) tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */ 200, /* (67) defer_subclause_opt ::= */ 186, /* (68) onconf ::= */ 186, /* (69) onconf ::= ON CONFLICT resolvetype */ 201, /* (70) orconf ::= */ 201, /* (71) orconf ::= OR resolvetype */ 202, /* (72) resolvetype ::= IGNORE */ 202, /* (73) resolvetype ::= REPLACE */ 160, /* (74) cmd ::= DROP TABLE ifexists fullname */ 204, /* (75) ifexists ::= IF EXISTS */ 204, /* (76) ifexists ::= */ 160, /* (77) cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */ 160, /* (78) cmd ::= DROP VIEW ifexists fullname */ 160, /* (79) cmd ::= select */ 174, /* (80) select ::= WITH wqlist selectnowith */ 174, /* (81) select ::= WITH RECURSIVE wqlist selectnowith */ 174, /* (82) select ::= selectnowith */ 206, /* (83) selectnowith ::= selectnowith multiselect_op oneselect */ 209, /* (84) multiselect_op ::= UNION */ 209, /* (85) multiselect_op ::= UNION ALL */ 209, /* (86) multiselect_op ::= EXCEPT|INTERSECT */ 207, /* (87) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */ 207, /* (88) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */ 219, /* (89) values ::= VALUES LP nexprlist RP */ 219, /* (90) values ::= values COMMA LP nexprlist RP */ 210, /* (91) distinct ::= DISTINCT */ 210, /* (92) distinct ::= ALL */ 210, /* (93) distinct ::= */ 221, /* (94) sclp ::= */ 211, /* (95) selcollist ::= sclp scanpt expr scanpt as */ 211, /* (96) selcollist ::= sclp scanpt STAR */ 211, /* (97) selcollist ::= sclp scanpt nm DOT STAR */ 222, /* (98) as ::= AS nm */ 222, /* (99) as ::= */ 212, /* (100) from ::= */ 212, /* (101) from ::= FROM seltablist */ 224, /* (102) stl_prefix ::= seltablist joinop */ 224, /* (103) stl_prefix ::= */ 223, /* (104) seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */ 223, /* (105) seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt */ 223, /* (106) seltablist ::= stl_prefix LP select RP as on_opt using_opt */ 223, /* (107) seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */ 170, /* (108) dbnm ::= */ 170, /* (109) dbnm ::= DOT nm */ 205, /* (110) fullname ::= nm */ 205, /* (111) fullname ::= nm DOT nm */ 230, /* (112) xfullname ::= nm */ 230, /* (113) xfullname ::= nm DOT nm */ 230, /* (114) xfullname ::= nm DOT nm AS nm */ 230, /* (115) xfullname ::= nm AS nm */ 225, /* (116) joinop ::= COMMA|JOIN */ 225, /* (117) joinop ::= JOIN_KW JOIN */ 225, /* (118) joinop ::= JOIN_KW nm JOIN */ 225, /* (119) joinop ::= JOIN_KW nm nm JOIN */ 227, /* (120) on_opt ::= ON expr */ 227, /* (121) on_opt ::= */ 226, /* (122) indexed_opt ::= */ 226, /* (123) indexed_opt ::= INDEXED BY nm */ 226, /* (124) indexed_opt ::= NOT INDEXED */ 228, /* (125) using_opt ::= USING LP idlist RP */ 228, /* (126) using_opt ::= */ 216, /* (127) orderby_opt ::= */ 216, /* (128) orderby_opt ::= ORDER BY sortlist */ 198, /* (129) sortlist ::= sortlist COMMA expr sortorder */ 198, /* (130) sortlist ::= expr sortorder */ 187, /* (131) sortorder ::= ASC */ 187, /* (132) sortorder ::= DESC */ 187, /* (133) sortorder ::= */ 214, /* (134) groupby_opt ::= */ 214, /* (135) groupby_opt ::= GROUP BY nexprlist */ 215, /* (136) having_opt ::= */ 215, /* (137) having_opt ::= HAVING expr */ 217, /* (138) limit_opt ::= */ 217, /* (139) limit_opt ::= LIMIT expr */ 217, /* (140) limit_opt ::= LIMIT expr OFFSET expr */ 217, /* (141) limit_opt ::= LIMIT expr COMMA expr */ 160, /* (142) cmd ::= with DELETE FROM xfullname indexed_opt where_opt orderby_opt limit_opt */ 213, /* (143) where_opt ::= */ 213, /* (144) where_opt ::= WHERE expr */ 160, /* (145) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt orderby_opt limit_opt */ 233, /* (146) setlist ::= setlist COMMA nm EQ expr */ 233, /* (147) setlist ::= setlist COMMA LP idlist RP EQ expr */ 233, /* (148) setlist ::= nm EQ expr */ 233, /* (149) setlist ::= LP idlist RP EQ expr */ 160, /* (150) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */ 160, /* (151) cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES */ 236, /* (152) upsert ::= */ 236, /* (153) upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt */ 236, /* (154) upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING */ 236, /* (155) upsert ::= ON CONFLICT DO NOTHING */ 234, /* (156) insert_cmd ::= INSERT orconf */ 234, /* (157) insert_cmd ::= REPLACE */ 235, /* (158) idlist_opt ::= */ 235, /* (159) idlist_opt ::= LP idlist RP */ 231, /* (160) idlist ::= idlist COMMA nm */ 231, /* (161) idlist ::= nm */ 185, /* (162) expr ::= LP expr RP */ 185, /* (163) expr ::= ID|INDEXED */ 185, /* (164) expr ::= JOIN_KW */ 185, /* (165) expr ::= nm DOT nm */ 185, /* (166) expr ::= nm DOT nm DOT nm */ 184, /* (167) term ::= NULL|FLOAT|BLOB */ 184, /* (168) term ::= STRING */ 184, /* (169) term ::= INTEGER */ 185, /* (170) expr ::= VARIABLE */ 185, /* (171) expr ::= expr COLLATE ID|STRING */ 185, /* (172) expr ::= CAST LP expr AS typetoken RP */ 185, /* (173) expr ::= ID|INDEXED LP distinct exprlist RP */ 185, /* (174) expr ::= ID|INDEXED LP STAR RP */ 185, /* (175) expr ::= ID|INDEXED LP distinct exprlist RP over_clause */ 185, /* (176) expr ::= ID|INDEXED LP STAR RP over_clause */ 184, /* (177) term ::= CTIME_KW */ 185, /* (178) expr ::= LP nexprlist COMMA expr RP */ 185, /* (179) expr ::= expr AND expr */ 185, /* (180) expr ::= expr OR expr */ 185, /* (181) expr ::= expr LT|GT|GE|LE expr */ 185, /* (182) expr ::= expr EQ|NE expr */ 185, /* (183) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ 185, /* (184) expr ::= expr PLUS|MINUS expr */ 185, /* (185) expr ::= expr STAR|SLASH|REM expr */ 185, /* (186) expr ::= expr CONCAT expr */ 238, /* (187) likeop ::= NOT LIKE_KW|MATCH */ 185, /* (188) expr ::= expr likeop expr */ 185, /* (189) expr ::= expr likeop expr ESCAPE expr */ 185, /* (190) expr ::= expr ISNULL|NOTNULL */ 185, /* (191) expr ::= expr NOT NULL */ 185, /* (192) expr ::= expr IS expr */ 185, /* (193) expr ::= expr IS NOT expr */ 185, /* (194) expr ::= NOT expr */ 185, /* (195) expr ::= BITNOT expr */ 185, /* (196) expr ::= PLUS|MINUS expr */ 239, /* (197) between_op ::= BETWEEN */ 239, /* (198) between_op ::= NOT BETWEEN */ 185, /* (199) expr ::= expr between_op expr AND expr */ 240, /* (200) in_op ::= IN */ 240, /* (201) in_op ::= NOT IN */ 185, /* (202) expr ::= expr in_op LP exprlist RP */ 185, /* (203) expr ::= LP select RP */ 185, /* (204) expr ::= expr in_op LP select RP */ 185, /* (205) expr ::= expr in_op nm dbnm paren_exprlist */ 185, /* (206) expr ::= EXISTS LP select RP */ 185, /* (207) expr ::= CASE case_operand case_exprlist case_else END */ 243, /* (208) case_exprlist ::= case_exprlist WHEN expr THEN expr */ 243, /* (209) case_exprlist ::= WHEN expr THEN expr */ 244, /* (210) case_else ::= ELSE expr */ 244, /* (211) case_else ::= */ 242, /* (212) case_operand ::= expr */ 242, /* (213) case_operand ::= */ 229, /* (214) exprlist ::= */ 220, /* (215) nexprlist ::= nexprlist COMMA expr */ 220, /* (216) nexprlist ::= expr */ 241, /* (217) paren_exprlist ::= */ 241, /* (218) paren_exprlist ::= LP exprlist RP */ 160, /* (219) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */ 245, /* (220) uniqueflag ::= UNIQUE */ 245, /* (221) uniqueflag ::= */ 189, /* (222) eidlist_opt ::= */ 189, /* (223) eidlist_opt ::= LP eidlist RP */ 199, /* (224) eidlist ::= eidlist COMMA nm collate sortorder */ 199, /* (225) eidlist ::= nm collate sortorder */ 246, /* (226) collate ::= */ 246, /* (227) collate ::= COLLATE ID|STRING */ 160, /* (228) cmd ::= DROP INDEX ifexists fullname */ 160, /* (229) cmd ::= VACUUM vinto */ 160, /* (230) cmd ::= VACUUM nm vinto */ 247, /* (231) vinto ::= INTO expr */ 247, /* (232) vinto ::= */ 160, /* (233) cmd ::= PRAGMA nm dbnm */ 160, /* (234) cmd ::= PRAGMA nm dbnm EQ nmnum */ 160, /* (235) cmd ::= PRAGMA nm dbnm LP nmnum RP */ 160, /* (236) cmd ::= PRAGMA nm dbnm EQ minus_num */ 160, /* (237) cmd ::= PRAGMA nm dbnm LP minus_num RP */ 180, /* (238) plus_num ::= PLUS INTEGER|FLOAT */ 181, /* (239) minus_num ::= MINUS INTEGER|FLOAT */ 160, /* (240) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */ 249, /* (241) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */ 251, /* (242) trigger_time ::= BEFORE|AFTER */ 251, /* (243) trigger_time ::= INSTEAD OF */ 251, /* (244) trigger_time ::= */ 252, /* (245) trigger_event ::= DELETE|INSERT */ 252, /* (246) trigger_event ::= UPDATE */ 252, /* (247) trigger_event ::= UPDATE OF idlist */ 254, /* (248) when_clause ::= */ 254, /* (249) when_clause ::= WHEN expr */ 250, /* (250) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */ 250, /* (251) trigger_cmd_list ::= trigger_cmd SEMI */ 256, /* (252) trnm ::= nm DOT nm */ 257, /* (253) tridxby ::= INDEXED BY nm */ 257, /* (254) tridxby ::= NOT INDEXED */ 255, /* (255) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt scanpt */ 255, /* (256) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */ 255, /* (257) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */ 255, /* (258) trigger_cmd ::= scanpt select scanpt */ 185, /* (259) expr ::= RAISE LP IGNORE RP */ 185, /* (260) expr ::= RAISE LP raisetype COMMA nm RP */ 203, /* (261) raisetype ::= ROLLBACK */ 203, /* (262) raisetype ::= ABORT */ 203, /* (263) raisetype ::= FAIL */ 160, /* (264) cmd ::= DROP TRIGGER ifexists fullname */ 160, /* (265) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */ 160, /* (266) cmd ::= DETACH database_kw_opt expr */ 259, /* (267) key_opt ::= */ 259, /* (268) key_opt ::= KEY expr */ 160, /* (269) cmd ::= REINDEX */ 160, /* (270) cmd ::= REINDEX nm dbnm */ 160, /* (271) cmd ::= ANALYZE */ 160, /* (272) cmd ::= ANALYZE nm dbnm */ 160, /* (273) cmd ::= ALTER TABLE fullname RENAME TO nm */ 160, /* (274) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */ 260, /* (275) add_column_fullname ::= fullname */ 160, /* (276) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */ 160, /* (277) cmd ::= create_vtab */ 160, /* (278) cmd ::= create_vtab LP vtabarglist RP */ 262, /* (279) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */ 264, /* (280) vtabarg ::= */ 265, /* (281) vtabargtoken ::= ANY */ 265, /* (282) vtabargtoken ::= lp anylist RP */ 266, /* (283) lp ::= LP */ 232, /* (284) with ::= WITH wqlist */ 232, /* (285) with ::= WITH RECURSIVE wqlist */ 208, /* (286) wqlist ::= nm eidlist_opt AS LP select RP */ 208, /* (287) wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */ 268, /* (288) windowdefn_list ::= windowdefn */ 268, /* (289) windowdefn_list ::= windowdefn_list COMMA windowdefn */ 269, /* (290) windowdefn ::= nm AS window */ 270, /* (291) window ::= LP part_opt orderby_opt frame_opt RP */ 272, /* (292) part_opt ::= PARTITION BY nexprlist */ 272, /* (293) part_opt ::= */ 271, /* (294) frame_opt ::= */ 271, /* (295) frame_opt ::= range_or_rows frame_bound_s */ 271, /* (296) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e */ 274, /* (297) range_or_rows ::= RANGE */ 274, /* (298) range_or_rows ::= ROWS */ 276, /* (299) frame_bound_s ::= frame_bound */ 276, /* (300) frame_bound_s ::= UNBOUNDED PRECEDING */ 277, /* (301) frame_bound_e ::= frame_bound */ 277, /* (302) frame_bound_e ::= UNBOUNDED FOLLOWING */ 275, /* (303) frame_bound ::= expr PRECEDING */ 275, /* (304) frame_bound ::= CURRENT ROW */ 275, /* (305) frame_bound ::= expr FOLLOWING */ 218, /* (306) window_clause ::= WINDOW windowdefn_list */ 237, /* (307) over_clause ::= filter_opt OVER window */ 237, /* (308) over_clause ::= filter_opt OVER nm */ 273, /* (309) filter_opt ::= */ 273, /* (310) filter_opt ::= FILTER LP WHERE expr RP */ 155, /* (311) input ::= cmdlist */ 156, /* (312) cmdlist ::= cmdlist ecmd */ 156, /* (313) cmdlist ::= ecmd */ 157, /* (314) ecmd ::= SEMI */ 157, /* (315) ecmd ::= cmdx SEMI */ 157, /* (316) ecmd ::= explain cmdx */ 162, /* (317) trans_opt ::= */ 162, /* (318) trans_opt ::= TRANSACTION */ 162, /* (319) trans_opt ::= TRANSACTION nm */ 164, /* (320) savepoint_opt ::= SAVEPOINT */ 164, /* (321) savepoint_opt ::= */ 160, /* (322) cmd ::= create_table create_table_args */ 171, /* (323) columnlist ::= columnlist COMMA columnname carglist */ 171, /* (324) columnlist ::= columnname carglist */ 163, /* (325) nm ::= ID|INDEXED */ 163, /* (326) nm ::= STRING */ 163, /* (327) nm ::= JOIN_KW */ 177, /* (328) typetoken ::= typename */ 178, /* (329) typename ::= ID|STRING */ 179, /* (330) signed ::= plus_num */ 179, /* (331) signed ::= minus_num */ 176, /* (332) carglist ::= carglist ccons */ 176, /* (333) carglist ::= */ 183, /* (334) ccons ::= NULL onconf */ 172, /* (335) conslist_opt ::= COMMA conslist */ 195, /* (336) conslist ::= conslist tconscomma tcons */ 195, /* (337) conslist ::= tcons */ 196, /* (338) tconscomma ::= */ 200, /* (339) defer_subclause_opt ::= defer_subclause */ 202, /* (340) resolvetype ::= raisetype */ 206, /* (341) selectnowith ::= oneselect */ 207, /* (342) oneselect ::= values */ 221, /* (343) sclp ::= selcollist COMMA */ 222, /* (344) as ::= ID|STRING */ 185, /* (345) expr ::= term */ 238, /* (346) likeop ::= LIKE_KW|MATCH */ 229, /* (347) exprlist ::= nexprlist */ 248, /* (348) nmnum ::= plus_num */ 248, /* (349) nmnum ::= nm */ 248, /* (350) nmnum ::= ON */ 248, /* (351) nmnum ::= DELETE */ 248, /* (352) nmnum ::= DEFAULT */ 180, /* (353) plus_num ::= INTEGER|FLOAT */ 253, /* (354) foreach_clause ::= */ 253, /* (355) foreach_clause ::= FOR EACH ROW */ 256, /* (356) trnm ::= nm */ 257, /* (357) tridxby ::= */ 258, /* (358) database_kw_opt ::= DATABASE */ 258, /* (359) database_kw_opt ::= */ 261, /* (360) kwcolumn_opt ::= */ 261, /* (361) kwcolumn_opt ::= COLUMNKW */ 263, /* (362) vtabarglist ::= vtabarg */ 263, /* (363) vtabarglist ::= vtabarglist COMMA vtabarg */ 264, /* (364) vtabarg ::= vtabarg vtabargtoken */ 267, /* (365) anylist ::= */ 267, /* (366) anylist ::= anylist LP anylist RP */ 267, /* (367) anylist ::= anylist ANY */ 232, /* (368) 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 ::= */ -2, /* (29) ccons ::= CONSTRAINT nm */ -4, /* (30) ccons ::= DEFAULT scanpt term scanpt */ -4, /* (31) ccons ::= DEFAULT LP expr RP */ -4, /* (32) ccons ::= DEFAULT PLUS term scanpt */ -4, /* (33) ccons ::= DEFAULT MINUS term scanpt */ -3, /* (34) ccons ::= DEFAULT scanpt ID|INDEXED */ -3, /* (35) ccons ::= NOT NULL onconf */ -5, /* (36) ccons ::= PRIMARY KEY sortorder onconf autoinc */ -2, /* (37) ccons ::= UNIQUE onconf */ -4, /* (38) ccons ::= CHECK LP expr RP */ -4, /* (39) ccons ::= REFERENCES nm eidlist_opt refargs */ -1, /* (40) ccons ::= defer_subclause */ -2, /* (41) ccons ::= COLLATE ID|STRING */ 0, /* (42) autoinc ::= */ -1, /* (43) autoinc ::= AUTOINCR */ 0, /* (44) refargs ::= */ -2, /* (45) refargs ::= refargs refarg */ -2, /* (46) refarg ::= MATCH nm */ -3, /* (47) refarg ::= ON INSERT refact */ -3, /* (48) refarg ::= ON DELETE refact */ -3, /* (49) refarg ::= ON UPDATE refact */ -2, /* (50) refact ::= SET NULL */ -2, /* (51) refact ::= SET DEFAULT */ -1, /* (52) refact ::= CASCADE */ -1, /* (53) refact ::= RESTRICT */ -2, /* (54) refact ::= NO ACTION */ -3, /* (55) defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */ -2, /* (56) defer_subclause ::= DEFERRABLE init_deferred_pred_opt */ 0, /* (57) init_deferred_pred_opt ::= */ -2, /* (58) init_deferred_pred_opt ::= INITIALLY DEFERRED */ -2, /* (59) init_deferred_pred_opt ::= INITIALLY IMMEDIATE */ 0, /* (60) conslist_opt ::= */ -1, /* (61) tconscomma ::= COMMA */ -2, /* (62) tcons ::= CONSTRAINT nm */ -7, /* (63) tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */ -5, /* (64) tcons ::= UNIQUE LP sortlist RP onconf */ -5, /* (65) tcons ::= CHECK LP expr RP onconf */ -10, /* (66) tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */ 0, /* (67) defer_subclause_opt ::= */ 0, /* (68) onconf ::= */ -3, /* (69) onconf ::= ON CONFLICT resolvetype */ 0, /* (70) orconf ::= */ -2, /* (71) orconf ::= OR resolvetype */ -1, /* (72) resolvetype ::= IGNORE */ -1, /* (73) resolvetype ::= REPLACE */ -4, /* (74) cmd ::= DROP TABLE ifexists fullname */ -2, /* (75) ifexists ::= IF EXISTS */ 0, /* (76) ifexists ::= */ -9, /* (77) cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */ -4, /* (78) cmd ::= DROP VIEW ifexists fullname */ -1, /* (79) cmd ::= select */ -3, /* (80) select ::= WITH wqlist selectnowith */ -4, /* (81) select ::= WITH RECURSIVE wqlist selectnowith */ -1, /* (82) select ::= selectnowith */ -3, /* (83) selectnowith ::= selectnowith multiselect_op oneselect */ -1, /* (84) multiselect_op ::= UNION */ -2, /* (85) multiselect_op ::= UNION ALL */ -1, /* (86) multiselect_op ::= EXCEPT|INTERSECT */ -9, /* (87) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */ -10, /* (88) oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */ -4, /* (89) values ::= VALUES LP nexprlist RP */ -5, /* (90) values ::= values COMMA LP nexprlist RP */ -1, /* (91) distinct ::= DISTINCT */ -1, /* (92) distinct ::= ALL */ 0, /* (93) distinct ::= */ 0, /* (94) sclp ::= */ -5, /* (95) selcollist ::= sclp scanpt expr scanpt as */ -3, /* (96) selcollist ::= sclp scanpt STAR */ -5, /* (97) selcollist ::= sclp scanpt nm DOT STAR */ -2, /* (98) as ::= AS nm */ 0, /* (99) as ::= */ 0, /* (100) from ::= */ -2, /* (101) from ::= FROM seltablist */ -2, /* (102) stl_prefix ::= seltablist joinop */ 0, /* (103) stl_prefix ::= */ -7, /* (104) seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */ -9, /* (105) seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt */ -7, /* (106) seltablist ::= stl_prefix LP select RP as on_opt using_opt */ -7, /* (107) seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */ 0, /* (108) dbnm ::= */ -2, /* (109) dbnm ::= DOT nm */ -1, /* (110) fullname ::= nm */ -3, /* (111) fullname ::= nm DOT nm */ -1, /* (112) xfullname ::= nm */ -3, /* (113) xfullname ::= nm DOT nm */ -5, /* (114) xfullname ::= nm DOT nm AS nm */ -3, /* (115) xfullname ::= nm AS nm */ -1, /* (116) joinop ::= COMMA|JOIN */ -2, /* (117) joinop ::= JOIN_KW JOIN */ -3, /* (118) joinop ::= JOIN_KW nm JOIN */ -4, /* (119) joinop ::= JOIN_KW nm nm JOIN */ -2, /* (120) on_opt ::= ON expr */ 0, /* (121) on_opt ::= */ 0, /* (122) indexed_opt ::= */ -3, /* (123) indexed_opt ::= INDEXED BY nm */ -2, /* (124) indexed_opt ::= NOT INDEXED */ -4, /* (125) using_opt ::= USING LP idlist RP */ 0, /* (126) using_opt ::= */ 0, /* (127) orderby_opt ::= */ -3, /* (128) orderby_opt ::= ORDER BY sortlist */ -4, /* (129) sortlist ::= sortlist COMMA expr sortorder */ -2, /* (130) sortlist ::= expr sortorder */ -1, /* (131) sortorder ::= ASC */ -1, /* (132) sortorder ::= DESC */ 0, /* (133) sortorder ::= */ 0, /* (134) groupby_opt ::= */ -3, /* (135) groupby_opt ::= GROUP BY nexprlist */ 0, /* (136) having_opt ::= */ -2, /* (137) having_opt ::= HAVING expr */ 0, /* (138) limit_opt ::= */ -2, /* (139) limit_opt ::= LIMIT expr */ -4, /* (140) limit_opt ::= LIMIT expr OFFSET expr */ -4, /* (141) limit_opt ::= LIMIT expr COMMA expr */ -8, /* (142) cmd ::= with DELETE FROM xfullname indexed_opt where_opt orderby_opt limit_opt */ 0, /* (143) where_opt ::= */ -2, /* (144) where_opt ::= WHERE expr */ -10, /* (145) cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt orderby_opt limit_opt */ -5, /* (146) setlist ::= setlist COMMA nm EQ expr */ -7, /* (147) setlist ::= setlist COMMA LP idlist RP EQ expr */ -3, /* (148) setlist ::= nm EQ expr */ -5, /* (149) setlist ::= LP idlist RP EQ expr */ -7, /* (150) cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */ -7, /* (151) cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES */ 0, /* (152) upsert ::= */ -11, /* (153) upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt */ -8, /* (154) upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING */ -4, /* (155) upsert ::= ON CONFLICT DO NOTHING */ -2, /* (156) insert_cmd ::= INSERT orconf */ -1, /* (157) insert_cmd ::= REPLACE */ 0, /* (158) idlist_opt ::= */ -3, /* (159) idlist_opt ::= LP idlist RP */ -3, /* (160) idlist ::= idlist COMMA nm */ -1, /* (161) idlist ::= nm */ -3, /* (162) expr ::= LP expr RP */ -1, /* (163) expr ::= ID|INDEXED */ -1, /* (164) expr ::= JOIN_KW */ -3, /* (165) expr ::= nm DOT nm */ -5, /* (166) expr ::= nm DOT nm DOT nm */ -1, /* (167) term ::= NULL|FLOAT|BLOB */ -1, /* (168) term ::= STRING */ -1, /* (169) term ::= INTEGER */ -1, /* (170) expr ::= VARIABLE */ -3, /* (171) expr ::= expr COLLATE ID|STRING */ -6, /* (172) expr ::= CAST LP expr AS typetoken RP */ -5, /* (173) expr ::= ID|INDEXED LP distinct exprlist RP */ -4, /* (174) expr ::= ID|INDEXED LP STAR RP */ -6, /* (175) expr ::= ID|INDEXED LP distinct exprlist RP over_clause */ -5, /* (176) expr ::= ID|INDEXED LP STAR RP over_clause */ -1, /* (177) term ::= CTIME_KW */ -5, /* (178) expr ::= LP nexprlist COMMA expr RP */ -3, /* (179) expr ::= expr AND expr */ -3, /* (180) expr ::= expr OR expr */ -3, /* (181) expr ::= expr LT|GT|GE|LE expr */ -3, /* (182) expr ::= expr EQ|NE expr */ -3, /* (183) expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ -3, /* (184) expr ::= expr PLUS|MINUS expr */ -3, /* (185) expr ::= expr STAR|SLASH|REM expr */ -3, /* (186) expr ::= expr CONCAT expr */ -2, /* (187) likeop ::= NOT LIKE_KW|MATCH */ -3, /* (188) expr ::= expr likeop expr */ -5, /* (189) expr ::= expr likeop expr ESCAPE expr */ -2, /* (190) expr ::= expr ISNULL|NOTNULL */ -3, /* (191) expr ::= expr NOT NULL */ -3, /* (192) expr ::= expr IS expr */ -4, /* (193) expr ::= expr IS NOT expr */ -2, /* (194) expr ::= NOT expr */ -2, /* (195) expr ::= BITNOT expr */ -2, /* (196) expr ::= PLUS|MINUS expr */ -1, /* (197) between_op ::= BETWEEN */ -2, /* (198) between_op ::= NOT BETWEEN */ -5, /* (199) expr ::= expr between_op expr AND expr */ -1, /* (200) in_op ::= IN */ -2, /* (201) in_op ::= NOT IN */ -5, /* (202) expr ::= expr in_op LP exprlist RP */ -3, /* (203) expr ::= LP select RP */ -5, /* (204) expr ::= expr in_op LP select RP */ -5, /* (205) expr ::= expr in_op nm dbnm paren_exprlist */ -4, /* (206) expr ::= EXISTS LP select RP */ -5, /* (207) expr ::= CASE case_operand case_exprlist case_else END */ -5, /* (208) case_exprlist ::= case_exprlist WHEN expr THEN expr */ -4, /* (209) case_exprlist ::= WHEN expr THEN expr */ -2, /* (210) case_else ::= ELSE expr */ 0, /* (211) case_else ::= */ -1, /* (212) case_operand ::= expr */ 0, /* (213) case_operand ::= */ 0, /* (214) exprlist ::= */ -3, /* (215) nexprlist ::= nexprlist COMMA expr */ -1, /* (216) nexprlist ::= expr */ 0, /* (217) paren_exprlist ::= */ -3, /* (218) paren_exprlist ::= LP exprlist RP */ -12, /* (219) cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */ -1, /* (220) uniqueflag ::= UNIQUE */ 0, /* (221) uniqueflag ::= */ 0, /* (222) eidlist_opt ::= */ -3, /* (223) eidlist_opt ::= LP eidlist RP */ -5, /* (224) eidlist ::= eidlist COMMA nm collate sortorder */ -3, /* (225) eidlist ::= nm collate sortorder */ 0, /* (226) collate ::= */ -2, /* (227) collate ::= COLLATE ID|STRING */ -4, /* (228) cmd ::= DROP INDEX ifexists fullname */ -2, /* (229) cmd ::= VACUUM vinto */ -3, /* (230) cmd ::= VACUUM nm vinto */ -2, /* (231) vinto ::= INTO expr */ 0, /* (232) vinto ::= */ -3, /* (233) cmd ::= PRAGMA nm dbnm */ -5, /* (234) cmd ::= PRAGMA nm dbnm EQ nmnum */ -6, /* (235) cmd ::= PRAGMA nm dbnm LP nmnum RP */ -5, /* (236) cmd ::= PRAGMA nm dbnm EQ minus_num */ -6, /* (237) cmd ::= PRAGMA nm dbnm LP minus_num RP */ -2, /* (238) plus_num ::= PLUS INTEGER|FLOAT */ -2, /* (239) minus_num ::= MINUS INTEGER|FLOAT */ -5, /* (240) cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */ -11, /* (241) trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */ -1, /* (242) trigger_time ::= BEFORE|AFTER */ -2, /* (243) trigger_time ::= INSTEAD OF */ 0, /* (244) trigger_time ::= */ -1, /* (245) trigger_event ::= DELETE|INSERT */ -1, /* (246) trigger_event ::= UPDATE */ -3, /* (247) trigger_event ::= UPDATE OF idlist */ 0, /* (248) when_clause ::= */ -2, /* (249) when_clause ::= WHEN expr */ -3, /* (250) trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */ -2, /* (251) trigger_cmd_list ::= trigger_cmd SEMI */ -3, /* (252) trnm ::= nm DOT nm */ -3, /* (253) tridxby ::= INDEXED BY nm */ -2, /* (254) tridxby ::= NOT INDEXED */ -8, /* (255) trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt scanpt */ -8, /* (256) trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */ -6, /* (257) trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */ -3, /* (258) trigger_cmd ::= scanpt select scanpt */ -4, /* (259) expr ::= RAISE LP IGNORE RP */ -6, /* (260) expr ::= RAISE LP raisetype COMMA nm RP */ -1, /* (261) raisetype ::= ROLLBACK */ -1, /* (262) raisetype ::= ABORT */ -1, /* (263) raisetype ::= FAIL */ -4, /* (264) cmd ::= DROP TRIGGER ifexists fullname */ -6, /* (265) cmd ::= ATTACH database_kw_opt expr AS expr key_opt */ -3, /* (266) cmd ::= DETACH database_kw_opt expr */ 0, /* (267) key_opt ::= */ -2, /* (268) key_opt ::= KEY expr */ -1, /* (269) cmd ::= REINDEX */ -3, /* (270) cmd ::= REINDEX nm dbnm */ -1, /* (271) cmd ::= ANALYZE */ -3, /* (272) cmd ::= ANALYZE nm dbnm */ -6, /* (273) cmd ::= ALTER TABLE fullname RENAME TO nm */ -7, /* (274) cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */ -1, /* (275) add_column_fullname ::= fullname */ -8, /* (276) cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */ -1, /* (277) cmd ::= create_vtab */ -4, /* (278) cmd ::= create_vtab LP vtabarglist RP */ -8, /* (279) create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */ 0, /* (280) vtabarg ::= */ -1, /* (281) vtabargtoken ::= ANY */ -3, /* (282) vtabargtoken ::= lp anylist RP */ -1, /* (283) lp ::= LP */ -2, /* (284) with ::= WITH wqlist */ -3, /* (285) with ::= WITH RECURSIVE wqlist */ -6, /* (286) wqlist ::= nm eidlist_opt AS LP select RP */ -8, /* (287) wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */ -1, /* (288) windowdefn_list ::= windowdefn */ -3, /* (289) windowdefn_list ::= windowdefn_list COMMA windowdefn */ -3, /* (290) windowdefn ::= nm AS window */ -5, /* (291) window ::= LP part_opt orderby_opt frame_opt RP */ -3, /* (292) part_opt ::= PARTITION BY nexprlist */ 0, /* (293) part_opt ::= */ 0, /* (294) frame_opt ::= */ -2, /* (295) frame_opt ::= range_or_rows frame_bound_s */ -5, /* (296) frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e */ -1, /* (297) range_or_rows ::= RANGE */ -1, /* (298) range_or_rows ::= ROWS */ -1, /* (299) frame_bound_s ::= frame_bound */ -2, /* (300) frame_bound_s ::= UNBOUNDED PRECEDING */ -1, /* (301) frame_bound_e ::= frame_bound */ -2, /* (302) frame_bound_e ::= UNBOUNDED FOLLOWING */ -2, /* (303) frame_bound ::= expr PRECEDING */ -2, /* (304) frame_bound ::= CURRENT ROW */ -2, /* (305) frame_bound ::= expr FOLLOWING */ -2, /* (306) window_clause ::= WINDOW windowdefn_list */ -3, /* (307) over_clause ::= filter_opt OVER window */ -3, /* (308) over_clause ::= filter_opt OVER nm */ 0, /* (309) filter_opt ::= */ -5, /* (310) filter_opt ::= FILTER LP WHERE expr RP */ -1, /* (311) input ::= cmdlist */ -2, /* (312) cmdlist ::= cmdlist ecmd */ -1, /* (313) cmdlist ::= ecmd */ -1, /* (314) ecmd ::= SEMI */ -2, /* (315) ecmd ::= cmdx SEMI */ -2, /* (316) ecmd ::= explain cmdx */ 0, /* (317) trans_opt ::= */ -1, /* (318) trans_opt ::= TRANSACTION */ -2, /* (319) trans_opt ::= TRANSACTION nm */ -1, /* (320) savepoint_opt ::= SAVEPOINT */ 0, /* (321) savepoint_opt ::= */ -2, /* (322) cmd ::= create_table create_table_args */ -4, /* (323) columnlist ::= columnlist COMMA columnname carglist */ -2, /* (324) columnlist ::= columnname carglist */ -1, /* (325) nm ::= ID|INDEXED */ -1, /* (326) nm ::= STRING */ -1, /* (327) nm ::= JOIN_KW */ -1, /* (328) typetoken ::= typename */ -1, /* (329) typename ::= ID|STRING */ -1, /* (330) signed ::= plus_num */ -1, /* (331) signed ::= minus_num */ -2, /* (332) carglist ::= carglist ccons */ 0, /* (333) carglist ::= */ -2, /* (334) ccons ::= NULL onconf */ -2, /* (335) conslist_opt ::= COMMA conslist */ -3, /* (336) conslist ::= conslist tconscomma tcons */ -1, /* (337) conslist ::= tcons */ 0, /* (338) tconscomma ::= */ -1, /* (339) defer_subclause_opt ::= defer_subclause */ -1, /* (340) resolvetype ::= raisetype */ -1, /* (341) selectnowith ::= oneselect */ -1, /* (342) oneselect ::= values */ -2, /* (343) sclp ::= selcollist COMMA */ -1, /* (344) as ::= ID|STRING */ -1, /* (345) expr ::= term */ -1, /* (346) likeop ::= LIKE_KW|MATCH */ -1, /* (347) exprlist ::= nexprlist */ -1, /* (348) nmnum ::= plus_num */ -1, /* (349) nmnum ::= nm */ -1, /* (350) nmnum ::= ON */ -1, /* (351) nmnum ::= DELETE */ -1, /* (352) nmnum ::= DEFAULT */ -1, /* (353) plus_num ::= INTEGER|FLOAT */ 0, /* (354) foreach_clause ::= */ -3, /* (355) foreach_clause ::= FOR EACH ROW */ -1, /* (356) trnm ::= nm */ 0, /* (357) tridxby ::= */ -1, /* (358) database_kw_opt ::= DATABASE */ 0, /* (359) database_kw_opt ::= */ 0, /* (360) kwcolumn_opt ::= */ -1, /* (361) kwcolumn_opt ::= COLUMNKW */ -1, /* (362) vtabarglist ::= vtabarg */ -3, /* (363) vtabarglist ::= vtabarglist COMMA vtabarg */ -2, /* (364) vtabarg ::= vtabarg vtabargtoken */ 0, /* (365) anylist ::= */ -4, /* (366) anylist ::= anylist LP anylist RP */ -2, /* (367) anylist ::= anylist ANY */ 0, /* (368) 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; #ifndef NDEBUG if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){ yysize = yyRuleInfoNRhs[yyruleno]; if( yysize ){ fprintf(yyTraceFILE, "%sReduce %d [%s], go to state %d.\n", yyTracePrompt, yyruleno, yyRuleName[yyruleno], yymsp[yysize].stateno); }else{ fprintf(yyTraceFILE, "%sReduce %d [%s].\n", yyTracePrompt, yyruleno, yyRuleName[yyruleno]); } } #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); /* The call to yyStackOverflow() above pops the stack until it is ** empty, causing the main parser loop to exit. So the return value ** is never used and does not matter. */ return 0; } #else if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){ if( yyGrowStack(yypParser) ){ yyStackOverflow(yypParser); /* The call to yyStackOverflow() above pops the stack until it is ** empty, causing the main parser loop to exit. So the return value ** is never used and does not matter. */ return 0; } yymsp = yypParser->yytos; } #endif } switch( yyruleno ){ /* Beginning here are the reduction cases. A typical example ** follows: ** case 0: ** #line ** { ... } // User supplied code ** #line ** break; */ /********** Begin reduce actions **********************************************/ YYMINORTYPE yylhsminor; case 0: /* explain ::= EXPLAIN */ #line 123 "parse.y" { pParse->explain = 1; } #line 3145 "parse.c" break; case 1: /* explain ::= EXPLAIN QUERY PLAN */ #line 124 "parse.y" { pParse->explain = 2; } #line 3150 "parse.c" break; case 2: /* cmdx ::= cmd */ #line 126 "parse.y" { sqlite3FinishCoding(pParse); } #line 3155 "parse.c" break; case 3: /* cmd ::= BEGIN transtype trans_opt */ #line 131 "parse.y" {sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy96);} #line 3160 "parse.c" break; case 4: /* transtype ::= */ #line 136 "parse.y" {yymsp[1].minor.yy96 = TK_DEFERRED;} #line 3165 "parse.c" break; case 5: /* transtype ::= DEFERRED */ case 6: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==6); case 7: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==7); #line 137 "parse.y" {yymsp[0].minor.yy96 = yymsp[0].major; /*A-overwrites-X*/} #line 3172 "parse.c" break; case 8: /* cmd ::= COMMIT|END trans_opt */ case 9: /* cmd ::= ROLLBACK trans_opt */ yytestcase(yyruleno==9); #line 140 "parse.y" {sqlite3EndTransaction(pParse,yymsp[-1].major);} #line 3178 "parse.c" break; case 10: /* cmd ::= SAVEPOINT nm */ #line 145 "parse.y" { sqlite3Savepoint(pParse, SAVEPOINT_BEGIN, &yymsp[0].minor.yy0); } #line 3185 "parse.c" break; case 11: /* cmd ::= RELEASE savepoint_opt nm */ #line 148 "parse.y" { sqlite3Savepoint(pParse, SAVEPOINT_RELEASE, &yymsp[0].minor.yy0); } #line 3192 "parse.c" break; case 12: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */ #line 151 "parse.y" { sqlite3Savepoint(pParse, SAVEPOINT_ROLLBACK, &yymsp[0].minor.yy0); } #line 3199 "parse.c" break; case 13: /* create_table ::= createkw temp TABLE ifnotexists nm dbnm */ #line 158 "parse.y" { sqlite3StartTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,yymsp[-4].minor.yy96,0,0,yymsp[-2].minor.yy96); } #line 3206 "parse.c" break; case 14: /* createkw ::= CREATE */ #line 161 "parse.y" {disableLookaside(pParse);} #line 3211 "parse.c" break; case 15: /* ifnotexists ::= */ case 18: /* temp ::= */ yytestcase(yyruleno==18); case 21: /* table_options ::= */ yytestcase(yyruleno==21); case 42: /* autoinc ::= */ yytestcase(yyruleno==42); case 57: /* init_deferred_pred_opt ::= */ yytestcase(yyruleno==57); case 67: /* defer_subclause_opt ::= */ yytestcase(yyruleno==67); case 76: /* ifexists ::= */ yytestcase(yyruleno==76); case 93: /* distinct ::= */ yytestcase(yyruleno==93); case 226: /* collate ::= */ yytestcase(yyruleno==226); #line 164 "parse.y" {yymsp[1].minor.yy96 = 0;} #line 3224 "parse.c" break; case 16: /* ifnotexists ::= IF NOT EXISTS */ #line 165 "parse.y" {yymsp[-2].minor.yy96 = 1;} #line 3229 "parse.c" break; case 17: /* temp ::= TEMP */ case 43: /* autoinc ::= AUTOINCR */ yytestcase(yyruleno==43); #line 168 "parse.y" {yymsp[0].minor.yy96 = 1;} #line 3235 "parse.c" break; case 19: /* create_table_args ::= LP columnlist conslist_opt RP table_options */ #line 171 "parse.y" { sqlite3EndTable(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,yymsp[0].minor.yy96,0); } #line 3242 "parse.c" break; case 20: /* create_table_args ::= AS select */ #line 174 "parse.y" { sqlite3EndTable(pParse,0,0,0,yymsp[0].minor.yy423); sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy423); } #line 3250 "parse.c" break; case 22: /* table_options ::= WITHOUT nm */ #line 180 "parse.y" { if( yymsp[0].minor.yy0.n==5 && sqlite3_strnicmp(yymsp[0].minor.yy0.z,"rowid",5)==0 ){ yymsp[-1].minor.yy96 = TF_WithoutRowid | TF_NoVisibleRowid; }else{ yymsp[-1].minor.yy96 = 0; sqlite3ErrorMsg(pParse, "unknown table option: %.*s", yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.z); } } #line 3262 "parse.c" break; case 23: /* columnname ::= nm typetoken */ #line 190 "parse.y" {sqlite3AddColumn(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);} #line 3267 "parse.c" break; case 24: /* typetoken ::= */ case 60: /* conslist_opt ::= */ yytestcase(yyruleno==60); case 99: /* as ::= */ yytestcase(yyruleno==99); #line 273 "parse.y" {yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = 0;} #line 3274 "parse.c" break; case 25: /* typetoken ::= typename LP signed RP */ #line 275 "parse.y" { yymsp[-3].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy0.z); } #line 3281 "parse.c" break; case 26: /* typetoken ::= typename LP signed COMMA signed RP */ #line 278 "parse.y" { yymsp[-5].minor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy0.z); } #line 3288 "parse.c" break; case 27: /* typename ::= typename ID|STRING */ #line 283 "parse.y" {yymsp[-1].minor.yy0.n=yymsp[0].minor.yy0.n+(int)(yymsp[0].minor.yy0.z-yymsp[-1].minor.yy0.z);} #line 3293 "parse.c" break; case 28: /* scanpt ::= */ #line 301 "parse.y" { assert( yyLookahead!=YYNOCODE ); yymsp[1].minor.yy464 = yyLookaheadToken.z; } #line 3301 "parse.c" break; case 29: /* ccons ::= CONSTRAINT nm */ case 62: /* tcons ::= CONSTRAINT nm */ yytestcase(yyruleno==62); #line 311 "parse.y" {pParse->constraintName = yymsp[0].minor.yy0;} #line 3307 "parse.c" break; case 30: /* ccons ::= DEFAULT scanpt term scanpt */ #line 313 "parse.y" {sqlite3AddDefaultValue(pParse,yymsp[-1].minor.yy490,yymsp[-2].minor.yy464,yymsp[0].minor.yy464);} #line 3312 "parse.c" break; case 31: /* ccons ::= DEFAULT LP expr RP */ #line 315 "parse.y" {sqlite3AddDefaultValue(pParse,yymsp[-1].minor.yy490,yymsp[-2].minor.yy0.z+1,yymsp[0].minor.yy0.z);} #line 3317 "parse.c" break; case 32: /* ccons ::= DEFAULT PLUS term scanpt */ #line 317 "parse.y" {sqlite3AddDefaultValue(pParse,yymsp[-1].minor.yy490,yymsp[-2].minor.yy0.z,yymsp[0].minor.yy464);} #line 3322 "parse.c" break; case 33: /* ccons ::= DEFAULT MINUS term scanpt */ #line 318 "parse.y" { Expr *p = sqlite3PExpr(pParse, TK_UMINUS, yymsp[-1].minor.yy490, 0); sqlite3AddDefaultValue(pParse,p,yymsp[-2].minor.yy0.z,yymsp[0].minor.yy464); } #line 3330 "parse.c" break; case 34: /* ccons ::= DEFAULT scanpt ID|INDEXED */ #line 322 "parse.y" { 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); } #line 3342 "parse.c" break; case 35: /* ccons ::= NOT NULL onconf */ #line 335 "parse.y" {sqlite3AddNotNull(pParse, yymsp[0].minor.yy96);} #line 3347 "parse.c" break; case 36: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */ #line 337 "parse.y" {sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy96,yymsp[0].minor.yy96,yymsp[-2].minor.yy96);} #line 3352 "parse.c" break; case 37: /* ccons ::= UNIQUE onconf */ #line 338 "parse.y" {sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy96,0,0,0,0, SQLITE_IDXTYPE_UNIQUE);} #line 3358 "parse.c" break; case 38: /* ccons ::= CHECK LP expr RP */ #line 340 "parse.y" {sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy490);} #line 3363 "parse.c" break; case 39: /* ccons ::= REFERENCES nm eidlist_opt refargs */ #line 342 "parse.y" {sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy42,yymsp[0].minor.yy96);} #line 3368 "parse.c" break; case 40: /* ccons ::= defer_subclause */ #line 343 "parse.y" {sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy96);} #line 3373 "parse.c" break; case 41: /* ccons ::= COLLATE ID|STRING */ #line 344 "parse.y" {sqlite3AddCollateType(pParse, &yymsp[0].minor.yy0);} #line 3378 "parse.c" break; case 44: /* refargs ::= */ #line 357 "parse.y" { yymsp[1].minor.yy96 = OE_None*0x0101; /* EV: R-19803-45884 */} #line 3383 "parse.c" break; case 45: /* refargs ::= refargs refarg */ #line 358 "parse.y" { yymsp[-1].minor.yy96 = (yymsp[-1].minor.yy96 & ~yymsp[0].minor.yy367.mask) | yymsp[0].minor.yy367.value; } #line 3388 "parse.c" break; case 46: /* refarg ::= MATCH nm */ #line 360 "parse.y" { yymsp[-1].minor.yy367.value = 0; yymsp[-1].minor.yy367.mask = 0x000000; } #line 3393 "parse.c" break; case 47: /* refarg ::= ON INSERT refact */ #line 361 "parse.y" { yymsp[-2].minor.yy367.value = 0; yymsp[-2].minor.yy367.mask = 0x000000; } #line 3398 "parse.c" break; case 48: /* refarg ::= ON DELETE refact */ #line 362 "parse.y" { yymsp[-2].minor.yy367.value = yymsp[0].minor.yy96; yymsp[-2].minor.yy367.mask = 0x0000ff; } #line 3403 "parse.c" break; case 49: /* refarg ::= ON UPDATE refact */ #line 363 "parse.y" { yymsp[-2].minor.yy367.value = yymsp[0].minor.yy96<<8; yymsp[-2].minor.yy367.mask = 0x00ff00; } #line 3408 "parse.c" break; case 50: /* refact ::= SET NULL */ #line 365 "parse.y" { yymsp[-1].minor.yy96 = OE_SetNull; /* EV: R-33326-45252 */} #line 3413 "parse.c" break; case 51: /* refact ::= SET DEFAULT */ #line 366 "parse.y" { yymsp[-1].minor.yy96 = OE_SetDflt; /* EV: R-33326-45252 */} #line 3418 "parse.c" break; case 52: /* refact ::= CASCADE */ #line 367 "parse.y" { yymsp[0].minor.yy96 = OE_Cascade; /* EV: R-33326-45252 */} #line 3423 "parse.c" break; case 53: /* refact ::= RESTRICT */ #line 368 "parse.y" { yymsp[0].minor.yy96 = OE_Restrict; /* EV: R-33326-45252 */} #line 3428 "parse.c" break; case 54: /* refact ::= NO ACTION */ #line 369 "parse.y" { yymsp[-1].minor.yy96 = OE_None; /* EV: R-33326-45252 */} #line 3433 "parse.c" break; case 55: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */ #line 371 "parse.y" {yymsp[-2].minor.yy96 = 0;} #line 3438 "parse.c" break; case 56: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */ case 71: /* orconf ::= OR resolvetype */ yytestcase(yyruleno==71); case 156: /* insert_cmd ::= INSERT orconf */ yytestcase(yyruleno==156); #line 372 "parse.y" {yymsp[-1].minor.yy96 = yymsp[0].minor.yy96;} #line 3445 "parse.c" break; case 58: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */ case 75: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==75); case 198: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==198); case 201: /* in_op ::= NOT IN */ yytestcase(yyruleno==201); case 227: /* collate ::= COLLATE ID|STRING */ yytestcase(yyruleno==227); #line 375 "parse.y" {yymsp[-1].minor.yy96 = 1;} #line 3454 "parse.c" break; case 59: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */ #line 376 "parse.y" {yymsp[-1].minor.yy96 = 0;} #line 3459 "parse.c" break; case 61: /* tconscomma ::= COMMA */ #line 382 "parse.y" {pParse->constraintName.n = 0;} #line 3464 "parse.c" break; case 63: /* tcons ::= PRIMARY KEY LP sortlist autoinc RP onconf */ #line 386 "parse.y" {sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy42,yymsp[0].minor.yy96,yymsp[-2].minor.yy96,0);} #line 3469 "parse.c" break; case 64: /* tcons ::= UNIQUE LP sortlist RP onconf */ #line 388 "parse.y" {sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy42,yymsp[0].minor.yy96,0,0,0,0, SQLITE_IDXTYPE_UNIQUE);} #line 3475 "parse.c" break; case 65: /* tcons ::= CHECK LP expr RP onconf */ #line 391 "parse.y" {sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy490);} #line 3480 "parse.c" break; case 66: /* tcons ::= FOREIGN KEY LP eidlist RP REFERENCES nm eidlist_opt refargs defer_subclause_opt */ #line 393 "parse.y" { sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy42, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy42, yymsp[-1].minor.yy96); sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy96); } #line 3488 "parse.c" break; case 68: /* onconf ::= */ case 70: /* orconf ::= */ yytestcase(yyruleno==70); #line 407 "parse.y" {yymsp[1].minor.yy96 = OE_Default;} #line 3494 "parse.c" break; case 69: /* onconf ::= ON CONFLICT resolvetype */ #line 408 "parse.y" {yymsp[-2].minor.yy96 = yymsp[0].minor.yy96;} #line 3499 "parse.c" break; case 72: /* resolvetype ::= IGNORE */ #line 412 "parse.y" {yymsp[0].minor.yy96 = OE_Ignore;} #line 3504 "parse.c" break; case 73: /* resolvetype ::= REPLACE */ case 157: /* insert_cmd ::= REPLACE */ yytestcase(yyruleno==157); #line 413 "parse.y" {yymsp[0].minor.yy96 = OE_Replace;} #line 3510 "parse.c" break; case 74: /* cmd ::= DROP TABLE ifexists fullname */ #line 417 "parse.y" { sqlite3DropTable(pParse, yymsp[0].minor.yy167, 0, yymsp[-1].minor.yy96); } #line 3517 "parse.c" break; case 77: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm eidlist_opt AS select */ #line 428 "parse.y" { sqlite3CreateView(pParse, &yymsp[-8].minor.yy0, &yymsp[-4].minor.yy0, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy42, yymsp[0].minor.yy423, yymsp[-7].minor.yy96, yymsp[-5].minor.yy96); } #line 3524 "parse.c" break; case 78: /* cmd ::= DROP VIEW ifexists fullname */ #line 431 "parse.y" { sqlite3DropTable(pParse, yymsp[0].minor.yy167, 1, yymsp[-1].minor.yy96); } #line 3531 "parse.c" break; case 79: /* cmd ::= select */ #line 438 "parse.y" { SelectDest dest = {SRT_Output, 0, 0, 0, 0, 0}; sqlite3Select(pParse, yymsp[0].minor.yy423, &dest); sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy423); } #line 3540 "parse.c" break; case 80: /* select ::= WITH wqlist selectnowith */ #line 476 "parse.y" { Select *p = yymsp[0].minor.yy423; if( p ){ p->pWith = yymsp[-1].minor.yy499; parserDoubleLinkSelect(pParse, p); }else{ sqlite3WithDelete(pParse->db, yymsp[-1].minor.yy499); } yymsp[-2].minor.yy423 = p; } #line 3554 "parse.c" break; case 81: /* select ::= WITH RECURSIVE wqlist selectnowith */ #line 486 "parse.y" { Select *p = yymsp[0].minor.yy423; if( p ){ p->pWith = yymsp[-1].minor.yy499; parserDoubleLinkSelect(pParse, p); }else{ sqlite3WithDelete(pParse->db, yymsp[-1].minor.yy499); } yymsp[-3].minor.yy423 = p; } #line 3568 "parse.c" break; case 82: /* select ::= selectnowith */ #line 497 "parse.y" { Select *p = yymsp[0].minor.yy423; if( p ){ parserDoubleLinkSelect(pParse, p); } yymsp[0].minor.yy423 = p; /*A-overwrites-X*/ } #line 3579 "parse.c" break; case 83: /* selectnowith ::= selectnowith multiselect_op oneselect */ #line 507 "parse.y" { Select *pRhs = yymsp[0].minor.yy423; Select *pLhs = yymsp[-2].minor.yy423; 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.yy96; pRhs->pPrior = pLhs; if( ALWAYS(pLhs) ) pLhs->selFlags &= ~SF_MultiValue; pRhs->selFlags &= ~SF_MultiValue; if( yymsp[-1].minor.yy96!=TK_ALL ) pParse->hasCompound = 1; }else{ sqlite3SelectDelete(pParse->db, pLhs); } yymsp[-2].minor.yy423 = pRhs; } #line 3605 "parse.c" break; case 84: /* multiselect_op ::= UNION */ case 86: /* multiselect_op ::= EXCEPT|INTERSECT */ yytestcase(yyruleno==86); #line 530 "parse.y" {yymsp[0].minor.yy96 = yymsp[0].major; /*A-overwrites-OP*/} #line 3611 "parse.c" break; case 85: /* multiselect_op ::= UNION ALL */ #line 531 "parse.y" {yymsp[-1].minor.yy96 = TK_ALL;} #line 3616 "parse.c" break; case 87: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */ #line 537 "parse.y" { yymsp[-8].minor.yy423 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy42,yymsp[-5].minor.yy167,yymsp[-4].minor.yy490,yymsp[-3].minor.yy42,yymsp[-2].minor.yy490,yymsp[-1].minor.yy42,yymsp[-7].minor.yy96,yymsp[0].minor.yy490); } #line 3623 "parse.c" break; case 88: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */ #line 543 "parse.y" { yymsp[-9].minor.yy423 = sqlite3SelectNew(pParse,yymsp[-7].minor.yy42,yymsp[-6].minor.yy167,yymsp[-5].minor.yy490,yymsp[-4].minor.yy42,yymsp[-3].minor.yy490,yymsp[-1].minor.yy42,yymsp[-8].minor.yy96,yymsp[0].minor.yy490); if( yymsp[-9].minor.yy423 ){ yymsp[-9].minor.yy423->pWinDefn = yymsp[-2].minor.yy147; }else{ sqlite3WindowListDelete(pParse->db, yymsp[-2].minor.yy147); } } #line 3635 "parse.c" break; case 89: /* values ::= VALUES LP nexprlist RP */ #line 558 "parse.y" { yymsp[-3].minor.yy423 = sqlite3SelectNew(pParse,yymsp[-1].minor.yy42,0,0,0,0,0,SF_Values,0); } #line 3642 "parse.c" break; case 90: /* values ::= values COMMA LP nexprlist RP */ #line 561 "parse.y" { Select *pRight, *pLeft = yymsp[-4].minor.yy423; pRight = sqlite3SelectNew(pParse,yymsp[-1].minor.yy42,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.yy423 = pRight; }else{ yymsp[-4].minor.yy423 = pLeft; } } #line 3658 "parse.c" break; case 91: /* distinct ::= DISTINCT */ #line 578 "parse.y" {yymsp[0].minor.yy96 = SF_Distinct;} #line 3663 "parse.c" break; case 92: /* distinct ::= ALL */ #line 579 "parse.y" {yymsp[0].minor.yy96 = SF_All;} #line 3668 "parse.c" break; case 94: /* sclp ::= */ case 127: /* orderby_opt ::= */ yytestcase(yyruleno==127); case 134: /* groupby_opt ::= */ yytestcase(yyruleno==134); case 214: /* exprlist ::= */ yytestcase(yyruleno==214); case 217: /* paren_exprlist ::= */ yytestcase(yyruleno==217); case 222: /* eidlist_opt ::= */ yytestcase(yyruleno==222); #line 592 "parse.y" {yymsp[1].minor.yy42 = 0;} #line 3678 "parse.c" break; case 95: /* selcollist ::= sclp scanpt expr scanpt as */ #line 593 "parse.y" { yymsp[-4].minor.yy42 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy42, yymsp[-2].minor.yy490); if( yymsp[0].minor.yy0.n>0 ) sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy42, &yymsp[0].minor.yy0, 1); sqlite3ExprListSetSpan(pParse,yymsp[-4].minor.yy42,yymsp[-3].minor.yy464,yymsp[-1].minor.yy464); } #line 3687 "parse.c" break; case 96: /* selcollist ::= sclp scanpt STAR */ #line 598 "parse.y" { Expr *p = sqlite3Expr(pParse->db, TK_ASTERISK, 0); yymsp[-2].minor.yy42 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy42, p); } #line 3695 "parse.c" break; case 97: /* selcollist ::= sclp scanpt nm DOT STAR */ #line 602 "parse.y" { 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.yy42 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy42, pDot); } #line 3705 "parse.c" break; case 98: /* as ::= AS nm */ case 109: /* dbnm ::= DOT nm */ yytestcase(yyruleno==109); case 238: /* plus_num ::= PLUS INTEGER|FLOAT */ yytestcase(yyruleno==238); case 239: /* minus_num ::= MINUS INTEGER|FLOAT */ yytestcase(yyruleno==239); #line 613 "parse.y" {yymsp[-1].minor.yy0 = yymsp[0].minor.yy0;} #line 3713 "parse.c" break; case 100: /* from ::= */ #line 627 "parse.y" {yymsp[1].minor.yy167 = sqlite3DbMallocZero(pParse->db, sizeof(*yymsp[1].minor.yy167));} #line 3718 "parse.c" break; case 101: /* from ::= FROM seltablist */ #line 628 "parse.y" { yymsp[-1].minor.yy167 = yymsp[0].minor.yy167; sqlite3SrcListShiftJoinType(yymsp[-1].minor.yy167); } #line 3726 "parse.c" break; case 102: /* stl_prefix ::= seltablist joinop */ #line 636 "parse.y" { if( ALWAYS(yymsp[-1].minor.yy167 && yymsp[-1].minor.yy167->nSrc>0) ) yymsp[-1].minor.yy167->a[yymsp[-1].minor.yy167->nSrc-1].fg.jointype = (u8)yymsp[0].minor.yy96; } #line 3733 "parse.c" break; case 103: /* stl_prefix ::= */ #line 639 "parse.y" {yymsp[1].minor.yy167 = 0;} #line 3738 "parse.c" break; case 104: /* seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */ #line 641 "parse.y" { yymsp[-6].minor.yy167 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy167,&yymsp[-5].minor.yy0,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,0,yymsp[-1].minor.yy490,yymsp[0].minor.yy336); sqlite3SrcListIndexedBy(pParse, yymsp[-6].minor.yy167, &yymsp[-2].minor.yy0); } #line 3746 "parse.c" break; case 105: /* seltablist ::= stl_prefix nm dbnm LP exprlist RP as on_opt using_opt */ #line 646 "parse.y" { yymsp[-8].minor.yy167 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-8].minor.yy167,&yymsp[-7].minor.yy0,&yymsp[-6].minor.yy0,&yymsp[-2].minor.yy0,0,yymsp[-1].minor.yy490,yymsp[0].minor.yy336); sqlite3SrcListFuncArgs(pParse, yymsp[-8].minor.yy167, yymsp[-4].minor.yy42); } #line 3754 "parse.c" break; case 106: /* seltablist ::= stl_prefix LP select RP as on_opt using_opt */ #line 652 "parse.y" { yymsp[-6].minor.yy167 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy167,0,0,&yymsp[-2].minor.yy0,yymsp[-4].minor.yy423,yymsp[-1].minor.yy490,yymsp[0].minor.yy336); } #line 3761 "parse.c" break; case 107: /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */ #line 656 "parse.y" { if( yymsp[-6].minor.yy167==0 && yymsp[-2].minor.yy0.n==0 && yymsp[-1].minor.yy490==0 && yymsp[0].minor.yy336==0 ){ yymsp[-6].minor.yy167 = yymsp[-4].minor.yy167; }else if( yymsp[-4].minor.yy167->nSrc==1 ){ yymsp[-6].minor.yy167 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy167,0,0,&yymsp[-2].minor.yy0,0,yymsp[-1].minor.yy490,yymsp[0].minor.yy336); if( yymsp[-6].minor.yy167 ){ struct SrcList_item *pNew = &yymsp[-6].minor.yy167->a[yymsp[-6].minor.yy167->nSrc-1]; struct SrcList_item *pOld = yymsp[-4].minor.yy167->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.yy167); }else{ Select *pSubquery; sqlite3SrcListShiftJoinType(yymsp[-4].minor.yy167); pSubquery = sqlite3SelectNew(pParse,0,yymsp[-4].minor.yy167,0,0,0,0,SF_NestedFrom,0); yymsp[-6].minor.yy167 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy167,0,0,&yymsp[-2].minor.yy0,pSubquery,yymsp[-1].minor.yy490,yymsp[0].minor.yy336); } } #line 3793 "parse.c" break; case 108: /* dbnm ::= */ case 122: /* indexed_opt ::= */ yytestcase(yyruleno==122); #line 687 "parse.y" {yymsp[1].minor.yy0.z=0; yymsp[1].minor.yy0.n=0;} #line 3799 "parse.c" break; case 110: /* fullname ::= nm */ #line 692 "parse.y" { yylhsminor.yy167 = sqlite3SrcListAppend(pParse,0,&yymsp[0].minor.yy0,0); if( IN_RENAME_OBJECT && yylhsminor.yy167 ) sqlite3RenameTokenMap(pParse, yylhsminor.yy167->a[0].zName, &yymsp[0].minor.yy0); } #line 3807 "parse.c" yymsp[0].minor.yy167 = yylhsminor.yy167; break; case 111: /* fullname ::= nm DOT nm */ #line 696 "parse.y" { yylhsminor.yy167 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); if( IN_RENAME_OBJECT && yylhsminor.yy167 ) sqlite3RenameTokenMap(pParse, yylhsminor.yy167->a[0].zName, &yymsp[0].minor.yy0); } #line 3816 "parse.c" yymsp[-2].minor.yy167 = yylhsminor.yy167; break; case 112: /* xfullname ::= nm */ #line 704 "parse.y" {yymsp[0].minor.yy167 = sqlite3SrcListAppend(pParse,0,&yymsp[0].minor.yy0,0); /*A-overwrites-X*/} #line 3822 "parse.c" break; case 113: /* xfullname ::= nm DOT nm */ #line 706 "parse.y" {yymsp[-2].minor.yy167 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); /*A-overwrites-X*/} #line 3827 "parse.c" break; case 114: /* xfullname ::= nm DOT nm AS nm */ #line 707 "parse.y" { yymsp[-4].minor.yy167 = sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,&yymsp[-2].minor.yy0); /*A-overwrites-X*/ if( yymsp[-4].minor.yy167 ) yymsp[-4].minor.yy167->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0); } #line 3835 "parse.c" break; case 115: /* xfullname ::= nm AS nm */ #line 711 "parse.y" { yymsp[-2].minor.yy167 = sqlite3SrcListAppend(pParse,0,&yymsp[-2].minor.yy0,0); /*A-overwrites-X*/ if( yymsp[-2].minor.yy167 ) yymsp[-2].minor.yy167->a[0].zAlias = sqlite3NameFromToken(pParse->db, &yymsp[0].minor.yy0); } #line 3843 "parse.c" break; case 116: /* joinop ::= COMMA|JOIN */ #line 717 "parse.y" { yymsp[0].minor.yy96 = JT_INNER; } #line 3848 "parse.c" break; case 117: /* joinop ::= JOIN_KW JOIN */ #line 719 "parse.y" {yymsp[-1].minor.yy96 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0); /*X-overwrites-A*/} #line 3853 "parse.c" break; case 118: /* joinop ::= JOIN_KW nm JOIN */ #line 721 "parse.y" {yymsp[-2].minor.yy96 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); /*X-overwrites-A*/} #line 3858 "parse.c" break; case 119: /* joinop ::= JOIN_KW nm nm JOIN */ #line 723 "parse.y" {yymsp[-3].minor.yy96 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0);/*X-overwrites-A*/} #line 3863 "parse.c" break; case 120: /* on_opt ::= ON expr */ case 137: /* having_opt ::= HAVING expr */ yytestcase(yyruleno==137); case 144: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==144); case 210: /* case_else ::= ELSE expr */ yytestcase(yyruleno==210); case 231: /* vinto ::= INTO expr */ yytestcase(yyruleno==231); #line 744 "parse.y" {yymsp[-1].minor.yy490 = yymsp[0].minor.yy490;} #line 3872 "parse.c" break; case 121: /* on_opt ::= */ case 136: /* having_opt ::= */ yytestcase(yyruleno==136); case 138: /* limit_opt ::= */ yytestcase(yyruleno==138); case 143: /* where_opt ::= */ yytestcase(yyruleno==143); case 211: /* case_else ::= */ yytestcase(yyruleno==211); case 213: /* case_operand ::= */ yytestcase(yyruleno==213); case 232: /* vinto ::= */ yytestcase(yyruleno==232); #line 745 "parse.y" {yymsp[1].minor.yy490 = 0;} #line 3883 "parse.c" break; case 123: /* indexed_opt ::= INDEXED BY nm */ #line 759 "parse.y" {yymsp[-2].minor.yy0 = yymsp[0].minor.yy0;} #line 3888 "parse.c" break; case 124: /* indexed_opt ::= NOT INDEXED */ #line 760 "parse.y" {yymsp[-1].minor.yy0.z=0; yymsp[-1].minor.yy0.n=1;} #line 3893 "parse.c" break; case 125: /* using_opt ::= USING LP idlist RP */ #line 764 "parse.y" {yymsp[-3].minor.yy336 = yymsp[-1].minor.yy336;} #line 3898 "parse.c" break; case 126: /* using_opt ::= */ case 158: /* idlist_opt ::= */ yytestcase(yyruleno==158); #line 765 "parse.y" {yymsp[1].minor.yy336 = 0;} #line 3904 "parse.c" break; case 128: /* orderby_opt ::= ORDER BY sortlist */ case 135: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==135); #line 779 "parse.y" {yymsp[-2].minor.yy42 = yymsp[0].minor.yy42;} #line 3910 "parse.c" break; case 129: /* sortlist ::= sortlist COMMA expr sortorder */ #line 780 "parse.y" { yymsp[-3].minor.yy42 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy42,yymsp[-1].minor.yy490); sqlite3ExprListSetSortOrder(yymsp[-3].minor.yy42,yymsp[0].minor.yy96); } #line 3918 "parse.c" break; case 130: /* sortlist ::= expr sortorder */ #line 784 "parse.y" { yymsp[-1].minor.yy42 = sqlite3ExprListAppend(pParse,0,yymsp[-1].minor.yy490); /*A-overwrites-Y*/ sqlite3ExprListSetSortOrder(yymsp[-1].minor.yy42,yymsp[0].minor.yy96); } #line 3926 "parse.c" break; case 131: /* sortorder ::= ASC */ #line 791 "parse.y" {yymsp[0].minor.yy96 = SQLITE_SO_ASC;} #line 3931 "parse.c" break; case 132: /* sortorder ::= DESC */ #line 792 "parse.y" {yymsp[0].minor.yy96 = SQLITE_SO_DESC;} #line 3936 "parse.c" break; case 133: /* sortorder ::= */ #line 793 "parse.y" {yymsp[1].minor.yy96 = SQLITE_SO_UNDEFINED;} #line 3941 "parse.c" break; case 139: /* limit_opt ::= LIMIT expr */ #line 817 "parse.y" {yymsp[-1].minor.yy490 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy490,0);} #line 3946 "parse.c" break; case 140: /* limit_opt ::= LIMIT expr OFFSET expr */ #line 819 "parse.y" {yymsp[-3].minor.yy490 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[-2].minor.yy490,yymsp[0].minor.yy490);} #line 3951 "parse.c" break; case 141: /* limit_opt ::= LIMIT expr COMMA expr */ #line 821 "parse.y" {yymsp[-3].minor.yy490 = sqlite3PExpr(pParse,TK_LIMIT,yymsp[0].minor.yy490,yymsp[-2].minor.yy490);} #line 3956 "parse.c" break; case 142: /* cmd ::= with DELETE FROM xfullname indexed_opt where_opt orderby_opt limit_opt */ #line 827 "parse.y" { sqlite3SrcListIndexedBy(pParse, yymsp[-4].minor.yy167, &yymsp[-3].minor.yy0); #ifndef SQLITE_ENABLE_UPDATE_DELETE_LIMIT sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy42); yymsp[-1].minor.yy42 = 0; sqlite3ExprDelete(pParse->db, yymsp[0].minor.yy490); yymsp[0].minor.yy490 = 0; #endif sqlite3DeleteFrom(pParse,yymsp[-4].minor.yy167,yymsp[-2].minor.yy490,yymsp[-1].minor.yy42,yymsp[0].minor.yy490); } #line 3968 "parse.c" break; case 145: /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist where_opt orderby_opt limit_opt */ #line 853 "parse.y" { sqlite3SrcListIndexedBy(pParse, yymsp[-6].minor.yy167, &yymsp[-5].minor.yy0); sqlite3ExprListCheckLength(pParse,yymsp[-3].minor.yy42,"set list"); sqlite3Update(pParse,yymsp[-6].minor.yy167,yymsp[-3].minor.yy42,yymsp[-2].minor.yy490,yymsp[-7].minor.yy96,yymsp[-1].minor.yy42,yymsp[0].minor.yy490,0); } #line 3977 "parse.c" break; case 146: /* setlist ::= setlist COMMA nm EQ expr */ #line 871 "parse.y" { yymsp[-4].minor.yy42 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy42, yymsp[0].minor.yy490); sqlite3ExprListSetName(pParse, yymsp[-4].minor.yy42, &yymsp[-2].minor.yy0, 1); } #line 3985 "parse.c" break; case 147: /* setlist ::= setlist COMMA LP idlist RP EQ expr */ #line 875 "parse.y" { yymsp[-6].minor.yy42 = sqlite3ExprListAppendVector(pParse, yymsp[-6].minor.yy42, yymsp[-3].minor.yy336, yymsp[0].minor.yy490); } #line 3992 "parse.c" break; case 148: /* setlist ::= nm EQ expr */ #line 878 "parse.y" { yylhsminor.yy42 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy490); sqlite3ExprListSetName(pParse, yylhsminor.yy42, &yymsp[-2].minor.yy0, 1); } #line 4000 "parse.c" yymsp[-2].minor.yy42 = yylhsminor.yy42; break; case 149: /* setlist ::= LP idlist RP EQ expr */ #line 882 "parse.y" { yymsp[-4].minor.yy42 = sqlite3ExprListAppendVector(pParse, 0, yymsp[-3].minor.yy336, yymsp[0].minor.yy490); } #line 4008 "parse.c" break; case 150: /* cmd ::= with insert_cmd INTO xfullname idlist_opt select upsert */ #line 889 "parse.y" { sqlite3Insert(pParse, yymsp[-3].minor.yy167, yymsp[-1].minor.yy423, yymsp[-2].minor.yy336, yymsp[-5].minor.yy96, yymsp[0].minor.yy266); } #line 4015 "parse.c" break; case 151: /* cmd ::= with insert_cmd INTO xfullname idlist_opt DEFAULT VALUES */ #line 893 "parse.y" { sqlite3Insert(pParse, yymsp[-3].minor.yy167, 0, yymsp[-2].minor.yy336, yymsp[-5].minor.yy96, 0); } #line 4022 "parse.c" break; case 152: /* upsert ::= */ #line 904 "parse.y" { yymsp[1].minor.yy266 = 0; } #line 4027 "parse.c" break; case 153: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt */ #line 907 "parse.y" { yymsp[-10].minor.yy266 = sqlite3UpsertNew(pParse->db,yymsp[-7].minor.yy42,yymsp[-5].minor.yy490,yymsp[-1].minor.yy42,yymsp[0].minor.yy490);} #line 4032 "parse.c" break; case 154: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING */ #line 909 "parse.y" { yymsp[-7].minor.yy266 = sqlite3UpsertNew(pParse->db,yymsp[-4].minor.yy42,yymsp[-2].minor.yy490,0,0); } #line 4037 "parse.c" break; case 155: /* upsert ::= ON CONFLICT DO NOTHING */ #line 911 "parse.y" { yymsp[-3].minor.yy266 = sqlite3UpsertNew(pParse->db,0,0,0,0); } #line 4042 "parse.c" break; case 159: /* idlist_opt ::= LP idlist RP */ #line 923 "parse.y" {yymsp[-2].minor.yy336 = yymsp[-1].minor.yy336;} #line 4047 "parse.c" break; case 160: /* idlist ::= idlist COMMA nm */ #line 925 "parse.y" {yymsp[-2].minor.yy336 = sqlite3IdListAppend(pParse,yymsp[-2].minor.yy336,&yymsp[0].minor.yy0);} #line 4052 "parse.c" break; case 161: /* idlist ::= nm */ #line 927 "parse.y" {yymsp[0].minor.yy336 = sqlite3IdListAppend(pParse,0,&yymsp[0].minor.yy0); /*A-overwrites-Y*/} #line 4057 "parse.c" break; case 162: /* expr ::= LP expr RP */ #line 977 "parse.y" {yymsp[-2].minor.yy490 = yymsp[-1].minor.yy490;} #line 4062 "parse.c" break; case 163: /* expr ::= ID|INDEXED */ case 164: /* expr ::= JOIN_KW */ yytestcase(yyruleno==164); #line 978 "parse.y" {yymsp[0].minor.yy490=tokenExpr(pParse,TK_ID,yymsp[0].minor.yy0); /*A-overwrites-X*/} #line 4068 "parse.c" break; case 165: /* expr ::= nm DOT nm */ #line 980 "parse.y" { 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.yy490 = sqlite3PExpr(pParse, TK_DOT, temp1, temp2); } #line 4081 "parse.c" yymsp[-2].minor.yy490 = yylhsminor.yy490; break; case 166: /* expr ::= nm DOT nm DOT nm */ #line 989 "parse.y" { 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.yy490 = sqlite3PExpr(pParse, TK_DOT, temp1, temp4); } #line 4097 "parse.c" yymsp[-4].minor.yy490 = yylhsminor.yy490; break; case 167: /* term ::= NULL|FLOAT|BLOB */ case 168: /* term ::= STRING */ yytestcase(yyruleno==168); #line 1000 "parse.y" {yymsp[0].minor.yy490=tokenExpr(pParse,yymsp[0].major,yymsp[0].minor.yy0); /*A-overwrites-X*/} #line 4104 "parse.c" break; case 169: /* term ::= INTEGER */ #line 1002 "parse.y" { yylhsminor.yy490 = sqlite3ExprAlloc(pParse->db, TK_INTEGER, &yymsp[0].minor.yy0, 1); } #line 4111 "parse.c" yymsp[0].minor.yy490 = yylhsminor.yy490; break; case 170: /* expr ::= VARIABLE */ #line 1005 "parse.y" { if( !(yymsp[0].minor.yy0.z[0]=='#' && sqlite3Isdigit(yymsp[0].minor.yy0.z[1])) ){ u32 n = yymsp[0].minor.yy0.n; yymsp[0].minor.yy490 = tokenExpr(pParse, TK_VARIABLE, yymsp[0].minor.yy0); sqlite3ExprAssignVarNumber(pParse, yymsp[0].minor.yy490, 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.yy490 = 0; }else{ yymsp[0].minor.yy490 = sqlite3PExpr(pParse, TK_REGISTER, 0, 0); if( yymsp[0].minor.yy490 ) sqlite3GetInt32(&t.z[1], &yymsp[0].minor.yy490->iTable); } } } #line 4136 "parse.c" break; case 171: /* expr ::= expr COLLATE ID|STRING */ #line 1025 "parse.y" { yymsp[-2].minor.yy490 = sqlite3ExprAddCollateToken(pParse, yymsp[-2].minor.yy490, &yymsp[0].minor.yy0, 1); } #line 4143 "parse.c" break; case 172: /* expr ::= CAST LP expr AS typetoken RP */ #line 1029 "parse.y" { yymsp[-5].minor.yy490 = sqlite3ExprAlloc(pParse->db, TK_CAST, &yymsp[-1].minor.yy0, 1); sqlite3ExprAttachSubtrees(pParse->db, yymsp[-5].minor.yy490, yymsp[-3].minor.yy490, 0); } #line 4151 "parse.c" break; case 173: /* expr ::= ID|INDEXED LP distinct exprlist RP */ #line 1036 "parse.y" { yylhsminor.yy490 = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy42, &yymsp[-4].minor.yy0, yymsp[-2].minor.yy96); } #line 4158 "parse.c" yymsp[-4].minor.yy490 = yylhsminor.yy490; break; case 174: /* expr ::= ID|INDEXED LP STAR RP */ #line 1039 "parse.y" { yylhsminor.yy490 = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0, 0); } #line 4166 "parse.c" yymsp[-3].minor.yy490 = yylhsminor.yy490; break; case 175: /* expr ::= ID|INDEXED LP distinct exprlist RP over_clause */ #line 1044 "parse.y" { yylhsminor.yy490 = sqlite3ExprFunction(pParse, yymsp[-2].minor.yy42, &yymsp[-5].minor.yy0, yymsp[-3].minor.yy96); sqlite3WindowAttach(pParse, yylhsminor.yy490, yymsp[0].minor.yy147); } #line 4175 "parse.c" yymsp[-5].minor.yy490 = yylhsminor.yy490; break; case 176: /* expr ::= ID|INDEXED LP STAR RP over_clause */ #line 1048 "parse.y" { yylhsminor.yy490 = sqlite3ExprFunction(pParse, 0, &yymsp[-4].minor.yy0, 0); sqlite3WindowAttach(pParse, yylhsminor.yy490, yymsp[0].minor.yy147); } #line 4184 "parse.c" yymsp[-4].minor.yy490 = yylhsminor.yy490; break; case 177: /* term ::= CTIME_KW */ #line 1054 "parse.y" { yylhsminor.yy490 = sqlite3ExprFunction(pParse, 0, &yymsp[0].minor.yy0, 0); } #line 4192 "parse.c" yymsp[0].minor.yy490 = yylhsminor.yy490; break; case 178: /* expr ::= LP nexprlist COMMA expr RP */ #line 1058 "parse.y" { ExprList *pList = sqlite3ExprListAppend(pParse, yymsp[-3].minor.yy42, yymsp[-1].minor.yy490); yymsp[-4].minor.yy490 = sqlite3PExpr(pParse, TK_VECTOR, 0, 0); if( yymsp[-4].minor.yy490 ){ yymsp[-4].minor.yy490->x.pList = pList; }else{ sqlite3ExprListDelete(pParse->db, pList); } } #line 4206 "parse.c" break; case 179: /* expr ::= expr AND expr */ case 180: /* expr ::= expr OR expr */ yytestcase(yyruleno==180); case 181: /* expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==181); case 182: /* expr ::= expr EQ|NE expr */ yytestcase(yyruleno==182); case 183: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==183); case 184: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==184); case 185: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==185); case 186: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==186); #line 1068 "parse.y" {yymsp[-2].minor.yy490=sqlite3PExpr(pParse,yymsp[-1].major,yymsp[-2].minor.yy490,yymsp[0].minor.yy490);} #line 4218 "parse.c" break; case 187: /* likeop ::= NOT LIKE_KW|MATCH */ #line 1082 "parse.y" {yymsp[-1].minor.yy0=yymsp[0].minor.yy0; yymsp[-1].minor.yy0.n|=0x80000000; /*yymsp[-1].minor.yy0-overwrite-yymsp[0].minor.yy0*/} #line 4223 "parse.c" break; case 188: /* expr ::= expr likeop expr */ #line 1083 "parse.y" { ExprList *pList; int bNot = yymsp[-1].minor.yy0.n & 0x80000000; yymsp[-1].minor.yy0.n &= 0x7fffffff; pList = sqlite3ExprListAppend(pParse,0, yymsp[0].minor.yy490); pList = sqlite3ExprListAppend(pParse,pList, yymsp[-2].minor.yy490); yymsp[-2].minor.yy490 = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy0, 0); if( bNot ) yymsp[-2].minor.yy490 = sqlite3PExpr(pParse, TK_NOT, yymsp[-2].minor.yy490, 0); if( yymsp[-2].minor.yy490 ) yymsp[-2].minor.yy490->flags |= EP_InfixFunc; } #line 4237 "parse.c" break; case 189: /* expr ::= expr likeop expr ESCAPE expr */ #line 1093 "parse.y" { ExprList *pList; int bNot = yymsp[-3].minor.yy0.n & 0x80000000; yymsp[-3].minor.yy0.n &= 0x7fffffff; pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy490); pList = sqlite3ExprListAppend(pParse,pList, yymsp[-4].minor.yy490); pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy490); yymsp[-4].minor.yy490 = sqlite3ExprFunction(pParse, pList, &yymsp[-3].minor.yy0, 0); if( bNot ) yymsp[-4].minor.yy490 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy490, 0); if( yymsp[-4].minor.yy490 ) yymsp[-4].minor.yy490->flags |= EP_InfixFunc; } #line 4252 "parse.c" break; case 190: /* expr ::= expr ISNULL|NOTNULL */ #line 1105 "parse.y" {yymsp[-1].minor.yy490 = sqlite3PExpr(pParse,yymsp[0].major,yymsp[-1].minor.yy490,0);} #line 4257 "parse.c" break; case 191: /* expr ::= expr NOT NULL */ #line 1106 "parse.y" {yymsp[-2].minor.yy490 = sqlite3PExpr(pParse,TK_NOTNULL,yymsp[-2].minor.yy490,0);} #line 4262 "parse.c" break; case 192: /* expr ::= expr IS expr */ #line 1127 "parse.y" { yymsp[-2].minor.yy490 = sqlite3PExpr(pParse,TK_IS,yymsp[-2].minor.yy490,yymsp[0].minor.yy490); binaryToUnaryIfNull(pParse, yymsp[0].minor.yy490, yymsp[-2].minor.yy490, TK_ISNULL); } #line 4270 "parse.c" break; case 193: /* expr ::= expr IS NOT expr */ #line 1131 "parse.y" { yymsp[-3].minor.yy490 = sqlite3PExpr(pParse,TK_ISNOT,yymsp[-3].minor.yy490,yymsp[0].minor.yy490); binaryToUnaryIfNull(pParse, yymsp[0].minor.yy490, yymsp[-3].minor.yy490, TK_NOTNULL); } #line 4278 "parse.c" break; case 194: /* expr ::= NOT expr */ case 195: /* expr ::= BITNOT expr */ yytestcase(yyruleno==195); #line 1137 "parse.y" {yymsp[-1].minor.yy490 = sqlite3PExpr(pParse, yymsp[-1].major, yymsp[0].minor.yy490, 0);/*A-overwrites-B*/} #line 4284 "parse.c" break; case 196: /* expr ::= PLUS|MINUS expr */ #line 1140 "parse.y" { yymsp[-1].minor.yy490 = sqlite3PExpr(pParse, yymsp[-1].major==TK_PLUS ? TK_UPLUS : TK_UMINUS, yymsp[0].minor.yy490, 0); /*A-overwrites-B*/ } #line 4292 "parse.c" break; case 197: /* between_op ::= BETWEEN */ case 200: /* in_op ::= IN */ yytestcase(yyruleno==200); #line 1146 "parse.y" {yymsp[0].minor.yy96 = 0;} #line 4298 "parse.c" break; case 199: /* expr ::= expr between_op expr AND expr */ #line 1148 "parse.y" { ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy490); pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy490); yymsp[-4].minor.yy490 = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy490, 0); if( yymsp[-4].minor.yy490 ){ yymsp[-4].minor.yy490->x.pList = pList; }else{ sqlite3ExprListDelete(pParse->db, pList); } if( yymsp[-3].minor.yy96 ) yymsp[-4].minor.yy490 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy490, 0); } #line 4313 "parse.c" break; case 202: /* expr ::= expr in_op LP exprlist RP */ #line 1163 "parse.y" { if( yymsp[-1].minor.yy42==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. */ if( IN_RENAME_OBJECT==0 ){ sqlite3ExprDelete(pParse->db, yymsp[-4].minor.yy490); yymsp[-4].minor.yy490 = sqlite3ExprAlloc(pParse->db, TK_INTEGER,&sqlite3IntTokens[yymsp[-3].minor.yy96],1); } }else if( yymsp[-1].minor.yy42->nExpr==1 ){ /* Expressions of the form: ** ** expr1 IN (?1) ** expr1 NOT IN (?2) ** ** with exactly one value on the RHS can be simplified to something ** like this: ** ** expr1 == ?1 ** expr1 <> ?2 ** ** But, the RHS of the == or <> is marked with the EP_Generic flag ** so that it may not contribute to the computation of comparison ** affinity or the collating sequence to use for comparison. Otherwise, ** the semantics would be subtly different from IN or NOT IN. */ Expr *pRHS = yymsp[-1].minor.yy42->a[0].pExpr; yymsp[-1].minor.yy42->a[0].pExpr = 0; sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy42); /* pRHS cannot be NULL because a malloc error would have been detected ** before now and control would have never reached this point */ if( ALWAYS(pRHS) ){ pRHS->flags &= ~EP_Collate; pRHS->flags |= EP_Generic; } yymsp[-4].minor.yy490 = sqlite3PExpr(pParse, yymsp[-3].minor.yy96 ? TK_NE : TK_EQ, yymsp[-4].minor.yy490, pRHS); }else{ yymsp[-4].minor.yy490 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy490, 0); if( yymsp[-4].minor.yy490 ){ yymsp[-4].minor.yy490->x.pList = yymsp[-1].minor.yy42; sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy490); }else{ sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy42); } if( yymsp[-3].minor.yy96 ) yymsp[-4].minor.yy490 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy490, 0); } } #line 4369 "parse.c" break; case 203: /* expr ::= LP select RP */ #line 1215 "parse.y" { yymsp[-2].minor.yy490 = sqlite3PExpr(pParse, TK_SELECT, 0, 0); sqlite3PExprAddSelect(pParse, yymsp[-2].minor.yy490, yymsp[-1].minor.yy423); } #line 4377 "parse.c" break; case 204: /* expr ::= expr in_op LP select RP */ #line 1219 "parse.y" { yymsp[-4].minor.yy490 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy490, 0); sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy490, yymsp[-1].minor.yy423); if( yymsp[-3].minor.yy96 ) yymsp[-4].minor.yy490 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy490, 0); } #line 4386 "parse.c" break; case 205: /* expr ::= expr in_op nm dbnm paren_exprlist */ #line 1224 "parse.y" { 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.yy42 ) sqlite3SrcListFuncArgs(pParse, pSelect ? pSrc : 0, yymsp[0].minor.yy42); yymsp[-4].minor.yy490 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy490, 0); sqlite3PExprAddSelect(pParse, yymsp[-4].minor.yy490, pSelect); if( yymsp[-3].minor.yy96 ) yymsp[-4].minor.yy490 = sqlite3PExpr(pParse, TK_NOT, yymsp[-4].minor.yy490, 0); } #line 4398 "parse.c" break; case 206: /* expr ::= EXISTS LP select RP */ #line 1232 "parse.y" { Expr *p; p = yymsp[-3].minor.yy490 = sqlite3PExpr(pParse, TK_EXISTS, 0, 0); sqlite3PExprAddSelect(pParse, p, yymsp[-1].minor.yy423); } #line 4407 "parse.c" break; case 207: /* expr ::= CASE case_operand case_exprlist case_else END */ #line 1240 "parse.y" { yymsp[-4].minor.yy490 = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy490, 0); if( yymsp[-4].minor.yy490 ){ yymsp[-4].minor.yy490->x.pList = yymsp[-1].minor.yy490 ? sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy42,yymsp[-1].minor.yy490) : yymsp[-2].minor.yy42; sqlite3ExprSetHeightAndFlags(pParse, yymsp[-4].minor.yy490); }else{ sqlite3ExprListDelete(pParse->db, yymsp[-2].minor.yy42); sqlite3ExprDelete(pParse->db, yymsp[-1].minor.yy490); } } #line 4421 "parse.c" break; case 208: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */ #line 1252 "parse.y" { yymsp[-4].minor.yy42 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy42, yymsp[-2].minor.yy490); yymsp[-4].minor.yy42 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy42, yymsp[0].minor.yy490); } #line 4429 "parse.c" break; case 209: /* case_exprlist ::= WHEN expr THEN expr */ #line 1256 "parse.y" { yymsp[-3].minor.yy42 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy490); yymsp[-3].minor.yy42 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy42, yymsp[0].minor.yy490); } #line 4437 "parse.c" break; case 212: /* case_operand ::= expr */ #line 1266 "parse.y" {yymsp[0].minor.yy490 = yymsp[0].minor.yy490; /*A-overwrites-X*/} #line 4442 "parse.c" break; case 215: /* nexprlist ::= nexprlist COMMA expr */ #line 1277 "parse.y" {yymsp[-2].minor.yy42 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy42,yymsp[0].minor.yy490);} #line 4447 "parse.c" break; case 216: /* nexprlist ::= expr */ #line 1279 "parse.y" {yymsp[0].minor.yy42 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy490); /*A-overwrites-Y*/} #line 4452 "parse.c" break; case 218: /* paren_exprlist ::= LP exprlist RP */ case 223: /* eidlist_opt ::= LP eidlist RP */ yytestcase(yyruleno==223); #line 1287 "parse.y" {yymsp[-2].minor.yy42 = yymsp[-1].minor.yy42;} #line 4458 "parse.c" break; case 219: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */ #line 1294 "parse.y" { sqlite3CreateIndex(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, sqlite3SrcListAppend(pParse,0,&yymsp[-4].minor.yy0,0), yymsp[-2].minor.yy42, yymsp[-10].minor.yy96, &yymsp[-11].minor.yy0, yymsp[0].minor.yy490, SQLITE_SO_ASC, yymsp[-8].minor.yy96, SQLITE_IDXTYPE_APPDEF); if( IN_RENAME_OBJECT && pParse->pNewIndex ){ sqlite3RenameTokenMap(pParse, pParse->pNewIndex->zName, &yymsp[-4].minor.yy0); } } #line 4470 "parse.c" break; case 220: /* uniqueflag ::= UNIQUE */ case 262: /* raisetype ::= ABORT */ yytestcase(yyruleno==262); #line 1304 "parse.y" {yymsp[0].minor.yy96 = OE_Abort;} #line 4476 "parse.c" break; case 221: /* uniqueflag ::= */ #line 1305 "parse.y" {yymsp[1].minor.yy96 = OE_None;} #line 4481 "parse.c" break; case 224: /* eidlist ::= eidlist COMMA nm collate sortorder */ #line 1355 "parse.y" { yymsp[-4].minor.yy42 = parserAddExprIdListTerm(pParse, yymsp[-4].minor.yy42, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy96, yymsp[0].minor.yy96); } #line 4488 "parse.c" break; case 225: /* eidlist ::= nm collate sortorder */ #line 1358 "parse.y" { yymsp[-2].minor.yy42 = parserAddExprIdListTerm(pParse, 0, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy96, yymsp[0].minor.yy96); /*A-overwrites-Y*/ } #line 4495 "parse.c" break; case 228: /* cmd ::= DROP INDEX ifexists fullname */ #line 1369 "parse.y" {sqlite3DropIndex(pParse, yymsp[0].minor.yy167, yymsp[-1].minor.yy96);} #line 4500 "parse.c" break; case 229: /* cmd ::= VACUUM vinto */ #line 1377 "parse.y" {sqlite3Vacuum(pParse,0,yymsp[0].minor.yy490);} #line 4505 "parse.c" break; case 230: /* cmd ::= VACUUM nm vinto */ #line 1378 "parse.y" {sqlite3Vacuum(pParse,&yymsp[-1].minor.yy0,yymsp[0].minor.yy490);} #line 4510 "parse.c" break; case 233: /* cmd ::= PRAGMA nm dbnm */ #line 1387 "parse.y" {sqlite3Pragma(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0);} #line 4515 "parse.c" break; case 234: /* cmd ::= PRAGMA nm dbnm EQ nmnum */ #line 1388 "parse.y" {sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);} #line 4520 "parse.c" break; case 235: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */ #line 1389 "parse.y" {sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);} #line 4525 "parse.c" break; case 236: /* cmd ::= PRAGMA nm dbnm EQ minus_num */ #line 1391 "parse.y" {sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);} #line 4530 "parse.c" break; case 237: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */ #line 1393 "parse.y" {sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,1);} #line 4535 "parse.c" break; case 240: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */ #line 1409 "parse.y" { 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.yy119, &all); } #line 4545 "parse.c" break; case 241: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */ #line 1418 "parse.y" { sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy96, yymsp[-4].minor.yy350.a, yymsp[-4].minor.yy350.b, yymsp[-2].minor.yy167, yymsp[0].minor.yy490, yymsp[-10].minor.yy96, yymsp[-8].minor.yy96); yymsp[-10].minor.yy0 = (yymsp[-6].minor.yy0.n==0?yymsp[-7].minor.yy0:yymsp[-6].minor.yy0); /*A-overwrites-T*/ } #line 4553 "parse.c" break; case 242: /* trigger_time ::= BEFORE|AFTER */ #line 1424 "parse.y" { yymsp[0].minor.yy96 = yymsp[0].major; /*A-overwrites-X*/ } #line 4558 "parse.c" break; case 243: /* trigger_time ::= INSTEAD OF */ #line 1425 "parse.y" { yymsp[-1].minor.yy96 = TK_INSTEAD;} #line 4563 "parse.c" break; case 244: /* trigger_time ::= */ #line 1426 "parse.y" { yymsp[1].minor.yy96 = TK_BEFORE; } #line 4568 "parse.c" break; case 245: /* trigger_event ::= DELETE|INSERT */ case 246: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==246); #line 1430 "parse.y" {yymsp[0].minor.yy350.a = yymsp[0].major; /*A-overwrites-X*/ yymsp[0].minor.yy350.b = 0;} #line 4574 "parse.c" break; case 247: /* trigger_event ::= UPDATE OF idlist */ #line 1432 "parse.y" {yymsp[-2].minor.yy350.a = TK_UPDATE; yymsp[-2].minor.yy350.b = yymsp[0].minor.yy336;} #line 4579 "parse.c" break; case 248: /* when_clause ::= */ case 267: /* key_opt ::= */ yytestcase(yyruleno==267); case 309: /* filter_opt ::= */ yytestcase(yyruleno==309); #line 1439 "parse.y" { yymsp[1].minor.yy490 = 0; } #line 4586 "parse.c" break; case 249: /* when_clause ::= WHEN expr */ case 268: /* key_opt ::= KEY expr */ yytestcase(yyruleno==268); #line 1440 "parse.y" { yymsp[-1].minor.yy490 = yymsp[0].minor.yy490; } #line 4592 "parse.c" break; case 250: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */ #line 1444 "parse.y" { assert( yymsp[-2].minor.yy119!=0 ); yymsp[-2].minor.yy119->pLast->pNext = yymsp[-1].minor.yy119; yymsp[-2].minor.yy119->pLast = yymsp[-1].minor.yy119; } #line 4601 "parse.c" break; case 251: /* trigger_cmd_list ::= trigger_cmd SEMI */ #line 1449 "parse.y" { assert( yymsp[-1].minor.yy119!=0 ); yymsp[-1].minor.yy119->pLast = yymsp[-1].minor.yy119; } #line 4609 "parse.c" break; case 252: /* trnm ::= nm DOT nm */ #line 1460 "parse.y" { yymsp[-2].minor.yy0 = yymsp[0].minor.yy0; sqlite3ErrorMsg(pParse, "qualified table names are not allowed on INSERT, UPDATE, and DELETE " "statements within triggers"); } #line 4619 "parse.c" break; case 253: /* tridxby ::= INDEXED BY nm */ #line 1472 "parse.y" { sqlite3ErrorMsg(pParse, "the INDEXED BY clause is not allowed on UPDATE or DELETE statements " "within triggers"); } #line 4628 "parse.c" break; case 254: /* tridxby ::= NOT INDEXED */ #line 1477 "parse.y" { sqlite3ErrorMsg(pParse, "the NOT INDEXED clause is not allowed on UPDATE or DELETE statements " "within triggers"); } #line 4637 "parse.c" break; case 255: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt scanpt */ #line 1490 "parse.y" {yylhsminor.yy119 = sqlite3TriggerUpdateStep(pParse, &yymsp[-5].minor.yy0, yymsp[-2].minor.yy42, yymsp[-1].minor.yy490, yymsp[-6].minor.yy96, yymsp[-7].minor.yy0.z, yymsp[0].minor.yy464);} #line 4642 "parse.c" yymsp[-7].minor.yy119 = yylhsminor.yy119; break; case 256: /* trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */ #line 1494 "parse.y" { yylhsminor.yy119 = sqlite3TriggerInsertStep(pParse,&yymsp[-4].minor.yy0,yymsp[-3].minor.yy336,yymsp[-2].minor.yy423,yymsp[-6].minor.yy96,yymsp[-1].minor.yy266,yymsp[-7].minor.yy464,yymsp[0].minor.yy464);/*yylhsminor.yy119-overwrites-yymsp[-6].minor.yy96*/ } #line 4650 "parse.c" yymsp[-7].minor.yy119 = yylhsminor.yy119; break; case 257: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */ #line 1499 "parse.y" {yylhsminor.yy119 = sqlite3TriggerDeleteStep(pParse, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy490, yymsp[-5].minor.yy0.z, yymsp[0].minor.yy464);} #line 4656 "parse.c" yymsp[-5].minor.yy119 = yylhsminor.yy119; break; case 258: /* trigger_cmd ::= scanpt select scanpt */ #line 1503 "parse.y" {yylhsminor.yy119 = sqlite3TriggerSelectStep(pParse->db, yymsp[-1].minor.yy423, yymsp[-2].minor.yy464, yymsp[0].minor.yy464); /*yylhsminor.yy119-overwrites-yymsp[-1].minor.yy423*/} #line 4662 "parse.c" yymsp[-2].minor.yy119 = yylhsminor.yy119; break; case 259: /* expr ::= RAISE LP IGNORE RP */ #line 1506 "parse.y" { yymsp[-3].minor.yy490 = sqlite3PExpr(pParse, TK_RAISE, 0, 0); if( yymsp[-3].minor.yy490 ){ yymsp[-3].minor.yy490->affinity = OE_Ignore; } } #line 4673 "parse.c" break; case 260: /* expr ::= RAISE LP raisetype COMMA nm RP */ #line 1512 "parse.y" { yymsp[-5].minor.yy490 = sqlite3ExprAlloc(pParse->db, TK_RAISE, &yymsp[-1].minor.yy0, 1); if( yymsp[-5].minor.yy490 ) { yymsp[-5].minor.yy490->affinity = (char)yymsp[-3].minor.yy96; } } #line 4683 "parse.c" break; case 261: /* raisetype ::= ROLLBACK */ #line 1521 "parse.y" {yymsp[0].minor.yy96 = OE_Rollback;} #line 4688 "parse.c" break; case 263: /* raisetype ::= FAIL */ #line 1523 "parse.y" {yymsp[0].minor.yy96 = OE_Fail;} #line 4693 "parse.c" break; case 264: /* cmd ::= DROP TRIGGER ifexists fullname */ #line 1528 "parse.y" { sqlite3DropTrigger(pParse,yymsp[0].minor.yy167,yymsp[-1].minor.yy96); } #line 4700 "parse.c" break; case 265: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */ #line 1535 "parse.y" { sqlite3Attach(pParse, yymsp[-3].minor.yy490, yymsp[-1].minor.yy490, yymsp[0].minor.yy490); } #line 4707 "parse.c" break; case 266: /* cmd ::= DETACH database_kw_opt expr */ #line 1538 "parse.y" { sqlite3Detach(pParse, yymsp[0].minor.yy490); } #line 4714 "parse.c" break; case 269: /* cmd ::= REINDEX */ #line 1553 "parse.y" {sqlite3Reindex(pParse, 0, 0);} #line 4719 "parse.c" break; case 270: /* cmd ::= REINDEX nm dbnm */ #line 1554 "parse.y" {sqlite3Reindex(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);} #line 4724 "parse.c" break; case 271: /* cmd ::= ANALYZE */ #line 1559 "parse.y" {sqlite3Analyze(pParse, 0, 0);} #line 4729 "parse.c" break; case 272: /* cmd ::= ANALYZE nm dbnm */ #line 1560 "parse.y" {sqlite3Analyze(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);} #line 4734 "parse.c" break; case 273: /* cmd ::= ALTER TABLE fullname RENAME TO nm */ #line 1565 "parse.y" { sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy167,&yymsp[0].minor.yy0); } #line 4741 "parse.c" break; case 274: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt columnname carglist */ #line 1569 "parse.y" { yymsp[-1].minor.yy0.n = (int)(pParse->sLastToken.z-yymsp[-1].minor.yy0.z) + pParse->sLastToken.n; sqlite3AlterFinishAddColumn(pParse, &yymsp[-1].minor.yy0); } #line 4749 "parse.c" break; case 275: /* add_column_fullname ::= fullname */ #line 1573 "parse.y" { disableLookaside(pParse); sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy167); } #line 4757 "parse.c" break; case 276: /* cmd ::= ALTER TABLE fullname RENAME kwcolumn_opt nm TO nm */ #line 1577 "parse.y" { sqlite3AlterRenameColumn(pParse, yymsp[-5].minor.yy167, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } #line 4764 "parse.c" break; case 277: /* cmd ::= create_vtab */ #line 1588 "parse.y" {sqlite3VtabFinishParse(pParse,0);} #line 4769 "parse.c" break; case 278: /* cmd ::= create_vtab LP vtabarglist RP */ #line 1589 "parse.y" {sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);} #line 4774 "parse.c" break; case 279: /* create_vtab ::= createkw VIRTUAL TABLE ifnotexists nm dbnm USING nm */ #line 1591 "parse.y" { sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-4].minor.yy96); } #line 4781 "parse.c" break; case 280: /* vtabarg ::= */ #line 1596 "parse.y" {sqlite3VtabArgInit(pParse);} #line 4786 "parse.c" break; case 281: /* vtabargtoken ::= ANY */ case 282: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==282); case 283: /* lp ::= LP */ yytestcase(yyruleno==283); #line 1598 "parse.y" {sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);} #line 4793 "parse.c" break; case 284: /* with ::= WITH wqlist */ case 285: /* with ::= WITH RECURSIVE wqlist */ yytestcase(yyruleno==285); #line 1613 "parse.y" { sqlite3WithPush(pParse, yymsp[0].minor.yy499, 1); } #line 4799 "parse.c" break; case 286: /* wqlist ::= nm eidlist_opt AS LP select RP */ #line 1616 "parse.y" { yymsp[-5].minor.yy499 = sqlite3WithAdd(pParse, 0, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy42, yymsp[-1].minor.yy423); /*A-overwrites-X*/ } #line 4806 "parse.c" break; case 287: /* wqlist ::= wqlist COMMA nm eidlist_opt AS LP select RP */ #line 1619 "parse.y" { yymsp[-7].minor.yy499 = sqlite3WithAdd(pParse, yymsp[-7].minor.yy499, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy42, yymsp[-1].minor.yy423); } #line 4813 "parse.c" break; case 288: /* windowdefn_list ::= windowdefn */ #line 1633 "parse.y" { yylhsminor.yy147 = yymsp[0].minor.yy147; } #line 4818 "parse.c" yymsp[0].minor.yy147 = yylhsminor.yy147; break; case 289: /* windowdefn_list ::= windowdefn_list COMMA windowdefn */ #line 1634 "parse.y" { assert( yymsp[0].minor.yy147!=0 ); yymsp[0].minor.yy147->pNextWin = yymsp[-2].minor.yy147; yylhsminor.yy147 = yymsp[0].minor.yy147; } #line 4828 "parse.c" yymsp[-2].minor.yy147 = yylhsminor.yy147; break; case 290: /* windowdefn ::= nm AS window */ #line 1642 "parse.y" { if( ALWAYS(yymsp[0].minor.yy147) ){ yymsp[0].minor.yy147->zName = sqlite3DbStrNDup(pParse->db, yymsp[-2].minor.yy0.z, yymsp[-2].minor.yy0.n); } yylhsminor.yy147 = yymsp[0].minor.yy147; } #line 4839 "parse.c" yymsp[-2].minor.yy147 = yylhsminor.yy147; break; case 291: /* window ::= LP part_opt orderby_opt frame_opt RP */ #line 1670 "parse.y" { yymsp[-4].minor.yy147 = yymsp[-1].minor.yy147; if( ALWAYS(yymsp[-4].minor.yy147) ){ yymsp[-4].minor.yy147->pPartition = yymsp[-3].minor.yy42; yymsp[-4].minor.yy147->pOrderBy = yymsp[-2].minor.yy42; } } #line 4851 "parse.c" break; case 292: /* part_opt ::= PARTITION BY nexprlist */ #line 1678 "parse.y" { yymsp[-2].minor.yy42 = yymsp[0].minor.yy42; } #line 4856 "parse.c" break; case 293: /* part_opt ::= */ #line 1679 "parse.y" { yymsp[1].minor.yy42 = 0; } #line 4861 "parse.c" break; case 294: /* frame_opt ::= */ #line 1681 "parse.y" { yymsp[1].minor.yy147 = sqlite3WindowAlloc(pParse, TK_RANGE, TK_UNBOUNDED, 0, TK_CURRENT, 0); } #line 4868 "parse.c" break; case 295: /* frame_opt ::= range_or_rows frame_bound_s */ #line 1684 "parse.y" { yylhsminor.yy147 = sqlite3WindowAlloc(pParse, yymsp[-1].minor.yy96, yymsp[0].minor.yy317.eType, yymsp[0].minor.yy317.pExpr, TK_CURRENT, 0); } #line 4875 "parse.c" yymsp[-1].minor.yy147 = yylhsminor.yy147; break; case 296: /* frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e */ #line 1687 "parse.y" { yylhsminor.yy147 = sqlite3WindowAlloc(pParse, yymsp[-4].minor.yy96, yymsp[-2].minor.yy317.eType, yymsp[-2].minor.yy317.pExpr, yymsp[0].minor.yy317.eType, yymsp[0].minor.yy317.pExpr); } #line 4883 "parse.c" yymsp[-4].minor.yy147 = yylhsminor.yy147; break; case 297: /* range_or_rows ::= RANGE */ #line 1691 "parse.y" { yymsp[0].minor.yy96 = TK_RANGE; } #line 4889 "parse.c" break; case 298: /* range_or_rows ::= ROWS */ #line 1692 "parse.y" { yymsp[0].minor.yy96 = TK_ROWS; } #line 4894 "parse.c" break; case 299: /* frame_bound_s ::= frame_bound */ case 301: /* frame_bound_e ::= frame_bound */ yytestcase(yyruleno==301); #line 1695 "parse.y" { yylhsminor.yy317 = yymsp[0].minor.yy317; } #line 4900 "parse.c" yymsp[0].minor.yy317 = yylhsminor.yy317; break; case 300: /* frame_bound_s ::= UNBOUNDED PRECEDING */ case 302: /* frame_bound_e ::= UNBOUNDED FOLLOWING */ yytestcase(yyruleno==302); #line 1696 "parse.y" {yymsp[-1].minor.yy317.eType = TK_UNBOUNDED; yymsp[-1].minor.yy317.pExpr = 0;} #line 4907 "parse.c" break; case 303: /* frame_bound ::= expr PRECEDING */ #line 1700 "parse.y" { yylhsminor.yy317.eType = TK_PRECEDING; yylhsminor.yy317.pExpr = yymsp[-1].minor.yy490; } #line 4912 "parse.c" yymsp[-1].minor.yy317 = yylhsminor.yy317; break; case 304: /* frame_bound ::= CURRENT ROW */ #line 1701 "parse.y" { yymsp[-1].minor.yy317.eType = TK_CURRENT ; yymsp[-1].minor.yy317.pExpr = 0; } #line 4918 "parse.c" break; case 305: /* frame_bound ::= expr FOLLOWING */ #line 1702 "parse.y" { yylhsminor.yy317.eType = TK_FOLLOWING; yylhsminor.yy317.pExpr = yymsp[-1].minor.yy490; } #line 4923 "parse.c" yymsp[-1].minor.yy317 = yylhsminor.yy317; break; case 306: /* window_clause ::= WINDOW windowdefn_list */ #line 1706 "parse.y" { yymsp[-1].minor.yy147 = yymsp[0].minor.yy147; } #line 4929 "parse.c" break; case 307: /* over_clause ::= filter_opt OVER window */ #line 1710 "parse.y" { yylhsminor.yy147 = yymsp[0].minor.yy147; assert( yylhsminor.yy147!=0 ); yylhsminor.yy147->pFilter = yymsp[-2].minor.yy490; } #line 4938 "parse.c" yymsp[-2].minor.yy147 = yylhsminor.yy147; break; case 308: /* over_clause ::= filter_opt OVER nm */ #line 1715 "parse.y" { yylhsminor.yy147 = (Window*)sqlite3DbMallocZero(pParse->db, sizeof(Window)); if( yylhsminor.yy147 ){ yylhsminor.yy147->zName = sqlite3DbStrNDup(pParse->db, yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n); yylhsminor.yy147->pFilter = yymsp[-2].minor.yy490; }else{ sqlite3ExprDelete(pParse->db, yymsp[-2].minor.yy490); } } #line 4952 "parse.c" yymsp[-2].minor.yy147 = yylhsminor.yy147; break; case 310: /* filter_opt ::= FILTER LP WHERE expr RP */ #line 1726 "parse.y" { yymsp[-4].minor.yy490 = yymsp[-1].minor.yy490; } #line 4958 "parse.c" break; default: /* (311) input ::= cmdlist */ yytestcase(yyruleno==311); /* (312) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==312); /* (313) cmdlist ::= ecmd (OPTIMIZED OUT) */ assert(yyruleno!=313); /* (314) ecmd ::= SEMI */ yytestcase(yyruleno==314); /* (315) ecmd ::= cmdx SEMI */ yytestcase(yyruleno==315); /* (316) ecmd ::= explain cmdx */ yytestcase(yyruleno==316); /* (317) trans_opt ::= */ yytestcase(yyruleno==317); /* (318) trans_opt ::= TRANSACTION */ yytestcase(yyruleno==318); /* (319) trans_opt ::= TRANSACTION nm */ yytestcase(yyruleno==319); /* (320) savepoint_opt ::= SAVEPOINT */ yytestcase(yyruleno==320); /* (321) savepoint_opt ::= */ yytestcase(yyruleno==321); /* (322) cmd ::= create_table create_table_args */ yytestcase(yyruleno==322); /* (323) columnlist ::= columnlist COMMA columnname carglist */ yytestcase(yyruleno==323); /* (324) columnlist ::= columnname carglist */ yytestcase(yyruleno==324); /* (325) nm ::= ID|INDEXED */ yytestcase(yyruleno==325); /* (326) nm ::= STRING */ yytestcase(yyruleno==326); /* (327) nm ::= JOIN_KW */ yytestcase(yyruleno==327); /* (328) typetoken ::= typename */ yytestcase(yyruleno==328); /* (329) typename ::= ID|STRING */ yytestcase(yyruleno==329); /* (330) signed ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=330); /* (331) signed ::= minus_num (OPTIMIZED OUT) */ assert(yyruleno!=331); /* (332) carglist ::= carglist ccons */ yytestcase(yyruleno==332); /* (333) carglist ::= */ yytestcase(yyruleno==333); /* (334) ccons ::= NULL onconf */ yytestcase(yyruleno==334); /* (335) conslist_opt ::= COMMA conslist */ yytestcase(yyruleno==335); /* (336) conslist ::= conslist tconscomma tcons */ yytestcase(yyruleno==336); /* (337) conslist ::= tcons (OPTIMIZED OUT) */ assert(yyruleno!=337); /* (338) tconscomma ::= */ yytestcase(yyruleno==338); /* (339) defer_subclause_opt ::= defer_subclause (OPTIMIZED OUT) */ assert(yyruleno!=339); /* (340) resolvetype ::= raisetype (OPTIMIZED OUT) */ assert(yyruleno!=340); /* (341) selectnowith ::= oneselect (OPTIMIZED OUT) */ assert(yyruleno!=341); /* (342) oneselect ::= values */ yytestcase(yyruleno==342); /* (343) sclp ::= selcollist COMMA */ yytestcase(yyruleno==343); /* (344) as ::= ID|STRING */ yytestcase(yyruleno==344); /* (345) expr ::= term (OPTIMIZED OUT) */ assert(yyruleno!=345); /* (346) likeop ::= LIKE_KW|MATCH */ yytestcase(yyruleno==346); /* (347) exprlist ::= nexprlist */ yytestcase(yyruleno==347); /* (348) nmnum ::= plus_num (OPTIMIZED OUT) */ assert(yyruleno!=348); /* (349) nmnum ::= nm (OPTIMIZED OUT) */ assert(yyruleno!=349); /* (350) nmnum ::= ON */ yytestcase(yyruleno==350); /* (351) nmnum ::= DELETE */ yytestcase(yyruleno==351); /* (352) nmnum ::= DEFAULT */ yytestcase(yyruleno==352); /* (353) plus_num ::= INTEGER|FLOAT */ yytestcase(yyruleno==353); /* (354) foreach_clause ::= */ yytestcase(yyruleno==354); /* (355) foreach_clause ::= FOR EACH ROW */ yytestcase(yyruleno==355); /* (356) trnm ::= nm */ yytestcase(yyruleno==356); /* (357) tridxby ::= */ yytestcase(yyruleno==357); /* (358) database_kw_opt ::= DATABASE */ yytestcase(yyruleno==358); /* (359) database_kw_opt ::= */ yytestcase(yyruleno==359); /* (360) kwcolumn_opt ::= */ yytestcase(yyruleno==360); /* (361) kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==361); /* (362) vtabarglist ::= vtabarg */ yytestcase(yyruleno==362); /* (363) vtabarglist ::= vtabarglist COMMA vtabarg */ yytestcase(yyruleno==363); /* (364) vtabarg ::= vtabarg vtabargtoken */ yytestcase(yyruleno==364); /* (365) anylist ::= */ yytestcase(yyruleno==365); /* (366) anylist ::= anylist LP anylist RP */ yytestcase(yyruleno==366); /* (367) anylist ::= anylist ANY */ yytestcase(yyruleno==367); /* (368) with ::= */ yytestcase(yyruleno==368); break; /********** End reduce actions ************************************************/ }; assert( yyrulenoYY_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 ****************************************/ #line 33 "parse.y" UNUSED_PARAMETER(yymajor); /* Silence some compiler warnings */ if( TOKEN.z[0] ){ sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN); }else{ sqlite3ErrorMsg(pParse, "incomplete input"); } #line 5086 "parse.c" /************ 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: **
    **
  • A pointer to the parser (an opaque structure.) **
  • The major token number. **
  • The minor token number. **
  • An option argument of a grammar-specified type. **
** ** 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 do{ assert( yyact==yypParser->yytos->stateno ); yyact = yy_find_shift_action((YYCODETYPE)yymajor,yyact); if( yyact >= YY_MIN_REDUCE ){ yyact = yy_reduce(yypParser,yyact-YY_MIN_REDUCE,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 } }while( yypParser->yytos>yypParser->yystack ); #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 if( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) ){ return yyFallback[iToken]; } #else (void)iToken; #endif return 0; }