]> gerrit.simantics Code Review - simantics/fmil.git/blob - org.simantics.fmil.core/native/FMILibrary/src/XML/src-gen/FMI2/lex.yyfmi2.c
Merge remote-tracking branch 'origin/master' into release/1.35.1
[simantics/fmil.git] / org.simantics.fmil.core / native / FMILibrary / src / XML / src-gen / FMI2 / lex.yyfmi2.c
1 \r
2 #line 3 "lex.yyfmi2.c"\r
3 \r
4 #define  YY_INT_ALIGNED short int\r
5 \r
6 /* A lexical scanner generated by flex */\r
7 \r
8 #define FLEX_SCANNER\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
13 #define FLEX_BETA\r
14 #endif\r
15 \r
16 /* First, we deal with  platform-specific or compiler-specific issues. */\r
17 \r
18 /* begin standard C headers. */\r
19 #include <stdio.h>\r
20 #include <string.h>\r
21 #include <errno.h>\r
22 #include <stdlib.h>\r
23 \r
24 /* end standard C headers. */\r
25 \r
26 /* flex integer type definitions */\r
27 \r
28 #ifndef FLEXINT_H\r
29 #define FLEXINT_H\r
30 \r
31 /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */\r
32 \r
33 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L\r
34 \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
37  */\r
38 #ifndef __STDC_LIMIT_MACROS\r
39 #define __STDC_LIMIT_MACROS 1\r
40 #endif\r
41 \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
49 #else\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
56 \r
57 /* Limits of integral types. */\r
58 #ifndef INT8_MIN\r
59 #define INT8_MIN               (-128)\r
60 #endif\r
61 #ifndef INT16_MIN\r
62 #define INT16_MIN              (-32767-1)\r
63 #endif\r
64 #ifndef INT32_MIN\r
65 #define INT32_MIN              (-2147483647-1)\r
66 #endif\r
67 #ifndef INT8_MAX\r
68 #define INT8_MAX               (127)\r
69 #endif\r
70 #ifndef INT16_MAX\r
71 #define INT16_MAX              (32767)\r
72 #endif\r
73 #ifndef INT32_MAX\r
74 #define INT32_MAX              (2147483647)\r
75 #endif\r
76 #ifndef UINT8_MAX\r
77 #define UINT8_MAX              (255U)\r
78 #endif\r
79 #ifndef UINT16_MAX\r
80 #define UINT16_MAX             (65535U)\r
81 #endif\r
82 #ifndef UINT32_MAX\r
83 #define UINT32_MAX             (4294967295U)\r
84 #endif\r
85 \r
86 #endif /* ! C99 */\r
87 \r
88 #endif /* ! FLEXINT_H */\r
89 \r
90 #ifdef __cplusplus\r
91 \r
92 /* The "const" storage-class-modifier is valid. */\r
93 #define YY_USE_CONST\r
94 \r
95 #else   /* ! __cplusplus */\r
96 \r
97 /* C99 requires __STDC__ to be defined as 1. */\r
98 #if defined (__STDC__)\r
99 \r
100 #define YY_USE_CONST\r
101 \r
102 #endif  /* defined (__STDC__) */\r
103 #endif  /* ! __cplusplus */\r
104 \r
105 #ifdef YY_USE_CONST\r
106 #define yyconst const\r
107 #else\r
108 #define yyconst\r
109 #endif\r
110 \r
111 /* Returned upon end-of-file. */\r
112 #define YY_NULL 0\r
113 \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
117  * double cast.\r
118  */\r
119 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)\r
120 \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
125 #endif\r
126 \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
137 \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
141  */\r
142 #define BEGIN yyg->yy_start = 1 + 2 *\r
143 \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
146  * compatibility.\r
147  */\r
148 #define YY_START ((yyg->yy_start - 1) / 2)\r
149 #define YYSTATE YY_START\r
150 \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
153 \r
154 /* Special action meaning "start processing a new file". */\r
155 #define YY_NEW_FILE yyfmi2restart(yyin ,yyscanner )\r
156 \r
157 #define YY_END_OF_BUFFER_CHAR 0\r
158 \r
159 /* Size of default input buffer. */\r
160 #ifndef YY_BUF_SIZE\r
161 #define YY_BUF_SIZE 16384\r
162 #endif\r
163 \r
164 /* The state buf must be large enough to hold one state per character in the main buffer.\r
165  */\r
166 #define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))\r
167 \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
171 #endif\r
172 \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
176 #endif\r
177 \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
181 \r
182     #define YY_LESS_LINENO(n)\r
183     \r
184 /* Return all but the first "n" matched characters back to the input stream. */\r
185 #define yyless(n) \\r
186         do \\r
187                 { \\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
195                 } \\r
196         while ( 0 )\r
197 \r
198 #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )\r
199 \r
200 #ifndef YY_STRUCT_YY_BUFFER_STATE\r
201 #define YY_STRUCT_YY_BUFFER_STATE\r
202 struct yy_buffer_state\r
203         {\r
204         FILE *yy_input_file;\r
205 \r
206         char *yy_ch_buf;                /* input buffer */\r
207         char *yy_buf_pos;               /* current position in input buffer */\r
208 \r
209         /* Size of input buffer in bytes, not including room for EOB\r
210          * characters.\r
211          */\r
212         yy_size_t yy_buf_size;\r
213 \r
214         /* Number of characters read into yy_ch_buf, not including EOB\r
215          * characters.\r
216          */\r
217         yy_size_t yy_n_chars;\r
218 \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
221          * delete it.\r
222          */\r
223         int yy_is_our_buffer;\r
224 \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
228          * each newline.\r
229          */\r
230         int yy_is_interactive;\r
231 \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
234          * not.\r
235          */\r
236         int yy_at_bol;\r
237 \r
238     int yy_bs_lineno; /**< The line count. */\r
239     int yy_bs_column; /**< The column count. */\r
240     \r
241         /* Whether to try to fill the input buffer when we reach the\r
242          * end of it.\r
243          */\r
244         int yy_fill_buffer;\r
245 \r
246         int yy_buffer_status;\r
247 \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
255          *\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
259          */\r
260 #define YY_BUFFER_EOF_PENDING 2\r
261 \r
262         };\r
263 #endif /* !YY_STRUCT_YY_BUFFER_STATE */\r
264 \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
267  * "scanner state".\r
268  *\r
269  * Returns the top of the stack, or NULL.\r
270  */\r
271 #define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \\r
272                           ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \\r
273                           : NULL)\r
274 \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
277  */\r
278 #define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]\r
279 \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
287 \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
291 \r
292 #define YY_FLUSH_BUFFER yyfmi2_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)\r
293 \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
297 \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
301 \r
302 #define yy_new_buffer yyfmi2_create_buffer\r
303 \r
304 #define yy_set_interactive(is_interactive) \\r
305         { \\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
310         } \\r
311         YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \\r
312         }\r
313 \r
314 #define yy_set_bol(at_bol) \\r
315         { \\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
320         } \\r
321         YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \\r
322         }\r
323 \r
324 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)\r
325 \r
326 #define yyfmi2wrap(yyscanner) 1\r
327 #define YY_SKIP_YYWRAP\r
328 \r
329 typedef unsigned char YY_CHAR;\r
330 \r
331 typedef int yy_state_type;\r
332 \r
333 #define yytext_ptr yytext_r\r
334 \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
339 \r
340 /* Done after the current pattern has been matched and before the\r
341  * corresponding action - sets up yytext.\r
342  */\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
347         *yy_cp = '\0'; \\r
348         yyg->yy_c_buf_p = yy_cp;\r
349 \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
355         {\r
356         flex_int32_t yy_verify;\r
357         flex_int32_t yy_nxt;\r
358         };\r
359 static yyconst flex_int16_t yy_accept[25] =\r
360     {   0,\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
363         0,    0,    1,    0\r
364     } ;\r
365 \r
366 static yyconst flex_int32_t yy_ec[256] =\r
367     {   0,\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
378 \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
389 \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
395         1,    1,    1,    1,    1\r
396     } ;\r
397 \r
398 static yyconst flex_int32_t yy_meta[25] =\r
399     {   0,\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
402         2,    2,    2,    2\r
403     } ;\r
404 \r
405 static yyconst flex_int16_t yy_base[26] =\r
406     {   0,\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
409        23,   21,   56,   56,   24\r
410     } ;\r
411 \r
412 static yyconst flex_int16_t yy_def[26] =\r
413     {   0,\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
416        25,   24,   24,    0,   24\r
417     } ;\r
418 \r
419 static yyconst flex_int16_t yy_nxt[81] =\r
420     {   0,\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
429     } ;\r
430 \r
431 static yyconst flex_int16_t yy_chk[81] =\r
432     {   0,\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
441     } ;\r
442 \r
443 /* The intent behind this definition is that it'll catch\r
444  * any uses of REJECT which flex missed.\r
445  */\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
450 /*\r
451     Copyright (C) 2012 Modelon AB\r
452 \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
455 \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
460 \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
463 */\r
464 \r
465 #include "fmi2_xml_variable_name_parser.tab.h"\r
466 #define YYSTYPE YYFMI2STYPE\r
467 \r
468 #define LEX_VAL(ID_NAME) return ID_NAME;\r
469 \r
470 #define INITIAL 0\r
471 \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
476  */\r
477 #include <unistd.h>\r
478 #else\r
479 /*windows compatibility case*/\r
480 #include <io.h>\r
481 #define isatty _isatty\r
482 #define fileno _fileno\r
483 #endif\r
484     \r
485 #ifndef YY_EXTRA_TYPE\r
486 #define YY_EXTRA_TYPE void *\r
487 #endif\r
488 \r
489 /* Holds the entire state of the reentrant scanner. */\r
490 struct yyguts_t\r
491     {\r
492 \r
493     /* User-defined. Not touched by flex. */\r
494     YY_EXTRA_TYPE yyextra_r;\r
495 \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
501     char yy_hold_char;\r
502     yy_size_t yy_n_chars;\r
503     yy_size_t yyleng_r;\r
504     char *yy_c_buf_p;\r
505     int yy_init;\r
506     int yy_start;\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
513 \r
514     int yylineno_r;\r
515     int yy_flex_debug_r;\r
516 \r
517     char *yytext_r;\r
518     int yy_more_flag;\r
519     int yy_more_len;\r
520 \r
521     YYSTYPE * yylval_r;\r
522 \r
523     }; /* end struct yyguts_t */\r
524 \r
525 static int yy_init_globals (yyscan_t yyscanner );\r
526 \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
530     \r
531 int yyfmi2lex_init (yyscan_t* scanner);\r
532 \r
533 int yyfmi2lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);\r
534 \r
535 /* Accessor methods to globals.\r
536    These are made visible to non-reentrant scanners for convenience. */\r
537 \r
538 int yyfmi2lex_destroy (yyscan_t yyscanner );\r
539 \r
540 int yyfmi2get_debug (yyscan_t yyscanner );\r
541 \r
542 void yyfmi2set_debug (int debug_flag ,yyscan_t yyscanner );\r
543 \r
544 YY_EXTRA_TYPE yyfmi2get_extra (yyscan_t yyscanner );\r
545 \r
546 void yyfmi2set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );\r
547 \r
548 FILE *yyfmi2get_in (yyscan_t yyscanner );\r
549 \r
550 void yyfmi2set_in  (FILE * in_str ,yyscan_t yyscanner );\r
551 \r
552 FILE *yyfmi2get_out (yyscan_t yyscanner );\r
553 \r
554 void yyfmi2set_out  (FILE * out_str ,yyscan_t yyscanner );\r
555 \r
556 yy_size_t yyfmi2get_leng (yyscan_t yyscanner );\r
557 \r
558 char *yyfmi2get_text (yyscan_t yyscanner );\r
559 \r
560 int yyfmi2get_lineno (yyscan_t yyscanner );\r
561 \r
562 void yyfmi2set_lineno (int line_number ,yyscan_t yyscanner );\r
563 \r
564 int yyfmi2get_column  (yyscan_t yyscanner );\r
565 \r
566 void yyfmi2set_column (int column_no ,yyscan_t yyscanner );\r
567 \r
568 YYSTYPE * yyfmi2get_lval (yyscan_t yyscanner );\r
569 \r
570 void yyfmi2set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );\r
571 \r
572 /* Macros after this point can all be overridden by user definitions in\r
573  * section 1.\r
574  */\r
575 \r
576 #ifndef YY_SKIP_YYWRAP\r
577 #ifdef __cplusplus\r
578 extern "C" int yyfmi2wrap (yyscan_t yyscanner );\r
579 #else\r
580 extern int yyfmi2wrap (yyscan_t yyscanner );\r
581 #endif\r
582 #endif\r
583 \r
584     static void yyunput (int c,char *buf_ptr  ,yyscan_t yyscanner);\r
585     \r
586 #ifndef yytext_ptr\r
587 static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);\r
588 #endif\r
589 \r
590 #ifdef YY_NEED_STRLEN\r
591 static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);\r
592 #endif\r
593 \r
594 #ifndef YY_NO_INPUT\r
595 \r
596 #ifdef __cplusplus\r
597 static int yyinput (yyscan_t yyscanner );\r
598 #else\r
599 static int input (yyscan_t yyscanner );\r
600 #endif\r
601 \r
602 #endif\r
603 \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
607 #endif\r
608 \r
609 /* Copy whatever the last rule matched to the standard output. */\r
610 #ifndef ECHO\r
611 /* This used to be an fputs(), but since the string might contain NUL's,\r
612  * we now use fwrite().\r
613  */\r
614 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)\r
615 #endif\r
616 \r
617 /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,\r
618  * is returned in "result".\r
619  */\r
620 #ifndef YY_INPUT\r
621 #define YY_INPUT(buf,result,max_size) \\r
622         if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \\r
623                 { \\r
624                 int c = '*'; \\r
625                 size_t n; \\r
626                 for ( n = 0; n < max_size && \\r
627                              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \\r
628                         buf[n] = (char) c; \\r
629                 if ( c == '\n' ) \\r
630                         buf[n++] = (char) c; \\r
631                 if ( c == EOF && ferror( yyin ) ) \\r
632                         YY_FATAL_ERROR( "input in flex scanner failed" ); \\r
633                 result = n; \\r
634                 } \\r
635         else \\r
636                 { \\r
637                 errno=0; \\r
638                 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \\r
639                         { \\r
640                         if( errno != EINTR) \\r
641                                 { \\r
642                                 YY_FATAL_ERROR( "input in flex scanner failed" ); \\r
643                                 break; \\r
644                                 } \\r
645                         errno=0; \\r
646                         clearerr(yyin); \\r
647                         } \\r
648                 }\\r
649 \\r
650 \r
651 #endif\r
652 \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
656  */\r
657 #ifndef yyterminate\r
658 #define yyterminate() return YY_NULL\r
659 #endif\r
660 \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
664 #endif\r
665 \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
669 #endif\r
670 \r
671 /* end tables serialization structures and prototypes */\r
672 \r
673 /* Default declaration of generated scanner - a define so the user can\r
674  * easily add parameters.\r
675  */\r
676 #ifndef YY_DECL\r
677 #define YY_DECL_IS_OURS 1\r
678 \r
679 extern int yyfmi2lex \\r
680                (YYSTYPE * yylval_param ,yyscan_t yyscanner);\r
681 \r
682 #define YY_DECL int yyfmi2lex \\r
683                (YYSTYPE * yylval_param , yyscan_t yyscanner)\r
684 #endif /* !YY_DECL */\r
685 \r
686 /* Code executed at the beginning of each rule, after yytext and yyleng\r
687  * have been set up.\r
688  */\r
689 #ifndef YY_USER_ACTION\r
690 #define YY_USER_ACTION\r
691 #endif\r
692 \r
693 /* Code executed at the end of each rule. */\r
694 #ifndef YY_BREAK\r
695 #define YY_BREAK break;\r
696 #endif\r
697 \r
698 #define YY_RULE_SETUP \\r
699         YY_USER_ACTION\r
700 \r
701 /** The main scanner function which does all the work.\r
702  */\r
703 YY_DECL\r
704 {\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
709 \r
710     yylval = yylval_param;\r
711 \r
712         if ( !yyg->yy_init )\r
713                 {\r
714                 yyg->yy_init = 1;\r
715 \r
716 #ifdef YY_USER_INIT\r
717                 YY_USER_INIT;\r
718 #endif\r
719 \r
720                 if ( ! yyg->yy_start )\r
721                         yyg->yy_start = 1;      /* first start state */\r
722 \r
723                 if ( ! yyin )\r
724                         yyin = stdin;\r
725 \r
726                 if ( ! yyout )\r
727                         yyout = stdout;\r
728 \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
733                 }\r
734 \r
735                 yyfmi2_load_buffer_state(yyscanner );\r
736                 }\r
737 \r
738         while ( 1 )             /* loops until end-of-file is reached */\r
739                 {\r
740                 yy_cp = yyg->yy_c_buf_p;\r
741 \r
742                 /* Support of yytext. */\r
743                 *yy_cp = yyg->yy_hold_char;\r
744 \r
745                 /* yy_bp points to the position in yy_ch_buf of the start of\r
746                  * the current run.\r
747                  */\r
748                 yy_bp = yy_cp;\r
749 \r
750                 yy_current_state = yyg->yy_start;\r
751 yy_match:\r
752                 do\r
753                         {\r
754                         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];\r
755                         if ( yy_accept[yy_current_state] )\r
756                                 {\r
757                                 yyg->yy_last_accepting_state = yy_current_state;\r
758                                 yyg->yy_last_accepting_cpos = yy_cp;\r
759                                 }\r
760                         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )\r
761                                 {\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
765                                 }\r
766                         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];\r
767                         ++yy_cp;\r
768                         }\r
769                 while ( yy_base[yy_current_state] != 56 );\r
770 \r
771 yy_find_action:\r
772                 yy_act = yy_accept[yy_current_state];\r
773                 if ( yy_act == 0 )\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
778                         }\r
779 \r
780                 YY_DO_BEFORE_ACTION;\r
781 \r
782 do_action:      /* This label is used only to access EOF actions. */\r
783 \r
784                 switch ( yy_act )\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
792 \r
793 case 1:\r
794 YY_RULE_SETUP\r
795 {LEX_VAL(DER)}\r
796         YY_BREAK\r
797 case 2:\r
798 YY_RULE_SETUP\r
799 {LEX_VAL('(')}\r
800         YY_BREAK\r
801 case 3:\r
802 YY_RULE_SETUP\r
803 {LEX_VAL(')')}\r
804         YY_BREAK\r
805 case 4:\r
806 YY_RULE_SETUP\r
807 {LEX_VAL(',')}\r
808         YY_BREAK\r
809 case 5:\r
810 YY_RULE_SETUP\r
811 {LEX_VAL('.')}\r
812         YY_BREAK\r
813 case 6:\r
814 YY_RULE_SETUP\r
815 {LEX_VAL('[')}\r
816         YY_BREAK\r
817 case 7:\r
818 YY_RULE_SETUP\r
819 {LEX_VAL(']')}\r
820         YY_BREAK\r
821 case 8:\r
822 YY_RULE_SETUP\r
823 {LEX_VAL(Q_NAME)}\r
824         YY_BREAK\r
825 case 9:\r
826 YY_RULE_SETUP\r
827 {LEX_VAL(NONDIGIT)}\r
828         YY_BREAK\r
829 case 10:\r
830 YY_RULE_SETUP\r
831 {LEX_VAL(UNSIGNED_INTEGER);}\r
832         YY_BREAK\r
833 case 11:\r
834 YY_RULE_SETUP\r
835 {LEX_VAL(*yytext)}\r
836         YY_BREAK\r
837 \r
838 case 12:\r
839 YY_RULE_SETUP\r
840 ECHO;\r
841         YY_BREAK\r
842 case YY_STATE_EOF(INITIAL):\r
843         yyterminate();\r
844 \r
845         case YY_END_OF_BUFFER:\r
846                 {\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
849 \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
853 \r
854                 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )\r
855                         {\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
864                          */\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
868                         }\r
869 \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
875                  * in input().\r
876                  */\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
880 \r
881                         yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;\r
882 \r
883                         yy_current_state = yy_get_previous_state( yyscanner );\r
884 \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
892                          */\r
893 \r
894                         yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);\r
895 \r
896                         yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;\r
897 \r
898                         if ( yy_next_state )\r
899                                 {\r
900                                 /* Consume the NUL. */\r
901                                 yy_cp = ++yyg->yy_c_buf_p;\r
902                                 yy_current_state = yy_next_state;\r
903                                 goto yy_match;\r
904                                 }\r
905 \r
906                         else\r
907                                 {\r
908                                 yy_cp = yyg->yy_c_buf_p;\r
909                                 goto yy_find_action;\r
910                                 }\r
911                         }\r
912 \r
913                 else switch ( yy_get_next_buffer( yyscanner ) )\r
914                         {\r
915                         case EOB_ACT_END_OF_FILE:\r
916                                 {\r
917                                 yyg->yy_did_buffer_switch_on_eof = 0;\r
918 \r
919                                 if ( yyfmi2wrap(yyscanner ) )\r
920                                         {\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
929                                          */\r
930                                         yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;\r
931 \r
932                                         yy_act = YY_STATE_EOF(YY_START);\r
933                                         goto do_action;\r
934                                         }\r
935 \r
936                                 else\r
937                                         {\r
938                                         if ( ! yyg->yy_did_buffer_switch_on_eof )\r
939                                                 YY_NEW_FILE;\r
940                                         }\r
941                                 break;\r
942                                 }\r
943 \r
944                         case EOB_ACT_CONTINUE_SCAN:\r
945                                 yyg->yy_c_buf_p =\r
946                                         yyg->yytext_ptr + yy_amount_of_matched_text;\r
947 \r
948                                 yy_current_state = yy_get_previous_state( yyscanner );\r
949 \r
950                                 yy_cp = yyg->yy_c_buf_p;\r
951                                 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;\r
952                                 goto yy_match;\r
953 \r
954                         case EOB_ACT_LAST_MATCH:\r
955                                 yyg->yy_c_buf_p =\r
956                                 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];\r
957 \r
958                                 yy_current_state = yy_get_previous_state( yyscanner );\r
959 \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
963                         }\r
964                 break;\r
965                 }\r
966 \r
967         default:\r
968                 YY_FATAL_ERROR(\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
973 \r
974 /* yy_get_next_buffer - try to read in a new buffer\r
975  *\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
980  */\r
981 static int yy_get_next_buffer (yyscan_t yyscanner)\r
982 {\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
987         int ret_val;\r
988 \r
989         if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )\r
990                 YY_FATAL_ERROR(\r
991                 "fatal flex scanner internal error--end of buffer missed" );\r
992 \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
996                         {\r
997                         /* We matched a single character, the EOB, so\r
998                          * treat this as a final EOF.\r
999                          */\r
1000                         return EOB_ACT_END_OF_FILE;\r
1001                         }\r
1002 \r
1003                 else\r
1004                         {\r
1005                         /* We matched some text prior to the EOB, first\r
1006                          * process it.\r
1007                          */\r
1008                         return EOB_ACT_LAST_MATCH;\r
1009                         }\r
1010                 }\r
1011 \r
1012         /* Try to read more data. */\r
1013 \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
1016 \r
1017         for ( i = 0; i < number_to_move; ++i )\r
1018                 *(dest++) = *(source++);\r
1019 \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
1023                  */\r
1024                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;\r
1025 \r
1026         else\r
1027                 {\r
1028                         yy_size_t num_to_read =\r
1029                         YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;\r
1030 \r
1031                 while ( num_to_read <= 0 )\r
1032                         { /* Not enough room in the buffer - grow it. */\r
1033 \r
1034                         /* just a shorter name for the current buffer */\r
1035                         YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;\r
1036 \r
1037                         int yy_c_buf_p_offset =\r
1038                                 (int) (yyg->yy_c_buf_p - b->yy_ch_buf);\r
1039 \r
1040                         if ( b->yy_is_our_buffer )\r
1041                                 {\r
1042                                 yy_size_t new_size = b->yy_buf_size * 2;\r
1043 \r
1044                                 if ( new_size <= 0 )\r
1045                                         b->yy_buf_size += b->yy_buf_size / 8;\r
1046                                 else\r
1047                                         b->yy_buf_size *= 2;\r
1048 \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
1052                                 }\r
1053                         else\r
1054                                 /* Can't grow it, we don't own it. */\r
1055                                 b->yy_ch_buf = 0;\r
1056 \r
1057                         if ( ! b->yy_ch_buf )\r
1058                                 YY_FATAL_ERROR(\r
1059                                 "fatal error - scanner input buffer overflow" );\r
1060 \r
1061                         yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];\r
1062 \r
1063                         num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -\r
1064                                                 number_to_move - 1;\r
1065 \r
1066                         }\r
1067 \r
1068                 if ( num_to_read > YY_READ_BUF_SIZE )\r
1069                         num_to_read = YY_READ_BUF_SIZE;\r
1070 \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
1074 \r
1075                 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;\r
1076                 }\r
1077 \r
1078         if ( yyg->yy_n_chars == 0 )\r
1079                 {\r
1080                 if ( number_to_move == YY_MORE_ADJ )\r
1081                         {\r
1082                         ret_val = EOB_ACT_END_OF_FILE;\r
1083                         yyfmi2restart(yyin  ,yyscanner);\r
1084                         }\r
1085 \r
1086                 else\r
1087                         {\r
1088                         ret_val = EOB_ACT_LAST_MATCH;\r
1089                         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =\r
1090                                 YY_BUFFER_EOF_PENDING;\r
1091                         }\r
1092                 }\r
1093 \r
1094         else\r
1095                 ret_val = EOB_ACT_CONTINUE_SCAN;\r
1096 \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
1103         }\r
1104 \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
1108 \r
1109         yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];\r
1110 \r
1111         return ret_val;\r
1112 }\r
1113 \r
1114 /* yy_get_previous_state - get the state just before the EOB char was reached */\r
1115 \r
1116     static yy_state_type yy_get_previous_state (yyscan_t yyscanner)\r
1117 {\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
1121 \r
1122         yy_current_state = yyg->yy_start;\r
1123 \r
1124         for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )\r
1125                 {\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
1128                         {\r
1129                         yyg->yy_last_accepting_state = yy_current_state;\r
1130                         yyg->yy_last_accepting_cpos = yy_cp;\r
1131                         }\r
1132                 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )\r
1133                         {\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
1137                         }\r
1138                 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];\r
1139                 }\r
1140 \r
1141         return yy_current_state;\r
1142 }\r
1143 \r
1144 /* yy_try_NUL_trans - try to make a transition on the NUL character\r
1145  *\r
1146  * synopsis\r
1147  *      next_state = yy_try_NUL_trans( current_state );\r
1148  */\r
1149     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state , yyscan_t yyscanner)\r
1150 {\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
1154 \r
1155         register YY_CHAR yy_c = 1;\r
1156         if ( yy_accept[yy_current_state] )\r
1157                 {\r
1158                 yyg->yy_last_accepting_state = yy_current_state;\r
1159                 yyg->yy_last_accepting_cpos = yy_cp;\r
1160                 }\r
1161         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )\r
1162                 {\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
1166                 }\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
1169 \r
1170         (void)yyg;\r
1171         return yy_is_jam ? 0 : yy_current_state;\r
1172 }\r
1173 \r
1174     static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)\r
1175 {\r
1176         register char *yy_cp;\r
1177     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;\r
1178 \r
1179     yy_cp = yyg->yy_c_buf_p;\r
1180 \r
1181         /* undo effects of setting up yytext */\r
1182         *yy_cp = yyg->yy_hold_char;\r
1183 \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
1192 \r
1193                 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )\r
1194                         *--dest = *--source;\r
1195 \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
1200 \r
1201                 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )\r
1202                         YY_FATAL_ERROR( "flex scanner push-back overflow" );\r
1203                 }\r
1204 \r
1205         *--yy_cp = (char) c;\r
1206 \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
1210 }\r
1211 \r
1212 #ifndef YY_NO_INPUT\r
1213 #ifdef __cplusplus\r
1214     static int yyinput (yyscan_t yyscanner)\r
1215 #else\r
1216     static int input  (yyscan_t yyscanner)\r
1217 #endif\r
1218 \r
1219 {\r
1220         int c;\r
1221     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;\r
1222 \r
1223         *yyg->yy_c_buf_p = yyg->yy_hold_char;\r
1224 \r
1225         if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )\r
1226                 {\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
1230                  */\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
1234 \r
1235                 else\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
1239 \r
1240                         switch ( yy_get_next_buffer( yyscanner ) )\r
1241                                 {\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
1251                                          */\r
1252 \r
1253                                         /* Reset buffer status. */\r
1254                                         yyfmi2restart(yyin ,yyscanner);\r
1255 \r
1256                                         /*FALLTHROUGH*/\r
1257 \r
1258                                 case EOB_ACT_END_OF_FILE:\r
1259                                         {\r
1260                                         if ( yyfmi2wrap(yyscanner ) )\r
1261                                                 return EOF;\r
1262 \r
1263                                         if ( ! yyg->yy_did_buffer_switch_on_eof )\r
1264                                                 YY_NEW_FILE;\r
1265 #ifdef __cplusplus\r
1266                                         return yyinput(yyscanner);\r
1267 #else\r
1268                                         return input(yyscanner);\r
1269 #endif\r
1270                                         }\r
1271 \r
1272                                 case EOB_ACT_CONTINUE_SCAN:\r
1273                                         yyg->yy_c_buf_p = yyg->yytext_ptr + offset;\r
1274                                         break;\r
1275                                 }\r
1276                         }\r
1277                 }\r
1278 \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
1282 \r
1283         return c;\r
1284 }\r
1285 #endif  /* ifndef YY_NO_INPUT */\r
1286 \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
1291  */\r
1292     void yyfmi2restart  (FILE * input_file , yyscan_t yyscanner)\r
1293 {\r
1294     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;\r
1295 \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
1300         }\r
1301 \r
1302         yyfmi2_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);\r
1303         yyfmi2_load_buffer_state(yyscanner );\r
1304 }\r
1305 \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
1309  */\r
1310     void yyfmi2_switch_to_buffer  (YY_BUFFER_STATE  new_buffer , yyscan_t yyscanner)\r
1311 {\r
1312     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;\r
1313 \r
1314         /* TODO. We should be able to replace this entire function body\r
1315          * with\r
1316          *              yyfmi2pop_buffer_state();\r
1317          *              yyfmi2push_buffer_state(new_buffer);\r
1318      */\r
1319         yyfmi2ensure_buffer_stack (yyscanner);\r
1320         if ( YY_CURRENT_BUFFER == new_buffer )\r
1321                 return;\r
1322 \r
1323         if ( YY_CURRENT_BUFFER )\r
1324                 {\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
1329                 }\r
1330 \r
1331         YY_CURRENT_BUFFER_LVALUE = new_buffer;\r
1332         yyfmi2_load_buffer_state(yyscanner );\r
1333 \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
1338          */\r
1339         yyg->yy_did_buffer_switch_on_eof = 1;\r
1340 }\r
1341 \r
1342 static void yyfmi2_load_buffer_state  (yyscan_t yyscanner)\r
1343 {\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
1349 }\r
1350 \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
1356  */\r
1357     YY_BUFFER_STATE yyfmi2_create_buffer  (FILE * file, int  size , yyscan_t yyscanner)\r
1358 {\r
1359         YY_BUFFER_STATE b;\r
1360     \r
1361         b = (YY_BUFFER_STATE) yyfmi2alloc(sizeof( struct yy_buffer_state ) ,yyscanner );\r
1362         if ( ! b )\r
1363                 YY_FATAL_ERROR( "out of dynamic memory in yyfmi2_create_buffer()" );\r
1364 \r
1365         b->yy_buf_size = size;\r
1366 \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
1369          */\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
1373 \r
1374         b->yy_is_our_buffer = 1;\r
1375 \r
1376         yyfmi2_init_buffer(b,file ,yyscanner);\r
1377 \r
1378         return b;\r
1379 }\r
1380 \r
1381 /** Destroy the buffer.\r
1382  * @param b a buffer created with yyfmi2_create_buffer()\r
1383  * @param yyscanner The scanner object.\r
1384  */\r
1385     void yyfmi2_delete_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)\r
1386 {\r
1387     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;\r
1388 \r
1389         if ( ! b )\r
1390                 return;\r
1391 \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
1394 \r
1395         if ( b->yy_is_our_buffer )\r
1396                 yyfmi2free((void *) b->yy_ch_buf ,yyscanner );\r
1397 \r
1398         yyfmi2free((void *) b ,yyscanner );\r
1399 }\r
1400 \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
1404  */\r
1405     static void yyfmi2_init_buffer  (YY_BUFFER_STATE  b, FILE * file , yyscan_t yyscanner)\r
1406 \r
1407 {\r
1408         int oerrno = errno;\r
1409     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;\r
1410 \r
1411         yyfmi2_flush_buffer(b ,yyscanner);\r
1412 \r
1413         b->yy_input_file = file;\r
1414         b->yy_fill_buffer = 1;\r
1415 \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
1419      */\r
1420     if (b != YY_CURRENT_BUFFER){\r
1421         b->yy_bs_lineno = 1;\r
1422         b->yy_bs_column = 0;\r
1423     }\r
1424 \r
1425         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;\r
1426     \r
1427         errno = oerrno;\r
1428 }\r
1429 \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
1433  */\r
1434     void yyfmi2_flush_buffer (YY_BUFFER_STATE  b , yyscan_t yyscanner)\r
1435 {\r
1436     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;\r
1437         if ( ! b )\r
1438                 return;\r
1439 \r
1440         b->yy_n_chars = 0;\r
1441 \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
1445          */\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
1448 \r
1449         b->yy_buf_pos = &b->yy_ch_buf[0];\r
1450 \r
1451         b->yy_at_bol = 1;\r
1452         b->yy_buffer_status = YY_BUFFER_NEW;\r
1453 \r
1454         if ( b == YY_CURRENT_BUFFER )\r
1455                 yyfmi2_load_buffer_state(yyscanner );\r
1456 }\r
1457 \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
1460  *  if necessary.\r
1461  *  @param new_buffer The new state.\r
1462  *  @param yyscanner The scanner object.\r
1463  */\r
1464 void yyfmi2push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)\r
1465 {\r
1466     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;\r
1467         if (new_buffer == NULL)\r
1468                 return;\r
1469 \r
1470         yyfmi2ensure_buffer_stack(yyscanner);\r
1471 \r
1472         /* This block is copied from yyfmi2_switch_to_buffer. */\r
1473         if ( YY_CURRENT_BUFFER )\r
1474                 {\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
1479                 }\r
1480 \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
1485 \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
1489 }\r
1490 \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
1494  */\r
1495 void yyfmi2pop_buffer_state (yyscan_t yyscanner)\r
1496 {\r
1497     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;\r
1498         if (!YY_CURRENT_BUFFER)\r
1499                 return;\r
1500 \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
1505 \r
1506         if (YY_CURRENT_BUFFER) {\r
1507                 yyfmi2_load_buffer_state(yyscanner );\r
1508                 yyg->yy_did_buffer_switch_on_eof = 1;\r
1509         }\r
1510 }\r
1511 \r
1512 /* Allocates the stack if it does not exist.\r
1513  *  Guarantees space for at least one push.\r
1514  */\r
1515 static void yyfmi2ensure_buffer_stack (yyscan_t yyscanner)\r
1516 {\r
1517         yy_size_t num_to_alloc;\r
1518     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;\r
1519 \r
1520         if (!yyg->yy_buffer_stack) {\r
1521 \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
1525          */\r
1526                 num_to_alloc = 1;\r
1527                 yyg->yy_buffer_stack = (struct yy_buffer_state**)yyfmi2alloc\r
1528                                                                 (num_to_alloc * sizeof(struct yy_buffer_state*)\r
1529                                                                 , yyscanner);\r
1530                 if ( ! yyg->yy_buffer_stack )\r
1531                         YY_FATAL_ERROR( "out of dynamic memory in yyfmi2ensure_buffer_stack()" );\r
1532                                                                   \r
1533                 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));\r
1534                                 \r
1535                 yyg->yy_buffer_stack_max = num_to_alloc;\r
1536                 yyg->yy_buffer_stack_top = 0;\r
1537                 return;\r
1538         }\r
1539 \r
1540         if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){\r
1541 \r
1542                 /* Increase the buffer to prepare for a possible push. */\r
1543                 int grow_size = 8 /* arbitrary grow size */;\r
1544 \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
1549                                                                 , yyscanner);\r
1550                 if ( ! yyg->yy_buffer_stack )\r
1551                         YY_FATAL_ERROR( "out of dynamic memory in yyfmi2ensure_buffer_stack()" );\r
1552 \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
1556         }\r
1557 }\r
1558 \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
1564  */\r
1565 YY_BUFFER_STATE yyfmi2_scan_buffer  (char * base, yy_size_t  size , yyscan_t yyscanner)\r
1566 {\r
1567         YY_BUFFER_STATE b;\r
1568     \r
1569         if ( size < 2 ||\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
1573                 return 0;\r
1574 \r
1575         b = (YY_BUFFER_STATE) yyfmi2alloc(sizeof( struct yy_buffer_state ) ,yyscanner );\r
1576         if ( ! b )\r
1577                 YY_FATAL_ERROR( "out of dynamic memory in yyfmi2_scan_buffer()" );\r
1578 \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
1585         b->yy_at_bol = 1;\r
1586         b->yy_fill_buffer = 0;\r
1587         b->yy_buffer_status = YY_BUFFER_NEW;\r
1588 \r
1589         yyfmi2_switch_to_buffer(b ,yyscanner );\r
1590 \r
1591         return b;\r
1592 }\r
1593 \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
1601  */\r
1602 YY_BUFFER_STATE yyfmi2_scan_string (yyconst char * yystr , yyscan_t yyscanner)\r
1603 {\r
1604     \r
1605         return yyfmi2_scan_bytes(yystr,strlen(yystr) ,yyscanner);\r
1606 }\r
1607 \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
1614  */\r
1615 YY_BUFFER_STATE yyfmi2_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len , yyscan_t yyscanner)\r
1616 {\r
1617         YY_BUFFER_STATE b;\r
1618         char *buf;\r
1619         yy_size_t n;\r
1620         yy_size_t i;\r
1621     \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
1625         if ( ! buf )\r
1626                 YY_FATAL_ERROR( "out of dynamic memory in yyfmi2_scan_bytes()" );\r
1627 \r
1628         for ( i = 0; i < _yybytes_len; ++i )\r
1629                 buf[i] = yybytes[i];\r
1630 \r
1631         buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;\r
1632 \r
1633         b = yyfmi2_scan_buffer(buf,n ,yyscanner);\r
1634         if ( ! b )\r
1635                 YY_FATAL_ERROR( "bad buffer in yyfmi2_scan_bytes()" );\r
1636 \r
1637         /* It's okay to grow etc. this buffer, and we should throw it\r
1638          * away when we're done.\r
1639          */\r
1640         b->yy_is_our_buffer = 1;\r
1641 \r
1642         return b;\r
1643 }\r
1644 \r
1645 #ifndef YY_EXIT_FAILURE\r
1646 #define YY_EXIT_FAILURE 2\r
1647 #endif\r
1648 \r
1649 static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)\r
1650 {\r
1651         (void) fprintf( stderr, "%s\n", msg );\r
1652         exit( YY_EXIT_FAILURE );\r
1653 }\r
1654 \r
1655 /* Redefine yyless() so it works in section 3 code. */\r
1656 \r
1657 #undef yyless\r
1658 #define yyless(n) \\r
1659         do \\r
1660                 { \\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
1669                 } \\r
1670         while ( 0 )\r
1671 \r
1672 /* Accessor  methods (get/set functions) to struct members. */\r
1673 \r
1674 /** Get the user-defined data for this scanner.\r
1675  * @param yyscanner The scanner object.\r
1676  */\r
1677 YY_EXTRA_TYPE yyfmi2get_extra  (yyscan_t yyscanner)\r
1678 {\r
1679     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;\r
1680     return yyextra;\r
1681 }\r
1682 \r
1683 /** Get the current line number.\r
1684  * @param yyscanner The scanner object.\r
1685  */\r
1686 int yyfmi2get_lineno  (yyscan_t yyscanner)\r
1687 {\r
1688     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;\r
1689     \r
1690         if (! YY_CURRENT_BUFFER)\r
1691             return 0;\r
1692     \r
1693     return yylineno;\r
1694 }\r
1695 \r
1696 /** Get the current column number.\r
1697  * @param yyscanner The scanner object.\r
1698  */\r
1699 int yyfmi2get_column  (yyscan_t yyscanner)\r
1700 {\r
1701     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;\r
1702     \r
1703         if (! YY_CURRENT_BUFFER)\r
1704             return 0;\r
1705     \r
1706     return yycolumn;\r
1707 }\r
1708 \r
1709 /** Get the input stream.\r
1710  * @param yyscanner The scanner object.\r
1711  */\r
1712 FILE *yyfmi2get_in  (yyscan_t yyscanner)\r
1713 {\r
1714     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;\r
1715     return yyin;\r
1716 }\r
1717 \r
1718 /** Get the output stream.\r
1719  * @param yyscanner The scanner object.\r
1720  */\r
1721 FILE *yyfmi2get_out  (yyscan_t yyscanner)\r
1722 {\r
1723     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;\r
1724     return yyout;\r
1725 }\r
1726 \r
1727 /** Get the length of the current token.\r
1728  * @param yyscanner The scanner object.\r
1729  */\r
1730 yy_size_t yyfmi2get_leng  (yyscan_t yyscanner)\r
1731 {\r
1732     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;\r
1733     return yyleng;\r
1734 }\r
1735 \r
1736 /** Get the current token.\r
1737  * @param yyscanner The scanner object.\r
1738  */\r
1739 \r
1740 char *yyfmi2get_text  (yyscan_t yyscanner)\r
1741 {\r
1742     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;\r
1743     return yytext;\r
1744 }\r
1745 \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
1749  */\r
1750 void yyfmi2set_extra (YY_EXTRA_TYPE  user_defined , yyscan_t yyscanner)\r
1751 {\r
1752     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;\r
1753     yyextra = user_defined ;\r
1754 }\r
1755 \r
1756 /** Set the current line number.\r
1757  * @param line_number\r
1758  * @param yyscanner The scanner object.\r
1759  */\r
1760 void yyfmi2set_lineno (int  line_number , yyscan_t yyscanner)\r
1761 {\r
1762     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;\r
1763 \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
1767     \r
1768     yylineno = line_number;\r
1769 }\r
1770 \r
1771 /** Set the current column.\r
1772  * @param line_number\r
1773  * @param yyscanner The scanner object.\r
1774  */\r
1775 void yyfmi2set_column (int  column_no , yyscan_t yyscanner)\r
1776 {\r
1777     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;\r
1778 \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
1782     \r
1783     yycolumn = column_no;\r
1784 }\r
1785 \r
1786 /** Set the input stream. This does not discard the current\r
1787  * input buffer.\r
1788  * @param in_str A readable stream.\r
1789  * @param yyscanner The scanner object.\r
1790  * @see yyfmi2_switch_to_buffer\r
1791  */\r
1792 void yyfmi2set_in (FILE *  in_str , yyscan_t yyscanner)\r
1793 {\r
1794     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;\r
1795     yyin = in_str ;\r
1796 }\r
1797 \r
1798 void yyfmi2set_out (FILE *  out_str , yyscan_t yyscanner)\r
1799 {\r
1800     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;\r
1801     yyout = out_str ;\r
1802 }\r
1803 \r
1804 int yyfmi2get_debug  (yyscan_t yyscanner)\r
1805 {\r
1806     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;\r
1807     return yy_flex_debug;\r
1808 }\r
1809 \r
1810 void yyfmi2set_debug (int  bdebug , yyscan_t yyscanner)\r
1811 {\r
1812     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;\r
1813     yy_flex_debug = bdebug ;\r
1814 }\r
1815 \r
1816 /* Accessor methods for yylval and yylloc */\r
1817 \r
1818 YYSTYPE * yyfmi2get_lval  (yyscan_t yyscanner)\r
1819 {\r
1820     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;\r
1821     return yylval;\r
1822 }\r
1823 \r
1824 void yyfmi2set_lval (YYSTYPE *  yylval_param , yyscan_t yyscanner)\r
1825 {\r
1826     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;\r
1827     yylval = yylval_param;\r
1828 }\r
1829 \r
1830 /* User-visible API */\r
1831 \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
1835  */\r
1836 \r
1837 int yyfmi2lex_init(yyscan_t* ptr_yy_globals)\r
1838 \r
1839 {\r
1840     if (ptr_yy_globals == NULL){\r
1841         errno = EINVAL;\r
1842         return 1;\r
1843     }\r
1844 \r
1845     *ptr_yy_globals = (yyscan_t) yyfmi2alloc ( sizeof( struct yyguts_t ), NULL );\r
1846 \r
1847     if (*ptr_yy_globals == NULL){\r
1848         errno = ENOMEM;\r
1849         return 1;\r
1850     }\r
1851 \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
1854 \r
1855     return yy_init_globals ( *ptr_yy_globals );\r
1856 }\r
1857 \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
1864  */\r
1865 \r
1866 int yyfmi2lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )\r
1867 \r
1868 {\r
1869     struct yyguts_t dummy_yyguts;\r
1870 \r
1871     yyfmi2set_extra (yy_user_defined, &dummy_yyguts);\r
1872 \r
1873     if (ptr_yy_globals == NULL){\r
1874         errno = EINVAL;\r
1875         return 1;\r
1876     }\r
1877         \r
1878     *ptr_yy_globals = (yyscan_t) yyfmi2alloc ( sizeof( struct yyguts_t ), &dummy_yyguts );\r
1879         \r
1880     if (*ptr_yy_globals == NULL){\r
1881         errno = ENOMEM;\r
1882         return 1;\r
1883     }\r
1884     \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
1888     \r
1889     yyfmi2set_extra (yy_user_defined, *ptr_yy_globals);\r
1890     \r
1891     return yy_init_globals ( *ptr_yy_globals );\r
1892 }\r
1893 \r
1894 static int yy_init_globals (yyscan_t yyscanner)\r
1895 {\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
1899      */\r
1900 \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
1905     yyg->yy_init = 0;\r
1906     yyg->yy_start = 0;\r
1907 \r
1908     yyg->yy_start_stack_ptr = 0;\r
1909     yyg->yy_start_stack_depth = 0;\r
1910     yyg->yy_start_stack =  NULL;\r
1911 \r
1912 /* Defined in main.c */\r
1913 #ifdef YY_STDINIT\r
1914     yyin = stdin;\r
1915     yyout = stdout;\r
1916 #else\r
1917     yyin = (FILE *) 0;\r
1918     yyout = (FILE *) 0;\r
1919 #endif\r
1920 \r
1921     /* For future reference: Set errno on error, since we are called by\r
1922      * yyfmi2lex_init()\r
1923      */\r
1924     return 0;\r
1925 }\r
1926 \r
1927 /* yyfmi2lex_destroy is for both reentrant and non-reentrant scanners. */\r
1928 int yyfmi2lex_destroy  (yyscan_t yyscanner)\r
1929 {\r
1930     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;\r
1931 \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
1937         }\r
1938 \r
1939         /* Destroy the stack itself. */\r
1940         yyfmi2free(yyg->yy_buffer_stack ,yyscanner);\r
1941         yyg->yy_buffer_stack = NULL;\r
1942 \r
1943     /* Destroy the start condition stack. */\r
1944         yyfmi2free(yyg->yy_start_stack ,yyscanner );\r
1945         yyg->yy_start_stack = NULL;\r
1946 \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
1950 \r
1951     /* Destroy the main struct (reentrant only). */\r
1952     yyfmi2free ( yyscanner , yyscanner );\r
1953     yyscanner = NULL;\r
1954     return 0;\r
1955 }\r
1956 \r
1957 /*\r
1958  * Internal utility routines.\r
1959  */\r
1960 \r
1961 #ifndef yytext_ptr\r
1962 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)\r
1963 {\r
1964         register int i;\r
1965         for ( i = 0; i < n; ++i )\r
1966                 s1[i] = s2[i];\r
1967 }\r
1968 #endif\r
1969 \r
1970 #ifdef YY_NEED_STRLEN\r
1971 static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)\r
1972 {\r
1973         register int n;\r
1974         for ( n = 0; s[n]; ++n )\r
1975                 ;\r
1976 \r
1977         return n;\r
1978 }\r
1979 #endif\r
1980 \r
1981 void *yyfmi2alloc (yy_size_t  size , yyscan_t yyscanner)\r
1982 {\r
1983         return (void *) malloc( size );\r
1984 }\r
1985 \r
1986 void *yyfmi2realloc  (void * ptr, yy_size_t  size , yyscan_t yyscanner)\r
1987 {\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
1994          */\r
1995         return (void *) realloc( (char *) ptr, size );\r
1996 }\r
1997 \r
1998 void yyfmi2free (void * ptr , yyscan_t yyscanner)\r
1999 {\r
2000         free( (char *) ptr );   /* see yyfmi2realloc() for (char *) cast */\r
2001 }\r
2002 \r
2003 #define YYTABLES_NAME "yytables"\r
2004 \r