diff options
Diffstat (limited to 'engines/director')
-rw-r--r-- | engines/director/lingo/lingo-gr.cpp | 726 | ||||
-rw-r--r-- | engines/director/lingo/lingo-gr.y | 10 |
2 files changed, 361 insertions, 375 deletions
diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp index d7f5066371..79a36010e5 100644 --- a/engines/director/lingo/lingo-gr.cpp +++ b/engines/director/lingo/lingo-gr.cpp @@ -548,7 +548,7 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 126 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 1700 +#define YYLAST 1612 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 109 @@ -557,7 +557,7 @@ union yyalloc /* YYNRULES -- Number of rules. */ #define YYNRULES 154 /* YYNRULES -- Number of states. */ -#define YYNSTATES 324 +#define YYNSTATES 325 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 @@ -614,19 +614,19 @@ static const yytype_uint16 yyprhs[] = 0, 0, 3, 7, 9, 12, 13, 15, 17, 22, 27, 32, 37, 42, 47, 52, 57, 63, 69, 71, 73, 75, 77, 79, 85, 96, 108, 112, 119, 124, - 134, 146, 147, 150, 157, 160, 164, 166, 168, 169, - 170, 171, 174, 177, 181, 183, 185, 187, 189, 191, - 193, 195, 197, 199, 202, 205, 210, 212, 215, 217, - 221, 225, 229, 233, 237, 241, 245, 249, 253, 257, - 261, 265, 269, 272, 276, 280, 284, 288, 291, 294, - 298, 302, 307, 312, 317, 324, 329, 336, 341, 348, - 353, 360, 362, 365, 368, 370, 372, 375, 377, 380, - 383, 386, 388, 391, 394, 396, 399, 404, 411, 416, - 419, 423, 425, 429, 431, 435, 437, 441, 444, 447, - 450, 453, 457, 460, 463, 465, 469, 472, 475, 478, - 482, 485, 486, 490, 491, 500, 503, 504, 513, 522, - 529, 532, 533, 535, 539, 544, 545, 547, 551, 552, - 555, 556, 558, 562, 564 + 134, 147, 148, 151, 158, 161, 165, 167, 169, 170, + 171, 172, 175, 178, 182, 184, 186, 188, 190, 192, + 194, 196, 198, 200, 203, 206, 211, 213, 216, 218, + 222, 226, 230, 234, 238, 242, 246, 250, 254, 258, + 262, 266, 270, 273, 277, 281, 285, 289, 292, 295, + 299, 303, 308, 313, 318, 325, 330, 337, 342, 349, + 354, 361, 363, 366, 369, 371, 373, 376, 378, 381, + 384, 387, 389, 392, 395, 397, 400, 405, 412, 417, + 420, 424, 426, 430, 432, 436, 438, 442, 445, 448, + 451, 454, 458, 461, 464, 466, 470, 473, 476, 479, + 483, 486, 487, 491, 492, 501, 504, 505, 514, 523, + 530, 533, 534, 536, 540, 545, 546, 548, 552, 553, + 556, 557, 559, 563, 565 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ @@ -646,49 +646,49 @@ static const yytype_int16 yyrhs[] = 123, -1, 126, 128, 101, 124, 123, 94, -1, 126, 128, 55, 128, -1, 120, 128, 54, 122, 124, 123, 116, 123, 92, -1, 120, 128, 54, 122, 124, 123, - 116, 123, 37, 124, 92, -1, -1, 117, 116, -1, - 121, 128, 54, 122, 124, 123, -1, 52, 58, -1, - 52, 57, 30, -1, 43, -1, 38, -1, -1, -1, - -1, 124, 101, -1, 124, 114, -1, 56, 30, 54, - -1, 88, -1, 12, -1, 17, -1, 33, -1, 31, - -1, 30, -1, 127, -1, 129, -1, 25, -1, 26, - 128, -1, 27, 148, -1, 30, 102, 147, 103, -1, - 15, -1, 16, 128, -1, 112, -1, 128, 96, 128, - -1, 128, 97, 128, -1, 128, 98, 128, -1, 128, - 99, 128, -1, 128, 75, 128, -1, 128, 104, 128, - -1, 128, 105, 128, -1, 128, 70, 128, -1, 128, - 71, 128, -1, 128, 66, 128, -1, 128, 67, 128, - -1, 128, 72, 128, -1, 128, 73, 128, -1, 74, - 128, -1, 128, 95, 128, -1, 128, 78, 128, -1, - 128, 79, 128, -1, 128, 80, 128, -1, 96, 128, - -1, 97, 128, -1, 102, 128, 103, -1, 106, 147, - 107, -1, 85, 128, 86, 128, -1, 85, 128, 87, - 128, -1, 81, 128, 49, 128, -1, 81, 128, 55, - 128, 49, 128, -1, 82, 128, 49, 128, -1, 82, - 128, 55, 128, 49, 128, -1, 83, 128, 49, 128, - -1, 83, 128, 55, 128, 49, 128, -1, 84, 128, - 49, 128, -1, 84, 128, 55, 128, 49, 128, -1, - 91, -1, 29, 128, -1, 51, 128, -1, 134, -1, - 137, -1, 39, 52, -1, 39, -1, 41, 131, -1, - 89, 132, -1, 65, 133, -1, 19, -1, 21, 128, - -1, 20, 128, -1, 20, -1, 22, 148, -1, 91, - 102, 30, 103, -1, 91, 102, 30, 108, 147, 103, - -1, 62, 128, 57, 128, -1, 62, 128, -1, 23, - 30, 147, -1, 30, -1, 131, 108, 30, -1, 30, - -1, 132, 108, 30, -1, 30, -1, 133, 108, 30, - -1, 42, 45, -1, 42, 48, -1, 42, 50, -1, - 42, 135, -1, 42, 135, 136, -1, 42, 136, -1, - 40, 128, -1, 128, -1, 49, 47, 128, -1, 47, - 128, -1, 63, 64, -1, 63, 135, -1, 63, 135, - 136, -1, 63, 136, -1, -1, 35, 138, 147, -1, - -1, 46, 30, 140, 122, 143, 101, 145, 124, -1, - 60, 30, -1, -1, 61, 30, 141, 122, 143, 101, - 145, 124, -1, 142, 122, 143, 101, 145, 124, 34, - 144, -1, 142, 122, 143, 101, 145, 124, -1, 90, - 30, -1, -1, 30, -1, 143, 108, 30, -1, 143, - 101, 108, 30, -1, -1, 30, -1, 144, 108, 30, - -1, -1, 30, 148, -1, -1, 128, -1, 147, 108, - 128, -1, 128, -1, 148, 108, 128, -1 + 116, 123, 37, 124, 123, 92, -1, -1, 117, 116, + -1, 121, 128, 54, 122, 124, 123, -1, 52, 58, + -1, 52, 57, 30, -1, 43, -1, 38, -1, -1, + -1, -1, 124, 101, -1, 124, 114, -1, 56, 30, + 54, -1, 88, -1, 12, -1, 17, -1, 33, -1, + 31, -1, 30, -1, 127, -1, 129, -1, 25, -1, + 26, 128, -1, 27, 148, -1, 30, 102, 147, 103, + -1, 15, -1, 16, 128, -1, 112, -1, 128, 96, + 128, -1, 128, 97, 128, -1, 128, 98, 128, -1, + 128, 99, 128, -1, 128, 75, 128, -1, 128, 104, + 128, -1, 128, 105, 128, -1, 128, 70, 128, -1, + 128, 71, 128, -1, 128, 66, 128, -1, 128, 67, + 128, -1, 128, 72, 128, -1, 128, 73, 128, -1, + 74, 128, -1, 128, 95, 128, -1, 128, 78, 128, + -1, 128, 79, 128, -1, 128, 80, 128, -1, 96, + 128, -1, 97, 128, -1, 102, 128, 103, -1, 106, + 147, 107, -1, 85, 128, 86, 128, -1, 85, 128, + 87, 128, -1, 81, 128, 49, 128, -1, 81, 128, + 55, 128, 49, 128, -1, 82, 128, 49, 128, -1, + 82, 128, 55, 128, 49, 128, -1, 83, 128, 49, + 128, -1, 83, 128, 55, 128, 49, 128, -1, 84, + 128, 49, 128, -1, 84, 128, 55, 128, 49, 128, + -1, 91, -1, 29, 128, -1, 51, 128, -1, 134, + -1, 137, -1, 39, 52, -1, 39, -1, 41, 131, + -1, 89, 132, -1, 65, 133, -1, 19, -1, 21, + 128, -1, 20, 128, -1, 20, -1, 22, 148, -1, + 91, 102, 30, 103, -1, 91, 102, 30, 108, 147, + 103, -1, 62, 128, 57, 128, -1, 62, 128, -1, + 23, 30, 147, -1, 30, -1, 131, 108, 30, -1, + 30, -1, 132, 108, 30, -1, 30, -1, 133, 108, + 30, -1, 42, 45, -1, 42, 48, -1, 42, 50, + -1, 42, 135, -1, 42, 135, 136, -1, 42, 136, + -1, 40, 128, -1, 128, -1, 49, 47, 128, -1, + 47, 128, -1, 63, 64, -1, 63, 135, -1, 63, + 135, 136, -1, 63, 136, -1, -1, 35, 138, 147, + -1, -1, 46, 30, 140, 122, 143, 101, 145, 124, + -1, 60, 30, -1, -1, 61, 30, 141, 122, 143, + 101, 145, 124, -1, 142, 122, 143, 101, 145, 124, + 34, 144, -1, 142, 122, 143, 101, 145, 124, -1, + 90, 30, -1, -1, 30, -1, 143, 108, 30, -1, + 143, 101, 108, 30, -1, -1, 30, -1, 144, 108, + 30, -1, -1, 30, 148, -1, -1, 128, -1, 147, + 108, 128, -1, 128, -1, 148, 108, 128, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ @@ -697,19 +697,19 @@ static const yytype_uint16 yyrline[] = 0, 120, 120, 121, 122, 125, 126, 127, 130, 136, 139, 140, 141, 147, 154, 160, 167, 173, 181, 182, 183, 186, 187, 192, 203, 220, 232, 237, 239, 244, - 254, 266, 267, 270, 278, 281, 288, 295, 303, 306, - 309, 310, 311, 314, 320, 324, 327, 330, 333, 336, - 342, 343, 344, 347, 350, 351, 354, 362, 368, 369, - 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, - 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, - 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, - 400, 401, 404, 409, 410, 411, 412, 413, 414, 415, - 416, 417, 420, 423, 426, 430, 431, 432, 433, 434, - 435, 438, 439, 442, 443, 446, 447, 458, 459, 460, - 461, 465, 469, 475, 476, 479, 480, 483, 484, 488, - 492, 496, 496, 526, 526, 531, 532, 532, 537, 544, - 550, 552, 553, 554, 555, 558, 559, 560, 563, 567, - 575, 576, 577, 580, 581 + 254, 268, 269, 272, 280, 283, 290, 297, 305, 308, + 311, 312, 313, 316, 322, 326, 329, 332, 335, 338, + 344, 345, 346, 349, 352, 353, 356, 364, 370, 371, + 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, + 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, + 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, + 402, 403, 406, 411, 412, 413, 414, 415, 416, 417, + 418, 419, 422, 425, 428, 432, 433, 434, 435, 436, + 437, 440, 441, 444, 445, 448, 449, 460, 461, 462, + 463, 467, 471, 477, 478, 481, 482, 485, 486, 490, + 494, 498, 498, 528, 528, 533, 534, 534, 539, 546, + 552, 554, 555, 556, 557, 560, 561, 562, 565, 569, + 577, 578, 579, 582, 583 }; #endif @@ -790,7 +790,7 @@ static const yytype_uint8 yyr2[] = 0, 2, 3, 1, 2, 0, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 1, 1, 1, 1, 1, 5, 10, 11, 3, 6, 4, 9, - 11, 0, 2, 6, 2, 3, 1, 1, 0, 0, + 12, 0, 2, 6, 2, 3, 1, 1, 0, 0, 0, 2, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 4, 1, 2, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, @@ -841,8 +841,8 @@ static const yytype_uint8 yydefact[] = 84, 86, 88, 90, 107, 0, 39, 31, 27, 144, 139, 40, 40, 39, 40, 37, 39, 31, 0, 145, 134, 137, 40, 39, 0, 32, 0, 146, 138, 39, - 0, 40, 29, 38, 0, 0, 24, 0, 40, 147, - 25, 30, 39, 33 + 0, 40, 29, 38, 0, 0, 24, 39, 40, 147, + 25, 0, 39, 30, 33 }; /* YYDEFGOTO[NTERM-NUM]. */ @@ -859,47 +859,47 @@ static const yytype_int16 yydefgoto[] = #define YYPACT_NINF -211 static const yytype_int16 yypact[] = { - 257, -77, -211, -211, 895, -211, -211, 895, 895, 895, - 16, -211, 895, 895, 895, 973, -211, -211, -211, -2, - 28, 775, -211, 37, 895, -42, 6, 39, 45, 47, - 895, 853, 49, 895, 895, 895, 895, 895, 895, -211, - 55, 59, 8, 895, 895, 895, 895, 2, -211, -211, - -211, -211, -211, 895, 13, 895, 697, 895, -211, 1559, - -211, -211, -211, -211, -211, -211, -211, -211, 12, 895, - -211, 1559, 1559, 1559, 1559, -13, 895, 1559, -13, 1559, - 895, -13, 895, -211, -211, -3, 895, -211, 895, -211, - 71, -211, 1559, 7, -211, -211, 1015, 96, -211, -32, - 895, -7, 94, -211, -211, 1447, -211, 7, -211, -211, - 42, -60, 1051, 1087, 1123, 1159, 1483, -211, 44, -211, - 123, -60, -60, 1519, 1559, 5, -211, 345, 1559, 895, - 941, -211, 1375, 895, 895, 895, 895, 895, 895, 895, - 895, 895, 895, 895, 895, 895, 895, 895, 895, 895, - 124, 895, 1015, 895, 48, 1519, -6, 48, 125, 1559, - 1559, 895, -211, -211, 87, 895, 895, -211, 895, 895, - 88, 1411, 895, 895, -211, -211, 895, -211, 129, 895, - 895, 895, 895, 895, 895, 895, 895, 895, 895, 130, - 1, -211, -211, 895, -211, 609, 1559, -211, -211, 895, - -211, -5, -5, -5, -5, 1595, 1595, -60, 1559, -5, - -5, 23, -18, -18, -60, -60, 1559, 1559, -211, -49, - 1559, -211, -211, 1559, 124, -211, -211, 1559, 1559, 1559, - -5, 895, 895, 1559, -5, 124, 1559, -211, 1559, 1195, - 1559, 1231, 1559, 1267, 1559, 1303, 1559, 1559, -211, -211, - 895, 1559, -211, -211, 70, -8, -211, 1559, 609, 58, - 137, -46, -5, 1559, -37, 895, 895, 895, 895, 3, - -211, 118, 895, 609, 80, 156, -211, -211, 58, 58, - 1559, 1559, 1559, 1559, -211, 895, 1559, 149, -211, -211, - 433, -211, -211, 1559, -211, -211, -211, 149, 895, 158, - 609, 609, -211, 609, -31, -211, 1339, -211, 82, 609, + 257, -77, -211, -211, 807, -211, -211, 807, 807, 807, + 16, -211, 807, 807, 807, 885, -211, -211, -211, -2, + 28, 687, -211, 37, 807, -42, 6, 39, 45, 47, + 807, 765, 49, 807, 807, 807, 807, 807, 807, -211, + 55, 59, 8, 807, 807, 807, 807, 2, -211, -211, + -211, -211, -211, 807, 13, 807, 609, 807, -211, 1471, + -211, -211, -211, -211, -211, -211, -211, -211, 12, 807, + -211, 1471, 1471, 1471, 1471, -13, 807, 1471, -13, 1471, + 807, -13, 807, -211, -211, -3, 807, -211, 807, -211, + 71, -211, 1471, 7, -211, -211, 927, 96, -211, -32, + 807, -7, 94, -211, -211, 1359, -211, 7, -211, -211, + 42, -60, 963, 999, 1035, 1071, 1395, -211, 44, -211, + 123, -60, -60, 1431, 1471, 5, -211, 345, 1471, 807, + 853, -211, 1287, 807, 807, 807, 807, 807, 807, 807, + 807, 807, 807, 807, 807, 807, 807, 807, 807, 807, + 124, 807, 927, 807, 48, 1431, -6, 48, 125, 1471, + 1471, 807, -211, -211, 87, 807, 807, -211, 807, 807, + 88, 1323, 807, 807, -211, -211, 807, -211, 129, 807, + 807, 807, 807, 807, 807, 807, 807, 807, 807, 130, + 1, -211, -211, 807, -211, 521, 1471, -211, -211, 807, + -211, -5, -5, -5, -5, 1507, 1507, -60, 1471, -5, + -5, 23, -18, -18, -60, -60, 1471, 1471, -211, -49, + 1471, -211, -211, 1471, 124, -211, -211, 1471, 1471, 1471, + -5, 807, 807, 1471, -5, 124, 1471, -211, 1471, 1107, + 1471, 1143, 1471, 1179, 1471, 1215, 1471, 1471, -211, -211, + 807, 1471, -211, -211, 70, -8, -211, 1471, 521, 58, + 137, -46, -5, 1471, -37, 807, 807, 807, 807, 3, + -211, 118, 807, 521, 80, 156, -211, -211, 58, 58, + 1471, 1471, 1471, 1471, -211, 807, 1471, 149, -211, -211, + 433, -211, -211, 1471, -211, -211, -211, 149, 807, 158, + 521, 521, -211, 521, -31, -211, 1251, -211, 82, 521, 99, -211, -211, -211, 163, 101, -211, 521, -211, -211, - -211, -211, 609, -211 + -211, 104, 521, -211, -211 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -211, -211, 69, -211, 141, 19, -211, -98, -211, -211, - -211, -211, -211, -162, -88, -85, -211, -211, 100, -4, - 38, -211, -211, -211, -211, -211, 170, -19, -211, -211, + -211, -211, 72, -211, 141, 19, -211, -97, -211, -211, + -211, -211, -211, -162, -88, -85, -211, -211, 102, -4, + 40, -211, -211, -211, -211, -211, 170, -19, -211, -211, -211, -211, -211, -211, -210, -211, -155, -211, -39, 53 }; @@ -929,11 +929,11 @@ static const yytype_int16 yytable[] = 248, 227, 228, 270, 229, 230, 275, 277, 233, 234, 274, 273, 236, 285, 288, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 287, 289, 295, 307, 251, - 314, 290, 316, 319, 320, 257, 194, 131, 294, 305, - 170, 107, 226, 0, 0, 302, 300, 301, 304, 303, + 314, 290, 316, 319, 320, 257, 323, 131, 294, 194, + 305, 107, 170, 0, 226, 302, 300, 301, 304, 303, 0, 269, 0, 0, 0, 310, 0, 309, 0, 0, - 0, 315, 0, 0, 0, 0, 317, 262, 263, 0, - 0, 0, 0, 322, 323, 0, 0, 0, 0, 0, + 0, 315, 0, 0, 0, 0, 317, 262, 263, 321, + 0, 0, 0, 322, 324, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 124, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -5, 1, 0, 0, 280, 281, 282, 283, 0, 0, 0, 286, 2, @@ -971,116 +971,107 @@ static const yytype_int16 yytable[] = 0, 0, 0, 30, 31, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 34, 35, 36, 37, 38, 0, 0, 39, - 40, 0, 42, 321, 0, 0, 0, 43, 44, 0, + 40, 0, 42, 0, 0, 0, 0, 43, 44, 0, 0, 2, 252, 45, 3, 4, 5, 46, 6, 7, 8, 9, 10, 0, 11, 12, 13, 0, 14, 15, 16, 0, 17, 0, 18, 0, 0, 0, 19, 0, - 20, 21, 22, 0, 0, 0, 0, 0, 0, 0, - 24, 25, 26, 0, 0, 27, 0, 0, 0, 0, + 20, 21, 0, 0, 0, 0, 0, 0, 0, 0, + 24, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 30, 31, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, - 34, 35, 36, 37, 38, 0, 0, 39, 40, 0, - 42, 0, 0, 0, 0, 43, 44, 0, 0, 2, - 252, 45, 3, 4, 5, 46, 6, 7, 8, 9, - 10, 0, 11, 12, 13, 0, 14, 15, 16, 0, - 17, 0, 18, 0, 0, 0, 19, 0, 20, 21, - 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, - 26, 0, 0, 0, 0, 0, 0, 0, 0, 30, - 31, 0, 32, 0, 0, 0, 0, 0, 0, 0, + 34, 35, 36, 37, 38, 0, 0, 0, 40, 2, + 42, 0, 3, 4, 5, 43, 44, 0, 0, 0, + 0, 45, 11, 12, 13, 46, 14, 68, 16, 0, + 17, 0, 0, 0, 0, 0, 0, 86, 0, 0, + 0, 0, 87, 0, 88, 89, 90, 91, 69, 0, + 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 34, 35, - 36, 37, 38, 0, 0, 0, 40, 2, 42, 0, + 36, 37, 38, 0, 0, 0, 0, 2, 70, 0, 3, 4, 5, 43, 44, 0, 0, 0, 0, 45, 11, 12, 13, 46, 14, 68, 16, 0, 17, 0, 0, 0, 0, 0, 0, 86, 0, 0, 0, 0, - 87, 0, 88, 89, 90, 91, 69, 0, 26, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, - 0, 0, 0, 0, 0, 0, 34, 35, 36, 37, - 38, 0, 0, 0, 0, 2, 70, 0, 3, 4, - 5, 43, 44, 0, 0, 0, 0, 45, 11, 12, - 13, 46, 14, 68, 16, 0, 17, 0, 0, 0, - 0, 0, 0, 86, 0, 0, 0, 0, 0, 0, - 88, 0, 90, 0, 69, 0, 26, 2, 0, 0, - 3, 4, 5, 0, 0, 0, 0, 106, 0, 0, - 11, 12, 13, 0, 14, 68, 16, 33, 17, 0, - 0, 0, 0, 0, 34, 35, 36, 37, 38, 0, - 0, 0, 0, 0, 70, 0, 69, 0, 26, 43, - 44, 0, 0, 0, 0, 45, 0, 0, 0, 46, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, + 0, 0, 88, 0, 90, 0, 69, 0, 26, 2, + 0, 0, 3, 4, 5, 0, 0, 0, 0, 106, + 0, 0, 11, 12, 13, 0, 14, 68, 16, 33, + 17, 0, 0, 0, 0, 0, 34, 35, 36, 37, + 38, 0, 0, 0, 0, 0, 70, 0, 69, 0, + 26, 43, 44, 0, 0, 0, 0, 45, 0, 0, + 0, 46, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 33, 0, 0, 0, 0, 0, 0, 34, 35, + 36, 37, 38, 0, 0, 0, 0, 2, 70, 0, + 3, 4, 5, 43, 44, 0, 0, 197, 0, 45, + 11, 12, 13, 46, 14, 68, 16, 0, 17, 133, + 134, 0, 0, 135, 136, 137, 138, 0, 139, 0, + 0, 140, 141, 142, 0, 0, 69, 0, 26, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 143, 144, + 145, 146, 147, 0, 0, 0, 0, 148, 149, 33, 0, 0, 0, 0, 0, 0, 34, 35, 36, 37, - 38, 0, 0, 0, 0, 2, 70, 0, 3, 4, - 5, 43, 44, 0, 0, 197, 0, 45, 11, 12, - 13, 46, 14, 68, 16, 0, 17, 133, 134, 0, - 0, 135, 136, 137, 138, 0, 139, 0, 0, 140, - 141, 142, 0, 0, 69, 0, 26, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 143, 144, 145, 146, - 147, 0, 0, 0, 0, 148, 149, 33, 0, 0, - 0, 0, 0, 0, 34, 35, 36, 37, 38, 164, - 0, 0, 0, 0, 70, 0, 0, 0, 0, 43, - 44, 0, 0, 0, 0, 80, 0, 0, 0, 46, - 0, 133, 134, 0, 0, 135, 136, 137, 138, 0, - 139, 165, 166, 140, 141, 142, 0, 0, 0, 0, - 179, 0, 0, 0, 0, 0, 180, 0, 0, 0, - 143, 144, 145, 146, 147, 0, 0, 133, 134, 148, - 149, 135, 136, 137, 138, 0, 139, 0, 0, 140, - 141, 142, 0, 0, 0, 0, 181, 0, 0, 0, - 0, 0, 182, 0, 0, 0, 143, 144, 145, 146, - 147, 0, 0, 133, 134, 148, 149, 135, 136, 137, - 138, 0, 139, 0, 0, 140, 141, 142, 0, 0, - 0, 0, 183, 0, 0, 0, 0, 0, 184, 0, + 38, 164, 0, 0, 0, 0, 70, 0, 0, 0, + 0, 43, 44, 0, 0, 0, 0, 80, 0, 0, + 0, 46, 0, 133, 134, 0, 0, 135, 136, 137, + 138, 0, 139, 165, 166, 140, 141, 142, 0, 0, + 0, 0, 179, 0, 0, 0, 0, 0, 180, 0, 0, 0, 143, 144, 145, 146, 147, 0, 0, 133, 134, 148, 149, 135, 136, 137, 138, 0, 139, 0, - 0, 140, 141, 142, 0, 0, 0, 0, 185, 0, - 0, 0, 0, 0, 186, 0, 0, 0, 143, 144, + 0, 140, 141, 142, 0, 0, 0, 0, 181, 0, + 0, 0, 0, 0, 182, 0, 0, 0, 143, 144, 145, 146, 147, 0, 0, 133, 134, 148, 149, 135, 136, 137, 138, 0, 139, 0, 0, 140, 141, 142, - 0, 0, 0, 0, 265, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 143, 144, 145, 146, 147, 0, + 0, 0, 0, 0, 183, 0, 0, 0, 0, 0, + 184, 0, 0, 0, 143, 144, 145, 146, 147, 0, 0, 133, 134, 148, 149, 135, 136, 137, 138, 0, 139, 0, 0, 140, 141, 142, 0, 0, 0, 0, - 266, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 185, 0, 0, 0, 0, 0, 186, 0, 0, 0, 143, 144, 145, 146, 147, 0, 0, 133, 134, 148, 149, 135, 136, 137, 138, 0, 139, 0, 0, 140, - 141, 142, 0, 0, 0, 0, 267, 0, 0, 0, + 141, 142, 0, 0, 0, 0, 265, 0, 0, 0, 0, 0, 0, 0, 0, 0, 143, 144, 145, 146, 147, 0, 0, 133, 134, 148, 149, 135, 136, 137, 138, 0, 139, 0, 0, 140, 141, 142, 0, 0, - 0, 0, 268, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 266, 0, 0, 0, 0, 0, 0, 0, 0, 0, 143, 144, 145, 146, 147, 0, 0, 133, 134, 148, 149, 135, 136, 137, 138, 0, 139, 0, - 0, 140, 141, 142, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 313, 0, 0, 0, 0, 143, 144, + 0, 140, 141, 142, 0, 0, 0, 0, 267, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 143, 144, 145, 146, 147, 0, 0, 133, 134, 148, 149, 135, 136, 137, 138, 0, 139, 0, 0, 140, 141, 142, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 199, 0, 0, 0, 143, 144, 145, 146, 147, 0, + 0, 0, 0, 0, 268, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 143, 144, 145, 146, 147, 0, 0, 133, 134, 148, 149, 135, 136, 137, 138, 0, 139, 0, 0, 140, 141, 142, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 232, 0, 0, 0, - 143, 144, 145, 146, 147, 0, 200, 133, 134, 148, + 0, 0, 0, 0, 0, 313, 0, 0, 0, 0, + 143, 144, 145, 146, 147, 0, 0, 133, 134, 148, 149, 135, 136, 137, 138, 0, 139, 0, 0, 140, 141, 142, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 176, 0, 143, 144, 145, 146, + 0, 0, 199, 0, 0, 0, 143, 144, 145, 146, 147, 0, 0, 133, 134, 148, 149, 135, 136, 137, 138, 0, 139, 0, 0, 140, 141, 142, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 143, 144, 145, 146, 147, 0, 0, 133, + 0, 0, 0, 0, 0, 0, 0, 0, 232, 0, + 0, 0, 143, 144, 145, 146, 147, 0, 200, 133, 134, 148, 149, 135, 136, 137, 138, 0, 139, 0, - 0, 140, 141, 142, 0, 0, 0, 0, 0, 187, - 188, 0, 0, 0, 0, 0, 0, 0, 143, 144, + 0, 140, 141, 142, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 176, 0, 143, 144, 145, 146, 147, 0, 0, 133, 134, 148, 149, 135, 136, 137, 138, 0, 139, 0, 0, 140, 141, 142, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 143, 144, 145, 146, 147, 0, - 0, 0, 191, 148, 149, 133, 134, 0, 0, 135, - 136, 137, 138, 0, 139, 0, 0, 140, 141, 142, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 143, 144, 145, 146, 147, 0, - 0, 133, 134, 148, 149, 135, 136, 0, 0, 0, + 0, 133, 134, 148, 149, 135, 136, 137, 138, 0, 139, 0, 0, 140, 141, 142, 0, 0, 0, 0, + 0, 187, 188, 0, 0, 0, 0, 0, 0, 0, + 143, 144, 145, 146, 147, 0, 0, 133, 134, 148, + 149, 135, 136, 137, 138, 0, 139, 0, 0, 140, + 141, 142, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 143, 144, 145, 146, + 147, 0, 0, 0, 191, 148, 149, 133, 134, 0, + 0, 135, 136, 137, 138, 0, 139, 0, 0, 140, + 141, 142, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 143, 144, 145, 146, + 147, 0, 0, 133, 134, 148, 149, 135, 136, 0, + 0, 0, 139, 0, 0, 140, 141, 142, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 143, 144, 145, 146, 147, 0, 0, 0, 0, 148, - 149 + 0, 0, 143, 144, 145, 146, 147, 0, 0, 0, + 0, 148, 149 }; static const yytype_int16 yycheck[] = @@ -1104,10 +1095,10 @@ static const yytype_int16 yycheck[] = 30, 165, 166, 93, 168, 169, 108, 30, 172, 173, 258, 256, 176, 55, 94, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 273, 30, 38, 30, 193, - 108, 276, 93, 30, 93, 199, 127, 56, 286, 297, - 100, 31, 164, -1, -1, 293, 291, 292, 296, 294, + 108, 276, 93, 30, 93, 199, 92, 56, 286, 127, + 297, 31, 100, -1, 164, 293, 291, 292, 296, 294, -1, 250, -1, -1, -1, 303, -1, 302, -1, -1, - -1, 309, -1, -1, -1, -1, 311, 231, 232, -1, + -1, 309, -1, -1, -1, -1, 311, 231, 232, 317, -1, -1, -1, 318, 322, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 250, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, -1, @@ -1146,62 +1137,46 @@ static const yytype_int16 yycheck[] = -1, -1, -1, 62, 63, -1, 65, -1, -1, -1, -1, -1, -1, -1, -1, 74, -1, -1, -1, -1, -1, -1, 81, 82, 83, 84, 85, -1, -1, 88, - 89, -1, 91, 92, -1, -1, -1, 96, 97, -1, + 89, -1, 91, -1, -1, -1, -1, 96, 97, -1, -1, 12, 101, 102, 15, 16, 17, 106, 19, 20, 21, 22, 23, -1, 25, 26, 27, -1, 29, 30, 31, -1, 33, -1, 35, -1, -1, -1, 39, -1, - 41, 42, 43, -1, -1, -1, -1, -1, -1, -1, - 51, 52, 53, -1, -1, 56, -1, -1, -1, -1, + 41, 42, -1, -1, -1, -1, -1, -1, -1, -1, + 51, -1, 53, -1, -1, -1, -1, -1, -1, -1, -1, 62, 63, -1, 65, -1, -1, -1, -1, -1, -1, -1, -1, 74, -1, -1, -1, -1, -1, -1, - 81, 82, 83, 84, 85, -1, -1, 88, 89, -1, - 91, -1, -1, -1, -1, 96, 97, -1, -1, 12, - 101, 102, 15, 16, 17, 106, 19, 20, 21, 22, - 23, -1, 25, 26, 27, -1, 29, 30, 31, -1, - 33, -1, 35, -1, -1, -1, 39, -1, 41, 42, - -1, -1, -1, -1, -1, -1, -1, -1, 51, -1, - 53, -1, -1, -1, -1, -1, -1, -1, -1, 62, - 63, -1, 65, -1, -1, -1, -1, -1, -1, -1, + 81, 82, 83, 84, 85, -1, -1, -1, 89, 12, + 91, -1, 15, 16, 17, 96, 97, -1, -1, -1, + -1, 102, 25, 26, 27, 106, 29, 30, 31, -1, + 33, -1, -1, -1, -1, -1, -1, 40, -1, -1, + -1, -1, 45, -1, 47, 48, 49, 50, 51, -1, + 53, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 74, -1, -1, -1, -1, -1, -1, 81, 82, - 83, 84, 85, -1, -1, -1, 89, 12, 91, -1, + 83, 84, 85, -1, -1, -1, -1, 12, 91, -1, 15, 16, 17, 96, 97, -1, -1, -1, -1, 102, 25, 26, 27, 106, 29, 30, 31, -1, 33, -1, -1, -1, -1, -1, -1, 40, -1, -1, -1, -1, - 45, -1, 47, 48, 49, 50, 51, -1, 53, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 74, - -1, -1, -1, -1, -1, -1, 81, 82, 83, 84, - 85, -1, -1, -1, -1, 12, 91, -1, 15, 16, - 17, 96, 97, -1, -1, -1, -1, 102, 25, 26, - 27, 106, 29, 30, 31, -1, 33, -1, -1, -1, - -1, -1, -1, 40, -1, -1, -1, -1, -1, -1, - 47, -1, 49, -1, 51, -1, 53, 12, -1, -1, - 15, 16, 17, -1, -1, -1, -1, 64, -1, -1, - 25, 26, 27, -1, 29, 30, 31, 74, 33, -1, - -1, -1, -1, -1, 81, 82, 83, 84, 85, -1, - -1, -1, -1, -1, 91, -1, 51, -1, 53, 96, - 97, -1, -1, -1, -1, 102, -1, -1, -1, 106, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 74, + -1, -1, 47, -1, 49, -1, 51, -1, 53, 12, + -1, -1, 15, 16, 17, -1, -1, -1, -1, 64, + -1, -1, 25, 26, 27, -1, 29, 30, 31, 74, + 33, -1, -1, -1, -1, -1, 81, 82, 83, 84, + 85, -1, -1, -1, -1, -1, 91, -1, 51, -1, + 53, 96, 97, -1, -1, -1, -1, 102, -1, -1, + -1, 106, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 74, -1, -1, -1, -1, -1, -1, 81, 82, + 83, 84, 85, -1, -1, -1, -1, 12, 91, -1, + 15, 16, 17, 96, 97, -1, -1, 54, -1, 102, + 25, 26, 27, 106, 29, 30, 31, -1, 33, 66, + 67, -1, -1, 70, 71, 72, 73, -1, 75, -1, + -1, 78, 79, 80, -1, -1, 51, -1, 53, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 95, 96, + 97, 98, 99, -1, -1, -1, -1, 104, 105, 74, -1, -1, -1, -1, -1, -1, 81, 82, 83, 84, - 85, -1, -1, -1, -1, 12, 91, -1, 15, 16, - 17, 96, 97, -1, -1, 54, -1, 102, 25, 26, - 27, 106, 29, 30, 31, -1, 33, 66, 67, -1, - -1, 70, 71, 72, 73, -1, 75, -1, -1, 78, - 79, 80, -1, -1, 51, -1, 53, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 95, 96, 97, 98, - 99, -1, -1, -1, -1, 104, 105, 74, -1, -1, - -1, -1, -1, -1, 81, 82, 83, 84, 85, 44, - -1, -1, -1, -1, 91, -1, -1, -1, -1, 96, - 97, -1, -1, -1, -1, 102, -1, -1, -1, 106, - -1, 66, 67, -1, -1, 70, 71, 72, 73, -1, - 75, 76, 77, 78, 79, 80, -1, -1, -1, -1, - 49, -1, -1, -1, -1, -1, 55, -1, -1, -1, - 95, 96, 97, 98, 99, -1, -1, 66, 67, 104, - 105, 70, 71, 72, 73, -1, 75, -1, -1, 78, - 79, 80, -1, -1, -1, -1, 49, -1, -1, -1, - -1, -1, 55, -1, -1, -1, 95, 96, 97, 98, - 99, -1, -1, 66, 67, 104, 105, 70, 71, 72, - 73, -1, 75, -1, -1, 78, 79, 80, -1, -1, + 85, 44, -1, -1, -1, -1, 91, -1, -1, -1, + -1, 96, 97, -1, -1, -1, -1, 102, -1, -1, + -1, 106, -1, 66, 67, -1, -1, 70, 71, 72, + 73, -1, 75, 76, 77, 78, 79, 80, -1, -1, -1, -1, 49, -1, -1, -1, -1, -1, 55, -1, -1, -1, 95, 96, 97, 98, 99, -1, -1, 66, 67, 104, 105, 70, 71, 72, 73, -1, 75, -1, @@ -1210,10 +1185,10 @@ static const yytype_int16 yycheck[] = 97, 98, 99, -1, -1, 66, 67, 104, 105, 70, 71, 72, 73, -1, 75, -1, -1, 78, 79, 80, -1, -1, -1, -1, 49, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 95, 96, 97, 98, 99, -1, + 55, -1, -1, -1, 95, 96, 97, 98, 99, -1, -1, 66, 67, 104, 105, 70, 71, 72, 73, -1, 75, -1, -1, 78, 79, 80, -1, -1, -1, -1, - 49, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 49, -1, -1, -1, -1, -1, 55, -1, -1, -1, 95, 96, 97, 98, 99, -1, -1, 66, 67, 104, 105, 70, 71, 72, 73, -1, 75, -1, -1, 78, 79, 80, -1, -1, -1, -1, 49, -1, -1, -1, @@ -1223,39 +1198,46 @@ static const yytype_int16 yycheck[] = -1, -1, 49, -1, -1, -1, -1, -1, -1, -1, -1, -1, 95, 96, 97, 98, 99, -1, -1, 66, 67, 104, 105, 70, 71, 72, 73, -1, 75, -1, - -1, 78, 79, 80, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 54, -1, -1, -1, -1, 95, 96, + -1, 78, 79, 80, -1, -1, -1, -1, 49, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 95, 96, 97, 98, 99, -1, -1, 66, 67, 104, 105, 70, 71, 72, 73, -1, 75, -1, -1, 78, 79, 80, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 55, -1, -1, -1, 95, 96, 97, 98, 99, -1, + -1, -1, -1, -1, 49, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 95, 96, 97, 98, 99, -1, -1, 66, 67, 104, 105, 70, 71, 72, 73, -1, 75, -1, -1, 78, 79, 80, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 55, -1, -1, -1, - 95, 96, 97, 98, 99, -1, 101, 66, 67, 104, + -1, -1, -1, -1, -1, 54, -1, -1, -1, -1, + 95, 96, 97, 98, 99, -1, -1, 66, 67, 104, 105, 70, 71, 72, 73, -1, 75, -1, -1, 78, 79, 80, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 57, -1, 95, 96, 97, 98, + -1, -1, 55, -1, -1, -1, 95, 96, 97, 98, 99, -1, -1, 66, 67, 104, 105, 70, 71, 72, 73, -1, 75, -1, -1, 78, 79, 80, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 95, 96, 97, 98, 99, -1, -1, 66, + -1, -1, -1, -1, -1, -1, -1, -1, 55, -1, + -1, -1, 95, 96, 97, 98, 99, -1, 101, 66, 67, 104, 105, 70, 71, 72, 73, -1, 75, -1, - -1, 78, 79, 80, -1, -1, -1, -1, -1, 86, - 87, -1, -1, -1, -1, -1, -1, -1, 95, 96, + -1, 78, 79, 80, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 57, -1, 95, 96, 97, 98, 99, -1, -1, 66, 67, 104, 105, 70, 71, 72, 73, -1, 75, -1, -1, 78, 79, 80, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 95, 96, 97, 98, 99, -1, - -1, -1, 103, 104, 105, 66, 67, -1, -1, 70, - 71, 72, 73, -1, 75, -1, -1, 78, 79, 80, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 95, 96, 97, 98, 99, -1, - -1, 66, 67, 104, 105, 70, 71, -1, -1, -1, + -1, 66, 67, 104, 105, 70, 71, 72, 73, -1, 75, -1, -1, 78, 79, 80, -1, -1, -1, -1, + -1, 86, 87, -1, -1, -1, -1, -1, -1, -1, + 95, 96, 97, 98, 99, -1, -1, 66, 67, 104, + 105, 70, 71, 72, 73, -1, 75, -1, -1, 78, + 79, 80, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 95, 96, 97, 98, + 99, -1, -1, -1, 103, 104, 105, 66, 67, -1, + -1, 70, 71, 72, 73, -1, 75, -1, -1, 78, + 79, 80, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 95, 96, 97, 98, + 99, -1, -1, 66, 67, 104, 105, 70, 71, -1, + -1, -1, 75, -1, -1, 78, 79, 80, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 95, 96, 97, 98, 99, -1, -1, -1, -1, 104, - 105 + -1, -1, 95, 96, 97, 98, 99, -1, -1, -1, + -1, 104, 105 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1294,7 +1276,7 @@ static const yytype_uint8 yystos[] = 124, 145, 145, 128, 123, 38, 116, 117, 121, 34, 124, 124, 123, 124, 123, 116, 128, 30, 144, 124, 123, 37, 92, 54, 108, 123, 93, 124, 122, 30, - 93, 92, 124, 123 + 93, 123, 124, 92, 123 }; #define yyerrok (yyerrstatus = 0) @@ -2284,33 +2266,35 @@ yyreduce: #line 254 "engines/director/lingo/lingo-gr.y" { inst then = 0, else1 = 0, end = 0; - WRITE_UINT32(&then, (yyvsp[(4) - (11)].code) - (yyvsp[(1) - (11)].code)); - WRITE_UINT32(&else1, (yyvsp[(6) - (11)].code) - (yyvsp[(1) - (11)].code)); - WRITE_UINT32(&end, (yyvsp[(8) - (11)].code) - (yyvsp[(1) - (11)].code)); - (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 1] = then; /* thenpart */ - (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 2] = else1; /* elsepart */ - (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 3] = end; /* end, if cond fails */ + WRITE_UINT32(&then, (yyvsp[(4) - (12)].code) - (yyvsp[(1) - (12)].code)); + WRITE_UINT32(&else1, (yyvsp[(6) - (12)].code) - (yyvsp[(1) - (12)].code)); + WRITE_UINT32(&end, (yyvsp[(11) - (12)].code) - (yyvsp[(1) - (12)].code)); + (*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 1] = then; /* thenpart */ + (*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 2] = else1; /* elsepart */ + (*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 3] = end; /* end, if cond fails */ + + g_lingo->codeLabel((yyvsp[(8) - (12)].code)); - g_lingo->processIf(0, (yyvsp[(8) - (11)].code) - (yyvsp[(1) - (11)].code)); ;} + g_lingo->processIf(0, (yyvsp[(11) - (12)].code) - (yyvsp[(1) - (12)].code)); ;} break; case 33: -#line 270 "engines/director/lingo/lingo-gr.y" +#line 272 "engines/director/lingo/lingo-gr.y" { inst then = 0; - WRITE_UINT32(&then, (yyvsp[(5) - (6)].code) - (yyvsp[(1) - (6)].code)); + WRITE_UINT32(&then, (yyvsp[(4) - (6)].code) - (yyvsp[(1) - (6)].code)); (*g_lingo->_currentScript)[(yyvsp[(1) - (6)].code) + 1] = then; /* thenpart */ g_lingo->codeLabel((yyvsp[(1) - (6)].code)); ;} break; case 34: -#line 278 "engines/director/lingo/lingo-gr.y" +#line 280 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code3(g_lingo->c_repeatwhilecode, STOP, STOP); ;} break; case 35: -#line 281 "engines/director/lingo/lingo-gr.y" +#line 283 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code3(g_lingo->c_repeatwithcode, STOP, STOP); g_lingo->code3(STOP, STOP, STOP); @@ -2319,7 +2303,7 @@ yyreduce: break; case 36: -#line 288 "engines/director/lingo/lingo-gr.y" +#line 290 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code1(g_lingo->c_ifcode); g_lingo->code3(STOP, STOP, STOP); @@ -2328,7 +2312,7 @@ yyreduce: break; case 37: -#line 295 "engines/director/lingo/lingo-gr.y" +#line 297 "engines/director/lingo/lingo-gr.y" { inst skipEnd; WRITE_UINT32(&skipEnd, 1); // We have to skip end to avoid multiple executions @@ -2338,22 +2322,22 @@ yyreduce: break; case 38: -#line 303 "engines/director/lingo/lingo-gr.y" +#line 305 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->_currentScript->size(); ;} break; case 39: -#line 306 "engines/director/lingo/lingo-gr.y" +#line 308 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(STOP); (yyval.code) = g_lingo->_currentScript->size(); ;} break; case 40: -#line 309 "engines/director/lingo/lingo-gr.y" +#line 311 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->_currentScript->size(); ;} break; case 43: -#line 314 "engines/director/lingo/lingo-gr.y" +#line 316 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code1(g_lingo->c_whencode); g_lingo->code1(STOP); @@ -2362,42 +2346,42 @@ yyreduce: break; case 44: -#line 320 "engines/director/lingo/lingo-gr.y" +#line 322 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code1(g_lingo->c_tellcode); g_lingo->code1(STOP); ;} break; case 45: -#line 324 "engines/director/lingo/lingo-gr.y" +#line 326 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code1(g_lingo->c_intpush); g_lingo->codeInt((yyvsp[(1) - (1)].i)); ;} break; case 46: -#line 327 "engines/director/lingo/lingo-gr.y" +#line 329 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code1(g_lingo->c_floatpush); g_lingo->codeFloat((yyvsp[(1) - (1)].f)); ;} break; case 47: -#line 330 "engines/director/lingo/lingo-gr.y" +#line 332 "engines/director/lingo/lingo-gr.y" { // D3 (yyval.code) = g_lingo->code1(g_lingo->c_symbolpush); g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); ;} break; case 48: -#line 333 "engines/director/lingo/lingo-gr.y" +#line 335 "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 49: -#line 336 "engines/director/lingo/lingo-gr.y" +#line 338 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code1(g_lingo->c_eval); g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); @@ -2405,38 +2389,38 @@ yyreduce: break; case 50: -#line 342 "engines/director/lingo/lingo-gr.y" +#line 344 "engines/director/lingo/lingo-gr.y" { (yyval.code) = (yyvsp[(1) - (1)].code); ;} break; case 52: -#line 344 "engines/director/lingo/lingo-gr.y" +#line 346 "engines/director/lingo/lingo-gr.y" { g_lingo->codeFunc((yyvsp[(1) - (1)].s), 0); delete (yyvsp[(1) - (1)].s); ;} break; case 53: -#line 347 "engines/director/lingo/lingo-gr.y" +#line 349 "engines/director/lingo/lingo-gr.y" { g_lingo->codeFunc((yyvsp[(1) - (2)].s), 1); delete (yyvsp[(1) - (2)].s); ;} break; case 54: -#line 350 "engines/director/lingo/lingo-gr.y" +#line 352 "engines/director/lingo/lingo-gr.y" { g_lingo->codeFunc((yyvsp[(1) - (2)].s), (yyvsp[(2) - (2)].narg)); ;} break; case 55: -#line 351 "engines/director/lingo/lingo-gr.y" +#line 353 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->codeFunc((yyvsp[(1) - (4)].s), (yyvsp[(3) - (4)].narg)); delete (yyvsp[(1) - (4)].s); ;} break; case 56: -#line 354 "engines/director/lingo/lingo-gr.y" +#line 356 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code1(g_lingo->c_intpush); g_lingo->codeInt(0); // Put dummy id @@ -2448,7 +2432,7 @@ yyreduce: break; case 57: -#line 362 "engines/director/lingo/lingo-gr.y" +#line 364 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code1(g_lingo->c_theentitypush); inst e = 0, f = 0; @@ -2458,215 +2442,215 @@ yyreduce: break; case 59: -#line 369 "engines/director/lingo/lingo-gr.y" +#line 371 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_add); ;} break; case 60: -#line 370 "engines/director/lingo/lingo-gr.y" +#line 372 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_sub); ;} break; case 61: -#line 371 "engines/director/lingo/lingo-gr.y" +#line 373 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_mul); ;} break; case 62: -#line 372 "engines/director/lingo/lingo-gr.y" +#line 374 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_div); ;} break; case 63: -#line 373 "engines/director/lingo/lingo-gr.y" +#line 375 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_mod); ;} break; case 64: -#line 374 "engines/director/lingo/lingo-gr.y" +#line 376 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_gt); ;} break; case 65: -#line 375 "engines/director/lingo/lingo-gr.y" +#line 377 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_lt); ;} break; case 66: -#line 376 "engines/director/lingo/lingo-gr.y" +#line 378 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_eq); ;} break; case 67: -#line 377 "engines/director/lingo/lingo-gr.y" +#line 379 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_neq); ;} break; case 68: -#line 378 "engines/director/lingo/lingo-gr.y" +#line 380 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_ge); ;} break; case 69: -#line 379 "engines/director/lingo/lingo-gr.y" +#line 381 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_le); ;} break; case 70: -#line 380 "engines/director/lingo/lingo-gr.y" +#line 382 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_and); ;} break; case 71: -#line 381 "engines/director/lingo/lingo-gr.y" +#line 383 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_or); ;} break; case 72: -#line 382 "engines/director/lingo/lingo-gr.y" +#line 384 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_not); ;} break; case 73: -#line 383 "engines/director/lingo/lingo-gr.y" +#line 385 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_ampersand); ;} break; case 74: -#line 384 "engines/director/lingo/lingo-gr.y" +#line 386 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_concat); ;} break; case 75: -#line 385 "engines/director/lingo/lingo-gr.y" +#line 387 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_contains); ;} break; case 76: -#line 386 "engines/director/lingo/lingo-gr.y" +#line 388 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_starts); ;} break; case 77: -#line 387 "engines/director/lingo/lingo-gr.y" +#line 389 "engines/director/lingo/lingo-gr.y" { (yyval.code) = (yyvsp[(2) - (2)].code); ;} break; case 78: -#line 388 "engines/director/lingo/lingo-gr.y" +#line 390 "engines/director/lingo/lingo-gr.y" { (yyval.code) = (yyvsp[(2) - (2)].code); g_lingo->code1(g_lingo->c_negate); ;} break; case 79: -#line 389 "engines/director/lingo/lingo-gr.y" +#line 391 "engines/director/lingo/lingo-gr.y" { (yyval.code) = (yyvsp[(2) - (3)].code); ;} break; case 80: -#line 390 "engines/director/lingo/lingo-gr.y" +#line 392 "engines/director/lingo/lingo-gr.y" { (yyval.code) = g_lingo->code1(g_lingo->c_arraypush); g_lingo->codeArray((yyvsp[(2) - (3)].narg)); ;} break; case 81: -#line 391 "engines/director/lingo/lingo-gr.y" +#line 393 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_intersects); ;} break; case 82: -#line 392 "engines/director/lingo/lingo-gr.y" +#line 394 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_within); ;} break; case 83: -#line 393 "engines/director/lingo/lingo-gr.y" +#line 395 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_charOf); ;} break; case 84: -#line 394 "engines/director/lingo/lingo-gr.y" +#line 396 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_charToOf); ;} break; case 85: -#line 395 "engines/director/lingo/lingo-gr.y" +#line 397 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_itemOf); ;} break; case 86: -#line 396 "engines/director/lingo/lingo-gr.y" +#line 398 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_itemToOf); ;} break; case 87: -#line 397 "engines/director/lingo/lingo-gr.y" +#line 399 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_lineOf); ;} break; case 88: -#line 398 "engines/director/lingo/lingo-gr.y" +#line 400 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_lineToOf); ;} break; case 89: -#line 399 "engines/director/lingo/lingo-gr.y" +#line 401 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_wordOf); ;} break; case 90: -#line 400 "engines/director/lingo/lingo-gr.y" +#line 402 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_wordToOf); ;} break; case 91: -#line 401 "engines/director/lingo/lingo-gr.y" +#line 403 "engines/director/lingo/lingo-gr.y" { g_lingo->codeMe(nullptr, 0); ;} break; case 92: -#line 404 "engines/director/lingo/lingo-gr.y" +#line 406 "engines/director/lingo/lingo-gr.y" { g_lingo->codeFunc((yyvsp[(1) - (2)].s), 1); delete (yyvsp[(1) - (2)].s); ;} break; case 93: -#line 409 "engines/director/lingo/lingo-gr.y" +#line 411 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_printtop); ;} break; case 96: -#line 412 "engines/director/lingo/lingo-gr.y" +#line 414 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_exitRepeat); ;} break; case 97: -#line 413 "engines/director/lingo/lingo-gr.y" +#line 415 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_procret); ;} break; case 101: -#line 417 "engines/director/lingo/lingo-gr.y" +#line 419 "engines/director/lingo/lingo-gr.y" { g_lingo->codeFunc((yyvsp[(1) - (1)].s), 0); delete (yyvsp[(1) - (1)].s); ;} break; case 102: -#line 420 "engines/director/lingo/lingo-gr.y" +#line 422 "engines/director/lingo/lingo-gr.y" { g_lingo->codeFunc((yyvsp[(1) - (2)].s), 1); delete (yyvsp[(1) - (2)].s); ;} break; case 103: -#line 423 "engines/director/lingo/lingo-gr.y" +#line 425 "engines/director/lingo/lingo-gr.y" { g_lingo->codeFunc((yyvsp[(1) - (2)].s), 1); delete (yyvsp[(1) - (2)].s); ;} break; case 104: -#line 426 "engines/director/lingo/lingo-gr.y" +#line 428 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_voidpush); g_lingo->codeFunc((yyvsp[(1) - (1)].s), 1); @@ -2674,82 +2658,82 @@ yyreduce: break; case 105: -#line 430 "engines/director/lingo/lingo-gr.y" +#line 432 "engines/director/lingo/lingo-gr.y" { g_lingo->codeFunc((yyvsp[(1) - (2)].s), (yyvsp[(2) - (2)].narg)); ;} break; case 106: -#line 431 "engines/director/lingo/lingo-gr.y" +#line 433 "engines/director/lingo/lingo-gr.y" { g_lingo->codeMe((yyvsp[(3) - (4)].s), 0); ;} break; case 107: -#line 432 "engines/director/lingo/lingo-gr.y" +#line 434 "engines/director/lingo/lingo-gr.y" { g_lingo->codeMe((yyvsp[(3) - (6)].s), (yyvsp[(5) - (6)].narg)); ;} break; case 108: -#line 433 "engines/director/lingo/lingo-gr.y" +#line 435 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_open); ;} break; case 109: -#line 434 "engines/director/lingo/lingo-gr.y" +#line 436 "engines/director/lingo/lingo-gr.y" { g_lingo->code2(g_lingo->c_voidpush, g_lingo->c_open); ;} break; case 110: -#line 435 "engines/director/lingo/lingo-gr.y" +#line 437 "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 111: -#line 438 "engines/director/lingo/lingo-gr.y" +#line 440 "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 112: -#line 439 "engines/director/lingo/lingo-gr.y" +#line 441 "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 113: -#line 442 "engines/director/lingo/lingo-gr.y" +#line 444 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_property); g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); delete (yyvsp[(1) - (1)].s); ;} break; case 114: -#line 443 "engines/director/lingo/lingo-gr.y" +#line 445 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_property); g_lingo->codeString((yyvsp[(3) - (3)].s)->c_str()); delete (yyvsp[(3) - (3)].s); ;} break; case 115: -#line 446 "engines/director/lingo/lingo-gr.y" +#line 448 "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 116: -#line 447 "engines/director/lingo/lingo-gr.y" +#line 449 "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 117: -#line 458 "engines/director/lingo/lingo-gr.y" +#line 460 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_gotoloop); ;} break; case 118: -#line 459 "engines/director/lingo/lingo-gr.y" +#line 461 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_gotonext); ;} break; case 119: -#line 460 "engines/director/lingo/lingo-gr.y" +#line 462 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_gotoprevious); ;} break; case 120: -#line 461 "engines/director/lingo/lingo-gr.y" +#line 463 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_intpush); g_lingo->codeInt(1); @@ -2757,7 +2741,7 @@ yyreduce: break; case 121: -#line 465 "engines/director/lingo/lingo-gr.y" +#line 467 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_intpush); g_lingo->codeInt(3); @@ -2765,7 +2749,7 @@ yyreduce: break; case 122: -#line 469 "engines/director/lingo/lingo-gr.y" +#line 471 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_intpush); g_lingo->codeInt(2); @@ -2773,12 +2757,12 @@ yyreduce: break; case 127: -#line 483 "engines/director/lingo/lingo-gr.y" +#line 485 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_playdone); ;} break; case 128: -#line 484 "engines/director/lingo/lingo-gr.y" +#line 486 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_intpush); g_lingo->codeInt(1); @@ -2786,7 +2770,7 @@ yyreduce: break; case 129: -#line 488 "engines/director/lingo/lingo-gr.y" +#line 490 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_intpush); g_lingo->codeInt(3); @@ -2794,7 +2778,7 @@ yyreduce: break; case 130: -#line 492 "engines/director/lingo/lingo-gr.y" +#line 494 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_intpush); g_lingo->codeInt(2); @@ -2802,24 +2786,24 @@ yyreduce: break; case 131: -#line 496 "engines/director/lingo/lingo-gr.y" +#line 498 "engines/director/lingo/lingo-gr.y" { g_lingo->codeSetImmediate(true); ;} break; case 132: -#line 496 "engines/director/lingo/lingo-gr.y" +#line 498 "engines/director/lingo/lingo-gr.y" { g_lingo->codeSetImmediate(false); g_lingo->codeFunc((yyvsp[(1) - (3)].s), (yyvsp[(3) - (3)].narg)); ;} break; case 133: -#line 526 "engines/director/lingo/lingo-gr.y" +#line 528 "engines/director/lingo/lingo-gr.y" { g_lingo->_indef = true; g_lingo->_currentFactory.clear(); ;} break; case 134: -#line 527 "engines/director/lingo/lingo-gr.y" +#line 529 "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)); @@ -2827,17 +2811,17 @@ yyreduce: break; case 135: -#line 531 "engines/director/lingo/lingo-gr.y" +#line 533 "engines/director/lingo/lingo-gr.y" { g_lingo->codeFactory(*(yyvsp[(2) - (2)].s)); ;} break; case 136: -#line 532 "engines/director/lingo/lingo-gr.y" +#line 534 "engines/director/lingo/lingo-gr.y" { g_lingo->_indef = true; ;} break; case 137: -#line 533 "engines/director/lingo/lingo-gr.y" +#line 535 "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); @@ -2845,7 +2829,7 @@ yyreduce: break; case 138: -#line 537 "engines/director/lingo/lingo-gr.y" +#line 539 "engines/director/lingo/lingo-gr.y" { // D3 g_lingo->code1(g_lingo->c_procret); g_lingo->define(*(yyvsp[(1) - (8)].s), (yyvsp[(2) - (8)].code), (yyvsp[(3) - (8)].narg)); @@ -2856,7 +2840,7 @@ yyreduce: break; case 139: -#line 544 "engines/director/lingo/lingo-gr.y" +#line 546 "engines/director/lingo/lingo-gr.y" { // D4. No 'end' clause g_lingo->code1(g_lingo->c_procret); g_lingo->define(*(yyvsp[(1) - (6)].s), (yyvsp[(2) - (6)].code), (yyvsp[(3) - (6)].narg)); @@ -2865,37 +2849,37 @@ yyreduce: break; case 140: -#line 550 "engines/director/lingo/lingo-gr.y" +#line 552 "engines/director/lingo/lingo-gr.y" { (yyval.s) = (yyvsp[(2) - (2)].s); g_lingo->_indef = true; g_lingo->_currentFactory.clear(); g_lingo->_ignoreMe = true; ;} break; case 141: -#line 552 "engines/director/lingo/lingo-gr.y" +#line 554 "engines/director/lingo/lingo-gr.y" { (yyval.narg) = 0; ;} break; case 142: -#line 553 "engines/director/lingo/lingo-gr.y" +#line 555 "engines/director/lingo/lingo-gr.y" { g_lingo->codeArg((yyvsp[(1) - (1)].s)); (yyval.narg) = 1; ;} break; case 143: -#line 554 "engines/director/lingo/lingo-gr.y" +#line 556 "engines/director/lingo/lingo-gr.y" { g_lingo->codeArg((yyvsp[(3) - (3)].s)); (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;} break; case 144: -#line 555 "engines/director/lingo/lingo-gr.y" +#line 557 "engines/director/lingo/lingo-gr.y" { g_lingo->codeArg((yyvsp[(4) - (4)].s)); (yyval.narg) = (yyvsp[(1) - (4)].narg) + 1; ;} break; case 148: -#line 563 "engines/director/lingo/lingo-gr.y" +#line 565 "engines/director/lingo/lingo-gr.y" { g_lingo->codeArgStore(); ;} break; case 149: -#line 567 "engines/director/lingo/lingo-gr.y" +#line 569 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_call); g_lingo->codeString((yyvsp[(1) - (2)].s)->c_str()); @@ -2905,33 +2889,33 @@ yyreduce: break; case 150: -#line 575 "engines/director/lingo/lingo-gr.y" +#line 577 "engines/director/lingo/lingo-gr.y" { (yyval.narg) = 0; ;} break; case 151: -#line 576 "engines/director/lingo/lingo-gr.y" +#line 578 "engines/director/lingo/lingo-gr.y" { (yyval.narg) = 1; ;} break; case 152: -#line 577 "engines/director/lingo/lingo-gr.y" +#line 579 "engines/director/lingo/lingo-gr.y" { (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;} break; case 153: -#line 580 "engines/director/lingo/lingo-gr.y" +#line 582 "engines/director/lingo/lingo-gr.y" { (yyval.narg) = 1; ;} break; case 154: -#line 581 "engines/director/lingo/lingo-gr.y" +#line 583 "engines/director/lingo/lingo-gr.y" { (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;} break; /* Line 1267 of yacc.c. */ -#line 2935 "engines/director/lingo/lingo-gr.cpp" +#line 2919 "engines/director/lingo/lingo-gr.cpp" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -3145,6 +3129,6 @@ yyreturn: } -#line 584 "engines/director/lingo/lingo-gr.y" +#line 586 "engines/director/lingo/lingo-gr.y" diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y index ce2a8db344..7887ffb4a8 100644 --- a/engines/director/lingo/lingo-gr.y +++ b/engines/director/lingo/lingo-gr.y @@ -251,16 +251,18 @@ ifstmt: if expr tTHEN begin stmtlist end elseifstmtlist end tENDIF { (*g_lingo->_currentScript)[$1 + 3] = end; /* end, if cond fails */ g_lingo->processIf(0, $8 - $1); } - | if expr tTHEN begin stmtlist end elseifstmtlist end tELSE stmtlist tENDIF { + | if expr tTHEN begin stmtlist end elseifstmtlist end tELSE stmtlist end tENDIF { inst then = 0, else1 = 0, end = 0; WRITE_UINT32(&then, $4 - $1); WRITE_UINT32(&else1, $6 - $1); - WRITE_UINT32(&end, $8 - $1); + WRITE_UINT32(&end, $11 - $1); (*g_lingo->_currentScript)[$1 + 1] = then; /* thenpart */ (*g_lingo->_currentScript)[$1 + 2] = else1; /* elsepart */ (*g_lingo->_currentScript)[$1 + 3] = end; /* end, if cond fails */ - g_lingo->processIf(0, $8 - $1); } + g_lingo->codeLabel($8); + + g_lingo->processIf(0, $11 - $1); } ; elseifstmtlist: /* nothing */ @@ -269,7 +271,7 @@ elseifstmtlist: /* nothing */ elseifstmt: elseif expr tTHEN begin stmtlist end { inst then = 0; - WRITE_UINT32(&then, $5 - $1); + WRITE_UINT32(&then, $4 - $1); (*g_lingo->_currentScript)[$1 + 1] = then; /* thenpart */ g_lingo->codeLabel($1); } |