1 /* A lexical scanner generated by flex */
3 /* Scanner skeleton version:
4 * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
8 #define YY_FLEX_MAJOR_VERSION 2
9 #define YY_FLEX_MINOR_VERSION 5
14 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
27 /* Use prototypes in function declarations. */
30 /* The "const" storage-class-modifier is valid. */
33 #else /* ! __cplusplus */
41 #endif /* ! __cplusplus */
60 #define YY_PROTO(proto) proto
62 #define YY_PROTO(proto) ()
65 /* Returned upon end-of-file. */
68 /* Promotes a possibly negative, possibly signed char to an unsigned
69 * integer for use as an array index. If the signed char is negative,
70 * we want to instead treat it as an 8-bit unsigned char, hence the
73 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
75 /* Enter a start condition. This macro really ought to take a parameter,
76 * but we do it the disgusting crufty way forced on us by the ()-less
77 * definition of BEGIN.
79 #define BEGIN yy_start = 1 + 2 *
81 /* Translate the current start state into a value that can be later handed
82 * to BEGIN to return to the state. The YYSTATE alias is for lex
85 #define YY_START ((yy_start - 1) / 2)
86 #define YYSTATE YY_START
88 /* Action number for EOF rule of a given start state. */
89 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
91 /* Special action meaning "start processing a new file". */
92 #define YY_NEW_FILE yyrestart( yyin )
94 #define YY_END_OF_BUFFER_CHAR 0
96 /* Size of default input buffer. */
97 #define YY_BUF_SIZE 16384
99 typedef struct yy_buffer_state
*YY_BUFFER_STATE
;
102 extern FILE *yyin
, *yyout
;
104 #define EOB_ACT_CONTINUE_SCAN 0
105 #define EOB_ACT_END_OF_FILE 1
106 #define EOB_ACT_LAST_MATCH 2
108 /* The funky do-while in the following #define is used to turn the definition
109 * int a single C statement (which needs a semi-colon terminator). This
110 * avoids problems with code like:
112 * if ( condition_holds )
115 * do_something_else();
117 * Prior to using the do-while the compiler would get upset at the
118 * "else" because it interpreted the "if" statement as being all
119 * done when it reached the ';' after the yyless() call.
122 /* Return all but the first 'n' matched characters back to the input stream. */
127 /* Undo effects of setting up yytext. */ \
128 *yy_cp = yy_hold_char; \
129 YY_RESTORE_YY_MORE_OFFSET \
130 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
131 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
135 #define unput(c) yyunput( c, yytext_ptr )
137 /* The following is because we cannot portably get our hands on size_t
138 * (without autoconf's help, which isn't available because we want
139 * flex-generated scanners to compile on their own).
141 typedef unsigned int yy_size_t
;
144 struct yy_buffer_state
148 char *yy_ch_buf
; /* input buffer */
149 char *yy_buf_pos
; /* current position in input buffer */
151 /* Size of input buffer in bytes, not including room for EOB
154 yy_size_t yy_buf_size
;
156 /* Number of characters read into yy_ch_buf, not including EOB
161 /* Whether we "own" the buffer - i.e., we know we created it,
162 * and can realloc() it to grow it, and should free() it to
165 int yy_is_our_buffer
;
167 /* Whether this is an "interactive" input source; if so, and
168 * if we're using stdio for input, then we want to use getc()
169 * instead of fread(), to make sure we stop fetching input after
172 int yy_is_interactive
;
174 /* Whether we're considered to be at the beginning of a line.
175 * If so, '^' rules will be active on the next match, otherwise
180 /* Whether to try to fill the input buffer when we reach the
185 int yy_buffer_status
;
186 #define YY_BUFFER_NEW 0
187 #define YY_BUFFER_NORMAL 1
188 /* When an EOF's been seen but there's still some text to process
189 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
190 * shouldn't try reading from the input source any more. We might
191 * still have a bunch of tokens to match, though, because of
192 * possible backing-up.
194 * When we actually see the EOF, we change the status to "new"
195 * (via yyrestart()), so that the user can continue scanning by
196 * just pointing yyin at a new input file.
198 #define YY_BUFFER_EOF_PENDING 2
201 static YY_BUFFER_STATE yy_current_buffer
= 0;
203 /* We provide macros for accessing buffer states in case in the
204 * future we want to put the buffer states in a more general
207 #define YY_CURRENT_BUFFER yy_current_buffer
210 /* yy_hold_char holds the character lost when yytext is formed. */
211 static char yy_hold_char
;
213 static int yy_n_chars
; /* number of characters read into yy_ch_buf */
218 /* Points to current character in buffer. */
219 static char *yy_c_buf_p
= (char *) 0;
220 static int yy_init
= 1; /* whether we need to initialize */
221 static int yy_start
= 0; /* start state number */
223 /* Flag which is used to allow yywrap()'s to do buffer switches
224 * instead of setting up a fresh yyin. A bit of a hack ...
226 static int yy_did_buffer_switch_on_eof
;
228 void yyrestart
YY_PROTO(( FILE *input_file
));
230 void yy_switch_to_buffer
YY_PROTO(( YY_BUFFER_STATE new_buffer
));
231 void yy_load_buffer_state
YY_PROTO(( void ));
232 YY_BUFFER_STATE yy_create_buffer
YY_PROTO(( FILE *file
, int size
));
233 void yy_delete_buffer
YY_PROTO(( YY_BUFFER_STATE b
));
234 void yy_init_buffer
YY_PROTO(( YY_BUFFER_STATE b
, FILE *file
));
235 void yy_flush_buffer
YY_PROTO(( YY_BUFFER_STATE b
));
236 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
238 YY_BUFFER_STATE yy_scan_buffer
YY_PROTO(( char *base
, yy_size_t size
));
239 YY_BUFFER_STATE yy_scan_string
YY_PROTO(( yyconst
char *yy_str
));
240 YY_BUFFER_STATE yy_scan_bytes
YY_PROTO(( yyconst
char *bytes
, int len
));
242 static void *yy_flex_alloc
YY_PROTO(( yy_size_t
));
243 static void *yy_flex_realloc
YY_PROTO(( void *, yy_size_t
));
244 static void yy_flex_free
YY_PROTO(( void * ));
246 #define yy_new_buffer yy_create_buffer
248 #define yy_set_interactive(is_interactive) \
250 if ( ! yy_current_buffer ) \
251 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
252 yy_current_buffer->yy_is_interactive = is_interactive; \
255 #define yy_set_bol(at_bol) \
257 if ( ! yy_current_buffer ) \
258 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
259 yy_current_buffer->yy_at_bol = at_bol; \
262 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
264 typedef unsigned char YY_CHAR
;
265 FILE *yyin
= (FILE *) 0, *yyout
= (FILE *) 0;
266 typedef int yy_state_type
;
268 #define yytext_ptr yytext
270 static yy_state_type yy_get_previous_state
YY_PROTO(( void ));
271 static yy_state_type yy_try_NUL_trans
YY_PROTO(( yy_state_type current_state
));
272 static int yy_get_next_buffer
YY_PROTO(( void ));
273 static void yy_fatal_error
YY_PROTO(( yyconst
char msg
[] ));
275 /* Done after the current pattern has been matched and before the
276 * corresponding action - sets up yytext.
278 #define YY_DO_BEFORE_ACTION \
279 yytext_ptr = yy_bp; \
280 yyleng = (int) (yy_cp - yy_bp); \
281 yy_hold_char = *yy_cp; \
285 #define YY_NUM_RULES 58
286 #define YY_END_OF_BUFFER 59
287 static yyconst
short int yy_accept
[199] =
289 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
290 0, 0, 19, 19, 0, 0, 29, 29, 33, 33,
291 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
292 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
293 0, 0, 5, 5, 7, 7, 0, 0, 57, 57,
294 59, 58, 1, 9, 2, 58, 3, 10, 10, 11,
295 11, 12, 12, 13, 13, 14, 14, 23, 1, 9,
296 21, 23, 19, 22, 20, 18, 3, 25, 24, 30,
297 1, 9, 30, 29, 30, 29, 28, 27, 26, 26,
298 3, 35, 33, 33, 34, 36, 32, 31, 31, 37,
300 38, 39, 39, 40, 45, 1, 9, 42, 45, 43,
301 44, 41, 3, 15, 15, 17, 16, 47, 46, 54,
302 54, 53, 52, 49, 48, 50, 50, 51, 5, 1,
303 2, 5, 3, 6, 7, 1, 8, 2, 7, 3,
304 57, 56, 55, 1, 4, 10, 4, 11, 4, 12,
305 4, 13, 4, 14, 4, 19, 18, 24, 29, 29,
306 0, 29, 29, 26, 0, 26, 33, 0, 33, 33,
307 31, 0, 31, 37, 39, 4, 41, 15, 4, 16,
308 46, 54, 4, 52, 48, 50, 4, 5, 1, 4,
309 7, 1, 4, 57, 55, 29, 33, 0
313 static yyconst
int yy_ec
[256] =
315 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
316 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
317 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
318 1, 2, 1, 1, 4, 1, 1, 1, 1, 1,
319 1, 1, 5, 1, 6, 7, 8, 9, 9, 9,
320 9, 9, 9, 9, 9, 9, 9, 10, 11, 12,
321 13, 14, 1, 1, 15, 15, 15, 15, 16, 15,
322 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
323 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
324 1, 1, 1, 1, 15, 1, 15, 15, 15, 15,
326 16, 15, 15, 15, 15, 15, 15, 15, 15, 15,
327 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
328 15, 15, 17, 1, 18, 1, 1, 1, 1, 1,
329 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
330 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
331 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
332 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
333 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
334 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
335 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
337 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
338 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
339 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
340 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
341 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
345 static yyconst
int yy_meta
[19] =
347 1, 2, 3, 4, 5, 5, 1, 1, 6, 1,
348 7, 1, 1, 1, 8, 8, 7, 9
351 static yyconst
short int yy_base
[237] =
353 0, 16, 32, 49, 66, 83, 100, 117, 134, 151,
354 168, 185, 203, 0, 211, 217, 233, 0, 247, 0,
355 255, 0, 270, 287, 305, 0, 322, 339, 0, 0,
356 347, 353, 359, 365, 380, 397, 405, 411, 417, 423,
357 438, 455, 472, 489, 506, 522, 0, 0, 2, 6,
358 88, 842, 80, 842, 842, 73, 842, 0, 72, 0,
359 71, 0, 70, 0, 68, 0, 67, 842, 71, 842,
360 842, 64, 62, 842, 842, 0, 842, 842, 0, 842,
361 63, 842, 55, 5, 55, 533, 842, 842, 0, 545,
362 842, 842, 6, 555, 842, 842, 842, 0, 567, 0,
364 842, 0, 54, 842, 842, 59, 842, 842, 51, 842,
365 842, 0, 842, 0, 50, 842, 0, 842, 0, 0,
366 48, 842, 0, 842, 0, 0, 47, 842, 0, 52,
367 0, 40, 0, 842, 0, 45, 842, 0, 38, 0,
368 0, 842, 0, 43, 842, 0, 0, 0, 0, 0,
369 0, 0, 0, 0, 0, 35, 0, 0, 0, 7,
370 33, 16, 0, 0, 32, 30, 21, 20, 22, 0,
371 0, 19, 18, 0, 0, 0, 0, 0, 0, 0,
372 0, 0, 0, 0, 0, 0, 0, 0, 24, 0,
373 0, 11, 0, 0, 0, 3, 2, 842, 583, 592,
375 601, 610, 619, 628, 637, 646, 655, 664, 673, 682,
376 691, 700, 708, 716, 724, 732, 735, 738, 741, 744,
377 747, 755, 758, 766, 769, 772, 780, 783, 786, 794,
378 802, 810, 819, 828, 833, 835
381 static yyconst
short int yy_def
[237] =
383 199, 199, 200, 200, 201, 201, 202, 202, 203, 203,
384 204, 204, 198, 13, 2, 2, 198, 17, 2, 19,
385 2, 21, 205, 205, 198, 25, 206, 206, 2, 2,
386 2, 2, 2, 2, 207, 207, 2, 2, 2, 2,
387 208, 208, 209, 209, 210, 210, 2, 2, 211, 211,
388 198, 198, 198, 198, 198, 198, 198, 212, 212, 213,
389 213, 214, 214, 215, 215, 216, 216, 198, 198, 198,
390 198, 198, 198, 198, 198, 217, 198, 198, 218, 198,
391 198, 198, 198, 198, 198, 198, 198, 198, 219, 198,
392 198, 198, 198, 198, 198, 198, 198, 220, 198, 221,
394 198, 222, 222, 198, 198, 198, 198, 198, 198, 198,
395 198, 223, 198, 224, 224, 198, 225, 198, 226, 227,
396 227, 198, 228, 198, 229, 230, 230, 198, 231, 231,
397 231, 231, 231, 198, 232, 232, 198, 232, 232, 232,
398 233, 198, 234, 198, 198, 212, 212, 213, 213, 214,
399 214, 215, 215, 216, 216, 198, 217, 218, 86, 198,
400 235, 198, 86, 219, 198, 219, 198, 236, 198, 94,
401 220, 198, 220, 221, 222, 222, 223, 224, 224, 225,
402 226, 227, 227, 228, 229, 230, 230, 231, 231, 231,
403 232, 232, 232, 233, 234, 198, 198, 0, 198, 198,
405 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
406 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
407 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
408 198, 198, 198, 198, 198, 198
411 static yyconst
short int yy_nxt
[861] =
413 198, 53, 54, 55, 142, 143, 198, 56, 142, 143,
414 197, 196, 192, 160, 167, 160, 57, 53, 54, 55,
415 161, 168, 161, 56, 160, 189, 173, 197, 197, 167,
416 167, 161, 57, 53, 54, 55, 168, 168, 166, 59,
417 196, 196, 52, 156, 144, 193, 192, 190, 57, 52,
418 53, 54, 55, 189, 187, 183, 59, 179, 145, 52,
419 144, 176, 145, 159, 144, 57, 52, 53, 54, 55,
420 156, 145, 144, 61, 155, 153, 52, 151, 149, 147,
421 145, 144, 57, 52, 53, 54, 55, 198, 198, 198,
422 61, 198, 198, 52, 198, 198, 198, 198, 198, 57,
424 52, 53, 54, 55, 198, 198, 198, 63, 198, 198,
425 52, 198, 198, 198, 198, 198, 57, 52, 53, 54,
426 55, 198, 198, 198, 63, 198, 198, 52, 198, 198,
427 198, 198, 198, 57, 52, 53, 54, 55, 198, 198,
428 198, 65, 198, 198, 52, 198, 198, 198, 198, 198,
429 57, 52, 53, 54, 55, 198, 198, 198, 65, 198,
430 198, 52, 198, 198, 198, 198, 198, 57, 52, 53,
431 54, 55, 198, 198, 198, 67, 198, 198, 52, 198,
432 198, 198, 198, 198, 57, 52, 53, 54, 55, 198,
433 198, 198, 67, 198, 198, 52, 198, 198, 198, 198,
435 198, 57, 52, 68, 69, 70, 55, 71, 68, 68,
436 72, 73, 68, 74, 68, 75, 68, 76, 76, 77,
437 68, 78, 198, 198, 198, 79, 79, 78, 198, 198,
438 198, 79, 79, 80, 81, 82, 55, 83, 83, 84,
439 85, 86, 80, 87, 80, 88, 80, 89, 90, 91,
440 80, 92, 92, 93, 198, 94, 95, 198, 96, 97,
441 198, 98, 99, 100, 198, 198, 198, 198, 101, 100,
442 100, 53, 54, 55, 198, 198, 198, 103, 198, 198,
443 104, 198, 198, 198, 198, 198, 57, 52, 53, 54,
444 55, 198, 198, 198, 103, 198, 198, 104, 198, 198,
446 198, 198, 198, 57, 52, 105, 106, 107, 55, 108,
447 105, 105, 109, 105, 110, 111, 105, 105, 105, 112,
448 112, 113, 105, 53, 54, 55, 198, 198, 198, 115,
449 198, 198, 52, 198, 198, 198, 198, 198, 57, 52,
450 53, 54, 55, 198, 198, 198, 115, 198, 198, 52,
451 198, 198, 198, 198, 198, 57, 52, 116, 198, 198,
452 198, 117, 117, 116, 198, 198, 198, 117, 117, 118,
453 198, 198, 198, 119, 119, 118, 198, 198, 198, 119,
454 119, 53, 54, 55, 198, 198, 198, 121, 198, 198,
455 52, 198, 198, 198, 198, 198, 57, 52, 53, 54,
457 55, 198, 198, 198, 121, 198, 198, 52, 198, 198,
458 198, 198, 198, 57, 52, 122, 198, 198, 198, 123,
459 123, 122, 198, 198, 198, 123, 123, 124, 198, 198,
460 198, 125, 125, 124, 198, 198, 198, 125, 125, 53,
461 54, 55, 198, 198, 198, 127, 198, 198, 128, 198,
462 198, 198, 198, 198, 57, 52, 53, 54, 55, 198,
463 198, 198, 127, 198, 198, 128, 198, 198, 198, 198,
464 198, 57, 52, 130, 54, 131, 198, 198, 198, 132,
465 198, 198, 198, 198, 198, 198, 198, 198, 133, 134,
466 130, 54, 131, 198, 198, 198, 132, 198, 198, 198,
468 198, 198, 198, 198, 198, 133, 134, 136, 137, 138,
469 198, 198, 198, 139, 198, 198, 198, 198, 198, 198,
470 198, 198, 140, 136, 137, 138, 198, 198, 198, 139,
471 198, 198, 198, 198, 198, 198, 198, 198, 140, 162,
472 198, 163, 198, 198, 198, 198, 198, 198, 161, 165,
473 165, 198, 198, 166, 198, 198, 198, 198, 198, 164,
474 164, 169, 198, 170, 198, 198, 198, 198, 198, 198,
475 168, 172, 172, 198, 198, 173, 198, 198, 198, 198,
476 198, 171, 171, 52, 52, 52, 52, 52, 52, 52,
477 52, 52, 58, 58, 58, 58, 58, 58, 58, 58,
479 58, 60, 60, 60, 60, 60, 60, 60, 60, 60,
480 62, 62, 62, 62, 62, 62, 62, 62, 62, 64,
481 64, 64, 64, 64, 64, 64, 64, 64, 66, 66,
482 66, 66, 66, 66, 66, 66, 66, 102, 102, 102,
483 102, 102, 102, 102, 102, 102, 114, 114, 114, 114,
484 114, 114, 114, 114, 114, 120, 120, 120, 120, 120,
485 120, 120, 120, 120, 126, 126, 126, 126, 126, 126,
486 126, 126, 126, 129, 129, 129, 129, 129, 129, 129,
487 129, 129, 135, 135, 135, 135, 135, 135, 135, 135,
488 135, 141, 141, 141, 141, 141, 141, 141, 141, 141,
490 146, 198, 198, 198, 146, 146, 198, 146, 148, 198,
491 198, 198, 148, 148, 198, 148, 150, 198, 198, 198,
492 150, 150, 198, 150, 152, 198, 198, 198, 152, 152,
493 198, 152, 154, 198, 198, 198, 154, 154, 198, 154,
494 157, 198, 157, 158, 198, 158, 164, 198, 164, 171,
495 198, 171, 174, 198, 174, 175, 198, 198, 198, 175,
496 175, 198, 175, 177, 198, 177, 178, 198, 198, 198,
497 178, 178, 198, 178, 180, 198, 180, 181, 198, 181,
498 182, 198, 198, 198, 182, 182, 198, 182, 184, 198,
499 184, 185, 198, 185, 186, 198, 198, 198, 186, 186,
501 198, 186, 188, 188, 198, 188, 188, 188, 188, 188,
502 191, 191, 198, 191, 191, 191, 191, 191, 191, 194,
503 194, 198, 198, 194, 194, 194, 194, 194, 195, 198,
504 198, 195, 195, 195, 195, 195, 195, 165, 165, 172,
505 172, 51, 198, 198, 198, 198, 198, 198, 198, 198,
506 198, 198, 198, 198, 198, 198, 198, 198, 198, 198
509 static yyconst
short int yy_chk
[861] =
511 0, 1, 1, 1, 49, 49, 0, 1, 50, 50,
512 197, 196, 192, 84, 93, 160, 1, 2, 2, 2,
513 84, 93, 160, 2, 162, 189, 173, 172, 168, 167,
514 169, 162, 2, 3, 3, 3, 167, 169, 166, 3,
515 165, 161, 3, 156, 144, 139, 136, 132, 3, 3,
516 4, 4, 4, 130, 127, 121, 4, 115, 109, 4,
517 106, 103, 85, 83, 81, 4, 4, 5, 5, 5,
518 73, 72, 69, 5, 67, 65, 5, 63, 61, 59,
519 56, 53, 5, 5, 6, 6, 6, 51, 0, 0,
520 6, 0, 0, 6, 0, 0, 0, 0, 0, 6,
522 6, 7, 7, 7, 0, 0, 0, 7, 0, 0,
523 7, 0, 0, 0, 0, 0, 7, 7, 8, 8,
524 8, 0, 0, 0, 8, 0, 0, 8, 0, 0,
525 0, 0, 0, 8, 8, 9, 9, 9, 0, 0,
526 0, 9, 0, 0, 9, 0, 0, 0, 0, 0,
527 9, 9, 10, 10, 10, 0, 0, 0, 10, 0,
528 0, 10, 0, 0, 0, 0, 0, 10, 10, 11,
529 11, 11, 0, 0, 0, 11, 0, 0, 11, 0,
530 0, 0, 0, 0, 11, 11, 12, 12, 12, 0,
531 0, 0, 12, 0, 0, 12, 0, 0, 0, 0,
533 0, 12, 12, 13, 13, 13, 13, 13, 13, 13,
534 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
535 13, 15, 0, 0, 0, 15, 15, 16, 0, 0,
536 0, 16, 16, 17, 17, 17, 17, 17, 17, 17,
537 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
538 17, 19, 19, 19, 0, 19, 19, 0, 19, 19,
539 0, 19, 19, 21, 0, 0, 0, 0, 21, 21,
540 21, 23, 23, 23, 0, 0, 0, 23, 0, 0,
541 23, 0, 0, 0, 0, 0, 23, 23, 24, 24,
542 24, 0, 0, 0, 24, 0, 0, 24, 0, 0,
544 0, 0, 0, 24, 24, 25, 25, 25, 25, 25,
545 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
546 25, 25, 25, 27, 27, 27, 0, 0, 0, 27,
547 0, 0, 27, 0, 0, 0, 0, 0, 27, 27,
548 28, 28, 28, 0, 0, 0, 28, 0, 0, 28,
549 0, 0, 0, 0, 0, 28, 28, 31, 0, 0,
550 0, 31, 31, 32, 0, 0, 0, 32, 32, 33,
551 0, 0, 0, 33, 33, 34, 0, 0, 0, 34,
552 34, 35, 35, 35, 0, 0, 0, 35, 0, 0,
553 35, 0, 0, 0, 0, 0, 35, 35, 36, 36,
555 36, 0, 0, 0, 36, 0, 0, 36, 0, 0,
556 0, 0, 0, 36, 36, 37, 0, 0, 0, 37,
557 37, 38, 0, 0, 0, 38, 38, 39, 0, 0,
558 0, 39, 39, 40, 0, 0, 0, 40, 40, 41,
559 41, 41, 0, 0, 0, 41, 0, 0, 41, 0,
560 0, 0, 0, 0, 41, 41, 42, 42, 42, 0,
561 0, 0, 42, 0, 0, 42, 0, 0, 0, 0,
562 0, 42, 42, 43, 43, 43, 0, 0, 0, 43,
563 0, 0, 0, 0, 0, 0, 0, 0, 43, 43,
564 44, 44, 44, 0, 0, 0, 44, 0, 0, 0,
566 0, 0, 0, 0, 0, 44, 44, 45, 45, 45,
567 0, 0, 0, 45, 0, 0, 0, 0, 0, 0,
568 0, 0, 45, 46, 46, 46, 0, 0, 0, 46,
569 0, 0, 0, 0, 0, 0, 0, 0, 46, 86,
570 0, 86, 0, 0, 0, 0, 0, 0, 86, 90,
571 90, 0, 0, 90, 0, 0, 0, 0, 0, 90,
572 90, 94, 0, 94, 0, 0, 0, 0, 0, 0,
573 94, 99, 99, 0, 0, 99, 0, 0, 0, 0,
574 0, 99, 99, 199, 199, 199, 199, 199, 199, 199,
575 199, 199, 200, 200, 200, 200, 200, 200, 200, 200,
577 200, 201, 201, 201, 201, 201, 201, 201, 201, 201,
578 202, 202, 202, 202, 202, 202, 202, 202, 202, 203,
579 203, 203, 203, 203, 203, 203, 203, 203, 204, 204,
580 204, 204, 204, 204, 204, 204, 204, 205, 205, 205,
581 205, 205, 205, 205, 205, 205, 206, 206, 206, 206,
582 206, 206, 206, 206, 206, 207, 207, 207, 207, 207,
583 207, 207, 207, 207, 208, 208, 208, 208, 208, 208,
584 208, 208, 208, 209, 209, 209, 209, 209, 209, 209,
585 209, 209, 210, 210, 210, 210, 210, 210, 210, 210,
586 210, 211, 211, 211, 211, 211, 211, 211, 211, 211,
588 212, 0, 0, 0, 212, 212, 0, 212, 213, 0,
589 0, 0, 213, 213, 0, 213, 214, 0, 0, 0,
590 214, 214, 0, 214, 215, 0, 0, 0, 215, 215,
591 0, 215, 216, 0, 0, 0, 216, 216, 0, 216,
592 217, 0, 217, 218, 0, 218, 219, 0, 219, 220,
593 0, 220, 221, 0, 221, 222, 0, 0, 0, 222,
594 222, 0, 222, 223, 0, 223, 224, 0, 0, 0,
595 224, 224, 0, 224, 225, 0, 225, 226, 0, 226,
596 227, 0, 0, 0, 227, 227, 0, 227, 228, 0,
597 228, 229, 0, 229, 230, 0, 0, 0, 230, 230,
599 0, 230, 231, 231, 0, 231, 231, 231, 231, 231,
600 232, 232, 0, 232, 232, 232, 232, 232, 232, 233,
601 233, 0, 0, 233, 233, 233, 233, 233, 234, 0,
602 0, 234, 234, 234, 234, 234, 234, 235, 235, 236,
603 236, 198, 198, 198, 198, 198, 198, 198, 198, 198,
604 198, 198, 198, 198, 198, 198, 198, 198, 198, 198
607 static yy_state_type yy_last_accepting_state
;
608 static char *yy_last_accepting_cpos
;
610 /* The intent behind this definition is that it'll catch
611 * any uses of REJECT which flex missed.
613 #define REJECT reject_used_but_not_detected
614 #define yymore() yymore_used_but_not_detected
615 #define YY_MORE_ADJ 0
616 #define YY_RESTORE_YY_MORE_OFFSET
620 /******************************************************************************
622 KPP - The Kinetic PreProcessor
623 Builds simulation code for chemical kinetic systems
625 Copyright (C) 1995-1996 Valeriu Damian and Adrian Sandu
626 Copyright (C) 1997-2005 Adrian Sandu
628 KPP is free software; you can redistribute it and/or modify it under the
629 terms of the GNU General Public License as published by the Free Software
630 Foundation (http://www.gnu.org/copyleft/gpl.html); either version 2 of the
631 License, or (at your option) any later version.
633 KPP is distributed in the hope that it will be useful, but WITHOUT ANY
634 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
635 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
638 You should have received a copy of the GNU General Public License along
639 with this program; if not, consult http://www.gnu.org/copyleft/gpl.html or
640 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
641 Boston, MA 02111-1307, USA.
644 Computer Science Department
645 Virginia Polytechnic Institute and State University
647 E-mail: sandu@cs.vt.edu
649 ******************************************************************************/
660 #define EQNTAG_STATE 10
662 #define RATE_STATE 11
685 void Include ( char * filename
);
691 #define MAX_INCLUDE 10
693 YY_BUFFER_STATE yy_buffers
[ MAX_INCLUDE
];
694 int yy_line_no
[ MAX_INCLUDE
];
695 char *yy_filename
[ MAX_INCLUDE
];
696 int yy_buf_level
= 0;
710 extern int yyerrflag
;
718 KEYWORD keywords
[] = { { "INCLUDE", INC_STATE
, 0 },
719 { "MODEL", MOD_STATE
, 0 },
720 { "INTEGRATOR", INT_STATE
, 0 },
721 { "JACOBIAN", PRM_STATE
, JACOBIAN
},
722 { "HESSIAN", PRM_STATE
, HESSIAN
},
723 { "STOICMAT", PRM_STATE
, STOICMAT
},
724 { "STOCHASTIC", PRM_STATE
, STOCHASTIC
},
725 { "DOUBLE", PRM_STATE
, DOUBLE
},
726 { "REORDER", PRM_STATE
, REORDER
},
727 { "MEX", PRM_STATE
, MEX
},
728 { "DUMMYINDEX", PRM_STATE
, DUMMYINDEX
},
729 { "EQNTAGS", PRM_STATE
, EQNTAGS
},
730 { "FUNCTION", PRM_STATE
, FUNCTION
},
731 { "ATOMS", ATM_STATE
, ATOMDECL
},
732 { "CHECK", ATM_STATE
, CHECK
},
733 { "CHECKALL", INITIAL
, CHECKALL
},
734 { "DEFVAR", DSP_STATE
, DEFVAR
},
735 { "DEFRAD", DSP_STATE
, DEFRAD
},
736 { "DEFFIX", DSP_STATE
, DEFFIX
},
737 { "SETVAR", SSP_STATE
, SETVAR
},
738 { "SETRAD", SSP_STATE
, SETRAD
},
739 { "SETFIX", SSP_STATE
, SETFIX
},
740 { "INITVALUES", INI_STATE
, INITVALUES
},
741 { "EQUATIONS", EQN_STATE
, EQUATIONS
},
742 { "LUMP", LMP_STATE
, LUMP
},
743 { "LOOKAT", LKT_STATE
, LOOKAT
},
744 { "LOOKATALL", INITIAL
, LOOKATALL
},
745 { "TRANSPORT", TPT_STATE
, TRANSPORT
},
746 { "TRANSPORTALL", INITIAL
, TRANSPORTALL
},
747 { "INITIALIZE", PRM_STATE
, INITIALIZE
},
748 { "XGRID", PRM_STATE
, XGRID
},
749 { "YGRID", PRM_STATE
, YGRID
},
750 { "ZGRID", PRM_STATE
, ZGRID
},
751 { "MONITOR", MNI_STATE
, MONITOR
},
752 { "WRITE_ATM", INITIAL
, WRITE_ATM
},
753 { "WRITE_SPC", INITIAL
, WRITE_SPC
},
754 { "WRITE_MAT", INITIAL
, WRITE_MAT
},
755 { "WRITE_OPT", INITIAL
, WRITE_OPT
},
756 { "USE", PRM_STATE
, USE
},
757 { "LANGUAGE", PRM_STATE
, LANGUAGE
},
758 { "INLINE", INL_STATE
, INLINE
},
759 { "ENDINLINE", INITIAL
, ENDINLINE
},
760 { "INTFILE", PRM_STATE
, INTFILE
},
761 { "DRIVER", PRM_STATE
, DRIVER
},
762 { "RUN", PRM_STATE
, RUN
},
763 { "USES", USE_STATE
, USES
},
764 { "SPARSEDATA", PRM_STATE
, SPARSEDATA
},
768 int CheckKeyword( char *cmd
);
770 #define RETURN( x ) \
772 if ( yyerrflag == 0) { \
773 strcpy( crtToken, nextToken ); \
774 crtTokType = nextTokType; \
775 crtLine = crt_line_no; \
776 strcpy( crtFile, crt_filename ); \
778 strcpy( nextToken, yytext); \
784 /* Macros after this point can all be overridden by user definitions in
788 #ifndef YY_SKIP_YYWRAP
790 extern "C" int yywrap
YY_PROTO(( void ));
792 extern int yywrap
YY_PROTO(( void ));
797 static void yyunput
YY_PROTO(( int c
, char *buf_ptr
));
801 static void yy_flex_strncpy
YY_PROTO(( char *, yyconst
char *, int ));
804 #ifdef YY_NEED_STRLEN
805 static int yy_flex_strlen
YY_PROTO(( yyconst
char * ));
810 static int yyinput
YY_PROTO(( void ));
812 static int input
YY_PROTO(( void ));
817 static int yy_start_stack_ptr
= 0;
818 static int yy_start_stack_depth
= 0;
819 static int *yy_start_stack
= 0;
820 #ifndef YY_NO_PUSH_STATE
821 static void yy_push_state
YY_PROTO(( int new_state
));
823 #ifndef YY_NO_POP_STATE
824 static void yy_pop_state
YY_PROTO(( void ));
826 #ifndef YY_NO_TOP_STATE
827 static int yy_top_state
YY_PROTO(( void ));
831 #define YY_NO_PUSH_STATE 1
832 #define YY_NO_POP_STATE 1
833 #define YY_NO_TOP_STATE 1
836 #ifdef YY_MALLOC_DECL
844 /* Just try to get by without declaring the routines. This will fail
845 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
846 * or sizeof(void*) != sizeof(int).
851 /* Amount of stuff to slurp up with each read. */
852 #ifndef YY_READ_BUF_SIZE
853 #define YY_READ_BUF_SIZE 8192
856 /* Copy whatever the last rule matched to the standard output. */
859 /* This used to be an fputs(), but since the string might contain NUL's,
860 * we now use fwrite().
862 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
865 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
866 * is returned in "result".
869 #define YY_INPUT(buf,result,max_size) \
870 if ( yy_current_buffer->yy_is_interactive ) \
873 for ( n = 0; n < max_size && \
874 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
877 buf[n++] = (char) c; \
878 if ( c == EOF && ferror( yyin ) ) \
879 YY_FATAL_ERROR( "input in flex scanner failed" ); \
882 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
883 && ferror( yyin ) ) \
884 YY_FATAL_ERROR( "input in flex scanner failed" );
887 /* No semi-colon after return; correct usage is to write "yyterminate();" -
888 * we don't want an extra ';' after the "return" because that will cause
889 * some compilers to complain about unreachable statements.
892 #define yyterminate() return YY_NULL
895 /* Number of entries by which start-condition stack grows. */
896 #ifndef YY_START_STACK_INCR
897 #define YY_START_STACK_INCR 25
900 /* Report a fatal error. */
901 #ifndef YY_FATAL_ERROR
902 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
905 /* Default declaration of generated scanner - a define so the user can
906 * easily add parameters.
909 #define YY_DECL int yylex YY_PROTO(( void ))
912 /* Code executed at the beginning of each rule, after yytext and yyleng
915 #ifndef YY_USER_ACTION
916 #define YY_USER_ACTION
919 /* Code executed at the end of each rule. */
921 #define YY_BREAK break;
924 #define YY_RULE_SETUP \
929 register yy_state_type yy_current_state
;
930 register char *yy_cp
, *yy_bp
;
946 yy_start
= 1; /* first start state */
954 if ( ! yy_current_buffer
)
956 yy_create_buffer( yyin
, YY_BUF_SIZE
);
958 yy_load_buffer_state();
961 while ( 1 ) /* loops until end-of-file is reached */
965 /* Support of yytext. */
966 *yy_cp
= yy_hold_char
;
968 /* yy_bp points to the position in yy_ch_buf of the start of
973 yy_current_state
= yy_start
;
977 register YY_CHAR yy_c
= yy_ec
[YY_SC_TO_UI(*yy_cp
)];
978 if ( yy_accept
[yy_current_state
] )
980 yy_last_accepting_state
= yy_current_state
;
981 yy_last_accepting_cpos
= yy_cp
;
983 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
985 yy_current_state
= (int) yy_def
[yy_current_state
];
986 if ( yy_current_state
>= 199 )
987 yy_c
= yy_meta
[(unsigned int) yy_c
];
989 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
992 while ( yy_base
[yy_current_state
] != 842 );
995 yy_act
= yy_accept
[yy_current_state
];
997 { /* have to back up */
998 yy_cp
= yy_last_accepting_cpos
;
999 yy_current_state
= yy_last_accepting_state
;
1000 yy_act
= yy_accept
[yy_current_state
];
1003 YY_DO_BEFORE_ACTION
;
1006 do_action
: /* This label is used only to access EOF actions. */
1010 { /* beginning of action switch */
1011 case 0: /* must back up */
1012 /* undo the effects of YY_DO_BEFORE_ACTION */
1013 *yy_cp
= yy_hold_char
;
1014 yy_cp
= yy_last_accepting_cpos
;
1015 yy_current_state
= yy_last_accepting_state
;
1016 goto yy_find_action
;
1033 { oldstate
= (yy_start
- 1) / 2;
1040 { oldstate
= (yy_start
- 1) / 2;
1078 { idx
= CheckKeyword( yytext
);
1083 BEGIN keywords
[idx
].next
;
1084 if ( keywords
[idx
].cmd
) {
1085 crt_section
= keywords
[idx
].cmd
;
1086 RETURN( keywords
[idx
].cmd
);
1093 { Include( IncName(yytext
) );
1100 { Include( ModelName(yytext
) );
1107 { Include( IntegName(yytext
) );
1114 { strcpy( yylval
.str
, yytext
);
1116 RETURN( PARAMETER
);
1122 { ScanError("Extra parameter on command line '%s'", yytext
);
1128 { strcpy( yylval
.str
, yytext
);
1135 { RETURN( yytext
[0] );
1141 { strcpy( yylval
.str
, yytext
);
1148 { strcpy( yylval
.str
, yytext
);
1155 { RETURN( SPCEQUAL
);
1161 { RETURN( SPCPLUS
);
1167 { RETURN( yytext
[0] );
1173 { ScanError("Invalid character '%c' in species definition", yytext
[0] );
1179 { strcpy( yylval
.str
, yytext
);
1186 { RETURN( yytext
[0] );
1192 { strcpy( yylval
.str
, yytext
);
1199 { RETURN( INIEQUAL
);
1205 { RETURN( yytext
[0] );
1211 { strcpy( yylval
.str
, yytext
);
1218 { ScanError("Invalid character '%c' in initial values", yytext
[0] );
1224 { strcpy( yylval
.str
, yytext
);
1231 { RETURN( EQNEQUAL
);
1237 { strcpy( yylval
.str
, yytext
);
1252 { strcpy( yylval
.str
, yytext
);
1259 { BEGIN EQNTAG_STATE
;
1266 { strcpy( yylval
.str
, yytext
);
1274 RETURN( EQNGREATER
);
1280 { strcpy( yylval
.str
, yytext
);
1288 RETURN( yytext
[0] );
1294 { strcpy( yylval
.str
, yytext
);
1301 { RETURN( LMPPLUS
);
1307 { RETURN( LMPCOLON
);
1313 { RETURN( yytext
[0] );
1319 { ScanError("Invalid character '%c' in species definition", yytext
[0] );
1325 { strcpy( yylval
.str
, yytext
);
1332 { RETURN( yytext
[0] );
1338 { strcpy( yylval
.str
, yytext
);
1345 { RETURN( yytext
[0] );
1351 { strcpy( yylval
.str
, yytext
);
1358 { RETURN( yytext
[0] );
1364 { strcpy( yylval
.str
, yytext
);
1371 { RETURN( yytext
[0] );
1377 { strcpy( yylval
.str
, yytext
);
1385 { if ( EqNoCase( yytext
+1, "ENDINLINE" ) ){
1387 RETURN( ENDINLINE
);
1390 strcpy( yylval
.str
, yytext
);
1399 strcpy( yylval
.str
,yytext
);
1406 { strcpy( yylval
.str
,yytext
);
1410 case YY_STATE_EOF(INITIAL
):
1411 case YY_STATE_EOF(CMD_STATE
):
1412 case YY_STATE_EOF(INC_STATE
):
1413 case YY_STATE_EOF(MOD_STATE
):
1414 case YY_STATE_EOF(INT_STATE
):
1415 case YY_STATE_EOF(PRM_STATE
):
1416 case YY_STATE_EOF(DSP_STATE
):
1417 case YY_STATE_EOF(SSP_STATE
):
1418 case YY_STATE_EOF(INI_STATE
):
1419 case YY_STATE_EOF(EQN_STATE
):
1420 case YY_STATE_EOF(EQNTAG_STATE
):
1421 case YY_STATE_EOF(RATE_STATE
):
1422 case YY_STATE_EOF(LMP_STATE
):
1423 case YY_STATE_EOF(CR_IGNORE
):
1424 case YY_STATE_EOF(SC_IGNORE
):
1425 case YY_STATE_EOF(ATM_STATE
):
1426 case YY_STATE_EOF(LKT_STATE
):
1427 case YY_STATE_EOF(INL_STATE
):
1428 case YY_STATE_EOF(MNI_STATE
):
1429 case YY_STATE_EOF(TPT_STATE
):
1430 case YY_STATE_EOF(USE_STATE
):
1431 case YY_STATE_EOF(COMMENT
):
1432 case YY_STATE_EOF(COMMENT2
):
1433 case YY_STATE_EOF(EQN_ID
):
1434 case YY_STATE_EOF(INL_CODE
):
1436 { if ( ! EndInclude() ) {
1446 #line 1447 "lex.yy.c"
1448 case YY_END_OF_BUFFER
:
1450 /* Amount of text matched not including the EOB char. */
1451 int yy_amount_of_matched_text
= (int) (yy_cp
- yytext_ptr
) - 1;
1453 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1454 *yy_cp
= yy_hold_char
;
1455 YY_RESTORE_YY_MORE_OFFSET
1457 if ( yy_current_buffer
->yy_buffer_status
== YY_BUFFER_NEW
)
1459 /* We're scanning a new file or input source. It's
1460 * possible that this happened because the user
1461 * just pointed yyin at a new source and called
1462 * yylex(). If so, then we have to assure
1463 * consistency between yy_current_buffer and our
1464 * globals. Here is the right place to do so, because
1465 * this is the first action (other than possibly a
1466 * back-up) that will match for the new input source.
1468 yy_n_chars
= yy_current_buffer
->yy_n_chars
;
1469 yy_current_buffer
->yy_input_file
= yyin
;
1470 yy_current_buffer
->yy_buffer_status
= YY_BUFFER_NORMAL
;
1473 /* Note that here we test for yy_c_buf_p "<=" to the position
1474 * of the first EOB in the buffer, since yy_c_buf_p will
1475 * already have been incremented past the NUL character
1476 * (since all states make transitions on EOB to the
1477 * end-of-buffer state). Contrast this with the test
1480 if ( yy_c_buf_p
<= &yy_current_buffer
->yy_ch_buf
[yy_n_chars
] )
1481 { /* This was really a NUL. */
1482 yy_state_type yy_next_state
;
1484 yy_c_buf_p
= yytext_ptr
+ yy_amount_of_matched_text
;
1486 yy_current_state
= yy_get_previous_state();
1488 /* Okay, we're now positioned to make the NUL
1489 * transition. We couldn't have
1490 * yy_get_previous_state() go ahead and do it
1491 * for us because it doesn't know how to deal
1492 * with the possibility of jamming (and we don't
1493 * want to build jamming into it because then it
1494 * will run more slowly).
1497 yy_next_state
= yy_try_NUL_trans( yy_current_state
);
1499 yy_bp
= yytext_ptr
+ YY_MORE_ADJ
;
1501 if ( yy_next_state
)
1503 /* Consume the NUL. */
1504 yy_cp
= ++yy_c_buf_p
;
1505 yy_current_state
= yy_next_state
;
1512 goto yy_find_action
;
1516 else switch ( yy_get_next_buffer() )
1518 case EOB_ACT_END_OF_FILE
:
1520 yy_did_buffer_switch_on_eof
= 0;
1524 /* Note: because we've taken care in
1525 * yy_get_next_buffer() to have set up
1526 * yytext, we can now set up
1527 * yy_c_buf_p so that if some total
1528 * hoser (like flex itself) wants to
1529 * call the scanner after we return the
1530 * YY_NULL, it'll still work - another
1531 * YY_NULL will get returned.
1533 yy_c_buf_p
= yytext_ptr
+ YY_MORE_ADJ
;
1535 yy_act
= YY_STATE_EOF(YY_START
);
1541 if ( ! yy_did_buffer_switch_on_eof
)
1547 case EOB_ACT_CONTINUE_SCAN
:
1549 yytext_ptr
+ yy_amount_of_matched_text
;
1551 yy_current_state
= yy_get_previous_state();
1554 yy_bp
= yytext_ptr
+ YY_MORE_ADJ
;
1557 case EOB_ACT_LAST_MATCH
:
1559 &yy_current_buffer
->yy_ch_buf
[yy_n_chars
];
1561 yy_current_state
= yy_get_previous_state();
1564 yy_bp
= yytext_ptr
+ YY_MORE_ADJ
;
1565 goto yy_find_action
;
1572 "fatal flex scanner internal error--no action found" );
1573 } /* end of action switch */
1574 } /* end of scanning one token */
1575 } /* end of yylex */
1578 /* yy_get_next_buffer - try to read in a new buffer
1580 * Returns a code representing an action:
1581 * EOB_ACT_LAST_MATCH -
1582 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1583 * EOB_ACT_END_OF_FILE - end of file
1586 static int yy_get_next_buffer()
1588 register char *dest
= yy_current_buffer
->yy_ch_buf
;
1589 register char *source
= yytext_ptr
;
1590 register int number_to_move
, i
;
1593 if ( yy_c_buf_p
> &yy_current_buffer
->yy_ch_buf
[yy_n_chars
+ 1] )
1595 "fatal flex scanner internal error--end of buffer missed" );
1597 if ( yy_current_buffer
->yy_fill_buffer
== 0 )
1598 { /* Don't try to fill the buffer, so this is an EOF. */
1599 if ( yy_c_buf_p
- yytext_ptr
- YY_MORE_ADJ
== 1 )
1601 /* We matched a single character, the EOB, so
1602 * treat this as a final EOF.
1604 return EOB_ACT_END_OF_FILE
;
1609 /* We matched some text prior to the EOB, first
1612 return EOB_ACT_LAST_MATCH
;
1616 /* Try to read more data. */
1618 /* First move last chars to start of buffer. */
1619 number_to_move
= (int) (yy_c_buf_p
- yytext_ptr
) - 1;
1621 for ( i
= 0; i
< number_to_move
; ++i
)
1622 *(dest
++) = *(source
++);
1624 if ( yy_current_buffer
->yy_buffer_status
== YY_BUFFER_EOF_PENDING
)
1625 /* don't do the read, it's not guaranteed to return an EOF,
1628 yy_current_buffer
->yy_n_chars
= yy_n_chars
= 0;
1633 yy_current_buffer
->yy_buf_size
- number_to_move
- 1;
1635 while ( num_to_read
<= 0 )
1636 { /* Not enough room in the buffer - grow it. */
1637 #ifdef YY_USES_REJECT
1639 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1642 /* just a shorter name for the current buffer */
1643 YY_BUFFER_STATE b
= yy_current_buffer
;
1645 int yy_c_buf_p_offset
=
1646 (int) (yy_c_buf_p
- b
->yy_ch_buf
);
1648 if ( b
->yy_is_our_buffer
)
1650 int new_size
= b
->yy_buf_size
* 2;
1652 if ( new_size
<= 0 )
1653 b
->yy_buf_size
+= b
->yy_buf_size
/ 8;
1655 b
->yy_buf_size
*= 2;
1657 b
->yy_ch_buf
= (char *)
1658 /* Include room in for 2 EOB chars. */
1659 yy_flex_realloc( (void *) b
->yy_ch_buf
,
1660 b
->yy_buf_size
+ 2 );
1663 /* Can't grow it, we don't own it. */
1666 if ( ! b
->yy_ch_buf
)
1668 "fatal error - scanner input buffer overflow" );
1670 yy_c_buf_p
= &b
->yy_ch_buf
[yy_c_buf_p_offset
];
1672 num_to_read
= yy_current_buffer
->yy_buf_size
-
1677 if ( num_to_read
> YY_READ_BUF_SIZE
)
1678 num_to_read
= YY_READ_BUF_SIZE
;
1680 /* Read in more data. */
1681 YY_INPUT( (&yy_current_buffer
->yy_ch_buf
[number_to_move
]),
1682 yy_n_chars
, num_to_read
);
1684 yy_current_buffer
->yy_n_chars
= yy_n_chars
;
1687 if ( yy_n_chars
== 0 )
1689 if ( number_to_move
== YY_MORE_ADJ
)
1691 ret_val
= EOB_ACT_END_OF_FILE
;
1697 ret_val
= EOB_ACT_LAST_MATCH
;
1698 yy_current_buffer
->yy_buffer_status
=
1699 YY_BUFFER_EOF_PENDING
;
1704 ret_val
= EOB_ACT_CONTINUE_SCAN
;
1706 yy_n_chars
+= number_to_move
;
1707 yy_current_buffer
->yy_ch_buf
[yy_n_chars
] = YY_END_OF_BUFFER_CHAR
;
1708 yy_current_buffer
->yy_ch_buf
[yy_n_chars
+ 1] = YY_END_OF_BUFFER_CHAR
;
1710 yytext_ptr
= &yy_current_buffer
->yy_ch_buf
[0];
1716 /* yy_get_previous_state - get the state just before the EOB char was reached */
1718 static yy_state_type
yy_get_previous_state()
1720 register yy_state_type yy_current_state
;
1721 register char *yy_cp
;
1723 yy_current_state
= yy_start
;
1725 for ( yy_cp
= yytext_ptr
+ YY_MORE_ADJ
; yy_cp
< yy_c_buf_p
; ++yy_cp
)
1727 register YY_CHAR yy_c
= (*yy_cp
? yy_ec
[YY_SC_TO_UI(*yy_cp
)] : 1);
1728 if ( yy_accept
[yy_current_state
] )
1730 yy_last_accepting_state
= yy_current_state
;
1731 yy_last_accepting_cpos
= yy_cp
;
1733 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
1735 yy_current_state
= (int) yy_def
[yy_current_state
];
1736 if ( yy_current_state
>= 199 )
1737 yy_c
= yy_meta
[(unsigned int) yy_c
];
1739 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
1742 return yy_current_state
;
1746 /* yy_try_NUL_trans - try to make a transition on the NUL character
1749 * next_state = yy_try_NUL_trans( current_state );
1752 #ifdef YY_USE_PROTOS
1753 static yy_state_type
yy_try_NUL_trans( yy_state_type yy_current_state
)
1755 static yy_state_type
yy_try_NUL_trans( yy_current_state
)
1756 yy_state_type yy_current_state
;
1759 register int yy_is_jam
;
1760 register char *yy_cp
= yy_c_buf_p
;
1762 register YY_CHAR yy_c
= 1;
1763 if ( yy_accept
[yy_current_state
] )
1765 yy_last_accepting_state
= yy_current_state
;
1766 yy_last_accepting_cpos
= yy_cp
;
1768 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
1770 yy_current_state
= (int) yy_def
[yy_current_state
];
1771 if ( yy_current_state
>= 199 )
1772 yy_c
= yy_meta
[(unsigned int) yy_c
];
1774 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
1775 yy_is_jam
= (yy_current_state
== 198);
1777 return yy_is_jam
? 0 : yy_current_state
;
1782 #ifdef YY_USE_PROTOS
1783 static void yyunput( int c
, register char *yy_bp
)
1785 static void yyunput( c
, yy_bp
)
1787 register char *yy_bp
;
1790 register char *yy_cp
= yy_c_buf_p
;
1792 /* undo effects of setting up yytext */
1793 *yy_cp
= yy_hold_char
;
1795 if ( yy_cp
< yy_current_buffer
->yy_ch_buf
+ 2 )
1796 { /* need to shift things up to make room */
1797 /* +2 for EOB chars. */
1798 register int number_to_move
= yy_n_chars
+ 2;
1799 register char *dest
= &yy_current_buffer
->yy_ch_buf
[
1800 yy_current_buffer
->yy_buf_size
+ 2];
1801 register char *source
=
1802 &yy_current_buffer
->yy_ch_buf
[number_to_move
];
1804 while ( source
> yy_current_buffer
->yy_ch_buf
)
1805 *--dest
= *--source
;
1807 yy_cp
+= (int) (dest
- source
);
1808 yy_bp
+= (int) (dest
- source
);
1809 yy_current_buffer
->yy_n_chars
=
1810 yy_n_chars
= yy_current_buffer
->yy_buf_size
;
1812 if ( yy_cp
< yy_current_buffer
->yy_ch_buf
+ 2 )
1813 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1816 *--yy_cp
= (char) c
;
1820 yy_hold_char
= *yy_cp
;
1823 #endif /* ifndef YY_NO_UNPUT */
1827 static int yyinput()
1834 *yy_c_buf_p
= yy_hold_char
;
1836 if ( *yy_c_buf_p
== YY_END_OF_BUFFER_CHAR
)
1838 /* yy_c_buf_p now points to the character we want to return.
1839 * If this occurs *before* the EOB characters, then it's a
1840 * valid NUL; if not, then we've hit the end of the buffer.
1842 if ( yy_c_buf_p
< &yy_current_buffer
->yy_ch_buf
[yy_n_chars
] )
1843 /* This was really a NUL. */
1847 { /* need more input */
1848 int offset
= yy_c_buf_p
- yytext_ptr
;
1851 switch ( yy_get_next_buffer() )
1853 case EOB_ACT_LAST_MATCH
:
1854 /* This happens because yy_g_n_b()
1855 * sees that we've accumulated a
1856 * token and flags that we need to
1857 * try matching the token before
1858 * proceeding. But for input(),
1859 * there's no matching to consider.
1860 * So convert the EOB_ACT_LAST_MATCH
1861 * to EOB_ACT_END_OF_FILE.
1864 /* Reset buffer status. */
1869 case EOB_ACT_END_OF_FILE
:
1874 if ( ! yy_did_buffer_switch_on_eof
)
1883 case EOB_ACT_CONTINUE_SCAN
:
1884 yy_c_buf_p
= yytext_ptr
+ offset
;
1890 c
= *(unsigned char *) yy_c_buf_p
; /* cast for 8-bit char's */
1891 *yy_c_buf_p
= '\0'; /* preserve yytext */
1892 yy_hold_char
= *++yy_c_buf_p
;
1899 #ifdef YY_USE_PROTOS
1900 void yyrestart( FILE *input_file
)
1902 void yyrestart( input_file
)
1906 if ( ! yy_current_buffer
)
1907 yy_current_buffer
= yy_create_buffer( yyin
, YY_BUF_SIZE
);
1909 yy_init_buffer( yy_current_buffer
, input_file
);
1910 yy_load_buffer_state();
1914 #ifdef YY_USE_PROTOS
1915 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer
)
1917 void yy_switch_to_buffer( new_buffer
)
1918 YY_BUFFER_STATE new_buffer
;
1921 if ( yy_current_buffer
== new_buffer
)
1924 if ( yy_current_buffer
)
1926 /* Flush out information for old buffer. */
1927 *yy_c_buf_p
= yy_hold_char
;
1928 yy_current_buffer
->yy_buf_pos
= yy_c_buf_p
;
1929 yy_current_buffer
->yy_n_chars
= yy_n_chars
;
1932 yy_current_buffer
= new_buffer
;
1933 yy_load_buffer_state();
1935 /* We don't actually know whether we did this switch during
1936 * EOF (yywrap()) processing, but the only time this flag
1937 * is looked at is after yywrap() is called, so it's safe
1938 * to go ahead and always set it.
1940 yy_did_buffer_switch_on_eof
= 1;
1944 #ifdef YY_USE_PROTOS
1945 void yy_load_buffer_state( void )
1947 void yy_load_buffer_state()
1950 yy_n_chars
= yy_current_buffer
->yy_n_chars
;
1951 yytext_ptr
= yy_c_buf_p
= yy_current_buffer
->yy_buf_pos
;
1952 yyin
= yy_current_buffer
->yy_input_file
;
1953 yy_hold_char
= *yy_c_buf_p
;
1957 #ifdef YY_USE_PROTOS
1958 YY_BUFFER_STATE
yy_create_buffer( FILE *file
, int size
)
1960 YY_BUFFER_STATE
yy_create_buffer( file
, size
)
1967 b
= (YY_BUFFER_STATE
) yy_flex_alloc( sizeof( struct yy_buffer_state
) );
1969 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1971 b
->yy_buf_size
= size
;
1973 /* yy_ch_buf has to be 2 characters longer than the size given because
1974 * we need to put in 2 end-of-buffer characters.
1976 b
->yy_ch_buf
= (char *) yy_flex_alloc( b
->yy_buf_size
+ 2 );
1977 if ( ! b
->yy_ch_buf
)
1978 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1980 b
->yy_is_our_buffer
= 1;
1982 yy_init_buffer( b
, file
);
1988 #ifdef YY_USE_PROTOS
1989 void yy_delete_buffer( YY_BUFFER_STATE b
)
1991 void yy_delete_buffer( b
)
1998 if ( b
== yy_current_buffer
)
1999 yy_current_buffer
= (YY_BUFFER_STATE
) 0;
2001 if ( b
->yy_is_our_buffer
)
2002 yy_flex_free( (void *) b
->yy_ch_buf
);
2004 yy_flex_free( (void *) b
);
2008 #ifndef YY_ALWAYS_INTERACTIVE
2009 #ifndef YY_NEVER_INTERACTIVE
2010 extern int isatty
YY_PROTO(( int ));
2014 #ifdef YY_USE_PROTOS
2015 void yy_init_buffer( YY_BUFFER_STATE b
, FILE *file
)
2017 void yy_init_buffer( b
, file
)
2024 yy_flush_buffer( b
);
2026 b
->yy_input_file
= file
;
2027 b
->yy_fill_buffer
= 1;
2029 #if YY_ALWAYS_INTERACTIVE
2030 b
->yy_is_interactive
= 1;
2032 #if YY_NEVER_INTERACTIVE
2033 b
->yy_is_interactive
= 0;
2035 b
->yy_is_interactive
= file
? (isatty( fileno(file
) ) > 0) : 0;
2041 #ifdef YY_USE_PROTOS
2042 void yy_flush_buffer( YY_BUFFER_STATE b
)
2044 void yy_flush_buffer( b
)
2054 /* We always need two end-of-buffer characters. The first causes
2055 * a transition to the end-of-buffer state. The second causes
2056 * a jam in that state.
2058 b
->yy_ch_buf
[0] = YY_END_OF_BUFFER_CHAR
;
2059 b
->yy_ch_buf
[1] = YY_END_OF_BUFFER_CHAR
;
2061 b
->yy_buf_pos
= &b
->yy_ch_buf
[0];
2064 b
->yy_buffer_status
= YY_BUFFER_NEW
;
2066 if ( b
== yy_current_buffer
)
2067 yy_load_buffer_state();
2071 #ifndef YY_NO_SCAN_BUFFER
2072 #ifdef YY_USE_PROTOS
2073 YY_BUFFER_STATE
yy_scan_buffer( char *base
, yy_size_t size
)
2075 YY_BUFFER_STATE
yy_scan_buffer( base
, size
)
2083 base
[size
-2] != YY_END_OF_BUFFER_CHAR
||
2084 base
[size
-1] != YY_END_OF_BUFFER_CHAR
)
2085 /* They forgot to leave room for the EOB's. */
2088 b
= (YY_BUFFER_STATE
) yy_flex_alloc( sizeof( struct yy_buffer_state
) );
2090 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2092 b
->yy_buf_size
= size
- 2; /* "- 2" to take care of EOB's */
2093 b
->yy_buf_pos
= b
->yy_ch_buf
= base
;
2094 b
->yy_is_our_buffer
= 0;
2095 b
->yy_input_file
= 0;
2096 b
->yy_n_chars
= b
->yy_buf_size
;
2097 b
->yy_is_interactive
= 0;
2099 b
->yy_fill_buffer
= 0;
2100 b
->yy_buffer_status
= YY_BUFFER_NEW
;
2102 yy_switch_to_buffer( b
);
2109 #ifndef YY_NO_SCAN_STRING
2110 #ifdef YY_USE_PROTOS
2111 YY_BUFFER_STATE
yy_scan_string( yyconst
char *yy_str
)
2113 YY_BUFFER_STATE
yy_scan_string( yy_str
)
2114 yyconst
char *yy_str
;
2118 for ( len
= 0; yy_str
[len
]; ++len
)
2121 return yy_scan_bytes( yy_str
, len
);
2126 #ifndef YY_NO_SCAN_BYTES
2127 #ifdef YY_USE_PROTOS
2128 YY_BUFFER_STATE
yy_scan_bytes( yyconst
char *bytes
, int len
)
2130 YY_BUFFER_STATE
yy_scan_bytes( bytes
, len
)
2131 yyconst
char *bytes
;
2140 /* Get memory for full buffer, including space for trailing EOB's. */
2142 buf
= (char *) yy_flex_alloc( n
);
2144 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2146 for ( i
= 0; i
< len
; ++i
)
2149 buf
[len
] = buf
[len
+1] = YY_END_OF_BUFFER_CHAR
;
2151 b
= yy_scan_buffer( buf
, n
);
2153 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2155 /* It's okay to grow etc. this buffer, and we should throw it
2156 * away when we're done.
2158 b
->yy_is_our_buffer
= 1;
2165 #ifndef YY_NO_PUSH_STATE
2166 #ifdef YY_USE_PROTOS
2167 static void yy_push_state( int new_state
)
2169 static void yy_push_state( new_state
)
2173 if ( yy_start_stack_ptr
>= yy_start_stack_depth
)
2177 yy_start_stack_depth
+= YY_START_STACK_INCR
;
2178 new_size
= yy_start_stack_depth
* sizeof( int );
2180 if ( ! yy_start_stack
)
2181 yy_start_stack
= (int *) yy_flex_alloc( new_size
);
2184 yy_start_stack
= (int *) yy_flex_realloc(
2185 (void *) yy_start_stack
, new_size
);
2187 if ( ! yy_start_stack
)
2189 "out of memory expanding start-condition stack" );
2192 yy_start_stack
[yy_start_stack_ptr
++] = YY_START
;
2199 #ifndef YY_NO_POP_STATE
2200 static void yy_pop_state()
2202 if ( --yy_start_stack_ptr
< 0 )
2203 YY_FATAL_ERROR( "start-condition stack underflow" );
2205 BEGIN(yy_start_stack
[yy_start_stack_ptr
]);
2210 #ifndef YY_NO_TOP_STATE
2211 static int yy_top_state()
2213 return yy_start_stack
[yy_start_stack_ptr
- 1];
2217 #ifndef YY_EXIT_FAILURE
2218 #define YY_EXIT_FAILURE 2
2221 #ifdef YY_USE_PROTOS
2222 static void yy_fatal_error( yyconst
char msg
[] )
2224 static void yy_fatal_error( msg
)
2228 (void) fprintf( stderr
, "%s\n", msg
);
2229 exit( YY_EXIT_FAILURE
);
2234 /* Redefine yyless() so it works in section 3 code. */
2240 /* Undo effects of setting up yytext. */ \
2241 yytext[yyleng] = yy_hold_char; \
2242 yy_c_buf_p = yytext + n; \
2243 yy_hold_char = *yy_c_buf_p; \
2244 *yy_c_buf_p = '\0'; \
2250 /* Internal utility routines. */
2253 #ifdef YY_USE_PROTOS
2254 static void yy_flex_strncpy( char *s1
, yyconst
char *s2
, int n
)
2256 static void yy_flex_strncpy( s1
, s2
, n
)
2263 for ( i
= 0; i
< n
; ++i
)
2268 #ifdef YY_NEED_STRLEN
2269 #ifdef YY_USE_PROTOS
2270 static int yy_flex_strlen( yyconst
char *s
)
2272 static int yy_flex_strlen( s
)
2277 for ( n
= 0; s
[n
]; ++n
)
2285 #ifdef YY_USE_PROTOS
2286 static void *yy_flex_alloc( yy_size_t size
)
2288 static void *yy_flex_alloc( size
)
2292 return (void *) malloc( size
);
2295 #ifdef YY_USE_PROTOS
2296 static void *yy_flex_realloc( void *ptr
, yy_size_t size
)
2298 static void *yy_flex_realloc( ptr
, size
)
2303 /* The cast to (char *) in the following accommodates both
2304 * implementations that use char* generic pointers, and those
2305 * that use void* generic pointers. It works with the latter
2306 * because both ANSI C and C++ allow castless assignment from
2307 * any pointer type to void*, and deal with argument conversions
2308 * as though doing an assignment.
2310 return (void *) realloc( (char *) ptr
, size
);
2313 #ifdef YY_USE_PROTOS
2314 static void yy_flex_free( void *ptr
)
2316 static void yy_flex_free( ptr
)
2333 void Include ( char * name
)
2336 YY_BUFFER_STATE newb
;
2338 if ( yy_buf_level
== MAX_INCLUDE
) {
2339 printf("\nInclude nested too deep. Include %s ignored", name
);
2343 yy_buffers
[ yy_buf_level
] = yy_current_buffer
;
2344 yy_line_no
[ yy_buf_level
] = crt_line_no
;
2345 yy_filename
[ yy_buf_level
] = crt_filename
;
2350 crt_filename
= malloc( 1 + strlen( name
) );
2351 strcpy( crt_filename
, name
);
2354 f
= fopen( name
, "r" );
2356 FatalError(3,"%s: Can't read file", name
);
2358 newb
= yy_create_buffer(f
, YY_BUF_SIZE
);
2359 yy_switch_to_buffer( newb
);
2364 YY_BUFFER_STATE oldb
;
2367 if ( yy_buf_level
> 0 ) {
2368 oldb
= yy_current_buffer
;
2369 oldn
= crt_filename
;
2371 yy_switch_to_buffer( yy_buffers
[yy_buf_level
] );
2372 crt_line_no
= yy_line_no
[ yy_buf_level
];
2373 crt_filename
= yy_filename
[ yy_buf_level
];
2374 yy_delete_buffer( oldb
);
2381 int EqNoCase( char *s1
, char *s2
)
2384 if ( toupper(*s1
++) != toupper(*s2
++) ) return 0;
2389 int CheckKeyword( char *cmd
)
2395 if( keywords
[i
].name
== 0 ) {
2396 ScanError( "'%s': Unknown command (ignored)", cmd
);
2399 if( EqNoCase( cmd
, keywords
[i
].name
) ) {