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