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 88
288 #define YY_END_OF_BUFFER 89
289 static yyconst short int yy_acclist[399] =
291 89, 86, 88, 85, 86, 88, 1, 87, 88, 86,
292 87, 88, 86, 88, 86, 88, 85, 86, 88, 86,
293 88, 86, 88, 26, 86, 88, 1, 27, 87, 88,
294 26, 86, 87, 88, 26, 86, 88, 26, 86, 88,
295 49, 86, 88, 1, 50, 87, 88, 49, 86, 87,
296 88, 42, 49, 86, 88, 49, 86, 88, 49, 86,
297 88, 49, 86, 88, 47, 49, 86, 88, 48, 49,
298 86, 88, 49, 86, 88, 49, 86, 88, 45, 86,
299 88, 1, 46, 87, 88, 45, 86, 87, 88, 44,
300 45, 86, 88, 45, 86, 88, 86, 88, 86, 88,
302 80, 86, 88, 80, 86, 88, 80, 86, 88, 80,
303 86, 88, 82, 86, 88, 86, 88, 86, 88, 77,
304 86, 88, 77, 86, 88, 86, 88, 80, 86, 88,
305 80, 86, 88, 80, 86, 88, 80, 86, 88, 80,
306 86, 88, 80, 86, 88, 80, 86, 88, 80, 86,
307 88, 80, 86, 88, 80, 86, 88, 80, 86, 88,
308 80, 86, 88, 83, 86, 88, 84, 86, 88, 9,
309 86, 88, 9, 86, 87, 88, 9, 86, 88, 9,
310 86, 88, 9, 86, 88, 14, 86, 88, 14, 86,
311 87, 88, 14, 86, 88, 14, 86, 88, 14, 86,
313 88, 17, 86, 88, 17, 86, 87, 88, 17, 86,
314 88, 21, 33, 25, 22, 41, 34, 43, 23, 79,
315 80, 78, 80, 80, 80, 77, 24, 77, 77, 81,
316 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
317 80, 80, 80, 80, 80, 80, 80, 80, 8, 6,
318 13, 10, 12, 11, 13, 16, 15, 3, 28, 32,
319 39, 35, 37, 18, 19, 79, 79, 78, 80, 80,
320 80, 68, 77, 20, 77, 77, 80, 80, 80, 80,
321 80, 80, 80, 63, 80, 80, 80, 80, 80, 80,
322 80, 80, 80, 80, 80, 80, 80, 11, 29, 30,
324 31, 40, 36, 38, 79, 80, 54, 80, 53, 80,
325 5, 80, 66, 80, 80, 80, 80, 58, 80, 80,
326 61, 80, 80, 80, 80, 80, 80, 80, 80, 80,
327 80, 80, 55, 80, 7, 51, 80, 53, 80, 67,
328 80, 80, 64, 80, 80, 80, 80, 80, 62, 80,
329 80, 80, 80, 57, 80, 80, 80, 80, 80, 65,
330 80, 80, 80, 80, 69, 80, 75, 80, 59, 80,
331 56, 80, 80, 80, 80, 80, 80, 70, 80, 80,
332 80, 74, 80, 73, 80, 80, 76, 80, 80, 60,
333 80, 72, 80, 71, 80, 2, 4, 52
337 static yyconst short int yy_accept[358] =
339 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
340 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
341 4, 7, 10, 13, 15, 17, 20, 22, 24, 27,
342 31, 35, 38, 41, 44, 48, 52, 56, 59, 62,
343 65, 69, 73, 76, 79, 82, 86, 90, 94, 97,
344 99, 101, 104, 107, 110, 113, 116, 118, 120, 123,
345 126, 128, 131, 134, 137, 140, 143, 146, 149, 152,
346 155, 158, 161, 164, 167, 170, 173, 177, 180, 183,
347 186, 189, 193, 196, 199, 202, 205, 209, 212, 213,
348 213, 213, 213, 213, 213, 213, 213, 214, 214, 215,
350 215, 215, 215, 215, 215, 216, 216, 217, 217, 217,
351 218, 219, 220, 220, 221, 222, 223, 224, 225, 226,
352 226, 227, 228, 228, 228, 229, 229, 229, 230, 230,
353 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
354 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
355 250, 250, 250, 250, 251, 251, 252, 252, 252, 252,
356 253, 254, 254, 256, 257, 258, 258, 259, 259, 259,
357 259, 260, 260, 260, 261, 261, 261, 261, 261, 262,
358 262, 262, 262, 263, 264, 264, 265, 265, 265, 266,
359 267, 268, 269, 270, 271, 272, 273, 274, 274, 274,
361 275, 276, 277, 277, 277, 278, 279, 280, 281, 282,
362 283, 284, 286, 287, 288, 289, 290, 291, 292, 293,
363 294, 295, 296, 297, 298, 298, 299, 299, 299, 300,
364 300, 301, 302, 302, 302, 302, 303, 304, 305, 305,
365 306, 307, 309, 311, 311, 312, 313, 315, 316, 317,
366 318, 320, 321, 323, 324, 325, 326, 327, 328, 329,
367 330, 331, 332, 333, 335, 335, 336, 336, 336, 337,
368 337, 337, 337, 337, 337, 337, 338, 340, 342, 343,
369 345, 346, 347, 348, 349, 351, 352, 353, 354, 356,
370 357, 358, 358, 358, 358, 358, 358, 358, 359, 360,
372 362, 363, 364, 365, 367, 369, 371, 373, 374, 375,
373 375, 375, 375, 375, 375, 376, 377, 378, 380, 381,
374 382, 384, 384, 384, 384, 384, 384, 386, 387, 389,
375 390, 392, 392, 392, 392, 392, 392, 392, 394, 396,
376 396, 396, 396, 397, 397, 397, 397, 397, 398, 398,
377 398, 398, 398, 398, 398, 399, 399
380 static yyconst int yy_ec[256] =
382 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
383 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
384 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
385 1, 5, 1, 6, 7, 1, 8, 1, 9, 10,
386 11, 12, 1, 1, 1, 13, 14, 15, 16, 17,
387 17, 17, 17, 17, 17, 18, 18, 19, 1, 20,
388 1, 21, 1, 1, 22, 22, 22, 22, 23, 22,
389 24, 24, 25, 24, 24, 24, 24, 24, 24, 24,
390 24, 26, 27, 24, 24, 24, 24, 24, 24, 24,
391 28, 29, 30, 1, 24, 1, 31, 32, 33, 34,
393 35, 36, 37, 38, 39, 24, 24, 40, 41, 42,
394 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
395 24, 24, 53, 1, 54, 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,
400 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
401 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
402 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
404 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
405 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
406 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
407 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
408 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
412 static yyconst int yy_meta[55] =
414 1, 2, 3, 1, 2, 1, 1, 1, 1, 1,
415 1, 1, 1, 1, 4, 4, 4, 4, 5, 1,
416 1, 6, 6, 7, 7, 7, 7, 1, 1, 8,
417 6, 6, 6, 6, 6, 6, 7, 7, 7, 7,
418 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
422 static yyconst short int yy_base[383] =
424 0, 4, 7, 13, 17, 69, 24, 36, 123, 0,
425 165, 0, 31, 52, 48, 77, 55, 81, 848, 849,
426 849, 849, 849, 1, 807, 42, 56, 811, 849, 849,
427 849, 831, 817, 849, 849, 849, 849, 57, 10, 0,
428 849, 849, 27, 789, 849, 849, 849, 849, 0, 78,
429 0, 823, 22, 49, 77, 849, 86, 93, 171, 101,
430 209, 171, 173, 26, 55, 72, 178, 187, 172, 183,
431 202, 191, 209, 849, 849, 849, 849, 827, 232, 233,
432 849, 849, 826, 241, 252, 836, 835, 228, 849, 834,
433 805, 254, 800, 220, 210, 75, 849, 789, 849, 0,
435 824, 243, 823, 822, 849, 827, 849, 260, 787, 849,
436 849, 849, 825, 808, 807, 806, 17, 232, 242, 811,
437 254, 811, 819, 261, 267, 273, 0, 288, 277, 791,
438 792, 166, 30, 89, 268, 279, 283, 290, 289, 292,
439 294, 296, 175, 293, 301, 295, 303, 297, 305, 849,
440 343, 316, 344, 849, 349, 849, 351, 355, 359, 849,
441 363, 805, 849, 849, 849, 815, 849, 770, 776, 762,
442 849, 783, 760, 849, 759, 772, 761, 783, 849, 799,
443 798, 797, 849, 849, 802, 849, 771, 800, 849, 783,
444 782, 781, 312, 351, 352, 849, 357, 374, 796, 849,
446 365, 0, 768, 370, 359, 365, 370, 371, 298, 372,
447 374, 778, 375, 376, 377, 378, 379, 382, 383, 384,
448 387, 385, 388, 306, 418, 849, 749, 361, 849, 761,
449 849, 849, 744, 754, 767, 849, 849, 849, 751, 771,
450 391, 770, 769, 429, 849, 410, 768, 396, 397, 416,
451 767, 420, 766, 421, 422, 423, 425, 427, 428, 429,
452 430, 433, 431, 765, 452, 849, 471, 476, 849, 740,
453 747, 750, 734, 0, 730, 442, 441, 759, 447, 758,
454 446, 450, 464, 467, 757, 465, 468, 469, 756, 452,
455 470, 730, 727, 724, 736, 742, 723, 472, 474, 723,
457 476, 477, 480, 722, 716, 713, 674, 484, 485, 458,
458 644, 619, 648, 560, 488, 489, 496, 575, 497, 490,
459 574, 549, 553, 321, 504, 524, 570, 499, 566, 508,
460 555, 520, 527, 528, 522, 536, 529, 531, 308, 243,
461 542, 550, 849, 535, 233, 554, 542, 849, 160, 560,
462 60, 564, 581, 585, 849, 849, 599, 607, 615, 623,
463 631, 639, 647, 655, 663, 666, 670, 674, 682, 690,
464 698, 706, 711, 715, 722, 727, 730, 737, 741, 747,
468 static yyconst short int yy_def[383] =
470 357, 357, 358, 358, 359, 359, 360, 360, 356, 9,
471 9, 11, 361, 361, 362, 362, 363, 363, 356, 356,
472 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
473 356, 356, 356, 356, 356, 356, 356, 356, 356, 364,
474 356, 356, 356, 356, 356, 356, 356, 356, 365, 356,
475 366, 367, 367, 367, 367, 356, 356, 356, 356, 356,
476 368, 367, 367, 367, 367, 367, 367, 367, 367, 367,
477 367, 367, 367, 356, 356, 356, 356, 356, 356, 356,
478 356, 356, 356, 356, 356, 356, 356, 356, 356, 369,
479 356, 356, 356, 356, 356, 356, 356, 356, 356, 370,
481 356, 356, 356, 356, 356, 371, 356, 356, 356, 356,
482 356, 356, 372, 373, 367, 374, 367, 367, 367, 356,
483 356, 356, 375, 356, 356, 356, 376, 356, 356, 377,
484 356, 367, 367, 367, 367, 367, 367, 367, 367, 367,
485 367, 367, 367, 367, 367, 367, 367, 367, 367, 356,
486 356, 356, 356, 356, 378, 356, 356, 356, 356, 356,
487 356, 356, 356, 356, 356, 369, 356, 356, 356, 356,
488 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
489 356, 356, 356, 356, 371, 356, 356, 372, 356, 373,
490 379, 374, 367, 367, 367, 356, 356, 356, 375, 356,
492 356, 376, 377, 368, 367, 367, 367, 367, 367, 367,
493 367, 367, 367, 367, 367, 367, 367, 367, 367, 367,
494 367, 367, 367, 367, 380, 356, 356, 356, 356, 356,
495 356, 356, 356, 356, 356, 356, 356, 356, 356, 379,
496 367, 367, 367, 356, 356, 367, 367, 367, 367, 367,
497 367, 367, 367, 367, 367, 367, 367, 367, 367, 367,
498 367, 367, 367, 367, 356, 356, 380, 356, 356, 356,
499 356, 356, 356, 381, 356, 367, 367, 367, 367, 367,
500 367, 367, 367, 367, 367, 367, 367, 367, 367, 367,
501 367, 356, 356, 356, 356, 356, 356, 367, 367, 367,
503 367, 367, 367, 367, 367, 367, 367, 367, 367, 356,
504 356, 356, 356, 356, 367, 367, 367, 367, 367, 367,
505 367, 356, 356, 356, 356, 356, 367, 367, 367, 367,
506 367, 356, 356, 356, 356, 356, 356, 367, 367, 356,
507 356, 356, 356, 382, 356, 356, 382, 356, 356, 356,
508 356, 356, 356, 356, 356, 0, 356, 356, 356, 356,
509 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
510 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
514 static yyconst short int yy_nxt[904] =
516 356, 21, 22, 23, 21, 26, 22, 23, 26, 30,
517 31, 27, 89, 24, 90, 30, 31, 24, 32, 35,
518 36, 105, 37, 106, 32, 38, 46, 47, 108, 48,
519 39, 108, 25, 22, 77, 116, 25, 33, 46, 47,
520 116, 48, 78, 92, 116, 40, 92, 193, 116, 28,
521 22, 82, 49, 79, 22, 77, 79, 22, 87, 83,
522 206, 117, 101, 80, 49, 109, 88, 116, 136, 41,
523 42, 35, 36, 116, 37, 43, 44, 38, 84, 22,
524 82, 84, 39, 22, 87, 102, 94, 93, 85, 112,
525 116, 113, 88, 95, 118, 116, 137, 40, 120, 96,
527 121, 121, 121, 121, 122, 175, 123, 116, 97, 103,
528 104, 138, 175, 124, 119, 128, 128, 128, 128, 207,
529 176, 41, 42, 20, 21, 22, 23, 21, 20, 20,
530 20, 20, 20, 20, 20, 20, 50, 20, 20, 20,
531 20, 51, 20, 20, 52, 52, 52, 52, 52, 52,
532 20, 20, 20, 52, 52, 53, 52, 52, 54, 52,
533 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
534 55, 52, 52, 52, 52, 56, 20, 57, 58, 59,
535 60, 60, 60, 124, 116, 125, 125, 125, 126, 116,
536 116, 116, 61, 116, 351, 62, 116, 63, 64, 65,
538 66, 116, 205, 67, 68, 116, 217, 69, 70, 116,
539 133, 71, 134, 72, 73, 135, 132, 74, 75, 139,
540 116, 141, 127, 129, 129, 129, 129, 116, 142, 140,
541 164, 143, 147, 151, 153, 154, 151, 155, 131, 144,
542 145, 165, 157, 152, 172, 157, 150, 148, 180, 146,
543 116, 149, 158, 159, 160, 92, 161, 173, 92, 169,
544 116, 108, 174, 162, 108, 163, 349, 170, 197, 197,
545 197, 197, 171, 345, 194, 201, 201, 201, 201, 124,
546 195, 125, 125, 125, 126, 124, 116, 126, 126, 126,
547 126, 129, 129, 129, 129, 181, 182, 116, 109, 93,
549 124, 116, 128, 128, 128, 128, 131, 116, 116, 208,
550 116, 116, 116, 116, 116, 116, 116, 153, 154, 116,
551 155, 116, 334, 116, 116, 334, 116, 209, 214, 250,
552 116, 210, 211, 213, 215, 218, 212, 219, 216, 264,
553 220, 221, 223, 224, 151, 153, 154, 151, 153, 222,
554 153, 154, 157, 153, 152, 157, 159, 160, 241, 161,
555 159, 160, 158, 159, 159, 160, 162, 159, 226, 116,
556 116, 197, 197, 197, 197, 244, 245, 116, 244, 201,
557 201, 201, 201, 116, 129, 129, 129, 129, 116, 116,
558 116, 242, 116, 116, 116, 116, 116, 116, 243, 131,
560 116, 116, 116, 116, 252, 116, 116, 246, 270, 116,
561 247, 253, 251, 171, 116, 116, 248, 249, 257, 265,
562 266, 254, 265, 262, 259, 256, 255, 258, 116, 261,
563 244, 245, 260, 244, 116, 263, 268, 243, 116, 116,
564 116, 116, 277, 116, 278, 116, 116, 116, 116, 116,
565 276, 116, 282, 265, 266, 279, 265, 283, 286, 116,
566 116, 288, 287, 284, 116, 116, 281, 280, 116, 290,
567 116, 289, 265, 266, 285, 265, 298, 265, 266, 291,
568 265, 300, 116, 116, 301, 116, 116, 116, 116, 268,
569 116, 299, 116, 308, 116, 116, 303, 302, 116, 304,
571 309, 306, 116, 116, 305, 322, 116, 116, 116, 317,
572 174, 318, 316, 315, 116, 116, 307, 116, 320, 335,
573 336, 336, 328, 331, 321, 337, 116, 319, 337, 334,
574 329, 330, 334, 338, 344, 327, 342, 342, 342, 342,
575 348, 339, 341, 341, 341, 341, 343, 348, 344, 116,
576 342, 342, 342, 342, 346, 348, 341, 341, 341, 341,
577 343, 340, 348, 173, 342, 342, 342, 342, 350, 350,
578 350, 350, 352, 116, 350, 350, 350, 350, 353, 353,
579 353, 353, 354, 355, 116, 354, 354, 355, 116, 354,
580 333, 332, 116, 116, 326, 353, 353, 353, 353, 20,
582 20, 20, 20, 20, 20, 20, 20, 29, 29, 29,
583 29, 29, 29, 29, 29, 34, 34, 34, 34, 34,
584 34, 34, 34, 45, 45, 45, 45, 45, 45, 45,
585 45, 76, 76, 76, 76, 76, 76, 76, 76, 81,
586 81, 81, 81, 81, 81, 81, 81, 86, 86, 86,
587 86, 86, 86, 86, 86, 107, 107, 325, 107, 107,
588 107, 107, 107, 111, 111, 324, 111, 111, 111, 111,
589 111, 114, 114, 115, 115, 115, 115, 130, 323, 130,
590 130, 130, 166, 166, 166, 166, 166, 166, 166, 166,
591 178, 178, 116, 178, 178, 178, 178, 178, 185, 185,
593 185, 185, 185, 185, 185, 185, 188, 188, 188, 188,
594 188, 188, 188, 188, 190, 190, 190, 190, 192, 192,
595 192, 192, 199, 199, 199, 199, 199, 199, 199, 199,
596 202, 116, 202, 203, 116, 203, 203, 203, 225, 225,
597 116, 116, 225, 225, 240, 240, 240, 240, 267, 267,
598 267, 267, 267, 267, 296, 296, 314, 296, 296, 296,
599 296, 296, 347, 347, 313, 347, 347, 347, 347, 347,
600 312, 311, 310, 170, 116, 116, 116, 116, 297, 295,
601 294, 293, 292, 116, 116, 116, 116, 116, 116, 191,
602 275, 274, 273, 272, 271, 269, 116, 131, 200, 116,
604 191, 191, 189, 239, 186, 238, 237, 236, 235, 234,
605 233, 232, 231, 230, 229, 228, 227, 167, 226, 204,
606 131, 200, 198, 196, 116, 116, 191, 189, 187, 186,
607 184, 183, 179, 177, 98, 168, 167, 164, 164, 156,
608 150, 116, 110, 100, 99, 98, 91, 356, 19, 356,
609 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
610 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
611 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
612 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
613 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
618 static yyconst short int yy_chk[904] =
620 0, 1, 1, 1, 1, 2, 2, 2, 2, 3,
621 3, 2, 24, 1, 24, 4, 4, 2, 3, 5,
622 5, 39, 5, 39, 4, 5, 7, 7, 43, 7,
623 5, 43, 1, 13, 13, 117, 2, 4, 8, 8,
624 53, 8, 13, 26, 64, 5, 26, 117, 133, 2,
625 15, 15, 7, 14, 14, 14, 14, 17, 17, 15,
626 133, 53, 38, 14, 8, 43, 17, 54, 64, 5,
627 5, 6, 6, 65, 6, 6, 6, 6, 16, 16,
628 16, 16, 6, 18, 18, 38, 27, 26, 16, 50,
629 66, 50, 18, 27, 54, 55, 65, 6, 57, 27,
631 57, 57, 57, 57, 58, 351, 58, 134, 27, 38,
632 38, 66, 96, 60, 55, 60, 60, 60, 60, 134,
633 96, 6, 6, 9, 9, 9, 9, 9, 9, 9,
634 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
635 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
636 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
637 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
638 9, 9, 9, 9, 9, 9, 9, 11, 11, 11,
639 11, 11, 11, 59, 132, 59, 59, 59, 59, 62,
640 69, 63, 11, 143, 349, 11, 67, 11, 11, 11,
642 11, 70, 132, 11, 11, 68, 143, 11, 11, 72,
643 63, 11, 63, 11, 11, 63, 62, 11, 11, 67,
644 71, 69, 59, 61, 61, 61, 61, 73, 70, 68,
645 88, 70, 72, 79, 80, 80, 79, 80, 61, 71,
646 71, 88, 84, 79, 95, 84, 80, 73, 102, 71,
647 118, 73, 84, 85, 85, 92, 85, 95, 92, 94,
648 119, 108, 95, 85, 108, 85, 345, 94, 121, 121,
649 121, 121, 94, 340, 118, 124, 124, 124, 124, 125,
650 119, 125, 125, 125, 125, 126, 135, 126, 126, 126,
651 126, 129, 129, 129, 129, 102, 102, 136, 108, 92,
653 128, 137, 128, 128, 128, 128, 129, 139, 138, 135,
654 140, 144, 141, 146, 142, 148, 209, 152, 152, 145,
655 152, 147, 324, 149, 224, 324, 339, 136, 141, 209,
656 193, 137, 138, 140, 142, 144, 139, 145, 142, 224,
657 146, 147, 148, 149, 151, 153, 153, 151, 153, 147,
658 155, 155, 157, 155, 151, 157, 158, 158, 193, 158,
659 159, 159, 157, 159, 161, 161, 158, 161, 158, 194,
660 195, 197, 197, 197, 197, 198, 198, 205, 198, 201,
661 201, 201, 201, 206, 204, 204, 204, 204, 207, 208,
662 210, 194, 211, 213, 214, 215, 216, 217, 195, 204,
664 218, 219, 220, 222, 211, 221, 223, 205, 228, 241,
665 206, 213, 210, 228, 248, 249, 207, 208, 217, 225,
666 225, 214, 225, 222, 219, 216, 215, 218, 246, 221,
667 244, 244, 220, 244, 250, 223, 225, 241, 252, 254,
668 255, 256, 248, 257, 249, 258, 259, 260, 261, 263,
669 246, 262, 255, 265, 265, 250, 265, 256, 259, 277,
670 276, 260, 259, 257, 281, 279, 254, 252, 282, 262,
671 290, 261, 267, 267, 258, 267, 276, 268, 268, 263,
672 268, 279, 283, 286, 281, 284, 287, 288, 291, 267,
673 298, 277, 299, 290, 301, 302, 283, 282, 303, 284,
675 291, 287, 308, 309, 286, 310, 315, 316, 320, 301,
676 310, 302, 299, 298, 317, 319, 288, 328, 308, 325,
677 325, 325, 316, 320, 309, 326, 330, 303, 326, 334,
678 317, 319, 334, 328, 337, 315, 335, 335, 335, 335,
679 344, 330, 334, 334, 334, 334, 336, 347, 337, 338,
680 336, 336, 336, 336, 341, 344, 341, 341, 341, 341,
681 342, 333, 347, 332, 342, 342, 342, 342, 346, 346,
682 346, 346, 350, 331, 350, 350, 350, 350, 352, 352,
683 352, 352, 353, 353, 329, 353, 354, 354, 327, 354,
684 323, 322, 321, 318, 314, 353, 353, 353, 353, 357,
686 357, 357, 357, 357, 357, 357, 357, 358, 358, 358,
687 358, 358, 358, 358, 358, 359, 359, 359, 359, 359,
688 359, 359, 359, 360, 360, 360, 360, 360, 360, 360,
689 360, 361, 361, 361, 361, 361, 361, 361, 361, 362,
690 362, 362, 362, 362, 362, 362, 362, 363, 363, 363,
691 363, 363, 363, 363, 363, 364, 364, 313, 364, 364,
692 364, 364, 364, 365, 365, 312, 365, 365, 365, 365,
693 365, 366, 366, 367, 367, 367, 367, 368, 311, 368,
694 368, 368, 369, 369, 369, 369, 369, 369, 369, 369,
695 370, 370, 307, 370, 370, 370, 370, 370, 371, 371,
697 371, 371, 371, 371, 371, 371, 372, 372, 372, 372,
698 372, 372, 372, 372, 373, 373, 373, 373, 374, 374,
699 374, 374, 375, 375, 375, 375, 375, 375, 375, 375,
700 376, 306, 376, 377, 305, 377, 377, 377, 378, 378,
701 304, 300, 378, 378, 379, 379, 379, 379, 380, 380,
702 380, 380, 380, 380, 381, 381, 297, 381, 381, 381,
703 381, 381, 382, 382, 296, 382, 382, 382, 382, 382,
704 295, 294, 293, 292, 289, 285, 280, 278, 275, 273,
705 272, 271, 270, 264, 253, 251, 247, 243, 242, 240,
706 239, 235, 234, 233, 230, 227, 212, 203, 199, 192,
708 191, 190, 188, 187, 185, 182, 181, 180, 178, 177,
709 176, 175, 173, 172, 170, 169, 168, 166, 162, 131,
710 130, 123, 122, 120, 116, 115, 114, 113, 109, 106,
711 104, 103, 101, 98, 93, 91, 90, 87, 86, 83,
712 78, 52, 44, 33, 32, 28, 25, 19, 356, 356,
713 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
714 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
715 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
716 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
717 356, 356, 356, 356, 356, 356, 356, 356, 356, 356,
722 static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
723 static char *yy_full_match;
727 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
728 yy_cp = yy_full_match; /* restore poss. backed-over text */ \
732 #define yymore() yymore_used_but_not_detected
733 #define YY_MORE_ADJ 0
734 #define YY_RESTORE_YY_MORE_OFFSET
738 /* GOB C Preprocessor
739 * Copyright (C) 1999 the Free Software Foundation.
741 * Author: George Lebl
743 * This program is free software; you can redistribute it and/or modify
744 * it under the terms of the GNU General Public License as published by
745 * the Free Software Foundation; either version 2 of the License, or
746 * (at your option) any later version.
748 * This program is distributed in the hope that it will be useful,
749 * but WITHOUT ANY WARRANTY; without even the implied warranty of
750 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
751 * GNU General Public License for more details.
753 * You should have received a copy of the GNU General Public License
754 * along with this program; if not, write to the Free Software
755 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
764 #include "treefuncs.h"
769 static int parenth_depth = 0;
770 static int before_comment = INITIAL;
771 static gboolean class_after_c = FALSE;
772 static int code_type = CCODE;
775 static char *gtk_doc_func = NULL; /* current gtk-doc func */
776 GHashTable *gtk_doc_hash = NULL;
778 static GString *cbuf = NULL;
781 GList *include_files = NULL;
782 /* 0 no, 1 means yes, 2+ means don't even start looking anymore */
783 static int look_for_includes = 0;
791 cbuf = g_string_new(NULL);
793 cbuf = g_string_assign(cbuf, "");
801 cbuf = g_string_new(s);
803 cbuf = g_string_append(cbuf,s);
808 add_gtk_doc_func(void)
814 gtk_doc_hash = g_hash_table_new(g_str_hash, g_str_equal);
815 g_hash_table_insert(gtk_doc_hash, gtk_doc_func, g_strdup(cbuf->str));
826 #define C_CODE_STRING 3
830 #define CLASS_CODE_I 5
832 #define GTK_DOC_BEFORE_NAME 6
836 #define GTK_DOC_LINE 8
840 /* Macros after this point can all be overridden by user definitions in
844 #ifndef YY_SKIP_YYWRAP
846 extern "C" int yywrap YY_PROTO(( void ));
848 extern int yywrap YY_PROTO(( void ));
853 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
857 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
860 #ifdef YY_NEED_STRLEN
861 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
866 static int yyinput YY_PROTO(( void ));
868 static int input YY_PROTO(( void ));
873 static int yy_start_stack_ptr = 0;
874 static int yy_start_stack_depth = 0;
875 static int *yy_start_stack = 0;
876 #ifndef YY_NO_PUSH_STATE
877 static void yy_push_state YY_PROTO(( int new_state ));
879 #ifndef YY_NO_POP_STATE
880 static void yy_pop_state YY_PROTO(( void ));
882 #ifndef YY_NO_TOP_STATE
883 static int yy_top_state YY_PROTO(( void ));
887 #define YY_NO_PUSH_STATE 1
888 #define YY_NO_POP_STATE 1
889 #define YY_NO_TOP_STATE 1
892 #ifdef YY_MALLOC_DECL
900 /* Just try to get by without declaring the routines. This will fail
901 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
902 * or sizeof(void*) != sizeof(int).
907 /* Amount of stuff to slurp up with each read. */
908 #ifndef YY_READ_BUF_SIZE
909 #define YY_READ_BUF_SIZE 8192
912 /* Copy whatever the last rule matched to the standard output. */
915 /* This used to be an fputs(), but since the string might contain NUL's,
916 * we now use fwrite().
918 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
921 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
922 * is returned in "result".
925 #define YY_INPUT(buf,result,max_size) \
926 if ( yy_current_buffer->yy_is_interactive ) \
929 for ( n = 0; n < max_size && \
930 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
933 buf[n++] = (char) c; \
934 if ( c == EOF && ferror( yyin ) ) \
935 YY_FATAL_ERROR( "input in flex scanner failed" ); \
938 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
939 && ferror( yyin ) ) \
940 YY_FATAL_ERROR( "input in flex scanner failed" );
943 /* No semi-colon after return; correct usage is to write "yyterminate();" -
944 * we don't want an extra ';' after the "return" because that will cause
945 * some compilers to complain about unreachable statements.
948 #define yyterminate() return YY_NULL
951 /* Number of entries by which start-condition stack grows. */
952 #ifndef YY_START_STACK_INCR
953 #define YY_START_STACK_INCR 25
956 /* Report a fatal error. */
957 #ifndef YY_FATAL_ERROR
958 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
961 /* Default declaration of generated scanner - a define so the user can
962 * easily add parameters.
965 #define YY_DECL int yylex YY_PROTO(( void ))
968 /* Code executed at the beginning of each rule, after yytext and yyleng
971 #ifndef YY_USER_ACTION
972 #define YY_USER_ACTION
975 /* Code executed at the end of each rule. */
977 #define YY_BREAK break;
980 #define YY_RULE_SETUP \
982 yy_current_buffer->yy_at_bol = \
983 (yytext[yyleng - 1] == '\n'); \
988 register yy_state_type yy_current_state;
989 register char *yy_cp = NULL, *yy_bp = NULL;
1006 yy_start = 1; /* first start state */
1014 if ( ! yy_current_buffer )
1016 yy_create_buffer( yyin, YY_BUF_SIZE );
1018 yy_load_buffer_state();
1021 while ( 1 ) /* loops until end-of-file is reached */
1025 /* Support of yytext. */
1026 *yy_cp = yy_hold_char;
1028 /* yy_bp points to the position in yy_ch_buf of the start of
1033 yy_current_state = yy_start;
1034 yy_current_state += YY_AT_BOL();
1035 yy_state_ptr = yy_state_buf;
1036 *yy_state_ptr++ = yy_current_state;
1040 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1041 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1043 yy_current_state = (int) yy_def[yy_current_state];
1044 if ( yy_current_state >= 357 )
1045 yy_c = yy_meta[(unsigned int) yy_c];
1047 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1048 *yy_state_ptr++ = yy_current_state;
1051 while ( yy_base[yy_current_state] != 849 );
1054 yy_current_state = *--yy_state_ptr;
1055 yy_lp = yy_accept[yy_current_state];
1056 find_rule: /* we branch to this label when backing up */
1057 for ( ; ; ) /* until we find what rule we matched */
1059 if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
1061 yy_act = yy_acclist[yy_lp];
1063 yy_full_match = yy_cp;
1068 yy_current_state = *--yy_state_ptr;
1069 yy_lp = yy_accept[yy_current_state];
1072 YY_DO_BEFORE_ACTION;
1075 do_action: /* This label is used only to access EOF actions. */
1079 { /* beginning of action switch */
1083 { line_no++; REJECT; }
1086 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1087 yy_c_buf_p = yy_cp -= 1;
1088 YY_DO_BEFORE_ACTION; /* set up yytext again */
1092 /* Thy evil easter egg */
1093 #define QQ(x) long x
1094 #define KK(x) =atoi(__(&,,x,))
1095 #define MM(x,a) {QQ(i);for(i=2;i<x;i++){a}}
1096 #define PP(Q) (P%Q)==0
1097 #define ___(x,y,z) if(x z y)
1098 #define __(a,x,y,z) a(yytext[y] x z)
1099 #define O__O(a,b) fprintf(stderr,"%s is %s!\n",a,b)
1100 QQ(m)=1;___(__(,==,2,'P'),__(,==,5,'M'),&&
1101 ){QQ(P)KK(8);MM(P,___(PP(i),,)m=0;)}__(,=,
1102 7,0);___(,,m){O__O(__( &,,8,),__(&,,2,));}
1114 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1115 yy_c_buf_p = yy_cp -= 1;
1116 YY_DO_BEFORE_ACTION; /* set up yytext again */
1119 { ; /*comment, ignore*/ }
1125 if(look_for_includes==1) {
1128 char *str = g_strdup(yytext);
1129 file = strchr(str,'"');
1130 if(!file) file = strchr(str,'<');
1132 p = strchr(file,'"');
1133 if(!p) p = strchr(file,'>');
1135 include_files = g_list_prepend(include_files,g_strdup(file));
1142 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1143 yy_c_buf_p = yy_cp -= 1;
1144 YY_DO_BEFORE_ACTION; /* set up yytext again */
1148 /* eat out gtk doc stuff */
1149 BEGIN(GTK_DOC_BEFORE_NAME);
1154 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1155 yy_c_buf_p = yy_cp -= 1;
1156 YY_DO_BEFORE_ACTION; /* set up yytext again */
1160 /* empty doc lines */
1165 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1166 yy_c_buf_p = yy_cp -= 1;
1167 YY_DO_BEFORE_ACTION; /* set up yytext again */
1173 p = strchr(yytext, '*');
1174 g_free(gtk_doc_func);
1175 gtk_doc_func = g_strdup(p+2);
1176 p = strchr(gtk_doc_func, ':');
1178 g_strstrip(gtk_doc_func);
1185 BEGIN(CLASS_CODE_I);
1193 before_comment = CLASS_CODE_I;
1197 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1198 yy_c_buf_p = yy_cp -= 1;
1199 YY_DO_BEFORE_ACTION; /* set up yytext again */
1203 /* empty doc lines */
1204 add_to_cbuf(" *\n");
1211 BEGIN(CLASS_CODE_I);
1221 BEGIN(GTK_DOC_LINE);
1228 BEGIN(CLASS_CODE_I);
1236 before_comment = CLASS_CODE_I;
1243 BEGIN(CLASS_CODE_I);
1249 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1250 yy_c_buf_p = yy_cp -= 1;
1251 YY_DO_BEFORE_ACTION; /* set up yytext again */
1256 add_to_cbuf(yytext);
1265 add_to_cbuf(yytext);
1269 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1270 yy_c_buf_p = yy_cp -= 1;
1271 YY_DO_BEFORE_ACTION; /* set up yytext again */
1274 { add_to_cbuf(yytext); /*comment, ignore*/ }
1277 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1278 yy_c_buf_p = yy_cp -= 1;
1279 YY_DO_BEFORE_ACTION; /* set up yytext again */
1282 { ; /*comment, ignore*/ }
1285 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1286 yy_c_buf_p = yy_cp -= 1;
1287 YY_DO_BEFORE_ACTION; /* set up yytext again */
1290 { ; /*comment, ignore*/ }
1295 {BEGIN(COMMENT); before_comment = INITIAL; }
1301 add_to_cbuf(yytext);
1303 before_comment = C_CODE;
1309 {BEGIN(COMMENT); before_comment = CLASS_CODE; }
1314 {BEGIN(COMMENT); before_comment = CLASS_CODE_I; }
1320 if(before_comment == C_CODE) add_to_cbuf(yytext);
1321 BEGIN(before_comment);
1328 /* comment, ignore */
1329 if(before_comment == C_CODE) add_to_cbuf(yytext);
1336 /* comment, ignore */
1337 if(before_comment == C_CODE) add_to_cbuf(yytext);
1346 class_after_c = FALSE;
1349 ccode_line = line_no;
1358 class_after_c = FALSE;
1361 ccode_line = line_no;
1370 class_after_c = FALSE;
1373 ccode_line = line_no;
1382 class_after_c = FALSE;
1385 ccode_line = line_no;
1394 class_after_c = FALSE;
1397 ccode_line = line_no;
1406 class_after_c = FALSE;
1409 ccode_line = line_no;
1410 if(look_for_includes==0)
1411 look_for_includes=1;
1421 if(look_for_includes==1)
1422 look_for_includes=0;
1429 { add_to_cbuf(yytext); }
1434 { add_to_cbuf(yytext); }
1439 { add_to_cbuf(yytext); }
1444 { add_to_cbuf(yytext); }
1449 { add_to_cbuf(yytext); }
1454 { add_to_cbuf(yytext); }
1459 { add_to_cbuf(yytext); }
1465 BEGIN(C_CODE_STRING);
1466 add_to_cbuf(yytext);
1472 { add_to_cbuf(yytext); }
1479 add_to_cbuf(yytext);
1485 { add_to_cbuf(yytext); }
1490 { add_to_cbuf(yytext); }
1497 add_to_cbuf(yytext);
1505 if(parenth_depth<0) {
1507 } else if(parenth_depth==0 && class_after_c) {
1508 BEGIN(CLASS_CODE_I);
1513 add_to_cbuf(yytext);
1519 { add_to_cbuf(yytext); }
1524 { add_to_cbuf(yytext); }
1530 static int found_classes = 0;
1531 look_for_includes = 2;
1534 if(++found_classes > 1) {
1536 "Only one class per file allowed",
1544 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1545 yy_c_buf_p = yy_cp -= 1;
1546 YY_DO_BEFORE_ACTION; /* set up yytext again */
1550 int maj = 0,min = 0,pl = 0;
1551 int rmaj = 0,rmin = 0,rpl = 0;
1554 sscanf(VERSION,"%d.%d.%d",&rmaj,&rmin,&rpl);
1555 p = strchr(yytext,'r');
1556 g_assert(p); /* we MUST have found it */
1557 sscanf(p,"requires %d.%d.%d",&maj,&min,&pl);
1559 (rmaj == maj && rmin < min) ||
1560 (rmaj == maj && rmin == min && rpl < pl)) {
1562 s = g_strdup_printf(
1563 "GOB version %d.%d.%d required "
1565 "To upgrade your gob, see: "
1566 "http://www.5z.com/jirka/gob.html",
1567 maj,min,pl,VERSION);
1568 print_error(FALSE, s, line_no);
1579 s = g_strdup_printf("'%s' keyword should not "
1580 "be used when generating "
1581 "C++ code", yytext);
1582 print_error(TRUE, s, line_no);
1666 {yylval.line = line_no; return PUBLIC;}
1671 {yylval.line = line_no; return PRIVATE;}
1676 {yylval.line = line_no; return PROTECTED;}
1681 {yylval.line = line_no; return CLASSWIDE;}
1686 {yylval.line = line_no; return ARGUMENT;}
1691 {yylval.line = line_no; return VIRTUAL;}
1696 {yylval.line = line_no; return SIGNAL;}
1701 {yylval.line = line_no; return OVERRIDE;}
1707 yylval.id = g_strdup(yytext);
1715 /* this one is for a classname with a namespace */
1716 yylval.id = g_strdup(yytext);
1724 /* this is for a classname with an empty namespace */
1725 yylval.id = g_strdup(yytext);
1733 yylval.id = g_strdup(yytext);
1741 yylval.id = g_strdup(yytext);
1749 BEGIN(CLASS_CODE_I);
1759 class_after_c = TRUE;
1760 yylval.line = line_no;
1762 ccode_line = line_no;
1783 yylval.line = line_no;
1797 #line 1798 "lex.yy.c"
1798 case YY_STATE_EOF(INITIAL):
1799 case YY_STATE_EOF(COMMENT):
1800 case YY_STATE_EOF(C_CODE):
1801 case YY_STATE_EOF(C_CODE_STRING):
1802 case YY_STATE_EOF(CLASS_CODE):
1803 case YY_STATE_EOF(CLASS_CODE_I):
1804 case YY_STATE_EOF(GTK_DOC_BEFORE_NAME):
1805 case YY_STATE_EOF(GTK_DOC):
1806 case YY_STATE_EOF(GTK_DOC_LINE):
1809 case YY_END_OF_BUFFER:
1811 /* Amount of text matched not including the EOB char. */
1812 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1814 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1815 *yy_cp = yy_hold_char;
1816 YY_RESTORE_YY_MORE_OFFSET
1818 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1820 /* We're scanning a new file or input source. It's
1821 * possible that this happened because the user
1822 * just pointed yyin at a new source and called
1823 * yylex(). If so, then we have to assure
1824 * consistency between yy_current_buffer and our
1825 * globals. Here is the right place to do so, because
1826 * this is the first action (other than possibly a
1827 * back-up) that will match for the new input source.
1829 yy_n_chars = yy_current_buffer->yy_n_chars;
1830 yy_current_buffer->yy_input_file = yyin;
1831 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1834 /* Note that here we test for yy_c_buf_p "<=" to the position
1835 * of the first EOB in the buffer, since yy_c_buf_p will
1836 * already have been incremented past the NUL character
1837 * (since all states make transitions on EOB to the
1838 * end-of-buffer state). Contrast this with the test
1841 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1842 { /* This was really a NUL. */
1843 yy_state_type yy_next_state;
1845 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1847 yy_current_state = yy_get_previous_state();
1849 /* Okay, we're now positioned to make the NUL
1850 * transition. We couldn't have
1851 * yy_get_previous_state() go ahead and do it
1852 * for us because it doesn't know how to deal
1853 * with the possibility of jamming (and we don't
1854 * want to build jamming into it because then it
1855 * will run more slowly).
1858 yy_next_state = yy_try_NUL_trans( yy_current_state );
1860 yy_bp = yytext_ptr + YY_MORE_ADJ;
1862 if ( yy_next_state )
1864 /* Consume the NUL. */
1865 yy_cp = ++yy_c_buf_p;
1866 yy_current_state = yy_next_state;
1873 goto yy_find_action;
1877 else switch ( yy_get_next_buffer() )
1879 case EOB_ACT_END_OF_FILE:
1881 yy_did_buffer_switch_on_eof = 0;
1885 /* Note: because we've taken care in
1886 * yy_get_next_buffer() to have set up
1887 * yytext, we can now set up
1888 * yy_c_buf_p so that if some total
1889 * hoser (like flex itself) wants to
1890 * call the scanner after we return the
1891 * YY_NULL, it'll still work - another
1892 * YY_NULL will get returned.
1894 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1896 yy_act = YY_STATE_EOF(YY_START);
1902 if ( ! yy_did_buffer_switch_on_eof )
1908 case EOB_ACT_CONTINUE_SCAN:
1910 yytext_ptr + yy_amount_of_matched_text;
1912 yy_current_state = yy_get_previous_state();
1915 yy_bp = yytext_ptr + YY_MORE_ADJ;
1918 case EOB_ACT_LAST_MATCH:
1920 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1922 yy_current_state = yy_get_previous_state();
1925 yy_bp = yytext_ptr + YY_MORE_ADJ;
1926 goto yy_find_action;
1933 "fatal flex scanner internal error--no action found" );
1934 } /* end of action switch */
1935 } /* end of scanning one token */
1936 } /* end of yylex */
1939 /* yy_get_next_buffer - try to read in a new buffer
1941 * Returns a code representing an action:
1942 * EOB_ACT_LAST_MATCH -
1943 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1944 * EOB_ACT_END_OF_FILE - end of file
1947 static int yy_get_next_buffer()
1949 register char *dest = yy_current_buffer->yy_ch_buf;
1950 register char *source = yytext_ptr;
1951 register int number_to_move, i;
1954 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1956 "fatal flex scanner internal error--end of buffer missed" );
1958 if ( yy_current_buffer->yy_fill_buffer == 0 )
1959 { /* Don't try to fill the buffer, so this is an EOF. */
1960 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1962 /* We matched a single character, the EOB, so
1963 * treat this as a final EOF.
1965 return EOB_ACT_END_OF_FILE;
1970 /* We matched some text prior to the EOB, first
1973 return EOB_ACT_LAST_MATCH;
1977 /* Try to read more data. */
1979 /* First move last chars to start of buffer. */
1980 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1982 for ( i = 0; i < number_to_move; ++i )
1983 *(dest++) = *(source++);
1985 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1986 /* don't do the read, it's not guaranteed to return an EOF,
1989 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1994 yy_current_buffer->yy_buf_size - number_to_move - 1;
1996 while ( num_to_read <= 0 )
1997 { /* Not enough room in the buffer - grow it. */
1998 #ifdef YY_USES_REJECT
2000 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
2003 /* just a shorter name for the current buffer */
2004 YY_BUFFER_STATE b = yy_current_buffer;
2006 int yy_c_buf_p_offset =
2007 (int) (yy_c_buf_p - b->yy_ch_buf);
2009 if ( b->yy_is_our_buffer )
2011 int new_size = b->yy_buf_size * 2;
2013 if ( new_size <= 0 )
2014 b->yy_buf_size += b->yy_buf_size / 8;
2016 b->yy_buf_size *= 2;
2018 b->yy_ch_buf = (char *)
2019 /* Include room in for 2 EOB chars. */
2020 yy_flex_realloc( (void *) b->yy_ch_buf,
2021 b->yy_buf_size + 2 );
2024 /* Can't grow it, we don't own it. */
2027 if ( ! b->yy_ch_buf )
2029 "fatal error - scanner input buffer overflow" );
2031 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2033 num_to_read = yy_current_buffer->yy_buf_size -
2038 if ( num_to_read > YY_READ_BUF_SIZE )
2039 num_to_read = YY_READ_BUF_SIZE;
2041 /* Read in more data. */
2042 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
2043 yy_n_chars, num_to_read );
2045 yy_current_buffer->yy_n_chars = yy_n_chars;
2048 if ( yy_n_chars == 0 )
2050 if ( number_to_move == YY_MORE_ADJ )
2052 ret_val = EOB_ACT_END_OF_FILE;
2058 ret_val = EOB_ACT_LAST_MATCH;
2059 yy_current_buffer->yy_buffer_status =
2060 YY_BUFFER_EOF_PENDING;
2065 ret_val = EOB_ACT_CONTINUE_SCAN;
2067 yy_n_chars += number_to_move;
2068 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
2069 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
2071 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
2077 /* yy_get_previous_state - get the state just before the EOB char was reached */
2079 static yy_state_type yy_get_previous_state()
2081 register yy_state_type yy_current_state;
2082 register char *yy_cp;
2084 yy_current_state = yy_start;
2085 yy_current_state += YY_AT_BOL();
2086 yy_state_ptr = yy_state_buf;
2087 *yy_state_ptr++ = yy_current_state;
2089 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
2091 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2092 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2094 yy_current_state = (int) yy_def[yy_current_state];
2095 if ( yy_current_state >= 357 )
2096 yy_c = yy_meta[(unsigned int) yy_c];
2098 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2099 *yy_state_ptr++ = yy_current_state;
2102 return yy_current_state;
2106 /* yy_try_NUL_trans - try to make a transition on the NUL character
2109 * next_state = yy_try_NUL_trans( current_state );
2112 #ifdef YY_USE_PROTOS
2113 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
2115 static yy_state_type yy_try_NUL_trans( yy_current_state )
2116 yy_state_type yy_current_state;
2119 register int yy_is_jam;
2121 register YY_CHAR yy_c = 1;
2122 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2124 yy_current_state = (int) yy_def[yy_current_state];
2125 if ( yy_current_state >= 357 )
2126 yy_c = yy_meta[(unsigned int) yy_c];
2128 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2129 yy_is_jam = (yy_current_state == 356);
2131 *yy_state_ptr++ = yy_current_state;
2133 return yy_is_jam ? 0 : yy_current_state;
2138 #ifdef YY_USE_PROTOS
2139 static void yyunput( int c, register char *yy_bp )
2141 static void yyunput( c, yy_bp )
2143 register char *yy_bp;
2146 register char *yy_cp = yy_c_buf_p;
2148 /* undo effects of setting up yytext */
2149 *yy_cp = yy_hold_char;
2151 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2152 { /* need to shift things up to make room */
2153 /* +2 for EOB chars. */
2154 register int number_to_move = yy_n_chars + 2;
2155 register char *dest = &yy_current_buffer->yy_ch_buf[
2156 yy_current_buffer->yy_buf_size + 2];
2157 register char *source =
2158 &yy_current_buffer->yy_ch_buf[number_to_move];
2160 while ( source > yy_current_buffer->yy_ch_buf )
2161 *--dest = *--source;
2163 yy_cp += (int) (dest - source);
2164 yy_bp += (int) (dest - source);
2165 yy_current_buffer->yy_n_chars =
2166 yy_n_chars = yy_current_buffer->yy_buf_size;
2168 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2169 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2172 *--yy_cp = (char) c;
2176 yy_hold_char = *yy_cp;
2179 #endif /* ifndef YY_NO_UNPUT */
2183 static int yyinput()
2190 *yy_c_buf_p = yy_hold_char;
2192 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2194 /* yy_c_buf_p now points to the character we want to return.
2195 * If this occurs *before* the EOB characters, then it's a
2196 * valid NUL; if not, then we've hit the end of the buffer.
2198 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2199 /* This was really a NUL. */
2203 { /* need more input */
2204 int offset = yy_c_buf_p - yytext_ptr;
2207 switch ( yy_get_next_buffer() )
2209 case EOB_ACT_LAST_MATCH:
2210 /* This happens because yy_g_n_b()
2211 * sees that we've accumulated a
2212 * token and flags that we need to
2213 * try matching the token before
2214 * proceeding. But for input(),
2215 * there's no matching to consider.
2216 * So convert the EOB_ACT_LAST_MATCH
2217 * to EOB_ACT_END_OF_FILE.
2220 /* Reset buffer status. */
2225 case EOB_ACT_END_OF_FILE:
2230 if ( ! yy_did_buffer_switch_on_eof )
2239 case EOB_ACT_CONTINUE_SCAN:
2240 yy_c_buf_p = yytext_ptr + offset;
2246 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
2247 *yy_c_buf_p = '\0'; /* preserve yytext */
2248 yy_hold_char = *++yy_c_buf_p;
2250 yy_current_buffer->yy_at_bol = (c == '\n');
2256 #ifdef YY_USE_PROTOS
2257 void yyrestart( FILE *input_file )
2259 void yyrestart( input_file )
2263 if ( ! yy_current_buffer )
2264 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
2266 yy_init_buffer( yy_current_buffer, input_file );
2267 yy_load_buffer_state();
2271 #ifdef YY_USE_PROTOS
2272 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
2274 void yy_switch_to_buffer( new_buffer )
2275 YY_BUFFER_STATE new_buffer;
2278 if ( yy_current_buffer == new_buffer )
2281 if ( yy_current_buffer )
2283 /* Flush out information for old buffer. */
2284 *yy_c_buf_p = yy_hold_char;
2285 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2286 yy_current_buffer->yy_n_chars = yy_n_chars;
2289 yy_current_buffer = new_buffer;
2290 yy_load_buffer_state();
2292 /* We don't actually know whether we did this switch during
2293 * EOF (yywrap()) processing, but the only time this flag
2294 * is looked at is after yywrap() is called, so it's safe
2295 * to go ahead and always set it.
2297 yy_did_buffer_switch_on_eof = 1;
2301 #ifdef YY_USE_PROTOS
2302 void yy_load_buffer_state( void )
2304 void yy_load_buffer_state()
2307 yy_n_chars = yy_current_buffer->yy_n_chars;
2308 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2309 yyin = yy_current_buffer->yy_input_file;
2310 yy_hold_char = *yy_c_buf_p;
2314 #ifdef YY_USE_PROTOS
2315 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
2317 YY_BUFFER_STATE yy_create_buffer( file, size )
2324 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2326 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2328 b->yy_buf_size = size;
2330 /* yy_ch_buf has to be 2 characters longer than the size given because
2331 * we need to put in 2 end-of-buffer characters.
2333 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
2334 if ( ! b->yy_ch_buf )
2335 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2337 b->yy_is_our_buffer = 1;
2339 yy_init_buffer( b, file );
2345 #ifdef YY_USE_PROTOS
2346 void yy_delete_buffer( YY_BUFFER_STATE b )
2348 void yy_delete_buffer( b )
2355 if ( b == yy_current_buffer )
2356 yy_current_buffer = (YY_BUFFER_STATE) 0;
2358 if ( b->yy_is_our_buffer )
2359 yy_flex_free( (void *) b->yy_ch_buf );
2361 yy_flex_free( (void *) b );
2365 #ifndef YY_ALWAYS_INTERACTIVE
2366 #ifndef YY_NEVER_INTERACTIVE
2367 extern int isatty YY_PROTO(( int ));
2371 #ifdef YY_USE_PROTOS
2372 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
2374 void yy_init_buffer( b, file )
2381 yy_flush_buffer( b );
2383 b->yy_input_file = file;
2384 b->yy_fill_buffer = 1;
2386 #if YY_ALWAYS_INTERACTIVE
2387 b->yy_is_interactive = 1;
2389 #if YY_NEVER_INTERACTIVE
2390 b->yy_is_interactive = 0;
2392 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2398 #ifdef YY_USE_PROTOS
2399 void yy_flush_buffer( YY_BUFFER_STATE b )
2401 void yy_flush_buffer( b )
2411 /* We always need two end-of-buffer characters. The first causes
2412 * a transition to the end-of-buffer state. The second causes
2413 * a jam in that state.
2415 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2416 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2418 b->yy_buf_pos = &b->yy_ch_buf[0];
2421 b->yy_buffer_status = YY_BUFFER_NEW;
2423 if ( b == yy_current_buffer )
2424 yy_load_buffer_state();
2428 #ifndef YY_NO_SCAN_BUFFER
2429 #ifdef YY_USE_PROTOS
2430 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
2432 YY_BUFFER_STATE yy_scan_buffer( base, size )
2440 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2441 base[size-1] != YY_END_OF_BUFFER_CHAR )
2442 /* They forgot to leave room for the EOB's. */
2445 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2447 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2449 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2450 b->yy_buf_pos = b->yy_ch_buf = base;
2451 b->yy_is_our_buffer = 0;
2452 b->yy_input_file = 0;
2453 b->yy_n_chars = b->yy_buf_size;
2454 b->yy_is_interactive = 0;
2456 b->yy_fill_buffer = 0;
2457 b->yy_buffer_status = YY_BUFFER_NEW;
2459 yy_switch_to_buffer( b );
2466 #ifndef YY_NO_SCAN_STRING
2467 #ifdef YY_USE_PROTOS
2468 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
2470 YY_BUFFER_STATE yy_scan_string( yy_str )
2471 yyconst char *yy_str;
2475 for ( len = 0; yy_str[len]; ++len )
2478 return yy_scan_bytes( yy_str, len );
2483 #ifndef YY_NO_SCAN_BYTES
2484 #ifdef YY_USE_PROTOS
2485 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
2487 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
2488 yyconst char *bytes;
2497 /* Get memory for full buffer, including space for trailing EOB's. */
2499 buf = (char *) yy_flex_alloc( n );
2501 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2503 for ( i = 0; i < len; ++i )
2506 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2508 b = yy_scan_buffer( buf, n );
2510 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2512 /* It's okay to grow etc. this buffer, and we should throw it
2513 * away when we're done.
2515 b->yy_is_our_buffer = 1;
2522 #ifndef YY_NO_PUSH_STATE
2523 #ifdef YY_USE_PROTOS
2524 static void yy_push_state( int new_state )
2526 static void yy_push_state( new_state )
2530 if ( yy_start_stack_ptr >= yy_start_stack_depth )
2534 yy_start_stack_depth += YY_START_STACK_INCR;
2535 new_size = yy_start_stack_depth * sizeof( int );
2537 if ( ! yy_start_stack )
2538 yy_start_stack = (int *) yy_flex_alloc( new_size );
2541 yy_start_stack = (int *) yy_flex_realloc(
2542 (void *) yy_start_stack, new_size );
2544 if ( ! yy_start_stack )
2546 "out of memory expanding start-condition stack" );
2549 yy_start_stack[yy_start_stack_ptr++] = YY_START;
2556 #ifndef YY_NO_POP_STATE
2557 static void yy_pop_state()
2559 if ( --yy_start_stack_ptr < 0 )
2560 YY_FATAL_ERROR( "start-condition stack underflow" );
2562 BEGIN(yy_start_stack[yy_start_stack_ptr]);
2567 #ifndef YY_NO_TOP_STATE
2568 static int yy_top_state()
2570 return yy_start_stack[yy_start_stack_ptr - 1];
2574 #ifndef YY_EXIT_FAILURE
2575 #define YY_EXIT_FAILURE 2
2578 #ifdef YY_USE_PROTOS
2579 static void yy_fatal_error( yyconst char msg[] )
2581 static void yy_fatal_error( msg )
2585 (void) fprintf( stderr, "%s\n", msg );
2586 exit( YY_EXIT_FAILURE );
2591 /* Redefine yyless() so it works in section 3 code. */
2597 /* Undo effects of setting up yytext. */ \
2598 yytext[yyleng] = yy_hold_char; \
2599 yy_c_buf_p = yytext + n; \
2600 yy_hold_char = *yy_c_buf_p; \
2601 *yy_c_buf_p = '\0'; \
2607 /* Internal utility routines. */
2610 #ifdef YY_USE_PROTOS
2611 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2613 static void yy_flex_strncpy( s1, s2, n )
2620 for ( i = 0; i < n; ++i )
2625 #ifdef YY_NEED_STRLEN
2626 #ifdef YY_USE_PROTOS
2627 static int yy_flex_strlen( yyconst char *s )
2629 static int yy_flex_strlen( s )
2634 for ( n = 0; s[n]; ++n )
2642 #ifdef YY_USE_PROTOS
2643 static void *yy_flex_alloc( yy_size_t size )
2645 static void *yy_flex_alloc( size )
2649 return (void *) malloc( size );
2652 #ifdef YY_USE_PROTOS
2653 static void *yy_flex_realloc( void *ptr, yy_size_t size )
2655 static void *yy_flex_realloc( ptr, size )
2660 /* The cast to (char *) in the following accommodates both
2661 * implementations that use char* generic pointers, and those
2662 * that use void* generic pointers. It works with the latter
2663 * because both ANSI C and C++ allow castless assignment from
2664 * any pointer type to void*, and deal with argument conversions
2665 * as though doing an assignment.
2667 return (void *) realloc( (char *) ptr, size );
2670 #ifdef YY_USE_PROTOS
2671 static void yy_flex_free( void *ptr )
2673 static void yy_flex_free( ptr )