From c70aa417cdc1ef4b475131bdda14a3aca4135577 Mon Sep 17 00:00:00 2001 From: Fate Date: Sat, 22 Nov 2008 01:15:44 -0700 Subject: Added NONMAGIC flag to distinguish `keyword' operations (such as `marry') from regular spells (keywords don't require spellcasting ability) --- src/map/magic-interpreter-base.c | 4 +- src/map/magic-interpreter-lexer.c | 436 ++++++------ src/map/magic-interpreter-parser.c | 1306 ++++++++++++++++++------------------ src/map/magic-interpreter-parser.h | 168 ++--- src/map/magic-interpreter-parser.y | 6 + src/map/magic-interpreter.h | 1 + src/map/magic-interpreter.l | 1 + src/map/magic.c | 8 +- 8 files changed, 988 insertions(+), 942 deletions(-) (limited to 'src/map') diff --git a/src/map/magic-interpreter-base.c b/src/map/magic-interpreter-base.c index dc0fa02..a6c5795 100644 --- a/src/map/magic-interpreter-base.c +++ b/src/map/magic-interpreter-base.c @@ -294,6 +294,7 @@ spellguard_can_satisfy(spellguard_check_t *check, character_t *caster, env_t *en int retval = check_prerequisites(caster, check->catalysts); +/* fprintf(stderr, "MC(%d/%s)? %d%d%d%d (%u <= %u)\n", caster->bl.id, caster->status.name, retval, @@ -301,6 +302,7 @@ spellguard_can_satisfy(spellguard_check_t *check, character_t *caster, env_t *en check->mana <= caster->status.sp, check_prerequisites(caster, check->components), caster->cast_tick, tick); +*/ if (retval && near_miss) *near_miss = 1; // close enough! @@ -318,8 +320,6 @@ spellguard_can_satisfy(spellguard_check_t *check, character_t *caster, env_t *en caster->cast_tick = tick + casttime; /* Make sure not to cast too frequently */ - fprintf(stderr, " -> NC %u + %u = %u\n", tick, casttime, caster->cast_tick); - consume_components(caster, check->components); pc_heal(caster, 0, -check->mana); } diff --git a/src/map/magic-interpreter-lexer.c b/src/map/magic-interpreter-lexer.c index b5a42a0..2acc3d1 100644 --- a/src/map/magic-interpreter-lexer.c +++ b/src/map/magic-interpreter-lexer.c @@ -73,7 +73,6 @@ typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN @@ -104,6 +103,8 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif +#endif /* ! C99 */ + #endif /* ! FLEXINT_H */ #ifdef __cplusplus @@ -395,8 +396,8 @@ static void yy_fatal_error (yyconst char msg[] ); *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; -#define YY_NUM_RULES 83 -#define YY_END_OF_BUFFER 84 +#define YY_NUM_RULES 84 +#define YY_END_OF_BUFFER 85 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -404,33 +405,34 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[230] = +static yyconst flex_int16_t yy_accept[237] = { 0, - 0, 0, 84, 82, 81, 81, 82, 82, 82, 23, - 33, 17, 18, 21, 19, 28, 20, 22, 76, 76, - 27, 26, 14, 9, 13, 29, 78, 78, 78, 78, - 7, 78, 78, 78, 78, 78, 5, 78, 78, 78, - 1, 78, 3, 31, 32, 34, 82, 30, 12, 0, - 75, 0, 0, 79, 24, 76, 0, 0, 35, 16, - 11, 10, 49, 15, 36, 78, 78, 78, 78, 78, - 78, 72, 78, 78, 78, 78, 67, 47, 78, 78, - 78, 78, 6, 4, 39, 63, 78, 78, 8, 78, - 78, 78, 78, 2, 78, 78, 78, 40, 78, 0, - - 0, 74, 25, 0, 75, 0, 0, 80, 77, 78, - 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, - 48, 78, 71, 46, 78, 78, 64, 78, 78, 78, - 78, 78, 78, 78, 78, 78, 78, 78, 0, 0, - 74, 78, 78, 78, 78, 38, 78, 78, 78, 78, - 78, 69, 78, 78, 78, 54, 78, 78, 78, 56, - 78, 78, 78, 78, 68, 78, 73, 57, 60, 78, - 58, 78, 78, 78, 62, 78, 78, 78, 44, 78, - 78, 78, 45, 78, 78, 78, 78, 78, 78, 78, - 78, 59, 65, 78, 78, 78, 43, 50, 66, 78, - - 78, 78, 78, 78, 78, 70, 78, 51, 78, 41, - 78, 55, 78, 78, 78, 78, 61, 52, 78, 37, - 78, 53, 78, 78, 78, 78, 78, 42, 0 + 0, 0, 85, 83, 82, 82, 83, 83, 83, 23, + 33, 17, 18, 21, 19, 28, 20, 22, 77, 77, + 27, 26, 14, 9, 13, 29, 79, 79, 79, 79, + 7, 79, 79, 79, 79, 79, 5, 79, 79, 79, + 1, 79, 3, 31, 32, 34, 83, 30, 12, 0, + 76, 0, 0, 80, 24, 77, 0, 0, 35, 16, + 11, 10, 50, 15, 36, 79, 79, 79, 79, 79, + 79, 73, 79, 79, 79, 79, 68, 48, 79, 79, + 79, 79, 6, 79, 4, 39, 64, 79, 79, 8, + 79, 79, 79, 79, 2, 79, 79, 79, 40, 79, + + 0, 0, 75, 25, 0, 76, 0, 0, 81, 78, + 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, + 79, 49, 79, 72, 47, 79, 79, 65, 79, 79, + 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, + 0, 0, 75, 79, 79, 79, 79, 38, 79, 79, + 79, 79, 79, 70, 79, 79, 79, 55, 79, 79, + 79, 79, 57, 79, 79, 79, 79, 69, 79, 74, + 58, 61, 79, 59, 79, 79, 79, 63, 79, 79, + 79, 44, 79, 79, 79, 79, 46, 79, 79, 79, + 79, 79, 79, 79, 79, 60, 66, 79, 79, 79, + + 79, 43, 51, 67, 79, 79, 79, 79, 79, 79, + 71, 79, 79, 52, 79, 41, 79, 56, 79, 79, + 45, 79, 79, 62, 53, 79, 37, 79, 54, 79, + 79, 79, 79, 79, 42, 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -475,67 +477,69 @@ static yyconst flex_int32_t yy_meta[57] = 1, 3, 2, 1, 1, 1 } ; -static yyconst flex_int16_t yy_base[238] = +static yyconst flex_int16_t yy_base[245] = { 0, - 0, 0, 279, 280, 280, 280, 257, 52, 274, 280, - 268, 280, 280, 280, 280, 280, 42, 260, 44, 46, - 280, 280, 44, 46, 48, 280, 45, 232, 47, 234, - 43, 233, 0, 44, 46, 51, 48, 229, 51, 241, - 63, 79, 244, 280, 280, 280, 31, 213, 280, 78, - 280, 97, 264, 280, 280, 89, 263, 0, 280, 280, - 280, 280, 280, 280, 280, 0, 226, 55, 235, 76, - 76, 0, 233, 219, 82, 219, 0, 0, 216, 232, - 220, 231, 0, 0, 0, 0, 217, 214, 0, 218, - 220, 223, 209, 0, 208, 213, 219, 201, 213, 39, - - 88, 280, 280, 110, 111, 118, 242, 280, 0, 202, - 205, 200, 216, 204, 195, 213, 197, 193, 206, 205, - 0, 200, 203, 0, 206, 205, 0, 202, 183, 198, - 186, 189, 191, 192, 193, 183, 195, 175, 68, 119, - 76, 174, 189, 183, 180, 0, 170, 177, 173, 167, - 183, 0, 165, 183, 171, 0, 177, 172, 166, 0, - 167, 164, 172, 160, 0, 157, 0, 0, 0, 167, - 0, 164, 149, 136, 0, 129, 125, 144, 0, 142, - 127, 122, 0, 134, 120, 124, 134, 130, 121, 114, - 127, 0, 0, 123, 109, 124, 0, 0, 0, 110, - - 108, 121, 120, 104, 109, 0, 103, 0, 99, 0, - 100, 0, 98, 96, 110, 124, 0, 0, 93, 0, - 110, 0, 96, 106, 99, 91, 87, 0, 280, 175, - 178, 180, 183, 186, 189, 125, 192 + 0, 0, 286, 287, 287, 287, 264, 52, 281, 287, + 275, 287, 287, 287, 287, 287, 42, 267, 44, 46, + 287, 287, 44, 46, 48, 287, 45, 239, 47, 241, + 43, 240, 0, 44, 46, 51, 48, 236, 51, 248, + 63, 79, 251, 287, 287, 287, 35, 220, 287, 75, + 287, 97, 271, 287, 287, 89, 270, 0, 287, 287, + 287, 287, 287, 287, 287, 0, 233, 66, 242, 76, + 76, 0, 240, 226, 55, 226, 0, 0, 223, 239, + 227, 238, 0, 225, 0, 0, 0, 223, 220, 0, + 224, 226, 229, 215, 0, 214, 219, 225, 207, 219, + + 66, 85, 287, 287, 111, 112, 118, 248, 287, 0, + 208, 211, 206, 222, 210, 201, 219, 203, 199, 212, + 211, 0, 206, 209, 0, 212, 211, 0, 198, 207, + 188, 203, 191, 194, 196, 197, 198, 188, 200, 180, + 76, 123, 79, 179, 194, 188, 185, 0, 175, 182, + 178, 172, 188, 0, 170, 188, 176, 0, 186, 181, + 176, 170, 0, 171, 168, 176, 164, 0, 161, 0, + 0, 0, 171, 0, 168, 153, 140, 0, 133, 129, + 148, 0, 143, 145, 129, 126, 0, 138, 124, 127, + 137, 133, 126, 119, 130, 0, 0, 126, 124, 111, + + 126, 0, 0, 0, 112, 110, 123, 122, 106, 111, + 0, 121, 105, 0, 101, 0, 102, 0, 100, 98, + 0, 111, 125, 0, 0, 95, 0, 112, 0, 98, + 106, 99, 91, 87, 0, 287, 179, 182, 184, 187, + 190, 193, 124, 196 } ; -static yyconst flex_int16_t yy_def[238] = +static yyconst flex_int16_t yy_def[245] = { 0, - 229, 1, 229, 229, 229, 229, 229, 230, 231, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 229, 229, 229, 233, 229, 229, 230, - 229, 234, 231, 229, 229, 229, 235, 236, 229, 229, - 229, 229, 229, 229, 229, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 233, - - 237, 229, 229, 230, 230, 234, 235, 229, 236, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 233, 237, - 233, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 0, 229, - 229, 229, 229, 229, 229, 229, 229 + 236, 1, 236, 236, 236, 236, 236, 237, 238, 236, + 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, + 236, 236, 236, 236, 236, 236, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 236, 236, 236, 240, 236, 236, 237, + 236, 241, 238, 236, 236, 236, 242, 243, 236, 236, + 236, 236, 236, 236, 236, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + + 240, 244, 236, 236, 237, 237, 241, 242, 236, 243, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 240, 244, 240, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, + 239, 239, 239, 239, 239, 0, 236, 236, 236, 236, + 236, 236, 236, 236 } ; -static yyconst flex_int16_t yy_nxt[337] = +static yyconst flex_int16_t yy_nxt[344] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, @@ -544,39 +548,40 @@ static yyconst flex_int16_t yy_nxt[337] = 33, 40, 41, 42, 33, 43, 33, 44, 4, 45, 46, 33, 33, 47, 48, 4, 51, 56, 56, 56, 56, 56, 56, 59, 60, 61, 62, 63, 64, 65, - 67, 70, 73, 77, 79, 81, 83, 86, 74, 101, - 75, 78, 51, 111, 80, 71, 102, 101, 68, 82, - 100, 89, 87, 84, 102, 90, 58, 91, 112, 50, - - 52, 105, 92, 95, 56, 56, 93, 96, 94, 121, - 97, 114, 117, 118, 51, 51, 101, 98, 115, 116, - 50, 100, 105, 102, 101, 122, 52, 109, 228, 227, - 226, 102, 225, 224, 223, 222, 140, 221, 220, 219, - 218, 217, 216, 141, 215, 106, 214, 213, 212, 211, - 210, 209, 208, 207, 206, 205, 204, 203, 52, 52, - 202, 201, 200, 199, 198, 197, 106, 140, 196, 195, - 194, 193, 192, 191, 141, 50, 50, 50, 53, 53, - 53, 66, 66, 100, 100, 100, 104, 104, 104, 107, - 107, 107, 139, 139, 139, 190, 189, 188, 187, 186, - - 185, 184, 183, 182, 181, 180, 179, 178, 177, 176, - 175, 174, 173, 172, 171, 170, 169, 168, 167, 166, - 165, 164, 163, 162, 161, 160, 159, 158, 157, 156, - 155, 154, 153, 152, 151, 150, 149, 148, 147, 146, - 145, 144, 143, 142, 108, 138, 137, 136, 135, 134, - 133, 132, 131, 130, 129, 128, 127, 126, 125, 124, - 123, 120, 119, 113, 110, 108, 54, 103, 99, 88, - 85, 76, 72, 69, 57, 55, 54, 49, 229, 3, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229 + 67, 70, 73, 77, 79, 81, 83, 87, 74, 51, + 75, 78, 122, 102, 80, 71, 84, 101, 68, 82, + 103, 90, 88, 85, 112, 91, 58, 92, 123, 50, + + 52, 106, 93, 96, 56, 56, 94, 97, 95, 113, + 98, 115, 118, 119, 102, 51, 51, 99, 116, 117, + 50, 103, 106, 52, 102, 101, 110, 102, 235, 234, + 233, 103, 232, 142, 103, 231, 230, 229, 228, 227, + 143, 226, 225, 224, 223, 107, 222, 221, 220, 219, + 218, 217, 216, 215, 214, 213, 212, 211, 210, 52, + 52, 209, 208, 207, 206, 205, 107, 204, 203, 202, + 201, 142, 200, 199, 198, 197, 196, 195, 143, 50, + 50, 50, 53, 53, 53, 66, 66, 101, 101, 101, + 105, 105, 105, 108, 108, 108, 141, 141, 141, 194, + + 193, 192, 191, 190, 189, 188, 187, 186, 185, 184, + 183, 182, 181, 180, 179, 178, 177, 176, 175, 174, + 173, 172, 171, 170, 169, 168, 167, 166, 165, 164, + 163, 162, 161, 160, 159, 158, 157, 156, 155, 154, + 153, 152, 151, 150, 149, 148, 147, 146, 145, 144, + 109, 140, 139, 138, 137, 136, 135, 134, 133, 132, + 131, 130, 129, 128, 127, 126, 125, 124, 121, 120, + 114, 111, 109, 54, 104, 100, 89, 86, 76, 72, + 69, 57, 55, 54, 49, 236, 3, 236, 236, 236, + 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, + + 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, + 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, + 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, + 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, + 236, 236, 236 } ; -static yyconst flex_int16_t yy_chk[337] = +static yyconst flex_int16_t yy_chk[344] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -585,46 +590,47 @@ static yyconst flex_int16_t yy_chk[337] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 17, 17, 19, 19, 20, 20, 23, 23, 23, 24, 24, 25, 25, - 27, 29, 31, 34, 35, 36, 37, 39, 31, 47, - 31, 34, 50, 68, 35, 29, 47, 100, 27, 36, - 101, 41, 39, 37, 100, 41, 19, 41, 68, 52, - - 8, 52, 41, 42, 56, 56, 41, 42, 41, 75, - 42, 70, 71, 71, 104, 105, 139, 42, 70, 70, - 106, 140, 106, 139, 141, 75, 50, 236, 227, 226, - 225, 141, 224, 223, 221, 219, 101, 216, 215, 214, - 213, 211, 209, 101, 207, 52, 205, 204, 203, 202, - 201, 200, 196, 195, 194, 191, 190, 189, 104, 105, - 188, 187, 186, 185, 184, 182, 106, 140, 181, 180, - 178, 177, 176, 174, 140, 230, 230, 230, 231, 231, - 231, 232, 232, 233, 233, 233, 234, 234, 234, 235, - 235, 235, 237, 237, 237, 173, 172, 170, 166, 164, - - 163, 162, 161, 159, 158, 157, 155, 154, 153, 151, - 150, 149, 148, 147, 145, 144, 143, 142, 138, 137, - 136, 135, 134, 133, 132, 131, 130, 129, 128, 126, - 125, 123, 122, 120, 119, 118, 117, 116, 115, 114, - 113, 112, 111, 110, 107, 99, 98, 97, 96, 95, - 93, 92, 91, 90, 88, 87, 82, 81, 80, 79, - 76, 74, 73, 69, 67, 57, 53, 48, 43, 40, - 38, 32, 30, 28, 18, 11, 9, 7, 3, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229, 229, 229, 229, 229, - 229, 229, 229, 229, 229, 229 + 27, 29, 31, 34, 35, 36, 37, 39, 31, 50, + 31, 34, 75, 47, 35, 29, 37, 102, 27, 36, + 47, 41, 39, 37, 68, 41, 19, 41, 75, 52, + + 8, 52, 41, 42, 56, 56, 41, 42, 41, 68, + 42, 70, 71, 71, 101, 105, 106, 42, 70, 70, + 107, 101, 107, 50, 141, 142, 243, 143, 234, 233, + 232, 141, 231, 102, 143, 230, 228, 226, 223, 222, + 102, 220, 219, 217, 215, 52, 213, 212, 210, 209, + 208, 207, 206, 205, 201, 200, 199, 198, 195, 105, + 106, 194, 193, 192, 191, 190, 107, 189, 188, 186, + 185, 142, 184, 183, 181, 180, 179, 177, 142, 237, + 237, 237, 238, 238, 238, 239, 239, 240, 240, 240, + 241, 241, 241, 242, 242, 242, 244, 244, 244, 176, + + 175, 173, 169, 167, 166, 165, 164, 162, 161, 160, + 159, 157, 156, 155, 153, 152, 151, 150, 149, 147, + 146, 145, 144, 140, 139, 138, 137, 136, 135, 134, + 133, 132, 131, 130, 129, 127, 126, 124, 123, 121, + 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, + 108, 100, 99, 98, 97, 96, 94, 93, 92, 91, + 89, 88, 84, 82, 81, 80, 79, 76, 74, 73, + 69, 67, 57, 53, 48, 43, 40, 38, 32, 30, + 28, 18, 11, 9, 7, 3, 236, 236, 236, 236, + 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, + + 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, + 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, + 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, + 236, 236, 236, 236, 236, 236, 236, 236, 236, 236, + 236, 236, 236 } ; /* Table of booleans, true if rule could match eol. */ -static yyconst flex_int32_t yy_rule_can_match_eol[84] = +static yyconst flex_int32_t yy_rule_can_match_eol[85] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, - 0, 1, 0, 0, }; + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, + 0, 0, 1, 0, 0, }; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; @@ -654,7 +660,7 @@ char *magic_frontend_text; #define HEADING(dir) { magic_frontend_lval.i = dir; FIXLOC; return DIR; } #define YY_NO_INPUT 1 -#line 658 "magic-interpreter-lexer.c" +#line 664 "magic-interpreter-lexer.c" #define INITIAL 0 @@ -741,7 +747,8 @@ static int input (void ); /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE -#define YY_READ_BUF_SIZE 8192 +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 #endif /* Copy whatever the last rule matched to the standard output. */ @@ -760,7 +767,7 @@ static int input (void ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - int n; \ + size_t n; \ for ( n = 0; n < max_size && \ (c = getc( magic_frontend_in )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -851,7 +858,7 @@ YY_DECL #line 22 "magic-interpreter.l" -#line 855 "magic-interpreter-lexer.c" +#line 862 "magic-interpreter-lexer.c" yylval = yylval_param; @@ -908,13 +915,13 @@ yy_match: 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 >= 230 ) + if ( yy_current_state >= 237 ) 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] != 280 ); + while ( yy_base[yy_current_state] != 287 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1171,162 +1178,167 @@ YY_RULE_SETUP case 45: YY_RULE_SETUP #line 68 "magic-interpreter.l" -{FIXLOC; return SPELL;} +{FIXLOC; return NONMAGIC;} YY_BREAK case 46: YY_RULE_SETUP #line 69 "magic-interpreter.l" -{FIXLOC; return LET;} +{FIXLOC; return SPELL;} YY_BREAK case 47: YY_RULE_SETUP #line 70 "magic-interpreter.l" -{FIXLOC; return IN;} +{FIXLOC; return LET;} YY_BREAK case 48: YY_RULE_SETUP #line 71 "magic-interpreter.l" -{FIXLOC; return END;} +{FIXLOC; return IN;} YY_BREAK case 49: YY_RULE_SETUP #line 72 "magic-interpreter.l" -{FIXLOC; return DARROW;} +{FIXLOC; return END;} YY_BREAK case 50: YY_RULE_SETUP #line 73 "magic-interpreter.l" -{FIXLOC; return STRING_TY;} +{FIXLOC; return DARROW;} YY_BREAK case 51: YY_RULE_SETUP #line 74 "magic-interpreter.l" -{FIXLOC; return REQUIRE;} +{FIXLOC; return STRING_TY;} YY_BREAK case 52: YY_RULE_SETUP #line 75 "magic-interpreter.l" -{FIXLOC; return CATALYSTS;} +{FIXLOC; return REQUIRE;} YY_BREAK case 53: YY_RULE_SETUP #line 76 "magic-interpreter.l" -{FIXLOC; return COMPONENTS;} +{FIXLOC; return CATALYSTS;} YY_BREAK case 54: YY_RULE_SETUP #line 77 "magic-interpreter.l" -{FIXLOC; return MANA;} +{FIXLOC; return COMPONENTS;} YY_BREAK case 55: YY_RULE_SETUP #line 78 "magic-interpreter.l" -{FIXLOC; return CASTTIME;} +{FIXLOC; return MANA;} YY_BREAK case 56: YY_RULE_SETUP #line 79 "magic-interpreter.l" -{FIXLOC; return SKIP;} +{FIXLOC; return CASTTIME;} YY_BREAK case 57: YY_RULE_SETUP #line 80 "magic-interpreter.l" -{FIXLOC; return ABORT;} +{FIXLOC; return SKIP;} YY_BREAK case 58: YY_RULE_SETUP #line 81 "magic-interpreter.l" -{FIXLOC; return BREAK;} +{FIXLOC; return ABORT;} YY_BREAK case 59: YY_RULE_SETUP #line 82 "magic-interpreter.l" -{FIXLOC; return EFFECT;} +{FIXLOC; return BREAK;} YY_BREAK case 60: YY_RULE_SETUP #line 83 "magic-interpreter.l" -{FIXLOC; return ATEND;} +{FIXLOC; return EFFECT;} YY_BREAK case 61: YY_RULE_SETUP #line 84 "magic-interpreter.l" -{FIXLOC; return ATTRIGGER;} +{FIXLOC; return ATEND;} YY_BREAK case 62: YY_RULE_SETUP #line 85 "magic-interpreter.l" -{FIXLOC; return CONST;} +{FIXLOC; return ATTRIGGER;} YY_BREAK case 63: YY_RULE_SETUP #line 86 "magic-interpreter.l" -{FIXLOC; return PC_F;} +{FIXLOC; return CONST;} YY_BREAK case 64: YY_RULE_SETUP #line 87 "magic-interpreter.l" -{FIXLOC; return MOB_F;} +{FIXLOC; return PC_F;} YY_BREAK case 65: YY_RULE_SETUP #line 88 "magic-interpreter.l" -{FIXLOC; return ENTITY_F;} +{FIXLOC; return MOB_F;} YY_BREAK case 66: YY_RULE_SETUP #line 89 "magic-interpreter.l" -{FIXLOC; return TARGET_F;} +{FIXLOC; return ENTITY_F;} YY_BREAK case 67: YY_RULE_SETUP #line 90 "magic-interpreter.l" -{FIXLOC; return IF;} +{FIXLOC; return TARGET_F;} YY_BREAK case 68: YY_RULE_SETUP #line 91 "magic-interpreter.l" -{FIXLOC; return THEN;} +{FIXLOC; return IF;} YY_BREAK case 69: YY_RULE_SETUP #line 92 "magic-interpreter.l" -{FIXLOC; return ELSE;} +{FIXLOC; return THEN;} YY_BREAK case 70: YY_RULE_SETUP #line 93 "magic-interpreter.l" -{FIXLOC; return FOREACH;} +{FIXLOC; return ELSE;} YY_BREAK case 71: YY_RULE_SETUP #line 94 "magic-interpreter.l" -{FIXLOC; return FOR;} +{FIXLOC; return FOREACH;} YY_BREAK case 72: YY_RULE_SETUP #line 95 "magic-interpreter.l" -{FIXLOC; return DO;} +{FIXLOC; return FOR;} YY_BREAK case 73: YY_RULE_SETUP #line 96 "magic-interpreter.l" -{FIXLOC; return SLEEP;} +{FIXLOC; return DO;} YY_BREAK case 74: -/* rule 74 can match eol */ YY_RULE_SETUP -#line 98 "magic-interpreter.l" +#line 97 "magic-interpreter.l" +{FIXLOC; return SLEEP;} + YY_BREAK +case 75: +/* rule 75 can match eol */ +YY_RULE_SETUP +#line 99 "magic-interpreter.l" { char *string = strdup(magic_frontend_text); magic_frontend_lval.s = string; FIXLOC; return SCRIPT_DATA; } YY_BREAK -case 75: -/* rule 75 can match eol */ +case 76: +/* rule 76 can match eol */ YY_RULE_SETUP -#line 104 "magic-interpreter.l" +#line 105 "magic-interpreter.l" { char *string = strdup(magic_frontend_text + 1); char *src = string; char *dst = string; @@ -1342,60 +1354,60 @@ YY_RULE_SETUP return STRING; } YY_BREAK -case 76: +case 77: YY_RULE_SETUP -#line 119 "magic-interpreter.l" +#line 120 "magic-interpreter.l" { magic_frontend_lval.i = atoi(magic_frontend_text); FIXLOC; return INT; } YY_BREAK -case 77: +case 78: YY_RULE_SETUP -#line 123 "magic-interpreter.l" +#line 124 "magic-interpreter.l" { magic_frontend_lval.i = strtol(magic_frontend_text + 2, NULL, 16); FIXLOC; return INT; } YY_BREAK -case 78: +case 79: YY_RULE_SETUP -#line 127 "magic-interpreter.l" +#line 128 "magic-interpreter.l" { magic_frontend_lval.s = strdup(magic_frontend_text); FIXLOC; return ID; } YY_BREAK -case 79: +case 80: *yy_cp = (yy_hold_char); /* undo effects of setting up magic_frontend_text */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up magic_frontend_text again */ YY_RULE_SETUP -#line 131 "magic-interpreter.l" +#line 132 "magic-interpreter.l" /* Ignore comments */ YY_BREAK -case 80: +case 81: *yy_cp = (yy_hold_char); /* undo effects of setting up magic_frontend_text */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up magic_frontend_text again */ YY_RULE_SETUP -#line 132 "magic-interpreter.l" +#line 133 "magic-interpreter.l" /* Ignore comments */ YY_BREAK -case 81: -/* rule 81 can match eol */ +case 82: +/* rule 82 can match eol */ YY_RULE_SETUP -#line 133 "magic-interpreter.l" +#line 134 "magic-interpreter.l" /* ignore whitespace */ YY_BREAK -case 82: +case 83: YY_RULE_SETUP -#line 134 "magic-interpreter.l" +#line 135 "magic-interpreter.l" fprintf(stderr, "%s: Unexpected character in line %d\n", MAGIC_CONFIG_FILE, magic_frontend_lineno); YY_BREAK -case 83: +case 84: YY_RULE_SETUP -#line 137 "magic-interpreter.l" +#line 138 "magic-interpreter.l" ECHO; YY_BREAK -#line 1399 "magic-interpreter-lexer.c" +#line 1411 "magic-interpreter-lexer.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1687,7 +1699,7 @@ static int yy_get_next_buffer (void) 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 >= 230 ) + if ( yy_current_state >= 237 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1715,11 +1727,11 @@ static int yy_get_next_buffer (void) 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 >= 230 ) + if ( yy_current_state >= 237 ) 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 == 229); + yy_is_jam = (yy_current_state == 236); return yy_is_jam ? 0 : yy_current_state; } @@ -2121,8 +2133,8 @@ YY_BUFFER_STATE magic_frontend__scan_string (yyconst char * yystr ) /** Setup the input buffer state to scan the given bytes. The next call to magic_frontend_lex() will * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ @@ -2364,7 +2376,7 @@ void magic_frontend_free (void * ptr ) #define YYTABLES_NAME "yytables" -#line 137 "magic-interpreter.l" +#line 138 "magic-interpreter.l" diff --git a/src/map/magic-interpreter-parser.c b/src/map/magic-interpreter-parser.c index 09ddce2..3472da0 100644 --- a/src/map/magic-interpreter-parser.c +++ b/src/map/magic-interpreter-parser.c @@ -83,47 +83,48 @@ CALL = 264, SILENT = 265, LOCAL = 266, - SHL = 267, - SHR = 268, - EQ = 269, - NEQ = 270, - GTE = 271, - LTE = 272, - ANDAND = 273, - OROR = 274, - SCRIPT_DATA = 275, - TO = 276, - TOWARDS = 277, - TELEPORT_ANCHOR = 278, - SPELL = 279, - LET = 280, - IN = 281, - END = 282, - DARROW = 283, - STRING_TY = 284, - REQUIRE = 285, - CATALYSTS = 286, - COMPONENTS = 287, - MANA = 288, - CASTTIME = 289, - SKIP = 290, - ABORT = 291, - BREAK = 292, - EFFECT = 293, - ATEND = 294, - ATTRIGGER = 295, - PC_F = 296, - MOB_F = 297, - ENTITY_F = 298, - TARGET_F = 299, - IF = 300, - THEN = 301, - ELSE = 302, - FOREACH = 303, - FOR = 304, - DO = 305, - SLEEP = 306, - OR = 307 + NONMAGIC = 267, + SHL = 268, + SHR = 269, + EQ = 270, + NEQ = 271, + GTE = 272, + LTE = 273, + ANDAND = 274, + OROR = 275, + SCRIPT_DATA = 276, + TO = 277, + TOWARDS = 278, + TELEPORT_ANCHOR = 279, + SPELL = 280, + LET = 281, + IN = 282, + END = 283, + DARROW = 284, + STRING_TY = 285, + REQUIRE = 286, + CATALYSTS = 287, + COMPONENTS = 288, + MANA = 289, + CASTTIME = 290, + SKIP = 291, + ABORT = 292, + BREAK = 293, + EFFECT = 294, + ATEND = 295, + ATTRIGGER = 296, + PC_F = 297, + MOB_F = 298, + ENTITY_F = 299, + TARGET_F = 300, + IF = 301, + THEN = 302, + ELSE = 303, + FOREACH = 304, + FOR = 305, + DO = 306, + SLEEP = 307, + OR = 308 }; #endif /* Tokens. */ @@ -136,47 +137,48 @@ #define CALL 264 #define SILENT 265 #define LOCAL 266 -#define SHL 267 -#define SHR 268 -#define EQ 269 -#define NEQ 270 -#define GTE 271 -#define LTE 272 -#define ANDAND 273 -#define OROR 274 -#define SCRIPT_DATA 275 -#define TO 276 -#define TOWARDS 277 -#define TELEPORT_ANCHOR 278 -#define SPELL 279 -#define LET 280 -#define IN 281 -#define END 282 -#define DARROW 283 -#define STRING_TY 284 -#define REQUIRE 285 -#define CATALYSTS 286 -#define COMPONENTS 287 -#define MANA 288 -#define CASTTIME 289 -#define SKIP 290 -#define ABORT 291 -#define BREAK 292 -#define EFFECT 293 -#define ATEND 294 -#define ATTRIGGER 295 -#define PC_F 296 -#define MOB_F 297 -#define ENTITY_F 298 -#define TARGET_F 299 -#define IF 300 -#define THEN 301 -#define ELSE 302 -#define FOREACH 303 -#define FOR 304 -#define DO 305 -#define SLEEP 306 -#define OR 307 +#define NONMAGIC 267 +#define SHL 268 +#define SHR 269 +#define EQ 270 +#define NEQ 271 +#define GTE 272 +#define LTE 273 +#define ANDAND 274 +#define OROR 275 +#define SCRIPT_DATA 276 +#define TO 277 +#define TOWARDS 278 +#define TELEPORT_ANCHOR 279 +#define SPELL 280 +#define LET 281 +#define IN 282 +#define END 283 +#define DARROW 284 +#define STRING_TY 285 +#define REQUIRE 286 +#define CATALYSTS 287 +#define COMPONENTS 288 +#define MANA 289 +#define CASTTIME 290 +#define SKIP 291 +#define ABORT 292 +#define BREAK 293 +#define EFFECT 294 +#define ATEND 295 +#define ATTRIGGER 296 +#define PC_F 297 +#define MOB_F 298 +#define ENTITY_F 299 +#define TARGET_F 300 +#define IF 301 +#define THEN 302 +#define ELSE 303 +#define FOREACH 304 +#define FOR 305 +#define DO 306 +#define SLEEP 307 +#define OR 308 @@ -291,7 +293,7 @@ typedef union YYSTYPE proc_t *proc; } /* Line 187 of yacc.c. */ -#line 295 "magic-interpreter-parser.c" +#line 297 "magic-interpreter-parser.c" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -316,7 +318,7 @@ typedef struct YYLTYPE /* Line 216 of yacc.c. */ -#line 320 "magic-interpreter-parser.c" +#line 322 "magic-interpreter-parser.c" #ifdef short # undef short @@ -531,22 +533,22 @@ union yyalloc #endif /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 16 +#define YYFINAL 18 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 920 +#define YYLAST 968 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 72 +#define YYNTOKENS 73 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 32 /* YYNRULES -- Number of rules. */ -#define YYNRULES 108 +#define YYNRULES 109 /* YYNRULES -- Number of states. */ -#define YYNSTATES 247 +#define YYNSTATES 249 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 307 +#define YYMAXUTOK 308 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -558,7 +560,7 @@ static const yytype_uint8 yytranslate[] = 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, 14, 22, 2, - 70, 71, 12, 10, 16, 11, 2, 13, 2, 2, + 71, 72, 12, 10, 16, 11, 2, 13, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 17, 18, 8, 7, 9, 2, 15, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -584,7 +586,7 @@ static const yytype_uint8 yytranslate[] = 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 69 + 62, 63, 64, 65, 66, 67, 68, 69, 70 }; #if YYDEBUG @@ -593,76 +595,76 @@ static const yytype_uint8 yytranslate[] = static const yytype_uint16 yyprhs[] = { 0, 0, 3, 4, 8, 9, 12, 13, 15, 17, - 21, 25, 30, 37, 45, 54, 55, 58, 61, 62, - 68, 70, 72, 74, 76, 78, 80, 82, 84, 88, - 92, 96, 100, 104, 108, 112, 116, 120, 124, 128, - 132, 136, 140, 144, 148, 152, 156, 160, 165, 169, - 170, 172, 174, 178, 187, 189, 198, 208, 210, 215, - 217, 221, 225, 227, 231, 235, 239, 244, 245, 248, - 249, 252, 254, 258, 262, 264, 268, 271, 274, 277, - 280, 283, 287, 289, 293, 297, 299, 301, 303, 305, - 307, 309, 311, 313, 317, 320, 323, 326, 329, 334, - 342, 351, 358, 363, 367, 373, 375, 382, 383 + 21, 25, 30, 37, 45, 54, 55, 58, 61, 64, + 65, 71, 73, 75, 77, 79, 81, 83, 85, 87, + 91, 95, 99, 103, 107, 111, 115, 119, 123, 127, + 131, 135, 139, 143, 147, 151, 155, 159, 163, 168, + 172, 173, 175, 177, 181, 190, 192, 201, 211, 213, + 218, 220, 224, 228, 230, 234, 238, 242, 247, 248, + 251, 252, 255, 257, 261, 265, 267, 271, 274, 277, + 280, 283, 286, 290, 292, 296, 300, 302, 304, 306, + 308, 310, 312, 314, 316, 320, 323, 326, 329, 332, + 337, 345, 354, 361, 366, 370, 376, 378, 385, 386 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { - 73, 0, -1, -1, 77, 74, 73, -1, -1, 74, - 18, -1, -1, 76, -1, 5, -1, 76, 16, 5, - -1, 5, 7, 82, -1, 24, 5, 7, 82, -1, - 40, 5, 17, 82, 7, 82, -1, 25, 5, 70, - 75, 71, 7, 103, -1, 78, 41, 5, 79, 17, - 82, 7, 87, -1, -1, 28, 78, -1, 27, 78, - -1, -1, 70, 5, 17, 80, 71, -1, 58, -1, - 46, -1, 6, -1, 3, -1, 4, -1, 81, -1, - 5, -1, 86, -1, 82, 10, 82, -1, 82, 11, - 82, -1, 82, 12, 82, -1, 82, 14, 82, -1, - 82, 13, 82, -1, 82, 8, 82, -1, 82, 9, - 82, -1, 82, 22, 82, -1, 82, 23, 82, -1, - 82, 19, 82, -1, 82, 29, 82, -1, 82, 30, - 82, -1, 82, 34, 82, -1, 82, 33, 82, -1, - 82, 35, 82, -1, 82, 36, 82, -1, 82, 31, - 82, -1, 82, 7, 82, -1, 82, 32, 82, -1, - 5, 70, 83, 71, -1, 70, 82, 71, -1, -1, - 84, -1, 82, -1, 84, 16, 82, -1, 15, 70, - 82, 16, 82, 16, 82, 71, -1, 85, -1, 85, - 15, 10, 70, 82, 16, 82, 71, -1, 85, 39, - 82, 17, 70, 82, 16, 82, 71, -1, 90, -1, - 42, 88, 43, 90, -1, 74, -1, 88, 89, 74, - -1, 5, 7, 82, -1, 91, -1, 91, 19, 90, - -1, 94, 45, 91, -1, 70, 90, 71, -1, 55, - 103, 92, 93, -1, -1, 57, 103, -1, -1, 56, - 103, -1, 96, -1, 94, 69, 94, -1, 70, 95, - 71, -1, 94, -1, 94, 16, 95, -1, 47, 82, - -1, 48, 97, -1, 49, 97, -1, 50, 82, -1, - 51, 82, -1, 20, 98, 21, -1, 99, -1, 98, - 16, 99, -1, 3, 12, 100, -1, 100, -1, 4, - -1, 3, -1, 58, -1, 59, -1, 60, -1, 41, - -1, 61, -1, 70, 103, 71, -1, 52, 18, -1, - 53, 18, -1, 44, 18, -1, 54, 18, -1, 5, - 7, 82, 18, -1, 65, 101, 5, 43, 82, 67, - 102, -1, 66, 5, 7, 82, 38, 82, 67, 102, - -1, 62, 82, 63, 102, 64, 102, -1, 62, 82, - 63, 102, -1, 68, 82, 18, -1, 5, 70, 83, - 71, 18, -1, 37, -1, 26, 5, 70, 83, 71, - 18, -1, -1, 102, 74, 103, -1 + 74, 0, -1, -1, 78, 75, 74, -1, -1, 75, + 18, -1, -1, 77, -1, 5, -1, 77, 16, 5, + -1, 5, 7, 83, -1, 24, 5, 7, 83, -1, + 41, 5, 17, 83, 7, 83, -1, 25, 5, 71, + 76, 72, 7, 104, -1, 79, 42, 5, 80, 17, + 83, 7, 88, -1, -1, 28, 79, -1, 29, 79, + -1, 27, 79, -1, -1, 71, 5, 17, 81, 72, + -1, 59, -1, 47, -1, 6, -1, 3, -1, 4, + -1, 82, -1, 5, -1, 87, -1, 83, 10, 83, + -1, 83, 11, 83, -1, 83, 12, 83, -1, 83, + 14, 83, -1, 83, 13, 83, -1, 83, 8, 83, + -1, 83, 9, 83, -1, 83, 22, 83, -1, 83, + 23, 83, -1, 83, 19, 83, -1, 83, 30, 83, + -1, 83, 31, 83, -1, 83, 35, 83, -1, 83, + 34, 83, -1, 83, 36, 83, -1, 83, 37, 83, + -1, 83, 32, 83, -1, 83, 7, 83, -1, 83, + 33, 83, -1, 5, 71, 84, 72, -1, 71, 83, + 72, -1, -1, 85, -1, 83, -1, 85, 16, 83, + -1, 15, 71, 83, 16, 83, 16, 83, 72, -1, + 86, -1, 86, 15, 10, 71, 83, 16, 83, 72, + -1, 86, 40, 83, 17, 71, 83, 16, 83, 72, + -1, 91, -1, 43, 89, 44, 91, -1, 75, -1, + 89, 90, 75, -1, 5, 7, 83, -1, 92, -1, + 92, 19, 91, -1, 95, 46, 92, -1, 71, 91, + 72, -1, 56, 104, 93, 94, -1, -1, 58, 104, + -1, -1, 57, 104, -1, 97, -1, 95, 70, 95, + -1, 71, 96, 72, -1, 95, -1, 95, 16, 96, + -1, 48, 83, -1, 49, 98, -1, 50, 98, -1, + 51, 83, -1, 52, 83, -1, 20, 99, 21, -1, + 100, -1, 99, 16, 100, -1, 3, 12, 101, -1, + 101, -1, 4, -1, 3, -1, 59, -1, 60, -1, + 61, -1, 42, -1, 62, -1, 71, 104, 72, -1, + 53, 18, -1, 54, 18, -1, 45, 18, -1, 55, + 18, -1, 5, 7, 83, 18, -1, 66, 102, 5, + 44, 83, 68, 103, -1, 67, 5, 7, 83, 39, + 83, 68, 103, -1, 63, 83, 64, 103, 65, 103, + -1, 63, 83, 64, 103, -1, 69, 83, 18, -1, + 5, 71, 84, 72, 18, -1, 38, -1, 26, 5, + 71, 84, 72, 18, -1, -1, 103, 75, 104, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 206, 206, 207, 213, 214, 220, 221, 225, 231, - 238, 249, 255, 266, 275, 288, 289, 294, 302, 303, - 309, 311, 316, 319, 322, 328, 331, 342, 345, 347, - 349, 351, 353, 355, 357, 359, 361, 363, 365, 367, - 369, 371, 373, 375, 377, 379, 381, 384, 389, 394, - 395, 400, 405, 412, 416, 420, 426, 436, 438, 447, - 451, 460, 473, 475, 484, 486, 488, 499, 500, 506, - 507, 512, 514, 520, 525, 527, 532, 536, 540, 544, - 548, 555, 560, 564, 571, 573, 578, 587, 592, 594, - 596, 598, 600, 605, 607, 609, 611, 613, 615, 626, - 633, 640, 646, 652, 656, 660, 667, 674, 675 + 0, 207, 207, 208, 214, 215, 221, 222, 226, 232, + 239, 250, 256, 267, 276, 289, 290, 295, 300, 308, + 309, 315, 317, 322, 325, 328, 334, 337, 348, 351, + 353, 355, 357, 359, 361, 363, 365, 367, 369, 371, + 373, 375, 377, 379, 381, 383, 385, 387, 390, 395, + 400, 401, 406, 411, 418, 422, 426, 432, 442, 444, + 453, 457, 466, 479, 481, 490, 492, 494, 505, 506, + 512, 513, 518, 520, 526, 531, 533, 538, 542, 546, + 550, 554, 561, 566, 570, 577, 579, 584, 593, 598, + 600, 602, 604, 606, 611, 613, 615, 617, 619, 621, + 632, 639, 646, 652, 658, 662, 666, 673, 680, 681 }; #endif @@ -674,13 +676,13 @@ static const char *const yytname[] = "$end", "error", "$undefined", "INT", "STRING", "ID", "DIR", "'='", "'<'", "'>'", "'+'", "'-'", "'*'", "'/'", "'%'", "'@'", "','", "':'", "';'", "'|'", "'['", "']'", "'&'", "'^'", "CONST", "PROCEDURE", "CALL", - "SILENT", "LOCAL", "SHL", "SHR", "EQ", "NEQ", "GTE", "LTE", "ANDAND", - "OROR", "SCRIPT_DATA", "TO", "TOWARDS", "TELEPORT_ANCHOR", "SPELL", - "LET", "IN", "END", "DARROW", "STRING_TY", "REQUIRE", "CATALYSTS", - "COMPONENTS", "MANA", "CASTTIME", "SKIP", "ABORT", "BREAK", "EFFECT", - "ATEND", "ATTRIGGER", "PC_F", "MOB_F", "ENTITY_F", "TARGET_F", "IF", - "THEN", "ELSE", "FOREACH", "FOR", "DO", "SLEEP", "OR", "'('", "')'", - "$accept", "spellconf", "semicolons", "proc_formals_list", + "SILENT", "LOCAL", "NONMAGIC", "SHL", "SHR", "EQ", "NEQ", "GTE", "LTE", + "ANDAND", "OROR", "SCRIPT_DATA", "TO", "TOWARDS", "TELEPORT_ANCHOR", + "SPELL", "LET", "IN", "END", "DARROW", "STRING_TY", "REQUIRE", + "CATALYSTS", "COMPONENTS", "MANA", "CASTTIME", "SKIP", "ABORT", "BREAK", + "EFFECT", "ATEND", "ATTRIGGER", "PC_F", "MOB_F", "ENTITY_F", "TARGET_F", + "IF", "THEN", "ELSE", "FOREACH", "FOR", "DO", "SLEEP", "OR", "'('", + "')'", "$accept", "spellconf", "semicolons", "proc_formals_list", "proc_formals_list_ne", "spellconf_option", "spell_flags", "argopt", "arg_ty", "value", "expr", "arg_list", "arg_list_ne", "location", "area", "spelldef", "defs", "def", "spellbody_list", "spellbody", @@ -702,40 +704,40 @@ static const yytype_uint16 yytoknum[] = 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, - 40, 41 + 308, 40, 41 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 72, 73, 73, 74, 74, 75, 75, 76, 76, - 77, 77, 77, 77, 77, 78, 78, 78, 79, 79, - 80, 80, 81, 81, 81, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 83, - 83, 84, 84, 85, 86, 86, 86, 87, 87, 88, - 88, 89, 90, 90, 91, 91, 91, 92, 92, 93, - 93, 94, 94, 94, 95, 95, 96, 96, 96, 96, - 96, 97, 98, 98, 99, 99, 100, 100, 101, 101, - 101, 101, 101, 102, 102, 102, 102, 102, 102, 102, - 102, 102, 102, 102, 102, 102, 102, 103, 103 + 0, 73, 74, 74, 75, 75, 76, 76, 77, 77, + 78, 78, 78, 78, 78, 79, 79, 79, 79, 80, + 80, 81, 81, 82, 82, 82, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, + 84, 84, 85, 85, 86, 87, 87, 87, 88, 88, + 89, 89, 90, 91, 91, 92, 92, 92, 93, 93, + 94, 94, 95, 95, 95, 96, 96, 97, 97, 97, + 97, 97, 98, 99, 99, 100, 100, 101, 101, 102, + 102, 102, 102, 102, 103, 103, 103, 103, 103, 103, + 103, 103, 103, 103, 103, 103, 103, 103, 104, 104 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 0, 3, 0, 2, 0, 1, 1, 3, - 3, 4, 6, 7, 8, 0, 2, 2, 0, 5, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, + 3, 4, 6, 7, 8, 0, 2, 2, 2, 0, + 5, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 4, 3, 0, - 1, 1, 3, 8, 1, 8, 9, 1, 4, 1, - 3, 3, 1, 3, 3, 3, 4, 0, 2, 0, - 2, 1, 3, 3, 1, 3, 2, 2, 2, 2, - 2, 3, 1, 3, 3, 1, 1, 1, 1, 1, - 1, 1, 1, 3, 2, 2, 2, 2, 4, 7, - 8, 6, 4, 3, 5, 1, 6, 0, 3 + 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, + 0, 1, 1, 3, 8, 1, 8, 9, 1, 4, + 1, 3, 3, 1, 3, 3, 3, 4, 0, 2, + 0, 2, 1, 3, 3, 1, 3, 2, 2, 2, + 2, 2, 3, 1, 3, 3, 1, 1, 1, 1, + 1, 1, 1, 1, 3, 2, 2, 2, 2, 4, + 7, 8, 6, 4, 3, 5, 1, 6, 0, 3 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -743,81 +745,81 @@ static const yytype_uint8 yyr2[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 2, 0, 0, 0, 15, 15, 0, 0, 4, 0, - 0, 0, 0, 17, 16, 0, 1, 2, 0, 23, - 24, 26, 22, 0, 0, 25, 10, 54, 27, 0, - 6, 0, 5, 3, 18, 49, 0, 0, 0, 0, + 2, 0, 0, 0, 15, 15, 15, 0, 0, 4, + 0, 0, 0, 0, 18, 16, 17, 0, 1, 2, + 0, 24, 25, 27, 23, 0, 0, 26, 10, 55, + 28, 0, 6, 0, 5, 3, 19, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, - 8, 0, 7, 0, 0, 0, 51, 0, 50, 0, - 48, 45, 33, 34, 28, 29, 30, 32, 31, 37, - 35, 36, 38, 39, 44, 46, 41, 40, 42, 43, - 0, 0, 0, 0, 0, 0, 0, 47, 0, 0, - 0, 0, 107, 9, 45, 0, 0, 52, 0, 0, - 0, 0, 0, 105, 0, 0, 0, 0, 0, 0, - 0, 0, 107, 4, 13, 21, 20, 0, 0, 0, - 0, 0, 0, 49, 0, 96, 94, 95, 97, 0, - 91, 88, 89, 90, 92, 0, 0, 0, 0, 107, - 19, 4, 0, 0, 0, 0, 0, 107, 0, 14, - 57, 62, 0, 71, 0, 0, 0, 0, 0, 49, - 0, 0, 0, 103, 93, 108, 59, 0, 76, 0, - 77, 78, 79, 80, 67, 0, 74, 0, 0, 0, - 0, 53, 55, 0, 98, 0, 0, 102, 0, 0, - 0, 0, 4, 87, 86, 0, 82, 85, 107, 69, - 65, 0, 73, 0, 63, 64, 0, 72, 56, 104, - 0, 0, 0, 0, 0, 58, 60, 0, 0, 81, - 68, 107, 66, 74, 75, 106, 101, 0, 0, 61, - 87, 84, 83, 70, 99, 0, 100 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 11, 8, 0, 7, 0, 0, 0, 52, 0, + 51, 0, 49, 46, 34, 35, 29, 30, 31, 33, + 32, 38, 36, 37, 39, 40, 45, 47, 42, 41, + 43, 44, 0, 0, 0, 0, 0, 0, 0, 48, + 0, 0, 0, 0, 108, 9, 46, 0, 0, 53, + 0, 0, 0, 0, 0, 106, 0, 0, 0, 0, + 0, 0, 0, 0, 108, 4, 13, 22, 21, 0, + 0, 0, 0, 0, 0, 50, 0, 97, 95, 96, + 98, 0, 92, 89, 90, 91, 93, 0, 0, 0, + 0, 108, 20, 4, 0, 0, 0, 0, 0, 108, + 0, 14, 58, 63, 0, 72, 0, 0, 0, 0, + 0, 50, 0, 0, 0, 104, 94, 109, 60, 0, + 77, 0, 78, 79, 80, 81, 68, 0, 75, 0, + 0, 0, 0, 54, 56, 0, 99, 0, 0, 103, + 0, 0, 0, 0, 4, 88, 87, 0, 83, 86, + 108, 70, 66, 0, 74, 0, 64, 65, 0, 73, + 57, 105, 0, 0, 0, 0, 0, 59, 61, 0, + 0, 82, 69, 108, 67, 75, 76, 107, 102, 0, + 0, 62, 88, 85, 84, 71, 100, 0, 101 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 7, 17, 61, 62, 8, 9, 65, 127, 25, - 66, 67, 68, 27, 28, 159, 177, 202, 185, 161, - 209, 232, 162, 187, 163, 180, 205, 206, 207, 145, - 123, 124 + -1, 8, 19, 63, 64, 9, 10, 67, 129, 27, + 68, 69, 70, 29, 30, 161, 179, 204, 187, 163, + 211, 234, 164, 189, 165, 182, 207, 208, 209, 147, + 125, 126 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -170 +#define YYPACT_NINF -172 static const yytype_int16 yypact[] = { - 100, 5, 18, 53, -18, -18, 56, 16, -170, 26, - 0, 67, 10, -170, -170, 64, -170, 150, 80, -170, - -170, 17, -170, 27, 0, -170, 730, 12, -170, 0, - 91, 0, -170, -170, 28, 0, 0, 238, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 89, 0, 730, - -170, 31, 93, 760, 99, 90, 730, 39, 101, 520, - -170, 109, 877, 877, 890, 890, 236, 236, 236, 109, - 109, 109, 109, 109, 877, 877, 877, 877, 849, 820, - 51, 550, 119, 118, 0, 114, 0, -170, 0, 0, - 0, 63, 174, -170, 288, 11, 790, 730, 580, 610, - 0, 1, 127, -170, 126, 129, 135, 136, 0, 54, - 152, 0, 174, -170, -170, -170, -170, 98, 88, 0, - 0, 640, 0, 0, 102, -170, -170, -170, -170, 453, - -170, -170, -170, -170, -170, 154, 163, 670, 105, 155, - -170, -170, 0, 160, 160, 0, 0, 174, 146, -170, - -170, 115, 14, -170, 268, 311, 0, 700, 111, 0, - 174, 140, 0, -170, -170, -170, 166, 6, 730, 60, - -170, -170, 730, 730, 128, 131, 9, 132, 116, 116, - 183, -170, -170, 341, -170, 169, 133, 125, 0, 488, - 191, 116, -170, 193, -170, -3, -170, -170, 174, 156, - -170, 183, -170, 116, -170, -170, 183, -170, -170, -170, - 188, 174, 384, 0, 0, -170, 166, 62, 60, -170, - -170, 174, -170, -9, -170, -170, -170, 174, 414, 730, - -170, -170, -170, -170, -170, 174, -170 + 137, 3, 9, 21, 37, 37, 37, 50, 59, -172, + 19, 1, 74, 17, -172, -172, -172, 60, -172, 482, + 81, -172, -172, 26, -172, 27, 1, -172, 756, 39, + -172, 1, 94, 1, -172, -172, 29, 1, 1, 215, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 93, + 1, 756, -172, 33, 90, 787, 103, 100, 756, 38, + 95, 539, -172, 111, 908, 908, 921, 921, 213, 213, + 213, 111, 111, 111, 111, 111, 908, 908, 908, 908, + 879, 849, 51, 570, 122, 123, 1, 114, 1, -172, + 1, 1, 1, 62, 150, -172, 461, -35, 818, 756, + 601, 632, 1, -4, 129, -172, 126, 132, 133, 134, + 1, 54, 148, 1, 150, -172, -172, -172, -172, 82, + 89, 1, 1, 663, 1, 1, 87, -172, -172, -172, + -172, 441, -172, -172, -172, -172, -172, 154, 160, 694, + 102, 130, -172, -172, 1, 161, 161, 1, 1, 150, + 121, -172, -172, 163, 14, -172, 246, 289, 1, 725, + 108, 1, 150, 142, 1, -172, -172, -172, 169, 6, + 756, 15, -172, -172, 756, 756, 136, 118, 12, 119, + 897, 897, 159, -172, -172, 320, -172, 180, 128, 141, + 1, 506, 195, 897, -172, 200, -172, -8, -172, -172, + 150, 174, -172, 159, -172, 897, -172, -172, 159, -172, + -172, -172, 221, 150, 363, 1, 1, -172, 169, 70, + 15, -172, -172, 150, -172, -7, -172, -172, -172, 150, + 402, 756, -172, -172, -172, -172, -172, 150, -172 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -170, 198, -101, -170, -170, -170, 68, -170, -170, -170, - -10, -116, -170, -170, -170, -170, -170, -170, -126, 21, - -170, -170, -134, 8, -170, 70, -170, -6, 2, -170, - -169, -102 + -172, 199, -102, -172, -172, -172, 65, -172, -172, -172, + -11, -118, -172, -172, -172, -172, -172, -172, -128, 42, + -172, -172, -135, 28, -172, 84, -172, 31, 13, -172, + -171, -103 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -827,227 +829,235 @@ static const yytype_int16 yypgoto[] = #define YYTABLE_NINF -16 static const yytype_int16 yytable[] = { - 26, 197, 160, 19, 20, 21, 22, 211, 132, 4, - 5, 200, 10, 228, 37, 23, 16, 168, 229, 59, - 148, 63, 149, 11, 186, 211, 69, 57, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 175, 91, 201, - 176, 58, 236, 196, 189, 184, 217, 125, 12, 189, - 190, 15, 214, 203, 204, 240, 204, 18, 244, 126, - 24, 133, 13, 14, 29, 225, 246, 233, 190, 186, - 30, 31, 233, 190, 104, 34, 106, 35, 107, 108, - 109, 19, 20, 21, 22, 140, 60, 36, 64, 90, - 131, 226, 92, 23, 95, 1, 230, 96, 139, 93, - 97, 147, 141, 142, 143, 144, 38, 98, 71, 164, - 165, 100, 167, 103, 2, 3, 102, 4, 5, 243, - 151, 105, 134, 110, 188, 152, 153, 154, 155, 156, - 6, -15, 178, 157, 135, 182, 183, 136, 37, 19, - 20, 21, 22, 137, 138, 1, 193, 146, 158, 171, - 111, 23, 199, 152, 153, 154, 155, 156, 32, 150, - 172, 157, 169, 32, 2, 3, 174, 4, 5, 111, - 179, 112, 195, 198, 32, 208, 213, 219, 222, 221, - 6, -15, 113, 152, 153, 154, 155, 156, 224, 114, - 112, 157, 210, 212, 220, 227, 235, 115, 116, 117, - 215, 113, 231, 238, 239, 33, 158, 118, 114, 234, - 119, 120, 242, 121, 181, 122, 115, 116, 117, 241, - 152, 153, 154, 155, 156, 0, 118, 0, 0, 119, - 120, 0, 121, 38, 122, 38, 39, 40, 41, 42, - 43, 44, 45, 216, 0, 46, 0, 46, 47, 48, - 47, 48, 0, 0, 0, 49, 50, 49, 50, 51, - 52, 53, 54, 55, 56, 38, 39, 40, 41, 42, - 43, 44, 45, 0, 0, 0, 0, 46, -12, 0, - 47, 48, 0, -12, 0, 38, 0, 49, 50, 51, - 52, 53, 54, 55, 56, 0, -12, 0, 0, 70, - 0, 0, -12, -12, 0, -12, -12, 0, 38, 39, - 40, 41, 42, 43, 44, 45, 0, 0, -12, -12, - 46, 0, 0, 47, 48, 0, 0, 0, 0, 191, - 49, 50, 51, 52, 53, 54, 55, 56, 38, 39, - 40, 41, 42, 43, 44, 45, 0, 0, 0, 0, - 46, 0, 0, 47, 48, 0, 0, 0, 0, 0, - 49, 50, 51, 52, 53, 54, 55, 56, 0, 0, - 0, 0, 192, 0, 0, 0, 0, 0, 0, 0, - 0, 38, 39, 40, 41, 42, 43, 44, 45, 0, - 0, 0, 0, 46, 0, 0, 47, 48, 0, 0, - 0, 0, 218, 49, 50, 51, 52, 53, 54, 55, - 56, 38, 39, 40, 41, 42, 43, 44, 45, 0, - 0, 0, 0, 46, 0, 0, 47, 48, 0, 0, - 0, 0, 0, 49, 50, 51, 52, 53, 54, 55, - 56, 237, 0, 0, 0, 0, 0, 0, 0, 0, - 38, 39, 40, 41, 42, 43, 44, 45, 0, 0, - 0, 0, 46, 0, 0, 47, 48, 0, 0, 0, - 0, 245, 49, 50, 51, 52, 53, 54, 55, 56, - 0, 0, 0, 0, 0, 38, 39, 40, 41, 42, - 43, 44, 45, 0, 0, 0, 0, 46, 0, 0, - 47, 48, 0, 0, 0, 0, 170, 49, 50, 51, - 52, 53, 54, 55, 56, 0, 223, 38, 39, 40, - 41, 42, 43, 44, 45, 0, 99, 0, 0, 46, - 0, 0, 47, 48, 0, 0, 0, 0, 0, 49, - 50, 51, 52, 53, 54, 55, 56, 38, 39, 40, - 41, 42, 43, 44, 45, 0, 0, 101, 0, 46, - 0, 0, 47, 48, 0, 0, 0, 0, 0, 49, - 50, 51, 52, 53, 54, 55, 56, 38, 39, 40, - 41, 42, 43, 44, 45, 0, 129, 0, 0, 46, - 0, 0, 47, 48, 0, 0, 0, 0, 0, 49, - 50, 51, 52, 53, 54, 55, 56, 38, 39, 40, - 41, 42, 43, 44, 45, 0, 130, 0, 0, 46, - 0, 0, 47, 48, 0, 0, 0, 0, 0, 49, - 50, 51, 52, 53, 54, 55, 56, 38, 39, 40, - 41, 42, 43, 44, 45, 0, 166, 0, 0, 46, - 0, 0, 47, 48, 0, 0, 0, 0, 0, 49, - 50, 51, 52, 53, 54, 55, 56, 38, 39, 40, - 41, 42, 43, 44, 45, 0, 0, 0, 173, 46, - 0, 0, 47, 48, 0, 0, 0, 0, 0, 49, - 50, 51, 52, 53, 54, 55, 56, 38, 39, 40, - 41, 42, 43, 44, 45, 0, 0, 0, 194, 46, - 0, 0, 47, 48, 0, 0, 0, 0, 0, 49, - 50, 51, 52, 53, 54, 55, 56, 38, 39, 40, - 41, 42, 43, 44, 45, 0, 0, 0, 0, 46, - 0, 0, 47, 48, 0, 0, 0, 0, 0, 49, - 50, 51, 52, 53, 54, 55, 56, 94, 39, 40, - 41, 42, 43, 44, 45, 0, 0, 0, 0, 46, - 0, 0, 47, 48, 0, 0, 0, 0, 0, 49, - 50, 51, 52, 53, 54, 55, 56, 128, 39, 40, - 41, 42, 43, 44, 45, 0, 0, 0, 0, 46, - 0, 0, 47, 48, 0, 0, 0, 0, 0, 49, - 50, 51, 52, 53, 54, 55, 56, 38, 39, 40, - 41, 42, 43, 44, 45, 0, 0, 0, 0, 46, - 0, 0, 47, 48, 0, 0, 0, 0, 0, 49, - 50, 51, 52, 53, 54, 55, 38, 39, 40, 41, - 42, 43, 44, 45, 0, 0, 0, 0, 46, 0, - 0, 47, 48, 0, 0, 0, 0, 0, 49, 50, - 51, 52, 53, 54, 38, 0, 0, 41, 42, 43, - 44, 45, 0, 0, 0, 0, 46, 38, 0, 47, - 48, 0, 43, 44, 45, 0, 49, 50, 0, 46, - 0, 0, 47, 48, 0, 0, 0, 0, 0, 49, - 50 + 28, 199, 162, 134, 21, 22, 23, 24, 230, 213, + 11, 202, 127, 231, 12, 39, 25, 170, 205, 206, + 61, 150, 65, 151, 128, 188, 13, 71, 213, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 177, 93, + 203, 178, 238, 198, 59, 17, 186, 219, 191, 18, + 191, 20, 216, 192, 4, 5, 6, 135, 246, 14, + 15, 16, 26, 242, 206, 227, 248, 33, 235, 60, + 188, 31, 192, 235, 192, 106, 36, 108, 32, 109, + 110, 111, 21, 22, 23, 24, 142, 37, 38, 62, + 66, 133, 228, 92, 25, 94, 95, 232, 97, 141, + 99, 100, 149, 143, 144, 145, 146, 98, 40, 73, + 166, 167, 102, 169, 21, 22, 23, 24, 105, 104, + 245, 107, 153, 112, 136, 113, 25, 154, 155, 156, + 157, 158, 1, 180, 137, 159, 184, 185, 34, 39, + 138, 139, 140, 148, 152, 113, 114, 195, 171, 173, + 160, 2, 3, 201, 4, 5, 6, 174, 115, 154, + 155, 156, 157, 158, 176, 116, 114, 159, 7, -15, + 197, 181, 190, 117, 118, 119, 200, 34, 115, 224, + 212, 214, 160, 120, 210, 116, 121, 122, 221, 123, + 222, 124, 226, 117, 118, 119, 223, 154, 155, 156, + 157, 158, 229, 120, 240, 241, 121, 122, 35, 123, + 40, 124, 40, 41, 42, 43, 44, 45, 46, 47, + 218, 233, 48, 217, 48, 49, 50, 49, 50, 237, + 183, 236, 243, 51, 52, 51, 52, 53, 54, 55, + 56, 57, 58, 40, 41, 42, 43, 44, 45, 46, + 47, 244, 0, 0, 0, 48, 0, 0, 49, 50, + 0, 0, 0, 0, 0, 0, 51, 52, 53, 54, + 55, 56, 57, 58, 0, 0, 0, 72, 0, 0, + 0, 0, 0, 0, 0, 0, 40, 41, 42, 43, + 44, 45, 46, 47, 0, 0, 0, 0, 48, 0, + 0, 49, 50, 0, 0, 0, 0, 0, 193, 51, + 52, 53, 54, 55, 56, 57, 58, 40, 41, 42, + 43, 44, 45, 46, 47, 0, 0, 0, 0, 48, + 0, 0, 49, 50, 0, 0, 0, 0, 0, 0, + 51, 52, 53, 54, 55, 56, 57, 58, 0, 0, + 0, 194, 0, 0, 0, 0, 0, 0, 0, 0, + 40, 41, 42, 43, 44, 45, 46, 47, 0, 0, + 0, 0, 48, 0, 0, 49, 50, 0, 0, 0, + 0, 0, 220, 51, 52, 53, 54, 55, 56, 57, + 58, 0, 0, 0, 0, 0, 0, 0, 0, 40, + 41, 42, 43, 44, 45, 46, 47, 0, 0, 0, + 0, 48, 0, 0, 49, 50, 0, 0, 0, 0, + 0, 239, 51, 52, 53, 54, 55, 56, 57, 58, + 0, 0, 0, 0, 0, 0, 0, 0, 40, 41, + 42, 43, 44, 45, 46, 47, 0, 0, 0, 0, + 48, -12, 0, 49, 50, 0, -12, 0, 40, 0, + 247, 51, 52, 53, 54, 55, 56, 57, 58, -12, + 0, 0, 0, 0, 0, -12, -12, 1, -12, -12, + -12, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 34, 0, -12, -12, 0, 172, 2, 3, 0, 4, + 5, 6, 0, 40, 41, 42, 43, 44, 45, 46, + 47, 0, 0, 7, -15, 48, 0, 0, 49, 50, + 0, 0, 0, 0, 0, 0, 51, 52, 53, 54, + 55, 56, 57, 58, 0, 225, 40, 41, 42, 43, + 44, 45, 46, 47, 0, 101, 0, 0, 48, 0, + 0, 49, 50, 0, 0, 0, 0, 0, 0, 51, + 52, 53, 54, 55, 56, 57, 58, 40, 41, 42, + 43, 44, 45, 46, 47, 0, 0, 103, 0, 48, + 0, 0, 49, 50, 0, 0, 0, 0, 0, 0, + 51, 52, 53, 54, 55, 56, 57, 58, 40, 41, + 42, 43, 44, 45, 46, 47, 0, 131, 0, 0, + 48, 0, 0, 49, 50, 0, 0, 0, 0, 0, + 0, 51, 52, 53, 54, 55, 56, 57, 58, 40, + 41, 42, 43, 44, 45, 46, 47, 0, 132, 0, + 0, 48, 0, 0, 49, 50, 0, 0, 0, 0, + 0, 0, 51, 52, 53, 54, 55, 56, 57, 58, + 40, 41, 42, 43, 44, 45, 46, 47, 0, 168, + 0, 0, 48, 0, 0, 49, 50, 0, 0, 0, + 0, 0, 0, 51, 52, 53, 54, 55, 56, 57, + 58, 40, 41, 42, 43, 44, 45, 46, 47, 0, + 0, 0, 175, 48, 0, 0, 49, 50, 0, 0, + 0, 0, 0, 0, 51, 52, 53, 54, 55, 56, + 57, 58, 40, 41, 42, 43, 44, 45, 46, 47, + 0, 0, 0, 196, 48, 0, 0, 49, 50, 0, + 0, 0, 0, 0, 0, 51, 52, 53, 54, 55, + 56, 57, 58, 40, 41, 42, 43, 44, 45, 46, + 47, 0, 0, 0, 0, 48, 0, 0, 49, 50, + 0, 0, 0, 0, 0, 0, 51, 52, 53, 54, + 55, 56, 57, 58, 96, 41, 42, 43, 44, 45, + 46, 47, 0, 0, 0, 0, 48, 0, 0, 49, + 50, 0, 0, 0, 0, 0, 0, 51, 52, 53, + 54, 55, 56, 57, 58, 130, 41, 42, 43, 44, + 45, 46, 47, 0, 0, 0, 0, 48, 0, 0, + 49, 50, 0, 0, 0, 0, 0, 0, 51, 52, + 53, 54, 55, 56, 57, 58, 40, 41, 42, 43, + 44, 45, 46, 47, 0, 0, 0, 0, 48, 0, + 0, 49, 50, 0, 0, 0, 0, 0, 0, 51, + 52, 53, 54, 55, 56, 57, 40, 41, 42, 43, + 44, 45, 46, 47, 0, 0, 0, 0, 48, 0, + 0, 49, 50, 0, 0, 0, 0, 0, 0, 51, + 52, 53, 54, 55, 56, 40, 0, 0, 43, 44, + 45, 46, 47, 0, 0, 0, 0, 48, 40, 0, + 49, 50, 0, 45, 46, 47, 0, 0, 51, 52, + 48, 0, 0, 49, 50, 154, 155, 156, 157, 158, + 0, 51, 52, 159, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 215 }; static const yytype_int16 yycheck[] = { - 10, 170, 128, 3, 4, 5, 6, 16, 7, 27, - 28, 5, 7, 16, 24, 15, 0, 133, 21, 29, - 122, 31, 123, 5, 158, 16, 36, 15, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 149, 58, 43, - 151, 39, 221, 169, 45, 157, 190, 46, 5, 45, - 69, 5, 188, 3, 4, 3, 4, 41, 237, 58, - 70, 70, 4, 5, 7, 201, 245, 211, 69, 213, - 70, 17, 216, 69, 94, 5, 96, 70, 98, 99, - 100, 3, 4, 5, 6, 41, 5, 70, 70, 10, - 110, 202, 71, 15, 5, 5, 208, 17, 118, 16, - 71, 121, 58, 59, 60, 61, 7, 16, 128, 129, - 130, 70, 132, 5, 24, 25, 7, 27, 28, 231, - 42, 17, 5, 70, 19, 47, 48, 49, 50, 51, - 40, 41, 152, 55, 18, 155, 156, 18, 158, 3, - 4, 5, 6, 18, 18, 5, 166, 5, 70, 5, - 5, 15, 172, 47, 48, 49, 50, 51, 18, 71, - 7, 55, 70, 18, 24, 25, 71, 27, 28, 5, - 20, 26, 71, 43, 18, 57, 70, 18, 198, 64, - 40, 41, 37, 47, 48, 49, 50, 51, 7, 44, - 26, 55, 71, 71, 71, 12, 18, 52, 53, 54, - 189, 37, 56, 223, 224, 17, 70, 62, 44, 211, - 65, 66, 228, 68, 154, 70, 52, 53, 54, 227, - 47, 48, 49, 50, 51, -1, 62, -1, -1, 65, - 66, -1, 68, 7, 70, 7, 8, 9, 10, 11, - 12, 13, 14, 70, -1, 19, -1, 19, 22, 23, - 22, 23, -1, -1, -1, 29, 30, 29, 30, 31, - 32, 33, 34, 35, 36, 7, 8, 9, 10, 11, - 12, 13, 14, -1, -1, -1, -1, 19, 0, -1, - 22, 23, -1, 5, -1, 7, -1, 29, 30, 31, - 32, 33, 34, 35, 36, -1, 18, -1, -1, 71, - -1, -1, 24, 25, -1, 27, 28, -1, 7, 8, - 9, 10, 11, 12, 13, 14, -1, -1, 40, 41, - 19, -1, -1, 22, 23, -1, -1, -1, -1, 71, - 29, 30, 31, 32, 33, 34, 35, 36, 7, 8, + 11, 172, 130, 7, 3, 4, 5, 6, 16, 16, + 7, 5, 47, 21, 5, 26, 15, 135, 3, 4, + 31, 124, 33, 125, 59, 160, 5, 38, 16, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 151, 60, + 44, 153, 223, 171, 15, 5, 159, 192, 46, 0, + 46, 42, 190, 70, 27, 28, 29, 71, 239, 4, + 5, 6, 71, 3, 4, 203, 247, 17, 213, 40, + 215, 7, 70, 218, 70, 96, 5, 98, 71, 100, + 101, 102, 3, 4, 5, 6, 42, 71, 71, 5, + 71, 112, 204, 10, 15, 72, 16, 210, 5, 120, + 72, 16, 123, 59, 60, 61, 62, 17, 7, 130, + 131, 132, 71, 134, 3, 4, 5, 6, 5, 7, + 233, 17, 43, 71, 5, 5, 15, 48, 49, 50, + 51, 52, 5, 154, 18, 56, 157, 158, 18, 160, + 18, 18, 18, 5, 72, 5, 26, 168, 71, 5, + 71, 24, 25, 174, 27, 28, 29, 7, 38, 48, + 49, 50, 51, 52, 72, 45, 26, 56, 41, 42, + 72, 20, 19, 53, 54, 55, 44, 18, 38, 200, + 72, 72, 71, 63, 58, 45, 66, 67, 18, 69, + 72, 71, 7, 53, 54, 55, 65, 48, 49, 50, + 51, 52, 12, 63, 225, 226, 66, 67, 19, 69, + 7, 71, 7, 8, 9, 10, 11, 12, 13, 14, + 71, 57, 19, 191, 19, 22, 23, 22, 23, 18, + 156, 213, 229, 30, 31, 30, 31, 32, 33, 34, + 35, 36, 37, 7, 8, 9, 10, 11, 12, 13, + 14, 230, -1, -1, -1, 19, -1, -1, 22, 23, + -1, -1, -1, -1, -1, -1, 30, 31, 32, 33, + 34, 35, 36, 37, -1, -1, -1, 72, -1, -1, + -1, -1, -1, -1, -1, -1, 7, 8, 9, 10, + 11, 12, 13, 14, -1, -1, -1, -1, 19, -1, + -1, 22, 23, -1, -1, -1, -1, -1, 72, 30, + 31, 32, 33, 34, 35, 36, 37, 7, 8, 9, + 10, 11, 12, 13, 14, -1, -1, -1, -1, 19, + -1, -1, 22, 23, -1, -1, -1, -1, -1, -1, + 30, 31, 32, 33, 34, 35, 36, 37, -1, -1, + -1, 72, -1, -1, -1, -1, -1, -1, -1, -1, + 7, 8, 9, 10, 11, 12, 13, 14, -1, -1, + -1, -1, 19, -1, -1, 22, 23, -1, -1, -1, + -1, -1, 72, 30, 31, 32, 33, 34, 35, 36, + 37, -1, -1, -1, -1, -1, -1, -1, -1, 7, + 8, 9, 10, 11, 12, 13, 14, -1, -1, -1, + -1, 19, -1, -1, 22, 23, -1, -1, -1, -1, + -1, 68, 30, 31, 32, 33, 34, 35, 36, 37, + -1, -1, -1, -1, -1, -1, -1, -1, 7, 8, 9, 10, 11, 12, 13, 14, -1, -1, -1, -1, + 19, 0, -1, 22, 23, -1, 5, -1, 7, -1, + 68, 30, 31, 32, 33, 34, 35, 36, 37, 18, + -1, -1, -1, -1, -1, 24, 25, 5, 27, 28, + 29, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 18, -1, 41, 42, -1, 64, 24, 25, -1, 27, + 28, 29, -1, 7, 8, 9, 10, 11, 12, 13, + 14, -1, -1, 41, 42, 19, -1, -1, 22, 23, + -1, -1, -1, -1, -1, -1, 30, 31, 32, 33, + 34, 35, 36, 37, -1, 39, 7, 8, 9, 10, + 11, 12, 13, 14, -1, 16, -1, -1, 19, -1, + -1, 22, 23, -1, -1, -1, -1, -1, -1, 30, + 31, 32, 33, 34, 35, 36, 37, 7, 8, 9, + 10, 11, 12, 13, 14, -1, -1, 17, -1, 19, + -1, -1, 22, 23, -1, -1, -1, -1, -1, -1, + 30, 31, 32, 33, 34, 35, 36, 37, 7, 8, + 9, 10, 11, 12, 13, 14, -1, 16, -1, -1, 19, -1, -1, 22, 23, -1, -1, -1, -1, -1, - 29, 30, 31, 32, 33, 34, 35, 36, -1, -1, - -1, -1, 71, -1, -1, -1, -1, -1, -1, -1, - -1, 7, 8, 9, 10, 11, 12, 13, 14, -1, - -1, -1, -1, 19, -1, -1, 22, 23, -1, -1, - -1, -1, 71, 29, 30, 31, 32, 33, 34, 35, - 36, 7, 8, 9, 10, 11, 12, 13, 14, -1, - -1, -1, -1, 19, -1, -1, 22, 23, -1, -1, - -1, -1, -1, 29, 30, 31, 32, 33, 34, 35, - 36, 67, -1, -1, -1, -1, -1, -1, -1, -1, - 7, 8, 9, 10, 11, 12, 13, 14, -1, -1, + -1, 30, 31, 32, 33, 34, 35, 36, 37, 7, + 8, 9, 10, 11, 12, 13, 14, -1, 16, -1, + -1, 19, -1, -1, 22, 23, -1, -1, -1, -1, + -1, -1, 30, 31, 32, 33, 34, 35, 36, 37, + 7, 8, 9, 10, 11, 12, 13, 14, -1, 16, -1, -1, 19, -1, -1, 22, 23, -1, -1, -1, - -1, 67, 29, 30, 31, 32, 33, 34, 35, 36, - -1, -1, -1, -1, -1, 7, 8, 9, 10, 11, + -1, -1, -1, 30, 31, 32, 33, 34, 35, 36, + 37, 7, 8, 9, 10, 11, 12, 13, 14, -1, + -1, -1, 18, 19, -1, -1, 22, 23, -1, -1, + -1, -1, -1, -1, 30, 31, 32, 33, 34, 35, + 36, 37, 7, 8, 9, 10, 11, 12, 13, 14, + -1, -1, -1, 18, 19, -1, -1, 22, 23, -1, + -1, -1, -1, -1, -1, 30, 31, 32, 33, 34, + 35, 36, 37, 7, 8, 9, 10, 11, 12, 13, + 14, -1, -1, -1, -1, 19, -1, -1, 22, 23, + -1, -1, -1, -1, -1, -1, 30, 31, 32, 33, + 34, 35, 36, 37, 7, 8, 9, 10, 11, 12, + 13, 14, -1, -1, -1, -1, 19, -1, -1, 22, + 23, -1, -1, -1, -1, -1, -1, 30, 31, 32, + 33, 34, 35, 36, 37, 7, 8, 9, 10, 11, 12, 13, 14, -1, -1, -1, -1, 19, -1, -1, - 22, 23, -1, -1, -1, -1, 63, 29, 30, 31, - 32, 33, 34, 35, 36, -1, 38, 7, 8, 9, - 10, 11, 12, 13, 14, -1, 16, -1, -1, 19, - -1, -1, 22, 23, -1, -1, -1, -1, -1, 29, - 30, 31, 32, 33, 34, 35, 36, 7, 8, 9, - 10, 11, 12, 13, 14, -1, -1, 17, -1, 19, - -1, -1, 22, 23, -1, -1, -1, -1, -1, 29, - 30, 31, 32, 33, 34, 35, 36, 7, 8, 9, - 10, 11, 12, 13, 14, -1, 16, -1, -1, 19, - -1, -1, 22, 23, -1, -1, -1, -1, -1, 29, - 30, 31, 32, 33, 34, 35, 36, 7, 8, 9, - 10, 11, 12, 13, 14, -1, 16, -1, -1, 19, - -1, -1, 22, 23, -1, -1, -1, -1, -1, 29, - 30, 31, 32, 33, 34, 35, 36, 7, 8, 9, - 10, 11, 12, 13, 14, -1, 16, -1, -1, 19, - -1, -1, 22, 23, -1, -1, -1, -1, -1, 29, - 30, 31, 32, 33, 34, 35, 36, 7, 8, 9, - 10, 11, 12, 13, 14, -1, -1, -1, 18, 19, - -1, -1, 22, 23, -1, -1, -1, -1, -1, 29, - 30, 31, 32, 33, 34, 35, 36, 7, 8, 9, - 10, 11, 12, 13, 14, -1, -1, -1, 18, 19, - -1, -1, 22, 23, -1, -1, -1, -1, -1, 29, - 30, 31, 32, 33, 34, 35, 36, 7, 8, 9, - 10, 11, 12, 13, 14, -1, -1, -1, -1, 19, - -1, -1, 22, 23, -1, -1, -1, -1, -1, 29, - 30, 31, 32, 33, 34, 35, 36, 7, 8, 9, - 10, 11, 12, 13, 14, -1, -1, -1, -1, 19, - -1, -1, 22, 23, -1, -1, -1, -1, -1, 29, - 30, 31, 32, 33, 34, 35, 36, 7, 8, 9, - 10, 11, 12, 13, 14, -1, -1, -1, -1, 19, - -1, -1, 22, 23, -1, -1, -1, -1, -1, 29, - 30, 31, 32, 33, 34, 35, 36, 7, 8, 9, - 10, 11, 12, 13, 14, -1, -1, -1, -1, 19, - -1, -1, 22, 23, -1, -1, -1, -1, -1, 29, - 30, 31, 32, 33, 34, 35, 7, 8, 9, 10, + 22, 23, -1, -1, -1, -1, -1, -1, 30, 31, + 32, 33, 34, 35, 36, 37, 7, 8, 9, 10, 11, 12, 13, 14, -1, -1, -1, -1, 19, -1, - -1, 22, 23, -1, -1, -1, -1, -1, 29, 30, - 31, 32, 33, 34, 7, -1, -1, 10, 11, 12, - 13, 14, -1, -1, -1, -1, 19, 7, -1, 22, - 23, -1, 12, 13, 14, -1, 29, 30, -1, 19, - -1, -1, 22, 23, -1, -1, -1, -1, -1, 29, - 30 + -1, 22, 23, -1, -1, -1, -1, -1, -1, 30, + 31, 32, 33, 34, 35, 36, 7, 8, 9, 10, + 11, 12, 13, 14, -1, -1, -1, -1, 19, -1, + -1, 22, 23, -1, -1, -1, -1, -1, -1, 30, + 31, 32, 33, 34, 35, 7, -1, -1, 10, 11, + 12, 13, 14, -1, -1, -1, -1, 19, 7, -1, + 22, 23, -1, 12, 13, 14, -1, -1, 30, 31, + 19, -1, -1, 22, 23, 48, 49, 50, 51, 52, + -1, 30, 31, 56, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 71 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 5, 24, 25, 27, 28, 40, 73, 77, 78, - 7, 5, 5, 78, 78, 5, 0, 74, 41, 3, - 4, 5, 6, 15, 70, 81, 82, 85, 86, 7, - 70, 17, 18, 73, 5, 70, 70, 82, 7, 8, - 9, 10, 11, 12, 13, 14, 19, 22, 23, 29, - 30, 31, 32, 33, 34, 35, 36, 15, 39, 82, - 5, 75, 76, 82, 70, 79, 82, 83, 84, 82, - 71, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 10, 82, 71, 16, 7, 5, 17, 71, 16, 16, - 70, 17, 7, 5, 82, 17, 82, 82, 82, 82, - 70, 5, 26, 37, 44, 52, 53, 54, 62, 65, - 66, 68, 70, 102, 103, 46, 58, 80, 7, 16, - 16, 82, 7, 70, 5, 18, 18, 18, 18, 82, - 41, 58, 59, 60, 61, 101, 5, 82, 103, 74, - 71, 42, 47, 48, 49, 50, 51, 55, 70, 87, - 90, 91, 94, 96, 82, 82, 16, 82, 83, 70, - 63, 5, 7, 18, 71, 103, 74, 88, 82, 20, - 97, 97, 82, 82, 103, 90, 94, 95, 19, 45, - 69, 71, 71, 82, 18, 71, 83, 102, 43, 82, - 5, 43, 89, 3, 4, 98, 99, 100, 57, 92, - 71, 16, 71, 70, 90, 91, 70, 94, 71, 18, - 71, 64, 82, 38, 7, 90, 74, 12, 16, 21, - 103, 56, 93, 94, 95, 18, 102, 67, 82, 82, - 3, 100, 99, 103, 102, 67, 102 + 0, 5, 24, 25, 27, 28, 29, 41, 74, 78, + 79, 7, 5, 5, 79, 79, 79, 5, 0, 75, + 42, 3, 4, 5, 6, 15, 71, 82, 83, 86, + 87, 7, 71, 17, 18, 74, 5, 71, 71, 83, + 7, 8, 9, 10, 11, 12, 13, 14, 19, 22, + 23, 30, 31, 32, 33, 34, 35, 36, 37, 15, + 40, 83, 5, 76, 77, 83, 71, 80, 83, 84, + 85, 83, 72, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 10, 83, 72, 16, 7, 5, 17, 72, + 16, 16, 71, 17, 7, 5, 83, 17, 83, 83, + 83, 83, 71, 5, 26, 38, 45, 53, 54, 55, + 63, 66, 67, 69, 71, 103, 104, 47, 59, 81, + 7, 16, 16, 83, 7, 71, 5, 18, 18, 18, + 18, 83, 42, 59, 60, 61, 62, 102, 5, 83, + 104, 75, 72, 43, 48, 49, 50, 51, 52, 56, + 71, 88, 91, 92, 95, 97, 83, 83, 16, 83, + 84, 71, 64, 5, 7, 18, 72, 104, 75, 89, + 83, 20, 98, 98, 83, 83, 104, 91, 95, 96, + 19, 46, 70, 72, 72, 83, 18, 72, 84, 103, + 44, 83, 5, 44, 90, 3, 4, 99, 100, 101, + 58, 93, 72, 16, 72, 71, 91, 92, 71, 95, + 72, 18, 72, 65, 83, 39, 7, 91, 75, 12, + 16, 21, 104, 57, 94, 95, 96, 18, 103, 68, + 83, 83, 3, 101, 100, 104, 103, 68, 103 }; #define yyerrok (yyerrstatus = 0) @@ -1884,37 +1894,37 @@ yyreduce: switch (yyn) { case 2: -#line 206 "magic-interpreter-parser.y" +#line 207 "magic-interpreter-parser.y" {;} break; case 3: -#line 208 "magic-interpreter-parser.y" +#line 209 "magic-interpreter-parser.y" {;} break; case 4: -#line 213 "magic-interpreter-parser.y" +#line 214 "magic-interpreter-parser.y" {;} break; case 5: -#line 215 "magic-interpreter-parser.y" +#line 216 "magic-interpreter-parser.y" {;} break; case 6: -#line 220 "magic-interpreter-parser.y" +#line 221 "magic-interpreter-parser.y" { (yyval.proc) = aCalloc(sizeof(proc_t), 1); ;} break; case 7: -#line 222 "magic-interpreter-parser.y" +#line 223 "magic-interpreter-parser.y" { (yyval.proc) = (yyvsp[(1) - (1)].proc); ;} break; case 8: -#line 226 "magic-interpreter-parser.y" +#line 227 "magic-interpreter-parser.y" { (yyval.proc) = aCalloc(sizeof(proc_t), 1); (yyval.proc)->args_nr = 1; (yyval.proc)->args = malloc(sizeof(int)); @@ -1923,7 +1933,7 @@ yyreduce: break; case 9: -#line 232 "magic-interpreter-parser.y" +#line 233 "magic-interpreter-parser.y" { (yyval.proc) = (yyvsp[(1) - (3)].proc); (yyval.proc)->args = realloc((yyval.proc)->args, sizeof(int) * (1 + (yyval.proc)->args_nr)); (yyval.proc)->args[(yyval.proc)->args_nr++] = intern_id((yyvsp[(3) - (3)].s)); @@ -1931,7 +1941,7 @@ yyreduce: break; case 10: -#line 239 "magic-interpreter-parser.y" +#line 240 "magic-interpreter-parser.y" { int var_id; if (find_constant((yyvsp[(1) - (3)].s))) { @@ -1945,7 +1955,7 @@ yyreduce: break; case 11: -#line 250 "magic-interpreter-parser.y" +#line 251 "magic-interpreter-parser.y" { val_t var; magic_eval(&magic_default_env, &var, (yyvsp[(4) - (4)].expr)); @@ -1954,7 +1964,7 @@ yyreduce: break; case 12: -#line 256 "magic-interpreter-parser.y" +#line 257 "magic-interpreter-parser.y" { teleport_anchor_t *anchor = calloc(sizeof(teleport_anchor_t), 1); anchor->name = (yyvsp[(2) - (6)].s); @@ -1968,7 +1978,7 @@ yyreduce: break; case 13: -#line 267 "magic-interpreter-parser.y" +#line 268 "magic-interpreter-parser.y" { proc_t *proc = (yyvsp[(4) - (7)].proc); proc->name = (yyvsp[(2) - (7)].s); @@ -1980,7 +1990,7 @@ yyreduce: break; case 14: -#line 276 "magic-interpreter-parser.y" +#line 277 "magic-interpreter-parser.y" { spell_t *spell = (yyvsp[(8) - (8)].spell); spell->name = (yyvsp[(3) - (8)].s); spell->invocation = magic_eval_str(&magic_default_env, (yyvsp[(6) - (8)].expr)); @@ -1994,12 +2004,12 @@ yyreduce: break; case 15: -#line 288 "magic-interpreter-parser.y" +#line 289 "magic-interpreter-parser.y" { (yyval.i) = 0; ;} break; case 16: -#line 290 "magic-interpreter-parser.y" +#line 291 "magic-interpreter-parser.y" { if ((yyvsp[(2) - (2)].i) & SPELL_FLAG_LOCAL) fail((yylsp[(1) - (2)]).first_line, (yylsp[(1) - (2)]).first_column, "`LOCAL' specified more than once"); (yyval.i) = (yyvsp[(2) - (2)].i) | SPELL_FLAG_LOCAL; @@ -2007,60 +2017,68 @@ yyreduce: break; case 17: -#line 295 "magic-interpreter-parser.y" +#line 296 "magic-interpreter-parser.y" + { if ((yyvsp[(2) - (2)].i) & SPELL_FLAG_NONMAGIC) + fail((yylsp[(1) - (2)]).first_line, (yylsp[(1) - (2)]).first_column, "`NONMAGIC' specified more than once"); + (yyval.i) = (yyvsp[(2) - (2)].i) | SPELL_FLAG_NONMAGIC; + ;} + break; + + case 18: +#line 301 "magic-interpreter-parser.y" { if ((yyvsp[(2) - (2)].i) & SPELL_FLAG_SILENT) fail((yylsp[(1) - (2)]).first_line, (yylsp[(1) - (2)]).first_column, "`SILENT' specified more than once"); (yyval.i) = (yyvsp[(2) - (2)].i) | SPELL_FLAG_SILENT; ;} break; - case 18: -#line 302 "magic-interpreter-parser.y" + case 19: +#line 308 "magic-interpreter-parser.y" { (yyval.spellarg_def).ty = SPELLARG_NONE; ;} break; - case 19: -#line 304 "magic-interpreter-parser.y" + case 20: +#line 310 "magic-interpreter-parser.y" { (yyval.spellarg_def).id = intern_id((yyvsp[(2) - (5)].s)); (yyval.spellarg_def).ty = (yyvsp[(4) - (5)].i); ;} break; - case 20: -#line 310 "magic-interpreter-parser.y" + case 21: +#line 316 "magic-interpreter-parser.y" { (yyval.i) = SPELLARG_PC; ;} break; - case 21: -#line 312 "magic-interpreter-parser.y" + case 22: +#line 318 "magic-interpreter-parser.y" { (yyval.i) = SPELLARG_STRING; ;} break; - case 22: -#line 317 "magic-interpreter-parser.y" + case 23: +#line 323 "magic-interpreter-parser.y" { (yyval.value).ty = TY_DIR; (yyval.value).v.v_int = (yyvsp[(1) - (1)].i); ;} break; - case 23: -#line 320 "magic-interpreter-parser.y" + case 24: +#line 326 "magic-interpreter-parser.y" { (yyval.value).ty = TY_INT; (yyval.value).v.v_int = (yyvsp[(1) - (1)].i); ;} break; - case 24: -#line 323 "magic-interpreter-parser.y" + case 25: +#line 329 "magic-interpreter-parser.y" { (yyval.value).ty = TY_STRING; (yyval.value).v.v_string = (yyvsp[(1) - (1)].s); ;} break; - case 25: -#line 329 "magic-interpreter-parser.y" + case 26: +#line 335 "magic-interpreter-parser.y" { (yyval.expr) = magic_new_expr(EXPR_VAL); (yyval.expr)->e.e_val = (yyvsp[(1) - (1)].value); ;} break; - case 26: -#line 332 "magic-interpreter-parser.y" + case 27: +#line 338 "magic-interpreter-parser.y" { val_t *val; if ((val = find_constant((yyvsp[(1) - (1)].s)))) { @@ -2073,160 +2091,160 @@ yyreduce: ;} break; - case 27: -#line 343 "magic-interpreter-parser.y" + case 28: +#line 349 "magic-interpreter-parser.y" { (yyval.expr) = magic_new_expr(EXPR_AREA); (yyval.expr)->e.e_area = (yyvsp[(1) - (1)].area); ;} break; - case 28: -#line 346 "magic-interpreter-parser.y" + case 29: +#line 352 "magic-interpreter-parser.y" { BIN_EXPR((yyval.expr), "+", (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), (yylsp[(1) - (3)]).first_line, (yylsp[(1) - (3)]).first_column); ;} break; - case 29: -#line 348 "magic-interpreter-parser.y" + case 30: +#line 354 "magic-interpreter-parser.y" { BIN_EXPR((yyval.expr), "-", (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), (yylsp[(1) - (3)]).first_line, (yylsp[(1) - (3)]).first_column); ;} break; - case 30: -#line 350 "magic-interpreter-parser.y" + case 31: +#line 356 "magic-interpreter-parser.y" { BIN_EXPR((yyval.expr), "*", (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), (yylsp[(1) - (3)]).first_line, (yylsp[(1) - (3)]).first_column); ;} break; - case 31: -#line 352 "magic-interpreter-parser.y" + case 32: +#line 358 "magic-interpreter-parser.y" { BIN_EXPR((yyval.expr), "%", (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), (yylsp[(1) - (3)]).first_line, (yylsp[(1) - (3)]).first_column); ;} break; - case 32: -#line 354 "magic-interpreter-parser.y" + case 33: +#line 360 "magic-interpreter-parser.y" { BIN_EXPR((yyval.expr), "/", (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), (yylsp[(1) - (3)]).first_line, (yylsp[(1) - (3)]).first_column); ;} break; - case 33: -#line 356 "magic-interpreter-parser.y" + case 34: +#line 362 "magic-interpreter-parser.y" { BIN_EXPR((yyval.expr), ">", (yyvsp[(3) - (3)].expr), (yyvsp[(1) - (3)].expr), (yylsp[(1) - (3)]).first_line, (yylsp[(1) - (3)]).first_column); ;} break; - case 34: -#line 358 "magic-interpreter-parser.y" + case 35: +#line 364 "magic-interpreter-parser.y" { BIN_EXPR((yyval.expr), ">", (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), (yylsp[(1) - (3)]).first_line, (yylsp[(1) - (3)]).first_column); ;} break; - case 35: -#line 360 "magic-interpreter-parser.y" + case 36: +#line 366 "magic-interpreter-parser.y" { BIN_EXPR((yyval.expr), "&", (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), (yylsp[(1) - (3)]).first_line, (yylsp[(1) - (3)]).first_column); ;} break; - case 36: -#line 362 "magic-interpreter-parser.y" + case 37: +#line 368 "magic-interpreter-parser.y" { BIN_EXPR((yyval.expr), "^", (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), (yylsp[(1) - (3)]).first_line, (yylsp[(1) - (3)]).first_column); ;} break; - case 37: -#line 364 "magic-interpreter-parser.y" + case 38: +#line 370 "magic-interpreter-parser.y" { BIN_EXPR((yyval.expr), "|", (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), (yylsp[(1) - (3)]).first_line, (yylsp[(1) - (3)]).first_column); ;} break; - case 38: -#line 366 "magic-interpreter-parser.y" + case 39: +#line 372 "magic-interpreter-parser.y" { BIN_EXPR((yyval.expr), "<<", (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), (yylsp[(1) - (3)]).first_line, (yylsp[(1) - (3)]).first_column); ;} break; - case 39: -#line 368 "magic-interpreter-parser.y" + case 40: +#line 374 "magic-interpreter-parser.y" { BIN_EXPR((yyval.expr), ">>", (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), (yylsp[(1) - (3)]).first_line, (yylsp[(1) - (3)]).first_column); ;} break; - case 40: -#line 370 "magic-interpreter-parser.y" + case 41: +#line 376 "magic-interpreter-parser.y" { BIN_EXPR((yyval.expr), ">=", (yyvsp[(3) - (3)].expr), (yyvsp[(1) - (3)].expr), (yylsp[(1) - (3)]).first_line, (yylsp[(1) - (3)]).first_column); ;} break; - case 41: -#line 372 "magic-interpreter-parser.y" + case 42: +#line 378 "magic-interpreter-parser.y" { BIN_EXPR((yyval.expr), ">=", (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), (yylsp[(1) - (3)]).first_line, (yylsp[(1) - (3)]).first_column); ;} break; - case 42: -#line 374 "magic-interpreter-parser.y" + case 43: +#line 380 "magic-interpreter-parser.y" { BIN_EXPR((yyval.expr), "&&", (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), (yylsp[(1) - (3)]).first_line, (yylsp[(1) - (3)]).first_column); ;} break; - case 43: -#line 376 "magic-interpreter-parser.y" + case 44: +#line 382 "magic-interpreter-parser.y" { BIN_EXPR((yyval.expr), "||", (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), (yylsp[(1) - (3)]).first_line, (yylsp[(1) - (3)]).first_column); ;} break; - case 44: -#line 378 "magic-interpreter-parser.y" + case 45: +#line 384 "magic-interpreter-parser.y" { BIN_EXPR((yyval.expr), "=", (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), (yylsp[(1) - (3)]).first_line, (yylsp[(1) - (3)]).first_column); ;} break; - case 45: -#line 380 "magic-interpreter-parser.y" + case 46: +#line 386 "magic-interpreter-parser.y" { BIN_EXPR((yyval.expr), "=", (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), (yylsp[(1) - (3)]).first_line, (yylsp[(1) - (3)]).first_column); ;} break; - case 46: -#line 382 "magic-interpreter-parser.y" + case 47: +#line 388 "magic-interpreter-parser.y" { BIN_EXPR((yyval.expr), "=", (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr), (yylsp[(1) - (3)]).first_line, (yylsp[(1) - (3)]).first_column); (yyval.expr) = fun_expr("not", 1, &(yyval.expr), (yylsp[(1) - (3)]).first_line, (yylsp[(1) - (3)]).first_column); ;} break; - case 47: -#line 385 "magic-interpreter-parser.y" + case 48: +#line 391 "magic-interpreter-parser.y" { (yyval.expr) = fun_expr((yyvsp[(1) - (4)].s), (yyvsp[(3) - (4)].arg_list).args_nr, (yyvsp[(3) - (4)].arg_list).args, (yylsp[(1) - (4)]).first_line, (yylsp[(1) - (4)]).first_column); if ((yyvsp[(3) - (4)].arg_list).args) free((yyvsp[(3) - (4)].arg_list).args); free((yyvsp[(1) - (4)].s)); ;} break; - case 48: -#line 390 "magic-interpreter-parser.y" + case 49: +#line 396 "magic-interpreter-parser.y" { (yyval.expr) = (yyvsp[(2) - (3)].expr); ;} break; - case 49: -#line 394 "magic-interpreter-parser.y" + case 50: +#line 400 "magic-interpreter-parser.y" { (yyval.arg_list).args_nr = 0; ;} break; - case 50: -#line 396 "magic-interpreter-parser.y" + case 51: +#line 402 "magic-interpreter-parser.y" { (yyval.arg_list) = (yyvsp[(1) - (1)].arg_list) ;} break; - case 51: -#line 401 "magic-interpreter-parser.y" + case 52: +#line 407 "magic-interpreter-parser.y" { (yyval.arg_list).args = aCalloc(sizeof(expr_t *), 1); (yyval.arg_list).args_nr = 1; (yyval.arg_list).args[0] = (yyvsp[(1) - (1)].expr); ;} break; - case 52: -#line 406 "magic-interpreter-parser.y" + case 53: +#line 412 "magic-interpreter-parser.y" { (yyval.arg_list).args = realloc((yyval.arg_list).args, (1 + (yyval.arg_list).args_nr) * sizeof(expr_t *)); (yyval.arg_list).args[(yyval.arg_list).args_nr++] = (yyvsp[(3) - (3)].expr); ;} break; - case 53: -#line 413 "magic-interpreter-parser.y" + case 54: +#line 419 "magic-interpreter-parser.y" { (yyval.location).m = (yyvsp[(3) - (8)].expr); (yyval.location).x = (yyvsp[(5) - (8)].expr); (yyval.location).y = (yyvsp[(7) - (8)].expr); ;} break; - case 54: -#line 417 "magic-interpreter-parser.y" + case 55: +#line 423 "magic-interpreter-parser.y" { (yyval.area).ty = AREA_LOCATION; (yyval.area).a.a_loc = (yyvsp[(1) - (1)].location); ;} break; - case 55: -#line 421 "magic-interpreter-parser.y" + case 56: +#line 427 "magic-interpreter-parser.y" { (yyval.area).ty = AREA_RECT; (yyval.area).a.a_rect.loc = (yyvsp[(1) - (8)].location); (yyval.area).a.a_rect.width = (yyvsp[(5) - (8)].expr); @@ -2234,8 +2252,8 @@ yyreduce: ;} break; - case 56: -#line 427 "magic-interpreter-parser.y" + case 57: +#line 433 "magic-interpreter-parser.y" { (yyval.area).ty = AREA_BAR; (yyval.area).a.a_bar.loc = (yyvsp[(1) - (9)].location); (yyval.area).a.a_bar.width = (yyvsp[(6) - (9)].expr); @@ -2244,13 +2262,13 @@ yyreduce: ;} break; - case 57: -#line 437 "magic-interpreter-parser.y" + case 58: +#line 443 "magic-interpreter-parser.y" { (yyval.spell) = new_spell((yyvsp[(1) - (1)].spellguard)); ;} break; - case 58: -#line 439 "magic-interpreter-parser.y" + case 59: +#line 445 "magic-interpreter-parser.y" { (yyval.spell) = new_spell((yyvsp[(4) - (4)].spellguard)); (yyval.spell)->letdefs_nr = (yyvsp[(2) - (4)].letdefs).letdefs_nr; (yyval.spell)->letdefs = (yyvsp[(2) - (4)].letdefs).letdefs; @@ -2258,15 +2276,15 @@ yyreduce: ;} break; - case 59: -#line 448 "magic-interpreter-parser.y" + case 60: +#line 454 "magic-interpreter-parser.y" { (yyval.letdefs).letdefs_nr = 0; (yyval.letdefs).letdefs = (letdef_t *) malloc(1); ;} break; - case 60: -#line 452 "magic-interpreter-parser.y" + case 61: +#line 458 "magic-interpreter-parser.y" { (yyval.letdefs) = (yyvsp[(1) - (3)].letdefs); (yyval.letdefs).letdefs_nr++; (yyval.letdefs).letdefs = realloc((yyval.letdefs).letdefs, sizeof(letdef_t) * (yyval.letdefs).letdefs_nr); @@ -2274,8 +2292,8 @@ yyreduce: ;} break; - case 61: -#line 461 "magic-interpreter-parser.y" + case 62: +#line 467 "magic-interpreter-parser.y" { if (find_constant((yyvsp[(1) - (3)].s))) { fail((yylsp[(1) - (3)]).first_line, (yylsp[(1) - (3)]).first_column, "Attempt to re-define constant `%s' as LET-bound variable.\n", (yyvsp[(1) - (3)].s)); @@ -2287,13 +2305,13 @@ yyreduce: ;} break; - case 62: -#line 474 "magic-interpreter-parser.y" + case 63: +#line 480 "magic-interpreter-parser.y" { (yyval.spellguard) = (yyvsp[(1) - (1)].spellguard); ;} break; - case 63: -#line 476 "magic-interpreter-parser.y" + case 64: +#line 482 "magic-interpreter-parser.y" { spellguard_t *sg = new_spellguard(SPELLGUARD_CHOICE); sg->next = (yyvsp[(1) - (3)].spellguard); sg->s.s_alt = (yyvsp[(3) - (3)].spellguard); @@ -2301,18 +2319,18 @@ yyreduce: ;} break; - case 64: -#line 485 "magic-interpreter-parser.y" + case 65: +#line 491 "magic-interpreter-parser.y" { (yyval.spellguard) = spellguard_implication((yyvsp[(1) - (3)].spellguard), (yyvsp[(3) - (3)].spellguard)); ;} break; - case 65: -#line 487 "magic-interpreter-parser.y" + case 66: +#line 493 "magic-interpreter-parser.y" { (yyval.spellguard) = (yyvsp[(2) - (3)].spellguard); ;} break; - case 66: -#line 489 "magic-interpreter-parser.y" + case 67: +#line 495 "magic-interpreter-parser.y" { spellguard_t *sg = new_spellguard(SPELLGUARD_EFFECT); sg->s.s_effect.effect = (yyvsp[(2) - (4)].effect); sg->s.s_effect.at_trigger = (yyvsp[(3) - (4)].effect); @@ -2321,33 +2339,33 @@ yyreduce: ;} break; - case 67: -#line 499 "magic-interpreter-parser.y" + case 68: +#line 505 "magic-interpreter-parser.y" { (yyval.effect) = NULL; ;} break; - case 68: -#line 501 "magic-interpreter-parser.y" + case 69: +#line 507 "magic-interpreter-parser.y" { (yyval.effect) = (yyvsp[(2) - (2)].effect); ;} break; - case 69: -#line 506 "magic-interpreter-parser.y" + case 70: +#line 512 "magic-interpreter-parser.y" { (yyval.effect) = NULL; ;} break; - case 70: -#line 508 "magic-interpreter-parser.y" + case 71: +#line 514 "magic-interpreter-parser.y" { (yyval.effect) = (yyvsp[(2) - (2)].effect); ;} break; - case 71: -#line 513 "magic-interpreter-parser.y" + case 72: +#line 519 "magic-interpreter-parser.y" { (yyval.spellguard) = (yyvsp[(1) - (1)].spellguard); ;} break; - case 72: -#line 515 "magic-interpreter-parser.y" + case 73: +#line 521 "magic-interpreter-parser.y" { spellguard_t *sg = new_spellguard(SPELLGUARD_CHOICE); sg->next = (yyvsp[(1) - (3)].spellguard); sg->s.s_alt = (yyvsp[(3) - (3)].spellguard); @@ -2355,87 +2373,87 @@ yyreduce: ;} break; - case 73: -#line 521 "magic-interpreter-parser.y" + case 74: +#line 527 "magic-interpreter-parser.y" { (yyval.spellguard) = (yyvsp[(2) - (3)].spellguard); ;} break; - case 74: -#line 526 "magic-interpreter-parser.y" + case 75: +#line 532 "magic-interpreter-parser.y" { (yyval.spellguard) = (yyvsp[(1) - (1)].spellguard); ;} break; - case 75: -#line 528 "magic-interpreter-parser.y" + case 76: +#line 534 "magic-interpreter-parser.y" { (yyval.spellguard) = spellguard_implication ((yyvsp[(1) - (3)].spellguard), (yyvsp[(3) - (3)].spellguard)); ;} break; - case 76: -#line 533 "magic-interpreter-parser.y" + case 77: +#line 539 "magic-interpreter-parser.y" { (yyval.spellguard) = new_spellguard(SPELLGUARD_CONDITION); (yyval.spellguard)->s.s_condition = (yyvsp[(2) - (2)].expr); ;} break; - case 77: -#line 537 "magic-interpreter-parser.y" + case 78: +#line 543 "magic-interpreter-parser.y" { (yyval.spellguard) = new_spellguard(SPELLGUARD_CATALYSTS); (yyval.spellguard)->s.s_catalysts = (yyvsp[(2) - (2)].components); ;} break; - case 78: -#line 541 "magic-interpreter-parser.y" + case 79: +#line 547 "magic-interpreter-parser.y" { (yyval.spellguard) = new_spellguard(SPELLGUARD_COMPONENTS); (yyval.spellguard)->s.s_components = (yyvsp[(2) - (2)].components); ;} break; - case 79: -#line 545 "magic-interpreter-parser.y" + case 80: +#line 551 "magic-interpreter-parser.y" { (yyval.spellguard) = new_spellguard(SPELLGUARD_MANA); (yyval.spellguard)->s.s_mana = (yyvsp[(2) - (2)].expr); ;} break; - case 80: -#line 549 "magic-interpreter-parser.y" + case 81: +#line 555 "magic-interpreter-parser.y" { (yyval.spellguard) = new_spellguard(SPELLGUARD_CASTTIME); (yyval.spellguard)->s.s_casttime = (yyvsp[(2) - (2)].expr); ;} break; - case 81: -#line 556 "magic-interpreter-parser.y" + case 82: +#line 562 "magic-interpreter-parser.y" { (yyval.components) = (yyvsp[(2) - (3)].components); ;} break; - case 82: -#line 561 "magic-interpreter-parser.y" + case 83: +#line 567 "magic-interpreter-parser.y" { (yyval.components) = NULL; magic_add_component(&(yyval.components), (yyvsp[(1) - (1)].component).id, (yyvsp[(1) - (1)].component).count); ;} break; - case 83: -#line 565 "magic-interpreter-parser.y" + case 84: +#line 571 "magic-interpreter-parser.y" { (yyval.components) = (yyvsp[(1) - (3)].components); magic_add_component(&(yyval.components), (yyvsp[(3) - (3)].component).id, (yyvsp[(3) - (3)].component).count); ;} break; - case 84: -#line 572 "magic-interpreter-parser.y" + case 85: +#line 578 "magic-interpreter-parser.y" { (yyval.component).id = (yyvsp[(3) - (3)].i); (yyval.component).count = (yyvsp[(1) - (3)].i); ;} break; - case 85: -#line 574 "magic-interpreter-parser.y" + case 86: +#line 580 "magic-interpreter-parser.y" { (yyval.component).id = (yyvsp[(1) - (1)].i); (yyval.component).count = 1; ;} break; - case 86: -#line 579 "magic-interpreter-parser.y" + case 87: +#line 585 "magic-interpreter-parser.y" { struct item_data *item = itemdb_searchname((yyvsp[(1) - (1)].s)); if (!item) { fail ((yylsp[(1) - (1)]).first_line, (yylsp[(1) - (1)]).first_column, "Unknown item `%s'\n", (yyvsp[(1) - (1)].s)); @@ -2446,63 +2464,63 @@ yyreduce: ;} break; - case 87: -#line 588 "magic-interpreter-parser.y" + case 88: +#line 594 "magic-interpreter-parser.y" { (yyval.i) = (yyvsp[(1) - (1)].i); ;} break; - case 88: -#line 593 "magic-interpreter-parser.y" + case 89: +#line 599 "magic-interpreter-parser.y" { (yyval.i) = FOREACH_FILTER_PC; ;} break; - case 89: -#line 595 "magic-interpreter-parser.y" + case 90: +#line 601 "magic-interpreter-parser.y" { (yyval.i) = FOREACH_FILTER_MOB; ;} break; - case 90: -#line 597 "magic-interpreter-parser.y" + case 91: +#line 603 "magic-interpreter-parser.y" { (yyval.i) = FOREACH_FILTER_ENTITY; ;} break; - case 91: -#line 599 "magic-interpreter-parser.y" + case 92: +#line 605 "magic-interpreter-parser.y" { (yyval.i) = FOREACH_FILTER_SPELL; ;} break; - case 92: -#line 601 "magic-interpreter-parser.y" + case 93: +#line 607 "magic-interpreter-parser.y" { (yyval.i) = FOREACH_FILTER_TARGET; ;} break; - case 93: -#line 606 "magic-interpreter-parser.y" + case 94: +#line 612 "magic-interpreter-parser.y" { (yyval.effect) = (yyvsp[(2) - (3)].effect); ;} break; - case 94: -#line 608 "magic-interpreter-parser.y" + case 95: +#line 614 "magic-interpreter-parser.y" { (yyval.effect) = new_effect(EFFECT_SKIP); ;} break; - case 95: -#line 610 "magic-interpreter-parser.y" + case 96: +#line 616 "magic-interpreter-parser.y" { (yyval.effect) = new_effect(EFFECT_ABORT); ;} break; - case 96: -#line 612 "magic-interpreter-parser.y" + case 97: +#line 618 "magic-interpreter-parser.y" { (yyval.effect) = new_effect(EFFECT_END); ;} break; - case 97: -#line 614 "magic-interpreter-parser.y" + case 98: +#line 620 "magic-interpreter-parser.y" { (yyval.effect) = new_effect(EFFECT_BREAK); ;} break; - case 98: -#line 616 "magic-interpreter-parser.y" + case 99: +#line 622 "magic-interpreter-parser.y" { if (find_constant((yyvsp[(1) - (4)].s))) { fail((yylsp[(1) - (4)]).first_line, (yylsp[(1) - (4)]).first_column, "Attempt to re-define constant `%s' in assignment.", (yyvsp[(1) - (4)].s)); @@ -2515,8 +2533,8 @@ yyreduce: ;} break; - case 99: -#line 627 "magic-interpreter-parser.y" + case 100: +#line 633 "magic-interpreter-parser.y" { (yyval.effect) = new_effect(EFFECT_FOREACH); (yyval.effect)->e.e_foreach.id = intern_id((yyvsp[(3) - (7)].s)); (yyval.effect)->e.e_foreach.area = (yyvsp[(5) - (7)].expr); @@ -2525,8 +2543,8 @@ yyreduce: ;} break; - case 100: -#line 634 "magic-interpreter-parser.y" + case 101: +#line 640 "magic-interpreter-parser.y" { (yyval.effect) = new_effect(EFFECT_FOR); (yyval.effect)->e.e_for.id = intern_id((yyvsp[(2) - (8)].s)); (yyval.effect)->e.e_for.start = (yyvsp[(4) - (8)].expr); @@ -2535,8 +2553,8 @@ yyreduce: ;} break; - case 101: -#line 641 "magic-interpreter-parser.y" + case 102: +#line 647 "magic-interpreter-parser.y" { (yyval.effect) = new_effect(EFFECT_IF); (yyval.effect)->e.e_if.cond = (yyvsp[(2) - (6)].expr); (yyval.effect)->e.e_if.true_branch = (yyvsp[(4) - (6)].effect); @@ -2544,8 +2562,8 @@ yyreduce: ;} break; - case 102: -#line 647 "magic-interpreter-parser.y" + case 103: +#line 653 "magic-interpreter-parser.y" { (yyval.effect) = new_effect(EFFECT_IF); (yyval.effect)->e.e_if.cond = (yyvsp[(2) - (4)].expr); (yyval.effect)->e.e_if.true_branch = (yyvsp[(4) - (4)].effect); @@ -2553,22 +2571,22 @@ yyreduce: ;} break; - case 103: -#line 653 "magic-interpreter-parser.y" + case 104: +#line 659 "magic-interpreter-parser.y" { (yyval.effect) = new_effect(EFFECT_SLEEP); (yyval.effect)->e.e_sleep = (yyvsp[(2) - (3)].expr); ;} break; - case 104: -#line 657 "magic-interpreter-parser.y" + case 105: +#line 663 "magic-interpreter-parser.y" { (yyval.effect) = op_effect((yyvsp[(1) - (5)].s), (yyvsp[(3) - (5)].arg_list).args_nr, (yyvsp[(3) - (5)].arg_list).args, (yylsp[(1) - (5)]).first_line, (yylsp[(1) - (5)]).first_column); free((yyvsp[(1) - (5)].s)); ;} break; - case 105: -#line 661 "magic-interpreter-parser.y" + case 106: +#line 667 "magic-interpreter-parser.y" { (yyval.effect) = new_effect(EFFECT_SCRIPT); (yyval.effect)->e.e_script = parse_script((unsigned char *) (yyvsp[(1) - (1)].s), (yylsp[(1) - (1)]).first_line); free((yyvsp[(1) - (1)].s)); @@ -2577,26 +2595,26 @@ yyreduce: ;} break; - case 106: -#line 668 "magic-interpreter-parser.y" + case 107: +#line 674 "magic-interpreter-parser.y" { (yyval.effect) = call_proc((yyvsp[(2) - (6)].s), (yyvsp[(4) - (6)].arg_list).args_nr, (yyvsp[(4) - (6)].arg_list).args, (yylsp[(1) - (6)]).first_line, (yylsp[(1) - (6)]).first_column); free((yyvsp[(2) - (6)].s)); ;} break; - case 107: -#line 674 "magic-interpreter-parser.y" + case 108: +#line 680 "magic-interpreter-parser.y" { (yyval.effect) = new_effect(EFFECT_SKIP); ;} break; - case 108: -#line 676 "magic-interpreter-parser.y" + case 109: +#line 682 "magic-interpreter-parser.y" { (yyval.effect) = set_effect_continuation((yyvsp[(1) - (3)].effect), (yyvsp[(3) - (3)].effect)); ;} break; /* Line 1267 of yacc.c. */ -#line 2600 "magic-interpreter-parser.c" +#line 2618 "magic-interpreter-parser.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -2816,7 +2834,7 @@ yyreturn: } -#line 680 "magic-interpreter-parser.y" +#line 686 "magic-interpreter-parser.y" /* We do incremental realloc here to store our results. Since this happens only once diff --git a/src/map/magic-interpreter-parser.h b/src/map/magic-interpreter-parser.h index f327d78..6edcb9a 100644 --- a/src/map/magic-interpreter-parser.h +++ b/src/map/magic-interpreter-parser.h @@ -48,47 +48,48 @@ CALL = 264, SILENT = 265, LOCAL = 266, - SHL = 267, - SHR = 268, - EQ = 269, - NEQ = 270, - GTE = 271, - LTE = 272, - ANDAND = 273, - OROR = 274, - SCRIPT_DATA = 275, - TO = 276, - TOWARDS = 277, - TELEPORT_ANCHOR = 278, - SPELL = 279, - LET = 280, - IN = 281, - END = 282, - DARROW = 283, - STRING_TY = 284, - REQUIRE = 285, - CATALYSTS = 286, - COMPONENTS = 287, - MANA = 288, - CASTTIME = 289, - SKIP = 290, - ABORT = 291, - BREAK = 292, - EFFECT = 293, - ATEND = 294, - ATTRIGGER = 295, - PC_F = 296, - MOB_F = 297, - ENTITY_F = 298, - TARGET_F = 299, - IF = 300, - THEN = 301, - ELSE = 302, - FOREACH = 303, - FOR = 304, - DO = 305, - SLEEP = 306, - OR = 307 + NONMAGIC = 267, + SHL = 268, + SHR = 269, + EQ = 270, + NEQ = 271, + GTE = 272, + LTE = 273, + ANDAND = 274, + OROR = 275, + SCRIPT_DATA = 276, + TO = 277, + TOWARDS = 278, + TELEPORT_ANCHOR = 279, + SPELL = 280, + LET = 281, + IN = 282, + END = 283, + DARROW = 284, + STRING_TY = 285, + REQUIRE = 286, + CATALYSTS = 287, + COMPONENTS = 288, + MANA = 289, + CASTTIME = 290, + SKIP = 291, + ABORT = 292, + BREAK = 293, + EFFECT = 294, + ATEND = 295, + ATTRIGGER = 296, + PC_F = 297, + MOB_F = 298, + ENTITY_F = 299, + TARGET_F = 300, + IF = 301, + THEN = 302, + ELSE = 303, + FOREACH = 304, + FOR = 305, + DO = 306, + SLEEP = 307, + OR = 308 }; #endif /* Tokens. */ @@ -101,47 +102,48 @@ #define CALL 264 #define SILENT 265 #define LOCAL 266 -#define SHL 267 -#define SHR 268 -#define EQ 269 -#define NEQ 270 -#define GTE 271 -#define LTE 272 -#define ANDAND 273 -#define OROR 274 -#define SCRIPT_DATA 275 -#define TO 276 -#define TOWARDS 277 -#define TELEPORT_ANCHOR 278 -#define SPELL 279 -#define LET 280 -#define IN 281 -#define END 282 -#define DARROW 283 -#define STRING_TY 284 -#define REQUIRE 285 -#define CATALYSTS 286 -#define COMPONENTS 287 -#define MANA 288 -#define CASTTIME 289 -#define SKIP 290 -#define ABORT 291 -#define BREAK 292 -#define EFFECT 293 -#define ATEND 294 -#define ATTRIGGER 295 -#define PC_F 296 -#define MOB_F 297 -#define ENTITY_F 298 -#define TARGET_F 299 -#define IF 300 -#define THEN 301 -#define ELSE 302 -#define FOREACH 303 -#define FOR 304 -#define DO 305 -#define SLEEP 306 -#define OR 307 +#define NONMAGIC 267 +#define SHL 268 +#define SHR 269 +#define EQ 270 +#define NEQ 271 +#define GTE 272 +#define LTE 273 +#define ANDAND 274 +#define OROR 275 +#define SCRIPT_DATA 276 +#define TO 277 +#define TOWARDS 278 +#define TELEPORT_ANCHOR 279 +#define SPELL 280 +#define LET 281 +#define IN 282 +#define END 283 +#define DARROW 284 +#define STRING_TY 285 +#define REQUIRE 286 +#define CATALYSTS 287 +#define COMPONENTS 288 +#define MANA 289 +#define CASTTIME 290 +#define SKIP 291 +#define ABORT 292 +#define BREAK 293 +#define EFFECT 294 +#define ATEND 295 +#define ATTRIGGER 296 +#define PC_F 297 +#define MOB_F 298 +#define ENTITY_F 299 +#define TARGET_F 300 +#define IF 301 +#define THEN 302 +#define ELSE 303 +#define FOREACH 304 +#define FOR 305 +#define DO 306 +#define SLEEP 307 +#define OR 308 @@ -170,7 +172,7 @@ typedef union YYSTYPE proc_t *proc; } /* Line 1489 of yacc.c. */ -#line 174 "magic-interpreter-parser.h" +#line 176 "magic-interpreter-parser.h" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 diff --git a/src/map/magic-interpreter-parser.y b/src/map/magic-interpreter-parser.y index 6d310bd..bae6844 100644 --- a/src/map/magic-interpreter-parser.y +++ b/src/map/magic-interpreter-parser.y @@ -119,6 +119,7 @@ find_constant(char *name); %token CALL %token SILENT %token LOCAL +%token NONMAGIC %token SHL %token SHR %token EQ @@ -291,6 +292,11 @@ spell_flags : /* empty */ fail(@1.first_line, @1.first_column, "`LOCAL' specified more than once"); $$ = $2 | SPELL_FLAG_LOCAL; } + | NONMAGIC spell_flags + { if ($2 & SPELL_FLAG_NONMAGIC) + fail(@1.first_line, @1.first_column, "`NONMAGIC' specified more than once"); + $$ = $2 | SPELL_FLAG_NONMAGIC; + } | SILENT spell_flags { if ($2 & SPELL_FLAG_SILENT) fail(@1.first_line, @1.first_column, "`SILENT' specified more than once"); diff --git a/src/map/magic-interpreter.h b/src/map/magic-interpreter.h index 9fc6308..26f6c5c 100644 --- a/src/map/magic-interpreter.h +++ b/src/map/magic-interpreter.h @@ -239,6 +239,7 @@ typedef struct letdef { #define SPELL_FLAG_LOCAL (1 << 0) // spell associated not with caster but with place #define SPELL_FLAG_SILENT (1 << 1) // spell invocation never uttered +#define SPELL_FLAG_NONMAGIC (1 << 2) // `magic word' only: don't require spellcasting ability typedef struct spell { char *name; diff --git a/src/map/magic-interpreter.l b/src/map/magic-interpreter.l index ce71320..017ca15 100644 --- a/src/map/magic-interpreter.l +++ b/src/map/magic-interpreter.l @@ -65,6 +65,7 @@ "TELEPORT-ANCHOR" {FIXLOC; return TELEPORT_ANCHOR;} "SILENT" {FIXLOC; return SILENT;} "LOCAL" {FIXLOC; return LOCAL;} +"NONMAGIC" {FIXLOC; return NONMAGIC;} "SPELL" {FIXLOC; return SPELL;} "LET" {FIXLOC; return LET;} "IN" {FIXLOC; return IN;} diff --git a/src/map/magic.c b/src/map/magic.c index bc25b07..5225ede 100644 --- a/src/map/magic.c +++ b/src/map/magic.c @@ -78,7 +78,13 @@ magic_message(character_t *caster, if (spell) { int near_miss; env_t *env = spell_create_env(&magic_conf, spell, caster, power, parameter); - effect_set_t *effects = (power < 1) ? NULL : spell_trigger(spell, caster, env, &near_miss); + effect_set_t *effects; + + if ((spell->flags & SPELL_FLAG_NONMAGIC) + || (power >= 1)) + effects = spell_trigger(spell, caster, env, &near_miss); + else + effects = NULL; #ifdef DEBUG fprintf(stderr, "Found spell `%s', triggered = %d\n", spell_, effects != NULL); -- cgit v1.2.3-60-g2f50