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 72
288 #define YY_END_OF_BUFFER 73
289 static yyconst short int yy_acclist[359] =
291 73, 70, 72, 69, 70, 72, 1, 71, 72, 70,
292 71, 72, 70, 72, 70, 72, 70, 72, 69, 70,
293 72, 70, 72, 70, 72, 13, 70, 72, 1, 14,
294 71, 72, 13, 70, 71, 72, 13, 70, 72, 13,
295 70, 72, 34, 70, 72, 1, 35, 71, 72, 34,
296 70, 71, 72, 27, 34, 70, 72, 34, 70, 72,
297 34, 70, 72, 34, 70, 72, 34, 70, 72, 32,
298 34, 70, 72, 33, 34, 70, 72, 34, 70, 72,
299 34, 70, 72, 30, 70, 72, 1, 31, 71, 72,
300 30, 70, 71, 72, 29, 30, 70, 72, 30, 70,
302 72, 30, 70, 72, 70, 72, 70, 72, 64, 70,
303 72, 64, 70, 72, 64, 70, 72, 64, 70, 72,
304 64, 70, 72, 66, 70, 72, 70, 72, 70, 72,
305 62, 70, 72, 62, 70, 72, 70, 72, 64, 70,
306 72, 64, 70, 72, 64, 70, 72, 64, 70, 72,
307 64, 70, 72, 64, 70, 72, 64, 70, 72, 64,
308 70, 72, 64, 70, 72, 64, 70, 72, 64, 70,
309 72, 64, 70, 72, 67, 70, 72, 68, 70, 72,
310 8, 18, 12, 9, 26, 19, 28, 10, 64, 63,
311 64, 64, 64, 64, 62, 11, 62, 62, 65, 64,
313 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
314 64, 64, 64, 64, 64, 64, 64, 3, 17, 24,
315 20, 22, 5, 6, 63, 64, 64, 64, 64, 53,
316 62, 7, 62, 62, 64, 64, 64, 64, 64, 64,
317 48, 64, 64, 64, 64, 64, 64, 64, 64, 64,
318 64, 64, 64, 64, 64, 15, 16, 25, 21, 23,
319 64, 64, 39, 64, 38, 64, 64, 51, 64, 64,
320 64, 43, 64, 64, 46, 64, 64, 64, 64, 64,
321 64, 64, 64, 64, 64, 64, 64, 40, 64, 36,
322 64, 64, 52, 64, 64, 49, 64, 64, 64, 64,
324 64, 64, 47, 64, 64, 64, 64, 42, 64, 64,
325 64, 64, 64, 50, 64, 64, 64, 64, 64, 54,
326 64, 59, 64, 44, 64, 41, 64, 64, 64, 64,
327 64, 61, 64, 64, 55, 64, 64, 64, 58, 64,
328 64, 57, 64, 60, 64, 64, 45, 64, 64, 56,
329 64, 64, 4, 64, 2, 2, 64, 37
332 static yyconst short int yy_accept[315] =
334 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
335 1, 1, 1, 2, 4, 7, 10, 13, 15, 17,
336 19, 22, 24, 26, 29, 33, 37, 40, 43, 46,
337 50, 54, 58, 61, 64, 67, 70, 74, 78, 81,
338 84, 87, 91, 95, 99, 102, 105, 107, 109, 112,
339 115, 118, 121, 124, 127, 129, 131, 134, 137, 139,
340 142, 145, 148, 151, 154, 157, 160, 163, 166, 169,
341 172, 175, 178, 181, 182, 182, 182, 182, 182, 182,
342 182, 182, 183, 183, 184, 184, 184, 184, 184, 185,
343 185, 186, 186, 186, 187, 188, 189, 189, 189, 190,
345 191, 192, 193, 194, 195, 195, 196, 197, 197, 197,
346 198, 198, 198, 199, 199, 200, 201, 202, 203, 204,
347 205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
348 215, 216, 217, 218, 218, 219, 219, 219, 219, 219,
349 220, 220, 220, 220, 221, 221, 221, 221, 222, 223,
350 223, 224, 224, 224, 225, 225, 226, 227, 228, 229,
351 230, 231, 232, 232, 233, 234, 235, 235, 236, 237,
352 238, 239, 240, 241, 243, 244, 245, 246, 247, 248,
353 249, 250, 251, 252, 253, 254, 255, 256, 256, 256,
354 256, 257, 258, 258, 258, 259, 260, 261, 261, 262,
356 263, 265, 267, 268, 270, 271, 272, 274, 275, 277,
357 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
358 288, 290, 290, 291, 291, 291, 291, 291, 292, 293,
359 295, 296, 298, 299, 300, 301, 302, 303, 305, 306,
360 307, 308, 310, 311, 312, 312, 312, 312, 312, 312,
361 313, 314, 316, 317, 318, 319, 320, 322, 324, 326,
362 328, 329, 330, 330, 330, 330, 330, 330, 331, 332,
363 334, 335, 337, 338, 339, 341, 341, 341, 341, 341,
364 341, 342, 344, 346, 347, 349, 349, 349, 349, 349,
365 349, 350, 352, 352, 352, 352, 352, 353, 353, 353,
367 353, 353, 354, 355, 356, 356, 356, 358, 358, 358,
371 static yyconst int yy_ec[256] =
373 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
374 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
375 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
376 1, 2, 1, 5, 6, 1, 7, 1, 8, 1,
377 1, 9, 1, 1, 1, 10, 11, 12, 13, 13,
378 13, 13, 13, 13, 13, 14, 14, 15, 1, 16,
379 1, 17, 1, 1, 18, 18, 19, 18, 20, 21,
380 22, 23, 22, 22, 24, 22, 25, 22, 26, 22,
381 22, 27, 22, 28, 29, 22, 22, 22, 22, 22,
382 30, 31, 32, 1, 22, 1, 33, 34, 35, 36,
384 37, 38, 39, 40, 41, 22, 22, 42, 43, 44,
385 45, 46, 47, 48, 49, 50, 51, 52, 22, 53,
386 22, 22, 54, 1, 55, 1, 1, 1, 1, 1,
387 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
388 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
389 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
390 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
391 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
392 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
393 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
395 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
396 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
397 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
398 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
399 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
403 static yyconst int yy_meta[56] =
405 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
406 1, 3, 3, 3, 4, 1, 1, 5, 5, 5,
407 5, 6, 6, 6, 6, 6, 6, 6, 6, 1,
408 1, 1, 5, 5, 5, 5, 5, 5, 6, 6,
409 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
413 static yyconst short int yy_base[330] =
415 0, 3, 9, 12, 49, 102, 19, 36, 157, 0,
416 203, 0, 650, 651, 651, 651, 651, 8, 623, 606,
417 7, 2, 610, 651, 651, 651, 635, 619, 651, 651,
418 651, 651, 15, 18, 618, 0, 651, 651, 6, 588,
419 651, 651, 651, 651, 616, 0, 21, 0, 626, 47,
420 16, 11, 28, 651, 65, 54, 71, 76, 79, 18,
421 56, 49, 72, 30, 82, 67, 84, 87, 80, 85,
422 99, 651, 651, 651, 637, 611, 605, 74, 600, 95,
423 75, 651, 589, 651, 627, 213, 626, 625, 651, 629,
424 651, 218, 587, 651, 651, 651, 627, 614, 613, 612,
426 21, 104, 102, 110, 616, 129, 651, 622, 140, 209,
427 214, 0, 250, 218, 594, 116, 210, 222, 214, 219,
428 103, 227, 231, 232, 236, 238, 246, 241, 256, 257,
429 259, 261, 263, 620, 651, 599, 572, 587, 565, 651,
430 564, 576, 565, 651, 607, 606, 605, 651, 651, 609,
431 651, 576, 607, 651, 594, 593, 266, 267, 269, 270,
432 651, 278, 604, 651, 284, 0, 289, 272, 278, 273,
433 279, 284, 291, 591, 292, 295, 296, 299, 300, 303,
434 305, 302, 310, 313, 314, 315, 318, 585, 555, 567,
435 651, 651, 550, 560, 651, 651, 651, 558, 119, 317,
437 584, 583, 319, 582, 320, 321, 581, 322, 580, 323,
438 325, 324, 327, 326, 332, 341, 333, 337, 344, 334,
439 579, 566, 651, 555, 558, 542, 538, 360, 354, 573,
440 361, 572, 345, 362, 364, 365, 369, 571, 371, 373,
441 374, 570, 377, 378, 563, 535, 532, 544, 544, 380,
442 379, 564, 381, 382, 390, 384, 563, 562, 561, 560,
443 391, 393, 545, 96, 536, 523, 534, 387, 392, 555,
444 395, 554, 400, 397, 553, 548, 521, 525, 562, 561,
445 407, 547, 542, 402, 539, 486, 458, 438, 434, 414,
446 416, 459, 453, 439, 431, 434, 405, 444, 434, 440,
448 444, 651, 435, 651, 423, 445, 441, 187, 451, 464,
449 466, 651, 651, 478, 484, 490, 496, 502, 508, 510,
450 514, 520, 526, 532, 536, 540, 546, 550, 555
453 static yyconst short int yy_def[330] =
455 314, 314, 315, 315, 316, 316, 317, 317, 313, 9,
456 9, 11, 313, 313, 313, 313, 313, 313, 313, 313,
457 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
458 313, 313, 313, 313, 313, 318, 313, 313, 313, 313,
459 313, 313, 313, 313, 313, 319, 313, 320, 321, 321,
460 321, 321, 321, 313, 313, 313, 313, 313, 313, 321,
461 321, 321, 321, 321, 321, 321, 321, 321, 321, 321,
462 321, 313, 313, 313, 322, 313, 313, 313, 313, 313,
463 313, 313, 313, 313, 313, 313, 313, 313, 313, 323,
464 313, 313, 313, 313, 313, 313, 324, 325, 321, 326,
466 321, 321, 321, 321, 313, 313, 313, 327, 313, 313,
467 313, 328, 313, 313, 313, 321, 321, 321, 321, 321,
468 321, 321, 321, 321, 321, 321, 321, 321, 321, 321,
469 321, 321, 321, 322, 313, 313, 313, 313, 313, 313,
470 313, 313, 313, 313, 313, 313, 313, 313, 313, 323,
471 313, 313, 324, 313, 325, 326, 321, 321, 321, 321,
472 313, 313, 327, 313, 313, 328, 313, 321, 321, 321,
473 321, 321, 321, 321, 321, 321, 321, 321, 321, 321,
474 321, 321, 321, 321, 321, 321, 321, 313, 313, 313,
475 313, 313, 313, 313, 313, 313, 313, 313, 321, 321,
477 321, 321, 321, 321, 321, 321, 321, 321, 321, 321,
478 321, 321, 321, 321, 321, 321, 321, 321, 321, 321,
479 321, 313, 313, 313, 313, 313, 313, 321, 321, 321,
480 321, 321, 321, 321, 321, 321, 321, 321, 321, 321,
481 321, 321, 321, 321, 313, 313, 313, 313, 313, 321,
482 321, 321, 321, 321, 321, 321, 321, 321, 321, 321,
483 321, 321, 313, 313, 313, 313, 313, 321, 321, 321,
484 321, 321, 321, 321, 321, 313, 313, 313, 313, 313,
485 321, 321, 321, 321, 321, 313, 313, 313, 313, 313,
486 321, 321, 313, 313, 313, 329, 321, 313, 313, 313,
488 329, 313, 321, 313, 313, 313, 321, 313, 313, 313,
489 313, 313, 0, 313, 313, 313, 313, 313, 313, 313,
490 313, 313, 313, 313, 313, 313, 313, 313, 313
493 static yyconst short int yy_nxt[707] =
495 313, 15, 16, 17, 21, 16, 17, 92, 78, 22,
496 18, 25, 26, 18, 25, 26, 74, 27, 75, 85,
497 27, 42, 43, 44, 19, 100, 89, 19, 90, 96,
498 100, 97, 100, 28, 20, 100, 28, 20, 42, 43,
499 44, 80, 100, 45, 100, 86, 93, 81, 157, 46,
500 23, 30, 31, 32, 79, 82, 33, 102, 103, 34,
501 45, 100, 107, 100, 108, 116, 46, 104, 87, 88,
502 100, 121, 101, 35, 105, 78, 106, 106, 106, 36,
503 109, 100, 110, 110, 111, 109, 100, 113, 113, 113,
504 114, 114, 114, 119, 100, 117, 100, 102, 100, 100,
506 118, 100, 37, 38, 30, 31, 32, 39, 40, 33,
507 115, 123, 34, 100, 141, 120, 100, 100, 100, 128,
508 129, 79, 142, 112, 100, 122, 35, 124, 131, 130,
509 100, 138, 36, 100, 126, 125, 158, 127, 228, 132,
510 162, 162, 162, 133, 139, 277, 159, 173, 140, 140,
511 160, 165, 165, 165, 168, 37, 38, 14, 15, 16,
512 17, 14, 14, 14, 14, 14, 14, 47, 14, 14,
513 14, 48, 14, 14, 49, 49, 49, 49, 49, 49,
514 49, 50, 49, 49, 49, 49, 14, 14, 14, 49,
515 49, 51, 49, 49, 52, 49, 49, 49, 49, 49,
517 49, 49, 49, 49, 49, 49, 53, 49, 49, 49,
518 54, 14, 55, 56, 57, 58, 58, 145, 109, 92,
519 110, 110, 111, 109, 100, 111, 111, 111, 100, 114,
520 114, 114, 59, 100, 141, 60, 100, 61, 62, 63,
521 64, 100, 169, 65, 66, 100, 100, 67, 68, 115,
522 100, 69, 100, 70, 71, 100, 72, 73, 93, 109,
523 100, 113, 113, 113, 171, 170, 146, 147, 176, 172,
524 100, 100, 177, 100, 175, 100, 174, 100, 178, 180,
525 100, 100, 179, 100, 100, 181, 100, 100, 199, 162,
526 162, 162, 100, 100, 182, 165, 165, 165, 100, 184,
528 114, 114, 114, 187, 183, 100, 100, 185, 186, 100,
529 100, 201, 206, 100, 100, 200, 100, 100, 202, 100,
530 115, 205, 203, 208, 100, 204, 207, 100, 100, 100,
531 209, 100, 100, 100, 100, 100, 100, 100, 100, 100,
532 100, 100, 210, 211, 214, 216, 100, 100, 100, 213,
533 212, 100, 215, 221, 219, 100, 235, 218, 100, 100,
534 217, 229, 231, 236, 220, 202, 237, 241, 100, 230,
535 233, 232, 234, 239, 100, 100, 100, 240, 100, 100,
536 242, 238, 243, 100, 244, 100, 250, 100, 100, 253,
537 251, 100, 100, 100, 100, 100, 100, 252, 100, 256,
539 268, 100, 254, 257, 100, 100, 100, 100, 259, 100,
540 262, 100, 258, 255, 100, 281, 100, 271, 296, 100,
541 261, 100, 269, 260, 303, 291, 272, 274, 270, 296,
542 100, 283, 285, 273, 275, 289, 284, 292, 302, 297,
543 300, 282, 295, 295, 295, 295, 295, 295, 302, 100,
544 302, 306, 306, 306, 309, 100, 306, 306, 306, 308,
545 302, 307, 310, 310, 310, 311, 312, 311, 312, 305,
546 304, 299, 298, 100, 294, 310, 310, 310, 14, 14,
547 14, 14, 14, 14, 24, 24, 24, 24, 24, 24,
548 29, 29, 29, 29, 29, 29, 41, 41, 41, 41,
550 41, 41, 91, 139, 91, 91, 91, 91, 95, 293,
551 95, 95, 95, 95, 98, 98, 99, 99, 99, 99,
552 134, 134, 134, 134, 134, 134, 150, 150, 150, 150,
553 150, 150, 153, 153, 153, 153, 153, 153, 155, 155,
554 155, 155, 156, 156, 156, 156, 163, 163, 163, 163,
555 163, 163, 166, 100, 166, 301, 100, 301, 301, 301,
556 301, 100, 290, 289, 288, 287, 286, 100, 100, 100,
557 280, 279, 278, 276, 100, 100, 100, 100, 100, 267,
558 266, 265, 264, 263, 100, 100, 100, 100, 249, 248,
559 247, 246, 245, 100, 100, 100, 100, 100, 100, 227,
561 226, 225, 224, 223, 222, 100, 164, 100, 100, 154,
562 198, 151, 197, 196, 195, 194, 193, 192, 191, 190,
563 189, 188, 135, 167, 164, 161, 100, 100, 100, 154,
564 152, 151, 149, 148, 144, 143, 83, 137, 136, 135,
565 100, 76, 94, 76, 76, 84, 83, 77, 76, 313,
566 13, 313, 313, 313, 313, 313, 313, 313, 313, 313,
567 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
568 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
569 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
570 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
572 313, 313, 313, 313, 313, 313
575 static yyconst short int yy_chk[707] =
577 0, 1, 1, 1, 2, 2, 2, 39, 21, 2,
578 1, 3, 3, 2, 4, 4, 18, 3, 18, 33,
579 4, 7, 7, 7, 1, 52, 34, 2, 34, 47,
580 51, 47, 60, 3, 1, 101, 4, 2, 8, 8,
581 8, 22, 53, 7, 64, 33, 39, 22, 101, 7,
582 2, 5, 5, 5, 21, 22, 5, 51, 52, 5,
583 8, 50, 56, 62, 56, 60, 8, 53, 33, 33,
584 61, 64, 50, 5, 55, 78, 55, 55, 55, 5,
585 57, 66, 57, 57, 57, 58, 63, 58, 58, 58,
586 59, 59, 59, 62, 69, 61, 65, 61, 67, 70,
588 61, 68, 5, 5, 6, 6, 6, 6, 6, 6,
589 59, 66, 6, 71, 81, 63, 103, 121, 102, 69,
590 69, 78, 81, 57, 104, 65, 6, 67, 70, 69,
591 116, 80, 6, 199, 68, 67, 102, 68, 199, 71,
592 106, 106, 106, 71, 80, 264, 103, 121, 80, 264,
593 104, 109, 109, 109, 116, 6, 6, 9, 9, 9,
594 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
595 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
596 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
597 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
599 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
600 9, 9, 11, 11, 11, 11, 11, 86, 110, 92,
601 110, 110, 110, 111, 117, 111, 111, 111, 119, 114,
602 114, 114, 11, 120, 308, 11, 118, 11, 11, 11,
603 11, 122, 117, 11, 11, 123, 124, 11, 11, 114,
604 125, 11, 126, 11, 11, 128, 11, 11, 92, 113,
605 127, 113, 113, 113, 119, 118, 86, 86, 124, 120,
606 129, 130, 125, 131, 123, 132, 122, 133, 126, 127,
607 157, 158, 126, 159, 160, 128, 168, 170, 157, 162,
608 162, 162, 169, 171, 129, 165, 165, 165, 172, 131,
610 167, 167, 167, 133, 130, 173, 175, 131, 132, 176,
611 177, 159, 171, 178, 179, 158, 182, 180, 160, 181,
612 167, 170, 168, 173, 183, 169, 172, 184, 185, 186,
613 175, 200, 187, 203, 205, 206, 208, 210, 212, 211,
614 214, 213, 176, 177, 180, 182, 215, 217, 220, 179,
615 178, 218, 181, 187, 185, 216, 212, 184, 219, 233,
616 183, 203, 206, 213, 186, 200, 214, 217, 229, 205,
617 210, 208, 211, 216, 228, 231, 234, 216, 235, 236,
618 218, 215, 219, 237, 220, 239, 228, 240, 241, 233,
619 229, 243, 244, 251, 250, 253, 254, 231, 256, 236,
621 250, 268, 234, 237, 255, 261, 269, 262, 240, 271,
622 244, 274, 239, 235, 273, 268, 284, 254, 290, 297,
623 243, 281, 251, 241, 297, 281, 255, 261, 253, 290,
624 291, 271, 274, 256, 262, 289, 273, 284, 296, 291,
625 295, 269, 295, 295, 295, 289, 289, 289, 301, 303,
626 296, 300, 300, 300, 306, 307, 306, 306, 306, 305,
627 301, 303, 309, 309, 309, 310, 310, 311, 311, 299,
628 298, 294, 293, 292, 288, 310, 310, 310, 314, 314,
629 314, 314, 314, 314, 315, 315, 315, 315, 315, 315,
630 316, 316, 316, 316, 316, 316, 317, 317, 317, 317,
632 317, 317, 318, 287, 318, 318, 318, 318, 319, 286,
633 319, 319, 319, 319, 320, 320, 321, 321, 321, 321,
634 322, 322, 322, 322, 322, 322, 323, 323, 323, 323,
635 323, 323, 324, 324, 324, 324, 324, 324, 325, 325,
636 325, 325, 326, 326, 326, 326, 327, 327, 327, 327,
637 327, 327, 328, 285, 328, 329, 283, 329, 329, 329,
638 329, 282, 280, 279, 278, 277, 276, 275, 272, 270,
639 267, 266, 265, 263, 260, 259, 258, 257, 252, 249,
640 248, 247, 246, 245, 242, 238, 232, 230, 227, 226,
641 225, 224, 222, 221, 209, 207, 204, 202, 201, 198,
643 194, 193, 190, 189, 188, 174, 163, 156, 155, 153,
644 152, 150, 147, 146, 145, 143, 142, 141, 139, 138,
645 137, 136, 134, 115, 108, 105, 100, 99, 98, 97,
646 93, 90, 88, 87, 85, 83, 79, 77, 76, 75,
647 49, 45, 40, 35, 28, 27, 23, 20, 19, 13,
648 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
649 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
650 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
651 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
652 313, 313, 313, 313, 313, 313, 313, 313, 313, 313,
654 313, 313, 313, 313, 313, 313
657 static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
658 static char *yy_full_match;
662 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
663 yy_cp = yy_full_match; /* restore poss. backed-over text */ \
667 #define yymore() yymore_used_but_not_detected
668 #define YY_MORE_ADJ 0
669 #define YY_RESTORE_YY_MORE_OFFSET
673 /* GOB C Preprocessor
674 * Copyright (C) 1999 the Free Software Foundation.
676 * Author: George Lebl
678 * This program is free software; you can redistribute it and/or modify
679 * it under the terms of the GNU General Public License as published by
680 * the Free Software Foundation; either version 2 of the License, or
681 * (at your option) any later version.
683 * This program is distributed in the hope that it will be useful,
684 * but WITHOUT ANY WARRANTY; without even the implied warranty of
685 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
686 * GNU General Public License for more details.
688 * You should have received a copy of the GNU General Public License
689 * along with this program; if not, write to the Free Software
690 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
703 static int parenth_depth = 0;
704 static int before_comment = INITIAL;
705 static gboolean class_after_c = FALSE;
706 static int code_type = CCODE;
708 static GString *cbuf = NULL;
711 GList *include_files = NULL;
712 /* 0 no, 1 means yes, 2+ means don't even start looking anymore */
713 static int look_for_includes = 0;
721 cbuf = g_string_new("");
723 cbuf = g_string_assign(cbuf,"");
731 cbuf = g_string_new(s);
733 cbuf = g_string_append(cbuf,s);
741 #define C_CODE_STRING 3
745 #define CLASS_CODE_I 5
749 /* Macros after this point can all be overridden by user definitions in
753 #ifndef YY_SKIP_YYWRAP
755 extern "C" int yywrap YY_PROTO(( void ));
757 extern int yywrap YY_PROTO(( void ));
762 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
766 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
769 #ifdef YY_NEED_STRLEN
770 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
775 static int yyinput YY_PROTO(( void ));
777 static int input YY_PROTO(( void ));
782 static int yy_start_stack_ptr = 0;
783 static int yy_start_stack_depth = 0;
784 static int *yy_start_stack = 0;
785 #ifndef YY_NO_PUSH_STATE
786 static void yy_push_state YY_PROTO(( int new_state ));
788 #ifndef YY_NO_POP_STATE
789 static void yy_pop_state YY_PROTO(( void ));
791 #ifndef YY_NO_TOP_STATE
792 static int yy_top_state YY_PROTO(( void ));
796 #define YY_NO_PUSH_STATE 1
797 #define YY_NO_POP_STATE 1
798 #define YY_NO_TOP_STATE 1
801 #ifdef YY_MALLOC_DECL
809 /* Just try to get by without declaring the routines. This will fail
810 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
811 * or sizeof(void*) != sizeof(int).
816 /* Amount of stuff to slurp up with each read. */
817 #ifndef YY_READ_BUF_SIZE
818 #define YY_READ_BUF_SIZE 8192
821 /* Copy whatever the last rule matched to the standard output. */
824 /* This used to be an fputs(), but since the string might contain NUL's,
825 * we now use fwrite().
827 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
830 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
831 * is returned in "result".
834 #define YY_INPUT(buf,result,max_size) \
835 if ( yy_current_buffer->yy_is_interactive ) \
838 for ( n = 0; n < max_size && \
839 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
842 buf[n++] = (char) c; \
843 if ( c == EOF && ferror( yyin ) ) \
844 YY_FATAL_ERROR( "input in flex scanner failed" ); \
847 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
848 && ferror( yyin ) ) \
849 YY_FATAL_ERROR( "input in flex scanner failed" );
852 /* No semi-colon after return; correct usage is to write "yyterminate();" -
853 * we don't want an extra ';' after the "return" because that will cause
854 * some compilers to complain about unreachable statements.
857 #define yyterminate() return YY_NULL
860 /* Number of entries by which start-condition stack grows. */
861 #ifndef YY_START_STACK_INCR
862 #define YY_START_STACK_INCR 25
865 /* Report a fatal error. */
866 #ifndef YY_FATAL_ERROR
867 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
870 /* Default declaration of generated scanner - a define so the user can
871 * easily add parameters.
874 #define YY_DECL int yylex YY_PROTO(( void ))
877 /* Code executed at the beginning of each rule, after yytext and yyleng
880 #ifndef YY_USER_ACTION
881 #define YY_USER_ACTION
884 /* Code executed at the end of each rule. */
886 #define YY_BREAK break;
889 #define YY_RULE_SETUP \
891 yy_current_buffer->yy_at_bol = \
892 (yytext[yyleng - 1] == '\n'); \
897 register yy_state_type yy_current_state;
898 register char *yy_cp = NULL, *yy_bp = NULL;
915 yy_start = 1; /* first start state */
923 if ( ! yy_current_buffer )
925 yy_create_buffer( yyin, YY_BUF_SIZE );
927 yy_load_buffer_state();
930 while ( 1 ) /* loops until end-of-file is reached */
934 /* Support of yytext. */
935 *yy_cp = yy_hold_char;
937 /* yy_bp points to the position in yy_ch_buf of the start of
942 yy_current_state = yy_start;
943 yy_current_state += YY_AT_BOL();
944 yy_state_ptr = yy_state_buf;
945 *yy_state_ptr++ = yy_current_state;
949 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
950 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
952 yy_current_state = (int) yy_def[yy_current_state];
953 if ( yy_current_state >= 314 )
954 yy_c = yy_meta[(unsigned int) yy_c];
956 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
957 *yy_state_ptr++ = yy_current_state;
960 while ( yy_base[yy_current_state] != 651 );
963 yy_current_state = *--yy_state_ptr;
964 yy_lp = yy_accept[yy_current_state];
965 find_rule: /* we branch to this label when backing up */
966 for ( ; ; ) /* until we find what rule we matched */
968 if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
970 yy_act = yy_acclist[yy_lp];
972 yy_full_match = yy_cp;
977 yy_current_state = *--yy_state_ptr;
978 yy_lp = yy_accept[yy_current_state];
984 do_action: /* This label is used only to access EOF actions. */
988 { /* beginning of action switch */
992 { line_no++; REJECT; }
997 { fprintf(stderr,"You are a bad bad person!\n"); REJECT; }
1000 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1001 yy_c_buf_p = yy_cp -= 1;
1002 YY_DO_BEFORE_ACTION; /* set up yytext again */
1005 { ; /*comment, ignore*/ }
1011 if(look_for_includes==1) {
1014 char *str = g_strdup(yytext);
1015 file = strchr(str,'"');
1016 if(!file) file = strchr(str,'<');
1018 p = strchr(file,'"');
1019 if(!p) p = strchr(file,'>');
1021 include_files = g_list_prepend(include_files,g_strdup(file));
1028 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1029 yy_c_buf_p = yy_cp -= 1;
1030 YY_DO_BEFORE_ACTION; /* set up yytext again */
1033 { add_to_cbuf(yytext); /*comment, ignore*/ }
1036 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1037 yy_c_buf_p = yy_cp -= 1;
1038 YY_DO_BEFORE_ACTION; /* set up yytext again */
1041 { ; /*comment, ignore*/ }
1044 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1045 yy_c_buf_p = yy_cp -= 1;
1046 YY_DO_BEFORE_ACTION; /* set up yytext again */
1049 { ; /*comment, ignore*/ }
1054 {BEGIN(COMMENT); before_comment = INITIAL; }
1060 add_to_cbuf(yytext);
1062 before_comment = C_CODE;
1068 {BEGIN(COMMENT); before_comment = CLASS_CODE; }
1073 {BEGIN(COMMENT); before_comment = CLASS_CODE_I; }
1079 if(before_comment == C_CODE) add_to_cbuf(yytext);
1080 BEGIN(before_comment);
1087 /* comment, ignore */
1088 if(before_comment == C_CODE) add_to_cbuf(yytext);
1095 /* comment, ignore */
1096 if(before_comment == C_CODE) add_to_cbuf(yytext);
1105 class_after_c = FALSE;
1108 ccode_line = line_no;
1117 class_after_c = FALSE;
1120 ccode_line = line_no;
1129 class_after_c = FALSE;
1132 ccode_line = line_no;
1141 class_after_c = FALSE;
1144 ccode_line = line_no;
1145 if(look_for_includes==0)
1146 look_for_includes=1;
1156 if(look_for_includes==1)
1157 look_for_includes=0;
1164 { add_to_cbuf(yytext); }
1169 { add_to_cbuf(yytext); }
1174 { add_to_cbuf(yytext); }
1179 { add_to_cbuf(yytext); }
1184 { add_to_cbuf(yytext); }
1189 { add_to_cbuf(yytext); }
1194 { add_to_cbuf(yytext); }
1200 BEGIN(C_CODE_STRING);
1201 add_to_cbuf(yytext);
1207 { add_to_cbuf(yytext); }
1214 add_to_cbuf(yytext);
1220 { add_to_cbuf(yytext); }
1225 { add_to_cbuf(yytext); }
1232 add_to_cbuf(yytext);
1240 if(parenth_depth<0) {
1242 } else if(parenth_depth==0 && class_after_c) {
1243 BEGIN(CLASS_CODE_I);
1248 add_to_cbuf(yytext);
1254 { add_to_cbuf(yytext); }
1259 { add_to_cbuf(yytext); }
1265 look_for_includes = 2;
1271 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1272 yy_c_buf_p = yy_cp -= 1;
1273 YY_DO_BEFORE_ACTION; /* set up yytext again */
1277 int maj = 0,min = 0,pl = 0;
1278 int rmaj = 0,rmin = 0,rpl = 0;
1281 sscanf(VERSION,"%d.%d.%d",&rmaj,&rmin,&rpl);
1282 p = strchr(yytext,'r');
1283 g_assert(p); /* we MUST have found it */
1284 sscanf(p,"requires %d.%d.%d",&maj,&min,&pl);
1286 (rmaj == maj && rmin < min) ||
1287 (rmaj == maj && rmin == min && rpl < pl)) {
1289 s = g_strdup_printf(
1290 "GOB version %d.%d.%d required "
1292 "To upgrade your gob, see: "
1293 "http://www.5z.com/jirka/gob.html",
1294 maj,min,pl,VERSION);
1295 print_error(FALSE,s, line_no);
1306 s = g_strdup_printf("'%s' keyword should not "
1307 "be used when generating "
1309 print_error(TRUE,s, line_no);
1393 {yylval.line = line_no; return PUBLIC;}
1398 {yylval.line = line_no; return PRIVATE;}
1403 {yylval.line = line_no; return PROTECTED;}
1408 {yylval.line = line_no; return ARGUMENT;}
1413 {yylval.line = line_no; return VIRTUAL;}
1418 {yylval.line = line_no; return SIGNAL;}
1423 {yylval.line = line_no; return OVERRIDE;}
1434 yylval.id = g_strdup(yytext);
1442 yylval.id = g_strdup(yytext);
1450 yylval.id = g_strdup(yytext);
1458 yylval.id = g_strdup(yytext);
1466 BEGIN(CLASS_CODE_I);
1476 class_after_c = TRUE;
1477 yylval.line = line_no;
1479 ccode_line = line_no;
1500 yylval.line = line_no;
1514 #line 1515 "lex.yy.c"
1515 case YY_STATE_EOF(INITIAL):
1516 case YY_STATE_EOF(COMMENT):
1517 case YY_STATE_EOF(C_CODE):
1518 case YY_STATE_EOF(C_CODE_STRING):
1519 case YY_STATE_EOF(CLASS_CODE):
1520 case YY_STATE_EOF(CLASS_CODE_I):
1523 case YY_END_OF_BUFFER:
1525 /* Amount of text matched not including the EOB char. */
1526 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1528 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1529 *yy_cp = yy_hold_char;
1530 YY_RESTORE_YY_MORE_OFFSET
1532 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1534 /* We're scanning a new file or input source. It's
1535 * possible that this happened because the user
1536 * just pointed yyin at a new source and called
1537 * yylex(). If so, then we have to assure
1538 * consistency between yy_current_buffer and our
1539 * globals. Here is the right place to do so, because
1540 * this is the first action (other than possibly a
1541 * back-up) that will match for the new input source.
1543 yy_n_chars = yy_current_buffer->yy_n_chars;
1544 yy_current_buffer->yy_input_file = yyin;
1545 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1548 /* Note that here we test for yy_c_buf_p "<=" to the position
1549 * of the first EOB in the buffer, since yy_c_buf_p will
1550 * already have been incremented past the NUL character
1551 * (since all states make transitions on EOB to the
1552 * end-of-buffer state). Contrast this with the test
1555 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1556 { /* This was really a NUL. */
1557 yy_state_type yy_next_state;
1559 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1561 yy_current_state = yy_get_previous_state();
1563 /* Okay, we're now positioned to make the NUL
1564 * transition. We couldn't have
1565 * yy_get_previous_state() go ahead and do it
1566 * for us because it doesn't know how to deal
1567 * with the possibility of jamming (and we don't
1568 * want to build jamming into it because then it
1569 * will run more slowly).
1572 yy_next_state = yy_try_NUL_trans( yy_current_state );
1574 yy_bp = yytext_ptr + YY_MORE_ADJ;
1576 if ( yy_next_state )
1578 /* Consume the NUL. */
1579 yy_cp = ++yy_c_buf_p;
1580 yy_current_state = yy_next_state;
1587 goto yy_find_action;
1591 else switch ( yy_get_next_buffer() )
1593 case EOB_ACT_END_OF_FILE:
1595 yy_did_buffer_switch_on_eof = 0;
1599 /* Note: because we've taken care in
1600 * yy_get_next_buffer() to have set up
1601 * yytext, we can now set up
1602 * yy_c_buf_p so that if some total
1603 * hoser (like flex itself) wants to
1604 * call the scanner after we return the
1605 * YY_NULL, it'll still work - another
1606 * YY_NULL will get returned.
1608 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1610 yy_act = YY_STATE_EOF(YY_START);
1616 if ( ! yy_did_buffer_switch_on_eof )
1622 case EOB_ACT_CONTINUE_SCAN:
1624 yytext_ptr + yy_amount_of_matched_text;
1626 yy_current_state = yy_get_previous_state();
1629 yy_bp = yytext_ptr + YY_MORE_ADJ;
1632 case EOB_ACT_LAST_MATCH:
1634 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1636 yy_current_state = yy_get_previous_state();
1639 yy_bp = yytext_ptr + YY_MORE_ADJ;
1640 goto yy_find_action;
1647 "fatal flex scanner internal error--no action found" );
1648 } /* end of action switch */
1649 } /* end of scanning one token */
1650 } /* end of yylex */
1653 /* yy_get_next_buffer - try to read in a new buffer
1655 * Returns a code representing an action:
1656 * EOB_ACT_LAST_MATCH -
1657 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1658 * EOB_ACT_END_OF_FILE - end of file
1661 static int yy_get_next_buffer()
1663 register char *dest = yy_current_buffer->yy_ch_buf;
1664 register char *source = yytext_ptr;
1665 register int number_to_move, i;
1668 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1670 "fatal flex scanner internal error--end of buffer missed" );
1672 if ( yy_current_buffer->yy_fill_buffer == 0 )
1673 { /* Don't try to fill the buffer, so this is an EOF. */
1674 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1676 /* We matched a single character, the EOB, so
1677 * treat this as a final EOF.
1679 return EOB_ACT_END_OF_FILE;
1684 /* We matched some text prior to the EOB, first
1687 return EOB_ACT_LAST_MATCH;
1691 /* Try to read more data. */
1693 /* First move last chars to start of buffer. */
1694 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1696 for ( i = 0; i < number_to_move; ++i )
1697 *(dest++) = *(source++);
1699 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1700 /* don't do the read, it's not guaranteed to return an EOF,
1703 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1708 yy_current_buffer->yy_buf_size - number_to_move - 1;
1710 while ( num_to_read <= 0 )
1711 { /* Not enough room in the buffer - grow it. */
1712 #ifdef YY_USES_REJECT
1714 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1717 /* just a shorter name for the current buffer */
1718 YY_BUFFER_STATE b = yy_current_buffer;
1720 int yy_c_buf_p_offset =
1721 (int) (yy_c_buf_p - b->yy_ch_buf);
1723 if ( b->yy_is_our_buffer )
1725 int new_size = b->yy_buf_size * 2;
1727 if ( new_size <= 0 )
1728 b->yy_buf_size += b->yy_buf_size / 8;
1730 b->yy_buf_size *= 2;
1732 b->yy_ch_buf = (char *)
1733 /* Include room in for 2 EOB chars. */
1734 yy_flex_realloc( (void *) b->yy_ch_buf,
1735 b->yy_buf_size + 2 );
1738 /* Can't grow it, we don't own it. */
1741 if ( ! b->yy_ch_buf )
1743 "fatal error - scanner input buffer overflow" );
1745 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1747 num_to_read = yy_current_buffer->yy_buf_size -
1752 if ( num_to_read > YY_READ_BUF_SIZE )
1753 num_to_read = YY_READ_BUF_SIZE;
1755 /* Read in more data. */
1756 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1757 yy_n_chars, num_to_read );
1759 yy_current_buffer->yy_n_chars = yy_n_chars;
1762 if ( yy_n_chars == 0 )
1764 if ( number_to_move == YY_MORE_ADJ )
1766 ret_val = EOB_ACT_END_OF_FILE;
1772 ret_val = EOB_ACT_LAST_MATCH;
1773 yy_current_buffer->yy_buffer_status =
1774 YY_BUFFER_EOF_PENDING;
1779 ret_val = EOB_ACT_CONTINUE_SCAN;
1781 yy_n_chars += number_to_move;
1782 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1783 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1785 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1791 /* yy_get_previous_state - get the state just before the EOB char was reached */
1793 static yy_state_type yy_get_previous_state()
1795 register yy_state_type yy_current_state;
1796 register char *yy_cp;
1798 yy_current_state = yy_start;
1799 yy_current_state += YY_AT_BOL();
1800 yy_state_ptr = yy_state_buf;
1801 *yy_state_ptr++ = yy_current_state;
1803 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1805 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1806 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1808 yy_current_state = (int) yy_def[yy_current_state];
1809 if ( yy_current_state >= 314 )
1810 yy_c = yy_meta[(unsigned int) yy_c];
1812 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1813 *yy_state_ptr++ = yy_current_state;
1816 return yy_current_state;
1820 /* yy_try_NUL_trans - try to make a transition on the NUL character
1823 * next_state = yy_try_NUL_trans( current_state );
1826 #ifdef YY_USE_PROTOS
1827 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1829 static yy_state_type yy_try_NUL_trans( yy_current_state )
1830 yy_state_type yy_current_state;
1833 register int yy_is_jam;
1835 register YY_CHAR yy_c = 1;
1836 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1838 yy_current_state = (int) yy_def[yy_current_state];
1839 if ( yy_current_state >= 314 )
1840 yy_c = yy_meta[(unsigned int) yy_c];
1842 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1843 yy_is_jam = (yy_current_state == 313);
1845 *yy_state_ptr++ = yy_current_state;
1847 return yy_is_jam ? 0 : yy_current_state;
1852 #ifdef YY_USE_PROTOS
1853 static void yyunput( int c, register char *yy_bp )
1855 static void yyunput( c, yy_bp )
1857 register char *yy_bp;
1860 register char *yy_cp = yy_c_buf_p;
1862 /* undo effects of setting up yytext */
1863 *yy_cp = yy_hold_char;
1865 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1866 { /* need to shift things up to make room */
1867 /* +2 for EOB chars. */
1868 register int number_to_move = yy_n_chars + 2;
1869 register char *dest = &yy_current_buffer->yy_ch_buf[
1870 yy_current_buffer->yy_buf_size + 2];
1871 register char *source =
1872 &yy_current_buffer->yy_ch_buf[number_to_move];
1874 while ( source > yy_current_buffer->yy_ch_buf )
1875 *--dest = *--source;
1877 yy_cp += (int) (dest - source);
1878 yy_bp += (int) (dest - source);
1879 yy_current_buffer->yy_n_chars =
1880 yy_n_chars = yy_current_buffer->yy_buf_size;
1882 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1883 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1886 *--yy_cp = (char) c;
1890 yy_hold_char = *yy_cp;
1893 #endif /* ifndef YY_NO_UNPUT */
1897 static int yyinput()
1904 *yy_c_buf_p = yy_hold_char;
1906 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1908 /* yy_c_buf_p now points to the character we want to return.
1909 * If this occurs *before* the EOB characters, then it's a
1910 * valid NUL; if not, then we've hit the end of the buffer.
1912 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1913 /* This was really a NUL. */
1917 { /* need more input */
1918 int offset = yy_c_buf_p - yytext_ptr;
1921 switch ( yy_get_next_buffer() )
1923 case EOB_ACT_LAST_MATCH:
1924 /* This happens because yy_g_n_b()
1925 * sees that we've accumulated a
1926 * token and flags that we need to
1927 * try matching the token before
1928 * proceeding. But for input(),
1929 * there's no matching to consider.
1930 * So convert the EOB_ACT_LAST_MATCH
1931 * to EOB_ACT_END_OF_FILE.
1934 /* Reset buffer status. */
1939 case EOB_ACT_END_OF_FILE:
1944 if ( ! yy_did_buffer_switch_on_eof )
1953 case EOB_ACT_CONTINUE_SCAN:
1954 yy_c_buf_p = yytext_ptr + offset;
1960 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
1961 *yy_c_buf_p = '\0'; /* preserve yytext */
1962 yy_hold_char = *++yy_c_buf_p;
1964 yy_current_buffer->yy_at_bol = (c == '\n');
1970 #ifdef YY_USE_PROTOS
1971 void yyrestart( FILE *input_file )
1973 void yyrestart( input_file )
1977 if ( ! yy_current_buffer )
1978 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1980 yy_init_buffer( yy_current_buffer, input_file );
1981 yy_load_buffer_state();
1985 #ifdef YY_USE_PROTOS
1986 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1988 void yy_switch_to_buffer( new_buffer )
1989 YY_BUFFER_STATE new_buffer;
1992 if ( yy_current_buffer == new_buffer )
1995 if ( yy_current_buffer )
1997 /* Flush out information for old buffer. */
1998 *yy_c_buf_p = yy_hold_char;
1999 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2000 yy_current_buffer->yy_n_chars = yy_n_chars;
2003 yy_current_buffer = new_buffer;
2004 yy_load_buffer_state();
2006 /* We don't actually know whether we did this switch during
2007 * EOF (yywrap()) processing, but the only time this flag
2008 * is looked at is after yywrap() is called, so it's safe
2009 * to go ahead and always set it.
2011 yy_did_buffer_switch_on_eof = 1;
2015 #ifdef YY_USE_PROTOS
2016 void yy_load_buffer_state( void )
2018 void yy_load_buffer_state()
2021 yy_n_chars = yy_current_buffer->yy_n_chars;
2022 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2023 yyin = yy_current_buffer->yy_input_file;
2024 yy_hold_char = *yy_c_buf_p;
2028 #ifdef YY_USE_PROTOS
2029 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
2031 YY_BUFFER_STATE yy_create_buffer( file, size )
2038 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2040 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2042 b->yy_buf_size = size;
2044 /* yy_ch_buf has to be 2 characters longer than the size given because
2045 * we need to put in 2 end-of-buffer characters.
2047 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
2048 if ( ! b->yy_ch_buf )
2049 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2051 b->yy_is_our_buffer = 1;
2053 yy_init_buffer( b, file );
2059 #ifdef YY_USE_PROTOS
2060 void yy_delete_buffer( YY_BUFFER_STATE b )
2062 void yy_delete_buffer( b )
2069 if ( b == yy_current_buffer )
2070 yy_current_buffer = (YY_BUFFER_STATE) 0;
2072 if ( b->yy_is_our_buffer )
2073 yy_flex_free( (void *) b->yy_ch_buf );
2075 yy_flex_free( (void *) b );
2079 #ifndef YY_ALWAYS_INTERACTIVE
2080 #ifndef YY_NEVER_INTERACTIVE
2081 extern int isatty YY_PROTO(( int ));
2085 #ifdef YY_USE_PROTOS
2086 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
2088 void yy_init_buffer( b, file )
2095 yy_flush_buffer( b );
2097 b->yy_input_file = file;
2098 b->yy_fill_buffer = 1;
2100 #if YY_ALWAYS_INTERACTIVE
2101 b->yy_is_interactive = 1;
2103 #if YY_NEVER_INTERACTIVE
2104 b->yy_is_interactive = 0;
2106 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2112 #ifdef YY_USE_PROTOS
2113 void yy_flush_buffer( YY_BUFFER_STATE b )
2115 void yy_flush_buffer( b )
2125 /* We always need two end-of-buffer characters. The first causes
2126 * a transition to the end-of-buffer state. The second causes
2127 * a jam in that state.
2129 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2130 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2132 b->yy_buf_pos = &b->yy_ch_buf[0];
2135 b->yy_buffer_status = YY_BUFFER_NEW;
2137 if ( b == yy_current_buffer )
2138 yy_load_buffer_state();
2142 #ifndef YY_NO_SCAN_BUFFER
2143 #ifdef YY_USE_PROTOS
2144 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
2146 YY_BUFFER_STATE yy_scan_buffer( base, size )
2154 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2155 base[size-1] != YY_END_OF_BUFFER_CHAR )
2156 /* They forgot to leave room for the EOB's. */
2159 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2161 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2163 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2164 b->yy_buf_pos = b->yy_ch_buf = base;
2165 b->yy_is_our_buffer = 0;
2166 b->yy_input_file = 0;
2167 b->yy_n_chars = b->yy_buf_size;
2168 b->yy_is_interactive = 0;
2170 b->yy_fill_buffer = 0;
2171 b->yy_buffer_status = YY_BUFFER_NEW;
2173 yy_switch_to_buffer( b );
2180 #ifndef YY_NO_SCAN_STRING
2181 #ifdef YY_USE_PROTOS
2182 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
2184 YY_BUFFER_STATE yy_scan_string( yy_str )
2185 yyconst char *yy_str;
2189 for ( len = 0; yy_str[len]; ++len )
2192 return yy_scan_bytes( yy_str, len );
2197 #ifndef YY_NO_SCAN_BYTES
2198 #ifdef YY_USE_PROTOS
2199 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
2201 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
2202 yyconst char *bytes;
2211 /* Get memory for full buffer, including space for trailing EOB's. */
2213 buf = (char *) yy_flex_alloc( n );
2215 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2217 for ( i = 0; i < len; ++i )
2220 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2222 b = yy_scan_buffer( buf, n );
2224 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2226 /* It's okay to grow etc. this buffer, and we should throw it
2227 * away when we're done.
2229 b->yy_is_our_buffer = 1;
2236 #ifndef YY_NO_PUSH_STATE
2237 #ifdef YY_USE_PROTOS
2238 static void yy_push_state( int new_state )
2240 static void yy_push_state( new_state )
2244 if ( yy_start_stack_ptr >= yy_start_stack_depth )
2248 yy_start_stack_depth += YY_START_STACK_INCR;
2249 new_size = yy_start_stack_depth * sizeof( int );
2251 if ( ! yy_start_stack )
2252 yy_start_stack = (int *) yy_flex_alloc( new_size );
2255 yy_start_stack = (int *) yy_flex_realloc(
2256 (void *) yy_start_stack, new_size );
2258 if ( ! yy_start_stack )
2260 "out of memory expanding start-condition stack" );
2263 yy_start_stack[yy_start_stack_ptr++] = YY_START;
2270 #ifndef YY_NO_POP_STATE
2271 static void yy_pop_state()
2273 if ( --yy_start_stack_ptr < 0 )
2274 YY_FATAL_ERROR( "start-condition stack underflow" );
2276 BEGIN(yy_start_stack[yy_start_stack_ptr]);
2281 #ifndef YY_NO_TOP_STATE
2282 static int yy_top_state()
2284 return yy_start_stack[yy_start_stack_ptr - 1];
2288 #ifndef YY_EXIT_FAILURE
2289 #define YY_EXIT_FAILURE 2
2292 #ifdef YY_USE_PROTOS
2293 static void yy_fatal_error( yyconst char msg[] )
2295 static void yy_fatal_error( msg )
2299 (void) fprintf( stderr, "%s\n", msg );
2300 exit( YY_EXIT_FAILURE );
2305 /* Redefine yyless() so it works in section 3 code. */
2311 /* Undo effects of setting up yytext. */ \
2312 yytext[yyleng] = yy_hold_char; \
2313 yy_c_buf_p = yytext + n; \
2314 yy_hold_char = *yy_c_buf_p; \
2315 *yy_c_buf_p = '\0'; \
2321 /* Internal utility routines. */
2324 #ifdef YY_USE_PROTOS
2325 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2327 static void yy_flex_strncpy( s1, s2, n )
2334 for ( i = 0; i < n; ++i )
2339 #ifdef YY_NEED_STRLEN
2340 #ifdef YY_USE_PROTOS
2341 static int yy_flex_strlen( yyconst char *s )
2343 static int yy_flex_strlen( s )
2348 for ( n = 0; s[n]; ++n )
2356 #ifdef YY_USE_PROTOS
2357 static void *yy_flex_alloc( yy_size_t size )
2359 static void *yy_flex_alloc( size )
2363 return (void *) malloc( size );
2366 #ifdef YY_USE_PROTOS
2367 static void *yy_flex_realloc( void *ptr, yy_size_t size )
2369 static void *yy_flex_realloc( ptr, size )
2374 /* The cast to (char *) in the following accommodates both
2375 * implementations that use char* generic pointers, and those
2376 * that use void* generic pointers. It works with the latter
2377 * because both ANSI C and C++ allow castless assignment from
2378 * any pointer type to void*, and deal with argument conversions
2379 * as though doing an assignment.
2381 return (void *) realloc( (char *) ptr, size );
2384 #ifdef YY_USE_PROTOS
2385 static void yy_flex_free( void *ptr )
2387 static void yy_flex_free( ptr )