1 /* Driver template for the LEMON parser generator.
2 ** The author disclaims copyright to this source code.
4 /* First off, code is include which follows the "include" declaration
5 ** in the input file. */
13 ** An instance of this structure holds information about the
14 ** LIMIT clause of a SELECT statement.
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.
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
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.
51 ** These constants (all generated automatically by the parser generator)
52 ** specify the various kinds of tokens (terminals) that the parser
55 ** Each symbol here is a terminal symbol in the grammar.
57 /* Make sure the INTERFACE macro is defined.
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
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
97 #define YYACTIONTYPE unsigned short int
98 #define sqlite3ParserTOKENTYPE Token
100 sqlite3ParserTOKENTYPE yy0
;
102 struct {int value
; int mask
;} yy47
;
105 struct AttachKey yy132
;
106 struct TrigEvent yy210
;
108 struct LimitVal yy244
;
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
123 #define YYERRORSYMBOL 141
124 #define YYERRSYMDT yy481
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
135 ** Suppose the action integer is N. Then the action is determined as
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,
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,
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.
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 */
673 0, /* ROLLBACK => nothing */
674 0, /* CREATE => nothing */
675 0, /* TABLE => nothing */
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 */
685 27, /* ATTACH => ID */
686 27, /* BEFORE => ID */
687 27, /* CASCADE => ID */
688 27, /* CONFLICT => ID */
689 27, /* DATABASE => ID */
691 27, /* DETACH => ID */
695 27, /* IGNORE => ID */
696 27, /* INITIALLY => ID */
697 27, /* INSTEAD => ID */
698 27, /* LIKE_KW => ID */
699 27, /* MATCH => ID */
702 27, /* OFFSET => ID */
703 27, /* PRAGMA => ID */
704 27, /* RAISE => ID */
705 27, /* REPLACE => ID */
706 27, /* RESTRICT => ID */
708 27, /* STATEMENT => ID */
709 27, /* TRIGGER => ID */
710 27, /* VACUUM => 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 */
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
;
831 static FILE *yyTraceFILE
= 0;
832 static char *yyTracePrompt
= 0;
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
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
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;
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",
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",
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",
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",
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",
1241 ** This function returns the symbolic name associated with a token
1244 const char *sqlite3ParserTokenName(int tokenType
){
1246 if( tokenType
>0 && tokenType
<(sizeof(yyTokenName
)/sizeof(yyTokenName
[0])) ){
1247 return yyTokenName
[tokenType
];
1257 ** This function allocates a new parser.
1258 ** The only argument is a pointer to a function which works like
1262 ** A pointer to the function used to allocate memory.
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)){
1270 pParser
= (yyParser
*)(*mallocProc
)( (size_t)sizeof(yyParser
) );
1272 pParser
->yyidx
= -1;
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
1282 static void yy_destructor(YYCODETYPE yymajor
, YYMINORTYPE
*yypminor
){
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.
1297 #line 334 "src/parse.y"
1298 {sqlite3SelectDelete((yypminor
->yy459
));}
1299 #line 1301 "src/parse.c"
1308 #line 593 "src/parse.y"
1309 {sqlite3ExprDelete((yypminor
->yy2
));}
1310 #line 1312 "src/parse.c"
1323 #line 812 "src/parse.y"
1324 {sqlite3ExprListDelete((yypminor
->yy82
));}
1325 #line 1327 "src/parse.c"
1331 #line 463 "src/parse.y"
1332 {sqlite3SrcListDelete((yypminor
->yy67
));}
1333 #line 1335 "src/parse.c"
1336 #line 525 "src/parse.y"
1338 sqlite3ExprDelete((yypminor
->yy244
).pLimit
);
1339 sqlite3ExprDelete((yypminor
->yy244
).pOffset
);
1341 #line 1343 "src/parse.c"
1346 #line 481 "src/parse.y"
1347 {sqlite3IdListDelete((yypminor
->yy240
));}
1348 #line 1350 "src/parse.c"
1352 #line 905 "src/parse.y"
1353 {sqlite3DeleteTriggerStep((yypminor
->yy347
));}
1354 #line 1356 "src/parse.c"
1357 #line 889 "src/parse.y"
1358 {sqlite3IdListDelete((yypminor
->yy210
).b
);}
1359 #line 1361 "src/parse.c"
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
){
1375 yyStackEntry
*yytos
= &pParser
->yystack
[pParser
->yyidx
];
1377 if( pParser
->yyidx
<0 ) return 0;
1379 if( yyTraceFILE
&& pParser
->yyidx
>=0 ){
1380 fprintf(yyTraceFILE
,"%sPopping %s\n",
1382 yyTokenName
[yytos
->major
]);
1385 yymajor
= yytos
->major
;
1386 yy_destructor( yymajor
, &yytos
->minor
);
1392 ** Deallocate and destroy a parser. Destructors are all called for
1393 ** all stack elements before shutting the parser down.
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
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 */
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
;
1437 if( i
<0 || i
>=YY_SZ_ACTTAB
|| yy_lookahead
[i
]!=iLookAhead
){
1439 int iFallback
; /* Fallback token */
1440 if( iLookAhead
<sizeof(yyFallback
)/sizeof(yyFallback
[0])
1441 && (iFallback
= yyFallback
[iLookAhead
])!=0 ){
1444 fprintf(yyTraceFILE
, "%sFALLBACK %s => %s\n",
1445 yyTracePrompt
, yyTokenName
[iLookAhead
], yyTokenName
[iFallback
]);
1448 return yy_find_shift_action(pParser
, iFallback
);
1451 return yy_default
[stateno
];
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 */
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
;
1480 if( i
<0 || i
>=YY_SZ_ACTTAB
|| yy_lookahead
[i
]!=iLookAhead
){
1481 return yy_default
[stateno
];
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
;
1498 if( yypParser
->yyidx
>=YYSTACKDEPTH
){
1499 sqlite3ParserARG_FETCH
;
1503 fprintf(yyTraceFILE
,"%sStack Overflow!\n",yyTracePrompt
);
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 */
1512 yytos
= &yypParser
->yystack
[yypParser
->yyidx
];
1513 yytos
->stateno
= yyNewState
;
1514 yytos
->major
= yyMajor
;
1515 yytos
->minor
= *yypMinor
;
1517 if( yyTraceFILE
&& yypParser
->yyidx
>0 ){
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");
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 */
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
];
1860 if( yyTraceFILE
&& yyruleno
>=0
1861 && yyruleno
<sizeof(yyRuleName
)/sizeof(yyRuleName
[0]) ){
1862 fprintf(yyTraceFILE
, "%sReduce [%s].\n", yyTracePrompt
,
1863 yyRuleName
[yyruleno
]);
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
));
1880 /* Beginning here are the reduction cases. A typical example
1883 ** #line <lineno> <grammarfile>
1884 ** { ... } // User supplied code
1885 ** #line <lineno> <thisfile>
1889 #line 84 "src/parse.y"
1890 { sqlite3FinishCoding(pParse
); }
1891 #line 1893 "src/parse.c"
1894 #line 87 "src/parse.y"
1895 { sqlite3BeginParse(pParse
, 0); }
1896 #line 1898 "src/parse.c"
1899 #line 89 "src/parse.y"
1900 { sqlite3BeginParse(pParse
, 1); }
1901 #line 1903 "src/parse.c"
1904 #line 95 "src/parse.y"
1905 {sqlite3BeginTransaction(pParse
, yymsp
[-1].minor
.yy412
);}
1906 #line 1908 "src/parse.c"
1909 #line 100 "src/parse.y"
1910 {yygotominor
.yy412
= TK_DEFERRED
;}
1911 #line 1913 "src/parse.c"
1919 #line 101 "src/parse.y"
1920 {yygotominor
.yy412
= yymsp
[0].major
;}
1921 #line 1923 "src/parse.c"
1925 #line 104 "src/parse.y"
1926 {sqlite3CommitTransaction(pParse
);}
1927 #line 1929 "src/parse.c"
1930 #line 106 "src/parse.y"
1931 {sqlite3RollbackTransaction(pParse
);}
1932 #line 1934 "src/parse.c"
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"
1947 #line 116 "src/parse.y"
1948 {yygotominor
.yy412
= 1;}
1949 #line 1951 "src/parse.c"
1960 #line 118 "src/parse.y"
1961 {yygotominor
.yy412
= 0;}
1962 #line 1964 "src/parse.c"
1965 #line 119 "src/parse.y"
1967 sqlite3EndTable(pParse
,&yymsp
[-1].minor
.yy258
,&yymsp
[0].minor
.yy0
,0);
1969 #line 1971 "src/parse.c"
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"
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"
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"
2003 #line 147 "src/parse.y"
2004 {yygotominor
.yy258
= yymsp
[0].minor
.yy0
;}
2005 #line 2007 "src/parse.c"
2008 #line 202 "src/parse.y"
2009 {sqlite3AddColumnType(pParse
,&yymsp
[0].minor
.yy258
,&yymsp
[0].minor
.yy258
);}
2010 #line 2012 "src/parse.c"
2013 #line 203 "src/parse.y"
2014 {sqlite3AddColumnType(pParse
,&yymsp
[-3].minor
.yy258
,&yymsp
[0].minor
.yy0
);}
2015 #line 2017 "src/parse.c"
2018 #line 205 "src/parse.y"
2019 {sqlite3AddColumnType(pParse
,&yymsp
[-5].minor
.yy258
,&yymsp
[0].minor
.yy0
);}
2020 #line 2022 "src/parse.c"
2030 #line 207 "src/parse.y"
2031 {yygotominor
.yy258
= yymsp
[0].minor
.yy258
;}
2032 #line 2034 "src/parse.c"
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"
2040 #line 210 "src/parse.y"
2041 { yygotominor
.yy412
= atoi(yymsp
[0].minor
.yy258
.z
); }
2042 #line 2044 "src/parse.c"
2045 #line 211 "src/parse.y"
2046 { yygotominor
.yy412
= -atoi(yymsp
[0].minor
.yy258
.z
); }
2047 #line 2049 "src/parse.c"
2051 #line 216 "src/parse.y"
2052 {sqlite3AddDefaultValue(pParse
,yymsp
[0].minor
.yy2
);}
2053 #line 2055 "src/parse.c"
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"
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"
2072 #line 231 "src/parse.y"
2073 {sqlite3AddNotNull(pParse
, yymsp
[0].minor
.yy412
);}
2074 #line 2076 "src/parse.c"
2077 #line 233 "src/parse.y"
2078 {sqlite3AddPrimaryKey(pParse
,0,yymsp
[-1].minor
.yy412
,yymsp
[0].minor
.yy412
);}
2079 #line 2081 "src/parse.c"
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"
2087 #line 235 "src/parse.y"
2088 {sqlite3ExprDelete(yymsp
[-2].minor
.yy2
);}
2089 #line 2091 "src/parse.c"
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"
2097 #line 238 "src/parse.y"
2098 {sqlite3DeferForeignKey(pParse
,yymsp
[0].minor
.yy412
);}
2099 #line 2101 "src/parse.c"
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"
2107 #line 252 "src/parse.y"
2108 { yygotominor
.yy412
= OE_Restrict
* 0x010101; }
2109 #line 2111 "src/parse.c"
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"
2117 #line 255 "src/parse.y"
2118 { yygotominor
.yy47
.value
= 0; yygotominor
.yy47
.mask
= 0x000000; }
2119 #line 2121 "src/parse.c"
2122 #line 256 "src/parse.y"
2123 { yygotominor
.yy47
.value
= yymsp
[0].minor
.yy412
; yygotominor
.yy47
.mask
= 0x0000ff; }
2124 #line 2126 "src/parse.c"
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"
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"
2137 #line 260 "src/parse.y"
2138 { yygotominor
.yy412
= OE_SetNull
; }
2139 #line 2141 "src/parse.c"
2142 #line 261 "src/parse.y"
2143 { yygotominor
.yy412
= OE_SetDflt
; }
2144 #line 2146 "src/parse.c"
2147 #line 262 "src/parse.y"
2148 { yygotominor
.yy412
= OE_Cascade
; }
2149 #line 2151 "src/parse.c"
2152 #line 263 "src/parse.y"
2153 { yygotominor
.yy412
= OE_Restrict
; }
2154 #line 2156 "src/parse.c"
2163 #line 265 "src/parse.y"
2164 {yygotominor
.yy412
= yymsp
[0].minor
.yy412
;}
2165 #line 2167 "src/parse.c"
2168 #line 275 "src/parse.y"
2169 {yygotominor
.yy258
.n
= 0; yygotominor
.yy258
.z
= 0;}
2170 #line 2172 "src/parse.c"
2173 #line 276 "src/parse.y"
2174 {yygotominor
.yy258
= yymsp
[-1].minor
.yy0
;}
2175 #line 2177 "src/parse.c"
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"
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"
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"
2197 #line 301 "src/parse.y"
2198 {yygotominor
.yy412
= OE_Default
;}
2199 #line 2201 "src/parse.c"
2202 #line 306 "src/parse.y"
2203 {yygotominor
.yy412
= OE_Ignore
;}
2204 #line 2206 "src/parse.c"
2208 #line 307 "src/parse.y"
2209 {yygotominor
.yy412
= OE_Replace
;}
2210 #line 2212 "src/parse.c"
2213 #line 311 "src/parse.y"
2215 sqlite3DropTable(pParse
, yymsp
[0].minor
.yy67
, 0);
2217 #line 2219 "src/parse.c"
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"
2227 #line 321 "src/parse.y"
2229 sqlite3DropTable(pParse
, yymsp
[0].minor
.yy67
, 1);
2231 #line 2233 "src/parse.c"
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"
2243 #line 338 "src/parse.y"
2244 {yygotominor
.yy459
= yymsp
[0].minor
.yy459
;}
2245 #line 2247 "src/parse.c"
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"
2259 #line 349 "src/parse.y"
2260 {yygotominor
.yy412
= TK_ALL
;}
2261 #line 2263 "src/parse.c"
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"
2272 #line 375 "src/parse.y"
2273 {yygotominor
.yy82
= yymsp
[-1].minor
.yy82
;}
2274 #line 2276 "src/parse.c"
2280 #line 376 "src/parse.y"
2281 {yygotominor
.yy82
= 0;}
2282 #line 2284 "src/parse.c"
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"
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"
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"
2308 #line 395 "src/parse.y"
2309 {yygotominor
.yy258
.n
= 0;}
2310 #line 2312 "src/parse.c"
2313 #line 407 "src/parse.y"
2314 {yygotominor
.yy67
= sqliteMalloc(sizeof(*yygotominor
.yy67
));}
2315 #line 2317 "src/parse.c"
2318 #line 408 "src/parse.y"
2319 {yygotominor
.yy67
= yymsp
[0].minor
.yy67
;}
2320 #line 2322 "src/parse.c"
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"
2331 #line 417 "src/parse.y"
2332 {yygotominor
.yy67
= 0;}
2333 #line 2335 "src/parse.c"
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"
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"
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"
2376 #line 459 "src/parse.y"
2377 {yygotominor
.yy258
.z
=0; yygotominor
.yy258
.n
=0;}
2378 #line 2380 "src/parse.c"
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"
2387 #line 468 "src/parse.y"
2388 { yygotominor
.yy412
= JT_INNER
; }
2389 #line 2391 "src/parse.c"
2392 #line 470 "src/parse.y"
2393 { yygotominor
.yy412
= sqlite3JoinType(pParse
,&yymsp
[-1].minor
.yy0
,0,0); }
2394 #line 2396 "src/parse.c"
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"
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"
2415 #line 477 "src/parse.y"
2416 {yygotominor
.yy2
= yymsp
[0].minor
.yy2
;}
2417 #line 2419 "src/parse.c"
2426 #line 478 "src/parse.y"
2427 {yygotominor
.yy2
= 0;}
2428 #line 2430 "src/parse.c"
2432 #line 482 "src/parse.y"
2433 {yygotominor
.yy240
= yymsp
[-1].minor
.yy240
;}
2434 #line 2436 "src/parse.c"
2438 #line 483 "src/parse.y"
2439 {yygotominor
.yy240
= 0;}
2440 #line 2442 "src/parse.c"
2444 #line 494 "src/parse.y"
2445 {yygotominor
.yy82
= yymsp
[0].minor
.yy82
;}
2446 #line 2448 "src/parse.c"
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"
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"
2466 #line 508 "src/parse.y"
2467 {yygotominor
.yy412
= SQLITE_SO_ASC
;}
2468 #line 2470 "src/parse.c"
2471 #line 509 "src/parse.y"
2472 {yygotominor
.yy412
= SQLITE_SO_DESC
;}
2473 #line 2475 "src/parse.c"
2476 #line 511 "src/parse.y"
2477 {yygotominor
.yy258
.z
= 0; yygotominor
.yy258
.n
= 0;}
2478 #line 2480 "src/parse.c"
2481 #line 529 "src/parse.y"
2482 {yygotominor
.yy244
.pLimit
= 0; yygotominor
.yy244
.pOffset
= 0;}
2483 #line 2485 "src/parse.c"
2486 #line 530 "src/parse.y"
2487 {yygotominor
.yy244
.pLimit
= yymsp
[0].minor
.yy2
; yygotominor
.yy244
.pOffset
= 0;}
2488 #line 2490 "src/parse.c"
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"
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"
2501 #line 538 "src/parse.y"
2502 {sqlite3DeleteFrom(pParse
,yymsp
[-1].minor
.yy67
,yymsp
[0].minor
.yy2
);}
2503 #line 2505 "src/parse.c"
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"
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"
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"
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"
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"
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"
2538 #line 575 "src/parse.y"
2539 {yygotominor
.yy82
= sqlite3ExprListAppend(0,yymsp
[0].minor
.yy2
,0);}
2540 #line 2542 "src/parse.c"
2543 #line 584 "src/parse.y"
2544 {yygotominor
.yy240
= sqlite3IdListAppend(yymsp
[-2].minor
.yy240
,&yymsp
[0].minor
.yy258
);}
2545 #line 2547 "src/parse.c"
2548 #line 585 "src/parse.y"
2549 {yygotominor
.yy240
= sqlite3IdListAppend(0,&yymsp
[0].minor
.yy258
);}
2550 #line 2552 "src/parse.c"
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"
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"
2568 #line 598 "src/parse.y"
2569 {yygotominor
.yy2
= sqlite3Expr(TK_ID
, 0, 0, &yymsp
[0].minor
.yy0
);}
2570 #line 2572 "src/parse.c"
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"
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"
2593 #line 616 "src/parse.y"
2594 {yygotominor
.yy2
= sqlite3RegisterExpr(pParse
, &yymsp
[0].minor
.yy0
);}
2595 #line 2597 "src/parse.c"
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"
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"
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"
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"
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"
2655 #line 655 "src/parse.y"
2656 {yygotominor
.yy438
.operator = yymsp
[0].minor
.yy0
; yygotominor
.yy438
.not = 0;}
2657 #line 2659 "src/parse.c"
2660 #line 656 "src/parse.y"
2661 {yygotominor
.yy438
.operator = yymsp
[0].minor
.yy0
; yygotominor
.yy438
.not = 1;}
2662 #line 2664 "src/parse.c"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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
;
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"
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"
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"
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"
2802 #line 752 "src/parse.y"
2804 Expr
*p
= yygotominor
.yy2
= sqlite3Expr(TK_EXISTS
, 0, 0, 0);
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"
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"
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"
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"
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"
2849 #line 806 "src/parse.y"
2850 {yygotominor
.yy412
= OE_Abort
;}
2851 #line 2853 "src/parse.c"
2854 #line 807 "src/parse.y"
2855 {yygotominor
.yy412
= OE_None
;}
2856 #line 2858 "src/parse.c"
2859 #line 817 "src/parse.y"
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"
2871 #line 825 "src/parse.y"
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"
2883 #line 838 "src/parse.y"
2884 {sqlite3DropIndex(pParse
, yymsp
[0].minor
.yy67
);}
2885 #line 2887 "src/parse.c"
2889 #line 842 "src/parse.y"
2890 {sqlite3Vacuum(pParse
,0);}
2891 #line 2893 "src/parse.c"
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"
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"
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"
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"
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"
2922 #line 868 "src/parse.y"
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"
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"
2941 #line 883 "src/parse.y"
2942 { yygotominor
.yy412
= TK_BEFORE
; }
2943 #line 2945 "src/parse.c"
2946 #line 884 "src/parse.y"
2947 { yygotominor
.yy412
= TK_AFTER
; }
2948 #line 2950 "src/parse.c"
2951 #line 885 "src/parse.y"
2952 { yygotominor
.yy412
= TK_INSTEAD
;}
2953 #line 2955 "src/parse.c"
2958 #line 890 "src/parse.y"
2959 {yygotominor
.yy210
.a
= yymsp
[0].major
; yygotominor
.yy210
.b
= 0;}
2960 #line 2962 "src/parse.c"
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"
2969 #line 896 "src/parse.y"
2970 { yygotominor
.yy412
= TK_ROW
; }
2971 #line 2973 "src/parse.c"
2974 #line 898 "src/parse.y"
2975 { yygotominor
.yy412
= TK_STATEMENT
; }
2976 #line 2978 "src/parse.c"
2979 #line 901 "src/parse.y"
2980 { yygotominor
.yy2
= 0; }
2981 #line 2983 "src/parse.c"
2984 #line 902 "src/parse.y"
2985 { yygotominor
.yy2
= yymsp
[0].minor
.yy2
; }
2986 #line 2988 "src/parse.c"
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"
2997 #line 910 "src/parse.y"
2998 { yygotominor
.yy347
= 0; }
2999 #line 3001 "src/parse.c"
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"
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"
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"
3017 #line 928 "src/parse.y"
3018 {yygotominor
.yy347
= sqlite3TriggerDeleteStep(&yymsp
[-1].minor
.yy258
, yymsp
[0].minor
.yy2
);}
3019 #line 3021 "src/parse.c"
3022 #line 931 "src/parse.y"
3023 {yygotominor
.yy347
= sqlite3TriggerSelectStep(yymsp
[0].minor
.yy459
); }
3024 #line 3026 "src/parse.c"
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"
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"
3045 #line 947 "src/parse.y"
3046 {yygotominor
.yy412
= OE_Rollback
;}
3047 #line 3049 "src/parse.c"
3050 #line 949 "src/parse.y"
3051 {yygotominor
.yy412
= OE_Fail
;}
3052 #line 3054 "src/parse.c"
3055 #line 954 "src/parse.y"
3057 sqlite3DropTrigger(pParse
,yymsp
[0].minor
.yy67
);
3059 #line 3061 "src/parse.c"
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"
3069 #line 964 "src/parse.y"
3070 { yygotominor
.yy132
.type
= 0; }
3071 #line 3073 "src/parse.c"
3074 #line 965 "src/parse.y"
3075 { yygotominor
.yy132
.type
=1; yygotominor
.yy132
.key
= yymsp
[0].minor
.yy258
; }
3076 #line 3078 "src/parse.c"
3079 #line 966 "src/parse.y"
3080 { yygotominor
.yy132
.type
=2; yygotominor
.yy132
.key
= yymsp
[0].minor
.yy0
; }
3081 #line 3083 "src/parse.c"
3084 #line 972 "src/parse.y"
3086 sqlite3Detach(pParse
, &yymsp
[0].minor
.yy258
);
3088 #line 3090 "src/parse.c"
3091 #line 978 "src/parse.y"
3092 {sqlite3Reindex(pParse
, 0, 0);}
3093 #line 3095 "src/parse.c"
3096 #line 979 "src/parse.y"
3097 {sqlite3Reindex(pParse
, &yymsp
[-1].minor
.yy258
, &yymsp
[0].minor
.yy258
);}
3098 #line 3100 "src/parse.c"
3101 #line 984 "src/parse.y"
3103 sqlite3AlterRenameTable(pParse
,yymsp
[-3].minor
.yy67
,&yymsp
[0].minor
.yy258
);
3105 #line 3107 "src/parse.c"
3108 #line 987 "src/parse.y"
3110 sqlite3AlterFinishAddColumn(pParse
, &yymsp
[0].minor
.yy258
);
3112 #line 3114 "src/parse.c"
3115 #line 990 "src/parse.y"
3117 sqlite3AlterBeginAddColumn(pParse
, yymsp
[0].minor
.yy67
);
3119 #line 3121 "src/parse.c"
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
){
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. */
3135 yymsp
->stateno
= yyact
;
3136 yymsp
->major
= yygoto
;
3137 yymsp
->minor
= yygotominor
;
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
;
3157 fprintf(yyTraceFILE
,"%sFail!\n",yyTracePrompt
);
3160 while( yypParser
->yyidx
>=0 ) yy_pop_parser_stack(yypParser
);
3161 /* Here code is inserted which will be executed whenever the
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 ){
3180 sqlite3ErrorMsg(pParse
, "near \"%T\": syntax error", &TOKEN
);
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
;
3198 fprintf(yyTraceFILE
,"%sAccept!\n",yyTracePrompt
);
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.
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.
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
;
3253 fprintf(yyTraceFILE
,"%sInput %s\n",yyTracePrompt
,yyTokenName
[yymajor
]);
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 ){
3267 }else if( yyact
< YYNSTATE
+ YYNRULE
){
3268 yy_reduce(yypParser
,yyact
-YYNSTATE
);
3269 }else if( yyact
== YY_ERROR_ACTION
){
3273 fprintf(yyTraceFILE
,"%sSyntax Error!\n",yyTracePrompt
);
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
){
3303 fprintf(yyTraceFILE
,"%sDiscard input token %s\n",
3304 yyTracePrompt
,yyTokenName
[yymajor
]);
3307 yy_destructor(yymajor
,&yyminorunion
);
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
);
3321 }else if( yymx
!=YYERRORSYMBOL
){
3324 yy_shift(yypParser
,yyact
,YYERRORSYMBOL
,&u2
);
3327 yypParser
->yyerrcnt
= 3;
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
);
3345 yy_parse_failed(yypParser
);
3350 yy_accept(yypParser
);
3353 }while( yymajor
!=YYNOCODE
&& yypParser
->yyidx
>=0 );