Subversion Repositories Vertical

Rev

Details | Last modification | View Log | RSS feed

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