diff options
-rw-r--r-- | engines/director/lingo/lingo-gr.cpp | 297 | ||||
-rw-r--r-- | engines/director/lingo/lingo-gr.y | 4 |
2 files changed, 151 insertions, 150 deletions
diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp index 40febf03ff..0a23421932 100644 --- a/engines/director/lingo/lingo-gr.cpp +++ b/engines/director/lingo/lingo-gr.cpp @@ -557,7 +557,7 @@ union yyalloc /* YYNRULES -- Number of rules. */ #define YYNRULES 154 /* YYNRULES -- Number of states. */ -#define YYNSTATES 326 +#define YYNSTATES 327 /* 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, 86, 97, 109, 113, 120, 125, - 135, 148, 149, 152, 159, 162, 166, 168, 170, 171, - 172, 173, 176, 179, 183, 185, 187, 189, 191, 193, - 195, 197, 199, 201, 204, 207, 212, 214, 217, 219, - 223, 227, 231, 235, 239, 243, 247, 251, 255, 259, - 263, 267, 271, 274, 278, 282, 286, 290, 293, 296, - 300, 304, 309, 314, 319, 326, 331, 338, 343, 350, - 355, 362, 364, 367, 370, 372, 374, 377, 379, 382, - 385, 388, 390, 393, 396, 398, 401, 406, 413, 418, - 421, 425, 427, 431, 433, 437, 439, 443, 446, 449, - 452, 455, 459, 462, 465, 467, 471, 474, 477, 480, - 484, 487, 488, 492, 493, 502, 505, 506, 515, 524, - 531, 534, 535, 537, 541, 546, 547, 549, 553, 554, - 557, 558, 560, 564, 566 + 135, 149, 150, 153, 160, 163, 167, 169, 171, 172, + 173, 174, 177, 180, 184, 186, 188, 190, 192, 194, + 196, 198, 200, 202, 205, 208, 213, 215, 218, 220, + 224, 228, 232, 236, 240, 244, 248, 252, 256, 260, + 264, 268, 272, 275, 279, 283, 287, 291, 294, 297, + 301, 305, 310, 315, 320, 327, 332, 339, 344, 351, + 356, 363, 365, 368, 371, 373, 375, 378, 380, 383, + 386, 389, 391, 394, 397, 399, 402, 407, 414, 419, + 422, 426, 428, 432, 434, 438, 440, 444, 447, 450, + 453, 456, 460, 463, 466, 468, 472, 475, 478, 481, + 485, 488, 489, 493, 494, 503, 506, 507, 516, 525, + 532, 535, 536, 538, 542, 547, 548, 550, 554, 555, + 558, 559, 561, 565, 567 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ @@ -646,49 +646,50 @@ static const yytype_int16 yyrhs[] = 113, 123, -1, 126, 128, 101, 124, 123, 94, -1, 126, 128, 55, 128, -1, 120, 128, 123, 54, 124, 123, 116, 123, 92, -1, 120, 128, 123, 54, 124, - 123, 116, 123, 37, 124, 123, 92, -1, -1, 117, - 116, -1, 121, 128, 123, 54, 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 + 123, 116, 123, 37, 122, 124, 123, 92, -1, -1, + 117, 116, -1, 121, 128, 123, 54, 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. */ @@ -790,7 +791,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, 6, 10, 11, 3, 6, 4, 9, - 12, 0, 2, 6, 2, 3, 1, 1, 0, 0, + 13, 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 +842,8 @@ static const yytype_uint8 yydefact[] = 84, 86, 88, 90, 107, 23, 0, 39, 31, 27, 144, 139, 40, 40, 39, 40, 37, 39, 31, 0, 145, 134, 137, 40, 39, 0, 32, 39, 146, 138, - 39, 0, 40, 29, 0, 0, 0, 24, 39, 40, - 147, 25, 0, 39, 30, 33 + 39, 0, 38, 29, 0, 0, 0, 24, 40, 40, + 147, 25, 39, 39, 0, 33, 30 }; /* YYDEFGOTO[NTERM-NUM]. */ @@ -856,51 +857,51 @@ static const yytype_int16 yydefgoto[] = /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -173 +#define YYPACT_NINF -211 static const yytype_int16 yypact[] = { - 271, -82, -173, -173, 821, -173, -173, 821, 821, 821, - 28, -173, 821, 821, 821, 899, -173, -173, -173, 12, - 51, 701, -173, 55, 821, 11, -2, 57, 59, 65, - 821, 779, 67, 821, 821, 821, 821, 821, 821, -173, - 80, 84, 13, 821, 821, 821, 821, 2, -173, -173, - -173, -173, -173, 821, 46, 821, 623, 821, -173, 1413, - -173, -173, -173, -173, -173, -173, -173, -173, 15, 821, - -173, 1413, 1413, 1413, 1413, 10, 821, 1413, 10, 1413, - 821, 10, 821, -173, -173, 14, 821, -173, 821, -173, - 73, -173, 1413, 7, -173, -173, 941, 89, -173, -32, - 821, -11, 69, -173, -173, 1301, -173, 7, -173, -173, - 16, -57, 977, 1013, 1049, 1085, 1337, -173, 18, -173, - 91, -57, -57, 1373, 1413, -28, -173, 359, 1413, 821, - 1413, -173, 867, 821, 821, 821, 821, 821, 821, 821, + 271, -83, -211, -211, 821, -211, -211, 821, 821, 821, + -6, -211, 821, 821, 821, 899, -211, -211, -211, -24, + 6, 701, -211, 22, 821, 44, 39, 34, 38, 51, + 821, 779, 55, 821, 821, 821, 821, 821, 821, -211, + 57, 59, -7, 821, 821, 821, 821, 2, -211, -211, + -211, -211, -211, 821, 27, 821, 623, 821, -211, 1413, + -211, -211, -211, -211, -211, -211, -211, -211, 14, 821, + -211, 1413, 1413, 1413, 1413, 12, 821, 1413, 12, 1413, + 821, 12, 821, -211, -211, 13, 821, -211, 821, -211, + 63, -211, 1413, 11, -211, -211, 941, 89, -211, -32, + 821, -11, 68, -211, -211, 1301, -211, 11, -211, -211, + 15, -57, 977, 1013, 1049, 1085, 1337, -211, 16, -211, + 96, -57, -57, 1373, 1413, 1, -211, 359, 1413, 821, + 1413, -211, 867, 821, 821, 821, 821, 821, 821, 821, 821, 821, 821, 821, 821, 821, 821, 821, 821, 821, - 97, 821, 941, 821, 38, 1373, -48, 38, 118, 1413, - 1413, 821, -173, -173, 72, 821, 821, -173, 821, 821, - 81, 1265, 821, 821, -173, -173, 821, -173, 120, 821, - 821, 821, 821, 821, 821, 821, 821, 821, 821, 123, - -41, -173, -173, 821, -173, -173, 1413, 100, -173, 821, - -173, -5, -5, -5, -5, 1449, 1449, -57, 1413, -5, - -5, 8, 125, 125, -57, -57, 1413, 1413, -173, -86, - 1413, -173, -173, 1413, 97, -173, -173, 1413, 1413, 1413, - -5, 821, 821, 1413, -5, 97, 1413, -173, 1413, 1121, - 1413, 1157, 1413, 1193, 1413, 1229, 1413, 1413, -173, -173, - 821, 1413, 535, -20, -173, 1413, 535, 47, 126, -83, - -5, 1413, -51, 821, 821, 821, 821, -37, -173, -173, - 66, 103, 821, 535, 76, 130, -173, -173, 47, 47, - 1413, 1413, 1413, 1413, -173, -173, 821, 1413, 128, -173, - -173, 447, -173, -173, 1413, -173, -173, -173, 128, 821, - 133, 535, 535, -173, 535, -31, -173, 1413, -173, 77, - 535, 93, -173, -173, 119, 157, 99, -173, 535, -173, - -173, -173, 102, 535, -173, -173 + 97, 821, 941, 821, 20, 1373, -41, 20, 118, 1413, + 1413, 821, -211, -211, 85, 821, 821, -211, 821, 821, + 81, 1265, 821, 821, -211, -211, 821, -211, 123, 821, + 821, 821, 821, 821, 821, 821, 821, 821, 821, 124, + -37, -211, -211, 821, -211, -211, 1413, 101, -211, 821, + -211, -5, -5, -5, -5, 1449, 1449, -57, 1413, -5, + -5, 8, 125, 125, -57, -57, 1413, 1413, -211, -86, + 1413, -211, -211, 1413, 97, -211, -211, 1413, 1413, 1413, + -5, 821, 821, 1413, -5, 97, 1413, -211, 1413, 1121, + 1413, 1157, 1413, 1193, 1413, 1229, 1413, 1413, -211, -211, + 821, 1413, 535, -20, -211, 1413, 535, 48, 128, -51, + -5, 1413, -45, 821, 821, 821, 821, -28, -211, -211, + 66, 105, 821, 535, 69, 136, -211, -211, 48, 48, + 1413, 1413, 1413, 1413, -211, -211, 821, 1413, 132, -211, + -211, 447, -211, -211, 1413, -211, -211, -211, 132, 821, + 143, 535, 535, -211, 535, -31, -211, 1413, -211, 77, + 535, 93, -211, -211, 133, 162, 103, -211, -211, -211, + -211, -211, 535, 535, 102, -211, -211 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -173, -173, 70, -173, 140, 1, -173, -100, -173, -173, - -173, -173, -173, -139, -85, -102, -173, -173, 104, -4, - 35, -173, -173, -173, -173, -173, 174, -19, -173, -173, - -173, -173, -173, -173, -172, -173, -170, -173, -39, 62 + -211, -211, 70, -211, 142, 19, -211, -99, -211, -211, + -211, -211, -211, -162, -85, -102, -211, -211, 104, -4, + 41, -211, -211, -211, -211, -211, 175, -19, -211, -211, + -211, -211, -211, -211, -210, -211, -161, -211, -39, 64 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -910,30 +911,30 @@ static const yytype_int16 yypgoto[] = #define YYTABLE_NINF -6 static const yytype_int16 yytable[] = { - 71, 51, 126, 72, 73, 74, 312, 125, 77, 74, - 79, 74, 108, 99, 100, 257, 271, 92, 278, 67, - 96, 140, 258, 168, 224, 258, 105, 92, 101, 111, - 112, 113, 114, 115, 116, 272, 235, 154, 169, 121, + 71, 224, 126, 72, 73, 74, 312, 125, 77, 74, + 79, 74, 108, 235, 259, 257, 271, 92, 67, 51, + 96, 140, 258, 168, 76, 262, 105, 92, 83, 111, + 112, 113, 114, 115, 116, 272, 84, 154, 169, 121, 122, 123, 124, 157, 172, 197, 198, 148, 149, 128, - 279, 130, 259, 132, 88, 221, 90, 258, 76, 173, - 193, 313, 249, 262, 83, 152, 284, 250, 97, 98, - 139, 193, 124, 140, 162, 78, 155, 81, 124, 192, - 193, 84, 159, 139, 160, 95, 140, 102, 177, 103, - 143, 144, 145, 146, 147, 104, 171, 109, 256, 148, - 149, 14, 225, 127, 144, 145, 146, 147, 292, 293, - 117, 253, 148, 149, 119, 120, 129, 151, 153, 167, - 161, 190, 158, 174, 178, 196, 189, 218, 51, 201, + 278, 130, 95, 132, 99, 100, 279, 258, 88, 173, + 90, 313, 221, 258, 102, 152, 249, 193, 103, 101, + 139, 250, 124, 140, 162, 284, 155, 78, 124, 81, + 193, 104, 159, 139, 160, 109, 140, 117, 177, 119, + 143, 144, 145, 146, 147, 120, 171, 129, 256, 148, + 149, 97, 98, 127, 144, 145, 146, 147, 192, 193, + 161, 253, 148, 149, 14, 225, 151, 292, 293, 167, + 153, 158, 174, 178, 189, 196, 190, 218, 193, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, - 212, 213, 214, 215, 216, 217, 193, 124, 222, 220, - 237, 231, 273, 248, 254, 275, 277, 223, 286, 285, - 290, 227, 228, 308, 229, 230, 296, 270, 233, 234, - 289, 274, 236, 319, 291, 238, 239, 240, 241, 242, - 243, 244, 245, 246, 247, 315, 317, 320, 288, 251, - 301, 302, 321, 304, 324, 255, 131, 194, 306, 226, - 139, 310, 295, 140, 170, 107, 0, 0, 0, 303, - 318, 267, 305, 0, 0, 0, 0, 323, 0, 311, + 212, 213, 214, 215, 216, 217, 51, 124, 222, 220, + 318, 231, 273, 237, 248, 254, 275, 223, 277, 285, + 286, 227, 228, 289, 229, 230, 290, 270, 233, 234, + 296, 274, 236, 308, 291, 238, 239, 240, 241, 242, + 243, 244, 245, 246, 247, 315, 317, 319, 288, 251, + 301, 302, 320, 304, 326, 255, 321, 194, 131, 306, + 139, 310, 295, 140, 170, 226, 107, 0, 0, 303, + 0, 267, 305, 0, 0, 0, 322, 323, 0, 311, 0, 0, 314, 146, 147, 316, 0, 260, 261, 148, - 149, 0, 0, 322, 0, 0, 0, 0, 325, 0, + 149, 0, 0, 0, 0, 0, 0, 324, 325, 0, 0, 0, 0, 0, 0, 0, 124, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 280, 281, 282, 283, 0, 0, 0, 0, 0, 287, 0, @@ -1070,30 +1071,30 @@ static const yytype_int16 yytable[] = static const yytype_int16 yycheck[] = { - 4, 0, 0, 7, 8, 9, 37, 46, 12, 13, - 14, 15, 31, 15, 16, 101, 36, 21, 101, 101, - 24, 78, 108, 55, 163, 108, 30, 31, 30, 33, - 34, 35, 36, 37, 38, 55, 175, 76, 70, 43, + 4, 163, 0, 7, 8, 9, 37, 46, 12, 13, + 14, 15, 31, 175, 224, 101, 36, 21, 101, 0, + 24, 78, 108, 55, 30, 235, 30, 31, 52, 33, + 34, 35, 36, 37, 38, 55, 30, 76, 70, 43, 44, 45, 46, 82, 55, 130, 131, 104, 105, 53, - 101, 55, 224, 57, 47, 103, 49, 108, 30, 70, - 108, 92, 103, 235, 52, 69, 103, 108, 57, 58, - 75, 108, 76, 78, 93, 13, 80, 15, 82, 107, + 101, 55, 30, 57, 15, 16, 101, 108, 47, 70, + 49, 92, 103, 108, 30, 69, 103, 108, 30, 30, + 75, 108, 76, 78, 93, 103, 80, 13, 82, 15, 108, 30, 86, 75, 88, 30, 78, 30, 107, 30, - 95, 96, 97, 98, 99, 30, 100, 30, 200, 104, - 105, 29, 30, 101, 96, 97, 98, 99, 278, 279, - 30, 196, 104, 105, 30, 102, 70, 102, 108, 30, - 47, 30, 108, 54, 108, 129, 108, 30, 127, 133, + 95, 96, 97, 98, 99, 102, 100, 70, 200, 104, + 105, 57, 58, 101, 96, 97, 98, 99, 107, 108, + 47, 196, 104, 105, 29, 30, 102, 278, 279, 30, + 108, 108, 54, 108, 108, 129, 30, 30, 108, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, - 144, 145, 146, 147, 148, 149, 108, 151, 30, 153, - 30, 70, 254, 30, 54, 108, 30, 161, 55, 93, - 30, 165, 166, 30, 168, 169, 38, 252, 172, 173, - 94, 256, 176, 54, 276, 179, 180, 181, 182, 183, - 184, 185, 186, 187, 188, 108, 93, 30, 273, 193, - 292, 293, 93, 295, 92, 199, 56, 127, 298, 164, - 75, 303, 287, 78, 100, 31, -1, -1, -1, 294, - 312, 250, 297, -1, -1, -1, -1, 319, -1, 304, + 144, 145, 146, 147, 148, 149, 127, 151, 30, 153, + 312, 70, 254, 30, 30, 54, 108, 161, 30, 93, + 55, 165, 166, 94, 168, 169, 30, 252, 172, 173, + 38, 256, 176, 30, 276, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 108, 93, 54, 273, 193, + 292, 293, 30, 295, 92, 199, 93, 127, 56, 298, + 75, 303, 287, 78, 100, 164, 31, -1, -1, 294, + -1, 250, 297, -1, -1, -1, 318, 319, -1, 304, -1, -1, 307, 98, 99, 310, -1, 231, 232, 104, - 105, -1, -1, 318, -1, -1, -1, -1, 323, -1, + 105, -1, -1, -1, -1, -1, -1, 322, 323, -1, -1, -1, -1, -1, -1, -1, 250, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 263, 264, 265, 266, -1, -1, -1, -1, -1, 272, -1, @@ -1263,8 +1264,8 @@ static const yytype_uint8 yystos[] = 128, 128, 128, 128, 103, 93, 55, 128, 123, 94, 30, 124, 145, 145, 128, 123, 38, 116, 117, 121, 34, 124, 124, 123, 124, 123, 116, 128, 30, 144, - 124, 123, 37, 92, 123, 108, 123, 93, 124, 54, - 30, 93, 123, 124, 92, 123 + 124, 123, 37, 92, 123, 108, 123, 93, 122, 54, + 30, 93, 124, 124, 123, 123, 92 }; #define yyerrok (yyerrstatus = 0) @@ -2254,14 +2255,14 @@ yyreduce: #line 254 "engines/director/lingo/lingo-gr.y" { inst then = 0, else1 = 0, end = 0; - WRITE_UINT32(&then, (yyvsp[(3) - (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 */ + WRITE_UINT32(&then, (yyvsp[(3) - (13)].code) - (yyvsp[(1) - (13)].code)); + WRITE_UINT32(&else1, (yyvsp[(6) - (13)].code) - (yyvsp[(1) - (13)].code)); + WRITE_UINT32(&end, (yyvsp[(11) - (13)].code) - (yyvsp[(1) - (13)].code)); + (*g_lingo->_currentScript)[(yyvsp[(1) - (13)].code) + 1] = then; /* thenpart */ + (*g_lingo->_currentScript)[(yyvsp[(1) - (13)].code) + 2] = else1; /* elsepart */ + (*g_lingo->_currentScript)[(yyvsp[(1) - (13)].code) + 3] = end; /* end, if cond fails */ - g_lingo->processIf((yyvsp[(1) - (12)].code), (yyvsp[(11) - (12)].code) - (yyvsp[(1) - (12)].code), (yyvsp[(8) - (12)].code) - (yyvsp[(1) - (12)].code)); ;} + g_lingo->processIf((yyvsp[(1) - (13)].code), (yyvsp[(11) - (13)].code) - (yyvsp[(1) - (13)].code), (yyvsp[(10) - (13)].code) - (yyvsp[(1) - (13)].code)); ;} break; case 33: @@ -2901,7 +2902,7 @@ yyreduce: /* Line 1267 of yacc.c. */ -#line 2905 "engines/director/lingo/lingo-gr.cpp" +#line 2906 "engines/director/lingo/lingo-gr.cpp" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y index 59abfc19a6..53807a4157 100644 --- a/engines/director/lingo/lingo-gr.y +++ b/engines/director/lingo/lingo-gr.y @@ -251,7 +251,7 @@ ifstmt: if expr end tTHEN stmtlist end elseifstmtlist end tENDIF { (*g_lingo->_currentScript)[$1 + 3] = end; /* end, if cond fails */ g_lingo->processIf($1, $8 - $1, 0); } - | if expr end tTHEN stmtlist end elseifstmtlist end tELSE stmtlist end tENDIF { + | if expr end tTHEN stmtlist end elseifstmtlist end tELSE begin stmtlist end tENDIF { inst then = 0, else1 = 0, end = 0; WRITE_UINT32(&then, $3 - $1); WRITE_UINT32(&else1, $6 - $1); @@ -260,7 +260,7 @@ ifstmt: if expr end tTHEN stmtlist end elseifstmtlist end tENDIF { (*g_lingo->_currentScript)[$1 + 2] = else1; /* elsepart */ (*g_lingo->_currentScript)[$1 + 3] = end; /* end, if cond fails */ - g_lingo->processIf($1, $11 - $1, $8 - $1); } + g_lingo->processIf($1, $11 - $1, $10 - $1); } ; elseifstmtlist: /* nothing */ |