diff options
author | Eugene Sandulenko | 2016-07-17 13:46:05 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | 9172820158e9ac069a1bb9bf4472dc1e64e2a6e3 (patch) | |
tree | 1d585ab4c8e46da6b1487a38cec1e0679d60a3cd /engines/director | |
parent | d53ff7b18018d70f5633da4552164bf5a78f5d5a (diff) | |
download | scummvm-rg350-9172820158e9ac069a1bb9bf4472dc1e64e2a6e3.tar.gz scummvm-rg350-9172820158e9ac069a1bb9bf4472dc1e64e2a6e3.tar.bz2 scummvm-rg350-9172820158e9ac069a1bb9bf4472dc1e64e2a6e3.zip |
DIRECTOR: Lingo: Fix 'intersects' operator parsing and added 'within' operator
Diffstat (limited to 'engines/director')
-rw-r--r-- | engines/director/lingo/lingo-code.cpp | 9 | ||||
-rw-r--r-- | engines/director/lingo/lingo-gr.cpp | 853 | ||||
-rw-r--r-- | engines/director/lingo/lingo-gr.h | 10 | ||||
-rw-r--r-- | engines/director/lingo/lingo-gr.y | 6 | ||||
-rw-r--r-- | engines/director/lingo/lingo-lex.cpp | 381 | ||||
-rw-r--r-- | engines/director/lingo/lingo-lex.l | 2 | ||||
-rw-r--r-- | engines/director/lingo/lingo.h | 1 | ||||
-rw-r--r-- | engines/director/lingo/tests/factory.lingo | 4 |
8 files changed, 662 insertions, 604 deletions
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp index 629b10002c..c8ae4b9774 100644 --- a/engines/director/lingo/lingo-code.cpp +++ b/engines/director/lingo/lingo-code.cpp @@ -399,6 +399,15 @@ void Lingo::c_intersects() { g_lingo->push(d1); } +void Lingo::c_within() { + Datum d2 = g_lingo->pop(); + Datum d1 = g_lingo->pop(); + + warning("STUB: c_within"); + + g_lingo->push(d1); +} + void Lingo::c_and() { Datum d2 = g_lingo->pop(); Datum d1 = g_lingo->pop(); diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp index e0d661f0ea..bb343ff30b 100644 --- a/engines/director/lingo/lingo-gr.cpp +++ b/engines/director/lingo/lingo-gr.cpp @@ -120,7 +120,9 @@ tCONCAT = 309, tCONTAINS = 310, tSTARTS = 311, - tINTERSECTS = 312 + tSPRITE = 312, + tINTERSECTS = 313, + tWITHIN = 314 }; #endif /* Tokens. */ @@ -178,7 +180,9 @@ #define tCONCAT 309 #define tCONTAINS 310 #define tSTARTS 311 -#define tINTERSECTS 312 +#define tSPRITE 312 +#define tINTERSECTS 313 +#define tWITHIN 314 @@ -235,7 +239,7 @@ typedef union YYSTYPE int narg; /* number of arguments */ } /* Line 193 of yacc.c. */ -#line 239 "engines/director/lingo/lingo-gr.cpp" +#line 243 "engines/director/lingo/lingo-gr.cpp" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -248,7 +252,7 @@ typedef union YYSTYPE /* Line 216 of yacc.c. */ -#line 252 "engines/director/lingo/lingo-gr.cpp" +#line 256 "engines/director/lingo/lingo-gr.cpp" #ifdef short # undef short @@ -461,22 +465,22 @@ union yyalloc #endif /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 77 +#define YYFINAL 79 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 645 +#define YYLAST 715 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 71 +#define YYNTOKENS 73 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 34 /* YYNRULES -- Number of rules. */ -#define YYNRULES 118 +#define YYNRULES 119 /* YYNRULES -- Number of states. */ -#define YYNSTATES 254 +#define YYNSTATES 258 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 312 +#define YYMAXUTOK 314 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -485,12 +489,12 @@ union yyalloc static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 64, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 66, 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, 63, 69, 2, - 65, 66, 61, 59, 70, 60, 2, 62, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 65, 71, 2, + 67, 68, 63, 61, 72, 62, 2, 64, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 68, 58, 67, 2, 2, 2, 2, 2, 2, 2, + 70, 60, 69, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -515,7 +519,7 @@ static const yytype_uint8 yytranslate[] = 25, 26, 27, 28, 29, 30, 31, 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 + 55, 56, 57, 58, 59 }; #if YYDEBUG @@ -531,77 +535,78 @@ static const yytype_uint16 yyprhs[] = 223, 224, 225, 228, 231, 233, 235, 237, 242, 244, 249, 251, 253, 256, 258, 262, 266, 270, 274, 278, 282, 286, 290, 294, 298, 302, 305, 309, 313, 317, - 321, 325, 328, 331, 335, 338, 341, 344, 346, 348, - 351, 353, 357, 360, 363, 366, 369, 373, 376, 380, - 383, 386, 388, 392, 395, 399, 400, 409, 412, 413, - 422, 423, 425, 429, 434, 435, 439, 440, 442 + 321, 324, 327, 331, 336, 341, 344, 347, 350, 352, + 354, 357, 359, 363, 366, 369, 372, 375, 379, 382, + 386, 389, 392, 394, 398, 401, 405, 406, 415, 418, + 419, 428, 429, 431, 435, 440, 441, 445, 446, 448 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { - 72, 0, -1, 72, 73, 74, -1, 74, -1, 1, - 64, -1, 64, -1, -1, 98, -1, 93, -1, 103, - -1, 75, -1, 77, -1, 34, 92, 25, 13, -1, - 36, 13, 58, 92, -1, 36, 8, 58, 92, -1, - 36, 9, 92, 58, 92, -1, 36, 13, 38, 92, - -1, 36, 8, 38, 92, -1, 36, 9, 92, 38, - 92, -1, 92, -1, 93, -1, 76, -1, 78, -1, - 85, 65, 84, 66, 91, 90, 19, 35, -1, 86, - 58, 92, 90, 38, 92, 90, 91, 90, 19, 35, - -1, 86, 58, 92, 90, 16, 38, 92, 90, 91, - 90, 19, 35, -1, 39, 13, 37, 92, -1, 87, - 84, 37, 73, 91, 90, 19, 24, -1, 87, 84, - 37, 73, 91, 90, 42, 91, 90, 19, 24, -1, - 87, 84, 37, 73, 91, 90, 89, 80, 90, 19, - 24, -1, 87, 84, 37, 89, 76, 90, -1, 87, - 84, 37, 89, 76, 90, 42, 89, 76, 90, -1, - 87, 84, 37, 89, 76, 90, 81, 90, 79, 90, - -1, -1, 42, 89, 76, -1, 80, 83, -1, 83, - -1, 81, 82, -1, 82, -1, 88, 84, 37, 89, - 77, 90, -1, 81, -1, 88, 84, 37, 91, 90, - -1, 92, -1, 92, 58, 92, -1, 65, 84, 66, + 74, 0, -1, 74, 75, 76, -1, 76, -1, 1, + 66, -1, 66, -1, -1, 100, -1, 95, -1, 105, + -1, 77, -1, 79, -1, 34, 94, 25, 13, -1, + 36, 13, 60, 94, -1, 36, 8, 60, 94, -1, + 36, 9, 94, 60, 94, -1, 36, 13, 38, 94, + -1, 36, 8, 38, 94, -1, 36, 9, 94, 38, + 94, -1, 94, -1, 95, -1, 78, -1, 80, -1, + 87, 67, 86, 68, 93, 92, 19, 35, -1, 88, + 60, 94, 92, 38, 94, 92, 93, 92, 19, 35, + -1, 88, 60, 94, 92, 16, 38, 94, 92, 93, + 92, 19, 35, -1, 39, 13, 37, 94, -1, 89, + 86, 37, 75, 93, 92, 19, 24, -1, 89, 86, + 37, 75, 93, 92, 42, 93, 92, 19, 24, -1, + 89, 86, 37, 75, 93, 92, 91, 82, 92, 19, + 24, -1, 89, 86, 37, 91, 78, 92, -1, 89, + 86, 37, 91, 78, 92, 42, 91, 78, 92, -1, + 89, 86, 37, 91, 78, 92, 83, 92, 81, 92, + -1, -1, 42, 91, 78, -1, 82, 85, -1, 85, + -1, 83, 84, -1, 84, -1, 90, 86, 37, 91, + 79, 92, -1, 83, -1, 90, 86, 37, 93, 92, + -1, 94, -1, 94, 60, 94, -1, 67, 86, 68, -1, 35, 41, -1, 35, 40, 13, -1, 24, -1, - 18, -1, -1, -1, -1, 91, 73, -1, 91, 77, - -1, 7, -1, 10, -1, 14, -1, 11, 65, 104, - 66, -1, 12, -1, 13, 65, 104, 66, -1, 13, - -1, 8, -1, 9, 92, -1, 75, -1, 92, 59, - 92, -1, 92, 60, 92, -1, 92, 61, 92, -1, - 92, 62, 92, -1, 92, 67, 92, -1, 92, 68, - 92, -1, 92, 50, 92, -1, 92, 45, 92, -1, - 92, 46, 92, -1, 92, 51, 92, -1, 92, 52, - 92, -1, 53, 92, -1, 92, 69, 92, -1, 92, - 54, 92, -1, 92, 55, 92, -1, 92, 56, 92, - -1, 92, 57, 92, -1, 59, 92, -1, 60, 92, - -1, 65, 92, 66, -1, 28, 14, -1, 29, 13, - -1, 34, 92, -1, 95, -1, 20, -1, 22, 94, - -1, 13, -1, 94, 70, 13, -1, 23, 26, -1, - 23, 31, -1, 23, 33, -1, 23, 96, -1, 23, - 96, 97, -1, 23, 97, -1, 38, 21, 14, -1, - 21, 14, -1, 38, 14, -1, 14, -1, 32, 30, - 14, -1, 30, 14, -1, 38, 30, 14, -1, -1, - 27, 13, 99, 89, 101, 73, 102, 91, -1, 43, - 13, -1, -1, 44, 13, 100, 89, 101, 73, 102, - 91, -1, -1, 13, -1, 101, 70, 13, -1, 101, - 73, 70, 13, -1, -1, 13, 89, 104, -1, -1, - 92, -1, 104, 70, 92, -1 + 18, -1, -1, -1, -1, 93, 75, -1, 93, 79, + -1, 7, -1, 10, -1, 14, -1, 11, 67, 106, + 68, -1, 12, -1, 13, 67, 106, 68, -1, 13, + -1, 8, -1, 9, 94, -1, 77, -1, 94, 61, + 94, -1, 94, 62, 94, -1, 94, 63, 94, -1, + 94, 64, 94, -1, 94, 69, 94, -1, 94, 70, + 94, -1, 94, 50, 94, -1, 94, 45, 94, -1, + 94, 46, 94, -1, 94, 51, 94, -1, 94, 52, + 94, -1, 53, 94, -1, 94, 71, 94, -1, 94, + 54, 94, -1, 94, 55, 94, -1, 94, 56, 94, + -1, 61, 94, -1, 62, 94, -1, 67, 94, 68, + -1, 57, 94, 58, 94, -1, 57, 94, 59, 94, + -1, 28, 14, -1, 29, 13, -1, 34, 94, -1, + 97, -1, 20, -1, 22, 96, -1, 13, -1, 96, + 72, 13, -1, 23, 26, -1, 23, 31, -1, 23, + 33, -1, 23, 98, -1, 23, 98, 99, -1, 23, + 99, -1, 38, 21, 14, -1, 21, 14, -1, 38, + 14, -1, 14, -1, 32, 30, 14, -1, 30, 14, + -1, 38, 30, 14, -1, -1, 27, 13, 101, 91, + 103, 75, 104, 93, -1, 43, 13, -1, -1, 44, + 13, 102, 91, 103, 75, 104, 93, -1, -1, 13, + -1, 103, 72, 13, -1, 103, 75, 72, 13, -1, + -1, 13, 91, 106, -1, -1, 94, -1, 106, 72, + 94, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 102, 102, 103, 104, 107, 112, 113, 114, 115, - 116, 117, 120, 126, 132, 140, 148, 154, 162, 171, - 172, 174, 175, 180, 191, 207, 219, 224, 231, 240, - 249, 259, 269, 280, 281, 284, 285, 288, 289, 292, - 300, 301, 309, 310, 311, 313, 315, 321, 327, 334, - 336, 338, 339, 340, 343, 348, 351, 354, 360, 363, - 371, 374, 381, 387, 388, 389, 390, 391, 392, 393, - 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, - 404, 405, 406, 407, 410, 411, 412, 413, 414, 416, - 419, 420, 431, 432, 433, 434, 439, 445, 452, 453, - 454, 455, 458, 459, 460, 488, 488, 494, 497, 497, - 503, 504, 505, 506, 508, 512, 520, 521, 522 + 0, 101, 101, 102, 103, 106, 111, 112, 113, 114, + 115, 116, 119, 125, 131, 139, 147, 153, 161, 170, + 171, 173, 174, 179, 190, 206, 218, 223, 230, 239, + 248, 258, 268, 279, 280, 283, 284, 287, 288, 291, + 299, 300, 308, 309, 310, 312, 314, 320, 326, 333, + 335, 337, 338, 339, 342, 347, 350, 353, 359, 362, + 370, 373, 380, 386, 387, 388, 389, 390, 391, 392, + 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, + 403, 404, 405, 406, 407, 410, 411, 412, 413, 414, + 416, 419, 420, 431, 432, 433, 434, 439, 445, 452, + 453, 454, 455, 458, 459, 460, 488, 488, 494, 497, + 497, 503, 504, 505, 506, 508, 512, 520, 521, 522 }; #endif @@ -617,14 +622,15 @@ static const char *const yytname[] = "tMCIWAIT", "tMOVIE", "tNEXT", "tOF", "tPREVIOUS", "tPUT", "tREPEAT", "tSET", "tTHEN", "tTO", "tWHEN", "tWITH", "tWHILE", "tNLELSE", "tFACTORY", "tMETHOD", "tGE", "tLE", "tGT", "tLT", "tEQ", "tNEQ", "tAND", - "tOR", "tNOT", "tCONCAT", "tCONTAINS", "tSTARTS", "tINTERSECTS", "'='", - "'+'", "'-'", "'*'", "'/'", "'%'", "'\\n'", "'('", "')'", "'>'", "'<'", - "'&'", "','", "$accept", "program", "nl", "programline", "asgn", - "stmtoneliner", "stmt", "ifstmt", "elsestmtoneliner", "elseifstmt", - "elseifstmtoneliner", "elseifstmtoneliner1", "elseifstmt1", "cond", - "repeatwhile", "repeatwith", "if", "elseif", "begin", "end", "stmtlist", - "expr", "func", "globallist", "gotofunc", "gotoframe", "gotomovie", - "defn", "@1", "@2", "argdef", "argstore", "macro", "arglist", 0 + "tOR", "tNOT", "tCONCAT", "tCONTAINS", "tSTARTS", "tSPRITE", + "tINTERSECTS", "tWITHIN", "'='", "'+'", "'-'", "'*'", "'/'", "'%'", + "'\\n'", "'('", "')'", "'>'", "'<'", "'&'", "','", "$accept", "program", + "nl", "programline", "asgn", "stmtoneliner", "stmt", "ifstmt", + "elsestmtoneliner", "elseifstmt", "elseifstmtoneliner", + "elseifstmtoneliner1", "elseifstmt1", "cond", "repeatwhile", + "repeatwith", "if", "elseif", "begin", "end", "stmtlist", "expr", "func", + "globallist", "gotofunc", "gotoframe", "gotomovie", "defn", "@1", "@2", + "argdef", "argstore", "macro", "arglist", 0 }; #endif @@ -638,27 +644,27 @@ static const yytype_uint16 yytoknum[] = 275, 276, 277, 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, 308, 309, 310, 311, 312, 61, 43, - 45, 42, 47, 37, 10, 40, 41, 62, 60, 38, - 44 + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 61, 43, 45, 42, 47, 37, 10, 40, 41, 62, + 60, 38, 44 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 71, 72, 72, 72, 73, 74, 74, 74, 74, - 74, 74, 75, 75, 75, 75, 75, 75, 75, 76, - 76, 77, 77, 77, 77, 77, 77, 78, 78, 78, - 78, 78, 78, 79, 79, 80, 80, 81, 81, 82, - 83, 83, 84, 84, 84, 85, 86, 87, 88, 89, - 90, 91, 91, 91, 92, 92, 92, 92, 92, 92, - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, - 92, 92, 92, 92, 93, 93, 93, 93, 93, 93, - 94, 94, 95, 95, 95, 95, 95, 95, 96, 96, - 96, 96, 97, 97, 97, 99, 98, 98, 100, 98, - 101, 101, 101, 101, 102, 103, 104, 104, 104 + 0, 73, 74, 74, 74, 75, 76, 76, 76, 76, + 76, 76, 77, 77, 77, 77, 77, 77, 77, 78, + 78, 79, 79, 79, 79, 79, 79, 80, 80, 80, + 80, 80, 80, 81, 81, 82, 82, 83, 83, 84, + 85, 85, 86, 86, 86, 87, 88, 89, 90, 91, + 92, 93, 93, 93, 94, 94, 94, 94, 94, 94, + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, + 94, 94, 94, 94, 94, 95, 95, 95, 95, 95, + 95, 96, 96, 97, 97, 97, 97, 97, 97, 98, + 98, 98, 98, 99, 99, 99, 101, 100, 100, 102, + 100, 103, 103, 103, 103, 104, 105, 106, 106, 106 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -672,10 +678,10 @@ static const yytype_uint8 yyr2[] = 0, 0, 2, 2, 1, 1, 1, 4, 1, 4, 1, 1, 2, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, - 3, 2, 2, 3, 2, 2, 2, 1, 1, 2, - 1, 3, 2, 2, 2, 2, 3, 2, 3, 2, - 2, 1, 3, 2, 3, 0, 8, 2, 0, 8, - 0, 1, 3, 4, 0, 3, 0, 1, 3 + 2, 2, 3, 4, 4, 2, 2, 2, 1, 1, + 2, 1, 3, 2, 2, 2, 2, 3, 2, 3, + 2, 2, 1, 3, 2, 3, 0, 8, 2, 0, + 8, 0, 1, 3, 4, 0, 3, 0, 1, 3 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -684,82 +690,82 @@ static const yytype_uint8 yyr2[] = static const yytype_uint8 yydefact[] = { 0, 0, 54, 61, 0, 55, 0, 58, 49, 56, - 88, 0, 0, 47, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 3, 63, - 21, 11, 22, 0, 0, 0, 19, 8, 87, 7, - 9, 4, 60, 0, 63, 62, 116, 116, 116, 90, - 89, 101, 0, 92, 0, 93, 0, 94, 0, 95, - 97, 105, 84, 85, 86, 0, 45, 0, 0, 0, - 0, 107, 108, 75, 81, 82, 0, 1, 5, 6, - 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, + 89, 0, 0, 47, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, + 63, 21, 11, 22, 0, 0, 0, 19, 8, 88, + 7, 9, 4, 60, 0, 63, 62, 117, 117, 117, + 91, 90, 102, 0, 93, 0, 94, 0, 95, 0, + 96, 98, 106, 85, 86, 87, 0, 45, 0, 0, + 0, 0, 108, 109, 75, 0, 80, 81, 0, 1, + 5, 6, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 117, 0, 0, 115, 0, 99, 103, 0, - 100, 0, 0, 0, 96, 49, 0, 46, 0, 0, - 0, 0, 0, 0, 49, 83, 2, 0, 50, 0, - 0, 49, 0, 71, 72, 70, 73, 74, 77, 78, - 79, 80, 64, 65, 66, 67, 68, 69, 76, 57, - 0, 59, 91, 102, 98, 104, 110, 12, 17, 14, - 0, 0, 16, 13, 26, 110, 51, 0, 44, 51, - 0, 43, 118, 111, 0, 18, 15, 0, 50, 0, - 0, 50, 50, 20, 0, 114, 114, 52, 53, 0, - 0, 50, 49, 30, 112, 0, 51, 51, 0, 50, - 51, 0, 51, 0, 48, 49, 50, 38, 0, 113, - 106, 109, 23, 51, 50, 27, 50, 50, 40, 36, - 0, 0, 37, 33, 0, 50, 0, 0, 35, 0, - 0, 50, 49, 50, 49, 0, 0, 0, 0, 49, - 31, 0, 32, 0, 0, 24, 28, 29, 50, 34, - 50, 25, 41, 39 + 0, 0, 0, 118, 0, 0, 116, 0, 100, 104, + 0, 101, 0, 0, 0, 97, 49, 0, 46, 0, + 0, 0, 0, 0, 0, 49, 0, 0, 82, 2, + 0, 50, 0, 0, 49, 0, 71, 72, 70, 73, + 74, 77, 78, 79, 64, 65, 66, 67, 68, 69, + 76, 57, 0, 59, 92, 103, 99, 105, 111, 12, + 17, 14, 0, 0, 16, 13, 26, 111, 83, 84, + 51, 0, 44, 51, 0, 43, 119, 112, 0, 18, + 15, 0, 50, 0, 0, 50, 50, 20, 0, 115, + 115, 52, 53, 0, 0, 50, 49, 30, 113, 0, + 51, 51, 0, 50, 51, 0, 51, 0, 48, 49, + 50, 38, 0, 114, 107, 110, 23, 51, 50, 27, + 50, 50, 40, 36, 0, 0, 37, 33, 0, 50, + 0, 0, 35, 0, 0, 50, 49, 50, 49, 0, + 0, 0, 0, 49, 31, 0, 32, 0, 0, 24, + 28, 29, 50, 34, 50, 25, 41, 39 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 27, 187, 28, 44, 30, 188, 32, 233, 217, - 218, 207, 219, 83, 33, 34, 35, 208, 243, 167, - 178, 36, 183, 50, 38, 59, 60, 39, 115, 124, - 174, 196, 40, 103 + -1, 28, 191, 29, 45, 31, 192, 33, 237, 221, + 222, 211, 223, 85, 34, 35, 36, 212, 247, 171, + 182, 37, 187, 51, 39, 60, 61, 40, 116, 125, + 178, 200, 41, 104 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -198 +#define YYPACT_NINF -192 static const yytype_int16 yypact[] = { - 206, -57, -198, -198, 422, -198, -30, -198, 531, -198, - -198, 45, 107, -198, 47, 23, 51, 422, 37, 60, - 53, 54, 96, 422, 422, 422, 422, 17, -198, 19, - -198, -198, -198, 55, 61, 430, 511, -198, -198, -198, - -198, -198, 64, 422, -198, 511, 422, 422, 422, -198, - 42, -198, 104, -198, 116, -198, 102, -198, 11, 24, - -198, -198, -198, -198, 121, 122, -198, -16, 422, -14, - 97, -198, -198, 576, 576, 576, 260, -198, -198, 265, - 430, 422, 430, 105, 491, 422, 422, 422, 422, 422, - 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, - 422, 121, 511, 41, 44, 71, 131, -198, -198, 133, - -198, 134, 136, 123, -198, -198, 138, -198, 422, 422, - 446, 422, 422, 422, -198, -198, -198, 89, 511, 90, - 466, 93, 422, 511, 511, 511, 511, 511, 511, 511, - 511, 141, 556, 556, 576, 576, 511, 511, 511, -198, - 422, -198, -198, -198, -198, -198, 145, -198, 511, 511, - 422, 422, 511, 511, 511, 145, -198, 2, -198, -198, - 392, 511, 511, -198, -11, 511, 511, -11, 324, 124, - 422, 324, -198, -198, 146, 91, 91, -198, -198, 144, - 422, 511, -8, -6, -198, 147, -198, -198, 135, 511, - -198, 150, -198, 151, -198, -198, 151, -198, 430, -198, - 324, 324, -198, -198, 324, -198, 324, 151, 151, -198, - 430, 392, -198, 126, 142, 324, 180, 185, -198, 186, - 174, -198, -198, -198, -198, 202, 187, 199, 203, -3, - -198, 392, -198, 358, 196, -198, -198, -198, 324, -198, - -198, -198, -198, -198 + 210, -49, -192, -192, 434, -192, -43, -192, 644, -192, + -192, 35, 146, -192, 41, 20, 54, 434, 25, 50, + 59, 60, 66, 434, 434, 434, 434, 434, 10, -192, + 11, -192, -192, -192, 13, 14, 466, 622, -192, -192, + -192, -192, -192, 16, 434, -192, 622, 434, 434, 434, + -192, 33, -192, 68, -192, 73, -192, 80, -192, 1, + 15, -192, -192, -192, -192, 480, 101, -192, -20, 434, + -18, 82, -192, -192, 61, 524, 61, 61, 573, -192, + -192, 271, 466, 434, 466, 83, 600, 434, 434, 434, + 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, + 434, 434, 480, 622, -11, -4, 51, 121, -192, -192, + 122, -192, 126, 127, 112, -192, -192, 130, -192, 434, + 434, 502, 434, 434, 434, -192, 434, 434, -192, -192, + 76, 622, 78, 546, 81, 434, 622, 622, 622, 622, + 622, 622, 622, 622, 266, 266, 61, 61, 622, 622, + 622, -192, 434, -192, -192, -192, -192, -192, 136, -192, + 622, 622, 434, 434, 622, 622, 622, 136, 622, 622, + -192, 5, -192, -192, 404, 622, 622, -192, -10, 622, + 622, -10, 332, 113, 434, 332, -192, -192, 137, 85, + 85, -192, -192, 134, 434, 622, -5, -9, -192, 145, + -192, -192, 124, 622, -192, 138, -192, 143, -192, -192, + 143, -192, 466, -192, 332, 332, -192, -192, 332, -192, + 332, 143, 143, -192, 466, 404, -192, 128, 129, 332, + 149, 150, -192, 156, 144, -192, -192, -192, -192, 161, + 148, 163, 167, -6, -192, 404, -192, 368, 157, -192, + -192, -192, 332, -192, -192, -192, -192, -192 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -198, -198, -25, 153, 9, -166, 0, -198, -198, -198, - 43, -173, 20, -77, -198, -198, -198, -197, -7, -168, - -126, 4, 26, -198, -198, -198, 179, -198, -198, -198, - 74, 58, -198, 68 + -192, -192, -26, 104, 7, -170, 0, -192, -192, -192, + -3, -178, -28, -79, -192, -192, -192, -191, -7, -47, + -165, 2, 23, -192, -192, -192, 135, -192, -192, -192, + 30, 8, -192, 21 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -769,140 +775,154 @@ static const yytype_int16 yypgoto[] = #define YYTABLE_NINF -61 static const yytype_int16 yytable[] = { - 31, 48, 79, 127, 182, 129, 220, 41, 45, 29, - 189, 201, 204, 192, 193, -51, -51, 77, 179, -10, - 220, 64, 118, 200, 121, 110, 37, 73, 74, 75, - 76, 213, 111, 222, 202, 46, 205, 62, 223, 84, - 180, 112, 119, 181, 122, 222, 226, 101, 227, 229, - 102, 102, 102, 78, 54, 231, 56, 235, 49, 184, - 61, -51, 113, 240, 63, 242, 70, 71, 67, 68, - 210, 211, 120, 69, 214, 249, 216, 65, 66, 31, - 252, 78, 253, -10, 84, 128, 130, 225, 29, 133, - 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, - 144, 145, 146, 147, 148, 37, 169, 149, 156, 72, - 151, 150, 106, 248, 150, 104, 105, 165, 107, 81, - 80, 51, 158, 159, 170, 162, 163, 164, 52, 47, - 108, 224, 109, 53, 123, 117, 171, 54, 55, 56, - 57, 150, 131, 230, 152, 58, 116, 153, 154, 185, - 155, 157, 186, 112, 172, 166, 168, 78, 173, 194, - 209, 195, 190, 198, 175, 176, 85, 86, 232, 204, - 212, 87, 88, 89, 215, 90, 91, 92, 93, 234, - 94, 95, 96, 97, 191, 203, 85, 86, 98, 99, - 100, 87, 88, 89, 199, 90, 91, 92, 221, 236, - 94, 95, 96, 97, 237, 238, -6, 1, 98, 99, - 100, 239, 84, 2, 3, 4, 5, 6, 7, 8, - 9, 244, 245, 246, 84, 241, 10, 247, 11, 12, - 13, 251, 126, 14, 15, 16, 206, 228, 114, 177, - 17, 18, 19, 250, 197, 20, 0, 0, 0, 21, - 22, 0, 0, 0, 0, 0, 0, 0, 0, 23, - 0, 0, 0, 0, 0, 24, 25, 0, 0, 0, - -6, 26, 2, 3, 4, 5, 6, 7, 8, 9, - 0, 0, 0, 0, 0, 10, 0, 11, 12, 13, - 0, 0, 14, 15, 16, 0, 0, 0, 0, 17, - 18, 19, 0, 0, 20, 85, 86, 0, 21, 22, - 87, 88, 89, 0, 90, 91, 92, 93, 23, 94, - 95, 96, 97, 0, 24, 25, 125, 98, 99, 100, - 26, 2, 3, 4, 5, 6, 7, 42, 9, 0, - 0, 0, 0, 0, 10, 0, 11, 12, 13, 0, - 0, 0, 15, 16, 0, 0, 0, 0, 17, 18, - 19, 0, 0, 20, 0, 2, 3, 4, 5, 6, - 7, 42, 9, 0, 0, 0, 0, 23, 10, 0, - 11, 12, 13, 24, 25, 0, 15, 16, 78, 26, - 0, 0, 17, 18, 19, 0, 0, 20, 0, 2, - 3, 4, 5, 6, 7, 42, 9, 0, 0, 0, - 0, 23, 10, 0, 11, 12, 0, 24, 25, 0, - 15, 16, 0, 26, 0, 0, 17, 0, 19, 2, - 3, 4, 5, 6, 7, 42, 9, 2, 3, 4, - 5, 6, 7, 42, 9, 23, 0, 0, 0, 0, - 0, 24, 25, 0, 0, 0, 43, 26, 19, 0, - 0, 0, 0, 0, 43, 0, 19, 0, 0, 0, - 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, - 0, 24, 25, 23, 160, 0, 0, 26, 0, 24, - 25, 85, 86, 0, 0, 82, 87, 88, 89, 0, - 90, 91, 92, 93, 161, 94, 95, 96, 97, 0, - 0, 85, 86, 98, 99, 100, 87, 88, 89, 0, - 90, 91, 92, 93, 132, 94, 95, 96, 97, 0, - 0, 0, 125, 98, 99, 100, 85, 86, 0, 0, - 0, 87, 88, 89, 0, 90, 91, 92, 93, 132, - 94, 95, 96, 97, 0, 0, 85, 86, 98, 99, - 100, 87, 88, 89, 0, 90, 91, 92, 93, 0, - 94, 95, 96, 97, 0, 0, -60, -60, 98, 99, - 100, -60, -60, -60, 0, -60, -60, -60, -60, 0, - 0, 0, -60, -60, 0, 0, 47, 0, -60, -60, - -60, 85, 86, 0, 0, 0, 87, 88, 89, 0, - 90, 91, 92, 0, 0, 0, 0, 96, 97, 0, - 0, 85, 86, 98, 99, 100, 87, 88, 89, 0, - 90, 91, 92, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 98, 99, 100 + 32, 49, 81, 130, 186, 132, 46, 30, 185, 208, + 79, -10, -51, -51, 205, 111, 224, 42, 119, 65, + 122, 183, 112, 38, 47, 74, 75, 76, 77, 78, + 224, 113, 226, 209, 63, 214, 215, 206, 86, 218, + 120, 220, 123, 184, 226, 55, 102, 57, 50, 103, + 103, 103, 229, 114, 62, 235, 80, 151, 68, 69, + -51, 152, 188, 70, 153, 66, 67, 64, 152, 105, + 106, 121, 71, 72, 83, 253, 80, -10, 252, 73, + 82, 32, 108, 48, 86, 131, 133, 109, 30, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 38, 107, 87, 88, 173, 158, + 110, 89, 90, 91, 118, 92, 93, 94, 167, 124, + 134, 160, 161, 152, 164, 165, 166, 174, 168, 169, + 99, 100, 101, 228, 154, 193, 155, 175, 196, 197, + 156, 157, 113, 159, 170, 234, 172, 80, 204, 177, + 198, 194, 189, 202, 176, 190, 217, 199, 213, 216, + 52, 208, 219, 227, 179, 180, 238, 53, 240, 241, + 236, 230, 54, 231, 233, 242, 55, 56, 57, 58, + 248, 243, 239, 249, 59, 129, 195, 250, 244, 207, + 246, 251, 255, 232, 210, 115, 203, 181, 201, 0, + 0, 0, 225, 0, 0, 256, 0, 257, 0, 0, + -6, 1, 0, 0, 86, 0, 0, 2, 3, 4, + 5, 6, 7, 8, 9, 0, 86, 0, 0, 245, + 10, 0, 11, 12, 13, 0, 0, 14, 15, 16, + 0, 0, 0, 0, 17, 18, 19, 254, 0, 20, + 0, 0, 0, 21, 22, 0, 0, 0, 0, 0, + 0, 0, 0, 23, 0, 0, 0, 24, 0, 0, + 0, 25, 26, 0, 0, 0, -6, 27, 2, 3, + 4, 5, 6, 7, 8, 9, 0, 0, 0, 0, + 0, 10, 0, 11, 12, 13, 0, 0, 14, 15, + 16, 0, 0, 0, 0, 17, 18, 19, 0, 0, + 20, 87, 88, 0, 21, 22, 89, 90, 91, 0, + 92, 93, 94, 0, 23, 0, 0, 0, 24, 97, + 98, 0, 25, 26, 0, 99, 100, 101, 27, 2, + 3, 4, 5, 6, 7, 43, 9, 0, 0, 0, + 0, 0, 10, 0, 11, 12, 13, 0, 0, 0, + 15, 16, 0, 0, 0, 0, 17, 18, 19, 0, + 0, 20, 0, 0, 0, 2, 3, 4, 5, 6, + 7, 43, 9, 0, 0, 23, 0, 0, 10, 24, + 11, 12, 13, 25, 26, 0, 15, 16, 80, 27, + 0, 0, 17, 18, 19, 0, 0, 20, 0, 0, + 0, 2, 3, 4, 5, 6, 7, 43, 9, 0, + 0, 23, 0, 0, 10, 24, 11, 12, 0, 25, + 26, 0, 15, 16, 0, 27, 0, 0, 17, 0, + 19, 2, 3, 4, 5, 6, 7, 43, 9, 0, + 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, + 0, 24, 0, 0, 0, 25, 26, 0, 44, 0, + 19, 27, 0, 2, 3, 4, 5, 6, 7, 43, + 9, 0, 0, 0, 0, 0, 0, 23, 0, 0, + 0, 24, 0, 0, 0, 25, 26, 0, 0, 0, + 44, 27, 19, 0, 0, 117, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, + 0, 0, 0, 24, 0, 87, 88, 25, 26, 0, + 89, 90, 91, 84, 92, 93, 94, 0, 0, 0, + 162, 95, 96, 97, 98, 0, 0, 87, 88, 99, + 100, 101, 89, 90, 91, 0, 92, 93, 94, 0, + 0, 0, 163, 95, 96, 97, 98, 0, 0, 87, + 88, 99, 100, 101, 89, 90, 91, 0, 92, 93, + 94, 0, 126, 127, 0, 95, 96, 97, 98, 0, + 0, 87, 88, 99, 100, 101, 89, 90, 91, 0, + 92, 93, 94, 0, 0, 0, 135, 95, 96, 97, + 98, 0, 0, 0, 128, 99, 100, 101, 87, 88, + 0, 0, 0, 89, 90, 91, 0, 92, 93, 94, + 0, 0, 0, 0, 95, 96, 97, 98, 0, 0, + 0, 128, 99, 100, 101, 87, 88, 0, 0, 0, + 89, 90, 91, 0, 92, 93, 94, 0, 0, 0, + 135, 95, 96, 97, 98, 0, 0, 87, 88, 99, + 100, 101, 89, 90, 91, 0, 92, 93, 94, 0, + 0, 0, 0, 95, 96, 97, 98, 0, 0, -60, + -60, 99, 100, 101, -60, -60, -60, 0, -60, -60, + -60, 0, 0, 0, 0, 0, 0, -60, -60, 0, + 0, 48, 0, -60, -60, -60 }; static const yytype_int16 yycheck[] = { - 0, 8, 27, 80, 170, 82, 203, 64, 4, 0, - 178, 19, 18, 181, 182, 18, 19, 0, 16, 0, - 217, 17, 38, 191, 38, 14, 0, 23, 24, 25, - 26, 199, 21, 206, 42, 65, 42, 14, 206, 35, - 38, 30, 58, 169, 58, 218, 214, 43, 216, 217, - 46, 47, 48, 64, 30, 221, 32, 225, 13, 70, - 13, 64, 38, 231, 13, 233, 13, 13, 8, 9, - 196, 197, 68, 13, 200, 241, 202, 40, 41, 79, - 248, 64, 250, 64, 80, 81, 82, 213, 79, 85, - 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 79, 131, 66, 115, 13, - 66, 70, 70, 239, 70, 47, 48, 124, 14, 58, - 65, 14, 118, 119, 131, 121, 122, 123, 21, 65, - 14, 208, 30, 26, 37, 13, 132, 30, 31, 32, - 33, 70, 37, 220, 13, 38, 25, 14, 14, 174, - 14, 13, 177, 30, 150, 66, 66, 64, 13, 13, - 13, 70, 38, 19, 160, 161, 45, 46, 42, 18, - 35, 50, 51, 52, 24, 54, 55, 56, 57, 37, - 59, 60, 61, 62, 180, 192, 45, 46, 67, 68, - 69, 50, 51, 52, 190, 54, 55, 56, 205, 19, - 59, 60, 61, 62, 19, 19, 0, 1, 67, 68, - 69, 37, 208, 7, 8, 9, 10, 11, 12, 13, - 14, 19, 35, 24, 220, 232, 20, 24, 22, 23, - 24, 35, 79, 27, 28, 29, 193, 217, 59, 165, - 34, 35, 36, 243, 186, 39, -1, -1, -1, 43, - 44, -1, -1, -1, -1, -1, -1, -1, -1, 53, - -1, -1, -1, -1, -1, 59, 60, -1, -1, -1, - 64, 65, 7, 8, 9, 10, 11, 12, 13, 14, - -1, -1, -1, -1, -1, 20, -1, 22, 23, 24, - -1, -1, 27, 28, 29, -1, -1, -1, -1, 34, - 35, 36, -1, -1, 39, 45, 46, -1, 43, 44, - 50, 51, 52, -1, 54, 55, 56, 57, 53, 59, - 60, 61, 62, -1, 59, 60, 66, 67, 68, 69, - 65, 7, 8, 9, 10, 11, 12, 13, 14, -1, - -1, -1, -1, -1, 20, -1, 22, 23, 24, -1, - -1, -1, 28, 29, -1, -1, -1, -1, 34, 35, - 36, -1, -1, 39, -1, 7, 8, 9, 10, 11, - 12, 13, 14, -1, -1, -1, -1, 53, 20, -1, - 22, 23, 24, 59, 60, -1, 28, 29, 64, 65, - -1, -1, 34, 35, 36, -1, -1, 39, -1, 7, + 0, 8, 28, 82, 174, 84, 4, 0, 173, 18, + 0, 0, 18, 19, 19, 14, 207, 66, 38, 17, + 38, 16, 21, 0, 67, 23, 24, 25, 26, 27, + 221, 30, 210, 42, 14, 200, 201, 42, 36, 204, + 60, 206, 60, 38, 222, 30, 44, 32, 13, 47, + 48, 49, 217, 38, 13, 225, 66, 68, 8, 9, + 66, 72, 72, 13, 68, 40, 41, 13, 72, 48, + 49, 69, 13, 13, 60, 245, 66, 66, 243, 13, + 67, 81, 14, 67, 82, 83, 84, 14, 81, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 81, 72, 45, 46, 134, 116, + 30, 50, 51, 52, 13, 54, 55, 56, 125, 37, + 37, 119, 120, 72, 122, 123, 124, 134, 126, 127, + 69, 70, 71, 212, 13, 182, 14, 135, 185, 186, + 14, 14, 30, 13, 68, 224, 68, 66, 195, 13, + 13, 38, 178, 19, 152, 181, 203, 72, 13, 35, + 14, 18, 24, 210, 162, 163, 37, 21, 19, 19, + 42, 218, 26, 220, 221, 19, 30, 31, 32, 33, + 19, 37, 229, 35, 38, 81, 184, 24, 235, 196, + 237, 24, 35, 221, 197, 60, 194, 167, 190, -1, + -1, -1, 209, -1, -1, 252, -1, 254, -1, -1, + 0, 1, -1, -1, 212, -1, -1, 7, 8, 9, + 10, 11, 12, 13, 14, -1, 224, -1, -1, 236, + 20, -1, 22, 23, 24, -1, -1, 27, 28, 29, + -1, -1, -1, -1, 34, 35, 36, 247, -1, 39, + -1, -1, -1, 43, 44, -1, -1, -1, -1, -1, + -1, -1, -1, 53, -1, -1, -1, 57, -1, -1, + -1, 61, 62, -1, -1, -1, 66, 67, 7, 8, + 9, 10, 11, 12, 13, 14, -1, -1, -1, -1, + -1, 20, -1, 22, 23, 24, -1, -1, 27, 28, + 29, -1, -1, -1, -1, 34, 35, 36, -1, -1, + 39, 45, 46, -1, 43, 44, 50, 51, 52, -1, + 54, 55, 56, -1, 53, -1, -1, -1, 57, 63, + 64, -1, 61, 62, -1, 69, 70, 71, 67, 7, 8, 9, 10, 11, 12, 13, 14, -1, -1, -1, - -1, 53, 20, -1, 22, 23, -1, 59, 60, -1, - 28, 29, -1, 65, -1, -1, 34, -1, 36, 7, - 8, 9, 10, 11, 12, 13, 14, 7, 8, 9, - 10, 11, 12, 13, 14, 53, -1, -1, -1, -1, - -1, 59, 60, -1, -1, -1, 34, 65, 36, -1, - -1, -1, -1, -1, 34, -1, 36, -1, -1, -1, - -1, -1, -1, -1, -1, 53, -1, -1, -1, -1, - -1, 59, 60, 53, 38, -1, -1, 65, -1, 59, - 60, 45, 46, -1, -1, 65, 50, 51, 52, -1, - 54, 55, 56, 57, 58, 59, 60, 61, 62, -1, - -1, 45, 46, 67, 68, 69, 50, 51, 52, -1, - 54, 55, 56, 57, 58, 59, 60, 61, 62, -1, - -1, -1, 66, 67, 68, 69, 45, 46, -1, -1, - -1, 50, 51, 52, -1, 54, 55, 56, 57, 58, - 59, 60, 61, 62, -1, -1, 45, 46, 67, 68, - 69, 50, 51, 52, -1, 54, 55, 56, 57, -1, - 59, 60, 61, 62, -1, -1, 45, 46, 67, 68, - 69, 50, 51, 52, -1, 54, 55, 56, 57, -1, - -1, -1, 61, 62, -1, -1, 65, -1, 67, 68, - 69, 45, 46, -1, -1, -1, 50, 51, 52, -1, - 54, 55, 56, -1, -1, -1, -1, 61, 62, -1, - -1, 45, 46, 67, 68, 69, 50, 51, 52, -1, - 54, 55, 56, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 67, 68, 69 + -1, -1, 20, -1, 22, 23, 24, -1, -1, -1, + 28, 29, -1, -1, -1, -1, 34, 35, 36, -1, + -1, 39, -1, -1, -1, 7, 8, 9, 10, 11, + 12, 13, 14, -1, -1, 53, -1, -1, 20, 57, + 22, 23, 24, 61, 62, -1, 28, 29, 66, 67, + -1, -1, 34, 35, 36, -1, -1, 39, -1, -1, + -1, 7, 8, 9, 10, 11, 12, 13, 14, -1, + -1, 53, -1, -1, 20, 57, 22, 23, -1, 61, + 62, -1, 28, 29, -1, 67, -1, -1, 34, -1, + 36, 7, 8, 9, 10, 11, 12, 13, 14, -1, + -1, -1, -1, -1, -1, -1, -1, 53, -1, -1, + -1, 57, -1, -1, -1, 61, 62, -1, 34, -1, + 36, 67, -1, 7, 8, 9, 10, 11, 12, 13, + 14, -1, -1, -1, -1, -1, -1, 53, -1, -1, + -1, 57, -1, -1, -1, 61, 62, -1, -1, -1, + 34, 67, 36, -1, -1, 25, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 53, + -1, -1, -1, 57, -1, 45, 46, 61, 62, -1, + 50, 51, 52, 67, 54, 55, 56, -1, -1, -1, + 38, 61, 62, 63, 64, -1, -1, 45, 46, 69, + 70, 71, 50, 51, 52, -1, 54, 55, 56, -1, + -1, -1, 60, 61, 62, 63, 64, -1, -1, 45, + 46, 69, 70, 71, 50, 51, 52, -1, 54, 55, + 56, -1, 58, 59, -1, 61, 62, 63, 64, -1, + -1, 45, 46, 69, 70, 71, 50, 51, 52, -1, + 54, 55, 56, -1, -1, -1, 60, 61, 62, 63, + 64, -1, -1, -1, 68, 69, 70, 71, 45, 46, + -1, -1, -1, 50, 51, 52, -1, 54, 55, 56, + -1, -1, -1, -1, 61, 62, 63, 64, -1, -1, + -1, 68, 69, 70, 71, 45, 46, -1, -1, -1, + 50, 51, 52, -1, 54, 55, 56, -1, -1, -1, + 60, 61, 62, 63, 64, -1, -1, 45, 46, 69, + 70, 71, 50, 51, 52, -1, 54, 55, 56, -1, + -1, -1, -1, 61, 62, 63, 64, -1, -1, 45, + 46, 69, 70, 71, 50, 51, 52, -1, 54, 55, + 56, -1, -1, -1, -1, -1, -1, 63, 64, -1, + -1, 67, -1, 69, 70, 71 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -911,30 +931,30 @@ static const yytype_uint8 yystos[] = { 0, 1, 7, 8, 9, 10, 11, 12, 13, 14, 20, 22, 23, 24, 27, 28, 29, 34, 35, 36, - 39, 43, 44, 53, 59, 60, 65, 72, 74, 75, - 76, 77, 78, 85, 86, 87, 92, 93, 95, 98, - 103, 64, 13, 34, 75, 92, 65, 65, 89, 13, - 94, 14, 21, 26, 30, 31, 32, 33, 38, 96, - 97, 13, 14, 13, 92, 40, 41, 8, 9, 13, - 13, 13, 13, 92, 92, 92, 92, 0, 64, 73, - 65, 58, 65, 84, 92, 45, 46, 50, 51, 52, - 54, 55, 56, 57, 59, 60, 61, 62, 67, 68, - 69, 92, 92, 104, 104, 104, 70, 14, 14, 30, - 14, 21, 30, 38, 97, 99, 25, 13, 38, 58, - 92, 38, 58, 37, 100, 66, 74, 84, 92, 84, - 92, 37, 58, 92, 92, 92, 92, 92, 92, 92, - 92, 92, 92, 92, 92, 92, 92, 92, 92, 66, - 70, 66, 13, 14, 14, 14, 89, 13, 92, 92, - 38, 58, 92, 92, 92, 89, 66, 90, 66, 73, - 89, 92, 92, 13, 101, 92, 92, 101, 91, 16, - 38, 91, 76, 93, 70, 73, 73, 73, 77, 90, - 38, 92, 90, 90, 13, 70, 102, 102, 19, 92, - 90, 19, 42, 89, 18, 42, 81, 82, 88, 13, - 91, 91, 35, 90, 91, 24, 91, 80, 81, 83, - 88, 89, 82, 90, 84, 91, 90, 90, 83, 90, - 84, 76, 42, 79, 37, 90, 19, 19, 19, 37, - 90, 89, 90, 89, 19, 35, 24, 24, 91, 76, - 77, 35, 90, 90 + 39, 43, 44, 53, 57, 61, 62, 67, 74, 76, + 77, 78, 79, 80, 87, 88, 89, 94, 95, 97, + 100, 105, 66, 13, 34, 77, 94, 67, 67, 91, + 13, 96, 14, 21, 26, 30, 31, 32, 33, 38, + 98, 99, 13, 14, 13, 94, 40, 41, 8, 9, + 13, 13, 13, 13, 94, 94, 94, 94, 94, 0, + 66, 75, 67, 60, 67, 86, 94, 45, 46, 50, + 51, 52, 54, 55, 56, 61, 62, 63, 64, 69, + 70, 71, 94, 94, 106, 106, 106, 72, 14, 14, + 30, 14, 21, 30, 38, 99, 101, 25, 13, 38, + 60, 94, 38, 60, 37, 102, 58, 59, 68, 76, + 86, 94, 86, 94, 37, 60, 94, 94, 94, 94, + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, + 94, 68, 72, 68, 13, 14, 14, 14, 91, 13, + 94, 94, 38, 60, 94, 94, 94, 91, 94, 94, + 68, 92, 68, 75, 91, 94, 94, 13, 103, 94, + 94, 103, 93, 16, 38, 93, 78, 95, 72, 75, + 75, 75, 79, 92, 38, 94, 92, 92, 13, 72, + 104, 104, 19, 94, 92, 19, 42, 91, 18, 42, + 83, 84, 90, 13, 93, 93, 35, 92, 93, 24, + 93, 82, 83, 85, 90, 91, 84, 92, 86, 93, + 92, 92, 85, 92, 86, 78, 42, 81, 37, 92, + 19, 19, 19, 37, 92, 91, 92, 91, 19, 35, + 24, 24, 93, 78, 79, 35, 92, 92 }; #define yyerrok (yyerrstatus = 0) @@ -1749,12 +1769,12 @@ yyreduce: switch (yyn) { case 4: -#line 104 "engines/director/lingo/lingo-gr.y" +#line 103 "engines/director/lingo/lingo-gr.y" { yyerrok; ;} break; case 5: -#line 107 "engines/director/lingo/lingo-gr.y" +#line 106 "engines/director/lingo/lingo-gr.y" { g_lingo->_linenumber++; g_lingo->_colnumber = 1; @@ -1762,12 +1782,12 @@ yyreduce: break; case 10: -#line 116 "engines/director/lingo/lingo-gr.y" +#line 115 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_xpop); ;} break; case 12: -#line 120 "engines/director/lingo/lingo-gr.y" +#line 119 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_varpush); g_lingo->codeString((yyvsp[(4) - (4)].s)->c_str()); @@ -1777,7 +1797,7 @@ yyreduce: break; case 13: -#line 126 "engines/director/lingo/lingo-gr.y" +#line 125 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_varpush); g_lingo->codeString((yyvsp[(2) - (4)].s)->c_str()); @@ -1787,7 +1807,7 @@ yyreduce: break; case 14: -#line 132 "engines/director/lingo/lingo-gr.y" +#line 131 "engines/director/lingo/lingo-gr.y" { g_lingo->code2(g_lingo->c_constpush, 0); // Put dummy id g_lingo->code1(g_lingo->c_theentityassign); @@ -1799,7 +1819,7 @@ yyreduce: break; case 15: -#line 140 "engines/director/lingo/lingo-gr.y" +#line 139 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_swap); g_lingo->code1(g_lingo->c_theentityassign); @@ -1811,7 +1831,7 @@ yyreduce: break; case 16: -#line 148 "engines/director/lingo/lingo-gr.y" +#line 147 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_varpush); g_lingo->codeString((yyvsp[(2) - (4)].s)->c_str()); @@ -1821,7 +1841,7 @@ yyreduce: break; case 17: -#line 154 "engines/director/lingo/lingo-gr.y" +#line 153 "engines/director/lingo/lingo-gr.y" { g_lingo->code2(g_lingo->c_constpush, 0); // Put dummy id g_lingo->code1(g_lingo->c_theentityassign); @@ -1833,7 +1853,7 @@ yyreduce: break; case 18: -#line 162 "engines/director/lingo/lingo-gr.y" +#line 161 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_swap); g_lingo->code1(g_lingo->c_theentityassign); @@ -1845,12 +1865,12 @@ yyreduce: break; case 19: -#line 171 "engines/director/lingo/lingo-gr.y" +#line 170 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_xpop); ;} break; case 23: -#line 180 "engines/director/lingo/lingo-gr.y" +#line 179 "engines/director/lingo/lingo-gr.y" { inst body = 0, end = 0; WRITE_UINT32(&body, (yyvsp[(5) - (8)].code)); @@ -1860,7 +1880,7 @@ yyreduce: break; case 24: -#line 191 "engines/director/lingo/lingo-gr.y" +#line 190 "engines/director/lingo/lingo-gr.y" { inst init = 0, finish = 0, body = 0, end = 0, inc = 0; WRITE_UINT32(&init, (yyvsp[(3) - (11)].code)); @@ -1876,7 +1896,7 @@ yyreduce: break; case 25: -#line 207 "engines/director/lingo/lingo-gr.y" +#line 206 "engines/director/lingo/lingo-gr.y" { inst init = 0, finish = 0, body = 0, end = 0, inc = 0; WRITE_UINT32(&init, (yyvsp[(3) - (12)].code)); @@ -1892,14 +1912,14 @@ yyreduce: break; case 26: -#line 219 "engines/director/lingo/lingo-gr.y" +#line 218 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_ifcode); ;} break; case 27: -#line 224 "engines/director/lingo/lingo-gr.y" +#line 223 "engines/director/lingo/lingo-gr.y" { inst then = 0, end = 0; WRITE_UINT32(&then, (yyvsp[(5) - (8)].code)); @@ -1910,7 +1930,7 @@ yyreduce: break; case 28: -#line 231 "engines/director/lingo/lingo-gr.y" +#line 230 "engines/director/lingo/lingo-gr.y" { inst then = 0, else1 = 0, end = 0; WRITE_UINT32(&then, (yyvsp[(5) - (11)].code)); @@ -1923,7 +1943,7 @@ yyreduce: break; case 29: -#line 240 "engines/director/lingo/lingo-gr.y" +#line 239 "engines/director/lingo/lingo-gr.y" { inst then = 0, else1 = 0, end = 0; WRITE_UINT32(&then, (yyvsp[(5) - (11)].code)); @@ -1936,7 +1956,7 @@ yyreduce: break; case 30: -#line 249 "engines/director/lingo/lingo-gr.y" +#line 248 "engines/director/lingo/lingo-gr.y" { inst then = 0, else1 = 0, end = 0; WRITE_UINT32(&then, (yyvsp[(4) - (6)].code)); @@ -1950,7 +1970,7 @@ yyreduce: break; case 31: -#line 259 "engines/director/lingo/lingo-gr.y" +#line 258 "engines/director/lingo/lingo-gr.y" { inst then = 0, else1 = 0, end = 0; WRITE_UINT32(&then, (yyvsp[(4) - (10)].code)); @@ -1964,7 +1984,7 @@ yyreduce: break; case 32: -#line 269 "engines/director/lingo/lingo-gr.y" +#line 268 "engines/director/lingo/lingo-gr.y" { inst then = 0, else1 = 0, end = 0; WRITE_UINT32(&then, (yyvsp[(4) - (10)].code)); @@ -1978,17 +1998,17 @@ yyreduce: break; case 33: -#line 280 "engines/director/lingo/lingo-gr.y" +#line 279 "engines/director/lingo/lingo-gr.y" { (yyval.code) = 0; ;} break; case 34: -#line 281 "engines/director/lingo/lingo-gr.y" +#line 280 "engines/director/lingo/lingo-gr.y" { (yyval.code) = (yyvsp[(2) - (3)].code); ;} break; case 39: -#line 292 "engines/director/lingo/lingo-gr.y" +#line 291 "engines/director/lingo/lingo-gr.y" { inst then = 0; WRITE_UINT32(&then, (yyvsp[(4) - (6)].code)); @@ -1998,7 +2018,7 @@ yyreduce: break; case 41: -#line 301 "engines/director/lingo/lingo-gr.y" +#line 300 "engines/director/lingo/lingo-gr.y" { inst then = 0; WRITE_UINT32(&then, (yyvsp[(4) - (5)].code)); @@ -2008,22 +2028,22 @@ yyreduce: break; case 42: -#line 309 "engines/director/lingo/lingo-gr.y" +#line 308 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(STOP); ;} break; case 43: -#line 310 "engines/director/lingo/lingo-gr.y" +#line 309 "engines/director/lingo/lingo-gr.y" { g_lingo->code2(g_lingo->c_eq, STOP); ;} break; case 45: -#line 313 "engines/director/lingo/lingo-gr.y" +#line 312 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code3(g_lingo->c_repeatwhilecode, STOP, STOP); ;} break; case 46: -#line 315 "engines/director/lingo/lingo-gr.y" +#line 314 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code3(g_lingo->c_repeatwithcode, STOP, STOP); g_lingo->code3(STOP, STOP, STOP); @@ -2032,7 +2052,7 @@ yyreduce: break; case 47: -#line 321 "engines/director/lingo/lingo-gr.y" +#line 320 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code1(g_lingo->c_ifcode); g_lingo->code3(STOP, STOP, STOP); @@ -2041,7 +2061,7 @@ yyreduce: break; case 48: -#line 327 "engines/director/lingo/lingo-gr.y" +#line 326 "engines/director/lingo/lingo-gr.y" { inst skipEnd; WRITE_UINT32(&skipEnd, 1); // We have to skip end to avoid multiple executions @@ -2051,22 +2071,22 @@ yyreduce: break; case 49: -#line 334 "engines/director/lingo/lingo-gr.y" +#line 333 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->_currentScript->size(); ;} break; case 50: -#line 336 "engines/director/lingo/lingo-gr.y" +#line 335 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(STOP); (yyval.code) = g_lingo->_currentScript->size(); ;} break; case 51: -#line 338 "engines/director/lingo/lingo-gr.y" +#line 337 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->_currentScript->size(); ;} break; case 54: -#line 343 "engines/director/lingo/lingo-gr.y" +#line 342 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code1(g_lingo->c_constpush); inst i = 0; @@ -2075,21 +2095,21 @@ yyreduce: break; case 55: -#line 348 "engines/director/lingo/lingo-gr.y" +#line 347 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code1(g_lingo->c_fconstpush); g_lingo->codeFloat((yyvsp[(1) - (1)].f)); ;} break; case 56: -#line 351 "engines/director/lingo/lingo-gr.y" +#line 350 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code1(g_lingo->c_stringpush); g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); ;} break; case 57: -#line 354 "engines/director/lingo/lingo-gr.y" +#line 353 "engines/director/lingo/lingo-gr.y" { if ((yyvsp[(3) - (4)].narg) != g_lingo->_builtins[*(yyvsp[(1) - (4)].s)]->nargs) error("Built-in function %s expects %d arguments but got %d", (yyvsp[(1) - (4)].s)->c_str(), g_lingo->_builtins[*(yyvsp[(1) - (4)].s)]->nargs, (yyvsp[(3) - (4)].narg)); @@ -2099,14 +2119,14 @@ yyreduce: break; case 58: -#line 360 "engines/director/lingo/lingo-gr.y" +#line 359 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code1(g_lingo->_builtins[*(yyvsp[(1) - (1)].s)]->func); delete (yyvsp[(1) - (1)].s); ;} break; case 59: -#line 363 "engines/director/lingo/lingo-gr.y" +#line 362 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code1(g_lingo->c_call); g_lingo->codeString((yyvsp[(1) - (4)].s)->c_str()); @@ -2118,14 +2138,14 @@ yyreduce: break; case 60: -#line 371 "engines/director/lingo/lingo-gr.y" +#line 370 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->codeId(*(yyvsp[(1) - (1)].s)); delete (yyvsp[(1) - (1)].s); ;} break; case 61: -#line 374 "engines/director/lingo/lingo-gr.y" +#line 373 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code2(g_lingo->c_constpush, 0); // Put dummy id g_lingo->code1(g_lingo->c_theentitypush); @@ -2136,7 +2156,7 @@ yyreduce: break; case 62: -#line 381 "engines/director/lingo/lingo-gr.y" +#line 380 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code1(g_lingo->c_theentitypush); inst e = 0, f = 0; @@ -2146,152 +2166,157 @@ yyreduce: break; case 64: -#line 388 "engines/director/lingo/lingo-gr.y" +#line 387 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_add); ;} break; case 65: -#line 389 "engines/director/lingo/lingo-gr.y" +#line 388 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_sub); ;} break; case 66: -#line 390 "engines/director/lingo/lingo-gr.y" +#line 389 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_mul); ;} break; case 67: -#line 391 "engines/director/lingo/lingo-gr.y" +#line 390 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_div); ;} break; case 68: -#line 392 "engines/director/lingo/lingo-gr.y" +#line 391 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_gt); ;} break; case 69: -#line 393 "engines/director/lingo/lingo-gr.y" +#line 392 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_lt); ;} break; case 70: -#line 394 "engines/director/lingo/lingo-gr.y" +#line 393 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_neq); ;} break; case 71: -#line 395 "engines/director/lingo/lingo-gr.y" +#line 394 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_ge); ;} break; case 72: -#line 396 "engines/director/lingo/lingo-gr.y" +#line 395 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_le); ;} break; case 73: -#line 397 "engines/director/lingo/lingo-gr.y" +#line 396 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_and); ;} break; case 74: -#line 398 "engines/director/lingo/lingo-gr.y" +#line 397 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_or); ;} break; case 75: -#line 399 "engines/director/lingo/lingo-gr.y" +#line 398 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_not); ;} break; case 76: -#line 400 "engines/director/lingo/lingo-gr.y" +#line 399 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_ampersand); ;} break; case 77: -#line 401 "engines/director/lingo/lingo-gr.y" +#line 400 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_concat); ;} break; case 78: -#line 402 "engines/director/lingo/lingo-gr.y" +#line 401 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_contains); ;} break; case 79: -#line 403 "engines/director/lingo/lingo-gr.y" +#line 402 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_starts); ;} break; case 80: -#line 404 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_intersects); ;} +#line 403 "engines/director/lingo/lingo-gr.y" + { (yyval.code) = (yyvsp[(2) - (2)].code); ;} break; case 81: -#line 405 "engines/director/lingo/lingo-gr.y" - { (yyval.code) = (yyvsp[(2) - (2)].code); ;} +#line 404 "engines/director/lingo/lingo-gr.y" + { (yyval.code) = (yyvsp[(2) - (2)].code); g_lingo->code1(g_lingo->c_negate); ;} break; case 82: -#line 406 "engines/director/lingo/lingo-gr.y" - { (yyval.code) = (yyvsp[(2) - (2)].code); g_lingo->code1(g_lingo->c_negate); ;} +#line 405 "engines/director/lingo/lingo-gr.y" + { (yyval.code) = (yyvsp[(2) - (3)].code); ;} break; case 83: -#line 407 "engines/director/lingo/lingo-gr.y" - { (yyval.code) = (yyvsp[(2) - (3)].code); ;} +#line 406 "engines/director/lingo/lingo-gr.y" + { g_lingo->code1(g_lingo->c_intersects); ;} break; case 84: +#line 407 "engines/director/lingo/lingo-gr.y" + { g_lingo->code1(g_lingo->c_within); ;} + break; + + case 85: #line 410 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_mci); g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str()); delete (yyvsp[(2) - (2)].s); ;} break; - case 85: + case 86: #line 411 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_mciwait); g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str()); delete (yyvsp[(2) - (2)].s); ;} break; - case 86: + case 87: #line 412 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_printtop); ;} break; - case 88: + case 89: #line 414 "engines/director/lingo/lingo-gr.y" { g_lingo->code2(g_lingo->c_constpush, (inst)0); // Push fake value on stack g_lingo->code1(g_lingo->c_procret); ;} break; - case 90: + case 91: #line 419 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_global); g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); delete (yyvsp[(1) - (1)].s); ;} break; - case 91: + case 92: #line 420 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_global); g_lingo->codeString((yyvsp[(3) - (3)].s)->c_str()); delete (yyvsp[(3) - (3)].s); ;} break; - case 92: + case 93: #line 431 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_gotoloop); ;} break; - case 93: + case 94: #line 432 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_gotonext); ;} break; - case 94: + case 95: #line 433 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_gotoprevious); ;} break; - case 95: + case 96: #line 434 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_goto); @@ -2300,7 +2325,7 @@ yyreduce: delete (yyvsp[(2) - (2)].s); ;} break; - case 96: + case 97: #line 439 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_goto); @@ -2310,7 +2335,7 @@ yyreduce: delete (yyvsp[(3) - (3)].s); ;} break; - case 97: + case 98: #line 445 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_goto); @@ -2319,47 +2344,47 @@ yyreduce: delete (yyvsp[(2) - (2)].s); ;} break; - case 98: + case 99: #line 452 "engines/director/lingo/lingo-gr.y" { (yyval.s) = (yyvsp[(3) - (3)].s); ;} break; - case 99: + case 100: #line 453 "engines/director/lingo/lingo-gr.y" { (yyval.s) = (yyvsp[(2) - (2)].s); ;} break; - case 100: + case 101: #line 454 "engines/director/lingo/lingo-gr.y" { (yyval.s) = (yyvsp[(2) - (2)].s); ;} break; - case 101: + case 102: #line 455 "engines/director/lingo/lingo-gr.y" { (yyval.s) = (yyvsp[(1) - (1)].s); ;} break; - case 102: + case 103: #line 458 "engines/director/lingo/lingo-gr.y" { (yyval.s) = (yyvsp[(3) - (3)].s); ;} break; - case 103: + case 104: #line 459 "engines/director/lingo/lingo-gr.y" { (yyval.s) = (yyvsp[(2) - (2)].s); ;} break; - case 104: + case 105: #line 460 "engines/director/lingo/lingo-gr.y" { (yyval.s) = (yyvsp[(3) - (3)].s); ;} break; - case 105: + case 106: #line 488 "engines/director/lingo/lingo-gr.y" { g_lingo->_indef = true; ;} break; - case 106: + case 107: #line 489 "engines/director/lingo/lingo-gr.y" { g_lingo->code2(g_lingo->c_constpush, (inst)0); // Push fake value on stack @@ -2368,19 +2393,19 @@ yyreduce: g_lingo->_indef = false; ;} break; - case 107: + case 108: #line 494 "engines/director/lingo/lingo-gr.y" { g_lingo->codeFactory(*(yyvsp[(2) - (2)].s)); ;} break; - case 108: + case 109: #line 497 "engines/director/lingo/lingo-gr.y" { g_lingo->_indef = true; ;} break; - case 109: + case 110: #line 498 "engines/director/lingo/lingo-gr.y" { g_lingo->code2(g_lingo->c_constpush, (inst)0); // Push fake value on stack @@ -2389,32 +2414,32 @@ yyreduce: g_lingo->_indef = false; ;} break; - case 110: + case 111: #line 503 "engines/director/lingo/lingo-gr.y" { (yyval.narg) = 0; ;} break; - case 111: + case 112: #line 504 "engines/director/lingo/lingo-gr.y" { g_lingo->codeArg((yyvsp[(1) - (1)].s)); (yyval.narg) = 1; ;} break; - case 112: + case 113: #line 505 "engines/director/lingo/lingo-gr.y" { g_lingo->codeArg((yyvsp[(3) - (3)].s)); (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;} break; - case 113: + case 114: #line 506 "engines/director/lingo/lingo-gr.y" { g_lingo->codeArg((yyvsp[(4) - (4)].s)); (yyval.narg) = (yyvsp[(1) - (4)].narg) + 1; ;} break; - case 114: + case 115: #line 508 "engines/director/lingo/lingo-gr.y" { g_lingo->codeArgStore(); ;} break; - case 115: + case 116: #line 512 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_call); @@ -2424,24 +2449,24 @@ yyreduce: g_lingo->code1(numpar); ;} break; - case 116: + case 117: #line 520 "engines/director/lingo/lingo-gr.y" { (yyval.narg) = 0; ;} break; - case 117: + case 118: #line 521 "engines/director/lingo/lingo-gr.y" { (yyval.narg) = 1; ;} break; - case 118: + case 119: #line 522 "engines/director/lingo/lingo-gr.y" { (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;} break; /* Line 1267 of yacc.c. */ -#line 2445 "engines/director/lingo/lingo-gr.cpp" +#line 2470 "engines/director/lingo/lingo-gr.cpp" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); diff --git a/engines/director/lingo/lingo-gr.h b/engines/director/lingo/lingo-gr.h index 425c5745ad..5044eacf7d 100644 --- a/engines/director/lingo/lingo-gr.h +++ b/engines/director/lingo/lingo-gr.h @@ -93,7 +93,9 @@ tCONCAT = 309, tCONTAINS = 310, tSTARTS = 311, - tINTERSECTS = 312 + tSPRITE = 312, + tINTERSECTS = 313, + tWITHIN = 314 }; #endif /* Tokens. */ @@ -151,7 +153,9 @@ #define tCONCAT 309 #define tCONTAINS 310 #define tSTARTS 311 -#define tINTERSECTS 312 +#define tSPRITE 312 +#define tINTERSECTS 313 +#define tWITHIN 314 @@ -168,7 +172,7 @@ typedef union YYSTYPE int narg; /* number of arguments */ } /* Line 1529 of yacc.c. */ -#line 172 "engines/director/lingo/lingo-gr.hpp" +#line 176 "engines/director/lingo/lingo-gr.hpp" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y index f949544f3e..033b7dd2ea 100644 --- a/engines/director/lingo/lingo-gr.y +++ b/engines/director/lingo/lingo-gr.y @@ -85,14 +85,13 @@ void yyerror(char *s) { %token tWITH tWHILE tNLELSE tFACTORY tMETHOD %token tGE tLE tGT tLT tEQ tNEQ tAND tOR tNOT %token tCONCAT tCONTAINS tSTARTS -%token tINTERSECTS +%token tSPRITE tINTERSECTS tWITHIN %type<code> asgn begin elseif elsestmtoneliner end expr if repeatwhile repeatwith stmtlist %type<s> gotoframe gotomovie %type<narg> argdef arglist %right '=' -%left tINTERSECTS %left '+' '-' %left '*' '/' '%' %right UNARY @@ -401,10 +400,11 @@ expr: INT { | expr tCONCAT expr { g_lingo->code1(g_lingo->c_concat); } | expr tCONTAINS expr { g_lingo->code1(g_lingo->c_contains); } | expr tSTARTS expr { g_lingo->code1(g_lingo->c_starts); } - | expr tINTERSECTS expr { g_lingo->code1(g_lingo->c_intersects); } | '+' expr %prec UNARY { $$ = $2; } | '-' expr %prec UNARY { $$ = $2; g_lingo->code1(g_lingo->c_negate); } | '(' expr ')' { $$ = $2; } + | tSPRITE expr tINTERSECTS expr { g_lingo->code1(g_lingo->c_intersects); } + | tSPRITE expr tWITHIN expr { g_lingo->code1(g_lingo->c_within); } ; func: tMCI STRING { g_lingo->code1(g_lingo->c_mci); g_lingo->codeString($2->c_str()); delete $2; } diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp index 2089bf13d9..4ffa450000 100644 --- a/engines/director/lingo/lingo-lex.cpp +++ b/engines/director/lingo/lingo-lex.cpp @@ -364,8 +364,8 @@ static void yy_fatal_error (yyconst char msg[] ); *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; -#define YY_NUM_RULES 52 -#define YY_END_OF_BUFFER 53 +#define YY_NUM_RULES 54 +#define YY_END_OF_BUFFER 55 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -373,27 +373,28 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[179] = +static yyconst flex_int16_t yy_accept[186] = { 0, - 0, 0, 53, 51, 3, 49, 49, 51, 51, 48, - 48, 48, 47, 48, 48, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 2, 2, 3, 49, 0, 0, 49, 0, - 0, 50, 44, 1, 46, 47, 43, 41, 42, 45, - 45, 45, 45, 45, 45, 45, 45, 45, 45, 16, - 7, 45, 45, 45, 45, 45, 45, 45, 45, 27, - 28, 45, 45, 45, 45, 45, 45, 37, 45, 45, - 2, 2, 0, 1, 46, 4, 45, 45, 45, 11, - 45, 45, 45, 45, 45, 45, 45, 21, 45, 45, - - 45, 26, 45, 30, 45, 32, 45, 45, 45, 45, - 45, 0, 45, 6, 10, 13, 45, 45, 45, 45, - 18, 19, 45, 45, 45, 45, 25, 45, 45, 45, - 0, 36, 39, 45, 38, 9, 45, 45, 14, 45, - 45, 20, 45, 45, 24, 45, 45, 45, 35, 40, - 0, 45, 45, 15, 45, 45, 23, 45, 31, 33, - 0, 0, 45, 12, 45, 22, 45, 0, 8, 5, - 45, 29, 0, 45, 0, 17, 34, 0 + 0, 0, 55, 53, 3, 51, 51, 53, 53, 50, + 50, 50, 49, 50, 50, 47, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, + 47, 47, 2, 2, 3, 51, 0, 0, 51, 0, + 0, 52, 46, 1, 48, 49, 45, 43, 44, 47, + 47, 47, 47, 47, 47, 47, 47, 47, 47, 16, + 7, 47, 47, 47, 47, 47, 47, 47, 47, 27, + 28, 47, 47, 47, 47, 47, 47, 47, 37, 47, + 47, 2, 2, 0, 1, 48, 4, 47, 47, 47, + 11, 47, 47, 47, 47, 47, 47, 47, 21, 47, + + 47, 47, 26, 47, 30, 47, 32, 47, 47, 47, + 47, 47, 47, 0, 47, 6, 10, 13, 47, 47, + 47, 47, 18, 19, 47, 47, 47, 47, 25, 47, + 47, 47, 47, 0, 36, 41, 47, 39, 9, 47, + 47, 14, 47, 47, 20, 47, 47, 24, 47, 47, + 47, 47, 35, 42, 47, 0, 47, 47, 15, 47, + 47, 23, 47, 31, 38, 33, 0, 40, 0, 47, + 12, 47, 22, 47, 0, 8, 5, 47, 29, 0, + 47, 0, 17, 34, 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -438,55 +439,55 @@ static yyconst flex_int32_t yy_meta[61] = 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 } ; -static yyconst flex_int16_t yy_base[184] = +static yyconst flex_int16_t yy_base[191] = { 0, - 0, 59, 268, 426, 63, 67, 71, 75, 252, 426, - 224, 181, 52, 68, 132, 56, 0, 56, 57, 67, - 72, 68, 68, 69, 112, 70, 79, 103, 81, 103, - 106, 115, 139, 145, 162, 101, 166, 170, 174, 135, - 133, 426, 426, 0, 90, 163, 426, 426, 426, 0, - 112, 153, 146, 151, 166, 162, 169, 172, 163, 0, - 0, 160, 167, 171, 173, 166, 165, 164, 169, 0, - 0, 183, 174, 178, 184, 204, 206, 0, 208, 201, - 232, 242, 207, 0, 80, 0, 208, 214, 209, 0, - 210, 216, 224, 237, 238, 230, 230, 227, 232, 244, - - 237, 0, 236, 0, 253, 0, 244, 274, 248, 255, - 262, 267, 272, 0, 0, 0, 262, 269, 279, 269, - 0, 0, 272, 280, 274, 285, 0, 282, 291, 277, - 192, 0, 0, 288, 0, 312, 292, 290, 0, 296, - 295, 0, 293, 309, 0, 305, 302, 304, 336, 0, - 340, 309, 300, 0, 327, 316, 0, 317, 0, 0, - 350, 333, 330, 0, 345, 0, 334, 346, 426, 0, - 336, 0, 362, 338, 370, 0, 374, 426, 401, 403, - 409, 414, 419 + 0, 59, 210, 446, 63, 67, 71, 75, 192, 446, + 150, 148, 52, 68, 137, 56, 0, 56, 57, 67, + 72, 68, 68, 69, 112, 70, 79, 103, 81, 109, + 120, 121, 170, 174, 178, 101, 182, 186, 190, 97, + 143, 446, 446, 0, 90, 124, 446, 446, 446, 0, + 112, 110, 104, 115, 147, 167, 179, 182, 119, 0, + 0, 167, 172, 184, 179, 172, 173, 172, 179, 0, + 0, 193, 183, 187, 185, 188, 198, 200, 0, 205, + 200, 242, 254, 211, 0, 80, 0, 217, 223, 232, + 0, 221, 222, 234, 245, 243, 235, 236, 232, 246, + + 246, 242, 0, 244, 0, 260, 0, 257, 252, 279, + 261, 266, 273, 277, 283, 0, 0, 0, 272, 283, + 292, 279, 0, 0, 282, 297, 287, 294, 0, 293, + 302, 289, 292, 201, 0, 0, 299, 302, 325, 305, + 304, 0, 310, 308, 0, 320, 327, 0, 320, 318, + 327, 320, 351, 0, 327, 358, 328, 322, 0, 342, + 332, 0, 332, 0, 0, 0, 370, 0, 346, 337, + 0, 359, 0, 348, 360, 446, 0, 351, 0, 384, + 353, 390, 0, 391, 446, 421, 423, 429, 434, 439 } ; -static yyconst flex_int16_t yy_def[184] = +static yyconst flex_int16_t yy_def[191] = { 0, - 178, 1, 178, 178, 178, 178, 178, 178, 179, 178, - 178, 178, 178, 178, 178, 180, 180, 180, 180, 180, - 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, - 180, 180, 178, 178, 178, 178, 178, 178, 178, 178, - 179, 178, 178, 181, 178, 178, 178, 178, 178, 180, - 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, - 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, - 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, - 178, 178, 178, 181, 178, 180, 180, 180, 180, 180, - 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, - - 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, - 180, 178, 180, 180, 180, 180, 180, 180, 180, 180, - 180, 180, 180, 180, 180, 180, 180, 180, 180, 180, - 182, 180, 180, 180, 180, 178, 180, 180, 180, 180, - 180, 180, 180, 180, 180, 180, 180, 180, 182, 180, - 178, 180, 180, 180, 180, 180, 180, 180, 180, 180, - 178, 178, 180, 180, 180, 180, 180, 178, 178, 180, - 180, 180, 178, 180, 183, 180, 183, 0, 178, 178, - 178, 178, 178 + 185, 1, 185, 185, 185, 185, 185, 185, 186, 185, + 185, 185, 185, 185, 185, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 185, 185, 185, 185, 185, 185, 185, 185, + 186, 185, 185, 188, 185, 185, 185, 185, 185, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 185, 185, 185, 188, 185, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 185, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 187, 189, 187, 187, 187, 187, 185, 187, + 187, 187, 187, 187, 187, 187, 187, 187, 187, 187, + 187, 187, 189, 187, 187, 185, 187, 187, 187, 187, + 187, 187, 187, 187, 187, 187, 185, 187, 185, 187, + 187, 187, 187, 187, 185, 185, 187, 187, 187, 185, + 187, 190, 187, 190, 0, 185, 185, 185, 185, 185 } ; -static yyconst flex_int16_t yy_nxt[487] = +static yyconst flex_int16_t yy_nxt[507] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 4, 13, 14, 10, 15, 16, 17, 18, 19, 20, 21, @@ -497,53 +498,56 @@ static yyconst flex_int16_t yy_nxt[487] = 33, 45, 46, 34, 35, 36, 36, 37, 38, 39, 39, 38, 38, 39, 39, 38, 37, 36, 36, 37, 47, 48, 51, 52, 53, 40, 57, 61, 68, 40, - 85, 54, 59, 55, 62, 60, 63, 69, 70, 74, + 86, 54, 59, 55, 62, 60, 63, 69, 70, 74, - 85, 58, 56, 36, 36, 51, 52, 53, 71, 40, + 86, 58, 56, 36, 36, 51, 52, 53, 71, 40, 57, 61, 68, 40, 54, 59, 55, 62, 60, 63, - 69, 75, 70, 74, 58, 56, 64, 77, 65, 86, - 66, 71, 72, 78, 76, 73, 79, 80, 42, 67, - 81, 36, 36, 82, 49, 75, 82, 36, 36, 82, - 64, 77, 65, 86, 66, 72, 78, 76, 73, 83, - 79, 80, 67, 35, 36, 36, 37, 37, 36, 36, - 37, 38, 45, 46, 38, 38, 39, 39, 38, 87, - 88, 89, 83, 90, 91, 92, 93, 97, 40, 44, - 94, 95, 40, 131, 96, 98, 131, 99, 100, 101, - - 102, 103, 87, 88, 89, 104, 105, 90, 91, 92, - 93, 97, 40, 94, 95, 106, 40, 96, 107, 98, - 99, 100, 101, 102, 108, 103, 109, 115, 104, 105, - 110, 43, 111, 81, 36, 36, 82, 112, 106, 113, - 114, 116, 107, 82, 36, 36, 82, 117, 108, 118, - 109, 115, 119, 125, 110, 111, 120, 42, 122, 123, - 112, 124, 113, 114, 116, 121, 126, 178, 127, 128, - 117, 129, 118, 130, 133, 131, 119, 125, 131, 134, - 120, 122, 123, 135, 124, 136, 137, 139, 121, 138, - 126, 127, 128, 140, 143, 129, 130, 133, 141, 142, - - 132, 144, 134, 145, 146, 147, 150, 135, 148, 136, - 137, 139, 138, 151, 152, 156, 151, 140, 143, 153, - 154, 141, 142, 132, 144, 155, 157, 145, 146, 147, - 150, 148, 158, 159, 160, 163, 164, 161, 152, 156, - 161, 151, 153, 154, 151, 165, 178, 166, 155, 167, - 157, 161, 169, 178, 161, 158, 159, 160, 163, 164, - 170, 171, 162, 175, 172, 173, 175, 174, 176, 165, - 166, 175, 167, 178, 175, 178, 169, 168, 178, 178, - 178, 178, 178, 170, 178, 171, 162, 172, 178, 173, - 174, 176, 178, 178, 178, 178, 178, 178, 178, 178, - - 168, 41, 41, 178, 41, 41, 41, 50, 50, 84, - 84, 178, 178, 84, 84, 149, 178, 178, 178, 149, - 177, 178, 178, 178, 177, 3, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178 + 69, 84, 70, 74, 58, 56, 64, 75, 65, 87, + 66, 71, 72, 45, 46, 73, 88, 76, 89, 67, + 77, 78, 80, 81, 84, 90, 95, 79, 42, 49, + 64, 75, 65, 87, 66, 72, 44, 43, 73, 88, + 76, 89, 67, 77, 91, 78, 80, 81, 90, 95, + 79, 82, 36, 36, 83, 83, 36, 36, 83, 35, + 36, 36, 37, 37, 36, 36, 37, 38, 91, 92, + 38, 38, 39, 39, 38, 93, 94, 42, 96, 97, + + 98, 99, 134, 100, 40, 134, 101, 102, 40, 185, + 103, 104, 109, 92, 105, 106, 107, 108, 110, 93, + 94, 96, 97, 111, 98, 99, 100, 112, 40, 101, + 102, 113, 40, 103, 185, 104, 109, 105, 106, 107, + 108, 114, 110, 82, 36, 36, 83, 111, 115, 116, + 117, 112, 118, 119, 113, 83, 36, 36, 83, 120, + 121, 122, 185, 124, 114, 125, 126, 127, 128, 185, + 123, 115, 116, 129, 117, 118, 119, 130, 131, 132, + 134, 133, 120, 134, 121, 122, 124, 136, 125, 126, + 137, 127, 128, 123, 138, 139, 129, 140, 185, 141, + + 130, 142, 131, 132, 133, 135, 143, 185, 144, 145, + 136, 146, 148, 137, 147, 149, 150, 154, 138, 139, + 151, 140, 141, 152, 155, 142, 156, 157, 135, 156, + 143, 144, 145, 158, 159, 146, 148, 147, 160, 149, + 150, 154, 161, 151, 162, 165, 152, 163, 155, 164, + 166, 157, 167, 168, 170, 167, 158, 159, 171, 156, + 172, 160, 156, 173, 174, 176, 161, 177, 162, 165, + 163, 167, 164, 166, 167, 178, 168, 170, 179, 180, + 169, 171, 181, 183, 172, 182, 173, 174, 182, 176, + 177, 182, 185, 185, 182, 185, 185, 175, 185, 178, + + 185, 179, 185, 180, 169, 181, 183, 185, 185, 185, + 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, + 175, 41, 41, 185, 41, 41, 41, 50, 50, 85, + 85, 185, 185, 85, 85, 153, 185, 185, 185, 153, + 184, 185, 185, 185, 184, 3, 185, 185, 185, 185, + 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, + 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, + 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, + 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, + 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, + + 185, 185, 185, 185, 185, 185 } ; -static yyconst flex_int16_t yy_chk[487] = +static yyconst flex_int16_t yy_chk[507] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -554,50 +558,53 @@ static yyconst flex_int16_t yy_chk[487] = 2, 13, 13, 2, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 14, 14, 16, 18, 19, 6, 21, 23, 26, 7, - 85, 20, 22, 20, 23, 22, 24, 26, 27, 29, + 86, 20, 22, 20, 23, 22, 24, 26, 27, 29, 45, 21, 20, 36, 36, 16, 18, 19, 27, 6, 21, 23, 26, 7, 20, 22, 20, 23, 22, 24, - 26, 30, 27, 29, 21, 20, 25, 31, 25, 51, - 25, 27, 28, 31, 30, 28, 32, 32, 41, 25, - 33, 33, 33, 33, 15, 30, 34, 34, 34, 34, - 25, 31, 25, 51, 25, 28, 31, 30, 28, 40, - 32, 32, 25, 35, 35, 35, 35, 37, 37, 37, - 37, 38, 46, 46, 38, 39, 39, 39, 39, 52, - 53, 54, 40, 55, 56, 57, 58, 64, 38, 12, - 59, 62, 39, 131, 63, 65, 131, 66, 67, 68, - - 69, 72, 52, 53, 54, 73, 74, 55, 56, 57, - 58, 64, 38, 59, 62, 75, 39, 63, 76, 65, - 66, 67, 68, 69, 77, 72, 79, 89, 73, 74, - 79, 11, 80, 81, 81, 81, 81, 83, 75, 87, - 88, 91, 76, 82, 82, 82, 82, 92, 77, 93, - 79, 89, 94, 99, 79, 80, 95, 9, 96, 97, - 83, 98, 87, 88, 91, 95, 100, 3, 101, 103, - 92, 105, 93, 107, 109, 108, 94, 99, 108, 110, - 95, 96, 97, 111, 98, 112, 113, 118, 95, 117, - 100, 101, 103, 119, 124, 105, 107, 109, 120, 123, - - 108, 125, 110, 126, 128, 129, 134, 111, 130, 112, - 113, 118, 117, 136, 137, 143, 136, 119, 124, 138, - 140, 120, 123, 108, 125, 141, 144, 126, 128, 129, - 134, 130, 146, 147, 148, 152, 153, 149, 137, 143, - 149, 151, 138, 140, 151, 155, 0, 156, 141, 158, - 144, 161, 162, 0, 161, 146, 147, 148, 152, 153, - 163, 165, 151, 173, 167, 168, 173, 171, 174, 155, - 156, 175, 158, 0, 175, 177, 162, 161, 177, 0, - 0, 0, 0, 163, 0, 165, 151, 167, 0, 168, - 171, 174, 0, 0, 0, 0, 0, 0, 0, 0, - - 161, 179, 179, 0, 179, 179, 179, 180, 180, 181, - 181, 0, 0, 181, 181, 182, 0, 0, 0, 182, - 183, 0, 0, 0, 183, 178, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, - 178, 178, 178, 178, 178, 178 + 26, 40, 27, 29, 21, 20, 25, 30, 25, 51, + 25, 27, 28, 46, 46, 28, 52, 30, 53, 25, + 30, 31, 32, 32, 40, 54, 59, 31, 41, 15, + 25, 30, 25, 51, 25, 28, 12, 11, 28, 52, + 30, 53, 25, 30, 55, 31, 32, 32, 54, 59, + 31, 33, 33, 33, 33, 34, 34, 34, 34, 35, + 35, 35, 35, 37, 37, 37, 37, 38, 55, 56, + 38, 39, 39, 39, 39, 57, 58, 9, 62, 63, + + 64, 65, 134, 66, 38, 134, 67, 68, 39, 3, + 69, 72, 77, 56, 73, 74, 75, 76, 78, 57, + 58, 62, 63, 80, 64, 65, 66, 80, 38, 67, + 68, 81, 39, 69, 0, 72, 77, 73, 74, 75, + 76, 84, 78, 82, 82, 82, 82, 80, 88, 89, + 90, 80, 92, 93, 81, 83, 83, 83, 83, 94, + 95, 96, 0, 97, 84, 98, 99, 100, 101, 0, + 96, 88, 89, 102, 90, 92, 93, 104, 106, 108, + 110, 109, 94, 110, 95, 96, 97, 111, 98, 99, + 112, 100, 101, 96, 113, 114, 102, 115, 0, 119, + + 104, 120, 106, 108, 109, 110, 121, 0, 122, 125, + 111, 126, 128, 112, 127, 130, 131, 137, 113, 114, + 132, 115, 119, 133, 138, 120, 139, 140, 110, 139, + 121, 122, 125, 141, 143, 126, 128, 127, 144, 130, + 131, 137, 146, 132, 147, 151, 133, 149, 138, 150, + 152, 140, 153, 155, 157, 153, 141, 143, 158, 156, + 160, 144, 156, 161, 163, 169, 146, 170, 147, 151, + 149, 167, 150, 152, 167, 172, 155, 157, 174, 175, + 156, 158, 178, 181, 160, 180, 161, 163, 180, 169, + 170, 182, 184, 0, 182, 184, 0, 167, 0, 172, + + 0, 174, 0, 175, 156, 178, 181, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 167, 186, 186, 0, 186, 186, 186, 187, 187, 188, + 188, 0, 0, 188, 188, 189, 0, 0, 0, 189, + 190, 0, 0, 0, 190, 185, 185, 185, 185, 185, + 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, + 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, + 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, + 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, + 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, + + 185, 185, 185, 185, 185, 185 } ; static yy_state_type yy_last_accepting_state; @@ -662,7 +669,7 @@ static void countnl() { g_lingo->_colnumber = strlen(p); } -#line 666 "engines/director/lingo/lingo-lex.cpp" +#line 673 "engines/director/lingo/lingo-lex.cpp" #define INITIAL 0 @@ -850,7 +857,7 @@ YY_DECL #line 60 "engines/director/lingo/lingo-lex.l" -#line 854 "engines/director/lingo/lingo-lex.cpp" +#line 861 "engines/director/lingo/lingo-lex.cpp" if ( !(yy_init) ) { @@ -904,13 +911,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 >= 179 ) + if ( yy_current_state >= 186 ) 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] != 426 ); + while ( yy_base[yy_current_state] != 446 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1181,41 +1188,51 @@ YY_RULE_SETUP case 38: YY_RULE_SETUP #line 157 "engines/director/lingo/lingo-lex.l" -{ count(); return tWITH; } +{ count(); return tSPRITE; } YY_BREAK case 39: YY_RULE_SETUP #line 158 "engines/director/lingo/lingo-lex.l" -{ count(); return tWHEN; } +{ count(); return tWITH; } YY_BREAK case 40: YY_RULE_SETUP #line 159 "engines/director/lingo/lingo-lex.l" -{ count(); return tWHILE; } +{ count(); return tWITHIN; } YY_BREAK case 41: YY_RULE_SETUP -#line 161 "engines/director/lingo/lingo-lex.l" -{ count(); return tNEQ; } +#line 160 "engines/director/lingo/lingo-lex.l" +{ count(); return tWHEN; } YY_BREAK case 42: YY_RULE_SETUP -#line 162 "engines/director/lingo/lingo-lex.l" -{ count(); return tGE; } +#line 161 "engines/director/lingo/lingo-lex.l" +{ count(); return tWHILE; } YY_BREAK case 43: YY_RULE_SETUP #line 163 "engines/director/lingo/lingo-lex.l" -{ count(); return tLE; } +{ count(); return tNEQ; } YY_BREAK case 44: YY_RULE_SETUP #line 164 "engines/director/lingo/lingo-lex.l" -{ count(); return tCONCAT; } +{ count(); return tGE; } YY_BREAK case 45: YY_RULE_SETUP +#line 165 "engines/director/lingo/lingo-lex.l" +{ count(); return tLE; } + YY_BREAK +case 46: +YY_RULE_SETUP #line 166 "engines/director/lingo/lingo-lex.l" +{ count(); return tCONCAT; } + YY_BREAK +case 47: +YY_RULE_SETUP +#line 168 "engines/director/lingo/lingo-lex.l" { count(); yylval.s = new Common::String(yytext); @@ -1230,43 +1247,43 @@ YY_RULE_SETUP return ID; } YY_BREAK -case 46: -YY_RULE_SETUP -#line 179 "engines/director/lingo/lingo-lex.l" -{ count(); yylval.f = atof(yytext); return FLOAT; } - YY_BREAK -case 47: -YY_RULE_SETUP -#line 180 "engines/director/lingo/lingo-lex.l" -{ count(); yylval.i = strtol(yytext, NULL, 10); return INT; } - YY_BREAK case 48: YY_RULE_SETUP #line 181 "engines/director/lingo/lingo-lex.l" -{ count(); return *yytext; } +{ count(); yylval.f = atof(yytext); return FLOAT; } YY_BREAK case 49: -/* rule 49 can match eol */ YY_RULE_SETUP #line 182 "engines/director/lingo/lingo-lex.l" -{ return '\n'; } +{ count(); yylval.i = strtol(yytext, NULL, 10); return INT; } YY_BREAK case 50: YY_RULE_SETUP #line 183 "engines/director/lingo/lingo-lex.l" -{ count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return STRING; } +{ count(); return *yytext; } YY_BREAK case 51: +/* rule 51 can match eol */ YY_RULE_SETUP #line 184 "engines/director/lingo/lingo-lex.l" - +{ return '\n'; } YY_BREAK case 52: YY_RULE_SETUP +#line 185 "engines/director/lingo/lingo-lex.l" +{ count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return STRING; } + YY_BREAK +case 53: +YY_RULE_SETUP #line 186 "engines/director/lingo/lingo-lex.l" + + YY_BREAK +case 54: +YY_RULE_SETUP +#line 188 "engines/director/lingo/lingo-lex.l" ECHO; YY_BREAK -#line 1270 "engines/director/lingo/lingo-lex.cpp" +#line 1287 "engines/director/lingo/lingo-lex.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1559,7 +1576,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 >= 179 ) + if ( yy_current_state >= 186 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1587,11 +1604,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 >= 179 ) + if ( yy_current_state >= 186 ) 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 == 178); + yy_is_jam = (yy_current_state == 185); return yy_is_jam ? 0 : yy_current_state; } @@ -2266,7 +2283,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 186 "engines/director/lingo/lingo-lex.l" +#line 188 "engines/director/lingo/lingo-lex.l" diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l index 5e4deeca2a..56703160e5 100644 --- a/engines/director/lingo/lingo-lex.l +++ b/engines/director/lingo/lingo-lex.l @@ -154,7 +154,9 @@ whitespace [\t ] } (?i:then) { count(); return tTHEN; } (?i:to) { count(); return tTO; } +(?i:sprite) { count(); return tSPRITE; } (?i:with) { count(); return tWITH; } +(?i:within) { count(); return tWITHIN; } (?i:when) { count(); return tWHEN; } (?i:while) { count(); return tWHILE; } diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h index f1fa45d5dd..1859c31473 100644 --- a/engines/director/lingo/lingo.h +++ b/engines/director/lingo/lingo.h @@ -204,6 +204,7 @@ public: static void c_starts(); static void c_intersects(); + static void c_within(); static void c_constpush(); static void c_fconstpush(); diff --git a/engines/director/lingo/tests/factory.lingo b/engines/director/lingo/tests/factory.lingo index 5349b3476b..d458ba4bff 100644 --- a/engines/director/lingo/tests/factory.lingo +++ b/engines/director/lingo/tests/factory.lingo @@ -37,12 +37,12 @@ method mAtFrame dontpassevent set the castnum of sprite 14 to bcast set the LocV of sprite 14 to (startV-stepV) --- if sprite 14 intersects 10 and (startV-6) <= targetV then + if sprite 14 intersects 10 and (startV-6) <= targetV then set the castnum of sprite 14 to f16 set the perframehook to false me(hit) exit --- end if + end if if startV < targetV or bcast>g17 then set the perframehook to false set the locV of sprite 14 to 340 |