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 62
288 #define YY_END_OF_BUFFER 63
289 static yyconst short int yy_acclist[293] =
291 63, 61, 62, 60, 61, 62, 1, 60, 62, 61,
292 62, 61, 62, 61, 62, 11, 61, 62, 1, 62,
293 11, 61, 62, 26, 61, 62, 1, 27, 62, 20,
294 26, 61, 62, 26, 61, 62, 26, 61, 62, 26,
295 61, 62, 24, 26, 61, 62, 25, 26, 61, 62,
296 26, 61, 62, 23, 61, 62, 22, 23, 61, 62,
297 23, 61, 62, 61, 62, 61, 62, 56, 61, 62,
298 56, 61, 62, 57, 61, 62, 61, 62, 61, 62,
299 54, 61, 62, 54, 61, 62, 56, 61, 62, 56,
300 61, 62, 56, 61, 62, 56, 61, 62, 56, 61,
302 62, 56, 61, 62, 56, 61, 62, 56, 61, 62,
303 56, 61, 62, 56, 61, 62, 56, 61, 62, 56,
304 61, 62, 56, 61, 62, 56, 61, 62, 58, 61,
305 62, 59, 61, 62, 6, 13, 10, 7, 19, 14,
306 21, 8, 56, 55, 56, 54, 9, 54, 54, 56,
307 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
308 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
309 2, 12, 15, 17, 3, 4, 55, 56, 54, 5,
310 54, 54, 56, 56, 56, 56, 56, 56, 56, 38,
311 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
313 56, 56, 56, 56, 56, 56, 16, 18, 29, 56,
314 56, 41, 56, 56, 56, 33, 56, 56, 56, 47,
315 56, 36, 56, 51, 56, 56, 56, 56, 56, 56,
316 56, 56, 52, 56, 56, 56, 56, 30, 56, 28,
317 56, 50, 56, 56, 48, 56, 39, 56, 56, 56,
318 56, 56, 37, 56, 56, 56, 56, 32, 56, 56,
319 56, 56, 40, 56, 56, 56, 56, 42, 56, 46,
320 56, 34, 56, 31, 56, 56, 56, 56, 53, 56,
321 56, 43, 56, 56, 45, 56, 44, 56, 49, 56,
326 static yyconst short int yy_accept[217] =
328 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
329 1, 1, 1, 2, 4, 7, 10, 12, 14, 16,
330 19, 21, 24, 27, 30, 34, 37, 40, 43, 47,
331 51, 54, 57, 61, 64, 66, 68, 71, 74, 77,
332 79, 81, 84, 87, 90, 93, 96, 99, 102, 105,
333 108, 111, 114, 117, 120, 123, 126, 129, 132, 135,
334 136, 136, 136, 136, 137, 138, 138, 138, 138, 139,
335 139, 140, 141, 142, 143, 143, 143, 144, 145, 146,
336 147, 148, 148, 148, 149, 149, 149, 150, 151, 152,
337 153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
339 163, 164, 165, 166, 167, 168, 169, 170, 171, 171,
340 172, 172, 173, 173, 173, 174, 175, 175, 176, 176,
341 177, 177, 178, 179, 180, 180, 181, 182, 183, 184,
342 185, 186, 187, 188, 189, 190, 192, 193, 194, 195,
343 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
344 206, 207, 207, 208, 209, 211, 212, 214, 215, 216,
345 218, 219, 220, 222, 224, 226, 227, 228, 229, 230,
346 231, 232, 233, 235, 236, 237, 238, 240, 241, 242,
347 244, 245, 247, 249, 250, 251, 252, 253, 255, 256,
348 257, 258, 260, 261, 262, 263, 265, 266, 267, 268,
350 270, 272, 274, 276, 277, 278, 279, 281, 282, 284,
351 285, 287, 289, 291, 293, 293
354 static yyconst int yy_ec[256] =
356 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
357 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
358 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
359 1, 2, 1, 4, 1, 1, 5, 1, 6, 1,
360 1, 7, 1, 1, 1, 8, 9, 10, 11, 11,
361 11, 11, 11, 11, 11, 12, 12, 13, 1, 1,
362 1, 1, 1, 1, 14, 14, 14, 14, 14, 14,
363 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
364 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
365 1, 16, 1, 1, 15, 1, 17, 18, 19, 20,
367 21, 22, 23, 24, 25, 15, 26, 27, 28, 29,
368 30, 31, 15, 32, 33, 34, 35, 36, 15, 37,
369 38, 15, 39, 1, 40, 1, 1, 1, 1, 1,
370 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
371 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
372 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
373 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
374 1, 1, 1, 1, 1, 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,
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,
382 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
386 static yyconst int yy_meta[41] =
388 1, 1, 2, 1, 1, 1, 1, 1, 1, 3,
389 3, 3, 4, 5, 6, 1, 5, 5, 5, 5,
390 5, 5, 6, 6, 6, 6, 6, 6, 6, 6,
391 6, 6, 6, 6, 6, 6, 6, 6, 1, 1
394 static yyconst short int yy_base[231] =
396 0, 2, 3, 5, 19, 57, 10, 13, 97, 0,
397 137, 0, 491, 492, 492, 492, 11, 463, 0, 492,
398 492, 480, 492, 492, 492, 11, 23, 0, 492, 492,
399 448, 492, 492, 0, 24, 0, 474, 2, 492, 26,
400 33, 33, 44, 33, 40, 44, 54, 55, 56, 58,
401 59, 165, 167, 166, 168, 63, 65, 492, 492, 492,
402 483, 468, 445, 492, 492, 8, 477, 476, 492, 478,
403 492, 492, 492, 492, 477, 466, 465, 464, 173, 172,
404 492, 473, 177, 185, 197, 0, 202, 64, 198, 185,
405 191, 203, 204, 205, 208, 209, 66, 68, 210, 211,
407 73, 212, 214, 215, 217, 219, 227, 220, 472, 492,
408 441, 492, 467, 466, 492, 492, 468, 492, 467, 492,
409 456, 455, 230, 239, 464, 492, 243, 0, 233, 243,
410 244, 247, 248, 249, 253, 453, 251, 254, 256, 258,
411 259, 260, 261, 265, 266, 267, 268, 271, 273, 274,
412 172, 432, 492, 492, 451, 279, 450, 280, 286, 449,
413 281, 287, 448, 447, 446, 290, 291, 292, 299, 297,
414 312, 298, 445, 301, 303, 305, 444, 492, 306, 443,
415 307, 442, 441, 319, 321, 322, 323, 439, 324, 325,
416 326, 395, 328, 330, 335, 389, 331, 339, 337, 362,
418 361, 360, 358, 340, 341, 342, 356, 349, 354, 352,
419 353, 216, 71, 36, 492, 376, 382, 388, 394, 400,
420 406, 408, 412, 418, 424, 430, 434, 438, 444, 448
423 static yyconst short int yy_def[231] =
425 216, 216, 217, 217, 218, 218, 219, 219, 215, 9,
426 215, 11, 215, 215, 215, 215, 215, 215, 215, 215,
427 215, 215, 215, 215, 215, 215, 215, 220, 215, 215,
428 215, 215, 215, 221, 215, 222, 223, 223, 215, 215,
429 215, 215, 215, 223, 223, 223, 223, 223, 223, 223,
430 223, 223, 223, 223, 223, 223, 223, 215, 215, 215,
431 224, 215, 215, 215, 215, 215, 215, 215, 215, 225,
432 215, 215, 215, 215, 226, 227, 223, 228, 223, 215,
433 215, 229, 215, 215, 215, 230, 215, 223, 223, 223,
434 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
436 223, 223, 223, 223, 223, 223, 223, 223, 224, 215,
437 215, 215, 215, 215, 215, 215, 225, 215, 226, 215,
438 227, 228, 223, 215, 229, 215, 215, 230, 223, 223,
439 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
440 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
441 223, 215, 215, 215, 223, 223, 223, 223, 223, 223,
442 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
443 223, 223, 223, 223, 223, 223, 223, 215, 223, 223,
444 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
445 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
447 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
448 223, 223, 223, 223, 0, 215, 215, 215, 215, 215,
449 215, 215, 215, 215, 215, 215, 215, 215, 215, 215
452 static yyconst short int yy_nxt[533] =
454 215, 15, 16, 15, 16, 21, 19, 21, 17, 22,
455 17, 22, 21, 33, 78, 21, 33, 60, 18, 61,
456 18, 24, 25, 63, 26, 34, 66, 27, 34, 69,
457 74, 70, 75, 79, 28, 80, 80, 80, 64, 81,
458 83, 82, 84, 84, 85, 78, 113, 114, 78, 67,
459 68, 83, 78, 87, 87, 87, 78, 29, 30, 24,
460 25, 31, 26, 89, 88, 27, 78, 78, 78, 86,
461 78, 78, 28, 90, 95, 78, 78, 78, 78, 92,
462 78, 93, 91, 78, 94, 78, 129, 96, 140, 107,
463 143, 106, 139, 97, 108, 29, 30, 14, 15, 16,
465 14, 14, 14, 14, 14, 35, 14, 14, 14, 36,
466 37, 37, 14, 37, 37, 37, 37, 37, 38, 37,
467 37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
468 37, 37, 37, 37, 37, 39, 14, 14, 15, 16,
469 14, 14, 14, 14, 40, 41, 42, 43, 43, 36,
470 37, 37, 14, 44, 37, 45, 46, 47, 48, 37,
471 37, 49, 37, 50, 37, 51, 52, 53, 37, 54,
472 55, 56, 57, 37, 37, 58, 59, 78, 78, 78,
473 78, 124, 124, 124, 78, 78, 127, 127, 127, 102,
474 103, 177, 83, 98, 84, 84, 85, 78, 100, 104,
476 99, 101, 123, 78, 83, 105, 85, 85, 85, 83,
477 78, 87, 87, 87, 130, 78, 78, 78, 131, 132,
478 78, 78, 78, 78, 78, 133, 78, 78, 78, 78,
479 141, 78, 78, 135, 134, 142, 145, 138, 136, 78,
480 137, 144, 78, 148, 151, 78, 146, 147, 124, 124,
481 124, 149, 127, 127, 127, 78, 78, 155, 150, 78,
482 78, 78, 158, 78, 159, 78, 78, 156, 78, 162,
483 78, 78, 78, 78, 157, 160, 164, 78, 78, 78,
484 78, 161, 165, 78, 163, 78, 78, 169, 173, 166,
485 167, 78, 78, 78, 171, 168, 170, 175, 78, 78,
487 174, 172, 78, 78, 78, 180, 179, 176, 186, 78,
488 78, 78, 181, 78, 182, 78, 191, 78, 78, 78,
489 183, 184, 185, 187, 78, 193, 195, 196, 189, 192,
490 188, 78, 190, 78, 78, 78, 78, 78, 78, 194,
491 78, 200, 78, 78, 202, 198, 205, 78, 197, 78,
492 201, 78, 78, 78, 78, 199, 204, 209, 208, 203,
493 210, 78, 207, 206, 78, 78, 78, 211, 78, 213,
494 78, 214, 78, 78, 78, 212, 14, 14, 14, 14,
495 14, 14, 20, 20, 20, 20, 20, 20, 23, 23,
496 23, 23, 23, 23, 32, 32, 32, 32, 32, 32,
498 71, 78, 71, 71, 71, 71, 73, 78, 73, 73,
499 73, 73, 76, 76, 77, 77, 77, 77, 109, 109,
500 109, 109, 109, 109, 117, 117, 117, 117, 117, 117,
501 119, 119, 119, 119, 119, 119, 121, 121, 121, 121,
502 122, 122, 122, 122, 125, 125, 125, 125, 125, 125,
503 128, 78, 128, 78, 78, 78, 78, 78, 78, 78,
504 78, 78, 78, 78, 178, 78, 126, 78, 78, 120,
505 118, 154, 153, 152, 110, 126, 78, 78, 78, 120,
506 118, 116, 115, 112, 111, 110, 78, 72, 65, 62,
507 215, 13, 215, 215, 215, 215, 215, 215, 215, 215,
509 215, 215, 215, 215, 215, 215, 215, 215, 215, 215,
510 215, 215, 215, 215, 215, 215, 215, 215, 215, 215,
511 215, 215, 215, 215, 215, 215, 215, 215, 215, 215,
515 static yyconst short int yy_chk[533] =
517 0, 1, 1, 2, 2, 3, 2, 4, 1, 3,
518 2, 4, 7, 7, 38, 8, 8, 17, 1, 17,
519 2, 5, 5, 19, 5, 7, 26, 5, 8, 27,
520 35, 27, 35, 38, 5, 40, 40, 40, 19, 41,
521 42, 41, 42, 42, 42, 44, 66, 66, 214, 26,
522 26, 43, 45, 43, 43, 43, 46, 5, 5, 6,
523 6, 6, 6, 45, 44, 6, 47, 48, 49, 42,
524 50, 51, 6, 46, 50, 56, 88, 57, 97, 48,
525 98, 48, 47, 213, 49, 101, 88, 50, 98, 57,
526 101, 56, 97, 51, 57, 6, 6, 9, 9, 9,
528 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
529 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
530 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
531 9, 9, 9, 9, 9, 9, 9, 11, 11, 11,
532 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
533 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
534 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
535 11, 11, 11, 11, 11, 11, 11, 52, 54, 53,
536 55, 80, 80, 80, 151, 79, 83, 83, 83, 54,
537 54, 151, 84, 52, 84, 84, 84, 90, 53, 54,
539 52, 53, 79, 91, 85, 55, 85, 85, 85, 87,
540 89, 87, 87, 87, 89, 92, 93, 94, 89, 90,
541 95, 96, 99, 100, 102, 91, 103, 104, 212, 105,
542 99, 106, 108, 93, 92, 100, 103, 96, 94, 107,
543 95, 102, 123, 106, 108, 129, 104, 105, 124, 124,
544 124, 106, 127, 127, 127, 130, 131, 123, 107, 132,
545 133, 134, 131, 137, 132, 135, 138, 129, 139, 135,
546 140, 141, 142, 143, 130, 133, 138, 144, 145, 146,
547 147, 134, 139, 148, 137, 149, 150, 143, 147, 140,
548 141, 156, 158, 161, 145, 142, 144, 149, 159, 162,
550 148, 146, 166, 167, 168, 158, 156, 150, 168, 170,
551 172, 169, 159, 174, 161, 175, 172, 176, 179, 181,
552 162, 166, 167, 169, 171, 175, 179, 181, 171, 174,
553 170, 184, 171, 185, 186, 187, 189, 190, 191, 176,
554 193, 187, 194, 197, 190, 185, 194, 195, 184, 199,
555 189, 198, 204, 205, 206, 186, 193, 199, 198, 191,
556 204, 208, 197, 195, 210, 211, 209, 205, 207, 208,
557 203, 210, 202, 201, 200, 206, 216, 216, 216, 216,
558 216, 216, 217, 217, 217, 217, 217, 217, 218, 218,
559 218, 218, 218, 218, 219, 219, 219, 219, 219, 219,
561 220, 196, 220, 220, 220, 220, 221, 192, 221, 221,
562 221, 221, 222, 222, 223, 223, 223, 223, 224, 224,
563 224, 224, 224, 224, 225, 225, 225, 225, 225, 225,
564 226, 226, 226, 226, 226, 226, 227, 227, 227, 227,
565 228, 228, 228, 228, 229, 229, 229, 229, 229, 229,
566 230, 188, 230, 183, 182, 180, 177, 173, 165, 164,
567 163, 160, 157, 155, 152, 136, 125, 122, 121, 119,
568 117, 114, 113, 111, 109, 82, 78, 77, 76, 75,
569 70, 68, 67, 63, 62, 61, 37, 31, 22, 18,
570 13, 215, 215, 215, 215, 215, 215, 215, 215, 215,
572 215, 215, 215, 215, 215, 215, 215, 215, 215, 215,
573 215, 215, 215, 215, 215, 215, 215, 215, 215, 215,
574 215, 215, 215, 215, 215, 215, 215, 215, 215, 215,
578 static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
579 static char *yy_full_match;
583 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
584 yy_cp = yy_full_match; /* restore poss. backed-over text */ \
588 #define yymore() yymore_used_but_not_detected
589 #define YY_MORE_ADJ 0
590 #define YY_RESTORE_YY_MORE_OFFSET
594 /* GOB C Preprocessor
595 * Copyright (C) 1999 the Free Software Foundation.
597 * Author: George Lebl
599 * This program is free software; you can redistribute it and/or modify
600 * it under the terms of the GNU General Public License as published by
601 * the Free Software Foundation; either version 2 of the License, or
602 * (at your option) any later version.
604 * This program is distributed in the hope that it will be useful,
605 * but WITHOUT ANY WARRANTY; without even the implied warranty of
606 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
607 * GNU General Public License for more details.
609 * You should have received a copy of the GNU General Public License
610 * along with this program; if not, write to the Free Software
611 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
621 static int parenth_depth = 0;
622 static int before_comment = INITIAL;
623 static int class_after_c = FALSE;
624 static int header_c = FALSE;
626 static GString *cbuf = NULL;
634 cbuf = g_string_new("");
636 cbuf = g_string_assign(cbuf,"");
644 cbuf = g_string_new(s);
646 cbuf = g_string_append(cbuf,s);
654 #define C_CODE_STRING 3
658 #define CLASS_CODE_I 5
662 /* Macros after this point can all be overridden by user definitions in
666 #ifndef YY_SKIP_YYWRAP
668 extern "C" int yywrap YY_PROTO(( void ));
670 extern int yywrap YY_PROTO(( void ));
675 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
679 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
682 #ifdef YY_NEED_STRLEN
683 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
688 static int yyinput YY_PROTO(( void ));
690 static int input YY_PROTO(( void ));
695 static int yy_start_stack_ptr = 0;
696 static int yy_start_stack_depth = 0;
697 static int *yy_start_stack = 0;
698 #ifndef YY_NO_PUSH_STATE
699 static void yy_push_state YY_PROTO(( int new_state ));
701 #ifndef YY_NO_POP_STATE
702 static void yy_pop_state YY_PROTO(( void ));
704 #ifndef YY_NO_TOP_STATE
705 static int yy_top_state YY_PROTO(( void ));
709 #define YY_NO_PUSH_STATE 1
710 #define YY_NO_POP_STATE 1
711 #define YY_NO_TOP_STATE 1
714 #ifdef YY_MALLOC_DECL
722 /* Just try to get by without declaring the routines. This will fail
723 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
724 * or sizeof(void*) != sizeof(int).
729 /* Amount of stuff to slurp up with each read. */
730 #ifndef YY_READ_BUF_SIZE
731 #define YY_READ_BUF_SIZE 8192
734 /* Copy whatever the last rule matched to the standard output. */
737 /* This used to be an fputs(), but since the string might contain NUL's,
738 * we now use fwrite().
740 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
743 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
744 * is returned in "result".
747 #define YY_INPUT(buf,result,max_size) \
748 if ( yy_current_buffer->yy_is_interactive ) \
751 for ( n = 0; n < max_size && \
752 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
755 buf[n++] = (char) c; \
756 if ( c == EOF && ferror( yyin ) ) \
757 YY_FATAL_ERROR( "input in flex scanner failed" ); \
760 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
761 && ferror( yyin ) ) \
762 YY_FATAL_ERROR( "input in flex scanner failed" );
765 /* No semi-colon after return; correct usage is to write "yyterminate();" -
766 * we don't want an extra ';' after the "return" because that will cause
767 * some compilers to complain about unreachable statements.
770 #define yyterminate() return YY_NULL
773 /* Number of entries by which start-condition stack grows. */
774 #ifndef YY_START_STACK_INCR
775 #define YY_START_STACK_INCR 25
778 /* Report a fatal error. */
779 #ifndef YY_FATAL_ERROR
780 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
783 /* Default declaration of generated scanner - a define so the user can
784 * easily add parameters.
787 #define YY_DECL int yylex YY_PROTO(( void ))
790 /* Code executed at the beginning of each rule, after yytext and yyleng
793 #ifndef YY_USER_ACTION
794 #define YY_USER_ACTION
797 /* Code executed at the end of each rule. */
799 #define YY_BREAK break;
802 #define YY_RULE_SETUP \
804 yy_current_buffer->yy_at_bol = \
805 (yytext[yyleng - 1] == '\n'); \
810 register yy_state_type yy_current_state;
811 register char *yy_cp, *yy_bp;
828 yy_start = 1; /* first start state */
836 if ( ! yy_current_buffer )
838 yy_create_buffer( yyin, YY_BUF_SIZE );
840 yy_load_buffer_state();
843 while ( 1 ) /* loops until end-of-file is reached */
847 /* Support of yytext. */
848 *yy_cp = yy_hold_char;
850 /* yy_bp points to the position in yy_ch_buf of the start of
855 yy_current_state = yy_start;
856 yy_current_state += YY_AT_BOL();
857 yy_state_ptr = yy_state_buf;
858 *yy_state_ptr++ = yy_current_state;
862 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
863 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
865 yy_current_state = (int) yy_def[yy_current_state];
866 if ( yy_current_state >= 216 )
867 yy_c = yy_meta[(unsigned int) yy_c];
869 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
870 *yy_state_ptr++ = yy_current_state;
873 while ( yy_base[yy_current_state] != 492 );
876 yy_current_state = *--yy_state_ptr;
877 yy_lp = yy_accept[yy_current_state];
878 find_rule: /* we branch to this label when backing up */
879 for ( ; ; ) /* until we find what rule we matched */
881 if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
883 yy_act = yy_acclist[yy_lp];
885 yy_full_match = yy_cp;
890 yy_current_state = *--yy_state_ptr;
891 yy_lp = yy_accept[yy_current_state];
897 do_action: /* This label is used only to access EOF actions. */
901 { /* beginning of action switch */
905 { line_no++; REJECT; }
908 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
909 yy_c_buf_p = yy_cp -= 1;
910 YY_DO_BEFORE_ACTION; /* set up yytext again */
913 { ; /*comment, ignore*/ }
916 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
917 yy_c_buf_p = yy_cp -= 1;
918 YY_DO_BEFORE_ACTION; /* set up yytext again */
921 { ; /*comment, ignore*/ }
924 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
925 yy_c_buf_p = yy_cp -= 1;
926 YY_DO_BEFORE_ACTION; /* set up yytext again */
929 { ; /*comment, ignore*/ }
932 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
933 yy_c_buf_p = yy_cp -= 1;
934 YY_DO_BEFORE_ACTION; /* set up yytext again */
937 { ; /*comment, ignore*/ }
942 {BEGIN(COMMENT); before_comment = INITIAL; }
947 {BEGIN(COMMENT); before_comment = C_CODE; }
952 {BEGIN(COMMENT); before_comment = CLASS_CODE; }
957 {BEGIN(COMMENT); before_comment = CLASS_CODE_I; }
962 {BEGIN(before_comment);}
967 { ; /* comment, ignore */ }
975 class_after_c = FALSE;
986 class_after_c = FALSE;
1007 { add_to_cbuf(yytext); }
1012 { add_to_cbuf(yytext); }
1017 { add_to_cbuf(yytext); }
1022 { add_to_cbuf(yytext); }
1027 { add_to_cbuf(yytext); }
1033 BEGIN(C_CODE_STRING);
1034 add_to_cbuf(yytext);
1041 add_to_cbuf(yytext);
1049 add_to_cbuf(yytext);
1056 add_to_cbuf(yytext);
1064 add_to_cbuf(yytext);
1072 if(parenth_depth<0) {
1074 } else if(parenth_depth==0 && class_after_c) {
1075 BEGIN(CLASS_CODE_I);
1080 add_to_cbuf(yytext);
1086 { add_to_cbuf(yytext); }
1091 { add_to_cbuf(yytext); }
1169 {yylval.line = line_no; return PUBLIC;}
1174 {yylval.line = line_no; return PRIVATE;}
1179 {yylval.line = line_no; return ARGUMENT;}
1184 {yylval.line = line_no; return VIRTUAL;}
1189 {yylval.line = line_no; return SIGNAL;}
1204 {yylval.line = line_no; return OVERRIDE;}
1230 yylval.id = g_strdup(yytext);
1238 yylval.id = g_strdup(yytext);
1246 yylval.id = g_strdup(yytext);
1254 BEGIN(CLASS_CODE_I);
1264 class_after_c = TRUE;
1285 yylval.line = line_no;
1294 #line 1295 "lex.yy.c"
1295 case YY_STATE_EOF(INITIAL):
1296 case YY_STATE_EOF(COMMENT):
1297 case YY_STATE_EOF(C_CODE):
1298 case YY_STATE_EOF(C_CODE_STRING):
1299 case YY_STATE_EOF(CLASS_CODE):
1300 case YY_STATE_EOF(CLASS_CODE_I):
1303 case YY_END_OF_BUFFER:
1305 /* Amount of text matched not including the EOB char. */
1306 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1308 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1309 *yy_cp = yy_hold_char;
1310 YY_RESTORE_YY_MORE_OFFSET
1312 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1314 /* We're scanning a new file or input source. It's
1315 * possible that this happened because the user
1316 * just pointed yyin at a new source and called
1317 * yylex(). If so, then we have to assure
1318 * consistency between yy_current_buffer and our
1319 * globals. Here is the right place to do so, because
1320 * this is the first action (other than possibly a
1321 * back-up) that will match for the new input source.
1323 yy_n_chars = yy_current_buffer->yy_n_chars;
1324 yy_current_buffer->yy_input_file = yyin;
1325 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1328 /* Note that here we test for yy_c_buf_p "<=" to the position
1329 * of the first EOB in the buffer, since yy_c_buf_p will
1330 * already have been incremented past the NUL character
1331 * (since all states make transitions on EOB to the
1332 * end-of-buffer state). Contrast this with the test
1335 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1336 { /* This was really a NUL. */
1337 yy_state_type yy_next_state;
1339 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1341 yy_current_state = yy_get_previous_state();
1343 /* Okay, we're now positioned to make the NUL
1344 * transition. We couldn't have
1345 * yy_get_previous_state() go ahead and do it
1346 * for us because it doesn't know how to deal
1347 * with the possibility of jamming (and we don't
1348 * want to build jamming into it because then it
1349 * will run more slowly).
1352 yy_next_state = yy_try_NUL_trans( yy_current_state );
1354 yy_bp = yytext_ptr + YY_MORE_ADJ;
1356 if ( yy_next_state )
1358 /* Consume the NUL. */
1359 yy_cp = ++yy_c_buf_p;
1360 yy_current_state = yy_next_state;
1367 goto yy_find_action;
1371 else switch ( yy_get_next_buffer() )
1373 case EOB_ACT_END_OF_FILE:
1375 yy_did_buffer_switch_on_eof = 0;
1379 /* Note: because we've taken care in
1380 * yy_get_next_buffer() to have set up
1381 * yytext, we can now set up
1382 * yy_c_buf_p so that if some total
1383 * hoser (like flex itself) wants to
1384 * call the scanner after we return the
1385 * YY_NULL, it'll still work - another
1386 * YY_NULL will get returned.
1388 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1390 yy_act = YY_STATE_EOF(YY_START);
1396 if ( ! yy_did_buffer_switch_on_eof )
1402 case EOB_ACT_CONTINUE_SCAN:
1404 yytext_ptr + yy_amount_of_matched_text;
1406 yy_current_state = yy_get_previous_state();
1409 yy_bp = yytext_ptr + YY_MORE_ADJ;
1412 case EOB_ACT_LAST_MATCH:
1414 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1416 yy_current_state = yy_get_previous_state();
1419 yy_bp = yytext_ptr + YY_MORE_ADJ;
1420 goto yy_find_action;
1427 "fatal flex scanner internal error--no action found" );
1428 } /* end of action switch */
1429 } /* end of scanning one token */
1430 } /* end of yylex */
1433 /* yy_get_next_buffer - try to read in a new buffer
1435 * Returns a code representing an action:
1436 * EOB_ACT_LAST_MATCH -
1437 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1438 * EOB_ACT_END_OF_FILE - end of file
1441 static int yy_get_next_buffer()
1443 register char *dest = yy_current_buffer->yy_ch_buf;
1444 register char *source = yytext_ptr;
1445 register int number_to_move, i;
1448 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1450 "fatal flex scanner internal error--end of buffer missed" );
1452 if ( yy_current_buffer->yy_fill_buffer == 0 )
1453 { /* Don't try to fill the buffer, so this is an EOF. */
1454 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1456 /* We matched a single character, the EOB, so
1457 * treat this as a final EOF.
1459 return EOB_ACT_END_OF_FILE;
1464 /* We matched some text prior to the EOB, first
1467 return EOB_ACT_LAST_MATCH;
1471 /* Try to read more data. */
1473 /* First move last chars to start of buffer. */
1474 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1476 for ( i = 0; i < number_to_move; ++i )
1477 *(dest++) = *(source++);
1479 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1480 /* don't do the read, it's not guaranteed to return an EOF,
1483 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1488 yy_current_buffer->yy_buf_size - number_to_move - 1;
1490 while ( num_to_read <= 0 )
1491 { /* Not enough room in the buffer - grow it. */
1492 #ifdef YY_USES_REJECT
1494 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1497 /* just a shorter name for the current buffer */
1498 YY_BUFFER_STATE b = yy_current_buffer;
1500 int yy_c_buf_p_offset =
1501 (int) (yy_c_buf_p - b->yy_ch_buf);
1503 if ( b->yy_is_our_buffer )
1505 int new_size = b->yy_buf_size * 2;
1507 if ( new_size <= 0 )
1508 b->yy_buf_size += b->yy_buf_size / 8;
1510 b->yy_buf_size *= 2;
1512 b->yy_ch_buf = (char *)
1513 /* Include room in for 2 EOB chars. */
1514 yy_flex_realloc( (void *) b->yy_ch_buf,
1515 b->yy_buf_size + 2 );
1518 /* Can't grow it, we don't own it. */
1521 if ( ! b->yy_ch_buf )
1523 "fatal error - scanner input buffer overflow" );
1525 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1527 num_to_read = yy_current_buffer->yy_buf_size -
1532 if ( num_to_read > YY_READ_BUF_SIZE )
1533 num_to_read = YY_READ_BUF_SIZE;
1535 /* Read in more data. */
1536 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1537 yy_n_chars, num_to_read );
1539 yy_current_buffer->yy_n_chars = yy_n_chars;
1542 if ( yy_n_chars == 0 )
1544 if ( number_to_move == YY_MORE_ADJ )
1546 ret_val = EOB_ACT_END_OF_FILE;
1552 ret_val = EOB_ACT_LAST_MATCH;
1553 yy_current_buffer->yy_buffer_status =
1554 YY_BUFFER_EOF_PENDING;
1559 ret_val = EOB_ACT_CONTINUE_SCAN;
1561 yy_n_chars += number_to_move;
1562 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1563 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1565 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1571 /* yy_get_previous_state - get the state just before the EOB char was reached */
1573 static yy_state_type yy_get_previous_state()
1575 register yy_state_type yy_current_state;
1576 register char *yy_cp;
1578 yy_current_state = yy_start;
1579 yy_current_state += YY_AT_BOL();
1580 yy_state_ptr = yy_state_buf;
1581 *yy_state_ptr++ = yy_current_state;
1583 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1585 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1586 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1588 yy_current_state = (int) yy_def[yy_current_state];
1589 if ( yy_current_state >= 216 )
1590 yy_c = yy_meta[(unsigned int) yy_c];
1592 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1593 *yy_state_ptr++ = yy_current_state;
1596 return yy_current_state;
1600 /* yy_try_NUL_trans - try to make a transition on the NUL character
1603 * next_state = yy_try_NUL_trans( current_state );
1606 #ifdef YY_USE_PROTOS
1607 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1609 static yy_state_type yy_try_NUL_trans( yy_current_state )
1610 yy_state_type yy_current_state;
1613 register int yy_is_jam;
1615 register YY_CHAR yy_c = 1;
1616 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1618 yy_current_state = (int) yy_def[yy_current_state];
1619 if ( yy_current_state >= 216 )
1620 yy_c = yy_meta[(unsigned int) yy_c];
1622 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1623 yy_is_jam = (yy_current_state == 215);
1625 *yy_state_ptr++ = yy_current_state;
1627 return yy_is_jam ? 0 : yy_current_state;
1632 #ifdef YY_USE_PROTOS
1633 static void yyunput( int c, register char *yy_bp )
1635 static void yyunput( c, yy_bp )
1637 register char *yy_bp;
1640 register char *yy_cp = yy_c_buf_p;
1642 /* undo effects of setting up yytext */
1643 *yy_cp = yy_hold_char;
1645 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1646 { /* need to shift things up to make room */
1647 /* +2 for EOB chars. */
1648 register int number_to_move = yy_n_chars + 2;
1649 register char *dest = &yy_current_buffer->yy_ch_buf[
1650 yy_current_buffer->yy_buf_size + 2];
1651 register char *source =
1652 &yy_current_buffer->yy_ch_buf[number_to_move];
1654 while ( source > yy_current_buffer->yy_ch_buf )
1655 *--dest = *--source;
1657 yy_cp += (int) (dest - source);
1658 yy_bp += (int) (dest - source);
1659 yy_current_buffer->yy_n_chars =
1660 yy_n_chars = yy_current_buffer->yy_buf_size;
1662 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1663 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1666 *--yy_cp = (char) c;
1670 yy_hold_char = *yy_cp;
1673 #endif /* ifndef YY_NO_UNPUT */
1677 static int yyinput()
1684 *yy_c_buf_p = yy_hold_char;
1686 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1688 /* yy_c_buf_p now points to the character we want to return.
1689 * If this occurs *before* the EOB characters, then it's a
1690 * valid NUL; if not, then we've hit the end of the buffer.
1692 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1693 /* This was really a NUL. */
1697 { /* need more input */
1698 int offset = yy_c_buf_p - yytext_ptr;
1701 switch ( yy_get_next_buffer() )
1703 case EOB_ACT_LAST_MATCH:
1704 /* This happens because yy_g_n_b()
1705 * sees that we've accumulated a
1706 * token and flags that we need to
1707 * try matching the token before
1708 * proceeding. But for input(),
1709 * there's no matching to consider.
1710 * So convert the EOB_ACT_LAST_MATCH
1711 * to EOB_ACT_END_OF_FILE.
1714 /* Reset buffer status. */
1719 case EOB_ACT_END_OF_FILE:
1724 if ( ! yy_did_buffer_switch_on_eof )
1733 case EOB_ACT_CONTINUE_SCAN:
1734 yy_c_buf_p = yytext_ptr + offset;
1740 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
1741 *yy_c_buf_p = '\0'; /* preserve yytext */
1742 yy_hold_char = *++yy_c_buf_p;
1744 yy_current_buffer->yy_at_bol = (c == '\n');
1750 #ifdef YY_USE_PROTOS
1751 void yyrestart( FILE *input_file )
1753 void yyrestart( input_file )
1757 if ( ! yy_current_buffer )
1758 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1760 yy_init_buffer( yy_current_buffer, input_file );
1761 yy_load_buffer_state();
1765 #ifdef YY_USE_PROTOS
1766 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1768 void yy_switch_to_buffer( new_buffer )
1769 YY_BUFFER_STATE new_buffer;
1772 if ( yy_current_buffer == new_buffer )
1775 if ( yy_current_buffer )
1777 /* Flush out information for old buffer. */
1778 *yy_c_buf_p = yy_hold_char;
1779 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1780 yy_current_buffer->yy_n_chars = yy_n_chars;
1783 yy_current_buffer = new_buffer;
1784 yy_load_buffer_state();
1786 /* We don't actually know whether we did this switch during
1787 * EOF (yywrap()) processing, but the only time this flag
1788 * is looked at is after yywrap() is called, so it's safe
1789 * to go ahead and always set it.
1791 yy_did_buffer_switch_on_eof = 1;
1795 #ifdef YY_USE_PROTOS
1796 void yy_load_buffer_state( void )
1798 void yy_load_buffer_state()
1801 yy_n_chars = yy_current_buffer->yy_n_chars;
1802 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1803 yyin = yy_current_buffer->yy_input_file;
1804 yy_hold_char = *yy_c_buf_p;
1808 #ifdef YY_USE_PROTOS
1809 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1811 YY_BUFFER_STATE yy_create_buffer( file, size )
1818 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1820 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1822 b->yy_buf_size = size;
1824 /* yy_ch_buf has to be 2 characters longer than the size given because
1825 * we need to put in 2 end-of-buffer characters.
1827 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1828 if ( ! b->yy_ch_buf )
1829 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1831 b->yy_is_our_buffer = 1;
1833 yy_init_buffer( b, file );
1839 #ifdef YY_USE_PROTOS
1840 void yy_delete_buffer( YY_BUFFER_STATE b )
1842 void yy_delete_buffer( b )
1849 if ( b == yy_current_buffer )
1850 yy_current_buffer = (YY_BUFFER_STATE) 0;
1852 if ( b->yy_is_our_buffer )
1853 yy_flex_free( (void *) b->yy_ch_buf );
1855 yy_flex_free( (void *) b );
1859 #ifndef YY_ALWAYS_INTERACTIVE
1860 #ifndef YY_NEVER_INTERACTIVE
1861 extern int isatty YY_PROTO(( int ));
1865 #ifdef YY_USE_PROTOS
1866 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1868 void yy_init_buffer( b, file )
1875 yy_flush_buffer( b );
1877 b->yy_input_file = file;
1878 b->yy_fill_buffer = 1;
1880 #if YY_ALWAYS_INTERACTIVE
1881 b->yy_is_interactive = 1;
1883 #if YY_NEVER_INTERACTIVE
1884 b->yy_is_interactive = 0;
1886 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1892 #ifdef YY_USE_PROTOS
1893 void yy_flush_buffer( YY_BUFFER_STATE b )
1895 void yy_flush_buffer( b )
1905 /* We always need two end-of-buffer characters. The first causes
1906 * a transition to the end-of-buffer state. The second causes
1907 * a jam in that state.
1909 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1910 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1912 b->yy_buf_pos = &b->yy_ch_buf[0];
1915 b->yy_buffer_status = YY_BUFFER_NEW;
1917 if ( b == yy_current_buffer )
1918 yy_load_buffer_state();
1922 #ifndef YY_NO_SCAN_BUFFER
1923 #ifdef YY_USE_PROTOS
1924 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1926 YY_BUFFER_STATE yy_scan_buffer( base, size )
1934 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1935 base[size-1] != YY_END_OF_BUFFER_CHAR )
1936 /* They forgot to leave room for the EOB's. */
1939 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1941 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1943 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1944 b->yy_buf_pos = b->yy_ch_buf = base;
1945 b->yy_is_our_buffer = 0;
1946 b->yy_input_file = 0;
1947 b->yy_n_chars = b->yy_buf_size;
1948 b->yy_is_interactive = 0;
1950 b->yy_fill_buffer = 0;
1951 b->yy_buffer_status = YY_BUFFER_NEW;
1953 yy_switch_to_buffer( b );
1960 #ifndef YY_NO_SCAN_STRING
1961 #ifdef YY_USE_PROTOS
1962 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1964 YY_BUFFER_STATE yy_scan_string( yy_str )
1965 yyconst char *yy_str;
1969 for ( len = 0; yy_str[len]; ++len )
1972 return yy_scan_bytes( yy_str, len );
1977 #ifndef YY_NO_SCAN_BYTES
1978 #ifdef YY_USE_PROTOS
1979 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1981 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1982 yyconst char *bytes;
1991 /* Get memory for full buffer, including space for trailing EOB's. */
1993 buf = (char *) yy_flex_alloc( n );
1995 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1997 for ( i = 0; i < len; ++i )
2000 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2002 b = yy_scan_buffer( buf, n );
2004 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2006 /* It's okay to grow etc. this buffer, and we should throw it
2007 * away when we're done.
2009 b->yy_is_our_buffer = 1;
2016 #ifndef YY_NO_PUSH_STATE
2017 #ifdef YY_USE_PROTOS
2018 static void yy_push_state( int new_state )
2020 static void yy_push_state( new_state )
2024 if ( yy_start_stack_ptr >= yy_start_stack_depth )
2028 yy_start_stack_depth += YY_START_STACK_INCR;
2029 new_size = yy_start_stack_depth * sizeof( int );
2031 if ( ! yy_start_stack )
2032 yy_start_stack = (int *) yy_flex_alloc( new_size );
2035 yy_start_stack = (int *) yy_flex_realloc(
2036 (void *) yy_start_stack, new_size );
2038 if ( ! yy_start_stack )
2040 "out of memory expanding start-condition stack" );
2043 yy_start_stack[yy_start_stack_ptr++] = YY_START;
2050 #ifndef YY_NO_POP_STATE
2051 static void yy_pop_state()
2053 if ( --yy_start_stack_ptr < 0 )
2054 YY_FATAL_ERROR( "start-condition stack underflow" );
2056 BEGIN(yy_start_stack[yy_start_stack_ptr]);
2061 #ifndef YY_NO_TOP_STATE
2062 static int yy_top_state()
2064 return yy_start_stack[yy_start_stack_ptr - 1];
2068 #ifndef YY_EXIT_FAILURE
2069 #define YY_EXIT_FAILURE 2
2072 #ifdef YY_USE_PROTOS
2073 static void yy_fatal_error( yyconst char msg[] )
2075 static void yy_fatal_error( msg )
2079 (void) fprintf( stderr, "%s\n", msg );
2080 exit( YY_EXIT_FAILURE );
2085 /* Redefine yyless() so it works in section 3 code. */
2091 /* Undo effects of setting up yytext. */ \
2092 yytext[yyleng] = yy_hold_char; \
2093 yy_c_buf_p = yytext + n; \
2094 yy_hold_char = *yy_c_buf_p; \
2095 *yy_c_buf_p = '\0'; \
2101 /* Internal utility routines. */
2104 #ifdef YY_USE_PROTOS
2105 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2107 static void yy_flex_strncpy( s1, s2, n )
2114 for ( i = 0; i < n; ++i )
2119 #ifdef YY_NEED_STRLEN
2120 #ifdef YY_USE_PROTOS
2121 static int yy_flex_strlen( yyconst char *s )
2123 static int yy_flex_strlen( s )
2128 for ( n = 0; s[n]; ++n )
2136 #ifdef YY_USE_PROTOS
2137 static void *yy_flex_alloc( yy_size_t size )
2139 static void *yy_flex_alloc( size )
2143 return (void *) malloc( size );
2146 #ifdef YY_USE_PROTOS
2147 static void *yy_flex_realloc( void *ptr, yy_size_t size )
2149 static void *yy_flex_realloc( ptr, size )
2154 /* The cast to (char *) in the following accommodates both
2155 * implementations that use char* generic pointers, and those
2156 * that use void* generic pointers. It works with the latter
2157 * because both ANSI C and C++ allow castless assignment from
2158 * any pointer type to void*, and deal with argument conversions
2159 * as though doing an assignment.
2161 return (void *) realloc( (char *) ptr, size );
2164 #ifdef YY_USE_PROTOS
2165 static void yy_flex_free( void *ptr )
2167 static void yy_flex_free( ptr )