Imported Upstream version 1.15.1
[deb_xorg-server.git] / hw / xwin / winprefslex.c
CommitLineData
a09e091a
JB
1
2#line 3 "winprefslex.c"
3
4#define YY_INT_ALIGNED short int
5
6/* A lexical scanner generated by flex */
7
8#define FLEX_SCANNER
9#define YY_FLEX_MAJOR_VERSION 2
10#define YY_FLEX_MINOR_VERSION 5
11#define YY_FLEX_SUBMINOR_VERSION 35
12#if YY_FLEX_SUBMINOR_VERSION > 0
13#define FLEX_BETA
14#endif
15
16/* First, we deal with platform-specific or compiler-specific issues. */
17
18/* begin standard C headers. */
19#include <stdio.h>
20#include <string.h>
21#include <errno.h>
22#include <stdlib.h>
23
24/* end standard C headers. */
25
26/* flex integer type definitions */
27
28#ifndef FLEXINT_H
29#define FLEXINT_H
30
31/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
32
33#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
34
35/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36 * if you want the limit (max/min) macros for int types.
37 */
38#ifndef __STDC_LIMIT_MACROS
39#define __STDC_LIMIT_MACROS 1
40#endif
41
42#include <inttypes.h>
43typedef int8_t flex_int8_t;
44typedef uint8_t flex_uint8_t;
45typedef int16_t flex_int16_t;
46typedef uint16_t flex_uint16_t;
47typedef int32_t flex_int32_t;
48typedef uint32_t flex_uint32_t;
49#else
50typedef signed char flex_int8_t;
51typedef short int flex_int16_t;
52typedef int flex_int32_t;
53typedef unsigned char flex_uint8_t;
54typedef unsigned short int flex_uint16_t;
55typedef unsigned int flex_uint32_t;
56#endif /* ! C99 */
57
58/* Limits of integral types. */
59#ifndef INT8_MIN
60#define INT8_MIN (-128)
61#endif
62#ifndef INT16_MIN
63#define INT16_MIN (-32767-1)
64#endif
65#ifndef INT32_MIN
66#define INT32_MIN (-2147483647-1)
67#endif
68#ifndef INT8_MAX
69#define INT8_MAX (127)
70#endif
71#ifndef INT16_MAX
72#define INT16_MAX (32767)
73#endif
74#ifndef INT32_MAX
75#define INT32_MAX (2147483647)
76#endif
77#ifndef UINT8_MAX
78#define UINT8_MAX (255U)
79#endif
80#ifndef UINT16_MAX
81#define UINT16_MAX (65535U)
82#endif
83#ifndef UINT32_MAX
84#define UINT32_MAX (4294967295U)
85#endif
86
87#endif /* ! FLEXINT_H */
88
89#ifdef __cplusplus
90
91/* The "const" storage-class-modifier is valid. */
92#define YY_USE_CONST
93
94#else /* ! __cplusplus */
95
96/* C99 requires __STDC__ to be defined as 1. */
97#if defined (__STDC__)
98
99#define YY_USE_CONST
100
101#endif /* defined (__STDC__) */
102#endif /* ! __cplusplus */
103
104#ifdef YY_USE_CONST
105#define yyconst const
106#else
107#define yyconst
108#endif
109
110/* Returned upon end-of-file. */
111#define YY_NULL 0
112
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
116 * double cast.
117 */
118#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
119
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.
123 */
124#define BEGIN (yy_start) = 1 + 2 *
125
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
128 * compatibility.
129 */
130#define YY_START (((yy_start) - 1) / 2)
131#define YYSTATE YY_START
132
133/* Action number for EOF rule of a given start state. */
134#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
135
136/* Special action meaning "start processing a new file". */
137#define YY_NEW_FILE yyrestart(yyin )
138
139#define YY_END_OF_BUFFER_CHAR 0
140
141/* Size of default input buffer. */
142#ifndef YY_BUF_SIZE
143#define YY_BUF_SIZE 16384
144#endif
145
146/* The state buf must be large enough to hold one state per character in the main buffer.
147 */
148#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
149
150#ifndef YY_TYPEDEF_YY_BUFFER_STATE
151#define YY_TYPEDEF_YY_BUFFER_STATE
152typedef struct yy_buffer_state *YY_BUFFER_STATE;
153#endif
154
155extern int yyleng;
156
157extern FILE *yyin, *yyout;
158
159#define EOB_ACT_CONTINUE_SCAN 0
160#define EOB_ACT_END_OF_FILE 1
161#define EOB_ACT_LAST_MATCH 2
162
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.
169 */
170 #define YY_LESS_LINENO(n) \
171 do { \
172 int yyl;\
173 for ( yyl = n; yyl < yyleng; ++yyl )\
174 if ( yytext[yyl] == '\n' )\
175 --yylineno;\
176 }while(0)
177
178/* Return all but the first "n" matched characters back to the input stream. */
179#define yyless(n) \
180 do \
181 { \
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 */ \
189 } \
190 while ( 0 )
191
192#define unput(c) yyunput( c, (yytext_ptr) )
193
194#ifndef YY_TYPEDEF_YY_SIZE_T
195#define YY_TYPEDEF_YY_SIZE_T
196typedef size_t yy_size_t;
197#endif
198
199#ifndef YY_STRUCT_YY_BUFFER_STATE
200#define YY_STRUCT_YY_BUFFER_STATE
201struct yy_buffer_state
202 {
203 FILE *yy_input_file;
204
205 char *yy_ch_buf; /* input buffer */
206 char *yy_buf_pos; /* current position in input buffer */
207
208 /* Size of input buffer in bytes, not including room for EOB
209 * characters.
210 */
211 yy_size_t yy_buf_size;
212
213 /* Number of characters read into yy_ch_buf, not including EOB
214 * characters.
215 */
216 int yy_n_chars;
217
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
220 * delete it.
221 */
222 int yy_is_our_buffer;
223
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
227 * each newline.
228 */
229 int yy_is_interactive;
230
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
233 * not.
234 */
235 int yy_at_bol;
236
237 int yy_bs_lineno; /**< The line count. */
238 int yy_bs_column; /**< The column count. */
239
240 /* Whether to try to fill the input buffer when we reach the
241 * end of it.
242 */
243 int yy_fill_buffer;
244
245 int yy_buffer_status;
246
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.
254 *
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.
258 */
259#define YY_BUFFER_EOF_PENDING 2
260
261 };
262#endif /* !YY_STRUCT_YY_BUFFER_STATE */
263
264/* Stack of input buffers. */
265static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
266static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
267static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
268
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
271 * "scanner state".
272 *
273 * Returns the top of the stack, or NULL.
274 */
275#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
276 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
277 : NULL)
278
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.
281 */
282#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
283
284/* yy_hold_char holds the character lost when yytext is formed. */
285static char yy_hold_char;
286static int yy_n_chars; /* number of characters read into yy_ch_buf */
287int yyleng;
288
289/* Points to current character in buffer. */
290static char *yy_c_buf_p = (char *) 0;
291static int yy_init = 0; /* whether we need to initialize */
292static int yy_start = 0; /* start state number */
293
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 ...
296 */
297static int yy_did_buffer_switch_on_eof;
298
299void yyrestart (FILE *input_file );
300void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
301YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
302void yy_delete_buffer (YY_BUFFER_STATE b );
303void yy_flush_buffer (YY_BUFFER_STATE b );
304void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
305void yypop_buffer_state (void );
306
307static void yyensure_buffer_stack (void );
308static void yy_load_buffer_state (void );
309static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
310
311#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
312
313YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
314YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
315YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
316
317void *yyalloc (yy_size_t );
318void *yyrealloc (void *,yy_size_t );
319void yyfree (void * );
320
321#define yy_new_buffer yy_create_buffer
322
323#define yy_set_interactive(is_interactive) \
324 { \
325 if ( ! YY_CURRENT_BUFFER ){ \
326 yyensure_buffer_stack (); \
327 YY_CURRENT_BUFFER_LVALUE = \
328 yy_create_buffer(yyin,YY_BUF_SIZE ); \
329 } \
330 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
331 }
332
333#define yy_set_bol(at_bol) \
334 { \
335 if ( ! YY_CURRENT_BUFFER ){\
336 yyensure_buffer_stack (); \
337 YY_CURRENT_BUFFER_LVALUE = \
338 yy_create_buffer(yyin,YY_BUF_SIZE ); \
339 } \
340 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
341 }
342
343#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
344
345/* Begin user sect3 */
346
347typedef unsigned char YY_CHAR;
348
349FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
350
351typedef int yy_state_type;
352
353extern int yylineno;
354
355int yylineno = 1;
356
357extern char *yytext;
358#define yytext_ptr yytext
359
360static yy_state_type yy_get_previous_state (void );
361static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
362static int yy_get_next_buffer (void );
363static void yy_fatal_error (yyconst char msg[] );
364
365/* Done after the current pattern has been matched and before the
366 * corresponding action - sets up yytext.
367 */
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; \
372 *yy_cp = '\0'; \
373 (yy_c_buf_p) = yy_cp;
374
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. */
379struct yy_trans_info
380 {
381 flex_int32_t yy_verify;
382 flex_int32_t yy_nxt;
383 };
384static yyconst flex_int16_t yy_accept[186] =
385 { 0,
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,
396
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,
405 32, 32, 6, 18, 0
406 } ;
407
408static yyconst flex_int32_t yy_ec[256] =
409 { 0,
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,
420
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,
431
432 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
433 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
434 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
435 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
436 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
437 1, 1, 1, 1, 1
438 } ;
439
440static yyconst flex_int32_t yy_meta[52] =
441 { 0,
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,
447 1
448 } ;
449
450static yyconst flex_int16_t yy_base[193] =
451 { 0,
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,
462
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,
472 396, 399
473
474 } ;
475
476static yyconst flex_int16_t yy_def[193] =
477 { 0,
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,
488
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,
498 185, 185
499
500 } ;
501
502static yyconst flex_int16_t yy_nxt[455] =
503 { 0,
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,
514
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,
525
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,
536
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,
547
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,
553 185, 185, 185, 185
554 } ;
555
556static yyconst flex_int16_t yy_chk[455] =
557 { 0,
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,
568
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,
579
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,
590
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,
601
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,
607 185, 185, 185, 185
608 } ;
609
610/* Table of booleans, true if rule could match eol. */
611static yyconst flex_int32_t yy_rule_can_match_eol[34] =
612 { 0,
6131, 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, };
615
616static yy_state_type yy_last_accepting_state;
617static char *yy_last_accepting_cpos;
618
619extern int yy_flex_debug;
620int yy_flex_debug = 0;
621
622/* The intent behind this definition is that it'll catch
623 * any uses of REJECT which flex missed.
624 */
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
629char *yytext;
630#line 1 "winprefslex.l"
631#line 2 "winprefslex.l"
632/*
633 * Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
634 * Copyright (C) Colin Harrison 2005-2008
635 *
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:
643 *
644 * The above copyright notice and this permission notice shall be
645 * included in all copies or substantial portions of the Software.
646 *
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.
654 *
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.
659 *
660 * Authors: Earle F. Philhower, III
661 * Colin Harrison
662 */
663/* $XFree86: $ */
664
665#include <stdio.h>
666#include <stdlib.h>
667#include <string.h>
668#include "winprefsyacc.h"
669
670extern int yyparse(void);
671
672extern void ErrorF (const char* /*f*/, ...);
673
674/* Copy the parsed string, must be free()d in yacc parser */
675static char *makestr(char *str)
676{
677 char *ptr;
678 ptr = (char*)malloc (strlen(str)+1);
679 if (!ptr)
680 {
681 ErrorF ("winMultiWindowLex:makestr() out of memory\n");
682 exit (-1);
683 }
684 strcpy(ptr, str);
685 return ptr;
686}
687
688#define YY_NO_INPUT 1
689#line 690 "winprefslex.c"
690
691#define INITIAL 0
692
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.
697 */
698#include <unistd.h>
699#endif
700
701#ifndef YY_EXTRA_TYPE
702#define YY_EXTRA_TYPE void *
703#endif
704
705static int yy_init_globals (void );
706
707/* Accessor methods to globals.
708 These are made visible to non-reentrant scanners for convenience. */
709
710int yylex_destroy (void );
711
712int yyget_debug (void );
713
714void yyset_debug (int debug_flag );
715
716YY_EXTRA_TYPE yyget_extra (void );
717
718void yyset_extra (YY_EXTRA_TYPE user_defined );
719
720FILE *yyget_in (void );
721
722void yyset_in (FILE * in_str );
723
724FILE *yyget_out (void );
725
726void yyset_out (FILE * out_str );
727
728int yyget_leng (void );
729
730char *yyget_text (void );
731
732int yyget_lineno (void );
733
734void yyset_lineno (int line_number );
735
736/* Macros after this point can all be overridden by user definitions in
737 * section 1.
738 */
739
740#ifndef YY_SKIP_YYWRAP
741#ifdef __cplusplus
742extern "C" int yywrap (void );
743#else
744extern int yywrap (void );
745#endif
746#endif
747
748#ifndef yytext_ptr
749static void yy_flex_strncpy (char *,yyconst char *,int );
750#endif
751
752#ifdef YY_NEED_STRLEN
753static int yy_flex_strlen (yyconst char * );
754#endif
755
756#ifndef YY_NO_INPUT
757
758#ifdef __cplusplus
759static int yyinput (void );
760#else
761static int input (void );
762#endif
763
764#endif
765
766/* Amount of stuff to slurp up with each read. */
767#ifndef YY_READ_BUF_SIZE
768#define YY_READ_BUF_SIZE 8192
769#endif
770
771/* Copy whatever the last rule matched to the standard output. */
772#ifndef ECHO
773/* This used to be an fputs(), but since the string might contain NUL's,
774 * we now use fwrite().
775 */
776#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
777#endif
778
779/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
780 * is returned in "result".
781 */
782#ifndef YY_INPUT
783#define YY_INPUT(buf,result,max_size) \
784 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
785 { \
786 int c = '*'; \
787 unsigned n; \
788 for ( n = 0; n < max_size && \
789 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
790 buf[n] = (char) c; \
791 if ( c == '\n' ) \
792 buf[n++] = (char) c; \
793 if ( c == EOF && ferror( yyin ) ) \
794 YY_FATAL_ERROR( "input in flex scanner failed" ); \
795 result = n; \
796 } \
797 else \
798 { \
799 errno=0; \
800 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
801 { \
802 if( errno != EINTR) \
803 { \
804 YY_FATAL_ERROR( "input in flex scanner failed" ); \
805 break; \
806 } \
807 errno=0; \
808 clearerr(yyin); \
809 } \
810 }\
811\
812
813#endif
814
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.
818 */
819#ifndef yyterminate
820#define yyterminate() return YY_NULL
821#endif
822
823/* Number of entries by which start-condition stack grows. */
824#ifndef YY_START_STACK_INCR
825#define YY_START_STACK_INCR 25
826#endif
827
828/* Report a fatal error. */
829#ifndef YY_FATAL_ERROR
830#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
831#endif
832
833/* end tables serialization structures and prototypes */
834
835/* Default declaration of generated scanner - a define so the user can
836 * easily add parameters.
837 */
838#ifndef YY_DECL
839#define YY_DECL_IS_OURS 1
840
841extern int yylex (void);
842
843#define YY_DECL int yylex (void)
844#endif /* !YY_DECL */
845
846/* Code executed at the beginning of each rule, after yytext and yyleng
847 * have been set up.
848 */
849#ifndef YY_USER_ACTION
850#define YY_USER_ACTION
851#endif
852
853/* Code executed at the end of each rule. */
854#ifndef YY_BREAK
855#define YY_BREAK break;
856#endif
857
858#define YY_RULE_SETUP \
859 YY_USER_ACTION
860
861/** The main scanner function which does all the work.
862 */
863YY_DECL
864{
865 register yy_state_type yy_current_state;
866 register char *yy_cp, *yy_bp;
867 register int yy_act;
868
869#line 65 "winprefslex.l"
870
871#line 872 "winprefslex.c"
872
873 if ( !(yy_init) )
874 {
875 (yy_init) = 1;
876
877#ifdef YY_USER_INIT
878 YY_USER_INIT;
879#endif
880
881 if ( ! (yy_start) )
882 (yy_start) = 1; /* first start state */
883
884 if ( ! yyin )
885 yyin = stdin;
886
887 if ( ! yyout )
888 yyout = stdout;
889
890 if ( ! YY_CURRENT_BUFFER ) {
891 yyensure_buffer_stack ();
892 YY_CURRENT_BUFFER_LVALUE =
893 yy_create_buffer(yyin,YY_BUF_SIZE );
894 }
895
896 yy_load_buffer_state( );
897 }
898
899 while ( 1 ) /* loops until end-of-file is reached */
900 {
901 yy_cp = (yy_c_buf_p);
902
903 /* Support of yytext. */
904 *yy_cp = (yy_hold_char);
905
906 /* yy_bp points to the position in yy_ch_buf of the start of
907 * the current run.
908 */
909 yy_bp = yy_cp;
910
911 yy_current_state = (yy_start);
912yy_match:
913 do
914 {
915 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
916 if ( yy_accept[yy_current_state] )
917 {
918 (yy_last_accepting_state) = yy_current_state;
919 (yy_last_accepting_cpos) = yy_cp;
920 }
921 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
922 {
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];
926 }
927 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
928 ++yy_cp;
929 }
930 while ( yy_current_state != 185 );
931 yy_cp = (yy_last_accepting_cpos);
932 yy_current_state = (yy_last_accepting_state);
933
934yy_find_action:
935 yy_act = yy_accept[yy_current_state];
936
937 YY_DO_BEFORE_ACTION;
938
939 if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
940 {
941 int yyl;
942 for ( yyl = 0; yyl < yyleng; ++yyl )
943 if ( yytext[yyl] == '\n' )
944
945 yylineno++;
946;
947 }
948
949do_action: /* This label is used only to access EOF actions. */
950
951 switch ( yy_act )
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);
958 goto yy_find_action;
959
960case 1:
961/* rule 1 can match eol */
962YY_RULE_SETUP
963#line 66 "winprefslex.l"
964{ /* comment */ return NEWLINE; }
965 YY_BREAK
966case 2:
967/* rule 2 can match eol */
968YY_RULE_SETUP
969#line 67 "winprefslex.l"
970{ /* comment */ return NEWLINE; }
971 YY_BREAK
972case 3:
973/* rule 3 can match eol */
974YY_RULE_SETUP
975#line 68 "winprefslex.l"
976{ return NEWLINE; }
977 YY_BREAK
978case 4:
979YY_RULE_SETUP
980#line 69 "winprefslex.l"
981{ /* ignore whitespace */ }
982 YY_BREAK
983case 5:
984YY_RULE_SETUP
985#line 70 "winprefslex.l"
986{ return MENU; }
987 YY_BREAK
988case 6:
989YY_RULE_SETUP
990#line 71 "winprefslex.l"
991{ return ICONDIRECTORY; }
992 YY_BREAK
993case 7:
994YY_RULE_SETUP
995#line 72 "winprefslex.l"
996{ return DEFAULTICON; }
997 YY_BREAK
998case 8:
999YY_RULE_SETUP
1000#line 73 "winprefslex.l"
1001{ return ICONS; }
1002 YY_BREAK
1003case 9:
1004YY_RULE_SETUP
1005#line 74 "winprefslex.l"
1006{ return STYLES; }
1007 YY_BREAK
1008case 10:
1009YY_RULE_SETUP
1010#line 75 "winprefslex.l"
1011{ return TOPMOST; }
1012 YY_BREAK
1013case 11:
1014YY_RULE_SETUP
1015#line 76 "winprefslex.l"
1016{ return MAXIMIZE; }
1017 YY_BREAK
1018case 12:
1019YY_RULE_SETUP
1020#line 77 "winprefslex.l"
1021{ return MINIMIZE; }
1022 YY_BREAK
1023case 13:
1024YY_RULE_SETUP
1025#line 78 "winprefslex.l"
1026{ return BOTTOM; }
1027 YY_BREAK
1028case 14:
1029YY_RULE_SETUP
1030#line 79 "winprefslex.l"
1031{ return NOTITLE; }
1032 YY_BREAK
1033case 15:
1034YY_RULE_SETUP
1035#line 80 "winprefslex.l"
1036{ return OUTLINE; }
1037 YY_BREAK
1038case 16:
1039YY_RULE_SETUP
1040#line 81 "winprefslex.l"
1041{ return NOFRAME; }
1042 YY_BREAK
1043case 17:
1044YY_RULE_SETUP
1045#line 82 "winprefslex.l"
1046{ return ROOTMENU; }
1047 YY_BREAK
1048case 18:
1049YY_RULE_SETUP
1050#line 83 "winprefslex.l"
1051{ return DEFAULTSYSMENU; }
1052 YY_BREAK
1053case 19:
1054YY_RULE_SETUP
1055#line 84 "winprefslex.l"
1056{ return SYSMENU; }
1057 YY_BREAK
1058case 20:
1059YY_RULE_SETUP
1060#line 85 "winprefslex.l"
1061{ return SEPARATOR; }
1062 YY_BREAK
1063case 21:
1064YY_RULE_SETUP
1065#line 86 "winprefslex.l"
1066{ return ATSTART; }
1067 YY_BREAK
1068case 22:
1069YY_RULE_SETUP
1070#line 87 "winprefslex.l"
1071{ return ATEND; }
1072 YY_BREAK
1073case 23:
1074YY_RULE_SETUP
1075#line 88 "winprefslex.l"
1076{ return EXEC; }
1077 YY_BREAK
1078case 24:
1079YY_RULE_SETUP
1080#line 89 "winprefslex.l"
1081{ return ALWAYSONTOP; }
1082 YY_BREAK
1083case 25:
1084YY_RULE_SETUP
1085#line 90 "winprefslex.l"
1086{ return DEBUGOUTPUT; }
1087 YY_BREAK
1088case 26:
1089YY_RULE_SETUP
1090#line 91 "winprefslex.l"
1091{ return RELOAD; }
1092 YY_BREAK
1093case 27:
1094YY_RULE_SETUP
1095#line 92 "winprefslex.l"
1096{ return TRAYICON; }
1097 YY_BREAK
1098case 28:
1099YY_RULE_SETUP
1100#line 93 "winprefslex.l"
1101{ return SILENTEXIT; }
1102 YY_BREAK
1103case 29:
1104YY_RULE_SETUP
1105#line 94 "winprefslex.l"
1106{ return LB; }
1107 YY_BREAK
1108case 30:
1109YY_RULE_SETUP
1110#line 95 "winprefslex.l"
1111{ return RB; }
1112 YY_BREAK
1113case 31:
1114YY_RULE_SETUP
1115#line 96 "winprefslex.l"
1116{ yylval.sVal = makestr(yytext+1); \
1117 yylval.sVal[strlen(yylval.sVal)-1] = 0; \
1118 return STRING; }
1119 YY_BREAK
1120case 32:
1121YY_RULE_SETUP
1122#line 99 "winprefslex.l"
1123{ yylval.sVal = makestr(yytext); \
1124 return STRING; }
1125 YY_BREAK
1126case 33:
1127YY_RULE_SETUP
1128#line 101 "winprefslex.l"
1129ECHO;
1130 YY_BREAK
1131#line 1132 "winprefslex.c"
1132case YY_STATE_EOF(INITIAL):
1133 yyterminate();
1134
1135 case YY_END_OF_BUFFER:
1136 {
1137 /* Amount of text matched not including the EOB char. */
1138 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
1139
1140 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1141 *yy_cp = (yy_hold_char);
1142 YY_RESTORE_YY_MORE_OFFSET
1143
1144 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1145 {
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.
1154 */
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;
1158 }
1159
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
1165 * in input().
1166 */
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;
1170
1171 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
1172
1173 yy_current_state = yy_get_previous_state( );
1174
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).
1182 */
1183
1184 yy_next_state = yy_try_NUL_trans( yy_current_state );
1185
1186 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1187
1188 if ( yy_next_state )
1189 {
1190 /* Consume the NUL. */
1191 yy_cp = ++(yy_c_buf_p);
1192 yy_current_state = yy_next_state;
1193 goto yy_match;
1194 }
1195
1196 else
1197 {
1198 yy_cp = (yy_last_accepting_cpos);
1199 yy_current_state = (yy_last_accepting_state);
1200 goto yy_find_action;
1201 }
1202 }
1203
1204 else switch ( yy_get_next_buffer( ) )
1205 {
1206 case EOB_ACT_END_OF_FILE:
1207 {
1208 (yy_did_buffer_switch_on_eof) = 0;
1209
1210 if ( yywrap( ) )
1211 {
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.
1220 */
1221 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1222
1223 yy_act = YY_STATE_EOF(YY_START);
1224 goto do_action;
1225 }
1226
1227 else
1228 {
1229 if ( ! (yy_did_buffer_switch_on_eof) )
1230 YY_NEW_FILE;
1231 }
1232 break;
1233 }
1234
1235 case EOB_ACT_CONTINUE_SCAN:
1236 (yy_c_buf_p) =
1237 (yytext_ptr) + yy_amount_of_matched_text;
1238
1239 yy_current_state = yy_get_previous_state( );
1240
1241 yy_cp = (yy_c_buf_p);
1242 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1243 goto yy_match;
1244
1245 case EOB_ACT_LAST_MATCH:
1246 (yy_c_buf_p) =
1247 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1248
1249 yy_current_state = yy_get_previous_state( );
1250
1251 yy_cp = (yy_c_buf_p);
1252 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1253 goto yy_find_action;
1254 }
1255 break;
1256 }
1257
1258 default:
1259 YY_FATAL_ERROR(
1260 "fatal flex scanner internal error--no action found" );
1261 } /* end of action switch */
1262 } /* end of scanning one token */
1263} /* end of yylex */
1264
1265/* yy_get_next_buffer - try to read in a new buffer
1266 *
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
1271 */
1272static int yy_get_next_buffer (void)
1273{
1274 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1275 register char *source = (yytext_ptr);
1276 register int number_to_move, i;
1277 int ret_val;
1278
1279 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1280 YY_FATAL_ERROR(
1281 "fatal flex scanner internal error--end of buffer missed" );
1282
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 )
1286 {
1287 /* We matched a single character, the EOB, so
1288 * treat this as a final EOF.
1289 */
1290 return EOB_ACT_END_OF_FILE;
1291 }
1292
1293 else
1294 {
1295 /* We matched some text prior to the EOB, first
1296 * process it.
1297 */
1298 return EOB_ACT_LAST_MATCH;
1299 }
1300 }
1301
1302 /* Try to read more data. */
1303
1304 /* First move last chars to start of buffer. */
1305 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1306
1307 for ( i = 0; i < number_to_move; ++i )
1308 *(dest++) = *(source++);
1309
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,
1312 * just force an EOF
1313 */
1314 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1315
1316 else
1317 {
1318 int num_to_read =
1319 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1320
1321 while ( num_to_read <= 0 )
1322 { /* Not enough room in the buffer - grow it. */
1323
1324 /* just a shorter name for the current buffer */
1325 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1326
1327 int yy_c_buf_p_offset =
1328 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1329
1330 if ( b->yy_is_our_buffer )
1331 {
1332 int new_size = b->yy_buf_size * 2;
1333
1334 if ( new_size <= 0 )
1335 b->yy_buf_size += b->yy_buf_size / 8;
1336 else
1337 b->yy_buf_size *= 2;
1338
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 );
1342 }
1343 else
1344 /* Can't grow it, we don't own it. */
1345 b->yy_ch_buf = 0;
1346
1347 if ( ! b->yy_ch_buf )
1348 YY_FATAL_ERROR(
1349 "fatal error - scanner input buffer overflow" );
1350
1351 (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1352
1353 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1354 number_to_move - 1;
1355
1356 }
1357
1358 if ( num_to_read > YY_READ_BUF_SIZE )
1359 num_to_read = YY_READ_BUF_SIZE;
1360
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 );
1364
1365 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1366 }
1367
1368 if ( (yy_n_chars) == 0 )
1369 {
1370 if ( number_to_move == YY_MORE_ADJ )
1371 {
1372 ret_val = EOB_ACT_END_OF_FILE;
1373 yyrestart(yyin );
1374 }
1375
1376 else
1377 {
1378 ret_val = EOB_ACT_LAST_MATCH;
1379 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1380 YY_BUFFER_EOF_PENDING;
1381 }
1382 }
1383
1384 else
1385 ret_val = EOB_ACT_CONTINUE_SCAN;
1386
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()" );
1393 }
1394
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;
1398
1399 (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1400
1401 return ret_val;
1402}
1403
1404/* yy_get_previous_state - get the state just before the EOB char was reached */
1405
1406 static yy_state_type yy_get_previous_state (void)
1407{
1408 register yy_state_type yy_current_state;
1409 register char *yy_cp;
1410
1411 yy_current_state = (yy_start);
1412
1413 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1414 {
1415 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1416 if ( yy_accept[yy_current_state] )
1417 {
1418 (yy_last_accepting_state) = yy_current_state;
1419 (yy_last_accepting_cpos) = yy_cp;
1420 }
1421 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1422 {
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];
1426 }
1427 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1428 }
1429
1430 return yy_current_state;
1431}
1432
1433/* yy_try_NUL_trans - try to make a transition on the NUL character
1434 *
1435 * synopsis
1436 * next_state = yy_try_NUL_trans( current_state );
1437 */
1438 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
1439{
1440 register int yy_is_jam;
1441 register char *yy_cp = (yy_c_buf_p);
1442
1443 register YY_CHAR yy_c = 1;
1444 if ( yy_accept[yy_current_state] )
1445 {
1446 (yy_last_accepting_state) = yy_current_state;
1447 (yy_last_accepting_cpos) = yy_cp;
1448 }
1449 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1450 {
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];
1454 }
1455 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1456 yy_is_jam = (yy_current_state == 185);
1457
1458 return yy_is_jam ? 0 : yy_current_state;
1459}
1460
1461#ifndef YY_NO_INPUT
1462#ifdef __cplusplus
1463 static int yyinput (void)
1464#else
1465 static int input (void)
1466#endif
1467
1468{
1469 int c;
1470
1471 *(yy_c_buf_p) = (yy_hold_char);
1472
1473 if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1474 {
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.
1478 */
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';
1482
1483 else
1484 { /* need more input */
1485 int offset = (yy_c_buf_p) - (yytext_ptr);
1486 ++(yy_c_buf_p);
1487
1488 switch ( yy_get_next_buffer( ) )
1489 {
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.
1499 */
1500
1501 /* Reset buffer status. */
1502 yyrestart(yyin );
1503
1504 /*FALLTHROUGH*/
1505
1506 case EOB_ACT_END_OF_FILE:
1507 {
1508 if ( yywrap( ) )
1509 return EOF;
1510
1511 if ( ! (yy_did_buffer_switch_on_eof) )
1512 YY_NEW_FILE;
1513#ifdef __cplusplus
1514 return yyinput();
1515#else
1516 return input();
1517#endif
1518 }
1519
1520 case EOB_ACT_CONTINUE_SCAN:
1521 (yy_c_buf_p) = (yytext_ptr) + offset;
1522 break;
1523 }
1524 }
1525 }
1526
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);
1530
1531 if ( c == '\n' )
1532
1533 yylineno++;
1534;
1535
1536 return c;
1537}
1538#endif /* ifndef YY_NO_INPUT */
1539
1540/** Immediately switch to a different input stream.
1541 * @param input_file A readable stream.
1542 *
1543 * @note This function does not reset the start condition to @c INITIAL .
1544 */
1545 void yyrestart (FILE * input_file )
1546{
1547
1548 if ( ! YY_CURRENT_BUFFER ){
1549 yyensure_buffer_stack ();
1550 YY_CURRENT_BUFFER_LVALUE =
1551 yy_create_buffer(yyin,YY_BUF_SIZE );
1552 }
1553
1554 yy_init_buffer(YY_CURRENT_BUFFER,input_file );
1555 yy_load_buffer_state( );
1556}
1557
1558/** Switch to a different input buffer.
1559 * @param new_buffer The new input buffer.
1560 *
1561 */
1562 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1563{
1564
1565 /* TODO. We should be able to replace this entire function body
1566 * with
1567 * yypop_buffer_state();
1568 * yypush_buffer_state(new_buffer);
1569 */
1570 yyensure_buffer_stack ();
1571 if ( YY_CURRENT_BUFFER == new_buffer )
1572 return;
1573
1574 if ( YY_CURRENT_BUFFER )
1575 {
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);
1580 }
1581
1582 YY_CURRENT_BUFFER_LVALUE = new_buffer;
1583 yy_load_buffer_state( );
1584
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.
1589 */
1590 (yy_did_buffer_switch_on_eof) = 1;
1591}
1592
1593static void yy_load_buffer_state (void)
1594{
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);
1599}
1600
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.
1604 *
1605 * @return the allocated buffer state.
1606 */
1607 YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1608{
1609 YY_BUFFER_STATE b;
1610
1611 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1612 if ( ! b )
1613 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1614
1615 b->yy_buf_size = size;
1616
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.
1619 */
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()" );
1623
1624 b->yy_is_our_buffer = 1;
1625
1626 yy_init_buffer(b,file );
1627
1628 return b;
1629}
1630
1631/** Destroy the buffer.
1632 * @param b a buffer created with yy_create_buffer()
1633 *
1634 */
1635 void yy_delete_buffer (YY_BUFFER_STATE b )
1636{
1637
1638 if ( ! b )
1639 return;
1640
1641 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1642 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1643
1644 if ( b->yy_is_our_buffer )
1645 yyfree((void *) b->yy_ch_buf );
1646
1647 yyfree((void *) b );
1648}
1649
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.
1653 */
1654 static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1655
1656{
1657 int oerrno = errno;
1658
1659 yy_flush_buffer(b );
1660
1661 b->yy_input_file = file;
1662 b->yy_fill_buffer = 1;
1663
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.
1667 */
1668 if (b != YY_CURRENT_BUFFER){
1669 b->yy_bs_lineno = 1;
1670 b->yy_bs_column = 0;
1671 }
1672
1673 b->yy_is_interactive = 0;
1674
1675 errno = oerrno;
1676}
1677
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.
1680 *
1681 */
1682 void yy_flush_buffer (YY_BUFFER_STATE b )
1683{
1684 if ( ! b )
1685 return;
1686
1687 b->yy_n_chars = 0;
1688
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.
1692 */
1693 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1694 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1695
1696 b->yy_buf_pos = &b->yy_ch_buf[0];
1697
1698 b->yy_at_bol = 1;
1699 b->yy_buffer_status = YY_BUFFER_NEW;
1700
1701 if ( b == YY_CURRENT_BUFFER )
1702 yy_load_buffer_state( );
1703}
1704
1705/** Pushes the new state onto the stack. The new state becomes
1706 * the current state. This function will allocate the stack
1707 * if necessary.
1708 * @param new_buffer The new state.
1709 *
1710 */
1711void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1712{
1713 if (new_buffer == NULL)
1714 return;
1715
1716 yyensure_buffer_stack();
1717
1718 /* This block is copied from yy_switch_to_buffer. */
1719 if ( YY_CURRENT_BUFFER )
1720 {
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);
1725 }
1726
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;
1731
1732 /* copied from yy_switch_to_buffer. */
1733 yy_load_buffer_state( );
1734 (yy_did_buffer_switch_on_eof) = 1;
1735}
1736
1737/** Removes and deletes the top of the stack, if present.
1738 * The next element becomes the new top.
1739 *
1740 */
1741void yypop_buffer_state (void)
1742{
1743 if (!YY_CURRENT_BUFFER)
1744 return;
1745
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);
1750
1751 if (YY_CURRENT_BUFFER) {
1752 yy_load_buffer_state( );
1753 (yy_did_buffer_switch_on_eof) = 1;
1754 }
1755}
1756
1757/* Allocates the stack if it does not exist.
1758 * Guarantees space for at least one push.
1759 */
1760static void yyensure_buffer_stack (void)
1761{
1762 int num_to_alloc;
1763
1764 if (!(yy_buffer_stack)) {
1765
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.
1769 */
1770 num_to_alloc = 1;
1771 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1772 (num_to_alloc * sizeof(struct yy_buffer_state*)
1773 );
1774 if ( ! (yy_buffer_stack) )
1775 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1776
1777 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1778
1779 (yy_buffer_stack_max) = num_to_alloc;
1780 (yy_buffer_stack_top) = 0;
1781 return;
1782 }
1783
1784 if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1785
1786 /* Increase the buffer to prepare for a possible push. */
1787 int grow_size = 8 /* arbitrary grow size */;
1788
1789 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1790 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
1791 ((yy_buffer_stack),
1792 num_to_alloc * sizeof(struct yy_buffer_state*)
1793 );
1794 if ( ! (yy_buffer_stack) )
1795 YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1796
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;
1800 }
1801}
1802
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
1806 *
1807 * @return the newly allocated buffer state object.
1808 */
1809YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
1810{
1811 YY_BUFFER_STATE b;
1812
1813 if ( size < 2 ||
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. */
1817 return 0;
1818
1819 b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1820 if ( ! b )
1821 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1822
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;
1829 b->yy_at_bol = 1;
1830 b->yy_fill_buffer = 0;
1831 b->yy_buffer_status = YY_BUFFER_NEW;
1832
1833 yy_switch_to_buffer(b );
1834
1835 return b;
1836}
1837
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
1841 *
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.
1845 */
1846YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
1847{
1848
1849 return yy_scan_bytes(yystr,strlen(yystr) );
1850}
1851
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.
1856 *
1857 * @return the newly allocated buffer state object.
1858 */
1859YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
1860{
1861 YY_BUFFER_STATE b;
1862 char *buf;
1863 yy_size_t n;
1864 int i;
1865
1866 /* Get memory for full buffer, including space for trailing EOB's. */
1867 n = _yybytes_len + 2;
1868 buf = (char *) yyalloc(n );
1869 if ( ! buf )
1870 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1871
1872 for ( i = 0; i < _yybytes_len; ++i )
1873 buf[i] = yybytes[i];
1874
1875 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1876
1877 b = yy_scan_buffer(buf,n );
1878 if ( ! b )
1879 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1880
1881 /* It's okay to grow etc. this buffer, and we should throw it
1882 * away when we're done.
1883 */
1884 b->yy_is_our_buffer = 1;
1885
1886 return b;
1887}
1888
1889#ifndef YY_EXIT_FAILURE
1890#define YY_EXIT_FAILURE 2
1891#endif
1892
1893static void yy_fatal_error (yyconst char* msg )
1894{
1895 (void) fprintf( stderr, "%s\n", msg );
1896 exit( YY_EXIT_FAILURE );
1897}
1898
1899/* Redefine yyless() so it works in section 3 code. */
1900
1901#undef yyless
1902#define yyless(n) \
1903 do \
1904 { \
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; \
1913 } \
1914 while ( 0 )
1915
1916/* Accessor methods (get/set functions) to struct members. */
1917
1918/** Get the current line number.
1919 *
1920 */
1921int yyget_lineno (void)
1922{
1923
1924 return yylineno;
1925}
1926
1927/** Get the input stream.
1928 *
1929 */
1930FILE *yyget_in (void)
1931{
1932 return yyin;
1933}
1934
1935/** Get the output stream.
1936 *
1937 */
1938FILE *yyget_out (void)
1939{
1940 return yyout;
1941}
1942
1943/** Get the length of the current token.
1944 *
1945 */
1946int yyget_leng (void)
1947{
1948 return yyleng;
1949}
1950
1951/** Get the current token.
1952 *
1953 */
1954
1955char *yyget_text (void)
1956{
1957 return yytext;
1958}
1959
1960/** Set the current line number.
1961 * @param line_number
1962 *
1963 */
1964void yyset_lineno (int line_number )
1965{
1966
1967 yylineno = line_number;
1968}
1969
1970/** Set the input stream. This does not discard the current
1971 * input buffer.
1972 * @param in_str A readable stream.
1973 *
1974 * @see yy_switch_to_buffer
1975 */
1976void yyset_in (FILE * in_str )
1977{
1978 yyin = in_str ;
1979}
1980
1981void yyset_out (FILE * out_str )
1982{
1983 yyout = out_str ;
1984}
1985
1986int yyget_debug (void)
1987{
1988 return yy_flex_debug;
1989}
1990
1991void yyset_debug (int bdebug )
1992{
1993 yy_flex_debug = bdebug ;
1994}
1995
1996static int yy_init_globals (void)
1997{
1998 /* Initialization is the same as for the non-reentrant scanner.
1999 * This function is called from yylex_destroy(), so don't allocate here.
2000 */
2001
2002 /* We do not touch yylineno unless the option is enabled. */
2003 yylineno = 1;
2004
2005 (yy_buffer_stack) = 0;
2006 (yy_buffer_stack_top) = 0;
2007 (yy_buffer_stack_max) = 0;
2008 (yy_c_buf_p) = (char *) 0;
2009 (yy_init) = 0;
2010 (yy_start) = 0;
2011
2012/* Defined in main.c */
2013#ifdef YY_STDINIT
2014 yyin = stdin;
2015 yyout = stdout;
2016#else
2017 yyin = (FILE *) 0;
2018 yyout = (FILE *) 0;
2019#endif
2020
2021 /* For future reference: Set errno on error, since we are called by
2022 * yylex_init()
2023 */
2024 return 0;
2025}
2026
2027/* yylex_destroy is for both reentrant and non-reentrant scanners. */
2028int yylex_destroy (void)
2029{
2030
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();
2036 }
2037
2038 /* Destroy the stack itself. */
2039 yyfree((yy_buffer_stack) );
2040 (yy_buffer_stack) = NULL;
2041
2042 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2043 * yylex() is called, initialization will occur. */
2044 yy_init_globals( );
2045
2046 return 0;
2047}
2048
2049/*
2050 * Internal utility routines.
2051 */
2052
2053#ifndef yytext_ptr
2054static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
2055{
2056 register int i;
2057 for ( i = 0; i < n; ++i )
2058 s1[i] = s2[i];
2059}
2060#endif
2061
2062#ifdef YY_NEED_STRLEN
2063static int yy_flex_strlen (yyconst char * s )
2064{
2065 register int n;
2066 for ( n = 0; s[n]; ++n )
2067 ;
2068
2069 return n;
2070}
2071#endif
2072
2073void *yyalloc (yy_size_t size )
2074{
2075 return (void *) malloc( size );
2076}
2077
2078void *yyrealloc (void * ptr, yy_size_t size )
2079{
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.
2086 */
2087 return (void *) realloc( (char *) ptr, size );
2088}
2089
2090void yyfree (void * ptr )
2091{
2092 free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
2093}
2094
2095#define YYTABLES_NAME "yytables"
2096
2097#line 101 "winprefslex.l"
2098
2099
2100
2101/*
2102 * Run-of-the mill requirement for yacc
2103 */
2104int
2105yywrap (void)
2106{
2107 return 1;
2108}
2109
2110/*
2111 * Run a file through the yacc parser
2112 */
2113int
2114parse_file (FILE *file)
2115{
2116 int ret;
2117
2118 if (!file)
2119 return 1;
2120
2121 yylineno = 1;
2122 yyin = file;
2123 ret = yyparse ();
2124 yylex_destroy ();
2125 return ret;
2126}
2127
2128