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.18.50/] [binutils/] [deflex.c] - Blame information for rev 631

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

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

powered by: WebSVN 2.1.0

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