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

Properties

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