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