1
/* A lexical scanner generated by flex*/
3
/* Scanner skeleton version:
4
* $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
4
#define YY_INT_ALIGNED short int
6
/* A lexical scanner generated by flex */
8
9
#define YY_FLEX_MAJOR_VERSION 2
9
10
#define YY_FLEX_MINOR_VERSION 5
11
#define YY_FLEX_SUBMINOR_VERSION 35
12
#if YY_FLEX_SUBMINOR_VERSION > 0
16
/* First, we deal with platform-specific or compiler-specific issues. */
18
/* begin standard C headers. */
15
/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
24
/* end standard C headers. */
26
/* flex integer type definitions */
31
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
35
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
36
* if you want the limit (max/min) macros for int types.
38
#ifndef __STDC_LIMIT_MACROS
39
#define __STDC_LIMIT_MACROS 1
43
typedef int8_t flex_int8_t;
44
typedef uint8_t flex_uint8_t;
45
typedef int16_t flex_int16_t;
46
typedef uint16_t flex_uint16_t;
47
typedef int32_t flex_int32_t;
48
typedef uint32_t flex_uint32_t;
50
typedef signed char flex_int8_t;
51
typedef short int flex_int16_t;
52
typedef int flex_int32_t;
53
typedef unsigned char flex_uint8_t;
54
typedef unsigned short int flex_uint16_t;
55
typedef unsigned int flex_uint32_t;
58
/* Limits of integral types. */
60
#define INT8_MIN (-128)
63
#define INT16_MIN (-32767-1)
66
#define INT32_MIN (-2147483647-1)
69
#define INT8_MAX (127)
72
#define INT16_MAX (32767)
75
#define INT32_MAX (2147483647)
78
#define UINT8_MAX (255U)
81
#define UINT16_MAX (65535U)
84
#define UINT32_MAX (4294967295U)
87
#endif /* ! FLEXINT_H */
27
/* Use prototypes in function declarations. */
30
91
/* The "const" storage-class-modifier is valid. */
31
92
#define YY_USE_CONST
33
94
#else /* ! __cplusplus */
96
/* C99 requires __STDC__ to be defined as 1. */
97
#if defined (__STDC__)
38
99
#define YY_USE_CONST
101
#endif /* defined (__STDC__) */
41
102
#endif /* ! __cplusplus */
52
104
#ifdef YY_USE_CONST
53
105
#define yyconst const
60
#define YY_PROTO(proto) proto
62
#define YY_PROTO(proto) ()
65
110
/* Returned upon end-of-file. */
76
121
* but we do it the disgusting crufty way forced on us by the ()-less
77
122
* definition of BEGIN.
79
#define BEGIN yy_start = 1 + 2 *
124
#define BEGIN (yy_start) = 1 + 2 *
81
126
/* Translate the current start state into a value that can be later handed
82
127
* to BEGIN to return to the state. The YYSTATE alias is for lex
85
#define YY_START ((yy_start - 1) / 2)
130
#define YY_START (((yy_start) - 1) / 2)
86
131
#define YYSTATE YY_START
88
133
/* Action number for EOF rule of a given start state. */
89
134
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
91
136
/* Special action meaning "start processing a new file". */
92
#define YY_NEW_FILE yyrestart( yyin )
137
#define YY_NEW_FILE yyrestart(yyin )
94
139
#define YY_END_OF_BUFFER_CHAR 0
96
141
/* Size of default input buffer. */
97
143
#define YY_BUF_SIZE 16384
146
/* The state buf must be large enough to hold one state per character in the main buffer.
148
#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
150
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
151
#define YY_TYPEDEF_YY_BUFFER_STATE
99
152
typedef struct yy_buffer_state *YY_BUFFER_STATE;
101
155
extern int yyleng;
102
157
extern FILE *yyin, *yyout;
104
159
#define EOB_ACT_CONTINUE_SCAN 0
105
160
#define EOB_ACT_END_OF_FILE 1
106
161
#define EOB_ACT_LAST_MATCH 2
108
/* The funky do-while in the following #define is used to turn the definition
109
* int a single C statement (which needs a semi-colon terminator). This
110
* avoids problems with code like:
112
* if ( condition_holds )
115
* do_something_else();
117
* Prior to using the do-while the compiler would get upset at the
118
* "else" because it interpreted the "if" statement as being all
119
* done when it reached the ';' after the yyless() call.
122
/* Return all but the first 'n' matched characters back to the input stream. */
163
#define YY_LESS_LINENO(n)
165
/* Return all but the first "n" matched characters back to the input stream. */
124
166
#define yyless(n) \
127
169
/* Undo effects of setting up yytext. */ \
128
*yy_cp = yy_hold_char; \
170
int yyless_macro_arg = (n); \
171
YY_LESS_LINENO(yyless_macro_arg);\
172
*yy_cp = (yy_hold_char); \
129
173
YY_RESTORE_YY_MORE_OFFSET \
130
yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
174
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
131
175
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
135
#define unput(c) yyunput( c, yytext_ptr )
179
#define unput(c) yyunput( c, (yytext_ptr) )
137
/* Some routines like yy_flex_realloc() are emitted as static but are
138
not called by all lexers. This generates warnings in some compilers,
139
notably GCC. Arrange to suppress these. */
141
#define YY_MAY_BE_UNUSED __attribute__((unused))
143
#define YY_MAY_BE_UNUSED
181
#ifndef YY_TYPEDEF_YY_SIZE_T
182
#define YY_TYPEDEF_YY_SIZE_T
183
typedef size_t yy_size_t;
146
/* The following is because we cannot portably get our hands on size_t
147
* (without autoconf's help, which isn't available because we want
148
* flex-generated scanners to compile on their own).
150
typedef unsigned int yy_size_t;
186
#ifndef YY_STRUCT_YY_BUFFER_STATE
187
#define YY_STRUCT_YY_BUFFER_STATE
153
188
struct yy_buffer_state
155
190
FILE *yy_input_file;
205
244
* just pointing yyin at a new input file.
207
246
#define YY_BUFFER_EOF_PENDING 2
249
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
210
static YY_BUFFER_STATE yy_current_buffer = 0;
251
/* Stack of input buffers. */
252
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
253
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
254
static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
212
256
/* We provide macros for accessing buffer states in case in the
213
257
* future we want to put the buffer states in a more general
214
258
* "scanner state".
260
* Returns the top of the stack, or NULL.
216
#define YY_CURRENT_BUFFER yy_current_buffer
262
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
263
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
266
/* Same as previous macro, but useful when we know that the buffer stack is not
267
* NULL or when we need an lvalue. For internal use only.
269
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
219
271
/* yy_hold_char holds the character lost when yytext is formed. */
220
272
static char yy_hold_char;
222
273
static int yy_n_chars; /* number of characters read into yy_ch_buf */
227
276
/* Points to current character in buffer. */
228
277
static char *yy_c_buf_p = (char *) 0;
229
static int yy_init = 1; /* whether we need to initialize */
278
static int yy_init = 0; /* whether we need to initialize */
230
279
static int yy_start = 0; /* start state number */
232
281
/* Flag which is used to allow yywrap()'s to do buffer switches
235
284
static int yy_did_buffer_switch_on_eof;
237
void yyrestart YY_PROTO(( FILE *input_file ));
239
void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
240
void yy_load_buffer_state YY_PROTO(( void ));
241
YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
242
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
243
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
244
void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
245
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
247
YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
248
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
249
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
251
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
252
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) YY_MAY_BE_UNUSED;
253
static void yy_flex_free YY_PROTO(( void * ));
286
void yyrestart (FILE *input_file );
287
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
288
YY_BUFFER_STATE yy_create_buffer (FILE *file,int size );
289
void yy_delete_buffer (YY_BUFFER_STATE b );
290
void yy_flush_buffer (YY_BUFFER_STATE b );
291
void yypush_buffer_state (YY_BUFFER_STATE new_buffer );
292
void yypop_buffer_state (void );
294
static void yyensure_buffer_stack (void );
295
static void yy_load_buffer_state (void );
296
static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
298
#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
300
YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
301
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
302
YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
304
void *yyalloc (yy_size_t );
305
void *yyrealloc (void *,yy_size_t );
306
void yyfree (void * );
255
308
#define yy_new_buffer yy_create_buffer
257
310
#define yy_set_interactive(is_interactive) \
259
if ( ! yy_current_buffer ) \
260
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
261
yy_current_buffer->yy_is_interactive = is_interactive; \
312
if ( ! YY_CURRENT_BUFFER ){ \
313
yyensure_buffer_stack (); \
314
YY_CURRENT_BUFFER_LVALUE = \
315
yy_create_buffer(yyin,YY_BUF_SIZE ); \
317
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
264
320
#define yy_set_bol(at_bol) \
266
if ( ! yy_current_buffer ) \
267
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
268
yy_current_buffer->yy_at_bol = at_bol; \
322
if ( ! YY_CURRENT_BUFFER ){\
323
yyensure_buffer_stack (); \
324
YY_CURRENT_BUFFER_LVALUE = \
325
yy_create_buffer(yyin,YY_BUF_SIZE ); \
327
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
271
#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
330
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
332
/* Begin user sect3 */
273
334
typedef unsigned char YY_CHAR;
274
336
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
275
338
typedef int yy_state_type;
276
344
extern char *yytext;
277
345
#define yytext_ptr yytext
279
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
280
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
281
static int yy_get_next_buffer YY_PROTO(( void ));
282
static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
347
static yy_state_type yy_get_previous_state (void );
348
static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
349
static int yy_get_next_buffer (void );
350
static void yy_fatal_error (yyconst char msg[] );
284
352
/* Done after the current pattern has been matched and before the
285
353
* corresponding action - sets up yytext.
287
355
#define YY_DO_BEFORE_ACTION \
288
yytext_ptr = yy_bp; \
289
yyleng = (int) (yy_cp - yy_bp); \
290
yy_hold_char = *yy_cp; \
356
(yytext_ptr) = yy_bp; \
357
yyleng = (size_t) (yy_cp - yy_bp); \
358
(yy_hold_char) = *yy_cp; \
360
(yy_c_buf_p) = yy_cp;
294
362
#define YY_NUM_RULES 7
295
363
#define YY_END_OF_BUFFER 8
296
static yyconst short int yy_accept[18] =
364
/* This struct is not used in this scanner,
365
but its presence is necessary. */
368
flex_int32_t yy_verify;
371
static yyconst flex_int16_t yy_accept[18] =
298
373
0, 0, 8, 6, 2, 1, 6, 5, 6, 3,
299
374
5, 0, 0, 0, 0, 4, 0
302
static yyconst int yy_ec[256] =
377
static yyconst flex_int32_t yy_ec[256] =
304
379
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
305
380
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
334
static yyconst int yy_meta[13] =
409
static yyconst flex_int32_t yy_meta[13] =
336
411
1, 1, 1, 1, 1, 1, 2, 2, 2, 2,
340
static yyconst short int yy_base[19] =
415
static yyconst flex_int16_t yy_base[19] =
342
417
0, 17, 20, 22, 22, 22, 14, 0, 6, 22,
343
418
0, 6, 7, 7, 4, 22, 22, 11
346
static yyconst short int yy_def[19] =
421
static yyconst flex_int16_t yy_def[19] =
348
423
17, 1, 17, 17, 17, 17, 17, 18, 17, 17,
349
424
18, 17, 17, 17, 17, 17, 0, 17
352
static yyconst short int yy_nxt[35] =
427
static yyconst flex_int16_t yy_nxt[35] =
354
429
4, 5, 6, 4, 4, 7, 8, 8, 8, 8,
355
430
8, 8, 11, 16, 15, 14, 13, 12, 10, 17,
484
#line 485 "wmluiltok.c"
561
#line 562 "wmluiltok.c"
565
#ifndef YY_NO_UNISTD_H
566
/* Special case for "unistd.h", since it is non-ANSI. We include it way
567
* down here because we want the user's section 1 to have been scanned first.
568
* The user has a chance to override it with an option.
573
#ifndef YY_EXTRA_TYPE
574
#define YY_EXTRA_TYPE void *
577
static int yy_init_globals (void );
579
/* Accessor methods to globals.
580
These are made visible to non-reentrant scanners for convenience. */
582
int yylex_destroy (void );
584
int yyget_debug (void );
586
void yyset_debug (int debug_flag );
588
YY_EXTRA_TYPE yyget_extra (void );
590
void yyset_extra (YY_EXTRA_TYPE user_defined );
592
FILE *yyget_in (void );
594
void yyset_in (FILE * in_str );
596
FILE *yyget_out (void );
598
void yyset_out (FILE * out_str );
600
int yyget_leng (void );
602
char *yyget_text (void );
604
int yyget_lineno (void );
606
void yyset_lineno (int line_number );
486
608
/* Macros after this point can all be overridden by user definitions in
490
612
#ifndef YY_SKIP_YYWRAP
491
613
#ifdef __cplusplus
492
extern "C" int yywrap YY_PROTO(( void ));
614
extern "C" int yywrap (void );
494
extern int yywrap YY_PROTO(( void ));
499
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
616
extern int yywrap (void );
620
static void yyunput (int c,char *buf_ptr );
502
622
#ifndef yytext_ptr
503
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
623
static void yy_flex_strncpy (char *,yyconst char *,int );
506
626
#ifdef YY_NEED_STRLEN
507
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
627
static int yy_flex_strlen (yyconst char * );
510
630
#ifndef YY_NO_INPUT
511
632
#ifdef __cplusplus
512
static int yyinput YY_PROTO(( void ));
514
static int input YY_PROTO(( void ));
519
static int yy_start_stack_ptr = 0;
520
static int yy_start_stack_depth = 0;
521
static int *yy_start_stack = 0;
522
#ifndef YY_NO_PUSH_STATE
523
static void yy_push_state YY_PROTO(( int new_state ));
525
#ifndef YY_NO_POP_STATE
526
static void yy_pop_state YY_PROTO(( void ));
528
#ifndef YY_NO_TOP_STATE
529
static int yy_top_state YY_PROTO(( void ));
533
#define YY_NO_PUSH_STATE 1
534
#define YY_NO_POP_STATE 1
535
#define YY_NO_TOP_STATE 1
538
#ifdef YY_MALLOC_DECL
546
/* Just try to get by without declaring the routines. This will fail
547
* miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
548
* or sizeof(void*) != sizeof(int).
633
static int yyinput (void );
635
static int input (void );
553
640
/* Amount of stuff to slurp up with each read. */
812
921
#line 183 "wmluiltok.l"
815
#line 816 "wmluiltok.c"
924
#line 925 "wmluiltok.c"
816
925
case YY_STATE_EOF(INITIAL):
819
928
case YY_END_OF_BUFFER:
821
930
/* Amount of text matched not including the EOB char. */
822
int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
931
int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
824
933
/* Undo the effects of YY_DO_BEFORE_ACTION. */
825
*yy_cp = yy_hold_char;
934
*yy_cp = (yy_hold_char);
826
935
YY_RESTORE_YY_MORE_OFFSET
828
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
937
if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
830
939
/* We're scanning a new file or input source. It's
831
940
* possible that this happened because the user
832
941
* just pointed yyin at a new source and called
833
942
* yylex(). If so, then we have to assure
834
* consistency between yy_current_buffer and our
943
* consistency between YY_CURRENT_BUFFER and our
835
944
* globals. Here is the right place to do so, because
836
945
* this is the first action (other than possibly a
837
946
* back-up) that will match for the new input source.
839
yy_n_chars = yy_current_buffer->yy_n_chars;
840
yy_current_buffer->yy_input_file = yyin;
841
yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
948
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
949
YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
950
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
844
953
/* Note that here we test for yy_c_buf_p "<=" to the position
953
1061
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
954
1062
* EOB_ACT_END_OF_FILE - end of file
957
static int yy_get_next_buffer()
959
register char *dest = yy_current_buffer->yy_ch_buf;
960
register char *source = yytext_ptr;
1064
static int yy_get_next_buffer (void)
1066
register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1067
register char *source = (yytext_ptr);
961
1068
register int number_to_move, i;
964
if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1071
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
966
1073
"fatal flex scanner internal error--end of buffer missed" );
968
if ( yy_current_buffer->yy_fill_buffer == 0 )
1075
if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
969
1076
{ /* Don't try to fill the buffer, so this is an EOF. */
970
if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1077
if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
972
1079
/* We matched a single character, the EOB, so
973
1080
* treat this as a final EOF.
987
1094
/* Try to read more data. */
989
1096
/* First move last chars to start of buffer. */
990
number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1097
number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
992
1099
for ( i = 0; i < number_to_move; ++i )
993
1100
*(dest++) = *(source++);
995
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1102
if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
996
1103
/* don't do the read, it's not guaranteed to return an EOF,
997
1104
* just force an EOF
999
yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1106
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
1004
yy_current_buffer->yy_buf_size - number_to_move - 1;
1111
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1006
1113
while ( num_to_read <= 0 )
1007
1114
{ /* Not enough room in the buffer - grow it. */
1008
#ifdef YY_USES_REJECT
1010
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1013
1116
/* just a shorter name for the current buffer */
1014
YY_BUFFER_STATE b = yy_current_buffer;
1117
YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1016
1119
int yy_c_buf_p_offset =
1017
(int) (yy_c_buf_p - b->yy_ch_buf);
1120
(int) ((yy_c_buf_p) - b->yy_ch_buf);
1019
1122
if ( b->yy_is_our_buffer )
1038
1140
YY_FATAL_ERROR(
1039
1141
"fatal error - scanner input buffer overflow" );
1041
yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1143
(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
1043
num_to_read = yy_current_buffer->yy_buf_size -
1145
num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
1044
1146
number_to_move - 1;
1048
1150
if ( num_to_read > YY_READ_BUF_SIZE )
1049
1151
num_to_read = YY_READ_BUF_SIZE;
1051
1153
/* Read in more data. */
1052
YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1053
yy_n_chars, num_to_read );
1154
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1155
(yy_n_chars), (size_t) num_to_read );
1055
yy_current_buffer->yy_n_chars = yy_n_chars;
1157
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1058
if ( yy_n_chars == 0 )
1160
if ( (yy_n_chars) == 0 )
1060
1162
if ( number_to_move == YY_MORE_ADJ )
1062
1164
ret_val = EOB_ACT_END_OF_FILE;
1068
1170
ret_val = EOB_ACT_LAST_MATCH;
1069
yy_current_buffer->yy_buffer_status =
1171
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1070
1172
YY_BUFFER_EOF_PENDING;
1075
1177
ret_val = EOB_ACT_CONTINUE_SCAN;
1077
yy_n_chars += number_to_move;
1078
yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1079
yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1081
yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1179
if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1180
/* Extend the array by 50%, plus the number we really need. */
1181
yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1182
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
1183
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1184
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1187
(yy_n_chars) += number_to_move;
1188
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1189
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1191
(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1083
1193
return ret_val;
1087
1196
/* yy_get_previous_state - get the state just before the EOB char was reached */
1089
static yy_state_type yy_get_previous_state()
1198
static yy_state_type yy_get_previous_state (void)
1091
1200
register yy_state_type yy_current_state;
1092
1201
register char *yy_cp;
1094
yy_current_state = yy_start;
1203
yy_current_state = (yy_start);
1095
1204
yy_current_state += YY_AT_BOL();
1097
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1206
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1099
1208
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1100
1209
if ( yy_accept[yy_current_state] )
1102
yy_last_accepting_state = yy_current_state;
1103
yy_last_accepting_cpos = yy_cp;
1211
(yy_last_accepting_state) = yy_current_state;
1212
(yy_last_accepting_cpos) = yy_cp;
1105
1214
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1147
1249
yy_is_jam = (yy_current_state == 17);
1149
1251
return yy_is_jam ? 0 : yy_current_state;
1154
#ifdef YY_USE_PROTOS
1155
static void yyunput( int c, register char *yy_bp )
1157
static void yyunput( c, yy_bp )
1159
register char *yy_bp;
1162
register char *yy_cp = yy_c_buf_p;
1254
static void yyunput (int c, register char * yy_bp )
1256
register char *yy_cp;
1258
yy_cp = (yy_c_buf_p);
1164
1260
/* undo effects of setting up yytext */
1165
*yy_cp = yy_hold_char;
1261
*yy_cp = (yy_hold_char);
1167
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1263
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1168
1264
{ /* need to shift things up to make room */
1169
1265
/* +2 for EOB chars. */
1170
register int number_to_move = yy_n_chars + 2;
1171
register char *dest = &yy_current_buffer->yy_ch_buf[
1172
yy_current_buffer->yy_buf_size + 2];
1266
register int number_to_move = (yy_n_chars) + 2;
1267
register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1268
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1173
1269
register char *source =
1174
&yy_current_buffer->yy_ch_buf[number_to_move];
1270
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1176
while ( source > yy_current_buffer->yy_ch_buf )
1272
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1177
1273
*--dest = *--source;
1179
1275
yy_cp += (int) (dest - source);
1180
1276
yy_bp += (int) (dest - source);
1181
yy_current_buffer->yy_n_chars =
1182
yy_n_chars = yy_current_buffer->yy_buf_size;
1277
YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1278
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1184
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1280
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1185
1281
YY_FATAL_ERROR( "flex scanner push-back overflow" );
1188
1284
*--yy_cp = (char) c;
1192
yy_hold_char = *yy_cp;
1195
#endif /* ifndef YY_NO_UNPUT */
1286
(yytext_ptr) = yy_bp;
1287
(yy_hold_char) = *yy_cp;
1288
(yy_c_buf_p) = yy_cp;
1198
1291
#ifndef YY_NO_INPUT
1199
1292
#ifdef __cplusplus
1200
static int yyinput()
1293
static int yyinput (void)
1295
static int input (void)
1207
*yy_c_buf_p = yy_hold_char;
1209
if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1301
*(yy_c_buf_p) = (yy_hold_char);
1303
if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1211
1305
/* yy_c_buf_p now points to the character we want to return.
1212
1306
* If this occurs *before* the EOB characters, then it's a
1213
1307
* valid NUL; if not, then we've hit the end of the buffer.
1215
if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1309
if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1216
1310
/* This was really a NUL. */
1311
*(yy_c_buf_p) = '\0';
1220
1314
{ /* need more input */
1221
int offset = yy_c_buf_p - yytext_ptr;
1315
int offset = (yy_c_buf_p) - (yytext_ptr);
1224
switch ( yy_get_next_buffer() )
1318
switch ( yy_get_next_buffer( ) )
1226
1320
case EOB_ACT_LAST_MATCH:
1227
1321
/* This happens because yy_g_n_b()
1256
1350
case EOB_ACT_CONTINUE_SCAN:
1257
yy_c_buf_p = yytext_ptr + offset;
1351
(yy_c_buf_p) = (yytext_ptr) + offset;
1263
c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
1264
*yy_c_buf_p = '\0'; /* preserve yytext */
1265
yy_hold_char = *++yy_c_buf_p;
1357
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1358
*(yy_c_buf_p) = '\0'; /* preserve yytext */
1359
(yy_hold_char) = *++(yy_c_buf_p);
1267
yy_current_buffer->yy_at_bol = (c == '\n');
1361
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
1271
#endif /* YY_NO_INPUT */
1273
#ifdef YY_USE_PROTOS
1274
void yyrestart( FILE *input_file )
1276
void yyrestart( input_file )
1280
if ( ! yy_current_buffer )
1281
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1283
yy_init_buffer( yy_current_buffer, input_file );
1284
yy_load_buffer_state();
1288
#ifdef YY_USE_PROTOS
1289
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1291
void yy_switch_to_buffer( new_buffer )
1292
YY_BUFFER_STATE new_buffer;
1295
if ( yy_current_buffer == new_buffer )
1365
#endif /* ifndef YY_NO_INPUT */
1367
/** Immediately switch to a different input stream.
1368
* @param input_file A readable stream.
1370
* @note This function does not reset the start condition to @c INITIAL .
1372
void yyrestart (FILE * input_file )
1375
if ( ! YY_CURRENT_BUFFER ){
1376
yyensure_buffer_stack ();
1377
YY_CURRENT_BUFFER_LVALUE =
1378
yy_create_buffer(yyin,YY_BUF_SIZE );
1381
yy_init_buffer(YY_CURRENT_BUFFER,input_file );
1382
yy_load_buffer_state( );
1385
/** Switch to a different input buffer.
1386
* @param new_buffer The new input buffer.
1389
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
1392
/* TODO. We should be able to replace this entire function body
1394
* yypop_buffer_state();
1395
* yypush_buffer_state(new_buffer);
1397
yyensure_buffer_stack ();
1398
if ( YY_CURRENT_BUFFER == new_buffer )
1298
if ( yy_current_buffer )
1401
if ( YY_CURRENT_BUFFER )
1300
1403
/* Flush out information for old buffer. */
1301
*yy_c_buf_p = yy_hold_char;
1302
yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1303
yy_current_buffer->yy_n_chars = yy_n_chars;
1404
*(yy_c_buf_p) = (yy_hold_char);
1405
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1406
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1306
yy_current_buffer = new_buffer;
1307
yy_load_buffer_state();
1409
YY_CURRENT_BUFFER_LVALUE = new_buffer;
1410
yy_load_buffer_state( );
1309
1412
/* We don't actually know whether we did this switch during
1310
1413
* EOF (yywrap()) processing, but the only time this flag
1311
1414
* is looked at is after yywrap() is called, so it's safe
1312
1415
* to go ahead and always set it.
1314
yy_did_buffer_switch_on_eof = 1;
1318
#ifdef YY_USE_PROTOS
1319
void yy_load_buffer_state( void )
1321
void yy_load_buffer_state()
1324
yy_n_chars = yy_current_buffer->yy_n_chars;
1325
yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1326
yyin = yy_current_buffer->yy_input_file;
1327
yy_hold_char = *yy_c_buf_p;
1331
#ifdef YY_USE_PROTOS
1332
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1334
YY_BUFFER_STATE yy_create_buffer( file, size )
1417
(yy_did_buffer_switch_on_eof) = 1;
1420
static void yy_load_buffer_state (void)
1422
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1423
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1424
yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1425
(yy_hold_char) = *(yy_c_buf_p);
1428
/** Allocate and initialize an input buffer state.
1429
* @param file A readable stream.
1430
* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1432
* @return the allocated buffer state.
1434
YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
1339
1436
YY_BUFFER_STATE b;
1341
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1438
b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1343
1440
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1347
1444
/* yy_ch_buf has to be 2 characters longer than the size given because
1348
1445
* we need to put in 2 end-of-buffer characters.
1350
b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1447
b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 );
1351
1448
if ( ! b->yy_ch_buf )
1352
1449
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1354
1451
b->yy_is_our_buffer = 1;
1356
yy_init_buffer( b, file );
1453
yy_init_buffer(b,file );
1362
#ifdef YY_USE_PROTOS
1363
void yy_delete_buffer( YY_BUFFER_STATE b )
1365
void yy_delete_buffer( b )
1458
/** Destroy the buffer.
1459
* @param b a buffer created with yy_create_buffer()
1462
void yy_delete_buffer (YY_BUFFER_STATE b )
1372
if ( b == yy_current_buffer )
1373
yy_current_buffer = (YY_BUFFER_STATE) 0;
1468
if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1469
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1375
1471
if ( b->yy_is_our_buffer )
1376
yy_flex_free( (void *) b->yy_ch_buf );
1378
yy_flex_free( (void *) b );
1383
#ifdef YY_USE_PROTOS
1384
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1386
void yy_init_buffer( b, file )
1393
yy_flush_buffer( b );
1472
yyfree((void *) b->yy_ch_buf );
1474
yyfree((void *) b );
1478
extern int isatty (int );
1479
#endif /* __cplusplus */
1481
/* Initializes or reinitializes a buffer.
1482
* This function is sometimes called more than once on the same buffer,
1483
* such as during a yyrestart() or at EOF.
1485
static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
1490
yy_flush_buffer(b );
1395
1492
b->yy_input_file = file;
1396
1493
b->yy_fill_buffer = 1;
1398
#if YY_ALWAYS_INTERACTIVE
1399
b->yy_is_interactive = 1;
1401
#if YY_NEVER_INTERACTIVE
1402
b->yy_is_interactive = 0;
1404
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1410
#ifdef YY_USE_PROTOS
1411
void yy_flush_buffer( YY_BUFFER_STATE b )
1413
void yy_flush_buffer( b )
1495
/* If b is the current buffer, then yy_init_buffer was _probably_
1496
* called from yyrestart() or through yy_get_next_buffer.
1497
* In that case, we don't want to reset the lineno or column.
1499
if (b != YY_CURRENT_BUFFER){
1500
b->yy_bs_lineno = 1;
1501
b->yy_bs_column = 0;
1504
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1509
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1510
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1513
void yy_flush_buffer (YY_BUFFER_STATE b )
1421
1518
b->yy_n_chars = 0;
1432
1529
b->yy_at_bol = 1;
1433
1530
b->yy_buffer_status = YY_BUFFER_NEW;
1435
if ( b == yy_current_buffer )
1436
yy_load_buffer_state();
1440
#ifndef YY_NO_SCAN_BUFFER
1441
#ifdef YY_USE_PROTOS
1442
YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1444
YY_BUFFER_STATE yy_scan_buffer( base, size )
1532
if ( b == YY_CURRENT_BUFFER )
1533
yy_load_buffer_state( );
1536
/** Pushes the new state onto the stack. The new state becomes
1537
* the current state. This function will allocate the stack
1539
* @param new_buffer The new state.
1542
void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
1544
if (new_buffer == NULL)
1547
yyensure_buffer_stack();
1549
/* This block is copied from yy_switch_to_buffer. */
1550
if ( YY_CURRENT_BUFFER )
1552
/* Flush out information for old buffer. */
1553
*(yy_c_buf_p) = (yy_hold_char);
1554
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1555
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1558
/* Only push if top exists. Otherwise, replace top. */
1559
if (YY_CURRENT_BUFFER)
1560
(yy_buffer_stack_top)++;
1561
YY_CURRENT_BUFFER_LVALUE = new_buffer;
1563
/* copied from yy_switch_to_buffer. */
1564
yy_load_buffer_state( );
1565
(yy_did_buffer_switch_on_eof) = 1;
1568
/** Removes and deletes the top of the stack, if present.
1569
* The next element becomes the new top.
1572
void yypop_buffer_state (void)
1574
if (!YY_CURRENT_BUFFER)
1577
yy_delete_buffer(YY_CURRENT_BUFFER );
1578
YY_CURRENT_BUFFER_LVALUE = NULL;
1579
if ((yy_buffer_stack_top) > 0)
1580
--(yy_buffer_stack_top);
1582
if (YY_CURRENT_BUFFER) {
1583
yy_load_buffer_state( );
1584
(yy_did_buffer_switch_on_eof) = 1;
1588
/* Allocates the stack if it does not exist.
1589
* Guarantees space for at least one push.
1591
static void yyensure_buffer_stack (void)
1595
if (!(yy_buffer_stack)) {
1597
/* First allocation is just for 2 elements, since we don't know if this
1598
* scanner will even need a stack. We use 2 instead of 1 to avoid an
1599
* immediate realloc on the next call.
1602
(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
1603
(num_to_alloc * sizeof(struct yy_buffer_state*)
1605
if ( ! (yy_buffer_stack) )
1606
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1608
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1610
(yy_buffer_stack_max) = num_to_alloc;
1611
(yy_buffer_stack_top) = 0;
1615
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1617
/* Increase the buffer to prepare for a possible push. */
1618
int grow_size = 8 /* arbitrary grow size */;
1620
num_to_alloc = (yy_buffer_stack_max) + grow_size;
1621
(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
1623
num_to_alloc * sizeof(struct yy_buffer_state*)
1625
if ( ! (yy_buffer_stack) )
1626
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
1628
/* zero only the new slots.*/
1629
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1630
(yy_buffer_stack_max) = num_to_alloc;
1634
/** Setup the input buffer state to scan directly from a user-specified character buffer.
1635
* @param base the character buffer
1636
* @param size the size in bytes of the character buffer
1638
* @return the newly allocated buffer state object.
1640
YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
1449
1642
YY_BUFFER_STATE b;
1451
1644
if ( size < 2 ||
1452
1645
base[size-2] != YY_END_OF_BUFFER_CHAR ||
1453
1646
base[size-1] != YY_END_OF_BUFFER_CHAR )
1454
1647
/* They forgot to leave room for the EOB's. */
1457
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1650
b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
1459
1652
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1468
1661
b->yy_fill_buffer = 0;
1469
1662
b->yy_buffer_status = YY_BUFFER_NEW;
1471
yy_switch_to_buffer( b );
1664
yy_switch_to_buffer(b );
1478
#ifndef YY_NO_SCAN_STRING
1479
#ifdef YY_USE_PROTOS
1480
YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1482
YY_BUFFER_STATE yy_scan_string( yy_str )
1483
yyconst char *yy_str;
1487
for ( len = 0; yy_str[len]; ++len )
1490
return yy_scan_bytes( yy_str, len );
1495
#ifndef YY_NO_SCAN_BYTES
1496
#ifdef YY_USE_PROTOS
1497
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1499
YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1500
yyconst char *bytes;
1669
/** Setup the input buffer state to scan a string. The next call to yylex() will
1670
* scan from a @e copy of @a str.
1671
* @param yystr a NUL-terminated string to scan
1673
* @return the newly allocated buffer state object.
1674
* @note If you want to scan bytes that may contain NUL values, then use
1675
* yy_scan_bytes() instead.
1677
YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
1680
return yy_scan_bytes(yystr,strlen(yystr) );
1683
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
1684
* scan from a @e copy of @a bytes.
1685
* @param bytes the byte buffer to scan
1686
* @param len the number of bytes in the buffer pointed to by @a bytes.
1688
* @return the newly allocated buffer state object.
1690
YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
1504
1692
YY_BUFFER_STATE b;
1509
1697
/* Get memory for full buffer, including space for trailing EOB's. */
1511
buf = (char *) yy_flex_alloc( n );
1698
n = _yybytes_len + 2;
1699
buf = (char *) yyalloc(n );
1513
1701
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1515
for ( i = 0; i < len; ++i )
1518
buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1520
b = yy_scan_buffer( buf, n );
1703
for ( i = 0; i < _yybytes_len; ++i )
1704
buf[i] = yybytes[i];
1706
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1708
b = yy_scan_buffer(buf,n );
1522
1710
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1527
1715
b->yy_is_our_buffer = 1;
1534
#ifndef YY_NO_PUSH_STATE
1535
#ifdef YY_USE_PROTOS
1536
static void yy_push_state( int new_state )
1538
static void yy_push_state( new_state )
1542
if ( yy_start_stack_ptr >= yy_start_stack_depth )
1546
yy_start_stack_depth += YY_START_STACK_INCR;
1547
new_size = yy_start_stack_depth * sizeof( int );
1549
if ( ! yy_start_stack )
1550
yy_start_stack = (int *) yy_flex_alloc( new_size );
1553
yy_start_stack = (int *) yy_flex_realloc(
1554
(void *) yy_start_stack, new_size );
1556
if ( ! yy_start_stack )
1558
"out of memory expanding start-condition stack" );
1561
yy_start_stack[yy_start_stack_ptr++] = YY_START;
1568
#ifndef YY_NO_POP_STATE
1569
static void yy_pop_state()
1571
if ( --yy_start_stack_ptr < 0 )
1572
YY_FATAL_ERROR( "start-condition stack underflow" );
1574
BEGIN(yy_start_stack[yy_start_stack_ptr]);
1579
#ifndef YY_NO_TOP_STATE
1580
static int yy_top_state()
1582
return yy_start_stack[yy_start_stack_ptr - 1];
1586
1720
#ifndef YY_EXIT_FAILURE
1587
1721
#define YY_EXIT_FAILURE 2
1590
#ifdef YY_USE_PROTOS
1591
static void yy_fatal_error( yyconst char msg[] )
1593
static void yy_fatal_error( msg )
1597
(void) fprintf( stderr, "%s\n", msg );
1724
static void yy_fatal_error (yyconst char* msg )
1726
(void) fprintf( stderr, "%s\n", msg );
1598
1727
exit( YY_EXIT_FAILURE );
1603
1730
/* Redefine yyless() so it works in section 3 code. */
1609
1736
/* Undo effects of setting up yytext. */ \
1610
yytext[yyleng] = yy_hold_char; \
1611
yy_c_buf_p = yytext + n; \
1612
yy_hold_char = *yy_c_buf_p; \
1613
*yy_c_buf_p = '\0'; \
1737
int yyless_macro_arg = (n); \
1738
YY_LESS_LINENO(yyless_macro_arg);\
1739
yytext[yyleng] = (yy_hold_char); \
1740
(yy_c_buf_p) = yytext + yyless_macro_arg; \
1741
(yy_hold_char) = *(yy_c_buf_p); \
1742
*(yy_c_buf_p) = '\0'; \
1743
yyleng = yyless_macro_arg; \
1619
/* Internal utility routines. */
1622
#ifdef YY_USE_PROTOS
1623
static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1747
/* Accessor methods (get/set functions) to struct members. */
1749
/** Get the current line number.
1752
int yyget_lineno (void)
1758
/** Get the input stream.
1761
FILE *yyget_in (void)
1766
/** Get the output stream.
1769
FILE *yyget_out (void)
1774
/** Get the length of the current token.
1777
int yyget_leng (void)
1782
/** Get the current token.
1786
char *yyget_text (void)
1791
/** Set the current line number.
1792
* @param line_number
1795
void yyset_lineno (int line_number )
1798
yylineno = line_number;
1801
/** Set the input stream. This does not discard the current
1803
* @param in_str A readable stream.
1805
* @see yy_switch_to_buffer
1807
void yyset_in (FILE * in_str )
1812
void yyset_out (FILE * out_str )
1817
int yyget_debug (void)
1819
return yy_flex_debug;
1822
void yyset_debug (int bdebug )
1824
yy_flex_debug = bdebug ;
1827
static int yy_init_globals (void)
1829
/* Initialization is the same as for the non-reentrant scanner.
1830
* This function is called from yylex_destroy(), so don't allocate here.
1833
(yy_buffer_stack) = 0;
1834
(yy_buffer_stack_top) = 0;
1835
(yy_buffer_stack_max) = 0;
1836
(yy_c_buf_p) = (char *) 0;
1840
/* Defined in main.c */
1625
static void yy_flex_strncpy( s1, s2, n )
1849
/* For future reference: Set errno on error, since we are called by
1855
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
1856
int yylex_destroy (void)
1859
/* Pop the buffer stack, destroying each element. */
1860
while(YY_CURRENT_BUFFER){
1861
yy_delete_buffer(YY_CURRENT_BUFFER );
1862
YY_CURRENT_BUFFER_LVALUE = NULL;
1863
yypop_buffer_state();
1866
/* Destroy the stack itself. */
1867
yyfree((yy_buffer_stack) );
1868
(yy_buffer_stack) = NULL;
1870
/* Reset the globals. This is important in a non-reentrant scanner so the next time
1871
* yylex() is called, initialization will occur. */
1878
* Internal utility routines.
1882
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
1631
1884
register int i;
1632
1885
for ( i = 0; i < n; ++i )
1637
1890
#ifdef YY_NEED_STRLEN
1638
#ifdef YY_USE_PROTOS
1639
static int yy_flex_strlen( yyconst char *s )
1641
static int yy_flex_strlen( s )
1891
static int yy_flex_strlen (yyconst char * s )
1645
1893
register int n;
1646
1894
for ( n = 0; s[n]; ++n )
1654
#ifdef YY_USE_PROTOS
1655
static void *yy_flex_alloc( yy_size_t size )
1657
static void *yy_flex_alloc( size )
1901
void *yyalloc (yy_size_t size )
1661
1903
return (void *) malloc( size );
1664
#ifdef YY_USE_PROTOS
1665
static void *yy_flex_realloc( void *ptr, yy_size_t size )
1667
static void *yy_flex_realloc( ptr, size )
1906
void *yyrealloc (void * ptr, yy_size_t size )
1672
1908
/* The cast to (char *) in the following accommodates both
1673
1909
* implementations that use char* generic pointers, and those
1674
1910
* that use void* generic pointers. It works with the latter