64a84bdc6641d97d431842d048cda755cde426b3
[coreboot.git] / util / sconfig / lex.yy.c_shipped
1
2 #line 3 "/home/Patrick/work/coreboot/util/sconfig/lex.yy.c_shipped"
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>
43 typedef int8_t flex_int8_t;
44 typedef uint8_t flex_uint8_t;
45 typedef int16_t flex_int16_t;
46 typedef uint16_t flex_uint16_t;
47 typedef int32_t flex_int32_t;
48 typedef uint32_t flex_uint32_t;
49 #else
50 typedef signed char flex_int8_t;
51 typedef short int flex_int16_t;
52 typedef int flex_int32_t;
53 typedef unsigned char flex_uint8_t; 
54 typedef unsigned short int flex_uint16_t;
55 typedef unsigned int flex_uint32_t;
56
57 /* Limits of integral types. */
58 #ifndef INT8_MIN
59 #define INT8_MIN               (-128)
60 #endif
61 #ifndef INT16_MIN
62 #define INT16_MIN              (-32767-1)
63 #endif
64 #ifndef INT32_MIN
65 #define INT32_MIN              (-2147483647-1)
66 #endif
67 #ifndef INT8_MAX
68 #define INT8_MAX               (127)
69 #endif
70 #ifndef INT16_MAX
71 #define INT16_MAX              (32767)
72 #endif
73 #ifndef INT32_MAX
74 #define INT32_MAX              (2147483647)
75 #endif
76 #ifndef UINT8_MAX
77 #define UINT8_MAX              (255U)
78 #endif
79 #ifndef UINT16_MAX
80 #define UINT16_MAX             (65535U)
81 #endif
82 #ifndef UINT32_MAX
83 #define UINT32_MAX             (4294967295U)
84 #endif
85
86 #endif /* ! C99 */
87
88 #endif /* ! FLEXINT_H */
89
90 #ifdef __cplusplus
91
92 /* The "const" storage-class-modifier is valid. */
93 #define YY_USE_CONST
94
95 #else   /* ! __cplusplus */
96
97 /* C99 requires __STDC__ to be defined as 1. */
98 #if defined (__STDC__)
99
100 #define YY_USE_CONST
101
102 #endif  /* defined (__STDC__) */
103 #endif  /* ! __cplusplus */
104
105 #ifdef YY_USE_CONST
106 #define yyconst const
107 #else
108 #define yyconst
109 #endif
110
111 /* Returned upon end-of-file. */
112 #define YY_NULL 0
113
114 /* Promotes a possibly negative, possibly signed char to an unsigned
115  * integer for use as an array index.  If the signed char is negative,
116  * we want to instead treat it as an 8-bit unsigned char, hence the
117  * double cast.
118  */
119 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
120
121 /* Enter a start condition.  This macro really ought to take a parameter,
122  * but we do it the disgusting crufty way forced on us by the ()-less
123  * definition of BEGIN.
124  */
125 #define BEGIN (yy_start) = 1 + 2 *
126
127 /* Translate the current start state into a value that can be later handed
128  * to BEGIN to return to the state.  The YYSTATE alias is for lex
129  * compatibility.
130  */
131 #define YY_START (((yy_start) - 1) / 2)
132 #define YYSTATE YY_START
133
134 /* Action number for EOF rule of a given start state. */
135 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
136
137 /* Special action meaning "start processing a new file". */
138 #define YY_NEW_FILE yyrestart(yyin  )
139
140 #define YY_END_OF_BUFFER_CHAR 0
141
142 /* Size of default input buffer. */
143 #ifndef YY_BUF_SIZE
144 #ifdef __ia64__
145 /* On IA-64, the buffer size is 16k, not 8k.
146  * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
147  * Ditto for the __ia64__ case accordingly.
148  */
149 #define YY_BUF_SIZE 32768
150 #else
151 #define YY_BUF_SIZE 16384
152 #endif /* __ia64__ */
153 #endif
154
155 /* The state buf must be large enough to hold one state per character in the main buffer.
156  */
157 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
158
159 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
160 #define YY_TYPEDEF_YY_BUFFER_STATE
161 typedef struct yy_buffer_state *YY_BUFFER_STATE;
162 #endif
163
164 extern int yyleng;
165
166 extern FILE *yyin, *yyout;
167
168 #define EOB_ACT_CONTINUE_SCAN 0
169 #define EOB_ACT_END_OF_FILE 1
170 #define EOB_ACT_LAST_MATCH 2
171
172     #define YY_LESS_LINENO(n)
173     
174 /* Return all but the first "n" matched characters back to the input stream. */
175 #define yyless(n) \
176         do \
177                 { \
178                 /* Undo effects of setting up yytext. */ \
179         int yyless_macro_arg = (n); \
180         YY_LESS_LINENO(yyless_macro_arg);\
181                 *yy_cp = (yy_hold_char); \
182                 YY_RESTORE_YY_MORE_OFFSET \
183                 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
184                 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
185                 } \
186         while ( 0 )
187
188 #define unput(c) yyunput( c, (yytext_ptr)  )
189
190 #ifndef YY_TYPEDEF_YY_SIZE_T
191 #define YY_TYPEDEF_YY_SIZE_T
192 typedef size_t yy_size_t;
193 #endif
194
195 #ifndef YY_STRUCT_YY_BUFFER_STATE
196 #define YY_STRUCT_YY_BUFFER_STATE
197 struct yy_buffer_state
198         {
199         FILE *yy_input_file;
200
201         char *yy_ch_buf;                /* input buffer */
202         char *yy_buf_pos;               /* current position in input buffer */
203
204         /* Size of input buffer in bytes, not including room for EOB
205          * characters.
206          */
207         yy_size_t yy_buf_size;
208
209         /* Number of characters read into yy_ch_buf, not including EOB
210          * characters.
211          */
212         int yy_n_chars;
213
214         /* Whether we "own" the buffer - i.e., we know we created it,
215          * and can realloc() it to grow it, and should free() it to
216          * delete it.
217          */
218         int yy_is_our_buffer;
219
220         /* Whether this is an "interactive" input source; if so, and
221          * if we're using stdio for input, then we want to use getc()
222          * instead of fread(), to make sure we stop fetching input after
223          * each newline.
224          */
225         int yy_is_interactive;
226
227         /* Whether we're considered to be at the beginning of a line.
228          * If so, '^' rules will be active on the next match, otherwise
229          * not.
230          */
231         int yy_at_bol;
232
233     int yy_bs_lineno; /**< The line count. */
234     int yy_bs_column; /**< The column count. */
235     
236         /* Whether to try to fill the input buffer when we reach the
237          * end of it.
238          */
239         int yy_fill_buffer;
240
241         int yy_buffer_status;
242
243 #define YY_BUFFER_NEW 0
244 #define YY_BUFFER_NORMAL 1
245         /* When an EOF's been seen but there's still some text to process
246          * then we mark the buffer as YY_EOF_PENDING, to indicate that we
247          * shouldn't try reading from the input source any more.  We might
248          * still have a bunch of tokens to match, though, because of
249          * possible backing-up.
250          *
251          * When we actually see the EOF, we change the status to "new"
252          * (via yyrestart()), so that the user can continue scanning by
253          * just pointing yyin at a new input file.
254          */
255 #define YY_BUFFER_EOF_PENDING 2
256
257         };
258 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
259
260 /* Stack of input buffers. */
261 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
262 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
263 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
264
265 /* We provide macros for accessing buffer states in case in the
266  * future we want to put the buffer states in a more general
267  * "scanner state".
268  *
269  * Returns the top of the stack, or NULL.
270  */
271 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
272                           ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
273                           : NULL)
274
275 /* Same as previous macro, but useful when we know that the buffer stack is not
276  * NULL or when we need an lvalue. For internal use only.
277  */
278 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
279
280 /* yy_hold_char holds the character lost when yytext is formed. */
281 static char yy_hold_char;
282 static int yy_n_chars;          /* number of characters read into yy_ch_buf */
283 int yyleng;
284
285 /* Points to current character in buffer. */
286 static char *yy_c_buf_p = (char *) 0;
287 static int yy_init = 0;         /* whether we need to initialize */
288 static int yy_start = 0;        /* start state number */
289
290 /* Flag which is used to allow yywrap()'s to do buffer switches
291  * instead of setting up a fresh yyin.  A bit of a hack ...
292  */
293 static int yy_did_buffer_switch_on_eof;
294
295 void yyrestart (FILE *input_file  );
296 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
297 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  );
298 void yy_delete_buffer (YY_BUFFER_STATE b  );
299 void yy_flush_buffer (YY_BUFFER_STATE b  );
300 void yypush_buffer_state (YY_BUFFER_STATE new_buffer  );
301 void yypop_buffer_state (void );
302
303 static void yyensure_buffer_stack (void );
304 static void yy_load_buffer_state (void );
305 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file  );
306
307 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
308
309 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  );
310 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  );
311 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len  );
312
313 void *yyalloc (yy_size_t  );
314 void *yyrealloc (void *,yy_size_t  );
315 void yyfree (void *  );
316
317 #define yy_new_buffer yy_create_buffer
318
319 #define yy_set_interactive(is_interactive) \
320         { \
321         if ( ! YY_CURRENT_BUFFER ){ \
322         yyensure_buffer_stack (); \
323                 YY_CURRENT_BUFFER_LVALUE =    \
324             yy_create_buffer(yyin,YY_BUF_SIZE ); \
325         } \
326         YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
327         }
328
329 #define yy_set_bol(at_bol) \
330         { \
331         if ( ! YY_CURRENT_BUFFER ){\
332         yyensure_buffer_stack (); \
333                 YY_CURRENT_BUFFER_LVALUE =    \
334             yy_create_buffer(yyin,YY_BUF_SIZE ); \
335         } \
336         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
337         }
338
339 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
340
341 /* Begin user sect3 */
342
343 typedef unsigned char YY_CHAR;
344
345 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
346
347 typedef int yy_state_type;
348
349 extern int yylineno;
350
351 int yylineno = 1;
352
353 extern char *yytext;
354 #define yytext_ptr yytext
355
356 static yy_state_type yy_get_previous_state (void );
357 static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
358 static int yy_get_next_buffer (void );
359 static void yy_fatal_error (yyconst char msg[]  );
360
361 /* Done after the current pattern has been matched and before the
362  * corresponding action - sets up yytext.
363  */
364 #define YY_DO_BEFORE_ACTION \
365         (yytext_ptr) = yy_bp; \
366         yyleng = (size_t) (yy_cp - yy_bp); \
367         (yy_hold_char) = *yy_cp; \
368         *yy_cp = '\0'; \
369         (yy_c_buf_p) = yy_cp;
370
371 #define YY_NUM_RULES 25
372 #define YY_END_OF_BUFFER 26
373 /* This struct is not used in this scanner,
374    but its presence is necessary. */
375 struct yy_trans_info
376         {
377         flex_int32_t yy_verify;
378         flex_int32_t yy_nxt;
379         };
380 static yyconst flex_int16_t yy_accept[87] =
381     {   0,
382         0,    0,   26,   24,    1,    3,   24,   24,   24,   21,
383        21,   19,   22,   22,   22,   22,   24,   24,   24,   24,
384        24,   24,    1,    3,   24,    0,   24,    0,    2,   21,
385        22,   24,   24,   22,   24,   24,   24,   17,   24,   24,
386        24,    7,   24,   24,   24,   23,   23,   20,   24,   24,
387        16,   18,   11,   15,   24,    8,    9,   10,   24,    4,
388        24,   24,   24,   24,   24,   12,   24,   24,    5,   24,
389        24,   24,   24,   24,   24,   24,   24,    6,   24,   24,
390        24,   14,   24,   24,   13,    0
391     } ;
392
393 static yyconst flex_int32_t yy_ec[256] =
394     {   0,
395         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
396         1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
397         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
398         1,    2,    1,    5,    6,    1,    1,    1,    1,    1,
399         1,    1,    1,    1,    1,    7,    1,    8,    7,    9,
400         7,    7,    7,    7,    7,    7,    7,    1,    1,    1,
401        10,    1,    1,    1,   11,   11,   11,   11,   11,   11,
402         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
403         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
404         1,    1,    1,    1,   12,    1,   13,   11,   14,   15,
405
406        16,   17,   18,   19,   20,    1,    1,   21,   22,   23,
407        24,   25,   26,   27,   28,   29,   30,   31,    1,   32,
408         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
409         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
410         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
411         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
412         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
413         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
414         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
415         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
416
417         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
418         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
419         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
420         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
421         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
422         1,    1,    1,    1,    1
423     } ;
424
425 static yyconst flex_int32_t yy_meta[33] =
426     {   0,
427         1,    2,    2,    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
431     } ;
432
433 static yyconst flex_int16_t yy_base[92] =
434     {   0,
435         0,    0,  144,    0,  141,  145,  139,   31,   35,   32,
436       109,    0,   43,   46,   59,   49,   35,  127,   46,   47,
437       123,    0,  136,  145,   71,  132,   75,  133,  145,    0,
438        72,   80,  115,   75,  108,  118,  118,    0,  105,  105,
439       112,    0,  108,  102,  108,    0,  145,    0,  100,  104,
440         0,    0,    0,    0,  103,    0,  110,    0,  101,    0,
441       106,  105,  103,   89,  100,  103,   81,   75,    0,   89,
442        80,   85,   79,   86,   71,   62,   70,    0,   57,   48,
443        35,    0,   44,   15,    0,  145,   34,  106,  108,  110,
444       112
445
446     } ;
447
448 static yyconst flex_int16_t yy_def[92] =
449     {   0,
450        86,    1,   86,   87,   86,   86,   87,   88,   89,   87,
451        10,   87,   10,   10,   10,   10,   87,   87,   87,   87,
452        87,   87,   86,   86,   88,   90,   89,   91,   86,   10,
453        10,   10,   87,   10,   87,   87,   87,   87,   87,   87,
454        87,   87,   87,   87,   87,   87,   86,   32,   87,   87,
455        87,   87,   87,   87,   87,   87,   87,   87,   87,   87,
456        87,   87,   87,   87,   87,   87,   87,   87,   87,   87,
457        87,   87,   87,   87,   87,   87,   87,   87,   87,   87,
458        87,   87,   87,   87,   87,    0,   86,   86,   86,   86,
459        86
460
461     } ;
462
463 static yyconst flex_int16_t yy_nxt[178] =
464     {   0,
465         4,    5,    6,    7,    8,    9,   10,   11,   10,   12,
466        13,    4,   13,   14,   15,   16,   13,    4,    4,   17,
467        18,    4,    4,   19,   20,    4,   21,    4,    4,    4,
468         4,    4,   26,   26,   22,   22,   28,   29,   30,   30,
469        30,   85,   31,   37,   31,   31,   31,   31,   31,   31,
470        31,   31,   31,   31,   31,   31,   31,   31,   38,   84,
471        43,   39,   41,   83,   33,   31,   31,   31,   42,   44,
472        82,   36,   26,   26,   34,   46,   28,   29,   31,   31,
473        31,   31,   31,   31,   81,   35,   48,   48,   48,   80,
474        48,   79,   48,   48,   48,   48,   48,   78,   77,   76,
475
476        75,   74,   73,   72,   71,   50,   25,   25,   27,   27,
477        26,   26,   28,   28,   70,   69,   68,   67,   66,   65,
478        64,   63,   62,   61,   60,   59,   58,   57,   56,   55,
479        54,   53,   52,   51,   49,   29,   47,   23,   45,   40,
480        32,   24,   23,   86,    3,   86,   86,   86,   86,   86,
481        86,   86,   86,   86,   86,   86,   86,   86,   86,   86,
482        86,   86,   86,   86,   86,   86,   86,   86,   86,   86,
483        86,   86,   86,   86,   86,   86,   86
484     } ;
485
486 static yyconst flex_int16_t yy_chk[178] =
487     {   0,
488         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
489         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
490         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
491         1,    1,    8,    8,   87,    8,    9,    9,   10,   10,
492        10,   84,   10,   17,   10,   10,   10,   10,   10,   13,
493        13,   13,   14,   14,   14,   16,   16,   16,   17,   83,
494        20,   17,   19,   81,   14,   15,   15,   15,   19,   20,
495        80,   16,   25,   25,   15,   25,   27,   27,   31,   31,
496        31,   34,   34,   34,   79,   15,   32,   32,   32,   77,
497        32,   76,   32,   32,   32,   32,   32,   75,   74,   73,
498
499        72,   71,   70,   68,   67,   34,   88,   88,   89,   89,
500        90,   90,   91,   91,   66,   65,   64,   63,   62,   61,
501        59,   57,   55,   50,   49,   45,   44,   43,   41,   40,
502        39,   37,   36,   35,   33,   28,   26,   23,   21,   18,
503        11,    7,    5,    3,   86,   86,   86,   86,   86,   86,
504        86,   86,   86,   86,   86,   86,   86,   86,   86,   86,
505        86,   86,   86,   86,   86,   86,   86,   86,   86,   86,
506        86,   86,   86,   86,   86,   86,   86
507     } ;
508
509 static yy_state_type yy_last_accepting_state;
510 static char *yy_last_accepting_cpos;
511
512 extern int yy_flex_debug;
513 int yy_flex_debug = 0;
514
515 /* The intent behind this definition is that it'll catch
516  * any uses of REJECT which flex missed.
517  */
518 #define REJECT reject_used_but_not_detected
519 #define yymore() yymore_used_but_not_detected
520 #define YY_MORE_ADJ 0
521 #define YY_RESTORE_YY_MORE_OFFSET
522 char *yytext;
523 /*
524  * sconfig, coreboot device tree compiler
525  *
526  * Copyright (C) 2010 coresystems GmbH
527  *                 written by Patrick Georgi <patrick.georgi@coresystems.de>
528  *
529  * This program is free software; you can redistribute it and/or modify
530  * it under the terms of the GNU General Public License as published by
531  * the Free Software Foundation; version 2 of the License.
532  *
533  * This program is distributed in the hope that it will be useful,
534  * but WITHOUT ANY WARRANTY; without even the implied warranty of
535  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
536  * GNU General Public License for more details.
537  *
538  * You should have received a copy of the GNU General Public License
539  * along with this program; if not, write to the Free Software
540  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA, 02110-1301 USA
541  */
542
543 #include "sconfig.tab.h"
544
545 int linenum = 0;
546
547 #define INITIAL 0
548
549 #ifndef YY_NO_UNISTD_H
550 /* Special case for "unistd.h", since it is non-ANSI. We include it way
551  * down here because we want the user's section 1 to have been scanned first.
552  * The user has a chance to override it with an option.
553  */
554 #include <unistd.h>
555 #endif
556
557 #ifndef YY_EXTRA_TYPE
558 #define YY_EXTRA_TYPE void *
559 #endif
560
561 static int yy_init_globals (void );
562
563 /* Accessor methods to globals.
564    These are made visible to non-reentrant scanners for convenience. */
565
566 int yylex_destroy (void );
567
568 int yyget_debug (void );
569
570 void yyset_debug (int debug_flag  );
571
572 YY_EXTRA_TYPE yyget_extra (void );
573
574 void yyset_extra (YY_EXTRA_TYPE user_defined  );
575
576 FILE *yyget_in (void );
577
578 void yyset_in  (FILE * in_str  );
579
580 FILE *yyget_out (void );
581
582 void yyset_out  (FILE * out_str  );
583
584 int yyget_leng (void );
585
586 char *yyget_text (void );
587
588 int yyget_lineno (void );
589
590 void yyset_lineno (int line_number  );
591
592 /* Macros after this point can all be overridden by user definitions in
593  * section 1.
594  */
595
596 #ifndef YY_SKIP_YYWRAP
597 #ifdef __cplusplus
598 extern "C" int yywrap (void );
599 #else
600 extern int yywrap (void );
601 #endif
602 #endif
603
604     static void yyunput (int c,char *buf_ptr  );
605     
606 #ifndef yytext_ptr
607 static void yy_flex_strncpy (char *,yyconst char *,int );
608 #endif
609
610 #ifdef YY_NEED_STRLEN
611 static int yy_flex_strlen (yyconst char * );
612 #endif
613
614 #ifndef YY_NO_INPUT
615
616 #ifdef __cplusplus
617 static int yyinput (void );
618 #else
619 static int input (void );
620 #endif
621
622 #endif
623
624 /* Amount of stuff to slurp up with each read. */
625 #ifndef YY_READ_BUF_SIZE
626 #ifdef __ia64__
627 /* On IA-64, the buffer size is 16k, not 8k */
628 #define YY_READ_BUF_SIZE 16384
629 #else
630 #define YY_READ_BUF_SIZE 8192
631 #endif /* __ia64__ */
632 #endif
633
634 /* Copy whatever the last rule matched to the standard output. */
635 #ifndef ECHO
636 /* This used to be an fputs(), but since the string might contain NUL's,
637  * we now use fwrite().
638  */
639 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
640 #endif
641
642 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
643  * is returned in "result".
644  */
645 #ifndef YY_INPUT
646 #define YY_INPUT(buf,result,max_size) \
647         if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
648                 { \
649                 int c = '*'; \
650                 size_t n; \
651                 for ( n = 0; n < max_size && \
652                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
653                         buf[n] = (char) c; \
654                 if ( c == '\n' ) \
655                         buf[n++] = (char) c; \
656                 if ( c == EOF && ferror( yyin ) ) \
657                         YY_FATAL_ERROR( "input in flex scanner failed" ); \
658                 result = n; \
659                 } \
660         else \
661                 { \
662                 errno=0; \
663                 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
664                         { \
665                         if( errno != EINTR) \
666                                 { \
667                                 YY_FATAL_ERROR( "input in flex scanner failed" ); \
668                                 break; \
669                                 } \
670                         errno=0; \
671                         clearerr(yyin); \
672                         } \
673                 }\
674 \
675
676 #endif
677
678 /* No semi-colon after return; correct usage is to write "yyterminate();" -
679  * we don't want an extra ';' after the "return" because that will cause
680  * some compilers to complain about unreachable statements.
681  */
682 #ifndef yyterminate
683 #define yyterminate() return YY_NULL
684 #endif
685
686 /* Number of entries by which start-condition stack grows. */
687 #ifndef YY_START_STACK_INCR
688 #define YY_START_STACK_INCR 25
689 #endif
690
691 /* Report a fatal error. */
692 #ifndef YY_FATAL_ERROR
693 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
694 #endif
695
696 /* end tables serialization structures and prototypes */
697
698 /* Default declaration of generated scanner - a define so the user can
699  * easily add parameters.
700  */
701 #ifndef YY_DECL
702 #define YY_DECL_IS_OURS 1
703
704 extern int yylex (void);
705
706 #define YY_DECL int yylex (void)
707 #endif /* !YY_DECL */
708
709 /* Code executed at the beginning of each rule, after yytext and yyleng
710  * have been set up.
711  */
712 #ifndef YY_USER_ACTION
713 #define YY_USER_ACTION
714 #endif
715
716 /* Code executed at the end of each rule. */
717 #ifndef YY_BREAK
718 #define YY_BREAK break;
719 #endif
720
721 #define YY_RULE_SETUP \
722         YY_USER_ACTION
723
724 /** The main scanner function which does all the work.
725  */
726 YY_DECL
727 {
728         register yy_state_type yy_current_state;
729         register char *yy_cp, *yy_bp;
730         register int yy_act;
731     
732         if ( !(yy_init) )
733                 {
734                 (yy_init) = 1;
735
736 #ifdef YY_USER_INIT
737                 YY_USER_INIT;
738 #endif
739
740                 if ( ! (yy_start) )
741                         (yy_start) = 1; /* first start state */
742
743                 if ( ! yyin )
744                         yyin = stdin;
745
746                 if ( ! yyout )
747                         yyout = stdout;
748
749                 if ( ! YY_CURRENT_BUFFER ) {
750                         yyensure_buffer_stack ();
751                         YY_CURRENT_BUFFER_LVALUE =
752                                 yy_create_buffer(yyin,YY_BUF_SIZE );
753                 }
754
755                 yy_load_buffer_state( );
756                 }
757
758         while ( 1 )             /* loops until end-of-file is reached */
759                 {
760                 yy_cp = (yy_c_buf_p);
761
762                 /* Support of yytext. */
763                 *yy_cp = (yy_hold_char);
764
765                 /* yy_bp points to the position in yy_ch_buf of the start of
766                  * the current run.
767                  */
768                 yy_bp = yy_cp;
769
770                 yy_current_state = (yy_start);
771 yy_match:
772                 do
773                         {
774                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
775                         if ( yy_accept[yy_current_state] )
776                                 {
777                                 (yy_last_accepting_state) = yy_current_state;
778                                 (yy_last_accepting_cpos) = yy_cp;
779                                 }
780                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
781                                 {
782                                 yy_current_state = (int) yy_def[yy_current_state];
783                                 if ( yy_current_state >= 87 )
784                                         yy_c = yy_meta[(unsigned int) yy_c];
785                                 }
786                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
787                         ++yy_cp;
788                         }
789                 while ( yy_base[yy_current_state] != 145 );
790
791 yy_find_action:
792                 yy_act = yy_accept[yy_current_state];
793                 if ( yy_act == 0 )
794                         { /* have to back up */
795                         yy_cp = (yy_last_accepting_cpos);
796                         yy_current_state = (yy_last_accepting_state);
797                         yy_act = yy_accept[yy_current_state];
798                         }
799
800                 YY_DO_BEFORE_ACTION;
801
802 do_action:      /* This label is used only to access EOF actions. */
803
804                 switch ( yy_act )
805         { /* beginning of action switch */
806                         case 0: /* must back up */
807                         /* undo the effects of YY_DO_BEFORE_ACTION */
808                         *yy_cp = (yy_hold_char);
809                         yy_cp = (yy_last_accepting_cpos);
810                         yy_current_state = (yy_last_accepting_state);
811                         goto yy_find_action;
812
813 case 1:
814 YY_RULE_SETUP
815 {}
816         YY_BREAK
817 case 2:
818 /* rule 2 can match eol */
819 YY_RULE_SETUP
820 {linenum++;}
821         YY_BREAK
822 case 3:
823 /* rule 3 can match eol */
824 YY_RULE_SETUP
825 {linenum++;}
826         YY_BREAK
827 case 4:
828 YY_RULE_SETUP
829 {return(CHIP);}
830         YY_BREAK
831 case 5:
832 YY_RULE_SETUP
833 {return(DEVICE);}
834         YY_BREAK
835 case 6:
836 YY_RULE_SETUP
837 {return(REGISTER);}
838         YY_BREAK
839 case 7:
840 YY_RULE_SETUP
841 {yylval.number=1; return(BOOL);}
842         YY_BREAK
843 case 8:
844 YY_RULE_SETUP
845 {yylval.number=0; return(BOOL);}
846         YY_BREAK
847 case 9:
848 YY_RULE_SETUP
849 {yylval.number=PCI; return(BUS);}
850         YY_BREAK
851 case 10:
852 YY_RULE_SETUP
853 {yylval.number=PNP; return(BUS);}
854         YY_BREAK
855 case 11:
856 YY_RULE_SETUP
857 {yylval.number=I2C; return(BUS);}
858         YY_BREAK
859 case 12:
860 YY_RULE_SETUP
861 {yylval.number=APIC; return(BUS);}
862         YY_BREAK
863 case 13:
864 YY_RULE_SETUP
865 {yylval.number=APIC_CLUSTER; return(BUS);}
866         YY_BREAK
867 case 14:
868 YY_RULE_SETUP
869 {yylval.number=PCI_DOMAIN; return(BUS);}
870         YY_BREAK
871 case 15:
872 YY_RULE_SETUP
873 {yylval.number=IRQ; return(RESOURCE);}
874         YY_BREAK
875 case 16:
876 YY_RULE_SETUP
877 {yylval.number=DRQ; return(RESOURCE);}
878         YY_BREAK
879 case 17:
880 YY_RULE_SETUP
881 {yylval.number=IO; return(RESOURCE);}
882         YY_BREAK
883 case 18:
884 YY_RULE_SETUP
885 {return(END);}
886         YY_BREAK
887 case 19:
888 YY_RULE_SETUP
889 {return(EQUALS);}
890         YY_BREAK
891 case 20:
892 YY_RULE_SETUP
893 {yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);}
894         YY_BREAK
895 case 21:
896 YY_RULE_SETUP
897 {yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);}
898         YY_BREAK
899 case 22:
900 YY_RULE_SETUP
901 {yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);}
902         YY_BREAK
903 case 23:
904 /* rule 23 can match eol */
905 YY_RULE_SETUP
906 {yylval.string = malloc(yyleng-1); strncpy(yylval.string, yytext+1, yyleng-2); yylval.string[yyleng-2]='\0'; return(STRING);}
907         YY_BREAK
908 case 24:
909 YY_RULE_SETUP
910 {yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(STRING);}
911         YY_BREAK
912 case 25:
913 YY_RULE_SETUP
914 ECHO;
915         YY_BREAK
916 case YY_STATE_EOF(INITIAL):
917         yyterminate();
918
919         case YY_END_OF_BUFFER:
920                 {
921                 /* Amount of text matched not including the EOB char. */
922                 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
923
924                 /* Undo the effects of YY_DO_BEFORE_ACTION. */
925                 *yy_cp = (yy_hold_char);
926                 YY_RESTORE_YY_MORE_OFFSET
927
928                 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
929                         {
930                         /* We're scanning a new file or input source.  It's
931                          * possible that this happened because the user
932                          * just pointed yyin at a new source and called
933                          * yylex().  If so, then we have to assure
934                          * consistency between YY_CURRENT_BUFFER and our
935                          * globals.  Here is the right place to do so, because
936                          * this is the first action (other than possibly a
937                          * back-up) that will match for the new input source.
938                          */
939                         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
940                         YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
941                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
942                         }
943
944                 /* Note that here we test for yy_c_buf_p "<=" to the position
945                  * of the first EOB in the buffer, since yy_c_buf_p will
946                  * already have been incremented past the NUL character
947                  * (since all states make transitions on EOB to the
948                  * end-of-buffer state).  Contrast this with the test
949                  * in input().
950                  */
951                 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
952                         { /* This was really a NUL. */
953                         yy_state_type yy_next_state;
954
955                         (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
956
957                         yy_current_state = yy_get_previous_state(  );
958
959                         /* Okay, we're now positioned to make the NUL
960                          * transition.  We couldn't have
961                          * yy_get_previous_state() go ahead and do it
962                          * for us because it doesn't know how to deal
963                          * with the possibility of jamming (and we don't
964                          * want to build jamming into it because then it
965                          * will run more slowly).
966                          */
967
968                         yy_next_state = yy_try_NUL_trans( yy_current_state );
969
970                         yy_bp = (yytext_ptr) + YY_MORE_ADJ;
971
972                         if ( yy_next_state )
973                                 {
974                                 /* Consume the NUL. */
975                                 yy_cp = ++(yy_c_buf_p);
976                                 yy_current_state = yy_next_state;
977                                 goto yy_match;
978                                 }
979
980                         else
981                                 {
982                                 yy_cp = (yy_c_buf_p);
983                                 goto yy_find_action;
984                                 }
985                         }
986
987                 else switch ( yy_get_next_buffer(  ) )
988                         {
989                         case EOB_ACT_END_OF_FILE:
990                                 {
991                                 (yy_did_buffer_switch_on_eof) = 0;
992
993                                 if ( yywrap( ) )
994                                         {
995                                         /* Note: because we've taken care in
996                                          * yy_get_next_buffer() to have set up
997                                          * yytext, we can now set up
998                                          * yy_c_buf_p so that if some total
999                                          * hoser (like flex itself) wants to
1000                                          * call the scanner after we return the
1001                                          * YY_NULL, it'll still work - another
1002                                          * YY_NULL will get returned.
1003                                          */
1004                                         (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1005
1006                                         yy_act = YY_STATE_EOF(YY_START);
1007                                         goto do_action;
1008                                         }
1009
1010                                 else
1011                                         {
1012                                         if ( ! (yy_did_buffer_switch_on_eof) )
1013                                                 YY_NEW_FILE;
1014                                         }
1015                                 break;
1016                                 }
1017
1018                         case EOB_ACT_CONTINUE_SCAN:
1019                                 (yy_c_buf_p) =
1020                                         (yytext_ptr) + yy_amount_of_matched_text;
1021
1022                                 yy_current_state = yy_get_previous_state(  );
1023
1024                                 yy_cp = (yy_c_buf_p);
1025                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1026                                 goto yy_match;
1027
1028                         case EOB_ACT_LAST_MATCH:
1029                                 (yy_c_buf_p) =
1030                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1031
1032                                 yy_current_state = yy_get_previous_state(  );
1033
1034                                 yy_cp = (yy_c_buf_p);
1035                                 yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1036                                 goto yy_find_action;
1037                         }
1038                 break;
1039                 }
1040
1041         default:
1042                 YY_FATAL_ERROR(
1043                         "fatal flex scanner internal error--no action found" );
1044         } /* end of action switch */
1045                 } /* end of scanning one token */
1046 } /* end of yylex */
1047
1048 /* yy_get_next_buffer - try to read in a new buffer
1049  *
1050  * Returns a code representing an action:
1051  *      EOB_ACT_LAST_MATCH -
1052  *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1053  *      EOB_ACT_END_OF_FILE - end of file
1054  */
1055 static int yy_get_next_buffer (void)
1056 {
1057         register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1058         register char *source = (yytext_ptr);
1059         register int number_to_move, i;
1060         int ret_val;
1061
1062         if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1063                 YY_FATAL_ERROR(
1064                 "fatal flex scanner internal error--end of buffer missed" );
1065
1066         if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1067                 { /* Don't try to fill the buffer, so this is an EOF. */
1068                 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
1069                         {
1070                         /* We matched a single character, the EOB, so
1071                          * treat this as a final EOF.
1072                          */
1073                         return EOB_ACT_END_OF_FILE;
1074                         }
1075
1076                 else
1077                         {
1078                         /* We matched some text prior to the EOB, first
1079                          * process it.
1080                          */
1081                         return EOB_ACT_LAST_MATCH;
1082                         }
1083                 }
1084
1085         /* Try to read more data. */
1086
1087         /* First move last chars to start of buffer. */
1088         number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1089
1090         for ( i = 0; i < number_to_move; ++i )
1091                 *(dest++) = *(source++);
1092
1093         if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1094                 /* don't do the read, it's not guaranteed to return an EOF,
1095                  * just force an EOF
1096                  */
1097                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1098
1099         else
1100                 {
1101                         int num_to_read =
1102                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1103
1104                 while ( num_to_read <= 0 )
1105                         { /* Not enough room in the buffer - grow it. */
1106
1107                         /* just a shorter name for the current buffer */
1108                         YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1109
1110                         int yy_c_buf_p_offset =
1111                                 (int) ((yy_c_buf_p) - b->yy_ch_buf);
1112
1113                         if ( b->yy_is_our_buffer )
1114                                 {
1115                                 int new_size = b->yy_buf_size * 2;
1116
1117                                 if ( new_size <= 0 )
1118                                         b->yy_buf_size += b->yy_buf_size / 8;
1119                                 else
1120                                         b->yy_buf_size *= 2;
1121
1122                                 b->yy_ch_buf = (char *)
1123                                         /* Include room in for 2 EOB chars. */
1124                                         yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
1125                                 }
1126                         else
1127                                 /* Can't grow it, we don't own it. */
1128                                 b->yy_ch_buf = 0;
1129
1130                         if ( ! b->yy_ch_buf )
1131                                 YY_FATAL_ERROR(
1132                                 "fatal error - scanner input buffer overflow" );
1133
1134                         (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1135
1136                         num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1137                                                 number_to_move - 1;
1138
1139                         }
1140
1141                 if ( num_to_read > YY_READ_BUF_SIZE )
1142                         num_to_read = YY_READ_BUF_SIZE;
1143
1144                 /* Read in more data. */
1145                 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1146                         (yy_n_chars), (size_t) num_to_read );
1147
1148                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1149                 }
1150
1151         if ( (yy_n_chars) == 0 )
1152                 {
1153                 if ( number_to_move == YY_MORE_ADJ )
1154                         {
1155                         ret_val = EOB_ACT_END_OF_FILE;
1156                         yyrestart(yyin  );
1157                         }
1158
1159                 else
1160                         {
1161                         ret_val = EOB_ACT_LAST_MATCH;
1162                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1163                                 YY_BUFFER_EOF_PENDING;
1164                         }
1165                 }
1166
1167         else
1168                 ret_val = EOB_ACT_CONTINUE_SCAN;
1169
1170         if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1171                 /* Extend the array by 50%, plus the number we really need. */
1172                 yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1173                 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
1174                 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1175                         YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1176         }
1177
1178         (yy_n_chars) += number_to_move;
1179         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1180         YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1181
1182         (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1183
1184         return ret_val;
1185 }
1186
1187 /* yy_get_previous_state - get the state just before the EOB char was reached */
1188
1189     static yy_state_type yy_get_previous_state (void)
1190 {
1191         register yy_state_type yy_current_state;
1192         register char *yy_cp;
1193     
1194         yy_current_state = (yy_start);
1195
1196         for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1197                 {
1198                 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1199                 if ( yy_accept[yy_current_state] )
1200                         {
1201                         (yy_last_accepting_state) = yy_current_state;
1202                         (yy_last_accepting_cpos) = yy_cp;
1203                         }
1204                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1205                         {
1206                         yy_current_state = (int) yy_def[yy_current_state];
1207                         if ( yy_current_state >= 87 )
1208                                 yy_c = yy_meta[(unsigned int) yy_c];
1209                         }
1210                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1211                 }
1212
1213         return yy_current_state;
1214 }
1215
1216 /* yy_try_NUL_trans - try to make a transition on the NUL character
1217  *
1218  * synopsis
1219  *      next_state = yy_try_NUL_trans( current_state );
1220  */
1221     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
1222 {
1223         register int yy_is_jam;
1224         register char *yy_cp = (yy_c_buf_p);
1225
1226         register YY_CHAR yy_c = 1;
1227         if ( yy_accept[yy_current_state] )
1228                 {
1229                 (yy_last_accepting_state) = yy_current_state;
1230                 (yy_last_accepting_cpos) = yy_cp;
1231                 }
1232         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1233                 {
1234                 yy_current_state = (int) yy_def[yy_current_state];
1235                 if ( yy_current_state >= 87 )
1236                         yy_c = yy_meta[(unsigned int) yy_c];
1237                 }
1238         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1239         yy_is_jam = (yy_current_state == 86);
1240
1241         return yy_is_jam ? 0 : yy_current_state;
1242 }
1243
1244     static void yyunput (int c, register char * yy_bp )
1245 {
1246         register char *yy_cp;
1247     
1248     yy_cp = (yy_c_buf_p);
1249
1250         /* undo effects of setting up yytext */
1251         *yy_cp = (yy_hold_char);
1252
1253         if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1254                 { /* need to shift things up to make room */
1255                 /* +2 for EOB chars. */
1256                 register int number_to_move = (yy_n_chars) + 2;
1257                 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1258                                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1259                 register char *source =
1260                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1261
1262                 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1263                         *--dest = *--source;
1264
1265                 yy_cp += (int) (dest - source);
1266                 yy_bp += (int) (dest - source);
1267                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1268                         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1269
1270                 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1271                         YY_FATAL_ERROR( "flex scanner push-back overflow" );
1272                 }
1273
1274         *--yy_cp = (char) c;
1275
1276         (yytext_ptr) = yy_bp;
1277         (yy_hold_char) = *yy_cp;
1278         (yy_c_buf_p) = yy_cp;
1279 }
1280
1281 #ifndef YY_NO_INPUT
1282 #ifdef __cplusplus
1283     static int yyinput (void)
1284 #else
1285     static int input  (void)
1286 #endif
1287
1288 {
1289         int c;
1290     
1291         *(yy_c_buf_p) = (yy_hold_char);
1292
1293         if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1294                 {
1295                 /* yy_c_buf_p now points to the character we want to return.
1296                  * If this occurs *before* the EOB characters, then it's a
1297                  * valid NUL; if not, then we've hit the end of the buffer.
1298                  */
1299                 if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1300                         /* This was really a NUL. */
1301                         *(yy_c_buf_p) = '\0';
1302
1303                 else
1304                         { /* need more input */
1305                         int offset = (yy_c_buf_p) - (yytext_ptr);
1306                         ++(yy_c_buf_p);
1307
1308                         switch ( yy_get_next_buffer(  ) )
1309                                 {
1310                                 case EOB_ACT_LAST_MATCH:
1311                                         /* This happens because yy_g_n_b()
1312                                          * sees that we've accumulated a
1313                                          * token and flags that we need to
1314                                          * try matching the token before
1315                                          * proceeding.  But for input(),
1316                                          * there's no matching to consider.
1317                                          * So convert the EOB_ACT_LAST_MATCH
1318                                          * to EOB_ACT_END_OF_FILE.
1319                                          */
1320
1321                                         /* Reset buffer status. */
1322                                         yyrestart(yyin );
1323
1324                                         /*FALLTHROUGH*/
1325
1326                                 case EOB_ACT_END_OF_FILE:
1327                                         {
1328                                         if ( yywrap( ) )
1329                                                 return EOF;
1330
1331                                         if ( ! (yy_did_buffer_switch_on_eof) )
1332                                                 YY_NEW_FILE;
1333 #ifdef __cplusplus
1334                                         return yyinput();
1335 #else
1336                                         return input();
1337 #endif
1338                                         }
1339
1340                                 case EOB_ACT_CONTINUE_SCAN:
1341                                         (yy_c_buf_p) = (yytext_ptr) + offset;
1342                                         break;
1343                                 }
1344                         }
1345                 }
1346
1347         c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
1348         *(yy_c_buf_p) = '\0';   /* preserve yytext */
1349         (yy_hold_char) = *++(yy_c_buf_p);
1350
1351         return c;
1352 }
1353 #endif  /* ifndef YY_NO_INPUT */
1354
1355 /** Immediately switch to a different input stream.
1356  * @param input_file A readable stream.
1357  * 
1358  * @note This function does not reset the start condition to @c INITIAL .
1359  */
1360     void yyrestart  (FILE * input_file )
1361 {
1362     
1363         if ( ! YY_CURRENT_BUFFER ){
1364         yyensure_buffer_stack ();
1365                 YY_CURRENT_BUFFER_LVALUE =
1366             yy_create_buffer(yyin,YY_BUF_SIZE );
1367         }
1368
1369         yy_init_buffer(YY_CURRENT_BUFFER,input_file );
1370         yy_load_buffer_state( );
1371 }
1372
1373 /** Switch to a different input buffer.
1374  * @param new_buffer The new input buffer.
1375  * 
1376  */
1377     void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
1378 {
1379     
1380         /* TODO. We should be able to replace this entire function body
1381          * with
1382          *              yypop_buffer_state();
1383          *              yypush_buffer_state(new_buffer);
1384      */
1385         yyensure_buffer_stack ();
1386         if ( YY_CURRENT_BUFFER == new_buffer )
1387                 return;
1388
1389         if ( YY_CURRENT_BUFFER )
1390                 {
1391                 /* Flush out information for old buffer. */
1392                 *(yy_c_buf_p) = (yy_hold_char);
1393                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1394                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1395                 }
1396
1397         YY_CURRENT_BUFFER_LVALUE = new_buffer;
1398         yy_load_buffer_state( );
1399
1400         /* We don't actually know whether we did this switch during
1401          * EOF (yywrap()) processing, but the only time this flag
1402          * is looked at is after yywrap() is called, so it's safe
1403          * to go ahead and always set it.
1404          */
1405         (yy_did_buffer_switch_on_eof) = 1;
1406 }
1407
1408 static void yy_load_buffer_state  (void)
1409 {
1410         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1411         (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1412         yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1413         (yy_hold_char) = *(yy_c_buf_p);
1414 }
1415
1416 /** Allocate and initialize an input buffer state.
1417  * @param file A readable stream.
1418  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1419  * 
1420  * @return the allocated buffer state.
1421  */
1422     YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
1423 {
1424         YY_BUFFER_STATE b;
1425     
1426         b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
1427         if ( ! b )
1428                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1429
1430         b->yy_buf_size = size;
1431
1432         /* yy_ch_buf has to be 2 characters longer than the size given because
1433          * we need to put in 2 end-of-buffer characters.
1434          */
1435         b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  );
1436         if ( ! b->yy_ch_buf )
1437                 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1438
1439         b->yy_is_our_buffer = 1;
1440
1441         yy_init_buffer(b,file );
1442
1443         return b;
1444 }
1445
1446 /** Destroy the buffer.
1447  * @param b a buffer created with yy_create_buffer()
1448  * 
1449  */
1450     void yy_delete_buffer (YY_BUFFER_STATE  b )
1451 {
1452     
1453         if ( ! b )
1454                 return;
1455
1456         if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1457                 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1458
1459         if ( b->yy_is_our_buffer )
1460                 yyfree((void *) b->yy_ch_buf  );
1461
1462         yyfree((void *) b  );
1463 }
1464
1465 #ifndef __cplusplus
1466 extern int isatty (int );
1467 #endif /* __cplusplus */
1468     
1469 /* Initializes or reinitializes a buffer.
1470  * This function is sometimes called more than once on the same buffer,
1471  * such as during a yyrestart() or at EOF.
1472  */
1473     static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
1474
1475 {
1476         int oerrno = errno;
1477     
1478         yy_flush_buffer(b );
1479
1480         b->yy_input_file = file;
1481         b->yy_fill_buffer = 1;
1482
1483     /* If b is the current buffer, then yy_init_buffer was _probably_
1484      * called from yyrestart() or through yy_get_next_buffer.
1485      * In that case, we don't want to reset the lineno or column.
1486      */
1487     if (b != YY_CURRENT_BUFFER){
1488         b->yy_bs_lineno = 1;
1489         b->yy_bs_column = 0;
1490     }
1491
1492         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1493     
1494         errno = oerrno;
1495 }
1496
1497 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1498  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1499  * 
1500  */
1501     void yy_flush_buffer (YY_BUFFER_STATE  b )
1502 {
1503         if ( ! b )
1504                 return;
1505
1506         b->yy_n_chars = 0;
1507
1508         /* We always need two end-of-buffer characters.  The first causes
1509          * a transition to the end-of-buffer state.  The second causes
1510          * a jam in that state.
1511          */
1512         b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1513         b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1514
1515         b->yy_buf_pos = &b->yy_ch_buf[0];
1516
1517         b->yy_at_bol = 1;
1518         b->yy_buffer_status = YY_BUFFER_NEW;
1519
1520         if ( b == YY_CURRENT_BUFFER )
1521                 yy_load_buffer_state( );
1522 }
1523
1524 /** Pushes the new state onto the stack. The new state becomes
1525  *  the current state. This function will allocate the stack
1526  *  if necessary.
1527  *  @param new_buffer The new state.
1528  *  
1529  */
1530 void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1531 {
1532         if (new_buffer == NULL)
1533                 return;
1534
1535         yyensure_buffer_stack();
1536
1537         /* This block is copied from yy_switch_to_buffer. */
1538         if ( YY_CURRENT_BUFFER )
1539                 {
1540                 /* Flush out information for old buffer. */
1541                 *(yy_c_buf_p) = (yy_hold_char);
1542                 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1543                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1544                 }
1545
1546         /* Only push if top exists. Otherwise, replace top. */
1547         if (YY_CURRENT_BUFFER)
1548                 (yy_buffer_stack_top)++;
1549         YY_CURRENT_BUFFER_LVALUE = new_buffer;
1550
1551         /* copied from yy_switch_to_buffer. */
1552         yy_load_buffer_state( );
1553         (yy_did_buffer_switch_on_eof) = 1;
1554 }
1555
1556 /** Removes and deletes the top of the stack, if present.
1557  *  The next element becomes the new top.
1558  *  
1559  */
1560 void yypop_buffer_state (void)
1561 {
1562         if (!YY_CURRENT_BUFFER)
1563                 return;
1564
1565         yy_delete_buffer(YY_CURRENT_BUFFER );
1566         YY_CURRENT_BUFFER_LVALUE = NULL;
1567         if ((yy_buffer_stack_top) > 0)
1568                 --(yy_buffer_stack_top);
1569
1570         if (YY_CURRENT_BUFFER) {
1571                 yy_load_buffer_state( );
1572                 (yy_did_buffer_switch_on_eof) = 1;
1573         }
1574 }
1575
1576 /* Allocates the stack if it does not exist.
1577  *  Guarantees space for at least one push.
1578  */
1579 static void yyensure_buffer_stack (void)
1580 {
1581         int num_to_alloc;
1582     
1583         if (!(yy_buffer_stack)) {
1584
1585                 /* First allocation is just for 2 elements, since we don't know if this
1586                  * scanner will even need a stack. We use 2 instead of 1 to avoid an
1587                  * immediate realloc on the next call.
1588          */
1589                 num_to_alloc = 1;
1590                 (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1591                                                                 (num_to_alloc * sizeof(struct yy_buffer_state*)
1592                                                                 );
1593                 if ( ! (yy_buffer_stack) )
1594                         YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1595                                                                   
1596                 memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1597                                 
1598                 (yy_buffer_stack_max) = num_to_alloc;
1599                 (yy_buffer_stack_top) = 0;
1600                 return;
1601         }
1602
1603         if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1604
1605                 /* Increase the buffer to prepare for a possible push. */
1606                 int grow_size = 8 /* arbitrary grow size */;
1607
1608                 num_to_alloc = (yy_buffer_stack_max) + grow_size;
1609                 (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
1610                                                                 ((yy_buffer_stack),
1611                                                                 num_to_alloc * sizeof(struct yy_buffer_state*)
1612                                                                 );
1613                 if ( ! (yy_buffer_stack) )
1614                         YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1615
1616                 /* zero only the new slots.*/
1617                 memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1618                 (yy_buffer_stack_max) = num_to_alloc;
1619         }
1620 }
1621
1622 /** Setup the input buffer state to scan directly from a user-specified character buffer.
1623  * @param base the character buffer
1624  * @param size the size in bytes of the character buffer
1625  * 
1626  * @return the newly allocated buffer state object. 
1627  */
1628 YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
1629 {
1630         YY_BUFFER_STATE b;
1631     
1632         if ( size < 2 ||
1633              base[size-2] != YY_END_OF_BUFFER_CHAR ||
1634              base[size-1] != YY_END_OF_BUFFER_CHAR )
1635                 /* They forgot to leave room for the EOB's. */
1636                 return 0;
1637
1638         b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
1639         if ( ! b )
1640                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1641
1642         b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
1643         b->yy_buf_pos = b->yy_ch_buf = base;
1644         b->yy_is_our_buffer = 0;
1645         b->yy_input_file = 0;
1646         b->yy_n_chars = b->yy_buf_size;
1647         b->yy_is_interactive = 0;
1648         b->yy_at_bol = 1;
1649         b->yy_fill_buffer = 0;
1650         b->yy_buffer_status = YY_BUFFER_NEW;
1651
1652         yy_switch_to_buffer(b  );
1653
1654         return b;
1655 }
1656
1657 /** Setup the input buffer state to scan a string. The next call to yylex() will
1658  * scan from a @e copy of @a str.
1659  * @param yystr a NUL-terminated string to scan
1660  * 
1661  * @return the newly allocated buffer state object.
1662  * @note If you want to scan bytes that may contain NUL values, then use
1663  *       yy_scan_bytes() instead.
1664  */
1665 YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
1666 {
1667     
1668         return yy_scan_bytes(yystr,strlen(yystr) );
1669 }
1670
1671 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1672  * scan from a @e copy of @a bytes.
1673  * @param yybytes the byte buffer to scan
1674  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1675  * 
1676  * @return the newly allocated buffer state object.
1677  */
1678 YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
1679 {
1680         YY_BUFFER_STATE b;
1681         char *buf;
1682         yy_size_t n;
1683         int i;
1684     
1685         /* Get memory for full buffer, including space for trailing EOB's. */
1686         n = _yybytes_len + 2;
1687         buf = (char *) yyalloc(n  );
1688         if ( ! buf )
1689                 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1690
1691         for ( i = 0; i < _yybytes_len; ++i )
1692                 buf[i] = yybytes[i];
1693
1694         buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1695
1696         b = yy_scan_buffer(buf,n );
1697         if ( ! b )
1698                 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1699
1700         /* It's okay to grow etc. this buffer, and we should throw it
1701          * away when we're done.
1702          */
1703         b->yy_is_our_buffer = 1;
1704
1705         return b;
1706 }
1707
1708 #ifndef YY_EXIT_FAILURE
1709 #define YY_EXIT_FAILURE 2
1710 #endif
1711
1712 static void yy_fatal_error (yyconst char* msg )
1713 {
1714         (void) fprintf( stderr, "%s\n", msg );
1715         exit( YY_EXIT_FAILURE );
1716 }
1717
1718 /* Redefine yyless() so it works in section 3 code. */
1719
1720 #undef yyless
1721 #define yyless(n) \
1722         do \
1723                 { \
1724                 /* Undo effects of setting up yytext. */ \
1725         int yyless_macro_arg = (n); \
1726         YY_LESS_LINENO(yyless_macro_arg);\
1727                 yytext[yyleng] = (yy_hold_char); \
1728                 (yy_c_buf_p) = yytext + yyless_macro_arg; \
1729                 (yy_hold_char) = *(yy_c_buf_p); \
1730                 *(yy_c_buf_p) = '\0'; \
1731                 yyleng = yyless_macro_arg; \
1732                 } \
1733         while ( 0 )
1734
1735 /* Accessor  methods (get/set functions) to struct members. */
1736
1737 /** Get the current line number.
1738  * 
1739  */
1740 int yyget_lineno  (void)
1741 {
1742         
1743     return yylineno;
1744 }
1745
1746 /** Get the input stream.
1747  * 
1748  */
1749 FILE *yyget_in  (void)
1750 {
1751         return yyin;
1752 }
1753
1754 /** Get the output stream.
1755  * 
1756  */
1757 FILE *yyget_out  (void)
1758 {
1759         return yyout;
1760 }
1761
1762 /** Get the length of the current token.
1763  * 
1764  */
1765 int yyget_leng  (void)
1766 {
1767         return yyleng;
1768 }
1769
1770 /** Get the current token.
1771  * 
1772  */
1773
1774 char *yyget_text  (void)
1775 {
1776         return yytext;
1777 }
1778
1779 /** Set the current line number.
1780  * @param line_number
1781  * 
1782  */
1783 void yyset_lineno (int  line_number )
1784 {
1785     
1786     yylineno = line_number;
1787 }
1788
1789 /** Set the input stream. This does not discard the current
1790  * input buffer.
1791  * @param in_str A readable stream.
1792  * 
1793  * @see yy_switch_to_buffer
1794  */
1795 void yyset_in (FILE *  in_str )
1796 {
1797         yyin = in_str ;
1798 }
1799
1800 void yyset_out (FILE *  out_str )
1801 {
1802         yyout = out_str ;
1803 }
1804
1805 int yyget_debug  (void)
1806 {
1807         return yy_flex_debug;
1808 }
1809
1810 void yyset_debug (int  bdebug )
1811 {
1812         yy_flex_debug = bdebug ;
1813 }
1814
1815 static int yy_init_globals (void)
1816 {
1817         /* Initialization is the same as for the non-reentrant scanner.
1818      * This function is called from yylex_destroy(), so don't allocate here.
1819      */
1820
1821     (yy_buffer_stack) = 0;
1822     (yy_buffer_stack_top) = 0;
1823     (yy_buffer_stack_max) = 0;
1824     (yy_c_buf_p) = (char *) 0;
1825     (yy_init) = 0;
1826     (yy_start) = 0;
1827
1828 /* Defined in main.c */
1829 #ifdef YY_STDINIT
1830     yyin = stdin;
1831     yyout = stdout;
1832 #else
1833     yyin = (FILE *) 0;
1834     yyout = (FILE *) 0;
1835 #endif
1836
1837     /* For future reference: Set errno on error, since we are called by
1838      * yylex_init()
1839      */
1840     return 0;
1841 }
1842
1843 /* yylex_destroy is for both reentrant and non-reentrant scanners. */
1844 int yylex_destroy  (void)
1845 {
1846     
1847     /* Pop the buffer stack, destroying each element. */
1848         while(YY_CURRENT_BUFFER){
1849                 yy_delete_buffer(YY_CURRENT_BUFFER  );
1850                 YY_CURRENT_BUFFER_LVALUE = NULL;
1851                 yypop_buffer_state();
1852         }
1853
1854         /* Destroy the stack itself. */
1855         yyfree((yy_buffer_stack) );
1856         (yy_buffer_stack) = NULL;
1857
1858     /* Reset the globals. This is important in a non-reentrant scanner so the next time
1859      * yylex() is called, initialization will occur. */
1860     yy_init_globals( );
1861
1862     return 0;
1863 }
1864
1865 /*
1866  * Internal utility routines.
1867  */
1868
1869 #ifndef yytext_ptr
1870 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
1871 {
1872         register int i;
1873         for ( i = 0; i < n; ++i )
1874                 s1[i] = s2[i];
1875 }
1876 #endif
1877
1878 #ifdef YY_NEED_STRLEN
1879 static int yy_flex_strlen (yyconst char * s )
1880 {
1881         register int n;
1882         for ( n = 0; s[n]; ++n )
1883                 ;
1884
1885         return n;
1886 }
1887 #endif
1888
1889 void *yyalloc (yy_size_t  size )
1890 {
1891         return (void *) malloc( size );
1892 }
1893
1894 void *yyrealloc  (void * ptr, yy_size_t  size )
1895 {
1896         /* The cast to (char *) in the following accommodates both
1897          * implementations that use char* generic pointers, and those
1898          * that use void* generic pointers.  It works with the latter
1899          * because both ANSI C and C++ allow castless assignment from
1900          * any pointer type to void*, and deal with argument conversions
1901          * as though doing an assignment.
1902          */
1903         return (void *) realloc( (char *) ptr, size );
1904 }
1905
1906 void yyfree (void * ptr )
1907 {
1908         free( (char *) ptr );   /* see yyrealloc() for (char *) cast */
1909 }
1910
1911 #define YYTABLES_NAME "yytables"
1912