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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [binutils-2.18.50/] [binutils/] [arlex.c] - Blame information for rev 825

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

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

powered by: WebSVN 2.1.0

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