ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/hopm/trunk/src/config-lexer.c
Revision: 7753
Committed: Sat Oct 1 20:59:04 2016 UTC (7 years, 5 months ago) by michael
Content type: text/x-csrc
File size: 79734 byte(s)
Log Message:
- Rebuilt config-lexer.c

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

Properties

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