diff options
author | Eugene Sandulenko | 2017-01-11 19:16:48 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2017-01-11 19:27:19 +0100 |
commit | 74f008e14e52086e5081633abe3844ec8bb872a1 (patch) | |
tree | c37dd3b2090a6dc55d264295572c753876cc0e31 /engines | |
parent | 8eb8f9b0ef79b47fc8e149d5b86034bf99e2c9ce (diff) | |
download | scummvm-rg350-74f008e14e52086e5081633abe3844ec8bb872a1.tar.gz scummvm-rg350-74f008e14e52086e5081633abe3844ec8bb872a1.tar.bz2 scummvm-rg350-74f008e14e52086e5081633abe3844ec8bb872a1.zip |
DIRECTOR: Lingo: Proper processing of me() in factories
Diffstat (limited to 'engines')
-rw-r--r-- | engines/director/lingo/lingo-codegen.cpp | 29 | ||||
-rw-r--r-- | engines/director/lingo/lingo-gr.cpp | 986 | ||||
-rw-r--r-- | engines/director/lingo/lingo-gr.y | 2 | ||||
-rw-r--r-- | engines/director/lingo/lingo-lex.cpp | 24 | ||||
-rw-r--r-- | engines/director/lingo/lingo-lex.l | 6 | ||||
-rw-r--r-- | engines/director/lingo/lingo.h | 1 |
6 files changed, 543 insertions, 505 deletions
diff --git a/engines/director/lingo/lingo-codegen.cpp b/engines/director/lingo/lingo-codegen.cpp index 335dad2c39..930e9924ec 100644 --- a/engines/director/lingo/lingo-codegen.cpp +++ b/engines/director/lingo/lingo-codegen.cpp @@ -298,17 +298,24 @@ void Lingo::codeArgStore() { int Lingo::codeFunc(Common::String *s, int numpar) { int ret = g_lingo->code1(g_lingo->c_call); - if (!_currentFactory.empty() && s->equalsIgnoreCase("me")) { - if (!g_lingo->_currentFactory.empty()) { - g_lingo->codeString(g_lingo->_currentFactory.c_str()); - debugC(2, kDebugLingoCompile, "Replaced 'me' with %s", g_lingo->_currentFactory.c_str()); - } else { - warning("'me' out of factory method"); - g_lingo->codeString(s->c_str()); - } - } else { - g_lingo->codeString(s->c_str()); - } + g_lingo->codeString(s->c_str()); + + inst num = 0; + WRITE_UINT32(&num, numpar); + g_lingo->code1(num); + + return ret; +} + +int Lingo::codeMe(Common::String *method, int numpar) { + int ret = g_lingo->code1(g_lingo->c_call); + + Common::String m(g_lingo->_currentFactory); + + m += '-'; + m += *method; + + g_lingo->codeString(m.c_str()); inst num = 0; WRITE_UINT32(&num, numpar); diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp index 7fca7bea7d..916072fc49 100644 --- a/engines/director/lingo/lingo-gr.cpp +++ b/engines/director/lingo/lingo-gr.cpp @@ -518,18 +518,18 @@ union yyalloc #endif /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 106 +#define YYFINAL 108 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 1585 +#define YYLAST 1596 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 94 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 39 /* YYNRULES -- Number of rules. */ -#define YYNRULES 147 +#define YYNRULES 149 /* YYNRULES -- Number of states. */ -#define YYNSTATES 319 +#define YYNSTATES 326 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 @@ -593,10 +593,10 @@ static const yytype_uint16 yyprhs[] = 313, 317, 321, 325, 329, 333, 336, 339, 343, 348, 353, 358, 365, 370, 377, 382, 389, 394, 401, 404, 406, 408, 411, 413, 416, 419, 422, 425, 427, 432, - 435, 440, 443, 447, 449, 453, 455, 459, 462, 465, - 468, 471, 475, 478, 481, 483, 487, 490, 493, 496, - 500, 503, 504, 513, 516, 517, 526, 527, 528, 539, - 540, 542, 546, 551, 552, 556, 557, 559 + 435, 440, 447, 452, 455, 459, 461, 465, 467, 471, + 474, 477, 480, 483, 487, 490, 493, 495, 499, 502, + 505, 508, 512, 515, 516, 525, 528, 529, 538, 539, + 540, 551, 552, 554, 558, 563, 564, 568, 569, 571 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ @@ -645,20 +645,21 @@ static const yytype_int16 yyrhs[] = -1, 41, 116, -1, 120, -1, 123, -1, 29, 42, -1, 29, -1, 31, 118, -1, 56, 119, -1, 18, 116, -1, 17, 116, -1, 17, -1, 19, 89, 132, - 90, -1, 19, 132, -1, 52, 116, 47, 116, -1, - 52, 116, -1, 20, 21, 132, -1, 21, -1, 118, - 93, 21, -1, 21, -1, 119, 93, 21, -1, 32, - 35, -1, 32, 38, -1, 32, 40, -1, 32, 121, - -1, 32, 121, 122, -1, 32, 122, -1, 30, 116, - -1, 116, -1, 39, 37, 116, -1, 37, 116, -1, - 53, 54, -1, 53, 121, -1, 53, 121, 122, -1, - 53, 122, -1, -1, 36, 21, 125, 112, 129, 96, - 130, 114, -1, 50, 21, -1, -1, 51, 21, 126, - 112, 129, 96, 130, 114, -1, -1, -1, 79, 21, - 127, 112, 128, 129, 96, 130, 114, 25, -1, -1, - 21, -1, 129, 93, 21, -1, 129, 96, 93, 21, - -1, -1, 21, 112, 132, -1, -1, 116, -1, 132, - 93, 116, -1 + 90, -1, 19, 132, -1, 80, 89, 21, 90, -1, + 80, 89, 21, 93, 132, 90, -1, 52, 116, 47, + 116, -1, 52, 116, -1, 20, 21, 132, -1, 21, + -1, 118, 93, 21, -1, 21, -1, 119, 93, 21, + -1, 32, 35, -1, 32, 38, -1, 32, 40, -1, + 32, 121, -1, 32, 121, 122, -1, 32, 122, -1, + 30, 116, -1, 116, -1, 39, 37, 116, -1, 37, + 116, -1, 53, 54, -1, 53, 121, -1, 53, 121, + 122, -1, 53, 122, -1, -1, 36, 21, 125, 112, + 129, 96, 130, 114, -1, 50, 21, -1, -1, 51, + 21, 126, 112, 129, 96, 130, 114, -1, -1, -1, + 79, 21, 127, 112, 128, 129, 96, 130, 114, 25, + -1, -1, 21, -1, 129, 93, 21, -1, 129, 96, + 93, 21, -1, -1, 21, 112, 132, -1, -1, 116, + -1, 132, 93, 116, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ @@ -675,10 +676,10 @@ static const yytype_uint16 yyrline[] = 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 451, 452, 453, 454, 455, 457, 458, 459, 462, 465, 468, 469, - 470, 471, 472, 475, 476, 479, 480, 491, 492, 493, - 494, 497, 500, 505, 506, 509, 510, 513, 514, 517, - 520, 550, 550, 556, 559, 559, 564, 565, 564, 575, - 576, 577, 578, 580, 584, 592, 593, 594 + 470, 471, 472, 473, 474, 477, 478, 481, 482, 493, + 494, 495, 496, 499, 502, 507, 508, 511, 512, 515, + 516, 519, 522, 552, 552, 558, 561, 561, 566, 567, + 566, 577, 578, 579, 580, 582, 586, 594, 595, 596 }; #endif @@ -742,10 +743,10 @@ static const yytype_uint8 yyr1[] = 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 117, 118, 118, 119, 119, 120, 120, 120, - 120, 120, 120, 121, 121, 122, 122, 123, 123, 123, - 123, 125, 124, 124, 126, 124, 127, 128, 124, 129, - 129, 129, 129, 130, 131, 132, 132, 132 + 117, 117, 117, 117, 117, 118, 118, 119, 119, 120, + 120, 120, 120, 120, 120, 121, 121, 122, 122, 123, + 123, 123, 123, 125, 124, 124, 126, 124, 127, 128, + 124, 129, 129, 129, 129, 130, 131, 132, 132, 132 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -762,10 +763,10 @@ static const yytype_uint8 yyr2[] = 3, 3, 3, 3, 3, 2, 2, 3, 4, 4, 4, 6, 4, 6, 4, 6, 4, 6, 2, 1, 1, 2, 1, 2, 2, 2, 2, 1, 4, 2, - 4, 2, 3, 1, 3, 1, 3, 2, 2, 2, - 2, 3, 2, 2, 1, 3, 2, 2, 2, 3, - 2, 0, 8, 2, 0, 8, 0, 0, 10, 0, - 1, 3, 4, 0, 3, 0, 1, 3 + 4, 6, 4, 2, 3, 1, 3, 1, 3, 2, + 2, 2, 2, 3, 2, 2, 1, 3, 2, 2, + 2, 3, 2, 0, 8, 2, 0, 8, 0, 0, + 10, 0, 1, 3, 4, 0, 3, 0, 1, 3 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -773,95 +774,97 @@ static const yytype_uint8 yyr2[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 0, 0, 57, 64, 0, 58, 61, 107, 0, 145, + 0, 0, 57, 64, 0, 58, 61, 107, 0, 147, 0, 51, 60, 59, 102, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, - 66, 23, 11, 24, 0, 0, 0, 0, 21, 8, - 99, 100, 7, 9, 5, 4, 63, 0, 66, 65, - 106, 105, 145, 146, 109, 145, 145, 145, 101, 113, - 103, 0, 117, 0, 118, 0, 119, 124, 120, 122, - 131, 98, 0, 47, 0, 0, 0, 0, 133, 134, - 111, 127, 128, 130, 115, 104, 79, 0, 0, 0, - 0, 0, 136, 85, 86, 0, 1, 6, 0, 0, - 0, 0, 44, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 146, 0, 0, 112, 0, 144, 0, 123, - 126, 0, 121, 51, 0, 0, 0, 48, 0, 0, - 0, 0, 0, 56, 51, 0, 129, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 51, 87, - 2, 0, 52, 0, 0, 51, 0, 28, 75, 76, - 74, 77, 78, 71, 81, 82, 83, 84, 80, 67, - 68, 69, 70, 72, 73, 108, 147, 62, 114, 125, - 139, 12, 13, 14, 19, 16, 0, 0, 18, 15, - 139, 110, 116, 90, 0, 92, 0, 94, 0, 96, - 0, 88, 89, 137, 53, 0, 46, 53, 0, 45, - 140, 0, 20, 17, 0, 0, 0, 0, 0, 139, - 52, 0, 0, 52, 52, 22, 0, 143, 143, 91, - 93, 95, 97, 0, 54, 55, 0, 0, 52, 51, - 32, 141, 0, 53, 53, 143, 25, 52, 53, 29, - 53, 0, 50, 51, 52, 40, 0, 142, 132, 135, - 53, 53, 52, 52, 52, 42, 38, 0, 0, 39, - 35, 0, 0, 52, 0, 0, 37, 0, 0, 52, - 51, 52, 51, 138, 0, 26, 30, 31, 51, 33, - 0, 34, 0, 27, 52, 36, 52, 43, 41 + 3, 66, 23, 11, 24, 0, 0, 0, 0, 21, + 8, 99, 100, 7, 9, 5, 4, 63, 0, 66, + 65, 106, 105, 147, 148, 109, 147, 147, 147, 101, + 115, 103, 0, 119, 0, 120, 0, 121, 126, 122, + 124, 133, 98, 0, 47, 0, 0, 0, 0, 135, + 136, 113, 129, 130, 132, 117, 104, 79, 0, 0, + 0, 0, 0, 138, 0, 85, 86, 0, 1, 6, + 0, 0, 0, 0, 44, 52, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 148, 0, 0, 114, 0, 146, + 0, 125, 128, 0, 123, 51, 0, 0, 0, 48, + 0, 0, 0, 0, 0, 56, 51, 0, 131, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 51, 0, 87, 2, 0, 52, 0, 0, 51, 0, + 28, 75, 76, 74, 77, 78, 71, 81, 82, 83, + 84, 80, 67, 68, 69, 70, 72, 73, 108, 149, + 62, 116, 127, 141, 12, 13, 14, 19, 16, 0, + 0, 18, 15, 141, 112, 118, 90, 0, 92, 0, + 94, 0, 96, 0, 88, 89, 139, 110, 147, 53, + 0, 46, 53, 0, 45, 142, 0, 20, 17, 0, + 0, 0, 0, 0, 141, 0, 52, 0, 0, 52, + 52, 22, 0, 145, 145, 91, 93, 95, 97, 0, + 111, 54, 55, 0, 0, 52, 51, 32, 143, 0, + 53, 53, 145, 25, 52, 53, 29, 53, 0, 50, + 51, 52, 40, 0, 144, 134, 137, 53, 53, 52, + 52, 52, 42, 38, 0, 0, 39, 35, 0, 0, + 52, 0, 0, 37, 0, 0, 52, 51, 52, 51, + 140, 0, 26, 30, 31, 51, 33, 0, 34, 0, + 27, 52, 36, 52, 43, 41 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 38, 254, 39, 58, 41, 255, 43, 301, 284, - 285, 275, 286, 111, 44, 45, 46, 276, 312, 177, - 240, 47, 48, 245, 70, 95, 50, 78, 79, 51, - 52, 143, 154, 168, 239, 231, 263, 53, 64 + -1, 39, 261, 40, 59, 42, 262, 44, 308, 291, + 292, 282, 293, 113, 45, 46, 47, 283, 319, 180, + 246, 48, 49, 251, 71, 96, 51, 79, 80, 52, + 53, 145, 156, 170, 244, 236, 270, 54, 65 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -255 +#define YYPACT_NINF -256 static const yytype_int16 yypact[] = { - 306, -63, -255, -255, 859, -255, -255, 859, 859, 897, - 6, 1493, -255, -255, 11, 37, 757, -255, 47, 859, - -2, 90, 54, 59, 61, 859, 823, 64, 859, 859, - 859, 859, 859, 859, 76, 859, 859, 859, 4, -255, - 8, -255, -255, -255, 12, 19, 933, 859, 1462, -255, - -255, -255, -255, -255, -255, -255, 17, 859, -255, 1462, - 1462, 1462, 859, 1462, 15, 859, 859, 859, -255, -255, - 21, 859, -255, 859, -255, 75, -255, 1462, 42, -255, - -255, 957, 98, -255, -40, 859, -38, 77, -255, -255, - 1307, -255, 42, -255, -255, 29, -56, 993, 1029, 1065, - 1101, 1338, -255, -56, -56, 1400, -255, 385, 933, 859, - 933, 82, 1431, 1462, 859, 859, 859, 859, 859, 859, - 859, 859, 859, 859, 859, 859, 859, 859, 859, 859, - 859, 957, 1400, -30, 859, 15, -20, 15, 106, 1462, - 1462, 859, -255, -255, 107, 859, 859, -255, 859, 859, - 1276, 859, 859, -255, -255, 859, -255, 109, 859, 859, - 859, 859, 859, 859, 859, 859, 859, 859, -255, -255, - -255, 46, 1462, 49, 1369, -63, 859, -255, -35, -35, - -35, -56, -56, -56, 1462, 1462, -35, -35, 71, 301, - 301, -56, -56, 1462, 1462, -255, 1462, -255, -255, 1462, - 111, -255, 1462, 1462, 1462, 1462, 859, 859, 1462, 1462, - 111, 1462, -255, 1462, 1137, 1462, 1173, 1462, 1209, 1462, - 1245, 1462, 1462, -255, -255, -3, -255, -255, 691, 1462, - -255, -67, 1462, 1462, -67, 859, 859, 859, 859, 111, - 538, 96, 859, 538, -255, -255, 121, 52, 52, 1462, - 1462, 1462, 1462, -67, -255, -255, 122, 859, 1462, -11, - -9, -255, 125, -255, -255, 52, -255, 1462, -255, -255, - -255, 120, -255, -255, 120, -255, 933, -255, 538, 538, - -255, -255, 538, 538, 120, 120, -255, 933, 691, -255, - 100, 108, 459, 538, 126, 128, -255, 134, 117, -255, - -255, -255, -255, -255, 139, -255, -255, -255, -19, -255, - 691, -255, 617, -255, 538, -255, -255, -255, -255 + 309, -63, -256, -256, 870, -256, -256, 870, 870, 908, + 14, 1504, -256, -256, -2, 25, 768, -256, 33, 870, + -14, 17, 52, 67, 73, 870, 834, 75, 870, 870, + 870, 870, 870, 870, 76, -15, 870, 870, 870, 10, + -256, 11, -256, -256, -256, -12, 21, 944, 870, 1473, + -256, -256, -256, -256, -256, -256, -256, 15, 870, -256, + 1473, 1473, 1473, 870, 1473, 12, 870, 870, 870, -256, + -256, 13, 870, -256, 870, -256, 70, -256, 1473, 56, + -256, -256, 968, 87, -256, -33, 870, -30, 66, -256, + -256, 1318, -256, 56, -256, -256, 22, -50, 1004, 1040, + 1076, 1112, 1349, -256, 93, -50, -50, 1411, -256, 388, + 944, 870, 944, 74, 1442, 1473, 870, 870, 870, 870, + 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, + 870, 870, 870, 968, 1411, -38, 870, 12, -37, 12, + 96, 1473, 1473, 870, -256, -256, 101, 870, 870, -256, + 870, 870, 1287, 870, 870, -256, -256, 870, -256, 102, + 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, + -256, -26, -256, -256, 34, 1473, 36, 1380, -63, 870, + -256, 65, 65, 65, -50, -50, -50, 1473, 1473, 65, + 65, 730, 160, 160, -50, -50, 1473, 1473, -256, 1473, + -256, -256, 1473, 109, -256, 1473, 1473, 1473, 1473, 870, + 870, 1473, 1473, 109, 1473, -256, 1473, 1148, 1473, 1184, + 1473, 1220, 1473, 1256, 1473, 1473, -256, -256, 870, -256, + 5, -256, -256, 694, 1473, -256, -56, 1473, 1473, -56, + 870, 870, 870, 870, 109, -22, 541, 88, 870, 541, + -256, -256, 115, 44, 44, 1473, 1473, 1473, 1473, -56, + -256, -256, -256, 113, 870, 1473, -4, -6, -256, 119, + -256, -256, 44, -256, 1473, -256, -256, -256, 114, -256, + -256, 114, -256, 944, -256, 541, 541, -256, -256, 541, + 541, 114, 114, -256, 944, 694, -256, 92, 99, 462, + 541, 120, 127, -256, 128, 100, -256, -256, -256, -256, + -256, 129, -256, -256, -256, -1, -256, 694, -256, 620, + -256, 541, -256, -256, -256, -256 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -255, -255, 14, 43, 2, -212, 0, -255, -255, -255, - -91, -241, -114, -86, -255, -255, -255, -254, -10, -12, - -209, -255, 58, 3, -255, -255, -255, 145, -14, -255, - -255, -255, -255, -255, -255, -200, -228, -255, 51 + -256, -256, 8, 46, 3, -225, 0, -256, -256, -256, + -109, -253, -130, -96, -256, -256, -256, -255, -10, -16, + -212, -256, 53, 4, -256, -256, -256, 136, -13, -256, + -256, -256, -256, -256, -256, -195, -228, -256, -61 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -871,328 +874,330 @@ static const yytype_int16 yypgoto[] = #define YYTABLE_NINF -64 static const yytype_int16 yytable[] = { - 42, 67, 40, 49, 106, 148, -53, 151, -10, -53, - 234, 120, 93, 121, 269, 55, 244, 287, 243, 272, - 264, 54, 171, 241, 173, 54, 246, 65, 117, 118, - 287, 119, 120, 289, 121, 129, 130, 280, 270, 253, - 273, 149, 242, 152, 289, 82, 83, 124, 125, 126, - 127, 128, 107, 68, 278, 279, 129, 130, 69, 282, - 195, 283, 59, 134, 142, 60, 61, 63, 80, -53, - 197, 292, 293, 134, 77, 87, 299, 81, 156, 73, - 88, 75, 89, 90, 77, 94, 96, 97, 98, 99, - 100, 101, 54, 103, 104, 105, -10, 102, 315, 314, - 109, 108, 84, 85, 112, 113, 66, 42, 134, 40, - 49, 86, 141, 133, 138, 131, 135, 136, 137, 147, - 132, 153, 157, 63, 63, 63, 175, 198, 201, 139, - 212, 140, 230, 200, 117, 118, 224, 119, 120, 226, - 121, 257, 261, 150, 210, 262, 277, 266, 272, 300, - 170, 305, 302, 306, 125, 126, 127, 128, 223, 307, - 225, 308, 129, 130, 313, 228, 112, 172, 174, 274, - 296, 92, 178, 179, 180, 181, 182, 183, 184, 185, - 186, 187, 188, 189, 190, 191, 192, 193, 194, 227, - 291, 0, 196, 0, 0, 0, 0, 0, 0, 199, - 0, 298, 0, 202, 203, 0, 204, 205, 0, 208, - 209, 0, 0, 211, 0, 0, 213, 214, 215, 216, - 217, 218, 219, 220, 221, 222, 0, 0, 256, 0, - 0, 259, 260, 0, 229, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 247, 268, 0, 248, 271, - 0, 0, 0, 0, 0, 281, 0, 0, 0, 0, - 0, 0, 290, 288, 232, 233, 0, 265, 0, 0, - 294, 295, 297, 0, 0, 0, 0, 0, 0, 0, - 0, 304, 0, 0, 0, 0, 0, 309, 0, 311, - 310, 0, 0, 249, 250, 251, 252, 0, 0, 0, - 258, 0, 317, 0, 318, 0, -6, 1, 0, 0, - 0, 0, 316, 0, 0, 267, 0, 2, 3, 4, - 5, 0, 6, 7, 8, 9, 10, 11, 12, 0, - 13, 0, 0, 0, 112, 14, 0, 15, 16, 17, - 0, 0, 18, 0, 0, 112, 0, 19, 20, 21, - 0, 0, 22, 0, 0, 0, 23, 24, 25, 26, - 0, 0, 27, 0, 117, 118, 0, 119, 120, 0, - 121, 28, 0, 0, 0, 0, 0, 0, 29, 30, - 31, 32, 33, 0, 0, 34, 127, 128, 0, 35, - 36, 0, 129, 130, -6, 37, 2, 3, 4, 5, - 0, 6, 7, 8, 9, 10, 11, 12, 0, 13, - 0, 0, 0, 0, 14, 0, 15, 16, 17, 0, - 0, 18, 0, 0, 0, 0, 19, 20, 21, 0, - 0, 22, 0, 0, 0, 23, 24, 25, 26, 0, - 0, 27, 0, 0, 0, 0, 0, 0, 0, 0, - 28, 0, 0, 0, 0, 0, 0, 29, 30, 31, - 32, 33, 0, 0, 34, 0, 0, 0, 35, 36, - 2, 3, 4, 5, 37, 6, 7, 8, 9, 10, - 56, 12, 0, 13, 303, 0, 0, 0, 14, 0, - 15, 16, 17, 0, 0, 0, 0, 0, 0, 0, - 19, 20, 21, 0, 0, 22, 0, 0, 0, 0, - 0, 25, 26, 0, 0, 27, 0, 0, 0, 0, + 43, 68, 135, 41, 50, 137, 138, 139, 250, 56, + 108, -10, 150, 94, 174, 153, 176, 122, 239, 123, + 249, 276, 279, 294, -53, 55, 271, -53, 296, 85, + 86, 247, 55, 83, 84, 66, 294, 252, 87, 296, + 69, 131, 132, 280, 287, 277, 70, 109, 151, 259, + 248, 154, 198, 200, 81, 136, 136, 60, 285, 286, + 61, 62, 64, 289, 227, 290, 144, 228, 260, 78, + 306, 136, 82, 88, 104, 299, 300, 110, 91, 78, + 158, 97, 98, 99, 100, 101, 102, -53, 89, 105, + 106, 107, 322, 74, 90, 76, 95, 103, 55, -10, + 114, 115, 111, 321, 67, 136, 140, 143, 149, 43, + 155, 133, 41, 50, 171, 159, 134, 201, 178, 64, + 64, 64, 204, 215, 229, 141, 231, 142, 119, 120, + 235, 121, 122, 264, 123, 203, 268, 269, 273, 152, + 284, 307, 279, 309, 315, 312, 213, 126, 127, 128, + 129, 130, 313, 314, 320, 173, 131, 132, 281, 230, + 226, 303, 93, 114, 175, 177, 0, 245, 233, 181, + 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 232, 298, 0, 199, + 0, 0, 0, 0, 0, 0, 202, 0, 305, 0, + 205, 206, 0, 207, 208, 0, 211, 212, 0, 0, + 214, 0, 0, 216, 217, 218, 219, 220, 221, 222, + 223, 224, 225, 119, 120, 0, 121, 122, 0, 123, + 263, 0, 234, 266, 267, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 253, 129, 130, 254, 0, 275, + 0, 131, 132, 0, 0, 0, 278, 0, 288, 0, + 0, 0, 237, 238, 0, 297, 0, 272, 0, 0, + 295, 0, 0, 301, 302, 304, 0, 0, 0, 0, + 0, 64, 0, 0, 311, 0, 0, 0, 0, 0, + 316, 0, 318, 255, 256, 257, 258, 317, 0, 0, + 0, 265, 0, 0, 0, 324, 0, 325, 0, -6, + 1, 0, 0, 0, 0, 0, 0, 274, 0, 323, + 2, 3, 4, 5, 0, 6, 7, 8, 9, 10, + 11, 12, 0, 13, 0, 0, 114, 0, 14, 0, + 15, 16, 17, 0, 0, 18, 0, 114, 0, 0, + 19, 20, 21, 0, 0, 22, 0, 0, 0, 23, + 24, 25, 26, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, - 0, 29, 30, 31, 32, 33, 0, 0, 0, 0, - 0, 0, 35, 36, 0, 0, 0, 54, 37, 2, - 3, 4, 5, 0, 6, 7, 8, 9, 10, 56, + 0, 29, 30, 31, 32, 33, 0, 0, 34, 35, + 0, 0, 36, 37, 0, 0, 0, -6, 38, 2, + 3, 4, 5, 0, 6, 7, 8, 9, 10, 11, 12, 0, 13, 0, 0, 0, 0, 14, 0, 15, - 16, 17, 0, 0, 0, 0, 0, 0, 0, 19, - 20, 21, 0, 0, 22, 0, 0, 0, 0, 0, + 16, 17, 0, 0, 18, 0, 0, 0, 0, 19, + 20, 21, 0, 0, 22, 0, 0, 0, 23, 24, 25, 26, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, - 29, 30, 31, 32, 33, 0, 0, 0, 0, 0, - 0, 35, 36, 0, 0, 0, 54, 37, 2, 3, - 4, 5, 0, 6, 7, 8, 9, 10, 56, 12, - 0, 13, 0, 0, 0, 0, 14, 0, 15, 16, - 17, 0, 0, 0, 0, 0, 0, 0, 19, 20, - 21, 0, 0, 22, 0, 0, 0, 0, 0, 25, - 26, 0, 0, 27, 0, 0, 0, 0, 0, 0, - 0, 0, 28, 0, 0, 0, 0, 0, 0, 29, - 30, 31, 32, 33, 0, 0, 0, 0, 0, 0, - 35, 36, 2, 3, 4, 5, 37, 6, 7, 8, - 9, 10, 56, 12, 0, 13, 0, 0, 0, 0, - 14, 0, 15, 16, 0, 0, 0, 0, 0, 0, - 0, 0, 19, 0, 21, 0, 0, 0, 0, 0, + 29, 30, 31, 32, 33, 0, 0, 34, 35, 0, + 0, 36, 37, 2, 3, 4, 5, 38, 6, 7, + 8, 9, 10, 57, 12, 0, 13, 310, 0, 0, + 0, 14, 0, 15, 16, 17, 0, 0, 0, 0, + 0, 0, 0, 19, 20, 21, 0, 0, 22, 0, + 0, 0, 0, 0, 25, 26, 0, 0, 27, 0, + 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, + 0, 0, 0, 0, 29, 30, 31, 32, 33, 0, + 0, 0, 35, 0, 0, 36, 37, 0, 0, 0, + 55, 38, 2, 3, 4, 5, 0, 6, 7, 8, + 9, 10, 57, 12, 0, 13, 0, 0, 0, 0, + 14, 0, 15, 16, 17, 0, 0, 0, 0, 0, + 0, 0, 19, 20, 21, 0, 0, 22, 0, 0, 0, 0, 0, 25, 26, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, - 0, 0, 0, 29, 30, 31, 32, 33, 2, 3, - 4, 5, 0, 6, 35, 36, 0, 0, 56, 12, - 37, 13, 0, 0, 0, 0, 0, 71, 0, 0, - 0, 0, 72, 0, 73, 74, 75, 76, 57, 0, - 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 29, 30, 31, 32, 33, 0, 0, + 0, 35, 0, 0, 36, 37, 0, 0, 0, 55, + 38, 2, 3, 4, 5, 0, 6, 7, 8, 9, + 10, 57, 12, 0, 13, 0, 0, 0, 0, 14, + 0, 15, 16, 17, 0, 0, 0, 0, 0, 0, + 0, 19, 20, 21, 0, 0, 22, 0, 0, 0, + 0, 0, 25, 26, 0, 0, 27, 0, 0, 0, + 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, + 0, 0, 29, 30, 31, 32, 33, 0, 0, 0, + 35, 0, 0, 36, 37, 2, 3, 4, 5, 38, + 6, 7, 8, 9, 10, 57, 12, 0, 13, 0, + 0, 0, 0, 14, 0, 15, 16, 0, 0, 0, + 0, 0, 0, 0, 0, 19, 0, 21, 0, 0, + 0, 0, 0, 0, 0, 0, 25, 26, 0, 0, + 27, 0, 0, 0, 0, 0, 0, 0, 0, 28, + 0, 0, 0, 0, 0, 0, 29, 30, 31, 32, + 33, 0, 0, 0, 35, 0, 0, 36, 37, 2, + 3, 4, 5, 38, 6, 0, 0, 0, 0, 57, + 12, 0, 13, 119, 120, 0, 121, 122, 72, 123, + 0, 0, 0, 73, 0, 74, 75, 76, 77, 58, + 0, 21, 0, 127, 128, 129, 130, 0, 0, 0, + 0, 131, 132, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, + 29, 30, 31, 32, 33, 2, 3, 4, 5, 0, + 6, 36, 37, 0, 0, 57, 12, 38, 13, 0, + 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, + 0, 74, 0, 76, 0, 58, 0, 21, 0, 0, + 0, 2, 3, 4, 5, 0, 6, 0, 92, 0, + 0, 57, 12, 0, 13, 0, 0, 0, 0, 28, + 0, 0, 0, 0, 0, 0, 29, 30, 31, 32, + 33, 58, 0, 21, 0, 0, 0, 36, 37, 2, + 3, 4, 5, 38, 6, 0, 0, 0, 0, 57, + 12, 0, 13, 0, 0, 28, 0, 0, 0, 0, + 0, 0, 29, 30, 31, 32, 33, 0, 0, 58, + 0, 21, 0, 36, 37, 2, 3, 4, 5, 38, + 6, 0, 0, 0, 0, 57, 12, 0, 13, 0, + 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, + 29, 30, 31, 32, 33, 58, 0, 21, 0, 0, + 0, 36, 37, 0, 0, 0, 0, 63, 0, 0, + 0, 0, 146, 0, 0, 0, 0, 0, 0, 28, + 0, 0, 0, 0, 0, 0, 29, 30, 31, 32, + 33, 0, 0, 0, 0, 116, 117, 36, 37, 0, + 118, 119, 120, 112, 121, 147, 148, 123, 124, 125, + 0, 0, 0, 160, 0, 0, 0, 0, 0, 161, + 126, 127, 128, 129, 130, 0, 0, 0, 0, 131, + 132, 116, 117, 0, 0, 0, 118, 119, 120, 0, + 121, 122, 0, 123, 124, 125, 0, 0, 0, 162, + 0, 0, 0, 0, 0, 163, 126, 127, 128, 129, + 130, 0, 0, 0, 0, 131, 132, 116, 117, 0, + 0, 0, 118, 119, 120, 0, 121, 122, 0, 123, + 124, 125, 0, 0, 0, 164, 0, 0, 0, 0, + 0, 165, 126, 127, 128, 129, 130, 0, 0, 0, + 0, 131, 132, 116, 117, 0, 0, 0, 118, 119, + 120, 0, 121, 122, 0, 123, 124, 125, 0, 0, + 0, 166, 0, 0, 0, 0, 0, 167, 126, 127, + 128, 129, 130, 0, 0, 0, 0, 131, 132, 116, + 117, 0, 0, 0, 118, 119, 120, 0, 121, 122, + 0, 123, 124, 125, 0, 0, 0, 240, 0, 0, + 0, 0, 0, 0, 126, 127, 128, 129, 130, 0, + 0, 0, 0, 131, 132, 116, 117, 0, 0, 0, + 118, 119, 120, 0, 121, 122, 0, 123, 124, 125, + 0, 0, 0, 241, 0, 0, 0, 0, 0, 0, + 126, 127, 128, 129, 130, 0, 0, 0, 0, 131, + 132, 116, 117, 0, 0, 0, 118, 119, 120, 0, + 121, 122, 0, 123, 124, 125, 0, 0, 0, 242, + 0, 0, 0, 0, 0, 0, 126, 127, 128, 129, + 130, 0, 0, 0, 0, 131, 132, 116, 117, 0, + 0, 0, 118, 119, 120, 0, 121, 122, 0, 123, + 124, 125, 0, 0, 0, 243, 0, 0, 0, 0, + 0, 0, 126, 127, 128, 129, 130, 0, 0, 0, + 0, 131, 132, 116, 117, 0, 0, 0, 118, 119, + 120, 0, 121, 122, 0, 123, 124, 125, 0, 0, + 0, 0, 209, 0, 0, 0, 0, 0, 126, 127, + 128, 129, 130, 0, 116, 117, 0, 131, 132, 118, + 119, 120, 0, 121, 122, 0, 123, 124, 125, 0, + 0, 0, 0, 0, 0, 157, 0, 0, 210, 126, + 127, 128, 129, 130, 0, 116, 117, 0, 131, 132, + 118, 119, 120, 0, 121, 122, 0, 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 28, 0, 0, 0, 0, 0, 0, 29, - 30, 31, 32, 33, 2, 3, 4, 5, 0, 6, - 35, 36, 0, 0, 56, 12, 37, 13, 0, 0, - 0, 0, 0, 71, 0, 0, 0, 0, 0, 0, - 73, 0, 75, 0, 57, 0, 21, 0, 0, 0, - 2, 3, 4, 5, 0, 6, 0, 91, 0, 0, - 56, 12, 0, 13, 0, 0, 0, 0, 28, 0, - 0, 0, 0, 0, 0, 29, 30, 31, 32, 33, - 57, 0, 21, 0, 0, 0, 35, 36, 2, 3, - 4, 5, 37, 6, 0, 0, 0, 0, 56, 12, - 0, 13, 0, 0, 28, 0, 0, 0, 0, 0, - 0, 29, 30, 31, 32, 33, 0, 0, 57, 0, - 21, 0, 35, 36, 2, 3, 4, 5, 37, 6, - 0, 0, 0, 0, 56, 12, 0, 13, 0, 0, - 0, 0, 28, 0, 0, 0, 0, 0, 0, 29, - 30, 31, 32, 33, 57, 0, 21, 0, 0, 0, - 35, 36, 0, 0, 0, 0, 62, 0, 0, 0, - 0, 144, 0, 0, 0, 0, 0, 0, 28, 0, - 0, 0, 0, 0, 0, 29, 30, 31, 32, 33, - 0, 0, 0, 0, 114, 115, 35, 36, 0, 116, - 117, 118, 110, 119, 145, 146, 121, 122, 123, 0, - 0, 0, 158, 0, 0, 0, 0, 0, 159, 124, - 125, 126, 127, 128, 0, 0, 0, 0, 129, 130, - 114, 115, 0, 0, 0, 116, 117, 118, 0, 119, - 120, 0, 121, 122, 123, 0, 0, 0, 160, 0, - 0, 0, 0, 0, 161, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 129, 130, 114, 115, 0, 0, - 0, 116, 117, 118, 0, 119, 120, 0, 121, 122, - 123, 0, 0, 0, 162, 0, 0, 0, 0, 0, - 163, 124, 125, 126, 127, 128, 0, 0, 0, 0, - 129, 130, 114, 115, 0, 0, 0, 116, 117, 118, - 0, 119, 120, 0, 121, 122, 123, 0, 0, 0, - 164, 0, 0, 0, 0, 0, 165, 124, 125, 126, - 127, 128, 0, 0, 0, 0, 129, 130, 114, 115, - 0, 0, 0, 116, 117, 118, 0, 119, 120, 0, - 121, 122, 123, 0, 0, 0, 235, 0, 0, 0, - 0, 0, 0, 124, 125, 126, 127, 128, 0, 0, - 0, 0, 129, 130, 114, 115, 0, 0, 0, 116, - 117, 118, 0, 119, 120, 0, 121, 122, 123, 0, - 0, 0, 236, 0, 0, 0, 0, 0, 0, 124, - 125, 126, 127, 128, 0, 0, 0, 0, 129, 130, - 114, 115, 0, 0, 0, 116, 117, 118, 0, 119, - 120, 0, 121, 122, 123, 0, 0, 0, 237, 0, - 0, 0, 0, 0, 0, 124, 125, 126, 127, 128, - 0, 0, 0, 0, 129, 130, 114, 115, 0, 0, - 0, 116, 117, 118, 0, 119, 120, 0, 121, 122, - 123, 0, 0, 0, 238, 0, 0, 0, 0, 0, - 0, 124, 125, 126, 127, 128, 0, 0, 0, 0, - 129, 130, 114, 115, 0, 0, 0, 116, 117, 118, - 0, 119, 120, 0, 121, 122, 123, 0, 0, 0, - 0, 206, 0, 0, 0, 0, 0, 124, 125, 126, - 127, 128, 0, 114, 115, 0, 129, 130, 116, 117, - 118, 0, 119, 120, 0, 121, 122, 123, 0, 0, - 0, 0, 0, 0, 155, 0, 0, 207, 124, 125, - 126, 127, 128, 0, 114, 115, 0, 129, 130, 116, - 117, 118, 0, 119, 120, 0, 121, 122, 123, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 124, - 125, 126, 127, 128, 0, 114, 115, 0, 129, 130, - 116, 117, 118, 0, 119, 120, 0, 121, 122, 123, - 0, 0, 0, 0, 0, 166, 167, 0, 0, 0, - 124, 125, 126, 127, 128, 0, 114, 115, 0, 129, - 130, 116, 117, 118, 0, 119, 120, 0, 121, 122, - 123, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 176, 124, 125, 126, 127, 128, 0, 114, 115, 169, - 129, 130, 116, 117, 118, 0, 119, 120, 0, 121, - 122, 123, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 124, 125, 126, 127, 128, 0, 114, 115, - 169, 129, 130, 116, 117, 118, 0, 119, 120, 0, - 121, 122, 123, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 176, 124, 125, 126, 127, 128, 0, 114, - 115, 0, 129, 130, 116, 117, 118, 0, 119, 120, - 0, 121, 122, 123, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 124, 125, 126, 127, 128, 0, - -63, -63, 0, 129, 130, -63, -63, -63, 0, -63, - -63, 0, -63, -63, -63, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, -63, 0, 0, -63, -63, - 0, 0, 66, 0, -63, -63 + 126, 127, 128, 129, 130, 0, 116, 117, 0, 131, + 132, 118, 119, 120, 0, 121, 122, 0, 123, 124, + 125, 0, 0, 0, 0, 0, 168, 169, 0, 0, + 0, 126, 127, 128, 129, 130, 0, 116, 117, 0, + 131, 132, 118, 119, 120, 0, 121, 122, 0, 123, + 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 179, 126, 127, 128, 129, 130, 0, 116, 117, + 172, 131, 132, 118, 119, 120, 0, 121, 122, 0, + 123, 124, 125, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 126, 127, 128, 129, 130, 0, 116, + 117, 172, 131, 132, 118, 119, 120, 0, 121, 122, + 0, 123, 124, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 179, 126, 127, 128, 129, 130, 0, + 116, 117, 0, 131, 132, 118, 119, 120, 0, 121, + 122, 0, 123, 124, 125, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 126, 127, 128, 129, 130, + 0, -63, -63, 0, 131, 132, -63, -63, -63, 0, + -63, -63, 0, -63, -63, -63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -63, 0, 0, -63, + -63, 0, 0, 67, 0, -63, -63 }; static const yytype_int16 yycheck[] = { - 0, 11, 0, 0, 0, 45, 25, 45, 0, 28, - 210, 67, 26, 69, 25, 1, 228, 271, 227, 28, - 248, 88, 108, 26, 110, 88, 93, 21, 63, 64, - 284, 66, 67, 274, 69, 91, 92, 265, 49, 239, - 49, 81, 45, 81, 285, 47, 48, 82, 83, 84, - 85, 86, 38, 42, 263, 264, 91, 92, 21, 268, - 90, 270, 4, 93, 78, 7, 8, 9, 21, 88, - 90, 280, 281, 93, 16, 21, 288, 19, 92, 37, - 21, 39, 21, 25, 26, 21, 28, 29, 30, 31, - 32, 33, 88, 35, 36, 37, 88, 21, 310, 308, - 81, 89, 12, 13, 46, 47, 89, 107, 93, 107, - 107, 21, 37, 62, 93, 57, 65, 66, 67, 21, - 62, 44, 93, 65, 66, 67, 44, 21, 21, 71, - 21, 73, 21, 143, 63, 64, 90, 66, 67, 90, - 69, 45, 21, 85, 154, 93, 21, 25, 28, 49, - 107, 25, 44, 25, 83, 84, 85, 86, 168, 25, - 172, 44, 91, 92, 25, 175, 108, 109, 110, 260, - 284, 26, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 175, - 276, -1, 134, -1, -1, -1, -1, -1, -1, 141, - -1, 287, -1, 145, 146, -1, 148, 149, -1, 151, - 152, -1, -1, 155, -1, -1, 158, 159, 160, 161, - 162, 163, 164, 165, 166, 167, -1, -1, 240, -1, - -1, 243, 244, -1, 176, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 231, 258, -1, 234, 259, - -1, -1, -1, -1, -1, 267, -1, -1, -1, -1, - -1, -1, 274, 273, 206, 207, -1, 253, -1, -1, - 282, 283, 284, -1, -1, -1, -1, -1, -1, -1, - -1, 293, -1, -1, -1, -1, -1, 299, -1, 301, - 300, -1, -1, 235, 236, 237, 238, -1, -1, -1, - 242, -1, 314, -1, 316, -1, 0, 1, -1, -1, - -1, -1, 312, -1, -1, 257, -1, 11, 12, 13, - 14, -1, 16, 17, 18, 19, 20, 21, 22, -1, - 24, -1, -1, -1, 276, 29, -1, 31, 32, 33, - -1, -1, 36, -1, -1, 287, -1, 41, 42, 43, - -1, -1, 46, -1, -1, -1, 50, 51, 52, 53, - -1, -1, 56, -1, 63, 64, -1, 66, 67, -1, - 69, 65, -1, -1, -1, -1, -1, -1, 72, 73, - 74, 75, 76, -1, -1, 79, 85, 86, -1, 83, - 84, -1, 91, 92, 88, 89, 11, 12, 13, 14, - -1, 16, 17, 18, 19, 20, 21, 22, -1, 24, - -1, -1, -1, -1, 29, -1, 31, 32, 33, -1, - -1, 36, -1, -1, -1, -1, 41, 42, 43, -1, - -1, 46, -1, -1, -1, 50, 51, 52, 53, -1, - -1, 56, -1, -1, -1, -1, -1, -1, -1, -1, - 65, -1, -1, -1, -1, -1, -1, 72, 73, 74, - 75, 76, -1, -1, 79, -1, -1, -1, 83, 84, - 11, 12, 13, 14, 89, 16, 17, 18, 19, 20, - 21, 22, -1, 24, 25, -1, -1, -1, 29, -1, - 31, 32, 33, -1, -1, -1, -1, -1, -1, -1, - 41, 42, 43, -1, -1, 46, -1, -1, -1, -1, - -1, 52, 53, -1, -1, 56, -1, -1, -1, -1, + 0, 11, 63, 0, 0, 66, 67, 68, 233, 1, + 0, 0, 45, 26, 110, 45, 112, 67, 213, 69, + 232, 25, 28, 278, 25, 88, 254, 28, 281, 12, + 13, 26, 88, 47, 48, 21, 291, 93, 21, 292, + 42, 91, 92, 49, 272, 49, 21, 39, 81, 244, + 45, 81, 90, 90, 21, 93, 93, 4, 270, 271, + 7, 8, 9, 275, 90, 277, 79, 93, 90, 16, + 295, 93, 19, 21, 89, 287, 288, 89, 25, 26, + 93, 28, 29, 30, 31, 32, 33, 88, 21, 36, + 37, 38, 317, 37, 21, 39, 21, 21, 88, 88, + 47, 48, 81, 315, 89, 93, 93, 37, 21, 109, + 44, 58, 109, 109, 21, 93, 63, 21, 44, 66, + 67, 68, 21, 21, 90, 72, 90, 74, 63, 64, + 21, 66, 67, 45, 69, 145, 21, 93, 25, 86, + 21, 49, 28, 44, 44, 25, 156, 82, 83, 84, + 85, 86, 25, 25, 25, 109, 91, 92, 267, 175, + 170, 291, 26, 110, 111, 112, -1, 228, 178, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 178, 283, -1, 136, + -1, -1, -1, -1, -1, -1, 143, -1, 294, -1, + 147, 148, -1, 150, 151, -1, 153, 154, -1, -1, + 157, -1, -1, 160, 161, 162, 163, 164, 165, 166, + 167, 168, 169, 63, 64, -1, 66, 67, -1, 69, + 246, -1, 179, 249, 250, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 236, 85, 86, 239, -1, 265, + -1, 91, 92, -1, -1, -1, 266, -1, 274, -1, + -1, -1, 209, 210, -1, 281, -1, 259, -1, -1, + 280, -1, -1, 289, 290, 291, -1, -1, -1, -1, + -1, 228, -1, -1, 300, -1, -1, -1, -1, -1, + 306, -1, 308, 240, 241, 242, 243, 307, -1, -1, + -1, 248, -1, -1, -1, 321, -1, 323, -1, 0, + 1, -1, -1, -1, -1, -1, -1, 264, -1, 319, + 11, 12, 13, 14, -1, 16, 17, 18, 19, 20, + 21, 22, -1, 24, -1, -1, 283, -1, 29, -1, + 31, 32, 33, -1, -1, 36, -1, 294, -1, -1, + 41, 42, 43, -1, -1, 46, -1, -1, -1, 50, + 51, 52, 53, -1, -1, 56, -1, -1, -1, -1, -1, -1, -1, -1, 65, -1, -1, -1, -1, -1, - -1, 72, 73, 74, 75, 76, -1, -1, -1, -1, + -1, 72, 73, 74, 75, 76, -1, -1, 79, 80, -1, -1, 83, 84, -1, -1, -1, 88, 89, 11, 12, 13, 14, -1, 16, 17, 18, 19, 20, 21, 22, -1, 24, -1, -1, -1, -1, 29, -1, 31, - 32, 33, -1, -1, -1, -1, -1, -1, -1, 41, - 42, 43, -1, -1, 46, -1, -1, -1, -1, -1, + 32, 33, -1, -1, 36, -1, -1, -1, -1, 41, + 42, 43, -1, -1, 46, -1, -1, -1, 50, 51, 52, 53, -1, -1, 56, -1, -1, -1, -1, -1, -1, -1, -1, 65, -1, -1, -1, -1, -1, -1, - 72, 73, 74, 75, 76, -1, -1, -1, -1, -1, - -1, 83, 84, -1, -1, -1, 88, 89, 11, 12, - 13, 14, -1, 16, 17, 18, 19, 20, 21, 22, - -1, 24, -1, -1, -1, -1, 29, -1, 31, 32, - 33, -1, -1, -1, -1, -1, -1, -1, 41, 42, - 43, -1, -1, 46, -1, -1, -1, -1, -1, 52, - 53, -1, -1, 56, -1, -1, -1, -1, -1, -1, - -1, -1, 65, -1, -1, -1, -1, -1, -1, 72, - 73, 74, 75, 76, -1, -1, -1, -1, -1, -1, - 83, 84, 11, 12, 13, 14, 89, 16, 17, 18, + 72, 73, 74, 75, 76, -1, -1, 79, 80, -1, + -1, 83, 84, 11, 12, 13, 14, 89, 16, 17, + 18, 19, 20, 21, 22, -1, 24, 25, -1, -1, + -1, 29, -1, 31, 32, 33, -1, -1, -1, -1, + -1, -1, -1, 41, 42, 43, -1, -1, 46, -1, + -1, -1, -1, -1, 52, 53, -1, -1, 56, -1, + -1, -1, -1, -1, -1, -1, -1, 65, -1, -1, + -1, -1, -1, -1, 72, 73, 74, 75, 76, -1, + -1, -1, 80, -1, -1, 83, 84, -1, -1, -1, + 88, 89, 11, 12, 13, 14, -1, 16, 17, 18, 19, 20, 21, 22, -1, 24, -1, -1, -1, -1, - 29, -1, 31, 32, -1, -1, -1, -1, -1, -1, - -1, -1, 41, -1, 43, -1, -1, -1, -1, -1, + 29, -1, 31, 32, 33, -1, -1, -1, -1, -1, + -1, -1, 41, 42, 43, -1, -1, 46, -1, -1, -1, -1, -1, 52, 53, -1, -1, 56, -1, -1, -1, -1, -1, -1, -1, -1, 65, -1, -1, -1, - -1, -1, -1, 72, 73, 74, 75, 76, 11, 12, - 13, 14, -1, 16, 83, 84, -1, -1, 21, 22, - 89, 24, -1, -1, -1, -1, -1, 30, -1, -1, - -1, -1, 35, -1, 37, 38, 39, 40, 41, -1, - 43, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 65, -1, -1, -1, -1, -1, -1, 72, - 73, 74, 75, 76, 11, 12, 13, 14, -1, 16, - 83, 84, -1, -1, 21, 22, 89, 24, -1, -1, - -1, -1, -1, 30, -1, -1, -1, -1, -1, -1, - 37, -1, 39, -1, 41, -1, 43, -1, -1, -1, - 11, 12, 13, 14, -1, 16, -1, 54, -1, -1, - 21, 22, -1, 24, -1, -1, -1, -1, 65, -1, - -1, -1, -1, -1, -1, 72, 73, 74, 75, 76, - 41, -1, 43, -1, -1, -1, 83, 84, 11, 12, - 13, 14, 89, 16, -1, -1, -1, -1, 21, 22, - -1, 24, -1, -1, 65, -1, -1, -1, -1, -1, - -1, 72, 73, 74, 75, 76, -1, -1, 41, -1, - 43, -1, 83, 84, 11, 12, 13, 14, 89, 16, - -1, -1, -1, -1, 21, 22, -1, 24, -1, -1, - -1, -1, 65, -1, -1, -1, -1, -1, -1, 72, - 73, 74, 75, 76, 41, -1, 43, -1, -1, -1, - 83, 84, -1, -1, -1, -1, 89, -1, -1, -1, - -1, 34, -1, -1, -1, -1, -1, -1, 65, -1, - -1, -1, -1, -1, -1, 72, 73, 74, 75, 76, - -1, -1, -1, -1, 57, 58, 83, 84, -1, 62, - 63, 64, 89, 66, 67, 68, 69, 70, 71, -1, - -1, -1, 39, -1, -1, -1, -1, -1, 45, 82, - 83, 84, 85, 86, -1, -1, -1, -1, 91, 92, - 57, 58, -1, -1, -1, 62, 63, 64, -1, 66, - 67, -1, 69, 70, 71, -1, -1, -1, 39, -1, - -1, -1, -1, -1, 45, 82, 83, 84, 85, 86, - -1, -1, -1, -1, 91, 92, 57, 58, -1, -1, - -1, 62, 63, 64, -1, 66, 67, -1, 69, 70, - 71, -1, -1, -1, 39, -1, -1, -1, -1, -1, - 45, 82, 83, 84, 85, 86, -1, -1, -1, -1, - 91, 92, 57, 58, -1, -1, -1, 62, 63, 64, - -1, 66, 67, -1, 69, 70, 71, -1, -1, -1, - 39, -1, -1, -1, -1, -1, 45, 82, 83, 84, - 85, 86, -1, -1, -1, -1, 91, 92, 57, 58, - -1, -1, -1, 62, 63, 64, -1, 66, 67, -1, - 69, 70, 71, -1, -1, -1, 39, -1, -1, -1, - -1, -1, -1, 82, 83, 84, 85, 86, -1, -1, - -1, -1, 91, 92, 57, 58, -1, -1, -1, 62, - 63, 64, -1, 66, 67, -1, 69, 70, 71, -1, - -1, -1, 39, -1, -1, -1, -1, -1, -1, 82, - 83, 84, 85, 86, -1, -1, -1, -1, 91, 92, - 57, 58, -1, -1, -1, 62, 63, 64, -1, 66, - 67, -1, 69, 70, 71, -1, -1, -1, 39, -1, - -1, -1, -1, -1, -1, 82, 83, 84, 85, 86, - -1, -1, -1, -1, 91, 92, 57, 58, -1, -1, - -1, 62, 63, 64, -1, 66, 67, -1, 69, 70, - 71, -1, -1, -1, 39, -1, -1, -1, -1, -1, - -1, 82, 83, 84, 85, 86, -1, -1, -1, -1, - 91, 92, 57, 58, -1, -1, -1, 62, 63, 64, - -1, 66, 67, -1, 69, 70, 71, -1, -1, -1, - -1, 45, -1, -1, -1, -1, -1, 82, 83, 84, - 85, 86, -1, 57, 58, -1, 91, 92, 62, 63, + -1, -1, -1, 72, 73, 74, 75, 76, -1, -1, + -1, 80, -1, -1, 83, 84, -1, -1, -1, 88, + 89, 11, 12, 13, 14, -1, 16, 17, 18, 19, + 20, 21, 22, -1, 24, -1, -1, -1, -1, 29, + -1, 31, 32, 33, -1, -1, -1, -1, -1, -1, + -1, 41, 42, 43, -1, -1, 46, -1, -1, -1, + -1, -1, 52, 53, -1, -1, 56, -1, -1, -1, + -1, -1, -1, -1, -1, 65, -1, -1, -1, -1, + -1, -1, 72, 73, 74, 75, 76, -1, -1, -1, + 80, -1, -1, 83, 84, 11, 12, 13, 14, 89, + 16, 17, 18, 19, 20, 21, 22, -1, 24, -1, + -1, -1, -1, 29, -1, 31, 32, -1, -1, -1, + -1, -1, -1, -1, -1, 41, -1, 43, -1, -1, + -1, -1, -1, -1, -1, -1, 52, 53, -1, -1, + 56, -1, -1, -1, -1, -1, -1, -1, -1, 65, + -1, -1, -1, -1, -1, -1, 72, 73, 74, 75, + 76, -1, -1, -1, 80, -1, -1, 83, 84, 11, + 12, 13, 14, 89, 16, -1, -1, -1, -1, 21, + 22, -1, 24, 63, 64, -1, 66, 67, 30, 69, + -1, -1, -1, 35, -1, 37, 38, 39, 40, 41, + -1, 43, -1, 83, 84, 85, 86, -1, -1, -1, + -1, 91, 92, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 65, -1, -1, -1, -1, -1, -1, + 72, 73, 74, 75, 76, 11, 12, 13, 14, -1, + 16, 83, 84, -1, -1, 21, 22, 89, 24, -1, + -1, -1, -1, -1, 30, -1, -1, -1, -1, -1, + -1, 37, -1, 39, -1, 41, -1, 43, -1, -1, + -1, 11, 12, 13, 14, -1, 16, -1, 54, -1, + -1, 21, 22, -1, 24, -1, -1, -1, -1, 65, + -1, -1, -1, -1, -1, -1, 72, 73, 74, 75, + 76, 41, -1, 43, -1, -1, -1, 83, 84, 11, + 12, 13, 14, 89, 16, -1, -1, -1, -1, 21, + 22, -1, 24, -1, -1, 65, -1, -1, -1, -1, + -1, -1, 72, 73, 74, 75, 76, -1, -1, 41, + -1, 43, -1, 83, 84, 11, 12, 13, 14, 89, + 16, -1, -1, -1, -1, 21, 22, -1, 24, -1, + -1, -1, -1, 65, -1, -1, -1, -1, -1, -1, + 72, 73, 74, 75, 76, 41, -1, 43, -1, -1, + -1, 83, 84, -1, -1, -1, -1, 89, -1, -1, + -1, -1, 34, -1, -1, -1, -1, -1, -1, 65, + -1, -1, -1, -1, -1, -1, 72, 73, 74, 75, + 76, -1, -1, -1, -1, 57, 58, 83, 84, -1, + 62, 63, 64, 89, 66, 67, 68, 69, 70, 71, + -1, -1, -1, 39, -1, -1, -1, -1, -1, 45, + 82, 83, 84, 85, 86, -1, -1, -1, -1, 91, + 92, 57, 58, -1, -1, -1, 62, 63, 64, -1, + 66, 67, -1, 69, 70, 71, -1, -1, -1, 39, + -1, -1, -1, -1, -1, 45, 82, 83, 84, 85, + 86, -1, -1, -1, -1, 91, 92, 57, 58, -1, + -1, -1, 62, 63, 64, -1, 66, 67, -1, 69, + 70, 71, -1, -1, -1, 39, -1, -1, -1, -1, + -1, 45, 82, 83, 84, 85, 86, -1, -1, -1, + -1, 91, 92, 57, 58, -1, -1, -1, 62, 63, + 64, -1, 66, 67, -1, 69, 70, 71, -1, -1, + -1, 39, -1, -1, -1, -1, -1, 45, 82, 83, + 84, 85, 86, -1, -1, -1, -1, 91, 92, 57, + 58, -1, -1, -1, 62, 63, 64, -1, 66, 67, + -1, 69, 70, 71, -1, -1, -1, 39, -1, -1, + -1, -1, -1, -1, 82, 83, 84, 85, 86, -1, + -1, -1, -1, 91, 92, 57, 58, -1, -1, -1, + 62, 63, 64, -1, 66, 67, -1, 69, 70, 71, + -1, -1, -1, 39, -1, -1, -1, -1, -1, -1, + 82, 83, 84, 85, 86, -1, -1, -1, -1, 91, + 92, 57, 58, -1, -1, -1, 62, 63, 64, -1, + 66, 67, -1, 69, 70, 71, -1, -1, -1, 39, + -1, -1, -1, -1, -1, -1, 82, 83, 84, 85, + 86, -1, -1, -1, -1, 91, 92, 57, 58, -1, + -1, -1, 62, 63, 64, -1, 66, 67, -1, 69, + 70, 71, -1, -1, -1, 39, -1, -1, -1, -1, + -1, -1, 82, 83, 84, 85, 86, -1, -1, -1, + -1, 91, 92, 57, 58, -1, -1, -1, 62, 63, 64, -1, 66, 67, -1, 69, 70, 71, -1, -1, - -1, -1, -1, -1, 47, -1, -1, 81, 82, 83, + -1, -1, 45, -1, -1, -1, -1, -1, 82, 83, 84, 85, 86, -1, 57, 58, -1, 91, 92, 62, 63, 64, -1, 66, 67, -1, 69, 70, 71, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 82, + -1, -1, -1, -1, -1, 47, -1, -1, 81, 82, 83, 84, 85, 86, -1, 57, 58, -1, 91, 92, 62, 63, 64, -1, 66, 67, -1, 69, 70, 71, - -1, -1, -1, -1, -1, 77, 78, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 82, 83, 84, 85, 86, -1, 57, 58, -1, 91, 92, 62, 63, 64, -1, 66, 67, -1, 69, 70, - 71, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 81, 82, 83, 84, 85, 86, -1, 57, 58, 90, + 71, -1, -1, -1, -1, -1, 77, 78, -1, -1, + -1, 82, 83, 84, 85, 86, -1, 57, 58, -1, 91, 92, 62, 63, 64, -1, 66, 67, -1, 69, 70, 71, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 82, 83, 84, 85, 86, -1, 57, 58, + -1, 81, 82, 83, 84, 85, 86, -1, 57, 58, 90, 91, 92, 62, 63, 64, -1, 66, 67, -1, 69, 70, 71, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 81, 82, 83, 84, 85, 86, -1, 57, - 58, -1, 91, 92, 62, 63, 64, -1, 66, 67, + -1, -1, -1, 82, 83, 84, 85, 86, -1, 57, + 58, 90, 91, 92, 62, 63, 64, -1, 66, 67, -1, 69, 70, 71, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 82, 83, 84, 85, 86, -1, + -1, -1, -1, 81, 82, 83, 84, 85, 86, -1, 57, 58, -1, 91, 92, 62, 63, 64, -1, 66, 67, -1, 69, 70, 71, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 82, -1, -1, 85, 86, - -1, -1, 89, -1, 91, 92 + -1, -1, -1, -1, -1, 82, 83, 84, 85, 86, + -1, 57, 58, -1, 91, 92, 62, 63, 64, -1, + 66, 67, -1, 69, 70, 71, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 82, -1, -1, 85, + 86, -1, -1, 89, -1, 91, 92 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1202,35 +1207,36 @@ static const yytype_uint8 yystos[] = 0, 1, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 24, 29, 31, 32, 33, 36, 41, 42, 43, 46, 50, 51, 52, 53, 56, 65, 72, - 73, 74, 75, 76, 79, 83, 84, 89, 95, 97, - 98, 99, 100, 101, 108, 109, 110, 115, 116, 117, - 120, 123, 124, 131, 88, 96, 21, 41, 98, 116, - 116, 116, 89, 116, 132, 21, 89, 112, 42, 21, - 118, 30, 35, 37, 38, 39, 40, 116, 121, 122, - 21, 116, 47, 48, 12, 13, 21, 21, 21, 21, - 116, 54, 121, 122, 21, 119, 116, 116, 116, 116, - 116, 116, 21, 116, 116, 116, 0, 96, 89, 81, - 89, 107, 116, 116, 57, 58, 62, 63, 64, 66, - 67, 69, 70, 71, 82, 83, 84, 85, 86, 91, - 92, 116, 116, 132, 93, 132, 132, 132, 93, 116, - 116, 37, 122, 125, 34, 67, 68, 21, 45, 81, - 116, 45, 81, 44, 126, 47, 122, 93, 39, 45, - 39, 45, 39, 45, 39, 45, 77, 78, 127, 90, - 97, 107, 116, 107, 116, 44, 81, 113, 116, 116, - 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, - 116, 116, 116, 116, 116, 90, 116, 90, 21, 116, - 112, 21, 116, 116, 116, 116, 45, 81, 116, 116, - 112, 116, 21, 116, 116, 116, 116, 116, 116, 116, - 116, 116, 116, 112, 90, 113, 90, 96, 112, 116, - 21, 129, 116, 116, 129, 39, 39, 39, 39, 128, - 114, 26, 45, 114, 99, 117, 93, 96, 96, 116, - 116, 116, 116, 129, 96, 100, 113, 45, 116, 113, - 113, 21, 93, 130, 130, 96, 25, 116, 113, 25, - 49, 112, 28, 49, 104, 105, 111, 21, 114, 114, - 130, 113, 114, 114, 103, 104, 106, 111, 112, 105, - 113, 107, 114, 114, 113, 113, 106, 113, 107, 99, - 49, 102, 44, 25, 113, 25, 25, 25, 44, 113, - 112, 113, 112, 25, 114, 99, 100, 113, 113 + 73, 74, 75, 76, 79, 80, 83, 84, 89, 95, + 97, 98, 99, 100, 101, 108, 109, 110, 115, 116, + 117, 120, 123, 124, 131, 88, 96, 21, 41, 98, + 116, 116, 116, 89, 116, 132, 21, 89, 112, 42, + 21, 118, 30, 35, 37, 38, 39, 40, 116, 121, + 122, 21, 116, 47, 48, 12, 13, 21, 21, 21, + 21, 116, 54, 121, 122, 21, 119, 116, 116, 116, + 116, 116, 116, 21, 89, 116, 116, 116, 0, 96, + 89, 81, 89, 107, 116, 116, 57, 58, 62, 63, + 64, 66, 67, 69, 70, 71, 82, 83, 84, 85, + 86, 91, 92, 116, 116, 132, 93, 132, 132, 132, + 93, 116, 116, 37, 122, 125, 34, 67, 68, 21, + 45, 81, 116, 45, 81, 44, 126, 47, 122, 93, + 39, 45, 39, 45, 39, 45, 39, 45, 77, 78, + 127, 21, 90, 97, 107, 116, 107, 116, 44, 81, + 113, 116, 116, 116, 116, 116, 116, 116, 116, 116, + 116, 116, 116, 116, 116, 116, 116, 116, 90, 116, + 90, 21, 116, 112, 21, 116, 116, 116, 116, 45, + 81, 116, 116, 112, 116, 21, 116, 116, 116, 116, + 116, 116, 116, 116, 116, 116, 112, 90, 93, 90, + 113, 90, 96, 112, 116, 21, 129, 116, 116, 129, + 39, 39, 39, 39, 128, 132, 114, 26, 45, 114, + 99, 117, 93, 96, 96, 116, 116, 116, 116, 129, + 90, 96, 100, 113, 45, 116, 113, 113, 21, 93, + 130, 130, 96, 25, 116, 113, 25, 49, 112, 28, + 49, 104, 105, 111, 21, 114, 114, 130, 113, 114, + 114, 103, 104, 106, 111, 112, 105, 113, 107, 114, + 114, 113, 113, 106, 113, 107, 99, 49, 102, 44, + 25, 113, 25, 25, 25, 44, 113, 112, 113, 112, + 25, 114, 99, 100, 113, 113 }; #define yyerrok (yyerrstatus = 0) @@ -2671,108 +2677,118 @@ yyreduce: case 110: #line 470 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_open); ;} + { g_lingo->codeMe((yyvsp[(3) - (4)].s), 0); ;} break; case 111: #line 471 "engines/director/lingo/lingo-gr.y" - { g_lingo->code2(g_lingo->c_voidpush, g_lingo->c_open); ;} + { g_lingo->codeMe((yyvsp[(3) - (6)].s), (yyvsp[(5) - (6)].narg)); ;} break; case 112: #line 472 "engines/director/lingo/lingo-gr.y" - { Common::String s(*(yyvsp[(1) - (3)].s)); s += '-'; s += *(yyvsp[(2) - (3)].s); g_lingo->codeFunc(&s, (yyvsp[(3) - (3)].narg)); ;} + { g_lingo->code1(g_lingo->c_open); ;} break; case 113: -#line 475 "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); ;} +#line 473 "engines/director/lingo/lingo-gr.y" + { g_lingo->code2(g_lingo->c_voidpush, g_lingo->c_open); ;} break; case 114: -#line 476 "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); ;} +#line 474 "engines/director/lingo/lingo-gr.y" + { Common::String s(*(yyvsp[(1) - (3)].s)); s += '-'; s += *(yyvsp[(2) - (3)].s); g_lingo->codeFunc(&s, (yyvsp[(3) - (3)].narg)); ;} break; case 115: -#line 479 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_instance); g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); delete (yyvsp[(1) - (1)].s); ;} +#line 477 "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 116: -#line 480 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_instance); g_lingo->codeString((yyvsp[(3) - (3)].s)->c_str()); delete (yyvsp[(3) - (3)].s); ;} +#line 478 "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 117: -#line 491 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_gotoloop); ;} +#line 481 "engines/director/lingo/lingo-gr.y" + { g_lingo->code1(g_lingo->c_instance); g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); delete (yyvsp[(1) - (1)].s); ;} break; case 118: -#line 492 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_gotonext); ;} +#line 482 "engines/director/lingo/lingo-gr.y" + { g_lingo->code1(g_lingo->c_instance); g_lingo->codeString((yyvsp[(3) - (3)].s)->c_str()); delete (yyvsp[(3) - (3)].s); ;} break; case 119: #line 493 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_gotoprevious); ;} + { g_lingo->code1(g_lingo->c_gotoloop); ;} break; case 120: #line 494 "engines/director/lingo/lingo-gr.y" + { g_lingo->code1(g_lingo->c_gotonext); ;} + break; + + case 121: +#line 495 "engines/director/lingo/lingo-gr.y" + { g_lingo->code1(g_lingo->c_gotoprevious); ;} + break; + + case 122: +#line 496 "engines/director/lingo/lingo-gr.y" { g_lingo->codeConst(1); g_lingo->code1(g_lingo->c_goto); ;} break; - case 121: -#line 497 "engines/director/lingo/lingo-gr.y" + case 123: +#line 499 "engines/director/lingo/lingo-gr.y" { g_lingo->codeConst(3); g_lingo->code1(g_lingo->c_goto); ;} break; - case 122: -#line 500 "engines/director/lingo/lingo-gr.y" + case 124: +#line 502 "engines/director/lingo/lingo-gr.y" { g_lingo->codeConst(2); g_lingo->code1(g_lingo->c_goto); ;} break; - case 127: -#line 513 "engines/director/lingo/lingo-gr.y" + case 129: +#line 515 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_playdone); ;} break; - case 128: -#line 514 "engines/director/lingo/lingo-gr.y" + case 130: +#line 516 "engines/director/lingo/lingo-gr.y" { g_lingo->codeConst(1); g_lingo->code1(g_lingo->c_play); ;} break; - case 129: -#line 517 "engines/director/lingo/lingo-gr.y" + case 131: +#line 519 "engines/director/lingo/lingo-gr.y" { g_lingo->codeConst(3); g_lingo->code1(g_lingo->c_play); ;} break; - case 130: -#line 520 "engines/director/lingo/lingo-gr.y" + case 132: +#line 522 "engines/director/lingo/lingo-gr.y" { g_lingo->codeConst(2); g_lingo->code1(g_lingo->c_play); ;} break; - case 131: -#line 550 "engines/director/lingo/lingo-gr.y" + case 133: +#line 552 "engines/director/lingo/lingo-gr.y" { g_lingo->_indef = true; g_lingo->_currentFactory.clear(); ;} break; - case 132: -#line 551 "engines/director/lingo/lingo-gr.y" + case 134: +#line 553 "engines/director/lingo/lingo-gr.y" { g_lingo->codeConst(0); // Push fake value on stack g_lingo->code1(g_lingo->c_procret); @@ -2780,38 +2796,38 @@ yyreduce: g_lingo->_indef = false; ;} break; - case 133: -#line 556 "engines/director/lingo/lingo-gr.y" + case 135: +#line 558 "engines/director/lingo/lingo-gr.y" { g_lingo->codeFactory(*(yyvsp[(2) - (2)].s)); ;} break; - case 134: -#line 559 "engines/director/lingo/lingo-gr.y" + case 136: +#line 561 "engines/director/lingo/lingo-gr.y" { g_lingo->_indef = true; ;} break; - case 135: -#line 560 "engines/director/lingo/lingo-gr.y" + case 137: +#line 562 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_procret); g_lingo->define(*(yyvsp[(2) - (8)].s), (yyvsp[(4) - (8)].code), (yyvsp[(5) - (8)].narg) + 1, &g_lingo->_currentFactory); g_lingo->_indef = false; ;} break; - case 136: -#line 564 "engines/director/lingo/lingo-gr.y" + case 138: +#line 566 "engines/director/lingo/lingo-gr.y" { g_lingo->_indef = true; g_lingo->_currentFactory.clear(); ;} break; - case 137: -#line 565 "engines/director/lingo/lingo-gr.y" + case 139: +#line 567 "engines/director/lingo/lingo-gr.y" { g_lingo->_ignoreMe = true; ;} break; - case 138: -#line 565 "engines/director/lingo/lingo-gr.y" + case 140: +#line 567 "engines/director/lingo/lingo-gr.y" { g_lingo->codeConst(0); // Push fake value on stack g_lingo->code1(g_lingo->c_procret); @@ -2823,33 +2839,33 @@ yyreduce: ;} break; - case 139: -#line 575 "engines/director/lingo/lingo-gr.y" + case 141: +#line 577 "engines/director/lingo/lingo-gr.y" { (yyval.narg) = 0; ;} break; - case 140: -#line 576 "engines/director/lingo/lingo-gr.y" + case 142: +#line 578 "engines/director/lingo/lingo-gr.y" { g_lingo->codeArg((yyvsp[(1) - (1)].s)); (yyval.narg) = 1; ;} break; - case 141: -#line 577 "engines/director/lingo/lingo-gr.y" + case 143: +#line 579 "engines/director/lingo/lingo-gr.y" { g_lingo->codeArg((yyvsp[(3) - (3)].s)); (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;} break; - case 142: -#line 578 "engines/director/lingo/lingo-gr.y" + case 144: +#line 580 "engines/director/lingo/lingo-gr.y" { g_lingo->codeArg((yyvsp[(4) - (4)].s)); (yyval.narg) = (yyvsp[(1) - (4)].narg) + 1; ;} break; - case 143: -#line 580 "engines/director/lingo/lingo-gr.y" + case 145: +#line 582 "engines/director/lingo/lingo-gr.y" { g_lingo->codeArgStore(); ;} break; - case 144: -#line 584 "engines/director/lingo/lingo-gr.y" + case 146: +#line 586 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_call); g_lingo->codeString((yyvsp[(1) - (3)].s)->c_str()); @@ -2858,24 +2874,24 @@ yyreduce: g_lingo->code1(numpar); ;} break; - case 145: -#line 592 "engines/director/lingo/lingo-gr.y" + case 147: +#line 594 "engines/director/lingo/lingo-gr.y" { (yyval.narg) = 0; ;} break; - case 146: -#line 593 "engines/director/lingo/lingo-gr.y" + case 148: +#line 595 "engines/director/lingo/lingo-gr.y" { (yyval.narg) = 1; ;} break; - case 147: -#line 594 "engines/director/lingo/lingo-gr.y" + case 149: +#line 596 "engines/director/lingo/lingo-gr.y" { (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;} break; /* Line 1267 of yacc.c. */ -#line 2879 "engines/director/lingo/lingo-gr.cpp" +#line 2895 "engines/director/lingo/lingo-gr.cpp" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -3089,6 +3105,6 @@ yyreturn: } -#line 597 "engines/director/lingo/lingo-gr.y" +#line 599 "engines/director/lingo/lingo-gr.y" diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y index 38bd2ed4e0..60e780d727 100644 --- a/engines/director/lingo/lingo-gr.y +++ b/engines/director/lingo/lingo-gr.y @@ -467,6 +467,8 @@ func: tPUT expr { g_lingo->code1(g_lingo->c_printtop); } delete $1; } | BLTINARGLIST '(' arglist ')' { g_lingo->codeFunc($1, $3); } | BLTINARGLIST arglist { g_lingo->codeFunc($1, $2); } + | tME '(' ID ')' { g_lingo->codeMe($3, 0); } + | tME '(' ID ',' arglist ')' { g_lingo->codeMe($3, $5); } | tOPEN expr tWITH expr { g_lingo->code1(g_lingo->c_open); } | tOPEN expr { g_lingo->code2(g_lingo->c_voidpush, g_lingo->c_open); } | TWOWORDBUILTIN ID arglist { Common::String s(*$1); s += '-'; s += *$2; g_lingo->codeFunc(&s, $3); } diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp index afc5670095..f3c498b5a8 100644 --- a/engines/director/lingo/lingo-lex.cpp +++ b/engines/director/lingo/lingo-lex.cpp @@ -1437,6 +1437,12 @@ YY_RULE_SETUP if (g_lingo->_twoWordBuiltins.contains(yytext)) return TWOWORDBUILTIN; + // Special treatment of 'me'. First parameter is method name + if (!g_lingo->_currentFactory.empty()) { + if (yylval.s->equalsIgnoreCase("me")) + return tME; + } + if (g_lingo->_handlers.contains(yytext)) { if (g_lingo->_handlers[yytext]->type == BLTIN && g_lingo->_handlers[yytext]->parens == false) { if (g_lingo->_handlers[yytext]->nargs == 0) { @@ -1462,41 +1468,41 @@ YY_RULE_SETUP YY_BREAK case 62: YY_RULE_SETUP -#line 271 "engines/director/lingo/lingo-lex.l" +#line 277 "engines/director/lingo/lingo-lex.l" { count(); yylval.f = atof(yytext); return FLOAT; } YY_BREAK case 63: YY_RULE_SETUP -#line 272 "engines/director/lingo/lingo-lex.l" +#line 278 "engines/director/lingo/lingo-lex.l" { count(); yylval.i = strtol(yytext, NULL, 10); return INT; } YY_BREAK case 64: YY_RULE_SETUP -#line 273 "engines/director/lingo/lingo-lex.l" +#line 279 "engines/director/lingo/lingo-lex.l" { count(); return *yytext; } YY_BREAK case 65: /* rule 65 can match eol */ YY_RULE_SETUP -#line 274 "engines/director/lingo/lingo-lex.l" +#line 280 "engines/director/lingo/lingo-lex.l" { return '\n'; } YY_BREAK case 66: YY_RULE_SETUP -#line 275 "engines/director/lingo/lingo-lex.l" +#line 281 "engines/director/lingo/lingo-lex.l" { count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return STRING; } YY_BREAK case 67: YY_RULE_SETUP -#line 276 "engines/director/lingo/lingo-lex.l" +#line 282 "engines/director/lingo/lingo-lex.l" YY_BREAK case 68: YY_RULE_SETUP -#line 278 "engines/director/lingo/lingo-lex.l" +#line 284 "engines/director/lingo/lingo-lex.l" ECHO; YY_BREAK -#line 1500 "engines/director/lingo/lingo-lex.cpp" +#line 1506 "engines/director/lingo/lingo-lex.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -2496,7 +2502,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 278 "engines/director/lingo/lingo-lex.l" +#line 284 "engines/director/lingo/lingo-lex.l" diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l index afd90aeb6d..9d9dba7d39 100644 --- a/engines/director/lingo/lingo-lex.l +++ b/engines/director/lingo/lingo-lex.l @@ -246,6 +246,12 @@ whitespace [\t ] if (g_lingo->_twoWordBuiltins.contains(yytext)) return TWOWORDBUILTIN; + // Special treatment of 'me'. First parameter is method name + if (!g_lingo->_currentFactory.empty()) { + if (yylval.s->equalsIgnoreCase("me")) + return tME; + } + if (g_lingo->_handlers.contains(yytext)) { if (g_lingo->_handlers[yytext]->type == BLTIN && g_lingo->_handlers[yytext]->parens == false) { if (g_lingo->_handlers[yytext]->nargs == 0) { diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h index f2d315e792..a1daeaa526 100644 --- a/engines/director/lingo/lingo.h +++ b/engines/director/lingo/lingo.h @@ -221,6 +221,7 @@ public: void codeArg(Common::String *s); void codeArgStore(); int codeFunc(Common::String *s, int numpar); + int codeMe(Common::String *method, int numpar); int codeFloat(double f); void codeFactory(Common::String &s); |