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

Subversion Repositories openrisc_me

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

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

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

powered by: WebSVN 2.1.0

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