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