2 #line 3 "winprefslex.c"
4 #define YY_INT_ALIGNED short int
6 /* A lexical scanner generated by flex */
9 #define YY_FLEX_MAJOR_VERSION 2
10 #define YY_FLEX_MINOR_VERSION 5
11 #define YY_FLEX_SUBMINOR_VERSION 35
12 #if YY_FLEX_SUBMINOR_VERSION > 0
16 /* First, we deal with platform-specific or compiler-specific issues. */
18 /* begin standard C headers. */
24 /* end standard C headers. */
26 /* flex integer type definitions */
31 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
35 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36 * if you want the limit (max/min) macros for int types.
38 #ifndef __STDC_LIMIT_MACROS
39 #define __STDC_LIMIT_MACROS 1
43 typedef int8_t flex_int8_t
;
44 typedef uint8_t flex_uint8_t
;
45 typedef int16_t flex_int16_t
;
46 typedef uint16_t flex_uint16_t
;
47 typedef int32_t flex_int32_t
;
48 typedef uint32_t flex_uint32_t
;
50 typedef signed char flex_int8_t
;
51 typedef short int flex_int16_t
;
52 typedef int flex_int32_t
;
53 typedef unsigned char flex_uint8_t
;
54 typedef unsigned short int flex_uint16_t
;
55 typedef unsigned int flex_uint32_t
;
58 /* Limits of integral types. */
60 #define INT8_MIN (-128)
63 #define INT16_MIN (-32767-1)
66 #define INT32_MIN (-2147483647-1)
69 #define INT8_MAX (127)
72 #define INT16_MAX (32767)
75 #define INT32_MAX (2147483647)
78 #define UINT8_MAX (255U)
81 #define UINT16_MAX (65535U)
84 #define UINT32_MAX (4294967295U)
87 #endif /* ! FLEXINT_H */
91 /* The "const" storage-class-modifier is valid. */
94 #else /* ! __cplusplus */
96 /* C99 requires __STDC__ to be defined as 1. */
97 #if defined (__STDC__)
101 #endif /* defined (__STDC__) */
102 #endif /* ! __cplusplus */
105 #define yyconst const
110 /* Returned upon end-of-file. */
113 /* Promotes a possibly negative, possibly signed char to an unsigned
114 * integer for use as an array index. If the signed char is negative,
115 * we want to instead treat it as an 8-bit unsigned char, hence the
118 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
120 /* Enter a start condition. This macro really ought to take a parameter,
121 * but we do it the disgusting crufty way forced on us by the ()-less
122 * definition of BEGIN.
124 #define BEGIN (yy_start) = 1 + 2 *
126 /* Translate the current start state into a value that can be later handed
127 * to BEGIN to return to the state. The YYSTATE alias is for lex
130 #define YY_START (((yy_start) - 1) / 2)
131 #define YYSTATE YY_START
133 /* Action number for EOF rule of a given start state. */
134 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
136 /* Special action meaning "start processing a new file". */
137 #define YY_NEW_FILE yyrestart(yyin )
139 #define YY_END_OF_BUFFER_CHAR 0
141 /* Size of default input buffer. */
143 #define YY_BUF_SIZE 16384
146 /* The state buf must be large enough to hold one state per character in the main buffer.
148 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
150 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
151 #define YY_TYPEDEF_YY_BUFFER_STATE
152 typedef struct yy_buffer_state
*YY_BUFFER_STATE
;
157 extern FILE *yyin
, *yyout
;
159 #define EOB_ACT_CONTINUE_SCAN 0
160 #define EOB_ACT_END_OF_FILE 1
161 #define EOB_ACT_LAST_MATCH 2
163 /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
164 * access to the local variable yy_act. Since yyless() is a macro, it would break
165 * existing scanners that call yyless() from OUTSIDE yylex.
166 * One obvious solution it to make yy_act a global. I tried that, and saw
167 * a 5% performance hit in a non-yylineno scanner, because yy_act is
168 * normally declared as a register variable-- so it is not worth it.
170 #define YY_LESS_LINENO(n) \
173 for ( yyl = n; yyl < yyleng; ++yyl )\
174 if ( yytext[yyl] == '\n' )\
178 /* Return all but the first "n" matched characters back to the input stream. */
182 /* Undo effects of setting up yytext. */ \
183 int yyless_macro_arg = (n); \
184 YY_LESS_LINENO(yyless_macro_arg);\
185 *yy_cp = (yy_hold_char); \
186 YY_RESTORE_YY_MORE_OFFSET \
187 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
188 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
192 #define unput(c) yyunput( c, (yytext_ptr) )
194 #ifndef YY_TYPEDEF_YY_SIZE_T
195 #define YY_TYPEDEF_YY_SIZE_T
196 typedef size_t yy_size_t
;
199 #ifndef YY_STRUCT_YY_BUFFER_STATE
200 #define YY_STRUCT_YY_BUFFER_STATE
201 struct yy_buffer_state
205 char *yy_ch_buf
; /* input buffer */
206 char *yy_buf_pos
; /* current position in input buffer */
208 /* Size of input buffer in bytes, not including room for EOB
211 yy_size_t yy_buf_size
;
213 /* Number of characters read into yy_ch_buf, not including EOB
218 /* Whether we "own" the buffer - i.e., we know we created it,
219 * and can realloc() it to grow it, and should free() it to
222 int yy_is_our_buffer
;
224 /* Whether this is an "interactive" input source; if so, and
225 * if we're using stdio for input, then we want to use getc()
226 * instead of fread(), to make sure we stop fetching input after
229 int yy_is_interactive
;
231 /* Whether we're considered to be at the beginning of a line.
232 * If so, '^' rules will be active on the next match, otherwise
237 int yy_bs_lineno
; /**< The line count. */
238 int yy_bs_column
; /**< The column count. */
240 /* Whether to try to fill the input buffer when we reach the
245 int yy_buffer_status
;
247 #define YY_BUFFER_NEW 0
248 #define YY_BUFFER_NORMAL 1
249 /* When an EOF's been seen but there's still some text to process
250 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
251 * shouldn't try reading from the input source any more. We might
252 * still have a bunch of tokens to match, though, because of
253 * possible backing-up.
255 * When we actually see the EOF, we change the status to "new"
256 * (via yyrestart()), so that the user can continue scanning by
257 * just pointing yyin at a new input file.
259 #define YY_BUFFER_EOF_PENDING 2
262 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
264 /* Stack of input buffers. */
265 static size_t yy_buffer_stack_top
= 0; /**< index of top of stack. */
266 static size_t yy_buffer_stack_max
= 0; /**< capacity of stack. */
267 static YY_BUFFER_STATE
* yy_buffer_stack
= 0; /**< Stack as an array. */
269 /* We provide macros for accessing buffer states in case in the
270 * future we want to put the buffer states in a more general
273 * Returns the top of the stack, or NULL.
275 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
276 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
279 /* Same as previous macro, but useful when we know that the buffer stack is not
280 * NULL or when we need an lvalue. For internal use only.
282 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
284 /* yy_hold_char holds the character lost when yytext is formed. */
285 static char yy_hold_char
;
286 static int yy_n_chars
; /* number of characters read into yy_ch_buf */
289 /* Points to current character in buffer. */
290 static char *yy_c_buf_p
= (char *) 0;
291 static int yy_init
= 0; /* whether we need to initialize */
292 static int yy_start
= 0; /* start state number */
294 /* Flag which is used to allow yywrap()'s to do buffer switches
295 * instead of setting up a fresh yyin. A bit of a hack ...
297 static int yy_did_buffer_switch_on_eof
;
299 void yyrestart (FILE *input_file
);
300 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer
);
301 YY_BUFFER_STATE
yy_create_buffer (FILE *file
,int size
);
302 void yy_delete_buffer (YY_BUFFER_STATE b
);
303 void yy_flush_buffer (YY_BUFFER_STATE b
);
304 void yypush_buffer_state (YY_BUFFER_STATE new_buffer
);
305 void yypop_buffer_state (void );
307 static void yyensure_buffer_stack (void );
308 static void yy_load_buffer_state (void );
309 static void yy_init_buffer (YY_BUFFER_STATE b
,FILE *file
);
311 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
313 YY_BUFFER_STATE
yy_scan_buffer (char *base
,yy_size_t size
);
314 YY_BUFFER_STATE
yy_scan_string (yyconst
char *yy_str
);
315 YY_BUFFER_STATE
yy_scan_bytes (yyconst
char *bytes
,int len
);
317 void *yyalloc (yy_size_t
);
318 void *yyrealloc (void *,yy_size_t
);
319 void yyfree (void * );
321 #define yy_new_buffer yy_create_buffer
323 #define yy_set_interactive(is_interactive) \
325 if ( ! YY_CURRENT_BUFFER ){ \
326 yyensure_buffer_stack (); \
327 YY_CURRENT_BUFFER_LVALUE = \
328 yy_create_buffer(yyin,YY_BUF_SIZE ); \
330 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
333 #define yy_set_bol(at_bol) \
335 if ( ! YY_CURRENT_BUFFER ){\
336 yyensure_buffer_stack (); \
337 YY_CURRENT_BUFFER_LVALUE = \
338 yy_create_buffer(yyin,YY_BUF_SIZE ); \
340 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
343 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
345 /* Begin user sect3 */
347 typedef unsigned char YY_CHAR
;
349 FILE *yyin
= (FILE *) 0, *yyout
= (FILE *) 0;
351 typedef int yy_state_type
;
358 #define yytext_ptr yytext
360 static yy_state_type
yy_get_previous_state (void );
361 static yy_state_type
yy_try_NUL_trans (yy_state_type current_state
);
362 static int yy_get_next_buffer (void );
363 static void yy_fatal_error (yyconst
char msg
[] );
365 /* Done after the current pattern has been matched and before the
366 * corresponding action - sets up yytext.
368 #define YY_DO_BEFORE_ACTION \
369 (yytext_ptr) = yy_bp; \
370 yyleng = (size_t) (yy_cp - yy_bp); \
371 (yy_hold_char) = *yy_cp; \
373 (yy_c_buf_p) = yy_cp;
375 #define YY_NUM_RULES 33
376 #define YY_END_OF_BUFFER 34
377 /* This struct is not used in this scanner,
378 but its presence is necessary. */
381 flex_int32_t yy_verify
;
384 static yyconst flex_int16_t yy_accept
[186] =
386 0, 0, 34, 32, 4, 3, 32, 32, 32, 32,
387 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
388 29, 30, 32, 4, 32, 0, 32, 0, 1, 1,
389 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
390 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
391 31, 31, 32, 0, 2, 2, 32, 32, 32, 32,
392 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
393 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
394 32, 32, 32, 32, 23, 32, 32, 5, 32, 32,
395 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
397 32, 22, 32, 32, 25, 32, 32, 8, 32, 32,
398 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
399 32, 32, 32, 13, 32, 32, 32, 32, 32, 32,
400 32, 26, 32, 32, 32, 9, 32, 32, 32, 32,
401 21, 32, 32, 32, 32, 16, 14, 15, 32, 32,
402 32, 19, 10, 32, 32, 32, 32, 32, 11, 12,
403 17, 32, 32, 27, 32, 32, 32, 32, 20, 32,
404 32, 32, 32, 32, 28, 24, 7, 32, 32, 32,
408 static yyconst flex_int32_t yy_ec
[256] =
410 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
411 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
412 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
413 1, 2, 1, 5, 6, 1, 1, 1, 1, 1,
414 1, 1, 1, 1, 1, 1, 7, 1, 1, 1,
415 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
416 1, 1, 1, 1, 8, 9, 10, 11, 12, 13,
417 14, 1, 15, 1, 1, 16, 17, 18, 19, 20,
418 1, 21, 22, 23, 24, 1, 25, 26, 27, 28,
419 1, 1, 1, 1, 1, 1, 29, 30, 31, 32,
421 33, 34, 35, 1, 36, 1, 1, 37, 38, 39,
422 40, 41, 1, 42, 43, 44, 45, 1, 46, 47,
423 48, 49, 50, 1, 51, 1, 1, 1, 1, 1,
424 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
425 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
426 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
427 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
428 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
429 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
430 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
432 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
433 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
434 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
435 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
436 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
440 static yyconst flex_int32_t yy_meta
[52] =
442 1, 2, 3, 3, 1, 1, 1, 1, 1, 1,
443 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
444 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
445 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
446 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
450 static yyconst flex_int16_t yy_base
[193] =
452 0, 0, 373, 0, 370, 403, 50, 54, 363, 37,
453 35, 47, 35, 52, 55, 45, 41, 54, 83, 50,
454 0, 0, 0, 367, 74, 362, 97, 74, 403, 93,
455 100, 43, 93, 49, 98, 96, 90, 86, 95, 96,
456 124, 94, 102, 101, 101, 106, 96, 102, 105, 132,
457 0, 403, 146, 148, 403, 150, 147, 138, 134, 136,
458 136, 154, 153, 146, 150, 142, 152, 148, 155, 155,
459 153, 150, 166, 163, 163, 165, 172, 170, 171, 188,
460 193, 183, 190, 181, 0, 195, 190, 0, 191, 201,
461 188, 197, 205, 197, 194, 198, 209, 212, 212, 224,
463 218, 0, 220, 226, 0, 228, 231, 0, 232, 233,
464 232, 234, 233, 242, 242, 247, 233, 235, 240, 237,
465 253, 247, 250, 0, 258, 261, 255, 257, 274, 276,
466 277, 0, 272, 268, 280, 0, 269, 272, 277, 279,
467 0, 283, 287, 288, 289, 0, 0, 0, 284, 296,
468 297, 0, 0, 306, 302, 317, 301, 320, 0, 0,
469 0, 310, 317, 0, 314, 315, 313, 314, 0, 315,
470 319, 322, 324, 323, 0, 0, 0, 331, 326, 332,
471 330, 341, 0, 0, 403, 365, 386, 388, 391, 393,
476 static yyconst flex_int16_t yy_def
[193] =
478 185, 1, 185, 186, 185, 185, 187, 188, 186, 186,
479 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
480 186, 186, 186, 185, 187, 189, 188, 190, 185, 190,
481 191, 186, 186, 186, 186, 186, 186, 186, 186, 186,
482 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
483 186, 185, 191, 192, 185, 192, 186, 186, 186, 186,
484 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
485 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
486 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
487 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
489 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
490 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
491 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
492 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
493 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
494 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
495 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
496 186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
497 186, 186, 186, 186, 0, 185, 185, 185, 185, 185,
502 static yyconst flex_int16_t yy_nxt
[455] =
504 4, 5, 6, 6, 7, 8, 9, 10, 11, 4,
505 12, 13, 4, 4, 14, 4, 15, 16, 17, 4,
506 18, 19, 20, 4, 4, 4, 4, 4, 10, 11,
507 4, 12, 13, 4, 4, 14, 4, 15, 16, 17,
508 4, 18, 19, 20, 4, 4, 4, 4, 4, 21,
509 22, 26, 32, 34, 23, 28, 29, 30, 35, 33,
510 36, 37, 38, 41, 42, 43, 39, 57, 49, 40,
511 50, 60, 44, 32, 34, 26, 29, 30, 51, 35,
512 33, 36, 37, 38, 41, 42, 43, 39, 57, 49,
513 40, 50, 60, 44, 45, 29, 30, 46, 28, 29,
515 30, 54, 55, 56, 58, 47, 61, 63, 64, 48,
516 62, 65, 66, 67, 59, 45, 70, 71, 46, 72,
517 73, 74, 75, 76, 77, 58, 47, 61, 63, 64,
518 48, 62, 65, 66, 67, 59, 68, 70, 71, 78,
519 72, 73, 74, 75, 76, 77, 69, 54, 55, 56,
520 55, 56, 55, 56, 79, 80, 81, 68, 82, 83,
521 78, 84, 85, 86, 87, 88, 89, 69, 90, 91,
522 92, 93, 94, 95, 96, 79, 80, 81, 97, 82,
523 83, 98, 84, 85, 86, 87, 88, 89, 99, 90,
524 91, 92, 93, 94, 95, 96, 100, 101, 102, 97,
526 103, 104, 98, 105, 106, 107, 109, 110, 111, 99,
527 112, 113, 114, 115, 116, 117, 108, 100, 101, 102,
528 118, 103, 104, 119, 105, 106, 107, 109, 110, 111,
529 120, 112, 113, 114, 115, 116, 117, 108, 121, 122,
530 123, 118, 124, 125, 119, 126, 127, 128, 129, 130,
531 131, 120, 132, 133, 134, 135, 136, 137, 138, 121,
532 122, 123, 139, 124, 125, 140, 126, 127, 128, 129,
533 130, 131, 141, 132, 133, 134, 135, 136, 137, 138,
534 142, 143, 144, 139, 145, 146, 140, 147, 148, 149,
535 150, 151, 152, 141, 153, 154, 155, 156, 158, 159,
537 160, 142, 143, 144, 157, 145, 146, 161, 147, 148,
538 149, 150, 151, 152, 162, 153, 154, 155, 156, 158,
539 159, 160, 163, 164, 165, 157, 166, 167, 161, 168,
540 169, 170, 171, 172, 173, 162, 174, 175, 176, 177,
541 178, 179, 180, 163, 164, 165, 181, 166, 167, 182,
542 168, 169, 170, 171, 172, 173, 183, 174, 175, 176,
543 177, 178, 179, 180, 184, 23, 52, 181, 24, 31,
544 182, 24, 185, 185, 185, 185, 185, 183, 185, 185,
545 185, 185, 185, 185, 185, 184, 25, 25, 27, 27,
546 27, 26, 26, 28, 28, 28, 53, 53, 53, 54,
548 54, 54, 3, 185, 185, 185, 185, 185, 185, 185,
549 185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
550 185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
551 185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
552 185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
556 static yyconst flex_int16_t yy_chk
[455] =
558 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
559 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
560 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
561 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
562 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
563 1, 7, 10, 11, 7, 8, 8, 8, 12, 10,
564 13, 14, 15, 16, 17, 18, 15, 32, 20, 15,
565 20, 34, 18, 10, 11, 25, 28, 28, 25, 12,
566 10, 13, 14, 15, 16, 17, 18, 15, 32, 20,
567 15, 20, 34, 18, 19, 30, 30, 19, 27, 27,
569 27, 31, 31, 31, 33, 19, 35, 36, 37, 19,
570 35, 38, 39, 40, 33, 19, 42, 43, 19, 44,
571 45, 46, 47, 48, 49, 33, 19, 35, 36, 37,
572 19, 35, 38, 39, 40, 33, 41, 42, 43, 50,
573 44, 45, 46, 47, 48, 49, 41, 53, 53, 53,
574 54, 54, 56, 56, 57, 58, 59, 41, 60, 61,
575 50, 62, 63, 64, 65, 66, 67, 41, 68, 69,
576 70, 71, 72, 73, 74, 57, 58, 59, 75, 60,
577 61, 76, 62, 63, 64, 65, 66, 67, 77, 68,
578 69, 70, 71, 72, 73, 74, 78, 79, 80, 75,
580 81, 82, 76, 83, 84, 86, 87, 89, 90, 77,
581 91, 92, 93, 94, 95, 96, 86, 78, 79, 80,
582 97, 81, 82, 98, 83, 84, 86, 87, 89, 90,
583 99, 91, 92, 93, 94, 95, 96, 86, 100, 101,
584 103, 97, 104, 106, 98, 107, 109, 110, 111, 112,
585 113, 99, 114, 115, 116, 117, 118, 119, 120, 100,
586 101, 103, 121, 104, 106, 122, 107, 109, 110, 111,
587 112, 113, 123, 114, 115, 116, 117, 118, 119, 120,
588 125, 126, 127, 121, 128, 129, 122, 130, 131, 133,
589 134, 135, 137, 123, 138, 139, 140, 142, 143, 144,
591 145, 125, 126, 127, 142, 128, 129, 149, 130, 131,
592 133, 134, 135, 137, 150, 138, 139, 140, 142, 143,
593 144, 145, 151, 154, 155, 142, 156, 157, 149, 158,
594 162, 163, 165, 166, 167, 150, 168, 170, 171, 172,
595 173, 174, 178, 151, 154, 155, 179, 156, 157, 180,
596 158, 162, 163, 165, 166, 167, 181, 168, 170, 171,
597 172, 173, 174, 178, 182, 186, 26, 179, 24, 9,
598 180, 5, 3, 0, 0, 0, 0, 181, 0, 0,
599 0, 0, 0, 0, 0, 182, 187, 187, 188, 188,
600 188, 189, 189, 190, 190, 190, 191, 191, 191, 192,
602 192, 192, 185, 185, 185, 185, 185, 185, 185, 185,
603 185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
604 185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
605 185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
606 185, 185, 185, 185, 185, 185, 185, 185, 185, 185,
610 /* Table of booleans, true if rule could match eol. */
611 static yyconst flex_int32_t yy_rule_can_match_eol
[34] =
613 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
614 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, };
616 static yy_state_type yy_last_accepting_state
;
617 static char *yy_last_accepting_cpos
;
619 extern int yy_flex_debug
;
620 int yy_flex_debug
= 0;
622 /* The intent behind this definition is that it'll catch
623 * any uses of REJECT which flex missed.
625 #define REJECT reject_used_but_not_detected
626 #define yymore() yymore_used_but_not_detected
627 #define YY_MORE_ADJ 0
628 #define YY_RESTORE_YY_MORE_OFFSET
630 #line 1 "winprefslex.l"
631 #line 2 "winprefslex.l"
633 * Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
634 * Copyright (C) Colin Harrison 2005-2008
636 * Permission is hereby granted, free of charge, to any person obtaining
637 * a copy of this software and associated documentation files (the
638 * "Software"), to deal in the Software without restriction, including
639 * without limitation the rights to use, copy, modify, merge, publish,
640 * distribute, sublicense, and/or sell copies of the Software, and to
641 * permit persons to whom the Software is furnished to do so, subject to
642 * the following conditions:
644 * The above copyright notice and this permission notice shall be
645 * included in all copies or substantial portions of the Software.
647 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
648 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
649 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
650 * NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR
651 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
652 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
653 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
655 * Except as contained in this notice, the name of the XFree86 Project
656 * shall not be used in advertising or otherwise to promote the sale, use
657 * or other dealings in this Software without prior written authorization
658 * from the XFree86 Project.
660 * Authors: Earle F. Philhower, III
668 #include "winprefsyacc.h"
670 extern int yyparse(void);
672 extern void ErrorF (const char* /*f*/, ...);
674 /* Copy the parsed string, must be free()d in yacc parser */
675 static char *makestr(char *str
)
678 ptr
= (char*)malloc (strlen(str
)+1);
681 ErrorF ("winMultiWindowLex:makestr() out of memory\n");
688 #define YY_NO_INPUT 1
689 #line 690 "winprefslex.c"
693 #ifndef YY_NO_UNISTD_H
694 /* Special case for "unistd.h", since it is non-ANSI. We include it way
695 * down here because we want the user's section 1 to have been scanned first.
696 * The user has a chance to override it with an option.
701 #ifndef YY_EXTRA_TYPE
702 #define YY_EXTRA_TYPE void *
705 static int yy_init_globals (void );
707 /* Accessor methods to globals.
708 These are made visible to non-reentrant scanners for convenience. */
710 int yylex_destroy (void );
712 int yyget_debug (void );
714 void yyset_debug (int debug_flag
);
716 YY_EXTRA_TYPE
yyget_extra (void );
718 void yyset_extra (YY_EXTRA_TYPE user_defined
);
720 FILE *yyget_in (void );
722 void yyset_in (FILE * in_str
);
724 FILE *yyget_out (void );
726 void yyset_out (FILE * out_str
);
728 int yyget_leng (void );
730 char *yyget_text (void );
732 int yyget_lineno (void );
734 void yyset_lineno (int line_number
);
736 /* Macros after this point can all be overridden by user definitions in
740 #ifndef YY_SKIP_YYWRAP
742 extern "C" int yywrap (void );
744 extern int yywrap (void );
749 static void yy_flex_strncpy (char *,yyconst
char *,int );
752 #ifdef YY_NEED_STRLEN
753 static int yy_flex_strlen (yyconst
char * );
759 static int yyinput (void );
761 static int input (void );
766 /* Amount of stuff to slurp up with each read. */
767 #ifndef YY_READ_BUF_SIZE
768 #define YY_READ_BUF_SIZE 8192
771 /* Copy whatever the last rule matched to the standard output. */
773 /* This used to be an fputs(), but since the string might contain NUL's,
774 * we now use fwrite().
776 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
779 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
780 * is returned in "result".
783 #define YY_INPUT(buf,result,max_size) \
784 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
788 for ( n = 0; n < max_size && \
789 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
792 buf[n++] = (char) c; \
793 if ( c == EOF && ferror( yyin ) ) \
794 YY_FATAL_ERROR( "input in flex scanner failed" ); \
800 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
802 if( errno != EINTR) \
804 YY_FATAL_ERROR( "input in flex scanner failed" ); \
815 /* No semi-colon after return; correct usage is to write "yyterminate();" -
816 * we don't want an extra ';' after the "return" because that will cause
817 * some compilers to complain about unreachable statements.
820 #define yyterminate() return YY_NULL
823 /* Number of entries by which start-condition stack grows. */
824 #ifndef YY_START_STACK_INCR
825 #define YY_START_STACK_INCR 25
828 /* Report a fatal error. */
829 #ifndef YY_FATAL_ERROR
830 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
833 /* end tables serialization structures and prototypes */
835 /* Default declaration of generated scanner - a define so the user can
836 * easily add parameters.
839 #define YY_DECL_IS_OURS 1
841 extern int yylex (void);
843 #define YY_DECL int yylex (void)
844 #endif /* !YY_DECL */
846 /* Code executed at the beginning of each rule, after yytext and yyleng
849 #ifndef YY_USER_ACTION
850 #define YY_USER_ACTION
853 /* Code executed at the end of each rule. */
855 #define YY_BREAK break;
858 #define YY_RULE_SETUP \
861 /** The main scanner function which does all the work.
865 register yy_state_type yy_current_state
;
866 register char *yy_cp
, *yy_bp
;
869 #line 65 "winprefslex.l"
871 #line 872 "winprefslex.c"
882 (yy_start
) = 1; /* first start state */
890 if ( ! YY_CURRENT_BUFFER
) {
891 yyensure_buffer_stack ();
892 YY_CURRENT_BUFFER_LVALUE
=
893 yy_create_buffer(yyin
,YY_BUF_SIZE
);
896 yy_load_buffer_state( );
899 while ( 1 ) /* loops until end-of-file is reached */
901 yy_cp
= (yy_c_buf_p
);
903 /* Support of yytext. */
904 *yy_cp
= (yy_hold_char
);
906 /* yy_bp points to the position in yy_ch_buf of the start of
911 yy_current_state
= (yy_start
);
915 register YY_CHAR yy_c
= yy_ec
[YY_SC_TO_UI(*yy_cp
)];
916 if ( yy_accept
[yy_current_state
] )
918 (yy_last_accepting_state
) = yy_current_state
;
919 (yy_last_accepting_cpos
) = yy_cp
;
921 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
923 yy_current_state
= (int) yy_def
[yy_current_state
];
924 if ( yy_current_state
>= 186 )
925 yy_c
= yy_meta
[(unsigned int) yy_c
];
927 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
930 while ( yy_current_state
!= 185 );
931 yy_cp
= (yy_last_accepting_cpos
);
932 yy_current_state
= (yy_last_accepting_state
);
935 yy_act
= yy_accept
[yy_current_state
];
939 if ( yy_act
!= YY_END_OF_BUFFER
&& yy_rule_can_match_eol
[yy_act
] )
942 for ( yyl
= 0; yyl
< yyleng
; ++yyl
)
943 if ( yytext
[yyl
] == '\n' )
949 do_action
: /* This label is used only to access EOF actions. */
952 { /* beginning of action switch */
953 case 0: /* must back up */
954 /* undo the effects of YY_DO_BEFORE_ACTION */
955 *yy_cp
= (yy_hold_char
);
956 yy_cp
= (yy_last_accepting_cpos
);
957 yy_current_state
= (yy_last_accepting_state
);
961 /* rule 1 can match eol */
963 #line 66 "winprefslex.l"
964 { /* comment */ return NEWLINE
; }
967 /* rule 2 can match eol */
969 #line 67 "winprefslex.l"
970 { /* comment */ return NEWLINE
; }
973 /* rule 3 can match eol */
975 #line 68 "winprefslex.l"
980 #line 69 "winprefslex.l"
981 { /* ignore whitespace */ }
985 #line 70 "winprefslex.l"
990 #line 71 "winprefslex.l"
991 { return ICONDIRECTORY
; }
995 #line 72 "winprefslex.l"
996 { return DEFAULTICON
; }
1000 #line 73 "winprefslex.l"
1005 #line 74 "winprefslex.l"
1010 #line 75 "winprefslex.l"
1015 #line 76 "winprefslex.l"
1016 { return MAXIMIZE
; }
1020 #line 77 "winprefslex.l"
1021 { return MINIMIZE
; }
1025 #line 78 "winprefslex.l"
1030 #line 79 "winprefslex.l"
1035 #line 80 "winprefslex.l"
1040 #line 81 "winprefslex.l"
1045 #line 82 "winprefslex.l"
1046 { return ROOTMENU
; }
1050 #line 83 "winprefslex.l"
1051 { return DEFAULTSYSMENU
; }
1055 #line 84 "winprefslex.l"
1060 #line 85 "winprefslex.l"
1061 { return SEPARATOR
; }
1065 #line 86 "winprefslex.l"
1070 #line 87 "winprefslex.l"
1075 #line 88 "winprefslex.l"
1080 #line 89 "winprefslex.l"
1081 { return ALWAYSONTOP
; }
1085 #line 90 "winprefslex.l"
1086 { return DEBUGOUTPUT
; }
1090 #line 91 "winprefslex.l"
1095 #line 92 "winprefslex.l"
1096 { return TRAYICON
; }
1100 #line 93 "winprefslex.l"
1101 { return SILENTEXIT
; }
1105 #line 94 "winprefslex.l"
1110 #line 95 "winprefslex.l"
1115 #line 96 "winprefslex.l"
1116 { yylval
.sVal
= makestr(yytext
+1); \
1117 yylval
.sVal
[strlen(yylval
.sVal
)-1] = 0; \
1122 #line 99 "winprefslex.l"
1123 { yylval
.sVal
= makestr(yytext
); \
1128 #line 101 "winprefslex.l"
1131 #line 1132 "winprefslex.c"
1132 case YY_STATE_EOF(INITIAL
):
1135 case YY_END_OF_BUFFER
:
1137 /* Amount of text matched not including the EOB char. */
1138 int yy_amount_of_matched_text
= (int) (yy_cp
- (yytext_ptr
)) - 1;
1140 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1141 *yy_cp
= (yy_hold_char
);
1142 YY_RESTORE_YY_MORE_OFFSET
1144 if ( YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
== YY_BUFFER_NEW
)
1146 /* We're scanning a new file or input source. It's
1147 * possible that this happened because the user
1148 * just pointed yyin at a new source and called
1149 * yylex(). If so, then we have to assure
1150 * consistency between YY_CURRENT_BUFFER and our
1151 * globals. Here is the right place to do so, because
1152 * this is the first action (other than possibly a
1153 * back-up) that will match for the new input source.
1155 (yy_n_chars
) = YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
;
1156 YY_CURRENT_BUFFER_LVALUE
->yy_input_file
= yyin
;
1157 YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
= YY_BUFFER_NORMAL
;
1160 /* Note that here we test for yy_c_buf_p "<=" to the position
1161 * of the first EOB in the buffer, since yy_c_buf_p will
1162 * already have been incremented past the NUL character
1163 * (since all states make transitions on EOB to the
1164 * end-of-buffer state). Contrast this with the test
1167 if ( (yy_c_buf_p
) <= &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)] )
1168 { /* This was really a NUL. */
1169 yy_state_type yy_next_state
;
1171 (yy_c_buf_p
) = (yytext_ptr
) + yy_amount_of_matched_text
;
1173 yy_current_state
= yy_get_previous_state( );
1175 /* Okay, we're now positioned to make the NUL
1176 * transition. We couldn't have
1177 * yy_get_previous_state() go ahead and do it
1178 * for us because it doesn't know how to deal
1179 * with the possibility of jamming (and we don't
1180 * want to build jamming into it because then it
1181 * will run more slowly).
1184 yy_next_state
= yy_try_NUL_trans( yy_current_state
);
1186 yy_bp
= (yytext_ptr
) + YY_MORE_ADJ
;
1188 if ( yy_next_state
)
1190 /* Consume the NUL. */
1191 yy_cp
= ++(yy_c_buf_p
);
1192 yy_current_state
= yy_next_state
;
1198 yy_cp
= (yy_last_accepting_cpos
);
1199 yy_current_state
= (yy_last_accepting_state
);
1200 goto yy_find_action
;
1204 else switch ( yy_get_next_buffer( ) )
1206 case EOB_ACT_END_OF_FILE
:
1208 (yy_did_buffer_switch_on_eof
) = 0;
1212 /* Note: because we've taken care in
1213 * yy_get_next_buffer() to have set up
1214 * yytext, we can now set up
1215 * yy_c_buf_p so that if some total
1216 * hoser (like flex itself) wants to
1217 * call the scanner after we return the
1218 * YY_NULL, it'll still work - another
1219 * YY_NULL will get returned.
1221 (yy_c_buf_p
) = (yytext_ptr
) + YY_MORE_ADJ
;
1223 yy_act
= YY_STATE_EOF(YY_START
);
1229 if ( ! (yy_did_buffer_switch_on_eof
) )
1235 case EOB_ACT_CONTINUE_SCAN
:
1237 (yytext_ptr
) + yy_amount_of_matched_text
;
1239 yy_current_state
= yy_get_previous_state( );
1241 yy_cp
= (yy_c_buf_p
);
1242 yy_bp
= (yytext_ptr
) + YY_MORE_ADJ
;
1245 case EOB_ACT_LAST_MATCH
:
1247 &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)];
1249 yy_current_state
= yy_get_previous_state( );
1251 yy_cp
= (yy_c_buf_p
);
1252 yy_bp
= (yytext_ptr
) + YY_MORE_ADJ
;
1253 goto yy_find_action
;
1260 "fatal flex scanner internal error--no action found" );
1261 } /* end of action switch */
1262 } /* end of scanning one token */
1263 } /* end of yylex */
1265 /* yy_get_next_buffer - try to read in a new buffer
1267 * Returns a code representing an action:
1268 * EOB_ACT_LAST_MATCH -
1269 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1270 * EOB_ACT_END_OF_FILE - end of file
1272 static int yy_get_next_buffer (void)
1274 register char *dest
= YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
;
1275 register char *source
= (yytext_ptr
);
1276 register int number_to_move
, i
;
1279 if ( (yy_c_buf_p
) > &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
) + 1] )
1281 "fatal flex scanner internal error--end of buffer missed" );
1283 if ( YY_CURRENT_BUFFER_LVALUE
->yy_fill_buffer
== 0 )
1284 { /* Don't try to fill the buffer, so this is an EOF. */
1285 if ( (yy_c_buf_p
) - (yytext_ptr
) - YY_MORE_ADJ
== 1 )
1287 /* We matched a single character, the EOB, so
1288 * treat this as a final EOF.
1290 return EOB_ACT_END_OF_FILE
;
1295 /* We matched some text prior to the EOB, first
1298 return EOB_ACT_LAST_MATCH
;
1302 /* Try to read more data. */
1304 /* First move last chars to start of buffer. */
1305 number_to_move
= (int) ((yy_c_buf_p
) - (yytext_ptr
)) - 1;
1307 for ( i
= 0; i
< number_to_move
; ++i
)
1308 *(dest
++) = *(source
++);
1310 if ( YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
== YY_BUFFER_EOF_PENDING
)
1311 /* don't do the read, it's not guaranteed to return an EOF,
1314 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
) = 0;
1319 YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
- number_to_move
- 1;
1321 while ( num_to_read
<= 0 )
1322 { /* Not enough room in the buffer - grow it. */
1324 /* just a shorter name for the current buffer */
1325 YY_BUFFER_STATE b
= YY_CURRENT_BUFFER
;
1327 int yy_c_buf_p_offset
=
1328 (int) ((yy_c_buf_p
) - b
->yy_ch_buf
);
1330 if ( b
->yy_is_our_buffer
)
1332 int new_size
= b
->yy_buf_size
* 2;
1334 if ( new_size
<= 0 )
1335 b
->yy_buf_size
+= b
->yy_buf_size
/ 8;
1337 b
->yy_buf_size
*= 2;
1339 b
->yy_ch_buf
= (char *)
1340 /* Include room in for 2 EOB chars. */
1341 yyrealloc((void *) b
->yy_ch_buf
,b
->yy_buf_size
+ 2 );
1344 /* Can't grow it, we don't own it. */
1347 if ( ! b
->yy_ch_buf
)
1349 "fatal error - scanner input buffer overflow" );
1351 (yy_c_buf_p
) = &b
->yy_ch_buf
[yy_c_buf_p_offset
];
1353 num_to_read
= YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
-
1358 if ( num_to_read
> YY_READ_BUF_SIZE
)
1359 num_to_read
= YY_READ_BUF_SIZE
;
1361 /* Read in more data. */
1362 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[number_to_move
]),
1363 (yy_n_chars
), (size_t) num_to_read
);
1365 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
);
1368 if ( (yy_n_chars
) == 0 )
1370 if ( number_to_move
== YY_MORE_ADJ
)
1372 ret_val
= EOB_ACT_END_OF_FILE
;
1378 ret_val
= EOB_ACT_LAST_MATCH
;
1379 YY_CURRENT_BUFFER_LVALUE
->yy_buffer_status
=
1380 YY_BUFFER_EOF_PENDING
;
1385 ret_val
= EOB_ACT_CONTINUE_SCAN
;
1387 if ((yy_size_t
) ((yy_n_chars
) + number_to_move
) > YY_CURRENT_BUFFER_LVALUE
->yy_buf_size
) {
1388 /* Extend the array by 50%, plus the number we really need. */
1389 yy_size_t new_size
= (yy_n_chars
) + number_to_move
+ ((yy_n_chars
) >> 1);
1390 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
= (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
,new_size
);
1391 if ( ! YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
)
1392 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1395 (yy_n_chars
) += number_to_move
;
1396 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)] = YY_END_OF_BUFFER_CHAR
;
1397 YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
) + 1] = YY_END_OF_BUFFER_CHAR
;
1399 (yytext_ptr
) = &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[0];
1404 /* yy_get_previous_state - get the state just before the EOB char was reached */
1406 static yy_state_type
yy_get_previous_state (void)
1408 register yy_state_type yy_current_state
;
1409 register char *yy_cp
;
1411 yy_current_state
= (yy_start
);
1413 for ( yy_cp
= (yytext_ptr
) + YY_MORE_ADJ
; yy_cp
< (yy_c_buf_p
); ++yy_cp
)
1415 register YY_CHAR yy_c
= (*yy_cp
? yy_ec
[YY_SC_TO_UI(*yy_cp
)] : 1);
1416 if ( yy_accept
[yy_current_state
] )
1418 (yy_last_accepting_state
) = yy_current_state
;
1419 (yy_last_accepting_cpos
) = yy_cp
;
1421 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
1423 yy_current_state
= (int) yy_def
[yy_current_state
];
1424 if ( yy_current_state
>= 186 )
1425 yy_c
= yy_meta
[(unsigned int) yy_c
];
1427 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
1430 return yy_current_state
;
1433 /* yy_try_NUL_trans - try to make a transition on the NUL character
1436 * next_state = yy_try_NUL_trans( current_state );
1438 static yy_state_type
yy_try_NUL_trans (yy_state_type yy_current_state
)
1440 register int yy_is_jam
;
1441 register char *yy_cp
= (yy_c_buf_p
);
1443 register YY_CHAR yy_c
= 1;
1444 if ( yy_accept
[yy_current_state
] )
1446 (yy_last_accepting_state
) = yy_current_state
;
1447 (yy_last_accepting_cpos
) = yy_cp
;
1449 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
1451 yy_current_state
= (int) yy_def
[yy_current_state
];
1452 if ( yy_current_state
>= 186 )
1453 yy_c
= yy_meta
[(unsigned int) yy_c
];
1455 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
1456 yy_is_jam
= (yy_current_state
== 185);
1458 return yy_is_jam
? 0 : yy_current_state
;
1463 static int yyinput (void)
1465 static int input (void)
1471 *(yy_c_buf_p
) = (yy_hold_char
);
1473 if ( *(yy_c_buf_p
) == YY_END_OF_BUFFER_CHAR
)
1475 /* yy_c_buf_p now points to the character we want to return.
1476 * If this occurs *before* the EOB characters, then it's a
1477 * valid NUL; if not, then we've hit the end of the buffer.
1479 if ( (yy_c_buf_p
) < &YY_CURRENT_BUFFER_LVALUE
->yy_ch_buf
[(yy_n_chars
)] )
1480 /* This was really a NUL. */
1481 *(yy_c_buf_p
) = '\0';
1484 { /* need more input */
1485 int offset
= (yy_c_buf_p
) - (yytext_ptr
);
1488 switch ( yy_get_next_buffer( ) )
1490 case EOB_ACT_LAST_MATCH
:
1491 /* This happens because yy_g_n_b()
1492 * sees that we've accumulated a
1493 * token and flags that we need to
1494 * try matching the token before
1495 * proceeding. But for input(),
1496 * there's no matching to consider.
1497 * So convert the EOB_ACT_LAST_MATCH
1498 * to EOB_ACT_END_OF_FILE.
1501 /* Reset buffer status. */
1506 case EOB_ACT_END_OF_FILE
:
1511 if ( ! (yy_did_buffer_switch_on_eof
) )
1520 case EOB_ACT_CONTINUE_SCAN
:
1521 (yy_c_buf_p
) = (yytext_ptr
) + offset
;
1527 c
= *(unsigned char *) (yy_c_buf_p
); /* cast for 8-bit char's */
1528 *(yy_c_buf_p
) = '\0'; /* preserve yytext */
1529 (yy_hold_char
) = *++(yy_c_buf_p
);
1538 #endif /* ifndef YY_NO_INPUT */
1540 /** Immediately switch to a different input stream.
1541 * @param input_file A readable stream.
1543 * @note This function does not reset the start condition to @c INITIAL .
1545 void yyrestart (FILE * input_file
)
1548 if ( ! YY_CURRENT_BUFFER
){
1549 yyensure_buffer_stack ();
1550 YY_CURRENT_BUFFER_LVALUE
=
1551 yy_create_buffer(yyin
,YY_BUF_SIZE
);
1554 yy_init_buffer(YY_CURRENT_BUFFER
,input_file
);
1555 yy_load_buffer_state( );
1558 /** Switch to a different input buffer.
1559 * @param new_buffer The new input buffer.
1562 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer
)
1565 /* TODO. We should be able to replace this entire function body
1567 * yypop_buffer_state();
1568 * yypush_buffer_state(new_buffer);
1570 yyensure_buffer_stack ();
1571 if ( YY_CURRENT_BUFFER
== new_buffer
)
1574 if ( YY_CURRENT_BUFFER
)
1576 /* Flush out information for old buffer. */
1577 *(yy_c_buf_p
) = (yy_hold_char
);
1578 YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
= (yy_c_buf_p
);
1579 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
);
1582 YY_CURRENT_BUFFER_LVALUE
= new_buffer
;
1583 yy_load_buffer_state( );
1585 /* We don't actually know whether we did this switch during
1586 * EOF (yywrap()) processing, but the only time this flag
1587 * is looked at is after yywrap() is called, so it's safe
1588 * to go ahead and always set it.
1590 (yy_did_buffer_switch_on_eof
) = 1;
1593 static void yy_load_buffer_state (void)
1595 (yy_n_chars
) = YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
;
1596 (yytext_ptr
) = (yy_c_buf_p
) = YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
;
1597 yyin
= YY_CURRENT_BUFFER_LVALUE
->yy_input_file
;
1598 (yy_hold_char
) = *(yy_c_buf_p
);
1601 /** Allocate and initialize an input buffer state.
1602 * @param file A readable stream.
1603 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1605 * @return the allocated buffer state.
1607 YY_BUFFER_STATE
yy_create_buffer (FILE * file
, int size
)
1611 b
= (YY_BUFFER_STATE
) yyalloc(sizeof( struct yy_buffer_state
) );
1613 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1615 b
->yy_buf_size
= size
;
1617 /* yy_ch_buf has to be 2 characters longer than the size given because
1618 * we need to put in 2 end-of-buffer characters.
1620 b
->yy_ch_buf
= (char *) yyalloc(b
->yy_buf_size
+ 2 );
1621 if ( ! b
->yy_ch_buf
)
1622 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1624 b
->yy_is_our_buffer
= 1;
1626 yy_init_buffer(b
,file
);
1631 /** Destroy the buffer.
1632 * @param b a buffer created with yy_create_buffer()
1635 void yy_delete_buffer (YY_BUFFER_STATE b
)
1641 if ( b
== YY_CURRENT_BUFFER
) /* Not sure if we should pop here. */
1642 YY_CURRENT_BUFFER_LVALUE
= (YY_BUFFER_STATE
) 0;
1644 if ( b
->yy_is_our_buffer
)
1645 yyfree((void *) b
->yy_ch_buf
);
1647 yyfree((void *) b
);
1650 /* Initializes or reinitializes a buffer.
1651 * This function is sometimes called more than once on the same buffer,
1652 * such as during a yyrestart() or at EOF.
1654 static void yy_init_buffer (YY_BUFFER_STATE b
, FILE * file
)
1659 yy_flush_buffer(b
);
1661 b
->yy_input_file
= file
;
1662 b
->yy_fill_buffer
= 1;
1664 /* If b is the current buffer, then yy_init_buffer was _probably_
1665 * called from yyrestart() or through yy_get_next_buffer.
1666 * In that case, we don't want to reset the lineno or column.
1668 if (b
!= YY_CURRENT_BUFFER
){
1669 b
->yy_bs_lineno
= 1;
1670 b
->yy_bs_column
= 0;
1673 b
->yy_is_interactive
= 0;
1678 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1679 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1682 void yy_flush_buffer (YY_BUFFER_STATE b
)
1689 /* We always need two end-of-buffer characters. The first causes
1690 * a transition to the end-of-buffer state. The second causes
1691 * a jam in that state.
1693 b
->yy_ch_buf
[0] = YY_END_OF_BUFFER_CHAR
;
1694 b
->yy_ch_buf
[1] = YY_END_OF_BUFFER_CHAR
;
1696 b
->yy_buf_pos
= &b
->yy_ch_buf
[0];
1699 b
->yy_buffer_status
= YY_BUFFER_NEW
;
1701 if ( b
== YY_CURRENT_BUFFER
)
1702 yy_load_buffer_state( );
1705 /** Pushes the new state onto the stack. The new state becomes
1706 * the current state. This function will allocate the stack
1708 * @param new_buffer The new state.
1711 void yypush_buffer_state (YY_BUFFER_STATE new_buffer
)
1713 if (new_buffer
== NULL
)
1716 yyensure_buffer_stack();
1718 /* This block is copied from yy_switch_to_buffer. */
1719 if ( YY_CURRENT_BUFFER
)
1721 /* Flush out information for old buffer. */
1722 *(yy_c_buf_p
) = (yy_hold_char
);
1723 YY_CURRENT_BUFFER_LVALUE
->yy_buf_pos
= (yy_c_buf_p
);
1724 YY_CURRENT_BUFFER_LVALUE
->yy_n_chars
= (yy_n_chars
);
1727 /* Only push if top exists. Otherwise, replace top. */
1728 if (YY_CURRENT_BUFFER
)
1729 (yy_buffer_stack_top
)++;
1730 YY_CURRENT_BUFFER_LVALUE
= new_buffer
;
1732 /* copied from yy_switch_to_buffer. */
1733 yy_load_buffer_state( );
1734 (yy_did_buffer_switch_on_eof
) = 1;
1737 /** Removes and deletes the top of the stack, if present.
1738 * The next element becomes the new top.
1741 void yypop_buffer_state (void)
1743 if (!YY_CURRENT_BUFFER
)
1746 yy_delete_buffer(YY_CURRENT_BUFFER
);
1747 YY_CURRENT_BUFFER_LVALUE
= NULL
;
1748 if ((yy_buffer_stack_top
) > 0)
1749 --(yy_buffer_stack_top
);
1751 if (YY_CURRENT_BUFFER
) {
1752 yy_load_buffer_state( );
1753 (yy_did_buffer_switch_on_eof
) = 1;
1757 /* Allocates the stack if it does not exist.
1758 * Guarantees space for at least one push.
1760 static void yyensure_buffer_stack (void)
1764 if (!(yy_buffer_stack
)) {
1766 /* First allocation is just for 2 elements, since we don't know if this
1767 * scanner will even need a stack. We use 2 instead of 1 to avoid an
1768 * immediate realloc on the next call.
1771 (yy_buffer_stack
) = (struct yy_buffer_state
**)yyalloc
1772 (num_to_alloc
* sizeof(struct yy_buffer_state
*)
1774 if ( ! (yy_buffer_stack
) )
1775 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1777 memset((yy_buffer_stack
), 0, num_to_alloc
* sizeof(struct yy_buffer_state
*));
1779 (yy_buffer_stack_max
) = num_to_alloc
;
1780 (yy_buffer_stack_top
) = 0;
1784 if ((yy_buffer_stack_top
) >= ((yy_buffer_stack_max
)) - 1){
1786 /* Increase the buffer to prepare for a possible push. */
1787 int grow_size
= 8 /* arbitrary grow size */;
1789 num_to_alloc
= (yy_buffer_stack_max
) + grow_size
;
1790 (yy_buffer_stack
) = (struct yy_buffer_state
**)yyrealloc
1792 num_to_alloc
* sizeof(struct yy_buffer_state
*)
1794 if ( ! (yy_buffer_stack
) )
1795 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1797 /* zero only the new slots.*/
1798 memset((yy_buffer_stack
) + (yy_buffer_stack_max
), 0, grow_size
* sizeof(struct yy_buffer_state
*));
1799 (yy_buffer_stack_max
) = num_to_alloc
;
1803 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1804 * @param base the character buffer
1805 * @param size the size in bytes of the character buffer
1807 * @return the newly allocated buffer state object.
1809 YY_BUFFER_STATE
yy_scan_buffer (char * base
, yy_size_t size
)
1814 base
[size
-2] != YY_END_OF_BUFFER_CHAR
||
1815 base
[size
-1] != YY_END_OF_BUFFER_CHAR
)
1816 /* They forgot to leave room for the EOB's. */
1819 b
= (YY_BUFFER_STATE
) yyalloc(sizeof( struct yy_buffer_state
) );
1821 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1823 b
->yy_buf_size
= size
- 2; /* "- 2" to take care of EOB's */
1824 b
->yy_buf_pos
= b
->yy_ch_buf
= base
;
1825 b
->yy_is_our_buffer
= 0;
1826 b
->yy_input_file
= 0;
1827 b
->yy_n_chars
= b
->yy_buf_size
;
1828 b
->yy_is_interactive
= 0;
1830 b
->yy_fill_buffer
= 0;
1831 b
->yy_buffer_status
= YY_BUFFER_NEW
;
1833 yy_switch_to_buffer(b
);
1838 /** Setup the input buffer state to scan a string. The next call to yylex() will
1839 * scan from a @e copy of @a str.
1840 * @param yystr a NUL-terminated string to scan
1842 * @return the newly allocated buffer state object.
1843 * @note If you want to scan bytes that may contain NUL values, then use
1844 * yy_scan_bytes() instead.
1846 YY_BUFFER_STATE
yy_scan_string (yyconst
char * yystr
)
1849 return yy_scan_bytes(yystr
,strlen(yystr
) );
1852 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1853 * scan from a @e copy of @a bytes.
1854 * @param bytes the byte buffer to scan
1855 * @param len the number of bytes in the buffer pointed to by @a bytes.
1857 * @return the newly allocated buffer state object.
1859 YY_BUFFER_STATE
yy_scan_bytes (yyconst
char * yybytes
, int _yybytes_len
)
1866 /* Get memory for full buffer, including space for trailing EOB's. */
1867 n
= _yybytes_len
+ 2;
1868 buf
= (char *) yyalloc(n
);
1870 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1872 for ( i
= 0; i
< _yybytes_len
; ++i
)
1873 buf
[i
] = yybytes
[i
];
1875 buf
[_yybytes_len
] = buf
[_yybytes_len
+1] = YY_END_OF_BUFFER_CHAR
;
1877 b
= yy_scan_buffer(buf
,n
);
1879 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1881 /* It's okay to grow etc. this buffer, and we should throw it
1882 * away when we're done.
1884 b
->yy_is_our_buffer
= 1;
1889 #ifndef YY_EXIT_FAILURE
1890 #define YY_EXIT_FAILURE 2
1893 static void yy_fatal_error (yyconst
char* msg
)
1895 (void) fprintf( stderr
, "%s\n", msg
);
1896 exit( YY_EXIT_FAILURE
);
1899 /* Redefine yyless() so it works in section 3 code. */
1905 /* Undo effects of setting up yytext. */ \
1906 int yyless_macro_arg = (n); \
1907 YY_LESS_LINENO(yyless_macro_arg);\
1908 yytext[yyleng] = (yy_hold_char); \
1909 (yy_c_buf_p) = yytext + yyless_macro_arg; \
1910 (yy_hold_char) = *(yy_c_buf_p); \
1911 *(yy_c_buf_p) = '\0'; \
1912 yyleng = yyless_macro_arg; \
1916 /* Accessor methods (get/set functions) to struct members. */
1918 /** Get the current line number.
1921 int yyget_lineno (void)
1927 /** Get the input stream.
1930 FILE *yyget_in (void)
1935 /** Get the output stream.
1938 FILE *yyget_out (void)
1943 /** Get the length of the current token.
1946 int yyget_leng (void)
1951 /** Get the current token.
1955 char *yyget_text (void)
1960 /** Set the current line number.
1961 * @param line_number
1964 void yyset_lineno (int line_number
)
1967 yylineno
= line_number
;
1970 /** Set the input stream. This does not discard the current
1972 * @param in_str A readable stream.
1974 * @see yy_switch_to_buffer
1976 void yyset_in (FILE * in_str
)
1981 void yyset_out (FILE * out_str
)
1986 int yyget_debug (void)
1988 return yy_flex_debug
;
1991 void yyset_debug (int bdebug
)
1993 yy_flex_debug
= bdebug
;
1996 static int yy_init_globals (void)
1998 /* Initialization is the same as for the non-reentrant scanner.
1999 * This function is called from yylex_destroy(), so don't allocate here.
2002 /* We do not touch yylineno unless the option is enabled. */
2005 (yy_buffer_stack
) = 0;
2006 (yy_buffer_stack_top
) = 0;
2007 (yy_buffer_stack_max
) = 0;
2008 (yy_c_buf_p
) = (char *) 0;
2012 /* Defined in main.c */
2021 /* For future reference: Set errno on error, since we are called by
2027 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
2028 int yylex_destroy (void)
2031 /* Pop the buffer stack, destroying each element. */
2032 while(YY_CURRENT_BUFFER
){
2033 yy_delete_buffer(YY_CURRENT_BUFFER
);
2034 YY_CURRENT_BUFFER_LVALUE
= NULL
;
2035 yypop_buffer_state();
2038 /* Destroy the stack itself. */
2039 yyfree((yy_buffer_stack
) );
2040 (yy_buffer_stack
) = NULL
;
2042 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2043 * yylex() is called, initialization will occur. */
2050 * Internal utility routines.
2054 static void yy_flex_strncpy (char* s1
, yyconst
char * s2
, int n
)
2057 for ( i
= 0; i
< n
; ++i
)
2062 #ifdef YY_NEED_STRLEN
2063 static int yy_flex_strlen (yyconst
char * s
)
2066 for ( n
= 0; s
[n
]; ++n
)
2073 void *yyalloc (yy_size_t size
)
2075 return (void *) malloc( size
);
2078 void *yyrealloc (void * ptr
, yy_size_t size
)
2080 /* The cast to (char *) in the following accommodates both
2081 * implementations that use char* generic pointers, and those
2082 * that use void* generic pointers. It works with the latter
2083 * because both ANSI C and C++ allow castless assignment from
2084 * any pointer type to void*, and deal with argument conversions
2085 * as though doing an assignment.
2087 return (void *) realloc( (char *) ptr
, size
);
2090 void yyfree (void * ptr
)
2092 free( (char *) ptr
); /* see yyrealloc() for (char *) cast */
2095 #define YYTABLES_NAME "yytables"
2097 #line 101 "winprefslex.l"
2102 * Run-of-the mill requirement for yacc
2111 * Run a file through the yacc parser
2114 parse_file (FILE *file
)