1
#define yy_create_buffer csim__create_buffer
2
#define yy_delete_buffer csim__delete_buffer
3
#define yy_scan_buffer csim__scan_buffer
4
#define yy_scan_string csim__scan_string
5
#define yy_scan_bytes csim__scan_bytes
6
#define yy_flex_debug csim__flex_debug
7
#define yy_init_buffer csim__init_buffer
8
#define yy_flush_buffer csim__flush_buffer
9
#define yy_load_buffer_state csim__load_buffer_state
10
#define yy_switch_to_buffer csim__switch_to_buffer
12
#define yyleng csim_leng
13
#define yylex csim_lex
14
#define yyout csim_out
15
#define yyrestart csim_restart
16
#define yytext csim_text
4
#define YY_INT_ALIGNED short int
18
6
/* A lexical scanner generated by flex */
20
/* Scanner skeleton version:
21
* $Header: /cvs/gnome/gimp/plug-ins/imagemap/imap_csim_lex.c,v 1.8 2003/12/26 20:30:36 neo Exp $
24
8
#define FLEX_SCANNER
25
9
#define YY_FLEX_MAJOR_VERSION 2
26
10
#define YY_FLEX_MINOR_VERSION 5
11
#define YY_FLEX_SUBMINOR_VERSION 33
12
#if YY_FLEX_SUBMINOR_VERSION > 0
16
/* First, we deal with platform-specific or compiler-specific issues. */
18
/* begin standard C headers. */
34
#define isatty(h) _isatty(h)
37
/* 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 __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 */
49
/* Use prototypes in function declarations. */
52
91
/* The "const" storage-class-modifier is valid. */
53
92
#define YY_USE_CONST
98
120
* but we do it the disgusting crufty way forced on us by the ()-less
99
121
* definition of BEGIN.
101
#define BEGIN yy_start = 1 + 2 *
123
#define BEGIN (yy_start) = 1 + 2 *
103
125
/* Translate the current start state into a value that can be later handed
104
126
* to BEGIN to return to the state. The YYSTATE alias is for lex
107
#define YY_START ((yy_start - 1) / 2)
129
#define YY_START (((yy_start) - 1) / 2)
108
130
#define YYSTATE YY_START
110
132
/* Action number for EOF rule of a given start state. */
111
133
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
113
135
/* Special action meaning "start processing a new file". */
114
#define YY_NEW_FILE yyrestart( yyin )
136
#define YY_NEW_FILE csim_restart(csim_in )
116
138
#define YY_END_OF_BUFFER_CHAR 0
118
140
/* Size of default input buffer. */
119
142
#define YY_BUF_SIZE 16384
145
/* The state buf must be large enough to hold one state per character in the main buffer.
147
#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
149
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
150
#define YY_TYPEDEF_YY_BUFFER_STATE
121
151
typedef struct yy_buffer_state *YY_BUFFER_STATE;
124
extern FILE *yyin, *yyout;
154
extern int csim_leng;
156
extern FILE *csim_in, *csim_out;
126
158
#define EOB_ACT_CONTINUE_SCAN 0
127
159
#define EOB_ACT_END_OF_FILE 1
128
160
#define EOB_ACT_LAST_MATCH 2
130
/* The funky do-while in the following #define is used to turn the definition
131
* int a single C statement (which needs a semi-colon terminator). This
132
* avoids problems with code like:
134
* if ( condition_holds )
137
* do_something_else();
139
* Prior to using the do-while the compiler would get upset at the
140
* "else" because it interpreted the "if" statement as being all
141
* done when it reached the ';' after the yyless() call.
144
/* Return all but the first 'n' matched characters back to the input stream. */
162
#define YY_LESS_LINENO(n)
164
/* Return all but the first "n" matched characters back to the input stream. */
146
165
#define yyless(n) \
149
/* Undo effects of setting up yytext. */ \
150
*yy_cp = yy_hold_char; \
168
/* Undo effects of setting up csim_text. */ \
169
int yyless_macro_arg = (n); \
170
YY_LESS_LINENO(yyless_macro_arg);\
171
*yy_cp = (yy_hold_char); \
151
172
YY_RESTORE_YY_MORE_OFFSET \
152
yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
153
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
173
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
174
YY_DO_BEFORE_ACTION; /* set up csim_text again */ \
157
#define unput(c) yyunput( c, yytext_ptr )
178
#define unput(c) yyunput( c, (yytext_ptr) )
159
180
/* The following is because we cannot portably get our hands on size_t
160
181
* (without autoconf's help, which isn't available because we want
161
182
* flex-generated scanners to compile on their own).
185
#ifndef YY_TYPEDEF_YY_SIZE_T
186
#define YY_TYPEDEF_YY_SIZE_T
163
187
typedef unsigned int yy_size_t;
190
#ifndef YY_STRUCT_YY_BUFFER_STATE
191
#define YY_STRUCT_YY_BUFFER_STATE
166
192
struct yy_buffer_state
168
194
FILE *yy_input_file;
214
244
* possible backing-up.
216
246
* When we actually see the EOF, we change the status to "new"
217
* (via yyrestart()), so that the user can continue scanning by
218
* just pointing yyin at a new input file.
247
* (via csim_restart()), so that the user can continue scanning by
248
* just pointing csim_in at a new input file.
220
250
#define YY_BUFFER_EOF_PENDING 2
253
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
223
static YY_BUFFER_STATE yy_current_buffer = 0;
255
/* Stack of input buffers. */
256
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
257
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
258
static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
225
260
/* We provide macros for accessing buffer states in case in the
226
261
* future we want to put the buffer states in a more general
227
262
* "scanner state".
229
#define YY_CURRENT_BUFFER yy_current_buffer
232
/* yy_hold_char holds the character lost when yytext is formed. */
264
* Returns the top of the stack, or NULL.
266
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
267
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
270
/* Same as previous macro, but useful when we know that the buffer stack is not
271
* NULL or when we need an lvalue. For internal use only.
273
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
275
/* yy_hold_char holds the character lost when csim_text is formed. */
233
276
static char yy_hold_char;
235
277
static int yy_n_chars; /* number of characters read into yy_ch_buf */
240
280
/* Points to current character in buffer. */
241
281
static char *yy_c_buf_p = (char *) 0;
242
static int yy_init = 1; /* whether we need to initialize */
282
static int yy_init = 0; /* whether we need to initialize */
243
283
static int yy_start = 0; /* start state number */
245
/* Flag which is used to allow yywrap()'s to do buffer switches
246
* instead of setting up a fresh yyin. A bit of a hack ...
285
/* Flag which is used to allow csim_wrap()'s to do buffer switches
286
* instead of setting up a fresh csim_in. A bit of a hack ...
248
288
static int yy_did_buffer_switch_on_eof;
250
void yyrestart YY_PROTO(( FILE *input_file ));
252
void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
253
void yy_load_buffer_state YY_PROTO(( void ));
254
YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
255
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
256
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
257
void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
258
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
260
YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
261
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
262
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
264
static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
265
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
266
static void yy_flex_free YY_PROTO(( void * ));
268
#define yy_new_buffer yy_create_buffer
290
void csim_restart (FILE *input_file );
291
void csim__switch_to_buffer (YY_BUFFER_STATE new_buffer );
292
YY_BUFFER_STATE csim__create_buffer (FILE *file,int size );
293
void csim__delete_buffer (YY_BUFFER_STATE b );
294
void csim__flush_buffer (YY_BUFFER_STATE b );
295
void csim_push_buffer_state (YY_BUFFER_STATE new_buffer );
296
void csim_pop_buffer_state (void );
298
static void csim_ensure_buffer_stack (void );
299
static void csim__load_buffer_state (void );
300
static void csim__init_buffer (YY_BUFFER_STATE b,FILE *file );
302
#define YY_FLUSH_BUFFER csim__flush_buffer(YY_CURRENT_BUFFER )
304
YY_BUFFER_STATE csim__scan_buffer (char *base,yy_size_t size );
305
YY_BUFFER_STATE csim__scan_string (yyconst char *yy_str );
306
YY_BUFFER_STATE csim__scan_bytes (yyconst char *bytes,int len );
308
void *csim_alloc (yy_size_t );
309
void *csim_realloc (void *,yy_size_t );
310
void csim_free (void * );
312
#define yy_new_buffer csim__create_buffer
270
314
#define yy_set_interactive(is_interactive) \
272
if ( ! yy_current_buffer ) \
273
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
274
yy_current_buffer->yy_is_interactive = is_interactive; \
316
if ( ! YY_CURRENT_BUFFER ){ \
317
csim_ensure_buffer_stack (); \
318
YY_CURRENT_BUFFER_LVALUE = \
319
csim__create_buffer(csim_in,YY_BUF_SIZE ); \
321
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
277
324
#define yy_set_bol(at_bol) \
279
if ( ! yy_current_buffer ) \
280
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
281
yy_current_buffer->yy_at_bol = at_bol; \
326
if ( ! YY_CURRENT_BUFFER ){\
327
csim_ensure_buffer_stack (); \
328
YY_CURRENT_BUFFER_LVALUE = \
329
csim__create_buffer(csim_in,YY_BUF_SIZE ); \
331
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
284
#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
334
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
336
/* Begin user sect3 */
338
#define csim_wrap() 1
288
339
#define YY_SKIP_YYWRAP
289
341
typedef unsigned char YY_CHAR;
290
FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
343
FILE *csim_in = (FILE *) 0, *csim_out = (FILE *) 0;
291
345
typedef int yy_state_type;
293
#define yytext_ptr yytext
295
static yy_state_type yy_get_previous_state YY_PROTO(( void ));
296
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
297
static int yy_get_next_buffer YY_PROTO(( void ));
298
static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
347
extern int csim_lineno;
351
extern char *csim_text;
352
#define yytext_ptr csim_text
354
static yy_state_type yy_get_previous_state (void );
355
static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
356
static int yy_get_next_buffer (void );
357
static void yy_fatal_error (yyconst char msg[] );
300
359
/* Done after the current pattern has been matched and before the
301
* corresponding action - sets up yytext.
360
* corresponding action - sets up csim_text.
303
362
#define YY_DO_BEFORE_ACTION \
304
yytext_ptr = yy_bp; \
305
yyleng = (int) (yy_cp - yy_bp); \
306
yy_hold_char = *yy_cp; \
363
(yytext_ptr) = yy_bp; \
364
csim_leng = (size_t) (yy_cp - yy_bp); \
365
(yy_hold_char) = *yy_cp; \
367
(yy_c_buf_p) = yy_cp;
310
369
#define YY_NUM_RULES 32
311
370
#define YY_END_OF_BUFFER 33
312
static yyconst short int yy_accept[154] =
371
/* This struct is not used in this scanner,
372
but its presence is necessary. */
375
flex_int32_t yy_verify;
378
static yyconst flex_int16_t yy_accept[154] =
314
380
29, 29, 28, 28, 0, 0, 33, 31, 30, 30,
315
381
26, 29, 29, 31, 29, 31, 31, 31, 31, 29,
529
616
#ifndef YY_SKIP_YYWRAP
530
617
#ifdef __cplusplus
531
extern "C" int yywrap YY_PROTO(( void ));
618
extern "C" int csim_wrap (void );
533
extern int yywrap YY_PROTO(( void ));
538
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
620
extern int csim_wrap (void );
624
static void yyunput (int c,char *buf_ptr );
541
626
#ifndef yytext_ptr
542
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
627
static void yy_flex_strncpy (char *,yyconst char *,int );
545
630
#ifdef YY_NEED_STRLEN
546
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
631
static int yy_flex_strlen (yyconst char * );
549
634
#ifndef YY_NO_INPUT
550
636
#ifdef __cplusplus
551
static int yyinput YY_PROTO(( void ));
553
static int input YY_PROTO(( void ));
558
static int yy_start_stack_ptr = 0;
559
static int yy_start_stack_depth = 0;
560
static int *yy_start_stack = 0;
561
#ifndef YY_NO_PUSH_STATE
562
static void yy_push_state YY_PROTO(( int new_state ));
564
#ifndef YY_NO_POP_STATE
565
static void yy_pop_state YY_PROTO(( void ));
567
#ifndef YY_NO_TOP_STATE
568
static int yy_top_state YY_PROTO(( void ));
572
#define YY_NO_PUSH_STATE 1
573
#define YY_NO_POP_STATE 1
574
#define YY_NO_TOP_STATE 1
577
#ifdef YY_MALLOC_DECL
585
/* Just try to get by without declaring the routines. This will fail
586
* miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
587
* or sizeof(void*) != sizeof(int).
637
static int yyinput (void );
639
static int input (void );
592
644
/* Amount of stuff to slurp up with each read. */
665
736
#define YY_RULE_SETUP \
739
/** The main scanner function which does all the work.
670
743
register yy_state_type yy_current_state;
671
744
register char *yy_cp, *yy_bp;
672
745
register int yy_act;
674
#line 44 "imap_csim.l"
747
#line 46 "imap_csim.l"
682
756
#ifdef YY_USER_INIT
687
yy_start = 1; /* first start state */
695
if ( ! yy_current_buffer )
697
yy_create_buffer( yyin, YY_BUF_SIZE );
699
yy_load_buffer_state();
761
(yy_start) = 1; /* first start state */
769
if ( ! YY_CURRENT_BUFFER ) {
770
csim_ensure_buffer_stack ();
771
YY_CURRENT_BUFFER_LVALUE =
772
csim__create_buffer(csim_in,YY_BUF_SIZE );
775
csim__load_buffer_state( );
702
778
while ( 1 ) /* loops until end-of-file is reached */
780
yy_cp = (yy_c_buf_p);
706
/* Support of yytext. */
707
*yy_cp = yy_hold_char;
782
/* Support of csim_text. */
783
*yy_cp = (yy_hold_char);
709
785
/* yy_bp points to the position in yy_ch_buf of the start of
710
786
* the current run.
714
yy_current_state = yy_start;
790
yy_current_state = (yy_start);
718
794
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
719
795
if ( yy_accept[yy_current_state] )
721
yy_last_accepting_state = yy_current_state;
722
yy_last_accepting_cpos = yy_cp;
797
(yy_last_accepting_state) = yy_current_state;
798
(yy_last_accepting_cpos) = yy_cp;
724
800
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
952
1029
case YY_END_OF_BUFFER:
954
1031
/* Amount of text matched not including the EOB char. */
955
int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1032
int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
957
1034
/* Undo the effects of YY_DO_BEFORE_ACTION. */
958
*yy_cp = yy_hold_char;
1035
*yy_cp = (yy_hold_char);
959
1036
YY_RESTORE_YY_MORE_OFFSET
961
if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1038
if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
963
1040
/* We're scanning a new file or input source. It's
964
1041
* possible that this happened because the user
965
* just pointed yyin at a new source and called
966
* yylex(). If so, then we have to assure
967
* consistency between yy_current_buffer and our
1042
* just pointed csim_in at a new source and called
1043
* csim_lex(). If so, then we have to assure
1044
* consistency between YY_CURRENT_BUFFER and our
968
1045
* globals. Here is the right place to do so, because
969
1046
* this is the first action (other than possibly a
970
1047
* back-up) that will match for the new input source.
972
yy_n_chars = yy_current_buffer->yy_n_chars;
973
yy_current_buffer->yy_input_file = yyin;
974
yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1049
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1050
YY_CURRENT_BUFFER_LVALUE->yy_input_file = csim_in;
1051
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
977
1054
/* Note that here we test for yy_c_buf_p "<=" to the position
1208
1278
ret_val = EOB_ACT_CONTINUE_SCAN;
1210
yy_n_chars += number_to_move;
1211
yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1212
yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1280
(yy_n_chars) += number_to_move;
1281
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
1282
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
1214
yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1284
(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1216
1286
return ret_val;
1220
1289
/* yy_get_previous_state - get the state just before the EOB char was reached */
1222
static yy_state_type yy_get_previous_state()
1291
static yy_state_type yy_get_previous_state (void)
1224
1293
register yy_state_type yy_current_state;
1225
1294
register char *yy_cp;
1227
yy_current_state = yy_start;
1229
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1296
yy_current_state = (yy_start);
1298
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
1231
1300
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1232
1301
if ( yy_accept[yy_current_state] )
1234
yy_last_accepting_state = yy_current_state;
1235
yy_last_accepting_cpos = yy_cp;
1303
(yy_last_accepting_state) = yy_current_state;
1304
(yy_last_accepting_cpos) = yy_cp;
1237
1306
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1279
1341
yy_is_jam = (yy_current_state == 153);
1281
1343
return yy_is_jam ? 0 : yy_current_state;
1286
#ifdef YY_USE_PROTOS
1287
static void yyunput( int c, register char *yy_bp )
1289
static void yyunput( c, yy_bp )
1291
register char *yy_bp;
1294
register char *yy_cp = yy_c_buf_p;
1296
/* undo effects of setting up yytext */
1297
*yy_cp = yy_hold_char;
1299
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1346
static void yyunput (int c, register char * yy_bp )
1348
register char *yy_cp;
1350
yy_cp = (yy_c_buf_p);
1352
/* undo effects of setting up csim_text */
1353
*yy_cp = (yy_hold_char);
1355
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1300
1356
{ /* need to shift things up to make room */
1301
1357
/* +2 for EOB chars. */
1302
register int number_to_move = yy_n_chars + 2;
1303
register char *dest = &yy_current_buffer->yy_ch_buf[
1304
yy_current_buffer->yy_buf_size + 2];
1358
register int number_to_move = (yy_n_chars) + 2;
1359
register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1360
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1305
1361
register char *source =
1306
&yy_current_buffer->yy_ch_buf[number_to_move];
1362
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1308
while ( source > yy_current_buffer->yy_ch_buf )
1364
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1309
1365
*--dest = *--source;
1311
1367
yy_cp += (int) (dest - source);
1312
1368
yy_bp += (int) (dest - source);
1313
yy_current_buffer->yy_n_chars =
1314
yy_n_chars = yy_current_buffer->yy_buf_size;
1369
YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1370
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1316
if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1372
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1317
1373
YY_FATAL_ERROR( "flex scanner push-back overflow" );
1320
1376
*--yy_cp = (char) c;
1324
yy_hold_char = *yy_cp;
1327
#endif /* ifndef YY_NO_UNPUT */
1378
(yytext_ptr) = yy_bp;
1379
(yy_hold_char) = *yy_cp;
1380
(yy_c_buf_p) = yy_cp;
1330
1384
#ifdef __cplusplus
1331
static int yyinput()
1385
static int yyinput (void)
1387
static int input (void)
1338
*yy_c_buf_p = yy_hold_char;
1340
if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1393
*(yy_c_buf_p) = (yy_hold_char);
1395
if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1342
1397
/* yy_c_buf_p now points to the character we want to return.
1343
1398
* If this occurs *before* the EOB characters, then it's a
1344
1399
* valid NUL; if not, then we've hit the end of the buffer.
1346
if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1401
if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1347
1402
/* This was really a NUL. */
1403
*(yy_c_buf_p) = '\0';
1351
1406
{ /* need more input */
1352
int offset = yy_c_buf_p - yytext_ptr;
1407
int offset = (yy_c_buf_p) - (yytext_ptr);
1355
switch ( yy_get_next_buffer() )
1410
switch ( yy_get_next_buffer( ) )
1357
1412
case EOB_ACT_LAST_MATCH:
1358
1413
/* This happens because yy_g_n_b()
1387
1442
case EOB_ACT_CONTINUE_SCAN:
1388
yy_c_buf_p = yytext_ptr + offset;
1443
(yy_c_buf_p) = (yytext_ptr) + offset;
1394
c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
1395
*yy_c_buf_p = '\0'; /* preserve yytext */
1396
yy_hold_char = *++yy_c_buf_p;
1449
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1450
*(yy_c_buf_p) = '\0'; /* preserve csim_text */
1451
(yy_hold_char) = *++(yy_c_buf_p);
1403
#ifdef YY_USE_PROTOS
1404
void yyrestart( FILE *input_file )
1406
void yyrestart( input_file )
1410
if ( ! yy_current_buffer )
1411
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1413
yy_init_buffer( yy_current_buffer, input_file );
1414
yy_load_buffer_state();
1418
#ifdef YY_USE_PROTOS
1419
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1421
void yy_switch_to_buffer( new_buffer )
1422
YY_BUFFER_STATE new_buffer;
1425
if ( yy_current_buffer == new_buffer )
1455
#endif /* ifndef YY_NO_INPUT */
1457
/** Immediately switch to a different input stream.
1458
* @param input_file A readable stream.
1460
* @note This function does not reset the start condition to @c INITIAL .
1462
void csim_restart (FILE * input_file )
1465
if ( ! YY_CURRENT_BUFFER ){
1466
csim_ensure_buffer_stack ();
1467
YY_CURRENT_BUFFER_LVALUE =
1468
csim__create_buffer(csim_in,YY_BUF_SIZE );
1471
csim__init_buffer(YY_CURRENT_BUFFER,input_file );
1472
csim__load_buffer_state( );
1475
/** Switch to a different input buffer.
1476
* @param new_buffer The new input buffer.
1479
void csim__switch_to_buffer (YY_BUFFER_STATE new_buffer )
1482
/* TODO. We should be able to replace this entire function body
1484
* csim_pop_buffer_state();
1485
* csim_push_buffer_state(new_buffer);
1487
csim_ensure_buffer_stack ();
1488
if ( YY_CURRENT_BUFFER == new_buffer )
1428
if ( yy_current_buffer )
1491
if ( YY_CURRENT_BUFFER )
1430
1493
/* Flush out information for old buffer. */
1431
*yy_c_buf_p = yy_hold_char;
1432
yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1433
yy_current_buffer->yy_n_chars = yy_n_chars;
1494
*(yy_c_buf_p) = (yy_hold_char);
1495
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1496
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1436
yy_current_buffer = new_buffer;
1437
yy_load_buffer_state();
1499
YY_CURRENT_BUFFER_LVALUE = new_buffer;
1500
csim__load_buffer_state( );
1439
1502
/* We don't actually know whether we did this switch during
1440
* EOF (yywrap()) processing, but the only time this flag
1441
* is looked at is after yywrap() is called, so it's safe
1503
* EOF (csim_wrap()) processing, but the only time this flag
1504
* is looked at is after csim_wrap() is called, so it's safe
1442
1505
* to go ahead and always set it.
1444
yy_did_buffer_switch_on_eof = 1;
1448
#ifdef YY_USE_PROTOS
1449
void yy_load_buffer_state( void )
1451
void yy_load_buffer_state()
1454
yy_n_chars = yy_current_buffer->yy_n_chars;
1455
yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1456
yyin = yy_current_buffer->yy_input_file;
1457
yy_hold_char = *yy_c_buf_p;
1461
#ifdef YY_USE_PROTOS
1462
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1464
YY_BUFFER_STATE yy_create_buffer( file, size )
1507
(yy_did_buffer_switch_on_eof) = 1;
1510
static void csim__load_buffer_state (void)
1512
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1513
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
1514
csim_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
1515
(yy_hold_char) = *(yy_c_buf_p);
1518
/** Allocate and initialize an input buffer state.
1519
* @param file A readable stream.
1520
* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
1522
* @return the allocated buffer state.
1524
YY_BUFFER_STATE csim__create_buffer (FILE * file, int size )
1469
1526
YY_BUFFER_STATE b;
1471
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1528
b = (YY_BUFFER_STATE) csim_alloc(sizeof( struct yy_buffer_state ) );
1473
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1530
YY_FATAL_ERROR( "out of dynamic memory in csim__create_buffer()" );
1475
1532
b->yy_buf_size = size;
1477
1534
/* yy_ch_buf has to be 2 characters longer than the size given because
1478
1535
* we need to put in 2 end-of-buffer characters.
1480
b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1537
b->yy_ch_buf = (char *) csim_alloc(b->yy_buf_size + 2 );
1481
1538
if ( ! b->yy_ch_buf )
1482
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1539
YY_FATAL_ERROR( "out of dynamic memory in csim__create_buffer()" );
1484
1541
b->yy_is_our_buffer = 1;
1486
yy_init_buffer( b, file );
1543
csim__init_buffer(b,file );
1492
#ifdef YY_USE_PROTOS
1493
void yy_delete_buffer( YY_BUFFER_STATE b )
1495
void yy_delete_buffer( b )
1548
/** Destroy the buffer.
1549
* @param b a buffer created with csim__create_buffer()
1552
void csim__delete_buffer (YY_BUFFER_STATE b )
1502
if ( b == yy_current_buffer )
1503
yy_current_buffer = (YY_BUFFER_STATE) 0;
1558
if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
1559
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
1505
1561
if ( b->yy_is_our_buffer )
1506
yy_flex_free( (void *) b->yy_ch_buf );
1508
yy_flex_free( (void *) b );
1513
#ifdef YY_USE_PROTOS
1514
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1516
void yy_init_buffer( b, file )
1523
yy_flush_buffer( b );
1562
csim_free((void *) b->yy_ch_buf );
1564
csim_free((void *) b );
1568
extern int isatty (int );
1569
#endif /* __cplusplus */
1571
/* Initializes or reinitializes a buffer.
1572
* This function is sometimes called more than once on the same buffer,
1573
* such as during a csim_restart() or at EOF.
1575
static void csim__init_buffer (YY_BUFFER_STATE b, FILE * file )
1580
csim__flush_buffer(b );
1525
1582
b->yy_input_file = file;
1526
1583
b->yy_fill_buffer = 1;
1528
#if YY_ALWAYS_INTERACTIVE
1529
b->yy_is_interactive = 1;
1531
#if YY_NEVER_INTERACTIVE
1532
b->yy_is_interactive = 0;
1534
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1540
#ifdef YY_USE_PROTOS
1541
void yy_flush_buffer( YY_BUFFER_STATE b )
1543
void yy_flush_buffer( b )
1585
/* If b is the current buffer, then csim__init_buffer was _probably_
1586
* called from csim_restart() or through yy_get_next_buffer.
1587
* In that case, we don't want to reset the lineno or column.
1589
if (b != YY_CURRENT_BUFFER){
1590
b->yy_bs_lineno = 1;
1591
b->yy_bs_column = 0;
1594
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1599
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
1600
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
1603
void csim__flush_buffer (YY_BUFFER_STATE b )
1551
1608
b->yy_n_chars = 0;
1562
1619
b->yy_at_bol = 1;
1563
1620
b->yy_buffer_status = YY_BUFFER_NEW;
1565
if ( b == yy_current_buffer )
1566
yy_load_buffer_state();
1570
#ifndef YY_NO_SCAN_BUFFER
1571
#ifdef YY_USE_PROTOS
1572
YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1574
YY_BUFFER_STATE yy_scan_buffer( base, size )
1622
if ( b == YY_CURRENT_BUFFER )
1623
csim__load_buffer_state( );
1626
/** Pushes the new state onto the stack. The new state becomes
1627
* the current state. This function will allocate the stack
1629
* @param new_buffer The new state.
1632
void csim_push_buffer_state (YY_BUFFER_STATE new_buffer )
1634
if (new_buffer == NULL)
1637
csim_ensure_buffer_stack();
1639
/* This block is copied from csim__switch_to_buffer. */
1640
if ( YY_CURRENT_BUFFER )
1642
/* Flush out information for old buffer. */
1643
*(yy_c_buf_p) = (yy_hold_char);
1644
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
1645
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1648
/* Only push if top exists. Otherwise, replace top. */
1649
if (YY_CURRENT_BUFFER)
1650
(yy_buffer_stack_top)++;
1651
YY_CURRENT_BUFFER_LVALUE = new_buffer;
1653
/* copied from csim__switch_to_buffer. */
1654
csim__load_buffer_state( );
1655
(yy_did_buffer_switch_on_eof) = 1;
1658
/** Removes and deletes the top of the stack, if present.
1659
* The next element becomes the new top.
1662
void csim_pop_buffer_state (void)
1664
if (!YY_CURRENT_BUFFER)
1667
csim__delete_buffer(YY_CURRENT_BUFFER );
1668
YY_CURRENT_BUFFER_LVALUE = NULL;
1669
if ((yy_buffer_stack_top) > 0)
1670
--(yy_buffer_stack_top);
1672
if (YY_CURRENT_BUFFER) {
1673
csim__load_buffer_state( );
1674
(yy_did_buffer_switch_on_eof) = 1;
1678
/* Allocates the stack if it does not exist.
1679
* Guarantees space for at least one push.
1681
static void csim_ensure_buffer_stack (void)
1685
if (!(yy_buffer_stack)) {
1687
/* First allocation is just for 2 elements, since we don't know if this
1688
* scanner will even need a stack. We use 2 instead of 1 to avoid an
1689
* immediate realloc on the next call.
1692
(yy_buffer_stack) = (struct yy_buffer_state**)csim_alloc
1693
(num_to_alloc * sizeof(struct yy_buffer_state*)
1696
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
1698
(yy_buffer_stack_max) = num_to_alloc;
1699
(yy_buffer_stack_top) = 0;
1703
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
1705
/* Increase the buffer to prepare for a possible push. */
1706
int grow_size = 8 /* arbitrary grow size */;
1708
num_to_alloc = (yy_buffer_stack_max) + grow_size;
1709
(yy_buffer_stack) = (struct yy_buffer_state**)csim_realloc
1711
num_to_alloc * sizeof(struct yy_buffer_state*)
1714
/* zero only the new slots.*/
1715
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
1716
(yy_buffer_stack_max) = num_to_alloc;
1720
/** Setup the input buffer state to scan directly from a user-specified character buffer.
1721
* @param base the character buffer
1722
* @param size the size in bytes of the character buffer
1724
* @return the newly allocated buffer state object.
1726
YY_BUFFER_STATE csim__scan_buffer (char * base, yy_size_t size )
1579
1728
YY_BUFFER_STATE b;
1581
1730
if ( size < 2 ||
1582
1731
base[size-2] != YY_END_OF_BUFFER_CHAR ||
1583
1732
base[size-1] != YY_END_OF_BUFFER_CHAR )
1584
1733
/* They forgot to leave room for the EOB's. */
1587
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1736
b = (YY_BUFFER_STATE) csim_alloc(sizeof( struct yy_buffer_state ) );
1589
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1738
YY_FATAL_ERROR( "out of dynamic memory in csim__scan_buffer()" );
1591
1740
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1592
1741
b->yy_buf_pos = b->yy_ch_buf = base;
1598
1747
b->yy_fill_buffer = 0;
1599
1748
b->yy_buffer_status = YY_BUFFER_NEW;
1601
yy_switch_to_buffer( b );
1750
csim__switch_to_buffer(b );
1608
#ifndef YY_NO_SCAN_STRING
1609
#ifdef YY_USE_PROTOS
1610
YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1612
YY_BUFFER_STATE yy_scan_string( yy_str )
1613
yyconst char *yy_str;
1617
for ( len = 0; yy_str[len]; ++len )
1620
return yy_scan_bytes( yy_str, len );
1625
#ifndef YY_NO_SCAN_BYTES
1626
#ifdef YY_USE_PROTOS
1627
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1629
YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1630
yyconst char *bytes;
1755
/** Setup the input buffer state to scan a string. The next call to csim_lex() will
1756
* scan from a @e copy of @a str.
1757
* @param yystr a NUL-terminated string to scan
1759
* @return the newly allocated buffer state object.
1760
* @note If you want to scan bytes that may contain NUL values, then use
1761
* csim__scan_bytes() instead.
1763
YY_BUFFER_STATE csim__scan_string (yyconst char * yystr )
1766
return csim__scan_bytes(yystr,strlen(yystr) );
1769
/** Setup the input buffer state to scan the given bytes. The next call to csim_lex() will
1770
* scan from a @e copy of @a bytes.
1771
* @param bytes the byte buffer to scan
1772
* @param len the number of bytes in the buffer pointed to by @a bytes.
1774
* @return the newly allocated buffer state object.
1776
YY_BUFFER_STATE csim__scan_bytes (yyconst char * yybytes, int _yybytes_len )
1634
1778
YY_BUFFER_STATE b;
1639
1783
/* Get memory for full buffer, including space for trailing EOB's. */
1641
buf = (char *) yy_flex_alloc( n );
1784
n = _yybytes_len + 2;
1785
buf = (char *) csim_alloc(n );
1643
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1645
for ( i = 0; i < len; ++i )
1648
buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1650
b = yy_scan_buffer( buf, n );
1787
YY_FATAL_ERROR( "out of dynamic memory in csim__scan_bytes()" );
1789
for ( i = 0; i < _yybytes_len; ++i )
1790
buf[i] = yybytes[i];
1792
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
1794
b = csim__scan_buffer(buf,n );
1652
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1796
YY_FATAL_ERROR( "bad buffer in csim__scan_bytes()" );
1654
1798
/* It's okay to grow etc. this buffer, and we should throw it
1655
1799
* away when we're done.
1657
1801
b->yy_is_our_buffer = 1;
1664
#ifndef YY_NO_PUSH_STATE
1665
#ifdef YY_USE_PROTOS
1666
static void yy_push_state( int new_state )
1668
static void yy_push_state( new_state )
1672
if ( yy_start_stack_ptr >= yy_start_stack_depth )
1676
yy_start_stack_depth += YY_START_STACK_INCR;
1677
new_size = yy_start_stack_depth * sizeof( int );
1679
if ( ! yy_start_stack )
1680
yy_start_stack = (int *) yy_flex_alloc( new_size );
1683
yy_start_stack = (int *) yy_flex_realloc(
1684
(void *) yy_start_stack, new_size );
1686
if ( ! yy_start_stack )
1688
"out of memory expanding start-condition stack" );
1691
yy_start_stack[yy_start_stack_ptr++] = YY_START;
1698
#ifndef YY_NO_POP_STATE
1699
static void yy_pop_state()
1701
if ( --yy_start_stack_ptr < 0 )
1702
YY_FATAL_ERROR( "start-condition stack underflow" );
1704
BEGIN(yy_start_stack[yy_start_stack_ptr]);
1709
#ifndef YY_NO_TOP_STATE
1710
static int yy_top_state()
1712
return yy_start_stack[yy_start_stack_ptr - 1];
1716
1806
#ifndef YY_EXIT_FAILURE
1717
1807
#define YY_EXIT_FAILURE 2
1720
#ifdef YY_USE_PROTOS
1721
static void yy_fatal_error( yyconst char msg[] )
1723
static void yy_fatal_error( msg )
1727
(void) fprintf( stderr, "%s\n", msg );
1810
static void yy_fatal_error (yyconst char* msg )
1812
(void) fprintf( stderr, "%s\n", msg );
1728
1813
exit( YY_EXIT_FAILURE );
1733
1816
/* Redefine yyless() so it works in section 3 code. */
1736
1819
#define yyless(n) \
1739
/* Undo effects of setting up yytext. */ \
1740
yytext[yyleng] = yy_hold_char; \
1741
yy_c_buf_p = yytext + n; \
1742
yy_hold_char = *yy_c_buf_p; \
1743
*yy_c_buf_p = '\0'; \
1822
/* Undo effects of setting up csim_text. */ \
1823
int yyless_macro_arg = (n); \
1824
YY_LESS_LINENO(yyless_macro_arg);\
1825
csim_text[csim_leng] = (yy_hold_char); \
1826
(yy_c_buf_p) = csim_text + yyless_macro_arg; \
1827
(yy_hold_char) = *(yy_c_buf_p); \
1828
*(yy_c_buf_p) = '\0'; \
1829
csim_leng = yyless_macro_arg; \
1749
/* Internal utility routines. */
1752
#ifdef YY_USE_PROTOS
1753
static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
1833
/* Accessor methods (get/set functions) to struct members. */
1835
/** Get the current line number.
1838
int csim_get_lineno (void)
1844
/** Get the input stream.
1847
FILE *csim_get_in (void)
1852
/** Get the output stream.
1855
FILE *csim_get_out (void)
1860
/** Get the length of the current token.
1863
int csim_get_leng (void)
1868
/** Get the current token.
1872
char *csim_get_text (void)
1877
/** Set the current line number.
1878
* @param line_number
1881
void csim_set_lineno (int line_number )
1884
csim_lineno = line_number;
1887
/** Set the input stream. This does not discard the current
1889
* @param in_str A readable stream.
1891
* @see csim__switch_to_buffer
1893
void csim_set_in (FILE * in_str )
1898
void csim_set_out (FILE * out_str )
1900
csim_out = out_str ;
1903
int csim_get_debug (void)
1905
return csim__flex_debug;
1908
void csim_set_debug (int bdebug )
1910
csim__flex_debug = bdebug ;
1913
static int yy_init_globals (void)
1915
/* Initialization is the same as for the non-reentrant scanner.
1916
* This function is called from csim_lex_destroy(), so don't allocate here.
1919
(yy_buffer_stack) = 0;
1920
(yy_buffer_stack_top) = 0;
1921
(yy_buffer_stack_max) = 0;
1922
(yy_c_buf_p) = (char *) 0;
1926
/* Defined in main.c */
1755
static void yy_flex_strncpy( s1, s2, n )
1931
csim_in = (FILE *) 0;
1932
csim_out = (FILE *) 0;
1935
/* For future reference: Set errno on error, since we are called by
1941
/* csim_lex_destroy is for both reentrant and non-reentrant scanners. */
1942
int csim_lex_destroy (void)
1945
/* Pop the buffer stack, destroying each element. */
1946
while(YY_CURRENT_BUFFER){
1947
csim__delete_buffer(YY_CURRENT_BUFFER );
1948
YY_CURRENT_BUFFER_LVALUE = NULL;
1949
csim_pop_buffer_state();
1952
/* Destroy the stack itself. */
1953
csim_free((yy_buffer_stack) );
1954
(yy_buffer_stack) = NULL;
1956
/* Reset the globals. This is important in a non-reentrant scanner so the next time
1957
* csim_lex() is called, initialization will occur. */
1964
* Internal utility routines.
1968
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
1761
1970
register int i;
1762
1971
for ( i = 0; i < n; ++i )
1767
1976
#ifdef YY_NEED_STRLEN
1768
#ifdef YY_USE_PROTOS
1769
static int yy_flex_strlen( yyconst char *s )
1771
static int yy_flex_strlen( s )
1977
static int yy_flex_strlen (yyconst char * s )
1775
1979
register int n;
1776
1980
for ( n = 0; s[n]; ++n )
1784
#ifdef YY_USE_PROTOS
1785
static void *yy_flex_alloc( yy_size_t size )
1787
static void *yy_flex_alloc( size )
1987
void *csim_alloc (yy_size_t size )
1791
1989
return (void *) malloc( size );
1794
#ifdef YY_USE_PROTOS
1795
static void *yy_flex_realloc( void *ptr, yy_size_t size )
1797
static void *yy_flex_realloc( ptr, size )
1992
void *csim_realloc (void * ptr, yy_size_t size )
1802
1994
/* The cast to (char *) in the following accommodates both
1803
1995
* implementations that use char* generic pointers, and those
1804
1996
* that use void* generic pointers. It works with the latter