OpenCores
URL https://opencores.org/ocsvn/diogenes/diogenes/trunk

Subversion Repositories diogenes

[/] [diogenes/] [tags/] [initial/] [asm/] [lex.yy.c] - Blame information for rev 236

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.