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[401] =
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 77, 86, 88, 77, 86, 88, 86, 88, 80, 86,
303 88, 80, 86, 88, 80, 86, 88, 80, 86, 88,
304 82, 86, 88, 86, 88, 86, 88, 86, 88, 80,
305 86, 88, 80, 86, 88, 80, 86, 88, 80, 86,
306 88, 80, 86, 88, 80, 86, 88, 80, 86, 88,
307 80, 86, 88, 80, 86, 88, 80, 86, 88, 80,
308 86, 88, 80, 86, 88, 83, 86, 88, 84, 86,
309 88, 9, 86, 88, 9, 86, 87, 88, 9, 86,
310 88, 9, 86, 88, 9, 86, 88, 14, 86, 88,
311 14, 86, 87, 88, 14, 86, 88, 14, 86, 88,
313 14, 86, 88, 17, 86, 88, 17, 86, 87, 88,
314 17, 86, 88, 21, 33, 25, 22, 41, 34, 43,
315 77, 23, 77, 77, 79, 80, 78, 80, 80, 80,
316 24, 81, 80, 80, 80, 80, 80, 80, 80, 80,
317 80, 80, 80, 80, 80, 80, 80, 80, 80, 80,
318 8, 6, 13, 10, 12, 11, 13, 16, 15, 3,
319 28, 32, 39, 35, 37, 18, 77, 19, 77, 77,
320 79, 79, 78, 80, 80, 80, 68, 20, 80, 80,
321 80, 80, 80, 80, 80, 63, 80, 80, 80, 80,
322 80, 80, 80, 80, 80, 80, 80, 80, 80, 11,
324 29, 30, 31, 40, 36, 38, 79, 80, 54, 80,
325 53, 80, 5, 80, 66, 80, 80, 80, 80, 58,
326 80, 80, 61, 80, 80, 80, 80, 80, 80, 80,
327 80, 80, 80, 80, 55, 80, 7, 51, 80, 53,
328 80, 67, 80, 80, 64, 80, 80, 80, 80, 80,
329 62, 80, 80, 80, 80, 57, 80, 80, 80, 80,
330 80, 65, 80, 80, 80, 80, 69, 80, 75, 80,
331 59, 80, 56, 80, 80, 80, 80, 80, 80, 70,
332 80, 80, 80, 74, 80, 73, 80, 80, 76, 80,
333 80, 60, 80, 72, 80, 71, 80, 2, 4, 52
337 static yyconst short int yy_accept[359] =
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, 109, 112, 115, 118, 121, 124,
345 126, 128, 130, 133, 136, 139, 142, 145, 148, 151,
346 154, 157, 160, 163, 166, 169, 172, 175, 179, 182,
347 185, 188, 191, 195, 198, 201, 204, 207, 211, 214,
348 215, 215, 215, 215, 215, 215, 215, 215, 216, 216,
350 217, 217, 217, 217, 217, 217, 218, 218, 219, 219,
351 219, 220, 221, 222, 223, 223, 223, 224, 224, 224,
352 225, 226, 227, 228, 229, 230, 231, 231, 232, 232,
353 232, 232, 233, 234, 235, 236, 237, 238, 239, 240,
354 241, 242, 243, 244, 245, 246, 247, 248, 249, 250,
355 251, 252, 252, 252, 252, 253, 253, 254, 254, 254,
356 254, 255, 256, 256, 258, 259, 260, 260, 261, 261,
357 261, 261, 262, 262, 262, 263, 263, 263, 263, 263,
358 264, 264, 264, 264, 265, 266, 266, 267, 267, 268,
359 268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
361 278, 278, 278, 279, 279, 279, 280, 281, 282, 283,
362 284, 285, 286, 288, 289, 290, 291, 292, 293, 294,
363 295, 296, 297, 298, 299, 300, 300, 301, 301, 301,
364 302, 302, 303, 304, 304, 304, 304, 305, 306, 307,
365 307, 308, 309, 311, 313, 313, 314, 315, 317, 318,
366 319, 320, 322, 323, 325, 326, 327, 328, 329, 330,
367 331, 332, 333, 334, 335, 337, 337, 338, 338, 338,
368 339, 339, 339, 339, 339, 339, 339, 340, 342, 344,
369 345, 347, 348, 349, 350, 351, 353, 354, 355, 356,
370 358, 359, 360, 360, 360, 360, 360, 360, 360, 361,
372 362, 364, 365, 366, 367, 369, 371, 373, 375, 376,
373 377, 377, 377, 377, 377, 377, 378, 379, 380, 382,
374 383, 384, 386, 386, 386, 386, 386, 386, 388, 389,
375 391, 392, 394, 394, 394, 394, 394, 394, 394, 396,
376 398, 398, 398, 398, 399, 399, 399, 399, 399, 400,
377 400, 400, 400, 400, 400, 400, 401, 401
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[384] =
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, 86,
429 78, 168, 99, 0, 823, 22, 49, 80, 849, 174,
430 93, 206, 50, 187, 78, 161, 176, 169, 183, 163,
431 188, 209, 175, 210, 849, 849, 849, 849, 827, 230,
432 236, 849, 849, 826, 249, 253, 836, 835, 105, 849,
433 834, 805, 238, 800, 220, 211, 206, 849, 789, 849,
435 0, 824, 225, 823, 822, 849, 827, 849, 261, 787,
436 849, 849, 254, 849, 825, 259, 270, 276, 0, 286,
437 808, 807, 806, 17, 262, 243, 811, 811, 819, 280,
438 791, 792, 271, 30, 214, 287, 288, 290, 292, 26,
439 294, 293, 295, 178, 297, 296, 298, 302, 299, 303,
440 849, 318, 322, 345, 849, 349, 849, 341, 353, 357,
441 849, 361, 805, 849, 849, 849, 815, 849, 770, 776,
442 762, 849, 783, 760, 849, 759, 772, 761, 783, 849,
443 799, 798, 797, 849, 849, 802, 849, 771, 353, 800,
444 849, 357, 0, 783, 782, 781, 338, 72, 342, 849,
446 374, 796, 849, 768, 365, 359, 365, 367, 368, 300,
447 369, 371, 778, 372, 373, 374, 375, 377, 379, 378,
448 380, 384, 382, 385, 388, 429, 849, 749, 278, 849,
449 761, 849, 849, 744, 754, 767, 849, 849, 849, 751,
450 771, 381, 770, 769, 433, 849, 399, 768, 394, 397,
451 386, 767, 411, 766, 393, 418, 423, 424, 425, 431,
452 87, 427, 428, 432, 765, 450, 849, 465, 469, 849,
453 740, 747, 750, 734, 0, 730, 441, 435, 759, 442,
454 758, 456, 437, 445, 460, 757, 461, 463, 464, 756,
455 468, 469, 725, 715, 698, 710, 716, 686, 471, 470,
457 678, 472, 473, 475, 664, 651, 643, 580, 479, 477,
458 451, 563, 550, 586, 560, 483, 484, 486, 575, 492,
459 488, 574, 549, 553, 514, 508, 527, 570, 501, 559,
460 496, 549, 522, 519, 532, 523, 540, 522, 534, 516,
461 502, 546, 554, 849, 539, 423, 558, 546, 849, 371,
462 564, 234, 568, 585, 541, 849, 849, 603, 611, 619,
463 627, 635, 643, 651, 659, 667, 670, 674, 678, 686,
464 694, 702, 710, 715, 718, 722, 729, 734, 741, 745,
468 static yyconst short int yy_def[384] =
470 358, 358, 359, 359, 360, 360, 361, 361, 357, 9,
471 9, 11, 362, 362, 363, 363, 364, 364, 357, 357,
472 357, 357, 357, 357, 357, 357, 357, 357, 357, 357,
473 357, 357, 357, 357, 357, 357, 357, 357, 357, 365,
474 357, 357, 357, 357, 357, 357, 357, 357, 366, 357,
475 357, 357, 357, 367, 368, 368, 368, 368, 357, 357,
476 357, 369, 368, 368, 368, 368, 368, 368, 368, 368,
477 368, 368, 368, 368, 357, 357, 357, 357, 357, 357,
478 357, 357, 357, 357, 357, 357, 357, 357, 357, 357,
479 370, 357, 357, 357, 357, 357, 357, 357, 357, 357,
481 371, 357, 357, 357, 357, 357, 372, 357, 357, 357,
482 357, 357, 357, 357, 373, 357, 357, 357, 374, 357,
483 375, 368, 376, 368, 368, 368, 357, 357, 377, 357,
484 378, 357, 368, 368, 368, 368, 368, 368, 368, 368,
485 368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
486 357, 357, 357, 357, 357, 379, 357, 357, 357, 357,
487 357, 357, 357, 357, 357, 357, 370, 357, 357, 357,
488 357, 357, 357, 357, 357, 357, 357, 357, 357, 357,
489 357, 357, 357, 357, 357, 372, 357, 357, 357, 373,
490 357, 357, 374, 375, 380, 376, 368, 368, 368, 357,
492 357, 377, 357, 378, 369, 368, 368, 368, 368, 368,
493 368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
494 368, 368, 368, 368, 368, 381, 357, 357, 357, 357,
495 357, 357, 357, 357, 357, 357, 357, 357, 357, 357,
496 380, 368, 368, 368, 357, 357, 368, 368, 368, 368,
497 368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
498 368, 368, 368, 368, 368, 357, 357, 381, 357, 357,
499 357, 357, 357, 357, 382, 357, 368, 368, 368, 368,
500 368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
501 368, 368, 357, 357, 357, 357, 357, 357, 368, 368,
503 368, 368, 368, 368, 368, 368, 368, 368, 368, 368,
504 357, 357, 357, 357, 357, 368, 368, 368, 368, 368,
505 368, 368, 357, 357, 357, 357, 357, 368, 368, 368,
506 368, 368, 357, 357, 357, 357, 357, 357, 368, 368,
507 357, 357, 357, 357, 383, 357, 357, 383, 357, 357,
508 357, 357, 357, 357, 357, 357, 0, 357, 357, 357,
509 357, 357, 357, 357, 357, 357, 357, 357, 357, 357,
510 357, 357, 357, 357, 357, 357, 357, 357, 357, 357,
514 static yyconst short int yy_nxt[904] =
516 357, 21, 22, 23, 21, 26, 22, 23, 26, 30,
517 31, 27, 90, 24, 91, 30, 31, 24, 32, 35,
518 36, 106, 37, 107, 32, 38, 46, 47, 109, 48,
519 39, 109, 25, 22, 78, 123, 25, 33, 46, 47,
520 123, 48, 79, 93, 123, 40, 93, 197, 123, 28,
521 22, 83, 49, 80, 22, 78, 80, 22, 88, 84,
522 207, 124, 102, 81, 49, 110, 89, 123, 123, 41,
523 42, 35, 36, 213, 37, 43, 44, 38, 85, 22,
524 83, 85, 39, 22, 88, 103, 95, 94, 86, 114,
525 123, 115, 89, 96, 125, 133, 123, 40, 123, 97,
527 113, 113, 113, 113, 128, 123, 129, 165, 98, 104,
528 105, 116, 243, 120, 120, 120, 120, 126, 166, 289,
529 137, 41, 42, 20, 21, 22, 23, 21, 20, 20,
530 20, 20, 20, 20, 20, 50, 51, 52, 53, 53,
531 53, 54, 20, 20, 55, 55, 55, 55, 55, 55,
532 20, 20, 20, 55, 55, 56, 55, 55, 57, 55,
533 55, 55, 55, 55, 55, 55, 55, 55, 55, 55,
534 58, 55, 55, 55, 55, 59, 20, 60, 61, 123,
535 116, 123, 117, 117, 117, 118, 127, 123, 113, 113,
536 113, 113, 62, 123, 123, 63, 123, 64, 65, 66,
538 67, 123, 138, 68, 69, 123, 123, 70, 71, 218,
539 140, 72, 142, 73, 74, 139, 148, 75, 76, 119,
540 130, 130, 130, 130, 134, 141, 135, 123, 123, 136,
541 181, 152, 123, 143, 152, 132, 144, 154, 155, 93,
542 156, 153, 93, 176, 208, 173, 145, 146, 149, 151,
543 158, 177, 150, 158, 160, 161, 147, 162, 174, 170,
544 159, 123, 109, 175, 163, 109, 164, 171, 189, 189,
545 189, 189, 172, 192, 192, 192, 192, 182, 183, 176,
546 123, 199, 116, 94, 117, 117, 117, 118, 116, 123,
547 118, 118, 118, 118, 130, 130, 130, 130, 116, 110,
549 120, 120, 120, 120, 198, 123, 123, 206, 123, 132,
550 123, 123, 123, 123, 123, 123, 123, 123, 123, 152,
551 123, 123, 152, 154, 155, 271, 156, 215, 209, 153,
552 172, 251, 220, 216, 212, 214, 210, 217, 211, 219,
553 222, 225, 158, 221, 224, 158, 154, 155, 223, 154,
554 154, 155, 159, 154, 160, 161, 123, 162, 160, 161,
555 123, 160, 160, 161, 163, 160, 227, 189, 189, 189,
556 189, 192, 192, 192, 192, 245, 246, 123, 245, 130,
557 130, 130, 130, 123, 242, 123, 123, 123, 244, 123,
558 123, 123, 123, 123, 132, 123, 123, 123, 123, 123,
560 123, 253, 123, 123, 123, 352, 123, 247, 254, 252,
561 248, 123, 123, 249, 250, 123, 258, 123, 255, 260,
562 263, 265, 257, 256, 259, 280, 262, 244, 261, 123,
563 266, 267, 264, 266, 245, 246, 123, 245, 282, 277,
564 278, 123, 123, 123, 279, 123, 123, 269, 283, 123,
565 123, 266, 267, 123, 266, 123, 350, 284, 281, 123,
566 123, 287, 285, 123, 291, 288, 266, 267, 290, 266,
567 266, 267, 286, 266, 123, 299, 301, 304, 123, 123,
568 292, 123, 123, 269, 303, 300, 123, 123, 123, 123,
569 123, 123, 305, 123, 302, 123, 307, 123, 323, 310,
571 306, 123, 123, 175, 123, 318, 123, 319, 317, 309,
572 123, 308, 316, 321, 123, 335, 322, 329, 335, 123,
573 330, 332, 320, 336, 337, 337, 331, 345, 338, 340,
574 328, 338, 346, 335, 123, 339, 335, 343, 343, 343,
575 343, 345, 355, 356, 349, 355, 342, 342, 342, 342,
576 344, 349, 123, 341, 343, 343, 343, 343, 347, 349,
577 342, 342, 342, 342, 344, 174, 349, 123, 343, 343,
578 343, 343, 351, 351, 351, 351, 353, 123, 351, 351,
579 351, 351, 354, 354, 354, 354, 355, 356, 123, 355,
580 334, 333, 123, 123, 327, 326, 325, 324, 123, 354,
582 354, 354, 354, 20, 20, 20, 20, 20, 20, 20,
583 20, 29, 29, 29, 29, 29, 29, 29, 29, 34,
584 34, 34, 34, 34, 34, 34, 34, 45, 45, 45,
585 45, 45, 45, 45, 45, 77, 77, 77, 77, 77,
586 77, 77, 77, 82, 82, 82, 82, 82, 82, 82,
587 82, 87, 87, 87, 87, 87, 87, 87, 87, 108,
588 108, 123, 108, 108, 108, 108, 108, 112, 112, 123,
589 112, 112, 112, 112, 112, 121, 121, 122, 122, 122,
590 122, 131, 123, 131, 131, 131, 167, 167, 167, 167,
591 167, 167, 167, 167, 179, 179, 123, 179, 179, 179,
593 179, 179, 186, 186, 186, 186, 186, 186, 186, 186,
594 190, 190, 190, 190, 190, 190, 190, 190, 193, 315,
595 193, 194, 194, 194, 194, 196, 196, 196, 196, 202,
596 202, 202, 202, 202, 202, 202, 202, 204, 314, 204,
597 204, 204, 226, 226, 313, 312, 226, 226, 241, 241,
598 241, 241, 268, 268, 268, 268, 268, 268, 297, 297,
599 311, 297, 297, 297, 297, 297, 348, 348, 171, 348,
600 348, 348, 348, 348, 123, 123, 123, 123, 298, 296,
601 295, 294, 293, 123, 123, 123, 123, 123, 123, 195,
602 276, 275, 274, 273, 272, 270, 123, 132, 203, 123,
604 195, 195, 191, 240, 187, 239, 238, 237, 236, 235,
605 234, 233, 232, 231, 230, 229, 228, 168, 227, 205,
606 132, 203, 201, 200, 123, 123, 195, 191, 188, 187,
607 185, 184, 180, 178, 99, 169, 168, 165, 165, 157,
608 151, 123, 111, 101, 100, 99, 92, 357, 19, 357,
609 357, 357, 357, 357, 357, 357, 357, 357, 357, 357,
610 357, 357, 357, 357, 357, 357, 357, 357, 357, 357,
611 357, 357, 357, 357, 357, 357, 357, 357, 357, 357,
612 357, 357, 357, 357, 357, 357, 357, 357, 357, 357,
613 357, 357, 357, 357, 357, 357, 357, 357, 357, 357,
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, 124, 2, 4, 8, 8,
624 56, 8, 13, 26, 140, 5, 26, 124, 134, 2,
625 15, 15, 7, 14, 14, 14, 14, 17, 17, 15,
626 134, 56, 38, 14, 8, 43, 17, 57, 63, 5,
627 5, 6, 6, 140, 6, 6, 6, 6, 16, 16,
628 16, 16, 6, 18, 18, 38, 27, 26, 16, 51,
629 198, 51, 18, 27, 57, 63, 65, 6, 58, 27,
631 50, 50, 50, 50, 61, 261, 61, 89, 27, 38,
632 38, 53, 198, 53, 53, 53, 53, 58, 89, 261,
633 65, 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, 66,
639 52, 70, 52, 52, 52, 52, 60, 68, 60, 60,
640 60, 60, 11, 73, 67, 11, 144, 11, 11, 11,
642 11, 69, 66, 11, 11, 64, 71, 11, 11, 144,
643 68, 11, 70, 11, 11, 67, 73, 11, 11, 52,
644 62, 62, 62, 62, 64, 69, 64, 72, 74, 64,
645 103, 80, 135, 71, 80, 62, 71, 81, 81, 93,
646 81, 80, 93, 97, 135, 96, 72, 72, 74, 81,
647 85, 97, 74, 85, 86, 86, 72, 86, 96, 95,
648 85, 126, 109, 96, 86, 109, 86, 95, 113, 113,
649 113, 113, 95, 116, 116, 116, 116, 103, 103, 352,
650 125, 126, 117, 93, 117, 117, 117, 117, 118, 133,
651 118, 118, 118, 118, 130, 130, 130, 130, 120, 109,
653 120, 120, 120, 120, 125, 136, 137, 133, 138, 130,
654 139, 142, 141, 143, 146, 145, 147, 149, 210, 152,
655 148, 150, 152, 153, 153, 229, 153, 142, 136, 152,
656 229, 210, 146, 143, 139, 141, 137, 143, 138, 145,
657 148, 150, 158, 147, 149, 158, 154, 154, 148, 154,
658 156, 156, 158, 156, 159, 159, 197, 159, 160, 160,
659 199, 160, 162, 162, 159, 162, 159, 189, 189, 189,
660 189, 192, 192, 192, 192, 201, 201, 206, 201, 205,
661 205, 205, 205, 207, 197, 208, 209, 211, 199, 212,
662 214, 215, 216, 217, 205, 218, 220, 219, 221, 242,
664 223, 212, 222, 224, 251, 350, 225, 206, 214, 211,
665 207, 255, 249, 208, 209, 250, 218, 247, 215, 220,
666 223, 225, 217, 216, 219, 251, 222, 242, 221, 253,
667 226, 226, 224, 226, 245, 245, 256, 245, 255, 247,
668 249, 257, 258, 259, 250, 262, 263, 226, 256, 260,
669 264, 266, 266, 278, 266, 283, 346, 257, 253, 277,
670 280, 260, 258, 284, 263, 260, 268, 268, 262, 268,
671 269, 269, 259, 269, 282, 277, 280, 284, 285, 287,
672 264, 288, 289, 268, 283, 278, 291, 292, 300, 299,
673 302, 303, 285, 304, 282, 310, 288, 309, 311, 292,
675 287, 316, 317, 311, 318, 302, 321, 303, 300, 291,
676 320, 289, 299, 309, 331, 325, 310, 317, 325, 329,
677 318, 321, 304, 326, 326, 326, 320, 338, 327, 331,
678 316, 327, 341, 335, 340, 329, 335, 336, 336, 336,
679 336, 338, 355, 355, 345, 355, 335, 335, 335, 335,
680 337, 348, 339, 334, 337, 337, 337, 337, 342, 345,
681 342, 342, 342, 342, 343, 333, 348, 332, 343, 343,
682 343, 343, 347, 347, 347, 347, 351, 330, 351, 351,
683 351, 351, 353, 353, 353, 353, 354, 354, 328, 354,
684 324, 323, 322, 319, 315, 314, 313, 312, 308, 354,
686 354, 354, 354, 358, 358, 358, 358, 358, 358, 358,
687 358, 359, 359, 359, 359, 359, 359, 359, 359, 360,
688 360, 360, 360, 360, 360, 360, 360, 361, 361, 361,
689 361, 361, 361, 361, 361, 362, 362, 362, 362, 362,
690 362, 362, 362, 363, 363, 363, 363, 363, 363, 363,
691 363, 364, 364, 364, 364, 364, 364, 364, 364, 365,
692 365, 307, 365, 365, 365, 365, 365, 366, 366, 306,
693 366, 366, 366, 366, 366, 367, 367, 368, 368, 368,
694 368, 369, 305, 369, 369, 369, 370, 370, 370, 370,
695 370, 370, 370, 370, 371, 371, 301, 371, 371, 371,
697 371, 371, 372, 372, 372, 372, 372, 372, 372, 372,
698 373, 373, 373, 373, 373, 373, 373, 373, 374, 298,
699 374, 375, 375, 375, 375, 376, 376, 376, 376, 377,
700 377, 377, 377, 377, 377, 377, 377, 378, 297, 378,
701 378, 378, 379, 379, 296, 295, 379, 379, 380, 380,
702 380, 380, 381, 381, 381, 381, 381, 381, 382, 382,
703 294, 382, 382, 382, 382, 382, 383, 383, 293, 383,
704 383, 383, 383, 383, 290, 286, 281, 279, 276, 274,
705 273, 272, 271, 265, 254, 252, 248, 244, 243, 241,
706 240, 236, 235, 234, 231, 228, 213, 204, 202, 196,
708 195, 194, 190, 188, 186, 183, 182, 181, 179, 178,
709 177, 176, 174, 173, 171, 170, 169, 167, 163, 132,
710 131, 129, 128, 127, 123, 122, 121, 115, 110, 107,
711 105, 104, 102, 99, 94, 92, 91, 88, 87, 84,
712 79, 55, 44, 33, 32, 28, 25, 19, 357, 357,
713 357, 357, 357, 357, 357, 357, 357, 357, 357, 357,
714 357, 357, 357, 357, 357, 357, 357, 357, 357, 357,
715 357, 357, 357, 357, 357, 357, 357, 357, 357, 357,
716 357, 357, 357, 357, 357, 357, 357, 357, 357, 357,
717 357, 357, 357, 357, 357, 357, 357, 357, 357, 357,
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));
821 /* Ugly warning avoiding */
830 #define C_CODE_STRING 3
834 #define CLASS_CODE_I 5
836 #define GTK_DOC_BEFORE_NAME 6
840 #define GTK_DOC_LINE 8
844 /* Macros after this point can all be overridden by user definitions in
848 #ifndef YY_SKIP_YYWRAP
850 extern "C" int yywrap YY_PROTO(( void ));
852 extern int yywrap YY_PROTO(( void ));
857 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
861 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
864 #ifdef YY_NEED_STRLEN
865 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
870 static int yyinput YY_PROTO(( void ));
872 static int input YY_PROTO(( void ));
877 static int yy_start_stack_ptr = 0;
878 static int yy_start_stack_depth = 0;
879 static int *yy_start_stack = 0;
880 #ifndef YY_NO_PUSH_STATE
881 static void yy_push_state YY_PROTO(( int new_state ));
883 #ifndef YY_NO_POP_STATE
884 static void yy_pop_state YY_PROTO(( void ));
886 #ifndef YY_NO_TOP_STATE
887 static int yy_top_state YY_PROTO(( void ));
891 #define YY_NO_PUSH_STATE 1
892 #define YY_NO_POP_STATE 1
893 #define YY_NO_TOP_STATE 1
896 #ifdef YY_MALLOC_DECL
904 /* Just try to get by without declaring the routines. This will fail
905 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
906 * or sizeof(void*) != sizeof(int).
911 /* Amount of stuff to slurp up with each read. */
912 #ifndef YY_READ_BUF_SIZE
913 #define YY_READ_BUF_SIZE 8192
916 /* Copy whatever the last rule matched to the standard output. */
919 /* This used to be an fputs(), but since the string might contain NUL's,
920 * we now use fwrite().
922 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
925 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
926 * is returned in "result".
929 #define YY_INPUT(buf,result,max_size) \
930 if ( yy_current_buffer->yy_is_interactive ) \
933 for ( n = 0; n < max_size && \
934 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
937 buf[n++] = (char) c; \
938 if ( c == EOF && ferror( yyin ) ) \
939 YY_FATAL_ERROR( "input in flex scanner failed" ); \
942 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
943 && ferror( yyin ) ) \
944 YY_FATAL_ERROR( "input in flex scanner failed" );
947 /* No semi-colon after return; correct usage is to write "yyterminate();" -
948 * we don't want an extra ';' after the "return" because that will cause
949 * some compilers to complain about unreachable statements.
952 #define yyterminate() return YY_NULL
955 /* Number of entries by which start-condition stack grows. */
956 #ifndef YY_START_STACK_INCR
957 #define YY_START_STACK_INCR 25
960 /* Report a fatal error. */
961 #ifndef YY_FATAL_ERROR
962 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
965 /* Default declaration of generated scanner - a define so the user can
966 * easily add parameters.
969 #define YY_DECL int yylex YY_PROTO(( void ))
972 /* Code executed at the beginning of each rule, after yytext and yyleng
975 #ifndef YY_USER_ACTION
976 #define YY_USER_ACTION
979 /* Code executed at the end of each rule. */
981 #define YY_BREAK break;
984 #define YY_RULE_SETUP \
986 yy_current_buffer->yy_at_bol = \
987 (yytext[yyleng - 1] == '\n'); \
992 register yy_state_type yy_current_state;
993 register char *yy_cp = NULL, *yy_bp = NULL;
999 #line 1000 "lex.yy.c"
1010 yy_start = 1; /* first start state */
1018 if ( ! yy_current_buffer )
1020 yy_create_buffer( yyin, YY_BUF_SIZE );
1022 yy_load_buffer_state();
1025 while ( 1 ) /* loops until end-of-file is reached */
1029 /* Support of yytext. */
1030 *yy_cp = yy_hold_char;
1032 /* yy_bp points to the position in yy_ch_buf of the start of
1037 yy_current_state = yy_start;
1038 yy_current_state += YY_AT_BOL();
1039 yy_state_ptr = yy_state_buf;
1040 *yy_state_ptr++ = yy_current_state;
1044 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1045 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1047 yy_current_state = (int) yy_def[yy_current_state];
1048 if ( yy_current_state >= 358 )
1049 yy_c = yy_meta[(unsigned int) yy_c];
1051 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1052 *yy_state_ptr++ = yy_current_state;
1055 while ( yy_base[yy_current_state] != 849 );
1058 yy_current_state = *--yy_state_ptr;
1059 yy_lp = yy_accept[yy_current_state];
1060 find_rule: /* we branch to this label when backing up */
1061 for ( ; ; ) /* until we find what rule we matched */
1063 if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
1065 yy_act = yy_acclist[yy_lp];
1067 yy_full_match = yy_cp;
1072 yy_current_state = *--yy_state_ptr;
1073 yy_lp = yy_accept[yy_current_state];
1076 YY_DO_BEFORE_ACTION;
1079 do_action: /* This label is used only to access EOF actions. */
1083 { /* beginning of action switch */
1087 { line_no++; REJECT; }
1090 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1091 yy_c_buf_p = yy_cp -= 1;
1092 YY_DO_BEFORE_ACTION; /* set up yytext again */
1096 /* Thy evil easter egg */
1097 #define QQ(x) long x
1098 #define KK(x) =atoi(__(&,,x,))
1099 #define MM(x,a) {QQ(i);for(i=2;i<x;i++){a}}
1100 #define PP(Q) (P%Q)==0
1101 #define ___(x,y,z) if(x z y)
1102 #define __(a,x,y,z) a(yytext[y] x z)
1103 #define O__O(a,b) fprintf(stderr,"%s is %s!\n",a,b)
1104 QQ(m)=1;___(__(,==,2,'P'),__(,==,5,'M'),&&
1105 ){QQ(P)KK(8);MM(P,___(PP(i),,)m=0;)}__(,=,
1106 7,0);___(,,m){O__O(__( &,,8,),__(&,,2,));}
1118 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1119 yy_c_buf_p = yy_cp -= 1;
1120 YY_DO_BEFORE_ACTION; /* set up yytext again */
1123 { ; /*comment, ignore*/ }
1129 if(look_for_includes==1) {
1132 char *str = g_strdup(yytext);
1133 file = strchr(str,'"');
1134 if(!file) file = strchr(str,'<');
1136 p = strchr(file,'"');
1137 if(!p) p = strchr(file,'>');
1139 include_files = g_list_prepend(include_files,g_strdup(file));
1146 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1147 yy_c_buf_p = yy_cp -= 1;
1148 YY_DO_BEFORE_ACTION; /* set up yytext again */
1152 /* eat out gtk doc stuff */
1153 BEGIN(GTK_DOC_BEFORE_NAME);
1158 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1159 yy_c_buf_p = yy_cp -= 1;
1160 YY_DO_BEFORE_ACTION; /* set up yytext again */
1164 /* empty doc lines */
1169 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1170 yy_c_buf_p = yy_cp -= 1;
1171 YY_DO_BEFORE_ACTION; /* set up yytext again */
1177 p = strchr(yytext, '*');
1178 g_free(gtk_doc_func);
1179 gtk_doc_func = g_strdup(p+2);
1180 p = strchr(gtk_doc_func, ':');
1182 g_strstrip(gtk_doc_func);
1189 BEGIN(CLASS_CODE_I);
1197 before_comment = CLASS_CODE_I;
1201 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1202 yy_c_buf_p = yy_cp -= 1;
1203 YY_DO_BEFORE_ACTION; /* set up yytext again */
1207 /* empty doc lines */
1208 add_to_cbuf(" *\n");
1215 BEGIN(CLASS_CODE_I);
1225 BEGIN(GTK_DOC_LINE);
1232 BEGIN(CLASS_CODE_I);
1240 before_comment = CLASS_CODE_I;
1247 BEGIN(CLASS_CODE_I);
1253 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1254 yy_c_buf_p = yy_cp -= 1;
1255 YY_DO_BEFORE_ACTION; /* set up yytext again */
1260 add_to_cbuf(yytext);
1269 add_to_cbuf(yytext);
1273 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1274 yy_c_buf_p = yy_cp -= 1;
1275 YY_DO_BEFORE_ACTION; /* set up yytext again */
1278 { add_to_cbuf(yytext); /*comment, ignore*/ }
1281 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1282 yy_c_buf_p = yy_cp -= 1;
1283 YY_DO_BEFORE_ACTION; /* set up yytext again */
1286 { ; /*comment, ignore*/ }
1289 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1290 yy_c_buf_p = yy_cp -= 1;
1291 YY_DO_BEFORE_ACTION; /* set up yytext again */
1294 { ; /*comment, ignore*/ }
1299 {BEGIN(COMMENT); before_comment = INITIAL; }
1305 add_to_cbuf(yytext);
1307 before_comment = C_CODE;
1313 {BEGIN(COMMENT); before_comment = CLASS_CODE; }
1318 {BEGIN(COMMENT); before_comment = CLASS_CODE_I; }
1324 if(before_comment == C_CODE) add_to_cbuf(yytext);
1325 BEGIN(before_comment);
1332 /* comment, ignore */
1333 if(before_comment == C_CODE) add_to_cbuf(yytext);
1340 /* comment, ignore */
1341 if(before_comment == C_CODE) add_to_cbuf(yytext);
1350 class_after_c = FALSE;
1353 ccode_line = line_no;
1362 class_after_c = FALSE;
1365 ccode_line = line_no;
1374 class_after_c = FALSE;
1377 ccode_line = line_no;
1386 class_after_c = FALSE;
1389 ccode_line = line_no;
1398 class_after_c = FALSE;
1401 ccode_line = line_no;
1410 class_after_c = FALSE;
1413 ccode_line = line_no;
1414 if(look_for_includes==0)
1415 look_for_includes=1;
1425 if(look_for_includes==1)
1426 look_for_includes=0;
1433 { add_to_cbuf(yytext); }
1438 { add_to_cbuf(yytext); }
1443 { add_to_cbuf(yytext); }
1448 { add_to_cbuf(yytext); }
1453 { add_to_cbuf(yytext); }
1458 { add_to_cbuf(yytext); }
1463 { add_to_cbuf(yytext); }
1469 BEGIN(C_CODE_STRING);
1470 add_to_cbuf(yytext);
1476 { add_to_cbuf(yytext); }
1483 add_to_cbuf(yytext);
1489 { add_to_cbuf(yytext); }
1494 { add_to_cbuf(yytext); }
1501 add_to_cbuf(yytext);
1509 if(parenth_depth<0) {
1511 } else if(parenth_depth==0 && class_after_c) {
1512 BEGIN(CLASS_CODE_I);
1517 add_to_cbuf(yytext);
1523 { add_to_cbuf(yytext); }
1528 { add_to_cbuf(yytext); }
1534 static int found_classes = 0;
1535 look_for_includes = 2;
1538 if(++found_classes > 1) {
1539 error_print(GOB_ERROR, line_no,
1540 "Only one class per file allowed");
1547 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1548 yy_c_buf_p = yy_cp -= 1;
1549 YY_DO_BEFORE_ACTION; /* set up yytext again */
1553 int maj = 0,min = 0,pl = 0;
1554 int rmaj = 0,rmin = 0,rpl = 0;
1555 int effective_maj = 0;
1556 int effective_rmaj = 0;
1559 sscanf(VERSION,"%d.%d.%d",&rmaj,&rmin,&rpl);
1560 effective_rmaj = rmaj;
1562 effective_rmaj = rmaj + 1;
1564 p = strchr(yytext,'r');
1565 g_assert(p); /* we MUST have found it */
1566 sscanf(p,"requires %d.%d.%d",&maj,&min,&pl);
1567 effective_maj = maj;
1569 effective_maj = maj + 1;
1572 (rmaj == maj && rmin < min) ||
1573 (rmaj == maj && rmin == min && rpl < pl)) {
1574 error_printf(GOB_ERROR, line_no,
1575 "GOB version at least %d.%d.%d required "
1577 "To upgrade your gob, see: "
1578 "http://www.5z.com/jirka/gob.html",
1579 maj, min, pl, VERSION);
1582 if(effective_rmaj != effective_maj) {
1583 error_printf(GOB_ERROR, line_no,
1584 "GOB major version %d required "
1586 "To upgrade your gob, see: "
1587 "http://www.5z.com/jirka/gob.html",
1597 error_printf(GOB_WARN, line_no,
1598 "'%s' keyword should not "
1599 "be used when generating "
1600 "C++ code", yytext);
1683 {yylval.line = line_no; return PUBLIC;}
1688 {yylval.line = line_no; return PRIVATE;}
1693 {yylval.line = line_no; return PROTECTED;}
1698 {yylval.line = line_no; return CLASSWIDE;}
1703 {yylval.line = line_no; return ARGUMENT;}
1708 {yylval.line = line_no; return VIRTUAL;}
1713 {yylval.line = line_no; return SIGNAL;}
1718 {yylval.line = line_no; return OVERRIDE;}
1724 yylval.id = g_strdup(yytext);
1732 /* this one is for a classname with a namespace */
1733 yylval.id = g_strdup(yytext);
1741 /* this is for a classname with an empty namespace */
1742 yylval.id = g_strdup(yytext);
1750 yylval.id = g_strdup(yytext);
1758 yylval.id = g_strdup(yytext);
1766 BEGIN(CLASS_CODE_I);
1776 class_after_c = TRUE;
1777 yylval.line = line_no;
1779 ccode_line = line_no;
1800 yylval.line = line_no;
1814 #line 1815 "lex.yy.c"
1815 case YY_STATE_EOF(INITIAL):
1816 case YY_STATE_EOF(COMMENT):
1817 case YY_STATE_EOF(C_CODE):
1818 case YY_STATE_EOF(C_CODE_STRING):
1819 case YY_STATE_EOF(CLASS_CODE):
1820 case YY_STATE_EOF(CLASS_CODE_I):
1821 case YY_STATE_EOF(GTK_DOC_BEFORE_NAME):
1822 case YY_STATE_EOF(GTK_DOC):
1823 case YY_STATE_EOF(GTK_DOC_LINE):
1826 case YY_END_OF_BUFFER:
1828 /* Amount of text matched not including the EOB char. */
1829 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1831 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1832 *yy_cp = yy_hold_char;
1833 YY_RESTORE_YY_MORE_OFFSET
1835 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1837 /* We're scanning a new file or input source. It's
1838 * possible that this happened because the user
1839 * just pointed yyin at a new source and called
1840 * yylex(). If so, then we have to assure
1841 * consistency between yy_current_buffer and our
1842 * globals. Here is the right place to do so, because
1843 * this is the first action (other than possibly a
1844 * back-up) that will match for the new input source.
1846 yy_n_chars = yy_current_buffer->yy_n_chars;
1847 yy_current_buffer->yy_input_file = yyin;
1848 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1851 /* Note that here we test for yy_c_buf_p "<=" to the position
1852 * of the first EOB in the buffer, since yy_c_buf_p will
1853 * already have been incremented past the NUL character
1854 * (since all states make transitions on EOB to the
1855 * end-of-buffer state). Contrast this with the test
1858 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1859 { /* This was really a NUL. */
1860 yy_state_type yy_next_state;
1862 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1864 yy_current_state = yy_get_previous_state();
1866 /* Okay, we're now positioned to make the NUL
1867 * transition. We couldn't have
1868 * yy_get_previous_state() go ahead and do it
1869 * for us because it doesn't know how to deal
1870 * with the possibility of jamming (and we don't
1871 * want to build jamming into it because then it
1872 * will run more slowly).
1875 yy_next_state = yy_try_NUL_trans( yy_current_state );
1877 yy_bp = yytext_ptr + YY_MORE_ADJ;
1879 if ( yy_next_state )
1881 /* Consume the NUL. */
1882 yy_cp = ++yy_c_buf_p;
1883 yy_current_state = yy_next_state;
1890 goto yy_find_action;
1894 else switch ( yy_get_next_buffer() )
1896 case EOB_ACT_END_OF_FILE:
1898 yy_did_buffer_switch_on_eof = 0;
1902 /* Note: because we've taken care in
1903 * yy_get_next_buffer() to have set up
1904 * yytext, we can now set up
1905 * yy_c_buf_p so that if some total
1906 * hoser (like flex itself) wants to
1907 * call the scanner after we return the
1908 * YY_NULL, it'll still work - another
1909 * YY_NULL will get returned.
1911 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1913 yy_act = YY_STATE_EOF(YY_START);
1919 if ( ! yy_did_buffer_switch_on_eof )
1925 case EOB_ACT_CONTINUE_SCAN:
1927 yytext_ptr + yy_amount_of_matched_text;
1929 yy_current_state = yy_get_previous_state();
1932 yy_bp = yytext_ptr + YY_MORE_ADJ;
1935 case EOB_ACT_LAST_MATCH:
1937 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1939 yy_current_state = yy_get_previous_state();
1942 yy_bp = yytext_ptr + YY_MORE_ADJ;
1943 goto yy_find_action;
1950 "fatal flex scanner internal error--no action found" );
1951 } /* end of action switch */
1952 } /* end of scanning one token */
1953 } /* end of yylex */
1956 /* yy_get_next_buffer - try to read in a new buffer
1958 * Returns a code representing an action:
1959 * EOB_ACT_LAST_MATCH -
1960 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1961 * EOB_ACT_END_OF_FILE - end of file
1964 static int yy_get_next_buffer()
1966 register char *dest = yy_current_buffer->yy_ch_buf;
1967 register char *source = yytext_ptr;
1968 register int number_to_move, i;
1971 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1973 "fatal flex scanner internal error--end of buffer missed" );
1975 if ( yy_current_buffer->yy_fill_buffer == 0 )
1976 { /* Don't try to fill the buffer, so this is an EOF. */
1977 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1979 /* We matched a single character, the EOB, so
1980 * treat this as a final EOF.
1982 return EOB_ACT_END_OF_FILE;
1987 /* We matched some text prior to the EOB, first
1990 return EOB_ACT_LAST_MATCH;
1994 /* Try to read more data. */
1996 /* First move last chars to start of buffer. */
1997 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1999 for ( i = 0; i < number_to_move; ++i )
2000 *(dest++) = *(source++);
2002 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2003 /* don't do the read, it's not guaranteed to return an EOF,
2006 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
2011 yy_current_buffer->yy_buf_size - number_to_move - 1;
2013 while ( num_to_read <= 0 )
2014 { /* Not enough room in the buffer - grow it. */
2015 #ifdef YY_USES_REJECT
2017 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
2020 /* just a shorter name for the current buffer */
2021 YY_BUFFER_STATE b = yy_current_buffer;
2023 int yy_c_buf_p_offset =
2024 (int) (yy_c_buf_p - b->yy_ch_buf);
2026 if ( b->yy_is_our_buffer )
2028 int new_size = b->yy_buf_size * 2;
2030 if ( new_size <= 0 )
2031 b->yy_buf_size += b->yy_buf_size / 8;
2033 b->yy_buf_size *= 2;
2035 b->yy_ch_buf = (char *)
2036 /* Include room in for 2 EOB chars. */
2037 yy_flex_realloc( (void *) b->yy_ch_buf,
2038 b->yy_buf_size + 2 );
2041 /* Can't grow it, we don't own it. */
2044 if ( ! b->yy_ch_buf )
2046 "fatal error - scanner input buffer overflow" );
2048 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2050 num_to_read = yy_current_buffer->yy_buf_size -
2055 if ( num_to_read > YY_READ_BUF_SIZE )
2056 num_to_read = YY_READ_BUF_SIZE;
2058 /* Read in more data. */
2059 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
2060 yy_n_chars, num_to_read );
2062 yy_current_buffer->yy_n_chars = yy_n_chars;
2065 if ( yy_n_chars == 0 )
2067 if ( number_to_move == YY_MORE_ADJ )
2069 ret_val = EOB_ACT_END_OF_FILE;
2075 ret_val = EOB_ACT_LAST_MATCH;
2076 yy_current_buffer->yy_buffer_status =
2077 YY_BUFFER_EOF_PENDING;
2082 ret_val = EOB_ACT_CONTINUE_SCAN;
2084 yy_n_chars += number_to_move;
2085 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
2086 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
2088 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
2094 /* yy_get_previous_state - get the state just before the EOB char was reached */
2096 static yy_state_type yy_get_previous_state()
2098 register yy_state_type yy_current_state;
2099 register char *yy_cp;
2101 yy_current_state = yy_start;
2102 yy_current_state += YY_AT_BOL();
2103 yy_state_ptr = yy_state_buf;
2104 *yy_state_ptr++ = yy_current_state;
2106 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
2108 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2109 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2111 yy_current_state = (int) yy_def[yy_current_state];
2112 if ( yy_current_state >= 358 )
2113 yy_c = yy_meta[(unsigned int) yy_c];
2115 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2116 *yy_state_ptr++ = yy_current_state;
2119 return yy_current_state;
2123 /* yy_try_NUL_trans - try to make a transition on the NUL character
2126 * next_state = yy_try_NUL_trans( current_state );
2129 #ifdef YY_USE_PROTOS
2130 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
2132 static yy_state_type yy_try_NUL_trans( yy_current_state )
2133 yy_state_type yy_current_state;
2136 register int yy_is_jam;
2138 register YY_CHAR yy_c = 1;
2139 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2141 yy_current_state = (int) yy_def[yy_current_state];
2142 if ( yy_current_state >= 358 )
2143 yy_c = yy_meta[(unsigned int) yy_c];
2145 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2146 yy_is_jam = (yy_current_state == 357);
2148 *yy_state_ptr++ = yy_current_state;
2150 return yy_is_jam ? 0 : yy_current_state;
2155 #ifdef YY_USE_PROTOS
2156 static void yyunput( int c, register char *yy_bp )
2158 static void yyunput( c, yy_bp )
2160 register char *yy_bp;
2163 register char *yy_cp = yy_c_buf_p;
2165 /* undo effects of setting up yytext */
2166 *yy_cp = yy_hold_char;
2168 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2169 { /* need to shift things up to make room */
2170 /* +2 for EOB chars. */
2171 register int number_to_move = yy_n_chars + 2;
2172 register char *dest = &yy_current_buffer->yy_ch_buf[
2173 yy_current_buffer->yy_buf_size + 2];
2174 register char *source =
2175 &yy_current_buffer->yy_ch_buf[number_to_move];
2177 while ( source > yy_current_buffer->yy_ch_buf )
2178 *--dest = *--source;
2180 yy_cp += (int) (dest - source);
2181 yy_bp += (int) (dest - source);
2182 yy_current_buffer->yy_n_chars =
2183 yy_n_chars = yy_current_buffer->yy_buf_size;
2185 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2186 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2189 *--yy_cp = (char) c;
2193 yy_hold_char = *yy_cp;
2196 #endif /* ifndef YY_NO_UNPUT */
2200 static int yyinput()
2207 *yy_c_buf_p = yy_hold_char;
2209 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2211 /* yy_c_buf_p now points to the character we want to return.
2212 * If this occurs *before* the EOB characters, then it's a
2213 * valid NUL; if not, then we've hit the end of the buffer.
2215 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2216 /* This was really a NUL. */
2220 { /* need more input */
2221 int offset = yy_c_buf_p - yytext_ptr;
2224 switch ( yy_get_next_buffer() )
2226 case EOB_ACT_LAST_MATCH:
2227 /* This happens because yy_g_n_b()
2228 * sees that we've accumulated a
2229 * token and flags that we need to
2230 * try matching the token before
2231 * proceeding. But for input(),
2232 * there's no matching to consider.
2233 * So convert the EOB_ACT_LAST_MATCH
2234 * to EOB_ACT_END_OF_FILE.
2237 /* Reset buffer status. */
2242 case EOB_ACT_END_OF_FILE:
2247 if ( ! yy_did_buffer_switch_on_eof )
2256 case EOB_ACT_CONTINUE_SCAN:
2257 yy_c_buf_p = yytext_ptr + offset;
2263 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
2264 *yy_c_buf_p = '\0'; /* preserve yytext */
2265 yy_hold_char = *++yy_c_buf_p;
2267 yy_current_buffer->yy_at_bol = (c == '\n');
2273 #ifdef YY_USE_PROTOS
2274 void yyrestart( FILE *input_file )
2276 void yyrestart( input_file )
2280 if ( ! yy_current_buffer )
2281 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
2283 yy_init_buffer( yy_current_buffer, input_file );
2284 yy_load_buffer_state();
2288 #ifdef YY_USE_PROTOS
2289 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
2291 void yy_switch_to_buffer( new_buffer )
2292 YY_BUFFER_STATE new_buffer;
2295 if ( yy_current_buffer == new_buffer )
2298 if ( yy_current_buffer )
2300 /* Flush out information for old buffer. */
2301 *yy_c_buf_p = yy_hold_char;
2302 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2303 yy_current_buffer->yy_n_chars = yy_n_chars;
2306 yy_current_buffer = new_buffer;
2307 yy_load_buffer_state();
2309 /* We don't actually know whether we did this switch during
2310 * EOF (yywrap()) processing, but the only time this flag
2311 * is looked at is after yywrap() is called, so it's safe
2312 * to go ahead and always set it.
2314 yy_did_buffer_switch_on_eof = 1;
2318 #ifdef YY_USE_PROTOS
2319 void yy_load_buffer_state( void )
2321 void yy_load_buffer_state()
2324 yy_n_chars = yy_current_buffer->yy_n_chars;
2325 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2326 yyin = yy_current_buffer->yy_input_file;
2327 yy_hold_char = *yy_c_buf_p;
2331 #ifdef YY_USE_PROTOS
2332 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
2334 YY_BUFFER_STATE yy_create_buffer( file, size )
2341 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2343 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2345 b->yy_buf_size = size;
2347 /* yy_ch_buf has to be 2 characters longer than the size given because
2348 * we need to put in 2 end-of-buffer characters.
2350 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
2351 if ( ! b->yy_ch_buf )
2352 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2354 b->yy_is_our_buffer = 1;
2356 yy_init_buffer( b, file );
2362 #ifdef YY_USE_PROTOS
2363 void yy_delete_buffer( YY_BUFFER_STATE b )
2365 void yy_delete_buffer( b )
2372 if ( b == yy_current_buffer )
2373 yy_current_buffer = (YY_BUFFER_STATE) 0;
2375 if ( b->yy_is_our_buffer )
2376 yy_flex_free( (void *) b->yy_ch_buf );
2378 yy_flex_free( (void *) b );
2382 #ifndef YY_ALWAYS_INTERACTIVE
2383 #ifndef YY_NEVER_INTERACTIVE
2384 extern int isatty YY_PROTO(( int ));
2388 #ifdef YY_USE_PROTOS
2389 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
2391 void yy_init_buffer( b, file )
2398 yy_flush_buffer( b );
2400 b->yy_input_file = file;
2401 b->yy_fill_buffer = 1;
2403 #if YY_ALWAYS_INTERACTIVE
2404 b->yy_is_interactive = 1;
2406 #if YY_NEVER_INTERACTIVE
2407 b->yy_is_interactive = 0;
2409 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2415 #ifdef YY_USE_PROTOS
2416 void yy_flush_buffer( YY_BUFFER_STATE b )
2418 void yy_flush_buffer( b )
2428 /* We always need two end-of-buffer characters. The first causes
2429 * a transition to the end-of-buffer state. The second causes
2430 * a jam in that state.
2432 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2433 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2435 b->yy_buf_pos = &b->yy_ch_buf[0];
2438 b->yy_buffer_status = YY_BUFFER_NEW;
2440 if ( b == yy_current_buffer )
2441 yy_load_buffer_state();
2445 #ifndef YY_NO_SCAN_BUFFER
2446 #ifdef YY_USE_PROTOS
2447 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
2449 YY_BUFFER_STATE yy_scan_buffer( base, size )
2457 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2458 base[size-1] != YY_END_OF_BUFFER_CHAR )
2459 /* They forgot to leave room for the EOB's. */
2462 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2464 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2466 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2467 b->yy_buf_pos = b->yy_ch_buf = base;
2468 b->yy_is_our_buffer = 0;
2469 b->yy_input_file = 0;
2470 b->yy_n_chars = b->yy_buf_size;
2471 b->yy_is_interactive = 0;
2473 b->yy_fill_buffer = 0;
2474 b->yy_buffer_status = YY_BUFFER_NEW;
2476 yy_switch_to_buffer( b );
2483 #ifndef YY_NO_SCAN_STRING
2484 #ifdef YY_USE_PROTOS
2485 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
2487 YY_BUFFER_STATE yy_scan_string( yy_str )
2488 yyconst char *yy_str;
2492 for ( len = 0; yy_str[len]; ++len )
2495 return yy_scan_bytes( yy_str, len );
2500 #ifndef YY_NO_SCAN_BYTES
2501 #ifdef YY_USE_PROTOS
2502 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
2504 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
2505 yyconst char *bytes;
2514 /* Get memory for full buffer, including space for trailing EOB's. */
2516 buf = (char *) yy_flex_alloc( n );
2518 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2520 for ( i = 0; i < len; ++i )
2523 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2525 b = yy_scan_buffer( buf, n );
2527 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2529 /* It's okay to grow etc. this buffer, and we should throw it
2530 * away when we're done.
2532 b->yy_is_our_buffer = 1;
2539 #ifndef YY_NO_PUSH_STATE
2540 #ifdef YY_USE_PROTOS
2541 static void yy_push_state( int new_state )
2543 static void yy_push_state( new_state )
2547 if ( yy_start_stack_ptr >= yy_start_stack_depth )
2551 yy_start_stack_depth += YY_START_STACK_INCR;
2552 new_size = yy_start_stack_depth * sizeof( int );
2554 if ( ! yy_start_stack )
2555 yy_start_stack = (int *) yy_flex_alloc( new_size );
2558 yy_start_stack = (int *) yy_flex_realloc(
2559 (void *) yy_start_stack, new_size );
2561 if ( ! yy_start_stack )
2563 "out of memory expanding start-condition stack" );
2566 yy_start_stack[yy_start_stack_ptr++] = YY_START;
2573 #ifndef YY_NO_POP_STATE
2574 static void yy_pop_state()
2576 if ( --yy_start_stack_ptr < 0 )
2577 YY_FATAL_ERROR( "start-condition stack underflow" );
2579 BEGIN(yy_start_stack[yy_start_stack_ptr]);
2584 #ifndef YY_NO_TOP_STATE
2585 static int yy_top_state()
2587 return yy_start_stack[yy_start_stack_ptr - 1];
2591 #ifndef YY_EXIT_FAILURE
2592 #define YY_EXIT_FAILURE 2
2595 #ifdef YY_USE_PROTOS
2596 static void yy_fatal_error( yyconst char msg[] )
2598 static void yy_fatal_error( msg )
2602 (void) fprintf( stderr, "%s\n", msg );
2603 exit( YY_EXIT_FAILURE );
2608 /* Redefine yyless() so it works in section 3 code. */
2614 /* Undo effects of setting up yytext. */ \
2615 yytext[yyleng] = yy_hold_char; \
2616 yy_c_buf_p = yytext + n; \
2617 yy_hold_char = *yy_c_buf_p; \
2618 *yy_c_buf_p = '\0'; \
2624 /* Internal utility routines. */
2627 #ifdef YY_USE_PROTOS
2628 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2630 static void yy_flex_strncpy( s1, s2, n )
2637 for ( i = 0; i < n; ++i )
2642 #ifdef YY_NEED_STRLEN
2643 #ifdef YY_USE_PROTOS
2644 static int yy_flex_strlen( yyconst char *s )
2646 static int yy_flex_strlen( s )
2651 for ( n = 0; s[n]; ++n )
2659 #ifdef YY_USE_PROTOS
2660 static void *yy_flex_alloc( yy_size_t size )
2662 static void *yy_flex_alloc( size )
2666 return (void *) malloc( size );
2669 #ifdef YY_USE_PROTOS
2670 static void *yy_flex_realloc( void *ptr, yy_size_t size )
2672 static void *yy_flex_realloc( ptr, size )
2677 /* The cast to (char *) in the following accommodates both
2678 * implementations that use char* generic pointers, and those
2679 * that use void* generic pointers. It works with the latter
2680 * because both ANSI C and C++ allow castless assignment from
2681 * any pointer type to void*, and deal with argument conversions
2682 * as though doing an assignment.
2684 return (void *) realloc( (char *) ptr, size );
2687 #ifdef YY_USE_PROTOS
2688 static void yy_flex_free( void *ptr )
2690 static void yy_flex_free( ptr )
2707 /* Ugly warning avoiding */
2709 static void warning_avoider(void) G_GNUC_UNUSED;
2710 static void warning_avoider(void) {
2711 yy_flex_realloc(NULL, 0);