1/* A lexical scanner generated by flex */ 2 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 $ 5 */ 6 7#define FLEX_SCANNER 8#define YY_FLEX_MAJOR_VERSION 2 9#define YY_FLEX_MINOR_VERSION 5 10 11#include <stdio.h> 12#include <unistd.h> 13 14 15/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ 16#ifdef c_plusplus 17#ifndef __cplusplus 18#define __cplusplus 19#endif 20#endif 21 22 23#ifdef __cplusplus 24 25#include <stdlib.h> 26 27/* Use prototypes in function declarations. */ 28#define YY_USE_PROTOS 29 30/* The "const" storage-class-modifier is valid. */ 31#define YY_USE_CONST 32 33#else /* ! __cplusplus */ 34 35#if __STDC__ 36 37#define YY_USE_PROTOS 38#define YY_USE_CONST 39 40#endif /* __STDC__ */ 41#endif /* ! __cplusplus */ 42 43#ifdef __TURBOC__ 44 #pragma warn -rch 45 #pragma warn -use 46#include <io.h> 47#include <stdlib.h> 48#define YY_USE_CONST 49#define YY_USE_PROTOS 50#endif 51 52#ifdef YY_USE_CONST 53#define yyconst const 54#else 55#define yyconst 56#endif 57 58 59#ifdef YY_USE_PROTOS 60#define YY_PROTO(proto) proto 61#else 62#define YY_PROTO(proto) () 63#endif 64 65/* Returned upon end-of-file. */ 66#define YY_NULL 0 67 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 71 * double cast. 72 */ 73#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) 74 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. 78 */ 79#define BEGIN yy_start = 1 + 2 * 80 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 83 * compatibility. 84 */ 85#define YY_START ((yy_start - 1) / 2) 86#define YYSTATE YY_START 87 88/* Action number for EOF rule of a given start state. */ 89#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) 90 91/* Special action meaning "start processing a new file". */ 92#define YY_NEW_FILE yyrestart( yyin ) 93 94#define YY_END_OF_BUFFER_CHAR 0 95 96/* Size of default input buffer. */ 97#define YY_BUF_SIZE 16384 98 99typedef struct yy_buffer_state *YY_BUFFER_STATE; 100 101extern int yyleng; 102extern FILE *yyin, *yyout; 103 104#define EOB_ACT_CONTINUE_SCAN 0 105#define EOB_ACT_END_OF_FILE 1 106#define EOB_ACT_LAST_MATCH 2 107 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: 111 * 112 * if ( condition_holds ) 113 * yyless( 5 ); 114 * else 115 * do_something_else(); 116 * 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. 120 */ 121 122/* Return all but the first 'n' matched characters back to the input stream. */ 123 124#define yyless(n) \ 125 do \ 126 { \ 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 */ \ 132 } \ 133 while ( 0 ) 134 135#define unput(c) yyunput( c, yytext_ptr ) 136 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). 140 */ 141typedef unsigned int yy_size_t; 142 143 144struct yy_buffer_state 145 { 146 FILE *yy_input_file; 147 148 char *yy_ch_buf; /* input buffer */ 149 char *yy_buf_pos; /* current position in input buffer */ 150 151 /* Size of input buffer in bytes, not including room for EOB 152 * characters. 153 */ 154 yy_size_t yy_buf_size; 155 156 /* Number of characters read into yy_ch_buf, not including EOB 157 * characters. 158 */ 159 int yy_n_chars; 160 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 163 * delete it. 164 */ 165 int yy_is_our_buffer; 166 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 170 * each newline. 171 */ 172 int yy_is_interactive; 173 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 176 * not. 177 */ 178 int yy_at_bol; 179 180 /* Whether to try to fill the input buffer when we reach the 181 * end of it. 182 */ 183 int yy_fill_buffer; 184 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. 193 * 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. 197 */ 198#define YY_BUFFER_EOF_PENDING 2 199 }; 200 201static YY_BUFFER_STATE yy_current_buffer = 0; 202 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 205 * "scanner state". 206 */ 207#define YY_CURRENT_BUFFER yy_current_buffer 208 209 210/* yy_hold_char holds the character lost when yytext is formed. */ 211static char yy_hold_char; 212 213static int yy_n_chars; /* number of characters read into yy_ch_buf */ 214 215 216int yyleng; 217 218/* Points to current character in buffer. */ 219static char *yy_c_buf_p = (char *) 0; 220static int yy_init = 1; /* whether we need to initialize */ 221static int yy_start = 0; /* start state number */ 222 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 ... 225 */ 226static int yy_did_buffer_switch_on_eof; 227 228void yyrestart YY_PROTO(( FILE *input_file )); 229 230void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); 231void yy_load_buffer_state YY_PROTO(( void )); 232YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); 233void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); 234void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); 235void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); 236#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) 237 238YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); 239YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); 240YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); 241 242static void *yy_flex_alloc YY_PROTO(( yy_size_t )); 243static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); 244static void yy_flex_free YY_PROTO(( void * )); 245 246#define yy_new_buffer yy_create_buffer 247 248#define yy_set_interactive(is_interactive) \ 249 { \ 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; \ 253 } 254 255#define yy_set_bol(at_bol) \ 256 { \ 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; \ 260 } 261 262#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) 263 264typedef unsigned char YY_CHAR; 265FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; 266typedef int yy_state_type; 267extern char *yytext; 268#define yytext_ptr yytext 269 270static yy_state_type yy_get_previous_state YY_PROTO(( void )); 271static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); 272static int yy_get_next_buffer YY_PROTO(( void )); 273static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); 274 275/* Done after the current pattern has been matched and before the 276 * corresponding action - sets up yytext. 277 */ 278#define YY_DO_BEFORE_ACTION \ 279 yytext_ptr = yy_bp; \ 280 yyleng = (int) (yy_cp - yy_bp); \ 281 yy_hold_char = *yy_cp; \ 282 *yy_cp = '\0'; \ 283 yy_c_buf_p = yy_cp; 284 285#define YY_NUM_RULES 41 286#define YY_END_OF_BUFFER 42 287static yyconst short int yy_accept[198] = 288 { 0, 289 0, 0, 42, 41, 34, 36, 35, 33, 41, 28, 290 41, 31, 40, 38, 27, 32, 37, 39, 28, 28, 291 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 292 28, 28, 28, 0, 29, 28, 0, 30, 31, 27, 293 32, 28, 28, 28, 28, 28, 28, 28, 28, 28, 294 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 295 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 296 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 297 28, 28, 28, 28, 28, 28, 12, 6, 28, 7, 298 28, 28, 28, 28, 28, 28, 28, 28, 1, 28, 299 300 28, 28, 16, 28, 28, 28, 28, 28, 28, 28, 301 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 302 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 303 17, 28, 28, 28, 28, 28, 28, 28, 28, 28, 304 28, 14, 28, 28, 28, 19, 21, 28, 28, 28, 305 28, 28, 28, 18, 9, 28, 10, 28, 28, 2, 306 28, 28, 15, 28, 28, 28, 28, 11, 13, 28, 307 5, 28, 28, 22, 28, 8, 28, 28, 28, 28, 308 28, 28, 20, 4, 28, 28, 28, 24, 28, 26, 309 28, 3, 28, 28, 23, 25, 0 310 311 } ; 312 313static yyconst int yy_ec[256] = 314 { 0, 315 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 316 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 317 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 318 1, 5, 1, 6, 1, 7, 1, 1, 8, 1, 319 1, 9, 1, 10, 7, 11, 12, 13, 13, 13, 320 13, 13, 13, 13, 13, 13, 13, 7, 14, 1, 321 15, 1, 7, 16, 17, 18, 19, 20, 21, 22, 322 23, 24, 25, 7, 26, 27, 28, 29, 30, 31, 323 7, 32, 33, 34, 35, 36, 37, 38, 39, 40, 324 1, 1, 1, 1, 7, 1, 22, 22, 22, 22, 325 326 22, 22, 7, 7, 7, 7, 7, 7, 7, 7, 327 7, 7, 7, 7, 7, 7, 7, 7, 7, 22, 328 7, 7, 1, 1, 1, 1, 1, 1, 1, 1, 329 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 330 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 331 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 332 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 333 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 334 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 335 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 336 337 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 338 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 339 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 340 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 341 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 342 1, 1, 1, 1, 1 343 } ; 344 345static yyconst int yy_meta[41] = 346 { 0, 347 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 348 1, 4, 5, 1, 1, 4, 6, 6, 6, 6, 349 6, 6, 3, 3, 3, 3, 3, 3, 3, 3, 350 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 351 } ; 352 353static yyconst short int yy_base[205] = 354 { 0, 355 0, 0, 229, 230, 230, 230, 230, 230, 222, 0, 356 219, 0, 230, 230, 0, 0, 230, 0, 209, 195, 357 24, 186, 202, 14, 197, 186, 27, 188, 198, 25, 358 197, 196, 184, 209, 230, 0, 206, 230, 0, 0, 359 0, 0, 180, 27, 178, 178, 27, 193, 178, 183, 360 189, 179, 177, 175, 178, 185, 182, 183, 170, 181, 361 165, 164, 170, 173, 172, 159, 174, 171, 170, 158, 362 156, 156, 151, 152, 149, 161, 34, 145, 160, 145, 363 146, 154, 157, 147, 141, 139, 0, 0, 138, 0, 364 139, 135, 137, 135, 135, 29, 149, 140, 0, 136, 365 366 139, 145, 0, 136, 139, 132, 132, 30, 132, 135, 367 138, 129, 119, 118, 126, 116, 122, 119, 115, 115, 368 124, 127, 109, 112, 121, 119, 106, 111, 108, 106, 369 0, 106, 103, 112, 99, 91, 97, 99, 95, 88, 370 99, 0, 93, 103, 94, 0, 0, 97, 91, 87, 371 90, 84, 83, 0, 0, 95, 0, 97, 80, 0, 372 92, 91, 0, 78, 70, 91, 74, 0, 0, 82, 373 0, 89, 88, 0, 84, 0, 82, 85, 83, 69, 374 66, 56, 0, 0, 39, 36, 35, 0, 44, 0, 375 43, 0, 40, 39, 0, 0, 230, 67, 71, 77, 376 377 83, 85, 91, 95 378 } ; 379 380static yyconst short int yy_def[205] = 381 { 0, 382 197, 1, 197, 197, 197, 197, 197, 197, 198, 199, 383 200, 201, 197, 197, 202, 203, 197, 204, 199, 199, 384 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 385 199, 199, 199, 198, 197, 199, 200, 197, 201, 202, 386 203, 199, 199, 199, 199, 199, 199, 199, 199, 199, 387 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 388 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 389 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 390 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 391 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 392 393 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 394 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 395 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 396 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 397 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 398 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 399 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 400 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 401 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, 402 199, 199, 199, 199, 199, 199, 0, 197, 197, 197, 403 404 197, 197, 197, 197 405 } ; 406 407static yyconst short int yy_nxt[271] = 408 { 0, 409 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 410 14, 4, 15, 16, 17, 18, 10, 19, 20, 21, 411 22, 10, 10, 23, 24, 10, 25, 26, 27, 10, 412 28, 29, 30, 31, 10, 32, 33, 10, 10, 10, 413 45, 49, 50, 53, 46, 57, 65, 69, 58, 59, 414 100, 117, 128, 118, 129, 66, 54, 70, 60, 196, 415 195, 194, 193, 192, 191, 190, 101, 34, 34, 34, 416 34, 34, 34, 36, 36, 36, 36, 37, 37, 37, 417 37, 37, 37, 39, 189, 39, 39, 39, 39, 40, 418 40, 41, 188, 41, 41, 41, 41, 42, 187, 186, 419 420 42, 185, 184, 183, 182, 181, 180, 179, 178, 177, 421 176, 175, 174, 173, 172, 171, 170, 169, 168, 167, 422 166, 165, 164, 163, 162, 161, 160, 159, 158, 157, 423 156, 155, 154, 153, 152, 151, 150, 149, 148, 147, 424 146, 145, 144, 143, 142, 141, 140, 139, 138, 137, 425 136, 135, 134, 133, 132, 131, 130, 127, 126, 125, 426 124, 123, 122, 121, 120, 119, 116, 115, 114, 113, 427 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 428 102, 99, 98, 97, 96, 95, 94, 93, 92, 91, 429 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 430 431 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 432 68, 67, 64, 38, 35, 63, 62, 61, 56, 55, 433 52, 51, 48, 47, 44, 43, 38, 35, 197, 3, 434 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 435 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 436 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 437 197, 197, 197, 197, 197, 197, 197, 197, 197, 197 438 } ; 439 440static yyconst short int yy_chk[271] = 441 { 0, 442 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 443 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 444 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 445 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 446 21, 24, 24, 27, 21, 30, 44, 47, 30, 30, 447 77, 96, 108, 96, 108, 44, 27, 47, 30, 194, 448 193, 191, 189, 187, 186, 185, 77, 198, 198, 198, 449 198, 198, 198, 199, 199, 199, 199, 200, 200, 200, 450 200, 200, 200, 201, 182, 201, 201, 201, 201, 202, 451 202, 203, 181, 203, 203, 203, 203, 204, 180, 179, 452 453 204, 178, 177, 175, 173, 172, 170, 167, 166, 165, 454 164, 162, 161, 159, 158, 156, 153, 152, 151, 150, 455 149, 148, 145, 144, 143, 141, 140, 139, 138, 137, 456 136, 135, 134, 133, 132, 130, 129, 128, 127, 126, 457 125, 124, 123, 122, 121, 120, 119, 118, 117, 116, 458 115, 114, 113, 112, 111, 110, 109, 107, 106, 105, 459 104, 102, 101, 100, 98, 97, 95, 94, 93, 92, 460 91, 89, 86, 85, 84, 83, 82, 81, 80, 79, 461 78, 76, 75, 74, 73, 72, 71, 70, 69, 68, 462 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 463 464 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 465 46, 45, 43, 37, 34, 33, 32, 31, 29, 28, 466 26, 25, 23, 22, 20, 19, 11, 9, 3, 197, 467 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 468 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 469 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 470 197, 197, 197, 197, 197, 197, 197, 197, 197, 197 471 } ; 472 473static yy_state_type yy_last_accepting_state; 474static char *yy_last_accepting_cpos; 475 476/* The intent behind this definition is that it'll catch 477 * any uses of REJECT which flex missed. 478 */ 479#define REJECT reject_used_but_not_detected 480#define yymore() yymore_used_but_not_detected 481#define YY_MORE_ADJ 0 482#define YY_RESTORE_YY_MORE_OFFSET 483char *yytext; 484#line 1 "deflex.l" 485#define INITIAL 0 486#line 2 "deflex.l" 487 488/* Copyright 1995, 1997, 1998, 1999, 2002, 2003, 2004, 2005 489 Free Software Foundation, Inc. 490 491 This file is part of GNU Binutils. 492 493 This program is free software; you can redistribute it and/or modify 494 it under the terms of the GNU General Public License as published by 495 the Free Software Foundation; either version 2 of the License, or 496 (at your option) any later version. 497 498 This program is distributed in the hope that it will be useful, 499 but WITHOUT ANY WARRANTY; without even the implied warranty of 500 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 501 GNU General Public License for more details. 502 503 You should have received a copy of the GNU General Public License 504 along with this program; if not, write to the Free Software 505 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ 506 507 508/* Contributed by Steve Chamberlain: sac@cygnus.com */ 509 510#define DONTDECLARE_MALLOC 511#include "libiberty.h" 512#include "defparse.h" 513#include "dlltool.h" 514 515#define YY_NO_UNPUT 516 517int linenumber; 518 519#line 520 "deflex.c" 520 521/* Macros after this point can all be overridden by user definitions in 522 * section 1. 523 */ 524 525#ifndef YY_SKIP_YYWRAP 526#ifdef __cplusplus 527extern "C" int yywrap YY_PROTO(( void )); 528#else 529extern int yywrap YY_PROTO(( void )); 530#endif 531#endif 532 533#ifndef YY_NO_UNPUT 534static void yyunput YY_PROTO(( int c, char *buf_ptr )); 535#endif 536 537#ifndef yytext_ptr 538static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); 539#endif 540 541#ifdef YY_NEED_STRLEN 542static int yy_flex_strlen YY_PROTO(( yyconst char * )); 543#endif 544 545#ifndef YY_NO_INPUT 546#ifdef __cplusplus 547static int yyinput YY_PROTO(( void )); 548#else 549static int input YY_PROTO(( void )); 550#endif 551#endif 552 553#if YY_STACK_USED 554static int yy_start_stack_ptr = 0; 555static int yy_start_stack_depth = 0; 556static int *yy_start_stack = 0; 557#ifndef YY_NO_PUSH_STATE 558static void yy_push_state YY_PROTO(( int new_state )); 559#endif 560#ifndef YY_NO_POP_STATE 561static void yy_pop_state YY_PROTO(( void )); 562#endif 563#ifndef YY_NO_TOP_STATE 564static int yy_top_state YY_PROTO(( void )); 565#endif 566 567#else 568#define YY_NO_PUSH_STATE 1 569#define YY_NO_POP_STATE 1 570#define YY_NO_TOP_STATE 1 571#endif 572 573#ifdef YY_MALLOC_DECL 574YY_MALLOC_DECL 575#else 576#if __STDC__ 577#ifndef __cplusplus 578#include <stdlib.h> 579#endif 580#else 581/* Just try to get by without declaring the routines. This will fail 582 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) 583 * or sizeof(void*) != sizeof(int). 584 */ 585#endif 586#endif 587 588/* Amount of stuff to slurp up with each read. */ 589#ifndef YY_READ_BUF_SIZE 590#define YY_READ_BUF_SIZE 8192 591#endif 592 593/* Copy whatever the last rule matched to the standard output. */ 594 595#ifndef ECHO 596/* This used to be an fputs(), but since the string might contain NUL's, 597 * we now use fwrite(). 598 */ 599#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) 600#endif 601 602/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, 603 * is returned in "result". 604 */ 605#ifndef YY_INPUT 606#define YY_INPUT(buf,result,max_size) \ 607 if ( yy_current_buffer->yy_is_interactive ) \ 608 { \ 609 int c = '*', n; \ 610 for ( n = 0; n < max_size && \ 611 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ 612 buf[n] = (char) c; \ 613 if ( c == '\n' ) \ 614 buf[n++] = (char) c; \ 615 if ( c == EOF && ferror( yyin ) ) \ 616 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 617 result = n; \ 618 } \ 619 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ 620 && ferror( yyin ) ) \ 621 YY_FATAL_ERROR( "input in flex scanner failed" ); 622#endif 623 624/* No semi-colon after return; correct usage is to write "yyterminate();" - 625 * we don't want an extra ';' after the "return" because that will cause 626 * some compilers to complain about unreachable statements. 627 */ 628#ifndef yyterminate 629#define yyterminate() return YY_NULL 630#endif 631 632/* Number of entries by which start-condition stack grows. */ 633#ifndef YY_START_STACK_INCR 634#define YY_START_STACK_INCR 25 635#endif 636 637/* Report a fatal error. */ 638#ifndef YY_FATAL_ERROR 639#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) 640#endif 641 642/* Default declaration of generated scanner - a define so the user can 643 * easily add parameters. 644 */ 645#ifndef YY_DECL 646#define YY_DECL int yylex YY_PROTO(( void )) 647#endif 648 649/* Code executed at the beginning of each rule, after yytext and yyleng 650 * have been set up. 651 */ 652#ifndef YY_USER_ACTION 653#define YY_USER_ACTION 654#endif 655 656/* Code executed at the end of each rule. */ 657#ifndef YY_BREAK 658#define YY_BREAK break; 659#endif 660 661#define YY_RULE_SETUP \ 662 YY_USER_ACTION 663 664YY_DECL 665 { 666 register yy_state_type yy_current_state; 667 register char *yy_cp = NULL, *yy_bp = NULL; 668 register int yy_act; 669 670#line 35 "deflex.l" 671 672#line 673 "deflex.c" 673 674 if ( yy_init ) 675 { 676 yy_init = 0; 677 678#ifdef YY_USER_INIT 679 YY_USER_INIT; 680#endif 681 682 if ( ! yy_start ) 683 yy_start = 1; /* first start state */ 684 685 if ( ! yyin ) 686 yyin = stdin; 687 688 if ( ! yyout ) 689 yyout = stdout; 690 691 if ( ! yy_current_buffer ) 692 yy_current_buffer = 693 yy_create_buffer( yyin, YY_BUF_SIZE ); 694 695 yy_load_buffer_state(); 696 } 697 698 while ( 1 ) /* loops until end-of-file is reached */ 699 { 700 yy_cp = yy_c_buf_p; 701 702 /* Support of yytext. */ 703 *yy_cp = yy_hold_char; 704 705 /* yy_bp points to the position in yy_ch_buf of the start of 706 * the current run. 707 */ 708 yy_bp = yy_cp; 709 710 yy_current_state = yy_start; 711yy_match: 712 do 713 { 714 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; 715 if ( yy_accept[yy_current_state] ) 716 { 717 yy_last_accepting_state = yy_current_state; 718 yy_last_accepting_cpos = yy_cp; 719 } 720 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 721 { 722 yy_current_state = (int) yy_def[yy_current_state]; 723 if ( yy_current_state >= 198 ) 724 yy_c = yy_meta[(unsigned int) yy_c]; 725 } 726 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 727 ++yy_cp; 728 } 729 while ( yy_base[yy_current_state] != 230 ); 730 731yy_find_action: 732 yy_act = yy_accept[yy_current_state]; 733 if ( yy_act == 0 ) 734 { /* have to back up */ 735 yy_cp = yy_last_accepting_cpos; 736 yy_current_state = yy_last_accepting_state; 737 yy_act = yy_accept[yy_current_state]; 738 } 739 740 YY_DO_BEFORE_ACTION; 741 742 743do_action: /* This label is used only to access EOF actions. */ 744 745 746 switch ( yy_act ) 747 { /* beginning of action switch */ 748 case 0: /* must back up */ 749 /* undo the effects of YY_DO_BEFORE_ACTION */ 750 *yy_cp = yy_hold_char; 751 yy_cp = yy_last_accepting_cpos; 752 yy_current_state = yy_last_accepting_state; 753 goto yy_find_action; 754 755case 1: 756YY_RULE_SETUP 757#line 36 "deflex.l" 758{ return NAME;} 759 YY_BREAK 760case 2: 761YY_RULE_SETUP 762#line 37 "deflex.l" 763{ return LIBRARY;} 764 YY_BREAK 765case 3: 766YY_RULE_SETUP 767#line 38 "deflex.l" 768{ return DESCRIPTION;} 769 YY_BREAK 770case 4: 771YY_RULE_SETUP 772#line 39 "deflex.l" 773{ return STACKSIZE;} 774 YY_BREAK 775case 5: 776YY_RULE_SETUP 777#line 40 "deflex.l" 778{ return HEAPSIZE;} 779 YY_BREAK 780case 6: 781YY_RULE_SETUP 782#line 41 "deflex.l" 783{ return CODE;} 784 YY_BREAK 785case 7: 786YY_RULE_SETUP 787#line 42 "deflex.l" 788{ return DATA;} 789 YY_BREAK 790case 8: 791YY_RULE_SETUP 792#line 43 "deflex.l" 793{ return SECTIONS;} 794 YY_BREAK 795case 9: 796YY_RULE_SETUP 797#line 44 "deflex.l" 798{ return EXPORTS;} 799 YY_BREAK 800case 10: 801YY_RULE_SETUP 802#line 45 "deflex.l" 803{ return IMPORTS;} 804 YY_BREAK 805case 11: 806YY_RULE_SETUP 807#line 46 "deflex.l" 808{ return VERSIONK;} 809 YY_BREAK 810case 12: 811YY_RULE_SETUP 812#line 47 "deflex.l" 813{ return BASE;} 814 YY_BREAK 815case 13: 816YY_RULE_SETUP 817#line 48 "deflex.l" 818{ return CONSTANT; } 819 YY_BREAK 820case 14: 821YY_RULE_SETUP 822#line 49 "deflex.l" 823{ return NONAME; } 824 YY_BREAK 825case 15: 826YY_RULE_SETUP 827#line 50 "deflex.l" 828{ return PRIVATE; } 829 YY_BREAK 830case 16: 831YY_RULE_SETUP 832#line 51 "deflex.l" 833{ return READ;} 834 YY_BREAK 835case 17: 836YY_RULE_SETUP 837#line 52 "deflex.l" 838{ return WRITE;} 839 YY_BREAK 840case 18: 841YY_RULE_SETUP 842#line 53 "deflex.l" 843{ return EXECUTE;} 844 YY_BREAK 845case 19: 846YY_RULE_SETUP 847#line 54 "deflex.l" 848{ return SHARED;} 849 YY_BREAK 850case 20: 851YY_RULE_SETUP 852#line 55 "deflex.l" 853{ return NONSHARED;} 854 YY_BREAK 855case 21: 856YY_RULE_SETUP 857#line 56 "deflex.l" 858{ return SINGLE;} 859 YY_BREAK 860case 22: 861YY_RULE_SETUP 862#line 57 "deflex.l" 863{ return MULTIPLE;} 864 YY_BREAK 865case 23: 866YY_RULE_SETUP 867#line 58 "deflex.l" 868{ return INITINSTANCE;} 869 YY_BREAK 870case 24: 871YY_RULE_SETUP 872#line 59 "deflex.l" 873{ return INITGLOBAL;} 874 YY_BREAK 875case 25: 876YY_RULE_SETUP 877#line 60 "deflex.l" 878{ return TERMINSTANCE;} 879 YY_BREAK 880case 26: 881YY_RULE_SETUP 882#line 61 "deflex.l" 883{ return TERMGLOBAL;} 884 YY_BREAK 885case 27: 886YY_RULE_SETUP 887#line 63 "deflex.l" 888{ yylval.number = strtol (yytext,0,0); 889 return NUMBER; } 890 YY_BREAK 891case 28: 892YY_RULE_SETUP 893#line 66 "deflex.l" 894{ 895 yylval.id = xstrdup (yytext); 896 return ID; 897 } 898 YY_BREAK 899case 29: 900YY_RULE_SETUP 901#line 71 "deflex.l" 902{ 903 yylval.id = xstrdup (yytext+1); 904 yylval.id[yyleng-2] = 0; 905 return ID; 906 } 907 YY_BREAK 908case 30: 909YY_RULE_SETUP 910#line 77 "deflex.l" 911{ 912 yylval.id = xstrdup (yytext+1); 913 yylval.id[yyleng-2] = 0; 914 return ID; 915 } 916 YY_BREAK 917case 31: 918YY_RULE_SETUP 919#line 82 "deflex.l" 920{ } 921 YY_BREAK 922case 32: 923YY_RULE_SETUP 924#line 83 "deflex.l" 925{ } 926 YY_BREAK 927case 33: 928YY_RULE_SETUP 929#line 84 "deflex.l" 930{ } 931 YY_BREAK 932case 34: 933YY_RULE_SETUP 934#line 85 "deflex.l" 935{ } 936 YY_BREAK 937case 35: 938YY_RULE_SETUP 939#line 86 "deflex.l" 940{ } 941 YY_BREAK 942case 36: 943YY_RULE_SETUP 944#line 87 "deflex.l" 945{ linenumber ++ ;} 946 YY_BREAK 947case 37: 948YY_RULE_SETUP 949#line 88 "deflex.l" 950{ return '=';} 951 YY_BREAK 952case 38: 953YY_RULE_SETUP 954#line 89 "deflex.l" 955{ return '.';} 956 YY_BREAK 957case 39: 958YY_RULE_SETUP 959#line 90 "deflex.l" 960{ return '@';} 961 YY_BREAK 962case 40: 963YY_RULE_SETUP 964#line 91 "deflex.l" 965{ return ',';} 966 YY_BREAK 967case 41: 968YY_RULE_SETUP 969#line 92 "deflex.l" 970ECHO; 971 YY_BREAK 972#line 973 "deflex.c" 973case YY_STATE_EOF(INITIAL): 974 yyterminate(); 975 976 case YY_END_OF_BUFFER: 977 { 978 /* Amount of text matched not including the EOB char. */ 979 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; 980 981 /* Undo the effects of YY_DO_BEFORE_ACTION. */ 982 *yy_cp = yy_hold_char; 983 YY_RESTORE_YY_MORE_OFFSET 984 985 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) 986 { 987 /* We're scanning a new file or input source. It's 988 * possible that this happened because the user 989 * just pointed yyin at a new source and called 990 * yylex(). If so, then we have to assure 991 * consistency between yy_current_buffer and our 992 * globals. Here is the right place to do so, because 993 * this is the first action (other than possibly a 994 * back-up) that will match for the new input source. 995 */ 996 yy_n_chars = yy_current_buffer->yy_n_chars; 997 yy_current_buffer->yy_input_file = yyin; 998 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; 999 } 1000 1001 /* Note that here we test for yy_c_buf_p "<=" to the position 1002 * of the first EOB in the buffer, since yy_c_buf_p will 1003 * already have been incremented past the NUL character 1004 * (since all states make transitions on EOB to the 1005 * end-of-buffer state). Contrast this with the test 1006 * in input(). 1007 */ 1008 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) 1009 { /* This was really a NUL. */ 1010 yy_state_type yy_next_state; 1011 1012 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; 1013 1014 yy_current_state = yy_get_previous_state(); 1015 1016 /* Okay, we're now positioned to make the NUL 1017 * transition. We couldn't have 1018 * yy_get_previous_state() go ahead and do it 1019 * for us because it doesn't know how to deal 1020 * with the possibility of jamming (and we don't 1021 * want to build jamming into it because then it 1022 * will run more slowly). 1023 */ 1024 1025 yy_next_state = yy_try_NUL_trans( yy_current_state ); 1026 1027 yy_bp = yytext_ptr + YY_MORE_ADJ; 1028 1029 if ( yy_next_state ) 1030 { 1031 /* Consume the NUL. */ 1032 yy_cp = ++yy_c_buf_p; 1033 yy_current_state = yy_next_state; 1034 goto yy_match; 1035 } 1036 1037 else 1038 { 1039 yy_cp = yy_c_buf_p; 1040 goto yy_find_action; 1041 } 1042 } 1043 1044 else switch ( yy_get_next_buffer() ) 1045 { 1046 case EOB_ACT_END_OF_FILE: 1047 { 1048 yy_did_buffer_switch_on_eof = 0; 1049 1050 if ( yywrap() ) 1051 { 1052 /* Note: because we've taken care in 1053 * yy_get_next_buffer() to have set up 1054 * yytext, we can now set up 1055 * yy_c_buf_p so that if some total 1056 * hoser (like flex itself) wants to 1057 * call the scanner after we return the 1058 * YY_NULL, it'll still work - another 1059 * YY_NULL will get returned. 1060 */ 1061 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; 1062 1063 yy_act = YY_STATE_EOF(YY_START); 1064 goto do_action; 1065 } 1066 1067 else 1068 { 1069 if ( ! yy_did_buffer_switch_on_eof ) 1070 YY_NEW_FILE; 1071 } 1072 break; 1073 } 1074 1075 case EOB_ACT_CONTINUE_SCAN: 1076 yy_c_buf_p = 1077 yytext_ptr + yy_amount_of_matched_text; 1078 1079 yy_current_state = yy_get_previous_state(); 1080 1081 yy_cp = yy_c_buf_p; 1082 yy_bp = yytext_ptr + YY_MORE_ADJ; 1083 goto yy_match; 1084 1085 case EOB_ACT_LAST_MATCH: 1086 yy_c_buf_p = 1087 &yy_current_buffer->yy_ch_buf[yy_n_chars]; 1088 1089 yy_current_state = yy_get_previous_state(); 1090 1091 yy_cp = yy_c_buf_p; 1092 yy_bp = yytext_ptr + YY_MORE_ADJ; 1093 goto yy_find_action; 1094 } 1095 break; 1096 } 1097 1098 default: 1099 YY_FATAL_ERROR( 1100 "fatal flex scanner internal error--no action found" ); 1101 } /* end of action switch */ 1102 } /* end of scanning one token */ 1103 } /* end of yylex */ 1104 1105 1106/* yy_get_next_buffer - try to read in a new buffer 1107 * 1108 * Returns a code representing an action: 1109 * EOB_ACT_LAST_MATCH - 1110 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position 1111 * EOB_ACT_END_OF_FILE - end of file 1112 */ 1113 1114static int yy_get_next_buffer() 1115 { 1116 register char *dest = yy_current_buffer->yy_ch_buf; 1117 register char *source = yytext_ptr; 1118 register int number_to_move, i; 1119 int ret_val; 1120 1121 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) 1122 YY_FATAL_ERROR( 1123 "fatal flex scanner internal error--end of buffer missed" ); 1124 1125 if ( yy_current_buffer->yy_fill_buffer == 0 ) 1126 { /* Don't try to fill the buffer, so this is an EOF. */ 1127 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) 1128 { 1129 /* We matched a single character, the EOB, so 1130 * treat this as a final EOF. 1131 */ 1132 return EOB_ACT_END_OF_FILE; 1133 } 1134 1135 else 1136 { 1137 /* We matched some text prior to the EOB, first 1138 * process it. 1139 */ 1140 return EOB_ACT_LAST_MATCH; 1141 } 1142 } 1143 1144 /* Try to read more data. */ 1145 1146 /* First move last chars to start of buffer. */ 1147 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; 1148 1149 for ( i = 0; i < number_to_move; ++i ) 1150 *(dest++) = *(source++); 1151 1152 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 1153 /* don't do the read, it's not guaranteed to return an EOF, 1154 * just force an EOF 1155 */ 1156 yy_current_buffer->yy_n_chars = yy_n_chars = 0; 1157 1158 else 1159 { 1160 int num_to_read = 1161 yy_current_buffer->yy_buf_size - number_to_move - 1; 1162 1163 while ( num_to_read <= 0 ) 1164 { /* Not enough room in the buffer - grow it. */ 1165#ifdef YY_USES_REJECT 1166 YY_FATAL_ERROR( 1167"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); 1168#else 1169 1170 /* just a shorter name for the current buffer */ 1171 YY_BUFFER_STATE b = yy_current_buffer; 1172 1173 int yy_c_buf_p_offset = 1174 (int) (yy_c_buf_p - b->yy_ch_buf); 1175 1176 if ( b->yy_is_our_buffer ) 1177 { 1178 int new_size = b->yy_buf_size * 2; 1179 1180 if ( new_size <= 0 ) 1181 b->yy_buf_size += b->yy_buf_size / 8; 1182 else 1183 b->yy_buf_size *= 2; 1184 1185 b->yy_ch_buf = (char *) 1186 /* Include room in for 2 EOB chars. */ 1187 yy_flex_realloc( (void *) b->yy_ch_buf, 1188 b->yy_buf_size + 2 ); 1189 } 1190 else 1191 /* Can't grow it, we don't own it. */ 1192 b->yy_ch_buf = 0; 1193 1194 if ( ! b->yy_ch_buf ) 1195 YY_FATAL_ERROR( 1196 "fatal error - scanner input buffer overflow" ); 1197 1198 yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; 1199 1200 num_to_read = yy_current_buffer->yy_buf_size - 1201 number_to_move - 1; 1202#endif 1203 } 1204 1205 if ( num_to_read > YY_READ_BUF_SIZE ) 1206 num_to_read = YY_READ_BUF_SIZE; 1207 1208 /* Read in more data. */ 1209 YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), 1210 yy_n_chars, num_to_read ); 1211 1212 yy_current_buffer->yy_n_chars = yy_n_chars; 1213 } 1214 1215 if ( yy_n_chars == 0 ) 1216 { 1217 if ( number_to_move == YY_MORE_ADJ ) 1218 { 1219 ret_val = EOB_ACT_END_OF_FILE; 1220 yyrestart( yyin ); 1221 } 1222 1223 else 1224 { 1225 ret_val = EOB_ACT_LAST_MATCH; 1226 yy_current_buffer->yy_buffer_status = 1227 YY_BUFFER_EOF_PENDING; 1228 } 1229 } 1230 1231 else 1232 ret_val = EOB_ACT_CONTINUE_SCAN; 1233 1234 yy_n_chars += number_to_move; 1235 yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; 1236 yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; 1237 1238 yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; 1239 1240 return ret_val; 1241 } 1242 1243 1244/* yy_get_previous_state - get the state just before the EOB char was reached */ 1245 1246static yy_state_type yy_get_previous_state() 1247 { 1248 register yy_state_type yy_current_state; 1249 register char *yy_cp; 1250 1251 yy_current_state = yy_start; 1252 1253 for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) 1254 { 1255 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); 1256 if ( yy_accept[yy_current_state] ) 1257 { 1258 yy_last_accepting_state = yy_current_state; 1259 yy_last_accepting_cpos = yy_cp; 1260 } 1261 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 1262 { 1263 yy_current_state = (int) yy_def[yy_current_state]; 1264 if ( yy_current_state >= 198 ) 1265 yy_c = yy_meta[(unsigned int) yy_c]; 1266 } 1267 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 1268 } 1269 1270 return yy_current_state; 1271 } 1272 1273 1274/* yy_try_NUL_trans - try to make a transition on the NUL character 1275 * 1276 * synopsis 1277 * next_state = yy_try_NUL_trans( current_state ); 1278 */ 1279 1280#ifdef YY_USE_PROTOS 1281static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) 1282#else 1283static yy_state_type yy_try_NUL_trans( yy_current_state ) 1284yy_state_type yy_current_state; 1285#endif 1286 { 1287 register int yy_is_jam; 1288 register char *yy_cp = yy_c_buf_p; 1289 1290 register YY_CHAR yy_c = 1; 1291 if ( yy_accept[yy_current_state] ) 1292 { 1293 yy_last_accepting_state = yy_current_state; 1294 yy_last_accepting_cpos = yy_cp; 1295 } 1296 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 1297 { 1298 yy_current_state = (int) yy_def[yy_current_state]; 1299 if ( yy_current_state >= 198 ) 1300 yy_c = yy_meta[(unsigned int) yy_c]; 1301 } 1302 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 1303 yy_is_jam = (yy_current_state == 197); 1304 1305 return yy_is_jam ? 0 : yy_current_state; 1306 } 1307 1308 1309#ifndef YY_NO_UNPUT 1310#ifdef YY_USE_PROTOS 1311static void yyunput( int c, register char *yy_bp ) 1312#else 1313static void yyunput( c, yy_bp ) 1314int c; 1315register char *yy_bp; 1316#endif 1317 { 1318 register char *yy_cp = yy_c_buf_p; 1319 1320 /* undo effects of setting up yytext */ 1321 *yy_cp = yy_hold_char; 1322 1323 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) 1324 { /* need to shift things up to make room */ 1325 /* +2 for EOB chars. */ 1326 register int number_to_move = yy_n_chars + 2; 1327 register char *dest = &yy_current_buffer->yy_ch_buf[ 1328 yy_current_buffer->yy_buf_size + 2]; 1329 register char *source = 1330 &yy_current_buffer->yy_ch_buf[number_to_move]; 1331 1332 while ( source > yy_current_buffer->yy_ch_buf ) 1333 *--dest = *--source; 1334 1335 yy_cp += (int) (dest - source); 1336 yy_bp += (int) (dest - source); 1337 yy_current_buffer->yy_n_chars = 1338 yy_n_chars = yy_current_buffer->yy_buf_size; 1339 1340 if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) 1341 YY_FATAL_ERROR( "flex scanner push-back overflow" ); 1342 } 1343 1344 *--yy_cp = (char) c; 1345 1346 1347 yytext_ptr = yy_bp; 1348 yy_hold_char = *yy_cp; 1349 yy_c_buf_p = yy_cp; 1350 } 1351#endif /* ifndef YY_NO_UNPUT */ 1352 1353 1354#ifndef YY_NO_INPUT 1355#ifdef __cplusplus 1356static int yyinput() 1357#else 1358static int input() 1359#endif 1360 { 1361 int c; 1362 1363 *yy_c_buf_p = yy_hold_char; 1364 1365 if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) 1366 { 1367 /* yy_c_buf_p now points to the character we want to return. 1368 * If this occurs *before* the EOB characters, then it's a 1369 * valid NUL; if not, then we've hit the end of the buffer. 1370 */ 1371 if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) 1372 /* This was really a NUL. */ 1373 *yy_c_buf_p = '\0'; 1374 1375 else 1376 { /* need more input */ 1377 int offset = yy_c_buf_p - yytext_ptr; 1378 ++yy_c_buf_p; 1379 1380 switch ( yy_get_next_buffer() ) 1381 { 1382 case EOB_ACT_LAST_MATCH: 1383 /* This happens because yy_g_n_b() 1384 * sees that we've accumulated a 1385 * token and flags that we need to 1386 * try matching the token before 1387 * proceeding. But for input(), 1388 * there's no matching to consider. 1389 * So convert the EOB_ACT_LAST_MATCH 1390 * to EOB_ACT_END_OF_FILE. 1391 */ 1392 1393 /* Reset buffer status. */ 1394 yyrestart( yyin ); 1395 1396 /* fall through */ 1397 1398 case EOB_ACT_END_OF_FILE: 1399 { 1400 if ( yywrap() ) 1401 return EOF; 1402 1403 if ( ! yy_did_buffer_switch_on_eof ) 1404 YY_NEW_FILE; 1405#ifdef __cplusplus 1406 return yyinput(); 1407#else 1408 return input(); 1409#endif 1410 } 1411 1412 case EOB_ACT_CONTINUE_SCAN: 1413 yy_c_buf_p = yytext_ptr + offset; 1414 break; 1415 } 1416 } 1417 } 1418 1419 c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ 1420 *yy_c_buf_p = '\0'; /* preserve yytext */ 1421 yy_hold_char = *++yy_c_buf_p; 1422 1423 1424 return c; 1425 } 1426#endif /* YY_NO_INPUT */ 1427 1428#ifdef YY_USE_PROTOS 1429void yyrestart( FILE *input_file ) 1430#else 1431void yyrestart( input_file ) 1432FILE *input_file; 1433#endif 1434 { 1435 if ( ! yy_current_buffer ) 1436 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); 1437 1438 yy_init_buffer( yy_current_buffer, input_file ); 1439 yy_load_buffer_state(); 1440 } 1441 1442 1443#ifdef YY_USE_PROTOS 1444void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) 1445#else 1446void yy_switch_to_buffer( new_buffer ) 1447YY_BUFFER_STATE new_buffer; 1448#endif 1449 { 1450 if ( yy_current_buffer == new_buffer ) 1451 return; 1452 1453 if ( yy_current_buffer ) 1454 { 1455 /* Flush out information for old buffer. */ 1456 *yy_c_buf_p = yy_hold_char; 1457 yy_current_buffer->yy_buf_pos = yy_c_buf_p; 1458 yy_current_buffer->yy_n_chars = yy_n_chars; 1459 } 1460 1461 yy_current_buffer = new_buffer; 1462 yy_load_buffer_state(); 1463 1464 /* We don't actually know whether we did this switch during 1465 * EOF (yywrap()) processing, but the only time this flag 1466 * is looked at is after yywrap() is called, so it's safe 1467 * to go ahead and always set it. 1468 */ 1469 yy_did_buffer_switch_on_eof = 1; 1470 } 1471 1472 1473#ifdef YY_USE_PROTOS 1474void yy_load_buffer_state( void ) 1475#else 1476void yy_load_buffer_state() 1477#endif 1478 { 1479 yy_n_chars = yy_current_buffer->yy_n_chars; 1480 yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; 1481 yyin = yy_current_buffer->yy_input_file; 1482 yy_hold_char = *yy_c_buf_p; 1483 } 1484 1485 1486#ifdef YY_USE_PROTOS 1487YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) 1488#else 1489YY_BUFFER_STATE yy_create_buffer( file, size ) 1490FILE *file; 1491int size; 1492#endif 1493 { 1494 YY_BUFFER_STATE b; 1495 1496 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); 1497 if ( ! b ) 1498 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 1499 1500 b->yy_buf_size = size; 1501 1502 /* yy_ch_buf has to be 2 characters longer than the size given because 1503 * we need to put in 2 end-of-buffer characters. 1504 */ 1505 b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); 1506 if ( ! b->yy_ch_buf ) 1507 YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 1508 1509 b->yy_is_our_buffer = 1; 1510 1511 yy_init_buffer( b, file ); 1512 1513 return b; 1514 } 1515 1516 1517#ifdef YY_USE_PROTOS 1518void yy_delete_buffer( YY_BUFFER_STATE b ) 1519#else 1520void yy_delete_buffer( b ) 1521YY_BUFFER_STATE b; 1522#endif 1523 { 1524 if ( ! b ) 1525 return; 1526 1527 if ( b == yy_current_buffer ) 1528 yy_current_buffer = (YY_BUFFER_STATE) 0; 1529 1530 if ( b->yy_is_our_buffer ) 1531 yy_flex_free( (void *) b->yy_ch_buf ); 1532 1533 yy_flex_free( (void *) b ); 1534 } 1535 1536 1537 1538#ifdef YY_USE_PROTOS 1539void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) 1540#else 1541void yy_init_buffer( b, file ) 1542YY_BUFFER_STATE b; 1543FILE *file; 1544#endif 1545 1546 1547 { 1548 yy_flush_buffer( b ); 1549 1550 b->yy_input_file = file; 1551 b->yy_fill_buffer = 1; 1552 1553#if YY_ALWAYS_INTERACTIVE 1554 b->yy_is_interactive = 1; 1555#else 1556#if YY_NEVER_INTERACTIVE 1557 b->yy_is_interactive = 0; 1558#else 1559 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; 1560#endif 1561#endif 1562 } 1563 1564 1565#ifdef YY_USE_PROTOS 1566void yy_flush_buffer( YY_BUFFER_STATE b ) 1567#else 1568void yy_flush_buffer( b ) 1569YY_BUFFER_STATE b; 1570#endif 1571 1572 { 1573 if ( ! b ) 1574 return; 1575 1576 b->yy_n_chars = 0; 1577 1578 /* We always need two end-of-buffer characters. The first causes 1579 * a transition to the end-of-buffer state. The second causes 1580 * a jam in that state. 1581 */ 1582 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; 1583 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; 1584 1585 b->yy_buf_pos = &b->yy_ch_buf[0]; 1586 1587 b->yy_at_bol = 1; 1588 b->yy_buffer_status = YY_BUFFER_NEW; 1589 1590 if ( b == yy_current_buffer ) 1591 yy_load_buffer_state(); 1592 } 1593 1594 1595#ifndef YY_NO_SCAN_BUFFER 1596#ifdef YY_USE_PROTOS 1597YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) 1598#else 1599YY_BUFFER_STATE yy_scan_buffer( base, size ) 1600char *base; 1601yy_size_t size; 1602#endif 1603 { 1604 YY_BUFFER_STATE b; 1605 1606 if ( size < 2 || 1607 base[size-2] != YY_END_OF_BUFFER_CHAR || 1608 base[size-1] != YY_END_OF_BUFFER_CHAR ) 1609 /* They forgot to leave room for the EOB's. */ 1610 return 0; 1611 1612 b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); 1613 if ( ! b ) 1614 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); 1615 1616 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ 1617 b->yy_buf_pos = b->yy_ch_buf = base; 1618 b->yy_is_our_buffer = 0; 1619 b->yy_input_file = 0; 1620 b->yy_n_chars = b->yy_buf_size; 1621 b->yy_is_interactive = 0; 1622 b->yy_at_bol = 1; 1623 b->yy_fill_buffer = 0; 1624 b->yy_buffer_status = YY_BUFFER_NEW; 1625 1626 yy_switch_to_buffer( b ); 1627 1628 return b; 1629 } 1630#endif 1631 1632 1633#ifndef YY_NO_SCAN_STRING 1634#ifdef YY_USE_PROTOS 1635YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) 1636#else 1637YY_BUFFER_STATE yy_scan_string( yy_str ) 1638yyconst char *yy_str; 1639#endif 1640 { 1641 int len; 1642 for ( len = 0; yy_str[len]; ++len ) 1643 ; 1644 1645 return yy_scan_bytes( yy_str, len ); 1646 } 1647#endif 1648 1649 1650#ifndef YY_NO_SCAN_BYTES 1651#ifdef YY_USE_PROTOS 1652YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) 1653#else 1654YY_BUFFER_STATE yy_scan_bytes( bytes, len ) 1655yyconst char *bytes; 1656int len; 1657#endif 1658 { 1659 YY_BUFFER_STATE b; 1660 char *buf; 1661 yy_size_t n; 1662 int i; 1663 1664 /* Get memory for full buffer, including space for trailing EOB's. */ 1665 n = len + 2; 1666 buf = (char *) yy_flex_alloc( n ); 1667 if ( ! buf ) 1668 YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); 1669 1670 for ( i = 0; i < len; ++i ) 1671 buf[i] = bytes[i]; 1672 1673 buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; 1674 1675 b = yy_scan_buffer( buf, n ); 1676 if ( ! b ) 1677 YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); 1678 1679 /* It's okay to grow etc. this buffer, and we should throw it 1680 * away when we're done. 1681 */ 1682 b->yy_is_our_buffer = 1; 1683 1684 return b; 1685 } 1686#endif 1687 1688 1689#ifndef YY_NO_PUSH_STATE 1690#ifdef YY_USE_PROTOS 1691static void yy_push_state( int new_state ) 1692#else 1693static void yy_push_state( new_state ) 1694int new_state; 1695#endif 1696 { 1697 if ( yy_start_stack_ptr >= yy_start_stack_depth ) 1698 { 1699 yy_size_t new_size; 1700 1701 yy_start_stack_depth += YY_START_STACK_INCR; 1702 new_size = yy_start_stack_depth * sizeof( int ); 1703 1704 if ( ! yy_start_stack ) 1705 yy_start_stack = (int *) yy_flex_alloc( new_size ); 1706 1707 else 1708 yy_start_stack = (int *) yy_flex_realloc( 1709 (void *) yy_start_stack, new_size ); 1710 1711 if ( ! yy_start_stack ) 1712 YY_FATAL_ERROR( 1713 "out of memory expanding start-condition stack" ); 1714 } 1715 1716 yy_start_stack[yy_start_stack_ptr++] = YY_START; 1717 1718 BEGIN(new_state); 1719 } 1720#endif 1721 1722 1723#ifndef YY_NO_POP_STATE 1724static void yy_pop_state() 1725 { 1726 if ( --yy_start_stack_ptr < 0 ) 1727 YY_FATAL_ERROR( "start-condition stack underflow" ); 1728 1729 BEGIN(yy_start_stack[yy_start_stack_ptr]); 1730 } 1731#endif 1732 1733 1734#ifndef YY_NO_TOP_STATE 1735static int yy_top_state() 1736 { 1737 return yy_start_stack[yy_start_stack_ptr - 1]; 1738 } 1739#endif 1740 1741#ifndef YY_EXIT_FAILURE 1742#define YY_EXIT_FAILURE 2 1743#endif 1744 1745#ifdef YY_USE_PROTOS 1746static void yy_fatal_error( yyconst char msg[] ) 1747#else 1748static void yy_fatal_error( msg ) 1749char msg[]; 1750#endif 1751 { 1752 (void) fprintf( stderr, "%s\n", msg ); 1753 exit( YY_EXIT_FAILURE ); 1754 } 1755 1756 1757 1758/* Redefine yyless() so it works in section 3 code. */ 1759 1760#undef yyless 1761#define yyless(n) \ 1762 do \ 1763 { \ 1764 /* Undo effects of setting up yytext. */ \ 1765 yytext[yyleng] = yy_hold_char; \ 1766 yy_c_buf_p = yytext + n; \ 1767 yy_hold_char = *yy_c_buf_p; \ 1768 *yy_c_buf_p = '\0'; \ 1769 yyleng = n; \ 1770 } \ 1771 while ( 0 ) 1772 1773 1774/* Internal utility routines. */ 1775 1776#ifndef yytext_ptr 1777#ifdef YY_USE_PROTOS 1778static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) 1779#else 1780static void yy_flex_strncpy( s1, s2, n ) 1781char *s1; 1782yyconst char *s2; 1783int n; 1784#endif 1785 { 1786 register int i; 1787 for ( i = 0; i < n; ++i ) 1788 s1[i] = s2[i]; 1789 } 1790#endif 1791 1792#ifdef YY_NEED_STRLEN 1793#ifdef YY_USE_PROTOS 1794static int yy_flex_strlen( yyconst char *s ) 1795#else 1796static int yy_flex_strlen( s ) 1797yyconst char *s; 1798#endif 1799 { 1800 register int n; 1801 for ( n = 0; s[n]; ++n ) 1802 ; 1803 1804 return n; 1805 } 1806#endif 1807 1808 1809#ifdef YY_USE_PROTOS 1810static void *yy_flex_alloc( yy_size_t size ) 1811#else 1812static void *yy_flex_alloc( size ) 1813yy_size_t size; 1814#endif 1815 { 1816 return (void *) malloc( size ); 1817 } 1818 1819#ifdef YY_USE_PROTOS 1820static void *yy_flex_realloc( void *ptr, yy_size_t size ) 1821#else 1822static void *yy_flex_realloc( ptr, size ) 1823void *ptr; 1824yy_size_t size; 1825#endif 1826 { 1827 /* The cast to (char *) in the following accommodates both 1828 * implementations that use char* generic pointers, and those 1829 * that use void* generic pointers. It works with the latter 1830 * because both ANSI C and C++ allow castless assignment from 1831 * any pointer type to void*, and deal with argument conversions 1832 * as though doing an assignment. 1833 */ 1834 return (void *) realloc( (char *) ptr, size ); 1835 } 1836 1837#ifdef YY_USE_PROTOS 1838static void yy_flex_free( void *ptr ) 1839#else 1840static void yy_flex_free( ptr ) 1841void *ptr; 1842#endif 1843 { 1844 free( ptr ); 1845 } 1846 1847#if YY_MAIN 1848int main() 1849 { 1850 yylex(); 1851 return 0; 1852 } 1853#endif 1854#line 92 "deflex.l" 1855 1856#ifndef yywrap 1857/* Needed for lex, though not flex. */ 1858int yywrap(void) { return 1; } 1859#endif 1860