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

Subversion Repositories openrisc

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

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 25
286
#define YY_END_OF_BUFFER 26
287
static yyconst short int yy_accept[81] =
288
    {   0,
289
        0,    0,   26,   25,    7,    8,    5,   25,    1,    2,
290
       11,   11,    6,    3,    4,   25,   25,   25,   25,   25,
291
       25,   25,    0,    9,   11,    0,    6,    0,    0,    0,
292
        0,    0,    0,    0,    0,    0,    0,   10,    0,    0,
293
       13,    0,    0,    0,    0,   16,    0,    0,    0,    0,
294
        0,   12,   15,    0,   23,    0,    0,    0,    0,    0,
295
        0,   14,   18,    0,    0,    0,    0,    0,   17,    0,
296
       24,    0,    0,    0,   20,   22,    0,   21,   19,    0
297
    } ;
298
 
299
static yyconst int yy_ec[256] =
300
    {   0,
301
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
302
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
303
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
304
        1,    4,    1,    5,    1,    1,    1,    1,    1,    6,
305
        7,    1,    1,    1,    1,    1,    1,    8,    9,    9,
306
        9,    9,    9,    9,    9,    9,    9,    1,   10,    1,
307
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
308
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
309
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
310
       11,    1,   12,    1,    1,    1,   13,   14,   15,   16,
311
 
312
       17,   18,   19,   20,   21,    1,    1,   22,    1,   23,
313
       24,   25,    1,   26,   27,   28,   29,   30,    1,   31,
314
       32,   33,    1,    1,    1,    1,    1,    1,    1,    1,
315
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
316
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
317
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
318
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
319
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
320
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
321
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
322
 
323
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
324
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
325
        1,    1,    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
329
    } ;
330
 
331
static yyconst int yy_meta[34] =
332
    {   0,
333
        1,    1,    2,    1,    1,    1,    1,    3,    3,    1,
334
        1,    1,    3,    3,    3,    3,    3,    3,    1,    1,
335
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
336
        1,    1,    1
337
    } ;
338
 
339
static yyconst short int yy_base[84] =
340
    {   0,
341
        0,    0,  100,  101,  101,  101,  101,   94,  101,  101,
342
       26,   28,    0,  101,  101,   82,   26,   18,   74,   79,
343
       78,   81,   88,  101,   32,    0,    0,   76,   65,   62,
344
       61,   75,   20,   59,   61,   66,   58,    0,   57,   56,
345
       54,   63,   53,   62,   54,  101,   59,   48,   53,   46,
346
       59,  101,   44,   43,  101,   41,   55,   46,   53,   44,
347
       31,  101,  101,   39,   27,   21,   39,   19,  101,   35,
348
      101,   33,   26,   29,  101,  101,   28,  101,  101,  101,
349
       58,   61,   41
350
    } ;
351
 
352
static yyconst short int yy_def[84] =
353
    {   0,
354
       80,    1,   80,   80,   80,   80,   80,   81,   80,   80,
355
       80,   80,   82,   80,   80,   80,   80,   80,   80,   80,
356
       80,   80,   81,   80,   80,   83,   82,   80,   80,   80,
357
       80,   80,   80,   80,   80,   80,   80,   83,   80,   80,
358
       80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
359
       80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
360
       80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
361
       80,   80,   80,   80,   80,   80,   80,   80,   80,    0,
362
       80,   80,   80
363
    } ;
364
 
365
static yyconst short int yy_nxt[135] =
366
    {   0,
367
        4,    5,    6,    7,    8,    9,   10,   11,   12,   13,
368
       14,   15,   16,   17,   18,    4,    4,    4,    4,    4,
369
       19,    4,    4,    4,    4,   20,   21,    4,    4,   22,
370
        4,    4,    4,   25,   25,   25,   25,   32,   29,   25,
371
       25,   33,   44,   38,   79,   78,   30,   77,   45,   76,
372
       75,   74,   73,   72,   71,   70,   26,   31,   23,   23,
373
       23,   27,   69,   27,   68,   67,   66,   65,   64,   63,
374
       62,   61,   60,   59,   58,   57,   56,   55,   54,   53,
375
       52,   51,   50,   49,   48,   47,   46,   43,   42,   41,
376
       40,   39,   24,   37,   36,   35,   34,   28,   24,   80,
377
 
378
        3,   80,   80,   80,   80,   80,   80,   80,   80,   80,
379
       80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
380
       80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
381
       80,   80,   80,   80
382
    } ;
383
 
384
static yyconst short int yy_chk[135] =
385
    {   0,
386
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
387
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
388
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
389
        1,    1,    1,   11,   11,   12,   12,   18,   17,   25,
390
       25,   18,   33,   83,   77,   74,   17,   73,   33,   72,
391
       70,   68,   67,   66,   65,   64,   11,   17,   81,   81,
392
       81,   82,   61,   82,   60,   59,   58,   57,   56,   54,
393
       53,   51,   50,   49,   48,   47,   45,   44,   43,   42,
394
       41,   40,   39,   37,   36,   35,   34,   32,   31,   30,
395
       29,   28,   23,   22,   21,   20,   19,   16,    8,    3,
396
 
397
       80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
398
       80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
399
       80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
400
       80,   80,   80,   80
401
    } ;
402
 
403
static yy_state_type yy_last_accepting_state;
404
static char *yy_last_accepting_cpos;
405
 
406
/* The intent behind this definition is that it'll catch
407
 * any uses of REJECT which flex missed.
408
 */
409
#define REJECT reject_used_but_not_detected
410
#define yymore() yymore_used_but_not_detected
411
#define YY_MORE_ADJ 0
412
#define YY_RESTORE_YY_MORE_OFFSET
413
char *yytext;
414
#line 1 "syslex.l"
415
#define INITIAL 0
416
#line 2 "syslex.l"
417
/* Copyright 2001, 2003, 2005, 2007 Free Software Foundation, Inc.
418
 
419
   This file is part of GNU Binutils.
420
 
421
   This program is free software; you can redistribute it and/or modify
422
   it under the terms of the GNU General Public License as published by
423
   the Free Software Foundation; either version 3, or (at your option)
424
   any later version.
425
 
426
   This program is distributed in the hope that it will be useful,
427
   but WITHOUT ANY WARRANTY; without even the implied warranty of
428
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
429
   GNU General Public License for more details.
430
 
431
   You should have received a copy of the GNU General Public License
432
   along with GLD; see the file COPYING.  If not, write to the Free
433
   Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
434
   02110-1301, USA.  */
435
 
436
#include "config.h"
437
#ifdef HAVE_STRING_H
438
#include <string.h>
439
#else
440
#ifdef HAVE_STRINGS_H
441
#include <strings.h>
442
#endif
443
#endif
444
#include "sysinfo.h"
445
 
446
#define YY_NO_UNPUT
447
 
448
#ifndef yywrap
449
static int yywrap (void) { return 1; }
450
#endif
451
 
452
extern int yylex (void);
453
#line 454 "syslex.c"
454
 
455
/* Macros after this point can all be overridden by user definitions in
456
 * section 1.
457
 */
458
 
459
#ifndef YY_SKIP_YYWRAP
460
#ifdef __cplusplus
461
extern "C" int yywrap YY_PROTO(( void ));
462
#else
463
extern int yywrap YY_PROTO(( void ));
464
#endif
465
#endif
466
 
467
#ifndef YY_NO_UNPUT
468
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
469
#endif
470
 
471
#ifndef yytext_ptr
472
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
473
#endif
474
 
475
#ifdef YY_NEED_STRLEN
476
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
477
#endif
478
 
479
#ifndef YY_NO_INPUT
480
#ifdef __cplusplus
481
static int yyinput YY_PROTO(( void ));
482
#else
483
static int input YY_PROTO(( void ));
484
#endif
485
#endif
486
 
487
#if YY_STACK_USED
488
static int yy_start_stack_ptr = 0;
489
static int yy_start_stack_depth = 0;
490
static int *yy_start_stack = 0;
491
#ifndef YY_NO_PUSH_STATE
492
static void yy_push_state YY_PROTO(( int new_state ));
493
#endif
494
#ifndef YY_NO_POP_STATE
495
static void yy_pop_state YY_PROTO(( void ));
496
#endif
497
#ifndef YY_NO_TOP_STATE
498
static int yy_top_state YY_PROTO(( void ));
499
#endif
500
 
501
#else
502
#define YY_NO_PUSH_STATE 1
503
#define YY_NO_POP_STATE 1
504
#define YY_NO_TOP_STATE 1
505
#endif
506
 
507
#ifdef YY_MALLOC_DECL
508
YY_MALLOC_DECL
509
#else
510
#if __STDC__
511
#ifndef __cplusplus
512
#include <stdlib.h>
513
#endif
514
#else
515
/* Just try to get by without declaring the routines.  This will fail
516
 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
517
 * or sizeof(void*) != sizeof(int).
518
 */
519
#endif
520
#endif
521
 
522
/* Amount of stuff to slurp up with each read. */
523
#ifndef YY_READ_BUF_SIZE
524
#define YY_READ_BUF_SIZE 8192
525
#endif
526
 
527
/* Copy whatever the last rule matched to the standard output. */
528
 
529
#ifndef ECHO
530
/* This used to be an fputs(), but since the string might contain NUL's,
531
 * we now use fwrite().
532
 */
533
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
534
#endif
535
 
536
/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
537
 * is returned in "result".
538
 */
539
#ifndef YY_INPUT
540
#define YY_INPUT(buf,result,max_size) \
541
        if ( yy_current_buffer->yy_is_interactive ) \
542
                { \
543
                int c = '*', n; \
544
                for ( n = 0; n < max_size && \
545
                             (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
546
                        buf[n] = (char) c; \
547
                if ( c == '\n' ) \
548
                        buf[n++] = (char) c; \
549
                if ( c == EOF && ferror( yyin ) ) \
550
                        YY_FATAL_ERROR( "input in flex scanner failed" ); \
551
                result = n; \
552
                } \
553
        else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
554
                  && ferror( yyin ) ) \
555
                YY_FATAL_ERROR( "input in flex scanner failed" );
556
#endif
557
 
558
/* No semi-colon after return; correct usage is to write "yyterminate();" -
559
 * we don't want an extra ';' after the "return" because that will cause
560
 * some compilers to complain about unreachable statements.
561
 */
562
#ifndef yyterminate
563
#define yyterminate() return YY_NULL
564
#endif
565
 
566
/* Number of entries by which start-condition stack grows. */
567
#ifndef YY_START_STACK_INCR
568
#define YY_START_STACK_INCR 25
569
#endif
570
 
571
/* Report a fatal error. */
572
#ifndef YY_FATAL_ERROR
573
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
574
#endif
575
 
576
/* Default declaration of generated scanner - a define so the user can
577
 * easily add parameters.
578
 */
579
#ifndef YY_DECL
580
#define YY_DECL int yylex YY_PROTO(( void ))
581
#endif
582
 
583
/* Code executed at the beginning of each rule, after yytext and yyleng
584
 * have been set up.
585
 */
586
#ifndef YY_USER_ACTION
587
#define YY_USER_ACTION
588
#endif
589
 
590
/* Code executed at the end of each rule. */
591
#ifndef YY_BREAK
592
#define YY_BREAK break;
593
#endif
594
 
595
#define YY_RULE_SETUP \
596
        YY_USER_ACTION
597
 
598
YY_DECL
599
        {
600
        register yy_state_type yy_current_state;
601
        register char *yy_cp = NULL, *yy_bp = NULL;
602
        register int yy_act;
603
 
604
#line 39 "syslex.l"
605
 
606
#line 607 "syslex.c"
607
 
608
        if ( yy_init )
609
                {
610
                yy_init = 0;
611
 
612
#ifdef YY_USER_INIT
613
                YY_USER_INIT;
614
#endif
615
 
616
                if ( ! yy_start )
617
                        yy_start = 1;   /* first start state */
618
 
619
                if ( ! yyin )
620
                        yyin = stdin;
621
 
622
                if ( ! yyout )
623
                        yyout = stdout;
624
 
625
                if ( ! yy_current_buffer )
626
                        yy_current_buffer =
627
                                yy_create_buffer( yyin, YY_BUF_SIZE );
628
 
629
                yy_load_buffer_state();
630
                }
631
 
632
        while ( 1 )             /* loops until end-of-file is reached */
633
                {
634
                yy_cp = yy_c_buf_p;
635
 
636
                /* Support of yytext. */
637
                *yy_cp = yy_hold_char;
638
 
639
                /* yy_bp points to the position in yy_ch_buf of the start of
640
                 * the current run.
641
                 */
642
                yy_bp = yy_cp;
643
 
644
                yy_current_state = yy_start;
645
yy_match:
646
                do
647
                        {
648
                        register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
649
                        if ( yy_accept[yy_current_state] )
650
                                {
651
                                yy_last_accepting_state = yy_current_state;
652
                                yy_last_accepting_cpos = yy_cp;
653
                                }
654
                        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
655
                                {
656
                                yy_current_state = (int) yy_def[yy_current_state];
657
                                if ( yy_current_state >= 81 )
658
                                        yy_c = yy_meta[(unsigned int) yy_c];
659
                                }
660
                        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
661
                        ++yy_cp;
662
                        }
663
                while ( yy_base[yy_current_state] != 101 );
664
 
665
yy_find_action:
666
                yy_act = yy_accept[yy_current_state];
667
                if ( yy_act == 0 )
668
                        { /* have to back up */
669
                        yy_cp = yy_last_accepting_cpos;
670
                        yy_current_state = yy_last_accepting_state;
671
                        yy_act = yy_accept[yy_current_state];
672
                        }
673
 
674
                YY_DO_BEFORE_ACTION;
675
 
676
 
677
do_action:      /* This label is used only to access EOF actions. */
678
 
679
 
680
                switch ( yy_act )
681
        { /* beginning of action switch */
682
                        case 0: /* must back up */
683
                        /* undo the effects of YY_DO_BEFORE_ACTION */
684
                        *yy_cp = yy_hold_char;
685
                        yy_cp = yy_last_accepting_cpos;
686
                        yy_current_state = yy_last_accepting_state;
687
                        goto yy_find_action;
688
 
689
case 1:
690
YY_RULE_SETUP
691
#line 40 "syslex.l"
692
{ return '(';}
693
        YY_BREAK
694
case 2:
695
YY_RULE_SETUP
696
#line 41 "syslex.l"
697
{ return ')';}
698
        YY_BREAK
699
case 3:
700
YY_RULE_SETUP
701
#line 42 "syslex.l"
702
{ return '[';}
703
        YY_BREAK
704
case 4:
705
YY_RULE_SETUP
706
#line 43 "syslex.l"
707
{ return ']';}
708
        YY_BREAK
709
case 5:
710
YY_RULE_SETUP
711
#line 44 "syslex.l"
712
{ ; }
713
        YY_BREAK
714
case 6:
715
YY_RULE_SETUP
716
#line 45 "syslex.l"
717
{ ; }
718
        YY_BREAK
719
case 7:
720
YY_RULE_SETUP
721
#line 46 "syslex.l"
722
{ ; }
723
        YY_BREAK
724
case 8:
725
YY_RULE_SETUP
726
#line 47 "syslex.l"
727
{ ; }
728
        YY_BREAK
729
case 9:
730
YY_RULE_SETUP
731
#line 48 "syslex.l"
732
{
733
        yylval.s = malloc (yyleng - 1);
734
        memcpy (yylval.s, yytext + 1, yyleng - 2);
735
        yylval.s[yyleng - 2] = '\0';
736
        return NAME;
737
        }
738
        YY_BREAK
739
case 10:
740
YY_RULE_SETUP
741
#line 55 "syslex.l"
742
{
743
        yylval.i = strtol(yytext,0,16);
744
        return  NUMBER;
745
        }
746
        YY_BREAK
747
case 11:
748
YY_RULE_SETUP
749
#line 60 "syslex.l"
750
{
751
        yylval.i = atoi(yytext);
752
        return  NUMBER;
753
        }
754
        YY_BREAK
755
case 12:
756
YY_RULE_SETUP
757
#line 66 "syslex.l"
758
{ yylval.i =1 ;return UNIT;}
759
        YY_BREAK
760
case 13:
761
YY_RULE_SETUP
762
#line 67 "syslex.l"
763
{ yylval.i = 1; return UNIT;}
764
        YY_BREAK
765
case 14:
766
YY_RULE_SETUP
767
#line 68 "syslex.l"
768
{ yylval.i= 8; return UNIT;}
769
        YY_BREAK
770
case 15:
771
YY_RULE_SETUP
772
#line 69 "syslex.l"
773
{ yylval.i = 8; return UNIT;}
774
        YY_BREAK
775
case 16:
776
YY_RULE_SETUP
777
#line 71 "syslex.l"
778
{ yylval.s = "INT"; return TYPE;}
779
        YY_BREAK
780
case 17:
781
YY_RULE_SETUP
782
#line 72 "syslex.l"
783
{ yylval.s = "BARRAY"; return TYPE;}
784
        YY_BREAK
785
case 18:
786
YY_RULE_SETUP
787
#line 73 "syslex.l"
788
{ yylval.s = "CHARS"; return TYPE;}
789
        YY_BREAK
790
case 19:
791
YY_RULE_SETUP
792
#line 74 "syslex.l"
793
{ yylval.i = 0; return NUMBER;}
794
        YY_BREAK
795
case 20:
796
YY_RULE_SETUP
797
#line 75 "syslex.l"
798
{ yylval.i = -4; return NUMBER;}
799
        YY_BREAK
800
case 21:
801
YY_RULE_SETUP
802
#line 76 "syslex.l"
803
{ yylval.i = -2; return NUMBER; }
804
        YY_BREAK
805
case 22:
806
YY_RULE_SETUP
807
#line 77 "syslex.l"
808
{ yylval.i = -1; return NUMBER; }
809
        YY_BREAK
810
case 23:
811
YY_RULE_SETUP
812
#line 78 "syslex.l"
813
{ return COND;}
814
        YY_BREAK
815
case 24:
816
YY_RULE_SETUP
817
#line 79 "syslex.l"
818
{ return REPEAT;}
819
        YY_BREAK
820
case 25:
821
YY_RULE_SETUP
822
#line 80 "syslex.l"
823
ECHO;
824
        YY_BREAK
825
#line 826 "syslex.c"
826
case YY_STATE_EOF(INITIAL):
827
        yyterminate();
828
 
829
        case YY_END_OF_BUFFER:
830
                {
831
                /* Amount of text matched not including the EOB char. */
832
                int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
833
 
834
                /* Undo the effects of YY_DO_BEFORE_ACTION. */
835
                *yy_cp = yy_hold_char;
836
                YY_RESTORE_YY_MORE_OFFSET
837
 
838
                if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
839
                        {
840
                        /* We're scanning a new file or input source.  It's
841
                         * possible that this happened because the user
842
                         * just pointed yyin at a new source and called
843
                         * yylex().  If so, then we have to assure
844
                         * consistency between yy_current_buffer and our
845
                         * globals.  Here is the right place to do so, because
846
                         * this is the first action (other than possibly a
847
                         * back-up) that will match for the new input source.
848
                         */
849
                        yy_n_chars = yy_current_buffer->yy_n_chars;
850
                        yy_current_buffer->yy_input_file = yyin;
851
                        yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
852
                        }
853
 
854
                /* Note that here we test for yy_c_buf_p "<=" to the position
855
                 * of the first EOB in the buffer, since yy_c_buf_p will
856
                 * already have been incremented past the NUL character
857
                 * (since all states make transitions on EOB to the
858
                 * end-of-buffer state).  Contrast this with the test
859
                 * in input().
860
                 */
861
                if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
862
                        { /* This was really a NUL. */
863
                        yy_state_type yy_next_state;
864
 
865
                        yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
866
 
867
                        yy_current_state = yy_get_previous_state();
868
 
869
                        /* Okay, we're now positioned to make the NUL
870
                         * transition.  We couldn't have
871
                         * yy_get_previous_state() go ahead and do it
872
                         * for us because it doesn't know how to deal
873
                         * with the possibility of jamming (and we don't
874
                         * want to build jamming into it because then it
875
                         * will run more slowly).
876
                         */
877
 
878
                        yy_next_state = yy_try_NUL_trans( yy_current_state );
879
 
880
                        yy_bp = yytext_ptr + YY_MORE_ADJ;
881
 
882
                        if ( yy_next_state )
883
                                {
884
                                /* Consume the NUL. */
885
                                yy_cp = ++yy_c_buf_p;
886
                                yy_current_state = yy_next_state;
887
                                goto yy_match;
888
                                }
889
 
890
                        else
891
                                {
892
                                yy_cp = yy_c_buf_p;
893
                                goto yy_find_action;
894
                                }
895
                        }
896
 
897
                else switch ( yy_get_next_buffer() )
898
                        {
899
                        case EOB_ACT_END_OF_FILE:
900
                                {
901
                                yy_did_buffer_switch_on_eof = 0;
902
 
903
                                if ( yywrap() )
904
                                        {
905
                                        /* Note: because we've taken care in
906
                                         * yy_get_next_buffer() to have set up
907
                                         * yytext, we can now set up
908
                                         * yy_c_buf_p so that if some total
909
                                         * hoser (like flex itself) wants to
910
                                         * call the scanner after we return the
911
                                         * YY_NULL, it'll still work - another
912
                                         * YY_NULL will get returned.
913
                                         */
914
                                        yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
915
 
916
                                        yy_act = YY_STATE_EOF(YY_START);
917
                                        goto do_action;
918
                                        }
919
 
920
                                else
921
                                        {
922
                                        if ( ! yy_did_buffer_switch_on_eof )
923
                                                YY_NEW_FILE;
924
                                        }
925
                                break;
926
                                }
927
 
928
                        case EOB_ACT_CONTINUE_SCAN:
929
                                yy_c_buf_p =
930
                                        yytext_ptr + yy_amount_of_matched_text;
931
 
932
                                yy_current_state = yy_get_previous_state();
933
 
934
                                yy_cp = yy_c_buf_p;
935
                                yy_bp = yytext_ptr + YY_MORE_ADJ;
936
                                goto yy_match;
937
 
938
                        case EOB_ACT_LAST_MATCH:
939
                                yy_c_buf_p =
940
                                &yy_current_buffer->yy_ch_buf[yy_n_chars];
941
 
942
                                yy_current_state = yy_get_previous_state();
943
 
944
                                yy_cp = yy_c_buf_p;
945
                                yy_bp = yytext_ptr + YY_MORE_ADJ;
946
                                goto yy_find_action;
947
                        }
948
                break;
949
                }
950
 
951
        default:
952
                YY_FATAL_ERROR(
953
                        "fatal flex scanner internal error--no action found" );
954
        } /* end of action switch */
955
                } /* end of scanning one token */
956
        } /* end of yylex */
957
 
958
 
959
/* yy_get_next_buffer - try to read in a new buffer
960
 *
961
 * Returns a code representing an action:
962
 *      EOB_ACT_LAST_MATCH -
963
 *      EOB_ACT_CONTINUE_SCAN - continue scanning from current position
964
 *      EOB_ACT_END_OF_FILE - end of file
965
 */
966
 
967
static int yy_get_next_buffer()
968
        {
969
        register char *dest = yy_current_buffer->yy_ch_buf;
970
        register char *source = yytext_ptr;
971
        register int number_to_move, i;
972
        int ret_val;
973
 
974
        if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
975
                YY_FATAL_ERROR(
976
                "fatal flex scanner internal error--end of buffer missed" );
977
 
978
        if ( yy_current_buffer->yy_fill_buffer == 0 )
979
                { /* Don't try to fill the buffer, so this is an EOF. */
980
                if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
981
                        {
982
                        /* We matched a single character, the EOB, so
983
                         * treat this as a final EOF.
984
                         */
985
                        return EOB_ACT_END_OF_FILE;
986
                        }
987
 
988
                else
989
                        {
990
                        /* We matched some text prior to the EOB, first
991
                         * process it.
992
                         */
993
                        return EOB_ACT_LAST_MATCH;
994
                        }
995
                }
996
 
997
        /* Try to read more data. */
998
 
999
        /* First move last chars to start of buffer. */
1000
        number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1001
 
1002
        for ( i = 0; i < number_to_move; ++i )
1003
                *(dest++) = *(source++);
1004
 
1005
        if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1006
                /* don't do the read, it's not guaranteed to return an EOF,
1007
                 * just force an EOF
1008
                 */
1009
                yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1010
 
1011
        else
1012
                {
1013
                int num_to_read =
1014
                        yy_current_buffer->yy_buf_size - number_to_move - 1;
1015
 
1016
                while ( num_to_read <= 0 )
1017
                        { /* Not enough room in the buffer - grow it. */
1018
#ifdef YY_USES_REJECT
1019
                        YY_FATAL_ERROR(
1020
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1021
#else
1022
 
1023
                        /* just a shorter name for the current buffer */
1024
                        YY_BUFFER_STATE b = yy_current_buffer;
1025
 
1026
                        int yy_c_buf_p_offset =
1027
                                (int) (yy_c_buf_p - b->yy_ch_buf);
1028
 
1029
                        if ( b->yy_is_our_buffer )
1030
                                {
1031
                                int new_size = b->yy_buf_size * 2;
1032
 
1033
                                if ( new_size <= 0 )
1034
                                        b->yy_buf_size += b->yy_buf_size / 8;
1035
                                else
1036
                                        b->yy_buf_size *= 2;
1037
 
1038
                                b->yy_ch_buf = (char *)
1039
                                        /* Include room in for 2 EOB chars. */
1040
                                        yy_flex_realloc( (void *) b->yy_ch_buf,
1041
                                                         b->yy_buf_size + 2 );
1042
                                }
1043
                        else
1044
                                /* Can't grow it, we don't own it. */
1045
                                b->yy_ch_buf = 0;
1046
 
1047
                        if ( ! b->yy_ch_buf )
1048
                                YY_FATAL_ERROR(
1049
                                "fatal error - scanner input buffer overflow" );
1050
 
1051
                        yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1052
 
1053
                        num_to_read = yy_current_buffer->yy_buf_size -
1054
                                                number_to_move - 1;
1055
#endif
1056
                        }
1057
 
1058
                if ( num_to_read > YY_READ_BUF_SIZE )
1059
                        num_to_read = YY_READ_BUF_SIZE;
1060
 
1061
                /* Read in more data. */
1062
                YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1063
                        yy_n_chars, num_to_read );
1064
 
1065
                yy_current_buffer->yy_n_chars = yy_n_chars;
1066
                }
1067
 
1068
        if ( yy_n_chars == 0 )
1069
                {
1070
                if ( number_to_move == YY_MORE_ADJ )
1071
                        {
1072
                        ret_val = EOB_ACT_END_OF_FILE;
1073
                        yyrestart( yyin );
1074
                        }
1075
 
1076
                else
1077
                        {
1078
                        ret_val = EOB_ACT_LAST_MATCH;
1079
                        yy_current_buffer->yy_buffer_status =
1080
                                YY_BUFFER_EOF_PENDING;
1081
                        }
1082
                }
1083
 
1084
        else
1085
                ret_val = EOB_ACT_CONTINUE_SCAN;
1086
 
1087
        yy_n_chars += number_to_move;
1088
        yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1089
        yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1090
 
1091
        yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1092
 
1093
        return ret_val;
1094
        }
1095
 
1096
 
1097
/* yy_get_previous_state - get the state just before the EOB char was reached */
1098
 
1099
static yy_state_type yy_get_previous_state()
1100
        {
1101
        register yy_state_type yy_current_state;
1102
        register char *yy_cp;
1103
 
1104
        yy_current_state = yy_start;
1105
 
1106
        for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1107
                {
1108
                register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1109
                if ( yy_accept[yy_current_state] )
1110
                        {
1111
                        yy_last_accepting_state = yy_current_state;
1112
                        yy_last_accepting_cpos = yy_cp;
1113
                        }
1114
                while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1115
                        {
1116
                        yy_current_state = (int) yy_def[yy_current_state];
1117
                        if ( yy_current_state >= 81 )
1118
                                yy_c = yy_meta[(unsigned int) yy_c];
1119
                        }
1120
                yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1121
                }
1122
 
1123
        return yy_current_state;
1124
        }
1125
 
1126
 
1127
/* yy_try_NUL_trans - try to make a transition on the NUL character
1128
 *
1129
 * synopsis
1130
 *      next_state = yy_try_NUL_trans( current_state );
1131
 */
1132
 
1133
#ifdef YY_USE_PROTOS
1134
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1135
#else
1136
static yy_state_type yy_try_NUL_trans( yy_current_state )
1137
yy_state_type yy_current_state;
1138
#endif
1139
        {
1140
        register int yy_is_jam;
1141
        register char *yy_cp = yy_c_buf_p;
1142
 
1143
        register YY_CHAR yy_c = 1;
1144
        if ( yy_accept[yy_current_state] )
1145
                {
1146
                yy_last_accepting_state = yy_current_state;
1147
                yy_last_accepting_cpos = yy_cp;
1148
                }
1149
        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1150
                {
1151
                yy_current_state = (int) yy_def[yy_current_state];
1152
                if ( yy_current_state >= 81 )
1153
                        yy_c = yy_meta[(unsigned int) yy_c];
1154
                }
1155
        yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1156
        yy_is_jam = (yy_current_state == 80);
1157
 
1158
        return yy_is_jam ? 0 : yy_current_state;
1159
        }
1160
 
1161
 
1162
#ifndef YY_NO_UNPUT
1163
#ifdef YY_USE_PROTOS
1164
static void yyunput( int c, register char *yy_bp )
1165
#else
1166
static void yyunput( c, yy_bp )
1167
int c;
1168
register char *yy_bp;
1169
#endif
1170
        {
1171
        register char *yy_cp = yy_c_buf_p;
1172
 
1173
        /* undo effects of setting up yytext */
1174
        *yy_cp = yy_hold_char;
1175
 
1176
        if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1177
                { /* need to shift things up to make room */
1178
                /* +2 for EOB chars. */
1179
                register int number_to_move = yy_n_chars + 2;
1180
                register char *dest = &yy_current_buffer->yy_ch_buf[
1181
                                        yy_current_buffer->yy_buf_size + 2];
1182
                register char *source =
1183
                                &yy_current_buffer->yy_ch_buf[number_to_move];
1184
 
1185
                while ( source > yy_current_buffer->yy_ch_buf )
1186
                        *--dest = *--source;
1187
 
1188
                yy_cp += (int) (dest - source);
1189
                yy_bp += (int) (dest - source);
1190
                yy_current_buffer->yy_n_chars =
1191
                        yy_n_chars = yy_current_buffer->yy_buf_size;
1192
 
1193
                if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1194
                        YY_FATAL_ERROR( "flex scanner push-back overflow" );
1195
                }
1196
 
1197
        *--yy_cp = (char) c;
1198
 
1199
 
1200
        yytext_ptr = yy_bp;
1201
        yy_hold_char = *yy_cp;
1202
        yy_c_buf_p = yy_cp;
1203
        }
1204
#endif  /* ifndef YY_NO_UNPUT */
1205
 
1206
 
1207
#ifndef YY_NO_INPUT
1208
#ifdef __cplusplus
1209
static int yyinput()
1210
#else
1211
static int input()
1212
#endif
1213
        {
1214
        int c;
1215
 
1216
        *yy_c_buf_p = yy_hold_char;
1217
 
1218
        if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1219
                {
1220
                /* yy_c_buf_p now points to the character we want to return.
1221
                 * If this occurs *before* the EOB characters, then it's a
1222
                 * valid NUL; if not, then we've hit the end of the buffer.
1223
                 */
1224
                if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1225
                        /* This was really a NUL. */
1226
                        *yy_c_buf_p = '\0';
1227
 
1228
                else
1229
                        { /* need more input */
1230
                        int offset = yy_c_buf_p - yytext_ptr;
1231
                        ++yy_c_buf_p;
1232
 
1233
                        switch ( yy_get_next_buffer() )
1234
                                {
1235
                                case EOB_ACT_LAST_MATCH:
1236
                                        /* This happens because yy_g_n_b()
1237
                                         * sees that we've accumulated a
1238
                                         * token and flags that we need to
1239
                                         * try matching the token before
1240
                                         * proceeding.  But for input(),
1241
                                         * there's no matching to consider.
1242
                                         * So convert the EOB_ACT_LAST_MATCH
1243
                                         * to EOB_ACT_END_OF_FILE.
1244
                                         */
1245
 
1246
                                        /* Reset buffer status. */
1247
                                        yyrestart( yyin );
1248
 
1249
                                        /* fall through */
1250
 
1251
                                case EOB_ACT_END_OF_FILE:
1252
                                        {
1253
                                        if ( yywrap() )
1254
                                                return EOF;
1255
 
1256
                                        if ( ! yy_did_buffer_switch_on_eof )
1257
                                                YY_NEW_FILE;
1258
#ifdef __cplusplus
1259
                                        return yyinput();
1260
#else
1261
                                        return input();
1262
#endif
1263
                                        }
1264
 
1265
                                case EOB_ACT_CONTINUE_SCAN:
1266
                                        yy_c_buf_p = yytext_ptr + offset;
1267
                                        break;
1268
                                }
1269
                        }
1270
                }
1271
 
1272
        c = *(unsigned char *) yy_c_buf_p;      /* cast for 8-bit char's */
1273
        *yy_c_buf_p = '\0';     /* preserve yytext */
1274
        yy_hold_char = *++yy_c_buf_p;
1275
 
1276
 
1277
        return c;
1278
        }
1279
#endif /* YY_NO_INPUT */
1280
 
1281
#ifdef YY_USE_PROTOS
1282
void yyrestart( FILE *input_file )
1283
#else
1284
void yyrestart( input_file )
1285
FILE *input_file;
1286
#endif
1287
        {
1288
        if ( ! yy_current_buffer )
1289
                yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1290
 
1291
        yy_init_buffer( yy_current_buffer, input_file );
1292
        yy_load_buffer_state();
1293
        }
1294
 
1295
 
1296
#ifdef YY_USE_PROTOS
1297
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1298
#else
1299
void yy_switch_to_buffer( new_buffer )
1300
YY_BUFFER_STATE new_buffer;
1301
#endif
1302
        {
1303
        if ( yy_current_buffer == new_buffer )
1304
                return;
1305
 
1306
        if ( yy_current_buffer )
1307
                {
1308
                /* Flush out information for old buffer. */
1309
                *yy_c_buf_p = yy_hold_char;
1310
                yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1311
                yy_current_buffer->yy_n_chars = yy_n_chars;
1312
                }
1313
 
1314
        yy_current_buffer = new_buffer;
1315
        yy_load_buffer_state();
1316
 
1317
        /* We don't actually know whether we did this switch during
1318
         * EOF (yywrap()) processing, but the only time this flag
1319
         * is looked at is after yywrap() is called, so it's safe
1320
         * to go ahead and always set it.
1321
         */
1322
        yy_did_buffer_switch_on_eof = 1;
1323
        }
1324
 
1325
 
1326
#ifdef YY_USE_PROTOS
1327
void yy_load_buffer_state( void )
1328
#else
1329
void yy_load_buffer_state()
1330
#endif
1331
        {
1332
        yy_n_chars = yy_current_buffer->yy_n_chars;
1333
        yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1334
        yyin = yy_current_buffer->yy_input_file;
1335
        yy_hold_char = *yy_c_buf_p;
1336
        }
1337
 
1338
 
1339
#ifdef YY_USE_PROTOS
1340
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1341
#else
1342
YY_BUFFER_STATE yy_create_buffer( file, size )
1343
FILE *file;
1344
int size;
1345
#endif
1346
        {
1347
        YY_BUFFER_STATE b;
1348
 
1349
        b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1350
        if ( ! b )
1351
                YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1352
 
1353
        b->yy_buf_size = size;
1354
 
1355
        /* yy_ch_buf has to be 2 characters longer than the size given because
1356
         * we need to put in 2 end-of-buffer characters.
1357
         */
1358
        b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1359
        if ( ! b->yy_ch_buf )
1360
                YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1361
 
1362
        b->yy_is_our_buffer = 1;
1363
 
1364
        yy_init_buffer( b, file );
1365
 
1366
        return b;
1367
        }
1368
 
1369
 
1370
#ifdef YY_USE_PROTOS
1371
void yy_delete_buffer( YY_BUFFER_STATE b )
1372
#else
1373
void yy_delete_buffer( b )
1374
YY_BUFFER_STATE b;
1375
#endif
1376
        {
1377
        if ( ! b )
1378
                return;
1379
 
1380
        if ( b == yy_current_buffer )
1381
                yy_current_buffer = (YY_BUFFER_STATE) 0;
1382
 
1383
        if ( b->yy_is_our_buffer )
1384
                yy_flex_free( (void *) b->yy_ch_buf );
1385
 
1386
        yy_flex_free( (void *) b );
1387
        }
1388
 
1389
 
1390
 
1391
#ifdef YY_USE_PROTOS
1392
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1393
#else
1394
void yy_init_buffer( b, file )
1395
YY_BUFFER_STATE b;
1396
FILE *file;
1397
#endif
1398
 
1399
 
1400
        {
1401
        yy_flush_buffer( b );
1402
 
1403
        b->yy_input_file = file;
1404
        b->yy_fill_buffer = 1;
1405
 
1406
#if YY_ALWAYS_INTERACTIVE
1407
        b->yy_is_interactive = 1;
1408
#else
1409
#if YY_NEVER_INTERACTIVE
1410
        b->yy_is_interactive = 0;
1411
#else
1412
        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1413
#endif
1414
#endif
1415
        }
1416
 
1417
 
1418
#ifdef YY_USE_PROTOS
1419
void yy_flush_buffer( YY_BUFFER_STATE b )
1420
#else
1421
void yy_flush_buffer( b )
1422
YY_BUFFER_STATE b;
1423
#endif
1424
 
1425
        {
1426
        if ( ! b )
1427
                return;
1428
 
1429
        b->yy_n_chars = 0;
1430
 
1431
        /* We always need two end-of-buffer characters.  The first causes
1432
         * a transition to the end-of-buffer state.  The second causes
1433
         * a jam in that state.
1434
         */
1435
        b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1436
        b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1437
 
1438
        b->yy_buf_pos = &b->yy_ch_buf[0];
1439
 
1440
        b->yy_at_bol = 1;
1441
        b->yy_buffer_status = YY_BUFFER_NEW;
1442
 
1443
        if ( b == yy_current_buffer )
1444
                yy_load_buffer_state();
1445
        }
1446
 
1447
 
1448
#ifndef YY_NO_SCAN_BUFFER
1449
#ifdef YY_USE_PROTOS
1450
YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1451
#else
1452
YY_BUFFER_STATE yy_scan_buffer( base, size )
1453
char *base;
1454
yy_size_t size;
1455
#endif
1456
        {
1457
        YY_BUFFER_STATE b;
1458
 
1459
        if ( size < 2 ||
1460
             base[size-2] != YY_END_OF_BUFFER_CHAR ||
1461
             base[size-1] != YY_END_OF_BUFFER_CHAR )
1462
                /* They forgot to leave room for the EOB's. */
1463
                return 0;
1464
 
1465
        b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1466
        if ( ! b )
1467
                YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1468
 
1469
        b->yy_buf_size = size - 2;      /* "- 2" to take care of EOB's */
1470
        b->yy_buf_pos = b->yy_ch_buf = base;
1471
        b->yy_is_our_buffer = 0;
1472
        b->yy_input_file = 0;
1473
        b->yy_n_chars = b->yy_buf_size;
1474
        b->yy_is_interactive = 0;
1475
        b->yy_at_bol = 1;
1476
        b->yy_fill_buffer = 0;
1477
        b->yy_buffer_status = YY_BUFFER_NEW;
1478
 
1479
        yy_switch_to_buffer( b );
1480
 
1481
        return b;
1482
        }
1483
#endif
1484
 
1485
 
1486
#ifndef YY_NO_SCAN_STRING
1487
#ifdef YY_USE_PROTOS
1488
YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1489
#else
1490
YY_BUFFER_STATE yy_scan_string( yy_str )
1491
yyconst char *yy_str;
1492
#endif
1493
        {
1494
        int len;
1495
        for ( len = 0; yy_str[len]; ++len )
1496
                ;
1497
 
1498
        return yy_scan_bytes( yy_str, len );
1499
        }
1500
#endif
1501
 
1502
 
1503
#ifndef YY_NO_SCAN_BYTES
1504
#ifdef YY_USE_PROTOS
1505
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1506
#else
1507
YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1508
yyconst char *bytes;
1509
int len;
1510
#endif
1511
        {
1512
        YY_BUFFER_STATE b;
1513
        char *buf;
1514
        yy_size_t n;
1515
        int i;
1516
 
1517
        /* Get memory for full buffer, including space for trailing EOB's. */
1518
        n = len + 2;
1519
        buf = (char *) yy_flex_alloc( n );
1520
        if ( ! buf )
1521
                YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1522
 
1523
        for ( i = 0; i < len; ++i )
1524
                buf[i] = bytes[i];
1525
 
1526
        buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1527
 
1528
        b = yy_scan_buffer( buf, n );
1529
        if ( ! b )
1530
                YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1531
 
1532
        /* It's okay to grow etc. this buffer, and we should throw it
1533
         * away when we're done.
1534
         */
1535
        b->yy_is_our_buffer = 1;
1536
 
1537
        return b;
1538
        }
1539
#endif
1540
 
1541
 
1542
#ifndef YY_NO_PUSH_STATE
1543
#ifdef YY_USE_PROTOS
1544
static void yy_push_state( int new_state )
1545
#else
1546
static void yy_push_state( new_state )
1547
int new_state;
1548
#endif
1549
        {
1550
        if ( yy_start_stack_ptr >= yy_start_stack_depth )
1551
                {
1552
                yy_size_t new_size;
1553
 
1554
                yy_start_stack_depth += YY_START_STACK_INCR;
1555
                new_size = yy_start_stack_depth * sizeof( int );
1556
 
1557
                if ( ! yy_start_stack )
1558
                        yy_start_stack = (int *) yy_flex_alloc( new_size );
1559
 
1560
                else
1561
                        yy_start_stack = (int *) yy_flex_realloc(
1562
                                        (void *) yy_start_stack, new_size );
1563
 
1564
                if ( ! yy_start_stack )
1565
                        YY_FATAL_ERROR(
1566
                        "out of memory expanding start-condition stack" );
1567
                }
1568
 
1569
        yy_start_stack[yy_start_stack_ptr++] = YY_START;
1570
 
1571
        BEGIN(new_state);
1572
        }
1573
#endif
1574
 
1575
 
1576
#ifndef YY_NO_POP_STATE
1577
static void yy_pop_state()
1578
        {
1579
        if ( --yy_start_stack_ptr < 0 )
1580
                YY_FATAL_ERROR( "start-condition stack underflow" );
1581
 
1582
        BEGIN(yy_start_stack[yy_start_stack_ptr]);
1583
        }
1584
#endif
1585
 
1586
 
1587
#ifndef YY_NO_TOP_STATE
1588
static int yy_top_state()
1589
        {
1590
        return yy_start_stack[yy_start_stack_ptr - 1];
1591
        }
1592
#endif
1593
 
1594
#ifndef YY_EXIT_FAILURE
1595
#define YY_EXIT_FAILURE 2
1596
#endif
1597
 
1598
#ifdef YY_USE_PROTOS
1599
static void yy_fatal_error( yyconst char msg[] )
1600
#else
1601
static void yy_fatal_error( msg )
1602
char msg[];
1603
#endif
1604
        {
1605
        (void) fprintf( stderr, "%s\n", msg );
1606
        exit( YY_EXIT_FAILURE );
1607
        }
1608
 
1609
 
1610
 
1611
/* Redefine yyless() so it works in section 3 code. */
1612
 
1613
#undef yyless
1614
#define yyless(n) \
1615
        do \
1616
                { \
1617
                /* Undo effects of setting up yytext. */ \
1618
                yytext[yyleng] = yy_hold_char; \
1619
                yy_c_buf_p = yytext + n; \
1620
                yy_hold_char = *yy_c_buf_p; \
1621
                *yy_c_buf_p = '\0'; \
1622
                yyleng = n; \
1623
                } \
1624
        while ( 0 )
1625
 
1626
 
1627
/* Internal utility routines. */
1628
 
1629
#ifndef yytext_ptr
1630
#ifdef YY_USE_PROTOS
1631
static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1632
#else
1633
static void yy_flex_strncpy( s1, s2, n )
1634
char *s1;
1635
yyconst char *s2;
1636
int n;
1637
#endif
1638
        {
1639
        register int i;
1640
        for ( i = 0; i < n; ++i )
1641
                s1[i] = s2[i];
1642
        }
1643
#endif
1644
 
1645
#ifdef YY_NEED_STRLEN
1646
#ifdef YY_USE_PROTOS
1647
static int yy_flex_strlen( yyconst char *s )
1648
#else
1649
static int yy_flex_strlen( s )
1650
yyconst char *s;
1651
#endif
1652
        {
1653
        register int n;
1654
        for ( n = 0; s[n]; ++n )
1655
                ;
1656
 
1657
        return n;
1658
        }
1659
#endif
1660
 
1661
 
1662
#ifdef YY_USE_PROTOS
1663
static void *yy_flex_alloc( yy_size_t size )
1664
#else
1665
static void *yy_flex_alloc( size )
1666
yy_size_t size;
1667
#endif
1668
        {
1669
        return (void *) malloc( size );
1670
        }
1671
 
1672
#ifdef YY_USE_PROTOS
1673
static void *yy_flex_realloc( void *ptr, yy_size_t size )
1674
#else
1675
static void *yy_flex_realloc( ptr, size )
1676
void *ptr;
1677
yy_size_t size;
1678
#endif
1679
        {
1680
        /* The cast to (char *) in the following accommodates both
1681
         * implementations that use char* generic pointers, and those
1682
         * that use void* generic pointers.  It works with the latter
1683
         * because both ANSI C and C++ allow castless assignment from
1684
         * any pointer type to void*, and deal with argument conversions
1685
         * as though doing an assignment.
1686
         */
1687
        return (void *) realloc( (char *) ptr, size );
1688
        }
1689
 
1690
#ifdef YY_USE_PROTOS
1691
static void yy_flex_free( void *ptr )
1692
#else
1693
static void yy_flex_free( ptr )
1694
void *ptr;
1695
#endif
1696
        {
1697
        free( ptr );
1698
        }
1699
 
1700
#if YY_MAIN
1701
int main()
1702
        {
1703
        yylex();
1704
        return 0;
1705
        }
1706
#endif
1707
#line 80 "syslex.l"

powered by: WebSVN 2.1.0

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