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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [binutils-2.20.1/] [gas/] [bfin-lex.c] - Blame information for rev 438

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

Line No. Rev Author Line
1 205 julius
 
2
#line 3 "bfin-lex.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 237
363
#define YY_END_OF_BUFFER 238
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[555] =
372
    {   0,
373
        0,    0,    0,    0,  238,  236,  234,  234,  219,  232,
374
      218,  217,  199,  200,  215,  213,  210,  209,  202,  231,
375
      231,  201,  220,  198,  194,  236,  223,  232,  148,  232,
376
      232,  232,  232,  232,  232,  232,  232,  232,   70,  232,
377
      232,  232,   54,   19,   18,  232,   12,   10,    8,    7,
378
      188,  187,  186,  232,  184,  182,  232,  232,  232,  232,
379
      232,  232,  216,  214,  212,  211,    0,  208,  203,    0,
380
        0,    0,  231,  233,    0,  197,  195,  221,  193,  192,
381
      177,  174,  232,  232,  232,  150,  151,  232,  232,  149,
382
        0,  147,  232,  140,  232,  232,  136,  232,  125,  232,
383
 
384
      123,  232,  232,  232,  232,  232,  232,  232,  103,  102,
385
      101,  232,  100,   99,  232,  232,   97,  232,   95,   94,
386
       93,   91,  232,   85,  232,  232,   77,   86,  232,   71,
387
       69,  232,  232,  232,  232,   65,  232,  232,  232,   59,
388
      232,   56,  232,  232,   53,  232,  232,  232,  232,  232,
389
      232,  232,  232,  232,  232,  232,  232,   25,  232,  232,
390
      232,  232,  232,   15,   14,  232,  232,  158,  232,  185,
391
      232,  183,  222,  232,  232,   95,  232,  232,  232,  204,
392
      206,  205,  207,    0,    0,  231,  231,  196,  190,  191,
393
      232,  232,  170,  152,  153,  232,  232,  161,  162,  232,
394
 
395
      154,  156,  231,  232,  232,  232,  232,  232,  232,  124,
396
      232,  232,  119,  232,  232,  232,  232,  232,  232,  232,
397
      232,  232,  178,   98,  232,  232,  232,  232,  232,  232,
398
       80,   83,   78,   81,  232,  232,  232,   79,   82,  232,
399
       67,   66,  232,   63,   62,  232,  232,  232,  232,  232,
400
      232,  232,  232,  232,  232,   44,   39,   38,   37,   36,
401
       35,   34,  232,   32,   31,  232,  232,  232,  232,  232,
402
      232,  232,   21,  232,  232,   16,   13,  232,    9,  232,
403
      232,  232,  232,  232,  232,  232,  235,  189,  169,  167,
404
      176,  175,  168,  166,  173,  172,  232,  232,  232,  155,
405
 
406
      157,  146,  232,  232,  232,  232,  139,  138,  232,  127,
407
      232,  232,  118,  232,  232,  232,  232,  111,  110,  232,
408
      232,  232,  232,  232,  232,  232,  105,  104,  232,  232,
409
      232,   96,  232,   92,   89,   84,   74,  232,  232,   68,
410
       64,  232,   61,   60,   58,   57,  232,   55,   45,  232,
411
       50,   47,   49,   46,   48,  232,  232,   43,   42,  232,
412
      232,  232,  232,  232,   27,   24,   23,  232,  232,  232,
413
      232,  232,  232,  227,  232,  226,  232,  232,  232,  232,
414
      159,  232,  232,  232,  232,  232,  232,  232,  232,  232,
415
      232,  122,  232,  117,  116,  232,  232,  232,  232,  232,
416
 
417
      232,  232,  232,  108,  232,  232,  232,  232,  232,  232,
418
      232,  232,  232,  232,    2,  181,   52,   41,   40,   33,
419
      232,  232,  232,   30,  232,   22,  232,  232,  232,  171,
420
      230,  232,  232,  232,  232,  232,  163,  160,  145,  144,
421
      143,  142,  141,  232,  232,  232,  232,  126,  121,  232,
422
      232,  232,  232,  232,   51,  232,  232,  107,  232,  232,
423
      232,  232,  232,   88,   87,   90,  232,  232,   73,   72,
424
       29,  232,  232,  232,   20,  232,  232,  232,  228,  232,
425
      225,  164,  165,  232,  232,  232,  232,  232,  232,  120,
426
      232,  114,  113,  232,  232,  232,    5,  106,  232,  179,
427
 
428
      232,  232,  232,  232,   28,  232,  232,   17,   11,  232,
429
      232,  232,  232,  135,  133,  134,  132,  129,  232,  115,
430
      232,    6,  109,  232,  232,    3,  232,   76,    1,   26,
431
      229,  224,  137,  130,  131,  232,  232,  232,  232,  232,
432
      128,  232,  232,    4,   75,  232,  232,  112,  232,  232,
433
      232,  232,  180,    0
434
    } ;
435
 
436
static yyconst flex_int32_t yy_ec[256] =
437
    {   0,
438
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
439
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
440
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
441
        1,    2,    4,    1,    5,    6,    7,    8,    1,    9,
442
       10,   11,   12,   13,   14,   15,   16,   17,   18,   19,
443
       20,   21,   22,   23,   24,   25,   26,   27,   28,   29,
444
       30,   31,    1,   32,   33,   34,   35,   36,   37,   38,
445
       39,   40,   41,   42,   43,   44,   45,   46,   47,   48,
446
       49,   50,   51,   52,   53,   54,   55,   56,   57,   58,
447
       59,    1,   60,   61,   62,    1,   63,   64,   35,   36,
448
 
449
       37,   38,   39,   40,   41,   42,   43,   44,   45,   46,
450
       65,   48,   49,   66,   51,   67,   53,   54,   55,   56,
451
       57,   58,    1,   68,    1,   69,    1,    1,    1,    1,
452
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
453
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
454
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
455
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
456
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
457
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
458
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
459
 
460
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
461
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
462
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
463
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
464
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
465
        1,    1,    1,    1,    1
466
    } ;
467
 
468
static yyconst flex_int32_t yy_meta[70] =
469
    {   0,
470
        1,    1,    2,    1,    1,    3,    1,    1,    1,    1,
471
        1,    1,    1,    1,    4,    1,    5,    5,    5,    5,
472
        5,    5,    5,    5,    5,    5,    1,    1,    1,    1,
473
        1,    1,    6,    5,    6,    6,    6,    5,    3,    3,
474
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
475
        3,    3,    3,    3,    3,    4,    3,    3,    1,    1,
476
        1,    3,    6,    5,    3,    3,    3,    1,    1
477
    } ;
478
 
479
static yyconst flex_int16_t yy_base[560] =
480
    {   0,
481
        0,    0,   32,   33,  758,  759,  759,  759,  759,    0,
482
      759,  727,  759,  759,  726,   60,  759,   61,  744,   63,
483
       68,  759,  759,   58,   75,  723,  759,  116,  176,   60,
484
       79,   44,   87,   89,   98,  165,  700,  226,  158,   47,
485
      113,  277,  327,  376,  108,  701,   58,  731,    0,    0,
486
      759,  759,  720,  685,  100,  759,  144,   72,  707,   65,
487
      118,    0,  759,  759,  759,  759,  143,  759,  759,  149,
488
      736,  189,  230,  759,    0,  716,  759,  759,  759,   91,
489
      730,  729,  692,  120,  701,    0,    0,  218,  154,    0,
490
        0,  726,  135,    0,  703,   49,  167,  695,    0,  697,
491
 
492
        0,  680,  701,  696,  686,   93,  680,  234,  717,  685,
493
        0,  168,    0,    0,  170,  693,  714,  684,    0,    0,
494
      676,    0,  681,  710,  172,  210,    0,  176,  199,  212,
495
      709,  667,  676,  210,  235,    0,  224,  684,  173,  705,
496
      684,    0,  207,  672,  702,  675,  212,  679,  213,  263,
497
      222,  243,  258,  259,  214,  673,  674,  697,  654,  669,
498
      658,  657,  654,    0,    0,  658,  251,    0,  686,  759,
499
      135,  759,  759,  651,  659,  658,  655,  270,  656,  759,
500
      759,  759,  759,  688,  304,  311,    0,  759,  759,  668,
501
      298,  312,    0,    0,    0,  658,  655,    0,    0,  278,
502
 
503
      644,  643,    0,  273,  320,  639,  309,  655,  647,    0,
504
      644,  645,  343,  292,  325,  275,  326,  333,  336,  320,
505
      340,  653,  669,    0,  327,  345,  649,  666,  636,  357,
506
        0,    0,    0,    0,  635,  348,  641,    0,    0,  358,
507
        0,    0,  633,    0,    0,  644,  628,  643,  363,  634,
508
      628,  352,  378,  624,  384,  413,    0,    0,    0,    0,
509
        0,    0,  628,    0,    0,  360,  622,  370,  634,  625,
510
      394,  624,    0,  634,  356,    0,    0,  606,    0,  601,
511
      615,  628,  611,  620,  624,  620,  649,  759,    0,    0,
512
        0,    0,    0,    0,    0,    0,  613,  620,  377,    0,
513
 
514
        0,    0,  613,  603,  618,  398,    0,  603,  398,  638,
515
      617,  614,  408,  605,  408,  598,  604,    0,    0,  414,
516
      417,  591,  593,  402,  609,  422,    0,    0,  608,  619,
517
      406,    0,  580,    0,  626,    0,  578,  586,  600,    0,
518
        0,  600,    0,    0,    0,    0,  601,    0,    0,  598,
519
        0,    0,    0,    0,    0,  615,  616,    0,    0,  596,
520
      596,  406,  593,  407,  426,    0,    0,  594,  590,  576,
521
      581,  558,  584,  561,  571,    0,  584,  574,  443,  412,
522
        0,  415,  563,  415,  574,  424,  577,  568,  433,  569,
523
      558,    0,  562,    0,    0,  564,  567,  569,  570,  555,
524
 
525
      426,  572,  555,    0,  563,  569,  566,  557,  566,  420,
526
      443,  455,  552,  431,    0,    0,    0,    0,    0,    0,
527
      559,  442,  547,    0,  556,    0,  557,  558,  451,    0,
528
      553,  553,  436,  549,  568,  569,    0,    0,    0,    0,
529
        0,    0,    0,  548,  482,  553,  539,    0,  567,  541,
530
      443,  445,  538,  532,    0,  534,  544,    0,  454,  529,
531
      558,  471,  541,    0,    0,    0,  540,  530,    0,    0,
532
        0,  455,  538,  456,    0,  457,  518,  527,    0,  537,
533
        0,    0,    0,  533,  150,  468,  522,  526,  478,    0,
534
      512,    0,    0,  530,  529,  463,    0,    0,  530,    0,
535
 
536
      511,  514,  523,  525,    0,  465,  501,    0,    0,  489,
537
      500,  466,  480,    0,    0,    0,    0,    0,  504,    0,
538
      481,    0,    0,  474,  484,    0,  490,    0,    0,    0,
539
        0,    0,    0,    0,    0,  483,  370,  352,  345,  279,
540
        0,  219,  473,    0,    0,  475,  477,    0,  220,  207,
541
      134,   61,    0,  759,  542,  545,  550,  552,  554
542
    } ;
543
 
544
static yyconst flex_int16_t yy_def[560] =
545
    {   0,
546
      554,    1,    1,    1,  554,  554,  554,  554,  554,  555,
547
      554,  554,  554,  554,  554,  554,  554,  554,  554,  556,
548
      556,  554,  554,  554,  554,  554,  554,  555,  555,  555,
549
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
550
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
551
      554,  554,  554,   28,  554,  554,  555,   36,   38,   42,
552
      555,  555,  554,  554,  554,  554,  554,  554,  554,  554,
553
      557,  554,  554,  554,  558,  554,  554,  554,  554,  554,
554
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
555
      559,  555,  555,  555,  555,  555,  555,  555,  555,  555,
556
 
557
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
558
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
559
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
560
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
561
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
562
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
563
      555,  555,  555,  555,  555,  555,  555,  555,  555,  554,
564
      555,  554,  554,  555,  555,  555,  555,  555,  555,  554,
565
      554,  554,  554,  557,  557,  554,  558,  554,  554,  554,
566
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
567
 
568
      555,  555,  559,  555,  555,  555,  555,  555,  555,  555,
569
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
570
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
571
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
572
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
573
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
574
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
575
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
576
      555,  555,  555,  555,  555,  555,  557,  554,  555,  555,
577
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
578
 
579
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
580
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
581
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
582
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
583
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
584
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
585
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
586
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
587
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
588
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
589
 
590
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
591
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
592
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
593
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
594
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
595
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
596
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
597
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
598
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
599
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
600
 
601
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
602
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
603
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
604
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
605
      555,  555,  555,  555,  555,  555,  555,  555,  555,  555,
606
      555,  555,  555,    0,  554,  554,  554,  554,  554
607
    } ;
608
 
609
static yyconst flex_int16_t yy_nxt[829] =
610
    {   0,
611
        6,    7,    8,    9,    6,   10,   11,   12,   13,   14,
612
       15,   16,   17,   18,   10,   19,   20,   21,   21,   21,
613
       21,   21,   21,   21,   21,   21,   22,   23,   24,   25,
614
       26,   27,   28,   29,   30,   31,   32,   33,   34,   35,
615
       36,   37,   10,   38,   39,   40,   41,   42,   10,   43,
616
       44,   45,   46,   47,   48,   49,   10,   50,   51,   52,
617
       53,   10,   54,   29,   41,   43,   45,   55,   56,   57,
618
       57,   65,   58,   58,   68,   59,   59,   72,   78,   60,
619
       60,  553,  554,   91,   61,   61,   76,   77,  107,   66,
620
       69,   91,   98,  135,   99,  207,   74,  136,  167,  108,
621
 
622
       74,   74,   91,  100,   79,   74,  101,  175,  168,  176,
623
      102,  135,  104,  207,  178,  105,  103,   91,   75,  106,
624
      189,  190,   98,  554,  101,  111,   74,   67,   70,  172,
625
      178,   74,   81,   82,  109,  112,  194,  195,  114,  110,
626
      113,  115,  104,  215,  162,  163,  216,  164,   91,   83,
627
       84,  165,  116,  112,  180,  113,  181,  137,  138,   85,
628
      182,   86,  183,  179,   87,  139,   88,  173,  166,   89,
629
      201,  202,  513,   90,  131,  131,  131,  131,  552,   83,
630
       91,  117,  117,  117,  117,  193,  205,  174,  231,  232,
631
      132,  109,   92,   92,   92,   92,  110,  514,  133,  280,
632
 
633
      118,  205,  119,  134,  120,  186,  186,  186,  186,  186,
634
      186,  186,  186,  186,  186,  121,   93,  122,  208,  223,
635
      132,  224,  235,   94,  248,   95,  233,  234,  238,  239,
636
      551,   96,   97,  208,  223,  236,  224,  550,  237,  248,
637
      235,   95,  124,  124,  124,  124,   73,   73,   73,   73,
638
       73,   73,   73,   73,   73,   73,  243,  197,  251,  125,
639
      126,  198,  127,  255,  257,  268,  546,  199,  218,  200,
640
      246,  263,  128,  251,  243,  264,  129,  130,  255,  257,
641
      268,  219,  244,  199,  200,  220,  245,  263,  246,  125,
642
      128,  266,  130,  140,  140,  140,  140,  140,  140,  258,
643
 
644
      220,  245,  278,  259,  265,  264,  285,  267,  260,  141,
645
      299,  142,  302,  261,  185,  252,  302,  278,  262,  287,
646
      143,  266,  265,  318,  545,  319,  144,  186,  186,  186,
647
      186,  186,  186,  186,  186,  186,  186,  289,  316,  141,
648
      299,  290,  144,  145,  145,  145,  145,  145,  145,  145,
649
      145,  293,  291,  292,  303,  294,  316,  317,  308,  146,
650
      320,  321,  322,  147,  304,  323,  295,  296,  325,  326,
651
      305,  306,  148,  149,  308,  313,  331,  314,  150,  327,
652
      324,  544,  315,  328,  332,  326,  306,  317,  332,  146,
653
      543,  149,  331,  150,  151,  323,  336,  340,  325,  338,
654
 
655
      336,  340,  345,  348,  542,  313,  345,  370,  152,  361,
656
      153,  349,  154,  155,  338,  156,  157,  349,  348,  363,
657
      351,  349,  370,  158,  352,  361,  159,  160,  381,  353,
658
      356,  357,  161,  366,  354,  363,  385,  367,  152,  355,
659
      397,  349,  160,  381,  388,  389,  400,  394,  386,  401,
660
      390,  395,  358,  404,  406,  409,  359,  422,  424,  425,
661
      435,  436,  388,  438,  439,  446,  441,  437,  404,  463,
662
      397,  409,  422,  424,  472,  443,  400,  455,  438,  401,
663
      439,  441,  470,  477,  406,  463,  464,  480,  467,  425,
664
      443,  468,  455,  465,  492,  446,  493,  470,  466,  485,
665
 
666
      486,  487,  480,  501,  472,  498,  505,  507,  508,  492,
667
      519,  493,  515,  477,  523,  516,  529,  533,  467,  547,
668
      498,  505,  507,  508,  534,  541,  548,  535,  549,  523,
669
      540,  529,  533,  501,  539,  538,  537,  547,  536,  532,
670
      519,  548,  531,  549,   62,   62,   62,   62,   73,   73,
671
      184,  530,  184,  184,  184,  184,  187,  187,  203,  203,
672
      528,  527,  526,  525,  524,  522,  521,  520,  518,  517,
673
      512,  511,  510,  509,  506,  504,  503,  502,  500,  499,
674
      497,  496,  495,  494,  491,  490,  489,  488,  484,  483,
675
      482,  481,  479,  478,  476,  475,  474,  473,  471,  469,
676
 
677
      462,  461,  460,  459,  458,  457,  456,  454,  453,  452,
678
      451,  450,  449,  448,  447,  445,  444,  442,  440,  434,
679
      433,  432,  410,  431,  430,  429,  428,  427,  426,  423,
680
      421,  420,  419,  418,  417,  416,  415,  414,  413,  412,
681
      411,  410,  408,  407,  405,  403,  402,  399,  398,  396,
682
      393,  392,  391,  387,  384,  383,  382,  380,  379,  185,
683
      378,  377,  376,  375,  374,  373,  372,  371,  369,  368,
684
      365,  364,  362,  360,  350,  347,  346,  344,  343,  342,
685
      341,  339,  337,  335,  334,  333,  330,  329,  312,  311,
686
      310,  309,  307,  301,  300,  298,  297,  288,  185,  286,
687
 
688
      284,  283,  282,  281,  279,  277,  276,  275,  274,  273,
689
      272,  271,  270,  269,  256,  254,  253,  252,  250,  249,
690
      247,  242,  241,  240,  230,  229,  228,  227,  226,  225,
691
      222,  221,  217,  214,  213,  212,  211,  210,  209,  206,
692
      204,  196,  193,  192,  191,  188,  185,  177,  171,  170,
693
      169,  166,  123,   80,   71,   64,   63,  554,    5,  554,
694
      554,  554,  554,  554,  554,  554,  554,  554,  554,  554,
695
      554,  554,  554,  554,  554,  554,  554,  554,  554,  554,
696
      554,  554,  554,  554,  554,  554,  554,  554,  554,  554,
697
      554,  554,  554,  554,  554,  554,  554,  554,  554,  554,
698
 
699
      554,  554,  554,  554,  554,  554,  554,  554,  554,  554,
700
      554,  554,  554,  554,  554,  554,  554,  554,  554,  554,
701
      554,  554,  554,  554,  554,  554,  554,  554
702
    } ;
703
 
704
static yyconst flex_int16_t yy_chk[829] =
705
    {   0,
706
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
707
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
708
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
709
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
710
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
711
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
712
        1,    1,    1,    1,    1,    1,    1,    1,    1,    3,
713
        4,   16,    3,    4,   18,    3,    4,   20,   25,    3,
714
        4,  552,   21,   31,    3,    4,   24,   24,   32,   16,
715
       18,   33,   30,   40,   30,   96,   20,   40,   47,   32,
716
 
717
       20,   21,   35,   30,   25,   21,   30,   58,   47,   58,
718
       30,   40,   31,   96,   60,   31,   30,   41,   20,   31,
719
       80,   80,   30,   21,   30,   34,   20,   16,   18,   55,
720
       60,   21,   28,   28,   33,   34,   84,   84,   35,   33,
721
       34,   35,   31,  106,   45,   45,  106,   45,   57,   28,
722
       28,   45,   35,   34,   67,   34,   67,   41,   41,   28,
723
       70,   28,   70,   61,   28,   41,   28,   55,   61,   28,
724
       89,   89,  485,   28,   39,   39,   39,   39,  551,   28,
725
       29,   36,   36,   36,   36,  171,   93,   57,  125,  125,
726
       39,   57,   29,   29,   29,   29,   57,  485,   39,  171,
727
 
728
       36,   93,   36,   39,   36,   72,   72,   72,   72,   72,
729
       72,   72,   72,   72,   72,   36,   29,   36,   97,  112,
730
       39,  115,  128,   29,  139,   29,  126,  126,  130,  130,
731
      550,   29,   29,   97,  112,  129,  115,  549,  129,  139,
732
      128,   29,   38,   38,   38,   38,   73,   73,   73,   73,
733
       73,   73,   73,   73,   73,   73,  134,   88,  143,   38,
734
       38,   88,   38,  147,  149,  155,  542,   88,  108,   88,
735
      137,  151,   38,  143,  134,  152,   38,   38,  147,  149,
736
      155,  108,  135,   88,   88,  108,  135,  151,  137,   38,
737
       38,  154,   38,   42,   42,   42,   42,   42,   42,  150,
738
 
739
      108,  135,  167,  150,  153,  152,  178,  154,  150,   42,
740
      200,   42,  204,  150,  185,  178,  204,  167,  150,  185,
741
       42,  154,  153,  216,  540,  216,   42,  186,  186,  186,
742
      186,  186,  186,  186,  186,  186,  186,  191,  214,   42,
743
      200,  191,   42,   43,   43,   43,   43,   43,   43,   43,
744
       43,  192,  191,  191,  205,  192,  214,  215,  207,   43,
745
      217,  217,  217,   43,  205,  218,  192,  192,  219,  220,
746
      205,  205,   43,   43,  207,  213,  225,  213,   43,  221,
747
      218,  539,  213,  221,  226,  220,  205,  215,  226,   43,
748
      538,   43,  225,   43,   44,  218,  230,  240,  219,  236,
749
 
750
      230,  240,  249,  252,  537,  213,  249,  275,   44,  266,
751
       44,  253,   44,   44,  236,   44,   44,  253,  252,  268,
752
      255,  253,  275,   44,  255,  266,   44,   44,  299,  255,
753
      256,  256,   44,  271,  255,  268,  306,  271,   44,  255,
754
      315,  253,   44,  299,  309,  309,  320,  313,  306,  321,
755
      309,  313,  256,  324,  326,  331,  256,  362,  364,  365,
756
      379,  379,  309,  380,  382,  389,  384,  379,  324,  410,
757
      315,  331,  362,  364,  422,  386,  320,  401,  380,  321,
758
      382,  384,  414,  429,  326,  410,  411,  433,  412,  365,
759
      386,  412,  401,  411,  451,  389,  452,  414,  411,  445,
760
 
761
      445,  445,  433,  462,  422,  459,  472,  474,  476,  451,
762
      489,  452,  486,  429,  496,  486,  506,  512,  412,  543,
763
      459,  472,  474,  476,  513,  536,  546,  513,  547,  496,
764
      527,  506,  512,  462,  525,  524,  521,  543,  519,  511,
765
      489,  546,  510,  547,  555,  555,  555,  555,  556,  556,
766
      557,  507,  557,  557,  557,  557,  558,  558,  559,  559,
767
      504,  503,  502,  501,  499,  495,  494,  491,  488,  487,
768
      484,  480,  478,  477,  473,  468,  467,  463,  461,  460,
769
      457,  456,  454,  453,  450,  449,  447,  446,  444,  436,
770
      435,  434,  432,  431,  428,  427,  425,  423,  421,  413,
771
 
772
      409,  408,  407,  406,  405,  403,  402,  400,  399,  398,
773
      397,  396,  393,  391,  390,  388,  387,  385,  383,  378,
774
      377,  375,  374,  373,  372,  371,  370,  369,  368,  363,
775
      361,  360,  357,  356,  350,  347,  342,  339,  338,  337,
776
      335,  333,  330,  329,  325,  323,  322,  317,  316,  314,
777
      312,  311,  310,  308,  305,  304,  303,  298,  297,  287,
778
      286,  285,  284,  283,  282,  281,  280,  278,  274,  272,
779
      270,  269,  267,  263,  254,  251,  250,  248,  247,  246,
780
      243,  237,  235,  229,  228,  227,  223,  222,  212,  211,
781
      209,  208,  206,  202,  201,  197,  196,  190,  184,  179,
782
 
783
      177,  176,  175,  174,  169,  166,  163,  162,  161,  160,
784
      159,  158,  157,  156,  148,  146,  145,  144,  141,  140,
785
      138,  133,  132,  131,  124,  123,  121,  118,  117,  116,
786
      110,  109,  107,  105,  104,  103,  102,  100,   98,   95,
787
       92,   85,   83,   82,   81,   76,   71,   59,   54,   53,
788
       48,   46,   37,   26,   19,   15,   12,    5,  554,  554,
789
      554,  554,  554,  554,  554,  554,  554,  554,  554,  554,
790
      554,  554,  554,  554,  554,  554,  554,  554,  554,  554,
791
      554,  554,  554,  554,  554,  554,  554,  554,  554,  554,
792
      554,  554,  554,  554,  554,  554,  554,  554,  554,  554,
793
 
794
      554,  554,  554,  554,  554,  554,  554,  554,  554,  554,
795
      554,  554,  554,  554,  554,  554,  554,  554,  554,  554,
796
      554,  554,  554,  554,  554,  554,  554,  554
797
    } ;
798
 
799
static yy_state_type yy_last_accepting_state;
800
static char *yy_last_accepting_cpos;
801
 
802
extern int yy_flex_debug;
803
int yy_flex_debug = 0;
804
 
805
/* The intent behind this definition is that it'll catch
806
 * any uses of REJECT which flex missed.
807
 */
808
#define REJECT reject_used_but_not_detected
809
#define yymore() yymore_used_but_not_detected
810
#define YY_MORE_ADJ 0
811
#define YY_RESTORE_YY_MORE_OFFSET
812
char *yytext;
813
#line 1 "bfin-lex.l"
814
/* bfin-lex.l  ADI Blackfin lexer
815
   Copyright 2005, 2006, 2007, 2008
816
   Free Software Foundation, Inc.
817
 
818
   This file is part of GAS, the GNU Assembler.
819
 
820
   GAS is free software; you can redistribute it and/or modify
821
   it under the terms of the GNU General Public License as published by
822
   the Free Software Foundation; either version 3, or (at your option)
823
   any later version.
824
 
825
   GAS is distributed in the hope that it will be useful,
826
   but WITHOUT ANY WARRANTY; without even the implied warranty of
827
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
828
   GNU General Public License for more details.
829
 
830
   You should have received a copy of the GNU General Public License
831
   along with GAS; see the file COPYING.  If not, write to the Free
832
   Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
833
   02110-1301, USA.  */
834
#line 22 "bfin-lex.l"
835
 
836
#include "as.h"
837
#include "bfin-defs.h"
838
#include "bfin-parse.h"
839
 
840
static long parse_int (char **end);
841
static int parse_halfreg (Register *r, int cl, char *hr);
842
static int parse_reg (Register *r, int type, char *rt);
843
int yylex (void);
844
 
845
#define _REG yylval.reg
846
 
847
 
848
/* Define Start States ... Actually we will use exclusion.
849
   If no start state is specified it should match any state
850
   and <INITIAL> would match some keyword rules only with
851
   initial.  */
852
 
853
#line 854 "bfin-lex.c"
854
 
855
#define INITIAL 0
856
#define KEYWORD 1
857
 
858
#ifndef YY_NO_UNISTD_H
859
/* Special case for "unistd.h", since it is non-ANSI. We include it way
860
 * down here because we want the user's section 1 to have been scanned first.
861
 * The user has a chance to override it with an option.
862
 */
863
#include <unistd.h>
864
#endif
865
 
866
#ifndef YY_EXTRA_TYPE
867
#define YY_EXTRA_TYPE void *
868
#endif
869
 
870
static int yy_init_globals (void );
871
 
872
/* Accessor methods to globals.
873
   These are made visible to non-reentrant scanners for convenience. */
874
 
875
int yylex_destroy (void );
876
 
877
int yyget_debug (void );
878
 
879
void yyset_debug (int debug_flag  );
880
 
881
YY_EXTRA_TYPE yyget_extra (void );
882
 
883
void yyset_extra (YY_EXTRA_TYPE user_defined  );
884
 
885
FILE *yyget_in (void );
886
 
887
void yyset_in  (FILE * in_str  );
888
 
889
FILE *yyget_out (void );
890
 
891
void yyset_out  (FILE * out_str  );
892
 
893
yy_size_t yyget_leng (void );
894
 
895
char *yyget_text (void );
896
 
897
int yyget_lineno (void );
898
 
899
void yyset_lineno (int line_number  );
900
 
901
/* Macros after this point can all be overridden by user definitions in
902
 * section 1.
903
 */
904
 
905
#ifndef YY_SKIP_YYWRAP
906
#ifdef __cplusplus
907
extern "C" int yywrap (void );
908
#else
909
extern int yywrap (void );
910
#endif
911
#endif
912
 
913
    static void yyunput (int c,char *buf_ptr  );
914
 
915
#ifndef yytext_ptr
916
static void yy_flex_strncpy (char *,yyconst char *,int );
917
#endif
918
 
919
#ifdef YY_NEED_STRLEN
920
static int yy_flex_strlen (yyconst char * );
921
#endif
922
 
923
#ifndef YY_NO_INPUT
924
 
925
#ifdef __cplusplus
926
static int yyinput (void );
927
#else
928
static int input (void );
929
#endif
930
 
931
#endif
932
 
933
/* Amount of stuff to slurp up with each read. */
934
#ifndef YY_READ_BUF_SIZE
935
#define YY_READ_BUF_SIZE 8192
936
#endif
937
 
938
/* Copy whatever the last rule matched to the standard output. */
939
#ifndef ECHO
940
/* This used to be an fputs(), but since the string might contain NUL's,
941
 * we now use fwrite().
942
 */
943
#define ECHO fwrite( yytext, yyleng, 1, yyout )
944
#endif
945
 
946
/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
947
 * is returned in "result".
948
 */
949
#ifndef YY_INPUT
950
#define YY_INPUT(buf,result,max_size) \
951
        if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
952
                { \
953
                int c = '*'; \
954
                yy_size_t n; \
955
                for ( n = 0; n < max_size && \
956
                             (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
957
                        buf[n] = (char) c; \
958
                if ( c == '\n' ) \
959
                        buf[n++] = (char) c; \
960
                if ( c == EOF && ferror( yyin ) ) \
961
                        YY_FATAL_ERROR( "input in flex scanner failed" ); \
962
                result = n; \
963
                } \
964
        else \
965
                { \
966
                errno=0; \
967
                while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
968
                        { \
969
                        if( errno != EINTR) \
970
                                { \
971
                                YY_FATAL_ERROR( "input in flex scanner failed" ); \
972
                                break; \
973
                                } \
974
                        errno=0; \
975
                        clearerr(yyin); \
976
                        } \
977
                }\
978
\
979
 
980
#endif
981
 
982
/* No semi-colon after return; correct usage is to write "yyterminate();" -
983
 * we don't want an extra ';' after the "return" because that will cause
984
 * some compilers to complain about unreachable statements.
985
 */
986
#ifndef yyterminate
987
#define yyterminate() return YY_NULL
988
#endif
989
 
990
/* Number of entries by which start-condition stack grows. */
991
#ifndef YY_START_STACK_INCR
992
#define YY_START_STACK_INCR 25
993
#endif
994
 
995
/* Report a fatal error. */
996
#ifndef YY_FATAL_ERROR
997
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
998
#endif
999
 
1000
/* end tables serialization structures and prototypes */
1001
 
1002
/* Default declaration of generated scanner - a define so the user can
1003
 * easily add parameters.
1004
 */
1005
#ifndef YY_DECL
1006
#define YY_DECL_IS_OURS 1
1007
 
1008
extern int yylex (void);
1009
 
1010
#define YY_DECL int yylex (void)
1011
#endif /* !YY_DECL */
1012
 
1013
/* Code executed at the beginning of each rule, after yytext and yyleng
1014
 * have been set up.
1015
 */
1016
#ifndef YY_USER_ACTION
1017
#define YY_USER_ACTION
1018
#endif
1019
 
1020
/* Code executed at the end of each rule. */
1021
#ifndef YY_BREAK
1022
#define YY_BREAK break;
1023
#endif
1024
 
1025
#define YY_RULE_SETUP \
1026
        YY_USER_ACTION
1027
 
1028
/** The main scanner function which does all the work.
1029
 */
1030
YY_DECL
1031
{
1032
        register yy_state_type yy_current_state;
1033
        register char *yy_cp, *yy_bp;
1034
        register int yy_act;
1035
 
1036
#line 43 "bfin-lex.l"
1037
 
1038
#line 1039 "bfin-lex.c"
1039
 
1040
        if ( !(yy_init) )
1041
                {
1042
                (yy_init) = 1;
1043
 
1044
#ifdef YY_USER_INIT
1045
                YY_USER_INIT;
1046
#endif
1047
 
1048
                if ( ! (yy_start) )
1049
                        (yy_start) = 1; /* first start state */
1050
 
1051
                if ( ! yyin )
1052
                        yyin = stdin;
1053
 
1054
                if ( ! yyout )
1055
                        yyout = stdout;
1056
 
1057
                if ( ! YY_CURRENT_BUFFER ) {
1058
                        yyensure_buffer_stack ();
1059
                        YY_CURRENT_BUFFER_LVALUE =
1060
                                yy_create_buffer(yyin,YY_BUF_SIZE );
1061
                }
1062
 
1063
                yy_load_buffer_state( );
1064
                }
1065
 
1066
        while ( 1 )             /* loops until end-of-file is reached */
1067
                {
1068
                yy_cp = (yy_c_buf_p);
1069
 
1070
                /* Support of yytext. */
1071
                *yy_cp = (yy_hold_char);
1072
 
1073
                /* yy_bp points to the position in yy_ch_buf of the start of
1074
                 * the current run.
1075
                 */
1076
                yy_bp = yy_cp;
1077
 
1078
                yy_current_state = (yy_start);
1079
yy_match:
1080
                do
1081
                        {
1082
                        register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1083
                        if ( yy_accept[yy_current_state] )
1084
                                {
1085
                                (yy_last_accepting_state) = yy_current_state;
1086
                                (yy_last_accepting_cpos) = yy_cp;
1087
                                }
1088
                        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1089
                                {
1090
                                yy_current_state = (int) yy_def[yy_current_state];
1091
                                if ( yy_current_state >= 555 )
1092
                                        yy_c = yy_meta[(unsigned int) yy_c];
1093
                                }
1094
                        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1095
                        ++yy_cp;
1096
                        }
1097
                while ( yy_base[yy_current_state] != 759 );
1098
 
1099
yy_find_action:
1100
                yy_act = yy_accept[yy_current_state];
1101
                if ( yy_act == 0 )
1102
                        { /* have to back up */
1103
                        yy_cp = (yy_last_accepting_cpos);
1104
                        yy_current_state = (yy_last_accepting_state);
1105
                        yy_act = yy_accept[yy_current_state];
1106
                        }
1107
 
1108
                YY_DO_BEFORE_ACTION;
1109
 
1110
do_action:      /* This label is used only to access EOF actions. */
1111
 
1112
                switch ( yy_act )
1113
        { /* beginning of action switch */
1114
                        case 0: /* must back up */
1115
                        /* undo the effects of YY_DO_BEFORE_ACTION */
1116
                        *yy_cp = (yy_hold_char);
1117
                        yy_cp = (yy_last_accepting_cpos);
1118
                        yy_current_state = (yy_last_accepting_state);
1119
                        goto yy_find_action;
1120
 
1121
case 1:
1122
YY_RULE_SETUP
1123
#line 44 "bfin-lex.l"
1124
_REG.regno = REG_sftreset;  return REG;
1125
        YY_BREAK
1126
case 2:
1127
YY_RULE_SETUP
1128
#line 45 "bfin-lex.l"
1129
_REG.regno = REG_omode;     return REG;
1130
        YY_BREAK
1131
case 3:
1132
YY_RULE_SETUP
1133
#line 46 "bfin-lex.l"
1134
_REG.regno = REG_idle_req;  return REG;
1135
        YY_BREAK
1136
case 4:
1137
YY_RULE_SETUP
1138
#line 47 "bfin-lex.l"
1139
_REG.regno = REG_hwerrcause; return REG;
1140
        YY_BREAK
1141
case 5:
1142
YY_RULE_SETUP
1143
#line 48 "bfin-lex.l"
1144
_REG.regno = REG_excause;   return REG;
1145
        YY_BREAK
1146
case 6:
1147
YY_RULE_SETUP
1148
#line 49 "bfin-lex.l"
1149
_REG.regno = REG_emucause;  return REG;
1150
        YY_BREAK
1151
case 7:
1152
YY_RULE_SETUP
1153
#line 50 "bfin-lex.l"
1154
return Z;
1155
        YY_BREAK
1156
case 8:
1157
YY_RULE_SETUP
1158
#line 51 "bfin-lex.l"
1159
return X;
1160
        YY_BREAK
1161
case 9:
1162
YY_RULE_SETUP
1163
#line 52 "bfin-lex.l"
1164
yylval.value = M_W32; return MMOD;
1165
        YY_BREAK
1166
case 10:
1167
YY_RULE_SETUP
1168
#line 53 "bfin-lex.l"
1169
return W;
1170
        YY_BREAK
1171
case 11:
1172
YY_RULE_SETUP
1173
#line 54 "bfin-lex.l"
1174
return VIT_MAX;
1175
        YY_BREAK
1176
case 12:
1177
YY_RULE_SETUP
1178
#line 55 "bfin-lex.l"
1179
return V; /* Special: V is a statflag and a modifier.  */
1180
        YY_BREAK
1181
case 13:
1182
YY_RULE_SETUP
1183
#line 56 "bfin-lex.l"
1184
_REG.regno = REG_USP; return REG;
1185
        YY_BREAK
1186
case 14:
1187
YY_RULE_SETUP
1188
#line 57 "bfin-lex.l"
1189
return TL;
1190
        YY_BREAK
1191
case 15:
1192
YY_RULE_SETUP
1193
#line 58 "bfin-lex.l"
1194
return TH;
1195
        YY_BREAK
1196
case 16:
1197
YY_RULE_SETUP
1198
#line 59 "bfin-lex.l"
1199
yylval.value = M_TFU; return MMOD;
1200
        YY_BREAK
1201
case 17:
1202
YY_RULE_SETUP
1203
#line 60 "bfin-lex.l"
1204
return TESTSET;
1205
        YY_BREAK
1206
case 18:
1207
YY_RULE_SETUP
1208
#line 61 "bfin-lex.l"
1209
yylval.value = M_T; return MMOD;
1210
        YY_BREAK
1211
case 19:
1212
YY_RULE_SETUP
1213
#line 62 "bfin-lex.l"
1214
return S;
1215
        YY_BREAK
1216
case 20:
1217
YY_RULE_SETUP
1218
#line 63 "bfin-lex.l"
1219
_REG.regno = REG_SYSCFG; return REG;
1220
        YY_BREAK
1221
case 21:
1222
YY_RULE_SETUP
1223
#line 64 "bfin-lex.l"
1224
return STI;
1225
        YY_BREAK
1226
case 22:
1227
YY_RULE_SETUP
1228
#line 65 "bfin-lex.l"
1229
return SSYNC;
1230
        YY_BREAK
1231
case 23:
1232
YY_RULE_SETUP
1233
#line 66 "bfin-lex.l"
1234
_REG.regno = REG_SP; _REG.flags = F_REG_LOW; return HALF_REG;
1235
        YY_BREAK
1236
case 24:
1237
YY_RULE_SETUP
1238
#line 67 "bfin-lex.l"
1239
_REG.regno = REG_SP; _REG.flags = F_REG_HIGH; return HALF_REG;
1240
        YY_BREAK
1241
case 25:
1242
YY_RULE_SETUP
1243
#line 68 "bfin-lex.l"
1244
_REG.regno = REG_SP; return REG;
1245
        YY_BREAK
1246
case 26:
1247
YY_RULE_SETUP
1248
#line 69 "bfin-lex.l"
1249
return SIGNBITS;
1250
        YY_BREAK
1251
case 27:
1252
YY_RULE_SETUP
1253
#line 70 "bfin-lex.l"
1254
return SIGN;
1255
        YY_BREAK
1256
case 28:
1257
YY_RULE_SETUP
1258
#line 71 "bfin-lex.l"
1259
_REG.regno = REG_SEQSTAT; return REG;
1260
        YY_BREAK
1261
case 29:
1262
YY_RULE_SETUP
1263
#line 72 "bfin-lex.l"
1264
return SEARCH;
1265
        YY_BREAK
1266
case 30:
1267
YY_RULE_SETUP
1268
#line 73 "bfin-lex.l"
1269
return SHIFT;
1270
        YY_BREAK
1271
case 31:
1272
YY_RULE_SETUP
1273
#line 74 "bfin-lex.l"
1274
return SCO;
1275
        YY_BREAK
1276
case 32:
1277
YY_RULE_SETUP
1278
#line 76 "bfin-lex.l"
1279
return SAA;
1280
        YY_BREAK
1281
case 33:
1282
YY_RULE_SETUP
1283
#line 77 "bfin-lex.l"
1284
yylval.value = M_S2RND; return MMOD;
1285
        YY_BREAK
1286
case 34:
1287
YY_RULE_SETUP
1288
#line 78 "bfin-lex.l"
1289
return RTX;
1290
        YY_BREAK
1291
case 35:
1292
YY_RULE_SETUP
1293
#line 79 "bfin-lex.l"
1294
return RTS;
1295
        YY_BREAK
1296
case 36:
1297
YY_RULE_SETUP
1298
#line 80 "bfin-lex.l"
1299
return RTN;
1300
        YY_BREAK
1301
case 37:
1302
YY_RULE_SETUP
1303
#line 81 "bfin-lex.l"
1304
return RTI;
1305
        YY_BREAK
1306
case 38:
1307
YY_RULE_SETUP
1308
#line 82 "bfin-lex.l"
1309
return RTE;
1310
        YY_BREAK
1311
case 39:
1312
YY_RULE_SETUP
1313
#line 83 "bfin-lex.l"
1314
return ROT;
1315
        YY_BREAK
1316
case 40:
1317
YY_RULE_SETUP
1318
#line 84 "bfin-lex.l"
1319
return RND20;
1320
        YY_BREAK
1321
case 41:
1322
YY_RULE_SETUP
1323
#line 85 "bfin-lex.l"
1324
return RND12;
1325
        YY_BREAK
1326
case 42:
1327
YY_RULE_SETUP
1328
#line 86 "bfin-lex.l"
1329
return RNDL;
1330
        YY_BREAK
1331
case 43:
1332
YY_RULE_SETUP
1333
#line 87 "bfin-lex.l"
1334
return RNDH;
1335
        YY_BREAK
1336
case 44:
1337
YY_RULE_SETUP
1338
#line 88 "bfin-lex.l"
1339
return RND;
1340
        YY_BREAK
1341
case 45:
1342
YY_RULE_SETUP
1343
#line 90 "bfin-lex.l"
1344
return parse_halfreg(&yylval.reg, T_REG_R, yytext);
1345
        YY_BREAK
1346
case 46:
1347
YY_RULE_SETUP
1348
#line 92 "bfin-lex.l"
1349
_REG.regno = REG_RETS; return REG;
1350
        YY_BREAK
1351
case 47:
1352
YY_RULE_SETUP
1353
#line 93 "bfin-lex.l"
1354
_REG.regno = REG_RETI; return REG;
1355
        YY_BREAK
1356
case 48:
1357
YY_RULE_SETUP
1358
#line 94 "bfin-lex.l"
1359
_REG.regno = REG_RETX; return REG;
1360
        YY_BREAK
1361
case 49:
1362
YY_RULE_SETUP
1363
#line 95 "bfin-lex.l"
1364
_REG.regno = REG_RETN; return REG;
1365
        YY_BREAK
1366
case 50:
1367
YY_RULE_SETUP
1368
#line 96 "bfin-lex.l"
1369
_REG.regno = REG_RETE; return REG;
1370
        YY_BREAK
1371
case 51:
1372
YY_RULE_SETUP
1373
#line 97 "bfin-lex.l"
1374
_REG.regno = REG_EMUDAT; return REG;
1375
        YY_BREAK
1376
case 52:
1377
YY_RULE_SETUP
1378
#line 98 "bfin-lex.l"
1379
return RAISE;
1380
        YY_BREAK
1381
case 53:
1382
YY_RULE_SETUP
1383
#line 100 "bfin-lex.l"
1384
return parse_reg (&yylval.reg, T_REG_R, yytext);
1385
        YY_BREAK
1386
case 54:
1387
YY_RULE_SETUP
1388
#line 102 "bfin-lex.l"
1389
return R;
1390
        YY_BREAK
1391
case 55:
1392
YY_RULE_SETUP
1393
#line 103 "bfin-lex.l"
1394
return PRNT;
1395
        YY_BREAK
1396
case 56:
1397
YY_RULE_SETUP
1398
#line 104 "bfin-lex.l"
1399
return PC;
1400
        YY_BREAK
1401
case 57:
1402
YY_RULE_SETUP
1403
#line 105 "bfin-lex.l"
1404
return PACK;
1405
        YY_BREAK
1406
case 58:
1407
YY_RULE_SETUP
1408
#line 107 "bfin-lex.l"
1409
return parse_halfreg (&yylval.reg, T_REG_P, yytext);
1410
        YY_BREAK
1411
case 59:
1412
YY_RULE_SETUP
1413
#line 108 "bfin-lex.l"
1414
return parse_reg (&yylval.reg, T_REG_P, yytext);
1415
        YY_BREAK
1416
case 60:
1417
YY_RULE_SETUP
1418
#line 110 "bfin-lex.l"
1419
return OUTC;
1420
        YY_BREAK
1421
case 61:
1422
YY_RULE_SETUP
1423
#line 111 "bfin-lex.l"
1424
return ONES;
1425
        YY_BREAK
1426
case 62:
1427
YY_RULE_SETUP
1428
#line 113 "bfin-lex.l"
1429
return NOT;
1430
        YY_BREAK
1431
case 63:
1432
YY_RULE_SETUP
1433
#line 114 "bfin-lex.l"
1434
return NOP;
1435
        YY_BREAK
1436
case 64:
1437
YY_RULE_SETUP
1438
#line 115 "bfin-lex.l"
1439
return MNOP;
1440
        YY_BREAK
1441
case 65:
1442
YY_RULE_SETUP
1443
#line 116 "bfin-lex.l"
1444
return NS;
1445
        YY_BREAK
1446
case 66:
1447
YY_RULE_SETUP
1448
#line 119 "bfin-lex.l"
1449
return MIN;
1450
        YY_BREAK
1451
case 67:
1452
YY_RULE_SETUP
1453
#line 120 "bfin-lex.l"
1454
return MAX;
1455
        YY_BREAK
1456
case 68:
1457
YY_RULE_SETUP
1458
#line 122 "bfin-lex.l"
1459
return parse_halfreg (&yylval.reg, T_REG_M, yytext);
1460
        YY_BREAK
1461
case 69:
1462
YY_RULE_SETUP
1463
#line 123 "bfin-lex.l"
1464
return parse_reg (&yylval.reg, T_REG_M, yytext);
1465
        YY_BREAK
1466
case 70:
1467
YY_RULE_SETUP
1468
#line 125 "bfin-lex.l"
1469
return M;
1470
        YY_BREAK
1471
case 71:
1472
YY_RULE_SETUP
1473
#line 126 "bfin-lex.l"
1474
return LT;
1475
        YY_BREAK
1476
case 72:
1477
YY_RULE_SETUP
1478
#line 127 "bfin-lex.l"
1479
return LSHIFT;
1480
        YY_BREAK
1481
case 73:
1482
YY_RULE_SETUP
1483
#line 128 "bfin-lex.l"
1484
return LSETUP;
1485
        YY_BREAK
1486
case 74:
1487
YY_RULE_SETUP
1488
#line 129 "bfin-lex.l"
1489
return LOOP;
1490
        YY_BREAK
1491
case 75:
1492
YY_RULE_SETUP
1493
#line 130 "bfin-lex.l"
1494
return LOOP_BEGIN;
1495
        YY_BREAK
1496
case 76:
1497
YY_RULE_SETUP
1498
#line 131 "bfin-lex.l"
1499
return LOOP_END;
1500
        YY_BREAK
1501
case 77:
1502
YY_RULE_SETUP
1503
#line 133 "bfin-lex.l"
1504
return LE;
1505
        YY_BREAK
1506
case 78:
1507
YY_RULE_SETUP
1508
#line 134 "bfin-lex.l"
1509
_REG.regno = REG_LC0; return REG;
1510
        YY_BREAK
1511
case 79:
1512
YY_RULE_SETUP
1513
#line 135 "bfin-lex.l"
1514
_REG.regno = REG_LT0; return REG;
1515
        YY_BREAK
1516
case 80:
1517
YY_RULE_SETUP
1518
#line 136 "bfin-lex.l"
1519
_REG.regno = REG_LB0; return REG;
1520
        YY_BREAK
1521
case 81:
1522
YY_RULE_SETUP
1523
#line 137 "bfin-lex.l"
1524
_REG.regno = REG_LC1; return REG;
1525
        YY_BREAK
1526
case 82:
1527
YY_RULE_SETUP
1528
#line 138 "bfin-lex.l"
1529
_REG.regno = REG_LT1; return REG;
1530
        YY_BREAK
1531
case 83:
1532
YY_RULE_SETUP
1533
#line 139 "bfin-lex.l"
1534
_REG.regno = REG_LB1; return REG;
1535
        YY_BREAK
1536
case 84:
1537
YY_RULE_SETUP
1538
#line 141 "bfin-lex.l"
1539
return parse_halfreg (&yylval.reg, T_REG_L, yytext);
1540
        YY_BREAK
1541
case 85:
1542
YY_RULE_SETUP
1543
#line 142 "bfin-lex.l"
1544
return parse_reg (&yylval.reg, T_REG_L, yytext);
1545
        YY_BREAK
1546
case 86:
1547
YY_RULE_SETUP
1548
#line 143 "bfin-lex.l"
1549
return LO;
1550
        YY_BREAK
1551
case 87:
1552
YY_RULE_SETUP
1553
#line 144 "bfin-lex.l"
1554
{ BEGIN 0; return JUMP_DOT_S;}
1555
        YY_BREAK
1556
case 88:
1557
YY_RULE_SETUP
1558
#line 145 "bfin-lex.l"
1559
{ BEGIN 0; return JUMP_DOT_L;}
1560
        YY_BREAK
1561
case 89:
1562
YY_RULE_SETUP
1563
#line 146 "bfin-lex.l"
1564
{ BEGIN 0; return JUMP;}
1565
        YY_BREAK
1566
case 90:
1567
YY_RULE_SETUP
1568
#line 147 "bfin-lex.l"
1569
{ BEGIN 0; return JUMP_DOT_L; }
1570
        YY_BREAK
1571
case 91:
1572
YY_RULE_SETUP
1573
#line 148 "bfin-lex.l"
1574
yylval.value = M_IU;   return MMOD;
1575
        YY_BREAK
1576
case 92:
1577
YY_RULE_SETUP
1578
#line 149 "bfin-lex.l"
1579
yylval.value = M_ISS2; return MMOD;
1580
        YY_BREAK
1581
case 93:
1582
YY_RULE_SETUP
1583
#line 150 "bfin-lex.l"
1584
yylval.value = M_IS;   return MMOD;
1585
        YY_BREAK
1586
case 94:
1587
YY_RULE_SETUP
1588
#line 151 "bfin-lex.l"
1589
yylval.value = M_IH;   return MMOD;
1590
        YY_BREAK
1591
case 95:
1592
YY_RULE_SETUP
1593
#line 152 "bfin-lex.l"
1594
return IF;
1595
        YY_BREAK
1596
case 96:
1597
YY_RULE_SETUP
1598
#line 153 "bfin-lex.l"
1599
return parse_halfreg (&yylval.reg, T_REG_I, yytext);
1600
        YY_BREAK
1601
case 97:
1602
YY_RULE_SETUP
1603
#line 154 "bfin-lex.l"
1604
return parse_reg (&yylval.reg, T_REG_I, yytext);
1605
        YY_BREAK
1606
case 98:
1607
YY_RULE_SETUP
1608
#line 155 "bfin-lex.l"
1609
return HLT;
1610
        YY_BREAK
1611
case 99:
1612
YY_RULE_SETUP
1613
#line 156 "bfin-lex.l"
1614
return HI;
1615
        YY_BREAK
1616
case 100:
1617
YY_RULE_SETUP
1618
#line 157 "bfin-lex.l"
1619
return GT;
1620
        YY_BREAK
1621
case 101:
1622
YY_RULE_SETUP
1623
#line 158 "bfin-lex.l"
1624
return GE;
1625
        YY_BREAK
1626
case 102:
1627
YY_RULE_SETUP
1628
#line 159 "bfin-lex.l"
1629
yylval.value = M_FU; return MMOD;
1630
        YY_BREAK
1631
case 103:
1632
YY_RULE_SETUP
1633
#line 160 "bfin-lex.l"
1634
_REG.regno = REG_FP; return REG;
1635
        YY_BREAK
1636
case 104:
1637
YY_RULE_SETUP
1638
#line 161 "bfin-lex.l"
1639
_REG.regno = REG_FP; _REG.flags = F_REG_LOW; return HALF_REG;
1640
        YY_BREAK
1641
case 105:
1642
YY_RULE_SETUP
1643
#line 162 "bfin-lex.l"
1644
_REG.regno = REG_FP; _REG.flags = F_REG_HIGH; return HALF_REG;
1645
        YY_BREAK
1646
case 106:
1647
YY_RULE_SETUP
1648
#line 164 "bfin-lex.l"
1649
return EXTRACT;
1650
        YY_BREAK
1651
case 107:
1652
YY_RULE_SETUP
1653
#line 165 "bfin-lex.l"
1654
return EXPADJ;
1655
        YY_BREAK
1656
case 108:
1657
YY_RULE_SETUP
1658
#line 166 "bfin-lex.l"
1659
return EXCPT;
1660
        YY_BREAK
1661
case 109:
1662
YY_RULE_SETUP
1663
#line 167 "bfin-lex.l"
1664
return EMUEXCPT;
1665
        YY_BREAK
1666
case 110:
1667
YY_RULE_SETUP
1668
#line 168 "bfin-lex.l"
1669
return DIVS;
1670
        YY_BREAK
1671
case 111:
1672
YY_RULE_SETUP
1673
#line 169 "bfin-lex.l"
1674
return DIVQ;
1675
        YY_BREAK
1676
case 112:
1677
YY_RULE_SETUP
1678
#line 170 "bfin-lex.l"
1679
return DISALGNEXCPT;
1680
        YY_BREAK
1681
case 113:
1682
YY_RULE_SETUP
1683
#line 171 "bfin-lex.l"
1684
return DEPOSIT;
1685
        YY_BREAK
1686
case 114:
1687
YY_RULE_SETUP
1688
#line 172 "bfin-lex.l"
1689
return DBGHALT;
1690
        YY_BREAK
1691
case 115:
1692
YY_RULE_SETUP
1693
#line 173 "bfin-lex.l"
1694
return DBGCMPLX;
1695
        YY_BREAK
1696
case 116:
1697
YY_RULE_SETUP
1698
#line 174 "bfin-lex.l"
1699
return DBGAL;
1700
        YY_BREAK
1701
case 117:
1702
YY_RULE_SETUP
1703
#line 175 "bfin-lex.l"
1704
return DBGAH;
1705
        YY_BREAK
1706
case 118:
1707
YY_RULE_SETUP
1708
#line 176 "bfin-lex.l"
1709
return DBGA;
1710
        YY_BREAK
1711
case 119:
1712
YY_RULE_SETUP
1713
#line 177 "bfin-lex.l"
1714
return DBG;
1715
        YY_BREAK
1716
case 120:
1717
YY_RULE_SETUP
1718
#line 178 "bfin-lex.l"
1719
{ _REG.regno = REG_CYCLES2; return REG; }
1720
        YY_BREAK
1721
case 121:
1722
YY_RULE_SETUP
1723
#line 179 "bfin-lex.l"
1724
{ _REG.regno = REG_CYCLES; return REG; }
1725
        YY_BREAK
1726
case 122:
1727
YY_RULE_SETUP
1728
#line 180 "bfin-lex.l"
1729
return CSYNC;
1730
        YY_BREAK
1731
case 123:
1732
YY_RULE_SETUP
1733
#line 181 "bfin-lex.l"
1734
return CO;
1735
        YY_BREAK
1736
case 124:
1737
YY_RULE_SETUP
1738
#line 182 "bfin-lex.l"
1739
return CLI;
1740
        YY_BREAK
1741
case 125:
1742
YY_RULE_SETUP
1743
#line 184 "bfin-lex.l"
1744
_REG.regno = REG_CC; return CCREG;
1745
        YY_BREAK
1746
case 126:
1747
YY_RULE_SETUP
1748
#line 185 "bfin-lex.l"
1749
{ BEGIN 0; return CALL;}
1750
        YY_BREAK
1751
case 127:
1752
YY_RULE_SETUP
1753
#line 186 "bfin-lex.l"
1754
{ BEGIN 0; return CALL;}
1755
        YY_BREAK
1756
case 128:
1757
YY_RULE_SETUP
1758
#line 187 "bfin-lex.l"
1759
return BYTEUNPACK;
1760
        YY_BREAK
1761
case 129:
1762
YY_RULE_SETUP
1763
#line 188 "bfin-lex.l"
1764
return BYTEPACK;
1765
        YY_BREAK
1766
case 130:
1767
YY_RULE_SETUP
1768
#line 189 "bfin-lex.l"
1769
return BYTEOP16M;
1770
        YY_BREAK
1771
case 131:
1772
YY_RULE_SETUP
1773
#line 190 "bfin-lex.l"
1774
return BYTEOP16P;
1775
        YY_BREAK
1776
case 132:
1777
YY_RULE_SETUP
1778
#line 191 "bfin-lex.l"
1779
return BYTEOP3P;
1780
        YY_BREAK
1781
case 133:
1782
YY_RULE_SETUP
1783
#line 192 "bfin-lex.l"
1784
return BYTEOP2M;
1785
        YY_BREAK
1786
case 134:
1787
YY_RULE_SETUP
1788
#line 193 "bfin-lex.l"
1789
return BYTEOP2P;
1790
        YY_BREAK
1791
case 135:
1792
YY_RULE_SETUP
1793
#line 194 "bfin-lex.l"
1794
return BYTEOP1P;
1795
        YY_BREAK
1796
case 136:
1797
YY_RULE_SETUP
1798
#line 195 "bfin-lex.l"
1799
return BY;
1800
        YY_BREAK
1801
case 137:
1802
YY_RULE_SETUP
1803
#line 196 "bfin-lex.l"
1804
return BXORSHIFT;
1805
        YY_BREAK
1806
case 138:
1807
YY_RULE_SETUP
1808
#line 197 "bfin-lex.l"
1809
return BXOR;
1810
        YY_BREAK
1811
case 139:
1812
YY_RULE_SETUP
1813
#line 199 "bfin-lex.l"
1814
return BREV;
1815
        YY_BREAK
1816
case 140:
1817
YY_RULE_SETUP
1818
#line 200 "bfin-lex.l"
1819
return BP;
1820
        YY_BREAK
1821
case 141:
1822
YY_RULE_SETUP
1823
#line 201 "bfin-lex.l"
1824
return BITTST;
1825
        YY_BREAK
1826
case 142:
1827
YY_RULE_SETUP
1828
#line 202 "bfin-lex.l"
1829
return BITTGL;
1830
        YY_BREAK
1831
case 143:
1832
YY_RULE_SETUP
1833
#line 203 "bfin-lex.l"
1834
return BITSET;
1835
        YY_BREAK
1836
case 144:
1837
YY_RULE_SETUP
1838
#line 204 "bfin-lex.l"
1839
return BITMUX;
1840
        YY_BREAK
1841
case 145:
1842
YY_RULE_SETUP
1843
#line 205 "bfin-lex.l"
1844
return BITCLR;
1845
        YY_BREAK
1846
case 146:
1847
YY_RULE_SETUP
1848
#line 206 "bfin-lex.l"
1849
return parse_halfreg (&yylval.reg, T_REG_B, yytext);
1850
        YY_BREAK
1851
case 147:
1852
YY_RULE_SETUP
1853
#line 207 "bfin-lex.l"
1854
return parse_reg (&yylval.reg, T_REG_B, yytext);
1855
        YY_BREAK
1856
case 148:
1857
YY_RULE_SETUP
1858
#line 208 "bfin-lex.l"
1859
return B;
1860
        YY_BREAK
1861
case 149:
1862
YY_RULE_SETUP
1863
#line 209 "bfin-lex.l"
1864
_REG.regno = S_AZ;   return STATUS_REG;
1865
        YY_BREAK
1866
case 150:
1867
YY_RULE_SETUP
1868
#line 210 "bfin-lex.l"
1869
_REG.regno = S_AN;   return STATUS_REG;
1870
        YY_BREAK
1871
case 151:
1872
YY_RULE_SETUP
1873
#line 211 "bfin-lex.l"
1874
_REG.regno = S_AQ;   return STATUS_REG;
1875
        YY_BREAK
1876
case 152:
1877
YY_RULE_SETUP
1878
#line 212 "bfin-lex.l"
1879
_REG.regno = S_AC0;  return STATUS_REG;
1880
        YY_BREAK
1881
case 153:
1882
YY_RULE_SETUP
1883
#line 213 "bfin-lex.l"
1884
_REG.regno = S_AC1;  return STATUS_REG;
1885
        YY_BREAK
1886
case 154:
1887
YY_RULE_SETUP
1888
#line 214 "bfin-lex.l"
1889
_REG.regno = S_AV0;  return STATUS_REG;
1890
        YY_BREAK
1891
case 155:
1892
YY_RULE_SETUP
1893
#line 215 "bfin-lex.l"
1894
_REG.regno = S_AV0S; return STATUS_REG;
1895
        YY_BREAK
1896
case 156:
1897
YY_RULE_SETUP
1898
#line 216 "bfin-lex.l"
1899
_REG.regno = S_AV1;  return STATUS_REG;
1900
        YY_BREAK
1901
case 157:
1902
YY_RULE_SETUP
1903
#line 217 "bfin-lex.l"
1904
_REG.regno = S_AV1S; return STATUS_REG;
1905
        YY_BREAK
1906
case 158:
1907
YY_RULE_SETUP
1908
#line 218 "bfin-lex.l"
1909
_REG.regno = S_VS;   return STATUS_REG;
1910
        YY_BREAK
1911
case 159:
1912
YY_RULE_SETUP
1913
#line 221 "bfin-lex.l"
1914
_REG.regno = REG_ASTAT; return REG;
1915
        YY_BREAK
1916
case 160:
1917
YY_RULE_SETUP
1918
#line 222 "bfin-lex.l"
1919
return ASHIFT;
1920
        YY_BREAK
1921
case 161:
1922
YY_RULE_SETUP
1923
#line 223 "bfin-lex.l"
1924
return ASL;
1925
        YY_BREAK
1926
case 162:
1927
YY_RULE_SETUP
1928
#line 224 "bfin-lex.l"
1929
return ASR;
1930
        YY_BREAK
1931
case 163:
1932
YY_RULE_SETUP
1933
#line 225 "bfin-lex.l"
1934
return ALIGN8;
1935
        YY_BREAK
1936
case 164:
1937
YY_RULE_SETUP
1938
#line 226 "bfin-lex.l"
1939
return ALIGN16;
1940
        YY_BREAK
1941
case 165:
1942
YY_RULE_SETUP
1943
#line 227 "bfin-lex.l"
1944
return ALIGN24;
1945
        YY_BREAK
1946
case 166:
1947
YY_RULE_SETUP
1948
#line 228 "bfin-lex.l"
1949
return A_ONE_DOT_L;
1950
        YY_BREAK
1951
case 167:
1952
YY_RULE_SETUP
1953
#line 229 "bfin-lex.l"
1954
return A_ZERO_DOT_L;
1955
        YY_BREAK
1956
case 168:
1957
YY_RULE_SETUP
1958
#line 230 "bfin-lex.l"
1959
return A_ONE_DOT_H;
1960
        YY_BREAK
1961
case 169:
1962
YY_RULE_SETUP
1963
#line 231 "bfin-lex.l"
1964
return A_ZERO_DOT_H;
1965
        YY_BREAK
1966
case 170:
1967
YY_RULE_SETUP
1968
#line 232 "bfin-lex.l"
1969
return ABS;
1970
        YY_BREAK
1971
case 171:
1972
YY_RULE_SETUP
1973
#line 233 "bfin-lex.l"
1974
return ABORT;
1975
        YY_BREAK
1976
case 172:
1977
YY_RULE_SETUP
1978
#line 234 "bfin-lex.l"
1979
_REG.regno = REG_A1x; return REG;
1980
        YY_BREAK
1981
case 173:
1982
YY_RULE_SETUP
1983
#line 235 "bfin-lex.l"
1984
_REG.regno = REG_A1w; return REG;
1985
        YY_BREAK
1986
case 174:
1987
YY_RULE_SETUP
1988
#line 236 "bfin-lex.l"
1989
_REG.regno = REG_A1;  return REG_A_DOUBLE_ONE;
1990
        YY_BREAK
1991
case 175:
1992
YY_RULE_SETUP
1993
#line 237 "bfin-lex.l"
1994
_REG.regno = REG_A0x; return REG;
1995
        YY_BREAK
1996
case 176:
1997
YY_RULE_SETUP
1998
#line 238 "bfin-lex.l"
1999
_REG.regno = REG_A0w; return REG;
2000
        YY_BREAK
2001
case 177:
2002
YY_RULE_SETUP
2003
#line 239 "bfin-lex.l"
2004
_REG.regno = REG_A0;  return REG_A_DOUBLE_ZERO;
2005
        YY_BREAK
2006
case 178:
2007
YY_RULE_SETUP
2008
#line 240 "bfin-lex.l"
2009
return GOT;
2010
        YY_BREAK
2011
case 179:
2012
YY_RULE_SETUP
2013
#line 241 "bfin-lex.l"
2014
return GOT17M4;
2015
        YY_BREAK
2016
case 180:
2017
YY_RULE_SETUP
2018
#line 242 "bfin-lex.l"
2019
return FUNCDESC_GOT17M4;
2020
        YY_BREAK
2021
case 181:
2022
YY_RULE_SETUP
2023
#line 243 "bfin-lex.l"
2024
return PLTPC;
2025
        YY_BREAK
2026
case 182:
2027
YY_RULE_SETUP
2028
#line 246 "bfin-lex.l"
2029
return TILDA;
2030
        YY_BREAK
2031
case 183:
2032
YY_RULE_SETUP
2033
#line 247 "bfin-lex.l"
2034
return _BAR_ASSIGN;
2035
        YY_BREAK
2036
case 184:
2037
YY_RULE_SETUP
2038
#line 248 "bfin-lex.l"
2039
return BAR;
2040
        YY_BREAK
2041
case 185:
2042
YY_RULE_SETUP
2043
#line 249 "bfin-lex.l"
2044
return _CARET_ASSIGN;
2045
        YY_BREAK
2046
case 186:
2047
YY_RULE_SETUP
2048
#line 250 "bfin-lex.l"
2049
return CARET;
2050
        YY_BREAK
2051
case 187:
2052
YY_RULE_SETUP
2053
#line 251 "bfin-lex.l"
2054
return RBRACK;
2055
        YY_BREAK
2056
case 188:
2057
YY_RULE_SETUP
2058
#line 252 "bfin-lex.l"
2059
return LBRACK;
2060
        YY_BREAK
2061
case 189:
2062
YY_RULE_SETUP
2063
#line 253 "bfin-lex.l"
2064
return _GREATER_GREATER_GREATER_THAN_ASSIGN;
2065
        YY_BREAK
2066
case 190:
2067
YY_RULE_SETUP
2068
#line 254 "bfin-lex.l"
2069
return _GREATER_GREATER_ASSIGN;
2070
        YY_BREAK
2071
case 191:
2072
YY_RULE_SETUP
2073
#line 255 "bfin-lex.l"
2074
return _GREATER_GREATER_GREATER;
2075
        YY_BREAK
2076
case 192:
2077
YY_RULE_SETUP
2078
#line 256 "bfin-lex.l"
2079
return GREATER_GREATER;
2080
        YY_BREAK
2081
case 193:
2082
YY_RULE_SETUP
2083
#line 257 "bfin-lex.l"
2084
return _ASSIGN_ASSIGN;
2085
        YY_BREAK
2086
case 194:
2087
YY_RULE_SETUP
2088
#line 258 "bfin-lex.l"
2089
return ASSIGN;
2090
        YY_BREAK
2091
case 195:
2092
YY_RULE_SETUP
2093
#line 259 "bfin-lex.l"
2094
return _LESS_THAN_ASSIGN;
2095
        YY_BREAK
2096
case 196:
2097
YY_RULE_SETUP
2098
#line 260 "bfin-lex.l"
2099
return _LESS_LESS_ASSIGN;
2100
        YY_BREAK
2101
case 197:
2102
YY_RULE_SETUP
2103
#line 261 "bfin-lex.l"
2104
return LESS_LESS;
2105
        YY_BREAK
2106
case 198:
2107
YY_RULE_SETUP
2108
#line 262 "bfin-lex.l"
2109
return LESS_THAN;
2110
        YY_BREAK
2111
case 199:
2112
YY_RULE_SETUP
2113
#line 263 "bfin-lex.l"
2114
return LPAREN;
2115
        YY_BREAK
2116
case 200:
2117
YY_RULE_SETUP
2118
#line 264 "bfin-lex.l"
2119
return RPAREN;
2120
        YY_BREAK
2121
case 201:
2122
YY_RULE_SETUP
2123
#line 265 "bfin-lex.l"
2124
return COLON;
2125
        YY_BREAK
2126
case 202:
2127
YY_RULE_SETUP
2128
#line 266 "bfin-lex.l"
2129
return SLASH;
2130
        YY_BREAK
2131
case 203:
2132
YY_RULE_SETUP
2133
#line 267 "bfin-lex.l"
2134
return _MINUS_ASSIGN;
2135
        YY_BREAK
2136
case 204:
2137
YY_RULE_SETUP
2138
#line 268 "bfin-lex.l"
2139
return _PLUS_BAR_PLUS;
2140
        YY_BREAK
2141
case 205:
2142
YY_RULE_SETUP
2143
#line 269 "bfin-lex.l"
2144
return _MINUS_BAR_PLUS;
2145
        YY_BREAK
2146
case 206:
2147
YY_RULE_SETUP
2148
#line 270 "bfin-lex.l"
2149
return _PLUS_BAR_MINUS;
2150
        YY_BREAK
2151
case 207:
2152
YY_RULE_SETUP
2153
#line 271 "bfin-lex.l"
2154
return _MINUS_BAR_MINUS;
2155
        YY_BREAK
2156
case 208:
2157
YY_RULE_SETUP
2158
#line 272 "bfin-lex.l"
2159
return _MINUS_MINUS;
2160
        YY_BREAK
2161
case 209:
2162
YY_RULE_SETUP
2163
#line 273 "bfin-lex.l"
2164
return MINUS;
2165
        YY_BREAK
2166
case 210:
2167
YY_RULE_SETUP
2168
#line 274 "bfin-lex.l"
2169
return COMMA;
2170
        YY_BREAK
2171
case 211:
2172
YY_RULE_SETUP
2173
#line 275 "bfin-lex.l"
2174
return _PLUS_ASSIGN;
2175
        YY_BREAK
2176
case 212:
2177
YY_RULE_SETUP
2178
#line 276 "bfin-lex.l"
2179
return _PLUS_PLUS;
2180
        YY_BREAK
2181
case 213:
2182
YY_RULE_SETUP
2183
#line 277 "bfin-lex.l"
2184
return PLUS;
2185
        YY_BREAK
2186
case 214:
2187
YY_RULE_SETUP
2188
#line 278 "bfin-lex.l"
2189
return _STAR_ASSIGN;
2190
        YY_BREAK
2191
case 215:
2192
YY_RULE_SETUP
2193
#line 279 "bfin-lex.l"
2194
return STAR;
2195
        YY_BREAK
2196
case 216:
2197
YY_RULE_SETUP
2198
#line 280 "bfin-lex.l"
2199
return _AMPERSAND_ASSIGN;
2200
        YY_BREAK
2201
case 217:
2202
YY_RULE_SETUP
2203
#line 281 "bfin-lex.l"
2204
return AMPERSAND;
2205
        YY_BREAK
2206
case 218:
2207
YY_RULE_SETUP
2208
#line 282 "bfin-lex.l"
2209
return PERCENT;
2210
        YY_BREAK
2211
case 219:
2212
YY_RULE_SETUP
2213
#line 283 "bfin-lex.l"
2214
return BANG;
2215
        YY_BREAK
2216
case 220:
2217
YY_RULE_SETUP
2218
#line 284 "bfin-lex.l"
2219
return SEMICOLON;
2220
        YY_BREAK
2221
case 221:
2222
YY_RULE_SETUP
2223
#line 285 "bfin-lex.l"
2224
return _ASSIGN_BANG;
2225
        YY_BREAK
2226
case 222:
2227
YY_RULE_SETUP
2228
#line 286 "bfin-lex.l"
2229
return DOUBLE_BAR;
2230
        YY_BREAK
2231
case 223:
2232
YY_RULE_SETUP
2233
#line 287 "bfin-lex.l"
2234
return AT;
2235
        YY_BREAK
2236
case 224:
2237
YY_RULE_SETUP
2238
#line 288 "bfin-lex.l"
2239
return PREFETCH;
2240
        YY_BREAK
2241
case 225:
2242
YY_RULE_SETUP
2243
#line 289 "bfin-lex.l"
2244
return UNLINK;
2245
        YY_BREAK
2246
case 226:
2247
YY_RULE_SETUP
2248
#line 290 "bfin-lex.l"
2249
return LINK;
2250
        YY_BREAK
2251
case 227:
2252
YY_RULE_SETUP
2253
#line 291 "bfin-lex.l"
2254
return IDLE;
2255
        YY_BREAK
2256
case 228:
2257
YY_RULE_SETUP
2258
#line 292 "bfin-lex.l"
2259
return IFLUSH;
2260
        YY_BREAK
2261
case 229:
2262
YY_RULE_SETUP
2263
#line 293 "bfin-lex.l"
2264
return FLUSHINV;
2265
        YY_BREAK
2266
case 230:
2267
YY_RULE_SETUP
2268
#line 294 "bfin-lex.l"
2269
return FLUSH;
2270
        YY_BREAK
2271
case 231:
2272
YY_RULE_SETUP
2273
#line 295 "bfin-lex.l"
2274
{
2275
    yylval.value = parse_int (&yytext);
2276
    return NUMBER;
2277
  }
2278
        YY_BREAK
2279
case 232:
2280
YY_RULE_SETUP
2281
#line 299 "bfin-lex.l"
2282
{
2283
    yylval.symbol = symbol_find_or_make (yytext);
2284
    symbol_mark_used (yylval.symbol);
2285
    return SYMBOL;
2286
  }
2287
        YY_BREAK
2288
case 233:
2289
YY_RULE_SETUP
2290
#line 304 "bfin-lex.l"
2291
{
2292
    char *name;
2293
    char *ref = strdup (yytext);
2294
    if (ref[1] == 'b' || ref[1] == 'B')
2295
      {
2296
        name = fb_label_name ((int) (ref[0] - '0'), 0);
2297
        yylval.symbol = symbol_find (name);
2298
 
2299
        if ((yylval.symbol != NULL)
2300
             && (S_IS_DEFINED (yylval.symbol)))
2301
          return SYMBOL;
2302
        as_bad ("backward reference to unknown label %d:",
2303
                                                  (int) (ref[0] - '0'));
2304
      }
2305
    else if (ref[1] == 'f' || ref[1] == 'F')
2306
      {
2307
        /* Forward reference.  Expect symbol to be undefined or
2308
           unknown.  undefined: seen it before.  unknown: never seen
2309
           it before.
2310
 
2311
           Construct a local label name, then an undefined symbol.
2312
           Just return it as never seen before.  */
2313
 
2314
        name = fb_label_name ((int) (ref[0] - '0'), 1);
2315
        yylval.symbol = symbol_find_or_make (name);
2316
        /* We have no need to check symbol properties.  */
2317
        return SYMBOL;
2318
      }
2319
  }
2320
        YY_BREAK
2321
case 234:
2322
/* rule 234 can match eol */
2323
YY_RULE_SETUP
2324
#line 333 "bfin-lex.l"
2325
;
2326
        YY_BREAK
2327
case 235:
2328
YY_RULE_SETUP
2329
#line 334 "bfin-lex.l"
2330
;
2331
        YY_BREAK
2332
case 236:
2333
YY_RULE_SETUP
2334
#line 335 "bfin-lex.l"
2335
return yytext[0];
2336
        YY_BREAK
2337
case 237:
2338
YY_RULE_SETUP
2339
#line 336 "bfin-lex.l"
2340
ECHO;
2341
        YY_BREAK
2342
#line 2343 "bfin-lex.c"
2343
case YY_STATE_EOF(INITIAL):
2344
case YY_STATE_EOF(KEYWORD):
2345
        yyterminate();
2346
 
2347
        case YY_END_OF_BUFFER:
2348
                {
2349
                /* Amount of text matched not including the EOB char. */
2350
                int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2351
 
2352
                /* Undo the effects of YY_DO_BEFORE_ACTION. */
2353
                *yy_cp = (yy_hold_char);
2354
                YY_RESTORE_YY_MORE_OFFSET
2355
 
2356
                if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2357
                        {
2358
                        /* We're scanning a new file or input source.  It's
2359
                         * possible that this happened because the user
2360
                         * just pointed yyin at a new source and called
2361
                         * yylex().  If so, then we have to assure
2362
                         * consistency between YY_CURRENT_BUFFER and our
2363
                         * globals.  Here is the right place to do so, because
2364
                         * this is the first action (other than possibly a
2365
                         * back-up) that will match for the new input source.
2366
                         */
2367
                        (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2368
                        YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
2369
                        YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2370
                        }
2371
 
2372
                /* Note that here we test for yy_c_buf_p "<=" to the position
2373
                 * of the first EOB in the buffer, since yy_c_buf_p will
2374
                 * already have been incremented past the NUL character
2375
                 * (since all states make transitions on EOB to the
2376
                 * end-of-buffer state).  Contrast this with the test
2377
                 * in input().
2378
                 */
2379
                if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2380
                        { /* This was really a NUL. */
2381
                        yy_state_type yy_next_state;
2382
 
2383
                        (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2384
 
2385
                        yy_current_state = yy_get_previous_state(  );
2386
 
2387
                        /* Okay, we're now positioned to make the NUL
2388
                         * transition.  We couldn't have
2389
                         * yy_get_previous_state() go ahead and do it
2390
                         * for us because it doesn't know how to deal
2391
                         * with the possibility of jamming (and we don't
2392
                         * want to build jamming into it because then it
2393
                         * will run more slowly).
2394
                         */
2395
 
2396
                        yy_next_state = yy_try_NUL_trans( yy_current_state );
2397
 
2398
                        yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2399
 
2400
                        if ( yy_next_state )
2401
                                {
2402
                                /* Consume the NUL. */
2403
                                yy_cp = ++(yy_c_buf_p);
2404
                                yy_current_state = yy_next_state;
2405
                                goto yy_match;
2406
                                }
2407
 
2408
                        else
2409
                                {
2410
                                yy_cp = (yy_c_buf_p);
2411
                                goto yy_find_action;
2412
                                }
2413
                        }
2414
 
2415
                else switch ( yy_get_next_buffer(  ) )
2416
                        {
2417
                        case EOB_ACT_END_OF_FILE:
2418
                                {
2419
                                (yy_did_buffer_switch_on_eof) = 0;
2420
 
2421
                                if ( yywrap( ) )
2422
                                        {
2423
                                        /* Note: because we've taken care in
2424
                                         * yy_get_next_buffer() to have set up
2425
                                         * yytext, we can now set up
2426
                                         * yy_c_buf_p so that if some total
2427
                                         * hoser (like flex itself) wants to
2428
                                         * call the scanner after we return the
2429
                                         * YY_NULL, it'll still work - another
2430
                                         * YY_NULL will get returned.
2431
                                         */
2432
                                        (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
2433
 
2434
                                        yy_act = YY_STATE_EOF(YY_START);
2435
                                        goto do_action;
2436
                                        }
2437
 
2438
                                else
2439
                                        {
2440
                                        if ( ! (yy_did_buffer_switch_on_eof) )
2441
                                                YY_NEW_FILE;
2442
                                        }
2443
                                break;
2444
                                }
2445
 
2446
                        case EOB_ACT_CONTINUE_SCAN:
2447
                                (yy_c_buf_p) =
2448
                                        (yytext_ptr) + yy_amount_of_matched_text;
2449
 
2450
                                yy_current_state = yy_get_previous_state(  );
2451
 
2452
                                yy_cp = (yy_c_buf_p);
2453
                                yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2454
                                goto yy_match;
2455
 
2456
                        case EOB_ACT_LAST_MATCH:
2457
                                (yy_c_buf_p) =
2458
                                &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
2459
 
2460
                                yy_current_state = yy_get_previous_state(  );
2461
 
2462
                                yy_cp = (yy_c_buf_p);
2463
                                yy_bp = (yytext_ptr) + YY_MORE_ADJ;
2464
                                goto yy_find_action;
2465
                        }
2466
                break;
2467
                }
2468
 
2469
        default:
2470
                YY_FATAL_ERROR(
2471
                        "fatal flex scanner internal error--no action found" );
2472
        } /* end of action switch */
2473
                } /* end of scanning one token */
2474
} /* end of yylex */
2475
 
2476
/* yy_get_next_buffer - try to read in a new buffer
2477
 *
2478
 * Returns a code representing an action:
2479
 *      EOB_ACT_LAST_MATCH -
2480
 *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2481
 *      EOB_ACT_END_OF_FILE - end of file
2482
 */
2483
static int yy_get_next_buffer (void)
2484
{
2485
        register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
2486
        register char *source = (yytext_ptr);
2487
        register int number_to_move, i;
2488
        int ret_val;
2489
 
2490
        if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
2491
                YY_FATAL_ERROR(
2492
                "fatal flex scanner internal error--end of buffer missed" );
2493
 
2494
        if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
2495
                { /* Don't try to fill the buffer, so this is an EOF. */
2496
                if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
2497
                        {
2498
                        /* We matched a single character, the EOB, so
2499
                         * treat this as a final EOF.
2500
                         */
2501
                        return EOB_ACT_END_OF_FILE;
2502
                        }
2503
 
2504
                else
2505
                        {
2506
                        /* We matched some text prior to the EOB, first
2507
                         * process it.
2508
                         */
2509
                        return EOB_ACT_LAST_MATCH;
2510
                        }
2511
                }
2512
 
2513
        /* Try to read more data. */
2514
 
2515
        /* First move last chars to start of buffer. */
2516
        number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
2517
 
2518
        for ( i = 0; i < number_to_move; ++i )
2519
                *(dest++) = *(source++);
2520
 
2521
        if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2522
                /* don't do the read, it's not guaranteed to return an EOF,
2523
                 * just force an EOF
2524
                 */
2525
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
2526
 
2527
        else
2528
                {
2529
                        yy_size_t num_to_read =
2530
                        YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
2531
 
2532
                while ( num_to_read <= 0 )
2533
                        { /* Not enough room in the buffer - grow it. */
2534
 
2535
                        /* just a shorter name for the current buffer */
2536
                        YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
2537
 
2538
                        int yy_c_buf_p_offset =
2539
                                (int) ((yy_c_buf_p) - b->yy_ch_buf);
2540
 
2541
                        if ( b->yy_is_our_buffer )
2542
                                {
2543
                                yy_size_t new_size = b->yy_buf_size * 2;
2544
 
2545
                                if ( new_size <= 0 )
2546
                                        b->yy_buf_size += b->yy_buf_size / 8;
2547
                                else
2548
                                        b->yy_buf_size *= 2;
2549
 
2550
                                b->yy_ch_buf = (char *)
2551
                                        /* Include room in for 2 EOB chars. */
2552
                                        yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
2553
                                }
2554
                        else
2555
                                /* Can't grow it, we don't own it. */
2556
                                b->yy_ch_buf = 0;
2557
 
2558
                        if ( ! b->yy_ch_buf )
2559
                                YY_FATAL_ERROR(
2560
                                "fatal error - scanner input buffer overflow" );
2561
 
2562
                        (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
2563
 
2564
                        num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
2565
                                                number_to_move - 1;
2566
 
2567
                        }
2568
 
2569
                if ( num_to_read > YY_READ_BUF_SIZE )
2570
                        num_to_read = YY_READ_BUF_SIZE;
2571
 
2572
                /* Read in more data. */
2573
                YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
2574
                        (yy_n_chars), num_to_read );
2575
 
2576
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2577
                }
2578
 
2579
        if ( (yy_n_chars) == 0 )
2580
                {
2581
                if ( number_to_move == YY_MORE_ADJ )
2582
                        {
2583
                        ret_val = EOB_ACT_END_OF_FILE;
2584
                        yyrestart(yyin  );
2585
                        }
2586
 
2587
                else
2588
                        {
2589
                        ret_val = EOB_ACT_LAST_MATCH;
2590
                        YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
2591
                                YY_BUFFER_EOF_PENDING;
2592
                        }
2593
                }
2594
 
2595
        else
2596
                ret_val = EOB_ACT_CONTINUE_SCAN;
2597
 
2598
        if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
2599
                /* Extend the array by 50%, plus the number we really need. */
2600
                yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
2601
                YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
2602
                if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2603
                        YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
2604
        }
2605
 
2606
        (yy_n_chars) += number_to_move;
2607
        YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
2608
        YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
2609
 
2610
        (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
2611
 
2612
        return ret_val;
2613
}
2614
 
2615
/* yy_get_previous_state - get the state just before the EOB char was reached */
2616
 
2617
    static yy_state_type yy_get_previous_state (void)
2618
{
2619
        register yy_state_type yy_current_state;
2620
        register char *yy_cp;
2621
 
2622
        yy_current_state = (yy_start);
2623
 
2624
        for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
2625
                {
2626
                register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2627
                if ( yy_accept[yy_current_state] )
2628
                        {
2629
                        (yy_last_accepting_state) = yy_current_state;
2630
                        (yy_last_accepting_cpos) = yy_cp;
2631
                        }
2632
                while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2633
                        {
2634
                        yy_current_state = (int) yy_def[yy_current_state];
2635
                        if ( yy_current_state >= 555 )
2636
                                yy_c = yy_meta[(unsigned int) yy_c];
2637
                        }
2638
                yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2639
                }
2640
 
2641
        return yy_current_state;
2642
}
2643
 
2644
/* yy_try_NUL_trans - try to make a transition on the NUL character
2645
 *
2646
 * synopsis
2647
 *      next_state = yy_try_NUL_trans( current_state );
2648
 */
2649
    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
2650
{
2651
        register int yy_is_jam;
2652
        register char *yy_cp = (yy_c_buf_p);
2653
 
2654
        register YY_CHAR yy_c = 1;
2655
        if ( yy_accept[yy_current_state] )
2656
                {
2657
                (yy_last_accepting_state) = yy_current_state;
2658
                (yy_last_accepting_cpos) = yy_cp;
2659
                }
2660
        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2661
                {
2662
                yy_current_state = (int) yy_def[yy_current_state];
2663
                if ( yy_current_state >= 555 )
2664
                        yy_c = yy_meta[(unsigned int) yy_c];
2665
                }
2666
        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2667
        yy_is_jam = (yy_current_state == 554);
2668
 
2669
        return yy_is_jam ? 0 : yy_current_state;
2670
}
2671
 
2672
    static void yyunput (int c, register char * yy_bp )
2673
{
2674
        register char *yy_cp;
2675
 
2676
    yy_cp = (yy_c_buf_p);
2677
 
2678
        /* undo effects of setting up yytext */
2679
        *yy_cp = (yy_hold_char);
2680
 
2681
        if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2682
                { /* need to shift things up to make room */
2683
                /* +2 for EOB chars. */
2684
                register yy_size_t number_to_move = (yy_n_chars) + 2;
2685
                register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
2686
                                        YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
2687
                register char *source =
2688
                                &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
2689
 
2690
                while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
2691
                        *--dest = *--source;
2692
 
2693
                yy_cp += (int) (dest - source);
2694
                yy_bp += (int) (dest - source);
2695
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
2696
                        (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
2697
 
2698
                if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
2699
                        YY_FATAL_ERROR( "flex scanner push-back overflow" );
2700
                }
2701
 
2702
        *--yy_cp = (char) c;
2703
 
2704
        (yytext_ptr) = yy_bp;
2705
        (yy_hold_char) = *yy_cp;
2706
        (yy_c_buf_p) = yy_cp;
2707
}
2708
 
2709
#ifndef YY_NO_INPUT
2710
#ifdef __cplusplus
2711
    static int yyinput (void)
2712
#else
2713
    static int input  (void)
2714
#endif
2715
 
2716
{
2717
        int c;
2718
 
2719
        *(yy_c_buf_p) = (yy_hold_char);
2720
 
2721
        if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
2722
                {
2723
                /* yy_c_buf_p now points to the character we want to return.
2724
                 * If this occurs *before* the EOB characters, then it's a
2725
                 * valid NUL; if not, then we've hit the end of the buffer.
2726
                 */
2727
                if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2728
                        /* This was really a NUL. */
2729
                        *(yy_c_buf_p) = '\0';
2730
 
2731
                else
2732
                        { /* need more input */
2733
                        yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
2734
                        ++(yy_c_buf_p);
2735
 
2736
                        switch ( yy_get_next_buffer(  ) )
2737
                                {
2738
                                case EOB_ACT_LAST_MATCH:
2739
                                        /* This happens because yy_g_n_b()
2740
                                         * sees that we've accumulated a
2741
                                         * token and flags that we need to
2742
                                         * try matching the token before
2743
                                         * proceeding.  But for input(),
2744
                                         * there's no matching to consider.
2745
                                         * So convert the EOB_ACT_LAST_MATCH
2746
                                         * to EOB_ACT_END_OF_FILE.
2747
                                         */
2748
 
2749
                                        /* Reset buffer status. */
2750
                                        yyrestart(yyin );
2751
 
2752
                                        /*FALLTHROUGH*/
2753
 
2754
                                case EOB_ACT_END_OF_FILE:
2755
                                        {
2756
                                        if ( yywrap( ) )
2757
                                                return 0;
2758
 
2759
                                        if ( ! (yy_did_buffer_switch_on_eof) )
2760
                                                YY_NEW_FILE;
2761
#ifdef __cplusplus
2762
                                        return yyinput();
2763
#else
2764
                                        return input();
2765
#endif
2766
                                        }
2767
 
2768
                                case EOB_ACT_CONTINUE_SCAN:
2769
                                        (yy_c_buf_p) = (yytext_ptr) + offset;
2770
                                        break;
2771
                                }
2772
                        }
2773
                }
2774
 
2775
        c = *(unsigned char *) (yy_c_buf_p);    /* cast for 8-bit char's */
2776
        *(yy_c_buf_p) = '\0';   /* preserve yytext */
2777
        (yy_hold_char) = *++(yy_c_buf_p);
2778
 
2779
        return c;
2780
}
2781
#endif  /* ifndef YY_NO_INPUT */
2782
 
2783
/** Immediately switch to a different input stream.
2784
 * @param input_file A readable stream.
2785
 *
2786
 * @note This function does not reset the start condition to @c INITIAL .
2787
 */
2788
    void yyrestart  (FILE * input_file )
2789
{
2790
 
2791
        if ( ! YY_CURRENT_BUFFER ){
2792
        yyensure_buffer_stack ();
2793
                YY_CURRENT_BUFFER_LVALUE =
2794
            yy_create_buffer(yyin,YY_BUF_SIZE );
2795
        }
2796
 
2797
        yy_init_buffer(YY_CURRENT_BUFFER,input_file );
2798
        yy_load_buffer_state( );
2799
}
2800
 
2801
/** Switch to a different input buffer.
2802
 * @param new_buffer The new input buffer.
2803
 *
2804
 */
2805
    void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
2806
{
2807
 
2808
        /* TODO. We should be able to replace this entire function body
2809
         * with
2810
         *              yypop_buffer_state();
2811
         *              yypush_buffer_state(new_buffer);
2812
     */
2813
        yyensure_buffer_stack ();
2814
        if ( YY_CURRENT_BUFFER == new_buffer )
2815
                return;
2816
 
2817
        if ( YY_CURRENT_BUFFER )
2818
                {
2819
                /* Flush out information for old buffer. */
2820
                *(yy_c_buf_p) = (yy_hold_char);
2821
                YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2822
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2823
                }
2824
 
2825
        YY_CURRENT_BUFFER_LVALUE = new_buffer;
2826
        yy_load_buffer_state( );
2827
 
2828
        /* We don't actually know whether we did this switch during
2829
         * EOF (yywrap()) processing, but the only time this flag
2830
         * is looked at is after yywrap() is called, so it's safe
2831
         * to go ahead and always set it.
2832
         */
2833
        (yy_did_buffer_switch_on_eof) = 1;
2834
}
2835
 
2836
static void yy_load_buffer_state  (void)
2837
{
2838
        (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2839
        (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2840
        yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2841
        (yy_hold_char) = *(yy_c_buf_p);
2842
}
2843
 
2844
/** Allocate and initialize an input buffer state.
2845
 * @param file A readable stream.
2846
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2847
 *
2848
 * @return the allocated buffer state.
2849
 */
2850
    YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
2851
{
2852
        YY_BUFFER_STATE b;
2853
 
2854
        b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
2855
        if ( ! b )
2856
                YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2857
 
2858
        b->yy_buf_size = size;
2859
 
2860
        /* yy_ch_buf has to be 2 characters longer than the size given because
2861
         * we need to put in 2 end-of-buffer characters.
2862
         */
2863
        b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  );
2864
        if ( ! b->yy_ch_buf )
2865
                YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2866
 
2867
        b->yy_is_our_buffer = 1;
2868
 
2869
        yy_init_buffer(b,file );
2870
 
2871
        return b;
2872
}
2873
 
2874
/** Destroy the buffer.
2875
 * @param b a buffer created with yy_create_buffer()
2876
 *
2877
 */
2878
    void yy_delete_buffer (YY_BUFFER_STATE  b )
2879
{
2880
 
2881
        if ( ! b )
2882
                return;
2883
 
2884
        if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2885
                YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2886
 
2887
        if ( b->yy_is_our_buffer )
2888
                yyfree((void *) b->yy_ch_buf  );
2889
 
2890
        yyfree((void *) b  );
2891
}
2892
 
2893
#ifndef __cplusplus
2894
extern int isatty (int );
2895
#endif /* __cplusplus */
2896
 
2897
/* Initializes or reinitializes a buffer.
2898
 * This function is sometimes called more than once on the same buffer,
2899
 * such as during a yyrestart() or at EOF.
2900
 */
2901
    static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )
2902
 
2903
{
2904
        int oerrno = errno;
2905
 
2906
        yy_flush_buffer(b );
2907
 
2908
        b->yy_input_file = file;
2909
        b->yy_fill_buffer = 1;
2910
 
2911
    /* If b is the current buffer, then yy_init_buffer was _probably_
2912
     * called from yyrestart() or through yy_get_next_buffer.
2913
     * In that case, we don't want to reset the lineno or column.
2914
     */
2915
    if (b != YY_CURRENT_BUFFER){
2916
        b->yy_bs_lineno = 1;
2917
        b->yy_bs_column = 0;
2918
    }
2919
 
2920
        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2921
 
2922
        errno = oerrno;
2923
}
2924
 
2925
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2926
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2927
 *
2928
 */
2929
    void yy_flush_buffer (YY_BUFFER_STATE  b )
2930
{
2931
        if ( ! b )
2932
                return;
2933
 
2934
        b->yy_n_chars = 0;
2935
 
2936
        /* We always need two end-of-buffer characters.  The first causes
2937
         * a transition to the end-of-buffer state.  The second causes
2938
         * a jam in that state.
2939
         */
2940
        b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2941
        b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2942
 
2943
        b->yy_buf_pos = &b->yy_ch_buf[0];
2944
 
2945
        b->yy_at_bol = 1;
2946
        b->yy_buffer_status = YY_BUFFER_NEW;
2947
 
2948
        if ( b == YY_CURRENT_BUFFER )
2949
                yy_load_buffer_state( );
2950
}
2951
 
2952
/** Pushes the new state onto the stack. The new state becomes
2953
 *  the current state. This function will allocate the stack
2954
 *  if necessary.
2955
 *  @param new_buffer The new state.
2956
 *
2957
 */
2958
void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
2959
{
2960
        if (new_buffer == NULL)
2961
                return;
2962
 
2963
        yyensure_buffer_stack();
2964
 
2965
        /* This block is copied from yy_switch_to_buffer. */
2966
        if ( YY_CURRENT_BUFFER )
2967
                {
2968
                /* Flush out information for old buffer. */
2969
                *(yy_c_buf_p) = (yy_hold_char);
2970
                YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
2971
                YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
2972
                }
2973
 
2974
        /* Only push if top exists. Otherwise, replace top. */
2975
        if (YY_CURRENT_BUFFER)
2976
                (yy_buffer_stack_top)++;
2977
        YY_CURRENT_BUFFER_LVALUE = new_buffer;
2978
 
2979
        /* copied from yy_switch_to_buffer. */
2980
        yy_load_buffer_state( );
2981
        (yy_did_buffer_switch_on_eof) = 1;
2982
}
2983
 
2984
/** Removes and deletes the top of the stack, if present.
2985
 *  The next element becomes the new top.
2986
 *
2987
 */
2988
void yypop_buffer_state (void)
2989
{
2990
        if (!YY_CURRENT_BUFFER)
2991
                return;
2992
 
2993
        yy_delete_buffer(YY_CURRENT_BUFFER );
2994
        YY_CURRENT_BUFFER_LVALUE = NULL;
2995
        if ((yy_buffer_stack_top) > 0)
2996
                --(yy_buffer_stack_top);
2997
 
2998
        if (YY_CURRENT_BUFFER) {
2999
                yy_load_buffer_state( );
3000
                (yy_did_buffer_switch_on_eof) = 1;
3001
        }
3002
}
3003
 
3004
/* Allocates the stack if it does not exist.
3005
 *  Guarantees space for at least one push.
3006
 */
3007
static void yyensure_buffer_stack (void)
3008
{
3009
        yy_size_t num_to_alloc;
3010
 
3011
        if (!(yy_buffer_stack)) {
3012
 
3013
                /* First allocation is just for 2 elements, since we don't know if this
3014
                 * scanner will even need a stack. We use 2 instead of 1 to avoid an
3015
                 * immediate realloc on the next call.
3016
         */
3017
                num_to_alloc = 1;
3018
                (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
3019
                                                                (num_to_alloc * sizeof(struct yy_buffer_state*)
3020
                                                                );
3021
                if ( ! (yy_buffer_stack) )
3022
                        YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3023
 
3024
                memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
3025
 
3026
                (yy_buffer_stack_max) = num_to_alloc;
3027
                (yy_buffer_stack_top) = 0;
3028
                return;
3029
        }
3030
 
3031
        if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
3032
 
3033
                /* Increase the buffer to prepare for a possible push. */
3034
                int grow_size = 8 /* arbitrary grow size */;
3035
 
3036
                num_to_alloc = (yy_buffer_stack_max) + grow_size;
3037
                (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
3038
                                                                ((yy_buffer_stack),
3039
                                                                num_to_alloc * sizeof(struct yy_buffer_state*)
3040
                                                                );
3041
                if ( ! (yy_buffer_stack) )
3042
                        YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
3043
 
3044
                /* zero only the new slots.*/
3045
                memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
3046
                (yy_buffer_stack_max) = num_to_alloc;
3047
        }
3048
}
3049
 
3050
/** Setup the input buffer state to scan directly from a user-specified character buffer.
3051
 * @param base the character buffer
3052
 * @param size the size in bytes of the character buffer
3053
 *
3054
 * @return the newly allocated buffer state object.
3055
 */
3056
YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
3057
{
3058
        YY_BUFFER_STATE b;
3059
 
3060
        if ( size < 2 ||
3061
             base[size-2] != YY_END_OF_BUFFER_CHAR ||
3062
             base[size-1] != YY_END_OF_BUFFER_CHAR )
3063
                /* They forgot to leave room for the EOB's. */
3064
                return 0;
3065
 
3066
        b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
3067
        if ( ! b )
3068
                YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
3069
 
3070
        b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
3071
        b->yy_buf_pos = b->yy_ch_buf = base;
3072
        b->yy_is_our_buffer = 0;
3073
        b->yy_input_file = 0;
3074
        b->yy_n_chars = b->yy_buf_size;
3075
        b->yy_is_interactive = 0;
3076
        b->yy_at_bol = 1;
3077
        b->yy_fill_buffer = 0;
3078
        b->yy_buffer_status = YY_BUFFER_NEW;
3079
 
3080
        yy_switch_to_buffer(b  );
3081
 
3082
        return b;
3083
}
3084
 
3085
/** Setup the input buffer state to scan a string. The next call to yylex() will
3086
 * scan from a @e copy of @a str.
3087
 * @param yystr a NUL-terminated string to scan
3088
 *
3089
 * @return the newly allocated buffer state object.
3090
 * @note If you want to scan bytes that may contain NUL values, then use
3091
 *       yy_scan_bytes() instead.
3092
 */
3093
YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
3094
{
3095
 
3096
        return yy_scan_bytes(yystr,strlen(yystr) );
3097
}
3098
 
3099
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
3100
 * scan from a @e copy of @a bytes.
3101
 * @param bytes the byte buffer to scan
3102
 * @param len the number of bytes in the buffer pointed to by @a bytes.
3103
 *
3104
 * @return the newly allocated buffer state object.
3105
 */
3106
YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len )
3107
{
3108
        YY_BUFFER_STATE b;
3109
        char *buf;
3110
        yy_size_t n, i;
3111
 
3112
        /* Get memory for full buffer, including space for trailing EOB's. */
3113
        n = _yybytes_len + 2;
3114
        buf = (char *) yyalloc(n  );
3115
        if ( ! buf )
3116
                YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
3117
 
3118
        for ( i = 0; i < _yybytes_len; ++i )
3119
                buf[i] = yybytes[i];
3120
 
3121
        buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
3122
 
3123
        b = yy_scan_buffer(buf,n );
3124
        if ( ! b )
3125
                YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
3126
 
3127
        /* It's okay to grow etc. this buffer, and we should throw it
3128
         * away when we're done.
3129
         */
3130
        b->yy_is_our_buffer = 1;
3131
 
3132
        return b;
3133
}
3134
 
3135
#ifndef YY_EXIT_FAILURE
3136
#define YY_EXIT_FAILURE 2
3137
#endif
3138
 
3139
static void yy_fatal_error (yyconst char* msg )
3140
{
3141
        (void) fprintf( stderr, "%s\n", msg );
3142
        exit( YY_EXIT_FAILURE );
3143
}
3144
 
3145
/* Redefine yyless() so it works in section 3 code. */
3146
 
3147
#undef yyless
3148
#define yyless(n) \
3149
        do \
3150
                { \
3151
                /* Undo effects of setting up yytext. */ \
3152
        int yyless_macro_arg = (n); \
3153
        YY_LESS_LINENO(yyless_macro_arg);\
3154
                yytext[yyleng] = (yy_hold_char); \
3155
                (yy_c_buf_p) = yytext + yyless_macro_arg; \
3156
                (yy_hold_char) = *(yy_c_buf_p); \
3157
                *(yy_c_buf_p) = '\0'; \
3158
                yyleng = yyless_macro_arg; \
3159
                } \
3160
        while ( 0 )
3161
 
3162
/* Accessor  methods (get/set functions) to struct members. */
3163
 
3164
/** Get the current line number.
3165
 *
3166
 */
3167
int yyget_lineno  (void)
3168
{
3169
 
3170
    return yylineno;
3171
}
3172
 
3173
/** Get the input stream.
3174
 *
3175
 */
3176
FILE *yyget_in  (void)
3177
{
3178
        return yyin;
3179
}
3180
 
3181
/** Get the output stream.
3182
 *
3183
 */
3184
FILE *yyget_out  (void)
3185
{
3186
        return yyout;
3187
}
3188
 
3189
/** Get the length of the current token.
3190
 *
3191
 */
3192
yy_size_t yyget_leng  (void)
3193
{
3194
        return yyleng;
3195
}
3196
 
3197
/** Get the current token.
3198
 *
3199
 */
3200
 
3201
char *yyget_text  (void)
3202
{
3203
        return yytext;
3204
}
3205
 
3206
/** Set the current line number.
3207
 * @param line_number
3208
 *
3209
 */
3210
void yyset_lineno (int  line_number )
3211
{
3212
 
3213
    yylineno = line_number;
3214
}
3215
 
3216
/** Set the input stream. This does not discard the current
3217
 * input buffer.
3218
 * @param in_str A readable stream.
3219
 *
3220
 * @see yy_switch_to_buffer
3221
 */
3222
void yyset_in (FILE *  in_str )
3223
{
3224
        yyin = in_str ;
3225
}
3226
 
3227
void yyset_out (FILE *  out_str )
3228
{
3229
        yyout = out_str ;
3230
}
3231
 
3232
int yyget_debug  (void)
3233
{
3234
        return yy_flex_debug;
3235
}
3236
 
3237
void yyset_debug (int  bdebug )
3238
{
3239
        yy_flex_debug = bdebug ;
3240
}
3241
 
3242
static int yy_init_globals (void)
3243
{
3244
        /* Initialization is the same as for the non-reentrant scanner.
3245
     * This function is called from yylex_destroy(), so don't allocate here.
3246
     */
3247
 
3248
    (yy_buffer_stack) = 0;
3249
    (yy_buffer_stack_top) = 0;
3250
    (yy_buffer_stack_max) = 0;
3251
    (yy_c_buf_p) = (char *) 0;
3252
    (yy_init) = 0;
3253
    (yy_start) = 0;
3254
 
3255
/* Defined in main.c */
3256
#ifdef YY_STDINIT
3257
    yyin = stdin;
3258
    yyout = stdout;
3259
#else
3260
    yyin = (FILE *) 0;
3261
    yyout = (FILE *) 0;
3262
#endif
3263
 
3264
    /* For future reference: Set errno on error, since we are called by
3265
     * yylex_init()
3266
     */
3267
    return 0;
3268
}
3269
 
3270
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
3271
int yylex_destroy  (void)
3272
{
3273
 
3274
    /* Pop the buffer stack, destroying each element. */
3275
        while(YY_CURRENT_BUFFER){
3276
                yy_delete_buffer(YY_CURRENT_BUFFER  );
3277
                YY_CURRENT_BUFFER_LVALUE = NULL;
3278
                yypop_buffer_state();
3279
        }
3280
 
3281
        /* Destroy the stack itself. */
3282
        yyfree((yy_buffer_stack) );
3283
        (yy_buffer_stack) = NULL;
3284
 
3285
    /* Reset the globals. This is important in a non-reentrant scanner so the next time
3286
     * yylex() is called, initialization will occur. */
3287
    yy_init_globals( );
3288
 
3289
    return 0;
3290
}
3291
 
3292
/*
3293
 * Internal utility routines.
3294
 */
3295
 
3296
#ifndef yytext_ptr
3297
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
3298
{
3299
        register int i;
3300
        for ( i = 0; i < n; ++i )
3301
                s1[i] = s2[i];
3302
}
3303
#endif
3304
 
3305
#ifdef YY_NEED_STRLEN
3306
static int yy_flex_strlen (yyconst char * s )
3307
{
3308
        register int n;
3309
        for ( n = 0; s[n]; ++n )
3310
                ;
3311
 
3312
        return n;
3313
}
3314
#endif
3315
 
3316
void *yyalloc (yy_size_t  size )
3317
{
3318
        return (void *) malloc( size );
3319
}
3320
 
3321
void *yyrealloc  (void * ptr, yy_size_t  size )
3322
{
3323
        /* The cast to (char *) in the following accommodates both
3324
         * implementations that use char* generic pointers, and those
3325
         * that use void* generic pointers.  It works with the latter
3326
         * because both ANSI C and C++ allow castless assignment from
3327
         * any pointer type to void*, and deal with argument conversions
3328
         * as though doing an assignment.
3329
         */
3330
        return (void *) realloc( (char *) ptr, size );
3331
}
3332
 
3333
void yyfree (void * ptr )
3334
{
3335
        free( (char *) ptr );   /* see yyrealloc() for (char *) cast */
3336
}
3337
 
3338
#define YYTABLES_NAME "yytables"
3339
 
3340
#line 336 "bfin-lex.l"
3341
 
3342
 
3343
static long parse_int (char **end)
3344
{
3345
  char fmt = '\0';
3346
  int not_done = 1;
3347
  int shiftvalue = 0;
3348
  char * char_bag;
3349
  long value = 0;
3350
  char c;
3351
  char *arg = *end;
3352
 
3353
  while (*arg && *arg == ' ')
3354
    arg++;
3355
 
3356
  switch (*arg)
3357
    {
3358
      case '1':
3359
      case '2':
3360
      case '3':
3361
      case '4':
3362
      case '5':
3363
      case '6':
3364
      case '7':
3365
      case '8':
3366
      case '9':
3367
        fmt = 'd';
3368
        break;
3369
 
3370
      case '0':  /* Accept different formated integers hex octal and binary. */
3371
        {
3372
          c = *++arg;
3373
          arg++;
3374
          if (c == 'x' || c == 'X') /* Hex input.  */
3375
            fmt = 'h';
3376
          else if (c == 'b' || c == 'B')
3377
            fmt = 'b';
3378
          else if (c == '.')
3379
            fmt = 'f';
3380
          else
3381
            {             /* Octal.  */
3382
              arg--;
3383
              fmt = 'o';
3384
            }
3385
          break;
3386
        }
3387
 
3388
      case 'd':
3389
      case 'D':
3390
      case 'h':
3391
      case 'H':
3392
      case 'o':
3393
      case 'O':
3394
      case 'b':
3395
      case 'B':
3396
      case 'f':
3397
      case 'F':
3398
        {
3399
          fmt = *arg++;
3400
          if (*arg == '#')
3401
            arg++;
3402
        }
3403
    }
3404
 
3405
  switch (fmt)
3406
    {
3407
      case 'h':
3408
      case 'H':
3409
        shiftvalue = 4;
3410
        char_bag = "0123456789ABCDEFabcdef";
3411
        break;
3412
 
3413
      case 'o':
3414
      case 'O':
3415
        shiftvalue = 3;
3416
        char_bag = "01234567";
3417
        break;
3418
 
3419
      case 'b':
3420
      case 'B':
3421
        shiftvalue = 1;
3422
        char_bag = "01";
3423
        break;
3424
 
3425
/* The assembler allows for fractional constants to be created
3426
   by either the 0.xxxx or the f#xxxx format
3427
 
3428
   i.e.   0.5 would result in 0x4000
3429
 
3430
   note .5 would result in the identifier .5.
3431
 
3432
   The assembler converts to fractional format 1.15 by the simple rule:
3433
 
3434
             value = (short) (finput * (1 << 15)).  */
3435
 
3436
      case 'f':
3437
      case 'F':
3438
        {
3439
          float fval = 0.0;
3440
          float pos = 10.0;
3441
          while (1)
3442
            {
3443
              int c;
3444
              c = *arg++;
3445
 
3446
              if (c >= '0' && c <= '9')
3447
                {
3448
                  float digit = (c - '0') / pos;
3449
                  fval = fval + digit;
3450
                  pos = pos * 10.0;
3451
                }
3452
              else
3453
                {
3454
                  *--arg = c;
3455
                  value = (short) (fval * (1 << 15));
3456
                  break;
3457
                }
3458
            }
3459
          *end = arg+1;
3460
          return value;
3461
        }
3462
 
3463
      case 'd':
3464
      case 'D':
3465
      default:
3466
        {
3467
          while (1)
3468
            {
3469
              int c;
3470
              c = *arg++;
3471
              if (c >= '0' && c <= '9')
3472
                value = (value * 10) + (c - '0');
3473
              else
3474
                {
3475
                  /* Constants that are suffixed with k|K are multiplied by 1024
3476
                     This suffix is only allowed on decimal constants. */
3477
                  if (c == 'k' || c == 'K')
3478
                    value *= 1024;
3479
                  else
3480
                    *--arg = c;
3481
                  break;
3482
                }
3483
            }
3484
          *end = arg+1;
3485
          return value;
3486
        }
3487
    }
3488
 
3489
  while (not_done)
3490
    {
3491
      char c;
3492
      c = *arg++;
3493
      if (c == 0 || !index (char_bag, c))
3494
        {
3495
          not_done = 0;
3496
          *--arg = c;
3497
        }
3498
      else
3499
        {
3500
          if (c >= 'a' && c <= 'z')
3501
            c = c - ('a' - '9') + 1;
3502
          else if (c >= 'A' && c <= 'Z')
3503
            c = c - ('A' - '9') + 1;
3504
 
3505
          c -= '0';
3506
          value = (value << shiftvalue) + c;
3507
        }
3508
    }
3509
  *end = arg+1;
3510
  return value;
3511
}
3512
 
3513
 
3514
static int parse_reg (Register *r, int cl, char *rt)
3515
{
3516
  r->regno = cl | (rt[1] - '0');
3517
  r->flags = F_REG_NONE;
3518
  return REG;
3519
}
3520
 
3521
static int parse_halfreg (Register *r, int cl, char *rt)
3522
{
3523
  r->regno = cl | (rt[1] - '0');
3524
 
3525
  switch (rt[3])
3526
    {
3527
      case 'b':
3528
      case 'B':
3529
        return BYTE_DREG;
3530
 
3531
      case 'l':
3532
      case 'L':
3533
        r->flags = F_REG_LOW;
3534
        break;
3535
 
3536
      case 'h':
3537
      case 'H':
3538
        r->flags = F_REG_HIGH;
3539
        break;
3540
    }
3541
 
3542
  return HALF_REG;
3543
}
3544
 
3545
/* Our start state is KEYWORD as we have
3546
   command keywords such as PREFETCH.  */
3547
 
3548
void
3549
set_start_state (void)
3550
{
3551
  BEGIN KEYWORD;
3552
}
3553
 
3554
 
3555
#ifndef yywrap
3556
int
3557
yywrap ()
3558
{
3559
  return 1;
3560
}
3561
#endif
3562
 

powered by: WebSVN 2.1.0

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