Changeset 424
- Timestamp:
- 03/25/06 21:11:48 (3 years ago)
- Files:
-
- nepenthes/trunk/modules/shellcode-signatures/Makefile.am (modified) (1 diff)
- nepenthes/trunk/modules/shellcode-signatures/lex.yy.c (modified) (76 diffs)
- nepenthes/trunk/modules/shellcode-signatures/sch_namespace_xor.cpp (modified) (1 diff)
- nepenthes/trunk/modules/shellcode-signatures/sch_namespace_xor.hpp (modified) (1 diff)
- nepenthes/trunk/modules/shellcode-signatures/shellcode-signatures.cpp (modified) (2 diffs)
- nepenthes/trunk/modules/shellcode-signatures/shellcode-signatures.hpp (modified) (1 diff)
- nepenthes/trunk/modules/shellcode-signatures/y.tab.c (modified) (25 diffs)
- nepenthes/trunk/modules/shellcode-signatures/y.tab.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
nepenthes/trunk/modules/shellcode-signatures/Makefile.am
r422 r424 15 15 shellcodesignatures_la_SOURCES += y.tab.c lex.yy.c 16 16 shellcodesignatures_la_SOURCES += shellcode-signatures.cpp shellcode-signatures.hpp 17 17 shellcodesignatures_la_SOURCES += sch_namespace_xor.cpp sch_namespace_xor.hpp 18 18 19 19 nepenthes/trunk/modules/shellcode-signatures/lex.yy.c
r422 r424 1 2 #line 3 "lex.yy.c" 3 4 #define YY_INT_ALIGNED short int 5 1 6 /* A lexical scanner generated by flex */ 2 3 /* Scanner skeleton version:4 * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $5 */6 7 7 8 #define FLEX_SCANNER 8 9 #define YY_FLEX_MAJOR_VERSION 2 9 10 #define YY_FLEX_MINOR_VERSION 5 10 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. */ 11 19 #include <stdio.h> 12 #include <unistd.h> 13 14 15 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ 16 #ifdef c_plusplus 17 #ifndef __cplusplus 18 #define __cplusplus 19 #endif 20 #endif 21 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 #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 */ 22 80 23 81 #ifdef __cplusplus 24 25 #include <stdlib.h>26 27 /* Use prototypes in function declarations. */28 #define YY_USE_PROTOS29 82 30 83 /* The "const" storage-class-modifier is valid. */ … … 35 88 #if __STDC__ 36 89 37 #define YY_USE_PROTOS38 90 #define YY_USE_CONST 39 91 40 92 #endif /* __STDC__ */ 41 93 #endif /* ! __cplusplus */ 42 43 #ifdef __TURBOC__44 #pragma warn -rch45 #pragma warn -use46 #include <io.h>47 #include <stdlib.h>48 #define YY_USE_CONST49 #define YY_USE_PROTOS50 #endif51 94 52 95 #ifdef YY_USE_CONST … … 56 99 #endif 57 100 58 59 #ifdef YY_USE_PROTOS60 #define YY_PROTO(proto) proto61 #else62 #define YY_PROTO(proto) ()63 #endif64 65 101 /* Returned upon end-of-file. */ 66 102 #define YY_NULL 0 … … 77 113 * definition of BEGIN. 78 114 */ 79 #define BEGIN yy_start= 1 + 2 *115 #define BEGIN (yy_start) = 1 + 2 * 80 116 81 117 /* Translate the current start state into a value that can be later handed … … 83 119 * compatibility. 84 120 */ 85 #define YY_START (( yy_start- 1) / 2)121 #define YY_START (((yy_start) - 1) / 2) 86 122 #define YYSTATE YY_START 87 123 … … 90 126 91 127 /* Special action meaning "start processing a new file". */ 92 #define YY_NEW_FILE yyrestart( yyin)128 #define YY_NEW_FILE yyrestart(yyin ) 93 129 94 130 #define YY_END_OF_BUFFER_CHAR 0 95 131 96 132 /* Size of default input buffer. */ 133 #ifndef YY_BUF_SIZE 97 134 #define YY_BUF_SIZE 16384 98 135 #endif 136 137 #ifndef YY_TYPEDEF_YY_BUFFER_STATE 138 #define YY_TYPEDEF_YY_BUFFER_STATE 99 139 typedef struct yy_buffer_state *YY_BUFFER_STATE; 140 #endif 100 141 101 142 extern int yyleng; 143 102 144 extern FILE *yyin, *yyout; 103 145 … … 106 148 #define EOB_ACT_LAST_MATCH 2 107 149 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 150 #define YY_LESS_LINENO(n) 151 152 /* Return all but the first "n" matched characters back to the input stream. */ 124 153 #define yyless(n) \ 125 154 do \ 126 155 { \ 127 156 /* Undo effects of setting up yytext. */ \ 128 *yy_cp = yy_hold_char; \ 157 int yyless_macro_arg = (n); \ 158 YY_LESS_LINENO(yyless_macro_arg);\ 159 *yy_cp = (yy_hold_char); \ 129 160 YY_RESTORE_YY_MORE_OFFSET \ 130 yy_c_buf_p = yy_cp = yy_bp + n- YY_MORE_ADJ; \161 (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ 131 162 YY_DO_BEFORE_ACTION; /* set up yytext again */ \ 132 163 } \ 133 164 while ( 0 ) 134 165 135 #define unput(c) yyunput( c, yytext_ptr)166 #define unput(c) yyunput( c, (yytext_ptr) ) 136 167 137 168 /* The following is because we cannot portably get our hands on size_t … … 139 170 * flex-generated scanners to compile on their own). 140 171 */ 172 173 #ifndef YY_TYPEDEF_YY_SIZE_T 174 #define YY_TYPEDEF_YY_SIZE_T 141 175 typedef unsigned int yy_size_t; 142 143 176 #endif 177 178 #ifndef YY_STRUCT_YY_BUFFER_STATE 179 #define YY_STRUCT_YY_BUFFER_STATE 144 180 struct yy_buffer_state 145 181 { … … 178 214 int yy_at_bol; 179 215 216 int yy_bs_lineno; /**< The line count. */ 217 int yy_bs_column; /**< The column count. */ 218 180 219 /* Whether to try to fill the input buffer when we reach the 181 220 * end of it. … … 184 223 185 224 int yy_buffer_status; 225 186 226 #define YY_BUFFER_NEW 0 187 227 #define YY_BUFFER_NORMAL 1 … … 197 237 */ 198 238 #define YY_BUFFER_EOF_PENDING 2 239 199 240 }; 200 201 static YY_BUFFER_STATE yy_current_buffer = 0; 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. */ 202 247 203 248 /* We provide macros for accessing buffer states in case in the 204 249 * future we want to put the buffer states in a more general 205 250 * "scanner state". 206 */ 207 #define YY_CURRENT_BUFFER yy_current_buffer 208 251 * 252 * Returns the top of the stack, or NULL. 253 */ 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)] 209 262 210 263 /* yy_hold_char holds the character lost when yytext is formed. */ 211 264 static char yy_hold_char; 212 213 265 static int yy_n_chars; /* number of characters read into yy_ch_buf */ 214 215 216 266 int yyleng; 217 267 … … 226 276 static int yy_did_buffer_switch_on_eof; 227 277 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 * )); 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 * ); 245 299 246 300 #define yy_new_buffer yy_create_buffer … … 248 302 #define yy_set_interactive(is_interactive) \ 249 303 { \ 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; \ 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; \ 253 310 } 254 311 255 312 #define yy_set_bol(at_bol) \ 256 313 { \ 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; \ 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; \ 260 320 } 261 321 262 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) 322 #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) 323 324 /* Begin user sect3 */ 263 325 264 326 typedef unsigned char YY_CHAR; 327 265 328 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; 329 266 330 typedef int yy_state_type; 331 332 extern int yylineno; 333 334 int yylineno = 1; 335 267 336 extern char *yytext; 268 337 #define yytext_ptr yytext 269 338 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[] ));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[] ); 274 343 275 344 /* Done after the current pattern has been matched and before the … … 277 346 */ 278 347 #define YY_DO_BEFORE_ACTION \ 279 yytext_ptr= yy_bp; \280 yyleng = ( int) (yy_cp - yy_bp); \281 yy_hold_char= *yy_cp; \348 (yytext_ptr) = yy_bp; \ 349 yyleng = (size_t) (yy_cp - yy_bp); \ 350 (yy_hold_char) = *yy_cp; \ 282 351 *yy_cp = '\0'; \ 283 yy_c_buf_p= yy_cp;352 (yy_c_buf_p) = yy_cp; 284 353 285 354 #define YY_NUM_RULES 51 286 355 #define YY_END_OF_BUFFER 52 287 static yyconst short int yy_accept[216] = 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[216] = 288 364 { 0, 289 365 49, 49, 34, 34, 47, 47, 52, 51, 49, 50, … … 313 389 } ; 314 390 315 static yyconst int yy_ec[256] =391 static yyconst flex_int32_t yy_ec[256] = 316 392 { 0, 317 393 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, … … 345 421 } ; 346 422 347 static yyconst int yy_meta[46] =423 static yyconst flex_int32_t yy_meta[46] = 348 424 { 0, 349 425 1, 1, 2, 1, 1, 3, 1, 1, 4, 1, … … 354 430 } ; 355 431 356 static yyconst short int yy_base[224] =432 static yyconst flex_int16_t yy_base[224] = 357 433 { 0, 358 434 0, 0, 43, 44, 42, 43, 258, 259, 52, 259, … … 383 459 } ; 384 460 385 static yyconst short int yy_def[224] =461 static yyconst flex_int16_t yy_def[224] = 386 462 { 0, 387 463 215, 1, 216, 216, 217, 217, 215, 215, 215, 215, … … 412 488 } ; 413 489 414 static yyconst short int yy_nxt[305] =490 static yyconst flex_int16_t yy_nxt[305] = 415 491 { 0, 416 492 8, 9, 10, 9, 9, 11, 12, 13, 8, 14, … … 450 526 } ; 451 527 452 static yyconst short int yy_chk[305] =528 static yyconst flex_int16_t yy_chk[305] = 453 529 { 0, 454 530 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, … … 491 567 static char *yy_last_accepting_cpos; 492 568 569 extern int yy_flex_debug; 570 int yy_flex_debug = 0; 571 493 572 /* The intent behind this definition is that it'll catch 494 573 * any uses of REJECT which flex missed. … … 500 579 char *yytext; 501 580 #line 1 "parser.l" 502 #define INITIAL 0503 581 /* $Id$ */ 504 582 #line 3 "parser.l" … … 516 594 static int string_cap = 0; 517 595 596 597 #line 598 "lex.yy.c" 598 599 #define INITIAL 0 518 600 #define comment 1 519 601 #define string 2 520 602 521 #line 522 "lex.yy.c" 603 #ifndef YY_NO_UNISTD_H 604 /* Special case for "unistd.h", since it is non-ANSI. We include it way 605 * down here because we want the user's section 1 to have been scanned first. 606 * The user has a chance to override it with an option. 607 */ 608 #include <unistd.h> 609 #endif 610 611 #ifndef YY_EXTRA_TYPE 612 #define YY_EXTRA_TYPE void * 613 #endif 522 614 523 615 /* Macros after this point can all be overridden by user definitions in … … 527 619 #ifndef YY_SKIP_YYWRAP 528 620 #ifdef __cplusplus 529 extern "C" int yywrap YY_PROTO(( void ));621 extern "C" int yywrap (void ); 530 622 #else 531 extern int yywrap YY_PROTO(( void )); 532 #endif 533 #endif 534 535 #ifndef YY_NO_UNPUT 536 static void yyunput YY_PROTO(( int c, char *buf_ptr )); 537 #endif 538 623 extern int yywrap (void ); 624 #endif 625 #endif 626 627 static void yyunput (int c,char *buf_ptr ); 628 539 629 #ifndef yytext_ptr 540 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));630 static void yy_flex_strncpy (char *,yyconst char *,int ); 541 631 #endif 542 632 543 633 #ifdef YY_NEED_STRLEN 544 static int yy_flex_strlen YY_PROTO(( yyconst char * ));634 static int yy_flex_strlen (yyconst char * ); 545 635 #endif 546 636 547 637 #ifndef YY_NO_INPUT 638 548 639 #ifdef __cplusplus 549 static int yyinput YY_PROTO(( void ));640 static int yyinput (void ); 550 641 #else 551 static int input YY_PROTO(( void )); 552 #endif 553 #endif 554 555 #if YY_STACK_USED 556 static int yy_start_stack_ptr = 0; 557 static int yy_start_stack_depth = 0; 558 static int *yy_start_stack = 0; 559 #ifndef YY_NO_PUSH_STATE 560 static void yy_push_state YY_PROTO(( int new_state )); 561 #endif 562 #ifndef YY_NO_POP_STATE 563 static void yy_pop_state YY_PROTO(( void )); 564 #endif 565 #ifndef YY_NO_TOP_STATE 566 static int yy_top_state YY_PROTO(( void )); 567 #endif 568 569 #else 570 #define YY_NO_PUSH_STATE 1 571 #define YY_NO_POP_STATE 1 572 #define YY_NO_TOP_STATE 1 573 #endif 574 575 #ifdef YY_MALLOC_DECL 576 YY_MALLOC_DECL 577 #else 578 #if __STDC__ 579 #ifndef __cplusplus 580 #include <stdlib.h> 581 #endif 582 #else 583 /* Just try to get by without declaring the routines. This will fail 584 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) 585 * or sizeof(void*) != sizeof(int). 586 */ 587 #endif 642 static int input (void ); 643 #endif 644 588 645 #endif 589 646 … … 594 651 595 652 /* Copy whatever the last rule matched to the standard output. */ 596 597 653 #ifndef ECHO 598 654 /* This used to be an fputs(), but since the string might contain NUL's, … … 607 663 #ifndef YY_INPUT 608 664 #define YY_INPUT(buf,result,max_size) \ 609 if ( yy_current_buffer->yy_is_interactive ) \665 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ 610 666 { \ 611 int c = '*', n; \ 667 int c = '*'; \ 668 size_t n; \ 612 669 for ( n = 0; n < max_size && \ 613 670 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ … … 619 676 result = n; \ 620 677 } \ 621 else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ 622 && ferror( yyin ) ) \ 623 YY_FATAL_ERROR( "input in flex scanner failed" ); 678 else \ 679 { \ 680 errno=0; \ 681 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ 682 { \ 683 if( errno != EINTR) \ 684 { \ 685 YY_FATAL_ERROR( "input in flex scanner failed" ); \ 686 break; \ 687 } \ 688 errno=0; \ 689 clearerr(yyin); \ 690 } \ 691 }\ 692 \ 693 624 694 #endif 625 695 … … 642 712 #endif 643 713 714 /* end tables serialization structures and prototypes */ 715 644 716 /* Default declaration of generated scanner - a define so the user can 645 717 * easily add parameters. 646 718 */ 647 719 #ifndef YY_DECL 648 #define YY_DECL int yylex YY_PROTO(( void )) 649 #endif 720 #define YY_DECL_IS_OURS 1 721 722 extern int yylex (void); 723 724 #define YY_DECL int yylex (void) 725 #endif /* !YY_DECL */ 650 726 651 727 /* Code executed at the beginning of each rule, after yytext and yyleng … … 664 740 YY_USER_ACTION 665 741 742 /** The main scanner function which does all the work. 743 */ 666 744 YY_DECL 667 {745 { 668 746 register yy_state_type yy_current_state; 669 register char *yy_cp = NULL, *yy_bp = NULL;747 register char *yy_cp, *yy_bp; 670 748 register int yy_act; 671 749 672 750 #line 25 "parser.l" 673 751 674 752 675 753 676 #line 677"lex.yy.c"677 678 if ( yy_init)754 #line 755 "lex.yy.c" 755 756 if ( (yy_init) ) 679 757 { 680 yy_init= 0;758 (yy_init) = 0; 681 759 682 760 #ifdef YY_USER_INIT … … 684 762 #endif 685 763 686 if ( ! yy_start)687 yy_start= 1; /* first start state */764 if ( ! (yy_start) ) 765 (yy_start) = 1; /* first start state */ 688 766 689 767 if ( ! yyin ) … … 693 771 yyout = stdout; 694 772 695 if ( ! yy_current_buffer ) 696 yy_current_buffer = 697 yy_create_buffer( yyin, YY_BUF_SIZE ); 698 699 yy_load_buffer_state(); 773 if ( ! YY_CURRENT_BUFFER ) { 774 yyensure_buffer_stack (); 775 YY_CURRENT_BUFFER_LVALUE = 776 yy_create_buffer(yyin,YY_BUF_SIZE ); 777 } 778 779 yy_load_buffer_state( ); 700 780 } 701 781 702 782 while ( 1 ) /* loops until end-of-file is reached */ 703 783 { 704 yy_cp = yy_c_buf_p;784 yy_cp = (yy_c_buf_p); 705 785 706 786 /* Support of yytext. */ 707 *yy_cp = yy_hold_char;787 *yy_cp = (yy_hold_char); 708 788 709 789 /* yy_bp points to the position in yy_ch_buf of the start of … … 712 792 yy_bp = yy_cp; 713 793 714 yy_current_state = yy_start;794 yy_current_state = (yy_start); 715 795 yy_match: 716 796 do … … 719 799 if ( yy_accept[yy_current_state] ) 720 800 { 721 yy_last_accepting_state= yy_current_state;722 yy_last_accepting_cpos= yy_cp;801 (yy_last_accepting_state) = yy_current_state; 802 (yy_last_accepting_cpos) = yy_cp; 723 803 } 724 804 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) … … 737 817 if ( yy_act == 0 ) 738 818 { /* have to back up */ 739 yy_cp = yy_last_accepting_cpos;740 yy_current_state = yy_last_accepting_state;819 yy_cp = (yy_last_accepting_cpos); 820 yy_current_state = (yy_last_accepting_state); 741 821 yy_act = yy_accept[yy_current_state]; 742 822 } … … 744 824 YY_DO_BEFORE_ACTION; 745 825 746 747 826 do_action: /* This label is used only to access EOF actions. */ 748 749 827 750 828 switch ( yy_act ) … … 752 830 case 0: /* must back up */ 753 831 /* undo the effects of YY_DO_BEFORE_ACTION */ 754 *yy_cp = yy_hold_char;755 yy_cp = yy_last_accepting_cpos;756 yy_current_state = yy_last_accepting_state;832 *yy_cp = (yy_hold_char); 833 yy_cp = (yy_last_accepting_cpos); 834 yy_current_state = (yy_last_accepting_state); 757 835 goto yy_find_action; 758 836 … … 938 1016 YY_BREAK 939 1017 case 37: 1018 /* rule 37 can match eol */ 940 1019 YY_RULE_SETUP 941 1020 #line 72 "parser.l" … … 994 1073 YY_BREAK 995 1074 case 47: 1075 /* rule 47 can match eol */ 996 1076 YY_RULE_SETUP 997 1077 #line 89 "parser.l" … … 1009 1089 YY_BREAK 1010 1090 case 50: 1091 /* rule 50 can match eol */ 1011 1092 YY_RULE_SETUP 1012 1093 #line 94 "parser.l" … … 1018 1099 ECHO; 1019 1100 YY_BREAK 1020 #line 1 021"lex.yy.c"1101 #line 1102 "lex.yy.c" 1021 1102 case YY_STATE_EOF(INITIAL): 1022 1103 case YY_STATE_EOF(comment): … … 1027 1108 { 1028 1109 /* Amount of text matched not including the EOB char. */ 1029 int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;1110 int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; 1030 1111 1031 1112 /* Undo the effects of YY_DO_BEFORE_ACTION. */ 1032 *yy_cp = yy_hold_char;1113 *yy_cp = (yy_hold_char); 1033 1114 YY_RESTORE_YY_MORE_OFFSET 1034 1115 1035 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )1116 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) 1036 1117 { 1037 1118 /* We're scanning a new file or input source. It's … … 1039 1120 * just pointed yyin at a new source and called 1040 1121 * yylex(). If so, then we have to assure 1041 * consistency between yy_current_bufferand our1122 * consistency between YY_CURRENT_BUFFER and our 1042 1123 * globals. Here is the right place to do so, because 1043 1124 * this is the first action (other than possibly a 1044 1125 * back-up) that will match for the new input source. 1045 1126 */ 1046 yy_n_chars = yy_current_buffer->yy_n_chars;1047 yy_current_buffer->yy_input_file = yyin;1048 yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;1127 (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 1128 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; 1129 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; 1049 1130 } 1050 1131 … … 1056 1137 * in input(). 1057 1138 */ 1058 if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )1139 if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) 1059 1140 { /* This was really a NUL. */ 1060 1141 yy_state_type yy_next_state; 1061 1142 1062 yy_c_buf_p = yytext_ptr+ yy_amount_of_matched_text;1063 1064 yy_current_state = yy_get_previous_state( );1143 (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; 1144 1145 yy_current_state = yy_get_previous_state( ); 1065 1146 1066 1147 /* Okay, we're now positioned to make the NUL … … 1075 1156 yy_next_state = yy_try_NUL_trans( yy_current_state ); 1076 1157 1077 yy_bp = yytext_ptr+ YY_MORE_ADJ;1158 yy_bp = (yytext_ptr) + YY_MORE_ADJ; 1078 1159 1079 1160 if ( yy_next_state ) 1080 1161 { 1081 1162 /* Consume the NUL. */ 1082 yy_cp = ++ yy_c_buf_p;1163 yy_cp = ++(yy_c_buf_p); 1083 1164 yy_current_state = yy_next_state; 1084 1165 goto yy_match; … … 1087 1168 else 1088 1169 { 1089 yy_cp = yy_c_buf_p;1170 yy_cp = (yy_c_buf_p); 1090 1171 goto yy_find_action; 1091 1172 } 1092 1173 } 1093 1174 1094 else switch ( yy_get_next_buffer( ) )1175 else switch ( yy_get_next_buffer( ) ) 1095 1176 { 1096 1177 case EOB_ACT_END_OF_FILE: 1097 1178 { 1098 yy_did_buffer_switch_on_eof= 0;1099 1100 if ( yywrap( ) )1179 (yy_did_buffer_switch_on_eof) = 0; 1180 1181 if ( yywrap( ) ) 1101 1182 { 1102 1183 /* Note: because we've taken care in … … 1109 1190 * YY_NULL will get returned. 1110 1191 */ 1111 yy_c_buf_p = yytext_ptr+ YY_MORE_ADJ;1192 (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; 1112 1193 1113 1194 yy_act = YY_STATE_EOF(YY_START); … … 1117 1198 else 1118 1199 { 1119 if ( ! yy_did_buffer_switch_on_eof)1200 if ( ! (yy_did_buffer_switch_on_eof) ) 1120 1201 YY_NEW_FILE; 1121 1202 } … … 1124 1205 1125 1206 case EOB_ACT_CONTINUE_SCAN: 1126 yy_c_buf_p=1127 yytext_ptr+ yy_amount_of_matched_text;1128 1129 yy_current_state = yy_get_previous_state( );1130 1131 yy_cp = yy_c_buf_p;1132 yy_bp = yytext_ptr+ YY_MORE_ADJ;1207 (yy_c_buf_p) = 1208 (yytext_ptr) + yy_amount_of_matched_text; 1209 1210 yy_current_state = yy_get_previous_state( ); 1211 1212 yy_cp = (yy_c_buf_p); 1213 yy_bp = (yytext_ptr) + YY_MORE_ADJ; 1133 1214 goto yy_match; 1134 1215 1135 1216 case EOB_ACT_LAST_MATCH: 1136 yy_c_buf_p=1137 & yy_current_buffer->yy_ch_buf[yy_n_chars];1138 1139 yy_current_state = yy_get_previous_state( );1140 1141 yy_cp = yy_c_buf_p;1142 yy_bp = yytext_ptr+ YY_MORE_ADJ;1217 (yy_c_buf_p) = 1218 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; 1219 1220 yy_current_state = yy_get_previous_state( ); 1221 1222 yy_cp = (yy_c_buf_p); 1223 yy_bp = (yytext_ptr) + YY_MORE_ADJ; 1143 1224 goto yy_find_action; 1144 1225 } … … 1151 1232 } /* end of action switch */ 1152 1233 } /* end of scanning one token */ 1153 } /* end of yylex */ 1154 1234 } /* end of yylex */ 1155 1235 1156 1236 /* yy_get_next_buffer - try to read in a new buffer … … 1161 1241 * EOB_ACT_END_OF_FILE - end of file 1162 1242 */ 1163 1164 static int yy_get_next_buffer() 1165 { 1166 register char *dest = yy_current_buffer->yy_ch_buf; 1167 register char *source = yytext_ptr; 1243 static int yy_get_next_buffer (void) 1244 { 1245 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; 1246 register char *source = (yytext_ptr); 1168 1247 register int number_to_move, i; 1169 1248 int ret_val; 1170 1249 1171 if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars+ 1] )1250 if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) 1172 1251 YY_FATAL_ERROR( 1173 1252 "fatal flex scanner internal error--end of buffer missed" ); 1174 1253 1175 if ( yy_current_buffer->yy_fill_buffer == 0 )1254 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) 1176 1255 { /* Don't try to fill the buffer, so this is an EOF. */ 1177 if ( yy_c_buf_p - yytext_ptr- YY_MORE_ADJ == 1 )1256 if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) 1178 1257 { 1179 1258 /* We matched a single character, the EOB, so … … 1195 1274 1196 1275 /* First move last chars to start of buffer. */ 1197 number_to_move = (int) ( yy_c_buf_p - yytext_ptr) - 1;1276 number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; 1198 1277 1199 1278 for ( i = 0; i < number_to_move; ++i ) 1200 1279 *(dest++) = *(source++); 1201 1280 1202 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )1281 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 1203 1282 /* don't do the read, it's not guaranteed to return an EOF, 1204 1283 * just force an EOF 1205 1284 */ 1206 yy_current_buffer->yy_n_chars = yy_n_chars= 0;1285 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; 1207 1286 1208 1287 else 1209 1288 { 1210 int num_to_read =1211 yy_current_buffer->yy_buf_size - number_to_move - 1;1289 size_t num_to_read = 1290 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; 1212 1291 1213 1292 while ( num_to_read <= 0 ) 1214 1293 { /* Not enough room in the buffer - grow it. */ 1215 #ifdef YY_USES_REJECT1216 YY_FATAL_ERROR(1217 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );1218 #else1219 1294 1220 1295 /* just a shorter name for the current buffer */ 1221 YY_BUFFER_STATE b = yy_current_buffer;1296 YY_BUFFER_STATE b = YY_CURRENT_BUFFER; 1222 1297 1223 1298 int yy_c_buf_p_offset = 1224 (int) ( yy_c_buf_p- b->yy_ch_buf);1299 (int) ((yy_c_buf_p) - b->yy_ch_buf); 1225 1300 1226 1301 if ( b->yy_is_our_buffer ) … … 1235 1310 &
