/* Driver template for the LEMON parser generator. ** The author disclaims copyright to this source code. ** ** This version of "lempar.c" is modified, slightly, for use by SQLite. ** The only modifications are the addition of a couple of NEVER() ** macros to disable tests that are needed in the case of a general ** LALR(1) grammar but which are always false in the ** specific grammar used by SQLite. */ /* First off, code is included that follows the "include" declaration ** in the input grammar file. */ #include #include "token.h" #include "parsercontext.h" #include "parser_helper_stubs.h" #include "common/utils_sql.h" #include "common/global.h" #include "common/unused.h" #include "parser/ast/sqlitealtertable.h" #include "parser/ast/sqliteanalyze.h" #include "parser/ast/sqliteattach.h" #include "parser/ast/sqlitebegintrans.h" #include "parser/ast/sqlitecommittrans.h" #include "parser/ast/sqlitecreateindex.h" #include "parser/ast/sqlitecreatetable.h" #include "parser/ast/sqlitecreatetrigger.h" #include "parser/ast/sqlitecreateview.h" #include "parser/ast/sqlitecreatevirtualtable.h" #include "parser/ast/sqlitedelete.h" #include "parser/ast/sqlitedetach.h" #include "parser/ast/sqlitedropindex.h" #include "parser/ast/sqlitedroptable.h" #include "parser/ast/sqlitedroptrigger.h" #include "parser/ast/sqlitedropview.h" #include "parser/ast/sqliteemptyquery.h" #include "parser/ast/sqliteinsert.h" #include "parser/ast/sqlitepragma.h" #include "parser/ast/sqlitereindex.h" #include "parser/ast/sqliterelease.h" #include "parser/ast/sqliterollback.h" #include "parser/ast/sqlitesavepoint.h" #include "parser/ast/sqliteselect.h" #include "parser/ast/sqliteupdate.h" #include "parser/ast/sqlitevacuum.h" #include "parser/ast/sqliteexpr.h" #include "parser/ast/sqlitecolumntype.h" #include "parser/ast/sqliteconflictalgo.h" #include "parser/ast/sqlitesortorder.h" #include "parser/ast/sqliteindexedcolumn.h" #include "parser/ast/sqliteforeignkey.h" #include "parser/ast/sqlitewith.h" #include "parser/ast/sqliteupsert.h" #include "parser/ast/sqlitewindowdefinition.h" #include "parser/ast/sqlitefilterover.h" #include "parser/ast/sqlitenulls.h" #include #include #include #define assert(X) Q_ASSERT(X) #define UNUSED_PARAMETER(X) (void)(X) #define DONT_INHERIT_TOKENS(X) noTokenInheritanceFields << X /* Next is all token values, in a form suitable for use by makeheaders. ** This section will be null unless lemon is run with the -m switch. */ /* ** These constants (all generated automatically by the parser generator) ** specify the various kinds of tokens (terminals) that the parser ** understands. ** ** Each symbol here is a terminal symbol in the grammar. */ /* Make sure the INTERFACE macro is defined. */ #ifndef INTERFACE # define INTERFACE 1 #endif /* The next thing included is series of defines which control ** various aspects of the generated parser. ** YYCODETYPE is the data type used for storing terminal ** and nonterminal numbers. "unsigned char" is ** used if there are fewer than 250 terminals ** and nonterminals. "int" is used otherwise. ** YYNOCODE is a number of type YYCODETYPE which corresponds ** to no legal terminal or nonterminal number. This ** number is used to fill in empty slots of the hash ** table. ** YYFALLBACK If defined, this indicates that one or more tokens ** have fall-back values which should be used if the ** original value of the token will not parse. ** YYACTIONTYPE is the data type used for storing terminal ** and nonterminal numbers. "unsigned char" is ** used if there are fewer than 250 rules and ** states combined. "int" is used otherwise. ** sqlite3_parseTOKENTYPE is the data type used for minor tokens given ** directly to the parser from the tokenizer. ** YYMINORTYPE is the data type used for all minor tokens. ** This is typically a union of many types, one of ** which is sqlite3_parseTOKENTYPE. The entry in the union ** for base tokens is called "yy0". ** YYSTACKDEPTH is the maximum depth of the parser's stack. If ** zero the stack is dynamically sized using realloc() ** sqlite3_parseARG_SDECL A static variable declaration for the %extra_argument ** sqlite3_parseARG_PDECL A parameter declaration for the %extra_argument ** sqlite3_parseARG_STORE Code to store %extra_argument into yypParser ** sqlite3_parseARG_FETCH Code to extract %extra_argument from yypParser ** YYNSTATE the combined number of states. ** YYNRULE the number of rules in the grammar ** YYERRORSYMBOL is the code number of the error symbol. If not ** defined, then do no error processing. */ #define YYCODETYPE unsigned short int #define YYNOCODE 329 #define YYACTIONTYPE unsigned short int #define YYWILDCARD 80 #define sqlite3_parseTOKENTYPE Token* typedef union { int yyinit; sqlite3_parseTOKENTYPE yy0; SqliteLimit* yy4; SqliteWindowDefinition::Window* yy14; SqliteUpsert* yy16; ParserCteList* yy17; SqliteWindowDefinition::Window::Frame::RangeOrRows* yy34; bool* yy35; ParserExprNestedList* yy54; ParserFkConditionList* yy56; SqliteCreateTable::Column::Constraint* yy64; SqliteConflictAlgo* yy66; SqliteSelect* yy73; SqliteWindowDefinition* yy74; SqliteNulls* yy99; ParserStubTransDetails* yy100; SqliteExpr::LikeOp* yy104; SqliteCreateTable::Column* yy115; SqliteCreateTable::Constraint* yy166; SqliteExpr* yy176; ParserOtherSourceList* yy195; ParserCreateTableOptionList* yy217; ParserDeferSubClause* yy218; ParserIndexedBy* yy224; SqliteFilterOver::Over* yy231; ParserCreateTableColumnList* yy234; QString* yy255; ParserCreateTableColumnConstraintList* yy259; SqliteFilterOver::Filter* yy269; ParserStubAlias* yy280; ParserStubInsertOrReplace* yy281; SqliteWith* yy321; SqliteSelect::Core::JoinSource* yy335; QStringList* yy336; SqliteWindowDefinition::Window::Frame::Exclude* yy337; SqliteWith::CommonTableExpression* yy366; SqliteWith::CommonTableExpression::AsMode* yy383; SqliteSelect::Core::SingleSource* yy393; SqliteWindowDefinition::Window::Frame::Bound* yy394; SqliteCreateTrigger::Scope* yy403; SqliteCreateTrigger::Event* yy407; ParserResultColumnList* yy421; SqliteSelect::Core::JoinConstraint* yy423; SqliteSelect::Core* yy438; ParserCreateTableConstraintList* yy445; SqliteSelect::Core::JoinOp* yy461; SqliteFilterOver* yy487; SqliteForeignKey::Condition::Reaction* yy488; ParserOrderByList* yy499; ParserFullName* yy520; ParserIndexedColumnList* yy527; SqliteInitially* yy536; SqliteIndexedColumn* yy540; ParserTermOrLiteral* yy542; ParserWindowDefList* yy555; int* yy562; ParserExprList* yy567; ParserStubExplain* yy571; SqliteSelect::CompoundOperator* yy574; ParserQueryList* yy575; SqliteWindowDefinition::Window::Frame* yy585; SqliteForeignKey::Condition* yy587; SqliteColumnType* yy601; ParserStubCreateTableOption* yy607; SqliteCreateTrigger::Time* yy612; ParserSetValueList* yy617; QVariant* yy629; SqliteQuery* yy635; SqliteSortOrder* yy645; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 #endif #define sqlite3_parseARG_SDECL ParserContext* parserContext; #define sqlite3_parseARG_PDECL ,ParserContext* parserContext #define sqlite3_parseARG_FETCH ParserContext* parserContext = yypParser->parserContext #define sqlite3_parseARG_STORE yypParser->parserContext = parserContext #define YYNSTATE 871 #define YYNRULE 490 #define YYFALLBACK 1 #define YY_NO_ACTION (YYNSTATE+YYNRULE+2) #define YY_ACCEPT_ACTION (YYNSTATE+YYNRULE+1) #define YY_ERROR_ACTION (YYNSTATE+YYNRULE) #define GET_CONTEXT yyParser* yypParser = pParser; sqlite3_parseARG_FETCH /* The yyzerominor constant is used to initialize instances of ** YYMINORTYPE objects to zero. */ static const YYMINORTYPE yyzerominor = { 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 < YYNSTATE Shift N. That is, push the lookahead ** token onto the stack and goto state N. ** ** YYNSTATE <= N < YYNSTATE+YYNRULE Reduce by rule N-YYNSTATE. ** ** N == YYNSTATE+YYNRULE A syntax error has occurred. ** ** N == YYNSTATE+YYNRULE+1 The parser accepts its input. ** ** N == YYNSTATE+YYNRULE+2 No such action. Denotes unused ** slots in the yy_action[] table. ** ** The action table is constructed as a single large table named yy_action[]. ** Given state S and lookahead X, the action is computed as ** ** yy_action[ yy_shift_ofst[S] + X ] ** ** If the index value yy_shift_ofst[S]+X is out of range or if the value ** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X or if yy_shift_ofst[S] ** is equal to YY_SHIFT_USE_DFLT, it means that the action is not in the table ** and that yy_default[S] should be used instead. ** ** The formula above is 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 and YY_REDUCE_USE_DFLT is used in place of ** YY_SHIFT_USE_DFLT. ** ** 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. */ #define YY_ACTTAB_COUNT (2846) static const YYACTIONTYPE yy_action[] = { /* 0 */ 531, 62, 62, 62, 61, 59, 263, 27, 67, 68, /* 10 */ 530, 283, 522, 694, 819, 819, 65, 65, 66, 66, /* 20 */ 66, 66, 837, 64, 64, 64, 64, 63, 63, 62, /* 30 */ 62, 62, 61, 59, 263, 465, 1234, 808, 67, 68, /* 40 */ 530, 283, 58, 135, 819, 819, 65, 65, 66, 66, /* 50 */ 66, 66, 527, 64, 64, 64, 64, 63, 63, 62, /* 60 */ 62, 62, 61, 59, 263, 381, 1284, 282, 281, 796, /* 70 */ 659, 261, 78, 809, 194, 66, 66, 66, 66, 56, /* 80 */ 64, 64, 64, 64, 63, 63, 62, 62, 62, 61, /* 90 */ 59, 263, 835, 863, 23, 836, 53, 54, 716, 615, /* 100 */ 831, 796, 520, 261, 55, 1043, 834, 634, 801, 800, /* 110 */ 531, 829, 2, 1043, 833, 832, 831, 817, 1043, 840, /* 120 */ 752, 519, 522, 831, 860, 862, 355, 666, 460, 834, /* 130 */ 1109, 251, 250, 249, 830, 223, 817, 833, 832, 831, /* 140 */ 862, 1043, 752, 529, 609, 80, 863, 128, 752, 292, /* 150 */ 863, 265, 868, 412, 1043, 432, 1043, 1043, 829, 367, /* 160 */ 1043, 291, 527, 163, 369, 1043, 1043, 1043, 1043, 1043, /* 170 */ 1043, 817, 862, 610, 817, 612, 807, 12, 611, 141, /* 180 */ 82, 830, 230, 809, 620, 308, 443, 318, 1043, 56, /* 190 */ 529, 863, 132, 862, 776, 285, 474, 366, 325, 21, /* 200 */ 428, 328, 368, 183, 806, 72, 53, 54, 109, 89, /* 210 */ 724, 81, 810, 127, 55, 1109, 861, 860, 484, 469, /* 220 */ 531, 162, 2, 1109, 457, 454, 453, 817, 1109, 725, /* 230 */ 286, 519, 522, 831, 860, 341, 513, 810, 779, 834, /* 240 */ 561, 382, 452, 523, 724, 365, 817, 833, 832, 831, /* 250 */ 370, 1109, 181, 340, 862, 1060, 1060, 116, 72, 74, /* 260 */ 562, 563, 113, 724, 1109, 387, 1109, 1109, 287, 861, /* 270 */ 860, 810, 527, 861, 860, 1109, 1109, 1109, 1109, 682, /* 280 */ 1109, 817, 725, 672, 817, 73, 807, 12, 407, 804, /* 290 */ 803, 383, 863, 809, 501, 747, 4, 724, 1109, 56, /* 300 */ 64, 64, 64, 64, 63, 63, 62, 62, 62, 61, /* 310 */ 59, 263, 344, 461, 861, 860, 53, 54, 61, 59, /* 320 */ 263, 627, 829, 107, 55, 1094, 354, 816, 413, 671, /* 330 */ 470, 264, 2, 1094, 564, 799, 862, 817, 1094, 822, /* 340 */ 862, 519, 822, 831, 860, 830, 230, 498, 473, 834, /* 350 */ 710, 709, 818, 503, 529, 658, 817, 833, 832, 831, /* 360 */ 364, 1094, 816, 859, 799, 644, 92, 862, 122, 862, /* 370 */ 857, 673, 674, 499, 1094, 829, 1094, 1094, 829, 858, /* 380 */ 1199, 1199, 484, 471, 142, 1094, 503, 1094, 1094, 862, /* 390 */ 1094, 817, 862, 772, 817, 759, 807, 12, 830, 201, /* 400 */ 862, 830, 215, 771, 1, 382, 177, 529, 1094, 828, /* 410 */ 529, 705, 705, 863, 1204, 861, 860, 790, 399, 67, /* 420 */ 68, 530, 283, 1199, 1199, 819, 819, 65, 65, 66, /* 430 */ 66, 66, 66, 822, 64, 64, 64, 64, 63, 63, /* 440 */ 62, 62, 62, 61, 59, 263, 63, 63, 62, 62, /* 450 */ 62, 61, 59, 263, 39, 143, 172, 163, 776, 431, /* 460 */ 506, 776, 822, 1199, 1199, 822, 504, 769, 254, 67, /* 470 */ 68, 530, 283, 69, 821, 819, 819, 65, 65, 66, /* 480 */ 66, 66, 66, 91, 64, 64, 64, 64, 63, 63, /* 490 */ 62, 62, 62, 61, 59, 263, 497, 449, 760, 754, /* 500 */ 768, 735, 67, 68, 530, 283, 1199, 1199, 819, 819, /* 510 */ 65, 65, 66, 66, 66, 66, 589, 64, 64, 64, /* 520 */ 64, 63, 63, 62, 62, 62, 61, 59, 263, 789, /* 530 */ 345, 586, 782, 863, 561, 810, 861, 860, 603, 604, /* 540 */ 425, 788, 176, 45, 862, 8, 57, 172, 862, 729, /* 550 */ 388, 14, 373, 1311, 562, 414, 822, 863, 1311, 387, /* 560 */ 810, 1199, 1199, 81, 728, 335, 689, 372, 588, 813, /* 570 */ 1204, 516, 1204, 66, 66, 66, 66, 40, 64, 64, /* 580 */ 64, 64, 63, 63, 62, 62, 62, 61, 59, 263, /* 590 */ 688, 863, 735, 296, 810, 276, 300, 1205, 586, 607, /* 600 */ 67, 68, 530, 283, 1199, 1199, 819, 819, 65, 65, /* 610 */ 66, 66, 66, 66, 752, 64, 64, 64, 64, 63, /* 620 */ 63, 62, 62, 62, 61, 59, 263, 141, 415, 799, /* 630 */ 685, 417, 493, 863, 372, 587, 752, 658, 422, 863, /* 640 */ 302, 862, 752, 1199, 1199, 862, 684, 542, 92, 585, /* 650 */ 585, 862, 67, 68, 530, 283, 861, 860, 819, 819, /* 660 */ 65, 65, 66, 66, 66, 66, 812, 64, 64, 64, /* 670 */ 64, 63, 63, 62, 62, 62, 61, 59, 263, 811, /* 680 */ 861, 860, 67, 68, 530, 283, 1199, 1199, 819, 819, /* 690 */ 65, 65, 66, 66, 66, 66, 197, 64, 64, 64, /* 700 */ 64, 63, 63, 62, 62, 62, 61, 59, 263, 765, /* 710 */ 298, 844, 805, 657, 861, 860, 658, 1270, 162, 411, /* 720 */ 847, 457, 454, 453, 844, 862, 841, 92, 815, 42, /* 730 */ 862, 532, 765, 842, 1362, 190, 536, 3, 862, 452, /* 740 */ 118, 791, 468, 747, 4, 723, 116, 863, 492, 488, /* 750 */ 599, 167, 272, 1205, 645, 1205, 861, 860, 67, 68, /* 760 */ 530, 283, 861, 860, 819, 819, 65, 65, 66, 66, /* 770 */ 66, 66, 794, 64, 64, 64, 64, 63, 63, 62, /* 780 */ 62, 62, 61, 59, 263, 67, 68, 530, 283, 722, /* 790 */ 718, 819, 819, 65, 65, 66, 66, 66, 66, 869, /* 800 */ 64, 64, 64, 64, 63, 63, 62, 62, 62, 61, /* 810 */ 59, 263, 531, 1270, 345, 863, 355, 599, 835, 345, /* 820 */ 458, 836, 822, 598, 522, 801, 800, 483, 862, 419, /* 830 */ 862, 589, 863, 862, 822, 67, 68, 530, 283, 349, /* 840 */ 822, 819, 819, 65, 65, 66, 66, 66, 66, 822, /* 850 */ 64, 64, 64, 64, 63, 63, 62, 62, 62, 61, /* 860 */ 59, 263, 822, 829, 527, 122, 845, 373, 1310, 401, /* 870 */ 861, 860, 119, 1310, 348, 829, 354, 862, 745, 377, /* 880 */ 793, 81, 789, 482, 377, 809, 830, 215, 693, 862, /* 890 */ 862, 56, 593, 259, 788, 529, 704, 256, 830, 123, /* 900 */ 255, 708, 634, 472, 966, 743, 781, 529, 53, 54, /* 910 */ 173, 246, 245, 58, 736, 406, 55, 179, 126, 342, /* 920 */ 463, 337, 462, 164, 2, 1211, 517, 71, 779, 817, /* 930 */ 343, 700, 256, 519, 90, 831, 860, 335, 831, 609, /* 940 */ 80, 834, 1219, 698, 834, 822, 776, 505, 817, 833, /* 950 */ 832, 831, 833, 832, 831, 861, 860, 822, 776, 863, /* 960 */ 506, 717, 1206, 822, 1319, 1319, 838, 783, 610, 785, /* 970 */ 612, 780, 822, 611, 795, 664, 172, 343, 700, 196, /* 980 */ 294, 347, 256, 817, 754, 822, 817, 777, 807, 12, /* 990 */ 67, 68, 530, 283, 862, 429, 819, 819, 65, 65, /* 1000 */ 66, 66, 66, 66, 1208, 64, 64, 64, 64, 63, /* 1010 */ 63, 62, 62, 62, 61, 59, 263, 67, 68, 530, /* 1020 */ 283, 735, 775, 819, 819, 65, 65, 66, 66, 66, /* 1030 */ 66, 508, 64, 64, 64, 64, 63, 63, 62, 62, /* 1040 */ 62, 61, 59, 263, 67, 68, 530, 283, 47, 752, /* 1050 */ 819, 819, 65, 65, 66, 66, 66, 66, 355, 64, /* 1060 */ 64, 64, 64, 63, 63, 62, 62, 62, 61, 59, /* 1070 */ 263, 752, 862, 567, 46, 640, 640, 752, 67, 68, /* 1080 */ 530, 283, 861, 860, 819, 819, 65, 65, 66, 66, /* 1090 */ 66, 66, 51, 64, 64, 64, 64, 63, 63, 62, /* 1100 */ 62, 62, 61, 59, 263, 390, 247, 509, 863, 67, /* 1110 */ 68, 530, 283, 746, 699, 819, 819, 65, 65, 66, /* 1120 */ 66, 66, 66, 438, 64, 64, 64, 64, 63, 63, /* 1130 */ 62, 62, 62, 61, 59, 263, 44, 862, 863, 20, /* 1140 */ 863, 67, 68, 530, 283, 697, 48, 819, 819, 65, /* 1150 */ 65, 66, 66, 66, 66, 79, 64, 64, 64, 64, /* 1160 */ 63, 63, 62, 62, 62, 61, 59, 263, 255, 708, /* 1170 */ 792, 472, 67, 68, 530, 283, 44, 680, 819, 819, /* 1180 */ 65, 65, 66, 66, 66, 66, 507, 64, 64, 64, /* 1190 */ 64, 63, 63, 62, 62, 62, 61, 59, 263, 117, /* 1200 */ 268, 436, 863, 67, 68, 530, 283, 863, 195, 819, /* 1210 */ 819, 65, 65, 66, 66, 66, 66, 77, 64, 64, /* 1220 */ 64, 64, 63, 63, 62, 62, 62, 61, 59, 263, /* 1230 */ 502, 861, 860, 712, 67, 68, 530, 283, 58, 332, /* 1240 */ 819, 819, 65, 65, 66, 66, 66, 66, 863, 64, /* 1250 */ 64, 64, 64, 63, 63, 62, 62, 62, 61, 59, /* 1260 */ 263, 861, 860, 861, 860, 767, 67, 68, 530, 283, /* 1270 */ 721, 28, 819, 819, 65, 65, 66, 66, 66, 66, /* 1280 */ 736, 64, 64, 64, 64, 63, 63, 62, 62, 62, /* 1290 */ 61, 59, 263, 19, 1285, 67, 68, 530, 283, 737, /* 1300 */ 720, 819, 819, 65, 65, 66, 66, 66, 66, 864, /* 1310 */ 64, 64, 64, 64, 63, 63, 62, 62, 62, 61, /* 1320 */ 59, 263, 531, 1283, 333, 861, 860, 730, 450, 116, /* 1330 */ 861, 860, 648, 116, 522, 678, 762, 495, 67, 68, /* 1340 */ 530, 283, 649, 826, 819, 819, 65, 65, 66, 66, /* 1350 */ 66, 66, 135, 64, 64, 64, 64, 63, 63, 62, /* 1360 */ 62, 62, 61, 59, 263, 829, 663, 662, 531, 487, /* 1370 */ 867, 861, 860, 510, 527, 535, 52, 329, 50, 862, /* 1380 */ 522, 409, 540, 495, 667, 829, 634, 494, 830, 230, /* 1390 */ 863, 862, 740, 354, 79, 809, 862, 529, 829, 862, /* 1400 */ 761, 56, 740, 6, 863, 601, 862, 862, 830, 230, /* 1410 */ 602, 122, 862, 871, 486, 81, 862, 529, 53, 54, /* 1420 */ 527, 830, 123, 571, 80, 408, 55, 284, 5, 863, /* 1430 */ 529, 439, 271, 494, 2, 438, 173, 22, 423, 817, /* 1440 */ 756, 809, 411, 519, 518, 831, 860, 56, 382, 862, /* 1450 */ 531, 834, 570, 863, 569, 829, 442, 568, 817, 833, /* 1460 */ 832, 831, 522, 403, 53, 54, 22, 863, 511, 862, /* 1470 */ 175, 352, 55, 396, 430, 863, 755, 863, 830, 230, /* 1480 */ 2, 776, 122, 538, 783, 817, 829, 529, 863, 519, /* 1490 */ 863, 831, 860, 817, 863, 514, 817, 834, 807, 12, /* 1500 */ 862, 358, 527, 351, 817, 833, 832, 831, 752, 830, /* 1510 */ 123, 829, 266, 861, 860, 484, 485, 643, 529, 81, /* 1520 */ 115, 546, 869, 809, 753, 862, 500, 861, 860, 56, /* 1530 */ 752, 18, 987, 122, 830, 123, 752, 646, 382, 817, /* 1540 */ 546, 863, 817, 529, 807, 12, 53, 54, 17, 614, /* 1550 */ 863, 437, 861, 860, 55, 122, 173, 691, 174, 690, /* 1560 */ 852, 741, 2, 282, 281, 552, 16, 817, 546, 776, /* 1570 */ 863, 519, 11, 831, 860, 58, 861, 860, 863, 834, /* 1580 */ 521, 804, 803, 393, 171, 638, 817, 833, 832, 831, /* 1590 */ 861, 860, 594, 552, 776, 558, 81, 863, 861, 860, /* 1600 */ 861, 860, 1319, 1319, 801, 800, 76, 531, 560, 731, /* 1610 */ 559, 861, 860, 861, 860, 870, 3, 861, 860, 522, /* 1620 */ 180, 817, 495, 122, 817, 863, 807, 12, 67, 38, /* 1630 */ 530, 283, 1255, 170, 819, 819, 65, 65, 66, 66, /* 1640 */ 66, 66, 491, 64, 64, 64, 64, 63, 63, 62, /* 1650 */ 62, 62, 61, 59, 263, 829, 799, 594, 549, 527, /* 1660 */ 630, 784, 690, 525, 861, 860, 863, 326, 829, 862, /* 1670 */ 843, 327, 496, 861, 860, 829, 550, 549, 830, 230, /* 1680 */ 809, 862, 862, 285, 474, 310, 56, 529, 719, 862, /* 1690 */ 44, 830, 123, 861, 860, 555, 740, 863, 830, 230, /* 1700 */ 529, 861, 860, 53, 54, 549, 548, 529, 740, 112, /* 1710 */ 862, 55, 305, 591, 169, 484, 475, 44, 374, 2, /* 1720 */ 861, 860, 862, 168, 817, 736, 312, 354, 519, 129, /* 1730 */ 831, 860, 435, 829, 548, 489, 834, 173, 382, 829, /* 1740 */ 391, 862, 636, 817, 833, 832, 831, 862, 861, 860, /* 1750 */ 863, 776, 863, 862, 766, 4, 830, 215, 382, 751, /* 1760 */ 4, 555, 830, 211, 122, 529, 398, 395, 626, 750, /* 1770 */ 4, 529, 727, 863, 467, 636, 863, 478, 817, 267, /* 1780 */ 714, 817, 778, 807, 12, 740, 68, 530, 283, 861, /* 1790 */ 860, 819, 819, 65, 65, 66, 66, 66, 66, 862, /* 1800 */ 64, 64, 64, 64, 63, 63, 62, 62, 62, 61, /* 1810 */ 59, 263, 531, 736, 575, 7, 776, 713, 783, 81, /* 1820 */ 861, 860, 776, 736, 522, 321, 707, 530, 283, 270, /* 1830 */ 476, 819, 819, 65, 65, 66, 66, 66, 66, 862, /* 1840 */ 64, 64, 64, 64, 63, 63, 62, 62, 62, 61, /* 1850 */ 59, 263, 863, 346, 757, 829, 424, 829, 863, 850, /* 1860 */ 726, 575, 72, 1053, 527, 15, 711, 724, 354, 862, /* 1870 */ 275, 862, 863, 861, 860, 861, 860, 706, 830, 230, /* 1880 */ 830, 230, 862, 121, 863, 809, 725, 529, 165, 529, /* 1890 */ 572, 56, 702, 631, 748, 4, 861, 860, 37, 861, /* 1900 */ 860, 724, 1319, 1319, 865, 853, 87, 397, 53, 54, /* 1910 */ 749, 4, 631, 851, 531, 278, 55, 277, 862, 862, /* 1920 */ 829, 863, 466, 829, 2, 679, 522, 862, 120, 817, /* 1930 */ 138, 849, 274, 519, 862, 831, 860, 862, 382, 829, /* 1940 */ 382, 834, 863, 830, 230, 862, 830, 233, 817, 833, /* 1950 */ 832, 831, 529, 862, 256, 529, 715, 25, 572, 783, /* 1960 */ 317, 670, 830, 231, 269, 459, 527, 36, 778, 661, /* 1970 */ 846, 529, 456, 554, 862, 861, 860, 86, 85, 848, /* 1980 */ 402, 861, 860, 817, 862, 839, 817, 809, 807, 12, /* 1990 */ 827, 829, 24, 56, 816, 861, 860, 451, 863, 862, /* 2000 */ 863, 625, 334, 382, 862, 862, 776, 861, 860, 84, /* 2010 */ 53, 54, 863, 447, 830, 241, 531, 340, 55, 863, /* 2020 */ 625, 161, 776, 529, 639, 814, 2, 331, 522, 816, /* 2030 */ 10, 817, 829, 524, 193, 519, 157, 831, 860, 862, /* 2040 */ 746, 105, 863, 834, 861, 860, 862, 862, 829, 863, /* 2050 */ 817, 833, 832, 831, 863, 830, 240, 647, 103, 578, /* 2060 */ 35, 742, 862, 34, 529, 861, 860, 738, 527, 33, /* 2070 */ 32, 830, 242, 829, 776, 862, 1202, 863, 829, 102, /* 2080 */ 529, 862, 863, 394, 829, 817, 392, 862, 817, 809, /* 2090 */ 807, 12, 862, 578, 101, 56, 830, 243, 862, 309, /* 2100 */ 314, 830, 262, 733, 313, 529, 619, 830, 357, 426, /* 2110 */ 529, 613, 53, 54, 862, 776, 529, 862, 531, 608, /* 2120 */ 55, 861, 860, 861, 860, 863, 606, 829, 2, 617, /* 2130 */ 522, 776, 110, 817, 654, 861, 860, 519, 173, 831, /* 2140 */ 860, 862, 861, 860, 600, 834, 166, 863, 617, 481, /* 2150 */ 830, 239, 817, 833, 832, 831, 776, 829, 642, 529, /* 2160 */ 862, 776, 732, 862, 676, 861, 860, 776, 701, 307, /* 2170 */ 527, 862, 861, 860, 336, 152, 13, 861, 860, 187, /* 2180 */ 830, 356, 862, 304, 829, 198, 581, 817, 862, 529, /* 2190 */ 817, 809, 807, 12, 1209, 829, 144, 56, 862, 637, /* 2200 */ 861, 860, 863, 677, 863, 861, 860, 830, 210, 862, /* 2210 */ 776, 557, 655, 605, 53, 54, 529, 862, 830, 228, /* 2220 */ 531, 96, 55, 863, 556, 410, 862, 529, 863, 537, /* 2230 */ 2, 1211, 522, 252, 94, 817, 829, 330, 635, 519, /* 2240 */ 776, 831, 860, 863, 256, 863, 248, 834, 861, 860, /* 2250 */ 862, 862, 829, 863, 817, 833, 832, 831, 273, 830, /* 2260 */ 232, 633, 386, 114, 597, 863, 862, 776, 529, 866, /* 2270 */ 861, 860, 527, 185, 385, 830, 380, 829, 776, 856, /* 2280 */ 184, 108, 829, 629, 529, 854, 182, 863, 829, 817, /* 2290 */ 855, 862, 817, 809, 807, 12, 862, 534, 533, 56, /* 2300 */ 830, 379, 862, 448, 863, 830, 378, 323, 75, 529, /* 2310 */ 178, 830, 227, 825, 529, 285, 53, 54, 23, 776, /* 2320 */ 529, 862, 531, 824, 55, 861, 860, 861, 860, 863, /* 2330 */ 490, 829, 2, 43, 522, 776, 70, 817, 624, 592, /* 2340 */ 595, 519, 263, 831, 860, 862, 861, 860, 863, 834, /* 2350 */ 863, 861, 860, 360, 830, 213, 817, 833, 832, 831, /* 2360 */ 776, 829, 582, 529, 583, 776, 861, 860, 861, 860, /* 2370 */ 359, 776, 420, 353, 527, 862, 861, 860, 544, 192, /* 2380 */ 1213, 582, 280, 823, 830, 226, 862, 88, 861, 860, /* 2390 */ 405, 817, 862, 529, 817, 809, 807, 12, 829, 301, /* 2400 */ 260, 56, 1213, 584, 539, 515, 363, 577, 1213, 279, /* 2410 */ 861, 860, 862, 862, 776, 49, 579, 528, 53, 54, /* 2420 */ 862, 830, 225, 539, 829, 350, 55, 861, 860, 863, /* 2430 */ 529, 862, 863, 506, 2, 324, 565, 773, 862, 817, /* 2440 */ 774, 440, 404, 519, 776, 861, 860, 830, 212, 862, /* 2450 */ 770, 834, 861, 860, 1213, 862, 529, 764, 817, 833, /* 2460 */ 832, 831, 1213, 829, 543, 545, 758, 1213, 306, 303, /* 2470 */ 253, 861, 860, 861, 860, 139, 140, 862, 474, 477, /* 2480 */ 299, 776, 862, 862, 580, 165, 830, 238, 829, 574, /* 2490 */ 1213, 692, 464, 817, 862, 529, 817, 703, 807, 12, /* 2500 */ 686, 687, 862, 1213, 829, 1213, 1213, 776, 293, 829, /* 2510 */ 289, 830, 237, 400, 1213, 829, 1213, 1213, 862, 1213, /* 2520 */ 529, 739, 862, 862, 862, 338, 829, 830, 209, 862, /* 2530 */ 297, 682, 830, 124, 576, 376, 529, 1213, 830, 208, /* 2540 */ 862, 529, 681, 290, 862, 829, 776, 529, 660, 830, /* 2550 */ 206, 375, 861, 860, 657, 861, 860, 862, 529, 862, /* 2560 */ 295, 829, 288, 683, 573, 829, 384, 829, 830, 234, /* 2570 */ 641, 776, 160, 106, 862, 862, 862, 529, 653, 862, /* 2580 */ 652, 862, 651, 650, 830, 236, 159, 776, 830, 229, /* 2590 */ 830, 235, 776, 529, 446, 137, 258, 529, 776, 529, /* 2600 */ 829, 30, 829, 158, 322, 427, 829, 156, 31, 776, /* 2610 */ 444, 199, 632, 104, 862, 136, 862, 319, 155, 628, /* 2620 */ 862, 154, 829, 830, 224, 830, 221, 315, 776, 830, /* 2630 */ 205, 111, 529, 311, 529, 434, 862, 433, 529, 622, /* 2640 */ 616, 134, 829, 618, 776, 830, 204, 829, 776, 829, /* 2650 */ 776, 421, 191, 133, 529, 153, 862, 596, 418, 151, /* 2660 */ 100, 862, 416, 862, 829, 830, 203, 150, 99, 149, /* 2670 */ 830, 202, 830, 214, 529, 148, 98, 97, 862, 529, /* 2680 */ 147, 529, 30, 776, 566, 776, 389, 830, 219, 776, /* 2690 */ 829, 553, 829, 146, 829, 29, 529, 829, 26, 551, /* 2700 */ 131, 130, 145, 547, 862, 776, 862, 541, 862, 83, /* 2710 */ 200, 862, 186, 830, 218, 830, 125, 830, 217, 829, /* 2720 */ 830, 216, 529, 60, 529, 776, 529, 361, 189, 529, /* 2730 */ 776, 829, 776, 862, 787, 188, 829, 744, 802, 798, /* 2740 */ 512, 339, 830, 222, 678, 862, 734, 776, 455, 244, /* 2750 */ 862, 529, 320, 441, 830, 220, 316, 623, 621, 830, /* 2760 */ 207, 371, 829, 529, 9, 820, 797, 526, 529, 257, /* 2770 */ 786, 665, 362, 776, 41, 776, 862, 776, 445, 763, /* 2780 */ 776, 95, 675, 696, 695, 830, 93, 590, 81, 863, /* 2790 */ 669, 668, 1363, 1363, 480, 1363, 656, 1363, 1363, 1363, /* 2800 */ 1363, 1363, 776, 1363, 1363, 1363, 1363, 1363, 1363, 1363, /* 2810 */ 1363, 1363, 1363, 1363, 776, 1363, 1363, 1363, 1363, 776, /* 2820 */ 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, /* 2830 */ 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, 1363, /* 2840 */ 1363, 1363, 1363, 1363, 1363, 776, }; static const YYCODETYPE yy_lookahead[] = { /* 0 */ 4, 102, 103, 104, 105, 106, 107, 50, 81, 82, /* 10 */ 83, 84, 16, 217, 87, 88, 89, 90, 91, 92, /* 20 */ 93, 94, 226, 96, 97, 98, 99, 100, 101, 102, /* 30 */ 103, 104, 105, 106, 107, 102, 109, 117, 81, 82, /* 40 */ 83, 84, 122, 122, 87, 88, 89, 90, 91, 92, /* 50 */ 93, 94, 56, 96, 97, 98, 99, 100, 101, 102, /* 60 */ 103, 104, 105, 106, 107, 215, 109, 100, 101, 219, /* 70 */ 220, 221, 116, 77, 118, 91, 92, 93, 94, 83, /* 80 */ 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, /* 90 */ 106, 107, 159, 4, 173, 162, 100, 101, 102, 60, /* 100 */ 127, 219, 220, 221, 108, 109, 133, 211, 141, 142, /* 110 */ 4, 203, 116, 117, 141, 142, 143, 121, 122, 225, /* 120 */ 35, 125, 16, 127, 128, 217, 203, 233, 234, 133, /* 130 */ 24, 146, 147, 148, 226, 227, 140, 141, 142, 143, /* 140 */ 217, 145, 57, 235, 248, 249, 4, 9, 63, 11, /* 150 */ 4, 13, 109, 76, 158, 148, 160, 161, 203, 113, /* 160 */ 164, 23, 56, 43, 26, 169, 170, 171, 172, 173, /* 170 */ 174, 175, 217, 277, 178, 279, 180, 181, 282, 203, /* 180 */ 117, 226, 227, 77, 177, 146, 147, 148, 192, 83, /* 190 */ 235, 4, 54, 217, 286, 156, 157, 59, 68, 303, /* 200 */ 304, 71, 64, 65, 117, 116, 100, 101, 70, 122, /* 210 */ 121, 73, 5, 75, 108, 109, 127, 128, 263, 264, /* 220 */ 4, 131, 116, 117, 134, 135, 136, 121, 122, 140, /* 230 */ 153, 125, 16, 127, 128, 133, 313, 30, 315, 133, /* 240 */ 203, 286, 152, 36, 155, 115, 140, 141, 142, 143, /* 250 */ 112, 145, 114, 151, 217, 166, 167, 122, 116, 90, /* 260 */ 223, 224, 116, 121, 158, 145, 160, 161, 191, 127, /* 270 */ 128, 64, 56, 127, 128, 169, 170, 171, 172, 144, /* 280 */ 174, 175, 140, 15, 178, 116, 180, 181, 222, 223, /* 290 */ 224, 153, 4, 77, 318, 319, 320, 155, 192, 83, /* 300 */ 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, /* 310 */ 106, 107, 122, 45, 127, 128, 100, 101, 105, 106, /* 320 */ 107, 175, 203, 122, 108, 109, 203, 140, 190, 61, /* 330 */ 211, 116, 116, 117, 297, 298, 217, 121, 122, 4, /* 340 */ 217, 125, 4, 127, 128, 226, 227, 19, 158, 133, /* 350 */ 160, 161, 133, 203, 235, 203, 140, 141, 142, 143, /* 360 */ 208, 145, 175, 21, 298, 213, 214, 217, 249, 217, /* 370 */ 28, 132, 133, 45, 158, 203, 160, 161, 203, 37, /* 380 */ 42, 43, 263, 264, 119, 169, 203, 171, 172, 217, /* 390 */ 174, 175, 217, 31, 178, 67, 180, 181, 226, 227, /* 400 */ 217, 226, 227, 41, 116, 286, 119, 235, 192, 121, /* 410 */ 235, 42, 43, 4, 26, 127, 128, 294, 150, 81, /* 420 */ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, /* 430 */ 92, 93, 94, 4, 96, 97, 98, 99, 100, 101, /* 440 */ 102, 103, 104, 105, 106, 107, 100, 101, 102, 103, /* 450 */ 104, 105, 106, 107, 85, 86, 118, 43, 286, 24, /* 460 */ 169, 286, 127, 42, 43, 127, 316, 317, 116, 81, /* 470 */ 82, 83, 84, 52, 139, 87, 88, 89, 90, 91, /* 480 */ 92, 93, 94, 192, 96, 97, 98, 99, 100, 101, /* 490 */ 102, 103, 104, 105, 106, 107, 321, 83, 170, 324, /* 500 */ 317, 163, 81, 82, 83, 84, 85, 86, 87, 88, /* 510 */ 89, 90, 91, 92, 93, 94, 80, 96, 97, 98, /* 520 */ 99, 100, 101, 102, 103, 104, 105, 106, 107, 10, /* 530 */ 203, 80, 44, 4, 203, 5, 127, 128, 146, 147, /* 540 */ 148, 22, 122, 122, 217, 116, 116, 118, 217, 140, /* 550 */ 205, 116, 116, 117, 223, 224, 127, 4, 122, 145, /* 560 */ 30, 42, 43, 73, 155, 151, 36, 116, 117, 117, /* 570 */ 182, 83, 184, 91, 92, 93, 94, 95, 96, 97, /* 580 */ 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, /* 590 */ 60, 4, 163, 68, 64, 268, 71, 26, 80, 109, /* 600 */ 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, /* 610 */ 91, 92, 93, 94, 35, 96, 97, 98, 99, 100, /* 620 */ 101, 102, 103, 104, 105, 106, 107, 203, 297, 298, /* 630 */ 21, 203, 53, 4, 116, 117, 57, 203, 293, 4, /* 640 */ 115, 217, 63, 42, 43, 217, 37, 213, 214, 120, /* 650 */ 121, 217, 81, 82, 83, 84, 127, 128, 87, 88, /* 660 */ 89, 90, 91, 92, 93, 94, 117, 96, 97, 98, /* 670 */ 99, 100, 101, 102, 103, 104, 105, 106, 107, 117, /* 680 */ 127, 128, 81, 82, 83, 84, 85, 86, 87, 88, /* 690 */ 89, 90, 91, 92, 93, 94, 116, 96, 97, 98, /* 700 */ 99, 100, 101, 102, 103, 104, 105, 106, 107, 32, /* 710 */ 185, 203, 117, 126, 127, 128, 203, 13, 131, 29, /* 720 */ 212, 134, 135, 136, 203, 217, 213, 214, 175, 145, /* 730 */ 217, 210, 55, 212, 196, 197, 198, 199, 217, 152, /* 740 */ 122, 117, 318, 319, 320, 122, 122, 4, 169, 165, /* 750 */ 121, 128, 239, 182, 241, 184, 127, 128, 81, 82, /* 760 */ 83, 84, 127, 128, 87, 88, 89, 90, 91, 92, /* 770 */ 93, 94, 117, 96, 97, 98, 99, 100, 101, 102, /* 780 */ 103, 104, 105, 106, 107, 81, 82, 83, 84, 166, /* 790 */ 167, 87, 88, 89, 90, 91, 92, 93, 94, 109, /* 800 */ 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, /* 810 */ 106, 107, 4, 109, 203, 4, 203, 188, 159, 203, /* 820 */ 34, 162, 4, 66, 16, 141, 142, 211, 217, 72, /* 830 */ 217, 80, 4, 217, 4, 81, 82, 83, 84, 229, /* 840 */ 4, 87, 88, 89, 90, 91, 92, 93, 94, 4, /* 850 */ 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, /* 860 */ 106, 107, 4, 203, 56, 249, 123, 116, 117, 83, /* 870 */ 127, 128, 118, 122, 229, 203, 203, 217, 267, 268, /* 880 */ 117, 73, 10, 267, 268, 77, 226, 227, 77, 217, /* 890 */ 217, 83, 135, 107, 22, 235, 292, 287, 226, 227, /* 900 */ 250, 251, 211, 253, 118, 117, 44, 235, 100, 101, /* 910 */ 122, 100, 101, 122, 219, 242, 108, 131, 132, 133, /* 920 */ 134, 135, 136, 137, 116, 117, 313, 116, 315, 121, /* 930 */ 326, 327, 287, 125, 116, 127, 128, 151, 127, 248, /* 940 */ 249, 133, 185, 292, 133, 127, 286, 275, 140, 141, /* 950 */ 142, 143, 141, 142, 143, 127, 128, 127, 286, 4, /* 960 */ 169, 266, 26, 127, 156, 157, 138, 294, 277, 139, /* 970 */ 279, 117, 127, 282, 129, 139, 118, 326, 327, 116, /* 980 */ 203, 321, 287, 175, 324, 127, 178, 26, 180, 181, /* 990 */ 81, 82, 83, 84, 217, 304, 87, 88, 89, 90, /* 1000 */ 91, 92, 93, 94, 182, 96, 97, 98, 99, 100, /* 1010 */ 101, 102, 103, 104, 105, 106, 107, 81, 82, 83, /* 1020 */ 84, 163, 117, 87, 88, 89, 90, 91, 92, 93, /* 1030 */ 94, 162, 96, 97, 98, 99, 100, 101, 102, 103, /* 1040 */ 104, 105, 106, 107, 81, 82, 83, 84, 164, 35, /* 1050 */ 87, 88, 89, 90, 91, 92, 93, 94, 203, 96, /* 1060 */ 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, /* 1070 */ 107, 57, 217, 296, 164, 120, 121, 63, 81, 82, /* 1080 */ 83, 84, 127, 128, 87, 88, 89, 90, 91, 92, /* 1090 */ 93, 94, 183, 96, 97, 98, 99, 100, 101, 102, /* 1100 */ 103, 104, 105, 106, 107, 309, 310, 83, 4, 81, /* 1110 */ 82, 83, 84, 122, 117, 87, 88, 89, 90, 91, /* 1120 */ 92, 93, 94, 203, 96, 97, 98, 99, 100, 101, /* 1130 */ 102, 103, 104, 105, 106, 107, 122, 217, 4, 14, /* 1140 */ 4, 81, 82, 83, 84, 117, 183, 87, 88, 89, /* 1150 */ 90, 91, 92, 93, 94, 164, 96, 97, 98, 99, /* 1160 */ 100, 101, 102, 103, 104, 105, 106, 107, 250, 251, /* 1170 */ 315, 253, 81, 82, 83, 84, 122, 117, 87, 88, /* 1180 */ 89, 90, 91, 92, 93, 94, 162, 96, 97, 98, /* 1190 */ 99, 100, 101, 102, 103, 104, 105, 106, 107, 122, /* 1200 */ 280, 283, 4, 81, 82, 83, 84, 4, 117, 87, /* 1210 */ 88, 89, 90, 91, 92, 93, 94, 116, 96, 97, /* 1220 */ 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, /* 1230 */ 118, 127, 128, 117, 81, 82, 83, 84, 122, 117, /* 1240 */ 87, 88, 89, 90, 91, 92, 93, 94, 4, 96, /* 1250 */ 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, /* 1260 */ 107, 127, 128, 127, 128, 117, 81, 82, 83, 84, /* 1270 */ 166, 118, 87, 88, 89, 90, 91, 92, 93, 94, /* 1280 */ 219, 96, 97, 98, 99, 100, 101, 102, 103, 104, /* 1290 */ 105, 106, 107, 14, 109, 81, 82, 83, 84, 163, /* 1300 */ 166, 87, 88, 89, 90, 91, 92, 93, 94, 111, /* 1310 */ 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, /* 1320 */ 106, 107, 4, 109, 117, 127, 128, 266, 117, 122, /* 1330 */ 127, 128, 233, 122, 16, 236, 47, 19, 81, 82, /* 1340 */ 83, 84, 243, 140, 87, 88, 89, 90, 91, 92, /* 1350 */ 93, 94, 122, 96, 97, 98, 99, 100, 101, 102, /* 1360 */ 103, 104, 105, 106, 107, 203, 217, 218, 4, 38, /* 1370 */ 195, 127, 128, 211, 56, 200, 182, 203, 184, 217, /* 1380 */ 16, 207, 203, 19, 140, 203, 211, 69, 226, 227, /* 1390 */ 4, 217, 203, 203, 164, 77, 217, 235, 203, 217, /* 1400 */ 62, 83, 203, 85, 4, 7, 217, 217, 226, 227, /* 1410 */ 12, 249, 217, 0, 83, 73, 217, 235, 100, 101, /* 1420 */ 56, 226, 227, 248, 249, 263, 108, 255, 82, 4, /* 1430 */ 235, 117, 242, 69, 116, 203, 122, 265, 40, 121, /* 1440 */ 32, 77, 29, 125, 211, 127, 128, 83, 286, 217, /* 1450 */ 4, 133, 277, 4, 279, 203, 255, 282, 140, 141, /* 1460 */ 142, 143, 16, 274, 100, 101, 265, 4, 286, 217, /* 1470 */ 275, 289, 108, 274, 132, 4, 62, 4, 226, 227, /* 1480 */ 116, 286, 249, 308, 294, 121, 203, 235, 4, 125, /* 1490 */ 4, 127, 128, 175, 4, 211, 178, 133, 180, 181, /* 1500 */ 217, 260, 56, 262, 140, 141, 142, 143, 35, 226, /* 1510 */ 227, 203, 280, 127, 128, 263, 264, 211, 235, 73, /* 1520 */ 116, 121, 109, 77, 55, 217, 53, 127, 128, 83, /* 1530 */ 57, 14, 117, 249, 226, 227, 63, 122, 286, 175, /* 1540 */ 140, 4, 178, 235, 180, 181, 100, 101, 14, 26, /* 1550 */ 4, 117, 127, 128, 108, 249, 122, 244, 275, 246, /* 1560 */ 111, 175, 116, 100, 101, 140, 14, 121, 168, 286, /* 1570 */ 4, 125, 14, 127, 128, 122, 127, 128, 4, 133, /* 1580 */ 222, 223, 224, 275, 14, 211, 140, 141, 142, 143, /* 1590 */ 127, 128, 121, 168, 286, 132, 73, 4, 127, 128, /* 1600 */ 127, 128, 156, 157, 141, 142, 116, 4, 145, 38, /* 1610 */ 147, 127, 128, 127, 128, 198, 199, 127, 128, 16, /* 1620 */ 74, 175, 19, 249, 178, 4, 180, 181, 81, 82, /* 1630 */ 83, 84, 109, 117, 87, 88, 89, 90, 91, 92, /* 1640 */ 93, 94, 169, 96, 97, 98, 99, 100, 101, 102, /* 1650 */ 103, 104, 105, 106, 107, 203, 298, 186, 121, 56, /* 1660 */ 244, 175, 246, 179, 127, 128, 4, 203, 203, 217, /* 1670 */ 124, 207, 69, 127, 128, 203, 139, 140, 226, 227, /* 1680 */ 77, 217, 217, 156, 157, 117, 83, 235, 166, 217, /* 1690 */ 122, 226, 227, 127, 128, 121, 203, 4, 226, 227, /* 1700 */ 235, 127, 128, 100, 101, 168, 140, 235, 203, 116, /* 1710 */ 217, 108, 117, 117, 117, 263, 264, 122, 122, 116, /* 1720 */ 127, 128, 217, 117, 121, 219, 211, 203, 125, 119, /* 1730 */ 127, 128, 117, 203, 168, 263, 133, 122, 286, 203, /* 1740 */ 275, 217, 121, 140, 141, 142, 143, 217, 127, 128, /* 1750 */ 4, 286, 4, 217, 319, 320, 226, 227, 286, 319, /* 1760 */ 320, 187, 226, 227, 249, 235, 242, 274, 175, 319, /* 1770 */ 320, 235, 266, 4, 79, 154, 4, 119, 175, 274, /* 1780 */ 102, 178, 120, 180, 181, 203, 82, 83, 84, 127, /* 1790 */ 128, 87, 88, 89, 90, 91, 92, 93, 94, 217, /* 1800 */ 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, /* 1810 */ 106, 107, 4, 219, 121, 116, 286, 117, 294, 73, /* 1820 */ 127, 128, 286, 219, 16, 203, 117, 83, 84, 207, /* 1830 */ 122, 87, 88, 89, 90, 91, 92, 93, 94, 217, /* 1840 */ 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, /* 1850 */ 106, 107, 4, 323, 324, 203, 274, 203, 4, 111, /* 1860 */ 266, 168, 116, 117, 56, 116, 159, 121, 203, 217, /* 1870 */ 266, 217, 4, 127, 128, 127, 128, 117, 226, 227, /* 1880 */ 226, 227, 217, 117, 4, 77, 140, 235, 193, 235, /* 1890 */ 121, 83, 117, 121, 319, 320, 127, 128, 173, 127, /* 1900 */ 128, 155, 156, 157, 203, 203, 58, 242, 100, 101, /* 1910 */ 319, 320, 140, 203, 4, 263, 108, 263, 217, 217, /* 1920 */ 203, 4, 116, 203, 116, 117, 16, 217, 117, 121, /* 1930 */ 18, 203, 50, 125, 217, 127, 128, 217, 286, 203, /* 1940 */ 286, 133, 4, 226, 227, 217, 226, 227, 140, 141, /* 1950 */ 142, 143, 235, 217, 287, 235, 102, 116, 189, 294, /* 1960 */ 203, 6, 226, 227, 207, 118, 56, 116, 120, 8, /* 1970 */ 203, 235, 50, 306, 217, 127, 128, 116, 116, 111, /* 1980 */ 263, 127, 128, 175, 217, 203, 178, 77, 180, 181, /* 1990 */ 203, 203, 116, 83, 140, 127, 128, 50, 4, 217, /* 2000 */ 4, 121, 117, 286, 217, 217, 286, 127, 128, 116, /* 2010 */ 100, 101, 4, 83, 226, 227, 4, 151, 108, 4, /* 2020 */ 140, 137, 286, 235, 125, 203, 116, 117, 16, 175, /* 2030 */ 13, 121, 203, 203, 118, 125, 145, 127, 128, 217, /* 2040 */ 122, 164, 4, 133, 127, 128, 217, 217, 203, 4, /* 2050 */ 140, 141, 142, 143, 4, 226, 227, 140, 150, 121, /* 2060 */ 90, 203, 217, 90, 235, 127, 128, 203, 56, 90, /* 2070 */ 90, 226, 227, 203, 286, 217, 109, 4, 203, 176, /* 2080 */ 235, 217, 4, 18, 203, 175, 24, 217, 178, 77, /* 2090 */ 180, 181, 217, 155, 150, 83, 226, 227, 217, 157, /* 2100 */ 203, 226, 227, 203, 207, 235, 177, 226, 227, 25, /* 2110 */ 235, 109, 100, 101, 217, 286, 235, 217, 4, 109, /* 2120 */ 108, 127, 128, 127, 128, 4, 62, 203, 116, 121, /* 2130 */ 16, 286, 51, 121, 138, 127, 128, 125, 122, 127, /* 2140 */ 128, 217, 127, 128, 51, 133, 203, 4, 140, 203, /* 2150 */ 226, 227, 140, 141, 142, 143, 286, 203, 120, 235, /* 2160 */ 217, 286, 168, 217, 149, 127, 128, 286, 203, 185, /* 2170 */ 56, 217, 127, 128, 203, 145, 116, 127, 128, 165, /* 2180 */ 226, 227, 217, 115, 203, 116, 125, 175, 217, 235, /* 2190 */ 178, 77, 180, 181, 182, 203, 113, 83, 217, 154, /* 2200 */ 127, 128, 4, 203, 4, 127, 128, 226, 227, 217, /* 2210 */ 286, 117, 203, 140, 100, 101, 235, 217, 226, 227, /* 2220 */ 4, 115, 108, 4, 117, 49, 217, 235, 4, 48, /* 2230 */ 116, 117, 16, 269, 216, 121, 203, 203, 188, 125, /* 2240 */ 286, 127, 128, 4, 287, 4, 310, 133, 127, 128, /* 2250 */ 217, 217, 203, 4, 140, 141, 142, 143, 232, 226, /* 2260 */ 227, 140, 312, 232, 186, 4, 217, 286, 235, 202, /* 2270 */ 127, 128, 56, 110, 312, 226, 227, 203, 286, 202, /* 2280 */ 204, 206, 203, 140, 235, 65, 204, 4, 203, 175, /* 2290 */ 202, 217, 178, 77, 180, 181, 217, 202, 209, 83, /* 2300 */ 226, 227, 217, 78, 4, 226, 227, 203, 122, 235, /* 2310 */ 119, 226, 227, 272, 235, 156, 100, 101, 173, 286, /* 2320 */ 235, 217, 4, 251, 108, 127, 128, 127, 128, 4, /* 2330 */ 170, 203, 116, 171, 16, 286, 172, 121, 140, 120, /* 2340 */ 140, 125, 107, 127, 128, 217, 127, 128, 4, 133, /* 2350 */ 4, 127, 128, 257, 226, 227, 140, 141, 142, 143, /* 2360 */ 286, 203, 121, 235, 140, 286, 127, 128, 127, 128, /* 2370 */ 258, 286, 203, 231, 56, 217, 127, 128, 203, 259, /* 2380 */ 35, 140, 295, 261, 226, 227, 217, 116, 127, 128, /* 2390 */ 118, 175, 217, 235, 178, 77, 180, 181, 203, 203, /* 2400 */ 107, 83, 57, 207, 121, 314, 203, 168, 63, 290, /* 2410 */ 127, 128, 217, 217, 286, 182, 155, 203, 100, 101, /* 2420 */ 217, 226, 227, 140, 203, 260, 108, 127, 128, 4, /* 2430 */ 235, 217, 4, 169, 116, 203, 187, 276, 217, 121, /* 2440 */ 261, 203, 46, 125, 286, 127, 128, 226, 227, 217, /* 2450 */ 276, 133, 127, 128, 109, 217, 235, 322, 140, 141, /* 2460 */ 142, 143, 117, 203, 120, 140, 322, 122, 203, 203, /* 2470 */ 27, 127, 128, 127, 128, 119, 272, 217, 157, 253, /* 2480 */ 203, 286, 217, 217, 207, 193, 226, 227, 203, 189, /* 2490 */ 145, 228, 145, 175, 217, 235, 178, 327, 180, 181, /* 2500 */ 238, 228, 217, 158, 203, 160, 161, 286, 203, 203, /* 2510 */ 203, 226, 227, 39, 169, 203, 171, 172, 217, 174, /* 2520 */ 235, 175, 217, 217, 217, 228, 203, 226, 227, 217, /* 2530 */ 203, 144, 226, 227, 207, 231, 235, 192, 226, 227, /* 2540 */ 217, 235, 228, 203, 217, 203, 286, 235, 238, 226, /* 2550 */ 227, 231, 127, 128, 126, 127, 128, 217, 235, 217, /* 2560 */ 203, 203, 203, 230, 207, 203, 207, 203, 226, 227, /* 2570 */ 272, 286, 119, 206, 217, 217, 217, 235, 228, 217, /* 2580 */ 228, 217, 228, 228, 226, 227, 119, 286, 226, 227, /* 2590 */ 226, 227, 286, 235, 231, 206, 272, 235, 286, 235, /* 2600 */ 203, 176, 203, 119, 301, 33, 203, 119, 182, 286, /* 2610 */ 302, 174, 278, 245, 217, 81, 217, 257, 119, 278, /* 2620 */ 217, 119, 203, 226, 227, 226, 227, 257, 286, 226, /* 2630 */ 227, 116, 235, 284, 235, 145, 217, 257, 235, 278, /* 2640 */ 245, 206, 203, 278, 286, 226, 227, 203, 286, 203, /* 2650 */ 286, 272, 281, 206, 235, 119, 217, 257, 272, 119, /* 2660 */ 247, 217, 78, 217, 203, 226, 227, 119, 247, 119, /* 2670 */ 226, 227, 226, 227, 235, 119, 247, 247, 217, 235, /* 2680 */ 119, 235, 176, 286, 296, 286, 272, 226, 227, 286, /* 2690 */ 203, 20, 203, 119, 203, 305, 235, 203, 305, 272, /* 2700 */ 119, 119, 119, 272, 217, 286, 217, 17, 217, 307, /* 2710 */ 254, 217, 307, 226, 227, 226, 227, 226, 227, 203, /* 2720 */ 226, 227, 235, 287, 235, 286, 235, 256, 260, 235, /* 2730 */ 286, 203, 286, 217, 229, 260, 203, 271, 298, 298, /* 2740 */ 291, 229, 226, 227, 236, 217, 273, 286, 230, 240, /* 2750 */ 217, 235, 273, 273, 226, 227, 256, 285, 257, 226, /* 2760 */ 227, 201, 203, 235, 254, 219, 219, 246, 235, 299, /* 2770 */ 219, 219, 252, 286, 288, 286, 217, 286, 300, 325, /* 2780 */ 286, 270, 237, 226, 226, 226, 227, 311, 73, 4, /* 2790 */ 237, 237, 328, 328, 235, 328, 241, 328, 328, 328, /* 2800 */ 328, 328, 286, 328, 328, 328, 328, 328, 328, 328, /* 2810 */ 328, 328, 328, 328, 286, 328, 328, 328, 328, 286, /* 2820 */ 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, /* 2830 */ 328, 328, 328, 328, 328, 328, 328, 328, 328, 328, /* 2840 */ 328, 328, 328, 328, 328, 286, }; #define YY_SHIFT_USE_DFLT (-102) #define YY_SHIFT_COUNT (535) #define YY_SHIFT_MIN (-101) #define YY_SHIFT_MAX (2785) static const short yy_shift_ofst[] = { /* 0 */ 690, 808, 1446, 138, 1318, 1603, 1364, 2114, 2114, 2114, /* 10 */ 490, 216, 2012, 2318, 2216, 2216, 2216, 2216, 2216, 2216, /* 20 */ 2216, 1523, -4, 106, 1910, 1808, 2216, 2216, 2216, 2216, /* 30 */ 2216, 2216, 2216, 2216, 2216, 2216, 2216, 2216, 2216, 2216, /* 40 */ 2216, 2216, 2216, 2216, 2216, 2216, 2216, 2216, 2216, 2216, /* 50 */ 2216, 2216, 2216, 2216, 2216, 2216, 2216, 2216, 2216, 2216, /* 60 */ 2216, 2216, 2216, 2216, 2216, 2216, 2216, 2216, 2216, 2216, /* 70 */ 2216, 2216, 1746, 1463, 1463, 587, 1473, 1473, 2428, 89, /* 80 */ 39, 1848, 1546, 2428, 1486, 1486, 1486, 1662, 1486, -33, /* 90 */ -33, 635, 845, 338, 786, 142, 2283, 1769, 1693, 1938, /* 100 */ 2241, 1593, 2008, 1593, 1880, 1772, 1621, 1546, 955, 2425, /* 110 */ 2346, 2346, 2346, 2346, 414, 2346, 1486, 635, 635, 845, /* 120 */ 1695, 1695, 1527, 519, 519, -43, 811, 1537, 1400, 1854, /* 130 */ 1566, 1425, 1574, 529, 1471, 146, 530, 629, 530, 409, /* 140 */ 429, 579, 187, 288, 2344, 2325, 2249, 2300, 2239, 2261, /* 150 */ 2224, 2219, 2200, 2078, 2198, 2143, 2121, 2073, 2050, 2045, /* 160 */ 2038, 1917, 1996, 2015, 1244, 1490, 1134, 1104, 858, 858, /* 170 */ 858, 1994, 1136, 1386, 1014, 1014, 1484, 553, 1203, 828, /* 180 */ 743, 757, 1868, 1748, 1449, 1198, 635, 635, 85, 85, /* 190 */ 1413, 1342, 291, 2715, 2715, 2785, 2715, 2715, -102, -102, /* 200 */ -102, 421, 601, 601, 601, 601, 601, 601, 601, 601, /* 210 */ 601, 601, 571, 388, 704, 677, 1214, 1185, 1153, -73, /* 220 */ 1122, 1091, 1060, 1028, 997, 963, 936, 909, 754, 1547, /* 230 */ 1257, 1704, 1744, 1744, 482, -16, -16, -16, -16, -16, /* 240 */ -16, 204, 346, -101, 90, -27, -27, 751, 436, 268, /* 250 */ 268, 268, 623, 328, 207, 190, 369, 392, 1398, 836, /* 260 */ 830, 818, 213, 335, -67, 342, -79, 1615, 1230, 1331, /* 270 */ 1331, 135, 1415, 120, 872, 1331, 584, 791, 791, 1194, /* 280 */ 872, 684, 684, 1024, 991, 659, 2690, 2690, 2583, 2582, /* 290 */ 2581, 2671, 2671, 2574, 2506, 2561, 2584, 2556, 2584, 2550, /* 300 */ 2584, 2548, 2584, 2540, 2225, 2145, 2536, 2225, 2534, 2437, /* 310 */ 2145, 2437, 2490, 2515, 2502, 2437, 2145, 2499, 2534, 2437, /* 320 */ 2145, 2488, 2426, 2572, 2484, 2225, 2467, 2271, 2225, 2453, /* 330 */ 2271, 2347, 2347, 2347, 2347, 2474, 2271, 2347, 2387, 2347, /* 340 */ 2474, 2347, 2347, 2292, 2321, 2356, 2443, 2443, 2396, 2396, /* 350 */ 2164, 2264, 2233, 2272, 2293, 2271, 2235, 2235, 2164, 2162, /* 360 */ 2160, 2145, 2159, 2191, 2186, 2225, 2220, 2220, 2163, 2163, /* 370 */ 2163, 2163, -102, -102, -102, -102, -102, -102, -102, -102, /* 380 */ -102, -102, 2345, 525, 77, 518, 451, -15, 130, 169, /* 390 */ 1596, 1595, 7, 1568, 435, 1434, 1314, 1211, 1207, 239, /* 400 */ 609, 102, 1116, 788, 362, 488, 624, 87, -80, -44, /* 410 */ 2181, 2176, 2083, 2106, 2107, 2094, 2061, 2069, 2014, 2068, /* 420 */ 2060, 2030, 1984, 2093, 2016, 2081, 2064, 2084, 2010, 2002, /* 430 */ 1942, 1929, 1944, 2062, 2065, 1967, 1903, 1980, 1979, 1973, /* 440 */ 1970, 1908, 1918, 1877, 2017, 1891, 1916, 1899, 1930, 1866, /* 450 */ 1884, 1893, 1947, 1876, 1862, 1885, 1861, 1922, 1961, 1851, /* 460 */ 1847, 1955, 1841, 1882, 1912, 1811, 1725, 1806, 1775, 1766, /* 470 */ 1760, 1709, 1708, 1707, 1749, 1700, 1699, 1708, 1678, 1658, /* 480 */ 1610, 1522, 1606, 1597, 1453, 1516, 1571, 1570, 1404, 1453, /* 490 */ 1558, 1552, 1534, 1517, 1469, 1414, 1408, 1346, 1338, 1289, /* 500 */ 1279, 1148, 1101, 1112, 1077, 1054, 1125, 910, 884, 869, /* 510 */ 905, 822, 961, 618, 854, 863, 862, 618, 763, 580, /* 520 */ 655, 595, 430, 562, 549, 452, 420, 352, 287, 265, /* 530 */ 219, 215, 201, 63, 46, 43, }; #define YY_REDUCE_USE_DFLT (-205) #define YY_REDUCE_COUNT (381) #define YY_REDUCE_MIN (-204) #define YY_REDUCE_MAX (2560) static const short yy_reduce_ofst[] = { /* 0 */ 538, 119, 1162, 1175, 660, 1530, 175, 1452, 1252, -45, /* 10 */ -104, 1472, 1182, 1465, 1308, 1717, 1283, 1195, 1654, 1652, /* 20 */ 672, 691, 2559, 2533, 2528, 2516, 2494, 2491, 2489, 2487, /* 30 */ 2461, 2446, 2444, 2439, 2419, 2403, 2399, 2397, 2364, 2362, /* 40 */ 2358, 2342, 2323, 2312, 2306, 2301, 2285, 2260, 2221, 2195, /* 50 */ 2158, 2128, 2085, 2079, 2074, 2049, 2033, 1992, 1981, 1954, /* 60 */ 1924, 1881, 1875, 1870, 1845, 1829, 1788, 1736, 1720, 1536, /* 70 */ 172, -92, 616, 331, 37, 513, 424, -24, 152, 611, /* 80 */ 918, 613, 521, 434, 1665, 1524, 1190, -77, 673, 1358, /* 90 */ 66, 150, -150, 695, -106, 327, 2359, 2357, 2327, 2277, /* 100 */ 2196, 1232, 1897, 920, 1757, 1622, 1464, 508, 1174, 777, /* 110 */ 1582, 1505, 1493, 1199, 1099, 1189, 123, 183, 855, -118, /* 120 */ 651, 604, 650, 645, 610, 1667, -204, 2340, 2307, 2214, /* 130 */ 1787, 1787, 2305, 2266, 2265, 2238, 1416, 2232, 1313, 1787, /* 140 */ 1604, 1591, 2214, 2203, 2175, 1787, 1787, 1787, 1787, 1787, /* 150 */ 1787, 1787, 2169, 1787, 1787, 1787, 1787, 2104, 1787, 1787, /* 160 */ 1787, 2034, 2009, 2000, 1971, 1965, 1946, 1943, 1594, 1506, /* 170 */ 1061, 1900, 1864, 1858, 1575, 1450, 1830, 1822, 1787, 1782, /* 180 */ 1767, 345, 1728, 1710, 1702, 1701, 1179, 428, 1440, 1435, /* 190 */ 1417, 1515, 1241, 1374, 1306, 1149, 1284, 1233, 796, 1201, /* 200 */ 1172, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, /* 210 */ 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, /* 220 */ 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, /* 230 */ 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, /* 240 */ 1957, 1957, 1957, 1957, 2555, 2558, 2557, 2476, 2476, 2554, /* 250 */ 2553, 2545, 2511, 2454, 2521, 2520, 2486, 2478, 2470, 2552, /* 260 */ 2551, 2547, 1957, 2546, 2510, 2560, 2501, 2472, 2500, 2480, /* 270 */ 2479, 2518, 2509, 2508, 2512, 2473, 2466, 2475, 2468, 2449, /* 280 */ 2505, 2441, 2440, 2436, 2471, 2456, 2405, 2402, 2298, 2431, /* 290 */ 2427, 2393, 2390, 2414, 2388, 2298, 2430, 2298, 2429, 2298, /* 300 */ 2421, 2298, 2413, 2386, 2447, 2400, 2379, 2435, 2395, 2365, /* 310 */ 2380, 2361, 2349, 2371, 2298, 2341, 2370, 2298, 2368, 2334, /* 320 */ 2360, 2298, 2308, 2303, 2324, 2389, 2298, 2363, 2367, 2298, /* 330 */ 2320, 2355, 2354, 2352, 2350, 2310, 2304, 2314, 2333, 2297, /* 340 */ 2262, 2273, 2263, 2170, 2226, 2204, 2144, 2135, 2174, 2161, /* 350 */ 2179, 2165, 2119, 2091, 2087, 2142, 1957, 1957, 2122, 2120, /* 360 */ 2112, 2096, 2072, 2041, 2089, 2075, 2082, 2076, 2095, 2088, /* 370 */ 2077, 2067, 1962, 1950, 1936, 2031, 2026, 1964, 1957, 1957, /* 380 */ 1957, 2018, }; static const YYACTIONTYPE yy_default[] = { /* 0 */ 876, 1197, 1197, 1319, 1197, 1197, 1197, 1197, 1197, 1197, /* 10 */ 1319, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, /* 20 */ 1197, 1319, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, /* 30 */ 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, /* 40 */ 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, /* 50 */ 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, /* 60 */ 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, 1197, /* 70 */ 1197, 1197, 1060, 1361, 1361, 1361, 1338, 1338, 1361, 1053, /* 80 */ 1361, 1361, 904, 1361, 1361, 1361, 1361, 1361, 1361, 1361, /* 90 */ 1361, 1361, 927, 1049, 917, 1060, 1361, 1361, 1361, 1361, /* 100 */ 1361, 1122, 1137, 1122, 1114, 1103, 1361, 1361, 1361, 1235, /* 110 */ 1130, 1130, 1130, 1130, 1000, 1130, 1361, 1361, 1361, 1361, /* 120 */ 1165, 1164, 1361, 1088, 1088, 1199, 1361, 1288, 1293, 1158, /* 130 */ 1361, 1361, 1361, 1361, 1361, 1123, 1361, 1361, 1361, 1061, /* 140 */ 1049, 1338, 1158, 1361, 1361, 1361, 1361, 1361, 1361, 1361, /* 150 */ 1361, 1361, 1361, 1361, 1138, 1115, 1104, 1361, 1361, 1361, /* 160 */ 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1049, 1049, /* 170 */ 1049, 1361, 1361, 1361, 1338, 1338, 1361, 1160, 1361, 1361, /* 180 */ 1361, 914, 1361, 1361, 1361, 882, 1361, 1361, 1338, 1338, /* 190 */ 876, 1319, 1082, 1319, 1319, 922, 1319, 1319, 1312, 1039, /* 200 */ 1039, 1098, 1121, 1120, 1119, 1118, 1066, 1108, 1096, 1100, /* 210 */ 1212, 1099, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, /* 220 */ 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, 1199, /* 230 */ 1199, 1167, 1181, 1166, 1174, 1186, 1175, 1180, 1179, 1178, /* 240 */ 1169, 1168, 1170, 1171, 1361, 1361, 1361, 1361, 1361, 1361, /* 250 */ 1361, 1361, 1052, 1361, 1361, 1022, 1361, 1361, 1262, 1361, /* 260 */ 1361, 929, 1172, 1361, 1037, 885, 1107, 1201, 1050, 1078, /* 270 */ 1078, 967, 991, 951, 1088, 1078, 1068, 1082, 1082, 1207, /* 280 */ 1088, 1361, 1361, 1199, 1050, 1037, 1303, 1303, 1069, 1069, /* 290 */ 1069, 1287, 1287, 1069, 1235, 1069, 1013, 1069, 1013, 1069, /* 300 */ 1013, 1069, 1013, 1069, 911, 1107, 1069, 911, 1004, 1110, /* 310 */ 1107, 1110, 1143, 1126, 1069, 1110, 1107, 1069, 1004, 1110, /* 320 */ 1107, 1069, 1269, 1267, 1069, 911, 1069, 1220, 911, 1069, /* 330 */ 1220, 1002, 1002, 1002, 1002, 983, 1220, 1002, 967, 1002, /* 340 */ 983, 1002, 1002, 1357, 1361, 1069, 1348, 1348, 1091, 1091, /* 350 */ 1097, 1082, 1361, 1361, 1226, 1220, 1185, 1173, 1097, 1095, /* 360 */ 1092, 1107, 1361, 1069, 986, 911, 893, 893, 881, 881, /* 370 */ 881, 881, 1316, 1316, 1312, 969, 969, 1055, 1184, 1183, /* 380 */ 1182, 938, 1198, 1361, 1361, 1361, 1361, 1361, 1361, 1236, /* 390 */ 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, /* 400 */ 1361, 1361, 1361, 1361, 1361, 1322, 1361, 1361, 1361, 1361, /* 410 */ 1361, 877, 1361, 1361, 1361, 1361, 1361, 1306, 1361, 1361, /* 420 */ 1361, 1361, 1361, 1361, 1266, 1265, 1361, 1361, 1361, 1361, /* 430 */ 1361, 1361, 1361, 1361, 1361, 1127, 1361, 1361, 1361, 1361, /* 440 */ 1361, 1361, 1111, 1361, 1254, 1361, 1361, 1361, 1361, 1361, /* 450 */ 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, /* 460 */ 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, /* 470 */ 1361, 1361, 1025, 1031, 1361, 1361, 1361, 1026, 1361, 1361, /* 480 */ 1156, 1361, 1361, 1361, 1210, 1361, 1361, 1361, 1361, 1093, /* 490 */ 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, /* 500 */ 1361, 1361, 1361, 1361, 1354, 1083, 1361, 1361, 1361, 1200, /* 510 */ 1361, 1198, 1361, 1321, 1361, 1361, 1361, 1320, 1361, 1361, /* 520 */ 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1361, 1157, 1156, /* 530 */ 1200, 920, 900, 1361, 891, 1361, 873, 878, 1305, 1302, /* 540 */ 1299, 1304, 1298, 1300, 1297, 1301, 1296, 1294, 1295, 1292, /* 550 */ 1290, 1289, 1291, 1286, 1282, 1242, 1240, 1238, 1247, 1246, /* 560 */ 1245, 1244, 1243, 1239, 1237, 1241, 1233, 1232, 1133, 1112, /* 570 */ 1101, 1020, 1281, 1279, 1280, 1231, 1229, 1230, 1019, 1018, /* 580 */ 1017, 1012, 1011, 1010, 1009, 1309, 1318, 1317, 1315, 1314, /* 590 */ 1313, 1307, 1308, 1218, 1217, 1215, 1214, 1216, 913, 1258, /* 600 */ 1261, 1260, 1259, 1264, 1263, 1256, 1268, 1273, 1272, 1277, /* 610 */ 1276, 1275, 1274, 1271, 1253, 1142, 1141, 1139, 1135, 1146, /* 620 */ 1145, 1144, 1134, 1136, 1140, 1117, 1125, 1124, 1113, 1116, /* 630 */ 1005, 1106, 1102, 1105, 1021, 1257, 1016, 1015, 1014, 912, /* 640 */ 903, 1071, 902, 901, 916, 989, 990, 998, 1001, 996, /* 650 */ 999, 995, 994, 993, 997, 992, 988, 919, 918, 928, /* 660 */ 982, 965, 954, 921, 956, 953, 952, 957, 974, 973, /* 670 */ 980, 979, 978, 977, 976, 972, 975, 971, 970, 958, /* 680 */ 950, 949, 968, 948, 985, 984, 981, 947, 1008, 1007, /* 690 */ 1006, 1003, 946, 945, 944, 943, 942, 941, 1196, 1360, /* 700 */ 1356, 1359, 1358, 1355, 1195, 1203, 1189, 1187, 1023, 1034, /* 710 */ 1033, 1032, 1029, 1030, 1044, 1042, 1041, 1040, 1077, 1076, /* 720 */ 1075, 1074, 1073, 1072, 1065, 1063, 1058, 1057, 1064, 1062, /* 730 */ 1059, 1080, 1081, 1079, 1056, 1048, 1046, 1047, 1045, 1132, /* 740 */ 1129, 1131, 1128, 1067, 1054, 1051, 1038, 1336, 1334, 1337, /* 750 */ 1335, 1333, 1341, 1343, 1342, 1347, 1345, 1344, 1340, 1353, /* 760 */ 1352, 1351, 1350, 1349, 1339, 1346, 1332, 1331, 1330, 1329, /* 770 */ 1085, 1090, 1089, 1084, 1028, 1188, 1198, 1192, 1327, 1325, /* 780 */ 1328, 1324, 1323, 1223, 1225, 1228, 1227, 1224, 1087, 1086, /* 790 */ 1222, 1221, 1326, 1191, 1163, 934, 932, 933, 1250, 1249, /* 800 */ 1252, 1251, 1248, 936, 935, 931, 930, 1161, 1155, 1154, /* 810 */ 1278, 1193, 1194, 1153, 1159, 1151, 1150, 1149, 1177, 1176, /* 820 */ 1162, 1152, 923, 1027, 1024, 1190, 1148, 1070, 1147, 964, /* 830 */ 963, 962, 961, 960, 959, 1036, 1035, 940, 955, 939, /* 840 */ 937, 915, 905, 910, 908, 909, 907, 906, 898, 895, /* 850 */ 897, 894, 899, 896, 892, 890, 889, 888, 887, 886, /* 860 */ 926, 925, 924, 920, 884, 883, 880, 879, 875, 874, /* 870 */ 872, }; /* The next table maps tokens 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. */ #ifdef YYFALLBACK static const YYCODETYPE yyFallback[] = { 0, /* $ => nothing */ 0, /* ILLEGAL => nothing */ 0, /* COMMENT => nothing */ 0, /* SPACE => nothing */ 0, /* ID => nothing */ 4, /* ABORT => ID */ 4, /* ACTION => ID */ 4, /* AFTER => ID */ 4, /* ALWAYS => ID */ 4, /* ANALYZE => ID */ 4, /* ASC => ID */ 4, /* ATTACH => ID */ 4, /* BEFORE => ID */ 4, /* BEGIN => ID */ 4, /* BY => ID */ 4, /* CASCADE => ID */ 4, /* CAST => ID */ 4, /* COLUMNKW => ID */ 4, /* CONFLICT => ID */ 4, /* CURRENT => ID */ 4, /* DATABASE => ID */ 4, /* DEFERRED => ID */ 4, /* DESC => ID */ 4, /* DETACH => ID */ 4, /* DO => ID */ 4, /* EACH => ID */ 4, /* END => ID */ 4, /* EXCLUDE => ID */ 4, /* EXCLUSIVE => ID */ 4, /* EXPLAIN => ID */ 4, /* FAIL => ID */ 4, /* FIRST => ID */ 4, /* FOLLOWING => ID */ 4, /* FOR => ID */ 4, /* GENERATED => ID */ 4, /* GROUPS => ID */ 4, /* IGNORE => ID */ 4, /* IMMEDIATE => ID */ 4, /* INDEXED => ID */ 4, /* INITIALLY => ID */ 4, /* INSTEAD => ID */ 4, /* LAST => ID */ 4, /* LIKE_KW => ID */ 4, /* MATCH => ID */ 4, /* MATERIALIZED => ID */ 4, /* NO => ID */ 4, /* NULLS => ID */ 4, /* OTHERS => ID */ 4, /* PLAN => ID */ 4, /* QUERY => ID */ 4, /* KEY => ID */ 4, /* OF => ID */ 4, /* OFFSET => ID */ 4, /* PARTITION => ID */ 4, /* PRAGMA => ID */ 4, /* PRECEDING => ID */ 4, /* RAISE => ID */ 4, /* RANGE => ID */ 4, /* RECURSIVE => ID */ 4, /* RELEASE => ID */ 4, /* REPLACE => ID */ 4, /* RESTRICT => ID */ 4, /* ROW => ID */ 4, /* ROWS => ID */ 4, /* ROLLBACK => ID */ 4, /* SAVEPOINT => ID */ 4, /* TEMP => ID */ 4, /* TIES => ID */ 4, /* TRIGGER => ID */ 4, /* UNBOUNDED => ID */ 4, /* VACUUM => ID */ 4, /* VIEW => ID */ 4, /* VIRTUAL => ID */ 4, /* WITH => ID */ 4, /* WITHOUT => ID */ 4, /* REINDEX => ID */ 4, /* RENAME => ID */ 4, /* CTIME_KW => ID */ 4, /* IF => ID */ 4, /* FILTER => 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. */ struct yyStackEntry { YYACTIONTYPE stateno; /* The state-number */ 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 */ QList* tokens = nullptr; }; typedef struct yyStackEntry yyStackEntry; /* The state of the parser is completely contained in an instance of ** the following structure */ struct yyParser { int yyidx; /* Index of top element in stack */ #ifdef YYTRACKMAXSTACKDEPTH int yyidxMax; /* Maximum value of yyidx */ #endif int yyerrcnt; /* Shifts left before out of the error */ sqlite3_parseARG_SDECL /* A place to hold %extra_argument */ #if YYSTACKDEPTH<=0 int yystksz; /* Current side of the stack */ yyStackEntry *yystack; /* The parser's stack */ #else yyStackEntry yystack[YYSTACKDEPTH]; /* The parser's stack */ #endif }; typedef struct yyParser yyParser; #ifndef NDEBUG #include static FILE *yyTraceFILE = 0; static char *yyTracePrompt = 0; #endif /* NDEBUG */ void *sqlite3_parseCopyParserState(void* other) { yyParser *pParser; yyParser *otherParser = (yyParser*)other; // Copy parser pParser = (yyParser*)malloc((size_t)sizeof(yyParser)); memcpy(pParser, other, (size_t)sizeof(yyParser)); #if YYSTACKDEPTH<=0 // Copy stack int stackSize = sizeof(yyStackEntry) * pParser->yystksz; pParser->yystack = malloc((size_t)stackSize); memcpy(pParser->yystack, ((yyParser*)other)->yystack, (size_t)stackSize); #endif for (int i = 0; i <= pParser->yyidx; i++) { pParser->yystack[i].tokens = new QList(); *(pParser->yystack[i].tokens) = *(otherParser->yystack[i].tokens); } return pParser; } void sqlite3_parseAddToken(void* other, Token* token) { yyParser *otherParser = (yyParser*)other; if (otherParser->yyidx < 0) return; // Nothing on stack yet. Might happen when parsing just whitespaces, nothing else. otherParser->yystack[otherParser->yyidx].tokens->append(token); } void sqlite3_parseRestoreParserState(void* saved, void* target) { yyParser *pParser = (yyParser*)target; yyParser *savedParser = (yyParser*)saved; for (int i = 0; i <= pParser->yyidx; i++) delete pParser->yystack[i].tokens; memcpy(pParser, saved, (size_t)sizeof(yyParser)); for (int i = 0; i <= savedParser->yyidx; i++) { pParser->yystack[i].tokens = new QList(); *(pParser->yystack[i].tokens) = *(savedParser->yystack[i].tokens); } #if YYSTACKDEPTH<=0 // Copy stack int stackSize = sizeof(yyStackEntry) * pParser->yystksz; pParser->yystack = relloc(pParser->yystack, (size_t)stackSize); memcpy(pParser->yystack, ((yyParser*)saved)->yystack, (size_t)stackSize); #endif } void sqlite3_parseFreeSavedState(void* other) { yyParser *pParser = (yyParser*)other; for (int i = 0; i <= pParser->yyidx; i++) delete pParser->yystack[i].tokens; #if YYSTACKDEPTH<=0 free(pParser->yystack); #endif free(other); } #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 sqlite3_parseTrace(FILE *TraceFILE, char *zTracePrompt){ yyTraceFILE = TraceFILE; yyTracePrompt = zTracePrompt; if( yyTraceFILE==0 ) yyTracePrompt = 0; else if( yyTracePrompt==0 ) yyTraceFILE = 0; } #endif /* NDEBUG */ #ifndef NDEBUG /* For tracing shifts, the names of all terminals and nonterminals ** are required. The following table supplies these names */ static const char *const yyTokenName[] = { "$", "ILLEGAL", "COMMENT", "SPACE", "ID", "ABORT", "ACTION", "AFTER", "ALWAYS", "ANALYZE", "ASC", "ATTACH", "BEFORE", "BEGIN", "BY", "CASCADE", "CAST", "COLUMNKW", "CONFLICT", "CURRENT", "DATABASE", "DEFERRED", "DESC", "DETACH", "DO", "EACH", "END", "EXCLUDE", "EXCLUSIVE", "EXPLAIN", "FAIL", "FIRST", "FOLLOWING", "FOR", "GENERATED", "GROUPS", "IGNORE", "IMMEDIATE", "INDEXED", "INITIALLY", "INSTEAD", "LAST", "LIKE_KW", "MATCH", "MATERIALIZED", "NO", "NULLS", "OTHERS", "PLAN", "QUERY", "KEY", "OF", "OFFSET", "PARTITION", "PRAGMA", "PRECEDING", "RAISE", "RANGE", "RECURSIVE", "RELEASE", "REPLACE", "RESTRICT", "ROW", "ROWS", "ROLLBACK", "SAVEPOINT", "TEMP", "TIES", "TRIGGER", "UNBOUNDED", "VACUUM", "VIEW", "VIRTUAL", "WITH", "WITHOUT", "REINDEX", "RENAME", "CTIME_KW", "IF", "FILTER", "ANY", "OR", "AND", "NOT", "IS", "BETWEEN", "IN", "ISNULL", "NOTNULL", "NE", "EQ", "GT", "LE", "LT", "GE", "ESCAPE", "BITAND", "BITOR", "LSHIFT", "RSHIFT", "PLUS", "MINUS", "STAR", "SLASH", "REM", "CONCAT", "PTR", "COLLATE", "BITNOT", "SEMI", "TRANSACTION", "ID_TRANS", "COMMIT", "TO", "CREATE", "TABLE", "LP", "RP", "AS", "DOT", "ID_TAB_NEW", "ID_DB", "COMMA", "CTX_ROWID_KW", "CTX_STRICT_KW", "EXISTS", "ID_COL_NEW", "STRING", "JOIN_KW", "ID_COL_TYPE", "RIGHT_ASSOC", "CONSTRAINT", "DEFAULT", "NULL", "PRIMARY", "UNIQUE", "CHECK", "REFERENCES", "ID_CONSTR", "ID_COLLATE", "ID_TAB", "INTEGER", "FLOAT", "BLOB", "AUTOINCR", "ON", "INSERT", "DELETE", "UPDATE", "ID_FK_MATCH", "SET", "DEFERRABLE", "FOREIGN", "DROP", "ID_VIEW_NEW", "ID_VIEW", "SELECT", "VALUES", "UNION", "ALL", "EXCEPT", "INTERSECT", "DISTINCT", "ID_ALIAS", "FROM", "USING", "JOIN", "ID_JOIN_OPTS", "ID_IDX", "ORDER", "GROUP", "HAVING", "LIMIT", "WHERE", "RETURNING", "ID_COL", "INTO", "NOTHING", "ID_FN", "ID_ERR_MSG", "VARIABLE", "CASE", "WHEN", "THEN", "ELSE", "INDEX", "ID_IDX_NEW", "ID_PRAGMA", "ID_TRIG_NEW", "ID_TRIG", "ALTER", "ADD", "WINDOW", "OVER", "error", "cmd", "input", "cmdlist", "ecmd", "explain", "cmdx", "transtype", "trans_opt", "nm", "savepoint_opt", "temp", "ifnotexists", "fullname", "columnlist", "conslist_opt", "table_options", "select", "table_option", "column", "columnid", "type", "carglist", "id", "id_opt", "ids", "typetoken", "typename", "signed", "plus_num", "minus_num", "ccons", "term", "expr", "onconf", "sortorder", "autoinc", "idxlist_opt", "refargs", "defer_subclause", "gen_always", "tnm", "refarg", "refact", "init_deferred_pred_opt", "conslist", "tconscomma", "tcons", "idxlist", "defer_subclause_opt", "resolvetype", "orconf", "raisetype", "ifexists", "select_stmt", "with", "selectnowith", "oneselect", "multiselect_op", "values", "distinct", "selcollist", "from", "where_opt", "groupby_opt", "having_opt", "orderby_opt", "limit_opt", "window_clause", "nexprlist", "exprlist", "sclp", "as", "joinsrc", "singlesrc", "seltablist", "joinop", "joinconstr_opt", "dbnm", "indexed_opt", "idlist", "sortlist", "nulls", "delete_stmt", "returning", "update_stmt", "setlist", "idlist_opt", "insert_stmt", "insert_cmd", "upsert", "rp_opt", "exprx", "not_opt", "likeop", "case_operand", "case_exprlist", "case_else", "filter_over", "uniqueflag", "idxlist_single", "collate", "vinto", "nmnum", "number", "trigger_time", "trigger_event", "foreach_clause", "when_clause", "trigger_cmd_list", "trigger_cmd", "database_kw_opt", "key_opt", "kwcolumn_opt", "create_vtab", "vtabarglist", "vtabarg", "vtabargtoken", "anylist", "wqlist", "wqas", "wqcte", "windowdefn_list", "windowdefn", "window", "frame_opt", "range_or_rows", "frame_bound_s", "frame_exclude_opt", "frame_bound_e", "frame_bound", "frame_exclude", "filter_clause", "over_clause", }; #endif /* NDEBUG */ #ifndef NDEBUG /* For tracing reduce actions, the names of all rules are required. */ static const char *const yyRuleName[] = { /* 0 */ "input ::= cmdlist", /* 1 */ "cmdlist ::= cmdlist ecmd", /* 2 */ "cmdlist ::= ecmd", /* 3 */ "ecmd ::= SEMI", /* 4 */ "ecmd ::= explain cmdx SEMI", /* 5 */ "explain ::=", /* 6 */ "explain ::= EXPLAIN", /* 7 */ "explain ::= EXPLAIN QUERY PLAN", /* 8 */ "cmdx ::= cmd", /* 9 */ "cmd ::= BEGIN transtype trans_opt", /* 10 */ "trans_opt ::=", /* 11 */ "trans_opt ::= TRANSACTION", /* 12 */ "trans_opt ::= TRANSACTION nm", /* 13 */ "trans_opt ::= TRANSACTION ID_TRANS", /* 14 */ "transtype ::=", /* 15 */ "transtype ::= DEFERRED", /* 16 */ "transtype ::= IMMEDIATE", /* 17 */ "transtype ::= EXCLUSIVE", /* 18 */ "cmd ::= COMMIT trans_opt", /* 19 */ "cmd ::= END trans_opt", /* 20 */ "cmd ::= ROLLBACK trans_opt", /* 21 */ "savepoint_opt ::= SAVEPOINT", /* 22 */ "savepoint_opt ::=", /* 23 */ "cmd ::= SAVEPOINT nm", /* 24 */ "cmd ::= RELEASE savepoint_opt nm", /* 25 */ "cmd ::= ROLLBACK trans_opt TO savepoint_opt nm", /* 26 */ "cmd ::= SAVEPOINT ID_TRANS", /* 27 */ "cmd ::= RELEASE savepoint_opt ID_TRANS", /* 28 */ "cmd ::= ROLLBACK trans_opt TO savepoint_opt ID_TRANS", /* 29 */ "cmd ::= CREATE temp TABLE ifnotexists fullname LP columnlist conslist_opt RP table_options", /* 30 */ "cmd ::= CREATE temp TABLE ifnotexists fullname AS select", /* 31 */ "cmd ::= CREATE temp TABLE ifnotexists nm DOT ID_TAB_NEW", /* 32 */ "cmd ::= CREATE temp TABLE ifnotexists ID_DB|ID_TAB_NEW", /* 33 */ "table_options ::=", /* 34 */ "table_options ::= table_option", /* 35 */ "table_options ::= table_options COMMA table_option", /* 36 */ "table_option ::= WITHOUT nm", /* 37 */ "table_option ::= nm", /* 38 */ "table_option ::= WITHOUT CTX_ROWID_KW", /* 39 */ "table_option ::= CTX_STRICT_KW", /* 40 */ "ifnotexists ::=", /* 41 */ "ifnotexists ::= IF NOT EXISTS", /* 42 */ "temp ::= TEMP", /* 43 */ "temp ::=", /* 44 */ "columnlist ::= columnlist COMMA column", /* 45 */ "columnlist ::= column", /* 46 */ "column ::= columnid type carglist", /* 47 */ "columnid ::= nm", /* 48 */ "columnid ::= ID_COL_NEW", /* 49 */ "id ::= ID", /* 50 */ "id_opt ::= id", /* 51 */ "id_opt ::=", /* 52 */ "ids ::= ID|STRING", /* 53 */ "nm ::= id", /* 54 */ "nm ::= STRING", /* 55 */ "nm ::= JOIN_KW", /* 56 */ "type ::=", /* 57 */ "type ::= typetoken", /* 58 */ "typetoken ::= typename", /* 59 */ "typetoken ::= typename LP signed RP", /* 60 */ "typetoken ::= typename LP signed COMMA signed RP", /* 61 */ "typename ::= ids", /* 62 */ "typename ::= typename ids", /* 63 */ "typename ::= ID_COL_TYPE", /* 64 */ "signed ::= plus_num", /* 65 */ "signed ::= minus_num", /* 66 */ "carglist ::= carglist ccons", /* 67 */ "carglist ::=", /* 68 */ "ccons ::= CONSTRAINT nm", /* 69 */ "ccons ::= DEFAULT term", /* 70 */ "ccons ::= DEFAULT LP expr RP", /* 71 */ "ccons ::= DEFAULT PLUS term", /* 72 */ "ccons ::= DEFAULT MINUS term", /* 73 */ "ccons ::= DEFAULT id", /* 74 */ "ccons ::= DEFAULT CTIME_KW", /* 75 */ "ccons ::= NULL onconf", /* 76 */ "ccons ::= NOT NULL onconf", /* 77 */ "ccons ::= PRIMARY KEY sortorder onconf autoinc", /* 78 */ "ccons ::= UNIQUE onconf", /* 79 */ "ccons ::= CHECK LP expr RP", /* 80 */ "ccons ::= REFERENCES nm idxlist_opt refargs", /* 81 */ "ccons ::= defer_subclause", /* 82 */ "ccons ::= COLLATE ids", /* 83 */ "ccons ::= gen_always AS LP expr RP id_opt", /* 84 */ "ccons ::= CONSTRAINT ID_CONSTR", /* 85 */ "ccons ::= COLLATE ID_COLLATE", /* 86 */ "ccons ::= REFERENCES ID_TAB", /* 87 */ "ccons ::= CHECK LP RP", /* 88 */ "term ::= NULL", /* 89 */ "term ::= INTEGER", /* 90 */ "term ::= FLOAT", /* 91 */ "term ::= STRING|BLOB", /* 92 */ "tnm ::= term", /* 93 */ "tnm ::= nm", /* 94 */ "gen_always ::= GENERATED ALWAYS", /* 95 */ "gen_always ::=", /* 96 */ "autoinc ::=", /* 97 */ "autoinc ::= AUTOINCR", /* 98 */ "refargs ::=", /* 99 */ "refargs ::= refargs refarg", /* 100 */ "refarg ::= MATCH nm", /* 101 */ "refarg ::= ON INSERT refact", /* 102 */ "refarg ::= ON DELETE refact", /* 103 */ "refarg ::= ON UPDATE refact", /* 104 */ "refarg ::= MATCH ID_FK_MATCH", /* 105 */ "refact ::= SET NULL", /* 106 */ "refact ::= SET DEFAULT", /* 107 */ "refact ::= CASCADE", /* 108 */ "refact ::= RESTRICT", /* 109 */ "refact ::= NO ACTION", /* 110 */ "defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt", /* 111 */ "defer_subclause ::= DEFERRABLE init_deferred_pred_opt", /* 112 */ "init_deferred_pred_opt ::=", /* 113 */ "init_deferred_pred_opt ::= INITIALLY DEFERRED", /* 114 */ "init_deferred_pred_opt ::= INITIALLY IMMEDIATE", /* 115 */ "conslist_opt ::=", /* 116 */ "conslist_opt ::= COMMA conslist", /* 117 */ "conslist ::= conslist tconscomma tcons", /* 118 */ "conslist ::= tcons", /* 119 */ "tconscomma ::= COMMA", /* 120 */ "tconscomma ::=", /* 121 */ "tcons ::= CONSTRAINT nm", /* 122 */ "tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf", /* 123 */ "tcons ::= UNIQUE LP idxlist RP onconf", /* 124 */ "tcons ::= CHECK LP expr RP onconf", /* 125 */ "tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt", /* 126 */ "tcons ::= CONSTRAINT ID_CONSTR", /* 127 */ "tcons ::= FOREIGN KEY LP idxlist RP REFERENCES ID_TAB", /* 128 */ "tcons ::= CHECK LP RP onconf", /* 129 */ "defer_subclause_opt ::=", /* 130 */ "defer_subclause_opt ::= defer_subclause", /* 131 */ "onconf ::=", /* 132 */ "onconf ::= ON CONFLICT resolvetype", /* 133 */ "orconf ::=", /* 134 */ "orconf ::= OR resolvetype", /* 135 */ "resolvetype ::= raisetype", /* 136 */ "resolvetype ::= IGNORE", /* 137 */ "resolvetype ::= REPLACE", /* 138 */ "cmd ::= DROP TABLE ifexists fullname", /* 139 */ "cmd ::= DROP TABLE ifexists nm DOT ID_TAB", /* 140 */ "cmd ::= DROP TABLE ifexists ID_DB|ID_TAB", /* 141 */ "ifexists ::= IF EXISTS", /* 142 */ "ifexists ::=", /* 143 */ "cmd ::= CREATE temp VIEW ifnotexists fullname idxlist_opt AS select", /* 144 */ "cmd ::= CREATE temp VIEW ifnotexists nm DOT ID_VIEW_NEW", /* 145 */ "cmd ::= CREATE temp VIEW ifnotexists ID_DB|ID_VIEW_NEW", /* 146 */ "cmd ::= DROP VIEW ifexists fullname", /* 147 */ "cmd ::= DROP VIEW ifexists nm DOT ID_VIEW", /* 148 */ "cmd ::= DROP VIEW ifexists ID_DB|ID_VIEW", /* 149 */ "cmd ::= select_stmt", /* 150 */ "select_stmt ::= select", /* 151 */ "select ::= with selectnowith", /* 152 */ "selectnowith ::= oneselect", /* 153 */ "selectnowith ::= selectnowith multiselect_op oneselect", /* 154 */ "selectnowith ::= values", /* 155 */ "selectnowith ::= selectnowith COMMA values", /* 156 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt", /* 157 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt", /* 158 */ "values ::= VALUES LP nexprlist RP", /* 159 */ "values ::= values COMMA LP exprlist RP", /* 160 */ "multiselect_op ::= UNION", /* 161 */ "multiselect_op ::= UNION ALL", /* 162 */ "multiselect_op ::= EXCEPT", /* 163 */ "multiselect_op ::= INTERSECT", /* 164 */ "distinct ::= DISTINCT", /* 165 */ "distinct ::= ALL", /* 166 */ "distinct ::=", /* 167 */ "sclp ::= selcollist COMMA", /* 168 */ "sclp ::=", /* 169 */ "selcollist ::= sclp expr as", /* 170 */ "selcollist ::= sclp STAR", /* 171 */ "selcollist ::= sclp tnm DOT STAR", /* 172 */ "selcollist ::= sclp", /* 173 */ "selcollist ::= sclp ID_TAB DOT STAR", /* 174 */ "as ::= AS nm", /* 175 */ "as ::= ids", /* 176 */ "as ::= AS ID_ALIAS", /* 177 */ "as ::= ID_ALIAS", /* 178 */ "as ::=", /* 179 */ "from ::=", /* 180 */ "from ::= FROM joinsrc", /* 181 */ "joinsrc ::= singlesrc seltablist", /* 182 */ "joinsrc ::=", /* 183 */ "seltablist ::= seltablist joinop singlesrc joinconstr_opt", /* 184 */ "seltablist ::=", /* 185 */ "singlesrc ::= nm dbnm as indexed_opt", /* 186 */ "singlesrc ::= LP select RP as", /* 187 */ "singlesrc ::= LP joinsrc RP as", /* 188 */ "singlesrc ::= nm dbnm LP exprlist RP as", /* 189 */ "singlesrc ::=", /* 190 */ "singlesrc ::= nm DOT", /* 191 */ "singlesrc ::= nm DOT ID_TAB", /* 192 */ "singlesrc ::= ID_DB|ID_TAB", /* 193 */ "singlesrc ::= nm DOT ID_VIEW", /* 194 */ "singlesrc ::= ID_DB|ID_VIEW", /* 195 */ "joinconstr_opt ::= ON expr", /* 196 */ "joinconstr_opt ::= USING LP idlist RP", /* 197 */ "joinconstr_opt ::=", /* 198 */ "dbnm ::=", /* 199 */ "dbnm ::= DOT nm", /* 200 */ "fullname ::= nm dbnm", /* 201 */ "joinop ::= COMMA", /* 202 */ "joinop ::= JOIN", /* 203 */ "joinop ::= JOIN_KW JOIN", /* 204 */ "joinop ::= JOIN_KW nm JOIN", /* 205 */ "joinop ::= JOIN_KW nm nm JOIN", /* 206 */ "joinop ::= ID_JOIN_OPTS", /* 207 */ "indexed_opt ::=", /* 208 */ "indexed_opt ::= INDEXED BY nm", /* 209 */ "indexed_opt ::= NOT INDEXED", /* 210 */ "indexed_opt ::= INDEXED BY ID_IDX", /* 211 */ "orderby_opt ::=", /* 212 */ "orderby_opt ::= ORDER BY sortlist", /* 213 */ "sortlist ::= sortlist COMMA expr sortorder nulls", /* 214 */ "sortlist ::= expr sortorder nulls", /* 215 */ "sortorder ::= ASC", /* 216 */ "sortorder ::= DESC", /* 217 */ "sortorder ::=", /* 218 */ "nulls ::= NULLS FIRST", /* 219 */ "nulls ::= NULLS LAST", /* 220 */ "nulls ::=", /* 221 */ "groupby_opt ::=", /* 222 */ "groupby_opt ::= GROUP BY nexprlist", /* 223 */ "groupby_opt ::= GROUP BY", /* 224 */ "having_opt ::=", /* 225 */ "having_opt ::= HAVING expr", /* 226 */ "limit_opt ::=", /* 227 */ "limit_opt ::= LIMIT expr", /* 228 */ "limit_opt ::= LIMIT expr OFFSET expr", /* 229 */ "limit_opt ::= LIMIT expr COMMA expr", /* 230 */ "cmd ::= delete_stmt", /* 231 */ "delete_stmt ::= with DELETE FROM fullname indexed_opt where_opt returning", /* 232 */ "delete_stmt ::= with DELETE FROM", /* 233 */ "delete_stmt ::= with DELETE FROM nm DOT", /* 234 */ "delete_stmt ::= with DELETE FROM nm DOT ID_TAB", /* 235 */ "delete_stmt ::= with DELETE FROM ID_DB|ID_TAB", /* 236 */ "where_opt ::=", /* 237 */ "where_opt ::= WHERE expr", /* 238 */ "where_opt ::= WHERE", /* 239 */ "returning ::=", /* 240 */ "returning ::= RETURNING selcollist", /* 241 */ "cmd ::= update_stmt", /* 242 */ "update_stmt ::= with UPDATE orconf fullname indexed_opt SET setlist from where_opt returning", /* 243 */ "update_stmt ::= with UPDATE orconf", /* 244 */ "update_stmt ::= with UPDATE orconf nm DOT", /* 245 */ "update_stmt ::= with UPDATE orconf nm DOT ID_TAB", /* 246 */ "update_stmt ::= with UPDATE orconf ID_DB|ID_TAB", /* 247 */ "setlist ::= setlist COMMA nm EQ expr", /* 248 */ "setlist ::= setlist COMMA LP idlist RP EQ expr", /* 249 */ "setlist ::= nm EQ expr", /* 250 */ "setlist ::= LP idlist RP EQ expr", /* 251 */ "setlist ::=", /* 252 */ "setlist ::= setlist COMMA", /* 253 */ "setlist ::= setlist COMMA ID_COL", /* 254 */ "setlist ::= ID_COL", /* 255 */ "idlist_opt ::=", /* 256 */ "idlist_opt ::= LP idlist RP", /* 257 */ "idlist ::= idlist COMMA nm", /* 258 */ "idlist ::= nm", /* 259 */ "idlist ::=", /* 260 */ "idlist ::= idlist COMMA ID_COL", /* 261 */ "idlist ::= ID_COL", /* 262 */ "cmd ::= insert_stmt", /* 263 */ "insert_stmt ::= with insert_cmd INTO fullname idlist_opt select upsert returning", /* 264 */ "insert_stmt ::= with insert_cmd INTO fullname idlist_opt DEFAULT VALUES returning", /* 265 */ "insert_stmt ::= with insert_cmd INTO fullname LP idlist rp_opt", /* 266 */ "insert_stmt ::= with insert_cmd INTO", /* 267 */ "insert_stmt ::= with insert_cmd INTO nm DOT", /* 268 */ "insert_stmt ::= with insert_cmd INTO ID_DB|ID_TAB", /* 269 */ "insert_stmt ::= with insert_cmd INTO nm DOT ID_TAB", /* 270 */ "insert_cmd ::= INSERT orconf", /* 271 */ "insert_cmd ::= REPLACE", /* 272 */ "upsert ::=", /* 273 */ "upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt", /* 274 */ "upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING", /* 275 */ "upsert ::= ON CONFLICT DO NOTHING", /* 276 */ "exprx ::= expr not_opt IN ID_DB", /* 277 */ "exprx ::= expr not_opt IN nm DOT ID_TAB", /* 278 */ "exprx ::= ID_DB|ID_TAB|ID_COL|ID_FN", /* 279 */ "exprx ::= tnm DOT ID_TAB|ID_COL", /* 280 */ "exprx ::= tnm DOT nm DOT ID_COL", /* 281 */ "exprx ::= expr COLLATE ID_COLLATE", /* 282 */ "exprx ::= RAISE LP raisetype COMMA ID_ERR_MSG RP", /* 283 */ "exprx ::= CTIME_KW", /* 284 */ "exprx ::= LP nexprlist RP", /* 285 */ "exprx ::= tnm", /* 286 */ "exprx ::= tnm DOT nm", /* 287 */ "exprx ::= tnm DOT", /* 288 */ "exprx ::= tnm DOT nm DOT nm", /* 289 */ "exprx ::= tnm DOT nm DOT", /* 290 */ "exprx ::= VARIABLE", /* 291 */ "exprx ::= expr COLLATE ids", /* 292 */ "exprx ::= CAST LP expr AS typetoken RP", /* 293 */ "exprx ::= ID LP distinct exprlist RP", /* 294 */ "exprx ::= ID LP STAR RP", /* 295 */ "exprx ::= expr AND expr", /* 296 */ "exprx ::= expr OR expr", /* 297 */ "exprx ::= expr LT|GT|GE|LE expr", /* 298 */ "exprx ::= expr EQ|NE expr", /* 299 */ "exprx ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr", /* 300 */ "exprx ::= expr PLUS|MINUS expr", /* 301 */ "exprx ::= expr STAR|SLASH|REM expr", /* 302 */ "exprx ::= expr CONCAT expr", /* 303 */ "exprx ::= expr not_opt likeop expr", /* 304 */ "exprx ::= expr not_opt likeop expr ESCAPE expr", /* 305 */ "exprx ::= expr ISNULL|NOTNULL", /* 306 */ "exprx ::= expr NOT NULL", /* 307 */ "exprx ::= expr IS not_opt expr", /* 308 */ "exprx ::= expr IS NOT DISTINCT FROM expr", /* 309 */ "exprx ::= expr IS DISTINCT FROM expr", /* 310 */ "exprx ::= NOT expr", /* 311 */ "exprx ::= BITNOT expr", /* 312 */ "exprx ::= MINUS expr", /* 313 */ "exprx ::= PLUS expr", /* 314 */ "exprx ::= expr PTR expr", /* 315 */ "exprx ::= expr not_opt BETWEEN expr AND expr", /* 316 */ "exprx ::= expr not_opt IN LP exprlist RP", /* 317 */ "exprx ::= LP select RP", /* 318 */ "exprx ::= expr not_opt IN LP select RP", /* 319 */ "exprx ::= expr not_opt IN nm dbnm", /* 320 */ "exprx ::= EXISTS LP select RP", /* 321 */ "exprx ::= CASE case_operand case_exprlist case_else END", /* 322 */ "exprx ::= RAISE LP IGNORE RP", /* 323 */ "exprx ::= RAISE LP raisetype COMMA nm RP", /* 324 */ "exprx ::= ID LP distinct exprlist RP filter_over", /* 325 */ "exprx ::= ID LP STAR RP filter_over", /* 326 */ "expr ::=", /* 327 */ "expr ::= exprx", /* 328 */ "not_opt ::=", /* 329 */ "not_opt ::= NOT", /* 330 */ "rp_opt ::=", /* 331 */ "rp_opt ::= RP", /* 332 */ "likeop ::= LIKE_KW|MATCH", /* 333 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr", /* 334 */ "case_exprlist ::= WHEN expr THEN expr", /* 335 */ "case_else ::= ELSE expr", /* 336 */ "case_else ::=", /* 337 */ "case_operand ::= exprx", /* 338 */ "case_operand ::=", /* 339 */ "exprlist ::= nexprlist", /* 340 */ "exprlist ::=", /* 341 */ "nexprlist ::= nexprlist COMMA expr", /* 342 */ "nexprlist ::= exprx", /* 343 */ "cmd ::= CREATE uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt", /* 344 */ "cmd ::= CREATE uniqueflag INDEX ifnotexists nm dbnm ON ID_TAB", /* 345 */ "cmd ::= CREATE uniqueflag INDEX ifnotexists nm DOT ID_IDX_NEW", /* 346 */ "cmd ::= CREATE uniqueflag INDEX ifnotexists ID_DB|ID_IDX_NEW", /* 347 */ "uniqueflag ::= UNIQUE", /* 348 */ "uniqueflag ::=", /* 349 */ "idxlist_opt ::=", /* 350 */ "idxlist_opt ::= LP idxlist RP", /* 351 */ "idxlist ::= idxlist COMMA idxlist_single", /* 352 */ "idxlist ::= idxlist_single", /* 353 */ "idxlist_single ::= nm collate sortorder", /* 354 */ "idxlist_single ::= ID_COL", /* 355 */ "collate ::=", /* 356 */ "collate ::= COLLATE ids", /* 357 */ "collate ::= COLLATE ID_COLLATE", /* 358 */ "cmd ::= DROP INDEX ifexists fullname", /* 359 */ "cmd ::= DROP INDEX ifexists nm DOT ID_IDX", /* 360 */ "cmd ::= DROP INDEX ifexists ID_DB|ID_IDX", /* 361 */ "cmd ::= VACUUM vinto", /* 362 */ "cmd ::= VACUUM nm vinto", /* 363 */ "vinto ::= INTO expr", /* 364 */ "vinto ::=", /* 365 */ "cmd ::= PRAGMA nm dbnm", /* 366 */ "cmd ::= PRAGMA nm dbnm EQ nmnum", /* 367 */ "cmd ::= PRAGMA nm dbnm LP nmnum RP", /* 368 */ "cmd ::= PRAGMA nm dbnm EQ minus_num", /* 369 */ "cmd ::= PRAGMA nm dbnm LP minus_num RP", /* 370 */ "cmd ::= PRAGMA nm DOT ID_PRAGMA", /* 371 */ "cmd ::= PRAGMA ID_DB|ID_PRAGMA", /* 372 */ "nmnum ::= plus_num", /* 373 */ "nmnum ::= nm", /* 374 */ "nmnum ::= ON", /* 375 */ "nmnum ::= DELETE", /* 376 */ "nmnum ::= DEFAULT", /* 377 */ "plus_num ::= PLUS number", /* 378 */ "plus_num ::= number", /* 379 */ "minus_num ::= MINUS number", /* 380 */ "number ::= INTEGER", /* 381 */ "number ::= FLOAT", /* 382 */ "cmd ::= CREATE temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON nm foreach_clause when_clause BEGIN trigger_cmd_list END", /* 383 */ "cmd ::= CREATE temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON nm foreach_clause when_clause", /* 384 */ "cmd ::= CREATE temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON nm foreach_clause when_clause BEGIN trigger_cmd_list", /* 385 */ "cmd ::= CREATE temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON ID_TAB", /* 386 */ "cmd ::= CREATE temp TRIGGER ifnotexists nm DOT ID_TRIG_NEW", /* 387 */ "cmd ::= CREATE temp TRIGGER ifnotexists ID_DB|ID_TRIG_NEW", /* 388 */ "trigger_time ::= BEFORE", /* 389 */ "trigger_time ::= AFTER", /* 390 */ "trigger_time ::= INSTEAD OF", /* 391 */ "trigger_time ::=", /* 392 */ "trigger_event ::= DELETE", /* 393 */ "trigger_event ::= INSERT", /* 394 */ "trigger_event ::= UPDATE", /* 395 */ "trigger_event ::= UPDATE OF idlist", /* 396 */ "foreach_clause ::=", /* 397 */ "foreach_clause ::= FOR EACH ROW", /* 398 */ "when_clause ::=", /* 399 */ "when_clause ::= WHEN expr", /* 400 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI", /* 401 */ "trigger_cmd_list ::= trigger_cmd SEMI", /* 402 */ "trigger_cmd_list ::= SEMI", /* 403 */ "trigger_cmd ::= update_stmt", /* 404 */ "trigger_cmd ::= insert_stmt", /* 405 */ "trigger_cmd ::= delete_stmt", /* 406 */ "trigger_cmd ::= select_stmt", /* 407 */ "raisetype ::= ROLLBACK|ABORT|FAIL", /* 408 */ "cmd ::= DROP TRIGGER ifexists fullname", /* 409 */ "cmd ::= DROP TRIGGER ifexists nm DOT ID_TRIG", /* 410 */ "cmd ::= DROP TRIGGER ifexists ID_DB|ID_TRIG", /* 411 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt", /* 412 */ "cmd ::= DETACH database_kw_opt expr", /* 413 */ "key_opt ::=", /* 414 */ "key_opt ::= KEY expr", /* 415 */ "database_kw_opt ::= DATABASE", /* 416 */ "database_kw_opt ::=", /* 417 */ "cmd ::= REINDEX", /* 418 */ "cmd ::= REINDEX nm dbnm", /* 419 */ "cmd ::= REINDEX ID_COLLATE", /* 420 */ "cmd ::= REINDEX nm DOT ID_TAB|ID_IDX", /* 421 */ "cmd ::= REINDEX ID_DB|ID_IDX|ID_TAB", /* 422 */ "cmd ::= ANALYZE", /* 423 */ "cmd ::= ANALYZE nm dbnm", /* 424 */ "cmd ::= ANALYZE nm DOT ID_TAB|ID_IDX", /* 425 */ "cmd ::= ANALYZE ID_DB|ID_IDX|ID_TAB", /* 426 */ "cmd ::= ALTER TABLE fullname RENAME TO nm", /* 427 */ "cmd ::= ALTER TABLE fullname ADD kwcolumn_opt column", /* 428 */ "cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm", /* 429 */ "cmd ::= ALTER TABLE fullname RENAME TO ID_TAB_NEW", /* 430 */ "cmd ::= ALTER TABLE nm DOT ID_TAB", /* 431 */ "cmd ::= ALTER TABLE ID_DB|ID_TAB", /* 432 */ "kwcolumn_opt ::=", /* 433 */ "kwcolumn_opt ::= COLUMNKW", /* 434 */ "cmd ::= create_vtab", /* 435 */ "create_vtab ::= CREATE VIRTUAL TABLE ifnotexists nm dbnm USING nm", /* 436 */ "create_vtab ::= CREATE VIRTUAL TABLE ifnotexists nm dbnm USING nm LP vtabarglist RP", /* 437 */ "create_vtab ::= CREATE VIRTUAL TABLE ifnotexists nm DOT ID_TAB_NEW", /* 438 */ "create_vtab ::= CREATE VIRTUAL TABLE ifnotexists ID_DB|ID_TAB_NEW", /* 439 */ "vtabarglist ::= vtabarg", /* 440 */ "vtabarglist ::= vtabarglist COMMA vtabarg", /* 441 */ "vtabarg ::=", /* 442 */ "vtabarg ::= vtabarg vtabargtoken", /* 443 */ "vtabargtoken ::= ANY", /* 444 */ "vtabargtoken ::= LP anylist RP", /* 445 */ "anylist ::=", /* 446 */ "anylist ::= anylist LP anylist RP", /* 447 */ "anylist ::= anylist ANY", /* 448 */ "with ::=", /* 449 */ "with ::= WITH wqlist", /* 450 */ "with ::= WITH RECURSIVE wqlist", /* 451 */ "wqas ::= AS", /* 452 */ "wqas ::= AS MATERIALIZED", /* 453 */ "wqas ::= AS NOT MATERIALIZED", /* 454 */ "wqlist ::= wqcte", /* 455 */ "wqlist ::= wqlist COMMA wqcte", /* 456 */ "wqlist ::= ID_TAB_NEW", /* 457 */ "wqcte ::= nm idxlist_opt wqas LP select RP", /* 458 */ "windowdefn_list ::= windowdefn", /* 459 */ "windowdefn_list ::= windowdefn_list COMMA windowdefn", /* 460 */ "windowdefn ::= nm AS LP window RP", /* 461 */ "window ::= PARTITION BY nexprlist orderby_opt frame_opt", /* 462 */ "window ::= nm PARTITION BY nexprlist orderby_opt frame_opt", /* 463 */ "window ::= ORDER BY sortlist frame_opt", /* 464 */ "window ::= nm ORDER BY sortlist frame_opt", /* 465 */ "window ::= frame_opt", /* 466 */ "window ::= nm frame_opt", /* 467 */ "frame_opt ::=", /* 468 */ "frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt", /* 469 */ "frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt", /* 470 */ "range_or_rows ::= RANGE|ROWS|GROUPS", /* 471 */ "frame_bound_s ::= frame_bound", /* 472 */ "frame_bound_s ::= UNBOUNDED PRECEDING", /* 473 */ "frame_bound_e ::= frame_bound", /* 474 */ "frame_bound_e ::= UNBOUNDED FOLLOWING", /* 475 */ "frame_bound ::= expr PRECEDING|FOLLOWING", /* 476 */ "frame_bound ::= CURRENT ROW", /* 477 */ "frame_exclude_opt ::=", /* 478 */ "frame_exclude_opt ::= EXCLUDE frame_exclude", /* 479 */ "frame_exclude ::= NO OTHERS", /* 480 */ "frame_exclude ::= CURRENT ROW", /* 481 */ "frame_exclude ::= GROUP", /* 482 */ "frame_exclude ::= TIES", /* 483 */ "window_clause ::= WINDOW windowdefn_list", /* 484 */ "filter_over ::= filter_clause over_clause", /* 485 */ "filter_over ::= over_clause", /* 486 */ "filter_over ::= filter_clause", /* 487 */ "over_clause ::= OVER LP window RP", /* 488 */ "over_clause ::= OVER nm", /* 489 */ "filter_clause ::= FILTER LP WHERE expr RP", }; #endif /* NDEBUG */ #if YYSTACKDEPTH<=0 /* ** Try to increase the size of the parser stack. */ static void yyGrowStack(yyParser *p){ int newSize; yyStackEntry *pNew; newSize = p->yystksz*2 + 100; pNew = realloc(p->yystack, newSize*sizeof(pNew[0])); if( pNew ){ p->yystack = pNew; p->yystksz = newSize; #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE,"%sStack grows to %d entries!\n", yyTracePrompt, p->yystksz); } #endif } } #endif /* ** 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 sqlite3_parse and sqlite3_parseFree. */ void *sqlite3_parseAlloc(void *(*mallocProc)(size_t)){ yyParser *pParser; pParser = (yyParser*)(*mallocProc)( (size_t)sizeof(yyParser) ); if( pParser ){ pParser->yyidx = -1; #ifdef YYTRACKMAXSTACKDEPTH pParser->yyidxMax = 0; #endif #if YYSTACKDEPTH<=0 pParser->yystack = NULL; pParser->yystksz = 0; yyGrowStack(pParser); #endif } return pParser; } /* The following function deletes the 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. */ static void yy_destructor( yyParser *yypParser, /* The parser */ YYCODETYPE yymajor, /* Type code for object to destroy */ YYMINORTYPE *yypminor /* The object to be destroyed */ ){ sqlite3_parseARG_FETCH; if (parserContext->executeRules) { 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. */ case 195: /* cmd */ case 198: /* ecmd */ case 200: /* cmdx */ case 248: /* select_stmt */ case 277: /* delete_stmt */ case 279: /* update_stmt */ case 282: /* insert_stmt */ case 304: /* trigger_cmd */ case 308: /* create_vtab */ { parser_safe_delete((yypminor->yy635)); } break; case 199: /* explain */ { parser_safe_delete((yypminor->yy571)); } break; case 201: /* transtype */ case 202: /* trans_opt */ { parser_safe_delete((yypminor->yy100)); } break; case 203: /* nm */ case 214: /* columnid */ case 217: /* id */ case 218: /* id_opt */ case 219: /* ids */ case 221: /* typename */ case 272: /* dbnm */ case 295: /* collate */ case 310: /* vtabarg */ case 311: /* vtabargtoken */ case 312: /* anylist */ { parser_safe_delete((yypminor->yy255)); } break; case 204: /* savepoint_opt */ case 206: /* ifnotexists */ case 230: /* autoinc */ case 234: /* gen_always */ case 240: /* tconscomma */ case 247: /* ifexists */ case 285: /* rp_opt */ case 287: /* not_opt */ case 293: /* uniqueflag */ case 305: /* database_kw_opt */ case 307: /* kwcolumn_opt */ { parser_safe_delete((yypminor->yy35)); } break; case 205: /* temp */ case 254: /* distinct */ { parser_safe_delete((yypminor->yy562)); } break; case 207: /* fullname */ { parser_safe_delete((yypminor->yy520)); } break; case 208: /* columnlist */ { parser_safe_delete((yypminor->yy234)); } break; case 209: /* conslist_opt */ case 239: /* conslist */ { parser_safe_delete((yypminor->yy445)); } break; case 210: /* table_options */ { parser_safe_delete((yypminor->yy217)); } break; case 211: /* select */ case 250: /* selectnowith */ { parser_safe_delete((yypminor->yy73)); } break; case 212: /* table_option */ { parser_safe_delete((yypminor->yy607)); } break; case 213: /* column */ { parser_safe_delete((yypminor->yy115)); } break; case 215: /* type */ case 220: /* typetoken */ { parser_safe_delete((yypminor->yy601)); } break; case 216: /* carglist */ { parser_safe_delete((yypminor->yy259)); } break; case 222: /* signed */ case 223: /* plus_num */ case 224: /* minus_num */ case 226: /* term */ case 297: /* nmnum */ case 298: /* number */ { parser_safe_delete((yypminor->yy629)); } break; case 225: /* ccons */ { parser_safe_delete((yypminor->yy64)); } break; case 227: /* expr */ case 257: /* where_opt */ case 259: /* having_opt */ case 286: /* exprx */ case 289: /* case_operand */ case 291: /* case_else */ case 296: /* vinto */ case 302: /* when_clause */ case 306: /* key_opt */ { parser_safe_delete((yypminor->yy176)); } break; case 228: /* onconf */ case 244: /* resolvetype */ case 245: /* orconf */ { parser_safe_delete((yypminor->yy66)); } break; case 229: /* sortorder */ { parser_safe_delete((yypminor->yy645)); } break; case 231: /* idxlist_opt */ case 242: /* idxlist */ { parser_safe_delete((yypminor->yy527)); } break; case 232: /* refargs */ { parser_safe_delete((yypminor->yy56)); } break; case 233: /* defer_subclause */ case 243: /* defer_subclause_opt */ { parser_safe_delete((yypminor->yy218)); } break; case 235: /* tnm */ { parser_safe_delete((yypminor->yy542)); } break; case 236: /* refarg */ { parser_safe_delete((yypminor->yy587)); } break; case 237: /* refact */ { parser_safe_delete((yypminor->yy488)); } break; case 238: /* init_deferred_pred_opt */ { parser_safe_delete((yypminor->yy536)); } break; case 241: /* tcons */ { parser_safe_delete((yypminor->yy166)); } break; case 249: /* with */ { parser_safe_delete((yypminor->yy321)); } break; case 251: /* oneselect */ { parser_safe_delete((yypminor->yy438)); } break; case 252: /* multiselect_op */ { parser_safe_delete((yypminor->yy574)); } break; case 253: /* values */ { parser_safe_delete((yypminor->yy54)); } break; case 255: /* selcollist */ case 265: /* sclp */ case 278: /* returning */ { parser_safe_delete((yypminor->yy421)); } break; case 256: /* from */ case 267: /* joinsrc */ { parser_safe_delete((yypminor->yy335)); } break; case 258: /* groupby_opt */ case 263: /* nexprlist */ case 264: /* exprlist */ case 290: /* case_exprlist */ { parser_safe_delete((yypminor->yy567)); } break; case 260: /* orderby_opt */ case 275: /* sortlist */ { parser_safe_delete((yypminor->yy499)); } break; case 261: /* limit_opt */ { parser_safe_delete((yypminor->yy4)); } break; case 262: /* window_clause */ case 316: /* windowdefn_list */ { parser_safe_delete((yypminor->yy555)); } break; case 266: /* as */ { parser_safe_delete((yypminor->yy280)); } break; case 268: /* singlesrc */ { parser_safe_delete((yypminor->yy393)); } break; case 269: /* seltablist */ { parser_safe_delete((yypminor->yy195)); } break; case 270: /* joinop */ { parser_safe_delete((yypminor->yy461)); } break; case 271: /* joinconstr_opt */ { parser_safe_delete((yypminor->yy423)); } break; case 273: /* indexed_opt */ { parser_safe_delete((yypminor->yy224)); } break; case 274: /* idlist */ case 281: /* idlist_opt */ case 309: /* vtabarglist */ { parser_safe_delete((yypminor->yy336)); } break; case 276: /* nulls */ { parser_safe_delete((yypminor->yy99)); } break; case 280: /* setlist */ { parser_safe_delete((yypminor->yy617)); } break; case 283: /* insert_cmd */ { parser_safe_delete((yypminor->yy281)); } break; case 284: /* upsert */ { parser_safe_delete((yypminor->yy16)); } break; case 288: /* likeop */ { parser_safe_delete((yypminor->yy104)); } break; case 292: /* filter_over */ { parser_safe_delete((yypminor->yy487)); } break; case 294: /* idxlist_single */ { parser_safe_delete((yypminor->yy540)); } break; case 299: /* trigger_time */ { parser_safe_delete((yypminor->yy612)); } break; case 300: /* trigger_event */ { parser_safe_delete((yypminor->yy407)); } break; case 301: /* foreach_clause */ { parser_safe_delete((yypminor->yy403)); } break; case 303: /* trigger_cmd_list */ { parser_safe_delete((yypminor->yy575)); } break; case 313: /* wqlist */ { parser_safe_delete((yypminor->yy17)); } break; case 314: /* wqas */ { parser_safe_delete((yypminor->yy383)); } break; case 315: /* wqcte */ { parser_safe_delete((yypminor->yy366)); } break; case 317: /* windowdefn */ { parser_safe_delete((yypminor->yy74)); } break; case 318: /* window */ { parser_safe_delete((yypminor->yy14)); } break; case 319: /* frame_opt */ { parser_safe_delete((yypminor->yy585)); } break; case 320: /* range_or_rows */ { parser_safe_delete((yypminor->yy34)); } break; case 321: /* frame_bound_s */ case 323: /* frame_bound_e */ { parser_safe_delete((yypminor->yy394)); } break; case 324: /* frame_bound */ { parser_safe_delete((yypminor->yy394));parser_safe_delete((yypminor->yy394));parser_safe_delete((yypminor->yy394)); } break; case 326: /* filter_clause */ { parser_safe_delete((yypminor->yy269)); } break; case 327: /* over_clause */ { parser_safe_delete((yypminor->yy231)); } break; 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. ** ** Return the major token number for the symbol popped. */ static int yy_pop_parser_stack(yyParser *pParser){ YYCODETYPE yymajor; yyStackEntry *yytos = &pParser->yystack[pParser->yyidx]; /* There is no mechanism by which the parser stack can be popped below ** empty in SQLite. */ if( pParser->yyidx<0 ) return 0; #ifndef NDEBUG if( yyTraceFILE && pParser->yyidx>=0 ){ fprintf(yyTraceFILE,"%sPopping %s\n", yyTracePrompt, yyTokenName[yytos->major]); } #endif yymajor = yytos->major; yy_destructor(pParser, yymajor, &yytos->minor); delete yytos->tokens; yytos->tokens = nullptr; pParser->yyidx--; return yymajor; } /* ** Deallocate and destroy a parser. Destructors are all called for ** all stack elements before shutting the parser down. ** ** Inputs: **
    **
  • A pointer to the parser. This should be a pointer ** obtained from sqlite3_parseAlloc. **
  • A pointer to a function used to reclaim memory obtained ** from malloc. **
*/ void sqlite3_parseFree( void *p, /* The parser to be deleted */ void (*freeProc)(void*) /* Function used to reclaim memory */ ){ yyParser *pParser = (yyParser*)p; /* In SQLite, we never try to destroy a parser that was not successfully ** created in the first place. */ if( pParser==0 ) return; while( pParser->yyidx>=0 ) yy_pop_parser_stack(pParser); #if YYSTACKDEPTH<=0 free(pParser->yystack); #endif (*freeProc)((void*)pParser); } /* ** Return the peak depth of the stack for a parser. */ #ifdef YYTRACKMAXSTACKDEPTH int sqlite3_parseStackPeak(void *p){ yyParser *pParser = (yyParser*)p; return pParser->yyidxMax; } #endif /* ** Find the appropriate action for a parser given the terminal ** look-ahead token iLookAhead. ** ** If the look-ahead token is YYNOCODE, then check to see if the action is ** independent of the look-ahead. If it is, return the action, otherwise ** return YY_NO_ACTION. */ static int yy_find_shift_action( yyParser *pParser, /* The parser */ YYCODETYPE iLookAhead /* The look-ahead token */ ){ int i; int stateno = pParser->yystack[pParser->yyidx].stateno; GET_CONTEXT; if( stateno>YY_SHIFT_COUNT || (i = yy_shift_ofst[stateno])==YY_SHIFT_USE_DFLT ){ return yy_default[stateno]; } assert( iLookAhead!=YYNOCODE ); i += iLookAhead; if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){ if( iLookAhead>0 ){ #ifdef YYFALLBACK YYCODETYPE iFallback; /* Fallback token */ if( iLookAheaddoFallbacks ){ #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n", yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]); } #endif return yy_find_shift_action(pParser, iFallback); } #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 j %s\n", yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[YYWILDCARD]); } #endif /* NDEBUG */ return yy_action[j]; } } #endif /* YYWILDCARD */ } return yy_default[stateno]; }else{ return yy_action[i]; } } /* ** Find the appropriate action for a parser given the non-terminal ** look-ahead token iLookAhead. ** ** If the look-ahead token is YYNOCODE, then check to see if the action is ** independent of the look-ahead. If it is, return the action, otherwise ** return YY_NO_ACTION. */ static int yy_find_reduce_action( int 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( i!=YY_REDUCE_USE_DFLT ); 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 && iyyidx--; #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt); } #endif while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser); /* Here code is inserted which will execute if the parser ** stack every overflows */ parserContext->error(QObject::tr("Parser stack overflow")); sqlite3_parseARG_STORE; /* Suppress warning about unused %extra_argument var */ } /* ** Perform a shift action. */ static void yy_shift( yyParser *yypParser, /* The parser to be shifted */ int yyNewState, /* The new state to shift in */ int yyMajor, /* The major token to shift in */ YYMINORTYPE *yypMinor /* Pointer to the minor token to shift in */ ){ yyStackEntry *yytos; yypParser->yyidx++; #ifdef YYTRACKMAXSTACKDEPTH if( yypParser->yyidx>yypParser->yyidxMax ){ yypParser->yyidxMax = yypParser->yyidx; } #endif #if YYSTACKDEPTH>0 if( yypParser->yyidx>=YYSTACKDEPTH ){ yyStackOverflow(yypParser, yypMinor); return; } #else if( yypParser->yyidx>=yypParser->yystksz ){ yyGrowStack(yypParser); if( yypParser->yyidx>=yypParser->yystksz ){ yyStackOverflow(yypParser, yypMinor); return; } } #endif yytos = &yypParser->yystack[yypParser->yyidx]; yytos->stateno = (YYACTIONTYPE)yyNewState; yytos->major = (YYCODETYPE)yyMajor; yytos->minor = *yypMinor; yytos->tokens = new QList(); #ifndef NDEBUG if( yyTraceFILE && yypParser->yyidx>0 ){ int i; fprintf(yyTraceFILE,"%sShift %d\n",yyTracePrompt,yyNewState); fprintf(yyTraceFILE,"%sStack:",yyTracePrompt); for(i=1; i<=yypParser->yyidx; i++) fprintf(yyTraceFILE," %s",yyTokenName[yypParser->yystack[i].major]); fprintf(yyTraceFILE,"\n"); } #endif } /* The following table contains information about every rule that ** is used during the reduce. */ static const struct { YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */ unsigned char nrhs; /* Number of right-hand side symbols in the rule */ } yyRuleInfo[] = { { 196, 1 }, { 197, 2 }, { 197, 1 }, { 198, 1 }, { 198, 3 }, { 199, 0 }, { 199, 1 }, { 199, 3 }, { 200, 1 }, { 195, 3 }, { 202, 0 }, { 202, 1 }, { 202, 2 }, { 202, 2 }, { 201, 0 }, { 201, 1 }, { 201, 1 }, { 201, 1 }, { 195, 2 }, { 195, 2 }, { 195, 2 }, { 204, 1 }, { 204, 0 }, { 195, 2 }, { 195, 3 }, { 195, 5 }, { 195, 2 }, { 195, 3 }, { 195, 5 }, { 195, 10 }, { 195, 7 }, { 195, 7 }, { 195, 5 }, { 210, 0 }, { 210, 1 }, { 210, 3 }, { 212, 2 }, { 212, 1 }, { 212, 2 }, { 212, 1 }, { 206, 0 }, { 206, 3 }, { 205, 1 }, { 205, 0 }, { 208, 3 }, { 208, 1 }, { 213, 3 }, { 214, 1 }, { 214, 1 }, { 217, 1 }, { 218, 1 }, { 218, 0 }, { 219, 1 }, { 203, 1 }, { 203, 1 }, { 203, 1 }, { 215, 0 }, { 215, 1 }, { 220, 1 }, { 220, 4 }, { 220, 6 }, { 221, 1 }, { 221, 2 }, { 221, 1 }, { 222, 1 }, { 222, 1 }, { 216, 2 }, { 216, 0 }, { 225, 2 }, { 225, 2 }, { 225, 4 }, { 225, 3 }, { 225, 3 }, { 225, 2 }, { 225, 2 }, { 225, 2 }, { 225, 3 }, { 225, 5 }, { 225, 2 }, { 225, 4 }, { 225, 4 }, { 225, 1 }, { 225, 2 }, { 225, 6 }, { 225, 2 }, { 225, 2 }, { 225, 2 }, { 225, 3 }, { 226, 1 }, { 226, 1 }, { 226, 1 }, { 226, 1 }, { 235, 1 }, { 235, 1 }, { 234, 2 }, { 234, 0 }, { 230, 0 }, { 230, 1 }, { 232, 0 }, { 232, 2 }, { 236, 2 }, { 236, 3 }, { 236, 3 }, { 236, 3 }, { 236, 2 }, { 237, 2 }, { 237, 2 }, { 237, 1 }, { 237, 1 }, { 237, 2 }, { 233, 3 }, { 233, 2 }, { 238, 0 }, { 238, 2 }, { 238, 2 }, { 209, 0 }, { 209, 2 }, { 239, 3 }, { 239, 1 }, { 240, 1 }, { 240, 0 }, { 241, 2 }, { 241, 7 }, { 241, 5 }, { 241, 5 }, { 241, 10 }, { 241, 2 }, { 241, 7 }, { 241, 4 }, { 243, 0 }, { 243, 1 }, { 228, 0 }, { 228, 3 }, { 245, 0 }, { 245, 2 }, { 244, 1 }, { 244, 1 }, { 244, 1 }, { 195, 4 }, { 195, 6 }, { 195, 4 }, { 247, 2 }, { 247, 0 }, { 195, 8 }, { 195, 7 }, { 195, 5 }, { 195, 4 }, { 195, 6 }, { 195, 4 }, { 195, 1 }, { 248, 1 }, { 211, 2 }, { 250, 1 }, { 250, 3 }, { 250, 1 }, { 250, 3 }, { 251, 9 }, { 251, 10 }, { 253, 4 }, { 253, 5 }, { 252, 1 }, { 252, 2 }, { 252, 1 }, { 252, 1 }, { 254, 1 }, { 254, 1 }, { 254, 0 }, { 265, 2 }, { 265, 0 }, { 255, 3 }, { 255, 2 }, { 255, 4 }, { 255, 1 }, { 255, 4 }, { 266, 2 }, { 266, 1 }, { 266, 2 }, { 266, 1 }, { 266, 0 }, { 256, 0 }, { 256, 2 }, { 267, 2 }, { 267, 0 }, { 269, 4 }, { 269, 0 }, { 268, 4 }, { 268, 4 }, { 268, 4 }, { 268, 6 }, { 268, 0 }, { 268, 2 }, { 268, 3 }, { 268, 1 }, { 268, 3 }, { 268, 1 }, { 271, 2 }, { 271, 4 }, { 271, 0 }, { 272, 0 }, { 272, 2 }, { 207, 2 }, { 270, 1 }, { 270, 1 }, { 270, 2 }, { 270, 3 }, { 270, 4 }, { 270, 1 }, { 273, 0 }, { 273, 3 }, { 273, 2 }, { 273, 3 }, { 260, 0 }, { 260, 3 }, { 275, 5 }, { 275, 3 }, { 229, 1 }, { 229, 1 }, { 229, 0 }, { 276, 2 }, { 276, 2 }, { 276, 0 }, { 258, 0 }, { 258, 3 }, { 258, 2 }, { 259, 0 }, { 259, 2 }, { 261, 0 }, { 261, 2 }, { 261, 4 }, { 261, 4 }, { 195, 1 }, { 277, 7 }, { 277, 3 }, { 277, 5 }, { 277, 6 }, { 277, 4 }, { 257, 0 }, { 257, 2 }, { 257, 1 }, { 278, 0 }, { 278, 2 }, { 195, 1 }, { 279, 10 }, { 279, 3 }, { 279, 5 }, { 279, 6 }, { 279, 4 }, { 280, 5 }, { 280, 7 }, { 280, 3 }, { 280, 5 }, { 280, 0 }, { 280, 2 }, { 280, 3 }, { 280, 1 }, { 281, 0 }, { 281, 3 }, { 274, 3 }, { 274, 1 }, { 274, 0 }, { 274, 3 }, { 274, 1 }, { 195, 1 }, { 282, 8 }, { 282, 8 }, { 282, 7 }, { 282, 3 }, { 282, 5 }, { 282, 4 }, { 282, 6 }, { 283, 2 }, { 283, 1 }, { 284, 0 }, { 284, 11 }, { 284, 8 }, { 284, 4 }, { 286, 4 }, { 286, 6 }, { 286, 1 }, { 286, 3 }, { 286, 5 }, { 286, 3 }, { 286, 6 }, { 286, 1 }, { 286, 3 }, { 286, 1 }, { 286, 3 }, { 286, 2 }, { 286, 5 }, { 286, 4 }, { 286, 1 }, { 286, 3 }, { 286, 6 }, { 286, 5 }, { 286, 4 }, { 286, 3 }, { 286, 3 }, { 286, 3 }, { 286, 3 }, { 286, 3 }, { 286, 3 }, { 286, 3 }, { 286, 3 }, { 286, 4 }, { 286, 6 }, { 286, 2 }, { 286, 3 }, { 286, 4 }, { 286, 6 }, { 286, 5 }, { 286, 2 }, { 286, 2 }, { 286, 2 }, { 286, 2 }, { 286, 3 }, { 286, 6 }, { 286, 6 }, { 286, 3 }, { 286, 6 }, { 286, 5 }, { 286, 4 }, { 286, 5 }, { 286, 4 }, { 286, 6 }, { 286, 6 }, { 286, 5 }, { 227, 0 }, { 227, 1 }, { 287, 0 }, { 287, 1 }, { 285, 0 }, { 285, 1 }, { 288, 1 }, { 290, 5 }, { 290, 4 }, { 291, 2 }, { 291, 0 }, { 289, 1 }, { 289, 0 }, { 264, 1 }, { 264, 0 }, { 263, 3 }, { 263, 1 }, { 195, 12 }, { 195, 8 }, { 195, 7 }, { 195, 5 }, { 293, 1 }, { 293, 0 }, { 231, 0 }, { 231, 3 }, { 242, 3 }, { 242, 1 }, { 294, 3 }, { 294, 1 }, { 295, 0 }, { 295, 2 }, { 295, 2 }, { 195, 4 }, { 195, 6 }, { 195, 4 }, { 195, 2 }, { 195, 3 }, { 296, 2 }, { 296, 0 }, { 195, 3 }, { 195, 5 }, { 195, 6 }, { 195, 5 }, { 195, 6 }, { 195, 4 }, { 195, 2 }, { 297, 1 }, { 297, 1 }, { 297, 1 }, { 297, 1 }, { 297, 1 }, { 223, 2 }, { 223, 1 }, { 224, 2 }, { 298, 1 }, { 298, 1 }, { 195, 15 }, { 195, 12 }, { 195, 14 }, { 195, 10 }, { 195, 7 }, { 195, 5 }, { 299, 1 }, { 299, 1 }, { 299, 2 }, { 299, 0 }, { 300, 1 }, { 300, 1 }, { 300, 1 }, { 300, 3 }, { 301, 0 }, { 301, 3 }, { 302, 0 }, { 302, 2 }, { 303, 3 }, { 303, 2 }, { 303, 1 }, { 304, 1 }, { 304, 1 }, { 304, 1 }, { 304, 1 }, { 246, 1 }, { 195, 4 }, { 195, 6 }, { 195, 4 }, { 195, 6 }, { 195, 3 }, { 306, 0 }, { 306, 2 }, { 305, 1 }, { 305, 0 }, { 195, 1 }, { 195, 3 }, { 195, 2 }, { 195, 4 }, { 195, 2 }, { 195, 1 }, { 195, 3 }, { 195, 4 }, { 195, 2 }, { 195, 6 }, { 195, 6 }, { 195, 6 }, { 195, 6 }, { 195, 5 }, { 195, 3 }, { 307, 0 }, { 307, 1 }, { 195, 1 }, { 308, 8 }, { 308, 11 }, { 308, 7 }, { 308, 5 }, { 309, 1 }, { 309, 3 }, { 310, 0 }, { 310, 2 }, { 311, 1 }, { 311, 3 }, { 312, 0 }, { 312, 4 }, { 312, 2 }, { 249, 0 }, { 249, 2 }, { 249, 3 }, { 314, 1 }, { 314, 2 }, { 314, 3 }, { 313, 1 }, { 313, 3 }, { 313, 1 }, { 315, 6 }, { 316, 1 }, { 316, 3 }, { 317, 5 }, { 318, 5 }, { 318, 6 }, { 318, 4 }, { 318, 5 }, { 318, 1 }, { 318, 2 }, { 319, 0 }, { 319, 3 }, { 319, 6 }, { 320, 1 }, { 321, 1 }, { 321, 2 }, { 323, 1 }, { 323, 2 }, { 324, 2 }, { 324, 2 }, { 322, 0 }, { 322, 2 }, { 325, 2 }, { 325, 2 }, { 325, 1 }, { 325, 1 }, { 262, 2 }, { 292, 2 }, { 292, 1 }, { 292, 1 }, { 327, 4 }, { 327, 2 }, { 326, 5 }, }; static void yy_accept(yyParser*); /* Forward Declaration */ /* ** Perform a reduce action and the shift that must immediately ** follow the reduce. */ static void yy_reduce( yyParser *yypParser, /* The parser */ int yyruleno /* Number of the rule by which to reduce */ ){ int yygoto; /* The next state */ int yyact; /* The next action */ YYMINORTYPE yygotominor; /* The LHS of the rule reduced */ yyStackEntry *yymsp; /* The top of the parser's stack */ int yysize; /* Amount to pop the stack */ sqlite3_parseARG_FETCH; SqliteStatement* objectForTokens = 0; QStringList noTokenInheritanceFields; yymsp = &yypParser->yystack[yypParser->yyidx]; #ifndef NDEBUG if( yyTraceFILE && yyruleno>=0 && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){ fprintf(yyTraceFILE, "%sReduce [%s].\n", yyTracePrompt, yyRuleName[yyruleno]); } #endif /* NDEBUG */ /* Silence complaints from purify about yygotominor being uninitialized ** in some cases when it is copied into the stack after the following ** switch. yygotominor is uninitialized when a rule reduces that does ** not set the value of its left-hand side nonterminal. Leaving the ** value of the nonterminal uninitialized is utterly harmless as long ** as the value is never used. So really the only thing this code ** accomplishes is to quieten purify. ** ** 2007-01-16: The wireshark project (www.wireshark.org) reports that ** without this code, their parser segfaults. I'm not sure what there ** parser is doing to make this happen. This is the second bug report ** from wireshark this week. Clearly they are stressing Lemon in ways ** that it has not been previously stressed... (SQLite ticket #2172) */ /*memset(&yygotominor, 0, sizeof(yygotominor));*/ yygotominor = yyzerominor; if (parserContext->executeRules) { switch( yyruleno ){ /* Beginning here are the reduction cases. A typical example ** follows: ** case 0: ** #line ** { ... } // User supplied code ** #line ** break; */ case 1: /* cmdlist ::= cmdlist ecmd */ {parserContext->addQuery(yymsp[0].minor.yy635); DONT_INHERIT_TOKENS("cmdlist");} break; case 2: /* cmdlist ::= ecmd */ {parserContext->addQuery(yymsp[0].minor.yy635);} break; case 3: /* ecmd ::= SEMI */ {yygotominor.yy635 = new SqliteEmptyQuery();} break; case 4: /* ecmd ::= explain cmdx SEMI */ { yygotominor.yy635 = yymsp[-1].minor.yy635; yygotominor.yy635->explain = yymsp[-2].minor.yy571->explain; yygotominor.yy635->queryPlan = yymsp[-2].minor.yy571->queryPlan; delete yymsp[-2].minor.yy571; objectForTokens = yygotominor.yy635; } break; case 5: /* explain ::= */ {yygotominor.yy571 = new ParserStubExplain(false, false);} break; case 6: /* explain ::= EXPLAIN */ {yygotominor.yy571 = new ParserStubExplain(true, false);} break; case 7: /* explain ::= EXPLAIN QUERY PLAN */ {yygotominor.yy571 = new ParserStubExplain(true, true);} break; case 8: /* cmdx ::= cmd */ case 403: /* trigger_cmd ::= update_stmt */ yytestcase(yyruleno==403); case 404: /* trigger_cmd ::= insert_stmt */ yytestcase(yyruleno==404); case 405: /* trigger_cmd ::= delete_stmt */ yytestcase(yyruleno==405); case 406: /* trigger_cmd ::= select_stmt */ yytestcase(yyruleno==406); case 434: /* cmd ::= create_vtab */ yytestcase(yyruleno==434); {yygotominor.yy635 = yymsp[0].minor.yy635;} break; case 9: /* cmd ::= BEGIN transtype trans_opt */ { yygotominor.yy635 = new SqliteBeginTrans( yymsp[-1].minor.yy100->type, yymsp[0].minor.yy100->transactionKw, yymsp[0].minor.yy100->name ); delete yymsp[0].minor.yy100; delete yymsp[-1].minor.yy100; objectForTokens = yygotominor.yy635; } break; case 10: /* trans_opt ::= */ case 14: /* transtype ::= */ yytestcase(yyruleno==14); {yygotominor.yy100 = new ParserStubTransDetails();} break; case 11: /* trans_opt ::= TRANSACTION */ { yygotominor.yy100 = new ParserStubTransDetails(); yygotominor.yy100->transactionKw = true; } break; case 12: /* trans_opt ::= TRANSACTION nm */ case 13: /* trans_opt ::= TRANSACTION ID_TRANS */ yytestcase(yyruleno==13); { yygotominor.yy100 = new ParserStubTransDetails(); yygotominor.yy100->transactionKw = true; yygotominor.yy100->name = *(yymsp[0].minor.yy255); delete yymsp[0].minor.yy255; } break; case 15: /* transtype ::= DEFERRED */ { yygotominor.yy100 = new ParserStubTransDetails(); yygotominor.yy100->type = SqliteBeginTrans::Type::DEFERRED; } break; case 16: /* transtype ::= IMMEDIATE */ { yygotominor.yy100 = new ParserStubTransDetails(); yygotominor.yy100->type = SqliteBeginTrans::Type::IMMEDIATE; } break; case 17: /* transtype ::= EXCLUSIVE */ { yygotominor.yy100 = new ParserStubTransDetails(); yygotominor.yy100->type = SqliteBeginTrans::Type::EXCLUSIVE; } break; case 18: /* cmd ::= COMMIT trans_opt */ { yygotominor.yy635 = new SqliteCommitTrans( yymsp[0].minor.yy100->transactionKw, yymsp[0].minor.yy100->name, false ); delete yymsp[0].minor.yy100; objectForTokens = yygotominor.yy635; } break; case 19: /* cmd ::= END trans_opt */ { yygotominor.yy635 = new SqliteCommitTrans( yymsp[0].minor.yy100->transactionKw, yymsp[0].minor.yy100->name, true ); delete yymsp[0].minor.yy100; objectForTokens = yygotominor.yy635; } break; case 20: /* cmd ::= ROLLBACK trans_opt */ { yygotominor.yy635 = new SqliteRollback( yymsp[0].minor.yy100->transactionKw, yymsp[0].minor.yy100->name ); delete yymsp[0].minor.yy100; objectForTokens = yygotominor.yy635; } break; case 21: /* savepoint_opt ::= SAVEPOINT */ case 41: /* ifnotexists ::= IF NOT EXISTS */ yytestcase(yyruleno==41); case 94: /* gen_always ::= GENERATED ALWAYS */ yytestcase(yyruleno==94); case 97: /* autoinc ::= AUTOINCR */ yytestcase(yyruleno==97); case 119: /* tconscomma ::= COMMA */ yytestcase(yyruleno==119); case 141: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==141); case 329: /* not_opt ::= NOT */ yytestcase(yyruleno==329); case 331: /* rp_opt ::= RP */ yytestcase(yyruleno==331); case 347: /* uniqueflag ::= UNIQUE */ yytestcase(yyruleno==347); case 415: /* database_kw_opt ::= DATABASE */ yytestcase(yyruleno==415); case 432: /* kwcolumn_opt ::= */ yytestcase(yyruleno==432); {yygotominor.yy35 = new bool(true);} break; case 22: /* savepoint_opt ::= */ case 40: /* ifnotexists ::= */ yytestcase(yyruleno==40); case 95: /* gen_always ::= */ yytestcase(yyruleno==95); case 96: /* autoinc ::= */ yytestcase(yyruleno==96); case 120: /* tconscomma ::= */ yytestcase(yyruleno==120); case 142: /* ifexists ::= */ yytestcase(yyruleno==142); case 328: /* not_opt ::= */ yytestcase(yyruleno==328); case 330: /* rp_opt ::= */ yytestcase(yyruleno==330); case 348: /* uniqueflag ::= */ yytestcase(yyruleno==348); case 416: /* database_kw_opt ::= */ yytestcase(yyruleno==416); case 433: /* kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==433); {yygotominor.yy35 = new bool(false);} break; case 23: /* cmd ::= SAVEPOINT nm */ { yygotominor.yy635 = new SqliteSavepoint(*(yymsp[0].minor.yy255)); delete yymsp[0].minor.yy255; objectForTokens = yygotominor.yy635; } break; case 24: /* cmd ::= RELEASE savepoint_opt nm */ { yygotominor.yy635 = new SqliteRelease(*(yymsp[-1].minor.yy35), *(yymsp[0].minor.yy255)); delete yymsp[0].minor.yy255; objectForTokens = yygotominor.yy635; } break; case 25: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */ case 26: /* cmd ::= SAVEPOINT ID_TRANS */ yytestcase(yyruleno==26); { yygotominor.yy635 = new SqliteRollback( yymsp[-3].minor.yy100->transactionKw, *(yymsp[-1].minor.yy35), *(yymsp[0].minor.yy255) ); delete yymsp[-1].minor.yy35; delete yymsp[-3].minor.yy100; objectForTokens = yygotominor.yy635; } break; case 27: /* cmd ::= RELEASE savepoint_opt ID_TRANS */ case 28: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt ID_TRANS */ yytestcase(yyruleno==28); { yy_destructor(yypParser,204,&yymsp[-1].minor); } break; case 29: /* cmd ::= CREATE temp TABLE ifnotexists fullname LP columnlist conslist_opt RP table_options */ { yygotominor.yy635 = new SqliteCreateTable( *(yymsp[-6].minor.yy35), *(yymsp[-8].minor.yy562), yymsp[-5].minor.yy520->name1, yymsp[-5].minor.yy520->name2, *(yymsp[-3].minor.yy234), *(yymsp[-2].minor.yy445), *(yymsp[0].minor.yy217) ); delete yymsp[-6].minor.yy35; delete yymsp[-8].minor.yy562; delete yymsp[-3].minor.yy234; delete yymsp[-2].minor.yy445; delete yymsp[-5].minor.yy520; delete yymsp[0].minor.yy217; objectForTokens = yygotominor.yy635; } break; case 30: /* cmd ::= CREATE temp TABLE ifnotexists fullname AS select */ { yygotominor.yy635 = new SqliteCreateTable( *(yymsp[-3].minor.yy35), *(yymsp[-5].minor.yy562), yymsp[-2].minor.yy520->name1, yymsp[-2].minor.yy520->name2, yymsp[0].minor.yy73 ); delete yymsp[-3].minor.yy35; delete yymsp[-5].minor.yy562; delete yymsp[-2].minor.yy520; objectForTokens = yygotominor.yy635; } break; case 31: /* cmd ::= CREATE temp TABLE ifnotexists nm DOT ID_TAB_NEW */ case 144: /* cmd ::= CREATE temp VIEW ifnotexists nm DOT ID_VIEW_NEW */ yytestcase(yyruleno==144); case 386: /* cmd ::= CREATE temp TRIGGER ifnotexists nm DOT ID_TRIG_NEW */ yytestcase(yyruleno==386); { yy_destructor(yypParser,205,&yymsp[-5].minor); yy_destructor(yypParser,203,&yymsp[-2].minor); } break; case 32: /* cmd ::= CREATE temp TABLE ifnotexists ID_DB|ID_TAB_NEW */ case 145: /* cmd ::= CREATE temp VIEW ifnotexists ID_DB|ID_VIEW_NEW */ yytestcase(yyruleno==145); case 387: /* cmd ::= CREATE temp TRIGGER ifnotexists ID_DB|ID_TRIG_NEW */ yytestcase(yyruleno==387); { yy_destructor(yypParser,205,&yymsp[-3].minor); } break; case 33: /* table_options ::= */ {yygotominor.yy217 = new ParserCreateTableOptionList();} break; case 34: /* table_options ::= table_option */ { yygotominor.yy217 = new ParserCreateTableOptionList(); yygotominor.yy217->append(yymsp[0].minor.yy607); } break; case 35: /* table_options ::= table_options COMMA table_option */ { yymsp[-2].minor.yy217->append(yymsp[0].minor.yy607); yygotominor.yy217 = yymsp[-2].minor.yy217; DONT_INHERIT_TOKENS("table_options"); } break; case 36: /* table_option ::= WITHOUT nm */ { if (yymsp[0].minor.yy255->toLower() != "rowid") parserContext->errorAtToken(QString("Invalid table option: %1").arg(*(yymsp[0].minor.yy255))); yygotominor.yy607 = new ParserStubCreateTableOption(ParserStubCreateTableOption::WITHOUT_ROWID); delete yymsp[0].minor.yy255; } break; case 37: /* table_option ::= nm */ case 38: /* table_option ::= WITHOUT CTX_ROWID_KW */ yytestcase(yyruleno==38); case 39: /* table_option ::= CTX_STRICT_KW */ yytestcase(yyruleno==39); { if (yymsp[0].minor.yy255->toLower() != "strict") parserContext->errorAtToken(QString("Invalid table option: %1").arg(*(yymsp[0].minor.yy255))); yygotominor.yy607 = new ParserStubCreateTableOption(ParserStubCreateTableOption::STRICT); delete yymsp[0].minor.yy255; } break; case 42: /* temp ::= TEMP */ {yygotominor.yy562 = new int( (yymsp[0].minor.yy0->value.length() > 4) ? 2 : 1 );} break; case 43: /* temp ::= */ case 166: /* distinct ::= */ yytestcase(yyruleno==166); {yygotominor.yy562 = new int(0);} break; case 44: /* columnlist ::= columnlist COMMA column */ { yymsp[-2].minor.yy234->append(yymsp[0].minor.yy115); yygotominor.yy234 = yymsp[-2].minor.yy234; DONT_INHERIT_TOKENS("columnlist"); } break; case 45: /* columnlist ::= column */ { yygotominor.yy234 = new ParserCreateTableColumnList(); yygotominor.yy234->append(yymsp[0].minor.yy115); } break; case 46: /* column ::= columnid type carglist */ { yygotominor.yy115 = new SqliteCreateTable::Column(*(yymsp[-2].minor.yy255), yymsp[-1].minor.yy601, *(yymsp[0].minor.yy259)); delete yymsp[-2].minor.yy255; delete yymsp[0].minor.yy259; objectForTokens = yygotominor.yy115; } break; case 47: /* columnid ::= nm */ case 48: /* columnid ::= ID_COL_NEW */ yytestcase(yyruleno==48); case 53: /* nm ::= id */ yytestcase(yyruleno==53); case 61: /* typename ::= ids */ yytestcase(yyruleno==61); case 199: /* dbnm ::= DOT nm */ yytestcase(yyruleno==199); case 356: /* collate ::= COLLATE ids */ yytestcase(yyruleno==356); case 357: /* collate ::= COLLATE ID_COLLATE */ yytestcase(yyruleno==357); {yygotominor.yy255 = yymsp[0].minor.yy255;} break; case 49: /* id ::= ID */ { yygotominor.yy255 = new QString( stripObjName( yymsp[0].minor.yy0->value ) ); } break; case 50: /* id_opt ::= id */ { yygotominor.yy255 = yymsp[0].minor.yy255; } break; case 51: /* id_opt ::= */ { yygotominor.yy255 = new QString(); } break; case 52: /* ids ::= ID|STRING */ case 55: /* nm ::= JOIN_KW */ yytestcase(yyruleno==55); {yygotominor.yy255 = new QString(yymsp[0].minor.yy0->value);} break; case 54: /* nm ::= STRING */ {yygotominor.yy255 = new QString(stripString(yymsp[0].minor.yy0->value));} break; case 56: /* type ::= */ {yygotominor.yy601 = nullptr;} break; case 57: /* type ::= typetoken */ {yygotominor.yy601 = yymsp[0].minor.yy601;} break; case 58: /* typetoken ::= typename */ { yygotominor.yy601 = new SqliteColumnType(*(yymsp[0].minor.yy255)); delete yymsp[0].minor.yy255; objectForTokens = yygotominor.yy601; } break; case 59: /* typetoken ::= typename LP signed RP */ { yygotominor.yy601 = new SqliteColumnType(*(yymsp[-3].minor.yy255), *(yymsp[-1].minor.yy629)); delete yymsp[-3].minor.yy255; delete yymsp[-1].minor.yy629; objectForTokens = yygotominor.yy601; } break; case 60: /* typetoken ::= typename LP signed COMMA signed RP */ { yygotominor.yy601 = new SqliteColumnType(*(yymsp[-5].minor.yy255), *(yymsp[-3].minor.yy629), *(yymsp[-1].minor.yy629)); delete yymsp[-5].minor.yy255; delete yymsp[-3].minor.yy629; delete yymsp[-1].minor.yy629; objectForTokens = yygotominor.yy601; } break; case 62: /* typename ::= typename ids */ case 63: /* typename ::= ID_COL_TYPE */ yytestcase(yyruleno==63); { yymsp[-1].minor.yy255->append(" " + *(yymsp[0].minor.yy255)); delete yymsp[0].minor.yy255; yygotominor.yy255 = yymsp[-1].minor.yy255; } break; case 64: /* signed ::= plus_num */ case 65: /* signed ::= minus_num */ yytestcase(yyruleno==65); case 372: /* nmnum ::= plus_num */ yytestcase(yyruleno==372); case 377: /* plus_num ::= PLUS number */ yytestcase(yyruleno==377); case 378: /* plus_num ::= number */ yytestcase(yyruleno==378); {yygotominor.yy629 = yymsp[0].minor.yy629;} break; case 66: /* carglist ::= carglist ccons */ { yymsp[-1].minor.yy259->append(yymsp[0].minor.yy64); yygotominor.yy259 = yymsp[-1].minor.yy259; DONT_INHERIT_TOKENS("carglist"); } break; case 67: /* carglist ::= */ {yygotominor.yy259 = new ParserCreateTableColumnConstraintList();} break; case 68: /* ccons ::= CONSTRAINT nm */ { yygotominor.yy64 = new SqliteCreateTable::Column::Constraint(); yygotominor.yy64->initDefNameOnly(*(yymsp[0].minor.yy255)); delete yymsp[0].minor.yy255; objectForTokens = yygotominor.yy64; } break; case 69: /* ccons ::= DEFAULT term */ { yygotominor.yy64 = new SqliteCreateTable::Column::Constraint(); yygotominor.yy64->initDefTerm(*(yymsp[0].minor.yy629)); delete yymsp[0].minor.yy629; objectForTokens = yygotominor.yy64; } break; case 70: /* ccons ::= DEFAULT LP expr RP */ { yygotominor.yy64 = new SqliteCreateTable::Column::Constraint(); yygotominor.yy64->initDefExpr(yymsp[-1].minor.yy176); objectForTokens = yygotominor.yy64; } break; case 71: /* ccons ::= DEFAULT PLUS term */ { yygotominor.yy64 = new SqliteCreateTable::Column::Constraint(); yygotominor.yy64->initDefTerm(*(yymsp[0].minor.yy629), false); delete yymsp[0].minor.yy629; objectForTokens = yygotominor.yy64; } break; case 72: /* ccons ::= DEFAULT MINUS term */ { yygotominor.yy64 = new SqliteCreateTable::Column::Constraint(); yygotominor.yy64->initDefTerm(*(yymsp[0].minor.yy629), true); delete yymsp[0].minor.yy629; objectForTokens = yygotominor.yy64; } break; case 73: /* ccons ::= DEFAULT id */ { yygotominor.yy64 = new SqliteCreateTable::Column::Constraint(); yygotominor.yy64->initDefId(*(yymsp[0].minor.yy255)); delete yymsp[0].minor.yy255; objectForTokens = yygotominor.yy64; } break; case 74: /* ccons ::= DEFAULT CTIME_KW */ { yygotominor.yy64 = new SqliteCreateTable::Column::Constraint(); yygotominor.yy64->initDefCTime(yymsp[0].minor.yy0->value); objectForTokens = yygotominor.yy64; } break; case 75: /* ccons ::= NULL onconf */ { yygotominor.yy64 = new SqliteCreateTable::Column::Constraint(); yygotominor.yy64->initNull(*(yymsp[0].minor.yy66)); delete yymsp[0].minor.yy66; objectForTokens = yygotominor.yy64; } break; case 76: /* ccons ::= NOT NULL onconf */ { yygotominor.yy64 = new SqliteCreateTable::Column::Constraint(); yygotominor.yy64->initNotNull(*(yymsp[0].minor.yy66)); delete yymsp[0].minor.yy66; objectForTokens = yygotominor.yy64; } break; case 77: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */ { yygotominor.yy64 = new SqliteCreateTable::Column::Constraint(); yygotominor.yy64->initPk(*(yymsp[-2].minor.yy645), *(yymsp[-1].minor.yy66), *(yymsp[0].minor.yy35)); delete yymsp[-2].minor.yy645; delete yymsp[0].minor.yy35; delete yymsp[-1].minor.yy66; objectForTokens = yygotominor.yy64; } break; case 78: /* ccons ::= UNIQUE onconf */ { yygotominor.yy64 = new SqliteCreateTable::Column::Constraint(); yygotominor.yy64->initUnique(*(yymsp[0].minor.yy66)); delete yymsp[0].minor.yy66; objectForTokens = yygotominor.yy64; } break; case 79: /* ccons ::= CHECK LP expr RP */ { yygotominor.yy64 = new SqliteCreateTable::Column::Constraint(); yygotominor.yy64->initCheck(yymsp[-1].minor.yy176); objectForTokens = yygotominor.yy64; } break; case 80: /* ccons ::= REFERENCES nm idxlist_opt refargs */ { yygotominor.yy64 = new SqliteCreateTable::Column::Constraint(); yygotominor.yy64->initFk(*(yymsp[-2].minor.yy255), *(yymsp[-1].minor.yy527), *(yymsp[0].minor.yy56)); delete yymsp[-2].minor.yy255; delete yymsp[0].minor.yy56; delete yymsp[-1].minor.yy527; objectForTokens = yygotominor.yy64; } break; case 81: /* ccons ::= defer_subclause */ { yygotominor.yy64 = new SqliteCreateTable::Column::Constraint(); yygotominor.yy64->initDefer(yymsp[0].minor.yy218->initially, yymsp[0].minor.yy218->deferrable); delete yymsp[0].minor.yy218; objectForTokens = yygotominor.yy64; } break; case 82: /* ccons ::= COLLATE ids */ { yygotominor.yy64 = new SqliteCreateTable::Column::Constraint(); yygotominor.yy64->initColl(*(yymsp[0].minor.yy255)); delete yymsp[0].minor.yy255; objectForTokens = yygotominor.yy64; } break; case 83: /* ccons ::= gen_always AS LP expr RP id_opt */ case 84: /* ccons ::= CONSTRAINT ID_CONSTR */ yytestcase(yyruleno==84); case 85: /* ccons ::= COLLATE ID_COLLATE */ yytestcase(yyruleno==85); case 86: /* ccons ::= REFERENCES ID_TAB */ yytestcase(yyruleno==86); { if (!yymsp[0].minor.yy255->isNull() && yymsp[0].minor.yy255->toLower() != "stored" && yymsp[0].minor.yy255->toLower() != "virtual") parserContext->errorAtToken(QString("Invalid generated column type: %1").arg(*(yymsp[0].minor.yy255))); yygotominor.yy64 = new SqliteCreateTable::Column::Constraint(); yygotominor.yy64->initGeneratedAs(yymsp[-2].minor.yy176, *(yymsp[-5].minor.yy35), *(yymsp[0].minor.yy255)); delete yymsp[-5].minor.yy35; delete yymsp[0].minor.yy255; objectForTokens = yygotominor.yy64; } break; case 87: /* ccons ::= CHECK LP RP */ { yygotominor.yy64 = new SqliteCreateTable::Column::Constraint(); yygotominor.yy64->initCheck(); objectForTokens = yygotominor.yy64; parserContext->minorErrorAfterLastToken("Syntax error"); } break; case 88: /* term ::= NULL */ {yygotominor.yy629 = new QVariant();} break; case 89: /* term ::= INTEGER */ case 380: /* number ::= INTEGER */ yytestcase(yyruleno==380); {yygotominor.yy629 = parserContext->handleNumberToken(yymsp[0].minor.yy0->value);} break; case 90: /* term ::= FLOAT */ case 381: /* number ::= FLOAT */ yytestcase(yyruleno==381); {yygotominor.yy629 = new QVariant(QVariant(yymsp[0].minor.yy0->value).toDouble());} break; case 91: /* term ::= STRING|BLOB */ { if (yymsp[0].minor.yy0->value.length() >= 3 && yymsp[0].minor.yy0->value.startsWith("x'", Qt::CaseInsensitive)) yygotominor.yy629 = new QVariant(blobFromLiteral(yymsp[0].minor.yy0->value)); else yygotominor.yy629 = new QVariant(stripString(yymsp[0].minor.yy0->value)); } break; case 92: /* tnm ::= term */ { yygotominor.yy542 = new ParserTermOrLiteral(*(yymsp[0].minor.yy629)); delete yymsp[0].minor.yy629; } break; case 93: /* tnm ::= nm */ { yygotominor.yy542 = new ParserTermOrLiteral(*(yymsp[0].minor.yy255)); delete yymsp[0].minor.yy255; } break; case 98: /* refargs ::= */ {yygotominor.yy56 = new ParserFkConditionList();} break; case 99: /* refargs ::= refargs refarg */ { yymsp[-1].minor.yy56->append(yymsp[0].minor.yy587); yygotominor.yy56 = yymsp[-1].minor.yy56; DONT_INHERIT_TOKENS("refargs"); } break; case 100: /* refarg ::= MATCH nm */ { yygotominor.yy587 = new SqliteForeignKey::Condition(*(yymsp[0].minor.yy255)); delete yymsp[0].minor.yy255; } break; case 101: /* refarg ::= ON INSERT refact */ {yygotominor.yy587 = new SqliteForeignKey::Condition(SqliteForeignKey::Condition::INSERT, *(yymsp[0].minor.yy488)); delete yymsp[0].minor.yy488;} break; case 102: /* refarg ::= ON DELETE refact */ {yygotominor.yy587 = new SqliteForeignKey::Condition(SqliteForeignKey::Condition::DELETE, *(yymsp[0].minor.yy488)); delete yymsp[0].minor.yy488;} break; case 103: /* refarg ::= ON UPDATE refact */ case 104: /* refarg ::= MATCH ID_FK_MATCH */ yytestcase(yyruleno==104); {yygotominor.yy587 = new SqliteForeignKey::Condition(SqliteForeignKey::Condition::UPDATE, *(yymsp[0].minor.yy488)); delete yymsp[0].minor.yy488;} break; case 105: /* refact ::= SET NULL */ {yygotominor.yy488 = new SqliteForeignKey::Condition::Reaction(SqliteForeignKey::Condition::SET_NULL);} break; case 106: /* refact ::= SET DEFAULT */ {yygotominor.yy488 = new SqliteForeignKey::Condition::Reaction(SqliteForeignKey::Condition::SET_DEFAULT);} break; case 107: /* refact ::= CASCADE */ {yygotominor.yy488 = new SqliteForeignKey::Condition::Reaction(SqliteForeignKey::Condition::CASCADE);} break; case 108: /* refact ::= RESTRICT */ {yygotominor.yy488 = new SqliteForeignKey::Condition::Reaction(SqliteForeignKey::Condition::RESTRICT);} break; case 109: /* refact ::= NO ACTION */ {yygotominor.yy488 = new SqliteForeignKey::Condition::Reaction(SqliteForeignKey::Condition::NO_ACTION);} break; case 110: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */ { yygotominor.yy218 = new ParserDeferSubClause(SqliteDeferrable::NOT_DEFERRABLE, *(yymsp[0].minor.yy536)); delete yymsp[0].minor.yy536; } break; case 111: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */ { yygotominor.yy218 = new ParserDeferSubClause(SqliteDeferrable::DEFERRABLE, *(yymsp[0].minor.yy536)); delete yymsp[0].minor.yy536; } break; case 112: /* init_deferred_pred_opt ::= */ {yygotominor.yy536 = new SqliteInitially(SqliteInitially::null);} break; case 113: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */ {yygotominor.yy536 = new SqliteInitially(SqliteInitially::DEFERRED);} break; case 114: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */ {yygotominor.yy536 = new SqliteInitially(SqliteInitially::IMMEDIATE);} break; case 115: /* conslist_opt ::= */ {yygotominor.yy445 = new ParserCreateTableConstraintList();} break; case 116: /* conslist_opt ::= COMMA conslist */ {yygotominor.yy445 = yymsp[0].minor.yy445;} break; case 117: /* conslist ::= conslist tconscomma tcons */ { yymsp[0].minor.yy166->afterComma = *(yymsp[-1].minor.yy35); yymsp[-2].minor.yy445->append(yymsp[0].minor.yy166); yygotominor.yy445 = yymsp[-2].minor.yy445; delete yymsp[-1].minor.yy35; DONT_INHERIT_TOKENS("conslist"); } break; case 118: /* conslist ::= tcons */ { yygotominor.yy445 = new ParserCreateTableConstraintList(); yygotominor.yy445->append(yymsp[0].minor.yy166); } break; case 121: /* tcons ::= CONSTRAINT nm */ { yygotominor.yy166 = new SqliteCreateTable::Constraint(); yygotominor.yy166->initNameOnly(*(yymsp[0].minor.yy255)); delete yymsp[0].minor.yy255; objectForTokens = yygotominor.yy166; } break; case 122: /* tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf */ { yygotominor.yy166 = new SqliteCreateTable::Constraint(); yygotominor.yy166->initPk(*(yymsp[-3].minor.yy527), *(yymsp[-2].minor.yy35), *(yymsp[0].minor.yy66)); delete yymsp[-2].minor.yy35; delete yymsp[0].minor.yy66; delete yymsp[-3].minor.yy527; objectForTokens = yygotominor.yy166; } break; case 123: /* tcons ::= UNIQUE LP idxlist RP onconf */ { yygotominor.yy166 = new SqliteCreateTable::Constraint(); yygotominor.yy166->initUnique(*(yymsp[-2].minor.yy527), *(yymsp[0].minor.yy66)); delete yymsp[0].minor.yy66; delete yymsp[-2].minor.yy527; objectForTokens = yygotominor.yy166; } break; case 124: /* tcons ::= CHECK LP expr RP onconf */ { yygotominor.yy166 = new SqliteCreateTable::Constraint(); yygotominor.yy166->initCheck(yymsp[-2].minor.yy176, *(yymsp[0].minor.yy66)); objectForTokens = yygotominor.yy166; } break; case 125: /* tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt */ case 126: /* tcons ::= CONSTRAINT ID_CONSTR */ yytestcase(yyruleno==126); case 127: /* tcons ::= FOREIGN KEY LP idxlist RP REFERENCES ID_TAB */ yytestcase(yyruleno==127); { yygotominor.yy166 = new SqliteCreateTable::Constraint(); yygotominor.yy166->initFk( *(yymsp[-6].minor.yy527), *(yymsp[-3].minor.yy255), *(yymsp[-2].minor.yy527), *(yymsp[-1].minor.yy56), yymsp[0].minor.yy218->initially, yymsp[0].minor.yy218->deferrable ); delete yymsp[-3].minor.yy255; delete yymsp[-1].minor.yy56; delete yymsp[0].minor.yy218; delete yymsp[-2].minor.yy527; delete yymsp[-6].minor.yy527; objectForTokens = yygotominor.yy166; } break; case 128: /* tcons ::= CHECK LP RP onconf */ { yygotominor.yy166 = new SqliteCreateTable::Constraint(); yygotominor.yy166->initCheck(); objectForTokens = yygotominor.yy166; parserContext->minorErrorAfterLastToken("Syntax error"); yy_destructor(yypParser,228,&yymsp[0].minor); } break; case 129: /* defer_subclause_opt ::= */ {yygotominor.yy218 = new ParserDeferSubClause(SqliteDeferrable::null, SqliteInitially::null);} break; case 130: /* defer_subclause_opt ::= defer_subclause */ {yygotominor.yy218 = yymsp[0].minor.yy218;} break; case 131: /* onconf ::= */ case 133: /* orconf ::= */ yytestcase(yyruleno==133); {yygotominor.yy66 = new SqliteConflictAlgo(SqliteConflictAlgo::null);} break; case 132: /* onconf ::= ON CONFLICT resolvetype */ case 134: /* orconf ::= OR resolvetype */ yytestcase(yyruleno==134); {yygotominor.yy66 = yymsp[0].minor.yy66;} break; case 135: /* resolvetype ::= raisetype */ case 136: /* resolvetype ::= IGNORE */ yytestcase(yyruleno==136); case 137: /* resolvetype ::= REPLACE */ yytestcase(yyruleno==137); {yygotominor.yy66 = new SqliteConflictAlgo(sqliteConflictAlgo(yymsp[0].minor.yy0->value));} break; case 138: /* cmd ::= DROP TABLE ifexists fullname */ { yygotominor.yy635 = new SqliteDropTable(*(yymsp[-1].minor.yy35), yymsp[0].minor.yy520->name1, yymsp[0].minor.yy520->name2); delete yymsp[-1].minor.yy35; delete yymsp[0].minor.yy520; objectForTokens = yygotominor.yy635; } break; case 139: /* cmd ::= DROP TABLE ifexists nm DOT ID_TAB */ case 140: /* cmd ::= DROP TABLE ifexists ID_DB|ID_TAB */ yytestcase(yyruleno==140); case 147: /* cmd ::= DROP VIEW ifexists nm DOT ID_VIEW */ yytestcase(yyruleno==147); case 148: /* cmd ::= DROP VIEW ifexists ID_DB|ID_VIEW */ yytestcase(yyruleno==148); case 191: /* singlesrc ::= nm DOT ID_TAB */ yytestcase(yyruleno==191); case 192: /* singlesrc ::= ID_DB|ID_TAB */ yytestcase(yyruleno==192); case 193: /* singlesrc ::= nm DOT ID_VIEW */ yytestcase(yyruleno==193); case 194: /* singlesrc ::= ID_DB|ID_VIEW */ yytestcase(yyruleno==194); case 345: /* cmd ::= CREATE uniqueflag INDEX ifnotexists nm DOT ID_IDX_NEW */ yytestcase(yyruleno==345); case 346: /* cmd ::= CREATE uniqueflag INDEX ifnotexists ID_DB|ID_IDX_NEW */ yytestcase(yyruleno==346); case 359: /* cmd ::= DROP INDEX ifexists nm DOT ID_IDX */ yytestcase(yyruleno==359); case 360: /* cmd ::= DROP INDEX ifexists ID_DB|ID_IDX */ yytestcase(yyruleno==360); case 370: /* cmd ::= PRAGMA nm DOT ID_PRAGMA */ yytestcase(yyruleno==370); case 371: /* cmd ::= PRAGMA ID_DB|ID_PRAGMA */ yytestcase(yyruleno==371); case 409: /* cmd ::= DROP TRIGGER ifexists nm DOT ID_TRIG */ yytestcase(yyruleno==409); case 410: /* cmd ::= DROP TRIGGER ifexists ID_DB|ID_TRIG */ yytestcase(yyruleno==410); case 420: /* cmd ::= REINDEX nm DOT ID_TAB|ID_IDX */ yytestcase(yyruleno==420); case 421: /* cmd ::= REINDEX ID_DB|ID_IDX|ID_TAB */ yytestcase(yyruleno==421); case 424: /* cmd ::= ANALYZE nm DOT ID_TAB|ID_IDX */ yytestcase(yyruleno==424); case 425: /* cmd ::= ANALYZE ID_DB|ID_IDX|ID_TAB */ yytestcase(yyruleno==425); case 430: /* cmd ::= ALTER TABLE nm DOT ID_TAB */ yytestcase(yyruleno==430); case 431: /* cmd ::= ALTER TABLE ID_DB|ID_TAB */ yytestcase(yyruleno==431); case 437: /* create_vtab ::= CREATE VIRTUAL TABLE ifnotexists nm DOT ID_TAB_NEW */ yytestcase(yyruleno==437); case 438: /* create_vtab ::= CREATE VIRTUAL TABLE ifnotexists ID_DB|ID_TAB_NEW */ yytestcase(yyruleno==438); { yy_destructor(yypParser,203,&yymsp[-2].minor); } break; case 143: /* cmd ::= CREATE temp VIEW ifnotexists fullname idxlist_opt AS select */ { yygotominor.yy635 = new SqliteCreateView(*(yymsp[-6].minor.yy562), *(yymsp[-4].minor.yy35), yymsp[-3].minor.yy520->name1, yymsp[-3].minor.yy520->name2, yymsp[0].minor.yy73, *(yymsp[-2].minor.yy527)); delete yymsp[-6].minor.yy562; delete yymsp[-4].minor.yy35; delete yymsp[-3].minor.yy520; delete yymsp[-2].minor.yy527; objectForTokens = yygotominor.yy635; } break; case 146: /* cmd ::= DROP VIEW ifexists fullname */ { yygotominor.yy635 = new SqliteDropView(*(yymsp[-1].minor.yy35), yymsp[0].minor.yy520->name1, yymsp[0].minor.yy520->name2); delete yymsp[-1].minor.yy35; delete yymsp[0].minor.yy520; objectForTokens = yygotominor.yy635; } break; case 149: /* cmd ::= select_stmt */ case 230: /* cmd ::= delete_stmt */ yytestcase(yyruleno==230); case 241: /* cmd ::= update_stmt */ yytestcase(yyruleno==241); case 262: /* cmd ::= insert_stmt */ yytestcase(yyruleno==262); { yygotominor.yy635 = yymsp[0].minor.yy635; objectForTokens = yygotominor.yy635; } break; case 150: /* select_stmt ::= select */ { yygotominor.yy635 = yymsp[0].minor.yy73; // since it's used in trigger: objectForTokens = yygotominor.yy635; } break; case 151: /* select ::= with selectnowith */ { yygotominor.yy73 = yymsp[0].minor.yy73; yymsp[0].minor.yy73->setWith(yymsp[-1].minor.yy321); objectForTokens = yygotominor.yy73; } break; case 152: /* selectnowith ::= oneselect */ { yygotominor.yy73 = SqliteSelect::append(yymsp[0].minor.yy438); objectForTokens = yygotominor.yy73; } break; case 153: /* selectnowith ::= selectnowith multiselect_op oneselect */ { yygotominor.yy73 = SqliteSelect::append(yymsp[-2].minor.yy73, *(yymsp[-1].minor.yy574), yymsp[0].minor.yy438); delete yymsp[-1].minor.yy574; objectForTokens = yygotominor.yy73; } break; case 154: /* selectnowith ::= values */ { yygotominor.yy73 = SqliteSelect::append(*(yymsp[0].minor.yy54)); delete yymsp[0].minor.yy54; objectForTokens = yygotominor.yy73; } break; case 155: /* selectnowith ::= selectnowith COMMA values */ { yygotominor.yy73 = SqliteSelect::append(yymsp[-2].minor.yy73, SqliteSelect::CompoundOperator::UNION_ALL, *(yymsp[0].minor.yy54)); delete yymsp[0].minor.yy54; objectForTokens = yygotominor.yy73; } break; case 156: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */ { yygotominor.yy438 = new SqliteSelect::Core( *(yymsp[-7].minor.yy562), *(yymsp[-6].minor.yy421), yymsp[-5].minor.yy335, yymsp[-4].minor.yy176, *(yymsp[-3].minor.yy567), yymsp[-2].minor.yy176, *(yymsp[-1].minor.yy499), yymsp[0].minor.yy4 ); delete yymsp[-6].minor.yy421; delete yymsp[-7].minor.yy562; delete yymsp[-3].minor.yy567; delete yymsp[-1].minor.yy499; objectForTokens = yygotominor.yy438; } break; case 157: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt window_clause orderby_opt limit_opt */ { yygotominor.yy438 = new SqliteSelect::Core( *(yymsp[-8].minor.yy562), *(yymsp[-7].minor.yy421), yymsp[-6].minor.yy335, yymsp[-5].minor.yy176, *(yymsp[-4].minor.yy567), yymsp[-3].minor.yy176, *(yymsp[-2].minor.yy555), *(yymsp[-1].minor.yy499), yymsp[0].minor.yy4 ); delete yymsp[-7].minor.yy421; delete yymsp[-8].minor.yy562; delete yymsp[-4].minor.yy567; delete yymsp[-1].minor.yy499; delete yymsp[-2].minor.yy555; objectForTokens = yygotominor.yy438; } break; case 158: /* values ::= VALUES LP nexprlist RP */ { yygotominor.yy54 = new ParserExprNestedList(); yygotominor.yy54->append(*(yymsp[-1].minor.yy567)); delete yymsp[-1].minor.yy567; } break; case 159: /* values ::= values COMMA LP exprlist RP */ { yymsp[-4].minor.yy54->append(*(yymsp[-1].minor.yy567)); yygotominor.yy54 = yymsp[-4].minor.yy54; delete yymsp[-1].minor.yy567; DONT_INHERIT_TOKENS("values"); } break; case 160: /* multiselect_op ::= UNION */ {yygotominor.yy574 = new SqliteSelect::CompoundOperator(SqliteSelect::CompoundOperator::UNION);} break; case 161: /* multiselect_op ::= UNION ALL */ {yygotominor.yy574 = new SqliteSelect::CompoundOperator(SqliteSelect::CompoundOperator::UNION_ALL);} break; case 162: /* multiselect_op ::= EXCEPT */ {yygotominor.yy574 = new SqliteSelect::CompoundOperator(SqliteSelect::CompoundOperator::EXCEPT);} break; case 163: /* multiselect_op ::= INTERSECT */ {yygotominor.yy574 = new SqliteSelect::CompoundOperator(SqliteSelect::CompoundOperator::INTERSECT);} break; case 164: /* distinct ::= DISTINCT */ {yygotominor.yy562 = new int(1);} break; case 165: /* distinct ::= ALL */ {yygotominor.yy562 = new int(2);} break; case 167: /* sclp ::= selcollist COMMA */ {yygotominor.yy421 = yymsp[-1].minor.yy421;} break; case 168: /* sclp ::= */ case 239: /* returning ::= */ yytestcase(yyruleno==239); {yygotominor.yy421 = new ParserResultColumnList();} break; case 169: /* selcollist ::= sclp expr as */ { SqliteSelect::Core::ResultColumn* obj = new SqliteSelect::Core::ResultColumn( yymsp[-1].minor.yy176, yymsp[0].minor.yy280 ? yymsp[0].minor.yy280->asKw : false, yymsp[0].minor.yy280 ? yymsp[0].minor.yy280->name : QString() ); yymsp[-2].minor.yy421->append(obj); yygotominor.yy421 = yymsp[-2].minor.yy421; delete yymsp[0].minor.yy280; objectForTokens = obj; DONT_INHERIT_TOKENS("sclp"); } break; case 170: /* selcollist ::= sclp STAR */ { SqliteSelect::Core::ResultColumn* obj = new SqliteSelect::Core::ResultColumn(true); yymsp[-1].minor.yy421->append(obj); yygotominor.yy421 = yymsp[-1].minor.yy421; objectForTokens = obj; DONT_INHERIT_TOKENS("sclp"); } break; case 171: /* selcollist ::= sclp tnm DOT STAR */ { SqliteSelect::Core::ResultColumn* obj = new SqliteSelect::Core::ResultColumn( true, yymsp[-2].minor.yy542->toName() ); if (!yymsp[-2].minor.yy542->isName()) parserContext->errorAtToken("Syntax error ", -3); yymsp[-3].minor.yy421->append(obj); yygotominor.yy421 = yymsp[-3].minor.yy421; delete yymsp[-2].minor.yy542; objectForTokens = obj; DONT_INHERIT_TOKENS("sclp"); } break; case 172: /* selcollist ::= sclp */ case 173: /* selcollist ::= sclp ID_TAB DOT STAR */ yytestcase(yyruleno==173); { parserContext->minorErrorBeforeNextToken("Syntax error"); yygotominor.yy421 = yymsp[0].minor.yy421; } break; case 174: /* as ::= AS nm */ { yygotominor.yy280 = new ParserStubAlias(*(yymsp[0].minor.yy255), true); delete yymsp[0].minor.yy255; } break; case 175: /* as ::= ids */ case 176: /* as ::= AS ID_ALIAS */ yytestcase(yyruleno==176); case 177: /* as ::= ID_ALIAS */ yytestcase(yyruleno==177); { yygotominor.yy280 = new ParserStubAlias(*(yymsp[0].minor.yy255), false); delete yymsp[0].minor.yy255; } break; case 178: /* as ::= */ {yygotominor.yy280 = nullptr;} break; case 179: /* from ::= */ {yygotominor.yy335 = nullptr;} break; case 180: /* from ::= FROM joinsrc */ {yygotominor.yy335 = yymsp[0].minor.yy335;} break; case 181: /* joinsrc ::= singlesrc seltablist */ { yygotominor.yy335 = new SqliteSelect::Core::JoinSource( yymsp[-1].minor.yy393, *(yymsp[0].minor.yy195) ); delete yymsp[0].minor.yy195; objectForTokens = yygotominor.yy335; } break; case 182: /* joinsrc ::= */ { parserContext->minorErrorBeforeNextToken("Syntax error"); yygotominor.yy335 = new SqliteSelect::Core::JoinSource(); objectForTokens = yygotominor.yy335; } break; case 183: /* seltablist ::= seltablist joinop singlesrc joinconstr_opt */ { SqliteSelect::Core::JoinSourceOther* src = new SqliteSelect::Core::JoinSourceOther(yymsp[-2].minor.yy461, yymsp[-1].minor.yy393, yymsp[0].minor.yy423); yymsp[-3].minor.yy195->append(src); yygotominor.yy195 = yymsp[-3].minor.yy195; objectForTokens = src; DONT_INHERIT_TOKENS("seltablist"); } break; case 184: /* seltablist ::= */ { yygotominor.yy195 = new ParserOtherSourceList(); } break; case 185: /* singlesrc ::= nm dbnm as indexed_opt */ { yygotominor.yy393 = new SqliteSelect::Core::SingleSource( *(yymsp[-3].minor.yy255), *(yymsp[-2].minor.yy255), yymsp[-1].minor.yy280 ? yymsp[-1].minor.yy280->asKw : false, yymsp[-1].minor.yy280 ? yymsp[-1].minor.yy280->name : QString(), yymsp[0].minor.yy224 ? yymsp[0].minor.yy224->notIndexedKw : false, yymsp[0].minor.yy224 ? yymsp[0].minor.yy224->indexedBy : QString() ); delete yymsp[-3].minor.yy255; delete yymsp[-2].minor.yy255; delete yymsp[-1].minor.yy280; if (yymsp[0].minor.yy224) delete yymsp[0].minor.yy224; objectForTokens = yygotominor.yy393; } break; case 186: /* singlesrc ::= LP select RP as */ { yygotominor.yy393 = new SqliteSelect::Core::SingleSource( yymsp[-2].minor.yy73, yymsp[0].minor.yy280 ? yymsp[0].minor.yy280->asKw : false, yymsp[0].minor.yy280 ? yymsp[0].minor.yy280->name : QString() ); delete yymsp[0].minor.yy280; objectForTokens = yygotominor.yy393; } break; case 187: /* singlesrc ::= LP joinsrc RP as */ { yygotominor.yy393 = new SqliteSelect::Core::SingleSource( yymsp[-2].minor.yy335, yymsp[0].minor.yy280 ? yymsp[0].minor.yy280->asKw : false, yymsp[0].minor.yy280 ? yymsp[0].minor.yy280->name : QString() ); delete yymsp[0].minor.yy280; objectForTokens = yygotominor.yy393; } break; case 188: /* singlesrc ::= nm dbnm LP exprlist RP as */ { yygotominor.yy393 = new SqliteSelect::Core::SingleSource( *(yymsp[-5].minor.yy255), *(yymsp[-4].minor.yy255), yymsp[0].minor.yy280 ? yymsp[0].minor.yy280->asKw : false, yymsp[0].minor.yy280 ? yymsp[0].minor.yy280->name : QString(), *(yymsp[-2].minor.yy567) ); delete yymsp[-5].minor.yy255; delete yymsp[-4].minor.yy255; delete yymsp[0].minor.yy280; if (yymsp[-2].minor.yy567) delete yymsp[-2].minor.yy567; objectForTokens = yygotominor.yy393; } break; case 189: /* singlesrc ::= */ { parserContext->minorErrorBeforeNextToken("Syntax error"); yygotominor.yy393 = new SqliteSelect::Core::SingleSource(); objectForTokens = yygotominor.yy393; } break; case 190: /* singlesrc ::= nm DOT */ { parserContext->minorErrorBeforeNextToken("Syntax error"); yygotominor.yy393 = new SqliteSelect::Core::SingleSource(); yygotominor.yy393->database = *(yymsp[-1].minor.yy255); delete yymsp[-1].minor.yy255; objectForTokens = yygotominor.yy393; } break; case 195: /* joinconstr_opt ::= ON expr */ { yygotominor.yy423 = new SqliteSelect::Core::JoinConstraint(yymsp[0].minor.yy176); objectForTokens = yygotominor.yy423; } break; case 196: /* joinconstr_opt ::= USING LP idlist RP */ { yygotominor.yy423 = new SqliteSelect::Core::JoinConstraint(*(yymsp[-1].minor.yy336)); delete yymsp[-1].minor.yy336; objectForTokens = yygotominor.yy423; } break; case 197: /* joinconstr_opt ::= */ {yygotominor.yy423 = nullptr;} break; case 198: /* dbnm ::= */ case 355: /* collate ::= */ yytestcase(yyruleno==355); case 441: /* vtabarg ::= */ yytestcase(yyruleno==441); case 445: /* anylist ::= */ yytestcase(yyruleno==445); {yygotominor.yy255 = new QString();} break; case 200: /* fullname ::= nm dbnm */ { yygotominor.yy520 = new ParserFullName(); yygotominor.yy520->name1 = *(yymsp[-1].minor.yy255); yygotominor.yy520->name2 = *(yymsp[0].minor.yy255); delete yymsp[-1].minor.yy255; delete yymsp[0].minor.yy255; } break; case 201: /* joinop ::= COMMA */ { yygotominor.yy461 = new SqliteSelect::Core::JoinOp(true); objectForTokens = yygotominor.yy461; } break; case 202: /* joinop ::= JOIN */ { yygotominor.yy461 = new SqliteSelect::Core::JoinOp(false); objectForTokens = yygotominor.yy461; } break; case 203: /* joinop ::= JOIN_KW JOIN */ { yygotominor.yy461 = new SqliteSelect::Core::JoinOp(yymsp[-1].minor.yy0->value); objectForTokens = yygotominor.yy461; } break; case 204: /* joinop ::= JOIN_KW nm JOIN */ { yygotominor.yy461 = new SqliteSelect::Core::JoinOp(yymsp[-2].minor.yy0->value, *(yymsp[-1].minor.yy255)); delete yymsp[-1].minor.yy255; objectForTokens = yygotominor.yy461; } break; case 205: /* joinop ::= JOIN_KW nm nm JOIN */ case 206: /* joinop ::= ID_JOIN_OPTS */ yytestcase(yyruleno==206); { yygotominor.yy461 = new SqliteSelect::Core::JoinOp(yymsp[-3].minor.yy0->value, *(yymsp[-2].minor.yy255), *(yymsp[-1].minor.yy255)); delete yymsp[-2].minor.yy255; objectForTokens = yygotominor.yy461; } break; case 207: /* indexed_opt ::= */ {yygotominor.yy224 = nullptr;} break; case 208: /* indexed_opt ::= INDEXED BY nm */ { yygotominor.yy224 = new ParserIndexedBy(*(yymsp[0].minor.yy255)); delete yymsp[0].minor.yy255; } break; case 209: /* indexed_opt ::= NOT INDEXED */ case 210: /* indexed_opt ::= INDEXED BY ID_IDX */ yytestcase(yyruleno==210); {yygotominor.yy224 = new ParserIndexedBy(true);} break; case 211: /* orderby_opt ::= */ {yygotominor.yy499 = new ParserOrderByList();} break; case 212: /* orderby_opt ::= ORDER BY sortlist */ {yygotominor.yy499 = yymsp[0].minor.yy499;} break; case 213: /* sortlist ::= sortlist COMMA expr sortorder nulls */ { SqliteOrderBy* obj = new SqliteOrderBy(yymsp[-2].minor.yy176, *(yymsp[-1].minor.yy645), *(yymsp[0].minor.yy99)); yymsp[-4].minor.yy499->append(obj); yygotominor.yy499 = yymsp[-4].minor.yy499; delete yymsp[-1].minor.yy645; delete yymsp[0].minor.yy99; objectForTokens = obj; DONT_INHERIT_TOKENS("sortlist"); } break; case 214: /* sortlist ::= expr sortorder nulls */ { SqliteOrderBy* obj = new SqliteOrderBy(yymsp[-2].minor.yy176, *(yymsp[-1].minor.yy645), *(yymsp[0].minor.yy99)); yygotominor.yy499 = new ParserOrderByList(); yygotominor.yy499->append(obj); delete yymsp[-1].minor.yy645; delete yymsp[0].minor.yy99; objectForTokens = obj; } break; case 215: /* sortorder ::= ASC */ {yygotominor.yy645 = new SqliteSortOrder(SqliteSortOrder::ASC);} break; case 216: /* sortorder ::= DESC */ {yygotominor.yy645 = new SqliteSortOrder(SqliteSortOrder::DESC);} break; case 217: /* sortorder ::= */ {yygotominor.yy645 = new SqliteSortOrder(SqliteSortOrder::null);} break; case 218: /* nulls ::= NULLS FIRST */ {yygotominor.yy99 = new SqliteNulls(SqliteNulls::FIRST);} break; case 219: /* nulls ::= NULLS LAST */ {yygotominor.yy99 = new SqliteNulls(SqliteNulls::LAST);} break; case 220: /* nulls ::= */ {yygotominor.yy99 = new SqliteNulls(SqliteNulls::null);} break; case 221: /* groupby_opt ::= */ case 340: /* exprlist ::= */ yytestcase(yyruleno==340); {yygotominor.yy567 = new ParserExprList();} break; case 222: /* groupby_opt ::= GROUP BY nexprlist */ case 339: /* exprlist ::= nexprlist */ yytestcase(yyruleno==339); {yygotominor.yy567 = yymsp[0].minor.yy567;} break; case 223: /* groupby_opt ::= GROUP BY */ { parserContext->minorErrorBeforeNextToken("Syntax error"); yygotominor.yy567 = new ParserExprList(); } break; case 224: /* having_opt ::= */ case 236: /* where_opt ::= */ yytestcase(yyruleno==236); case 336: /* case_else ::= */ yytestcase(yyruleno==336); case 338: /* case_operand ::= */ yytestcase(yyruleno==338); case 364: /* vinto ::= */ yytestcase(yyruleno==364); case 398: /* when_clause ::= */ yytestcase(yyruleno==398); case 413: /* key_opt ::= */ yytestcase(yyruleno==413); {yygotominor.yy176 = nullptr;} break; case 225: /* having_opt ::= HAVING expr */ case 237: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==237); case 327: /* expr ::= exprx */ yytestcase(yyruleno==327); case 335: /* case_else ::= ELSE expr */ yytestcase(yyruleno==335); case 337: /* case_operand ::= exprx */ yytestcase(yyruleno==337); case 363: /* vinto ::= INTO expr */ yytestcase(yyruleno==363); case 399: /* when_clause ::= WHEN expr */ yytestcase(yyruleno==399); case 414: /* key_opt ::= KEY expr */ yytestcase(yyruleno==414); {yygotominor.yy176 = yymsp[0].minor.yy176;} break; case 226: /* limit_opt ::= */ {yygotominor.yy4 = nullptr;} break; case 227: /* limit_opt ::= LIMIT expr */ { yygotominor.yy4 = new SqliteLimit(yymsp[0].minor.yy176); objectForTokens = yygotominor.yy4; } break; case 228: /* limit_opt ::= LIMIT expr OFFSET expr */ { yygotominor.yy4 = new SqliteLimit(yymsp[-2].minor.yy176, yymsp[0].minor.yy176, true); objectForTokens = yygotominor.yy4; } break; case 229: /* limit_opt ::= LIMIT expr COMMA expr */ { yygotominor.yy4 = new SqliteLimit(yymsp[-2].minor.yy176, yymsp[0].minor.yy176, false); objectForTokens = yygotominor.yy4; } break; case 231: /* delete_stmt ::= with DELETE FROM fullname indexed_opt where_opt returning */ { if (yymsp[-2].minor.yy224) { if (!yymsp[-2].minor.yy224->indexedBy.isNull()) { yygotominor.yy635 = new SqliteDelete( yymsp[-3].minor.yy520->name1, yymsp[-3].minor.yy520->name2, yymsp[-2].minor.yy224->indexedBy, yymsp[-1].minor.yy176, yymsp[-6].minor.yy321, *(yymsp[0].minor.yy421) ); } else { yygotominor.yy635 = new SqliteDelete( yymsp[-3].minor.yy520->name1, yymsp[-3].minor.yy520->name2, yymsp[-2].minor.yy224->notIndexedKw, yymsp[-1].minor.yy176, yymsp[-6].minor.yy321, *(yymsp[0].minor.yy421) ); } delete yymsp[-2].minor.yy224; } else { yygotominor.yy635 = new SqliteDelete( yymsp[-3].minor.yy520->name1, yymsp[-3].minor.yy520->name2, false, yymsp[-1].minor.yy176, yymsp[-6].minor.yy321, *(yymsp[0].minor.yy421) ); } delete yymsp[-3].minor.yy520; delete yymsp[0].minor.yy421; // since it's used in trigger: objectForTokens = yygotominor.yy635; } break; case 232: /* delete_stmt ::= with DELETE FROM */ { parserContext->minorErrorBeforeNextToken("Syntax error"); SqliteDelete* q = new SqliteDelete(); q->with = yymsp[-2].minor.yy321; yygotominor.yy635 = q; objectForTokens = yygotominor.yy635; } break; case 233: /* delete_stmt ::= with DELETE FROM nm DOT */ { parserContext->minorErrorBeforeNextToken("Syntax error"); SqliteDelete* q = new SqliteDelete(); q->with = yymsp[-4].minor.yy321; q->database = *(yymsp[-1].minor.yy255); yygotominor.yy635 = q; objectForTokens = yygotominor.yy635; delete yymsp[-1].minor.yy255; } break; case 234: /* delete_stmt ::= with DELETE FROM nm DOT ID_TAB */ case 245: /* update_stmt ::= with UPDATE orconf nm DOT ID_TAB */ yytestcase(yyruleno==245); { yy_destructor(yypParser,249,&yymsp[-5].minor); yy_destructor(yypParser,203,&yymsp[-2].minor); } break; case 235: /* delete_stmt ::= with DELETE FROM ID_DB|ID_TAB */ case 246: /* update_stmt ::= with UPDATE orconf ID_DB|ID_TAB */ yytestcase(yyruleno==246); { yy_destructor(yypParser,249,&yymsp[-3].minor); } break; case 238: /* where_opt ::= WHERE */ { parserContext->minorErrorBeforeNextToken("Syntax error"); yygotominor.yy176 = new SqliteExpr(); } break; case 240: /* returning ::= RETURNING selcollist */ {yygotominor.yy421 = yymsp[0].minor.yy421;} break; case 242: /* update_stmt ::= with UPDATE orconf fullname indexed_opt SET setlist from where_opt returning */ { yygotominor.yy635 = new SqliteUpdate( *(yymsp[-7].minor.yy66), yymsp[-6].minor.yy520->name1, yymsp[-6].minor.yy520->name2, yymsp[-5].minor.yy224 ? yymsp[-5].minor.yy224->notIndexedKw : false, yymsp[-5].minor.yy224 ? yymsp[-5].minor.yy224->indexedBy : QString(), *(yymsp[-3].minor.yy617), yymsp[-2].minor.yy335, yymsp[-1].minor.yy176, yymsp[-9].minor.yy321, *(yymsp[0].minor.yy421) ); delete yymsp[-7].minor.yy66; delete yymsp[-6].minor.yy520; delete yymsp[-3].minor.yy617; delete yymsp[0].minor.yy421; if (yymsp[-5].minor.yy224) delete yymsp[-5].minor.yy224; // since it's used in trigger: objectForTokens = yygotominor.yy635; } break; case 243: /* update_stmt ::= with UPDATE orconf */ { parserContext->minorErrorBeforeNextToken("Syntax error"); SqliteUpdate* q = new SqliteUpdate(); q->with = yymsp[-2].minor.yy321; yygotominor.yy635 = q; objectForTokens = yygotominor.yy635; delete yymsp[0].minor.yy66; } break; case 244: /* update_stmt ::= with UPDATE orconf nm DOT */ { parserContext->minorErrorBeforeNextToken("Syntax error"); SqliteUpdate* q = new SqliteUpdate(); q->with = yymsp[-4].minor.yy321; q->database = *(yymsp[-1].minor.yy255); yygotominor.yy635 = q; objectForTokens = yygotominor.yy635; delete yymsp[-2].minor.yy66; delete yymsp[-1].minor.yy255; } break; case 247: /* setlist ::= setlist COMMA nm EQ expr */ { yymsp[-4].minor.yy617->append(ParserSetValue(*(yymsp[-2].minor.yy255), yymsp[0].minor.yy176)); yygotominor.yy617 = yymsp[-4].minor.yy617; delete yymsp[-2].minor.yy255; } break; case 248: /* setlist ::= setlist COMMA LP idlist RP EQ expr */ { yymsp[-6].minor.yy617->append(ParserSetValue(*(yymsp[-3].minor.yy336), yymsp[0].minor.yy176)); yygotominor.yy617 = yymsp[-6].minor.yy617; delete yymsp[-3].minor.yy336; } break; case 249: /* setlist ::= nm EQ expr */ { yygotominor.yy617 = new ParserSetValueList(); yygotominor.yy617->append(ParserSetValue(*(yymsp[-2].minor.yy255), yymsp[0].minor.yy176)); delete yymsp[-2].minor.yy255; } break; case 250: /* setlist ::= LP idlist RP EQ expr */ { yygotominor.yy617 = new ParserSetValueList(); yygotominor.yy617->append(ParserSetValue(*(yymsp[-3].minor.yy336), yymsp[0].minor.yy176)); delete yymsp[-3].minor.yy336; } break; case 251: /* setlist ::= */ { parserContext->minorErrorBeforeNextToken("Syntax error"); yygotominor.yy617 = new ParserSetValueList(); } break; case 252: /* setlist ::= setlist COMMA */ { parserContext->minorErrorBeforeNextToken("Syntax error"); yygotominor.yy617 = yymsp[-1].minor.yy617; } break; case 253: /* setlist ::= setlist COMMA ID_COL */ case 254: /* setlist ::= ID_COL */ yytestcase(yyruleno==254); { yy_destructor(yypParser,280,&yymsp[-2].minor); } break; case 255: /* idlist_opt ::= */ {yygotominor.yy336 = new QStringList();} break; case 256: /* idlist_opt ::= LP idlist RP */ {yygotominor.yy336 = yymsp[-1].minor.yy336;} break; case 257: /* idlist ::= idlist COMMA nm */ { yygotominor.yy336 = yymsp[-2].minor.yy336; *(yygotominor.yy336) << *(yymsp[0].minor.yy255); delete yymsp[0].minor.yy255; } break; case 258: /* idlist ::= nm */ { yygotominor.yy336 = new QStringList(); *(yygotominor.yy336) << *(yymsp[0].minor.yy255); delete yymsp[0].minor.yy255; } break; case 259: /* idlist ::= */ { parserContext->minorErrorBeforeNextToken("Syntax error"); yygotominor.yy336 = new QStringList(); } break; case 260: /* idlist ::= idlist COMMA ID_COL */ case 261: /* idlist ::= ID_COL */ yytestcase(yyruleno==261); { yy_destructor(yypParser,274,&yymsp[-2].minor); } break; case 263: /* insert_stmt ::= with insert_cmd INTO fullname idlist_opt select upsert returning */ { yygotominor.yy635 = new SqliteInsert( yymsp[-6].minor.yy281->replace, yymsp[-6].minor.yy281->orConflict, yymsp[-4].minor.yy520->name1, yymsp[-4].minor.yy520->name2, *(yymsp[-3].minor.yy336), yymsp[-2].minor.yy73, yymsp[-7].minor.yy321, yymsp[-1].minor.yy16, *(yymsp[0].minor.yy421) ); delete yymsp[-4].minor.yy520; delete yymsp[-6].minor.yy281; delete yymsp[-3].minor.yy336; delete yymsp[0].minor.yy421; // since it's used in trigger: objectForTokens = yygotominor.yy635; } break; case 264: /* insert_stmt ::= with insert_cmd INTO fullname idlist_opt DEFAULT VALUES returning */ { yygotominor.yy635 = new SqliteInsert( yymsp[-6].minor.yy281->replace, yymsp[-6].minor.yy281->orConflict, yymsp[-4].minor.yy520->name1, yymsp[-4].minor.yy520->name2, *(yymsp[-3].minor.yy336), yymsp[-7].minor.yy321, *(yymsp[0].minor.yy421) ); delete yymsp[-4].minor.yy520; delete yymsp[-6].minor.yy281; delete yymsp[-3].minor.yy336; delete yymsp[0].minor.yy421; // since it's used in trigger: objectForTokens = yygotominor.yy635; } break; case 265: /* insert_stmt ::= with insert_cmd INTO fullname LP idlist rp_opt */ { parserContext->minorErrorBeforeNextToken("Syntax error"); yygotominor.yy635 = new SqliteInsert( yymsp[-5].minor.yy281->replace, yymsp[-5].minor.yy281->orConflict, yymsp[-3].minor.yy520->name1, yymsp[-3].minor.yy520->name2, *(yymsp[-1].minor.yy336), yymsp[-6].minor.yy321, QList() ); objectForTokens = yygotominor.yy635; delete yymsp[-3].minor.yy520; delete yymsp[-1].minor.yy336; delete yymsp[-5].minor.yy281; delete yymsp[0].minor.yy35; } break; case 266: /* insert_stmt ::= with insert_cmd INTO */ { parserContext->minorErrorBeforeNextToken("Syntax error"); SqliteInsert* q = new SqliteInsert(); q->replaceKw = yymsp[-1].minor.yy281->replace; q->onConflict = yymsp[-1].minor.yy281->orConflict; q->with = yymsp[-2].minor.yy321; yygotominor.yy635 = q; objectForTokens = yygotominor.yy635; delete yymsp[-1].minor.yy281; } break; case 267: /* insert_stmt ::= with insert_cmd INTO nm DOT */ { parserContext->minorErrorBeforeNextToken("Syntax error"); SqliteInsert* q = new SqliteInsert(); q->replaceKw = yymsp[-3].minor.yy281->replace; q->onConflict = yymsp[-3].minor.yy281->orConflict; q->with = yymsp[-4].minor.yy321; q->database = *(yymsp[-1].minor.yy255); yygotominor.yy635 = q; objectForTokens = yygotominor.yy635; delete yymsp[-3].minor.yy281; delete yymsp[-1].minor.yy255; } break; case 268: /* insert_stmt ::= with insert_cmd INTO ID_DB|ID_TAB */ { yy_destructor(yypParser,249,&yymsp[-3].minor); yy_destructor(yypParser,283,&yymsp[-2].minor); } break; case 269: /* insert_stmt ::= with insert_cmd INTO nm DOT ID_TAB */ { yy_destructor(yypParser,249,&yymsp[-5].minor); yy_destructor(yypParser,283,&yymsp[-4].minor); yy_destructor(yypParser,203,&yymsp[-2].minor); } break; case 270: /* insert_cmd ::= INSERT orconf */ { yygotominor.yy281 = new ParserStubInsertOrReplace(false, *(yymsp[0].minor.yy66)); delete yymsp[0].minor.yy66; } break; case 271: /* insert_cmd ::= REPLACE */ {yygotominor.yy281 = new ParserStubInsertOrReplace(true);} break; case 272: /* upsert ::= */ { yygotominor.yy16 = nullptr; } break; case 273: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO UPDATE SET setlist where_opt */ { yygotominor.yy16 = new SqliteUpsert(*(yymsp[-7].minor.yy499), yymsp[-5].minor.yy176, *(yymsp[-1].minor.yy617), yymsp[0].minor.yy176); delete yymsp[-7].minor.yy499; delete yymsp[-1].minor.yy617; objectForTokens = yygotominor.yy16; } break; case 274: /* upsert ::= ON CONFLICT LP sortlist RP where_opt DO NOTHING */ { yygotominor.yy16 = new SqliteUpsert(*(yymsp[-4].minor.yy499), yymsp[-2].minor.yy176); delete yymsp[-4].minor.yy499; objectForTokens = yygotominor.yy16; } break; case 275: /* upsert ::= ON CONFLICT DO NOTHING */ { yygotominor.yy16 = new SqliteUpsert(); objectForTokens = yygotominor.yy16; } break; case 276: /* exprx ::= expr not_opt IN ID_DB */ { yy_destructor(yypParser,227,&yymsp[-3].minor); } break; case 277: /* exprx ::= expr not_opt IN nm DOT ID_TAB */ case 278: /* exprx ::= ID_DB|ID_TAB|ID_COL|ID_FN */ yytestcase(yyruleno==278); { yy_destructor(yypParser,227,&yymsp[-5].minor); yy_destructor(yypParser,203,&yymsp[-2].minor); } break; case 279: /* exprx ::= tnm DOT ID_TAB|ID_COL */ { yy_destructor(yypParser,235,&yymsp[-2].minor); } break; case 280: /* exprx ::= tnm DOT nm DOT ID_COL */ { yy_destructor(yypParser,235,&yymsp[-4].minor); yy_destructor(yypParser,203,&yymsp[-2].minor); } break; case 281: /* exprx ::= expr COLLATE ID_COLLATE */ case 282: /* exprx ::= RAISE LP raisetype COMMA ID_ERR_MSG RP */ yytestcase(yyruleno==282); { yy_destructor(yypParser,227,&yymsp[-2].minor); } break; case 283: /* exprx ::= CTIME_KW */ { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initCTime(yymsp[0].minor.yy0->value); objectForTokens = yygotominor.yy176; } break; case 284: /* exprx ::= LP nexprlist RP */ { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initRowValue(*(yymsp[-1].minor.yy567)); delete yymsp[-1].minor.yy567; objectForTokens = yygotominor.yy176; } break; case 285: /* exprx ::= tnm */ { yygotominor.yy176 = new SqliteExpr(); if (yymsp[0].minor.yy542->isLiteral()) yygotominor.yy176->initLiteral(yymsp[0].minor.yy542->toLiteral()); else yygotominor.yy176->initId(yymsp[0].minor.yy542->toName()); //parserContext->errorBeforeLastToken("Syntax error "); delete yymsp[0].minor.yy542; objectForTokens = yygotominor.yy176; } break; case 286: /* exprx ::= tnm DOT nm */ { yygotominor.yy176 = new SqliteExpr(); if (yymsp[-2].minor.yy542->isName()) yygotominor.yy176->initId(yymsp[-2].minor.yy542->toName(), *(yymsp[0].minor.yy255)); else parserContext->errorAtToken("Syntax error ", -3); delete yymsp[-2].minor.yy542; delete yymsp[0].minor.yy255; objectForTokens = yygotominor.yy176; } break; case 287: /* exprx ::= tnm DOT */ { yygotominor.yy176 = new SqliteExpr(); objectForTokens = yygotominor.yy176; if (yymsp[-1].minor.yy542->isName()) { yygotominor.yy176->initId(yymsp[-1].minor.yy542->toName(), QString()); parserContext->minorErrorAfterLastToken("Syntax error "); } else parserContext->errorAtToken("Syntax error ", -3); delete yymsp[-1].minor.yy542; } break; case 288: /* exprx ::= tnm DOT nm DOT nm */ { yygotominor.yy176 = new SqliteExpr(); if (yymsp[-4].minor.yy542->isName()) yygotominor.yy176->initId(yymsp[-4].minor.yy542->toName(), *(yymsp[-2].minor.yy255), *(yymsp[0].minor.yy255)); else parserContext->errorAtToken("Syntax error ", -5); delete yymsp[-4].minor.yy542; delete yymsp[-2].minor.yy255; delete yymsp[0].minor.yy255; objectForTokens = yygotominor.yy176; } break; case 289: /* exprx ::= tnm DOT nm DOT */ { yygotominor.yy176 = new SqliteExpr(); objectForTokens = yygotominor.yy176; if (yymsp[-3].minor.yy542->isName()) { yygotominor.yy176->initId(yymsp[-3].minor.yy542->toName(), *(yymsp[-1].minor.yy255), QString()); parserContext->minorErrorAfterLastToken("Syntax error "); } else parserContext->errorAtToken("Syntax error ", -5); delete yymsp[-3].minor.yy542; delete yymsp[-1].minor.yy255; } break; case 290: /* exprx ::= VARIABLE */ { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initBindParam(yymsp[0].minor.yy0->value); objectForTokens = yygotominor.yy176; } break; case 291: /* exprx ::= expr COLLATE ids */ { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initCollate(yymsp[-2].minor.yy176, *(yymsp[0].minor.yy255)); delete yymsp[0].minor.yy255; objectForTokens = yygotominor.yy176; } break; case 292: /* exprx ::= CAST LP expr AS typetoken RP */ { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initCast(yymsp[-3].minor.yy176, yymsp[-1].minor.yy601); objectForTokens = yygotominor.yy176; } break; case 293: /* exprx ::= ID LP distinct exprlist RP */ { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initFunction(stripObjName(yymsp[-4].minor.yy0->value), *(yymsp[-2].minor.yy562), *(yymsp[-1].minor.yy567)); delete yymsp[-2].minor.yy562; delete yymsp[-1].minor.yy567; objectForTokens = yygotominor.yy176; } break; case 294: /* exprx ::= ID LP STAR RP */ { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initFunction(stripObjName(yymsp[-3].minor.yy0->value), true); objectForTokens = yygotominor.yy176; } break; case 295: /* exprx ::= expr AND expr */ case 296: /* exprx ::= expr OR expr */ yytestcase(yyruleno==296); case 297: /* exprx ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==297); case 298: /* exprx ::= expr EQ|NE expr */ yytestcase(yyruleno==298); case 299: /* exprx ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==299); case 300: /* exprx ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==300); case 301: /* exprx ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==301); case 302: /* exprx ::= expr CONCAT expr */ yytestcase(yyruleno==302); { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initBinOp(yymsp[-2].minor.yy176, yymsp[-1].minor.yy0->value, yymsp[0].minor.yy176); objectForTokens = yygotominor.yy176; } break; case 303: /* exprx ::= expr not_opt likeop expr */ { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initLike(yymsp[-3].minor.yy176, *(yymsp[-2].minor.yy35), *(yymsp[-1].minor.yy104), yymsp[0].minor.yy176); delete yymsp[-2].minor.yy35; delete yymsp[-1].minor.yy104; objectForTokens = yygotominor.yy176; } break; case 304: /* exprx ::= expr not_opt likeop expr ESCAPE expr */ { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initLike(yymsp[-5].minor.yy176, *(yymsp[-4].minor.yy35), *(yymsp[-3].minor.yy104), yymsp[-2].minor.yy176, yymsp[0].minor.yy176); delete yymsp[-4].minor.yy35; delete yymsp[-3].minor.yy104; objectForTokens = yygotominor.yy176; } break; case 305: /* exprx ::= expr ISNULL|NOTNULL */ { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initNull(yymsp[-1].minor.yy176, yymsp[0].minor.yy0->value); objectForTokens = yygotominor.yy176; } break; case 306: /* exprx ::= expr NOT NULL */ { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initNull(yymsp[-2].minor.yy176, "NOT NULL"); objectForTokens = yygotominor.yy176; } break; case 307: /* exprx ::= expr IS not_opt expr */ { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initIs(yymsp[-3].minor.yy176, *(yymsp[-1].minor.yy35), yymsp[0].minor.yy176); delete yymsp[-1].minor.yy35; objectForTokens = yygotominor.yy176; } break; case 308: /* exprx ::= expr IS NOT DISTINCT FROM expr */ { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initDistinct(yymsp[-5].minor.yy176, true, yymsp[0].minor.yy176); objectForTokens = yygotominor.yy176; } break; case 309: /* exprx ::= expr IS DISTINCT FROM expr */ { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initDistinct(yymsp[-4].minor.yy176, false, yymsp[0].minor.yy176); objectForTokens = yygotominor.yy176; } break; case 310: /* exprx ::= NOT expr */ { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initUnaryOp(yymsp[0].minor.yy176, yymsp[-1].minor.yy0->value); } break; case 311: /* exprx ::= BITNOT expr */ case 313: /* exprx ::= PLUS expr */ yytestcase(yyruleno==313); { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initUnaryOp(yymsp[0].minor.yy176, yymsp[-1].minor.yy0->value); objectForTokens = yygotominor.yy176; } break; case 312: /* exprx ::= MINUS expr */ { yygotominor.yy176 = new SqliteExpr(); if (yymsp[0].minor.yy176->mode == SqliteExpr::Mode::LITERAL_VALUE && parserContext->isCandidateForMaxNegativeNumber() && yymsp[0].minor.yy176->literalValue == static_cast(0L)) { yygotominor.yy176->initLiteral(std::numeric_limits::min()); delete yymsp[0].minor.yy176; } else { yygotominor.yy176->initUnaryOp(yymsp[0].minor.yy176, yymsp[-1].minor.yy0->value); } objectForTokens = yygotominor.yy176; } break; case 314: /* exprx ::= expr PTR expr */ { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initPtrOp(yymsp[-2].minor.yy176, yymsp[-1].minor.yy0->value, yymsp[0].minor.yy176); objectForTokens = yygotominor.yy176; } break; case 315: /* exprx ::= expr not_opt BETWEEN expr AND expr */ { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initBetween(yymsp[-5].minor.yy176, *(yymsp[-4].minor.yy35), yymsp[-2].minor.yy176, yymsp[0].minor.yy176); delete yymsp[-4].minor.yy35; objectForTokens = yygotominor.yy176; } break; case 316: /* exprx ::= expr not_opt IN LP exprlist RP */ { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initIn(yymsp[-5].minor.yy176, *(yymsp[-4].minor.yy35), *(yymsp[-1].minor.yy567)); delete yymsp[-4].minor.yy35; delete yymsp[-1].minor.yy567; objectForTokens = yygotominor.yy176; } break; case 317: /* exprx ::= LP select RP */ { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initSubSelect(yymsp[-1].minor.yy73); objectForTokens = yygotominor.yy176; } break; case 318: /* exprx ::= expr not_opt IN LP select RP */ { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initIn(yymsp[-5].minor.yy176, *(yymsp[-4].minor.yy35), yymsp[-1].minor.yy73); delete yymsp[-4].minor.yy35; objectForTokens = yygotominor.yy176; } break; case 319: /* exprx ::= expr not_opt IN nm dbnm */ { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initIn(yymsp[-4].minor.yy176, *(yymsp[-3].minor.yy35), *(yymsp[-1].minor.yy255), *(yymsp[0].minor.yy255)); delete yymsp[-3].minor.yy35; delete yymsp[-1].minor.yy255; objectForTokens = yygotominor.yy176; } break; case 320: /* exprx ::= EXISTS LP select RP */ { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initExists(yymsp[-1].minor.yy73); objectForTokens = yygotominor.yy176; } break; case 321: /* exprx ::= CASE case_operand case_exprlist case_else END */ { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initCase(yymsp[-3].minor.yy176, *(yymsp[-2].minor.yy567), yymsp[-1].minor.yy176); delete yymsp[-2].minor.yy567; objectForTokens = yygotominor.yy176; } break; case 322: /* exprx ::= RAISE LP IGNORE RP */ { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initRaise(yymsp[-1].minor.yy0->value); objectForTokens = yygotominor.yy176; } break; case 323: /* exprx ::= RAISE LP raisetype COMMA nm RP */ { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initRaise(yymsp[-3].minor.yy0->value, *(yymsp[-1].minor.yy255)); delete yymsp[-1].minor.yy255; objectForTokens = yygotominor.yy176; } break; case 324: /* exprx ::= ID LP distinct exprlist RP filter_over */ { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initWindowFunction(stripObjName(yymsp[-5].minor.yy0->value), *(yymsp[-3].minor.yy562), *(yymsp[-2].minor.yy567), yymsp[0].minor.yy487); delete yymsp[-3].minor.yy562; delete yymsp[-2].minor.yy567; objectForTokens = yygotominor.yy176; } break; case 325: /* exprx ::= ID LP STAR RP filter_over */ { yygotominor.yy176 = new SqliteExpr(); yygotominor.yy176->initWindowFunction(stripObjName(yymsp[-4].minor.yy0->value), yymsp[0].minor.yy487); objectForTokens = yygotominor.yy176; } break; case 326: /* expr ::= */ { yygotominor.yy176 = new SqliteExpr(); objectForTokens = yygotominor.yy176; parserContext->minorErrorAfterLastToken("Syntax error "); } break; case 332: /* likeop ::= LIKE_KW|MATCH */ {yygotominor.yy104 = new SqliteExpr::LikeOp(SqliteExpr::likeOp(yymsp[0].minor.yy0->value));} break; case 333: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */ { yymsp[-4].minor.yy567->append(yymsp[-2].minor.yy176); yymsp[-4].minor.yy567->append(yymsp[0].minor.yy176); yygotominor.yy567 = yymsp[-4].minor.yy567; } break; case 334: /* case_exprlist ::= WHEN expr THEN expr */ { yygotominor.yy567 = new ParserExprList(); yygotominor.yy567->append(yymsp[-2].minor.yy176); yygotominor.yy567->append(yymsp[0].minor.yy176); } break; case 341: /* nexprlist ::= nexprlist COMMA expr */ { yymsp[-2].minor.yy567->append(yymsp[0].minor.yy176); yygotominor.yy567 = yymsp[-2].minor.yy567; DONT_INHERIT_TOKENS("nexprlist"); } break; case 342: /* nexprlist ::= exprx */ { yygotominor.yy567 = new ParserExprList(); yygotominor.yy567->append(yymsp[0].minor.yy176); } break; case 343: /* cmd ::= CREATE uniqueflag INDEX ifnotexists nm dbnm ON nm LP sortlist RP where_opt */ { yygotominor.yy635 = new SqliteCreateIndex( *(yymsp[-10].minor.yy35), *(yymsp[-8].minor.yy35), *(yymsp[-7].minor.yy255), *(yymsp[-6].minor.yy255), *(yymsp[-4].minor.yy255), *(yymsp[-2].minor.yy499), yymsp[0].minor.yy176 ); delete yymsp[-8].minor.yy35; delete yymsp[-10].minor.yy35; delete yymsp[-7].minor.yy255; delete yymsp[-6].minor.yy255; delete yymsp[-4].minor.yy255; delete yymsp[-2].minor.yy499; objectForTokens = yygotominor.yy635; } break; case 344: /* cmd ::= CREATE uniqueflag INDEX ifnotexists nm dbnm ON ID_TAB */ { yy_destructor(yypParser,203,&yymsp[-3].minor); } break; case 349: /* idxlist_opt ::= */ {yygotominor.yy527 = new ParserIndexedColumnList();} break; case 350: /* idxlist_opt ::= LP idxlist RP */ {yygotominor.yy527 = yymsp[-1].minor.yy527;} break; case 351: /* idxlist ::= idxlist COMMA idxlist_single */ { yymsp[-2].minor.yy527->append(yymsp[0].minor.yy540); yygotominor.yy527 = yymsp[-2].minor.yy527; DONT_INHERIT_TOKENS("idxlist"); } break; case 352: /* idxlist ::= idxlist_single */ { yygotominor.yy527 = new ParserIndexedColumnList(); yygotominor.yy527->append(yymsp[0].minor.yy540); } break; case 353: /* idxlist_single ::= nm collate sortorder */ case 354: /* idxlist_single ::= ID_COL */ yytestcase(yyruleno==354); { SqliteIndexedColumn* obj = new SqliteIndexedColumn( *(yymsp[-2].minor.yy255), *(yymsp[-1].minor.yy255), *(yymsp[0].minor.yy645) ); yygotominor.yy540 = obj; delete yymsp[0].minor.yy645; delete yymsp[-2].minor.yy255; delete yymsp[-1].minor.yy255; objectForTokens = yygotominor.yy540; } break; case 358: /* cmd ::= DROP INDEX ifexists fullname */ { yygotominor.yy635 = new SqliteDropIndex(*(yymsp[-1].minor.yy35), yymsp[0].minor.yy520->name1, yymsp[0].minor.yy520->name2); delete yymsp[-1].minor.yy35; delete yymsp[0].minor.yy520; objectForTokens = yygotominor.yy635; } break; case 361: /* cmd ::= VACUUM vinto */ { yygotominor.yy635 = new SqliteVacuum(yymsp[0].minor.yy176); objectForTokens = yygotominor.yy635; } break; case 362: /* cmd ::= VACUUM nm vinto */ { yygotominor.yy635 = new SqliteVacuum(*(yymsp[-1].minor.yy255), yymsp[0].minor.yy176); delete yymsp[-1].minor.yy255; objectForTokens = yygotominor.yy635; } break; case 365: /* cmd ::= PRAGMA nm dbnm */ { yygotominor.yy635 = new SqlitePragma(*(yymsp[-1].minor.yy255), *(yymsp[0].minor.yy255)); delete yymsp[-1].minor.yy255; delete yymsp[0].minor.yy255; objectForTokens = yygotominor.yy635; } break; case 366: /* cmd ::= PRAGMA nm dbnm EQ nmnum */ case 368: /* cmd ::= PRAGMA nm dbnm EQ minus_num */ yytestcase(yyruleno==368); { yygotominor.yy635 = new SqlitePragma(*(yymsp[-3].minor.yy255), *(yymsp[-2].minor.yy255), *(yymsp[0].minor.yy629), true); delete yymsp[-3].minor.yy255; delete yymsp[-2].minor.yy255; delete yymsp[0].minor.yy629; objectForTokens = yygotominor.yy635; } break; case 367: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */ case 369: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */ yytestcase(yyruleno==369); { yygotominor.yy635 = new SqlitePragma(*(yymsp[-4].minor.yy255), *(yymsp[-3].minor.yy255), *(yymsp[-1].minor.yy629), false); delete yymsp[-4].minor.yy255; delete yymsp[-3].minor.yy255; delete yymsp[-1].minor.yy629; objectForTokens = yygotominor.yy635; } break; case 373: /* nmnum ::= nm */ { yygotominor.yy629 = new QVariant(*(yymsp[0].minor.yy255)); delete yymsp[0].minor.yy255; } break; case 374: /* nmnum ::= ON */ case 375: /* nmnum ::= DELETE */ yytestcase(yyruleno==375); case 376: /* nmnum ::= DEFAULT */ yytestcase(yyruleno==376); {yygotominor.yy629 = new QVariant(yymsp[0].minor.yy0->value);} break; case 379: /* minus_num ::= MINUS number */ { if (yymsp[0].minor.yy629->type() == QVariant::Double) *(yymsp[0].minor.yy629) = -(yymsp[0].minor.yy629->toDouble()); else if (yymsp[0].minor.yy629->type() == QVariant::LongLong) { if (parserContext->isCandidateForMaxNegativeNumber()) *(yymsp[0].minor.yy629) = std::numeric_limits::min(); else *(yymsp[0].minor.yy629) = -(yymsp[0].minor.yy629->toLongLong()); } else Q_ASSERT_X(true, "producing minus number", "QVariant is neither of Double or LongLong."); yygotominor.yy629 = yymsp[0].minor.yy629; } break; case 382: /* cmd ::= CREATE temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON nm foreach_clause when_clause BEGIN trigger_cmd_list END */ { yygotominor.yy635 = new SqliteCreateTrigger( *(yymsp[-13].minor.yy562), *(yymsp[-11].minor.yy35), *(yymsp[-10].minor.yy255), *(yymsp[-9].minor.yy255), *(yymsp[-5].minor.yy255), *(yymsp[-8].minor.yy612), yymsp[-7].minor.yy407, *(yymsp[-4].minor.yy403), yymsp[-3].minor.yy176, *(yymsp[-1].minor.yy575), 3 ); delete yymsp[-11].minor.yy35; delete yymsp[-13].minor.yy562; delete yymsp[-8].minor.yy612; delete yymsp[-4].minor.yy403; delete yymsp[-10].minor.yy255; delete yymsp[-5].minor.yy255; delete yymsp[-9].minor.yy255; delete yymsp[-1].minor.yy575; objectForTokens = yygotominor.yy635; } break; case 383: /* cmd ::= CREATE temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON nm foreach_clause when_clause */ { QList CL; yygotominor.yy635 = new SqliteCreateTrigger( *(yymsp[-10].minor.yy562), *(yymsp[-8].minor.yy35), *(yymsp[-7].minor.yy255), *(yymsp[-6].minor.yy255), *(yymsp[-2].minor.yy255), *(yymsp[-5].minor.yy612), yymsp[-4].minor.yy407, *(yymsp[-1].minor.yy403), yymsp[0].minor.yy176, CL, 3 ); delete yymsp[-8].minor.yy35; delete yymsp[-10].minor.yy562; delete yymsp[-5].minor.yy612; delete yymsp[-1].minor.yy403; delete yymsp[-7].minor.yy255; delete yymsp[-2].minor.yy255; delete yymsp[-6].minor.yy255; objectForTokens = yygotominor.yy635; parserContext->minorErrorAfterLastToken("Syntax error"); } break; case 384: /* cmd ::= CREATE temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON nm foreach_clause when_clause BEGIN trigger_cmd_list */ { yygotominor.yy635 = new SqliteCreateTrigger( *(yymsp[-12].minor.yy562), *(yymsp[-10].minor.yy35), *(yymsp[-9].minor.yy255), *(yymsp[-8].minor.yy255), *(yymsp[-4].minor.yy255), *(yymsp[-7].minor.yy612), yymsp[-6].minor.yy407, *(yymsp[-3].minor.yy403), yymsp[-2].minor.yy176, *(yymsp[0].minor.yy575), 3 ); delete yymsp[-10].minor.yy35; delete yymsp[-12].minor.yy562; delete yymsp[-7].minor.yy612; delete yymsp[-3].minor.yy403; delete yymsp[-9].minor.yy255; delete yymsp[-4].minor.yy255; delete yymsp[-8].minor.yy255; delete yymsp[0].minor.yy575; objectForTokens = yygotominor.yy635; parserContext->minorErrorAfterLastToken("Syntax error"); } break; case 385: /* cmd ::= CREATE temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON ID_TAB */ { yy_destructor(yypParser,205,&yymsp[-8].minor); yy_destructor(yypParser,203,&yymsp[-5].minor); yy_destructor(yypParser,299,&yymsp[-3].minor); yy_destructor(yypParser,300,&yymsp[-2].minor); } break; case 388: /* trigger_time ::= BEFORE */ {yygotominor.yy612 = new SqliteCreateTrigger::Time(SqliteCreateTrigger::Time::BEFORE);} break; case 389: /* trigger_time ::= AFTER */ {yygotominor.yy612 = new SqliteCreateTrigger::Time(SqliteCreateTrigger::Time::AFTER);} break; case 390: /* trigger_time ::= INSTEAD OF */ {yygotominor.yy612 = new SqliteCreateTrigger::Time(SqliteCreateTrigger::Time::INSTEAD_OF);} break; case 391: /* trigger_time ::= */ {yygotominor.yy612 = new SqliteCreateTrigger::Time(SqliteCreateTrigger::Time::null);} break; case 392: /* trigger_event ::= DELETE */ { yygotominor.yy407 = new SqliteCreateTrigger::Event(SqliteCreateTrigger::Event::DELETE); objectForTokens = yygotominor.yy407; } break; case 393: /* trigger_event ::= INSERT */ { yygotominor.yy407 = new SqliteCreateTrigger::Event(SqliteCreateTrigger::Event::INSERT); objectForTokens = yygotominor.yy407; } break; case 394: /* trigger_event ::= UPDATE */ { yygotominor.yy407 = new SqliteCreateTrigger::Event(SqliteCreateTrigger::Event::UPDATE); objectForTokens = yygotominor.yy407; } break; case 395: /* trigger_event ::= UPDATE OF idlist */ { yygotominor.yy407 = new SqliteCreateTrigger::Event(*(yymsp[0].minor.yy336)); delete yymsp[0].minor.yy336; objectForTokens = yygotominor.yy407; } break; case 396: /* foreach_clause ::= */ {yygotominor.yy403 = new SqliteCreateTrigger::Scope(SqliteCreateTrigger::Scope::null);} break; case 397: /* foreach_clause ::= FOR EACH ROW */ {yygotominor.yy403 = new SqliteCreateTrigger::Scope(SqliteCreateTrigger::Scope::FOR_EACH_ROW);} break; case 400: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */ { yymsp[-2].minor.yy575->append(yymsp[-1].minor.yy635); yygotominor.yy575 = yymsp[-2].minor.yy575; DONT_INHERIT_TOKENS("trigger_cmd_list"); } break; case 401: /* trigger_cmd_list ::= trigger_cmd SEMI */ { yygotominor.yy575 = new ParserQueryList(); yygotominor.yy575->append(yymsp[-1].minor.yy635); } break; case 402: /* trigger_cmd_list ::= SEMI */ { yygotominor.yy575 = new ParserQueryList(); parserContext->minorErrorAfterLastToken("Syntax error"); } break; case 407: /* raisetype ::= ROLLBACK|ABORT|FAIL */ {yygotominor.yy0 = yymsp[0].minor.yy0;} break; case 408: /* cmd ::= DROP TRIGGER ifexists fullname */ { yygotominor.yy635 = new SqliteDropTrigger(*(yymsp[-1].minor.yy35), yymsp[0].minor.yy520->name1, yymsp[0].minor.yy520->name2); delete yymsp[-1].minor.yy35; delete yymsp[0].minor.yy520; objectForTokens = yygotominor.yy635; } break; case 411: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */ { yygotominor.yy635 = new SqliteAttach(*(yymsp[-4].minor.yy35), yymsp[-3].minor.yy176, yymsp[-1].minor.yy176, yymsp[0].minor.yy176); delete yymsp[-4].minor.yy35; objectForTokens = yygotominor.yy635; } break; case 412: /* cmd ::= DETACH database_kw_opt expr */ { yygotominor.yy635 = new SqliteDetach(*(yymsp[-1].minor.yy35), yymsp[0].minor.yy176); delete yymsp[-1].minor.yy35; objectForTokens = yygotominor.yy635; } break; case 417: /* cmd ::= REINDEX */ {yygotominor.yy635 = new SqliteReindex();} break; case 418: /* cmd ::= REINDEX nm dbnm */ case 419: /* cmd ::= REINDEX ID_COLLATE */ yytestcase(yyruleno==419); { yygotominor.yy635 = new SqliteReindex(*(yymsp[-1].minor.yy255), *(yymsp[0].minor.yy255)); delete yymsp[-1].minor.yy255; delete yymsp[0].minor.yy255; objectForTokens = yygotominor.yy635; } break; case 422: /* cmd ::= ANALYZE */ { yygotominor.yy635 = new SqliteAnalyze(); objectForTokens = yygotominor.yy635; } break; case 423: /* cmd ::= ANALYZE nm dbnm */ { yygotominor.yy635 = new SqliteAnalyze(*(yymsp[-1].minor.yy255), *(yymsp[0].minor.yy255)); delete yymsp[-1].minor.yy255; delete yymsp[0].minor.yy255; objectForTokens = yygotominor.yy635; } break; case 426: /* cmd ::= ALTER TABLE fullname RENAME TO nm */ { yygotominor.yy635 = new SqliteAlterTable( yymsp[-3].minor.yy520->name1, yymsp[-3].minor.yy520->name2, *(yymsp[0].minor.yy255) ); delete yymsp[0].minor.yy255; delete yymsp[-3].minor.yy520; objectForTokens = yygotominor.yy635; } break; case 427: /* cmd ::= ALTER TABLE fullname ADD kwcolumn_opt column */ { yygotominor.yy635 = new SqliteAlterTable( yymsp[-3].minor.yy520->name1, yymsp[-3].minor.yy520->name2, *(yymsp[-1].minor.yy35), yymsp[0].minor.yy115 ); delete yymsp[-1].minor.yy35; delete yymsp[-3].minor.yy520; objectForTokens = yygotominor.yy635; } break; case 428: /* cmd ::= ALTER TABLE fullname DROP kwcolumn_opt nm */ { yygotominor.yy635 = new SqliteAlterTable( yymsp[-3].minor.yy520->name1, yymsp[-3].minor.yy520->name2, *(yymsp[-1].minor.yy35), *(yymsp[0].minor.yy255) ); delete yymsp[-1].minor.yy35; delete yymsp[-3].minor.yy520; delete yymsp[0].minor.yy255; } break; case 429: /* cmd ::= ALTER TABLE fullname RENAME TO ID_TAB_NEW */ { yy_destructor(yypParser,207,&yymsp[-3].minor); } break; case 435: /* create_vtab ::= CREATE VIRTUAL TABLE ifnotexists nm dbnm USING nm */ { yygotominor.yy635 = new SqliteCreateVirtualTable( *(yymsp[-4].minor.yy35), *(yymsp[-3].minor.yy255), *(yymsp[-2].minor.yy255), *(yymsp[0].minor.yy255) ); delete yymsp[-4].minor.yy35; delete yymsp[-3].minor.yy255; delete yymsp[-2].minor.yy255; delete yymsp[0].minor.yy255; objectForTokens = yygotominor.yy635; } break; case 436: /* create_vtab ::= CREATE VIRTUAL TABLE ifnotexists nm dbnm USING nm LP vtabarglist RP */ { yygotominor.yy635 = new SqliteCreateVirtualTable( *(yymsp[-7].minor.yy35), *(yymsp[-6].minor.yy255), *(yymsp[-5].minor.yy255), *(yymsp[-3].minor.yy255), *(yymsp[-1].minor.yy336) ); delete yymsp[-6].minor.yy255; delete yymsp[-5].minor.yy255; delete yymsp[-3].minor.yy255; delete yymsp[-7].minor.yy35; delete yymsp[-1].minor.yy336; objectForTokens = yygotominor.yy635; } break; case 439: /* vtabarglist ::= vtabarg */ { yygotominor.yy336 = new QStringList(); yygotominor.yy336->append((yymsp[0].minor.yy255)->mid(1)); // mid(1) to skip the first whitespace added in vtabarg delete yymsp[0].minor.yy255; } break; case 440: /* vtabarglist ::= vtabarglist COMMA vtabarg */ { yymsp[-2].minor.yy336->append((yymsp[0].minor.yy255)->mid(1)); // mid(1) to skip the first whitespace added in vtabarg yygotominor.yy336 = yymsp[-2].minor.yy336; delete yymsp[0].minor.yy255; DONT_INHERIT_TOKENS("vtabarglist"); } break; case 442: /* vtabarg ::= vtabarg vtabargtoken */ { yymsp[-1].minor.yy255->append(" "+ *(yymsp[0].minor.yy255)); yygotominor.yy255 = yymsp[-1].minor.yy255; delete yymsp[0].minor.yy255; } break; case 443: /* vtabargtoken ::= ANY */ { yygotominor.yy255 = new QString(yymsp[0].minor.yy0->value); } break; case 444: /* vtabargtoken ::= LP anylist RP */ { yygotominor.yy255 = new QString("("); yygotominor.yy255->append(*(yymsp[-1].minor.yy255)); yygotominor.yy255->append(")"); delete yymsp[-1].minor.yy255; } break; case 446: /* anylist ::= anylist LP anylist RP */ { yygotominor.yy255 = yymsp[-3].minor.yy255; yygotominor.yy255->append("("); yygotominor.yy255->append(*(yymsp[-1].minor.yy255)); yygotominor.yy255->append(")"); delete yymsp[-1].minor.yy255; DONT_INHERIT_TOKENS("anylist"); } break; case 447: /* anylist ::= anylist ANY */ { yygotominor.yy255 = yymsp[-1].minor.yy255; yygotominor.yy255->append(yymsp[0].minor.yy0->value); DONT_INHERIT_TOKENS("anylist"); } break; case 448: /* with ::= */ {yygotominor.yy321 = nullptr;} break; case 449: /* with ::= WITH wqlist */ { yygotominor.yy321 = new SqliteWith(); yygotominor.yy321->cteList = *(yymsp[0].minor.yy17); delete yymsp[0].minor.yy17; objectForTokens = yygotominor.yy321; } break; case 450: /* with ::= WITH RECURSIVE wqlist */ { yygotominor.yy321 = new SqliteWith(); yygotominor.yy321->cteList = *(yymsp[0].minor.yy17); yygotominor.yy321->recursive = true; delete yymsp[0].minor.yy17; objectForTokens = yygotominor.yy321; } break; case 451: /* wqas ::= AS */ {yygotominor.yy383 = new SqliteWith::CommonTableExpression::AsMode(SqliteWith::CommonTableExpression::ANY);} break; case 452: /* wqas ::= AS MATERIALIZED */ {yygotominor.yy383 = new SqliteWith::CommonTableExpression::AsMode(SqliteWith::CommonTableExpression::MATERIALIZED);} break; case 453: /* wqas ::= AS NOT MATERIALIZED */ {yygotominor.yy383 = new SqliteWith::CommonTableExpression::AsMode(SqliteWith::CommonTableExpression::NOT_MATERIALIZED);} break; case 454: /* wqlist ::= wqcte */ { yygotominor.yy17 = new ParserCteList(); yygotominor.yy17->append(yymsp[0].minor.yy366); } break; case 455: /* wqlist ::= wqlist COMMA wqcte */ { yygotominor.yy17 = yymsp[-2].minor.yy17; yygotominor.yy17->append(yymsp[0].minor.yy366); DONT_INHERIT_TOKENS("wqlist"); } break; case 456: /* wqlist ::= ID_TAB_NEW */ { parserContext->minorErrorBeforeNextToken("Syntax error"); } break; case 457: /* wqcte ::= nm idxlist_opt wqas LP select RP */ { yygotominor.yy366 = new SqliteWith::CommonTableExpression(*(yymsp[-5].minor.yy255), *(yymsp[-4].minor.yy527), yymsp[-1].minor.yy73, *(yymsp[-3].minor.yy383)); delete yymsp[-5].minor.yy255; delete yymsp[-4].minor.yy527; delete yymsp[-3].minor.yy383; objectForTokens = yygotominor.yy366; } break; case 458: /* windowdefn_list ::= windowdefn */ { yygotominor.yy555 = new ParserWindowDefList(); yygotominor.yy555->append(yymsp[0].minor.yy74); } break; case 459: /* windowdefn_list ::= windowdefn_list COMMA windowdefn */ { yymsp[-2].minor.yy555->append(yymsp[0].minor.yy74); yygotominor.yy555 = yymsp[-2].minor.yy555; DONT_INHERIT_TOKENS("windowdefn_list"); } break; case 460: /* windowdefn ::= nm AS LP window RP */ { yygotominor.yy74 = new SqliteWindowDefinition(*(yymsp[-4].minor.yy255), yymsp[-1].minor.yy14); delete yymsp[-4].minor.yy255; objectForTokens = yygotominor.yy74; } break; case 461: /* window ::= PARTITION BY nexprlist orderby_opt frame_opt */ { yygotominor.yy14 = new SqliteWindowDefinition::Window(); yygotominor.yy14->initPartitionBy(QString(), *(yymsp[-2].minor.yy567), *(yymsp[-1].minor.yy499), yymsp[0].minor.yy585); delete yymsp[-2].minor.yy567; delete yymsp[-1].minor.yy499; objectForTokens = yygotominor.yy14; } break; case 462: /* window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */ { yygotominor.yy14 = new SqliteWindowDefinition::Window(); yygotominor.yy14->initPartitionBy(*(yymsp[-5].minor.yy255), *(yymsp[-2].minor.yy567), *(yymsp[-1].minor.yy499), yymsp[0].minor.yy585); delete yymsp[-2].minor.yy567; delete yymsp[-5].minor.yy255; delete yymsp[-1].minor.yy499; objectForTokens = yygotominor.yy14; } break; case 463: /* window ::= ORDER BY sortlist frame_opt */ { yygotominor.yy14 = new SqliteWindowDefinition::Window(); yygotominor.yy14->initOrderBy(QString(), *(yymsp[-1].minor.yy499), yymsp[0].minor.yy585); delete yymsp[-1].minor.yy499; objectForTokens = yygotominor.yy14; } break; case 464: /* window ::= nm ORDER BY sortlist frame_opt */ { yygotominor.yy14 = new SqliteWindowDefinition::Window(); yygotominor.yy14->initOrderBy(*(yymsp[-4].minor.yy255), *(yymsp[-1].minor.yy499), yymsp[0].minor.yy585); delete yymsp[-1].minor.yy499; delete yymsp[-4].minor.yy255; objectForTokens = yygotominor.yy14; } break; case 465: /* window ::= frame_opt */ { yygotominor.yy14 = new SqliteWindowDefinition::Window(); yygotominor.yy14->init(QString(), yymsp[0].minor.yy585); objectForTokens = yygotominor.yy14; } break; case 466: /* window ::= nm frame_opt */ { yygotominor.yy14 = new SqliteWindowDefinition::Window(); yygotominor.yy14->init(QString(), yymsp[0].minor.yy585); delete yymsp[-1].minor.yy255; objectForTokens = yygotominor.yy14; } break; case 467: /* frame_opt ::= */ {yygotominor.yy585 = nullptr;} break; case 468: /* frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */ { yygotominor.yy585 = new SqliteWindowDefinition::Window::Frame(*(yymsp[-2].minor.yy34), yymsp[-1].minor.yy394, nullptr, *(yymsp[0].minor.yy337)); delete yymsp[-2].minor.yy34; delete yymsp[0].minor.yy337; objectForTokens = yygotominor.yy585; } break; case 469: /* frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */ { yygotominor.yy585 = new SqliteWindowDefinition::Window::Frame(*(yymsp[-5].minor.yy34), yymsp[-3].minor.yy394, yymsp[-1].minor.yy394, *(yymsp[0].minor.yy337)); delete yymsp[-5].minor.yy34; delete yymsp[0].minor.yy337; objectForTokens = yygotominor.yy585; } break; case 470: /* range_or_rows ::= RANGE|ROWS|GROUPS */ { yygotominor.yy34 = new SqliteWindowDefinition::Window::Frame::RangeOrRows( SqliteWindowDefinition::Window::Frame::toRangeOrRows(yymsp[0].minor.yy0->value) ); } break; case 471: /* frame_bound_s ::= frame_bound */ case 473: /* frame_bound_e ::= frame_bound */ yytestcase(yyruleno==473); { yygotominor.yy394 = yymsp[0].minor.yy394; objectForTokens = yygotominor.yy394; } break; case 472: /* frame_bound_s ::= UNBOUNDED PRECEDING */ case 474: /* frame_bound_e ::= UNBOUNDED FOLLOWING */ yytestcase(yyruleno==474); case 476: /* frame_bound ::= CURRENT ROW */ yytestcase(yyruleno==476); { yygotominor.yy394 = new SqliteWindowDefinition::Window::Frame::Bound(nullptr, yymsp[-1].minor.yy0->value + " " + yymsp[0].minor.yy0->value); objectForTokens = yygotominor.yy394; } break; case 475: /* frame_bound ::= expr PRECEDING|FOLLOWING */ { yygotominor.yy394 = new SqliteWindowDefinition::Window::Frame::Bound(yymsp[-1].minor.yy176, yymsp[0].minor.yy0->value); objectForTokens = yygotominor.yy394; } break; case 477: /* frame_exclude_opt ::= */ { yygotominor.yy337 = new SqliteWindowDefinition::Window::Frame::Exclude( SqliteWindowDefinition::Window::Frame::Exclude::null ); } break; case 478: /* frame_exclude_opt ::= EXCLUDE frame_exclude */ { yygotominor.yy337 = yymsp[0].minor.yy337; } break; case 479: /* frame_exclude ::= NO OTHERS */ { yygotominor.yy337 = new SqliteWindowDefinition::Window::Frame::Exclude( SqliteWindowDefinition::Window::Frame::Exclude::NO_OTHERS ); } break; case 480: /* frame_exclude ::= CURRENT ROW */ { yygotominor.yy337 = new SqliteWindowDefinition::Window::Frame::Exclude( SqliteWindowDefinition::Window::Frame::Exclude::CURRENT_ROW ); } break; case 481: /* frame_exclude ::= GROUP */ { yygotominor.yy337 = new SqliteWindowDefinition::Window::Frame::Exclude( SqliteWindowDefinition::Window::Frame::Exclude::GROUP ); } break; case 482: /* frame_exclude ::= TIES */ { yygotominor.yy337 = new SqliteWindowDefinition::Window::Frame::Exclude( SqliteWindowDefinition::Window::Frame::Exclude::TIES ); } break; case 483: /* window_clause ::= WINDOW windowdefn_list */ { yygotominor.yy555 = yymsp[0].minor.yy555; } break; case 484: /* filter_over ::= filter_clause over_clause */ { yygotominor.yy487 = new SqliteFilterOver(yymsp[-1].minor.yy269, yymsp[0].minor.yy231); objectForTokens = yygotominor.yy487; } break; case 485: /* filter_over ::= over_clause */ { yygotominor.yy487 = new SqliteFilterOver(nullptr, yymsp[0].minor.yy231); objectForTokens = yygotominor.yy487; } break; case 486: /* filter_over ::= filter_clause */ { yygotominor.yy487 = new SqliteFilterOver(yymsp[0].minor.yy269, nullptr); objectForTokens = yygotominor.yy487; } break; case 487: /* over_clause ::= OVER LP window RP */ { yygotominor.yy231 = new SqliteFilterOver::Over(yymsp[-1].minor.yy14); objectForTokens = yygotominor.yy231; } break; case 488: /* over_clause ::= OVER nm */ { yygotominor.yy231 = new SqliteFilterOver::Over(*(yymsp[0].minor.yy255)); delete yymsp[0].minor.yy255; objectForTokens = yygotominor.yy231; } break; case 489: /* filter_clause ::= FILTER LP WHERE expr RP */ { yygotominor.yy269 = new SqliteFilterOver::Filter(yymsp[-1].minor.yy176); objectForTokens = yygotominor.yy269; } break; default: /* (0) input ::= cmdlist */ yytestcase(yyruleno==0); break; }; } assert( yyruleno>=0 && yyruleno<(int)(sizeof(yyRuleInfo)/sizeof(yyRuleInfo[0])) ); yygoto = yyRuleInfo[yyruleno].lhs; yysize = yyRuleInfo[yyruleno].nrhs; // Store tokens for the rule in parser context QList allTokens; QList allTokensWithAllInherited; QString keyForTokensMap; int tokensMapKeyCnt; if (parserContext->setupTokens) { if (objectForTokens) { // In case this is a list with recurrent references we need // to clear tokens before adding the new and extended list. objectForTokens->tokens.clear(); } QList tokens; for (int i = yypParser->yyidx - yysize + 1; i <= yypParser->yyidx; i++) { tokens.clear(); const char* fieldName = yyTokenName[yypParser->yystack[i].major]; // Adding token being subject of this reduction. It's usually not includes in the inherited tokens, // although if inheriting from simple statements, like "FAIL" or "ROLLBACK", this tends to be redundant with the inherited tokens. // That's why we're checking if it's not contained in the inherited tokens and add it only then. if (parserContext->isManagedToken(yypParser->yystack[i].minor.yy0) && !yypParser->yystack[i].tokens->contains(yypParser->yystack[i].minor.yy0)) tokens += yypParser->yystack[i].minor.yy0; tokens += *(yypParser->yystack[i].tokens); if (!noTokenInheritanceFields.contains(fieldName)) { if (objectForTokens) { keyForTokensMap = fieldName; tokensMapKeyCnt = 2; while (objectForTokens->tokensMap.contains(keyForTokensMap)) keyForTokensMap = fieldName + QString::number(tokensMapKeyCnt++); objectForTokens->tokensMap[keyForTokensMap] = parserContext->getTokenPtrList(tokens); } allTokens += tokens; } else { // If field is mentioned only once, then only one occurance of it will be ignored. // Second one should be inherited. See "anylist" definition for explanation why. noTokenInheritanceFields.removeOne(fieldName); } allTokensWithAllInherited += tokens; } if (objectForTokens) { objectForTokens->tokens += parserContext->getTokenPtrList(allTokens); } } // Clear token lists for (int i = yypParser->yyidx - yysize + 1; i <= yypParser->yyidx; i++) { delete yypParser->yystack[i].tokens; yypParser->yystack[i].tokens = nullptr; } yypParser->yyidx -= yysize; yyact = yy_find_reduce_action(yymsp[-yysize].stateno,(YYCODETYPE)yygoto); if( yyact < YYNSTATE ){ #ifdef NDEBUG /* If we are not debugging and the reduce action popped at least ** one element off the stack, then we can push the new element back ** onto the stack here, and skip the stack overflow test in yy_shift(). ** That gives a significant speed improvement. */ if( yysize ){ yypParser->yyidx++; yymsp -= yysize-1; yymsp->stateno = (YYACTIONTYPE)yyact; yymsp->major = (YYCODETYPE)yygoto; yymsp->minor = yygotominor; if (parserContext->setupTokens) *(yypParser->yystack[yypParser->yyidx].tokens) = allTokens; }else #endif { yy_shift(yypParser,yyact,yygoto,&yygotominor); if (parserContext->setupTokens && yypParser->yyidx >= 0) { QList* tokensPtr = yypParser->yystack[yypParser->yyidx].tokens; *tokensPtr = allTokensWithAllInherited + *tokensPtr; } } }else{ assert( yyact == YYNSTATE + YYNRULE + 1 ); yy_accept(yypParser); } } /* ** The following code executes when the parse fails */ #ifndef YYNOERRORRECOVERY static void yy_parse_failed( yyParser *yypParser /* The parser */ ){ sqlite3_parseARG_FETCH; #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt); } #endif while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser); /* Here code is inserted which will be executed whenever the ** parser fails */ sqlite3_parseARG_STORE; /* Suppress warning about unused %extra_argument variable */ } #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 */ YYMINORTYPE yyminor /* The minor type of the error token */ ){ sqlite3_parseARG_FETCH; #define TOKEN (yyminor.yy0) UNUSED_PARAMETER(yymajor); parserContext->error(TOKEN, QObject::tr("Syntax error")); //qDebug() << "near " << TOKEN->toString() << ": syntax error"; sqlite3_parseARG_STORE; /* Suppress warning about unused %extra_argument variable */ } /* ** The following is executed when the parser accepts */ static void yy_accept( yyParser *yypParser /* The parser */ ){ sqlite3_parseARG_FETCH; #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt); } #endif while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser); /* Here code is inserted which will be executed whenever the ** parser accepts */ sqlite3_parseARG_STORE; /* Suppress warning about unused %extra_argument variable */ } /* The main parser program. ** The first argument is a pointer to a structure obtained from ** "sqlite3_parseAlloc" 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 sqlite3_parse( void *yyp, /* The parser */ int yymajor, /* The major token code number */ sqlite3_parseTOKENTYPE yyminor /* The value for the token */ sqlite3_parseARG_PDECL /* Optional %extra_argument parameter */ ){ YYMINORTYPE yyminorunion; int 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; /* The parser */ /* (re)initialize the parser, if necessary */ yypParser = (yyParser*)yyp; if( yypParser->yyidx<0 ){ #if YYSTACKDEPTH<=0 if( yypParser->yystksz <=0 ){ /*memset(&yyminorunion, 0, sizeof(yyminorunion));*/ yyminorunion = yyzerominor; yyStackOverflow(yypParser, &yyminorunion); return; } #endif yypParser->yyidx = 0; yypParser->yyerrcnt = -1; yypParser->yystack[0].stateno = 0; yypParser->yystack[0].major = 0; yypParser->yystack[0].tokens = new QList(); } yyminorunion.yy0 = yyminor; #if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY) yyendofinput = (yymajor==0); #endif sqlite3_parseARG_STORE; #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE,"%sInput %s [%s] (lemon type: %s)\n", yyTracePrompt, yyminor->value.toLatin1().data(), yyminor->typeString().toLatin1().data(), yyTokenName[yymajor]); } #endif do{ yyact = yy_find_shift_action(yypParser,(YYCODETYPE)yymajor); if( yyactyyerrcnt--; yymajor = YYNOCODE; }else if( yyact < YYNSTATE + YYNRULE ){ yy_reduce(yypParser,yyact-YYNSTATE); }else{ assert( yyact == YY_ERROR_ACTION ); #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,yyminorunion); } yymx = yypParser->yystack[yypParser->yyidx].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->yyidx >= 0 && yymx != YYERRORSYMBOL && (yyact = yy_find_reduce_action( yypParser->yystack[yypParser->yyidx].stateno, YYERRORSYMBOL)) >= YYNSTATE ){ yy_pop_parser_stack(yypParser); } if( yypParser->yyidx < 0 || yymajor==0 ){ yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); yy_parse_failed(yypParser); yymajor = YYNOCODE; }else if( yymx!=YYERRORSYMBOL ){ YYMINORTYPE u2; u2.YYERRSYMDT = 0; yy_shift(yypParser,yyact,YYERRORSYMBOL,&u2); } } yypParser->yyerrcnt = 1; // not 3 valid tokens, but 1 yyerrorhit = 1; #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,yyminorunion); yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); yymajor = YYNOCODE; #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,yyminorunion); } yypParser->yyerrcnt = 1; // not 3 valid tokens, but 1 yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); if( yyendofinput ){ yy_parse_failed(yypParser); } yymajor = YYNOCODE; #endif } }while( yymajor!=YYNOCODE && yypParser->yyidx>=0 ); return; } int sqlite3ParserFallback(int iToken) { return yyFallback[iToken]; }