ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/hopm/branches/1.1.x/src/config-lexer.c
Revision: 8567
Committed: Wed Sep 26 19:25:05 2018 UTC (6 years, 10 months ago) by michael
Content type: text/x-csrc
File size: 81195 byte(s)
Log Message:
- Re-create autogenerated files

File Contents

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

Properties

Name Value
svn:eol-style native
svn:keywords Id