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