Debian Codegraph @

src/conf_lex.c

raw symbols SCIP
1 #line 2 "src/conf_lex.c"
2
3 #line 4 "src/conf_lex.c"
4
5 #define YY_INT_ALIGNED short int
6
7 /* A lexical scanner generated by flex */
8
9 #define yy_create_buffer conf_create_buffer
10 #define yy_delete_buffer conf_delete_buffer
11 #define yy_scan_buffer conf_scan_buffer
12 #define yy_scan_string conf_scan_string
13 #define yy_scan_bytes conf_scan_bytes
14 #define yy_init_buffer conf_init_buffer
15 #define yy_flush_buffer conf_flush_buffer
16 #define yy_load_buffer_state conf_load_buffer_state
17 #define yy_switch_to_buffer conf_switch_to_buffer
18 #define yypush_buffer_state confpush_buffer_state
19 #define yypop_buffer_state confpop_buffer_state
20 #define yyensure_buffer_stack confensure_buffer_stack
21 #define yy_flex_debug conf_flex_debug
22 #define yyin confin
23 #define yyleng confleng
24 #define yylex conflex
25 #define yylineno conflineno
26 #define yyout confout
27 #define yyrestart confrestart
28 #define yytext conftext
29 #define yywrap confwrap
30 #define yyalloc confalloc
31 #define yyrealloc confrealloc
32 #define yyfree conffree
33
34 #define FLEX_SCANNER
35 #define YY_FLEX_MAJOR_VERSION 2
36 #define YY_FLEX_MINOR_VERSION 6
37 #define YY_FLEX_SUBMINOR_VERSION 4
38 #if YY_FLEX_SUBMINOR_VERSION > 0
39 #define FLEX_BETA
40 #endif
41
42 #ifdef yy_create_buffer
43 #define conf_create_buffer_ALREADY_DEFINED
44 #else
45 #define yy_create_buffer conf_create_buffer
46 #endif
47
48 #ifdef yy_delete_buffer
49 #define conf_delete_buffer_ALREADY_DEFINED
50 #else
51 #define yy_delete_buffer conf_delete_buffer
52 #endif
53
54 #ifdef yy_scan_buffer
55 #define conf_scan_buffer_ALREADY_DEFINED
56 #else
57 #define yy_scan_buffer conf_scan_buffer
58 #endif
59
60 #ifdef yy_scan_string
61 #define conf_scan_string_ALREADY_DEFINED
62 #else
63 #define yy_scan_string conf_scan_string
64 #endif
65
66 #ifdef yy_scan_bytes
67 #define conf_scan_bytes_ALREADY_DEFINED
68 #else
69 #define yy_scan_bytes conf_scan_bytes
70 #endif
71
72 #ifdef yy_init_buffer
73 #define conf_init_buffer_ALREADY_DEFINED
74 #else
75 #define yy_init_buffer conf_init_buffer
76 #endif
77
78 #ifdef yy_flush_buffer
79 #define conf_flush_buffer_ALREADY_DEFINED
80 #else
81 #define yy_flush_buffer conf_flush_buffer
82 #endif
83
84 #ifdef yy_load_buffer_state
85 #define conf_load_buffer_state_ALREADY_DEFINED
86 #else
87 #define yy_load_buffer_state conf_load_buffer_state
88 #endif
89
90 #ifdef yy_switch_to_buffer
91 #define conf_switch_to_buffer_ALREADY_DEFINED
92 #else
93 #define yy_switch_to_buffer conf_switch_to_buffer
94 #endif
95
96 #ifdef yypush_buffer_state
97 #define confpush_buffer_state_ALREADY_DEFINED
98 #else
99 #define yypush_buffer_state confpush_buffer_state
100 #endif
101
102 #ifdef yypop_buffer_state
103 #define confpop_buffer_state_ALREADY_DEFINED
104 #else
105 #define yypop_buffer_state confpop_buffer_state
106 #endif
107
108 #ifdef yyensure_buffer_stack
109 #define confensure_buffer_stack_ALREADY_DEFINED
110 #else
111 #define yyensure_buffer_stack confensure_buffer_stack
112 #endif
113
114 #ifdef yylex
115 #define conflex_ALREADY_DEFINED
116 #else
117 #define yylex conflex
118 #endif
119
120 #ifdef yyrestart
121 #define confrestart_ALREADY_DEFINED
122 #else
123 #define yyrestart confrestart
124 #endif
125
126 #ifdef yylex_init
127 #define conflex_init_ALREADY_DEFINED
128 #else
129 #define yylex_init conflex_init
130 #endif
131
132 #ifdef yylex_init_extra
133 #define conflex_init_extra_ALREADY_DEFINED
134 #else
135 #define yylex_init_extra conflex_init_extra
136 #endif
137
138 #ifdef yylex_destroy
139 #define conflex_destroy_ALREADY_DEFINED
140 #else
141 #define yylex_destroy conflex_destroy
142 #endif
143
144 #ifdef yyget_debug
145 #define confget_debug_ALREADY_DEFINED
146 #else
147 #define yyget_debug confget_debug
148 #endif
149
150 #ifdef yyset_debug
151 #define confset_debug_ALREADY_DEFINED
152 #else
153 #define yyset_debug confset_debug
154 #endif
155
156 #ifdef yyget_extra
157 #define confget_extra_ALREADY_DEFINED
158 #else
159 #define yyget_extra confget_extra
160 #endif
161
162 #ifdef yyset_extra
163 #define confset_extra_ALREADY_DEFINED
164 #else
165 #define yyset_extra confset_extra
166 #endif
167
168 #ifdef yyget_in
169 #define confget_in_ALREADY_DEFINED
170 #else
171 #define yyget_in confget_in
172 #endif
173
174 #ifdef yyset_in
175 #define confset_in_ALREADY_DEFINED
176 #else
177 #define yyset_in confset_in
178 #endif
179
180 #ifdef yyget_out
181 #define confget_out_ALREADY_DEFINED
182 #else
183 #define yyget_out confget_out
184 #endif
185
186 #ifdef yyset_out
187 #define confset_out_ALREADY_DEFINED
188 #else
189 #define yyset_out confset_out
190 #endif
191
192 #ifdef yyget_leng
193 #define confget_leng_ALREADY_DEFINED
194 #else
195 #define yyget_leng confget_leng
196 #endif
197
198 #ifdef yyget_text
199 #define confget_text_ALREADY_DEFINED
200 #else
201 #define yyget_text confget_text
202 #endif
203
204 #ifdef yyget_lineno
205 #define confget_lineno_ALREADY_DEFINED
206 #else
207 #define yyget_lineno confget_lineno
208 #endif
209
210 #ifdef yyset_lineno
211 #define confset_lineno_ALREADY_DEFINED
212 #else
213 #define yyset_lineno confset_lineno
214 #endif
215
216 #ifdef yywrap
217 #define confwrap_ALREADY_DEFINED
218 #else
219 #define yywrap confwrap
220 #endif
221
222 #ifdef yyalloc
223 #define confalloc_ALREADY_DEFINED
224 #else
225 #define yyalloc confalloc
226 #endif
227
228 #ifdef yyrealloc
229 #define confrealloc_ALREADY_DEFINED
230 #else
231 #define yyrealloc confrealloc
232 #endif
233
234 #ifdef yyfree
235 #define conffree_ALREADY_DEFINED
236 #else
237 #define yyfree conffree
238 #endif
239
240 #ifdef yytext
241 #define conftext_ALREADY_DEFINED
242 #else
243 #define yytext conftext
244 #endif
245
246 #ifdef yyleng
247 #define confleng_ALREADY_DEFINED
248 #else
249 #define yyleng confleng
250 #endif
251
252 #ifdef yyin
253 #define confin_ALREADY_DEFINED
254 #else
255 #define yyin confin
256 #endif
257
258 #ifdef yyout
259 #define confout_ALREADY_DEFINED
260 #else
261 #define yyout confout
262 #endif
263
264 #ifdef yy_flex_debug
265 #define conf_flex_debug_ALREADY_DEFINED
266 #else
267 #define yy_flex_debug conf_flex_debug
268 #endif
269
270 #ifdef yylineno
271 #define conflineno_ALREADY_DEFINED
272 #else
273 #define yylineno conflineno
274 #endif
275
276 /* First, we deal with platform-specific or compiler-specific issues. */
277
278 /* begin standard C headers. */
279 #include <stdio.h>
280 #include <string.h>
281 #include <errno.h>
282 #include <stdlib.h>
283
284 /* end standard C headers. */
285
286 /* flex integer type definitions */
287
288 #ifndef FLEXINT_H
289 #define FLEXINT_H
290
291 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
292
293 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
294
295 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
296 * if you want the limit (max/min) macros for int types.
297 */
298 #ifndef __STDC_LIMIT_MACROS
299 #define __STDC_LIMIT_MACROS 1
300 #endif
301
302 #include <inttypes.h>
303 typedef int8_t flex_int8_t;
304 typedef uint8_t flex_uint8_t;
305 typedef int16_t flex_int16_t;
306 typedef uint16_t flex_uint16_t;
307 typedef int32_t flex_int32_t;
308 typedef uint32_t flex_uint32_t;
309 #else
310 typedef signed char flex_int8_t;
311 typedef short int flex_int16_t;
312 typedef int flex_int32_t;
313 typedef unsigned char flex_uint8_t;
314 typedef unsigned short int flex_uint16_t;
315 typedef unsigned int flex_uint32_t;
316
317 /* Limits of integral types. */
318 #ifndef INT8_MIN
319 #define INT8_MIN (-128)
320 #endif
321 #ifndef INT16_MIN
322 #define INT16_MIN (-32767-1)
323 #endif
324 #ifndef INT32_MIN
325 #define INT32_MIN (-2147483647-1)
326 #endif
327 #ifndef INT8_MAX
328 #define INT8_MAX (127)
329 #endif
330 #ifndef INT16_MAX
331 #define INT16_MAX (32767)
332 #endif
333 #ifndef INT32_MAX
334 #define INT32_MAX (2147483647)
335 #endif
336 #ifndef UINT8_MAX
337 #define UINT8_MAX (255U)
338 #endif
339 #ifndef UINT16_MAX
340 #define UINT16_MAX (65535U)
341 #endif
342 #ifndef UINT32_MAX
343 #define UINT32_MAX (4294967295U)
344 #endif
345
346 #ifndef SIZE_MAX
347 #define SIZE_MAX (~(size_t)0)
348 #endif
349
350 #endif /* ! C99 */
351
352 #endif /* ! FLEXINT_H */
353
354 /* begin standard C++ headers. */
355
356 /* TODO: this is always defined, so inline it */
357 #define yyconst const
358
359 #if defined(__GNUC__) && __GNUC__ >= 3
360 #define yynoreturn __attribute__((__noreturn__))
361 #else
362 #define yynoreturn
363 #endif
364
365 /* Returned upon end-of-file. */
366 #define YY_NULL 0
367
368 /* Promotes a possibly negative, possibly signed char to an
369 * integer in range [0..255] for use as an array index.
370 */
371 #define YY_SC_TO_UI(c) ((YY_CHAR) (c))
372
373 /* Enter a start condition. This macro really ought to take a parameter,
374 * but we do it the disgusting crufty way forced on us by the ()-less
375 * definition of BEGIN.
376 */
377 #define BEGIN (yy_start) = 1 + 2 *
378 /* Translate the current start state into a value that can be later handed
379 * to BEGIN to return to the state. The YYSTATE alias is for lex
380 * compatibility.
381 */
382 #define YY_START (((yy_start) - 1) / 2)
383 #define YYSTATE YY_START
384 /* Action number for EOF rule of a given start state. */
385 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
386 /* Special action meaning "start processing a new file". */
387 #define YY_NEW_FILE yyrestart( yyin )
388 #define YY_END_OF_BUFFER_CHAR 0
389
390 /* Size of default input buffer. */
391 #ifndef YY_BUF_SIZE
392 #ifdef __ia64__
393 /* On IA-64, the buffer size is 16k, not 8k.
394 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
395 * Ditto for the __ia64__ case accordingly.
396 */
397 #define YY_BUF_SIZE 32768
398 #else
399 #define YY_BUF_SIZE 16384
400 #endif /* __ia64__ */
401 #endif
402
403 /* The state buf must be large enough to hold one state per character in the main buffer.
404 */
405 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
406
407 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
408 #define YY_TYPEDEF_YY_BUFFER_STATE
409 typedef struct yy_buffer_state *YY_BUFFER_STATE;
410 #endif
411
412 #ifndef YY_TYPEDEF_YY_SIZE_T
413 #define YY_TYPEDEF_YY_SIZE_T
414 typedef size_t yy_size_t;
415 #endif
416
417 extern int yyleng;
418
419 extern FILE *yyin, *yyout;
420
421 #define EOB_ACT_CONTINUE_SCAN 0
422 #define EOB_ACT_END_OF_FILE 1
423 #define EOB_ACT_LAST_MATCH 2
424
425 #define YY_LESS_LINENO(n)
426 #define YY_LINENO_REWIND_TO(ptr)
427
428 /* Return all but the first "n" matched characters back to the input stream. */
429 #define yyless(n) \
430 do \
431 { \
432 /* Undo effects of setting up yytext. */ \
433 int yyless_macro_arg = (n); \
434 YY_LESS_LINENO(yyless_macro_arg);\
435 *yy_cp = (yy_hold_char); \
436 YY_RESTORE_YY_MORE_OFFSET \
437 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
438 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
439 } \
440 while ( 0 )
441 #define unput(c) yyunput( c, (yytext_ptr) )
442
443 #ifndef YY_STRUCT_YY_BUFFER_STATE
444 #define YY_STRUCT_YY_BUFFER_STATE
445 struct yy_buffer_state
446 {
447 FILE *yy_input_file;
448
449 char *yy_ch_buf; /* input buffer */
450 char *yy_buf_pos; /* current position in input buffer */
451
452 /* Size of input buffer in bytes, not including room for EOB
453 * characters.
454 */
455 int yy_buf_size;
456
457 /* Number of characters read into yy_ch_buf, not including EOB
458 * characters.
459 */
460 int yy_n_chars;
461
462 /* Whether we "own" the buffer - i.e., we know we created it,
463 * and can realloc() it to grow it, and should free() it to
464 * delete it.
465 */
466 int yy_is_our_buffer;
467
468 /* Whether this is an "interactive" input source; if so, and
469 * if we're using stdio for input, then we want to use getc()
470 * instead of fread(), to make sure we stop fetching input after
471 * each newline.
472 */
473 int yy_is_interactive;
474
475 /* Whether we're considered to be at the beginning of a line.
476 * If so, '^' rules will be active on the next match, otherwise
477 * not.
478 */
479 int yy_at_bol;
480
481 int yy_bs_lineno; /**< The line count. */
482 int yy_bs_column; /**< The column count. */
483
484 /* Whether to try to fill the input buffer when we reach the
485 * end of it.
486 */
487 int yy_fill_buffer;
488
489 int yy_buffer_status;
490
491 #define YY_BUFFER_NEW 0
492 #define YY_BUFFER_NORMAL 1
493 /* When an EOF's been seen but there's still some text to process
494 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
495 * shouldn't try reading from the input source any more. We might
496 * still have a bunch of tokens to match, though, because of
497 * possible backing-up.
498 *
499 * When we actually see the EOF, we change the status to "new"
500 * (via yyrestart()), so that the user can continue scanning by
501 * just pointing yyin at a new input file.
502 */
503 #define YY_BUFFER_EOF_PENDING 2
504
505 };
506 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
507
508 /* Stack of input buffers. */
509 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
510 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
511 static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
512
513 /* We provide macros for accessing buffer states in case in the
514 * future we want to put the buffer states in a more general
515 * "scanner state".
516 *
517 * Returns the top of the stack, or NULL.
518 */
519 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
520 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
521 : NULL)
522 /* Same as previous macro, but useful when we know that the buffer stack is not
523 * NULL or when we need an lvalue. For internal use only.
524 */
525 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
526
527 /* yy_hold_char holds the character lost when yytext is formed. */
528 static char yy_hold_char;
529 static int yy_n_chars; /* number of characters read into yy_ch_buf */
530 int yyleng;
531
532 /* Points to current character in buffer. */
533 static char *yy_c_buf_p = NULL;
534 static int yy_init = 0; /* whether we need to initialize */
535 static int yy_start = 0; /* start state number */
536
537 /* Flag which is used to allow yywrap()'s to do buffer switches
538 * instead of setting up a fresh yyin. A bit of a hack ...
539 */
540 static int yy_did_buffer_switch_on_eof;
541
542 void yyrestart ( FILE *input_file );
543 void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
544 YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
545 void yy_delete_buffer ( YY_BUFFER_STATE b );
546 void yy_flush_buffer ( YY_BUFFER_STATE b );
547 void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
548 void yypop_buffer_state ( void );
549
550 static void yyensure_buffer_stack ( void );
551 static void yy_load_buffer_state ( void );
552 static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
553 #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
554
555 YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
556 YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
557 YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
558
559 void *yyalloc ( yy_size_t );
560 void *yyrealloc ( void *, yy_size_t );
561 void yyfree ( void * );
562
563 #define yy_new_buffer yy_create_buffer
564 #define yy_set_interactive(is_interactive) \
565 { \
566 if ( ! YY_CURRENT_BUFFER ){ \
567 yyensure_buffer_stack (); \
568 YY_CURRENT_BUFFER_LVALUE = \
569 yy_create_buffer( yyin, YY_BUF_SIZE ); \
570 } \
571 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
572 }
573 #define yy_set_bol(at_bol) \
574 { \
575 if ( ! YY_CURRENT_BUFFER ){\
576 yyensure_buffer_stack (); \
577 YY_CURRENT_BUFFER_LVALUE = \
578 yy_create_buffer( yyin, YY_BUF_SIZE ); \
579 } \
580 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
581 }
582 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
583
584 /* Begin user sect3 */
585 typedef flex_uint8_t YY_CHAR;
586
587 FILE *yyin = NULL, *yyout = NULL;
588
589 typedef int yy_state_type;
590
591 extern int yylineno;
592 int yylineno = 1;
593
594 extern char *yytext;
595 #ifdef yytext_ptr
596 #undef yytext_ptr
597 #endif
598 #define yytext_ptr yytext
599
600 static yy_state_type yy_get_previous_state ( void );
601 static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
602 static int yy_get_next_buffer ( void );
603 static void yynoreturn yy_fatal_error ( const char* msg );
604
605 /* Done after the current pattern has been matched and before the
606 * corresponding action - sets up yytext.
607 */
608 #define YY_DO_BEFORE_ACTION \
609 (yytext_ptr) = yy_bp; \
610 yyleng = (int) (yy_cp - yy_bp); \
611 (yy_hold_char) = *yy_cp; \
612 *yy_cp = '\0'; \
613 (yy_c_buf_p) = yy_cp;
614 #define YY_NUM_RULES 80
615 #define YY_END_OF_BUFFER 81
616 /* This struct is not used in this scanner,
617 but its presence is necessary. */
618 struct yy_trans_info
619 {
620 flex_int32_t yy_verify;
621 flex_int32_t yy_nxt;
622 };
623 static const flex_int16_t yy_accept[494] =
624 { 0,
625 0, 3, 0, 0, 0, 0, 0, 0, 0, 0,
626 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
627 0, 0, 0, 0, 0, 0, 81, 79, 80, 3,
628 3, 2, 79, 3, 36, 78, 79, 79, 4, 66,
629 79, 6, 65, 79, 79, 65, 65, 65, 65, 65,
630 65, 65, 65, 65, 16, 35, 11, 12, 14, 13,
631 10, 15, 79, 9, 69, 75, 71, 71, 73, 72,
632 79, 67, 77, 76, 25, 25, 25, 25, 25, 25,
633 74, 3, 3, 2, 0, 3, 3, 1, 0, 36,
634 78, 7, 4, 66, 8, 65, 5, 0, 66, 65,
635
636 65, 65, 65, 65, 65, 65, 65, 65, 65, 16,
637 35, 35, 11, 0, 9, 9, 69, 75, 0, 70,
638 73, 72, 0, 67, 67, 76, 0, 0, 0, 0,
639 0, 74, 0, 0, 0, 0, 0, 64, 65, 65,
640 65, 65, 65, 65, 65, 65, 65, 0, 0, 0,
641 0, 20, 0, 0, 0, 0, 19, 0, 0, 0,
642 66, 65, 65, 65, 66, 66, 65, 65, 65, 0,
643 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
644 0, 0, 0, 64, 65, 65, 66, 64, 64, 65,
645 66, 66, 68, 0, 0, 0, 0, 0, 28, 0,
646
647 0, 0, 0, 0, 0, 0, 0, 64, 65, 65,
648 64, 64, 64, 65, 64, 64, 0, 23, 0, 0,
649 0, 29, 26, 0, 0, 0, 0, 18, 0, 66,
650 66, 65, 64, 64, 64, 66, 64, 64, 21, 0,
651 0, 17, 30, 27, 0, 0, 0, 64, 64, 64,
652 65, 64, 64, 64, 64, 64, 64, 64, 64, 64,
653 64, 64, 64, 64, 64, 64, 22, 0, 31, 32,
654 0, 64, 64, 64, 66, 64, 51, 64, 64, 64,
655 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
656 0, 0, 64, 64, 64, 64, 64, 64, 64, 59,
657
658 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
659 53, 64, 66, 24, 33, 64, 64, 64, 64, 64,
660 37, 64, 64, 63, 64, 64, 64, 64, 64, 64,
661 64, 64, 64, 64, 60, 64, 0, 64, 64, 64,
662 64, 64, 39, 38, 64, 66, 64, 64, 64, 64,
663 64, 46, 56, 64, 64, 0, 64, 66, 64, 66,
664 64, 57, 55, 64, 66, 45, 64, 64, 64, 64,
665 0, 64, 64, 61, 64, 40, 64, 64, 42, 66,
666 64, 64, 0, 66, 64, 64, 64, 64, 64, 64,
667 64, 64, 64, 64, 0, 64, 64, 64, 66, 64,
668
669 64, 64, 66, 64, 64, 64, 0, 64, 64, 64,
670 64, 64, 64, 64, 66, 64, 66, 64, 34, 64,
671 66, 64, 64, 50, 64, 64, 66, 64, 64, 41,
672 64, 64, 64, 64, 64, 64, 66, 64, 64, 64,
673 64, 64, 54, 66, 64, 66, 64, 64, 44, 64,
674 52, 64, 64, 66, 64, 64, 64, 64, 66, 66,
675 66, 64, 64, 64, 64, 58, 64, 64, 64, 64,
676 64, 64, 43, 64, 47, 64, 64, 64, 64, 64,
677 64, 49, 48, 64, 64, 64, 66, 64, 64, 64,
678 64, 62, 0
679
680 } ;
681
682 static const YY_CHAR yy_ec[256] =
683 { 0,
684 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
685 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
686 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
687 1, 5, 6, 1, 7, 1, 8, 1, 1, 1,
688 1, 1, 9, 10, 11, 1, 12, 13, 14, 15,
689 16, 16, 16, 17, 16, 16, 16, 1, 1, 1,
690 18, 19, 1, 20, 21, 21, 21, 21, 21, 21,
691 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
692 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
693 1, 22, 1, 1, 23, 1, 24, 25, 26, 27,
694
695 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
696 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
697 48, 49, 50, 1, 51, 1, 1, 1, 1, 1,
698 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
699 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
700 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
701 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
702 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
703 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
704 1, 1, 1, 1, 1, 8, 8, 1, 1, 1,
705
706 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
707 1, 1, 1, 8, 1, 1, 1, 1, 1, 8,
708 1, 1, 8, 1, 1, 1, 1, 8, 8, 1,
709 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
710 1, 1, 1, 1, 1, 8, 1, 1, 1, 1,
711 1, 8, 1, 1, 1
712 } ;
713
714 static const YY_CHAR yy_meta[52] =
715 { 0,
716 1, 2, 3, 3, 2, 1, 1, 4, 1, 1,
717 1, 1, 5, 5, 5, 5, 5, 1, 6, 2,
718 5, 2, 5, 5, 5, 5, 5, 5, 5, 5,
719 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
720 5, 5, 5, 5, 5, 5, 5, 5, 5, 1,
721 1
722 } ;
723
724 static const flex_int16_t yy_base[513] =
725 { 0,
726 855, 0, 7, 0, 58, 109, 160, 0, 211, 262,
727 68, 78, 85, 120, 130, 134, 223, 232, 88, 99,
728 95, 141, 312, 356, 236, 274, 857, 859, 859, 0,
729 244, 859, 853, 71, 146, 859, 852, 842, 0, 0,
730 841, 859, 71, 840, 831, 394, 413, 812, 825, 799,
731 809, 802, 57, 821, 0, 272, 0, 859, 859, 859,
732 0, 859, 214, 839, 0, 153, 823, 237, 248, 288,
733 265, 837, 859, 290, 859, 813, 793, 801, 800, 809,
734 295, 0, 299, 859, 833, 295, 304, 859, 832, 316,
735 859, 859, 0, 0, 859, 118, 859, 297, 429, 0,
736
737 799, 796, 789, 799, 800, 793, 789, 789, 785, 0,
738 317, 337, 0, 304, 820, 819, 0, 318, 773, 859,
739 333, 340, 350, 817, 816, 360, 791, 787, 776, 774,
740 775, 361, 787, 112, 282, 777, 790, 445, 789, 782,
741 786, 770, 785, 784, 768, 762, 767, 0, 771, 760,
742 758, 859, 758, 770, 756, 770, 340, 770, 768, 762,
743 207, 761, 767, 768, 313, 107, 749, 766, 765, 736,
744 749, 742, 747, 751, 750, 753, 748, 751, 740, 342,
745 742, 748, 738, 736, 743, 748, 347, 743, 732, 726,
746 287, 349, 859, 740, 725, 742, 727, 727, 859, 734,
747
748 733, 719, 732, 721, 714, 728, 730, 732, 731, 711,
749 727, 706, 709, 726, 707, 719, 719, 859, 709, 707,
750 715, 859, 859, 699, 712, 698, 712, 859, 703, 304,
751 352, 709, 698, 707, 700, 446, 705, 708, 859, 703,
752 707, 859, 859, 859, 686, 700, 683, 678, 694, 696,
753 700, 678, 686, 692, 680, 694, 689, 678, 674, 684,
754 685, 668, 667, 669, 680, 681, 859, 677, 859, 859,
755 679, 669, 676, 662, 357, 659, 0, 660, 661, 657,
756 655, 656, 658, 658, 649, 661, 656, 656, 658, 666,
757 660, 659, 651, 659, 642, 355, 646, 654, 637, 0,
758
759 638, 651, 650, 653, 255, 632, 637, 646, 645, 636,
760 0, 624, 305, 859, 647, 637, 634, 635, 639, 622,
761 0, 618, 620, 0, 625, 647, 628, 631, 634, 618,
762 615, 620, 611, 629, 0, 604, 609, 613, 626, 610,
763 624, 605, 0, 0, 618, 627, 608, 619, 598, 612,
764 611, 0, 0, 597, 601, 608, 601, 333, 597, 363,
765 591, 0, 0, 604, 367, 0, 604, 607, 597, 593,
766 584, 603, 601, 0, 596, 0, 596, 579, 0, 390,
767 572, 588, 591, 377, 577, 574, 593, 572, 587, 582,
768 597, 583, 582, 572, 571, 569, 569, 581, 373, 563,
769
770 576, 578, 572, 564, 576, 564, 552, 561, 572, 567,
771 556, 550, 563, 553, 547, 550, 362, 545, 859, 551,
772 380, 561, 552, 0, 556, 552, 557, 535, 548, 0,
773 540, 540, 533, 532, 551, 545, 529, 536, 539, 501,
774 494, 465, 0, 399, 460, 442, 457, 446, 0, 454,
775 0, 437, 456, 436, 451, 442, 425, 422, 409, 422,
776 415, 435, 414, 415, 412, 0, 411, 409, 408, 406,
777 404, 398, 0, 408, 0, 394, 384, 393, 370, 362,
778 349, 0, 0, 336, 310, 282, 43, 216, 220, 129,
779 59, 0, 859, 490, 496, 502, 508, 514, 520, 526,
780
781 532, 538, 544, 547, 549, 551, 553, 1, 555, 561,
782 564, 566
783 } ;
784
785 static const flex_int16_t yy_def[513] =
786 { 0,
787 494, 495, 493, 3, 496, 496, 493, 7, 497, 497,
788 494, 494, 498, 498, 498, 498, 498, 498, 494, 494,
789 499, 499, 500, 500, 498, 498, 493, 493, 493, 501,
790 501, 493, 493, 502, 493, 493, 493, 493, 503, 504,
791 493, 493, 505, 493, 493, 506, 506, 47, 47, 47,
792 47, 47, 47, 47, 507, 508, 509, 493, 493, 493,
793 509, 493, 493, 493, 510, 493, 493, 493, 493, 493,
794 493, 493, 493, 493, 493, 493, 493, 493, 493, 493,
795 493, 501, 501, 493, 493, 502, 502, 493, 493, 493,
796 493, 493, 503, 504, 493, 505, 493, 493, 511, 47,
797
798 47, 47, 47, 47, 47, 47, 47, 47, 47, 507,
799 508, 508, 509, 493, 493, 493, 510, 493, 493, 493,
800 493, 493, 493, 493, 493, 493, 493, 493, 493, 493,
801 493, 493, 493, 493, 493, 493, 493, 511, 47, 47,
802 47, 47, 47, 47, 47, 47, 47, 512, 493, 493,
803 493, 493, 493, 493, 493, 493, 493, 493, 493, 493,
804 138, 47, 47, 47, 138, 138, 47, 47, 47, 512,
805 493, 493, 493, 493, 493, 493, 493, 493, 493, 493,
806 493, 493, 493, 138, 47, 47, 138, 138, 138, 47,
807 138, 138, 493, 493, 493, 493, 493, 493, 493, 493,
808
809 493, 493, 493, 493, 493, 493, 493, 138, 47, 47,
810 138, 138, 138, 47, 138, 138, 493, 493, 493, 493,
811 493, 493, 493, 493, 493, 493, 493, 493, 493, 138,
812 138, 47, 138, 138, 138, 138, 138, 138, 493, 493,
813 493, 493, 493, 493, 493, 493, 493, 138, 138, 138,
814 47, 138, 138, 138, 138, 138, 138, 138, 138, 138,
815 138, 138, 138, 138, 138, 138, 493, 493, 493, 493,
816 493, 138, 138, 138, 138, 138, 138, 138, 138, 138,
817 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
818 493, 493, 138, 138, 138, 138, 138, 138, 138, 138,
819
820 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
821 138, 138, 138, 493, 493, 138, 138, 138, 138, 138,
822 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
823 138, 138, 138, 138, 138, 138, 493, 138, 138, 138,
824 138, 138, 138, 138, 138, 504, 138, 138, 138, 138,
825 138, 138, 138, 138, 138, 493, 138, 138, 138, 138,
826 138, 138, 504, 138, 138, 138, 138, 138, 138, 138,
827 493, 138, 138, 138, 138, 138, 138, 138, 138, 138,
828 138, 138, 493, 138, 138, 138, 138, 138, 138, 138,
829 138, 138, 138, 138, 493, 138, 138, 138, 138, 138,
830
831 138, 138, 504, 138, 138, 138, 493, 138, 138, 138,
832 138, 138, 138, 138, 504, 138, 138, 138, 493, 138,
833 138, 138, 138, 138, 138, 138, 504, 138, 138, 138,
834 138, 138, 138, 138, 138, 138, 504, 138, 138, 138,
835 138, 138, 138, 138, 138, 504, 138, 138, 138, 138,
836 138, 138, 138, 504, 138, 138, 138, 138, 138, 504,
837 138, 138, 138, 138, 138, 504, 138, 138, 138, 138,
838 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
839 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
840 138, 138, 0, 493, 493, 493, 493, 493, 493, 493,
841
842 493, 493, 493, 493, 493, 493, 493, 493, 493, 493,
843 493, 493
844 } ;
845
846 static const flex_int16_t yy_nxt[911] =
847 { 0,
848 493, 31, 32, 33, 31, 112, 34, 28, 35, 36,
849 37, 35, 38, 39, 40, 28, 28, 41, 42, 43,
850 43, 43, 43, 43, 44, 28, 45, 43, 28, 40,
851 46, 47, 48, 49, 47, 47, 50, 47, 47, 47,
852 47, 51, 47, 52, 47, 47, 47, 53, 47, 47,
853 47, 47, 54, 47, 47, 47, 28, 28, 28, 35,
854 36, 37, 35, 28, 28, 94, 28, 28, 28, 28,
855 36, 37, 63, 88, 89, 28, 28, 28, 94, 28,
856 36, 37, 63, 488, 107, 64, 66, 36, 37, 66,
857 36, 37, 71, 94, 108, 64, 74, 36, 37, 74,
858
859 492, 36, 37, 71, 67, 72, 68, 28, 28, 28,
860 35, 36, 37, 35, 28, 28, 72, 28, 28, 28,
861 28, 66, 36, 37, 66, 94, 28, 28, 28, 94,
862 28, 69, 36, 37, 69, 69, 36, 37, 69, 67,
863 94, 68, 74, 36, 37, 74, 155, 90, 156, 67,
864 90, 68, 189, 67, 118, 68, 491, 118, 28, 28,
865 28, 35, 36, 37, 35, 28, 28, 28, 28, 28,
866 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
867 56, 28, 56, 56, 56, 56, 56, 56, 56, 56,
868 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
869
870 56, 56, 56, 56, 56, 56, 56, 56, 56, 28,
871 28, 28, 35, 36, 37, 35, 28, 28, 114, 58,
872 59, 60, 28, 61, 70, 36, 37, 70, 62, 94,
873 28, 115, 28, 70, 36, 37, 70, 81, 29, 28,
874 81, 120, 67, 184, 68, 83, 84, 85, 83, 121,
875 86, 67, 121, 68, 490, 67, 120, 68, 120, 489,
876 28, 28, 28, 35, 36, 37, 35, 28, 28, 123,
877 58, 59, 60, 28, 61, 81, 29, 28, 81, 62,
878 328, 28, 124, 28, 111, 111, 111, 111, 111, 122,
879 329, 126, 122, 67, 126, 68, 132, 88, 89, 132,
880
881 83, 84, 85, 83, 487, 86, 88, 89, 114, 94,
882 157, 28, 28, 35, 29, 28, 35, 90, 158, 118,
883 90, 115, 118, 133, 134, 215, 94, 94, 135, 111,
884 111, 111, 111, 111, 121, 94, 486, 121, 76, 77,
885 136, 122, 78, 137, 122, 248, 336, 188, 79, 111,
886 111, 111, 111, 111, 123, 94, 80, 35, 29, 28,
887 35, 126, 132, 485, 126, 132, 178, 124, 203, 94,
888 179, 94, 204, 211, 94, 216, 180, 249, 373, 94,
889 296, 319, 76, 77, 94, 94, 78, 429, 297, 94,
890 378, 484, 79, 298, 299, 94, 250, 320, 375, 94,
891
892 80, 94, 94, 483, 411, 396, 96, 96, 96, 96,
893 96, 482, 94, 389, 96, 390, 99, 391, 481, 101,
894 94, 94, 452, 432, 480, 96, 96, 96, 96, 96,
895 392, 94, 465, 96, 479, 99, 94, 94, 467, 478,
896 477, 94, 94, 94, 94, 94, 476, 475, 474, 94,
897 473, 94, 94, 472, 471, 470, 469, 94, 94, 94,
898 94, 94, 468, 466, 464, 94, 463, 99, 94, 255,
899 256, 462, 257, 461, 258, 259, 460, 260, 459, 458,
900 261, 457, 456, 455, 454, 262, 453, 263, 451, 264,
901 28, 28, 28, 28, 28, 28, 30, 30, 30, 30,
902
903 30, 30, 55, 55, 55, 55, 55, 55, 57, 57,
904 57, 57, 57, 57, 65, 65, 65, 65, 65, 65,
905 73, 73, 73, 73, 73, 73, 75, 75, 75, 75,
906 75, 75, 82, 82, 450, 82, 82, 82, 87, 87,
907 87, 87, 87, 87, 93, 93, 449, 93, 93, 93,
908 94, 94, 96, 96, 100, 100, 110, 110, 113, 113,
909 113, 117, 448, 447, 117, 117, 117, 138, 138, 170,
910 170, 446, 445, 444, 443, 442, 441, 440, 439, 438,
911 437, 436, 435, 434, 433, 431, 430, 428, 427, 426,
912 425, 424, 423, 422, 421, 420, 419, 418, 417, 416,
913
914 415, 414, 413, 412, 410, 409, 408, 407, 406, 405,
915 404, 403, 402, 401, 400, 399, 398, 397, 395, 394,
916 393, 388, 387, 386, 385, 384, 383, 382, 381, 380,
917 379, 377, 376, 374, 372, 371, 370, 369, 368, 367,
918 366, 365, 364, 363, 362, 361, 360, 359, 358, 357,
919 356, 355, 354, 353, 352, 351, 350, 349, 348, 347,
920 346, 345, 344, 343, 342, 341, 340, 339, 338, 337,
921 335, 334, 333, 332, 331, 330, 327, 326, 325, 324,
922 323, 322, 321, 318, 317, 316, 315, 314, 313, 312,
923 311, 310, 309, 308, 307, 306, 305, 304, 303, 302,
924
925 301, 300, 295, 294, 293, 292, 291, 290, 289, 288,
926 287, 286, 285, 284, 283, 282, 281, 280, 279, 278,
927 277, 276, 275, 274, 273, 272, 271, 270, 269, 268,
928 267, 266, 265, 254, 253, 252, 251, 247, 246, 245,
929 244, 243, 242, 241, 240, 239, 238, 237, 236, 235,
930 234, 233, 232, 231, 230, 229, 228, 227, 226, 225,
931 224, 223, 222, 221, 220, 219, 218, 217, 214, 213,
932 212, 210, 209, 208, 207, 206, 205, 202, 201, 200,
933 199, 198, 197, 196, 195, 194, 193, 192, 191, 190,
934 187, 186, 185, 183, 182, 181, 177, 176, 175, 174,
935
936 173, 172, 171, 169, 168, 167, 166, 165, 164, 163,
937 162, 161, 160, 159, 154, 153, 152, 151, 150, 149,
938 125, 125, 148, 116, 116, 147, 146, 145, 144, 143,
939 142, 141, 140, 139, 88, 84, 131, 130, 129, 128,
940 127, 125, 119, 116, 109, 106, 105, 104, 103, 102,
941 98, 97, 95, 92, 91, 84, 493, 29, 27, 493,
942 493, 493, 493, 493, 493, 493, 493, 493, 493, 493,
943 493, 493, 493, 493, 493, 493, 493, 493, 493, 493,
944 493, 493, 493, 493, 493, 493, 493, 493, 493, 493,
945 493, 493, 493, 493, 493, 493, 493, 493, 493, 493,
946
947 493, 493, 493, 493, 493, 493, 493, 493, 493, 493
948 } ;
949
950 static const flex_int16_t yy_chk[911] =
951 { 0,
952 0, 2, 2, 2, 2, 508, 2, 3, 3, 3,
953 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
954 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
955 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
956 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
957 3, 3, 3, 3, 3, 3, 3, 3, 5, 5,
958 5, 5, 5, 5, 5, 487, 5, 5, 5, 5,
959 11, 11, 11, 34, 34, 5, 5, 5, 43, 5,
960 12, 12, 12, 487, 53, 11, 13, 13, 13, 13,
961 19, 19, 19, 43, 53, 12, 21, 21, 21, 21,
962
963 491, 20, 20, 20, 13, 19, 13, 5, 5, 6,
964 6, 6, 6, 6, 6, 6, 20, 6, 6, 6,
965 6, 14, 14, 14, 14, 96, 6, 6, 6, 166,
966 6, 15, 15, 15, 15, 16, 16, 16, 16, 14,
967 96, 14, 22, 22, 22, 22, 134, 35, 134, 15,
968 35, 15, 166, 16, 66, 16, 490, 66, 6, 6,
969 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
970 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
971 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
972 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
973
974 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
975 7, 9, 9, 9, 9, 9, 9, 9, 63, 9,
976 9, 9, 9, 9, 17, 17, 17, 17, 9, 161,
977 9, 63, 9, 18, 18, 18, 18, 25, 25, 25,
978 25, 68, 17, 161, 17, 31, 31, 31, 31, 69,
979 31, 18, 69, 18, 489, 25, 68, 25, 68, 488,
980 9, 9, 10, 10, 10, 10, 10, 10, 10, 71,
981 10, 10, 10, 10, 10, 26, 26, 26, 26, 10,
982 305, 10, 71, 10, 56, 56, 56, 56, 56, 70,
983 305, 74, 70, 26, 74, 26, 81, 86, 86, 81,
984
985 83, 83, 83, 83, 486, 83, 87, 87, 114, 191,
986 135, 10, 10, 23, 23, 23, 23, 90, 135, 118,
987 90, 114, 118, 98, 98, 191, 230, 313, 98, 111,
988 111, 111, 111, 111, 121, 165, 485, 121, 23, 23,
989 98, 122, 23, 98, 122, 230, 313, 165, 23, 112,
990 112, 112, 112, 112, 123, 358, 23, 24, 24, 24,
991 24, 126, 132, 484, 126, 132, 157, 123, 180, 187,
992 157, 192, 180, 187, 231, 192, 157, 231, 358, 275,
993 275, 296, 24, 24, 417, 360, 24, 417, 275, 365,
994 365, 481, 24, 275, 275, 399, 231, 296, 360, 384,
995
996 24, 46, 421, 480, 399, 384, 46, 46, 46, 46,
997 46, 479, 380, 380, 46, 380, 46, 380, 478, 46,
998 47, 444, 444, 421, 477, 47, 47, 47, 47, 47,
999 380, 459, 459, 47, 476, 47, 99, 461, 461, 474,
1000 472, 99, 99, 99, 99, 99, 471, 470, 469, 99,
1001 468, 99, 138, 467, 465, 464, 463, 138, 138, 138,
1002 138, 138, 462, 460, 458, 138, 457, 138, 236, 236,
1003 236, 456, 236, 455, 236, 236, 454, 236, 453, 452,
1004 236, 450, 448, 447, 446, 236, 445, 236, 442, 236,
1005 494, 494, 494, 494, 494, 494, 495, 495, 495, 495,
1006
1007 495, 495, 496, 496, 496, 496, 496, 496, 497, 497,
1008 497, 497, 497, 497, 498, 498, 498, 498, 498, 498,
1009 499, 499, 499, 499, 499, 499, 500, 500, 500, 500,
1010 500, 500, 501, 501, 441, 501, 501, 501, 502, 502,
1011 502, 502, 502, 502, 503, 503, 440, 503, 503, 503,
1012 504, 504, 505, 505, 506, 506, 507, 507, 509, 509,
1013 509, 510, 439, 438, 510, 510, 510, 511, 511, 512,
1014 512, 437, 436, 435, 434, 433, 432, 431, 429, 428,
1015 427, 426, 425, 423, 422, 420, 418, 416, 415, 414,
1016 413, 412, 411, 410, 409, 408, 407, 406, 405, 404,
1017
1018 403, 402, 401, 400, 398, 397, 396, 395, 394, 393,
1019 392, 391, 390, 389, 388, 387, 386, 385, 383, 382,
1020 381, 378, 377, 375, 373, 372, 371, 370, 369, 368,
1021 367, 364, 361, 359, 357, 356, 355, 354, 351, 350,
1022 349, 348, 347, 346, 345, 342, 341, 340, 339, 338,
1023 337, 336, 334, 333, 332, 331, 330, 329, 328, 327,
1024 326, 325, 323, 322, 320, 319, 318, 317, 316, 315,
1025 312, 310, 309, 308, 307, 306, 304, 303, 302, 301,
1026 299, 298, 297, 295, 294, 293, 292, 291, 290, 289,
1027 288, 287, 286, 285, 284, 283, 282, 281, 280, 279,
1028
1029 278, 276, 274, 273, 272, 271, 268, 266, 265, 264,
1030 263, 262, 261, 260, 259, 258, 257, 256, 255, 254,
1031 253, 252, 251, 250, 249, 248, 247, 246, 245, 241,
1032 240, 238, 237, 235, 234, 233, 232, 229, 227, 226,
1033 225, 224, 221, 220, 219, 217, 216, 215, 214, 213,
1034 212, 211, 210, 209, 208, 207, 206, 205, 204, 203,
1035 202, 201, 200, 198, 197, 196, 195, 194, 190, 189,
1036 188, 186, 185, 184, 183, 182, 181, 179, 178, 177,
1037 176, 175, 174, 173, 172, 171, 170, 169, 168, 167,
1038 164, 163, 162, 160, 159, 158, 156, 155, 154, 153,
1039
1040 151, 150, 149, 147, 146, 145, 144, 143, 142, 141,
1041 140, 139, 137, 136, 133, 131, 130, 129, 128, 127,
1042 125, 124, 119, 116, 115, 109, 108, 107, 106, 105,
1043 104, 103, 102, 101, 89, 85, 80, 79, 78, 77,
1044 76, 72, 67, 64, 54, 52, 51, 50, 49, 48,
1045 45, 44, 41, 38, 37, 33, 27, 1, 493, 493,
1046 493, 493, 493, 493, 493, 493, 493, 493, 493, 493,
1047 493, 493, 493, 493, 493, 493, 493, 493, 493, 493,
1048 493, 493, 493, 493, 493, 493, 493, 493, 493, 493,
1049 493, 493, 493, 493, 493, 493, 493, 493, 493, 493,
1050
1051 493, 493, 493, 493, 493, 493, 493, 493, 493, 493
1052 } ;
1053
1054 static yy_state_type yy_last_accepting_state;
1055 static char *yy_last_accepting_cpos;
1056
1057 extern int yy_flex_debug;
1058 int yy_flex_debug = 0;
1059
1060 /* The intent behind this definition is that it'll catch
1061 * any uses of REJECT which flex missed.
1062 */
1063 #define REJECT reject_used_but_not_detected
1064 #define yymore() yymore_used_but_not_detected
1065 #define YY_MORE_ADJ 0
1066 #define YY_RESTORE_YY_MORE_OFFSET
1067 char *yytext;
1068 #line 1 "src/conf_lex.l"
1069 #line 9 "src/conf_lex.l"
1070
1071 #define YYDEBUG 1
1072
1073 /*
1074 * AIDE (Advanced Intrusion Detection Environment)
1075 *
1076 * Copyright (C) 1999-2002, 2004-2006, 2010-2013, 2015-2016, 2019-2025
1077 * Rami Lehti, Pablo Virolainen, Richard van den Berg,
1078 * Hannes von Haugwitz
1079 *
1080 * This program is free software; you can redistribute it and/or
1081 * modify it under the terms of the GNU General Public License as
1082 * published by the Free Software Foundation; either version 2 of the
1083 * License, or (at your option) any later version.
1084 *
1085 * This program is distributed in the hope that it will be useful, but
1086 * WITHOUT ANY WARRANTY; without even the implied warranty of
1087 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1088 * General Public License for more details.
1089 *
1090 * You should have received a copy of the GNU General Public License along
1091 * with this program; if not, write to the Free Software Foundation, Inc.,
1092 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
1093 */
1094
1095 #include "util.h"
1096 #include "conf_yacc.h"
1097 #include "errorcodes.h"
1098 #include "commandconf.h"
1099 #include "log.h"
1100 #include "progress.h"
1101
1102 #include "conf_ast.h"
1103
1104 #define LOG_LEX_TOKEN(log_level, token, text) \
1105 log_msg(log_level, "%s:%d: \u2502 " #token " (text: '%s')", conf_filename, conf_linenumber, text);
1106
1107 #define LOG_CONFIG_LINE(log_level, msg) \
1108 log_msg(log_level, "%s:%d: %s (line: '%s')", conf_filename, conf_linenumber, msg, conf_linebuf);
1109
1110 #define DEPRECATION_NOTICE(deprecated_option, new_option) \
1111 log_msg(LOG_LEVEL_NOTICE, "%s:%d: Using '%s' is DEPRECATED and will be removed in the release after next. Update your config and use '%s' instead (line: '%s')", conf_filename, conf_linenumber, deprecated_option, new_option ,conf_linebuf);
1112 #define DEPRECATION_WARNING(deprecated_option, new_option) \
1113 log_msg(LOG_LEVEL_WARNING, "%s:%d: Using '%s' is DEPRECATED and will be removed in the next release.. Update your config and use '%s' instead (line: '%s')", conf_filename, conf_linenumber, deprecated_option, new_option ,conf_linebuf);
1114
1115 int conf_linenumber = 0;
1116 char *conf_filename;
1117 char *conf_linebuf;
1118
1119 LOG_LEVEL lex_log_level = LOG_LEVEL_DEBUG;
1120
1121 #define YY_INPUT(buf,result,max_size) \
1122 if( ((result=conf_input_wrapper(buf,max_size,confin)) == 0) \
1123 && ferror(yyin) ) \
1124 YY_FATAL_ERROR( "input in flex scanner failed" );
1125
1126 #line 1127 "src/conf_lex.c"
1127 #define YY_NO_INPUT 1
1128
1129 #line 1130 "src/conf_lex.c"
1130
1131 #define INITIAL 0
1132 #define CONFIG 1
1133 #define DEFSTMT 2
1134 #define ENVVAR 3
1135 #define EXPR 4
1136 #define EXPREQUHUNT 5
1137 #define PATH 6
1138 #define STRING 7
1139 #define STRINGS 8
1140 #define STRINGEQHUNT 9
1141 #define STRINGHUNT 10
1142 #define CONDITION 11
1143 #define CONDSTRING 12
1144
1145 #ifndef YY_NO_UNISTD_H
1146 /* Special case for "unistd.h", since it is non-ANSI. We include it way
1147 * down here because we want the user's section 1 to have been scanned first.
1148 * The user has a chance to override it with an option.
1149 */
1150 #include <unistd.h>
1151 #endif
1152
1153 #ifndef YY_EXTRA_TYPE
1154 #define YY_EXTRA_TYPE void *
1155 #endif
1156
1157 static int yy_init_globals ( void );
1158
1159 /* Accessor methods to globals.
1160 These are made visible to non-reentrant scanners for convenience. */
1161
1162 int yylex_destroy ( void );
1163
1164 int yyget_debug ( void );
1165
1166 void yyset_debug ( int debug_flag );
1167
1168 YY_EXTRA_TYPE yyget_extra ( void );
1169
1170 void yyset_extra ( YY_EXTRA_TYPE user_defined );
1171
1172 FILE *yyget_in ( void );
1173
1174 void yyset_in ( FILE * _in_str );
1175
1176 FILE *yyget_out ( void );
1177
1178 void yyset_out ( FILE * _out_str );
1179
1180 int yyget_leng ( void );
1181
1182 char *yyget_text ( void );
1183
1184 int yyget_lineno ( void );
1185
1186 void yyset_lineno ( int _line_number );
1187
1188 /* Macros after this point can all be overridden by user definitions in
1189 * section 1.
1190 */
1191
1192 #ifndef YY_SKIP_YYWRAP
1193 #ifdef __cplusplus
1194 extern "C" int yywrap ( void );
1195 #else
1196 extern int yywrap ( void );
1197 #endif
1198 #endif
1199
1200 #ifndef YY_NO_UNPUT
1201
1202 #endif
1203
1204 #ifndef yytext_ptr
1205 static void yy_flex_strncpy ( char *, const char *, int );
1206 #endif
1207
1208 #ifdef YY_NEED_STRLEN
1209 static int yy_flex_strlen ( const char * );
1210 #endif
1211
1212 #ifndef YY_NO_INPUT
1213 #ifdef __cplusplus
1214 static int yyinput ( void );
1215 #else
1216 static int input ( void );
1217 #endif
1218
1219 #endif
1220
1221 /* Amount of stuff to slurp up with each read. */
1222 #ifndef YY_READ_BUF_SIZE
1223 #ifdef __ia64__
1224 /* On IA-64, the buffer size is 16k, not 8k */
1225 #define YY_READ_BUF_SIZE 16384
1226 #else
1227 #define YY_READ_BUF_SIZE 8192
1228 #endif /* __ia64__ */
1229 #endif
1230
1231 /* Copy whatever the last rule matched to the standard output. */
1232 #ifndef ECHO
1233 /* This used to be an fputs(), but since the string might contain NUL's,
1234 * we now use fwrite().
1235 */
1236 #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
1237 #endif
1238
1239 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1240 * is returned in "result".
1241 */
1242 #ifndef YY_INPUT
1243 #define YY_INPUT(buf,result,max_size) \
1244 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
1245 { \
1246 int c = '*'; \
1247 int n; \
1248 for ( n = 0; n < max_size && \
1249 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1250 buf[n] = (char) c; \
1251 if ( c == '\n' ) \
1252 buf[n++] = (char) c; \
1253 if ( c == EOF && ferror( yyin ) ) \
1254 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1255 result = n; \
1256 } \
1257 else \
1258 { \
1259 errno=0; \
1260 while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
1261 { \
1262 if( errno != EINTR) \
1263 { \
1264 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1265 break; \
1266 } \
1267 errno=0; \
1268 clearerr(yyin); \
1269 } \
1270 }\
1271 \
1272
1273 #endif
1274
1275 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1276 * we don't want an extra ';' after the "return" because that will cause
1277 * some compilers to complain about unreachable statements.
1278 */
1279 #ifndef yyterminate
1280 #define yyterminate() return YY_NULL
1281 #endif
1282
1283 /* Number of entries by which start-condition stack grows. */
1284 #ifndef YY_START_STACK_INCR
1285 #define YY_START_STACK_INCR 25
1286 #endif
1287
1288 /* Report a fatal error. */
1289 #ifndef YY_FATAL_ERROR
1290 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1291 #endif
1292
1293 /* end tables serialization structures and prototypes */
1294
1295 /* Default declaration of generated scanner - a define so the user can
1296 * easily add parameters.
1297 */
1298 #ifndef YY_DECL
1299 #define YY_DECL_IS_OURS 1
1300
1301 extern int yylex (void);
1302
1303 #define YY_DECL int yylex (void)
1304 #endif /* !YY_DECL */
1305
1306 /* Code executed at the beginning of each rule, after yytext and yyleng
1307 * have been set up.
1308 */
1309 #ifndef YY_USER_ACTION
1310 #define YY_USER_ACTION
1311 #endif
1312
1313 /* Code executed at the end of each rule. */
1314 #ifndef YY_BREAK
1315 #define YY_BREAK /*LINTED*/break;
1316 #endif
1317
1318 #define YY_RULE_SETUP \
1319 if ( yyleng > 0 ) \
1320 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1321 (yytext[yyleng - 1] == '\n'); \
1322 YY_USER_ACTION
1323
1324 /** The main scanner function which does all the work.
1325 */
1326 YY_DECL
1327 {
1328 yy_state_type yy_current_state;
1329 char *yy_cp, *yy_bp;
1330 int yy_act;
1331
1332 if ( !(yy_init) )
1333 {
1334 (yy_init) = 1;
1335
1336 #ifdef YY_USER_INIT
1337 YY_USER_INIT;
1338 #endif
1339
1340 if ( ! (yy_start) )
1341 (yy_start) = 1; /* first start state */
1342
1343 if ( ! yyin )
1344 yyin = stdin;
1345
1346 if ( ! yyout )
1347 yyout = stdout;
1348
1349 if ( ! YY_CURRENT_BUFFER ) {
1350 yyensure_buffer_stack ();
1351 YY_CURRENT_BUFFER_LVALUE =
1352 yy_create_buffer( yyin, YY_BUF_SIZE );
1353 }
1354
1355 yy_load_buffer_state( );
1356 }
1357
1358 {
1359 #line 71 "src/conf_lex.l"
1360
1361 #line 1362 "src/conf_lex.c"
1362
1363 while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
1364 {
1365 yy_cp = (yy_c_buf_p);
1366
1367 /* Support of yytext. */
1368 *yy_cp = (yy_hold_char);
1369
1370 /* yy_bp points to the position in yy_ch_buf of the start of
1371 * the current run.
1372 */
1373 yy_bp = yy_cp;
1374
1375 yy_current_state = (yy_start);
1376 yy_current_state += YY_AT_BOL();
1377 yy_match:
1378 do
1379 {
1380 YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
1381 if ( yy_accept[yy_current_state] )
1382 {
1383 (yy_last_accepting_state) = yy_current_state;
1384 (yy_last_accepting_cpos) = yy_cp;
1385 }
1386 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1387 {
1388 yy_current_state = (int) yy_def[yy_current_state];
1389 if ( yy_current_state >= 494 )
1390 yy_c = yy_meta[yy_c];
1391 }
1392 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
1393 ++yy_cp;
1394 }
1395 while ( yy_base[yy_current_state] != 859 );
1396
1397 yy_find_action:
1398 yy_act = yy_accept[yy_current_state];
1399 if ( yy_act == 0 )
1400 { /* have to back up */
1401 yy_cp = (yy_last_accepting_cpos);
1402 yy_current_state = (yy_last_accepting_state);
1403 yy_act = yy_accept[yy_current_state];
1404 }
1405
1406 YY_DO_BEFORE_ACTION;
1407
1408 do_action: /* This label is used only to access EOF actions. */
1409
1410 switch ( yy_act )
1411 { /* beginning of action switch */
1412 case 0: /* must back up */
1413 /* undo the effects of YY_DO_BEFORE_ACTION */
1414 *yy_cp = (yy_hold_char);
1415 yy_cp = (yy_last_accepting_cpos);
1416 yy_current_state = (yy_last_accepting_state);
1417 goto yy_find_action;
1418
1419 case YY_STATE_EOF(INITIAL):
1420 #line 72 "src/conf_lex.l"
1421 {
1422 log_msg(lex_log_level,"%s: - <end of file>", conf_filename);
1423 return (0);
1424 }
1425 YY_BREAK
1426 case 1:
1427 /* rule 1 can match eol */
1428 YY_RULE_SETUP
1429 #line 76 "src/conf_lex.l"
1430 {
1431 conf_linebuf = checked_strndup(conftext, confleng-1);
1432 ++conf_linenumber;
1433 LOG_CONFIG_LINE(lex_log_level, "- skip comment line")
1434 free(conf_linebuf);
1435 }
1436 YY_BREAK
1437 case 2:
1438 /* rule 2 can match eol */
1439 YY_RULE_SETUP
1440 #line 82 "src/conf_lex.l"
1441 {
1442 conf_linebuf = "";
1443 ++conf_linenumber;
1444 LOG_CONFIG_LINE(lex_log_level, "- skip empty line")
1445 }
1446 YY_BREAK
1447 case 3:
1448 YY_RULE_SETUP
1449 #line 87 "src/conf_lex.l"
1450 {
1451 conf_linebuf = checked_strndup(conftext, confleng);
1452 ++conf_linenumber;
1453 log_msg(lex_log_level,"%s:%d: \u252c '%s'", conf_filename, conf_linenumber, conf_linebuf);
1454 yyless(0);
1455 BEGIN(CONFIG);
1456 }
1457 YY_BREAK
1458 case 4:
1459 YY_RULE_SETUP
1460 #line 94 "src/conf_lex.l"
1461 { /* inline comment */
1462 LOG_LEX_TOKEN(lex_log_level, skip inline comment, conftext)
1463 }
1464 YY_BREAK
1465 case 5:
1466 YY_RULE_SETUP
1467 #line 98 "src/conf_lex.l"
1468 {
1469 LOG_LEX_TOKEN(lex_log_level, TEQURXRULE, "=")
1470 yyless(strchr(conftext,'/')-conftext);
1471 BEGIN(PATH);
1472 return (TEQURXRULE);
1473 }
1474 YY_BREAK
1475 case 6:
1476 YY_RULE_SETUP
1477 #line 105 "src/conf_lex.l"
1478 {
1479 LOG_LEX_TOKEN(lex_log_level, TSELRXRULE, "")
1480 yyless(strchr(conftext,'/')-conftext);
1481 BEGIN(PATH);
1482 return (TSELRXRULE);
1483 }
1484 YY_BREAK
1485 case 7:
1486 YY_RULE_SETUP
1487 #line 112 "src/conf_lex.l"
1488 {
1489 LOG_LEX_TOKEN(lex_log_level, TRECNEGRXRULE, "!")
1490 yyless(strchr(conftext,'/')-conftext);
1491 BEGIN(PATH);
1492 return (TRECNEGRXRULE);
1493 }
1494 YY_BREAK
1495 case 8:
1496 YY_RULE_SETUP
1497 #line 119 "src/conf_lex.l"
1498 {
1499 LOG_LEX_TOKEN(lex_log_level, TNONRECNEGRXRULE, "-")
1500 yyless(strchr(conftext,'/')-conftext);
1501 BEGIN(PATH);
1502 return (TNONRECNEGRXRULE);
1503 }
1504 YY_BREAK
1505 case 9:
1506 YY_RULE_SETUP
1507 #line 126 "src/conf_lex.l"
1508 {
1509 LOG_LEX_TOKEN(lex_log_level, '=', conftext)
1510 BEGIN(EXPR);
1511 return('=');
1512 }
1513 YY_BREAK
1514 case 10:
1515 YY_RULE_SETUP
1516 #line 132 "src/conf_lex.l"
1517 { /* no restriction */
1518 LOG_LEX_TOKEN(lex_log_level, '0', conftext)
1519 return ('0');
1520 }
1521 YY_BREAK
1522 case 11:
1523 YY_RULE_SETUP
1524 #line 137 "src/conf_lex.l"
1525 {
1526 LOG_LEX_TOKEN(lex_log_level, TEXPR, conftext)
1527 conflval.s=checked_strdup(conftext);
1528 return (TEXPR);
1529 }
1530 YY_BREAK
1531 case 12:
1532 YY_RULE_SETUP
1533 #line 143 "src/conf_lex.l"
1534 { /* attribute operator */
1535 LOG_LEX_TOKEN(lex_log_level, '+', conftext)
1536 return ('+');
1537 }
1538 YY_BREAK
1539 case 13:
1540 YY_RULE_SETUP
1541 #line 148 "src/conf_lex.l"
1542 { /* attribute operator */
1543 LOG_LEX_TOKEN(lex_log_level, '-', conftext)
1544 return ('-');
1545 }
1546 YY_BREAK
1547 case 14:
1548 YY_RULE_SETUP
1549 #line 153 "src/conf_lex.l"
1550 { /* restriction separator */
1551 LOG_LEX_TOKEN(lex_log_level, ',', conftext)
1552 return (',');
1553 }
1554 YY_BREAK
1555 case 15:
1556 YY_RULE_SETUP
1557 #line 158 "src/conf_lex.l"
1558 { /* restriction file system type separator */
1559 LOG_LEX_TOKEN(lex_log_level, '=', conftext)
1560 return ('=');
1561 }
1562 YY_BREAK
1563 case 16:
1564 YY_RULE_SETUP
1565 #line 163 "src/conf_lex.l"
1566 {
1567 LOG_LEX_TOKEN(lex_log_level, TVARIABLE, conftext)
1568 conflval.s=checked_strdup(conftext);
1569 BEGIN(STRINGHUNT);
1570 return (TVARIABLE);
1571 }
1572 YY_BREAK
1573 case 17:
1574 YY_RULE_SETUP
1575 #line 170 "src/conf_lex.l"
1576 {
1577 LOG_LEX_TOKEN(lex_log_level, TDEFINE, conftext)
1578 BEGIN DEFSTMT;
1579 return (TDEFINE);
1580 }
1581 YY_BREAK
1582 case 18:
1583 YY_RULE_SETUP
1584 #line 176 "src/conf_lex.l"
1585 {
1586 LOG_LEX_TOKEN(lex_log_level, TUNDEFINE, conftext)
1587 BEGIN DEFSTMT;
1588 return (TUNDEFINE);
1589 }
1590 YY_BREAK
1591 case 19:
1592 YY_RULE_SETUP
1593 #line 182 "src/conf_lex.l"
1594 {
1595 LOG_LEX_TOKEN(lex_log_level, TIF, conftext)
1596 BEGIN(CONDITION);
1597 return (TIF);
1598 }
1599 YY_BREAK
1600 case 20:
1601 YY_RULE_SETUP
1602 #line 188 "src/conf_lex.l"
1603 {
1604 LOG_LEX_TOKEN(lex_log_level, TBOOLNOT, conftext)
1605 return (TBOOLNOT);
1606 }
1607 YY_BREAK
1608 case 21:
1609 YY_RULE_SETUP
1610 #line 193 "src/conf_lex.l"
1611 {
1612 LOG_LEX_TOKEN(lex_log_level, TBOOLFUNC (BOOL_OP_DEFINED), conftext)
1613 conflval.operator = BOOL_OP_DEFINED;
1614 BEGIN(STRINGHUNT);
1615 return (TBOOLFUNC);
1616 }
1617 YY_BREAK
1618 case 22:
1619 YY_RULE_SETUP
1620 #line 200 "src/conf_lex.l"
1621 {
1622 LOG_LEX_TOKEN(lex_log_level, TBOOLFUNC (BOOL_OP_HOSTNAME), conftext)
1623 conflval.operator = BOOL_OP_HOSTNAME;
1624 BEGIN(STRINGHUNT);
1625 return (TBOOLFUNC);
1626 }
1627 YY_BREAK
1628 case 23:
1629 YY_RULE_SETUP
1630 #line 207 "src/conf_lex.l"
1631 {
1632 LOG_LEX_TOKEN(lex_log_level, TBOOLFUNC (BOOL_OP_EXISTS), conftext)
1633 conflval.operator = BOOL_OP_EXISTS;
1634 BEGIN(STRINGHUNT);
1635 return (TBOOLFUNC);
1636 }
1637 YY_BREAK
1638 case 24:
1639 YY_RULE_SETUP
1640 #line 214 "src/conf_lex.l"
1641 {
1642 LOG_LEX_TOKEN(lex_log_level, TBOOLOP (BOOL_OP_VERSION_GE), conftext)
1643 conflval.operator = BOOL_OP_VERSION_GE;
1644 BEGIN(STRINGHUNT);
1645 return (TBOOLOP);
1646 }
1647 YY_BREAK
1648 case 25:
1649 YY_RULE_SETUP
1650 #line 221 "src/conf_lex.l"
1651 {
1652 LOG_LEX_TOKEN(LOG_LEVEL_DEBUG, found string -> unput, conftext)
1653 yyless(0);
1654 BEGIN(CONDSTRING);
1655 }
1656 YY_BREAK
1657 case 26:
1658 YY_RULE_SETUP
1659 #line 227 "src/conf_lex.l"
1660 {
1661 DEPRECATION_WARNING("@@ifdef", "@@if defined")
1662 LOG_LEX_TOKEN(lex_log_level, TIFDEF, conftext)
1663 BEGIN(STRINGHUNT);
1664 return (TIFDEF);
1665 }
1666 YY_BREAK
1667 case 27:
1668 YY_RULE_SETUP
1669 #line 234 "src/conf_lex.l"
1670 {
1671 DEPRECATION_WARNING("@@ifndef", "@@if not defined")
1672 LOG_LEX_TOKEN(lex_log_level, TIFNDEF, conftext)
1673 BEGIN(STRINGHUNT);
1674 return (TIFNDEF);
1675 }
1676 YY_BREAK
1677 case 28:
1678 YY_RULE_SETUP
1679 #line 241 "src/conf_lex.l"
1680 {
1681 LOG_LEX_TOKEN(lex_log_level, TELSE, conftext)
1682 BEGIN CONFIG;
1683 return (TELSE);
1684 }
1685 YY_BREAK
1686 case 29:
1687 YY_RULE_SETUP
1688 #line 247 "src/conf_lex.l"
1689 {
1690 LOG_LEX_TOKEN(lex_log_level, TENDIF, conftext)
1691 BEGIN CONFIG;
1692 return (TENDIF);
1693 }
1694 YY_BREAK
1695 case 30:
1696 YY_RULE_SETUP
1697 #line 253 "src/conf_lex.l"
1698 {
1699 DEPRECATION_WARNING("@@ifhost", "@@if hostname")
1700 LOG_LEX_TOKEN(lex_log_level, TIFHOST, conftext)
1701 BEGIN(STRINGHUNT);
1702 return (TIFHOST);
1703 }
1704 YY_BREAK
1705 case 31:
1706 YY_RULE_SETUP
1707 #line 260 "src/conf_lex.l"
1708 {
1709 DEPRECATION_WARNING("@@ifnhost", "@@if not hostname")
1710 LOG_LEX_TOKEN(lex_log_level, TIFNHOST, conftext)
1711 BEGIN(STRINGHUNT);
1712 return (TIFNHOST);
1713 }
1714 YY_BREAK
1715 case 32:
1716 YY_RULE_SETUP
1717 #line 267 "src/conf_lex.l"
1718 {
1719 LOG_LEX_TOKEN(lex_log_level, TINCLUDE, conftext)
1720 BEGIN(STRINGS);
1721 return (TINCLUDE);
1722 }
1723 YY_BREAK
1724 case 33:
1725 YY_RULE_SETUP
1726 #line 273 "src/conf_lex.l"
1727 {
1728 LOG_LEX_TOKEN(lex_log_level, TXINCLUDE, conftext)
1729 BEGIN(STRINGS);
1730 return (TXINCLUDE);
1731 }
1732 YY_BREAK
1733 case 34:
1734 YY_RULE_SETUP
1735 #line 279 "src/conf_lex.l"
1736 {
1737 LOG_LEX_TOKEN(lex_log_level, TSETENV, conftext)
1738 BEGIN ENVVAR;
1739 return (TSETENV);
1740 }
1741 YY_BREAK
1742 case 35:
1743 YY_RULE_SETUP
1744 #line 285 "src/conf_lex.l"
1745 {
1746 LOG_LEX_TOKEN(lex_log_level, TVARIABLE, conftext)
1747 conflval.s=checked_strdup(conftext);
1748 BEGIN(STRINGHUNT);
1749 return (TVARIABLE);
1750 }
1751 YY_BREAK
1752 case 36:
1753 YY_RULE_SETUP
1754 #line 292 "src/conf_lex.l"
1755 {
1756 LOG_LEX_TOKEN(LOG_LEVEL_DEBUG, skip tab(s)/whitespace(s), conftext)
1757 }
1758 YY_BREAK
1759 case 37:
1760 YY_RULE_SETUP
1761 #line 296 "src/conf_lex.l"
1762 {
1763 LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (DATABASE_IN_OPTION), conftext)
1764 conflval.option = DATABASE_IN_OPTION;
1765 BEGIN (STRINGEQHUNT);
1766 return (CONFIGOPTION);
1767 }
1768 YY_BREAK
1769 case 38:
1770 YY_RULE_SETUP
1771 #line 303 "src/conf_lex.l"
1772 {
1773 LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (DATABASE_OUT_OPTION), conftext)
1774 conflval.option = DATABASE_OUT_OPTION;
1775 BEGIN (STRINGEQHUNT);
1776 return (CONFIGOPTION);
1777 }
1778 YY_BREAK
1779 case 39:
1780 YY_RULE_SETUP
1781 #line 310 "src/conf_lex.l"
1782 {
1783 LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (DATABASE_NEW_OPTION), conftext)
1784 conflval.option = DATABASE_NEW_OPTION;
1785 BEGIN (STRINGEQHUNT);
1786 return (CONFIGOPTION);
1787 }
1788 YY_BREAK
1789 case 40:
1790 YY_RULE_SETUP
1791 #line 317 "src/conf_lex.l"
1792 {
1793 LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (DATABASE_ATTRIBUTES_OPTION), conftext)
1794 conflval.option = DATABASE_ATTRIBUTES_OPTION;
1795 BEGIN (EXPREQUHUNT);
1796 return (CONFIGOPTION);
1797 }
1798 YY_BREAK
1799 case 41:
1800 YY_RULE_SETUP
1801 #line 324 "src/conf_lex.l"
1802 {
1803 LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (WARN_DEAD_SYMLINKS_OPTION), conftext)
1804 conflval.option = WARN_DEAD_SYMLINKS_OPTION;
1805 BEGIN (STRINGEQHUNT);
1806 return (CONFIGOPTION);
1807 }
1808 YY_BREAK
1809 case 42:
1810 YY_RULE_SETUP
1811 #line 331 "src/conf_lex.l"
1812 {
1813 LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_GROUPED_OPTION), conftext)
1814 conflval.option = REPORT_GROUPED_OPTION;
1815 BEGIN (STRINGEQHUNT);
1816 return (CONFIGOPTION);
1817 }
1818 YY_BREAK
1819 case 43:
1820 YY_RULE_SETUP
1821 #line 338 "src/conf_lex.l"
1822 {
1823 LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_SUMMARIZE_CHANGES_OPTION), conftext)
1824 conflval.option = REPORT_SUMMARIZE_CHANGES_OPTION;
1825 BEGIN (STRINGEQHUNT);
1826 return (CONFIGOPTION);
1827 }
1828 YY_BREAK
1829 case 44:
1830 YY_RULE_SETUP
1831 #line 344 "src/conf_lex.l"
1832 {
1833 LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (ACL_NO_SYMLINK_FOLLOW_OPTION), conftext)
1834 conflval.option = ACL_NO_SYMLINK_FOLLOW_OPTION;
1835 BEGIN (STRINGEQHUNT);
1836 return (CONFIGOPTION);
1837 }
1838 YY_BREAK
1839 case 45:
1840 YY_RULE_SETUP
1841 #line 351 "src/conf_lex.l"
1842 {
1843 LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_FORMAT_OPTION), conftext)
1844 conflval.option = REPORT_FORMAT_OPTION;
1845 BEGIN (STRINGEQHUNT);
1846 return (CONFIGOPTION);
1847 }
1848 YY_BREAK
1849 case 46:
1850 YY_RULE_SETUP
1851 #line 358 "src/conf_lex.l"
1852 {
1853 LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_LEVEL_OPTION), conftext)
1854 conflval.option = REPORT_LEVEL_OPTION;
1855 BEGIN (STRINGEQHUNT);
1856 return (CONFIGOPTION);
1857 }
1858 YY_BREAK
1859 case 47:
1860 YY_RULE_SETUP
1861 #line 365 "src/conf_lex.l"
1862 {
1863 LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_IGNORE_ADDED_ATTRS_OPTION), conftext)
1864 conflval.option = REPORT_IGNORE_ADDED_ATTRS_OPTION;
1865 BEGIN (EXPREQUHUNT);
1866 return (CONFIGOPTION);
1867 }
1868 YY_BREAK
1869 case 48:
1870 YY_RULE_SETUP
1871 #line 372 "src/conf_lex.l"
1872 {
1873 LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_IGNORE_REMOVED_ATTRS_OPTION), conftext)
1874 conflval.option = REPORT_IGNORE_REMOVED_ATTRS_OPTION;
1875 BEGIN (EXPREQUHUNT);
1876 return (CONFIGOPTION);
1877 }
1878 YY_BREAK
1879 case 49:
1880 YY_RULE_SETUP
1881 #line 379 "src/conf_lex.l"
1882 {
1883 LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_IGNORE_CHANGED_ATTRS_OPTION), conftext)
1884 conflval.option = REPORT_IGNORE_CHANGED_ATTRS_OPTION;
1885 BEGIN (EXPREQUHUNT);
1886 return (CONFIGOPTION);
1887 }
1888 YY_BREAK
1889 case 50:
1890 YY_RULE_SETUP
1891 #line 386 "src/conf_lex.l"
1892 {
1893 LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_FORCE_ATTRS_OPTION), conftext)
1894 conflval.option = REPORT_FORCE_ATTRS_OPTION;
1895 BEGIN (EXPREQUHUNT);
1896 return (CONFIGOPTION);
1897 }
1898 YY_BREAK
1899 case 51:
1900 YY_RULE_SETUP
1901 #line 393 "src/conf_lex.l"
1902 {
1903 LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (LOG_LEVEL_OPTION), conftext)
1904 conflval.option = LOG_LEVEL_OPTION;
1905 BEGIN(STRINGEQHUNT);
1906 return (CONFIGOPTION);
1907 }
1908 YY_BREAK
1909 case 52:
1910 YY_RULE_SETUP
1911 #line 400 "src/conf_lex.l"
1912 {
1913 LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (DATABASE_ADD_METADATA_OPTION), conftext)
1914 conflval.option = DATABASE_ADD_METADATA_OPTION;
1915 BEGIN (STRINGEQHUNT);
1916 return (CONFIGOPTION);
1917 }
1918 YY_BREAK
1919 case 53:
1920 YY_RULE_SETUP
1921 #line 407 "src/conf_lex.l"
1922 {
1923 LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_URL_OPTION), conftext)
1924 conflval.option = REPORT_URL_OPTION;
1925 BEGIN (STRINGEQHUNT);
1926 return (CONFIGOPTION);
1927 }
1928 YY_BREAK
1929 case 54:
1930 YY_RULE_SETUP
1931 #line 414 "src/conf_lex.l"
1932 {
1933 LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_DETAILED_INIT_OPTION), conftext)
1934 conflval.option = REPORT_DETAILED_INIT_OPTION;
1935 BEGIN (STRINGEQHUNT);
1936 return (CONFIGOPTION);
1937 }
1938 YY_BREAK
1939 case 55:
1940 YY_RULE_SETUP
1941 #line 421 "src/conf_lex.l"
1942 {
1943 LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_BASE16_OPTION), conftext)
1944 conflval.option = REPORT_BASE16_OPTION;
1945 BEGIN (STRINGEQHUNT);
1946 return (CONFIGOPTION);
1947 }
1948 YY_BREAK
1949 case 56:
1950 YY_RULE_SETUP
1951 #line 428 "src/conf_lex.l"
1952 {
1953 LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_QUIET_OPTION), conftext)
1954 conflval.option = REPORT_QUIET_OPTION;
1955 BEGIN (STRINGEQHUNT);
1956 return (CONFIGOPTION);
1957 }
1958 YY_BREAK
1959 case 57:
1960 YY_RULE_SETUP
1961 #line 435 "src/conf_lex.l"
1962 {
1963 LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_APPEND_OPTION), conftext)
1964 conflval.option = REPORT_APPEND_OPTION;
1965 BEGIN (STRINGEQHUNT);
1966 return (CONFIGOPTION);
1967 }
1968 YY_BREAK
1969 case 58:
1970 YY_RULE_SETUP
1971 #line 442 "src/conf_lex.l"
1972 {
1973 LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (REPORT_IGNORE_E2FSATTRS_OPTION), conftext)
1974 conflval.option = REPORT_IGNORE_E2FSATTRS_OPTION;
1975 BEGIN (STRINGEQHUNT);
1976 return (CONFIGOPTION);
1977 }
1978 YY_BREAK
1979 case 59:
1980 YY_RULE_SETUP
1981 #line 449 "src/conf_lex.l"
1982 {
1983 LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (DATABASE_GZIP_OPTION), conftext)
1984 conflval.option = DATABASE_GZIP_OPTION;
1985 BEGIN (STRINGEQHUNT);
1986 return (CONFIGOPTION);
1987 }
1988 YY_BREAK
1989 case 60:
1990 YY_RULE_SETUP
1991 #line 456 "src/conf_lex.l"
1992 {
1993 LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (ROOT_PREFIX_OPTION), conftext)
1994 conflval.option = ROOT_PREFIX_OPTION;
1995 BEGIN (STRINGEQHUNT);
1996 return (CONFIGOPTION);
1997 }
1998 YY_BREAK
1999 case 61:
2000 YY_RULE_SETUP
2001 #line 463 "src/conf_lex.l"
2002 {
2003 LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (CONFIG_VERSION), conftext)
2004 conflval.option = CONFIG_VERSION;
2005 BEGIN (STRINGEQHUNT);
2006 return (CONFIGOPTION);
2007 }
2008 YY_BREAK
2009 case 62:
2010 YY_RULE_SETUP
2011 #line 470 "src/conf_lex.l"
2012 {
2013 LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (CONFIG_CHECK_WARN_UNRESTRICTED_RULES), conftext)
2014 conflval.option = CONFIG_CHECK_WARN_UNRESTRICTED_RULES;
2015 BEGIN (STRINGEQHUNT);
2016 return (CONFIGOPTION);
2017 }
2018 YY_BREAK
2019 case 63:
2020 YY_RULE_SETUP
2021 #line 477 "src/conf_lex.l"
2022 {
2023 LOG_LEX_TOKEN(lex_log_level, CONFIGOPTION (NUM_WORKERS), conftext)
2024 conflval.option = NUM_WORKERS;
2025 BEGIN (STRINGEQHUNT);
2026 return (CONFIGOPTION);
2027 }
2028 YY_BREAK
2029 case 64:
2030 YY_RULE_SETUP
2031 #line 484 "src/conf_lex.l"
2032 {
2033 log_msg(LOG_LEVEL_ERROR,"%s:%d: unknown config option: '%s' (line: '%s')", conf_filename, conf_linenumber, conftext, conf_linebuf);
2034 exit(INVALID_CONFIGURELINE_ERROR);
2035 }
2036 YY_BREAK
2037 case 65:
2038 YY_RULE_SETUP
2039 #line 489 "src/conf_lex.l"
2040 { /* group definition */
2041 conflval.s=checked_strdup(conftext);
2042 LOG_LEX_TOKEN(lex_log_level, TGROUP, conftext)
2043 BEGIN(EXPREQUHUNT);
2044 return (TGROUP);
2045 }
2046 YY_BREAK
2047 case 66:
2048 YY_RULE_SETUP
2049 #line 496 "src/conf_lex.l"
2050 { /* group definition, deprecated group names */
2051 log_msg(LOG_LEVEL_WARNING, "%s:%d: special characters in group names are DEPRECATED. Update your config and only use alphanumeric characters (A-Za-z0-9) (line: '%s')", conf_filename, conf_linenumber, conf_linebuf); \
2052 conflval.s=checked_strdup(conftext);
2053 LOG_LEX_TOKEN(lex_log_level, TGROUP, conftext)
2054 BEGIN(EXPREQUHUNT);
2055 return (TGROUP);
2056 }
2057 YY_BREAK
2058 case 67:
2059 YY_RULE_SETUP
2060 #line 504 "src/conf_lex.l"
2061 {
2062 LOG_LEX_TOKEN(lex_log_level, '=', conftext)
2063 BEGIN(STRING);
2064 return('=');
2065 }
2066 YY_BREAK
2067 case 68:
2068 YY_RULE_SETUP
2069 #line 510 "src/conf_lex.l"
2070 {
2071 size_t length = strlen(conftext)-4;
2072 conflval.s=checked_malloc(length+1);
2073 strncpy(conflval.s, conftext+3, length);
2074 conflval.s[length] = '\0';
2075 LOG_LEX_TOKEN(lex_log_level, TVARIABLE, conflval.s)
2076 return (TVARIABLE);
2077 }
2078 YY_BREAK
2079 case 69:
2080 YY_RULE_SETUP
2081 #line 519 "src/conf_lex.l"
2082 {
2083 LOG_LEX_TOKEN(lex_log_level, TSTRING, conftext)
2084 conflval.s=checked_strdup(conftext);
2085 return (TSTRING);
2086 }
2087 YY_BREAK
2088 case 70:
2089 YY_RULE_SETUP
2090 #line 525 "src/conf_lex.l"
2091 {
2092 LOG_LEX_TOKEN(lex_log_level, (escaped) TSTRING, conftext)
2093 conflval.s=checked_strdup(conftext+1);
2094 return (TSTRING);
2095 }
2096 YY_BREAK
2097 case 71:
2098 YY_RULE_SETUP
2099 #line 531 "src/conf_lex.l"
2100 {
2101 LOG_LEX_TOKEN(lex_log_level, (single-character) TSTRING, conftext)
2102 conflval.s=checked_strdup(conftext);
2103 return (TSTRING);
2104 }
2105 YY_BREAK
2106 case 72:
2107 YY_RULE_SETUP
2108 #line 537 "src/conf_lex.l"
2109 {
2110 LOG_LEX_TOKEN(lex_log_level, TSPACE, conftext)
2111 return (TSPACE);
2112 }
2113 YY_BREAK
2114 case 73:
2115 YY_RULE_SETUP
2116 #line 542 "src/conf_lex.l"
2117 {
2118 LOG_LEX_TOKEN(LOG_LEVEL_DEBUG, skip tab(s)/whitespace(s), conftext)
2119 BEGIN(CONFIG);
2120 }
2121 YY_BREAK
2122 case 74:
2123 YY_RULE_SETUP
2124 #line 547 "src/conf_lex.l"
2125 {
2126 LOG_LEX_TOKEN(LOG_LEVEL_DEBUG, skip tab(s)/whitespace(s), conftext)
2127 BEGIN(CONDITION);
2128 }
2129 YY_BREAK
2130 case 75:
2131 YY_RULE_SETUP
2132 #line 552 "src/conf_lex.l"
2133 {
2134 LOG_LEX_TOKEN(LOG_LEVEL_DEBUG, skip tab(s)/whitespace(s), conftext)
2135 BEGIN(EXPR);
2136 }
2137 YY_BREAK
2138 case 76:
2139 YY_RULE_SETUP
2140 #line 557 "src/conf_lex.l"
2141 {
2142 LOG_LEX_TOKEN(LOG_LEVEL_DEBUG, skip tab(s)/whitespace(s), conftext)
2143 BEGIN(STRING);
2144 }
2145 YY_BREAK
2146 case 77:
2147 YY_RULE_SETUP
2148 #line 562 "src/conf_lex.l"
2149 {
2150 LOG_LEX_TOKEN(LOG_LEVEL_DEBUG, found string -> unput, conftext)
2151 yyless(0);
2152 BEGIN(STRING);
2153 }
2154 YY_BREAK
2155 case 78:
2156 /* rule 78 can match eol */
2157 YY_RULE_SETUP
2158 #line 568 "src/conf_lex.l"
2159 {
2160 log_msg(lex_log_level,"%s:%d: \u2534 TNEWLINE (text: '%s')", conf_filename, conf_linenumber, strlen(conftext) == 2?"\\r\\n":"\\n");
2161 BEGIN 0;
2162 return (TNEWLINE);
2163 }
2164 YY_BREAK
2165 case YY_STATE_EOF(CONFIG):
2166 case YY_STATE_EOF(DEFSTMT):
2167 case YY_STATE_EOF(ENVVAR):
2168 case YY_STATE_EOF(EXPR):
2169 case YY_STATE_EOF(EXPREQUHUNT):
2170 case YY_STATE_EOF(PATH):
2171 case YY_STATE_EOF(STRING):
2172 case YY_STATE_EOF(STRINGS):
2173 case YY_STATE_EOF(STRINGEQHUNT):
2174 case YY_STATE_EOF(STRINGHUNT):
2175 case YY_STATE_EOF(CONDITION):
2176 case YY_STATE_EOF(CONDSTRING):
2177 #line 574 "src/conf_lex.l"
2178 {
2179 log_msg(lex_log_level,"%s:%d: \u2534 <end of file>", conf_filename, conf_linenumber);
2180 log_msg(LOG_LEVEL_NOTICE,"%s:%d: missing new line at end of file (line: '%s')", conf_filename, conf_linenumber, conf_linebuf);
2181 return (0);
2182 }
2183 YY_BREAK
2184 case 79:
2185 YY_RULE_SETUP
2186 #line 580 "src/conf_lex.l"
2187 {
2188 char *unexpected_character = conftext;
2189 switch (*conftext) {
2190 case '\r': unexpected_character = "\\r"; break;
2191 };
2192 log_msg(LOG_LEVEL_ERROR,"%s:%d: unexpected character: '%s' (line: '%s')", conf_filename, conf_linenumber, unexpected_character, conf_linebuf);
2193 exit(INVALID_CONFIGURELINE_ERROR);
2194 }
2195 YY_BREAK
2196 case 80:
2197 YY_RULE_SETUP
2198 #line 589 "src/conf_lex.l"
2199 ECHO;
2200 YY_BREAK
2201 #line 2202 "src/conf_lex.c"
2202
2203 case YY_END_OF_BUFFER:
2204 {
2205 /* Amount of text matched not including the EOB char. */
2206 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2207
2208 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2209 *yy_cp = (yy_hold_char);
2210 YY_RESTORE_YY_MORE_OFFSET
2211
2212 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2213 {
2214 /* We're scanning a new file or input source. It's
2215 * possible that this happened because the user
2216 * just pointed yyin at a new source and called
2217 * yylex(). If so, then we have to assure
2218 * consistency between YY_CURRENT_BUFFER and our
2219 * globals. Here is the right place to do so, because
2220 * this is the first action (other than possibly a
2221 * back-up) that will match for the new input source.
2222 */
2223 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2224 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
2225 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2226 }
2227
2228 /* Note that here we test for yy_c_buf_p "<=" to the position
2229 * of the first EOB in the buffer, since yy_c_buf_p will
2230 * already have been incremented past the NUL character
2231 * (since all states make transitions on EOB to the
2232 * end-of-buffer state). Contrast this with the test
2233 * in input().
2234 */
2235 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2236 { /* This was really a NUL. */
2237 yy_state_type yy_next_state;
2238
2239 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2240
2241 yy_current_state = yy_get_previous_state( );
2242
2243 /* Okay, we're now positioned to make the NUL
2244 * transition. We couldn't have
2245 * yy_get_previous_state() go ahead and do it
2246 * for us because it doesn't know how to deal
2247 * with the possibility of jamming (and we don't
2248 * want to build jamming into it because then it
2249 * will run more slowly).
2250 */
2251
2252 yy_next_state = yy_try_NUL_trans( yy_current_state );
2253
2254 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2255
2256 if ( yy_next_state )
2257 {
2258 /* Consume the NUL. */
2259 yy_cp = ++(yy_c_buf_p);
2260 yy_current_state = yy_next_state;
2261 goto yy_match;
2262 }
2263
2264 else
2265 {
2266 yy_cp = (yy_c_buf_p);
2267 goto yy_find_action;
2268 }
2269 }
2270
2271 else switch ( yy_get_next_buffer( ) )
2272 {
2273 case EOB_ACT_END_OF_FILE:
2274 {
2275 (yy_did_buffer_switch_on_eof) = 0;
2276
2277 if ( yywrap( ) )
2278 {
2279 /* Note: because we've taken care in
2280 * yy_get_next_buffer() to have set up
2281 * yytext, we can now set up
2282 * yy_c_buf_p so that if some total
2283 * hoser (like flex itself) wants to
2284 * call the scanner after we return the
2285 * YY_NULL, it'll still work - another
2286 * YY_NULL will get returned.
2287 */
2288 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
2289
2290 yy_act = YY_STATE_EOF(YY_START);
2291 goto do_action;
2292 }
2293
2294 else
2295 {
2296 if ( ! (yy_did_buffer_switch_on_eof) )
2297 YY_NEW_FILE;
2298 }
2299 break;
2300 }
2301
2302 case EOB_ACT_CONTINUE_SCAN:
2303 (yy_c_buf_p) =
2304 (yytext_ptr) + yy_amount_of_matched_text;
2305
2306 yy_current_state = yy_get_previous_state( );
2307
2308 yy_cp = (yy_c_buf_p);
2309 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2310 goto yy_match;
2311
2312 case EOB_ACT_LAST_MATCH:
2313 (yy_c_buf_p) =
2314 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2315
2316 yy_current_state = yy_get_previous_state( );
2317
2318 yy_cp = (yy_c_buf_p);
2319 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2320 goto yy_find_action;
2321 }
2322 break;
2323 }
2324
2325 default:
2326 YY_FATAL_ERROR(
2327 "fatal flex scanner internal error--no action found" );
2328 } /* end of action switch */
2329 } /* end of scanning one token */
2330 } /* end of user's declarations */
2331 } /* end of yylex */
2332
2333 /* yy_get_next_buffer - try to read in a new buffer
2334 *
2335 * Returns a code representing an action:
2336 * EOB_ACT_LAST_MATCH -
2337 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2338 * EOB_ACT_END_OF_FILE - end of file
2339 */
2340 static int yy_get_next_buffer (void)
2341 {
2342 char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2343 char *source = (yytext_ptr);
2344 int number_to_move, i;
2345 int ret_val;
2346
2347 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2348 YY_FATAL_ERROR(
2349 "fatal flex scanner internal error--end of buffer missed" );
2350
2351 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2352 { /* Don't try to fill the buffer, so this is an EOF. */
2353 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2354 {
2355 /* We matched a single character, the EOB, so
2356 * treat this as a final EOF.
2357 */
2358 return EOB_ACT_END_OF_FILE;
2359 }
2360
2361 else
2362 {
2363 /* We matched some text prior to the EOB, first
2364 * process it.
2365 */
2366 return EOB_ACT_LAST_MATCH;
2367 }
2368 }
2369
2370 /* Try to read more data. */
2371
2372 /* First move last chars to start of buffer. */
2373 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
2374
2375 for ( i = 0; i < number_to_move; ++i )
2376 *(dest++) = *(source++);
2377
2378 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2379 /* don't do the read, it's not guaranteed to return an EOF,
2380 * just force an EOF
2381 */
2382 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2383
2384 else
2385 {
2386 int num_to_read =
2387 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2388
2389 while ( num_to_read <= 0 )
2390 { /* Not enough room in the buffer - grow it. */
2391
2392 /* just a shorter name for the current buffer */
2393 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
2394
2395 int yy_c_buf_p_offset =
2396 (int) ((yy_c_buf_p) - b->yy_ch_buf);
2397
2398 if ( b->yy_is_our_buffer )
2399 {
2400 int new_size = b->yy_buf_size * 2;
2401
2402 if ( new_size <= 0 )
2403 b->yy_buf_size += b->yy_buf_size / 8;
2404 else
2405 b->yy_buf_size *= 2;
2406
2407 b->yy_ch_buf = (char *)
2408 /* Include room in for 2 EOB chars. */
2409 yyrealloc( (void *) b->yy_ch_buf,
2410 (yy_size_t) (b->yy_buf_size + 2) );
2411 }
2412 else
2413 /* Can't grow it, we don't own it. */
2414 b->yy_ch_buf = NULL;
2415
2416 if ( ! b->yy_ch_buf )
2417 YY_FATAL_ERROR(
2418 "fatal error - scanner input buffer overflow" );
2419
2420 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2421
2422 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2423 number_to_move - 1;
2424
2425 }
2426
2427 if ( num_to_read > YY_READ_BUF_SIZE )
2428 num_to_read = YY_READ_BUF_SIZE;
2429
2430 /* Read in more data. */
2431 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2432 (yy_n_chars), num_to_read );
2433
2434 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2435 }
2436
2437 if ( (yy_n_chars) == 0 )
2438 {
2439 if ( number_to_move == YY_MORE_ADJ )
2440 {
2441 ret_val = EOB_ACT_END_OF_FILE;
2442 yyrestart( yyin );
2443 }
2444
2445 else
2446 {
2447 ret_val = EOB_ACT_LAST_MATCH;
2448 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2449 YY_BUFFER_EOF_PENDING;
2450 }
2451 }
2452
2453 else
2454 ret_val = EOB_ACT_CONTINUE_SCAN;
2455
2456 if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2457 /* Extend the array by 50%, plus the number we really need. */
2458 int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2459 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
2460 (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
2461 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2462 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2463 /* "- 2" to take care of EOB's */
2464 YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
2465 }
2466
2467 (yy_n_chars) += number_to_move;
2468 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2469 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2470
2471 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2472
2473 return ret_val;
2474 }
2475
2476 /* yy_get_previous_state - get the state just before the EOB char was reached */
2477
2478 static yy_state_type yy_get_previous_state (void)
2479 {
2480 yy_state_type yy_current_state;
2481 char *yy_cp;
2482
2483 yy_current_state = (yy_start);
2484 yy_current_state += YY_AT_BOL();
2485
2486 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2487 {
2488 YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2489 if ( yy_accept[yy_current_state] )
2490 {
2491 (yy_last_accepting_state) = yy_current_state;
2492 (yy_last_accepting_cpos) = yy_cp;
2493 }
2494 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2495 {
2496 yy_current_state = (int) yy_def[yy_current_state];
2497 if ( yy_current_state >= 494 )
2498 yy_c = yy_meta[yy_c];
2499 }
2500 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2501 }
2502
2503 return yy_current_state;
2504 }
2505
2506 /* yy_try_NUL_trans - try to make a transition on the NUL character
2507 *
2508 * synopsis
2509 * next_state = yy_try_NUL_trans( current_state );
2510 */
2511 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
2512 {
2513 int yy_is_jam;
2514 char *yy_cp = (yy_c_buf_p);
2515
2516 YY_CHAR yy_c = 1;
2517 if ( yy_accept[yy_current_state] )
2518 {
2519 (yy_last_accepting_state) = yy_current_state;
2520 (yy_last_accepting_cpos) = yy_cp;
2521 }
2522 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2523 {
2524 yy_current_state = (int) yy_def[yy_current_state];
2525 if ( yy_current_state >= 494 )
2526 yy_c = yy_meta[yy_c];
2527 }
2528 yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
2529 yy_is_jam = (yy_current_state == 493);
2530
2531 return yy_is_jam ? 0 : yy_current_state;
2532 }
2533
2534 #ifndef YY_NO_UNPUT
2535
2536 #endif
2537
2538 #ifndef YY_NO_INPUT
2539 #ifdef __cplusplus
2540 static int yyinput (void)
2541 #else
2542 static int input (void)
2543 #endif
2544
2545 {
2546 int c;
2547
2548 *(yy_c_buf_p) = (yy_hold_char);
2549
2550 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2551 {
2552 /* yy_c_buf_p now points to the character we want to return.
2553 * If this occurs *before* the EOB characters, then it's a
2554 * valid NUL; if not, then we've hit the end of the buffer.
2555 */
2556 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2557 /* This was really a NUL. */
2558 *(yy_c_buf_p) = '\0';
2559
2560 else
2561 { /* need more input */
2562 int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
2563 ++(yy_c_buf_p);
2564
2565 switch ( yy_get_next_buffer( ) )
2566 {
2567 case EOB_ACT_LAST_MATCH:
2568 /* This happens because yy_g_n_b()
2569 * sees that we've accumulated a
2570 * token and flags that we need to
2571 * try matching the token before
2572 * proceeding. But for input(),
2573 * there's no matching to consider.
2574 * So convert the EOB_ACT_LAST_MATCH
2575 * to EOB_ACT_END_OF_FILE.
2576 */
2577
2578 /* Reset buffer status. */
2579 yyrestart( yyin );
2580
2581 /*FALLTHROUGH*/
2582
2583 case EOB_ACT_END_OF_FILE:
2584 {
2585 if ( yywrap( ) )
2586 return 0;
2587
2588 if ( ! (yy_did_buffer_switch_on_eof) )
2589 YY_NEW_FILE;
2590 #ifdef __cplusplus
2591 return yyinput();
2592 #else
2593 return input();
2594 #endif
2595 }
2596
2597 case EOB_ACT_CONTINUE_SCAN:
2598 (yy_c_buf_p) = (yytext_ptr) + offset;
2599 break;
2600 }
2601 }
2602 }
2603
2604 c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
2605 *(yy_c_buf_p) = '\0'; /* preserve yytext */
2606 (yy_hold_char) = *++(yy_c_buf_p);
2607
2608 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
2609
2610 return c;
2611 }
2612 #endif /* ifndef YY_NO_INPUT */
2613
2614 /** Immediately switch to a different input stream.
2615 * @param input_file A readable stream.
2616 *
2617 * @note This function does not reset the start condition to @c INITIAL .
2618 */
2619 void yyrestart (FILE * input_file )
2620 {
2621
2622 if ( ! YY_CURRENT_BUFFER ){
2623 yyensure_buffer_stack ();
2624 YY_CURRENT_BUFFER_LVALUE =
2625 yy_create_buffer( yyin, YY_BUF_SIZE );
2626 }
2627
2628 yy_init_buffer( YY_CURRENT_BUFFER, input_file );
2629 yy_load_buffer_state( );
2630 }
2631
2632 /** Switch to a different input buffer.
2633 * @param new_buffer The new input buffer.
2634 *
2635 */
2636 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
2637 {
2638
2639 /* TODO. We should be able to replace this entire function body
2640 * with
2641 * yypop_buffer_state();
2642 * yypush_buffer_state(new_buffer);
2643 */
2644 yyensure_buffer_stack ();
2645 if ( YY_CURRENT_BUFFER == new_buffer )
2646 return;
2647
2648 if ( YY_CURRENT_BUFFER )
2649 {
2650 /* Flush out information for old buffer. */
2651 *(yy_c_buf_p) = (yy_hold_char);
2652 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2653 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2654 }
2655
2656 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2657 yy_load_buffer_state( );
2658
2659 /* We don't actually know whether we did this switch during
2660 * EOF (yywrap()) processing, but the only time this flag
2661 * is looked at is after yywrap() is called, so it's safe
2662 * to go ahead and always set it.
2663 */
2664 (yy_did_buffer_switch_on_eof) = 1;
2665 }
2666
2667 static void yy_load_buffer_state (void)
2668 {
2669 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2670 (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2671 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2672 (yy_hold_char) = *(yy_c_buf_p);
2673 }
2674
2675 /** Allocate and initialize an input buffer state.
2676 * @param file A readable stream.
2677 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2678 *
2679 * @return the allocated buffer state.
2680 */
2681 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
2682 {
2683 YY_BUFFER_STATE b;
2684
2685 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
2686 if ( ! b )
2687 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2688
2689 b->yy_buf_size = size;
2690
2691 /* yy_ch_buf has to be 2 characters longer than the size given because
2692 * we need to put in 2 end-of-buffer characters.
2693 */
2694 b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
2695 if ( ! b->yy_ch_buf )
2696 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2697
2698 b->yy_is_our_buffer = 1;
2699
2700 yy_init_buffer( b, file );
2701
2702 return b;
2703 }
2704
2705 /** Destroy the buffer.
2706 * @param b a buffer created with yy_create_buffer()
2707 *
2708 */
2709 void yy_delete_buffer (YY_BUFFER_STATE b )
2710 {
2711
2712 if ( ! b )
2713 return;
2714
2715 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2716 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2717
2718 if ( b->yy_is_our_buffer )
2719 yyfree( (void *) b->yy_ch_buf );
2720
2721 yyfree( (void *) b );
2722 }
2723
2724 /* Initializes or reinitializes a buffer.
2725 * This function is sometimes called more than once on the same buffer,
2726 * such as during a yyrestart() or at EOF.
2727 */
2728 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
2729
2730 {
2731 int oerrno = errno;
2732
2733 yy_flush_buffer( b );
2734
2735 b->yy_input_file = file;
2736 b->yy_fill_buffer = 1;
2737
2738 /* If b is the current buffer, then yy_init_buffer was _probably_
2739 * called from yyrestart() or through yy_get_next_buffer.
2740 * In that case, we don't want to reset the lineno or column.
2741 */
2742 if (b != YY_CURRENT_BUFFER){
2743 b->yy_bs_lineno = 1;
2744 b->yy_bs_column = 0;
2745 }
2746
2747 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2748
2749 errno = oerrno;
2750 }
2751
2752 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2753 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2754 *
2755 */
2756 void yy_flush_buffer (YY_BUFFER_STATE b )
2757 {
2758 if ( ! b )
2759 return;
2760
2761 b->yy_n_chars = 0;
2762
2763 /* We always need two end-of-buffer characters. The first causes
2764 * a transition to the end-of-buffer state. The second causes
2765 * a jam in that state.
2766 */
2767 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2768 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2769
2770 b->yy_buf_pos = &b->yy_ch_buf[0];
2771
2772 b->yy_at_bol = 1;
2773 b->yy_buffer_status = YY_BUFFER_NEW;
2774
2775 if ( b == YY_CURRENT_BUFFER )
2776 yy_load_buffer_state( );
2777 }
2778
2779 /** Pushes the new state onto the stack. The new state becomes
2780 * the current state. This function will allocate the stack
2781 * if necessary.
2782 * @param new_buffer The new state.
2783 *
2784 */
2785 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
2786 {
2787 if (new_buffer == NULL)
2788 return;
2789
2790 yyensure_buffer_stack();
2791
2792 /* This block is copied from yy_switch_to_buffer. */
2793 if ( YY_CURRENT_BUFFER )
2794 {
2795 /* Flush out information for old buffer. */
2796 *(yy_c_buf_p) = (yy_hold_char);
2797 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2798 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2799 }
2800
2801 /* Only push if top exists. Otherwise, replace top. */
2802 if (YY_CURRENT_BUFFER)
2803 (yy_buffer_stack_top)++;
2804 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2805
2806 /* copied from yy_switch_to_buffer. */
2807 yy_load_buffer_state( );
2808 (yy_did_buffer_switch_on_eof) = 1;
2809 }
2810
2811 /** Removes and deletes the top of the stack, if present.
2812 * The next element becomes the new top.
2813 *
2814 */
2815 void yypop_buffer_state (void)
2816 {
2817 if (!YY_CURRENT_BUFFER)
2818 return;
2819
2820 yy_delete_buffer(YY_CURRENT_BUFFER );
2821 YY_CURRENT_BUFFER_LVALUE = NULL;
2822 if ((yy_buffer_stack_top) > 0)
2823 --(yy_buffer_stack_top);
2824
2825 if (YY_CURRENT_BUFFER) {
2826 yy_load_buffer_state( );
2827 (yy_did_buffer_switch_on_eof) = 1;
2828 }
2829 }
2830
2831 /* Allocates the stack if it does not exist.
2832 * Guarantees space for at least one push.
2833 */
2834 static void yyensure_buffer_stack (void)
2835 {
2836 yy_size_t num_to_alloc;
2837
2838 if (!(yy_buffer_stack)) {
2839
2840 /* First allocation is just for 2 elements, since we don't know if this
2841 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2842 * immediate realloc on the next call.
2843 */
2844 num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
2845 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
2846 (num_to_alloc * sizeof(struct yy_buffer_state*)
2847 );
2848 if ( ! (yy_buffer_stack) )
2849 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2850
2851 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2852
2853 (yy_buffer_stack_max) = num_to_alloc;
2854 (yy_buffer_stack_top) = 0;
2855 return;
2856 }
2857
2858 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
2859
2860 /* Increase the buffer to prepare for a possible push. */
2861 yy_size_t grow_size = 8 /* arbitrary grow size */;
2862
2863 num_to_alloc = (yy_buffer_stack_max) + grow_size;
2864 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
2865 ((yy_buffer_stack),
2866 num_to_alloc * sizeof(struct yy_buffer_state*)
2867 );
2868 if ( ! (yy_buffer_stack) )
2869 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
2870
2871 /* zero only the new slots.*/
2872 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
2873 (yy_buffer_stack_max) = num_to_alloc;
2874 }
2875 }
2876
2877 /** Setup the input buffer state to scan directly from a user-specified character buffer.
2878 * @param base the character buffer
2879 * @param size the size in bytes of the character buffer
2880 *
2881 * @return the newly allocated buffer state object.
2882 */
2883 YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
2884 {
2885 YY_BUFFER_STATE b;
2886
2887 if ( size < 2 ||
2888 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2889 base[size-1] != YY_END_OF_BUFFER_CHAR )
2890 /* They forgot to leave room for the EOB's. */
2891 return NULL;
2892
2893 b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
2894 if ( ! b )
2895 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2896
2897 b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
2898 b->yy_buf_pos = b->yy_ch_buf = base;
2899 b->yy_is_our_buffer = 0;
2900 b->yy_input_file = NULL;
2901 b->yy_n_chars = b->yy_buf_size;
2902 b->yy_is_interactive = 0;
2903 b->yy_at_bol = 1;
2904 b->yy_fill_buffer = 0;
2905 b->yy_buffer_status = YY_BUFFER_NEW;
2906
2907 yy_switch_to_buffer( b );
2908
2909 return b;
2910 }
2911
2912 /** Setup the input buffer state to scan a string. The next call to yylex() will
2913 * scan from a @e copy of @a str.
2914 * @param yystr a NUL-terminated string to scan
2915 *
2916 * @return the newly allocated buffer state object.
2917 * @note If you want to scan bytes that may contain NUL values, then use
2918 * yy_scan_bytes() instead.
2919 */
2920 YY_BUFFER_STATE yy_scan_string (const char * yystr )
2921 {
2922
2923 return yy_scan_bytes( yystr, (int) strlen(yystr) );
2924 }
2925
2926 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
2927 * scan from a @e copy of @a bytes.
2928 * @param yybytes the byte buffer to scan
2929 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
2930 *
2931 * @return the newly allocated buffer state object.
2932 */
2933 YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
2934 {
2935 YY_BUFFER_STATE b;
2936 char *buf;
2937 yy_size_t n;
2938 int i;
2939
2940 /* Get memory for full buffer, including space for trailing EOB's. */
2941 n = (yy_size_t) (_yybytes_len + 2);
2942 buf = (char *) yyalloc( n );
2943 if ( ! buf )
2944 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2945
2946 for ( i = 0; i < _yybytes_len; ++i )
2947 buf[i] = yybytes[i];
2948
2949 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2950
2951 b = yy_scan_buffer( buf, n );
2952 if ( ! b )
2953 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2954
2955 /* It's okay to grow etc. this buffer, and we should throw it
2956 * away when we're done.
2957 */
2958 b->yy_is_our_buffer = 1;
2959
2960 return b;
2961 }
2962
2963 #ifndef YY_EXIT_FAILURE
2964 #define YY_EXIT_FAILURE 2
2965 #endif
2966
2967 static void yynoreturn yy_fatal_error (const char* msg )
2968 {
2969 fprintf( stderr, "%s\n", msg );
2970 exit( YY_EXIT_FAILURE );
2971 }
2972
2973 /* Redefine yyless() so it works in section 3 code. */
2974
2975 #undef yyless
2976 #define yyless(n) \
2977 do \
2978 { \
2979 /* Undo effects of setting up yytext. */ \
2980 int yyless_macro_arg = (n); \
2981 YY_LESS_LINENO(yyless_macro_arg);\
2982 yytext[yyleng] = (yy_hold_char); \
2983 (yy_c_buf_p) = yytext + yyless_macro_arg; \
2984 (yy_hold_char) = *(yy_c_buf_p); \
2985 *(yy_c_buf_p) = '\0'; \
2986 yyleng = yyless_macro_arg; \
2987 } \
2988 while ( 0 )
2989
2990 /* Accessor methods (get/set functions) to struct members. */
2991
2992 /** Get the current line number.
2993 *
2994 */
2995 int yyget_lineno (void)
2996 {
2997
2998 return yylineno;
2999 }
3000
3001 /** Get the input stream.
3002 *
3003 */
3004 FILE *yyget_in (void)
3005 {
3006 return yyin;
3007 }
3008
3009 /** Get the output stream.
3010 *
3011 */
3012 FILE *yyget_out (void)
3013 {
3014 return yyout;
3015 }
3016
3017 /** Get the length of the current token.
3018 *
3019 */
3020 int yyget_leng (void)
3021 {
3022 return yyleng;
3023 }
3024
3025 /** Get the current token.
3026 *
3027 */
3028
3029 char *yyget_text (void)
3030 {
3031 return yytext;
3032 }
3033
3034 /** Set the current line number.
3035 * @param _line_number line number
3036 *
3037 */
3038 void yyset_lineno (int _line_number )
3039 {
3040
3041 yylineno = _line_number;
3042 }
3043
3044 /** Set the input stream. This does not discard the current
3045 * input buffer.
3046 * @param _in_str A readable stream.
3047 *
3048 * @see yy_switch_to_buffer
3049 */
3050 void yyset_in (FILE * _in_str )
3051 {
3052 yyin = _in_str ;
3053 }
3054
3055 void yyset_out (FILE * _out_str )
3056 {
3057 yyout = _out_str ;
3058 }
3059
3060 int yyget_debug (void)
3061 {
3062 return yy_flex_debug;
3063 }
3064
3065 void yyset_debug (int _bdebug )
3066 {
3067 yy_flex_debug = _bdebug ;
3068 }
3069
3070 static int yy_init_globals (void)
3071 {
3072 /* Initialization is the same as for the non-reentrant scanner.
3073 * This function is called from yylex_destroy(), so don't allocate here.
3074 */
3075
3076 (yy_buffer_stack) = NULL;
3077 (yy_buffer_stack_top) = 0;
3078 (yy_buffer_stack_max) = 0;
3079 (yy_c_buf_p) = NULL;
3080 (yy_init) = 0;
3081 (yy_start) = 0;
3082
3083 /* Defined in main.c */
3084 #ifdef YY_STDINIT
3085 yyin = stdin;
3086 yyout = stdout;
3087 #else
3088 yyin = NULL;
3089 yyout = NULL;
3090 #endif
3091
3092 /* For future reference: Set errno on error, since we are called by
3093 * yylex_init()
3094 */
3095 return 0;
3096 }
3097
3098 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
3099 int yylex_destroy (void)
3100 {
3101
3102 /* Pop the buffer stack, destroying each element. */
3103 while(YY_CURRENT_BUFFER){
3104 yy_delete_buffer( YY_CURRENT_BUFFER );
3105 YY_CURRENT_BUFFER_LVALUE = NULL;
3106 yypop_buffer_state();
3107 }
3108
3109 /* Destroy the stack itself. */
3110 yyfree((yy_buffer_stack) );
3111 (yy_buffer_stack) = NULL;
3112
3113 /* Reset the globals. This is important in a non-reentrant scanner so the next time
3114 * yylex() is called, initialization will occur. */
3115 yy_init_globals( );
3116
3117 return 0;
3118 }
3119
3120 /*
3121 * Internal utility routines.
3122 */
3123
3124 #ifndef yytext_ptr
3125 static void yy_flex_strncpy (char* s1, const char * s2, int n )
3126 {
3127
3128 int i;
3129 for ( i = 0; i < n; ++i )
3130 s1[i] = s2[i];
3131 }
3132 #endif
3133
3134 #ifdef YY_NEED_STRLEN
3135 static int yy_flex_strlen (const char * s )
3136 {
3137 int n;
3138 for ( n = 0; s[n]; ++n )
3139 ;
3140
3141 return n;
3142 }
3143 #endif
3144
3145 void *yyalloc (yy_size_t size )
3146 {
3147 return malloc(size);
3148 }
3149
3150 void *yyrealloc (void * ptr, yy_size_t size )
3151 {
3152
3153 /* The cast to (char *) in the following accommodates both
3154 * implementations that use char* generic pointers, and those
3155 * that use void* generic pointers. It works with the latter
3156 * because both ANSI C and C++ allow castless assignment from
3157 * any pointer type to void*, and deal with argument conversions
3158 * as though doing an assignment.
3159 */
3160 return realloc(ptr, size);
3161 }
3162
3163 void yyfree (void * ptr )
3164 {
3165 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
3166 }
3167
3168 #define YYTABLES_NAME "yytables"
3169
3170 #line 589 "src/conf_lex.l"
3171
3172
3173 int confwrap(void){
3174 return 1;
3175 }
3176
3177 void conf_lex_string(const char * name, const char *string) {
3178 log_msg(LOG_LEVEL_DEBUG, "parse: '%s'", name);
3179 conf_linenumber = 0;
3180 conf_filename = checked_strdup(name); /* not to be freed, needed for logging */
3181 progress_status(PROGRESS_CONFIG, conf_filename);
3182 conf_scan_string(string);
3183 }
3184
3185 void conf_lex_file(const char * config) {
3186 log_msg(LOG_LEVEL_DEBUG, "parse: '%s'", config);
3187 conf_linenumber = 0;
3188
3189 if (strcmp(config,"-") == 0) {
3190 conf_filename = checked_strdup("(stdin)"); /* not to be freed, needed for logging */
3191 confin = stdin;
3192 } else {
3193 conf_filename = checked_strdup(config); /* not to be freed, needed for logging */
3194 progress_status(PROGRESS_CONFIG, conf_filename);
3195 char *expanded_config = expand_tilde(checked_strdup(config));
3196 confin = fopen( expanded_config, "r" );
3197 if (!confin) {
3198 log_msg(LOG_LEVEL_ERROR,"cannot open config file '%s': %s", config, strerror(errno));
3199 exit(IO_ERROR);
3200 }
3201 free(expanded_config);
3202 expanded_config=NULL;
3203 }
3204 conf_switch_to_buffer(conf_create_buffer( confin, YY_BUF_SIZE ));
3205 BEGIN 0;
3206 }
3207
3208 void conf_lex_delete_buffer(void) {
3209 conf_delete_buffer( YY_CURRENT_BUFFER );
3210 if (confin && confin != stdin) {
3211 if (fclose(confin)) {
3212 log_msg(LOG_LEVEL_WARNING, "fclose() failed for '%s': %s", conf_filename, strerror(errno));
3213 } else {
3214 confin = NULL;
3215 }
3216 }
3217 }
3218