1 /* A lexical scanner generated by flex */
3 /* Scanner skeleton version:
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)
264 typedef unsigned char YY_CHAR
;
265 FILE *yyin
= (FILE *) 0, *yyout
= (FILE *) 0;
266 typedef int yy_state_type
;
268 #define yytext_ptr yytext
270 static yy_state_type yy_get_previous_state
YY_PROTO(( void ));
271 static yy_state_type yy_try_NUL_trans
YY_PROTO(( yy_state_type current_state
));
272 static int yy_get_next_buffer
YY_PROTO(( void ));
273 static void yy_fatal_error
YY_PROTO(( yyconst
char msg
[] ));
275 /* Done after the current pattern has been matched and before the
276 * corresponding action - sets up yytext.
278 #define YY_DO_BEFORE_ACTION \
279 yytext_ptr = yy_bp; \
280 yyleng = (int) (yy_cp - yy_bp); \
281 yy_hold_char = *yy_cp; \
285 #define YY_NUM_RULES 86
286 #define YY_END_OF_BUFFER 87
287 static yyconst
short int yy_accept
[470] =
289 0, 0, 87, 85, 84, 83, 85, 78, 80, 82,
290 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
291 82, 82, 82, 82, 82, 82, 82, 2, 4, 84,
292 0, 81, 78, 80, 79, 82, 82, 82, 82, 82,
293 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
294 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
295 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
296 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
297 82, 82, 82, 81, 0, 82, 11, 82, 82, 82,
298 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
300 82, 82, 82, 82, 82, 3, 82, 82, 82, 82,
301 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
302 82, 82, 82, 82, 82, 82, 76, 82, 82, 82,
303 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
304 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
305 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
306 82, 82, 82, 82, 82, 82, 82, 41, 82, 82,
307 82, 53, 42, 82, 82, 82, 82, 82, 82, 82,
308 46, 82, 82, 82, 82, 82, 82, 71, 82, 82,
309 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
311 82, 82, 82, 7, 82, 82, 82, 38, 1, 82,
312 82, 82, 82, 82, 18, 82, 82, 25, 82, 82,
313 82, 82, 82, 82, 82, 82, 82, 82, 82, 70,
314 82, 82, 39, 40, 82, 82, 82, 82, 82, 30,
315 82, 82, 82, 82, 82, 82, 50, 82, 82, 82,
316 82, 82, 34, 82, 82, 9, 82, 82, 19, 82,
317 68, 82, 82, 82, 82, 82, 82, 12, 0, 82,
318 82, 82, 82, 82, 82, 82, 13, 82, 14, 82,
319 82, 82, 82, 65, 82, 82, 82, 52, 82, 72,
320 82, 82, 82, 82, 82, 82, 47, 82, 82, 82,
322 82, 82, 82, 82, 82, 82, 58, 82, 82, 36,
323 82, 82, 82, 82, 82, 82, 82, 82, 0, 82,
324 0, 77, 17, 82, 82, 51, 82, 10, 82, 82,
325 82, 82, 16, 82, 82, 82, 82, 82, 82, 82,
326 29, 82, 82, 82, 82, 82, 82, 82, 73, 82,
327 31, 82, 82, 82, 82, 82, 82, 45, 6, 82,
328 82, 82, 82, 77, 82, 23, 24, 82, 15, 82,
329 27, 82, 82, 66, 82, 28, 54, 43, 82, 82,
330 82, 48, 82, 69, 8, 82, 82, 82, 82, 82,
331 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
333 64, 82, 82, 82, 82, 56, 82, 82, 82, 82,
334 35, 49, 82, 82, 82, 82, 20, 82, 82, 82,
335 82, 82, 82, 82, 82, 74, 82, 82, 82, 32,
336 82, 82, 37, 82, 82, 82, 82, 82, 82, 75,
337 82, 67, 61, 82, 82, 82, 33, 59, 60, 5,
338 21, 82, 82, 82, 82, 55, 57, 82, 82, 82,
339 26, 63, 82, 82, 82, 62, 22, 44, 0
342 static yyconst
int yy_ec
[256] =
344 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
345 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
346 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
347 1, 2, 1, 5, 6, 1, 1, 1, 1, 1,
348 1, 1, 1, 7, 1, 1, 1, 8, 8, 8,
349 9, 8, 8, 8, 8, 8, 8, 1, 1, 1,
350 1, 1, 1, 1, 10, 11, 12, 13, 14, 15,
351 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
352 19, 26, 27, 28, 29, 30, 19, 31, 32, 19,
353 1, 1, 1, 1, 1, 1, 33, 33, 33, 33,
355 33, 33, 19, 19, 19, 19, 19, 19, 19, 19,
356 19, 19, 19, 19, 19, 19, 19, 19, 19, 33,
357 19, 19, 34, 1, 35, 1, 1, 1, 1, 1,
358 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
359 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
360 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
361 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
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, 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,
374 static yyconst
int yy_meta
[36] =
376 1, 2, 3, 2, 1, 4, 2, 5, 5, 5,
377 5, 5, 5, 5, 5, 1, 1, 1, 1, 1,
378 5, 1, 1, 1, 1, 1, 1, 1, 1, 1,
382 static yyconst
short int yy_base
[476] =
384 0, 0, 515, 516, 34, 516, 509, 0, 492, 25,
385 26, 45, 25, 28, 24, 486, 497, 49, 0, 40,
386 43, 486, 51, 66, 67, 482, 35, 516, 516, 81,
387 503, 84, 0, 486, 516, 0, 494, 477, 492, 475,
388 74, 474, 477, 475, 46, 489, 69, 484, 471, 481,
389 55, 477, 481, 466, 67, 469, 83, 83, 467, 477,
390 464, 478, 464, 459, 475, 470, 74, 453, 81, 457,
391 86, 76, 468, 467, 465, 452, 452, 458, 95, 461,
392 453, 447, 446, 106, 466, 456, 0, 451, 444, 449,
393 448, 443, 452, 435, 436, 449, 433, 448, 430, 426,
395 429, 430, 433, 441, 424, 0, 423, 436, 435, 420,
396 415, 417, 427, 419, 420, 424, 412, 428, 423, 410,
397 424, 405, 406, 407, 419, 409, 0, 402, 409, 416,
398 414, 410, 408, 415, 393, 399, 412, 406, 392, 401,
399 397, 391, 387, 388, 386, 392, 394, 103, 383, 387,
400 399, 388, 389, 396, 385, 377, 379, 376, 373, 376,
401 370, 374, 387, 368, 363, 98, 381, 0, 379, 367,
402 363, 0, 0, 362, 363, 360, 358, 375, 361, 356,
403 105, 373, 372, 351, 355, 355, 349, 0, 366, 352,
404 347, 346, 352, 346, 343, 356, 346, 354, 356, 352,
406 347, 344, 349, 0, 335, 344, 350, 0, 0, 334,
407 115, 334, 345, 119, 0, 345, 331, 0, 328, 326,
408 336, 325, 336, 328, 327, 320, 317, 313, 330, 0,
409 330, 331, 0, 0, 327, 322, 329, 314, 314, 0,
410 114, 305, 307, 318, 322, 318, 0, 321, 318, 107,
411 318, 318, 0, 306, 316, 0, 316, 308, 0, 294,
412 0, 298, 307, 294, 291, 304, 304, 0, 132, 137,
413 293, 287, 290, 300, 288, 290, 0, 293, 295, 295,
414 276, 292, 295, 0, 293, 278, 276, 0, 277, 0,
415 270, 283, 267, 285, 270, 281, 0, 280, 279, 271,
417 265, 277, 261, 257, 259, 257, 0, 274, 256, 0,
418 255, 254, 258, 248, 269, 268, 265, 258, 270, 143,
419 269, 149, 0, 259, 241, 0, 240, 0, 259, 238,
420 258, 239, 0, 250, 237, 250, 236, 231, 247, 246,
421 0, 249, 247, 247, 234, 227, 240, 225, 0, 222,
422 0, 223, 222, 239, 224, 237, 218, 227, 0, 216,
423 215, 222, 217, 235, 213, 0, 0, 209, 0, 226,
424 0, 209, 203, 0, 216, 0, 0, 0, 212, 206,
425 211, 0, 220, 0, 0, 215, 204, 199, 200, 199,
426 213, 199, 199, 197, 206, 208, 207, 199, 188, 194,
428 192, 188, 188, 190, 196, 0, 198, 182, 184, 182,
429 0, 0, 184, 181, 188, 176, 0, 177, 171, 172,
430 170, 183, 186, 181, 171, 0, 183, 171, 164, 0,
431 167, 175, 0, 164, 160, 155, 157, 156, 159, 0,
432 155, 0, 0, 160, 165, 156, 0, 0, 0, 0,
433 0, 141, 150, 141, 139, 0, 0, 128, 122, 126,
434 0, 0, 109, 91, 79, 0, 0, 0, 516, 156,
435 161, 65, 166, 171, 176
438 static yyconst
short int yy_def
[476] =
440 469, 1, 469, 469, 469, 469, 470, 471, 472, 473,
441 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
442 473, 473, 473, 473, 473, 473, 473, 469, 469, 469,
443 470, 469, 471, 472, 469, 473, 473, 473, 473, 473,
444 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
445 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
446 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
447 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
448 473, 473, 473, 469, 470, 473, 473, 473, 473, 473,
449 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
451 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
452 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
453 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
454 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
455 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
456 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
457 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
458 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
459 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
460 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
462 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
463 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
464 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
465 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
466 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
467 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
468 473, 473, 473, 473, 473, 473, 473, 473, 469, 474,
469 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
470 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
471 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
473 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
474 473, 473, 473, 473, 473, 473, 473, 473, 475, 474,
475 475, 474, 473, 473, 473, 473, 473, 473, 473, 473,
476 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
477 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
478 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
479 473, 473, 473, 475, 473, 473, 473, 473, 473, 473,
480 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
481 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
482 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
484 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
485 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
486 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
487 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
488 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
489 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
490 473, 473, 473, 473, 473, 473, 473, 473, 0, 469,
491 469, 469, 469, 469, 469
494 static yyconst
short int yy_nxt
[552] =
496 4, 5, 6, 5, 7, 8, 4, 9, 9, 10,
497 11, 12, 13, 14, 15, 16, 17, 18, 19, 19,
498 20, 21, 22, 19, 23, 24, 25, 19, 26, 27,
499 19, 19, 19, 28, 29, 30, 37, 30, 50, 41,
500 52, 55, 51, 42, 81, 38, 43, 56, 82, 63,
501 53, 39, 83, 40, 44, 95, 67, 64, 54, 96,
502 59, 45, 60, 65, 103, 46, 68, 66, 47, 34,
503 61, 62, 48, 49, 70, 73, 71, 74, 76, 72,
504 77, 104, 30, 78, 30, 84, 90, 108, 85, 91,
505 98, 99, 111, 75, 79, 113, 123, 109, 126, 129,
507 124, 131, 132, 114, 139, 468, 112, 84, 127, 130,
508 85, 205, 225, 467, 206, 241, 269, 269, 242, 270,
509 140, 226, 243, 295, 227, 228, 141, 229, 207, 273,
510 304, 466, 274, 269, 269, 305, 319, 465, 321, 296,
511 321, 322, 36, 321, 321, 464, 321, 322, 36, 321,
512 321, 463, 321, 322, 36, 321, 31, 31, 462, 31,
513 31, 33, 33, 461, 33, 33, 36, 460, 459, 36,
514 36, 320, 320, 458, 320, 320, 321, 321, 457, 456,
515 321, 455, 454, 453, 452, 451, 450, 449, 448, 447,
516 446, 445, 444, 443, 442, 441, 440, 439, 438, 437,
518 436, 435, 434, 433, 432, 431, 430, 429, 428, 427,
519 426, 425, 424, 423, 422, 421, 420, 419, 418, 417,
520 416, 415, 414, 413, 412, 411, 410, 409, 408, 407,
521 406, 405, 404, 403, 402, 401, 400, 399, 398, 364,
522 397, 396, 395, 394, 393, 392, 391, 390, 389, 388,
523 387, 386, 385, 384, 383, 382, 381, 380, 379, 378,
524 377, 376, 375, 374, 373, 372, 371, 370, 369, 368,
525 367, 366, 365, 364, 364, 363, 362, 361, 360, 359,
526 358, 357, 356, 355, 354, 353, 352, 351, 350, 349,
527 348, 347, 346, 345, 344, 343, 342, 341, 340, 339,
529 338, 337, 336, 335, 334, 333, 332, 331, 330, 329,
530 328, 327, 326, 325, 324, 323, 318, 317, 316, 315,
531 314, 313, 312, 311, 310, 309, 308, 307, 306, 303,
532 302, 301, 300, 299, 298, 297, 294, 293, 292, 291,
533 290, 289, 288, 287, 286, 285, 284, 283, 282, 281,
534 280, 279, 278, 277, 276, 275, 272, 271, 268, 267,
535 266, 265, 264, 263, 262, 261, 260, 259, 258, 257,
536 256, 255, 254, 253, 252, 251, 250, 249, 248, 247,
537 246, 245, 244, 240, 239, 238, 237, 236, 235, 234,
538 233, 232, 231, 230, 224, 223, 222, 221, 220, 219,
540 218, 217, 216, 215, 214, 213, 212, 211, 210, 209,
541 208, 204, 203, 202, 201, 200, 199, 198, 197, 196,
542 195, 194, 193, 192, 191, 190, 189, 188, 187, 186,
543 185, 184, 183, 182, 181, 180, 179, 178, 177, 176,
544 175, 174, 173, 172, 171, 170, 169, 168, 167, 166,
545 165, 164, 163, 162, 161, 160, 159, 158, 157, 156,
546 155, 154, 153, 152, 151, 150, 149, 148, 147, 146,
547 32, 145, 144, 143, 142, 138, 137, 136, 135, 134,
548 133, 128, 125, 122, 121, 120, 119, 118, 117, 116,
549 115, 110, 107, 106, 105, 102, 101, 100, 97, 94,
551 93, 92, 89, 88, 87, 86, 35, 32, 80, 69,
552 58, 57, 35, 32, 469, 3, 469, 469, 469, 469,
553 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
554 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
555 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
559 static yyconst
short int yy_chk
[552] =
561 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
562 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
563 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
564 1, 1, 1, 1, 1, 5, 10, 5, 13, 11,
565 14, 15, 13, 11, 27, 10, 11, 15, 27, 20,
566 14, 10, 27, 10, 12, 45, 21, 20, 14, 45,
567 18, 12, 18, 20, 51, 12, 21, 20, 12, 472,
568 18, 18, 12, 12, 23, 24, 23, 24, 25, 23,
569 25, 51, 30, 25, 30, 32, 41, 55, 32, 41,
570 47, 47, 57, 24, 25, 58, 67, 55, 69, 71,
572 67, 72, 72, 58, 79, 465, 57, 84, 69, 71,
573 84, 148, 166, 464, 148, 181, 211, 211, 181, 211,
574 79, 166, 181, 241, 166, 166, 79, 166, 148, 214,
575 250, 463, 214, 269, 269, 250, 269, 460, 270, 241,
576 270, 270, 270, 270, 320, 459, 320, 320, 320, 320,
577 322, 458, 322, 322, 322, 322, 470, 470, 455, 470,
578 470, 471, 471, 454, 471, 471, 473, 453, 452, 473,
579 473, 474, 474, 446, 474, 474, 475, 475, 445, 444,
580 475, 441, 439, 438, 437, 436, 435, 434, 432, 431,
581 429, 428, 427, 425, 424, 423, 422, 421, 420, 419,
583 418, 416, 415, 414, 413, 410, 409, 408, 407, 405,
584 404, 403, 402, 401, 400, 399, 398, 397, 396, 395,
585 394, 393, 392, 391, 390, 389, 388, 387, 386, 383,
586 381, 380, 379, 375, 373, 372, 370, 368, 365, 364,
587 363, 362, 361, 360, 358, 357, 356, 355, 354, 353,
588 352, 350, 348, 347, 346, 345, 344, 343, 342, 340,
589 339, 338, 337, 336, 335, 334, 332, 331, 330, 329,
590 327, 325, 324, 321, 319, 318, 317, 316, 315, 314,
591 313, 312, 311, 309, 308, 306, 305, 304, 303, 302,
592 301, 300, 299, 298, 296, 295, 294, 293, 292, 291,
594 289, 287, 286, 285, 283, 282, 281, 280, 279, 278,
595 276, 275, 274, 273, 272, 271, 267, 266, 265, 264,
596 263, 262, 260, 258, 257, 255, 254, 252, 251, 249,
597 248, 246, 245, 244, 243, 242, 239, 238, 237, 236,
598 235, 232, 231, 229, 228, 227, 226, 225, 224, 223,
599 222, 221, 220, 219, 217, 216, 213, 212, 210, 207,
600 206, 205, 203, 202, 201, 200, 199, 198, 197, 196,
601 195, 194, 193, 192, 191, 190, 189, 187, 186, 185,
602 184, 183, 182, 180, 179, 178, 177, 176, 175, 174,
603 171, 170, 169, 167, 165, 164, 163, 162, 161, 160,
605 159, 158, 157, 156, 155, 154, 153, 152, 151, 150,
606 149, 147, 146, 145, 144, 143, 142, 141, 140, 139,
607 138, 137, 136, 135, 134, 133, 132, 131, 130, 129,
608 128, 126, 125, 124, 123, 122, 121, 120, 119, 118,
609 117, 116, 115, 114, 113, 112, 111, 110, 109, 108,
610 107, 105, 104, 103, 102, 101, 100, 99, 98, 97,
611 96, 95, 94, 93, 92, 91, 90, 89, 88, 86,
612 85, 83, 82, 81, 80, 78, 77, 76, 75, 74,
613 73, 70, 68, 66, 65, 64, 63, 62, 61, 60,
614 59, 56, 54, 53, 52, 50, 49, 48, 46, 44,
616 43, 42, 40, 39, 38, 37, 34, 31, 26, 22,
617 17, 16, 9, 7, 3, 469, 469, 469, 469, 469,
618 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
619 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
620 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
624 static yy_state_type yy_last_accepting_state
;
625 static char *yy_last_accepting_cpos
;
627 /* The intent behind this definition is that it'll catch
628 * any uses of REJECT which flex missed.
630 #define REJECT reject_used_but_not_detected
631 #define yymore() yymore_used_but_not_detected
632 #define YY_MORE_ADJ 0
633 #define YY_RESTORE_YY_MORE_OFFSET
638 /* Copyright 1997, 1998, 1999 Free Software Foundation, Inc.
639 Written by Ian Lance Taylor, Cygnus Support.
641 This file is part of GNU Binutils.
643 This program is free software; you can redistribute it and/or modify
644 it under the terms of the GNU General Public License as published by
645 the Free Software Foundation; either version 2 of the License, or
646 (at your option) any later version.
648 This program is distributed in the hope that it will be useful,
649 but WITHOUT ANY WARRANTY; without even the implied warranty of
650 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
651 GNU General Public License for more details.
653 You should have received a copy of the GNU General Public License
654 along with this program; if not, write to the Free Software
655 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
658 /* This is a lex input file which generates a lexer used by the
659 Windows rc file parser. It basically just recognized a bunch of
664 #include "libiberty.h"
671 /* Whether we are in rcdata mode, in which we returns the lengths of
674 static int rcdata_mode
;
676 /* Whether we are supressing lines from cpp (including windows.h or
677 headers from your C sources may bring in externs and typedefs).
678 When active, we return IGNORED_TOKEN, which lets us ignore these
679 outside of resource constructs. Thus, it isn't required to protect
680 all the non-preprocessor lines in your header files with #ifdef
681 RC_INVOKED. It also means your RC file can't include other RC
682 files if they're named "*.h". Sorry. Name them *.rch or whatever. */
684 static int suppress_cpp_data
;
686 #define MAYBE_RETURN(x) return suppress_cpp_data ? IGNORED_TOKEN : (x)
688 /* The first filename we detect in the cpp output. We use this to
689 tell included files from the original file. */
691 static char *initial_fn
;
693 /* List of allocated strings. */
697 struct alloc_string
*next
;
701 static struct alloc_string
*strings
;
703 /* Local functions. */
705 static void cpp_line
PARAMS ((const char *));
706 static char *handle_quotes
PARAMS ((const char *, unsigned long *));
707 static char *get_string
PARAMS ((int));
711 /* Macros after this point can all be overridden by user definitions in
715 #ifndef YY_SKIP_YYWRAP
717 extern "C" int yywrap
YY_PROTO(( void ));
719 extern int yywrap
YY_PROTO(( void ));
724 static void yyunput
YY_PROTO(( int c
, char *buf_ptr
));
728 static void yy_flex_strncpy
YY_PROTO(( char *, yyconst
char *, int ));
731 #ifdef YY_NEED_STRLEN
732 static int yy_flex_strlen
YY_PROTO(( yyconst
char * ));
737 static int yyinput
YY_PROTO(( void ));
739 static int input
YY_PROTO(( void ));
744 static int yy_start_stack_ptr
= 0;
745 static int yy_start_stack_depth
= 0;
746 static int *yy_start_stack
= 0;
747 #ifndef YY_NO_PUSH_STATE
748 static void yy_push_state
YY_PROTO(( int new_state
));
750 #ifndef YY_NO_POP_STATE
751 static void yy_pop_state
YY_PROTO(( void ));
753 #ifndef YY_NO_TOP_STATE
754 static int yy_top_state
YY_PROTO(( void ));
758 #define YY_NO_PUSH_STATE 1
759 #define YY_NO_POP_STATE 1
760 #define YY_NO_TOP_STATE 1
763 #ifdef YY_MALLOC_DECL
771 /* Just try to get by without declaring the routines. This will fail
772 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
773 * or sizeof(void*) != sizeof(int).
778 /* Amount of stuff to slurp up with each read. */
779 #ifndef YY_READ_BUF_SIZE
780 #define YY_READ_BUF_SIZE 8192
783 /* Copy whatever the last rule matched to the standard output. */
786 /* This used to be an fputs(), but since the string might contain NUL's,
787 * we now use fwrite().
789 #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
792 /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
793 * is returned in "result".
796 #define YY_INPUT(buf,result,max_size) \
797 if ( yy_current_buffer->yy_is_interactive ) \
800 for ( n = 0; n < max_size && \
801 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
804 buf[n++] = (char) c; \
805 if ( c == EOF && ferror( yyin ) ) \
806 YY_FATAL_ERROR( "input in flex scanner failed" ); \
809 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
810 && ferror( yyin ) ) \
811 YY_FATAL_ERROR( "input in flex scanner failed" );
814 /* No semi-colon after return; correct usage is to write "yyterminate();" -
815 * we don't want an extra ';' after the "return" because that will cause
816 * some compilers to complain about unreachable statements.
819 #define yyterminate() return YY_NULL
822 /* Number of entries by which start-condition stack grows. */
823 #ifndef YY_START_STACK_INCR
824 #define YY_START_STACK_INCR 25
827 /* Report a fatal error. */
828 #ifndef YY_FATAL_ERROR
829 #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
832 /* Default declaration of generated scanner - a define so the user can
833 * easily add parameters.
836 #define YY_DECL int yylex YY_PROTO(( void ))
839 /* Code executed at the beginning of each rule, after yytext and yyleng
842 #ifndef YY_USER_ACTION
843 #define YY_USER_ACTION
846 /* Code executed at the end of each rule. */
848 #define YY_BREAK break;
851 #define YY_RULE_SETUP \
856 register yy_state_type yy_current_state
;
857 register char *yy_cp
, *yy_bp
;
874 yy_start
= 1; /* first start state */
882 if ( ! yy_current_buffer
)
884 yy_create_buffer( yyin
, YY_BUF_SIZE
);
886 yy_load_buffer_state();
889 while ( 1 ) /* loops until end-of-file is reached */
893 /* Support of yytext. */
894 *yy_cp
= yy_hold_char
;
896 /* yy_bp points to the position in yy_ch_buf of the start of
901 yy_current_state
= yy_start
;
905 register YY_CHAR yy_c
= yy_ec
[YY_SC_TO_UI(*yy_cp
)];
906 if ( yy_accept
[yy_current_state
] )
908 yy_last_accepting_state
= yy_current_state
;
909 yy_last_accepting_cpos
= yy_cp
;
911 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
913 yy_current_state
= (int) yy_def
[yy_current_state
];
914 if ( yy_current_state
>= 470 )
915 yy_c
= yy_meta
[(unsigned int) yy_c
];
917 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
920 while ( yy_base
[yy_current_state
] != 516 );
923 yy_act
= yy_accept
[yy_current_state
];
925 { /* have to back up */
926 yy_cp
= yy_last_accepting_cpos
;
927 yy_current_state
= yy_last_accepting_state
;
928 yy_act
= yy_accept
[yy_current_state
];
934 do_action
: /* This label is used only to access EOF actions. */
938 { /* beginning of action switch */
939 case 0: /* must back up */
940 /* undo the effects of YY_DO_BEFORE_ACTION */
941 *yy_cp
= yy_hold_char
;
942 yy_cp
= yy_last_accepting_cpos
;
943 yy_current_state
= yy_last_accepting_state
;
949 { MAYBE_RETURN (BEG
); }
954 { MAYBE_RETURN (BEG
); }
959 { MAYBE_RETURN (END
); }
964 { MAYBE_RETURN (END
); }
969 { MAYBE_RETURN (ACCELERATORS
); }
974 { MAYBE_RETURN (VIRTKEY
); }
979 { MAYBE_RETURN (ASCII
); }
984 { MAYBE_RETURN (NOINVERT
); }
989 { MAYBE_RETURN (SHIFT
); }
994 { MAYBE_RETURN (CONTROL
); }
999 { MAYBE_RETURN (ALT
); }
1004 { MAYBE_RETURN (BITMAP
); }
1009 { MAYBE_RETURN (CURSOR
); }
1014 { MAYBE_RETURN (DIALOG
); }
1019 { MAYBE_RETURN (DIALOGEX
); }
1024 { MAYBE_RETURN (EXSTYLE
); }
1029 { MAYBE_RETURN (CAPTION
); }
1034 { MAYBE_RETURN (CLASS
); }
1039 { MAYBE_RETURN (STYLE
); }
1044 { MAYBE_RETURN (AUTO3STATE
); }
1049 { MAYBE_RETURN (AUTOCHECKBOX
); }
1054 { MAYBE_RETURN (AUTORADIOBUTTON
); }
1059 { MAYBE_RETURN (CHECKBOX
); }
1064 { MAYBE_RETURN (COMBOBOX
); }
1069 { MAYBE_RETURN (CTEXT
); }
1074 { MAYBE_RETURN (DEFPUSHBUTTON
); }
1079 { MAYBE_RETURN (EDITTEXT
); }
1084 { MAYBE_RETURN (GROUPBOX
); }
1089 { MAYBE_RETURN (LISTBOX
); }
1094 { MAYBE_RETURN (LTEXT
); }
1099 { MAYBE_RETURN (PUSHBOX
); }
1104 { MAYBE_RETURN (PUSHBUTTON
); }
1109 { MAYBE_RETURN (RADIOBUTTON
); }
1114 { MAYBE_RETURN (RTEXT
); }
1119 { MAYBE_RETURN (SCROLLBAR
); }
1124 { MAYBE_RETURN (STATE3
); }
1129 { MAYBE_RETURN (USERBUTTON
); }
1134 { MAYBE_RETURN (BEDIT
); }
1139 { MAYBE_RETURN (HEDIT
); }
1144 { MAYBE_RETURN (IEDIT
); }
1149 { MAYBE_RETURN (FONT
); }
1154 { MAYBE_RETURN (ICON
); }
1159 { MAYBE_RETURN (LANGUAGE
); }
1164 { MAYBE_RETURN (CHARACTERISTICS
); }
1169 { MAYBE_RETURN (VERSIONK
); }
1174 { MAYBE_RETURN (MENU
); }
1179 { MAYBE_RETURN (MENUEX
); }
1184 { MAYBE_RETURN (MENUITEM
); }
1189 { MAYBE_RETURN (SEPARATOR
); }
1194 { MAYBE_RETURN (POPUP
); }
1199 { MAYBE_RETURN (CHECKED
); }
1204 { MAYBE_RETURN (GRAYED
); }
1209 { MAYBE_RETURN (HELP
); }
1214 { MAYBE_RETURN (INACTIVE
); }
1219 { MAYBE_RETURN (MENUBARBREAK
); }
1224 { MAYBE_RETURN (MENUBREAK
); }
1229 { MAYBE_RETURN (MESSAGETABLE
); }
1234 { MAYBE_RETURN (RCDATA
); }
1239 { MAYBE_RETURN (STRINGTABLE
); }
1244 { MAYBE_RETURN (VERSIONINFO
); }
1249 { MAYBE_RETURN (FILEVERSION
); }
1254 { MAYBE_RETURN (PRODUCTVERSION
); }
1259 { MAYBE_RETURN (FILEFLAGSMASK
); }
1264 { MAYBE_RETURN (FILEFLAGS
); }
1269 { MAYBE_RETURN (FILEOS
); }
1274 { MAYBE_RETURN (FILETYPE
); }
1279 { MAYBE_RETURN (FILESUBTYPE
); }
1284 { MAYBE_RETURN (VALUE
); }
1289 { MAYBE_RETURN (MOVEABLE
); }
1294 { MAYBE_RETURN (FIXED
); }
1299 { MAYBE_RETURN (PURE
); }
1304 { MAYBE_RETURN (IMPURE
); }
1309 { MAYBE_RETURN (PRELOAD
); }
1314 { MAYBE_RETURN (LOADONCALL
); }
1319 { MAYBE_RETURN (DISCARDABLE
); }
1324 { MAYBE_RETURN (NOT
); }
1332 /* This is a hack to let us parse version
1333 information easily. */
1335 s
= strchr (yytext
, '"');
1337 send
= strchr (s
, '"');
1338 if (strncmp (s
, "StringFileInfo",
1339 sizeof "StringFileInfo" - 1) == 0
1340 && s
+ sizeof "StringFileInfo" - 1 == send
)
1341 MAYBE_RETURN (BLOCKSTRINGFILEINFO
);
1342 else if (strncmp (s
, "VarFileInfo",
1343 sizeof "VarFileInfo" - 1) == 0
1344 && s
+ sizeof "VarFileInfo" - 1 == send
)
1345 MAYBE_RETURN (BLOCKVARFILEINFO
);
1350 r
= get_string (send
- s
+ 1);
1351 strncpy (r
, s
, send
- s
);
1354 MAYBE_RETURN (BLOCK
);
1369 yylval
.i
.val
= strtoul (yytext
, 0, 0);
1371 MAYBE_RETURN (NUMBER
);
1378 yylval
.i
.val
= strtoul (yytext
, 0, 0);
1380 MAYBE_RETURN (NUMBER
);
1388 unsigned long length
;
1390 s
= handle_quotes (yytext
, &length
);
1394 MAYBE_RETURN (QUOTEDSTRING
);
1398 yylval
.ss
.length
= length
;
1400 MAYBE_RETURN (SIZEDSTRING
);
1410 /* I rejected comma in a string in order to
1411 handle VIRTKEY, CONTROL in an accelerator
1412 resource. This means that an unquoted
1413 file name can not contain a comma. I
1414 don't know what rc permits. */
1416 s
= get_string (strlen (yytext
) + 1);
1419 MAYBE_RETURN (STRING
);
1430 { /* ignore whitespace */ }
1435 { MAYBE_RETURN (*yytext
); }
1442 #line 1443 "lex.yy.c"
1443 case YY_STATE_EOF(INITIAL
):
1446 case YY_END_OF_BUFFER
:
1448 /* Amount of text matched not including the EOB char. */
1449 int yy_amount_of_matched_text
= (int) (yy_cp
- yytext_ptr
) - 1;
1451 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1452 *yy_cp
= yy_hold_char
;
1453 YY_RESTORE_YY_MORE_OFFSET
1455 if ( yy_current_buffer
->yy_buffer_status
== YY_BUFFER_NEW
)
1457 /* We're scanning a new file or input source. It's
1458 * possible that this happened because the user
1459 * just pointed yyin at a new source and called
1460 * yylex(). If so, then we have to assure
1461 * consistency between yy_current_buffer and our
1462 * globals. Here is the right place to do so, because
1463 * this is the first action (other than possibly a
1464 * back-up) that will match for the new input source.
1466 yy_n_chars
= yy_current_buffer
->yy_n_chars
;
1467 yy_current_buffer
->yy_input_file
= yyin
;
1468 yy_current_buffer
->yy_buffer_status
= YY_BUFFER_NORMAL
;
1471 /* Note that here we test for yy_c_buf_p "<=" to the position
1472 * of the first EOB in the buffer, since yy_c_buf_p will
1473 * already have been incremented past the NUL character
1474 * (since all states make transitions on EOB to the
1475 * end-of-buffer state). Contrast this with the test
1478 if ( yy_c_buf_p
<= &yy_current_buffer
->yy_ch_buf
[yy_n_chars
] )
1479 { /* This was really a NUL. */
1480 yy_state_type yy_next_state
;
1482 yy_c_buf_p
= yytext_ptr
+ yy_amount_of_matched_text
;
1484 yy_current_state
= yy_get_previous_state();
1486 /* Okay, we're now positioned to make the NUL
1487 * transition. We couldn't have
1488 * yy_get_previous_state() go ahead and do it
1489 * for us because it doesn't know how to deal
1490 * with the possibility of jamming (and we don't
1491 * want to build jamming into it because then it
1492 * will run more slowly).
1495 yy_next_state
= yy_try_NUL_trans( yy_current_state
);
1497 yy_bp
= yytext_ptr
+ YY_MORE_ADJ
;
1499 if ( yy_next_state
)
1501 /* Consume the NUL. */
1502 yy_cp
= ++yy_c_buf_p
;
1503 yy_current_state
= yy_next_state
;
1510 goto yy_find_action
;
1514 else switch ( yy_get_next_buffer() )
1516 case EOB_ACT_END_OF_FILE
:
1518 yy_did_buffer_switch_on_eof
= 0;
1522 /* Note: because we've taken care in
1523 * yy_get_next_buffer() to have set up
1524 * yytext, we can now set up
1525 * yy_c_buf_p so that if some total
1526 * hoser (like flex itself) wants to
1527 * call the scanner after we return the
1528 * YY_NULL, it'll still work - another
1529 * YY_NULL will get returned.
1531 yy_c_buf_p
= yytext_ptr
+ YY_MORE_ADJ
;
1533 yy_act
= YY_STATE_EOF(YY_START
);
1539 if ( ! yy_did_buffer_switch_on_eof
)
1545 case EOB_ACT_CONTINUE_SCAN
:
1547 yytext_ptr
+ yy_amount_of_matched_text
;
1549 yy_current_state
= yy_get_previous_state();
1552 yy_bp
= yytext_ptr
+ YY_MORE_ADJ
;
1555 case EOB_ACT_LAST_MATCH
:
1557 &yy_current_buffer
->yy_ch_buf
[yy_n_chars
];
1559 yy_current_state
= yy_get_previous_state();
1562 yy_bp
= yytext_ptr
+ YY_MORE_ADJ
;
1563 goto yy_find_action
;
1570 "fatal flex scanner internal error--no action found" );
1571 } /* end of action switch */
1572 } /* end of scanning one token */
1573 } /* end of yylex */
1576 /* yy_get_next_buffer - try to read in a new buffer
1578 * Returns a code representing an action:
1579 * EOB_ACT_LAST_MATCH -
1580 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1581 * EOB_ACT_END_OF_FILE - end of file
1584 static int yy_get_next_buffer()
1586 register char *dest
= yy_current_buffer
->yy_ch_buf
;
1587 register char *source
= yytext_ptr
;
1588 register int number_to_move
, i
;
1591 if ( yy_c_buf_p
> &yy_current_buffer
->yy_ch_buf
[yy_n_chars
+ 1] )
1593 "fatal flex scanner internal error--end of buffer missed" );
1595 if ( yy_current_buffer
->yy_fill_buffer
== 0 )
1596 { /* Don't try to fill the buffer, so this is an EOF. */
1597 if ( yy_c_buf_p
- yytext_ptr
- YY_MORE_ADJ
== 1 )
1599 /* We matched a single character, the EOB, so
1600 * treat this as a final EOF.
1602 return EOB_ACT_END_OF_FILE
;
1607 /* We matched some text prior to the EOB, first
1610 return EOB_ACT_LAST_MATCH
;
1614 /* Try to read more data. */
1616 /* First move last chars to start of buffer. */
1617 number_to_move
= (int) (yy_c_buf_p
- yytext_ptr
) - 1;
1619 for ( i
= 0; i
< number_to_move
; ++i
)
1620 *(dest
++) = *(source
++);
1622 if ( yy_current_buffer
->yy_buffer_status
== YY_BUFFER_EOF_PENDING
)
1623 /* don't do the read, it's not guaranteed to return an EOF,
1626 yy_current_buffer
->yy_n_chars
= yy_n_chars
= 0;
1631 yy_current_buffer
->yy_buf_size
- number_to_move
- 1;
1633 while ( num_to_read
<= 0 )
1634 { /* Not enough room in the buffer - grow it. */
1635 #ifdef YY_USES_REJECT
1637 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1640 /* just a shorter name for the current buffer */
1641 YY_BUFFER_STATE b
= yy_current_buffer
;
1643 int yy_c_buf_p_offset
=
1644 (int) (yy_c_buf_p
- b
->yy_ch_buf
);
1646 if ( b
->yy_is_our_buffer
)
1648 int new_size
= b
->yy_buf_size
* 2;
1650 if ( new_size
<= 0 )
1651 b
->yy_buf_size
+= b
->yy_buf_size
/ 8;
1653 b
->yy_buf_size
*= 2;
1655 b
->yy_ch_buf
= (char *)
1656 /* Include room in for 2 EOB chars. */
1657 yy_flex_realloc( (void *) b
->yy_ch_buf
,
1658 b
->yy_buf_size
+ 2 );
1661 /* Can't grow it, we don't own it. */
1664 if ( ! b
->yy_ch_buf
)
1666 "fatal error - scanner input buffer overflow" );
1668 yy_c_buf_p
= &b
->yy_ch_buf
[yy_c_buf_p_offset
];
1670 num_to_read
= yy_current_buffer
->yy_buf_size
-
1675 if ( num_to_read
> YY_READ_BUF_SIZE
)
1676 num_to_read
= YY_READ_BUF_SIZE
;
1678 /* Read in more data. */
1679 YY_INPUT( (&yy_current_buffer
->yy_ch_buf
[number_to_move
]),
1680 yy_n_chars
, num_to_read
);
1682 yy_current_buffer
->yy_n_chars
= yy_n_chars
;
1685 if ( yy_n_chars
== 0 )
1687 if ( number_to_move
== YY_MORE_ADJ
)
1689 ret_val
= EOB_ACT_END_OF_FILE
;
1695 ret_val
= EOB_ACT_LAST_MATCH
;
1696 yy_current_buffer
->yy_buffer_status
=
1697 YY_BUFFER_EOF_PENDING
;
1702 ret_val
= EOB_ACT_CONTINUE_SCAN
;
1704 yy_n_chars
+= number_to_move
;
1705 yy_current_buffer
->yy_ch_buf
[yy_n_chars
] = YY_END_OF_BUFFER_CHAR
;
1706 yy_current_buffer
->yy_ch_buf
[yy_n_chars
+ 1] = YY_END_OF_BUFFER_CHAR
;
1708 yytext_ptr
= &yy_current_buffer
->yy_ch_buf
[0];
1714 /* yy_get_previous_state - get the state just before the EOB char was reached */
1716 static yy_state_type
yy_get_previous_state()
1718 register yy_state_type yy_current_state
;
1719 register char *yy_cp
;
1721 yy_current_state
= yy_start
;
1723 for ( yy_cp
= yytext_ptr
+ YY_MORE_ADJ
; yy_cp
< yy_c_buf_p
; ++yy_cp
)
1725 register YY_CHAR yy_c
= (*yy_cp
? yy_ec
[YY_SC_TO_UI(*yy_cp
)] : 1);
1726 if ( yy_accept
[yy_current_state
] )
1728 yy_last_accepting_state
= yy_current_state
;
1729 yy_last_accepting_cpos
= yy_cp
;
1731 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
1733 yy_current_state
= (int) yy_def
[yy_current_state
];
1734 if ( yy_current_state
>= 470 )
1735 yy_c
= yy_meta
[(unsigned int) yy_c
];
1737 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
1740 return yy_current_state
;
1744 /* yy_try_NUL_trans - try to make a transition on the NUL character
1747 * next_state = yy_try_NUL_trans( current_state );
1750 #ifdef YY_USE_PROTOS
1751 static yy_state_type
yy_try_NUL_trans( yy_state_type yy_current_state
)
1753 static yy_state_type
yy_try_NUL_trans( yy_current_state
)
1754 yy_state_type yy_current_state
;
1757 register int yy_is_jam
;
1758 register char *yy_cp
= yy_c_buf_p
;
1760 register YY_CHAR yy_c
= 1;
1761 if ( yy_accept
[yy_current_state
] )
1763 yy_last_accepting_state
= yy_current_state
;
1764 yy_last_accepting_cpos
= yy_cp
;
1766 while ( yy_chk
[yy_base
[yy_current_state
] + yy_c
] != yy_current_state
)
1768 yy_current_state
= (int) yy_def
[yy_current_state
];
1769 if ( yy_current_state
>= 470 )
1770 yy_c
= yy_meta
[(unsigned int) yy_c
];
1772 yy_current_state
= yy_nxt
[yy_base
[yy_current_state
] + (unsigned int) yy_c
];
1773 yy_is_jam
= (yy_current_state
== 469);
1775 return yy_is_jam
? 0 : yy_current_state
;
1780 #ifdef YY_USE_PROTOS
1781 static void yyunput( int c
, register char *yy_bp
)
1783 static void yyunput( c
, yy_bp
)
1785 register char *yy_bp
;
1788 register char *yy_cp
= yy_c_buf_p
;
1790 /* undo effects of setting up yytext */
1791 *yy_cp
= yy_hold_char
;
1793 if ( yy_cp
< yy_current_buffer
->yy_ch_buf
+ 2 )
1794 { /* need to shift things up to make room */
1795 /* +2 for EOB chars. */
1796 register int number_to_move
= yy_n_chars
+ 2;
1797 register char *dest
= &yy_current_buffer
->yy_ch_buf
[
1798 yy_current_buffer
->yy_buf_size
+ 2];
1799 register char *source
=
1800 &yy_current_buffer
->yy_ch_buf
[number_to_move
];
1802 while ( source
> yy_current_buffer
->yy_ch_buf
)
1803 *--dest
= *--source
;
1805 yy_cp
+= (int) (dest
- source
);
1806 yy_bp
+= (int) (dest
- source
);
1807 yy_current_buffer
->yy_n_chars
=
1808 yy_n_chars
= yy_current_buffer
->yy_buf_size
;
1810 if ( yy_cp
< yy_current_buffer
->yy_ch_buf
+ 2 )
1811 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1814 *--yy_cp
= (char) c
;
1818 yy_hold_char
= *yy_cp
;
1821 #endif /* ifndef YY_NO_UNPUT */
1825 static int yyinput()
1832 *yy_c_buf_p
= yy_hold_char
;
1834 if ( *yy_c_buf_p
== YY_END_OF_BUFFER_CHAR
)
1836 /* yy_c_buf_p now points to the character we want to return.
1837 * If this occurs *before* the EOB characters, then it's a
1838 * valid NUL; if not, then we've hit the end of the buffer.
1840 if ( yy_c_buf_p
< &yy_current_buffer
->yy_ch_buf
[yy_n_chars
] )
1841 /* This was really a NUL. */
1845 { /* need more input */
1846 int offset
= yy_c_buf_p
- yytext_ptr
;
1849 switch ( yy_get_next_buffer() )
1851 case EOB_ACT_LAST_MATCH
:
1852 /* This happens because yy_g_n_b()
1853 * sees that we've accumulated a
1854 * token and flags that we need to
1855 * try matching the token before
1856 * proceeding. But for input(),
1857 * there's no matching to consider.
1858 * So convert the EOB_ACT_LAST_MATCH
1859 * to EOB_ACT_END_OF_FILE.
1862 /* Reset buffer status. */
1867 case EOB_ACT_END_OF_FILE
:
1872 if ( ! yy_did_buffer_switch_on_eof
)
1881 case EOB_ACT_CONTINUE_SCAN
:
1882 yy_c_buf_p
= yytext_ptr
+ offset
;
1888 c
= *(unsigned char *) yy_c_buf_p
; /* cast for 8-bit char's */
1889 *yy_c_buf_p
= '\0'; /* preserve yytext */
1890 yy_hold_char
= *++yy_c_buf_p
;
1897 #ifdef YY_USE_PROTOS
1898 void yyrestart( FILE *input_file
)
1900 void yyrestart( input_file
)
1904 if ( ! yy_current_buffer
)
1905 yy_current_buffer
= yy_create_buffer( yyin
, YY_BUF_SIZE
);
1907 yy_init_buffer( yy_current_buffer
, input_file
);
1908 yy_load_buffer_state();
1912 #ifdef YY_USE_PROTOS
1913 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer
)
1915 void yy_switch_to_buffer( new_buffer
)
1916 YY_BUFFER_STATE new_buffer
;
1919 if ( yy_current_buffer
== new_buffer
)
1922 if ( yy_current_buffer
)
1924 /* Flush out information for old buffer. */
1925 *yy_c_buf_p
= yy_hold_char
;
1926 yy_current_buffer
->yy_buf_pos
= yy_c_buf_p
;
1927 yy_current_buffer
->yy_n_chars
= yy_n_chars
;
1930 yy_current_buffer
= new_buffer
;
1931 yy_load_buffer_state();
1933 /* We don't actually know whether we did this switch during
1934 * EOF (yywrap()) processing, but the only time this flag
1935 * is looked at is after yywrap() is called, so it's safe
1936 * to go ahead and always set it.
1938 yy_did_buffer_switch_on_eof
= 1;
1942 #ifdef YY_USE_PROTOS
1943 void yy_load_buffer_state( void )
1945 void yy_load_buffer_state()
1948 yy_n_chars
= yy_current_buffer
->yy_n_chars
;
1949 yytext_ptr
= yy_c_buf_p
= yy_current_buffer
->yy_buf_pos
;
1950 yyin
= yy_current_buffer
->yy_input_file
;
1951 yy_hold_char
= *yy_c_buf_p
;
1955 #ifdef YY_USE_PROTOS
1956 YY_BUFFER_STATE
yy_create_buffer( FILE *file
, int size
)
1958 YY_BUFFER_STATE
yy_create_buffer( file
, size
)
1965 b
= (YY_BUFFER_STATE
) yy_flex_alloc( sizeof( struct yy_buffer_state
) );
1967 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1969 b
->yy_buf_size
= size
;
1971 /* yy_ch_buf has to be 2 characters longer than the size given because
1972 * we need to put in 2 end-of-buffer characters.
1974 b
->yy_ch_buf
= (char *) yy_flex_alloc( b
->yy_buf_size
+ 2 );
1975 if ( ! b
->yy_ch_buf
)
1976 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
1978 b
->yy_is_our_buffer
= 1;
1980 yy_init_buffer( b
, file
);
1986 #ifdef YY_USE_PROTOS
1987 void yy_delete_buffer( YY_BUFFER_STATE b
)
1989 void yy_delete_buffer( b
)
1996 if ( b
== yy_current_buffer
)
1997 yy_current_buffer
= (YY_BUFFER_STATE
) 0;
1999 if ( b
->yy_is_our_buffer
)
2000 yy_flex_free( (void *) b
->yy_ch_buf
);
2002 yy_flex_free( (void *) b
);
2006 #ifndef YY_ALWAYS_INTERACTIVE
2007 #ifndef YY_NEVER_INTERACTIVE
2008 extern int isatty
YY_PROTO(( int ));
2012 #ifdef YY_USE_PROTOS
2013 void yy_init_buffer( YY_BUFFER_STATE b
, FILE *file
)
2015 void yy_init_buffer( b
, file
)
2022 yy_flush_buffer( b
);
2024 b
->yy_input_file
= file
;
2025 b
->yy_fill_buffer
= 1;
2027 #if YY_ALWAYS_INTERACTIVE
2028 b
->yy_is_interactive
= 1;
2030 #if YY_NEVER_INTERACTIVE
2031 b
->yy_is_interactive
= 0;
2033 b
->yy_is_interactive
= file
? (isatty( fileno(file
) ) > 0) : 0;
2039 #ifdef YY_USE_PROTOS
2040 void yy_flush_buffer( YY_BUFFER_STATE b
)
2042 void yy_flush_buffer( b
)
2052 /* We always need two end-of-buffer characters. The first causes
2053 * a transition to the end-of-buffer state. The second causes
2054 * a jam in that state.
2056 b
->yy_ch_buf
[0] = YY_END_OF_BUFFER_CHAR
;
2057 b
->yy_ch_buf
[1] = YY_END_OF_BUFFER_CHAR
;
2059 b
->yy_buf_pos
= &b
->yy_ch_buf
[0];
2062 b
->yy_buffer_status
= YY_BUFFER_NEW
;
2064 if ( b
== yy_current_buffer
)
2065 yy_load_buffer_state();
2069 #ifndef YY_NO_SCAN_BUFFER
2070 #ifdef YY_USE_PROTOS
2071 YY_BUFFER_STATE
yy_scan_buffer( char *base
, yy_size_t size
)
2073 YY_BUFFER_STATE
yy_scan_buffer( base
, size
)
2081 base
[size
-2] != YY_END_OF_BUFFER_CHAR
||
2082 base
[size
-1] != YY_END_OF_BUFFER_CHAR
)
2083 /* They forgot to leave room for the EOB's. */
2086 b
= (YY_BUFFER_STATE
) yy_flex_alloc( sizeof( struct yy_buffer_state
) );
2088 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
2090 b
->yy_buf_size
= size
- 2; /* "- 2" to take care of EOB's */
2091 b
->yy_buf_pos
= b
->yy_ch_buf
= base
;
2092 b
->yy_is_our_buffer
= 0;
2093 b
->yy_input_file
= 0;
2094 b
->yy_n_chars
= b
->yy_buf_size
;
2095 b
->yy_is_interactive
= 0;
2097 b
->yy_fill_buffer
= 0;
2098 b
->yy_buffer_status
= YY_BUFFER_NEW
;
2100 yy_switch_to_buffer( b
);
2107 #ifndef YY_NO_SCAN_STRING
2108 #ifdef YY_USE_PROTOS
2109 YY_BUFFER_STATE
yy_scan_string( yyconst
char *yy_str
)
2111 YY_BUFFER_STATE
yy_scan_string( yy_str
)
2112 yyconst
char *yy_str
;
2116 for ( len
= 0; yy_str
[len
]; ++len
)
2119 return yy_scan_bytes( yy_str
, len
);
2124 #ifndef YY_NO_SCAN_BYTES
2125 #ifdef YY_USE_PROTOS
2126 YY_BUFFER_STATE
yy_scan_bytes( yyconst
char *bytes
, int len
)
2128 YY_BUFFER_STATE
yy_scan_bytes( bytes
, len
)
2129 yyconst
char *bytes
;
2138 /* Get memory for full buffer, including space for trailing EOB's. */
2140 buf
= (char *) yy_flex_alloc( n
);
2142 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
2144 for ( i
= 0; i
< len
; ++i
)
2147 buf
[len
] = buf
[len
+1] = YY_END_OF_BUFFER_CHAR
;
2149 b
= yy_scan_buffer( buf
, n
);
2151 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
2153 /* It's okay to grow etc. this buffer, and we should throw it
2154 * away when we're done.
2156 b
->yy_is_our_buffer
= 1;
2163 #ifndef YY_NO_PUSH_STATE
2164 #ifdef YY_USE_PROTOS
2165 static void yy_push_state( int new_state
)
2167 static void yy_push_state( new_state
)
2171 if ( yy_start_stack_ptr
>= yy_start_stack_depth
)
2175 yy_start_stack_depth
+= YY_START_STACK_INCR
;
2176 new_size
= yy_start_stack_depth
* sizeof( int );
2178 if ( ! yy_start_stack
)
2179 yy_start_stack
= (int *) yy_flex_alloc( new_size
);
2182 yy_start_stack
= (int *) yy_flex_realloc(
2183 (void *) yy_start_stack
, new_size
);
2185 if ( ! yy_start_stack
)
2187 "out of memory expanding start-condition stack" );
2190 yy_start_stack
[yy_start_stack_ptr
++] = YY_START
;
2197 #ifndef YY_NO_POP_STATE
2198 static void yy_pop_state()
2200 if ( --yy_start_stack_ptr
< 0 )
2201 YY_FATAL_ERROR( "start-condition stack underflow" );
2203 BEGIN(yy_start_stack
[yy_start_stack_ptr
]);
2208 #ifndef YY_NO_TOP_STATE
2209 static int yy_top_state()
2211 return yy_start_stack
[yy_start_stack_ptr
- 1];
2215 #ifndef YY_EXIT_FAILURE
2216 #define YY_EXIT_FAILURE 2
2219 #ifdef YY_USE_PROTOS
2220 static void yy_fatal_error( yyconst
char msg
[] )
2222 static void yy_fatal_error( msg
)
2226 (void) fprintf( stderr
, "%s\n", msg
);
2227 exit( YY_EXIT_FAILURE
);
2232 /* Redefine yyless() so it works in section 3 code. */
2238 /* Undo effects of setting up yytext. */ \
2239 yytext[yyleng] = yy_hold_char; \
2240 yy_c_buf_p = yytext + n; \
2241 yy_hold_char = *yy_c_buf_p; \
2242 *yy_c_buf_p = '\0'; \
2248 /* Internal utility routines. */
2251 #ifdef YY_USE_PROTOS
2252 static void yy_flex_strncpy( char *s1
, yyconst
char *s2
, int n
)
2254 static void yy_flex_strncpy( s1
, s2
, n
)
2261 for ( i
= 0; i
< n
; ++i
)
2266 #ifdef YY_NEED_STRLEN
2267 #ifdef YY_USE_PROTOS
2268 static int yy_flex_strlen( yyconst
char *s
)
2270 static int yy_flex_strlen( s
)
2275 for ( n
= 0; s
[n
]; ++n
)
2283 #ifdef YY_USE_PROTOS
2284 static void *yy_flex_alloc( yy_size_t size
)
2286 static void *yy_flex_alloc( size
)
2290 return (void *) malloc( size
);
2293 #ifdef YY_USE_PROTOS
2294 static void *yy_flex_realloc( void *ptr
, yy_size_t size
)
2296 static void *yy_flex_realloc( ptr
, size
)
2301 /* The cast to (char *) in the following accommodates both
2302 * implementations that use char* generic pointers, and those
2303 * that use void* generic pointers. It works with the latter
2304 * because both ANSI C and C++ allow castless assignment from
2305 * any pointer type to void*, and deal with argument conversions
2306 * as though doing an assignment.
2308 return (void *) realloc( (char *) ptr
, size
);
2311 #ifdef YY_USE_PROTOS
2312 static void yy_flex_free( void *ptr
)
2314 static void yy_flex_free( ptr
)
2331 /* This is needed for some versions of lex. */
2338 /* Handle a C preprocessor line. */
2348 while (isspace ((unsigned char) *s
))
2351 line
= strtol (s
, &send
, 0);
2352 if (*send
!= '\0' && ! isspace ((unsigned char) *send
))
2355 /* Subtract 1 because we are about to count the newline. */
2356 rc_lineno
= line
- 1;
2359 while (isspace ((unsigned char) *s
))
2366 send
= strchr (s
, '"');
2370 fn
= (char *) xmalloc (send
- s
+ 1);
2371 strncpy (fn
, s
, send
- s
);
2372 fn
[send
- s
] = '\0';
2379 initial_fn
= xmalloc (strlen (fn
) + 1);
2380 strcpy(initial_fn
, fn
);
2383 /* Allow the initial file, regardless of name. Suppress all other
2384 files if they end in ".h" (this allows included "*.rc") */
2385 if (strcmp (initial_fn
, fn
) == 0
2386 || strcmp (fn
+ strlen (fn
) - 2, ".h") != 0)
2387 suppress_cpp_data
= 0;
2389 suppress_cpp_data
= 1;
2392 /* Handle a quoted string. The quotes are stripped. A pair of quotes
2393 in a string are turned into a single quote. Adjacent strings are
2394 merged separated by whitespace are merged, as in C. */
2397 handle_quotes (input
, len
)
2405 ret
= get_string (strlen (input
) + 1);
2419 rcparse_warning ("backslash at end of string");
2423 rcparse_warning ("use \"\" to put \" in a string");
2465 case '0': case '1': case '2': case '3':
2466 case '4': case '5': case '6': case '7':
2469 if (*t
>= '0' && *t
<= '7')
2471 ch
= (ch
<< 3) | (*t
- '0');
2473 if (*t
>= '0' && *t
<= '7')
2475 ch
= (ch
<< 3) | (*t
- '0');
2487 if (*t
>= '0' && *t
<= '9')
2488 ch
= (ch
<< 4) | (*t
- '0');
2489 else if (*t
>= 'a' && *t
<= 'f')
2490 ch
= (ch
<< 4) | (*t
- 'a');
2491 else if (*t
>= 'A' && *t
<= 'F')
2492 ch
= (ch
<< 4) | (*t
- 'A');
2501 rcparse_warning ("unrecognized escape sequence");
2509 else if (t
[1] == '\0')
2511 else if (t
[1] == '"')
2519 assert (isspace ((unsigned char) *t
));
2520 while (isspace ((unsigned char) *t
))
2536 /* Allocate a string of a given length. */
2542 struct alloc_string
*as
;
2544 as
= (struct alloc_string
*) xmalloc (sizeof *as
);
2545 as
->s
= xmalloc (len
);
2553 /* Discard all the strings we have allocated. The parser calls this
2554 when it no longer needs them. */
2557 rcparse_discard_strings ()
2559 struct alloc_string
*as
;
2564 struct alloc_string
*n
;
2575 /* Enter rcdata mode. */
2583 /* Go back to normal mode from rcdata mode. */