debuggers.hg

view tools/libxl/libxlu_cfg_l.c @ 21067:b4a1832a916f

Update Xen version to 4.0.0-rc6
author Keir Fraser <keir.fraser@citrix.com>
date Tue Mar 09 18:18:05 2010 +0000 (2010-03-09)
parents 3138b3885999
children e5a9221bdd3f
line source
1 #line 2 "libxlu_cfg_l.c"
3 #line 4 "libxlu_cfg_l.c"
5 #define YY_INT_ALIGNED short int
7 /* A lexical scanner generated by flex */
9 #define FLEX_SCANNER
10 #define YY_FLEX_MAJOR_VERSION 2
11 #define YY_FLEX_MINOR_VERSION 5
12 #define YY_FLEX_SUBMINOR_VERSION 35
13 #if YY_FLEX_SUBMINOR_VERSION > 0
14 #define FLEX_BETA
15 #endif
17 /* First, we deal with platform-specific or compiler-specific issues. */
19 /* begin standard C headers. */
20 #include <stdio.h>
21 #include <string.h>
22 #include <errno.h>
23 #include <stdlib.h>
25 /* end standard C headers. */
27 /* flex integer type definitions */
29 #ifndef FLEXINT_H
30 #define FLEXINT_H
32 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
34 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
36 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
37 * if you want the limit (max/min) macros for int types.
38 */
39 #ifndef __STDC_LIMIT_MACROS
40 #define __STDC_LIMIT_MACROS 1
41 #endif
43 #include <inttypes.h>
44 typedef int8_t flex_int8_t;
45 typedef uint8_t flex_uint8_t;
46 typedef int16_t flex_int16_t;
47 typedef uint16_t flex_uint16_t;
48 typedef int32_t flex_int32_t;
49 typedef uint32_t flex_uint32_t;
50 #else
51 typedef signed char flex_int8_t;
52 typedef short int flex_int16_t;
53 typedef int flex_int32_t;
54 typedef unsigned char flex_uint8_t;
55 typedef unsigned short int flex_uint16_t;
56 typedef unsigned int flex_uint32_t;
58 /* Limits of integral types. */
59 #ifndef INT8_MIN
60 #define INT8_MIN (-128)
61 #endif
62 #ifndef INT16_MIN
63 #define INT16_MIN (-32767-1)
64 #endif
65 #ifndef INT32_MIN
66 #define INT32_MIN (-2147483647-1)
67 #endif
68 #ifndef INT8_MAX
69 #define INT8_MAX (127)
70 #endif
71 #ifndef INT16_MAX
72 #define INT16_MAX (32767)
73 #endif
74 #ifndef INT32_MAX
75 #define INT32_MAX (2147483647)
76 #endif
77 #ifndef UINT8_MAX
78 #define UINT8_MAX (255U)
79 #endif
80 #ifndef UINT16_MAX
81 #define UINT16_MAX (65535U)
82 #endif
83 #ifndef UINT32_MAX
84 #define UINT32_MAX (4294967295U)
85 #endif
87 #endif /* ! C99 */
89 #endif /* ! FLEXINT_H */
91 #ifdef __cplusplus
93 /* The "const" storage-class-modifier is valid. */
94 #define YY_USE_CONST
96 #else /* ! __cplusplus */
98 /* C99 requires __STDC__ to be defined as 1. */
99 #if defined (__STDC__)
101 #define YY_USE_CONST
103 #endif /* defined (__STDC__) */
104 #endif /* ! __cplusplus */
106 #ifdef YY_USE_CONST
107 #define yyconst const
108 #else
109 #define yyconst
110 #endif
112 /* Returned upon end-of-file. */
113 #define YY_NULL 0
115 /* Promotes a possibly negative, possibly signed char to an unsigned
116 * integer for use as an array index. If the signed char is negative,
117 * we want to instead treat it as an 8-bit unsigned char, hence the
118 * double cast.
119 */
120 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
122 /* An opaque pointer. */
123 #ifndef YY_TYPEDEF_YY_SCANNER_T
124 #define YY_TYPEDEF_YY_SCANNER_T
125 typedef void* yyscan_t;
126 #endif
128 /* For convenience, these vars (plus the bison vars far below)
129 are macros in the reentrant scanner. */
130 #define yyin yyg->yyin_r
131 #define yyout yyg->yyout_r
132 #define yyextra yyg->yyextra_r
133 #define yyleng yyg->yyleng_r
134 #define yytext yyg->yytext_r
135 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
136 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
137 #define yy_flex_debug yyg->yy_flex_debug_r
139 /* Enter a start condition. This macro really ought to take a parameter,
140 * but we do it the disgusting crufty way forced on us by the ()-less
141 * definition of BEGIN.
142 */
143 #define BEGIN yyg->yy_start = 1 + 2 *
145 /* Translate the current start state into a value that can be later handed
146 * to BEGIN to return to the state. The YYSTATE alias is for lex
147 * compatibility.
148 */
149 #define YY_START ((yyg->yy_start - 1) / 2)
150 #define YYSTATE YY_START
152 /* Action number for EOF rule of a given start state. */
153 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
155 /* Special action meaning "start processing a new file". */
156 #define YY_NEW_FILE xlu__cfg_yyrestart(yyin ,yyscanner )
158 #define YY_END_OF_BUFFER_CHAR 0
160 /* Size of default input buffer. */
161 #ifndef YY_BUF_SIZE
162 #ifdef __ia64__
163 /* On IA-64, the buffer size is 16k, not 8k.
164 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
165 * Ditto for the __ia64__ case accordingly.
166 */
167 #define YY_BUF_SIZE 32768
168 #else
169 #define YY_BUF_SIZE 16384
170 #endif /* __ia64__ */
171 #endif
173 /* The state buf must be large enough to hold one state per character in the main buffer.
174 */
175 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
177 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
178 #define YY_TYPEDEF_YY_BUFFER_STATE
179 typedef struct yy_buffer_state *YY_BUFFER_STATE;
180 #endif
182 #define EOB_ACT_CONTINUE_SCAN 0
183 #define EOB_ACT_END_OF_FILE 1
184 #define EOB_ACT_LAST_MATCH 2
186 /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
187 * access to the local variable yy_act. Since yyless() is a macro, it would break
188 * existing scanners that call yyless() from OUTSIDE xlu__cfg_yylex.
189 * One obvious solution it to make yy_act a global. I tried that, and saw
190 * a 5% performance hit in a non-yylineno scanner, because yy_act is
191 * normally declared as a register variable-- so it is not worth it.
192 */
193 #define YY_LESS_LINENO(n) \
194 do { \
195 int yyl;\
196 for ( yyl = n; yyl < yyleng; ++yyl )\
197 if ( yytext[yyl] == '\n' )\
198 --yylineno;\
199 }while(0)
201 /* Return all but the first "n" matched characters back to the input stream. */
202 #define yyless(n) \
203 do \
204 { \
205 /* Undo effects of setting up yytext. */ \
206 int yyless_macro_arg = (n); \
207 YY_LESS_LINENO(yyless_macro_arg);\
208 *yy_cp = yyg->yy_hold_char; \
209 YY_RESTORE_YY_MORE_OFFSET \
210 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
211 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
212 } \
213 while ( 0 )
215 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
217 #ifndef YY_TYPEDEF_YY_SIZE_T
218 #define YY_TYPEDEF_YY_SIZE_T
219 typedef size_t yy_size_t;
220 #endif
222 #ifndef YY_STRUCT_YY_BUFFER_STATE
223 #define YY_STRUCT_YY_BUFFER_STATE
224 struct yy_buffer_state
225 {
226 FILE *yy_input_file;
228 char *yy_ch_buf; /* input buffer */
229 char *yy_buf_pos; /* current position in input buffer */
231 /* Size of input buffer in bytes, not including room for EOB
232 * characters.
233 */
234 yy_size_t yy_buf_size;
236 /* Number of characters read into yy_ch_buf, not including EOB
237 * characters.
238 */
239 int yy_n_chars;
241 /* Whether we "own" the buffer - i.e., we know we created it,
242 * and can realloc() it to grow it, and should free() it to
243 * delete it.
244 */
245 int yy_is_our_buffer;
247 /* Whether this is an "interactive" input source; if so, and
248 * if we're using stdio for input, then we want to use getc()
249 * instead of fread(), to make sure we stop fetching input after
250 * each newline.
251 */
252 int yy_is_interactive;
254 /* Whether we're considered to be at the beginning of a line.
255 * If so, '^' rules will be active on the next match, otherwise
256 * not.
257 */
258 int yy_at_bol;
260 int yy_bs_lineno; /**< The line count. */
261 int yy_bs_column; /**< The column count. */
263 /* Whether to try to fill the input buffer when we reach the
264 * end of it.
265 */
266 int yy_fill_buffer;
268 int yy_buffer_status;
270 #define YY_BUFFER_NEW 0
271 #define YY_BUFFER_NORMAL 1
272 /* When an EOF's been seen but there's still some text to process
273 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
274 * shouldn't try reading from the input source any more. We might
275 * still have a bunch of tokens to match, though, because of
276 * possible backing-up.
277 *
278 * When we actually see the EOF, we change the status to "new"
279 * (via xlu__cfg_yyrestart()), so that the user can continue scanning by
280 * just pointing yyin at a new input file.
281 */
282 #define YY_BUFFER_EOF_PENDING 2
284 };
285 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
287 /* We provide macros for accessing buffer states in case in the
288 * future we want to put the buffer states in a more general
289 * "scanner state".
290 *
291 * Returns the top of the stack, or NULL.
292 */
293 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
294 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
295 : NULL)
297 /* Same as previous macro, but useful when we know that the buffer stack is not
298 * NULL or when we need an lvalue. For internal use only.
299 */
300 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
302 void xlu__cfg_yyrestart (FILE *input_file ,yyscan_t yyscanner );
303 void xlu__cfg_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
304 YY_BUFFER_STATE xlu__cfg_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
305 void xlu__cfg_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
306 void xlu__cfg_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
307 void xlu__cfg_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
308 void xlu__cfg_yypop_buffer_state (yyscan_t yyscanner );
310 static void xlu__cfg_yyensure_buffer_stack (yyscan_t yyscanner );
311 static void xlu__cfg_yy_load_buffer_state (yyscan_t yyscanner );
312 static void xlu__cfg_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
314 #define YY_FLUSH_BUFFER xlu__cfg_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
316 YY_BUFFER_STATE xlu__cfg_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
317 YY_BUFFER_STATE xlu__cfg_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
318 YY_BUFFER_STATE xlu__cfg_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
320 void *xlu__cfg_yyalloc (yy_size_t ,yyscan_t yyscanner );
321 void *xlu__cfg_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
322 void xlu__cfg_yyfree (void * ,yyscan_t yyscanner );
324 #define yy_new_buffer xlu__cfg_yy_create_buffer
326 #define yy_set_interactive(is_interactive) \
327 { \
328 if ( ! YY_CURRENT_BUFFER ){ \
329 xlu__cfg_yyensure_buffer_stack (yyscanner); \
330 YY_CURRENT_BUFFER_LVALUE = \
331 xlu__cfg_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
332 } \
333 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
334 }
336 #define yy_set_bol(at_bol) \
337 { \
338 if ( ! YY_CURRENT_BUFFER ){\
339 xlu__cfg_yyensure_buffer_stack (yyscanner); \
340 YY_CURRENT_BUFFER_LVALUE = \
341 xlu__cfg_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
342 } \
343 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
344 }
346 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
348 #define xlu__cfg_yywrap(n) 1
349 #define YY_SKIP_YYWRAP
351 typedef unsigned char YY_CHAR;
353 typedef int yy_state_type;
355 #define yytext_ptr yytext_r
357 static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
358 static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
359 static int yy_get_next_buffer (yyscan_t yyscanner );
360 static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
362 /* Done after the current pattern has been matched and before the
363 * corresponding action - sets up yytext.
364 */
365 #define YY_DO_BEFORE_ACTION \
366 yyg->yytext_ptr = yy_bp; \
367 yyg->yytext_ptr -= yyg->yy_more_len; \
368 yyleng = (size_t) (yy_cp - yyg->yytext_ptr); \
369 yyg->yy_hold_char = *yy_cp; \
370 *yy_cp = '\0'; \
371 yyg->yy_c_buf_p = yy_cp;
373 #define YY_NUM_RULES 15
374 #define YY_END_OF_BUFFER 16
375 /* This struct is not used in this scanner,
376 but its presence is necessary. */
377 struct yy_trans_info
378 {
379 flex_int32_t yy_verify;
380 flex_int32_t yy_nxt;
381 };
382 static yyconst flex_int16_t yy_accept[34] =
383 { 0,
384 0, 0, 13, 13, 16, 12, 3, 9, 12, 12,
385 12, 4, 2, 8, 7, 5, 6, 1, 13, 13,
386 14, 0, 11, 0, 0, 9, 0, 10, 0, 2,
387 1, 13, 0
388 } ;
390 static yyconst flex_int32_t yy_ec[256] =
391 { 0,
392 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
393 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
394 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
395 1, 2, 1, 4, 5, 1, 1, 1, 6, 1,
396 1, 1, 1, 7, 1, 1, 1, 8, 8, 8,
397 8, 8, 8, 8, 8, 8, 8, 1, 9, 1,
398 10, 1, 1, 1, 1, 1, 1, 1, 1, 1,
399 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
400 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
401 11, 12, 13, 1, 14, 1, 15, 15, 15, 15,
403 15, 15, 16, 16, 16, 16, 16, 16, 16, 16,
404 16, 16, 16, 16, 16, 16, 16, 16, 16, 15,
405 16, 16, 1, 1, 1, 1, 1, 1, 1, 1,
406 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
407 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
408 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
409 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
410 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
411 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
412 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
414 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
415 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
416 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
417 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
418 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
419 1, 1, 1, 1, 1
420 } ;
422 static yyconst flex_int32_t yy_meta[17] =
423 { 0,
424 1, 2, 3, 1, 1, 1, 1, 4, 1, 1,
425 1, 1, 1, 4, 4, 4
426 } ;
428 static yyconst flex_int16_t yy_base[40] =
429 { 0,
430 0, 0, 15, 17, 51, 54, 54, 54, 17, 45,
431 16, 54, 15, 54, 54, 54, 54, 0, 0, 54,
432 54, 20, 54, 0, 37, 54, 19, 54, 0, 18,
433 0, 0, 54, 33, 37, 41, 45, 23, 49
434 } ;
436 static yyconst flex_int16_t yy_def[40] =
437 { 0,
438 33, 1, 34, 34, 33, 33, 33, 33, 35, 36,
439 37, 33, 33, 33, 33, 33, 33, 38, 39, 33,
440 33, 35, 33, 35, 36, 33, 37, 33, 37, 33,
441 38, 39, 0, 33, 33, 33, 33, 33, 33
442 } ;
444 static yyconst flex_int16_t yy_nxt[71] =
445 { 0,
446 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
447 16, 6, 17, 6, 18, 18, 20, 21, 20, 21,
448 23, 28, 30, 23, 28, 30, 31, 29, 24, 30,
449 29, 24, 30, 19, 19, 19, 19, 22, 22, 26,
450 22, 25, 25, 25, 25, 27, 27, 26, 27, 32,
451 33, 33, 32, 5, 33, 33, 33, 33, 33, 33,
452 33, 33, 33, 33, 33, 33, 33, 33, 33, 33
453 } ;
455 static yyconst flex_int16_t yy_chk[71] =
456 { 0,
457 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
458 1, 1, 1, 1, 1, 1, 3, 3, 4, 4,
459 9, 11, 13, 22, 27, 30, 38, 11, 9, 13,
460 27, 22, 30, 34, 34, 34, 34, 35, 35, 25,
461 35, 36, 36, 36, 36, 37, 37, 10, 37, 39,
462 5, 0, 39, 33, 33, 33, 33, 33, 33, 33,
463 33, 33, 33, 33, 33, 33, 33, 33, 33, 33
464 } ;
466 /* Table of booleans, true if rule could match eol. */
467 static yyconst flex_int32_t yy_rule_can_match_eol[16] =
468 { 0,
469 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, };
471 /* The intent behind this definition is that it'll catch
472 * any uses of REJECT which flex missed.
473 */
474 #define REJECT reject_used_but_not_detected
475 #define yymore() (yyg->yy_more_flag = 1)
476 #define YY_MORE_ADJ yyg->yy_more_len
477 #define YY_RESTORE_YY_MORE_OFFSET
478 #line 1 "libxlu_cfg_l.l"
479 /* -*- fundamental -*- */
480 #line 4 "libxlu_cfg_l.l"
481 #include "libxlu_cfg_i.h"
483 #define ctx ((CfgParseContext*)yyextra)
484 #define YY_NO_INPUT
486 #define GOT(x) do{ \
487 yylloc->first_line= yylineno; \
488 return (x); \
489 }while(0)
492 #line 493 "libxlu_cfg_l.c"
494 #define INITIAL 0
495 #define lexerr 1
497 #ifndef YY_NO_UNISTD_H
498 /* Special case for "unistd.h", since it is non-ANSI. We include it way
499 * down here because we want the user's section 1 to have been scanned first.
500 * The user has a chance to override it with an option.
501 */
502 #include <unistd.h>
503 #endif
505 #ifndef YY_EXTRA_TYPE
506 #define YY_EXTRA_TYPE void *
507 #endif
509 /* Holds the entire state of the reentrant scanner. */
510 struct yyguts_t
511 {
513 /* User-defined. Not touched by flex. */
514 YY_EXTRA_TYPE yyextra_r;
516 /* The rest are the same as the globals declared in the non-reentrant scanner. */
517 FILE *yyin_r, *yyout_r;
518 size_t yy_buffer_stack_top; /**< index of top of stack. */
519 size_t yy_buffer_stack_max; /**< capacity of stack. */
520 YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
521 char yy_hold_char;
522 int yy_n_chars;
523 int yyleng_r;
524 char *yy_c_buf_p;
525 int yy_init;
526 int yy_start;
527 int yy_did_buffer_switch_on_eof;
528 int yy_start_stack_ptr;
529 int yy_start_stack_depth;
530 int *yy_start_stack;
531 yy_state_type yy_last_accepting_state;
532 char* yy_last_accepting_cpos;
534 int yylineno_r;
535 int yy_flex_debug_r;
537 char *yytext_r;
538 int yy_more_flag;
539 int yy_more_len;
541 YYSTYPE * yylval_r;
543 YYLTYPE * yylloc_r;
545 }; /* end struct yyguts_t */
547 static int yy_init_globals (yyscan_t yyscanner );
549 /* This must go here because YYSTYPE and YYLTYPE are included
550 * from bison output in section 1.*/
551 # define yylval yyg->yylval_r
553 # define yylloc yyg->yylloc_r
555 int xlu__cfg_yylex_init (yyscan_t* scanner);
557 int xlu__cfg_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
559 /* Accessor methods to globals.
560 These are made visible to non-reentrant scanners for convenience. */
562 int xlu__cfg_yylex_destroy (yyscan_t yyscanner );
564 int xlu__cfg_yyget_debug (yyscan_t yyscanner );
566 void xlu__cfg_yyset_debug (int debug_flag ,yyscan_t yyscanner );
568 YY_EXTRA_TYPE xlu__cfg_yyget_extra (yyscan_t yyscanner );
570 void xlu__cfg_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
572 FILE *xlu__cfg_yyget_in (yyscan_t yyscanner );
574 void xlu__cfg_yyset_in (FILE * in_str ,yyscan_t yyscanner );
576 FILE *xlu__cfg_yyget_out (yyscan_t yyscanner );
578 void xlu__cfg_yyset_out (FILE * out_str ,yyscan_t yyscanner );
580 int xlu__cfg_yyget_leng (yyscan_t yyscanner );
582 char *xlu__cfg_yyget_text (yyscan_t yyscanner );
584 int xlu__cfg_yyget_lineno (yyscan_t yyscanner );
586 void xlu__cfg_yyset_lineno (int line_number ,yyscan_t yyscanner );
588 YYSTYPE * xlu__cfg_yyget_lval (yyscan_t yyscanner );
590 void xlu__cfg_yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
592 YYLTYPE *xlu__cfg_yyget_lloc (yyscan_t yyscanner );
594 void xlu__cfg_yyset_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
596 /* Macros after this point can all be overridden by user definitions in
597 * section 1.
598 */
600 #ifndef YY_SKIP_YYWRAP
601 #ifdef __cplusplus
602 extern "C" int xlu__cfg_yywrap (yyscan_t yyscanner );
603 #else
604 extern int xlu__cfg_yywrap (yyscan_t yyscanner );
605 #endif
606 #endif
608 #ifndef yytext_ptr
609 static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
610 #endif
612 #ifdef YY_NEED_STRLEN
613 static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
614 #endif
616 #ifndef YY_NO_INPUT
618 #ifdef __cplusplus
619 static int yyinput (yyscan_t yyscanner );
620 #else
621 static int input (yyscan_t yyscanner );
622 #endif
624 #endif
626 /* Amount of stuff to slurp up with each read. */
627 #ifndef YY_READ_BUF_SIZE
628 #ifdef __ia64__
629 /* On IA-64, the buffer size is 16k, not 8k */
630 #define YY_READ_BUF_SIZE 16384
631 #else
632 #define YY_READ_BUF_SIZE 8192
633 #endif /* __ia64__ */
634 #endif
636 /* Copy whatever the last rule matched to the standard output. */
637 #ifndef ECHO
638 /* This used to be an fputs(), but since the string might contain NUL's,
639 * we now use fwrite().
640 */
641 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
642 #endif
644 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
645 * is returned in "result".
646 */
647 #ifndef YY_INPUT
648 #define YY_INPUT(buf,result,max_size) \
649 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
650 { \
651 int c = '*'; \
652 size_t n; \
653 for ( n = 0; n < max_size && \
654 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
655 buf[n] = (char) c; \
656 if ( c == '\n' ) \
657 buf[n++] = (char) c; \
658 if ( c == EOF && ferror( yyin ) ) \
659 YY_FATAL_ERROR( "input in flex scanner failed" ); \
660 result = n; \
661 } \
662 else \
663 { \
664 errno=0; \
665 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
666 { \
667 if( errno != EINTR) \
668 { \
669 YY_FATAL_ERROR( "input in flex scanner failed" ); \
670 break; \
671 } \
672 errno=0; \
673 clearerr(yyin); \
674 } \
675 }\
676 \
678 #endif
680 /* No semi-colon after return; correct usage is to write "yyterminate();" -
681 * we don't want an extra ';' after the "return" because that will cause
682 * some compilers to complain about unreachable statements.
683 */
684 #ifndef yyterminate
685 #define yyterminate() return YY_NULL
686 #endif
688 /* Number of entries by which start-condition stack grows. */
689 #ifndef YY_START_STACK_INCR
690 #define YY_START_STACK_INCR 25
691 #endif
693 /* Report a fatal error. */
694 #ifndef YY_FATAL_ERROR
695 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
696 #endif
698 /* end tables serialization structures and prototypes */
700 /* Default declaration of generated scanner - a define so the user can
701 * easily add parameters.
702 */
703 #ifndef YY_DECL
704 #define YY_DECL_IS_OURS 1
706 extern int xlu__cfg_yylex \
707 (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
709 #define YY_DECL int xlu__cfg_yylex \
710 (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
711 #endif /* !YY_DECL */
713 /* Code executed at the beginning of each rule, after yytext and yyleng
714 * have been set up.
715 */
716 #ifndef YY_USER_ACTION
717 #define YY_USER_ACTION
718 #endif
720 /* Code executed at the end of each rule. */
721 #ifndef YY_BREAK
722 #define YY_BREAK break;
723 #endif
725 #define YY_RULE_SETUP \
726 YY_USER_ACTION
728 /** The main scanner function which does all the work.
729 */
730 YY_DECL
731 {
732 register yy_state_type yy_current_state;
733 register char *yy_cp, *yy_bp;
734 register int yy_act;
735 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
737 #line 30 "libxlu_cfg_l.l"
740 #line 741 "libxlu_cfg_l.c"
742 yylval = yylval_param;
744 yylloc = yylloc_param;
746 if ( !yyg->yy_init )
747 {
748 yyg->yy_init = 1;
750 #ifdef YY_USER_INIT
751 YY_USER_INIT;
752 #endif
754 if ( ! yyg->yy_start )
755 yyg->yy_start = 1; /* first start state */
757 if ( ! yyin )
758 yyin = stdin;
760 if ( ! yyout )
761 yyout = stdout;
763 if ( ! YY_CURRENT_BUFFER ) {
764 xlu__cfg_yyensure_buffer_stack (yyscanner);
765 YY_CURRENT_BUFFER_LVALUE =
766 xlu__cfg_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
767 }
769 xlu__cfg_yy_load_buffer_state(yyscanner );
770 }
772 while ( 1 ) /* loops until end-of-file is reached */
773 {
774 yyg->yy_more_len = 0;
775 if ( yyg->yy_more_flag )
776 {
777 yyg->yy_more_len = yyg->yy_c_buf_p - yyg->yytext_ptr;
778 yyg->yy_more_flag = 0;
779 }
780 yy_cp = yyg->yy_c_buf_p;
782 /* Support of yytext. */
783 *yy_cp = yyg->yy_hold_char;
785 /* yy_bp points to the position in yy_ch_buf of the start of
786 * the current run.
787 */
788 yy_bp = yy_cp;
790 yy_current_state = yyg->yy_start;
791 yy_match:
792 do
793 {
794 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
795 if ( yy_accept[yy_current_state] )
796 {
797 yyg->yy_last_accepting_state = yy_current_state;
798 yyg->yy_last_accepting_cpos = yy_cp;
799 }
800 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
801 {
802 yy_current_state = (int) yy_def[yy_current_state];
803 if ( yy_current_state >= 34 )
804 yy_c = yy_meta[(unsigned int) yy_c];
805 }
806 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
807 ++yy_cp;
808 }
809 while ( yy_current_state != 33 );
810 yy_cp = yyg->yy_last_accepting_cpos;
811 yy_current_state = yyg->yy_last_accepting_state;
813 yy_find_action:
814 yy_act = yy_accept[yy_current_state];
816 YY_DO_BEFORE_ACTION;
818 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
819 {
820 int yyl;
821 for ( yyl = yyg->yy_more_len; yyl < yyleng; ++yyl )
822 if ( yytext[yyl] == '\n' )
824 do{ yylineno++;
825 yycolumn=0;
826 }while(0)
827 ;
828 }
830 do_action: /* This label is used only to access EOF actions. */
832 switch ( yy_act )
833 { /* beginning of action switch */
834 case 0: /* must back up */
835 /* undo the effects of YY_DO_BEFORE_ACTION */
836 *yy_cp = yyg->yy_hold_char;
837 yy_cp = yyg->yy_last_accepting_cpos;
838 yy_current_state = yyg->yy_last_accepting_state;
839 goto yy_find_action;
841 case 1:
842 YY_RULE_SETUP
843 #line 32 "libxlu_cfg_l.l"
844 {
845 yylval->string= xlu__cfgl_strdup(ctx,yytext);
846 GOT(IDENT);
847 }
848 YY_BREAK
849 case 2:
850 YY_RULE_SETUP
851 #line 36 "libxlu_cfg_l.l"
852 {
853 yylval->string= xlu__cfgl_strdup(ctx,yytext);
854 GOT(NUMBER);
855 }
856 YY_BREAK
857 case 3:
858 YY_RULE_SETUP
859 #line 41 "libxlu_cfg_l.l"
861 YY_BREAK
862 case 4:
863 YY_RULE_SETUP
864 #line 43 "libxlu_cfg_l.l"
865 { GOT(','); }
866 YY_BREAK
867 case 5:
868 YY_RULE_SETUP
869 #line 44 "libxlu_cfg_l.l"
870 { GOT('['); }
871 YY_BREAK
872 case 6:
873 YY_RULE_SETUP
874 #line 45 "libxlu_cfg_l.l"
875 { GOT(']'); }
876 YY_BREAK
877 case 7:
878 YY_RULE_SETUP
879 #line 46 "libxlu_cfg_l.l"
880 { GOT('='); }
881 YY_BREAK
882 case 8:
883 YY_RULE_SETUP
884 #line 47 "libxlu_cfg_l.l"
885 { GOT(';'); }
886 YY_BREAK
887 case 9:
888 /* rule 9 can match eol */
889 YY_RULE_SETUP
890 #line 49 "libxlu_cfg_l.l"
891 { yylloc->first_line= yylineno-1; return NEWLINE; }
892 YY_BREAK
893 case 10:
894 YY_RULE_SETUP
895 #line 51 "libxlu_cfg_l.l"
896 {
897 yylval->string= xlu__cfgl_dequote(ctx,yytext);
898 GOT(STRING);
899 }
900 YY_BREAK
901 case 11:
902 YY_RULE_SETUP
903 #line 55 "libxlu_cfg_l.l"
904 {
905 yylval->string= xlu__cfgl_dequote(ctx,yytext);
906 GOT(STRING);
907 }
908 YY_BREAK
909 case 12:
910 YY_RULE_SETUP
911 #line 60 "libxlu_cfg_l.l"
912 {
913 BEGIN(lexerr);
914 yymore();
915 }
916 YY_BREAK
917 case 13:
918 YY_RULE_SETUP
919 #line 65 "libxlu_cfg_l.l"
920 {
921 xlu__cfgl_lexicalerror(ctx,"lexical error");
922 BEGIN(0);
923 }
924 YY_BREAK
925 case 14:
926 /* rule 14 can match eol */
927 YY_RULE_SETUP
928 #line 70 "libxlu_cfg_l.l"
929 {
930 xlu__cfgl_lexicalerror(ctx,"lexical error");
931 BEGIN(0);
932 GOT(NEWLINE);
933 }
934 YY_BREAK
935 case 15:
936 YY_RULE_SETUP
937 #line 75 "libxlu_cfg_l.l"
938 YY_FATAL_ERROR( "flex scanner jammed" );
939 YY_BREAK
940 #line 941 "libxlu_cfg_l.c"
941 case YY_STATE_EOF(INITIAL):
942 case YY_STATE_EOF(lexerr):
943 yyterminate();
945 case YY_END_OF_BUFFER:
946 {
947 /* Amount of text matched not including the EOB char. */
948 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
950 /* Undo the effects of YY_DO_BEFORE_ACTION. */
951 *yy_cp = yyg->yy_hold_char;
952 YY_RESTORE_YY_MORE_OFFSET
954 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
955 {
956 /* We're scanning a new file or input source. It's
957 * possible that this happened because the user
958 * just pointed yyin at a new source and called
959 * xlu__cfg_yylex(). If so, then we have to assure
960 * consistency between YY_CURRENT_BUFFER and our
961 * globals. Here is the right place to do so, because
962 * this is the first action (other than possibly a
963 * back-up) that will match for the new input source.
964 */
965 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
966 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
967 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
968 }
970 /* Note that here we test for yy_c_buf_p "<=" to the position
971 * of the first EOB in the buffer, since yy_c_buf_p will
972 * already have been incremented past the NUL character
973 * (since all states make transitions on EOB to the
974 * end-of-buffer state). Contrast this with the test
975 * in input().
976 */
977 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
978 { /* This was really a NUL. */
979 yy_state_type yy_next_state;
981 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
983 yy_current_state = yy_get_previous_state( yyscanner );
985 /* Okay, we're now positioned to make the NUL
986 * transition. We couldn't have
987 * yy_get_previous_state() go ahead and do it
988 * for us because it doesn't know how to deal
989 * with the possibility of jamming (and we don't
990 * want to build jamming into it because then it
991 * will run more slowly).
992 */
994 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
996 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
998 if ( yy_next_state )
999 {
1000 /* Consume the NUL. */
1001 yy_cp = ++yyg->yy_c_buf_p;
1002 yy_current_state = yy_next_state;
1003 goto yy_match;
1006 else
1008 yy_cp = yyg->yy_last_accepting_cpos;
1009 yy_current_state = yyg->yy_last_accepting_state;
1010 goto yy_find_action;
1014 else switch ( yy_get_next_buffer( yyscanner ) )
1016 case EOB_ACT_END_OF_FILE:
1018 yyg->yy_did_buffer_switch_on_eof = 0;
1020 if ( xlu__cfg_yywrap(yyscanner ) )
1022 /* Note: because we've taken care in
1023 * yy_get_next_buffer() to have set up
1024 * yytext, we can now set up
1025 * yy_c_buf_p so that if some total
1026 * hoser (like flex itself) wants to
1027 * call the scanner after we return the
1028 * YY_NULL, it'll still work - another
1029 * YY_NULL will get returned.
1030 */
1031 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1033 yy_act = YY_STATE_EOF(YY_START);
1034 goto do_action;
1037 else
1039 if ( ! yyg->yy_did_buffer_switch_on_eof )
1040 YY_NEW_FILE;
1042 break;
1045 case EOB_ACT_CONTINUE_SCAN:
1046 yyg->yy_c_buf_p =
1047 yyg->yytext_ptr + yy_amount_of_matched_text;
1049 yy_current_state = yy_get_previous_state( yyscanner );
1051 yy_cp = yyg->yy_c_buf_p;
1052 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1053 goto yy_match;
1055 case EOB_ACT_LAST_MATCH:
1056 yyg->yy_c_buf_p =
1057 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1059 yy_current_state = yy_get_previous_state( yyscanner );
1061 yy_cp = yyg->yy_c_buf_p;
1062 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1063 goto yy_find_action;
1065 break;
1068 default:
1069 YY_FATAL_ERROR(
1070 "fatal flex scanner internal error--no action found" );
1071 } /* end of action switch */
1072 } /* end of scanning one token */
1073 } /* end of xlu__cfg_yylex */
1075 /* yy_get_next_buffer - try to read in a new buffer
1077 * Returns a code representing an action:
1078 * EOB_ACT_LAST_MATCH -
1079 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1080 * EOB_ACT_END_OF_FILE - end of file
1081 */
1082 static int yy_get_next_buffer (yyscan_t yyscanner)
1084 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1085 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1086 register char *source = yyg->yytext_ptr;
1087 register int number_to_move, i;
1088 int ret_val;
1090 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1091 YY_FATAL_ERROR(
1092 "fatal flex scanner internal error--end of buffer missed" );
1094 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1095 { /* Don't try to fill the buffer, so this is an EOF. */
1096 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1098 /* We matched a single character, the EOB, so
1099 * treat this as a final EOF.
1100 */
1101 return EOB_ACT_END_OF_FILE;
1104 else
1106 /* We matched some text prior to the EOB, first
1107 * process it.
1108 */
1109 return EOB_ACT_LAST_MATCH;
1113 /* Try to read more data. */
1115 /* First move last chars to start of buffer. */
1116 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
1118 for ( i = 0; i < number_to_move; ++i )
1119 *(dest++) = *(source++);
1121 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1122 /* don't do the read, it's not guaranteed to return an EOF,
1123 * just force an EOF
1124 */
1125 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1127 else
1129 int num_to_read =
1130 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1132 while ( num_to_read <= 0 )
1133 { /* Not enough room in the buffer - grow it. */
1135 /* just a shorter name for the current buffer */
1136 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1138 int yy_c_buf_p_offset =
1139 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
1141 if ( b->yy_is_our_buffer )
1143 int new_size = b->yy_buf_size * 2;
1145 if ( new_size <= 0 )
1146 b->yy_buf_size += b->yy_buf_size / 8;
1147 else
1148 b->yy_buf_size *= 2;
1150 b->yy_ch_buf = (char *)
1151 /* Include room in for 2 EOB chars. */
1152 xlu__cfg_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
1154 else
1155 /* Can't grow it, we don't own it. */
1156 b->yy_ch_buf = 0;
1158 if ( ! b->yy_ch_buf )
1159 YY_FATAL_ERROR(
1160 "fatal error - scanner input buffer overflow" );
1162 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1164 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1165 number_to_move - 1;
1169 if ( num_to_read > YY_READ_BUF_SIZE )
1170 num_to_read = YY_READ_BUF_SIZE;
1172 /* Read in more data. */
1173 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1174 yyg->yy_n_chars, (size_t) num_to_read );
1176 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1179 if ( yyg->yy_n_chars == 0 )
1181 if ( number_to_move == YY_MORE_ADJ )
1183 ret_val = EOB_ACT_END_OF_FILE;
1184 xlu__cfg_yyrestart(yyin ,yyscanner);
1187 else
1189 ret_val = EOB_ACT_LAST_MATCH;
1190 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1191 YY_BUFFER_EOF_PENDING;
1195 else
1196 ret_val = EOB_ACT_CONTINUE_SCAN;
1198 if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1199 /* Extend the array by 50%, plus the number we really need. */
1200 yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1201 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) xlu__cfg_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
1202 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1203 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1206 yyg->yy_n_chars += number_to_move;
1207 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1208 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1210 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1212 return ret_val;
1215 /* yy_get_previous_state - get the state just before the EOB char was reached */
1217 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1219 register yy_state_type yy_current_state;
1220 register char *yy_cp;
1221 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1223 yy_current_state = yyg->yy_start;
1225 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1227 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1228 if ( yy_accept[yy_current_state] )
1230 yyg->yy_last_accepting_state = yy_current_state;
1231 yyg->yy_last_accepting_cpos = yy_cp;
1233 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1235 yy_current_state = (int) yy_def[yy_current_state];
1236 if ( yy_current_state >= 34 )
1237 yy_c = yy_meta[(unsigned int) yy_c];
1239 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1242 return yy_current_state;
1245 /* yy_try_NUL_trans - try to make a transition on the NUL character
1247 * synopsis
1248 * next_state = yy_try_NUL_trans( current_state );
1249 */
1250 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
1252 register int yy_is_jam;
1253 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
1254 register char *yy_cp = yyg->yy_c_buf_p;
1256 register YY_CHAR yy_c = 1;
1257 if ( yy_accept[yy_current_state] )
1259 yyg->yy_last_accepting_state = yy_current_state;
1260 yyg->yy_last_accepting_cpos = yy_cp;
1262 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1264 yy_current_state = (int) yy_def[yy_current_state];
1265 if ( yy_current_state >= 34 )
1266 yy_c = yy_meta[(unsigned int) yy_c];
1268 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1269 yy_is_jam = (yy_current_state == 33);
1271 return yy_is_jam ? 0 : yy_current_state;
1274 #ifndef YY_NO_INPUT
1275 #ifdef __cplusplus
1276 static int yyinput (yyscan_t yyscanner)
1277 #else
1278 static int input (yyscan_t yyscanner)
1279 #endif
1282 int c;
1283 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1285 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1287 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1289 /* yy_c_buf_p now points to the character we want to return.
1290 * If this occurs *before* the EOB characters, then it's a
1291 * valid NUL; if not, then we've hit the end of the buffer.
1292 */
1293 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1294 /* This was really a NUL. */
1295 *yyg->yy_c_buf_p = '\0';
1297 else
1298 { /* need more input */
1299 int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
1300 ++yyg->yy_c_buf_p;
1302 switch ( yy_get_next_buffer( yyscanner ) )
1304 case EOB_ACT_LAST_MATCH:
1305 /* This happens because yy_g_n_b()
1306 * sees that we've accumulated a
1307 * token and flags that we need to
1308 * try matching the token before
1309 * proceeding. But for input(),
1310 * there's no matching to consider.
1311 * So convert the EOB_ACT_LAST_MATCH
1312 * to EOB_ACT_END_OF_FILE.
1313 */
1315 /* Reset buffer status. */
1316 xlu__cfg_yyrestart(yyin ,yyscanner);
1318 /*FALLTHROUGH*/
1320 case EOB_ACT_END_OF_FILE:
1322 if ( xlu__cfg_yywrap(yyscanner ) )
1323 return EOF;
1325 if ( ! yyg->yy_did_buffer_switch_on_eof )
1326 YY_NEW_FILE;
1327 #ifdef __cplusplus
1328 return yyinput(yyscanner);
1329 #else
1330 return input(yyscanner);
1331 #endif
1334 case EOB_ACT_CONTINUE_SCAN:
1335 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
1336 break;
1341 c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
1342 *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
1343 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
1345 if ( c == '\n' )
1347 do{ yylineno++;
1348 yycolumn=0;
1349 }while(0)
1352 return c;
1354 #endif /* ifndef YY_NO_INPUT */
1356 /** Immediately switch to a different input stream.
1357 * @param input_file A readable stream.
1358 * @param yyscanner The scanner object.
1359 * @note This function does not reset the start condition to @c INITIAL .
1360 */
1361 void xlu__cfg_yyrestart (FILE * input_file , yyscan_t yyscanner)
1363 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1365 if ( ! YY_CURRENT_BUFFER ){
1366 xlu__cfg_yyensure_buffer_stack (yyscanner);
1367 YY_CURRENT_BUFFER_LVALUE =
1368 xlu__cfg_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1371 xlu__cfg_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
1372 xlu__cfg_yy_load_buffer_state(yyscanner );
1375 /** Switch to a different input buffer.
1376 * @param new_buffer The new input buffer.
1377 * @param yyscanner The scanner object.
1378 */
1379 void xlu__cfg_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1381 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1383 /* TODO. We should be able to replace this entire function body
1384 * with
1385 * xlu__cfg_yypop_buffer_state();
1386 * xlu__cfg_yypush_buffer_state(new_buffer);
1387 */
1388 xlu__cfg_yyensure_buffer_stack (yyscanner);
1389 if ( YY_CURRENT_BUFFER == new_buffer )
1390 return;
1392 if ( YY_CURRENT_BUFFER )
1394 /* Flush out information for old buffer. */
1395 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1396 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1397 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1400 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1401 xlu__cfg_yy_load_buffer_state(yyscanner );
1403 /* We don't actually know whether we did this switch during
1404 * EOF (xlu__cfg_yywrap()) processing, but the only time this flag
1405 * is looked at is after xlu__cfg_yywrap() is called, so it's safe
1406 * to go ahead and always set it.
1407 */
1408 yyg->yy_did_buffer_switch_on_eof = 1;
1411 static void xlu__cfg_yy_load_buffer_state (yyscan_t yyscanner)
1413 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1414 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1415 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1416 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1417 yyg->yy_hold_char = *yyg->yy_c_buf_p;
1420 /** Allocate and initialize an input buffer state.
1421 * @param file A readable stream.
1422 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1423 * @param yyscanner The scanner object.
1424 * @return the allocated buffer state.
1425 */
1426 YY_BUFFER_STATE xlu__cfg_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
1428 YY_BUFFER_STATE b;
1430 b = (YY_BUFFER_STATE) xlu__cfg_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
1431 if ( ! b )
1432 YY_FATAL_ERROR( "out of dynamic memory in xlu__cfg_yy_create_buffer()" );
1434 b->yy_buf_size = size;
1436 /* yy_ch_buf has to be 2 characters longer than the size given because
1437 * we need to put in 2 end-of-buffer characters.
1438 */
1439 b->yy_ch_buf = (char *) xlu__cfg_yyalloc(b->yy_buf_size + 2 ,yyscanner );
1440 if ( ! b->yy_ch_buf )
1441 YY_FATAL_ERROR( "out of dynamic memory in xlu__cfg_yy_create_buffer()" );
1443 b->yy_is_our_buffer = 1;
1445 xlu__cfg_yy_init_buffer(b,file ,yyscanner);
1447 return b;
1450 /** Destroy the buffer.
1451 * @param b a buffer created with xlu__cfg_yy_create_buffer()
1452 * @param yyscanner The scanner object.
1453 */
1454 void xlu__cfg_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1456 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1458 if ( ! b )
1459 return;
1461 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1462 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1464 if ( b->yy_is_our_buffer )
1465 xlu__cfg_yyfree((void *) b->yy_ch_buf ,yyscanner );
1467 xlu__cfg_yyfree((void *) b ,yyscanner );
1470 #ifndef __cplusplus
1471 extern int isatty (int );
1472 #endif /* __cplusplus */
1474 /* Initializes or reinitializes a buffer.
1475 * This function is sometimes called more than once on the same buffer,
1476 * such as during a xlu__cfg_yyrestart() or at EOF.
1477 */
1478 static void xlu__cfg_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
1481 int oerrno = errno;
1482 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1484 xlu__cfg_yy_flush_buffer(b ,yyscanner);
1486 b->yy_input_file = file;
1487 b->yy_fill_buffer = 1;
1489 /* If b is the current buffer, then xlu__cfg_yy_init_buffer was _probably_
1490 * called from xlu__cfg_yyrestart() or through yy_get_next_buffer.
1491 * In that case, we don't want to reset the lineno or column.
1492 */
1493 if (b != YY_CURRENT_BUFFER){
1494 b->yy_bs_lineno = 1;
1495 b->yy_bs_column = 0;
1498 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1500 errno = oerrno;
1503 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1504 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1505 * @param yyscanner The scanner object.
1506 */
1507 void xlu__cfg_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
1509 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1510 if ( ! b )
1511 return;
1513 b->yy_n_chars = 0;
1515 /* We always need two end-of-buffer characters. The first causes
1516 * a transition to the end-of-buffer state. The second causes
1517 * a jam in that state.
1518 */
1519 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1520 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1522 b->yy_buf_pos = &b->yy_ch_buf[0];
1524 b->yy_at_bol = 1;
1525 b->yy_buffer_status = YY_BUFFER_NEW;
1527 if ( b == YY_CURRENT_BUFFER )
1528 xlu__cfg_yy_load_buffer_state(yyscanner );
1531 /** Pushes the new state onto the stack. The new state becomes
1532 * the current state. This function will allocate the stack
1533 * if necessary.
1534 * @param new_buffer The new state.
1535 * @param yyscanner The scanner object.
1536 */
1537 void xlu__cfg_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
1539 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1540 if (new_buffer == NULL)
1541 return;
1543 xlu__cfg_yyensure_buffer_stack(yyscanner);
1545 /* This block is copied from xlu__cfg_yy_switch_to_buffer. */
1546 if ( YY_CURRENT_BUFFER )
1548 /* Flush out information for old buffer. */
1549 *yyg->yy_c_buf_p = yyg->yy_hold_char;
1550 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
1551 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1554 /* Only push if top exists. Otherwise, replace top. */
1555 if (YY_CURRENT_BUFFER)
1556 yyg->yy_buffer_stack_top++;
1557 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1559 /* copied from xlu__cfg_yy_switch_to_buffer. */
1560 xlu__cfg_yy_load_buffer_state(yyscanner );
1561 yyg->yy_did_buffer_switch_on_eof = 1;
1564 /** Removes and deletes the top of the stack, if present.
1565 * The next element becomes the new top.
1566 * @param yyscanner The scanner object.
1567 */
1568 void xlu__cfg_yypop_buffer_state (yyscan_t yyscanner)
1570 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1571 if (!YY_CURRENT_BUFFER)
1572 return;
1574 xlu__cfg_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
1575 YY_CURRENT_BUFFER_LVALUE = NULL;
1576 if (yyg->yy_buffer_stack_top > 0)
1577 --yyg->yy_buffer_stack_top;
1579 if (YY_CURRENT_BUFFER) {
1580 xlu__cfg_yy_load_buffer_state(yyscanner );
1581 yyg->yy_did_buffer_switch_on_eof = 1;
1585 /* Allocates the stack if it does not exist.
1586 * Guarantees space for at least one push.
1587 */
1588 static void xlu__cfg_yyensure_buffer_stack (yyscan_t yyscanner)
1590 int num_to_alloc;
1591 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1593 if (!yyg->yy_buffer_stack) {
1595 /* First allocation is just for 2 elements, since we don't know if this
1596 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1597 * immediate realloc on the next call.
1598 */
1599 num_to_alloc = 1;
1600 yyg->yy_buffer_stack = (struct yy_buffer_state**)xlu__cfg_yyalloc
1601 (num_to_alloc * sizeof(struct yy_buffer_state*)
1602 , yyscanner);
1603 if ( ! yyg->yy_buffer_stack )
1604 YY_FATAL_ERROR( "out of dynamic memory in xlu__cfg_yyensure_buffer_stack()" );
1606 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1608 yyg->yy_buffer_stack_max = num_to_alloc;
1609 yyg->yy_buffer_stack_top = 0;
1610 return;
1613 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
1615 /* Increase the buffer to prepare for a possible push. */
1616 int grow_size = 8 /* arbitrary grow size */;
1618 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
1619 yyg->yy_buffer_stack = (struct yy_buffer_state**)xlu__cfg_yyrealloc
1620 (yyg->yy_buffer_stack,
1621 num_to_alloc * sizeof(struct yy_buffer_state*)
1622 , yyscanner);
1623 if ( ! yyg->yy_buffer_stack )
1624 YY_FATAL_ERROR( "out of dynamic memory in xlu__cfg_yyensure_buffer_stack()" );
1626 /* zero only the new slots.*/
1627 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
1628 yyg->yy_buffer_stack_max = num_to_alloc;
1632 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1633 * @param base the character buffer
1634 * @param size the size in bytes of the character buffer
1635 * @param yyscanner The scanner object.
1636 * @return the newly allocated buffer state object.
1637 */
1638 YY_BUFFER_STATE xlu__cfg_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
1640 YY_BUFFER_STATE b;
1642 if ( size < 2 ||
1643 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1644 base[size-1] != YY_END_OF_BUFFER_CHAR )
1645 /* They forgot to leave room for the EOB's. */
1646 return 0;
1648 b = (YY_BUFFER_STATE) xlu__cfg_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
1649 if ( ! b )
1650 YY_FATAL_ERROR( "out of dynamic memory in xlu__cfg_yy_scan_buffer()" );
1652 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1653 b->yy_buf_pos = b->yy_ch_buf = base;
1654 b->yy_is_our_buffer = 0;
1655 b->yy_input_file = 0;
1656 b->yy_n_chars = b->yy_buf_size;
1657 b->yy_is_interactive = 0;
1658 b->yy_at_bol = 1;
1659 b->yy_fill_buffer = 0;
1660 b->yy_buffer_status = YY_BUFFER_NEW;
1662 xlu__cfg_yy_switch_to_buffer(b ,yyscanner );
1664 return b;
1667 /** Setup the input buffer state to scan a string. The next call to xlu__cfg_yylex() will
1668 * scan from a @e copy of @a str.
1669 * @param yystr a NUL-terminated string to scan
1670 * @param yyscanner The scanner object.
1671 * @return the newly allocated buffer state object.
1672 * @note If you want to scan bytes that may contain NUL values, then use
1673 * xlu__cfg_yy_scan_bytes() instead.
1674 */
1675 YY_BUFFER_STATE xlu__cfg_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
1678 return xlu__cfg_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
1681 /** Setup the input buffer state to scan the given bytes. The next call to xlu__cfg_yylex() will
1682 * scan from a @e copy of @a bytes.
1683 * @param yybytes the byte buffer to scan
1684 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1685 * @param yyscanner The scanner object.
1686 * @return the newly allocated buffer state object.
1687 */
1688 YY_BUFFER_STATE xlu__cfg_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
1690 YY_BUFFER_STATE b;
1691 char *buf;
1692 yy_size_t n;
1693 int i;
1695 /* Get memory for full buffer, including space for trailing EOB's. */
1696 n = _yybytes_len + 2;
1697 buf = (char *) xlu__cfg_yyalloc(n ,yyscanner );
1698 if ( ! buf )
1699 YY_FATAL_ERROR( "out of dynamic memory in xlu__cfg_yy_scan_bytes()" );
1701 for ( i = 0; i < _yybytes_len; ++i )
1702 buf[i] = yybytes[i];
1704 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1706 b = xlu__cfg_yy_scan_buffer(buf,n ,yyscanner);
1707 if ( ! b )
1708 YY_FATAL_ERROR( "bad buffer in xlu__cfg_yy_scan_bytes()" );
1710 /* It's okay to grow etc. this buffer, and we should throw it
1711 * away when we're done.
1712 */
1713 b->yy_is_our_buffer = 1;
1715 return b;
1718 #ifndef YY_EXIT_FAILURE
1719 #define YY_EXIT_FAILURE 2
1720 #endif
1722 static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
1724 (void) fprintf( stderr, "%s\n", msg );
1725 exit( YY_EXIT_FAILURE );
1728 /* Redefine yyless() so it works in section 3 code. */
1730 #undef yyless
1731 #define yyless(n) \
1732 do \
1733 { \
1734 /* Undo effects of setting up yytext. */ \
1735 int yyless_macro_arg = (n); \
1736 YY_LESS_LINENO(yyless_macro_arg);\
1737 yytext[yyleng] = yyg->yy_hold_char; \
1738 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
1739 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
1740 *yyg->yy_c_buf_p = '\0'; \
1741 yyleng = yyless_macro_arg; \
1742 } \
1743 while ( 0 )
1745 /* Accessor methods (get/set functions) to struct members. */
1747 /** Get the user-defined data for this scanner.
1748 * @param yyscanner The scanner object.
1749 */
1750 YY_EXTRA_TYPE xlu__cfg_yyget_extra (yyscan_t yyscanner)
1752 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1753 return yyextra;
1756 /** Get the current line number.
1757 * @param yyscanner The scanner object.
1758 */
1759 int xlu__cfg_yyget_lineno (yyscan_t yyscanner)
1761 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1763 if (! YY_CURRENT_BUFFER)
1764 return 0;
1766 return yylineno;
1769 /** Get the current column number.
1770 * @param yyscanner The scanner object.
1771 */
1772 int xlu__cfg_yyget_column (yyscan_t yyscanner)
1774 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1776 if (! YY_CURRENT_BUFFER)
1777 return 0;
1779 return yycolumn;
1782 /** Get the input stream.
1783 * @param yyscanner The scanner object.
1784 */
1785 FILE *xlu__cfg_yyget_in (yyscan_t yyscanner)
1787 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1788 return yyin;
1791 /** Get the output stream.
1792 * @param yyscanner The scanner object.
1793 */
1794 FILE *xlu__cfg_yyget_out (yyscan_t yyscanner)
1796 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1797 return yyout;
1800 /** Get the length of the current token.
1801 * @param yyscanner The scanner object.
1802 */
1803 int xlu__cfg_yyget_leng (yyscan_t yyscanner)
1805 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1806 return yyleng;
1809 /** Get the current token.
1810 * @param yyscanner The scanner object.
1811 */
1813 char *xlu__cfg_yyget_text (yyscan_t yyscanner)
1815 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1816 return yytext;
1819 /** Set the user-defined data. This data is never touched by the scanner.
1820 * @param user_defined The data to be associated with this scanner.
1821 * @param yyscanner The scanner object.
1822 */
1823 void xlu__cfg_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
1825 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1826 yyextra = user_defined ;
1829 /** Set the current line number.
1830 * @param line_number
1831 * @param yyscanner The scanner object.
1832 */
1833 void xlu__cfg_yyset_lineno (int line_number , yyscan_t yyscanner)
1835 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1837 /* lineno is only valid if an input buffer exists. */
1838 if (! YY_CURRENT_BUFFER )
1839 yy_fatal_error( "xlu__cfg_yyset_lineno called with no buffer" , yyscanner);
1841 yylineno = line_number;
1844 /** Set the current column.
1845 * @param line_number
1846 * @param yyscanner The scanner object.
1847 */
1848 void xlu__cfg_yyset_column (int column_no , yyscan_t yyscanner)
1850 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1852 /* column is only valid if an input buffer exists. */
1853 if (! YY_CURRENT_BUFFER )
1854 yy_fatal_error( "xlu__cfg_yyset_column called with no buffer" , yyscanner);
1856 yycolumn = column_no;
1859 /** Set the input stream. This does not discard the current
1860 * input buffer.
1861 * @param in_str A readable stream.
1862 * @param yyscanner The scanner object.
1863 * @see xlu__cfg_yy_switch_to_buffer
1864 */
1865 void xlu__cfg_yyset_in (FILE * in_str , yyscan_t yyscanner)
1867 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1868 yyin = in_str ;
1871 void xlu__cfg_yyset_out (FILE * out_str , yyscan_t yyscanner)
1873 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1874 yyout = out_str ;
1877 int xlu__cfg_yyget_debug (yyscan_t yyscanner)
1879 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1880 return yy_flex_debug;
1883 void xlu__cfg_yyset_debug (int bdebug , yyscan_t yyscanner)
1885 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1886 yy_flex_debug = bdebug ;
1889 /* Accessor methods for yylval and yylloc */
1891 YYSTYPE * xlu__cfg_yyget_lval (yyscan_t yyscanner)
1893 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1894 return yylval;
1897 void xlu__cfg_yyset_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
1899 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1900 yylval = yylval_param;
1903 YYLTYPE *xlu__cfg_yyget_lloc (yyscan_t yyscanner)
1905 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1906 return yylloc;
1909 void xlu__cfg_yyset_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
1911 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1912 yylloc = yylloc_param;
1915 /* User-visible API */
1917 /* xlu__cfg_yylex_init is special because it creates the scanner itself, so it is
1918 * the ONLY reentrant function that doesn't take the scanner as the last argument.
1919 * That's why we explicitly handle the declaration, instead of using our macros.
1920 */
1922 int xlu__cfg_yylex_init(yyscan_t* ptr_yy_globals)
1925 if (ptr_yy_globals == NULL){
1926 errno = EINVAL;
1927 return 1;
1930 *ptr_yy_globals = (yyscan_t) xlu__cfg_yyalloc ( sizeof( struct yyguts_t ), NULL );
1932 if (*ptr_yy_globals == NULL){
1933 errno = ENOMEM;
1934 return 1;
1937 /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
1938 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
1940 return yy_init_globals ( *ptr_yy_globals );
1943 /* xlu__cfg_yylex_init_extra has the same functionality as xlu__cfg_yylex_init, but follows the
1944 * convention of taking the scanner as the last argument. Note however, that
1945 * this is a *pointer* to a scanner, as it will be allocated by this call (and
1946 * is the reason, too, why this function also must handle its own declaration).
1947 * The user defined value in the first argument will be available to xlu__cfg_yyalloc in
1948 * the yyextra field.
1949 */
1951 int xlu__cfg_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
1954 struct yyguts_t dummy_yyguts;
1956 xlu__cfg_yyset_extra (yy_user_defined, &dummy_yyguts);
1958 if (ptr_yy_globals == NULL){
1959 errno = EINVAL;
1960 return 1;
1963 *ptr_yy_globals = (yyscan_t) xlu__cfg_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
1965 if (*ptr_yy_globals == NULL){
1966 errno = ENOMEM;
1967 return 1;
1970 /* By setting to 0xAA, we expose bugs in
1971 yy_init_globals. Leave at 0x00 for releases. */
1972 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
1974 xlu__cfg_yyset_extra (yy_user_defined, *ptr_yy_globals);
1976 return yy_init_globals ( *ptr_yy_globals );
1979 static int yy_init_globals (yyscan_t yyscanner)
1981 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1982 /* Initialization is the same as for the non-reentrant scanner.
1983 * This function is called from xlu__cfg_yylex_destroy(), so don't allocate here.
1984 */
1986 yyg->yy_buffer_stack = 0;
1987 yyg->yy_buffer_stack_top = 0;
1988 yyg->yy_buffer_stack_max = 0;
1989 yyg->yy_c_buf_p = (char *) 0;
1990 yyg->yy_init = 0;
1991 yyg->yy_start = 0;
1993 yyg->yy_start_stack_ptr = 0;
1994 yyg->yy_start_stack_depth = 0;
1995 yyg->yy_start_stack = NULL;
1997 /* Defined in main.c */
1998 #ifdef YY_STDINIT
1999 yyin = stdin;
2000 yyout = stdout;
2001 #else
2002 yyin = (FILE *) 0;
2003 yyout = (FILE *) 0;
2004 #endif
2006 /* For future reference: Set errno on error, since we are called by
2007 * xlu__cfg_yylex_init()
2008 */
2009 return 0;
2012 /* xlu__cfg_yylex_destroy is for both reentrant and non-reentrant scanners. */
2013 int xlu__cfg_yylex_destroy (yyscan_t yyscanner)
2015 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2017 /* Pop the buffer stack, destroying each element. */
2018 while(YY_CURRENT_BUFFER){
2019 xlu__cfg_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
2020 YY_CURRENT_BUFFER_LVALUE = NULL;
2021 xlu__cfg_yypop_buffer_state(yyscanner);
2024 /* Destroy the stack itself. */
2025 xlu__cfg_yyfree(yyg->yy_buffer_stack ,yyscanner);
2026 yyg->yy_buffer_stack = NULL;
2028 /* Destroy the start condition stack. */
2029 xlu__cfg_yyfree(yyg->yy_start_stack ,yyscanner );
2030 yyg->yy_start_stack = NULL;
2032 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2033 * xlu__cfg_yylex() is called, initialization will occur. */
2034 yy_init_globals( yyscanner);
2036 /* Destroy the main struct (reentrant only). */
2037 xlu__cfg_yyfree ( yyscanner , yyscanner );
2038 yyscanner = NULL;
2039 return 0;
2042 /*
2043 * Internal utility routines.
2044 */
2046 #ifndef yytext_ptr
2047 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
2049 register int i;
2050 for ( i = 0; i < n; ++i )
2051 s1[i] = s2[i];
2053 #endif
2055 #ifdef YY_NEED_STRLEN
2056 static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
2058 register int n;
2059 for ( n = 0; s[n]; ++n )
2062 return n;
2064 #endif
2066 void *xlu__cfg_yyalloc (yy_size_t size , yyscan_t yyscanner)
2068 return (void *) malloc( size );
2071 void *xlu__cfg_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
2073 /* The cast to (char *) in the following accommodates both
2074 * implementations that use char* generic pointers, and those
2075 * that use void* generic pointers. It works with the latter
2076 * because both ANSI C and C++ allow castless assignment from
2077 * any pointer type to void*, and deal with argument conversions
2078 * as though doing an assignment.
2079 */
2080 return (void *) realloc( (char *) ptr, size );
2083 void xlu__cfg_yyfree (void * ptr , yyscan_t yyscanner)
2085 free( (char *) ptr ); /* see xlu__cfg_yyrealloc() for (char *) cast */
2088 #define YYTABLES_NAME "yytables"
2090 #line 75 "libxlu_cfg_l.l"