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
15 /* 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 89
288 #define YY_END_OF_BUFFER 90
289 static yyconst short int yy_acclist[420] =
291 90, 87, 89, 86, 87, 89, 1, 88, 89, 87,
292 88, 89, 87, 89, 87, 89, 86, 87, 89, 87,
293 89, 87, 89, 87, 89, 27, 87, 89, 1, 28,
294 88, 89, 27, 87, 88, 89, 27, 87, 89, 27,
295 87, 89, 27, 87, 89, 50, 87, 89, 1, 51,
296 88, 89, 50, 87, 88, 89, 43, 50, 87, 89,
297 50, 87, 89, 50, 87, 89, 50, 87, 89, 48,
298 50, 87, 89, 49, 50, 87, 89, 50, 87, 89,
299 50, 87, 89, 46, 87, 89, 1, 47, 88, 89,
300 46, 87, 88, 89, 45, 46, 87, 89, 46, 87,
302 89, 46, 87, 89, 87, 89, 87, 89, 78, 87,
303 89, 78, 87, 89, 87, 89, 81, 87, 89, 81,
304 87, 89, 81, 87, 89, 81, 87, 89, 83, 87,
305 89, 87, 89, 87, 89, 87, 89, 81, 87, 89,
306 81, 87, 89, 81, 87, 89, 81, 87, 89, 81,
307 87, 89, 81, 87, 89, 81, 87, 89, 81, 87,
308 89, 81, 87, 89, 81, 87, 89, 81, 87, 89,
309 81, 87, 89, 84, 87, 89, 85, 87, 89, 10,
310 87, 89, 10, 87, 88, 89, 10, 87, 89, 10,
311 87, 89, 10, 87, 89, 10, 87, 89, 15, 87,
313 89, 15, 87, 88, 89, 15, 87, 89, 15, 87,
314 89, 15, 87, 89, 15, 87, 89, 18, 87, 89,
315 18, 87, 88, 89, 18, 87, 89, 18, 87, 89,
316 22, 34, 26, 23, 42, 35, 44, 78, 24, 78,
317 78, 80, 81, 79, 81, 81, 81, 25, 82, 81,
318 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
319 81, 81, 81, 81, 81, 81, 81, 9, 7, 14,
320 11, 13, 12, 14, 17, 16, 3, 29, 33, 40,
321 36, 38, 19, 78, 20, 78, 78, 80, 80, 79,
322 81, 81, 81, 69, 21, 81, 81, 81, 81, 81,
324 81, 81, 64, 81, 81, 81, 81, 81, 81, 81,
325 81, 81, 81, 81, 81, 81, 12, 30, 31, 32,
326 41, 37, 39, 80, 81, 55, 81, 54, 81, 6,
327 81, 67, 81, 81, 81, 81, 59, 81, 81, 62,
328 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
329 81, 56, 81, 8, 52, 81, 54, 81, 68, 81,
330 81, 65, 81, 81, 81, 81, 81, 63, 81, 81,
331 81, 81, 58, 81, 81, 81, 81, 81, 66, 81,
332 81, 81, 81, 70, 81, 76, 81, 60, 81, 57,
333 81, 81, 81, 4, 81, 81, 81, 71, 81, 81,
335 81, 75, 81, 74, 81, 81, 77, 81, 81, 61,
336 81, 73, 81, 72, 81, 4, 2, 5, 53
339 static yyconst short int yy_accept[376] =
341 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
342 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
343 4, 7, 10, 13, 15, 17, 20, 22, 24, 26,
344 29, 33, 37, 40, 43, 46, 49, 53, 57, 61,
345 64, 67, 70, 74, 78, 81, 84, 87, 91, 95,
346 99, 102, 105, 107, 109, 112, 115, 117, 120, 123,
347 126, 129, 132, 134, 136, 138, 141, 144, 147, 150,
348 153, 156, 159, 162, 165, 168, 171, 174, 177, 180,
349 183, 187, 190, 193, 196, 199, 202, 206, 209, 212,
350 215, 218, 221, 225, 228, 231, 232, 232, 232, 232,
352 232, 232, 232, 232, 232, 232, 233, 233, 234, 234,
353 234, 234, 234, 234, 235, 235, 236, 236, 236, 237,
354 238, 239, 240, 240, 240, 241, 241, 241, 242, 243,
355 244, 245, 246, 247, 248, 248, 249, 249, 249, 249,
356 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
357 260, 261, 262, 263, 264, 265, 266, 267, 268, 269,
358 269, 269, 269, 270, 270, 271, 271, 271, 271, 272,
359 273, 273, 275, 276, 277, 277, 278, 278, 278, 278,
360 278, 279, 279, 279, 280, 280, 280, 280, 280, 281,
361 281, 281, 281, 282, 283, 283, 284, 284, 285, 285,
363 286, 287, 288, 289, 290, 291, 292, 293, 294, 295,
364 295, 295, 296, 296, 296, 297, 298, 299, 300, 301,
365 302, 303, 305, 306, 307, 308, 309, 310, 311, 312,
366 313, 314, 315, 316, 317, 317, 318, 318, 318, 318,
367 319, 319, 320, 321, 321, 321, 321, 322, 323, 324,
368 324, 325, 326, 328, 330, 330, 331, 332, 334, 335,
369 336, 337, 339, 340, 342, 343, 344, 345, 346, 347,
370 348, 349, 350, 351, 352, 354, 354, 355, 355, 355,
371 356, 356, 356, 356, 356, 356, 356, 356, 357, 359,
372 361, 362, 364, 365, 366, 367, 368, 370, 371, 372,
374 373, 375, 376, 377, 377, 377, 377, 377, 377, 377,
375 377, 378, 379, 381, 382, 383, 384, 386, 388, 390,
376 392, 393, 394, 395, 395, 395, 395, 395, 395, 396,
377 397, 398, 400, 401, 402, 404, 404, 404, 404, 404,
378 404, 404, 406, 407, 409, 410, 412, 412, 412, 412,
379 412, 412, 412, 412, 414, 416, 416, 417, 417, 417,
380 417, 418, 418, 418, 418, 418, 419, 419, 419, 419,
381 419, 419, 419, 420, 420
384 static yyconst int yy_ec[256] =
386 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
387 1, 4, 5, 1, 1, 1, 1, 1, 1, 1,
388 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
389 1, 6, 1, 7, 8, 1, 9, 1, 10, 11,
390 12, 13, 1, 1, 1, 14, 15, 16, 17, 18,
391 18, 18, 18, 18, 18, 19, 19, 20, 1, 21,
392 1, 22, 1, 1, 23, 23, 23, 23, 24, 23,
393 25, 25, 26, 25, 25, 25, 25, 25, 25, 25,
394 25, 27, 28, 25, 25, 25, 25, 25, 25, 25,
395 29, 30, 31, 1, 25, 1, 32, 33, 34, 35,
397 36, 37, 38, 39, 40, 25, 25, 41, 42, 43,
398 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
399 25, 25, 54, 1, 55, 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,
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,
406 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
408 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
409 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
410 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
411 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
412 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
416 static yyconst int yy_meta[56] =
418 1, 2, 3, 4, 4, 2, 1, 1, 1, 1,
419 1, 1, 1, 1, 1, 5, 5, 5, 5, 6,
420 1, 1, 7, 7, 8, 8, 8, 8, 1, 1,
421 9, 7, 7, 7, 7, 7, 7, 8, 8, 8,
422 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
426 static yyconst short int yy_base[402] =
428 0, 33, 4, 5, 17, 78, 16, 46, 133, 919,
429 175, 918, 47, 53, 60, 89, 65, 93, 925, 928,
430 928, 928, 928, 1, 883, 27, 38, 30, 887, 928,
431 928, 928, 907, 190, 893, 928, 928, 928, 928, 70,
432 13, 0, 928, 928, 192, 865, 928, 928, 928, 928,
433 0, 193, 93, 30, 221, 99, 0, 899, 62, 10,
434 84, 928, 112, 92, 225, 171, 183, 70, 79, 173,
435 185, 177, 69, 216, 228, 226, 231, 928, 928, 928,
436 928, 903, 200, 243, 255, 928, 928, 902, 270, 248,
437 279, 913, 912, 244, 284, 928, 911, 881, 258, 876,
439 289, 871, 224, 244, 80, 928, 864, 928, 0, 899,
440 245, 898, 897, 928, 903, 928, 295, 862, 928, 928,
441 290, 928, 901, 294, 300, 310, 0, 323, 883, 882,
442 881, 283, 235, 282, 886, 886, 895, 315, 866, 867,
443 300, 323, 324, 325, 301, 303, 327, 328, 329, 181,
444 330, 332, 334, 337, 338, 339, 341, 340, 928, 360,
445 361, 380, 928, 387, 928, 389, 394, 402, 928, 408,
446 880, 928, 928, 928, 891, 928, 845, 849, 850, 836,
447 928, 857, 834, 928, 833, 846, 835, 857, 928, 873,
448 872, 871, 928, 928, 877, 928, 845, 399, 875, 928,
450 403, 0, 857, 856, 855, 364, 356, 379, 928, 422,
451 871, 928, 842, 413, 383, 393, 386, 403, 361, 406,
452 415, 852, 416, 417, 418, 419, 421, 423, 349, 422,
453 429, 425, 426, 432, 454, 928, 823, 834, 401, 928,
454 834, 928, 928, 817, 827, 840, 928, 928, 928, 824,
455 844, 433, 843, 842, 474, 928, 441, 835, 438, 439,
456 443, 827, 446, 826, 451, 458, 268, 459, 462, 465,
457 469, 467, 471, 472, 817, 502, 928, 510, 512, 928,
458 494, 786, 785, 788, 772, 0, 763, 487, 473, 773,
459 497, 747, 486, 482, 500, 501, 732, 499, 504, 507,
461 718, 508, 509, 530, 684, 612, 609, 621, 632, 620,
462 517, 518, 634, 522, 523, 524, 633, 631, 617, 607,
463 525, 530, 560, 514, 590, 577, 608, 575, 532, 534,
464 544, 585, 547, 535, 584, 588, 549, 546, 580, 570,
465 588, 554, 555, 552, 564, 545, 546, 449, 365, 590,
466 584, 598, 4, 276, 242, 246, 928, 176, 604, 612,
467 928, 590, 165, 616, 591, 928, 85, 622, 17, 626,
468 644, 646, 928, 928, 663, 672, 681, 690, 699, 708,
469 717, 726, 735, 738, 742, 746, 755, 764, 773, 782,
470 787, 790, 794, 802, 807, 815, 819, 826, 834, 843,
475 static yyconst short int yy_def[402] =
477 375, 375, 376, 376, 377, 377, 378, 378, 374, 9,
478 9, 11, 379, 379, 380, 380, 381, 381, 374, 374,
479 374, 374, 374, 374, 374, 374, 374, 374, 374, 374,
480 374, 374, 374, 374, 374, 374, 374, 374, 374, 374,
481 374, 382, 374, 374, 374, 374, 374, 374, 374, 374,
482 383, 374, 374, 374, 374, 374, 384, 385, 385, 385,
483 385, 374, 374, 374, 386, 385, 385, 385, 385, 385,
484 385, 385, 385, 385, 385, 385, 385, 374, 374, 374,
485 374, 374, 374, 374, 374, 374, 374, 374, 374, 374,
486 374, 374, 374, 374, 374, 374, 387, 374, 374, 374,
488 374, 374, 374, 374, 374, 374, 374, 374, 388, 374,
489 374, 374, 374, 374, 389, 374, 374, 374, 374, 374,
490 374, 374, 390, 374, 374, 374, 391, 374, 392, 385,
491 393, 385, 385, 385, 374, 374, 394, 374, 395, 374,
492 385, 385, 385, 385, 385, 385, 385, 385, 385, 385,
493 385, 385, 385, 385, 385, 385, 385, 385, 374, 374,
494 374, 374, 374, 396, 374, 374, 374, 374, 374, 374,
495 374, 374, 374, 374, 387, 374, 374, 374, 374, 374,
496 374, 374, 374, 374, 374, 374, 374, 374, 374, 374,
497 374, 374, 374, 374, 389, 374, 374, 374, 390, 374,
499 374, 391, 392, 397, 393, 385, 385, 385, 374, 374,
500 394, 374, 395, 386, 385, 385, 385, 385, 385, 385,
501 385, 385, 385, 385, 385, 385, 385, 385, 385, 385,
502 385, 385, 385, 385, 398, 374, 374, 374, 374, 374,
503 374, 374, 374, 374, 374, 374, 374, 374, 374, 374,
504 397, 385, 385, 385, 374, 374, 385, 385, 385, 385,
505 385, 385, 385, 385, 385, 385, 385, 385, 385, 385,
506 385, 385, 385, 385, 385, 374, 374, 398, 374, 374,
507 374, 374, 374, 374, 374, 399, 374, 385, 385, 385,
508 385, 385, 385, 385, 385, 385, 385, 385, 385, 385,
510 385, 385, 385, 374, 374, 374, 374, 374, 374, 374,
511 385, 385, 385, 385, 385, 385, 385, 385, 385, 385,
512 385, 385, 374, 374, 374, 374, 374, 374, 385, 385,
513 385, 385, 385, 385, 385, 374, 374, 374, 374, 374,
514 374, 385, 385, 385, 385, 385, 400, 374, 374, 374,
515 374, 374, 374, 385, 385, 400, 374, 374, 374, 374,
516 374, 401, 374, 374, 401, 374, 374, 374, 374, 374,
517 374, 374, 374, 0, 374, 374, 374, 374, 374, 374,
518 374, 374, 374, 374, 374, 374, 374, 374, 374, 374,
519 374, 374, 374, 374, 374, 374, 374, 374, 374, 374,
524 static yyconst short int yy_nxt[984] =
526 374, 21, 22, 21, 23, 21, 31, 31, 32, 32,
527 362, 374, 34, 96, 24, 97, 33, 33, 48, 37,
528 49, 38, 50, 39, 362, 114, 40, 115, 99, 131,
529 35, 41, 99, 25, 26, 22, 21, 23, 26, 101,
530 27, 28, 122, 101, 123, 51, 42, 24, 48, 22,
531 49, 81, 50, 52, 83, 22, 133, 81, 83, 82,
532 84, 103, 22, 185, 87, 85, 25, 22, 104, 93,
533 43, 44, 88, 100, 105, 51, 110, 94, 102, 29,
534 37, 131, 38, 106, 39, 45, 46, 40, 131, 131,
535 89, 22, 41, 87, 89, 22, 90, 93, 131, 111,
537 95, 91, 132, 131, 136, 94, 137, 42, 121, 121,
538 121, 121, 124, 145, 128, 128, 128, 128, 185, 150,
539 369, 146, 134, 112, 113, 135, 186, 121, 121, 121,
540 121, 43, 44, 20, 21, 22, 21, 23, 21, 20,
541 20, 20, 20, 20, 20, 20, 53, 54, 55, 56,
542 56, 56, 57, 20, 20, 58, 58, 58, 58, 58,
543 58, 20, 20, 20, 58, 58, 59, 58, 58, 60,
544 58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
545 58, 61, 58, 58, 58, 58, 62, 20, 63, 64,
546 131, 101, 131, 117, 101, 101, 131, 117, 101, 367,
548 131, 160, 131, 65, 131, 160, 66, 363, 67, 68,
549 69, 70, 161, 147, 71, 72, 224, 141, 73, 74,
550 149, 142, 75, 143, 76, 77, 144, 148, 78, 79,
551 102, 118, 102, 102, 124, 131, 125, 125, 125, 126,
552 138, 138, 138, 138, 101, 131, 173, 131, 101, 101,
553 131, 190, 357, 101, 131, 140, 162, 163, 174, 99,
554 164, 131, 151, 99, 179, 152, 153, 154, 156, 159,
555 157, 166, 180, 127, 158, 166, 155, 181, 207, 182,
556 168, 169, 167, 102, 170, 101, 173, 131, 102, 101,
557 101, 171, 183, 172, 101, 131, 117, 184, 191, 192,
559 117, 131, 131, 295, 100, 198, 198, 198, 198, 201,
560 201, 201, 201, 124, 206, 125, 125, 125, 126, 131,
561 131, 208, 131, 124, 102, 126, 126, 126, 126, 102,
562 138, 138, 138, 138, 118, 102, 124, 215, 128, 128,
563 128, 128, 131, 131, 131, 140, 131, 131, 131, 131,
564 219, 131, 220, 131, 216, 217, 131, 131, 131, 131,
565 131, 160, 162, 163, 227, 160, 164, 218, 131, 225,
566 221, 223, 161, 226, 229, 131, 222, 228, 231, 234,
567 131, 162, 163, 131, 230, 162, 232, 233, 162, 163,
568 166, 270, 162, 261, 166, 168, 169, 253, 131, 170,
570 358, 167, 131, 168, 169, 131, 171, 168, 236, 168,
571 169, 252, 131, 168, 198, 198, 198, 198, 201, 201,
572 201, 201, 131, 255, 256, 131, 254, 255, 138, 138,
573 138, 138, 257, 259, 131, 131, 131, 131, 131, 258,
574 131, 131, 131, 140, 131, 131, 263, 262, 131, 282,
575 260, 131, 131, 264, 181, 276, 277, 131, 131, 276,
576 131, 268, 131, 265, 273, 131, 275, 267, 266, 269,
577 131, 271, 272, 279, 274, 255, 256, 131, 131, 255,
578 254, 131, 288, 291, 131, 289, 131, 290, 131, 294,
579 131, 131, 131, 183, 292, 304, 298, 293, 296, 304,
581 299, 131, 300, 276, 277, 131, 131, 276, 302, 301,
582 297, 276, 277, 276, 277, 276, 131, 276, 131, 131,
583 131, 303, 311, 131, 312, 314, 131, 131, 131, 279,
584 315, 304, 313, 316, 317, 304, 131, 131, 319, 318,
585 322, 131, 131, 131, 131, 323, 323, 323, 323, 131,
586 321, 131, 357, 131, 131, 320, 331, 330, 332, 329,
587 334, 336, 337, 131, 131, 336, 131, 184, 343, 346,
588 335, 131, 333, 131, 131, 323, 323, 323, 323, 344,
589 342, 350, 345, 131, 349, 350, 351, 352, 352, 353,
590 354, 350, 348, 353, 347, 350, 366, 366, 355, 360,
592 360, 360, 360, 131, 131, 359, 359, 359, 359, 361,
593 341, 366, 366, 360, 360, 360, 360, 364, 340, 359,
594 359, 359, 359, 361, 339, 338, 131, 360, 360, 360,
595 360, 368, 368, 368, 368, 370, 131, 368, 368, 368,
596 368, 371, 371, 371, 371, 372, 373, 372, 373, 372,
597 131, 372, 131, 131, 328, 327, 326, 325, 324, 371,
598 371, 371, 371, 20, 20, 20, 20, 20, 20, 20,
599 20, 20, 30, 30, 30, 30, 30, 30, 30, 30,
600 30, 36, 36, 36, 36, 36, 36, 36, 36, 36,
601 47, 47, 47, 47, 47, 47, 47, 47, 47, 80,
603 80, 80, 80, 80, 80, 80, 80, 80, 86, 86,
604 86, 86, 86, 86, 86, 86, 86, 92, 92, 92,
605 92, 92, 92, 92, 92, 92, 116, 116, 180, 116,
606 116, 116, 116, 116, 116, 120, 120, 131, 120, 120,
607 120, 120, 120, 120, 129, 129, 130, 130, 130, 130,
608 139, 131, 139, 139, 139, 175, 175, 175, 175, 175,
609 175, 175, 175, 175, 188, 188, 131, 188, 188, 188,
610 188, 188, 188, 195, 195, 195, 195, 195, 195, 195,
611 195, 195, 199, 199, 199, 199, 199, 199, 199, 199,
612 199, 202, 131, 202, 203, 203, 203, 203, 205, 205,
614 205, 205, 211, 211, 211, 211, 211, 211, 211, 211,
615 211, 213, 310, 213, 213, 213, 235, 235, 308, 307,
616 306, 235, 235, 251, 251, 251, 251, 278, 278, 305,
617 278, 278, 278, 278, 309, 309, 131, 309, 309, 309,
618 309, 309, 309, 356, 356, 131, 131, 356, 356, 356,
619 356, 356, 365, 365, 131, 365, 365, 365, 365, 365,
620 365, 131, 131, 204, 287, 286, 285, 284, 283, 281,
621 280, 131, 140, 212, 131, 204, 204, 200, 250, 196,
622 249, 248, 247, 246, 245, 244, 243, 242, 241, 240,
623 239, 238, 237, 176, 236, 214, 140, 212, 210, 209,
625 131, 131, 204, 200, 197, 196, 194, 193, 189, 187,
626 178, 107, 177, 176, 173, 173, 165, 159, 131, 119,
627 109, 108, 107, 98, 374, 27, 27, 19, 374, 374,
628 374, 374, 374, 374, 374, 374, 374, 374, 374, 374,
629 374, 374, 374, 374, 374, 374, 374, 374, 374, 374,
630 374, 374, 374, 374, 374, 374, 374, 374, 374, 374,
631 374, 374, 374, 374, 374, 374, 374, 374, 374, 374,
632 374, 374, 374, 374, 374, 374, 374, 374, 374, 374,
636 static yyconst short int yy_chk[984] =
638 0, 1, 1, 1, 1, 1, 3, 4, 3, 4,
639 353, 0, 4, 24, 1, 24, 3, 4, 7, 5,
640 7, 5, 7, 5, 353, 41, 5, 41, 26, 60,
641 4, 5, 26, 1, 2, 2, 2, 2, 2, 27,
642 2, 2, 54, 27, 54, 7, 5, 2, 8, 13,
643 8, 13, 8, 8, 14, 14, 60, 14, 14, 13,
644 14, 28, 15, 369, 15, 14, 2, 17, 28, 17,
645 5, 5, 15, 26, 28, 8, 40, 17, 27, 2,
646 6, 59, 6, 28, 6, 6, 6, 6, 73, 68,
647 16, 16, 6, 16, 16, 18, 16, 18, 69, 40,
649 18, 16, 59, 61, 64, 18, 64, 6, 53, 53,
650 53, 53, 56, 68, 56, 56, 56, 56, 105, 73,
651 367, 69, 61, 40, 40, 63, 105, 63, 63, 63,
652 63, 6, 6, 9, 9, 9, 9, 9, 9, 9,
653 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
654 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
655 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
656 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
657 9, 9, 9, 9, 9, 9, 9, 9, 11, 11,
658 66, 34, 70, 45, 52, 34, 72, 45, 52, 363,
660 150, 83, 67, 11, 71, 83, 11, 358, 11, 11,
661 11, 11, 83, 70, 11, 11, 150, 66, 11, 11,
662 72, 67, 11, 67, 11, 11, 67, 71, 11, 11,
663 34, 45, 45, 52, 55, 74, 55, 55, 55, 55,
664 65, 65, 65, 65, 84, 76, 94, 75, 84, 90,
665 77, 111, 356, 90, 133, 65, 85, 85, 94, 99,
666 85, 355, 74, 99, 103, 74, 75, 75, 76, 85,
667 77, 89, 103, 55, 77, 89, 75, 103, 133, 104,
668 91, 91, 89, 84, 91, 95, 95, 267, 90, 95,
669 101, 91, 104, 91, 101, 354, 117, 104, 111, 111,
671 117, 134, 132, 267, 99, 121, 121, 121, 121, 124,
672 124, 124, 124, 125, 132, 125, 125, 125, 125, 141,
673 145, 134, 146, 126, 95, 126, 126, 126, 126, 101,
674 138, 138, 138, 138, 117, 117, 128, 141, 128, 128,
675 128, 128, 142, 143, 144, 138, 147, 148, 149, 151,
676 145, 152, 146, 153, 142, 143, 154, 155, 156, 158,
677 157, 160, 161, 161, 152, 160, 161, 144, 229, 151,
678 147, 149, 160, 151, 154, 207, 148, 153, 156, 158,
679 219, 162, 162, 206, 155, 162, 156, 157, 164, 164,
680 166, 229, 164, 219, 166, 167, 167, 207, 208, 167,
682 349, 166, 215, 168, 168, 217, 167, 168, 167, 170,
683 170, 206, 216, 170, 198, 198, 198, 198, 201, 201,
684 201, 201, 218, 210, 210, 220, 208, 210, 214, 214,
685 214, 214, 215, 217, 221, 223, 224, 225, 226, 216,
686 227, 230, 228, 214, 232, 233, 221, 220, 231, 239,
687 218, 234, 252, 223, 239, 235, 235, 259, 260, 235,
688 257, 227, 261, 224, 232, 263, 234, 226, 225, 228,
689 265, 230, 231, 235, 233, 255, 255, 266, 268, 255,
690 252, 269, 257, 261, 270, 259, 272, 260, 271, 266,
691 273, 274, 289, 348, 263, 281, 270, 265, 268, 281,
693 270, 294, 271, 276, 276, 293, 288, 276, 273, 272,
694 269, 278, 278, 279, 279, 278, 291, 279, 298, 295,
695 296, 274, 288, 299, 289, 293, 300, 302, 303, 278,
696 294, 304, 291, 295, 296, 304, 311, 312, 299, 298,
697 303, 314, 315, 316, 321, 304, 304, 304, 304, 322,
698 302, 329, 347, 330, 334, 300, 314, 312, 315, 311,
699 321, 323, 324, 331, 346, 323, 333, 324, 330, 334,
700 322, 344, 316, 342, 343, 323, 323, 323, 323, 331,
701 329, 339, 333, 345, 338, 339, 340, 340, 340, 341,
702 343, 350, 337, 341, 336, 350, 362, 365, 345, 351,
704 351, 351, 351, 335, 332, 350, 350, 350, 350, 352,
705 328, 362, 365, 352, 352, 352, 352, 359, 327, 359,
706 359, 359, 359, 360, 326, 325, 320, 360, 360, 360,
707 360, 364, 364, 364, 364, 368, 319, 368, 368, 368,
708 368, 370, 370, 370, 370, 371, 371, 372, 372, 371,
709 318, 372, 317, 313, 310, 309, 308, 307, 306, 371,
710 371, 371, 371, 375, 375, 375, 375, 375, 375, 375,
711 375, 375, 376, 376, 376, 376, 376, 376, 376, 376,
712 376, 377, 377, 377, 377, 377, 377, 377, 377, 377,
713 378, 378, 378, 378, 378, 378, 378, 378, 378, 379,
715 379, 379, 379, 379, 379, 379, 379, 379, 380, 380,
716 380, 380, 380, 380, 380, 380, 380, 381, 381, 381,
717 381, 381, 381, 381, 381, 381, 382, 382, 305, 382,
718 382, 382, 382, 382, 382, 383, 383, 301, 383, 383,
719 383, 383, 383, 383, 384, 384, 385, 385, 385, 385,
720 386, 297, 386, 386, 386, 387, 387, 387, 387, 387,
721 387, 387, 387, 387, 388, 388, 292, 388, 388, 388,
722 388, 388, 388, 389, 389, 389, 389, 389, 389, 389,
723 389, 389, 390, 390, 390, 390, 390, 390, 390, 390,
724 390, 391, 290, 391, 392, 392, 392, 392, 393, 393,
726 393, 393, 394, 394, 394, 394, 394, 394, 394, 394,
727 394, 395, 287, 395, 395, 395, 396, 396, 285, 284,
728 283, 396, 396, 397, 397, 397, 397, 398, 398, 282,
729 398, 398, 398, 398, 399, 399, 275, 399, 399, 399,
730 399, 399, 399, 400, 400, 264, 262, 400, 400, 400,
731 400, 400, 401, 401, 258, 401, 401, 401, 401, 401,
732 401, 254, 253, 251, 250, 246, 245, 244, 241, 238,
733 237, 222, 213, 211, 205, 204, 203, 199, 197, 195,
734 192, 191, 190, 188, 187, 186, 185, 183, 182, 180,
735 179, 178, 177, 175, 171, 140, 139, 137, 136, 135,
737 131, 130, 129, 123, 118, 115, 113, 112, 110, 107,
738 102, 100, 98, 97, 93, 92, 88, 82, 58, 46,
739 35, 33, 29, 25, 19, 12, 10, 374, 374, 374,
740 374, 374, 374, 374, 374, 374, 374, 374, 374, 374,
741 374, 374, 374, 374, 374, 374, 374, 374, 374, 374,
742 374, 374, 374, 374, 374, 374, 374, 374, 374, 374,
743 374, 374, 374, 374, 374, 374, 374, 374, 374, 374,
744 374, 374, 374, 374, 374, 374, 374, 374, 374, 374,
748 static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
749 static char *yy_full_match;
753 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
754 yy_cp = yy_full_match; /* restore poss. backed-over text */ \
758 #define yymore() yymore_used_but_not_detected
759 #define YY_MORE_ADJ 0
760 #define YY_RESTORE_YY_MORE_OFFSET
764 /* GOB C Preprocessor
765 * Copyright (C) 1999 the Free Software Foundation.
767 * Author: George Lebl
769 * This program is free software; you can redistribute it and/or modify
770 * it under the terms of the GNU General Public License as published by
771 * the Free Software Foundation; either version 2 of the License, or
772 * (at your option) any later version.
774 * This program is distributed in the hope that it will be useful,
775 * but WITHOUT ANY WARRANTY; without even the implied warranty of
776 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
777 * GNU General Public License for more details.
779 * You should have received a copy of the GNU General Public License
780 * along with this program; if not, write to the Free Software
781 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
791 #include "treefuncs.h"
796 static int parenth_depth = 0;
797 static int before_comment = INITIAL;
798 static gboolean class_after_c = FALSE;
799 static int code_type = CCODE;
802 static char *gtk_doc_func = NULL; /* current gtk-doc func */
803 GHashTable *gtk_doc_hash = NULL;
805 static GString *cbuf = NULL;
808 GList *include_files = NULL;
809 /* 0 no, 1 means yes, 2+ means don't even start looking anymore */
810 static int look_for_includes = 0;
813 /* last filename parsed from a #line directive */
814 char *hline_filename = NULL;
820 cbuf = g_string_new(NULL);
822 cbuf = g_string_assign(cbuf, "");
830 cbuf = g_string_new(s);
832 cbuf = g_string_append(cbuf,s);
837 add_gtk_doc_func(void)
843 gtk_doc_hash = g_hash_table_new(g_str_hash, g_str_equal);
844 g_hash_table_insert(gtk_doc_hash, gtk_doc_func, g_strdup(cbuf->str));
850 /* Ugly warning avoiding */
859 #define C_CODE_STRING 3
863 #define CLASS_CODE_I 5
865 #define GTK_DOC_BEFORE_NAME 6
869 #define GTK_DOC_LINE 8
873 /* Macros after this point can all be overridden by user definitions in
877 #ifndef YY_SKIP_YYWRAP
879 extern "C" int yywrap YY_PROTO(( void ));
881 extern int yywrap YY_PROTO(( void ));
886 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
890 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
893 #ifdef YY_NEED_STRLEN
894 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
899 static int yyinput YY_PROTO(( void ));
901 static int input YY_PROTO(( void ));
906 static int yy_start_stack_ptr = 0;
907 static int yy_start_stack_depth = 0;
908 static int *yy_start_stack = 0;
909 #ifndef YY_NO_PUSH_STATE
910 static void yy_push_state YY_PROTO(( int new_state ));
912 #ifndef YY_NO_POP_STATE
913 static void yy_pop_state YY_PROTO(( void ));
915 #ifndef YY_NO_TOP_STATE
916 static int yy_top_state YY_PROTO(( void ));
920 #define YY_NO_PUSH_STATE 1
921 #define YY_NO_POP_STATE 1
922 #define YY_NO_TOP_STATE 1
925 #ifdef YY_MALLOC_DECL
933 /* Just try to get by without declaring the routines. This will fail
934 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
935 * or sizeof(void*) != sizeof(int).
940 /* Amount of stuff to slurp up with each read. */
941 #ifndef YY_READ_BUF_SIZE
942 #define YY_READ_BUF_SIZE 8192
945 /* Copy whatever the last rule matched to the standard output. */
948 /* This used to be an fputs(), but since the string might contain NUL's,
949 * we now use fwrite().
951 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
954 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
955 * is returned in "result".
958 #define YY_INPUT(buf,result,max_size) \
959 if ( yy_current_buffer->yy_is_interactive ) \
962 for ( n = 0; n < max_size && \
963 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
966 buf[n++] = (char) c; \
967 if ( c == EOF && ferror( yyin ) ) \
968 YY_FATAL_ERROR( "input in flex scanner failed" ); \
971 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
972 && ferror( yyin ) ) \
973 YY_FATAL_ERROR( "input in flex scanner failed" );
976 /* No semi-colon after return; correct usage is to write "yyterminate();" -
977 * we don't want an extra ';' after the "return" because that will cause
978 * some compilers to complain about unreachable statements.
981 #define yyterminate() return YY_NULL
984 /* Number of entries by which start-condition stack grows. */
985 #ifndef YY_START_STACK_INCR
986 #define YY_START_STACK_INCR 25
989 /* Report a fatal error. */
990 #ifndef YY_FATAL_ERROR
991 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
994 /* Default declaration of generated scanner - a define so the user can
995 * easily add parameters.
998 #define YY_DECL int yylex YY_PROTO(( void ))
1001 /* Code executed at the beginning of each rule, after yytext and yyleng
1004 #ifndef YY_USER_ACTION
1005 #define YY_USER_ACTION
1008 /* Code executed at the end of each rule. */
1010 #define YY_BREAK break;
1013 #define YY_RULE_SETUP \
1015 yy_current_buffer->yy_at_bol = \
1016 (yytext[yyleng - 1] == '\n'); \
1021 register yy_state_type yy_current_state;
1022 register char *yy_cp = NULL, *yy_bp = NULL;
1023 register int yy_act;
1028 #line 1029 "lex.yy.c"
1039 yy_start = 1; /* first start state */
1047 if ( ! yy_current_buffer )
1049 yy_create_buffer( yyin, YY_BUF_SIZE );
1051 yy_load_buffer_state();
1054 while ( 1 ) /* loops until end-of-file is reached */
1058 /* Support of yytext. */
1059 *yy_cp = yy_hold_char;
1061 /* yy_bp points to the position in yy_ch_buf of the start of
1066 yy_current_state = yy_start;
1067 yy_current_state += YY_AT_BOL();
1068 yy_state_ptr = yy_state_buf;
1069 *yy_state_ptr++ = yy_current_state;
1073 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1074 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1076 yy_current_state = (int) yy_def[yy_current_state];
1077 if ( yy_current_state >= 375 )
1078 yy_c = yy_meta[(unsigned int) yy_c];
1080 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1081 *yy_state_ptr++ = yy_current_state;
1084 while ( yy_base[yy_current_state] != 928 );
1087 yy_current_state = *--yy_state_ptr;
1088 yy_lp = yy_accept[yy_current_state];
1089 find_rule: /* we branch to this label when backing up */
1090 for ( ; ; ) /* until we find what rule we matched */
1092 if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
1094 yy_act = yy_acclist[yy_lp];
1096 yy_full_match = yy_cp;
1101 yy_current_state = *--yy_state_ptr;
1102 yy_lp = yy_accept[yy_current_state];
1105 YY_DO_BEFORE_ACTION;
1108 do_action: /* This label is used only to access EOF actions. */
1112 { /* beginning of action switch */
1116 { line_no++; REJECT; }
1119 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1120 yy_c_buf_p = yy_cp -= 1;
1121 YY_DO_BEFORE_ACTION; /* set up yytext again */
1125 /* Thy evil easter egg */
1126 #define QQ(x) long x
1127 #define KK(x) =atoi(__(&,,x,))
1128 #define MM(x,a) {QQ(i);for(i=2;i<x;i++){a}}
1129 #define PP(Q) (P%Q)==0
1130 #define ___(x,y,z) if(x z y)
1131 #define __(a,x,y,z) a(yytext[y] x z)
1132 #define O__O(a,b) fprintf(stderr,"%s is %s!\n",a,b)
1133 QQ(m)=1;___(__(,==,2,'P'),__(,==,5,'M'),&&
1134 ){QQ(P)KK(8);MM(P,___(PP(i),,)m=0;)}__(,=,
1135 7,0);___(,,m){O__O(__( &,,8,),__(&,,2,));}
1147 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1148 yy_c_buf_p = yy_cp -= 1;
1149 YY_DO_BEFORE_ACTION; /* set up yytext again */
1152 { ; /*comment, ignore*/ }
1161 char *str=g_strdup(yytext);
1163 /* find first digit of line number */
1165 while(*p&&!isdigit(*p)) p++;
1168 /* find end of line number */
1169 while(*p&&isdigit(*p)) p++;
1172 /* find beginning of filename */
1177 /* find end of filename */
1178 if(p) p=strchr(p,'"');
1181 /* stash number (minus one because we don't count this line) */
1182 if(number) line_no=atoi(number)-1;
1184 /* stash filename */
1186 if(hline_filename) g_free(hline_filename);
1187 hline_filename=g_strdup(filename);
1198 if(look_for_includes==1) {
1201 char *str = g_strdup(yytext);
1202 file = strchr(str,'"');
1203 if(!file) file = strchr(str,'<');
1205 p = strchr(file,'"');
1206 if(!p) p = strchr(file,'>');
1208 include_files = g_list_prepend(include_files,g_strdup(file));
1215 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1216 yy_c_buf_p = yy_cp -= 1;
1217 YY_DO_BEFORE_ACTION; /* set up yytext again */
1221 /* eat out gtk doc stuff */
1222 BEGIN(GTK_DOC_BEFORE_NAME);
1227 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1228 yy_c_buf_p = yy_cp -= 1;
1229 YY_DO_BEFORE_ACTION; /* set up yytext again */
1233 /* empty doc lines */
1238 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1239 yy_c_buf_p = yy_cp -= 1;
1240 YY_DO_BEFORE_ACTION; /* set up yytext again */
1246 p = strchr(yytext, '*');
1247 g_free(gtk_doc_func);
1248 gtk_doc_func = g_strdup(p+2);
1249 p = strchr(gtk_doc_func, ':');
1251 g_strstrip(gtk_doc_func);
1258 BEGIN(CLASS_CODE_I);
1266 before_comment = CLASS_CODE_I;
1270 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1271 yy_c_buf_p = yy_cp -= 1;
1272 YY_DO_BEFORE_ACTION; /* set up yytext again */
1276 /* empty doc lines */
1277 add_to_cbuf(" *\n");
1284 BEGIN(CLASS_CODE_I);
1294 BEGIN(GTK_DOC_LINE);
1301 BEGIN(CLASS_CODE_I);
1309 before_comment = CLASS_CODE_I;
1316 BEGIN(CLASS_CODE_I);
1322 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1323 yy_c_buf_p = yy_cp -= 1;
1324 YY_DO_BEFORE_ACTION; /* set up yytext again */
1329 add_to_cbuf(yytext);
1338 add_to_cbuf(yytext);
1342 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1343 yy_c_buf_p = yy_cp -= 1;
1344 YY_DO_BEFORE_ACTION; /* set up yytext again */
1347 { add_to_cbuf(yytext); /*comment, ignore*/ }
1350 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1351 yy_c_buf_p = yy_cp -= 1;
1352 YY_DO_BEFORE_ACTION; /* set up yytext again */
1355 { ; /*comment, ignore*/ }
1358 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1359 yy_c_buf_p = yy_cp -= 1;
1360 YY_DO_BEFORE_ACTION; /* set up yytext again */
1363 { ; /*comment, ignore*/ }
1368 {BEGIN(COMMENT); before_comment = INITIAL; }
1374 add_to_cbuf(yytext);
1376 before_comment = C_CODE;
1382 {BEGIN(COMMENT); before_comment = CLASS_CODE; }
1387 {BEGIN(COMMENT); before_comment = CLASS_CODE_I; }
1393 if(before_comment == C_CODE) add_to_cbuf(yytext);
1394 BEGIN(before_comment);
1401 /* comment, ignore */
1402 if(before_comment == C_CODE) add_to_cbuf(yytext);
1409 /* comment, ignore */
1410 if(before_comment == C_CODE) add_to_cbuf(yytext);
1419 class_after_c = FALSE;
1422 ccode_line = line_no;
1431 class_after_c = FALSE;
1434 ccode_line = line_no;
1443 class_after_c = FALSE;
1446 ccode_line = line_no;
1455 class_after_c = FALSE;
1458 ccode_line = line_no;
1467 class_after_c = FALSE;
1470 ccode_line = line_no;
1479 class_after_c = FALSE;
1482 ccode_line = line_no;
1483 if(look_for_includes==0)
1484 look_for_includes=1;
1494 if(look_for_includes==1)
1495 look_for_includes=0;
1502 { add_to_cbuf(yytext); }
1507 { add_to_cbuf(yytext); }
1512 { add_to_cbuf(yytext); }
1517 { add_to_cbuf(yytext); }
1522 { add_to_cbuf(yytext); }
1527 { add_to_cbuf(yytext); }
1532 { add_to_cbuf(yytext); }
1538 BEGIN(C_CODE_STRING);
1539 add_to_cbuf(yytext);
1545 { add_to_cbuf(yytext); }
1552 add_to_cbuf(yytext);
1558 { add_to_cbuf(yytext); }
1563 { add_to_cbuf(yytext); }
1570 add_to_cbuf(yytext);
1578 if(parenth_depth<0) {
1580 } else if(parenth_depth==0 && class_after_c) {
1581 BEGIN(CLASS_CODE_I);
1586 add_to_cbuf(yytext);
1592 { add_to_cbuf(yytext); }
1597 { add_to_cbuf(yytext); }
1603 static int found_classes = 0;
1604 look_for_includes = 2;
1607 if(++found_classes > 1) {
1608 error_print(GOB_ERROR, line_no,
1609 "Only one class per file allowed");
1616 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1617 yy_c_buf_p = yy_cp -= 1;
1618 YY_DO_BEFORE_ACTION; /* set up yytext again */
1622 int maj = 0,min = 0,pl = 0;
1623 int rmaj = 0,rmin = 0,rpl = 0;
1624 int effective_maj = 0;
1625 int effective_rmaj = 0;
1628 sscanf(VERSION,"%d.%d.%d",&rmaj,&rmin,&rpl);
1629 effective_rmaj = rmaj;
1631 effective_rmaj = rmaj + 1;
1633 p = strchr(yytext,'r');
1634 g_assert(p); /* we MUST have found it */
1635 sscanf(p,"requires %d.%d.%d",&maj,&min,&pl);
1636 effective_maj = maj;
1638 effective_maj = maj + 1;
1641 (rmaj == maj && rmin < min) ||
1642 (rmaj == maj && rmin == min && rpl < pl)) {
1643 error_printf(GOB_ERROR, line_no,
1644 "GOB version at least %d.%d.%d required "
1646 "To upgrade your gob, see: "
1647 "http://www.5z.com/jirka/gob.html",
1648 maj, min, pl, VERSION);
1651 if(effective_rmaj != effective_maj) {
1652 error_printf(GOB_ERROR, line_no,
1653 "GOB major version %d required "
1655 "To upgrade your gob, see: "
1656 "http://www.5z.com/jirka/gob.html",
1666 error_printf(GOB_WARN, line_no,
1667 "'%s' keyword should not "
1668 "be used when generating "
1669 "C++ code", yytext);
1752 {yylval.line = line_no; return PUBLIC;}
1757 {yylval.line = line_no; return PRIVATE;}
1762 {yylval.line = line_no; return PROTECTED;}
1767 {yylval.line = line_no; return CLASSWIDE;}
1772 {yylval.line = line_no; return ARGUMENT;}
1777 {yylval.line = line_no; return VIRTUAL;}
1782 {yylval.line = line_no; return SIGNAL;}
1787 {yylval.line = line_no; return OVERRIDE;}
1793 yylval.id = g_strdup(yytext);
1801 /* this one is for a classname with a namespace */
1802 yylval.id = g_strdup(yytext);
1810 /* this is for a classname with an empty namespace */
1811 yylval.id = g_strdup(yytext);
1819 yylval.id = g_strdup(yytext);
1827 yylval.id = g_strdup(yytext);
1835 BEGIN(CLASS_CODE_I);
1845 class_after_c = TRUE;
1846 yylval.line = line_no;
1848 ccode_line = line_no;
1869 yylval.line = line_no;
1883 #line 1884 "lex.yy.c"
1884 case YY_STATE_EOF(INITIAL):
1885 case YY_STATE_EOF(COMMENT):
1886 case YY_STATE_EOF(C_CODE):
1887 case YY_STATE_EOF(C_CODE_STRING):
1888 case YY_STATE_EOF(CLASS_CODE):
1889 case YY_STATE_EOF(CLASS_CODE_I):
1890 case YY_STATE_EOF(GTK_DOC_BEFORE_NAME):
1891 case YY_STATE_EOF(GTK_DOC):
1892 case YY_STATE_EOF(GTK_DOC_LINE):
1895 case YY_END_OF_BUFFER:
1897 /* Amount of text matched not including the EOB char. */
1898 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1900 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1901 *yy_cp = yy_hold_char;
1902 YY_RESTORE_YY_MORE_OFFSET
1904 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1906 /* We're scanning a new file or input source. It's
1907 * possible that this happened because the user
1908 * just pointed yyin at a new source and called
1909 * yylex(). If so, then we have to assure
1910 * consistency between yy_current_buffer and our
1911 * globals. Here is the right place to do so, because
1912 * this is the first action (other than possibly a
1913 * back-up) that will match for the new input source.
1915 yy_n_chars = yy_current_buffer->yy_n_chars;
1916 yy_current_buffer->yy_input_file = yyin;
1917 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1920 /* Note that here we test for yy_c_buf_p "<=" to the position
1921 * of the first EOB in the buffer, since yy_c_buf_p will
1922 * already have been incremented past the NUL character
1923 * (since all states make transitions on EOB to the
1924 * end-of-buffer state). Contrast this with the test
1927 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1928 { /* This was really a NUL. */
1929 yy_state_type yy_next_state;
1931 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1933 yy_current_state = yy_get_previous_state();
1935 /* Okay, we're now positioned to make the NUL
1936 * transition. We couldn't have
1937 * yy_get_previous_state() go ahead and do it
1938 * for us because it doesn't know how to deal
1939 * with the possibility of jamming (and we don't
1940 * want to build jamming into it because then it
1941 * will run more slowly).
1944 yy_next_state = yy_try_NUL_trans( yy_current_state );
1946 yy_bp = yytext_ptr + YY_MORE_ADJ;
1948 if ( yy_next_state )
1950 /* Consume the NUL. */
1951 yy_cp = ++yy_c_buf_p;
1952 yy_current_state = yy_next_state;
1959 goto yy_find_action;
1963 else switch ( yy_get_next_buffer() )
1965 case EOB_ACT_END_OF_FILE:
1967 yy_did_buffer_switch_on_eof = 0;
1971 /* Note: because we've taken care in
1972 * yy_get_next_buffer() to have set up
1973 * yytext, we can now set up
1974 * yy_c_buf_p so that if some total
1975 * hoser (like flex itself) wants to
1976 * call the scanner after we return the
1977 * YY_NULL, it'll still work - another
1978 * YY_NULL will get returned.
1980 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1982 yy_act = YY_STATE_EOF(YY_START);
1988 if ( ! yy_did_buffer_switch_on_eof )
1994 case EOB_ACT_CONTINUE_SCAN:
1996 yytext_ptr + yy_amount_of_matched_text;
1998 yy_current_state = yy_get_previous_state();
2001 yy_bp = yytext_ptr + YY_MORE_ADJ;
2004 case EOB_ACT_LAST_MATCH:
2006 &yy_current_buffer->yy_ch_buf[yy_n_chars];
2008 yy_current_state = yy_get_previous_state();
2011 yy_bp = yytext_ptr + YY_MORE_ADJ;
2012 goto yy_find_action;
2019 "fatal flex scanner internal error--no action found" );
2020 } /* end of action switch */
2021 } /* end of scanning one token */
2022 } /* end of yylex */
2025 /* yy_get_next_buffer - try to read in a new buffer
2027 * Returns a code representing an action:
2028 * EOB_ACT_LAST_MATCH -
2029 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2030 * EOB_ACT_END_OF_FILE - end of file
2033 static int yy_get_next_buffer()
2035 register char *dest = yy_current_buffer->yy_ch_buf;
2036 register char *source = yytext_ptr;
2037 register int number_to_move, i;
2040 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
2042 "fatal flex scanner internal error--end of buffer missed" );
2044 if ( yy_current_buffer->yy_fill_buffer == 0 )
2045 { /* Don't try to fill the buffer, so this is an EOF. */
2046 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
2048 /* We matched a single character, the EOB, so
2049 * treat this as a final EOF.
2051 return EOB_ACT_END_OF_FILE;
2056 /* We matched some text prior to the EOB, first
2059 return EOB_ACT_LAST_MATCH;
2063 /* Try to read more data. */
2065 /* First move last chars to start of buffer. */
2066 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
2068 for ( i = 0; i < number_to_move; ++i )
2069 *(dest++) = *(source++);
2071 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2072 /* don't do the read, it's not guaranteed to return an EOF,
2075 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
2080 yy_current_buffer->yy_buf_size - number_to_move - 1;
2082 while ( num_to_read <= 0 )
2083 { /* Not enough room in the buffer - grow it. */
2084 #ifdef YY_USES_REJECT
2086 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
2089 /* just a shorter name for the current buffer */
2090 YY_BUFFER_STATE b = yy_current_buffer;
2092 int yy_c_buf_p_offset =
2093 (int) (yy_c_buf_p - b->yy_ch_buf);
2095 if ( b->yy_is_our_buffer )
2097 int new_size = b->yy_buf_size * 2;
2099 if ( new_size <= 0 )
2100 b->yy_buf_size += b->yy_buf_size / 8;
2102 b->yy_buf_size *= 2;
2104 b->yy_ch_buf = (char *)
2105 /* Include room in for 2 EOB chars. */
2106 yy_flex_realloc( (void *) b->yy_ch_buf,
2107 b->yy_buf_size + 2 );
2110 /* Can't grow it, we don't own it. */
2113 if ( ! b->yy_ch_buf )
2115 "fatal error - scanner input buffer overflow" );
2117 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2119 num_to_read = yy_current_buffer->yy_buf_size -
2124 if ( num_to_read > YY_READ_BUF_SIZE )
2125 num_to_read = YY_READ_BUF_SIZE;
2127 /* Read in more data. */
2128 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
2129 yy_n_chars, num_to_read );
2131 yy_current_buffer->yy_n_chars = yy_n_chars;
2134 if ( yy_n_chars == 0 )
2136 if ( number_to_move == YY_MORE_ADJ )
2138 ret_val = EOB_ACT_END_OF_FILE;
2144 ret_val = EOB_ACT_LAST_MATCH;
2145 yy_current_buffer->yy_buffer_status =
2146 YY_BUFFER_EOF_PENDING;
2151 ret_val = EOB_ACT_CONTINUE_SCAN;
2153 yy_n_chars += number_to_move;
2154 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
2155 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
2157 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
2163 /* yy_get_previous_state - get the state just before the EOB char was reached */
2165 static yy_state_type yy_get_previous_state()
2167 register yy_state_type yy_current_state;
2168 register char *yy_cp;
2170 yy_current_state = yy_start;
2171 yy_current_state += YY_AT_BOL();
2172 yy_state_ptr = yy_state_buf;
2173 *yy_state_ptr++ = yy_current_state;
2175 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
2177 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2178 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2180 yy_current_state = (int) yy_def[yy_current_state];
2181 if ( yy_current_state >= 375 )
2182 yy_c = yy_meta[(unsigned int) yy_c];
2184 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2185 *yy_state_ptr++ = yy_current_state;
2188 return yy_current_state;
2192 /* yy_try_NUL_trans - try to make a transition on the NUL character
2195 * next_state = yy_try_NUL_trans( current_state );
2198 #ifdef YY_USE_PROTOS
2199 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
2201 static yy_state_type yy_try_NUL_trans( yy_current_state )
2202 yy_state_type yy_current_state;
2205 register int yy_is_jam;
2207 register YY_CHAR yy_c = 1;
2208 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2210 yy_current_state = (int) yy_def[yy_current_state];
2211 if ( yy_current_state >= 375 )
2212 yy_c = yy_meta[(unsigned int) yy_c];
2214 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2215 yy_is_jam = (yy_current_state == 374);
2217 *yy_state_ptr++ = yy_current_state;
2219 return yy_is_jam ? 0 : yy_current_state;
2224 #ifdef YY_USE_PROTOS
2225 static void yyunput( int c, register char *yy_bp )
2227 static void yyunput( c, yy_bp )
2229 register char *yy_bp;
2232 register char *yy_cp = yy_c_buf_p;
2234 /* undo effects of setting up yytext */
2235 *yy_cp = yy_hold_char;
2237 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2238 { /* need to shift things up to make room */
2239 /* +2 for EOB chars. */
2240 register int number_to_move = yy_n_chars + 2;
2241 register char *dest = &yy_current_buffer->yy_ch_buf[
2242 yy_current_buffer->yy_buf_size + 2];
2243 register char *source =
2244 &yy_current_buffer->yy_ch_buf[number_to_move];
2246 while ( source > yy_current_buffer->yy_ch_buf )
2247 *--dest = *--source;
2249 yy_cp += (int) (dest - source);
2250 yy_bp += (int) (dest - source);
2251 yy_current_buffer->yy_n_chars =
2252 yy_n_chars = yy_current_buffer->yy_buf_size;
2254 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2255 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2258 *--yy_cp = (char) c;
2262 yy_hold_char = *yy_cp;
2265 #endif /* ifndef YY_NO_UNPUT */
2269 static int yyinput()
2276 *yy_c_buf_p = yy_hold_char;
2278 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2280 /* yy_c_buf_p now points to the character we want to return.
2281 * If this occurs *before* the EOB characters, then it's a
2282 * valid NUL; if not, then we've hit the end of the buffer.
2284 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2285 /* This was really a NUL. */
2289 { /* need more input */
2290 int offset = yy_c_buf_p - yytext_ptr;
2293 switch ( yy_get_next_buffer() )
2295 case EOB_ACT_LAST_MATCH:
2296 /* This happens because yy_g_n_b()
2297 * sees that we've accumulated a
2298 * token and flags that we need to
2299 * try matching the token before
2300 * proceeding. But for input(),
2301 * there's no matching to consider.
2302 * So convert the EOB_ACT_LAST_MATCH
2303 * to EOB_ACT_END_OF_FILE.
2306 /* Reset buffer status. */
2311 case EOB_ACT_END_OF_FILE:
2316 if ( ! yy_did_buffer_switch_on_eof )
2325 case EOB_ACT_CONTINUE_SCAN:
2326 yy_c_buf_p = yytext_ptr + offset;
2332 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
2333 *yy_c_buf_p = '\0'; /* preserve yytext */
2334 yy_hold_char = *++yy_c_buf_p;
2336 yy_current_buffer->yy_at_bol = (c == '\n');
2342 #ifdef YY_USE_PROTOS
2343 void yyrestart( FILE *input_file )
2345 void yyrestart( input_file )
2349 if ( ! yy_current_buffer )
2350 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
2352 yy_init_buffer( yy_current_buffer, input_file );
2353 yy_load_buffer_state();
2357 #ifdef YY_USE_PROTOS
2358 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
2360 void yy_switch_to_buffer( new_buffer )
2361 YY_BUFFER_STATE new_buffer;
2364 if ( yy_current_buffer == new_buffer )
2367 if ( yy_current_buffer )
2369 /* Flush out information for old buffer. */
2370 *yy_c_buf_p = yy_hold_char;
2371 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2372 yy_current_buffer->yy_n_chars = yy_n_chars;
2375 yy_current_buffer = new_buffer;
2376 yy_load_buffer_state();
2378 /* We don't actually know whether we did this switch during
2379 * EOF (yywrap()) processing, but the only time this flag
2380 * is looked at is after yywrap() is called, so it's safe
2381 * to go ahead and always set it.
2383 yy_did_buffer_switch_on_eof = 1;
2387 #ifdef YY_USE_PROTOS
2388 void yy_load_buffer_state( void )
2390 void yy_load_buffer_state()
2393 yy_n_chars = yy_current_buffer->yy_n_chars;
2394 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2395 yyin = yy_current_buffer->yy_input_file;
2396 yy_hold_char = *yy_c_buf_p;
2400 #ifdef YY_USE_PROTOS
2401 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
2403 YY_BUFFER_STATE yy_create_buffer( file, size )
2410 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2412 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2414 b->yy_buf_size = size;
2416 /* yy_ch_buf has to be 2 characters longer than the size given because
2417 * we need to put in 2 end-of-buffer characters.
2419 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
2420 if ( ! b->yy_ch_buf )
2421 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2423 b->yy_is_our_buffer = 1;
2425 yy_init_buffer( b, file );
2431 #ifdef YY_USE_PROTOS
2432 void yy_delete_buffer( YY_BUFFER_STATE b )
2434 void yy_delete_buffer( b )
2441 if ( b == yy_current_buffer )
2442 yy_current_buffer = (YY_BUFFER_STATE) 0;
2444 if ( b->yy_is_our_buffer )
2445 yy_flex_free( (void *) b->yy_ch_buf );
2447 yy_flex_free( (void *) b );
2452 #ifdef YY_USE_PROTOS
2453 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
2455 void yy_init_buffer( b, file )
2462 yy_flush_buffer( b );
2464 b->yy_input_file = file;
2465 b->yy_fill_buffer = 1;
2467 #if YY_ALWAYS_INTERACTIVE
2468 b->yy_is_interactive = 1;
2470 #if YY_NEVER_INTERACTIVE
2471 b->yy_is_interactive = 0;
2473 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2479 #ifdef YY_USE_PROTOS
2480 void yy_flush_buffer( YY_BUFFER_STATE b )
2482 void yy_flush_buffer( b )
2492 /* We always need two end-of-buffer characters. The first causes
2493 * a transition to the end-of-buffer state. The second causes
2494 * a jam in that state.
2496 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2497 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2499 b->yy_buf_pos = &b->yy_ch_buf[0];
2502 b->yy_buffer_status = YY_BUFFER_NEW;
2504 if ( b == yy_current_buffer )
2505 yy_load_buffer_state();
2509 #ifndef YY_NO_SCAN_BUFFER
2510 #ifdef YY_USE_PROTOS
2511 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
2513 YY_BUFFER_STATE yy_scan_buffer( base, size )
2521 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2522 base[size-1] != YY_END_OF_BUFFER_CHAR )
2523 /* They forgot to leave room for the EOB's. */
2526 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2528 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2530 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2531 b->yy_buf_pos = b->yy_ch_buf = base;
2532 b->yy_is_our_buffer = 0;
2533 b->yy_input_file = 0;
2534 b->yy_n_chars = b->yy_buf_size;
2535 b->yy_is_interactive = 0;
2537 b->yy_fill_buffer = 0;
2538 b->yy_buffer_status = YY_BUFFER_NEW;
2540 yy_switch_to_buffer( b );
2547 #ifndef YY_NO_SCAN_STRING
2548 #ifdef YY_USE_PROTOS
2549 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
2551 YY_BUFFER_STATE yy_scan_string( yy_str )
2552 yyconst char *yy_str;
2556 for ( len = 0; yy_str[len]; ++len )
2559 return yy_scan_bytes( yy_str, len );
2564 #ifndef YY_NO_SCAN_BYTES
2565 #ifdef YY_USE_PROTOS
2566 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
2568 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
2569 yyconst char *bytes;
2578 /* Get memory for full buffer, including space for trailing EOB's. */
2580 buf = (char *) yy_flex_alloc( n );
2582 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2584 for ( i = 0; i < len; ++i )
2587 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2589 b = yy_scan_buffer( buf, n );
2591 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2593 /* It's okay to grow etc. this buffer, and we should throw it
2594 * away when we're done.
2596 b->yy_is_our_buffer = 1;
2603 #ifndef YY_NO_PUSH_STATE
2604 #ifdef YY_USE_PROTOS
2605 static void yy_push_state( int new_state )
2607 static void yy_push_state( new_state )
2611 if ( yy_start_stack_ptr >= yy_start_stack_depth )
2615 yy_start_stack_depth += YY_START_STACK_INCR;
2616 new_size = yy_start_stack_depth * sizeof( int );
2618 if ( ! yy_start_stack )
2619 yy_start_stack = (int *) yy_flex_alloc( new_size );
2622 yy_start_stack = (int *) yy_flex_realloc(
2623 (void *) yy_start_stack, new_size );
2625 if ( ! yy_start_stack )
2627 "out of memory expanding start-condition stack" );
2630 yy_start_stack[yy_start_stack_ptr++] = YY_START;
2637 #ifndef YY_NO_POP_STATE
2638 static void yy_pop_state()
2640 if ( --yy_start_stack_ptr < 0 )
2641 YY_FATAL_ERROR( "start-condition stack underflow" );
2643 BEGIN(yy_start_stack[yy_start_stack_ptr]);
2648 #ifndef YY_NO_TOP_STATE
2649 static int yy_top_state()
2651 return yy_start_stack[yy_start_stack_ptr - 1];
2655 #ifndef YY_EXIT_FAILURE
2656 #define YY_EXIT_FAILURE 2
2659 #ifdef YY_USE_PROTOS
2660 static void yy_fatal_error( yyconst char msg[] )
2662 static void yy_fatal_error( msg )
2666 (void) fprintf( stderr, "%s\n", msg );
2667 exit( YY_EXIT_FAILURE );
2672 /* Redefine yyless() so it works in section 3 code. */
2678 /* Undo effects of setting up yytext. */ \
2679 yytext[yyleng] = yy_hold_char; \
2680 yy_c_buf_p = yytext + n; \
2681 yy_hold_char = *yy_c_buf_p; \
2682 *yy_c_buf_p = '\0'; \
2688 /* Internal utility routines. */
2691 #ifdef YY_USE_PROTOS
2692 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2694 static void yy_flex_strncpy( s1, s2, n )
2701 for ( i = 0; i < n; ++i )
2706 #ifdef YY_NEED_STRLEN
2707 #ifdef YY_USE_PROTOS
2708 static int yy_flex_strlen( yyconst char *s )
2710 static int yy_flex_strlen( s )
2715 for ( n = 0; s[n]; ++n )
2723 #ifdef YY_USE_PROTOS
2724 static void *yy_flex_alloc( yy_size_t size )
2726 static void *yy_flex_alloc( size )
2730 return (void *) malloc( size );
2733 #ifdef YY_USE_PROTOS
2734 static void *yy_flex_realloc( void *ptr, yy_size_t size )
2736 static void *yy_flex_realloc( ptr, size )
2741 /* The cast to (char *) in the following accommodates both
2742 * implementations that use char* generic pointers, and those
2743 * that use void* generic pointers. It works with the latter
2744 * because both ANSI C and C++ allow castless assignment from
2745 * any pointer type to void*, and deal with argument conversions
2746 * as though doing an assignment.
2748 return (void *) realloc( (char *) ptr, size );
2751 #ifdef YY_USE_PROTOS
2752 static void yy_flex_free( void *ptr )
2754 static void yy_flex_free( ptr )
2771 /* Ugly warning avoiding */
2773 static void warning_avoider(void) G_GNUC_UNUSED;
2774 static void warning_avoider(void) {
2775 yy_flex_realloc(NULL, 0);