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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-binutils/] [binutils-2.19.1/] [gas/] [itbl-lex.c] - Blame information for rev 6

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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