aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/director/lingo/lingo-code.cpp7
-rw-r--r--engines/director/lingo/lingo-gr.cpp882
-rw-r--r--engines/director/lingo/lingo-gr.y16
-rw-r--r--engines/director/lingo/lingo-the.cpp4
-rw-r--r--engines/director/lingo/lingo.h2
-rw-r--r--engines/director/lingo/tests/the.lingo1
6 files changed, 486 insertions, 426 deletions
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp
index 5b72345d3f..9dd802182b 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -244,6 +244,13 @@ void Lingo::c_theentityassign() {
g_lingo->push(d); // Dummy value
}
+void Lingo::c_swap() {
+ Datum d2 = g_lingo->pop();
+ Datum d1 = g_lingo->pop();
+ g_lingo->push(d2);
+ g_lingo->push(d1);
+}
+
void Lingo::c_add() {
Datum d2 = g_lingo->pop();
Datum d1 = g_lingo->pop();
diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp
index d3a8892eb0..b4fb67a652 100644
--- a/engines/director/lingo/lingo-gr.cpp
+++ b/engines/director/lingo/lingo-gr.cpp
@@ -451,18 +451,18 @@ union yyalloc
#endif
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 69
+#define YYFINAL 70
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 599
+#define YYLAST 639
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 66
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 33
/* YYNRULES -- Number of rules. */
-#define YYNRULES 110
+#define YYNRULES 112
/* YYNRULES -- Number of states. */
-#define YYNSTATES 231
+#define YYNSTATES 237
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
@@ -513,17 +513,17 @@ static const yytype_uint8 yytranslate[] =
static const yytype_uint16 yyprhs[] =
{
0, 0, 3, 7, 9, 12, 14, 15, 17, 19,
- 21, 23, 25, 30, 35, 40, 45, 50, 52, 54,
- 56, 58, 67, 79, 92, 101, 113, 125, 132, 143,
- 154, 155, 159, 162, 164, 167, 169, 176, 178, 184,
- 186, 190, 194, 197, 201, 203, 205, 206, 207, 208,
- 211, 214, 216, 218, 220, 225, 230, 232, 234, 237,
- 239, 243, 247, 251, 255, 259, 263, 267, 271, 275,
- 279, 283, 286, 290, 294, 298, 302, 305, 308, 312,
- 315, 318, 321, 323, 325, 328, 330, 334, 337, 340,
- 343, 346, 350, 353, 357, 360, 363, 365, 369, 372,
- 376, 377, 386, 387, 389, 393, 398, 399, 403, 404,
- 406
+ 21, 23, 25, 30, 35, 40, 46, 51, 56, 62,
+ 64, 66, 68, 70, 79, 91, 104, 113, 125, 137,
+ 144, 155, 166, 167, 171, 174, 176, 179, 181, 188,
+ 190, 196, 198, 202, 206, 209, 213, 215, 217, 218,
+ 219, 220, 223, 226, 228, 230, 232, 237, 242, 244,
+ 246, 249, 251, 255, 259, 263, 267, 271, 275, 279,
+ 283, 287, 291, 295, 298, 302, 306, 310, 314, 317,
+ 320, 324, 327, 330, 333, 335, 337, 340, 342, 346,
+ 349, 352, 355, 358, 362, 365, 369, 372, 375, 377,
+ 381, 384, 388, 389, 398, 399, 401, 405, 410, 411,
+ 415, 416, 418
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
@@ -533,60 +533,62 @@ static const yytype_int8 yyrhs[] =
59, -1, 59, -1, -1, 93, -1, 88, -1, 97,
-1, 70, -1, 72, -1, 33, 87, 24, 12, -1,
35, 12, 53, 87, -1, 35, 8, 53, 87, -1,
- 35, 12, 37, 87, -1, 35, 8, 37, 87, -1,
- 87, -1, 88, -1, 71, -1, 73, -1, 80, 60,
- 79, 61, 86, 85, 18, 34, -1, 81, 53, 87,
- 85, 37, 87, 85, 86, 85, 18, 34, -1, 81,
- 53, 87, 85, 15, 37, 87, 85, 86, 85, 18,
- 34, -1, 82, 79, 36, 68, 86, 85, 18, 23,
- -1, 82, 79, 36, 68, 86, 85, 40, 86, 85,
- 18, 23, -1, 82, 79, 36, 68, 86, 85, 84,
- 75, 85, 18, 23, -1, 82, 79, 36, 84, 71,
- 85, -1, 82, 79, 36, 84, 71, 85, 40, 84,
- 71, 85, -1, 82, 79, 36, 84, 71, 85, 76,
- 85, 74, 85, -1, -1, 40, 84, 71, -1, 75,
- 78, -1, 78, -1, 76, 77, -1, 77, -1, 83,
- 79, 36, 84, 72, 85, -1, 76, -1, 83, 79,
- 36, 86, 85, -1, 87, -1, 87, 53, 87, -1,
- 60, 79, 61, -1, 34, 39, -1, 34, 38, 12,
- -1, 23, -1, 17, -1, -1, -1, -1, 86, 68,
- -1, 86, 72, -1, 7, -1, 10, -1, 13, -1,
- 11, 60, 98, 61, -1, 12, 60, 98, 61, -1,
- 12, -1, 8, -1, 9, 87, -1, 70, -1, 87,
- 54, 87, -1, 87, 55, 87, -1, 87, 56, 87,
- -1, 87, 57, 87, -1, 87, 62, 87, -1, 87,
- 63, 87, -1, 87, 46, 87, -1, 87, 41, 87,
- -1, 87, 42, 87, -1, 87, 47, 87, -1, 87,
- 48, 87, -1, 49, 87, -1, 87, 64, 87, -1,
- 87, 50, 87, -1, 87, 51, 87, -1, 87, 52,
- 87, -1, 54, 87, -1, 55, 87, -1, 60, 87,
- 61, -1, 27, 13, -1, 28, 12, -1, 33, 87,
- -1, 90, -1, 19, -1, 21, 89, -1, 12, -1,
- 89, 65, 12, -1, 22, 25, -1, 22, 30, -1,
- 22, 32, -1, 22, 91, -1, 22, 91, 92, -1,
- 22, 92, -1, 37, 20, 13, -1, 20, 13, -1,
- 37, 13, -1, 13, -1, 31, 29, 13, -1, 29,
- 13, -1, 37, 29, 13, -1, -1, 26, 12, 94,
- 84, 95, 68, 96, 86, -1, -1, 12, -1, 95,
- 65, 12, -1, 95, 68, 65, 12, -1, -1, 12,
- 84, 98, -1, -1, 87, -1, 98, 65, 87, -1
+ 35, 9, 87, 53, 87, -1, 35, 12, 37, 87,
+ -1, 35, 8, 37, 87, -1, 35, 9, 87, 37,
+ 87, -1, 87, -1, 88, -1, 71, -1, 73, -1,
+ 80, 60, 79, 61, 86, 85, 18, 34, -1, 81,
+ 53, 87, 85, 37, 87, 85, 86, 85, 18, 34,
+ -1, 81, 53, 87, 85, 15, 37, 87, 85, 86,
+ 85, 18, 34, -1, 82, 79, 36, 68, 86, 85,
+ 18, 23, -1, 82, 79, 36, 68, 86, 85, 40,
+ 86, 85, 18, 23, -1, 82, 79, 36, 68, 86,
+ 85, 84, 75, 85, 18, 23, -1, 82, 79, 36,
+ 84, 71, 85, -1, 82, 79, 36, 84, 71, 85,
+ 40, 84, 71, 85, -1, 82, 79, 36, 84, 71,
+ 85, 76, 85, 74, 85, -1, -1, 40, 84, 71,
+ -1, 75, 78, -1, 78, -1, 76, 77, -1, 77,
+ -1, 83, 79, 36, 84, 72, 85, -1, 76, -1,
+ 83, 79, 36, 86, 85, -1, 87, -1, 87, 53,
+ 87, -1, 60, 79, 61, -1, 34, 39, -1, 34,
+ 38, 12, -1, 23, -1, 17, -1, -1, -1, -1,
+ 86, 68, -1, 86, 72, -1, 7, -1, 10, -1,
+ 13, -1, 11, 60, 98, 61, -1, 12, 60, 98,
+ 61, -1, 12, -1, 8, -1, 9, 87, -1, 70,
+ -1, 87, 54, 87, -1, 87, 55, 87, -1, 87,
+ 56, 87, -1, 87, 57, 87, -1, 87, 62, 87,
+ -1, 87, 63, 87, -1, 87, 46, 87, -1, 87,
+ 41, 87, -1, 87, 42, 87, -1, 87, 47, 87,
+ -1, 87, 48, 87, -1, 49, 87, -1, 87, 64,
+ 87, -1, 87, 50, 87, -1, 87, 51, 87, -1,
+ 87, 52, 87, -1, 54, 87, -1, 55, 87, -1,
+ 60, 87, 61, -1, 27, 13, -1, 28, 12, -1,
+ 33, 87, -1, 90, -1, 19, -1, 21, 89, -1,
+ 12, -1, 89, 65, 12, -1, 22, 25, -1, 22,
+ 30, -1, 22, 32, -1, 22, 91, -1, 22, 91,
+ 92, -1, 22, 92, -1, 37, 20, 13, -1, 20,
+ 13, -1, 37, 13, -1, 13, -1, 31, 29, 13,
+ -1, 29, 13, -1, 37, 29, 13, -1, -1, 26,
+ 12, 94, 84, 95, 68, 96, 86, -1, -1, 12,
+ -1, 95, 65, 12, -1, 95, 68, 65, 12, -1,
+ -1, 12, 84, 98, -1, -1, 87, -1, 98, 65,
+ 87, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
0, 100, 100, 101, 102, 105, 110, 111, 112, 113,
- 114, 115, 118, 124, 130, 138, 144, 153, 154, 156,
- 157, 162, 173, 189, 203, 210, 219, 228, 238, 248,
- 259, 260, 263, 264, 267, 268, 271, 279, 280, 288,
- 289, 290, 292, 294, 300, 306, 313, 315, 317, 318,
- 319, 322, 327, 330, 333, 339, 347, 350, 357, 363,
- 364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
- 374, 375, 376, 377, 378, 379, 380, 381, 382, 385,
- 386, 387, 388, 389, 391, 394, 395, 406, 407, 408,
- 409, 414, 420, 427, 428, 429, 430, 433, 434, 435,
- 463, 463, 470, 471, 472, 473, 475, 478, 486, 487,
- 488
+ 114, 115, 118, 124, 130, 138, 146, 152, 160, 169,
+ 170, 172, 173, 178, 189, 205, 219, 226, 235, 244,
+ 254, 264, 275, 276, 279, 280, 283, 284, 287, 295,
+ 296, 304, 305, 306, 308, 310, 316, 322, 329, 331,
+ 333, 334, 335, 338, 343, 346, 349, 355, 363, 366,
+ 373, 379, 380, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 401, 402, 403, 404, 405, 407, 410, 411, 422,
+ 423, 424, 425, 430, 436, 443, 444, 445, 446, 449,
+ 450, 451, 479, 479, 486, 487, 488, 489, 491, 494,
+ 502, 503, 504
};
#endif
@@ -631,34 +633,34 @@ static const yytype_uint16 yytoknum[] =
static const yytype_uint8 yyr1[] =
{
0, 66, 67, 67, 67, 68, 69, 69, 69, 69,
- 69, 69, 70, 70, 70, 70, 70, 71, 71, 72,
- 72, 72, 72, 72, 73, 73, 73, 73, 73, 73,
- 74, 74, 75, 75, 76, 76, 77, 78, 78, 79,
- 79, 79, 80, 81, 82, 83, 84, 85, 86, 86,
- 86, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 69, 69, 70, 70, 70, 70, 70, 70, 70, 71,
+ 71, 72, 72, 72, 72, 72, 73, 73, 73, 73,
+ 73, 73, 74, 74, 75, 75, 76, 76, 77, 78,
+ 78, 79, 79, 79, 80, 81, 82, 83, 84, 85,
+ 86, 86, 86, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 87, 87, 87, 88,
- 88, 88, 88, 88, 88, 89, 89, 90, 90, 90,
- 90, 90, 90, 91, 91, 91, 91, 92, 92, 92,
- 94, 93, 95, 95, 95, 95, 96, 97, 98, 98,
- 98
+ 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
+ 87, 88, 88, 88, 88, 88, 88, 89, 89, 90,
+ 90, 90, 90, 90, 90, 91, 91, 91, 91, 92,
+ 92, 92, 94, 93, 95, 95, 95, 95, 96, 97,
+ 98, 98, 98
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
static const yytype_uint8 yyr2[] =
{
0, 2, 3, 1, 2, 1, 0, 1, 1, 1,
- 1, 1, 4, 4, 4, 4, 4, 1, 1, 1,
- 1, 8, 11, 12, 8, 11, 11, 6, 10, 10,
- 0, 3, 2, 1, 2, 1, 6, 1, 5, 1,
- 3, 3, 2, 3, 1, 1, 0, 0, 0, 2,
- 2, 1, 1, 1, 4, 4, 1, 1, 2, 1,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 2, 3, 3, 3, 3, 2, 2, 3, 2,
- 2, 2, 1, 1, 2, 1, 3, 2, 2, 2,
- 2, 3, 2, 3, 2, 2, 1, 3, 2, 3,
- 0, 8, 0, 1, 3, 4, 0, 3, 0, 1,
- 3
+ 1, 1, 4, 4, 4, 5, 4, 4, 5, 1,
+ 1, 1, 1, 8, 11, 12, 8, 11, 11, 6,
+ 10, 10, 0, 3, 2, 1, 2, 1, 6, 1,
+ 5, 1, 3, 3, 2, 3, 1, 1, 0, 0,
+ 0, 2, 2, 1, 1, 1, 4, 4, 1, 1,
+ 2, 1, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 2, 3, 3, 3, 3, 2, 2,
+ 3, 2, 2, 2, 1, 1, 2, 1, 3, 2,
+ 2, 2, 2, 3, 2, 3, 2, 2, 1, 3,
+ 2, 3, 0, 8, 0, 1, 3, 4, 0, 3,
+ 0, 1, 3
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -666,197 +668,205 @@ static const yytype_uint8 yyr2[] =
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
- 0, 0, 51, 57, 0, 52, 0, 46, 53, 83,
- 0, 0, 44, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 3, 59, 19, 11, 20, 0,
- 0, 0, 17, 8, 82, 7, 9, 4, 56, 0,
- 59, 58, 108, 108, 108, 85, 84, 96, 0, 87,
- 0, 88, 0, 89, 0, 90, 92, 100, 79, 80,
- 81, 0, 42, 0, 0, 71, 76, 77, 0, 1,
- 5, 6, 0, 0, 0, 0, 39, 0, 0, 0,
+ 0, 0, 53, 59, 0, 54, 0, 48, 55, 85,
+ 0, 0, 46, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3, 61, 21, 11, 22, 0,
+ 0, 0, 19, 8, 84, 7, 9, 4, 58, 0,
+ 61, 60, 110, 110, 110, 87, 86, 98, 0, 89,
+ 0, 90, 0, 91, 0, 92, 94, 102, 81, 82,
+ 83, 0, 44, 0, 0, 0, 73, 78, 79, 0,
+ 1, 5, 6, 0, 0, 0, 0, 41, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 109, 0, 0, 107, 0, 94, 98,
- 0, 95, 0, 0, 0, 91, 46, 0, 43, 0,
- 0, 0, 0, 78, 2, 0, 47, 0, 0, 46,
- 0, 67, 68, 66, 69, 70, 73, 74, 75, 60,
- 61, 62, 63, 64, 65, 72, 54, 0, 55, 86,
- 97, 93, 99, 102, 12, 16, 14, 15, 13, 48,
- 0, 41, 48, 0, 40, 110, 103, 0, 47, 0,
- 0, 47, 47, 18, 0, 106, 49, 50, 0, 0,
- 47, 46, 27, 104, 0, 48, 0, 47, 48, 0,
- 48, 0, 45, 46, 47, 35, 0, 105, 101, 21,
- 48, 47, 24, 47, 47, 37, 33, 0, 0, 34,
- 30, 0, 47, 0, 0, 32, 0, 0, 47, 46,
- 47, 46, 0, 0, 0, 0, 46, 28, 0, 29,
- 0, 0, 22, 25, 26, 47, 31, 47, 23, 38,
- 36
+ 0, 0, 0, 0, 111, 0, 0, 109, 0, 96,
+ 100, 0, 97, 0, 0, 0, 93, 48, 0, 45,
+ 0, 0, 0, 0, 0, 80, 2, 0, 49, 0,
+ 0, 48, 0, 69, 70, 68, 71, 72, 75, 76,
+ 77, 62, 63, 64, 65, 66, 67, 74, 56, 0,
+ 57, 88, 99, 95, 101, 104, 12, 17, 14, 0,
+ 0, 16, 13, 50, 0, 43, 50, 0, 42, 112,
+ 105, 0, 18, 15, 49, 0, 0, 49, 49, 20,
+ 0, 108, 51, 52, 0, 0, 49, 48, 29, 106,
+ 0, 50, 0, 49, 50, 0, 50, 0, 47, 48,
+ 49, 37, 0, 107, 103, 23, 50, 49, 26, 49,
+ 49, 39, 35, 0, 0, 36, 32, 0, 49, 0,
+ 0, 34, 0, 0, 49, 48, 49, 48, 0, 0,
+ 0, 0, 48, 30, 0, 31, 0, 0, 24, 27,
+ 28, 49, 33, 49, 25, 40, 38
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 23, 166, 24, 40, 26, 167, 28, 210, 194,
- 195, 185, 196, 75, 29, 30, 31, 186, 220, 150,
- 158, 32, 163, 46, 34, 55, 56, 35, 106, 157,
- 175, 36, 94
+ -1, 23, 172, 24, 40, 26, 173, 28, 216, 200,
+ 201, 191, 202, 76, 29, 30, 31, 192, 226, 154,
+ 164, 32, 169, 46, 34, 55, 56, 35, 107, 161,
+ 181, 36, 95
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -165
+#define YYPACT_NINF -172
static const yytype_int16 yypact[] =
{
- 173, -39, -165, -165, 343, -165, -38, 492, -165, -165,
- 36, 120, -165, 41, 43, 53, 343, 23, 13, 343,
- 343, 343, 343, 5, -165, 9, -165, -165, -165, 14,
- 24, 372, 473, -165, -165, -165, -165, -165, 16, 343,
- -165, 473, 343, 343, 343, -165, 17, -165, 54, -165,
- 65, -165, 72, -165, 11, 29, -165, -165, -165, -165,
- 387, 90, -165, -21, -19, 535, 535, 535, 430, -165,
- -165, 227, 372, 343, 372, 68, 454, 343, 343, 343,
- 343, 343, 343, 343, 343, 343, 343, 343, 343, 343,
- 343, 343, 387, 473, -22, -2, 40, 96, -165, -165,
- 97, -165, 98, 99, 80, -165, -165, 102, -165, 343,
- 343, 343, 343, -165, -165, 60, 473, 62, 406, 66,
- 343, 473, 473, 473, 473, 473, 473, 473, 473, 516,
- 516, 535, 535, 473, 473, 473, -165, 343, -165, -165,
- -165, -165, -165, 112, -165, 473, 473, 473, 473, -165,
- -1, -165, -165, 314, 473, 473, -165, -24, 256, 89,
- 343, 256, -165, -165, 116, 67, -165, -165, 117, 343,
- 473, -3, -7, -165, 118, -165, 100, 473, -165, 119,
- -165, 124, -165, -165, 124, -165, 372, -165, 256, -165,
- -165, 256, -165, 256, 124, 124, -165, 372, 314, -165,
- 103, 110, 256, 130, 136, -165, 138, 122, -165, -165,
- -165, -165, 141, 126, 139, 140, -5, -165, 314, -165,
- 285, 127, -165, -165, -165, 256, -165, -165, -165, -165,
- -165
+ 189, -41, -172, -172, 359, -172, -30, 532, -172, -172,
+ 28, 150, -172, 43, 47, 52, 359, 11, 49, 359,
+ 359, 359, 359, 6, -172, 9, -172, -172, -172, 15,
+ 16, 388, 513, -172, -172, -172, -172, -172, 36, 359,
+ -172, 513, 359, 359, 359, -172, 32, -172, 86, -172,
+ 89, -172, 74, -172, 19, 25, -172, -172, -172, -172,
+ 403, 92, -172, -20, 359, -9, 575, 575, 575, 470,
+ -172, -172, 243, 388, 359, 388, 69, 494, 359, 359,
+ 359, 359, 359, 359, 359, 359, 359, 359, 359, 359,
+ 359, 359, 359, 403, 513, -2, 5, 41, 95, -172,
+ -172, 96, -172, 97, 98, 79, -172, -172, 100, -172,
+ 359, 359, 427, 359, 359, -172, -172, 57, 513, 58,
+ 446, 61, 359, 513, 513, 513, 513, 513, 513, 513,
+ 513, 556, 556, 575, 575, 513, 513, 513, -172, 359,
+ -172, -172, -172, -172, -172, 109, -172, 513, 513, 359,
+ 359, 513, 513, -172, -1, -172, -172, 330, 513, 513,
+ -172, -38, 513, 513, 272, 93, 359, 272, -172, -172,
+ 111, 64, -172, -172, 108, 359, 513, -3, -5, -172,
+ 119, -172, 101, 513, -172, 114, -172, 115, -172, -172,
+ 115, -172, 388, -172, 272, -172, -172, 272, -172, 272,
+ 115, 115, -172, 388, 330, -172, 94, 102, 272, 121,
+ 123, -172, 126, 110, -172, -172, -172, -172, 127, 113,
+ 125, 128, -7, -172, 330, -172, 301, 120, -172, -172,
+ -172, 272, -172, -172, -172, -172, -172
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -165, -165, -20, 93, 2, -146, 0, -165, -165, -165,
- -4, -140, -28, -66, -165, -165, -165, -164, -6, -55,
- -133, 7, 4, -165, -165, -165, 114, -165, -165, -165,
- -165, -165, 26
+ -172, -172, -21, 77, 8, -153, 0, -172, -172, -172,
+ -23, -170, -44, -70, -172, -172, -172, -171, -6, -40,
+ -143, 3, 26, -172, -172, -172, 103, -172, -172, -172,
+ -172, -172, 30
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -57
+#define YYTABLE_NINF -59
static const yytype_int16 yytable[] =
{
- 27, 44, 25, 71, 33, 69, 115, 162, 117, -10,
- 182, 41, -48, -48, 159, 179, 109, 197, 111, 161,
- 37, 63, 42, 60, 101, 64, 65, 66, 67, 68,
- 197, 102, 110, 183, 112, 70, 160, 180, 76, 136,
- 103, 164, 188, 137, 199, 191, 92, 193, 45, 93,
- 93, 93, 208, 57, -48, 199, 58, 202, 50, 138,
- 52, 61, 62, 137, 70, 59, 104, 98, -10, 95,
- 96, 27, 226, 25, 72, 33, 43, 73, 99, 76,
- 116, 118, 97, 225, 121, 122, 123, 124, 125, 126,
- 127, 128, 129, 130, 131, 132, 133, 134, 135, 152,
- 143, 100, 108, 168, 119, 137, 171, 172, 139, 103,
- 140, 141, 142, 153, 144, 178, 145, 146, 147, 148,
- 201, 149, 190, 151, 156, 70, 169, 154, 173, 200,
- 187, 207, 174, 47, 189, 176, 203, 165, 204, 206,
- 48, 182, 192, 209, 155, 49, 211, 212, 213, 50,
- 51, 52, 53, 217, 214, 219, 215, 54, 216, 221,
- 222, 228, 223, 224, 114, 181, 205, 170, 184, 105,
- 229, 0, 230, -6, 1, 0, 177, 198, 0, 0,
+ 27, 44, 72, 117, 168, 119, 70, 41, 25, -10,
+ -50, -50, 188, 167, 165, 185, 203, 110, 37, 60,
+ 205, 71, 66, 67, 68, 69, 33, 170, 113, 203,
+ 42, 205, 102, 111, 77, 189, 166, 186, 194, 103,
+ 45, 197, 93, 199, 114, 94, 94, 94, 104, 61,
+ 62, 214, -50, 208, 50, 57, 52, 63, 64, 138,
+ 58, 65, 105, 139, 59, 71, 140, 112, -10, 74,
+ 139, 232, 27, 96, 97, 73, 77, 118, 120, 231,
+ 25, 123, 124, 125, 126, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, 43, 98, 33, 99,
+ 156, 145, 100, 101, 109, 121, 139, 141, 104, 142,
+ 143, 144, 146, 147, 148, 157, 151, 152, 153, 155,
+ 71, 160, 207, 179, 174, 158, 182, 177, 178, 180,
+ 175, 193, 188, 213, 215, 195, 184, 198, 217, 219,
+ 171, 220, 159, 196, 221, 227, 222, 228, 229, 116,
+ 206, 230, 162, 163, 234, 190, 211, 209, 106, 210,
+ 212, 0, 0, 47, 0, 0, 0, 0, 218, 176,
+ 48, 187, 0, 0, 223, 49, 225, 0, 183, 50,
+ 51, 52, 53, 204, 0, 0, 0, 54, 0, -6,
+ 1, 235, 0, 236, 0, 77, 2, 3, 4, 5,
+ 6, 7, 8, 0, 0, 0, 77, 0, 9, 224,
+ 10, 11, 12, 0, 0, 13, 14, 15, 0, 0,
+ 0, 0, 16, 17, 18, 0, 233, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 19, 0,
+ 0, 0, 0, 20, 21, 0, 0, 0, -6, 22,
2, 3, 4, 5, 6, 7, 8, 0, 0, 0,
- 0, 0, 9, 76, 10, 11, 12, 0, 0, 13,
- 14, 15, 0, 218, 76, 0, 16, 17, 18, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 227, 0, 19, 0, 0, 0, 0, 20, 21, 0,
- 0, 0, -6, 22, 2, 3, 4, 5, 6, 7,
- 8, 0, 0, 0, 0, 0, 9, 0, 10, 11,
- 12, 0, 0, 13, 14, 15, 0, 0, 0, 0,
- 16, 17, 18, 2, 3, 4, 5, 6, 38, 8,
- 0, 0, 0, 0, 0, 9, 19, 10, 11, 12,
- 0, 20, 21, 14, 15, 0, 0, 22, 0, 16,
- 17, 18, 2, 3, 4, 5, 6, 38, 8, 0,
- 0, 0, 0, 0, 9, 19, 10, 11, 12, 0,
- 20, 21, 14, 15, 0, 70, 22, 0, 16, 17,
- 18, 2, 3, 4, 5, 6, 38, 8, 0, 0,
- 0, 0, 0, 9, 19, 10, 11, 0, 0, 20,
- 21, 14, 15, 0, 0, 22, 0, 16, 0, 18,
- 2, 3, 4, 5, 6, 38, 8, 0, 0, 0,
- 0, 0, 0, 19, 0, 0, 0, 0, 20, 21,
- 0, 0, 0, 0, 22, 0, 39, 0, 18, 2,
+ 0, 0, 9, 0, 10, 11, 12, 0, 0, 13,
+ 14, 15, 0, 0, 0, 0, 16, 17, 18, 2,
3, 4, 5, 6, 38, 8, 0, 0, 0, 0,
- 0, 0, 19, 0, 0, 0, 0, 20, 21, 0,
- 0, 0, 0, 22, 0, 39, 0, 18, 0, 0,
- 0, 107, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 19, 0, 0, 0, 0, 20, 21, 77, 78,
- 0, 0, 74, 79, 80, 81, 0, 82, 83, 84,
- 0, 85, 86, 87, 88, 0, 0, 77, 78, 89,
- 90, 91, 79, 80, 81, 0, 82, 83, 84, 120,
- 85, 86, 87, 88, 0, 0, 0, 113, 89, 90,
- 91, 77, 78, 0, 0, 0, 79, 80, 81, 0,
- 82, 83, 84, 0, 85, 86, 87, 88, 0, 0,
- 0, 113, 89, 90, 91, 77, 78, 0, 0, 0,
- 79, 80, 81, 0, 82, 83, 84, 120, 85, 86,
- 87, 88, 0, 0, 77, 78, 89, 90, 91, 79,
- 80, 81, 0, 82, 83, 84, 0, 85, 86, 87,
- 88, 0, 0, -56, -56, 89, 90, 91, -56, -56,
- -56, 0, -56, -56, -56, 0, 0, 0, -56, -56,
- 0, 0, 43, 0, -56, -56, -56, 77, 78, 0,
- 0, 0, 79, 80, 81, 0, 82, 83, 84, 0,
- 0, 0, 87, 88, 0, 0, 77, 78, 89, 90,
- 91, 79, 80, 81, 0, 82, 83, 84, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 89, 90, 91
+ 0, 9, 19, 10, 11, 12, 0, 20, 21, 14,
+ 15, 0, 0, 22, 0, 16, 17, 18, 2, 3,
+ 4, 5, 6, 38, 8, 0, 0, 0, 0, 0,
+ 9, 19, 10, 11, 12, 0, 20, 21, 14, 15,
+ 0, 71, 22, 0, 16, 17, 18, 2, 3, 4,
+ 5, 6, 38, 8, 0, 0, 0, 0, 0, 9,
+ 19, 10, 11, 0, 0, 20, 21, 14, 15, 0,
+ 0, 22, 0, 16, 0, 18, 2, 3, 4, 5,
+ 6, 38, 8, 0, 0, 0, 0, 0, 0, 19,
+ 0, 0, 0, 0, 20, 21, 0, 0, 0, 0,
+ 22, 0, 39, 0, 18, 2, 3, 4, 5, 6,
+ 38, 8, 0, 0, 0, 0, 0, 0, 19, 0,
+ 0, 0, 0, 20, 21, 0, 0, 0, 0, 22,
+ 0, 39, 0, 18, 0, 0, 0, 108, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 19, 0, 0,
+ 0, 0, 20, 21, 78, 79, 0, 0, 75, 80,
+ 81, 82, 0, 83, 84, 85, 0, 86, 87, 88,
+ 89, 0, 0, 0, 149, 90, 91, 92, 78, 79,
+ 0, 0, 0, 80, 81, 82, 0, 83, 84, 85,
+ 150, 86, 87, 88, 89, 0, 0, 78, 79, 90,
+ 91, 92, 80, 81, 82, 0, 83, 84, 85, 122,
+ 86, 87, 88, 89, 0, 0, 0, 115, 90, 91,
+ 92, 78, 79, 0, 0, 0, 80, 81, 82, 0,
+ 83, 84, 85, 0, 86, 87, 88, 89, 0, 0,
+ 0, 115, 90, 91, 92, 78, 79, 0, 0, 0,
+ 80, 81, 82, 0, 83, 84, 85, 122, 86, 87,
+ 88, 89, 0, 0, 78, 79, 90, 91, 92, 80,
+ 81, 82, 0, 83, 84, 85, 0, 86, 87, 88,
+ 89, 0, 0, -58, -58, 90, 91, 92, -58, -58,
+ -58, 0, -58, -58, -58, 0, 0, 0, -58, -58,
+ 0, 0, 43, 0, -58, -58, -58, 78, 79, 0,
+ 0, 0, 80, 81, 82, 0, 83, 84, 85, 0,
+ 0, 0, 88, 89, 0, 0, 78, 79, 90, 91,
+ 92, 80, 81, 82, 0, 83, 84, 85, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 90, 91, 92
};
static const yytype_int16 yycheck[] =
{
- 0, 7, 0, 23, 0, 0, 72, 153, 74, 0,
- 17, 4, 17, 18, 15, 18, 37, 181, 37, 152,
- 59, 8, 60, 16, 13, 12, 19, 20, 21, 22,
- 194, 20, 53, 40, 53, 59, 37, 40, 31, 61,
- 29, 65, 175, 65, 184, 178, 39, 180, 12, 42,
- 43, 44, 198, 12, 59, 195, 13, 190, 29, 61,
- 31, 38, 39, 65, 59, 12, 37, 13, 59, 43,
- 44, 71, 218, 71, 60, 71, 60, 53, 13, 72,
- 73, 74, 65, 216, 77, 78, 79, 80, 81, 82,
- 83, 84, 85, 86, 87, 88, 89, 90, 91, 119,
- 106, 29, 12, 158, 36, 65, 161, 162, 12, 29,
- 13, 13, 13, 119, 12, 170, 109, 110, 111, 112,
- 186, 61, 177, 61, 12, 59, 37, 120, 12, 184,
- 12, 197, 65, 13, 34, 18, 191, 157, 193, 194,
- 20, 17, 23, 40, 137, 25, 36, 202, 18, 29,
- 30, 31, 32, 208, 18, 210, 18, 37, 36, 18,
- 34, 34, 23, 23, 71, 171, 194, 160, 172, 55,
- 225, -1, 227, 0, 1, -1, 169, 183, -1, -1,
+ 0, 7, 23, 73, 157, 75, 0, 4, 0, 0,
+ 17, 18, 17, 156, 15, 18, 187, 37, 59, 16,
+ 190, 59, 19, 20, 21, 22, 0, 65, 37, 200,
+ 60, 201, 13, 53, 31, 40, 37, 40, 181, 20,
+ 12, 184, 39, 186, 53, 42, 43, 44, 29, 38,
+ 39, 204, 59, 196, 29, 12, 31, 8, 9, 61,
+ 13, 12, 37, 65, 12, 59, 61, 64, 59, 53,
+ 65, 224, 72, 43, 44, 60, 73, 74, 75, 222,
+ 72, 78, 79, 80, 81, 82, 83, 84, 85, 86,
+ 87, 88, 89, 90, 91, 92, 60, 65, 72, 13,
+ 121, 107, 13, 29, 12, 36, 65, 12, 29, 13,
+ 13, 13, 12, 110, 111, 121, 113, 114, 61, 61,
+ 59, 12, 192, 12, 164, 122, 18, 167, 168, 65,
+ 37, 12, 17, 203, 40, 34, 176, 23, 36, 18,
+ 161, 18, 139, 183, 18, 18, 36, 34, 23, 72,
+ 190, 23, 149, 150, 34, 178, 200, 197, 55, 199,
+ 200, -1, -1, 13, -1, -1, -1, -1, 208, 166,
+ 20, 177, -1, -1, 214, 25, 216, -1, 175, 29,
+ 30, 31, 32, 189, -1, -1, -1, 37, -1, 0,
+ 1, 231, -1, 233, -1, 192, 7, 8, 9, 10,
+ 11, 12, 13, -1, -1, -1, 203, -1, 19, 215,
+ 21, 22, 23, -1, -1, 26, 27, 28, -1, -1,
+ -1, -1, 33, 34, 35, -1, 226, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 49, -1,
+ -1, -1, -1, 54, 55, -1, -1, -1, 59, 60,
7, 8, 9, 10, 11, 12, 13, -1, -1, -1,
- -1, -1, 19, 186, 21, 22, 23, -1, -1, 26,
- 27, 28, -1, 209, 197, -1, 33, 34, 35, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 220, -1, 49, -1, -1, -1, -1, 54, 55, -1,
- -1, -1, 59, 60, 7, 8, 9, 10, 11, 12,
- 13, -1, -1, -1, -1, -1, 19, -1, 21, 22,
- 23, -1, -1, 26, 27, 28, -1, -1, -1, -1,
- 33, 34, 35, 7, 8, 9, 10, 11, 12, 13,
- -1, -1, -1, -1, -1, 19, 49, 21, 22, 23,
- -1, 54, 55, 27, 28, -1, -1, 60, -1, 33,
- 34, 35, 7, 8, 9, 10, 11, 12, 13, -1,
- -1, -1, -1, -1, 19, 49, 21, 22, 23, -1,
- 54, 55, 27, 28, -1, 59, 60, -1, 33, 34,
- 35, 7, 8, 9, 10, 11, 12, 13, -1, -1,
- -1, -1, -1, 19, 49, 21, 22, -1, -1, 54,
- 55, 27, 28, -1, -1, 60, -1, 33, -1, 35,
- 7, 8, 9, 10, 11, 12, 13, -1, -1, -1,
- -1, -1, -1, 49, -1, -1, -1, -1, 54, 55,
- -1, -1, -1, -1, 60, -1, 33, -1, 35, 7,
+ -1, -1, 19, -1, 21, 22, 23, -1, -1, 26,
+ 27, 28, -1, -1, -1, -1, 33, 34, 35, 7,
8, 9, 10, 11, 12, 13, -1, -1, -1, -1,
- -1, -1, 49, -1, -1, -1, -1, 54, 55, -1,
- -1, -1, -1, 60, -1, 33, -1, 35, -1, -1,
- -1, 24, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 49, -1, -1, -1, -1, 54, 55, 41, 42,
- -1, -1, 60, 46, 47, 48, -1, 50, 51, 52,
- -1, 54, 55, 56, 57, -1, -1, 41, 42, 62,
+ -1, 19, 49, 21, 22, 23, -1, 54, 55, 27,
+ 28, -1, -1, 60, -1, 33, 34, 35, 7, 8,
+ 9, 10, 11, 12, 13, -1, -1, -1, -1, -1,
+ 19, 49, 21, 22, 23, -1, 54, 55, 27, 28,
+ -1, 59, 60, -1, 33, 34, 35, 7, 8, 9,
+ 10, 11, 12, 13, -1, -1, -1, -1, -1, 19,
+ 49, 21, 22, -1, -1, 54, 55, 27, 28, -1,
+ -1, 60, -1, 33, -1, 35, 7, 8, 9, 10,
+ 11, 12, 13, -1, -1, -1, -1, -1, -1, 49,
+ -1, -1, -1, -1, 54, 55, -1, -1, -1, -1,
+ 60, -1, 33, -1, 35, 7, 8, 9, 10, 11,
+ 12, 13, -1, -1, -1, -1, -1, -1, 49, -1,
+ -1, -1, -1, 54, 55, -1, -1, -1, -1, 60,
+ -1, 33, -1, 35, -1, -1, -1, 24, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 49, -1, -1,
+ -1, -1, 54, 55, 41, 42, -1, -1, 60, 46,
+ 47, 48, -1, 50, 51, 52, -1, 54, 55, 56,
+ 57, -1, -1, -1, 37, 62, 63, 64, 41, 42,
+ -1, -1, -1, 46, 47, 48, -1, 50, 51, 52,
+ 53, 54, 55, 56, 57, -1, -1, 41, 42, 62,
63, 64, 46, 47, 48, -1, 50, 51, 52, 53,
54, 55, 56, 57, -1, -1, -1, 61, 62, 63,
64, 41, 42, -1, -1, -1, 46, 47, 48, -1,
@@ -884,24 +894,24 @@ static const yytype_uint8 yystos[] =
81, 82, 87, 88, 90, 93, 97, 59, 12, 33,
70, 87, 60, 60, 84, 12, 89, 13, 20, 25,
29, 30, 31, 32, 37, 91, 92, 12, 13, 12,
- 87, 38, 39, 8, 12, 87, 87, 87, 87, 0,
- 59, 68, 60, 53, 60, 79, 87, 41, 42, 46,
- 47, 48, 50, 51, 52, 54, 55, 56, 57, 62,
- 63, 64, 87, 87, 98, 98, 98, 65, 13, 13,
- 29, 13, 20, 29, 37, 92, 94, 24, 12, 37,
- 53, 37, 53, 61, 69, 79, 87, 79, 87, 36,
- 53, 87, 87, 87, 87, 87, 87, 87, 87, 87,
- 87, 87, 87, 87, 87, 87, 61, 65, 61, 12,
- 13, 13, 13, 84, 12, 87, 87, 87, 87, 61,
- 85, 61, 68, 84, 87, 87, 12, 95, 86, 15,
- 37, 86, 71, 88, 65, 68, 68, 72, 85, 37,
- 87, 85, 85, 12, 65, 96, 18, 87, 85, 18,
- 40, 84, 17, 40, 76, 77, 83, 12, 86, 34,
- 85, 86, 23, 86, 75, 76, 78, 83, 84, 77,
- 85, 79, 86, 85, 85, 78, 85, 79, 71, 40,
- 74, 36, 85, 18, 18, 18, 36, 85, 84, 85,
- 84, 18, 34, 23, 23, 86, 71, 72, 34, 85,
- 85
+ 87, 38, 39, 8, 9, 12, 87, 87, 87, 87,
+ 0, 59, 68, 60, 53, 60, 79, 87, 41, 42,
+ 46, 47, 48, 50, 51, 52, 54, 55, 56, 57,
+ 62, 63, 64, 87, 87, 98, 98, 98, 65, 13,
+ 13, 29, 13, 20, 29, 37, 92, 94, 24, 12,
+ 37, 53, 87, 37, 53, 61, 69, 79, 87, 79,
+ 87, 36, 53, 87, 87, 87, 87, 87, 87, 87,
+ 87, 87, 87, 87, 87, 87, 87, 87, 61, 65,
+ 61, 12, 13, 13, 13, 84, 12, 87, 87, 37,
+ 53, 87, 87, 61, 85, 61, 68, 84, 87, 87,
+ 12, 95, 87, 87, 86, 15, 37, 86, 71, 88,
+ 65, 68, 68, 72, 85, 37, 87, 85, 85, 12,
+ 65, 96, 18, 87, 85, 18, 40, 84, 17, 40,
+ 76, 77, 83, 12, 86, 34, 85, 86, 23, 86,
+ 75, 76, 78, 83, 84, 77, 85, 79, 86, 85,
+ 85, 78, 85, 79, 71, 40, 74, 36, 85, 18,
+ 18, 18, 36, 85, 84, 85, 84, 18, 34, 23,
+ 23, 86, 71, 72, 34, 85, 85
};
#define yyerrok (yyerrstatus = 0)
@@ -1768,6 +1778,18 @@ yyreduce:
case 15:
#line 138 "engines/director/lingo/lingo-gr.y"
{
+ g_lingo->code1(g_lingo->c_swap);
+ g_lingo->code1(g_lingo->c_theentityassign);
+ inst e = 0, f = 0;
+ WRITE_UINT32(&e, (yyvsp[(2) - (5)].e)[0]);
+ WRITE_UINT32(&f, (yyvsp[(2) - (5)].e)[1]);
+ g_lingo->code2(e, f);
+ (yyval.code) = (yyvsp[(5) - (5)].code); ;}
+ break;
+
+ case 16:
+#line 146 "engines/director/lingo/lingo-gr.y"
+ {
g_lingo->code1(g_lingo->c_varpush);
g_lingo->codeString((yyvsp[(2) - (4)].s)->c_str());
g_lingo->code1(g_lingo->c_assign);
@@ -1775,8 +1797,8 @@ yyreduce:
delete (yyvsp[(2) - (4)].s); ;}
break;
- case 16:
-#line 144 "engines/director/lingo/lingo-gr.y"
+ case 17:
+#line 152 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code2(g_lingo->c_constpush, 0); // Put dummy id
g_lingo->code1(g_lingo->c_theentityassign);
@@ -1787,13 +1809,25 @@ yyreduce:
(yyval.code) = (yyvsp[(4) - (4)].code); ;}
break;
- case 17:
-#line 153 "engines/director/lingo/lingo-gr.y"
+ case 18:
+#line 160 "engines/director/lingo/lingo-gr.y"
+ {
+ g_lingo->code1(g_lingo->c_swap);
+ g_lingo->code1(g_lingo->c_theentityassign);
+ inst e = 0, f = 0;
+ WRITE_UINT32(&e, (yyvsp[(2) - (5)].e)[0]);
+ WRITE_UINT32(&f, (yyvsp[(2) - (5)].e)[1]);
+ g_lingo->code2(e, f);
+ (yyval.code) = (yyvsp[(5) - (5)].code); ;}
+ break;
+
+ case 19:
+#line 169 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_xpop); ;}
break;
- case 21:
-#line 162 "engines/director/lingo/lingo-gr.y"
+ case 23:
+#line 178 "engines/director/lingo/lingo-gr.y"
{
inst body = 0, end = 0;
WRITE_UINT32(&body, (yyvsp[(5) - (8)].code));
@@ -1802,8 +1836,8 @@ yyreduce:
(*g_lingo->_currentScript)[(yyvsp[(1) - (8)].code) + 2] = end; ;}
break;
- case 22:
-#line 173 "engines/director/lingo/lingo-gr.y"
+ case 24:
+#line 189 "engines/director/lingo/lingo-gr.y"
{
inst init = 0, finish = 0, body = 0, end = 0, inc = 0;
WRITE_UINT32(&init, (yyvsp[(3) - (11)].code));
@@ -1818,8 +1852,8 @@ yyreduce:
(*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 5] = end; ;}
break;
- case 23:
-#line 189 "engines/director/lingo/lingo-gr.y"
+ case 25:
+#line 205 "engines/director/lingo/lingo-gr.y"
{
inst init = 0, finish = 0, body = 0, end = 0, inc = 0;
WRITE_UINT32(&init, (yyvsp[(3) - (12)].code));
@@ -1834,8 +1868,8 @@ yyreduce:
(*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 5] = end; ;}
break;
- case 24:
-#line 203 "engines/director/lingo/lingo-gr.y"
+ case 26:
+#line 219 "engines/director/lingo/lingo-gr.y"
{
inst then = 0, end = 0;
WRITE_UINT32(&then, (yyvsp[(5) - (8)].code));
@@ -1845,8 +1879,8 @@ yyreduce:
g_lingo->processIf(0, 0); ;}
break;
- case 25:
-#line 210 "engines/director/lingo/lingo-gr.y"
+ case 27:
+#line 226 "engines/director/lingo/lingo-gr.y"
{
inst then = 0, else1 = 0, end = 0;
WRITE_UINT32(&then, (yyvsp[(5) - (11)].code));
@@ -1858,8 +1892,8 @@ yyreduce:
g_lingo->processIf(0, 0); ;}
break;
- case 26:
-#line 219 "engines/director/lingo/lingo-gr.y"
+ case 28:
+#line 235 "engines/director/lingo/lingo-gr.y"
{
inst then = 0, else1 = 0, end = 0;
WRITE_UINT32(&then, (yyvsp[(5) - (11)].code));
@@ -1871,8 +1905,8 @@ yyreduce:
g_lingo->processIf(0, (yyvsp[(9) - (11)].code)); ;}
break;
- case 27:
-#line 228 "engines/director/lingo/lingo-gr.y"
+ case 29:
+#line 244 "engines/director/lingo/lingo-gr.y"
{
inst then = 0, else1 = 0, end = 0;
WRITE_UINT32(&then, (yyvsp[(4) - (6)].code));
@@ -1885,8 +1919,8 @@ yyreduce:
g_lingo->processIf(0, 0); ;}
break;
- case 28:
-#line 238 "engines/director/lingo/lingo-gr.y"
+ case 30:
+#line 254 "engines/director/lingo/lingo-gr.y"
{
inst then = 0, else1 = 0, end = 0;
WRITE_UINT32(&then, (yyvsp[(4) - (10)].code));
@@ -1899,8 +1933,8 @@ yyreduce:
g_lingo->processIf(0, 0); ;}
break;
- case 29:
-#line 248 "engines/director/lingo/lingo-gr.y"
+ case 31:
+#line 264 "engines/director/lingo/lingo-gr.y"
{
inst then = 0, else1 = 0, end = 0;
WRITE_UINT32(&then, (yyvsp[(4) - (10)].code));
@@ -1913,18 +1947,18 @@ yyreduce:
g_lingo->processIf(0, (yyvsp[(10) - (10)].code)); ;}
break;
- case 30:
-#line 259 "engines/director/lingo/lingo-gr.y"
+ case 32:
+#line 275 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = 0; ;}
break;
- case 31:
-#line 260 "engines/director/lingo/lingo-gr.y"
+ case 33:
+#line 276 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = (yyvsp[(2) - (3)].code); ;}
break;
- case 36:
-#line 271 "engines/director/lingo/lingo-gr.y"
+ case 38:
+#line 287 "engines/director/lingo/lingo-gr.y"
{
inst then = 0;
WRITE_UINT32(&then, (yyvsp[(4) - (6)].code));
@@ -1933,8 +1967,8 @@ yyreduce:
g_lingo->codeLabel((yyvsp[(1) - (6)].code)); ;}
break;
- case 38:
-#line 280 "engines/director/lingo/lingo-gr.y"
+ case 40:
+#line 296 "engines/director/lingo/lingo-gr.y"
{
inst then = 0;
WRITE_UINT32(&then, (yyvsp[(4) - (5)].code));
@@ -1943,23 +1977,23 @@ yyreduce:
g_lingo->codeLabel((yyvsp[(1) - (5)].code)); ;}
break;
- case 39:
-#line 288 "engines/director/lingo/lingo-gr.y"
+ case 41:
+#line 304 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(STOP); ;}
break;
- case 40:
-#line 289 "engines/director/lingo/lingo-gr.y"
+ case 42:
+#line 305 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code2(g_lingo->c_eq, STOP); ;}
break;
- case 42:
-#line 292 "engines/director/lingo/lingo-gr.y"
+ case 44:
+#line 308 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = g_lingo->code3(g_lingo->c_repeatwhilecode, STOP, STOP); ;}
break;
- case 43:
-#line 294 "engines/director/lingo/lingo-gr.y"
+ case 45:
+#line 310 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code3(g_lingo->c_repeatwithcode, STOP, STOP);
g_lingo->code3(STOP, STOP, STOP);
@@ -1967,8 +2001,8 @@ yyreduce:
delete (yyvsp[(3) - (3)].s); ;}
break;
- case 44:
-#line 300 "engines/director/lingo/lingo-gr.y"
+ case 46:
+#line 316 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code1(g_lingo->c_ifcode);
g_lingo->code3(STOP, STOP, STOP);
@@ -1976,8 +2010,8 @@ yyreduce:
g_lingo->codeLabel(0); ;}
break;
- case 45:
-#line 306 "engines/director/lingo/lingo-gr.y"
+ case 47:
+#line 322 "engines/director/lingo/lingo-gr.y"
{
inst skipEnd;
WRITE_UINT32(&skipEnd, 1); // We have to skip end to avoid multiple executions
@@ -1986,23 +2020,23 @@ yyreduce:
g_lingo->code1(skipEnd); ;}
break;
- case 46:
-#line 313 "engines/director/lingo/lingo-gr.y"
+ case 48:
+#line 329 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = g_lingo->_currentScript->size(); ;}
break;
- case 47:
-#line 315 "engines/director/lingo/lingo-gr.y"
+ case 49:
+#line 331 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(STOP); (yyval.code) = g_lingo->_currentScript->size(); ;}
break;
- case 48:
-#line 317 "engines/director/lingo/lingo-gr.y"
+ case 50:
+#line 333 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = g_lingo->_currentScript->size(); ;}
break;
- case 51:
-#line 322 "engines/director/lingo/lingo-gr.y"
+ case 53:
+#line 338 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code1(g_lingo->c_constpush);
inst i = 0;
@@ -2010,22 +2044,22 @@ yyreduce:
g_lingo->code1(i); ;}
break;
- case 52:
-#line 327 "engines/director/lingo/lingo-gr.y"
+ case 54:
+#line 343 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code1(g_lingo->c_fconstpush);
g_lingo->codeFloat((yyvsp[(1) - (1)].f)); ;}
break;
- case 53:
-#line 330 "engines/director/lingo/lingo-gr.y"
+ case 55:
+#line 346 "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 54:
-#line 333 "engines/director/lingo/lingo-gr.y"
+ case 56:
+#line 349 "engines/director/lingo/lingo-gr.y"
{
if ((yyvsp[(3) - (4)].narg) != g_lingo->_builtins[*(yyvsp[(1) - (4)].s)]->nargs)
error("Built-in function %s expects %d arguments but got %d", (yyvsp[(1) - (4)].s)->c_str(), g_lingo->_builtins[*(yyvsp[(1) - (4)].s)]->nargs, (yyvsp[(3) - (4)].narg));
@@ -2034,8 +2068,8 @@ yyreduce:
delete (yyvsp[(1) - (4)].s); ;}
break;
- case 55:
-#line 339 "engines/director/lingo/lingo-gr.y"
+ case 57:
+#line 355 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code1(g_lingo->c_call);
g_lingo->codeString((yyvsp[(1) - (4)].s)->c_str());
@@ -2046,15 +2080,15 @@ yyreduce:
delete (yyvsp[(1) - (4)].s); ;}
break;
- case 56:
-#line 347 "engines/director/lingo/lingo-gr.y"
+ case 58:
+#line 363 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->codeId(*(yyvsp[(1) - (1)].s));
delete (yyvsp[(1) - (1)].s); ;}
break;
- case 57:
-#line 350 "engines/director/lingo/lingo-gr.y"
+ case 59:
+#line 366 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code2(g_lingo->c_constpush, 0); // Put dummy id
g_lingo->code1(g_lingo->c_theentitypush);
@@ -2064,8 +2098,8 @@ yyreduce:
g_lingo->code2(e, f); ;}
break;
- case 58:
-#line 357 "engines/director/lingo/lingo-gr.y"
+ case 60:
+#line 373 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code1(g_lingo->c_theentitypush);
inst e = 0, f = 0;
@@ -2074,149 +2108,149 @@ yyreduce:
g_lingo->code2(e, f); ;}
break;
- case 60:
-#line 364 "engines/director/lingo/lingo-gr.y"
+ case 62:
+#line 380 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_add); ;}
break;
- case 61:
-#line 365 "engines/director/lingo/lingo-gr.y"
+ case 63:
+#line 381 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_sub); ;}
break;
- case 62:
-#line 366 "engines/director/lingo/lingo-gr.y"
+ case 64:
+#line 382 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_mul); ;}
break;
- case 63:
-#line 367 "engines/director/lingo/lingo-gr.y"
+ case 65:
+#line 383 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_div); ;}
break;
- case 64:
-#line 368 "engines/director/lingo/lingo-gr.y"
+ case 66:
+#line 384 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_gt); ;}
break;
- case 65:
-#line 369 "engines/director/lingo/lingo-gr.y"
+ case 67:
+#line 385 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_lt); ;}
break;
- case 66:
-#line 370 "engines/director/lingo/lingo-gr.y"
+ case 68:
+#line 386 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_neq); ;}
break;
- case 67:
-#line 371 "engines/director/lingo/lingo-gr.y"
+ case 69:
+#line 387 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_ge); ;}
break;
- case 68:
-#line 372 "engines/director/lingo/lingo-gr.y"
+ case 70:
+#line 388 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_le); ;}
break;
- case 69:
-#line 373 "engines/director/lingo/lingo-gr.y"
+ case 71:
+#line 389 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_and); ;}
break;
- case 70:
-#line 374 "engines/director/lingo/lingo-gr.y"
+ case 72:
+#line 390 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_or); ;}
break;
- case 71:
-#line 375 "engines/director/lingo/lingo-gr.y"
+ case 73:
+#line 391 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_not); ;}
break;
- case 72:
-#line 376 "engines/director/lingo/lingo-gr.y"
+ case 74:
+#line 392 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_ampersand); ;}
break;
- case 73:
-#line 377 "engines/director/lingo/lingo-gr.y"
+ case 75:
+#line 393 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_concat); ;}
break;
- case 74:
-#line 378 "engines/director/lingo/lingo-gr.y"
+ case 76:
+#line 394 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_contains); ;}
break;
- case 75:
-#line 379 "engines/director/lingo/lingo-gr.y"
+ case 77:
+#line 395 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_starts); ;}
break;
- case 76:
-#line 380 "engines/director/lingo/lingo-gr.y"
+ case 78:
+#line 396 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = (yyvsp[(2) - (2)].code); ;}
break;
- case 77:
-#line 381 "engines/director/lingo/lingo-gr.y"
+ case 79:
+#line 397 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = (yyvsp[(2) - (2)].code); g_lingo->code1(g_lingo->c_negate); ;}
break;
- case 78:
-#line 382 "engines/director/lingo/lingo-gr.y"
+ case 80:
+#line 398 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = (yyvsp[(2) - (3)].code); ;}
break;
- case 79:
-#line 385 "engines/director/lingo/lingo-gr.y"
+ case 81:
+#line 401 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_mci); g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str()); delete (yyvsp[(2) - (2)].s); ;}
break;
- case 80:
-#line 386 "engines/director/lingo/lingo-gr.y"
+ case 82:
+#line 402 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_mciwait); g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str()); delete (yyvsp[(2) - (2)].s); ;}
break;
- case 81:
-#line 387 "engines/director/lingo/lingo-gr.y"
+ case 83:
+#line 403 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_printtop); ;}
break;
- case 83:
-#line 389 "engines/director/lingo/lingo-gr.y"
+ case 85:
+#line 405 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code2(g_lingo->c_constpush, (inst)0); // Push fake value on stack
g_lingo->code1(g_lingo->c_procret); ;}
break;
- case 85:
-#line 394 "engines/director/lingo/lingo-gr.y"
+ case 87:
+#line 410 "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 86:
-#line 395 "engines/director/lingo/lingo-gr.y"
+ case 88:
+#line 411 "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 87:
-#line 406 "engines/director/lingo/lingo-gr.y"
+ case 89:
+#line 422 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_gotoloop); ;}
break;
- case 88:
-#line 407 "engines/director/lingo/lingo-gr.y"
+ case 90:
+#line 423 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_gotonext); ;}
break;
- case 89:
-#line 408 "engines/director/lingo/lingo-gr.y"
+ case 91:
+#line 424 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_gotoprevious); ;}
break;
- case 90:
-#line 409 "engines/director/lingo/lingo-gr.y"
+ case 92:
+#line 425 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_goto);
g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str());
@@ -2224,8 +2258,8 @@ yyreduce:
delete (yyvsp[(2) - (2)].s); ;}
break;
- case 91:
-#line 414 "engines/director/lingo/lingo-gr.y"
+ case 93:
+#line 430 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_goto);
g_lingo->codeString((yyvsp[(2) - (3)].s)->c_str());
@@ -2234,8 +2268,8 @@ yyreduce:
delete (yyvsp[(3) - (3)].s); ;}
break;
- case 92:
-#line 420 "engines/director/lingo/lingo-gr.y"
+ case 94:
+#line 436 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_goto);
g_lingo->codeString("");
@@ -2243,48 +2277,48 @@ yyreduce:
delete (yyvsp[(2) - (2)].s); ;}
break;
- case 93:
-#line 427 "engines/director/lingo/lingo-gr.y"
+ case 95:
+#line 443 "engines/director/lingo/lingo-gr.y"
{ (yyval.s) = (yyvsp[(3) - (3)].s); ;}
break;
- case 94:
-#line 428 "engines/director/lingo/lingo-gr.y"
+ case 96:
+#line 444 "engines/director/lingo/lingo-gr.y"
{ (yyval.s) = (yyvsp[(2) - (2)].s); ;}
break;
- case 95:
-#line 429 "engines/director/lingo/lingo-gr.y"
+ case 97:
+#line 445 "engines/director/lingo/lingo-gr.y"
{ (yyval.s) = (yyvsp[(2) - (2)].s); ;}
break;
- case 96:
-#line 430 "engines/director/lingo/lingo-gr.y"
+ case 98:
+#line 446 "engines/director/lingo/lingo-gr.y"
{ (yyval.s) = (yyvsp[(1) - (1)].s); ;}
break;
- case 97:
-#line 433 "engines/director/lingo/lingo-gr.y"
+ case 99:
+#line 449 "engines/director/lingo/lingo-gr.y"
{ (yyval.s) = (yyvsp[(3) - (3)].s); ;}
break;
- case 98:
-#line 434 "engines/director/lingo/lingo-gr.y"
+ case 100:
+#line 450 "engines/director/lingo/lingo-gr.y"
{ (yyval.s) = (yyvsp[(2) - (2)].s); ;}
break;
- case 99:
-#line 435 "engines/director/lingo/lingo-gr.y"
+ case 101:
+#line 451 "engines/director/lingo/lingo-gr.y"
{ (yyval.s) = (yyvsp[(3) - (3)].s); ;}
break;
- case 100:
-#line 463 "engines/director/lingo/lingo-gr.y"
+ case 102:
+#line 479 "engines/director/lingo/lingo-gr.y"
{ g_lingo->_indef = true; ;}
break;
- case 101:
-#line 464 "engines/director/lingo/lingo-gr.y"
+ case 103:
+#line 480 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code2(g_lingo->c_constpush, (inst)0); // Push fake value on stack
g_lingo->code1(g_lingo->c_procret);
@@ -2292,33 +2326,33 @@ yyreduce:
g_lingo->_indef = false; ;}
break;
- case 102:
-#line 470 "engines/director/lingo/lingo-gr.y"
+ case 104:
+#line 486 "engines/director/lingo/lingo-gr.y"
{ (yyval.narg) = 0; ;}
break;
- case 103:
-#line 471 "engines/director/lingo/lingo-gr.y"
+ case 105:
+#line 487 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeArg((yyvsp[(1) - (1)].s)); (yyval.narg) = 1; ;}
break;
- case 104:
-#line 472 "engines/director/lingo/lingo-gr.y"
+ case 106:
+#line 488 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeArg((yyvsp[(3) - (3)].s)); (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}
break;
- case 105:
-#line 473 "engines/director/lingo/lingo-gr.y"
+ case 107:
+#line 489 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeArg((yyvsp[(4) - (4)].s)); (yyval.narg) = (yyvsp[(1) - (4)].narg) + 1; ;}
break;
- case 106:
-#line 475 "engines/director/lingo/lingo-gr.y"
+ case 108:
+#line 491 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeArgStore(); ;}
break;
- case 107:
-#line 478 "engines/director/lingo/lingo-gr.y"
+ case 109:
+#line 494 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_call);
g_lingo->codeString((yyvsp[(1) - (3)].s)->c_str());
@@ -2327,24 +2361,24 @@ yyreduce:
g_lingo->code1(numpar); ;}
break;
- case 108:
-#line 486 "engines/director/lingo/lingo-gr.y"
+ case 110:
+#line 502 "engines/director/lingo/lingo-gr.y"
{ (yyval.narg) = 0; ;}
break;
- case 109:
-#line 487 "engines/director/lingo/lingo-gr.y"
+ case 111:
+#line 503 "engines/director/lingo/lingo-gr.y"
{ (yyval.narg) = 1; ;}
break;
- case 110:
-#line 488 "engines/director/lingo/lingo-gr.y"
+ case 112:
+#line 504 "engines/director/lingo/lingo-gr.y"
{ (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}
break;
/* Line 1267 of yacc.c. */
-#line 2348 "engines/director/lingo/lingo-gr.cpp"
+#line 2382 "engines/director/lingo/lingo-gr.cpp"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2558,6 +2592,6 @@ yyreturn:
}
-#line 491 "engines/director/lingo/lingo-gr.y"
+#line 507 "engines/director/lingo/lingo-gr.y"
diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y
index cc0d1fdfb7..9a374d0d0d 100644
--- a/engines/director/lingo/lingo-gr.y
+++ b/engines/director/lingo/lingo-gr.y
@@ -135,6 +135,14 @@ asgn: tPUT expr tINTO ID {
WRITE_UINT32(&f, $2[1]);
g_lingo->code2(e, f);
$$ = $4; }
+ | tSET THEENTITYWITHID expr '=' expr {
+ g_lingo->code1(g_lingo->c_swap);
+ g_lingo->code1(g_lingo->c_theentityassign);
+ inst e = 0, f = 0;
+ WRITE_UINT32(&e, $2[0]);
+ WRITE_UINT32(&f, $2[1]);
+ g_lingo->code2(e, f);
+ $$ = $5; }
| tSET ID tTO expr {
g_lingo->code1(g_lingo->c_varpush);
g_lingo->codeString($2->c_str());
@@ -149,6 +157,14 @@ asgn: tPUT expr tINTO ID {
WRITE_UINT32(&f, $2[1]);
g_lingo->code2(e, f);
$$ = $4; }
+ | tSET THEENTITYWITHID expr tTO expr {
+ g_lingo->code1(g_lingo->c_swap);
+ g_lingo->code1(g_lingo->c_theentityassign);
+ inst e = 0, f = 0;
+ WRITE_UINT32(&e, $2[0]);
+ WRITE_UINT32(&f, $2[1]);
+ g_lingo->code2(e, f);
+ $$ = $5; }
;
stmtoneliner: expr { g_lingo->code1(g_lingo->c_xpop); }
| func
diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index aaeec3e46d..670494c534 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -200,10 +200,10 @@ void Lingo::setTheSprite(Datum &id1, int field, Datum &d) {
else
warning("Unknown the sprite id type: %s", id1.type2str());
- Sprite *sprite = _vm->_currentScore->getSpriteById(id);
-
d.toInt(); // Enforce Integer
+ Sprite *sprite = _vm->_currentScore->getSpriteById(id);
+
switch (field) {
case kTheCastNum:
if (_vm->_currentScore->_casts.contains(d.u.i)) {
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index 5eed2012da..254cf76ce7 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -207,6 +207,8 @@ public:
bool verify(Symbol *s);
static void c_eval();
+ static void c_swap();
+
static void c_theentitypush();
static void c_theentityassign();
diff --git a/engines/director/lingo/tests/the.lingo b/engines/director/lingo/tests/the.lingo
index 2376dd8086..75782abbe7 100644
--- a/engines/director/lingo/tests/the.lingo
+++ b/engines/director/lingo/tests/the.lingo
@@ -2,3 +2,4 @@ put 1.0 / 3
set the floatPrecision to 6
put 1.0 / 3
put the loch of sprite 4
+set the loch of sprite 5 to 10