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 FBL_Y__INT_ALIGNED short int
6
/* A lexical scanner generated by flex */
8
9
#define FBL_Y__FLEX_MAJOR_VERSION 2
9
10
#define FBL_Y__FLEX_MINOR_VERSION 5
11
#define FBL_Y__FLEX_SUBMINOR_VERSION 35
12
#if FBL_Y__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. */
28
#define FBL_Y__USE_PROTOS
30
91
/* The "const" storage-class-modifier is valid. */
31
92
#define FBL_Y__USE_CONST
33
94
#else /* ! __cplusplus */
96
/* C99 requires __STDC__ to be defined as 1. */
97
#if defined (__STDC__)
37
#define FBL_Y__USE_PROTOS
38
99
#define FBL_Y__USE_CONST
101
#endif /* defined (__STDC__) */
41
102
#endif /* ! __cplusplus */
48
#define FBL_Y__USE_CONST
49
#define FBL_Y__USE_PROTOS
52
104
#ifdef FBL_Y__USE_CONST
53
105
#define fbl_y_const const
55
107
#define fbl_y_const
59
#ifdef FBL_Y__USE_PROTOS
60
#define FBL_Y__PROTO(proto) proto
62
#define FBL_Y__PROTO(proto) ()
65
110
/* Returned upon end-of-file. */
66
111
#define FBL_Y__NULL 0
76
121
* but we do it the disgusting crufty way forced on us by the ()-less
77
122
* definition of BEGIN.
79
#define BEGIN fbl_y__start = 1 + 2 *
124
#define BEGIN (fbl_y__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 FBL_Y_STATE alias is for lex
85
#define FBL_Y__START ((fbl_y__start - 1) / 2)
130
#define FBL_Y__START (((fbl_y__start) - 1) / 2)
86
131
#define FBL_Y_STATE FBL_Y__START
88
133
/* Action number for EOF rule of a given start state. */
89
134
#define FBL_Y__STATE_EOF(state) (FBL_Y__END_OF_BUFFER + state + 1)
91
136
/* Special action meaning "start processing a new file". */
92
#define FBL_Y__NEW_FILE fbl_y_restart( fbl_y_in )
137
#define FBL_Y__NEW_FILE fbl_y_restart(fbl_y_in )
94
139
#define FBL_Y__END_OF_BUFFER_CHAR 0
96
141
/* Size of default input buffer. */
142
#ifndef FBL_Y__BUF_SIZE
97
143
#define FBL_Y__BUF_SIZE 16384
146
/* The state buf must be large enough to hold one state per character in the main buffer.
148
#define FBL_Y__STATE_BUF_SIZE ((FBL_Y__BUF_SIZE + 2) * sizeof(fbl_y__state_type))
150
#ifndef FBL_Y__TYPEDEF_FBL_Y__BUFFER_STATE
151
#define FBL_Y__TYPEDEF_FBL_Y__BUFFER_STATE
99
152
typedef struct fbl_y__buffer_state *FBL_Y__BUFFER_STATE;
101
155
extern int fbl_y_leng;
102
157
extern FILE *fbl_y_in, *fbl_y_out;
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 fbl_y_less() call.
122
/* Return all but the first 'n' matched characters back to the input stream. */
163
#define FBL_Y__LESS_LINENO(n)
165
/* Return all but the first "n" matched characters back to the input stream. */
124
166
#define fbl_y_less(n) \
127
169
/* Undo effects of setting up fbl_y_text. */ \
128
*fbl_y__cp = fbl_y__hold_char; \
170
int fbl_y_less_macro_arg = (n); \
171
FBL_Y__LESS_LINENO(fbl_y_less_macro_arg);\
172
*fbl_y__cp = (fbl_y__hold_char); \
129
173
FBL_Y__RESTORE_FBL_Y__MORE_OFFSET \
130
fbl_y__c_buf_p = fbl_y__cp = fbl_y__bp + n - FBL_Y__MORE_ADJ; \
174
(fbl_y__c_buf_p) = fbl_y__cp = fbl_y__bp + fbl_y_less_macro_arg - FBL_Y__MORE_ADJ; \
131
175
FBL_Y__DO_BEFORE_ACTION; /* set up fbl_y_text again */ \
135
#define unput(c) fbl_y_unput( c, fbl_y_text_ptr )
179
#define unput(c) fbl_y_unput( c, (fbl_y_text_ptr) )
137
/* Some routines like fbl_y__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 FBL_Y__MAY_BE_UNUSED __attribute__((unused))
143
#define FBL_Y__MAY_BE_UNUSED
181
#ifndef FBL_Y__TYPEDEF_FBL_Y__SIZE_T
182
#define FBL_Y__TYPEDEF_FBL_Y__SIZE_T
183
typedef size_t fbl_y__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 fbl_y__size_t;
186
#ifndef FBL_Y__STRUCT_FBL_Y__BUFFER_STATE
187
#define FBL_Y__STRUCT_FBL_Y__BUFFER_STATE
153
188
struct fbl_y__buffer_state
155
190
FILE *fbl_y__input_file;
205
244
* just pointing fbl_y_in at a new input file.
207
246
#define FBL_Y__BUFFER_EOF_PENDING 2
249
#endif /* !FBL_Y__STRUCT_FBL_Y__BUFFER_STATE */
210
static FBL_Y__BUFFER_STATE fbl_y__current_buffer = 0;
251
/* Stack of input buffers. */
252
static size_t fbl_y__buffer_stack_top = 0; /**< index of top of stack. */
253
static size_t fbl_y__buffer_stack_max = 0; /**< capacity of stack. */
254
static FBL_Y__BUFFER_STATE * fbl_y__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 FBL_Y__CURRENT_BUFFER fbl_y__current_buffer
262
#define FBL_Y__CURRENT_BUFFER ( (fbl_y__buffer_stack) \
263
? (fbl_y__buffer_stack)[(fbl_y__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 FBL_Y__CURRENT_BUFFER_LVALUE (fbl_y__buffer_stack)[(fbl_y__buffer_stack_top)]
219
271
/* fbl_y__hold_char holds the character lost when fbl_y_text is formed. */
220
272
static char fbl_y__hold_char;
222
273
static int fbl_y__n_chars; /* number of characters read into fbl_y__ch_buf */
227
276
/* Points to current character in buffer. */
228
277
static char *fbl_y__c_buf_p = (char *) 0;
229
static int fbl_y__init = 1; /* whether we need to initialize */
278
static int fbl_y__init = 0; /* whether we need to initialize */
230
279
static int fbl_y__start = 0; /* start state number */
232
281
/* Flag which is used to allow fbl_y_wrap()'s to do buffer switches
235
284
static int fbl_y__did_buffer_switch_on_eof;
237
void fbl_y_restart FBL_Y__PROTO(( FILE *input_file ));
239
void fbl_y__switch_to_buffer FBL_Y__PROTO(( FBL_Y__BUFFER_STATE new_buffer ));
240
void fbl_y__load_buffer_state FBL_Y__PROTO(( void ));
241
FBL_Y__BUFFER_STATE fbl_y__create_buffer FBL_Y__PROTO(( FILE *file, int size ));
242
void fbl_y__delete_buffer FBL_Y__PROTO(( FBL_Y__BUFFER_STATE b ));
243
void fbl_y__init_buffer FBL_Y__PROTO(( FBL_Y__BUFFER_STATE b, FILE *file ));
244
void fbl_y__flush_buffer FBL_Y__PROTO(( FBL_Y__BUFFER_STATE b ));
245
#define FBL_Y__FLUSH_BUFFER fbl_y__flush_buffer( fbl_y__current_buffer )
247
FBL_Y__BUFFER_STATE fbl_y__scan_buffer FBL_Y__PROTO(( char *base, fbl_y__size_t size ));
248
FBL_Y__BUFFER_STATE fbl_y__scan_string FBL_Y__PROTO(( fbl_y_const char *fbl_y__str ));
249
FBL_Y__BUFFER_STATE fbl_y__scan_bytes FBL_Y__PROTO(( fbl_y_const char *bytes, int len ));
251
static void *fbl_y__flex_alloc FBL_Y__PROTO(( fbl_y__size_t ));
252
static void *fbl_y__flex_realloc FBL_Y__PROTO(( void *, fbl_y__size_t )) FBL_Y__MAY_BE_UNUSED;
253
static void fbl_y__flex_free FBL_Y__PROTO(( void * ));
286
void fbl_y_restart (FILE *input_file );
287
void fbl_y__switch_to_buffer (FBL_Y__BUFFER_STATE new_buffer );
288
FBL_Y__BUFFER_STATE fbl_y__create_buffer (FILE *file,int size );
289
void fbl_y__delete_buffer (FBL_Y__BUFFER_STATE b );
290
void fbl_y__flush_buffer (FBL_Y__BUFFER_STATE b );
291
void fbl_y_push_buffer_state (FBL_Y__BUFFER_STATE new_buffer );
292
void fbl_y_pop_buffer_state (void );
294
static void fbl_y_ensure_buffer_stack (void );
295
static void fbl_y__load_buffer_state (void );
296
static void fbl_y__init_buffer (FBL_Y__BUFFER_STATE b,FILE *file );
298
#define FBL_Y__FLUSH_BUFFER fbl_y__flush_buffer(FBL_Y__CURRENT_BUFFER )
300
FBL_Y__BUFFER_STATE fbl_y__scan_buffer (char *base,fbl_y__size_t size );
301
FBL_Y__BUFFER_STATE fbl_y__scan_string (fbl_y_const char *fbl_y__str );
302
FBL_Y__BUFFER_STATE fbl_y__scan_bytes (fbl_y_const char *bytes,int len );
304
void *fbl_y_alloc (fbl_y__size_t );
305
void *fbl_y_realloc (void *,fbl_y__size_t );
306
void fbl_y_free (void * );
255
308
#define fbl_y__new_buffer fbl_y__create_buffer
257
310
#define fbl_y__set_interactive(is_interactive) \
259
if ( ! fbl_y__current_buffer ) \
260
fbl_y__current_buffer = fbl_y__create_buffer( fbl_y_in, FBL_Y__BUF_SIZE ); \
261
fbl_y__current_buffer->fbl_y__is_interactive = is_interactive; \
312
if ( ! FBL_Y__CURRENT_BUFFER ){ \
313
fbl_y_ensure_buffer_stack (); \
314
FBL_Y__CURRENT_BUFFER_LVALUE = \
315
fbl_y__create_buffer(fbl_y_in,FBL_Y__BUF_SIZE ); \
317
FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__is_interactive = is_interactive; \
264
320
#define fbl_y__set_bol(at_bol) \
266
if ( ! fbl_y__current_buffer ) \
267
fbl_y__current_buffer = fbl_y__create_buffer( fbl_y_in, FBL_Y__BUF_SIZE ); \
268
fbl_y__current_buffer->fbl_y__at_bol = at_bol; \
322
if ( ! FBL_Y__CURRENT_BUFFER ){\
323
fbl_y_ensure_buffer_stack (); \
324
FBL_Y__CURRENT_BUFFER_LVALUE = \
325
fbl_y__create_buffer(fbl_y_in,FBL_Y__BUF_SIZE ); \
327
FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__at_bol = at_bol; \
271
#define FBL_Y__AT_BOL() (fbl_y__current_buffer->fbl_y__at_bol)
330
#define FBL_Y__AT_BOL() (FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__at_bol)
332
/* Begin user sect3 */
273
334
typedef unsigned char FBL_Y__CHAR;
274
336
FILE *fbl_y_in = (FILE *) 0, *fbl_y_out = (FILE *) 0;
275
338
typedef int fbl_y__state_type;
340
extern int fbl_y_lineno;
342
int fbl_y_lineno = 1;
276
344
extern char *fbl_y_text;
277
345
#define fbl_y_text_ptr fbl_y_text
279
static fbl_y__state_type fbl_y__get_previous_state FBL_Y__PROTO(( void ));
280
static fbl_y__state_type fbl_y__try_NUL_trans FBL_Y__PROTO(( fbl_y__state_type current_state ));
281
static int fbl_y__get_next_buffer FBL_Y__PROTO(( void ));
282
static void fbl_y__fatal_error FBL_Y__PROTO(( fbl_y_const char msg[] ));
347
static fbl_y__state_type fbl_y__get_previous_state (void );
348
static fbl_y__state_type fbl_y__try_NUL_trans (fbl_y__state_type current_state );
349
static int fbl_y__get_next_buffer (void );
350
static void fbl_y__fatal_error (fbl_y_const char msg[] );
284
352
/* Done after the current pattern has been matched and before the
285
353
* corresponding action - sets up fbl_y_text.
287
355
#define FBL_Y__DO_BEFORE_ACTION \
288
fbl_y_text_ptr = fbl_y__bp; \
289
fbl_y_leng = (int) (fbl_y__cp - fbl_y__bp); \
290
fbl_y__hold_char = *fbl_y__cp; \
356
(fbl_y_text_ptr) = fbl_y__bp; \
357
fbl_y_leng = (size_t) (fbl_y__cp - fbl_y__bp); \
358
(fbl_y__hold_char) = *fbl_y__cp; \
291
359
*fbl_y__cp = '\0'; \
292
fbl_y__c_buf_p = fbl_y__cp;
360
(fbl_y__c_buf_p) = fbl_y__cp;
294
362
#define FBL_Y__NUM_RULES 34
295
363
#define FBL_Y__END_OF_BUFFER 35
296
static fbl_y_const short int fbl_y__accept[105] =
364
/* This struct is not used in this scanner,
365
but its presence is necessary. */
366
struct fbl_y__trans_info
368
flex_int32_t fbl_y__verify;
369
flex_int32_t fbl_y__nxt;
371
static fbl_y_const flex_int16_t fbl_y__accept[105] =
298
373
0, 0, 35, 33, 1, 30, 23, 33, 33, 2,
299
374
3, 4, 5, 7, 8, 9, 10, 24, 33, 26,
733
#ifndef FBL_Y__NO_UNISTD_H
734
/* Special case for "unistd.h", since it is non-ANSI. We include it way
735
* down here because we want the user's section 1 to have been scanned first.
736
* The user has a chance to override it with an option.
741
#ifndef FBL_Y__EXTRA_TYPE
742
#define FBL_Y__EXTRA_TYPE void *
745
static int fbl_y__init_globals (void );
747
/* Accessor methods to globals.
748
These are made visible to non-reentrant scanners for convenience. */
750
int fbl_y_lex_destroy (void );
752
int fbl_y_get_debug (void );
754
void fbl_y_set_debug (int debug_flag );
756
FBL_Y__EXTRA_TYPE fbl_y_get_extra (void );
758
void fbl_y_set_extra (FBL_Y__EXTRA_TYPE user_defined );
760
FILE *fbl_y_get_in (void );
762
void fbl_y_set_in (FILE * in_str );
764
FILE *fbl_y_get_out (void );
766
void fbl_y_set_out (FILE * out_str );
768
int fbl_y_get_leng (void );
770
char *fbl_y_get_text (void );
772
int fbl_y_get_lineno (void );
774
void fbl_y_set_lineno (int line_number );
653
776
/* Macros after this point can all be overridden by user definitions in
657
780
#ifndef FBL_Y__SKIP_FBL_Y_WRAP
658
781
#ifdef __cplusplus
659
extern "C" int fbl_y_wrap FBL_Y__PROTO(( void ));
782
extern "C" int fbl_y_wrap (void );
661
extern int fbl_y_wrap FBL_Y__PROTO(( void ));
665
#ifndef FBL_Y__NO_UNPUT
666
static void fbl_y_unput FBL_Y__PROTO(( int c, char *buf_ptr ));
784
extern int fbl_y_wrap (void );
788
static void fbl_y_unput (int c,char *buf_ptr );
669
790
#ifndef fbl_y_text_ptr
670
static void fbl_y__flex_strncpy FBL_Y__PROTO(( char *, fbl_y_const char *, int ));
791
static void fbl_y__flex_strncpy (char *,fbl_y_const char *,int );
673
794
#ifdef FBL_Y__NEED_STRLEN
674
static int fbl_y__flex_strlen FBL_Y__PROTO(( fbl_y_const char * ));
795
static int fbl_y__flex_strlen (fbl_y_const char * );
677
798
#ifndef FBL_Y__NO_INPUT
678
800
#ifdef __cplusplus
679
static int fbl_y_input FBL_Y__PROTO(( void ));
681
static int input FBL_Y__PROTO(( void ));
685
#if FBL_Y__STACK_USED
686
static int fbl_y__start_stack_ptr = 0;
687
static int fbl_y__start_stack_depth = 0;
688
static int *fbl_y__start_stack = 0;
689
#ifndef FBL_Y__NO_PUSH_STATE
690
static void fbl_y__push_state FBL_Y__PROTO(( int new_state ));
692
#ifndef FBL_Y__NO_POP_STATE
693
static void fbl_y__pop_state FBL_Y__PROTO(( void ));
695
#ifndef FBL_Y__NO_TOP_STATE
696
static int fbl_y__top_state FBL_Y__PROTO(( void ));
700
#define FBL_Y__NO_PUSH_STATE 1
701
#define FBL_Y__NO_POP_STATE 1
702
#define FBL_Y__NO_TOP_STATE 1
705
#ifdef FBL_Y__MALLOC_DECL
713
/* Just try to get by without declaring the routines. This will fail
714
* miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
715
* or sizeof(void*) != sizeof(int).
801
static int fbl_y_input (void );
803
static int input (void );
720
808
/* Amount of stuff to slurp up with each read. */
819
929
if ( ! fbl_y_out )
820
930
fbl_y_out = stdout;
822
if ( ! fbl_y__current_buffer )
823
fbl_y__current_buffer =
824
fbl_y__create_buffer( fbl_y_in, FBL_Y__BUF_SIZE );
932
if ( ! FBL_Y__CURRENT_BUFFER ) {
933
fbl_y_ensure_buffer_stack ();
934
FBL_Y__CURRENT_BUFFER_LVALUE =
935
fbl_y__create_buffer(fbl_y_in,FBL_Y__BUF_SIZE );
826
fbl_y__load_buffer_state();
938
fbl_y__load_buffer_state( );
829
941
while ( 1 ) /* loops until end-of-file is reached */
831
fbl_y__cp = fbl_y__c_buf_p;
943
fbl_y__cp = (fbl_y__c_buf_p);
833
945
/* Support of fbl_y_text. */
834
*fbl_y__cp = fbl_y__hold_char;
946
*fbl_y__cp = (fbl_y__hold_char);
836
948
/* fbl_y__bp points to the position in fbl_y__ch_buf of the start of
837
949
* the current run.
839
951
fbl_y__bp = fbl_y__cp;
841
fbl_y__current_state = fbl_y__start;
953
fbl_y__current_state = (fbl_y__start);
845
957
register FBL_Y__CHAR fbl_y__c = fbl_y__ec[FBL_Y__SC_TO_UI(*fbl_y__cp)];
846
958
if ( fbl_y__accept[fbl_y__current_state] )
848
fbl_y__last_accepting_state = fbl_y__current_state;
849
fbl_y__last_accepting_cpos = fbl_y__cp;
960
(fbl_y__last_accepting_state) = fbl_y__current_state;
961
(fbl_y__last_accepting_cpos) = fbl_y__cp;
851
963
while ( fbl_y__chk[fbl_y__base[fbl_y__current_state] + fbl_y__c] != fbl_y__current_state )
863
975
fbl_y__act = fbl_y__accept[fbl_y__current_state];
864
976
if ( fbl_y__act == 0 )
865
977
{ /* have to back up */
866
fbl_y__cp = fbl_y__last_accepting_cpos;
867
fbl_y__current_state = fbl_y__last_accepting_state;
978
fbl_y__cp = (fbl_y__last_accepting_cpos);
979
fbl_y__current_state = (fbl_y__last_accepting_state);
868
980
fbl_y__act = fbl_y__accept[fbl_y__current_state];
871
983
FBL_Y__DO_BEFORE_ACTION;
874
985
do_action: /* This label is used only to access EOF actions. */
877
987
switch ( fbl_y__act )
878
988
{ /* beginning of action switch */
879
989
case 0: /* must back up */
880
990
/* undo the effects of FBL_Y__DO_BEFORE_ACTION */
881
*fbl_y__cp = fbl_y__hold_char;
882
fbl_y__cp = fbl_y__last_accepting_cpos;
883
fbl_y__current_state = fbl_y__last_accepting_state;
991
*fbl_y__cp = (fbl_y__hold_char);
992
fbl_y__cp = (fbl_y__last_accepting_cpos);
993
fbl_y__current_state = (fbl_y__last_accepting_state);
884
994
goto fbl_y__find_action;
887
997
FBL_Y__RULE_SETUP
888
#line 195 "../../../src/fvh/src/fbl_bcomp_l.l"
998
#line 195 "./fbl_bcomp_l.l"
892
1002
FBL_Y__RULE_SETUP
893
#line 196 "../../../src/fvh/src/fbl_bcomp_l.l"
1003
#line 196 "./fbl_bcomp_l.l"
894
1004
{ return(Ampersand); }
897
1007
FBL_Y__RULE_SETUP
898
#line 197 "../../../src/fvh/src/fbl_bcomp_l.l"
1008
#line 197 "./fbl_bcomp_l.l"
899
1009
{ return(Apostrophe); }
902
1012
FBL_Y__RULE_SETUP
903
#line 198 "../../../src/fvh/src/fbl_bcomp_l.l"
1013
#line 198 "./fbl_bcomp_l.l"
904
1014
{ return(LeftParen); }
907
1017
FBL_Y__RULE_SETUP
908
#line 199 "../../../src/fvh/src/fbl_bcomp_l.l"
1018
#line 199 "./fbl_bcomp_l.l"
909
1019
{ return(RightParen); }
912
1022
FBL_Y__RULE_SETUP
913
#line 200 "../../../src/fvh/src/fbl_bcomp_l.l"
1023
#line 200 "./fbl_bcomp_l.l"
914
1024
{ return(DoubleStar); }
917
1027
FBL_Y__RULE_SETUP
918
#line 201 "../../../src/fvh/src/fbl_bcomp_l.l"
1028
#line 201 "./fbl_bcomp_l.l"
919
1029
{ return(Star); }
922
1032
FBL_Y__RULE_SETUP
923
#line 202 "../../../src/fvh/src/fbl_bcomp_l.l"
1033
#line 202 "./fbl_bcomp_l.l"
924
1034
{ return(Plus); }
927
1037
FBL_Y__RULE_SETUP
928
#line 203 "../../../src/fvh/src/fbl_bcomp_l.l"
1038
#line 203 "./fbl_bcomp_l.l"
929
1039
{ return(Comma); }
932
1042
FBL_Y__RULE_SETUP
933
#line 204 "../../../src/fvh/src/fbl_bcomp_l.l"
1043
#line 204 "./fbl_bcomp_l.l"
934
1044
{ return(Minus); }
937
1047
FBL_Y__RULE_SETUP
938
#line 205 "../../../src/fvh/src/fbl_bcomp_l.l"
1048
#line 205 "./fbl_bcomp_l.l"
939
1049
{ return(VarAsgn); }
942
1052
FBL_Y__RULE_SETUP
943
#line 206 "../../../src/fvh/src/fbl_bcomp_l.l"
1053
#line 206 "./fbl_bcomp_l.l"
944
1054
{ return(Colon); }
947
1057
FBL_Y__RULE_SETUP
948
#line 207 "../../../src/fvh/src/fbl_bcomp_l.l"
1058
#line 207 "./fbl_bcomp_l.l"
949
1059
{ return(Semicolon); }
952
1062
FBL_Y__RULE_SETUP
953
#line 208 "../../../src/fvh/src/fbl_bcomp_l.l"
1063
#line 208 "./fbl_bcomp_l.l"
954
1064
{ return(_LESym); }
957
1067
FBL_Y__RULE_SETUP
958
#line 209 "../../../src/fvh/src/fbl_bcomp_l.l"
1068
#line 209 "./fbl_bcomp_l.l"
959
1069
{ return(_GESym); }
962
1072
FBL_Y__RULE_SETUP
963
#line 210 "../../../src/fvh/src/fbl_bcomp_l.l"
1073
#line 210 "./fbl_bcomp_l.l"
964
1074
{ return(_LTSym); }
967
1077
FBL_Y__RULE_SETUP
968
#line 211 "../../../src/fvh/src/fbl_bcomp_l.l"
1078
#line 211 "./fbl_bcomp_l.l"
969
1079
{ return(_GTSym); }
972
1082
FBL_Y__RULE_SETUP
973
#line 212 "../../../src/fvh/src/fbl_bcomp_l.l"
1083
#line 212 "./fbl_bcomp_l.l"
974
1084
{ return(_EQSym); }
977
1087
FBL_Y__RULE_SETUP
978
#line 213 "../../../src/fvh/src/fbl_bcomp_l.l"
1088
#line 213 "./fbl_bcomp_l.l"
979
1089
{ return(_NESym); }
982
1092
FBL_Y__RULE_SETUP
983
#line 214 "../../../src/fvh/src/fbl_bcomp_l.l"
1093
#line 214 "./fbl_bcomp_l.l"
984
1094
{ return(Arrow); }
987
1097
FBL_Y__RULE_SETUP
988
#line 215 "../../../src/fvh/src/fbl_bcomp_l.l"
1098
#line 215 "./fbl_bcomp_l.l"
989
1099
{ return(Box); }
992
1102
FBL_Y__RULE_SETUP
993
#line 216 "../../../src/fvh/src/fbl_bcomp_l.l"
1103
#line 216 "./fbl_bcomp_l.l"
994
1104
{ return(Bar); }
997
1107
FBL_Y__RULE_SETUP
998
#line 217 "../../../src/fvh/src/fbl_bcomp_l.l"
1108
#line 217 "./fbl_bcomp_l.l"
999
1109
{ return(Bar); }
1002
1112
FBL_Y__RULE_SETUP
1003
#line 218 "../../../src/fvh/src/fbl_bcomp_l.l"
1113
#line 218 "./fbl_bcomp_l.l"
1004
1114
{ return(Dot); }
1007
1117
FBL_Y__RULE_SETUP
1008
#line 220 "../../../src/fvh/src/fbl_bcomp_l.l"
1118
#line 220 "./fbl_bcomp_l.l"
1011
1121
itoken=find_mc(fbl_y_text);
1088
1199
FBL_Y__RULE_SETUP
1089
#line 263 "../../../src/fvh/src/fbl_bcomp_l.l"
1200
#line 263 "./fbl_bcomp_l.l"
1091
1202
return (*fbl_y_text);
1095
1206
FBL_Y__RULE_SETUP
1096
#line 266 "../../../src/fvh/src/fbl_bcomp_l.l"
1207
#line 266 "./fbl_bcomp_l.l"
1210
#line 1211 "<stdout>"
1099
1211
case FBL_Y__STATE_EOF(INITIAL):
1100
1212
fbl_y_terminate();
1102
1214
case FBL_Y__END_OF_BUFFER:
1104
1216
/* Amount of text matched not including the EOB char. */
1105
int fbl_y__amount_of_matched_text = (int) (fbl_y__cp - fbl_y_text_ptr) - 1;
1217
int fbl_y__amount_of_matched_text = (int) (fbl_y__cp - (fbl_y_text_ptr)) - 1;
1107
1219
/* Undo the effects of FBL_Y__DO_BEFORE_ACTION. */
1108
*fbl_y__cp = fbl_y__hold_char;
1220
*fbl_y__cp = (fbl_y__hold_char);
1109
1221
FBL_Y__RESTORE_FBL_Y__MORE_OFFSET
1111
if ( fbl_y__current_buffer->fbl_y__buffer_status == FBL_Y__BUFFER_NEW )
1223
if ( FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__buffer_status == FBL_Y__BUFFER_NEW )
1113
1225
/* We're scanning a new file or input source. It's
1114
1226
* possible that this happened because the user
1115
1227
* just pointed fbl_y_in at a new source and called
1116
1228
* fbl_y_lex(). If so, then we have to assure
1117
* consistency between fbl_y__current_buffer and our
1229
* consistency between FBL_Y__CURRENT_BUFFER and our
1118
1230
* globals. Here is the right place to do so, because
1119
1231
* this is the first action (other than possibly a
1120
1232
* back-up) that will match for the new input source.
1122
fbl_y__n_chars = fbl_y__current_buffer->fbl_y__n_chars;
1123
fbl_y__current_buffer->fbl_y__input_file = fbl_y_in;
1124
fbl_y__current_buffer->fbl_y__buffer_status = FBL_Y__BUFFER_NORMAL;
1234
(fbl_y__n_chars) = FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__n_chars;
1235
FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__input_file = fbl_y_in;
1236
FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__buffer_status = FBL_Y__BUFFER_NORMAL;
1127
1239
/* Note that here we test for fbl_y__c_buf_p "<=" to the position
1195
if ( ! fbl_y__did_buffer_switch_on_eof )
1307
if ( ! (fbl_y__did_buffer_switch_on_eof) )
1196
1308
FBL_Y__NEW_FILE;
1201
1313
case EOB_ACT_CONTINUE_SCAN:
1203
fbl_y_text_ptr + fbl_y__amount_of_matched_text;
1205
fbl_y__current_state = fbl_y__get_previous_state();
1207
fbl_y__cp = fbl_y__c_buf_p;
1208
fbl_y__bp = fbl_y_text_ptr + FBL_Y__MORE_ADJ;
1315
(fbl_y_text_ptr) + fbl_y__amount_of_matched_text;
1317
fbl_y__current_state = fbl_y__get_previous_state( );
1319
fbl_y__cp = (fbl_y__c_buf_p);
1320
fbl_y__bp = (fbl_y_text_ptr) + FBL_Y__MORE_ADJ;
1209
1321
goto fbl_y__match;
1211
1323
case EOB_ACT_LAST_MATCH:
1213
&fbl_y__current_buffer->fbl_y__ch_buf[fbl_y__n_chars];
1215
fbl_y__current_state = fbl_y__get_previous_state();
1217
fbl_y__cp = fbl_y__c_buf_p;
1218
fbl_y__bp = fbl_y_text_ptr + FBL_Y__MORE_ADJ;
1325
&FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__ch_buf[(fbl_y__n_chars)];
1327
fbl_y__current_state = fbl_y__get_previous_state( );
1329
fbl_y__cp = (fbl_y__c_buf_p);
1330
fbl_y__bp = (fbl_y_text_ptr) + FBL_Y__MORE_ADJ;
1219
1331
goto fbl_y__find_action;
1236
1347
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1237
1348
* EOB_ACT_END_OF_FILE - end of file
1240
static int fbl_y__get_next_buffer()
1242
register char *dest = fbl_y__current_buffer->fbl_y__ch_buf;
1243
register char *source = fbl_y_text_ptr;
1350
static int fbl_y__get_next_buffer (void)
1352
register char *dest = FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__ch_buf;
1353
register char *source = (fbl_y_text_ptr);
1244
1354
register int number_to_move, i;
1247
if ( fbl_y__c_buf_p > &fbl_y__current_buffer->fbl_y__ch_buf[fbl_y__n_chars + 1] )
1357
if ( (fbl_y__c_buf_p) > &FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__ch_buf[(fbl_y__n_chars) + 1] )
1248
1358
FBL_Y__FATAL_ERROR(
1249
1359
"fatal flex scanner internal error--end of buffer missed" );
1251
if ( fbl_y__current_buffer->fbl_y__fill_buffer == 0 )
1361
if ( FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__fill_buffer == 0 )
1252
1362
{ /* Don't try to fill the buffer, so this is an EOF. */
1253
if ( fbl_y__c_buf_p - fbl_y_text_ptr - FBL_Y__MORE_ADJ == 1 )
1363
if ( (fbl_y__c_buf_p) - (fbl_y_text_ptr) - FBL_Y__MORE_ADJ == 1 )
1255
1365
/* We matched a single character, the EOB, so
1256
1366
* treat this as a final EOF.
1270
1380
/* Try to read more data. */
1272
1382
/* First move last chars to start of buffer. */
1273
number_to_move = (int) (fbl_y__c_buf_p - fbl_y_text_ptr) - 1;
1383
number_to_move = (int) ((fbl_y__c_buf_p) - (fbl_y_text_ptr)) - 1;
1275
1385
for ( i = 0; i < number_to_move; ++i )
1276
1386
*(dest++) = *(source++);
1278
if ( fbl_y__current_buffer->fbl_y__buffer_status == FBL_Y__BUFFER_EOF_PENDING )
1388
if ( FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__buffer_status == FBL_Y__BUFFER_EOF_PENDING )
1279
1389
/* don't do the read, it's not guaranteed to return an EOF,
1280
1390
* just force an EOF
1282
fbl_y__current_buffer->fbl_y__n_chars = fbl_y__n_chars = 0;
1392
FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__n_chars = (fbl_y__n_chars) = 0;
1287
fbl_y__current_buffer->fbl_y__buf_size - number_to_move - 1;
1397
FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__buf_size - number_to_move - 1;
1289
1399
while ( num_to_read <= 0 )
1290
1400
{ /* Not enough room in the buffer - grow it. */
1291
#ifdef FBL_Y__USES_REJECT
1293
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1296
1402
/* just a shorter name for the current buffer */
1297
FBL_Y__BUFFER_STATE b = fbl_y__current_buffer;
1403
FBL_Y__BUFFER_STATE b = FBL_Y__CURRENT_BUFFER;
1299
1405
int fbl_y__c_buf_p_offset =
1300
(int) (fbl_y__c_buf_p - b->fbl_y__ch_buf);
1406
(int) ((fbl_y__c_buf_p) - b->fbl_y__ch_buf);
1302
1408
if ( b->fbl_y__is_our_buffer )
1321
1426
FBL_Y__FATAL_ERROR(
1322
1427
"fatal error - scanner input buffer overflow" );
1324
fbl_y__c_buf_p = &b->fbl_y__ch_buf[fbl_y__c_buf_p_offset];
1429
(fbl_y__c_buf_p) = &b->fbl_y__ch_buf[fbl_y__c_buf_p_offset];
1326
num_to_read = fbl_y__current_buffer->fbl_y__buf_size -
1431
num_to_read = FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__buf_size -
1327
1432
number_to_move - 1;
1331
1436
if ( num_to_read > FBL_Y__READ_BUF_SIZE )
1332
1437
num_to_read = FBL_Y__READ_BUF_SIZE;
1334
1439
/* Read in more data. */
1335
FBL_Y__INPUT( (&fbl_y__current_buffer->fbl_y__ch_buf[number_to_move]),
1336
fbl_y__n_chars, num_to_read );
1440
FBL_Y__INPUT( (&FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__ch_buf[number_to_move]),
1441
(fbl_y__n_chars), (size_t) num_to_read );
1338
fbl_y__current_buffer->fbl_y__n_chars = fbl_y__n_chars;
1443
FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__n_chars = (fbl_y__n_chars);
1341
if ( fbl_y__n_chars == 0 )
1446
if ( (fbl_y__n_chars) == 0 )
1343
1448
if ( number_to_move == FBL_Y__MORE_ADJ )
1345
1450
ret_val = EOB_ACT_END_OF_FILE;
1346
fbl_y_restart( fbl_y_in );
1451
fbl_y_restart(fbl_y_in );
1351
1456
ret_val = EOB_ACT_LAST_MATCH;
1352
fbl_y__current_buffer->fbl_y__buffer_status =
1457
FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__buffer_status =
1353
1458
FBL_Y__BUFFER_EOF_PENDING;
1358
1463
ret_val = EOB_ACT_CONTINUE_SCAN;
1360
fbl_y__n_chars += number_to_move;
1361
fbl_y__current_buffer->fbl_y__ch_buf[fbl_y__n_chars] = FBL_Y__END_OF_BUFFER_CHAR;
1362
fbl_y__current_buffer->fbl_y__ch_buf[fbl_y__n_chars + 1] = FBL_Y__END_OF_BUFFER_CHAR;
1364
fbl_y_text_ptr = &fbl_y__current_buffer->fbl_y__ch_buf[0];
1465
if ((fbl_y__size_t) ((fbl_y__n_chars) + number_to_move) > FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__buf_size) {
1466
/* Extend the array by 50%, plus the number we really need. */
1467
fbl_y__size_t new_size = (fbl_y__n_chars) + number_to_move + ((fbl_y__n_chars) >> 1);
1468
FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__ch_buf = (char *) fbl_y_realloc((void *) FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__ch_buf,new_size );
1469
if ( ! FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__ch_buf )
1470
FBL_Y__FATAL_ERROR( "out of dynamic memory in fbl_y__get_next_buffer()" );
1473
(fbl_y__n_chars) += number_to_move;
1474
FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__ch_buf[(fbl_y__n_chars)] = FBL_Y__END_OF_BUFFER_CHAR;
1475
FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__ch_buf[(fbl_y__n_chars) + 1] = FBL_Y__END_OF_BUFFER_CHAR;
1477
(fbl_y_text_ptr) = &FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__ch_buf[0];
1366
1479
return ret_val;
1370
1482
/* fbl_y__get_previous_state - get the state just before the EOB char was reached */
1372
static fbl_y__state_type fbl_y__get_previous_state()
1484
static fbl_y__state_type fbl_y__get_previous_state (void)
1374
1486
register fbl_y__state_type fbl_y__current_state;
1375
1487
register char *fbl_y__cp;
1377
fbl_y__current_state = fbl_y__start;
1379
for ( fbl_y__cp = fbl_y_text_ptr + FBL_Y__MORE_ADJ; fbl_y__cp < fbl_y__c_buf_p; ++fbl_y__cp )
1489
fbl_y__current_state = (fbl_y__start);
1491
for ( fbl_y__cp = (fbl_y_text_ptr) + FBL_Y__MORE_ADJ; fbl_y__cp < (fbl_y__c_buf_p); ++fbl_y__cp )
1381
1493
register FBL_Y__CHAR fbl_y__c = (*fbl_y__cp ? fbl_y__ec[FBL_Y__SC_TO_UI(*fbl_y__cp)] : 1);
1382
1494
if ( fbl_y__accept[fbl_y__current_state] )
1384
fbl_y__last_accepting_state = fbl_y__current_state;
1385
fbl_y__last_accepting_cpos = fbl_y__cp;
1496
(fbl_y__last_accepting_state) = fbl_y__current_state;
1497
(fbl_y__last_accepting_cpos) = fbl_y__cp;
1387
1499
while ( fbl_y__chk[fbl_y__base[fbl_y__current_state] + fbl_y__c] != fbl_y__current_state )
1396
1508
return fbl_y__current_state;
1400
1511
/* fbl_y__try_NUL_trans - try to make a transition on the NUL character
1403
1514
* next_state = fbl_y__try_NUL_trans( current_state );
1406
#ifdef FBL_Y__USE_PROTOS
1407
static fbl_y__state_type fbl_y__try_NUL_trans( fbl_y__state_type fbl_y__current_state )
1409
static fbl_y__state_type fbl_y__try_NUL_trans( fbl_y__current_state )
1410
fbl_y__state_type fbl_y__current_state;
1516
static fbl_y__state_type fbl_y__try_NUL_trans (fbl_y__state_type fbl_y__current_state )
1413
1518
register int fbl_y__is_jam;
1414
register char *fbl_y__cp = fbl_y__c_buf_p;
1519
register char *fbl_y__cp = (fbl_y__c_buf_p);
1416
1521
register FBL_Y__CHAR fbl_y__c = 1;
1417
1522
if ( fbl_y__accept[fbl_y__current_state] )
1419
fbl_y__last_accepting_state = fbl_y__current_state;
1420
fbl_y__last_accepting_cpos = fbl_y__cp;
1524
(fbl_y__last_accepting_state) = fbl_y__current_state;
1525
(fbl_y__last_accepting_cpos) = fbl_y__cp;
1422
1527
while ( fbl_y__chk[fbl_y__base[fbl_y__current_state] + fbl_y__c] != fbl_y__current_state )
1429
1534
fbl_y__is_jam = (fbl_y__current_state == 104);
1431
1536
return fbl_y__is_jam ? 0 : fbl_y__current_state;
1435
#ifndef FBL_Y__NO_UNPUT
1436
#ifdef FBL_Y__USE_PROTOS
1437
static void fbl_y_unput( int c, register char *fbl_y__bp )
1439
static void fbl_y_unput( c, fbl_y__bp )
1441
register char *fbl_y__bp;
1444
register char *fbl_y__cp = fbl_y__c_buf_p;
1539
static void fbl_y_unput (int c, register char * fbl_y__bp )
1541
register char *fbl_y__cp;
1543
fbl_y__cp = (fbl_y__c_buf_p);
1446
1545
/* undo effects of setting up fbl_y_text */
1447
*fbl_y__cp = fbl_y__hold_char;
1546
*fbl_y__cp = (fbl_y__hold_char);
1449
if ( fbl_y__cp < fbl_y__current_buffer->fbl_y__ch_buf + 2 )
1548
if ( fbl_y__cp < FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__ch_buf + 2 )
1450
1549
{ /* need to shift things up to make room */
1451
1550
/* +2 for EOB chars. */
1452
register int number_to_move = fbl_y__n_chars + 2;
1453
register char *dest = &fbl_y__current_buffer->fbl_y__ch_buf[
1454
fbl_y__current_buffer->fbl_y__buf_size + 2];
1551
register int number_to_move = (fbl_y__n_chars) + 2;
1552
register char *dest = &FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__ch_buf[
1553
FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__buf_size + 2];
1455
1554
register char *source =
1456
&fbl_y__current_buffer->fbl_y__ch_buf[number_to_move];
1555
&FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__ch_buf[number_to_move];
1458
while ( source > fbl_y__current_buffer->fbl_y__ch_buf )
1557
while ( source > FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__ch_buf )
1459
1558
*--dest = *--source;
1461
1560
fbl_y__cp += (int) (dest - source);
1462
1561
fbl_y__bp += (int) (dest - source);
1463
fbl_y__current_buffer->fbl_y__n_chars =
1464
fbl_y__n_chars = fbl_y__current_buffer->fbl_y__buf_size;
1562
FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__n_chars =
1563
(fbl_y__n_chars) = FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__buf_size;
1466
if ( fbl_y__cp < fbl_y__current_buffer->fbl_y__ch_buf + 2 )
1565
if ( fbl_y__cp < FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__ch_buf + 2 )
1467
1566
FBL_Y__FATAL_ERROR( "flex scanner push-back overflow" );
1470
1569
*--fbl_y__cp = (char) c;
1473
fbl_y_text_ptr = fbl_y__bp;
1474
fbl_y__hold_char = *fbl_y__cp;
1475
fbl_y__c_buf_p = fbl_y__cp;
1477
#endif /* ifndef FBL_Y__NO_UNPUT */
1571
(fbl_y_text_ptr) = fbl_y__bp;
1572
(fbl_y__hold_char) = *fbl_y__cp;
1573
(fbl_y__c_buf_p) = fbl_y__cp;
1480
1576
#ifndef FBL_Y__NO_INPUT
1481
1577
#ifdef __cplusplus
1482
static int fbl_y_input()
1578
static int fbl_y_input (void)
1580
static int input (void)
1489
*fbl_y__c_buf_p = fbl_y__hold_char;
1491
if ( *fbl_y__c_buf_p == FBL_Y__END_OF_BUFFER_CHAR )
1586
*(fbl_y__c_buf_p) = (fbl_y__hold_char);
1588
if ( *(fbl_y__c_buf_p) == FBL_Y__END_OF_BUFFER_CHAR )
1493
1590
/* fbl_y__c_buf_p now points to the character we want to return.
1494
1591
* If this occurs *before* the EOB characters, then it's a
1495
1592
* valid NUL; if not, then we've hit the end of the buffer.
1497
if ( fbl_y__c_buf_p < &fbl_y__current_buffer->fbl_y__ch_buf[fbl_y__n_chars] )
1594
if ( (fbl_y__c_buf_p) < &FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__ch_buf[(fbl_y__n_chars)] )
1498
1595
/* This was really a NUL. */
1499
*fbl_y__c_buf_p = '\0';
1596
*(fbl_y__c_buf_p) = '\0';
1502
1599
{ /* need more input */
1503
int offset = fbl_y__c_buf_p - fbl_y_text_ptr;
1600
int offset = (fbl_y__c_buf_p) - (fbl_y_text_ptr);
1506
switch ( fbl_y__get_next_buffer() )
1603
switch ( fbl_y__get_next_buffer( ) )
1508
1605
case EOB_ACT_LAST_MATCH:
1509
1606
/* This happens because fbl_y__g_n_b()
1538
1635
case EOB_ACT_CONTINUE_SCAN:
1539
fbl_y__c_buf_p = fbl_y_text_ptr + offset;
1636
(fbl_y__c_buf_p) = (fbl_y_text_ptr) + offset;
1545
c = *(unsigned char *) fbl_y__c_buf_p; /* cast for 8-bit char's */
1546
*fbl_y__c_buf_p = '\0'; /* preserve fbl_y_text */
1547
fbl_y__hold_char = *++fbl_y__c_buf_p;
1642
c = *(unsigned char *) (fbl_y__c_buf_p); /* cast for 8-bit char's */
1643
*(fbl_y__c_buf_p) = '\0'; /* preserve fbl_y_text */
1644
(fbl_y__hold_char) = *++(fbl_y__c_buf_p);
1552
#endif /* FBL_Y__NO_INPUT */
1554
#ifdef FBL_Y__USE_PROTOS
1555
void fbl_y_restart( FILE *input_file )
1557
void fbl_y_restart( input_file )
1561
if ( ! fbl_y__current_buffer )
1562
fbl_y__current_buffer = fbl_y__create_buffer( fbl_y_in, FBL_Y__BUF_SIZE );
1564
fbl_y__init_buffer( fbl_y__current_buffer, input_file );
1565
fbl_y__load_buffer_state();
1569
#ifdef FBL_Y__USE_PROTOS
1570
void fbl_y__switch_to_buffer( FBL_Y__BUFFER_STATE new_buffer )
1572
void fbl_y__switch_to_buffer( new_buffer )
1573
FBL_Y__BUFFER_STATE new_buffer;
1576
if ( fbl_y__current_buffer == new_buffer )
1648
#endif /* ifndef FBL_Y__NO_INPUT */
1650
/** Immediately switch to a different input stream.
1651
* @param input_file A readable stream.
1653
* @note This function does not reset the start condition to @c INITIAL .
1655
void fbl_y_restart (FILE * input_file )
1658
if ( ! FBL_Y__CURRENT_BUFFER ){
1659
fbl_y_ensure_buffer_stack ();
1660
FBL_Y__CURRENT_BUFFER_LVALUE =
1661
fbl_y__create_buffer(fbl_y_in,FBL_Y__BUF_SIZE );
1664
fbl_y__init_buffer(FBL_Y__CURRENT_BUFFER,input_file );
1665
fbl_y__load_buffer_state( );
1668
/** Switch to a different input buffer.
1669
* @param new_buffer The new input buffer.
1672
void fbl_y__switch_to_buffer (FBL_Y__BUFFER_STATE new_buffer )
1675
/* TODO. We should be able to replace this entire function body
1677
* fbl_y_pop_buffer_state();
1678
* fbl_y_push_buffer_state(new_buffer);
1680
fbl_y_ensure_buffer_stack ();
1681
if ( FBL_Y__CURRENT_BUFFER == new_buffer )
1579
if ( fbl_y__current_buffer )
1684
if ( FBL_Y__CURRENT_BUFFER )
1581
1686
/* Flush out information for old buffer. */
1582
*fbl_y__c_buf_p = fbl_y__hold_char;
1583
fbl_y__current_buffer->fbl_y__buf_pos = fbl_y__c_buf_p;
1584
fbl_y__current_buffer->fbl_y__n_chars = fbl_y__n_chars;
1687
*(fbl_y__c_buf_p) = (fbl_y__hold_char);
1688
FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__buf_pos = (fbl_y__c_buf_p);
1689
FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__n_chars = (fbl_y__n_chars);
1587
fbl_y__current_buffer = new_buffer;
1588
fbl_y__load_buffer_state();
1692
FBL_Y__CURRENT_BUFFER_LVALUE = new_buffer;
1693
fbl_y__load_buffer_state( );
1590
1695
/* We don't actually know whether we did this switch during
1591
1696
* EOF (fbl_y_wrap()) processing, but the only time this flag
1592
1697
* is looked at is after fbl_y_wrap() is called, so it's safe
1593
1698
* to go ahead and always set it.
1595
fbl_y__did_buffer_switch_on_eof = 1;
1599
#ifdef FBL_Y__USE_PROTOS
1600
void fbl_y__load_buffer_state( void )
1602
void fbl_y__load_buffer_state()
1605
fbl_y__n_chars = fbl_y__current_buffer->fbl_y__n_chars;
1606
fbl_y_text_ptr = fbl_y__c_buf_p = fbl_y__current_buffer->fbl_y__buf_pos;
1607
fbl_y_in = fbl_y__current_buffer->fbl_y__input_file;
1608
fbl_y__hold_char = *fbl_y__c_buf_p;
1612
#ifdef FBL_Y__USE_PROTOS
1613
FBL_Y__BUFFER_STATE fbl_y__create_buffer( FILE *file, int size )
1615
FBL_Y__BUFFER_STATE fbl_y__create_buffer( file, size )
1700
(fbl_y__did_buffer_switch_on_eof) = 1;
1703
static void fbl_y__load_buffer_state (void)
1705
(fbl_y__n_chars) = FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__n_chars;
1706
(fbl_y_text_ptr) = (fbl_y__c_buf_p) = FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__buf_pos;
1707
fbl_y_in = FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__input_file;
1708
(fbl_y__hold_char) = *(fbl_y__c_buf_p);
1711
/** Allocate and initialize an input buffer state.
1712
* @param file A readable stream.
1713
* @param size The character buffer size in bytes. When in doubt, use @c FBL_Y__BUF_SIZE.
1715
* @return the allocated buffer state.
1717
FBL_Y__BUFFER_STATE fbl_y__create_buffer (FILE * file, int size )
1620
1719
FBL_Y__BUFFER_STATE b;
1622
b = (FBL_Y__BUFFER_STATE) fbl_y__flex_alloc( sizeof( struct fbl_y__buffer_state ) );
1721
b = (FBL_Y__BUFFER_STATE) fbl_y_alloc(sizeof( struct fbl_y__buffer_state ) );
1624
1723
FBL_Y__FATAL_ERROR( "out of dynamic memory in fbl_y__create_buffer()" );
1628
1727
/* fbl_y__ch_buf has to be 2 characters longer than the size given because
1629
1728
* we need to put in 2 end-of-buffer characters.
1631
b->fbl_y__ch_buf = (char *) fbl_y__flex_alloc( b->fbl_y__buf_size + 2 );
1730
b->fbl_y__ch_buf = (char *) fbl_y_alloc(b->fbl_y__buf_size + 2 );
1632
1731
if ( ! b->fbl_y__ch_buf )
1633
1732
FBL_Y__FATAL_ERROR( "out of dynamic memory in fbl_y__create_buffer()" );
1635
1734
b->fbl_y__is_our_buffer = 1;
1637
fbl_y__init_buffer( b, file );
1736
fbl_y__init_buffer(b,file );
1643
#ifdef FBL_Y__USE_PROTOS
1644
void fbl_y__delete_buffer( FBL_Y__BUFFER_STATE b )
1646
void fbl_y__delete_buffer( b )
1647
FBL_Y__BUFFER_STATE b;
1741
/** Destroy the buffer.
1742
* @param b a buffer created with fbl_y__create_buffer()
1745
void fbl_y__delete_buffer (FBL_Y__BUFFER_STATE b )
1653
if ( b == fbl_y__current_buffer )
1654
fbl_y__current_buffer = (FBL_Y__BUFFER_STATE) 0;
1751
if ( b == FBL_Y__CURRENT_BUFFER ) /* Not sure if we should pop here. */
1752
FBL_Y__CURRENT_BUFFER_LVALUE = (FBL_Y__BUFFER_STATE) 0;
1656
1754
if ( b->fbl_y__is_our_buffer )
1657
fbl_y__flex_free( (void *) b->fbl_y__ch_buf );
1659
fbl_y__flex_free( (void *) b );
1664
#ifdef FBL_Y__USE_PROTOS
1665
void fbl_y__init_buffer( FBL_Y__BUFFER_STATE b, FILE *file )
1667
void fbl_y__init_buffer( b, file )
1668
FBL_Y__BUFFER_STATE b;
1674
fbl_y__flush_buffer( b );
1755
fbl_y_free((void *) b->fbl_y__ch_buf );
1757
fbl_y_free((void *) b );
1761
extern int isatty (int );
1762
#endif /* __cplusplus */
1764
/* Initializes or reinitializes a buffer.
1765
* This function is sometimes called more than once on the same buffer,
1766
* such as during a fbl_y_restart() or at EOF.
1768
static void fbl_y__init_buffer (FBL_Y__BUFFER_STATE b, FILE * file )
1773
fbl_y__flush_buffer(b );
1676
1775
b->fbl_y__input_file = file;
1677
1776
b->fbl_y__fill_buffer = 1;
1679
#if FBL_Y__ALWAYS_INTERACTIVE
1680
b->fbl_y__is_interactive = 1;
1682
#if FBL_Y__NEVER_INTERACTIVE
1683
b->fbl_y__is_interactive = 0;
1685
b->fbl_y__is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1691
#ifdef FBL_Y__USE_PROTOS
1692
void fbl_y__flush_buffer( FBL_Y__BUFFER_STATE b )
1694
void fbl_y__flush_buffer( b )
1695
FBL_Y__BUFFER_STATE b;
1778
/* If b is the current buffer, then fbl_y__init_buffer was _probably_
1779
* called from fbl_y_restart() or through fbl_y__get_next_buffer.
1780
* In that case, we don't want to reset the lineno or column.
1782
if (b != FBL_Y__CURRENT_BUFFER){
1783
b->fbl_y__bs_lineno = 1;
1784
b->fbl_y__bs_column = 0;
1787
b->fbl_y__is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1792
/** Discard all buffered characters. On the next scan, FBL_Y__INPUT will be called.
1793
* @param b the buffer state to be flushed, usually @c FBL_Y__CURRENT_BUFFER.
1796
void fbl_y__flush_buffer (FBL_Y__BUFFER_STATE b )
1702
1801
b->fbl_y__n_chars = 0;
1713
1812
b->fbl_y__at_bol = 1;
1714
1813
b->fbl_y__buffer_status = FBL_Y__BUFFER_NEW;
1716
if ( b == fbl_y__current_buffer )
1717
fbl_y__load_buffer_state();
1721
#ifndef FBL_Y__NO_SCAN_BUFFER
1722
#ifdef FBL_Y__USE_PROTOS
1723
FBL_Y__BUFFER_STATE fbl_y__scan_buffer( char *base, fbl_y__size_t size )
1725
FBL_Y__BUFFER_STATE fbl_y__scan_buffer( base, size )
1815
if ( b == FBL_Y__CURRENT_BUFFER )
1816
fbl_y__load_buffer_state( );
1819
/** Pushes the new state onto the stack. The new state becomes
1820
* the current state. This function will allocate the stack
1822
* @param new_buffer The new state.
1825
void fbl_y_push_buffer_state (FBL_Y__BUFFER_STATE new_buffer )
1827
if (new_buffer == NULL)
1830
fbl_y_ensure_buffer_stack();
1832
/* This block is copied from fbl_y__switch_to_buffer. */
1833
if ( FBL_Y__CURRENT_BUFFER )
1835
/* Flush out information for old buffer. */
1836
*(fbl_y__c_buf_p) = (fbl_y__hold_char);
1837
FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__buf_pos = (fbl_y__c_buf_p);
1838
FBL_Y__CURRENT_BUFFER_LVALUE->fbl_y__n_chars = (fbl_y__n_chars);
1841
/* Only push if top exists. Otherwise, replace top. */
1842
if (FBL_Y__CURRENT_BUFFER)
1843
(fbl_y__buffer_stack_top)++;
1844
FBL_Y__CURRENT_BUFFER_LVALUE = new_buffer;
1846
/* copied from fbl_y__switch_to_buffer. */
1847
fbl_y__load_buffer_state( );
1848
(fbl_y__did_buffer_switch_on_eof) = 1;
1851
/** Removes and deletes the top of the stack, if present.
1852
* The next element becomes the new top.
1855
void fbl_y_pop_buffer_state (void)
1857
if (!FBL_Y__CURRENT_BUFFER)
1860
fbl_y__delete_buffer(FBL_Y__CURRENT_BUFFER );
1861
FBL_Y__CURRENT_BUFFER_LVALUE = NULL;
1862
if ((fbl_y__buffer_stack_top) > 0)
1863
--(fbl_y__buffer_stack_top);
1865
if (FBL_Y__CURRENT_BUFFER) {
1866
fbl_y__load_buffer_state( );
1867
(fbl_y__did_buffer_switch_on_eof) = 1;
1871
/* Allocates the stack if it does not exist.
1872
* Guarantees space for at least one push.
1874
static void fbl_y_ensure_buffer_stack (void)
1878
if (!(fbl_y__buffer_stack)) {
1880
/* First allocation is just for 2 elements, since we don't know if this
1881
* scanner will even need a stack. We use 2 instead of 1 to avoid an
1882
* immediate realloc on the next call.
1885
(fbl_y__buffer_stack) = (struct fbl_y__buffer_state**)fbl_y_alloc
1886
(num_to_alloc * sizeof(struct fbl_y__buffer_state*)
1888
if ( ! (fbl_y__buffer_stack) )
1889
FBL_Y__FATAL_ERROR( "out of dynamic memory in fbl_y_ensure_buffer_stack()" );
1891
memset((fbl_y__buffer_stack), 0, num_to_alloc * sizeof(struct fbl_y__buffer_state*));
1893
(fbl_y__buffer_stack_max) = num_to_alloc;
1894
(fbl_y__buffer_stack_top) = 0;
1898
if ((fbl_y__buffer_stack_top) >= ((fbl_y__buffer_stack_max)) - 1){
1900
/* Increase the buffer to prepare for a possible push. */
1901
int grow_size = 8 /* arbitrary grow size */;
1903
num_to_alloc = (fbl_y__buffer_stack_max) + grow_size;
1904
(fbl_y__buffer_stack) = (struct fbl_y__buffer_state**)fbl_y_realloc
1905
((fbl_y__buffer_stack),
1906
num_to_alloc * sizeof(struct fbl_y__buffer_state*)
1908
if ( ! (fbl_y__buffer_stack) )
1909
FBL_Y__FATAL_ERROR( "out of dynamic memory in fbl_y_ensure_buffer_stack()" );
1911
/* zero only the new slots.*/
1912
memset((fbl_y__buffer_stack) + (fbl_y__buffer_stack_max), 0, grow_size * sizeof(struct fbl_y__buffer_state*));
1913
(fbl_y__buffer_stack_max) = num_to_alloc;
1917
/** Setup the input buffer state to scan directly from a user-specified character buffer.
1918
* @param base the character buffer
1919
* @param size the size in bytes of the character buffer
1921
* @return the newly allocated buffer state object.
1923
FBL_Y__BUFFER_STATE fbl_y__scan_buffer (char * base, fbl_y__size_t size )
1730
1925
FBL_Y__BUFFER_STATE b;
1732
1927
if ( size < 2 ||
1733
1928
base[size-2] != FBL_Y__END_OF_BUFFER_CHAR ||
1734
1929
base[size-1] != FBL_Y__END_OF_BUFFER_CHAR )
1735
1930
/* They forgot to leave room for the EOB's. */
1738
b = (FBL_Y__BUFFER_STATE) fbl_y__flex_alloc( sizeof( struct fbl_y__buffer_state ) );
1933
b = (FBL_Y__BUFFER_STATE) fbl_y_alloc(sizeof( struct fbl_y__buffer_state ) );
1740
1935
FBL_Y__FATAL_ERROR( "out of dynamic memory in fbl_y__scan_buffer()" );
1749
1944
b->fbl_y__fill_buffer = 0;
1750
1945
b->fbl_y__buffer_status = FBL_Y__BUFFER_NEW;
1752
fbl_y__switch_to_buffer( b );
1947
fbl_y__switch_to_buffer(b );
1759
#ifndef FBL_Y__NO_SCAN_STRING
1760
#ifdef FBL_Y__USE_PROTOS
1761
FBL_Y__BUFFER_STATE fbl_y__scan_string( fbl_y_const char *fbl_y__str )
1763
FBL_Y__BUFFER_STATE fbl_y__scan_string( fbl_y__str )
1764
fbl_y_const char *fbl_y__str;
1768
for ( len = 0; fbl_y__str[len]; ++len )
1771
return fbl_y__scan_bytes( fbl_y__str, len );
1776
#ifndef FBL_Y__NO_SCAN_BYTES
1777
#ifdef FBL_Y__USE_PROTOS
1778
FBL_Y__BUFFER_STATE fbl_y__scan_bytes( fbl_y_const char *bytes, int len )
1780
FBL_Y__BUFFER_STATE fbl_y__scan_bytes( bytes, len )
1781
fbl_y_const char *bytes;
1952
/** Setup the input buffer state to scan a string. The next call to fbl_y_lex() will
1953
* scan from a @e copy of @a str.
1954
* @param fbl_y_str a NUL-terminated string to scan
1956
* @return the newly allocated buffer state object.
1957
* @note If you want to scan bytes that may contain NUL values, then use
1958
* fbl_y__scan_bytes() instead.
1960
FBL_Y__BUFFER_STATE fbl_y__scan_string (fbl_y_const char * fbl_y_str )
1963
return fbl_y__scan_bytes(fbl_y_str,strlen(fbl_y_str) );
1966
/** Setup the input buffer state to scan the given bytes. The next call to fbl_y_lex() will
1967
* scan from a @e copy of @a bytes.
1968
* @param bytes the byte buffer to scan
1969
* @param len the number of bytes in the buffer pointed to by @a bytes.
1971
* @return the newly allocated buffer state object.
1973
FBL_Y__BUFFER_STATE fbl_y__scan_bytes (fbl_y_const char * fbl_y_bytes, int _fbl_y_bytes_len )
1785
1975
FBL_Y__BUFFER_STATE b;
1787
1977
fbl_y__size_t n;
1790
1980
/* Get memory for full buffer, including space for trailing EOB's. */
1792
buf = (char *) fbl_y__flex_alloc( n );
1981
n = _fbl_y_bytes_len + 2;
1982
buf = (char *) fbl_y_alloc(n );
1794
1984
FBL_Y__FATAL_ERROR( "out of dynamic memory in fbl_y__scan_bytes()" );
1796
for ( i = 0; i < len; ++i )
1799
buf[len] = buf[len+1] = FBL_Y__END_OF_BUFFER_CHAR;
1801
b = fbl_y__scan_buffer( buf, n );
1986
for ( i = 0; i < _fbl_y_bytes_len; ++i )
1987
buf[i] = fbl_y_bytes[i];
1989
buf[_fbl_y_bytes_len] = buf[_fbl_y_bytes_len+1] = FBL_Y__END_OF_BUFFER_CHAR;
1991
b = fbl_y__scan_buffer(buf,n );
1803
1993
FBL_Y__FATAL_ERROR( "bad buffer in fbl_y__scan_bytes()" );
1808
1998
b->fbl_y__is_our_buffer = 1;
1815
#ifndef FBL_Y__NO_PUSH_STATE
1816
#ifdef FBL_Y__USE_PROTOS
1817
static void fbl_y__push_state( int new_state )
1819
static void fbl_y__push_state( new_state )
1823
if ( fbl_y__start_stack_ptr >= fbl_y__start_stack_depth )
1825
fbl_y__size_t new_size;
1827
fbl_y__start_stack_depth += FBL_Y__START_STACK_INCR;
1828
new_size = fbl_y__start_stack_depth * sizeof( int );
1830
if ( ! fbl_y__start_stack )
1831
fbl_y__start_stack = (int *) fbl_y__flex_alloc( new_size );
1834
fbl_y__start_stack = (int *) fbl_y__flex_realloc(
1835
(void *) fbl_y__start_stack, new_size );
1837
if ( ! fbl_y__start_stack )
1839
"out of memory expanding start-condition stack" );
1842
fbl_y__start_stack[fbl_y__start_stack_ptr++] = FBL_Y__START;
1849
#ifndef FBL_Y__NO_POP_STATE
1850
static void fbl_y__pop_state()
1852
if ( --fbl_y__start_stack_ptr < 0 )
1853
FBL_Y__FATAL_ERROR( "start-condition stack underflow" );
1855
BEGIN(fbl_y__start_stack[fbl_y__start_stack_ptr]);
1860
#ifndef FBL_Y__NO_TOP_STATE
1861
static int fbl_y__top_state()
1863
return fbl_y__start_stack[fbl_y__start_stack_ptr - 1];
1867
2003
#ifndef FBL_Y__EXIT_FAILURE
1868
2004
#define FBL_Y__EXIT_FAILURE 2
1871
#ifdef FBL_Y__USE_PROTOS
1872
static void fbl_y__fatal_error( fbl_y_const char msg[] )
1874
static void fbl_y__fatal_error( msg )
1878
(void) fprintf( stderr, "%s\n", msg );
2007
static void fbl_y__fatal_error (fbl_y_const char* msg )
2009
(void) fprintf( stderr, "%s\n", msg );
1879
2010
exit( FBL_Y__EXIT_FAILURE );
1884
2013
/* Redefine fbl_y_less() so it works in section 3 code. */
1890
2019
/* Undo effects of setting up fbl_y_text. */ \
1891
fbl_y_text[fbl_y_leng] = fbl_y__hold_char; \
1892
fbl_y__c_buf_p = fbl_y_text + n; \
1893
fbl_y__hold_char = *fbl_y__c_buf_p; \
1894
*fbl_y__c_buf_p = '\0'; \
2020
int fbl_y_less_macro_arg = (n); \
2021
FBL_Y__LESS_LINENO(fbl_y_less_macro_arg);\
2022
fbl_y_text[fbl_y_leng] = (fbl_y__hold_char); \
2023
(fbl_y__c_buf_p) = fbl_y_text + fbl_y_less_macro_arg; \
2024
(fbl_y__hold_char) = *(fbl_y__c_buf_p); \
2025
*(fbl_y__c_buf_p) = '\0'; \
2026
fbl_y_leng = fbl_y_less_macro_arg; \
1900
/* Internal utility routines. */
1902
#ifndef fbl_y_text_ptr
1903
#ifdef FBL_Y__USE_PROTOS
1904
static void fbl_y__flex_strncpy( char *s1, fbl_y_const char *s2, int n )
2030
/* Accessor methods (get/set functions) to struct members. */
2032
/** Get the current line number.
2035
int fbl_y_get_lineno (void)
2038
return fbl_y_lineno;
2041
/** Get the input stream.
2044
FILE *fbl_y_get_in (void)
2049
/** Get the output stream.
2052
FILE *fbl_y_get_out (void)
2057
/** Get the length of the current token.
2060
int fbl_y_get_leng (void)
2065
/** Get the current token.
2069
char *fbl_y_get_text (void)
2074
/** Set the current line number.
2075
* @param line_number
2078
void fbl_y_set_lineno (int line_number )
2081
fbl_y_lineno = line_number;
2084
/** Set the input stream. This does not discard the current
2086
* @param in_str A readable stream.
2088
* @see fbl_y__switch_to_buffer
2090
void fbl_y_set_in (FILE * in_str )
2095
void fbl_y_set_out (FILE * out_str )
2097
fbl_y_out = out_str ;
2100
int fbl_y_get_debug (void)
2102
return fbl_y__flex_debug;
2105
void fbl_y_set_debug (int bdebug )
2107
fbl_y__flex_debug = bdebug ;
2110
static int fbl_y__init_globals (void)
2112
/* Initialization is the same as for the non-reentrant scanner.
2113
* This function is called from fbl_y_lex_destroy(), so don't allocate here.
2116
(fbl_y__buffer_stack) = 0;
2117
(fbl_y__buffer_stack_top) = 0;
2118
(fbl_y__buffer_stack_max) = 0;
2119
(fbl_y__c_buf_p) = (char *) 0;
2123
/* Defined in main.c */
2124
#ifdef FBL_Y__STDINIT
1906
static void fbl_y__flex_strncpy( s1, s2, n )
1908
fbl_y_const char *s2;
2128
fbl_y_in = (FILE *) 0;
2129
fbl_y_out = (FILE *) 0;
2132
/* For future reference: Set errno on error, since we are called by
2138
/* fbl_y_lex_destroy is for both reentrant and non-reentrant scanners. */
2139
int fbl_y_lex_destroy (void)
2142
/* Pop the buffer stack, destroying each element. */
2143
while(FBL_Y__CURRENT_BUFFER){
2144
fbl_y__delete_buffer(FBL_Y__CURRENT_BUFFER );
2145
FBL_Y__CURRENT_BUFFER_LVALUE = NULL;
2146
fbl_y_pop_buffer_state();
2149
/* Destroy the stack itself. */
2150
fbl_y_free((fbl_y__buffer_stack) );
2151
(fbl_y__buffer_stack) = NULL;
2153
/* Reset the globals. This is important in a non-reentrant scanner so the next time
2154
* fbl_y_lex() is called, initialization will occur. */
2155
fbl_y__init_globals( );
2161
* Internal utility routines.
2164
#ifndef fbl_y_text_ptr
2165
static void fbl_y__flex_strncpy (char* s1, fbl_y_const char * s2, int n )
1912
2167
register int i;
1913
2168
for ( i = 0; i < n; ++i )
1918
2173
#ifdef FBL_Y__NEED_STRLEN
1919
#ifdef FBL_Y__USE_PROTOS
1920
static int fbl_y__flex_strlen( fbl_y_const char *s )
1922
static int fbl_y__flex_strlen( s )
1923
fbl_y_const char *s;
2174
static int fbl_y__flex_strlen (fbl_y_const char * s )
1926
2176
register int n;
1927
2177
for ( n = 0; s[n]; ++n )
1935
#ifdef FBL_Y__USE_PROTOS
1936
static void *fbl_y__flex_alloc( fbl_y__size_t size )
1938
static void *fbl_y__flex_alloc( size )
2184
void *fbl_y_alloc (fbl_y__size_t size )
1942
2186
return (void *) malloc( size );
1945
#ifdef FBL_Y__USE_PROTOS
1946
static void *fbl_y__flex_realloc( void *ptr, fbl_y__size_t size )
1948
static void *fbl_y__flex_realloc( ptr, size )
2189
void *fbl_y_realloc (void * ptr, fbl_y__size_t size )
1953
2191
/* The cast to (char *) in the following accommodates both
1954
2192
* implementations that use char* generic pointers, and those
1955
2193
* that use void* generic pointers. It works with the latter