Subversion Repositories Vertical

Rev

Details | Last modification | View Log | RSS feed

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