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