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