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