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 87
288 #define YY_END_OF_BUFFER 88
289 static yyconst short int yy_acclist[389] =
291 88, 85, 87, 84, 85, 87, 1, 86, 87, 85,
292 86, 87, 85, 87, 85, 87, 84, 85, 87, 85,
293 87, 85, 87, 26, 85, 87, 1, 27, 86, 87,
294 26, 85, 86, 87, 26, 85, 87, 26, 85, 87,
295 49, 85, 87, 1, 50, 86, 87, 49, 85, 86,
296 87, 42, 49, 85, 87, 49, 85, 87, 49, 85,
297 87, 49, 85, 87, 47, 49, 85, 87, 48, 49,
298 85, 87, 49, 85, 87, 49, 85, 87, 45, 85,
299 87, 1, 46, 86, 87, 45, 85, 86, 87, 44,
300 45, 85, 87, 45, 85, 87, 85, 87, 85, 87,
302 79, 85, 87, 79, 85, 87, 79, 85, 87, 79,
303 85, 87, 81, 85, 87, 85, 87, 85, 87, 76,
304 85, 87, 76, 85, 87, 85, 87, 79, 85, 87,
305 79, 85, 87, 79, 85, 87, 79, 85, 87, 79,
306 85, 87, 79, 85, 87, 79, 85, 87, 79, 85,
307 87, 79, 85, 87, 79, 85, 87, 79, 85, 87,
308 79, 85, 87, 82, 85, 87, 83, 85, 87, 9,
309 85, 87, 9, 85, 86, 87, 9, 85, 87, 9,
310 85, 87, 9, 85, 87, 14, 85, 87, 14, 85,
311 86, 87, 14, 85, 87, 14, 85, 87, 14, 85,
313 87, 17, 85, 87, 17, 85, 86, 87, 17, 85,
314 87, 21, 33, 25, 22, 41, 34, 43, 23, 78,
315 79, 77, 79, 79, 79, 76, 24, 76, 76, 80,
316 79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
317 79, 79, 79, 79, 79, 79, 79, 8, 6, 13,
318 10, 12, 11, 13, 16, 15, 3, 28, 32, 39,
319 35, 37, 18, 19, 78, 78, 77, 79, 79, 79,
320 68, 76, 20, 76, 76, 79, 79, 79, 79, 79,
321 79, 63, 79, 79, 79, 79, 79, 79, 79, 79,
322 79, 79, 79, 79, 79, 11, 29, 30, 31, 40,
324 36, 38, 78, 79, 54, 79, 53, 79, 5, 79,
325 66, 79, 79, 79, 58, 79, 79, 61, 79, 79,
326 79, 79, 79, 79, 79, 79, 79, 79, 79, 55,
327 79, 7, 51, 79, 67, 79, 79, 64, 79, 79,
328 79, 79, 79, 62, 79, 79, 79, 79, 57, 79,
329 79, 79, 79, 65, 79, 79, 79, 79, 69, 79,
330 74, 79, 59, 79, 56, 79, 79, 79, 79, 79,
331 70, 79, 79, 79, 73, 79, 72, 79, 75, 79,
332 79, 60, 79, 71, 79, 2, 4, 52
335 static yyconst short int yy_accept[348] =
337 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
338 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
339 4, 7, 10, 13, 15, 17, 20, 22, 24, 27,
340 31, 35, 38, 41, 44, 48, 52, 56, 59, 62,
341 65, 69, 73, 76, 79, 82, 86, 90, 94, 97,
342 99, 101, 104, 107, 110, 113, 116, 118, 120, 123,
343 126, 128, 131, 134, 137, 140, 143, 146, 149, 152,
344 155, 158, 161, 164, 167, 170, 173, 177, 180, 183,
345 186, 189, 193, 196, 199, 202, 205, 209, 212, 213,
346 213, 213, 213, 213, 213, 213, 213, 214, 214, 215,
348 215, 215, 215, 215, 215, 216, 216, 217, 217, 217,
349 218, 219, 220, 220, 221, 222, 223, 224, 225, 226,
350 226, 227, 228, 228, 228, 229, 229, 229, 230, 230,
351 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
352 241, 242, 243, 244, 245, 246, 247, 248, 249, 249,
353 249, 249, 250, 250, 251, 251, 251, 251, 252, 253,
354 253, 255, 256, 257, 257, 258, 258, 258, 258, 259,
355 259, 259, 260, 260, 260, 260, 260, 261, 261, 261,
356 261, 262, 263, 263, 264, 264, 264, 265, 266, 267,
357 268, 269, 270, 271, 272, 273, 273, 273, 274, 275,
359 276, 276, 277, 278, 279, 280, 281, 282, 284, 285,
360 286, 287, 288, 289, 290, 291, 292, 293, 294, 295,
361 296, 296, 297, 297, 297, 298, 298, 299, 300, 300,
362 300, 300, 301, 302, 303, 303, 304, 305, 307, 309,
363 309, 310, 311, 313, 314, 315, 317, 318, 320, 321,
364 322, 323, 324, 325, 326, 327, 328, 329, 330, 332,
365 332, 333, 333, 333, 334, 334, 334, 334, 334, 334,
366 334, 335, 337, 338, 340, 341, 342, 343, 344, 346,
367 347, 348, 349, 351, 352, 353, 353, 353, 353, 353,
368 353, 353, 354, 356, 357, 358, 359, 361, 363, 365,
370 367, 368, 369, 369, 369, 369, 369, 369, 370, 371,
371 373, 374, 375, 377, 377, 377, 377, 377, 377, 379,
372 381, 382, 384, 384, 384, 384, 384, 384, 384, 386,
373 386, 386, 386, 387, 387, 387, 387, 387, 388, 388,
374 388, 388, 388, 388, 388, 389, 389
377 static yyconst int yy_ec[256] =
379 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
380 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
381 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
382 1, 5, 1, 6, 7, 1, 8, 1, 9, 10,
383 11, 12, 1, 1, 1, 13, 14, 15, 16, 17,
384 17, 17, 17, 17, 17, 18, 18, 19, 1, 20,
385 1, 21, 1, 1, 22, 22, 22, 22, 23, 22,
386 24, 24, 25, 24, 24, 24, 24, 24, 24, 24,
387 24, 26, 27, 24, 24, 24, 24, 24, 24, 24,
388 28, 29, 30, 1, 24, 1, 31, 32, 33, 34,
390 35, 36, 37, 38, 39, 24, 24, 40, 41, 42,
391 43, 44, 45, 46, 47, 48, 49, 50, 24, 51,
392 24, 24, 52, 1, 53, 1, 1, 1, 1, 1,
393 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
394 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
395 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
396 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
397 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
398 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
399 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
401 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
402 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
403 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,
409 static yyconst int yy_meta[54] =
411 1, 2, 3, 1, 2, 1, 1, 1, 1, 1,
412 1, 1, 1, 1, 4, 4, 4, 4, 5, 1,
413 1, 6, 6, 7, 7, 7, 7, 1, 1, 1,
414 6, 6, 6, 6, 6, 6, 7, 7, 7, 7,
415 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
419 static yyconst short int yy_base[371] =
421 0, 32, 3, 5, 76, 127, 15, 19, 180, 0,
422 221, 0, 8, 47, 35, 51, 54, 57, 809, 810,
423 810, 810, 810, 12, 768, 26, 37, 772, 810, 810,
424 810, 792, 778, 810, 810, 810, 810, 35, 15, 0,
425 810, 810, 65, 751, 810, 810, 810, 810, 0, 31,
426 0, 784, 43, 52, 54, 810, 78, 62, 93, 84,
427 97, 97, 99, 102, 65, 84, 98, 103, 100, 106,
428 119, 107, 129, 810, 810, 810, 810, 788, 149, 157,
429 810, 810, 787, 161, 239, 797, 796, 150, 810, 795,
430 766, 238, 761, 210, 211, 131, 810, 750, 810, 0,
432 785, 239, 784, 783, 810, 788, 810, 264, 748, 810,
433 810, 810, 786, 769, 768, 767, 101, 104, 228, 772,
434 260, 772, 780, 264, 270, 280, 0, 289, 293, 754,
435 253, 270, 275, 280, 281, 293, 294, 295, 296, 300,
436 146, 297, 301, 299, 302, 305, 307, 810, 320, 345,
437 350, 810, 354, 810, 356, 360, 364, 810, 368, 767,
438 810, 810, 810, 777, 810, 732, 738, 725, 810, 745,
439 723, 810, 722, 734, 723, 745, 810, 761, 760, 759,
440 810, 810, 764, 810, 733, 762, 810, 745, 744, 743,
441 335, 345, 341, 810, 360, 378, 758, 810, 374, 0,
443 378, 360, 365, 366, 368, 378, 379, 741, 380, 382,
444 383, 384, 385, 388, 387, 386, 393, 399, 395, 396,
445 418, 810, 712, 122, 810, 724, 810, 810, 707, 717,
446 730, 810, 810, 810, 714, 734, 397, 733, 732, 437,
447 810, 405, 731, 403, 407, 730, 408, 729, 412, 422,
448 309, 426, 429, 431, 430, 433, 435, 436, 728, 465,
449 810, 471, 476, 810, 703, 710, 713, 693, 0, 683,
450 445, 698, 452, 697, 450, 438, 463, 464, 693, 465,
451 469, 472, 658, 473, 475, 613, 604, 546, 558, 569,
452 557, 474, 571, 476, 479, 480, 569, 565, 554, 544,
454 482, 481, 456, 526, 502, 538, 506, 483, 488, 520,
455 490, 492, 518, 487, 480, 8, 317, 517, 494, 442,
456 493, 441, 415, 292, 527, 518, 535, 518, 229, 145,
457 541, 549, 810, 534, 141, 553, 541, 810, 51, 559,
458 31, 563, 580, 584, 810, 810, 598, 605, 612, 619,
459 626, 633, 640, 647, 654, 656, 660, 667, 674, 681,
460 688, 692, 696, 703, 707, 712, 716, 722, 729, 736
463 static yyconst short int yy_def[371] =
465 347, 347, 348, 348, 349, 349, 350, 350, 346, 9,
466 9, 11, 351, 351, 352, 352, 353, 353, 346, 346,
467 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
468 346, 346, 346, 346, 346, 346, 346, 346, 346, 354,
469 346, 346, 346, 346, 346, 346, 346, 346, 355, 346,
470 356, 357, 357, 357, 357, 346, 346, 346, 346, 346,
471 346, 357, 357, 357, 357, 357, 357, 357, 357, 357,
472 357, 357, 357, 346, 346, 346, 346, 346, 346, 346,
473 346, 346, 346, 346, 346, 346, 346, 346, 346, 358,
474 346, 346, 346, 346, 346, 346, 346, 346, 346, 359,
476 346, 346, 346, 346, 346, 360, 346, 346, 346, 346,
477 346, 346, 361, 362, 357, 363, 357, 357, 357, 346,
478 346, 346, 364, 346, 346, 346, 365, 346, 346, 346,
479 357, 357, 357, 357, 357, 357, 357, 357, 357, 357,
480 357, 357, 357, 357, 357, 357, 357, 346, 346, 346,
481 346, 346, 366, 346, 346, 346, 346, 346, 346, 346,
482 346, 346, 346, 358, 346, 346, 346, 346, 346, 346,
483 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
484 346, 346, 360, 346, 346, 361, 346, 362, 367, 363,
485 357, 357, 357, 346, 346, 346, 364, 346, 346, 365,
487 346, 357, 357, 357, 357, 357, 357, 357, 357, 357,
488 357, 357, 357, 357, 357, 357, 357, 357, 357, 357,
489 368, 346, 346, 346, 346, 346, 346, 346, 346, 346,
490 346, 346, 346, 346, 346, 367, 357, 357, 357, 346,
491 346, 357, 357, 357, 357, 357, 357, 357, 357, 357,
492 357, 357, 357, 357, 357, 357, 357, 357, 357, 346,
493 346, 368, 346, 346, 346, 346, 346, 346, 369, 346,
494 357, 357, 357, 357, 357, 357, 357, 357, 357, 357,
495 357, 357, 357, 357, 357, 346, 346, 346, 346, 346,
496 346, 357, 357, 357, 357, 357, 357, 357, 357, 357,
498 357, 357, 346, 346, 346, 346, 346, 357, 357, 357,
499 357, 357, 357, 346, 346, 346, 346, 346, 357, 357,
500 357, 357, 346, 346, 346, 346, 346, 346, 357, 346,
501 346, 346, 346, 370, 346, 346, 370, 346, 346, 346,
502 346, 346, 346, 346, 346, 0, 346, 346, 346, 346,
503 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
504 346, 346, 346, 346, 346, 346, 346, 346, 346, 346
507 static yyconst short int yy_nxt[864] =
509 346, 21, 22, 23, 21, 30, 31, 30, 31, 325,
510 22, 77, 325, 24, 32, 346, 32, 46, 47, 78,
511 48, 46, 47, 89, 48, 90, 105, 92, 106, 33,
512 92, 346, 25, 26, 22, 23, 26, 22, 82, 27,
513 101, 346, 112, 49, 113, 24, 83, 49, 79, 22,
514 77, 79, 84, 22, 82, 84, 22, 87, 80, 22,
515 87, 116, 85, 102, 25, 88, 108, 94, 88, 108,
516 116, 93, 116, 122, 95, 123, 173, 28, 35, 36,
517 96, 37, 117, 116, 38, 341, 103, 104, 97, 39,
518 120, 119, 121, 121, 121, 121, 124, 118, 128, 128,
520 128, 128, 116, 109, 40, 124, 135, 125, 125, 125,
521 126, 129, 129, 129, 129, 116, 116, 116, 116, 116,
522 116, 116, 116, 136, 116, 116, 130, 41, 42, 35,
523 36, 191, 37, 43, 44, 38, 132, 116, 117, 137,
524 39, 133, 131, 127, 134, 138, 192, 116, 145, 139,
525 149, 140, 162, 149, 141, 40, 142, 143, 151, 152,
526 150, 153, 155, 163, 116, 155, 144, 146, 173, 265,
527 148, 147, 156, 169, 339, 335, 174, 213, 41, 42,
528 20, 21, 22, 23, 21, 20, 20, 20, 20, 20,
529 20, 20, 20, 50, 20, 20, 20, 20, 51, 20,
531 20, 52, 52, 52, 52, 52, 52, 20, 20, 20,
532 52, 52, 53, 52, 52, 54, 52, 52, 52, 52,
533 52, 52, 52, 52, 52, 52, 52, 55, 52, 52,
534 52, 56, 20, 57, 58, 59, 60, 60, 60, 92,
535 157, 158, 92, 159, 178, 170, 116, 116, 61, 167,
536 160, 62, 161, 63, 64, 65, 66, 168, 171, 67,
537 68, 169, 172, 69, 70, 108, 193, 71, 108, 72,
538 73, 116, 74, 75, 195, 195, 195, 195, 199, 199,
539 199, 199, 124, 93, 125, 125, 125, 126, 116, 202,
540 179, 180, 124, 116, 126, 126, 126, 126, 116, 116,
542 203, 124, 109, 128, 128, 128, 128, 129, 129, 129,
543 129, 116, 116, 116, 116, 116, 204, 116, 116, 116,
544 116, 149, 130, 116, 149, 116, 330, 116, 205, 206,
545 210, 150, 326, 327, 327, 207, 209, 215, 211, 214,
546 217, 208, 212, 277, 216, 220, 151, 152, 218, 153,
547 219, 151, 152, 116, 151, 151, 152, 155, 151, 116,
548 155, 157, 158, 116, 159, 157, 158, 156, 157, 157,
549 158, 160, 157, 222, 195, 195, 195, 195, 116, 240,
550 241, 237, 240, 116, 116, 238, 116, 239, 199, 199,
551 199, 199, 129, 129, 129, 129, 116, 116, 116, 245,
553 116, 116, 116, 116, 116, 116, 116, 130, 242, 247,
554 243, 116, 244, 116, 116, 116, 248, 116, 246, 260,
555 261, 116, 260, 116, 252, 116, 116, 249, 254, 259,
556 116, 251, 250, 253, 255, 256, 263, 257, 240, 241,
557 116, 240, 258, 239, 116, 271, 273, 116, 116, 116,
558 272, 116, 276, 116, 116, 274, 116, 275, 171, 116,
559 116, 280, 282, 116, 278, 281, 260, 261, 116, 260,
560 116, 284, 260, 261, 283, 260, 279, 260, 261, 292,
561 260, 116, 116, 116, 285, 295, 293, 116, 294, 263,
562 116, 116, 116, 116, 116, 296, 297, 116, 116, 116,
564 116, 116, 299, 314, 298, 302, 116, 172, 116, 309,
565 116, 116, 116, 310, 301, 308, 312, 324, 328, 300,
566 313, 328, 320, 334, 321, 322, 329, 311, 325, 323,
567 319, 325, 332, 332, 332, 332, 116, 334, 116, 338,
568 318, 331, 331, 331, 331, 333, 338, 317, 316, 332,
569 332, 332, 332, 336, 338, 331, 331, 331, 331, 333,
570 315, 338, 116, 332, 332, 332, 332, 340, 340, 340,
571 340, 342, 116, 340, 340, 340, 340, 343, 343, 343,
572 343, 344, 345, 116, 344, 344, 345, 116, 344, 116,
573 307, 306, 305, 304, 343, 343, 343, 343, 20, 20,
575 20, 20, 20, 20, 20, 29, 29, 29, 29, 29,
576 29, 29, 34, 34, 34, 34, 34, 34, 34, 45,
577 45, 45, 45, 45, 45, 45, 76, 76, 76, 76,
578 76, 76, 76, 81, 81, 81, 81, 81, 81, 81,
579 86, 86, 86, 86, 86, 86, 86, 107, 107, 303,
580 107, 107, 107, 107, 111, 111, 168, 111, 111, 111,
581 111, 114, 114, 115, 115, 115, 115, 164, 164, 164,
582 164, 164, 164, 164, 176, 176, 116, 176, 176, 176,
583 176, 183, 183, 183, 183, 183, 183, 183, 186, 186,
584 186, 186, 186, 186, 186, 188, 188, 188, 188, 190,
586 190, 190, 190, 197, 197, 197, 197, 197, 197, 197,
587 200, 116, 200, 221, 221, 116, 116, 221, 221, 236,
588 236, 236, 236, 262, 262, 262, 262, 262, 262, 290,
589 290, 291, 290, 290, 290, 290, 337, 337, 289, 337,
590 337, 337, 337, 288, 287, 286, 116, 116, 116, 116,
591 116, 116, 189, 270, 269, 268, 267, 266, 264, 116,
592 198, 116, 189, 189, 187, 235, 184, 234, 233, 232,
593 231, 230, 229, 228, 227, 226, 225, 224, 223, 165,
594 222, 201, 198, 196, 194, 116, 116, 189, 187, 185,
595 184, 182, 181, 177, 175, 98, 166, 165, 162, 162,
597 154, 148, 116, 110, 100, 99, 98, 91, 346, 19,
598 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
599 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
600 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
601 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
602 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
606 static yyconst short int yy_chk[864] =
608 0, 1, 1, 1, 1, 3, 3, 4, 4, 316,
609 13, 13, 316, 1, 3, 0, 4, 7, 7, 13,
610 7, 8, 8, 24, 8, 24, 39, 26, 39, 4,
611 26, 0, 1, 2, 2, 2, 2, 15, 15, 2,
612 38, 0, 50, 7, 50, 2, 15, 8, 14, 14,
613 14, 14, 16, 16, 16, 16, 17, 17, 14, 18,
614 18, 53, 16, 38, 2, 17, 43, 27, 18, 43,
615 54, 26, 55, 58, 27, 58, 341, 2, 5, 5,
616 27, 5, 53, 65, 5, 339, 38, 38, 27, 5,
617 57, 55, 57, 57, 57, 57, 60, 54, 60, 60,
619 60, 60, 66, 43, 5, 59, 65, 59, 59, 59,
620 59, 61, 61, 61, 61, 62, 67, 63, 69, 117,
621 64, 68, 118, 66, 70, 72, 61, 5, 5, 6,
622 6, 117, 6, 6, 6, 6, 63, 71, 63, 67,
623 6, 63, 62, 59, 64, 68, 118, 73, 72, 69,
624 79, 70, 88, 79, 70, 6, 71, 71, 80, 80,
625 79, 80, 84, 88, 141, 84, 71, 73, 96, 224,
626 80, 73, 84, 224, 335, 330, 96, 141, 6, 6,
627 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
628 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
630 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
631 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
632 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
633 9, 9, 9, 11, 11, 11, 11, 11, 11, 92,
634 85, 85, 92, 85, 102, 95, 119, 329, 11, 94,
635 85, 11, 85, 11, 11, 11, 11, 94, 95, 11,
636 11, 94, 95, 11, 11, 108, 119, 11, 108, 11,
637 11, 131, 11, 11, 121, 121, 121, 121, 124, 124,
638 124, 124, 125, 92, 125, 125, 125, 125, 132, 131,
639 102, 102, 126, 133, 126, 126, 126, 126, 134, 135,
641 132, 128, 108, 128, 128, 128, 128, 129, 129, 129,
642 129, 136, 137, 138, 139, 142, 133, 144, 140, 143,
643 145, 149, 129, 146, 149, 147, 324, 251, 134, 135,
644 139, 149, 317, 317, 317, 136, 138, 143, 140, 142,
645 145, 137, 140, 251, 144, 147, 150, 150, 145, 150,
646 146, 151, 151, 191, 151, 153, 153, 155, 153, 193,
647 155, 156, 156, 192, 156, 157, 157, 155, 157, 159,
648 159, 156, 159, 156, 195, 195, 195, 195, 202, 196,
649 196, 191, 196, 203, 204, 192, 205, 193, 199, 199,
650 199, 199, 201, 201, 201, 201, 206, 207, 209, 205,
652 210, 211, 212, 213, 216, 215, 214, 201, 202, 207,
653 203, 217, 204, 219, 220, 237, 209, 218, 206, 221,
654 221, 244, 221, 242, 213, 245, 247, 210, 215, 220,
655 249, 212, 211, 214, 216, 217, 221, 218, 240, 240,
656 250, 240, 219, 237, 252, 242, 245, 253, 255, 254,
657 244, 256, 250, 257, 258, 247, 276, 249, 323, 322,
658 320, 254, 255, 271, 252, 254, 260, 260, 275, 260,
659 273, 257, 262, 262, 256, 262, 253, 263, 263, 271,
660 263, 277, 278, 280, 258, 276, 273, 281, 275, 262,
661 282, 284, 292, 285, 294, 277, 278, 295, 296, 302,
663 301, 308, 281, 303, 280, 285, 309, 303, 311, 294,
664 312, 321, 319, 295, 284, 292, 301, 315, 318, 282,
665 302, 318, 309, 328, 311, 312, 321, 296, 325, 314,
666 308, 325, 326, 326, 326, 326, 313, 328, 310, 334,
667 307, 325, 325, 325, 325, 327, 337, 306, 305, 327,
668 327, 327, 327, 331, 334, 331, 331, 331, 331, 332,
669 304, 337, 300, 332, 332, 332, 332, 336, 336, 336,
670 336, 340, 299, 340, 340, 340, 340, 342, 342, 342,
671 342, 343, 343, 298, 343, 344, 344, 297, 344, 293,
672 291, 290, 289, 288, 343, 343, 343, 343, 347, 347,
674 347, 347, 347, 347, 347, 348, 348, 348, 348, 348,
675 348, 348, 349, 349, 349, 349, 349, 349, 349, 350,
676 350, 350, 350, 350, 350, 350, 351, 351, 351, 351,
677 351, 351, 351, 352, 352, 352, 352, 352, 352, 352,
678 353, 353, 353, 353, 353, 353, 353, 354, 354, 287,
679 354, 354, 354, 354, 355, 355, 286, 355, 355, 355,
680 355, 356, 356, 357, 357, 357, 357, 358, 358, 358,
681 358, 358, 358, 358, 359, 359, 283, 359, 359, 359,
682 359, 360, 360, 360, 360, 360, 360, 360, 361, 361,
683 361, 361, 361, 361, 361, 362, 362, 362, 362, 363,
685 363, 363, 363, 364, 364, 364, 364, 364, 364, 364,
686 365, 279, 365, 366, 366, 274, 272, 366, 366, 367,
687 367, 367, 367, 368, 368, 368, 368, 368, 368, 369,
688 369, 270, 369, 369, 369, 369, 370, 370, 268, 370,
689 370, 370, 370, 267, 266, 265, 259, 248, 246, 243,
690 239, 238, 236, 235, 231, 230, 229, 226, 223, 208,
691 197, 190, 189, 188, 186, 185, 183, 180, 179, 178,
692 176, 175, 174, 173, 171, 170, 168, 167, 166, 164,
693 160, 130, 123, 122, 120, 116, 115, 114, 113, 109,
694 106, 104, 103, 101, 98, 93, 91, 90, 87, 86,
696 83, 78, 52, 44, 33, 32, 28, 25, 19, 346,
697 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
698 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
699 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
700 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
701 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
705 static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
706 static char *yy_full_match;
710 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
711 yy_cp = yy_full_match; /* restore poss. backed-over text */ \
715 #define yymore() yymore_used_but_not_detected
716 #define YY_MORE_ADJ 0
717 #define YY_RESTORE_YY_MORE_OFFSET
721 /* GOB C Preprocessor
722 * Copyright (C) 1999 the Free Software Foundation.
724 * Author: George Lebl
726 * This program is free software; you can redistribute it and/or modify
727 * it under the terms of the GNU General Public License as published by
728 * the Free Software Foundation; either version 2 of the License, or
729 * (at your option) any later version.
731 * This program is distributed in the hope that it will be useful,
732 * but WITHOUT ANY WARRANTY; without even the implied warranty of
733 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
734 * GNU General Public License for more details.
736 * You should have received a copy of the GNU General Public License
737 * along with this program; if not, write to the Free Software
738 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
747 #include "treefuncs.h"
752 static int parenth_depth = 0;
753 static int before_comment = INITIAL;
754 static gboolean class_after_c = FALSE;
755 static int code_type = CCODE;
758 static char *gtk_doc_func = NULL; /* current gtk-doc func */
759 GHashTable *gtk_doc_hash = NULL;
761 static GString *cbuf = NULL;
764 GList *include_files = NULL;
765 /* 0 no, 1 means yes, 2+ means don't even start looking anymore */
766 static int look_for_includes = 0;
774 cbuf = g_string_new(NULL);
776 cbuf = g_string_assign(cbuf, "");
784 cbuf = g_string_new(s);
786 cbuf = g_string_append(cbuf,s);
791 add_gtk_doc_func(void)
797 gtk_doc_hash = g_hash_table_new(g_str_hash, g_str_equal);
798 g_hash_table_insert(gtk_doc_hash, gtk_doc_func, g_strdup(cbuf->str));
809 #define C_CODE_STRING 3
813 #define CLASS_CODE_I 5
815 #define GTK_DOC_BEFORE_NAME 6
819 #define GTK_DOC_LINE 8
823 /* Macros after this point can all be overridden by user definitions in
827 #ifndef YY_SKIP_YYWRAP
829 extern "C" int yywrap YY_PROTO(( void ));
831 extern int yywrap YY_PROTO(( void ));
836 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
840 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
843 #ifdef YY_NEED_STRLEN
844 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
849 static int yyinput YY_PROTO(( void ));
851 static int input YY_PROTO(( void ));
856 static int yy_start_stack_ptr = 0;
857 static int yy_start_stack_depth = 0;
858 static int *yy_start_stack = 0;
859 #ifndef YY_NO_PUSH_STATE
860 static void yy_push_state YY_PROTO(( int new_state ));
862 #ifndef YY_NO_POP_STATE
863 static void yy_pop_state YY_PROTO(( void ));
865 #ifndef YY_NO_TOP_STATE
866 static int yy_top_state YY_PROTO(( void ));
870 #define YY_NO_PUSH_STATE 1
871 #define YY_NO_POP_STATE 1
872 #define YY_NO_TOP_STATE 1
875 #ifdef YY_MALLOC_DECL
883 /* Just try to get by without declaring the routines. This will fail
884 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
885 * or sizeof(void*) != sizeof(int).
890 /* Amount of stuff to slurp up with each read. */
891 #ifndef YY_READ_BUF_SIZE
892 #define YY_READ_BUF_SIZE 8192
895 /* Copy whatever the last rule matched to the standard output. */
898 /* This used to be an fputs(), but since the string might contain NUL's,
899 * we now use fwrite().
901 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
904 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
905 * is returned in "result".
908 #define YY_INPUT(buf,result,max_size) \
909 if ( yy_current_buffer->yy_is_interactive ) \
912 for ( n = 0; n < max_size && \
913 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
916 buf[n++] = (char) c; \
917 if ( c == EOF && ferror( yyin ) ) \
918 YY_FATAL_ERROR( "input in flex scanner failed" ); \
921 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
922 && ferror( yyin ) ) \
923 YY_FATAL_ERROR( "input in flex scanner failed" );
926 /* No semi-colon after return; correct usage is to write "yyterminate();" -
927 * we don't want an extra ';' after the "return" because that will cause
928 * some compilers to complain about unreachable statements.
931 #define yyterminate() return YY_NULL
934 /* Number of entries by which start-condition stack grows. */
935 #ifndef YY_START_STACK_INCR
936 #define YY_START_STACK_INCR 25
939 /* Report a fatal error. */
940 #ifndef YY_FATAL_ERROR
941 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
944 /* Default declaration of generated scanner - a define so the user can
945 * easily add parameters.
948 #define YY_DECL int yylex YY_PROTO(( void ))
951 /* Code executed at the beginning of each rule, after yytext and yyleng
954 #ifndef YY_USER_ACTION
955 #define YY_USER_ACTION
958 /* Code executed at the end of each rule. */
960 #define YY_BREAK break;
963 #define YY_RULE_SETUP \
965 yy_current_buffer->yy_at_bol = \
966 (yytext[yyleng - 1] == '\n'); \
971 register yy_state_type yy_current_state;
972 register char *yy_cp = NULL, *yy_bp = NULL;
989 yy_start = 1; /* first start state */
997 if ( ! yy_current_buffer )
999 yy_create_buffer( yyin, YY_BUF_SIZE );
1001 yy_load_buffer_state();
1004 while ( 1 ) /* loops until end-of-file is reached */
1008 /* Support of yytext. */
1009 *yy_cp = yy_hold_char;
1011 /* yy_bp points to the position in yy_ch_buf of the start of
1016 yy_current_state = yy_start;
1017 yy_current_state += YY_AT_BOL();
1018 yy_state_ptr = yy_state_buf;
1019 *yy_state_ptr++ = yy_current_state;
1023 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1024 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1026 yy_current_state = (int) yy_def[yy_current_state];
1027 if ( yy_current_state >= 347 )
1028 yy_c = yy_meta[(unsigned int) yy_c];
1030 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1031 *yy_state_ptr++ = yy_current_state;
1034 while ( yy_base[yy_current_state] != 810 );
1037 yy_current_state = *--yy_state_ptr;
1038 yy_lp = yy_accept[yy_current_state];
1039 find_rule: /* we branch to this label when backing up */
1040 for ( ; ; ) /* until we find what rule we matched */
1042 if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
1044 yy_act = yy_acclist[yy_lp];
1046 yy_full_match = yy_cp;
1051 yy_current_state = *--yy_state_ptr;
1052 yy_lp = yy_accept[yy_current_state];
1055 YY_DO_BEFORE_ACTION;
1058 do_action: /* This label is used only to access EOF actions. */
1062 { /* beginning of action switch */
1066 { line_no++; REJECT; }
1069 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1070 yy_c_buf_p = yy_cp -= 1;
1071 YY_DO_BEFORE_ACTION; /* set up yytext again */
1075 /* Thy evil easter egg */
1076 #define QQ(x) long x
1077 #define KK(x) =atoi(__(&,,x,))
1078 #define MM(x,a) {QQ(i);for(i=2;i<x;i++){a}}
1079 #define PP(Q) (P%Q)==0
1080 #define ___(x,y,z) if(x z y)
1081 #define __(a,x,y,z) a(yytext[y] x z)
1082 #define O__O(a,b) fprintf(stderr,"%s is %s!\n",a,b)
1083 QQ(m)=1;___(__(,==,2,'P'),__(,==,5,'M'),&&
1084 ){QQ(P)KK(8);MM(P,___(PP(i),,)m=0;)}__(,=,
1085 7,0);___(,,m){O__O(__( &,,8,),__(&,,2,));}
1097 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1098 yy_c_buf_p = yy_cp -= 1;
1099 YY_DO_BEFORE_ACTION; /* set up yytext again */
1102 { ; /*comment, ignore*/ }
1108 if(look_for_includes==1) {
1111 char *str = g_strdup(yytext);
1112 file = strchr(str,'"');
1113 if(!file) file = strchr(str,'<');
1115 p = strchr(file,'"');
1116 if(!p) p = strchr(file,'>');
1118 include_files = g_list_prepend(include_files,g_strdup(file));
1125 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1126 yy_c_buf_p = yy_cp -= 1;
1127 YY_DO_BEFORE_ACTION; /* set up yytext again */
1131 /* eat out gtk doc stuff */
1132 BEGIN(GTK_DOC_BEFORE_NAME);
1137 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1138 yy_c_buf_p = yy_cp -= 1;
1139 YY_DO_BEFORE_ACTION; /* set up yytext again */
1143 /* empty doc lines */
1148 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1149 yy_c_buf_p = yy_cp -= 1;
1150 YY_DO_BEFORE_ACTION; /* set up yytext again */
1156 p = strchr(yytext, '*');
1157 g_free(gtk_doc_func);
1158 gtk_doc_func = g_strdup(p+2);
1159 p = strchr(gtk_doc_func, ':');
1161 g_strstrip(gtk_doc_func);
1168 BEGIN(CLASS_CODE_I);
1176 before_comment = CLASS_CODE_I;
1180 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1181 yy_c_buf_p = yy_cp -= 1;
1182 YY_DO_BEFORE_ACTION; /* set up yytext again */
1186 /* empty doc lines */
1187 add_to_cbuf(" *\n");
1194 BEGIN(CLASS_CODE_I);
1204 BEGIN(GTK_DOC_LINE);
1211 BEGIN(CLASS_CODE_I);
1219 before_comment = CLASS_CODE_I;
1226 BEGIN(CLASS_CODE_I);
1232 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1233 yy_c_buf_p = yy_cp -= 1;
1234 YY_DO_BEFORE_ACTION; /* set up yytext again */
1239 add_to_cbuf(yytext);
1248 add_to_cbuf(yytext);
1252 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1253 yy_c_buf_p = yy_cp -= 1;
1254 YY_DO_BEFORE_ACTION; /* set up yytext again */
1257 { add_to_cbuf(yytext); /*comment, ignore*/ }
1260 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1261 yy_c_buf_p = yy_cp -= 1;
1262 YY_DO_BEFORE_ACTION; /* set up yytext again */
1265 { ; /*comment, ignore*/ }
1268 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1269 yy_c_buf_p = yy_cp -= 1;
1270 YY_DO_BEFORE_ACTION; /* set up yytext again */
1273 { ; /*comment, ignore*/ }
1278 {BEGIN(COMMENT); before_comment = INITIAL; }
1284 add_to_cbuf(yytext);
1286 before_comment = C_CODE;
1292 {BEGIN(COMMENT); before_comment = CLASS_CODE; }
1297 {BEGIN(COMMENT); before_comment = CLASS_CODE_I; }
1303 if(before_comment == C_CODE) add_to_cbuf(yytext);
1304 BEGIN(before_comment);
1311 /* comment, ignore */
1312 if(before_comment == C_CODE) add_to_cbuf(yytext);
1319 /* comment, ignore */
1320 if(before_comment == C_CODE) add_to_cbuf(yytext);
1329 class_after_c = FALSE;
1332 ccode_line = line_no;
1341 class_after_c = FALSE;
1344 ccode_line = line_no;
1353 class_after_c = FALSE;
1356 ccode_line = line_no;
1365 class_after_c = FALSE;
1368 ccode_line = line_no;
1377 class_after_c = FALSE;
1380 ccode_line = line_no;
1389 class_after_c = FALSE;
1392 ccode_line = line_no;
1393 if(look_for_includes==0)
1394 look_for_includes=1;
1404 if(look_for_includes==1)
1405 look_for_includes=0;
1412 { add_to_cbuf(yytext); }
1417 { add_to_cbuf(yytext); }
1422 { add_to_cbuf(yytext); }
1427 { add_to_cbuf(yytext); }
1432 { add_to_cbuf(yytext); }
1437 { add_to_cbuf(yytext); }
1442 { add_to_cbuf(yytext); }
1448 BEGIN(C_CODE_STRING);
1449 add_to_cbuf(yytext);
1455 { add_to_cbuf(yytext); }
1462 add_to_cbuf(yytext);
1468 { add_to_cbuf(yytext); }
1473 { add_to_cbuf(yytext); }
1480 add_to_cbuf(yytext);
1488 if(parenth_depth<0) {
1490 } else if(parenth_depth==0 && class_after_c) {
1491 BEGIN(CLASS_CODE_I);
1496 add_to_cbuf(yytext);
1502 { add_to_cbuf(yytext); }
1507 { add_to_cbuf(yytext); }
1513 static int found_classes = 0;
1514 look_for_includes = 2;
1517 if(++found_classes > 1) {
1519 "Only one class per file allowed",
1527 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1528 yy_c_buf_p = yy_cp -= 1;
1529 YY_DO_BEFORE_ACTION; /* set up yytext again */
1533 int maj = 0,min = 0,pl = 0;
1534 int rmaj = 0,rmin = 0,rpl = 0;
1537 sscanf(VERSION,"%d.%d.%d",&rmaj,&rmin,&rpl);
1538 p = strchr(yytext,'r');
1539 g_assert(p); /* we MUST have found it */
1540 sscanf(p,"requires %d.%d.%d",&maj,&min,&pl);
1542 (rmaj == maj && rmin < min) ||
1543 (rmaj == maj && rmin == min && rpl < pl)) {
1545 s = g_strdup_printf(
1546 "GOB version %d.%d.%d required "
1548 "To upgrade your gob, see: "
1549 "http://www.5z.com/jirka/gob.html",
1550 maj,min,pl,VERSION);
1551 print_error(FALSE, s, line_no);
1562 s = g_strdup_printf("'%s' keyword should not "
1563 "be used when generating "
1565 print_error(TRUE, s, line_no);
1649 {yylval.line = line_no; return PUBLIC;}
1654 {yylval.line = line_no; return PRIVATE;}
1659 {yylval.line = line_no; return PROTECTED;}
1664 {yylval.line = line_no; return ARGUMENT;}
1669 {yylval.line = line_no; return VIRTUAL;}
1674 {yylval.line = line_no; return SIGNAL;}
1679 {yylval.line = line_no; return OVERRIDE;}
1685 yylval.id = g_strdup(yytext);
1693 /* this one is for a classname with a namespace */
1694 yylval.id = g_strdup(yytext);
1702 /* this is for a classname with an empty namespace */
1703 yylval.id = g_strdup(yytext);
1711 yylval.id = g_strdup(yytext);
1719 yylval.id = g_strdup(yytext);
1727 BEGIN(CLASS_CODE_I);
1737 class_after_c = TRUE;
1738 yylval.line = line_no;
1740 ccode_line = line_no;
1761 yylval.line = line_no;
1775 #line 1776 "lex.yy.c"
1776 case YY_STATE_EOF(INITIAL):
1777 case YY_STATE_EOF(COMMENT):
1778 case YY_STATE_EOF(C_CODE):
1779 case YY_STATE_EOF(C_CODE_STRING):
1780 case YY_STATE_EOF(CLASS_CODE):
1781 case YY_STATE_EOF(CLASS_CODE_I):
1782 case YY_STATE_EOF(GTK_DOC_BEFORE_NAME):
1783 case YY_STATE_EOF(GTK_DOC):
1784 case YY_STATE_EOF(GTK_DOC_LINE):
1787 case YY_END_OF_BUFFER:
1789 /* Amount of text matched not including the EOB char. */
1790 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1792 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1793 *yy_cp = yy_hold_char;
1794 YY_RESTORE_YY_MORE_OFFSET
1796 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1798 /* We're scanning a new file or input source. It's
1799 * possible that this happened because the user
1800 * just pointed yyin at a new source and called
1801 * yylex(). If so, then we have to assure
1802 * consistency between yy_current_buffer and our
1803 * globals. Here is the right place to do so, because
1804 * this is the first action (other than possibly a
1805 * back-up) that will match for the new input source.
1807 yy_n_chars = yy_current_buffer->yy_n_chars;
1808 yy_current_buffer->yy_input_file = yyin;
1809 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1812 /* Note that here we test for yy_c_buf_p "<=" to the position
1813 * of the first EOB in the buffer, since yy_c_buf_p will
1814 * already have been incremented past the NUL character
1815 * (since all states make transitions on EOB to the
1816 * end-of-buffer state). Contrast this with the test
1819 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1820 { /* This was really a NUL. */
1821 yy_state_type yy_next_state;
1823 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1825 yy_current_state = yy_get_previous_state();
1827 /* Okay, we're now positioned to make the NUL
1828 * transition. We couldn't have
1829 * yy_get_previous_state() go ahead and do it
1830 * for us because it doesn't know how to deal
1831 * with the possibility of jamming (and we don't
1832 * want to build jamming into it because then it
1833 * will run more slowly).
1836 yy_next_state = yy_try_NUL_trans( yy_current_state );
1838 yy_bp = yytext_ptr + YY_MORE_ADJ;
1840 if ( yy_next_state )
1842 /* Consume the NUL. */
1843 yy_cp = ++yy_c_buf_p;
1844 yy_current_state = yy_next_state;
1851 goto yy_find_action;
1855 else switch ( yy_get_next_buffer() )
1857 case EOB_ACT_END_OF_FILE:
1859 yy_did_buffer_switch_on_eof = 0;
1863 /* Note: because we've taken care in
1864 * yy_get_next_buffer() to have set up
1865 * yytext, we can now set up
1866 * yy_c_buf_p so that if some total
1867 * hoser (like flex itself) wants to
1868 * call the scanner after we return the
1869 * YY_NULL, it'll still work - another
1870 * YY_NULL will get returned.
1872 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1874 yy_act = YY_STATE_EOF(YY_START);
1880 if ( ! yy_did_buffer_switch_on_eof )
1886 case EOB_ACT_CONTINUE_SCAN:
1888 yytext_ptr + yy_amount_of_matched_text;
1890 yy_current_state = yy_get_previous_state();
1893 yy_bp = yytext_ptr + YY_MORE_ADJ;
1896 case EOB_ACT_LAST_MATCH:
1898 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1900 yy_current_state = yy_get_previous_state();
1903 yy_bp = yytext_ptr + YY_MORE_ADJ;
1904 goto yy_find_action;
1911 "fatal flex scanner internal error--no action found" );
1912 } /* end of action switch */
1913 } /* end of scanning one token */
1914 } /* end of yylex */
1917 /* yy_get_next_buffer - try to read in a new buffer
1919 * Returns a code representing an action:
1920 * EOB_ACT_LAST_MATCH -
1921 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1922 * EOB_ACT_END_OF_FILE - end of file
1925 static int yy_get_next_buffer()
1927 register char *dest = yy_current_buffer->yy_ch_buf;
1928 register char *source = yytext_ptr;
1929 register int number_to_move, i;
1932 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1934 "fatal flex scanner internal error--end of buffer missed" );
1936 if ( yy_current_buffer->yy_fill_buffer == 0 )
1937 { /* Don't try to fill the buffer, so this is an EOF. */
1938 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1940 /* We matched a single character, the EOB, so
1941 * treat this as a final EOF.
1943 return EOB_ACT_END_OF_FILE;
1948 /* We matched some text prior to the EOB, first
1951 return EOB_ACT_LAST_MATCH;
1955 /* Try to read more data. */
1957 /* First move last chars to start of buffer. */
1958 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1960 for ( i = 0; i < number_to_move; ++i )
1961 *(dest++) = *(source++);
1963 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1964 /* don't do the read, it's not guaranteed to return an EOF,
1967 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1972 yy_current_buffer->yy_buf_size - number_to_move - 1;
1974 while ( num_to_read <= 0 )
1975 { /* Not enough room in the buffer - grow it. */
1976 #ifdef YY_USES_REJECT
1978 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1981 /* just a shorter name for the current buffer */
1982 YY_BUFFER_STATE b = yy_current_buffer;
1984 int yy_c_buf_p_offset =
1985 (int) (yy_c_buf_p - b->yy_ch_buf);
1987 if ( b->yy_is_our_buffer )
1989 int new_size = b->yy_buf_size * 2;
1991 if ( new_size <= 0 )
1992 b->yy_buf_size += b->yy_buf_size / 8;
1994 b->yy_buf_size *= 2;
1996 b->yy_ch_buf = (char *)
1997 /* Include room in for 2 EOB chars. */
1998 yy_flex_realloc( (void *) b->yy_ch_buf,
1999 b->yy_buf_size + 2 );
2002 /* Can't grow it, we don't own it. */
2005 if ( ! b->yy_ch_buf )
2007 "fatal error - scanner input buffer overflow" );
2009 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2011 num_to_read = yy_current_buffer->yy_buf_size -
2016 if ( num_to_read > YY_READ_BUF_SIZE )
2017 num_to_read = YY_READ_BUF_SIZE;
2019 /* Read in more data. */
2020 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
2021 yy_n_chars, num_to_read );
2023 yy_current_buffer->yy_n_chars = yy_n_chars;
2026 if ( yy_n_chars == 0 )
2028 if ( number_to_move == YY_MORE_ADJ )
2030 ret_val = EOB_ACT_END_OF_FILE;
2036 ret_val = EOB_ACT_LAST_MATCH;
2037 yy_current_buffer->yy_buffer_status =
2038 YY_BUFFER_EOF_PENDING;
2043 ret_val = EOB_ACT_CONTINUE_SCAN;
2045 yy_n_chars += number_to_move;
2046 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
2047 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
2049 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
2055 /* yy_get_previous_state - get the state just before the EOB char was reached */
2057 static yy_state_type yy_get_previous_state()
2059 register yy_state_type yy_current_state;
2060 register char *yy_cp;
2062 yy_current_state = yy_start;
2063 yy_current_state += YY_AT_BOL();
2064 yy_state_ptr = yy_state_buf;
2065 *yy_state_ptr++ = yy_current_state;
2067 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
2069 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2070 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2072 yy_current_state = (int) yy_def[yy_current_state];
2073 if ( yy_current_state >= 347 )
2074 yy_c = yy_meta[(unsigned int) yy_c];
2076 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2077 *yy_state_ptr++ = yy_current_state;
2080 return yy_current_state;
2084 /* yy_try_NUL_trans - try to make a transition on the NUL character
2087 * next_state = yy_try_NUL_trans( current_state );
2090 #ifdef YY_USE_PROTOS
2091 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
2093 static yy_state_type yy_try_NUL_trans( yy_current_state )
2094 yy_state_type yy_current_state;
2097 register int yy_is_jam;
2099 register YY_CHAR yy_c = 1;
2100 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2102 yy_current_state = (int) yy_def[yy_current_state];
2103 if ( yy_current_state >= 347 )
2104 yy_c = yy_meta[(unsigned int) yy_c];
2106 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2107 yy_is_jam = (yy_current_state == 346);
2109 *yy_state_ptr++ = yy_current_state;
2111 return yy_is_jam ? 0 : yy_current_state;
2116 #ifdef YY_USE_PROTOS
2117 static void yyunput( int c, register char *yy_bp )
2119 static void yyunput( c, yy_bp )
2121 register char *yy_bp;
2124 register char *yy_cp = yy_c_buf_p;
2126 /* undo effects of setting up yytext */
2127 *yy_cp = yy_hold_char;
2129 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2130 { /* need to shift things up to make room */
2131 /* +2 for EOB chars. */
2132 register int number_to_move = yy_n_chars + 2;
2133 register char *dest = &yy_current_buffer->yy_ch_buf[
2134 yy_current_buffer->yy_buf_size + 2];
2135 register char *source =
2136 &yy_current_buffer->yy_ch_buf[number_to_move];
2138 while ( source > yy_current_buffer->yy_ch_buf )
2139 *--dest = *--source;
2141 yy_cp += (int) (dest - source);
2142 yy_bp += (int) (dest - source);
2143 yy_current_buffer->yy_n_chars =
2144 yy_n_chars = yy_current_buffer->yy_buf_size;
2146 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2147 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2150 *--yy_cp = (char) c;
2154 yy_hold_char = *yy_cp;
2157 #endif /* ifndef YY_NO_UNPUT */
2161 static int yyinput()
2168 *yy_c_buf_p = yy_hold_char;
2170 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2172 /* yy_c_buf_p now points to the character we want to return.
2173 * If this occurs *before* the EOB characters, then it's a
2174 * valid NUL; if not, then we've hit the end of the buffer.
2176 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2177 /* This was really a NUL. */
2181 { /* need more input */
2182 int offset = yy_c_buf_p - yytext_ptr;
2185 switch ( yy_get_next_buffer() )
2187 case EOB_ACT_LAST_MATCH:
2188 /* This happens because yy_g_n_b()
2189 * sees that we've accumulated a
2190 * token and flags that we need to
2191 * try matching the token before
2192 * proceeding. But for input(),
2193 * there's no matching to consider.
2194 * So convert the EOB_ACT_LAST_MATCH
2195 * to EOB_ACT_END_OF_FILE.
2198 /* Reset buffer status. */
2203 case EOB_ACT_END_OF_FILE:
2208 if ( ! yy_did_buffer_switch_on_eof )
2217 case EOB_ACT_CONTINUE_SCAN:
2218 yy_c_buf_p = yytext_ptr + offset;
2224 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
2225 *yy_c_buf_p = '\0'; /* preserve yytext */
2226 yy_hold_char = *++yy_c_buf_p;
2228 yy_current_buffer->yy_at_bol = (c == '\n');
2234 #ifdef YY_USE_PROTOS
2235 void yyrestart( FILE *input_file )
2237 void yyrestart( input_file )
2241 if ( ! yy_current_buffer )
2242 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
2244 yy_init_buffer( yy_current_buffer, input_file );
2245 yy_load_buffer_state();
2249 #ifdef YY_USE_PROTOS
2250 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
2252 void yy_switch_to_buffer( new_buffer )
2253 YY_BUFFER_STATE new_buffer;
2256 if ( yy_current_buffer == new_buffer )
2259 if ( yy_current_buffer )
2261 /* Flush out information for old buffer. */
2262 *yy_c_buf_p = yy_hold_char;
2263 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2264 yy_current_buffer->yy_n_chars = yy_n_chars;
2267 yy_current_buffer = new_buffer;
2268 yy_load_buffer_state();
2270 /* We don't actually know whether we did this switch during
2271 * EOF (yywrap()) processing, but the only time this flag
2272 * is looked at is after yywrap() is called, so it's safe
2273 * to go ahead and always set it.
2275 yy_did_buffer_switch_on_eof = 1;
2279 #ifdef YY_USE_PROTOS
2280 void yy_load_buffer_state( void )
2282 void yy_load_buffer_state()
2285 yy_n_chars = yy_current_buffer->yy_n_chars;
2286 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2287 yyin = yy_current_buffer->yy_input_file;
2288 yy_hold_char = *yy_c_buf_p;
2292 #ifdef YY_USE_PROTOS
2293 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
2295 YY_BUFFER_STATE yy_create_buffer( file, size )
2302 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2304 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2306 b->yy_buf_size = size;
2308 /* yy_ch_buf has to be 2 characters longer than the size given because
2309 * we need to put in 2 end-of-buffer characters.
2311 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
2312 if ( ! b->yy_ch_buf )
2313 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2315 b->yy_is_our_buffer = 1;
2317 yy_init_buffer( b, file );
2323 #ifdef YY_USE_PROTOS
2324 void yy_delete_buffer( YY_BUFFER_STATE b )
2326 void yy_delete_buffer( b )
2333 if ( b == yy_current_buffer )
2334 yy_current_buffer = (YY_BUFFER_STATE) 0;
2336 if ( b->yy_is_our_buffer )
2337 yy_flex_free( (void *) b->yy_ch_buf );
2339 yy_flex_free( (void *) b );
2343 #ifndef YY_ALWAYS_INTERACTIVE
2344 #ifndef YY_NEVER_INTERACTIVE
2345 extern int isatty YY_PROTO(( int ));
2349 #ifdef YY_USE_PROTOS
2350 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
2352 void yy_init_buffer( b, file )
2359 yy_flush_buffer( b );
2361 b->yy_input_file = file;
2362 b->yy_fill_buffer = 1;
2364 #if YY_ALWAYS_INTERACTIVE
2365 b->yy_is_interactive = 1;
2367 #if YY_NEVER_INTERACTIVE
2368 b->yy_is_interactive = 0;
2370 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2376 #ifdef YY_USE_PROTOS
2377 void yy_flush_buffer( YY_BUFFER_STATE b )
2379 void yy_flush_buffer( b )
2389 /* We always need two end-of-buffer characters. The first causes
2390 * a transition to the end-of-buffer state. The second causes
2391 * a jam in that state.
2393 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2394 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2396 b->yy_buf_pos = &b->yy_ch_buf[0];
2399 b->yy_buffer_status = YY_BUFFER_NEW;
2401 if ( b == yy_current_buffer )
2402 yy_load_buffer_state();
2406 #ifndef YY_NO_SCAN_BUFFER
2407 #ifdef YY_USE_PROTOS
2408 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
2410 YY_BUFFER_STATE yy_scan_buffer( base, size )
2418 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2419 base[size-1] != YY_END_OF_BUFFER_CHAR )
2420 /* They forgot to leave room for the EOB's. */
2423 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2425 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2427 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2428 b->yy_buf_pos = b->yy_ch_buf = base;
2429 b->yy_is_our_buffer = 0;
2430 b->yy_input_file = 0;
2431 b->yy_n_chars = b->yy_buf_size;
2432 b->yy_is_interactive = 0;
2434 b->yy_fill_buffer = 0;
2435 b->yy_buffer_status = YY_BUFFER_NEW;
2437 yy_switch_to_buffer( b );
2444 #ifndef YY_NO_SCAN_STRING
2445 #ifdef YY_USE_PROTOS
2446 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
2448 YY_BUFFER_STATE yy_scan_string( yy_str )
2449 yyconst char *yy_str;
2453 for ( len = 0; yy_str[len]; ++len )
2456 return yy_scan_bytes( yy_str, len );
2461 #ifndef YY_NO_SCAN_BYTES
2462 #ifdef YY_USE_PROTOS
2463 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
2465 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
2466 yyconst char *bytes;
2475 /* Get memory for full buffer, including space for trailing EOB's. */
2477 buf = (char *) yy_flex_alloc( n );
2479 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2481 for ( i = 0; i < len; ++i )
2484 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2486 b = yy_scan_buffer( buf, n );
2488 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2490 /* It's okay to grow etc. this buffer, and we should throw it
2491 * away when we're done.
2493 b->yy_is_our_buffer = 1;
2500 #ifndef YY_NO_PUSH_STATE
2501 #ifdef YY_USE_PROTOS
2502 static void yy_push_state( int new_state )
2504 static void yy_push_state( new_state )
2508 if ( yy_start_stack_ptr >= yy_start_stack_depth )
2512 yy_start_stack_depth += YY_START_STACK_INCR;
2513 new_size = yy_start_stack_depth * sizeof( int );
2515 if ( ! yy_start_stack )
2516 yy_start_stack = (int *) yy_flex_alloc( new_size );
2519 yy_start_stack = (int *) yy_flex_realloc(
2520 (void *) yy_start_stack, new_size );
2522 if ( ! yy_start_stack )
2524 "out of memory expanding start-condition stack" );
2527 yy_start_stack[yy_start_stack_ptr++] = YY_START;
2534 #ifndef YY_NO_POP_STATE
2535 static void yy_pop_state()
2537 if ( --yy_start_stack_ptr < 0 )
2538 YY_FATAL_ERROR( "start-condition stack underflow" );
2540 BEGIN(yy_start_stack[yy_start_stack_ptr]);
2545 #ifndef YY_NO_TOP_STATE
2546 static int yy_top_state()
2548 return yy_start_stack[yy_start_stack_ptr - 1];
2552 #ifndef YY_EXIT_FAILURE
2553 #define YY_EXIT_FAILURE 2
2556 #ifdef YY_USE_PROTOS
2557 static void yy_fatal_error( yyconst char msg[] )
2559 static void yy_fatal_error( msg )
2563 (void) fprintf( stderr, "%s\n", msg );
2564 exit( YY_EXIT_FAILURE );
2569 /* Redefine yyless() so it works in section 3 code. */
2575 /* Undo effects of setting up yytext. */ \
2576 yytext[yyleng] = yy_hold_char; \
2577 yy_c_buf_p = yytext + n; \
2578 yy_hold_char = *yy_c_buf_p; \
2579 *yy_c_buf_p = '\0'; \
2585 /* Internal utility routines. */
2588 #ifdef YY_USE_PROTOS
2589 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2591 static void yy_flex_strncpy( s1, s2, n )
2598 for ( i = 0; i < n; ++i )
2603 #ifdef YY_NEED_STRLEN
2604 #ifdef YY_USE_PROTOS
2605 static int yy_flex_strlen( yyconst char *s )
2607 static int yy_flex_strlen( s )
2612 for ( n = 0; s[n]; ++n )
2620 #ifdef YY_USE_PROTOS
2621 static void *yy_flex_alloc( yy_size_t size )
2623 static void *yy_flex_alloc( size )
2627 return (void *) malloc( size );
2630 #ifdef YY_USE_PROTOS
2631 static void *yy_flex_realloc( void *ptr, yy_size_t size )
2633 static void *yy_flex_realloc( ptr, size )
2638 /* The cast to (char *) in the following accommodates both
2639 * implementations that use char* generic pointers, and those
2640 * that use void* generic pointers. It works with the latter
2641 * because both ANSI C and C++ allow castless assignment from
2642 * any pointer type to void*, and deal with argument conversions
2643 * as though doing an assignment.
2645 return (void *) realloc( (char *) ptr, size );
2648 #ifdef YY_USE_PROTOS
2649 static void yy_flex_free( void *ptr )
2651 static void yy_flex_free( ptr )