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