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