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