OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [binutils-2.20.1/] [binutils/] [deflex.c] - Blame information for rev 328

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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