1 /* A lexical scanner generated by flex */
3 /* Scanner skeleton version:
4 * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
8 #define YY_FLEX_MAJOR_VERSION 2
9 #define YY_FLEX_MINOR_VERSION 5
14 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
27 /* Use prototypes in function declarations. */
30 /* The "const" storage-class-modifier is valid. */
33 #else /* ! __cplusplus */
41 #endif /* ! __cplusplus */
60 #define YY_PROTO(proto) proto
62 #define YY_PROTO(proto) ()
65 /* Returned upon end-of-file. */
68 /* Promotes a possibly negative, possibly signed char to an unsigned
69 * integer for use as an array index. If the signed char is negative,
70 * we want to instead treat it as an 8-bit unsigned char, hence the
73 #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
75 /* Enter a start condition. This macro really ought to take a parameter,
76 * but we do it the disgusting crufty way forced on us by the ()-less
77 * definition of BEGIN.
79 #define BEGIN yy_start = 1 + 2 *
81 /* Translate the current start state into a value that can be later handed
82 * to BEGIN to return to the state. The YYSTATE alias is for lex
85 #define YY_START ((yy_start - 1) / 2)
86 #define YYSTATE YY_START
88 /* Action number for EOF rule of a given start state. */
89 #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
91 /* Special action meaning "start processing a new file". */
92 #define YY_NEW_FILE yyrestart( yyin )
94 #define YY_END_OF_BUFFER_CHAR 0
96 /* Size of default input buffer. */
97 #define YY_BUF_SIZE 16384
99 typedef struct yy_buffer_state *YY_BUFFER_STATE;
102 extern FILE *yyin, *yyout;
104 #define EOB_ACT_CONTINUE_SCAN 0
105 #define EOB_ACT_END_OF_FILE 1
106 #define EOB_ACT_LAST_MATCH 2
108 /* The funky do-while in the following #define is used to turn the definition
109 * int a single C statement (which needs a semi-colon terminator). This
110 * avoids problems with code like:
112 * if ( condition_holds )
115 * do_something_else();
117 * Prior to using the do-while the compiler would get upset at the
118 * "else" because it interpreted the "if" statement as being all
119 * done when it reached the ';' after the yyless() call.
122 /* Return all but the first 'n' matched characters back to the input stream. */
127 /* Undo effects of setting up yytext. */ \
128 *yy_cp = yy_hold_char; \
129 YY_RESTORE_YY_MORE_OFFSET \
130 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
131 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
135 #define unput(c) yyunput( c, yytext_ptr )
137 /* The following is because we cannot portably get our hands on size_t
138 * (without autoconf's help, which isn't available because we want
139 * flex-generated scanners to compile on their own).
141 typedef unsigned int yy_size_t;
144 struct yy_buffer_state
148 char *yy_ch_buf; /* input buffer */
149 char *yy_buf_pos; /* current position in input buffer */
151 /* Size of input buffer in bytes, not including room for EOB
154 yy_size_t yy_buf_size;
156 /* Number of characters read into yy_ch_buf, not including EOB
161 /* Whether we "own" the buffer - i.e., we know we created it,
162 * and can realloc() it to grow it, and should free() it to
165 int yy_is_our_buffer;
167 /* Whether this is an "interactive" input source; if so, and
168 * if we're using stdio for input, then we want to use getc()
169 * instead of fread(), to make sure we stop fetching input after
172 int yy_is_interactive;
174 /* Whether we're considered to be at the beginning of a line.
175 * If so, '^' rules will be active on the next match, otherwise
180 /* Whether to try to fill the input buffer when we reach the
185 int yy_buffer_status;
186 #define YY_BUFFER_NEW 0
187 #define YY_BUFFER_NORMAL 1
188 /* When an EOF's been seen but there's still some text to process
189 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
190 * shouldn't try reading from the input source any more. We might
191 * still have a bunch of tokens to match, though, because of
192 * possible backing-up.
194 * When we actually see the EOF, we change the status to "new"
195 * (via yyrestart()), so that the user can continue scanning by
196 * just pointing yyin at a new input file.
198 #define YY_BUFFER_EOF_PENDING 2
201 static YY_BUFFER_STATE yy_current_buffer = 0;
203 /* We provide macros for accessing buffer states in case in the
204 * future we want to put the buffer states in a more general
207 #define YY_CURRENT_BUFFER yy_current_buffer
210 /* yy_hold_char holds the character lost when yytext is formed. */
211 static char yy_hold_char;
213 static int yy_n_chars; /* number of characters read into yy_ch_buf */
218 /* Points to current character in buffer. */
219 static char *yy_c_buf_p = (char *) 0;
220 static int yy_init = 1; /* whether we need to initialize */
221 static int yy_start = 0; /* start state number */
223 /* Flag which is used to allow yywrap()'s to do buffer switches
224 * instead of setting up a fresh yyin. A bit of a hack ...
226 static int yy_did_buffer_switch_on_eof;
228 void yyrestart YY_PROTO(( FILE *input_file ));
230 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
231 void yy_load_buffer_state YY_PROTO(( void ));
232 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
233 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
234 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
235 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
236 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
238 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
239 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
240 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
242 static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
243 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
244 static void yy_flex_free YY_PROTO(( void * ));
246 #define yy_new_buffer yy_create_buffer
248 #define yy_set_interactive(is_interactive) \
250 if ( ! yy_current_buffer ) \
251 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
252 yy_current_buffer->yy_is_interactive = is_interactive; \
255 #define yy_set_bol(at_bol) \
257 if ( ! yy_current_buffer ) \
258 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
259 yy_current_buffer->yy_at_bol = at_bol; \
262 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
265 #define YY_USES_REJECT
266 typedef unsigned char YY_CHAR;
267 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
268 typedef int yy_state_type;
270 #define yytext_ptr yytext
272 static yy_state_type yy_get_previous_state YY_PROTO(( void ));
273 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
274 static int yy_get_next_buffer YY_PROTO(( void ));
275 static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
277 /* Done after the current pattern has been matched and before the
278 * corresponding action - sets up yytext.
280 #define YY_DO_BEFORE_ACTION \
281 yytext_ptr = yy_bp; \
282 yyleng = (int) (yy_cp - yy_bp); \
283 yy_hold_char = *yy_cp; \
287 #define YY_NUM_RULES 58
288 #define YY_END_OF_BUFFER 59
289 static yyconst short int yy_acclist[269] =
291 59, 57, 58, 56, 57, 58, 1, 56, 58, 57,
292 58, 57, 58, 57, 58, 11, 57, 58, 1, 12,
293 58, 11, 57, 58, 27, 57, 58, 1, 28, 58,
294 21, 27, 57, 58, 27, 57, 58, 27, 57, 58,
295 27, 57, 58, 25, 27, 57, 58, 26, 27, 57,
296 58, 27, 57, 58, 24, 57, 58, 1, 58, 23,
297 24, 57, 58, 24, 57, 58, 57, 58, 57, 58,
298 52, 57, 58, 52, 57, 58, 53, 57, 58, 57,
299 58, 57, 58, 50, 57, 58, 50, 57, 58, 52,
300 57, 58, 52, 57, 58, 52, 57, 58, 52, 57,
302 58, 52, 57, 58, 52, 57, 58, 52, 57, 58,
303 52, 57, 58, 52, 57, 58, 52, 57, 58, 52,
304 57, 58, 52, 57, 58, 54, 57, 58, 55, 57,
305 58, 6, 14, 10, 7, 20, 15, 22, 8, 52,
306 51, 52, 50, 9, 50, 50, 52, 52, 52, 52,
307 52, 52, 52, 52, 52, 52, 52, 52, 52, 52,
308 52, 52, 52, 2, 13, 16, 18, 3, 4, 51,
309 52, 50, 5, 50, 50, 52, 52, 52, 52, 52,
310 39, 52, 52, 52, 52, 52, 52, 52, 52, 52,
311 52, 52, 52, 52, 17, 19, 30, 52, 52, 42,
313 52, 52, 34, 52, 52, 37, 52, 52, 52, 52,
314 52, 52, 52, 52, 52, 52, 52, 31, 52, 29,
315 52, 52, 40, 52, 52, 52, 52, 52, 38, 52,
316 52, 52, 52, 33, 52, 52, 52, 52, 41, 52,
317 52, 52, 52, 43, 52, 47, 52, 35, 52, 32,
318 52, 52, 52, 52, 49, 52, 52, 44, 52, 52,
319 46, 52, 45, 52, 48, 52, 36, 52
322 static yyconst short int yy_accept[200] =
324 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
325 1, 1, 1, 2, 4, 7, 10, 12, 14, 16,
326 19, 22, 25, 28, 31, 35, 38, 41, 44, 48,
327 52, 55, 58, 60, 64, 67, 69, 71, 74, 77,
328 80, 82, 84, 87, 90, 93, 96, 99, 102, 105,
329 108, 111, 114, 117, 120, 123, 126, 129, 132, 133,
330 133, 133, 133, 134, 135, 135, 135, 135, 136, 136,
331 137, 138, 139, 140, 140, 140, 141, 142, 143, 144,
332 145, 145, 145, 146, 146, 146, 147, 148, 149, 150,
333 151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
335 161, 162, 163, 164, 164, 165, 165, 166, 166, 166,
336 167, 168, 168, 169, 169, 170, 170, 171, 172, 173,
337 173, 174, 175, 176, 177, 178, 179, 180, 181, 183,
338 184, 185, 186, 187, 188, 189, 190, 191, 192, 193,
339 194, 195, 195, 196, 197, 199, 200, 202, 203, 205,
340 206, 208, 209, 210, 211, 212, 213, 214, 215, 216,
341 217, 218, 220, 221, 222, 223, 225, 226, 227, 228,
342 229, 231, 232, 233, 234, 236, 237, 238, 239, 241,
343 242, 243, 244, 246, 248, 250, 252, 253, 254, 255,
344 257, 258, 260, 261, 263, 265, 267, 269, 269
348 static yyconst int yy_ec[256] =
350 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
351 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
352 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
353 1, 2, 1, 4, 1, 1, 5, 1, 6, 1,
354 1, 7, 1, 1, 1, 8, 9, 10, 11, 11,
355 11, 11, 11, 11, 11, 12, 12, 13, 1, 1,
356 1, 1, 1, 1, 14, 14, 14, 14, 14, 14,
357 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
358 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
359 1, 16, 1, 1, 15, 1, 17, 18, 19, 20,
361 21, 22, 23, 24, 25, 15, 15, 26, 27, 28,
362 29, 30, 15, 31, 32, 33, 34, 35, 15, 36,
363 15, 15, 37, 1, 38, 1, 1, 1, 1, 1,
364 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
365 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
366 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
367 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
368 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
369 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
370 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
372 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
373 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
374 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
375 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
376 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
380 static yyconst int yy_meta[39] =
382 1, 1, 2, 1, 1, 1, 1, 1, 1, 3,
383 3, 3, 4, 5, 6, 1, 5, 5, 5, 5,
384 5, 5, 6, 6, 6, 6, 6, 6, 6, 6,
385 6, 6, 6, 6, 6, 6, 1, 1
388 static yyconst short int yy_base[214] =
390 0, 2, 3, 5, 19, 55, 10, 13, 93, 0,
391 124, 0, 434, 435, 435, 435, 11, 407, 0, 435,
392 435, 423, 435, 435, 435, 11, 23, 0, 435, 435,
393 393, 435, 435, 435, 0, 24, 0, 417, 21, 435,
394 28, 34, 34, 43, 34, 49, 37, 50, 54, 55,
395 56, 129, 134, 127, 59, 61, 435, 435, 435, 426,
396 411, 390, 435, 435, 38, 420, 419, 435, 421, 435,
397 435, 435, 435, 420, 409, 408, 407, 126, 159, 435,
398 416, 162, 167, 172, 0, 177, 66, 64, 2, 163,
399 173, 168, 135, 177, 178, 179, 182, 180, 183, 181,
401 190, 192, 194, 415, 435, 385, 435, 410, 409, 435,
402 435, 411, 435, 410, 435, 399, 398, 197, 206, 407,
403 435, 215, 0, 195, 200, 215, 207, 71, 395, 198,
404 201, 217, 222, 223, 224, 225, 226, 227, 229, 228,
405 230, 332, 435, 435, 345, 231, 318, 233, 317, 232,
406 316, 238, 239, 249, 250, 234, 251, 258, 260, 261,
407 263, 315, 435, 265, 266, 314, 267, 268, 269, 270,
408 313, 272, 279, 277, 312, 278, 287, 281, 311, 282,
409 288, 290, 308, 307, 306, 304, 294, 292, 299, 154,
410 301, 153, 303, 125, 124, 78, 69, 435, 332, 338,
412 344, 350, 356, 362, 364, 368, 374, 380, 386, 390,
416 static yyconst short int yy_def[214] =
418 199, 199, 200, 200, 201, 201, 202, 202, 198, 9,
419 9, 11, 198, 198, 198, 198, 198, 198, 198, 198,
420 198, 198, 198, 198, 198, 198, 198, 203, 198, 198,
421 198, 198, 198, 198, 204, 198, 205, 206, 206, 198,
422 198, 198, 198, 198, 206, 206, 206, 206, 206, 206,
423 206, 206, 206, 206, 206, 206, 198, 198, 198, 207,
424 198, 198, 198, 198, 198, 198, 198, 198, 208, 198,
425 198, 198, 198, 209, 210, 206, 211, 206, 198, 198,
426 212, 198, 198, 198, 213, 198, 206, 206, 206, 206,
427 206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
429 206, 206, 206, 207, 198, 198, 198, 198, 198, 198,
430 198, 208, 198, 209, 198, 210, 211, 206, 198, 212,
431 198, 198, 213, 206, 206, 206, 206, 206, 206, 206,
432 206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
433 206, 198, 198, 198, 206, 206, 206, 206, 206, 206,
434 206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
435 206, 206, 198, 206, 206, 206, 206, 206, 206, 206,
436 206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
437 206, 206, 206, 206, 206, 206, 206, 206, 206, 206,
438 206, 206, 206, 206, 206, 206, 206, 0, 198, 198,
440 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
444 static yyconst short int yy_nxt[474] =
446 198, 15, 16, 15, 16, 21, 19, 21, 17, 22,
447 17, 22, 33, 34, 77, 33, 34, 59, 18, 60,
448 18, 24, 25, 62, 26, 35, 65, 27, 35, 68,
449 73, 69, 74, 77, 28, 126, 63, 79, 79, 79,
450 80, 82, 81, 83, 83, 84, 77, 66, 67, 77,
451 82, 78, 86, 86, 86, 29, 30, 24, 25, 31,
452 26, 77, 77, 27, 87, 89, 77, 77, 77, 85,
453 28, 77, 88, 77, 108, 109, 77, 90, 77, 91,
454 125, 77, 92, 77, 93, 102, 101, 150, 124, 103,
455 77, 29, 30, 14, 15, 16, 14, 14, 14, 14,
457 14, 36, 14, 14, 14, 37, 38, 38, 14, 38,
458 38, 38, 38, 38, 39, 38, 38, 38, 38, 38,
459 38, 38, 38, 38, 38, 38, 38, 38, 38, 40,
460 14, 41, 42, 43, 44, 44, 77, 77, 77, 77,
461 45, 77, 46, 47, 48, 49, 77, 77, 50, 51,
462 98, 99, 52, 53, 118, 54, 94, 55, 56, 100,
463 57, 58, 130, 95, 96, 77, 77, 97, 119, 119,
464 119, 122, 122, 122, 82, 77, 83, 83, 84, 82,
465 77, 84, 84, 84, 82, 77, 86, 86, 86, 77,
466 77, 77, 77, 77, 77, 77, 127, 131, 132, 134,
468 129, 128, 77, 133, 77, 136, 77, 77, 135, 77,
469 77, 137, 77, 77, 138, 119, 119, 119, 141, 77,
470 151, 139, 140, 145, 122, 122, 122, 77, 146, 77,
471 147, 152, 148, 149, 77, 77, 77, 77, 77, 77,
472 77, 77, 77, 77, 77, 77, 77, 153, 155, 162,
473 77, 77, 157, 160, 156, 159, 154, 164, 165, 158,
474 161, 77, 77, 77, 166, 169, 171, 172, 167, 168,
475 77, 173, 77, 77, 170, 77, 174, 77, 77, 77,
476 77, 77, 77, 176, 77, 178, 179, 175, 183, 77,
477 77, 77, 181, 77, 77, 180, 177, 184, 185, 77,
479 77, 182, 77, 188, 77, 187, 77, 191, 189, 186,
480 192, 77, 190, 77, 193, 77, 77, 194, 77, 77,
481 77, 196, 197, 77, 77, 77, 77, 77, 77, 77,
482 77, 195, 14, 14, 14, 14, 14, 14, 20, 20,
483 20, 20, 20, 20, 23, 23, 23, 23, 23, 23,
484 32, 32, 32, 32, 32, 32, 70, 77, 70, 70,
485 70, 70, 72, 163, 72, 72, 72, 72, 75, 75,
486 76, 76, 76, 76, 104, 104, 104, 104, 104, 104,
487 112, 112, 112, 112, 112, 112, 114, 114, 114, 114,
488 114, 114, 116, 116, 116, 116, 117, 117, 117, 117,
490 120, 120, 120, 120, 120, 120, 123, 77, 123, 121,
491 77, 77, 115, 113, 144, 143, 142, 105, 121, 77,
492 77, 77, 115, 113, 111, 110, 107, 106, 105, 77,
493 71, 64, 61, 198, 13, 198, 198, 198, 198, 198,
494 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
495 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
496 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
500 static yyconst short int yy_chk[474] =
502 0, 1, 1, 2, 2, 3, 2, 4, 1, 3,
503 2, 4, 7, 7, 89, 8, 8, 17, 1, 17,
504 2, 5, 5, 19, 5, 7, 26, 5, 8, 27,
505 36, 27, 36, 39, 5, 89, 19, 41, 41, 41,
506 42, 43, 42, 43, 43, 43, 45, 26, 26, 47,
507 44, 39, 44, 44, 44, 5, 5, 6, 6, 6,
508 6, 46, 48, 6, 45, 47, 49, 50, 51, 43,
509 6, 55, 46, 56, 65, 65, 88, 48, 87, 49,
510 88, 197, 50, 128, 51, 56, 55, 128, 87, 56,
511 196, 6, 6, 9, 9, 9, 9, 9, 9, 9,
513 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
514 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
515 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
516 9, 11, 11, 11, 11, 11, 195, 194, 78, 54,
517 11, 52, 11, 11, 11, 11, 53, 93, 11, 11,
518 54, 54, 11, 11, 78, 11, 52, 11, 11, 54,
519 11, 11, 93, 52, 53, 192, 190, 53, 79, 79,
520 79, 82, 82, 82, 83, 90, 83, 83, 83, 84,
521 92, 84, 84, 84, 86, 91, 86, 86, 86, 94,
522 95, 96, 98, 100, 97, 99, 90, 94, 95, 97,
524 92, 91, 101, 96, 102, 99, 103, 124, 98, 118,
525 130, 100, 125, 131, 101, 119, 119, 119, 103, 127,
526 130, 101, 102, 118, 122, 122, 122, 126, 124, 132,
527 125, 131, 126, 127, 133, 134, 135, 136, 137, 138,
528 140, 139, 141, 146, 150, 148, 156, 132, 134, 141,
529 152, 153, 136, 139, 135, 138, 133, 146, 148, 137,
530 140, 154, 155, 157, 150, 154, 156, 157, 152, 153,
531 158, 157, 159, 160, 155, 161, 158, 164, 165, 167,
532 168, 169, 170, 160, 172, 164, 165, 159, 170, 174,
533 176, 173, 168, 178, 180, 167, 161, 172, 173, 177,
535 181, 169, 182, 177, 188, 176, 187, 181, 178, 174,
536 182, 189, 180, 191, 187, 193, 186, 188, 185, 184,
537 183, 191, 193, 179, 175, 171, 166, 162, 151, 149,
538 147, 189, 199, 199, 199, 199, 199, 199, 200, 200,
539 200, 200, 200, 200, 201, 201, 201, 201, 201, 201,
540 202, 202, 202, 202, 202, 202, 203, 145, 203, 203,
541 203, 203, 204, 142, 204, 204, 204, 204, 205, 205,
542 206, 206, 206, 206, 207, 207, 207, 207, 207, 207,
543 208, 208, 208, 208, 208, 208, 209, 209, 209, 209,
544 209, 209, 210, 210, 210, 210, 211, 211, 211, 211,
546 212, 212, 212, 212, 212, 212, 213, 129, 213, 120,
547 117, 116, 114, 112, 109, 108, 106, 104, 81, 77,
548 76, 75, 74, 69, 67, 66, 62, 61, 60, 38,
549 31, 22, 18, 13, 198, 198, 198, 198, 198, 198,
550 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
551 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
552 198, 198, 198, 198, 198, 198, 198, 198, 198, 198,
556 static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
557 static char *yy_full_match;
561 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
562 yy_cp = yy_full_match; /* restore poss. backed-over text */ \
566 #define yymore() yymore_used_but_not_detected
567 #define YY_MORE_ADJ 0
568 #define YY_RESTORE_YY_MORE_OFFSET
572 /* GOB C Preprocessor
573 * Copyright (C) 1999 the Free Software Foundation.
575 * Author: George Lebl
577 * This program is free software; you can redistribute it and/or modify
578 * it under the terms of the GNU General Public License as published by
579 * the Free Software Foundation; either version 2 of the License, or
580 * (at your option) any later version.
582 * This program is distributed in the hope that it will be useful,
583 * but WITHOUT ANY WARRANTY; without even the implied warranty of
584 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
585 * GNU General Public License for more details.
587 * You should have received a copy of the GNU General Public License
588 * along with this program; if not, write to the Free Software
589 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
599 static int parenth_depth = 0;
600 static int before_comment = INITIAL;
601 static int class_after_c = FALSE;
602 static int header_c = FALSE;
604 static GString *cbuf = NULL;
613 cbuf = g_string_new("");
615 cbuf = g_string_assign(cbuf,"");
623 cbuf = g_string_new(s);
625 cbuf = g_string_append(cbuf,s);
633 #define C_CODE_STRING 3
637 #define CLASS_CODE_I 5
641 /* Macros after this point can all be overridden by user definitions in
645 #ifndef YY_SKIP_YYWRAP
647 extern "C" int yywrap YY_PROTO(( void ));
649 extern int yywrap YY_PROTO(( void ));
654 static void yyunput YY_PROTO(( int c, char *buf_ptr ));
658 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
661 #ifdef YY_NEED_STRLEN
662 static int yy_flex_strlen YY_PROTO(( yyconst char * ));
667 static int yyinput YY_PROTO(( void ));
669 static int input YY_PROTO(( void ));
674 static int yy_start_stack_ptr = 0;
675 static int yy_start_stack_depth = 0;
676 static int *yy_start_stack = 0;
677 #ifndef YY_NO_PUSH_STATE
678 static void yy_push_state YY_PROTO(( int new_state ));
680 #ifndef YY_NO_POP_STATE
681 static void yy_pop_state YY_PROTO(( void ));
683 #ifndef YY_NO_TOP_STATE
684 static int yy_top_state YY_PROTO(( void ));
688 #define YY_NO_PUSH_STATE 1
689 #define YY_NO_POP_STATE 1
690 #define YY_NO_TOP_STATE 1
693 #ifdef YY_MALLOC_DECL
701 /* Just try to get by without declaring the routines. This will fail
702 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
703 * or sizeof(void*) != sizeof(int).
708 /* Amount of stuff to slurp up with each read. */
709 #ifndef YY_READ_BUF_SIZE
710 #define YY_READ_BUF_SIZE 8192
713 /* Copy whatever the last rule matched to the standard output. */
716 /* This used to be an fputs(), but since the string might contain NUL's,
717 * we now use fwrite().
719 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
722 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
723 * is returned in "result".
726 #define YY_INPUT(buf,result,max_size) \
727 if ( yy_current_buffer->yy_is_interactive ) \
730 for ( n = 0; n < max_size && \
731 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
734 buf[n++] = (char) c; \
735 if ( c == EOF && ferror( yyin ) ) \
736 YY_FATAL_ERROR( "input in flex scanner failed" ); \
739 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
740 && ferror( yyin ) ) \
741 YY_FATAL_ERROR( "input in flex scanner failed" );
744 /* No semi-colon after return; correct usage is to write "yyterminate();" -
745 * we don't want an extra ';' after the "return" because that will cause
746 * some compilers to complain about unreachable statements.
749 #define yyterminate() return YY_NULL
752 /* Number of entries by which start-condition stack grows. */
753 #ifndef YY_START_STACK_INCR
754 #define YY_START_STACK_INCR 25
757 /* Report a fatal error. */
758 #ifndef YY_FATAL_ERROR
759 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
762 /* Default declaration of generated scanner - a define so the user can
763 * easily add parameters.
766 #define YY_DECL int yylex YY_PROTO(( void ))
769 /* Code executed at the beginning of each rule, after yytext and yyleng
772 #ifndef YY_USER_ACTION
773 #define YY_USER_ACTION
776 /* Code executed at the end of each rule. */
778 #define YY_BREAK break;
781 #define YY_RULE_SETUP \
783 yy_current_buffer->yy_at_bol = \
784 (yytext[yyleng - 1] == '\n'); \
789 register yy_state_type yy_current_state;
790 register char *yy_cp, *yy_bp;
807 yy_start = 1; /* first start state */
815 if ( ! yy_current_buffer )
817 yy_create_buffer( yyin, YY_BUF_SIZE );
819 yy_load_buffer_state();
822 while ( 1 ) /* loops until end-of-file is reached */
826 /* Support of yytext. */
827 *yy_cp = yy_hold_char;
829 /* yy_bp points to the position in yy_ch_buf of the start of
834 yy_current_state = yy_start;
835 yy_current_state += YY_AT_BOL();
836 yy_state_ptr = yy_state_buf;
837 *yy_state_ptr++ = yy_current_state;
841 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
842 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
844 yy_current_state = (int) yy_def[yy_current_state];
845 if ( yy_current_state >= 199 )
846 yy_c = yy_meta[(unsigned int) yy_c];
848 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
849 *yy_state_ptr++ = yy_current_state;
852 while ( yy_base[yy_current_state] != 435 );
855 yy_current_state = *--yy_state_ptr;
856 yy_lp = yy_accept[yy_current_state];
857 find_rule: /* we branch to this label when backing up */
858 for ( ; ; ) /* until we find what rule we matched */
860 if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
862 yy_act = yy_acclist[yy_lp];
864 yy_full_match = yy_cp;
869 yy_current_state = *--yy_state_ptr;
870 yy_lp = yy_accept[yy_current_state];
876 do_action: /* This label is used only to access EOF actions. */
880 { /* beginning of action switch */
884 { line_no++; REJECT; }
887 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
888 yy_c_buf_p = yy_cp -= 1;
889 YY_DO_BEFORE_ACTION; /* set up yytext again */
892 { ; /*comment, ignore*/ }
895 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
896 yy_c_buf_p = yy_cp -= 1;
897 YY_DO_BEFORE_ACTION; /* set up yytext again */
900 { ; /*comment, ignore*/ }
903 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
904 yy_c_buf_p = yy_cp -= 1;
905 YY_DO_BEFORE_ACTION; /* set up yytext again */
908 { ; /*comment, ignore*/ }
911 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
912 yy_c_buf_p = yy_cp -= 1;
913 YY_DO_BEFORE_ACTION; /* set up yytext again */
916 { ; /*comment, ignore*/ }
921 {BEGIN(COMMENT); before_comment = INITIAL; }
926 {BEGIN(COMMENT); before_comment = C_CODE; }
931 {BEGIN(COMMENT); before_comment = CLASS_CODE; }
936 {BEGIN(COMMENT); before_comment = CLASS_CODE_I; }
941 {BEGIN(before_comment);}
946 { ; /* comment, ignore */ }
951 { ; /* comment, ignore */ }
959 class_after_c = FALSE;
962 ccode_line = line_no;
971 class_after_c = FALSE;
974 ccode_line = line_no;
993 { add_to_cbuf(yytext); }
998 { add_to_cbuf(yytext); }
1003 { add_to_cbuf(yytext); }
1008 { add_to_cbuf(yytext); }
1013 { add_to_cbuf(yytext); }
1019 BEGIN(C_CODE_STRING);
1020 add_to_cbuf(yytext);
1027 add_to_cbuf(yytext);
1035 add_to_cbuf(yytext);
1042 add_to_cbuf(yytext);
1050 add_to_cbuf(yytext);
1058 if(parenth_depth<0) {
1060 } else if(parenth_depth==0 && class_after_c) {
1061 BEGIN(CLASS_CODE_I);
1066 add_to_cbuf(yytext);
1072 { add_to_cbuf(yytext); }
1077 { add_to_cbuf(yytext); }
1155 {yylval.line = line_no; return PUBLIC;}
1160 {yylval.line = line_no; return PRIVATE;}
1165 {yylval.line = line_no; return ARGUMENT;}
1170 {yylval.line = line_no; return VIRTUAL;}
1175 {yylval.line = line_no; return SIGNAL;}
1180 {yylval.line = line_no; return OVERRIDE;}
1191 yylval.id = g_strdup(yytext);
1199 yylval.id = g_strdup(yytext);
1207 yylval.id = g_strdup(yytext);
1215 BEGIN(CLASS_CODE_I);
1225 class_after_c = TRUE;
1226 ccode_line = line_no;
1227 yylval.line = line_no;
1248 yylval.line = line_no;
1257 #line 1258 "lex.yy.c"
1258 case YY_STATE_EOF(INITIAL):
1259 case YY_STATE_EOF(COMMENT):
1260 case YY_STATE_EOF(C_CODE):
1261 case YY_STATE_EOF(C_CODE_STRING):
1262 case YY_STATE_EOF(CLASS_CODE):
1263 case YY_STATE_EOF(CLASS_CODE_I):
1266 case YY_END_OF_BUFFER:
1268 /* Amount of text matched not including the EOB char. */
1269 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
1271 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1272 *yy_cp = yy_hold_char;
1273 YY_RESTORE_YY_MORE_OFFSET
1275 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
1277 /* We're scanning a new file or input source. It's
1278 * possible that this happened because the user
1279 * just pointed yyin at a new source and called
1280 * yylex(). If so, then we have to assure
1281 * consistency between yy_current_buffer and our
1282 * globals. Here is the right place to do so, because
1283 * this is the first action (other than possibly a
1284 * back-up) that will match for the new input source.
1286 yy_n_chars = yy_current_buffer->yy_n_chars;
1287 yy_current_buffer->yy_input_file = yyin;
1288 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
1291 /* Note that here we test for yy_c_buf_p "<=" to the position
1292 * of the first EOB in the buffer, since yy_c_buf_p will
1293 * already have been incremented past the NUL character
1294 * (since all states make transitions on EOB to the
1295 * end-of-buffer state). Contrast this with the test
1298 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1299 { /* This was really a NUL. */
1300 yy_state_type yy_next_state;
1302 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
1304 yy_current_state = yy_get_previous_state();
1306 /* Okay, we're now positioned to make the NUL
1307 * transition. We couldn't have
1308 * yy_get_previous_state() go ahead and do it
1309 * for us because it doesn't know how to deal
1310 * with the possibility of jamming (and we don't
1311 * want to build jamming into it because then it
1312 * will run more slowly).
1315 yy_next_state = yy_try_NUL_trans( yy_current_state );
1317 yy_bp = yytext_ptr + YY_MORE_ADJ;
1319 if ( yy_next_state )
1321 /* Consume the NUL. */
1322 yy_cp = ++yy_c_buf_p;
1323 yy_current_state = yy_next_state;
1330 goto yy_find_action;
1334 else switch ( yy_get_next_buffer() )
1336 case EOB_ACT_END_OF_FILE:
1338 yy_did_buffer_switch_on_eof = 0;
1342 /* Note: because we've taken care in
1343 * yy_get_next_buffer() to have set up
1344 * yytext, we can now set up
1345 * yy_c_buf_p so that if some total
1346 * hoser (like flex itself) wants to
1347 * call the scanner after we return the
1348 * YY_NULL, it'll still work - another
1349 * YY_NULL will get returned.
1351 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
1353 yy_act = YY_STATE_EOF(YY_START);
1359 if ( ! yy_did_buffer_switch_on_eof )
1365 case EOB_ACT_CONTINUE_SCAN:
1367 yytext_ptr + yy_amount_of_matched_text;
1369 yy_current_state = yy_get_previous_state();
1372 yy_bp = yytext_ptr + YY_MORE_ADJ;
1375 case EOB_ACT_LAST_MATCH:
1377 &yy_current_buffer->yy_ch_buf[yy_n_chars];
1379 yy_current_state = yy_get_previous_state();
1382 yy_bp = yytext_ptr + YY_MORE_ADJ;
1383 goto yy_find_action;
1390 "fatal flex scanner internal error--no action found" );
1391 } /* end of action switch */
1392 } /* end of scanning one token */
1393 } /* end of yylex */
1396 /* yy_get_next_buffer - try to read in a new buffer
1398 * Returns a code representing an action:
1399 * EOB_ACT_LAST_MATCH -
1400 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1401 * EOB_ACT_END_OF_FILE - end of file
1404 static int yy_get_next_buffer()
1406 register char *dest = yy_current_buffer->yy_ch_buf;
1407 register char *source = yytext_ptr;
1408 register int number_to_move, i;
1411 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
1413 "fatal flex scanner internal error--end of buffer missed" );
1415 if ( yy_current_buffer->yy_fill_buffer == 0 )
1416 { /* Don't try to fill the buffer, so this is an EOF. */
1417 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
1419 /* We matched a single character, the EOB, so
1420 * treat this as a final EOF.
1422 return EOB_ACT_END_OF_FILE;
1427 /* We matched some text prior to the EOB, first
1430 return EOB_ACT_LAST_MATCH;
1434 /* Try to read more data. */
1436 /* First move last chars to start of buffer. */
1437 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
1439 for ( i = 0; i < number_to_move; ++i )
1440 *(dest++) = *(source++);
1442 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1443 /* don't do the read, it's not guaranteed to return an EOF,
1446 yy_current_buffer->yy_n_chars = yy_n_chars = 0;
1451 yy_current_buffer->yy_buf_size - number_to_move - 1;
1453 while ( num_to_read <= 0 )
1454 { /* Not enough room in the buffer - grow it. */
1455 #ifdef YY_USES_REJECT
1457 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1460 /* just a shorter name for the current buffer */
1461 YY_BUFFER_STATE b = yy_current_buffer;
1463 int yy_c_buf_p_offset =
1464 (int) (yy_c_buf_p - b->yy_ch_buf);
1466 if ( b->yy_is_our_buffer )
1468 int new_size = b->yy_buf_size * 2;
1470 if ( new_size <= 0 )
1471 b->yy_buf_size += b->yy_buf_size / 8;
1473 b->yy_buf_size *= 2;
1475 b->yy_ch_buf = (char *)
1476 /* Include room in for 2 EOB chars. */
1477 yy_flex_realloc( (void *) b->yy_ch_buf,
1478 b->yy_buf_size + 2 );
1481 /* Can't grow it, we don't own it. */
1484 if ( ! b->yy_ch_buf )
1486 "fatal error - scanner input buffer overflow" );
1488 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
1490 num_to_read = yy_current_buffer->yy_buf_size -
1495 if ( num_to_read > YY_READ_BUF_SIZE )
1496 num_to_read = YY_READ_BUF_SIZE;
1498 /* Read in more data. */
1499 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
1500 yy_n_chars, num_to_read );
1502 yy_current_buffer->yy_n_chars = yy_n_chars;
1505 if ( yy_n_chars == 0 )
1507 if ( number_to_move == YY_MORE_ADJ )
1509 ret_val = EOB_ACT_END_OF_FILE;
1515 ret_val = EOB_ACT_LAST_MATCH;
1516 yy_current_buffer->yy_buffer_status =
1517 YY_BUFFER_EOF_PENDING;
1522 ret_val = EOB_ACT_CONTINUE_SCAN;
1524 yy_n_chars += number_to_move;
1525 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1526 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1528 yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
1534 /* yy_get_previous_state - get the state just before the EOB char was reached */
1536 static yy_state_type yy_get_previous_state()
1538 register yy_state_type yy_current_state;
1539 register char *yy_cp;
1541 yy_current_state = yy_start;
1542 yy_current_state += YY_AT_BOL();
1543 yy_state_ptr = yy_state_buf;
1544 *yy_state_ptr++ = yy_current_state;
1546 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
1548 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1549 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1551 yy_current_state = (int) yy_def[yy_current_state];
1552 if ( yy_current_state >= 199 )
1553 yy_c = yy_meta[(unsigned int) yy_c];
1555 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1556 *yy_state_ptr++ = yy_current_state;
1559 return yy_current_state;
1563 /* yy_try_NUL_trans - try to make a transition on the NUL character
1566 * next_state = yy_try_NUL_trans( current_state );
1569 #ifdef YY_USE_PROTOS
1570 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
1572 static yy_state_type yy_try_NUL_trans( yy_current_state )
1573 yy_state_type yy_current_state;
1576 register int yy_is_jam;
1578 register YY_CHAR yy_c = 1;
1579 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1581 yy_current_state = (int) yy_def[yy_current_state];
1582 if ( yy_current_state >= 199 )
1583 yy_c = yy_meta[(unsigned int) yy_c];
1585 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1586 yy_is_jam = (yy_current_state == 198);
1588 *yy_state_ptr++ = yy_current_state;
1590 return yy_is_jam ? 0 : yy_current_state;
1595 #ifdef YY_USE_PROTOS
1596 static void yyunput( int c, register char *yy_bp )
1598 static void yyunput( c, yy_bp )
1600 register char *yy_bp;
1603 register char *yy_cp = yy_c_buf_p;
1605 /* undo effects of setting up yytext */
1606 *yy_cp = yy_hold_char;
1608 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1609 { /* need to shift things up to make room */
1610 /* +2 for EOB chars. */
1611 register int number_to_move = yy_n_chars + 2;
1612 register char *dest = &yy_current_buffer->yy_ch_buf[
1613 yy_current_buffer->yy_buf_size + 2];
1614 register char *source =
1615 &yy_current_buffer->yy_ch_buf[number_to_move];
1617 while ( source > yy_current_buffer->yy_ch_buf )
1618 *--dest = *--source;
1620 yy_cp += (int) (dest - source);
1621 yy_bp += (int) (dest - source);
1622 yy_current_buffer->yy_n_chars =
1623 yy_n_chars = yy_current_buffer->yy_buf_size;
1625 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
1626 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1629 *--yy_cp = (char) c;
1633 yy_hold_char = *yy_cp;
1636 #endif /* ifndef YY_NO_UNPUT */
1640 static int yyinput()
1647 *yy_c_buf_p = yy_hold_char;
1649 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
1651 /* yy_c_buf_p now points to the character we want to return.
1652 * If this occurs *before* the EOB characters, then it's a
1653 * valid NUL; if not, then we've hit the end of the buffer.
1655 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
1656 /* This was really a NUL. */
1660 { /* need more input */
1661 int offset = yy_c_buf_p - yytext_ptr;
1664 switch ( yy_get_next_buffer() )
1666 case EOB_ACT_LAST_MATCH:
1667 /* This happens because yy_g_n_b()
1668 * sees that we've accumulated a
1669 * token and flags that we need to
1670 * try matching the token before
1671 * proceeding. But for input(),
1672 * there's no matching to consider.
1673 * So convert the EOB_ACT_LAST_MATCH
1674 * to EOB_ACT_END_OF_FILE.
1677 /* Reset buffer status. */
1682 case EOB_ACT_END_OF_FILE:
1687 if ( ! yy_did_buffer_switch_on_eof )
1696 case EOB_ACT_CONTINUE_SCAN:
1697 yy_c_buf_p = yytext_ptr + offset;
1703 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
1704 *yy_c_buf_p = '\0'; /* preserve yytext */
1705 yy_hold_char = *++yy_c_buf_p;
1707 yy_current_buffer->yy_at_bol = (c == '\n');
1713 #ifdef YY_USE_PROTOS
1714 void yyrestart( FILE *input_file )
1716 void yyrestart( input_file )
1720 if ( ! yy_current_buffer )
1721 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
1723 yy_init_buffer( yy_current_buffer, input_file );
1724 yy_load_buffer_state();
1728 #ifdef YY_USE_PROTOS
1729 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
1731 void yy_switch_to_buffer( new_buffer )
1732 YY_BUFFER_STATE new_buffer;
1735 if ( yy_current_buffer == new_buffer )
1738 if ( yy_current_buffer )
1740 /* Flush out information for old buffer. */
1741 *yy_c_buf_p = yy_hold_char;
1742 yy_current_buffer->yy_buf_pos = yy_c_buf_p;
1743 yy_current_buffer->yy_n_chars = yy_n_chars;
1746 yy_current_buffer = new_buffer;
1747 yy_load_buffer_state();
1749 /* We don't actually know whether we did this switch during
1750 * EOF (yywrap()) processing, but the only time this flag
1751 * is looked at is after yywrap() is called, so it's safe
1752 * to go ahead and always set it.
1754 yy_did_buffer_switch_on_eof = 1;
1758 #ifdef YY_USE_PROTOS
1759 void yy_load_buffer_state( void )
1761 void yy_load_buffer_state()
1764 yy_n_chars = yy_current_buffer->yy_n_chars;
1765 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
1766 yyin = yy_current_buffer->yy_input_file;
1767 yy_hold_char = *yy_c_buf_p;
1771 #ifdef YY_USE_PROTOS
1772 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
1774 YY_BUFFER_STATE yy_create_buffer( file, size )
1781 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1783 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1785 b->yy_buf_size = size;
1787 /* yy_ch_buf has to be 2 characters longer than the size given because
1788 * we need to put in 2 end-of-buffer characters.
1790 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
1791 if ( ! b->yy_ch_buf )
1792 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1794 b->yy_is_our_buffer = 1;
1796 yy_init_buffer( b, file );
1802 #ifdef YY_USE_PROTOS
1803 void yy_delete_buffer( YY_BUFFER_STATE b )
1805 void yy_delete_buffer( b )
1812 if ( b == yy_current_buffer )
1813 yy_current_buffer = (YY_BUFFER_STATE) 0;
1815 if ( b->yy_is_our_buffer )
1816 yy_flex_free( (void *) b->yy_ch_buf );
1818 yy_flex_free( (void *) b );
1822 #ifndef YY_ALWAYS_INTERACTIVE
1823 #ifndef YY_NEVER_INTERACTIVE
1824 extern int isatty YY_PROTO(( int ));
1828 #ifdef YY_USE_PROTOS
1829 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
1831 void yy_init_buffer( b, file )
1838 yy_flush_buffer( b );
1840 b->yy_input_file = file;
1841 b->yy_fill_buffer = 1;
1843 #if YY_ALWAYS_INTERACTIVE
1844 b->yy_is_interactive = 1;
1846 #if YY_NEVER_INTERACTIVE
1847 b->yy_is_interactive = 0;
1849 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
1855 #ifdef YY_USE_PROTOS
1856 void yy_flush_buffer( YY_BUFFER_STATE b )
1858 void yy_flush_buffer( b )
1868 /* We always need two end-of-buffer characters. The first causes
1869 * a transition to the end-of-buffer state. The second causes
1870 * a jam in that state.
1872 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
1873 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
1875 b->yy_buf_pos = &b->yy_ch_buf[0];
1878 b->yy_buffer_status = YY_BUFFER_NEW;
1880 if ( b == yy_current_buffer )
1881 yy_load_buffer_state();
1885 #ifndef YY_NO_SCAN_BUFFER
1886 #ifdef YY_USE_PROTOS
1887 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
1889 YY_BUFFER_STATE yy_scan_buffer( base, size )
1897 base[size-2] != YY_END_OF_BUFFER_CHAR ||
1898 base[size-1] != YY_END_OF_BUFFER_CHAR )
1899 /* They forgot to leave room for the EOB's. */
1902 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
1904 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
1906 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
1907 b->yy_buf_pos = b->yy_ch_buf = base;
1908 b->yy_is_our_buffer = 0;
1909 b->yy_input_file = 0;
1910 b->yy_n_chars = b->yy_buf_size;
1911 b->yy_is_interactive = 0;
1913 b->yy_fill_buffer = 0;
1914 b->yy_buffer_status = YY_BUFFER_NEW;
1916 yy_switch_to_buffer( b );
1923 #ifndef YY_NO_SCAN_STRING
1924 #ifdef YY_USE_PROTOS
1925 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
1927 YY_BUFFER_STATE yy_scan_string( yy_str )
1928 yyconst char *yy_str;
1932 for ( len = 0; yy_str[len]; ++len )
1935 return yy_scan_bytes( yy_str, len );
1940 #ifndef YY_NO_SCAN_BYTES
1941 #ifdef YY_USE_PROTOS
1942 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
1944 YY_BUFFER_STATE yy_scan_bytes( bytes, len )
1945 yyconst char *bytes;
1954 /* Get memory for full buffer, including space for trailing EOB's. */
1956 buf = (char *) yy_flex_alloc( n );
1958 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
1960 for ( i = 0; i < len; ++i )
1963 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
1965 b = yy_scan_buffer( buf, n );
1967 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
1969 /* It's okay to grow etc. this buffer, and we should throw it
1970 * away when we're done.
1972 b->yy_is_our_buffer = 1;
1979 #ifndef YY_NO_PUSH_STATE
1980 #ifdef YY_USE_PROTOS
1981 static void yy_push_state( int new_state )
1983 static void yy_push_state( new_state )
1987 if ( yy_start_stack_ptr >= yy_start_stack_depth )
1991 yy_start_stack_depth += YY_START_STACK_INCR;
1992 new_size = yy_start_stack_depth * sizeof( int );
1994 if ( ! yy_start_stack )
1995 yy_start_stack = (int *) yy_flex_alloc( new_size );
1998 yy_start_stack = (int *) yy_flex_realloc(
1999 (void *) yy_start_stack, new_size );
2001 if ( ! yy_start_stack )
2003 "out of memory expanding start-condition stack" );
2006 yy_start_stack[yy_start_stack_ptr++] = YY_START;
2013 #ifndef YY_NO_POP_STATE
2014 static void yy_pop_state()
2016 if ( --yy_start_stack_ptr < 0 )
2017 YY_FATAL_ERROR( "start-condition stack underflow" );
2019 BEGIN(yy_start_stack[yy_start_stack_ptr]);
2024 #ifndef YY_NO_TOP_STATE
2025 static int yy_top_state()
2027 return yy_start_stack[yy_start_stack_ptr - 1];
2031 #ifndef YY_EXIT_FAILURE
2032 #define YY_EXIT_FAILURE 2
2035 #ifdef YY_USE_PROTOS
2036 static void yy_fatal_error( yyconst char msg[] )
2038 static void yy_fatal_error( msg )
2042 (void) fprintf( stderr, "%s\n", msg );
2043 exit( YY_EXIT_FAILURE );
2048 /* Redefine yyless() so it works in section 3 code. */
2054 /* Undo effects of setting up yytext. */ \
2055 yytext[yyleng] = yy_hold_char; \
2056 yy_c_buf_p = yytext + n; \
2057 yy_hold_char = *yy_c_buf_p; \
2058 *yy_c_buf_p = '\0'; \
2064 /* Internal utility routines. */
2067 #ifdef YY_USE_PROTOS
2068 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
2070 static void yy_flex_strncpy( s1, s2, n )
2077 for ( i = 0; i < n; ++i )
2082 #ifdef YY_NEED_STRLEN
2083 #ifdef YY_USE_PROTOS
2084 static int yy_flex_strlen( yyconst char *s )
2086 static int yy_flex_strlen( s )
2091 for ( n = 0; s[n]; ++n )
2099 #ifdef YY_USE_PROTOS
2100 static void *yy_flex_alloc( yy_size_t size )
2102 static void *yy_flex_alloc( size )
2106 return (void *) malloc( size );
2109 #ifdef YY_USE_PROTOS
2110 static void *yy_flex_realloc( void *ptr, yy_size_t size )
2112 static void *yy_flex_realloc( ptr, size )
2117 /* The cast to (char *) in the following accommodates both
2118 * implementations that use char* generic pointers, and those
2119 * that use void* generic pointers. It works with the latter
2120 * because both ANSI C and C++ allow castless assignment from
2121 * any pointer type to void*, and deal with argument conversions
2122 * as though doing an assignment.
2124 return (void *) realloc( (char *) ptr, size );
2127 #ifdef YY_USE_PROTOS
2128 static void yy_flex_free( void *ptr )
2130 static void yy_flex_free( ptr )