Changeset 424

Show
Ignore:
Timestamp:
03/25/06 21:11:48 (3 years ago)
Author:
common
Message:

shellcode-signatures
- my approach of using the struct

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • nepenthes/trunk/modules/shellcode-signatures/Makefile.am

    r422 r424  
    1515shellcodesignatures_la_SOURCES += y.tab.c lex.yy.c 
    1616shellcodesignatures_la_SOURCES += shellcode-signatures.cpp shellcode-signatures.hpp  
    17  
     17shellcodesignatures_la_SOURCES += sch_namespace_xor.cpp sch_namespace_xor.hpp 
    1818 
    1919 
  • 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 
    16/* 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  */ 
    67 
    78#define FLEX_SCANNER 
    89#define YY_FLEX_MAJOR_VERSION 2 
    910#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. */ 
    1119#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> 
     35typedef int8_t flex_int8_t; 
     36typedef uint8_t flex_uint8_t; 
     37typedef int16_t flex_int16_t; 
     38typedef uint16_t flex_uint16_t; 
     39typedef int32_t flex_int32_t; 
     40typedef uint32_t flex_uint32_t; 
     41#else 
     42typedef signed char flex_int8_t; 
     43typedef short int flex_int16_t; 
     44typedef int flex_int32_t; 
     45typedef unsigned char flex_uint8_t;  
     46typedef unsigned short int flex_uint16_t; 
     47typedef 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 */ 
    2280 
    2381#ifdef __cplusplus 
    24  
    25 #include <stdlib.h> 
    26  
    27 /* Use prototypes in function declarations. */ 
    28 #define YY_USE_PROTOS 
    2982 
    3083/* The "const" storage-class-modifier is valid. */ 
     
    3588#if __STDC__ 
    3689 
    37 #define YY_USE_PROTOS 
    3890#define YY_USE_CONST 
    3991 
    4092#endif  /* __STDC__ */ 
    4193#endif  /* ! __cplusplus */ 
    42  
    43 #ifdef __TURBOC__ 
    44  #pragma warn -rch 
    45  #pragma warn -use 
    46 #include <io.h> 
    47 #include <stdlib.h> 
    48 #define YY_USE_CONST 
    49 #define YY_USE_PROTOS 
    50 #endif 
    5194 
    5295#ifdef YY_USE_CONST 
     
    5699#endif 
    57100 
    58  
    59 #ifdef YY_USE_PROTOS 
    60 #define YY_PROTO(proto) proto 
    61 #else 
    62 #define YY_PROTO(proto) () 
    63 #endif 
    64  
    65101/* Returned upon end-of-file. */ 
    66102#define YY_NULL 0 
     
    77113 * definition of BEGIN. 
    78114 */ 
    79 #define BEGIN yy_start = 1 + 2 * 
     115#define BEGIN (yy_start) = 1 + 2 * 
    80116 
    81117/* Translate the current start state into a value that can be later handed 
     
    83119 * compatibility. 
    84120 */ 
    85 #define YY_START ((yy_start - 1) / 2) 
     121#define YY_START (((yy_start) - 1) / 2) 
    86122#define YYSTATE YY_START 
    87123 
     
    90126 
    91127/* Special action meaning "start processing a new file". */ 
    92 #define YY_NEW_FILE yyrestart( yyin
     128#define YY_NEW_FILE yyrestart(yyin
    93129 
    94130#define YY_END_OF_BUFFER_CHAR 0 
    95131 
    96132/* Size of default input buffer. */ 
     133#ifndef YY_BUF_SIZE 
    97134#define YY_BUF_SIZE 16384 
    98  
     135#endif 
     136 
     137#ifndef YY_TYPEDEF_YY_BUFFER_STATE 
     138#define YY_TYPEDEF_YY_BUFFER_STATE 
    99139typedef struct yy_buffer_state *YY_BUFFER_STATE; 
     140#endif 
    100141 
    101142extern int yyleng; 
     143 
    102144extern FILE *yyin, *yyout; 
    103145 
     
    106148#define EOB_ACT_LAST_MATCH 2 
    107149 
    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. */ 
    124153#define yyless(n) \ 
    125154        do \ 
    126155                { \ 
    127156                /* 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); \ 
    129160                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; \ 
    131162                YY_DO_BEFORE_ACTION; /* set up yytext again */ \ 
    132163                } \ 
    133164        while ( 0 ) 
    134165 
    135 #define unput(c) yyunput( c, yytext_ptr
     166#define unput(c) yyunput( c, (yytext_ptr)
    136167 
    137168/* The following is because we cannot portably get our hands on size_t 
     
    139170 * flex-generated scanners to compile on their own). 
    140171 */ 
     172 
     173#ifndef YY_TYPEDEF_YY_SIZE_T 
     174#define YY_TYPEDEF_YY_SIZE_T 
    141175typedef unsigned int yy_size_t; 
    142  
    143  
     176#endif 
     177 
     178#ifndef YY_STRUCT_YY_BUFFER_STATE 
     179#define YY_STRUCT_YY_BUFFER_STATE 
    144180struct yy_buffer_state 
    145181        { 
     
    178214        int yy_at_bol; 
    179215 
     216    int yy_bs_lineno; /**< The line count. */ 
     217    int yy_bs_column; /**< The column count. */ 
     218     
    180219        /* Whether to try to fill the input buffer when we reach the 
    181220         * end of it. 
     
    184223 
    185224        int yy_buffer_status; 
     225 
    186226#define YY_BUFFER_NEW 0 
    187227#define YY_BUFFER_NORMAL 1 
     
    197237         */ 
    198238#define YY_BUFFER_EOF_PENDING 2 
     239 
    199240        }; 
    200  
    201 static YY_BUFFER_STATE yy_current_buffer = 0; 
     241#endif /* !YY_STRUCT_YY_BUFFER_STATE */ 
     242 
     243/* Stack of input buffers. */ 
     244static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ 
     245static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ 
     246static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ 
    202247 
    203248/* We provide macros for accessing buffer states in case in the 
    204249 * future we want to put the buffer states in a more general 
    205250 * "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)] 
    209262 
    210263/* yy_hold_char holds the character lost when yytext is formed. */ 
    211264static char yy_hold_char; 
    212  
    213265static int yy_n_chars;          /* number of characters read into yy_ch_buf */ 
    214  
    215  
    216266int yyleng; 
    217267 
     
    226276static int yy_did_buffer_switch_on_eof; 
    227277 
    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 * )); 
     278void yyrestart (FILE *input_file  ); 
     279void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  ); 
     280YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  ); 
     281void yy_delete_buffer (YY_BUFFER_STATE b  ); 
     282void yy_flush_buffer (YY_BUFFER_STATE b  ); 
     283void yypush_buffer_state (YY_BUFFER_STATE new_buffer  ); 
     284void yypop_buffer_state (void ); 
     285 
     286static void yyensure_buffer_stack (void ); 
     287static void yy_load_buffer_state (void ); 
     288static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file  ); 
     289 
     290#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) 
     291 
     292YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  ); 
     293YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  ); 
     294YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len  ); 
     295 
     296void *yyalloc (yy_size_t  ); 
     297void *yyrealloc (void *,yy_size_t  ); 
     298void yyfree (void *  ); 
    245299 
    246300#define yy_new_buffer yy_create_buffer 
     
    248302#define yy_set_interactive(is_interactive) \ 
    249303        { \ 
    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; \ 
    253310        } 
    254311 
    255312#define yy_set_bol(at_bol) \ 
    256313        { \ 
    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; \ 
    260320        } 
    261321 
    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 */ 
    263325 
    264326typedef unsigned char YY_CHAR; 
     327 
    265328FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; 
     329 
    266330typedef int yy_state_type; 
     331 
     332extern int yylineno; 
     333 
     334int yylineno = 1; 
     335 
    267336extern char *yytext; 
    268337#define yytext_ptr yytext 
    269338 
    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[] )); 
     339static yy_state_type yy_get_previous_state (void ); 
     340static yy_state_type yy_try_NUL_trans (yy_state_type current_state  ); 
     341static int yy_get_next_buffer (void ); 
     342static void yy_fatal_error (yyconst char msg[]  ); 
    274343 
    275344/* Done after the current pattern has been matched and before the 
     
    277346 */ 
    278347#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; \ 
    282351        *yy_cp = '\0'; \ 
    283         yy_c_buf_p = yy_cp; 
     352        (yy_c_buf_p) = yy_cp; 
    284353 
    285354#define YY_NUM_RULES 51 
    286355#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. */ 
     358struct yy_trans_info 
     359        { 
     360        flex_int32_t yy_verify; 
     361        flex_int32_t yy_nxt; 
     362        }; 
     363static yyconst flex_int16_t yy_accept[216] = 
    288364    {   0, 
    289365       49,   49,   34,   34,   47,   47,   52,   51,   49,   50, 
     
    313389    } ; 
    314390 
    315 static yyconst int yy_ec[256] = 
     391static yyconst flex_int32_t yy_ec[256] = 
    316392    {   0, 
    317393        1,    1,    1,    1,    1,    1,    1,    1,    2,    3, 
     
    345421    } ; 
    346422 
    347 static yyconst int yy_meta[46] = 
     423static yyconst flex_int32_t yy_meta[46] = 
    348424    {   0, 
    349425        1,    1,    2,    1,    1,    3,    1,    1,    4,    1, 
     
    354430    } ; 
    355431 
    356 static yyconst short int yy_base[224] = 
     432static yyconst flex_int16_t yy_base[224] = 
    357433    {   0, 
    358434        0,    0,   43,   44,   42,   43,  258,  259,   52,  259, 
     
    383459    } ; 
    384460 
    385 static yyconst short int yy_def[224] = 
     461static yyconst flex_int16_t yy_def[224] = 
    386462    {   0, 
    387463      215,    1,  216,  216,  217,  217,  215,  215,  215,  215, 
     
    412488    } ; 
    413489 
    414 static yyconst short int yy_nxt[305] = 
     490static yyconst flex_int16_t yy_nxt[305] = 
    415491    {   0, 
    416492        8,    9,   10,    9,    9,   11,   12,   13,    8,   14, 
     
    450526    } ; 
    451527 
    452 static yyconst short int yy_chk[305] = 
     528static yyconst flex_int16_t yy_chk[305] = 
    453529    {   0, 
    454530        1,    1,    1,    1,    1,    1,    1,    1,    1,    1, 
     
    491567static char *yy_last_accepting_cpos; 
    492568 
     569extern int yy_flex_debug; 
     570int yy_flex_debug = 0; 
     571 
    493572/* The intent behind this definition is that it'll catch 
    494573 * any uses of REJECT which flex missed. 
     
    500579char *yytext; 
    501580#line 1 "parser.l" 
    502 #define INITIAL 0 
    503581/* $Id$ */ 
    504582#line 3 "parser.l" 
     
    516594static int string_cap = 0; 
    517595 
     596 
     597#line 598 "lex.yy.c" 
     598 
     599#define INITIAL 0 
    518600#define comment 1 
    519601#define string 2 
    520602 
    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 
    522614 
    523615/* Macros after this point can all be overridden by user definitions in 
     
    527619#ifndef YY_SKIP_YYWRAP 
    528620#ifdef __cplusplus 
    529 extern "C" int yywrap YY_PROTO(( void )); 
     621extern "C" int yywrap (void ); 
    530622#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  
     623extern int yywrap (void ); 
     624#endif 
     625#endif 
     626 
     627    static void yyunput (int c,char *buf_ptr  ); 
     628     
    539629#ifndef yytext_ptr 
    540 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); 
     630static void yy_flex_strncpy (char *,yyconst char *,int ); 
    541631#endif 
    542632 
    543633#ifdef YY_NEED_STRLEN 
    544 static int yy_flex_strlen YY_PROTO(( yyconst char * )); 
     634static int yy_flex_strlen (yyconst char * ); 
    545635#endif 
    546636 
    547637#ifndef YY_NO_INPUT 
     638 
    548639#ifdef __cplusplus 
    549 static int yyinput YY_PROTO(( void )); 
     640static int yyinput (void ); 
    550641#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 
     642static int input (void ); 
     643#endif 
     644 
    588645#endif 
    589646 
     
    594651 
    595652/* Copy whatever the last rule matched to the standard output. */ 
    596  
    597653#ifndef ECHO 
    598654/* This used to be an fputs(), but since the string might contain NUL's, 
     
    607663#ifndef YY_INPUT 
    608664#define YY_INPUT(buf,result,max_size) \ 
    609         if ( yy_current_buffer->yy_is_interactive ) \ 
     665        if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ 
    610666                { \ 
    611                 int c = '*', n; \ 
     667                int c = '*'; \ 
     668                size_t n; \ 
    612669                for ( n = 0; n < max_size && \ 
    613670                             (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ 
     
    619676                result = n; \ 
    620677                } \ 
    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 
    624694#endif 
    625695 
     
    642712#endif 
    643713 
     714/* end tables serialization structures and prototypes */ 
     715 
    644716/* Default declaration of generated scanner - a define so the user can 
    645717 * easily add parameters. 
    646718 */ 
    647719#ifndef YY_DECL 
    648 #define YY_DECL int yylex YY_PROTO(( void )) 
    649 #endif 
     720#define YY_DECL_IS_OURS 1 
     721 
     722extern int yylex (void); 
     723 
     724#define YY_DECL int yylex (void) 
     725#endif /* !YY_DECL */ 
    650726 
    651727/* Code executed at the beginning of each rule, after yytext and yyleng 
     
    664740        YY_USER_ACTION 
    665741 
     742/** The main scanner function which does all the work. 
     743 */ 
    666744YY_DECL 
    667        
     745
    668746        register yy_state_type yy_current_state; 
    669         register char *yy_cp = NULL, *yy_bp = NULL
     747        register char *yy_cp, *yy_bp
    670748        register int yy_act; 
    671  
     749     
    672750#line 25 "parser.l" 
    673751 
    674752 
    675753 
    676 #line 677 "lex.yy.c" 
    677  
    678         if ( yy_init
     754#line 755 "lex.yy.c" 
     755 
     756        if ( (yy_init)
    679757                { 
    680                 yy_init = 0; 
     758                (yy_init) = 0; 
    681759 
    682760#ifdef YY_USER_INIT 
     
    684762#endif 
    685763 
    686                 if ( ! yy_start
    687                         yy_start = 1; /* first start state */ 
     764                if ( ! (yy_start)
     765                        (yy_start) = 1;       /* first start state */ 
    688766 
    689767                if ( ! yyin ) 
     
    693771                        yyout = stdout; 
    694772 
    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( ); 
    700780                } 
    701781 
    702782        while ( 1 )             /* loops until end-of-file is reached */ 
    703783                { 
    704                 yy_cp = yy_c_buf_p
     784                yy_cp = (yy_c_buf_p)
    705785 
    706786                /* Support of yytext. */ 
    707                 *yy_cp = yy_hold_char
     787                *yy_cp = (yy_hold_char)
    708788 
    709789                /* yy_bp points to the position in yy_ch_buf of the start of 
     
    712792                yy_bp = yy_cp; 
    713793 
    714                 yy_current_state = yy_start
     794                yy_current_state = (yy_start)
    715795yy_match: 
    716796                do 
     
    719799                        if ( yy_accept[yy_current_state] ) 
    720800                                { 
    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; 
    723803                                } 
    724804                        while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 
     
    737817                if ( yy_act == 0 ) 
    738818                        { /* 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)
    741821                        yy_act = yy_accept[yy_current_state]; 
    742822                        } 
     
    744824                YY_DO_BEFORE_ACTION; 
    745825 
    746  
    747826do_action:      /* This label is used only to access EOF actions. */ 
    748  
    749827 
    750828                switch ( yy_act ) 
     
    752830                        case 0: /* must back up */ 
    753831                        /* 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)
    757835                        goto yy_find_action; 
    758836 
     
    9381016        YY_BREAK 
    9391017case 37: 
     1018/* rule 37 can match eol */ 
    9401019YY_RULE_SETUP 
    9411020#line 72 "parser.l" 
     
    9941073        YY_BREAK 
    9951074case 47: 
     1075/* rule 47 can match eol */ 
    9961076YY_RULE_SETUP 
    9971077#line 89 "parser.l" 
     
    10091089        YY_BREAK 
    10101090case 50: 
     1091/* rule 50 can match eol */ 
    10111092YY_RULE_SETUP 
    10121093#line 94 "parser.l" 
     
    10181099ECHO; 
    10191100        YY_BREAK 
    1020 #line 1021 "lex.yy.c" 
     1101#line 1102 "lex.yy.c" 
    10211102case YY_STATE_EOF(INITIAL): 
    10221103case YY_STATE_EOF(comment): 
     
    10271108                { 
    10281109                /* 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; 
    10301111 
    10311112                /* Undo the effects of YY_DO_BEFORE_ACTION. */ 
    1032                 *yy_cp = yy_hold_char
     1113                *yy_cp = (yy_hold_char)
    10331114                YY_RESTORE_YY_MORE_OFFSET 
    10341115 
    1035                 if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) 
     1116                if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) 
    10361117                        { 
    10371118                        /* We're scanning a new file or input source.  It's 
     
    10391120                         * just pointed yyin at a new source and called 
    10401121                         * yylex().  If so, then we have to assure 
    1041                          * consistency between yy_current_buffer and our 
     1122                         * consistency between YY_CURRENT_BUFFER and our 
    10421123                         * globals.  Here is the right place to do so, because 
    10431124                         * this is the first action (other than possibly a 
    10441125                         * back-up) that will match for the new input source. 
    10451126                         */ 
    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; 
    10491130                        } 
    10501131 
     
    10561137                 * in input(). 
    10571138                 */ 
    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)] ) 
    10591140                        { /* This was really a NUL. */ 
    10601141                        yy_state_type yy_next_state; 
    10611142 
    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(  ); 
    10651146 
    10661147                        /* Okay, we're now positioned to make the NUL 
     
    10751156                        yy_next_state = yy_try_NUL_trans( yy_current_state ); 
    10761157 
    1077                         yy_bp = yytext_ptr + YY_MORE_ADJ; 
     1158                        yy_bp = (yytext_ptr) + YY_MORE_ADJ; 
    10781159 
    10791160                        if ( yy_next_state ) 
    10801161                                { 
    10811162                                /* Consume the NUL. */ 
    1082                                 yy_cp = ++yy_c_buf_p
     1163                                yy_cp = ++(yy_c_buf_p)
    10831164                                yy_current_state = yy_next_state; 
    10841165                                goto yy_match; 
     
    10871168                        else 
    10881169                                { 
    1089                                 yy_cp = yy_c_buf_p
     1170                                yy_cp = (yy_c_buf_p)
    10901171                                goto yy_find_action; 
    10911172                                } 
    10921173                        } 
    10931174 
    1094                 else switch ( yy_get_next_buffer() ) 
     1175                else switch ( yy_get_next_buffer(  ) ) 
    10951176                        { 
    10961177                        case EOB_ACT_END_OF_FILE: 
    10971178                                { 
    1098                                 yy_did_buffer_switch_on_eof = 0; 
    1099  
    1100                                 if ( yywrap() ) 
     1179                                (yy_did_buffer_switch_on_eof) = 0; 
     1180 
     1181                                if ( yywrap( ) ) 
    11011182                                        { 
    11021183                                        /* Note: because we've taken care in 
     
    11091190                                         * YY_NULL will get returned. 
    11101191                                         */ 
    1111                                         yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; 
     1192                                        (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; 
    11121193 
    11131194                                        yy_act = YY_STATE_EOF(YY_START); 
     
    11171198                                else 
    11181199                                        { 
    1119                                         if ( ! yy_did_buffer_switch_on_eof
     1200                                        if ( ! (yy_did_buffer_switch_on_eof)
    11201201                                                YY_NEW_FILE; 
    11211202                                        } 
     
    11241205 
    11251206                        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; 
    11331214                                goto yy_match; 
    11341215 
    11351216                        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; 
    11431224                                goto yy_find_action; 
    11441225                        } 
     
    11511232        } /* end of action switch */ 
    11521233                } /* end of scanning one token */ 
    1153         } /* end of yylex */ 
    1154  
     1234} /* end of yylex */ 
    11551235 
    11561236/* yy_get_next_buffer - try to read in a new buffer 
     
    11611241 *      EOB_ACT_END_OF_FILE - end of file 
    11621242 */ 
    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; 
     1243static int yy_get_next_buffer (void) 
     1244
     1245        register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; 
     1246        register char *source = (yytext_ptr); 
    11681247        register int number_to_move, i; 
    11691248        int ret_val; 
    11701249 
    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] ) 
    11721251                YY_FATAL_ERROR( 
    11731252                "fatal flex scanner internal error--end of buffer missed" ); 
    11741253 
    1175         if ( yy_current_buffer->yy_fill_buffer == 0 ) 
     1254        if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) 
    11761255                { /* 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 ) 
    11781257                        { 
    11791258                        /* We matched a single character, the EOB, so 
     
    11951274 
    11961275        /* 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; 
    11981277 
    11991278        for ( i = 0; i < number_to_move; ++i ) 
    12001279                *(dest++) = *(source++); 
    12011280 
    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 ) 
    12031282                /* don't do the read, it's not guaranteed to return an EOF, 
    12041283                 * just force an EOF 
    12051284                 */ 
    1206                 yy_current_buffer->yy_n_chars = yy_n_chars = 0; 
     1285                YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; 
    12071286 
    12081287        else 
    12091288                { 
    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; 
    12121291 
    12131292                while ( num_to_read <= 0 ) 
    12141293                        { /* Not enough room in the buffer - grow it. */ 
    1215 #ifdef YY_USES_REJECT 
    1216                         YY_FATAL_ERROR( 
    1217 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); 
    1218 #else 
    12191294 
    12201295                        /* just a shorter name for the current buffer */ 
    1221                         YY_BUFFER_STATE b = yy_current_buffer
     1296                        YY_BUFFER_STATE b = YY_CURRENT_BUFFER
    12221297 
    12231298                        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); 
    12251300 
    12261301                        if ( b->yy_is_our_buffer ) 
     
    12351310  &