From d53ff7b18018d70f5633da4552164bf5a78f5d5a Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 17 Jul 2016 13:21:13 +0300 Subject: DIRECTOR: Lingo: Initial stub for 'intersects' operator --- engines/director/lingo/lingo-code.cpp | 9 + engines/director/lingo/lingo-gr.cpp | 882 +++++++++++++++++----------------- engines/director/lingo/lingo-gr.h | 6 +- engines/director/lingo/lingo-gr.y | 3 + engines/director/lingo/lingo-lex.cpp | 335 ++++++------- engines/director/lingo/lingo-lex.l | 1 + engines/director/lingo/lingo.h | 2 + 7 files changed, 632 insertions(+), 606 deletions(-) (limited to 'engines/director') diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp index 9dd802182b..629b10002c 100644 --- a/engines/director/lingo/lingo-code.cpp +++ b/engines/director/lingo/lingo-code.cpp @@ -390,6 +390,15 @@ void Lingo::c_starts() { g_lingo->push(d1); } +void Lingo::c_intersects() { + Datum d2 = g_lingo->pop(); + Datum d1 = g_lingo->pop(); + + warning("STUB: c_intersects"); + + 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 1a4ac2d329..e0d661f0ea 100644 --- a/engines/director/lingo/lingo-gr.cpp +++ b/engines/director/lingo/lingo-gr.cpp @@ -119,7 +119,8 @@ tNOT = 308, tCONCAT = 309, tCONTAINS = 310, - tSTARTS = 311 + tSTARTS = 311, + tINTERSECTS = 312 }; #endif /* Tokens. */ @@ -177,6 +178,7 @@ #define tCONCAT 309 #define tCONTAINS 310 #define tSTARTS 311 +#define tINTERSECTS 312 @@ -233,7 +235,7 @@ typedef union YYSTYPE int narg; /* number of arguments */ } /* Line 193 of yacc.c. */ -#line 237 "engines/director/lingo/lingo-gr.cpp" +#line 239 "engines/director/lingo/lingo-gr.cpp" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -246,7 +248,7 @@ typedef union YYSTYPE /* Line 216 of yacc.c. */ -#line 250 "engines/director/lingo/lingo-gr.cpp" +#line 252 "engines/director/lingo/lingo-gr.cpp" #ifdef short # undef short @@ -461,20 +463,20 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 77 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 682 +#define YYLAST 645 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 70 +#define YYNTOKENS 71 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 34 /* YYNRULES -- Number of rules. */ -#define YYNRULES 117 +#define YYNRULES 118 /* YYNRULES -- Number of states. */ -#define YYNSTATES 252 +#define YYNSTATES 254 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 311 +#define YYMAXUTOK 312 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -483,12 +485,12 @@ union yyalloc static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 63, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 64, 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, 62, 68, 2, - 64, 65, 60, 58, 69, 59, 2, 61, 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, 2, 2, 2, - 67, 57, 66, 2, 2, 2, 2, 2, 2, 2, + 68, 58, 67, 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, @@ -513,7 +515,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 + 55, 56, 57 }; #if YYDEBUG @@ -529,77 +531,77 @@ 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, 324, 327, 331, 334, 337, 340, 342, 344, 347, - 349, 353, 356, 359, 362, 365, 369, 372, 376, 379, - 382, 384, 388, 391, 395, 396, 405, 408, 409, 418, - 419, 421, 425, 430, 431, 435, 436, 438 + 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 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { - 71, 0, -1, 71, 72, 73, -1, 73, -1, 1, - 63, -1, 63, -1, -1, 97, -1, 92, -1, 102, - -1, 74, -1, 76, -1, 34, 91, 25, 13, -1, - 36, 13, 57, 91, -1, 36, 8, 57, 91, -1, - 36, 9, 91, 57, 91, -1, 36, 13, 38, 91, - -1, 36, 8, 38, 91, -1, 36, 9, 91, 38, - 91, -1, 91, -1, 92, -1, 75, -1, 77, -1, - 84, 64, 83, 65, 90, 89, 19, 35, -1, 85, - 57, 91, 89, 38, 91, 89, 90, 89, 19, 35, - -1, 85, 57, 91, 89, 16, 38, 91, 89, 90, - 89, 19, 35, -1, 39, 13, 37, 91, -1, 86, - 83, 37, 72, 90, 89, 19, 24, -1, 86, 83, - 37, 72, 90, 89, 42, 90, 89, 19, 24, -1, - 86, 83, 37, 72, 90, 89, 88, 79, 89, 19, - 24, -1, 86, 83, 37, 88, 75, 89, -1, 86, - 83, 37, 88, 75, 89, 42, 88, 75, 89, -1, - 86, 83, 37, 88, 75, 89, 80, 89, 78, 89, - -1, -1, 42, 88, 75, -1, 79, 82, -1, 82, - -1, 80, 81, -1, 81, -1, 87, 83, 37, 88, - 76, 89, -1, 80, -1, 87, 83, 37, 90, 89, - -1, 91, -1, 91, 57, 91, -1, 64, 83, 65, + 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, -1, 35, 41, -1, 35, 40, 13, -1, 24, -1, - 18, -1, -1, -1, -1, 90, 72, -1, 90, 76, - -1, 7, -1, 10, -1, 14, -1, 11, 64, 103, - 65, -1, 12, -1, 13, 64, 103, 65, -1, 13, - -1, 8, -1, 9, 91, -1, 74, -1, 91, 58, - 91, -1, 91, 59, 91, -1, 91, 60, 91, -1, - 91, 61, 91, -1, 91, 66, 91, -1, 91, 67, - 91, -1, 91, 50, 91, -1, 91, 45, 91, -1, - 91, 46, 91, -1, 91, 51, 91, -1, 91, 52, - 91, -1, 53, 91, -1, 91, 68, 91, -1, 91, - 54, 91, -1, 91, 55, 91, -1, 91, 56, 91, - -1, 58, 91, -1, 59, 91, -1, 64, 91, 65, - -1, 28, 14, -1, 29, 13, -1, 34, 91, -1, - 94, -1, 20, -1, 22, 93, -1, 13, -1, 93, - 69, 13, -1, 23, 26, -1, 23, 31, -1, 23, - 33, -1, 23, 95, -1, 23, 95, 96, -1, 23, - 96, -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, 98, 88, - 100, 72, 101, 90, -1, 43, 13, -1, -1, 44, - 13, 99, 88, 100, 72, 101, 90, -1, -1, 13, - -1, 100, 69, 13, -1, 100, 72, 69, 13, -1, - -1, 13, 88, 103, -1, -1, 91, -1, 103, 69, - 91, -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 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 100, 100, 101, 102, 105, 110, 111, 112, 113, - 114, 115, 118, 124, 130, 138, 146, 152, 160, 169, - 170, 172, 173, 178, 189, 205, 217, 222, 229, 238, - 247, 257, 267, 278, 279, 282, 283, 286, 287, 290, - 298, 299, 307, 308, 309, 311, 313, 319, 325, 332, - 334, 336, 337, 338, 341, 346, 349, 352, 358, 361, - 369, 372, 379, 385, 386, 387, 388, 389, 390, 391, - 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, - 402, 403, 404, 407, 408, 409, 410, 411, 413, 416, - 417, 428, 429, 430, 431, 436, 442, 449, 450, 451, - 452, 455, 456, 457, 485, 485, 491, 494, 494, 500, - 501, 502, 503, 505, 509, 517, 518, 519 + 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 }; #endif @@ -615,14 +617,14 @@ 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", "'='", "'+'", "'-'", - "'*'", "'/'", "'%'", "'\\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", "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 }; #endif @@ -636,26 +638,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, 61, 43, 45, - 42, 47, 37, 10, 40, 41, 62, 60, 38, 44 + 305, 306, 307, 308, 309, 310, 311, 312, 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, 70, 71, 71, 71, 72, 73, 73, 73, 73, - 73, 73, 74, 74, 74, 74, 74, 74, 74, 75, - 75, 76, 76, 76, 76, 76, 76, 77, 77, 77, - 77, 77, 77, 78, 78, 79, 79, 80, 80, 81, - 82, 82, 83, 83, 83, 84, 85, 86, 87, 88, - 89, 90, 90, 90, 91, 91, 91, 91, 91, 91, - 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, - 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, - 91, 91, 91, 92, 92, 92, 92, 92, 92, 93, - 93, 94, 94, 94, 94, 94, 94, 95, 95, 95, - 95, 96, 96, 96, 98, 97, 97, 99, 97, 100, - 100, 100, 100, 101, 102, 103, 103, 103 + 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 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -669,10 +672,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, - 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 + 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 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -681,82 +684,82 @@ static const yytype_uint8 yyr2[] = static const yytype_uint8 yydefact[] = { 0, 0, 54, 61, 0, 55, 0, 58, 49, 56, - 87, 0, 0, 47, 0, 0, 0, 0, 0, 0, + 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, 86, 7, - 9, 4, 60, 0, 63, 62, 115, 115, 115, 89, - 88, 100, 0, 91, 0, 92, 0, 93, 0, 94, - 96, 104, 83, 84, 85, 0, 45, 0, 0, 0, - 0, 106, 107, 75, 80, 81, 0, 1, 5, 6, + 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 116, 0, 0, 114, 0, 98, 102, 0, 99, - 0, 0, 0, 95, 49, 0, 46, 0, 0, 0, - 0, 0, 0, 49, 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, - 90, 101, 97, 103, 109, 12, 17, 14, 0, 0, - 16, 13, 26, 109, 51, 0, 44, 51, 0, 43, - 117, 110, 0, 18, 15, 0, 50, 0, 0, 50, - 50, 20, 0, 113, 113, 52, 53, 0, 0, 50, - 49, 30, 111, 0, 51, 51, 0, 50, 51, 0, - 51, 0, 48, 49, 50, 38, 0, 112, 105, 108, - 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, 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 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 27, 185, 28, 44, 30, 186, 32, 231, 215, - 216, 205, 217, 83, 33, 34, 35, 206, 241, 165, - 176, 36, 181, 50, 38, 59, 60, 39, 114, 123, - 172, 194, 40, 102 + -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 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -185 +#define YYPACT_NINF -198 static const yytype_int16 yypact[] = { - 204, -39, -185, -185, 443, -185, -29, -185, 590, -185, - -185, 29, 128, -185, 32, 52, 68, 443, 19, 101, - 70, 93, 98, 443, 443, 443, 443, 6, -185, 15, - -185, -185, -185, 51, 60, 474, 571, -185, -185, -185, - -185, -185, 54, 443, -185, 571, 443, 443, 443, -185, - 50, -185, 106, -185, 113, -185, 100, -185, 23, 24, - -185, -185, -185, -185, 119, 115, -185, -31, 443, -16, - 94, -185, -185, 614, 614, 614, 528, -185, -185, 262, - 474, 443, 474, 95, 552, 443, 443, 443, 443, 443, - 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, - 119, 571, 8, 43, 64, 121, -185, -185, 122, -185, - 123, 124, 109, -185, -185, 127, -185, 443, 443, 485, - 443, 443, 443, -185, -185, -185, 78, 571, 80, 504, - 83, 443, 571, 571, 571, 571, 571, 571, 571, 571, - 257, 257, 614, 614, 571, 571, 571, -185, 443, -185, - -185, -185, -185, -185, 135, -185, 571, 571, 443, 443, - 571, 571, 571, 135, -185, 2, -185, -185, 412, 571, - 571, -185, -5, 571, 571, -5, 320, 117, 443, 320, - -185, -185, 138, 84, 84, -185, -185, 137, 443, 571, - -8, -6, -185, 144, -185, -185, 132, 571, -185, 148, - -185, 150, -185, -185, 150, -185, 474, -185, 320, 320, - -185, -185, 320, -185, 320, 150, 150, -185, 474, 412, - -185, 134, 147, 320, 162, 169, -185, 170, 153, -185, - -185, -185, -185, 172, 158, 171, 173, -2, -185, 412, - -185, 378, 159, -185, -185, -185, 320, -185, -185, -185, - -185, -185 + 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 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -185, -185, -25, 120, 9, -164, 0, -185, -185, -185, - 7, -184, -15, -77, -185, -185, -185, -182, -7, -166, - -124, 4, 25, -185, -185, -185, 142, -185, -185, -185, - 39, 22, -185, 20 + -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 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -766,148 +769,140 @@ static const yytype_int16 yypgoto[] = #define YYTABLE_NINF -61 static const yytype_int16 yytable[] = { - 31, 48, 79, 126, 180, 128, 77, 117, 45, 29, - 187, 199, 202, 190, 191, -10, -51, -51, 177, 218, - 220, 64, 120, 198, 41, 37, 118, 73, 74, 75, - 76, 211, 220, 218, 200, 46, 203, 109, 221, 84, - 178, 121, 49, 179, 110, 61, 224, 100, 225, 227, - 101, 101, 101, 111, 54, 229, 56, 233, 78, 65, - 66, -51, 112, 238, 182, 240, 62, 103, 104, 78, - 208, 209, 119, 147, 212, 247, 214, 148, -10, 31, - 250, 63, 251, 70, 84, 127, 129, 223, 29, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 37, 167, 71, 154, 149, 67, - 68, 72, 148, 246, 69, 80, 163, 81, 47, 105, - 106, 156, 157, 168, 160, 161, 162, 107, 116, 222, - 108, 122, 130, 148, 150, 169, 151, 152, 153, 111, - 155, 228, 51, 164, 115, 166, 78, 183, 171, 52, - 184, 192, 170, 193, 53, 188, 196, 207, 54, 55, - 56, 57, 173, 174, 85, 86, 58, 210, 202, 87, - 88, 89, 213, 90, 91, 92, 230, 93, 94, 95, - 96, 234, 189, 201, 232, 97, 98, 99, 235, 236, - 237, 242, 197, 243, 249, 244, 219, 245, 204, 125, - 226, 113, 175, 0, -6, 1, 195, 0, 0, 0, - 84, 2, 3, 4, 5, 6, 7, 8, 9, 0, - 0, 0, 84, 239, 10, 0, 11, 12, 13, 0, - 0, 14, 15, 16, 0, 0, 0, 0, 17, 18, - 19, 248, 0, 20, 0, 0, 0, 21, 22, 0, - 0, 0, 0, 0, 0, 0, 0, 23, 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, 0, 23, 0, 95, 96, 0, - 24, 25, 0, 97, 98, 99, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 23, 0, 0, 0, 0, 24, 25, - 0, 0, 0, 78, 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, + 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, 24, 25, 0, 0, - 15, 16, 26, 0, 0, 0, 17, 0, 19, 0, - 2, 3, 4, 5, 6, 7, 42, 9, 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, - 24, 25, 0, 0, 0, 0, 26, 43, 0, 19, - 0, 2, 3, 4, 5, 6, 7, 42, 9, 0, - 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, - 0, 24, 25, 0, 0, 0, 0, 26, 43, 0, - 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 158, 0, 0, 0, 23, 0, 0, - 85, 86, 24, 25, 0, 87, 88, 89, 82, 90, - 91, 92, 159, 93, 94, 95, 96, 0, 0, 85, - 86, 97, 98, 99, 87, 88, 89, 0, 90, 91, - 92, 131, 93, 94, 95, 96, 0, 0, 0, 124, - 97, 98, 99, 85, 86, 0, 0, 0, 87, 88, - 89, 0, 90, 91, 92, 0, 93, 94, 95, 96, - 0, 0, 0, 124, 97, 98, 99, 85, 86, 0, - 0, 0, 87, 88, 89, 0, 90, 91, 92, 131, - 93, 94, 95, 96, 0, 0, 85, 86, 97, 98, - 99, 87, 88, 89, 0, 90, 91, 92, 0, 93, - 94, 95, 96, 0, 0, -60, -60, 97, 98, 99, - -60, -60, -60, 0, -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, 0, 0, 0, 0, 0, - 97, 98, 99 + 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 }; static const yytype_int16 yycheck[] = { - 0, 8, 27, 80, 168, 82, 0, 38, 4, 0, - 176, 19, 18, 179, 180, 0, 18, 19, 16, 201, - 204, 17, 38, 189, 63, 0, 57, 23, 24, 25, - 26, 197, 216, 215, 42, 64, 42, 14, 204, 35, - 38, 57, 13, 167, 21, 13, 212, 43, 214, 215, - 46, 47, 48, 30, 30, 219, 32, 223, 63, 40, - 41, 63, 38, 229, 69, 231, 14, 47, 48, 63, - 194, 195, 68, 65, 198, 239, 200, 69, 63, 79, - 246, 13, 248, 13, 80, 81, 82, 211, 79, 85, + 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, 79, 130, 13, 114, 65, 8, - 9, 13, 69, 237, 13, 64, 123, 57, 64, 69, - 14, 117, 118, 130, 120, 121, 122, 14, 13, 206, - 30, 37, 37, 69, 13, 131, 14, 14, 14, 30, - 13, 218, 14, 65, 25, 65, 63, 172, 13, 21, - 175, 13, 148, 69, 26, 38, 19, 13, 30, 31, - 32, 33, 158, 159, 45, 46, 38, 35, 18, 50, - 51, 52, 24, 54, 55, 56, 42, 58, 59, 60, - 61, 19, 178, 190, 37, 66, 67, 68, 19, 19, - 37, 19, 188, 35, 35, 24, 203, 24, 191, 79, - 215, 59, 163, -1, 0, 1, 184, -1, -1, -1, - 206, 7, 8, 9, 10, 11, 12, 13, 14, -1, - -1, -1, 218, 230, 20, -1, 22, 23, 24, -1, - -1, 27, 28, 29, -1, -1, -1, -1, 34, 35, - 36, 241, -1, 39, -1, -1, -1, 43, 44, -1, - -1, -1, -1, -1, -1, -1, -1, 53, -1, -1, - -1, -1, 58, 59, -1, -1, -1, 63, 64, 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, 60, 61, -1, - 58, 59, -1, 66, 67, 68, 64, 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, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 53, -1, -1, -1, -1, 58, 59, - -1, -1, -1, 63, 64, 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, + 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, 8, 9, 10, 11, 12, 13, 14, -1, -1, -1, - -1, 53, 20, -1, 22, 23, 58, 59, -1, -1, - 28, 29, 64, -1, -1, -1, 34, -1, 36, -1, - 7, 8, 9, 10, 11, 12, 13, 14, -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, - 58, 59, -1, -1, -1, -1, 64, 34, -1, 36, - -1, 7, 8, 9, 10, 11, 12, 13, 14, -1, - -1, -1, -1, -1, -1, -1, 53, -1, -1, -1, - -1, 58, 59, -1, -1, -1, -1, 64, 34, -1, - 36, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 38, -1, -1, -1, 53, -1, -1, - 45, 46, 58, 59, -1, 50, 51, 52, 64, 54, - 55, 56, 57, 58, 59, 60, 61, -1, -1, 45, - 46, 66, 67, 68, 50, 51, 52, -1, 54, 55, - 56, 57, 58, 59, 60, 61, -1, -1, -1, 65, - 66, 67, 68, 45, 46, -1, -1, -1, 50, 51, - 52, -1, 54, 55, 56, -1, 58, 59, 60, 61, - -1, -1, -1, 65, 66, 67, 68, 45, 46, -1, - -1, -1, 50, 51, 52, -1, 54, 55, 56, 57, - 58, 59, 60, 61, -1, -1, 45, 46, 66, 67, - 68, 50, 51, 52, -1, 54, 55, 56, -1, 58, - 59, 60, 61, -1, -1, 45, 46, 66, 67, 68, - 50, 51, 52, -1, 54, 55, 56, -1, -1, -1, - 60, 61, -1, -1, 64, -1, 66, 67, 68, 45, - 46, -1, -1, -1, 50, 51, 52, -1, 54, 55, - 56, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 66, 67, 68 + -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 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -916,30 +911,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, 58, 59, 64, 71, 73, 74, - 75, 76, 77, 84, 85, 86, 91, 92, 94, 97, - 102, 63, 13, 34, 74, 91, 64, 64, 88, 13, - 93, 14, 21, 26, 30, 31, 32, 33, 38, 95, - 96, 13, 14, 13, 91, 40, 41, 8, 9, 13, - 13, 13, 13, 91, 91, 91, 91, 0, 63, 72, - 64, 57, 64, 83, 91, 45, 46, 50, 51, 52, - 54, 55, 56, 58, 59, 60, 61, 66, 67, 68, - 91, 91, 103, 103, 103, 69, 14, 14, 30, 14, - 21, 30, 38, 96, 98, 25, 13, 38, 57, 91, - 38, 57, 37, 99, 65, 73, 83, 91, 83, 91, - 37, 57, 91, 91, 91, 91, 91, 91, 91, 91, - 91, 91, 91, 91, 91, 91, 91, 65, 69, 65, - 13, 14, 14, 14, 88, 13, 91, 91, 38, 57, - 91, 91, 91, 88, 65, 89, 65, 72, 88, 91, - 91, 13, 100, 91, 91, 100, 90, 16, 38, 90, - 75, 92, 69, 72, 72, 72, 76, 89, 38, 91, - 89, 89, 13, 69, 101, 101, 19, 91, 89, 19, - 42, 88, 18, 42, 80, 81, 87, 13, 90, 90, - 35, 89, 90, 24, 90, 79, 80, 82, 87, 88, - 81, 89, 83, 90, 89, 89, 82, 89, 83, 75, - 42, 78, 37, 89, 19, 19, 19, 37, 89, 88, - 89, 88, 19, 35, 24, 24, 90, 75, 76, 35, - 89, 89 + 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 }; #define yyerrok (yyerrstatus = 0) @@ -1754,12 +1749,12 @@ yyreduce: switch (yyn) { case 4: -#line 102 "engines/director/lingo/lingo-gr.y" +#line 104 "engines/director/lingo/lingo-gr.y" { yyerrok; ;} break; case 5: -#line 105 "engines/director/lingo/lingo-gr.y" +#line 107 "engines/director/lingo/lingo-gr.y" { g_lingo->_linenumber++; g_lingo->_colnumber = 1; @@ -1767,12 +1762,12 @@ yyreduce: break; case 10: -#line 114 "engines/director/lingo/lingo-gr.y" +#line 116 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_xpop); ;} break; case 12: -#line 118 "engines/director/lingo/lingo-gr.y" +#line 120 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_varpush); g_lingo->codeString((yyvsp[(4) - (4)].s)->c_str()); @@ -1782,7 +1777,7 @@ yyreduce: break; case 13: -#line 124 "engines/director/lingo/lingo-gr.y" +#line 126 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_varpush); g_lingo->codeString((yyvsp[(2) - (4)].s)->c_str()); @@ -1792,7 +1787,7 @@ yyreduce: break; case 14: -#line 130 "engines/director/lingo/lingo-gr.y" +#line 132 "engines/director/lingo/lingo-gr.y" { g_lingo->code2(g_lingo->c_constpush, 0); // Put dummy id g_lingo->code1(g_lingo->c_theentityassign); @@ -1804,7 +1799,7 @@ yyreduce: break; case 15: -#line 138 "engines/director/lingo/lingo-gr.y" +#line 140 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_swap); g_lingo->code1(g_lingo->c_theentityassign); @@ -1816,7 +1811,7 @@ yyreduce: break; case 16: -#line 146 "engines/director/lingo/lingo-gr.y" +#line 148 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_varpush); g_lingo->codeString((yyvsp[(2) - (4)].s)->c_str()); @@ -1826,7 +1821,7 @@ yyreduce: break; case 17: -#line 152 "engines/director/lingo/lingo-gr.y" +#line 154 "engines/director/lingo/lingo-gr.y" { g_lingo->code2(g_lingo->c_constpush, 0); // Put dummy id g_lingo->code1(g_lingo->c_theentityassign); @@ -1838,7 +1833,7 @@ yyreduce: break; case 18: -#line 160 "engines/director/lingo/lingo-gr.y" +#line 162 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_swap); g_lingo->code1(g_lingo->c_theentityassign); @@ -1850,12 +1845,12 @@ yyreduce: break; case 19: -#line 169 "engines/director/lingo/lingo-gr.y" +#line 171 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_xpop); ;} break; case 23: -#line 178 "engines/director/lingo/lingo-gr.y" +#line 180 "engines/director/lingo/lingo-gr.y" { inst body = 0, end = 0; WRITE_UINT32(&body, (yyvsp[(5) - (8)].code)); @@ -1865,7 +1860,7 @@ yyreduce: break; case 24: -#line 189 "engines/director/lingo/lingo-gr.y" +#line 191 "engines/director/lingo/lingo-gr.y" { inst init = 0, finish = 0, body = 0, end = 0, inc = 0; WRITE_UINT32(&init, (yyvsp[(3) - (11)].code)); @@ -1881,7 +1876,7 @@ yyreduce: break; case 25: -#line 205 "engines/director/lingo/lingo-gr.y" +#line 207 "engines/director/lingo/lingo-gr.y" { inst init = 0, finish = 0, body = 0, end = 0, inc = 0; WRITE_UINT32(&init, (yyvsp[(3) - (12)].code)); @@ -1897,14 +1892,14 @@ yyreduce: break; case 26: -#line 217 "engines/director/lingo/lingo-gr.y" +#line 219 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_ifcode); ;} break; case 27: -#line 222 "engines/director/lingo/lingo-gr.y" +#line 224 "engines/director/lingo/lingo-gr.y" { inst then = 0, end = 0; WRITE_UINT32(&then, (yyvsp[(5) - (8)].code)); @@ -1915,7 +1910,7 @@ yyreduce: break; case 28: -#line 229 "engines/director/lingo/lingo-gr.y" +#line 231 "engines/director/lingo/lingo-gr.y" { inst then = 0, else1 = 0, end = 0; WRITE_UINT32(&then, (yyvsp[(5) - (11)].code)); @@ -1928,7 +1923,7 @@ yyreduce: break; case 29: -#line 238 "engines/director/lingo/lingo-gr.y" +#line 240 "engines/director/lingo/lingo-gr.y" { inst then = 0, else1 = 0, end = 0; WRITE_UINT32(&then, (yyvsp[(5) - (11)].code)); @@ -1941,7 +1936,7 @@ yyreduce: break; case 30: -#line 247 "engines/director/lingo/lingo-gr.y" +#line 249 "engines/director/lingo/lingo-gr.y" { inst then = 0, else1 = 0, end = 0; WRITE_UINT32(&then, (yyvsp[(4) - (6)].code)); @@ -1955,7 +1950,7 @@ yyreduce: break; case 31: -#line 257 "engines/director/lingo/lingo-gr.y" +#line 259 "engines/director/lingo/lingo-gr.y" { inst then = 0, else1 = 0, end = 0; WRITE_UINT32(&then, (yyvsp[(4) - (10)].code)); @@ -1969,7 +1964,7 @@ yyreduce: break; case 32: -#line 267 "engines/director/lingo/lingo-gr.y" +#line 269 "engines/director/lingo/lingo-gr.y" { inst then = 0, else1 = 0, end = 0; WRITE_UINT32(&then, (yyvsp[(4) - (10)].code)); @@ -1983,17 +1978,17 @@ yyreduce: break; case 33: -#line 278 "engines/director/lingo/lingo-gr.y" +#line 280 "engines/director/lingo/lingo-gr.y" { (yyval.code) = 0; ;} break; case 34: -#line 279 "engines/director/lingo/lingo-gr.y" +#line 281 "engines/director/lingo/lingo-gr.y" { (yyval.code) = (yyvsp[(2) - (3)].code); ;} break; case 39: -#line 290 "engines/director/lingo/lingo-gr.y" +#line 292 "engines/director/lingo/lingo-gr.y" { inst then = 0; WRITE_UINT32(&then, (yyvsp[(4) - (6)].code)); @@ -2003,7 +1998,7 @@ yyreduce: break; case 41: -#line 299 "engines/director/lingo/lingo-gr.y" +#line 301 "engines/director/lingo/lingo-gr.y" { inst then = 0; WRITE_UINT32(&then, (yyvsp[(4) - (5)].code)); @@ -2013,22 +2008,22 @@ yyreduce: break; case 42: -#line 307 "engines/director/lingo/lingo-gr.y" +#line 309 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(STOP); ;} break; case 43: -#line 308 "engines/director/lingo/lingo-gr.y" +#line 310 "engines/director/lingo/lingo-gr.y" { g_lingo->code2(g_lingo->c_eq, STOP); ;} break; case 45: -#line 311 "engines/director/lingo/lingo-gr.y" +#line 313 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code3(g_lingo->c_repeatwhilecode, STOP, STOP); ;} break; case 46: -#line 313 "engines/director/lingo/lingo-gr.y" +#line 315 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code3(g_lingo->c_repeatwithcode, STOP, STOP); g_lingo->code3(STOP, STOP, STOP); @@ -2037,7 +2032,7 @@ yyreduce: break; case 47: -#line 319 "engines/director/lingo/lingo-gr.y" +#line 321 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code1(g_lingo->c_ifcode); g_lingo->code3(STOP, STOP, STOP); @@ -2046,7 +2041,7 @@ yyreduce: break; case 48: -#line 325 "engines/director/lingo/lingo-gr.y" +#line 327 "engines/director/lingo/lingo-gr.y" { inst skipEnd; WRITE_UINT32(&skipEnd, 1); // We have to skip end to avoid multiple executions @@ -2056,22 +2051,22 @@ yyreduce: break; case 49: -#line 332 "engines/director/lingo/lingo-gr.y" +#line 334 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->_currentScript->size(); ;} break; case 50: -#line 334 "engines/director/lingo/lingo-gr.y" +#line 336 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(STOP); (yyval.code) = g_lingo->_currentScript->size(); ;} break; case 51: -#line 336 "engines/director/lingo/lingo-gr.y" +#line 338 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->_currentScript->size(); ;} break; case 54: -#line 341 "engines/director/lingo/lingo-gr.y" +#line 343 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code1(g_lingo->c_constpush); inst i = 0; @@ -2080,21 +2075,21 @@ yyreduce: break; case 55: -#line 346 "engines/director/lingo/lingo-gr.y" +#line 348 "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 349 "engines/director/lingo/lingo-gr.y" +#line 351 "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 352 "engines/director/lingo/lingo-gr.y" +#line 354 "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)); @@ -2104,14 +2099,14 @@ yyreduce: break; case 58: -#line 358 "engines/director/lingo/lingo-gr.y" +#line 360 "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 361 "engines/director/lingo/lingo-gr.y" +#line 363 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code1(g_lingo->c_call); g_lingo->codeString((yyvsp[(1) - (4)].s)->c_str()); @@ -2123,14 +2118,14 @@ yyreduce: break; case 60: -#line 369 "engines/director/lingo/lingo-gr.y" +#line 371 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->codeId(*(yyvsp[(1) - (1)].s)); delete (yyvsp[(1) - (1)].s); ;} break; case 61: -#line 372 "engines/director/lingo/lingo-gr.y" +#line 374 "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); @@ -2141,7 +2136,7 @@ yyreduce: break; case 62: -#line 379 "engines/director/lingo/lingo-gr.y" +#line 381 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code1(g_lingo->c_theentitypush); inst e = 0, f = 0; @@ -2151,148 +2146,153 @@ yyreduce: break; case 64: -#line 386 "engines/director/lingo/lingo-gr.y" +#line 388 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_add); ;} break; case 65: -#line 387 "engines/director/lingo/lingo-gr.y" +#line 389 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_sub); ;} break; case 66: -#line 388 "engines/director/lingo/lingo-gr.y" +#line 390 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_mul); ;} break; case 67: -#line 389 "engines/director/lingo/lingo-gr.y" +#line 391 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_div); ;} break; case 68: -#line 390 "engines/director/lingo/lingo-gr.y" +#line 392 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_gt); ;} break; case 69: -#line 391 "engines/director/lingo/lingo-gr.y" +#line 393 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_lt); ;} break; case 70: -#line 392 "engines/director/lingo/lingo-gr.y" +#line 394 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_neq); ;} break; case 71: -#line 393 "engines/director/lingo/lingo-gr.y" +#line 395 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_ge); ;} break; case 72: -#line 394 "engines/director/lingo/lingo-gr.y" +#line 396 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_le); ;} break; case 73: -#line 395 "engines/director/lingo/lingo-gr.y" +#line 397 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_and); ;} break; case 74: -#line 396 "engines/director/lingo/lingo-gr.y" +#line 398 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_or); ;} break; case 75: -#line 397 "engines/director/lingo/lingo-gr.y" +#line 399 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_not); ;} break; case 76: -#line 398 "engines/director/lingo/lingo-gr.y" +#line 400 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_ampersand); ;} break; case 77: -#line 399 "engines/director/lingo/lingo-gr.y" +#line 401 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_concat); ;} break; case 78: -#line 400 "engines/director/lingo/lingo-gr.y" +#line 402 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_contains); ;} break; case 79: -#line 401 "engines/director/lingo/lingo-gr.y" +#line 403 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_starts); ;} break; case 80: -#line 402 "engines/director/lingo/lingo-gr.y" - { (yyval.code) = (yyvsp[(2) - (2)].code); ;} +#line 404 "engines/director/lingo/lingo-gr.y" + { g_lingo->code1(g_lingo->c_intersects); ;} break; case 81: -#line 403 "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) - (2)].code); ;} break; case 82: -#line 404 "engines/director/lingo/lingo-gr.y" - { (yyval.code) = (yyvsp[(2) - (3)].code); ;} +#line 406 "engines/director/lingo/lingo-gr.y" + { (yyval.code) = (yyvsp[(2) - (2)].code); g_lingo->code1(g_lingo->c_negate); ;} break; case 83: #line 407 "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); ;} + { (yyval.code) = (yyvsp[(2) - (3)].code); ;} break; case 84: -#line 408 "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); ;} +#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: -#line 409 "engines/director/lingo/lingo-gr.y" +#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: +#line 412 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_printtop); ;} break; - case 87: -#line 411 "engines/director/lingo/lingo-gr.y" + case 88: +#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 89: -#line 416 "engines/director/lingo/lingo-gr.y" + case 90: +#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 90: -#line 417 "engines/director/lingo/lingo-gr.y" + case 91: +#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 91: -#line 428 "engines/director/lingo/lingo-gr.y" + case 92: +#line 431 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_gotoloop); ;} break; - case 92: -#line 429 "engines/director/lingo/lingo-gr.y" + case 93: +#line 432 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_gotonext); ;} break; - case 93: -#line 430 "engines/director/lingo/lingo-gr.y" + case 94: +#line 433 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_gotoprevious); ;} break; - case 94: -#line 431 "engines/director/lingo/lingo-gr.y" + case 95: +#line 434 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_goto); g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str()); @@ -2300,8 +2300,8 @@ yyreduce: delete (yyvsp[(2) - (2)].s); ;} break; - case 95: -#line 436 "engines/director/lingo/lingo-gr.y" + case 96: +#line 439 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_goto); g_lingo->codeString((yyvsp[(2) - (3)].s)->c_str()); @@ -2310,8 +2310,8 @@ yyreduce: delete (yyvsp[(3) - (3)].s); ;} break; - case 96: -#line 442 "engines/director/lingo/lingo-gr.y" + case 97: +#line 445 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_goto); g_lingo->codeString(""); @@ -2319,48 +2319,48 @@ yyreduce: delete (yyvsp[(2) - (2)].s); ;} break; - case 97: -#line 449 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = (yyvsp[(3) - (3)].s); ;} - break; - case 98: -#line 450 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = (yyvsp[(2) - (2)].s); ;} +#line 452 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = (yyvsp[(3) - (3)].s); ;} break; case 99: -#line 451 "engines/director/lingo/lingo-gr.y" +#line 453 "engines/director/lingo/lingo-gr.y" { (yyval.s) = (yyvsp[(2) - (2)].s); ;} break; case 100: -#line 452 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = (yyvsp[(1) - (1)].s); ;} +#line 454 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = (yyvsp[(2) - (2)].s); ;} break; case 101: #line 455 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = (yyvsp[(3) - (3)].s); ;} + { (yyval.s) = (yyvsp[(1) - (1)].s); ;} break; case 102: -#line 456 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = (yyvsp[(2) - (2)].s); ;} +#line 458 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = (yyvsp[(3) - (3)].s); ;} break; case 103: -#line 457 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = (yyvsp[(3) - (3)].s); ;} +#line 459 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = (yyvsp[(2) - (2)].s); ;} break; case 104: -#line 485 "engines/director/lingo/lingo-gr.y" - { g_lingo->_indef = true; ;} +#line 460 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = (yyvsp[(3) - (3)].s); ;} break; case 105: -#line 486 "engines/director/lingo/lingo-gr.y" +#line 488 "engines/director/lingo/lingo-gr.y" + { g_lingo->_indef = true; ;} + break; + + case 106: +#line 489 "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); @@ -2368,20 +2368,20 @@ yyreduce: g_lingo->_indef = false; ;} break; - case 106: -#line 491 "engines/director/lingo/lingo-gr.y" + case 107: +#line 494 "engines/director/lingo/lingo-gr.y" { g_lingo->codeFactory(*(yyvsp[(2) - (2)].s)); ;} break; - case 107: -#line 494 "engines/director/lingo/lingo-gr.y" + case 108: +#line 497 "engines/director/lingo/lingo-gr.y" { g_lingo->_indef = true; ;} break; - case 108: -#line 495 "engines/director/lingo/lingo-gr.y" + case 109: +#line 498 "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); @@ -2389,33 +2389,33 @@ yyreduce: g_lingo->_indef = false; ;} break; - case 109: -#line 500 "engines/director/lingo/lingo-gr.y" + case 110: +#line 503 "engines/director/lingo/lingo-gr.y" { (yyval.narg) = 0; ;} break; - case 110: -#line 501 "engines/director/lingo/lingo-gr.y" + case 111: +#line 504 "engines/director/lingo/lingo-gr.y" { g_lingo->codeArg((yyvsp[(1) - (1)].s)); (yyval.narg) = 1; ;} break; - case 111: -#line 502 "engines/director/lingo/lingo-gr.y" + case 112: +#line 505 "engines/director/lingo/lingo-gr.y" { g_lingo->codeArg((yyvsp[(3) - (3)].s)); (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;} break; - case 112: -#line 503 "engines/director/lingo/lingo-gr.y" + case 113: +#line 506 "engines/director/lingo/lingo-gr.y" { g_lingo->codeArg((yyvsp[(4) - (4)].s)); (yyval.narg) = (yyvsp[(1) - (4)].narg) + 1; ;} break; - case 113: -#line 505 "engines/director/lingo/lingo-gr.y" + case 114: +#line 508 "engines/director/lingo/lingo-gr.y" { g_lingo->codeArgStore(); ;} break; - case 114: -#line 509 "engines/director/lingo/lingo-gr.y" + case 115: +#line 512 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_call); g_lingo->codeString((yyvsp[(1) - (3)].s)->c_str()); @@ -2424,18 +2424,18 @@ yyreduce: g_lingo->code1(numpar); ;} break; - case 115: -#line 517 "engines/director/lingo/lingo-gr.y" + case 116: +#line 520 "engines/director/lingo/lingo-gr.y" { (yyval.narg) = 0; ;} break; - case 116: -#line 518 "engines/director/lingo/lingo-gr.y" + case 117: +#line 521 "engines/director/lingo/lingo-gr.y" { (yyval.narg) = 1; ;} break; - case 117: -#line 519 "engines/director/lingo/lingo-gr.y" + case 118: +#line 522 "engines/director/lingo/lingo-gr.y" { (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;} break; @@ -2655,6 +2655,6 @@ yyreturn: } -#line 522 "engines/director/lingo/lingo-gr.y" +#line 525 "engines/director/lingo/lingo-gr.y" diff --git a/engines/director/lingo/lingo-gr.h b/engines/director/lingo/lingo-gr.h index a459ac97b9..425c5745ad 100644 --- a/engines/director/lingo/lingo-gr.h +++ b/engines/director/lingo/lingo-gr.h @@ -92,7 +92,8 @@ tNOT = 308, tCONCAT = 309, tCONTAINS = 310, - tSTARTS = 311 + tSTARTS = 311, + tINTERSECTS = 312 }; #endif /* Tokens. */ @@ -150,6 +151,7 @@ #define tCONCAT 309 #define tCONTAINS 310 #define tSTARTS 311 +#define tINTERSECTS 312 @@ -166,7 +168,7 @@ typedef union YYSTYPE int narg; /* number of arguments */ } /* Line 1529 of yacc.c. */ -#line 170 "engines/director/lingo/lingo-gr.hpp" +#line 172 "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 ed3fb11fcb..f949544f3e 100644 --- a/engines/director/lingo/lingo-gr.y +++ b/engines/director/lingo/lingo-gr.y @@ -85,12 +85,14 @@ 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 %type asgn begin elseif elsestmtoneliner end expr if repeatwhile repeatwith stmtlist %type gotoframe gotomovie %type argdef arglist %right '=' +%left tINTERSECTS %left '+' '-' %left '*' '/' '%' %right UNARY @@ -399,6 +401,7 @@ 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; } diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp index 0284905e1d..2089bf13d9 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 51 -#define YY_END_OF_BUFFER 52 +#define YY_NUM_RULES 52 +#define YY_END_OF_BUFFER 53 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -373,27 +373,27 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[172] = +static yyconst flex_int16_t yy_accept[179] = { 0, - 0, 0, 52, 50, 3, 48, 48, 50, 50, 47, - 47, 47, 46, 47, 47, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 2, 2, 3, 48, 0, 0, 48, 0, - 0, 49, 43, 1, 45, 46, 42, 40, 41, 44, - 44, 44, 44, 44, 44, 44, 44, 44, 44, 16, - 7, 44, 44, 44, 44, 44, 44, 44, 44, 26, - 27, 44, 44, 44, 44, 44, 44, 36, 44, 44, - 2, 2, 0, 1, 45, 4, 44, 44, 44, 11, - 44, 44, 44, 44, 44, 44, 44, 20, 44, 44, - - 44, 25, 44, 29, 44, 31, 44, 44, 44, 44, - 44, 0, 44, 6, 10, 13, 44, 44, 44, 17, - 18, 44, 44, 44, 44, 24, 44, 44, 44, 0, - 35, 38, 44, 37, 9, 44, 44, 14, 44, 19, - 44, 44, 23, 44, 44, 44, 34, 39, 0, 44, - 44, 15, 44, 22, 44, 30, 32, 0, 0, 44, - 12, 21, 44, 0, 8, 5, 28, 0, 0, 33, - 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 } ; static yyconst flex_int32_t yy_ec[256] = @@ -438,53 +438,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[177] = +static yyconst flex_int16_t yy_base[184] = { 0, - 0, 59, 359, 419, 63, 67, 71, 75, 351, 419, + 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, 419, 419, 0, 90, 163, 419, 419, 419, 0, + 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, 229, 229, 229, 225, 232, 239, - - 234, 0, 233, 0, 249, 0, 240, 267, 247, 250, - 254, 260, 269, 0, 0, 0, 259, 266, 273, 0, - 0, 263, 280, 271, 277, 0, 278, 287, 272, 192, - 0, 0, 286, 0, 311, 283, 281, 0, 290, 0, - 284, 300, 0, 293, 291, 293, 330, 0, 331, 301, - 300, 0, 307, 0, 307, 0, 0, 343, 321, 312, - 0, 0, 318, 330, 419, 0, 0, 350, 351, 356, - 419, 394, 396, 402, 407, 412 + 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 } ; -static yyconst flex_int16_t yy_def[177] = +static yyconst flex_int16_t yy_def[184] = { 0, - 171, 1, 171, 171, 171, 171, 171, 171, 172, 171, - 171, 171, 171, 171, 171, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 171, 171, 171, 171, 171, 171, 171, 171, - 172, 171, 171, 174, 171, 171, 171, 171, 171, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 171, 171, 171, 174, 171, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - - 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 171, 173, 173, 173, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 173, 173, 173, 175, - 173, 173, 173, 173, 171, 173, 173, 173, 173, 173, - 173, 173, 173, 173, 173, 173, 175, 173, 171, 173, - 173, 173, 173, 173, 173, 173, 173, 171, 171, 173, - 173, 173, 173, 171, 171, 173, 173, 171, 176, 176, - 0, 171, 171, 171, 171, 171 + 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 } ; -static yyconst flex_int16_t yy_nxt[480] = +static yyconst flex_int16_t yy_nxt[487] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 4, 13, 14, 10, 15, 16, 17, 18, 19, 20, 21, @@ -506,41 +508,42 @@ static yyconst flex_int16_t yy_nxt[480] = 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, 130, 96, 98, 130, 99, 100, 101, + 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, 124, 110, 111, 120, 121, 122, 123, - 112, 125, 113, 114, 116, 126, 127, 128, 130, 129, - 117, 130, 118, 132, 133, 134, 119, 124, 135, 120, - 121, 122, 123, 136, 138, 125, 137, 139, 126, 127, - 140, 128, 129, 131, 141, 143, 132, 133, 142, 134, - - 144, 145, 135, 146, 148, 150, 153, 136, 138, 137, - 151, 139, 149, 140, 152, 149, 131, 154, 141, 143, - 155, 142, 156, 157, 144, 145, 146, 160, 148, 150, - 153, 158, 149, 151, 158, 149, 161, 152, 162, 163, - 165, 154, 166, 155, 158, 156, 157, 158, 167, 168, - 160, 169, 169, 159, 169, 169, 42, 171, 171, 161, - 171, 162, 163, 171, 165, 166, 171, 171, 171, 171, - 164, 167, 171, 168, 171, 171, 171, 159, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 164, 41, 41, 171, 41, 41, 41, - - 50, 50, 84, 84, 171, 171, 84, 84, 147, 171, - 171, 171, 147, 170, 171, 171, 171, 170, 3, 171, - 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, 171 + 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 } ; -static yyconst flex_int16_t yy_chk[480] = +static yyconst flex_int16_t yy_chk[487] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -562,38 +565,39 @@ static yyconst flex_int16_t yy_chk[480] = 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, 130, 63, 65, 130, 66, 67, 68, + 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, 96, 97, 98, - 83, 100, 87, 88, 91, 101, 103, 105, 108, 107, - 92, 108, 93, 109, 110, 111, 94, 99, 112, 95, - 96, 97, 98, 113, 118, 100, 117, 119, 101, 103, - 122, 105, 107, 108, 123, 125, 109, 110, 124, 111, - - 127, 128, 112, 129, 133, 136, 141, 113, 118, 117, - 137, 119, 135, 122, 139, 135, 108, 142, 123, 125, - 144, 124, 145, 146, 127, 128, 129, 150, 133, 136, - 141, 147, 149, 137, 147, 149, 151, 139, 153, 155, - 159, 142, 160, 144, 158, 145, 146, 158, 163, 164, - 150, 168, 169, 149, 168, 169, 9, 170, 3, 151, - 170, 153, 155, 0, 159, 160, 0, 0, 0, 0, - 158, 163, 0, 164, 0, 0, 0, 149, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 158, 172, 172, 0, 172, 172, 172, - - 173, 173, 174, 174, 0, 0, 174, 174, 175, 0, - 0, 0, 175, 176, 0, 0, 0, 176, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 171, 171, 171 + 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 } ; static yy_state_type yy_last_accepting_state; @@ -658,7 +662,7 @@ static void countnl() { g_lingo->_colnumber = strlen(p); } -#line 662 "engines/director/lingo/lingo-lex.cpp" +#line 666 "engines/director/lingo/lingo-lex.cpp" #define INITIAL 0 @@ -846,7 +850,7 @@ YY_DECL #line 60 "engines/director/lingo/lingo-lex.l" -#line 850 "engines/director/lingo/lingo-lex.cpp" +#line 854 "engines/director/lingo/lingo-lex.cpp" if ( !(yy_init) ) { @@ -900,13 +904,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 >= 172 ) + if ( yy_current_state >= 179 ) 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] != 419 ); + while ( yy_base[yy_current_state] != 426 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1015,86 +1019,91 @@ YY_RULE_SETUP case 17: YY_RULE_SETUP #line 79 "engines/director/lingo/lingo-lex.l" -{ count(); return tINTO; } +{ count(); return tINTERSECTS; } YY_BREAK case 18: YY_RULE_SETUP #line 80 "engines/director/lingo/lingo-lex.l" -{ count(); return tLOOP; } +{ count(); return tINTO; } YY_BREAK case 19: YY_RULE_SETUP #line 81 "engines/director/lingo/lingo-lex.l" -{ count(); return tMACRO; } +{ count(); return tLOOP; } YY_BREAK case 20: YY_RULE_SETUP #line 82 "engines/director/lingo/lingo-lex.l" -{ count(); return tMCI; } +{ count(); return tMACRO; } YY_BREAK case 21: YY_RULE_SETUP #line 83 "engines/director/lingo/lingo-lex.l" -{ count(); return tMCIWAIT; } +{ count(); return tMCI; } YY_BREAK case 22: YY_RULE_SETUP #line 84 "engines/director/lingo/lingo-lex.l" -{ count(); return tMETHOD; } +{ count(); return tMCIWAIT; } YY_BREAK case 23: YY_RULE_SETUP #line 85 "engines/director/lingo/lingo-lex.l" -{ count(); return tMOVIE; } +{ count(); return tMETHOD; } YY_BREAK case 24: YY_RULE_SETUP #line 86 "engines/director/lingo/lingo-lex.l" -{ count(); return tNEXT; } +{ count(); return tMOVIE; } YY_BREAK case 25: YY_RULE_SETUP #line 87 "engines/director/lingo/lingo-lex.l" -{ count(); return tNOT; } +{ count(); return tNEXT; } YY_BREAK case 26: YY_RULE_SETUP #line 88 "engines/director/lingo/lingo-lex.l" -{ count(); return tOF; } +{ count(); return tNOT; } YY_BREAK case 27: YY_RULE_SETUP #line 89 "engines/director/lingo/lingo-lex.l" -{ count(); return tOR; } +{ count(); return tOF; } YY_BREAK case 28: YY_RULE_SETUP #line 90 "engines/director/lingo/lingo-lex.l" -{ count(); return tPREVIOUS; } +{ count(); return tOR; } YY_BREAK case 29: YY_RULE_SETUP #line 91 "engines/director/lingo/lingo-lex.l" -{ count(); return tPUT; } +{ count(); return tPREVIOUS; } YY_BREAK case 30: YY_RULE_SETUP #line 92 "engines/director/lingo/lingo-lex.l" -{ count(); return tREPEAT; } +{ count(); return tPUT; } YY_BREAK case 31: YY_RULE_SETUP #line 93 "engines/director/lingo/lingo-lex.l" -{ count(); return tSET; } +{ count(); return tREPEAT; } YY_BREAK case 32: YY_RULE_SETUP #line 94 "engines/director/lingo/lingo-lex.l" -{ count(); return tSTARTS; } +{ count(); return tSET; } YY_BREAK case 33: YY_RULE_SETUP #line 95 "engines/director/lingo/lingo-lex.l" +{ count(); return tSTARTS; } + YY_BREAK +case 34: +YY_RULE_SETUP +#line 96 "engines/director/lingo/lingo-lex.l" { count(); @@ -1136,9 +1145,9 @@ YY_RULE_SETUP error("Unhandled the entity %s", ptr); } YY_BREAK -case 34: +case 35: YY_RULE_SETUP -#line 135 "engines/director/lingo/lingo-lex.l" +#line 136 "engines/director/lingo/lingo-lex.l" { count(); @@ -1159,54 +1168,54 @@ YY_RULE_SETUP error("Unhandled the entity %s", ptr); } YY_BREAK -case 35: -YY_RULE_SETUP -#line 154 "engines/director/lingo/lingo-lex.l" -{ count(); return tTHEN; } - YY_BREAK case 36: YY_RULE_SETUP #line 155 "engines/director/lingo/lingo-lex.l" -{ count(); return tTO; } +{ count(); return tTHEN; } YY_BREAK case 37: YY_RULE_SETUP #line 156 "engines/director/lingo/lingo-lex.l" -{ count(); return tWITH; } +{ count(); return tTO; } YY_BREAK case 38: YY_RULE_SETUP #line 157 "engines/director/lingo/lingo-lex.l" -{ count(); return tWHEN; } +{ count(); return tWITH; } YY_BREAK case 39: YY_RULE_SETUP #line 158 "engines/director/lingo/lingo-lex.l" -{ count(); return tWHILE; } +{ count(); return tWHEN; } YY_BREAK case 40: YY_RULE_SETUP -#line 160 "engines/director/lingo/lingo-lex.l" -{ count(); return tNEQ; } +#line 159 "engines/director/lingo/lingo-lex.l" +{ count(); return tWHILE; } YY_BREAK case 41: YY_RULE_SETUP #line 161 "engines/director/lingo/lingo-lex.l" -{ count(); return tGE; } +{ count(); return tNEQ; } YY_BREAK case 42: YY_RULE_SETUP #line 162 "engines/director/lingo/lingo-lex.l" -{ count(); return tLE; } +{ count(); return tGE; } YY_BREAK case 43: YY_RULE_SETUP #line 163 "engines/director/lingo/lingo-lex.l" -{ count(); return tCONCAT; } +{ count(); return tLE; } YY_BREAK case 44: YY_RULE_SETUP -#line 165 "engines/director/lingo/lingo-lex.l" +#line 164 "engines/director/lingo/lingo-lex.l" +{ count(); return tCONCAT; } + YY_BREAK +case 45: +YY_RULE_SETUP +#line 166 "engines/director/lingo/lingo-lex.l" { count(); yylval.s = new Common::String(yytext); @@ -1221,43 +1230,43 @@ YY_RULE_SETUP return ID; } YY_BREAK -case 45: -YY_RULE_SETUP -#line 178 "engines/director/lingo/lingo-lex.l" -{ count(); yylval.f = atof(yytext); return FLOAT; } - YY_BREAK case 46: YY_RULE_SETUP #line 179 "engines/director/lingo/lingo-lex.l" -{ count(); yylval.i = strtol(yytext, NULL, 10); return INT; } +{ count(); yylval.f = atof(yytext); return FLOAT; } YY_BREAK case 47: YY_RULE_SETUP #line 180 "engines/director/lingo/lingo-lex.l" -{ count(); return *yytext; } +{ count(); yylval.i = strtol(yytext, NULL, 10); return INT; } YY_BREAK case 48: -/* rule 48 can match eol */ YY_RULE_SETUP #line 181 "engines/director/lingo/lingo-lex.l" -{ return '\n'; } +{ count(); return *yytext; } YY_BREAK case 49: +/* rule 49 can match eol */ YY_RULE_SETUP #line 182 "engines/director/lingo/lingo-lex.l" -{ count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return STRING; } +{ return '\n'; } 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; } YY_BREAK case 51: YY_RULE_SETUP -#line 185 "engines/director/lingo/lingo-lex.l" +#line 184 "engines/director/lingo/lingo-lex.l" + + YY_BREAK +case 52: +YY_RULE_SETUP +#line 186 "engines/director/lingo/lingo-lex.l" ECHO; YY_BREAK -#line 1261 "engines/director/lingo/lingo-lex.cpp" +#line 1270 "engines/director/lingo/lingo-lex.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1550,7 +1559,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 >= 172 ) + if ( yy_current_state >= 179 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1578,11 +1587,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 >= 172 ) + if ( yy_current_state >= 179 ) 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 == 171); + yy_is_jam = (yy_current_state == 178); return yy_is_jam ? 0 : yy_current_state; } @@ -2257,7 +2266,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 185 "engines/director/lingo/lingo-lex.l" +#line 186 "engines/director/lingo/lingo-lex.l" diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l index f125a01013..5e4deeca2a 100644 --- a/engines/director/lingo/lingo-lex.l +++ b/engines/director/lingo/lingo-lex.l @@ -76,6 +76,7 @@ whitespace [\t ] (?i:frame) { count(); return tFRAME; } (?i:global) { count(); return tGLOBAL; } (?i:go) { count(); return tGO; } +(?i:intersects) { count(); return tINTERSECTS; } (?i:into) { count(); return tINTO; } (?i:loop) { count(); return tLOOP; } (?i:macro) { count(); return tMACRO; } diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h index 0afef2fa7e..f1fa45d5dd 100644 --- a/engines/director/lingo/lingo.h +++ b/engines/director/lingo/lingo.h @@ -203,6 +203,8 @@ public: static void c_contains(); static void c_starts(); + static void c_intersects(); + static void c_constpush(); static void c_fconstpush(); static void c_stringpush(); -- cgit v1.2.3