~ubuntu-branches/ubuntu/trusty/c++-annotations/trusty

« back to all changes in this revision

Viewing changes to yo/concrete/lexer/scanner/yylex.cc

  • Committer: Package Import Robot
  • Author(s): tony mancill, Frank B. Brokken, tony mancill
  • Date: 2012-02-28 00:50:21 UTC
  • mfrom: (1.1.19)
  • Revision ID: package-import@ubuntu.com-20120228005021-sz7nnodntkvgh7qf
Tags: 9.2.1-1
[ Frank B. Brokken ]
* New upstream release (using flexc++, reauthored polymorphic semantic
  values and unrestricted unions). Upstream release 9.2.0 is implied by
  this release.

[ tony mancill ]
* Set Standards-Version to 3.9.3.

Show diffs side-by-side

added added

removed removed

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