ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/hopm/branches/1.1.x/src/config-lexer.c
Revision: 5067
Committed: Mon Dec 22 14:36:44 2014 UTC (9 years, 3 months ago) by michael
Content type: text/x-csrc
Original Path: hopm/trunk/src/config-lexer.c
File size: 66857 byte(s)
Log Message:
- config_parser.y: removed invalid redeclaration of PROTOCOLTYPE

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