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