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 110
288 #define YY_END_OF_BUFFER 111
289 static yyconst short int yy_acclist[606] =
291 111, 108, 110, 107, 108, 110, 1, 109, 110, 108,
292 109, 110, 108, 110, 108, 110, 108, 110, 98, 108,
293 110, 98, 108, 110, 108, 110, 101, 108, 110, 101,
294 108, 110, 101, 108, 110, 101, 108, 110, 107, 108,
295 110, 108, 110, 108, 110, 101, 108, 110, 27, 108,
296 110, 1, 28, 109, 110, 27, 108, 109, 110, 27,
297 108, 110, 27, 108, 110, 27, 108, 110, 51, 108,
298 110, 1, 52, 109, 110, 51, 108, 109, 110, 43,
299 51, 108, 110, 51, 108, 110, 51, 108, 110, 51,
300 108, 110, 49, 51, 108, 110, 50, 51, 108, 110,
302 51, 108, 110, 51, 108, 110, 47, 108, 110, 1,
303 48, 109, 110, 47, 108, 109, 110, 46, 47, 108,
304 110, 47, 108, 110, 47, 108, 110, 108, 110, 101,
305 108, 110, 101, 108, 110, 101, 108, 110, 104, 108,
306 110, 108, 110, 108, 110, 108, 110, 101, 108, 110,
307 101, 108, 110, 101, 108, 110, 101, 108, 110, 101,
308 108, 110, 101, 108, 110, 101, 108, 110, 101, 108,
309 110, 101, 108, 110, 101, 108, 110, 101, 108, 110,
310 101, 108, 110, 105, 108, 110, 106, 108, 110, 95,
311 108, 110, 44, 108, 110, 96, 108, 110, 97, 108,
313 110, 101, 108, 110, 101, 108, 110, 101, 108, 110,
314 101, 108, 110, 101, 108, 110, 101, 108, 110, 101,
315 108, 110, 101, 108, 110, 101, 108, 110, 101, 108,
316 110, 101, 108, 110, 101, 108, 110, 10, 108, 110,
317 10, 108, 109, 110, 10, 108, 110, 10, 108, 110,
318 10, 108, 110, 10, 108, 110, 15, 108, 110, 15,
319 108, 109, 110, 15, 108, 110, 15, 108, 110, 15,
320 108, 110, 15, 108, 110, 18, 108, 110, 18, 108,
321 109, 110, 18, 108, 110, 18, 108, 110, 98, 22,
322 98, 98, 100, 101, 99, 101, 101, 101, 101, 34,
324 101, 26, 23, 42, 35, 45, 24, 101, 101, 101,
325 25, 103, 101, 101, 101, 101, 101, 101, 101, 101,
326 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
327 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
328 101, 101, 9, 7, 14, 11, 13, 12, 14, 17,
329 16, 102, 102, 98, 3, 98, 98, 100, 100, 99,
330 101, 101, 101, 101, 29, 33, 101, 40, 36, 38,
331 19, 20, 101, 101, 101, 73, 21, 101, 101, 101,
332 101, 101, 101, 101, 68, 101, 101, 101, 101, 101,
333 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
335 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
336 12, 100, 101, 55, 101, 101, 101, 30, 31, 32,
337 101, 41, 37, 39, 101, 59, 101, 58, 101, 6,
338 101, 71, 101, 101, 101, 101, 63, 101, 101, 66,
339 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
340 101, 101, 60, 101, 101, 101, 101, 63, 101, 101,
341 101, 101, 83, 101, 101, 101, 101, 89, 101, 8,
342 53, 101, 54, 101, 56, 101, 101, 101, 58, 101,
343 72, 101, 101, 69, 101, 101, 101, 101, 101, 101,
344 67, 101, 101, 101, 101, 62, 101, 101, 101, 84,
346 101, 101, 101, 101, 88, 101, 101, 101, 101, 101,
347 101, 101, 101, 70, 101, 101, 101, 101, 101, 74,
348 101, 80, 101, 64, 101, 61, 101, 101, 101, 101,
349 101, 101, 101, 101, 101, 101, 101, 4, 101, 101,
350 101, 101, 75, 101, 101, 101, 101, 79, 101, 101,
351 101, 101, 101, 85, 101, 86, 101, 101, 101, 101,
352 78, 101, 101, 81, 101, 82, 101, 101, 65, 101,
353 101, 101, 101, 101, 101, 101, 77, 101, 76, 101,
354 101, 101, 91, 101, 101, 101, 101, 4, 2, 93,
355 101, 101, 90, 101, 101, 92, 101, 5, 101, 94,
357 101, 101, 87, 101, 57
360 static yyconst short int yy_accept[509] =
362 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
363 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
364 1, 1, 1, 2, 4, 7, 10, 13, 15, 17,
365 19, 22, 25, 27, 30, 33, 36, 39, 42, 44,
366 46, 49, 52, 56, 60, 63, 66, 69, 72, 76,
367 80, 84, 87, 90, 93, 97, 101, 104, 107, 110,
368 114, 118, 122, 125, 128, 130, 133, 136, 139, 142,
369 144, 146, 148, 151, 154, 157, 160, 163, 166, 169,
370 172, 175, 178, 181, 184, 187, 190, 193, 196, 199,
371 202, 205, 208, 211, 214, 217, 220, 223, 226, 229,
373 232, 235, 238, 241, 245, 248, 251, 254, 257, 260,
374 264, 267, 270, 273, 276, 279, 283, 286, 289, 289,
375 289, 290, 291, 291, 291, 292, 292, 292, 293, 294,
376 295, 296, 297, 298, 299, 300, 300, 300, 300, 300,
377 300, 300, 300, 301, 302, 303, 303, 303, 303, 303,
378 303, 304, 304, 305, 305, 305, 306, 307, 308, 308,
379 309, 310, 311, 311, 312, 312, 312, 312, 313, 314,
380 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
381 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
382 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
384 344, 344, 344, 345, 345, 346, 346, 346, 346, 347,
385 348, 348, 350, 351, 352, 353, 353, 354, 355, 355,
386 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
387 365, 365, 365, 365, 366, 366, 366, 367, 367, 367,
388 368, 368, 369, 369, 369, 369, 370, 371, 371, 372,
389 372, 372, 373, 374, 375, 376, 377, 377, 377, 378,
390 378, 378, 379, 380, 381, 382, 383, 384, 385, 387,
391 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
392 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
393 408, 409, 410, 411, 411, 412, 413, 414, 416, 417,
395 418, 418, 418, 418, 419, 419, 420, 421, 421, 422,
396 422, 423, 424, 425, 425, 426, 428, 430, 430, 431,
397 432, 434, 435, 436, 437, 439, 440, 442, 443, 444,
398 445, 446, 447, 448, 449, 450, 451, 452, 453, 455,
399 456, 457, 458, 460, 461, 462, 463, 465, 466, 467,
400 468, 470, 470, 471, 471, 471, 473, 475, 477, 477,
401 477, 477, 477, 477, 478, 478, 478, 479, 481, 483,
402 484, 486, 487, 488, 489, 490, 491, 493, 494, 495,
403 496, 498, 499, 500, 502, 503, 504, 505, 507, 508,
404 509, 510, 511, 511, 511, 511, 511, 511, 512, 512,
406 512, 513, 514, 516, 517, 518, 519, 520, 522, 524,
407 526, 528, 529, 530, 531, 532, 533, 534, 535, 536,
408 537, 538, 538, 539, 539, 539, 540, 540, 540, 541,
409 542, 543, 545, 546, 547, 548, 550, 551, 552, 553,
410 554, 556, 558, 559, 560, 560, 560, 560, 560, 561,
411 561, 561, 563, 564, 566, 568, 569, 571, 572, 573,
412 574, 575, 576, 577, 577, 577, 577, 577, 577, 577,
413 577, 577, 579, 581, 582, 583, 585, 586, 587, 588,
414 588, 589, 589, 589, 589, 590, 590, 592, 593, 595,
415 596, 598, 598, 598, 598, 599, 600, 602, 602, 602,
417 603, 603, 603, 605, 605, 605, 606, 606
420 static yyconst int yy_ec[256] =
422 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
423 1, 4, 5, 1, 1, 1, 1, 1, 1, 1,
424 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
425 1, 6, 1, 7, 8, 1, 9, 1, 10, 11,
426 12, 13, 1, 1, 1, 14, 15, 16, 17, 18,
427 18, 18, 18, 18, 18, 19, 19, 20, 1, 21,
428 1, 22, 1, 1, 23, 23, 23, 23, 24, 23,
429 25, 25, 26, 25, 25, 25, 25, 25, 25, 25,
430 25, 27, 28, 25, 25, 25, 25, 25, 25, 25,
431 29, 30, 31, 1, 32, 1, 33, 34, 35, 36,
433 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
434 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
435 57, 25, 58, 1, 59, 1, 1, 1, 1, 1,
436 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
437 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
438 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
439 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
440 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
441 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
442 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
444 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
445 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
446 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
447 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
448 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
452 static yyconst int yy_meta[60] =
454 1, 2, 3, 4, 4, 2, 1, 1, 1, 1,
455 1, 1, 1, 1, 1, 5, 5, 5, 5, 6,
456 1, 1, 7, 7, 8, 8, 8, 8, 1, 1,
457 9, 8, 7, 7, 7, 7, 7, 7, 8, 8,
458 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
459 8, 8, 8, 8, 8, 8, 8, 1, 1
462 static yyconst short int yy_base[536] =
464 0, 58, 58, 65, 69, 126, 80, 85, 60, 86,
465 172, 1204, 102, 111, 225, 1203, 101, 149, 140, 158,
466 162, 165, 1210, 1213, 1213, 1213, 1213, 1179, 163, 67,
467 177, 225, 0, 1188, 42, 57, 45, 196, 103, 164,
468 105, 1213, 1213, 1213, 1192, 114, 1178, 1213, 1213, 1213,
469 1213, 169, 87, 0, 1213, 1213, 209, 1146, 1213, 1213,
470 1213, 1213, 0, 212, 117, 130, 61, 149, 1213, 266,
471 175, 270, 197, 255, 49, 157, 139, 209, 201, 152,
472 214, 270, 245, 272, 1213, 1213, 1213, 1213, 1213, 1213,
473 261, 274, 278, 254, 273, 283, 277, 215, 218, 286,
475 276, 284, 1213, 1213, 1189, 326, 328, 334, 1213, 1213,
476 1188, 339, 340, 341, 1199, 1198, 242, 355, 1190, 1189,
477 346, 1213, 1195, 350, 357, 363, 0, 369, 1177, 1176,
478 1175, 287, 339, 303, 315, 387, 1157, 388, 1152, 351,
479 354, 218, 1213, 358, 1213, 0, 1182, 343, 1181, 1180,
480 1213, 1186, 1213, 394, 1142, 1213, 1213, 1213, 1184, 377,
481 378, 385, 1172, 1172, 1181, 397, 1152, 1153, 331, 384,
482 388, 309, 391, 398, 399, 400, 402, 403, 409, 407,
483 410, 404, 411, 413, 416, 414, 419, 422, 425, 427,
484 429, 433, 438, 439, 440, 445, 447, 448, 1213, 475,
486 467, 488, 1213, 495, 1213, 497, 502, 510, 1213, 516,
487 1166, 1213, 1213, 1213, 1213, 1170, 1169, 507, 1175, 1213,
488 511, 0, 1157, 1156, 1155, 451, 455, 459, 472, 1125,
489 1127, 1128, 1113, 1213, 1137, 1111, 1213, 1110, 1126, 467,
490 1139, 1213, 1155, 1154, 1153, 1213, 1213, 1159, 1213, 1126,
491 1157, 1213, 463, 487, 489, 1213, 531, 1156, 1213, 1127,
492 525, 501, 511, 515, 516, 518, 519, 525, 1137, 526,
493 527, 528, 531, 529, 530, 535, 533, 537, 548, 539,
494 540, 542, 550, 552, 543, 551, 554, 555, 558, 573,
495 574, 577, 578, 597, 1213, 1136, 582, 1135, 584, 585,
497 1101, 1116, 554, 1213, 1116, 1213, 1213, 1097, 588, 1124,
498 1213, 1213, 1213, 1105, 589, 1128, 1127, 616, 1213, 593,
499 1126, 591, 594, 600, 1125, 596, 1124, 601, 604, 606,
500 608, 611, 605, 621, 612, 607, 610, 615, 1123, 630,
501 619, 636, 639, 640, 641, 642, 1122, 643, 645, 646,
502 1121, 667, 1213, 673, 678, 1120, 1119, 1118, 1096, 686,
503 1089, 1098, 1101, 647, 0, 1080, 657, 652, 1112, 662,
504 1111, 654, 665, 676, 678, 680, 1110, 681, 682, 683,
505 1109, 684, 686, 1108, 688, 685, 689, 690, 691, 692,
506 694, 696, 1077, 721, 1078, 1075, 1072, 711, 1099, 1086,
508 701, 712, 1095, 713, 714, 704, 716, 1087, 1086, 1077,
509 1070, 722, 723, 730, 732, 734, 735, 738, 740, 737,
510 741, 1044, 760, 712, 1043, 743, 1068, 1036, 745, 752,
511 753, 1018, 751, 755, 760, 1006, 754, 766, 761, 769,
512 989, 983, 775, 779, 944, 979, 924, 870, 798, 784,
513 804, 889, 785, 888, 886, 787, 885, 792, 793, 794,
514 795, 796, 797, 818, 897, 838, 838, 832, 838, 846,
515 812, 819, 810, 805, 808, 801, 809, 812, 815, 562,
516 1213, 460, 852, 860, 1213, 837, 465, 817, 340, 847,
517 292, 273, 864, 866, 1213, 854, 234, 215, 873, 865,
519 150, 877, 172, 895, 897, 1213, 1213, 914, 923, 932,
520 941, 950, 959, 968, 971, 975, 983, 992, 997, 1006,
521 1015, 1020, 1023, 1027, 1035, 1044, 1053, 1062, 1067, 1075,
522 1079, 1086, 1094, 1103, 1112
525 static yyconst short int yy_def[536] =
527 507, 1, 508, 508, 509, 509, 510, 510, 1, 1,
528 1, 11, 1, 1, 1, 15, 511, 511, 512, 512,
529 513, 513, 507, 507, 507, 507, 507, 514, 507, 507,
530 507, 507, 515, 516, 516, 516, 516, 507, 507, 507,
531 516, 507, 507, 507, 507, 507, 507, 507, 507, 507,
532 507, 507, 507, 517, 507, 507, 507, 507, 507, 507,
533 507, 507, 518, 507, 507, 516, 516, 516, 507, 507,
534 507, 519, 516, 516, 516, 516, 516, 516, 516, 516,
535 516, 516, 516, 516, 507, 507, 507, 507, 507, 507,
536 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
538 516, 516, 507, 507, 507, 507, 507, 507, 507, 507,
539 507, 507, 507, 507, 507, 507, 507, 507, 507, 520,
540 507, 507, 521, 507, 507, 507, 522, 507, 523, 516,
541 524, 516, 516, 516, 516, 507, 507, 507, 507, 507,
542 507, 507, 507, 516, 507, 525, 507, 507, 507, 507,
543 507, 526, 507, 507, 507, 507, 507, 507, 527, 516,
544 516, 516, 507, 507, 528, 507, 529, 507, 516, 516,
545 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
546 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
547 516, 516, 516, 516, 516, 516, 516, 516, 507, 507,
549 507, 507, 507, 530, 507, 507, 507, 507, 507, 507,
550 507, 507, 507, 507, 507, 507, 507, 507, 521, 507,
551 507, 522, 523, 531, 524, 516, 516, 516, 516, 507,
552 507, 507, 507, 507, 507, 507, 507, 507, 507, 516,
553 507, 507, 507, 507, 507, 507, 507, 526, 507, 507,
554 527, 507, 516, 516, 516, 507, 507, 528, 507, 529,
555 519, 516, 516, 516, 516, 516, 516, 516, 516, 516,
556 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
557 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
558 516, 516, 516, 532, 507, 531, 516, 516, 516, 516,
560 507, 507, 507, 507, 507, 507, 507, 507, 516, 507,
561 507, 507, 507, 507, 516, 516, 516, 507, 507, 516,
562 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
563 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
564 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
565 516, 507, 507, 532, 507, 516, 516, 516, 507, 507,
566 507, 507, 507, 516, 533, 507, 516, 516, 516, 516,
567 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
568 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
569 516, 516, 507, 507, 507, 507, 507, 516, 507, 507,
571 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
572 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
573 516, 507, 507, 507, 507, 516, 507, 507, 516, 516,
574 516, 516, 516, 516, 516, 516, 516, 516, 516, 516,
575 516, 516, 516, 516, 507, 507, 507, 507, 516, 507,
576 507, 516, 516, 516, 516, 516, 516, 516, 516, 516,
577 516, 516, 516, 507, 534, 507, 507, 507, 507, 507,
578 507, 516, 516, 516, 516, 516, 516, 516, 516, 534,
579 507, 507, 507, 507, 507, 535, 516, 516, 516, 516,
580 516, 507, 507, 535, 507, 516, 516, 507, 507, 516,
582 507, 507, 516, 507, 507, 507, 0, 507, 507, 507,
583 507, 507, 507, 507, 507, 507, 507, 507, 507, 507,
584 507, 507, 507, 507, 507, 507, 507, 507, 507, 507,
585 507, 507, 507, 507, 507
588 static yyconst short int yy_nxt[1273] =
590 24, 25, 26, 25, 27, 25, 24, 24, 24, 28,
591 24, 24, 24, 29, 30, 31, 32, 32, 32, 33,
592 24, 24, 34, 34, 34, 34, 34, 34, 24, 24,
593 24, 34, 34, 34, 35, 34, 36, 37, 34, 34,
594 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
595 34, 34, 34, 34, 34, 34, 34, 24, 24, 38,
596 43, 131, 44, 38, 131, 39, 40, 43, 131, 44,
597 45, 49, 46, 50, 65, 51, 131, 45, 52, 122,
598 131, 123, 60, 53, 61, 132, 62, 60, 135, 61,
599 47, 62, 64, 39, 66, 173, 34, 67, 54, 151,
601 65, 152, 133, 26, 138, 104, 134, 41, 138, 63,
602 161, 68, 87, 105, 63, 138, 24, 69, 39, 138,
603 66, 87, 34, 67, 131, 24, 55, 56, 49, 158,
604 50, 159, 51, 57, 58, 52, 34, 68, 34, 34,
605 53, 144, 26, 69, 110, 34, 139, 34, 34, 131,
606 106, 26, 111, 104, 106, 54, 107, 139, 131, 112,
607 26, 108, 110, 112, 26, 113, 116, 26, 131, 116,
608 114, 131, 118, 160, 117, 147, 131, 117, 121, 121,
609 121, 121, 175, 55, 56, 70, 71, 164, 162, 165,
610 124, 131, 125, 125, 125, 126, 140, 136, 148, 238,
612 72, 136, 174, 141, 73, 178, 74, 75, 76, 77,
613 154, 142, 78, 138, 154, 79, 131, 138, 80, 81,
614 131, 143, 82, 68, 83, 84, 149, 150, 131, 85,
615 86, 88, 127, 131, 131, 89, 90, 131, 124, 24,
616 128, 128, 128, 128, 213, 137, 169, 177, 195, 155,
617 196, 501, 139, 131, 176, 139, 214, 238, 91, 92,
618 93, 94, 95, 179, 131, 78, 180, 239, 79, 96,
619 97, 98, 99, 131, 131, 100, 101, 83, 102, 163,
620 131, 121, 121, 121, 121, 166, 166, 166, 166, 131,
621 184, 131, 131, 131, 170, 131, 131, 131, 171, 190,
623 168, 172, 131, 131, 187, 131, 131, 188, 498, 181,
624 182, 131, 185, 170, 189, 192, 191, 194, 186, 226,
625 172, 183, 131, 193, 173, 181, 197, 200, 131, 138,
626 186, 200, 198, 138, 131, 202, 203, 183, 201, 204,
627 206, 138, 208, 209, 206, 138, 210, 229, 199, 243,
628 131, 207, 228, 211, 265, 212, 138, 213, 131, 131,
629 138, 218, 218, 218, 218, 221, 221, 221, 221, 262,
630 124, 139, 125, 125, 125, 126, 124, 131, 126, 126,
631 126, 126, 124, 139, 128, 128, 128, 128, 136, 138,
632 235, 227, 136, 138, 232, 154, 131, 131, 139, 154,
634 244, 245, 233, 131, 131, 236, 240, 131, 234, 253,
635 131, 237, 166, 166, 166, 166, 263, 131, 131, 131,
636 264, 131, 131, 131, 254, 255, 131, 168, 131, 131,
637 131, 139, 131, 131, 155, 131, 137, 139, 131, 271,
638 274, 131, 276, 266, 131, 268, 131, 270, 131, 272,
639 267, 269, 131, 278, 281, 273, 275, 131, 131, 131,
640 277, 286, 284, 279, 131, 280, 131, 131, 202, 203,
641 131, 282, 204, 289, 131, 268, 200, 283, 131, 285,
642 200, 290, 131, 288, 131, 292, 131, 201, 287, 202,
643 203, 131, 492, 202, 291, 293, 202, 203, 206, 298,
645 202, 297, 206, 208, 209, 299, 131, 210, 131, 207,
646 300, 208, 209, 315, 211, 208, 295, 208, 209, 309,
647 131, 208, 218, 218, 218, 218, 221, 221, 221, 221,
648 131, 316, 318, 319, 131, 131, 318, 131, 131, 317,
649 166, 166, 166, 166, 131, 131, 131, 131, 131, 131,
650 131, 324, 131, 320, 131, 168, 131, 326, 131, 131,
651 321, 131, 131, 325, 327, 322, 323, 131, 481, 131,
652 131, 131, 332, 131, 131, 339, 328, 131, 330, 333,
653 334, 329, 331, 336, 342, 335, 341, 343, 337, 344,
654 338, 340, 131, 131, 345, 346, 131, 131, 352, 353,
656 347, 131, 352, 131, 131, 361, 349, 131, 131, 348,
657 131, 234, 131, 131, 351, 131, 355, 318, 319, 131,
658 131, 318, 350, 131, 131, 131, 131, 131, 364, 131,
659 131, 131, 356, 357, 131, 358, 373, 367, 131, 317,
660 131, 368, 374, 370, 375, 369, 380, 371, 382, 131,
661 372, 376, 381, 378, 385, 131, 377, 379, 131, 131,
662 131, 131, 131, 384, 131, 131, 131, 383, 352, 353,
663 387, 131, 352, 131, 352, 353, 131, 391, 352, 352,
664 353, 131, 379, 352, 131, 389, 390, 394, 386, 392,
665 388, 394, 355, 401, 404, 131, 398, 131, 403, 131,
667 131, 131, 131, 131, 131, 131, 402, 131, 131, 131,
668 131, 131, 407, 131, 408, 131, 405, 410, 413, 414,
669 131, 417, 394, 131, 409, 406, 394, 421, 415, 412,
670 131, 131, 131, 131, 411, 131, 423, 423, 423, 423,
671 416, 131, 131, 418, 419, 420, 429, 426, 431, 131,
672 432, 131, 430, 131, 131, 433, 131, 131, 435, 131,
673 131, 446, 131, 447, 131, 446, 436, 434, 443, 237,
674 131, 131, 131, 131, 131, 423, 423, 423, 423, 131,
675 131, 437, 441, 438, 442, 131, 440, 453, 131, 454,
676 439, 456, 444, 449, 131, 457, 452, 459, 131, 468,
678 469, 470, 470, 468, 131, 471, 131, 455, 460, 471,
679 458, 131, 131, 131, 131, 131, 131, 131, 486, 468,
680 131, 472, 473, 468, 131, 461, 462, 131, 131, 131,
681 476, 131, 486, 468, 131, 463, 131, 468, 131, 474,
682 488, 487, 477, 495, 479, 489, 475, 483, 483, 483,
683 483, 491, 478, 484, 484, 484, 484, 485, 495, 490,
684 496, 484, 484, 484, 484, 493, 131, 483, 483, 483,
685 483, 485, 495, 131, 482, 484, 484, 484, 484, 499,
686 499, 499, 499, 497, 131, 236, 502, 495, 499, 499,
687 499, 499, 504, 504, 504, 504, 505, 506, 505, 506,
689 505, 503, 505, 481, 131, 131, 500, 131, 131, 467,
690 504, 504, 504, 504, 42, 42, 42, 42, 42, 42,
691 42, 42, 42, 48, 48, 48, 48, 48, 48, 48,
692 48, 48, 59, 59, 59, 59, 59, 59, 59, 59,
693 59, 103, 103, 103, 103, 103, 103, 103, 103, 103,
694 109, 109, 109, 109, 109, 109, 109, 109, 109, 115,
695 115, 115, 115, 115, 115, 115, 115, 115, 119, 119,
696 466, 119, 119, 119, 119, 119, 119, 129, 129, 130,
697 130, 130, 130, 153, 153, 465, 153, 153, 153, 153,
698 153, 153, 157, 157, 464, 157, 157, 157, 157, 157,
700 157, 167, 131, 167, 167, 167, 216, 216, 131, 216,
701 216, 216, 216, 216, 216, 219, 219, 219, 219, 219,
702 219, 219, 219, 219, 222, 131, 222, 223, 223, 223,
703 223, 225, 225, 225, 225, 241, 241, 131, 241, 241,
704 241, 241, 241, 241, 248, 248, 248, 248, 248, 248,
705 248, 248, 248, 251, 251, 251, 251, 251, 251, 251,
706 251, 251, 258, 258, 258, 258, 258, 258, 258, 258,
707 258, 260, 451, 260, 260, 260, 294, 294, 450, 448,
708 445, 294, 294, 296, 296, 296, 296, 354, 354, 131,
709 354, 354, 354, 354, 399, 399, 131, 399, 399, 399,
711 399, 399, 399, 480, 480, 131, 131, 480, 480, 480,
712 480, 480, 494, 494, 131, 494, 494, 494, 494, 494,
713 494, 428, 427, 425, 424, 233, 422, 131, 131, 131,
714 131, 131, 400, 397, 396, 395, 393, 131, 131, 131,
715 131, 131, 131, 131, 131, 131, 131, 131, 366, 365,
716 363, 362, 360, 359, 131, 224, 131, 168, 259, 252,
717 314, 249, 313, 312, 311, 310, 308, 307, 306, 305,
718 304, 303, 302, 301, 131, 224, 224, 220, 215, 215,
719 295, 261, 168, 259, 257, 256, 252, 250, 249, 247,
720 246, 242, 231, 230, 131, 131, 224, 220, 217, 215,
722 213, 213, 205, 199, 156, 146, 145, 131, 120, 507,
723 39, 39, 23, 507, 507, 507, 507, 507, 507, 507,
724 507, 507, 507, 507, 507, 507, 507, 507, 507, 507,
725 507, 507, 507, 507, 507, 507, 507, 507, 507, 507,
726 507, 507, 507, 507, 507, 507, 507, 507, 507, 507,
727 507, 507, 507, 507, 507, 507, 507, 507, 507, 507,
728 507, 507, 507, 507, 507, 507, 507, 507, 507, 507,
732 static yyconst short int yy_chk[1273] =
734 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
735 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
736 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
737 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
738 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
739 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
740 3, 35, 3, 2, 37, 2, 2, 4, 75, 4,
741 3, 5, 4, 5, 9, 5, 36, 4, 5, 30,
742 67, 30, 7, 5, 7, 35, 7, 8, 37, 8,
743 4, 8, 8, 10, 9, 75, 9, 9, 5, 53,
745 10, 53, 36, 17, 39, 17, 36, 2, 39, 7,
746 67, 9, 13, 17, 8, 46, 13, 9, 14, 46,
747 10, 14, 10, 10, 41, 14, 5, 5, 6, 65,
748 6, 65, 6, 6, 6, 6, 13, 10, 13, 13,
749 6, 41, 19, 10, 19, 14, 39, 14, 14, 66,
750 18, 18, 19, 18, 18, 6, 18, 46, 77, 20,
751 20, 18, 20, 20, 21, 20, 21, 22, 68, 22,
752 20, 80, 22, 66, 21, 52, 76, 22, 29, 29,
753 29, 29, 77, 6, 6, 11, 11, 71, 68, 71,
754 31, 503, 31, 31, 31, 31, 40, 38, 52, 501,
756 11, 38, 76, 40, 11, 80, 11, 11, 11, 11,
757 57, 40, 11, 64, 57, 11, 73, 64, 11, 11,
758 79, 40, 11, 11, 11, 11, 52, 52, 78, 11,
759 11, 15, 31, 81, 98, 15, 15, 99, 32, 15,
760 32, 32, 32, 32, 117, 38, 73, 79, 98, 57,
761 99, 498, 57, 497, 78, 64, 117, 142, 15, 15,
762 15, 15, 15, 81, 83, 15, 81, 142, 15, 15,
763 15, 15, 15, 94, 74, 15, 15, 15, 15, 70,
764 91, 70, 70, 70, 70, 72, 72, 72, 72, 82,
765 83, 84, 95, 92, 74, 101, 97, 93, 74, 94,
767 72, 74, 96, 102, 91, 100, 132, 91, 492, 82,
768 82, 491, 84, 92, 93, 96, 95, 97, 84, 132,
769 92, 82, 134, 96, 93, 100, 100, 106, 172, 107,
770 102, 106, 101, 107, 135, 108, 108, 100, 106, 108,
771 112, 113, 114, 114, 112, 113, 114, 135, 108, 148,
772 169, 112, 134, 114, 172, 114, 118, 118, 133, 489,
773 118, 121, 121, 121, 121, 124, 124, 124, 124, 169,
774 125, 107, 125, 125, 125, 125, 126, 144, 126, 126,
775 126, 126, 128, 113, 128, 128, 128, 128, 136, 138,
776 141, 133, 136, 138, 140, 154, 160, 161, 118, 154,
778 148, 148, 140, 170, 162, 141, 144, 171, 140, 160,
779 173, 141, 166, 166, 166, 166, 170, 174, 175, 176,
780 171, 177, 178, 182, 161, 162, 180, 166, 179, 181,
781 183, 138, 184, 186, 154, 185, 136, 154, 187, 178,
782 180, 188, 182, 173, 189, 175, 190, 177, 191, 179,
783 174, 176, 192, 184, 186, 179, 181, 193, 194, 195,
784 183, 191, 189, 184, 196, 185, 197, 198, 201, 201,
785 226, 187, 201, 194, 227, 191, 200, 188, 228, 190,
786 200, 195, 253, 193, 487, 197, 240, 200, 192, 202,
787 202, 229, 482, 202, 196, 198, 204, 204, 206, 227,
789 204, 226, 206, 207, 207, 228, 254, 207, 255, 206,
790 229, 208, 208, 253, 207, 208, 207, 210, 210, 240,
791 262, 210, 218, 218, 218, 218, 221, 221, 221, 221,
792 263, 254, 257, 257, 264, 265, 257, 266, 267, 255,
793 261, 261, 261, 261, 268, 270, 271, 272, 274, 275,
794 273, 266, 277, 262, 276, 261, 278, 268, 280, 281,
795 263, 282, 285, 267, 270, 264, 265, 279, 480, 283,
796 286, 284, 274, 287, 288, 281, 271, 289, 273, 275,
797 276, 272, 273, 278, 284, 277, 283, 285, 279, 286,
798 280, 282, 290, 291, 287, 288, 292, 293, 294, 294,
800 289, 297, 294, 299, 300, 303, 291, 309, 315, 290,
801 322, 303, 320, 323, 293, 326, 294, 318, 318, 324,
802 328, 318, 292, 329, 333, 330, 336, 331, 309, 337,
803 332, 335, 297, 299, 338, 300, 329, 320, 341, 315,
804 334, 322, 330, 324, 331, 323, 335, 326, 337, 340,
805 328, 332, 336, 334, 341, 342, 333, 334, 343, 344,
806 345, 346, 348, 340, 349, 350, 364, 338, 352, 352,
807 343, 368, 352, 372, 354, 354, 367, 348, 354, 355,
808 355, 370, 350, 355, 373, 345, 346, 360, 342, 349,
809 344, 360, 354, 367, 372, 374, 364, 375, 370, 376,
811 378, 379, 380, 382, 386, 383, 368, 385, 387, 388,
812 389, 390, 375, 391, 376, 392, 373, 379, 383, 385,
813 401, 388, 394, 406, 378, 374, 394, 392, 386, 382,
814 398, 402, 404, 405, 380, 407, 394, 394, 394, 394,
815 387, 412, 413, 389, 390, 391, 401, 398, 404, 414,
816 405, 415, 402, 416, 417, 406, 420, 418, 412, 419,
817 421, 423, 426, 424, 429, 423, 413, 407, 420, 424,
818 433, 430, 431, 437, 434, 423, 423, 423, 423, 435,
819 439, 414, 418, 415, 419, 438, 417, 430, 440, 431,
820 416, 434, 421, 426, 443, 435, 429, 438, 444, 449,
822 450, 450, 450, 449, 453, 451, 456, 433, 439, 451,
823 437, 458, 459, 460, 461, 462, 463, 449, 471, 464,
824 476, 453, 456, 464, 474, 440, 443, 475, 477, 473,
825 460, 478, 471, 468, 479, 444, 488, 468, 472, 458,
826 475, 474, 461, 486, 463, 477, 459, 468, 468, 468,
827 468, 479, 462, 469, 469, 469, 469, 470, 486, 478,
828 488, 470, 470, 470, 470, 483, 490, 483, 483, 483,
829 483, 484, 494, 496, 467, 484, 484, 484, 484, 493,
830 493, 493, 493, 490, 500, 466, 499, 494, 499, 499,
831 499, 499, 502, 502, 502, 502, 504, 504, 505, 505,
833 504, 500, 505, 465, 457, 455, 496, 454, 452, 448,
834 504, 504, 504, 504, 508, 508, 508, 508, 508, 508,
835 508, 508, 508, 509, 509, 509, 509, 509, 509, 509,
836 509, 509, 510, 510, 510, 510, 510, 510, 510, 510,
837 510, 511, 511, 511, 511, 511, 511, 511, 511, 511,
838 512, 512, 512, 512, 512, 512, 512, 512, 512, 513,
839 513, 513, 513, 513, 513, 513, 513, 513, 514, 514,
840 447, 514, 514, 514, 514, 514, 514, 515, 515, 516,
841 516, 516, 516, 517, 517, 446, 517, 517, 517, 517,
842 517, 517, 518, 518, 445, 518, 518, 518, 518, 518,
844 518, 519, 442, 519, 519, 519, 520, 520, 441, 520,
845 520, 520, 520, 520, 520, 521, 521, 521, 521, 521,
846 521, 521, 521, 521, 522, 436, 522, 523, 523, 523,
847 523, 524, 524, 524, 524, 525, 525, 432, 525, 525,
848 525, 525, 525, 525, 526, 526, 526, 526, 526, 526,
849 526, 526, 526, 527, 527, 527, 527, 527, 527, 527,
850 527, 527, 528, 528, 528, 528, 528, 528, 528, 528,
851 528, 529, 428, 529, 529, 529, 530, 530, 427, 425,
852 422, 530, 530, 531, 531, 531, 531, 532, 532, 411,
853 532, 532, 532, 532, 533, 533, 410, 533, 533, 533,
855 533, 533, 533, 534, 534, 409, 408, 534, 534, 534,
856 534, 534, 535, 535, 403, 535, 535, 535, 535, 535,
857 535, 400, 399, 397, 396, 395, 393, 384, 381, 377,
858 371, 369, 366, 363, 362, 361, 359, 358, 357, 356,
859 351, 347, 339, 327, 325, 321, 317, 316, 314, 310,
860 308, 305, 302, 301, 298, 296, 269, 260, 258, 251,
861 250, 248, 245, 244, 243, 241, 239, 238, 236, 235,
862 233, 232, 231, 230, 225, 224, 223, 219, 217, 216,
863 211, 168, 167, 165, 164, 163, 159, 155, 152, 150,
864 149, 147, 139, 137, 131, 130, 129, 123, 120, 119,
866 116, 115, 111, 105, 58, 47, 45, 34, 28, 23,
867 16, 12, 507, 507, 507, 507, 507, 507, 507, 507,
868 507, 507, 507, 507, 507, 507, 507, 507, 507, 507,
869 507, 507, 507, 507, 507, 507, 507, 507, 507, 507,
870 507, 507, 507, 507, 507, 507, 507, 507, 507, 507,
871 507, 507, 507, 507, 507, 507, 507, 507, 507, 507,
872 507, 507, 507, 507, 507, 507, 507, 507, 507, 507,
876 static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
877 static char *yy_full_match;
881 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
882 yy_cp = yy_full_match; /* restore poss. backed-over text */ \
886 #define yymore() yymore_used_but_not_detected
887 #define YY_MORE_ADJ 0
888 #define YY_RESTORE_YY_MORE_OFFSET
892 /* GOB C Preprocessor
893 * Copyright (C) 1999 the Free Software Foundation.
895 * Author: George Lebl
897 * This program is free software; you can redistribute it and/or modify
898 * it under the terms of the GNU General Public License as published by
899 * the Free Software Foundation; either version 2 of the License, or
900 * (at your option) any later version.
902 * This program is distributed in the hope that it will be useful,
903 * but WITHOUT ANY WARRANTY; without even the implied warranty of
904 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
905 * GNU General Public License for more details.
907 * You should have received a copy of the GNU General Public License
908 * along with this program; if not, write to the Free Software
909 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
919 #include "treefuncs.h"
924 static int parenth_depth = 0;
925 static int before_comment = INITIAL;
926 static gboolean class_after_c = FALSE;
927 static int code_type = CCODE;
928 static int before_string;
929 static int property_paren_depth = 0;
932 static char *gtk_doc_func = NULL; /* current gtk-doc func */
933 GHashTable *gtk_doc_hash = NULL;
935 static GString *cbuf = NULL;
938 GList *include_files = NULL;
939 /* 0 no, 1 means yes, 2+ means don't even start looking anymore */
940 static int look_for_includes = 0;
943 /* last filename parsed from a #line directive */
944 char *hline_filename = NULL;
950 cbuf = g_string_new(NULL);
952 cbuf = g_string_assign(cbuf, "");
960 cbuf = g_string_new(s);
962 cbuf = g_string_append(cbuf,s);
967 add_gtk_doc_func(void)
973 gtk_doc_hash = g_hash_table_new(g_str_hash, g_str_equal);
974 g_hash_table_insert(gtk_doc_hash, gtk_doc_func, g_strdup(cbuf->str));
980 /* Ugly warning avoiding */
989 #define CODE_STRING 3
993 #define CLASS_CODE_I 5
995 #define PROPERTY_CODE 6
997 #define PROPERTY_CODE_I 7
999 #define GTK_DOC_BEFORE_NAME 8
1003 #define GTK_DOC_LINE 10
1005 #line 1006 "lex.yy.c"
1007 /* Macros after this point can all be overridden by user definitions in
1011 #ifndef YY_SKIP_YYWRAP
1013 extern "C" int yywrap YY_PROTO(( void ));
1015 extern int yywrap YY_PROTO(( void ));
1020 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
1024 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
1027 #ifdef YY_NEED_STRLEN
1028 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
1033 static int yyinput YY_PROTO(( void ));
1035 static int input YY_PROTO(( void ));
1040 static int yy_start_stack_ptr = 0;
1041 static int yy_start_stack_depth = 0;
1042 static int *yy_start_stack = 0;
1043 #ifndef YY_NO_PUSH_STATE
1044 static void yy_push_state YY_PROTO(( int new_state ));
1046 #ifndef YY_NO_POP_STATE
1047 static void yy_pop_state YY_PROTO(( void ));
1049 #ifndef YY_NO_TOP_STATE
1050 static int yy_top_state YY_PROTO(( void ));
1054 #define YY_NO_PUSH_STATE 1
1055 #define YY_NO_POP_STATE 1
1056 #define YY_NO_TOP_STATE 1
1059 #ifdef YY_MALLOC_DECL
1067 /* Just try to get by without declaring the routines. This will fail
1068 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
1069 * or sizeof(void*) != sizeof(int).
1074 /* Amount of stuff to slurp up with each read. */
1075 #ifndef YY_READ_BUF_SIZE
1076 #define YY_READ_BUF_SIZE 8192
1079 /* Copy whatever the last rule matched to the standard output. */
1082 /* This used to be an fputs(), but since the string might contain NUL's,
1083 * we now use fwrite().
1085 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
1088 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
1089 * is returned in "result".
1092 #define YY_INPUT(buf,result,max_size) \
1093 if ( yy_current_buffer->yy_is_interactive ) \
1096 for ( n = 0; n < max_size && \
1097 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
1098 buf[n] = (char) c; \
1100 buf[n++] = (char) c; \
1101 if ( c == EOF && ferror( yyin ) ) \
1102 YY_FATAL_ERROR( "input in flex scanner failed" ); \
1105 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
1106 && ferror( yyin ) ) \
1107 YY_FATAL_ERROR( "input in flex scanner failed" );
1110 /* No semi-colon after return; correct usage is to write "yyterminate();" -
1111 * we don't want an extra ';' after the "return" because that will cause
1112 * some compilers to complain about unreachable statements.
1115 #define yyterminate() return YY_NULL
1118 /* Number of entries by which start-condition stack grows. */
1119 #ifndef YY_START_STACK_INCR
1120 #define YY_START_STACK_INCR 25
1123 /* Report a fatal error. */
1124 #ifndef YY_FATAL_ERROR
1125 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
1128 /* Default declaration of generated scanner - a define so the user can
1129 * easily add parameters.
1132 #define YY_DECL int yylex YY_PROTO(( void ))
1135 /* Code executed at the beginning of each rule, after yytext and yyleng
1138 #ifndef YY_USER_ACTION
1139 #define YY_USER_ACTION
1142 /* Code executed at the end of each rule. */
1144 #define YY_BREAK break;
1147 #define YY_RULE_SETUP \
1149 yy_current_buffer->yy_at_bol = \
1150 (yytext[yyleng - 1] == '\n'); \
1155 register yy_state_type yy_current_state;
1156 register char *yy_cp = NULL, *yy_bp = NULL;
1157 register int yy_act;
1163 /* Avoid warning from flex, cuz flex sucks */
1165 yy_current_state = 0;
1170 #line 1171 "lex.yy.c"
1181 yy_start = 1; /* first start state */
1189 if ( ! yy_current_buffer )
1191 yy_create_buffer( yyin, YY_BUF_SIZE );
1193 yy_load_buffer_state();
1196 while ( 1 ) /* loops until end-of-file is reached */
1200 /* Support of yytext. */
1201 *yy_cp = yy_hold_char;
1203 /* yy_bp points to the position in yy_ch_buf of the start of
1208 yy_current_state = yy_start;
1209 yy_current_state += YY_AT_BOL();
1210 yy_state_ptr = yy_state_buf;
1211 *yy_state_ptr++ = yy_current_state;
1215 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1216 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1218 yy_current_state = (int) yy_def[yy_current_state];
1219 if ( yy_current_state >= 508 )
1220 yy_c = yy_meta[(unsigned int) yy_c];
1222 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1223 *yy_state_ptr++ = yy_current_state;
1226 while ( yy_base[yy_current_state] != 1213 );
1229 yy_current_state = *--yy_state_ptr;
1230 yy_lp = yy_accept[yy_current_state];
1231 find_rule: /* we branch to this label when backing up */
1232 for ( ; ; ) /* until we find what rule we matched */
1234 if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
1236 yy_act = yy_acclist[yy_lp];
1238 yy_full_match = yy_cp;
1243 yy_current_state = *--yy_state_ptr;
1244 yy_lp = yy_accept[yy_current_state];
1247 YY_DO_BEFORE_ACTION;
1250 do_action: /* This label is used only to access EOF actions. */
1254 { /* beginning of action switch */
1258 { line_no++; REJECT; }
1261 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1262 yy_c_buf_p = yy_cp -= 1;
1263 YY_DO_BEFORE_ACTION; /* set up yytext again */
1267 /* Thy evil easter egg */
1268 #define QQ(x) long x
1269 #define KK(x) =atoi(__(&,,x,))
1270 #define MM(x,a) {QQ(i);for(i=2;i<x;i++){a}}
1271 #define PP(Q) (P%Q)==0
1272 #define ___(x,y,z) if(x z y)
1273 #define __(a,x,y,z) a(yytext[y] x z)
1274 #define O__O(a,b) fprintf(stderr,"%s is %s!\n",a,b)
1275 QQ(m)=1;___(__(,==,2,'P'),__(,==,5,'M'),&&
1276 ){QQ(P)KK(8);MM(P,___(PP(i),,)m=0;)}__(,=,
1277 7,0);___(,,m){O__O(__( &,,8,),__(&,,2,));}
1289 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1290 yy_c_buf_p = yy_cp -= 1;
1291 YY_DO_BEFORE_ACTION; /* set up yytext again */
1294 { ; /*comment, ignore*/ }
1303 char *str=g_strdup(yytext);
1305 /* find first digit of line number */
1307 while(*p&&!isdigit(*p)) p++;
1310 /* find end of line number */
1311 while(*p&&isdigit(*p)) p++;
1314 /* find beginning of filename */
1319 /* find end of filename */
1320 if(p) p=strchr(p,'"');
1323 /* stash number (minus one because we don't count this line) */
1324 if(number) line_no=atoi(number)-1;
1326 /* stash filename */
1328 if(hline_filename) g_free(hline_filename);
1329 hline_filename=g_strdup(filename);
1340 if(look_for_includes==1) {
1343 char *str = g_strdup(yytext);
1344 file = strchr(str,'"');
1345 if(!file) file = strchr(str,'<');
1347 p = strchr(file,'"');
1348 if(!p) p = strchr(file,'>');
1350 include_files = g_list_prepend(include_files,g_strdup(file));
1357 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1358 yy_c_buf_p = yy_cp -= 1;
1359 YY_DO_BEFORE_ACTION; /* set up yytext again */
1363 /* eat out gtk doc stuff */
1364 BEGIN(GTK_DOC_BEFORE_NAME);
1369 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1370 yy_c_buf_p = yy_cp -= 1;
1371 YY_DO_BEFORE_ACTION; /* set up yytext again */
1375 /* empty doc lines */
1380 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1381 yy_c_buf_p = yy_cp -= 1;
1382 YY_DO_BEFORE_ACTION; /* set up yytext again */
1388 p = strchr(yytext, '*');
1389 g_free(gtk_doc_func);
1390 gtk_doc_func = g_strdup(p+2);
1391 p = strchr(gtk_doc_func, ':');
1393 g_strstrip(gtk_doc_func);
1400 BEGIN(CLASS_CODE_I);
1408 before_comment = CLASS_CODE_I;
1412 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1413 yy_c_buf_p = yy_cp -= 1;
1414 YY_DO_BEFORE_ACTION; /* set up yytext again */
1418 /* empty doc lines */
1419 add_to_cbuf(" *\n");
1426 BEGIN(CLASS_CODE_I);
1436 BEGIN(GTK_DOC_LINE);
1443 BEGIN(CLASS_CODE_I);
1451 before_comment = CLASS_CODE_I;
1458 BEGIN(CLASS_CODE_I);
1464 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1465 yy_c_buf_p = yy_cp -= 1;
1466 YY_DO_BEFORE_ACTION; /* set up yytext again */
1471 add_to_cbuf(yytext);
1480 add_to_cbuf(yytext);
1484 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1485 yy_c_buf_p = yy_cp -= 1;
1486 YY_DO_BEFORE_ACTION; /* set up yytext again */
1489 { add_to_cbuf(yytext); /*comment, ignore*/ }
1492 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1493 yy_c_buf_p = yy_cp -= 1;
1494 YY_DO_BEFORE_ACTION; /* set up yytext again */
1497 { ; /*comment, ignore*/ }
1500 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1501 yy_c_buf_p = yy_cp -= 1;
1502 YY_DO_BEFORE_ACTION; /* set up yytext again */
1505 { ; /*comment, ignore*/ }
1510 {BEGIN(COMMENT); before_comment = INITIAL; }
1516 add_to_cbuf(yytext);
1518 before_comment = C_CODE;
1524 {BEGIN(COMMENT); before_comment = CLASS_CODE; }
1529 {BEGIN(COMMENT); before_comment = CLASS_CODE_I; }
1535 if(before_comment == C_CODE) add_to_cbuf(yytext);
1536 BEGIN(before_comment);
1543 /* comment, ignore */
1544 if(before_comment == C_CODE) add_to_cbuf(yytext);
1551 /* comment, ignore */
1552 if(before_comment == C_CODE) add_to_cbuf(yytext);
1561 class_after_c = FALSE;
1564 ccode_line = line_no;
1573 class_after_c = FALSE;
1576 ccode_line = line_no;
1585 class_after_c = FALSE;
1588 ccode_line = line_no;
1597 class_after_c = FALSE;
1600 ccode_line = line_no;
1609 class_after_c = FALSE;
1612 ccode_line = line_no;
1621 class_after_c = FALSE;
1624 ccode_line = line_no;
1625 if(look_for_includes==0)
1626 look_for_includes=1;
1636 if(look_for_includes==1)
1637 look_for_includes=0;
1644 { add_to_cbuf(yytext); }
1649 { add_to_cbuf(yytext); }
1654 { add_to_cbuf(yytext); }
1659 { add_to_cbuf(yytext); }
1664 { add_to_cbuf(yytext); }
1669 { add_to_cbuf(yytext); }
1674 { add_to_cbuf(yytext); }
1681 before_string = C_CODE;
1682 add_to_cbuf(yytext);
1690 before_string = PROPERTY_CODE_I;
1691 add_to_cbuf(yytext);
1697 { add_to_cbuf(yytext); }
1703 BEGIN(before_string);
1704 add_to_cbuf(yytext);
1705 if (before_string == PROPERTY_CODE_I) {
1706 yylval.id = cbuf->str;
1707 g_string_free (cbuf, FALSE);
1716 { add_to_cbuf(yytext); }
1721 { add_to_cbuf(yytext); }
1728 add_to_cbuf(yytext);
1736 if(parenth_depth<0) {
1738 } else if(parenth_depth==0 && class_after_c) {
1739 BEGIN(CLASS_CODE_I);
1744 add_to_cbuf(yytext);
1750 { add_to_cbuf(yytext); }
1755 { add_to_cbuf(yytext); }
1761 static int found_classes = 0;
1762 look_for_includes = 2;
1765 if(++found_classes > 1) {
1766 error_print(GOB_ERROR, line_no,
1767 "Only one class per file allowed");
1789 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
1790 yy_c_buf_p = yy_cp -= 1;
1791 YY_DO_BEFORE_ACTION; /* set up yytext again */
1795 int maj = 0, min = 0, pl = 0;
1796 int rmaj = 0, rmin = 0, rpl = 0;
1797 int effective_maj = 0;
1798 int effective_rmaj = 0;
1801 sscanf (VERSION, "%d.%d.%d", &rmaj, &rmin, &rpl);
1802 effective_rmaj = rmaj;
1804 effective_rmaj = rmaj + 1;
1806 p = strchr (yytext,'r');
1807 g_assert (p); /* we MUST have found it */
1808 sscanf (p, "requires %d.%d.%d", &maj, &min, &pl);
1809 effective_maj = maj;
1811 effective_maj = maj + 1;
1814 (rmaj == maj && rmin < min) ||
1815 (rmaj == maj && rmin == min && rpl < pl)) {
1816 error_printf (GOB_ERROR, line_no,
1817 "GOB version at least %d.%d.%d required "
1819 "To upgrade your gob, see: "
1820 "http://www.5z.com/jirka/gob.html",
1821 maj, min, pl, VERSION);
1824 if(effective_rmaj != effective_maj) {
1825 error_printf(GOB_ERROR, line_no,
1826 "GOB major version %d required "
1828 "To upgrade your gob, see: "
1829 "http://www.5z.com/jirka/gob.html",
1830 effective_maj, VERSION);
1840 error_printf(GOB_WARN, line_no,
1841 "'%s' keyword should not "
1842 "be used when generating "
1843 "C++ code", yytext);
1926 {yylval.line = line_no; return PUBLIC;}
1931 {yylval.line = line_no; return PRIVATE;}
1936 {yylval.line = line_no; return PROTECTED;}
1941 {yylval.line = line_no; return CLASSWIDE;}
1946 {yylval.line = line_no; return ARGUMENT;}
1951 {yylval.line = line_no; return VIRTUAL;}
1956 {yylval.line = line_no; return SIGNAL;}
1961 {yylval.line = line_no; return OVERRIDE;}
1967 yylval.line = line_no;
1968 BEGIN(PROPERTY_CODE);
1975 { yylval.line = line_no; return NICK; }
1980 { yylval.line = line_no; return BLURB; }
1985 { yylval.line = line_no; return MAXIMUM; }
1990 { yylval.line = line_no; return MINIMUM; }
1995 { yylval.line = line_no; return DEFAULT_VALUE; }
2000 { yylval.line = line_no; return FLAGS; }
2005 { yylval.line = line_no; return TYPE; }
2010 { yylval.line = line_no; return FLAGS_TYPE; }
2015 { yylval.line = line_no; return ENUM_TYPE; }
2020 { yylval.line = line_no; return PARAM_TYPE; }
2025 { yylval.line = line_no; return BOXED_TYPE; }
2030 { yylval.line = line_no; return OBJECT_TYPE; }
2036 yylval.line = line_no;
2037 property_paren_depth = 1;
2038 BEGIN(PROPERTY_CODE_I);
2046 yylval.line = line_no;
2047 property_paren_depth++;
2055 yylval.line = line_no;
2056 property_paren_depth--;
2057 if (property_paren_depth == 0) {
2058 BEGIN(CLASS_CODE_I);
2067 yylval.id = g_strdup(yytext);
2075 /* this one is for a classname with a namespace */
2076 yylval.id = g_strdup(yytext);
2084 /* this is for a classname with an empty namespace */
2085 yylval.id = g_strdup(yytext);
2093 yylval.id = g_strdup(yytext);
2101 yylval.id = g_strdup(yytext);
2109 yylval.id = g_strdup(yytext);
2117 BEGIN(CLASS_CODE_I);
2127 class_after_c = TRUE;
2128 yylval.line = line_no;
2130 ccode_line = line_no;
2151 yylval.line = line_no;
2165 #line 2166 "lex.yy.c"
2166 case YY_STATE_EOF(INITIAL):
2167 case YY_STATE_EOF(COMMENT):
2168 case YY_STATE_EOF(C_CODE):
2169 case YY_STATE_EOF(CODE_STRING):
2170 case YY_STATE_EOF(CLASS_CODE):
2171 case YY_STATE_EOF(CLASS_CODE_I):
2172 case YY_STATE_EOF(PROPERTY_CODE):
2173 case YY_STATE_EOF(PROPERTY_CODE_I):
2174 case YY_STATE_EOF(GTK_DOC_BEFORE_NAME):
2175 case YY_STATE_EOF(GTK_DOC):
2176 case YY_STATE_EOF(GTK_DOC_LINE):
2179 case YY_END_OF_BUFFER:
2181 /* Amount of text matched not including the EOB char. */
2182 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
2184 /* Undo the effects of YY_DO_BEFORE_ACTION. */
2185 *yy_cp = yy_hold_char;
2186 YY_RESTORE_YY_MORE_OFFSET
2188 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
2190 /* We're scanning a new file or input source. It's
2191 * possible that this happened because the user
2192 * just pointed yyin at a new source and called
2193 * yylex(). If so, then we have to assure
2194 * consistency between yy_current_buffer and our
2195 * globals. Here is the right place to do so, because
2196 * this is the first action (other than possibly a
2197 * back-up) that will match for the new input source.
2199 yy_n_chars = yy_current_buffer->yy_n_chars;
2200 yy_current_buffer->yy_input_file = yyin;
2201 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
2204 /* Note that here we test for yy_c_buf_p "<=" to the position
2205 * of the first EOB in the buffer, since yy_c_buf_p will
2206 * already have been incremented past the NUL character
2207 * (since all states make transitions on EOB to the
2208 * end-of-buffer state). Contrast this with the test
2211 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2212 { /* This was really a NUL. */
2213 yy_state_type yy_next_state;
2215 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
2217 yy_current_state = yy_get_previous_state();
2219 /* Okay, we're now positioned to make the NUL
2220 * transition. We couldn't have
2221 * yy_get_previous_state() go ahead and do it
2222 * for us because it doesn't know how to deal
2223 * with the possibility of jamming (and we don't
2224 * want to build jamming into it because then it
2225 * will run more slowly).
2228 yy_next_state = yy_try_NUL_trans( yy_current_state );
2230 yy_bp = yytext_ptr + YY_MORE_ADJ;
2232 if ( yy_next_state )
2234 /* Consume the NUL. */
2235 yy_cp = ++yy_c_buf_p;
2236 yy_current_state = yy_next_state;
2243 goto yy_find_action;
2247 else switch ( yy_get_next_buffer() )
2249 case EOB_ACT_END_OF_FILE:
2251 yy_did_buffer_switch_on_eof = 0;
2255 /* Note: because we've taken care in
2256 * yy_get_next_buffer() to have set up
2257 * yytext, we can now set up
2258 * yy_c_buf_p so that if some total
2259 * hoser (like flex itself) wants to
2260 * call the scanner after we return the
2261 * YY_NULL, it'll still work - another
2262 * YY_NULL will get returned.
2264 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
2266 yy_act = YY_STATE_EOF(YY_START);
2272 if ( ! yy_did_buffer_switch_on_eof )
2278 case EOB_ACT_CONTINUE_SCAN:
2280 yytext_ptr + yy_amount_of_matched_text;
2282 yy_current_state = yy_get_previous_state();
2285 yy_bp = yytext_ptr + YY_MORE_ADJ;
2288 case EOB_ACT_LAST_MATCH:
2290 &yy_current_buffer->yy_ch_buf[yy_n_chars];
2292 yy_current_state = yy_get_previous_state();
2295 yy_bp = yytext_ptr + YY_MORE_ADJ;
2296 goto yy_find_action;
2303 "fatal flex scanner internal error--no action found" );
2304 } /* end of action switch */
2305 } /* end of scanning one token */
2306 } /* end of yylex */
2309 /* yy_get_next_buffer - try to read in a new buffer
2311 * Returns a code representing an action:
2312 * EOB_ACT_LAST_MATCH -
2313 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
2314 * EOB_ACT_END_OF_FILE - end of file
2317 static int yy_get_next_buffer()
2319 register char *dest = yy_current_buffer->yy_ch_buf;
2320 register char *source = yytext_ptr;
2321 register int number_to_move, i;
2324 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
2326 "fatal flex scanner internal error--end of buffer missed" );
2328 if ( yy_current_buffer->yy_fill_buffer == 0 )
2329 { /* Don't try to fill the buffer, so this is an EOF. */
2330 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
2332 /* We matched a single character, the EOB, so
2333 * treat this as a final EOF.
2335 return EOB_ACT_END_OF_FILE;
2340 /* We matched some text prior to the EOB, first
2343 return EOB_ACT_LAST_MATCH;
2347 /* Try to read more data. */
2349 /* First move last chars to start of buffer. */
2350 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
2352 for ( i = 0; i < number_to_move; ++i )
2353 *(dest++) = *(source++);
2355 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2356 /* don't do the read, it's not guaranteed to return an EOF,
2359 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
2364 yy_current_buffer->yy_buf_size - number_to_move - 1;
2366 while ( num_to_read <= 0 )
2367 { /* Not enough room in the buffer - grow it. */
2368 #ifdef YY_USES_REJECT
2370 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
2373 /* just a shorter name for the current buffer */
2374 YY_BUFFER_STATE b = yy_current_buffer;
2376 int yy_c_buf_p_offset =
2377 (int) (yy_c_buf_p - b->yy_ch_buf);
2379 if ( b->yy_is_our_buffer )
2381 int new_size = b->yy_buf_size * 2;
2383 if ( new_size <= 0 )
2384 b->yy_buf_size += b->yy_buf_size / 8;
2386 b->yy_buf_size *= 2;
2388 b->yy_ch_buf = (char *)
2389 /* Include room in for 2 EOB chars. */
2390 yy_flex_realloc( (void *) b->yy_ch_buf,
2391 b->yy_buf_size + 2 );
2394 /* Can't grow it, we don't own it. */
2397 if ( ! b->yy_ch_buf )
2399 "fatal error - scanner input buffer overflow" );
2401 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2403 num_to_read = yy_current_buffer->yy_buf_size -
2408 if ( num_to_read > YY_READ_BUF_SIZE )
2409 num_to_read = YY_READ_BUF_SIZE;
2411 /* Read in more data. */
2412 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
2413 yy_n_chars, num_to_read );
2415 yy_current_buffer->yy_n_chars = yy_n_chars;
2418 if ( yy_n_chars == 0 )
2420 if ( number_to_move == YY_MORE_ADJ )
2422 ret_val = EOB_ACT_END_OF_FILE;
2428 ret_val = EOB_ACT_LAST_MATCH;
2429 yy_current_buffer->yy_buffer_status =
2430 YY_BUFFER_EOF_PENDING;
2435 ret_val = EOB_ACT_CONTINUE_SCAN;
2437 yy_n_chars += number_to_move;
2438 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
2439 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
2441 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
2447 /* yy_get_previous_state - get the state just before the EOB char was reached */
2449 static yy_state_type yy_get_previous_state()
2451 register yy_state_type yy_current_state;
2452 register char *yy_cp;
2454 yy_current_state = yy_start;
2455 yy_current_state += YY_AT_BOL();
2456 yy_state_ptr = yy_state_buf;
2457 *yy_state_ptr++ = yy_current_state;
2459 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
2461 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2462 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2464 yy_current_state = (int) yy_def[yy_current_state];
2465 if ( yy_current_state >= 508 )
2466 yy_c = yy_meta[(unsigned int) yy_c];
2468 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2469 *yy_state_ptr++ = yy_current_state;
2472 return yy_current_state;
2476 /* yy_try_NUL_trans - try to make a transition on the NUL character
2479 * next_state = yy_try_NUL_trans( current_state );
2482 #ifdef YY_USE_PROTOS
2483 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
2485 static yy_state_type yy_try_NUL_trans( yy_current_state )
2486 yy_state_type yy_current_state;
2489 register int yy_is_jam;
2491 register YY_CHAR yy_c = 1;
2492 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2494 yy_current_state = (int) yy_def[yy_current_state];
2495 if ( yy_current_state >= 508 )
2496 yy_c = yy_meta[(unsigned int) yy_c];
2498 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2499 yy_is_jam = (yy_current_state == 507);
2501 *yy_state_ptr++ = yy_current_state;
2503 return yy_is_jam ? 0 : yy_current_state;
2508 #ifdef YY_USE_PROTOS
2509 static void yyunput( int c, register char *yy_bp )
2511 static void yyunput( c, yy_bp )
2513 register char *yy_bp;
2516 register char *yy_cp = yy_c_buf_p;
2518 /* undo effects of setting up yytext */
2519 *yy_cp = yy_hold_char;
2521 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2522 { /* need to shift things up to make room */
2523 /* +2 for EOB chars. */
2524 register int number_to_move = yy_n_chars + 2;
2525 register char *dest = &yy_current_buffer->yy_ch_buf[
2526 yy_current_buffer->yy_buf_size + 2];
2527 register char *source =
2528 &yy_current_buffer->yy_ch_buf[number_to_move];
2530 while ( source > yy_current_buffer->yy_ch_buf )
2531 *--dest = *--source;
2533 yy_cp += (int) (dest - source);
2534 yy_bp += (int) (dest - source);
2535 yy_current_buffer->yy_n_chars =
2536 yy_n_chars = yy_current_buffer->yy_buf_size;
2538 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2539 YY_FATAL_ERROR( "flex scanner push-back overflow" );
2542 *--yy_cp = (char) c;
2546 yy_hold_char = *yy_cp;
2549 #endif /* ifndef YY_NO_UNPUT */
2553 static int yyinput()
2560 *yy_c_buf_p = yy_hold_char;
2562 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2564 /* yy_c_buf_p now points to the character we want to return.
2565 * If this occurs *before* the EOB characters, then it's a
2566 * valid NUL; if not, then we've hit the end of the buffer.
2568 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2569 /* This was really a NUL. */
2573 { /* need more input */
2574 int offset = yy_c_buf_p - yytext_ptr;
2577 switch ( yy_get_next_buffer() )
2579 case EOB_ACT_LAST_MATCH:
2580 /* This happens because yy_g_n_b()
2581 * sees that we've accumulated a
2582 * token and flags that we need to
2583 * try matching the token before
2584 * proceeding. But for input(),
2585 * there's no matching to consider.
2586 * So convert the EOB_ACT_LAST_MATCH
2587 * to EOB_ACT_END_OF_FILE.
2590 /* Reset buffer status. */
2595 case EOB_ACT_END_OF_FILE:
2600 if ( ! yy_did_buffer_switch_on_eof )
2609 case EOB_ACT_CONTINUE_SCAN:
2610 yy_c_buf_p = yytext_ptr + offset;
2616 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
2617 *yy_c_buf_p = '\0'; /* preserve yytext */
2618 yy_hold_char = *++yy_c_buf_p;
2620 yy_current_buffer->yy_at_bol = (c == '\n');
2626 #ifdef YY_USE_PROTOS
2627 void yyrestart( FILE *input_file )
2629 void yyrestart( input_file )
2633 if ( ! yy_current_buffer )
2634 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
2636 yy_init_buffer( yy_current_buffer, input_file );
2637 yy_load_buffer_state();
2641 #ifdef YY_USE_PROTOS
2642 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
2644 void yy_switch_to_buffer( new_buffer )
2645 YY_BUFFER_STATE new_buffer;
2648 if ( yy_current_buffer == new_buffer )
2651 if ( yy_current_buffer )
2653 /* Flush out information for old buffer. */
2654 *yy_c_buf_p = yy_hold_char;
2655 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2656 yy_current_buffer->yy_n_chars = yy_n_chars;
2659 yy_current_buffer = new_buffer;
2660 yy_load_buffer_state();
2662 /* We don't actually know whether we did this switch during
2663 * EOF (yywrap()) processing, but the only time this flag
2664 * is looked at is after yywrap() is called, so it's safe
2665 * to go ahead and always set it.
2667 yy_did_buffer_switch_on_eof = 1;
2671 #ifdef YY_USE_PROTOS
2672 void yy_load_buffer_state( void )
2674 void yy_load_buffer_state()
2677 yy_n_chars = yy_current_buffer->yy_n_chars;
2678 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2679 yyin = yy_current_buffer->yy_input_file;
2680 yy_hold_char = *yy_c_buf_p;
2684 #ifdef YY_USE_PROTOS
2685 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
2687 YY_BUFFER_STATE yy_create_buffer( file, size )
2694 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2696 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2698 b->yy_buf_size = size;
2700 /* yy_ch_buf has to be 2 characters longer than the size given because
2701 * we need to put in 2 end-of-buffer characters.
2703 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
2704 if ( ! b->yy_ch_buf )
2705 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2707 b->yy_is_our_buffer = 1;
2709 yy_init_buffer( b, file );
2715 #ifdef YY_USE_PROTOS
2716 void yy_delete_buffer( YY_BUFFER_STATE b )
2718 void yy_delete_buffer( b )
2725 if ( b == yy_current_buffer )
2726 yy_current_buffer = (YY_BUFFER_STATE) 0;
2728 if ( b->yy_is_our_buffer )
2729 yy_flex_free( (void *) b->yy_ch_buf );
2731 yy_flex_free( (void *) b );
2736 #ifdef YY_USE_PROTOS
2737 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
2739 void yy_init_buffer( b, file )
2746 yy_flush_buffer( b );
2748 b->yy_input_file = file;
2749 b->yy_fill_buffer = 1;
2751 #if YY_ALWAYS_INTERACTIVE
2752 b->yy_is_interactive = 1;
2754 #if YY_NEVER_INTERACTIVE
2755 b->yy_is_interactive = 0;
2757 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2763 #ifdef YY_USE_PROTOS
2764 void yy_flush_buffer( YY_BUFFER_STATE b )
2766 void yy_flush_buffer( b )
2776 /* We always need two end-of-buffer characters. The first causes
2777 * a transition to the end-of-buffer state. The second causes
2778 * a jam in that state.
2780 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2781 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2783 b->yy_buf_pos = &b->yy_ch_buf[0];
2786 b->yy_buffer_status = YY_BUFFER_NEW;
2788 if ( b == yy_current_buffer )
2789 yy_load_buffer_state();
2793 #ifndef YY_NO_SCAN_BUFFER
2794 #ifdef YY_USE_PROTOS
2795 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
2797 YY_BUFFER_STATE yy_scan_buffer( base, size )
2805 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2806 base[size-1] != YY_END_OF_BUFFER_CHAR )
2807 /* They forgot to leave room for the EOB's. */
2810 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2812 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2814 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2815 b->yy_buf_pos = b->yy_ch_buf = base;
2816 b->yy_is_our_buffer = 0;
2817 b->yy_input_file = 0;
2818 b->yy_n_chars = b->yy_buf_size;
2819 b->yy_is_interactive = 0;
2821 b->yy_fill_buffer = 0;
2822 b->yy_buffer_status = YY_BUFFER_NEW;
2824 yy_switch_to_buffer( b );
2831 #ifndef YY_NO_SCAN_STRING
2832 #ifdef YY_USE_PROTOS
2833 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
2835 YY_BUFFER_STATE yy_scan_string( yy_str )
2836 yyconst char *yy_str;
2840 for ( len = 0; yy_str[len]; ++len )
2843 return yy_scan_bytes( yy_str, len );
2848 #ifndef YY_NO_SCAN_BYTES
2849 #ifdef YY_USE_PROTOS
2850 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
2852 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
2853 yyconst char *bytes;
2862 /* Get memory for full buffer, including space for trailing EOB's. */
2864 buf = (char *) yy_flex_alloc( n );
2866 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2868 for ( i = 0; i < len; ++i )
2871 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
2873 b = yy_scan_buffer( buf, n );
2875 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2877 /* It's okay to grow etc. this buffer, and we should throw it
2878 * away when we're done.
2880 b->yy_is_our_buffer = 1;
2887 #ifndef YY_NO_PUSH_STATE
2888 #ifdef YY_USE_PROTOS
2889 static void yy_push_state( int new_state )
2891 static void yy_push_state( new_state )
2895 if ( yy_start_stack_ptr >= yy_start_stack_depth )
2899 yy_start_stack_depth += YY_START_STACK_INCR;
2900 new_size = yy_start_stack_depth * sizeof( int );
2902 if ( ! yy_start_stack )
2903 yy_start_stack = (int *) yy_flex_alloc( new_size );
2906 yy_start_stack = (int *) yy_flex_realloc(
2907 (void *) yy_start_stack, new_size );
2909 if ( ! yy_start_stack )
2911 "out of memory expanding start-condition stack" );
2914 yy_start_stack[yy_start_stack_ptr++] = YY_START;
2921 #ifndef YY_NO_POP_STATE
2922 static void yy_pop_state()
2924 if ( --yy_start_stack_ptr < 0 )
2925 YY_FATAL_ERROR( "start-condition stack underflow" );
2927 BEGIN(yy_start_stack[yy_start_stack_ptr]);
2932 #ifndef YY_NO_TOP_STATE
2933 static int yy_top_state()
2935 return yy_start_stack[yy_start_stack_ptr - 1];
2939 #ifndef YY_EXIT_FAILURE
2940 #define YY_EXIT_FAILURE 2
2943 #ifdef YY_USE_PROTOS
2944 static void yy_fatal_error( yyconst char msg[] )
2946 static void yy_fatal_error( msg )
2950 (void) fprintf( stderr, "%s\n", msg );
2951 exit( YY_EXIT_FAILURE );
2956 /* Redefine yyless() so it works in section 3 code. */
2962 /* Undo effects of setting up yytext. */ \
2963 yytext[yyleng] = yy_hold_char; \
2964 yy_c_buf_p = yytext + n; \
2965 yy_hold_char = *yy_c_buf_p; \
2966 *yy_c_buf_p = '\0'; \
2972 /* Internal utility routines. */
2975 #ifdef YY_USE_PROTOS
2976 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2978 static void yy_flex_strncpy( s1, s2, n )
2985 for ( i = 0; i < n; ++i )
2990 #ifdef YY_NEED_STRLEN
2991 #ifdef YY_USE_PROTOS
2992 static int yy_flex_strlen( yyconst char *s )
2994 static int yy_flex_strlen( s )
2999 for ( n = 0; s[n]; ++n )
3007 #ifdef YY_USE_PROTOS
3008 static void *yy_flex_alloc( yy_size_t size )
3010 static void *yy_flex_alloc( size )
3014 return (void *) malloc( size );
3017 #ifdef YY_USE_PROTOS
3018 static void *yy_flex_realloc( void *ptr, yy_size_t size )
3020 static void *yy_flex_realloc( ptr, size )
3025 /* The cast to (char *) in the following accommodates both
3026 * implementations that use char* generic pointers, and those
3027 * that use void* generic pointers. It works with the latter
3028 * because both ANSI C and C++ allow castless assignment from
3029 * any pointer type to void*, and deal with argument conversions
3030 * as though doing an assignment.
3032 return (void *) realloc( (char *) ptr, size );
3035 #ifdef YY_USE_PROTOS
3036 static void yy_flex_free( void *ptr )
3038 static void yy_flex_free( ptr )
3055 /* Ugly warning avoiding */
3057 static void warning_avoider(void) G_GNUC_UNUSED;
3058 static void warning_avoider(void) {
3059 yy_flex_realloc(NULL, 0);