Changeset 462
- Timestamp:
- 04/01/06 18:19:44 (3 years ago)
- Files:
-
- nepenthes/trunk/modules/shellcode-signatures/lex.yy.c (modified) (79 diffs)
- nepenthes/trunk/modules/shellcode-signatures/parser.l (modified) (4 diffs)
- nepenthes/trunk/modules/shellcode-signatures/parser.y (modified) (10 diffs)
- nepenthes/trunk/modules/shellcode-signatures/y.tab.c (modified) (36 diffs)
- nepenthes/trunk/modules/shellcode-signatures/y.tab.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
nepenthes/trunk/modules/shellcode-signatures/lex.yy.c
r437 r462 1 2 #line 3 "lex.yy.c"3 4 #define YY_INT_ALIGNED short int5 6 1 /* A lexical scanner generated by flex */ 2 3 /* Scanner skeleton version: 4 * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ 5 */ 7 6 8 7 #define FLEX_SCANNER 9 8 #define YY_FLEX_MAJOR_VERSION 2 10 9 #define YY_FLEX_MINOR_VERSION 5 11 #define YY_FLEX_SUBMINOR_VERSION 31 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. */ 10 19 11 #include <stdio.h> 20 #include <string.h> 21 #include <errno.h> 12 #include <unistd.h> 13 14 15 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ 16 #ifdef c_plusplus 17 #ifndef __cplusplus 18 #define __cplusplus 19 #endif 20 #endif 21 22 23 #ifdef __cplusplus 24 22 25 #include <stdlib.h> 23 26 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 #include <inttypes.h> 35 typedef int8_t flex_int8_t; 36 typedef uint8_t flex_uint8_t; 37 typedef int16_t flex_int16_t; 38 typedef uint16_t flex_uint16_t; 39 typedef int32_t flex_int32_t; 40 typedef uint32_t flex_uint32_t; 41 #else 42 typedef signed char flex_int8_t; 43 typedef short int flex_int16_t; 44 typedef int flex_int32_t; 45 typedef unsigned char flex_uint8_t; 46 typedef unsigned short int flex_uint16_t; 47 typedef unsigned int flex_uint32_t; 48 #endif /* ! C99 */ 49 50 /* Limits of integral types. */ 51 #ifndef INT8_MIN 52 #define INT8_MIN (-128) 53 #endif 54 #ifndef INT16_MIN 55 #define INT16_MIN (-32767-1) 56 #endif 57 #ifndef INT32_MIN 58 #define INT32_MIN (-2147483647-1) 59 #endif 60 #ifndef INT8_MAX 61 #define INT8_MAX (127) 62 #endif 63 #ifndef INT16_MAX 64 #define INT16_MAX (32767) 65 #endif 66 #ifndef INT32_MAX 67 #define INT32_MAX (2147483647) 68 #endif 69 #ifndef UINT8_MAX 70 #define UINT8_MAX (255U) 71 #endif 72 #ifndef UINT16_MAX 73 #define UINT16_MAX (65535U) 74 #endif 75 #ifndef UINT32_MAX 76 #define UINT32_MAX (4294967295U) 77 #endif 78 79 #endif /* ! FLEXINT_H */ 80 81 #ifdef __cplusplus 27 /* Use prototypes in function declarations. */ 28 #define YY_USE_PROTOS 82 29 83 30 /* The "const" storage-class-modifier is valid. */ … … 88 35 #if __STDC__ 89 36 37 #define YY_USE_PROTOS 90 38 #define YY_USE_CONST 91 39 … … 93 41 #endif /* ! __cplusplus */ 94 42 43 #ifdef __TURBOC__ 44 #pragma warn -rch 45 #pragma warn -use 46 #include <io.h> 47 #include <stdlib.h> 48 #define YY_USE_CONST 49 #define YY_USE_PROTOS 50 #endif 51 95 52 #ifdef YY_USE_CONST 96 53 #define yyconst const 97 54 #else 98 55 #define yyconst 56 #endif 57 58 59 #ifdef YY_USE_PROTOS 60 #define YY_PROTO(proto) proto 61 #else 62 #define YY_PROTO(proto) () 99 63 #endif 100 64 … … 113 77 * definition of BEGIN. 114 78 */ 115 #define BEGIN (yy_start)= 1 + 2 *79 #define BEGIN yy_start = 1 + 2 * 116 80 117 81 /* Translate the current start state into a value that can be later handed … … 119 83 * compatibility. 120 84 */ 121 #define YY_START (( (yy_start)- 1) / 2)85 #define YY_START ((yy_start - 1) / 2) 122 86 #define YYSTATE YY_START 123 87 … … 126 90 127 91 /* Special action meaning "start processing a new file". */ 128 #define YY_NEW_FILE yyrestart( yyin)92 #define YY_NEW_FILE yyrestart( yyin ) 129 93 130 94 #define YY_END_OF_BUFFER_CHAR 0 131 95 132 96 /* Size of default input buffer. */ 133 #ifndef YY_BUF_SIZE134 97 #define YY_BUF_SIZE 16384 135 #endif 136 137 #ifndef YY_TYPEDEF_YY_BUFFER_STATE 138 #define YY_TYPEDEF_YY_BUFFER_STATE 98 139 99 typedef struct yy_buffer_state *YY_BUFFER_STATE; 140 #endif141 100 142 101 extern int yyleng; 143 144 102 extern FILE *yyin, *yyout; 145 103 … … 148 106 #define EOB_ACT_LAST_MATCH 2 149 107 150 #define YY_LESS_LINENO(n) 151 152 /* Return all but the first "n" matched characters back to the input stream. */ 108 /* The funky do-while in the following #define is used to turn the definition 109 * int a single C statement (which needs a semi-colon terminator). This 110 * avoids problems with code like: 111 * 112 * if ( condition_holds ) 113 * yyless( 5 ); 114 * else 115 * do_something_else(); 116 * 117 * Prior to using the do-while the compiler would get upset at the 118 * "else" because it interpreted the "if" statement as being all 119 * done when it reached the ';' after the yyless() call. 120 */ 121 122 /* Return all but the first 'n' matched characters back to the input stream. */ 123 153 124 #define yyless(n) \ 154 125 do \ 155 126 { \ 156 127 /* Undo effects of setting up yytext. */ \ 157 int yyless_macro_arg = (n); \ 158 YY_LESS_LINENO(yyless_macro_arg);\ 159 *yy_cp = (yy_hold_char); \ 128 *yy_cp = yy_hold_char; \ 160 129 YY_RESTORE_YY_MORE_OFFSET \ 161 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg- YY_MORE_ADJ; \130 yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ 162 131 YY_DO_BEFORE_ACTION; /* set up yytext again */ \ 163 132 } \ 164 133 while ( 0 ) 165 134 166 #define unput(c) yyunput( c, (yytext_ptr))135 #define unput(c) yyunput( c, yytext_ptr ) 167 136 168 137 /* The following is because we cannot portably get our hands on size_t … … 170 139 * flex-generated scanners to compile on their own). 171 140 */ 172 173 #ifndef YY_TYPEDEF_YY_SIZE_T174 #define YY_TYPEDEF_YY_SIZE_T175 141 typedef unsigned int yy_size_t; 176 #endif 177 178 #ifndef YY_STRUCT_YY_BUFFER_STATE 179 #define YY_STRUCT_YY_BUFFER_STATE 142 143 180 144 struct yy_buffer_state 181 145 { … … 214 178 int yy_at_bol; 215 179 216 int yy_bs_lineno; /**< The line count. */217 int yy_bs_column; /**< The column count. */218 219 180 /* Whether to try to fill the input buffer when we reach the 220 181 * end of it. … … 223 184 224 185 int yy_buffer_status; 225 226 186 #define YY_BUFFER_NEW 0 227 187 #define YY_BUFFER_NORMAL 1 … … 237 197 */ 238 198 #define YY_BUFFER_EOF_PENDING 2 239 240 199 }; 241 #endif /* !YY_STRUCT_YY_BUFFER_STATE */ 242 243 /* Stack of input buffers. */ 244 static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ 245 static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ 246 static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ 200 201 static YY_BUFFER_STATE yy_current_buffer = 0; 247 202 248 203 /* We provide macros for accessing buffer states in case in the 249 204 * future we want to put the buffer states in a more general 250 205 * "scanner state". 251 *252 * Returns the top of the stack, or NULL.253 206 */ 254 #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ 255 ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ 256 : NULL) 257 258 /* Same as previous macro, but useful when we know that the buffer stack is not 259 * NULL or when we need an lvalue. For internal use only. 260 */ 261 #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] 207 #define YY_CURRENT_BUFFER yy_current_buffer 208 262 209 263 210 /* yy_hold_char holds the character lost when yytext is formed. */ 264 211 static char yy_hold_char; 212 265 213 static int yy_n_chars; /* number of characters read into yy_ch_buf */ 214 215 266 216 int yyleng; 267 217 … … 276 226 static int yy_did_buffer_switch_on_eof; 277 227 278 void yyrestart (FILE *input_file ); 279 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); 280 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); 281 void yy_delete_buffer (YY_BUFFER_STATE b ); 282 void yy_flush_buffer (YY_BUFFER_STATE b ); 283 void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); 284 void yypop_buffer_state (void ); 285 286 static void yyensure_buffer_stack (void ); 287 static void yy_load_buffer_state (void ); 288 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); 289 290 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) 291 292 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); 293 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); 294 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); 295 296 void *yyalloc (yy_size_t ); 297 void *yyrealloc (void *,yy_size_t ); 298 void yyfree (void * ); 228 void yyrestart YY_PROTO(( FILE *input_file )); 229 230 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); 231 void yy_load_buffer_state YY_PROTO(( void )); 232 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); 233 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); 234 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); 235 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); 236 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) 237 238 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); 239 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); 240 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); 241 242 static void *yy_flex_alloc YY_PROTO(( yy_size_t )); 243 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); 244 static void yy_flex_free YY_PROTO(( void * )); 299 245 300 246 #define yy_new_buffer yy_create_buffer … … 302 248 #define yy_set_interactive(is_interactive) \ 303 249 { \ 304 if ( ! YY_CURRENT_BUFFER ){ \ 305 yyensure_buffer_stack (); \ 306 YY_CURRENT_BUFFER_LVALUE = \ 307 yy_create_buffer(yyin,YY_BUF_SIZE ); \ 308 } \ 309 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ 250 if ( ! yy_current_buffer ) \ 251 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ 252 yy_current_buffer->yy_is_interactive = is_interactive; \ 310 253 } 311 254 312 255 #define yy_set_bol(at_bol) \ 313 256 { \ 314 if ( ! YY_CURRENT_BUFFER ){\ 315 yyensure_buffer_stack (); \ 316 YY_CURRENT_BUFFER_LVALUE = \ 317 yy_create_buffer(yyin,YY_BUF_SIZE ); \ 318 } \ 319 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ 320 } 321 322 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) 323 324 /* Begin user sect3 */ 257 if ( ! yy_current_buffer ) \ 258 yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ 259 yy_current_buffer->yy_at_bol = at_bol; \ 260 } 261 262 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) 325 263 326 264 typedef unsigned char YY_CHAR; 327 328 265 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; 329 330 266 typedef int yy_state_type; 331 332 extern int yylineno;333 334 int yylineno = 1;335 336 267 extern char *yytext; 337 268 #define yytext_ptr yytext 338 269 339 static yy_state_type yy_get_previous_state (void);340 static yy_state_type yy_try_NUL_trans (yy_state_type current_state);341 static int yy_get_next_buffer (void);342 static void yy_fatal_error (yyconst char msg[]);270 static yy_state_type yy_get_previous_state YY_PROTO(( void )); 271 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); 272 static int yy_get_next_buffer YY_PROTO(( void )); 273 static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); 343 274 344 275 /* Done after the current pattern has been matched and before the … … 346 277 */ 347 278 #define YY_DO_BEFORE_ACTION \ 348 (yytext_ptr)= yy_bp; \349 yyleng = ( size_t) (yy_cp - yy_bp); \350 (yy_hold_char)= *yy_cp; \279 yytext_ptr = yy_bp; \ 280 yyleng = (int) (yy_cp - yy_bp); \ 281 yy_hold_char = *yy_cp; \ 351 282 *yy_cp = '\0'; \ 352 (yy_c_buf_p)= yy_cp;283 yy_c_buf_p = yy_cp; 353 284 354 285 #define YY_NUM_RULES 57 355 286 #define YY_END_OF_BUFFER 58 356 /* This struct is not used in this scanner, 357 but its presence is necessary. */ 358 struct yy_trans_info 359 { 360 flex_int32_t yy_verify; 361 flex_int32_t yy_nxt; 362 }; 363 static yyconst flex_int16_t yy_accept[219] = 287 static yyconst short int yy_accept[219] = 364 288 { 0, 365 289 55, 55, 40, 40, 53, 53, 58, 57, 55, 56, … … 389 313 } ; 390 314 391 static yyconst flex_int32_t yy_ec[256] =315 static yyconst int yy_ec[256] = 392 316 { 0, 393 317 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, … … 421 345 } ; 422 346 423 static yyconst flex_int32_t yy_meta[48] =347 static yyconst int yy_meta[48] = 424 348 { 0, 425 349 1, 1, 2, 1, 1, 3, 1, 1, 4, 1, … … 430 354 } ; 431 355 432 static yyconst flex_int16_t yy_base[227] =356 static yyconst short int yy_base[227] = 433 357 { 0, 434 358 0, 0, 45, 46, 44, 45, 263, 264, 54, 264, … … 459 383 } ; 460 384 461 static yyconst flex_int16_t yy_def[227] =385 static yyconst short int yy_def[227] = 462 386 { 0, 463 387 218, 1, 219, 219, 220, 220, 218, 218, 218, 218, … … 488 412 } ; 489 413 490 static yyconst flex_int16_t yy_nxt[312] =414 static yyconst short int yy_nxt[312] = 491 415 { 0, 492 416 8, 9, 10, 9, 9, 11, 12, 13, 8, 14, … … 527 451 } ; 528 452 529 static yyconst flex_int16_t yy_chk[312] =453 static yyconst short int yy_chk[312] = 530 454 { 0, 531 455 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, … … 569 493 static char *yy_last_accepting_cpos; 570 494 571 extern int yy_flex_debug;572 int yy_flex_debug = 0;573 574 495 /* The intent behind this definition is that it'll catch 575 496 * any uses of REJECT which flex missed. … … 581 502 char *yytext; 582 503 #line 1 "parser.l" 504 #define INITIAL 0 583 505 /* $Id$ */ 584 506 #line 3 "parser.l" … … 596 518 static int string_cap = 0; 597 519 598 599 #line 600 "lex.yy.c"600 601 #define INITIAL 0602 520 #define comment 1 603 521 #define string 2 604 522 605 #ifndef YY_NO_UNISTD_H 606 /* Special case for "unistd.h", since it is non-ANSI. We include it way 607 * down here because we want the user's section 1 to have been scanned first. 608 * The user has a chance to override it with an option. 609 */ 610 #include <unistd.h> 611 #endif 612 613 #ifndef YY_EXTRA_TYPE 614 #define YY_EXTRA_TYPE void * 615 #endif 523 #line 524 "lex.yy.c" 616 524 617 525 /* Macros after this point can all be overridden by user definitions in … … 621 529 #ifndef YY_SKIP_YYWRAP 622 530 #ifdef __cplusplus 623 extern "C" int yywrap (void ); 624 #else 625 extern int yywrap (void ); 626 #endif 627 #endif 628 629 static void yyunput (int c,char *buf_ptr ); 630 531 extern "C" int yywrap YY_PROTO(( void )); 532 #else 533 extern int yywrap YY_PROTO(( void )); 534 #endif 535 #endif 536 537 #ifndef YY_NO_UNPUT 538 static void yyunput YY_PROTO(( int c, char *buf_ptr )); 539 #endif 540 631 541 #ifndef yytext_ptr 632 static void yy_flex_strncpy (char *,yyconst char *,int);542 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); 633 543 #endif 634 544 635 545 #ifdef YY_NEED_STRLEN 636 static int yy_flex_strlen (yyconst char *);546 static int yy_flex_strlen YY_PROTO(( yyconst char * )); 637 547 #endif 638 548 639 549 #ifndef YY_NO_INPUT 640 641 550 #ifdef __cplusplus 642 static int yyinput (void ); 643 #else 644 static int input (void ); 645 #endif 646 551 static int yyinput YY_PROTO(( void )); 552 #else 553 static int input YY_PROTO(( void )); 554 #endif 555 #endif 556 557 #if YY_STACK_USED 558 static int yy_start_stack_ptr = 0; 559 static int yy_start_stack_depth = 0; 560 static int *yy_start_stack = 0; 561 #ifndef YY_NO_PUSH_STATE 562 static void yy_push_state YY_PROTO(( int new_state )); 563 #endif 564 #ifndef YY_NO_POP_STATE 565 static void yy_pop_state YY_PROTO(( void )); 566 #endif 567 #ifndef YY_NO_TOP_STATE 568 static int yy_top_state YY_PROTO(( void )); 569 #endif 570 571 #else 572 #define YY_NO_PUSH_STATE 1 573 #define YY_NO_POP_STATE 1 574 #define YY_NO_TOP_STATE 1 575 #endif 576 577 #ifdef YY_MALLOC_DECL 578 YY_MALLOC_DECL 579 #else 580 #if __STDC__ 581 #ifndef __cplusplus 582 #include <stdlib.h> 583 #endif 584 #else 585 /* Just try to get by without declaring the routines. This will fail 586 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) 587 * or sizeof(void*) != sizeof(int). 588 */ 589 #endif 647 590 #endif 648 591 … … 653 596 654 597 /* Copy whatever the last rule matched to the standard output. */ 598 655 599 #ifndef ECHO 656 600 /* This used to be an fputs(), but since the string might contain NUL's, … … 665 609 #ifndef YY_INPUT 666 610 #define YY_INPUT(buf,result,max_size) \ 667 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \611 if ( yy_current_buffer->yy_is_interactive ) \ 668 612 { \ 669 int c = '*'; \ 670 size_t n; \ 613 int c = '*', n; \ 671 614 for ( n = 0; n < max_size && \ 672 615 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ … … 678 621 result = n; \ 679 622 } \ 680 else \ 681 { \ 682 errno=0; \ 683 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ 684 { \ 685 if( errno != EINTR) \ 686 { \ 687 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 688 break; \ 689 } \ 690 errno=0; \ 691 clearerr(yyin); \ 692 } \ 693 }\ 694 \ 695 623 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ 624 && ferror( yyin ) ) \ 625 YY_FATAL_ERROR( "input in flex scanner failed" ); 696 626 #endif 697 627 … … 714 644 #endif 715 645 716 /* end tables serialization structures and prototypes */717 718 646 /* Default declaration of generated scanner - a define so the user can 719 647 * easily add parameters. 720 648 */ 721 649 #ifndef YY_DECL 722 #define YY_DECL_IS_OURS 1 723 724 extern int yylex (void); 725 726 #define YY_DECL int yylex (void) 727 #endif /* !YY_DECL */ 650 #define YY_DECL int yylex YY_PROTO(( void )) 651 #endif 728 652 729 653 /* Code executed at the beginning of each rule, after yytext and yyleng … … 742 666 YY_USER_ACTION 743 667 744 /** The main scanner function which does all the work.745 */746 668 YY_DECL 747 {669 { 748 670 register yy_state_type yy_current_state; 749 register char *yy_cp , *yy_bp;671 register char *yy_cp = NULL, *yy_bp = NULL; 750 672 register int yy_act; 751 673 752 674 #line 25 "parser.l" 753 675 754 676 755 677 756 #line 757"lex.yy.c"757 758 if ( (yy_init))678 #line 679 "lex.yy.c" 679 680 if ( yy_init ) 759 681 { 760 (yy_init)= 0;682 yy_init = 0; 761 683 762 684 #ifdef YY_USER_INIT … … 764 686 #endif 765 687 766 if ( ! (yy_start))767 (yy_start)= 1; /* first start state */688 if ( ! yy_start ) 689 yy_start = 1; /* first start state */ 768 690 769 691 if ( ! yyin ) … … 773 695 yyout = stdout; 774 696 775 if ( ! YY_CURRENT_BUFFER ) { 776 yyensure_buffer_stack (); 777 YY_CURRENT_BUFFER_LVALUE = 778 yy_create_buffer(yyin,YY_BUF_SIZE ); 779 } 780 781 yy_load_buffer_state( ); 697 if ( ! yy_current_buffer ) 698 yy_current_buffer = 699 yy_create_buffer( yyin, YY_BUF_SIZE ); 700 701 yy_load_buffer_state(); 782 702 } 783 703 784 704 while ( 1 ) /* loops until end-of-file is reached */ 785 705 { 786 yy_cp = (yy_c_buf_p);706 yy_cp = yy_c_buf_p; 787 707 788 708 /* Support of yytext. */ 789 *yy_cp = (yy_hold_char);709 *yy_cp = yy_hold_char; 790 710 791 711 /* yy_bp points to the position in yy_ch_buf of the start of … … 794 714 yy_bp = yy_cp; 795 715 796 yy_current_state = (yy_start);716 yy_current_state = yy_start; 797 717 yy_match: 798 718 do … … 801 721 if ( yy_accept[yy_current_state] ) 802 722 { 803 (yy_last_accepting_state)= yy_current_state;804 (yy_last_accepting_cpos)= yy_cp;723 yy_last_accepting_state = yy_current_state; 724 yy_last_accepting_cpos = yy_cp; 805 725 } 806 726 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) … … 819 739 if ( yy_act == 0 ) 820 740 { /* have to back up */ 821 yy_cp = (yy_last_accepting_cpos);822 yy_current_state = (yy_last_accepting_state);741 yy_cp = yy_last_accepting_cpos; 742 yy_current_state = yy_last_accepting_state; 823 743 yy_act = yy_accept[yy_current_state]; 824 744 } … … 826 746 YY_DO_BEFORE_ACTION; 827 747 748 828 749 do_action: /* This label is used only to access EOF actions. */ 750 829 751 830 752 switch ( yy_act ) … … 832 754 case 0: /* must back up */ 833 755 /* undo the effects of YY_DO_BEFORE_ACTION */ 834 *yy_cp = (yy_hold_char);835 yy_cp = (yy_last_accepting_cpos);836 yy_current_state = (yy_last_accepting_state);756 *yy_cp = yy_hold_char; 757 yy_cp = yy_last_accepting_cpos; 758 yy_current_state = yy_last_accepting_state; 837 759 goto yy_find_action; 838 760 … … 1025 947 YY_RULE_SETUP 1026 948 #line 73 "parser.l" 1027 { string_append(yytext, strlen(yytext)); return SC_ID; }949 { string_append(yytext, yyleng); return SC_ID; } 1028 950 YY_BREAK 1029 951 case 39: … … 1048 970 YY_BREAK 1049 971 case 43: 1050 /* rule 43 can match eol */1051 972 YY_RULE_SETUP 1052 973 #line 80 "parser.l" … … 1105 1026 YY_BREAK 1106 1027 case 53: 1107 /* rule 53 can match eol */1108 1028 YY_RULE_SETUP 1109 1029 #line 97 "parser.l" 1110 { string_append(yytext, strlen(yytext)); }1030 { string_append(yytext, yyleng); } 1111 1031 YY_BREAK 1112 1032 case 54: … … 1121 1041 YY_BREAK 1122 1042 case 56: 1123 /* rule 56 can match eol */1124 1043 YY_RULE_SETUP 1125 1044 #line 102 "parser.l" … … 1131 1050 ECHO; 1132 1051 YY_BREAK 1133 #line 1 134"lex.yy.c"1052 #line 1053 "lex.yy.c" 1134 1053 case YY_STATE_EOF(INITIAL): 1135 1054 case YY_STATE_EOF(comment): … … 1140 1059 { 1141 1060 /* Amount of text matched not including the EOB char. */ 1142 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;1061 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; 1143 1062 1144 1063 /* Undo the effects of YY_DO_BEFORE_ACTION. */ 1145 *yy_cp = (yy_hold_char);1064 *yy_cp = yy_hold_char; 1146 1065 YY_RESTORE_YY_MORE_OFFSET 1147 1066 1148 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )1067 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) 1149 1068 { 1150 1069 /* We're scanning a new file or input source. It's … … 1152 1071 * just pointed yyin at a new source and called 1153 1072 * yylex(). If so, then we have to assure 1154 * consistency between YY_CURRENT_BUFFERand our1073 * consistency between yy_current_buffer and our 1155 1074 * globals. Here is the right place to do so, because 1156 1075 * this is the first action (other than possibly a 1157 1076 * back-up) that will match for the new input source. 1158 1077 */ 1159 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;1160 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;1161 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;1078 yy_n_chars = yy_current_buffer->yy_n_chars; 1079 yy_current_buffer->yy_input_file = yyin; 1080 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; 1162 1081 } 1163 1082 … … 1169 1088 * in input(). 1170 1089 */ 1171 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )1090 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) 1172 1091 { /* This was really a NUL. */ 1173 1092 yy_state_type yy_next_state; 1174 1093 1175 (yy_c_buf_p) = (yytext_ptr)+ yy_amount_of_matched_text;1176 1177 yy_current_state = yy_get_previous_state( );1094 yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; 1095 1096 yy_current_state = yy_get_previous_state(); 1178 1097 1179 1098 /* Okay, we're now positioned to make the NUL … … 1188 1107 yy_next_state = yy_try_NUL_trans( yy_current_state ); 1189 1108 1190 yy_bp = (yytext_ptr)+ YY_MORE_ADJ;1109 yy_bp = yytext_ptr + YY_MORE_ADJ; 1191 1110 1192 1111 if ( yy_next_state ) 1193 1112 { 1194 1113 /* Consume the NUL. */ 1195 yy_cp = ++ (yy_c_buf_p);1114 yy_cp = ++yy_c_buf_p; 1196 1115 yy_current_state = yy_next_state; 1197 1116 goto yy_match; … … 1200 1119 else 1201 1120 { 1202 yy_cp = (yy_c_buf_p);1121 yy_cp = yy_c_buf_p; 1203 1122 goto yy_find_action; 1204 1123 } 1205 1124 } 1206 1125 1207 else switch ( yy_get_next_buffer( ) )1126 else switch ( yy_get_next_buffer() ) 1208 1127 { 1209 1128 case EOB_ACT_END_OF_FILE: 1210 1129 { 1211 (yy_did_buffer_switch_on_eof)= 0;1212 1213 if ( yywrap( ) )1130 yy_did_buffer_switch_on_eof = 0; 1131 1132 if ( yywrap() ) 1214 1133 { 1215 1134 /* Note: because we've taken care in … … 1222 1141 * YY_NULL will get returned. 1223 1142 */ 1224 (yy_c_buf_p) = (yytext_ptr)+ YY_MORE_ADJ;1143 yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; 1225 1144 1226 1145 yy_act = YY_STATE_EOF(YY_START); … … 1230 1149 else 1231 1150 { 1232 if ( ! (yy_did_buffer_switch_on_eof))1151 if ( ! yy_did_buffer_switch_on_eof ) 1233 1152 YY_NEW_FILE; 1234 1153 } … … 1237 1156 1238 1157 case EOB_ACT_CONTINUE_SCAN: 1239 (yy_c_buf_p)=1240 (yytext_ptr)+ yy_amount_of_matched_text;1241 1242 yy_current_state = yy_get_previous_state( );1243 1244 yy_cp = (yy_c_buf_p);1245 yy_bp = (yytext_ptr)+ YY_MORE_ADJ;1158 yy_c_buf_p = 1159 yytext_ptr + yy_amount_of_matched_text; 1160 1161 yy_current_state = yy_get_previous_state(); 1162 1163 yy_cp = yy_c_buf_p; 1164 yy_bp = yytext_ptr + YY_MORE_ADJ; 1246 1165 goto yy_match; 1247 1166 1248 1167 case EOB_ACT_LAST_MATCH: 1249 (yy_c_buf_p)=1250 & YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];1251 1252 yy_current_state = yy_get_previous_state( );1253 1254 yy_cp = (yy_c_buf_p);1255 yy_bp = (yytext_ptr)+ YY_MORE_ADJ;1168 yy_c_buf_p = 1169 &yy_current_buffer->yy_ch_buf[yy_n_chars]; 1170 1171 yy_current_state = yy_get_previous_state(); 1172 1173 yy_cp = yy_c_buf_p; 1174 yy_bp = yytext_ptr + YY_MORE_ADJ; 1256 1175 goto yy_find_action; 1257 1176 } … … 1264 1183 } /* end of action switch */ 1265 1184 } /* end of scanning one token */ 1266 } /* end of yylex */ 1185 } /* end of yylex */ 1186 1267 1187 1268 1188 /* yy_get_next_buffer - try to read in a new buffer … … 1273 1193 * EOB_ACT_END_OF_FILE - end of file 1274 1194 */ 1275 static int yy_get_next_buffer (void) 1276 { 1277 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; 1278 register char *source = (yytext_ptr); 1195 1196 static int yy_get_next_buffer() 1197 { 1198 register char *dest = yy_current_buffer->yy_ch_buf; 1199 register char *source = yytext_ptr; 1279 1200 register int number_to_move, i; 1280 1201 int ret_val; 1281 1202 1282 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)+ 1] )1203 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) 1283 1204 YY_FATAL_ERROR( 1284 1205 "fatal flex scanner internal error--end of buffer missed" ); 1285 1206 1286 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )1207 if ( yy_current_buffer->yy_fill_buffer == 0 ) 1287 1208 { /* Don't try to fill the buffer, so this is an EOF. */ 1288 if ( (yy_c_buf_p) - (yytext_ptr)- YY_MORE_ADJ == 1 )1209 if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) 1289 1210 { 1290 1211 /* We matched a single character, the EOB, so … … 1306 1227 1307 1228 /* First move last chars to start of buffer. */ 1308 number_to_move = (int) ( (yy_c_buf_p) - (yytext_ptr)) - 1;1229 number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; 1309 1230 1310 1231 for ( i = 0; i < number_to_move; ++i ) 1311 1232 *(dest++) = *(source++); 1312 1233 1313 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )1234 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 1314 1235 /* don't do the read, it's not guaranteed to return an EOF, 1315 1236 * just force an EOF 1316 1237 */ 1317 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars)= 0;1238 yy_current_buffer->yy_n_chars = yy_n_chars = 0; 1318 1239 1319 1240 else 1320 1241 { 1321 size_t num_to_read =1322 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;1242 int num_to_read = 1243 yy_current_buffer->yy_buf_size - number_to_move - 1; 1323 1244 1324 1245 while ( num_to_read <= 0 ) 1325 1246 { /* Not enough room in the buffer - grow it. */ 1247 #ifdef YY_USES_REJECT 1248 YY_FATAL_ERROR( 1249 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); 1250 #else 1326 1251 1327 1252 /* just a shorter name for the current buffer */ 1328 YY_BUFFER_STATE b = YY_CURRENT_BUFFER;1253 YY_BUFFER_STATE b = yy_current_buffer; 1329 1254 1330 1255 int yy_c_buf_p_offset = 1331 (int) ( (yy_c_buf_p)- b->yy_ch_buf);1256 (int) (yy_c_buf_p - b->yy_ch_buf); 1332 1257 1333 1258 if ( b->yy_is_our_buffer ) … … 1342 1267 b->yy_ch_buf = (char *) 1343 1268 /* Include room in for 2 EOB chars. */ 1344 yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); 1269 yy_flex_realloc( (void *) b->yy_ch_buf, 1270 b->yy_buf_size + 2 ); 1345 1271  
