Subversion Repositories Vertical

Rev

Details | Last modification | View Log | RSS feed

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