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