5
#define YY_INT_ALIGNED short int
7
/* A lexical scanner generated by flex */
12
/* %if-not-reentrant */
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
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
32
#define yyFlexLexer yyFlexLexer
41
/* First, we deal with platform-specific or compiler-specific issues. */
43
/* begin standard C headers. */
47
/* %if-tables-serialization */
49
/* end standard C headers. */
52
/* flex integer type definitions */
57
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
59
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
61
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
62
* if you want the limit (max/min) macros for int types.
64
#ifndef __STDC_LIMIT_MACROS
65
#define __STDC_LIMIT_MACROS 1
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;
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;
83
/* Limits of integral types. */
85
#define INT8_MIN (-128)
88
#define INT16_MIN (-32767-1)
91
#define INT32_MIN (-2147483647-1)
94
#define INT8_MAX (127)
97
#define INT16_MAX (32767)
100
#define INT32_MAX (2147483647)
103
#define UINT8_MAX (255U)
106
#define UINT16_MAX (65535U)
109
#define UINT32_MAX (4294967295U)
114
#endif /* ! FLEXINT_H */
119
/* begin standard C++ headers. */
125
/* end standard C++ headers. */
130
/* The "const" storage-class-modifier is valid. */
133
#else /* ! __cplusplus */
135
/* C99 requires __STDC__ to be defined as 1. */
136
#if defined (__STDC__)
140
#endif /* defined (__STDC__) */
141
#endif /* ! __cplusplus */
144
#define yyconst const
149
/* %not-for-header */
151
/* Returned upon end-of-file. */
155
/* %not-for-header */
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
162
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
168
/* %if-not-reentrant */
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.
176
#define BEGIN (yy_start) = 1 + 2 *
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
182
#define YY_START (((yy_start) - 1) / 2)
183
#define YYSTATE YY_START
185
/* Action number for EOF rule of a given start state. */
186
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
188
/* Special action meaning "start processing a new file". */
189
#define YY_NEW_FILE yyrestart( yyin )
191
#define YY_END_OF_BUFFER_CHAR 0
193
/* Size of default input buffer. */
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.
200
#define YY_BUF_SIZE 32768
202
#define YY_BUF_SIZE 16384
203
#endif /* __ia64__ */
206
/* The state buf must be large enough to hold one state per character in the main buffer.
208
#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
210
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
211
#define YY_TYPEDEF_YY_BUFFER_STATE
212
typedef struct yy_buffer_state *YY_BUFFER_STATE;
215
/* %if-not-reentrant */
220
/* %if-not-reentrant */
224
#define EOB_ACT_CONTINUE_SCAN 0
225
#define EOB_ACT_END_OF_FILE 1
226
#define EOB_ACT_LAST_MATCH 2
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.
235
#define YY_LESS_LINENO(n) \
238
for ( yyl = n; yyl < yyleng; ++yyl )\
239
if ( yytext[yyl] == '\n' )\
243
/* Return all but the first "n" matched characters back to the input stream. */
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 */ \
257
#define unput(c) yyunput( c, (yytext_ptr) )
259
#ifndef YY_TYPEDEF_YY_SIZE_T
260
#define YY_TYPEDEF_YY_SIZE_T
261
typedef size_t yy_size_t;
264
#ifndef YY_STRUCT_YY_BUFFER_STATE
265
#define YY_STRUCT_YY_BUFFER_STATE
266
struct yy_buffer_state
272
std::istream* yy_input_file;
275
char *yy_ch_buf; /* input buffer */
276
char *yy_buf_pos; /* current position in input buffer */
278
/* Size of input buffer in bytes, not including room for EOB
281
yy_size_t yy_buf_size;
283
/* Number of characters read into yy_ch_buf, not including EOB
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
292
int yy_is_our_buffer;
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
299
int yy_is_interactive;
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
307
int yy_bs_lineno; /**< The line count. */
308
int yy_bs_column; /**< The column count. */
310
/* Whether to try to fill the input buffer when we reach the
315
int yy_buffer_status;
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.
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.
329
#define YY_BUFFER_EOF_PENDING 2
332
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
334
/* %if-c-only Standard (non-C++) definition */
335
/* %not-for-header */
337
/* %if-not-reentrant */
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
347
* Returns the top of the stack, or NULL.
349
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
350
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
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.
356
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
358
/* %if-c-only Standard (non-C++) definition */
359
/* %if-not-reentrant */
360
/* %not-for-header */
367
void *yyalloc (yy_size_t );
368
void *yyrealloc (void *,yy_size_t );
369
void yyfree (void * );
371
#define yy_new_buffer yy_create_buffer
373
#define yy_set_interactive(is_interactive) \
375
if ( ! YY_CURRENT_BUFFER ){ \
376
yyensure_buffer_stack (); \
377
YY_CURRENT_BUFFER_LVALUE = \
378
yy_create_buffer( yyin, YY_BUF_SIZE ); \
380
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
383
#define yy_set_bol(at_bol) \
385
if ( ! YY_CURRENT_BUFFER ){\
386
yyensure_buffer_stack (); \
387
YY_CURRENT_BUFFER_LVALUE = \
388
yy_create_buffer( yyin, YY_BUF_SIZE ); \
390
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
393
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
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
401
typedef unsigned char YY_CHAR;
403
#define yytext_ptr yytext
404
#define YY_INTERACTIVE
406
#include <FlexLexer.h>
408
int yyFlexLexer::yywrap() { return 1; }
409
int yyFlexLexer::yylex()
411
LexerError( "yyFlexLexer::yylex invoked but %option yyclass used" );
415
#define YY_DECL int Scanner::yylex()
417
/* %if-c-only Standard (non-C++) definition */
420
/* Done after the current pattern has been matched and before the
421
* corresponding action - sets up yytext.
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; \
429
/* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\
430
(yy_c_buf_p) = yy_cp;
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. */
439
flex_int32_t yy_verify;
442
static yyconst flex_int16_t yy_accept[33] =
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,
450
static yyconst flex_int32_t yy_ec[256] =
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,
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,
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,
482
static yyconst flex_int32_t yy_meta[16] =
484
1, 2, 3, 1, 1, 1, 1, 2, 1, 1,
488
static yyconst flex_int16_t yy_base[38] =
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
496
static yyconst flex_int16_t yy_def[38] =
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
504
static yyconst flex_int16_t yy_nxt[59] =
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
514
static yyconst flex_int16_t yy_chk[59] =
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
524
/* Table of booleans, true if rule could match eol. */
525
static yyconst flex_int32_t yy_rule_can_match_eol[11] =
527
0, 0, 1, 0, 0, 1, 1, 1, 1, 0, };
529
static yyconst flex_int16_t yy_rule_linenum[10] =
531
27, 28, 29, 30, 35, 36, 37, 41, 46
534
/* The intent behind this definition is that it'll catch
535
* any uses of REJECT which flex missed.
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
544
#define SKIP_FLEXLEXER_
545
#include "scanner.ih"
551
/* --------------------------------------------------------------------------
554
Regular expressions below here define what the lexer will recognize.
555
----------------------------------------------------------------------- */
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.
575
#ifndef YY_EXTRA_TYPE
576
#define YY_EXTRA_TYPE void *
579
/* %if-c-only Reentrant structure and macros (non-C++). */
585
/* %endif End reentrant structures and macros. */
586
/* %if-bison-bridge */
588
/* %not-for-header */
595
static void yy_flex_strncpy (char *,yyconst char *,int );
598
#ifdef YY_NEED_STRLEN
599
static int yy_flex_strlen (yyconst char * );
603
/* %if-c-only Standard (non-C++) definition */
604
/* %not-for-header */
614
/* Amount of stuff to slurp up with each read. */
615
#ifndef YY_READ_BUF_SIZE
617
/* On IA-64, the buffer size is 16k, not 8k */
618
#define YY_READ_BUF_SIZE 16384
620
#define YY_READ_BUF_SIZE 8192
621
#endif /* __ia64__ */
624
/* Copy whatever the last rule matched to the standard output. */
626
/* %if-c-only Standard (non-C++) definition */
628
/* %if-c++-only C++ definition */
629
#define ECHO LexerOutput( yytext, yyleng )
633
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
634
* is returned in "result".
637
#define YY_INPUT(buf,result,max_size) \
638
/* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\
640
/* %if-c++-only C++ definition \ */\
641
if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \
642
YY_FATAL_ERROR( "input in flex scanner failed" );
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.
652
#define yyterminate() return YY_NULL
655
/* Number of entries by which start-condition stack grows. */
656
#ifndef YY_START_STACK_INCR
657
#define YY_START_STACK_INCR 25
660
/* Report a fatal error. */
661
#ifndef YY_FATAL_ERROR
665
#define YY_FATAL_ERROR(msg) LexerError( msg )
669
/* %if-tables-serialization structures and prototypes */
670
/* %not-for-header */
674
/* %not-for-header */
676
/* %tables-yydmap generated elements */
678
/* end tables serialization structures and prototypes */
682
/* Default declaration of generated scanner - a define so the user can
683
* easily add parameters.
686
#define YY_DECL_IS_OURS 1
687
/* %if-c-only Standard (non-C++) definition */
689
/* %if-c++-only C++ definition */
690
#define YY_DECL int yyFlexLexer::yylex()
692
#endif /* !YY_DECL */
694
/* Code executed at the beginning of each rule, after yytext and yyleng
697
#ifndef YY_USER_ACTION
698
#define YY_USER_ACTION
701
/* Code executed at the end of each rule. */
703
#define YY_BREAK break;
706
/* %% [6.0] YY_RULE_SETUP definition goes here */
707
#define YY_RULE_SETUP \
710
/* %not-for-header */
712
/** The main scanner function which does all the work.
716
register yy_state_type yy_current_state;
717
register char *yy_cp, *yy_bp;
720
/* %% [7.0] user's declarations go here */
724
The comment-rules: comment lines are ignored.
737
(yy_start) = 1; /* first start state */
753
if ( ! YY_CURRENT_BUFFER ) {
754
yyensure_buffer_stack ();
755
YY_CURRENT_BUFFER_LVALUE =
756
yy_create_buffer( yyin, YY_BUF_SIZE );
759
yy_load_buffer_state( );
762
while ( 1 ) /* loops until end-of-file is reached */
764
/* %% [8.0] yymore()-related code goes here */
765
yy_cp = (yy_c_buf_p);
767
/* Support of yytext. */
768
*yy_cp = (yy_hold_char);
770
/* yy_bp points to the position in yy_ch_buf of the start of
775
/* %% [9.0] code to set up and find next match goes here */
776
yy_current_state = (yy_start);
780
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
781
if ( yy_accept[yy_current_state] )
783
(yy_last_accepting_state) = yy_current_state;
784
(yy_last_accepting_cpos) = yy_cp;
786
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
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];
792
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
795
while ( yy_base[yy_current_state] != 43 );
798
/* %% [10.0] code to find the action number goes here */
799
yy_act = yy_accept[yy_current_state];
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];
809
/* %% [11.0] code for yylineno update goes here */
811
if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
814
for ( yyl = 0; yyl < yyleng; ++yyl )
815
if ( yytext[yyl] == '\n' )
821
do_action: /* This label is used only to access EOF actions. */
823
/* %% [12.0] debug code goes here */
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";
836
std::cerr << "--EOF (start condition " << YY_START << ")\n";
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);
860
/* rule 3 can match eol */
871
File switching: #include <filepath>
879
/* rule 6 can match eol */
882
d_nextSource = yytext;
885
/* rule 7 can match eol */
890
pushSource(YY_CURRENT_BUFFER, YY_BUF_SIZE);
894
/* rule 8 can match eol */
897
throw invalidInclude;
900
The default rules: eating all the rest, echoing it to output
903
/* rule 9 can match eol */
909
The <<EOF>> rule: pop a pushed file, or terminate the lexer
911
case YY_STATE_EOF(INITIAL):
912
case YY_STATE_EOF(comment):
913
case YY_STATE_EOF(include):
916
if (!popSource(YY_CURRENT_BUFFER))
927
case YY_END_OF_BUFFER:
929
/* Amount of text matched not including the EOB char. */
930
int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
932
/* Undo the effects of YY_DO_BEFORE_ACTION. */
933
*yy_cp = (yy_hold_char);
934
YY_RESTORE_YY_MORE_OFFSET
936
if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
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.
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;
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
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;
963
(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
965
yy_current_state = yy_get_previous_state( );
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).
976
yy_next_state = yy_try_NUL_trans( yy_current_state );
978
yy_bp = (yytext_ptr) + YY_MORE_ADJ;
982
/* Consume the NUL. */
983
yy_cp = ++(yy_c_buf_p);
984
yy_current_state = yy_next_state;
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);
996
else switch ( yy_get_next_buffer( ) )
998
case EOB_ACT_END_OF_FILE:
1000
(yy_did_buffer_switch_on_eof) = 0;
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.
1013
(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
1015
yy_act = YY_STATE_EOF(YY_START);
1021
if ( ! (yy_did_buffer_switch_on_eof) )
1027
case EOB_ACT_CONTINUE_SCAN:
1029
(yytext_ptr) + yy_amount_of_matched_text;
1031
yy_current_state = yy_get_previous_state( );
1033
yy_cp = (yy_c_buf_p);
1034
yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1037
case EOB_ACT_LAST_MATCH:
1039
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
1041
yy_current_state = yy_get_previous_state( );
1043
yy_cp = (yy_c_buf_p);
1044
yy_bp = (yytext_ptr) + YY_MORE_ADJ;
1045
goto yy_find_action;
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 */
1059
/* %not-for-header */
1061
/* The contents of this function are C++ specific, so the () macro is not used.
1063
yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout )
1071
yylineno = 1; // this will only get updated if %option yylineno
1073
yy_did_buffer_switch_on_eof = 0;
1075
yy_looking_for_trail_begin = 0;
1078
yy_more_offset = yy_prev_more_offset = 0;
1080
yy_start_stack_ptr = yy_start_stack_depth = 0;
1081
yy_start_stack = NULL;
1083
yy_buffer_stack = 0;
1084
yy_buffer_stack_top = 0;
1085
yy_buffer_stack_max = 0;
1091
/* The contents of this function are C++ specific, so the () macro is not used.
1093
yyFlexLexer::~yyFlexLexer()
1095
delete [] yy_state_buf;
1096
yyfree(yy_start_stack );
1097
yy_delete_buffer( YY_CURRENT_BUFFER );
1098
yyfree(yy_buffer_stack );
1101
/* The contents of this function are C++ specific, so the () macro is not used.
1103
void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out )
1107
yy_delete_buffer( YY_CURRENT_BUFFER );
1108
yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE ) );
1115
#ifdef YY_INTERACTIVE
1116
int yyFlexLexer::LexerInput( char* buf, int /* max_size */ )
1118
int yyFlexLexer::LexerInput( char* buf, int max_size )
1121
if ( yyin->eof() || yyin->fail() )
1124
#ifdef YY_INTERACTIVE
1125
yyin->get( buf[0] );
1136
(void) yyin->read( buf, max_size );
1141
return yyin->gcount();
1145
void yyFlexLexer::LexerOutput( const char* buf, int size )
1147
(void) yyout->write( buf, size );
1149
/* %ok-for-header */
1153
/* yy_get_next_buffer - try to read in a new buffer
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
1163
int yyFlexLexer::yy_get_next_buffer()
1166
register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1167
register char *source = (yytext_ptr);
1168
register int number_to_move, i;
1171
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
1173
"fatal flex scanner internal error--end of buffer missed" );
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 )
1179
/* We matched a single character, the EOB, so
1180
* treat this as a final EOF.
1182
return EOB_ACT_END_OF_FILE;
1187
/* We matched some text prior to the EOB, first
1190
return EOB_ACT_LAST_MATCH;
1194
/* Try to read more data. */
1196
/* First move last chars to start of buffer. */
1197
number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
1199
for ( i = 0; i < number_to_move; ++i )
1200
*(dest++) = *(source++);
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,
1206
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1211
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1213
while ( num_to_read <= 0 )
1214
{ /* Not enough room in the buffer - grow it. */
1216
/* just a shorter name for the current buffer */
1217
YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1219
int yy_c_buf_p_offset =
1220
(int) ((yy_c_buf_p) - b->yy_ch_buf);
1222
if ( b->yy_is_our_buffer )
1224
int new_size = b->yy_buf_size * 2;
1226
if ( new_size <= 0 )
1227
b->yy_buf_size += b->yy_buf_size / 8;
1229
b->yy_buf_size *= 2;
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 );
1236
/* Can't grow it, we don't own it. */
1239
if ( ! b->yy_ch_buf )
1241
"fatal error - scanner input buffer overflow" );
1243
(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1245
num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1250
if ( num_to_read > YY_READ_BUF_SIZE )
1251
num_to_read = YY_READ_BUF_SIZE;
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 );
1257
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1260
if ( (yy_n_chars) == 0 )
1262
if ( number_to_move == YY_MORE_ADJ )
1264
ret_val = EOB_ACT_END_OF_FILE;
1270
ret_val = EOB_ACT_LAST_MATCH;
1271
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1272
YY_BUFFER_EOF_PENDING;
1277
ret_val = EOB_ACT_CONTINUE_SCAN;
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()" );
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;
1291
(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1296
/* yy_get_previous_state - get the state just before the EOB char was reached */
1299
/* %not-for-header */
1303
yy_state_type yyFlexLexer::yy_get_previous_state()
1306
register yy_state_type yy_current_state;
1307
register char *yy_cp;
1309
/* %% [15.0] code to get the start state into yy_current_state goes here */
1310
yy_current_state = (yy_start);
1312
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
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] )
1318
(yy_last_accepting_state) = yy_current_state;
1319
(yy_last_accepting_cpos) = yy_cp;
1321
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
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];
1327
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1330
return yy_current_state;
1333
/* yy_try_NUL_trans - try to make a transition on the NUL character
1336
* next_state = yy_try_NUL_trans( current_state );
1341
yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
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);
1348
register YY_CHAR yy_c = 1;
1349
if ( yy_accept[yy_current_state] )
1351
(yy_last_accepting_state) = yy_current_state;
1352
(yy_last_accepting_cpos) = yy_cp;
1354
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
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];
1360
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1361
yy_is_jam = (yy_current_state == 32);
1363
return yy_is_jam ? 0 : yy_current_state;
1369
void yyFlexLexer::yyunput( int c, register char* yy_bp)
1372
register char *yy_cp;
1374
yy_cp = (yy_c_buf_p);
1376
/* undo effects of setting up yytext */
1377
*yy_cp = (yy_hold_char);
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];
1388
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1389
*--dest = *--source;
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;
1396
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1397
YY_FATAL_ERROR( "flex scanner push-back overflow" );
1400
*--yy_cp = (char) c;
1402
/* %% [18.0] update yylineno here */
1408
(yytext_ptr) = yy_bp;
1409
(yy_hold_char) = *yy_cp;
1410
(yy_c_buf_p) = yy_cp;
1418
int yyFlexLexer::yyinput()
1423
*(yy_c_buf_p) = (yy_hold_char);
1425
if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
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.
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';
1436
{ /* need more input */
1437
int offset = (yy_c_buf_p) - (yytext_ptr);
1440
switch ( yy_get_next_buffer( ) )
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.
1453
/* Reset buffer status. */
1458
case EOB_ACT_END_OF_FILE:
1463
if ( ! (yy_did_buffer_switch_on_eof) )
1472
case EOB_ACT_CONTINUE_SCAN:
1473
(yy_c_buf_p) = (yytext_ptr) + offset;
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);
1483
/* %% [19.0] update BOL and yylineno */
1494
/** Immediately switch to a different input stream.
1495
* @param input_file A readable stream.
1497
* @note This function does not reset the start condition to @c INITIAL .
1502
void yyFlexLexer::yyrestart( std::istream* input_file )
1506
if ( ! YY_CURRENT_BUFFER ){
1507
yyensure_buffer_stack ();
1508
YY_CURRENT_BUFFER_LVALUE =
1509
yy_create_buffer( yyin, YY_BUF_SIZE );
1512
yy_init_buffer( YY_CURRENT_BUFFER, input_file );
1513
yy_load_buffer_state( );
1516
/** Switch to a different input buffer.
1517
* @param new_buffer The new input buffer.
1523
void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1527
/* TODO. We should be able to replace this entire function body
1529
* yypop_buffer_state();
1530
* yypush_buffer_state(new_buffer);
1532
yyensure_buffer_stack ();
1533
if ( YY_CURRENT_BUFFER == new_buffer )
1536
if ( YY_CURRENT_BUFFER )
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);
1544
YY_CURRENT_BUFFER_LVALUE = new_buffer;
1545
yy_load_buffer_state( );
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.
1552
(yy_did_buffer_switch_on_eof) = 1;
1558
void yyFlexLexer::yy_load_buffer_state()
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);
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.
1571
* @return the allocated buffer state.
1576
YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size )
1581
b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1583
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1585
b->yy_buf_size = size;
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.
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()" );
1594
b->yy_is_our_buffer = 1;
1596
yy_init_buffer( b, file );
1601
/** Destroy the buffer.
1602
* @param b a buffer created with yy_create_buffer()
1608
void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )
1615
if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1616
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1618
if ( b->yy_is_our_buffer )
1619
yyfree((void *) b->yy_ch_buf );
1621
yyfree((void *) b );
1629
extern "C" int isatty (int );
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.
1640
void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream* file )
1646
yy_flush_buffer( b );
1648
b->yy_input_file = file;
1649
b->yy_fill_buffer = 1;
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.
1655
if (b != YY_CURRENT_BUFFER){
1656
b->yy_bs_lineno = 1;
1657
b->yy_bs_column = 0;
1663
b->yy_is_interactive = 0;
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.
1675
void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b )
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.
1687
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1688
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1690
b->yy_buf_pos = &b->yy_ch_buf[0];
1693
b->yy_buffer_status = YY_BUFFER_NEW;
1695
if ( b == YY_CURRENT_BUFFER )
1696
yy_load_buffer_state( );
1700
/** Pushes the new state onto the stack. The new state becomes
1701
* the current state. This function will allocate the stack
1703
* @param new_buffer The new state.
1709
void yyFlexLexer::yypush_buffer_state (YY_BUFFER_STATE new_buffer)
1712
if (new_buffer == NULL)
1715
yyensure_buffer_stack();
1717
/* This block is copied from yy_switch_to_buffer. */
1718
if ( YY_CURRENT_BUFFER )
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);
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;
1731
/* copied from yy_switch_to_buffer. */
1732
yy_load_buffer_state( );
1733
(yy_did_buffer_switch_on_eof) = 1;
1738
/** Removes and deletes the top of the stack, if present.
1739
* The next element becomes the new top.
1745
void yyFlexLexer::yypop_buffer_state (void)
1748
if (!YY_CURRENT_BUFFER)
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);
1756
if (YY_CURRENT_BUFFER) {
1757
yy_load_buffer_state( );
1758
(yy_did_buffer_switch_on_eof) = 1;
1764
/* Allocates the stack if it does not exist.
1765
* Guarantees space for at least one push.
1770
void yyFlexLexer::yyensure_buffer_stack(void)
1775
if (!(yy_buffer_stack)) {
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.
1782
(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1783
(num_to_alloc * sizeof(struct yy_buffer_state*)
1785
if ( ! (yy_buffer_stack) )
1786
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1788
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1790
(yy_buffer_stack_max) = num_to_alloc;
1791
(yy_buffer_stack_top) = 0;
1795
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1797
/* Increase the buffer to prepare for a possible push. */
1798
int grow_size = 8 /* arbitrary grow size */;
1800
num_to_alloc = (yy_buffer_stack_max) + grow_size;
1801
(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
1803
num_to_alloc * sizeof(struct yy_buffer_state*)
1805
if ( ! (yy_buffer_stack) )
1806
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
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;
1827
void yyFlexLexer::yy_push_state( int new_state )
1830
if ( (yy_start_stack_ptr) >= (yy_start_stack_depth) )
1834
(yy_start_stack_depth) += YY_START_STACK_INCR;
1835
new_size = (yy_start_stack_depth) * sizeof( int );
1837
if ( ! (yy_start_stack) )
1838
(yy_start_stack) = (int *) yyalloc(new_size );
1841
(yy_start_stack) = (int *) yyrealloc((void *) (yy_start_stack),new_size );
1843
if ( ! (yy_start_stack) )
1844
YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
1847
(yy_start_stack)[(yy_start_stack_ptr)++] = YY_START;
1855
void yyFlexLexer::yy_pop_state()
1858
if ( --(yy_start_stack_ptr) < 0 )
1859
YY_FATAL_ERROR( "start-condition stack underflow" );
1861
BEGIN((yy_start_stack)[(yy_start_stack_ptr)]);
1867
int yyFlexLexer::yy_top_state()
1870
return (yy_start_stack)[(yy_start_stack_ptr) - 1];
1873
#ifndef YY_EXIT_FAILURE
1874
#define YY_EXIT_FAILURE 2
1880
void yyFlexLexer::LexerError( yyconst char msg[] )
1882
std::cerr << msg << '\n';
1883
exit( YY_EXIT_FAILURE );
1887
/* Redefine yyless() so it works in section 3 code. */
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; \
1904
/* Accessor methods (get/set functions) to struct members. */
1914
/* %if-bison-bridge */
1916
/* %endif if-c-only */
1921
/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
1927
* Internal utility routines.
1931
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
1934
for ( i = 0; i < n; ++i )
1939
#ifdef YY_NEED_STRLEN
1940
static int yy_flex_strlen (yyconst char * s )
1943
for ( n = 0; s[n]; ++n )
1950
void *yyalloc (yy_size_t size )
1952
return (void *) malloc( size );
1955
void *yyrealloc (void * ptr, yy_size_t size )
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.
1964
return (void *) realloc( (char *) ptr, size );
1967
void yyfree (void * ptr )
1969
free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
1972
/* %if-tables-serialization definitions */
1973
/* %define-yytables The name for this specific scanner's tables. */
1974
#define YYTABLES_NAME "yytables"
1977
/* %ok-for-header */