2 #line 3 "lex.yyfmi2.c"
\r
4 #define YY_INT_ALIGNED short int
\r
6 /* A lexical scanner generated by flex */
\r
9 #define YY_FLEX_MAJOR_VERSION 2
\r
10 #define YY_FLEX_MINOR_VERSION 5
\r
11 #define YY_FLEX_SUBMINOR_VERSION 37
\r
12 #if YY_FLEX_SUBMINOR_VERSION > 0
\r
16 /* First, we deal with platform-specific or compiler-specific issues. */
\r
18 /* begin standard C headers. */
\r
24 /* end standard C headers. */
\r
26 /* flex integer type definitions */
\r
31 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
\r
33 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
\r
35 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
\r
36 * if you want the limit (max/min) macros for int types.
\r
38 #ifndef __STDC_LIMIT_MACROS
\r
39 #define __STDC_LIMIT_MACROS 1
\r
42 #include <inttypes.h>
\r
43 typedef int8_t flex_int8_t;
\r
44 typedef uint8_t flex_uint8_t;
\r
45 typedef int16_t flex_int16_t;
\r
46 typedef uint16_t flex_uint16_t;
\r
47 typedef int32_t flex_int32_t;
\r
48 typedef uint32_t flex_uint32_t;
\r
50 typedef signed char flex_int8_t;
\r
51 typedef short int flex_int16_t;
\r
52 typedef int flex_int32_t;
\r
53 typedef unsigned char flex_uint8_t;
\r
54 typedef unsigned short int flex_uint16_t;
\r
55 typedef unsigned int flex_uint32_t;
\r
57 /* Limits of integral types. */
\r
59 #define INT8_MIN (-128)
\r
62 #define INT16_MIN (-32767-1)
\r
65 #define INT32_MIN (-2147483647-1)
\r
68 #define INT8_MAX (127)
\r
71 #define INT16_MAX (32767)
\r
74 #define INT32_MAX (2147483647)
\r
77 #define UINT8_MAX (255U)
\r
80 #define UINT16_MAX (65535U)
\r
83 #define UINT32_MAX (4294967295U)
\r
88 #endif /* ! FLEXINT_H */
\r
92 /* The "const" storage-class-modifier is valid. */
\r
93 #define YY_USE_CONST
\r
95 #else /* ! __cplusplus */
\r
97 /* C99 requires __STDC__ to be defined as 1. */
\r
98 #if defined (__STDC__)
\r
100 #define YY_USE_CONST
\r
102 #endif /* defined (__STDC__) */
\r
103 #endif /* ! __cplusplus */
\r
105 #ifdef YY_USE_CONST
\r
106 #define yyconst const
\r
111 /* Returned upon end-of-file. */
\r
114 /* Promotes a possibly negative, possibly signed char to an unsigned
\r
115 * integer for use as an array index. If the signed char is negative,
\r
116 * we want to instead treat it as an 8-bit unsigned char, hence the
\r
119 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
\r
121 /* An opaque pointer. */
\r
122 #ifndef YY_TYPEDEF_YY_SCANNER_T
\r
123 #define YY_TYPEDEF_YY_SCANNER_T
\r
124 typedef void* yyscan_t;
\r
127 /* For convenience, these vars (plus the bison vars far below)
\r
128 are macros in the reentrant scanner. */
\r
129 #define yyin yyg->yyin_r
\r
130 #define yyout yyg->yyout_r
\r
131 #define yyextra yyg->yyextra_r
\r
132 #define yyleng yyg->yyleng_r
\r
133 #define yytext yyg->yytext_r
\r
134 #define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
\r
135 #define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
\r
136 #define yy_flex_debug yyg->yy_flex_debug_r
\r
138 /* Enter a start condition. This macro really ought to take a parameter,
\r
139 * but we do it the disgusting crufty way forced on us by the ()-less
\r
140 * definition of BEGIN.
\r
142 #define BEGIN yyg->yy_start = 1 + 2 *
\r
144 /* Translate the current start state into a value that can be later handed
\r
145 * to BEGIN to return to the state. The YYSTATE alias is for lex
\r
148 #define YY_START ((yyg->yy_start - 1) / 2)
\r
149 #define YYSTATE YY_START
\r
151 /* Action number for EOF rule of a given start state. */
\r
152 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
\r
154 /* Special action meaning "start processing a new file". */
\r
155 #define YY_NEW_FILE yyfmi2restart(yyin ,yyscanner )
\r
157 #define YY_END_OF_BUFFER_CHAR 0
\r
159 /* Size of default input buffer. */
\r
160 #ifndef YY_BUF_SIZE
\r
161 #define YY_BUF_SIZE 16384
\r
164 /* The state buf must be large enough to hold one state per character in the main buffer.
\r
166 #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
\r
168 #ifndef YY_TYPEDEF_YY_BUFFER_STATE
\r
169 #define YY_TYPEDEF_YY_BUFFER_STATE
\r
170 typedef struct yy_buffer_state *YY_BUFFER_STATE;
\r
173 #ifndef YY_TYPEDEF_YY_SIZE_T
\r
174 #define YY_TYPEDEF_YY_SIZE_T
\r
175 typedef size_t yy_size_t;
\r
178 #define EOB_ACT_CONTINUE_SCAN 0
\r
179 #define EOB_ACT_END_OF_FILE 1
\r
180 #define EOB_ACT_LAST_MATCH 2
\r
182 #define YY_LESS_LINENO(n)
\r
184 /* Return all but the first "n" matched characters back to the input stream. */
\r
185 #define yyless(n) \
\r
188 /* Undo effects of setting up yytext. */ \
\r
189 int yyless_macro_arg = (n); \
\r
190 YY_LESS_LINENO(yyless_macro_arg);\
\r
191 *yy_cp = yyg->yy_hold_char; \
\r
192 YY_RESTORE_YY_MORE_OFFSET \
\r
193 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
\r
194 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
\r
198 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
\r
200 #ifndef YY_STRUCT_YY_BUFFER_STATE
\r
201 #define YY_STRUCT_YY_BUFFER_STATE
\r
202 struct yy_buffer_state
\r
204 FILE *yy_input_file;
\r
206 char *yy_ch_buf; /* input buffer */
\r
207 char *yy_buf_pos; /* current position in input buffer */
\r
209 /* Size of input buffer in bytes, not including room for EOB
\r
212 yy_size_t yy_buf_size;
\r
214 /* Number of characters read into yy_ch_buf, not including EOB
\r
217 yy_size_t yy_n_chars;
\r
219 /* Whether we "own" the buffer - i.e., we know we created it,
\r
220 * and can realloc() it to grow it, and should free() it to
\r
223 int yy_is_our_buffer;
\r
225 /* Whether this is an "interactive" input source; if so, and
\r
226 * if we're using stdio for input, then we want to use getc()
\r
227 * instead of fread(), to make sure we stop fetching input after
\r
230 int yy_is_interactive;
\r
232 /* Whether we're considered to be at the beginning of a line.
\r
233 * If so, '^' rules will be active on the next match, otherwise
\r
238 int yy_bs_lineno; /**< The line count. */
\r
239 int yy_bs_column; /**< The column count. */
\r
241 /* Whether to try to fill the input buffer when we reach the
\r
244 int yy_fill_buffer;
\r
246 int yy_buffer_status;
\r
248 #define YY_BUFFER_NEW 0
\r
249 #define YY_BUFFER_NORMAL 1
\r
250 /* When an EOF's been seen but there's still some text to process
\r
251 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
\r
252 * shouldn't try reading from the input source any more. We might
\r
253 * still have a bunch of tokens to match, though, because of
\r
254 * possible backing-up.
\r
256 * When we actually see the EOF, we change the status to "new"
\r
257 * (via yyfmi2restart()), so that the user can continue scanning by
\r
258 * just pointing yyin at a new input file.
\r
260 #define YY_BUFFER_EOF_PENDING 2
\r
263 #endif /* !YY_STRUCT_YY_BUFFER_STATE */
\r
265 /* We provide macros for accessing buffer states in case in the
\r
266 * future we want to put the buffer states in a more general
\r
269 * Returns the top of the stack, or NULL.
\r
271 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
\r
272 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
\r
275 /* Same as previous macro, but useful when we know that the buffer stack is not
\r
276 * NULL or when we need an lvalue. For internal use only.
\r
278 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
\r
280 void yyfmi2restart (FILE *input_file ,yyscan_t yyscanner );
\r
281 void yyfmi2_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
\r
282 YY_BUFFER_STATE yyfmi2_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
\r
283 void yyfmi2_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
\r
284 void yyfmi2_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
\r
285 void yyfmi2push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
\r
286 void yyfmi2pop_buffer_state (yyscan_t yyscanner );
\r
288 static void yyfmi2ensure_buffer_stack (yyscan_t yyscanner );
\r
289 static void yyfmi2_load_buffer_state (yyscan_t yyscanner );
\r
290 static void yyfmi2_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
\r
292 #define YY_FLUSH_BUFFER yyfmi2_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
\r
294 YY_BUFFER_STATE yyfmi2_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
\r
295 YY_BUFFER_STATE yyfmi2_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
\r
296 YY_BUFFER_STATE yyfmi2_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
\r
298 void *yyfmi2alloc (yy_size_t ,yyscan_t yyscanner );
\r
299 void *yyfmi2realloc (void *,yy_size_t ,yyscan_t yyscanner );
\r
300 void yyfmi2free (void * ,yyscan_t yyscanner );
\r
302 #define yy_new_buffer yyfmi2_create_buffer
\r
304 #define yy_set_interactive(is_interactive) \
\r
306 if ( ! YY_CURRENT_BUFFER ){ \
\r
307 yyfmi2ensure_buffer_stack (yyscanner); \
\r
308 YY_CURRENT_BUFFER_LVALUE = \
\r
309 yyfmi2_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
\r
311 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
\r
314 #define yy_set_bol(at_bol) \
\r
316 if ( ! YY_CURRENT_BUFFER ){\
\r
317 yyfmi2ensure_buffer_stack (yyscanner); \
\r
318 YY_CURRENT_BUFFER_LVALUE = \
\r
319 yyfmi2_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
\r
321 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
\r
324 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
\r
326 #define yyfmi2wrap(yyscanner) 1
\r
327 #define YY_SKIP_YYWRAP
\r
329 typedef unsigned char YY_CHAR;
\r
331 typedef int yy_state_type;
\r
333 #define yytext_ptr yytext_r
\r
335 static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
\r
336 static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
\r
337 static int yy_get_next_buffer (yyscan_t yyscanner );
\r
338 static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
\r
340 /* Done after the current pattern has been matched and before the
\r
341 * corresponding action - sets up yytext.
\r
343 #define YY_DO_BEFORE_ACTION \
\r
344 yyg->yytext_ptr = yy_bp; \
\r
345 yyleng = (size_t) (yy_cp - yy_bp); \
\r
346 yyg->yy_hold_char = *yy_cp; \
\r
348 yyg->yy_c_buf_p = yy_cp;
\r
350 #define YY_NUM_RULES 12
\r
351 #define YY_END_OF_BUFFER 13
\r
352 /* This struct is not used in this scanner,
\r
353 but its presence is necessary. */
\r
354 struct yy_trans_info
\r
356 flex_int32_t yy_verify;
\r
357 flex_int32_t yy_nxt;
\r
359 static yyconst flex_int16_t yy_accept[25] =
\r
361 0, 0, 13, 11, 12, 11, 2, 3, 4, 5,
\r
362 10, 9, 6, 7, 9, 0, 0, 10, 0, 8,
\r
366 static yyconst flex_int32_t yy_ec[256] =
\r
368 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
\r
369 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
370 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
371 1, 3, 3, 4, 3, 3, 3, 3, 5, 6,
\r
372 7, 3, 3, 8, 3, 9, 3, 10, 10, 10,
\r
373 10, 10, 10, 10, 10, 10, 10, 3, 3, 3,
\r
374 3, 3, 11, 3, 12, 12, 12, 12, 12, 12,
\r
375 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
\r
376 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
\r
377 13, 14, 15, 3, 12, 1, 16, 17, 12, 18,
\r
379 19, 20, 12, 12, 12, 12, 12, 12, 12, 21,
\r
380 12, 12, 12, 22, 12, 23, 12, 24, 12, 12,
\r
381 12, 12, 3, 3, 3, 3, 1, 1, 1, 1,
\r
382 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
383 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
384 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
385 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
386 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
387 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
388 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
390 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
391 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
392 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
393 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
394 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
398 static yyconst flex_int32_t yy_meta[25] =
\r
400 1, 1, 2, 1, 1, 2, 2, 2, 2, 2,
\r
401 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
\r
405 static yyconst flex_int16_t yy_base[26] =
\r
407 0, 0, 38, 56, 56, 19, 56, 56, 56, 56,
\r
408 22, 56, 56, 56, 12, 20, 31, 20, 7, 56,
\r
412 static yyconst flex_int16_t yy_def[26] =
\r
414 24, 1, 24, 24, 24, 25, 24, 24, 24, 24,
\r
415 24, 24, 24, 24, 24, 25, 24, 24, 24, 24,
\r
419 static yyconst flex_int16_t yy_nxt[81] =
\r
421 4, 5, 4, 4, 6, 7, 8, 9, 10, 11,
\r
422 4, 12, 13, 4, 14, 12, 12, 15, 12, 12,
\r
423 12, 12, 12, 12, 20, 16, 23, 20, 22, 18,
\r
424 19, 18, 17, 17, 21, 21, 17, 24, 24, 24,
\r
425 24, 21, 24, 24, 21, 24, 21, 21, 24, 24,
\r
426 21, 21, 21, 21, 21, 3, 24, 24, 24, 24,
\r
427 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
\r
428 24, 24, 24, 24, 24, 24, 24, 24, 24, 24
\r
431 static yyconst flex_int16_t yy_chk[81] =
\r
433 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
434 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
435 1, 1, 1, 1, 16, 25, 22, 21, 19, 18,
\r
436 15, 11, 6, 16, 17, 17, 21, 3, 0, 0,
\r
437 0, 17, 0, 0, 17, 0, 17, 17, 0, 0,
\r
438 17, 17, 17, 17, 17, 24, 24, 24, 24, 24,
\r
439 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
\r
440 24, 24, 24, 24, 24, 24, 24, 24, 24, 24
\r
443 /* The intent behind this definition is that it'll catch
\r
444 * any uses of REJECT which flex missed.
\r
446 #define REJECT reject_used_but_not_detected
\r
447 #define yymore() yymore_used_but_not_detected
\r
448 #define YY_MORE_ADJ 0
\r
449 #define YY_RESTORE_YY_MORE_OFFSET
\r
451 Copyright (C) 2012 Modelon AB
\r
453 This program is free software: you can redistribute it and/or modify
\r
454 it under the terms of the BSD style license.
\r
456 This program is distributed in the hope that it will be useful,
\r
457 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
458 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
459 FMILIB_License.txt file for more details.
\r
461 You should have received a copy of the FMILIB_License.txt file
\r
462 along with this program. If not, contact Modelon AB <http://www.modelon.com>.
\r
465 #include "fmi2_xml_variable_name_parser.tab.h"
\r
466 #define YYSTYPE YYFMI2STYPE
\r
468 #define LEX_VAL(ID_NAME) return ID_NAME;
\r
472 #ifndef YY_NO_UNISTD_H
\r
473 /* Special case for "unistd.h", since it is non-ANSI. We include it way
\r
474 * down here because we want the user's section 1 to have been scanned first.
\r
475 * The user has a chance to override it with an option.
\r
477 #include <unistd.h>
\r
479 /*windows compatibility case*/
\r
481 #define isatty _isatty
\r
482 #define fileno _fileno
\r
485 #ifndef YY_EXTRA_TYPE
\r
486 #define YY_EXTRA_TYPE void *
\r
489 /* Holds the entire state of the reentrant scanner. */
\r
493 /* User-defined. Not touched by flex. */
\r
494 YY_EXTRA_TYPE yyextra_r;
\r
496 /* The rest are the same as the globals declared in the non-reentrant scanner. */
\r
497 FILE *yyin_r, *yyout_r;
\r
498 size_t yy_buffer_stack_top; /**< index of top of stack. */
\r
499 size_t yy_buffer_stack_max; /**< capacity of stack. */
\r
500 YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
\r
502 yy_size_t yy_n_chars;
\r
503 yy_size_t yyleng_r;
\r
507 int yy_did_buffer_switch_on_eof;
\r
508 int yy_start_stack_ptr;
\r
509 int yy_start_stack_depth;
\r
510 int *yy_start_stack;
\r
511 yy_state_type yy_last_accepting_state;
\r
512 char* yy_last_accepting_cpos;
\r
515 int yy_flex_debug_r;
\r
521 YYSTYPE * yylval_r;
\r
523 }; /* end struct yyguts_t */
\r
525 static int yy_init_globals (yyscan_t yyscanner );
\r
527 /* This must go here because YYSTYPE and YYLTYPE are included
\r
528 * from bison output in section 1.*/
\r
529 # define yylval yyg->yylval_r
\r
531 int yyfmi2lex_init (yyscan_t* scanner);
\r
533 int yyfmi2lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
\r
535 /* Accessor methods to globals.
\r
536 These are made visible to non-reentrant scanners for convenience. */
\r
538 int yyfmi2lex_destroy (yyscan_t yyscanner );
\r
540 int yyfmi2get_debug (yyscan_t yyscanner );
\r
542 void yyfmi2set_debug (int debug_flag ,yyscan_t yyscanner );
\r
544 YY_EXTRA_TYPE yyfmi2get_extra (yyscan_t yyscanner );
\r
546 void yyfmi2set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
\r
548 FILE *yyfmi2get_in (yyscan_t yyscanner );
\r
550 void yyfmi2set_in (FILE * in_str ,yyscan_t yyscanner );
\r
552 FILE *yyfmi2get_out (yyscan_t yyscanner );
\r
554 void yyfmi2set_out (FILE * out_str ,yyscan_t yyscanner );
\r
556 yy_size_t yyfmi2get_leng (yyscan_t yyscanner );
\r
558 char *yyfmi2get_text (yyscan_t yyscanner );
\r
560 int yyfmi2get_lineno (yyscan_t yyscanner );
\r
562 void yyfmi2set_lineno (int line_number ,yyscan_t yyscanner );
\r
564 int yyfmi2get_column (yyscan_t yyscanner );
\r
566 void yyfmi2set_column (int column_no ,yyscan_t yyscanner );
\r
568 YYSTYPE * yyfmi2get_lval (yyscan_t yyscanner );
\r
570 void yyfmi2set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
\r
572 /* Macros after this point can all be overridden by user definitions in
\r
576 #ifndef YY_SKIP_YYWRAP
\r
578 extern "C" int yyfmi2wrap (yyscan_t yyscanner );
\r
580 extern int yyfmi2wrap (yyscan_t yyscanner );
\r
584 static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner);
\r
587 static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
\r
590 #ifdef YY_NEED_STRLEN
\r
591 static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
\r
594 #ifndef YY_NO_INPUT
\r
597 static int yyinput (yyscan_t yyscanner );
\r
599 static int input (yyscan_t yyscanner );
\r
604 /* Amount of stuff to slurp up with each read. */
\r
605 #ifndef YY_READ_BUF_SIZE
\r
606 #define YY_READ_BUF_SIZE 8192
\r
609 /* Copy whatever the last rule matched to the standard output. */
\r
611 /* This used to be an fputs(), but since the string might contain NUL's,
\r
612 * we now use fwrite().
\r
614 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
\r
617 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
\r
618 * is returned in "result".
\r
621 #define YY_INPUT(buf,result,max_size) \
\r
622 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
\r
626 for ( n = 0; n < max_size && \
\r
627 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
\r
628 buf[n] = (char) c; \
\r
630 buf[n++] = (char) c; \
\r
631 if ( c == EOF && ferror( yyin ) ) \
\r
632 YY_FATAL_ERROR( "input in flex scanner failed" ); \
\r
638 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
\r
640 if( errno != EINTR) \
\r
642 YY_FATAL_ERROR( "input in flex scanner failed" ); \
\r
653 /* No semi-colon after return; correct usage is to write "yyterminate();" -
\r
654 * we don't want an extra ';' after the "return" because that will cause
\r
655 * some compilers to complain about unreachable statements.
\r
657 #ifndef yyterminate
\r
658 #define yyterminate() return YY_NULL
\r
661 /* Number of entries by which start-condition stack grows. */
\r
662 #ifndef YY_START_STACK_INCR
\r
663 #define YY_START_STACK_INCR 25
\r
666 /* Report a fatal error. */
\r
667 #ifndef YY_FATAL_ERROR
\r
668 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
\r
671 /* end tables serialization structures and prototypes */
\r
673 /* Default declaration of generated scanner - a define so the user can
\r
674 * easily add parameters.
\r
677 #define YY_DECL_IS_OURS 1
\r
679 extern int yyfmi2lex \
\r
680 (YYSTYPE * yylval_param ,yyscan_t yyscanner);
\r
682 #define YY_DECL int yyfmi2lex \
\r
683 (YYSTYPE * yylval_param , yyscan_t yyscanner)
\r
684 #endif /* !YY_DECL */
\r
686 /* Code executed at the beginning of each rule, after yytext and yyleng
\r
687 * have been set up.
\r
689 #ifndef YY_USER_ACTION
\r
690 #define YY_USER_ACTION
\r
693 /* Code executed at the end of each rule. */
\r
695 #define YY_BREAK break;
\r
698 #define YY_RULE_SETUP \
\r
701 /** The main scanner function which does all the work.
\r
705 register yy_state_type yy_current_state;
\r
706 register char *yy_cp, *yy_bp;
\r
707 register int yy_act;
\r
708 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
710 yylval = yylval_param;
\r
712 if ( !yyg->yy_init )
\r
716 #ifdef YY_USER_INIT
\r
720 if ( ! yyg->yy_start )
\r
721 yyg->yy_start = 1; /* first start state */
\r
729 if ( ! YY_CURRENT_BUFFER ) {
\r
730 yyfmi2ensure_buffer_stack (yyscanner);
\r
731 YY_CURRENT_BUFFER_LVALUE =
\r
732 yyfmi2_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
\r
735 yyfmi2_load_buffer_state(yyscanner );
\r
738 while ( 1 ) /* loops until end-of-file is reached */
\r
740 yy_cp = yyg->yy_c_buf_p;
\r
742 /* Support of yytext. */
\r
743 *yy_cp = yyg->yy_hold_char;
\r
745 /* yy_bp points to the position in yy_ch_buf of the start of
\r
750 yy_current_state = yyg->yy_start;
\r
754 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
\r
755 if ( yy_accept[yy_current_state] )
\r
757 yyg->yy_last_accepting_state = yy_current_state;
\r
758 yyg->yy_last_accepting_cpos = yy_cp;
\r
760 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
\r
762 yy_current_state = (int) yy_def[yy_current_state];
\r
763 if ( yy_current_state >= 25 )
\r
764 yy_c = yy_meta[(unsigned int) yy_c];
\r
766 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
\r
769 while ( yy_base[yy_current_state] != 56 );
\r
772 yy_act = yy_accept[yy_current_state];
\r
774 { /* have to back up */
\r
775 yy_cp = yyg->yy_last_accepting_cpos;
\r
776 yy_current_state = yyg->yy_last_accepting_state;
\r
777 yy_act = yy_accept[yy_current_state];
\r
780 YY_DO_BEFORE_ACTION;
\r
782 do_action: /* This label is used only to access EOF actions. */
\r
785 { /* beginning of action switch */
\r
786 case 0: /* must back up */
\r
787 /* undo the effects of YY_DO_BEFORE_ACTION */
\r
788 *yy_cp = yyg->yy_hold_char;
\r
789 yy_cp = yyg->yy_last_accepting_cpos;
\r
790 yy_current_state = yyg->yy_last_accepting_state;
\r
791 goto yy_find_action;
\r
827 {LEX_VAL(NONDIGIT)}
\r
831 {LEX_VAL(UNSIGNED_INTEGER);}
\r
842 case YY_STATE_EOF(INITIAL):
\r
845 case YY_END_OF_BUFFER:
\r
847 /* Amount of text matched not including the EOB char. */
\r
848 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
\r
850 /* Undo the effects of YY_DO_BEFORE_ACTION. */
\r
851 *yy_cp = yyg->yy_hold_char;
\r
852 YY_RESTORE_YY_MORE_OFFSET
\r
854 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
\r
856 /* We're scanning a new file or input source. It's
\r
857 * possible that this happened because the user
\r
858 * just pointed yyin at a new source and called
\r
859 * yyfmi2lex(). If so, then we have to assure
\r
860 * consistency between YY_CURRENT_BUFFER and our
\r
861 * globals. Here is the right place to do so, because
\r
862 * this is the first action (other than possibly a
\r
863 * back-up) that will match for the new input source.
\r
865 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
\r
866 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
\r
867 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
\r
870 /* Note that here we test for yy_c_buf_p "<=" to the position
\r
871 * of the first EOB in the buffer, since yy_c_buf_p will
\r
872 * already have been incremented past the NUL character
\r
873 * (since all states make transitions on EOB to the
\r
874 * end-of-buffer state). Contrast this with the test
\r
877 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
\r
878 { /* This was really a NUL. */
\r
879 yy_state_type yy_next_state;
\r
881 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
\r
883 yy_current_state = yy_get_previous_state( yyscanner );
\r
885 /* Okay, we're now positioned to make the NUL
\r
886 * transition. We couldn't have
\r
887 * yy_get_previous_state() go ahead and do it
\r
888 * for us because it doesn't know how to deal
\r
889 * with the possibility of jamming (and we don't
\r
890 * want to build jamming into it because then it
\r
891 * will run more slowly).
\r
894 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
\r
896 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
\r
898 if ( yy_next_state )
\r
900 /* Consume the NUL. */
\r
901 yy_cp = ++yyg->yy_c_buf_p;
\r
902 yy_current_state = yy_next_state;
\r
908 yy_cp = yyg->yy_c_buf_p;
\r
909 goto yy_find_action;
\r
913 else switch ( yy_get_next_buffer( yyscanner ) )
\r
915 case EOB_ACT_END_OF_FILE:
\r
917 yyg->yy_did_buffer_switch_on_eof = 0;
\r
919 if ( yyfmi2wrap(yyscanner ) )
\r
921 /* Note: because we've taken care in
\r
922 * yy_get_next_buffer() to have set up
\r
923 * yytext, we can now set up
\r
924 * yy_c_buf_p so that if some total
\r
925 * hoser (like flex itself) wants to
\r
926 * call the scanner after we return the
\r
927 * YY_NULL, it'll still work - another
\r
928 * YY_NULL will get returned.
\r
930 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
\r
932 yy_act = YY_STATE_EOF(YY_START);
\r
938 if ( ! yyg->yy_did_buffer_switch_on_eof )
\r
944 case EOB_ACT_CONTINUE_SCAN:
\r
946 yyg->yytext_ptr + yy_amount_of_matched_text;
\r
948 yy_current_state = yy_get_previous_state( yyscanner );
\r
950 yy_cp = yyg->yy_c_buf_p;
\r
951 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
\r
954 case EOB_ACT_LAST_MATCH:
\r
956 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
\r
958 yy_current_state = yy_get_previous_state( yyscanner );
\r
960 yy_cp = yyg->yy_c_buf_p;
\r
961 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
\r
962 goto yy_find_action;
\r
969 "fatal flex scanner internal error--no action found" );
\r
970 } /* end of action switch */
\r
971 } /* end of scanning one token */
\r
972 } /* end of yyfmi2lex */
\r
974 /* yy_get_next_buffer - try to read in a new buffer
\r
976 * Returns a code representing an action:
\r
977 * EOB_ACT_LAST_MATCH -
\r
978 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
\r
979 * EOB_ACT_END_OF_FILE - end of file
\r
981 static int yy_get_next_buffer (yyscan_t yyscanner)
\r
983 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
984 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
\r
985 register char *source = yyg->yytext_ptr;
\r
986 register int number_to_move, i;
\r
989 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
\r
991 "fatal flex scanner internal error--end of buffer missed" );
\r
993 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
\r
994 { /* Don't try to fill the buffer, so this is an EOF. */
\r
995 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
\r
997 /* We matched a single character, the EOB, so
\r
998 * treat this as a final EOF.
\r
1000 return EOB_ACT_END_OF_FILE;
\r
1005 /* We matched some text prior to the EOB, first
\r
1008 return EOB_ACT_LAST_MATCH;
\r
1012 /* Try to read more data. */
\r
1014 /* First move last chars to start of buffer. */
\r
1015 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
\r
1017 for ( i = 0; i < number_to_move; ++i )
\r
1018 *(dest++) = *(source++);
\r
1020 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
\r
1021 /* don't do the read, it's not guaranteed to return an EOF,
\r
1022 * just force an EOF
\r
1024 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
\r
1028 yy_size_t num_to_read =
\r
1029 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
\r
1031 while ( num_to_read <= 0 )
\r
1032 { /* Not enough room in the buffer - grow it. */
\r
1034 /* just a shorter name for the current buffer */
\r
1035 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
\r
1037 int yy_c_buf_p_offset =
\r
1038 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
\r
1040 if ( b->yy_is_our_buffer )
\r
1042 yy_size_t new_size = b->yy_buf_size * 2;
\r
1044 if ( new_size <= 0 )
\r
1045 b->yy_buf_size += b->yy_buf_size / 8;
\r
1047 b->yy_buf_size *= 2;
\r
1049 b->yy_ch_buf = (char *)
\r
1050 /* Include room in for 2 EOB chars. */
\r
1051 yyfmi2realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
\r
1054 /* Can't grow it, we don't own it. */
\r
1057 if ( ! b->yy_ch_buf )
\r
1059 "fatal error - scanner input buffer overflow" );
\r
1061 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
\r
1063 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
\r
1064 number_to_move - 1;
\r
1068 if ( num_to_read > YY_READ_BUF_SIZE )
\r
1069 num_to_read = YY_READ_BUF_SIZE;
\r
1071 /* Read in more data. */
\r
1072 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
\r
1073 yyg->yy_n_chars, num_to_read );
\r
1075 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
\r
1078 if ( yyg->yy_n_chars == 0 )
\r
1080 if ( number_to_move == YY_MORE_ADJ )
\r
1082 ret_val = EOB_ACT_END_OF_FILE;
\r
1083 yyfmi2restart(yyin ,yyscanner);
\r
1088 ret_val = EOB_ACT_LAST_MATCH;
\r
1089 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
\r
1090 YY_BUFFER_EOF_PENDING;
\r
1095 ret_val = EOB_ACT_CONTINUE_SCAN;
\r
1097 if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
\r
1098 /* Extend the array by 50%, plus the number we really need. */
\r
1099 yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
\r
1100 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyfmi2realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
\r
1101 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
\r
1102 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
\r
1105 yyg->yy_n_chars += number_to_move;
\r
1106 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
\r
1107 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
\r
1109 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
\r
1114 /* yy_get_previous_state - get the state just before the EOB char was reached */
\r
1116 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
\r
1118 register yy_state_type yy_current_state;
\r
1119 register char *yy_cp;
\r
1120 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1122 yy_current_state = yyg->yy_start;
\r
1124 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
\r
1126 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
\r
1127 if ( yy_accept[yy_current_state] )
\r
1129 yyg->yy_last_accepting_state = yy_current_state;
\r
1130 yyg->yy_last_accepting_cpos = yy_cp;
\r
1132 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
\r
1134 yy_current_state = (int) yy_def[yy_current_state];
\r
1135 if ( yy_current_state >= 25 )
\r
1136 yy_c = yy_meta[(unsigned int) yy_c];
\r
1138 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
\r
1141 return yy_current_state;
\r
1144 /* yy_try_NUL_trans - try to make a transition on the NUL character
\r
1147 * next_state = yy_try_NUL_trans( current_state );
\r
1149 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
\r
1151 register int yy_is_jam;
\r
1152 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
\r
1153 register char *yy_cp = yyg->yy_c_buf_p;
\r
1155 register YY_CHAR yy_c = 1;
\r
1156 if ( yy_accept[yy_current_state] )
\r
1158 yyg->yy_last_accepting_state = yy_current_state;
\r
1159 yyg->yy_last_accepting_cpos = yy_cp;
\r
1161 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
\r
1163 yy_current_state = (int) yy_def[yy_current_state];
\r
1164 if ( yy_current_state >= 25 )
\r
1165 yy_c = yy_meta[(unsigned int) yy_c];
\r
1167 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
\r
1168 yy_is_jam = (yy_current_state == 24);
\r
1171 return yy_is_jam ? 0 : yy_current_state;
\r
1174 static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
\r
1176 register char *yy_cp;
\r
1177 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1179 yy_cp = yyg->yy_c_buf_p;
\r
1181 /* undo effects of setting up yytext */
\r
1182 *yy_cp = yyg->yy_hold_char;
\r
1184 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
\r
1185 { /* need to shift things up to make room */
\r
1186 /* +2 for EOB chars. */
\r
1187 register yy_size_t number_to_move = yyg->yy_n_chars + 2;
\r
1188 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
\r
1189 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
\r
1190 register char *source =
\r
1191 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
\r
1193 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
\r
1194 *--dest = *--source;
\r
1196 yy_cp += (int) (dest - source);
\r
1197 yy_bp += (int) (dest - source);
\r
1198 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
\r
1199 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
\r
1201 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
\r
1202 YY_FATAL_ERROR( "flex scanner push-back overflow" );
\r
1205 *--yy_cp = (char) c;
\r
1207 yyg->yytext_ptr = yy_bp;
\r
1208 yyg->yy_hold_char = *yy_cp;
\r
1209 yyg->yy_c_buf_p = yy_cp;
\r
1212 #ifndef YY_NO_INPUT
\r
1213 #ifdef __cplusplus
\r
1214 static int yyinput (yyscan_t yyscanner)
\r
1216 static int input (yyscan_t yyscanner)
\r
1221 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1223 *yyg->yy_c_buf_p = yyg->yy_hold_char;
\r
1225 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
\r
1227 /* yy_c_buf_p now points to the character we want to return.
\r
1228 * If this occurs *before* the EOB characters, then it's a
\r
1229 * valid NUL; if not, then we've hit the end of the buffer.
\r
1231 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
\r
1232 /* This was really a NUL. */
\r
1233 *yyg->yy_c_buf_p = '\0';
\r
1236 { /* need more input */
\r
1237 yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
\r
1238 ++yyg->yy_c_buf_p;
\r
1240 switch ( yy_get_next_buffer( yyscanner ) )
\r
1242 case EOB_ACT_LAST_MATCH:
\r
1243 /* This happens because yy_g_n_b()
\r
1244 * sees that we've accumulated a
\r
1245 * token and flags that we need to
\r
1246 * try matching the token before
\r
1247 * proceeding. But for input(),
\r
1248 * there's no matching to consider.
\r
1249 * So convert the EOB_ACT_LAST_MATCH
\r
1250 * to EOB_ACT_END_OF_FILE.
\r
1253 /* Reset buffer status. */
\r
1254 yyfmi2restart(yyin ,yyscanner);
\r
1258 case EOB_ACT_END_OF_FILE:
\r
1260 if ( yyfmi2wrap(yyscanner ) )
\r
1263 if ( ! yyg->yy_did_buffer_switch_on_eof )
\r
1265 #ifdef __cplusplus
\r
1266 return yyinput(yyscanner);
\r
1268 return input(yyscanner);
\r
1272 case EOB_ACT_CONTINUE_SCAN:
\r
1273 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
\r
1279 c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
\r
1280 *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
\r
1281 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
\r
1285 #endif /* ifndef YY_NO_INPUT */
\r
1287 /** Immediately switch to a different input stream.
\r
1288 * @param input_file A readable stream.
\r
1289 * @param yyscanner The scanner object.
\r
1290 * @note This function does not reset the start condition to @c INITIAL .
\r
1292 void yyfmi2restart (FILE * input_file , yyscan_t yyscanner)
\r
1294 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1296 if ( ! YY_CURRENT_BUFFER ){
\r
1297 yyfmi2ensure_buffer_stack (yyscanner);
\r
1298 YY_CURRENT_BUFFER_LVALUE =
\r
1299 yyfmi2_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
\r
1302 yyfmi2_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
\r
1303 yyfmi2_load_buffer_state(yyscanner );
\r
1306 /** Switch to a different input buffer.
\r
1307 * @param new_buffer The new input buffer.
\r
1308 * @param yyscanner The scanner object.
\r
1310 void yyfmi2_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
\r
1312 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1314 /* TODO. We should be able to replace this entire function body
\r
1316 * yyfmi2pop_buffer_state();
\r
1317 * yyfmi2push_buffer_state(new_buffer);
\r
1319 yyfmi2ensure_buffer_stack (yyscanner);
\r
1320 if ( YY_CURRENT_BUFFER == new_buffer )
\r
1323 if ( YY_CURRENT_BUFFER )
\r
1325 /* Flush out information for old buffer. */
\r
1326 *yyg->yy_c_buf_p = yyg->yy_hold_char;
\r
1327 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
\r
1328 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
\r
1331 YY_CURRENT_BUFFER_LVALUE = new_buffer;
\r
1332 yyfmi2_load_buffer_state(yyscanner );
\r
1334 /* We don't actually know whether we did this switch during
\r
1335 * EOF (yyfmi2wrap()) processing, but the only time this flag
\r
1336 * is looked at is after yyfmi2wrap() is called, so it's safe
\r
1337 * to go ahead and always set it.
\r
1339 yyg->yy_did_buffer_switch_on_eof = 1;
\r
1342 static void yyfmi2_load_buffer_state (yyscan_t yyscanner)
\r
1344 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1345 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
\r
1346 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
\r
1347 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
\r
1348 yyg->yy_hold_char = *yyg->yy_c_buf_p;
\r
1351 /** Allocate and initialize an input buffer state.
\r
1352 * @param file A readable stream.
\r
1353 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
\r
1354 * @param yyscanner The scanner object.
\r
1355 * @return the allocated buffer state.
\r
1357 YY_BUFFER_STATE yyfmi2_create_buffer (FILE * file, int size , yyscan_t yyscanner)
\r
1359 YY_BUFFER_STATE b;
\r
1361 b = (YY_BUFFER_STATE) yyfmi2alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
\r
1363 YY_FATAL_ERROR( "out of dynamic memory in yyfmi2_create_buffer()" );
\r
1365 b->yy_buf_size = size;
\r
1367 /* yy_ch_buf has to be 2 characters longer than the size given because
\r
1368 * we need to put in 2 end-of-buffer characters.
\r
1370 b->yy_ch_buf = (char *) yyfmi2alloc(b->yy_buf_size + 2 ,yyscanner );
\r
1371 if ( ! b->yy_ch_buf )
\r
1372 YY_FATAL_ERROR( "out of dynamic memory in yyfmi2_create_buffer()" );
\r
1374 b->yy_is_our_buffer = 1;
\r
1376 yyfmi2_init_buffer(b,file ,yyscanner);
\r
1381 /** Destroy the buffer.
\r
1382 * @param b a buffer created with yyfmi2_create_buffer()
\r
1383 * @param yyscanner The scanner object.
\r
1385 void yyfmi2_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
\r
1387 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1392 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
\r
1393 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
\r
1395 if ( b->yy_is_our_buffer )
\r
1396 yyfmi2free((void *) b->yy_ch_buf ,yyscanner );
\r
1398 yyfmi2free((void *) b ,yyscanner );
\r
1401 /* Initializes or reinitializes a buffer.
\r
1402 * This function is sometimes called more than once on the same buffer,
\r
1403 * such as during a yyfmi2restart() or at EOF.
\r
1405 static void yyfmi2_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
\r
1408 int oerrno = errno;
\r
1409 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1411 yyfmi2_flush_buffer(b ,yyscanner);
\r
1413 b->yy_input_file = file;
\r
1414 b->yy_fill_buffer = 1;
\r
1416 /* If b is the current buffer, then yyfmi2_init_buffer was _probably_
\r
1417 * called from yyfmi2restart() or through yy_get_next_buffer.
\r
1418 * In that case, we don't want to reset the lineno or column.
\r
1420 if (b != YY_CURRENT_BUFFER){
\r
1421 b->yy_bs_lineno = 1;
\r
1422 b->yy_bs_column = 0;
\r
1425 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
\r
1430 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
\r
1431 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
\r
1432 * @param yyscanner The scanner object.
\r
1434 void yyfmi2_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
\r
1436 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1440 b->yy_n_chars = 0;
\r
1442 /* We always need two end-of-buffer characters. The first causes
\r
1443 * a transition to the end-of-buffer state. The second causes
\r
1444 * a jam in that state.
\r
1446 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
\r
1447 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
\r
1449 b->yy_buf_pos = &b->yy_ch_buf[0];
\r
1452 b->yy_buffer_status = YY_BUFFER_NEW;
\r
1454 if ( b == YY_CURRENT_BUFFER )
\r
1455 yyfmi2_load_buffer_state(yyscanner );
\r
1458 /** Pushes the new state onto the stack. The new state becomes
\r
1459 * the current state. This function will allocate the stack
\r
1461 * @param new_buffer The new state.
\r
1462 * @param yyscanner The scanner object.
\r
1464 void yyfmi2push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
\r
1466 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1467 if (new_buffer == NULL)
\r
1470 yyfmi2ensure_buffer_stack(yyscanner);
\r
1472 /* This block is copied from yyfmi2_switch_to_buffer. */
\r
1473 if ( YY_CURRENT_BUFFER )
\r
1475 /* Flush out information for old buffer. */
\r
1476 *yyg->yy_c_buf_p = yyg->yy_hold_char;
\r
1477 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
\r
1478 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
\r
1481 /* Only push if top exists. Otherwise, replace top. */
\r
1482 if (YY_CURRENT_BUFFER)
\r
1483 yyg->yy_buffer_stack_top++;
\r
1484 YY_CURRENT_BUFFER_LVALUE = new_buffer;
\r
1486 /* copied from yyfmi2_switch_to_buffer. */
\r
1487 yyfmi2_load_buffer_state(yyscanner );
\r
1488 yyg->yy_did_buffer_switch_on_eof = 1;
\r
1491 /** Removes and deletes the top of the stack, if present.
\r
1492 * The next element becomes the new top.
\r
1493 * @param yyscanner The scanner object.
\r
1495 void yyfmi2pop_buffer_state (yyscan_t yyscanner)
\r
1497 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1498 if (!YY_CURRENT_BUFFER)
\r
1501 yyfmi2_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
\r
1502 YY_CURRENT_BUFFER_LVALUE = NULL;
\r
1503 if (yyg->yy_buffer_stack_top > 0)
\r
1504 --yyg->yy_buffer_stack_top;
\r
1506 if (YY_CURRENT_BUFFER) {
\r
1507 yyfmi2_load_buffer_state(yyscanner );
\r
1508 yyg->yy_did_buffer_switch_on_eof = 1;
\r
1512 /* Allocates the stack if it does not exist.
\r
1513 * Guarantees space for at least one push.
\r
1515 static void yyfmi2ensure_buffer_stack (yyscan_t yyscanner)
\r
1517 yy_size_t num_to_alloc;
\r
1518 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1520 if (!yyg->yy_buffer_stack) {
\r
1522 /* First allocation is just for 2 elements, since we don't know if this
\r
1523 * scanner will even need a stack. We use 2 instead of 1 to avoid an
\r
1524 * immediate realloc on the next call.
\r
1527 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyfmi2alloc
\r
1528 (num_to_alloc * sizeof(struct yy_buffer_state*)
\r
1530 if ( ! yyg->yy_buffer_stack )
\r
1531 YY_FATAL_ERROR( "out of dynamic memory in yyfmi2ensure_buffer_stack()" );
\r
1533 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
\r
1535 yyg->yy_buffer_stack_max = num_to_alloc;
\r
1536 yyg->yy_buffer_stack_top = 0;
\r
1540 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
\r
1542 /* Increase the buffer to prepare for a possible push. */
\r
1543 int grow_size = 8 /* arbitrary grow size */;
\r
1545 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
\r
1546 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyfmi2realloc
\r
1547 (yyg->yy_buffer_stack,
\r
1548 num_to_alloc * sizeof(struct yy_buffer_state*)
\r
1550 if ( ! yyg->yy_buffer_stack )
\r
1551 YY_FATAL_ERROR( "out of dynamic memory in yyfmi2ensure_buffer_stack()" );
\r
1553 /* zero only the new slots.*/
\r
1554 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
\r
1555 yyg->yy_buffer_stack_max = num_to_alloc;
\r
1559 /** Setup the input buffer state to scan directly from a user-specified character buffer.
\r
1560 * @param base the character buffer
\r
1561 * @param size the size in bytes of the character buffer
\r
1562 * @param yyscanner The scanner object.
\r
1563 * @return the newly allocated buffer state object.
\r
1565 YY_BUFFER_STATE yyfmi2_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
\r
1567 YY_BUFFER_STATE b;
\r
1570 base[size-2] != YY_END_OF_BUFFER_CHAR ||
\r
1571 base[size-1] != YY_END_OF_BUFFER_CHAR )
\r
1572 /* They forgot to leave room for the EOB's. */
\r
1575 b = (YY_BUFFER_STATE) yyfmi2alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
\r
1577 YY_FATAL_ERROR( "out of dynamic memory in yyfmi2_scan_buffer()" );
\r
1579 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
\r
1580 b->yy_buf_pos = b->yy_ch_buf = base;
\r
1581 b->yy_is_our_buffer = 0;
\r
1582 b->yy_input_file = 0;
\r
1583 b->yy_n_chars = b->yy_buf_size;
\r
1584 b->yy_is_interactive = 0;
\r
1586 b->yy_fill_buffer = 0;
\r
1587 b->yy_buffer_status = YY_BUFFER_NEW;
\r
1589 yyfmi2_switch_to_buffer(b ,yyscanner );
\r
1594 /** Setup the input buffer state to scan a string. The next call to yyfmi2lex() will
\r
1595 * scan from a @e copy of @a str.
\r
1596 * @param yystr a NUL-terminated string to scan
\r
1597 * @param yyscanner The scanner object.
\r
1598 * @return the newly allocated buffer state object.
\r
1599 * @note If you want to scan bytes that may contain NUL values, then use
\r
1600 * yyfmi2_scan_bytes() instead.
\r
1602 YY_BUFFER_STATE yyfmi2_scan_string (yyconst char * yystr , yyscan_t yyscanner)
\r
1605 return yyfmi2_scan_bytes(yystr,strlen(yystr) ,yyscanner);
\r
1608 /** Setup the input buffer state to scan the given bytes. The next call to yyfmi2lex() will
\r
1609 * scan from a @e copy of @a bytes.
\r
1610 * @param yybytes the byte buffer to scan
\r
1611 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
\r
1612 * @param yyscanner The scanner object.
\r
1613 * @return the newly allocated buffer state object.
\r
1615 YY_BUFFER_STATE yyfmi2_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
\r
1617 YY_BUFFER_STATE b;
\r
1622 /* Get memory for full buffer, including space for trailing EOB's. */
\r
1623 n = _yybytes_len + 2;
\r
1624 buf = (char *) yyfmi2alloc(n ,yyscanner );
\r
1626 YY_FATAL_ERROR( "out of dynamic memory in yyfmi2_scan_bytes()" );
\r
1628 for ( i = 0; i < _yybytes_len; ++i )
\r
1629 buf[i] = yybytes[i];
\r
1631 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
\r
1633 b = yyfmi2_scan_buffer(buf,n ,yyscanner);
\r
1635 YY_FATAL_ERROR( "bad buffer in yyfmi2_scan_bytes()" );
\r
1637 /* It's okay to grow etc. this buffer, and we should throw it
\r
1638 * away when we're done.
\r
1640 b->yy_is_our_buffer = 1;
\r
1645 #ifndef YY_EXIT_FAILURE
\r
1646 #define YY_EXIT_FAILURE 2
\r
1649 static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
\r
1651 (void) fprintf( stderr, "%s\n", msg );
\r
1652 exit( YY_EXIT_FAILURE );
\r
1655 /* Redefine yyless() so it works in section 3 code. */
\r
1658 #define yyless(n) \
\r
1661 /* Undo effects of setting up yytext. */ \
\r
1662 int yyless_macro_arg = (n); \
\r
1663 YY_LESS_LINENO(yyless_macro_arg);\
\r
1664 yytext[yyleng] = yyg->yy_hold_char; \
\r
1665 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
\r
1666 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
\r
1667 *yyg->yy_c_buf_p = '\0'; \
\r
1668 yyleng = yyless_macro_arg; \
\r
1672 /* Accessor methods (get/set functions) to struct members. */
\r
1674 /** Get the user-defined data for this scanner.
\r
1675 * @param yyscanner The scanner object.
\r
1677 YY_EXTRA_TYPE yyfmi2get_extra (yyscan_t yyscanner)
\r
1679 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1683 /** Get the current line number.
\r
1684 * @param yyscanner The scanner object.
\r
1686 int yyfmi2get_lineno (yyscan_t yyscanner)
\r
1688 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1690 if (! YY_CURRENT_BUFFER)
\r
1696 /** Get the current column number.
\r
1697 * @param yyscanner The scanner object.
\r
1699 int yyfmi2get_column (yyscan_t yyscanner)
\r
1701 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1703 if (! YY_CURRENT_BUFFER)
\r
1709 /** Get the input stream.
\r
1710 * @param yyscanner The scanner object.
\r
1712 FILE *yyfmi2get_in (yyscan_t yyscanner)
\r
1714 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1718 /** Get the output stream.
\r
1719 * @param yyscanner The scanner object.
\r
1721 FILE *yyfmi2get_out (yyscan_t yyscanner)
\r
1723 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1727 /** Get the length of the current token.
\r
1728 * @param yyscanner The scanner object.
\r
1730 yy_size_t yyfmi2get_leng (yyscan_t yyscanner)
\r
1732 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1736 /** Get the current token.
\r
1737 * @param yyscanner The scanner object.
\r
1740 char *yyfmi2get_text (yyscan_t yyscanner)
\r
1742 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1746 /** Set the user-defined data. This data is never touched by the scanner.
\r
1747 * @param user_defined The data to be associated with this scanner.
\r
1748 * @param yyscanner The scanner object.
\r
1750 void yyfmi2set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
\r
1752 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1753 yyextra = user_defined ;
\r
1756 /** Set the current line number.
\r
1757 * @param line_number
\r
1758 * @param yyscanner The scanner object.
\r
1760 void yyfmi2set_lineno (int line_number , yyscan_t yyscanner)
\r
1762 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1764 /* lineno is only valid if an input buffer exists. */
\r
1765 if (! YY_CURRENT_BUFFER )
\r
1766 YY_FATAL_ERROR( "yyfmi2set_lineno called with no buffer" );
\r
1768 yylineno = line_number;
\r
1771 /** Set the current column.
\r
1772 * @param line_number
\r
1773 * @param yyscanner The scanner object.
\r
1775 void yyfmi2set_column (int column_no , yyscan_t yyscanner)
\r
1777 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1779 /* column is only valid if an input buffer exists. */
\r
1780 if (! YY_CURRENT_BUFFER )
\r
1781 YY_FATAL_ERROR( "yyfmi2set_column called with no buffer" );
\r
1783 yycolumn = column_no;
\r
1786 /** Set the input stream. This does not discard the current
\r
1788 * @param in_str A readable stream.
\r
1789 * @param yyscanner The scanner object.
\r
1790 * @see yyfmi2_switch_to_buffer
\r
1792 void yyfmi2set_in (FILE * in_str , yyscan_t yyscanner)
\r
1794 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1798 void yyfmi2set_out (FILE * out_str , yyscan_t yyscanner)
\r
1800 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1804 int yyfmi2get_debug (yyscan_t yyscanner)
\r
1806 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1807 return yy_flex_debug;
\r
1810 void yyfmi2set_debug (int bdebug , yyscan_t yyscanner)
\r
1812 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1813 yy_flex_debug = bdebug ;
\r
1816 /* Accessor methods for yylval and yylloc */
\r
1818 YYSTYPE * yyfmi2get_lval (yyscan_t yyscanner)
\r
1820 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1824 void yyfmi2set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
\r
1826 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1827 yylval = yylval_param;
\r
1830 /* User-visible API */
\r
1832 /* yyfmi2lex_init is special because it creates the scanner itself, so it is
\r
1833 * the ONLY reentrant function that doesn't take the scanner as the last argument.
\r
1834 * That's why we explicitly handle the declaration, instead of using our macros.
\r
1837 int yyfmi2lex_init(yyscan_t* ptr_yy_globals)
\r
1840 if (ptr_yy_globals == NULL){
\r
1845 *ptr_yy_globals = (yyscan_t) yyfmi2alloc ( sizeof( struct yyguts_t ), NULL );
\r
1847 if (*ptr_yy_globals == NULL){
\r
1852 /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
\r
1853 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
\r
1855 return yy_init_globals ( *ptr_yy_globals );
\r
1858 /* yyfmi2lex_init_extra has the same functionality as yyfmi2lex_init, but follows the
\r
1859 * convention of taking the scanner as the last argument. Note however, that
\r
1860 * this is a *pointer* to a scanner, as it will be allocated by this call (and
\r
1861 * is the reason, too, why this function also must handle its own declaration).
\r
1862 * The user defined value in the first argument will be available to yyfmi2alloc in
\r
1863 * the yyextra field.
\r
1866 int yyfmi2lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
\r
1869 struct yyguts_t dummy_yyguts;
\r
1871 yyfmi2set_extra (yy_user_defined, &dummy_yyguts);
\r
1873 if (ptr_yy_globals == NULL){
\r
1878 *ptr_yy_globals = (yyscan_t) yyfmi2alloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
\r
1880 if (*ptr_yy_globals == NULL){
\r
1885 /* By setting to 0xAA, we expose bugs in
\r
1886 yy_init_globals. Leave at 0x00 for releases. */
\r
1887 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
\r
1889 yyfmi2set_extra (yy_user_defined, *ptr_yy_globals);
\r
1891 return yy_init_globals ( *ptr_yy_globals );
\r
1894 static int yy_init_globals (yyscan_t yyscanner)
\r
1896 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1897 /* Initialization is the same as for the non-reentrant scanner.
\r
1898 * This function is called from yyfmi2lex_destroy(), so don't allocate here.
\r
1901 yyg->yy_buffer_stack = 0;
\r
1902 yyg->yy_buffer_stack_top = 0;
\r
1903 yyg->yy_buffer_stack_max = 0;
\r
1904 yyg->yy_c_buf_p = (char *) 0;
\r
1906 yyg->yy_start = 0;
\r
1908 yyg->yy_start_stack_ptr = 0;
\r
1909 yyg->yy_start_stack_depth = 0;
\r
1910 yyg->yy_start_stack = NULL;
\r
1912 /* Defined in main.c */
\r
1917 yyin = (FILE *) 0;
\r
1918 yyout = (FILE *) 0;
\r
1921 /* For future reference: Set errno on error, since we are called by
\r
1922 * yyfmi2lex_init()
\r
1927 /* yyfmi2lex_destroy is for both reentrant and non-reentrant scanners. */
\r
1928 int yyfmi2lex_destroy (yyscan_t yyscanner)
\r
1930 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1932 /* Pop the buffer stack, destroying each element. */
\r
1933 while(YY_CURRENT_BUFFER){
\r
1934 yyfmi2_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
\r
1935 YY_CURRENT_BUFFER_LVALUE = NULL;
\r
1936 yyfmi2pop_buffer_state(yyscanner);
\r
1939 /* Destroy the stack itself. */
\r
1940 yyfmi2free(yyg->yy_buffer_stack ,yyscanner);
\r
1941 yyg->yy_buffer_stack = NULL;
\r
1943 /* Destroy the start condition stack. */
\r
1944 yyfmi2free(yyg->yy_start_stack ,yyscanner );
\r
1945 yyg->yy_start_stack = NULL;
\r
1947 /* Reset the globals. This is important in a non-reentrant scanner so the next time
\r
1948 * yyfmi2lex() is called, initialization will occur. */
\r
1949 yy_init_globals( yyscanner);
\r
1951 /* Destroy the main struct (reentrant only). */
\r
1952 yyfmi2free ( yyscanner , yyscanner );
\r
1958 * Internal utility routines.
\r
1961 #ifndef yytext_ptr
\r
1962 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
\r
1965 for ( i = 0; i < n; ++i )
\r
1970 #ifdef YY_NEED_STRLEN
\r
1971 static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
\r
1974 for ( n = 0; s[n]; ++n )
\r
1981 void *yyfmi2alloc (yy_size_t size , yyscan_t yyscanner)
\r
1983 return (void *) malloc( size );
\r
1986 void *yyfmi2realloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
\r
1988 /* The cast to (char *) in the following accommodates both
\r
1989 * implementations that use char* generic pointers, and those
\r
1990 * that use void* generic pointers. It works with the latter
\r
1991 * because both ANSI C and C++ allow castless assignment from
\r
1992 * any pointer type to void*, and deal with argument conversions
\r
1993 * as though doing an assignment.
\r
1995 return (void *) realloc( (char *) ptr, size );
\r
1998 void yyfmi2free (void * ptr , yyscan_t yyscanner)
\r
2000 free( (char *) ptr ); /* see yyfmi2realloc() for (char *) cast */
\r
2003 #define YYTABLES_NAME "yytables"
\r