sl@0
|
1 |
/* Driver template for the LEMON parser generator.
|
sl@0
|
2 |
** The author disclaims copyright to this source code.
|
sl@0
|
3 |
*/
|
sl@0
|
4 |
/* First off, code is included that follows the "include" declaration
|
sl@0
|
5 |
** in the input grammar file. */
|
sl@0
|
6 |
#include <stdio.h>
|
sl@0
|
7 |
#line 51 "parse.y"
|
sl@0
|
8 |
|
sl@0
|
9 |
#include "sqliteInt.h"
|
sl@0
|
10 |
|
sl@0
|
11 |
/*
|
sl@0
|
12 |
** An instance of this structure holds information about the
|
sl@0
|
13 |
** LIMIT clause of a SELECT statement.
|
sl@0
|
14 |
*/
|
sl@0
|
15 |
struct LimitVal {
|
sl@0
|
16 |
Expr *pLimit; /* The LIMIT expression. NULL if there is no limit */
|
sl@0
|
17 |
Expr *pOffset; /* The OFFSET expression. NULL if there is none */
|
sl@0
|
18 |
};
|
sl@0
|
19 |
|
sl@0
|
20 |
/*
|
sl@0
|
21 |
** An instance of this structure is used to store the LIKE,
|
sl@0
|
22 |
** GLOB, NOT LIKE, and NOT GLOB operators.
|
sl@0
|
23 |
*/
|
sl@0
|
24 |
struct LikeOp {
|
sl@0
|
25 |
Token eOperator; /* "like" or "glob" or "regexp" */
|
sl@0
|
26 |
int not; /* True if the NOT keyword is present */
|
sl@0
|
27 |
};
|
sl@0
|
28 |
|
sl@0
|
29 |
/*
|
sl@0
|
30 |
** An instance of the following structure describes the event of a
|
sl@0
|
31 |
** TRIGGER. "a" is the event type, one of TK_UPDATE, TK_INSERT,
|
sl@0
|
32 |
** TK_DELETE, or TK_INSTEAD. If the event is of the form
|
sl@0
|
33 |
**
|
sl@0
|
34 |
** UPDATE ON (a,b,c)
|
sl@0
|
35 |
**
|
sl@0
|
36 |
** Then the "b" IdList records the list "a,b,c".
|
sl@0
|
37 |
*/
|
sl@0
|
38 |
struct TrigEvent { int a; IdList * b; };
|
sl@0
|
39 |
|
sl@0
|
40 |
/*
|
sl@0
|
41 |
** An instance of this structure holds the ATTACH key and the key type.
|
sl@0
|
42 |
*/
|
sl@0
|
43 |
struct AttachKey { int type; Token key; };
|
sl@0
|
44 |
|
sl@0
|
45 |
#line 48 "parse.c"
|
sl@0
|
46 |
/* Next is all token values, in a form suitable for use by makeheaders.
|
sl@0
|
47 |
** This section will be null unless lemon is run with the -m switch.
|
sl@0
|
48 |
*/
|
sl@0
|
49 |
/*
|
sl@0
|
50 |
** These constants (all generated automatically by the parser generator)
|
sl@0
|
51 |
** specify the various kinds of tokens (terminals) that the parser
|
sl@0
|
52 |
** understands.
|
sl@0
|
53 |
**
|
sl@0
|
54 |
** Each symbol here is a terminal symbol in the grammar.
|
sl@0
|
55 |
*/
|
sl@0
|
56 |
/* Make sure the INTERFACE macro is defined.
|
sl@0
|
57 |
*/
|
sl@0
|
58 |
#ifndef INTERFACE
|
sl@0
|
59 |
# define INTERFACE 1
|
sl@0
|
60 |
#endif
|
sl@0
|
61 |
/* The next thing included is series of defines which control
|
sl@0
|
62 |
** various aspects of the generated parser.
|
sl@0
|
63 |
** YYCODETYPE is the data type used for storing terminal
|
sl@0
|
64 |
** and nonterminal numbers. "unsigned char" is
|
sl@0
|
65 |
** used if there are fewer than 250 terminals
|
sl@0
|
66 |
** and nonterminals. "int" is used otherwise.
|
sl@0
|
67 |
** YYNOCODE is a number of type YYCODETYPE which corresponds
|
sl@0
|
68 |
** to no legal terminal or nonterminal number. This
|
sl@0
|
69 |
** number is used to fill in empty slots of the hash
|
sl@0
|
70 |
** table.
|
sl@0
|
71 |
** YYFALLBACK If defined, this indicates that one or more tokens
|
sl@0
|
72 |
** have fall-back values which should be used if the
|
sl@0
|
73 |
** original value of the token will not parse.
|
sl@0
|
74 |
** YYACTIONTYPE is the data type used for storing terminal
|
sl@0
|
75 |
** and nonterminal numbers. "unsigned char" is
|
sl@0
|
76 |
** used if there are fewer than 250 rules and
|
sl@0
|
77 |
** states combined. "int" is used otherwise.
|
sl@0
|
78 |
** sqlite3ParserTOKENTYPE is the data type used for minor tokens given
|
sl@0
|
79 |
** directly to the parser from the tokenizer.
|
sl@0
|
80 |
** YYMINORTYPE is the data type used for all minor tokens.
|
sl@0
|
81 |
** This is typically a union of many types, one of
|
sl@0
|
82 |
** which is sqlite3ParserTOKENTYPE. The entry in the union
|
sl@0
|
83 |
** for base tokens is called "yy0".
|
sl@0
|
84 |
** YYSTACKDEPTH is the maximum depth of the parser's stack. If
|
sl@0
|
85 |
** zero the stack is dynamically sized using realloc()
|
sl@0
|
86 |
** sqlite3ParserARG_SDECL A static variable declaration for the %extra_argument
|
sl@0
|
87 |
** sqlite3ParserARG_PDECL A parameter declaration for the %extra_argument
|
sl@0
|
88 |
** sqlite3ParserARG_STORE Code to store %extra_argument into yypParser
|
sl@0
|
89 |
** sqlite3ParserARG_FETCH Code to extract %extra_argument from yypParser
|
sl@0
|
90 |
** YYNSTATE the combined number of states.
|
sl@0
|
91 |
** YYNRULE the number of rules in the grammar
|
sl@0
|
92 |
** YYERRORSYMBOL is the code number of the error symbol. If not
|
sl@0
|
93 |
** defined, then do no error processing.
|
sl@0
|
94 |
*/
|
sl@0
|
95 |
#define YYCODETYPE unsigned char
|
sl@0
|
96 |
#define YYNOCODE 243
|
sl@0
|
97 |
#define YYACTIONTYPE unsigned short int
|
sl@0
|
98 |
#define YYWILDCARD 59
|
sl@0
|
99 |
#define sqlite3ParserTOKENTYPE Token
|
sl@0
|
100 |
typedef union {
|
sl@0
|
101 |
sqlite3ParserTOKENTYPE yy0;
|
sl@0
|
102 |
struct LikeOp yy30;
|
sl@0
|
103 |
Select* yy91;
|
sl@0
|
104 |
IdList* yy232;
|
sl@0
|
105 |
struct {int value; int mask;} yy319;
|
sl@0
|
106 |
ExprList* yy322;
|
sl@0
|
107 |
int yy328;
|
sl@0
|
108 |
struct TrigEvent yy378;
|
sl@0
|
109 |
struct LimitVal yy388;
|
sl@0
|
110 |
Expr* yy418;
|
sl@0
|
111 |
SrcList* yy439;
|
sl@0
|
112 |
TriggerStep* yy451;
|
sl@0
|
113 |
} YYMINORTYPE;
|
sl@0
|
114 |
#ifndef YYSTACKDEPTH
|
sl@0
|
115 |
#define YYSTACKDEPTH 100
|
sl@0
|
116 |
#endif
|
sl@0
|
117 |
#define sqlite3ParserARG_SDECL Parse *pParse;
|
sl@0
|
118 |
#define sqlite3ParserARG_PDECL ,Parse *pParse
|
sl@0
|
119 |
#define sqlite3ParserARG_FETCH Parse *pParse = yypParser->pParse
|
sl@0
|
120 |
#define sqlite3ParserARG_STORE yypParser->pParse = pParse
|
sl@0
|
121 |
#define YYNSTATE 578
|
sl@0
|
122 |
#define YYNRULE 303
|
sl@0
|
123 |
#define YYFALLBACK 1
|
sl@0
|
124 |
#define YY_NO_ACTION (YYNSTATE+YYNRULE+2)
|
sl@0
|
125 |
#define YY_ACCEPT_ACTION (YYNSTATE+YYNRULE+1)
|
sl@0
|
126 |
#define YY_ERROR_ACTION (YYNSTATE+YYNRULE)
|
sl@0
|
127 |
|
sl@0
|
128 |
/* The yyzerominor constant is used to initialize instances of
|
sl@0
|
129 |
** YYMINORTYPE objects to zero. */
|
sl@0
|
130 |
#ifdef __cplusplus
|
sl@0
|
131 |
static YYMINORTYPE yyzerominor;
|
sl@0
|
132 |
#else
|
sl@0
|
133 |
static const YYMINORTYPE yyzerominor;
|
sl@0
|
134 |
#endif
|
sl@0
|
135 |
|
sl@0
|
136 |
/* Next are the tables used to determine what action to take based on the
|
sl@0
|
137 |
** current state and lookahead token. These tables are used to implement
|
sl@0
|
138 |
** functions that take a state number and lookahead value and return an
|
sl@0
|
139 |
** action integer.
|
sl@0
|
140 |
**
|
sl@0
|
141 |
** Suppose the action integer is N. Then the action is determined as
|
sl@0
|
142 |
** follows
|
sl@0
|
143 |
**
|
sl@0
|
144 |
** 0 <= N < YYNSTATE Shift N. That is, push the lookahead
|
sl@0
|
145 |
** token onto the stack and goto state N.
|
sl@0
|
146 |
**
|
sl@0
|
147 |
** YYNSTATE <= N < YYNSTATE+YYNRULE Reduce by rule N-YYNSTATE.
|
sl@0
|
148 |
**
|
sl@0
|
149 |
** N == YYNSTATE+YYNRULE A syntax error has occurred.
|
sl@0
|
150 |
**
|
sl@0
|
151 |
** N == YYNSTATE+YYNRULE+1 The parser accepts its input.
|
sl@0
|
152 |
**
|
sl@0
|
153 |
** N == YYNSTATE+YYNRULE+2 No such action. Denotes unused
|
sl@0
|
154 |
** slots in the yy_action[] table.
|
sl@0
|
155 |
**
|
sl@0
|
156 |
** The action table is constructed as a single large table named yy_action[].
|
sl@0
|
157 |
** Given state S and lookahead X, the action is computed as
|
sl@0
|
158 |
**
|
sl@0
|
159 |
** yy_action[ yy_shift_ofst[S] + X ]
|
sl@0
|
160 |
**
|
sl@0
|
161 |
** If the index value yy_shift_ofst[S]+X is out of range or if the value
|
sl@0
|
162 |
** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X or if yy_shift_ofst[S]
|
sl@0
|
163 |
** is equal to YY_SHIFT_USE_DFLT, it means that the action is not in the table
|
sl@0
|
164 |
** and that yy_default[S] should be used instead.
|
sl@0
|
165 |
**
|
sl@0
|
166 |
** The formula above is for computing the action when the lookahead is
|
sl@0
|
167 |
** a terminal symbol. If the lookahead is a non-terminal (as occurs after
|
sl@0
|
168 |
** a reduce action) then the yy_reduce_ofst[] array is used in place of
|
sl@0
|
169 |
** the yy_shift_ofst[] array and YY_REDUCE_USE_DFLT is used in place of
|
sl@0
|
170 |
** YY_SHIFT_USE_DFLT.
|
sl@0
|
171 |
**
|
sl@0
|
172 |
** The following are the tables generated in this section:
|
sl@0
|
173 |
**
|
sl@0
|
174 |
** yy_action[] A single table containing all actions.
|
sl@0
|
175 |
** yy_lookahead[] A table containing the lookahead for each entry in
|
sl@0
|
176 |
** yy_action. Used to detect hash collisions.
|
sl@0
|
177 |
** yy_shift_ofst[] For each state, the offset into yy_action for
|
sl@0
|
178 |
** shifting terminals.
|
sl@0
|
179 |
** yy_reduce_ofst[] For each state, the offset into yy_action for
|
sl@0
|
180 |
** shifting non-terminals after a reduce.
|
sl@0
|
181 |
** yy_default[] Default action for each state.
|
sl@0
|
182 |
*/
|
sl@0
|
183 |
static const YYACTIONTYPE yy_action[] = {
|
sl@0
|
184 |
/* 0 */ 288, 882, 118, 577, 2, 169, 412, 412, 62, 62,
|
sl@0
|
185 |
/* 10 */ 62, 62, 205, 64, 64, 64, 64, 65, 65, 66,
|
sl@0
|
186 |
/* 20 */ 66, 66, 67, 207, 385, 382, 419, 425, 69, 64,
|
sl@0
|
187 |
/* 30 */ 64, 64, 64, 65, 65, 66, 66, 66, 67, 207,
|
sl@0
|
188 |
/* 40 */ 445, 443, 317, 165, 61, 60, 293, 429, 430, 426,
|
sl@0
|
189 |
/* 50 */ 426, 63, 63, 62, 62, 62, 62, 251, 64, 64,
|
sl@0
|
190 |
/* 60 */ 64, 64, 65, 65, 66, 66, 66, 67, 207, 288,
|
sl@0
|
191 |
/* 70 */ 485, 412, 412, 207, 414, 83, 68, 456, 70, 151,
|
sl@0
|
192 |
/* 80 */ 64, 64, 64, 64, 65, 65, 66, 66, 66, 67,
|
sl@0
|
193 |
/* 90 */ 207, 68, 299, 70, 151, 419, 425, 441, 209, 59,
|
sl@0
|
194 |
/* 100 */ 65, 65, 66, 66, 66, 67, 207, 416, 416, 416,
|
sl@0
|
195 |
/* 110 */ 484, 569, 288, 61, 60, 293, 429, 430, 426, 426,
|
sl@0
|
196 |
/* 120 */ 63, 63, 62, 62, 62, 62, 311, 64, 64, 64,
|
sl@0
|
197 |
/* 130 */ 64, 65, 65, 66, 66, 66, 67, 207, 419, 425,
|
sl@0
|
198 |
/* 140 */ 95, 66, 66, 66, 67, 207, 390, 263, 408, 35,
|
sl@0
|
199 |
/* 150 */ 57, 22, 472, 172, 404, 412, 61, 60, 293, 429,
|
sl@0
|
200 |
/* 160 */ 430, 426, 426, 63, 63, 62, 62, 62, 62, 162,
|
sl@0
|
201 |
/* 170 */ 64, 64, 64, 64, 65, 65, 66, 66, 66, 67,
|
sl@0
|
202 |
/* 180 */ 207, 288, 578, 385, 382, 567, 109, 409, 264, 445,
|
sl@0
|
203 |
/* 190 */ 403, 325, 307, 387, 486, 311, 336, 204, 514, 173,
|
sl@0
|
204 |
/* 200 */ 157, 441, 209, 566, 197, 334, 230, 419, 425, 146,
|
sl@0
|
205 |
/* 210 */ 147, 391, 392, 68, 295, 70, 151, 408, 42, 485,
|
sl@0
|
206 |
/* 220 */ 412, 563, 564, 414, 288, 61, 60, 293, 429, 430,
|
sl@0
|
207 |
/* 230 */ 426, 426, 63, 63, 62, 62, 62, 62, 409, 64,
|
sl@0
|
208 |
/* 240 */ 64, 64, 64, 65, 65, 66, 66, 66, 67, 207,
|
sl@0
|
209 |
/* 250 */ 419, 425, 402, 517, 527, 263, 416, 416, 416, 211,
|
sl@0
|
210 |
/* 260 */ 545, 514, 612, 374, 520, 377, 208, 288, 61, 60,
|
sl@0
|
211 |
/* 270 */ 293, 429, 430, 426, 426, 63, 63, 62, 62, 62,
|
sl@0
|
212 |
/* 280 */ 62, 567, 64, 64, 64, 64, 65, 65, 66, 66,
|
sl@0
|
213 |
/* 290 */ 66, 67, 207, 419, 425, 519, 379, 296, 544, 566,
|
sl@0
|
214 |
/* 300 */ 565, 229, 468, 285, 529, 21, 443, 518, 165, 67,
|
sl@0
|
215 |
/* 310 */ 207, 61, 60, 293, 429, 430, 426, 426, 63, 63,
|
sl@0
|
216 |
/* 320 */ 62, 62, 62, 62, 468, 64, 64, 64, 64, 65,
|
sl@0
|
217 |
/* 330 */ 65, 66, 66, 66, 67, 207, 526, 501, 237, 450,
|
sl@0
|
218 |
/* 340 */ 78, 213, 288, 525, 296, 519, 480, 381, 369, 269,
|
sl@0
|
219 |
/* 350 */ 268, 451, 390, 205, 401, 21, 322, 149, 311, 205,
|
sl@0
|
220 |
/* 360 */ 463, 562, 208, 241, 452, 219, 321, 368, 419, 425,
|
sl@0
|
221 |
/* 370 */ 156, 161, 114, 243, 339, 248, 340, 174, 148, 528,
|
sl@0
|
222 |
/* 380 */ 408, 36, 330, 81, 252, 238, 61, 60, 293, 429,
|
sl@0
|
223 |
/* 390 */ 430, 426, 426, 63, 63, 62, 62, 62, 62, 5,
|
sl@0
|
224 |
/* 400 */ 64, 64, 64, 64, 65, 65, 66, 66, 66, 67,
|
sl@0
|
225 |
/* 410 */ 207, 288, 219, 489, 490, 483, 390, 391, 392, 114,
|
sl@0
|
226 |
/* 420 */ 243, 339, 248, 340, 174, 180, 311, 155, 341, 344,
|
sl@0
|
227 |
/* 430 */ 345, 252, 519, 236, 152, 384, 2, 419, 425, 346,
|
sl@0
|
228 |
/* 440 */ 180, 574, 21, 341, 344, 345, 206, 390, 408, 35,
|
sl@0
|
229 |
/* 450 */ 225, 468, 463, 56, 346, 61, 60, 293, 429, 430,
|
sl@0
|
230 |
/* 460 */ 426, 426, 63, 63, 62, 62, 62, 62, 409, 64,
|
sl@0
|
231 |
/* 470 */ 64, 64, 64, 65, 65, 66, 66, 66, 67, 207,
|
sl@0
|
232 |
/* 480 */ 288, 391, 392, 180, 500, 487, 341, 344, 345, 312,
|
sl@0
|
233 |
/* 490 */ 476, 325, 337, 311, 405, 311, 324, 346, 542, 490,
|
sl@0
|
234 |
/* 500 */ 420, 421, 441, 150, 168, 157, 419, 425, 68, 544,
|
sl@0
|
235 |
/* 510 */ 70, 151, 391, 392, 389, 408, 42, 408, 28, 407,
|
sl@0
|
236 |
/* 520 */ 198, 423, 424, 406, 61, 60, 293, 429, 430, 426,
|
sl@0
|
237 |
/* 530 */ 426, 63, 63, 62, 62, 62, 62, 409, 64, 64,
|
sl@0
|
238 |
/* 540 */ 64, 64, 65, 65, 66, 66, 66, 67, 207, 288,
|
sl@0
|
239 |
/* 550 */ 422, 311, 450, 255, 409, 349, 327, 212, 311, 369,
|
sl@0
|
240 |
/* 560 */ 269, 268, 115, 479, 451, 311, 393, 394, 395, 433,
|
sl@0
|
241 |
/* 570 */ 205, 415, 191, 408, 50, 419, 425, 452, 472, 491,
|
sl@0
|
242 |
/* 580 */ 408, 50, 175, 539, 535, 356, 535, 408, 35, 492,
|
sl@0
|
243 |
/* 590 */ 294, 436, 437, 61, 60, 293, 429, 430, 426, 426,
|
sl@0
|
244 |
/* 600 */ 63, 63, 62, 62, 62, 62, 409, 64, 64, 64,
|
sl@0
|
245 |
/* 610 */ 64, 65, 65, 66, 66, 66, 67, 207, 288, 442,
|
sl@0
|
246 |
/* 620 */ 304, 251, 1, 94, 10, 537, 390, 305, 390, 536,
|
sl@0
|
247 |
/* 630 */ 329, 367, 316, 436, 437, 472, 169, 290, 412, 407,
|
sl@0
|
248 |
/* 640 */ 357, 358, 252, 406, 419, 425, 439, 439, 18, 314,
|
sl@0
|
249 |
/* 650 */ 323, 432, 432, 370, 208, 314, 220, 432, 432, 541,
|
sl@0
|
250 |
/* 660 */ 272, 288, 61, 60, 293, 429, 430, 426, 426, 63,
|
sl@0
|
251 |
/* 670 */ 63, 62, 62, 62, 62, 390, 64, 64, 64, 64,
|
sl@0
|
252 |
/* 680 */ 65, 65, 66, 66, 66, 67, 207, 419, 425, 446,
|
sl@0
|
253 |
/* 690 */ 454, 391, 392, 391, 392, 462, 208, 303, 275, 817,
|
sl@0
|
254 |
/* 700 */ 273, 291, 191, 412, 288, 61, 60, 293, 429, 430,
|
sl@0
|
255 |
/* 710 */ 426, 426, 63, 63, 62, 62, 62, 62, 366, 64,
|
sl@0
|
256 |
/* 720 */ 64, 64, 64, 65, 65, 66, 66, 66, 67, 207,
|
sl@0
|
257 |
/* 730 */ 419, 425, 478, 175, 333, 314, 409, 432, 432, 458,
|
sl@0
|
258 |
/* 740 */ 391, 392, 176, 177, 178, 195, 459, 288, 61, 71,
|
sl@0
|
259 |
/* 750 */ 293, 429, 430, 426, 426, 63, 63, 62, 62, 62,
|
sl@0
|
260 |
/* 760 */ 62, 367, 64, 64, 64, 64, 65, 65, 66, 66,
|
sl@0
|
261 |
/* 770 */ 66, 67, 207, 419, 425, 314, 359, 432, 432, 409,
|
sl@0
|
262 |
/* 780 */ 274, 362, 467, 363, 221, 257, 251, 251, 290, 251,
|
sl@0
|
263 |
/* 790 */ 288, 503, 60, 293, 429, 430, 426, 426, 63, 63,
|
sl@0
|
264 |
/* 800 */ 62, 62, 62, 62, 335, 64, 64, 64, 64, 65,
|
sl@0
|
265 |
/* 810 */ 65, 66, 66, 66, 67, 207, 419, 425, 390, 471,
|
sl@0
|
266 |
/* 820 */ 390, 300, 301, 261, 302, 259, 408, 3, 77, 153,
|
sl@0
|
267 |
/* 830 */ 79, 263, 366, 332, 182, 473, 293, 429, 430, 426,
|
sl@0
|
268 |
/* 840 */ 426, 63, 63, 62, 62, 62, 62, 311, 64, 64,
|
sl@0
|
269 |
/* 850 */ 64, 64, 65, 65, 66, 66, 66, 67, 207, 73,
|
sl@0
|
270 |
/* 860 */ 318, 179, 4, 409, 263, 311, 292, 263, 409, 408,
|
sl@0
|
271 |
/* 870 */ 29, 311, 552, 311, 315, 73, 318, 311, 4, 508,
|
sl@0
|
272 |
/* 880 */ 311, 509, 292, 391, 392, 391, 392, 408, 24, 185,
|
sl@0
|
273 |
/* 890 */ 315, 320, 263, 408, 33, 408, 54, 311, 224, 408,
|
sl@0
|
274 |
/* 900 */ 53, 445, 408, 99, 311, 554, 311, 320, 555, 464,
|
sl@0
|
275 |
/* 910 */ 20, 465, 142, 249, 263, 193, 502, 445, 311, 408,
|
sl@0
|
276 |
/* 920 */ 97, 76, 75, 409, 263, 506, 408, 102, 408, 103,
|
sl@0
|
277 |
/* 930 */ 74, 309, 310, 556, 313, 414, 498, 76, 75, 477,
|
sl@0
|
278 |
/* 940 */ 408, 108, 376, 188, 311, 507, 74, 309, 310, 73,
|
sl@0
|
279 |
/* 950 */ 318, 414, 4, 205, 311, 222, 292, 311, 495, 496,
|
sl@0
|
280 |
/* 960 */ 311, 205, 263, 244, 315, 223, 408, 110, 416, 416,
|
sl@0
|
281 |
/* 970 */ 416, 417, 418, 12, 245, 375, 408, 17, 250, 408,
|
sl@0
|
282 |
/* 980 */ 100, 320, 408, 34, 416, 416, 416, 417, 418, 12,
|
sl@0
|
283 |
/* 990 */ 461, 445, 434, 159, 23, 311, 521, 298, 226, 227,
|
sl@0
|
284 |
/* 1000 */ 228, 105, 256, 278, 311, 470, 311, 170, 311, 258,
|
sl@0
|
285 |
/* 1010 */ 427, 76, 75, 260, 202, 85, 280, 408, 98, 353,
|
sl@0
|
286 |
/* 1020 */ 74, 309, 310, 281, 311, 414, 408, 25, 408, 55,
|
sl@0
|
287 |
/* 1030 */ 408, 111, 311, 262, 311, 200, 510, 544, 179, 505,
|
sl@0
|
288 |
/* 1040 */ 504, 199, 311, 231, 201, 311, 408, 112, 311, 254,
|
sl@0
|
289 |
/* 1050 */ 311, 179, 311, 267, 408, 113, 408, 26, 416, 416,
|
sl@0
|
290 |
/* 1060 */ 416, 417, 418, 12, 408, 37, 399, 408, 38, 311,
|
sl@0
|
291 |
/* 1070 */ 408, 27, 408, 39, 408, 40, 348, 311, 179, 311,
|
sl@0
|
292 |
/* 1080 */ 540, 145, 179, 548, 311, 170, 311, 372, 277, 268,
|
sl@0
|
293 |
/* 1090 */ 311, 408, 41, 289, 549, 311, 92, 311, 205, 408,
|
sl@0
|
294 |
/* 1100 */ 43, 408, 44, 311, 361, 311, 408, 45, 408, 30,
|
sl@0
|
295 |
/* 1110 */ 19, 364, 408, 31, 559, 311, 92, 408, 46, 408,
|
sl@0
|
296 |
/* 1120 */ 47, 311, 365, 378, 270, 408, 48, 408, 49, 311,
|
sl@0
|
297 |
/* 1130 */ 271, 311, 561, 144, 279, 282, 438, 408, 32, 283,
|
sl@0
|
298 |
/* 1140 */ 573, 413, 440, 408, 11, 319, 160, 501, 457, 239,
|
sl@0
|
299 |
/* 1150 */ 460, 408, 51, 408, 52, 512, 547, 515, 276, 8,
|
sl@0
|
300 |
/* 1160 */ 558, 388, 246, 511, 373, 396, 397, 513, 398, 7,
|
sl@0
|
301 |
/* 1170 */ 343, 85, 308, 232, 328, 58, 233, 84, 80, 326,
|
sl@0
|
302 |
/* 1180 */ 167, 455, 210, 119, 86, 338, 331, 410, 297, 494,
|
sl@0
|
303 |
/* 1190 */ 498, 122, 488, 217, 493, 234, 247, 235, 286, 411,
|
sl@0
|
304 |
/* 1200 */ 497, 350, 287, 499, 522, 516, 523, 240, 524, 469,
|
sl@0
|
305 |
/* 1210 */ 242, 183, 475, 354, 89, 530, 184, 117, 352, 186,
|
sl@0
|
306 |
/* 1220 */ 543, 130, 192, 187, 532, 189, 140, 371, 360, 131,
|
sl@0
|
307 |
/* 1230 */ 216, 132, 133, 218, 550, 557, 134, 136, 306, 570,
|
sl@0
|
308 |
/* 1240 */ 575, 571, 265, 572, 533, 386, 400, 613, 215, 139,
|
sl@0
|
309 |
/* 1250 */ 93, 96, 107, 104, 614, 101, 163, 164, 428, 431,
|
sl@0
|
310 |
/* 1260 */ 72, 447, 435, 444, 141, 154, 6, 448, 466, 449,
|
sl@0
|
311 |
/* 1270 */ 166, 453, 14, 120, 82, 13, 171, 474, 121, 158,
|
sl@0
|
312 |
/* 1280 */ 481, 482, 214, 87, 342, 123, 124, 116, 253, 88,
|
sl@0
|
313 |
/* 1290 */ 125, 181, 245, 351, 143, 531, 126, 170, 355, 266,
|
sl@0
|
314 |
/* 1300 */ 347, 190, 128, 9, 127, 546, 129, 90, 534, 15,
|
sl@0
|
315 |
/* 1310 */ 538, 194, 196, 551, 553, 137, 138, 106, 135, 16,
|
sl@0
|
316 |
/* 1320 */ 560, 568, 284, 203, 383, 883, 380, 576, 883, 883,
|
sl@0
|
317 |
/* 1330 */ 883, 91,
|
sl@0
|
318 |
};
|
sl@0
|
319 |
static const YYCODETYPE yy_lookahead[] = {
|
sl@0
|
320 |
/* 0 */ 16, 140, 141, 142, 143, 21, 23, 23, 69, 70,
|
sl@0
|
321 |
/* 10 */ 71, 72, 110, 74, 75, 76, 77, 78, 79, 80,
|
sl@0
|
322 |
/* 20 */ 81, 82, 83, 84, 1, 2, 42, 43, 73, 74,
|
sl@0
|
323 |
/* 30 */ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
|
sl@0
|
324 |
/* 40 */ 58, 162, 163, 164, 60, 61, 62, 63, 64, 65,
|
sl@0
|
325 |
/* 50 */ 66, 67, 68, 69, 70, 71, 72, 148, 74, 75,
|
sl@0
|
326 |
/* 60 */ 76, 77, 78, 79, 80, 81, 82, 83, 84, 16,
|
sl@0
|
327 |
/* 70 */ 88, 88, 88, 84, 92, 22, 219, 220, 221, 222,
|
sl@0
|
328 |
/* 80 */ 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
|
sl@0
|
329 |
/* 90 */ 84, 219, 183, 221, 222, 42, 43, 78, 79, 46,
|
sl@0
|
330 |
/* 100 */ 78, 79, 80, 81, 82, 83, 84, 125, 126, 127,
|
sl@0
|
331 |
/* 110 */ 170, 239, 16, 60, 61, 62, 63, 64, 65, 66,
|
sl@0
|
332 |
/* 120 */ 67, 68, 69, 70, 71, 72, 148, 74, 75, 76,
|
sl@0
|
333 |
/* 130 */ 77, 78, 79, 80, 81, 82, 83, 84, 42, 43,
|
sl@0
|
334 |
/* 140 */ 44, 80, 81, 82, 83, 84, 23, 148, 170, 171,
|
sl@0
|
335 |
/* 150 */ 19, 19, 148, 156, 23, 23, 60, 61, 62, 63,
|
sl@0
|
336 |
/* 160 */ 64, 65, 66, 67, 68, 69, 70, 71, 72, 19,
|
sl@0
|
337 |
/* 170 */ 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
|
sl@0
|
338 |
/* 180 */ 84, 16, 0, 1, 2, 148, 21, 190, 189, 58,
|
sl@0
|
339 |
/* 190 */ 169, 213, 144, 145, 170, 148, 218, 149, 177, 202,
|
sl@0
|
340 |
/* 200 */ 203, 78, 79, 166, 156, 208, 191, 42, 43, 78,
|
sl@0
|
341 |
/* 210 */ 79, 88, 89, 219, 210, 221, 222, 170, 171, 88,
|
sl@0
|
342 |
/* 220 */ 88, 98, 99, 92, 16, 60, 61, 62, 63, 64,
|
sl@0
|
343 |
/* 230 */ 65, 66, 67, 68, 69, 70, 71, 72, 190, 74,
|
sl@0
|
344 |
/* 240 */ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
|
sl@0
|
345 |
/* 250 */ 42, 43, 168, 169, 182, 148, 125, 126, 127, 212,
|
sl@0
|
346 |
/* 260 */ 11, 177, 112, 215, 182, 228, 229, 16, 60, 61,
|
sl@0
|
347 |
/* 270 */ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
|
sl@0
|
348 |
/* 280 */ 72, 148, 74, 75, 76, 77, 78, 79, 80, 81,
|
sl@0
|
349 |
/* 290 */ 82, 83, 84, 42, 43, 148, 189, 16, 49, 166,
|
sl@0
|
350 |
/* 300 */ 167, 154, 162, 159, 157, 158, 162, 163, 164, 83,
|
sl@0
|
351 |
/* 310 */ 84, 60, 61, 62, 63, 64, 65, 66, 67, 68,
|
sl@0
|
352 |
/* 320 */ 69, 70, 71, 72, 162, 74, 75, 76, 77, 78,
|
sl@0
|
353 |
/* 330 */ 79, 80, 81, 82, 83, 84, 177, 178, 148, 12,
|
sl@0
|
354 |
/* 340 */ 132, 201, 16, 184, 16, 148, 20, 240, 99, 100,
|
sl@0
|
355 |
/* 350 */ 101, 24, 23, 110, 157, 158, 187, 22, 148, 110,
|
sl@0
|
356 |
/* 360 */ 22, 228, 229, 201, 37, 84, 39, 124, 42, 43,
|
sl@0
|
357 |
/* 370 */ 148, 90, 91, 92, 93, 94, 95, 96, 181, 182,
|
sl@0
|
358 |
/* 380 */ 170, 171, 148, 132, 103, 148, 60, 61, 62, 63,
|
sl@0
|
359 |
/* 390 */ 64, 65, 66, 67, 68, 69, 70, 71, 72, 192,
|
sl@0
|
360 |
/* 400 */ 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
|
sl@0
|
361 |
/* 410 */ 84, 16, 84, 186, 187, 20, 23, 88, 89, 91,
|
sl@0
|
362 |
/* 420 */ 92, 93, 94, 95, 96, 90, 148, 89, 93, 94,
|
sl@0
|
363 |
/* 430 */ 95, 103, 148, 223, 156, 142, 143, 42, 43, 104,
|
sl@0
|
364 |
/* 440 */ 90, 157, 158, 93, 94, 95, 193, 23, 170, 171,
|
sl@0
|
365 |
/* 450 */ 146, 162, 114, 200, 104, 60, 61, 62, 63, 64,
|
sl@0
|
366 |
/* 460 */ 65, 66, 67, 68, 69, 70, 71, 72, 190, 74,
|
sl@0
|
367 |
/* 470 */ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
|
sl@0
|
368 |
/* 480 */ 16, 88, 89, 90, 20, 161, 93, 94, 95, 148,
|
sl@0
|
369 |
/* 490 */ 201, 213, 80, 148, 170, 148, 218, 104, 186, 187,
|
sl@0
|
370 |
/* 500 */ 42, 43, 78, 156, 202, 203, 42, 43, 219, 49,
|
sl@0
|
371 |
/* 510 */ 221, 222, 88, 89, 148, 170, 171, 170, 171, 107,
|
sl@0
|
372 |
/* 520 */ 156, 63, 64, 111, 60, 61, 62, 63, 64, 65,
|
sl@0
|
373 |
/* 530 */ 66, 67, 68, 69, 70, 71, 72, 190, 74, 75,
|
sl@0
|
374 |
/* 540 */ 76, 77, 78, 79, 80, 81, 82, 83, 84, 16,
|
sl@0
|
375 |
/* 550 */ 92, 148, 12, 20, 190, 16, 211, 212, 148, 99,
|
sl@0
|
376 |
/* 560 */ 100, 101, 148, 20, 24, 148, 7, 8, 9, 20,
|
sl@0
|
377 |
/* 570 */ 110, 148, 156, 170, 171, 42, 43, 37, 148, 39,
|
sl@0
|
378 |
/* 580 */ 170, 171, 43, 18, 99, 100, 101, 170, 171, 49,
|
sl@0
|
379 |
/* 590 */ 165, 166, 167, 60, 61, 62, 63, 64, 65, 66,
|
sl@0
|
380 |
/* 600 */ 67, 68, 69, 70, 71, 72, 190, 74, 75, 76,
|
sl@0
|
381 |
/* 610 */ 77, 78, 79, 80, 81, 82, 83, 84, 16, 162,
|
sl@0
|
382 |
/* 620 */ 217, 148, 19, 21, 19, 25, 23, 217, 23, 29,
|
sl@0
|
383 |
/* 630 */ 213, 215, 165, 166, 167, 148, 21, 98, 23, 107,
|
sl@0
|
384 |
/* 640 */ 210, 41, 103, 111, 42, 43, 125, 126, 232, 106,
|
sl@0
|
385 |
/* 650 */ 148, 108, 109, 237, 229, 106, 183, 108, 109, 94,
|
sl@0
|
386 |
/* 660 */ 14, 16, 60, 61, 62, 63, 64, 65, 66, 67,
|
sl@0
|
387 |
/* 670 */ 68, 69, 70, 71, 72, 23, 74, 75, 76, 77,
|
sl@0
|
388 |
/* 680 */ 78, 79, 80, 81, 82, 83, 84, 42, 43, 20,
|
sl@0
|
389 |
/* 690 */ 148, 88, 89, 88, 89, 204, 229, 210, 52, 134,
|
sl@0
|
390 |
/* 700 */ 54, 151, 156, 88, 16, 60, 61, 62, 63, 64,
|
sl@0
|
391 |
/* 710 */ 65, 66, 67, 68, 69, 70, 71, 72, 148, 74,
|
sl@0
|
392 |
/* 720 */ 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
|
sl@0
|
393 |
/* 730 */ 42, 43, 80, 43, 16, 106, 190, 108, 109, 27,
|
sl@0
|
394 |
/* 740 */ 88, 89, 99, 100, 101, 156, 34, 16, 60, 61,
|
sl@0
|
395 |
/* 750 */ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
|
sl@0
|
396 |
/* 760 */ 72, 215, 74, 75, 76, 77, 78, 79, 80, 81,
|
sl@0
|
397 |
/* 770 */ 82, 83, 84, 42, 43, 106, 226, 108, 109, 190,
|
sl@0
|
398 |
/* 780 */ 134, 231, 148, 237, 214, 14, 148, 148, 98, 148,
|
sl@0
|
399 |
/* 790 */ 16, 179, 61, 62, 63, 64, 65, 66, 67, 68,
|
sl@0
|
400 |
/* 800 */ 69, 70, 71, 72, 148, 74, 75, 76, 77, 78,
|
sl@0
|
401 |
/* 810 */ 79, 80, 81, 82, 83, 84, 42, 43, 23, 148,
|
sl@0
|
402 |
/* 820 */ 23, 183, 183, 52, 183, 54, 170, 171, 131, 156,
|
sl@0
|
403 |
/* 830 */ 133, 148, 148, 115, 156, 148, 62, 63, 64, 65,
|
sl@0
|
404 |
/* 840 */ 66, 67, 68, 69, 70, 71, 72, 148, 74, 75,
|
sl@0
|
405 |
/* 850 */ 76, 77, 78, 79, 80, 81, 82, 83, 84, 16,
|
sl@0
|
406 |
/* 860 */ 17, 22, 19, 190, 148, 148, 23, 148, 190, 170,
|
sl@0
|
407 |
/* 870 */ 171, 148, 189, 148, 31, 16, 17, 148, 19, 179,
|
sl@0
|
408 |
/* 880 */ 148, 179, 23, 88, 89, 88, 89, 170, 171, 156,
|
sl@0
|
409 |
/* 890 */ 31, 48, 148, 170, 171, 170, 171, 148, 214, 170,
|
sl@0
|
410 |
/* 900 */ 171, 58, 170, 171, 148, 189, 148, 48, 189, 114,
|
sl@0
|
411 |
/* 910 */ 19, 114, 21, 148, 148, 22, 148, 58, 148, 170,
|
sl@0
|
412 |
/* 920 */ 171, 78, 79, 190, 148, 30, 170, 171, 170, 171,
|
sl@0
|
413 |
/* 930 */ 87, 88, 89, 189, 16, 92, 97, 78, 79, 80,
|
sl@0
|
414 |
/* 940 */ 170, 171, 91, 233, 148, 50, 87, 88, 89, 16,
|
sl@0
|
415 |
/* 950 */ 17, 92, 19, 110, 148, 189, 23, 148, 7, 8,
|
sl@0
|
416 |
/* 960 */ 148, 110, 148, 92, 31, 189, 170, 171, 125, 126,
|
sl@0
|
417 |
/* 970 */ 127, 128, 129, 130, 103, 124, 170, 171, 148, 170,
|
sl@0
|
418 |
/* 980 */ 171, 48, 170, 171, 125, 126, 127, 128, 129, 130,
|
sl@0
|
419 |
/* 990 */ 22, 58, 20, 5, 22, 148, 148, 102, 10, 11,
|
sl@0
|
420 |
/* 1000 */ 12, 13, 148, 189, 148, 20, 148, 22, 148, 148,
|
sl@0
|
421 |
/* 1010 */ 92, 78, 79, 148, 26, 122, 28, 170, 171, 234,
|
sl@0
|
422 |
/* 1020 */ 87, 88, 89, 35, 148, 92, 170, 171, 170, 171,
|
sl@0
|
423 |
/* 1030 */ 170, 171, 148, 148, 148, 47, 20, 49, 22, 91,
|
sl@0
|
424 |
/* 1040 */ 92, 53, 148, 194, 56, 148, 170, 171, 148, 20,
|
sl@0
|
425 |
/* 1050 */ 148, 22, 148, 148, 170, 171, 170, 171, 125, 126,
|
sl@0
|
426 |
/* 1060 */ 127, 128, 129, 130, 170, 171, 150, 170, 171, 148,
|
sl@0
|
427 |
/* 1070 */ 170, 171, 170, 171, 170, 171, 20, 148, 22, 148,
|
sl@0
|
428 |
/* 1080 */ 20, 113, 22, 20, 148, 22, 148, 99, 100, 101,
|
sl@0
|
429 |
/* 1090 */ 148, 170, 171, 105, 20, 148, 22, 148, 110, 170,
|
sl@0
|
430 |
/* 1100 */ 171, 170, 171, 148, 148, 148, 170, 171, 170, 171,
|
sl@0
|
431 |
/* 1110 */ 19, 148, 170, 171, 20, 148, 22, 170, 171, 170,
|
sl@0
|
432 |
/* 1120 */ 171, 148, 148, 135, 148, 170, 171, 170, 171, 148,
|
sl@0
|
433 |
/* 1130 */ 148, 148, 148, 192, 148, 148, 230, 170, 171, 148,
|
sl@0
|
434 |
/* 1140 */ 148, 162, 230, 170, 171, 225, 6, 178, 173, 205,
|
sl@0
|
435 |
/* 1150 */ 173, 170, 171, 170, 171, 162, 195, 162, 205, 68,
|
sl@0
|
436 |
/* 1160 */ 195, 147, 173, 173, 205, 147, 147, 173, 147, 22,
|
sl@0
|
437 |
/* 1170 */ 174, 122, 155, 195, 119, 121, 196, 120, 131, 118,
|
sl@0
|
438 |
/* 1180 */ 112, 153, 224, 153, 98, 98, 117, 190, 40, 180,
|
sl@0
|
439 |
/* 1190 */ 97, 19, 172, 84, 172, 197, 172, 198, 175, 199,
|
sl@0
|
440 |
/* 1200 */ 174, 15, 175, 172, 172, 180, 172, 206, 172, 207,
|
sl@0
|
441 |
/* 1210 */ 206, 152, 207, 38, 131, 153, 152, 60, 153, 152,
|
sl@0
|
442 |
/* 1220 */ 185, 19, 185, 153, 153, 152, 216, 15, 153, 188,
|
sl@0
|
443 |
/* 1230 */ 227, 188, 188, 227, 195, 195, 188, 185, 153, 33,
|
sl@0
|
444 |
/* 1240 */ 138, 153, 235, 153, 236, 1, 20, 112, 176, 216,
|
sl@0
|
445 |
/* 1250 */ 238, 238, 241, 176, 112, 160, 112, 112, 92, 107,
|
sl@0
|
446 |
/* 1260 */ 19, 11, 20, 20, 19, 19, 116, 20, 114, 20,
|
sl@0
|
447 |
/* 1270 */ 22, 20, 116, 19, 22, 22, 116, 115, 20, 112,
|
sl@0
|
448 |
/* 1280 */ 20, 20, 44, 19, 44, 19, 19, 32, 20, 19,
|
sl@0
|
449 |
/* 1290 */ 19, 96, 103, 16, 21, 17, 98, 22, 36, 134,
|
sl@0
|
450 |
/* 1300 */ 44, 98, 19, 5, 45, 1, 102, 68, 51, 19,
|
sl@0
|
451 |
/* 1310 */ 45, 123, 113, 1, 17, 102, 123, 14, 113, 19,
|
sl@0
|
452 |
/* 1320 */ 124, 20, 137, 136, 3, 242, 57, 4, 242, 242,
|
sl@0
|
453 |
/* 1330 */ 242, 68,
|
sl@0
|
454 |
};
|
sl@0
|
455 |
#define YY_SHIFT_USE_DFLT (-99)
|
sl@0
|
456 |
#define YY_SHIFT_MAX 383
|
sl@0
|
457 |
static const short yy_shift_ofst[] = {
|
sl@0
|
458 |
/* 0 */ 23, 843, 988, -16, 843, 933, 933, 393, 123, 460,
|
sl@0
|
459 |
/* 10 */ -98, 96, 933, 933, 933, 933, 933, -45, 249, 424,
|
sl@0
|
460 |
/* 20 */ 329, -17, 19, 19, 53, 165, 208, 251, 326, 395,
|
sl@0
|
461 |
/* 30 */ 464, 533, 602, 645, 688, 645, 645, 645, 645, 645,
|
sl@0
|
462 |
/* 40 */ 645, 645, 645, 645, 645, 645, 645, 645, 645, 645,
|
sl@0
|
463 |
/* 50 */ 645, 645, 645, 731, 774, 774, 859, 933, 933, 933,
|
sl@0
|
464 |
/* 60 */ 933, 933, 933, 933, 933, 933, 933, 933, 933, 933,
|
sl@0
|
465 |
/* 70 */ 933, 933, 933, 933, 933, 933, 933, 933, 933, 933,
|
sl@0
|
466 |
/* 80 */ 933, 933, 933, 933, 933, 933, 933, 933, 933, 933,
|
sl@0
|
467 |
/* 90 */ 933, 933, 933, 933, 933, 933, 933, -61, -61, 6,
|
sl@0
|
468 |
/* 100 */ 6, 281, 22, 61, 539, 565, 329, 329, 226, -17,
|
sl@0
|
469 |
/* 110 */ -11, -99, -99, -99, 131, 328, 540, 540, 182, 615,
|
sl@0
|
470 |
/* 120 */ 329, 615, 329, 329, 329, 329, 329, 329, 329, 329,
|
sl@0
|
471 |
/* 130 */ 329, 329, 329, 329, 329, 329, 329, 329, 329, 851,
|
sl@0
|
472 |
/* 140 */ 243, -98, -98, -98, -99, -99, -18, -18, 335, 350,
|
sl@0
|
473 |
/* 150 */ 543, 603, 549, 669, 327, 795, 797, 605, 652, 559,
|
sl@0
|
474 |
/* 160 */ 329, 329, 412, 329, 329, 132, 329, 329, 338, 329,
|
sl@0
|
475 |
/* 170 */ 329, 329, 629, 338, 329, 329, 895, 895, 895, 329,
|
sl@0
|
476 |
/* 180 */ 329, 329, 629, 329, 329, 629, 329, 600, 485, 329,
|
sl@0
|
477 |
/* 190 */ 329, 629, 329, 329, 329, 629, 329, 629, 629, 329,
|
sl@0
|
478 |
/* 200 */ 329, 329, 329, 329, 891, 532, 968, -17, 521, 521,
|
sl@0
|
479 |
/* 210 */ 697, 712, 712, 718, 712, 690, 712, -17, 712, -17,
|
sl@0
|
480 |
/* 220 */ 839, 893, 718, 718, 893, 1140, 1140, 1140, 1140, 1147,
|
sl@0
|
481 |
/* 230 */ -98, 1049, 1055, 1057, 1061, 1054, 1047, 1068, 1068, 1086,
|
sl@0
|
482 |
/* 240 */ 1069, 1086, 1069, 1087, 1087, 1148, 1087, 1093, 1087, 1172,
|
sl@0
|
483 |
/* 250 */ 1109, 1109, 1148, 1087, 1087, 1087, 1172, 1186, 1068, 1186,
|
sl@0
|
484 |
/* 260 */ 1068, 1186, 1068, 1068, 1175, 1083, 1186, 1068, 1157, 1157,
|
sl@0
|
485 |
/* 270 */ 1202, 1049, 1212, 1212, 1212, 1212, 1049, 1157, 1202, 1068,
|
sl@0
|
486 |
/* 280 */ 1206, 1206, 1068, 1068, 1102, -99, -99, -99, 458, 646,
|
sl@0
|
487 |
/* 290 */ 643, 771, 150, 918, 972, 985, 871, 951, 948, 1016,
|
sl@0
|
488 |
/* 300 */ 1029, 1056, 1060, 1063, 1074, 1094, 1091, 1244, 1226, 1135,
|
sl@0
|
489 |
/* 310 */ 1142, 1144, 1145, 1166, 1152, 1241, 1242, 1243, 1245, 1250,
|
sl@0
|
490 |
/* 320 */ 1246, 1247, 1248, 1249, 1251, 1252, 1150, 1253, 1156, 1252,
|
sl@0
|
491 |
/* 330 */ 1154, 1254, 1160, 1162, 1258, 1167, 1260, 1261, 1255, 1238,
|
sl@0
|
492 |
/* 340 */ 1264, 1240, 1266, 1268, 1267, 1270, 1256, 1271, 1195, 1189,
|
sl@0
|
493 |
/* 350 */ 1277, 1278, 1273, 1198, 1262, 1257, 1259, 1275, 1265, 1165,
|
sl@0
|
494 |
/* 360 */ 1203, 1283, 1298, 1304, 1204, 1239, 1263, 1188, 1290, 1199,
|
sl@0
|
495 |
/* 370 */ 1312, 1297, 1205, 1213, 1193, 1300, 1196, 1301, 1303, 1269,
|
sl@0
|
496 |
/* 380 */ 1187, 1185, 1321, 1323,
|
sl@0
|
497 |
};
|
sl@0
|
498 |
#define YY_REDUCE_USE_DFLT (-144)
|
sl@0
|
499 |
#define YY_REDUCE_MAX 287
|
sl@0
|
500 |
static const short yy_reduce_ofst[] = {
|
sl@0
|
501 |
/* 0 */ -139, 278, 48, 289, 347, -22, 345, 197, 133, 416,
|
sl@0
|
502 |
/* 10 */ -3, -128, 210, 47, 417, 403, 410, -143, 546, 37,
|
sl@0
|
503 |
/* 20 */ 147, 144, 425, 467, -6, -6, -6, -6, -6, -6,
|
sl@0
|
504 |
/* 30 */ -6, -6, -6, -6, -6, -6, -6, -6, -6, -6,
|
sl@0
|
505 |
/* 40 */ -6, -6, -6, -6, -6, -6, -6, -6, -6, -6,
|
sl@0
|
506 |
/* 50 */ -6, -6, -6, -6, -6, -6, 656, 699, 717, 723,
|
sl@0
|
507 |
/* 60 */ 725, 729, 732, 749, 756, 758, 770, 796, 806, 809,
|
sl@0
|
508 |
/* 70 */ 812, 847, 856, 858, 860, 876, 884, 886, 894, 897,
|
sl@0
|
509 |
/* 80 */ 900, 902, 904, 921, 929, 931, 936, 938, 942, 947,
|
sl@0
|
510 |
/* 90 */ 949, 955, 957, 967, 973, 981, 983, -6, -6, -6,
|
sl@0
|
511 |
/* 100 */ -6, 84, -6, -6, 159, 550, 107, 284, -6, -121,
|
sl@0
|
512 |
/* 110 */ -6, -6, -6, -6, 324, 21, 227, 312, 293, 140,
|
sl@0
|
513 |
/* 120 */ 4, 162, -91, 473, 638, 639, -1, 430, 641, 570,
|
sl@0
|
514 |
/* 130 */ 487, 683, 716, 719, 744, 766, 776, 684, 814, 364,
|
sl@0
|
515 |
/* 140 */ 589, 673, 678, 733, 253, 302, -60, 24, 72, 82,
|
sl@0
|
516 |
/* 150 */ 15, 190, 15, 15, 169, 222, 234, 237, 341, 304,
|
sl@0
|
517 |
/* 160 */ 366, 414, 207, 341, 423, 457, 502, 542, 491, 634,
|
sl@0
|
518 |
/* 170 */ 671, 687, 15, 491, 765, 768, 612, 700, 702, 830,
|
sl@0
|
519 |
/* 180 */ 848, 854, 15, 861, 865, 15, 885, 710, 785, 905,
|
sl@0
|
520 |
/* 190 */ 956, 15, 963, 974, 976, 15, 982, 15, 15, 984,
|
sl@0
|
521 |
/* 200 */ 986, 987, 991, 992, 916, 941, 849, 979, 906, 912,
|
sl@0
|
522 |
/* 210 */ 920, 975, 977, 944, 989, 969, 990, 993, 994, 995,
|
sl@0
|
523 |
/* 220 */ 996, 961, 953, 959, 965, 1014, 1018, 1019, 1021, 1017,
|
sl@0
|
524 |
/* 230 */ 997, 978, 980, 998, 999, 1000, 958, 1028, 1030, 1001,
|
sl@0
|
525 |
/* 240 */ 1002, 1004, 1005, 1020, 1022, 1009, 1024, 1026, 1031, 1023,
|
sl@0
|
526 |
/* 250 */ 1003, 1006, 1025, 1032, 1034, 1036, 1027, 1059, 1062, 1064,
|
sl@0
|
527 |
/* 260 */ 1065, 1067, 1070, 1071, 1007, 1008, 1073, 1075, 1035, 1037,
|
sl@0
|
528 |
/* 270 */ 1010, 1039, 1041, 1043, 1044, 1048, 1040, 1052, 1033, 1085,
|
sl@0
|
529 |
/* 280 */ 1012, 1013, 1088, 1090, 1011, 1095, 1072, 1077,
|
sl@0
|
530 |
};
|
sl@0
|
531 |
static const YYACTIONTYPE yy_default[] = {
|
sl@0
|
532 |
/* 0 */ 583, 812, 881, 699, 881, 812, 881, 881, 839, 881,
|
sl@0
|
533 |
/* 10 */ 703, 868, 810, 881, 881, 881, 881, 784, 881, 839,
|
sl@0
|
534 |
/* 20 */ 881, 615, 839, 839, 735, 881, 881, 881, 881, 881,
|
sl@0
|
535 |
/* 30 */ 881, 881, 881, 736, 881, 814, 809, 805, 807, 806,
|
sl@0
|
536 |
/* 40 */ 813, 737, 726, 733, 740, 715, 852, 742, 743, 749,
|
sl@0
|
537 |
/* 50 */ 750, 869, 867, 772, 771, 790, 881, 881, 881, 881,
|
sl@0
|
538 |
/* 60 */ 881, 881, 881, 881, 881, 881, 881, 881, 881, 881,
|
sl@0
|
539 |
/* 70 */ 881, 881, 881, 881, 881, 881, 881, 881, 881, 881,
|
sl@0
|
540 |
/* 80 */ 881, 881, 881, 881, 881, 881, 881, 881, 881, 881,
|
sl@0
|
541 |
/* 90 */ 881, 881, 881, 881, 881, 881, 881, 774, 796, 773,
|
sl@0
|
542 |
/* 100 */ 783, 608, 775, 776, 668, 603, 881, 881, 777, 881,
|
sl@0
|
543 |
/* 110 */ 778, 791, 792, 793, 881, 881, 881, 881, 583, 699,
|
sl@0
|
544 |
/* 120 */ 881, 699, 881, 881, 881, 881, 881, 881, 881, 881,
|
sl@0
|
545 |
/* 130 */ 881, 881, 881, 881, 881, 881, 881, 881, 881, 881,
|
sl@0
|
546 |
/* 140 */ 881, 881, 881, 881, 693, 703, 881, 881, 659, 881,
|
sl@0
|
547 |
/* 150 */ 881, 881, 881, 881, 881, 881, 881, 881, 881, 591,
|
sl@0
|
548 |
/* 160 */ 589, 881, 691, 881, 881, 617, 881, 881, 701, 881,
|
sl@0
|
549 |
/* 170 */ 881, 881, 706, 707, 881, 881, 881, 881, 881, 881,
|
sl@0
|
550 |
/* 180 */ 881, 881, 605, 881, 881, 680, 881, 845, 881, 881,
|
sl@0
|
551 |
/* 190 */ 881, 859, 881, 881, 881, 857, 881, 682, 745, 825,
|
sl@0
|
552 |
/* 200 */ 881, 872, 874, 881, 881, 691, 700, 881, 881, 881,
|
sl@0
|
553 |
/* 210 */ 808, 729, 729, 717, 729, 638, 729, 881, 729, 881,
|
sl@0
|
554 |
/* 220 */ 641, 739, 717, 717, 739, 588, 588, 588, 588, 658,
|
sl@0
|
555 |
/* 230 */ 881, 739, 730, 732, 722, 734, 881, 708, 708, 716,
|
sl@0
|
556 |
/* 240 */ 721, 716, 721, 670, 670, 655, 670, 641, 670, 818,
|
sl@0
|
557 |
/* 250 */ 822, 822, 655, 670, 670, 670, 818, 600, 708, 600,
|
sl@0
|
558 |
/* 260 */ 708, 600, 708, 708, 849, 851, 600, 708, 672, 672,
|
sl@0
|
559 |
/* 270 */ 751, 739, 679, 679, 679, 679, 739, 672, 751, 708,
|
sl@0
|
560 |
/* 280 */ 871, 871, 708, 708, 879, 625, 643, 643, 881, 881,
|
sl@0
|
561 |
/* 290 */ 881, 881, 758, 881, 881, 881, 881, 881, 881, 881,
|
sl@0
|
562 |
/* 300 */ 881, 881, 881, 881, 881, 881, 832, 881, 881, 763,
|
sl@0
|
563 |
/* 310 */ 759, 881, 760, 881, 685, 881, 881, 881, 881, 881,
|
sl@0
|
564 |
/* 320 */ 881, 881, 881, 881, 881, 811, 881, 723, 881, 731,
|
sl@0
|
565 |
/* 330 */ 881, 881, 881, 881, 881, 881, 881, 881, 881, 881,
|
sl@0
|
566 |
/* 340 */ 881, 881, 881, 881, 881, 881, 881, 881, 881, 881,
|
sl@0
|
567 |
/* 350 */ 881, 881, 881, 881, 881, 881, 847, 848, 881, 881,
|
sl@0
|
568 |
/* 360 */ 881, 881, 881, 881, 881, 881, 881, 881, 881, 881,
|
sl@0
|
569 |
/* 370 */ 881, 881, 881, 881, 881, 881, 881, 881, 881, 878,
|
sl@0
|
570 |
/* 380 */ 881, 881, 584, 881, 579, 581, 582, 586, 587, 590,
|
sl@0
|
571 |
/* 390 */ 612, 613, 614, 592, 593, 594, 595, 596, 597, 598,
|
sl@0
|
572 |
/* 400 */ 604, 606, 624, 626, 610, 628, 689, 690, 755, 683,
|
sl@0
|
573 |
/* 410 */ 684, 688, 611, 766, 757, 761, 762, 764, 765, 779,
|
sl@0
|
574 |
/* 420 */ 780, 782, 788, 795, 798, 781, 786, 787, 789, 794,
|
sl@0
|
575 |
/* 430 */ 797, 686, 687, 801, 618, 619, 622, 623, 835, 837,
|
sl@0
|
576 |
/* 440 */ 836, 838, 621, 620, 767, 770, 803, 804, 860, 861,
|
sl@0
|
577 |
/* 450 */ 862, 863, 864, 799, 709, 802, 785, 724, 727, 728,
|
sl@0
|
578 |
/* 460 */ 725, 692, 702, 711, 712, 713, 714, 697, 698, 704,
|
sl@0
|
579 |
/* 470 */ 720, 753, 754, 718, 719, 705, 694, 695, 696, 800,
|
sl@0
|
580 |
/* 480 */ 756, 768, 769, 629, 630, 763, 631, 632, 633, 671,
|
sl@0
|
581 |
/* 490 */ 674, 675, 676, 634, 653, 656, 657, 635, 642, 636,
|
sl@0
|
582 |
/* 500 */ 637, 644, 645, 646, 649, 650, 651, 652, 647, 648,
|
sl@0
|
583 |
/* 510 */ 819, 820, 823, 821, 639, 640, 654, 627, 616, 609,
|
sl@0
|
584 |
/* 520 */ 660, 663, 664, 665, 666, 667, 669, 661, 662, 607,
|
sl@0
|
585 |
/* 530 */ 599, 601, 710, 841, 850, 846, 842, 843, 844, 602,
|
sl@0
|
586 |
/* 540 */ 815, 816, 673, 747, 748, 840, 853, 855, 752, 856,
|
sl@0
|
587 |
/* 550 */ 858, 854, 677, 678, 681, 824, 865, 738, 741, 744,
|
sl@0
|
588 |
/* 560 */ 746, 826, 827, 828, 829, 830, 833, 834, 831, 866,
|
sl@0
|
589 |
/* 570 */ 870, 873, 875, 876, 877, 880, 585, 580,
|
sl@0
|
590 |
};
|
sl@0
|
591 |
#define YY_SZ_ACTTAB (int)(sizeof(yy_action)/sizeof(yy_action[0]))
|
sl@0
|
592 |
|
sl@0
|
593 |
/* The next table maps tokens into fallback tokens. If a construct
|
sl@0
|
594 |
** like the following:
|
sl@0
|
595 |
**
|
sl@0
|
596 |
** %fallback ID X Y Z.
|
sl@0
|
597 |
**
|
sl@0
|
598 |
** appears in the grammar, then ID becomes a fallback token for X, Y,
|
sl@0
|
599 |
** and Z. Whenever one of the tokens X, Y, or Z is input to the parser
|
sl@0
|
600 |
** but it does not parse, the type of the token is changed to ID and
|
sl@0
|
601 |
** the parse is retried before an error is thrown.
|
sl@0
|
602 |
*/
|
sl@0
|
603 |
#ifdef YYFALLBACK
|
sl@0
|
604 |
static const YYCODETYPE yyFallback[] = {
|
sl@0
|
605 |
0, /* $ => nothing */
|
sl@0
|
606 |
0, /* SEMI => nothing */
|
sl@0
|
607 |
23, /* EXPLAIN => ID */
|
sl@0
|
608 |
23, /* QUERY => ID */
|
sl@0
|
609 |
23, /* PLAN => ID */
|
sl@0
|
610 |
23, /* BEGIN => ID */
|
sl@0
|
611 |
0, /* TRANSACTION => nothing */
|
sl@0
|
612 |
23, /* DEFERRED => ID */
|
sl@0
|
613 |
23, /* IMMEDIATE => ID */
|
sl@0
|
614 |
23, /* EXCLUSIVE => ID */
|
sl@0
|
615 |
0, /* COMMIT => nothing */
|
sl@0
|
616 |
23, /* END => ID */
|
sl@0
|
617 |
0, /* ROLLBACK => nothing */
|
sl@0
|
618 |
0, /* CREATE => nothing */
|
sl@0
|
619 |
0, /* TABLE => nothing */
|
sl@0
|
620 |
23, /* IF => ID */
|
sl@0
|
621 |
0, /* NOT => nothing */
|
sl@0
|
622 |
0, /* EXISTS => nothing */
|
sl@0
|
623 |
23, /* TEMP => ID */
|
sl@0
|
624 |
0, /* LP => nothing */
|
sl@0
|
625 |
0, /* RP => nothing */
|
sl@0
|
626 |
0, /* AS => nothing */
|
sl@0
|
627 |
0, /* COMMA => nothing */
|
sl@0
|
628 |
0, /* ID => nothing */
|
sl@0
|
629 |
23, /* ABORT => ID */
|
sl@0
|
630 |
23, /* AFTER => ID */
|
sl@0
|
631 |
23, /* ANALYZE => ID */
|
sl@0
|
632 |
23, /* ASC => ID */
|
sl@0
|
633 |
23, /* ATTACH => ID */
|
sl@0
|
634 |
23, /* BEFORE => ID */
|
sl@0
|
635 |
23, /* CASCADE => ID */
|
sl@0
|
636 |
23, /* CAST => ID */
|
sl@0
|
637 |
23, /* CONFLICT => ID */
|
sl@0
|
638 |
23, /* DATABASE => ID */
|
sl@0
|
639 |
23, /* DESC => ID */
|
sl@0
|
640 |
23, /* DETACH => ID */
|
sl@0
|
641 |
23, /* EACH => ID */
|
sl@0
|
642 |
23, /* FAIL => ID */
|
sl@0
|
643 |
23, /* FOR => ID */
|
sl@0
|
644 |
23, /* IGNORE => ID */
|
sl@0
|
645 |
23, /* INITIALLY => ID */
|
sl@0
|
646 |
23, /* INSTEAD => ID */
|
sl@0
|
647 |
23, /* LIKE_KW => ID */
|
sl@0
|
648 |
23, /* MATCH => ID */
|
sl@0
|
649 |
23, /* KEY => ID */
|
sl@0
|
650 |
23, /* OF => ID */
|
sl@0
|
651 |
23, /* OFFSET => ID */
|
sl@0
|
652 |
23, /* PRAGMA => ID */
|
sl@0
|
653 |
23, /* RAISE => ID */
|
sl@0
|
654 |
23, /* REPLACE => ID */
|
sl@0
|
655 |
23, /* RESTRICT => ID */
|
sl@0
|
656 |
23, /* ROW => ID */
|
sl@0
|
657 |
23, /* TRIGGER => ID */
|
sl@0
|
658 |
23, /* VACUUM => ID */
|
sl@0
|
659 |
23, /* VIEW => ID */
|
sl@0
|
660 |
23, /* VIRTUAL => ID */
|
sl@0
|
661 |
23, /* REINDEX => ID */
|
sl@0
|
662 |
23, /* RENAME => ID */
|
sl@0
|
663 |
23, /* CTIME_KW => ID */
|
sl@0
|
664 |
0, /* ANY => nothing */
|
sl@0
|
665 |
0, /* OR => nothing */
|
sl@0
|
666 |
0, /* AND => nothing */
|
sl@0
|
667 |
0, /* IS => nothing */
|
sl@0
|
668 |
0, /* BETWEEN => nothing */
|
sl@0
|
669 |
0, /* IN => nothing */
|
sl@0
|
670 |
0, /* ISNULL => nothing */
|
sl@0
|
671 |
0, /* NOTNULL => nothing */
|
sl@0
|
672 |
0, /* NE => nothing */
|
sl@0
|
673 |
0, /* EQ => nothing */
|
sl@0
|
674 |
0, /* GT => nothing */
|
sl@0
|
675 |
0, /* LE => nothing */
|
sl@0
|
676 |
0, /* LT => nothing */
|
sl@0
|
677 |
0, /* GE => nothing */
|
sl@0
|
678 |
0, /* ESCAPE => nothing */
|
sl@0
|
679 |
0, /* BITAND => nothing */
|
sl@0
|
680 |
0, /* BITOR => nothing */
|
sl@0
|
681 |
0, /* LSHIFT => nothing */
|
sl@0
|
682 |
0, /* RSHIFT => nothing */
|
sl@0
|
683 |
0, /* PLUS => nothing */
|
sl@0
|
684 |
0, /* MINUS => nothing */
|
sl@0
|
685 |
0, /* STAR => nothing */
|
sl@0
|
686 |
0, /* SLASH => nothing */
|
sl@0
|
687 |
0, /* REM => nothing */
|
sl@0
|
688 |
0, /* CONCAT => nothing */
|
sl@0
|
689 |
0, /* COLLATE => nothing */
|
sl@0
|
690 |
0, /* UMINUS => nothing */
|
sl@0
|
691 |
0, /* UPLUS => nothing */
|
sl@0
|
692 |
0, /* BITNOT => nothing */
|
sl@0
|
693 |
0, /* STRING => nothing */
|
sl@0
|
694 |
0, /* JOIN_KW => nothing */
|
sl@0
|
695 |
0, /* CONSTRAINT => nothing */
|
sl@0
|
696 |
0, /* DEFAULT => nothing */
|
sl@0
|
697 |
0, /* NULL => nothing */
|
sl@0
|
698 |
0, /* PRIMARY => nothing */
|
sl@0
|
699 |
0, /* UNIQUE => nothing */
|
sl@0
|
700 |
0, /* CHECK => nothing */
|
sl@0
|
701 |
0, /* REFERENCES => nothing */
|
sl@0
|
702 |
0, /* AUTOINCR => nothing */
|
sl@0
|
703 |
0, /* ON => nothing */
|
sl@0
|
704 |
0, /* DELETE => nothing */
|
sl@0
|
705 |
0, /* UPDATE => nothing */
|
sl@0
|
706 |
0, /* INSERT => nothing */
|
sl@0
|
707 |
0, /* SET => nothing */
|
sl@0
|
708 |
0, /* DEFERRABLE => nothing */
|
sl@0
|
709 |
0, /* FOREIGN => nothing */
|
sl@0
|
710 |
0, /* DROP => nothing */
|
sl@0
|
711 |
0, /* UNION => nothing */
|
sl@0
|
712 |
0, /* ALL => nothing */
|
sl@0
|
713 |
0, /* EXCEPT => nothing */
|
sl@0
|
714 |
0, /* INTERSECT => nothing */
|
sl@0
|
715 |
0, /* SELECT => nothing */
|
sl@0
|
716 |
0, /* DISTINCT => nothing */
|
sl@0
|
717 |
0, /* DOT => nothing */
|
sl@0
|
718 |
0, /* FROM => nothing */
|
sl@0
|
719 |
0, /* JOIN => nothing */
|
sl@0
|
720 |
0, /* INDEXED => nothing */
|
sl@0
|
721 |
0, /* BY => nothing */
|
sl@0
|
722 |
0, /* USING => nothing */
|
sl@0
|
723 |
0, /* ORDER => nothing */
|
sl@0
|
724 |
0, /* GROUP => nothing */
|
sl@0
|
725 |
0, /* HAVING => nothing */
|
sl@0
|
726 |
0, /* LIMIT => nothing */
|
sl@0
|
727 |
0, /* WHERE => nothing */
|
sl@0
|
728 |
0, /* INTO => nothing */
|
sl@0
|
729 |
0, /* VALUES => nothing */
|
sl@0
|
730 |
0, /* INTEGER => nothing */
|
sl@0
|
731 |
0, /* FLOAT => nothing */
|
sl@0
|
732 |
0, /* BLOB => nothing */
|
sl@0
|
733 |
0, /* REGISTER => nothing */
|
sl@0
|
734 |
0, /* VARIABLE => nothing */
|
sl@0
|
735 |
0, /* CASE => nothing */
|
sl@0
|
736 |
0, /* WHEN => nothing */
|
sl@0
|
737 |
0, /* THEN => nothing */
|
sl@0
|
738 |
0, /* ELSE => nothing */
|
sl@0
|
739 |
0, /* INDEX => nothing */
|
sl@0
|
740 |
0, /* ALTER => nothing */
|
sl@0
|
741 |
0, /* TO => nothing */
|
sl@0
|
742 |
0, /* ADD => nothing */
|
sl@0
|
743 |
0, /* COLUMNKW => nothing */
|
sl@0
|
744 |
};
|
sl@0
|
745 |
#endif /* YYFALLBACK */
|
sl@0
|
746 |
|
sl@0
|
747 |
/* The following structure represents a single element of the
|
sl@0
|
748 |
** parser's stack. Information stored includes:
|
sl@0
|
749 |
**
|
sl@0
|
750 |
** + The state number for the parser at this level of the stack.
|
sl@0
|
751 |
**
|
sl@0
|
752 |
** + The value of the token stored at this level of the stack.
|
sl@0
|
753 |
** (In other words, the "major" token.)
|
sl@0
|
754 |
**
|
sl@0
|
755 |
** + The semantic value stored at this level of the stack. This is
|
sl@0
|
756 |
** the information used by the action routines in the grammar.
|
sl@0
|
757 |
** It is sometimes called the "minor" token.
|
sl@0
|
758 |
*/
|
sl@0
|
759 |
struct yyStackEntry {
|
sl@0
|
760 |
YYACTIONTYPE stateno; /* The state-number */
|
sl@0
|
761 |
YYCODETYPE major; /* The major token value. This is the code
|
sl@0
|
762 |
** number for the token at this stack level */
|
sl@0
|
763 |
YYMINORTYPE minor; /* The user-supplied minor token value. This
|
sl@0
|
764 |
** is the value of the token */
|
sl@0
|
765 |
};
|
sl@0
|
766 |
typedef struct yyStackEntry yyStackEntry;
|
sl@0
|
767 |
|
sl@0
|
768 |
/* The state of the parser is completely contained in an instance of
|
sl@0
|
769 |
** the following structure */
|
sl@0
|
770 |
struct yyParser {
|
sl@0
|
771 |
int yyidx; /* Index of top element in stack */
|
sl@0
|
772 |
#ifdef YYTRACKMAXSTACKDEPTH
|
sl@0
|
773 |
int yyidxMax; /* Maximum value of yyidx */
|
sl@0
|
774 |
#endif
|
sl@0
|
775 |
int yyerrcnt; /* Shifts left before out of the error */
|
sl@0
|
776 |
sqlite3ParserARG_SDECL /* A place to hold %extra_argument */
|
sl@0
|
777 |
#if YYSTACKDEPTH<=0
|
sl@0
|
778 |
int yystksz; /* Current side of the stack */
|
sl@0
|
779 |
yyStackEntry *yystack; /* The parser's stack */
|
sl@0
|
780 |
#else
|
sl@0
|
781 |
yyStackEntry yystack[YYSTACKDEPTH]; /* The parser's stack */
|
sl@0
|
782 |
#endif
|
sl@0
|
783 |
};
|
sl@0
|
784 |
typedef struct yyParser yyParser;
|
sl@0
|
785 |
|
sl@0
|
786 |
#ifndef NDEBUG
|
sl@0
|
787 |
#include <stdio.h>
|
sl@0
|
788 |
static FILE *yyTraceFILE = 0;
|
sl@0
|
789 |
static char *yyTracePrompt = 0;
|
sl@0
|
790 |
#endif /* NDEBUG */
|
sl@0
|
791 |
|
sl@0
|
792 |
#ifndef NDEBUG
|
sl@0
|
793 |
/*
|
sl@0
|
794 |
** Turn parser tracing on by giving a stream to which to write the trace
|
sl@0
|
795 |
** and a prompt to preface each trace message. Tracing is turned off
|
sl@0
|
796 |
** by making either argument NULL
|
sl@0
|
797 |
**
|
sl@0
|
798 |
** Inputs:
|
sl@0
|
799 |
** <ul>
|
sl@0
|
800 |
** <li> A FILE* to which trace output should be written.
|
sl@0
|
801 |
** If NULL, then tracing is turned off.
|
sl@0
|
802 |
** <li> A prefix string written at the beginning of every
|
sl@0
|
803 |
** line of trace output. If NULL, then tracing is
|
sl@0
|
804 |
** turned off.
|
sl@0
|
805 |
** </ul>
|
sl@0
|
806 |
**
|
sl@0
|
807 |
** Outputs:
|
sl@0
|
808 |
** None.
|
sl@0
|
809 |
*/
|
sl@0
|
810 |
void sqlite3ParserTrace(FILE *TraceFILE, char *zTracePrompt){
|
sl@0
|
811 |
yyTraceFILE = TraceFILE;
|
sl@0
|
812 |
yyTracePrompt = zTracePrompt;
|
sl@0
|
813 |
if( yyTraceFILE==0 ) yyTracePrompt = 0;
|
sl@0
|
814 |
else if( yyTracePrompt==0 ) yyTraceFILE = 0;
|
sl@0
|
815 |
}
|
sl@0
|
816 |
#endif /* NDEBUG */
|
sl@0
|
817 |
|
sl@0
|
818 |
#ifndef NDEBUG
|
sl@0
|
819 |
/* For tracing shifts, the names of all terminals and nonterminals
|
sl@0
|
820 |
** are required. The following table supplies these names */
|
sl@0
|
821 |
static const char *const yyTokenName[] = {
|
sl@0
|
822 |
"$", "SEMI", "EXPLAIN", "QUERY",
|
sl@0
|
823 |
"PLAN", "BEGIN", "TRANSACTION", "DEFERRED",
|
sl@0
|
824 |
"IMMEDIATE", "EXCLUSIVE", "COMMIT", "END",
|
sl@0
|
825 |
"ROLLBACK", "CREATE", "TABLE", "IF",
|
sl@0
|
826 |
"NOT", "EXISTS", "TEMP", "LP",
|
sl@0
|
827 |
"RP", "AS", "COMMA", "ID",
|
sl@0
|
828 |
"ABORT", "AFTER", "ANALYZE", "ASC",
|
sl@0
|
829 |
"ATTACH", "BEFORE", "CASCADE", "CAST",
|
sl@0
|
830 |
"CONFLICT", "DATABASE", "DESC", "DETACH",
|
sl@0
|
831 |
"EACH", "FAIL", "FOR", "IGNORE",
|
sl@0
|
832 |
"INITIALLY", "INSTEAD", "LIKE_KW", "MATCH",
|
sl@0
|
833 |
"KEY", "OF", "OFFSET", "PRAGMA",
|
sl@0
|
834 |
"RAISE", "REPLACE", "RESTRICT", "ROW",
|
sl@0
|
835 |
"TRIGGER", "VACUUM", "VIEW", "VIRTUAL",
|
sl@0
|
836 |
"REINDEX", "RENAME", "CTIME_KW", "ANY",
|
sl@0
|
837 |
"OR", "AND", "IS", "BETWEEN",
|
sl@0
|
838 |
"IN", "ISNULL", "NOTNULL", "NE",
|
sl@0
|
839 |
"EQ", "GT", "LE", "LT",
|
sl@0
|
840 |
"GE", "ESCAPE", "BITAND", "BITOR",
|
sl@0
|
841 |
"LSHIFT", "RSHIFT", "PLUS", "MINUS",
|
sl@0
|
842 |
"STAR", "SLASH", "REM", "CONCAT",
|
sl@0
|
843 |
"COLLATE", "UMINUS", "UPLUS", "BITNOT",
|
sl@0
|
844 |
"STRING", "JOIN_KW", "CONSTRAINT", "DEFAULT",
|
sl@0
|
845 |
"NULL", "PRIMARY", "UNIQUE", "CHECK",
|
sl@0
|
846 |
"REFERENCES", "AUTOINCR", "ON", "DELETE",
|
sl@0
|
847 |
"UPDATE", "INSERT", "SET", "DEFERRABLE",
|
sl@0
|
848 |
"FOREIGN", "DROP", "UNION", "ALL",
|
sl@0
|
849 |
"EXCEPT", "INTERSECT", "SELECT", "DISTINCT",
|
sl@0
|
850 |
"DOT", "FROM", "JOIN", "INDEXED",
|
sl@0
|
851 |
"BY", "USING", "ORDER", "GROUP",
|
sl@0
|
852 |
"HAVING", "LIMIT", "WHERE", "INTO",
|
sl@0
|
853 |
"VALUES", "INTEGER", "FLOAT", "BLOB",
|
sl@0
|
854 |
"REGISTER", "VARIABLE", "CASE", "WHEN",
|
sl@0
|
855 |
"THEN", "ELSE", "INDEX", "ALTER",
|
sl@0
|
856 |
"TO", "ADD", "COLUMNKW", "error",
|
sl@0
|
857 |
"input", "cmdlist", "ecmd", "explain",
|
sl@0
|
858 |
"cmdx", "cmd", "transtype", "trans_opt",
|
sl@0
|
859 |
"nm", "create_table", "create_table_args", "temp",
|
sl@0
|
860 |
"ifnotexists", "dbnm", "columnlist", "conslist_opt",
|
sl@0
|
861 |
"select", "column", "columnid", "type",
|
sl@0
|
862 |
"carglist", "id", "ids", "typetoken",
|
sl@0
|
863 |
"typename", "signed", "plus_num", "minus_num",
|
sl@0
|
864 |
"carg", "ccons", "term", "expr",
|
sl@0
|
865 |
"onconf", "sortorder", "autoinc", "idxlist_opt",
|
sl@0
|
866 |
"refargs", "defer_subclause", "refarg", "refact",
|
sl@0
|
867 |
"init_deferred_pred_opt", "conslist", "tcons", "idxlist",
|
sl@0
|
868 |
"defer_subclause_opt", "orconf", "resolvetype", "raisetype",
|
sl@0
|
869 |
"ifexists", "fullname", "oneselect", "multiselect_op",
|
sl@0
|
870 |
"distinct", "selcollist", "from", "where_opt",
|
sl@0
|
871 |
"groupby_opt", "having_opt", "orderby_opt", "limit_opt",
|
sl@0
|
872 |
"sclp", "as", "seltablist", "stl_prefix",
|
sl@0
|
873 |
"joinop", "indexed_opt", "on_opt", "using_opt",
|
sl@0
|
874 |
"seltablist_paren", "joinop2", "inscollist", "sortlist",
|
sl@0
|
875 |
"sortitem", "nexprlist", "setlist", "insert_cmd",
|
sl@0
|
876 |
"inscollist_opt", "itemlist", "exprlist", "likeop",
|
sl@0
|
877 |
"escape", "between_op", "in_op", "case_operand",
|
sl@0
|
878 |
"case_exprlist", "case_else", "uniqueflag", "collate",
|
sl@0
|
879 |
"nmnum", "plus_opt", "number", "trigger_decl",
|
sl@0
|
880 |
"trigger_cmd_list", "trigger_time", "trigger_event", "foreach_clause",
|
sl@0
|
881 |
"when_clause", "trigger_cmd", "database_kw_opt", "key_opt",
|
sl@0
|
882 |
"add_column_fullname", "kwcolumn_opt",
|
sl@0
|
883 |
};
|
sl@0
|
884 |
#endif /* NDEBUG */
|
sl@0
|
885 |
|
sl@0
|
886 |
#ifndef NDEBUG
|
sl@0
|
887 |
/* For tracing reduce actions, the names of all rules are required.
|
sl@0
|
888 |
*/
|
sl@0
|
889 |
static const char *const yyRuleName[] = {
|
sl@0
|
890 |
/* 0 */ "input ::= cmdlist",
|
sl@0
|
891 |
/* 1 */ "cmdlist ::= cmdlist ecmd",
|
sl@0
|
892 |
/* 2 */ "cmdlist ::= ecmd",
|
sl@0
|
893 |
/* 3 */ "ecmd ::= SEMI",
|
sl@0
|
894 |
/* 4 */ "ecmd ::= explain cmdx SEMI",
|
sl@0
|
895 |
/* 5 */ "explain ::=",
|
sl@0
|
896 |
/* 6 */ "explain ::= EXPLAIN",
|
sl@0
|
897 |
/* 7 */ "explain ::= EXPLAIN QUERY PLAN",
|
sl@0
|
898 |
/* 8 */ "cmdx ::= cmd",
|
sl@0
|
899 |
/* 9 */ "cmd ::= BEGIN transtype trans_opt",
|
sl@0
|
900 |
/* 10 */ "trans_opt ::=",
|
sl@0
|
901 |
/* 11 */ "trans_opt ::= TRANSACTION",
|
sl@0
|
902 |
/* 12 */ "trans_opt ::= TRANSACTION nm",
|
sl@0
|
903 |
/* 13 */ "transtype ::=",
|
sl@0
|
904 |
/* 14 */ "transtype ::= DEFERRED",
|
sl@0
|
905 |
/* 15 */ "transtype ::= IMMEDIATE",
|
sl@0
|
906 |
/* 16 */ "transtype ::= EXCLUSIVE",
|
sl@0
|
907 |
/* 17 */ "cmd ::= COMMIT trans_opt",
|
sl@0
|
908 |
/* 18 */ "cmd ::= END trans_opt",
|
sl@0
|
909 |
/* 19 */ "cmd ::= ROLLBACK trans_opt",
|
sl@0
|
910 |
/* 20 */ "cmd ::= create_table create_table_args",
|
sl@0
|
911 |
/* 21 */ "create_table ::= CREATE temp TABLE ifnotexists nm dbnm",
|
sl@0
|
912 |
/* 22 */ "ifnotexists ::=",
|
sl@0
|
913 |
/* 23 */ "ifnotexists ::= IF NOT EXISTS",
|
sl@0
|
914 |
/* 24 */ "temp ::= TEMP",
|
sl@0
|
915 |
/* 25 */ "temp ::=",
|
sl@0
|
916 |
/* 26 */ "create_table_args ::= LP columnlist conslist_opt RP",
|
sl@0
|
917 |
/* 27 */ "create_table_args ::= AS select",
|
sl@0
|
918 |
/* 28 */ "columnlist ::= columnlist COMMA column",
|
sl@0
|
919 |
/* 29 */ "columnlist ::= column",
|
sl@0
|
920 |
/* 30 */ "column ::= columnid type carglist",
|
sl@0
|
921 |
/* 31 */ "columnid ::= nm",
|
sl@0
|
922 |
/* 32 */ "id ::= ID",
|
sl@0
|
923 |
/* 33 */ "ids ::= ID|STRING",
|
sl@0
|
924 |
/* 34 */ "nm ::= ID",
|
sl@0
|
925 |
/* 35 */ "nm ::= STRING",
|
sl@0
|
926 |
/* 36 */ "nm ::= JOIN_KW",
|
sl@0
|
927 |
/* 37 */ "type ::=",
|
sl@0
|
928 |
/* 38 */ "type ::= typetoken",
|
sl@0
|
929 |
/* 39 */ "typetoken ::= typename",
|
sl@0
|
930 |
/* 40 */ "typetoken ::= typename LP signed RP",
|
sl@0
|
931 |
/* 41 */ "typetoken ::= typename LP signed COMMA signed RP",
|
sl@0
|
932 |
/* 42 */ "typename ::= ids",
|
sl@0
|
933 |
/* 43 */ "typename ::= typename ids",
|
sl@0
|
934 |
/* 44 */ "signed ::= plus_num",
|
sl@0
|
935 |
/* 45 */ "signed ::= minus_num",
|
sl@0
|
936 |
/* 46 */ "carglist ::= carglist carg",
|
sl@0
|
937 |
/* 47 */ "carglist ::=",
|
sl@0
|
938 |
/* 48 */ "carg ::= CONSTRAINT nm ccons",
|
sl@0
|
939 |
/* 49 */ "carg ::= ccons",
|
sl@0
|
940 |
/* 50 */ "ccons ::= DEFAULT term",
|
sl@0
|
941 |
/* 51 */ "ccons ::= DEFAULT LP expr RP",
|
sl@0
|
942 |
/* 52 */ "ccons ::= DEFAULT PLUS term",
|
sl@0
|
943 |
/* 53 */ "ccons ::= DEFAULT MINUS term",
|
sl@0
|
944 |
/* 54 */ "ccons ::= DEFAULT id",
|
sl@0
|
945 |
/* 55 */ "ccons ::= NULL onconf",
|
sl@0
|
946 |
/* 56 */ "ccons ::= NOT NULL onconf",
|
sl@0
|
947 |
/* 57 */ "ccons ::= PRIMARY KEY sortorder onconf autoinc",
|
sl@0
|
948 |
/* 58 */ "ccons ::= UNIQUE onconf",
|
sl@0
|
949 |
/* 59 */ "ccons ::= CHECK LP expr RP",
|
sl@0
|
950 |
/* 60 */ "ccons ::= REFERENCES nm idxlist_opt refargs",
|
sl@0
|
951 |
/* 61 */ "ccons ::= defer_subclause",
|
sl@0
|
952 |
/* 62 */ "ccons ::= COLLATE ids",
|
sl@0
|
953 |
/* 63 */ "autoinc ::=",
|
sl@0
|
954 |
/* 64 */ "autoinc ::= AUTOINCR",
|
sl@0
|
955 |
/* 65 */ "refargs ::=",
|
sl@0
|
956 |
/* 66 */ "refargs ::= refargs refarg",
|
sl@0
|
957 |
/* 67 */ "refarg ::= MATCH nm",
|
sl@0
|
958 |
/* 68 */ "refarg ::= ON DELETE refact",
|
sl@0
|
959 |
/* 69 */ "refarg ::= ON UPDATE refact",
|
sl@0
|
960 |
/* 70 */ "refarg ::= ON INSERT refact",
|
sl@0
|
961 |
/* 71 */ "refact ::= SET NULL",
|
sl@0
|
962 |
/* 72 */ "refact ::= SET DEFAULT",
|
sl@0
|
963 |
/* 73 */ "refact ::= CASCADE",
|
sl@0
|
964 |
/* 74 */ "refact ::= RESTRICT",
|
sl@0
|
965 |
/* 75 */ "defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt",
|
sl@0
|
966 |
/* 76 */ "defer_subclause ::= DEFERRABLE init_deferred_pred_opt",
|
sl@0
|
967 |
/* 77 */ "init_deferred_pred_opt ::=",
|
sl@0
|
968 |
/* 78 */ "init_deferred_pred_opt ::= INITIALLY DEFERRED",
|
sl@0
|
969 |
/* 79 */ "init_deferred_pred_opt ::= INITIALLY IMMEDIATE",
|
sl@0
|
970 |
/* 80 */ "conslist_opt ::=",
|
sl@0
|
971 |
/* 81 */ "conslist_opt ::= COMMA conslist",
|
sl@0
|
972 |
/* 82 */ "conslist ::= conslist COMMA tcons",
|
sl@0
|
973 |
/* 83 */ "conslist ::= conslist tcons",
|
sl@0
|
974 |
/* 84 */ "conslist ::= tcons",
|
sl@0
|
975 |
/* 85 */ "tcons ::= CONSTRAINT nm",
|
sl@0
|
976 |
/* 86 */ "tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf",
|
sl@0
|
977 |
/* 87 */ "tcons ::= UNIQUE LP idxlist RP onconf",
|
sl@0
|
978 |
/* 88 */ "tcons ::= CHECK LP expr RP onconf",
|
sl@0
|
979 |
/* 89 */ "tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt",
|
sl@0
|
980 |
/* 90 */ "defer_subclause_opt ::=",
|
sl@0
|
981 |
/* 91 */ "defer_subclause_opt ::= defer_subclause",
|
sl@0
|
982 |
/* 92 */ "onconf ::=",
|
sl@0
|
983 |
/* 93 */ "onconf ::= ON CONFLICT resolvetype",
|
sl@0
|
984 |
/* 94 */ "orconf ::=",
|
sl@0
|
985 |
/* 95 */ "orconf ::= OR resolvetype",
|
sl@0
|
986 |
/* 96 */ "resolvetype ::= raisetype",
|
sl@0
|
987 |
/* 97 */ "resolvetype ::= IGNORE",
|
sl@0
|
988 |
/* 98 */ "resolvetype ::= REPLACE",
|
sl@0
|
989 |
/* 99 */ "cmd ::= DROP TABLE ifexists fullname",
|
sl@0
|
990 |
/* 100 */ "ifexists ::= IF EXISTS",
|
sl@0
|
991 |
/* 101 */ "ifexists ::=",
|
sl@0
|
992 |
/* 102 */ "cmd ::= CREATE temp VIEW ifnotexists nm dbnm AS select",
|
sl@0
|
993 |
/* 103 */ "cmd ::= DROP VIEW ifexists fullname",
|
sl@0
|
994 |
/* 104 */ "cmd ::= select",
|
sl@0
|
995 |
/* 105 */ "select ::= oneselect",
|
sl@0
|
996 |
/* 106 */ "select ::= select multiselect_op oneselect",
|
sl@0
|
997 |
/* 107 */ "multiselect_op ::= UNION",
|
sl@0
|
998 |
/* 108 */ "multiselect_op ::= UNION ALL",
|
sl@0
|
999 |
/* 109 */ "multiselect_op ::= EXCEPT|INTERSECT",
|
sl@0
|
1000 |
/* 110 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt",
|
sl@0
|
1001 |
/* 111 */ "distinct ::= DISTINCT",
|
sl@0
|
1002 |
/* 112 */ "distinct ::= ALL",
|
sl@0
|
1003 |
/* 113 */ "distinct ::=",
|
sl@0
|
1004 |
/* 114 */ "sclp ::= selcollist COMMA",
|
sl@0
|
1005 |
/* 115 */ "sclp ::=",
|
sl@0
|
1006 |
/* 116 */ "selcollist ::= sclp expr as",
|
sl@0
|
1007 |
/* 117 */ "selcollist ::= sclp STAR",
|
sl@0
|
1008 |
/* 118 */ "selcollist ::= sclp nm DOT STAR",
|
sl@0
|
1009 |
/* 119 */ "as ::= AS nm",
|
sl@0
|
1010 |
/* 120 */ "as ::= ids",
|
sl@0
|
1011 |
/* 121 */ "as ::=",
|
sl@0
|
1012 |
/* 122 */ "from ::=",
|
sl@0
|
1013 |
/* 123 */ "from ::= FROM seltablist",
|
sl@0
|
1014 |
/* 124 */ "stl_prefix ::= seltablist joinop",
|
sl@0
|
1015 |
/* 125 */ "stl_prefix ::=",
|
sl@0
|
1016 |
/* 126 */ "seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt",
|
sl@0
|
1017 |
/* 127 */ "seltablist ::= stl_prefix LP seltablist_paren RP as on_opt using_opt",
|
sl@0
|
1018 |
/* 128 */ "seltablist_paren ::= select",
|
sl@0
|
1019 |
/* 129 */ "seltablist_paren ::= seltablist",
|
sl@0
|
1020 |
/* 130 */ "dbnm ::=",
|
sl@0
|
1021 |
/* 131 */ "dbnm ::= DOT nm",
|
sl@0
|
1022 |
/* 132 */ "fullname ::= nm dbnm",
|
sl@0
|
1023 |
/* 133 */ "joinop ::= COMMA|JOIN",
|
sl@0
|
1024 |
/* 134 */ "joinop ::= JOIN_KW JOIN",
|
sl@0
|
1025 |
/* 135 */ "joinop ::= JOIN_KW nm JOIN",
|
sl@0
|
1026 |
/* 136 */ "joinop ::= JOIN_KW nm nm JOIN",
|
sl@0
|
1027 |
/* 137 */ "on_opt ::= ON expr",
|
sl@0
|
1028 |
/* 138 */ "on_opt ::=",
|
sl@0
|
1029 |
/* 139 */ "indexed_opt ::=",
|
sl@0
|
1030 |
/* 140 */ "indexed_opt ::= INDEXED BY nm",
|
sl@0
|
1031 |
/* 141 */ "indexed_opt ::= NOT INDEXED",
|
sl@0
|
1032 |
/* 142 */ "using_opt ::= USING LP inscollist RP",
|
sl@0
|
1033 |
/* 143 */ "using_opt ::=",
|
sl@0
|
1034 |
/* 144 */ "orderby_opt ::=",
|
sl@0
|
1035 |
/* 145 */ "orderby_opt ::= ORDER BY sortlist",
|
sl@0
|
1036 |
/* 146 */ "sortlist ::= sortlist COMMA sortitem sortorder",
|
sl@0
|
1037 |
/* 147 */ "sortlist ::= sortitem sortorder",
|
sl@0
|
1038 |
/* 148 */ "sortitem ::= expr",
|
sl@0
|
1039 |
/* 149 */ "sortorder ::= ASC",
|
sl@0
|
1040 |
/* 150 */ "sortorder ::= DESC",
|
sl@0
|
1041 |
/* 151 */ "sortorder ::=",
|
sl@0
|
1042 |
/* 152 */ "groupby_opt ::=",
|
sl@0
|
1043 |
/* 153 */ "groupby_opt ::= GROUP BY nexprlist",
|
sl@0
|
1044 |
/* 154 */ "having_opt ::=",
|
sl@0
|
1045 |
/* 155 */ "having_opt ::= HAVING expr",
|
sl@0
|
1046 |
/* 156 */ "limit_opt ::=",
|
sl@0
|
1047 |
/* 157 */ "limit_opt ::= LIMIT expr",
|
sl@0
|
1048 |
/* 158 */ "limit_opt ::= LIMIT expr OFFSET expr",
|
sl@0
|
1049 |
/* 159 */ "limit_opt ::= LIMIT expr COMMA expr",
|
sl@0
|
1050 |
/* 160 */ "cmd ::= DELETE FROM fullname indexed_opt where_opt",
|
sl@0
|
1051 |
/* 161 */ "where_opt ::=",
|
sl@0
|
1052 |
/* 162 */ "where_opt ::= WHERE expr",
|
sl@0
|
1053 |
/* 163 */ "cmd ::= UPDATE orconf fullname indexed_opt SET setlist where_opt",
|
sl@0
|
1054 |
/* 164 */ "setlist ::= setlist COMMA nm EQ expr",
|
sl@0
|
1055 |
/* 165 */ "setlist ::= nm EQ expr",
|
sl@0
|
1056 |
/* 166 */ "cmd ::= insert_cmd INTO fullname inscollist_opt VALUES LP itemlist RP",
|
sl@0
|
1057 |
/* 167 */ "cmd ::= insert_cmd INTO fullname inscollist_opt select",
|
sl@0
|
1058 |
/* 168 */ "cmd ::= insert_cmd INTO fullname inscollist_opt DEFAULT VALUES",
|
sl@0
|
1059 |
/* 169 */ "insert_cmd ::= INSERT orconf",
|
sl@0
|
1060 |
/* 170 */ "insert_cmd ::= REPLACE",
|
sl@0
|
1061 |
/* 171 */ "itemlist ::= itemlist COMMA expr",
|
sl@0
|
1062 |
/* 172 */ "itemlist ::= expr",
|
sl@0
|
1063 |
/* 173 */ "inscollist_opt ::=",
|
sl@0
|
1064 |
/* 174 */ "inscollist_opt ::= LP inscollist RP",
|
sl@0
|
1065 |
/* 175 */ "inscollist ::= inscollist COMMA nm",
|
sl@0
|
1066 |
/* 176 */ "inscollist ::= nm",
|
sl@0
|
1067 |
/* 177 */ "expr ::= term",
|
sl@0
|
1068 |
/* 178 */ "expr ::= LP expr RP",
|
sl@0
|
1069 |
/* 179 */ "term ::= NULL",
|
sl@0
|
1070 |
/* 180 */ "expr ::= ID",
|
sl@0
|
1071 |
/* 181 */ "expr ::= JOIN_KW",
|
sl@0
|
1072 |
/* 182 */ "expr ::= nm DOT nm",
|
sl@0
|
1073 |
/* 183 */ "expr ::= nm DOT nm DOT nm",
|
sl@0
|
1074 |
/* 184 */ "term ::= INTEGER|FLOAT|BLOB",
|
sl@0
|
1075 |
/* 185 */ "term ::= STRING",
|
sl@0
|
1076 |
/* 186 */ "expr ::= REGISTER",
|
sl@0
|
1077 |
/* 187 */ "expr ::= VARIABLE",
|
sl@0
|
1078 |
/* 188 */ "expr ::= expr COLLATE ids",
|
sl@0
|
1079 |
/* 189 */ "expr ::= CAST LP expr AS typetoken RP",
|
sl@0
|
1080 |
/* 190 */ "expr ::= ID LP distinct exprlist RP",
|
sl@0
|
1081 |
/* 191 */ "expr ::= ID LP STAR RP",
|
sl@0
|
1082 |
/* 192 */ "term ::= CTIME_KW",
|
sl@0
|
1083 |
/* 193 */ "expr ::= expr AND expr",
|
sl@0
|
1084 |
/* 194 */ "expr ::= expr OR expr",
|
sl@0
|
1085 |
/* 195 */ "expr ::= expr LT|GT|GE|LE expr",
|
sl@0
|
1086 |
/* 196 */ "expr ::= expr EQ|NE expr",
|
sl@0
|
1087 |
/* 197 */ "expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr",
|
sl@0
|
1088 |
/* 198 */ "expr ::= expr PLUS|MINUS expr",
|
sl@0
|
1089 |
/* 199 */ "expr ::= expr STAR|SLASH|REM expr",
|
sl@0
|
1090 |
/* 200 */ "expr ::= expr CONCAT expr",
|
sl@0
|
1091 |
/* 201 */ "likeop ::= LIKE_KW",
|
sl@0
|
1092 |
/* 202 */ "likeop ::= NOT LIKE_KW",
|
sl@0
|
1093 |
/* 203 */ "likeop ::= MATCH",
|
sl@0
|
1094 |
/* 204 */ "likeop ::= NOT MATCH",
|
sl@0
|
1095 |
/* 205 */ "escape ::= ESCAPE expr",
|
sl@0
|
1096 |
/* 206 */ "escape ::=",
|
sl@0
|
1097 |
/* 207 */ "expr ::= expr likeop expr escape",
|
sl@0
|
1098 |
/* 208 */ "expr ::= expr ISNULL|NOTNULL",
|
sl@0
|
1099 |
/* 209 */ "expr ::= expr IS NULL",
|
sl@0
|
1100 |
/* 210 */ "expr ::= expr NOT NULL",
|
sl@0
|
1101 |
/* 211 */ "expr ::= expr IS NOT NULL",
|
sl@0
|
1102 |
/* 212 */ "expr ::= NOT expr",
|
sl@0
|
1103 |
/* 213 */ "expr ::= BITNOT expr",
|
sl@0
|
1104 |
/* 214 */ "expr ::= MINUS expr",
|
sl@0
|
1105 |
/* 215 */ "expr ::= PLUS expr",
|
sl@0
|
1106 |
/* 216 */ "between_op ::= BETWEEN",
|
sl@0
|
1107 |
/* 217 */ "between_op ::= NOT BETWEEN",
|
sl@0
|
1108 |
/* 218 */ "expr ::= expr between_op expr AND expr",
|
sl@0
|
1109 |
/* 219 */ "in_op ::= IN",
|
sl@0
|
1110 |
/* 220 */ "in_op ::= NOT IN",
|
sl@0
|
1111 |
/* 221 */ "expr ::= expr in_op LP exprlist RP",
|
sl@0
|
1112 |
/* 222 */ "expr ::= LP select RP",
|
sl@0
|
1113 |
/* 223 */ "expr ::= expr in_op LP select RP",
|
sl@0
|
1114 |
/* 224 */ "expr ::= expr in_op nm dbnm",
|
sl@0
|
1115 |
/* 225 */ "expr ::= EXISTS LP select RP",
|
sl@0
|
1116 |
/* 226 */ "expr ::= CASE case_operand case_exprlist case_else END",
|
sl@0
|
1117 |
/* 227 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr",
|
sl@0
|
1118 |
/* 228 */ "case_exprlist ::= WHEN expr THEN expr",
|
sl@0
|
1119 |
/* 229 */ "case_else ::= ELSE expr",
|
sl@0
|
1120 |
/* 230 */ "case_else ::=",
|
sl@0
|
1121 |
/* 231 */ "case_operand ::= expr",
|
sl@0
|
1122 |
/* 232 */ "case_operand ::=",
|
sl@0
|
1123 |
/* 233 */ "exprlist ::= nexprlist",
|
sl@0
|
1124 |
/* 234 */ "exprlist ::=",
|
sl@0
|
1125 |
/* 235 */ "nexprlist ::= nexprlist COMMA expr",
|
sl@0
|
1126 |
/* 236 */ "nexprlist ::= expr",
|
sl@0
|
1127 |
/* 237 */ "cmd ::= CREATE uniqueflag INDEX ifnotexists nm dbnm ON nm LP idxlist RP",
|
sl@0
|
1128 |
/* 238 */ "uniqueflag ::= UNIQUE",
|
sl@0
|
1129 |
/* 239 */ "uniqueflag ::=",
|
sl@0
|
1130 |
/* 240 */ "idxlist_opt ::=",
|
sl@0
|
1131 |
/* 241 */ "idxlist_opt ::= LP idxlist RP",
|
sl@0
|
1132 |
/* 242 */ "idxlist ::= idxlist COMMA nm collate sortorder",
|
sl@0
|
1133 |
/* 243 */ "idxlist ::= nm collate sortorder",
|
sl@0
|
1134 |
/* 244 */ "collate ::=",
|
sl@0
|
1135 |
/* 245 */ "collate ::= COLLATE ids",
|
sl@0
|
1136 |
/* 246 */ "cmd ::= DROP INDEX ifexists fullname",
|
sl@0
|
1137 |
/* 247 */ "cmd ::= VACUUM",
|
sl@0
|
1138 |
/* 248 */ "cmd ::= VACUUM nm",
|
sl@0
|
1139 |
/* 249 */ "cmd ::= PRAGMA nm dbnm EQ nmnum",
|
sl@0
|
1140 |
/* 250 */ "cmd ::= PRAGMA nm dbnm EQ ON",
|
sl@0
|
1141 |
/* 251 */ "cmd ::= PRAGMA nm dbnm EQ DELETE",
|
sl@0
|
1142 |
/* 252 */ "cmd ::= PRAGMA nm dbnm EQ minus_num",
|
sl@0
|
1143 |
/* 253 */ "cmd ::= PRAGMA nm dbnm LP nmnum RP",
|
sl@0
|
1144 |
/* 254 */ "cmd ::= PRAGMA nm dbnm",
|
sl@0
|
1145 |
/* 255 */ "nmnum ::= plus_num",
|
sl@0
|
1146 |
/* 256 */ "nmnum ::= nm",
|
sl@0
|
1147 |
/* 257 */ "plus_num ::= plus_opt number",
|
sl@0
|
1148 |
/* 258 */ "minus_num ::= MINUS number",
|
sl@0
|
1149 |
/* 259 */ "number ::= INTEGER|FLOAT",
|
sl@0
|
1150 |
/* 260 */ "plus_opt ::= PLUS",
|
sl@0
|
1151 |
/* 261 */ "plus_opt ::=",
|
sl@0
|
1152 |
/* 262 */ "cmd ::= CREATE trigger_decl BEGIN trigger_cmd_list END",
|
sl@0
|
1153 |
/* 263 */ "trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause",
|
sl@0
|
1154 |
/* 264 */ "trigger_time ::= BEFORE",
|
sl@0
|
1155 |
/* 265 */ "trigger_time ::= AFTER",
|
sl@0
|
1156 |
/* 266 */ "trigger_time ::= INSTEAD OF",
|
sl@0
|
1157 |
/* 267 */ "trigger_time ::=",
|
sl@0
|
1158 |
/* 268 */ "trigger_event ::= DELETE|INSERT",
|
sl@0
|
1159 |
/* 269 */ "trigger_event ::= UPDATE",
|
sl@0
|
1160 |
/* 270 */ "trigger_event ::= UPDATE OF inscollist",
|
sl@0
|
1161 |
/* 271 */ "foreach_clause ::=",
|
sl@0
|
1162 |
/* 272 */ "foreach_clause ::= FOR EACH ROW",
|
sl@0
|
1163 |
/* 273 */ "when_clause ::=",
|
sl@0
|
1164 |
/* 274 */ "when_clause ::= WHEN expr",
|
sl@0
|
1165 |
/* 275 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI",
|
sl@0
|
1166 |
/* 276 */ "trigger_cmd_list ::= trigger_cmd SEMI",
|
sl@0
|
1167 |
/* 277 */ "trigger_cmd ::= UPDATE orconf nm SET setlist where_opt",
|
sl@0
|
1168 |
/* 278 */ "trigger_cmd ::= insert_cmd INTO nm inscollist_opt VALUES LP itemlist RP",
|
sl@0
|
1169 |
/* 279 */ "trigger_cmd ::= insert_cmd INTO nm inscollist_opt select",
|
sl@0
|
1170 |
/* 280 */ "trigger_cmd ::= DELETE FROM nm where_opt",
|
sl@0
|
1171 |
/* 281 */ "trigger_cmd ::= select",
|
sl@0
|
1172 |
/* 282 */ "expr ::= RAISE LP IGNORE RP",
|
sl@0
|
1173 |
/* 283 */ "expr ::= RAISE LP raisetype COMMA nm RP",
|
sl@0
|
1174 |
/* 284 */ "raisetype ::= ROLLBACK",
|
sl@0
|
1175 |
/* 285 */ "raisetype ::= ABORT",
|
sl@0
|
1176 |
/* 286 */ "raisetype ::= FAIL",
|
sl@0
|
1177 |
/* 287 */ "cmd ::= DROP TRIGGER ifexists fullname",
|
sl@0
|
1178 |
/* 288 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt",
|
sl@0
|
1179 |
/* 289 */ "cmd ::= DETACH database_kw_opt expr",
|
sl@0
|
1180 |
/* 290 */ "key_opt ::=",
|
sl@0
|
1181 |
/* 291 */ "key_opt ::= KEY expr",
|
sl@0
|
1182 |
/* 292 */ "database_kw_opt ::= DATABASE",
|
sl@0
|
1183 |
/* 293 */ "database_kw_opt ::=",
|
sl@0
|
1184 |
/* 294 */ "cmd ::= REINDEX",
|
sl@0
|
1185 |
/* 295 */ "cmd ::= REINDEX nm dbnm",
|
sl@0
|
1186 |
/* 296 */ "cmd ::= ANALYZE",
|
sl@0
|
1187 |
/* 297 */ "cmd ::= ANALYZE nm dbnm",
|
sl@0
|
1188 |
/* 298 */ "cmd ::= ALTER TABLE fullname RENAME TO nm",
|
sl@0
|
1189 |
/* 299 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt column",
|
sl@0
|
1190 |
/* 300 */ "add_column_fullname ::= fullname",
|
sl@0
|
1191 |
/* 301 */ "kwcolumn_opt ::=",
|
sl@0
|
1192 |
/* 302 */ "kwcolumn_opt ::= COLUMNKW",
|
sl@0
|
1193 |
};
|
sl@0
|
1194 |
#endif /* NDEBUG */
|
sl@0
|
1195 |
|
sl@0
|
1196 |
|
sl@0
|
1197 |
#if YYSTACKDEPTH<=0
|
sl@0
|
1198 |
/*
|
sl@0
|
1199 |
** Try to increase the size of the parser stack.
|
sl@0
|
1200 |
*/
|
sl@0
|
1201 |
static void yyGrowStack(yyParser *p){
|
sl@0
|
1202 |
int newSize;
|
sl@0
|
1203 |
yyStackEntry *pNew;
|
sl@0
|
1204 |
|
sl@0
|
1205 |
newSize = p->yystksz*2 + 100;
|
sl@0
|
1206 |
pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
|
sl@0
|
1207 |
if( pNew ){
|
sl@0
|
1208 |
p->yystack = pNew;
|
sl@0
|
1209 |
p->yystksz = newSize;
|
sl@0
|
1210 |
#ifndef NDEBUG
|
sl@0
|
1211 |
if( yyTraceFILE ){
|
sl@0
|
1212 |
fprintf(yyTraceFILE,"%sStack grows to %d entries!\n",
|
sl@0
|
1213 |
yyTracePrompt, p->yystksz);
|
sl@0
|
1214 |
}
|
sl@0
|
1215 |
#endif
|
sl@0
|
1216 |
}
|
sl@0
|
1217 |
}
|
sl@0
|
1218 |
#endif
|
sl@0
|
1219 |
|
sl@0
|
1220 |
/*
|
sl@0
|
1221 |
** This function allocates a new parser.
|
sl@0
|
1222 |
** The only argument is a pointer to a function which works like
|
sl@0
|
1223 |
** malloc.
|
sl@0
|
1224 |
**
|
sl@0
|
1225 |
** Inputs:
|
sl@0
|
1226 |
** A pointer to the function used to allocate memory.
|
sl@0
|
1227 |
**
|
sl@0
|
1228 |
** Outputs:
|
sl@0
|
1229 |
** A pointer to a parser. This pointer is used in subsequent calls
|
sl@0
|
1230 |
** to sqlite3Parser and sqlite3ParserFree.
|
sl@0
|
1231 |
*/
|
sl@0
|
1232 |
void *sqlite3ParserAlloc(void *(*mallocProc)(size_t)){
|
sl@0
|
1233 |
yyParser *pParser;
|
sl@0
|
1234 |
pParser = (yyParser*)(*mallocProc)( (size_t)sizeof(yyParser) );
|
sl@0
|
1235 |
if( pParser ){
|
sl@0
|
1236 |
pParser->yyidx = -1;
|
sl@0
|
1237 |
#ifdef YYTRACKMAXSTACKDEPTH
|
sl@0
|
1238 |
pParser->yyidxMax = 0;
|
sl@0
|
1239 |
#endif
|
sl@0
|
1240 |
#if YYSTACKDEPTH<=0
|
sl@0
|
1241 |
yyGrowStack(pParser);
|
sl@0
|
1242 |
#endif
|
sl@0
|
1243 |
}
|
sl@0
|
1244 |
return pParser;
|
sl@0
|
1245 |
}
|
sl@0
|
1246 |
|
sl@0
|
1247 |
/* The following function deletes the value associated with a
|
sl@0
|
1248 |
** symbol. The symbol can be either a terminal or nonterminal.
|
sl@0
|
1249 |
** "yymajor" is the symbol code, and "yypminor" is a pointer to
|
sl@0
|
1250 |
** the value.
|
sl@0
|
1251 |
*/
|
sl@0
|
1252 |
static void yy_destructor(
|
sl@0
|
1253 |
yyParser *yypParser, /* The parser */
|
sl@0
|
1254 |
YYCODETYPE yymajor, /* Type code for object to destroy */
|
sl@0
|
1255 |
YYMINORTYPE *yypminor /* The object to be destroyed */
|
sl@0
|
1256 |
){
|
sl@0
|
1257 |
sqlite3ParserARG_FETCH;
|
sl@0
|
1258 |
switch( yymajor ){
|
sl@0
|
1259 |
/* Here is inserted the actions which take place when a
|
sl@0
|
1260 |
** terminal or non-terminal is destroyed. This can happen
|
sl@0
|
1261 |
** when the symbol is popped from the stack during a
|
sl@0
|
1262 |
** reduce or during error processing or when a parser is
|
sl@0
|
1263 |
** being destroyed before it is finished parsing.
|
sl@0
|
1264 |
**
|
sl@0
|
1265 |
** Note: during a reduce, the only symbols destroyed are those
|
sl@0
|
1266 |
** which appear on the RHS of the rule, but which are not used
|
sl@0
|
1267 |
** inside the C code.
|
sl@0
|
1268 |
*/
|
sl@0
|
1269 |
case 156: /* select */
|
sl@0
|
1270 |
case 190: /* oneselect */
|
sl@0
|
1271 |
case 208: /* seltablist_paren */
|
sl@0
|
1272 |
{
|
sl@0
|
1273 |
#line 369 "parse.y"
|
sl@0
|
1274 |
sqlite3SelectDelete(pParse->db, (yypminor->yy91));
|
sl@0
|
1275 |
#line 1279 "parse.c"
|
sl@0
|
1276 |
}
|
sl@0
|
1277 |
break;
|
sl@0
|
1278 |
case 170: /* term */
|
sl@0
|
1279 |
case 171: /* expr */
|
sl@0
|
1280 |
case 195: /* where_opt */
|
sl@0
|
1281 |
case 197: /* having_opt */
|
sl@0
|
1282 |
case 206: /* on_opt */
|
sl@0
|
1283 |
case 212: /* sortitem */
|
sl@0
|
1284 |
case 220: /* escape */
|
sl@0
|
1285 |
case 223: /* case_operand */
|
sl@0
|
1286 |
case 225: /* case_else */
|
sl@0
|
1287 |
case 236: /* when_clause */
|
sl@0
|
1288 |
case 239: /* key_opt */
|
sl@0
|
1289 |
{
|
sl@0
|
1290 |
#line 669 "parse.y"
|
sl@0
|
1291 |
sqlite3ExprDelete(pParse->db, (yypminor->yy418));
|
sl@0
|
1292 |
#line 1296 "parse.c"
|
sl@0
|
1293 |
}
|
sl@0
|
1294 |
break;
|
sl@0
|
1295 |
case 175: /* idxlist_opt */
|
sl@0
|
1296 |
case 183: /* idxlist */
|
sl@0
|
1297 |
case 193: /* selcollist */
|
sl@0
|
1298 |
case 196: /* groupby_opt */
|
sl@0
|
1299 |
case 198: /* orderby_opt */
|
sl@0
|
1300 |
case 200: /* sclp */
|
sl@0
|
1301 |
case 211: /* sortlist */
|
sl@0
|
1302 |
case 213: /* nexprlist */
|
sl@0
|
1303 |
case 214: /* setlist */
|
sl@0
|
1304 |
case 217: /* itemlist */
|
sl@0
|
1305 |
case 218: /* exprlist */
|
sl@0
|
1306 |
case 224: /* case_exprlist */
|
sl@0
|
1307 |
{
|
sl@0
|
1308 |
#line 927 "parse.y"
|
sl@0
|
1309 |
sqlite3ExprListDelete(pParse->db, (yypminor->yy322));
|
sl@0
|
1310 |
#line 1314 "parse.c"
|
sl@0
|
1311 |
}
|
sl@0
|
1312 |
break;
|
sl@0
|
1313 |
case 189: /* fullname */
|
sl@0
|
1314 |
case 194: /* from */
|
sl@0
|
1315 |
case 202: /* seltablist */
|
sl@0
|
1316 |
case 203: /* stl_prefix */
|
sl@0
|
1317 |
{
|
sl@0
|
1318 |
#line 487 "parse.y"
|
sl@0
|
1319 |
sqlite3SrcListDelete(pParse->db, (yypminor->yy439));
|
sl@0
|
1320 |
#line 1324 "parse.c"
|
sl@0
|
1321 |
}
|
sl@0
|
1322 |
break;
|
sl@0
|
1323 |
case 207: /* using_opt */
|
sl@0
|
1324 |
case 210: /* inscollist */
|
sl@0
|
1325 |
case 216: /* inscollist_opt */
|
sl@0
|
1326 |
{
|
sl@0
|
1327 |
#line 519 "parse.y"
|
sl@0
|
1328 |
sqlite3IdListDelete(pParse->db, (yypminor->yy232));
|
sl@0
|
1329 |
#line 1333 "parse.c"
|
sl@0
|
1330 |
}
|
sl@0
|
1331 |
break;
|
sl@0
|
1332 |
case 232: /* trigger_cmd_list */
|
sl@0
|
1333 |
case 237: /* trigger_cmd */
|
sl@0
|
1334 |
{
|
sl@0
|
1335 |
#line 1031 "parse.y"
|
sl@0
|
1336 |
sqlite3DeleteTriggerStep(pParse->db, (yypminor->yy451));
|
sl@0
|
1337 |
#line 1341 "parse.c"
|
sl@0
|
1338 |
}
|
sl@0
|
1339 |
break;
|
sl@0
|
1340 |
case 234: /* trigger_event */
|
sl@0
|
1341 |
{
|
sl@0
|
1342 |
#line 1017 "parse.y"
|
sl@0
|
1343 |
sqlite3IdListDelete(pParse->db, (yypminor->yy378).b);
|
sl@0
|
1344 |
#line 1348 "parse.c"
|
sl@0
|
1345 |
}
|
sl@0
|
1346 |
break;
|
sl@0
|
1347 |
default: break; /* If no destructor action specified: do nothing */
|
sl@0
|
1348 |
}
|
sl@0
|
1349 |
}
|
sl@0
|
1350 |
|
sl@0
|
1351 |
/*
|
sl@0
|
1352 |
** Pop the parser's stack once.
|
sl@0
|
1353 |
**
|
sl@0
|
1354 |
** If there is a destructor routine associated with the token which
|
sl@0
|
1355 |
** is popped from the stack, then call it.
|
sl@0
|
1356 |
**
|
sl@0
|
1357 |
** Return the major token number for the symbol popped.
|
sl@0
|
1358 |
*/
|
sl@0
|
1359 |
static int yy_pop_parser_stack(yyParser *pParser){
|
sl@0
|
1360 |
YYCODETYPE yymajor;
|
sl@0
|
1361 |
yyStackEntry *yytos = &pParser->yystack[pParser->yyidx];
|
sl@0
|
1362 |
|
sl@0
|
1363 |
if( pParser->yyidx<0 ) return 0;
|
sl@0
|
1364 |
#ifndef NDEBUG
|
sl@0
|
1365 |
if( yyTraceFILE && pParser->yyidx>=0 ){
|
sl@0
|
1366 |
fprintf(yyTraceFILE,"%sPopping %s\n",
|
sl@0
|
1367 |
yyTracePrompt,
|
sl@0
|
1368 |
yyTokenName[yytos->major]);
|
sl@0
|
1369 |
}
|
sl@0
|
1370 |
#endif
|
sl@0
|
1371 |
yymajor = yytos->major;
|
sl@0
|
1372 |
yy_destructor(pParser, yymajor, &yytos->minor);
|
sl@0
|
1373 |
pParser->yyidx--;
|
sl@0
|
1374 |
return yymajor;
|
sl@0
|
1375 |
}
|
sl@0
|
1376 |
|
sl@0
|
1377 |
/*
|
sl@0
|
1378 |
** Deallocate and destroy a parser. Destructors are all called for
|
sl@0
|
1379 |
** all stack elements before shutting the parser down.
|
sl@0
|
1380 |
**
|
sl@0
|
1381 |
** Inputs:
|
sl@0
|
1382 |
** <ul>
|
sl@0
|
1383 |
** <li> A pointer to the parser. This should be a pointer
|
sl@0
|
1384 |
** obtained from sqlite3ParserAlloc.
|
sl@0
|
1385 |
** <li> A pointer to a function used to reclaim memory obtained
|
sl@0
|
1386 |
** from malloc.
|
sl@0
|
1387 |
** </ul>
|
sl@0
|
1388 |
*/
|
sl@0
|
1389 |
void sqlite3ParserFree(
|
sl@0
|
1390 |
void *p, /* The parser to be deleted */
|
sl@0
|
1391 |
void (*freeProc)(void*) /* Function used to reclaim memory */
|
sl@0
|
1392 |
){
|
sl@0
|
1393 |
yyParser *pParser = (yyParser*)p;
|
sl@0
|
1394 |
if( pParser==0 ) return;
|
sl@0
|
1395 |
while( pParser->yyidx>=0 ) yy_pop_parser_stack(pParser);
|
sl@0
|
1396 |
#if YYSTACKDEPTH<=0
|
sl@0
|
1397 |
free(pParser->yystack);
|
sl@0
|
1398 |
#endif
|
sl@0
|
1399 |
(*freeProc)((void*)pParser);
|
sl@0
|
1400 |
}
|
sl@0
|
1401 |
|
sl@0
|
1402 |
/*
|
sl@0
|
1403 |
** Return the peak depth of the stack for a parser.
|
sl@0
|
1404 |
*/
|
sl@0
|
1405 |
#ifdef YYTRACKMAXSTACKDEPTH
|
sl@0
|
1406 |
int sqlite3ParserStackPeak(void *p){
|
sl@0
|
1407 |
yyParser *pParser = (yyParser*)p;
|
sl@0
|
1408 |
return pParser->yyidxMax;
|
sl@0
|
1409 |
}
|
sl@0
|
1410 |
#endif
|
sl@0
|
1411 |
|
sl@0
|
1412 |
/*
|
sl@0
|
1413 |
** Find the appropriate action for a parser given the terminal
|
sl@0
|
1414 |
** look-ahead token iLookAhead.
|
sl@0
|
1415 |
**
|
sl@0
|
1416 |
** If the look-ahead token is YYNOCODE, then check to see if the action is
|
sl@0
|
1417 |
** independent of the look-ahead. If it is, return the action, otherwise
|
sl@0
|
1418 |
** return YY_NO_ACTION.
|
sl@0
|
1419 |
*/
|
sl@0
|
1420 |
static int yy_find_shift_action(
|
sl@0
|
1421 |
yyParser *pParser, /* The parser */
|
sl@0
|
1422 |
YYCODETYPE iLookAhead /* The look-ahead token */
|
sl@0
|
1423 |
){
|
sl@0
|
1424 |
int i;
|
sl@0
|
1425 |
int stateno = pParser->yystack[pParser->yyidx].stateno;
|
sl@0
|
1426 |
|
sl@0
|
1427 |
if( stateno>YY_SHIFT_MAX || (i = yy_shift_ofst[stateno])==YY_SHIFT_USE_DFLT ){
|
sl@0
|
1428 |
return yy_default[stateno];
|
sl@0
|
1429 |
}
|
sl@0
|
1430 |
assert( iLookAhead!=YYNOCODE );
|
sl@0
|
1431 |
i += iLookAhead;
|
sl@0
|
1432 |
if( i<0 || i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){
|
sl@0
|
1433 |
if( iLookAhead>0 ){
|
sl@0
|
1434 |
#ifdef YYFALLBACK
|
sl@0
|
1435 |
int iFallback; /* Fallback token */
|
sl@0
|
1436 |
if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
|
sl@0
|
1437 |
&& (iFallback = yyFallback[iLookAhead])!=0 ){
|
sl@0
|
1438 |
#ifndef NDEBUG
|
sl@0
|
1439 |
if( yyTraceFILE ){
|
sl@0
|
1440 |
fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
|
sl@0
|
1441 |
yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
|
sl@0
|
1442 |
}
|
sl@0
|
1443 |
#endif
|
sl@0
|
1444 |
return yy_find_shift_action(pParser, iFallback);
|
sl@0
|
1445 |
}
|
sl@0
|
1446 |
#endif
|
sl@0
|
1447 |
#ifdef YYWILDCARD
|
sl@0
|
1448 |
{
|
sl@0
|
1449 |
int j = i - iLookAhead + YYWILDCARD;
|
sl@0
|
1450 |
if( j>=0 && j<YY_SZ_ACTTAB && yy_lookahead[j]==YYWILDCARD ){
|
sl@0
|
1451 |
#ifndef NDEBUG
|
sl@0
|
1452 |
if( yyTraceFILE ){
|
sl@0
|
1453 |
fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n",
|
sl@0
|
1454 |
yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[YYWILDCARD]);
|
sl@0
|
1455 |
}
|
sl@0
|
1456 |
#endif /* NDEBUG */
|
sl@0
|
1457 |
return yy_action[j];
|
sl@0
|
1458 |
}
|
sl@0
|
1459 |
}
|
sl@0
|
1460 |
#endif /* YYWILDCARD */
|
sl@0
|
1461 |
}
|
sl@0
|
1462 |
return yy_default[stateno];
|
sl@0
|
1463 |
}else{
|
sl@0
|
1464 |
return yy_action[i];
|
sl@0
|
1465 |
}
|
sl@0
|
1466 |
}
|
sl@0
|
1467 |
|
sl@0
|
1468 |
/*
|
sl@0
|
1469 |
** Find the appropriate action for a parser given the non-terminal
|
sl@0
|
1470 |
** look-ahead token iLookAhead.
|
sl@0
|
1471 |
**
|
sl@0
|
1472 |
** If the look-ahead token is YYNOCODE, then check to see if the action is
|
sl@0
|
1473 |
** independent of the look-ahead. If it is, return the action, otherwise
|
sl@0
|
1474 |
** return YY_NO_ACTION.
|
sl@0
|
1475 |
*/
|
sl@0
|
1476 |
static int yy_find_reduce_action(
|
sl@0
|
1477 |
int stateno, /* Current state number */
|
sl@0
|
1478 |
YYCODETYPE iLookAhead /* The look-ahead token */
|
sl@0
|
1479 |
){
|
sl@0
|
1480 |
int i;
|
sl@0
|
1481 |
#ifdef YYERRORSYMBOL
|
sl@0
|
1482 |
if( stateno>YY_REDUCE_MAX ){
|
sl@0
|
1483 |
return yy_default[stateno];
|
sl@0
|
1484 |
}
|
sl@0
|
1485 |
#else
|
sl@0
|
1486 |
assert( stateno<=YY_REDUCE_MAX );
|
sl@0
|
1487 |
#endif
|
sl@0
|
1488 |
i = yy_reduce_ofst[stateno];
|
sl@0
|
1489 |
assert( i!=YY_REDUCE_USE_DFLT );
|
sl@0
|
1490 |
assert( iLookAhead!=YYNOCODE );
|
sl@0
|
1491 |
i += iLookAhead;
|
sl@0
|
1492 |
#ifdef YYERRORSYMBOL
|
sl@0
|
1493 |
if( i<0 || i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){
|
sl@0
|
1494 |
return yy_default[stateno];
|
sl@0
|
1495 |
}
|
sl@0
|
1496 |
#else
|
sl@0
|
1497 |
assert( i>=0 && i<YY_SZ_ACTTAB );
|
sl@0
|
1498 |
assert( yy_lookahead[i]==iLookAhead );
|
sl@0
|
1499 |
#endif
|
sl@0
|
1500 |
return yy_action[i];
|
sl@0
|
1501 |
}
|
sl@0
|
1502 |
|
sl@0
|
1503 |
/*
|
sl@0
|
1504 |
** The following routine is called if the stack overflows.
|
sl@0
|
1505 |
*/
|
sl@0
|
1506 |
static void yyStackOverflow(yyParser *yypParser, YYMINORTYPE *yypMinor){
|
sl@0
|
1507 |
sqlite3ParserARG_FETCH;
|
sl@0
|
1508 |
yypParser->yyidx--;
|
sl@0
|
1509 |
#ifndef NDEBUG
|
sl@0
|
1510 |
if( yyTraceFILE ){
|
sl@0
|
1511 |
fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
|
sl@0
|
1512 |
}
|
sl@0
|
1513 |
#endif
|
sl@0
|
1514 |
while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
|
sl@0
|
1515 |
/* Here code is inserted which will execute if the parser
|
sl@0
|
1516 |
** stack every overflows */
|
sl@0
|
1517 |
#line 39 "parse.y"
|
sl@0
|
1518 |
|
sl@0
|
1519 |
sqlite3ErrorMsg(pParse, "parser stack overflow");
|
sl@0
|
1520 |
pParse->parseError = 1;
|
sl@0
|
1521 |
#line 1526 "parse.c"
|
sl@0
|
1522 |
sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument var */
|
sl@0
|
1523 |
}
|
sl@0
|
1524 |
|
sl@0
|
1525 |
/*
|
sl@0
|
1526 |
** Perform a shift action.
|
sl@0
|
1527 |
*/
|
sl@0
|
1528 |
static void yy_shift(
|
sl@0
|
1529 |
yyParser *yypParser, /* The parser to be shifted */
|
sl@0
|
1530 |
int yyNewState, /* The new state to shift in */
|
sl@0
|
1531 |
int yyMajor, /* The major token to shift in */
|
sl@0
|
1532 |
YYMINORTYPE *yypMinor /* Pointer to the minor token to shift in */
|
sl@0
|
1533 |
){
|
sl@0
|
1534 |
yyStackEntry *yytos;
|
sl@0
|
1535 |
yypParser->yyidx++;
|
sl@0
|
1536 |
#ifdef YYTRACKMAXSTACKDEPTH
|
sl@0
|
1537 |
if( yypParser->yyidx>yypParser->yyidxMax ){
|
sl@0
|
1538 |
yypParser->yyidxMax = yypParser->yyidx;
|
sl@0
|
1539 |
}
|
sl@0
|
1540 |
#endif
|
sl@0
|
1541 |
#if YYSTACKDEPTH>0
|
sl@0
|
1542 |
if( yypParser->yyidx>=YYSTACKDEPTH ){
|
sl@0
|
1543 |
yyStackOverflow(yypParser, yypMinor);
|
sl@0
|
1544 |
return;
|
sl@0
|
1545 |
}
|
sl@0
|
1546 |
#else
|
sl@0
|
1547 |
if( yypParser->yyidx>=yypParser->yystksz ){
|
sl@0
|
1548 |
yyGrowStack(yypParser);
|
sl@0
|
1549 |
if( yypParser->yyidx>=yypParser->yystksz ){
|
sl@0
|
1550 |
yyStackOverflow(yypParser, yypMinor);
|
sl@0
|
1551 |
return;
|
sl@0
|
1552 |
}
|
sl@0
|
1553 |
}
|
sl@0
|
1554 |
#endif
|
sl@0
|
1555 |
yytos = &yypParser->yystack[yypParser->yyidx];
|
sl@0
|
1556 |
yytos->stateno = yyNewState;
|
sl@0
|
1557 |
yytos->major = yyMajor;
|
sl@0
|
1558 |
yytos->minor = *yypMinor;
|
sl@0
|
1559 |
#ifndef NDEBUG
|
sl@0
|
1560 |
if( yyTraceFILE && yypParser->yyidx>0 ){
|
sl@0
|
1561 |
int i;
|
sl@0
|
1562 |
fprintf(yyTraceFILE,"%sShift %d\n",yyTracePrompt,yyNewState);
|
sl@0
|
1563 |
fprintf(yyTraceFILE,"%sStack:",yyTracePrompt);
|
sl@0
|
1564 |
for(i=1; i<=yypParser->yyidx; i++)
|
sl@0
|
1565 |
fprintf(yyTraceFILE," %s",yyTokenName[yypParser->yystack[i].major]);
|
sl@0
|
1566 |
fprintf(yyTraceFILE,"\n");
|
sl@0
|
1567 |
}
|
sl@0
|
1568 |
#endif
|
sl@0
|
1569 |
}
|
sl@0
|
1570 |
|
sl@0
|
1571 |
/* The following table contains information about every rule that
|
sl@0
|
1572 |
** is used during the reduce.
|
sl@0
|
1573 |
*/
|
sl@0
|
1574 |
static const struct {
|
sl@0
|
1575 |
YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */
|
sl@0
|
1576 |
unsigned char nrhs; /* Number of right-hand side symbols in the rule */
|
sl@0
|
1577 |
} yyRuleInfo[] = {
|
sl@0
|
1578 |
{ 140, 1 },
|
sl@0
|
1579 |
{ 141, 2 },
|
sl@0
|
1580 |
{ 141, 1 },
|
sl@0
|
1581 |
{ 142, 1 },
|
sl@0
|
1582 |
{ 142, 3 },
|
sl@0
|
1583 |
{ 143, 0 },
|
sl@0
|
1584 |
{ 143, 1 },
|
sl@0
|
1585 |
{ 143, 3 },
|
sl@0
|
1586 |
{ 144, 1 },
|
sl@0
|
1587 |
{ 145, 3 },
|
sl@0
|
1588 |
{ 147, 0 },
|
sl@0
|
1589 |
{ 147, 1 },
|
sl@0
|
1590 |
{ 147, 2 },
|
sl@0
|
1591 |
{ 146, 0 },
|
sl@0
|
1592 |
{ 146, 1 },
|
sl@0
|
1593 |
{ 146, 1 },
|
sl@0
|
1594 |
{ 146, 1 },
|
sl@0
|
1595 |
{ 145, 2 },
|
sl@0
|
1596 |
{ 145, 2 },
|
sl@0
|
1597 |
{ 145, 2 },
|
sl@0
|
1598 |
{ 145, 2 },
|
sl@0
|
1599 |
{ 149, 6 },
|
sl@0
|
1600 |
{ 152, 0 },
|
sl@0
|
1601 |
{ 152, 3 },
|
sl@0
|
1602 |
{ 151, 1 },
|
sl@0
|
1603 |
{ 151, 0 },
|
sl@0
|
1604 |
{ 150, 4 },
|
sl@0
|
1605 |
{ 150, 2 },
|
sl@0
|
1606 |
{ 154, 3 },
|
sl@0
|
1607 |
{ 154, 1 },
|
sl@0
|
1608 |
{ 157, 3 },
|
sl@0
|
1609 |
{ 158, 1 },
|
sl@0
|
1610 |
{ 161, 1 },
|
sl@0
|
1611 |
{ 162, 1 },
|
sl@0
|
1612 |
{ 148, 1 },
|
sl@0
|
1613 |
{ 148, 1 },
|
sl@0
|
1614 |
{ 148, 1 },
|
sl@0
|
1615 |
{ 159, 0 },
|
sl@0
|
1616 |
{ 159, 1 },
|
sl@0
|
1617 |
{ 163, 1 },
|
sl@0
|
1618 |
{ 163, 4 },
|
sl@0
|
1619 |
{ 163, 6 },
|
sl@0
|
1620 |
{ 164, 1 },
|
sl@0
|
1621 |
{ 164, 2 },
|
sl@0
|
1622 |
{ 165, 1 },
|
sl@0
|
1623 |
{ 165, 1 },
|
sl@0
|
1624 |
{ 160, 2 },
|
sl@0
|
1625 |
{ 160, 0 },
|
sl@0
|
1626 |
{ 168, 3 },
|
sl@0
|
1627 |
{ 168, 1 },
|
sl@0
|
1628 |
{ 169, 2 },
|
sl@0
|
1629 |
{ 169, 4 },
|
sl@0
|
1630 |
{ 169, 3 },
|
sl@0
|
1631 |
{ 169, 3 },
|
sl@0
|
1632 |
{ 169, 2 },
|
sl@0
|
1633 |
{ 169, 2 },
|
sl@0
|
1634 |
{ 169, 3 },
|
sl@0
|
1635 |
{ 169, 5 },
|
sl@0
|
1636 |
{ 169, 2 },
|
sl@0
|
1637 |
{ 169, 4 },
|
sl@0
|
1638 |
{ 169, 4 },
|
sl@0
|
1639 |
{ 169, 1 },
|
sl@0
|
1640 |
{ 169, 2 },
|
sl@0
|
1641 |
{ 174, 0 },
|
sl@0
|
1642 |
{ 174, 1 },
|
sl@0
|
1643 |
{ 176, 0 },
|
sl@0
|
1644 |
{ 176, 2 },
|
sl@0
|
1645 |
{ 178, 2 },
|
sl@0
|
1646 |
{ 178, 3 },
|
sl@0
|
1647 |
{ 178, 3 },
|
sl@0
|
1648 |
{ 178, 3 },
|
sl@0
|
1649 |
{ 179, 2 },
|
sl@0
|
1650 |
{ 179, 2 },
|
sl@0
|
1651 |
{ 179, 1 },
|
sl@0
|
1652 |
{ 179, 1 },
|
sl@0
|
1653 |
{ 177, 3 },
|
sl@0
|
1654 |
{ 177, 2 },
|
sl@0
|
1655 |
{ 180, 0 },
|
sl@0
|
1656 |
{ 180, 2 },
|
sl@0
|
1657 |
{ 180, 2 },
|
sl@0
|
1658 |
{ 155, 0 },
|
sl@0
|
1659 |
{ 155, 2 },
|
sl@0
|
1660 |
{ 181, 3 },
|
sl@0
|
1661 |
{ 181, 2 },
|
sl@0
|
1662 |
{ 181, 1 },
|
sl@0
|
1663 |
{ 182, 2 },
|
sl@0
|
1664 |
{ 182, 7 },
|
sl@0
|
1665 |
{ 182, 5 },
|
sl@0
|
1666 |
{ 182, 5 },
|
sl@0
|
1667 |
{ 182, 10 },
|
sl@0
|
1668 |
{ 184, 0 },
|
sl@0
|
1669 |
{ 184, 1 },
|
sl@0
|
1670 |
{ 172, 0 },
|
sl@0
|
1671 |
{ 172, 3 },
|
sl@0
|
1672 |
{ 185, 0 },
|
sl@0
|
1673 |
{ 185, 2 },
|
sl@0
|
1674 |
{ 186, 1 },
|
sl@0
|
1675 |
{ 186, 1 },
|
sl@0
|
1676 |
{ 186, 1 },
|
sl@0
|
1677 |
{ 145, 4 },
|
sl@0
|
1678 |
{ 188, 2 },
|
sl@0
|
1679 |
{ 188, 0 },
|
sl@0
|
1680 |
{ 145, 8 },
|
sl@0
|
1681 |
{ 145, 4 },
|
sl@0
|
1682 |
{ 145, 1 },
|
sl@0
|
1683 |
{ 156, 1 },
|
sl@0
|
1684 |
{ 156, 3 },
|
sl@0
|
1685 |
{ 191, 1 },
|
sl@0
|
1686 |
{ 191, 2 },
|
sl@0
|
1687 |
{ 191, 1 },
|
sl@0
|
1688 |
{ 190, 9 },
|
sl@0
|
1689 |
{ 192, 1 },
|
sl@0
|
1690 |
{ 192, 1 },
|
sl@0
|
1691 |
{ 192, 0 },
|
sl@0
|
1692 |
{ 200, 2 },
|
sl@0
|
1693 |
{ 200, 0 },
|
sl@0
|
1694 |
{ 193, 3 },
|
sl@0
|
1695 |
{ 193, 2 },
|
sl@0
|
1696 |
{ 193, 4 },
|
sl@0
|
1697 |
{ 201, 2 },
|
sl@0
|
1698 |
{ 201, 1 },
|
sl@0
|
1699 |
{ 201, 0 },
|
sl@0
|
1700 |
{ 194, 0 },
|
sl@0
|
1701 |
{ 194, 2 },
|
sl@0
|
1702 |
{ 203, 2 },
|
sl@0
|
1703 |
{ 203, 0 },
|
sl@0
|
1704 |
{ 202, 7 },
|
sl@0
|
1705 |
{ 202, 7 },
|
sl@0
|
1706 |
{ 208, 1 },
|
sl@0
|
1707 |
{ 208, 1 },
|
sl@0
|
1708 |
{ 153, 0 },
|
sl@0
|
1709 |
{ 153, 2 },
|
sl@0
|
1710 |
{ 189, 2 },
|
sl@0
|
1711 |
{ 204, 1 },
|
sl@0
|
1712 |
{ 204, 2 },
|
sl@0
|
1713 |
{ 204, 3 },
|
sl@0
|
1714 |
{ 204, 4 },
|
sl@0
|
1715 |
{ 206, 2 },
|
sl@0
|
1716 |
{ 206, 0 },
|
sl@0
|
1717 |
{ 205, 0 },
|
sl@0
|
1718 |
{ 205, 3 },
|
sl@0
|
1719 |
{ 205, 2 },
|
sl@0
|
1720 |
{ 207, 4 },
|
sl@0
|
1721 |
{ 207, 0 },
|
sl@0
|
1722 |
{ 198, 0 },
|
sl@0
|
1723 |
{ 198, 3 },
|
sl@0
|
1724 |
{ 211, 4 },
|
sl@0
|
1725 |
{ 211, 2 },
|
sl@0
|
1726 |
{ 212, 1 },
|
sl@0
|
1727 |
{ 173, 1 },
|
sl@0
|
1728 |
{ 173, 1 },
|
sl@0
|
1729 |
{ 173, 0 },
|
sl@0
|
1730 |
{ 196, 0 },
|
sl@0
|
1731 |
{ 196, 3 },
|
sl@0
|
1732 |
{ 197, 0 },
|
sl@0
|
1733 |
{ 197, 2 },
|
sl@0
|
1734 |
{ 199, 0 },
|
sl@0
|
1735 |
{ 199, 2 },
|
sl@0
|
1736 |
{ 199, 4 },
|
sl@0
|
1737 |
{ 199, 4 },
|
sl@0
|
1738 |
{ 145, 5 },
|
sl@0
|
1739 |
{ 195, 0 },
|
sl@0
|
1740 |
{ 195, 2 },
|
sl@0
|
1741 |
{ 145, 7 },
|
sl@0
|
1742 |
{ 214, 5 },
|
sl@0
|
1743 |
{ 214, 3 },
|
sl@0
|
1744 |
{ 145, 8 },
|
sl@0
|
1745 |
{ 145, 5 },
|
sl@0
|
1746 |
{ 145, 6 },
|
sl@0
|
1747 |
{ 215, 2 },
|
sl@0
|
1748 |
{ 215, 1 },
|
sl@0
|
1749 |
{ 217, 3 },
|
sl@0
|
1750 |
{ 217, 1 },
|
sl@0
|
1751 |
{ 216, 0 },
|
sl@0
|
1752 |
{ 216, 3 },
|
sl@0
|
1753 |
{ 210, 3 },
|
sl@0
|
1754 |
{ 210, 1 },
|
sl@0
|
1755 |
{ 171, 1 },
|
sl@0
|
1756 |
{ 171, 3 },
|
sl@0
|
1757 |
{ 170, 1 },
|
sl@0
|
1758 |
{ 171, 1 },
|
sl@0
|
1759 |
{ 171, 1 },
|
sl@0
|
1760 |
{ 171, 3 },
|
sl@0
|
1761 |
{ 171, 5 },
|
sl@0
|
1762 |
{ 170, 1 },
|
sl@0
|
1763 |
{ 170, 1 },
|
sl@0
|
1764 |
{ 171, 1 },
|
sl@0
|
1765 |
{ 171, 1 },
|
sl@0
|
1766 |
{ 171, 3 },
|
sl@0
|
1767 |
{ 171, 6 },
|
sl@0
|
1768 |
{ 171, 5 },
|
sl@0
|
1769 |
{ 171, 4 },
|
sl@0
|
1770 |
{ 170, 1 },
|
sl@0
|
1771 |
{ 171, 3 },
|
sl@0
|
1772 |
{ 171, 3 },
|
sl@0
|
1773 |
{ 171, 3 },
|
sl@0
|
1774 |
{ 171, 3 },
|
sl@0
|
1775 |
{ 171, 3 },
|
sl@0
|
1776 |
{ 171, 3 },
|
sl@0
|
1777 |
{ 171, 3 },
|
sl@0
|
1778 |
{ 171, 3 },
|
sl@0
|
1779 |
{ 219, 1 },
|
sl@0
|
1780 |
{ 219, 2 },
|
sl@0
|
1781 |
{ 219, 1 },
|
sl@0
|
1782 |
{ 219, 2 },
|
sl@0
|
1783 |
{ 220, 2 },
|
sl@0
|
1784 |
{ 220, 0 },
|
sl@0
|
1785 |
{ 171, 4 },
|
sl@0
|
1786 |
{ 171, 2 },
|
sl@0
|
1787 |
{ 171, 3 },
|
sl@0
|
1788 |
{ 171, 3 },
|
sl@0
|
1789 |
{ 171, 4 },
|
sl@0
|
1790 |
{ 171, 2 },
|
sl@0
|
1791 |
{ 171, 2 },
|
sl@0
|
1792 |
{ 171, 2 },
|
sl@0
|
1793 |
{ 171, 2 },
|
sl@0
|
1794 |
{ 221, 1 },
|
sl@0
|
1795 |
{ 221, 2 },
|
sl@0
|
1796 |
{ 171, 5 },
|
sl@0
|
1797 |
{ 222, 1 },
|
sl@0
|
1798 |
{ 222, 2 },
|
sl@0
|
1799 |
{ 171, 5 },
|
sl@0
|
1800 |
{ 171, 3 },
|
sl@0
|
1801 |
{ 171, 5 },
|
sl@0
|
1802 |
{ 171, 4 },
|
sl@0
|
1803 |
{ 171, 4 },
|
sl@0
|
1804 |
{ 171, 5 },
|
sl@0
|
1805 |
{ 224, 5 },
|
sl@0
|
1806 |
{ 224, 4 },
|
sl@0
|
1807 |
{ 225, 2 },
|
sl@0
|
1808 |
{ 225, 0 },
|
sl@0
|
1809 |
{ 223, 1 },
|
sl@0
|
1810 |
{ 223, 0 },
|
sl@0
|
1811 |
{ 218, 1 },
|
sl@0
|
1812 |
{ 218, 0 },
|
sl@0
|
1813 |
{ 213, 3 },
|
sl@0
|
1814 |
{ 213, 1 },
|
sl@0
|
1815 |
{ 145, 11 },
|
sl@0
|
1816 |
{ 226, 1 },
|
sl@0
|
1817 |
{ 226, 0 },
|
sl@0
|
1818 |
{ 175, 0 },
|
sl@0
|
1819 |
{ 175, 3 },
|
sl@0
|
1820 |
{ 183, 5 },
|
sl@0
|
1821 |
{ 183, 3 },
|
sl@0
|
1822 |
{ 227, 0 },
|
sl@0
|
1823 |
{ 227, 2 },
|
sl@0
|
1824 |
{ 145, 4 },
|
sl@0
|
1825 |
{ 145, 1 },
|
sl@0
|
1826 |
{ 145, 2 },
|
sl@0
|
1827 |
{ 145, 5 },
|
sl@0
|
1828 |
{ 145, 5 },
|
sl@0
|
1829 |
{ 145, 5 },
|
sl@0
|
1830 |
{ 145, 5 },
|
sl@0
|
1831 |
{ 145, 6 },
|
sl@0
|
1832 |
{ 145, 3 },
|
sl@0
|
1833 |
{ 228, 1 },
|
sl@0
|
1834 |
{ 228, 1 },
|
sl@0
|
1835 |
{ 166, 2 },
|
sl@0
|
1836 |
{ 167, 2 },
|
sl@0
|
1837 |
{ 230, 1 },
|
sl@0
|
1838 |
{ 229, 1 },
|
sl@0
|
1839 |
{ 229, 0 },
|
sl@0
|
1840 |
{ 145, 5 },
|
sl@0
|
1841 |
{ 231, 11 },
|
sl@0
|
1842 |
{ 233, 1 },
|
sl@0
|
1843 |
{ 233, 1 },
|
sl@0
|
1844 |
{ 233, 2 },
|
sl@0
|
1845 |
{ 233, 0 },
|
sl@0
|
1846 |
{ 234, 1 },
|
sl@0
|
1847 |
{ 234, 1 },
|
sl@0
|
1848 |
{ 234, 3 },
|
sl@0
|
1849 |
{ 235, 0 },
|
sl@0
|
1850 |
{ 235, 3 },
|
sl@0
|
1851 |
{ 236, 0 },
|
sl@0
|
1852 |
{ 236, 2 },
|
sl@0
|
1853 |
{ 232, 3 },
|
sl@0
|
1854 |
{ 232, 2 },
|
sl@0
|
1855 |
{ 237, 6 },
|
sl@0
|
1856 |
{ 237, 8 },
|
sl@0
|
1857 |
{ 237, 5 },
|
sl@0
|
1858 |
{ 237, 4 },
|
sl@0
|
1859 |
{ 237, 1 },
|
sl@0
|
1860 |
{ 171, 4 },
|
sl@0
|
1861 |
{ 171, 6 },
|
sl@0
|
1862 |
{ 187, 1 },
|
sl@0
|
1863 |
{ 187, 1 },
|
sl@0
|
1864 |
{ 187, 1 },
|
sl@0
|
1865 |
{ 145, 4 },
|
sl@0
|
1866 |
{ 145, 6 },
|
sl@0
|
1867 |
{ 145, 3 },
|
sl@0
|
1868 |
{ 239, 0 },
|
sl@0
|
1869 |
{ 239, 2 },
|
sl@0
|
1870 |
{ 238, 1 },
|
sl@0
|
1871 |
{ 238, 0 },
|
sl@0
|
1872 |
{ 145, 1 },
|
sl@0
|
1873 |
{ 145, 3 },
|
sl@0
|
1874 |
{ 145, 1 },
|
sl@0
|
1875 |
{ 145, 3 },
|
sl@0
|
1876 |
{ 145, 6 },
|
sl@0
|
1877 |
{ 145, 6 },
|
sl@0
|
1878 |
{ 240, 1 },
|
sl@0
|
1879 |
{ 241, 0 },
|
sl@0
|
1880 |
{ 241, 1 },
|
sl@0
|
1881 |
};
|
sl@0
|
1882 |
|
sl@0
|
1883 |
static void yy_accept(yyParser*); /* Forward Declaration */
|
sl@0
|
1884 |
|
sl@0
|
1885 |
/*
|
sl@0
|
1886 |
** Perform a reduce action and the shift that must immediately
|
sl@0
|
1887 |
** follow the reduce.
|
sl@0
|
1888 |
*/
|
sl@0
|
1889 |
static void yy_reduce(
|
sl@0
|
1890 |
yyParser *yypParser, /* The parser */
|
sl@0
|
1891 |
int yyruleno /* Number of the rule by which to reduce */
|
sl@0
|
1892 |
){
|
sl@0
|
1893 |
int yygoto; /* The next state */
|
sl@0
|
1894 |
int yyact; /* The next action */
|
sl@0
|
1895 |
YYMINORTYPE yygotominor; /* The LHS of the rule reduced */
|
sl@0
|
1896 |
yyStackEntry *yymsp; /* The top of the parser's stack */
|
sl@0
|
1897 |
int yysize; /* Amount to pop the stack */
|
sl@0
|
1898 |
sqlite3ParserARG_FETCH;
|
sl@0
|
1899 |
yymsp = &yypParser->yystack[yypParser->yyidx];
|
sl@0
|
1900 |
#ifndef NDEBUG
|
sl@0
|
1901 |
if( yyTraceFILE && yyruleno>=0
|
sl@0
|
1902 |
&& yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){
|
sl@0
|
1903 |
fprintf(yyTraceFILE, "%sReduce [%s].\n", yyTracePrompt,
|
sl@0
|
1904 |
yyRuleName[yyruleno]);
|
sl@0
|
1905 |
}
|
sl@0
|
1906 |
#endif /* NDEBUG */
|
sl@0
|
1907 |
|
sl@0
|
1908 |
/* Silence complaints from purify about yygotominor being uninitialized
|
sl@0
|
1909 |
** in some cases when it is copied into the stack after the following
|
sl@0
|
1910 |
** switch. yygotominor is uninitialized when a rule reduces that does
|
sl@0
|
1911 |
** not set the value of its left-hand side nonterminal. Leaving the
|
sl@0
|
1912 |
** value of the nonterminal uninitialized is utterly harmless as long
|
sl@0
|
1913 |
** as the value is never used. So really the only thing this code
|
sl@0
|
1914 |
** accomplishes is to quieten purify.
|
sl@0
|
1915 |
**
|
sl@0
|
1916 |
** 2007-01-16: The wireshark project (www.wireshark.org) reports that
|
sl@0
|
1917 |
** without this code, their parser segfaults. I'm not sure what there
|
sl@0
|
1918 |
** parser is doing to make this happen. This is the second bug report
|
sl@0
|
1919 |
** from wireshark this week. Clearly they are stressing Lemon in ways
|
sl@0
|
1920 |
** that it has not been previously stressed... (SQLite ticket #2172)
|
sl@0
|
1921 |
*/
|
sl@0
|
1922 |
/*memset(&yygotominor, 0, sizeof(yygotominor));*/
|
sl@0
|
1923 |
yygotominor = yyzerominor;
|
sl@0
|
1924 |
|
sl@0
|
1925 |
|
sl@0
|
1926 |
switch( yyruleno ){
|
sl@0
|
1927 |
/* Beginning here are the reduction cases. A typical example
|
sl@0
|
1928 |
** follows:
|
sl@0
|
1929 |
** case 0:
|
sl@0
|
1930 |
** #line <lineno> <grammarfile>
|
sl@0
|
1931 |
** { ... } // User supplied code
|
sl@0
|
1932 |
** #line <lineno> <thisfile>
|
sl@0
|
1933 |
** break;
|
sl@0
|
1934 |
*/
|
sl@0
|
1935 |
case 0: /* input ::= cmdlist */
|
sl@0
|
1936 |
case 1: /* cmdlist ::= cmdlist ecmd */
|
sl@0
|
1937 |
case 2: /* cmdlist ::= ecmd */
|
sl@0
|
1938 |
case 3: /* ecmd ::= SEMI */
|
sl@0
|
1939 |
case 4: /* ecmd ::= explain cmdx SEMI */
|
sl@0
|
1940 |
case 10: /* trans_opt ::= */
|
sl@0
|
1941 |
case 11: /* trans_opt ::= TRANSACTION */
|
sl@0
|
1942 |
case 12: /* trans_opt ::= TRANSACTION nm */
|
sl@0
|
1943 |
case 20: /* cmd ::= create_table create_table_args */
|
sl@0
|
1944 |
case 28: /* columnlist ::= columnlist COMMA column */
|
sl@0
|
1945 |
case 29: /* columnlist ::= column */
|
sl@0
|
1946 |
case 37: /* type ::= */
|
sl@0
|
1947 |
case 44: /* signed ::= plus_num */
|
sl@0
|
1948 |
case 45: /* signed ::= minus_num */
|
sl@0
|
1949 |
case 46: /* carglist ::= carglist carg */
|
sl@0
|
1950 |
case 47: /* carglist ::= */
|
sl@0
|
1951 |
case 48: /* carg ::= CONSTRAINT nm ccons */
|
sl@0
|
1952 |
case 49: /* carg ::= ccons */
|
sl@0
|
1953 |
case 55: /* ccons ::= NULL onconf */
|
sl@0
|
1954 |
case 82: /* conslist ::= conslist COMMA tcons */
|
sl@0
|
1955 |
case 83: /* conslist ::= conslist tcons */
|
sl@0
|
1956 |
case 84: /* conslist ::= tcons */
|
sl@0
|
1957 |
case 85: /* tcons ::= CONSTRAINT nm */
|
sl@0
|
1958 |
case 260: /* plus_opt ::= PLUS */
|
sl@0
|
1959 |
case 261: /* plus_opt ::= */
|
sl@0
|
1960 |
case 271: /* foreach_clause ::= */
|
sl@0
|
1961 |
case 272: /* foreach_clause ::= FOR EACH ROW */
|
sl@0
|
1962 |
case 292: /* database_kw_opt ::= DATABASE */
|
sl@0
|
1963 |
case 293: /* database_kw_opt ::= */
|
sl@0
|
1964 |
case 301: /* kwcolumn_opt ::= */
|
sl@0
|
1965 |
case 302: /* kwcolumn_opt ::= COLUMNKW */
|
sl@0
|
1966 |
#line 91 "parse.y"
|
sl@0
|
1967 |
{
|
sl@0
|
1968 |
}
|
sl@0
|
1969 |
#line 1974 "parse.c"
|
sl@0
|
1970 |
break;
|
sl@0
|
1971 |
case 5: /* explain ::= */
|
sl@0
|
1972 |
#line 96 "parse.y"
|
sl@0
|
1973 |
{ sqlite3BeginParse(pParse, 0); }
|
sl@0
|
1974 |
#line 1979 "parse.c"
|
sl@0
|
1975 |
break;
|
sl@0
|
1976 |
case 6: /* explain ::= EXPLAIN */
|
sl@0
|
1977 |
#line 98 "parse.y"
|
sl@0
|
1978 |
{ sqlite3BeginParse(pParse, 1); }
|
sl@0
|
1979 |
#line 1984 "parse.c"
|
sl@0
|
1980 |
break;
|
sl@0
|
1981 |
case 7: /* explain ::= EXPLAIN QUERY PLAN */
|
sl@0
|
1982 |
#line 99 "parse.y"
|
sl@0
|
1983 |
{ sqlite3BeginParse(pParse, 2); }
|
sl@0
|
1984 |
#line 1989 "parse.c"
|
sl@0
|
1985 |
break;
|
sl@0
|
1986 |
case 8: /* cmdx ::= cmd */
|
sl@0
|
1987 |
#line 101 "parse.y"
|
sl@0
|
1988 |
{ sqlite3FinishCoding(pParse); }
|
sl@0
|
1989 |
#line 1994 "parse.c"
|
sl@0
|
1990 |
break;
|
sl@0
|
1991 |
case 9: /* cmd ::= BEGIN transtype trans_opt */
|
sl@0
|
1992 |
#line 106 "parse.y"
|
sl@0
|
1993 |
{sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy328);}
|
sl@0
|
1994 |
#line 1999 "parse.c"
|
sl@0
|
1995 |
break;
|
sl@0
|
1996 |
case 13: /* transtype ::= */
|
sl@0
|
1997 |
#line 111 "parse.y"
|
sl@0
|
1998 |
{yygotominor.yy328 = TK_DEFERRED;}
|
sl@0
|
1999 |
#line 2004 "parse.c"
|
sl@0
|
2000 |
break;
|
sl@0
|
2001 |
case 14: /* transtype ::= DEFERRED */
|
sl@0
|
2002 |
case 15: /* transtype ::= IMMEDIATE */
|
sl@0
|
2003 |
case 16: /* transtype ::= EXCLUSIVE */
|
sl@0
|
2004 |
case 107: /* multiselect_op ::= UNION */
|
sl@0
|
2005 |
case 109: /* multiselect_op ::= EXCEPT|INTERSECT */
|
sl@0
|
2006 |
#line 112 "parse.y"
|
sl@0
|
2007 |
{yygotominor.yy328 = yymsp[0].major;}
|
sl@0
|
2008 |
#line 2013 "parse.c"
|
sl@0
|
2009 |
break;
|
sl@0
|
2010 |
case 17: /* cmd ::= COMMIT trans_opt */
|
sl@0
|
2011 |
case 18: /* cmd ::= END trans_opt */
|
sl@0
|
2012 |
#line 115 "parse.y"
|
sl@0
|
2013 |
{sqlite3CommitTransaction(pParse);}
|
sl@0
|
2014 |
#line 2019 "parse.c"
|
sl@0
|
2015 |
break;
|
sl@0
|
2016 |
case 19: /* cmd ::= ROLLBACK trans_opt */
|
sl@0
|
2017 |
#line 117 "parse.y"
|
sl@0
|
2018 |
{sqlite3RollbackTransaction(pParse);}
|
sl@0
|
2019 |
#line 2024 "parse.c"
|
sl@0
|
2020 |
break;
|
sl@0
|
2021 |
case 21: /* create_table ::= CREATE temp TABLE ifnotexists nm dbnm */
|
sl@0
|
2022 |
#line 122 "parse.y"
|
sl@0
|
2023 |
{
|
sl@0
|
2024 |
sqlite3StartTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,yymsp[-4].minor.yy328,0,0,yymsp[-2].minor.yy328);
|
sl@0
|
2025 |
}
|
sl@0
|
2026 |
#line 2031 "parse.c"
|
sl@0
|
2027 |
break;
|
sl@0
|
2028 |
case 22: /* ifnotexists ::= */
|
sl@0
|
2029 |
case 25: /* temp ::= */
|
sl@0
|
2030 |
case 63: /* autoinc ::= */
|
sl@0
|
2031 |
case 77: /* init_deferred_pred_opt ::= */
|
sl@0
|
2032 |
case 79: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */
|
sl@0
|
2033 |
case 90: /* defer_subclause_opt ::= */
|
sl@0
|
2034 |
case 101: /* ifexists ::= */
|
sl@0
|
2035 |
case 112: /* distinct ::= ALL */
|
sl@0
|
2036 |
case 113: /* distinct ::= */
|
sl@0
|
2037 |
case 216: /* between_op ::= BETWEEN */
|
sl@0
|
2038 |
case 219: /* in_op ::= IN */
|
sl@0
|
2039 |
#line 126 "parse.y"
|
sl@0
|
2040 |
{yygotominor.yy328 = 0;}
|
sl@0
|
2041 |
#line 2046 "parse.c"
|
sl@0
|
2042 |
break;
|
sl@0
|
2043 |
case 23: /* ifnotexists ::= IF NOT EXISTS */
|
sl@0
|
2044 |
case 24: /* temp ::= TEMP */
|
sl@0
|
2045 |
case 64: /* autoinc ::= AUTOINCR */
|
sl@0
|
2046 |
case 78: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */
|
sl@0
|
2047 |
case 100: /* ifexists ::= IF EXISTS */
|
sl@0
|
2048 |
case 111: /* distinct ::= DISTINCT */
|
sl@0
|
2049 |
case 217: /* between_op ::= NOT BETWEEN */
|
sl@0
|
2050 |
case 220: /* in_op ::= NOT IN */
|
sl@0
|
2051 |
#line 127 "parse.y"
|
sl@0
|
2052 |
{yygotominor.yy328 = 1;}
|
sl@0
|
2053 |
#line 2058 "parse.c"
|
sl@0
|
2054 |
break;
|
sl@0
|
2055 |
case 26: /* create_table_args ::= LP columnlist conslist_opt RP */
|
sl@0
|
2056 |
#line 133 "parse.y"
|
sl@0
|
2057 |
{
|
sl@0
|
2058 |
sqlite3EndTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0);
|
sl@0
|
2059 |
}
|
sl@0
|
2060 |
#line 2065 "parse.c"
|
sl@0
|
2061 |
break;
|
sl@0
|
2062 |
case 27: /* create_table_args ::= AS select */
|
sl@0
|
2063 |
#line 136 "parse.y"
|
sl@0
|
2064 |
{
|
sl@0
|
2065 |
sqlite3EndTable(pParse,0,0,yymsp[0].minor.yy91);
|
sl@0
|
2066 |
sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy91);
|
sl@0
|
2067 |
}
|
sl@0
|
2068 |
#line 2073 "parse.c"
|
sl@0
|
2069 |
break;
|
sl@0
|
2070 |
case 30: /* column ::= columnid type carglist */
|
sl@0
|
2071 |
#line 148 "parse.y"
|
sl@0
|
2072 |
{
|
sl@0
|
2073 |
yygotominor.yy0.z = yymsp[-2].minor.yy0.z;
|
sl@0
|
2074 |
yygotominor.yy0.n = (pParse->sLastToken.z-yymsp[-2].minor.yy0.z) + pParse->sLastToken.n;
|
sl@0
|
2075 |
}
|
sl@0
|
2076 |
#line 2081 "parse.c"
|
sl@0
|
2077 |
break;
|
sl@0
|
2078 |
case 31: /* columnid ::= nm */
|
sl@0
|
2079 |
#line 152 "parse.y"
|
sl@0
|
2080 |
{
|
sl@0
|
2081 |
sqlite3AddColumn(pParse,&yymsp[0].minor.yy0);
|
sl@0
|
2082 |
yygotominor.yy0 = yymsp[0].minor.yy0;
|
sl@0
|
2083 |
}
|
sl@0
|
2084 |
#line 2089 "parse.c"
|
sl@0
|
2085 |
break;
|
sl@0
|
2086 |
case 32: /* id ::= ID */
|
sl@0
|
2087 |
case 33: /* ids ::= ID|STRING */
|
sl@0
|
2088 |
case 34: /* nm ::= ID */
|
sl@0
|
2089 |
case 35: /* nm ::= STRING */
|
sl@0
|
2090 |
case 36: /* nm ::= JOIN_KW */
|
sl@0
|
2091 |
case 39: /* typetoken ::= typename */
|
sl@0
|
2092 |
case 42: /* typename ::= ids */
|
sl@0
|
2093 |
case 119: /* as ::= AS nm */
|
sl@0
|
2094 |
case 120: /* as ::= ids */
|
sl@0
|
2095 |
case 131: /* dbnm ::= DOT nm */
|
sl@0
|
2096 |
case 140: /* indexed_opt ::= INDEXED BY nm */
|
sl@0
|
2097 |
case 245: /* collate ::= COLLATE ids */
|
sl@0
|
2098 |
case 255: /* nmnum ::= plus_num */
|
sl@0
|
2099 |
case 256: /* nmnum ::= nm */
|
sl@0
|
2100 |
case 257: /* plus_num ::= plus_opt number */
|
sl@0
|
2101 |
case 258: /* minus_num ::= MINUS number */
|
sl@0
|
2102 |
case 259: /* number ::= INTEGER|FLOAT */
|
sl@0
|
2103 |
#line 162 "parse.y"
|
sl@0
|
2104 |
{yygotominor.yy0 = yymsp[0].minor.yy0;}
|
sl@0
|
2105 |
#line 2110 "parse.c"
|
sl@0
|
2106 |
break;
|
sl@0
|
2107 |
case 38: /* type ::= typetoken */
|
sl@0
|
2108 |
#line 223 "parse.y"
|
sl@0
|
2109 |
{sqlite3AddColumnType(pParse,&yymsp[0].minor.yy0);}
|
sl@0
|
2110 |
#line 2115 "parse.c"
|
sl@0
|
2111 |
break;
|
sl@0
|
2112 |
case 40: /* typetoken ::= typename LP signed RP */
|
sl@0
|
2113 |
#line 225 "parse.y"
|
sl@0
|
2114 |
{
|
sl@0
|
2115 |
yygotominor.yy0.z = yymsp[-3].minor.yy0.z;
|
sl@0
|
2116 |
yygotominor.yy0.n = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy0.z;
|
sl@0
|
2117 |
}
|
sl@0
|
2118 |
#line 2123 "parse.c"
|
sl@0
|
2119 |
break;
|
sl@0
|
2120 |
case 41: /* typetoken ::= typename LP signed COMMA signed RP */
|
sl@0
|
2121 |
#line 229 "parse.y"
|
sl@0
|
2122 |
{
|
sl@0
|
2123 |
yygotominor.yy0.z = yymsp[-5].minor.yy0.z;
|
sl@0
|
2124 |
yygotominor.yy0.n = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy0.z;
|
sl@0
|
2125 |
}
|
sl@0
|
2126 |
#line 2131 "parse.c"
|
sl@0
|
2127 |
break;
|
sl@0
|
2128 |
case 43: /* typename ::= typename ids */
|
sl@0
|
2129 |
#line 235 "parse.y"
|
sl@0
|
2130 |
{yygotominor.yy0.z=yymsp[-1].minor.yy0.z; yygotominor.yy0.n=yymsp[0].minor.yy0.n+(yymsp[0].minor.yy0.z-yymsp[-1].minor.yy0.z);}
|
sl@0
|
2131 |
#line 2136 "parse.c"
|
sl@0
|
2132 |
break;
|
sl@0
|
2133 |
case 50: /* ccons ::= DEFAULT term */
|
sl@0
|
2134 |
case 52: /* ccons ::= DEFAULT PLUS term */
|
sl@0
|
2135 |
#line 246 "parse.y"
|
sl@0
|
2136 |
{sqlite3AddDefaultValue(pParse,yymsp[0].minor.yy418);}
|
sl@0
|
2137 |
#line 2142 "parse.c"
|
sl@0
|
2138 |
break;
|
sl@0
|
2139 |
case 51: /* ccons ::= DEFAULT LP expr RP */
|
sl@0
|
2140 |
#line 247 "parse.y"
|
sl@0
|
2141 |
{sqlite3AddDefaultValue(pParse,yymsp[-1].minor.yy418);}
|
sl@0
|
2142 |
#line 2147 "parse.c"
|
sl@0
|
2143 |
break;
|
sl@0
|
2144 |
case 53: /* ccons ::= DEFAULT MINUS term */
|
sl@0
|
2145 |
#line 249 "parse.y"
|
sl@0
|
2146 |
{
|
sl@0
|
2147 |
Expr *p = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy418, 0, 0);
|
sl@0
|
2148 |
sqlite3AddDefaultValue(pParse,p);
|
sl@0
|
2149 |
}
|
sl@0
|
2150 |
#line 2155 "parse.c"
|
sl@0
|
2151 |
break;
|
sl@0
|
2152 |
case 54: /* ccons ::= DEFAULT id */
|
sl@0
|
2153 |
#line 253 "parse.y"
|
sl@0
|
2154 |
{
|
sl@0
|
2155 |
Expr *p = sqlite3PExpr(pParse, TK_STRING, 0, 0, &yymsp[0].minor.yy0);
|
sl@0
|
2156 |
sqlite3AddDefaultValue(pParse,p);
|
sl@0
|
2157 |
}
|
sl@0
|
2158 |
#line 2163 "parse.c"
|
sl@0
|
2159 |
break;
|
sl@0
|
2160 |
case 56: /* ccons ::= NOT NULL onconf */
|
sl@0
|
2161 |
#line 262 "parse.y"
|
sl@0
|
2162 |
{sqlite3AddNotNull(pParse, yymsp[0].minor.yy328);}
|
sl@0
|
2163 |
#line 2168 "parse.c"
|
sl@0
|
2164 |
break;
|
sl@0
|
2165 |
case 57: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */
|
sl@0
|
2166 |
#line 264 "parse.y"
|
sl@0
|
2167 |
{sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy328,yymsp[0].minor.yy328,yymsp[-2].minor.yy328);}
|
sl@0
|
2168 |
#line 2173 "parse.c"
|
sl@0
|
2169 |
break;
|
sl@0
|
2170 |
case 58: /* ccons ::= UNIQUE onconf */
|
sl@0
|
2171 |
#line 265 "parse.y"
|
sl@0
|
2172 |
{sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy328,0,0,0,0);}
|
sl@0
|
2173 |
#line 2178 "parse.c"
|
sl@0
|
2174 |
break;
|
sl@0
|
2175 |
case 59: /* ccons ::= CHECK LP expr RP */
|
sl@0
|
2176 |
#line 266 "parse.y"
|
sl@0
|
2177 |
{sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy418);}
|
sl@0
|
2178 |
#line 2183 "parse.c"
|
sl@0
|
2179 |
break;
|
sl@0
|
2180 |
case 60: /* ccons ::= REFERENCES nm idxlist_opt refargs */
|
sl@0
|
2181 |
#line 268 "parse.y"
|
sl@0
|
2182 |
{sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy322,yymsp[0].minor.yy328);}
|
sl@0
|
2183 |
#line 2188 "parse.c"
|
sl@0
|
2184 |
break;
|
sl@0
|
2185 |
case 61: /* ccons ::= defer_subclause */
|
sl@0
|
2186 |
#line 269 "parse.y"
|
sl@0
|
2187 |
{sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy328);}
|
sl@0
|
2188 |
#line 2193 "parse.c"
|
sl@0
|
2189 |
break;
|
sl@0
|
2190 |
case 62: /* ccons ::= COLLATE ids */
|
sl@0
|
2191 |
#line 270 "parse.y"
|
sl@0
|
2192 |
{sqlite3AddCollateType(pParse, &yymsp[0].minor.yy0);}
|
sl@0
|
2193 |
#line 2198 "parse.c"
|
sl@0
|
2194 |
break;
|
sl@0
|
2195 |
case 65: /* refargs ::= */
|
sl@0
|
2196 |
#line 283 "parse.y"
|
sl@0
|
2197 |
{ yygotominor.yy328 = OE_Restrict * 0x010101; }
|
sl@0
|
2198 |
#line 2203 "parse.c"
|
sl@0
|
2199 |
break;
|
sl@0
|
2200 |
case 66: /* refargs ::= refargs refarg */
|
sl@0
|
2201 |
#line 284 "parse.y"
|
sl@0
|
2202 |
{ yygotominor.yy328 = (yymsp[-1].minor.yy328 & ~yymsp[0].minor.yy319.mask) | yymsp[0].minor.yy319.value; }
|
sl@0
|
2203 |
#line 2208 "parse.c"
|
sl@0
|
2204 |
break;
|
sl@0
|
2205 |
case 67: /* refarg ::= MATCH nm */
|
sl@0
|
2206 |
#line 286 "parse.y"
|
sl@0
|
2207 |
{ yygotominor.yy319.value = 0; yygotominor.yy319.mask = 0x000000; }
|
sl@0
|
2208 |
#line 2213 "parse.c"
|
sl@0
|
2209 |
break;
|
sl@0
|
2210 |
case 68: /* refarg ::= ON DELETE refact */
|
sl@0
|
2211 |
#line 287 "parse.y"
|
sl@0
|
2212 |
{ yygotominor.yy319.value = yymsp[0].minor.yy328; yygotominor.yy319.mask = 0x0000ff; }
|
sl@0
|
2213 |
#line 2218 "parse.c"
|
sl@0
|
2214 |
break;
|
sl@0
|
2215 |
case 69: /* refarg ::= ON UPDATE refact */
|
sl@0
|
2216 |
#line 288 "parse.y"
|
sl@0
|
2217 |
{ yygotominor.yy319.value = yymsp[0].minor.yy328<<8; yygotominor.yy319.mask = 0x00ff00; }
|
sl@0
|
2218 |
#line 2223 "parse.c"
|
sl@0
|
2219 |
break;
|
sl@0
|
2220 |
case 70: /* refarg ::= ON INSERT refact */
|
sl@0
|
2221 |
#line 289 "parse.y"
|
sl@0
|
2222 |
{ yygotominor.yy319.value = yymsp[0].minor.yy328<<16; yygotominor.yy319.mask = 0xff0000; }
|
sl@0
|
2223 |
#line 2228 "parse.c"
|
sl@0
|
2224 |
break;
|
sl@0
|
2225 |
case 71: /* refact ::= SET NULL */
|
sl@0
|
2226 |
#line 291 "parse.y"
|
sl@0
|
2227 |
{ yygotominor.yy328 = OE_SetNull; }
|
sl@0
|
2228 |
#line 2233 "parse.c"
|
sl@0
|
2229 |
break;
|
sl@0
|
2230 |
case 72: /* refact ::= SET DEFAULT */
|
sl@0
|
2231 |
#line 292 "parse.y"
|
sl@0
|
2232 |
{ yygotominor.yy328 = OE_SetDflt; }
|
sl@0
|
2233 |
#line 2238 "parse.c"
|
sl@0
|
2234 |
break;
|
sl@0
|
2235 |
case 73: /* refact ::= CASCADE */
|
sl@0
|
2236 |
#line 293 "parse.y"
|
sl@0
|
2237 |
{ yygotominor.yy328 = OE_Cascade; }
|
sl@0
|
2238 |
#line 2243 "parse.c"
|
sl@0
|
2239 |
break;
|
sl@0
|
2240 |
case 74: /* refact ::= RESTRICT */
|
sl@0
|
2241 |
#line 294 "parse.y"
|
sl@0
|
2242 |
{ yygotominor.yy328 = OE_Restrict; }
|
sl@0
|
2243 |
#line 2248 "parse.c"
|
sl@0
|
2244 |
break;
|
sl@0
|
2245 |
case 75: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */
|
sl@0
|
2246 |
case 76: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
|
sl@0
|
2247 |
case 91: /* defer_subclause_opt ::= defer_subclause */
|
sl@0
|
2248 |
case 93: /* onconf ::= ON CONFLICT resolvetype */
|
sl@0
|
2249 |
case 95: /* orconf ::= OR resolvetype */
|
sl@0
|
2250 |
case 96: /* resolvetype ::= raisetype */
|
sl@0
|
2251 |
case 169: /* insert_cmd ::= INSERT orconf */
|
sl@0
|
2252 |
#line 296 "parse.y"
|
sl@0
|
2253 |
{yygotominor.yy328 = yymsp[0].minor.yy328;}
|
sl@0
|
2254 |
#line 2259 "parse.c"
|
sl@0
|
2255 |
break;
|
sl@0
|
2256 |
case 80: /* conslist_opt ::= */
|
sl@0
|
2257 |
#line 306 "parse.y"
|
sl@0
|
2258 |
{yygotominor.yy0.n = 0; yygotominor.yy0.z = 0;}
|
sl@0
|
2259 |
#line 2264 "parse.c"
|
sl@0
|
2260 |
break;
|
sl@0
|
2261 |
case 81: /* conslist_opt ::= COMMA conslist */
|
sl@0
|
2262 |
#line 307 "parse.y"
|
sl@0
|
2263 |
{yygotominor.yy0 = yymsp[-1].minor.yy0;}
|
sl@0
|
2264 |
#line 2269 "parse.c"
|
sl@0
|
2265 |
break;
|
sl@0
|
2266 |
case 86: /* tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf */
|
sl@0
|
2267 |
#line 313 "parse.y"
|
sl@0
|
2268 |
{sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy322,yymsp[0].minor.yy328,yymsp[-2].minor.yy328,0);}
|
sl@0
|
2269 |
#line 2274 "parse.c"
|
sl@0
|
2270 |
break;
|
sl@0
|
2271 |
case 87: /* tcons ::= UNIQUE LP idxlist RP onconf */
|
sl@0
|
2272 |
#line 315 "parse.y"
|
sl@0
|
2273 |
{sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy322,yymsp[0].minor.yy328,0,0,0,0);}
|
sl@0
|
2274 |
#line 2279 "parse.c"
|
sl@0
|
2275 |
break;
|
sl@0
|
2276 |
case 88: /* tcons ::= CHECK LP expr RP onconf */
|
sl@0
|
2277 |
#line 316 "parse.y"
|
sl@0
|
2278 |
{sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy418);}
|
sl@0
|
2279 |
#line 2284 "parse.c"
|
sl@0
|
2280 |
break;
|
sl@0
|
2281 |
case 89: /* tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt */
|
sl@0
|
2282 |
#line 318 "parse.y"
|
sl@0
|
2283 |
{
|
sl@0
|
2284 |
sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy322, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy322, yymsp[-1].minor.yy328);
|
sl@0
|
2285 |
sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy328);
|
sl@0
|
2286 |
}
|
sl@0
|
2287 |
#line 2292 "parse.c"
|
sl@0
|
2288 |
break;
|
sl@0
|
2289 |
case 92: /* onconf ::= */
|
sl@0
|
2290 |
case 94: /* orconf ::= */
|
sl@0
|
2291 |
#line 332 "parse.y"
|
sl@0
|
2292 |
{yygotominor.yy328 = OE_Default;}
|
sl@0
|
2293 |
#line 2298 "parse.c"
|
sl@0
|
2294 |
break;
|
sl@0
|
2295 |
case 97: /* resolvetype ::= IGNORE */
|
sl@0
|
2296 |
#line 337 "parse.y"
|
sl@0
|
2297 |
{yygotominor.yy328 = OE_Ignore;}
|
sl@0
|
2298 |
#line 2303 "parse.c"
|
sl@0
|
2299 |
break;
|
sl@0
|
2300 |
case 98: /* resolvetype ::= REPLACE */
|
sl@0
|
2301 |
case 170: /* insert_cmd ::= REPLACE */
|
sl@0
|
2302 |
#line 338 "parse.y"
|
sl@0
|
2303 |
{yygotominor.yy328 = OE_Replace;}
|
sl@0
|
2304 |
#line 2309 "parse.c"
|
sl@0
|
2305 |
break;
|
sl@0
|
2306 |
case 99: /* cmd ::= DROP TABLE ifexists fullname */
|
sl@0
|
2307 |
#line 342 "parse.y"
|
sl@0
|
2308 |
{
|
sl@0
|
2309 |
sqlite3DropTable(pParse, yymsp[0].minor.yy439, 0, yymsp[-1].minor.yy328);
|
sl@0
|
2310 |
}
|
sl@0
|
2311 |
#line 2316 "parse.c"
|
sl@0
|
2312 |
break;
|
sl@0
|
2313 |
case 102: /* cmd ::= CREATE temp VIEW ifnotexists nm dbnm AS select */
|
sl@0
|
2314 |
#line 352 "parse.y"
|
sl@0
|
2315 |
{
|
sl@0
|
2316 |
sqlite3CreateView(pParse, &yymsp[-7].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, yymsp[0].minor.yy91, yymsp[-6].minor.yy328, yymsp[-4].minor.yy328);
|
sl@0
|
2317 |
}
|
sl@0
|
2318 |
#line 2323 "parse.c"
|
sl@0
|
2319 |
break;
|
sl@0
|
2320 |
case 103: /* cmd ::= DROP VIEW ifexists fullname */
|
sl@0
|
2321 |
#line 355 "parse.y"
|
sl@0
|
2322 |
{
|
sl@0
|
2323 |
sqlite3DropTable(pParse, yymsp[0].minor.yy439, 1, yymsp[-1].minor.yy328);
|
sl@0
|
2324 |
}
|
sl@0
|
2325 |
#line 2330 "parse.c"
|
sl@0
|
2326 |
break;
|
sl@0
|
2327 |
case 104: /* cmd ::= select */
|
sl@0
|
2328 |
#line 362 "parse.y"
|
sl@0
|
2329 |
{
|
sl@0
|
2330 |
SelectDest dest = {SRT_Output, 0, 0, 0, 0};
|
sl@0
|
2331 |
sqlite3Select(pParse, yymsp[0].minor.yy91, &dest);
|
sl@0
|
2332 |
sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy91);
|
sl@0
|
2333 |
}
|
sl@0
|
2334 |
#line 2339 "parse.c"
|
sl@0
|
2335 |
break;
|
sl@0
|
2336 |
case 105: /* select ::= oneselect */
|
sl@0
|
2337 |
case 128: /* seltablist_paren ::= select */
|
sl@0
|
2338 |
#line 373 "parse.y"
|
sl@0
|
2339 |
{yygotominor.yy91 = yymsp[0].minor.yy91;}
|
sl@0
|
2340 |
#line 2345 "parse.c"
|
sl@0
|
2341 |
break;
|
sl@0
|
2342 |
case 106: /* select ::= select multiselect_op oneselect */
|
sl@0
|
2343 |
#line 375 "parse.y"
|
sl@0
|
2344 |
{
|
sl@0
|
2345 |
if( yymsp[0].minor.yy91 ){
|
sl@0
|
2346 |
yymsp[0].minor.yy91->op = yymsp[-1].minor.yy328;
|
sl@0
|
2347 |
yymsp[0].minor.yy91->pPrior = yymsp[-2].minor.yy91;
|
sl@0
|
2348 |
}else{
|
sl@0
|
2349 |
sqlite3SelectDelete(pParse->db, yymsp[-2].minor.yy91);
|
sl@0
|
2350 |
}
|
sl@0
|
2351 |
yygotominor.yy91 = yymsp[0].minor.yy91;
|
sl@0
|
2352 |
}
|
sl@0
|
2353 |
#line 2358 "parse.c"
|
sl@0
|
2354 |
break;
|
sl@0
|
2355 |
case 108: /* multiselect_op ::= UNION ALL */
|
sl@0
|
2356 |
#line 386 "parse.y"
|
sl@0
|
2357 |
{yygotominor.yy328 = TK_ALL;}
|
sl@0
|
2358 |
#line 2363 "parse.c"
|
sl@0
|
2359 |
break;
|
sl@0
|
2360 |
case 110: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
|
sl@0
|
2361 |
#line 390 "parse.y"
|
sl@0
|
2362 |
{
|
sl@0
|
2363 |
yygotominor.yy91 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy322,yymsp[-5].minor.yy439,yymsp[-4].minor.yy418,yymsp[-3].minor.yy322,yymsp[-2].minor.yy418,yymsp[-1].minor.yy322,yymsp[-7].minor.yy328,yymsp[0].minor.yy388.pLimit,yymsp[0].minor.yy388.pOffset);
|
sl@0
|
2364 |
}
|
sl@0
|
2365 |
#line 2370 "parse.c"
|
sl@0
|
2366 |
break;
|
sl@0
|
2367 |
case 114: /* sclp ::= selcollist COMMA */
|
sl@0
|
2368 |
case 241: /* idxlist_opt ::= LP idxlist RP */
|
sl@0
|
2369 |
#line 411 "parse.y"
|
sl@0
|
2370 |
{yygotominor.yy322 = yymsp[-1].minor.yy322;}
|
sl@0
|
2371 |
#line 2376 "parse.c"
|
sl@0
|
2372 |
break;
|
sl@0
|
2373 |
case 115: /* sclp ::= */
|
sl@0
|
2374 |
case 144: /* orderby_opt ::= */
|
sl@0
|
2375 |
case 152: /* groupby_opt ::= */
|
sl@0
|
2376 |
case 234: /* exprlist ::= */
|
sl@0
|
2377 |
case 240: /* idxlist_opt ::= */
|
sl@0
|
2378 |
#line 412 "parse.y"
|
sl@0
|
2379 |
{yygotominor.yy322 = 0;}
|
sl@0
|
2380 |
#line 2385 "parse.c"
|
sl@0
|
2381 |
break;
|
sl@0
|
2382 |
case 116: /* selcollist ::= sclp expr as */
|
sl@0
|
2383 |
#line 413 "parse.y"
|
sl@0
|
2384 |
{
|
sl@0
|
2385 |
yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy322,yymsp[-1].minor.yy418,yymsp[0].minor.yy0.n?&yymsp[0].minor.yy0:0);
|
sl@0
|
2386 |
}
|
sl@0
|
2387 |
#line 2392 "parse.c"
|
sl@0
|
2388 |
break;
|
sl@0
|
2389 |
case 117: /* selcollist ::= sclp STAR */
|
sl@0
|
2390 |
#line 416 "parse.y"
|
sl@0
|
2391 |
{
|
sl@0
|
2392 |
Expr *p = sqlite3PExpr(pParse, TK_ALL, 0, 0, 0);
|
sl@0
|
2393 |
yygotominor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-1].minor.yy322, p, 0);
|
sl@0
|
2394 |
}
|
sl@0
|
2395 |
#line 2400 "parse.c"
|
sl@0
|
2396 |
break;
|
sl@0
|
2397 |
case 118: /* selcollist ::= sclp nm DOT STAR */
|
sl@0
|
2398 |
#line 420 "parse.y"
|
sl@0
|
2399 |
{
|
sl@0
|
2400 |
Expr *pRight = sqlite3PExpr(pParse, TK_ALL, 0, 0, &yymsp[0].minor.yy0);
|
sl@0
|
2401 |
Expr *pLeft = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0);
|
sl@0
|
2402 |
Expr *pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight, 0);
|
sl@0
|
2403 |
yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy322, pDot, 0);
|
sl@0
|
2404 |
}
|
sl@0
|
2405 |
#line 2410 "parse.c"
|
sl@0
|
2406 |
break;
|
sl@0
|
2407 |
case 121: /* as ::= */
|
sl@0
|
2408 |
#line 433 "parse.y"
|
sl@0
|
2409 |
{yygotominor.yy0.n = 0;}
|
sl@0
|
2410 |
#line 2415 "parse.c"
|
sl@0
|
2411 |
break;
|
sl@0
|
2412 |
case 122: /* from ::= */
|
sl@0
|
2413 |
#line 445 "parse.y"
|
sl@0
|
2414 |
{yygotominor.yy439 = sqlite3DbMallocZero(pParse->db, sizeof(*yygotominor.yy439));}
|
sl@0
|
2415 |
#line 2420 "parse.c"
|
sl@0
|
2416 |
break;
|
sl@0
|
2417 |
case 123: /* from ::= FROM seltablist */
|
sl@0
|
2418 |
#line 446 "parse.y"
|
sl@0
|
2419 |
{
|
sl@0
|
2420 |
yygotominor.yy439 = yymsp[0].minor.yy439;
|
sl@0
|
2421 |
sqlite3SrcListShiftJoinType(yygotominor.yy439);
|
sl@0
|
2422 |
}
|
sl@0
|
2423 |
#line 2428 "parse.c"
|
sl@0
|
2424 |
break;
|
sl@0
|
2425 |
case 124: /* stl_prefix ::= seltablist joinop */
|
sl@0
|
2426 |
#line 454 "parse.y"
|
sl@0
|
2427 |
{
|
sl@0
|
2428 |
yygotominor.yy439 = yymsp[-1].minor.yy439;
|
sl@0
|
2429 |
if( yygotominor.yy439 && yygotominor.yy439->nSrc>0 ) yygotominor.yy439->a[yygotominor.yy439->nSrc-1].jointype = yymsp[0].minor.yy328;
|
sl@0
|
2430 |
}
|
sl@0
|
2431 |
#line 2436 "parse.c"
|
sl@0
|
2432 |
break;
|
sl@0
|
2433 |
case 125: /* stl_prefix ::= */
|
sl@0
|
2434 |
#line 458 "parse.y"
|
sl@0
|
2435 |
{yygotominor.yy439 = 0;}
|
sl@0
|
2436 |
#line 2441 "parse.c"
|
sl@0
|
2437 |
break;
|
sl@0
|
2438 |
case 126: /* seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */
|
sl@0
|
2439 |
#line 459 "parse.y"
|
sl@0
|
2440 |
{
|
sl@0
|
2441 |
yygotominor.yy439 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy439,&yymsp[-5].minor.yy0,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,0,yymsp[-1].minor.yy418,yymsp[0].minor.yy232);
|
sl@0
|
2442 |
sqlite3SrcListIndexedBy(pParse, yygotominor.yy439, &yymsp[-2].minor.yy0);
|
sl@0
|
2443 |
}
|
sl@0
|
2444 |
#line 2449 "parse.c"
|
sl@0
|
2445 |
break;
|
sl@0
|
2446 |
case 127: /* seltablist ::= stl_prefix LP seltablist_paren RP as on_opt using_opt */
|
sl@0
|
2447 |
#line 465 "parse.y"
|
sl@0
|
2448 |
{
|
sl@0
|
2449 |
yygotominor.yy439 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy439,0,0,&yymsp[-2].minor.yy0,yymsp[-4].minor.yy91,yymsp[-1].minor.yy418,yymsp[0].minor.yy232);
|
sl@0
|
2450 |
}
|
sl@0
|
2451 |
#line 2456 "parse.c"
|
sl@0
|
2452 |
break;
|
sl@0
|
2453 |
case 129: /* seltablist_paren ::= seltablist */
|
sl@0
|
2454 |
#line 476 "parse.y"
|
sl@0
|
2455 |
{
|
sl@0
|
2456 |
sqlite3SrcListShiftJoinType(yymsp[0].minor.yy439);
|
sl@0
|
2457 |
yygotominor.yy91 = sqlite3SelectNew(pParse,0,yymsp[0].minor.yy439,0,0,0,0,0,0,0);
|
sl@0
|
2458 |
}
|
sl@0
|
2459 |
#line 2464 "parse.c"
|
sl@0
|
2460 |
break;
|
sl@0
|
2461 |
case 130: /* dbnm ::= */
|
sl@0
|
2462 |
case 139: /* indexed_opt ::= */
|
sl@0
|
2463 |
#line 483 "parse.y"
|
sl@0
|
2464 |
{yygotominor.yy0.z=0; yygotominor.yy0.n=0;}
|
sl@0
|
2465 |
#line 2470 "parse.c"
|
sl@0
|
2466 |
break;
|
sl@0
|
2467 |
case 132: /* fullname ::= nm dbnm */
|
sl@0
|
2468 |
#line 488 "parse.y"
|
sl@0
|
2469 |
{yygotominor.yy439 = sqlite3SrcListAppend(pParse->db,0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);}
|
sl@0
|
2470 |
#line 2475 "parse.c"
|
sl@0
|
2471 |
break;
|
sl@0
|
2472 |
case 133: /* joinop ::= COMMA|JOIN */
|
sl@0
|
2473 |
#line 492 "parse.y"
|
sl@0
|
2474 |
{ yygotominor.yy328 = JT_INNER; }
|
sl@0
|
2475 |
#line 2480 "parse.c"
|
sl@0
|
2476 |
break;
|
sl@0
|
2477 |
case 134: /* joinop ::= JOIN_KW JOIN */
|
sl@0
|
2478 |
#line 493 "parse.y"
|
sl@0
|
2479 |
{ yygotominor.yy328 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0); }
|
sl@0
|
2480 |
#line 2485 "parse.c"
|
sl@0
|
2481 |
break;
|
sl@0
|
2482 |
case 135: /* joinop ::= JOIN_KW nm JOIN */
|
sl@0
|
2483 |
#line 494 "parse.y"
|
sl@0
|
2484 |
{ yygotominor.yy328 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); }
|
sl@0
|
2485 |
#line 2490 "parse.c"
|
sl@0
|
2486 |
break;
|
sl@0
|
2487 |
case 136: /* joinop ::= JOIN_KW nm nm JOIN */
|
sl@0
|
2488 |
#line 496 "parse.y"
|
sl@0
|
2489 |
{ yygotominor.yy328 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0); }
|
sl@0
|
2490 |
#line 2495 "parse.c"
|
sl@0
|
2491 |
break;
|
sl@0
|
2492 |
case 137: /* on_opt ::= ON expr */
|
sl@0
|
2493 |
case 148: /* sortitem ::= expr */
|
sl@0
|
2494 |
case 155: /* having_opt ::= HAVING expr */
|
sl@0
|
2495 |
case 162: /* where_opt ::= WHERE expr */
|
sl@0
|
2496 |
case 177: /* expr ::= term */
|
sl@0
|
2497 |
case 205: /* escape ::= ESCAPE expr */
|
sl@0
|
2498 |
case 229: /* case_else ::= ELSE expr */
|
sl@0
|
2499 |
case 231: /* case_operand ::= expr */
|
sl@0
|
2500 |
#line 500 "parse.y"
|
sl@0
|
2501 |
{yygotominor.yy418 = yymsp[0].minor.yy418;}
|
sl@0
|
2502 |
#line 2507 "parse.c"
|
sl@0
|
2503 |
break;
|
sl@0
|
2504 |
case 138: /* on_opt ::= */
|
sl@0
|
2505 |
case 154: /* having_opt ::= */
|
sl@0
|
2506 |
case 161: /* where_opt ::= */
|
sl@0
|
2507 |
case 206: /* escape ::= */
|
sl@0
|
2508 |
case 230: /* case_else ::= */
|
sl@0
|
2509 |
case 232: /* case_operand ::= */
|
sl@0
|
2510 |
#line 501 "parse.y"
|
sl@0
|
2511 |
{yygotominor.yy418 = 0;}
|
sl@0
|
2512 |
#line 2517 "parse.c"
|
sl@0
|
2513 |
break;
|
sl@0
|
2514 |
case 141: /* indexed_opt ::= NOT INDEXED */
|
sl@0
|
2515 |
#line 516 "parse.y"
|
sl@0
|
2516 |
{yygotominor.yy0.z=0; yygotominor.yy0.n=1;}
|
sl@0
|
2517 |
#line 2522 "parse.c"
|
sl@0
|
2518 |
break;
|
sl@0
|
2519 |
case 142: /* using_opt ::= USING LP inscollist RP */
|
sl@0
|
2520 |
case 174: /* inscollist_opt ::= LP inscollist RP */
|
sl@0
|
2521 |
#line 520 "parse.y"
|
sl@0
|
2522 |
{yygotominor.yy232 = yymsp[-1].minor.yy232;}
|
sl@0
|
2523 |
#line 2528 "parse.c"
|
sl@0
|
2524 |
break;
|
sl@0
|
2525 |
case 143: /* using_opt ::= */
|
sl@0
|
2526 |
case 173: /* inscollist_opt ::= */
|
sl@0
|
2527 |
#line 521 "parse.y"
|
sl@0
|
2528 |
{yygotominor.yy232 = 0;}
|
sl@0
|
2529 |
#line 2534 "parse.c"
|
sl@0
|
2530 |
break;
|
sl@0
|
2531 |
case 145: /* orderby_opt ::= ORDER BY sortlist */
|
sl@0
|
2532 |
case 153: /* groupby_opt ::= GROUP BY nexprlist */
|
sl@0
|
2533 |
case 233: /* exprlist ::= nexprlist */
|
sl@0
|
2534 |
#line 532 "parse.y"
|
sl@0
|
2535 |
{yygotominor.yy322 = yymsp[0].minor.yy322;}
|
sl@0
|
2536 |
#line 2541 "parse.c"
|
sl@0
|
2537 |
break;
|
sl@0
|
2538 |
case 146: /* sortlist ::= sortlist COMMA sortitem sortorder */
|
sl@0
|
2539 |
#line 533 "parse.y"
|
sl@0
|
2540 |
{
|
sl@0
|
2541 |
yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy322,yymsp[-1].minor.yy418,0);
|
sl@0
|
2542 |
if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = yymsp[0].minor.yy328;
|
sl@0
|
2543 |
}
|
sl@0
|
2544 |
#line 2549 "parse.c"
|
sl@0
|
2545 |
break;
|
sl@0
|
2546 |
case 147: /* sortlist ::= sortitem sortorder */
|
sl@0
|
2547 |
#line 537 "parse.y"
|
sl@0
|
2548 |
{
|
sl@0
|
2549 |
yygotominor.yy322 = sqlite3ExprListAppend(pParse,0,yymsp[-1].minor.yy418,0);
|
sl@0
|
2550 |
if( yygotominor.yy322 && yygotominor.yy322->a ) yygotominor.yy322->a[0].sortOrder = yymsp[0].minor.yy328;
|
sl@0
|
2551 |
}
|
sl@0
|
2552 |
#line 2557 "parse.c"
|
sl@0
|
2553 |
break;
|
sl@0
|
2554 |
case 149: /* sortorder ::= ASC */
|
sl@0
|
2555 |
case 151: /* sortorder ::= */
|
sl@0
|
2556 |
#line 545 "parse.y"
|
sl@0
|
2557 |
{yygotominor.yy328 = SQLITE_SO_ASC;}
|
sl@0
|
2558 |
#line 2563 "parse.c"
|
sl@0
|
2559 |
break;
|
sl@0
|
2560 |
case 150: /* sortorder ::= DESC */
|
sl@0
|
2561 |
#line 546 "parse.y"
|
sl@0
|
2562 |
{yygotominor.yy328 = SQLITE_SO_DESC;}
|
sl@0
|
2563 |
#line 2568 "parse.c"
|
sl@0
|
2564 |
break;
|
sl@0
|
2565 |
case 156: /* limit_opt ::= */
|
sl@0
|
2566 |
#line 572 "parse.y"
|
sl@0
|
2567 |
{yygotominor.yy388.pLimit = 0; yygotominor.yy388.pOffset = 0;}
|
sl@0
|
2568 |
#line 2573 "parse.c"
|
sl@0
|
2569 |
break;
|
sl@0
|
2570 |
case 157: /* limit_opt ::= LIMIT expr */
|
sl@0
|
2571 |
#line 573 "parse.y"
|
sl@0
|
2572 |
{yygotominor.yy388.pLimit = yymsp[0].minor.yy418; yygotominor.yy388.pOffset = 0;}
|
sl@0
|
2573 |
#line 2578 "parse.c"
|
sl@0
|
2574 |
break;
|
sl@0
|
2575 |
case 158: /* limit_opt ::= LIMIT expr OFFSET expr */
|
sl@0
|
2576 |
#line 575 "parse.y"
|
sl@0
|
2577 |
{yygotominor.yy388.pLimit = yymsp[-2].minor.yy418; yygotominor.yy388.pOffset = yymsp[0].minor.yy418;}
|
sl@0
|
2578 |
#line 2583 "parse.c"
|
sl@0
|
2579 |
break;
|
sl@0
|
2580 |
case 159: /* limit_opt ::= LIMIT expr COMMA expr */
|
sl@0
|
2581 |
#line 577 "parse.y"
|
sl@0
|
2582 |
{yygotominor.yy388.pOffset = yymsp[-2].minor.yy418; yygotominor.yy388.pLimit = yymsp[0].minor.yy418;}
|
sl@0
|
2583 |
#line 2588 "parse.c"
|
sl@0
|
2584 |
break;
|
sl@0
|
2585 |
case 160: /* cmd ::= DELETE FROM fullname indexed_opt where_opt */
|
sl@0
|
2586 |
#line 590 "parse.y"
|
sl@0
|
2587 |
{
|
sl@0
|
2588 |
sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy439, &yymsp[-1].minor.yy0);
|
sl@0
|
2589 |
sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy439,yymsp[0].minor.yy418);
|
sl@0
|
2590 |
}
|
sl@0
|
2591 |
#line 2596 "parse.c"
|
sl@0
|
2592 |
break;
|
sl@0
|
2593 |
case 163: /* cmd ::= UPDATE orconf fullname indexed_opt SET setlist where_opt */
|
sl@0
|
2594 |
#line 613 "parse.y"
|
sl@0
|
2595 |
{
|
sl@0
|
2596 |
sqlite3SrcListIndexedBy(pParse, yymsp[-4].minor.yy439, &yymsp[-3].minor.yy0);
|
sl@0
|
2597 |
sqlite3ExprListCheckLength(pParse,yymsp[-1].minor.yy322,"set list");
|
sl@0
|
2598 |
sqlite3Update(pParse,yymsp[-4].minor.yy439,yymsp[-1].minor.yy322,yymsp[0].minor.yy418,yymsp[-5].minor.yy328);
|
sl@0
|
2599 |
}
|
sl@0
|
2600 |
#line 2605 "parse.c"
|
sl@0
|
2601 |
break;
|
sl@0
|
2602 |
case 164: /* setlist ::= setlist COMMA nm EQ expr */
|
sl@0
|
2603 |
#line 624 "parse.y"
|
sl@0
|
2604 |
{yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy322,yymsp[0].minor.yy418,&yymsp[-2].minor.yy0);}
|
sl@0
|
2605 |
#line 2610 "parse.c"
|
sl@0
|
2606 |
break;
|
sl@0
|
2607 |
case 165: /* setlist ::= nm EQ expr */
|
sl@0
|
2608 |
#line 626 "parse.y"
|
sl@0
|
2609 |
{yygotominor.yy322 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy418,&yymsp[-2].minor.yy0);}
|
sl@0
|
2610 |
#line 2615 "parse.c"
|
sl@0
|
2611 |
break;
|
sl@0
|
2612 |
case 166: /* cmd ::= insert_cmd INTO fullname inscollist_opt VALUES LP itemlist RP */
|
sl@0
|
2613 |
#line 632 "parse.y"
|
sl@0
|
2614 |
{sqlite3Insert(pParse, yymsp[-5].minor.yy439, yymsp[-1].minor.yy322, 0, yymsp[-4].minor.yy232, yymsp[-7].minor.yy328);}
|
sl@0
|
2615 |
#line 2620 "parse.c"
|
sl@0
|
2616 |
break;
|
sl@0
|
2617 |
case 167: /* cmd ::= insert_cmd INTO fullname inscollist_opt select */
|
sl@0
|
2618 |
#line 634 "parse.y"
|
sl@0
|
2619 |
{sqlite3Insert(pParse, yymsp[-2].minor.yy439, 0, yymsp[0].minor.yy91, yymsp[-1].minor.yy232, yymsp[-4].minor.yy328);}
|
sl@0
|
2620 |
#line 2625 "parse.c"
|
sl@0
|
2621 |
break;
|
sl@0
|
2622 |
case 168: /* cmd ::= insert_cmd INTO fullname inscollist_opt DEFAULT VALUES */
|
sl@0
|
2623 |
#line 636 "parse.y"
|
sl@0
|
2624 |
{sqlite3Insert(pParse, yymsp[-3].minor.yy439, 0, 0, yymsp[-2].minor.yy232, yymsp[-5].minor.yy328);}
|
sl@0
|
2625 |
#line 2630 "parse.c"
|
sl@0
|
2626 |
break;
|
sl@0
|
2627 |
case 171: /* itemlist ::= itemlist COMMA expr */
|
sl@0
|
2628 |
case 235: /* nexprlist ::= nexprlist COMMA expr */
|
sl@0
|
2629 |
#line 647 "parse.y"
|
sl@0
|
2630 |
{yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy322,yymsp[0].minor.yy418,0);}
|
sl@0
|
2631 |
#line 2636 "parse.c"
|
sl@0
|
2632 |
break;
|
sl@0
|
2633 |
case 172: /* itemlist ::= expr */
|
sl@0
|
2634 |
case 236: /* nexprlist ::= expr */
|
sl@0
|
2635 |
#line 649 "parse.y"
|
sl@0
|
2636 |
{yygotominor.yy322 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy418,0);}
|
sl@0
|
2637 |
#line 2642 "parse.c"
|
sl@0
|
2638 |
break;
|
sl@0
|
2639 |
case 175: /* inscollist ::= inscollist COMMA nm */
|
sl@0
|
2640 |
#line 659 "parse.y"
|
sl@0
|
2641 |
{yygotominor.yy232 = sqlite3IdListAppend(pParse->db,yymsp[-2].minor.yy232,&yymsp[0].minor.yy0);}
|
sl@0
|
2642 |
#line 2647 "parse.c"
|
sl@0
|
2643 |
break;
|
sl@0
|
2644 |
case 176: /* inscollist ::= nm */
|
sl@0
|
2645 |
#line 661 "parse.y"
|
sl@0
|
2646 |
{yygotominor.yy232 = sqlite3IdListAppend(pParse->db,0,&yymsp[0].minor.yy0);}
|
sl@0
|
2647 |
#line 2652 "parse.c"
|
sl@0
|
2648 |
break;
|
sl@0
|
2649 |
case 178: /* expr ::= LP expr RP */
|
sl@0
|
2650 |
#line 672 "parse.y"
|
sl@0
|
2651 |
{yygotominor.yy418 = yymsp[-1].minor.yy418; sqlite3ExprSpan(yygotominor.yy418,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); }
|
sl@0
|
2652 |
#line 2657 "parse.c"
|
sl@0
|
2653 |
break;
|
sl@0
|
2654 |
case 179: /* term ::= NULL */
|
sl@0
|
2655 |
case 184: /* term ::= INTEGER|FLOAT|BLOB */
|
sl@0
|
2656 |
case 185: /* term ::= STRING */
|
sl@0
|
2657 |
#line 673 "parse.y"
|
sl@0
|
2658 |
{yygotominor.yy418 = sqlite3PExpr(pParse, yymsp[0].major, 0, 0, &yymsp[0].minor.yy0);}
|
sl@0
|
2659 |
#line 2664 "parse.c"
|
sl@0
|
2660 |
break;
|
sl@0
|
2661 |
case 180: /* expr ::= ID */
|
sl@0
|
2662 |
case 181: /* expr ::= JOIN_KW */
|
sl@0
|
2663 |
#line 674 "parse.y"
|
sl@0
|
2664 |
{yygotominor.yy418 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[0].minor.yy0);}
|
sl@0
|
2665 |
#line 2670 "parse.c"
|
sl@0
|
2666 |
break;
|
sl@0
|
2667 |
case 182: /* expr ::= nm DOT nm */
|
sl@0
|
2668 |
#line 676 "parse.y"
|
sl@0
|
2669 |
{
|
sl@0
|
2670 |
Expr *temp1 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0);
|
sl@0
|
2671 |
Expr *temp2 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[0].minor.yy0);
|
sl@0
|
2672 |
yygotominor.yy418 = sqlite3PExpr(pParse, TK_DOT, temp1, temp2, 0);
|
sl@0
|
2673 |
}
|
sl@0
|
2674 |
#line 2679 "parse.c"
|
sl@0
|
2675 |
break;
|
sl@0
|
2676 |
case 183: /* expr ::= nm DOT nm DOT nm */
|
sl@0
|
2677 |
#line 681 "parse.y"
|
sl@0
|
2678 |
{
|
sl@0
|
2679 |
Expr *temp1 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-4].minor.yy0);
|
sl@0
|
2680 |
Expr *temp2 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0);
|
sl@0
|
2681 |
Expr *temp3 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[0].minor.yy0);
|
sl@0
|
2682 |
Expr *temp4 = sqlite3PExpr(pParse, TK_DOT, temp2, temp3, 0);
|
sl@0
|
2683 |
yygotominor.yy418 = sqlite3PExpr(pParse, TK_DOT, temp1, temp4, 0);
|
sl@0
|
2684 |
}
|
sl@0
|
2685 |
#line 2690 "parse.c"
|
sl@0
|
2686 |
break;
|
sl@0
|
2687 |
case 186: /* expr ::= REGISTER */
|
sl@0
|
2688 |
#line 690 "parse.y"
|
sl@0
|
2689 |
{yygotominor.yy418 = sqlite3RegisterExpr(pParse, &yymsp[0].minor.yy0);}
|
sl@0
|
2690 |
#line 2695 "parse.c"
|
sl@0
|
2691 |
break;
|
sl@0
|
2692 |
case 187: /* expr ::= VARIABLE */
|
sl@0
|
2693 |
#line 691 "parse.y"
|
sl@0
|
2694 |
{
|
sl@0
|
2695 |
Token *pToken = &yymsp[0].minor.yy0;
|
sl@0
|
2696 |
Expr *pExpr = yygotominor.yy418 = sqlite3PExpr(pParse, TK_VARIABLE, 0, 0, pToken);
|
sl@0
|
2697 |
sqlite3ExprAssignVarNumber(pParse, pExpr);
|
sl@0
|
2698 |
}
|
sl@0
|
2699 |
#line 2704 "parse.c"
|
sl@0
|
2700 |
break;
|
sl@0
|
2701 |
case 188: /* expr ::= expr COLLATE ids */
|
sl@0
|
2702 |
#line 696 "parse.y"
|
sl@0
|
2703 |
{
|
sl@0
|
2704 |
yygotominor.yy418 = sqlite3ExprSetColl(pParse, yymsp[-2].minor.yy418, &yymsp[0].minor.yy0);
|
sl@0
|
2705 |
}
|
sl@0
|
2706 |
#line 2711 "parse.c"
|
sl@0
|
2707 |
break;
|
sl@0
|
2708 |
case 189: /* expr ::= CAST LP expr AS typetoken RP */
|
sl@0
|
2709 |
#line 700 "parse.y"
|
sl@0
|
2710 |
{
|
sl@0
|
2711 |
yygotominor.yy418 = sqlite3PExpr(pParse, TK_CAST, yymsp[-3].minor.yy418, 0, &yymsp[-1].minor.yy0);
|
sl@0
|
2712 |
sqlite3ExprSpan(yygotominor.yy418,&yymsp[-5].minor.yy0,&yymsp[0].minor.yy0);
|
sl@0
|
2713 |
}
|
sl@0
|
2714 |
#line 2719 "parse.c"
|
sl@0
|
2715 |
break;
|
sl@0
|
2716 |
case 190: /* expr ::= ID LP distinct exprlist RP */
|
sl@0
|
2717 |
#line 705 "parse.y"
|
sl@0
|
2718 |
{
|
sl@0
|
2719 |
if( yymsp[-1].minor.yy322 && yymsp[-1].minor.yy322->nExpr>SQLITE_MAX_FUNCTION_ARG ){
|
sl@0
|
2720 |
sqlite3ErrorMsg(pParse, "too many arguments on function %T", &yymsp[-4].minor.yy0);
|
sl@0
|
2721 |
}
|
sl@0
|
2722 |
yygotominor.yy418 = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy322, &yymsp[-4].minor.yy0);
|
sl@0
|
2723 |
sqlite3ExprSpan(yygotominor.yy418,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0);
|
sl@0
|
2724 |
if( yymsp[-2].minor.yy328 && yygotominor.yy418 ){
|
sl@0
|
2725 |
yygotominor.yy418->flags |= EP_Distinct;
|
sl@0
|
2726 |
}
|
sl@0
|
2727 |
}
|
sl@0
|
2728 |
#line 2733 "parse.c"
|
sl@0
|
2729 |
break;
|
sl@0
|
2730 |
case 191: /* expr ::= ID LP STAR RP */
|
sl@0
|
2731 |
#line 715 "parse.y"
|
sl@0
|
2732 |
{
|
sl@0
|
2733 |
yygotominor.yy418 = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0);
|
sl@0
|
2734 |
sqlite3ExprSpan(yygotominor.yy418,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0);
|
sl@0
|
2735 |
}
|
sl@0
|
2736 |
#line 2741 "parse.c"
|
sl@0
|
2737 |
break;
|
sl@0
|
2738 |
case 192: /* term ::= CTIME_KW */
|
sl@0
|
2739 |
#line 719 "parse.y"
|
sl@0
|
2740 |
{
|
sl@0
|
2741 |
/* The CURRENT_TIME, CURRENT_DATE, and CURRENT_TIMESTAMP values are
|
sl@0
|
2742 |
** treated as functions that return constants */
|
sl@0
|
2743 |
yygotominor.yy418 = sqlite3ExprFunction(pParse, 0,&yymsp[0].minor.yy0);
|
sl@0
|
2744 |
if( yygotominor.yy418 ){
|
sl@0
|
2745 |
yygotominor.yy418->op = TK_CONST_FUNC;
|
sl@0
|
2746 |
yygotominor.yy418->span = yymsp[0].minor.yy0;
|
sl@0
|
2747 |
}
|
sl@0
|
2748 |
}
|
sl@0
|
2749 |
#line 2754 "parse.c"
|
sl@0
|
2750 |
break;
|
sl@0
|
2751 |
case 193: /* expr ::= expr AND expr */
|
sl@0
|
2752 |
case 194: /* expr ::= expr OR expr */
|
sl@0
|
2753 |
case 195: /* expr ::= expr LT|GT|GE|LE expr */
|
sl@0
|
2754 |
case 196: /* expr ::= expr EQ|NE expr */
|
sl@0
|
2755 |
case 197: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */
|
sl@0
|
2756 |
case 198: /* expr ::= expr PLUS|MINUS expr */
|
sl@0
|
2757 |
case 199: /* expr ::= expr STAR|SLASH|REM expr */
|
sl@0
|
2758 |
case 200: /* expr ::= expr CONCAT expr */
|
sl@0
|
2759 |
#line 728 "parse.y"
|
sl@0
|
2760 |
{yygotominor.yy418 = sqlite3PExpr(pParse,yymsp[-1].major,yymsp[-2].minor.yy418,yymsp[0].minor.yy418,0);}
|
sl@0
|
2761 |
#line 2766 "parse.c"
|
sl@0
|
2762 |
break;
|
sl@0
|
2763 |
case 201: /* likeop ::= LIKE_KW */
|
sl@0
|
2764 |
case 203: /* likeop ::= MATCH */
|
sl@0
|
2765 |
#line 740 "parse.y"
|
sl@0
|
2766 |
{yygotominor.yy30.eOperator = yymsp[0].minor.yy0; yygotominor.yy30.not = 0;}
|
sl@0
|
2767 |
#line 2772 "parse.c"
|
sl@0
|
2768 |
break;
|
sl@0
|
2769 |
case 202: /* likeop ::= NOT LIKE_KW */
|
sl@0
|
2770 |
case 204: /* likeop ::= NOT MATCH */
|
sl@0
|
2771 |
#line 741 "parse.y"
|
sl@0
|
2772 |
{yygotominor.yy30.eOperator = yymsp[0].minor.yy0; yygotominor.yy30.not = 1;}
|
sl@0
|
2773 |
#line 2778 "parse.c"
|
sl@0
|
2774 |
break;
|
sl@0
|
2775 |
case 207: /* expr ::= expr likeop expr escape */
|
sl@0
|
2776 |
#line 748 "parse.y"
|
sl@0
|
2777 |
{
|
sl@0
|
2778 |
ExprList *pList;
|
sl@0
|
2779 |
pList = sqlite3ExprListAppend(pParse,0, yymsp[-1].minor.yy418, 0);
|
sl@0
|
2780 |
pList = sqlite3ExprListAppend(pParse,pList, yymsp[-3].minor.yy418, 0);
|
sl@0
|
2781 |
if( yymsp[0].minor.yy418 ){
|
sl@0
|
2782 |
pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy418, 0);
|
sl@0
|
2783 |
}
|
sl@0
|
2784 |
yygotominor.yy418 = sqlite3ExprFunction(pParse, pList, &yymsp[-2].minor.yy30.eOperator);
|
sl@0
|
2785 |
if( yymsp[-2].minor.yy30.not ) yygotominor.yy418 = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy418, 0, 0);
|
sl@0
|
2786 |
sqlite3ExprSpan(yygotominor.yy418, &yymsp[-3].minor.yy418->span, &yymsp[-1].minor.yy418->span);
|
sl@0
|
2787 |
if( yygotominor.yy418 ) yygotominor.yy418->flags |= EP_InfixFunc;
|
sl@0
|
2788 |
}
|
sl@0
|
2789 |
#line 2794 "parse.c"
|
sl@0
|
2790 |
break;
|
sl@0
|
2791 |
case 208: /* expr ::= expr ISNULL|NOTNULL */
|
sl@0
|
2792 |
#line 761 "parse.y"
|
sl@0
|
2793 |
{
|
sl@0
|
2794 |
yygotominor.yy418 = sqlite3PExpr(pParse, yymsp[0].major, yymsp[-1].minor.yy418, 0, 0);
|
sl@0
|
2795 |
sqlite3ExprSpan(yygotominor.yy418,&yymsp[-1].minor.yy418->span,&yymsp[0].minor.yy0);
|
sl@0
|
2796 |
}
|
sl@0
|
2797 |
#line 2802 "parse.c"
|
sl@0
|
2798 |
break;
|
sl@0
|
2799 |
case 209: /* expr ::= expr IS NULL */
|
sl@0
|
2800 |
#line 765 "parse.y"
|
sl@0
|
2801 |
{
|
sl@0
|
2802 |
yygotominor.yy418 = sqlite3PExpr(pParse, TK_ISNULL, yymsp[-2].minor.yy418, 0, 0);
|
sl@0
|
2803 |
sqlite3ExprSpan(yygotominor.yy418,&yymsp[-2].minor.yy418->span,&yymsp[0].minor.yy0);
|
sl@0
|
2804 |
}
|
sl@0
|
2805 |
#line 2810 "parse.c"
|
sl@0
|
2806 |
break;
|
sl@0
|
2807 |
case 210: /* expr ::= expr NOT NULL */
|
sl@0
|
2808 |
#line 769 "parse.y"
|
sl@0
|
2809 |
{
|
sl@0
|
2810 |
yygotominor.yy418 = sqlite3PExpr(pParse, TK_NOTNULL, yymsp[-2].minor.yy418, 0, 0);
|
sl@0
|
2811 |
sqlite3ExprSpan(yygotominor.yy418,&yymsp[-2].minor.yy418->span,&yymsp[0].minor.yy0);
|
sl@0
|
2812 |
}
|
sl@0
|
2813 |
#line 2818 "parse.c"
|
sl@0
|
2814 |
break;
|
sl@0
|
2815 |
case 211: /* expr ::= expr IS NOT NULL */
|
sl@0
|
2816 |
#line 773 "parse.y"
|
sl@0
|
2817 |
{
|
sl@0
|
2818 |
yygotominor.yy418 = sqlite3PExpr(pParse, TK_NOTNULL, yymsp[-3].minor.yy418, 0, 0);
|
sl@0
|
2819 |
sqlite3ExprSpan(yygotominor.yy418,&yymsp[-3].minor.yy418->span,&yymsp[0].minor.yy0);
|
sl@0
|
2820 |
}
|
sl@0
|
2821 |
#line 2826 "parse.c"
|
sl@0
|
2822 |
break;
|
sl@0
|
2823 |
case 212: /* expr ::= NOT expr */
|
sl@0
|
2824 |
case 213: /* expr ::= BITNOT expr */
|
sl@0
|
2825 |
#line 777 "parse.y"
|
sl@0
|
2826 |
{
|
sl@0
|
2827 |
yygotominor.yy418 = sqlite3PExpr(pParse, yymsp[-1].major, yymsp[0].minor.yy418, 0, 0);
|
sl@0
|
2828 |
sqlite3ExprSpan(yygotominor.yy418,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy418->span);
|
sl@0
|
2829 |
}
|
sl@0
|
2830 |
#line 2835 "parse.c"
|
sl@0
|
2831 |
break;
|
sl@0
|
2832 |
case 214: /* expr ::= MINUS expr */
|
sl@0
|
2833 |
#line 785 "parse.y"
|
sl@0
|
2834 |
{
|
sl@0
|
2835 |
yygotominor.yy418 = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy418, 0, 0);
|
sl@0
|
2836 |
sqlite3ExprSpan(yygotominor.yy418,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy418->span);
|
sl@0
|
2837 |
}
|
sl@0
|
2838 |
#line 2843 "parse.c"
|
sl@0
|
2839 |
break;
|
sl@0
|
2840 |
case 215: /* expr ::= PLUS expr */
|
sl@0
|
2841 |
#line 789 "parse.y"
|
sl@0
|
2842 |
{
|
sl@0
|
2843 |
yygotominor.yy418 = sqlite3PExpr(pParse, TK_UPLUS, yymsp[0].minor.yy418, 0, 0);
|
sl@0
|
2844 |
sqlite3ExprSpan(yygotominor.yy418,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy418->span);
|
sl@0
|
2845 |
}
|
sl@0
|
2846 |
#line 2851 "parse.c"
|
sl@0
|
2847 |
break;
|
sl@0
|
2848 |
case 218: /* expr ::= expr between_op expr AND expr */
|
sl@0
|
2849 |
#line 796 "parse.y"
|
sl@0
|
2850 |
{
|
sl@0
|
2851 |
ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy418, 0);
|
sl@0
|
2852 |
pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy418, 0);
|
sl@0
|
2853 |
yygotominor.yy418 = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy418, 0, 0);
|
sl@0
|
2854 |
if( yygotominor.yy418 ){
|
sl@0
|
2855 |
yygotominor.yy418->pList = pList;
|
sl@0
|
2856 |
}else{
|
sl@0
|
2857 |
sqlite3ExprListDelete(pParse->db, pList);
|
sl@0
|
2858 |
}
|
sl@0
|
2859 |
if( yymsp[-3].minor.yy328 ) yygotominor.yy418 = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy418, 0, 0);
|
sl@0
|
2860 |
sqlite3ExprSpan(yygotominor.yy418,&yymsp[-4].minor.yy418->span,&yymsp[0].minor.yy418->span);
|
sl@0
|
2861 |
}
|
sl@0
|
2862 |
#line 2867 "parse.c"
|
sl@0
|
2863 |
break;
|
sl@0
|
2864 |
case 221: /* expr ::= expr in_op LP exprlist RP */
|
sl@0
|
2865 |
#line 812 "parse.y"
|
sl@0
|
2866 |
{
|
sl@0
|
2867 |
yygotominor.yy418 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy418, 0, 0);
|
sl@0
|
2868 |
if( yygotominor.yy418 ){
|
sl@0
|
2869 |
yygotominor.yy418->pList = yymsp[-1].minor.yy322;
|
sl@0
|
2870 |
sqlite3ExprSetHeight(pParse, yygotominor.yy418);
|
sl@0
|
2871 |
}else{
|
sl@0
|
2872 |
sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy322);
|
sl@0
|
2873 |
}
|
sl@0
|
2874 |
if( yymsp[-3].minor.yy328 ) yygotominor.yy418 = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy418, 0, 0);
|
sl@0
|
2875 |
sqlite3ExprSpan(yygotominor.yy418,&yymsp[-4].minor.yy418->span,&yymsp[0].minor.yy0);
|
sl@0
|
2876 |
}
|
sl@0
|
2877 |
#line 2882 "parse.c"
|
sl@0
|
2878 |
break;
|
sl@0
|
2879 |
case 222: /* expr ::= LP select RP */
|
sl@0
|
2880 |
#line 823 "parse.y"
|
sl@0
|
2881 |
{
|
sl@0
|
2882 |
yygotominor.yy418 = sqlite3PExpr(pParse, TK_SELECT, 0, 0, 0);
|
sl@0
|
2883 |
if( yygotominor.yy418 ){
|
sl@0
|
2884 |
yygotominor.yy418->pSelect = yymsp[-1].minor.yy91;
|
sl@0
|
2885 |
sqlite3ExprSetHeight(pParse, yygotominor.yy418);
|
sl@0
|
2886 |
}else{
|
sl@0
|
2887 |
sqlite3SelectDelete(pParse->db, yymsp[-1].minor.yy91);
|
sl@0
|
2888 |
}
|
sl@0
|
2889 |
sqlite3ExprSpan(yygotominor.yy418,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);
|
sl@0
|
2890 |
}
|
sl@0
|
2891 |
#line 2896 "parse.c"
|
sl@0
|
2892 |
break;
|
sl@0
|
2893 |
case 223: /* expr ::= expr in_op LP select RP */
|
sl@0
|
2894 |
#line 833 "parse.y"
|
sl@0
|
2895 |
{
|
sl@0
|
2896 |
yygotominor.yy418 = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy418, 0, 0);
|
sl@0
|
2897 |
if( yygotominor.yy418 ){
|
sl@0
|
2898 |
yygotominor.yy418->pSelect = yymsp[-1].minor.yy91;
|
sl@0
|
2899 |
sqlite3ExprSetHeight(pParse, yygotominor.yy418);
|
sl@0
|
2900 |
}else{
|
sl@0
|
2901 |
sqlite3SelectDelete(pParse->db, yymsp[-1].minor.yy91);
|
sl@0
|
2902 |
}
|
sl@0
|
2903 |
if( yymsp[-3].minor.yy328 ) yygotominor.yy418 = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy418, 0, 0);
|
sl@0
|
2904 |
sqlite3ExprSpan(yygotominor.yy418,&yymsp[-4].minor.yy418->span,&yymsp[0].minor.yy0);
|
sl@0
|
2905 |
}
|
sl@0
|
2906 |
#line 2911 "parse.c"
|
sl@0
|
2907 |
break;
|
sl@0
|
2908 |
case 224: /* expr ::= expr in_op nm dbnm */
|
sl@0
|
2909 |
#line 844 "parse.y"
|
sl@0
|
2910 |
{
|
sl@0
|
2911 |
SrcList *pSrc = sqlite3SrcListAppend(pParse->db, 0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);
|
sl@0
|
2912 |
yygotominor.yy418 = sqlite3PExpr(pParse, TK_IN, yymsp[-3].minor.yy418, 0, 0);
|
sl@0
|
2913 |
if( yygotominor.yy418 ){
|
sl@0
|
2914 |
yygotominor.yy418->pSelect = sqlite3SelectNew(pParse, 0,pSrc,0,0,0,0,0,0,0);
|
sl@0
|
2915 |
sqlite3ExprSetHeight(pParse, yygotominor.yy418);
|
sl@0
|
2916 |
}else{
|
sl@0
|
2917 |
sqlite3SrcListDelete(pParse->db, pSrc);
|
sl@0
|
2918 |
}
|
sl@0
|
2919 |
if( yymsp[-2].minor.yy328 ) yygotominor.yy418 = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy418, 0, 0);
|
sl@0
|
2920 |
sqlite3ExprSpan(yygotominor.yy418,&yymsp[-3].minor.yy418->span,yymsp[0].minor.yy0.z?&yymsp[0].minor.yy0:&yymsp[-1].minor.yy0);
|
sl@0
|
2921 |
}
|
sl@0
|
2922 |
#line 2927 "parse.c"
|
sl@0
|
2923 |
break;
|
sl@0
|
2924 |
case 225: /* expr ::= EXISTS LP select RP */
|
sl@0
|
2925 |
#line 856 "parse.y"
|
sl@0
|
2926 |
{
|
sl@0
|
2927 |
Expr *p = yygotominor.yy418 = sqlite3PExpr(pParse, TK_EXISTS, 0, 0, 0);
|
sl@0
|
2928 |
if( p ){
|
sl@0
|
2929 |
p->pSelect = yymsp[-1].minor.yy91;
|
sl@0
|
2930 |
sqlite3ExprSpan(p,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0);
|
sl@0
|
2931 |
sqlite3ExprSetHeight(pParse, yygotominor.yy418);
|
sl@0
|
2932 |
}else{
|
sl@0
|
2933 |
sqlite3SelectDelete(pParse->db, yymsp[-1].minor.yy91);
|
sl@0
|
2934 |
}
|
sl@0
|
2935 |
}
|
sl@0
|
2936 |
#line 2941 "parse.c"
|
sl@0
|
2937 |
break;
|
sl@0
|
2938 |
case 226: /* expr ::= CASE case_operand case_exprlist case_else END */
|
sl@0
|
2939 |
#line 869 "parse.y"
|
sl@0
|
2940 |
{
|
sl@0
|
2941 |
yygotominor.yy418 = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy418, yymsp[-1].minor.yy418, 0);
|
sl@0
|
2942 |
if( yygotominor.yy418 ){
|
sl@0
|
2943 |
yygotominor.yy418->pList = yymsp[-2].minor.yy322;
|
sl@0
|
2944 |
sqlite3ExprSetHeight(pParse, yygotominor.yy418);
|
sl@0
|
2945 |
}else{
|
sl@0
|
2946 |
sqlite3ExprListDelete(pParse->db, yymsp[-2].minor.yy322);
|
sl@0
|
2947 |
}
|
sl@0
|
2948 |
sqlite3ExprSpan(yygotominor.yy418, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0);
|
sl@0
|
2949 |
}
|
sl@0
|
2950 |
#line 2955 "parse.c"
|
sl@0
|
2951 |
break;
|
sl@0
|
2952 |
case 227: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */
|
sl@0
|
2953 |
#line 881 "parse.y"
|
sl@0
|
2954 |
{
|
sl@0
|
2955 |
yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy322, yymsp[-2].minor.yy418, 0);
|
sl@0
|
2956 |
yygotominor.yy322 = sqlite3ExprListAppend(pParse,yygotominor.yy322, yymsp[0].minor.yy418, 0);
|
sl@0
|
2957 |
}
|
sl@0
|
2958 |
#line 2963 "parse.c"
|
sl@0
|
2959 |
break;
|
sl@0
|
2960 |
case 228: /* case_exprlist ::= WHEN expr THEN expr */
|
sl@0
|
2961 |
#line 885 "parse.y"
|
sl@0
|
2962 |
{
|
sl@0
|
2963 |
yygotominor.yy322 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy418, 0);
|
sl@0
|
2964 |
yygotominor.yy322 = sqlite3ExprListAppend(pParse,yygotominor.yy322, yymsp[0].minor.yy418, 0);
|
sl@0
|
2965 |
}
|
sl@0
|
2966 |
#line 2971 "parse.c"
|
sl@0
|
2967 |
break;
|
sl@0
|
2968 |
case 237: /* cmd ::= CREATE uniqueflag INDEX ifnotexists nm dbnm ON nm LP idxlist RP */
|
sl@0
|
2969 |
#line 914 "parse.y"
|
sl@0
|
2970 |
{
|
sl@0
|
2971 |
sqlite3CreateIndex(pParse, &yymsp[-6].minor.yy0, &yymsp[-5].minor.yy0,
|
sl@0
|
2972 |
sqlite3SrcListAppend(pParse->db,0,&yymsp[-3].minor.yy0,0), yymsp[-1].minor.yy322, yymsp[-9].minor.yy328,
|
sl@0
|
2973 |
&yymsp[-10].minor.yy0, &yymsp[0].minor.yy0, SQLITE_SO_ASC, yymsp[-7].minor.yy328);
|
sl@0
|
2974 |
}
|
sl@0
|
2975 |
#line 2980 "parse.c"
|
sl@0
|
2976 |
break;
|
sl@0
|
2977 |
case 238: /* uniqueflag ::= UNIQUE */
|
sl@0
|
2978 |
case 285: /* raisetype ::= ABORT */
|
sl@0
|
2979 |
#line 921 "parse.y"
|
sl@0
|
2980 |
{yygotominor.yy328 = OE_Abort;}
|
sl@0
|
2981 |
#line 2986 "parse.c"
|
sl@0
|
2982 |
break;
|
sl@0
|
2983 |
case 239: /* uniqueflag ::= */
|
sl@0
|
2984 |
#line 922 "parse.y"
|
sl@0
|
2985 |
{yygotominor.yy328 = OE_None;}
|
sl@0
|
2986 |
#line 2991 "parse.c"
|
sl@0
|
2987 |
break;
|
sl@0
|
2988 |
case 242: /* idxlist ::= idxlist COMMA nm collate sortorder */
|
sl@0
|
2989 |
#line 931 "parse.y"
|
sl@0
|
2990 |
{
|
sl@0
|
2991 |
Expr *p = 0;
|
sl@0
|
2992 |
if( yymsp[-1].minor.yy0.n>0 ){
|
sl@0
|
2993 |
p = sqlite3PExpr(pParse, TK_COLUMN, 0, 0, 0);
|
sl@0
|
2994 |
sqlite3ExprSetColl(pParse, p, &yymsp[-1].minor.yy0);
|
sl@0
|
2995 |
}
|
sl@0
|
2996 |
yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy322, p, &yymsp[-2].minor.yy0);
|
sl@0
|
2997 |
sqlite3ExprListCheckLength(pParse, yygotominor.yy322, "index");
|
sl@0
|
2998 |
if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = yymsp[0].minor.yy328;
|
sl@0
|
2999 |
}
|
sl@0
|
3000 |
#line 3005 "parse.c"
|
sl@0
|
3001 |
break;
|
sl@0
|
3002 |
case 243: /* idxlist ::= nm collate sortorder */
|
sl@0
|
3003 |
#line 941 "parse.y"
|
sl@0
|
3004 |
{
|
sl@0
|
3005 |
Expr *p = 0;
|
sl@0
|
3006 |
if( yymsp[-1].minor.yy0.n>0 ){
|
sl@0
|
3007 |
p = sqlite3PExpr(pParse, TK_COLUMN, 0, 0, 0);
|
sl@0
|
3008 |
sqlite3ExprSetColl(pParse, p, &yymsp[-1].minor.yy0);
|
sl@0
|
3009 |
}
|
sl@0
|
3010 |
yygotominor.yy322 = sqlite3ExprListAppend(pParse,0, p, &yymsp[-2].minor.yy0);
|
sl@0
|
3011 |
sqlite3ExprListCheckLength(pParse, yygotominor.yy322, "index");
|
sl@0
|
3012 |
if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = yymsp[0].minor.yy328;
|
sl@0
|
3013 |
}
|
sl@0
|
3014 |
#line 3019 "parse.c"
|
sl@0
|
3015 |
break;
|
sl@0
|
3016 |
case 244: /* collate ::= */
|
sl@0
|
3017 |
#line 953 "parse.y"
|
sl@0
|
3018 |
{yygotominor.yy0.z = 0; yygotominor.yy0.n = 0;}
|
sl@0
|
3019 |
#line 3024 "parse.c"
|
sl@0
|
3020 |
break;
|
sl@0
|
3021 |
case 246: /* cmd ::= DROP INDEX ifexists fullname */
|
sl@0
|
3022 |
#line 959 "parse.y"
|
sl@0
|
3023 |
{sqlite3DropIndex(pParse, yymsp[0].minor.yy439, yymsp[-1].minor.yy328);}
|
sl@0
|
3024 |
#line 3029 "parse.c"
|
sl@0
|
3025 |
break;
|
sl@0
|
3026 |
case 247: /* cmd ::= VACUUM */
|
sl@0
|
3027 |
case 248: /* cmd ::= VACUUM nm */
|
sl@0
|
3028 |
#line 965 "parse.y"
|
sl@0
|
3029 |
{sqlite3Vacuum(pParse);}
|
sl@0
|
3030 |
#line 3035 "parse.c"
|
sl@0
|
3031 |
break;
|
sl@0
|
3032 |
case 249: /* cmd ::= PRAGMA nm dbnm EQ nmnum */
|
sl@0
|
3033 |
case 250: /* cmd ::= PRAGMA nm dbnm EQ ON */
|
sl@0
|
3034 |
case 251: /* cmd ::= PRAGMA nm dbnm EQ DELETE */
|
sl@0
|
3035 |
#line 974 "parse.y"
|
sl@0
|
3036 |
{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);}
|
sl@0
|
3037 |
#line 3042 "parse.c"
|
sl@0
|
3038 |
break;
|
sl@0
|
3039 |
case 252: /* cmd ::= PRAGMA nm dbnm EQ minus_num */
|
sl@0
|
3040 |
#line 977 "parse.y"
|
sl@0
|
3041 |
{
|
sl@0
|
3042 |
sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);
|
sl@0
|
3043 |
}
|
sl@0
|
3044 |
#line 3049 "parse.c"
|
sl@0
|
3045 |
break;
|
sl@0
|
3046 |
case 253: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */
|
sl@0
|
3047 |
#line 980 "parse.y"
|
sl@0
|
3048 |
{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);}
|
sl@0
|
3049 |
#line 3054 "parse.c"
|
sl@0
|
3050 |
break;
|
sl@0
|
3051 |
case 254: /* cmd ::= PRAGMA nm dbnm */
|
sl@0
|
3052 |
#line 981 "parse.y"
|
sl@0
|
3053 |
{sqlite3Pragma(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0);}
|
sl@0
|
3054 |
#line 3059 "parse.c"
|
sl@0
|
3055 |
break;
|
sl@0
|
3056 |
case 262: /* cmd ::= CREATE trigger_decl BEGIN trigger_cmd_list END */
|
sl@0
|
3057 |
#line 996 "parse.y"
|
sl@0
|
3058 |
{
|
sl@0
|
3059 |
Token all;
|
sl@0
|
3060 |
all.z = yymsp[-3].minor.yy0.z;
|
sl@0
|
3061 |
all.n = (yymsp[0].minor.yy0.z - yymsp[-3].minor.yy0.z) + yymsp[0].minor.yy0.n;
|
sl@0
|
3062 |
sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy451, &all);
|
sl@0
|
3063 |
}
|
sl@0
|
3064 |
#line 3069 "parse.c"
|
sl@0
|
3065 |
break;
|
sl@0
|
3066 |
case 263: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
|
sl@0
|
3067 |
#line 1005 "parse.y"
|
sl@0
|
3068 |
{
|
sl@0
|
3069 |
sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy328, yymsp[-4].minor.yy378.a, yymsp[-4].minor.yy378.b, yymsp[-2].minor.yy439, yymsp[0].minor.yy418, yymsp[-10].minor.yy328, yymsp[-8].minor.yy328);
|
sl@0
|
3070 |
yygotominor.yy0 = (yymsp[-6].minor.yy0.n==0?yymsp[-7].minor.yy0:yymsp[-6].minor.yy0);
|
sl@0
|
3071 |
}
|
sl@0
|
3072 |
#line 3077 "parse.c"
|
sl@0
|
3073 |
break;
|
sl@0
|
3074 |
case 264: /* trigger_time ::= BEFORE */
|
sl@0
|
3075 |
case 267: /* trigger_time ::= */
|
sl@0
|
3076 |
#line 1011 "parse.y"
|
sl@0
|
3077 |
{ yygotominor.yy328 = TK_BEFORE; }
|
sl@0
|
3078 |
#line 3083 "parse.c"
|
sl@0
|
3079 |
break;
|
sl@0
|
3080 |
case 265: /* trigger_time ::= AFTER */
|
sl@0
|
3081 |
#line 1012 "parse.y"
|
sl@0
|
3082 |
{ yygotominor.yy328 = TK_AFTER; }
|
sl@0
|
3083 |
#line 3088 "parse.c"
|
sl@0
|
3084 |
break;
|
sl@0
|
3085 |
case 266: /* trigger_time ::= INSTEAD OF */
|
sl@0
|
3086 |
#line 1013 "parse.y"
|
sl@0
|
3087 |
{ yygotominor.yy328 = TK_INSTEAD;}
|
sl@0
|
3088 |
#line 3093 "parse.c"
|
sl@0
|
3089 |
break;
|
sl@0
|
3090 |
case 268: /* trigger_event ::= DELETE|INSERT */
|
sl@0
|
3091 |
case 269: /* trigger_event ::= UPDATE */
|
sl@0
|
3092 |
#line 1018 "parse.y"
|
sl@0
|
3093 |
{yygotominor.yy378.a = yymsp[0].major; yygotominor.yy378.b = 0;}
|
sl@0
|
3094 |
#line 3099 "parse.c"
|
sl@0
|
3095 |
break;
|
sl@0
|
3096 |
case 270: /* trigger_event ::= UPDATE OF inscollist */
|
sl@0
|
3097 |
#line 1020 "parse.y"
|
sl@0
|
3098 |
{yygotominor.yy378.a = TK_UPDATE; yygotominor.yy378.b = yymsp[0].minor.yy232;}
|
sl@0
|
3099 |
#line 3104 "parse.c"
|
sl@0
|
3100 |
break;
|
sl@0
|
3101 |
case 273: /* when_clause ::= */
|
sl@0
|
3102 |
case 290: /* key_opt ::= */
|
sl@0
|
3103 |
#line 1027 "parse.y"
|
sl@0
|
3104 |
{ yygotominor.yy418 = 0; }
|
sl@0
|
3105 |
#line 3110 "parse.c"
|
sl@0
|
3106 |
break;
|
sl@0
|
3107 |
case 274: /* when_clause ::= WHEN expr */
|
sl@0
|
3108 |
case 291: /* key_opt ::= KEY expr */
|
sl@0
|
3109 |
#line 1028 "parse.y"
|
sl@0
|
3110 |
{ yygotominor.yy418 = yymsp[0].minor.yy418; }
|
sl@0
|
3111 |
#line 3116 "parse.c"
|
sl@0
|
3112 |
break;
|
sl@0
|
3113 |
case 275: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
|
sl@0
|
3114 |
#line 1032 "parse.y"
|
sl@0
|
3115 |
{
|
sl@0
|
3116 |
/*
|
sl@0
|
3117 |
if( yymsp[-2].minor.yy451 ){
|
sl@0
|
3118 |
yymsp[-2].minor.yy451->pLast->pNext = yymsp[-1].minor.yy451;
|
sl@0
|
3119 |
}else{
|
sl@0
|
3120 |
yymsp[-2].minor.yy451 = yymsp[-1].minor.yy451;
|
sl@0
|
3121 |
}
|
sl@0
|
3122 |
*/
|
sl@0
|
3123 |
assert( yymsp[-2].minor.yy451!=0 );
|
sl@0
|
3124 |
yymsp[-2].minor.yy451->pLast->pNext = yymsp[-1].minor.yy451;
|
sl@0
|
3125 |
yymsp[-2].minor.yy451->pLast = yymsp[-1].minor.yy451;
|
sl@0
|
3126 |
yygotominor.yy451 = yymsp[-2].minor.yy451;
|
sl@0
|
3127 |
}
|
sl@0
|
3128 |
#line 3133 "parse.c"
|
sl@0
|
3129 |
break;
|
sl@0
|
3130 |
case 276: /* trigger_cmd_list ::= trigger_cmd SEMI */
|
sl@0
|
3131 |
#line 1045 "parse.y"
|
sl@0
|
3132 |
{
|
sl@0
|
3133 |
/* if( yymsp[-1].minor.yy451 ) */
|
sl@0
|
3134 |
assert( yymsp[-1].minor.yy451!=0 );
|
sl@0
|
3135 |
yymsp[-1].minor.yy451->pLast = yymsp[-1].minor.yy451;
|
sl@0
|
3136 |
yygotominor.yy451 = yymsp[-1].minor.yy451;
|
sl@0
|
3137 |
}
|
sl@0
|
3138 |
#line 3143 "parse.c"
|
sl@0
|
3139 |
break;
|
sl@0
|
3140 |
case 277: /* trigger_cmd ::= UPDATE orconf nm SET setlist where_opt */
|
sl@0
|
3141 |
#line 1056 "parse.y"
|
sl@0
|
3142 |
{ yygotominor.yy451 = sqlite3TriggerUpdateStep(pParse->db, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy322, yymsp[0].minor.yy418, yymsp[-4].minor.yy328); }
|
sl@0
|
3143 |
#line 3148 "parse.c"
|
sl@0
|
3144 |
break;
|
sl@0
|
3145 |
case 278: /* trigger_cmd ::= insert_cmd INTO nm inscollist_opt VALUES LP itemlist RP */
|
sl@0
|
3146 |
#line 1061 "parse.y"
|
sl@0
|
3147 |
{yygotominor.yy451 = sqlite3TriggerInsertStep(pParse->db, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy232, yymsp[-1].minor.yy322, 0, yymsp[-7].minor.yy328);}
|
sl@0
|
3148 |
#line 3153 "parse.c"
|
sl@0
|
3149 |
break;
|
sl@0
|
3150 |
case 279: /* trigger_cmd ::= insert_cmd INTO nm inscollist_opt select */
|
sl@0
|
3151 |
#line 1064 "parse.y"
|
sl@0
|
3152 |
{yygotominor.yy451 = sqlite3TriggerInsertStep(pParse->db, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy232, 0, yymsp[0].minor.yy91, yymsp[-4].minor.yy328);}
|
sl@0
|
3153 |
#line 3158 "parse.c"
|
sl@0
|
3154 |
break;
|
sl@0
|
3155 |
case 280: /* trigger_cmd ::= DELETE FROM nm where_opt */
|
sl@0
|
3156 |
#line 1068 "parse.y"
|
sl@0
|
3157 |
{yygotominor.yy451 = sqlite3TriggerDeleteStep(pParse->db, &yymsp[-1].minor.yy0, yymsp[0].minor.yy418);}
|
sl@0
|
3158 |
#line 3163 "parse.c"
|
sl@0
|
3159 |
break;
|
sl@0
|
3160 |
case 281: /* trigger_cmd ::= select */
|
sl@0
|
3161 |
#line 1071 "parse.y"
|
sl@0
|
3162 |
{yygotominor.yy451 = sqlite3TriggerSelectStep(pParse->db, yymsp[0].minor.yy91); }
|
sl@0
|
3163 |
#line 3168 "parse.c"
|
sl@0
|
3164 |
break;
|
sl@0
|
3165 |
case 282: /* expr ::= RAISE LP IGNORE RP */
|
sl@0
|
3166 |
#line 1074 "parse.y"
|
sl@0
|
3167 |
{
|
sl@0
|
3168 |
yygotominor.yy418 = sqlite3PExpr(pParse, TK_RAISE, 0, 0, 0);
|
sl@0
|
3169 |
if( yygotominor.yy418 ){
|
sl@0
|
3170 |
yygotominor.yy418->iColumn = OE_Ignore;
|
sl@0
|
3171 |
sqlite3ExprSpan(yygotominor.yy418, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0);
|
sl@0
|
3172 |
}
|
sl@0
|
3173 |
}
|
sl@0
|
3174 |
#line 3179 "parse.c"
|
sl@0
|
3175 |
break;
|
sl@0
|
3176 |
case 283: /* expr ::= RAISE LP raisetype COMMA nm RP */
|
sl@0
|
3177 |
#line 1081 "parse.y"
|
sl@0
|
3178 |
{
|
sl@0
|
3179 |
yygotominor.yy418 = sqlite3PExpr(pParse, TK_RAISE, 0, 0, &yymsp[-1].minor.yy0);
|
sl@0
|
3180 |
if( yygotominor.yy418 ) {
|
sl@0
|
3181 |
yygotominor.yy418->iColumn = yymsp[-3].minor.yy328;
|
sl@0
|
3182 |
sqlite3ExprSpan(yygotominor.yy418, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0);
|
sl@0
|
3183 |
}
|
sl@0
|
3184 |
}
|
sl@0
|
3185 |
#line 3190 "parse.c"
|
sl@0
|
3186 |
break;
|
sl@0
|
3187 |
case 284: /* raisetype ::= ROLLBACK */
|
sl@0
|
3188 |
#line 1091 "parse.y"
|
sl@0
|
3189 |
{yygotominor.yy328 = OE_Rollback;}
|
sl@0
|
3190 |
#line 3195 "parse.c"
|
sl@0
|
3191 |
break;
|
sl@0
|
3192 |
case 286: /* raisetype ::= FAIL */
|
sl@0
|
3193 |
#line 1093 "parse.y"
|
sl@0
|
3194 |
{yygotominor.yy328 = OE_Fail;}
|
sl@0
|
3195 |
#line 3200 "parse.c"
|
sl@0
|
3196 |
break;
|
sl@0
|
3197 |
case 287: /* cmd ::= DROP TRIGGER ifexists fullname */
|
sl@0
|
3198 |
#line 1098 "parse.y"
|
sl@0
|
3199 |
{
|
sl@0
|
3200 |
sqlite3DropTrigger(pParse,yymsp[0].minor.yy439,yymsp[-1].minor.yy328);
|
sl@0
|
3201 |
}
|
sl@0
|
3202 |
#line 3207 "parse.c"
|
sl@0
|
3203 |
break;
|
sl@0
|
3204 |
case 288: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
|
sl@0
|
3205 |
#line 1105 "parse.y"
|
sl@0
|
3206 |
{
|
sl@0
|
3207 |
sqlite3Attach(pParse, yymsp[-3].minor.yy418, yymsp[-1].minor.yy418, yymsp[0].minor.yy418);
|
sl@0
|
3208 |
}
|
sl@0
|
3209 |
#line 3214 "parse.c"
|
sl@0
|
3210 |
break;
|
sl@0
|
3211 |
case 289: /* cmd ::= DETACH database_kw_opt expr */
|
sl@0
|
3212 |
#line 1108 "parse.y"
|
sl@0
|
3213 |
{
|
sl@0
|
3214 |
sqlite3Detach(pParse, yymsp[0].minor.yy418);
|
sl@0
|
3215 |
}
|
sl@0
|
3216 |
#line 3221 "parse.c"
|
sl@0
|
3217 |
break;
|
sl@0
|
3218 |
case 294: /* cmd ::= REINDEX */
|
sl@0
|
3219 |
#line 1123 "parse.y"
|
sl@0
|
3220 |
{sqlite3Reindex(pParse, 0, 0);}
|
sl@0
|
3221 |
#line 3226 "parse.c"
|
sl@0
|
3222 |
break;
|
sl@0
|
3223 |
case 295: /* cmd ::= REINDEX nm dbnm */
|
sl@0
|
3224 |
#line 1124 "parse.y"
|
sl@0
|
3225 |
{sqlite3Reindex(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
|
sl@0
|
3226 |
#line 3231 "parse.c"
|
sl@0
|
3227 |
break;
|
sl@0
|
3228 |
case 296: /* cmd ::= ANALYZE */
|
sl@0
|
3229 |
#line 1129 "parse.y"
|
sl@0
|
3230 |
{sqlite3Analyze(pParse, 0, 0);}
|
sl@0
|
3231 |
#line 3236 "parse.c"
|
sl@0
|
3232 |
break;
|
sl@0
|
3233 |
case 297: /* cmd ::= ANALYZE nm dbnm */
|
sl@0
|
3234 |
#line 1130 "parse.y"
|
sl@0
|
3235 |
{sqlite3Analyze(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
|
sl@0
|
3236 |
#line 3241 "parse.c"
|
sl@0
|
3237 |
break;
|
sl@0
|
3238 |
case 298: /* cmd ::= ALTER TABLE fullname RENAME TO nm */
|
sl@0
|
3239 |
#line 1135 "parse.y"
|
sl@0
|
3240 |
{
|
sl@0
|
3241 |
sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy439,&yymsp[0].minor.yy0);
|
sl@0
|
3242 |
}
|
sl@0
|
3243 |
#line 3248 "parse.c"
|
sl@0
|
3244 |
break;
|
sl@0
|
3245 |
case 299: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt column */
|
sl@0
|
3246 |
#line 1138 "parse.y"
|
sl@0
|
3247 |
{
|
sl@0
|
3248 |
sqlite3AlterFinishAddColumn(pParse, &yymsp[0].minor.yy0);
|
sl@0
|
3249 |
}
|
sl@0
|
3250 |
#line 3255 "parse.c"
|
sl@0
|
3251 |
break;
|
sl@0
|
3252 |
case 300: /* add_column_fullname ::= fullname */
|
sl@0
|
3253 |
#line 1141 "parse.y"
|
sl@0
|
3254 |
{
|
sl@0
|
3255 |
sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy439);
|
sl@0
|
3256 |
}
|
sl@0
|
3257 |
#line 3262 "parse.c"
|
sl@0
|
3258 |
break;
|
sl@0
|
3259 |
};
|
sl@0
|
3260 |
yygoto = yyRuleInfo[yyruleno].lhs;
|
sl@0
|
3261 |
yysize = yyRuleInfo[yyruleno].nrhs;
|
sl@0
|
3262 |
yypParser->yyidx -= yysize;
|
sl@0
|
3263 |
yyact = yy_find_reduce_action(yymsp[-yysize].stateno,yygoto);
|
sl@0
|
3264 |
if( yyact < YYNSTATE ){
|
sl@0
|
3265 |
#ifdef NDEBUG
|
sl@0
|
3266 |
/* If we are not debugging and the reduce action popped at least
|
sl@0
|
3267 |
** one element off the stack, then we can push the new element back
|
sl@0
|
3268 |
** onto the stack here, and skip the stack overflow test in yy_shift().
|
sl@0
|
3269 |
** That gives a significant speed improvement. */
|
sl@0
|
3270 |
if( yysize ){
|
sl@0
|
3271 |
yypParser->yyidx++;
|
sl@0
|
3272 |
yymsp -= yysize-1;
|
sl@0
|
3273 |
yymsp->stateno = yyact;
|
sl@0
|
3274 |
yymsp->major = yygoto;
|
sl@0
|
3275 |
yymsp->minor = yygotominor;
|
sl@0
|
3276 |
}else
|
sl@0
|
3277 |
#endif
|
sl@0
|
3278 |
{
|
sl@0
|
3279 |
yy_shift(yypParser,yyact,yygoto,&yygotominor);
|
sl@0
|
3280 |
}
|
sl@0
|
3281 |
}else{
|
sl@0
|
3282 |
assert( yyact == YYNSTATE + YYNRULE + 1 );
|
sl@0
|
3283 |
yy_accept(yypParser);
|
sl@0
|
3284 |
}
|
sl@0
|
3285 |
}
|
sl@0
|
3286 |
|
sl@0
|
3287 |
/*
|
sl@0
|
3288 |
** The following code executes when the parse fails
|
sl@0
|
3289 |
*/
|
sl@0
|
3290 |
static void yy_parse_failed(
|
sl@0
|
3291 |
yyParser *yypParser /* The parser */
|
sl@0
|
3292 |
){
|
sl@0
|
3293 |
sqlite3ParserARG_FETCH;
|
sl@0
|
3294 |
#ifndef NDEBUG
|
sl@0
|
3295 |
if( yyTraceFILE ){
|
sl@0
|
3296 |
fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
|
sl@0
|
3297 |
}
|
sl@0
|
3298 |
#endif
|
sl@0
|
3299 |
while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
|
sl@0
|
3300 |
/* Here code is inserted which will be executed whenever the
|
sl@0
|
3301 |
** parser fails */
|
sl@0
|
3302 |
sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */
|
sl@0
|
3303 |
}
|
sl@0
|
3304 |
|
sl@0
|
3305 |
/*
|
sl@0
|
3306 |
** The following code executes when a syntax error first occurs.
|
sl@0
|
3307 |
*/
|
sl@0
|
3308 |
static void yy_syntax_error(
|
sl@0
|
3309 |
yyParser *yypParser, /* The parser */
|
sl@0
|
3310 |
int yymajor, /* The major type of the error token */
|
sl@0
|
3311 |
YYMINORTYPE yyminor /* The minor type of the error token */
|
sl@0
|
3312 |
){
|
sl@0
|
3313 |
sqlite3ParserARG_FETCH;
|
sl@0
|
3314 |
#define TOKEN (yyminor.yy0)
|
sl@0
|
3315 |
#line 34 "parse.y"
|
sl@0
|
3316 |
|
sl@0
|
3317 |
assert( TOKEN.z[0] ); /* The tokenizer always gives us a token */
|
sl@0
|
3318 |
sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN);
|
sl@0
|
3319 |
pParse->parseError = 1;
|
sl@0
|
3320 |
#line 3327 "parse.c"
|
sl@0
|
3321 |
sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */
|
sl@0
|
3322 |
}
|
sl@0
|
3323 |
|
sl@0
|
3324 |
/*
|
sl@0
|
3325 |
** The following is executed when the parser accepts
|
sl@0
|
3326 |
*/
|
sl@0
|
3327 |
static void yy_accept(
|
sl@0
|
3328 |
yyParser *yypParser /* The parser */
|
sl@0
|
3329 |
){
|
sl@0
|
3330 |
sqlite3ParserARG_FETCH;
|
sl@0
|
3331 |
#ifndef NDEBUG
|
sl@0
|
3332 |
if( yyTraceFILE ){
|
sl@0
|
3333 |
fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);
|
sl@0
|
3334 |
}
|
sl@0
|
3335 |
#endif
|
sl@0
|
3336 |
while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
|
sl@0
|
3337 |
/* Here code is inserted which will be executed whenever the
|
sl@0
|
3338 |
** parser accepts */
|
sl@0
|
3339 |
sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */
|
sl@0
|
3340 |
}
|
sl@0
|
3341 |
|
sl@0
|
3342 |
/* The main parser program.
|
sl@0
|
3343 |
** The first argument is a pointer to a structure obtained from
|
sl@0
|
3344 |
** "sqlite3ParserAlloc" which describes the current state of the parser.
|
sl@0
|
3345 |
** The second argument is the major token number. The third is
|
sl@0
|
3346 |
** the minor token. The fourth optional argument is whatever the
|
sl@0
|
3347 |
** user wants (and specified in the grammar) and is available for
|
sl@0
|
3348 |
** use by the action routines.
|
sl@0
|
3349 |
**
|
sl@0
|
3350 |
** Inputs:
|
sl@0
|
3351 |
** <ul>
|
sl@0
|
3352 |
** <li> A pointer to the parser (an opaque structure.)
|
sl@0
|
3353 |
** <li> The major token number.
|
sl@0
|
3354 |
** <li> The minor token number.
|
sl@0
|
3355 |
** <li> An option argument of a grammar-specified type.
|
sl@0
|
3356 |
** </ul>
|
sl@0
|
3357 |
**
|
sl@0
|
3358 |
** Outputs:
|
sl@0
|
3359 |
** None.
|
sl@0
|
3360 |
*/
|
sl@0
|
3361 |
void sqlite3Parser(
|
sl@0
|
3362 |
void *yyp, /* The parser */
|
sl@0
|
3363 |
int yymajor, /* The major token code number */
|
sl@0
|
3364 |
sqlite3ParserTOKENTYPE yyminor /* The value for the token */
|
sl@0
|
3365 |
sqlite3ParserARG_PDECL /* Optional %extra_argument parameter */
|
sl@0
|
3366 |
){
|
sl@0
|
3367 |
YYMINORTYPE yyminorunion;
|
sl@0
|
3368 |
int yyact; /* The parser action. */
|
sl@0
|
3369 |
int yyendofinput; /* True if we are at the end of input */
|
sl@0
|
3370 |
#ifdef YYERRORSYMBOL
|
sl@0
|
3371 |
int yyerrorhit = 0; /* True if yymajor has invoked an error */
|
sl@0
|
3372 |
#endif
|
sl@0
|
3373 |
yyParser *yypParser; /* The parser */
|
sl@0
|
3374 |
|
sl@0
|
3375 |
/* (re)initialize the parser, if necessary */
|
sl@0
|
3376 |
yypParser = (yyParser*)yyp;
|
sl@0
|
3377 |
if( yypParser->yyidx<0 ){
|
sl@0
|
3378 |
#if YYSTACKDEPTH<=0
|
sl@0
|
3379 |
if( yypParser->yystksz <=0 ){
|
sl@0
|
3380 |
/*memset(&yyminorunion, 0, sizeof(yyminorunion));*/
|
sl@0
|
3381 |
yyminorunion = yyzerominor;
|
sl@0
|
3382 |
yyStackOverflow(yypParser, &yyminorunion);
|
sl@0
|
3383 |
return;
|
sl@0
|
3384 |
}
|
sl@0
|
3385 |
#endif
|
sl@0
|
3386 |
yypParser->yyidx = 0;
|
sl@0
|
3387 |
yypParser->yyerrcnt = -1;
|
sl@0
|
3388 |
yypParser->yystack[0].stateno = 0;
|
sl@0
|
3389 |
yypParser->yystack[0].major = 0;
|
sl@0
|
3390 |
}
|
sl@0
|
3391 |
yyminorunion.yy0 = yyminor;
|
sl@0
|
3392 |
yyendofinput = (yymajor==0);
|
sl@0
|
3393 |
sqlite3ParserARG_STORE;
|
sl@0
|
3394 |
|
sl@0
|
3395 |
#ifndef NDEBUG
|
sl@0
|
3396 |
if( yyTraceFILE ){
|
sl@0
|
3397 |
fprintf(yyTraceFILE,"%sInput %s\n",yyTracePrompt,yyTokenName[yymajor]);
|
sl@0
|
3398 |
}
|
sl@0
|
3399 |
#endif
|
sl@0
|
3400 |
|
sl@0
|
3401 |
do{
|
sl@0
|
3402 |
yyact = yy_find_shift_action(yypParser,yymajor);
|
sl@0
|
3403 |
if( yyact<YYNSTATE ){
|
sl@0
|
3404 |
assert( !yyendofinput ); /* Impossible to shift the $ token */
|
sl@0
|
3405 |
yy_shift(yypParser,yyact,yymajor,&yyminorunion);
|
sl@0
|
3406 |
yypParser->yyerrcnt--;
|
sl@0
|
3407 |
yymajor = YYNOCODE;
|
sl@0
|
3408 |
}else if( yyact < YYNSTATE + YYNRULE ){
|
sl@0
|
3409 |
yy_reduce(yypParser,yyact-YYNSTATE);
|
sl@0
|
3410 |
}else{
|
sl@0
|
3411 |
assert( yyact == YY_ERROR_ACTION );
|
sl@0
|
3412 |
#ifdef YYERRORSYMBOL
|
sl@0
|
3413 |
int yymx;
|
sl@0
|
3414 |
#endif
|
sl@0
|
3415 |
#ifndef NDEBUG
|
sl@0
|
3416 |
if( yyTraceFILE ){
|
sl@0
|
3417 |
fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);
|
sl@0
|
3418 |
}
|
sl@0
|
3419 |
#endif
|
sl@0
|
3420 |
#ifdef YYERRORSYMBOL
|
sl@0
|
3421 |
/* A syntax error has occurred.
|
sl@0
|
3422 |
** The response to an error depends upon whether or not the
|
sl@0
|
3423 |
** grammar defines an error token "ERROR".
|
sl@0
|
3424 |
**
|
sl@0
|
3425 |
** This is what we do if the grammar does define ERROR:
|
sl@0
|
3426 |
**
|
sl@0
|
3427 |
** * Call the %syntax_error function.
|
sl@0
|
3428 |
**
|
sl@0
|
3429 |
** * Begin popping the stack until we enter a state where
|
sl@0
|
3430 |
** it is legal to shift the error symbol, then shift
|
sl@0
|
3431 |
** the error symbol.
|
sl@0
|
3432 |
**
|
sl@0
|
3433 |
** * Set the error count to three.
|
sl@0
|
3434 |
**
|
sl@0
|
3435 |
** * Begin accepting and shifting new tokens. No new error
|
sl@0
|
3436 |
** processing will occur until three tokens have been
|
sl@0
|
3437 |
** shifted successfully.
|
sl@0
|
3438 |
**
|
sl@0
|
3439 |
*/
|
sl@0
|
3440 |
if( yypParser->yyerrcnt<0 ){
|
sl@0
|
3441 |
yy_syntax_error(yypParser,yymajor,yyminorunion);
|
sl@0
|
3442 |
}
|
sl@0
|
3443 |
yymx = yypParser->yystack[yypParser->yyidx].major;
|
sl@0
|
3444 |
if( yymx==YYERRORSYMBOL || yyerrorhit ){
|
sl@0
|
3445 |
#ifndef NDEBUG
|
sl@0
|
3446 |
if( yyTraceFILE ){
|
sl@0
|
3447 |
fprintf(yyTraceFILE,"%sDiscard input token %s\n",
|
sl@0
|
3448 |
yyTracePrompt,yyTokenName[yymajor]);
|
sl@0
|
3449 |
}
|
sl@0
|
3450 |
#endif
|
sl@0
|
3451 |
yy_destructor(yypParser, yymajor,&yyminorunion);
|
sl@0
|
3452 |
yymajor = YYNOCODE;
|
sl@0
|
3453 |
}else{
|
sl@0
|
3454 |
while(
|
sl@0
|
3455 |
yypParser->yyidx >= 0 &&
|
sl@0
|
3456 |
yymx != YYERRORSYMBOL &&
|
sl@0
|
3457 |
(yyact = yy_find_reduce_action(
|
sl@0
|
3458 |
yypParser->yystack[yypParser->yyidx].stateno,
|
sl@0
|
3459 |
YYERRORSYMBOL)) >= YYNSTATE
|
sl@0
|
3460 |
){
|
sl@0
|
3461 |
yy_pop_parser_stack(yypParser);
|
sl@0
|
3462 |
}
|
sl@0
|
3463 |
if( yypParser->yyidx < 0 || yymajor==0 ){
|
sl@0
|
3464 |
yy_destructor(yypParser,yymajor,&yyminorunion);
|
sl@0
|
3465 |
yy_parse_failed(yypParser);
|
sl@0
|
3466 |
yymajor = YYNOCODE;
|
sl@0
|
3467 |
}else if( yymx!=YYERRORSYMBOL ){
|
sl@0
|
3468 |
YYMINORTYPE u2;
|
sl@0
|
3469 |
u2.YYERRSYMDT = 0;
|
sl@0
|
3470 |
yy_shift(yypParser,yyact,YYERRORSYMBOL,&u2);
|
sl@0
|
3471 |
}
|
sl@0
|
3472 |
}
|
sl@0
|
3473 |
yypParser->yyerrcnt = 3;
|
sl@0
|
3474 |
yyerrorhit = 1;
|
sl@0
|
3475 |
#else /* YYERRORSYMBOL is not defined */
|
sl@0
|
3476 |
/* This is what we do if the grammar does not define ERROR:
|
sl@0
|
3477 |
**
|
sl@0
|
3478 |
** * Report an error message, and throw away the input token.
|
sl@0
|
3479 |
**
|
sl@0
|
3480 |
** * If the input token is $, then fail the parse.
|
sl@0
|
3481 |
**
|
sl@0
|
3482 |
** As before, subsequent error messages are suppressed until
|
sl@0
|
3483 |
** three input tokens have been successfully shifted.
|
sl@0
|
3484 |
*/
|
sl@0
|
3485 |
if( yypParser->yyerrcnt<=0 ){
|
sl@0
|
3486 |
yy_syntax_error(yypParser,yymajor,yyminorunion);
|
sl@0
|
3487 |
}
|
sl@0
|
3488 |
yypParser->yyerrcnt = 3;
|
sl@0
|
3489 |
yy_destructor(yypParser,yymajor,&yyminorunion);
|
sl@0
|
3490 |
if( yyendofinput ){
|
sl@0
|
3491 |
yy_parse_failed(yypParser);
|
sl@0
|
3492 |
}
|
sl@0
|
3493 |
yymajor = YYNOCODE;
|
sl@0
|
3494 |
#endif
|
sl@0
|
3495 |
}
|
sl@0
|
3496 |
}while( yymajor!=YYNOCODE && yypParser->yyidx>=0 );
|
sl@0
|
3497 |
return;
|
sl@0
|
3498 |
}
|