3427 lines
118 KiB
C
3427 lines
118 KiB
C
/* Driver template for the LEMON parser generator.
|
|
** The author disclaims copyright to this source code.
|
|
*/
|
|
/* First off, code is include which follows the "include" declaration
|
|
** in the input file. */
|
|
#include <stdio.h>
|
|
#line 56 "parse.y"
|
|
|
|
#include "sqliteInt.h"
|
|
#include "parse.h"
|
|
|
|
/*
|
|
** An instance of this structure holds information about the
|
|
** LIMIT clause of a SELECT statement.
|
|
*/
|
|
struct LimitVal {
|
|
Expr *pLimit; /* The LIMIT expression. NULL if there is no limit */
|
|
Expr *pOffset; /* The OFFSET expression. NULL if there is none */
|
|
};
|
|
|
|
/*
|
|
** An instance of this structure is used to store the LIKE,
|
|
** GLOB, NOT LIKE, and NOT GLOB operators.
|
|
*/
|
|
struct LikeOp {
|
|
Token eOperator; /* "like" or "glob" or "regexp" */
|
|
int not; /* True if the NOT keyword is present */
|
|
};
|
|
|
|
/*
|
|
** An instance of the following structure describes the event of a
|
|
** TRIGGER. "a" is the event type, one of TK_UPDATE, TK_INSERT,
|
|
** TK_DELETE, or TK_INSTEAD. If the event is of the form
|
|
**
|
|
** UPDATE ON (a,b,c)
|
|
**
|
|
** Then the "b" IdList records the list "a,b,c".
|
|
*/
|
|
struct TrigEvent { int a; IdList * b; };
|
|
|
|
/*
|
|
** An instance of this structure holds the ATTACH key and the key type.
|
|
*/
|
|
struct AttachKey { int type; Token key; };
|
|
|
|
#line 48 "parse.c"
|
|
/* 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.
|
|
** sqlite3ParserTOKENTYPE 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 sqlite3ParserTOKENTYPE. The entry in the union
|
|
** for base tokens is called "yy0".
|
|
** YYSTACKDEPTH is the maximum depth of the parser's stack.
|
|
** sqlite3ParserARG_SDECL A static variable declaration for the %extra_argument
|
|
** sqlite3ParserARG_PDECL A parameter declaration for the %extra_argument
|
|
** sqlite3ParserARG_STORE Code to store %extra_argument into yypParser
|
|
** sqlite3ParserARG_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 char
|
|
#define YYNOCODE 248
|
|
#define YYACTIONTYPE unsigned short int
|
|
#define YYWILDCARD 60
|
|
#define sqlite3ParserTOKENTYPE Token
|
|
typedef union {
|
|
sqlite3ParserTOKENTYPE yy0;
|
|
int yy46;
|
|
struct LikeOp yy72;
|
|
Expr* yy172;
|
|
ExprList* yy174;
|
|
Select* yy219;
|
|
struct LimitVal yy234;
|
|
TriggerStep* yy243;
|
|
struct TrigEvent yy370;
|
|
SrcList* yy373;
|
|
Expr * yy386;
|
|
struct {int value; int mask;} yy405;
|
|
Token yy410;
|
|
IdList* yy432;
|
|
int yy495;
|
|
} YYMINORTYPE;
|
|
#define YYSTACKDEPTH 100
|
|
#define sqlite3ParserARG_SDECL Parse *pParse;
|
|
#define sqlite3ParserARG_PDECL ,Parse *pParse
|
|
#define sqlite3ParserARG_FETCH Parse *pParse = yypParser->pParse
|
|
#define sqlite3ParserARG_STORE yypParser->pParse = pParse
|
|
#define YYNSTATE 586
|
|
#define YYNRULE 310
|
|
#define YYERRORSYMBOL 139
|
|
#define YYERRSYMDT yy495
|
|
#define YYFALLBACK 1
|
|
#define YY_NO_ACTION (YYNSTATE+YYNRULE+2)
|
|
#define YY_ACCEPT_ACTION (YYNSTATE+YYNRULE+1)
|
|
#define YY_ERROR_ACTION (YYNSTATE+YYNRULE)
|
|
|
|
/* Next are that 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.
|
|
*/
|
|
static const YYACTIONTYPE yy_action[] = {
|
|
/* 0 */ 290, 897, 128, 585, 237, 172, 2, 478, 89, 89,
|
|
/* 10 */ 89, 89, 302, 75, 75, 75, 75, 71, 71, 85,
|
|
/* 20 */ 85, 85, 60, 417, 418, 302, 456, 443, 67, 75,
|
|
/* 30 */ 75, 75, 75, 71, 71, 85, 85, 85, 60, 286,
|
|
/* 40 */ 324, 458, 463, 464, 171, 80, 83, 313, 435, 433,
|
|
/* 50 */ 442, 442, 91, 91, 89, 89, 89, 89, 422, 75,
|
|
/* 60 */ 75, 75, 75, 71, 71, 85, 85, 85, 60, 290,
|
|
/* 70 */ 479, 477, 478, 57, 491, 78, 75, 75, 75, 75,
|
|
/* 80 */ 71, 71, 85, 85, 85, 60, 181, 114, 243, 327,
|
|
/* 90 */ 244, 330, 182, 248, 424, 456, 443, 279, 423, 90,
|
|
/* 100 */ 253, 243, 327, 244, 330, 182, 248, 485, 485, 485,
|
|
/* 110 */ 363, 283, 290, 253, 80, 83, 313, 435, 433, 442,
|
|
/* 120 */ 442, 91, 91, 89, 89, 89, 89, 336, 75, 75,
|
|
/* 130 */ 75, 75, 71, 71, 85, 85, 85, 60, 456, 443,
|
|
/* 140 */ 71, 71, 85, 85, 85, 60, 172, 448, 478, 499,
|
|
/* 150 */ 49, 580, 887, 427, 887, 290, 573, 80, 83, 313,
|
|
/* 160 */ 435, 433, 442, 442, 91, 91, 89, 89, 89, 89,
|
|
/* 170 */ 177, 75, 75, 75, 75, 71, 71, 85, 85, 85,
|
|
/* 180 */ 60, 456, 443, 159, 565, 447, 352, 359, 364, 386,
|
|
/* 190 */ 235, 339, 575, 1, 72, 79, 64, 565, 369, 388,
|
|
/* 200 */ 80, 83, 313, 435, 433, 442, 442, 91, 91, 89,
|
|
/* 210 */ 89, 89, 89, 478, 75, 75, 75, 75, 71, 71,
|
|
/* 220 */ 85, 85, 85, 60, 462, 527, 568, 290, 92, 438,
|
|
/* 230 */ 242, 486, 565, 545, 22, 458, 341, 275, 276, 565,
|
|
/* 240 */ 466, 217, 462, 577, 315, 148, 582, 210, 258, 564,
|
|
/* 250 */ 561, 392, 22, 456, 443, 147, 145, 146, 393, 431,
|
|
/* 260 */ 533, 195, 564, 561, 479, 463, 346, 171, 491, 822,
|
|
/* 270 */ 55, 59, 80, 83, 313, 435, 433, 442, 442, 91,
|
|
/* 280 */ 91, 89, 89, 89, 89, 557, 75, 75, 75, 75,
|
|
/* 290 */ 71, 71, 85, 85, 85, 60, 290, 564, 561, 308,
|
|
/* 300 */ 490, 485, 485, 485, 564, 561, 159, 223, 565, 352,
|
|
/* 310 */ 359, 364, 336, 159, 336, 548, 352, 359, 364, 221,
|
|
/* 320 */ 151, 369, 456, 443, 413, 316, 576, 422, 369, 580,
|
|
/* 330 */ 888, 206, 888, 197, 499, 47, 499, 23, 191, 583,
|
|
/* 340 */ 232, 80, 83, 313, 435, 433, 442, 442, 91, 91,
|
|
/* 350 */ 89, 89, 89, 89, 498, 75, 75, 75, 75, 71,
|
|
/* 360 */ 71, 85, 85, 85, 60, 290, 457, 498, 529, 255,
|
|
/* 370 */ 575, 207, 498, 564, 561, 512, 529, 312, 54, 229,
|
|
/* 380 */ 528, 224, 510, 65, 336, 76, 153, 581, 528, 400,
|
|
/* 390 */ 2, 456, 443, 526, 571, 531, 287, 328, 274, 6,
|
|
/* 400 */ 410, 526, 437, 375, 133, 530, 499, 49, 290, 236,
|
|
/* 410 */ 80, 83, 313, 435, 433, 442, 442, 91, 91, 89,
|
|
/* 420 */ 89, 89, 89, 317, 75, 75, 75, 75, 71, 71,
|
|
/* 430 */ 85, 85, 85, 60, 456, 443, 58, 234, 133, 269,
|
|
/* 440 */ 85, 85, 85, 60, 164, 238, 65, 228, 76, 153,
|
|
/* 450 */ 320, 178, 149, 80, 83, 313, 435, 433, 442, 442,
|
|
/* 460 */ 91, 91, 89, 89, 89, 89, 544, 75, 75, 75,
|
|
/* 470 */ 75, 71, 71, 85, 85, 85, 60, 290, 498, 414,
|
|
/* 480 */ 543, 502, 56, 336, 9, 336, 210, 336, 565, 515,
|
|
/* 490 */ 162, 149, 565, 336, 378, 354, 265, 455, 454, 344,
|
|
/* 500 */ 318, 155, 219, 456, 443, 499, 47, 499, 24, 499,
|
|
/* 510 */ 47, 343, 473, 471, 513, 499, 26, 115, 239, 451,
|
|
/* 520 */ 444, 184, 80, 83, 313, 435, 433, 442, 442, 91,
|
|
/* 530 */ 91, 89, 89, 89, 89, 498, 75, 75, 75, 75,
|
|
/* 540 */ 71, 71, 85, 85, 85, 60, 290, 452, 296, 421,
|
|
/* 550 */ 483, 109, 384, 564, 561, 565, 336, 564, 561, 351,
|
|
/* 560 */ 400, 336, 489, 336, 400, 336, 360, 336, 429, 429,
|
|
/* 570 */ 158, 20, 456, 443, 211, 478, 184, 292, 499, 47,
|
|
/* 580 */ 293, 236, 253, 499, 48, 499, 41, 499, 48, 499,
|
|
/* 590 */ 100, 80, 83, 313, 435, 433, 442, 442, 91, 91,
|
|
/* 600 */ 89, 89, 89, 89, 498, 75, 75, 75, 75, 71,
|
|
/* 610 */ 71, 85, 85, 85, 60, 290, 558, 555, 554, 520,
|
|
/* 620 */ 564, 561, 500, 300, 473, 471, 586, 577, 315, 345,
|
|
/* 630 */ 295, 336, 292, 401, 304, 441, 360, 230, 429, 429,
|
|
/* 640 */ 478, 456, 443, 65, 396, 76, 153, 462, 434, 360,
|
|
/* 650 */ 314, 429, 429, 499, 30, 362, 566, 22, 290, 355,
|
|
/* 660 */ 80, 83, 313, 435, 433, 442, 442, 91, 91, 89,
|
|
/* 670 */ 89, 89, 89, 336, 75, 75, 75, 75, 71, 71,
|
|
/* 680 */ 85, 85, 85, 60, 456, 443, 211, 476, 65, 21,
|
|
/* 690 */ 76, 153, 405, 398, 524, 499, 27, 537, 537, 537,
|
|
/* 700 */ 404, 290, 399, 80, 83, 313, 435, 433, 442, 442,
|
|
/* 710 */ 91, 91, 89, 89, 89, 89, 336, 75, 75, 75,
|
|
/* 720 */ 75, 71, 71, 85, 85, 85, 60, 456, 443, 419,
|
|
/* 730 */ 366, 419, 204, 299, 310, 298, 119, 537, 499, 97,
|
|
/* 740 */ 537, 185, 192, 186, 290, 406, 80, 82, 313, 435,
|
|
/* 750 */ 433, 442, 442, 91, 91, 89, 89, 89, 89, 336,
|
|
/* 760 */ 75, 75, 75, 75, 71, 71, 85, 85, 85, 60,
|
|
/* 770 */ 456, 443, 305, 468, 468, 301, 225, 225, 225, 519,
|
|
/* 780 */ 518, 499, 39, 360, 142, 429, 429, 290, 157, 376,
|
|
/* 790 */ 83, 313, 435, 433, 442, 442, 91, 91, 89, 89,
|
|
/* 800 */ 89, 89, 336, 75, 75, 75, 75, 71, 71, 85,
|
|
/* 810 */ 85, 85, 60, 456, 443, 373, 225, 133, 469, 225,
|
|
/* 820 */ 195, 240, 498, 408, 499, 44, 348, 523, 264, 57,
|
|
/* 830 */ 133, 183, 193, 201, 313, 435, 433, 442, 442, 91,
|
|
/* 840 */ 91, 89, 89, 89, 89, 336, 75, 75, 75, 75,
|
|
/* 850 */ 71, 71, 85, 85, 85, 60, 88, 367, 532, 4,
|
|
/* 860 */ 336, 325, 336, 306, 180, 498, 504, 499, 25, 336,
|
|
/* 870 */ 506, 340, 88, 367, 336, 4, 534, 535, 331, 306,
|
|
/* 880 */ 439, 210, 499, 98, 499, 16, 271, 340, 374, 347,
|
|
/* 890 */ 152, 499, 35, 249, 326, 336, 499, 32, 498, 458,
|
|
/* 900 */ 336, 19, 336, 139, 374, 504, 563, 559, 336, 506,
|
|
/* 910 */ 187, 336, 537, 574, 289, 458, 408, 499, 50, 84,
|
|
/* 920 */ 86, 347, 499, 42, 499, 31, 620, 88, 333, 334,
|
|
/* 930 */ 499, 29, 491, 499, 51, 84, 86, 461, 211, 569,
|
|
/* 940 */ 336, 365, 349, 88, 333, 334, 88, 367, 491, 4,
|
|
/* 950 */ 336, 210, 336, 306, 336, 218, 542, 336, 236, 236,
|
|
/* 960 */ 18, 340, 499, 43, 515, 485, 485, 485, 484, 481,
|
|
/* 970 */ 14, 236, 499, 36, 499, 28, 499, 94, 374, 499,
|
|
/* 980 */ 53, 485, 485, 485, 484, 481, 14, 205, 356, 458,
|
|
/* 990 */ 179, 233, 336, 472, 236, 273, 268, 261, 99, 503,
|
|
/* 1000 */ 245, 336, 493, 336, 200, 336, 236, 336, 236, 84,
|
|
/* 1010 */ 86, 166, 497, 241, 499, 111, 439, 88, 333, 334,
|
|
/* 1020 */ 254, 336, 491, 499, 113, 499, 110, 499, 112, 499,
|
|
/* 1030 */ 34, 336, 188, 379, 447, 267, 439, 236, 498, 190,
|
|
/* 1040 */ 336, 422, 170, 499, 45, 336, 478, 227, 336, 329,
|
|
/* 1050 */ 560, 336, 133, 499, 52, 485, 485, 485, 484, 481,
|
|
/* 1060 */ 14, 259, 499, 33, 445, 536, 336, 499, 96, 578,
|
|
/* 1070 */ 499, 46, 336, 499, 38, 420, 336, 303, 492, 336,
|
|
/* 1080 */ 262, 342, 539, 536, 465, 332, 220, 276, 499, 93,
|
|
/* 1090 */ 402, 291, 12, 514, 499, 40, 210, 294, 499, 10,
|
|
/* 1100 */ 272, 499, 37, 499, 3, 466, 217, 549, 501, 579,
|
|
/* 1110 */ 12, 478, 278, 247, 357, 246, 281, 517, 277, 337,
|
|
/* 1120 */ 321, 144, 470, 390, 487, 524, 389, 562, 372, 488,
|
|
/* 1130 */ 440, 540, 460, 196, 467, 117, 380, 307, 323, 126,
|
|
/* 1140 */ 521, 397, 383, 194, 522, 231, 209, 74, 368, 412,
|
|
/* 1150 */ 226, 214, 199, 61, 388, 215, 387, 189, 216, 335,
|
|
/* 1160 */ 212, 134, 409, 309, 106, 285, 135, 125, 547, 210,
|
|
/* 1170 */ 496, 138, 68, 541, 509, 121, 260, 55, 507, 250,
|
|
/* 1180 */ 385, 288, 251, 87, 252, 381, 62, 266, 505, 173,
|
|
/* 1190 */ 415, 120, 8, 513, 358, 322, 175, 550, 516, 73,
|
|
/* 1200 */ 361, 263, 69, 428, 425, 432, 570, 508, 482, 551,
|
|
/* 1210 */ 495, 567, 280, 131, 552, 123, 174, 203, 553, 446,
|
|
/* 1220 */ 449, 5, 556, 12, 338, 391, 382, 213, 394, 17,
|
|
/* 1230 */ 7, 377, 102, 101, 141, 95, 118, 403, 221, 127,
|
|
/* 1240 */ 311, 202, 222, 407, 150, 156, 176, 371, 411, 257,
|
|
/* 1250 */ 108, 416, 480, 370, 297, 475, 195, 140, 453, 395,
|
|
/* 1260 */ 137, 66, 256, 122, 430, 426, 107, 168, 105, 284,
|
|
/* 1270 */ 270, 129, 104, 353, 436, 60, 584, 450, 136, 572,
|
|
/* 1280 */ 350, 81, 143, 77, 282, 459, 198, 161, 13, 103,
|
|
/* 1290 */ 319, 474, 154, 546, 169, 525, 167, 160, 116, 63,
|
|
/* 1300 */ 163, 538, 15, 208, 494, 165, 132, 124, 622, 70,
|
|
/* 1310 */ 621, 511, 130, 559, 11,
|
|
};
|
|
static const YYCODETYPE yy_lookahead[] = {
|
|
/* 0 */ 16, 140, 141, 142, 148, 21, 145, 23, 70, 71,
|
|
/* 10 */ 72, 73, 16, 75, 76, 77, 78, 79, 80, 81,
|
|
/* 20 */ 82, 83, 84, 51, 52, 16, 42, 43, 74, 75,
|
|
/* 30 */ 76, 77, 78, 79, 80, 81, 82, 83, 84, 159,
|
|
/* 40 */ 148, 59, 162, 163, 164, 61, 62, 63, 64, 65,
|
|
/* 50 */ 66, 67, 68, 69, 70, 71, 72, 73, 162, 75,
|
|
/* 60 */ 76, 77, 78, 79, 80, 81, 82, 83, 84, 16,
|
|
/* 70 */ 88, 20, 88, 22, 92, 22, 75, 76, 77, 78,
|
|
/* 80 */ 79, 80, 81, 82, 83, 84, 90, 91, 92, 93,
|
|
/* 90 */ 94, 95, 96, 97, 25, 42, 43, 201, 29, 46,
|
|
/* 100 */ 104, 92, 93, 94, 95, 96, 97, 125, 126, 127,
|
|
/* 110 */ 41, 148, 16, 104, 61, 62, 63, 64, 65, 66,
|
|
/* 120 */ 67, 68, 69, 70, 71, 72, 73, 148, 75, 76,
|
|
/* 130 */ 77, 78, 79, 80, 81, 82, 83, 84, 42, 43,
|
|
/* 140 */ 79, 80, 81, 82, 83, 84, 21, 11, 23, 170,
|
|
/* 150 */ 171, 19, 20, 18, 22, 16, 179, 61, 62, 63,
|
|
/* 160 */ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
|
|
/* 170 */ 22, 75, 76, 77, 78, 79, 80, 81, 82, 83,
|
|
/* 180 */ 84, 42, 43, 90, 23, 49, 93, 94, 95, 210,
|
|
/* 190 */ 211, 56, 60, 19, 131, 19, 133, 23, 105, 23,
|
|
/* 200 */ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
|
|
/* 210 */ 71, 72, 73, 88, 75, 76, 77, 78, 79, 80,
|
|
/* 220 */ 81, 82, 83, 84, 148, 148, 30, 16, 132, 94,
|
|
/* 230 */ 191, 20, 23, 157, 158, 59, 100, 101, 102, 23,
|
|
/* 240 */ 79, 80, 148, 1, 2, 22, 50, 111, 154, 88,
|
|
/* 250 */ 89, 157, 158, 42, 43, 79, 80, 181, 182, 20,
|
|
/* 260 */ 99, 22, 88, 89, 88, 162, 163, 164, 92, 134,
|
|
/* 270 */ 122, 132, 61, 62, 63, 64, 65, 66, 67, 68,
|
|
/* 280 */ 69, 70, 71, 72, 73, 179, 75, 76, 77, 78,
|
|
/* 290 */ 79, 80, 81, 82, 83, 84, 16, 88, 89, 103,
|
|
/* 300 */ 20, 125, 126, 127, 88, 89, 90, 92, 23, 93,
|
|
/* 310 */ 94, 95, 148, 90, 148, 148, 93, 94, 95, 104,
|
|
/* 320 */ 156, 105, 42, 43, 115, 143, 144, 162, 105, 19,
|
|
/* 330 */ 20, 149, 22, 156, 170, 171, 170, 171, 156, 179,
|
|
/* 340 */ 14, 61, 62, 63, 64, 65, 66, 67, 68, 69,
|
|
/* 350 */ 70, 71, 72, 73, 190, 75, 76, 77, 78, 79,
|
|
/* 360 */ 80, 81, 82, 83, 84, 16, 201, 190, 12, 20,
|
|
/* 370 */ 60, 193, 190, 88, 89, 27, 12, 213, 200, 53,
|
|
/* 380 */ 24, 55, 34, 218, 148, 220, 221, 142, 24, 225,
|
|
/* 390 */ 145, 42, 43, 37, 20, 39, 22, 215, 14, 192,
|
|
/* 400 */ 115, 37, 20, 39, 22, 49, 170, 171, 16, 148,
|
|
/* 410 */ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
|
|
/* 420 */ 71, 72, 73, 241, 75, 76, 77, 78, 79, 80,
|
|
/* 430 */ 81, 82, 83, 84, 42, 43, 44, 53, 22, 55,
|
|
/* 440 */ 81, 82, 83, 84, 156, 148, 218, 211, 220, 221,
|
|
/* 450 */ 189, 202, 203, 61, 62, 63, 64, 65, 66, 67,
|
|
/* 460 */ 68, 69, 70, 71, 72, 73, 238, 75, 76, 77,
|
|
/* 470 */ 78, 79, 80, 81, 82, 83, 84, 16, 190, 20,
|
|
/* 480 */ 168, 169, 21, 148, 19, 148, 111, 148, 23, 177,
|
|
/* 490 */ 202, 203, 23, 148, 16, 207, 146, 42, 43, 124,
|
|
/* 500 */ 239, 156, 148, 42, 43, 170, 171, 170, 171, 170,
|
|
/* 510 */ 171, 165, 166, 167, 98, 170, 171, 148, 134, 64,
|
|
/* 520 */ 65, 43, 61, 62, 63, 64, 65, 66, 67, 68,
|
|
/* 530 */ 69, 70, 71, 72, 73, 190, 75, 76, 77, 78,
|
|
/* 540 */ 79, 80, 81, 82, 83, 84, 16, 92, 213, 20,
|
|
/* 550 */ 81, 21, 213, 88, 89, 23, 148, 88, 89, 16,
|
|
/* 560 */ 225, 148, 20, 148, 225, 148, 107, 148, 109, 110,
|
|
/* 570 */ 156, 19, 42, 43, 228, 23, 43, 99, 170, 171,
|
|
/* 580 */ 151, 148, 104, 170, 171, 170, 171, 170, 171, 170,
|
|
/* 590 */ 171, 61, 62, 63, 64, 65, 66, 67, 68, 69,
|
|
/* 600 */ 70, 71, 72, 73, 190, 75, 76, 77, 78, 79,
|
|
/* 610 */ 80, 81, 82, 83, 84, 16, 7, 8, 9, 20,
|
|
/* 620 */ 88, 89, 189, 165, 166, 167, 0, 1, 2, 215,
|
|
/* 630 */ 217, 148, 99, 225, 217, 92, 107, 222, 109, 110,
|
|
/* 640 */ 88, 42, 43, 218, 219, 220, 221, 148, 148, 107,
|
|
/* 650 */ 236, 109, 110, 170, 171, 226, 157, 158, 16, 230,
|
|
/* 660 */ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
|
|
/* 670 */ 71, 72, 73, 148, 75, 76, 77, 78, 79, 80,
|
|
/* 680 */ 81, 82, 83, 84, 42, 43, 228, 20, 218, 22,
|
|
/* 690 */ 220, 221, 22, 177, 178, 170, 171, 148, 148, 148,
|
|
/* 700 */ 184, 16, 148, 61, 62, 63, 64, 65, 66, 67,
|
|
/* 710 */ 68, 69, 70, 71, 72, 73, 148, 75, 76, 77,
|
|
/* 720 */ 78, 79, 80, 81, 82, 83, 84, 42, 43, 100,
|
|
/* 730 */ 101, 102, 183, 183, 183, 242, 243, 148, 170, 171,
|
|
/* 740 */ 148, 100, 101, 102, 16, 204, 61, 62, 63, 64,
|
|
/* 750 */ 65, 66, 67, 68, 69, 70, 71, 72, 73, 148,
|
|
/* 760 */ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
|
|
/* 770 */ 42, 43, 183, 125, 126, 183, 227, 227, 227, 7,
|
|
/* 780 */ 8, 170, 171, 107, 114, 109, 110, 16, 156, 233,
|
|
/* 790 */ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
|
|
/* 800 */ 72, 73, 148, 75, 76, 77, 78, 79, 80, 81,
|
|
/* 810 */ 82, 83, 84, 42, 43, 20, 227, 22, 20, 227,
|
|
/* 820 */ 22, 148, 190, 22, 170, 171, 148, 20, 20, 22,
|
|
/* 830 */ 22, 156, 19, 232, 63, 64, 65, 66, 67, 68,
|
|
/* 840 */ 69, 70, 71, 72, 73, 148, 75, 76, 77, 78,
|
|
/* 850 */ 79, 80, 81, 82, 83, 84, 16, 17, 148, 19,
|
|
/* 860 */ 148, 91, 148, 23, 156, 190, 108, 170, 171, 148,
|
|
/* 870 */ 112, 31, 16, 17, 148, 19, 166, 167, 81, 23,
|
|
/* 880 */ 148, 111, 170, 171, 170, 171, 148, 31, 48, 148,
|
|
/* 890 */ 89, 170, 171, 148, 124, 148, 170, 171, 190, 59,
|
|
/* 900 */ 148, 19, 148, 21, 48, 108, 91, 92, 148, 112,
|
|
/* 910 */ 19, 148, 148, 244, 245, 59, 115, 170, 171, 79,
|
|
/* 920 */ 80, 148, 170, 171, 170, 171, 113, 87, 88, 89,
|
|
/* 930 */ 170, 171, 92, 170, 171, 79, 80, 81, 228, 148,
|
|
/* 940 */ 148, 209, 148, 87, 88, 89, 16, 17, 92, 19,
|
|
/* 950 */ 148, 111, 148, 23, 148, 214, 169, 148, 148, 148,
|
|
/* 960 */ 69, 31, 170, 171, 177, 125, 126, 127, 128, 129,
|
|
/* 970 */ 130, 148, 170, 171, 170, 171, 170, 171, 48, 170,
|
|
/* 980 */ 171, 125, 126, 127, 128, 129, 130, 214, 174, 59,
|
|
/* 990 */ 5, 227, 148, 161, 148, 10, 11, 12, 13, 189,
|
|
/* 1000 */ 189, 148, 170, 148, 156, 148, 148, 148, 148, 79,
|
|
/* 1010 */ 80, 26, 189, 28, 170, 171, 148, 87, 88, 89,
|
|
/* 1020 */ 35, 148, 92, 170, 171, 170, 171, 170, 171, 170,
|
|
/* 1030 */ 171, 148, 47, 148, 49, 189, 148, 148, 190, 54,
|
|
/* 1040 */ 148, 162, 57, 170, 171, 148, 23, 189, 148, 189,
|
|
/* 1050 */ 20, 148, 22, 170, 171, 125, 126, 127, 128, 129,
|
|
/* 1060 */ 130, 148, 170, 171, 186, 187, 148, 170, 171, 20,
|
|
/* 1070 */ 170, 171, 148, 170, 171, 148, 148, 209, 189, 148,
|
|
/* 1080 */ 201, 148, 186, 187, 162, 100, 101, 102, 170, 171,
|
|
/* 1090 */ 20, 106, 22, 195, 170, 171, 111, 209, 170, 171,
|
|
/* 1100 */ 148, 170, 171, 170, 171, 79, 80, 150, 20, 60,
|
|
/* 1110 */ 22, 88, 148, 194, 148, 173, 148, 173, 148, 148,
|
|
/* 1120 */ 135, 192, 229, 173, 148, 178, 173, 148, 224, 148,
|
|
/* 1130 */ 148, 173, 195, 113, 229, 61, 153, 40, 99, 185,
|
|
/* 1140 */ 180, 153, 15, 152, 172, 97, 212, 131, 38, 235,
|
|
/* 1150 */ 234, 212, 152, 131, 23, 223, 161, 152, 212, 15,
|
|
/* 1160 */ 212, 188, 153, 153, 19, 175, 188, 19, 33, 111,
|
|
/* 1170 */ 190, 216, 237, 172, 172, 216, 172, 122, 161, 195,
|
|
/* 1180 */ 119, 175, 196, 120, 197, 117, 237, 198, 180, 152,
|
|
/* 1190 */ 172, 153, 22, 98, 153, 155, 6, 147, 174, 99,
|
|
/* 1200 */ 116, 205, 121, 206, 172, 172, 147, 195, 195, 147,
|
|
/* 1210 */ 199, 138, 205, 188, 147, 188, 185, 153, 153, 185,
|
|
/* 1220 */ 206, 118, 153, 22, 153, 153, 16, 176, 17, 231,
|
|
/* 1230 */ 118, 187, 240, 176, 21, 160, 243, 20, 104, 99,
|
|
/* 1240 */ 246, 22, 148, 20, 148, 19, 96, 148, 11, 148,
|
|
/* 1250 */ 19, 115, 170, 44, 36, 170, 22, 19, 182, 182,
|
|
/* 1260 */ 45, 19, 134, 19, 108, 45, 19, 99, 19, 5,
|
|
/* 1270 */ 20, 20, 19, 44, 92, 84, 4, 1, 103, 1,
|
|
/* 1280 */ 3, 69, 19, 69, 137, 20, 123, 136, 19, 14,
|
|
/* 1290 */ 58, 20, 113, 20, 114, 124, 14, 116, 32, 19,
|
|
/* 1300 */ 113, 20, 19, 44, 17, 113, 123, 103, 113, 19,
|
|
/* 1310 */ 113, 20, 114, 247, 22,
|
|
};
|
|
#define YY_SHIFT_USE_DFLT (-63)
|
|
#define YY_SHIFT_MAX 386
|
|
static const short yy_shift_ofst[] = {
|
|
/* 0 */ 242, 840, 985, -16, 840, 930, 930, 930, 216, 1058,
|
|
/* 10 */ 392, 930, 930, 930, 930, 930, -46, 136, 161, 532,
|
|
/* 20 */ 1026, 1026, 1023, 53, 599, 349, 280, 96, 139, 211,
|
|
/* 30 */ 461, 530, 642, 642, 642, 685, 642, 642, 642, 642,
|
|
/* 40 */ 642, 642, 642, 642, 642, 642, 642, 642, 642, 642,
|
|
/* 50 */ 642, 728, 771, 771, 856, 930, 930, 930, 930, 930,
|
|
/* 60 */ 930, 930, 930, 930, 930, 930, 930, 930, 930, 930,
|
|
/* 70 */ 930, 930, 930, 930, 930, 930, 930, 930, 930, 930,
|
|
/* 80 */ 930, 930, 930, 930, 930, 930, 930, 930, 930, 930,
|
|
/* 90 */ 930, 930, 930, -62, -62, -4, 1, 1, 61, 135,
|
|
/* 100 */ 359, 478, 532, 532, 532, 532, 532, 532, 532, 1023,
|
|
/* 110 */ 1191, -63, -63, -63, 176, 9, 356, 356, 310, 132,
|
|
/* 120 */ 125, 770, 532, 532, 532, 532, 532, 532, 626, 125,
|
|
/* 130 */ 532, 532, 532, 532, 532, 532, 532, 532, 375, 1058,
|
|
/* 140 */ 1058, 1058, -63, -63, -63, -18, 223, -18, 93, 465,
|
|
/* 150 */ 209, 529, 285, 174, 469, 542, 364, 459, 676, 532,
|
|
/* 160 */ 532, 532, 801, 532, 676, 532, 532, 532, 532, 532,
|
|
/* 170 */ 532, 552, 532, 532, 532, 532, 532, 532, 801, 609,
|
|
/* 180 */ 676, 532, 532, 676, 532, 196, 196, 532, 532, 532,
|
|
/* 190 */ 532, 676, 196, 797, 532, 532, 532, 676, 532, 532,
|
|
/* 200 */ 676, 629, 532, 69, 416, 148, 882, 670, 348, 348,
|
|
/* 210 */ 758, 648, 348, 533, 348, 63, 348, 648, 148, 1020,
|
|
/* 220 */ 1074, 1097, 1020, 1039, 1127, 1048, 1016, 1110, 1048, 1127,
|
|
/* 230 */ 1022, 1131, 1127, 1048, 1144, 1048, 1020, 1020, 1145, 1144,
|
|
/* 240 */ 1148, 1135, 1058, 1039, 1039, 1148, 1039, 1055, 1131, 1145,
|
|
/* 250 */ 1061, 1063, 1068, 1097, 1135, 1039, 1127, 1020, 1170, 1020,
|
|
/* 260 */ 1095, 1190, 1100, 1084, 1039, 1190, 1081, 1055, 1190, 1144,
|
|
/* 270 */ 1039, 1020, 1020, 1190, 1144, 1074, 1074, 1020, 1055, 1100,
|
|
/* 280 */ 1084, 1020, 1073, 1020, -63, -63, -63, -63, -63, -63,
|
|
/* 290 */ 455, 384, 641, 326, 239, 51, 1088, -28, 374, 382,
|
|
/* 300 */ 667, 795, 215, 798, 807, 808, 813, 772, 815, 891,
|
|
/* 310 */ 1030, 1049, 1070, 543, 1276, 1277, 1278, 1263, 1147, 1151,
|
|
/* 320 */ 1232, 1275, 1273, 1266, 1281, 1171, 1283, 1259, 1183, 1204,
|
|
/* 330 */ 1290, 1291, 1198, 1197, 1195, 1287, 1192, 1187, 1181, 1282,
|
|
/* 340 */ 1280, 1180, 1179, 1271, 1269, 1163, 1265, 1214, 1212, 1175,
|
|
/* 350 */ 1272, 1182, 1229, 1253, 1251, 1264, 1250, 1249, 1168, 1247,
|
|
/* 360 */ 1156, 1244, 1128, 1220, 1242, 1234, 1215, 1238, 1218, 1209,
|
|
/* 370 */ 1231, 1136, 1237, 1150, 1226, 1223, 1140, 1219, 1134, 1217,
|
|
/* 380 */ 1213, 1112, 1211, 1210, 1201, 1103, 1292,
|
|
};
|
|
#define YY_REDUCE_USE_DFLT (-145)
|
|
#define YY_REDUCE_MAX 289
|
|
static const short yy_reduce_ofst[] = {
|
|
/* 0 */ -139, 164, 182, 165, 345, 339, 335, -21, 76, 288,
|
|
/* 10 */ 228, 236, 408, 413, 415, 417, 425, 414, 710, 94,
|
|
/* 20 */ 458, 346, -120, 470, 470, 470, 470, 470, 470, 470,
|
|
/* 30 */ 470, 470, 470, 470, 470, 470, 470, 470, 470, 470,
|
|
/* 40 */ 470, 470, 470, 470, 470, 470, 470, 470, 470, 470,
|
|
/* 50 */ 470, 470, 470, 470, 933, 931, 928, 903, 892, 859,
|
|
/* 60 */ 853, 804, 792, 754, 747, 714, 697, 568, 483, 166,
|
|
/* 70 */ 337, 419, 525, 611, 654, 712, 721, 726, 752, 760,
|
|
/* 80 */ 763, 802, 806, 809, 844, 855, 857, 873, 883, 897,
|
|
/* 90 */ 900, 918, 924, 470, 470, 312, 470, 470, 470, 429,
|
|
/* 100 */ 470, 516, 499, 261, 549, 550, 551, 589, 592, 103,
|
|
/* 110 */ 470, 470, 470, 470, 832, 787, 896, 878, 669, 669,
|
|
/* 120 */ 879, 848, 888, 889, 773, 868, 860, 858, 245, -104,
|
|
/* 130 */ 846, 823, 811, 764, 810, 433, 741, 732, 708, 675,
|
|
/* 140 */ 632, 177, 249, 493, 178, 1085, 1077, 1082, 1076, 1101,
|
|
/* 150 */ 1099, 39, 1096, 1094, 971, 39, 1044, 39, 39, 982,
|
|
/* 160 */ 981, 979, 541, 976, 39, 971, 970, 968, 966, 964,
|
|
/* 170 */ 952, 922, 927, 913, 794, 791, 745, 678, 541, 350,
|
|
/* 180 */ 39, 369, 297, 39, 167, 106, -23, -108, -144, -37,
|
|
/* 190 */ 77, 39, 160, 207, 354, 500, 554, 39, 673, 738,
|
|
/* 200 */ 39, 556, 885, 601, 814, 898, 957, 919, 942, 944,
|
|
/* 210 */ 929, 893, 950, 947, 953, 904, 958, 905, 937, 983,
|
|
/* 220 */ 954, 960, 988, 972, 991, 934, 914, 916, 939, 1000,
|
|
/* 230 */ 932, 995, 1005, 946, 973, 948, 1009, 1010, 990, 978,
|
|
/* 240 */ 955, 935, 980, 1001, 1002, 959, 1004, 984, 1017, 1006,
|
|
/* 250 */ 986, 987, 989, 1008, 949, 1018, 1037, 1038, 1040, 1041,
|
|
/* 260 */ 1024, 1050, 996, 997, 1032, 1059, 1011, 1012, 1062, 1025,
|
|
/* 270 */ 1033, 1064, 1065, 1067, 1027, 1031, 1034, 1069, 1013, 1007,
|
|
/* 280 */ 1014, 1071, 992, 1072, 998, 1051, 1075, 993, 1057, 994,
|
|
};
|
|
static const YYACTIONTYPE yy_default[] = {
|
|
/* 0 */ 592, 819, 896, 707, 896, 819, 819, 896, 896, 711,
|
|
/* 10 */ 870, 896, 819, 896, 815, 896, 790, 896, 841, 896,
|
|
/* 20 */ 841, 841, 623, 742, 896, 896, 896, 896, 896, 896,
|
|
/* 30 */ 896, 896, 750, 871, 811, 896, 749, 747, 756, 723,
|
|
/* 40 */ 810, 814, 744, 874, 855, 740, 743, 818, 757, 731,
|
|
/* 50 */ 812, 778, 796, 777, 896, 896, 896, 896, 896, 896,
|
|
/* 60 */ 896, 896, 896, 896, 896, 896, 896, 896, 896, 896,
|
|
/* 70 */ 896, 896, 896, 896, 896, 896, 896, 896, 896, 896,
|
|
/* 80 */ 896, 896, 896, 896, 896, 896, 896, 896, 896, 896,
|
|
/* 90 */ 896, 896, 896, 780, 801, 616, 779, 789, 781, 611,
|
|
/* 100 */ 782, 676, 896, 896, 896, 896, 896, 896, 896, 896,
|
|
/* 110 */ 783, 798, 797, 784, 896, 896, 896, 896, 896, 896,
|
|
/* 120 */ 707, 896, 896, 896, 896, 896, 896, 896, 592, 707,
|
|
/* 130 */ 896, 896, 896, 896, 896, 896, 896, 896, 896, 896,
|
|
/* 140 */ 896, 896, 711, 889, 701, 896, 667, 896, 896, 896,
|
|
/* 150 */ 896, 896, 896, 896, 896, 896, 896, 896, 862, 896,
|
|
/* 160 */ 896, 896, 715, 896, 714, 896, 877, 896, 896, 896,
|
|
/* 170 */ 875, 625, 896, 896, 896, 597, 896, 896, 709, 599,
|
|
/* 180 */ 860, 896, 896, 613, 896, 896, 896, 896, 896, 896,
|
|
/* 190 */ 829, 690, 896, 699, 896, 896, 896, 688, 896, 896,
|
|
/* 200 */ 752, 896, 896, 847, 649, 746, 896, 708, 734, 734,
|
|
/* 210 */ 699, 896, 734, 646, 734, 813, 734, 896, 746, 716,
|
|
/* 220 */ 680, 663, 716, 678, 608, 735, 854, 851, 735, 608,
|
|
/* 230 */ 896, 896, 608, 735, 687, 735, 716, 716, 823, 687,
|
|
/* 240 */ 758, 873, 896, 678, 678, 758, 678, 746, 896, 823,
|
|
/* 250 */ 737, 739, 727, 663, 873, 678, 608, 716, 666, 716,
|
|
/* 260 */ 649, 596, 724, 726, 678, 596, 741, 746, 596, 687,
|
|
/* 270 */ 678, 716, 716, 596, 687, 680, 680, 716, 746, 724,
|
|
/* 280 */ 726, 716, 882, 716, 857, 651, 633, 889, 651, 894,
|
|
/* 290 */ 896, 896, 896, 896, 896, 896, 896, 896, 896, 896,
|
|
/* 300 */ 896, 896, 896, 896, 896, 896, 765, 896, 896, 836,
|
|
/* 310 */ 896, 896, 896, 896, 896, 593, 896, 884, 896, 896,
|
|
/* 320 */ 881, 896, 896, 896, 896, 896, 896, 896, 896, 896,
|
|
/* 330 */ 896, 896, 896, 770, 766, 896, 896, 767, 896, 896,
|
|
/* 340 */ 896, 896, 896, 896, 896, 896, 896, 896, 896, 896,
|
|
/* 350 */ 896, 896, 896, 896, 896, 896, 896, 896, 896, 896,
|
|
/* 360 */ 693, 896, 896, 896, 896, 850, 849, 896, 896, 896,
|
|
/* 370 */ 896, 896, 896, 896, 896, 896, 896, 896, 896, 896,
|
|
/* 380 */ 896, 896, 896, 896, 738, 896, 728, 736, 618, 729,
|
|
/* 390 */ 730, 607, 615, 670, 609, 669, 791, 807, 677, 717,
|
|
/* 400 */ 817, 816, 804, 864, 675, 700, 710, 863, 719, 718,
|
|
/* 410 */ 720, 809, 843, 721, 808, 674, 722, 852, 853, 848,
|
|
/* 420 */ 705, 806, 706, 844, 845, 673, 846, 610, 712, 695,
|
|
/* 430 */ 694, 725, 672, 802, 760, 799, 795, 820, 821, 761,
|
|
/* 440 */ 671, 793, 792, 787, 803, 681, 754, 755, 842, 713,
|
|
/* 450 */ 856, 800, 794, 668, 788, 786, 785, 702, 776, 773,
|
|
/* 460 */ 858, 703, 617, 628, 624, 629, 840, 838, 839, 759,
|
|
/* 470 */ 837, 631, 640, 630, 627, 639, 626, 859, 619, 770,
|
|
/* 480 */ 638, 772, 861, 704, 771, 769, 637, 768, 886, 805,
|
|
/* 490 */ 763, 764, 685, 636, 686, 696, 692, 689, 691, 762,
|
|
/* 500 */ 828, 774, 635, 868, 698, 662, 697, 648, 745, 644,
|
|
/* 510 */ 733, 775, 732, 650, 748, 647, 643, 826, 665, 664,
|
|
/* 520 */ 645, 661, 642, 751, 652, 753, 867, 830, 866, 865,
|
|
/* 530 */ 684, 683, 831, 832, 833, 834, 682, 827, 835, 679,
|
|
/* 540 */ 825, 641, 634, 632, 869, 614, 612, 872, 653, 606,
|
|
/* 550 */ 605, 604, 603, 876, 602, 601, 878, 654, 600, 657,
|
|
/* 560 */ 824, 622, 879, 658, 621, 620, 880, 883, 659, 598,
|
|
/* 570 */ 595, 885, 591, 656, 890, 891, 589, 590, 892, 895,
|
|
/* 580 */ 893, 587, 660, 655, 594, 588,
|
|
};
|
|
#define YY_SZ_ACTTAB (int)(sizeof(yy_action)/sizeof(yy_action[0]))
|
|
|
|
/* The next table maps tokens into fallback tokens. If a construct
|
|
** like the following:
|
|
**
|
|
** %fallback ID X Y Z.
|
|
**
|
|
** appears in the grammer, 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, /* SEMI => nothing */
|
|
23, /* EXPLAIN => ID */
|
|
23, /* QUERY => ID */
|
|
23, /* PLAN => ID */
|
|
23, /* BEGIN => ID */
|
|
0, /* TRANSACTION => nothing */
|
|
23, /* DEFERRED => ID */
|
|
23, /* IMMEDIATE => ID */
|
|
23, /* EXCLUSIVE => ID */
|
|
0, /* COMMIT => nothing */
|
|
23, /* END => ID */
|
|
0, /* ROLLBACK => nothing */
|
|
0, /* CREATE => nothing */
|
|
0, /* TABLE => nothing */
|
|
23, /* IF => ID */
|
|
0, /* NOT => nothing */
|
|
0, /* EXISTS => nothing */
|
|
23, /* TEMP => ID */
|
|
0, /* LP => nothing */
|
|
0, /* RP => nothing */
|
|
0, /* AS => nothing */
|
|
0, /* COMMA => nothing */
|
|
0, /* ID => nothing */
|
|
23, /* ABORT => ID */
|
|
23, /* AFTER => ID */
|
|
23, /* ANALYZE => ID */
|
|
23, /* ASC => ID */
|
|
23, /* ATTACH => ID */
|
|
23, /* BEFORE => ID */
|
|
23, /* CASCADE => ID */
|
|
23, /* CAST => ID */
|
|
23, /* CONFLICT => ID */
|
|
23, /* DATABASE => ID */
|
|
23, /* DESC => ID */
|
|
23, /* DETACH => ID */
|
|
23, /* EACH => ID */
|
|
23, /* FAIL => ID */
|
|
23, /* FOR => ID */
|
|
23, /* IGNORE => ID */
|
|
23, /* INITIALLY => ID */
|
|
23, /* INSTEAD => ID */
|
|
23, /* LIKE_KW => ID */
|
|
23, /* MATCH => ID */
|
|
23, /* KEY => ID */
|
|
23, /* OF => ID */
|
|
23, /* OFFSET => ID */
|
|
23, /* PRAGMA => ID */
|
|
23, /* RAISE => ID */
|
|
23, /* REPLACE => ID */
|
|
23, /* RESTRICT => ID */
|
|
23, /* ROW => ID */
|
|
23, /* STATEMENT => ID */
|
|
23, /* TRIGGER => ID */
|
|
23, /* VACUUM => ID */
|
|
23, /* VIEW => ID */
|
|
23, /* VIRTUAL => ID */
|
|
23, /* REINDEX => ID */
|
|
23, /* RENAME => ID */
|
|
23, /* CTIME_KW => ID */
|
|
0, /* ANY => nothing */
|
|
0, /* OR => nothing */
|
|
0, /* AND => nothing */
|
|
0, /* IS => nothing */
|
|
0, /* BETWEEN => nothing */
|
|
0, /* IN => nothing */
|
|
0, /* ISNULL => nothing */
|
|
0, /* NOTNULL => nothing */
|
|
0, /* NE => nothing */
|
|
0, /* EQ => nothing */
|
|
0, /* GT => nothing */
|
|
0, /* LE => nothing */
|
|
0, /* LT => nothing */
|
|
0, /* GE => nothing */
|
|
0, /* ESCAPE => nothing */
|
|
0, /* BITAND => nothing */
|
|
0, /* BITOR => nothing */
|
|
0, /* LSHIFT => nothing */
|
|
0, /* RSHIFT => nothing */
|
|
0, /* PLUS => nothing */
|
|
0, /* MINUS => nothing */
|
|
0, /* STAR => nothing */
|
|
0, /* SLASH => nothing */
|
|
0, /* REM => nothing */
|
|
0, /* CONCAT => nothing */
|
|
0, /* UMINUS => nothing */
|
|
0, /* UPLUS => nothing */
|
|
0, /* BITNOT => nothing */
|
|
0, /* STRING => nothing */
|
|
0, /* JOIN_KW => nothing */
|
|
0, /* CONSTRAINT => nothing */
|
|
0, /* DEFAULT => nothing */
|
|
0, /* NULL => nothing */
|
|
0, /* PRIMARY => nothing */
|
|
0, /* UNIQUE => nothing */
|
|
0, /* CHECK => nothing */
|
|
0, /* REFERENCES => nothing */
|
|
0, /* COLLATE => nothing */
|
|
0, /* AUTOINCR => nothing */
|
|
0, /* ON => nothing */
|
|
0, /* DELETE => nothing */
|
|
0, /* UPDATE => nothing */
|
|
0, /* INSERT => nothing */
|
|
0, /* SET => nothing */
|
|
0, /* DEFERRABLE => nothing */
|
|
0, /* FOREIGN => nothing */
|
|
0, /* DROP => nothing */
|
|
0, /* UNION => nothing */
|
|
0, /* ALL => nothing */
|
|
0, /* EXCEPT => nothing */
|
|
0, /* INTERSECT => nothing */
|
|
0, /* SELECT => nothing */
|
|
0, /* DISTINCT => nothing */
|
|
0, /* DOT => nothing */
|
|
0, /* FROM => nothing */
|
|
0, /* JOIN => nothing */
|
|
0, /* USING => nothing */
|
|
0, /* ORDER => nothing */
|
|
0, /* BY => nothing */
|
|
0, /* GROUP => nothing */
|
|
0, /* HAVING => nothing */
|
|
0, /* LIMIT => nothing */
|
|
0, /* WHERE => nothing */
|
|
0, /* INTO => nothing */
|
|
0, /* VALUES => nothing */
|
|
0, /* INTEGER => nothing */
|
|
0, /* FLOAT => nothing */
|
|
0, /* BLOB => nothing */
|
|
0, /* REGISTER => nothing */
|
|
0, /* VARIABLE => nothing */
|
|
0, /* CASE => nothing */
|
|
0, /* WHEN => nothing */
|
|
0, /* THEN => nothing */
|
|
0, /* ELSE => nothing */
|
|
0, /* INDEX => nothing */
|
|
0, /* ALTER => nothing */
|
|
0, /* TO => nothing */
|
|
0, /* ADD => nothing */
|
|
0, /* COLUMNKW => nothing */
|
|
};
|
|
#endif /* YYFALLBACK */
|
|
|
|
/* The following structure represents a single element of the
|
|
** parser's stack. Information stored includes:
|
|
**
|
|
** + The state number for the parser at this level of the stack.
|
|
**
|
|
** + The value of the token stored at this level of the stack.
|
|
** (In other words, the "major" token.)
|
|
**
|
|
** + The semantic value stored at this level of the stack. This is
|
|
** the information used by the action routines in the grammar.
|
|
** It is sometimes called the "minor" token.
|
|
*/
|
|
struct yyStackEntry {
|
|
int stateno; /* The state-number */
|
|
int major; /* The major token value. This is the code
|
|
** number for the token at this stack level */
|
|
YYMINORTYPE minor; /* The user-supplied minor token value. This
|
|
** is the value of the token */
|
|
};
|
|
typedef struct yyStackEntry yyStackEntry;
|
|
|
|
/* The state of the parser is completely contained in an instance of
|
|
** the following structure */
|
|
struct yyParser {
|
|
int yyidx; /* Index of top element in stack */
|
|
int yyerrcnt; /* Shifts left before out of the error */
|
|
sqlite3ParserARG_SDECL /* A place to hold %extra_argument */
|
|
yyStackEntry yystack[YYSTACKDEPTH]; /* The parser's stack */
|
|
};
|
|
typedef struct yyParser yyParser;
|
|
|
|
#ifndef NDEBUG
|
|
#include <stdio.h>
|
|
static FILE *yyTraceFILE = 0;
|
|
static char *yyTracePrompt = 0;
|
|
#endif /* NDEBUG */
|
|
|
|
#ifndef NDEBUG
|
|
/*
|
|
** Turn parser tracing on by giving a stream to which to write the trace
|
|
** and a prompt to preface each trace message. Tracing is turned off
|
|
** by making either argument NULL
|
|
**
|
|
** Inputs:
|
|
** <ul>
|
|
** <li> A FILE* to which trace output should be written.
|
|
** If NULL, then tracing is turned off.
|
|
** <li> A prefix string written at the beginning of every
|
|
** line of trace output. If NULL, then tracing is
|
|
** turned off.
|
|
** </ul>
|
|
**
|
|
** Outputs:
|
|
** None.
|
|
*/
|
|
void sqlite3ParserTrace(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[] = {
|
|
"$", "SEMI", "EXPLAIN", "QUERY",
|
|
"PLAN", "BEGIN", "TRANSACTION", "DEFERRED",
|
|
"IMMEDIATE", "EXCLUSIVE", "COMMIT", "END",
|
|
"ROLLBACK", "CREATE", "TABLE", "IF",
|
|
"NOT", "EXISTS", "TEMP", "LP",
|
|
"RP", "AS", "COMMA", "ID",
|
|
"ABORT", "AFTER", "ANALYZE", "ASC",
|
|
"ATTACH", "BEFORE", "CASCADE", "CAST",
|
|
"CONFLICT", "DATABASE", "DESC", "DETACH",
|
|
"EACH", "FAIL", "FOR", "IGNORE",
|
|
"INITIALLY", "INSTEAD", "LIKE_KW", "MATCH",
|
|
"KEY", "OF", "OFFSET", "PRAGMA",
|
|
"RAISE", "REPLACE", "RESTRICT", "ROW",
|
|
"STATEMENT", "TRIGGER", "VACUUM", "VIEW",
|
|
"VIRTUAL", "REINDEX", "RENAME", "CTIME_KW",
|
|
"ANY", "OR", "AND", "IS",
|
|
"BETWEEN", "IN", "ISNULL", "NOTNULL",
|
|
"NE", "EQ", "GT", "LE",
|
|
"LT", "GE", "ESCAPE", "BITAND",
|
|
"BITOR", "LSHIFT", "RSHIFT", "PLUS",
|
|
"MINUS", "STAR", "SLASH", "REM",
|
|
"CONCAT", "UMINUS", "UPLUS", "BITNOT",
|
|
"STRING", "JOIN_KW", "CONSTRAINT", "DEFAULT",
|
|
"NULL", "PRIMARY", "UNIQUE", "CHECK",
|
|
"REFERENCES", "COLLATE", "AUTOINCR", "ON",
|
|
"DELETE", "UPDATE", "INSERT", "SET",
|
|
"DEFERRABLE", "FOREIGN", "DROP", "UNION",
|
|
"ALL", "EXCEPT", "INTERSECT", "SELECT",
|
|
"DISTINCT", "DOT", "FROM", "JOIN",
|
|
"USING", "ORDER", "BY", "GROUP",
|
|
"HAVING", "LIMIT", "WHERE", "INTO",
|
|
"VALUES", "INTEGER", "FLOAT", "BLOB",
|
|
"REGISTER", "VARIABLE", "CASE", "WHEN",
|
|
"THEN", "ELSE", "INDEX", "ALTER",
|
|
"TO", "ADD", "COLUMNKW", "error",
|
|
"input", "cmdlist", "ecmd", "cmdx",
|
|
"cmd", "explain", "transtype", "trans_opt",
|
|
"nm", "create_table", "create_table_args", "temp",
|
|
"ifnotexists", "dbnm", "columnlist", "conslist_opt",
|
|
"select", "column", "columnid", "type",
|
|
"carglist", "id", "ids", "typetoken",
|
|
"typename", "signed", "plus_num", "minus_num",
|
|
"carg", "ccons", "term", "expr",
|
|
"onconf", "sortorder", "autoinc", "idxlist_opt",
|
|
"refargs", "defer_subclause", "refarg", "refact",
|
|
"init_deferred_pred_opt", "conslist", "tcons", "idxlist",
|
|
"defer_subclause_opt", "orconf", "resolvetype", "raisetype",
|
|
"ifexists", "fullname", "oneselect", "multiselect_op",
|
|
"distinct", "selcollist", "from", "where_opt",
|
|
"groupby_opt", "having_opt", "orderby_opt", "limit_opt",
|
|
"sclp", "as", "seltablist", "stl_prefix",
|
|
"joinop", "on_opt", "using_opt", "seltablist_paren",
|
|
"joinop2", "inscollist", "sortlist", "sortitem",
|
|
"collate", "exprlist", "setlist", "insert_cmd",
|
|
"inscollist_opt", "itemlist", "likeop", "escape",
|
|
"between_op", "in_op", "case_operand", "case_exprlist",
|
|
"case_else", "expritem", "uniqueflag", "idxitem",
|
|
"plus_opt", "number", "trigger_decl", "trigger_cmd_list",
|
|
"trigger_time", "trigger_event", "foreach_clause", "when_clause",
|
|
"trigger_cmd", "database_kw_opt", "key_opt", "add_column_fullname",
|
|
"kwcolumn_opt", "create_vtab", "vtabarglist", "vtabarg",
|
|
"vtabargtoken", "lp", "anylist",
|
|
};
|
|
#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 */ "cmdx ::= cmd",
|
|
/* 4 */ "ecmd ::= SEMI",
|
|
/* 5 */ "ecmd ::= explain cmdx SEMI",
|
|
/* 6 */ "explain ::=",
|
|
/* 7 */ "explain ::= EXPLAIN",
|
|
/* 8 */ "explain ::= EXPLAIN QUERY PLAN",
|
|
/* 9 */ "cmd ::= BEGIN transtype trans_opt",
|
|
/* 10 */ "trans_opt ::=",
|
|
/* 11 */ "trans_opt ::= TRANSACTION",
|
|
/* 12 */ "trans_opt ::= TRANSACTION nm",
|
|
/* 13 */ "transtype ::=",
|
|
/* 14 */ "transtype ::= DEFERRED",
|
|
/* 15 */ "transtype ::= IMMEDIATE",
|
|
/* 16 */ "transtype ::= EXCLUSIVE",
|
|
/* 17 */ "cmd ::= COMMIT trans_opt",
|
|
/* 18 */ "cmd ::= END trans_opt",
|
|
/* 19 */ "cmd ::= ROLLBACK trans_opt",
|
|
/* 20 */ "cmd ::= create_table create_table_args",
|
|
/* 21 */ "create_table ::= CREATE temp TABLE ifnotexists nm dbnm",
|
|
/* 22 */ "ifnotexists ::=",
|
|
/* 23 */ "ifnotexists ::= IF NOT EXISTS",
|
|
/* 24 */ "temp ::= TEMP",
|
|
/* 25 */ "temp ::=",
|
|
/* 26 */ "create_table_args ::= LP columnlist conslist_opt RP",
|
|
/* 27 */ "create_table_args ::= AS select",
|
|
/* 28 */ "columnlist ::= columnlist COMMA column",
|
|
/* 29 */ "columnlist ::= column",
|
|
/* 30 */ "column ::= columnid type carglist",
|
|
/* 31 */ "columnid ::= nm",
|
|
/* 32 */ "id ::= ID",
|
|
/* 33 */ "ids ::= ID|STRING",
|
|
/* 34 */ "nm ::= ID",
|
|
/* 35 */ "nm ::= STRING",
|
|
/* 36 */ "nm ::= JOIN_KW",
|
|
/* 37 */ "type ::=",
|
|
/* 38 */ "type ::= typetoken",
|
|
/* 39 */ "typetoken ::= typename",
|
|
/* 40 */ "typetoken ::= typename LP signed RP",
|
|
/* 41 */ "typetoken ::= typename LP signed COMMA signed RP",
|
|
/* 42 */ "typename ::= ids",
|
|
/* 43 */ "typename ::= typename ids",
|
|
/* 44 */ "signed ::= plus_num",
|
|
/* 45 */ "signed ::= minus_num",
|
|
/* 46 */ "carglist ::= carglist carg",
|
|
/* 47 */ "carglist ::=",
|
|
/* 48 */ "carg ::= CONSTRAINT nm ccons",
|
|
/* 49 */ "carg ::= ccons",
|
|
/* 50 */ "carg ::= DEFAULT term",
|
|
/* 51 */ "carg ::= DEFAULT LP expr RP",
|
|
/* 52 */ "carg ::= DEFAULT PLUS term",
|
|
/* 53 */ "carg ::= DEFAULT MINUS term",
|
|
/* 54 */ "carg ::= DEFAULT id",
|
|
/* 55 */ "ccons ::= NULL onconf",
|
|
/* 56 */ "ccons ::= NOT NULL onconf",
|
|
/* 57 */ "ccons ::= PRIMARY KEY sortorder onconf autoinc",
|
|
/* 58 */ "ccons ::= UNIQUE onconf",
|
|
/* 59 */ "ccons ::= CHECK LP expr RP",
|
|
/* 60 */ "ccons ::= REFERENCES nm idxlist_opt refargs",
|
|
/* 61 */ "ccons ::= defer_subclause",
|
|
/* 62 */ "ccons ::= COLLATE id",
|
|
/* 63 */ "autoinc ::=",
|
|
/* 64 */ "autoinc ::= AUTOINCR",
|
|
/* 65 */ "refargs ::=",
|
|
/* 66 */ "refargs ::= refargs refarg",
|
|
/* 67 */ "refarg ::= MATCH nm",
|
|
/* 68 */ "refarg ::= ON DELETE refact",
|
|
/* 69 */ "refarg ::= ON UPDATE refact",
|
|
/* 70 */ "refarg ::= ON INSERT refact",
|
|
/* 71 */ "refact ::= SET NULL",
|
|
/* 72 */ "refact ::= SET DEFAULT",
|
|
/* 73 */ "refact ::= CASCADE",
|
|
/* 74 */ "refact ::= RESTRICT",
|
|
/* 75 */ "defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt",
|
|
/* 76 */ "defer_subclause ::= DEFERRABLE init_deferred_pred_opt",
|
|
/* 77 */ "init_deferred_pred_opt ::=",
|
|
/* 78 */ "init_deferred_pred_opt ::= INITIALLY DEFERRED",
|
|
/* 79 */ "init_deferred_pred_opt ::= INITIALLY IMMEDIATE",
|
|
/* 80 */ "conslist_opt ::=",
|
|
/* 81 */ "conslist_opt ::= COMMA conslist",
|
|
/* 82 */ "conslist ::= conslist COMMA tcons",
|
|
/* 83 */ "conslist ::= conslist tcons",
|
|
/* 84 */ "conslist ::= tcons",
|
|
/* 85 */ "tcons ::= CONSTRAINT nm",
|
|
/* 86 */ "tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf",
|
|
/* 87 */ "tcons ::= UNIQUE LP idxlist RP onconf",
|
|
/* 88 */ "tcons ::= CHECK LP expr RP onconf",
|
|
/* 89 */ "tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt",
|
|
/* 90 */ "defer_subclause_opt ::=",
|
|
/* 91 */ "defer_subclause_opt ::= defer_subclause",
|
|
/* 92 */ "onconf ::=",
|
|
/* 93 */ "onconf ::= ON CONFLICT resolvetype",
|
|
/* 94 */ "orconf ::=",
|
|
/* 95 */ "orconf ::= OR resolvetype",
|
|
/* 96 */ "resolvetype ::= raisetype",
|
|
/* 97 */ "resolvetype ::= IGNORE",
|
|
/* 98 */ "resolvetype ::= REPLACE",
|
|
/* 99 */ "cmd ::= DROP TABLE ifexists fullname",
|
|
/* 100 */ "ifexists ::= IF EXISTS",
|
|
/* 101 */ "ifexists ::=",
|
|
/* 102 */ "cmd ::= CREATE temp VIEW ifnotexists nm dbnm AS select",
|
|
/* 103 */ "cmd ::= DROP VIEW ifexists fullname",
|
|
/* 104 */ "cmd ::= select",
|
|
/* 105 */ "select ::= oneselect",
|
|
/* 106 */ "select ::= select multiselect_op oneselect",
|
|
/* 107 */ "multiselect_op ::= UNION",
|
|
/* 108 */ "multiselect_op ::= UNION ALL",
|
|
/* 109 */ "multiselect_op ::= EXCEPT|INTERSECT",
|
|
/* 110 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt",
|
|
/* 111 */ "distinct ::= DISTINCT",
|
|
/* 112 */ "distinct ::= ALL",
|
|
/* 113 */ "distinct ::=",
|
|
/* 114 */ "sclp ::= selcollist COMMA",
|
|
/* 115 */ "sclp ::=",
|
|
/* 116 */ "selcollist ::= sclp expr as",
|
|
/* 117 */ "selcollist ::= sclp STAR",
|
|
/* 118 */ "selcollist ::= sclp nm DOT STAR",
|
|
/* 119 */ "as ::= AS nm",
|
|
/* 120 */ "as ::= ids",
|
|
/* 121 */ "as ::=",
|
|
/* 122 */ "from ::=",
|
|
/* 123 */ "from ::= FROM seltablist",
|
|
/* 124 */ "stl_prefix ::= seltablist joinop",
|
|
/* 125 */ "stl_prefix ::=",
|
|
/* 126 */ "seltablist ::= stl_prefix nm dbnm as on_opt using_opt",
|
|
/* 127 */ "seltablist ::= stl_prefix LP seltablist_paren RP as on_opt using_opt",
|
|
/* 128 */ "seltablist_paren ::= select",
|
|
/* 129 */ "seltablist_paren ::= seltablist",
|
|
/* 130 */ "dbnm ::=",
|
|
/* 131 */ "dbnm ::= DOT nm",
|
|
/* 132 */ "fullname ::= nm dbnm",
|
|
/* 133 */ "joinop ::= COMMA|JOIN",
|
|
/* 134 */ "joinop ::= JOIN_KW JOIN",
|
|
/* 135 */ "joinop ::= JOIN_KW nm JOIN",
|
|
/* 136 */ "joinop ::= JOIN_KW nm nm JOIN",
|
|
/* 137 */ "on_opt ::= ON expr",
|
|
/* 138 */ "on_opt ::=",
|
|
/* 139 */ "using_opt ::= USING LP inscollist RP",
|
|
/* 140 */ "using_opt ::=",
|
|
/* 141 */ "orderby_opt ::=",
|
|
/* 142 */ "orderby_opt ::= ORDER BY sortlist",
|
|
/* 143 */ "sortlist ::= sortlist COMMA sortitem collate sortorder",
|
|
/* 144 */ "sortlist ::= sortitem collate sortorder",
|
|
/* 145 */ "sortitem ::= expr",
|
|
/* 146 */ "sortorder ::= ASC",
|
|
/* 147 */ "sortorder ::= DESC",
|
|
/* 148 */ "sortorder ::=",
|
|
/* 149 */ "collate ::=",
|
|
/* 150 */ "collate ::= COLLATE id",
|
|
/* 151 */ "groupby_opt ::=",
|
|
/* 152 */ "groupby_opt ::= GROUP BY exprlist",
|
|
/* 153 */ "having_opt ::=",
|
|
/* 154 */ "having_opt ::= HAVING expr",
|
|
/* 155 */ "limit_opt ::=",
|
|
/* 156 */ "limit_opt ::= LIMIT expr",
|
|
/* 157 */ "limit_opt ::= LIMIT expr OFFSET expr",
|
|
/* 158 */ "limit_opt ::= LIMIT expr COMMA expr",
|
|
/* 159 */ "cmd ::= DELETE FROM fullname where_opt",
|
|
/* 160 */ "where_opt ::=",
|
|
/* 161 */ "where_opt ::= WHERE expr",
|
|
/* 162 */ "cmd ::= UPDATE orconf fullname SET setlist where_opt",
|
|
/* 163 */ "setlist ::= setlist COMMA nm EQ expr",
|
|
/* 164 */ "setlist ::= nm EQ expr",
|
|
/* 165 */ "cmd ::= insert_cmd INTO fullname inscollist_opt VALUES LP itemlist RP",
|
|
/* 166 */ "cmd ::= insert_cmd INTO fullname inscollist_opt select",
|
|
/* 167 */ "cmd ::= insert_cmd INTO fullname inscollist_opt DEFAULT VALUES",
|
|
/* 168 */ "insert_cmd ::= INSERT orconf",
|
|
/* 169 */ "insert_cmd ::= REPLACE",
|
|
/* 170 */ "itemlist ::= itemlist COMMA expr",
|
|
/* 171 */ "itemlist ::= expr",
|
|
/* 172 */ "inscollist_opt ::=",
|
|
/* 173 */ "inscollist_opt ::= LP inscollist RP",
|
|
/* 174 */ "inscollist ::= inscollist COMMA nm",
|
|
/* 175 */ "inscollist ::= nm",
|
|
/* 176 */ "expr ::= term",
|
|
/* 177 */ "expr ::= LP expr RP",
|
|
/* 178 */ "term ::= NULL",
|
|
/* 179 */ "expr ::= ID",
|
|
/* 180 */ "expr ::= JOIN_KW",
|
|
/* 181 */ "expr ::= nm DOT nm",
|
|
/* 182 */ "expr ::= nm DOT nm DOT nm",
|
|
/* 183 */ "term ::= INTEGER|FLOAT|BLOB",
|
|
/* 184 */ "term ::= STRING",
|
|
/* 185 */ "expr ::= REGISTER",
|
|
/* 186 */ "expr ::= VARIABLE",
|
|
/* 187 */ "expr ::= CAST LP expr AS typetoken RP",
|
|
/* 188 */ "expr ::= ID LP distinct exprlist RP",
|
|
/* 189 */ "expr ::= ID LP STAR RP",
|
|
/* 190 */ "term ::= CTIME_KW",
|
|
/* 191 */ "expr ::= expr AND expr",
|
|
/* 192 */ "expr ::= expr OR expr",
|
|
/* 193 */ "expr ::= expr LT|GT|GE|LE expr",
|
|
/* 194 */ "expr ::= expr EQ|NE expr",
|
|
/* 195 */ "expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr",
|
|
/* 196 */ "expr ::= expr PLUS|MINUS expr",
|
|
/* 197 */ "expr ::= expr STAR|SLASH|REM expr",
|
|
/* 198 */ "expr ::= expr CONCAT expr",
|
|
/* 199 */ "likeop ::= LIKE_KW",
|
|
/* 200 */ "likeop ::= NOT LIKE_KW",
|
|
/* 201 */ "likeop ::= MATCH",
|
|
/* 202 */ "likeop ::= NOT MATCH",
|
|
/* 203 */ "escape ::= ESCAPE expr",
|
|
/* 204 */ "escape ::=",
|
|
/* 205 */ "expr ::= expr likeop expr escape",
|
|
/* 206 */ "expr ::= expr ISNULL|NOTNULL",
|
|
/* 207 */ "expr ::= expr IS NULL",
|
|
/* 208 */ "expr ::= expr NOT NULL",
|
|
/* 209 */ "expr ::= expr IS NOT NULL",
|
|
/* 210 */ "expr ::= NOT|BITNOT expr",
|
|
/* 211 */ "expr ::= MINUS expr",
|
|
/* 212 */ "expr ::= PLUS expr",
|
|
/* 213 */ "between_op ::= BETWEEN",
|
|
/* 214 */ "between_op ::= NOT BETWEEN",
|
|
/* 215 */ "expr ::= expr between_op expr AND expr",
|
|
/* 216 */ "in_op ::= IN",
|
|
/* 217 */ "in_op ::= NOT IN",
|
|
/* 218 */ "expr ::= expr in_op LP exprlist RP",
|
|
/* 219 */ "expr ::= LP select RP",
|
|
/* 220 */ "expr ::= expr in_op LP select RP",
|
|
/* 221 */ "expr ::= expr in_op nm dbnm",
|
|
/* 222 */ "expr ::= EXISTS LP select RP",
|
|
/* 223 */ "expr ::= CASE case_operand case_exprlist case_else END",
|
|
/* 224 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr",
|
|
/* 225 */ "case_exprlist ::= WHEN expr THEN expr",
|
|
/* 226 */ "case_else ::= ELSE expr",
|
|
/* 227 */ "case_else ::=",
|
|
/* 228 */ "case_operand ::= expr",
|
|
/* 229 */ "case_operand ::=",
|
|
/* 230 */ "exprlist ::= exprlist COMMA expritem",
|
|
/* 231 */ "exprlist ::= expritem",
|
|
/* 232 */ "expritem ::= expr",
|
|
/* 233 */ "expritem ::=",
|
|
/* 234 */ "cmd ::= CREATE uniqueflag INDEX ifnotexists nm dbnm ON nm LP idxlist RP",
|
|
/* 235 */ "uniqueflag ::= UNIQUE",
|
|
/* 236 */ "uniqueflag ::=",
|
|
/* 237 */ "idxlist_opt ::=",
|
|
/* 238 */ "idxlist_opt ::= LP idxlist RP",
|
|
/* 239 */ "idxlist ::= idxlist COMMA idxitem collate sortorder",
|
|
/* 240 */ "idxlist ::= idxitem collate sortorder",
|
|
/* 241 */ "idxitem ::= nm",
|
|
/* 242 */ "cmd ::= DROP INDEX ifexists fullname",
|
|
/* 243 */ "cmd ::= VACUUM",
|
|
/* 244 */ "cmd ::= VACUUM nm",
|
|
/* 245 */ "cmd ::= PRAGMA nm dbnm EQ nm",
|
|
/* 246 */ "cmd ::= PRAGMA nm dbnm EQ ON",
|
|
/* 247 */ "cmd ::= PRAGMA nm dbnm EQ plus_num",
|
|
/* 248 */ "cmd ::= PRAGMA nm dbnm EQ minus_num",
|
|
/* 249 */ "cmd ::= PRAGMA nm dbnm LP nm RP",
|
|
/* 250 */ "cmd ::= PRAGMA nm dbnm",
|
|
/* 251 */ "plus_num ::= plus_opt number",
|
|
/* 252 */ "minus_num ::= MINUS number",
|
|
/* 253 */ "number ::= INTEGER|FLOAT",
|
|
/* 254 */ "plus_opt ::= PLUS",
|
|
/* 255 */ "plus_opt ::=",
|
|
/* 256 */ "cmd ::= CREATE trigger_decl BEGIN trigger_cmd_list END",
|
|
/* 257 */ "trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause",
|
|
/* 258 */ "trigger_time ::= BEFORE",
|
|
/* 259 */ "trigger_time ::= AFTER",
|
|
/* 260 */ "trigger_time ::= INSTEAD OF",
|
|
/* 261 */ "trigger_time ::=",
|
|
/* 262 */ "trigger_event ::= DELETE|INSERT",
|
|
/* 263 */ "trigger_event ::= UPDATE",
|
|
/* 264 */ "trigger_event ::= UPDATE OF inscollist",
|
|
/* 265 */ "foreach_clause ::=",
|
|
/* 266 */ "foreach_clause ::= FOR EACH ROW",
|
|
/* 267 */ "foreach_clause ::= FOR EACH STATEMENT",
|
|
/* 268 */ "when_clause ::=",
|
|
/* 269 */ "when_clause ::= WHEN expr",
|
|
/* 270 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI",
|
|
/* 271 */ "trigger_cmd_list ::=",
|
|
/* 272 */ "trigger_cmd ::= UPDATE orconf nm SET setlist where_opt",
|
|
/* 273 */ "trigger_cmd ::= insert_cmd INTO nm inscollist_opt VALUES LP itemlist RP",
|
|
/* 274 */ "trigger_cmd ::= insert_cmd INTO nm inscollist_opt select",
|
|
/* 275 */ "trigger_cmd ::= DELETE FROM nm where_opt",
|
|
/* 276 */ "trigger_cmd ::= select",
|
|
/* 277 */ "expr ::= RAISE LP IGNORE RP",
|
|
/* 278 */ "expr ::= RAISE LP raisetype COMMA nm RP",
|
|
/* 279 */ "raisetype ::= ROLLBACK",
|
|
/* 280 */ "raisetype ::= ABORT",
|
|
/* 281 */ "raisetype ::= FAIL",
|
|
/* 282 */ "cmd ::= DROP TRIGGER ifexists fullname",
|
|
/* 283 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt",
|
|
/* 284 */ "key_opt ::=",
|
|
/* 285 */ "key_opt ::= KEY expr",
|
|
/* 286 */ "database_kw_opt ::= DATABASE",
|
|
/* 287 */ "database_kw_opt ::=",
|
|
/* 288 */ "cmd ::= DETACH database_kw_opt expr",
|
|
/* 289 */ "cmd ::= REINDEX",
|
|
/* 290 */ "cmd ::= REINDEX nm dbnm",
|
|
/* 291 */ "cmd ::= ANALYZE",
|
|
/* 292 */ "cmd ::= ANALYZE nm dbnm",
|
|
/* 293 */ "cmd ::= ALTER TABLE fullname RENAME TO nm",
|
|
/* 294 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt column",
|
|
/* 295 */ "add_column_fullname ::= fullname",
|
|
/* 296 */ "kwcolumn_opt ::=",
|
|
/* 297 */ "kwcolumn_opt ::= COLUMNKW",
|
|
/* 298 */ "cmd ::= create_vtab",
|
|
/* 299 */ "cmd ::= create_vtab LP vtabarglist RP",
|
|
/* 300 */ "create_vtab ::= CREATE VIRTUAL TABLE nm dbnm USING nm",
|
|
/* 301 */ "vtabarglist ::= vtabarg",
|
|
/* 302 */ "vtabarglist ::= vtabarglist COMMA vtabarg",
|
|
/* 303 */ "vtabarg ::=",
|
|
/* 304 */ "vtabarg ::= vtabarg vtabargtoken",
|
|
/* 305 */ "vtabargtoken ::= ANY",
|
|
/* 306 */ "vtabargtoken ::= lp anylist RP",
|
|
/* 307 */ "lp ::= LP",
|
|
/* 308 */ "anylist ::=",
|
|
/* 309 */ "anylist ::= anylist ANY",
|
|
};
|
|
#endif /* NDEBUG */
|
|
|
|
/*
|
|
** This function returns the symbolic name associated with a token
|
|
** value.
|
|
*/
|
|
const char *sqlite3ParserTokenName(int tokenType){
|
|
#ifndef NDEBUG
|
|
if( tokenType>0 && tokenType<(sizeof(yyTokenName)/sizeof(yyTokenName[0])) ){
|
|
return yyTokenName[tokenType];
|
|
}else{
|
|
return "Unknown";
|
|
}
|
|
#else
|
|
return "";
|
|
#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 sqlite3Parser and sqlite3ParserFree.
|
|
*/
|
|
void *sqlite3ParserAlloc(void *(*mallocProc)(size_t)){
|
|
yyParser *pParser;
|
|
pParser = (yyParser*)(*mallocProc)( (size_t)sizeof(yyParser) );
|
|
if( pParser ){
|
|
pParser->yyidx = -1;
|
|
}
|
|
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(YYCODETYPE yymajor, YYMINORTYPE *yypminor){
|
|
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 156:
|
|
case 190:
|
|
case 207:
|
|
#line 374 "parse.y"
|
|
{sqlite3SelectDelete((yypminor->yy219));}
|
|
#line 1249 "parse.c"
|
|
break;
|
|
case 170:
|
|
case 171:
|
|
case 195:
|
|
case 197:
|
|
case 205:
|
|
case 211:
|
|
case 219:
|
|
case 222:
|
|
case 224:
|
|
case 225:
|
|
case 235:
|
|
#line 633 "parse.y"
|
|
{sqlite3ExprDelete((yypminor->yy172));}
|
|
#line 1264 "parse.c"
|
|
break;
|
|
case 175:
|
|
case 183:
|
|
case 193:
|
|
case 196:
|
|
case 198:
|
|
case 200:
|
|
case 210:
|
|
case 213:
|
|
case 214:
|
|
case 217:
|
|
case 223:
|
|
#line 870 "parse.y"
|
|
{sqlite3ExprListDelete((yypminor->yy174));}
|
|
#line 1279 "parse.c"
|
|
break;
|
|
case 189:
|
|
case 194:
|
|
case 202:
|
|
case 203:
|
|
#line 502 "parse.y"
|
|
{sqlite3SrcListDelete((yypminor->yy373));}
|
|
#line 1287 "parse.c"
|
|
break;
|
|
case 199:
|
|
#line 563 "parse.y"
|
|
{
|
|
sqlite3ExprDelete((yypminor->yy234).pLimit);
|
|
sqlite3ExprDelete((yypminor->yy234).pOffset);
|
|
}
|
|
#line 1295 "parse.c"
|
|
break;
|
|
case 206:
|
|
case 209:
|
|
case 216:
|
|
#line 519 "parse.y"
|
|
{sqlite3IdListDelete((yypminor->yy432));}
|
|
#line 1302 "parse.c"
|
|
break;
|
|
case 231:
|
|
case 236:
|
|
#line 966 "parse.y"
|
|
{sqlite3DeleteTriggerStep((yypminor->yy243));}
|
|
#line 1308 "parse.c"
|
|
break;
|
|
case 233:
|
|
#line 950 "parse.y"
|
|
{sqlite3IdListDelete((yypminor->yy370).b);}
|
|
#line 1313 "parse.c"
|
|
break;
|
|
case 238:
|
|
#line 1034 "parse.y"
|
|
{sqlite3ExprDelete((yypminor->yy386));}
|
|
#line 1318 "parse.c"
|
|
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];
|
|
|
|
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( yymajor, &yytos->minor);
|
|
pParser->yyidx--;
|
|
return yymajor;
|
|
}
|
|
|
|
/*
|
|
** Deallocate and destroy a parser. Destructors are all called for
|
|
** all stack elements before shutting the parser down.
|
|
**
|
|
** Inputs:
|
|
** <ul>
|
|
** <li> A pointer to the parser. This should be a pointer
|
|
** obtained from sqlite3ParserAlloc.
|
|
** <li> A pointer to a function used to reclaim memory obtained
|
|
** from malloc.
|
|
** </ul>
|
|
*/
|
|
void sqlite3ParserFree(
|
|
void *p, /* The parser to be deleted */
|
|
void (*freeProc)(void*) /* Function used to reclaim memory */
|
|
){
|
|
yyParser *pParser = (yyParser*)p;
|
|
if( pParser==0 ) return;
|
|
while( pParser->yyidx>=0 ) yy_pop_parser_stack(pParser);
|
|
(*freeProc)((void*)pParser);
|
|
}
|
|
|
|
/*
|
|
** 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;
|
|
|
|
if( stateno>YY_SHIFT_MAX || (i = yy_shift_ofst[stateno])==YY_SHIFT_USE_DFLT ){
|
|
return yy_default[stateno];
|
|
}
|
|
if( iLookAhead==YYNOCODE ){
|
|
return YY_NO_ACTION;
|
|
}
|
|
i += iLookAhead;
|
|
if( i<0 || i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){
|
|
if( iLookAhead>0 ){
|
|
#ifdef YYFALLBACK
|
|
int iFallback; /* Fallback token */
|
|
if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
|
|
&& (iFallback = yyFallback[iLookAhead])!=0 ){
|
|
#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( j>=0 && j<YY_SZ_ACTTAB && yy_lookahead[j]==YYWILDCARD ){
|
|
#ifndef NDEBUG
|
|
if( yyTraceFILE ){
|
|
fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n",
|
|
yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[YYWILDCARD]);
|
|
}
|
|
#endif /* NDEBUG */
|
|
return yy_action[j];
|
|
}
|
|
}
|
|
#endif /* YYWILDCARD */
|
|
}
|
|
return yy_default[stateno];
|
|
}else{
|
|
return yy_action[i];
|
|
}
|
|
}
|
|
|
|
/*
|
|
** 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;
|
|
/* int stateno = pParser->yystack[pParser->yyidx].stateno; */
|
|
|
|
if( stateno>YY_REDUCE_MAX ||
|
|
(i = yy_reduce_ofst[stateno])==YY_REDUCE_USE_DFLT ){
|
|
return yy_default[stateno];
|
|
}
|
|
if( iLookAhead==YYNOCODE ){
|
|
return YY_NO_ACTION;
|
|
}
|
|
i += iLookAhead;
|
|
if( i<0 || i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){
|
|
return yy_default[stateno];
|
|
}else{
|
|
return yy_action[i];
|
|
}
|
|
}
|
|
|
|
/*
|
|
** 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 ot the minor token to shift in */
|
|
){
|
|
yyStackEntry *yytos;
|
|
yypParser->yyidx++;
|
|
if( yypParser->yyidx>=YYSTACKDEPTH ){
|
|
sqlite3ParserARG_FETCH;
|
|
yypParser->yyidx--;
|
|
#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 */
|
|
#line 44 "parse.y"
|
|
|
|
sqlite3ErrorMsg(pParse, "parser stack overflow");
|
|
pParse->parseError = 1;
|
|
#line 1487 "parse.c"
|
|
sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument var */
|
|
return;
|
|
}
|
|
yytos = &yypParser->yystack[yypParser->yyidx];
|
|
yytos->stateno = yyNewState;
|
|
yytos->major = yyMajor;
|
|
yytos->minor = *yypMinor;
|
|
#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[] = {
|
|
{ 140, 1 },
|
|
{ 141, 2 },
|
|
{ 141, 1 },
|
|
{ 143, 1 },
|
|
{ 142, 1 },
|
|
{ 142, 3 },
|
|
{ 145, 0 },
|
|
{ 145, 1 },
|
|
{ 145, 3 },
|
|
{ 144, 3 },
|
|
{ 147, 0 },
|
|
{ 147, 1 },
|
|
{ 147, 2 },
|
|
{ 146, 0 },
|
|
{ 146, 1 },
|
|
{ 146, 1 },
|
|
{ 146, 1 },
|
|
{ 144, 2 },
|
|
{ 144, 2 },
|
|
{ 144, 2 },
|
|
{ 144, 2 },
|
|
{ 149, 6 },
|
|
{ 152, 0 },
|
|
{ 152, 3 },
|
|
{ 151, 1 },
|
|
{ 151, 0 },
|
|
{ 150, 4 },
|
|
{ 150, 2 },
|
|
{ 154, 3 },
|
|
{ 154, 1 },
|
|
{ 157, 3 },
|
|
{ 158, 1 },
|
|
{ 161, 1 },
|
|
{ 162, 1 },
|
|
{ 148, 1 },
|
|
{ 148, 1 },
|
|
{ 148, 1 },
|
|
{ 159, 0 },
|
|
{ 159, 1 },
|
|
{ 163, 1 },
|
|
{ 163, 4 },
|
|
{ 163, 6 },
|
|
{ 164, 1 },
|
|
{ 164, 2 },
|
|
{ 165, 1 },
|
|
{ 165, 1 },
|
|
{ 160, 2 },
|
|
{ 160, 0 },
|
|
{ 168, 3 },
|
|
{ 168, 1 },
|
|
{ 168, 2 },
|
|
{ 168, 4 },
|
|
{ 168, 3 },
|
|
{ 168, 3 },
|
|
{ 168, 2 },
|
|
{ 169, 2 },
|
|
{ 169, 3 },
|
|
{ 169, 5 },
|
|
{ 169, 2 },
|
|
{ 169, 4 },
|
|
{ 169, 4 },
|
|
{ 169, 1 },
|
|
{ 169, 2 },
|
|
{ 174, 0 },
|
|
{ 174, 1 },
|
|
{ 176, 0 },
|
|
{ 176, 2 },
|
|
{ 178, 2 },
|
|
{ 178, 3 },
|
|
{ 178, 3 },
|
|
{ 178, 3 },
|
|
{ 179, 2 },
|
|
{ 179, 2 },
|
|
{ 179, 1 },
|
|
{ 179, 1 },
|
|
{ 177, 3 },
|
|
{ 177, 2 },
|
|
{ 180, 0 },
|
|
{ 180, 2 },
|
|
{ 180, 2 },
|
|
{ 155, 0 },
|
|
{ 155, 2 },
|
|
{ 181, 3 },
|
|
{ 181, 2 },
|
|
{ 181, 1 },
|
|
{ 182, 2 },
|
|
{ 182, 7 },
|
|
{ 182, 5 },
|
|
{ 182, 5 },
|
|
{ 182, 10 },
|
|
{ 184, 0 },
|
|
{ 184, 1 },
|
|
{ 172, 0 },
|
|
{ 172, 3 },
|
|
{ 185, 0 },
|
|
{ 185, 2 },
|
|
{ 186, 1 },
|
|
{ 186, 1 },
|
|
{ 186, 1 },
|
|
{ 144, 4 },
|
|
{ 188, 2 },
|
|
{ 188, 0 },
|
|
{ 144, 8 },
|
|
{ 144, 4 },
|
|
{ 144, 1 },
|
|
{ 156, 1 },
|
|
{ 156, 3 },
|
|
{ 191, 1 },
|
|
{ 191, 2 },
|
|
{ 191, 1 },
|
|
{ 190, 9 },
|
|
{ 192, 1 },
|
|
{ 192, 1 },
|
|
{ 192, 0 },
|
|
{ 200, 2 },
|
|
{ 200, 0 },
|
|
{ 193, 3 },
|
|
{ 193, 2 },
|
|
{ 193, 4 },
|
|
{ 201, 2 },
|
|
{ 201, 1 },
|
|
{ 201, 0 },
|
|
{ 194, 0 },
|
|
{ 194, 2 },
|
|
{ 203, 2 },
|
|
{ 203, 0 },
|
|
{ 202, 6 },
|
|
{ 202, 7 },
|
|
{ 207, 1 },
|
|
{ 207, 1 },
|
|
{ 153, 0 },
|
|
{ 153, 2 },
|
|
{ 189, 2 },
|
|
{ 204, 1 },
|
|
{ 204, 2 },
|
|
{ 204, 3 },
|
|
{ 204, 4 },
|
|
{ 205, 2 },
|
|
{ 205, 0 },
|
|
{ 206, 4 },
|
|
{ 206, 0 },
|
|
{ 198, 0 },
|
|
{ 198, 3 },
|
|
{ 210, 5 },
|
|
{ 210, 3 },
|
|
{ 211, 1 },
|
|
{ 173, 1 },
|
|
{ 173, 1 },
|
|
{ 173, 0 },
|
|
{ 212, 0 },
|
|
{ 212, 2 },
|
|
{ 196, 0 },
|
|
{ 196, 3 },
|
|
{ 197, 0 },
|
|
{ 197, 2 },
|
|
{ 199, 0 },
|
|
{ 199, 2 },
|
|
{ 199, 4 },
|
|
{ 199, 4 },
|
|
{ 144, 4 },
|
|
{ 195, 0 },
|
|
{ 195, 2 },
|
|
{ 144, 6 },
|
|
{ 214, 5 },
|
|
{ 214, 3 },
|
|
{ 144, 8 },
|
|
{ 144, 5 },
|
|
{ 144, 6 },
|
|
{ 215, 2 },
|
|
{ 215, 1 },
|
|
{ 217, 3 },
|
|
{ 217, 1 },
|
|
{ 216, 0 },
|
|
{ 216, 3 },
|
|
{ 209, 3 },
|
|
{ 209, 1 },
|
|
{ 171, 1 },
|
|
{ 171, 3 },
|
|
{ 170, 1 },
|
|
{ 171, 1 },
|
|
{ 171, 1 },
|
|
{ 171, 3 },
|
|
{ 171, 5 },
|
|
{ 170, 1 },
|
|
{ 170, 1 },
|
|
{ 171, 1 },
|
|
{ 171, 1 },
|
|
{ 171, 6 },
|
|
{ 171, 5 },
|
|
{ 171, 4 },
|
|
{ 170, 1 },
|
|
{ 171, 3 },
|
|
{ 171, 3 },
|
|
{ 171, 3 },
|
|
{ 171, 3 },
|
|
{ 171, 3 },
|
|
{ 171, 3 },
|
|
{ 171, 3 },
|
|
{ 171, 3 },
|
|
{ 218, 1 },
|
|
{ 218, 2 },
|
|
{ 218, 1 },
|
|
{ 218, 2 },
|
|
{ 219, 2 },
|
|
{ 219, 0 },
|
|
{ 171, 4 },
|
|
{ 171, 2 },
|
|
{ 171, 3 },
|
|
{ 171, 3 },
|
|
{ 171, 4 },
|
|
{ 171, 2 },
|
|
{ 171, 2 },
|
|
{ 171, 2 },
|
|
{ 220, 1 },
|
|
{ 220, 2 },
|
|
{ 171, 5 },
|
|
{ 221, 1 },
|
|
{ 221, 2 },
|
|
{ 171, 5 },
|
|
{ 171, 3 },
|
|
{ 171, 5 },
|
|
{ 171, 4 },
|
|
{ 171, 4 },
|
|
{ 171, 5 },
|
|
{ 223, 5 },
|
|
{ 223, 4 },
|
|
{ 224, 2 },
|
|
{ 224, 0 },
|
|
{ 222, 1 },
|
|
{ 222, 0 },
|
|
{ 213, 3 },
|
|
{ 213, 1 },
|
|
{ 225, 1 },
|
|
{ 225, 0 },
|
|
{ 144, 11 },
|
|
{ 226, 1 },
|
|
{ 226, 0 },
|
|
{ 175, 0 },
|
|
{ 175, 3 },
|
|
{ 183, 5 },
|
|
{ 183, 3 },
|
|
{ 227, 1 },
|
|
{ 144, 4 },
|
|
{ 144, 1 },
|
|
{ 144, 2 },
|
|
{ 144, 5 },
|
|
{ 144, 5 },
|
|
{ 144, 5 },
|
|
{ 144, 5 },
|
|
{ 144, 6 },
|
|
{ 144, 3 },
|
|
{ 166, 2 },
|
|
{ 167, 2 },
|
|
{ 229, 1 },
|
|
{ 228, 1 },
|
|
{ 228, 0 },
|
|
{ 144, 5 },
|
|
{ 230, 11 },
|
|
{ 232, 1 },
|
|
{ 232, 1 },
|
|
{ 232, 2 },
|
|
{ 232, 0 },
|
|
{ 233, 1 },
|
|
{ 233, 1 },
|
|
{ 233, 3 },
|
|
{ 234, 0 },
|
|
{ 234, 3 },
|
|
{ 234, 3 },
|
|
{ 235, 0 },
|
|
{ 235, 2 },
|
|
{ 231, 3 },
|
|
{ 231, 0 },
|
|
{ 236, 6 },
|
|
{ 236, 8 },
|
|
{ 236, 5 },
|
|
{ 236, 4 },
|
|
{ 236, 1 },
|
|
{ 171, 4 },
|
|
{ 171, 6 },
|
|
{ 187, 1 },
|
|
{ 187, 1 },
|
|
{ 187, 1 },
|
|
{ 144, 4 },
|
|
{ 144, 6 },
|
|
{ 238, 0 },
|
|
{ 238, 2 },
|
|
{ 237, 1 },
|
|
{ 237, 0 },
|
|
{ 144, 3 },
|
|
{ 144, 1 },
|
|
{ 144, 3 },
|
|
{ 144, 1 },
|
|
{ 144, 3 },
|
|
{ 144, 6 },
|
|
{ 144, 6 },
|
|
{ 239, 1 },
|
|
{ 240, 0 },
|
|
{ 240, 1 },
|
|
{ 144, 1 },
|
|
{ 144, 4 },
|
|
{ 241, 7 },
|
|
{ 242, 1 },
|
|
{ 242, 3 },
|
|
{ 243, 0 },
|
|
{ 243, 2 },
|
|
{ 244, 1 },
|
|
{ 244, 3 },
|
|
{ 245, 1 },
|
|
{ 246, 0 },
|
|
{ 246, 2 },
|
|
};
|
|
|
|
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 */
|
|
sqlite3ParserARG_FETCH;
|
|
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 */
|
|
|
|
#ifndef 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.
|
|
*/
|
|
memset(&yygotominor, 0, sizeof(yygotominor));
|
|
#endif
|
|
|
|
switch( yyruleno ){
|
|
/* Beginning here are the reduction cases. A typical example
|
|
** follows:
|
|
** case 0:
|
|
** #line <lineno> <grammarfile>
|
|
** { ... } // User supplied code
|
|
** #line <lineno> <thisfile>
|
|
** break;
|
|
*/
|
|
case 3:
|
|
#line 100 "parse.y"
|
|
{ sqlite3FinishCoding(pParse); }
|
|
#line 1875 "parse.c"
|
|
break;
|
|
case 6:
|
|
#line 103 "parse.y"
|
|
{ sqlite3BeginParse(pParse, 0); }
|
|
#line 1880 "parse.c"
|
|
break;
|
|
case 7:
|
|
#line 105 "parse.y"
|
|
{ sqlite3BeginParse(pParse, 1); }
|
|
#line 1885 "parse.c"
|
|
break;
|
|
case 8:
|
|
#line 106 "parse.y"
|
|
{ sqlite3BeginParse(pParse, 2); }
|
|
#line 1890 "parse.c"
|
|
break;
|
|
case 9:
|
|
#line 112 "parse.y"
|
|
{sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy46);}
|
|
#line 1895 "parse.c"
|
|
break;
|
|
case 13:
|
|
#line 117 "parse.y"
|
|
{yygotominor.yy46 = TK_DEFERRED;}
|
|
#line 1900 "parse.c"
|
|
break;
|
|
case 14:
|
|
case 15:
|
|
case 16:
|
|
case 107:
|
|
case 109:
|
|
#line 118 "parse.y"
|
|
{yygotominor.yy46 = yymsp[0].major;}
|
|
#line 1909 "parse.c"
|
|
break;
|
|
case 17:
|
|
case 18:
|
|
#line 121 "parse.y"
|
|
{sqlite3CommitTransaction(pParse);}
|
|
#line 1915 "parse.c"
|
|
break;
|
|
case 19:
|
|
#line 123 "parse.y"
|
|
{sqlite3RollbackTransaction(pParse);}
|
|
#line 1920 "parse.c"
|
|
break;
|
|
case 21:
|
|
#line 128 "parse.y"
|
|
{
|
|
sqlite3StartTable(pParse,&yymsp[-1].minor.yy410,&yymsp[0].minor.yy410,yymsp[-4].minor.yy46,0,0,yymsp[-2].minor.yy46);
|
|
}
|
|
#line 1927 "parse.c"
|
|
break;
|
|
case 22:
|
|
case 25:
|
|
case 63:
|
|
case 77:
|
|
case 79:
|
|
case 90:
|
|
case 101:
|
|
case 112:
|
|
case 113:
|
|
case 213:
|
|
case 216:
|
|
#line 132 "parse.y"
|
|
{yygotominor.yy46 = 0;}
|
|
#line 1942 "parse.c"
|
|
break;
|
|
case 23:
|
|
case 24:
|
|
case 64:
|
|
case 78:
|
|
case 100:
|
|
case 111:
|
|
case 214:
|
|
case 217:
|
|
#line 133 "parse.y"
|
|
{yygotominor.yy46 = 1;}
|
|
#line 1954 "parse.c"
|
|
break;
|
|
case 26:
|
|
#line 139 "parse.y"
|
|
{
|
|
sqlite3EndTable(pParse,&yymsp[-1].minor.yy410,&yymsp[0].minor.yy0,0);
|
|
}
|
|
#line 1961 "parse.c"
|
|
break;
|
|
case 27:
|
|
#line 142 "parse.y"
|
|
{
|
|
sqlite3EndTable(pParse,0,0,yymsp[0].minor.yy219);
|
|
sqlite3SelectDelete(yymsp[0].minor.yy219);
|
|
}
|
|
#line 1969 "parse.c"
|
|
break;
|
|
case 30:
|
|
#line 154 "parse.y"
|
|
{
|
|
yygotominor.yy410.z = yymsp[-2].minor.yy410.z;
|
|
yygotominor.yy410.n = (pParse->sLastToken.z-yymsp[-2].minor.yy410.z) + pParse->sLastToken.n;
|
|
}
|
|
#line 1977 "parse.c"
|
|
break;
|
|
case 31:
|
|
#line 158 "parse.y"
|
|
{
|
|
sqlite3AddColumn(pParse,&yymsp[0].minor.yy410);
|
|
yygotominor.yy410 = yymsp[0].minor.yy410;
|
|
}
|
|
#line 1985 "parse.c"
|
|
break;
|
|
case 32:
|
|
case 33:
|
|
case 34:
|
|
case 35:
|
|
case 36:
|
|
case 253:
|
|
#line 168 "parse.y"
|
|
{yygotominor.yy410 = yymsp[0].minor.yy0;}
|
|
#line 1995 "parse.c"
|
|
break;
|
|
case 38:
|
|
#line 228 "parse.y"
|
|
{sqlite3AddColumnType(pParse,&yymsp[0].minor.yy410);}
|
|
#line 2000 "parse.c"
|
|
break;
|
|
case 39:
|
|
case 42:
|
|
case 119:
|
|
case 120:
|
|
case 131:
|
|
case 150:
|
|
case 241:
|
|
case 251:
|
|
case 252:
|
|
#line 229 "parse.y"
|
|
{yygotominor.yy410 = yymsp[0].minor.yy410;}
|
|
#line 2013 "parse.c"
|
|
break;
|
|
case 40:
|
|
#line 230 "parse.y"
|
|
{
|
|
yygotominor.yy410.z = yymsp[-3].minor.yy410.z;
|
|
yygotominor.yy410.n = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy410.z;
|
|
}
|
|
#line 2021 "parse.c"
|
|
break;
|
|
case 41:
|
|
#line 234 "parse.y"
|
|
{
|
|
yygotominor.yy410.z = yymsp[-5].minor.yy410.z;
|
|
yygotominor.yy410.n = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy410.z;
|
|
}
|
|
#line 2029 "parse.c"
|
|
break;
|
|
case 43:
|
|
#line 240 "parse.y"
|
|
{yygotominor.yy410.z=yymsp[-1].minor.yy410.z; yygotominor.yy410.n=yymsp[0].minor.yy410.n+(yymsp[0].minor.yy410.z-yymsp[-1].minor.yy410.z);}
|
|
#line 2034 "parse.c"
|
|
break;
|
|
case 44:
|
|
#line 242 "parse.y"
|
|
{ yygotominor.yy46 = atoi((char*)yymsp[0].minor.yy410.z); }
|
|
#line 2039 "parse.c"
|
|
break;
|
|
case 45:
|
|
#line 243 "parse.y"
|
|
{ yygotominor.yy46 = -atoi((char*)yymsp[0].minor.yy410.z); }
|
|
#line 2044 "parse.c"
|
|
break;
|
|
case 50:
|
|
case 52:
|
|
#line 252 "parse.y"
|
|
{sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy172);}
|
|
#line 2050 "parse.c"
|
|
break;
|
|
case 51:
|
|
#line 253 "parse.y"
|
|
{sqlite3AddDefaultValue(pParse,yymsp[-1].minor.yy172);}
|
|
#line 2055 "parse.c"
|
|
break;
|
|
case 53:
|
|
#line 255 "parse.y"
|
|
{
|
|
Expr *p = sqlite3Expr(TK_UMINUS, yymsp[0].minor.yy172, 0, 0);
|
|
sqlite3AddDefaultValue(pParse,p);
|
|
}
|
|
#line 2063 "parse.c"
|
|
break;
|
|
case 54:
|
|
#line 259 "parse.y"
|
|
{
|
|
Expr *p = sqlite3Expr(TK_STRING, 0, 0, &yymsp[0].minor.yy410);
|
|
sqlite3AddDefaultValue(pParse,p);
|
|
}
|
|
#line 2071 "parse.c"
|
|
break;
|
|
case 56:
|
|
#line 268 "parse.y"
|
|
{sqlite3AddNotNull(pParse, yymsp[0].minor.yy46);}
|
|
#line 2076 "parse.c"
|
|
break;
|
|
case 57:
|
|
#line 270 "parse.y"
|
|
{sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy46,yymsp[0].minor.yy46,yymsp[-2].minor.yy46);}
|
|
#line 2081 "parse.c"
|
|
break;
|
|
case 58:
|
|
#line 271 "parse.y"
|
|
{sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy46,0,0,0,0);}
|
|
#line 2086 "parse.c"
|
|
break;
|
|
case 59:
|
|
#line 272 "parse.y"
|
|
{sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy172);}
|
|
#line 2091 "parse.c"
|
|
break;
|
|
case 60:
|
|
#line 274 "parse.y"
|
|
{sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy410,yymsp[-1].minor.yy174,yymsp[0].minor.yy46);}
|
|
#line 2096 "parse.c"
|
|
break;
|
|
case 61:
|
|
#line 275 "parse.y"
|
|
{sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy46);}
|
|
#line 2101 "parse.c"
|
|
break;
|
|
case 62:
|
|
#line 276 "parse.y"
|
|
{sqlite3AddCollateType(pParse, (char*)yymsp[0].minor.yy410.z, yymsp[0].minor.yy410.n);}
|
|
#line 2106 "parse.c"
|
|
break;
|
|
case 65:
|
|
#line 289 "parse.y"
|
|
{ yygotominor.yy46 = OE_Restrict * 0x010101; }
|
|
#line 2111 "parse.c"
|
|
break;
|
|
case 66:
|
|
#line 290 "parse.y"
|
|
{ yygotominor.yy46 = (yymsp[-1].minor.yy46 & yymsp[0].minor.yy405.mask) | yymsp[0].minor.yy405.value; }
|
|
#line 2116 "parse.c"
|
|
break;
|
|
case 67:
|
|
#line 292 "parse.y"
|
|
{ yygotominor.yy405.value = 0; yygotominor.yy405.mask = 0x000000; }
|
|
#line 2121 "parse.c"
|
|
break;
|
|
case 68:
|
|
#line 293 "parse.y"
|
|
{ yygotominor.yy405.value = yymsp[0].minor.yy46; yygotominor.yy405.mask = 0x0000ff; }
|
|
#line 2126 "parse.c"
|
|
break;
|
|
case 69:
|
|
#line 294 "parse.y"
|
|
{ yygotominor.yy405.value = yymsp[0].minor.yy46<<8; yygotominor.yy405.mask = 0x00ff00; }
|
|
#line 2131 "parse.c"
|
|
break;
|
|
case 70:
|
|
#line 295 "parse.y"
|
|
{ yygotominor.yy405.value = yymsp[0].minor.yy46<<16; yygotominor.yy405.mask = 0xff0000; }
|
|
#line 2136 "parse.c"
|
|
break;
|
|
case 71:
|
|
#line 297 "parse.y"
|
|
{ yygotominor.yy46 = OE_SetNull; }
|
|
#line 2141 "parse.c"
|
|
break;
|
|
case 72:
|
|
#line 298 "parse.y"
|
|
{ yygotominor.yy46 = OE_SetDflt; }
|
|
#line 2146 "parse.c"
|
|
break;
|
|
case 73:
|
|
#line 299 "parse.y"
|
|
{ yygotominor.yy46 = OE_Cascade; }
|
|
#line 2151 "parse.c"
|
|
break;
|
|
case 74:
|
|
#line 300 "parse.y"
|
|
{ yygotominor.yy46 = OE_Restrict; }
|
|
#line 2156 "parse.c"
|
|
break;
|
|
case 75:
|
|
case 76:
|
|
case 91:
|
|
case 93:
|
|
case 95:
|
|
case 96:
|
|
case 168:
|
|
#line 302 "parse.y"
|
|
{yygotominor.yy46 = yymsp[0].minor.yy46;}
|
|
#line 2167 "parse.c"
|
|
break;
|
|
case 80:
|
|
#line 312 "parse.y"
|
|
{yygotominor.yy410.n = 0; yygotominor.yy410.z = 0;}
|
|
#line 2172 "parse.c"
|
|
break;
|
|
case 81:
|
|
#line 313 "parse.y"
|
|
{yygotominor.yy410 = yymsp[-1].minor.yy0;}
|
|
#line 2177 "parse.c"
|
|
break;
|
|
case 86:
|
|
#line 319 "parse.y"
|
|
{sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy174,yymsp[0].minor.yy46,yymsp[-2].minor.yy46,0);}
|
|
#line 2182 "parse.c"
|
|
break;
|
|
case 87:
|
|
#line 321 "parse.y"
|
|
{sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy174,yymsp[0].minor.yy46,0,0,0,0);}
|
|
#line 2187 "parse.c"
|
|
break;
|
|
case 88:
|
|
#line 322 "parse.y"
|
|
{sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy172);}
|
|
#line 2192 "parse.c"
|
|
break;
|
|
case 89:
|
|
#line 324 "parse.y"
|
|
{
|
|
sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy174, &yymsp[-3].minor.yy410, yymsp[-2].minor.yy174, yymsp[-1].minor.yy46);
|
|
sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy46);
|
|
}
|
|
#line 2200 "parse.c"
|
|
break;
|
|
case 92:
|
|
case 94:
|
|
#line 338 "parse.y"
|
|
{yygotominor.yy46 = OE_Default;}
|
|
#line 2206 "parse.c"
|
|
break;
|
|
case 97:
|
|
#line 343 "parse.y"
|
|
{yygotominor.yy46 = OE_Ignore;}
|
|
#line 2211 "parse.c"
|
|
break;
|
|
case 98:
|
|
case 169:
|
|
#line 344 "parse.y"
|
|
{yygotominor.yy46 = OE_Replace;}
|
|
#line 2217 "parse.c"
|
|
break;
|
|
case 99:
|
|
#line 348 "parse.y"
|
|
{
|
|
sqlite3DropTable(pParse, yymsp[0].minor.yy373, 0, yymsp[-1].minor.yy46);
|
|
}
|
|
#line 2224 "parse.c"
|
|
break;
|
|
case 102:
|
|
#line 358 "parse.y"
|
|
{
|
|
sqlite3CreateView(pParse, &yymsp[-7].minor.yy0, &yymsp[-3].minor.yy410, &yymsp[-2].minor.yy410, yymsp[0].minor.yy219, yymsp[-6].minor.yy46, yymsp[-4].minor.yy46);
|
|
}
|
|
#line 2231 "parse.c"
|
|
break;
|
|
case 103:
|
|
#line 361 "parse.y"
|
|
{
|
|
sqlite3DropTable(pParse, yymsp[0].minor.yy373, 1, yymsp[-1].minor.yy46);
|
|
}
|
|
#line 2238 "parse.c"
|
|
break;
|
|
case 104:
|
|
#line 368 "parse.y"
|
|
{
|
|
sqlite3Select(pParse, yymsp[0].minor.yy219, SRT_Callback, 0, 0, 0, 0, 0);
|
|
sqlite3SelectDelete(yymsp[0].minor.yy219);
|
|
}
|
|
#line 2246 "parse.c"
|
|
break;
|
|
case 105:
|
|
case 128:
|
|
#line 378 "parse.y"
|
|
{yygotominor.yy219 = yymsp[0].minor.yy219;}
|
|
#line 2252 "parse.c"
|
|
break;
|
|
case 106:
|
|
#line 380 "parse.y"
|
|
{
|
|
if( yymsp[0].minor.yy219 ){
|
|
yymsp[0].minor.yy219->op = yymsp[-1].minor.yy46;
|
|
yymsp[0].minor.yy219->pPrior = yymsp[-2].minor.yy219;
|
|
}
|
|
yygotominor.yy219 = yymsp[0].minor.yy219;
|
|
}
|
|
#line 2263 "parse.c"
|
|
break;
|
|
case 108:
|
|
#line 389 "parse.y"
|
|
{yygotominor.yy46 = TK_ALL;}
|
|
#line 2268 "parse.c"
|
|
break;
|
|
case 110:
|
|
#line 393 "parse.y"
|
|
{
|
|
yygotominor.yy219 = sqlite3SelectNew(yymsp[-6].minor.yy174,yymsp[-5].minor.yy373,yymsp[-4].minor.yy172,yymsp[-3].minor.yy174,yymsp[-2].minor.yy172,yymsp[-1].minor.yy174,yymsp[-7].minor.yy46,yymsp[0].minor.yy234.pLimit,yymsp[0].minor.yy234.pOffset);
|
|
}
|
|
#line 2275 "parse.c"
|
|
break;
|
|
case 114:
|
|
case 238:
|
|
#line 414 "parse.y"
|
|
{yygotominor.yy174 = yymsp[-1].minor.yy174;}
|
|
#line 2281 "parse.c"
|
|
break;
|
|
case 115:
|
|
case 141:
|
|
case 151:
|
|
case 237:
|
|
#line 415 "parse.y"
|
|
{yygotominor.yy174 = 0;}
|
|
#line 2289 "parse.c"
|
|
break;
|
|
case 116:
|
|
#line 416 "parse.y"
|
|
{
|
|
yygotominor.yy174 = sqlite3ExprListAppend(yymsp[-2].minor.yy174,yymsp[-1].minor.yy172,yymsp[0].minor.yy410.n?&yymsp[0].minor.yy410:0);
|
|
}
|
|
#line 2296 "parse.c"
|
|
break;
|
|
case 117:
|
|
#line 419 "parse.y"
|
|
{
|
|
yygotominor.yy174 = sqlite3ExprListAppend(yymsp[-1].minor.yy174, sqlite3Expr(TK_ALL, 0, 0, 0), 0);
|
|
}
|
|
#line 2303 "parse.c"
|
|
break;
|
|
case 118:
|
|
#line 422 "parse.y"
|
|
{
|
|
Expr *pRight = sqlite3Expr(TK_ALL, 0, 0, 0);
|
|
Expr *pLeft = sqlite3Expr(TK_ID, 0, 0, &yymsp[-2].minor.yy410);
|
|
yygotominor.yy174 = sqlite3ExprListAppend(yymsp[-3].minor.yy174, sqlite3Expr(TK_DOT, pLeft, pRight, 0), 0);
|
|
}
|
|
#line 2312 "parse.c"
|
|
break;
|
|
case 121:
|
|
#line 434 "parse.y"
|
|
{yygotominor.yy410.n = 0;}
|
|
#line 2317 "parse.c"
|
|
break;
|
|
case 122:
|
|
#line 446 "parse.y"
|
|
{yygotominor.yy373 = sqliteMalloc(sizeof(*yygotominor.yy373));}
|
|
#line 2322 "parse.c"
|
|
break;
|
|
case 123:
|
|
#line 447 "parse.y"
|
|
{yygotominor.yy373 = yymsp[0].minor.yy373;}
|
|
#line 2327 "parse.c"
|
|
break;
|
|
case 124:
|
|
#line 452 "parse.y"
|
|
{
|
|
yygotominor.yy373 = yymsp[-1].minor.yy373;
|
|
if( yygotominor.yy373 && yygotominor.yy373->nSrc>0 ) yygotominor.yy373->a[yygotominor.yy373->nSrc-1].jointype = yymsp[0].minor.yy46;
|
|
}
|
|
#line 2335 "parse.c"
|
|
break;
|
|
case 125:
|
|
#line 456 "parse.y"
|
|
{yygotominor.yy373 = 0;}
|
|
#line 2340 "parse.c"
|
|
break;
|
|
case 126:
|
|
#line 457 "parse.y"
|
|
{
|
|
yygotominor.yy373 = sqlite3SrcListAppend(yymsp[-5].minor.yy373,&yymsp[-4].minor.yy410,&yymsp[-3].minor.yy410);
|
|
if( yymsp[-2].minor.yy410.n ) sqlite3SrcListAddAlias(yygotominor.yy373,&yymsp[-2].minor.yy410);
|
|
if( yymsp[-1].minor.yy172 ){
|
|
if( yygotominor.yy373 && yygotominor.yy373->nSrc>1 ){ yygotominor.yy373->a[yygotominor.yy373->nSrc-2].pOn = yymsp[-1].minor.yy172; }
|
|
else { sqlite3ExprDelete(yymsp[-1].minor.yy172); }
|
|
}
|
|
if( yymsp[0].minor.yy432 ){
|
|
if( yygotominor.yy373 && yygotominor.yy373->nSrc>1 ){ yygotominor.yy373->a[yygotominor.yy373->nSrc-2].pUsing = yymsp[0].minor.yy432; }
|
|
else { sqlite3IdListDelete(yymsp[0].minor.yy432); }
|
|
}
|
|
}
|
|
#line 2356 "parse.c"
|
|
break;
|
|
case 127:
|
|
#line 471 "parse.y"
|
|
{
|
|
yygotominor.yy373 = sqlite3SrcListAppend(yymsp[-6].minor.yy373,0,0);
|
|
if( yygotominor.yy373 && yygotominor.yy373->nSrc>0 ) yygotominor.yy373->a[yygotominor.yy373->nSrc-1].pSelect = yymsp[-4].minor.yy219;
|
|
if( yymsp[-2].minor.yy410.n ) sqlite3SrcListAddAlias(yygotominor.yy373,&yymsp[-2].minor.yy410);
|
|
if( yymsp[-1].minor.yy172 ){
|
|
if( yygotominor.yy373 && yygotominor.yy373->nSrc>1 ){ yygotominor.yy373->a[yygotominor.yy373->nSrc-2].pOn = yymsp[-1].minor.yy172; }
|
|
else { sqlite3ExprDelete(yymsp[-1].minor.yy172); }
|
|
}
|
|
if( yymsp[0].minor.yy432 ){
|
|
if( yygotominor.yy373 && yygotominor.yy373->nSrc>1 ){ yygotominor.yy373->a[yygotominor.yy373->nSrc-2].pUsing = yymsp[0].minor.yy432; }
|
|
else { sqlite3IdListDelete(yymsp[0].minor.yy432); }
|
|
}
|
|
}
|
|
#line 2373 "parse.c"
|
|
break;
|
|
case 129:
|
|
#line 492 "parse.y"
|
|
{
|
|
yygotominor.yy219 = sqlite3SelectNew(0,yymsp[0].minor.yy373,0,0,0,0,0,0,0);
|
|
}
|
|
#line 2380 "parse.c"
|
|
break;
|
|
case 130:
|
|
#line 498 "parse.y"
|
|
{yygotominor.yy410.z=0; yygotominor.yy410.n=0;}
|
|
#line 2385 "parse.c"
|
|
break;
|
|
case 132:
|
|
#line 503 "parse.y"
|
|
{yygotominor.yy373 = sqlite3SrcListAppend(0,&yymsp[-1].minor.yy410,&yymsp[0].minor.yy410);}
|
|
#line 2390 "parse.c"
|
|
break;
|
|
case 133:
|
|
#line 507 "parse.y"
|
|
{ yygotominor.yy46 = JT_INNER; }
|
|
#line 2395 "parse.c"
|
|
break;
|
|
case 134:
|
|
#line 508 "parse.y"
|
|
{ yygotominor.yy46 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0); }
|
|
#line 2400 "parse.c"
|
|
break;
|
|
case 135:
|
|
#line 509 "parse.y"
|
|
{ yygotominor.yy46 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy410,0); }
|
|
#line 2405 "parse.c"
|
|
break;
|
|
case 136:
|
|
#line 511 "parse.y"
|
|
{ yygotominor.yy46 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy410,&yymsp[-1].minor.yy410); }
|
|
#line 2410 "parse.c"
|
|
break;
|
|
case 137:
|
|
case 145:
|
|
case 154:
|
|
case 161:
|
|
case 176:
|
|
case 203:
|
|
case 226:
|
|
case 228:
|
|
case 232:
|
|
#line 515 "parse.y"
|
|
{yygotominor.yy172 = yymsp[0].minor.yy172;}
|
|
#line 2423 "parse.c"
|
|
break;
|
|
case 138:
|
|
case 153:
|
|
case 160:
|
|
case 204:
|
|
case 227:
|
|
case 229:
|
|
case 233:
|
|
#line 516 "parse.y"
|
|
{yygotominor.yy172 = 0;}
|
|
#line 2434 "parse.c"
|
|
break;
|
|
case 139:
|
|
case 173:
|
|
#line 520 "parse.y"
|
|
{yygotominor.yy432 = yymsp[-1].minor.yy432;}
|
|
#line 2440 "parse.c"
|
|
break;
|
|
case 140:
|
|
case 172:
|
|
#line 521 "parse.y"
|
|
{yygotominor.yy432 = 0;}
|
|
#line 2446 "parse.c"
|
|
break;
|
|
case 142:
|
|
case 152:
|
|
#line 532 "parse.y"
|
|
{yygotominor.yy174 = yymsp[0].minor.yy174;}
|
|
#line 2452 "parse.c"
|
|
break;
|
|
case 143:
|
|
#line 533 "parse.y"
|
|
{
|
|
yygotominor.yy174 = sqlite3ExprListAppend(yymsp[-4].minor.yy174,yymsp[-2].minor.yy172,yymsp[-1].minor.yy410.n>0?&yymsp[-1].minor.yy410:0);
|
|
if( yygotominor.yy174 ) yygotominor.yy174->a[yygotominor.yy174->nExpr-1].sortOrder = yymsp[0].minor.yy46;
|
|
}
|
|
#line 2460 "parse.c"
|
|
break;
|
|
case 144:
|
|
#line 537 "parse.y"
|
|
{
|
|
yygotominor.yy174 = sqlite3ExprListAppend(0,yymsp[-2].minor.yy172,yymsp[-1].minor.yy410.n>0?&yymsp[-1].minor.yy410:0);
|
|
if( yygotominor.yy174 && yygotominor.yy174->a ) yygotominor.yy174->a[0].sortOrder = yymsp[0].minor.yy46;
|
|
}
|
|
#line 2468 "parse.c"
|
|
break;
|
|
case 146:
|
|
case 148:
|
|
#line 546 "parse.y"
|
|
{yygotominor.yy46 = SQLITE_SO_ASC;}
|
|
#line 2474 "parse.c"
|
|
break;
|
|
case 147:
|
|
#line 547 "parse.y"
|
|
{yygotominor.yy46 = SQLITE_SO_DESC;}
|
|
#line 2479 "parse.c"
|
|
break;
|
|
case 149:
|
|
#line 549 "parse.y"
|
|
{yygotominor.yy410.z = 0; yygotominor.yy410.n = 0;}
|
|
#line 2484 "parse.c"
|
|
break;
|
|
case 155:
|
|
#line 567 "parse.y"
|
|
{yygotominor.yy234.pLimit = 0; yygotominor.yy234.pOffset = 0;}
|
|
#line 2489 "parse.c"
|
|
break;
|
|
case 156:
|
|
#line 568 "parse.y"
|
|
{yygotominor.yy234.pLimit = yymsp[0].minor.yy172; yygotominor.yy234.pOffset = 0;}
|
|
#line 2494 "parse.c"
|
|
break;
|
|
case 157:
|
|
#line 570 "parse.y"
|
|
{yygotominor.yy234.pLimit = yymsp[-2].minor.yy172; yygotominor.yy234.pOffset = yymsp[0].minor.yy172;}
|
|
#line 2499 "parse.c"
|
|
break;
|
|
case 158:
|
|
#line 572 "parse.y"
|
|
{yygotominor.yy234.pOffset = yymsp[-2].minor.yy172; yygotominor.yy234.pLimit = yymsp[0].minor.yy172;}
|
|
#line 2504 "parse.c"
|
|
break;
|
|
case 159:
|
|
#line 576 "parse.y"
|
|
{sqlite3DeleteFrom(pParse,yymsp[-1].minor.yy373,yymsp[0].minor.yy172);}
|
|
#line 2509 "parse.c"
|
|
break;
|
|
case 162:
|
|
#line 587 "parse.y"
|
|
{sqlite3Update(pParse,yymsp[-3].minor.yy373,yymsp[-1].minor.yy174,yymsp[0].minor.yy172,yymsp[-4].minor.yy46);}
|
|
#line 2514 "parse.c"
|
|
break;
|
|
case 163:
|
|
#line 593 "parse.y"
|
|
{yygotominor.yy174 = sqlite3ExprListAppend(yymsp[-4].minor.yy174,yymsp[0].minor.yy172,&yymsp[-2].minor.yy410);}
|
|
#line 2519 "parse.c"
|
|
break;
|
|
case 164:
|
|
#line 594 "parse.y"
|
|
{yygotominor.yy174 = sqlite3ExprListAppend(0,yymsp[0].minor.yy172,&yymsp[-2].minor.yy410);}
|
|
#line 2524 "parse.c"
|
|
break;
|
|
case 165:
|
|
#line 600 "parse.y"
|
|
{sqlite3Insert(pParse, yymsp[-5].minor.yy373, yymsp[-1].minor.yy174, 0, yymsp[-4].minor.yy432, yymsp[-7].minor.yy46);}
|
|
#line 2529 "parse.c"
|
|
break;
|
|
case 166:
|
|
#line 602 "parse.y"
|
|
{sqlite3Insert(pParse, yymsp[-2].minor.yy373, 0, yymsp[0].minor.yy219, yymsp[-1].minor.yy432, yymsp[-4].minor.yy46);}
|
|
#line 2534 "parse.c"
|
|
break;
|
|
case 167:
|
|
#line 604 "parse.y"
|
|
{sqlite3Insert(pParse, yymsp[-3].minor.yy373, 0, 0, yymsp[-2].minor.yy432, yymsp[-5].minor.yy46);}
|
|
#line 2539 "parse.c"
|
|
break;
|
|
case 170:
|
|
case 230:
|
|
#line 614 "parse.y"
|
|
{yygotominor.yy174 = sqlite3ExprListAppend(yymsp[-2].minor.yy174,yymsp[0].minor.yy172,0);}
|
|
#line 2545 "parse.c"
|
|
break;
|
|
case 171:
|
|
case 231:
|
|
#line 615 "parse.y"
|
|
{yygotominor.yy174 = sqlite3ExprListAppend(0,yymsp[0].minor.yy172,0);}
|
|
#line 2551 "parse.c"
|
|
break;
|
|
case 174:
|
|
#line 624 "parse.y"
|
|
{yygotominor.yy432 = sqlite3IdListAppend(yymsp[-2].minor.yy432,&yymsp[0].minor.yy410);}
|
|
#line 2556 "parse.c"
|
|
break;
|
|
case 175:
|
|
#line 625 "parse.y"
|
|
{yygotominor.yy432 = sqlite3IdListAppend(0,&yymsp[0].minor.yy410);}
|
|
#line 2561 "parse.c"
|
|
break;
|
|
case 177:
|
|
#line 636 "parse.y"
|
|
{yygotominor.yy172 = yymsp[-1].minor.yy172; sqlite3ExprSpan(yygotominor.yy172,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); }
|
|
#line 2566 "parse.c"
|
|
break;
|
|
case 178:
|
|
case 183:
|
|
case 184:
|
|
#line 637 "parse.y"
|
|
{yygotominor.yy172 = sqlite3Expr(yymsp[0].major, 0, 0, &yymsp[0].minor.yy0);}
|
|
#line 2573 "parse.c"
|
|
break;
|
|
case 179:
|
|
case 180:
|
|
#line 638 "parse.y"
|
|
{yygotominor.yy172 = sqlite3Expr(TK_ID, 0, 0, &yymsp[0].minor.yy0);}
|
|
#line 2579 "parse.c"
|
|
break;
|
|
case 181:
|
|
#line 640 "parse.y"
|
|
{
|
|
Expr *temp1 = sqlite3Expr(TK_ID, 0, 0, &yymsp[-2].minor.yy410);
|
|
Expr *temp2 = sqlite3Expr(TK_ID, 0, 0, &yymsp[0].minor.yy410);
|
|
yygotominor.yy172 = sqlite3Expr(TK_DOT, temp1, temp2, 0);
|
|
}
|
|
#line 2588 "parse.c"
|
|
break;
|
|
case 182:
|
|
#line 645 "parse.y"
|
|
{
|
|
Expr *temp1 = sqlite3Expr(TK_ID, 0, 0, &yymsp[-4].minor.yy410);
|
|
Expr *temp2 = sqlite3Expr(TK_ID, 0, 0, &yymsp[-2].minor.yy410);
|
|
Expr *temp3 = sqlite3Expr(TK_ID, 0, 0, &yymsp[0].minor.yy410);
|
|
Expr *temp4 = sqlite3Expr(TK_DOT, temp2, temp3, 0);
|
|
yygotominor.yy172 = sqlite3Expr(TK_DOT, temp1, temp4, 0);
|
|
}
|
|
#line 2599 "parse.c"
|
|
break;
|
|
case 185:
|
|
#line 654 "parse.y"
|
|
{yygotominor.yy172 = sqlite3RegisterExpr(pParse, &yymsp[0].minor.yy0);}
|
|
#line 2604 "parse.c"
|
|
break;
|
|
case 186:
|
|
#line 655 "parse.y"
|
|
{
|
|
Token *pToken = &yymsp[0].minor.yy0;
|
|
Expr *pExpr = yygotominor.yy172 = sqlite3Expr(TK_VARIABLE, 0, 0, pToken);
|
|
sqlite3ExprAssignVarNumber(pParse, pExpr);
|
|
}
|
|
#line 2613 "parse.c"
|
|
break;
|
|
case 187:
|
|
#line 661 "parse.y"
|
|
{
|
|
yygotominor.yy172 = sqlite3Expr(TK_CAST, yymsp[-3].minor.yy172, 0, &yymsp[-1].minor.yy410);
|
|
sqlite3ExprSpan(yygotominor.yy172,&yymsp[-5].minor.yy0,&yymsp[0].minor.yy0);
|
|
}
|
|
#line 2621 "parse.c"
|
|
break;
|
|
case 188:
|
|
#line 666 "parse.y"
|
|
{
|
|
yygotominor.yy172 = sqlite3ExprFunction(yymsp[-1].minor.yy174, &yymsp[-4].minor.yy0);
|
|
sqlite3ExprSpan(yygotominor.yy172,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0);
|
|
if( yymsp[-2].minor.yy46 && yygotominor.yy172 ){
|
|
yygotominor.yy172->flags |= EP_Distinct;
|
|
}
|
|
}
|
|
#line 2632 "parse.c"
|
|
break;
|
|
case 189:
|
|
#line 673 "parse.y"
|
|
{
|
|
yygotominor.yy172 = sqlite3ExprFunction(0, &yymsp[-3].minor.yy0);
|
|
sqlite3ExprSpan(yygotominor.yy172,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0);
|
|
}
|
|
#line 2640 "parse.c"
|
|
break;
|
|
case 190:
|
|
#line 677 "parse.y"
|
|
{
|
|
/* The CURRENT_TIME, CURRENT_DATE, and CURRENT_TIMESTAMP values are
|
|
** treated as functions that return constants */
|
|
yygotominor.yy172 = sqlite3ExprFunction(0,&yymsp[0].minor.yy0);
|
|
if( yygotominor.yy172 ){
|
|
yygotominor.yy172->op = TK_CONST_FUNC;
|
|
yygotominor.yy172->span = yymsp[0].minor.yy0;
|
|
}
|
|
}
|
|
#line 2653 "parse.c"
|
|
break;
|
|
case 191:
|
|
case 192:
|
|
case 193:
|
|
case 194:
|
|
case 195:
|
|
case 196:
|
|
case 197:
|
|
case 198:
|
|
#line 686 "parse.y"
|
|
{yygotominor.yy172 = sqlite3Expr(yymsp[-1].major, yymsp[-2].minor.yy172, yymsp[0].minor.yy172, 0);}
|
|
#line 2665 "parse.c"
|
|
break;
|
|
case 199:
|
|
case 201:
|
|
#line 696 "parse.y"
|
|
{yygotominor.yy72.eOperator = yymsp[0].minor.yy0; yygotominor.yy72.not = 0;}
|
|
#line 2671 "parse.c"
|
|
break;
|
|
case 200:
|
|
case 202:
|
|
#line 697 "parse.y"
|
|
{yygotominor.yy72.eOperator = yymsp[0].minor.yy0; yygotominor.yy72.not = 1;}
|
|
#line 2677 "parse.c"
|
|
break;
|
|
case 205:
|
|
#line 704 "parse.y"
|
|
{
|
|
ExprList *pList;
|
|
pList = sqlite3ExprListAppend(0, yymsp[-1].minor.yy172, 0);
|
|
pList = sqlite3ExprListAppend(pList, yymsp[-3].minor.yy172, 0);
|
|
if( yymsp[0].minor.yy172 ){
|
|
pList = sqlite3ExprListAppend(pList, yymsp[0].minor.yy172, 0);
|
|
}
|
|
yygotominor.yy172 = sqlite3ExprFunction(pList, &yymsp[-2].minor.yy72.eOperator);
|
|
if( yymsp[-2].minor.yy72.not ) yygotominor.yy172 = sqlite3Expr(TK_NOT, yygotominor.yy172, 0, 0);
|
|
sqlite3ExprSpan(yygotominor.yy172, &yymsp[-3].minor.yy172->span, &yymsp[-1].minor.yy172->span);
|
|
if( yygotominor.yy172 ) yygotominor.yy172->flags |= EP_InfixFunc;
|
|
}
|
|
#line 2693 "parse.c"
|
|
break;
|
|
case 206:
|
|
#line 717 "parse.y"
|
|
{
|
|
yygotominor.yy172 = sqlite3Expr(yymsp[0].major, yymsp[-1].minor.yy172, 0, 0);
|
|
sqlite3ExprSpan(yygotominor.yy172,&yymsp[-1].minor.yy172->span,&yymsp[0].minor.yy0);
|
|
}
|
|
#line 2701 "parse.c"
|
|
break;
|
|
case 207:
|
|
#line 721 "parse.y"
|
|
{
|
|
yygotominor.yy172 = sqlite3Expr(TK_ISNULL, yymsp[-2].minor.yy172, 0, 0);
|
|
sqlite3ExprSpan(yygotominor.yy172,&yymsp[-2].minor.yy172->span,&yymsp[0].minor.yy0);
|
|
}
|
|
#line 2709 "parse.c"
|
|
break;
|
|
case 208:
|
|
#line 725 "parse.y"
|
|
{
|
|
yygotominor.yy172 = sqlite3Expr(TK_NOTNULL, yymsp[-2].minor.yy172, 0, 0);
|
|
sqlite3ExprSpan(yygotominor.yy172,&yymsp[-2].minor.yy172->span,&yymsp[0].minor.yy0);
|
|
}
|
|
#line 2717 "parse.c"
|
|
break;
|
|
case 209:
|
|
#line 729 "parse.y"
|
|
{
|
|
yygotominor.yy172 = sqlite3Expr(TK_NOTNULL, yymsp[-3].minor.yy172, 0, 0);
|
|
sqlite3ExprSpan(yygotominor.yy172,&yymsp[-3].minor.yy172->span,&yymsp[0].minor.yy0);
|
|
}
|
|
#line 2725 "parse.c"
|
|
break;
|
|
case 210:
|
|
#line 733 "parse.y"
|
|
{
|
|
yygotominor.yy172 = sqlite3Expr(yymsp[-1].major, yymsp[0].minor.yy172, 0, 0);
|
|
sqlite3ExprSpan(yygotominor.yy172,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy172->span);
|
|
}
|
|
#line 2733 "parse.c"
|
|
break;
|
|
case 211:
|
|
#line 737 "parse.y"
|
|
{
|
|
yygotominor.yy172 = sqlite3Expr(TK_UMINUS, yymsp[0].minor.yy172, 0, 0);
|
|
sqlite3ExprSpan(yygotominor.yy172,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy172->span);
|
|
}
|
|
#line 2741 "parse.c"
|
|
break;
|
|
case 212:
|
|
#line 741 "parse.y"
|
|
{
|
|
yygotominor.yy172 = sqlite3Expr(TK_UPLUS, yymsp[0].minor.yy172, 0, 0);
|
|
sqlite3ExprSpan(yygotominor.yy172,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy172->span);
|
|
}
|
|
#line 2749 "parse.c"
|
|
break;
|
|
case 215:
|
|
#line 748 "parse.y"
|
|
{
|
|
ExprList *pList = sqlite3ExprListAppend(0, yymsp[-2].minor.yy172, 0);
|
|
pList = sqlite3ExprListAppend(pList, yymsp[0].minor.yy172, 0);
|
|
yygotominor.yy172 = sqlite3Expr(TK_BETWEEN, yymsp[-4].minor.yy172, 0, 0);
|
|
if( yygotominor.yy172 ){
|
|
yygotominor.yy172->pList = pList;
|
|
}else{
|
|
sqlite3ExprListDelete(pList);
|
|
}
|
|
if( yymsp[-3].minor.yy46 ) yygotominor.yy172 = sqlite3Expr(TK_NOT, yygotominor.yy172, 0, 0);
|
|
sqlite3ExprSpan(yygotominor.yy172,&yymsp[-4].minor.yy172->span,&yymsp[0].minor.yy172->span);
|
|
}
|
|
#line 2765 "parse.c"
|
|
break;
|
|
case 218:
|
|
#line 764 "parse.y"
|
|
{
|
|
yygotominor.yy172 = sqlite3Expr(TK_IN, yymsp[-4].minor.yy172, 0, 0);
|
|
if( yygotominor.yy172 ){
|
|
yygotominor.yy172->pList = yymsp[-1].minor.yy174;
|
|
}else{
|
|
sqlite3ExprListDelete(yymsp[-1].minor.yy174);
|
|
}
|
|
if( yymsp[-3].minor.yy46 ) yygotominor.yy172 = sqlite3Expr(TK_NOT, yygotominor.yy172, 0, 0);
|
|
sqlite3ExprSpan(yygotominor.yy172,&yymsp[-4].minor.yy172->span,&yymsp[0].minor.yy0);
|
|
}
|
|
#line 2779 "parse.c"
|
|
break;
|
|
case 219:
|
|
#line 774 "parse.y"
|
|
{
|
|
yygotominor.yy172 = sqlite3Expr(TK_SELECT, 0, 0, 0);
|
|
if( yygotominor.yy172 ){
|
|
yygotominor.yy172->pSelect = yymsp[-1].minor.yy219;
|
|
}else{
|
|
sqlite3SelectDelete(yymsp[-1].minor.yy219);
|
|
}
|
|
sqlite3ExprSpan(yygotominor.yy172,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);
|
|
}
|
|
#line 2792 "parse.c"
|
|
break;
|
|
case 220:
|
|
#line 783 "parse.y"
|
|
{
|
|
yygotominor.yy172 = sqlite3Expr(TK_IN, yymsp[-4].minor.yy172, 0, 0);
|
|
if( yygotominor.yy172 ){
|
|
yygotominor.yy172->pSelect = yymsp[-1].minor.yy219;
|
|
}else{
|
|
sqlite3SelectDelete(yymsp[-1].minor.yy219);
|
|
}
|
|
if( yymsp[-3].minor.yy46 ) yygotominor.yy172 = sqlite3Expr(TK_NOT, yygotominor.yy172, 0, 0);
|
|
sqlite3ExprSpan(yygotominor.yy172,&yymsp[-4].minor.yy172->span,&yymsp[0].minor.yy0);
|
|
}
|
|
#line 2806 "parse.c"
|
|
break;
|
|
case 221:
|
|
#line 793 "parse.y"
|
|
{
|
|
SrcList *pSrc = sqlite3SrcListAppend(0,&yymsp[-1].minor.yy410,&yymsp[0].minor.yy410);
|
|
yygotominor.yy172 = sqlite3Expr(TK_IN, yymsp[-3].minor.yy172, 0, 0);
|
|
if( yygotominor.yy172 ){
|
|
yygotominor.yy172->pSelect = sqlite3SelectNew(0,pSrc,0,0,0,0,0,0,0);
|
|
}else{
|
|
sqlite3SrcListDelete(pSrc);
|
|
}
|
|
if( yymsp[-2].minor.yy46 ) yygotominor.yy172 = sqlite3Expr(TK_NOT, yygotominor.yy172, 0, 0);
|
|
sqlite3ExprSpan(yygotominor.yy172,&yymsp[-3].minor.yy172->span,yymsp[0].minor.yy410.z?&yymsp[0].minor.yy410:&yymsp[-1].minor.yy410);
|
|
}
|
|
#line 2821 "parse.c"
|
|
break;
|
|
case 222:
|
|
#line 804 "parse.y"
|
|
{
|
|
Expr *p = yygotominor.yy172 = sqlite3Expr(TK_EXISTS, 0, 0, 0);
|
|
if( p ){
|
|
p->pSelect = yymsp[-1].minor.yy219;
|
|
sqlite3ExprSpan(p,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0);
|
|
}else{
|
|
sqlite3SelectDelete(yymsp[-1].minor.yy219);
|
|
}
|
|
}
|
|
#line 2834 "parse.c"
|
|
break;
|
|
case 223:
|
|
#line 816 "parse.y"
|
|
{
|
|
yygotominor.yy172 = sqlite3Expr(TK_CASE, yymsp[-3].minor.yy172, yymsp[-1].minor.yy172, 0);
|
|
if( yygotominor.yy172 ){
|
|
yygotominor.yy172->pList = yymsp[-2].minor.yy174;
|
|
}else{
|
|
sqlite3ExprListDelete(yymsp[-2].minor.yy174);
|
|
}
|
|
sqlite3ExprSpan(yygotominor.yy172, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0);
|
|
}
|
|
#line 2847 "parse.c"
|
|
break;
|
|
case 224:
|
|
#line 827 "parse.y"
|
|
{
|
|
yygotominor.yy174 = sqlite3ExprListAppend(yymsp[-4].minor.yy174, yymsp[-2].minor.yy172, 0);
|
|
yygotominor.yy174 = sqlite3ExprListAppend(yygotominor.yy174, yymsp[0].minor.yy172, 0);
|
|
}
|
|
#line 2855 "parse.c"
|
|
break;
|
|
case 225:
|
|
#line 831 "parse.y"
|
|
{
|
|
yygotominor.yy174 = sqlite3ExprListAppend(0, yymsp[-2].minor.yy172, 0);
|
|
yygotominor.yy174 = sqlite3ExprListAppend(yygotominor.yy174, yymsp[0].minor.yy172, 0);
|
|
}
|
|
#line 2863 "parse.c"
|
|
break;
|
|
case 234:
|
|
#line 858 "parse.y"
|
|
{
|
|
sqlite3CreateIndex(pParse, &yymsp[-6].minor.yy410, &yymsp[-5].minor.yy410, sqlite3SrcListAppend(0,&yymsp[-3].minor.yy410,0), yymsp[-1].minor.yy174, yymsp[-9].minor.yy46,
|
|
&yymsp[-10].minor.yy0, &yymsp[0].minor.yy0, SQLITE_SO_ASC, yymsp[-7].minor.yy46);
|
|
}
|
|
#line 2871 "parse.c"
|
|
break;
|
|
case 235:
|
|
case 280:
|
|
#line 864 "parse.y"
|
|
{yygotominor.yy46 = OE_Abort;}
|
|
#line 2877 "parse.c"
|
|
break;
|
|
case 236:
|
|
#line 865 "parse.y"
|
|
{yygotominor.yy46 = OE_None;}
|
|
#line 2882 "parse.c"
|
|
break;
|
|
case 239:
|
|
#line 875 "parse.y"
|
|
{
|
|
Expr *p = 0;
|
|
if( yymsp[-1].minor.yy410.n>0 ){
|
|
p = sqlite3Expr(TK_COLUMN, 0, 0, 0);
|
|
if( p ) p->pColl = sqlite3LocateCollSeq(pParse, (char*)yymsp[-1].minor.yy410.z, yymsp[-1].minor.yy410.n);
|
|
}
|
|
yygotominor.yy174 = sqlite3ExprListAppend(yymsp[-4].minor.yy174, p, &yymsp[-2].minor.yy410);
|
|
if( yygotominor.yy174 ) yygotominor.yy174->a[yygotominor.yy174->nExpr-1].sortOrder = yymsp[0].minor.yy46;
|
|
}
|
|
#line 2895 "parse.c"
|
|
break;
|
|
case 240:
|
|
#line 884 "parse.y"
|
|
{
|
|
Expr *p = 0;
|
|
if( yymsp[-1].minor.yy410.n>0 ){
|
|
p = sqlite3Expr(TK_COLUMN, 0, 0, 0);
|
|
if( p ) p->pColl = sqlite3LocateCollSeq(pParse, (char*)yymsp[-1].minor.yy410.z, yymsp[-1].minor.yy410.n);
|
|
}
|
|
yygotominor.yy174 = sqlite3ExprListAppend(0, p, &yymsp[-2].minor.yy410);
|
|
if( yygotominor.yy174 ) yygotominor.yy174->a[yygotominor.yy174->nExpr-1].sortOrder = yymsp[0].minor.yy46;
|
|
}
|
|
#line 2908 "parse.c"
|
|
break;
|
|
case 242:
|
|
#line 898 "parse.y"
|
|
{sqlite3DropIndex(pParse, yymsp[0].minor.yy373, yymsp[-1].minor.yy46);}
|
|
#line 2913 "parse.c"
|
|
break;
|
|
case 243:
|
|
case 244:
|
|
#line 903 "parse.y"
|
|
{sqlite3Vacuum(pParse);}
|
|
#line 2919 "parse.c"
|
|
break;
|
|
case 245:
|
|
case 247:
|
|
#line 910 "parse.y"
|
|
{sqlite3Pragma(pParse,&yymsp[-3].minor.yy410,&yymsp[-2].minor.yy410,&yymsp[0].minor.yy410,0);}
|
|
#line 2925 "parse.c"
|
|
break;
|
|
case 246:
|
|
#line 911 "parse.y"
|
|
{sqlite3Pragma(pParse,&yymsp[-3].minor.yy410,&yymsp[-2].minor.yy410,&yymsp[0].minor.yy0,0);}
|
|
#line 2930 "parse.c"
|
|
break;
|
|
case 248:
|
|
#line 913 "parse.y"
|
|
{
|
|
sqlite3Pragma(pParse,&yymsp[-3].minor.yy410,&yymsp[-2].minor.yy410,&yymsp[0].minor.yy410,1);
|
|
}
|
|
#line 2937 "parse.c"
|
|
break;
|
|
case 249:
|
|
#line 916 "parse.y"
|
|
{sqlite3Pragma(pParse,&yymsp[-4].minor.yy410,&yymsp[-3].minor.yy410,&yymsp[-1].minor.yy410,0);}
|
|
#line 2942 "parse.c"
|
|
break;
|
|
case 250:
|
|
#line 917 "parse.y"
|
|
{sqlite3Pragma(pParse,&yymsp[-1].minor.yy410,&yymsp[0].minor.yy410,0,0);}
|
|
#line 2947 "parse.c"
|
|
break;
|
|
case 256:
|
|
#line 929 "parse.y"
|
|
{
|
|
Token all;
|
|
all.z = yymsp[-3].minor.yy410.z;
|
|
all.n = (yymsp[0].minor.yy0.z - yymsp[-3].minor.yy410.z) + yymsp[0].minor.yy0.n;
|
|
sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy243, &all);
|
|
}
|
|
#line 2957 "parse.c"
|
|
break;
|
|
case 257:
|
|
#line 938 "parse.y"
|
|
{
|
|
sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy410, &yymsp[-6].minor.yy410, yymsp[-5].minor.yy46, yymsp[-4].minor.yy370.a, yymsp[-4].minor.yy370.b, yymsp[-2].minor.yy373, yymsp[-1].minor.yy46, yymsp[0].minor.yy172, yymsp[-10].minor.yy46, yymsp[-8].minor.yy46);
|
|
yygotominor.yy410 = (yymsp[-6].minor.yy410.n==0?yymsp[-7].minor.yy410:yymsp[-6].minor.yy410);
|
|
}
|
|
#line 2965 "parse.c"
|
|
break;
|
|
case 258:
|
|
case 261:
|
|
#line 944 "parse.y"
|
|
{ yygotominor.yy46 = TK_BEFORE; }
|
|
#line 2971 "parse.c"
|
|
break;
|
|
case 259:
|
|
#line 945 "parse.y"
|
|
{ yygotominor.yy46 = TK_AFTER; }
|
|
#line 2976 "parse.c"
|
|
break;
|
|
case 260:
|
|
#line 946 "parse.y"
|
|
{ yygotominor.yy46 = TK_INSTEAD;}
|
|
#line 2981 "parse.c"
|
|
break;
|
|
case 262:
|
|
case 263:
|
|
#line 951 "parse.y"
|
|
{yygotominor.yy370.a = yymsp[0].major; yygotominor.yy370.b = 0;}
|
|
#line 2987 "parse.c"
|
|
break;
|
|
case 264:
|
|
#line 953 "parse.y"
|
|
{yygotominor.yy370.a = TK_UPDATE; yygotominor.yy370.b = yymsp[0].minor.yy432;}
|
|
#line 2992 "parse.c"
|
|
break;
|
|
case 265:
|
|
case 266:
|
|
#line 956 "parse.y"
|
|
{ yygotominor.yy46 = TK_ROW; }
|
|
#line 2998 "parse.c"
|
|
break;
|
|
case 267:
|
|
#line 958 "parse.y"
|
|
{ yygotominor.yy46 = TK_STATEMENT; }
|
|
#line 3003 "parse.c"
|
|
break;
|
|
case 268:
|
|
#line 962 "parse.y"
|
|
{ yygotominor.yy172 = 0; }
|
|
#line 3008 "parse.c"
|
|
break;
|
|
case 269:
|
|
#line 963 "parse.y"
|
|
{ yygotominor.yy172 = yymsp[0].minor.yy172; }
|
|
#line 3013 "parse.c"
|
|
break;
|
|
case 270:
|
|
#line 967 "parse.y"
|
|
{
|
|
if( yymsp[-2].minor.yy243 ){
|
|
yymsp[-2].minor.yy243->pLast->pNext = yymsp[-1].minor.yy243;
|
|
}else{
|
|
yymsp[-2].minor.yy243 = yymsp[-1].minor.yy243;
|
|
}
|
|
yymsp[-2].minor.yy243->pLast = yymsp[-1].minor.yy243;
|
|
yygotominor.yy243 = yymsp[-2].minor.yy243;
|
|
}
|
|
#line 3026 "parse.c"
|
|
break;
|
|
case 271:
|
|
#line 976 "parse.y"
|
|
{ yygotominor.yy243 = 0; }
|
|
#line 3031 "parse.c"
|
|
break;
|
|
case 272:
|
|
#line 982 "parse.y"
|
|
{ yygotominor.yy243 = sqlite3TriggerUpdateStep(&yymsp[-3].minor.yy410, yymsp[-1].minor.yy174, yymsp[0].minor.yy172, yymsp[-4].minor.yy46); }
|
|
#line 3036 "parse.c"
|
|
break;
|
|
case 273:
|
|
#line 987 "parse.y"
|
|
{yygotominor.yy243 = sqlite3TriggerInsertStep(&yymsp[-5].minor.yy410, yymsp[-4].minor.yy432, yymsp[-1].minor.yy174, 0, yymsp[-7].minor.yy46);}
|
|
#line 3041 "parse.c"
|
|
break;
|
|
case 274:
|
|
#line 990 "parse.y"
|
|
{yygotominor.yy243 = sqlite3TriggerInsertStep(&yymsp[-2].minor.yy410, yymsp[-1].minor.yy432, 0, yymsp[0].minor.yy219, yymsp[-4].minor.yy46);}
|
|
#line 3046 "parse.c"
|
|
break;
|
|
case 275:
|
|
#line 994 "parse.y"
|
|
{yygotominor.yy243 = sqlite3TriggerDeleteStep(&yymsp[-1].minor.yy410, yymsp[0].minor.yy172);}
|
|
#line 3051 "parse.c"
|
|
break;
|
|
case 276:
|
|
#line 997 "parse.y"
|
|
{yygotominor.yy243 = sqlite3TriggerSelectStep(yymsp[0].minor.yy219); }
|
|
#line 3056 "parse.c"
|
|
break;
|
|
case 277:
|
|
#line 1000 "parse.y"
|
|
{
|
|
yygotominor.yy172 = sqlite3Expr(TK_RAISE, 0, 0, 0);
|
|
if( yygotominor.yy172 ){
|
|
yygotominor.yy172->iColumn = OE_Ignore;
|
|
sqlite3ExprSpan(yygotominor.yy172, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0);
|
|
}
|
|
}
|
|
#line 3067 "parse.c"
|
|
break;
|
|
case 278:
|
|
#line 1007 "parse.y"
|
|
{
|
|
yygotominor.yy172 = sqlite3Expr(TK_RAISE, 0, 0, &yymsp[-1].minor.yy410);
|
|
if( yygotominor.yy172 ) {
|
|
yygotominor.yy172->iColumn = yymsp[-3].minor.yy46;
|
|
sqlite3ExprSpan(yygotominor.yy172, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0);
|
|
}
|
|
}
|
|
#line 3078 "parse.c"
|
|
break;
|
|
case 279:
|
|
#line 1017 "parse.y"
|
|
{yygotominor.yy46 = OE_Rollback;}
|
|
#line 3083 "parse.c"
|
|
break;
|
|
case 281:
|
|
#line 1019 "parse.y"
|
|
{yygotominor.yy46 = OE_Fail;}
|
|
#line 3088 "parse.c"
|
|
break;
|
|
case 282:
|
|
#line 1024 "parse.y"
|
|
{
|
|
sqlite3DropTrigger(pParse,yymsp[0].minor.yy373,yymsp[-1].minor.yy46);
|
|
}
|
|
#line 3095 "parse.c"
|
|
break;
|
|
case 283:
|
|
#line 1030 "parse.y"
|
|
{
|
|
sqlite3Attach(pParse, yymsp[-3].minor.yy172, yymsp[-1].minor.yy172, yymsp[0].minor.yy386);
|
|
}
|
|
#line 3102 "parse.c"
|
|
break;
|
|
case 284:
|
|
#line 1035 "parse.y"
|
|
{ yygotominor.yy386 = 0; }
|
|
#line 3107 "parse.c"
|
|
break;
|
|
case 285:
|
|
#line 1036 "parse.y"
|
|
{ yygotominor.yy386 = yymsp[0].minor.yy172; }
|
|
#line 3112 "parse.c"
|
|
break;
|
|
case 288:
|
|
#line 1042 "parse.y"
|
|
{
|
|
sqlite3Detach(pParse, yymsp[0].minor.yy172);
|
|
}
|
|
#line 3119 "parse.c"
|
|
break;
|
|
case 289:
|
|
#line 1048 "parse.y"
|
|
{sqlite3Reindex(pParse, 0, 0);}
|
|
#line 3124 "parse.c"
|
|
break;
|
|
case 290:
|
|
#line 1049 "parse.y"
|
|
{sqlite3Reindex(pParse, &yymsp[-1].minor.yy410, &yymsp[0].minor.yy410);}
|
|
#line 3129 "parse.c"
|
|
break;
|
|
case 291:
|
|
#line 1054 "parse.y"
|
|
{sqlite3Analyze(pParse, 0, 0);}
|
|
#line 3134 "parse.c"
|
|
break;
|
|
case 292:
|
|
#line 1055 "parse.y"
|
|
{sqlite3Analyze(pParse, &yymsp[-1].minor.yy410, &yymsp[0].minor.yy410);}
|
|
#line 3139 "parse.c"
|
|
break;
|
|
case 293:
|
|
#line 1060 "parse.y"
|
|
{
|
|
sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy373,&yymsp[0].minor.yy410);
|
|
}
|
|
#line 3146 "parse.c"
|
|
break;
|
|
case 294:
|
|
#line 1063 "parse.y"
|
|
{
|
|
sqlite3AlterFinishAddColumn(pParse, &yymsp[0].minor.yy410);
|
|
}
|
|
#line 3153 "parse.c"
|
|
break;
|
|
case 295:
|
|
#line 1066 "parse.y"
|
|
{
|
|
sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy373);
|
|
}
|
|
#line 3160 "parse.c"
|
|
break;
|
|
case 298:
|
|
#line 1075 "parse.y"
|
|
{sqlite3VtabFinishParse(pParse,0);}
|
|
#line 3165 "parse.c"
|
|
break;
|
|
case 299:
|
|
#line 1076 "parse.y"
|
|
{sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);}
|
|
#line 3170 "parse.c"
|
|
break;
|
|
case 300:
|
|
#line 1077 "parse.y"
|
|
{
|
|
sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy410, &yymsp[-2].minor.yy410, &yymsp[0].minor.yy410);
|
|
}
|
|
#line 3177 "parse.c"
|
|
break;
|
|
case 303:
|
|
#line 1082 "parse.y"
|
|
{sqlite3VtabArgInit(pParse);}
|
|
#line 3182 "parse.c"
|
|
break;
|
|
case 305:
|
|
case 306:
|
|
case 307:
|
|
case 309:
|
|
#line 1084 "parse.y"
|
|
{sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);}
|
|
#line 3190 "parse.c"
|
|
break;
|
|
};
|
|
yygoto = yyRuleInfo[yyruleno].lhs;
|
|
yysize = yyRuleInfo[yyruleno].nrhs;
|
|
yypParser->yyidx -= yysize;
|
|
yyact = yy_find_reduce_action(yymsp[-yysize].stateno,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 = yyact;
|
|
yymsp->major = yygoto;
|
|
yymsp->minor = yygotominor;
|
|
}else
|
|
#endif
|
|
{
|
|
yy_shift(yypParser,yyact,yygoto,&yygotominor);
|
|
}
|
|
}else if( yyact == YYNSTATE + YYNRULE + 1 ){
|
|
yy_accept(yypParser);
|
|
}
|
|
}
|
|
|
|
/*
|
|
** The following code executes when the parse fails
|
|
*/
|
|
static void yy_parse_failed(
|
|
yyParser *yypParser /* The parser */
|
|
){
|
|
sqlite3ParserARG_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 */
|
|
sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */
|
|
}
|
|
|
|
/*
|
|
** 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 */
|
|
){
|
|
sqlite3ParserARG_FETCH;
|
|
#define TOKEN (yyminor.yy0)
|
|
#line 34 "parse.y"
|
|
|
|
if( !pParse->parseError ){
|
|
if( TOKEN.z[0] ){
|
|
sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN);
|
|
}else{
|
|
sqlite3ErrorMsg(pParse, "incomplete SQL statement");
|
|
}
|
|
pParse->parseError = 1;
|
|
}
|
|
#line 3258 "parse.c"
|
|
sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */
|
|
}
|
|
|
|
/*
|
|
** The following is executed when the parser accepts
|
|
*/
|
|
static void yy_accept(
|
|
yyParser *yypParser /* The parser */
|
|
){
|
|
sqlite3ParserARG_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 */
|
|
sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */
|
|
}
|
|
|
|
/* The main parser program.
|
|
** The first argument is a pointer to a structure obtained from
|
|
** "sqlite3ParserAlloc" which describes the current state of the parser.
|
|
** The second argument is the major token number. The third is
|
|
** the minor token. The fourth optional argument is whatever the
|
|
** user wants (and specified in the grammar) and is available for
|
|
** use by the action routines.
|
|
**
|
|
** Inputs:
|
|
** <ul>
|
|
** <li> A pointer to the parser (an opaque structure.)
|
|
** <li> The major token number.
|
|
** <li> The minor token number.
|
|
** <li> An option argument of a grammar-specified type.
|
|
** </ul>
|
|
**
|
|
** Outputs:
|
|
** None.
|
|
*/
|
|
void sqlite3Parser(
|
|
void *yyp, /* The parser */
|
|
int yymajor, /* The major token code number */
|
|
sqlite3ParserTOKENTYPE yyminor /* The value for the token */
|
|
sqlite3ParserARG_PDECL /* Optional %extra_argument parameter */
|
|
){
|
|
YYMINORTYPE yyminorunion;
|
|
int yyact; /* The parser action. */
|
|
int yyendofinput; /* True if we are at the end of input */
|
|
int yyerrorhit = 0; /* True if yymajor has invoked an error */
|
|
yyParser *yypParser; /* The parser */
|
|
|
|
/* (re)initialize the parser, if necessary */
|
|
yypParser = (yyParser*)yyp;
|
|
if( yypParser->yyidx<0 ){
|
|
/* if( yymajor==0 ) return; // not sure why this was here... */
|
|
yypParser->yyidx = 0;
|
|
yypParser->yyerrcnt = -1;
|
|
yypParser->yystack[0].stateno = 0;
|
|
yypParser->yystack[0].major = 0;
|
|
}
|
|
yyminorunion.yy0 = yyminor;
|
|
yyendofinput = (yymajor==0);
|
|
sqlite3ParserARG_STORE;
|
|
|
|
#ifndef NDEBUG
|
|
if( yyTraceFILE ){
|
|
fprintf(yyTraceFILE,"%sInput %s\n",yyTracePrompt,yyTokenName[yymajor]);
|
|
}
|
|
#endif
|
|
|
|
do{
|
|
yyact = yy_find_shift_action(yypParser,yymajor);
|
|
if( yyact<YYNSTATE ){
|
|
yy_shift(yypParser,yyact,yymajor,&yyminorunion);
|
|
yypParser->yyerrcnt--;
|
|
if( yyendofinput && yypParser->yyidx>=0 ){
|
|
yymajor = 0;
|
|
}else{
|
|
yymajor = YYNOCODE;
|
|
}
|
|
}else if( yyact < YYNSTATE + YYNRULE ){
|
|
yy_reduce(yypParser,yyact-YYNSTATE);
|
|
}else if( yyact == YY_ERROR_ACTION ){
|
|
int yymx;
|
|
#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(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(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 = 3;
|
|
yyerrorhit = 1;
|
|
#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 = 3;
|
|
yy_destructor(yymajor,&yyminorunion);
|
|
if( yyendofinput ){
|
|
yy_parse_failed(yypParser);
|
|
}
|
|
yymajor = YYNOCODE;
|
|
#endif
|
|
}else{
|
|
yy_accept(yypParser);
|
|
yymajor = YYNOCODE;
|
|
}
|
|
}while( yymajor!=YYNOCODE && yypParser->yyidx>=0 );
|
|
return;
|
|
}
|