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)
265 #define YY_USES_REJECT
266 typedef unsigned char YY_CHAR;
267 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
268 typedef int yy_state_type;
270 #define yytext_ptr yytext
272 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
273 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
274 static int yy_get_next_buffer YY_PROTO(( void ));
275 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
277 /* Done after the current pattern has been matched and before the
278 * corresponding action - sets up yytext.
280 #define YY_DO_BEFORE_ACTION \
281 yytext_ptr = yy_bp; \
282 yyleng = (int) (yy_cp - yy_bp); \
283 yy_hold_char = *yy_cp; \
287 #define YY_NUM_RULES 65
288 #define YY_END_OF_BUFFER 66
289 static yyconst short int yy_acclist[323] =
291 66, 63, 65, 62, 63, 65, 1, 64, 65, 63,
292 64, 65, 63, 65, 63, 65, 63, 65, 63, 65,
293 12, 63, 65, 1, 13, 64, 65, 12, 63, 64,
294 65, 12, 63, 65, 12, 63, 65, 31, 63, 65,
295 1, 32, 64, 65, 31, 63, 64, 65, 24, 31,
296 63, 65, 31, 63, 65, 31, 63, 65, 31, 63,
297 65, 31, 63, 65, 29, 31, 63, 65, 30, 31,
298 63, 65, 31, 63, 65, 27, 63, 65, 1, 28,
299 64, 65, 27, 63, 64, 65, 26, 27, 63, 65,
300 27, 63, 65, 27, 63, 65, 63, 65, 63, 65,
302 58, 63, 65, 58, 63, 65, 58, 63, 65, 59,
303 63, 65, 63, 65, 63, 65, 56, 63, 65, 56,
304 63, 65, 58, 63, 65, 58, 63, 65, 58, 63,
305 65, 58, 63, 65, 58, 63, 65, 58, 63, 65,
306 58, 63, 65, 58, 63, 65, 58, 63, 65, 58,
307 63, 65, 58, 63, 65, 58, 63, 65, 60, 63,
308 65, 61, 63, 65, 7, 15, 11, 8, 23, 16,
309 25, 9, 58, 57, 58, 58, 56, 10, 56, 56,
310 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
311 58, 58, 58, 58, 58, 58, 58, 58, 3, 14,
313 21, 17, 19, 4, 5, 57, 58, 58, 48, 56,
314 6, 56, 56, 58, 58, 58, 58, 58, 58, 43,
315 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
316 58, 58, 58, 22, 18, 20, 58, 34, 58, 58,
317 46, 58, 58, 58, 38, 58, 58, 41, 58, 58,
318 58, 58, 58, 58, 58, 58, 58, 58, 58, 35,
319 58, 33, 58, 58, 47, 58, 58, 44, 58, 58,
320 58, 58, 58, 42, 58, 58, 58, 58, 37, 58,
321 58, 58, 58, 58, 45, 58, 58, 58, 58, 49,
322 58, 53, 58, 39, 58, 36, 58, 58, 58, 58,
324 58, 55, 58, 58, 50, 58, 58, 52, 58, 58,
325 51, 58, 54, 58, 40, 58, 58, 58, 58, 2,
329 static yyconst short int yy_accept[241] =
331 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
332 1, 1, 1, 2, 4, 7, 10, 13, 15, 17,
333 19, 21, 24, 28, 32, 35, 38, 41, 45, 49,
334 53, 56, 59, 62, 65, 69, 73, 76, 79, 83,
335 87, 91, 94, 97, 99, 101, 104, 107, 110, 113,
336 115, 117, 120, 123, 126, 129, 132, 135, 138, 141,
337 144, 147, 150, 153, 156, 159, 162, 165, 166, 166,
338 166, 166, 166, 167, 168, 168, 168, 168, 168, 169,
339 169, 170, 171, 172, 173, 173, 173, 174, 175, 176,
340 177, 177, 178, 179, 179, 179, 180, 180, 180, 181,
342 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
343 192, 193, 194, 195, 196, 197, 198, 199, 199, 200,
344 200, 200, 201, 202, 202, 202, 202, 203, 204, 204,
345 205, 205, 206, 206, 207, 208, 209, 210, 211, 211,
346 212, 213, 214, 215, 216, 217, 218, 219, 220, 222,
347 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,
348 233, 234, 234, 234, 235, 236, 237, 238, 240, 241,
349 243, 244, 245, 247, 248, 250, 251, 252, 253, 254,
350 255, 256, 257, 258, 259, 260, 262, 262, 263, 264,
351 265, 267, 268, 270, 271, 272, 273, 274, 276, 277,
353 278, 279, 281, 282, 283, 283, 284, 285, 287, 288,
354 289, 290, 292, 294, 296, 298, 299, 300, 300, 301,
355 302, 304, 305, 307, 308, 310, 310, 311, 313, 315,
356 317, 317, 318, 318, 319, 319, 320, 321, 323, 323
359 static yyconst int yy_ec[256] =
361 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
362 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
363 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
364 1, 2, 1, 5, 1, 1, 6, 1, 7, 1,
365 1, 8, 1, 1, 1, 9, 10, 11, 12, 12,
366 12, 12, 12, 12, 12, 13, 13, 14, 1, 1,
367 1, 1, 1, 1, 15, 15, 16, 15, 17, 18,
368 19, 20, 19, 19, 21, 19, 22, 19, 23, 19,
369 19, 24, 19, 25, 26, 19, 19, 19, 19, 19,
370 1, 27, 1, 1, 19, 1, 28, 29, 30, 31,
372 32, 33, 34, 35, 36, 19, 19, 37, 38, 39,
373 40, 41, 19, 42, 43, 44, 45, 46, 19, 47,
374 19, 19, 48, 1, 49, 1, 1, 1, 1, 1,
375 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
376 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
377 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
378 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
379 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
380 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
381 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
383 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
384 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
385 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
386 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
387 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
391 static yyconst int yy_meta[50] =
393 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
394 3, 3, 3, 4, 5, 5, 5, 5, 6, 6,
395 6, 6, 6, 6, 6, 6, 1, 5, 5, 5,
396 5, 5, 5, 6, 6, 6, 6, 6, 6, 6,
397 6, 6, 6, 6, 6, 6, 6, 1, 1
400 static yyconst short int yy_base[256] =
402 0, 3, 12, 15, 35, 82, 24, 44, 131, 180,
403 221, 0, 509, 510, 510, 510, 510, 4, 485, 470,
404 6, 510, 510, 510, 496, 482, 510, 510, 510, 510,
405 16, 16, 481, 0, 510, 510, 454, 510, 510, 510,
406 510, 479, 0, 42, 0, 487, 21, 17, 510, 61,
407 45, 66, 82, 18, 62, 42, 22, 44, 66, 76,
408 82, 84, 111, 85, 87, 510, 510, 510, 497, 474,
409 470, 449, 510, 510, 489, 58, 488, 487, 510, 490,
410 510, 510, 510, 510, 489, 477, 476, 475, 86, 108,
411 479, 56, 510, 484, 106, 148, 154, 0, 159, 135,
413 148, 136, 106, 159, 138, 181, 160, 182, 183, 184,
414 187, 163, 192, 194, 203, 195, 186, 483, 510, 465,
415 441, 510, 510, 476, 475, 474, 510, 510, 477, 510,
416 476, 510, 464, 463, 94, 197, 510, 229, 473, 510,
417 232, 0, 205, 196, 204, 198, 210, 245, 461, 241,
418 242, 246, 249, 254, 251, 257, 258, 260, 262, 263,
419 266, 457, 430, 510, 510, 510, 98, 458, 264, 457,
420 265, 267, 456, 268, 455, 269, 271, 273, 272, 275,
421 278, 191, 276, 280, 285, 454, 443, 510, 302, 291,
422 452, 303, 451, 304, 306, 307, 308, 450, 310, 314,
424 311, 449, 313, 315, 444, 318, 317, 446, 319, 323,
425 325, 402, 396, 363, 362, 326, 327, 349, 320, 334,
426 360, 335, 359, 339, 358, 355, 140, 355, 354, 352,
427 344, 89, 346, 345, 199, 336, 510, 3, 510, 378,
428 384, 390, 396, 402, 408, 414, 416, 420, 426, 432,
429 438, 442, 446, 452, 456
432 static yyconst short int yy_def[256] =
434 240, 240, 241, 241, 242, 242, 243, 243, 244, 244,
435 10, 11, 239, 239, 239, 239, 239, 239, 239, 239,
436 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
437 239, 239, 239, 245, 239, 239, 239, 239, 239, 239,
438 239, 239, 246, 239, 247, 248, 248, 248, 239, 239,
439 239, 239, 239, 248, 248, 248, 248, 248, 248, 248,
440 248, 248, 248, 248, 248, 239, 239, 239, 249, 239,
441 239, 239, 239, 239, 239, 239, 239, 239, 239, 250,
442 239, 239, 239, 239, 251, 252, 248, 253, 248, 248,
443 239, 239, 239, 254, 239, 239, 239, 255, 239, 248,
445 248, 248, 248, 248, 248, 248, 248, 248, 248, 248,
446 248, 248, 248, 248, 248, 248, 248, 249, 239, 239,
447 239, 239, 239, 239, 239, 239, 239, 239, 250, 239,
448 251, 239, 252, 253, 248, 248, 239, 239, 254, 239,
449 239, 255, 248, 248, 248, 248, 248, 248, 248, 248,
450 248, 248, 248, 248, 248, 248, 248, 248, 248, 248,
451 248, 239, 239, 239, 239, 239, 248, 248, 248, 248,
452 248, 248, 248, 248, 248, 248, 248, 248, 248, 248,
453 248, 248, 248, 248, 248, 248, 239, 239, 248, 248,
454 248, 248, 248, 248, 248, 248, 248, 248, 248, 248,
456 248, 248, 248, 248, 239, 248, 248, 248, 248, 248,
457 248, 248, 248, 248, 248, 248, 248, 239, 248, 248,
458 248, 248, 248, 248, 248, 239, 248, 248, 248, 248,
459 239, 248, 239, 248, 239, 248, 239, 248, 0, 239,
460 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
461 239, 239, 239, 239, 239
464 static yyconst short int yy_nxt[560] =
466 239, 15, 16, 17, 15, 16, 17, 239, 21, 18,
467 239, 68, 18, 69, 23, 24, 88, 23, 24, 25,
468 75, 19, 25, 79, 19, 80, 39, 40, 41, 20,
469 88, 88, 20, 26, 88, 88, 26, 28, 29, 30,
470 72, 31, 76, 89, 32, 42, 39, 40, 41, 84,
471 43, 85, 93, 73, 94, 88, 33, 88, 90, 100,
472 104, 34, 124, 77, 78, 42, 138, 138, 138, 91,
473 43, 92, 92, 92, 95, 88, 96, 96, 97, 88,
474 105, 103, 35, 36, 28, 29, 30, 37, 31, 88,
475 95, 32, 99, 99, 99, 88, 101, 88, 88, 88,
477 88, 102, 88, 33, 106, 125, 126, 88, 34, 234,
478 135, 88, 98, 167, 189, 107, 141, 141, 141, 88,
479 108, 88, 116, 115, 88, 110, 117, 109, 111, 35,
480 36, 14, 15, 16, 17, 14, 14, 14, 14, 14,
481 44, 14, 14, 14, 45, 112, 113, 136, 88, 88,
482 146, 88, 47, 88, 114, 232, 95, 14, 96, 96,
483 97, 88, 95, 48, 97, 97, 97, 95, 143, 99,
484 99, 99, 88, 88, 145, 144, 88, 148, 49, 14,
485 14, 15, 16, 17, 14, 14, 14, 14, 14, 44,
486 14, 14, 14, 45, 88, 88, 88, 88, 150, 88,
488 88, 47, 155, 147, 88, 88, 14, 88, 88, 88,
489 88, 88, 48, 151, 152, 154, 88, 88, 88, 153,
490 201, 161, 237, 88, 149, 156, 172, 49, 14, 50,
491 51, 52, 53, 53, 168, 157, 160, 170, 158, 138,
492 138, 138, 141, 141, 141, 159, 171, 173, 54, 169,
493 55, 56, 57, 58, 88, 88, 59, 60, 88, 88,
494 61, 62, 88, 63, 88, 64, 65, 88, 66, 67,
495 88, 88, 174, 88, 175, 88, 88, 88, 88, 88,
496 88, 88, 88, 176, 88, 88, 88, 177, 88, 88,
497 179, 88, 180, 88, 178, 181, 186, 184, 88, 183,
499 196, 190, 182, 192, 88, 199, 185, 197, 191, 200,
500 194, 193, 195, 203, 202, 88, 88, 88, 198, 88,
501 88, 88, 207, 88, 88, 206, 88, 88, 88, 204,
502 88, 88, 88, 88, 208, 219, 88, 212, 88, 88,
503 88, 210, 217, 209, 214, 227, 213, 88, 88, 88,
504 211, 216, 88, 222, 215, 220, 223, 224, 88, 238,
505 221, 236, 235, 225, 233, 88, 229, 88, 88, 230,
506 231, 88, 88, 88, 226, 88, 88, 228, 14, 14,
507 14, 14, 14, 14, 22, 22, 22, 22, 22, 22,
508 27, 27, 27, 27, 27, 27, 38, 38, 38, 38,
510 38, 38, 46, 46, 46, 46, 46, 46, 81, 88,
511 81, 81, 81, 81, 83, 88, 83, 83, 83, 83,
512 86, 86, 87, 87, 87, 87, 118, 118, 118, 118,
513 118, 118, 129, 129, 129, 129, 129, 129, 131, 131,
514 131, 131, 131, 131, 133, 133, 133, 133, 134, 134,
515 134, 134, 139, 139, 139, 139, 139, 139, 142, 88,
516 142, 218, 88, 88, 88, 88, 205, 88, 88, 88,
517 88, 88, 188, 187, 88, 140, 88, 88, 132, 130,
518 166, 165, 164, 163, 162, 119, 140, 137, 88, 88,
519 88, 132, 130, 128, 127, 123, 122, 121, 120, 119,
521 88, 70, 82, 70, 70, 74, 71, 70, 239, 13,
522 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
523 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
524 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
525 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
526 239, 239, 239, 239, 239, 239, 239, 239, 239
529 static yyconst short int yy_chk[560] =
531 0, 1, 1, 1, 2, 2, 2, 0, 2, 1,
532 0, 18, 2, 18, 3, 3, 238, 4, 4, 3,
533 31, 1, 4, 32, 2, 32, 7, 7, 7, 1,
534 48, 54, 2, 3, 47, 57, 4, 5, 5, 5,
535 21, 5, 31, 47, 5, 7, 8, 8, 8, 44,
536 7, 44, 51, 21, 51, 56, 5, 58, 48, 54,
537 57, 5, 76, 31, 31, 8, 92, 92, 92, 50,
538 8, 50, 50, 50, 52, 55, 52, 52, 52, 59,
539 58, 56, 5, 5, 6, 6, 6, 6, 6, 60,
540 53, 6, 53, 53, 53, 61, 55, 62, 64, 89,
542 65, 55, 232, 6, 59, 76, 76, 135, 6, 232,
543 89, 167, 52, 135, 167, 60, 95, 95, 95, 103,
544 61, 90, 65, 64, 63, 62, 65, 61, 62, 6,
545 6, 9, 9, 9, 9, 9, 9, 9, 9, 9,
546 9, 9, 9, 9, 9, 63, 63, 90, 100, 102,
547 103, 105, 9, 227, 63, 227, 96, 9, 96, 96,
548 96, 101, 97, 9, 97, 97, 97, 99, 100, 99,
549 99, 99, 104, 107, 102, 101, 112, 105, 9, 9,
550 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
551 10, 10, 10, 10, 106, 108, 109, 110, 107, 117,
553 111, 10, 112, 104, 182, 113, 10, 114, 116, 144,
554 136, 146, 10, 108, 109, 111, 115, 145, 143, 110,
555 182, 117, 235, 147, 106, 113, 146, 10, 10, 11,
556 11, 11, 11, 11, 136, 114, 116, 144, 115, 138,
557 138, 138, 141, 141, 141, 115, 145, 147, 11, 143,
558 11, 11, 11, 11, 150, 151, 11, 11, 148, 152,
559 11, 11, 153, 11, 155, 11, 11, 154, 11, 11,
560 156, 157, 148, 158, 150, 159, 160, 169, 171, 161,
561 172, 174, 176, 151, 177, 179, 178, 152, 180, 183,
562 154, 181, 155, 184, 153, 156, 161, 159, 185, 158,
564 178, 169, 157, 172, 190, 181, 160, 179, 171, 181,
565 176, 174, 177, 184, 183, 189, 192, 194, 180, 195,
566 196, 197, 190, 199, 201, 189, 203, 200, 204, 185,
567 207, 206, 209, 219, 192, 206, 210, 197, 211, 216,
568 217, 195, 204, 194, 200, 219, 199, 220, 222, 236,
569 196, 203, 224, 210, 201, 207, 211, 216, 234, 236,
570 209, 234, 233, 217, 231, 230, 222, 229, 228, 224,
571 226, 225, 223, 221, 218, 215, 214, 220, 240, 240,
572 240, 240, 240, 240, 241, 241, 241, 241, 241, 241,
573 242, 242, 242, 242, 242, 242, 243, 243, 243, 243,
575 243, 243, 244, 244, 244, 244, 244, 244, 245, 213,
576 245, 245, 245, 245, 246, 212, 246, 246, 246, 246,
577 247, 247, 248, 248, 248, 248, 249, 249, 249, 249,
578 249, 249, 250, 250, 250, 250, 250, 250, 251, 251,
579 251, 251, 251, 251, 252, 252, 252, 252, 253, 253,
580 253, 253, 254, 254, 254, 254, 254, 254, 255, 208,
581 255, 205, 202, 198, 193, 191, 187, 186, 175, 173,
582 170, 168, 163, 162, 149, 139, 134, 133, 131, 129,
583 126, 125, 124, 121, 120, 118, 94, 91, 88, 87,
584 86, 85, 80, 78, 77, 75, 72, 71, 70, 69,
586 46, 42, 37, 33, 26, 25, 20, 19, 13, 239,
587 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
588 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
589 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
590 239, 239, 239, 239, 239, 239, 239, 239, 239, 239,
591 239, 239, 239, 239, 239, 239, 239, 239, 239
594 static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
595 static char *yy_full_match;
599 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
600 yy_cp = yy_full_match; /* restore poss. backed-over text */ \
604 #define yymore() yymore_used_but_not_detected
605 #define YY_MORE_ADJ 0
606 #define YY_RESTORE_YY_MORE_OFFSET
610 /* GOB C Preprocessor
611 * Copyright (C) 1999 the Free Software Foundation.
613 * Author: George Lebl
615 * This program is free software; you can redistribute it and/or modify
616 * it under the terms of the GNU General Public License as published by
617 * the Free Software Foundation; either version 2 of the License, or
618 * (at your option) any later version.
620 * This program is distributed in the hope that it will be useful,
621 * but WITHOUT ANY WARRANTY; without even the implied warranty of
622 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
623 * GNU General Public License for more details.
625 * You should have received a copy of the GNU General Public License
626 * along with this program; if not, write to the Free Software
627 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
637 static int parenth_depth = 0;
638 static int before_comment = INITIAL;
639 static int class_after_c = FALSE;
640 static int header_c = FALSE;
642 static GString *cbuf = NULL;
651 cbuf = g_string_new("");
653 cbuf = g_string_assign(cbuf,"");
661 cbuf = g_string_new(s);
663 cbuf = g_string_append(cbuf,s);
671 #define C_CODE_STRING 3
675 #define CLASS_CODE_I 5
679 /* Macros after this point can all be overridden by user definitions in
683 #ifndef YY_SKIP_YYWRAP
685 extern "C" int yywrap YY_PROTO(( void ));
687 extern int yywrap YY_PROTO(( void ));
692 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
696 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
699 #ifdef YY_NEED_STRLEN
700 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
705 static int yyinput YY_PROTO(( void ));
707 static int input YY_PROTO(( void ));
712 static int yy_start_stack_ptr = 0;
713 static int yy_start_stack_depth = 0;
714 static int *yy_start_stack = 0;
715 #ifndef YY_NO_PUSH_STATE
716 static void yy_push_state YY_PROTO(( int new_state ));
718 #ifndef YY_NO_POP_STATE
719 static void yy_pop_state YY_PROTO(( void ));
721 #ifndef YY_NO_TOP_STATE
722 static int yy_top_state YY_PROTO(( void ));
726 #define YY_NO_PUSH_STATE 1
727 #define YY_NO_POP_STATE 1
728 #define YY_NO_TOP_STATE 1
731 #ifdef YY_MALLOC_DECL
739 /* Just try to get by without declaring the routines. This will fail
740 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
741 * or sizeof(void*) != sizeof(int).
746 /* Amount of stuff to slurp up with each read. */
747 #ifndef YY_READ_BUF_SIZE
748 #define YY_READ_BUF_SIZE 8192
751 /* Copy whatever the last rule matched to the standard output. */
754 /* This used to be an fputs(), but since the string might contain NUL's,
755 * we now use fwrite().
757 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
760 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
761 * is returned in "result".
764 #define YY_INPUT(buf,result,max_size) \
765 if ( yy_current_buffer->yy_is_interactive ) \
768 for ( n = 0; n < max_size && \
769 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
772 buf[n++] = (char) c; \
773 if ( c == EOF && ferror( yyin ) ) \
774 YY_FATAL_ERROR( "input in flex scanner failed" ); \
777 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
778 && ferror( yyin ) ) \
779 YY_FATAL_ERROR( "input in flex scanner failed" );
782 /* No semi-colon after return; correct usage is to write "yyterminate();" -
783 * we don't want an extra ';' after the "return" because that will cause
784 * some compilers to complain about unreachable statements.
787 #define yyterminate() return YY_NULL
790 /* Number of entries by which start-condition stack grows. */
791 #ifndef YY_START_STACK_INCR
792 #define YY_START_STACK_INCR 25
795 /* Report a fatal error. */
796 #ifndef YY_FATAL_ERROR
797 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
800 /* Default declaration of generated scanner - a define so the user can
801 * easily add parameters.
804 #define YY_DECL int yylex YY_PROTO(( void ))
807 /* Code executed at the beginning of each rule, after yytext and yyleng
810 #ifndef YY_USER_ACTION
811 #define YY_USER_ACTION
814 /* Code executed at the end of each rule. */
816 #define YY_BREAK break;
819 #define YY_RULE_SETUP \
821 yy_current_buffer->yy_at_bol = \
822 (yytext[yyleng - 1] == '\n'); \
827 register yy_state_type yy_current_state;
828 register char *yy_cp = NULL, *yy_bp = NULL;
845 yy_start = 1; /* first start state */
853 if ( ! yy_current_buffer )
855 yy_create_buffer( yyin, YY_BUF_SIZE );
857 yy_load_buffer_state();
860 while ( 1 ) /* loops until end-of-file is reached */
864 /* Support of yytext. */
865 *yy_cp = yy_hold_char;
867 /* yy_bp points to the position in yy_ch_buf of the start of
872 yy_current_state = yy_start;
873 yy_current_state += YY_AT_BOL();
874 yy_state_ptr = yy_state_buf;
875 *yy_state_ptr++ = yy_current_state;
879 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
880 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
882 yy_current_state = (int) yy_def[yy_current_state];
883 if ( yy_current_state >= 240 )
884 yy_c = yy_meta[(unsigned int) yy_c];
886 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
887 *yy_state_ptr++ = yy_current_state;
890 while ( yy_base[yy_current_state] != 510 );
893 yy_current_state = *--yy_state_ptr;
894 yy_lp = yy_accept[yy_current_state];
895 find_rule: /* we branch to this label when backing up */
896 for ( ; ; ) /* until we find what rule we matched */
898 if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
900 yy_act = yy_acclist[yy_lp];
902 yy_full_match = yy_cp;
907 yy_current_state = *--yy_state_ptr;
908 yy_lp = yy_accept[yy_current_state];
914 do_action: /* This label is used only to access EOF actions. */
918 { /* beginning of action switch */
922 { line_no++; REJECT; }
927 { fprintf(stderr,"You are a bad bad person!\n"); REJECT; }
930 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
931 yy_c_buf_p = yy_cp -= 1;
932 YY_DO_BEFORE_ACTION; /* set up yytext again */
935 { ; /*comment, ignore*/ }
938 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
939 yy_c_buf_p = yy_cp -= 1;
940 YY_DO_BEFORE_ACTION; /* set up yytext again */
943 { add_to_cbuf(yytext); /*comment, ignore*/ }
946 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
947 yy_c_buf_p = yy_cp -= 1;
948 YY_DO_BEFORE_ACTION; /* set up yytext again */
951 { ; /*comment, ignore*/ }
954 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
955 yy_c_buf_p = yy_cp -= 1;
956 YY_DO_BEFORE_ACTION; /* set up yytext again */
959 { ; /*comment, ignore*/ }
964 {BEGIN(COMMENT); before_comment = INITIAL; }
972 before_comment = C_CODE;
978 {BEGIN(COMMENT); before_comment = CLASS_CODE; }
983 {BEGIN(COMMENT); before_comment = CLASS_CODE_I; }
989 if(before_comment == C_CODE) add_to_cbuf(yytext);
990 BEGIN(before_comment);
997 /* comment, ignore */
998 if(before_comment == C_CODE) add_to_cbuf(yytext);
1005 /* comment, ignore */
1006 if(before_comment == C_CODE) add_to_cbuf(yytext);
1015 class_after_c = FALSE;
1018 ccode_line = line_no;
1027 class_after_c = FALSE;
1030 ccode_line = line_no;
1049 { add_to_cbuf(yytext); }
1054 { add_to_cbuf(yytext); }
1059 { add_to_cbuf(yytext); }
1064 { add_to_cbuf(yytext); }
1069 { add_to_cbuf(yytext); }
1074 { add_to_cbuf(yytext); }
1079 { add_to_cbuf(yytext); }
1085 BEGIN(C_CODE_STRING);
1086 add_to_cbuf(yytext);
1092 { add_to_cbuf(yytext); }
1099 add_to_cbuf(yytext);
1105 { add_to_cbuf(yytext); }
1110 { add_to_cbuf(yytext); }
1117 add_to_cbuf(yytext);
1125 if(parenth_depth<0) {
1127 } else if(parenth_depth==0 && class_after_c) {
1128 BEGIN(CLASS_CODE_I);
1133 add_to_cbuf(yytext);
1139 { add_to_cbuf(yytext); }
1144 { add_to_cbuf(yytext); }
1232 {yylval.line = line_no; return PUBLIC;}
1237 {yylval.line = line_no; return PRIVATE;}
1242 {yylval.line = line_no; return ARGUMENT;}
1247 {yylval.line = line_no; return VIRTUAL;}
1252 {yylval.line = line_no; return SIGNAL;}
1257 {yylval.line = line_no; return OVERRIDE;}
1268 yylval.id = g_strdup(yytext);
1276 yylval.id = g_strdup(yytext);
1284 yylval.id = g_strdup(yytext);
1292 BEGIN(CLASS_CODE_I);
1302 class_after_c = TRUE;
1303 ccode_line = line_no;
1304 yylval.line = line_no;
1325 yylval.line = line_no;
1339 #line 1340 "lex.yy.c"
1340 case YY_STATE_EOF(INITIAL):
1341 case YY_STATE_EOF(COMMENT):
1342 case YY_STATE_EOF(C_CODE):
1343 case YY_STATE_EOF(C_CODE_STRING):
1344 case YY_STATE_EOF(CLASS_CODE):
1345 case YY_STATE_EOF(CLASS_CODE_I):
1348 case YY_END_OF_BUFFER:
1350 /* Amount of text matched not including the EOB char. */
1351 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1353 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1354 *yy_cp = yy_hold_char;
1355 YY_RESTORE_YY_MORE_OFFSET
1357 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1359 /* We're scanning a new file or input source. It's
1360 * possible that this happened because the user
1361 * just pointed yyin at a new source and called
1362 * yylex(). If so, then we have to assure
1363 * consistency between yy_current_buffer and our
1364 * globals. Here is the right place to do so, because
1365 * this is the first action (other than possibly a
1366 * back-up) that will match for the new input source.
1368 yy_n_chars = yy_current_buffer->yy_n_chars;
1369 yy_current_buffer->yy_input_file = yyin;
1370 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1373 /* Note that here we test for yy_c_buf_p "<=" to the position
1374 * of the first EOB in the buffer, since yy_c_buf_p will
1375 * already have been incremented past the NUL character
1376 * (since all states make transitions on EOB to the
1377 * end-of-buffer state). Contrast this with the test
1380 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1381 { /* This was really a NUL. */
1382 yy_state_type yy_next_state;
1384 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1386 yy_current_state = yy_get_previous_state();
1388 /* Okay, we're now positioned to make the NUL
1389 * transition. We couldn't have
1390 * yy_get_previous_state() go ahead and do it
1391 * for us because it doesn't know how to deal
1392 * with the possibility of jamming (and we don't
1393 * want to build jamming into it because then it
1394 * will run more slowly).
1397 yy_next_state = yy_try_NUL_trans( yy_current_state );
1399 yy_bp = yytext_ptr + YY_MORE_ADJ;
1401 if ( yy_next_state )
1403 /* Consume the NUL. */
1404 yy_cp = ++yy_c_buf_p;
1405 yy_current_state = yy_next_state;
1412 goto yy_find_action;
1416 else switch ( yy_get_next_buffer() )
1418 case EOB_ACT_END_OF_FILE:
1420 yy_did_buffer_switch_on_eof = 0;
1424 /* Note: because we've taken care in
1425 * yy_get_next_buffer() to have set up
1426 * yytext, we can now set up
1427 * yy_c_buf_p so that if some total
1428 * hoser (like flex itself) wants to
1429 * call the scanner after we return the
1430 * YY_NULL, it'll still work - another
1431 * YY_NULL will get returned.
1433 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1435 yy_act = YY_STATE_EOF(YY_START);
1441 if ( ! yy_did_buffer_switch_on_eof )
1447 case EOB_ACT_CONTINUE_SCAN:
1449 yytext_ptr + yy_amount_of_matched_text;
1451 yy_current_state = yy_get_previous_state();
1454 yy_bp = yytext_ptr + YY_MORE_ADJ;
1457 case EOB_ACT_LAST_MATCH:
1459 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1461 yy_current_state = yy_get_previous_state();
1464 yy_bp = yytext_ptr + YY_MORE_ADJ;
1465 goto yy_find_action;
1472 "fatal flex scanner internal error--no action found" );
1473 } /* end of action switch */
1474 } /* end of scanning one token */
1475 } /* end of yylex */
1478 /* yy_get_next_buffer - try to read in a new buffer
1480 * Returns a code representing an action:
1481 * EOB_ACT_LAST_MATCH -
1482 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1483 * EOB_ACT_END_OF_FILE - end of file
1486 static int yy_get_next_buffer()
1488 register char *dest = yy_current_buffer->yy_ch_buf;
1489 register char *source = yytext_ptr;
1490 register int number_to_move, i;
1493 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1495 "fatal flex scanner internal error--end of buffer missed" );
1497 if ( yy_current_buffer->yy_fill_buffer == 0 )
1498 { /* Don't try to fill the buffer, so this is an EOF. */
1499 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1501 /* We matched a single character, the EOB, so
1502 * treat this as a final EOF.
1504 return EOB_ACT_END_OF_FILE;
1509 /* We matched some text prior to the EOB, first
1512 return EOB_ACT_LAST_MATCH;
1516 /* Try to read more data. */
1518 /* First move last chars to start of buffer. */
1519 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1521 for ( i = 0; i < number_to_move; ++i )
1522 *(dest++) = *(source++);
1524 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1525 /* don't do the read, it's not guaranteed to return an EOF,
1528 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1533 yy_current_buffer->yy_buf_size - number_to_move - 1;
1535 while ( num_to_read <= 0 )
1536 { /* Not enough room in the buffer - grow it. */
1537 #ifdef YY_USES_REJECT
1539 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1542 /* just a shorter name for the current buffer */
1543 YY_BUFFER_STATE b = yy_current_buffer;
1545 int yy_c_buf_p_offset =
1546 (int) (yy_c_buf_p - b->yy_ch_buf);
1548 if ( b->yy_is_our_buffer )
1550 int new_size = b->yy_buf_size * 2;
1552 if ( new_size <= 0 )
1553 b->yy_buf_size += b->yy_buf_size / 8;
1555 b->yy_buf_size *= 2;
1557 b->yy_ch_buf = (char *)
1558 /* Include room in for 2 EOB chars. */
1559 yy_flex_realloc( (void *) b->yy_ch_buf,
1560 b->yy_buf_size + 2 );
1563 /* Can't grow it, we don't own it. */
1566 if ( ! b->yy_ch_buf )
1568 "fatal error - scanner input buffer overflow" );
1570 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1572 num_to_read = yy_current_buffer->yy_buf_size -
1577 if ( num_to_read > YY_READ_BUF_SIZE )
1578 num_to_read = YY_READ_BUF_SIZE;
1580 /* Read in more data. */
1581 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1582 yy_n_chars, num_to_read );
1584 yy_current_buffer->yy_n_chars = yy_n_chars;
1587 if ( yy_n_chars == 0 )
1589 if ( number_to_move == YY_MORE_ADJ )
1591 ret_val = EOB_ACT_END_OF_FILE;
1597 ret_val = EOB_ACT_LAST_MATCH;
1598 yy_current_buffer->yy_buffer_status =
1599 YY_BUFFER_EOF_PENDING;
1604 ret_val = EOB_ACT_CONTINUE_SCAN;
1606 yy_n_chars += number_to_move;
1607 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1608 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1610 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1616 /* yy_get_previous_state - get the state just before the EOB char was reached */
1618 static yy_state_type yy_get_previous_state()
1620 register yy_state_type yy_current_state;
1621 register char *yy_cp;
1623 yy_current_state = yy_start;
1624 yy_current_state += YY_AT_BOL();
1625 yy_state_ptr = yy_state_buf;
1626 *yy_state_ptr++ = yy_current_state;
1628 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1630 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1631 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1633 yy_current_state = (int) yy_def[yy_current_state];
1634 if ( yy_current_state >= 240 )
1635 yy_c = yy_meta[(unsigned int) yy_c];
1637 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1638 *yy_state_ptr++ = yy_current_state;
1641 return yy_current_state;
1645 /* yy_try_NUL_trans - try to make a transition on the NUL character
1648 * next_state = yy_try_NUL_trans( current_state );
1651 #ifdef YY_USE_PROTOS
1652 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1654 static yy_state_type yy_try_NUL_trans( yy_current_state )
1655 yy_state_type yy_current_state;
1658 register int yy_is_jam;
1660 register YY_CHAR yy_c = 1;
1661 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1663 yy_current_state = (int) yy_def[yy_current_state];
1664 if ( yy_current_state >= 240 )
1665 yy_c = yy_meta[(unsigned int) yy_c];
1667 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1668 yy_is_jam = (yy_current_state == 239);
1670 *yy_state_ptr++ = yy_current_state;
1672 return yy_is_jam ? 0 : yy_current_state;
1677 #ifdef YY_USE_PROTOS
1678 static void yyunput( int c, register char *yy_bp )
1680 static void yyunput( c, yy_bp )
1682 register char *yy_bp;
1685 register char *yy_cp = yy_c_buf_p;
1687 /* undo effects of setting up yytext */
1688 *yy_cp = yy_hold_char;
1690 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1691 { /* need to shift things up to make room */
1692 /* +2 for EOB chars. */
1693 register int number_to_move = yy_n_chars + 2;
1694 register char *dest = &yy_current_buffer->yy_ch_buf[
1695 yy_current_buffer->yy_buf_size + 2];
1696 register char *source =
1697 &yy_current_buffer->yy_ch_buf[number_to_move];
1699 while ( source > yy_current_buffer->yy_ch_buf )
1700 *--dest = *--source;
1702 yy_cp += (int) (dest - source);
1703 yy_bp += (int) (dest - source);
1704 yy_current_buffer->yy_n_chars =
1705 yy_n_chars = yy_current_buffer->yy_buf_size;
1707 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1708 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1711 *--yy_cp = (char) c;
1715 yy_hold_char = *yy_cp;
1718 #endif /* ifndef YY_NO_UNPUT */
1722 static int yyinput()
1729 *yy_c_buf_p = yy_hold_char;
1731 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1733 /* yy_c_buf_p now points to the character we want to return.
1734 * If this occurs *before* the EOB characters, then it's a
1735 * valid NUL; if not, then we've hit the end of the buffer.
1737 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1738 /* This was really a NUL. */
1742 { /* need more input */
1743 int offset = yy_c_buf_p - yytext_ptr;
1746 switch ( yy_get_next_buffer() )
1748 case EOB_ACT_LAST_MATCH:
1749 /* This happens because yy_g_n_b()
1750 * sees that we've accumulated a
1751 * token and flags that we need to
1752 * try matching the token before
1753 * proceeding. But for input(),
1754 * there's no matching to consider.
1755 * So convert the EOB_ACT_LAST_MATCH
1756 * to EOB_ACT_END_OF_FILE.
1759 /* Reset buffer status. */
1764 case EOB_ACT_END_OF_FILE:
1769 if ( ! yy_did_buffer_switch_on_eof )
1778 case EOB_ACT_CONTINUE_SCAN:
1779 yy_c_buf_p = yytext_ptr + offset;
1785 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
1786 *yy_c_buf_p = '\0'; /* preserve yytext */
1787 yy_hold_char = *++yy_c_buf_p;
1789 yy_current_buffer->yy_at_bol = (c == '\n');
1795 #ifdef YY_USE_PROTOS
1796 void yyrestart( FILE *input_file )
1798 void yyrestart( input_file )
1802 if ( ! yy_current_buffer )
1803 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1805 yy_init_buffer( yy_current_buffer, input_file );
1806 yy_load_buffer_state();
1810 #ifdef YY_USE_PROTOS
1811 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1813 void yy_switch_to_buffer( new_buffer )
1814 YY_BUFFER_STATE new_buffer;
1817 if ( yy_current_buffer == new_buffer )
1820 if ( yy_current_buffer )
1822 /* Flush out information for old buffer. */
1823 *yy_c_buf_p = yy_hold_char;
1824 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1825 yy_current_buffer->yy_n_chars = yy_n_chars;
1828 yy_current_buffer = new_buffer;
1829 yy_load_buffer_state();
1831 /* We don't actually know whether we did this switch during
1832 * EOF (yywrap()) processing, but the only time this flag
1833 * is looked at is after yywrap() is called, so it's safe
1834 * to go ahead and always set it.
1836 yy_did_buffer_switch_on_eof = 1;
1840 #ifdef YY_USE_PROTOS
1841 void yy_load_buffer_state( void )
1843 void yy_load_buffer_state()
1846 yy_n_chars = yy_current_buffer->yy_n_chars;
1847 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1848 yyin = yy_current_buffer->yy_input_file;
1849 yy_hold_char = *yy_c_buf_p;
1853 #ifdef YY_USE_PROTOS
1854 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1856 YY_BUFFER_STATE yy_create_buffer( file, size )
1863 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1865 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1867 b->yy_buf_size = size;
1869 /* yy_ch_buf has to be 2 characters longer than the size given because
1870 * we need to put in 2 end-of-buffer characters.
1872 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1873 if ( ! b->yy_ch_buf )
1874 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1876 b->yy_is_our_buffer = 1;
1878 yy_init_buffer( b, file );
1884 #ifdef YY_USE_PROTOS
1885 void yy_delete_buffer( YY_BUFFER_STATE b )
1887 void yy_delete_buffer( b )
1894 if ( b == yy_current_buffer )
1895 yy_current_buffer = (YY_BUFFER_STATE) 0;
1897 if ( b->yy_is_our_buffer )
1898 yy_flex_free( (void *) b->yy_ch_buf );
1900 yy_flex_free( (void *) b );
1904 #ifndef YY_ALWAYS_INTERACTIVE
1905 #ifndef YY_NEVER_INTERACTIVE
1906 extern int isatty YY_PROTO(( int ));
1910 #ifdef YY_USE_PROTOS
1911 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1913 void yy_init_buffer( b, file )
1920 yy_flush_buffer( b );
1922 b->yy_input_file = file;
1923 b->yy_fill_buffer = 1;
1925 #if YY_ALWAYS_INTERACTIVE
1926 b->yy_is_interactive = 1;
1928 #if YY_NEVER_INTERACTIVE
1929 b->yy_is_interactive = 0;
1931 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1937 #ifdef YY_USE_PROTOS
1938 void yy_flush_buffer( YY_BUFFER_STATE b )
1940 void yy_flush_buffer( b )
1950 /* We always need two end-of-buffer characters. The first causes
1951 * a transition to the end-of-buffer state. The second causes
1952 * a jam in that state.
1954 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1955 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1957 b->yy_buf_pos = &b->yy_ch_buf[0];
1960 b->yy_buffer_status = YY_BUFFER_NEW;
1962 if ( b == yy_current_buffer )
1963 yy_load_buffer_state();
1967 #ifndef YY_NO_SCAN_BUFFER
1968 #ifdef YY_USE_PROTOS
1969 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1971 YY_BUFFER_STATE yy_scan_buffer( base, size )
1979 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1980 base[size-1] != YY_END_OF_BUFFER_CHAR )
1981 /* They forgot to leave room for the EOB's. */
1984 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1986 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1988 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1989 b->yy_buf_pos = b->yy_ch_buf = base;
1990 b->yy_is_our_buffer = 0;
1991 b->yy_input_file = 0;
1992 b->yy_n_chars = b->yy_buf_size;
1993 b->yy_is_interactive = 0;
1995 b->yy_fill_buffer = 0;
1996 b->yy_buffer_status = YY_BUFFER_NEW;
1998 yy_switch_to_buffer( b );
2005 #ifndef YY_NO_SCAN_STRING
2006 #ifdef YY_USE_PROTOS
2007 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
2009 YY_BUFFER_STATE yy_scan_string( yy_str )
2010 yyconst char *yy_str;
2014 for ( len = 0; yy_str[len]; ++len )
2017 return yy_scan_bytes( yy_str, len );
2022 #ifndef YY_NO_SCAN_BYTES
2023 #ifdef YY_USE_PROTOS
2024 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
2026 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
2027 yyconst char *bytes;
2036 /* Get memory for full buffer, including space for trailing EOB's. */
2038 buf = (char *) yy_flex_alloc( n );
2040 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2042 for ( i = 0; i < len; ++i )
2045 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2047 b = yy_scan_buffer( buf, n );
2049 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2051 /* It's okay to grow etc. this buffer, and we should throw it
2052 * away when we're done.
2054 b->yy_is_our_buffer = 1;
2061 #ifndef YY_NO_PUSH_STATE
2062 #ifdef YY_USE_PROTOS
2063 static void yy_push_state( int new_state )
2065 static void yy_push_state( new_state )
2069 if ( yy_start_stack_ptr >= yy_start_stack_depth )
2073 yy_start_stack_depth += YY_START_STACK_INCR;
2074 new_size = yy_start_stack_depth * sizeof( int );
2076 if ( ! yy_start_stack )
2077 yy_start_stack = (int *) yy_flex_alloc( new_size );
2080 yy_start_stack = (int *) yy_flex_realloc(
2081 (void *) yy_start_stack, new_size );
2083 if ( ! yy_start_stack )
2085 "out of memory expanding start-condition stack" );
2088 yy_start_stack[yy_start_stack_ptr++] = YY_START;
2095 #ifndef YY_NO_POP_STATE
2096 static void yy_pop_state()
2098 if ( --yy_start_stack_ptr < 0 )
2099 YY_FATAL_ERROR( "start-condition stack underflow" );
2101 BEGIN(yy_start_stack[yy_start_stack_ptr]);
2106 #ifndef YY_NO_TOP_STATE
2107 static int yy_top_state()
2109 return yy_start_stack[yy_start_stack_ptr - 1];
2113 #ifndef YY_EXIT_FAILURE
2114 #define YY_EXIT_FAILURE 2
2117 #ifdef YY_USE_PROTOS
2118 static void yy_fatal_error( yyconst char msg[] )
2120 static void yy_fatal_error( msg )
2124 (void) fprintf( stderr, "%s\n", msg );
2125 exit( YY_EXIT_FAILURE );
2130 /* Redefine yyless() so it works in section 3 code. */
2136 /* Undo effects of setting up yytext. */ \
2137 yytext[yyleng] = yy_hold_char; \
2138 yy_c_buf_p = yytext + n; \
2139 yy_hold_char = *yy_c_buf_p; \
2140 *yy_c_buf_p = '\0'; \
2146 /* Internal utility routines. */
2149 #ifdef YY_USE_PROTOS
2150 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2152 static void yy_flex_strncpy( s1, s2, n )
2159 for ( i = 0; i < n; ++i )
2164 #ifdef YY_NEED_STRLEN
2165 #ifdef YY_USE_PROTOS
2166 static int yy_flex_strlen( yyconst char *s )
2168 static int yy_flex_strlen( s )
2173 for ( n = 0; s[n]; ++n )
2181 #ifdef YY_USE_PROTOS
2182 static void *yy_flex_alloc( yy_size_t size )
2184 static void *yy_flex_alloc( size )
2188 return (void *) malloc( size );
2191 #ifdef YY_USE_PROTOS
2192 static void *yy_flex_realloc( void *ptr, yy_size_t size )
2194 static void *yy_flex_realloc( ptr, size )
2199 /* The cast to (char *) in the following accommodates both
2200 * implementations that use char* generic pointers, and those
2201 * that use void* generic pointers. It works with the latter
2202 * because both ANSI C and C++ allow castless assignment from
2203 * any pointer type to void*, and deal with argument conversions
2204 * as though doing an assignment.
2206 return (void *) realloc( (char *) ptr, size );
2209 #ifdef YY_USE_PROTOS
2210 static void yy_flex_free( void *ptr )
2212 static void yy_flex_free( ptr )