1 #line 2 "llsphinxql.c"
2
3 #line 4 "llsphinxql.c"
4
5 #define YY_INT_ALIGNED short int
6
7 /* A lexical scanner generated by flex */
8
9 #define FLEX_SCANNER
10 #define YY_FLEX_MAJOR_VERSION 2
11 #define YY_FLEX_MINOR_VERSION 5
12 #define YY_FLEX_SUBMINOR_VERSION 35
13 #if YY_FLEX_SUBMINOR_VERSION > 0
14 #define FLEX_BETA
15 #endif
16
17 /* First, we deal with platform-specific or compiler-specific issues. */
18
19 /* begin standard C headers. */
20 #include <stdio.h>
21 #include <string.h>
22 #include <errno.h>
23 #include <stdlib.h>
24
25 /* end standard C headers. */
26
27 /* flex integer type definitions */
28
29 #ifndef FLEXINT_H
30 #define FLEXINT_H
31
32 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33
34 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
35
36 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
37 * if you want the limit (max/min) macros for int types.
38 */
39 #ifndef __STDC_LIMIT_MACROS
40 #define __STDC_LIMIT_MACROS 1
41 #endif
42
43 #include <inttypes.h>
44 typedef int8_t flex_int8_t;
45 typedef uint8_t flex_uint8_t;
46 typedef int16_t flex_int16_t;
47 typedef uint16_t flex_uint16_t;
48 typedef int32_t flex_int32_t;
49 typedef uint32_t flex_uint32_t;
50 #else
51 typedef signed char flex_int8_t;
52 typedef short int flex_int16_t;
53 typedef int flex_int32_t;
54 typedef unsigned char flex_uint8_t;
55 typedef unsigned short int flex_uint16_t;
56 typedef unsigned int flex_uint32_t;
57
58 /* Limits of integral types. */
59 #ifndef INT8_MIN
60 #define INT8_MIN (-128)
61 #endif
62 #ifndef INT16_MIN
63 #define INT16_MIN (-32767-1)
64 #endif
65 #ifndef INT32_MIN
66 #define INT32_MIN (-2147483647-1)
67 #endif
68 #ifndef INT8_MAX
69 #define INT8_MAX (127)
70 #endif
71 #ifndef INT16_MAX
72 #define INT16_MAX (32767)
73 #endif
74 #ifndef INT32_MAX
75 #define INT32_MAX (2147483647)
76 #endif
77 #ifndef UINT8_MAX
78 #define UINT8_MAX (255U)
79 #endif
80 #ifndef UINT16_MAX
81 #define UINT16_MAX (65535U)
82 #endif
83 #ifndef UINT32_MAX
84 #define UINT32_MAX (4294967295U)
85 #endif
86
87 #endif /* ! C99 */
88
89 #endif /* ! FLEXINT_H */
90
91 #ifdef __cplusplus
92
93 /* The "const" storage-class-modifier is valid. */
94 #define YY_USE_CONST
95
96 #else /* ! __cplusplus */
97
98 /* C99 requires __STDC__ to be defined as 1. */
99 #if defined (__STDC__)
100
101 #define YY_USE_CONST
102
103 #endif /* defined (__STDC__) */
104 #endif /* ! __cplusplus */
105
106 #ifdef YY_USE_CONST
107 #define yyconst const
108 #else
109 #define yyconst
110 #endif
111
112 /* Returned upon end-of-file. */
113 #define YY_NULL 0
114
115 /* Promotes a possibly negative, possibly signed char to an unsigned
116 * integer for use as an array index. If the signed char is negative,
117 * we want to instead treat it as an 8-bit unsigned char, hence the
118 * double cast.
119 */
120 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
121
122 /* An opaque pointer. */
123 #ifndef YY_TYPEDEF_YY_SCANNER_T
124 #define YY_TYPEDEF_YY_SCANNER_T
125 typedef void* yyscan_t;
126 #endif
127
128 /* For convenience, these vars (plus the bison vars far below)
129 are macros in the reentrant scanner. */
130 #define yyin yyg->yyin_r
131 #define yyout yyg->yyout_r
132 #define yyextra yyg->yyextra_r
133 #define yyleng yyg->yyleng_r
134 #define yytext yyg->yytext_r
135 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
136 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
137 #define yy_flex_debug yyg->yy_flex_debug_r
138
139 /* Enter a start condition. This macro really ought to take a parameter,
140 * but we do it the disgusting crufty way forced on us by the ()-less
141 * definition of BEGIN.
142 */
143 #define BEGIN yyg->yy_start = 1 + 2 *
144
145 /* Translate the current start state into a value that can be later handed
146 * to BEGIN to return to the state. The YYSTATE alias is for lex
147 * compatibility.
148 */
149 #define YY_START ((yyg->yy_start - 1) / 2)
150 #define YYSTATE YY_START
151
152 /* Action number for EOF rule of a given start state. */
153 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
154
155 /* Special action meaning "start processing a new file". */
156 #define YY_NEW_FILE yyrestart(yyin ,yyscanner )
157
158 #define YY_END_OF_BUFFER_CHAR 0
159
160 /* Size of default input buffer. */
161 #ifndef YY_BUF_SIZE
162 #ifdef __ia64__
163 /* On IA-64, the buffer size is 16k, not 8k.
164 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
165 * Ditto for the __ia64__ case accordingly.
166 */
167 #define YY_BUF_SIZE 32768
168 #else
169 #define YY_BUF_SIZE 16384
170 #endif /* __ia64__ */
171 #endif
172
173 /* The state buf must be large enough to hold one state per character in the main buffer.
174 */
175 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
176
177 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
178 #define YY_TYPEDEF_YY_BUFFER_STATE
179 typedef struct yy_buffer_state *YY_BUFFER_STATE;
180 #endif
181
182 #define EOB_ACT_CONTINUE_SCAN 0
183 #define EOB_ACT_END_OF_FILE 1
184 #define EOB_ACT_LAST_MATCH 2
185
186 #define YY_LESS_LINENO(n)
187
188 /* Return all but the first "n" matched characters back to the input stream. */
189 #define yyless(n) \
190 do \
191 { \
192 /* Undo effects of setting up yytext. */ \
193 int yyless_macro_arg = (n); \
194 YY_LESS_LINENO(yyless_macro_arg);\
195 *yy_cp = yyg->yy_hold_char; \
196 YY_RESTORE_YY_MORE_OFFSET \
197 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
198 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
199 } \
200 while ( 0 )
201
202 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
203
204 #ifndef YY_TYPEDEF_YY_SIZE_T
205 #define YY_TYPEDEF_YY_SIZE_T
206 typedef size_t yy_size_t;
207 #endif
208
209 #ifndef YY_STRUCT_YY_BUFFER_STATE
210 #define YY_STRUCT_YY_BUFFER_STATE
211 struct yy_buffer_state
212 {
213 FILE *yy_input_file;
214
215 char *yy_ch_buf; /* input buffer */
216 char *yy_buf_pos; /* current position in input buffer */
217
218 /* Size of input buffer in bytes, not including room for EOB
219 * characters.
220 */
221 yy_size_t yy_buf_size;
222
223 /* Number of characters read into yy_ch_buf, not including EOB
224 * characters.
225 */
226 int yy_n_chars;
227
228 /* Whether we "own" the buffer - i.e., we know we created it,
229 * and can realloc() it to grow it, and should free() it to
230 * delete it.
231 */
232 int yy_is_our_buffer;
233
234 /* Whether this is an "interactive" input source; if so, and
235 * if we're using stdio for input, then we want to use getc()
236 * instead of fread(), to make sure we stop fetching input after
237 * each newline.
238 */
239 int yy_is_interactive;
240
241 /* Whether we're considered to be at the beginning of a line.
242 * If so, '^' rules will be active on the next match, otherwise
243 * not.
244 */
245 int yy_at_bol;
246
247 int yy_bs_lineno; /**< The line count. */
248 int yy_bs_column; /**< The column count. */
249
250 /* Whether to try to fill the input buffer when we reach the
251 * end of it.
252 */
253 int yy_fill_buffer;
254
255 int yy_buffer_status;
256
257 #define YY_BUFFER_NEW 0
258 #define YY_BUFFER_NORMAL 1
259 /* When an EOF's been seen but there's still some text to process
260 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
261 * shouldn't try reading from the input source any more. We might
262 * still have a bunch of tokens to match, though, because of
263 * possible backing-up.
264 *
265 * When we actually see the EOF, we change the status to "new"
266 * (via yyrestart()), so that the user can continue scanning by
267 * just pointing yyin at a new input file.
268 */
269 #define YY_BUFFER_EOF_PENDING 2
270
271 };
272 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
273
274 /* We provide macros for accessing buffer states in case in the
275 * future we want to put the buffer states in a more general
276 * "scanner state".
277 *
278 * Returns the top of the stack, or NULL.
279 */
280 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
281 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
282 : NULL)
283
284 /* Same as previous macro, but useful when we know that the buffer stack is not
285 * NULL or when we need an lvalue. For internal use only.
286 */
287 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
288
289 void yyrestart (FILE *input_file ,yyscan_t yyscanner );
290 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
291 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
292 void yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
293 void yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
294 void yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
295 void yypop_buffer_state (yyscan_t yyscanner );
296
297 static void yyensure_buffer_stack (yyscan_t yyscanner );
298 static void yy_load_buffer_state (yyscan_t yyscanner );
299 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
300
301 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
302
303 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
304 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
305 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
306
307 void *yyalloc (yy_size_t ,yyscan_t yyscanner );
308 void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
309 void yyfree (void * ,yyscan_t yyscanner );
310
311 #define yy_new_buffer yy_create_buffer
312
313 #define yy_set_interactive(is_interactive) \
314 { \
315 if ( ! YY_CURRENT_BUFFER ){ \
316 yyensure_buffer_stack (yyscanner); \
317 YY_CURRENT_BUFFER_LVALUE = \
318 yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
319 } \
320 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
321 }
322
323 #define yy_set_bol(at_bol) \
324 { \
325 if ( ! YY_CURRENT_BUFFER ){\
326 yyensure_buffer_stack (yyscanner); \
327 YY_CURRENT_BUFFER_LVALUE = \
328 yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
329 } \
330 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
331 }
332
333 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
334
335 /* Begin user sect3 */
336
337 #define yywrap(n) 1
338 #define YY_SKIP_YYWRAP
339
340 typedef unsigned char YY_CHAR;
341
342 typedef int yy_state_type;
343
344 #define yytext_ptr yytext_r
345
346 static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
347 static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
348 static int yy_get_next_buffer (yyscan_t yyscanner );
349 static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
350
351 /* Done after the current pattern has been matched and before the
352 * corresponding action - sets up yytext.
353 */
354 #define YY_DO_BEFORE_ACTION \
355 yyg->yytext_ptr = yy_bp; \
356 yyleng = (size_t) (yy_cp - yy_bp); \
357 yyg->yy_hold_char = *yy_cp; \
358 *yy_cp = '\0'; \
359 yyg->yy_c_buf_p = yy_cp;
360
361 #define YY_NUM_RULES 99
362 #define YY_END_OF_BUFFER 100
363 /* This struct is not used in this scanner,
364 but its presence is necessary. */
365 struct yy_trans_info
366 {
367 flex_int32_t yy_verify;
368 flex_int32_t yy_nxt;
369 };
370 static yyconst flex_int16_t yy_accept[383] =
371 { 0,
372 0, 0, 0, 0, 100, 98, 97, 97, 98, 98,
373 86, 98, 87, 98, 98, 98, 98, 91, 91, 91,
374 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
375 91, 91, 91, 91, 91, 98, 2, 99, 2, 97,
376 80, 0, 85, 0, 86, 1, 86, 87, 92, 84,
377 82, 81, 83, 0, 93, 93, 93, 93, 91, 91,
378 5, 91, 91, 91, 91, 12, 91, 91, 91, 91,
379 91, 91, 91, 91, 91, 91, 91, 91, 32, 33,
380 91, 91, 91, 91, 91, 91, 91, 91, 91, 91,
381 91, 50, 91, 91, 91, 91, 91, 91, 91, 91,
382
383 91, 91, 69, 91, 91, 91, 91, 91, 91, 91,
384 91, 0, 0, 3, 0, 94, 93, 93, 88, 93,
385 4, 6, 91, 8, 91, 91, 91, 91, 91, 91,
386 91, 91, 91, 91, 91, 23, 91, 91, 91, 91,
387 91, 91, 91, 91, 91, 91, 36, 91, 91, 91,
388 91, 42, 91, 44, 45, 91, 47, 91, 91, 91,
389 91, 91, 91, 91, 91, 91, 91, 91, 91, 61,
390 91, 91, 91, 67, 91, 91, 91, 91, 91, 91,
391 91, 91, 91, 91, 91, 0, 96, 0, 94, 93,
392 93, 91, 91, 91, 91, 13, 91, 91, 91, 91,
393
394 91, 20, 91, 24, 91, 91, 91, 28, 91, 91,
395 91, 91, 91, 37, 91, 91, 91, 91, 43, 91,
396 48, 91, 91, 52, 53, 91, 91, 91, 91, 91,
397 91, 91, 91, 63, 91, 91, 91, 91, 91, 71,
398 91, 91, 91, 91, 91, 91, 91, 91, 95, 93,
399 93, 91, 9, 91, 91, 91, 91, 17, 91, 91,
400 91, 91, 25, 26, 27, 91, 91, 31, 34, 91,
401 91, 39, 40, 41, 46, 91, 51, 91, 91, 91,
402 91, 91, 91, 91, 91, 91, 65, 91, 91, 91,
403 91, 91, 91, 91, 91, 91, 78, 91, 90, 93,
404
405 7, 91, 11, 91, 15, 18, 19, 91, 91, 91,
406 30, 35, 91, 49, 91, 91, 91, 91, 91, 59,
407 91, 91, 64, 66, 68, 91, 91, 73, 74, 91,
408 91, 77, 79, 89, 10, 91, 91, 91, 91, 91,
409 91, 91, 55, 56, 91, 58, 91, 62, 91, 91,
410 91, 91, 91, 91, 21, 22, 29, 91, 91, 57,
411 91, 91, 91, 91, 76, 14, 16, 38, 91, 91,
412 91, 91, 75, 54, 91, 91, 91, 91, 70, 72,
413 60, 0
414 } ;
415
416 static yyconst flex_int32_t yy_ec[256] =
417 { 0,
418 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
419 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
420 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
421 1, 2, 4, 1, 1, 1, 1, 1, 5, 1,
422 1, 6, 1, 1, 1, 7, 8, 9, 9, 9,
423 9, 9, 9, 9, 9, 9, 9, 10, 1, 11,
424 12, 13, 1, 14, 15, 16, 17, 18, 19, 20,
425 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
426 24, 31, 32, 33, 34, 35, 36, 37, 38, 39,
427 1, 40, 1, 1, 24, 41, 42, 43, 44, 45,
428
429 46, 47, 48, 49, 50, 24, 51, 52, 53, 54,
430 55, 56, 24, 57, 58, 59, 60, 61, 62, 63,
431 64, 65, 1, 1, 1, 1, 1, 1, 1, 1,
432 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
433 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
434 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
435 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
436 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
437 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
438 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
439
440 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
441 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
442 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
443 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
444 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
445 1, 1, 1, 1, 1
446 } ;
447
448 static yyconst flex_int32_t yy_meta[66] =
449 { 0,
450 1, 1, 1, 1, 1, 1, 2, 1, 3, 1,
451 1, 1, 1, 4, 5, 5, 5, 5, 5, 5,
452 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
453 5, 5, 5, 5, 5, 5, 5, 5, 5, 1,
454 6, 5, 5, 5, 5, 5, 5, 5, 5, 5,
455 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
456 5, 5, 5, 5, 5
457 } ;
458
459 static yyconst flex_int16_t yy_base[393] =
460 { 0,
461 0, 0, 63, 64, 256, 794, 69, 71, 204, 63,
462 185, 173, 68, 166, 66, 164, 66, 53, 71, 77,
463 74, 0, 107, 73, 108, 77, 127, 129, 124, 128,
464 171, 157, 167, 76, 187, 125, 794, 794, 152, 149,
465 794, 163, 794, 73, 136, 794, 128, 75, 122, 794,
466 794, 794, 794, 0, 0, 110, 173, 173, 0, 180,
467 184, 152, 186, 194, 187, 0, 170, 212, 194, 215,
468 213, 195, 206, 215, 214, 223, 223, 225, 0, 250,
469 226, 224, 233, 229, 228, 235, 239, 249, 246, 264,
470 258, 275, 268, 282, 273, 271, 297, 271, 273, 289,
471
472 279, 291, 0, 303, 296, 301, 313, 279, 310, 316,
473 309, 74, 330, 794, 338, 0, 0, 313, 0, 327,
474 0, 0, 337, 0, 330, 321, 335, 335, 338, 339,
475 339, 344, 350, 355, 341, 0, 346, 349, 367, 352,
476 361, 372, 375, 360, 376, 378, 372, 377, 379, 381,
477 388, 0, 391, 0, 0, 389, 0, 385, 389, 394,
478 397, 399, 400, 387, 397, 400, 411, 411, 404, 0,
479 402, 426, 412, 0, 422, 422, 432, 424, 440, 424,
480 433, 431, 439, 432, 443, 60, 794, 57, 0, 439,
481 449, 455, 447, 454, 449, 0, 465, 458, 453, 455,
482
483 457, 460, 471, 0, 476, 465, 474, 0, 469, 489,
484 476, 472, 479, 0, 496, 487, 482, 496, 0, 488,
485 0, 496, 495, 0, 0, 512, 514, 502, 514, 516,
486 520, 525, 519, 0, 517, 514, 514, 530, 521, 0,
487 528, 525, 531, 545, 539, 541, 546, 543, 794, 535,
488 549, 550, 0, 556, 545, 547, 549, 0, 564, 566,
489 563, 560, 0, 0, 0, 568, 569, 0, 0, 563,
490 564, 0, 0, 0, 0, 572, 0, 568, 586, 577,
491 592, 590, 578, 589, 587, 598, 0, 587, 588, 609,
492 601, 606, 597, 616, 607, 605, 0, 611, 0, 607,
493
494 0, 615, 0, 610, 614, 0, 0, 632, 632, 624,
495 0, 0, 627, 0, 641, 638, 630, 641, 626, 0,
496 644, 642, 0, 0, 0, 651, 648, 0, 0, 648,
497 651, 0, 0, 0, 0, 649, 661, 662, 653, 659,
498 661, 666, 0, 0, 666, 0, 653, 0, 660, 664,
499 682, 671, 677, 688, 0, 0, 0, 682, 685, 0,
500 699, 692, 687, 689, 0, 0, 0, 0, 703, 708,
501 697, 708, 0, 0, 704, 704, 716, 716, 0, 0,
502 0, 794, 762, 768, 773, 775, 778, 90, 82, 781,
503 784, 788
504
505 } ;
506
507 static yyconst flex_int16_t yy_def[393] =
508 { 0,
509 382, 1, 383, 383, 382, 382, 382, 382, 382, 384,
510 382, 382, 385, 382, 382, 382, 386, 387, 387, 387,
511 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
512 387, 387, 387, 387, 387, 388, 382, 382, 382, 382,
513 382, 384, 382, 384, 382, 382, 382, 385, 385, 382,
514 382, 382, 382, 389, 390, 390, 390, 390, 387, 387,
515 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
516 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
517 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
518 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
519
520 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
521 387, 391, 391, 382, 384, 392, 390, 390, 390, 390,
522 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
523 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
524 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
525 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
526 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
527 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
528 387, 387, 387, 387, 387, 391, 382, 391, 392, 390,
529 390, 387, 387, 387, 387, 387, 387, 387, 387, 387,
530
531 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
532 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
533 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
534 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
535 387, 387, 387, 387, 387, 387, 387, 387, 382, 390,
536 390, 387, 387, 387, 387, 387, 387, 387, 387, 387,
537 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
538 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
539 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
540 387, 387, 387, 387, 387, 387, 387, 387, 390, 390,
541
542 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
543 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
544 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
545 387, 387, 387, 390, 387, 387, 387, 387, 387, 387,
546 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
547 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
548 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
549 387, 387, 387, 387, 387, 387, 387, 387, 387, 387,
550 387, 0, 382, 382, 382, 382, 382, 382, 382, 382,
551 382, 382
552
553 } ;
554
555 static yyconst flex_int16_t yy_nxt[860] =
556 { 0,
557 6, 7, 8, 9, 10, 6, 11, 12, 13, 14,
558 15, 6, 16, 17, 18, 19, 20, 21, 22, 23,
559 24, 22, 25, 22, 22, 26, 27, 28, 29, 22,
560 30, 31, 32, 33, 34, 35, 22, 22, 22, 6,
561 36, 18, 19, 20, 21, 22, 23, 24, 22, 25,
562 22, 26, 27, 28, 29, 22, 30, 31, 32, 33,
563 34, 35, 22, 22, 22, 38, 38, 43, 39, 39,
564 40, 40, 40, 40, 47, 382, 48, 51, 52, 54,
565 60, 47, 56, 48, 61, 62, 116, 63, 57, 64,
566 107, 67, 70, 65, 112, 82, 71, 249, 77, 83,
567
568 187, 58, 44, 78, 72, 68, 60, 69, 66, 56,
569 61, 62, 115, 63, 187, 57, 64, 107, 67, 70,
570 65, 73, 82, 71, 77, 79, 83, 58, 382, 78,
571 72, 68, 74, 69, 66, 80, 45, 75, 118, 81,
572 76, 84, 93, 88, 45, 85, 94, 113, 73, 86,
573 40, 40, 79, 91, 92, 87, 95, 89, 74, 114,
574 96, 80, 90, 75, 118, 81, 76, 43, 84, 93,
575 88, 102, 85, 94, 113, 53, 86, 50, 46, 91,
576 92, 87, 95, 89, 123, 103, 96, 104, 90, 97,
577 119, 120, 98, 45, 105, 128, 106, 121, 102, 99,
578
579 122, 108, 44, 100, 101, 109, 124, 127, 110, 111,
580 123, 103, 132, 104, 125, 41, 97, 119, 120, 98,
581 105, 128, 106, 137, 121, 99, 126, 122, 108, 100,
582 101, 138, 109, 124, 127, 110, 111, 129, 130, 132,
583 133, 125, 141, 139, 135, 131, 134, 136, 140, 137,
584 142, 143, 126, 144, 148, 382, 155, 138, 149, 150,
585 153, 151, 154, 129, 130, 152, 133, 145, 141, 139,
586 135, 131, 134, 136, 140, 156, 142, 143, 157, 144,
587 148, 146, 147, 155, 149, 150, 153, 151, 154, 158,
588 159, 152, 160, 166, 145, 161, 162, 382, 165, 171,
589
590 172, 156, 382, 173, 157, 174, 175, 146, 147, 182,
591 382, 163, 178, 382, 164, 158, 159, 176, 179, 160,
592 166, 161, 167, 162, 165, 171, 172, 168, 169, 170,
593 173, 174, 183, 175, 184, 182, 177, 163, 180, 178,
594 164, 185, 43, 181, 176, 179, 190, 188, 167, 191,
595 382, 192, 193, 168, 169, 170, 194, 195, 200, 183,
596 196, 184, 177, 197, 180, 198, 199, 185, 201, 181,
597 187, 202, 190, 203, 188, 204, 191, 44, 192, 193,
598 205, 206, 194, 207, 195, 200, 196, 208, 209, 197,
599 210, 198, 199, 211, 212, 201, 213, 216, 202, 203,
600
601 214, 204, 215, 217, 218, 219, 205, 220, 206, 207,
602 221, 222, 223, 208, 224, 209, 225, 210, 226, 211,
603 228, 212, 229, 213, 216, 227, 214, 230, 215, 231,
604 217, 218, 219, 232, 220, 233, 221, 234, 222, 223,
605 235, 224, 236, 225, 237, 226, 228, 238, 229, 239,
606 240, 227, 241, 230, 242, 244, 231, 243, 245, 246,
607 232, 233, 247, 234, 248, 382, 250, 235, 236, 251,
608 237, 252, 254, 238, 253, 239, 255, 240, 241, 256,
609 257, 242, 244, 243, 245, 258, 246, 259, 247, 260,
610 261, 248, 250, 262, 263, 265, 251, 264, 252, 254,
611
612 253, 266, 255, 267, 382, 268, 256, 257, 269, 270,
613 271, 258, 272, 259, 273, 260, 261, 274, 382, 275,
614 262, 263, 265, 264, 276, 277, 278, 266, 279, 281,
615 267, 268, 280, 282, 269, 270, 283, 271, 272, 284,
616 273, 285, 382, 286, 274, 275, 287, 288, 289, 293,
617 276, 277, 290, 278, 291, 279, 281, 292, 280, 294,
618 282, 295, 296, 283, 297, 298, 284, 299, 285, 286,
619 300, 301, 287, 288, 302, 289, 293, 303, 290, 304,
620 291, 305, 306, 292, 307, 308, 294, 309, 295, 296,
621 310, 297, 298, 299, 311, 312, 313, 300, 301, 314,
622
623 315, 302, 316, 303, 317, 304, 318, 305, 319, 306,
624 320, 307, 308, 309, 321, 322, 323, 310, 324, 325,
625 311, 312, 313, 326, 328, 314, 315, 327, 329, 316,
626 317, 330, 336, 318, 331, 319, 320, 332, 333, 334,
627 321, 322, 335, 323, 324, 325, 337, 338, 339, 341,
628 326, 328, 340, 327, 329, 342, 343, 345, 330, 336,
629 331, 344, 346, 332, 333, 334, 347, 349, 335, 348,
630 350, 352, 337, 351, 338, 339, 341, 353, 340, 354,
631 355, 359, 342, 343, 345, 356, 357, 344, 346, 358,
632 360, 361, 362, 347, 349, 348, 363, 350, 352, 351,
633
634 364, 382, 365, 353, 366, 367, 354, 355, 359, 368,
635 369, 356, 357, 370, 371, 358, 360, 361, 362, 372,
636 373, 374, 363, 375, 382, 376, 377, 364, 365, 378,
637 366, 379, 367, 380, 381, 368, 369, 382, 382, 382,
638 370, 371, 382, 382, 382, 372, 373, 382, 374, 382,
639 375, 376, 382, 377, 382, 378, 382, 379, 382, 382,
640 380, 381, 37, 37, 37, 37, 37, 37, 42, 42,
641 42, 42, 42, 42, 49, 49, 382, 49, 55, 55,
642 59, 382, 59, 117, 382, 117, 186, 382, 186, 186,
643 189, 382, 189, 5, 382, 382, 382, 382, 382, 382,
644
645 382, 382, 382, 382, 382, 382, 382, 382, 382, 382,
646 382, 382, 382, 382, 382, 382, 382, 382, 382, 382,
647 382, 382, 382, 382, 382, 382, 382, 382, 382, 382,
648 382, 382, 382, 382, 382, 382, 382, 382, 382, 382,
649 382, 382, 382, 382, 382, 382, 382, 382, 382, 382,
650 382, 382, 382, 382, 382, 382, 382, 382, 382
651 } ;
652
653 static yyconst flex_int16_t yy_chk[860] =
654 { 0,
655 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
656 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
657 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
658 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
659 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
660 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
661 1, 1, 1, 1, 1, 3, 4, 10, 3, 4,
662 7, 7, 8, 8, 13, 44, 13, 15, 15, 17,
663 18, 48, 17, 48, 18, 18, 389, 18, 17, 19,
664 34, 20, 21, 19, 388, 26, 21, 188, 24, 26,
665
666 186, 17, 10, 24, 21, 20, 18, 20, 19, 17,
667 18, 18, 44, 18, 112, 17, 19, 34, 20, 21,
668 19, 23, 26, 21, 24, 25, 26, 17, 49, 24,
669 21, 20, 23, 20, 19, 25, 47, 23, 56, 25,
670 23, 27, 30, 28, 45, 27, 30, 36, 23, 27,
671 40, 40, 25, 29, 29, 27, 30, 28, 23, 39,
672 30, 25, 28, 23, 56, 25, 23, 42, 27, 30,
673 28, 32, 27, 30, 36, 16, 27, 14, 12, 29,
674 29, 27, 30, 28, 62, 32, 30, 32, 28, 31,
675 57, 58, 31, 11, 33, 67, 33, 60, 32, 31,
676
677 61, 35, 42, 31, 31, 35, 63, 65, 35, 35,
678 62, 32, 69, 32, 64, 9, 31, 57, 58, 31,
679 33, 67, 33, 72, 60, 31, 64, 61, 35, 31,
680 31, 73, 35, 63, 65, 35, 35, 68, 68, 69,
681 70, 64, 75, 74, 71, 68, 70, 71, 74, 72,
682 76, 77, 64, 78, 81, 5, 87, 73, 82, 83,
683 85, 84, 86, 68, 68, 84, 70, 80, 75, 74,
684 71, 68, 70, 71, 74, 88, 76, 77, 89, 78,
685 81, 80, 80, 87, 82, 83, 85, 84, 86, 90,
686 91, 84, 92, 96, 80, 93, 94, 0, 95, 98,
687
688 99, 88, 0, 100, 89, 101, 102, 80, 80, 108,
689 0, 94, 105, 0, 94, 90, 91, 104, 106, 92,
690 96, 93, 97, 94, 95, 98, 99, 97, 97, 97,
691 100, 101, 109, 102, 110, 108, 104, 94, 107, 105,
692 94, 111, 115, 107, 104, 106, 118, 113, 97, 120,
693 0, 123, 125, 97, 97, 97, 126, 127, 132, 109,
694 128, 110, 104, 129, 107, 130, 131, 111, 133, 107,
695 113, 134, 118, 135, 113, 137, 120, 115, 123, 125,
696 138, 139, 126, 140, 127, 132, 128, 141, 142, 129,
697 143, 130, 131, 144, 145, 133, 146, 149, 134, 135,
698
699 147, 137, 148, 150, 151, 153, 138, 156, 139, 140,
700 158, 159, 160, 141, 161, 142, 162, 143, 163, 144,
701 164, 145, 165, 146, 149, 163, 147, 166, 148, 167,
702 150, 151, 153, 168, 156, 169, 158, 171, 159, 160,
703 172, 161, 173, 162, 173, 163, 164, 175, 165, 176,
704 177, 163, 178, 166, 179, 181, 167, 180, 182, 183,
705 168, 169, 184, 171, 185, 0, 190, 172, 173, 191,
706 173, 192, 194, 175, 193, 176, 195, 177, 178, 197,
707 198, 179, 181, 180, 182, 199, 183, 200, 184, 201,
708 202, 185, 190, 203, 205, 207, 191, 206, 192, 194,
709
710 193, 209, 195, 210, 0, 211, 197, 198, 212, 213,
711 215, 199, 216, 200, 217, 201, 202, 218, 0, 220,
712 203, 205, 207, 206, 222, 223, 226, 209, 227, 229,
713 210, 211, 228, 230, 212, 213, 231, 215, 216, 232,
714 217, 233, 0, 235, 218, 220, 236, 237, 238, 243,
715 222, 223, 239, 226, 241, 227, 229, 242, 228, 244,
716 230, 245, 246, 231, 247, 248, 232, 250, 233, 235,
717 251, 252, 236, 237, 254, 238, 243, 255, 239, 256,
718 241, 257, 259, 242, 260, 261, 244, 262, 245, 246,
719 266, 247, 248, 250, 267, 270, 271, 251, 252, 276,
720
721 278, 254, 279, 255, 280, 256, 281, 257, 282, 259,
722 283, 260, 261, 262, 284, 285, 286, 266, 288, 289,
723 267, 270, 271, 290, 292, 276, 278, 291, 293, 279,
724 280, 294, 304, 281, 295, 282, 283, 296, 298, 300,
725 284, 285, 302, 286, 288, 289, 305, 308, 309, 313,
726 290, 292, 310, 291, 293, 315, 316, 318, 294, 304,
727 295, 317, 319, 296, 298, 300, 321, 326, 302, 322,
728 327, 331, 305, 330, 308, 309, 313, 336, 310, 337,
729 338, 342, 315, 316, 318, 339, 340, 317, 319, 341,
730 345, 347, 349, 321, 326, 322, 350, 327, 331, 330,
731
732 351, 0, 352, 336, 353, 354, 337, 338, 342, 358,
733 359, 339, 340, 361, 362, 341, 345, 347, 349, 363,
734 364, 369, 350, 370, 0, 371, 372, 351, 352, 375,
735 353, 376, 354, 377, 378, 358, 359, 0, 0, 0,
736 361, 362, 0, 0, 0, 363, 364, 0, 369, 0,
737 370, 371, 0, 372, 0, 375, 0, 376, 0, 0,
738 377, 378, 383, 383, 383, 383, 383, 383, 384, 384,
739 384, 384, 384, 384, 385, 385, 0, 385, 386, 386,
740 387, 0, 387, 390, 0, 390, 391, 0, 391, 391,
741 392, 0, 392, 382, 382, 382, 382, 382, 382, 382,
742
743 382, 382, 382, 382, 382, 382, 382, 382, 382, 382,
744 382, 382, 382, 382, 382, 382, 382, 382, 382, 382,
745 382, 382, 382, 382, 382, 382, 382, 382, 382, 382,
746 382, 382, 382, 382, 382, 382, 382, 382, 382, 382,
747 382, 382, 382, 382, 382, 382, 382, 382, 382, 382,
748 382, 382, 382, 382, 382, 382, 382, 382, 382
749 } ;
750
751 /* The intent behind this definition is that it'll catch
752 * any uses of REJECT which flex missed.
753 */
754 #define REJECT reject_used_but_not_detected
755 #define yymore() yymore_used_but_not_detected
756 #define YY_MORE_ADJ 0
757 #define YY_RESTORE_YY_MORE_OFFSET
758 #line 1 "sphinxql.l"
759 #line 2 "sphinxql.l"
760 #include "yysphinxql.h"
761
762 #if USE_WINDOWS
763 #pragma warning(push,1)
764 #endif
765
766 // warning, lexer generator dependent!
767 // this macro relies on that in flex yytext points to the actual location in the buffer
768 #define YYSTOREBOUNDS \
769 { \
770 lvalp->m_iStart = yytext - pParser->m_pBuf; \
771 lvalp->m_iEnd = lvalp->m_iStart + yyleng; \
772 pParser->m_pLastTokenStart = yytext; \
773 }
774
775
776 #line 770 "llsphinxql.c"
777
778 #define INITIAL 0
779 #define ccomment 1
780
781 #ifndef YY_NO_UNISTD_H
782 /* Special case for "unistd.h", since it is non-ANSI. We include it way
783 * down here because we want the user's section 1 to have been scanned first.
784 * The user has a chance to override it with an option.
785 */
786 #if !USE_WINDOWS
787 #include <unistd.h>
788 #endif
789 #endif
790
791 #ifndef YY_EXTRA_TYPE
792 #define YY_EXTRA_TYPE void *
793 #endif
794
795 /* Holds the entire state of the reentrant scanner. */
796 struct yyguts_t
797 {
798
799 /* User-defined. Not touched by flex. */
800 YY_EXTRA_TYPE yyextra_r;
801
802 /* The rest are the same as the globals declared in the non-reentrant scanner. */
803 FILE *yyin_r, *yyout_r;
804 size_t yy_buffer_stack_top; /**< index of top of stack. */
805 size_t yy_buffer_stack_max; /**< capacity of stack. */
806 YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
807 char yy_hold_char;
808 int yy_n_chars;
809 int yyleng_r;
810 char *yy_c_buf_p;
811 int yy_init;
812 int yy_start;
813 int yy_did_buffer_switch_on_eof;
814 int yy_start_stack_ptr;
815 int yy_start_stack_depth;
816 int *yy_start_stack;
817 yy_state_type yy_last_accepting_state;
818 char* yy_last_accepting_cpos;
819
820 int yylineno_r;
821 int yy_flex_debug_r;
822
823 char *yytext_r;
824 int yy_more_flag;
825 int yy_more_len;
826
827 }; /* end struct yyguts_t */
828
829 static int yy_init_globals (yyscan_t yyscanner );
830
831 int yylex_init (yyscan_t* scanner);
832
833 int yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
834
835 /* Accessor methods to globals.
836 These are made visible to non-reentrant scanners for convenience. */
837
838 int yylex_destroy (yyscan_t yyscanner );
839
840 int yyget_debug (yyscan_t yyscanner );
841
842 void yyset_debug (int debug_flag ,yyscan_t yyscanner );
843
844 YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner );
845
846 void yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
847
848 FILE *yyget_in (yyscan_t yyscanner );
849
850 void yyset_in (FILE * in_str ,yyscan_t yyscanner );
851
852 FILE *yyget_out (yyscan_t yyscanner );
853
854 void yyset_out (FILE * out_str ,yyscan_t yyscanner );
855
856 int yyget_leng (yyscan_t yyscanner );
857
858 char *yyget_text (yyscan_t yyscanner );
859
860 int yyget_lineno (yyscan_t yyscanner );
861
862 void yyset_lineno (int line_number ,yyscan_t yyscanner );
863
864 /* Macros after this point can all be overridden by user definitions in
865 * section 1.
866 */
867
868 #ifndef YY_SKIP_YYWRAP
869 #ifdef __cplusplus
870 extern "C" int yywrap (yyscan_t yyscanner );
871 #else
872 extern int yywrap (yyscan_t yyscanner );
873 #endif
874 #endif
875
876 #ifndef yytext_ptr
877 static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
878 #endif
879
880 #ifdef YY_NEED_STRLEN
881 static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
882 #endif
883
884 #ifndef YY_NO_INPUT
885
886 #ifdef __cplusplus
887 static int yyinput (yyscan_t yyscanner );
888 #else
889 static int input (yyscan_t yyscanner );
890 #endif
891
892 #endif
893
894 /* Amount of stuff to slurp up with each read. */
895 #ifndef YY_READ_BUF_SIZE
896 #ifdef __ia64__
897 /* On IA-64, the buffer size is 16k, not 8k */
898 #define YY_READ_BUF_SIZE 16384
899 #else
900 #define YY_READ_BUF_SIZE 8192
901 #endif /* __ia64__ */
902 #endif
903
904 /* Copy whatever the last rule matched to the standard output. */
905 #ifndef ECHO
906 /* This used to be an fputs(), but since the string might contain NUL's,
907 * we now use fwrite().
908 */
909 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
910 #endif
911
912 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
913 * is returned in "result".
914 */
915 #ifndef YY_INPUT
916 #define YY_INPUT(buf,result,max_size) \
917 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
918 { \
919 int c = '*'; \
920 size_t n; \
921 for ( n = 0; n < max_size && \
922 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
923 buf[n] = (char) c; \
924 if ( c == '\n' ) \
925 buf[n++] = (char) c; \
926 if ( c == EOF && ferror( yyin ) ) \
927 YY_FATAL_ERROR( "input in flex scanner failed" ); \
928 result = n; \
929 } \
930 else \
931 { \
932 errno=0; \
933 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
934 { \
935 if( errno != EINTR) \
936 { \
937 YY_FATAL_ERROR( "input in flex scanner failed" ); \
938 break; \
939 } \
940 errno=0; \
941 clearerr(yyin); \
942 } \
943 }\
944 \
945
946 #endif
947
948 /* No semi-colon after return; correct usage is to write "yyterminate();" -
949 * we don't want an extra ';' after the "return" because that will cause
950 * some compilers to complain about unreachable statements.
951 */
952 #ifndef yyterminate
953 #define yyterminate() return YY_NULL
954 #endif
955
956 /* Number of entries by which start-condition stack grows. */
957 #ifndef YY_START_STACK_INCR
958 #define YY_START_STACK_INCR 25
959 #endif
960
961 /* Report a fatal error. */
962 #ifndef YY_FATAL_ERROR
963 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
964 #endif
965
966 /* end tables serialization structures and prototypes */
967
968 /* Default declaration of generated scanner - a define so the user can
969 * easily add parameters.
970 */
971 #ifndef YY_DECL
972 #define YY_DECL_IS_OURS 1
973
974 extern int yylex (yyscan_t yyscanner);
975
976 #define YY_DECL int yylex (yyscan_t yyscanner)
977 #endif /* !YY_DECL */
978
979 /* Code executed at the beginning of each rule, after yytext and yyleng
980 * have been set up.
981 */
982 #ifndef YY_USER_ACTION
983 #define YY_USER_ACTION
984 #endif
985
986 /* Code executed at the end of each rule. */
987 #ifndef YY_BREAK
988 #define YY_BREAK break;
989 #endif
990
991 #define YY_RULE_SETUP \
992 YY_USER_ACTION
993
994 /** The main scanner function which does all the work.
995 */
996 YY_DECL
997 {
998 register yy_state_type yy_current_state;
999 register char *yy_cp, *yy_bp;
1000 register int yy_act;
1001 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1002
1003 #line 29 "sphinxql.l"
1004
1005
1006 #line 998 "llsphinxql.c"
1007
1008 if ( !yyg->yy_init )
1009 {
1010 yyg->yy_init = 1;
1011
1012 #ifdef YY_USER_INIT
1013 YY_USER_INIT;
1014 #endif
1015
1016 if ( ! yyg->yy_start )
1017 yyg->yy_start = 1; /* first start state */
1018
1019 if ( ! yyin )
1020 yyin = stdin;
1021
1022 if ( ! yyout )
1023 yyout = stdout;
1024
1025 if ( ! YY_CURRENT_BUFFER ) {
1026 yyensure_buffer_stack (yyscanner);
1027 YY_CURRENT_BUFFER_LVALUE =
1028 yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1029 }
1030
1031 yy_load_buffer_state(yyscanner );
1032 }
1033
1034 while ( 1 ) /* loops until end-of-file is reached */
1035 {
1036 yy_cp = yyg->yy_c_buf_p;
1037
1038 /* Support of yytext. */
1039 *yy_cp = yyg->yy_hold_char;
1040
1041 /* yy_bp points to the position in yy_ch_buf of the start of
1042 * the current run.
1043 */
1044 yy_bp = yy_cp;
1045
1046 yy_current_state = yyg->yy_start;
1047 yy_match:
1048 do
1049 {
1050 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1051 if ( yy_accept[yy_current_state] )
1052 {
1053 yyg->yy_last_accepting_state = yy_current_state;
1054 yyg->yy_last_accepting_cpos = yy_cp;
1055 }
1056 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1057 {
1058 yy_current_state = (int) yy_def[yy_current_state];
1059 if ( yy_current_state >= 383 )
1060 yy_c = yy_meta[(unsigned int) yy_c];
1061 }
1062 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1063 ++yy_cp;
1064 }
1065 while ( yy_base[yy_current_state] != 794 );
1066
1067 yy_find_action:
1068 yy_act = yy_accept[yy_current_state];
1069 if ( yy_act == 0 )
1070 { /* have to back up */
1071 yy_cp = yyg->yy_last_accepting_cpos;
1072 yy_current_state = yyg->yy_last_accepting_state;
1073 yy_act = yy_accept[yy_current_state];
1074 }
1075
1076 YY_DO_BEFORE_ACTION;
1077
1078 do_action: /* This label is used only to access EOF actions. */
1079
1080 switch ( yy_act )
1081 { /* beginning of action switch */
1082 case 0: /* must back up */
1083 /* undo the effects of YY_DO_BEFORE_ACTION */
1084 *yy_cp = yyg->yy_hold_char;
1085 yy_cp = yyg->yy_last_accepting_cpos;
1086 yy_current_state = yyg->yy_last_accepting_state;
1087 goto yy_find_action;
1088
1089 case 1:
1090 YY_RULE_SETUP
1091 #line 31 "sphinxql.l"
1092 { BEGIN(ccomment); }
1093 YY_BREAK
1094 case 2:
1095 YY_RULE_SETUP
1096 #line 32 "sphinxql.l"
1097 { }
1098 YY_BREAK
1099 case 3:
1100 YY_RULE_SETUP
1101 #line 33 "sphinxql.l"
1102 { BEGIN(INITIAL); }
1103 YY_BREAK
1104 case 4:
1105 YY_RULE_SETUP
1106 #line 35 "sphinxql.l"
1107 { YYSTOREBOUNDS; return TOK_AND; }
1108 YY_BREAK
1109 case 5:
1110 YY_RULE_SETUP
1111 #line 36 "sphinxql.l"
1112 { YYSTOREBOUNDS; return TOK_AS; }
1113 YY_BREAK
1114 case 6:
1115 YY_RULE_SETUP
1116 #line 37 "sphinxql.l"
1117 { YYSTOREBOUNDS; return TOK_ASC; }
1118 YY_BREAK
1119 case 7:
1120 YY_RULE_SETUP
1121 #line 38 "sphinxql.l"
1122 { YYSTOREBOUNDS; return TOK_ATTACH; }
1123 YY_BREAK
1124 case 8:
1125 YY_RULE_SETUP
1126 #line 39 "sphinxql.l"
1127 { YYSTOREBOUNDS; return TOK_AVG; }
1128 YY_BREAK
1129 case 9:
1130 YY_RULE_SETUP
1131 #line 40 "sphinxql.l"
1132 { YYSTOREBOUNDS; return TOK_BEGIN; }
1133 YY_BREAK
1134 case 10:
1135 YY_RULE_SETUP
1136 #line 41 "sphinxql.l"
1137 { YYSTOREBOUNDS; return TOK_BETWEEN; }
1138 YY_BREAK
1139 case 11:
1140 YY_RULE_SETUP
1141 #line 42 "sphinxql.l"
1142 { YYSTOREBOUNDS; return TOK_BIGINT; }
1143 YY_BREAK
1144 case 12:
1145 YY_RULE_SETUP
1146 #line 43 "sphinxql.l"
1147 { YYSTOREBOUNDS; return TOK_BY; }
1148 YY_BREAK
1149 case 13:
1150 YY_RULE_SETUP
1151 #line 44 "sphinxql.l"
1152 { YYSTOREBOUNDS; return TOK_CALL; }
1153 YY_BREAK
1154 case 14:
1155 YY_RULE_SETUP
1156 #line 45 "sphinxql.l"
1157 { YYSTOREBOUNDS; return TOK_COLLATION; }
1158 YY_BREAK
1159 case 15:
1160 YY_RULE_SETUP
1161 #line 46 "sphinxql.l"
1162 { YYSTOREBOUNDS; return TOK_COMMIT; }
1163 YY_BREAK
1164 case 16:
1165 YY_RULE_SETUP
1166 #line 47 "sphinxql.l"
1167 { YYSTOREBOUNDS; return TOK_COMMITTED; }
1168 YY_BREAK
1169 case 17:
1170 YY_RULE_SETUP
1171 #line 48 "sphinxql.l"
1172 { YYSTOREBOUNDS; return TOK_COUNT; }
1173 YY_BREAK
1174 case 18:
1175 YY_RULE_SETUP
1176 #line 49 "sphinxql.l"
1177 { YYSTOREBOUNDS; return TOK_CREATE; }
1178 YY_BREAK
1179 case 19:
1180 YY_RULE_SETUP
1181 #line 50 "sphinxql.l"
1182 { YYSTOREBOUNDS; return TOK_DELETE; }
1183 YY_BREAK
1184 case 20:
1185 YY_RULE_SETUP
1186 #line 51 "sphinxql.l"
1187 { YYSTOREBOUNDS; return TOK_DESC; }
1188 YY_BREAK
1189 case 21:
1190 YY_RULE_SETUP
1191 #line 52 "sphinxql.l"
1192 { YYSTOREBOUNDS; return TOK_DESCRIBE; }
1193 YY_BREAK
1194 case 22:
1195 YY_RULE_SETUP
1196 #line 53 "sphinxql.l"
1197 { YYSTOREBOUNDS; return TOK_DISTINCT; }
1198 YY_BREAK
1199 case 23:
1200 YY_RULE_SETUP
1201 #line 54 "sphinxql.l"
1202 { YYSTOREBOUNDS; return TOK_DIV; }
1203 YY_BREAK
1204 case 24:
1205 YY_RULE_SETUP
1206 #line 55 "sphinxql.l"
1207 { YYSTOREBOUNDS; return TOK_DROP; }
1208 YY_BREAK
1209 case 25:
1210 YY_RULE_SETUP
1211 #line 56 "sphinxql.l"
1212 { YYSTOREBOUNDS; return TOK_FALSE; }
1213 YY_BREAK
1214 case 26:
1215 YY_RULE_SETUP
1216 #line 57 "sphinxql.l"
1217 { YYSTOREBOUNDS; return TOK_FLOAT; }
1218 YY_BREAK
1219 case 27:
1220 YY_RULE_SETUP
1221 #line 58 "sphinxql.l"
1222 { YYSTOREBOUNDS; return TOK_FLUSH; }
1223 YY_BREAK
1224 case 28:
1225 YY_RULE_SETUP
1226 #line 59 "sphinxql.l"
1227 { YYSTOREBOUNDS; return TOK_FROM; }
1228 YY_BREAK
1229 case 29:
1230 YY_RULE_SETUP
1231 #line 60 "sphinxql.l"
1232 { YYSTOREBOUNDS; return TOK_FUNCTION; }
1233 YY_BREAK
1234 case 30:
1235 YY_RULE_SETUP
1236 #line 61 "sphinxql.l"
1237 { YYSTOREBOUNDS; return TOK_GLOBAL; }
1238 YY_BREAK
1239 case 31:
1240 YY_RULE_SETUP
1241 #line 62 "sphinxql.l"
1242 { YYSTOREBOUNDS; return TOK_GROUP; }
1243 YY_BREAK
1244 case 32:
1245 YY_RULE_SETUP
1246 #line 63 "sphinxql.l"
1247 { YYSTOREBOUNDS; return TOK_ID; }
1248 YY_BREAK
1249 case 33:
1250 YY_RULE_SETUP
1251 #line 64 "sphinxql.l"
1252 { YYSTOREBOUNDS; return TOK_IN; }
1253 YY_BREAK
1254 case 34:
1255 YY_RULE_SETUP
1256 #line 65 "sphinxql.l"
1257 { YYSTOREBOUNDS; return TOK_INDEX; }
1258 YY_BREAK
1259 case 35:
1260 YY_RULE_SETUP
1261 #line 66 "sphinxql.l"
1262 { YYSTOREBOUNDS; return TOK_INSERT; }
1263 YY_BREAK
1264 case 36:
1265 YY_RULE_SETUP
1266 #line 67 "sphinxql.l"
1267 { YYSTOREBOUNDS; return TOK_INT; }
1268 YY_BREAK
1269 case 37:
1270 YY_RULE_SETUP
1271 #line 68 "sphinxql.l"
1272 { YYSTOREBOUNDS; return TOK_INTO; }
1273 YY_BREAK
1274 case 38:
1275 YY_RULE_SETUP
1276 #line 69 "sphinxql.l"
1277 { YYSTOREBOUNDS; return TOK_ISOLATION; }
1278 YY_BREAK
1279 case 39:
1280 YY_RULE_SETUP
1281 #line 70 "sphinxql.l"
1282 { YYSTOREBOUNDS; return TOK_LEVEL; }
1283 YY_BREAK
1284 case 40:
1285 YY_RULE_SETUP
1286 #line 71 "sphinxql.l"
1287 { YYSTOREBOUNDS; return TOK_LIMIT; }
1288 YY_BREAK
1289 case 41:
1290 YY_RULE_SETUP
1291 #line 72 "sphinxql.l"
1292 { YYSTOREBOUNDS; return TOK_MATCH; }
1293 YY_BREAK
1294 case 42:
1295 YY_RULE_SETUP
1296 #line 73 "sphinxql.l"
1297 { YYSTOREBOUNDS; return TOK_MAX; }
1298 YY_BREAK
1299 case 43:
1300 YY_RULE_SETUP
1301 #line 74 "sphinxql.l"
1302 { YYSTOREBOUNDS; return TOK_META; }
1303 YY_BREAK
1304 case 44:
1305 YY_RULE_SETUP
1306 #line 75 "sphinxql.l"
1307 { YYSTOREBOUNDS; return TOK_MIN; }
1308 YY_BREAK
1309 case 45:
1310 YY_RULE_SETUP
1311 #line 76 "sphinxql.l"
1312 { YYSTOREBOUNDS; return TOK_MOD; }
1313 YY_BREAK
1314 case 46:
1315 YY_RULE_SETUP
1316 #line 77 "sphinxql.l"
1317 { YYSTOREBOUNDS; return TOK_NAMES; }
1318 YY_BREAK
1319 case 47:
1320 YY_RULE_SETUP
1321 #line 78 "sphinxql.l"
1322 { YYSTOREBOUNDS; return TOK_NOT; }
1323 YY_BREAK
1324 case 48:
1325 YY_RULE_SETUP
1326 #line 79 "sphinxql.l"
1327 { YYSTOREBOUNDS; return TOK_NULL; }
1328 YY_BREAK
1329 case 49:
1330 YY_RULE_SETUP
1331 #line 80 "sphinxql.l"
1332 { YYSTOREBOUNDS; return TOK_OPTION; }
1333 YY_BREAK
1334 case 50:
1335 YY_RULE_SETUP
1336 #line 81 "sphinxql.l"
1337 { YYSTOREBOUNDS; return TOK_OR; }
1338 YY_BREAK
1339 case 51:
1340 YY_RULE_SETUP
1341 #line 82 "sphinxql.l"
1342 { YYSTOREBOUNDS; return TOK_ORDER; }
1343 YY_BREAK
1344 case 52:
1345 YY_RULE_SETUP
1346 #line 83 "sphinxql.l"
1347 { YYSTOREBOUNDS; return TOK_RAND; }
1348 YY_BREAK
1349 case 53:
1350 YY_RULE_SETUP
1351 #line 84 "sphinxql.l"
1352 { YYSTOREBOUNDS; return TOK_READ; }
1353 YY_BREAK
1354 case 54:
1355 YY_RULE_SETUP
1356 #line 85 "sphinxql.l"
1357 { YYSTOREBOUNDS; return TOK_REPEATABLE; }
1358 YY_BREAK
1359 case 55:
1360 YY_RULE_SETUP
1361 #line 86 "sphinxql.l"
1362 { YYSTOREBOUNDS; return TOK_REPLACE; }
1363 YY_BREAK
1364 case 56:
1365 YY_RULE_SETUP
1366 #line 87 "sphinxql.l"
1367 { YYSTOREBOUNDS; return TOK_RETURNS; }
1368 YY_BREAK
1369 case 57:
1370 YY_RULE_SETUP
1371 #line 88 "sphinxql.l"
1372 { YYSTOREBOUNDS; return TOK_ROLLBACK; }
1373 YY_BREAK
1374 case 58:
1375 YY_RULE_SETUP
1376 #line 89 "sphinxql.l"
1377 { YYSTOREBOUNDS; return TOK_RTINDEX; }
1378 YY_BREAK
1379 case 59:
1380 YY_RULE_SETUP
1381 #line 90 "sphinxql.l"
1382 { YYSTOREBOUNDS; return TOK_SELECT; }
1383 YY_BREAK
1384 case 60:
1385 YY_RULE_SETUP
1386 #line 91 "sphinxql.l"
1387 { YYSTOREBOUNDS; return TOK_SERIALIZABLE; }
1388 YY_BREAK
1389 case 61:
1390 YY_RULE_SETUP
1391 #line 92 "sphinxql.l"
1392 { YYSTOREBOUNDS; return TOK_SET; }
1393 YY_BREAK
1394 case 62:
1395 YY_RULE_SETUP
1396 #line 93 "sphinxql.l"
1397 { YYSTOREBOUNDS; return TOK_SESSION; }
1398 YY_BREAK
1399 case 63:
1400 YY_RULE_SETUP
1401 #line 94 "sphinxql.l"
1402 { YYSTOREBOUNDS; return TOK_SHOW; }
1403 YY_BREAK
1404 case 64:
1405 YY_RULE_SETUP
1406 #line 95 "sphinxql.l"
1407 { YYSTOREBOUNDS; return TOK_SONAME; }
1408 YY_BREAK
1409 case 65:
1410 YY_RULE_SETUP
1411 #line 96 "sphinxql.l"
1412 { YYSTOREBOUNDS; return TOK_START; }
1413 YY_BREAK
1414 case 66:
1415 YY_RULE_SETUP
1416 #line 97 "sphinxql.l"
1417 { YYSTOREBOUNDS; return TOK_STATUS; }
1418 YY_BREAK
1419 case 67:
1420 YY_RULE_SETUP
1421 #line 98 "sphinxql.l"
1422 { YYSTOREBOUNDS; return TOK_SUM; }
1423 YY_BREAK
1424 case 68:
1425 YY_RULE_SETUP
1426 #line 99 "sphinxql.l"
1427 { YYSTOREBOUNDS; return TOK_TABLES; }
1428 YY_BREAK
1429 case 69:
1430 YY_RULE_SETUP
1431 #line 100 "sphinxql.l"
1432 { YYSTOREBOUNDS; return TOK_TO; }
1433 YY_BREAK
1434 case 70:
1435 YY_RULE_SETUP
1436 #line 101 "sphinxql.l"
1437 { YYSTOREBOUNDS; return TOK_TRANSACTION; }
1438 YY_BREAK
1439 case 71:
1440 YY_RULE_SETUP
1441 #line 102 "sphinxql.l"
1442 { YYSTOREBOUNDS; return TOK_TRUE; }
1443 YY_BREAK
1444 case 72:
1445 YY_RULE_SETUP
1446 #line 103 "sphinxql.l"
1447 { YYSTOREBOUNDS; return TOK_UNCOMMITTED; }
1448 YY_BREAK
1449 case 73:
1450 YY_RULE_SETUP
1451 #line 104 "sphinxql.l"
1452 { YYSTOREBOUNDS; return TOK_UPDATE; }
1453 YY_BREAK
1454 case 74:
1455 YY_RULE_SETUP
1456 #line 105 "sphinxql.l"
1457 { YYSTOREBOUNDS; return TOK_VALUES; }
1458 YY_BREAK
1459 case 75:
1460 YY_RULE_SETUP
1461 #line 106 "sphinxql.l"
1462 { YYSTOREBOUNDS; return TOK_VARIABLES; }
1463 YY_BREAK
1464 case 76:
1465 YY_RULE_SETUP
1466 #line 107 "sphinxql.l"
1467 { YYSTOREBOUNDS; return TOK_WARNINGS; }
1468 YY_BREAK
1469 case 77:
1470 YY_RULE_SETUP
1471 #line 108 "sphinxql.l"
1472 { YYSTOREBOUNDS; return TOK_WEIGHT; }
1473 YY_BREAK
1474 case 78:
1475 YY_RULE_SETUP
1476 #line 109 "sphinxql.l"
1477 { YYSTOREBOUNDS; return TOK_WHERE; }
1478 YY_BREAK
1479 case 79:
1480 YY_RULE_SETUP
1481 #line 110 "sphinxql.l"
1482 { YYSTOREBOUNDS; return TOK_WITHIN; }
1483 YY_BREAK
1484 case 80:
1485 YY_RULE_SETUP
1486 #line 112 "sphinxql.l"
1487 { YYSTOREBOUNDS; return TOK_NE; }
1488 YY_BREAK
1489 case 81:
1490 YY_RULE_SETUP
1491 #line 113 "sphinxql.l"
1492 { YYSTOREBOUNDS; return TOK_NE; }
1493 YY_BREAK
1494 case 82:
1495 YY_RULE_SETUP
1496 #line 114 "sphinxql.l"
1497 { YYSTOREBOUNDS; return TOK_LTE; }
1498 YY_BREAK
1499 case 83:
1500 YY_RULE_SETUP
1501 #line 115 "sphinxql.l"
1502 { YYSTOREBOUNDS; return TOK_GTE; }
1503 YY_BREAK
1504 case 84:
1505 YY_RULE_SETUP
1506 #line 116 "sphinxql.l"
1507 { YYSTOREBOUNDS; return '='; }
1508 YY_BREAK
1509 case 85:
1510 /* rule 85 can match eol */
1511 YY_RULE_SETUP
1512 #line 118 "sphinxql.l"
1513 { YYSTOREBOUNDS; SqlUnescape ( lvalp->m_sValue, yytext, yyleng ); return TOK_QUOTED_STRING; }
1514 YY_BREAK
1515 case 86:
1516 YY_RULE_SETUP
1517 #line 120 "sphinxql.l"
1518 { YYSTOREBOUNDS; lvalp->m_sValue = yytext; lvalp->m_fValue = (float)strtod ( yytext, NULL ); return TOK_CONST_FLOAT; }
1519 YY_BREAK
1520 case 87:
1521 YY_RULE_SETUP
1522 #line 121 "sphinxql.l"
1523 { YYSTOREBOUNDS; lvalp->m_sValue = yytext; lvalp->m_iValue = (int64_t)strtoull ( yytext, NULL, 10 ); return TOK_CONST_INT; }
1524 YY_BREAK
1525 case 88:
1526 YY_RULE_SETUP
1527 #line 123 "sphinxql.l"
1528 { YYSTOREBOUNDS; lvalp->m_sValue = yytext; return TOK_ATIDENT; }
1529 YY_BREAK
1530 case 89:
1531 YY_RULE_SETUP
1532 #line 124 "sphinxql.l"
1533 { YYSTOREBOUNDS; lvalp->m_sValue = yytext; return TOK_ATIDENT; }
1534 YY_BREAK
1535 case 90:
1536 YY_RULE_SETUP
1537 #line 125 "sphinxql.l"
1538 { YYSTOREBOUNDS; lvalp->m_sValue = yytext; return TOK_ATIDENT; }
1539 YY_BREAK
1540 case 91:
1541 YY_RULE_SETUP
1542 #line 126 "sphinxql.l"
1543 { YYSTOREBOUNDS; lvalp->m_sValue = yytext; return TOK_IDENT; }
1544 YY_BREAK
1545 case 92:
1546 YY_RULE_SETUP
1547 #line 127 "sphinxql.l"
1548 { YYSTOREBOUNDS; return TOK_BAD_NUMERIC; }
1549 YY_BREAK
1550 case 93:
1551 YY_RULE_SETUP
1552 #line 128 "sphinxql.l"
1553 { YYSTOREBOUNDS; lvalp->m_sValue = yytext; return TOK_USERVAR; }
1554 YY_BREAK
1555 case 94:
1556 YY_RULE_SETUP
1557 #line 129 "sphinxql.l"
1558 { YYSTOREBOUNDS; lvalp->m_sValue = yytext; return TOK_SYSVAR; }
1559 YY_BREAK
1560 case 95:
1561 YY_RULE_SETUP
1562 #line 130 "sphinxql.l"
1563 { YYSTOREBOUNDS; lvalp->m_iStart++; lvalp->m_iEnd--; lvalp->m_sValue.SetBinary ( yytext+1, strlen(yytext)-2 ); return TOK_ID; }
1564 YY_BREAK
1565 case 96:
1566 YY_RULE_SETUP
1567 #line 131 "sphinxql.l"
1568 { YYSTOREBOUNDS; lvalp->m_iStart++; lvalp->m_iEnd--; lvalp->m_sValue.SetBinary ( yytext+1, strlen(yytext)-2 ); return TOK_IDENT; }
1569 YY_BREAK
1570 case 97:
1571 /* rule 97 can match eol */
1572 YY_RULE_SETUP
1573 #line 133 "sphinxql.l"
1574 { ; }
1575 YY_BREAK
1576 case 98:
1577 YY_RULE_SETUP
1578 #line 134 "sphinxql.l"
1579 { YYSTOREBOUNDS; return yytext[0]; }
1580 YY_BREAK
1581 case 99:
1582 YY_RULE_SETUP
1583 #line 136 "sphinxql.l"
1584 ECHO;
1585 YY_BREAK
1586 #line 1571 "llsphinxql.c"
1587 case YY_STATE_EOF(INITIAL):
1588 case YY_STATE_EOF(ccomment):
1589 yyterminate();
1590
1591 case YY_END_OF_BUFFER:
1592 {
1593 /* Amount of text matched not including the EOB char. */
1594 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1595
1596 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1597 *yy_cp = yyg->yy_hold_char;
1598 YY_RESTORE_YY_MORE_OFFSET
1599
1600 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1601 {
1602 /* We're scanning a new file or input source. It's
1603 * possible that this happened because the user
1604 * just pointed yyin at a new source and called
1605 * yylex(). If so, then we have to assure
1606 * consistency between YY_CURRENT_BUFFER and our
1607 * globals. Here is the right place to do so, because
1608 * this is the first action (other than possibly a
1609 * back-up) that will match for the new input source.
1610 */
1611 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1612 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1613 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1614 }
1615
1616 /* Note that here we test for yy_c_buf_p "<=" to the position
1617 * of the first EOB in the buffer, since yy_c_buf_p will
1618 * already have been incremented past the NUL character
1619 * (since all states make transitions on EOB to the
1620 * end-of-buffer state). Contrast this with the test
1621 * in input().
1622 */
1623 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1624 { /* This was really a NUL. */
1625 yy_state_type yy_next_state;
1626
1627 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1628
1629 yy_current_state = yy_get_previous_state( yyscanner );
1630
1631 /* Okay, we're now positioned to make the NUL
1632 * transition. We couldn't have
1633 * yy_get_previous_state() go ahead and do it
1634 * for us because it doesn't know how to deal
1635 * with the possibility of jamming (and we don't
1636 * want to build jamming into it because then it
1637 * will run more slowly).
1638 */
1639
1640 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1641
1642 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1643
1644 if ( yy_next_state )
1645 {
1646 /* Consume the NUL. */
1647 yy_cp = ++yyg->yy_c_buf_p;
1648 yy_current_state = yy_next_state;
1649 goto yy_match;
1650 }
1651
1652 else
1653 {
1654 yy_cp = yyg->yy_c_buf_p;
1655 goto yy_find_action;
1656 }
1657 }
1658
1659 else switch ( yy_get_next_buffer( yyscanner ) )
1660 {
1661 case EOB_ACT_END_OF_FILE:
1662 {
1663 yyg->yy_did_buffer_switch_on_eof = 0;
1664
1665 if ( yywrap(yyscanner ) )
1666 {
1667 /* Note: because we've taken care in
1668 * yy_get_next_buffer() to have set up
1669 * yytext, we can now set up
1670 * yy_c_buf_p so that if some total
1671 * hoser (like flex itself) wants to
1672 * call the scanner after we return the
1673 * YY_NULL, it'll still work - another
1674 * YY_NULL will get returned.
1675 */
1676 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1677
1678 yy_act = YY_STATE_EOF(YY_START);
1679 goto do_action;
1680 }
1681
1682 else
1683 {
1684 if ( ! yyg->yy_did_buffer_switch_on_eof )
1685 YY_NEW_FILE;
1686 }
1687 break;
1688 }
1689
1690 case EOB_ACT_CONTINUE_SCAN:
1691 yyg->yy_c_buf_p =
1692 yyg->yytext_ptr + yy_amount_of_matched_text;
1693
1694 yy_current_state = yy_get_previous_state( yyscanner );
1695
1696 yy_cp = yyg->yy_c_buf_p;
1697 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1698 goto yy_match;
1699
1700 case EOB_ACT_LAST_MATCH:
1701 yyg->yy_c_buf_p =
1702 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1703
1704 yy_current_state = yy_get_previous_state( yyscanner );
1705
1706 yy_cp = yyg->yy_c_buf_p;
1707 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1708 goto yy_find_action;
1709 }
1710 break;
1711 }
1712
1713 default:
1714 YY_FATAL_ERROR(
1715 "fatal flex scanner internal error--no action found" );
1716 } /* end of action switch */
1717 } /* end of scanning one token */
1718 } /* end of yylex */
1719
1720 /* yy_get_next_buffer - try to read in a new buffer
1721 *
1722 * Returns a code representing an action:
1723 * EOB_ACT_LAST_MATCH -
1724 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1725 * EOB_ACT_END_OF_FILE - end of file
1726 */
yy_get_next_buffer(yyscan_t yyscanner)1727 static int yy_get_next_buffer (yyscan_t yyscanner)
1728 {
1729 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1730 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1731 register char *source = yyg->yytext_ptr;
1732 register int number_to_move, i;
1733 int ret_val;
1734
1735 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1736 YY_FATAL_ERROR(
1737 "fatal flex scanner internal error--end of buffer missed" );
1738
1739 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1740 { /* Don't try to fill the buffer, so this is an EOF. */
1741 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1742 {
1743 /* We matched a single character, the EOB, so
1744 * treat this as a final EOF.
1745 */
1746 return EOB_ACT_END_OF_FILE;
1747 }
1748
1749 else
1750 {
1751 /* We matched some text prior to the EOB, first
1752 * process it.
1753 */
1754 return EOB_ACT_LAST_MATCH;
1755 }
1756 }
1757
1758 /* Try to read more data. */
1759
1760 /* First move last chars to start of buffer. */
1761 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
1762
1763 for ( i = 0; i < number_to_move; ++i )
1764 *(dest++) = *(source++);
1765
1766 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1767 /* don't do the read, it's not guaranteed to return an EOF,
1768 * just force an EOF
1769 */
1770 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1771
1772 else
1773 {
1774 int num_to_read =
1775 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1776
1777 while ( num_to_read <= 0 )
1778 { /* Not enough room in the buffer - grow it. */
1779
1780 /* just a shorter name for the current buffer */
1781 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1782
1783 int yy_c_buf_p_offset =
1784 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1785
1786 if ( b->yy_is_our_buffer )
1787 {
1788 int new_size = b->yy_buf_size * 2;
1789
1790 if ( new_size <= 0 )
1791 b->yy_buf_size += b->yy_buf_size / 8;
1792 else
1793 b->yy_buf_size *= 2;
1794
1795 b->yy_ch_buf = (char *)
1796 /* Include room in for 2 EOB chars. */
1797 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
1798 }
1799 else
1800 /* Can't grow it, we don't own it. */
1801 b->yy_ch_buf = 0;
1802
1803 if ( ! b->yy_ch_buf )
1804 YY_FATAL_ERROR(
1805 "fatal error - scanner input buffer overflow" );
1806
1807 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1808
1809 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1810 number_to_move - 1;
1811
1812 }
1813
1814 if ( num_to_read > YY_READ_BUF_SIZE )
1815 num_to_read = YY_READ_BUF_SIZE;
1816
1817 /* Read in more data. */
1818 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1819 yyg->yy_n_chars, num_to_read );
1820
1821 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1822 }
1823
1824 if ( yyg->yy_n_chars == 0 )
1825 {
1826 if ( number_to_move == YY_MORE_ADJ )
1827 {
1828 ret_val = EOB_ACT_END_OF_FILE;
1829 yyrestart(yyin ,yyscanner);
1830 }
1831
1832 else
1833 {
1834 ret_val = EOB_ACT_LAST_MATCH;
1835 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1836 YY_BUFFER_EOF_PENDING;
1837 }
1838 }
1839
1840 else
1841 ret_val = EOB_ACT_CONTINUE_SCAN;
1842
1843 if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1844 /* Extend the array by 50%, plus the number we really need. */
1845 yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1846 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
1847 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1848 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1849 }
1850
1851 yyg->yy_n_chars += number_to_move;
1852 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1853 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1854
1855 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1856
1857 return ret_val;
1858 }
1859
1860 /* yy_get_previous_state - get the state just before the EOB char was reached */
1861
yy_get_previous_state(yyscan_t yyscanner)1862 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1863 {
1864 register yy_state_type yy_current_state;
1865 register char *yy_cp;
1866 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1867
1868 yy_current_state = yyg->yy_start;
1869
1870 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1871 {
1872 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1873 if ( yy_accept[yy_current_state] )
1874 {
1875 yyg->yy_last_accepting_state = yy_current_state;
1876 yyg->yy_last_accepting_cpos = yy_cp;
1877 }
1878 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1879 {
1880 yy_current_state = (int) yy_def[yy_current_state];
1881 if ( yy_current_state >= 383 )
1882 yy_c = yy_meta[(unsigned int) yy_c];
1883 }
1884 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1885 }
1886
1887 return yy_current_state;
1888 }
1889
1890 /* yy_try_NUL_trans - try to make a transition on the NUL character
1891 *
1892 * synopsis
1893 * next_state = yy_try_NUL_trans( current_state );
1894 */
yy_try_NUL_trans(yy_state_type yy_current_state,yyscan_t yyscanner)1895 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
1896 {
1897 register int yy_is_jam;
1898 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
1899 register char *yy_cp = yyg->yy_c_buf_p;
1900
1901 register YY_CHAR yy_c = 1;
1902 if ( yy_accept[yy_current_state] )
1903 {
1904 yyg->yy_last_accepting_state = yy_current_state;
1905 yyg->yy_last_accepting_cpos = yy_cp;
1906 }
1907 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1908 {
1909 yy_current_state = (int) yy_def[yy_current_state];
1910 if ( yy_current_state >= 383 )
1911 yy_c = yy_meta[(unsigned int) yy_c];
1912 }
1913 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1914 yy_is_jam = (yy_current_state == 382);
1915
1916 return yy_is_jam ? 0 : yy_current_state;
1917 }
1918
1919 #ifndef YY_NO_INPUT
1920 #ifdef __cplusplus
yyinput(yyscan_t yyscanner)1921 static int yyinput (yyscan_t yyscanner)
1922 #else
1923 static int input (yyscan_t yyscanner)
1924 #endif
1925
1926 {
1927 int c;
1928 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1929
1930 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1931
1932 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1933 {
1934 /* yy_c_buf_p now points to the character we want to return.
1935 * If this occurs *before* the EOB characters, then it's a
1936 * valid NUL; if not, then we've hit the end of the buffer.
1937 */
1938 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1939 /* This was really a NUL. */
1940 *yyg->yy_c_buf_p = '\0';
1941
1942 else
1943 { /* need more input */
1944 int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
1945 ++yyg->yy_c_buf_p;
1946
1947 switch ( yy_get_next_buffer( yyscanner ) )
1948 {
1949 case EOB_ACT_LAST_MATCH:
1950 /* This happens because yy_g_n_b()
1951 * sees that we've accumulated a
1952 * token and flags that we need to
1953 * try matching the token before
1954 * proceeding. But for input(),
1955 * there's no matching to consider.
1956 * So convert the EOB_ACT_LAST_MATCH
1957 * to EOB_ACT_END_OF_FILE.
1958 */
1959
1960 /* Reset buffer status. */
1961 yyrestart(yyin ,yyscanner);
1962
1963 /*FALLTHROUGH*/
1964
1965 case EOB_ACT_END_OF_FILE:
1966 {
1967 if ( yywrap(yyscanner ) )
1968 return EOF;
1969
1970 if ( ! yyg->yy_did_buffer_switch_on_eof )
1971 YY_NEW_FILE;
1972 #ifdef __cplusplus
1973 return yyinput(yyscanner);
1974 #else
1975 return input(yyscanner);
1976 #endif
1977 }
1978
1979 case EOB_ACT_CONTINUE_SCAN:
1980 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
1981 break;
1982 }
1983 }
1984 }
1985
1986 c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
1987 *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
1988 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
1989
1990 return c;
1991 }
1992 #endif /* ifndef YY_NO_INPUT */
1993
1994 /** Immediately switch to a different input stream.
1995 * @param input_file A readable stream.
1996 * @param yyscanner The scanner object.
1997 * @note This function does not reset the start condition to @c INITIAL .
1998 */
yyrestart(FILE * input_file,yyscan_t yyscanner)1999 void yyrestart (FILE * input_file , yyscan_t yyscanner)
2000 {
2001 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2002
2003 if ( ! YY_CURRENT_BUFFER ){
2004 yyensure_buffer_stack (yyscanner);
2005 YY_CURRENT_BUFFER_LVALUE =
2006 yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
2007 }
2008
2009 yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
2010 yy_load_buffer_state(yyscanner );
2011 }
2012
2013 /** Switch to a different input buffer.
2014 * @param new_buffer The new input buffer.
2015 * @param yyscanner The scanner object.
2016 */
yy_switch_to_buffer(YY_BUFFER_STATE new_buffer,yyscan_t yyscanner)2017 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2018 {
2019 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2020
2021 /* TODO. We should be able to replace this entire function body
2022 * with
2023 * yypop_buffer_state();
2024 * yypush_buffer_state(new_buffer);
2025 */
2026 yyensure_buffer_stack (yyscanner);
2027 if ( YY_CURRENT_BUFFER == new_buffer )
2028 return;
2029
2030 if ( YY_CURRENT_BUFFER )
2031 {
2032 /* Flush out information for old buffer. */
2033 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2034 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2035 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2036 }
2037
2038 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2039 yy_load_buffer_state(yyscanner );
2040
2041 /* We don't actually know whether we did this switch during
2042 * EOF (yywrap()) processing, but the only time this flag
2043 * is looked at is after yywrap() is called, so it's safe
2044 * to go ahead and always set it.
2045 */
2046 yyg->yy_did_buffer_switch_on_eof = 1;
2047 }
2048
yy_load_buffer_state(yyscan_t yyscanner)2049 static void yy_load_buffer_state (yyscan_t yyscanner)
2050 {
2051 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2052 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2053 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2054 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2055 yyg->yy_hold_char = *yyg->yy_c_buf_p;
2056 }
2057
2058 /** Allocate and initialize an input buffer state.
2059 * @param file A readable stream.
2060 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2061 * @param yyscanner The scanner object.
2062 * @return the allocated buffer state.
2063 */
yy_create_buffer(FILE * file,int size,yyscan_t yyscanner)2064 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
2065 {
2066 YY_BUFFER_STATE b;
2067
2068 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
2069 if ( ! b )
2070 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2071
2072 b->yy_buf_size = size;
2073
2074 /* yy_ch_buf has to be 2 characters longer than the size given because
2075 * we need to put in 2 end-of-buffer characters.
2076 */
2077 b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ,yyscanner );
2078 if ( ! b->yy_ch_buf )
2079 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2080
2081 b->yy_is_our_buffer = 1;
2082
2083 yy_init_buffer(b,file ,yyscanner);
2084
2085 return b;
2086 }
2087
2088 /** Destroy the buffer.
2089 * @param b a buffer created with yy_create_buffer()
2090 * @param yyscanner The scanner object.
2091 */
yy_delete_buffer(YY_BUFFER_STATE b,yyscan_t yyscanner)2092 void yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
2093 {
2094 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2095
2096 if ( ! b )
2097 return;
2098
2099 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2100 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2101
2102 if ( b->yy_is_our_buffer )
2103 yyfree((void *) b->yy_ch_buf ,yyscanner );
2104
2105 yyfree((void *) b ,yyscanner );
2106 }
2107
2108 #ifndef __cplusplus
2109 extern int isatty (int );
2110 #endif /* __cplusplus */
2111
2112 /* Initializes or reinitializes a buffer.
2113 * This function is sometimes called more than once on the same buffer,
2114 * such as during a yyrestart() or at EOF.
2115 */
yy_init_buffer(YY_BUFFER_STATE b,FILE * file,yyscan_t yyscanner)2116 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
2117
2118 {
2119 int oerrno = errno;
2120 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2121
2122 yy_flush_buffer(b ,yyscanner);
2123
2124 b->yy_input_file = file;
2125 b->yy_fill_buffer = 1;
2126
2127 /* If b is the current buffer, then yy_init_buffer was _probably_
2128 * called from yyrestart() or through yy_get_next_buffer.
2129 * In that case, we don't want to reset the lineno or column.
2130 */
2131 if (b != YY_CURRENT_BUFFER){
2132 b->yy_bs_lineno = 1;
2133 b->yy_bs_column = 0;
2134 }
2135
2136 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2137
2138 errno = oerrno;
2139 }
2140
2141 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2142 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2143 * @param yyscanner The scanner object.
2144 */
yy_flush_buffer(YY_BUFFER_STATE b,yyscan_t yyscanner)2145 void yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
2146 {
2147 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2148 if ( ! b )
2149 return;
2150
2151 b->yy_n_chars = 0;
2152
2153 /* We always need two end-of-buffer characters. The first causes
2154 * a transition to the end-of-buffer state. The second causes
2155 * a jam in that state.
2156 */
2157 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2158 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2159
2160 b->yy_buf_pos = &b->yy_ch_buf[0];
2161
2162 b->yy_at_bol = 1;
2163 b->yy_buffer_status = YY_BUFFER_NEW;
2164
2165 if ( b == YY_CURRENT_BUFFER )
2166 yy_load_buffer_state(yyscanner );
2167 }
2168
2169 /** Pushes the new state onto the stack. The new state becomes
2170 * the current state. This function will allocate the stack
2171 * if necessary.
2172 * @param new_buffer The new state.
2173 * @param yyscanner The scanner object.
2174 */
yypush_buffer_state(YY_BUFFER_STATE new_buffer,yyscan_t yyscanner)2175 void yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2176 {
2177 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2178 if (new_buffer == NULL)
2179 return;
2180
2181 yyensure_buffer_stack(yyscanner);
2182
2183 /* This block is copied from yy_switch_to_buffer. */
2184 if ( YY_CURRENT_BUFFER )
2185 {
2186 /* Flush out information for old buffer. */
2187 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2188 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2189 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2190 }
2191
2192 /* Only push if top exists. Otherwise, replace top. */
2193 if (YY_CURRENT_BUFFER)
2194 yyg->yy_buffer_stack_top++;
2195 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2196
2197 /* copied from yy_switch_to_buffer. */
2198 yy_load_buffer_state(yyscanner );
2199 yyg->yy_did_buffer_switch_on_eof = 1;
2200 }
2201
2202 /** Removes and deletes the top of the stack, if present.
2203 * The next element becomes the new top.
2204 * @param yyscanner The scanner object.
2205 */
yypop_buffer_state(yyscan_t yyscanner)2206 void yypop_buffer_state (yyscan_t yyscanner)
2207 {
2208 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2209 if (!YY_CURRENT_BUFFER)
2210 return;
2211
2212 yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
2213 YY_CURRENT_BUFFER_LVALUE = NULL;
2214 if (yyg->yy_buffer_stack_top > 0)
2215 --yyg->yy_buffer_stack_top;
2216
2217 if (YY_CURRENT_BUFFER) {
2218 yy_load_buffer_state(yyscanner );
2219 yyg->yy_did_buffer_switch_on_eof = 1;
2220 }
2221 }
2222
2223 /* Allocates the stack if it does not exist.
2224 * Guarantees space for at least one push.
2225 */
yyensure_buffer_stack(yyscan_t yyscanner)2226 static void yyensure_buffer_stack (yyscan_t yyscanner)
2227 {
2228 int num_to_alloc;
2229 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2230
2231 if (!yyg->yy_buffer_stack) {
2232
2233 /* First allocation is just for 2 elements, since we don't know if this
2234 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2235 * immediate realloc on the next call.
2236 */
2237 num_to_alloc = 1;
2238 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyalloc
2239 (num_to_alloc * sizeof(struct yy_buffer_state*)
2240 , yyscanner);
2241 if ( ! yyg->yy_buffer_stack )
2242 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2243
2244 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2245
2246 yyg->yy_buffer_stack_max = num_to_alloc;
2247 yyg->yy_buffer_stack_top = 0;
2248 return;
2249 }
2250
2251 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
2252
2253 /* Increase the buffer to prepare for a possible push. */
2254 int grow_size = 8 /* arbitrary grow size */;
2255
2256 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
2257 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
2258 (yyg->yy_buffer_stack,
2259 num_to_alloc * sizeof(struct yy_buffer_state*)
2260 , yyscanner);
2261 if ( ! yyg->yy_buffer_stack )
2262 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2263
2264 /* zero only the new slots.*/
2265 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
2266 yyg->yy_buffer_stack_max = num_to_alloc;
2267 }
2268 }
2269
2270 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2271 * @param base the character buffer
2272 * @param size the size in bytes of the character buffer
2273 * @param yyscanner The scanner object.
2274 * @return the newly allocated buffer state object.
2275 */
yy_scan_buffer(char * base,yy_size_t size,yyscan_t yyscanner)2276 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
2277 {
2278 YY_BUFFER_STATE b;
2279
2280 if ( size < 2 ||
2281 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2282 base[size-1] != YY_END_OF_BUFFER_CHAR )
2283 /* They forgot to leave room for the EOB's. */
2284 return 0;
2285
2286 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
2287 if ( ! b )
2288 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2289
2290 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2291 b->yy_buf_pos = b->yy_ch_buf = base;
2292 b->yy_is_our_buffer = 0;
2293 b->yy_input_file = 0;
2294 b->yy_n_chars = b->yy_buf_size;
2295 b->yy_is_interactive = 0;
2296 b->yy_at_bol = 1;
2297 b->yy_fill_buffer = 0;
2298 b->yy_buffer_status = YY_BUFFER_NEW;
2299
2300 yy_switch_to_buffer(b ,yyscanner );
2301
2302 return b;
2303 }
2304
2305 /** Setup the input buffer state to scan a string. The next call to yylex() will
2306 * scan from a @e copy of @a str.
2307 * @param yystr a NUL-terminated string to scan
2308 * @param yyscanner The scanner object.
2309 * @return the newly allocated buffer state object.
2310 * @note If you want to scan bytes that may contain NUL values, then use
2311 * yy_scan_bytes() instead.
2312 */
yy_scan_string(yyconst char * yystr,yyscan_t yyscanner)2313 YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
2314 {
2315
2316 return yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
2317 }
2318
2319 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2320 * scan from a @e copy of @a bytes.
2321 * @param yybytes the byte buffer to scan
2322 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2323 * @param yyscanner The scanner object.
2324 * @return the newly allocated buffer state object.
2325 */
yy_scan_bytes(yyconst char * yybytes,int _yybytes_len,yyscan_t yyscanner)2326 YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
2327 {
2328 YY_BUFFER_STATE b;
2329 char *buf;
2330 yy_size_t n;
2331 int i;
2332
2333 /* Get memory for full buffer, including space for trailing EOB's. */
2334 n = _yybytes_len + 2;
2335 buf = (char *) yyalloc(n ,yyscanner );
2336 if ( ! buf )
2337 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2338
2339 for ( i = 0; i < _yybytes_len; ++i )
2340 buf[i] = yybytes[i];
2341
2342 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2343
2344 b = yy_scan_buffer(buf,n ,yyscanner);
2345 if ( ! b )
2346 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2347
2348 /* It's okay to grow etc. this buffer, and we should throw it
2349 * away when we're done.
2350 */
2351 b->yy_is_our_buffer = 1;
2352
2353 return b;
2354 }
2355
2356 #ifndef YY_EXIT_FAILURE
2357 #define YY_EXIT_FAILURE 2
2358 #endif
2359
yy_fatal_error(yyconst char * msg,yyscan_t yyscanner)2360 static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
2361 {
2362 (void) fprintf( stderr, "%s\n", msg );
2363 exit( YY_EXIT_FAILURE );
2364 }
2365
2366 /* Redefine yyless() so it works in section 3 code. */
2367
2368 #undef yyless
2369 #define yyless(n) \
2370 do \
2371 { \
2372 /* Undo effects of setting up yytext. */ \
2373 int yyless_macro_arg = (n); \
2374 YY_LESS_LINENO(yyless_macro_arg);\
2375 yytext[yyleng] = yyg->yy_hold_char; \
2376 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
2377 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
2378 *yyg->yy_c_buf_p = '\0'; \
2379 yyleng = yyless_macro_arg; \
2380 } \
2381 while ( 0 )
2382
2383 /* Accessor methods (get/set functions) to struct members. */
2384
2385 /** Get the user-defined data for this scanner.
2386 * @param yyscanner The scanner object.
2387 */
yyget_extra(yyscan_t yyscanner)2388 YY_EXTRA_TYPE yyget_extra (yyscan_t yyscanner)
2389 {
2390 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2391 return yyextra;
2392 }
2393
2394 /** Get the current line number.
2395 * @param yyscanner The scanner object.
2396 */
yyget_lineno(yyscan_t yyscanner)2397 int yyget_lineno (yyscan_t yyscanner)
2398 {
2399 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2400
2401 if (! YY_CURRENT_BUFFER)
2402 return 0;
2403
2404 return yylineno;
2405 }
2406
2407 /** Get the current column number.
2408 * @param yyscanner The scanner object.
2409 */
yyget_column(yyscan_t yyscanner)2410 int yyget_column (yyscan_t yyscanner)
2411 {
2412 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2413
2414 if (! YY_CURRENT_BUFFER)
2415 return 0;
2416
2417 return yycolumn;
2418 }
2419
2420 /** Get the input stream.
2421 * @param yyscanner The scanner object.
2422 */
yyget_in(yyscan_t yyscanner)2423 FILE *yyget_in (yyscan_t yyscanner)
2424 {
2425 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2426 return yyin;
2427 }
2428
2429 /** Get the output stream.
2430 * @param yyscanner The scanner object.
2431 */
yyget_out(yyscan_t yyscanner)2432 FILE *yyget_out (yyscan_t yyscanner)
2433 {
2434 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2435 return yyout;
2436 }
2437
2438 /** Get the length of the current token.
2439 * @param yyscanner The scanner object.
2440 */
yyget_leng(yyscan_t yyscanner)2441 int yyget_leng (yyscan_t yyscanner)
2442 {
2443 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2444 return yyleng;
2445 }
2446
2447 /** Get the current token.
2448 * @param yyscanner The scanner object.
2449 */
2450
yyget_text(yyscan_t yyscanner)2451 char *yyget_text (yyscan_t yyscanner)
2452 {
2453 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2454 return yytext;
2455 }
2456
2457 /** Set the user-defined data. This data is never touched by the scanner.
2458 * @param user_defined The data to be associated with this scanner.
2459 * @param yyscanner The scanner object.
2460 */
yyset_extra(YY_EXTRA_TYPE user_defined,yyscan_t yyscanner)2461 void yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
2462 {
2463 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2464 yyextra = user_defined ;
2465 }
2466
2467 /** Set the current line number.
2468 * @param line_number
2469 * @param yyscanner The scanner object.
2470 */
yyset_lineno(int line_number,yyscan_t yyscanner)2471 void yyset_lineno (int line_number , yyscan_t yyscanner)
2472 {
2473 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2474
2475 /* lineno is only valid if an input buffer exists. */
2476 if (! YY_CURRENT_BUFFER )
2477 yy_fatal_error( "yyset_lineno called with no buffer" , yyscanner);
2478
2479 yylineno = line_number;
2480 }
2481
2482 /** Set the current column.
2483 * @param line_number
2484 * @param yyscanner The scanner object.
2485 */
yyset_column(int column_no,yyscan_t yyscanner)2486 void yyset_column (int column_no , yyscan_t yyscanner)
2487 {
2488 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2489
2490 /* column is only valid if an input buffer exists. */
2491 if (! YY_CURRENT_BUFFER )
2492 yy_fatal_error( "yyset_column called with no buffer" , yyscanner);
2493
2494 yycolumn = column_no;
2495 }
2496
2497 /** Set the input stream. This does not discard the current
2498 * input buffer.
2499 * @param in_str A readable stream.
2500 * @param yyscanner The scanner object.
2501 * @see yy_switch_to_buffer
2502 */
yyset_in(FILE * in_str,yyscan_t yyscanner)2503 void yyset_in (FILE * in_str , yyscan_t yyscanner)
2504 {
2505 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2506 yyin = in_str ;
2507 }
2508
yyset_out(FILE * out_str,yyscan_t yyscanner)2509 void yyset_out (FILE * out_str , yyscan_t yyscanner)
2510 {
2511 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2512 yyout = out_str ;
2513 }
2514
yyget_debug(yyscan_t yyscanner)2515 int yyget_debug (yyscan_t yyscanner)
2516 {
2517 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2518 return yy_flex_debug;
2519 }
2520
yyset_debug(int bdebug,yyscan_t yyscanner)2521 void yyset_debug (int bdebug , yyscan_t yyscanner)
2522 {
2523 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2524 yy_flex_debug = bdebug ;
2525 }
2526
2527 /* Accessor methods for yylval and yylloc */
2528
2529 /* User-visible API */
2530
2531 /* yylex_init is special because it creates the scanner itself, so it is
2532 * the ONLY reentrant function that doesn't take the scanner as the last argument.
2533 * That's why we explicitly handle the declaration, instead of using our macros.
2534 */
2535
yylex_init(yyscan_t * ptr_yy_globals)2536 int yylex_init(yyscan_t* ptr_yy_globals)
2537
2538 {
2539 if (ptr_yy_globals == NULL){
2540 errno = EINVAL;
2541 return 1;
2542 }
2543
2544 *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL );
2545
2546 if (*ptr_yy_globals == NULL){
2547 errno = ENOMEM;
2548 return 1;
2549 }
2550
2551 /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
2552 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2553
2554 return yy_init_globals ( *ptr_yy_globals );
2555 }
2556
2557 /* yylex_init_extra has the same functionality as yylex_init, but follows the
2558 * convention of taking the scanner as the last argument. Note however, that
2559 * this is a *pointer* to a scanner, as it will be allocated by this call (and
2560 * is the reason, too, why this function also must handle its own declaration).
2561 * The user defined value in the first argument will be available to yyalloc in
2562 * the yyextra field.
2563 */
2564
yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t * ptr_yy_globals)2565 int yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
2566
2567 {
2568 struct yyguts_t dummy_yyguts;
2569
2570 yyset_extra (yy_user_defined, &dummy_yyguts);
2571
2572 if (ptr_yy_globals == NULL){
2573 errno = EINVAL;
2574 return 1;
2575 }
2576
2577 *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
2578
2579 if (*ptr_yy_globals == NULL){
2580 errno = ENOMEM;
2581 return 1;
2582 }
2583
2584 /* By setting to 0xAA, we expose bugs in
2585 yy_init_globals. Leave at 0x00 for releases. */
2586 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2587
2588 yyset_extra (yy_user_defined, *ptr_yy_globals);
2589
2590 return yy_init_globals ( *ptr_yy_globals );
2591 }
2592
yy_init_globals(yyscan_t yyscanner)2593 static int yy_init_globals (yyscan_t yyscanner)
2594 {
2595 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2596 /* Initialization is the same as for the non-reentrant scanner.
2597 * This function is called from yylex_destroy(), so don't allocate here.
2598 */
2599
2600 yyg->yy_buffer_stack = 0;
2601 yyg->yy_buffer_stack_top = 0;
2602 yyg->yy_buffer_stack_max = 0;
2603 yyg->yy_c_buf_p = (char *) 0;
2604 yyg->yy_init = 0;
2605 yyg->yy_start = 0;
2606
2607 yyg->yy_start_stack_ptr = 0;
2608 yyg->yy_start_stack_depth = 0;
2609 yyg->yy_start_stack = NULL;
2610
2611 /* Defined in main.c */
2612 #ifdef YY_STDINIT
2613 yyin = stdin;
2614 yyout = stdout;
2615 #else
2616 yyin = (FILE *) 0;
2617 yyout = (FILE *) 0;
2618 #endif
2619
2620 /* For future reference: Set errno on error, since we are called by
2621 * yylex_init()
2622 */
2623 return 0;
2624 }
2625
2626 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
yylex_destroy(yyscan_t yyscanner)2627 int yylex_destroy (yyscan_t yyscanner)
2628 {
2629 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2630
2631 /* Pop the buffer stack, destroying each element. */
2632 while(YY_CURRENT_BUFFER){
2633 yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
2634 YY_CURRENT_BUFFER_LVALUE = NULL;
2635 yypop_buffer_state(yyscanner);
2636 }
2637
2638 /* Destroy the stack itself. */
2639 yyfree(yyg->yy_buffer_stack ,yyscanner);
2640 yyg->yy_buffer_stack = NULL;
2641
2642 /* Destroy the start condition stack. */
2643 yyfree(yyg->yy_start_stack ,yyscanner );
2644 yyg->yy_start_stack = NULL;
2645
2646 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2647 * yylex() is called, initialization will occur. */
2648 yy_init_globals( yyscanner);
2649
2650 /* Destroy the main struct (reentrant only). */
2651 yyfree ( yyscanner , yyscanner );
2652 yyscanner = NULL;
2653 return 0;
2654 }
2655
2656 /*
2657 * Internal utility routines.
2658 */
2659
2660 #ifndef yytext_ptr
yy_flex_strncpy(char * s1,yyconst char * s2,int n,yyscan_t yyscanner)2661 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
2662 {
2663 register int i;
2664 for ( i = 0; i < n; ++i )
2665 s1[i] = s2[i];
2666 }
2667 #endif
2668
2669 #ifdef YY_NEED_STRLEN
yy_flex_strlen(yyconst char * s,yyscan_t yyscanner)2670 static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
2671 {
2672 register int n;
2673 for ( n = 0; s[n]; ++n )
2674 ;
2675
2676 return n;
2677 }
2678 #endif
2679
yyalloc(yy_size_t size,yyscan_t yyscanner)2680 void *yyalloc (yy_size_t size , yyscan_t yyscanner)
2681 {
2682 return (void *) malloc( size );
2683 }
2684
yyrealloc(void * ptr,yy_size_t size,yyscan_t yyscanner)2685 void *yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
2686 {
2687 /* The cast to (char *) in the following accommodates both
2688 * implementations that use char* generic pointers, and those
2689 * that use void* generic pointers. It works with the latter
2690 * because both ANSI C and C++ allow castless assignment from
2691 * any pointer type to void*, and deal with argument conversions
2692 * as though doing an assignment.
2693 */
2694 return (void *) realloc( (char *) ptr, size );
2695 }
2696
yyfree(void * ptr,yyscan_t yyscanner)2697 void yyfree (void * ptr , yyscan_t yyscanner)
2698 {
2699 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2700 }
2701
2702 #define YYTABLES_NAME "yytables"
2703
2704 #line 135 "sphinxql.l"
2705
2706
2707
2708 // warning, lexer generator dependent!
2709 // flex inserts trailing zero as needed into the buffer when lexing
2710 // but we need that rolled back when doing error reporting from yyerror
yylex_unhold(yyscan_t yyscanner)2711 void yylex_unhold ( yyscan_t yyscanner )
2712 {
2713 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2714 if ( YY_CURRENT_BUFFER )
2715 {
2716 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2717 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2718 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2719 }
2720 }
2721
2722 #if USE_WINDOWS
2723 #pragma warning(pop)
2724 #endif
2725
2726