2 #line 3 "lex.yyfmi1.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 yyfmi1restart(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 yyfmi1restart()), 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 yyfmi1restart (FILE *input_file ,yyscan_t yyscanner );
\r
281 void yyfmi1_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
\r
282 YY_BUFFER_STATE yyfmi1_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
\r
283 void yyfmi1_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
\r
284 void yyfmi1_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
\r
285 void yyfmi1push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
\r
286 void yyfmi1pop_buffer_state (yyscan_t yyscanner );
\r
288 static void yyfmi1ensure_buffer_stack (yyscan_t yyscanner );
\r
289 static void yyfmi1_load_buffer_state (yyscan_t yyscanner );
\r
290 static void yyfmi1_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
\r
292 #define YY_FLUSH_BUFFER yyfmi1_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
\r
294 YY_BUFFER_STATE yyfmi1_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
\r
295 YY_BUFFER_STATE yyfmi1_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
\r
296 YY_BUFFER_STATE yyfmi1_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
\r
298 void *yyfmi1alloc (yy_size_t ,yyscan_t yyscanner );
\r
299 void *yyfmi1realloc (void *,yy_size_t ,yyscan_t yyscanner );
\r
300 void yyfmi1free (void * ,yyscan_t yyscanner );
\r
302 #define yy_new_buffer yyfmi1_create_buffer
\r
304 #define yy_set_interactive(is_interactive) \
\r
306 if ( ! YY_CURRENT_BUFFER ){ \
\r
307 yyfmi1ensure_buffer_stack (yyscanner); \
\r
308 YY_CURRENT_BUFFER_LVALUE = \
\r
309 yyfmi1_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 yyfmi1ensure_buffer_stack (yyscanner); \
\r
318 YY_CURRENT_BUFFER_LVALUE = \
\r
319 yyfmi1_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 yyfmi1wrap(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 13
\r
351 #define YY_END_OF_BUFFER 14
\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[27] =
\r
361 0, 0, 14, 12, 13, 12, 2, 3, 5, 6,
\r
362 11, 10, 7, 8, 10, 0, 0, 0, 4, 11,
\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, 1, 4, 1, 1, 1, 1, 5, 6,
\r
372 7, 1, 1, 8, 1, 9, 1, 10, 10, 10,
\r
373 10, 10, 10, 10, 10, 10, 10, 1, 1, 1,
\r
374 1, 1, 11, 1, 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, 1, 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, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 1, 1,
\r
401 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
405 static yyconst flex_int16_t yy_base[27] =
\r
407 0, 0, 63, 70, 70, 24, 70, 70, 57, 70,
\r
408 48, 70, 70, 70, 38, 50, 49, 45, 70, 43,
\r
409 30, 70, 46, 23, 70, 70
\r
412 static yyconst flex_int16_t yy_def[27] =
\r
414 26, 1, 26, 26, 26, 26, 26, 26, 26, 26,
\r
415 26, 26, 26, 26, 26, 6, 6, 26, 26, 26,
\r
416 26, 26, 6, 26, 26, 0
\r
419 static yyconst flex_int16_t yy_nxt[95] =
\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, 16, 16, 16, 16, 25, 16,
\r
424 16, 16, 16, 17, 16, 17, 16, 18, 16, 17,
\r
425 17, 17, 17, 17, 17, 17, 17, 17, 23, 23,
\r
426 22, 24, 20, 22, 22, 23, 21, 20, 23, 19,
\r
427 23, 23, 26, 26, 23, 23, 23, 23, 23, 3,
\r
428 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
\r
429 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
\r
434 static yyconst flex_int16_t yy_chk[95] =
\r
436 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
437 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
\r
438 1, 1, 1, 1, 6, 6, 6, 6, 24, 6,
\r
439 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
\r
440 6, 6, 6, 6, 6, 6, 6, 6, 18, 18,
\r
441 23, 21, 20, 17, 16, 18, 15, 11, 18, 9,
\r
442 18, 18, 3, 0, 18, 18, 18, 18, 18, 26,
\r
443 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
\r
444 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
\r
449 /* The intent behind this definition is that it'll catch
\r
450 * any uses of REJECT which flex missed.
\r
452 #define REJECT reject_used_but_not_detected
\r
453 #define yymore() yymore_used_but_not_detected
\r
454 #define YY_MORE_ADJ 0
\r
455 #define YY_RESTORE_YY_MORE_OFFSET
\r
457 Copyright (C) 2012 Modelon AB
\r
459 This program is free software: you can redistribute it and/or modify
\r
460 it under the terms of the BSD style license.
\r
462 This program is distributed in the hope that it will be useful,
\r
463 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
464 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
465 FMILIB_License.txt file for more details.
\r
467 You should have received a copy of the FMILIB_License.txt file
\r
468 along with this program. If not, contact Modelon AB <http://www.modelon.com>.
\r
470 #include "fmi1_xml_variable_name_parser.tab.h"
\r
471 #define YYSTYPE YYFMI1STYPE
\r
473 #define LEX_VAL(ID_NAME) return ID_NAME;
\r
477 #ifndef YY_NO_UNISTD_H
\r
478 /* Special case for "unistd.h", since it is non-ANSI. We include it way
\r
479 * down here because we want the user's section 1 to have been scanned first.
\r
480 * The user has a chance to override it with an option.
\r
482 #include <unistd.h>
\r
484 /*windows compatibility case*/
\r
486 #define isatty _isatty
\r
487 #define fileno _fileno
\r
490 #ifndef YY_EXTRA_TYPE
\r
491 #define YY_EXTRA_TYPE void *
\r
494 /* Holds the entire state of the reentrant scanner. */
\r
498 /* User-defined. Not touched by flex. */
\r
499 YY_EXTRA_TYPE yyextra_r;
\r
501 /* The rest are the same as the globals declared in the non-reentrant scanner. */
\r
502 FILE *yyin_r, *yyout_r;
\r
503 size_t yy_buffer_stack_top; /**< index of top of stack. */
\r
504 size_t yy_buffer_stack_max; /**< capacity of stack. */
\r
505 YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
\r
507 yy_size_t yy_n_chars;
\r
508 yy_size_t yyleng_r;
\r
512 int yy_did_buffer_switch_on_eof;
\r
513 int yy_start_stack_ptr;
\r
514 int yy_start_stack_depth;
\r
515 int *yy_start_stack;
\r
516 yy_state_type yy_last_accepting_state;
\r
517 char* yy_last_accepting_cpos;
\r
520 int yy_flex_debug_r;
\r
526 YYSTYPE * yylval_r;
\r
528 }; /* end struct yyguts_t */
\r
530 static int yy_init_globals (yyscan_t yyscanner );
\r
532 /* This must go here because YYSTYPE and YYLTYPE are included
\r
533 * from bison output in section 1.*/
\r
534 # define yylval yyg->yylval_r
\r
536 int yyfmi1lex_init (yyscan_t* scanner);
\r
538 int yyfmi1lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
\r
540 /* Accessor methods to globals.
\r
541 These are made visible to non-reentrant scanners for convenience. */
\r
543 int yyfmi1lex_destroy (yyscan_t yyscanner );
\r
545 int yyfmi1get_debug (yyscan_t yyscanner );
\r
547 void yyfmi1set_debug (int debug_flag ,yyscan_t yyscanner );
\r
549 YY_EXTRA_TYPE yyfmi1get_extra (yyscan_t yyscanner );
\r
551 void yyfmi1set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
\r
553 FILE *yyfmi1get_in (yyscan_t yyscanner );
\r
555 void yyfmi1set_in (FILE * in_str ,yyscan_t yyscanner );
\r
557 FILE *yyfmi1get_out (yyscan_t yyscanner );
\r
559 void yyfmi1set_out (FILE * out_str ,yyscan_t yyscanner );
\r
561 yy_size_t yyfmi1get_leng (yyscan_t yyscanner );
\r
563 char *yyfmi1get_text (yyscan_t yyscanner );
\r
565 int yyfmi1get_lineno (yyscan_t yyscanner );
\r
567 void yyfmi1set_lineno (int line_number ,yyscan_t yyscanner );
\r
569 int yyfmi1get_column (yyscan_t yyscanner );
\r
571 void yyfmi1set_column (int column_no ,yyscan_t yyscanner );
\r
573 YYSTYPE * yyfmi1get_lval (yyscan_t yyscanner );
\r
575 void yyfmi1set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
\r
577 /* Macros after this point can all be overridden by user definitions in
\r
581 #ifndef YY_SKIP_YYWRAP
\r
583 extern "C" int yyfmi1wrap (yyscan_t yyscanner );
\r
585 extern int yyfmi1wrap (yyscan_t yyscanner );
\r
589 static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner);
\r
592 static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
\r
595 #ifdef YY_NEED_STRLEN
\r
596 static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
\r
599 #ifndef YY_NO_INPUT
\r
602 static int yyinput (yyscan_t yyscanner );
\r
604 static int input (yyscan_t yyscanner );
\r
609 /* Amount of stuff to slurp up with each read. */
\r
610 #ifndef YY_READ_BUF_SIZE
\r
611 #define YY_READ_BUF_SIZE 8192
\r
614 /* Copy whatever the last rule matched to the standard output. */
\r
616 /* This used to be an fputs(), but since the string might contain NUL's,
\r
617 * we now use fwrite().
\r
619 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
\r
622 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
\r
623 * is returned in "result".
\r
626 #define YY_INPUT(buf,result,max_size) \
\r
627 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
\r
631 for ( n = 0; n < max_size && \
\r
632 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
\r
633 buf[n] = (char) c; \
\r
635 buf[n++] = (char) c; \
\r
636 if ( c == EOF && ferror( yyin ) ) \
\r
637 YY_FATAL_ERROR( "input in flex scanner failed" ); \
\r
643 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
\r
645 if( errno != EINTR) \
\r
647 YY_FATAL_ERROR( "input in flex scanner failed" ); \
\r
658 /* No semi-colon after return; correct usage is to write "yyterminate();" -
\r
659 * we don't want an extra ';' after the "return" because that will cause
\r
660 * some compilers to complain about unreachable statements.
\r
662 #ifndef yyterminate
\r
663 #define yyterminate() return YY_NULL
\r
666 /* Number of entries by which start-condition stack grows. */
\r
667 #ifndef YY_START_STACK_INCR
\r
668 #define YY_START_STACK_INCR 25
\r
671 /* Report a fatal error. */
\r
672 #ifndef YY_FATAL_ERROR
\r
673 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
\r
676 /* end tables serialization structures and prototypes */
\r
678 /* Default declaration of generated scanner - a define so the user can
\r
679 * easily add parameters.
\r
682 #define YY_DECL_IS_OURS 1
\r
684 extern int yyfmi1lex \
\r
685 (YYSTYPE * yylval_param ,yyscan_t yyscanner);
\r
687 #define YY_DECL int yyfmi1lex \
\r
688 (YYSTYPE * yylval_param , yyscan_t yyscanner)
\r
689 #endif /* !YY_DECL */
\r
691 /* Code executed at the beginning of each rule, after yytext and yyleng
\r
692 * have been set up.
\r
694 #ifndef YY_USER_ACTION
\r
695 #define YY_USER_ACTION
\r
698 /* Code executed at the end of each rule. */
\r
700 #define YY_BREAK break;
\r
703 #define YY_RULE_SETUP \
\r
706 /** The main scanner function which does all the work.
\r
710 register yy_state_type yy_current_state;
\r
711 register char *yy_cp, *yy_bp;
\r
712 register int yy_act;
\r
713 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
715 yylval = yylval_param;
\r
717 if ( !yyg->yy_init )
\r
721 #ifdef YY_USER_INIT
\r
725 if ( ! yyg->yy_start )
\r
726 yyg->yy_start = 1; /* first start state */
\r
734 if ( ! YY_CURRENT_BUFFER ) {
\r
735 yyfmi1ensure_buffer_stack (yyscanner);
\r
736 YY_CURRENT_BUFFER_LVALUE =
\r
737 yyfmi1_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
\r
740 yyfmi1_load_buffer_state(yyscanner );
\r
743 while ( 1 ) /* loops until end-of-file is reached */
\r
745 yy_cp = yyg->yy_c_buf_p;
\r
747 /* Support of yytext. */
\r
748 *yy_cp = yyg->yy_hold_char;
\r
750 /* yy_bp points to the position in yy_ch_buf of the start of
\r
755 yy_current_state = yyg->yy_start;
\r
759 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
\r
760 if ( yy_accept[yy_current_state] )
\r
762 yyg->yy_last_accepting_state = yy_current_state;
\r
763 yyg->yy_last_accepting_cpos = yy_cp;
\r
765 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
\r
767 yy_current_state = (int) yy_def[yy_current_state];
\r
768 if ( yy_current_state >= 27 )
\r
769 yy_c = yy_meta[(unsigned int) yy_c];
\r
771 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
\r
774 while ( yy_base[yy_current_state] != 70 );
\r
777 yy_act = yy_accept[yy_current_state];
\r
779 { /* have to back up */
\r
780 yy_cp = yyg->yy_last_accepting_cpos;
\r
781 yy_current_state = yyg->yy_last_accepting_state;
\r
782 yy_act = yy_accept[yy_current_state];
\r
785 YY_DO_BEFORE_ACTION;
\r
787 do_action: /* This label is used only to access EOF actions. */
\r
790 { /* beginning of action switch */
\r
791 case 0: /* must back up */
\r
792 /* undo the effects of YY_DO_BEFORE_ACTION */
\r
793 *yy_cp = yyg->yy_hold_char;
\r
794 yy_cp = yyg->yy_last_accepting_cpos;
\r
795 yy_current_state = yyg->yy_last_accepting_state;
\r
796 goto yy_find_action;
\r
831 /* rule 9 can match eol */
\r
837 {LEX_VAL(NONDIGIT)}
\r
841 {LEX_VAL(UNSIGNED_INTEGER)}
\r
852 case YY_STATE_EOF(INITIAL):
\r
855 case YY_END_OF_BUFFER:
\r
857 /* Amount of text matched not including the EOB char. */
\r
858 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
\r
860 /* Undo the effects of YY_DO_BEFORE_ACTION. */
\r
861 *yy_cp = yyg->yy_hold_char;
\r
862 YY_RESTORE_YY_MORE_OFFSET
\r
864 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
\r
866 /* We're scanning a new file or input source. It's
\r
867 * possible that this happened because the user
\r
868 * just pointed yyin at a new source and called
\r
869 * yyfmi1lex(). If so, then we have to assure
\r
870 * consistency between YY_CURRENT_BUFFER and our
\r
871 * globals. Here is the right place to do so, because
\r
872 * this is the first action (other than possibly a
\r
873 * back-up) that will match for the new input source.
\r
875 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
\r
876 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
\r
877 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
\r
880 /* Note that here we test for yy_c_buf_p "<=" to the position
\r
881 * of the first EOB in the buffer, since yy_c_buf_p will
\r
882 * already have been incremented past the NUL character
\r
883 * (since all states make transitions on EOB to the
\r
884 * end-of-buffer state). Contrast this with the test
\r
887 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
\r
888 { /* This was really a NUL. */
\r
889 yy_state_type yy_next_state;
\r
891 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
\r
893 yy_current_state = yy_get_previous_state( yyscanner );
\r
895 /* Okay, we're now positioned to make the NUL
\r
896 * transition. We couldn't have
\r
897 * yy_get_previous_state() go ahead and do it
\r
898 * for us because it doesn't know how to deal
\r
899 * with the possibility of jamming (and we don't
\r
900 * want to build jamming into it because then it
\r
901 * will run more slowly).
\r
904 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
\r
906 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
\r
908 if ( yy_next_state )
\r
910 /* Consume the NUL. */
\r
911 yy_cp = ++yyg->yy_c_buf_p;
\r
912 yy_current_state = yy_next_state;
\r
918 yy_cp = yyg->yy_c_buf_p;
\r
919 goto yy_find_action;
\r
923 else switch ( yy_get_next_buffer( yyscanner ) )
\r
925 case EOB_ACT_END_OF_FILE:
\r
927 yyg->yy_did_buffer_switch_on_eof = 0;
\r
929 if ( yyfmi1wrap(yyscanner ) )
\r
931 /* Note: because we've taken care in
\r
932 * yy_get_next_buffer() to have set up
\r
933 * yytext, we can now set up
\r
934 * yy_c_buf_p so that if some total
\r
935 * hoser (like flex itself) wants to
\r
936 * call the scanner after we return the
\r
937 * YY_NULL, it'll still work - another
\r
938 * YY_NULL will get returned.
\r
940 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
\r
942 yy_act = YY_STATE_EOF(YY_START);
\r
948 if ( ! yyg->yy_did_buffer_switch_on_eof )
\r
954 case EOB_ACT_CONTINUE_SCAN:
\r
956 yyg->yytext_ptr + yy_amount_of_matched_text;
\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
964 case EOB_ACT_LAST_MATCH:
\r
966 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
\r
968 yy_current_state = yy_get_previous_state( yyscanner );
\r
970 yy_cp = yyg->yy_c_buf_p;
\r
971 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
\r
972 goto yy_find_action;
\r
979 "fatal flex scanner internal error--no action found" );
\r
980 } /* end of action switch */
\r
981 } /* end of scanning one token */
\r
982 } /* end of yyfmi1lex */
\r
984 /* yy_get_next_buffer - try to read in a new buffer
\r
986 * Returns a code representing an action:
\r
987 * EOB_ACT_LAST_MATCH -
\r
988 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
\r
989 * EOB_ACT_END_OF_FILE - end of file
\r
991 static int yy_get_next_buffer (yyscan_t yyscanner)
\r
993 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
994 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
\r
995 register char *source = yyg->yytext_ptr;
\r
996 register int number_to_move, i;
\r
999 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
\r
1001 "fatal flex scanner internal error--end of buffer missed" );
\r
1003 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
\r
1004 { /* Don't try to fill the buffer, so this is an EOF. */
\r
1005 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
\r
1007 /* We matched a single character, the EOB, so
\r
1008 * treat this as a final EOF.
\r
1010 return EOB_ACT_END_OF_FILE;
\r
1015 /* We matched some text prior to the EOB, first
\r
1018 return EOB_ACT_LAST_MATCH;
\r
1022 /* Try to read more data. */
\r
1024 /* First move last chars to start of buffer. */
\r
1025 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
\r
1027 for ( i = 0; i < number_to_move; ++i )
\r
1028 *(dest++) = *(source++);
\r
1030 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
\r
1031 /* don't do the read, it's not guaranteed to return an EOF,
\r
1032 * just force an EOF
\r
1034 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
\r
1038 yy_size_t num_to_read =
\r
1039 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
\r
1041 while ( num_to_read <= 0 )
\r
1042 { /* Not enough room in the buffer - grow it. */
\r
1044 /* just a shorter name for the current buffer */
\r
1045 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
\r
1047 int yy_c_buf_p_offset =
\r
1048 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
\r
1050 if ( b->yy_is_our_buffer )
\r
1052 yy_size_t new_size = b->yy_buf_size * 2;
\r
1054 if ( new_size <= 0 )
\r
1055 b->yy_buf_size += b->yy_buf_size / 8;
\r
1057 b->yy_buf_size *= 2;
\r
1059 b->yy_ch_buf = (char *)
\r
1060 /* Include room in for 2 EOB chars. */
\r
1061 yyfmi1realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
\r
1064 /* Can't grow it, we don't own it. */
\r
1067 if ( ! b->yy_ch_buf )
\r
1069 "fatal error - scanner input buffer overflow" );
\r
1071 yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
\r
1073 num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
\r
1074 number_to_move - 1;
\r
1078 if ( num_to_read > YY_READ_BUF_SIZE )
\r
1079 num_to_read = YY_READ_BUF_SIZE;
\r
1081 /* Read in more data. */
\r
1082 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
\r
1083 yyg->yy_n_chars, num_to_read );
\r
1085 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
\r
1088 if ( yyg->yy_n_chars == 0 )
\r
1090 if ( number_to_move == YY_MORE_ADJ )
\r
1092 ret_val = EOB_ACT_END_OF_FILE;
\r
1093 yyfmi1restart(yyin ,yyscanner);
\r
1098 ret_val = EOB_ACT_LAST_MATCH;
\r
1099 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
\r
1100 YY_BUFFER_EOF_PENDING;
\r
1105 ret_val = EOB_ACT_CONTINUE_SCAN;
\r
1107 if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
\r
1108 /* Extend the array by 50%, plus the number we really need. */
\r
1109 yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
\r
1110 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyfmi1realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
\r
1111 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
\r
1112 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
\r
1115 yyg->yy_n_chars += number_to_move;
\r
1116 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
\r
1117 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
\r
1119 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
\r
1124 /* yy_get_previous_state - get the state just before the EOB char was reached */
\r
1126 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
\r
1128 register yy_state_type yy_current_state;
\r
1129 register char *yy_cp;
\r
1130 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1132 yy_current_state = yyg->yy_start;
\r
1134 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
\r
1136 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
\r
1137 if ( yy_accept[yy_current_state] )
\r
1139 yyg->yy_last_accepting_state = yy_current_state;
\r
1140 yyg->yy_last_accepting_cpos = yy_cp;
\r
1142 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
\r
1144 yy_current_state = (int) yy_def[yy_current_state];
\r
1145 if ( yy_current_state >= 27 )
\r
1146 yy_c = yy_meta[(unsigned int) yy_c];
\r
1148 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
\r
1151 return yy_current_state;
\r
1154 /* yy_try_NUL_trans - try to make a transition on the NUL character
\r
1157 * next_state = yy_try_NUL_trans( current_state );
\r
1159 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
\r
1161 register int yy_is_jam;
\r
1162 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
\r
1163 register char *yy_cp = yyg->yy_c_buf_p;
\r
1165 register YY_CHAR yy_c = 1;
\r
1166 if ( yy_accept[yy_current_state] )
\r
1168 yyg->yy_last_accepting_state = yy_current_state;
\r
1169 yyg->yy_last_accepting_cpos = yy_cp;
\r
1171 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
\r
1173 yy_current_state = (int) yy_def[yy_current_state];
\r
1174 if ( yy_current_state >= 27 )
\r
1175 yy_c = yy_meta[(unsigned int) yy_c];
\r
1177 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
\r
1178 yy_is_jam = (yy_current_state == 26);
\r
1181 return yy_is_jam ? 0 : yy_current_state;
\r
1184 static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
\r
1186 register char *yy_cp;
\r
1187 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1189 yy_cp = yyg->yy_c_buf_p;
\r
1191 /* undo effects of setting up yytext */
\r
1192 *yy_cp = yyg->yy_hold_char;
\r
1194 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
\r
1195 { /* need to shift things up to make room */
\r
1196 /* +2 for EOB chars. */
\r
1197 register yy_size_t number_to_move = yyg->yy_n_chars + 2;
\r
1198 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
\r
1199 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
\r
1200 register char *source =
\r
1201 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
\r
1203 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
\r
1204 *--dest = *--source;
\r
1206 yy_cp += (int) (dest - source);
\r
1207 yy_bp += (int) (dest - source);
\r
1208 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
\r
1209 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
\r
1211 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
\r
1212 YY_FATAL_ERROR( "flex scanner push-back overflow" );
\r
1215 *--yy_cp = (char) c;
\r
1217 yyg->yytext_ptr = yy_bp;
\r
1218 yyg->yy_hold_char = *yy_cp;
\r
1219 yyg->yy_c_buf_p = yy_cp;
\r
1222 #ifndef YY_NO_INPUT
\r
1223 #ifdef __cplusplus
\r
1224 static int yyinput (yyscan_t yyscanner)
\r
1226 static int input (yyscan_t yyscanner)
\r
1231 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1233 *yyg->yy_c_buf_p = yyg->yy_hold_char;
\r
1235 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
\r
1237 /* yy_c_buf_p now points to the character we want to return.
\r
1238 * If this occurs *before* the EOB characters, then it's a
\r
1239 * valid NUL; if not, then we've hit the end of the buffer.
\r
1241 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
\r
1242 /* This was really a NUL. */
\r
1243 *yyg->yy_c_buf_p = '\0';
\r
1246 { /* need more input */
\r
1247 yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
\r
1248 ++yyg->yy_c_buf_p;
\r
1250 switch ( yy_get_next_buffer( yyscanner ) )
\r
1252 case EOB_ACT_LAST_MATCH:
\r
1253 /* This happens because yy_g_n_b()
\r
1254 * sees that we've accumulated a
\r
1255 * token and flags that we need to
\r
1256 * try matching the token before
\r
1257 * proceeding. But for input(),
\r
1258 * there's no matching to consider.
\r
1259 * So convert the EOB_ACT_LAST_MATCH
\r
1260 * to EOB_ACT_END_OF_FILE.
\r
1263 /* Reset buffer status. */
\r
1264 yyfmi1restart(yyin ,yyscanner);
\r
1268 case EOB_ACT_END_OF_FILE:
\r
1270 if ( yyfmi1wrap(yyscanner ) )
\r
1273 if ( ! yyg->yy_did_buffer_switch_on_eof )
\r
1275 #ifdef __cplusplus
\r
1276 return yyinput(yyscanner);
\r
1278 return input(yyscanner);
\r
1282 case EOB_ACT_CONTINUE_SCAN:
\r
1283 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
\r
1289 c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
\r
1290 *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
\r
1291 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
\r
1295 #endif /* ifndef YY_NO_INPUT */
\r
1297 /** Immediately switch to a different input stream.
\r
1298 * @param input_file A readable stream.
\r
1299 * @param yyscanner The scanner object.
\r
1300 * @note This function does not reset the start condition to @c INITIAL .
\r
1302 void yyfmi1restart (FILE * input_file , yyscan_t yyscanner)
\r
1304 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1306 if ( ! YY_CURRENT_BUFFER ){
\r
1307 yyfmi1ensure_buffer_stack (yyscanner);
\r
1308 YY_CURRENT_BUFFER_LVALUE =
\r
1309 yyfmi1_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
\r
1312 yyfmi1_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
\r
1313 yyfmi1_load_buffer_state(yyscanner );
\r
1316 /** Switch to a different input buffer.
\r
1317 * @param new_buffer The new input buffer.
\r
1318 * @param yyscanner The scanner object.
\r
1320 void yyfmi1_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
\r
1322 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1324 /* TODO. We should be able to replace this entire function body
\r
1326 * yyfmi1pop_buffer_state();
\r
1327 * yyfmi1push_buffer_state(new_buffer);
\r
1329 yyfmi1ensure_buffer_stack (yyscanner);
\r
1330 if ( YY_CURRENT_BUFFER == new_buffer )
\r
1333 if ( YY_CURRENT_BUFFER )
\r
1335 /* Flush out information for old buffer. */
\r
1336 *yyg->yy_c_buf_p = yyg->yy_hold_char;
\r
1337 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
\r
1338 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
\r
1341 YY_CURRENT_BUFFER_LVALUE = new_buffer;
\r
1342 yyfmi1_load_buffer_state(yyscanner );
\r
1344 /* We don't actually know whether we did this switch during
\r
1345 * EOF (yyfmi1wrap()) processing, but the only time this flag
\r
1346 * is looked at is after yyfmi1wrap() is called, so it's safe
\r
1347 * to go ahead and always set it.
\r
1349 yyg->yy_did_buffer_switch_on_eof = 1;
\r
1352 static void yyfmi1_load_buffer_state (yyscan_t yyscanner)
\r
1354 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1355 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
\r
1356 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
\r
1357 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
\r
1358 yyg->yy_hold_char = *yyg->yy_c_buf_p;
\r
1361 /** Allocate and initialize an input buffer state.
\r
1362 * @param file A readable stream.
\r
1363 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
\r
1364 * @param yyscanner The scanner object.
\r
1365 * @return the allocated buffer state.
\r
1367 YY_BUFFER_STATE yyfmi1_create_buffer (FILE * file, int size , yyscan_t yyscanner)
\r
1369 YY_BUFFER_STATE b;
\r
1371 b = (YY_BUFFER_STATE) yyfmi1alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
\r
1373 YY_FATAL_ERROR( "out of dynamic memory in yyfmi1_create_buffer()" );
\r
1375 b->yy_buf_size = size;
\r
1377 /* yy_ch_buf has to be 2 characters longer than the size given because
\r
1378 * we need to put in 2 end-of-buffer characters.
\r
1380 b->yy_ch_buf = (char *) yyfmi1alloc(b->yy_buf_size + 2 ,yyscanner );
\r
1381 if ( ! b->yy_ch_buf )
\r
1382 YY_FATAL_ERROR( "out of dynamic memory in yyfmi1_create_buffer()" );
\r
1384 b->yy_is_our_buffer = 1;
\r
1386 yyfmi1_init_buffer(b,file ,yyscanner);
\r
1391 /** Destroy the buffer.
\r
1392 * @param b a buffer created with yyfmi1_create_buffer()
\r
1393 * @param yyscanner The scanner object.
\r
1395 void yyfmi1_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
\r
1397 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1402 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
\r
1403 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
\r
1405 if ( b->yy_is_our_buffer )
\r
1406 yyfmi1free((void *) b->yy_ch_buf ,yyscanner );
\r
1408 yyfmi1free((void *) b ,yyscanner );
\r
1411 /* Initializes or reinitializes a buffer.
\r
1412 * This function is sometimes called more than once on the same buffer,
\r
1413 * such as during a yyfmi1restart() or at EOF.
\r
1415 static void yyfmi1_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
\r
1418 int oerrno = errno;
\r
1419 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1421 yyfmi1_flush_buffer(b ,yyscanner);
\r
1423 b->yy_input_file = file;
\r
1424 b->yy_fill_buffer = 1;
\r
1426 /* If b is the current buffer, then yyfmi1_init_buffer was _probably_
\r
1427 * called from yyfmi1restart() or through yy_get_next_buffer.
\r
1428 * In that case, we don't want to reset the lineno or column.
\r
1430 if (b != YY_CURRENT_BUFFER){
\r
1431 b->yy_bs_lineno = 1;
\r
1432 b->yy_bs_column = 0;
\r
1435 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
\r
1440 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
\r
1441 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
\r
1442 * @param yyscanner The scanner object.
\r
1444 void yyfmi1_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
\r
1446 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1450 b->yy_n_chars = 0;
\r
1452 /* We always need two end-of-buffer characters. The first causes
\r
1453 * a transition to the end-of-buffer state. The second causes
\r
1454 * a jam in that state.
\r
1456 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
\r
1457 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
\r
1459 b->yy_buf_pos = &b->yy_ch_buf[0];
\r
1462 b->yy_buffer_status = YY_BUFFER_NEW;
\r
1464 if ( b == YY_CURRENT_BUFFER )
\r
1465 yyfmi1_load_buffer_state(yyscanner );
\r
1468 /** Pushes the new state onto the stack. The new state becomes
\r
1469 * the current state. This function will allocate the stack
\r
1471 * @param new_buffer The new state.
\r
1472 * @param yyscanner The scanner object.
\r
1474 void yyfmi1push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
\r
1476 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1477 if (new_buffer == NULL)
\r
1480 yyfmi1ensure_buffer_stack(yyscanner);
\r
1482 /* This block is copied from yyfmi1_switch_to_buffer. */
\r
1483 if ( YY_CURRENT_BUFFER )
\r
1485 /* Flush out information for old buffer. */
\r
1486 *yyg->yy_c_buf_p = yyg->yy_hold_char;
\r
1487 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
\r
1488 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
\r
1491 /* Only push if top exists. Otherwise, replace top. */
\r
1492 if (YY_CURRENT_BUFFER)
\r
1493 yyg->yy_buffer_stack_top++;
\r
1494 YY_CURRENT_BUFFER_LVALUE = new_buffer;
\r
1496 /* copied from yyfmi1_switch_to_buffer. */
\r
1497 yyfmi1_load_buffer_state(yyscanner );
\r
1498 yyg->yy_did_buffer_switch_on_eof = 1;
\r
1501 /** Removes and deletes the top of the stack, if present.
\r
1502 * The next element becomes the new top.
\r
1503 * @param yyscanner The scanner object.
\r
1505 void yyfmi1pop_buffer_state (yyscan_t yyscanner)
\r
1507 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1508 if (!YY_CURRENT_BUFFER)
\r
1511 yyfmi1_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
\r
1512 YY_CURRENT_BUFFER_LVALUE = NULL;
\r
1513 if (yyg->yy_buffer_stack_top > 0)
\r
1514 --yyg->yy_buffer_stack_top;
\r
1516 if (YY_CURRENT_BUFFER) {
\r
1517 yyfmi1_load_buffer_state(yyscanner );
\r
1518 yyg->yy_did_buffer_switch_on_eof = 1;
\r
1522 /* Allocates the stack if it does not exist.
\r
1523 * Guarantees space for at least one push.
\r
1525 static void yyfmi1ensure_buffer_stack (yyscan_t yyscanner)
\r
1527 yy_size_t num_to_alloc;
\r
1528 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1530 if (!yyg->yy_buffer_stack) {
\r
1532 /* First allocation is just for 2 elements, since we don't know if this
\r
1533 * scanner will even need a stack. We use 2 instead of 1 to avoid an
\r
1534 * immediate realloc on the next call.
\r
1537 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyfmi1alloc
\r
1538 (num_to_alloc * sizeof(struct yy_buffer_state*)
\r
1540 if ( ! yyg->yy_buffer_stack )
\r
1541 YY_FATAL_ERROR( "out of dynamic memory in yyfmi1ensure_buffer_stack()" );
\r
1543 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
\r
1545 yyg->yy_buffer_stack_max = num_to_alloc;
\r
1546 yyg->yy_buffer_stack_top = 0;
\r
1550 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
\r
1552 /* Increase the buffer to prepare for a possible push. */
\r
1553 int grow_size = 8 /* arbitrary grow size */;
\r
1555 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
\r
1556 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyfmi1realloc
\r
1557 (yyg->yy_buffer_stack,
\r
1558 num_to_alloc * sizeof(struct yy_buffer_state*)
\r
1560 if ( ! yyg->yy_buffer_stack )
\r
1561 YY_FATAL_ERROR( "out of dynamic memory in yyfmi1ensure_buffer_stack()" );
\r
1563 /* zero only the new slots.*/
\r
1564 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
\r
1565 yyg->yy_buffer_stack_max = num_to_alloc;
\r
1569 /** Setup the input buffer state to scan directly from a user-specified character buffer.
\r
1570 * @param base the character buffer
\r
1571 * @param size the size in bytes of the character buffer
\r
1572 * @param yyscanner The scanner object.
\r
1573 * @return the newly allocated buffer state object.
\r
1575 YY_BUFFER_STATE yyfmi1_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
\r
1577 YY_BUFFER_STATE b;
\r
1580 base[size-2] != YY_END_OF_BUFFER_CHAR ||
\r
1581 base[size-1] != YY_END_OF_BUFFER_CHAR )
\r
1582 /* They forgot to leave room for the EOB's. */
\r
1585 b = (YY_BUFFER_STATE) yyfmi1alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
\r
1587 YY_FATAL_ERROR( "out of dynamic memory in yyfmi1_scan_buffer()" );
\r
1589 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
\r
1590 b->yy_buf_pos = b->yy_ch_buf = base;
\r
1591 b->yy_is_our_buffer = 0;
\r
1592 b->yy_input_file = 0;
\r
1593 b->yy_n_chars = b->yy_buf_size;
\r
1594 b->yy_is_interactive = 0;
\r
1596 b->yy_fill_buffer = 0;
\r
1597 b->yy_buffer_status = YY_BUFFER_NEW;
\r
1599 yyfmi1_switch_to_buffer(b ,yyscanner );
\r
1604 /** Setup the input buffer state to scan a string. The next call to yyfmi1lex() will
\r
1605 * scan from a @e copy of @a str.
\r
1606 * @param yystr a NUL-terminated string to scan
\r
1607 * @param yyscanner The scanner object.
\r
1608 * @return the newly allocated buffer state object.
\r
1609 * @note If you want to scan bytes that may contain NUL values, then use
\r
1610 * yyfmi1_scan_bytes() instead.
\r
1612 YY_BUFFER_STATE yyfmi1_scan_string (yyconst char * yystr , yyscan_t yyscanner)
\r
1615 return yyfmi1_scan_bytes(yystr,strlen(yystr) ,yyscanner);
\r
1618 /** Setup the input buffer state to scan the given bytes. The next call to yyfmi1lex() will
\r
1619 * scan from a @e copy of @a bytes.
\r
1620 * @param yybytes the byte buffer to scan
\r
1621 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
\r
1622 * @param yyscanner The scanner object.
\r
1623 * @return the newly allocated buffer state object.
\r
1625 YY_BUFFER_STATE yyfmi1_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
\r
1627 YY_BUFFER_STATE b;
\r
1632 /* Get memory for full buffer, including space for trailing EOB's. */
\r
1633 n = _yybytes_len + 2;
\r
1634 buf = (char *) yyfmi1alloc(n ,yyscanner );
\r
1636 YY_FATAL_ERROR( "out of dynamic memory in yyfmi1_scan_bytes()" );
\r
1638 for ( i = 0; i < _yybytes_len; ++i )
\r
1639 buf[i] = yybytes[i];
\r
1641 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
\r
1643 b = yyfmi1_scan_buffer(buf,n ,yyscanner);
\r
1645 YY_FATAL_ERROR( "bad buffer in yyfmi1_scan_bytes()" );
\r
1647 /* It's okay to grow etc. this buffer, and we should throw it
\r
1648 * away when we're done.
\r
1650 b->yy_is_our_buffer = 1;
\r
1655 #ifndef YY_EXIT_FAILURE
\r
1656 #define YY_EXIT_FAILURE 2
\r
1659 static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
\r
1661 (void) fprintf( stderr, "%s\n", msg );
\r
1662 exit( YY_EXIT_FAILURE );
\r
1665 /* Redefine yyless() so it works in section 3 code. */
\r
1668 #define yyless(n) \
\r
1671 /* Undo effects of setting up yytext. */ \
\r
1672 int yyless_macro_arg = (n); \
\r
1673 YY_LESS_LINENO(yyless_macro_arg);\
\r
1674 yytext[yyleng] = yyg->yy_hold_char; \
\r
1675 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
\r
1676 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
\r
1677 *yyg->yy_c_buf_p = '\0'; \
\r
1678 yyleng = yyless_macro_arg; \
\r
1682 /* Accessor methods (get/set functions) to struct members. */
\r
1684 /** Get the user-defined data for this scanner.
\r
1685 * @param yyscanner The scanner object.
\r
1687 YY_EXTRA_TYPE yyfmi1get_extra (yyscan_t yyscanner)
\r
1689 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1693 /** Get the current line number.
\r
1694 * @param yyscanner The scanner object.
\r
1696 int yyfmi1get_lineno (yyscan_t yyscanner)
\r
1698 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1700 if (! YY_CURRENT_BUFFER)
\r
1706 /** Get the current column number.
\r
1707 * @param yyscanner The scanner object.
\r
1709 int yyfmi1get_column (yyscan_t yyscanner)
\r
1711 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1713 if (! YY_CURRENT_BUFFER)
\r
1719 /** Get the input stream.
\r
1720 * @param yyscanner The scanner object.
\r
1722 FILE *yyfmi1get_in (yyscan_t yyscanner)
\r
1724 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1728 /** Get the output stream.
\r
1729 * @param yyscanner The scanner object.
\r
1731 FILE *yyfmi1get_out (yyscan_t yyscanner)
\r
1733 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1737 /** Get the length of the current token.
\r
1738 * @param yyscanner The scanner object.
\r
1740 yy_size_t yyfmi1get_leng (yyscan_t yyscanner)
\r
1742 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1746 /** Get the current token.
\r
1747 * @param yyscanner The scanner object.
\r
1750 char *yyfmi1get_text (yyscan_t yyscanner)
\r
1752 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1756 /** Set the user-defined data. This data is never touched by the scanner.
\r
1757 * @param user_defined The data to be associated with this scanner.
\r
1758 * @param yyscanner The scanner object.
\r
1760 void yyfmi1set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
\r
1762 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1763 yyextra = user_defined ;
\r
1766 /** Set the current line number.
\r
1767 * @param line_number
\r
1768 * @param yyscanner The scanner object.
\r
1770 void yyfmi1set_lineno (int line_number , yyscan_t yyscanner)
\r
1772 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1774 /* lineno is only valid if an input buffer exists. */
\r
1775 if (! YY_CURRENT_BUFFER )
\r
1776 YY_FATAL_ERROR( "yyfmi1set_lineno called with no buffer" );
\r
1778 yylineno = line_number;
\r
1781 /** Set the current column.
\r
1782 * @param line_number
\r
1783 * @param yyscanner The scanner object.
\r
1785 void yyfmi1set_column (int column_no , yyscan_t yyscanner)
\r
1787 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1789 /* column is only valid if an input buffer exists. */
\r
1790 if (! YY_CURRENT_BUFFER )
\r
1791 YY_FATAL_ERROR( "yyfmi1set_column called with no buffer" );
\r
1793 yycolumn = column_no;
\r
1796 /** Set the input stream. This does not discard the current
\r
1798 * @param in_str A readable stream.
\r
1799 * @param yyscanner The scanner object.
\r
1800 * @see yyfmi1_switch_to_buffer
\r
1802 void yyfmi1set_in (FILE * in_str , yyscan_t yyscanner)
\r
1804 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1808 void yyfmi1set_out (FILE * out_str , yyscan_t yyscanner)
\r
1810 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1814 int yyfmi1get_debug (yyscan_t yyscanner)
\r
1816 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1817 return yy_flex_debug;
\r
1820 void yyfmi1set_debug (int bdebug , yyscan_t yyscanner)
\r
1822 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1823 yy_flex_debug = bdebug ;
\r
1826 /* Accessor methods for yylval and yylloc */
\r
1828 YYSTYPE * yyfmi1get_lval (yyscan_t yyscanner)
\r
1830 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1834 void yyfmi1set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
\r
1836 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1837 yylval = yylval_param;
\r
1840 /* User-visible API */
\r
1842 /* yyfmi1lex_init is special because it creates the scanner itself, so it is
\r
1843 * the ONLY reentrant function that doesn't take the scanner as the last argument.
\r
1844 * That's why we explicitly handle the declaration, instead of using our macros.
\r
1847 int yyfmi1lex_init(yyscan_t* ptr_yy_globals)
\r
1850 if (ptr_yy_globals == NULL){
\r
1855 *ptr_yy_globals = (yyscan_t) yyfmi1alloc ( sizeof( struct yyguts_t ), NULL );
\r
1857 if (*ptr_yy_globals == NULL){
\r
1862 /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
\r
1863 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
\r
1865 return yy_init_globals ( *ptr_yy_globals );
\r
1868 /* yyfmi1lex_init_extra has the same functionality as yyfmi1lex_init, but follows the
\r
1869 * convention of taking the scanner as the last argument. Note however, that
\r
1870 * this is a *pointer* to a scanner, as it will be allocated by this call (and
\r
1871 * is the reason, too, why this function also must handle its own declaration).
\r
1872 * The user defined value in the first argument will be available to yyfmi1alloc in
\r
1873 * the yyextra field.
\r
1876 int yyfmi1lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
\r
1879 struct yyguts_t dummy_yyguts;
\r
1881 yyfmi1set_extra (yy_user_defined, &dummy_yyguts);
\r
1883 if (ptr_yy_globals == NULL){
\r
1888 *ptr_yy_globals = (yyscan_t) yyfmi1alloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
\r
1890 if (*ptr_yy_globals == NULL){
\r
1895 /* By setting to 0xAA, we expose bugs in
\r
1896 yy_init_globals. Leave at 0x00 for releases. */
\r
1897 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
\r
1899 yyfmi1set_extra (yy_user_defined, *ptr_yy_globals);
\r
1901 return yy_init_globals ( *ptr_yy_globals );
\r
1904 static int yy_init_globals (yyscan_t yyscanner)
\r
1906 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1907 /* Initialization is the same as for the non-reentrant scanner.
\r
1908 * This function is called from yyfmi1lex_destroy(), so don't allocate here.
\r
1911 yyg->yy_buffer_stack = 0;
\r
1912 yyg->yy_buffer_stack_top = 0;
\r
1913 yyg->yy_buffer_stack_max = 0;
\r
1914 yyg->yy_c_buf_p = (char *) 0;
\r
1916 yyg->yy_start = 0;
\r
1918 yyg->yy_start_stack_ptr = 0;
\r
1919 yyg->yy_start_stack_depth = 0;
\r
1920 yyg->yy_start_stack = NULL;
\r
1922 /* Defined in main.c */
\r
1927 yyin = (FILE *) 0;
\r
1928 yyout = (FILE *) 0;
\r
1931 /* For future reference: Set errno on error, since we are called by
\r
1932 * yyfmi1lex_init()
\r
1937 /* yyfmi1lex_destroy is for both reentrant and non-reentrant scanners. */
\r
1938 int yyfmi1lex_destroy (yyscan_t yyscanner)
\r
1940 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
\r
1942 /* Pop the buffer stack, destroying each element. */
\r
1943 while(YY_CURRENT_BUFFER){
\r
1944 yyfmi1_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
\r
1945 YY_CURRENT_BUFFER_LVALUE = NULL;
\r
1946 yyfmi1pop_buffer_state(yyscanner);
\r
1949 /* Destroy the stack itself. */
\r
1950 yyfmi1free(yyg->yy_buffer_stack ,yyscanner);
\r
1951 yyg->yy_buffer_stack = NULL;
\r
1953 /* Destroy the start condition stack. */
\r
1954 yyfmi1free(yyg->yy_start_stack ,yyscanner );
\r
1955 yyg->yy_start_stack = NULL;
\r
1957 /* Reset the globals. This is important in a non-reentrant scanner so the next time
\r
1958 * yyfmi1lex() is called, initialization will occur. */
\r
1959 yy_init_globals( yyscanner);
\r
1961 /* Destroy the main struct (reentrant only). */
\r
1962 yyfmi1free ( yyscanner , yyscanner );
\r
1968 * Internal utility routines.
\r
1971 #ifndef yytext_ptr
\r
1972 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
\r
1975 for ( i = 0; i < n; ++i )
\r
1980 #ifdef YY_NEED_STRLEN
\r
1981 static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
\r
1984 for ( n = 0; s[n]; ++n )
\r
1991 void *yyfmi1alloc (yy_size_t size , yyscan_t yyscanner)
\r
1993 return (void *) malloc( size );
\r
1996 void *yyfmi1realloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
\r
1998 /* The cast to (char *) in the following accommodates both
\r
1999 * implementations that use char* generic pointers, and those
\r
2000 * that use void* generic pointers. It works with the latter
\r
2001 * because both ANSI C and C++ allow castless assignment from
\r
2002 * any pointer type to void*, and deal with argument conversions
\r
2003 * as though doing an assignment.
\r
2005 return (void *) realloc( (char *) ptr, size );
\r
2008 void yyfmi1free (void * ptr , yyscan_t yyscanner)
\r
2010 free( (char *) ptr ); /* see yyfmi1realloc() for (char *) cast */
\r
2013 #define YYTABLES_NAME "yytables"
\r