whistlepig 0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2249 @@
1
+ #line 2 "query-parser.lex.c"
2
+
3
+ #line 4 "query-parser.lex.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 query_parser_restart(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
+ /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
187
+ * access to the local variable yy_act. Since yyless() is a macro, it would break
188
+ * existing scanners that call yyless() from OUTSIDE query_parser_lex.
189
+ * One obvious solution it to make yy_act a global. I tried that, and saw
190
+ * a 5% performance hit in a non-yylineno scanner, because yy_act is
191
+ * normally declared as a register variable-- so it is not worth it.
192
+ */
193
+ #define YY_LESS_LINENO(n) \
194
+ do { \
195
+ int yyl;\
196
+ for ( yyl = n; yyl < yyleng; ++yyl )\
197
+ if ( yytext[yyl] == '\n' )\
198
+ --yylineno;\
199
+ }while(0)
200
+
201
+ /* Return all but the first "n" matched characters back to the input stream. */
202
+ #define yyless(n) \
203
+ do \
204
+ { \
205
+ /* Undo effects of setting up yytext. */ \
206
+ int yyless_macro_arg = (n); \
207
+ YY_LESS_LINENO(yyless_macro_arg);\
208
+ *yy_cp = yyg->yy_hold_char; \
209
+ YY_RESTORE_YY_MORE_OFFSET \
210
+ yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
211
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
212
+ } \
213
+ while ( 0 )
214
+
215
+ #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
216
+
217
+ #ifndef YY_TYPEDEF_YY_SIZE_T
218
+ #define YY_TYPEDEF_YY_SIZE_T
219
+ typedef size_t yy_size_t;
220
+ #endif
221
+
222
+ #ifndef YY_STRUCT_YY_BUFFER_STATE
223
+ #define YY_STRUCT_YY_BUFFER_STATE
224
+ struct yy_buffer_state
225
+ {
226
+ FILE *yy_input_file;
227
+
228
+ char *yy_ch_buf; /* input buffer */
229
+ char *yy_buf_pos; /* current position in input buffer */
230
+
231
+ /* Size of input buffer in bytes, not including room for EOB
232
+ * characters.
233
+ */
234
+ yy_size_t yy_buf_size;
235
+
236
+ /* Number of characters read into yy_ch_buf, not including EOB
237
+ * characters.
238
+ */
239
+ int yy_n_chars;
240
+
241
+ /* Whether we "own" the buffer - i.e., we know we created it,
242
+ * and can realloc() it to grow it, and should free() it to
243
+ * delete it.
244
+ */
245
+ int yy_is_our_buffer;
246
+
247
+ /* Whether this is an "interactive" input source; if so, and
248
+ * if we're using stdio for input, then we want to use getc()
249
+ * instead of fread(), to make sure we stop fetching input after
250
+ * each newline.
251
+ */
252
+ int yy_is_interactive;
253
+
254
+ /* Whether we're considered to be at the beginning of a line.
255
+ * If so, '^' rules will be active on the next match, otherwise
256
+ * not.
257
+ */
258
+ int yy_at_bol;
259
+
260
+ int yy_bs_lineno; /**< The line count. */
261
+ int yy_bs_column; /**< The column count. */
262
+
263
+ /* Whether to try to fill the input buffer when we reach the
264
+ * end of it.
265
+ */
266
+ int yy_fill_buffer;
267
+
268
+ int yy_buffer_status;
269
+
270
+ #define YY_BUFFER_NEW 0
271
+ #define YY_BUFFER_NORMAL 1
272
+ /* When an EOF's been seen but there's still some text to process
273
+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we
274
+ * shouldn't try reading from the input source any more. We might
275
+ * still have a bunch of tokens to match, though, because of
276
+ * possible backing-up.
277
+ *
278
+ * When we actually see the EOF, we change the status to "new"
279
+ * (via query_parser_restart()), so that the user can continue scanning by
280
+ * just pointing yyin at a new input file.
281
+ */
282
+ #define YY_BUFFER_EOF_PENDING 2
283
+
284
+ };
285
+ #endif /* !YY_STRUCT_YY_BUFFER_STATE */
286
+
287
+ /* We provide macros for accessing buffer states in case in the
288
+ * future we want to put the buffer states in a more general
289
+ * "scanner state".
290
+ *
291
+ * Returns the top of the stack, or NULL.
292
+ */
293
+ #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
294
+ ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
295
+ : NULL)
296
+
297
+ /* Same as previous macro, but useful when we know that the buffer stack is not
298
+ * NULL or when we need an lvalue. For internal use only.
299
+ */
300
+ #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
301
+
302
+ void query_parser_restart (FILE *input_file ,yyscan_t yyscanner );
303
+ void query_parser__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
304
+ YY_BUFFER_STATE query_parser__create_buffer (FILE *file,int size ,yyscan_t yyscanner );
305
+ void query_parser__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
306
+ void query_parser__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
307
+ void query_parser_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
308
+ void query_parser_pop_buffer_state (yyscan_t yyscanner );
309
+
310
+ static void query_parser_ensure_buffer_stack (yyscan_t yyscanner );
311
+ static void query_parser__load_buffer_state (yyscan_t yyscanner );
312
+ static void query_parser__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
313
+
314
+ #define YY_FLUSH_BUFFER query_parser__flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
315
+
316
+ YY_BUFFER_STATE query_parser__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
317
+ YY_BUFFER_STATE query_parser__scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
318
+ YY_BUFFER_STATE query_parser__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
319
+
320
+ void *query_parser_alloc (yy_size_t ,yyscan_t yyscanner );
321
+ void *query_parser_realloc (void *,yy_size_t ,yyscan_t yyscanner );
322
+ void query_parser_free (void * ,yyscan_t yyscanner );
323
+
324
+ #define yy_new_buffer query_parser__create_buffer
325
+
326
+ #define yy_set_interactive(is_interactive) \
327
+ { \
328
+ if ( ! YY_CURRENT_BUFFER ){ \
329
+ query_parser_ensure_buffer_stack (yyscanner); \
330
+ YY_CURRENT_BUFFER_LVALUE = \
331
+ query_parser__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
332
+ } \
333
+ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
334
+ }
335
+
336
+ #define yy_set_bol(at_bol) \
337
+ { \
338
+ if ( ! YY_CURRENT_BUFFER ){\
339
+ query_parser_ensure_buffer_stack (yyscanner); \
340
+ YY_CURRENT_BUFFER_LVALUE = \
341
+ query_parser__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
342
+ } \
343
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
344
+ }
345
+
346
+ #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
347
+
348
+ /* Begin user sect3 */
349
+
350
+ #define query_parser_wrap(n) 1
351
+ #define YY_SKIP_YYWRAP
352
+
353
+ typedef unsigned char YY_CHAR;
354
+
355
+ typedef yyconst struct yy_trans_info *yy_state_type;
356
+
357
+ #define yytext_ptr yytext_r
358
+
359
+ static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
360
+ static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
361
+ static int yy_get_next_buffer (yyscan_t yyscanner );
362
+ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
363
+
364
+ /* Done after the current pattern has been matched and before the
365
+ * corresponding action - sets up yytext.
366
+ */
367
+ #define YY_DO_BEFORE_ACTION \
368
+ yyg->yytext_ptr = yy_bp; \
369
+ yyleng = (size_t) (yy_cp - yy_bp); \
370
+ yyg->yy_hold_char = *yy_cp; \
371
+ *yy_cp = '\0'; \
372
+ yyg->yy_c_buf_p = yy_cp;
373
+
374
+ #define YY_NUM_RULES 6
375
+ #define YY_END_OF_BUFFER 7
376
+ struct yy_trans_info
377
+ {
378
+ flex_int16_t yy_verify;
379
+ flex_int16_t yy_nxt;
380
+ };
381
+ static yyconst struct yy_trans_info yy_transition[1498] =
382
+ {
383
+ { 0, 0 }, { 0,1242 }, { 0, 0 }, { 0,1240 }, { 1, 516 },
384
+ { 2, 516 }, { 3, 516 }, { 4, 516 }, { 5, 516 }, { 6, 516 },
385
+ { 7, 516 }, { 8, 516 }, { 9, 518 }, { 10, 520 }, { 11, 516 },
386
+ { 12, 516 }, { 13, 516 }, { 14, 516 }, { 15, 516 }, { 16, 516 },
387
+ { 17, 516 }, { 18, 516 }, { 19, 516 }, { 20, 516 }, { 21, 516 },
388
+ { 22, 516 }, { 23, 516 }, { 24, 516 }, { 25, 516 }, { 26, 516 },
389
+ { 27, 516 }, { 28, 516 }, { 29, 516 }, { 30, 516 }, { 31, 516 },
390
+ { 32, 518 }, { 33, 516 }, { 34, 516 }, { 35, 516 }, { 36, 516 },
391
+ { 37, 516 }, { 38, 516 }, { 39, 516 }, { 40, 516 }, { 41, 516 },
392
+ { 42, 516 }, { 43, 516 }, { 44, 516 }, { 45, 516 }, { 46, 516 },
393
+
394
+ { 47, 516 }, { 48, 522 }, { 49, 522 }, { 50, 522 }, { 51, 522 },
395
+ { 52, 522 }, { 53, 522 }, { 54, 522 }, { 55, 522 }, { 56, 522 },
396
+ { 57, 522 }, { 58, 516 }, { 59, 516 }, { 60, 516 }, { 61, 516 },
397
+ { 62, 516 }, { 63, 516 }, { 64, 516 }, { 65, 522 }, { 66, 522 },
398
+ { 67, 522 }, { 68, 522 }, { 69, 522 }, { 70, 522 }, { 71, 522 },
399
+ { 72, 522 }, { 73, 522 }, { 74, 522 }, { 75, 522 }, { 76, 522 },
400
+ { 77, 522 }, { 78, 522 }, { 79, 614 }, { 80, 522 }, { 81, 522 },
401
+ { 82, 522 }, { 83, 522 }, { 84, 522 }, { 85, 522 }, { 86, 522 },
402
+ { 87, 522 }, { 88, 522 }, { 89, 522 }, { 90, 522 }, { 91, 516 },
403
+ { 92, 516 }, { 93, 516 }, { 94, 516 }, { 95, 516 }, { 96, 516 },
404
+
405
+ { 97, 522 }, { 98, 522 }, { 99, 522 }, { 100, 522 }, { 101, 522 },
406
+ { 102, 522 }, { 103, 522 }, { 104, 522 }, { 105, 522 }, { 106, 522 },
407
+ { 107, 522 }, { 108, 522 }, { 109, 522 }, { 110, 522 }, { 111, 522 },
408
+ { 112, 522 }, { 113, 522 }, { 114, 522 }, { 115, 522 }, { 116, 522 },
409
+ { 117, 522 }, { 118, 522 }, { 119, 522 }, { 120, 522 }, { 121, 522 },
410
+ { 122, 522 }, { 123, 516 }, { 124, 516 }, { 125, 516 }, { 126, 516 },
411
+ { 127, 516 }, { 128, 516 }, { 129, 516 }, { 130, 516 }, { 131, 516 },
412
+ { 132, 516 }, { 133, 516 }, { 134, 516 }, { 135, 516 }, { 136, 516 },
413
+ { 137, 516 }, { 138, 516 }, { 139, 516 }, { 140, 516 }, { 141, 516 },
414
+ { 142, 516 }, { 143, 516 }, { 144, 516 }, { 145, 516 }, { 146, 516 },
415
+
416
+ { 147, 516 }, { 148, 516 }, { 149, 516 }, { 150, 516 }, { 151, 516 },
417
+ { 152, 516 }, { 153, 516 }, { 154, 516 }, { 155, 516 }, { 156, 516 },
418
+ { 157, 516 }, { 158, 516 }, { 159, 516 }, { 160, 516 }, { 161, 516 },
419
+ { 162, 516 }, { 163, 516 }, { 164, 516 }, { 165, 516 }, { 166, 516 },
420
+ { 167, 516 }, { 168, 516 }, { 169, 516 }, { 170, 516 }, { 171, 516 },
421
+ { 172, 516 }, { 173, 516 }, { 174, 516 }, { 175, 516 }, { 176, 516 },
422
+ { 177, 516 }, { 178, 516 }, { 179, 516 }, { 180, 516 }, { 181, 516 },
423
+ { 182, 516 }, { 183, 516 }, { 184, 516 }, { 185, 516 }, { 186, 516 },
424
+ { 187, 516 }, { 188, 516 }, { 189, 516 }, { 190, 516 }, { 191, 516 },
425
+ { 192, 516 }, { 193, 516 }, { 194, 516 }, { 195, 516 }, { 196, 516 },
426
+
427
+ { 197, 516 }, { 198, 516 }, { 199, 516 }, { 200, 516 }, { 201, 516 },
428
+ { 202, 516 }, { 203, 516 }, { 204, 516 }, { 205, 516 }, { 206, 516 },
429
+ { 207, 516 }, { 208, 516 }, { 209, 516 }, { 210, 516 }, { 211, 516 },
430
+ { 212, 516 }, { 213, 516 }, { 214, 516 }, { 215, 516 }, { 216, 516 },
431
+ { 217, 516 }, { 218, 516 }, { 219, 516 }, { 220, 516 }, { 221, 516 },
432
+ { 222, 516 }, { 223, 516 }, { 224, 516 }, { 225, 516 }, { 226, 516 },
433
+ { 227, 516 }, { 228, 516 }, { 229, 516 }, { 230, 516 }, { 231, 516 },
434
+ { 232, 516 }, { 233, 516 }, { 234, 516 }, { 235, 516 }, { 236, 516 },
435
+ { 237, 516 }, { 238, 516 }, { 239, 516 }, { 240, 516 }, { 241, 516 },
436
+ { 242, 516 }, { 243, 516 }, { 244, 516 }, { 245, 516 }, { 246, 516 },
437
+
438
+ { 247, 516 }, { 248, 516 }, { 249, 516 }, { 250, 516 }, { 251, 516 },
439
+ { 252, 516 }, { 253, 516 }, { 254, 516 }, { 255, 516 }, { 256, 516 },
440
+ { 0, 0 }, { 0, 982 }, { 1, 258 }, { 2, 258 }, { 3, 258 },
441
+ { 4, 258 }, { 5, 258 }, { 6, 258 }, { 7, 258 }, { 8, 258 },
442
+ { 9, 260 }, { 10, 262 }, { 11, 258 }, { 12, 258 }, { 13, 258 },
443
+ { 14, 258 }, { 15, 258 }, { 16, 258 }, { 17, 258 }, { 18, 258 },
444
+ { 19, 258 }, { 20, 258 }, { 21, 258 }, { 22, 258 }, { 23, 258 },
445
+ { 24, 258 }, { 25, 258 }, { 26, 258 }, { 27, 258 }, { 28, 258 },
446
+ { 29, 258 }, { 30, 258 }, { 31, 258 }, { 32, 260 }, { 33, 258 },
447
+ { 34, 258 }, { 35, 258 }, { 36, 258 }, { 37, 258 }, { 38, 258 },
448
+
449
+ { 39, 258 }, { 40, 258 }, { 41, 258 }, { 42, 258 }, { 43, 258 },
450
+ { 44, 258 }, { 45, 258 }, { 46, 258 }, { 47, 258 }, { 48, 264 },
451
+ { 49, 264 }, { 50, 264 }, { 51, 264 }, { 52, 264 }, { 53, 264 },
452
+ { 54, 264 }, { 55, 264 }, { 56, 264 }, { 57, 264 }, { 58, 258 },
453
+ { 59, 258 }, { 60, 258 }, { 61, 258 }, { 62, 258 }, { 63, 258 },
454
+ { 64, 258 }, { 65, 264 }, { 66, 264 }, { 67, 264 }, { 68, 264 },
455
+ { 69, 264 }, { 70, 264 }, { 71, 264 }, { 72, 264 }, { 73, 264 },
456
+ { 74, 264 }, { 75, 264 }, { 76, 264 }, { 77, 264 }, { 78, 264 },
457
+ { 79, 356 }, { 80, 264 }, { 81, 264 }, { 82, 264 }, { 83, 264 },
458
+ { 84, 264 }, { 85, 264 }, { 86, 264 }, { 87, 264 }, { 88, 264 },
459
+
460
+ { 89, 264 }, { 90, 264 }, { 91, 258 }, { 92, 258 }, { 93, 258 },
461
+ { 94, 258 }, { 95, 258 }, { 96, 258 }, { 97, 264 }, { 98, 264 },
462
+ { 99, 264 }, { 100, 264 }, { 101, 264 }, { 102, 264 }, { 103, 264 },
463
+ { 104, 264 }, { 105, 264 }, { 106, 264 }, { 107, 264 }, { 108, 264 },
464
+ { 109, 264 }, { 110, 264 }, { 111, 264 }, { 112, 264 }, { 113, 264 },
465
+ { 114, 264 }, { 115, 264 }, { 116, 264 }, { 117, 264 }, { 118, 264 },
466
+ { 119, 264 }, { 120, 264 }, { 121, 264 }, { 122, 264 }, { 123, 258 },
467
+ { 124, 258 }, { 125, 258 }, { 126, 258 }, { 127, 258 }, { 128, 258 },
468
+ { 129, 258 }, { 130, 258 }, { 131, 258 }, { 132, 258 }, { 133, 258 },
469
+ { 134, 258 }, { 135, 258 }, { 136, 258 }, { 137, 258 }, { 138, 258 },
470
+
471
+ { 139, 258 }, { 140, 258 }, { 141, 258 }, { 142, 258 }, { 143, 258 },
472
+ { 144, 258 }, { 145, 258 }, { 146, 258 }, { 147, 258 }, { 148, 258 },
473
+ { 149, 258 }, { 150, 258 }, { 151, 258 }, { 152, 258 }, { 153, 258 },
474
+ { 154, 258 }, { 155, 258 }, { 156, 258 }, { 157, 258 }, { 158, 258 },
475
+ { 159, 258 }, { 160, 258 }, { 161, 258 }, { 162, 258 }, { 163, 258 },
476
+ { 164, 258 }, { 165, 258 }, { 166, 258 }, { 167, 258 }, { 168, 258 },
477
+ { 169, 258 }, { 170, 258 }, { 171, 258 }, { 172, 258 }, { 173, 258 },
478
+ { 174, 258 }, { 175, 258 }, { 176, 258 }, { 177, 258 }, { 178, 258 },
479
+ { 179, 258 }, { 180, 258 }, { 181, 258 }, { 182, 258 }, { 183, 258 },
480
+ { 184, 258 }, { 185, 258 }, { 186, 258 }, { 187, 258 }, { 188, 258 },
481
+
482
+ { 189, 258 }, { 190, 258 }, { 191, 258 }, { 192, 258 }, { 193, 258 },
483
+ { 194, 258 }, { 195, 258 }, { 196, 258 }, { 197, 258 }, { 198, 258 },
484
+ { 199, 258 }, { 200, 258 }, { 201, 258 }, { 202, 258 }, { 203, 258 },
485
+ { 204, 258 }, { 205, 258 }, { 206, 258 }, { 207, 258 }, { 208, 258 },
486
+ { 209, 258 }, { 210, 258 }, { 211, 258 }, { 212, 258 }, { 213, 258 },
487
+ { 214, 258 }, { 215, 258 }, { 216, 258 }, { 217, 258 }, { 218, 258 },
488
+ { 219, 258 }, { 220, 258 }, { 221, 258 }, { 222, 258 }, { 223, 258 },
489
+ { 224, 258 }, { 225, 258 }, { 226, 258 }, { 227, 258 }, { 228, 258 },
490
+ { 229, 258 }, { 230, 258 }, { 231, 258 }, { 232, 258 }, { 233, 258 },
491
+ { 234, 258 }, { 235, 258 }, { 236, 258 }, { 237, 258 }, { 238, 258 },
492
+
493
+ { 239, 258 }, { 240, 258 }, { 241, 258 }, { 242, 258 }, { 243, 258 },
494
+ { 244, 258 }, { 245, 258 }, { 246, 258 }, { 247, 258 }, { 248, 258 },
495
+ { 249, 258 }, { 250, 258 }, { 251, 258 }, { 252, 258 }, { 253, 258 },
496
+ { 254, 258 }, { 255, 258 }, { 256, 258 }, { 0, 5 }, { 0, 724 },
497
+ { 0, 4 }, { 0, 722 }, { 0, 4 }, { 0, 720 }, { 0, 3 },
498
+ { 0, 718 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
499
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
500
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
501
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
502
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
503
+
504
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
505
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
506
+ { 35, 184 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 39, 276 },
507
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
508
+ { 45, 184 }, { 46, 276 }, { 47, 276 }, { 48, 184 }, { 49, 184 },
509
+ { 50, 184 }, { 51, 184 }, { 52, 184 }, { 53, 184 }, { 54, 184 },
510
+ { 55, 184 }, { 56, 184 }, { 57, 184 }, { 0, 0 }, { 0, 0 },
511
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 64, 184 },
512
+ { 65, 184 }, { 66, 184 }, { 67, 184 }, { 68, 184 }, { 69, 184 },
513
+ { 70, 184 }, { 71, 184 }, { 72, 184 }, { 73, 184 }, { 74, 184 },
514
+
515
+ { 75, 184 }, { 76, 184 }, { 77, 184 }, { 78, 184 }, { 79, 184 },
516
+ { 80, 184 }, { 81, 184 }, { 82, 184 }, { 83, 184 }, { 84, 184 },
517
+ { 85, 184 }, { 86, 184 }, { 87, 184 }, { 88, 184 }, { 89, 184 },
518
+ { 90, 184 }, { 0, 3 }, { 0, 626 }, { 0, 0 }, { 0, 0 },
519
+ { 95, 184 }, { 0, 0 }, { 97, 184 }, { 98, 184 }, { 99, 184 },
520
+ { 100, 184 }, { 101, 184 }, { 102, 184 }, { 103, 184 }, { 104, 184 },
521
+ { 105, 184 }, { 106, 184 }, { 107, 184 }, { 108, 184 }, { 109, 184 },
522
+ { 110, 184 }, { 111, 184 }, { 112, 184 }, { 113, 184 }, { 114, 184 },
523
+ { 115, 184 }, { 116, 184 }, { 117, 184 }, { 118, 184 }, { 119, 184 },
524
+ { 120, 184 }, { 121, 184 }, { 122, 184 }, { 0, 0 }, { 0, 0 },
525
+
526
+ { 0, 0 }, { 0, 0 }, { 35, 92 }, { 0, 0 }, { 0, 0 },
527
+ { 0, 0 }, { 39, 184 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
528
+ { 0, 0 }, { 0, 0 }, { 45, 92 }, { 46, 184 }, { 47, 184 },
529
+ { 48, 92 }, { 49, 92 }, { 50, 92 }, { 51, 92 }, { 52, 92 },
530
+ { 53, 92 }, { 54, 92 }, { 55, 92 }, { 56, 92 }, { 57, 92 },
531
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
532
+ { 0, 0 }, { 64, 92 }, { 65, 92 }, { 66, 92 }, { 67, 92 },
533
+ { 68, 92 }, { 69, 92 }, { 70, 92 }, { 71, 92 }, { 72, 92 },
534
+ { 73, 92 }, { 74, 92 }, { 75, 92 }, { 76, 92 }, { 77, 92 },
535
+ { 78, 92 }, { 79, 92 }, { 80, 92 }, { 81, 92 }, { 82, 276 },
536
+
537
+ { 83, 92 }, { 84, 92 }, { 85, 92 }, { 86, 92 }, { 87, 92 },
538
+ { 88, 92 }, { 89, 92 }, { 90, 92 }, { 0, 2 }, { 0, 534 },
539
+ { 0, 0 }, { 0, 0 }, { 95, 92 }, { 0, 0 }, { 97, 92 },
540
+ { 98, 92 }, { 99, 92 }, { 100, 92 }, { 101, 92 }, { 102, 92 },
541
+ { 103, 92 }, { 104, 92 }, { 105, 92 }, { 106, 92 }, { 107, 92 },
542
+ { 108, 92 }, { 109, 92 }, { 110, 92 }, { 111, 92 }, { 112, 92 },
543
+ { 113, 92 }, { 114, 92 }, { 115, 92 }, { 116, 92 }, { 117, 92 },
544
+ { 118, 92 }, { 119, 92 }, { 120, 92 }, { 121, 92 }, { 122, 92 },
545
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 35, 276 },
546
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 39, 92 }, { 0, 0 },
547
+
548
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 45, 276 },
549
+ { 46, 92 }, { 47, 92 }, { 48, 276 }, { 49, 276 }, { 50, 276 },
550
+ { 51, 276 }, { 52, 276 }, { 53, 276 }, { 54, 276 }, { 55, 276 },
551
+ { 56, 276 }, { 57, 276 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
552
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 64, 276 }, { 65, 276 },
553
+ { 66, 276 }, { 67, 276 }, { 68, 276 }, { 69, 276 }, { 70, 276 },
554
+ { 71, 276 }, { 72, 276 }, { 73, 276 }, { 74, 276 }, { 75, 276 },
555
+ { 76, 276 }, { 77, 276 }, { 78, 276 }, { 79, 276 }, { 80, 276 },
556
+ { 81, 276 }, { 82, 276 }, { 83, 276 }, { 84, 276 }, { 85, 276 },
557
+ { 86, 276 }, { 87, 276 }, { 88, 276 }, { 89, 276 }, { 90, 276 },
558
+
559
+ { 0, 0 }, { 0, 442 }, { 0, 0 }, { 0, 0 }, { 95, 276 },
560
+ { 0, 0 }, { 97, 276 }, { 98, 276 }, { 99, 276 }, { 100, 276 },
561
+ { 101, 276 }, { 102, 276 }, { 103, 276 }, { 104, 276 }, { 105, 276 },
562
+ { 106, 276 }, { 107, 276 }, { 108, 276 }, { 109, 276 }, { 110, 276 },
563
+ { 111, 276 }, { 112, 276 }, { 113, 276 }, { 114, 276 }, { 115, 276 },
564
+ { 116, 276 }, { 117, 276 }, { 118, 276 }, { 119, 276 }, { 120, 276 },
565
+ { 121, 276 }, { 122, 276 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
566
+ { 0, 0 }, { 35, 184 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
567
+ { 39, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
568
+ { 0, 0 }, { 45, 184 }, { 46, 0 }, { 47, 0 }, { 48, 184 },
569
+
570
+ { 49, 184 }, { 50, 184 }, { 51, 184 }, { 52, 184 }, { 53, 184 },
571
+ { 54, 184 }, { 55, 184 }, { 56, 184 }, { 57, 184 }, { 0, 0 },
572
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
573
+ { 64, 184 }, { 65, 184 }, { 66, 184 }, { 67, 184 }, { 68, 184 },
574
+ { 69, 184 }, { 70, 184 }, { 71, 184 }, { 72, 184 }, { 73, 184 },
575
+ { 74, 184 }, { 75, 184 }, { 76, 184 }, { 77, 184 }, { 78, 184 },
576
+ { 79, 184 }, { 80, 184 }, { 81, 184 }, { 82, 184 }, { 83, 184 },
577
+ { 84, 184 }, { 85, 184 }, { 86, 184 }, { 87, 184 }, { 88, 184 },
578
+ { 89, 184 }, { 90, 184 }, { 0, 1 }, { 0, 350 }, { 0, 0 },
579
+ { 0, 0 }, { 95, 184 }, { 0, 0 }, { 97, 184 }, { 98, 184 },
580
+
581
+ { 99, 184 }, { 100, 184 }, { 101, 184 }, { 102, 184 }, { 103, 184 },
582
+ { 104, 184 }, { 105, 184 }, { 106, 184 }, { 107, 184 }, { 108, 184 },
583
+ { 109, 184 }, { 110, 184 }, { 111, 184 }, { 112, 184 }, { 113, 184 },
584
+ { 114, 184 }, { 115, 184 }, { 116, 184 }, { 117, 184 }, { 118, 184 },
585
+ { 119, 184 }, { 120, 184 }, { 121, 184 }, { 122, 184 }, { 0, 0 },
586
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 35, 92 }, { 0, 0 },
587
+ { 0, 0 }, { 0, 0 }, { 39, -92 }, { 0, 0 }, { 0, 0 },
588
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 45, 92 }, { 46, -92 },
589
+ { 47, -92 }, { 48, 92 }, { 49, 92 }, { 50, 92 }, { 51, 92 },
590
+ { 52, 92 }, { 53, 92 }, { 54, 92 }, { 55, 92 }, { 56, 92 },
591
+
592
+ { 57, 92 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
593
+ { 0, 0 }, { 0, 0 }, { 64, 92 }, { 65, 92 }, { 66, 92 },
594
+ { 67, 92 }, { 68, 92 }, { 69, 92 }, { 70, 92 }, { 71, 92 },
595
+ { 72, 92 }, { 73, 92 }, { 74, 92 }, { 75, 92 }, { 76, 92 },
596
+ { 77, 92 }, { 78, 92 }, { 79, 92 }, { 80, 92 }, { 81, 92 },
597
+ { 82, 92 }, { 83, 92 }, { 84, 92 }, { 85, 92 }, { 86, 92 },
598
+ { 87, 92 }, { 88, 92 }, { 89, 92 }, { 90, 92 }, { 0, 2 },
599
+ { 0, 258 }, { 0, 0 }, { 0, 0 }, { 95, 92 }, { 0, 0 },
600
+ { 97, 92 }, { 98, 92 }, { 99, 92 }, { 100, 92 }, { 101, 92 },
601
+ { 102, 92 }, { 103, 92 }, { 104, 92 }, { 105, 92 }, { 106, 92 },
602
+
603
+ { 107, 92 }, { 108, 92 }, { 109, 92 }, { 110, 92 }, { 111, 92 },
604
+ { 112, 92 }, { 113, 92 }, { 114, 92 }, { 115, 92 }, { 116, 92 },
605
+ { 117, 92 }, { 118, 92 }, { 119, 92 }, { 120, 92 }, { 121, 92 },
606
+ { 122, 92 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
607
+ { 35, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 39,-184 },
608
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
609
+ { 45, 0 }, { 46,-184 }, { 47,-184 }, { 48, 0 }, { 49, 0 },
610
+ { 50, 0 }, { 51, 0 }, { 52, 0 }, { 53, 0 }, { 54, 0 },
611
+ { 55, 0 }, { 56, 0 }, { 57, 0 }, { 0, 0 }, { 0, 0 },
612
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 64, 0 },
613
+
614
+ { 65, 0 }, { 66, 0 }, { 67, 0 }, { 68, 0 }, { 69, 0 },
615
+ { 70, 0 }, { 71, 0 }, { 72, 0 }, { 73, 0 }, { 74, 0 },
616
+ { 75, 0 }, { 76, 0 }, { 77, 0 }, { 78, 0 }, { 79, 0 },
617
+ { 80, 0 }, { 81, 0 }, { 82, 0 }, { 83, 0 }, { 84, 0 },
618
+ { 85, 0 }, { 86, 0 }, { 87, 0 }, { 88, 0 }, { 89, 0 },
619
+ { 90, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
620
+ { 95, 0 }, { 0, 0 }, { 97, 0 }, { 98, 0 }, { 99, 0 },
621
+ { 100, 0 }, { 101, 0 }, { 102, 0 }, { 103, 0 }, { 104, 0 },
622
+ { 105, 0 }, { 106, 0 }, { 107, 0 }, { 108, 0 }, { 109, 0 },
623
+ { 110, 0 }, { 111, 0 }, { 112, 0 }, { 113, 0 }, { 114, 0 },
624
+
625
+ { 115, 0 }, { 116, 0 }, { 117, 0 }, { 118, 0 }, { 119, 0 },
626
+ { 120, 0 }, { 121, 0 }, { 122, 0 }, { 0, 0 }, { 0, 0 },
627
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
628
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
629
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
630
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
631
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
632
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
633
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
634
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
635
+
636
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
637
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
638
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
639
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
640
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
641
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
642
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
643
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
644
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
645
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
646
+
647
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
648
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
649
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
650
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
651
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
652
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
653
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
654
+ { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 },
655
+ { 0, 0 }, { 0, 0 }, { 257, 7 }, { 1, 0 }, };
656
+
657
+ static yyconst struct yy_trans_info *yy_start_state_list[3] =
658
+ {
659
+ &yy_transition[1],
660
+ &yy_transition[3],
661
+ &yy_transition[261],
662
+
663
+ } ;
664
+
665
+ /* Table of booleans, true if rule could match eol. */
666
+ static yyconst flex_int32_t yy_rule_can_match_eol[7] =
667
+ { 0,
668
+ 0, 0, 0, 1, 0, 0, };
669
+
670
+ /* The intent behind this definition is that it'll catch
671
+ * any uses of REJECT which flex missed.
672
+ */
673
+ #define REJECT reject_used_but_not_detected
674
+ #define yymore() yymore_used_but_not_detected
675
+ #define YY_MORE_ADJ 0
676
+ #define YY_RESTORE_YY_MORE_OFFSET
677
+ #line 1 "query-parser.lex"
678
+ #line 2 "query-parser.lex"
679
+ #include <string.h>
680
+ #include "query-parser.h"
681
+ #include "query-parser.tab.h"
682
+
683
+ #define YY_EXTRA_TYPE query_parse_context*
684
+ #define YY_USER_ACTION yylloc->first_line = yylineno;
685
+
686
+ #define YY_INPUT(buf,result,max_size) \
687
+ { \
688
+ if(yyextra->input[0] == 0) \
689
+ result = YY_NULL; \
690
+ else { \
691
+ buf[0] = yyextra->input[0]; \
692
+ yyextra->input++; \
693
+ result = 1; \
694
+ } \
695
+ }
696
+
697
+ #line 698 "query-parser.lex.c"
698
+
699
+ #define INITIAL 0
700
+
701
+ #ifndef YY_NO_UNISTD_H
702
+ /* Special case for "unistd.h", since it is non-ANSI. We include it way
703
+ * down here because we want the user's section 1 to have been scanned first.
704
+ * The user has a chance to override it with an option.
705
+ */
706
+ #include <unistd.h>
707
+ #endif
708
+
709
+ #ifndef YY_EXTRA_TYPE
710
+ #define YY_EXTRA_TYPE void *
711
+ #endif
712
+
713
+ /* Holds the entire state of the reentrant scanner. */
714
+ struct yyguts_t
715
+ {
716
+
717
+ /* User-defined. Not touched by flex. */
718
+ YY_EXTRA_TYPE yyextra_r;
719
+
720
+ /* The rest are the same as the globals declared in the non-reentrant scanner. */
721
+ FILE *yyin_r, *yyout_r;
722
+ size_t yy_buffer_stack_top; /**< index of top of stack. */
723
+ size_t yy_buffer_stack_max; /**< capacity of stack. */
724
+ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
725
+ char yy_hold_char;
726
+ int yy_n_chars;
727
+ int yyleng_r;
728
+ char *yy_c_buf_p;
729
+ int yy_init;
730
+ int yy_start;
731
+ int yy_did_buffer_switch_on_eof;
732
+ int yy_start_stack_ptr;
733
+ int yy_start_stack_depth;
734
+ int *yy_start_stack;
735
+ yy_state_type yy_last_accepting_state;
736
+ char* yy_last_accepting_cpos;
737
+
738
+ int yylineno_r;
739
+ int yy_flex_debug_r;
740
+
741
+ char *yytext_r;
742
+ int yy_more_flag;
743
+ int yy_more_len;
744
+
745
+ YYSTYPE * yylval_r;
746
+
747
+ YYLTYPE * yylloc_r;
748
+
749
+ }; /* end struct yyguts_t */
750
+
751
+ static int yy_init_globals (yyscan_t yyscanner );
752
+
753
+ /* This must go here because YYSTYPE and YYLTYPE are included
754
+ * from bison output in section 1.*/
755
+ # define yylval yyg->yylval_r
756
+
757
+ # define yylloc yyg->yylloc_r
758
+
759
+ int query_parser_lex_init (yyscan_t* scanner);
760
+
761
+ int query_parser_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
762
+
763
+ /* Accessor methods to globals.
764
+ These are made visible to non-reentrant scanners for convenience. */
765
+
766
+ int query_parser_lex_destroy (yyscan_t yyscanner );
767
+
768
+ int query_parser_get_debug (yyscan_t yyscanner );
769
+
770
+ void query_parser_set_debug (int debug_flag ,yyscan_t yyscanner );
771
+
772
+ YY_EXTRA_TYPE query_parser_get_extra (yyscan_t yyscanner );
773
+
774
+ void query_parser_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
775
+
776
+ FILE *query_parser_get_in (yyscan_t yyscanner );
777
+
778
+ void query_parser_set_in (FILE * in_str ,yyscan_t yyscanner );
779
+
780
+ FILE *query_parser_get_out (yyscan_t yyscanner );
781
+
782
+ void query_parser_set_out (FILE * out_str ,yyscan_t yyscanner );
783
+
784
+ int query_parser_get_leng (yyscan_t yyscanner );
785
+
786
+ char *query_parser_get_text (yyscan_t yyscanner );
787
+
788
+ int query_parser_get_lineno (yyscan_t yyscanner );
789
+
790
+ void query_parser_set_lineno (int line_number ,yyscan_t yyscanner );
791
+
792
+ YYSTYPE * query_parser_get_lval (yyscan_t yyscanner );
793
+
794
+ void query_parser_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
795
+
796
+ YYLTYPE *query_parser_get_lloc (yyscan_t yyscanner );
797
+
798
+ void query_parser_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
799
+
800
+ /* Macros after this point can all be overridden by user definitions in
801
+ * section 1.
802
+ */
803
+
804
+ #ifndef YY_SKIP_YYWRAP
805
+ #ifdef __cplusplus
806
+ extern "C" int query_parser_wrap (yyscan_t yyscanner );
807
+ #else
808
+ extern int query_parser_wrap (yyscan_t yyscanner );
809
+ #endif
810
+ #endif
811
+
812
+ static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner);
813
+
814
+ #ifndef yytext_ptr
815
+ static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
816
+ #endif
817
+
818
+ #ifdef YY_NEED_STRLEN
819
+ static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
820
+ #endif
821
+
822
+ #ifndef YY_NO_INPUT
823
+
824
+ #ifdef __cplusplus
825
+ static int yyinput (yyscan_t yyscanner );
826
+ #else
827
+ static int input (yyscan_t yyscanner );
828
+ #endif
829
+
830
+ #endif
831
+
832
+ /* Amount of stuff to slurp up with each read. */
833
+ #ifndef YY_READ_BUF_SIZE
834
+ #ifdef __ia64__
835
+ /* On IA-64, the buffer size is 16k, not 8k */
836
+ #define YY_READ_BUF_SIZE 16384
837
+ #else
838
+ #define YY_READ_BUF_SIZE 8192
839
+ #endif /* __ia64__ */
840
+ #endif
841
+
842
+ /* Copy whatever the last rule matched to the standard output. */
843
+ #ifndef ECHO
844
+ /* This used to be an fputs(), but since the string might contain NUL's,
845
+ * we now use fwrite().
846
+ */
847
+ #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
848
+ #endif
849
+
850
+ /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
851
+ * is returned in "result".
852
+ */
853
+ #ifndef YY_INPUT
854
+ #define YY_INPUT(buf,result,max_size) \
855
+ errno=0; \
856
+ while ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \
857
+ { \
858
+ if( errno != EINTR) \
859
+ { \
860
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
861
+ break; \
862
+ } \
863
+ errno=0; \
864
+ clearerr(yyin); \
865
+ }\
866
+ \
867
+
868
+ #endif
869
+
870
+ /* No semi-colon after return; correct usage is to write "yyterminate();" -
871
+ * we don't want an extra ';' after the "return" because that will cause
872
+ * some compilers to complain about unreachable statements.
873
+ */
874
+ #ifndef yyterminate
875
+ #define yyterminate() return YY_NULL
876
+ #endif
877
+
878
+ /* Number of entries by which start-condition stack grows. */
879
+ #ifndef YY_START_STACK_INCR
880
+ #define YY_START_STACK_INCR 25
881
+ #endif
882
+
883
+ /* Report a fatal error. */
884
+ #ifndef YY_FATAL_ERROR
885
+ #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
886
+ #endif
887
+
888
+ /* end tables serialization structures and prototypes */
889
+
890
+ /* Default declaration of generated scanner - a define so the user can
891
+ * easily add parameters.
892
+ */
893
+ #ifndef YY_DECL
894
+ #define YY_DECL_IS_OURS 1
895
+
896
+ extern int query_parser_lex \
897
+ (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
898
+
899
+ #define YY_DECL int query_parser_lex \
900
+ (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
901
+ #endif /* !YY_DECL */
902
+
903
+ /* Code executed at the beginning of each rule, after yytext and yyleng
904
+ * have been set up.
905
+ */
906
+ #ifndef YY_USER_ACTION
907
+ #define YY_USER_ACTION
908
+ #endif
909
+
910
+ /* Code executed at the end of each rule. */
911
+ #ifndef YY_BREAK
912
+ #define YY_BREAK break;
913
+ #endif
914
+
915
+ #define YY_RULE_SETUP \
916
+ YY_USER_ACTION
917
+
918
+ /** The main scanner function which does all the work.
919
+ */
920
+ YY_DECL
921
+ {
922
+ register yy_state_type yy_current_state;
923
+ register char *yy_cp, *yy_bp;
924
+ register int yy_act;
925
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
926
+
927
+ #line 31 "query-parser.lex"
928
+
929
+
930
+ #line 931 "query-parser.lex.c"
931
+
932
+ yylval = yylval_param;
933
+
934
+ yylloc = yylloc_param;
935
+
936
+ if ( !yyg->yy_init )
937
+ {
938
+ yyg->yy_init = 1;
939
+
940
+ #ifdef YY_USER_INIT
941
+ YY_USER_INIT;
942
+ #endif
943
+
944
+ if ( ! yyg->yy_start )
945
+ yyg->yy_start = 1; /* first start state */
946
+
947
+ if ( ! yyin )
948
+ yyin = stdin;
949
+
950
+ if ( ! yyout )
951
+ yyout = stdout;
952
+
953
+ if ( ! YY_CURRENT_BUFFER ) {
954
+ query_parser_ensure_buffer_stack (yyscanner);
955
+ YY_CURRENT_BUFFER_LVALUE =
956
+ query_parser__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
957
+ }
958
+
959
+ query_parser__load_buffer_state(yyscanner );
960
+ }
961
+
962
+ while ( 1 ) /* loops until end-of-file is reached */
963
+ {
964
+ yy_cp = yyg->yy_c_buf_p;
965
+
966
+ /* Support of yytext. */
967
+ *yy_cp = yyg->yy_hold_char;
968
+
969
+ /* yy_bp points to the position in yy_ch_buf of the start of
970
+ * the current run.
971
+ */
972
+ yy_bp = yy_cp;
973
+
974
+ yy_current_state = yy_start_state_list[yyg->yy_start];
975
+ yy_match:
976
+ {
977
+ register yyconst struct yy_trans_info *yy_trans_info;
978
+
979
+ register YY_CHAR yy_c;
980
+
981
+ for ( yy_c = YY_SC_TO_UI(*yy_cp);
982
+ (yy_trans_info = &yy_current_state[(unsigned int) yy_c])->
983
+ yy_verify == yy_c;
984
+ yy_c = YY_SC_TO_UI(*++yy_cp) )
985
+ {
986
+ yy_current_state += yy_trans_info->yy_nxt;
987
+
988
+ if ( yy_current_state[-1].yy_nxt )
989
+ {
990
+ yyg->yy_last_accepting_state = yy_current_state;
991
+ yyg->yy_last_accepting_cpos = yy_cp;
992
+ }
993
+ }
994
+ }
995
+
996
+ yy_find_action:
997
+ yy_act = yy_current_state[-1].yy_nxt;
998
+
999
+ YY_DO_BEFORE_ACTION;
1000
+
1001
+ if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
1002
+ {
1003
+ int yyl;
1004
+ for ( yyl = 0; yyl < yyleng; ++yyl )
1005
+ if ( yytext[yyl] == '\n' )
1006
+
1007
+ do{ yylineno++;
1008
+ yycolumn=0;
1009
+ }while(0)
1010
+ ;
1011
+ }
1012
+
1013
+ do_action: /* This label is used only to access EOF actions. */
1014
+
1015
+ switch ( yy_act )
1016
+ { /* beginning of action switch */
1017
+ case 0: /* must back up */
1018
+ /* undo the effects of YY_DO_BEFORE_ACTION */
1019
+ *yy_cp = yyg->yy_hold_char;
1020
+ yy_cp = yyg->yy_last_accepting_cpos + 1;
1021
+ yy_current_state = yyg->yy_last_accepting_state;
1022
+ goto yy_find_action;
1023
+
1024
+ case 1:
1025
+ YY_RULE_SETUP
1026
+ #line 33 "query-parser.lex"
1027
+ return OR;
1028
+ YY_BREAK
1029
+ case 2:
1030
+ YY_RULE_SETUP
1031
+ #line 35 "query-parser.lex"
1032
+ {
1033
+ yylval->string = strdup(yytext);
1034
+ return WORD;
1035
+ }
1036
+ YY_BREAK
1037
+ case 3:
1038
+ YY_RULE_SETUP
1039
+ #line 40 "query-parser.lex"
1040
+ {
1041
+ yylval->string = strdup(yytext);
1042
+ return WORD;
1043
+ }
1044
+ YY_BREAK
1045
+ case 4:
1046
+ /* rule 4 can match eol */
1047
+ YY_RULE_SETUP
1048
+ #line 45 "query-parser.lex"
1049
+ { } ; // nothing
1050
+ YY_BREAK
1051
+ case 5:
1052
+ YY_RULE_SETUP
1053
+ #line 47 "query-parser.lex"
1054
+ return yytext[0];
1055
+ YY_BREAK
1056
+ case 6:
1057
+ YY_RULE_SETUP
1058
+ #line 49 "query-parser.lex"
1059
+ ECHO;
1060
+ YY_BREAK
1061
+ #line 1062 "query-parser.lex.c"
1062
+ case YY_STATE_EOF(INITIAL):
1063
+ yyterminate();
1064
+
1065
+ case YY_END_OF_BUFFER:
1066
+ {
1067
+ /* Amount of text matched not including the EOB char. */
1068
+ int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1069
+
1070
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
1071
+ *yy_cp = yyg->yy_hold_char;
1072
+ YY_RESTORE_YY_MORE_OFFSET
1073
+
1074
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1075
+ {
1076
+ /* We're scanning a new file or input source. It's
1077
+ * possible that this happened because the user
1078
+ * just pointed yyin at a new source and called
1079
+ * query_parser_lex(). If so, then we have to assure
1080
+ * consistency between YY_CURRENT_BUFFER and our
1081
+ * globals. Here is the right place to do so, because
1082
+ * this is the first action (other than possibly a
1083
+ * back-up) that will match for the new input source.
1084
+ */
1085
+ yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1086
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1087
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1088
+ }
1089
+
1090
+ /* Note that here we test for yy_c_buf_p "<=" to the position
1091
+ * of the first EOB in the buffer, since yy_c_buf_p will
1092
+ * already have been incremented past the NUL character
1093
+ * (since all states make transitions on EOB to the
1094
+ * end-of-buffer state). Contrast this with the test
1095
+ * in input().
1096
+ */
1097
+ if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1098
+ { /* This was really a NUL. */
1099
+ yy_state_type yy_next_state;
1100
+
1101
+ yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1102
+
1103
+ yy_current_state = yy_get_previous_state( yyscanner );
1104
+
1105
+ /* Okay, we're now positioned to make the NUL
1106
+ * transition. We couldn't have
1107
+ * yy_get_previous_state() go ahead and do it
1108
+ * for us because it doesn't know how to deal
1109
+ * with the possibility of jamming (and we don't
1110
+ * want to build jamming into it because then it
1111
+ * will run more slowly).
1112
+ */
1113
+
1114
+ yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1115
+
1116
+ yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1117
+
1118
+ if ( yy_next_state )
1119
+ {
1120
+ /* Consume the NUL. */
1121
+ yy_cp = ++yyg->yy_c_buf_p;
1122
+ yy_current_state = yy_next_state;
1123
+ goto yy_match;
1124
+ }
1125
+
1126
+ else
1127
+ {
1128
+ yy_cp = yyg->yy_c_buf_p;
1129
+ goto yy_find_action;
1130
+ }
1131
+ }
1132
+
1133
+ else switch ( yy_get_next_buffer( yyscanner ) )
1134
+ {
1135
+ case EOB_ACT_END_OF_FILE:
1136
+ {
1137
+ yyg->yy_did_buffer_switch_on_eof = 0;
1138
+
1139
+ if ( query_parser_wrap(yyscanner ) )
1140
+ {
1141
+ /* Note: because we've taken care in
1142
+ * yy_get_next_buffer() to have set up
1143
+ * yytext, we can now set up
1144
+ * yy_c_buf_p so that if some total
1145
+ * hoser (like flex itself) wants to
1146
+ * call the scanner after we return the
1147
+ * YY_NULL, it'll still work - another
1148
+ * YY_NULL will get returned.
1149
+ */
1150
+ yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1151
+
1152
+ yy_act = YY_STATE_EOF(YY_START);
1153
+ goto do_action;
1154
+ }
1155
+
1156
+ else
1157
+ {
1158
+ if ( ! yyg->yy_did_buffer_switch_on_eof )
1159
+ YY_NEW_FILE;
1160
+ }
1161
+ break;
1162
+ }
1163
+
1164
+ case EOB_ACT_CONTINUE_SCAN:
1165
+ yyg->yy_c_buf_p =
1166
+ yyg->yytext_ptr + yy_amount_of_matched_text;
1167
+
1168
+ yy_current_state = yy_get_previous_state( yyscanner );
1169
+
1170
+ yy_cp = yyg->yy_c_buf_p;
1171
+ yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1172
+ goto yy_match;
1173
+
1174
+ case EOB_ACT_LAST_MATCH:
1175
+ yyg->yy_c_buf_p =
1176
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1177
+
1178
+ yy_current_state = yy_get_previous_state( yyscanner );
1179
+
1180
+ yy_cp = yyg->yy_c_buf_p;
1181
+ yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1182
+ goto yy_find_action;
1183
+ }
1184
+ break;
1185
+ }
1186
+
1187
+ default:
1188
+ YY_FATAL_ERROR(
1189
+ "fatal flex scanner internal error--no action found" );
1190
+ } /* end of action switch */
1191
+ } /* end of scanning one token */
1192
+ } /* end of query_parser_lex */
1193
+
1194
+ /* yy_get_next_buffer - try to read in a new buffer
1195
+ *
1196
+ * Returns a code representing an action:
1197
+ * EOB_ACT_LAST_MATCH -
1198
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1199
+ * EOB_ACT_END_OF_FILE - end of file
1200
+ */
1201
+ static int yy_get_next_buffer (yyscan_t yyscanner)
1202
+ {
1203
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1204
+ register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1205
+ register char *source = yyg->yytext_ptr;
1206
+ register int number_to_move, i;
1207
+ int ret_val;
1208
+
1209
+ if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1210
+ YY_FATAL_ERROR(
1211
+ "fatal flex scanner internal error--end of buffer missed" );
1212
+
1213
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1214
+ { /* Don't try to fill the buffer, so this is an EOF. */
1215
+ if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1216
+ {
1217
+ /* We matched a single character, the EOB, so
1218
+ * treat this as a final EOF.
1219
+ */
1220
+ return EOB_ACT_END_OF_FILE;
1221
+ }
1222
+
1223
+ else
1224
+ {
1225
+ /* We matched some text prior to the EOB, first
1226
+ * process it.
1227
+ */
1228
+ return EOB_ACT_LAST_MATCH;
1229
+ }
1230
+ }
1231
+
1232
+ /* Try to read more data. */
1233
+
1234
+ /* First move last chars to start of buffer. */
1235
+ number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
1236
+
1237
+ for ( i = 0; i < number_to_move; ++i )
1238
+ *(dest++) = *(source++);
1239
+
1240
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1241
+ /* don't do the read, it's not guaranteed to return an EOF,
1242
+ * just force an EOF
1243
+ */
1244
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1245
+
1246
+ else
1247
+ {
1248
+ int num_to_read =
1249
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1250
+
1251
+ while ( num_to_read <= 0 )
1252
+ { /* Not enough room in the buffer - grow it. */
1253
+
1254
+ /* just a shorter name for the current buffer */
1255
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1256
+
1257
+ int yy_c_buf_p_offset =
1258
+ (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1259
+
1260
+ if ( b->yy_is_our_buffer )
1261
+ {
1262
+ int new_size = b->yy_buf_size * 2;
1263
+
1264
+ if ( new_size <= 0 )
1265
+ b->yy_buf_size += b->yy_buf_size / 8;
1266
+ else
1267
+ b->yy_buf_size *= 2;
1268
+
1269
+ b->yy_ch_buf = (char *)
1270
+ /* Include room in for 2 EOB chars. */
1271
+ query_parser_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
1272
+ }
1273
+ else
1274
+ /* Can't grow it, we don't own it. */
1275
+ b->yy_ch_buf = 0;
1276
+
1277
+ if ( ! b->yy_ch_buf )
1278
+ YY_FATAL_ERROR(
1279
+ "fatal error - scanner input buffer overflow" );
1280
+
1281
+ yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1282
+
1283
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1284
+ number_to_move - 1;
1285
+
1286
+ }
1287
+
1288
+ if ( num_to_read > YY_READ_BUF_SIZE )
1289
+ num_to_read = YY_READ_BUF_SIZE;
1290
+
1291
+ /* Read in more data. */
1292
+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1293
+ yyg->yy_n_chars, (size_t) num_to_read );
1294
+
1295
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1296
+ }
1297
+
1298
+ if ( yyg->yy_n_chars == 0 )
1299
+ {
1300
+ if ( number_to_move == YY_MORE_ADJ )
1301
+ {
1302
+ ret_val = EOB_ACT_END_OF_FILE;
1303
+ query_parser_restart(yyin ,yyscanner);
1304
+ }
1305
+
1306
+ else
1307
+ {
1308
+ ret_val = EOB_ACT_LAST_MATCH;
1309
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1310
+ YY_BUFFER_EOF_PENDING;
1311
+ }
1312
+ }
1313
+
1314
+ else
1315
+ ret_val = EOB_ACT_CONTINUE_SCAN;
1316
+
1317
+ if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1318
+ /* Extend the array by 50%, plus the number we really need. */
1319
+ yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1320
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) query_parser_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
1321
+ if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1322
+ YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1323
+ }
1324
+
1325
+ yyg->yy_n_chars += number_to_move;
1326
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1327
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1328
+
1329
+ yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1330
+
1331
+ return ret_val;
1332
+ }
1333
+
1334
+ /* yy_get_previous_state - get the state just before the EOB char was reached */
1335
+
1336
+ static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1337
+ {
1338
+ register yy_state_type yy_current_state;
1339
+ register char *yy_cp;
1340
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1341
+
1342
+ yy_current_state = yy_start_state_list[yyg->yy_start];
1343
+
1344
+ for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1345
+ {
1346
+ yy_current_state += yy_current_state[(*yy_cp ? YY_SC_TO_UI(*yy_cp) : 256)].yy_nxt;
1347
+ if ( yy_current_state[-1].yy_nxt )
1348
+ {
1349
+ yyg->yy_last_accepting_state = yy_current_state;
1350
+ yyg->yy_last_accepting_cpos = yy_cp;
1351
+ }
1352
+ }
1353
+
1354
+ return yy_current_state;
1355
+ }
1356
+
1357
+ /* yy_try_NUL_trans - try to make a transition on the NUL character
1358
+ *
1359
+ * synopsis
1360
+ * next_state = yy_try_NUL_trans( current_state );
1361
+ */
1362
+ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
1363
+ {
1364
+ register int yy_is_jam;
1365
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
1366
+ register char *yy_cp = yyg->yy_c_buf_p;
1367
+
1368
+ register int yy_c = 256;
1369
+ register yyconst struct yy_trans_info *yy_trans_info;
1370
+
1371
+ yy_trans_info = &yy_current_state[(unsigned int) yy_c];
1372
+ yy_current_state += yy_trans_info->yy_nxt;
1373
+ yy_is_jam = (yy_trans_info->yy_verify != yy_c);
1374
+
1375
+ if ( ! yy_is_jam )
1376
+ {
1377
+ if ( yy_current_state[-1].yy_nxt )
1378
+ {
1379
+ yyg->yy_last_accepting_state = yy_current_state;
1380
+ yyg->yy_last_accepting_cpos = yy_cp;
1381
+ }
1382
+ }
1383
+
1384
+ return yy_is_jam ? 0 : yy_current_state;
1385
+ }
1386
+
1387
+ static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
1388
+ {
1389
+ register char *yy_cp;
1390
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1391
+
1392
+ yy_cp = yyg->yy_c_buf_p;
1393
+
1394
+ /* undo effects of setting up yytext */
1395
+ *yy_cp = yyg->yy_hold_char;
1396
+
1397
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1398
+ { /* need to shift things up to make room */
1399
+ /* +2 for EOB chars. */
1400
+ register int number_to_move = yyg->yy_n_chars + 2;
1401
+ register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1402
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1403
+ register char *source =
1404
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1405
+
1406
+ while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1407
+ *--dest = *--source;
1408
+
1409
+ yy_cp += (int) (dest - source);
1410
+ yy_bp += (int) (dest - source);
1411
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1412
+ yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1413
+
1414
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1415
+ YY_FATAL_ERROR( "flex scanner push-back overflow" );
1416
+ }
1417
+
1418
+ *--yy_cp = (char) c;
1419
+
1420
+ if ( c == '\n' ){
1421
+ --yylineno;
1422
+ }
1423
+
1424
+ yyg->yytext_ptr = yy_bp;
1425
+ yyg->yy_hold_char = *yy_cp;
1426
+ yyg->yy_c_buf_p = yy_cp;
1427
+ }
1428
+
1429
+ #ifndef YY_NO_INPUT
1430
+ #ifdef __cplusplus
1431
+ static int yyinput (yyscan_t yyscanner)
1432
+ #else
1433
+ static int input (yyscan_t yyscanner)
1434
+ #endif
1435
+
1436
+ {
1437
+ int c;
1438
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1439
+
1440
+ *yyg->yy_c_buf_p = yyg->yy_hold_char;
1441
+
1442
+ if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1443
+ {
1444
+ /* yy_c_buf_p now points to the character we want to return.
1445
+ * If this occurs *before* the EOB characters, then it's a
1446
+ * valid NUL; if not, then we've hit the end of the buffer.
1447
+ */
1448
+ if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1449
+ /* This was really a NUL. */
1450
+ *yyg->yy_c_buf_p = '\0';
1451
+
1452
+ else
1453
+ { /* need more input */
1454
+ int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
1455
+ ++yyg->yy_c_buf_p;
1456
+
1457
+ switch ( yy_get_next_buffer( yyscanner ) )
1458
+ {
1459
+ case EOB_ACT_LAST_MATCH:
1460
+ /* This happens because yy_g_n_b()
1461
+ * sees that we've accumulated a
1462
+ * token and flags that we need to
1463
+ * try matching the token before
1464
+ * proceeding. But for input(),
1465
+ * there's no matching to consider.
1466
+ * So convert the EOB_ACT_LAST_MATCH
1467
+ * to EOB_ACT_END_OF_FILE.
1468
+ */
1469
+
1470
+ /* Reset buffer status. */
1471
+ query_parser_restart(yyin ,yyscanner);
1472
+
1473
+ /*FALLTHROUGH*/
1474
+
1475
+ case EOB_ACT_END_OF_FILE:
1476
+ {
1477
+ if ( query_parser_wrap(yyscanner ) )
1478
+ return EOF;
1479
+
1480
+ if ( ! yyg->yy_did_buffer_switch_on_eof )
1481
+ YY_NEW_FILE;
1482
+ #ifdef __cplusplus
1483
+ return yyinput(yyscanner);
1484
+ #else
1485
+ return input(yyscanner);
1486
+ #endif
1487
+ }
1488
+
1489
+ case EOB_ACT_CONTINUE_SCAN:
1490
+ yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
1491
+ break;
1492
+ }
1493
+ }
1494
+ }
1495
+
1496
+ c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
1497
+ *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
1498
+ yyg->yy_hold_char = *++yyg->yy_c_buf_p;
1499
+
1500
+ if ( c == '\n' )
1501
+
1502
+ do{ yylineno++;
1503
+ yycolumn=0;
1504
+ }while(0)
1505
+ ;
1506
+
1507
+ return c;
1508
+ }
1509
+ #endif /* ifndef YY_NO_INPUT */
1510
+
1511
+ /** Immediately switch to a different input stream.
1512
+ * @param input_file A readable stream.
1513
+ * @param yyscanner The scanner object.
1514
+ * @note This function does not reset the start condition to @c INITIAL .
1515
+ */
1516
+ void query_parser_restart (FILE * input_file , yyscan_t yyscanner)
1517
+ {
1518
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1519
+
1520
+ if ( ! YY_CURRENT_BUFFER ){
1521
+ query_parser_ensure_buffer_stack (yyscanner);
1522
+ YY_CURRENT_BUFFER_LVALUE =
1523
+ query_parser__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1524
+ }
1525
+
1526
+ query_parser__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
1527
+ query_parser__load_buffer_state(yyscanner );
1528
+ }
1529
+
1530
+ /** Switch to a different input buffer.
1531
+ * @param new_buffer The new input buffer.
1532
+ * @param yyscanner The scanner object.
1533
+ */
1534
+ void query_parser__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1535
+ {
1536
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1537
+
1538
+ /* TODO. We should be able to replace this entire function body
1539
+ * with
1540
+ * query_parser_pop_buffer_state();
1541
+ * query_parser_push_buffer_state(new_buffer);
1542
+ */
1543
+ query_parser_ensure_buffer_stack (yyscanner);
1544
+ if ( YY_CURRENT_BUFFER == new_buffer )
1545
+ return;
1546
+
1547
+ if ( YY_CURRENT_BUFFER )
1548
+ {
1549
+ /* Flush out information for old buffer. */
1550
+ *yyg->yy_c_buf_p = yyg->yy_hold_char;
1551
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1552
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1553
+ }
1554
+
1555
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
1556
+ query_parser__load_buffer_state(yyscanner );
1557
+
1558
+ /* We don't actually know whether we did this switch during
1559
+ * EOF (query_parser_wrap()) processing, but the only time this flag
1560
+ * is looked at is after query_parser_wrap() is called, so it's safe
1561
+ * to go ahead and always set it.
1562
+ */
1563
+ yyg->yy_did_buffer_switch_on_eof = 1;
1564
+ }
1565
+
1566
+ static void query_parser__load_buffer_state (yyscan_t yyscanner)
1567
+ {
1568
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1569
+ yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1570
+ yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1571
+ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1572
+ yyg->yy_hold_char = *yyg->yy_c_buf_p;
1573
+ }
1574
+
1575
+ /** Allocate and initialize an input buffer state.
1576
+ * @param file A readable stream.
1577
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1578
+ * @param yyscanner The scanner object.
1579
+ * @return the allocated buffer state.
1580
+ */
1581
+ YY_BUFFER_STATE query_parser__create_buffer (FILE * file, int size , yyscan_t yyscanner)
1582
+ {
1583
+ YY_BUFFER_STATE b;
1584
+
1585
+ b = (YY_BUFFER_STATE) query_parser_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
1586
+ if ( ! b )
1587
+ YY_FATAL_ERROR( "out of dynamic memory in query_parser__create_buffer()" );
1588
+
1589
+ b->yy_buf_size = size;
1590
+
1591
+ /* yy_ch_buf has to be 2 characters longer than the size given because
1592
+ * we need to put in 2 end-of-buffer characters.
1593
+ */
1594
+ b->yy_ch_buf = (char *) query_parser_alloc(b->yy_buf_size + 2 ,yyscanner );
1595
+ if ( ! b->yy_ch_buf )
1596
+ YY_FATAL_ERROR( "out of dynamic memory in query_parser__create_buffer()" );
1597
+
1598
+ b->yy_is_our_buffer = 1;
1599
+
1600
+ query_parser__init_buffer(b,file ,yyscanner);
1601
+
1602
+ return b;
1603
+ }
1604
+
1605
+ /** Destroy the buffer.
1606
+ * @param b a buffer created with query_parser__create_buffer()
1607
+ * @param yyscanner The scanner object.
1608
+ */
1609
+ void query_parser__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1610
+ {
1611
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1612
+
1613
+ if ( ! b )
1614
+ return;
1615
+
1616
+ if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1617
+ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1618
+
1619
+ if ( b->yy_is_our_buffer )
1620
+ query_parser_free((void *) b->yy_ch_buf ,yyscanner );
1621
+
1622
+ query_parser_free((void *) b ,yyscanner );
1623
+ }
1624
+
1625
+ #ifndef __cplusplus
1626
+ extern int isatty (int );
1627
+ #endif /* __cplusplus */
1628
+
1629
+ /* Initializes or reinitializes a buffer.
1630
+ * This function is sometimes called more than once on the same buffer,
1631
+ * such as during a query_parser_restart() or at EOF.
1632
+ */
1633
+ static void query_parser__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
1634
+
1635
+ {
1636
+ int oerrno = errno;
1637
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1638
+
1639
+ query_parser__flush_buffer(b ,yyscanner);
1640
+
1641
+ b->yy_input_file = file;
1642
+ b->yy_fill_buffer = 1;
1643
+
1644
+ /* If b is the current buffer, then query_parser__init_buffer was _probably_
1645
+ * called from query_parser_restart() or through yy_get_next_buffer.
1646
+ * In that case, we don't want to reset the lineno or column.
1647
+ */
1648
+ if (b != YY_CURRENT_BUFFER){
1649
+ b->yy_bs_lineno = 1;
1650
+ b->yy_bs_column = 0;
1651
+ }
1652
+
1653
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1654
+
1655
+ errno = oerrno;
1656
+ }
1657
+
1658
+ /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1659
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1660
+ * @param yyscanner The scanner object.
1661
+ */
1662
+ void query_parser__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1663
+ {
1664
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1665
+ if ( ! b )
1666
+ return;
1667
+
1668
+ b->yy_n_chars = 0;
1669
+
1670
+ /* We always need two end-of-buffer characters. The first causes
1671
+ * a transition to the end-of-buffer state. The second causes
1672
+ * a jam in that state.
1673
+ */
1674
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1675
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1676
+
1677
+ b->yy_buf_pos = &b->yy_ch_buf[0];
1678
+
1679
+ b->yy_at_bol = 1;
1680
+ b->yy_buffer_status = YY_BUFFER_NEW;
1681
+
1682
+ if ( b == YY_CURRENT_BUFFER )
1683
+ query_parser__load_buffer_state(yyscanner );
1684
+ }
1685
+
1686
+ /** Pushes the new state onto the stack. The new state becomes
1687
+ * the current state. This function will allocate the stack
1688
+ * if necessary.
1689
+ * @param new_buffer The new state.
1690
+ * @param yyscanner The scanner object.
1691
+ */
1692
+ void query_parser_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1693
+ {
1694
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1695
+ if (new_buffer == NULL)
1696
+ return;
1697
+
1698
+ query_parser_ensure_buffer_stack(yyscanner);
1699
+
1700
+ /* This block is copied from query_parser__switch_to_buffer. */
1701
+ if ( YY_CURRENT_BUFFER )
1702
+ {
1703
+ /* Flush out information for old buffer. */
1704
+ *yyg->yy_c_buf_p = yyg->yy_hold_char;
1705
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1706
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1707
+ }
1708
+
1709
+ /* Only push if top exists. Otherwise, replace top. */
1710
+ if (YY_CURRENT_BUFFER)
1711
+ yyg->yy_buffer_stack_top++;
1712
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
1713
+
1714
+ /* copied from query_parser__switch_to_buffer. */
1715
+ query_parser__load_buffer_state(yyscanner );
1716
+ yyg->yy_did_buffer_switch_on_eof = 1;
1717
+ }
1718
+
1719
+ /** Removes and deletes the top of the stack, if present.
1720
+ * The next element becomes the new top.
1721
+ * @param yyscanner The scanner object.
1722
+ */
1723
+ void query_parser_pop_buffer_state (yyscan_t yyscanner)
1724
+ {
1725
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1726
+ if (!YY_CURRENT_BUFFER)
1727
+ return;
1728
+
1729
+ query_parser__delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
1730
+ YY_CURRENT_BUFFER_LVALUE = NULL;
1731
+ if (yyg->yy_buffer_stack_top > 0)
1732
+ --yyg->yy_buffer_stack_top;
1733
+
1734
+ if (YY_CURRENT_BUFFER) {
1735
+ query_parser__load_buffer_state(yyscanner );
1736
+ yyg->yy_did_buffer_switch_on_eof = 1;
1737
+ }
1738
+ }
1739
+
1740
+ /* Allocates the stack if it does not exist.
1741
+ * Guarantees space for at least one push.
1742
+ */
1743
+ static void query_parser_ensure_buffer_stack (yyscan_t yyscanner)
1744
+ {
1745
+ int num_to_alloc;
1746
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1747
+
1748
+ if (!yyg->yy_buffer_stack) {
1749
+
1750
+ /* First allocation is just for 2 elements, since we don't know if this
1751
+ * scanner will even need a stack. We use 2 instead of 1 to avoid an
1752
+ * immediate realloc on the next call.
1753
+ */
1754
+ num_to_alloc = 1;
1755
+ yyg->yy_buffer_stack = (struct yy_buffer_state**)query_parser_alloc
1756
+ (num_to_alloc * sizeof(struct yy_buffer_state*)
1757
+ , yyscanner);
1758
+ if ( ! yyg->yy_buffer_stack )
1759
+ YY_FATAL_ERROR( "out of dynamic memory in query_parser_ensure_buffer_stack()" );
1760
+
1761
+ memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1762
+
1763
+ yyg->yy_buffer_stack_max = num_to_alloc;
1764
+ yyg->yy_buffer_stack_top = 0;
1765
+ return;
1766
+ }
1767
+
1768
+ if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
1769
+
1770
+ /* Increase the buffer to prepare for a possible push. */
1771
+ int grow_size = 8 /* arbitrary grow size */;
1772
+
1773
+ num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
1774
+ yyg->yy_buffer_stack = (struct yy_buffer_state**)query_parser_realloc
1775
+ (yyg->yy_buffer_stack,
1776
+ num_to_alloc * sizeof(struct yy_buffer_state*)
1777
+ , yyscanner);
1778
+ if ( ! yyg->yy_buffer_stack )
1779
+ YY_FATAL_ERROR( "out of dynamic memory in query_parser_ensure_buffer_stack()" );
1780
+
1781
+ /* zero only the new slots.*/
1782
+ memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
1783
+ yyg->yy_buffer_stack_max = num_to_alloc;
1784
+ }
1785
+ }
1786
+
1787
+ /** Setup the input buffer state to scan directly from a user-specified character buffer.
1788
+ * @param base the character buffer
1789
+ * @param size the size in bytes of the character buffer
1790
+ * @param yyscanner The scanner object.
1791
+ * @return the newly allocated buffer state object.
1792
+ */
1793
+ YY_BUFFER_STATE query_parser__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
1794
+ {
1795
+ YY_BUFFER_STATE b;
1796
+
1797
+ if ( size < 2 ||
1798
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
1799
+ base[size-1] != YY_END_OF_BUFFER_CHAR )
1800
+ /* They forgot to leave room for the EOB's. */
1801
+ return 0;
1802
+
1803
+ b = (YY_BUFFER_STATE) query_parser_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
1804
+ if ( ! b )
1805
+ YY_FATAL_ERROR( "out of dynamic memory in query_parser__scan_buffer()" );
1806
+
1807
+ b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1808
+ b->yy_buf_pos = b->yy_ch_buf = base;
1809
+ b->yy_is_our_buffer = 0;
1810
+ b->yy_input_file = 0;
1811
+ b->yy_n_chars = b->yy_buf_size;
1812
+ b->yy_is_interactive = 0;
1813
+ b->yy_at_bol = 1;
1814
+ b->yy_fill_buffer = 0;
1815
+ b->yy_buffer_status = YY_BUFFER_NEW;
1816
+
1817
+ query_parser__switch_to_buffer(b ,yyscanner );
1818
+
1819
+ return b;
1820
+ }
1821
+
1822
+ /** Setup the input buffer state to scan a string. The next call to query_parser_lex() will
1823
+ * scan from a @e copy of @a str.
1824
+ * @param yystr a NUL-terminated string to scan
1825
+ * @param yyscanner The scanner object.
1826
+ * @return the newly allocated buffer state object.
1827
+ * @note If you want to scan bytes that may contain NUL values, then use
1828
+ * query_parser__scan_bytes() instead.
1829
+ */
1830
+ YY_BUFFER_STATE query_parser__scan_string (yyconst char * yystr , yyscan_t yyscanner)
1831
+ {
1832
+
1833
+ return query_parser__scan_bytes(yystr,strlen(yystr) ,yyscanner);
1834
+ }
1835
+
1836
+ /** Setup the input buffer state to scan the given bytes. The next call to query_parser_lex() will
1837
+ * scan from a @e copy of @a bytes.
1838
+ * @param yybytes the byte buffer to scan
1839
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1840
+ * @param yyscanner The scanner object.
1841
+ * @return the newly allocated buffer state object.
1842
+ */
1843
+ YY_BUFFER_STATE query_parser__scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
1844
+ {
1845
+ YY_BUFFER_STATE b;
1846
+ char *buf;
1847
+ yy_size_t n;
1848
+ int i;
1849
+
1850
+ /* Get memory for full buffer, including space for trailing EOB's. */
1851
+ n = _yybytes_len + 2;
1852
+ buf = (char *) query_parser_alloc(n ,yyscanner );
1853
+ if ( ! buf )
1854
+ YY_FATAL_ERROR( "out of dynamic memory in query_parser__scan_bytes()" );
1855
+
1856
+ for ( i = 0; i < _yybytes_len; ++i )
1857
+ buf[i] = yybytes[i];
1858
+
1859
+ buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1860
+
1861
+ b = query_parser__scan_buffer(buf,n ,yyscanner);
1862
+ if ( ! b )
1863
+ YY_FATAL_ERROR( "bad buffer in query_parser__scan_bytes()" );
1864
+
1865
+ /* It's okay to grow etc. this buffer, and we should throw it
1866
+ * away when we're done.
1867
+ */
1868
+ b->yy_is_our_buffer = 1;
1869
+
1870
+ return b;
1871
+ }
1872
+
1873
+ #ifndef YY_EXIT_FAILURE
1874
+ #define YY_EXIT_FAILURE 2
1875
+ #endif
1876
+
1877
+ static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
1878
+ {
1879
+ (void) fprintf( stderr, "%s\n", msg );
1880
+ exit( YY_EXIT_FAILURE );
1881
+ }
1882
+
1883
+ /* Redefine yyless() so it works in section 3 code. */
1884
+
1885
+ #undef yyless
1886
+ #define yyless(n) \
1887
+ do \
1888
+ { \
1889
+ /* Undo effects of setting up yytext. */ \
1890
+ int yyless_macro_arg = (n); \
1891
+ YY_LESS_LINENO(yyless_macro_arg);\
1892
+ yytext[yyleng] = yyg->yy_hold_char; \
1893
+ yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
1894
+ yyg->yy_hold_char = *yyg->yy_c_buf_p; \
1895
+ *yyg->yy_c_buf_p = '\0'; \
1896
+ yyleng = yyless_macro_arg; \
1897
+ } \
1898
+ while ( 0 )
1899
+
1900
+ /* Accessor methods (get/set functions) to struct members. */
1901
+
1902
+ /** Get the user-defined data for this scanner.
1903
+ * @param yyscanner The scanner object.
1904
+ */
1905
+ YY_EXTRA_TYPE query_parser_get_extra (yyscan_t yyscanner)
1906
+ {
1907
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1908
+ return yyextra;
1909
+ }
1910
+
1911
+ /** Get the current line number.
1912
+ * @param yyscanner The scanner object.
1913
+ */
1914
+ int query_parser_get_lineno (yyscan_t yyscanner)
1915
+ {
1916
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1917
+
1918
+ if (! YY_CURRENT_BUFFER)
1919
+ return 0;
1920
+
1921
+ return yylineno;
1922
+ }
1923
+
1924
+ /** Get the current column number.
1925
+ * @param yyscanner The scanner object.
1926
+ */
1927
+ int query_parser_get_column (yyscan_t yyscanner)
1928
+ {
1929
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1930
+
1931
+ if (! YY_CURRENT_BUFFER)
1932
+ return 0;
1933
+
1934
+ return yycolumn;
1935
+ }
1936
+
1937
+ /** Get the input stream.
1938
+ * @param yyscanner The scanner object.
1939
+ */
1940
+ FILE *query_parser_get_in (yyscan_t yyscanner)
1941
+ {
1942
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1943
+ return yyin;
1944
+ }
1945
+
1946
+ /** Get the output stream.
1947
+ * @param yyscanner The scanner object.
1948
+ */
1949
+ FILE *query_parser_get_out (yyscan_t yyscanner)
1950
+ {
1951
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1952
+ return yyout;
1953
+ }
1954
+
1955
+ /** Get the length of the current token.
1956
+ * @param yyscanner The scanner object.
1957
+ */
1958
+ int query_parser_get_leng (yyscan_t yyscanner)
1959
+ {
1960
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1961
+ return yyleng;
1962
+ }
1963
+
1964
+ /** Get the current token.
1965
+ * @param yyscanner The scanner object.
1966
+ */
1967
+
1968
+ char *query_parser_get_text (yyscan_t yyscanner)
1969
+ {
1970
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1971
+ return yytext;
1972
+ }
1973
+
1974
+ /** Set the user-defined data. This data is never touched by the scanner.
1975
+ * @param user_defined The data to be associated with this scanner.
1976
+ * @param yyscanner The scanner object.
1977
+ */
1978
+ void query_parser_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
1979
+ {
1980
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1981
+ yyextra = user_defined ;
1982
+ }
1983
+
1984
+ /** Set the current line number.
1985
+ * @param line_number
1986
+ * @param yyscanner The scanner object.
1987
+ */
1988
+ void query_parser_set_lineno (int line_number , yyscan_t yyscanner)
1989
+ {
1990
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1991
+
1992
+ /* lineno is only valid if an input buffer exists. */
1993
+ if (! YY_CURRENT_BUFFER )
1994
+ yy_fatal_error( "query_parser_set_lineno called with no buffer" , yyscanner);
1995
+
1996
+ yylineno = line_number;
1997
+ }
1998
+
1999
+ /** Set the current column.
2000
+ * @param line_number
2001
+ * @param yyscanner The scanner object.
2002
+ */
2003
+ void query_parser_set_column (int column_no , yyscan_t yyscanner)
2004
+ {
2005
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2006
+
2007
+ /* column is only valid if an input buffer exists. */
2008
+ if (! YY_CURRENT_BUFFER )
2009
+ yy_fatal_error( "query_parser_set_column called with no buffer" , yyscanner);
2010
+
2011
+ yycolumn = column_no;
2012
+ }
2013
+
2014
+ /** Set the input stream. This does not discard the current
2015
+ * input buffer.
2016
+ * @param in_str A readable stream.
2017
+ * @param yyscanner The scanner object.
2018
+ * @see query_parser__switch_to_buffer
2019
+ */
2020
+ void query_parser_set_in (FILE * in_str , yyscan_t yyscanner)
2021
+ {
2022
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2023
+ yyin = in_str ;
2024
+ }
2025
+
2026
+ void query_parser_set_out (FILE * out_str , yyscan_t yyscanner)
2027
+ {
2028
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2029
+ yyout = out_str ;
2030
+ }
2031
+
2032
+ int query_parser_get_debug (yyscan_t yyscanner)
2033
+ {
2034
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2035
+ return yy_flex_debug;
2036
+ }
2037
+
2038
+ void query_parser_set_debug (int bdebug , yyscan_t yyscanner)
2039
+ {
2040
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2041
+ yy_flex_debug = bdebug ;
2042
+ }
2043
+
2044
+ /* Accessor methods for yylval and yylloc */
2045
+
2046
+ YYSTYPE * query_parser_get_lval (yyscan_t yyscanner)
2047
+ {
2048
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2049
+ return yylval;
2050
+ }
2051
+
2052
+ void query_parser_set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
2053
+ {
2054
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2055
+ yylval = yylval_param;
2056
+ }
2057
+
2058
+ YYLTYPE *query_parser_get_lloc (yyscan_t yyscanner)
2059
+ {
2060
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2061
+ return yylloc;
2062
+ }
2063
+
2064
+ void query_parser_set_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
2065
+ {
2066
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2067
+ yylloc = yylloc_param;
2068
+ }
2069
+
2070
+ /* User-visible API */
2071
+
2072
+ /* query_parser_lex_init is special because it creates the scanner itself, so it is
2073
+ * the ONLY reentrant function that doesn't take the scanner as the last argument.
2074
+ * That's why we explicitly handle the declaration, instead of using our macros.
2075
+ */
2076
+
2077
+ int query_parser_lex_init(yyscan_t* ptr_yy_globals)
2078
+
2079
+ {
2080
+ if (ptr_yy_globals == NULL){
2081
+ errno = EINVAL;
2082
+ return 1;
2083
+ }
2084
+
2085
+ *ptr_yy_globals = (yyscan_t) query_parser_alloc ( sizeof( struct yyguts_t ), NULL );
2086
+
2087
+ if (*ptr_yy_globals == NULL){
2088
+ errno = ENOMEM;
2089
+ return 1;
2090
+ }
2091
+
2092
+ /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
2093
+ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2094
+
2095
+ return yy_init_globals ( *ptr_yy_globals );
2096
+ }
2097
+
2098
+ /* query_parser_lex_init_extra has the same functionality as query_parser_lex_init, but follows the
2099
+ * convention of taking the scanner as the last argument. Note however, that
2100
+ * this is a *pointer* to a scanner, as it will be allocated by this call (and
2101
+ * is the reason, too, why this function also must handle its own declaration).
2102
+ * The user defined value in the first argument will be available to query_parser_alloc in
2103
+ * the yyextra field.
2104
+ */
2105
+
2106
+ int query_parser_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
2107
+
2108
+ {
2109
+ struct yyguts_t dummy_yyguts;
2110
+
2111
+ query_parser_set_extra (yy_user_defined, &dummy_yyguts);
2112
+
2113
+ if (ptr_yy_globals == NULL){
2114
+ errno = EINVAL;
2115
+ return 1;
2116
+ }
2117
+
2118
+ *ptr_yy_globals = (yyscan_t) query_parser_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
2119
+
2120
+ if (*ptr_yy_globals == NULL){
2121
+ errno = ENOMEM;
2122
+ return 1;
2123
+ }
2124
+
2125
+ /* By setting to 0xAA, we expose bugs in
2126
+ yy_init_globals. Leave at 0x00 for releases. */
2127
+ memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2128
+
2129
+ query_parser_set_extra (yy_user_defined, *ptr_yy_globals);
2130
+
2131
+ return yy_init_globals ( *ptr_yy_globals );
2132
+ }
2133
+
2134
+ static int yy_init_globals (yyscan_t yyscanner)
2135
+ {
2136
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2137
+ /* Initialization is the same as for the non-reentrant scanner.
2138
+ * This function is called from query_parser_lex_destroy(), so don't allocate here.
2139
+ */
2140
+
2141
+ yyg->yy_buffer_stack = 0;
2142
+ yyg->yy_buffer_stack_top = 0;
2143
+ yyg->yy_buffer_stack_max = 0;
2144
+ yyg->yy_c_buf_p = (char *) 0;
2145
+ yyg->yy_init = 0;
2146
+ yyg->yy_start = 0;
2147
+
2148
+ yyg->yy_start_stack_ptr = 0;
2149
+ yyg->yy_start_stack_depth = 0;
2150
+ yyg->yy_start_stack = NULL;
2151
+
2152
+ /* Defined in main.c */
2153
+ #ifdef YY_STDINIT
2154
+ yyin = stdin;
2155
+ yyout = stdout;
2156
+ #else
2157
+ yyin = (FILE *) 0;
2158
+ yyout = (FILE *) 0;
2159
+ #endif
2160
+
2161
+ /* For future reference: Set errno on error, since we are called by
2162
+ * query_parser_lex_init()
2163
+ */
2164
+ return 0;
2165
+ }
2166
+
2167
+ /* query_parser_lex_destroy is for both reentrant and non-reentrant scanners. */
2168
+ int query_parser_lex_destroy (yyscan_t yyscanner)
2169
+ {
2170
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2171
+
2172
+ /* Pop the buffer stack, destroying each element. */
2173
+ while(YY_CURRENT_BUFFER){
2174
+ query_parser__delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
2175
+ YY_CURRENT_BUFFER_LVALUE = NULL;
2176
+ query_parser_pop_buffer_state(yyscanner);
2177
+ }
2178
+
2179
+ /* Destroy the stack itself. */
2180
+ query_parser_free(yyg->yy_buffer_stack ,yyscanner);
2181
+ yyg->yy_buffer_stack = NULL;
2182
+
2183
+ /* Destroy the start condition stack. */
2184
+ query_parser_free(yyg->yy_start_stack ,yyscanner );
2185
+ yyg->yy_start_stack = NULL;
2186
+
2187
+ /* Reset the globals. This is important in a non-reentrant scanner so the next time
2188
+ * query_parser_lex() is called, initialization will occur. */
2189
+ yy_init_globals( yyscanner);
2190
+
2191
+ /* Destroy the main struct (reentrant only). */
2192
+ query_parser_free ( yyscanner , yyscanner );
2193
+ yyscanner = NULL;
2194
+ return 0;
2195
+ }
2196
+
2197
+ /*
2198
+ * Internal utility routines.
2199
+ */
2200
+
2201
+ #ifndef yytext_ptr
2202
+ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
2203
+ {
2204
+ register int i;
2205
+ for ( i = 0; i < n; ++i )
2206
+ s1[i] = s2[i];
2207
+ }
2208
+ #endif
2209
+
2210
+ #ifdef YY_NEED_STRLEN
2211
+ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
2212
+ {
2213
+ register int n;
2214
+ for ( n = 0; s[n]; ++n )
2215
+ ;
2216
+
2217
+ return n;
2218
+ }
2219
+ #endif
2220
+
2221
+ void *query_parser_alloc (yy_size_t size , yyscan_t yyscanner)
2222
+ {
2223
+ return (void *) malloc( size );
2224
+ }
2225
+
2226
+ void *query_parser_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
2227
+ {
2228
+ /* The cast to (char *) in the following accommodates both
2229
+ * implementations that use char* generic pointers, and those
2230
+ * that use void* generic pointers. It works with the latter
2231
+ * because both ANSI C and C++ allow castless assignment from
2232
+ * any pointer type to void*, and deal with argument conversions
2233
+ * as though doing an assignment.
2234
+ */
2235
+ return (void *) realloc( (char *) ptr, size );
2236
+ }
2237
+
2238
+ void query_parser_free (void * ptr , yyscan_t yyscanner)
2239
+ {
2240
+ free( (char *) ptr ); /* see query_parser_realloc() for (char *) cast */
2241
+ }
2242
+
2243
+ #define YYTABLES_NAME "yytables"
2244
+
2245
+ #line 49 "query-parser.lex"
2246
+
2247
+
2248
+
2249
+