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