/* A lexical scanner generated by flex*/ /* Scanner skeleton version: * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $ */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #include #include /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ #ifdef c_plusplus #ifndef __cplusplus #define __cplusplus #endif #endif #ifdef __cplusplus #include /* Use prototypes in function declarations. */ #define YY_USE_PROTOS /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ #if __STDC__ #define YY_USE_PROTOS #define YY_USE_CONST #endif /* __STDC__ */ #endif /* ! __cplusplus */ #ifdef __TURBOC__ #pragma warn -rch #pragma warn -use #include #include #define YY_USE_CONST #define YY_USE_PROTOS #endif #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif #ifdef YY_USE_PROTOS #define YY_PROTO(proto) proto #else #define YY_PROTO(proto) () #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN yy_start = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START ((yy_start - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE yyrestart( yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #define YY_BUF_SIZE 16384 typedef struct yy_buffer_state *YY_BUFFER_STATE; extern int yyleng; extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 /* The funky do-while in the following #define is used to turn the definition * int a single C statement (which needs a semi-colon terminator). This * avoids problems with code like: * * if ( condition_holds ) * yyless( 5 ); * else * do_something_else(); * * Prior to using the do-while the compiler would get upset at the * "else" because it interpreted the "if" statement as being all * done when it reached the ';' after the yyless() call. */ /* Return all but the first 'n' matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ *yy_cp = yy_hold_char; \ YY_RESTORE_YY_MORE_OFFSET \ yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, yytext_ptr ) /* Some routines like yy_flex_realloc() are emitted as static but are not called by all lexers. This generates warnings in some compilers, notably GCC. Arrange to suppress these. */ #ifdef __GNUC__ #define YY_MAY_BE_UNUSED __attribute__((unused)) #else #define YY_MAY_BE_UNUSED #endif /* The following is because we cannot portably get our hands on size_t * (without autoconf's help, which isn't available because we want * flex-generated scanners to compile on their own). */ typedef unsigned int yy_size_t; struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via yyrestart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; static YY_BUFFER_STATE yy_current_buffer = 0; /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". */ #define YY_CURRENT_BUFFER yy_current_buffer /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 1; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void yyrestart YY_PROTO(( FILE *input_file )); void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); void yy_load_buffer_state YY_PROTO(( void )); YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); static void *yy_flex_alloc YY_PROTO(( yy_size_t )); static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) YY_MAY_BE_UNUSED; static void yy_flex_free YY_PROTO(( void * )); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! yy_current_buffer ) \ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ yy_current_buffer->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! yy_current_buffer ) \ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ yy_current_buffer->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) #define yywrap() 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; typedef int yy_state_type; extern char *yytext; #define yytext_ptr yytext static yy_state_type yy_get_previous_state YY_PROTO(( void )); static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); static int yy_get_next_buffer YY_PROTO(( void )); static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ yytext_ptr = yy_bp; \ yyleng = (int) (yy_cp - yy_bp); \ yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yy_c_buf_p = yy_cp; #define YY_NUM_RULES 244 #define YY_END_OF_BUFFER 245 static yyconst short int yy_accept[2179] = { 0, 243, 243, 3, 3, 6, 6, 0, 0, 245, 243, 241, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 3, 3, 3, 6, 6, 6, 244, 244, 243, 243, 242, 243, 241, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 3, 3, 3, 3, 6, 6, 6, 6, 0, 241, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 48, 48, 243, 49, 49, 3, 6, 47, 47, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 19, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 36, 36, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 1, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 38, 38, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 46, 46, 243, 243, 243, 243, 243, 243, 3, 6, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 33, 33, 243, 243, 31, 31, 243, 243, 243, 243, 243, 243, 45, 45, 243, 243, 30, 30, 243, 243, 243, 243, 243, 42, 42, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 34, 34, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 4, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 18, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 35, 35, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 29, 29, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 32, 32, 119, 119, 243, 3, 6, 243, 243, 243, 243, 243, 15, 15, 243, 243, 243, 243, 243, 243, 233, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 28, 28, 243, 243, 243, 44, 44, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 124, 124, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 8, 8, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 50, 50, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 12, 12, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 53, 53, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 3, 6, 243, 67, 67, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 40, 40, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 51, 51, 243, 65, 65, 243, 243, 243, 243, 37, 37, 39, 39, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 235, 235, 243, 243, 243, 243, 243, 243, 243, 10, 10, 243, 148, 148, 243, 243, 24, 24, 243, 243, 243, 243, 66, 66, 243, 243, 243, 27, 27, 243, 243, 243, 243, 243, 243, 243, 57, 57, 243, 243, 243, 243, 243, 243, 243, 144, 144, 3, 2, 6, 243, 243, 243, 243, 154, 154, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 193, 193, 243, 243, 194, 194, 243, 243, 243, 243, 243, 203, 203, 243, 79, 79, 81, 81, 243, 243, 243, 243, 243, 243, 243, 181, 181, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 7, 7, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 114, 114, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 113, 113, 204, 204, 69, 69, 243, 243, 243, 243, 243, 243, 58, 58, 243, 6, 5, 243, 243, 243, 68, 68, 243, 243, 243, 243, 220, 220, 243, 243, 243, 224, 224, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 80, 80, 243, 243, 243, 243, 243, 108, 108, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 21, 21, 243, 243, 243, 243, 243, 243, 89, 89, 243, 243, 243, 85, 85, 243, 243, 243, 9, 9, 70, 70, 71, 71, 90, 90, 243, 243, 131, 131, 243, 243, 76, 76, 73, 73, 243, 243, 243, 219, 219, 243, 243, 243, 243, 243, 243, 243, 126, 126, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 13, 13, 243, 243, 243, 243, 243, 243, 191, 191, 54, 54, 243, 243, 243, 243, 243, 243, 243, 77, 77, 120, 120, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 100, 100, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 59, 59, 243, 106, 106, 243, 243, 190, 190, 243, 243, 243, 243, 243, 243, 234, 234, 243, 111, 111, 243, 243, 93, 93, 243, 243, 243, 243, 243, 243, 243, 14, 243, 243, 214, 214, 243, 243, 145, 145, 208, 208, 243, 243, 243, 243, 209, 209, 243, 243, 243, 243, 23, 23, 243, 243, 146, 146, 243, 243, 55, 55, 243, 41, 41, 243, 243, 86, 86, 243, 243, 243, 243, 243, 243, 243, 118, 118, 243, 218, 218, 243, 243, 243, 243, 243, 243, 243, 43, 43, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 125, 125, 243, 243, 243, 243, 243, 243, 243, 243, 243, 227, 227, 98, 98, 243, 243, 243, 78, 78, 243, 243, 243, 243, 17, 17, 243, 243, 243, 243, 243, 134, 134, 243, 243, 243, 243, 222, 222, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 192, 192, 130, 130, 243, 243, 243, 52, 52, 243, 243, 229, 229, 243, 94, 94, 243, 243, 243, 243, 243, 243, 243, 243, 64, 64, 243, 243, 243, 243, 96, 96, 243, 243, 207, 207, 243, 243, 243, 243, 20, 20, 243, 231, 231, 243, 243, 243, 87, 87, 243, 243, 84, 84, 91, 91, 92, 92, 243, 243, 243, 243, 243, 243, 243, 243, 243, 182, 182, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 26, 26, 243, 243, 107, 107, 243, 243, 123, 123, 243, 243, 243, 243, 243, 243, 129, 129, 243, 60, 60, 97, 97, 243, 110, 110, 243, 243, 223, 223, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 104, 104, 206, 206, 243, 243, 243, 243, 243, 103, 103, 127, 127, 243, 243, 22, 22, 243, 243, 83, 83, 82, 82, 243, 189, 189, 243, 243, 243, 243, 16, 16, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 105, 105, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 25, 25, 243, 109, 109, 243, 243, 183, 183, 226, 226, 132, 132, 243, 243, 243, 243, 243, 243, 243, 243, 243, 139, 139, 243, 243, 243, 201, 201, 243, 243, 243, 243, 243, 243, 243, 243, 232, 232, 243, 11, 11, 243, 243, 243, 243, 213, 213, 243, 243, 243, 243, 243, 243, 243, 72, 72, 243, 216, 216, 243, 102, 102, 243, 243, 243, 243, 243, 243, 243, 147, 147, 151, 151, 243, 243, 63, 63, 243, 150, 150, 243, 217, 217, 243, 243, 243, 161, 161, 243, 243, 243, 159, 159, 243, 243, 243, 243, 243, 243, 243, 169, 169, 157, 157, 243, 243, 243, 243, 243, 243, 243, 243, 243, 166, 166, 243, 243, 243, 243, 230, 230, 149, 149, 243, 243, 243, 243, 243, 199, 199, 243, 243, 243, 243, 243, 202, 202, 243, 142, 142, 243, 243, 243, 187, 187, 243, 228, 228, 243, 243, 243, 237, 237, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 239, 239, 122, 122, 197, 197, 243, 243, 56, 56, 243, 243, 243, 243, 61, 61, 243, 243, 243, 243, 243, 177, 177, 243, 173, 173, 243, 243, 172, 172, 243, 243, 162, 162, 243, 243, 243, 243, 243, 243, 156, 156, 243, 243, 243, 243, 243, 195, 195, 243, 115, 115, 243, 243, 243, 243, 243, 243, 221, 221, 243, 243, 138, 138, 243, 243, 198, 198, 243, 243, 243, 243, 243, 112, 112, 128, 128, 143, 143, 243, 184, 184, 243, 243, 243, 243, 196, 196, 243, 243, 121, 121, 243, 101, 101, 62, 62, 243, 243, 243, 117, 117, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 165, 165, 243, 243, 99, 99, 243, 243, 243, 243, 136, 136, 225, 225, 243, 140, 140, 137, 137, 135, 135, 141, 141, 243, 243, 243, 243, 185, 185, 243, 243, 186, 186, 243, 205, 205, 243, 212, 212, 243, 236, 236, 243, 243, 243, 243, 171, 171, 180, 180, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 188, 188, 215, 215, 243, 243, 243, 243, 243, 210, 210, 243, 243, 133, 133, 116, 116, 243, 243, 243, 243, 164, 164, 175, 175, 176, 176, 178, 178, 243, 167, 167, 155, 155, 243, 243, 243, 152, 152, 243, 243, 74, 74, 243, 243, 200, 200, 211, 211, 243, 243, 160, 160, 243, 243, 243, 243, 243, 243, 243, 243, 243, 238, 238, 88, 88, 243, 243, 243, 243, 243, 243, 243, 243, 75, 75, 243, 243, 243, 158, 158, 243, 168, 168, 163, 163, 95, 95, 153, 153, 243, 170, 170, 174, 174, 243, 243, 179, 179, 240, 240, 0 } ; static yyconst int yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 4, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 1, 1, 1, 6, 7, 1, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst int yy_meta[34] = { 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst short int yy_base[2435] = { 0, 0, 6, 37, 38, 39, 43, 45, 50, 2464, 0, 2465, 2460, 0, 47, 40, 68, 53, 67, 72, 35, 69, 88, 2441, 108, 81, 109, 84, 129, 94, 145, 162, 37, 56, 117, 93, 2459, 0, 77, 2439, 0, 99, 2438, 2465, 121, 0, 2455, 2465, 130, 0, 117, 2441, 2440, 2432, 90, 2427, 2426, 127, 2430, 2440, 117, 2442, 2433, 2427, 121, 2427, 2415, 2420, 2419, 2427, 2430, 2430, 2417, 2429, 2406, 2415, 2420, 2414, 2412, 2425, 2406, 2404, 2428, 2417, 2408, 44, 2420, 2414, 2403, 2398, 2394, 2409, 2396, 2410, 181, 137, 2405, 2398, 100, 2410, 2394, 2398, 137, 2399, 2401, 2385, 2386, 2400, 2379, 2386, 138, 127, 2386, 2398, 2393, 2388, 159, 2381, 158, 167, 2393, 2393, 2373, 2377, 2386, 2374, 174, 2384, 2376, 2375, 150, 2391, 172, 167, 2390, 2383, 2388, 0, 196, 0, 2378, 0, 200, 0, 2377, 201, 2465, 2385, 2370, 2356, 2364, 2364, 2367, 2359, 2372, 2357, 2357, 2351, 2366, 2343, 2367, 2348, 2345, 189, 2359, 194, 188, 2343, 209, 2367, 2356, 2359, 2339, 2336, 215, 207, 2352, 212, 2352, 2350, 213, 2331, 2350, 2352, 2349, 2355, 2335, 2327, 2352, 217, 226, 2333, 2322, 2324, 2338, 2337, 2336, 2329, 2330, 2333, 2337, 2331, 217, 2316, 2329, 2328, 220, 2327, 2327, 2310, 249, 2323, 2323, 2327, 2301, 2320, 2306, 2315, 2309, 2310, 2325, 2299, 2313, 226, 2305, 2307, 2315, 2296, 2313, 2300, 2286, 2305, 2286, 2293, 2312, 2301, 2296, 217, 2303, 2308, 2282, 2283, 2288, 2287, 2297, 2292, 2289, 2290, 2277, 2292, 2292, 2270, 2276, 2278, 2288, 2292, 2270, 2278, 2272, 2288, 2287, 0, 2286, 2255, 0, 2284, 2265, 2265, 0, 2281, 2253, 2269, 239, 2264, 2277, 2250, 2267, 2269, 2268, 2262, 2255, 2265, 268, 2239, 2254, 2267, 2254, 2246, 2264, 2237, 2252, 2255, 2250, 2249, 2238, 2257, 2238, 2245, 2254, 2245, 2227, 241, 2245, 248, 2465, 2250, 2223, 2248, 2227, 2227, 2245, 2225, 2219, 2219, 2236, 2230, 2216, 2232, 0, 2237, 2211, 2216, 2234, 2216, 2213, 2207, 2211, 233, 2223, 2211, 2213, 2212, 240, 2201, 251, 2219, 2204, 2217, 2204, 2196, 262, 2219, 2210, 2212, 2199, 2192, 2191, 2192, 2191, 2186, 264, 2205, 268, 2465, 275, 2204, 2185, 2182, 272, 2192, 2199, 273, 256, 2204, 2195, 2189, 2196, 2177, 2182, 2193, 2192, 2191, 2195, 2184, 2193, 2172, 2181, 2180, 2165, 2182, 2177, 279, 2169, 2171, 2163, 2178, 2157, 0, 2181, 2171, 2154, 2169, 2152, 2166, 2158, 2174, 2143, 2167, 2161, 2145, 2145, 2168, 2155, 2160, 2139, 2150, 2155, 2152, 2151, 2155, 2131, 0, 2158, 2137, 2143, 2150, 2154, 2153, 2128, 2127, 2130, 2143, 2148, 2123, 2121, 2135, 2144, 2120, 2126, 2135, 2134, 2116, 2114, 0, 2116, 277, 2130, 2117, 2115, 2127, 2112, 2121, 2106, 2115, 2109, 0, 2127, 2112, 2100, 0, 2124, 2099, 2114, 2107, 2101, 2110, 2100, 0, 2117, 2096, 2106, 0, 2114, 2088, 2098, 2104, 2087, 2084, 0, 2108, 2090, 2106, 277, 2093, 2104, 2094, 2081, 2095, 2077, 2099, 2088, 2089, 2082, 2085, 0, 2094, 2073, 2067, 2077, 2076, 2075, 2074, 2061, 2066, 2068, 2072, 2060, 2059, 2071, 2055, 2059, 2057, 2072, 287, 2076, 2069, 301, 2465, 2074, 2073, 2058, 2065, 2056, 2063, 2068, 2067, 2056, 304, 2465, 306, 2065, 2043, 284, 2057, 2037, 2043, 2040, 2030, 2046, 2033, 2048, 2041, 296, 2054, 2028, 2038, 2045, 2045, 2043, 301, 2038, 2021, 0, 2046, 2037, 2044, 2025, 309, 2034, 2016, 2012, 2030, 2019, 2018, 2036, 2016, 2034, 2015, 2019, 315, 2006, 2025, 2019, 2028, 2002, 0, 2026, 2004, 2015, 2023, 1992, 1995, 2020, 1996, 2009, 2007, 2007, 1995, 2014, 1990, 1992, 1997, 1991, 1984, 2002, 0, 2007, 0, 2006, 2005, 1992, 1980, 1977, 2001, 1979, 1985, 1989, 0, 1997, 1996, 303, 1974, 1973, 1977, 1965, 0, 1970, 1966, 1964, 1970, 1966, 1966, 1962, 1967, 1973, 1972, 1962, 1968, 1960, 1973, 1967, 1951, 1956, 1949, 1973, 1967, 1962, 1970, 1955, 1948, 1950, 1961, 1951, 1964, 0, 65, 137, 159, 181, 0, 187, 207, 241, 231, 280, 316, 311, 302, 310, 322, 315, 305, 320, 311, 313, 316, 317, 315, 319, 324, 318, 320, 331, 331, 333, 323, 336, 339, 323, 337, 327, 349, 323, 0, 351, 352, 334, 325, 350, 349, 358, 359, 337, 344, 345, 352, 347, 335, 0, 366, 350, 349, 359, 353, 367, 368, 354, 371, 363, 354, 363, 363, 375, 372, 0, 383, 384, 360, 361, 381, 358, 364, 380, 381, 363, 372, 369, 0, 395, 391, 397, 380, 374, 395, 395, 402, 373, 377, 406, 395, 408, 389, 393, 411, 395, 399, 390, 393, 416, 404, 408, 399, 420, 400, 399, 0, 423, 414, 425, 426, 427, 409, 429, 424, 420, 401, 408, 434, 414, 436, 437, 430, 431, 0, 442, 433, 424, 445, 446, 429, 418, 428, 429, 451, 438, 436, 429, 455, 451, 451, 450, 436, 443, 456, 457, 451, 459, 453, 460, 458, 458, 459, 465, 471, 453, 459, 474, 455, 457, 467, 467, 459, 480, 481, 482, 483, 454, 480, 467, 479, 0, 489, 481, 491, 478, 493, 478, 472, 479, 491, 489, 490, 491, 478, 472, 478, 476, 499, 501, 484, 498, 481, 484, 505, 487, 507, 508, 515, 0, 516, 507, 0, 518, 492, 510, 504, 512, 0, 523, 0, 524, 525, 509, 507, 517, 529, 510, 525, 511, 533, 534, 535, 536, 529, 526, 539, 519, 533, 542, 543, 527, 528, 527, 547, 548, 524, 527, 546, 527, 534, 533, 534, 556, 547, 540, 534, 0, 560, 541, 557, 566, 533, 564, 537, 552, 0, 567, 568, 0, 569, 543, 571, 0, 582, 575, 567, 563, 563, 0, 592, 593, 595, 568, 0, 597, 588, 589, 576, 601, 602, 603, 579, 0, 605, 599, 596, 608, 609, 580, 611, 591, 0, 613, 614, 2465, 616, 613, 609, 601, 621, 0, 622, 603, 603, 608, 609, 627, 618, 599, 625, 631, 626, 616, 618, 605, 636, 623, 632, 640, 616, 642, 624, 614, 646, 638, 625, 621, 0, 650, 645, 641, 0, 653, 635, 657, 658, 639, 642, 0, 663, 664, 0, 665, 0, 666, 667, 645, 646, 656, 641, 672, 663, 0, 674, 665, 646, 667, 653, 679, 674, 658, 682, 683, 678, 666, 679, 661, 688, 680, 680, 668, 680, 693, 686, 678, 696, 697, 684, 676, 700, 701, 702, 683, 696, 705, 706, 679, 683, 699, 710, 711, 712, 713, 698, 705, 716, 700, 718, 720, 721, 717, 723, 712, 0, 725, 726, 721, 720, 718, 704, 717, 722, 733, 734, 726, 716, 727, 729, 721, 721, 733, 725, 737, 737, 727, 738, 733, 729, 735, 741, 750, 752, 742, 735, 752, 763, 0, 764, 753, 743, 768, 759, 743, 760, 761, 760, 761, 776, 777, 759, 779, 780, 757, 0, 782, 0, 783, 0, 784, 775, 769, 787, 788, 789, 769, 0, 791, 775, 793, 2465, 775, 787, 797, 0, 798, 772, 790, 771, 788, 0, 803, 776, 805, 782, 0, 807, 785, 799, 803, 811, 812, 794, 791, 795, 796, 811, 810, 814, 819, 807, 822, 813, 807, 829, 830, 832, 823, 816, 821, 836, 837, 820, 839, 823, 841, 0, 842, 843, 826, 845, 820, 842, 0, 848, 840, 841, 850, 852, 843, 854, 848, 836, 857, 858, 852, 860, 844, 841, 863, 864, 842, 842, 853, 868, 859, 870, 0, 871, 872, 849, 874, 875, 870, 877, 0, 878, 851, 864, 881, 0, 882, 883, 874, 885, 0, 886, 0, 887, 0, 889, 0, 890, 891, 892, 0, 893, 888, 895, 0, 896, 0, 897, 884, 899, 875, 0, 901, 894, 890, 887, 886, 896, 890, 908, 0, 909, 910, 884, 894, 899, 900, 894, 904, 903, 904, 900, 914, 904, 916, 900, 919, 916, 921, 905, 909, 922, 915, 908, 923, 923, 913, 908, 925, 920, 918, 936, 943, 934, 931, 0, 946, 947, 938, 924, 950, 934, 931, 0, 953, 0, 954, 955, 956, 957, 944, 940, 950, 961, 0, 962, 0, 963, 954, 935, 947, 967, 968, 959, 970, 971, 962, 973, 974, 954, 958, 977, 972, 979, 0, 980, 976, 964, 955, 961, 966, 967, 978, 965, 975, 976, 972, 986, 0, 993, 976, 0, 995, 978, 987, 0, 998, 999, 1000, 995, 992, 993, 1004, 0, 1005, 986, 0, 1007, 999, 1009, 0, 1010, 991, 1012, 989, 1007, 1015, 1016, 1016, 2465, 1018, 1010, 0, 1021, 1005, 1004, 0, 1024, 0, 1025, 1009, 1027, 1018, 1029, 0, 1032, 1033, 1034, 1026, 1029, 0, 1038, 1039, 1040, 0, 1041, 1028, 1043, 0, 1044, 1027, 0, 1046, 1047, 1048, 0, 1049, 1050, 1030, 1052, 1053, 1054, 1055, 1026, 0, 1057, 1049, 0, 1059, 1047, 1045, 1062, 1043, 1054, 1056, 1049, 0, 1067, 1068, 1059, 1046, 1060, 1048, 1063, 1074, 1066, 1057, 1069, 1058, 1070, 1069, 1062, 1057, 1066, 1074, 1071, 1078, 1064, 1078, 1065, 1069, 1061, 1082, 1083, 1080, 1089, 1072, 1073, 1070, 1080, 1079, 0, 1101, 1079, 1096, 1104, 1088, 1106, 1107, 1091, 1109, 1110, 0, 1111, 0, 1112, 1086, 1089, 1115, 0, 1116, 1117, 1118, 1114, 1120, 0, 1121, 1104, 1123, 1124, 1116, 1126, 0, 1127, 1118, 1109, 1130, 1123, 0, 1132, 1124, 1114, 1135, 1117, 1125, 1126, 1139, 1120, 1131, 1125, 1134, 1123, 1135, 1141, 1147, 0, 1148, 0, 1149, 1129, 1151, 1129, 0, 1153, 1145, 1145, 0, 1156, 1131, 0, 1158, 1159, 1140, 1141, 1142, 1155, 1158, 1165, 1166, 0, 1167, 1169, 1160, 1172, 1163, 0, 1174, 1175, 1176, 0, 1177, 1178, 1170, 1174, 1181, 0, 1182, 1176, 0, 1184, 1175, 1186, 1187, 0, 1188, 1179, 1190, 0, 1191, 0, 1192, 0, 1193, 1184, 1185, 1196, 1197, 1198, 1179, 1191, 1201, 1192, 0, 1203, 1204, 1205, 1192, 1183, 1191, 1209, 1210, 1202, 1202, 1189, 1214, 1189, 1191, 1204, 1208, 1213, 1201, 1196, 1223, 1224, 1200, 1206, 1199, 1205, 1224, 1222, 1214, 1218, 1213, 1234, 1230, 1216, 1227, 1221, 0, 1239, 1240, 1241, 0, 1242, 1243, 1244, 0, 1245, 1236, 1242, 1248, 1249, 1250, 1230, 0, 1252, 1244, 0, 1255, 0, 1256, 1257, 0, 1258, 1242, 1234, 0, 1261, 1246, 1257, 1238, 1265, 1266, 1257, 1268, 1269, 1253, 1254, 1255, 1273, 1254, 1275, 1253, 1278, 1259, 1280, 1281, 1268, 1260, 1261, 1285, 1258, 1264, 1279, 1266, 1276, 1272, 1286, 0, 1293, 0, 1294, 1295, 1296, 1297, 1298, 1299, 0, 1300, 0, 1301, 1302, 1286, 0, 1304, 1288, 1306, 0, 1307, 0, 1308, 1290, 0, 1310, 1288, 1293, 1313, 1314, 0, 1315, 1293, 1317, 1318, 1310, 1320, 1311, 1322, 1313, 1310, 1308, 0, 1326, 1327, 1328, 1312, 1330, 1331, 1308, 1323, 1334, 1310, 1312, 1337, 1315, 1339, 1340, 1328, 1314, 1323, 1325, 1321, 1346, 1317, 1340, 1330, 1350, 1325, 1333, 1353, 1344, 1355, 0, 1356, 1357, 0, 1358, 1359, 1340, 0, 1361, 0, 1362, 0, 1363, 1338, 1355, 1347, 1367, 1351, 1346, 1370, 1348, 1349, 0, 1373, 1374, 1375, 1376, 0, 1377, 1361, 1370, 1380, 1381, 1363, 1383, 1378, 1355, 0, 1386, 1368, 0, 1388, 1389, 1379, 1391, 1392, 0, 1393, 1394, 1376, 1396, 1377, 1381, 1390, 1379, 0, 1401, 1402, 0, 1403, 1404, 0, 1405, 1406, 1407, 1398, 1409, 1404, 1411, 1387, 0, 1413, 0, 1414, 1415, 1416, 0, 1417, 1418, 0, 1419, 1401, 0, 1421, 1399, 1406, 1424, 0, 1425, 1426, 1410, 1428, 0, 1429, 1416, 1408, 1432, 1423, 1424, 1435, 1422, 0, 1437, 0, 1438, 1425, 1430, 1418, 1436, 1418, 1444, 1414, 1440, 1447, 0, 1448, 1430, 1432, 1451, 1452, 0, 1453, 0, 1454, 1455, 1437, 1433, 1441, 1434, 0, 1460, 1461, 1462, 1463, 1448, 1465, 0, 1466, 1467, 0, 1468, 1469, 1470, 1471, 0, 1472, 1473, 0, 1474, 1456, 1457, 1472, 0, 1478, 1465, 1480, 1481, 1482, 1483, 1484, 1468, 1469, 1487, 1468, 0, 1489, 0, 1490, 0, 1491, 1492, 1493, 0, 1494, 1478, 1496, 1497, 1498, 0, 1499, 1500, 1476, 1502, 1493, 1504, 0, 1505, 1500, 0, 1507, 1488, 1485, 0, 1510, 1511, 1512, 0, 1513, 1506, 1490, 1493, 1508, 1501, 1509, 0, 1520, 1511, 1505, 1523, 1515, 1519, 0, 1526, 1527, 0, 1528, 1524, 1517, 1521, 1532, 1533, 1534, 0, 1535, 1536, 1537, 0, 1538, 1539, 1540, 0, 1541, 1542, 1534, 1536, 1521, 1536, 0, 1547, 0, 1548, 0, 1549, 1550, 0, 1551, 1535, 1553, 1554, 1536, 0, 1556, 1557, 1533, 0, 1559, 1560, 0, 1561, 0, 1562, 1563, 1564, 1565, 0, 1566, 1542, 1549, 1548, 1570, 1571, 1558, 1573, 1574, 1575, 1576, 1571, 1578, 1579, 0, 1580, 1571, 1570, 0, 1583, 1572, 1585, 1580, 1587, 0, 1588, 0, 1589, 1590, 0, 1591, 0, 1592, 0, 1593, 0, 1594, 1575, 1596, 1589, 1575, 0, 1599, 1600, 1601, 0, 1602, 1603, 0, 1604, 1575, 0, 1606, 1607, 0, 1608, 1609, 1596, 1611, 1602, 0, 1613, 0, 1614, 1590, 1616, 1617, 1618, 1619, 1603, 1621, 1622, 1617, 1610, 1615, 1626, 1603, 0, 1628, 0, 1629, 1612, 1631, 1609, 1633, 1634, 0, 1635, 1636, 1637, 0, 1638, 0, 1639, 1620, 1641, 1625, 1613, 0, 1644, 0, 1645, 0, 1646, 0, 1647, 1634, 0, 1649, 0, 1650, 1642, 1644, 1634, 0, 1654, 1645, 1656, 0, 1657, 1644, 1659, 0, 1660, 0, 1661, 1662, 1644, 0, 1664, 1648, 1666, 1648, 1668, 1669, 1670, 1671, 1672, 1652, 0, 1674, 0, 1675, 1676, 1677, 1678, 1667, 1680, 1681, 1682, 1683, 0, 1684, 1660, 1686, 1687, 0, 1688, 1689, 0, 1690, 0, 1691, 0, 1692, 0, 1693, 1694, 0, 1695, 0, 1696, 1697, 1698, 0, 1699, 0, 1700, 2465, 1702, 1704, 1706, 1708, 1710, 1711, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1729, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747, 1748, 1749, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, 1758, 1759, 1760, 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779, 1780, 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1798, 1799, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 1807, 1808, 1809, 1810, 1811, 1812, 1813, 1814, 1815, 1816, 1817, 1818, 1819, 1820, 1821, 1822, 1823, 1824, 1825, 1827, 1828, 1829, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1839, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1849, 1850, 1851, 1852, 1853, 1854, 1855, 1856, 1857, 1858, 1859, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 1960, 1961, 1962, 1963, 1964 } ; static yyconst short int yy_def[2435] = { 0, 2179, 2178, 2180, 2180, 2181, 2181, 2182, 2182, 2178, 2183, 2178, 2184, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2185, 2185, 2185, 2186, 2186, 2186, 2178, 2178, 2183, 2184, 2178, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2187, 2183, 2188, 2185, 2185, 2185, 2185, 2186, 2186, 2186, 2186, 2178, 2178, 2189, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2190, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2191, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2192, 2183, 2183, 2183, 2183, 2183, 2187, 2187, 2183, 2188, 2188, 2185, 2186, 2189, 2189, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2193, 2183, 2183, 2194, 2183, 2183, 2183, 2183, 2183, 2183, 2195, 2183, 2183, 2196, 2183, 2183, 2183, 2183, 2183, 2178, 2197, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2190, 2190, 2183, 2183, 2198, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2178, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2199, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2191, 2191, 2183, 2183, 2183, 2183, 2183, 2183, 2200, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2192, 2192, 2183, 2183, 2183, 2201, 2202, 2183, 2185, 2186, 2183, 2183, 2183, 2183, 2183, 2203, 2183, 2183, 2183, 2183, 2183, 2183, 2204, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2193, 2193, 2183, 2183, 2194, 2194, 2183, 2183, 2183, 2183, 2183, 2183, 2195, 2195, 2183, 2183, 2196, 2196, 2183, 2183, 2183, 2183, 2183, 2197, 2197, 2183, 2205, 2183, 2183, 2206, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2198, 2198, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2178, 2207, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2178, 2183, 2208, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2209, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2199, 2199, 2183, 2210, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2200, 2200, 2183, 2183, 2183, 2183, 2183, 2211, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2201, 2201, 2202, 2202, 2183, 2185, 2186, 2183, 2212, 2183, 2183, 2183, 2203, 2203, 2183, 2183, 2183, 2183, 2183, 2183, 2204, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2205, 2205, 2183, 2183, 2183, 2206, 2206, 2183, 2183, 2183, 2183, 2213, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2214, 2183, 2207, 2207, 2215, 2183, 2183, 2183, 2183, 2216, 2217, 2183, 2183, 2183, 2183, 2183, 2183, 2208, 2208, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2209, 2209, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2210, 2210, 2183, 2218, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2219, 2183, 2220, 2183, 2183, 2221, 2183, 2183, 2183, 2183, 2222, 2183, 2183, 2183, 2223, 2183, 2183, 2211, 2211, 2183, 2183, 2183, 2183, 2183, 2224, 2183, 2183, 2183, 2183, 2183, 2183, 2225, 2185, 2186, 2183, 2212, 2212, 2183, 2183, 2183, 2226, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2227, 2183, 2183, 2228, 2183, 2183, 2183, 2183, 2183, 2229, 2183, 2230, 2231, 2183, 2183, 2183, 2183, 2213, 2213, 2183, 2183, 2183, 2232, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2214, 2214, 2183, 2215, 2215, 2183, 2183, 2183, 2183, 2216, 2216, 2217, 2217, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2233, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2218, 2218, 2183, 2183, 2183, 2183, 2234, 2183, 2183, 2219, 2219, 2183, 2220, 2220, 2183, 2183, 2221, 2221, 2183, 2183, 2183, 2183, 2222, 2222, 2183, 2183, 2183, 2223, 2223, 2183, 2183, 2183, 2235, 2236, 2237, 2183, 2224, 2224, 2183, 2183, 2183, 2183, 2183, 2238, 2183, 2225, 2225, 2185, 2178, 2186, 2183, 2183, 2183, 2239, 2226, 2226, 2183, 2183, 2183, 2183, 2240, 2183, 2183, 2183, 2241, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2227, 2227, 2183, 2183, 2228, 2228, 2183, 2183, 2183, 2183, 2183, 2229, 2229, 2242, 2230, 2230, 2231, 2231, 2183, 2183, 2183, 2183, 2183, 2243, 2183, 2232, 2232, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2244, 2183, 2183, 2183, 2183, 2183, 2245, 2183, 2183, 2183, 2246, 2183, 2183, 2183, 2247, 2248, 2249, 2250, 2183, 2183, 2251, 2183, 2183, 2252, 2253, 2183, 2183, 2183, 2233, 2233, 2254, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2255, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2234, 2234, 2183, 2183, 2256, 2183, 2183, 2183, 2183, 2183, 2183, 2257, 2258, 2183, 2183, 2183, 2183, 2235, 2235, 2236, 2236, 2237, 2237, 2183, 2183, 2183, 2259, 2260, 2183, 2238, 2238, 2183, 2186, 2178, 2183, 2183, 2183, 2239, 2239, 2183, 2183, 2183, 2183, 2240, 2240, 2183, 2183, 2183, 2241, 2241, 2183, 2183, 2183, 2183, 2261, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2262, 2183, 2263, 2183, 2183, 2264, 2183, 2183, 2183, 2183, 2183, 2183, 2265, 2183, 2266, 2183, 2183, 2242, 2242, 2267, 2183, 2183, 2183, 2183, 2243, 2243, 2183, 2183, 2268, 2183, 2183, 2269, 2183, 2183, 2270, 2271, 2183, 2183, 2183, 2183, 2272, 2183, 2183, 2183, 2183, 2273, 2183, 2183, 2244, 2244, 2274, 2183, 2183, 2275, 2183, 2276, 2245, 2245, 2183, 2183, 2277, 2246, 2246, 2183, 2183, 2183, 2247, 2247, 2248, 2248, 2249, 2249, 2250, 2250, 2183, 2183, 2251, 2251, 2183, 2278, 2252, 2252, 2253, 2253, 2183, 2279, 2183, 2254, 2254, 2183, 2183, 2183, 2183, 2183, 2183, 2280, 2255, 2255, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2281, 2183, 2183, 2256, 2256, 2183, 2183, 2183, 2183, 2183, 2183, 2257, 2257, 2258, 2258, 2183, 2282, 2283, 2183, 2183, 2183, 2284, 2259, 2259, 2260, 2260, 2183, 2183, 2183, 2183, 2285, 2183, 2183, 2183, 2183, 2183, 2286, 2183, 2183, 2183, 2183, 2287, 2261, 2261, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2262, 2262, 2183, 2263, 2263, 2183, 2183, 2264, 2264, 2288, 2289, 2183, 2183, 2183, 2290, 2291, 2291, 2183, 2292, 2292, 2183, 2293, 2294, 2294, 2183, 2295, 2183, 2183, 2183, 2183, 2296, 2178, 2297, 2183, 2298, 2298, 2183, 2183, 2299, 2299, 2300, 2300, 2183, 2301, 2183, 2183, 2302, 2302, 2303, 2183, 2183, 2183, 2304, 2304, 2183, 2305, 2306, 2306, 2183, 2307, 2308, 2308, 2183, 2309, 2309, 2183, 2183, 2310, 2310, 2311, 2183, 2183, 2312, 2313, 2314, 2183, 2315, 2315, 2183, 2279, 2279, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2280, 2280, 2316, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2281, 2281, 2183, 2183, 2317, 2183, 2183, 2318, 2183, 2183, 2319, 2282, 2282, 2283, 2283, 2183, 2183, 2183, 2284, 2284, 2183, 2183, 2183, 2320, 2285, 2285, 2183, 2321, 2322, 2183, 2323, 2324, 2324, 2183, 2183, 2325, 2183, 2326, 2326, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2288, 2288, 2289, 2289, 2183, 2183, 2183, 2290, 2290, 2183, 2183, 2293, 2293, 2183, 2295, 2295, 2183, 2183, 2183, 2183, 2183, 2183, 2327, 2328, 2297, 2297, 2183, 2183, 2183, 2183, 2301, 2301, 2183, 2329, 2303, 2303, 2330, 2183, 2183, 2331, 2305, 2305, 2183, 2307, 2307, 2183, 2332, 2333, 2311, 2311, 2183, 2334, 2312, 2312, 2313, 2313, 2314, 2314, 2183, 2183, 2183, 2183, 2335, 2183, 2183, 2183, 2183, 2316, 2316, 2183, 2183, 2183, 2183, 2183, 2336, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2317, 2317, 2183, 2337, 2318, 2318, 2183, 2338, 2319, 2319, 2183, 2183, 2339, 2340, 2341, 2183, 2320, 2320, 2183, 2321, 2321, 2322, 2322, 2183, 2323, 2323, 2183, 2183, 2325, 2325, 2183, 2183, 2183, 2342, 2183, 2183, 2183, 2343, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2344, 2183, 2345, 2183, 2183, 2183, 2183, 2346, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2327, 2327, 2328, 2328, 2347, 2183, 2348, 2183, 2349, 2329, 2329, 2330, 2330, 2183, 2183, 2331, 2331, 2183, 2183, 2332, 2332, 2333, 2333, 2183, 2334, 2334, 2183, 2183, 2350, 2351, 2335, 2335, 2183, 2183, 2352, 2183, 2353, 2183, 2354, 2183, 2183, 2183, 2336, 2336, 2355, 2183, 2183, 2183, 2356, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2357, 2358, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2359, 2183, 2183, 2183, 2183, 2360, 2337, 2337, 2361, 2338, 2338, 2183, 2183, 2339, 2339, 2340, 2340, 2341, 2341, 2183, 2183, 2183, 2362, 2183, 2183, 2183, 2183, 2183, 2342, 2342, 2363, 2183, 2364, 2343, 2343, 2183, 2183, 2183, 2365, 2183, 2366, 2183, 2183, 2344, 2344, 2183, 2345, 2345, 2367, 2183, 2183, 2183, 2346, 2346, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2347, 2347, 2368, 2348, 2348, 2369, 2349, 2349, 2370, 2183, 2183, 2371, 2183, 2183, 2183, 2350, 2350, 2351, 2351, 2183, 2372, 2352, 2352, 2183, 2353, 2353, 2183, 2354, 2354, 2183, 2183, 2183, 2355, 2355, 2373, 2183, 2374, 2356, 2356, 2183, 2183, 2375, 2183, 2183, 2376, 2183, 2357, 2357, 2358, 2358, 2183, 2183, 2183, 2183, 2183, 2377, 2183, 2183, 2183, 2359, 2359, 2183, 2183, 2378, 2183, 2360, 2360, 2361, 2361, 2379, 2183, 2183, 2183, 2183, 2362, 2362, 2183, 2183, 2380, 2183, 2183, 2363, 2363, 2381, 2364, 2364, 2183, 2183, 2382, 2365, 2365, 2183, 2366, 2366, 2183, 2183, 2183, 2367, 2367, 2183, 2383, 2384, 2385, 2183, 2386, 2183, 2183, 2183, 2183, 2368, 2368, 2369, 2369, 2370, 2370, 2387, 2183, 2371, 2371, 2183, 2388, 2183, 2389, 2372, 2372, 2390, 2183, 2183, 2183, 2391, 2373, 2373, 2183, 2374, 2374, 2183, 2183, 2375, 2375, 2183, 2183, 2376, 2376, 2183, 2183, 2183, 2183, 2183, 2183, 2377, 2377, 2183, 2183, 2392, 2183, 2183, 2378, 2378, 2393, 2379, 2379, 2183, 2183, 2183, 2183, 2394, 2395, 2380, 2380, 2183, 2396, 2381, 2381, 2397, 2398, 2382, 2382, 2399, 2183, 2183, 2183, 2183, 2383, 2383, 2384, 2384, 2385, 2385, 2400, 2386, 2386, 2183, 2183, 2401, 2183, 2387, 2387, 2402, 2183, 2388, 2388, 2403, 2389, 2389, 2390, 2390, 2183, 2404, 2183, 2391, 2391, 2183, 2183, 2183, 2405, 2406, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2392, 2392, 2183, 2183, 2393, 2393, 2183, 2183, 2183, 2407, 2394, 2394, 2395, 2395, 2408, 2396, 2396, 2397, 2397, 2398, 2398, 2399, 2399, 2183, 2183, 2183, 2183, 2400, 2400, 2183, 2409, 2401, 2401, 2183, 2402, 2402, 2183, 2403, 2403, 2410, 2404, 2404, 2411, 2183, 2183, 2183, 2405, 2405, 2406, 2406, 2183, 2412, 2413, 2414, 2415, 2183, 2416, 2417, 2183, 2183, 2183, 2418, 2183, 2407, 2407, 2408, 2408, 2183, 2419, 2183, 2183, 2420, 2409, 2409, 2421, 2183, 2410, 2410, 2411, 2411, 2183, 2422, 2183, 2183, 2412, 2412, 2413, 2413, 2414, 2414, 2415, 2415, 2183, 2416, 2416, 2417, 2417, 2183, 2183, 2183, 2418, 2418, 2183, 2183, 2419, 2419, 2183, 2423, 2420, 2420, 2421, 2421, 2424, 2183, 2422, 2422, 2183, 2183, 2183, 2183, 2183, 2183, 2183, 2425, 2183, 2423, 2423, 2424, 2424, 2183, 2183, 2426, 2183, 2427, 2428, 2429, 2430, 2425, 2425, 2183, 2431, 2432, 2426, 2426, 2183, 2427, 2427, 2428, 2428, 2429, 2429, 2430, 2430, 2183, 2431, 2431, 2432, 2432, 2433, 2434, 2433, 2433, 2434, 2434, 0, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178 } ; static yyconst short int yy_nxt[2499] = { 0, 2178, 48, 11, 12, 49, 13, 10, 10, 11, 12, 10, 13, 10, 14, 15, 16, 17, 18, 19, 20, 21, 22, 10, 23, 24, 25, 26, 27, 28, 10, 29, 30, 31, 32, 33, 34, 35, 36, 10, 11, 11, 11, 38, 38, 41, 11, 77, 11, 41, 39, 44, 57, 11, 78, 42, 44, 50, 126, 58, 79, 65, 59, 127, 128, 66, 51, 635, 52, 67, 53, 188, 54, 189, 55, 56, 60, 80, 69, 138, 73, 68, 139, 61, 129, 81, 70, 62, 71, 94, 63, 74, 82, 101, 75, 134, 64, 76, 72, 83, 152, 142, 110, 95, 143, 102, 111, 96, 84, 85, 153, 103, 208, 104, 86, 87, 89, 97, 135, 147, 90, 98, 112, 145, 91, 130, 146, 131, 209, 132, 92, 99, 48, 133, 100, 49, 93, 105, 160, 156, 224, 106, 161, 162, 148, 107, 166, 167, 222, 213, 803, 108, 157, 225, 109, 113, 214, 114, 203, 223, 234, 804, 204, 115, 116, 117, 205, 230, 118, 253, 235, 231, 119, 120, 121, 237, 254, 236, 122, 238, 256, 232, 246, 805, 123, 247, 258, 124, 257, 640, 248, 285, 239, 259, 125, 198, 288, 249, 138, 199, 260, 139, 142, 145, 200, 143, 146, 289, 201, 305, 286, 295, 202, 292, 293, 290, 296, 303, 304, 308, 312, 291, 352, 353, 323, 313, 806, 306, 309, 324, 297, 346, 347, 325, 326, 327, 328, 375, 391, 329, 376, 330, 392, 348, 393, 331, 423, 424, 807, 465, 303, 304, 490, 332, 333, 496, 334, 357, 808, 499, 358, 491, 359, 466, 506, 507, 517, 518, 497, 360, 352, 353, 361, 500, 531, 362, 434, 520, 435, 436, 525, 529, 521, 532, 437, 607, 438, 552, 809, 530, 636, 439, 691, 440, 441, 553, 442, 526, 637, 667, 692, 668, 669, 506, 507, 608, 517, 518, 702, 711, 769, 720, 712, 670, 683, 684, 721, 733, 811, 812, 813, 703, 734, 814, 815, 816, 713, 817, 685, 818, 770, 819, 686, 687, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 834, 835, 836, 837, 839, 840, 674, 842, 843, 833, 844, 845, 846, 848, 850, 851, 852, 853, 854, 856, 858, 689, 859, 860, 861, 862, 855, 857, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 705, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 718, 884, 887, 888, 889, 890, 891, 892, 893, 894, 885, 896, 897, 899, 900, 901, 903, 904, 905, 906, 907, 909, 910, 911, 912, 914, 915, 916, 746, 917, 918, 919, 920, 921, 923, 924, 925, 927, 928, 929, 930, 932, 933, 934, 926, 935, 936, 764, 937, 938, 939, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 963, 964, 965, 966, 968, 969, 970, 972, 973, 974, 975, 976, 977, 979, 980, 982, 984, 985, 962, 986, 987, 988, 811, 989, 990, 991, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 839, 1016, 842, 1017, 1018, 1019, 1020, 848, 850, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 887, 1057, 1058, 1075, 1077, 1078, 1079, 896, 1080, 899, 1081, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1082, 903, 1069, 1070, 1083, 1084, 1071, 1085, 1086, 1072, 1073, 909, 1087, 1074, 1088, 1089, 914, 1090, 1091, 1092, 1094, 1096, 1098, 1099, 923, 1100, 1101, 1102, 1103, 1104, 1106, 1107, 932, 933, 934, 1108, 1109, 1110, 1111, 1112, 1114, 941, 1115, 1116, 1117, 1118, 1120, 1121, 1122, 1123, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1138, 1139, 1140, 1141, 1142, 1134, 1143, 1144, 1145, 1146, 968, 1147, 1148, 972, 1149, 1135, 1136, 1150, 1152, 1153, 1137, 1154, 1151, 979, 1156, 982, 984, 1157, 1158, 1159, 1160, 1161, 1163, 1164, 993, 1165, 1166, 1167, 1168, 1169, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 1180, 1181, 1182, 1183, 1184, 1185, 1187, 1188, 1189, 1190, 1191, 1193, 1195, 1196, 1197, 1198, 1200, 1201, 1202, 1203, 1205, 1207, 1209, 1211, 1212, 1213, 1215, 1216, 1217, 1192, 1219, 1221, 1222, 1223, 1224, 1044, 1226, 1227, 1228, 1229, 1230, 1231, 1232, 1233, 1235, 1236, 1237, 1238, 1239, 1240, 1242, 1243, 1244, 1245, 1251, 1241, 1254, 1248, 1252, 1256, 1246, 1249, 1253, 1255, 1257, 1258, 1259, 1247, 1260, 1263, 1250, 1264, 1265, 1266, 1077, 1261, 1267, 1268, 1270, 1271, 1272, 1273, 1262, 1274, 1275, 1276, 1278, 1280, 1281, 1282, 1283, 1284, 1094, 1096, 1098, 1285, 1286, 1287, 1289, 1291, 1292, 1106, 1293, 1108, 1109, 1294, 1295, 1296, 1114, 1297, 1298, 1299, 1300, 1120, 1301, 1302, 1303, 1125, 1304, 1305, 1306, 1307, 1309, 1310, 1311, 1312, 1313, 1314, 1317, 1323, 1320, 1324, 1326, 1318, 1321, 1315, 1319, 1327, 1328, 1330, 1331, 1316, 1332, 1333, 1334, 1335, 1336, 1338, 1339, 1341, 1342, 1343, 1156, 1345, 1346, 1347, 1348, 1349, 1163, 1350, 1351, 1353, 1354, 1355, 1357, 1358, 1359, 1361, 1363, 1364, 1365, 1366, 1367, 1369, 1370, 1371, 1372, 1373, 1375, 1376, 1377, 1187, 1379, 1380, 1381, 1383, 1384, 1386, 1195, 1387, 1388, 1390, 1200, 1391, 1393, 1394, 1205, 1207, 1392, 1209, 1211, 1395, 1396, 1215, 1397, 1399, 1219, 1221, 1400, 1402, 1403, 1226, 1404, 1405, 1406, 1407, 1408, 1409, 1411, 1235, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, 1422, 1423, 1426, 1424, 1428, 1429, 1430, 1431, 1432, 1433, 1425, 1434, 1435, 1436, 1437, 1438, 1439, 1427, 1440, 1441, 1442, 1443, 1444, 1446, 1447, 1448, 1270, 1449, 1450, 1451, 1452, 1453, 1454, 1278, 1280, 1455, 1457, 1459, 1460, 1461, 1462, 1464, 1289, 1291, 1465, 1466, 1467, 1468, 1470, 1471, 1472, 1473, 1474, 1475, 1477, 1478, 1479, 1480, 1481, 1483, 1309, 1484, 1485, 1486, 1487, 1488, 1489, 1490, 1491, 1492, 1493, 1494, 1495, 1323, 1496, 1326, 1497, 1498, 1330, 1500, 1502, 1503, 1504, 1505, 1507, 1338, 1508, 1341, 1509, 1511, 1345, 1512, 1514, 1515, 1516, 1521, 1522, 1353, 1524, 1525, 1517, 1357, 1526, 1527, 1361, 1363, 1528, 1530, 1531, 1532, 1518, 1519, 1369, 1534, 1535, 1520, 1536, 1537, 1375, 1538, 1540, 1379, 1541, 1543, 1383, 1544, 1386, 1545, 1546, 1390, 1548, 1549, 1550, 1552, 1554, 1556, 1557, 1399, 1558, 1402, 1559, 1560, 1561, 1562, 1563, 1564, 1565, 1411, 1567, 1568, 1569, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578, 1579, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 1590, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598, 1599, 1446, 1600, 1601, 1603, 1604, 1605, 1607, 1608, 1609, 1611, 1457, 1459, 1612, 1613, 1614, 1464, 1615, 1616, 1617, 1619, 1470, 1620, 1622, 1624, 1625, 1627, 1477, 1628, 1629, 1631, 1632, 1483, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1500, 1502, 1648, 1649, 1650, 1507, 1651, 1652, 1511, 1653, 1514, 1654, 1655, 1656, 1657, 1658, 1660, 1663, 1665, 1524, 1661, 1666, 1667, 1659, 1668, 1669, 1530, 1670, 1672, 1534, 1674, 1675, 1676, 1678, 1540, 1679, 1543, 1680, 1682, 1684, 1548, 1685, 1687, 1552, 1554, 1556, 1688, 1689, 1690, 1691, 1693, 1694, 1695, 1696, 1697, 1567, 1698, 1700, 1701, 1702, 1703, 1705, 1706, 1707, 1708, 1709, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1699, 1718, 1719, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1729, 1730, 1731, 1732, 1733, 1603, 1734, 1736, 1607, 1737, 1739, 1611, 1740, 1741, 1743, 1745, 1747, 1748, 1619, 1749, 1750, 1622, 1624, 1751, 1627, 1752, 1753, 1631, 1754, 1755, 1756, 1758, 1759, 1760, 1761, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 1770, 1771, 1773, 1774, 1776, 1777, 1778, 1779, 1780, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 1663, 1665, 1791, 1792, 1794, 1795, 1797, 1672, 1674, 1798, 1799, 1678, 1800, 1801, 1682, 1684, 1802, 1687, 1803, 1804, 1806, 1808, 1693, 1809, 1810, 1812, 1813, 1815, 1816, 1818, 1819, 1820, 1821, 1705, 1823, 1824, 1825, 1826, 1828, 1829, 1830, 1831, 1832, 1833, 1834, 1835, 1837, 1839, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1850, 1851, 1852, 1853, 1854, 1856, 1736, 1858, 1739, 1859, 1860, 1743, 1745, 1747, 1861, 1862, 1863, 1865, 1866, 1867, 1868, 1869, 1870, 1758, 1872, 1873, 1875, 1763, 1876, 1877, 1878, 1880, 1881, 1883, 1884, 1885, 1773, 1886, 1776, 1888, 1889, 1890, 1891, 1782, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1791, 1900, 1794, 1902, 1797, 1904, 1905, 1906, 1908, 1909, 1910, 1911, 1806, 1808, 1912, 1914, 1812, 1915, 1815, 1916, 1818, 1917, 1918, 1919, 1823, 1921, 1922, 1924, 1828, 1925, 1926, 1928, 1929, 1930, 1932, 1933, 1837, 1839, 1934, 1935, 1936, 1937, 1938, 1940, 1941, 1942, 1943, 1850, 1944, 1945, 1947, 1948, 1856, 1858, 1950, 1951, 1952, 1953, 1954, 1865, 1955, 1956, 1958, 1959, 1960, 1872, 1962, 1875, 1963, 1964, 1966, 1880, 1967, 1883, 1968, 1969, 1970, 1888, 1971, 1973, 1975, 1977, 1978, 1980, 1981, 1982, 1983, 1984, 1900, 1902, 1904, 1986, 1987, 1908, 1988, 1990, 1991, 1993, 1914, 1995, 1996, 1997, 1998, 2000, 1921, 2001, 1924, 2002, 2003, 1928, 2004, 2005, 1932, 2006, 2007, 2008, 2009, 2010, 2011, 1940, 2012, 2013, 2015, 2016, 2017, 1947, 2019, 1950, 2020, 2021, 2022, 2023, 2025, 2027, 1958, 2028, 2030, 1962, 2032, 2034, 1966, 2036, 2037, 2038, 2039, 2040, 1973, 1975, 1977, 2042, 1980, 2043, 2044, 2046, 2047, 1986, 2049, 2050, 1990, 2052, 1993, 1995, 2053, 2055, 2056, 2000, 2057, 2058, 2059, 2061, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 2070, 2071, 2015, 2072, 2073, 2019, 2074, 2075, 2076, 2078, 2025, 2027, 2080, 2030, 2032, 2034, 2036, 2081, 2082, 2083, 2084, 2042, 2085, 2087, 2046, 2088, 2049, 2089, 2052, 2091, 2055, 2093, 2094, 2095, 2096, 2061, 2063, 2097, 2099, 2101, 2103, 2105, 2106, 2108, 2110, 2111, 2112, 2113, 2115, 2116, 2078, 2080, 2117, 2119, 2120, 2121, 2123, 2087, 2125, 2126, 2091, 2093, 2127, 2129, 2130, 2131, 2099, 2101, 2103, 2105, 2132, 2108, 2110, 2133, 2134, 2135, 2115, 2136, 2137, 2119, 2138, 2140, 2123, 2125, 2142, 2143, 2129, 2144, 2145, 2146, 2147, 2148, 2149, 2150, 2152, 2153, 2140, 2142, 2154, 2155, 2157, 2158, 2160, 2162, 2164, 2166, 2152, 2167, 2169, 2171, 2157, 2172, 2160, 2162, 2164, 2166, 2173, 2169, 2171, 2175, 2177, 2175, 2177, 10, 10, 37, 37, 40, 40, 43, 43, 45, 46, 46, 137, 141, 261, 264, 268, 318, 387, 411, 445, 449, 457, 461, 468, 484, 542, 565, 585, 587, 597, 605, 634, 639, 673, 688, 704, 717, 745, 763, 810, 838, 841, 847, 849, 886, 895, 898, 902, 908, 913, 922, 931, 940, 967, 971, 978, 981, 983, 992, 1043, 1076, 1093, 1095, 1097, 1105, 1113, 1119, 1124, 1155, 1162, 1186, 1194, 1199, 1204, 1206, 1208, 1210, 1214, 1218, 1220, 1225, 1234, 1269, 1277, 1279, 1288, 1290, 1308, 1322, 1325, 1329, 1337, 1340, 1344, 1352, 1352, 1356, 1360, 1362, 1368, 1374, 1378, 1382, 1385, 1389, 1398, 1401, 1410, 1445, 1456, 1458, 1463, 1469, 1476, 1482, 1499, 1501, 1506, 1337, 1340, 1510, 1344, 1513, 1352, 1352, 1523, 1356, 1360, 1362, 1529, 1368, 1533, 1374, 1539, 1378, 1542, 1382, 1385, 1389, 1547, 1551, 1553, 1555, 1398, 1566, 1602, 1606, 1610, 1618, 1621, 1623, 1626, 1476, 1630, 1482, 1662, 1664, 1671, 1673, 1677, 1681, 1683, 1686, 1692, 1704, 1735, 1738, 1742, 1744, 1746, 1757, 1762, 1772, 1775, 1781, 1790, 1793, 1796, 1805, 1807, 1811, 1814, 1817, 1822, 1827, 1836, 1838, 1849, 1855, 1857, 1864, 1871, 1874, 1879, 1882, 1887, 1899, 1901, 1903, 1907, 1913, 1920, 1923, 1927, 1931, 1939, 1946, 1949, 1957, 1961, 1965, 1972, 1974, 1976, 1979, 1985, 1989, 1992, 1994, 1999, 2014, 2018, 2024, 2026, 2029, 2031, 2033, 2035, 2041, 2045, 2048, 2051, 2054, 2060, 2062, 2077, 2079, 2086, 2090, 2092, 2098, 2100, 2102, 2104, 2107, 2109, 2114, 2118, 2122, 2124, 2128, 2139, 2141, 2151, 2156, 2159, 2161, 2163, 2165, 2168, 2170, 2174, 2176, 802, 801, 800, 799, 798, 797, 796, 795, 794, 793, 792, 791, 790, 789, 788, 787, 786, 785, 784, 783, 782, 781, 780, 779, 778, 777, 776, 775, 774, 773, 772, 771, 768, 598, 767, 766, 765, 764, 762, 761, 760, 759, 588, 586, 758, 757, 756, 755, 754, 753, 752, 751, 750, 749, 748, 747, 746, 744, 743, 742, 741, 740, 566, 739, 738, 737, 736, 735, 732, 731, 730, 729, 728, 727, 726, 725, 724, 723, 722, 719, 718, 716, 543, 715, 714, 710, 709, 708, 707, 706, 705, 701, 700, 699, 698, 697, 696, 695, 694, 693, 690, 689, 682, 681, 680, 679, 678, 677, 676, 675, 674, 672, 671, 666, 665, 664, 663, 662, 661, 660, 659, 658, 657, 656, 655, 654, 653, 652, 651, 650, 485, 649, 648, 647, 646, 645, 644, 643, 642, 641, 640, 638, 635, 633, 469, 632, 631, 630, 629, 628, 462, 627, 626, 458, 625, 624, 623, 622, 621, 620, 450, 619, 618, 446, 617, 616, 615, 614, 613, 612, 611, 610, 609, 606, 604, 603, 602, 601, 600, 599, 598, 596, 595, 594, 593, 592, 591, 590, 589, 588, 586, 584, 583, 582, 412, 581, 580, 579, 578, 577, 576, 575, 574, 573, 572, 571, 570, 569, 568, 567, 566, 564, 563, 562, 561, 560, 559, 388, 558, 557, 556, 555, 554, 551, 550, 549, 548, 547, 546, 545, 544, 543, 541, 540, 539, 538, 537, 536, 535, 534, 533, 528, 527, 524, 523, 522, 519, 516, 515, 514, 513, 512, 511, 510, 509, 508, 505, 504, 503, 502, 501, 498, 495, 494, 493, 492, 489, 488, 487, 486, 485, 483, 482, 319, 481, 480, 479, 478, 477, 476, 475, 474, 473, 472, 471, 470, 469, 467, 464, 463, 462, 460, 459, 458, 456, 455, 454, 453, 452, 451, 450, 448, 447, 446, 444, 443, 433, 432, 431, 430, 429, 428, 427, 426, 425, 422, 421, 269, 420, 419, 265, 418, 262, 417, 416, 415, 414, 413, 412, 410, 409, 408, 407, 406, 405, 404, 403, 402, 401, 400, 399, 398, 397, 396, 395, 394, 390, 389, 388, 386, 385, 384, 383, 382, 381, 380, 379, 378, 377, 374, 373, 372, 371, 370, 369, 368, 367, 366, 365, 364, 363, 356, 355, 354, 351, 350, 349, 345, 344, 343, 342, 341, 340, 339, 338, 337, 336, 335, 322, 321, 320, 319, 317, 316, 315, 314, 311, 310, 307, 302, 301, 300, 299, 298, 294, 287, 284, 283, 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, 270, 269, 267, 266, 265, 263, 262, 255, 252, 251, 250, 245, 244, 243, 242, 241, 240, 233, 229, 228, 227, 226, 221, 220, 219, 218, 217, 216, 215, 212, 211, 210, 207, 206, 197, 196, 195, 194, 193, 192, 191, 190, 187, 186, 185, 184, 183, 182, 181, 180, 179, 178, 177, 176, 175, 174, 173, 172, 171, 170, 169, 168, 165, 164, 163, 159, 158, 155, 154, 151, 150, 149, 47, 144, 140, 136, 88, 47, 2178, 9, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178 } ; static yyconst short int yy_chk[2499] = { 0, 0, 13, 1, 1, 13, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 5, 3, 4, 5, 6, 20, 7, 6, 4, 7, 15, 8, 20, 6, 8, 14, 32, 15, 20, 17, 15, 32, 33, 17, 14, 635, 14, 17, 14, 85, 14, 85, 14, 14, 16, 21, 18, 38, 19, 17, 38, 16, 33, 21, 18, 16, 18, 25, 16, 19, 21, 27, 19, 35, 16, 19, 18, 22, 54, 41, 29, 25, 41, 27, 29, 25, 22, 22, 54, 27, 98, 27, 22, 22, 24, 26, 35, 50, 24, 26, 29, 44, 24, 34, 44, 34, 98, 34, 24, 26, 48, 34, 26, 48, 24, 28, 60, 57, 111, 28, 60, 60, 50, 28, 64, 64, 110, 102, 636, 28, 57, 111, 28, 30, 102, 30, 95, 110, 118, 637, 95, 30, 30, 30, 95, 116, 30, 130, 118, 116, 30, 30, 31, 119, 130, 118, 31, 119, 132, 116, 126, 638, 31, 126, 133, 31, 132, 640, 126, 163, 119, 133, 31, 94, 165, 126, 138, 94, 133, 138, 142, 145, 94, 142, 145, 165, 94, 175, 163, 168, 94, 166, 166, 165, 168, 174, 174, 177, 180, 165, 206, 206, 189, 180, 641, 175, 177, 189, 168, 202, 202, 189, 190, 190, 190, 223, 237, 190, 223, 190, 237, 202, 237, 190, 272, 272, 642, 301, 303, 303, 327, 190, 190, 332, 190, 210, 643, 334, 210, 327, 210, 301, 340, 340, 350, 350, 332, 210, 352, 352, 210, 334, 362, 210, 282, 354, 282, 282, 358, 361, 354, 362, 282, 435, 282, 381, 644, 361, 472, 282, 522, 282, 282, 381, 282, 358, 472, 503, 522, 503, 503, 506, 506, 435, 517, 517, 532, 539, 600, 547, 539, 503, 519, 519, 547, 559, 645, 646, 647, 532, 559, 648, 649, 650, 539, 651, 519, 652, 600, 653, 519, 519, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 674, 675, 676, 666, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 689, 690, 691, 692, 693, 685, 686, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 719, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 760, 754, 761, 762, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802, 803, 804, 805, 806, 788, 807, 808, 809, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 839, 840, 842, 843, 844, 845, 846, 848, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 887, 888, 889, 891, 892, 893, 894, 896, 897, 899, 900, 889, 890, 890, 890, 890, 890, 890, 890, 890, 890, 901, 903, 890, 890, 904, 905, 890, 906, 907, 890, 890, 909, 910, 890, 911, 912, 914, 915, 916, 917, 918, 919, 920, 921, 923, 924, 925, 926, 927, 928, 929, 930, 932, 933, 933, 935, 935, 936, 937, 938, 939, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 957, 958, 959, 960, 961, 962, 957, 963, 964, 965, 966, 968, 969, 970, 972, 973, 957, 957, 974, 975, 976, 957, 977, 974, 979, 980, 982, 984, 985, 986, 987, 988, 989, 990, 991, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1019, 1038, 1039, 1040, 1041, 1042, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1064, 1058, 1066, 1063, 1065, 1067, 1062, 1063, 1065, 1066, 1068, 1069, 1070, 1062, 1071, 1072, 1063, 1073, 1074, 1075, 1077, 1071, 1078, 1079, 1080, 1081, 1082, 1083, 1071, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1094, 1096, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1106, 1107, 1108, 1108, 1110, 1111, 1112, 1114, 1115, 1116, 1117, 1118, 1120, 1121, 1122, 1123, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1138, 1137, 1139, 1140, 1136, 1137, 1135, 1136, 1141, 1142, 1143, 1144, 1135, 1145, 1146, 1147, 1148, 1149, 1150, 1151, 1152, 1153, 1154, 1156, 1157, 1158, 1159, 1160, 1161, 1163, 1164, 1165, 1166, 1167, 1168, 1169, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 1180, 1181, 1182, 1183, 1184, 1185, 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1195, 1196, 1197, 1198, 1200, 1201, 1202, 1203, 1205, 1207, 1201, 1209, 1211, 1212, 1213, 1215, 1216, 1217, 1219, 1221, 1222, 1223, 1224, 1226, 1227, 1228, 1229, 1230, 1231, 1232, 1233, 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1247, 1249, 1250, 1251, 1252, 1253, 1254, 1247, 1255, 1256, 1257, 1258, 1259, 1260, 1248, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1278, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1289, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1309, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1323, 1324, 1326, 1327, 1328, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1338, 1339, 1341, 1342, 1343, 1345, 1346, 1347, 1348, 1349, 1350, 1351, 1352, 1354, 1355, 1349, 1357, 1358, 1359, 1361, 1363, 1364, 1365, 1366, 1367, 1349, 1349, 1369, 1370, 1371, 1349, 1372, 1373, 1375, 1376, 1377, 1379, 1380, 1381, 1383, 1384, 1386, 1387, 1388, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1399, 1400, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440, 1441, 1442, 1443, 1444, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455, 1457, 1459, 1460, 1461, 1462, 1464, 1465, 1466, 1467, 1468, 1470, 1471, 1472, 1473, 1474, 1475, 1477, 1478, 1479, 1480, 1481, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1500, 1502, 1503, 1504, 1505, 1507, 1508, 1509, 1511, 1512, 1514, 1515, 1516, 1517, 1518, 1519, 1520, 1521, 1522, 1524, 1520, 1525, 1526, 1519, 1527, 1528, 1530, 1531, 1532, 1534, 1535, 1536, 1537, 1538, 1540, 1541, 1543, 1544, 1545, 1546, 1548, 1549, 1550, 1552, 1554, 1556, 1557, 1558, 1559, 1560, 1561, 1562, 1563, 1564, 1565, 1567, 1568, 1569, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578, 1579, 1580, 1581, 1582, 1583, 1584, 1585, 1568, 1586, 1587, 1588, 1589, 1590, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598, 1599, 1600, 1601, 1603, 1604, 1605, 1607, 1608, 1609, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1619, 1617, 1620, 1622, 1624, 1625, 1627, 1628, 1629, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1646, 1647, 1648, 1649, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658, 1659, 1660, 1661, 1663, 1665, 1666, 1667, 1668, 1669, 1670, 1672, 1674, 1675, 1676, 1678, 1679, 1680, 1682, 1684, 1685, 1687, 1688, 1689, 1690, 1691, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 1700, 1701, 1702, 1703, 1705, 1706, 1707, 1708, 1709, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1729, 1730, 1731, 1732, 1733, 1734, 1736, 1737, 1739, 1740, 1741, 1743, 1745, 1747, 1748, 1749, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1758, 1759, 1760, 1761, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 1770, 1771, 1773, 1774, 1776, 1777, 1778, 1779, 1780, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 1791, 1792, 1794, 1795, 1797, 1798, 1799, 1800, 1801, 1802, 1803, 1804, 1806, 1808, 1809, 1810, 1812, 1813, 1815, 1816, 1818, 1819, 1820, 1821, 1823, 1824, 1825, 1826, 1828, 1829, 1830, 1831, 1832, 1833, 1834, 1835, 1837, 1839, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1850, 1851, 1852, 1853, 1854, 1856, 1858, 1859, 1860, 1861, 1862, 1863, 1865, 1866, 1867, 1868, 1869, 1870, 1872, 1873, 1875, 1876, 1877, 1878, 1880, 1881, 1883, 1884, 1885, 1886, 1888, 1889, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1900, 1902, 1904, 1905, 1906, 1908, 1909, 1910, 1911, 1912, 1914, 1915, 1916, 1917, 1918, 1919, 1921, 1922, 1924, 1925, 1926, 1928, 1929, 1930, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1940, 1941, 1942, 1943, 1944, 1945, 1947, 1948, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1958, 1959, 1960, 1962, 1963, 1964, 1966, 1967, 1968, 1969, 1970, 1971, 1973, 1975, 1977, 1978, 1980, 1981, 1982, 1983, 1984, 1986, 1987, 1988, 1990, 1991, 1993, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2015, 2016, 2017, 2019, 2020, 2021, 2022, 2023, 2025, 2027, 2028, 2030, 2032, 2034, 2036, 2037, 2038, 2039, 2040, 2042, 2043, 2044, 2046, 2047, 2049, 2050, 2052, 2053, 2055, 2056, 2057, 2058, 2059, 2061, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2078, 2080, 2081, 2082, 2083, 2084, 2085, 2087, 2088, 2089, 2091, 2093, 2094, 2095, 2096, 2097, 2099, 2101, 2103, 2105, 2106, 2108, 2110, 2111, 2112, 2113, 2115, 2116, 2117, 2119, 2120, 2121, 2123, 2125, 2126, 2127, 2129, 2130, 2131, 2132, 2133, 2134, 2135, 2136, 2137, 2138, 2140, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, 2150, 2152, 2153, 2154, 2155, 2157, 2158, 2160, 2162, 2164, 2166, 2167, 2169, 2171, 2172, 2173, 2175, 2177, 2179, 2179, 2180, 2180, 2181, 2181, 2182, 2182, 2183, 2184, 2184, 2185, 2186, 2187, 2188, 2189, 2190, 2191, 2192, 2193, 2194, 2195, 2196, 2197, 2198, 2199, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 2220, 2221, 2222, 2223, 2224, 2225, 2226, 2227, 2228, 2229, 2230, 2231, 2232, 2233, 2234, 2235, 2236, 2237, 2238, 2239, 2240, 2241, 2242, 2243, 2244, 2245, 2246, 2247, 2248, 2249, 2250, 2251, 2252, 2253, 2254, 2255, 2256, 2257, 2258, 2259, 2260, 2261, 2262, 2263, 2264, 2265, 2266, 2267, 2268, 2268, 2269, 2270, 2271, 2272, 2273, 2274, 2275, 2276, 2277, 2278, 2279, 2280, 2281, 2282, 2283, 2284, 2285, 2286, 2287, 2288, 2289, 2290, 2291, 2292, 2293, 2294, 2295, 2296, 2296, 2297, 2298, 2299, 2300, 2301, 2302, 2303, 2304, 2305, 2306, 2307, 2308, 2309, 2310, 2311, 2312, 2313, 2314, 2315, 2316, 2317, 2318, 2319, 2320, 2321, 2322, 2323, 2324, 2325, 2326, 2327, 2328, 2329, 2330, 2331, 2332, 2333, 2334, 2335, 2336, 2337, 2338, 2339, 2340, 2341, 2342, 2343, 2344, 2345, 2346, 2347, 2348, 2349, 2350, 2351, 2352, 2353, 2354, 2355, 2356, 2357, 2358, 2359, 2360, 2361, 2362, 2363, 2364, 2365, 2366, 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 2380, 2381, 2382, 2383, 2384, 2385, 2386, 2387, 2388, 2389, 2390, 2391, 2392, 2393, 2394, 2395, 2396, 2397, 2398, 2399, 2400, 2401, 2402, 2403, 2404, 2405, 2406, 2407, 2408, 2409, 2410, 2411, 2412, 2413, 2414, 2415, 2416, 2417, 2418, 2419, 2420, 2421, 2422, 2423, 2424, 2425, 2426, 2427, 2428, 2429, 2430, 2431, 2432, 2433, 2434, 633, 632, 631, 630, 629, 628, 627, 626, 625, 624, 623, 622, 621, 620, 619, 618, 617, 616, 615, 614, 613, 612, 611, 610, 609, 608, 607, 606, 604, 603, 602, 601, 599, 598, 596, 595, 594, 593, 592, 591, 590, 589, 588, 586, 584, 583, 582, 581, 580, 579, 578, 577, 576, 575, 574, 573, 572, 571, 570, 569, 568, 567, 566, 564, 563, 562, 561, 560, 558, 557, 556, 555, 554, 553, 552, 551, 550, 549, 548, 546, 545, 544, 543, 541, 540, 538, 537, 536, 535, 534, 533, 531, 530, 529, 528, 527, 526, 525, 524, 523, 521, 520, 516, 515, 514, 513, 512, 511, 510, 509, 508, 505, 504, 502, 501, 500, 499, 498, 497, 496, 495, 494, 493, 492, 491, 490, 489, 488, 487, 486, 485, 483, 482, 481, 480, 479, 478, 477, 476, 475, 474, 473, 471, 470, 469, 467, 466, 465, 464, 463, 462, 460, 459, 458, 456, 455, 454, 453, 452, 451, 450, 448, 447, 446, 444, 443, 442, 441, 440, 439, 438, 437, 436, 434, 432, 431, 430, 429, 428, 427, 426, 425, 424, 423, 422, 421, 420, 419, 418, 417, 416, 415, 414, 413, 412, 410, 409, 408, 407, 406, 405, 404, 403, 402, 401, 400, 399, 398, 397, 396, 395, 394, 393, 392, 391, 390, 389, 388, 386, 385, 384, 383, 382, 380, 379, 378, 377, 376, 375, 374, 373, 372, 371, 370, 369, 368, 367, 366, 365, 364, 363, 360, 359, 357, 356, 355, 351, 349, 348, 347, 346, 345, 344, 343, 342, 341, 339, 338, 337, 336, 335, 333, 331, 330, 329, 328, 326, 325, 324, 323, 322, 321, 320, 319, 317, 316, 315, 314, 313, 312, 311, 310, 309, 308, 307, 306, 305, 302, 300, 299, 298, 297, 296, 295, 294, 293, 292, 291, 290, 289, 288, 287, 286, 285, 284, 283, 281, 280, 279, 278, 277, 276, 275, 274, 273, 271, 270, 269, 267, 266, 265, 263, 262, 260, 259, 258, 257, 256, 255, 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 238, 236, 235, 234, 233, 232, 231, 230, 229, 228, 227, 226, 225, 224, 222, 221, 220, 219, 218, 217, 216, 215, 214, 213, 212, 211, 209, 208, 207, 205, 204, 203, 201, 200, 199, 198, 197, 196, 195, 194, 193, 192, 191, 188, 187, 186, 185, 184, 183, 182, 181, 179, 178, 176, 173, 172, 171, 170, 169, 167, 164, 162, 161, 160, 159, 158, 157, 156, 155, 154, 153, 152, 151, 150, 149, 148, 147, 144, 140, 136, 135, 134, 131, 129, 128, 127, 125, 124, 123, 122, 121, 120, 117, 115, 114, 113, 112, 109, 108, 107, 106, 105, 104, 103, 101, 100, 99, 97, 96, 93, 92, 91, 90, 89, 88, 87, 86, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 63, 62, 61, 59, 58, 56, 55, 53, 52, 51, 46, 42, 39, 36, 23, 12, 9, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178, 2178 } ; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "loader.l" #define INITIAL 0 #line 2 "loader.l" /* * static char *rcsid_object_c = * "$Id: loader.l 5189 2006-12-22 07:36:43Z mwedel $"; */ /* CrossFire, A Multiplayer game for X-windows Copyright (C) 2006 Mark Wedel & Crossfire Development Team Copyright (C) 1992 Frank Tore Johansen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The authors can be reached via e-mail at crossfire-devel@real-time.com */ /* Eneq(@csd.uu.se): Added weight-modifiers in environment of objects. sub/add_weight will transcend the environment updating the carrying variable. */ #include #include #include #include #define YY_DECL int lex_load(object *op, int map_flags) static char *yval(void); static int lex_error; static char msgbuf[HUGE_BUF]; int msglen=0, total_msglen=0; static char lorebuf[HUGE_BUF]; /* Maps the MOVE_* values to names */ static const char *const move_name[] = {"walk", "fly_low", "fly_high", "swim", "boat", NULL}; /* This table is only necessary to convert objects that existed before the * spell object conversion to the new object. It was not practical * to go through every mapping looking for every potion, rod, wand, etc * that had a sp set and update to the new value. So this maps the * old spell numbers to the name of the new archs. * If you are adding a new spell, you should not modify this - you * new spell won't have been used, and thus won't have any legacy object. * NULL entries in this table are valid - to denote objects that should * not be updated for whatever reason. */ const char *const spell_mapping[] = { "spell_magic_bullet", /* 0 */ "spell_small_fireball", /* 1 */ "spell_medium_fireball", /* 2 */ "spell_large_fireball", /* 3 */ "spell_burning_hands", /* 4 */ "spell_sm_lightning", /* 5 */ "spell_large_lightning", /* 6 */ "spell_magic_missile", /* 7 */ "spell_create_bomb", /* 8 */ "spell_summon_golem", /* 9 */ "spell_summon_fire_elemental", /* 10 */ "spell_summon_earth_elemental", /* 11 */ "spell_summon_water_elemental", /* 12 */ "spell_summon_air_elemental", /* 13 */ "spell_dimension_door", /* 14 */ "spell_create_earth_wall", /* 15 */ "spell_paralyze", /* 16 */ "spell_icestorm", /* 17 */ "spell_magic_mapping", /* 18 */ "spell_turn_undead", /* 19 */ "spell_fear", /* 20 */ "spell_poison_cloud", /* 21 */ "spell_wonder", /* 22 */ "spell_destruction", /* 23 */ "spell_perceive_self", /* 24 */ "spell_word_of_recall", /* 25 */ "spell_invisible", /* 26 */ "spell_invisible_to_undead", /* 27 */ "spell_probe", /* 28 */ "spell_lg_magic_bullet", /* 29 */ "spell_improved_invisibility", /* 30 */ "spell_holy_word", /* 31 */ "spell_minor_healing", /* 32 */ "spell_medium_healing", /* 33 */ "spell_major_healing", /* 34 */ "spell_heal", /* 35 */ "spell_create_food", /* 36 */ "spell_earth_to_dust", /* 37 */ "spell_armour", /* 38 */ "spell_strength", /* 39 */ "spell_dexterity", /* 40 */ "spell_constitution", /* 41 */ "spell_charisma", /* 42 */ "spell_create_fire_wall", /* 43 */ "spell_create_frost_wall", /* 44 */ "spell_protection_from_cold", /* 45 */ "spell_protection_from_electricity", /* 46 */ "spell_protection_from_fire", /* 47 */ "spell_protection_from_poison", /* 48 */ "spell_protection_from_slow", /* 49 */ "spell_protection_from_paralysis", /* 50 */ "spell_protection_from_draining", /* 51 */ "spell_protection_from_magic", /* 52 */ "spell_protection_from_attack", /* 53 */ "spell_levitate", /* 54 */ "spell_small_speedball", /* 55 */ "spell_large_speedball", /* 56 */ "spell_hellfire", /* 57 */ "spell_dragonbreath", /* 58 */ "spell_large_icestorm", /* 59 */ "spell_charging", /* 60 */ "spell_polymorph", /* 61 */ "spell_cancellation", /* 62 */ "spell_confusion", /* 63 */ "spell_mass_confusion", /* 64 */ "spell_summon_pet_monster", /* 65 */ "spell_slow", /* 66 */ "spell_regenerate_spellpoints", /* 67 */ "spell_cure_poison", /* 68 */ "spell_protection_from_confusion", /* 69 */ "spell_protection_from_cancellation", /* 70 */ "spell_protection_from_depletion", /* 71 */ "spell_alchemy", /* 72 */ "spell_remove_curse", /* 73 */ "spell_remove_damnation", /* 74 */ "spell_identify", /* 75*/ "spell_detect_magic", /* 76 */ "spell_detect_monster", /* 77 */ "spell_detect_evil", /* 78 */ "spell_detect_curse", /* 79 */ "spell_heroism", /* 80 */ "spell_aggravation", /* 81 */ "spell_firebolt", /* 82 */ "spell_frostbolt", /* 83 */ "spell_shockwave", /* 84 */ "spell_color_spray", /* 85 */ "spell_haste", /* 86 */ "spell_face_of_death", /* 87 */ "spell_ball_lightning", /* 88 */ "spell_meteor_swarm", /* 89 */ "spell_comet", /* 90 */ "spell_mystic_fist", /* 91 */ "spell_raise_dead", /* 92 */ "spell_resurrection", /* 93 */ "spell_reincarnation", /* 94 */ "spell_immunity_to_cold", /* 95 */ "spell_immunity_to_electricity",/* 96 */ "spell_immunity_to_fire", /* 97 */ "spell_immunity_to_poison", /* 98 */ "spell_immunity_to_slow", /* 99 */ "spell_immunity_to_paralysis", /* 100 */ "spell_immunity_to_draining", /* 101 */ "spell_immunity_to_magic", /* 102 */ "spell_immunity_to_attack", /* 103 */ "spell_invulnerability", /* 104 */ "spell_defense", /* 105 */ "spell_rune_of_fire", /* 106 */ "spell_rune_of_frost", /* 107 */ "spell_rune_of_shocking", /* 108 */ "spell_rune_of_blasting", /* 109 */ "spell_rune_of_death", /* 110 */ "spell_marking_rune", /* 111 */ "spell_build_director", /* 112 */ "spell_create_pool_of_chaos", /* 113 */ "spell_build_bullet_wall", /* 114 */ "spell_build_lightning_wall", /* 115 */ "spell_build_fireball_wall", /* 116 */ "spell_magic_rune", /* 117 */ "spell_rune_of_magic_drain", /* 118 */ "spell_antimagic_rune", /* 119 */ "spell_rune_of_transference", /* 120 */ "spell_transference", /* 121 */ "spell_magic_drain", /* 122 */ "spell_counterspell", /* 123 */ "spell_disarm", /* 124 */ "spell_cure_confusion", /* 125 */ "spell_restoration", /* 126 */ "was summon evil monster", /* 127 */ /* Not implenented as nothing used it */ "spell_counterwall", /* 128 */ "spell_cause_light_wounds", /* 129 */ "spell_cause_medium_wounds", /* 130 */ "spell_cause_heavy_wounds", /* 131 */ "spell_charm_monsters", /* 132 */ "spell_banishment", /* 133 */ "spell_create_missile", /* 134 */ "spell_show_invisible", /* 135 */ "spell_xray", /* 136 */ "spell_pacify", /* 137 */ "spell_summon_fog", /* 138 */ "spell_steambolt", /* 139 */ "spell_command_undead", /* 140 */ "spell_holy_orb", /* 141 */ "spell_summon_avatar", /* 142 */ "spell_holy_possession", /* 143 */ "spell_bless", /* 144 */ "spell_curse", /* 145 */ "spell_regeneration", /* 146 */ "spell_consecrate", /* 147 */ "spell_summon_cult_monsters", /* 148 */ "spell_cause_critical_wounds", /* 149 */ "spell_holy_wrath", /* 150 */ "spell_retributive_strike", /* 151 */ "spell_finger_of_death", /* 152 */ "spell_insect_plague", /* 153 */ "spell_call_holy_servant", /* 154 */ "spell_wall_of_thorns", /* 155 */ "spell_staff_to_snake", /* 156 */ "spell_light", /* 157 */ "spell_darkness", /* 158 */ "spell_nightfall", /* 159 */ "spell_daylight", /* 160 */ "spell_sunspear", /* 161 */ "spell_faery_fire", /* 162 */ "spell_cure_blindness", /* 163 */ "spell_dark_vision", /* 164 */ "spell_bullet_swarm", /* 165 */ "spell_bullet_storm", /* 166 */ "spell_cause_many_wounds", /* 167 */ "spell_small_snowstorm", /* 168 */ "spell_medium_snowstorm", /* 169 */ "spell_large_snowstorm", /* 170 */ "spell_cure_disease", /* 171 */ "spell_cause_red_death", /* 172 */ "spell_cause_flu", /* 173 */ "spell_cause_black_death", /* 174 */ "spell_cause_leprosy", /* 175 */ "spell_cause_smallpox", /* 176 */ "spell_cause_white_death", /* 177 */ "spell_cause_anthrax", /* 178 */ "spell_cause_typhoid", /* 179 */ "spell_mana_blast", /* 180 */ "spell_small_manaball", /* 181 */ "spell_medium_manaball", /* 182 */ "spell_large_manaball", /* 183 */ "spell_manabolt", /* 184 */ "spell_dancing_sword", /* 185 */ "spell_animate_weapon", /* 186 */ "spell_cause_cold", /* 187 */ "spell_divine_shock", /* 188 */ "spell_windstorm", /* 189 */ "spell_sanctuary", /* 190 */ "spell_peace", /* 191 */ "spell_spiderweb", /* 192 */ "spell_conflict", /* 193 */ "spell_rage", /* 194 */ "spell_forked_lightning", /* 195 */ "spell_poison_fog", /* 196 */ "spell_flaming_aura", /* 197 */ "spell_vitriol", /* 198 */ "spell_vitriol_splash", /* 199 */ "spell_iron_skin", /* 200 */ "spell_wrathful_eye", /* 201 */ "spell_town_portal", /* 202 */ "spell_missile_swarm", /* 203 */ "spell_cause_rabies", /* 204 */ "spell_glyph", /* 205 */ NULL }; #define SET_OR_CLEAR_FLAG(op, flag, val) \ { if (val) SET_FLAG(op, flag); else CLEAR_FLAG(op, flag); } /* SET_RESIST is really only really needed for transition code. We normally * don't care about multiple values overwriting each other, but this is * to catch items that have multiple protection/immune/vulnerable. * This can be simplified later on to just do the set after all the archs * and maps have been updated. * We always keep the last value because otherwise the value from the * arch may take precedence. * Unfortunately, we will report warnings here simply because an object has * been modified from the arch. */ #if 0 /* #if's don't work in #define macros */ #define SET_RESIST(op, type, val) \ {if (op->resist[type]!=0) { \ LOG(llevInfo, "object %s having multiple resistances set, type=%s, old=%d, new=%d\n", \ op->name?op->name:(op->arch?op->arch->name:"unknown"), \ resist_plus[type], op->resist[type], val); \ } op->resist[type] = val; } #else #define SET_RESIST(op, type, val) op->resist[type] = val; #endif #define IVAL atoi(yval()) #define FVAL atof(yval()) extern int arch_init; extern int artifact_init; /* Put this here since it is used below */ static void set_protection(object *op, uint32 mask, uint16 pro_val) { int i; if (!mask) return; /* Unlikely, but might as well check */ for (i=0; ibody_info[i] = atoi(cp); return; /* Only one line passed in params */ } } LOG(llevError,"set_body_info called with bogus params: %s\n", params); } /* This function checks the object after it has been loaded (when we * get the 'end' in the input stream). This function can be used to * deal with legacy objects where fields may have changed. It can also be used * to check for objects to make sure there are no common errors. */ static void check_loaded_object(object *op) { int ip; /* We do some specialized handling to handle legacy cases of name_pl. * If the object doesn't have a name_pl, we just use the object name - * this isn't perfect (things won't be properly pluralized), but works to * that degree (5 heart is still quite understandable). But the case we * also have to catch is if this object is not using the normal name for * the object. In that case, we also want to use the loaded name. * Otherwise, what happens is that the the plural name will lose * information (appear as just 'hearts' and not 'goblins heart') */ if (op->arch && op->name != op->arch->clone.name && op->name_pl == op->arch->clone.name_pl) { if (op->name_pl) free_string(op->name_pl); op->name_pl = NULL; } if (!op->name_pl) op->name_pl = add_string(op->name); /* objects now have a materialname. try to patch it in */ if (!(IS_WEAPON(op) && op->level > 0)) { if (op->map != NULL) set_materialname(op, op->map->difficulty, NULL); else set_materialname(op, 5, NULL); } /* only do these when program is first run - a bit * excessive to do this at every run - most of this is * really just to catch any errors - program will still run, but * not in the ideal fashion. */ if ((op->type == WEAPON || op->type==BOW) && arch_init) { if (!op->skill) { LOG(llevError,"Weapon %s lacks a skill.\n", op->name); } else if ((!strcmp(op->skill,"one handed weapons") && op->body_info[1] != -1) || (!strcmp(op->skill,"two handed weapons") && op->body_info[1] != -2)) { LOG(llevError,"weapon %s arm usage does not match skill: %d, %s\n", op->name, op->body_info[1], op->skill); } } /* We changed last_heal to gen_sp_armour, which is what it * really does for many objects. Need to catch any in maps * that may have an old value. */ if ((op->type == WEAPON) || (op->type == ARMOUR) || (op->type == HELMET) || (op->type == SHIELD) || (op->type == RING) || (op->type == BOOTS) || (op->type == GLOVES) || (op->type == AMULET ) || (op->type == GIRDLE) || (op->type == BRACERS ) || (op->type == CLOAK)) { if (op->last_heal) { LOG(llevDebug,"Object %s still has last_heal set, not gen_sp_armour\n", op->name?op->name:"NULL"); op->gen_sp_armour = op->last_heal; op->last_heal = 0; } if (editor) ip =0; else ip = calc_item_power(op, 0); /* Legacy objects from before item power was in the game */ if (!op->item_power && ip) { if (ip > 3) { LOG(llevDebug,"Object %s had no item power, using %d\n", op->name?op->name:"NULL", ip); } op->item_power = ip; } /* Check for possibly bogus values. Has to meet both these criteria - * something that has item_power 1 is probably just fine if our calculated * value is 1 or 2 - these values are small enough that hard to be precise. * similarly, it item_power is 0, the first check will always pass, * but not the second one. */ if (ip > 2 *op->item_power && ip > (op->item_power + 3)) { LOG(llevDebug,"Object %s seems to have too low item power? %d > %d\n", op->name?op->name:"NULL", ip, op->item_power); } } /* Old spellcasting object - need to load in the appropiate object */ if ((op->type == ROD || op->type == WAND || op->type == SCROLL || op->type == HORN || op->type == FIREWALL || /* POTIONS and ALTARS don't always cast spells, but if they do, update them */ ((op->type == POTION || op->type == ALTAR) && op->stats.sp)) && !op->inv && !arch_init) { object *tmp; /* Fireall is bizarre in that spell type was stored in dam. Rest are 'normal' * in that spell was stored in sp. */ tmp = create_archetype(spell_mapping[op->type == FIREWALL?op->stats.dam:op->stats.sp]); insert_ob_in_ob(tmp, op); op->randomitems = NULL; /* So another spell isn't created for this object */ } /* spellbooks & runes use slaying. But not to arch name, but to spell name */ if ((op->type == SPELLBOOK || op->type == RUNE) && op->slaying && !op->inv && !arch_init) { object *tmp; tmp = create_archetype_by_object_name(op->slaying); insert_ob_in_ob(tmp, op); op->randomitems = NULL; /* So another spell isn't created for this object */ /* without this, value is all screwed up */ op->value = op->arch->clone.value * op->inv->value; } if (QUERY_FLAG(op, FLAG_MONSTER)) { if (op->stats.hp > op->stats.maxhp) LOG(llevDebug,"Monster %s has hp set higher than maxhp (%d>%d)\n", op->name, op->stats.hp, op->stats.maxhp); /* The archs just need to be updated for this */ if (op->move_type ==0) op->move_type = MOVE_WALK; } if ((QUERY_FLAG(op,FLAG_GENERATOR) && QUERY_FLAG(op,FLAG_CONTENT_ON_GEN)) || op->type == CREATOR || op->type == CONVERTER) { /* Object will duplicate it's content as part of the * generation process. To do this, we must flag inventory * so it remains unevaluated concerning the randomitems and * the living (a demonlord shouldn't cast from inside generator!) */ flag_inv(op,FLAG_IS_A_TEMPLATE); } /* Handle player movers. We use move_type for player movers * because they operate on their own time (move_on * would potentially cause them to be triggered when someone steps * on them). If move_type is set, presume person knows what they * are doing, otherwise, set move_type based on maxhp value. */ if (op->type == PLAYERMOVER) { if (!op->move_type) { if (op->stats.maxhp) { op->move_type = MOVE_ALL; op->stats.maxhp=0; } else { op->move_type = MOVE_WALK; } } } /* Here we'll handle custom monsters. In order to handle them correctly, especially in the fix_object * method, we'll create a new temporary archetype containing defined values. * Of course this doesn't apply when loading archetypes or artifacts. */ if (arch_init == 0 && artifact_init == 0 && QUERY_FLAG(op, FLAG_MONSTER) && !can_merge(op, &op->arch->clone)) { archetype* temp = get_archetype_struct(); temp->reference_count++; temp->name = add_string(op->arch->name); temp->tail_x = op->arch->tail_x; temp->tail_y = op->arch->tail_y; copy_object(op, &temp->clone); temp->clone.inv = NULL; temp->clone.env = NULL; temp->clone.x = 0; temp->clone.y = 0; temp->clone.map = NULL; if (FABS(temp->clone.speed)>MIN_ACTIVE_SPEED) { /* Clone has a speed, so need to clear that because it isn't on a map */ /* But we need to keep the value, because otherwise the customized object * will have no speed (fix_player() will use the 0 value). So set it * to zero, call update_ob_speed() to remove it from active list, then * set its speed back to the original. */ temp->clone.speed = 0; update_ob_speed(&temp->clone); temp->clone.speed = op->speed; } temp->more = op->arch->more; op->arch = temp; /* LOG(llevDebug, "created temporary archetype for %s at %d,%d\n", op->name, op->x, op->y); */ } } /* This extracts the key/value from the yytext field - * calls set_ob_key_value() to actually set the value. * Function basically has to find spaces, strip out extra, * etc. strchr doesn't work as good because could also * be tabs. */ static void add_key_value(object * op) { char * key = NULL; char * value = NULL; char * cp; char * end; /* First, skip over leading whitespace. */ for (cp = yytext; isspace(*cp); cp++) { ; } key = cp; /* Now look for the end of the key/field name. */ for (; !isspace(*cp); cp++) { if (*cp == '\0') { /* Oops, ran out of string! Set the key with an empty value. */ set_ob_key_value(op, key, NULL, TRUE); return; } } if (*cp == '\0') { set_ob_key_value(op, key, NULL, TRUE); return; } /* Chop off the key, and start at the next character. */ *cp = '\0'; cp++; if (*cp == '\0') { /* Was followed by one space? */ set_ob_key_value(op, key, NULL, TRUE); return; } /* Now looking for the value. Skip over whitespace. */ for (; isspace(*cp); cp++) { if (*cp == '\0') { /* Guess not. */ set_ob_key_value(op, key, NULL, TRUE); return; } } value = cp; /* Got last character before null and strip * off tailing whitespace */ for (end = value + (strlen(cp)-1); isspace(*end); end--) { if (end == value) { /* *blink blink* Still no value? */ set_ob_key_value(op, key, NULL, TRUE); return; } *end='\0'; } set_ob_key_value(op, key, value, TRUE); } static void set_move(MoveType *mt, char *params) { char *str; int i, negate; if (isdigit(*params)) { *mt = atoi(params); } else { *mt=0; for (str=strtok(params, " "); str; str=strtok(NULL, " ")) { negate=0; if (!strcasecmp(str, "all")) *mt |= MOVE_ALL; else { if (*str=='-') { negate = 1; str++; } for (i=0; move_name[i] != NULL; i++) { if (!strcasecmp(move_name[i], str)) { if (negate) { *mt &= ~(1< #endif #else /* Just try to get by without declaring the routines. This will fail * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) * or sizeof(void*) != sizeof(int). */ #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #define YY_READ_BUF_SIZE 8192 #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( yy_current_buffer->yy_is_interactive ) \ { \ int c = '*', n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL int yylex YY_PROTO(( void )) #endif /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ if ( yyleng > 0 ) \ yy_current_buffer->yy_at_bol = \ (yytext[yyleng - 1] == '\n'); \ YY_USER_ACTION YY_DECL { register yy_state_type yy_current_state; register char *yy_cp = NULL, *yy_bp = NULL; register int yy_act; #line 643 "loader.l" /* Declare some local variables */ int ismore=0; lex_error=0; #line 2496 "loader.c" if ( yy_init ) { yy_init = 0; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! yy_start ) yy_start = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! yy_current_buffer ) yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); yy_load_buffer_state(); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = yy_c_buf_p; /* Support of yytext. */ *yy_cp = yy_hold_char; /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = yy_start; yy_current_state += YY_AT_BOL(); yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 2179 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 2465 ); yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ yy_cp = yy_last_accepting_cpos; yy_current_state = yy_last_accepting_state; yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = yy_hold_char; yy_cp = yy_last_accepting_cpos; yy_current_state = yy_last_accepting_state; goto yy_find_action; case 1: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 653 "loader.l" { BEGIN( MESSAGE ); msgbuf[0]='\0'; msglen=0; total_msglen=0;} YY_BREAK case 2: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 654 "loader.l" { BEGIN( INITIAL ); op->msg=add_string(msgbuf); /* Just print a warning so we can be reasonably safe * about not overflowing the buffer. */ if (total_msglen > (HUGE_BUF/2)) LOG(llevDebug, "\n\tWarning message length > %d (max allowed=%d): %d\n>%.80s<\n", HUGE_BUF/2, HUGE_BUF, total_msglen,op->msg); } YY_BREAK case 3: YY_RULE_SETUP #line 663 "loader.l" { safe_strcat(msgbuf, yytext, &msglen, HUGE_BUF); safe_strcat(msgbuf, "\n", &msglen, HUGE_BUF); total_msglen += strlen(yytext) + 1; } YY_BREAK case 4: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 668 "loader.l" { BEGIN( LORE ); lorebuf[0]='\0'; } YY_BREAK case 5: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 669 "loader.l" { BEGIN( INITIAL ); op->lore=add_string(lorebuf); /* Just print a warning so we can be reasonably safe * about not overflowing the buffer. */ if (strlen(op->lore) > (HUGE_BUF/2)) LOG(llevDebug, "\n\tWarning lore length > %d (max allowed=%d): %d\n>%.80s<\n", HUGE_BUF/2, HUGE_BUF, strlen(op->lore),op->lore); } YY_BREAK case 6: YY_RULE_SETUP #line 678 "loader.l" {strcat(lorebuf, yytext); strcat(lorebuf,"\n"); } YY_BREAK case 7: YY_RULE_SETUP #line 680 "loader.l" { char *yv=yval(); if (*yv=='\0') { LOG(llevError,"Object lacks name.\n"); return LL_IGNORED; } if (!arch_init) { LOG(llevError,"Got object info when not in arch_init (%s)?\n", yv); } else { if (op->arch!=NULL) op->arch->name=add_string(yv); op->name = add_string(yv); } } YY_BREAK case 8: YY_RULE_SETUP #line 694 "loader.l" { char *yv=yval(); if (*yv=='\0') LOG(llevError,"Name without val\n"); else FREE_AND_COPY(op->name, yv); } YY_BREAK case 9: YY_RULE_SETUP #line 699 "loader.l" { char *yv=yval(); if (*yv=='\0') LOG(llevError,"Name without val\n"); else FREE_AND_COPY(op->name_pl, yv); } YY_BREAK case 10: YY_RULE_SETUP #line 704 "loader.l" FREE_AND_COPY(op->skill,yval()); YY_BREAK case 11: YY_RULE_SETUP #line 705 "loader.l" { char *yv=yval(); if (*yv=='\0') LOG(llevError,"Custom name without val\n"); else FREE_AND_COPY(op->custom_name, yv); } YY_BREAK case 12: YY_RULE_SETUP #line 710 "loader.l" FREE_AND_COPY(op->race,yval()); YY_BREAK case 13: YY_RULE_SETUP #line 711 "loader.l" FREE_AND_COPY(op->slaying, yval()); YY_BREAK case 14: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 712 "loader.l" LOG(llevError,"Got depreciated Inventory command?\n"); YY_BREAK case 15: YY_RULE_SETUP #line 715 "loader.l" { /* If op->arch has been set, then this new object * must be part of the inventory. So process * appropriately. */ if (op->arch) { object *tmp; char *yv=yval(); tmp=get_object(); tmp->arch = find_archetype(yv); if (tmp->arch!=NULL) copy_object(&tmp->arch->clone,tmp); else { if (tmp->name) free_string(tmp->name); /* record the name of the broken object */ tmp->name = add_string(yv); } strcpy(msgbuf, ""); strcpy(lorebuf, ""); msglen=0; total_msglen=0; lex_load(tmp, map_flags); if (tmp->arch) { insert_ob_in_ob(tmp,op); } else { LOG(llevDebug,"Discarding object without arch: %s\n", tmp->name?tmp->name:"(null)"); free_object(tmp); } } /* This is the actual archetype definition then */ else { char *yv=yval(); op->arch=find_archetype(yv); if (op->arch!=NULL) copy_object(&op->arch->clone,op); else if (!arch_init) { if (op->name) free_string(op->name); /* record the name of the broken object */ op->name = add_string(yv); } } } YY_BREAK case 16: YY_RULE_SETUP #line 759 "loader.l" op->other_arch=find_archetype(yval()); YY_BREAK case 17: YY_RULE_SETUP #line 760 "loader.l" { if (strcmp (yval(), "NONE") == 0) { op->animation_id = 0; CLEAR_FLAG (op, FLAG_ANIMATE); } else { op->animation_id = find_animation (yval()); SET_FLAG (op, FLAG_ANIMATE); } } YY_BREAK case 18: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 770 "loader.l" { /* We need to record that this is a multipart object, * so the calling function can glue things back together */ ismore=1; } YY_BREAK case 19: *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ yy_c_buf_p = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up yytext again */ YY_RULE_SETUP #line 776 "loader.l" { check_loaded_object(op); if (ismore) return LL_MORE; else return LL_NORMAL; } YY_BREAK case 20: YY_RULE_SETUP #line 780 "loader.l" op->last_heal = IVAL; YY_BREAK case 21: YY_RULE_SETUP #line 781 "loader.l" op->last_sp = IVAL; YY_BREAK case 22: YY_RULE_SETUP #line 782 "loader.l" op->last_grace = IVAL; YY_BREAK case 23: YY_RULE_SETUP #line 783 "loader.l" op->last_eat = IVAL; YY_BREAK case 24: YY_RULE_SETUP #line 784 "loader.l" { op->speed = FVAL; if (!(map_flags & MAP_STYLE)) { if (op->speed<0) op->speed_left = op->speed_left-RANDOM()%100/100.0; update_ob_speed(op); } } YY_BREAK case 25: YY_RULE_SETUP #line 790 "loader.l" op->speed_left = FVAL; YY_BREAK case 26: YY_RULE_SETUP #line 791 "loader.l" { op->move_slow |= MOVE_WALK; op->move_slow_penalty = FVAL; } YY_BREAK case 27: YY_RULE_SETUP #line 794 "loader.l" { char *y=yval(); if (*y=='\0') LOG(llevError,"Title without value.\n"); else FREE_AND_COPY(op->title, y); } YY_BREAK case 28: YY_RULE_SETUP #line 799 "loader.l" op->face = &new_faces[find_face(yval(), 0)]; YY_BREAK case 29: YY_RULE_SETUP #line 800 "loader.l" op->stats.Str = IVAL; YY_BREAK case 30: YY_RULE_SETUP #line 801 "loader.l" op->stats.Dex = IVAL; YY_BREAK case 31: YY_RULE_SETUP #line 802 "loader.l" op->stats.Con = IVAL; YY_BREAK case 32: YY_RULE_SETUP #line 803 "loader.l" op->stats.Wis = IVAL; YY_BREAK case 33: YY_RULE_SETUP #line 804 "loader.l" op->stats.Cha = IVAL; YY_BREAK case 34: YY_RULE_SETUP #line 805 "loader.l" op->stats.Int = IVAL; YY_BREAK case 35: YY_RULE_SETUP #line 806 "loader.l" op->stats.Pow = IVAL; YY_BREAK case 36: YY_RULE_SETUP #line 807 "loader.l" op->stats.hp = IVAL; YY_BREAK case 37: YY_RULE_SETUP #line 808 "loader.l" op->stats.maxhp = IVAL; YY_BREAK case 38: YY_RULE_SETUP #line 809 "loader.l" op->stats.sp = IVAL; YY_BREAK case 39: YY_RULE_SETUP #line 810 "loader.l" op->stats.maxsp = IVAL; YY_BREAK case 40: YY_RULE_SETUP #line 811 "loader.l" op->stats.grace = IVAL; YY_BREAK case 41: YY_RULE_SETUP #line 812 "loader.l" op->stats.maxgrace = IVAL; YY_BREAK case 42: YY_RULE_SETUP #line 813 "loader.l" op->stats.exp = atoll(yval()); YY_BREAK case 43: YY_RULE_SETUP #line 814 "loader.l" op->perm_exp = atoll(yval()); YY_BREAK case 44: YY_RULE_SETUP #line 815 "loader.l" op->stats.food = IVAL; YY_BREAK case 45: YY_RULE_SETUP #line 816 "loader.l" op->stats.dam = IVAL; YY_BREAK case 46: YY_RULE_SETUP #line 817 "loader.l" op->stats.wc = IVAL; YY_BREAK case 47: YY_RULE_SETUP #line 818 "loader.l" op->stats.ac = IVAL; YY_BREAK case 48: YY_RULE_SETUP #line 819 "loader.l" {op->x = IVAL; op->ox= op->x; } YY_BREAK case 49: YY_RULE_SETUP #line 820 "loader.l" {op->y = IVAL; op->oy= op->y; } YY_BREAK case 50: YY_RULE_SETUP #line 821 "loader.l" op->nrof= atol(yval()); YY_BREAK case 51: YY_RULE_SETUP #line 822 "loader.l" op->level = IVAL; YY_BREAK case 52: YY_RULE_SETUP #line 823 "loader.l" op->direction = IVAL; YY_BREAK case 53: YY_RULE_SETUP #line 824 "loader.l" op->type = IVAL; YY_BREAK case 54: YY_RULE_SETUP #line 825 "loader.l" op->subtype = IVAL; YY_BREAK case 55: YY_RULE_SETUP #line 826 "loader.l" op->material = IVAL; YY_BREAK case 56: YY_RULE_SETUP #line 827 "loader.l" { char *yv=yval(); if (*yv=='\0') LOG(llevError,"Materialname without val\n"); else FREE_AND_COPY(op->materialname, yv); } YY_BREAK case 57: YY_RULE_SETUP #line 834 "loader.l" op->value = IVAL; YY_BREAK case 58: YY_RULE_SETUP #line 835 "loader.l" op->weight = atol(yval()); YY_BREAK case 59: YY_RULE_SETUP #line 836 "loader.l" op->carrying = atol(yval()); YY_BREAK case 60: YY_RULE_SETUP #line 837 "loader.l" op->attacktype = IVAL; YY_BREAK case 61: YY_RULE_SETUP #line 838 "loader.l" op->path_attuned = IVAL; YY_BREAK case 62: YY_RULE_SETUP #line 839 "loader.l" op->path_repelled = IVAL; YY_BREAK case 63: YY_RULE_SETUP #line 840 "loader.l" op->path_denied = IVAL; YY_BREAK case 64: YY_RULE_SETUP #line 841 "loader.l" op->invisible = IVAL; YY_BREAK case 65: YY_RULE_SETUP #line 842 "loader.l" op->magic = IVAL; YY_BREAK case 66: YY_RULE_SETUP #line 843 "loader.l" op->state = IVAL; YY_BREAK case 67: YY_RULE_SETUP #line 844 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_ALIVE, IVAL); YY_BREAK case 68: YY_RULE_SETUP #line 845 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_APPLIED, IVAL); YY_BREAK case 69: YY_RULE_SETUP #line 846 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_UNPAID, IVAL); YY_BREAK case 70: YY_RULE_SETUP #line 847 "loader.l" { /* not used - just ignore */ } YY_BREAK case 71: YY_RULE_SETUP #line 848 "loader.l" { /* not used - jsut ignore */ } YY_BREAK case 72: YY_RULE_SETUP #line 849 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_ANIMATE, IVAL); YY_BREAK case 73: YY_RULE_SETUP #line 850 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_NO_PICK, IVAL); YY_BREAK case 74: YY_RULE_SETUP #line 851 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_CLIENT_ANIM_SYNC, IVAL); YY_BREAK case 75: YY_RULE_SETUP #line 852 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_CLIENT_ANIM_RANDOM, IVAL); YY_BREAK /* These are all legacy - any new objects should use the move_ .. values */ case 76: YY_RULE_SETUP #line 856 "loader.l" { if (IVAL) op->move_block = MOVE_ALL; else op->move_block=0; } YY_BREAK case 77: YY_RULE_SETUP #line 857 "loader.l" { if (IVAL) op->move_on |= MOVE_WALK; else op->move_on &= ~MOVE_WALK; } YY_BREAK case 78: YY_RULE_SETUP #line 858 "loader.l" { if (IVAL) op->move_off |= MOVE_WALK; else op->move_off &= ~MOVE_WALK; } YY_BREAK case 79: YY_RULE_SETUP #line 859 "loader.l" { if (IVAL) op->move_on |= MOVE_FLY_LOW; else op->move_on &= ~MOVE_FLY_LOW; } YY_BREAK case 80: YY_RULE_SETUP #line 860 "loader.l" { if (IVAL) op->move_off |= MOVE_FLY_LOW; else op->move_off &= ~MOVE_FLY_LOW; } YY_BREAK case 81: YY_RULE_SETUP #line 861 "loader.l" { if (IVAL) op->move_type |= MOVE_FLY_LOW; else op->move_type &= ~MOVE_FLY_LOW; } YY_BREAK /* These are the new values */ case 82: YY_RULE_SETUP #line 865 "loader.l" set_move(&op->move_block, yval()); YY_BREAK case 83: YY_RULE_SETUP #line 866 "loader.l" set_move(&op->move_allow, yval()); YY_BREAK case 84: YY_RULE_SETUP #line 867 "loader.l" set_move(&op->move_type, yval()); YY_BREAK case 85: YY_RULE_SETUP #line 868 "loader.l" set_move(&op->move_on, yval()); YY_BREAK case 86: YY_RULE_SETUP #line 869 "loader.l" set_move(&op->move_off, yval()); YY_BREAK case 87: YY_RULE_SETUP #line 870 "loader.l" set_move(&op->move_slow, yval()); YY_BREAK case 88: YY_RULE_SETUP #line 871 "loader.l" op->move_slow_penalty = FVAL; YY_BREAK case 89: YY_RULE_SETUP #line 874 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_MONSTER, IVAL); YY_BREAK case 90: YY_RULE_SETUP #line 875 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_NEUTRAL, IVAL); YY_BREAK case 91: YY_RULE_SETUP #line 876 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_NO_ATTACK, IVAL); YY_BREAK case 92: YY_RULE_SETUP #line 877 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_NO_DAMAGE, IVAL); YY_BREAK case 93: YY_RULE_SETUP #line 878 "loader.l" { if (IVAL) { SET_FLAG(op, FLAG_FRIENDLY); if (op->type != PLAYER) { LOG(llevDebug," Adding friendly object %s.\n",op->name); add_friendly_object(op); } } else CLEAR_FLAG(op, FLAG_FRIENDLY); } YY_BREAK case 94: YY_RULE_SETUP #line 887 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_GENERATOR, IVAL); YY_BREAK case 95: YY_RULE_SETUP #line 888 "loader.l" SET_OR_CLEAR_FLAG (op,FLAG_CONTENT_ON_GEN, IVAL); YY_BREAK case 96: YY_RULE_SETUP #line 889 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_IS_THROWN, IVAL); YY_BREAK case 97: YY_RULE_SETUP #line 890 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_AUTO_APPLY, IVAL); YY_BREAK case 98: YY_RULE_SETUP #line 891 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_TREASURE, IVAL); YY_BREAK case 99: YY_RULE_SETUP #line 892 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_SEE_INVISIBLE, IVAL); YY_BREAK case 100: YY_RULE_SETUP #line 893 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_CAN_ROLL, IVAL); YY_BREAK case 101: YY_RULE_SETUP #line 894 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_OVERLAY_FLOOR, IVAL); YY_BREAK case 102: YY_RULE_SETUP #line 895 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_IS_TURNABLE, IVAL); YY_BREAK case 103: YY_RULE_SETUP #line 896 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_IS_USED_UP, IVAL); YY_BREAK case 104: YY_RULE_SETUP #line 897 "loader.l" { if (IVAL) { SET_FLAG(op, FLAG_IDENTIFIED); CLEAR_FLAG(op, FLAG_KNOWN_MAGICAL); } else CLEAR_FLAG(op, FLAG_IDENTIFIED); } YY_BREAK case 105: YY_RULE_SETUP #line 903 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_REFLECTING, IVAL); YY_BREAK case 106: YY_RULE_SETUP #line 904 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_CHANGING, IVAL); YY_BREAK case 107: YY_RULE_SETUP #line 905 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_SPLITTING, IVAL); YY_BREAK case 108: YY_RULE_SETUP #line 906 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_HITBACK, IVAL); YY_BREAK case 109: YY_RULE_SETUP #line 907 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_STARTEQUIP, IVAL); YY_BREAK case 110: YY_RULE_SETUP #line 908 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_BLOCKSVIEW, IVAL); YY_BREAK case 111: YY_RULE_SETUP #line 909 "loader.l" op->arch->editable = IVAL; YY_BREAK case 112: YY_RULE_SETUP #line 910 "loader.l" { } YY_BREAK case 113: YY_RULE_SETUP #line 911 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_UNDEAD, IVAL); YY_BREAK case 114: YY_RULE_SETUP #line 912 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_SCARED, IVAL); YY_BREAK case 115: YY_RULE_SETUP #line 913 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_UNAGGRESSIVE, IVAL); YY_BREAK case 116: YY_RULE_SETUP #line 914 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_REFL_MISSILE, IVAL); YY_BREAK case 117: YY_RULE_SETUP #line 915 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_REFL_SPELL, IVAL); YY_BREAK case 118: YY_RULE_SETUP #line 916 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_NO_MAGIC, IVAL); YY_BREAK case 119: YY_RULE_SETUP #line 917 "loader.l" { if (IVAL) { SET_FLAG(op, FLAG_WIZ); SET_FLAG(op, FLAG_WAS_WIZ); SET_FLAG(op, FLAG_WIZPASS); SET_FLAG(op, FLAG_WIZCAST); } else { CLEAR_FLAG(op, FLAG_WIZ); CLEAR_FLAG(op, FLAG_WIZPASS); CLEAR_FLAG(op, FLAG_WIZCAST); } } YY_BREAK case 120: YY_RULE_SETUP #line 929 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_WAS_WIZ, IVAL); YY_BREAK case 121: YY_RULE_SETUP #line 930 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_NO_FIX_PLAYER, IVAL); YY_BREAK case 122: YY_RULE_SETUP #line 931 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_IS_LIGHTABLE, IVAL); YY_BREAK case 123: YY_RULE_SETUP #line 932 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_TEAR_DOWN, IVAL); YY_BREAK case 124: YY_RULE_SETUP #line 933 "loader.l" op->stats.luck = IVAL; YY_BREAK case 125: YY_RULE_SETUP #line 934 "loader.l" op->run_away = IVAL; YY_BREAK case 126: YY_RULE_SETUP #line 935 "loader.l" op->pick_up = IVAL; YY_BREAK case 127: YY_RULE_SETUP #line 936 "loader.l" op->item_power = IVAL; YY_BREAK case 128: YY_RULE_SETUP #line 937 "loader.l" op->gen_sp_armour = IVAL; YY_BREAK case 129: YY_RULE_SETUP #line 938 "loader.l" op->anim_speed = IVAL; YY_BREAK case 130: YY_RULE_SETUP #line 939 "loader.l" op->weight_limit = IVAL; YY_BREAK case 131: YY_RULE_SETUP #line 940 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_NO_DROP, IVAL); YY_BREAK case 132: YY_RULE_SETUP #line 941 "loader.l" op->will_apply = IVAL; YY_BREAK case 133: YY_RULE_SETUP #line 942 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_RANDOM_MOVE, IVAL); YY_BREAK case 134: YY_RULE_SETUP #line 943 "loader.l" { } YY_BREAK case 135: YY_RULE_SETUP #line 944 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_USE_SHIELD, IVAL); YY_BREAK case 136: YY_RULE_SETUP #line 945 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_CAST_SPELL, IVAL); YY_BREAK case 137: YY_RULE_SETUP #line 946 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_USE_SCROLL, IVAL); YY_BREAK case 138: YY_RULE_SETUP #line 947 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_USE_RANGE, IVAL); YY_BREAK case 139: YY_RULE_SETUP #line 948 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_USE_BOW, IVAL); YY_BREAK case 140: YY_RULE_SETUP #line 949 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_USE_ARMOUR, IVAL); YY_BREAK case 141: YY_RULE_SETUP #line 950 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_USE_WEAPON, IVAL); YY_BREAK case 142: YY_RULE_SETUP #line 951 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_USE_RING, IVAL); YY_BREAK case 143: YY_RULE_SETUP #line 952 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_READY_BOW, IVAL); YY_BREAK case 144: YY_RULE_SETUP #line 953 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_XRAYS, IVAL); YY_BREAK case 145: YY_RULE_SETUP #line 954 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_IS_FLOOR, IVAL); YY_BREAK case 146: YY_RULE_SETUP #line 955 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_LIFESAVE, IVAL); YY_BREAK case 147: YY_RULE_SETUP #line 956 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_NO_STRENGTH, IVAL); YY_BREAK case 148: YY_RULE_SETUP #line 957 "loader.l" { SET_OR_CLEAR_FLAG(op, FLAG_SLEEP, IVAL); /*(LOG(llevDebug," Warning: Object %s has sleep set in arch.\n",op->name);*/ } YY_BREAK case 149: YY_RULE_SETUP #line 961 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_STAND_STILL, IVAL); YY_BREAK case 150: YY_RULE_SETUP #line 962 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_RANDOM_MOVE, IVAL); YY_BREAK case 151: YY_RULE_SETUP #line 963 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_ONLY_ATTACK, IVAL); YY_BREAK case 152: YY_RULE_SETUP #line 965 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_ACTIVATE_ON_PUSH, IVAL); YY_BREAK case 153: YY_RULE_SETUP #line 966 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_ACTIVATE_ON_RELEASE, IVAL); YY_BREAK /* armour is loaded for compatiblity reasons */ case 154: YY_RULE_SETUP #line 969 "loader.l" SET_RESIST(op, ATNR_PHYSICAL, IVAL); YY_BREAK /* Start of various attacktypes */ case 155: YY_RULE_SETUP #line 971 "loader.l" SET_RESIST(op, ATNR_PHYSICAL, IVAL); YY_BREAK case 156: YY_RULE_SETUP #line 972 "loader.l" SET_RESIST(op, ATNR_MAGIC, IVAL); YY_BREAK case 157: YY_RULE_SETUP #line 973 "loader.l" SET_RESIST(op, ATNR_FIRE, IVAL); YY_BREAK case 158: YY_RULE_SETUP #line 974 "loader.l" SET_RESIST(op, ATNR_ELECTRICITY, IVAL); YY_BREAK case 159: YY_RULE_SETUP #line 975 "loader.l" SET_RESIST(op, ATNR_COLD, IVAL); YY_BREAK case 160: YY_RULE_SETUP #line 976 "loader.l" SET_RESIST(op, ATNR_CONFUSION, IVAL); YY_BREAK case 161: YY_RULE_SETUP #line 977 "loader.l" SET_RESIST(op, ATNR_ACID, IVAL); YY_BREAK case 162: YY_RULE_SETUP #line 978 "loader.l" SET_RESIST(op, ATNR_DRAIN, IVAL); YY_BREAK case 163: YY_RULE_SETUP #line 979 "loader.l" SET_RESIST(op, ATNR_WEAPONMAGIC, IVAL); YY_BREAK case 164: YY_RULE_SETUP #line 980 "loader.l" SET_RESIST(op, ATNR_GHOSTHIT, IVAL); YY_BREAK case 165: YY_RULE_SETUP #line 981 "loader.l" SET_RESIST(op, ATNR_POISON, IVAL); YY_BREAK case 166: YY_RULE_SETUP #line 982 "loader.l" SET_RESIST(op, ATNR_SLOW, IVAL); YY_BREAK case 167: YY_RULE_SETUP #line 983 "loader.l" SET_RESIST(op, ATNR_PARALYZE, IVAL); YY_BREAK case 168: YY_RULE_SETUP #line 984 "loader.l" SET_RESIST(op, ATNR_TURN_UNDEAD, IVAL); YY_BREAK case 169: YY_RULE_SETUP #line 985 "loader.l" SET_RESIST(op, ATNR_FEAR, IVAL); YY_BREAK case 170: YY_RULE_SETUP #line 986 "loader.l" SET_RESIST(op, ATNR_CANCELLATION, IVAL); YY_BREAK case 171: YY_RULE_SETUP #line 987 "loader.l" SET_RESIST(op, ATNR_DEPLETE, IVAL); YY_BREAK case 172: YY_RULE_SETUP #line 988 "loader.l" SET_RESIST(op, ATNR_DEATH, IVAL); YY_BREAK case 173: YY_RULE_SETUP #line 989 "loader.l" SET_RESIST(op, ATNR_CHAOS, IVAL); YY_BREAK case 174: YY_RULE_SETUP #line 990 "loader.l" SET_RESIST(op, ATNR_COUNTERSPELL, IVAL); YY_BREAK case 175: YY_RULE_SETUP #line 991 "loader.l" SET_RESIST(op, ATNR_GODPOWER, IVAL); YY_BREAK case 176: YY_RULE_SETUP #line 992 "loader.l" SET_RESIST(op, ATNR_HOLYWORD, IVAL); YY_BREAK case 177: YY_RULE_SETUP #line 993 "loader.l" SET_RESIST(op, ATNR_BLIND, IVAL); YY_BREAK case 178: YY_RULE_SETUP #line 994 "loader.l" SET_RESIST(op, ATNR_INTERNAL, IVAL); YY_BREAK case 179: YY_RULE_SETUP #line 995 "loader.l" SET_RESIST(op, ATNR_LIFE_STEALING, IVAL); YY_BREAK case 180: YY_RULE_SETUP #line 996 "loader.l" SET_RESIST(op, ATNR_DISEASE, IVAL); YY_BREAK /* Old style resistances */ case 181: YY_RULE_SETUP #line 999 "loader.l" set_protection(op, IVAL, RESIST_IMMUNE); YY_BREAK case 182: YY_RULE_SETUP #line 1000 "loader.l" set_protection(op, IVAL, RESIST_PROT); YY_BREAK case 183: YY_RULE_SETUP #line 1001 "loader.l" set_protection(op, IVAL, RESIST_VULN); YY_BREAK /* old values - keep them around for now, but they should be removed at some point */ case 184: YY_RULE_SETUP #line 1004 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_READY_RANGE, IVAL); YY_BREAK case 185: YY_RULE_SETUP #line 1005 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_READY_RANGE, IVAL); YY_BREAK case 186: YY_RULE_SETUP #line 1006 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_READY_RANGE, IVAL); YY_BREAK case 187: YY_RULE_SETUP #line 1007 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_USE_RANGE, IVAL); YY_BREAK case 188: YY_RULE_SETUP #line 1009 "loader.l" op->attack_movement = IVAL; YY_BREAK case 189: YY_RULE_SETUP #line 1010 "loader.l" op->move_status = IVAL; YY_BREAK case 190: YY_RULE_SETUP #line 1011 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_CONFUSED, IVAL); YY_BREAK case 191: YY_RULE_SETUP #line 1012 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_STEALTH, IVAL); YY_BREAK case 192: YY_RULE_SETUP #line 1013 "loader.l" add_button_link(op, op->map, IVAL); YY_BREAK case 193: YY_RULE_SETUP #line 1014 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_CURSED, IVAL); YY_BREAK case 194: YY_RULE_SETUP #line 1015 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_DAMNED, IVAL); YY_BREAK case 195: YY_RULE_SETUP #line 1016 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_SEE_ANYWHERE, IVAL); YY_BREAK case 196: YY_RULE_SETUP #line 1017 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_KNOWN_MAGICAL, IVAL); YY_BREAK case 197: YY_RULE_SETUP #line 1018 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_KNOWN_CURSED, IVAL); YY_BREAK case 198: YY_RULE_SETUP #line 1019 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_CAN_USE_SKILL, IVAL); YY_BREAK case 199: YY_RULE_SETUP #line 1020 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_BEEN_APPLIED, IVAL); YY_BREAK case 200: YY_RULE_SETUP #line 1021 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_READY_SCROLL, IVAL); YY_BREAK case 201: YY_RULE_SETUP #line 1022 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_USE_ROD, IVAL); YY_BREAK case 202: YY_RULE_SETUP #line 1023 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_USE_HORN, IVAL); YY_BREAK case 203: YY_RULE_SETUP #line 1024 "loader.l" op->expmul = FVAL; YY_BREAK case 204: YY_RULE_SETUP #line 1025 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_UNIQUE, IVAL); YY_BREAK case 205: YY_RULE_SETUP #line 1026 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_MAKE_INVIS, IVAL); YY_BREAK case 206: YY_RULE_SETUP #line 1027 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_INV_LOCKED, IVAL); YY_BREAK case 207: YY_RULE_SETUP #line 1028 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_IS_WOODED, IVAL); YY_BREAK case 208: YY_RULE_SETUP #line 1029 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_IS_HILLY, IVAL); YY_BREAK case 209: YY_RULE_SETUP #line 1030 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_IS_WATER, IVAL); YY_BREAK case 210: YY_RULE_SETUP #line 1031 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_READY_SKILL, IVAL); YY_BREAK case 211: YY_RULE_SETUP #line 1032 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_READY_WEAPON, IVAL); YY_BREAK case 212: YY_RULE_SETUP #line 1033 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_NO_SKILL_IDENT, IVAL); YY_BREAK case 213: YY_RULE_SETUP #line 1034 "loader.l" op->glow_radius = IVAL; YY_BREAK case 214: YY_RULE_SETUP #line 1035 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_BLIND, IVAL); YY_BREAK case 215: YY_RULE_SETUP #line 1036 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_SEE_IN_DARK, IVAL); YY_BREAK case 216: YY_RULE_SETUP #line 1037 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_IS_CAULDRON, IVAL); YY_BREAK case 217: YY_RULE_SETUP #line 1038 "loader.l" op->randomitems = find_treasurelist(yval()); YY_BREAK case 218: YY_RULE_SETUP #line 1039 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_NO_STEAL, IVAL); YY_BREAK case 219: YY_RULE_SETUP #line 1040 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_ONE_HIT, IVAL); YY_BREAK case 220: YY_RULE_SETUP #line 1041 "loader.l" SET_OR_CLEAR_FLAG(op, FLAG_BERSERK, IVAL); YY_BREAK case 221: YY_RULE_SETUP #line 1043 "loader.l" { /* Some archetypes have these values in them */ } YY_BREAK case 222: YY_RULE_SETUP #line 1044 "loader.l" { /* Probably the pupland archetypes - I imagined */ } YY_BREAK case 223: YY_RULE_SETUP #line 1045 "loader.l" { /* That these are for the new combat code */ } YY_BREAK case 224: YY_RULE_SETUP #line 1046 "loader.l" { /* just ignore for now */ } YY_BREAK case 225: YY_RULE_SETUP #line 1047 "loader.l" { } YY_BREAK case 226: YY_RULE_SETUP #line 1048 "loader.l" op->weapontype = IVAL; YY_BREAK case 227: YY_RULE_SETUP #line 1049 "loader.l" op->tooltype = IVAL; YY_BREAK case 228: YY_RULE_SETUP #line 1050 "loader.l" op->casting_time = FVAL; YY_BREAK case 229: YY_RULE_SETUP #line 1051 "loader.l" op->elevation = IVAL; YY_BREAK case 230: YY_RULE_SETUP #line 1052 "loader.l" op->smoothlevel = IVAL; YY_BREAK case 231: YY_RULE_SETUP #line 1053 "loader.l" { if (IVAL) op->map_layer = IVAL; else { int i; char *cp = yval(); for (i=0; i < MAP_LAYERS; i++) { if (!strcasecmp(cp, map_layer_name[i])) { op->map_layer = i; break; } } if (i == MAP_LAYERS) { LOG(llevError,"Invalid map_layer name found: %s\n", cp); } } } YY_BREAK case 232: YY_RULE_SETUP #line 1070 "loader.l" op->client_type = IVAL; YY_BREAK case 233: YY_RULE_SETUP #line 1071 "loader.l" set_body_info(op, yytext); YY_BREAK case 234: YY_RULE_SETUP #line 1072 "loader.l" op->duration = IVAL; YY_BREAK case 235: YY_RULE_SETUP #line 1073 "loader.l" op->range = IVAL; YY_BREAK case 236: YY_RULE_SETUP #line 1074 "loader.l" op->range_modifier = IVAL; YY_BREAK case 237: YY_RULE_SETUP #line 1075 "loader.l" op->dam_modifier = IVAL; YY_BREAK case 238: YY_RULE_SETUP #line 1076 "loader.l" op->duration_modifier = IVAL; YY_BREAK case 239: YY_RULE_SETUP #line 1077 "loader.l" SET_OR_CLEAR_FLAG( op, FLAG_IS_BUILDABLE, IVAL ); YY_BREAK case 240: YY_RULE_SETUP #line 1078 "loader.l" { char *yv=yval(); if (*yv=='\0') LOG(llevError,"Script (current weapon) without val\n"); else { FREE_AND_COPY(op->current_weapon_script, yv); }; } YY_BREAK case 241: YY_RULE_SETUP #line 1087 "loader.l" {/* ignore empty lines, newlines we don't do above */} YY_BREAK case 242: YY_RULE_SETUP #line 1088 "loader.l" {} YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(MESSAGE): case YY_STATE_EOF(LORE): case YY_STATE_EOF(SCRIPT): #line 1090 "loader.l" {/* If we got an error, return the error. Otherwise, return that we got EOF */ if (lex_error!=0) return lex_error; else return LL_EOF;} YY_BREAK case 243: YY_RULE_SETUP #line 1092 "loader.l" { add_key_value(op); } YY_BREAK case 244: YY_RULE_SETUP #line 1093 "loader.l" ECHO; YY_BREAK #line 4002 "loader.c" case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = yy_hold_char; YY_RESTORE_YY_MORE_OFFSET if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure * consistency between yy_current_buffer and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ yy_n_chars = yy_current_buffer->yy_n_chars; yy_current_buffer->yy_input_file = yyin; yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) { /* This was really a NUL. */ yy_state_type yy_next_state; yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = yytext_ptr + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++yy_c_buf_p; yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = yy_c_buf_p; goto yy_find_action; } } else switch ( yy_get_next_buffer() ) { case EOB_ACT_END_OF_FILE: { yy_did_buffer_switch_on_eof = 0; if ( yywrap() ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: yy_c_buf_p = &yy_current_buffer->yy_ch_buf[yy_n_chars]; yy_current_state = yy_get_previous_state(); yy_cp = yy_c_buf_p; yy_bp = yytext_ptr + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer() { register char *dest = yy_current_buffer->yy_ch_buf; register char *source = yytext_ptr; register int number_to_move, i; int ret_val; if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( yy_current_buffer->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ yy_current_buffer->yy_n_chars = yy_n_chars = 0; else { int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ #ifdef YY_USES_REJECT YY_FATAL_ERROR( "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); #else /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = yy_current_buffer; int yy_c_buf_p_offset = (int) (yy_c_buf_p - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ yy_flex_realloc( (void *) b->yy_ch_buf, b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1; #endif } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), yy_n_chars, num_to_read ); yy_current_buffer->yy_n_chars = yy_n_chars; } if ( yy_n_chars == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; yyrestart( yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; yy_current_buffer->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; yy_n_chars += number_to_move; yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state() { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = yy_start; yy_current_state += YY_AT_BOL(); for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 2179 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ #ifdef YY_USE_PROTOS static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) #else static yy_state_type yy_try_NUL_trans( yy_current_state ) yy_state_type yy_current_state; #endif { register int yy_is_jam; register char *yy_cp = yy_c_buf_p; register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { yy_last_accepting_state = yy_current_state; yy_last_accepting_cpos = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 2179 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 2178); return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT #ifdef YY_USE_PROTOS static void yyunput( int c, register char *yy_bp ) #else static void yyunput( c, yy_bp ) int c; register char *yy_bp; #endif { register char *yy_cp = yy_c_buf_p; /* undo effects of setting up yytext */ *yy_cp = yy_hold_char; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register int number_to_move = yy_n_chars + 2; register char *dest = &yy_current_buffer->yy_ch_buf[ yy_current_buffer->yy_buf_size + 2]; register char *source = &yy_current_buffer->yy_ch_buf[number_to_move]; while ( source > yy_current_buffer->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); yy_current_buffer->yy_n_chars = yy_n_chars = yy_current_buffer->yy_buf_size; if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; yytext_ptr = yy_bp; yy_hold_char = *yy_cp; yy_c_buf_p = yy_cp; } #endif /* ifndef YY_NO_UNPUT */ #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput() #else static int input() #endif { int c; *yy_c_buf_p = yy_hold_char; if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) /* This was really a NUL. */ *yy_c_buf_p = '\0'; else { /* need more input */ int offset = yy_c_buf_p - yytext_ptr; ++yy_c_buf_p; switch ( yy_get_next_buffer() ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ yyrestart( yyin ); /* fall through */ case EOB_ACT_END_OF_FILE: { if ( yywrap() ) return EOF; if ( ! yy_did_buffer_switch_on_eof ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: yy_c_buf_p = yytext_ptr + offset; break; } } } c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ *yy_c_buf_p = '\0'; /* preserve yytext */ yy_hold_char = *++yy_c_buf_p; yy_current_buffer->yy_at_bol = (c == '\n'); return c; } #endif /* YY_NO_INPUT */ #ifdef YY_USE_PROTOS void yyrestart( FILE *input_file ) #else void yyrestart( input_file ) FILE *input_file; #endif { if ( ! yy_current_buffer ) yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); yy_init_buffer( yy_current_buffer, input_file ); yy_load_buffer_state(); } #ifdef YY_USE_PROTOS void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) #else void yy_switch_to_buffer( new_buffer ) YY_BUFFER_STATE new_buffer; #endif { if ( yy_current_buffer == new_buffer ) return; if ( yy_current_buffer ) { /* Flush out information for old buffer. */ *yy_c_buf_p = yy_hold_char; yy_current_buffer->yy_buf_pos = yy_c_buf_p; yy_current_buffer->yy_n_chars = yy_n_chars; } yy_current_buffer = new_buffer; yy_load_buffer_state(); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ yy_did_buffer_switch_on_eof = 1; } #ifdef YY_USE_PROTOS void yy_load_buffer_state( void ) #else void yy_load_buffer_state() #endif { yy_n_chars = yy_current_buffer->yy_n_chars; yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; yyin = yy_current_buffer->yy_input_file; yy_hold_char = *yy_c_buf_p; } #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) #else YY_BUFFER_STATE yy_create_buffer( file, size ) FILE *file; int size; #endif { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; yy_init_buffer( b, file ); return b; } #ifdef YY_USE_PROTOS void yy_delete_buffer( YY_BUFFER_STATE b ) #else void yy_delete_buffer( b ) YY_BUFFER_STATE b; #endif { if ( ! b ) return; if ( b == yy_current_buffer ) yy_current_buffer = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) yy_flex_free( (void *) b->yy_ch_buf ); yy_flex_free( (void *) b ); } #ifdef YY_USE_PROTOS void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) #else void yy_init_buffer( b, file ) YY_BUFFER_STATE b; FILE *file; #endif { yy_flush_buffer( b ); b->yy_input_file = file; b->yy_fill_buffer = 1; #if YY_ALWAYS_INTERACTIVE b->yy_is_interactive = 1; #else #if YY_NEVER_INTERACTIVE b->yy_is_interactive = 0; #else b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; #endif #endif } #ifdef YY_USE_PROTOS void yy_flush_buffer( YY_BUFFER_STATE b ) #else void yy_flush_buffer( b ) YY_BUFFER_STATE b; #endif { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == yy_current_buffer ) yy_load_buffer_state(); } #ifndef YY_NO_SCAN_BUFFER #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) #else YY_BUFFER_STATE yy_scan_buffer( base, size ) char *base; yy_size_t size; #endif { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; yy_switch_to_buffer( b ); return b; } #endif #ifndef YY_NO_SCAN_STRING #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) #else YY_BUFFER_STATE yy_scan_string( yy_str ) yyconst char *yy_str; #endif { int len; for ( len = 0; yy_str[len]; ++len ) ; return yy_scan_bytes( yy_str, len ); } #endif #ifndef YY_NO_SCAN_BYTES #ifdef YY_USE_PROTOS YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) #else YY_BUFFER_STATE yy_scan_bytes( bytes, len ) yyconst char *bytes; int len; #endif { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = len + 2; buf = (char *) yy_flex_alloc( n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); for ( i = 0; i < len; ++i ) buf[i] = bytes[i]; buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; b = yy_scan_buffer( buf, n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #endif #ifndef YY_NO_PUSH_STATE #ifdef YY_USE_PROTOS static void yy_push_state( int new_state ) #else static void yy_push_state( new_state ) int new_state; #endif { if ( yy_start_stack_ptr >= yy_start_stack_depth ) { yy_size_t new_size; yy_start_stack_depth += YY_START_STACK_INCR; new_size = yy_start_stack_depth * sizeof( int ); if ( ! yy_start_stack ) yy_start_stack = (int *) yy_flex_alloc( new_size ); else yy_start_stack = (int *) yy_flex_realloc( (void *) yy_start_stack, new_size ); if ( ! yy_start_stack ) YY_FATAL_ERROR( "out of memory expanding start-condition stack" ); } yy_start_stack[yy_start_stack_ptr++] = YY_START; BEGIN(new_state); } #endif #ifndef YY_NO_POP_STATE static void yy_pop_state() { if ( --yy_start_stack_ptr < 0 ) YY_FATAL_ERROR( "start-condition stack underflow" ); BEGIN(yy_start_stack[yy_start_stack_ptr]); } #endif #ifndef YY_NO_TOP_STATE static int yy_top_state() { return yy_start_stack[yy_start_stack_ptr - 1]; } #endif #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif #ifdef YY_USE_PROTOS static void yy_fatal_error( yyconst char msg[] ) #else static void yy_fatal_error( msg ) char msg[]; #endif { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ yytext[yyleng] = yy_hold_char; \ yy_c_buf_p = yytext + n; \ yy_hold_char = *yy_c_buf_p; \ *yy_c_buf_p = '\0'; \ yyleng = n; \ } \ while ( 0 ) /* Internal utility routines. */ #ifndef yytext_ptr #ifdef YY_USE_PROTOS static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) #else static void yy_flex_strncpy( s1, s2, n ) char *s1; yyconst char *s2; int n; #endif { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN #ifdef YY_USE_PROTOS static int yy_flex_strlen( yyconst char *s ) #else static int yy_flex_strlen( s ) yyconst char *s; #endif { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif #ifdef YY_USE_PROTOS static void *yy_flex_alloc( yy_size_t size ) #else static void *yy_flex_alloc( size ) yy_size_t size; #endif { return (void *) malloc( size ); } #ifdef YY_USE_PROTOS static void *yy_flex_realloc( void *ptr, yy_size_t size ) #else static void *yy_flex_realloc( ptr, size ) void *ptr; yy_size_t size; #endif { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } #ifdef YY_USE_PROTOS static void yy_flex_free( void *ptr ) #else static void yy_flex_free( ptr ) void *ptr; #endif { free( ptr ); } #if YY_MAIN int main() { yylex(); return 0; } #endif #line 1093 "loader.l" int yyerror(char *s) { LOG(llevError, "%s: %s\n", s, yytext); return -1; } /* Our save file syntax is very simple, so we can use a very simple * processing mechanism here instead using something like bison * This skips over the space and returns the value, or "" if no value * is found. Modified 4/26/2000 to also strip spaces at end of * line */ static char *yval() { static char *em=""; char *cp,*end; /* First skip over start of line, like animation or name */ for (cp=yytext; *cp!=' '; cp++) { if (*cp=='\0') { return em; } } /* Skip over whitespace */ for (; *cp==' '; cp++) { if (*cp=='\0') { return em; } } /* Got last character before null and strip * off tailing whitespace */ for (end=cp+strlen(cp)-1; *end==' '; end--) { if (end==cp) return em; *end='\0'; } return cp; } /* * Loads an object from the given file-pointer. * Variables will be read and parsed and patched into the object * until the string "end" is reached, or the end of the file. * * bufstat is used to determine various file attributes: * LO_REPATE (0): We are reading from the same buffer as the last call. * LO_LINEMODE (1): file that is being read from is multi purpose (ie, other functions * will also be reading from this (treasure file, artifacts.) * LO_NEWFILE (2): This is the first read from a particular file, so the buffers should * be reset. * LO_NOREAD (3): Reset the buffers, but don't read from it. (op can be null) * */ int load_object(FILE *fp, object *op, int bufstate, int map_flags) { int retval; char inbuf[MAX_BUF]; strcpy(msgbuf, ""); msglen=0; total_msglen=0; strcpy(lorebuf, ""); if (bufstate==LO_NEWFILE || bufstate==LO_NOREAD) { /* LOG(llevDebug,"Switching lex buffers\n");*/ yy_delete_buffer(YY_CURRENT_BUFFER); yy_switch_to_buffer(yy_create_buffer(fp, YY_BUF_SIZE)); if (bufstate==LO_NOREAD) return LL_NORMAL; } if (bufstate==LO_LINEMODE) { YY_BUFFER_STATE yybufstate; while (fgets(inbuf, MAX_BUF-3, fp)) { yybufstate=yy_scan_string(inbuf); retval=lex_load(op, map_flags); yy_delete_buffer(yybufstate); if (retval==LL_NORMAL) return retval; } LOG(llevDebug,"Got eof while scanning strings\n"); return LL_EOF; } retval=lex_load(op, map_flags); if (op->current_weapon_script != NULL) { op->current_weapon = find_best_weapon_used_match(op, op->current_weapon_script); LOG(llevDebug, "CurrentWeapon Loaded !\n"); }; /* LOG(llevDebug," load completed, object=%s\n",op->name);*/ return retval; } /* This takes a buffer, scans it for variables, and sets those variables * as appropriate in op. * * This function appears to be used in only 2 places - in crossedit to * override values and in c_wiz to mutate values. */ int set_variable(object *op,char *buf) { YY_BUFFER_STATE yybufstate,yycurbuf=YY_CURRENT_BUFFER; int retval; strcpy(msgbuf, ""); msglen=0; total_msglen=0; strcpy(lorebuf, ""); yy_push_state(INITIAL); yybufstate=yy_scan_string(buf); retval=lex_load(op,0); yy_switch_to_buffer(yycurbuf); yy_delete_buffer(yybufstate); yy_pop_state(); return retval; } /* Start of C code */ /* This array equates the FLAG_ values with the V_ values. Use -1 to * put gaps in the array that should not be processed. * The order matches the order of the define values in 'define.h'. */ /* This is a list of pointers that correspond to the FLAG_.. values. * This is a simple 1:1 mapping - if FLAG_FRIENDLY is 15, then * the 15'th element of this array should match that name. * If an entry is NULL, that is a flag not to loaded/saved. */ static const char *const flag_names[NUM_FLAGS+1] = { "alive", "wiz", NULL, NULL, "was_wiz", "applied", "unpaid", "can_use_shield", "no_pick", "client_anim_sync", "client_anim_random", /* 10 */ "is_animated", NULL /* slow_move */, NULL /* flying */, "monster", "friendly", "generator", "is_thrown", "auto_apply", "treasure", "player sold", /* 20 */ "see_invisible", "can_roll", "overlay_floor", "is_turnable", NULL /* walk_off */, NULL /* fly_on */, NULL /*fly_off*/, "is_used_up", "identified", "reflecting", /* 30 */ "changing", "splitting", "hitback", "startequip", "blocksview", "undead", "scared", "unaggressive", "reflect_missile", "reflect_spell", /* 40 */ "no_magic", "no_fix_player", "is_lightable", "tear_down", "run_away", NULL /*pass_thru */, NULL /*can_pass_thru*/, "pick_up", "unique", "no_drop", /* 50 */ NULL /* wizcast*/, "can_cast_spell", "can_use_scroll", "can_use_range", "can_use_bow", "can_use_armour", "can_use_weapon", "can_use_ring", "has_ready_range", "has_ready_bow", /* 60 */ "xrays", NULL, "is_floor", "lifesave", "no_strength", "sleep", "stand_still", "random_move", "only_attack", "confused", /* 70 */ "stealth", NULL, NULL, "cursed", "damned", "see_anywhere", "known_magical", "known_cursed", "can_use_skill", "been_applied", /* 80 */ "has_ready_scroll", "can_use_rod", NULL, "can_use_horn", "make_invisible", "inv_locked", "is_wooded", "is_hilly", "has_ready_skill", "has_ready_weapon", /* 90 */ "no_skill_ident", "is_blind", "can_see_in_dark", "is_cauldron", "is_dust", "no_steal", "one_hit", NULL, "berserk", "neutral", /* 100 */ "no_attack", "no_damage", NULL, NULL, "activate_on_push", "activate_on_release", "is_water", "use_content_on_gen", NULL, "is_buildable", /* 110 */ NULL }; /* * Initialises the array of variable-names. Needed before any * objects can be loaded. Called by init_library(). */ void init_vars() { } /*For get_ob_diff speed reason*/ typedef struct { const char *name; int length; }genericname; /* This returns a string of the integer movement type */ static char* get_string_move_type(MoveType mt) { static char retbuf[MAX_BUF], retbuf_all[MAX_BUF]; int i, all_count=0, count; strcpy(retbuf,""); strcpy(retbuf_all," all"); /* Quick check, and probably fairly common */ if (mt == MOVE_ALL) return retbuf_all+1; if (mt == 0) { strcpy(retbuf,"0"); return retbuf; } /* We basically slide the bits down. Why look at MOVE_ALL? * because we may want to return a string like 'all -swim', * and if we just looked at mt, we couldn't get that. */ for (i=MOVE_ALL, count=0; i!=0; i >>= 1, count++) { if (mt & (1<key_values; my_field != NULL; my_field = my_field->next) { /* Find the field in the opposing member. */ arch_field = get_ob_key_link(op2, my_field->key); /* If there's no partnering field, or it's got a different value, save our field. */ if (arch_field == NULL || my_field->value != arch_field->value) { FAST_STRCAT(fastbuf, my_field->key); FAST_STRNCAT(fastbuf, " ", 1); /* If this is null, then saving it as a space should * cause it to be null again. */ if (my_field->value) FAST_STRCAT(fastbuf, my_field->value); FAST_STRNCAT(fastbuf, "\n", eol_size); } } /* We don't need to worry about the arch's extra fields - they * will get taken care of the copy_object function. */ if(op->name && op->name!=op2->name) { ADD_STRINGLINE_ENTRY(fastbuf,"name ",op->name,5); } if(op->name_pl && op->name_pl!=op2->name_pl) { ADD_STRINGLINE_ENTRY(fastbuf,"name_pl ",op->name_pl,8); } if(op->custom_name && op->custom_name!=op2->custom_name) { ADD_STRINGLINE_ENTRY(fastbuf,"custom_name ",op->custom_name,12); } if(op->title && op->title!=op2->title) { ADD_STRINGLINE_ENTRY(fastbuf,"title ",op->title,6); } if(op->race && op->race!=op2->race) { ADD_STRINGLINE_ENTRY(fastbuf,"race ",op->race,5); } if(op->slaying && op->slaying!=op2->slaying) { ADD_STRINGLINE_ENTRY(fastbuf,"slaying ",op->slaying,8); } if(op->skill && op->skill!=op2->skill) { ADD_STRINGLINE_ENTRY(fastbuf,"skill ",op->skill,6); } if(op->msg && op->msg!=op2->msg) { FAST_STRNCAT(fastbuf,"msg\n",3+eol_size); FAST_STRCAT(fastbuf,op->msg); FAST_STRNCAT(fastbuf,"endmsg\n",6+eol_size); } if(op->lore && op->lore!=op2->lore) { FAST_STRNCAT(fastbuf,"lore\n",4+eol_size); FAST_STRCAT(fastbuf,op->lore); FAST_STRNCAT(fastbuf,"endlore\n",7+eol_size); } if(op->other_arch!=op2->other_arch&&op->other_arch!=NULL && op->other_arch->name) { ADD_STRINGLINE_ENTRY(fastbuf,"other_arch ",op->other_arch->name,11); } if(op->face!=op2->face) { ADD_STRINGLINE_ENTRY(fastbuf,"face ",op->face->name,5); } if (op->animation_id != op2->animation_id) { if (op->animation_id) { ADD_STRINGLINE_ENTRY(fastbuf,"animation ",animations[GET_ANIM_ID(op)].name,10); if ( ! QUERY_FLAG (op, FLAG_ANIMATE)) { FAST_STRNCAT(fastbuf,"is_animated 0\n",13+eol_size); } } else { FAST_STRNCAT(fastbuf,"animation NONE\n",14+eol_size); } } if(op->stats.Str!=op2->stats.Str) FAST_SAVE_LONG(fastbuf,"Str ",op->stats.Str,4); if(op->stats.Dex!=op2->stats.Dex) FAST_SAVE_LONG(fastbuf,"Dex ",op->stats.Dex,4); if(op->stats.Con!=op2->stats.Con) FAST_SAVE_LONG(fastbuf,"Con ",op->stats.Con,4); if(op->stats.Wis!=op2->stats.Wis) FAST_SAVE_LONG(fastbuf,"Wis ",op->stats.Wis,4); if(op->stats.Pow!=op2->stats.Pow) FAST_SAVE_LONG(fastbuf,"Pow ",op->stats.Pow,4); if(op->stats.Cha!=op2->stats.Cha) FAST_SAVE_LONG(fastbuf,"Cha ",op->stats.Cha,4); if(op->stats.Int!=op2->stats.Int) FAST_SAVE_LONG(fastbuf,"Int ",op->stats.Int,4); if(op->stats.hp!=op2->stats.hp) FAST_SAVE_LONG(fastbuf,"hp ",op->stats.hp,3); if(op->stats.maxhp!=op2->stats.maxhp) FAST_SAVE_LONG(fastbuf,"maxhp ",op->stats.maxhp,6); if(op->stats.sp!=op2->stats.sp) FAST_SAVE_LONG(fastbuf,"sp ",op->stats.sp,3); if(op->stats.maxsp!=op2->stats.maxsp) FAST_SAVE_LONG(fastbuf,"maxsp ",op->stats.maxsp,6); if(op->stats.grace!=op2->stats.grace) FAST_SAVE_LONG(fastbuf,"grace ",op->stats.grace,6); if(op->stats.maxgrace!=op2->stats.maxgrace) FAST_SAVE_LONG(fastbuf,"maxgrace ",op->stats.maxgrace,9); if(op->stats.exp!=op2->stats.exp) { sprintf(buf2,"%" FMT64 , op->stats.exp); ADD_STRINGLINE_ENTRY(fastbuf,"exp ", buf2, 4); } if(op->perm_exp!=op2->perm_exp) { sprintf(buf2,"%" FMT64 , op->perm_exp); ADD_STRINGLINE_ENTRY(fastbuf,"perm_exp ", buf2, 9); } if(op->expmul!=op2->expmul) FAST_SAVE_DOUBLE(fastbuf,"expmul ",op->expmul,7); if(op->stats.food!=op2->stats.food) FAST_SAVE_LONG(fastbuf,"food ",op->stats.food,5); if(op->stats.dam!=op2->stats.dam) FAST_SAVE_LONG(fastbuf,"dam ",op->stats.dam,4); if(op->stats.luck!=op2->stats.luck) FAST_SAVE_LONG(fastbuf,"luck ",op->stats.luck,5); if(op->stats.wc!=op2->stats.wc) FAST_SAVE_LONG(fastbuf,"wc ",op->stats.wc,3); if(op->stats.ac!=op2->stats.ac) FAST_SAVE_LONG(fastbuf,"ac ",op->stats.ac,3); if(op->x!=op2->x) FAST_SAVE_LONG(fastbuf,"x ",op->x,2); if(op->y!=op2->y) FAST_SAVE_LONG(fastbuf,"y ",op->y,2); if(op->speed!=op2->speed) { FAST_SAVE_DOUBLE(fastbuf,"speed ",op->speed,6); } if(op->speed > 0 && op->speed_left!=op2->speed_left) { FAST_SAVE_DOUBLE(fastbuf,"speed_left ",op->speed_left,11); } if(op->move_status != op2->move_status) FAST_SAVE_LONG(fastbuf,"move_state ",op->move_status,11); if(op->attack_movement != op2->attack_movement) FAST_SAVE_LONG(fastbuf,"attack_movement ",op->attack_movement,16); if(op->nrof!=op2->nrof) FAST_SAVE_LONG(fastbuf,"nrof ",op->nrof,5); if(op->level!=op2->level) FAST_SAVE_LONG(fastbuf,"level ",op->level,6); if(op->direction!=op2->direction) FAST_SAVE_LONG(fastbuf,"direction ",op->direction,10); if(op->type!=op2->type) FAST_SAVE_LONG(fastbuf,"type ",op->type,5); if(op->subtype!=op2->subtype) FAST_SAVE_LONG(fastbuf,"subtype ",op->subtype,8); if(op->attacktype!=op2->attacktype) FAST_SAVE_LONG(fastbuf,"attacktype ",op->attacktype,11); for (tmp=0; tmp < NROFATTACKS; tmp++) { if (op->resist[tmp] != op2->resist[tmp]) { FAST_STRNCAT(fastbuf,"resist_",7); FAST_SAVE_LONG(fastbuf,resist_save[tmp],op->resist[tmp],strlen(resist_save[tmp])); } } if(op->path_attuned!=op2->path_attuned) FAST_SAVE_LONG(fastbuf,"path_attuned ",op->path_attuned,13); if(op->path_repelled!=op2->path_repelled) FAST_SAVE_LONG(fastbuf,"path_repelled ",op->path_repelled,14); if(op->path_denied!=op2->path_denied) FAST_SAVE_LONG(fastbuf,"path_denied ",op->path_denied,12); if(op->material!=op2->material) FAST_SAVE_LONG(fastbuf,"material ",op->material,9); if(op->materialname && op->materialname!=op2->materialname) { ADD_STRINGLINE_ENTRY(fastbuf,"materialname ",op->materialname,13); } if(op->value!=op2->value) FAST_SAVE_LONG(fastbuf,"value ",op->value,6); if(op->carrying!=op2->carrying) FAST_SAVE_LONG(fastbuf,"carrying ",op->carrying,9); if(op->weight!=op2->weight) FAST_SAVE_LONG(fastbuf,"weight ",op->weight,7); if(op->invisible!=op2->invisible) FAST_SAVE_LONG(fastbuf,"invisible ",op->invisible,10); if(op->state!=op2->state) FAST_SAVE_LONG(fastbuf,"state ",op->state,6); if(op->magic!=op2->magic) FAST_SAVE_LONG(fastbuf,"magic ",op->magic,6); if(op->last_heal!=op2->last_heal) FAST_SAVE_LONG(fastbuf,"last_heal ",op->last_heal,10); if(op->last_sp!=op2->last_sp) FAST_SAVE_LONG(fastbuf,"last_sp ",op->last_sp,8); if(op->last_grace!=op2->last_grace) FAST_SAVE_LONG(fastbuf,"last_grace ",op->last_grace,11); if(op->last_eat!=op2->last_eat) FAST_SAVE_LONG(fastbuf,"last_eat ",op->last_eat,9); if(QUERY_FLAG(op,FLAG_IS_LINKED) && (tmp = get_button_value(op))) FAST_SAVE_LONG(fastbuf,"connected ",tmp,10); if(op->glow_radius!=op2->glow_radius) FAST_SAVE_LONG(fastbuf,"glow_radius ",op->glow_radius,12); if (op->randomitems!=op2->randomitems) { ADD_STRINGLINE_ENTRY(fastbuf,"randomitems ",(op->randomitems?op->randomitems->name:"none"),12); } #ifdef NPC_PROG if(op->npc_status!=op2->npc_status) FAST_SAVE_LONG(fastbuf,"npc_status ",op->npc_status,11); if(op->npc_program!=op2->npc_program) FAST_SAVE_LONG(fastbuf,"npc_program ",op->npc_program,12); #endif if(op->run_away!=op2->run_away) FAST_SAVE_LONG(fastbuf,"run_away ",op->run_away,9); if(op->pick_up!=op2->pick_up) FAST_SAVE_LONG(fastbuf,"pick_up ",op->pick_up,8); if(op->weight_limit!=op2->weight_limit) FAST_SAVE_LONG(fastbuf,"container ",op->weight_limit,10); if (op->will_apply!=op2->will_apply) FAST_SAVE_LONG(fastbuf,"will_apply ",op->will_apply,11); if(op->smoothlevel!=op2->smoothlevel) FAST_SAVE_LONG(fastbuf,"smoothlevel ",op->smoothlevel,12); if(op->map_layer!=op2->map_layer) ADD_STRINGLINE_ENTRY(fastbuf,"map_layer ",map_layer_name[op->map_layer],10); if (op->current_weapon_script!=op2->current_weapon_script){ ADD_STRINGLINE_ENTRY(fastbuf,"current_weapon_script ",op->current_weapon_script,22); }; if(op->weapontype && op->weapontype!=op2->weapontype) { FAST_SAVE_LONG(fastbuf,"weapontype ",op->weapontype,11); } if(op->tooltype && op->tooltype!=op2->tooltype) { FAST_SAVE_LONG(fastbuf,"tooltype ",op->tooltype,9); } if (op->elevation && op->elevation != op2->elevation) { FAST_SAVE_LONG(fastbuf,"elevation ",op->elevation,10); } if (op->client_type && op->client_type != op2->client_type) { FAST_SAVE_LONG(fastbuf,"client_type ",op->client_type,12); } if (op->item_power != op2->item_power) { FAST_SAVE_LONG(fastbuf,"item_power ",op->item_power,11); } if (op->duration != op2->duration) FAST_SAVE_LONG(fastbuf,"duration ",op->duration,9); if (op->range != op2->range) FAST_SAVE_LONG(fastbuf,"range ",op->range,6); if (op->range_modifier != op2->range_modifier) FAST_SAVE_LONG(fastbuf,"range_modifier ",op->range_modifier,15); if (op->duration_modifier != op2->duration_modifier) FAST_SAVE_LONG(fastbuf,"duration_modifier ", op->duration_modifier,18); if (op->dam_modifier != op2->dam_modifier) FAST_SAVE_LONG(fastbuf,"dam_modifier ", op->dam_modifier,13); if (op->gen_sp_armour != op2->gen_sp_armour) { FAST_SAVE_LONG(fastbuf,"gen_sp_armour ",op->gen_sp_armour,14); } /* I've kept the old int move type saving code commented out. * In an ideal world, we'd know if we want to do a quick * save (say to a temp map, where we don't care about strings), * or a slower save/dm dump, where printing out strings is handy. */ if (op->move_type != op2->move_type) { /*FAST_SAVE_LONG(fastbuf,"move_type ",op->move_type,10)*/ ADD_STRINGLINE_ENTRY(fastbuf,"move_type ", get_string_move_type(op->move_type), 10); } if (op->move_block != op2->move_block) { /*FAST_SAVE_LONG(fastbuf,"move_block ",op->move_block,11)*/ ADD_STRINGLINE_ENTRY(fastbuf,"move_block ", get_string_move_type(op->move_block), 11); } if (op->move_allow != op2->move_allow) { /*FAST_SAVE_LONG(fastbuf,"move_allow ",op->move_allow,11);*/ ADD_STRINGLINE_ENTRY(fastbuf,"move_allow ", get_string_move_type(op->move_allow), 11); } if (op->move_on != op2->move_on) { /*FAST_SAVE_LONG(fastbuf,"move_on ",op->move_on,8);*/ ADD_STRINGLINE_ENTRY(fastbuf,"move_on ", get_string_move_type(op->move_on), 8); } if (op->move_off != op2->move_off) { /*FAST_SAVE_LONG(fastbuf,"move_off ",op->move_off,9);*/ ADD_STRINGLINE_ENTRY(fastbuf,"move_off ", get_string_move_type(op->move_off), 9); } if (op->move_slow != op2->move_slow) { /*FAST_SAVE_LONG(fastbuf,"move_slow ",op->move_slow,10);*/ ADD_STRINGLINE_ENTRY(fastbuf,"move_slow ", get_string_move_type(op->move_slow), 10); } if (op->move_slow_penalty != op2->move_slow_penalty) { FAST_SAVE_LONG(fastbuf,"move_slow_penalty ",op->move_slow_penalty,18); } if (!COMPARE_FLAGS(op,op2)) { for (tmp=0; tmp <= NUM_FLAGS; tmp++) { if (flag_names[tmp] && (QUERY_FLAG(op, tmp) != QUERY_FLAG(op2, tmp))) { ADD_STRINGLINE_ENTRY(fastbuf,flag_names[tmp],QUERY_FLAG(op, tmp)?" 1":" 0",flag_lens[tmp]); } } } /* Save body locations */ for (i=0; ibody_info[i] != op2->body_info[i]) { FAST_STRCAT(fastbuf,body_locations[i].save_name); FAST_SAVE_LONG(fastbuf," ",op->body_info[i],1); } } FINISH_FASTCAT(fastbuf); if(buf[0]=='\0') /*did not cat anything...*/ return NULL; return buf; } /* * Dumps all variables in an object to a file. * If bit 0 of flag is set, unpaid objects will be saved. As of now, * the only place this is not set is when saving the player. * If bit 1 of flag is set, don't remove the object after save. As of now, * all of the callers are setting this. */ void save_object(FILE *fp,object *op, int flag) { archetype *at; char *cp, alt_buf[HUGE_BUF]; object *tmp,*old; /* Even if the object does have an owner, it would seem that we should * still save it. */ if(op->owner!=NULL || fp == NULL) return; /* If it is unpaid and we don't want to save those, just return. */ if(!(flag&1)&&(QUERY_FLAG(op, FLAG_UNPAID))) { return; } /* If the object has no_save set, just return */ if(op->no_save) return; if((at=op->arch)==NULL) at=empty_archetype; fprintf(fp,"arch %s\n",at->name); if (op->arch->reference_count > 0) { /* The object is a custom item/monster, so we handle its save differently. * We compare the custom archetype to the "original" one, then only save hp/gr/sp * which are the only values we can't recompute later - all others are modified by items in inventory. * Note that hp/gr/sp will appear twice in save, but last value will take precedence. */ archetype* original = find_archetype(op->arch->name); if (!original) { LOG(llevError, "could not find original archetype %s for custom monster!", op->arch->name); abort(); } cp = get_ob_diff(&op->arch->clone, &original->clone); if (cp == NULL) { cp = alt_buf; cp[0] = 0; } if(op->stats.hp != op->arch->clone.stats.hp) snprintf(cp + strlen(cp), HUGE_BUF - strlen(cp) - 1, "hp %d\n", op->stats.hp); if(op->stats.sp != op->arch->clone.stats.sp) snprintf(cp + strlen(cp), HUGE_BUF - strlen(cp) - 1, "sp %d\n", op->stats.sp); if(op->stats.grace != op->arch->clone.stats.grace) snprintf(cp + strlen(cp), HUGE_BUF - strlen(cp) - 1, "grace %d\n", op->stats.grace); if(op->x != op->arch->clone.x) snprintf(cp + strlen(cp), HUGE_BUF - strlen(cp) - 1, "x %d\n", op->x); if(op->y != op->arch->clone.y) snprintf(cp + strlen(cp), HUGE_BUF - strlen(cp) - 1, "y %d\n", op->y); } else cp = get_ob_diff(op,&at->clone); if (cp!=NULL) fputs(cp,fp); /* We really should do some status checking on this */ /* Eneq(@csd.uu.se): Added this to allow containers being saved with contents*/ old=NULL; if (flag & 2 ) for(tmp=op->inv;tmp!=NULL;tmp=tmp->below) save_object(fp,tmp,flag); /* Slightly different logic because tmp/op will be removed by * the save_object we call. So we just keep looking at op->inv * until there is nothing left. In theory, the variable old * should not be needed, as recursive loops shouldn't happen. */ else while ((tmp=op->inv)!=NULL) { if(old==tmp) { LOG(llevError," Recursive loop in inventory\n"); break; } save_object(fp,tmp,flag); old=tmp; } if (!(flag&2)) { remove_ob(op); free_object (op); } fprintf(fp,"end\n"); }