ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/hopm/trunk/src/config-lexer.c
Revision: 9727
Committed: Mon Nov 16 10:29:12 2020 UTC (5 years, 8 months ago) by michael
Content type: text/x-csrc
File size: 84169 byte(s)
Log Message:
- The 'vhost' configuration directive found in the irc {} and scanner {} blocks has been renamed to 'bind'

File Contents

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

Properties

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