aboutsummaryrefslogtreecommitdiff
path: root/engines/director
diff options
context:
space:
mode:
authorEugene Sandulenko2016-07-12 12:30:08 +0200
committerEugene Sandulenko2016-08-03 23:40:36 +0200
commit9763b62a78ba51b328fe336926a40fa0ffdde0be (patch)
tree94f75ba2be787530934b6ed9fece5f8339429d84 /engines/director
parente15915b6a30d56a77c99eb9b3871cc75b4034b9c (diff)
downloadscummvm-rg350-9763b62a78ba51b328fe336926a40fa0ffdde0be.tar.gz
scummvm-rg350-9763b62a78ba51b328fe336926a40fa0ffdde0be.tar.bz2
scummvm-rg350-9763b62a78ba51b328fe336926a40fa0ffdde0be.zip
DIRECTOR: Lingo: Implement getting the entity fields
Diffstat (limited to 'engines/director')
-rw-r--r--engines/director/lingo/lingo-code.cpp8
-rw-r--r--engines/director/lingo/lingo-gr.cpp1088
-rw-r--r--engines/director/lingo/lingo-gr.h177
-rw-r--r--engines/director/lingo/lingo-gr.y35
-rw-r--r--engines/director/lingo/lingo-lex.cpp298
-rw-r--r--engines/director/lingo/lingo-lex.l44
-rw-r--r--engines/director/lingo/lingo-the.cpp41
-rw-r--r--engines/director/lingo/lingo.h12
-rw-r--r--engines/director/lingo/tests/the.lingo1
9 files changed, 923 insertions, 781 deletions
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp
index 16bd7dbde4..5b72345d3f 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -221,11 +221,10 @@ void Lingo::c_eval() {
void Lingo::c_theentitypush() {
inst e = (*g_lingo->_currentScript)[g_lingo->_pc++];
inst f = (*g_lingo->_currentScript)[g_lingo->_pc++];
- inst i = (*g_lingo->_currentScript)[g_lingo->_pc++];
+ Datum id = g_lingo->pop();
int entity = READ_UINT32(&e);
int field = READ_UINT32(&f);
- int id = READ_UINT32(&i);
Datum d = g_lingo->getTheEntity(entity, id, field);
g_lingo->push(d);
@@ -234,14 +233,15 @@ void Lingo::c_theentitypush() {
void Lingo::c_theentityassign() {
inst e = (*g_lingo->_currentScript)[g_lingo->_pc++];
inst f = (*g_lingo->_currentScript)[g_lingo->_pc++];
- inst i = (*g_lingo->_currentScript)[g_lingo->_pc++];
+ Datum id = g_lingo->pop();
int entity = READ_UINT32(&e);
int field = READ_UINT32(&f);
- int id = READ_UINT32(&i);
Datum d = g_lingo->pop();
g_lingo->setTheEntity(entity, id, field, d);
+
+ g_lingo->push(d); // Dummy value
}
void Lingo::c_add() {
diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp
index 75bbfa3909..d3a8892eb0 100644
--- a/engines/director/lingo/lingo-gr.cpp
+++ b/engines/director/lingo/lingo-gr.cpp
@@ -73,50 +73,49 @@
INT = 262,
THEENTITY = 263,
THEENTITYWITHID = 264,
- THEFIELD = 265,
- FLOAT = 266,
- BLTIN = 267,
- ID = 268,
- STRING = 269,
- HANDLER = 270,
- tDOWN = 271,
- tELSE = 272,
- tNLELSIF = 273,
- tEND = 274,
- tEXIT = 275,
- tFRAME = 276,
- tGLOBAL = 277,
- tGO = 278,
- tIF = 279,
- tINTO = 280,
- tLOOP = 281,
- tMACRO = 282,
- tMCI = 283,
- tMCIWAIT = 284,
- tMOVIE = 285,
- tNEXT = 286,
- tOF = 287,
- tPREVIOUS = 288,
- tPUT = 289,
- tREPEAT = 290,
- tSET = 291,
- tTHEN = 292,
- tTO = 293,
- tWITH = 294,
- tWHILE = 295,
- tNLELSE = 296,
- tGE = 297,
- tLE = 298,
- tGT = 299,
- tLT = 300,
- tEQ = 301,
- tNEQ = 302,
- tAND = 303,
- tOR = 304,
- tNOT = 305,
- tCONCAT = 306,
- tCONTAINS = 307,
- tSTARTS = 308
+ FLOAT = 265,
+ BLTIN = 266,
+ ID = 267,
+ STRING = 268,
+ HANDLER = 269,
+ tDOWN = 270,
+ tELSE = 271,
+ tNLELSIF = 272,
+ tEND = 273,
+ tEXIT = 274,
+ tFRAME = 275,
+ tGLOBAL = 276,
+ tGO = 277,
+ tIF = 278,
+ tINTO = 279,
+ tLOOP = 280,
+ tMACRO = 281,
+ tMCI = 282,
+ tMCIWAIT = 283,
+ tMOVIE = 284,
+ tNEXT = 285,
+ tOF = 286,
+ tPREVIOUS = 287,
+ tPUT = 288,
+ tREPEAT = 289,
+ tSET = 290,
+ tTHEN = 291,
+ tTO = 292,
+ tWITH = 293,
+ tWHILE = 294,
+ tNLELSE = 295,
+ tGE = 296,
+ tLE = 297,
+ tGT = 298,
+ tLT = 299,
+ tEQ = 300,
+ tNEQ = 301,
+ tAND = 302,
+ tOR = 303,
+ tNOT = 304,
+ tCONCAT = 305,
+ tCONTAINS = 306,
+ tSTARTS = 307
};
#endif
/* Tokens. */
@@ -127,50 +126,49 @@
#define INT 262
#define THEENTITY 263
#define THEENTITYWITHID 264
-#define THEFIELD 265
-#define FLOAT 266
-#define BLTIN 267
-#define ID 268
-#define STRING 269
-#define HANDLER 270
-#define tDOWN 271
-#define tELSE 272
-#define tNLELSIF 273
-#define tEND 274
-#define tEXIT 275
-#define tFRAME 276
-#define tGLOBAL 277
-#define tGO 278
-#define tIF 279
-#define tINTO 280
-#define tLOOP 281
-#define tMACRO 282
-#define tMCI 283
-#define tMCIWAIT 284
-#define tMOVIE 285
-#define tNEXT 286
-#define tOF 287
-#define tPREVIOUS 288
-#define tPUT 289
-#define tREPEAT 290
-#define tSET 291
-#define tTHEN 292
-#define tTO 293
-#define tWITH 294
-#define tWHILE 295
-#define tNLELSE 296
-#define tGE 297
-#define tLE 298
-#define tGT 299
-#define tLT 300
-#define tEQ 301
-#define tNEQ 302
-#define tAND 303
-#define tOR 304
-#define tNOT 305
-#define tCONCAT 306
-#define tCONTAINS 307
-#define tSTARTS 308
+#define FLOAT 265
+#define BLTIN 266
+#define ID 267
+#define STRING 268
+#define HANDLER 269
+#define tDOWN 270
+#define tELSE 271
+#define tNLELSIF 272
+#define tEND 273
+#define tEXIT 274
+#define tFRAME 275
+#define tGLOBAL 276
+#define tGO 277
+#define tIF 278
+#define tINTO 279
+#define tLOOP 280
+#define tMACRO 281
+#define tMCI 282
+#define tMCIWAIT 283
+#define tMOVIE 284
+#define tNEXT 285
+#define tOF 286
+#define tPREVIOUS 287
+#define tPUT 288
+#define tREPEAT 289
+#define tSET 290
+#define tTHEN 291
+#define tTO 292
+#define tWITH 293
+#define tWHILE 294
+#define tNLELSE 295
+#define tGE 296
+#define tLE 297
+#define tGT 298
+#define tLT 299
+#define tEQ 300
+#define tNEQ 301
+#define tAND 302
+#define tOR 303
+#define tNOT 304
+#define tCONCAT 305
+#define tCONTAINS 306
+#define tSTARTS 307
@@ -222,11 +220,12 @@ typedef union YYSTYPE
Common::String *s;
int i;
double f;
+ int e[2]; // Entity + field
int code;
int narg; /* number of arguments */
}
/* Line 193 of yacc.c. */
-#line 230 "engines/director/lingo/lingo-gr.cpp"
+#line 229 "engines/director/lingo/lingo-gr.cpp"
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
@@ -239,7 +238,7 @@ typedef union YYSTYPE
/* Line 216 of yacc.c. */
-#line 243 "engines/director/lingo/lingo-gr.cpp"
+#line 242 "engines/director/lingo/lingo-gr.cpp"
#ifdef short
# undef short
@@ -452,22 +451,22 @@ union yyalloc
#endif
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 67
+#define YYFINAL 69
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 573
+#define YYLAST 599
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 67
+#define YYNTOKENS 66
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 33
/* YYNRULES -- Number of rules. */
-#define YYNRULES 109
+#define YYNRULES 110
/* YYNRULES -- Number of states. */
-#define YYNSTATES 229
+#define YYNSTATES 231
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 308
+#define YYMAXUTOK 307
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -476,12 +475,12 @@ union yyalloc
static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 60, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 59, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 59, 65, 2,
- 61, 62, 57, 55, 66, 56, 2, 58, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 58, 64, 2,
+ 60, 61, 56, 54, 65, 55, 2, 57, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 64, 54, 63, 2, 2, 2, 2, 2, 2, 2,
+ 63, 53, 62, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -505,7 +504,7 @@ static const yytype_uint8 yytranslate[] =
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, 48, 49, 50, 51, 52, 53
+ 45, 46, 47, 48, 49, 50, 51, 52
};
#if YYDEBUG
@@ -518,74 +517,76 @@ static const yytype_uint16 yyprhs[] =
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, 236,
- 240, 244, 248, 252, 256, 260, 264, 268, 272, 276,
- 280, 283, 287, 291, 295, 299, 302, 305, 309, 312,
- 315, 318, 320, 322, 325, 327, 331, 334, 337, 340,
- 343, 347, 350, 354, 357, 360, 362, 366, 369, 373,
- 374, 383, 384, 386, 390, 395, 396, 400, 401, 403
+ 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
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int8 yyrhs[] =
{
- 68, 0, -1, 68, 69, 70, -1, 70, -1, 1,
- 60, -1, 60, -1, -1, 94, -1, 89, -1, 98,
- -1, 71, -1, 73, -1, 34, 88, 25, 13, -1,
- 36, 13, 54, 88, -1, 36, 8, 54, 88, -1,
- 36, 13, 38, 88, -1, 36, 8, 38, 88, -1,
- 88, -1, 89, -1, 72, -1, 74, -1, 81, 61,
- 80, 62, 87, 86, 19, 35, -1, 82, 54, 88,
- 86, 38, 88, 86, 87, 86, 19, 35, -1, 82,
- 54, 88, 86, 16, 38, 88, 86, 87, 86, 19,
- 35, -1, 83, 80, 37, 69, 87, 86, 19, 24,
- -1, 83, 80, 37, 69, 87, 86, 41, 87, 86,
- 19, 24, -1, 83, 80, 37, 69, 87, 86, 85,
- 76, 86, 19, 24, -1, 83, 80, 37, 85, 72,
- 86, -1, 83, 80, 37, 85, 72, 86, 41, 85,
- 72, 86, -1, 83, 80, 37, 85, 72, 86, 77,
- 86, 75, 86, -1, -1, 41, 85, 72, -1, 76,
- 79, -1, 79, -1, 77, 78, -1, 78, -1, 84,
- 80, 37, 85, 73, 86, -1, 77, -1, 84, 80,
- 37, 87, 86, -1, 88, -1, 88, 54, 88, -1,
- 61, 80, 62, -1, 35, 40, -1, 35, 39, 13,
- -1, 24, -1, 18, -1, -1, -1, -1, 87, 69,
- -1, 87, 73, -1, 7, -1, 11, -1, 14, -1,
- 12, 61, 99, 62, -1, 13, 61, 99, 62, -1,
- 13, -1, 8, -1, 71, -1, 88, 55, 88, -1,
- 88, 56, 88, -1, 88, 57, 88, -1, 88, 58,
- 88, -1, 88, 63, 88, -1, 88, 64, 88, -1,
- 88, 47, 88, -1, 88, 42, 88, -1, 88, 43,
- 88, -1, 88, 48, 88, -1, 88, 49, 88, -1,
- 50, 88, -1, 88, 65, 88, -1, 88, 51, 88,
- -1, 88, 52, 88, -1, 88, 53, 88, -1, 55,
- 88, -1, 56, 88, -1, 61, 88, 62, -1, 28,
- 14, -1, 29, 13, -1, 34, 88, -1, 91, -1,
- 20, -1, 22, 90, -1, 13, -1, 90, 66, 13,
- -1, 23, 26, -1, 23, 31, -1, 23, 33, -1,
- 23, 92, -1, 23, 92, 93, -1, 23, 93, -1,
- 38, 21, 14, -1, 21, 14, -1, 38, 14, -1,
- 14, -1, 32, 30, 14, -1, 30, 14, -1, 38,
- 30, 14, -1, -1, 27, 13, 95, 85, 96, 69,
- 97, 87, -1, -1, 13, -1, 96, 66, 13, -1,
- 96, 69, 66, 13, -1, -1, 13, 85, 99, -1,
- -1, 88, -1, 99, 66, 88, -1
+ 67, 0, -1, 67, 68, 69, -1, 69, -1, 1,
+ 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
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 98, 98, 99, 100, 103, 108, 109, 110, 111,
- 112, 113, 116, 122, 128, 136, 142, 150, 151, 153,
- 154, 159, 170, 186, 200, 207, 216, 225, 235, 245,
- 256, 257, 260, 261, 264, 265, 268, 276, 277, 285,
- 286, 287, 289, 291, 297, 303, 310, 312, 314, 315,
- 316, 319, 324, 327, 330, 336, 344, 347, 354, 355,
- 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
- 366, 367, 368, 369, 370, 371, 372, 373, 376, 377,
- 378, 379, 380, 382, 385, 386, 397, 398, 399, 400,
- 405, 411, 418, 419, 420, 421, 424, 425, 426, 454,
- 454, 461, 462, 463, 464, 466, 469, 477, 478, 479
+ 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
};
#endif
@@ -595,20 +596,19 @@ static const yytype_uint16 yyrline[] =
static const char *const yytname[] =
{
"$end", "error", "$undefined", "CASTREF", "UNARY", "VOID", "VAR", "INT",
- "THEENTITY", "THEENTITYWITHID", "THEFIELD", "FLOAT", "BLTIN", "ID",
- "STRING", "HANDLER", "tDOWN", "tELSE", "tNLELSIF", "tEND", "tEXIT",
- "tFRAME", "tGLOBAL", "tGO", "tIF", "tINTO", "tLOOP", "tMACRO", "tMCI",
- "tMCIWAIT", "tMOVIE", "tNEXT", "tOF", "tPREVIOUS", "tPUT", "tREPEAT",
- "tSET", "tTHEN", "tTO", "tWITH", "tWHILE", "tNLELSE", "tGE", "tLE",
- "tGT", "tLT", "tEQ", "tNEQ", "tAND", "tOR", "tNOT", "tCONCAT",
- "tCONTAINS", "tSTARTS", "'='", "'+'", "'-'", "'*'", "'/'", "'%'",
- "'\\n'", "'('", "')'", "'>'", "'<'", "'&'", "','", "$accept", "program",
- "nl", "programline", "asgn", "stmtoneliner", "stmt", "ifstmt",
- "elsestmtoneliner", "elseifstmt", "elseifstmtoneliner",
- "elseifstmtoneliner1", "elseifstmt1", "cond", "repeatwhile",
- "repeatwith", "if", "elseif", "begin", "end", "stmtlist", "expr", "func",
- "globallist", "gotofunc", "gotoframe", "gotomovie", "defn", "@1",
- "argdef", "argstore", "macro", "arglist", 0
+ "THEENTITY", "THEENTITYWITHID", "FLOAT", "BLTIN", "ID", "STRING",
+ "HANDLER", "tDOWN", "tELSE", "tNLELSIF", "tEND", "tEXIT", "tFRAME",
+ "tGLOBAL", "tGO", "tIF", "tINTO", "tLOOP", "tMACRO", "tMCI", "tMCIWAIT",
+ "tMOVIE", "tNEXT", "tOF", "tPREVIOUS", "tPUT", "tREPEAT", "tSET",
+ "tTHEN", "tTO", "tWITH", "tWHILE", "tNLELSE", "tGE", "tLE", "tGT", "tLT",
+ "tEQ", "tNEQ", "tAND", "tOR", "tNOT", "tCONCAT", "tCONTAINS", "tSTARTS",
+ "'='", "'+'", "'-'", "'*'", "'/'", "'%'", "'\\n'", "'('", "')'", "'>'",
+ "'<'", "'&'", "','", "$accept", "program", "nl", "programline", "asgn",
+ "stmtoneliner", "stmt", "ifstmt", "elsestmtoneliner", "elseifstmt",
+ "elseifstmtoneliner", "elseifstmtoneliner1", "elseifstmt1", "cond",
+ "repeatwhile", "repeatwith", "if", "elseif", "begin", "end", "stmtlist",
+ "expr", "func", "globallist", "gotofunc", "gotoframe", "gotomovie",
+ "defn", "@1", "argdef", "argstore", "macro", "arglist", 0
};
#endif
@@ -622,25 +622,26 @@ static const yytype_uint16 yytoknum[] =
275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
- 305, 306, 307, 308, 61, 43, 45, 42, 47, 37,
- 10, 40, 41, 62, 60, 38, 44
+ 305, 306, 307, 61, 43, 45, 42, 47, 37, 10,
+ 40, 41, 62, 60, 38, 44
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint8 yyr1[] =
{
- 0, 67, 68, 68, 68, 69, 70, 70, 70, 70,
- 70, 70, 71, 71, 71, 71, 71, 72, 72, 73,
- 73, 73, 73, 73, 74, 74, 74, 74, 74, 74,
- 75, 75, 76, 76, 77, 77, 78, 79, 79, 80,
- 80, 80, 81, 82, 83, 84, 85, 86, 87, 87,
- 87, 88, 88, 88, 88, 88, 88, 88, 88, 88,
- 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
- 88, 88, 88, 88, 88, 88, 88, 88, 89, 89,
- 89, 89, 89, 89, 90, 90, 91, 91, 91, 91,
- 91, 91, 92, 92, 92, 92, 93, 93, 93, 95,
- 94, 96, 96, 96, 96, 97, 98, 99, 99, 99
+ 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,
+ 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
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@@ -651,12 +652,13 @@ static const yytype_uint8 yyr2[] =
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, 1, 3,
+ 2, 1, 1, 1, 4, 4, 1, 1, 2, 1,
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
+ 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
@@ -664,77 +666,79 @@ static const yytype_uint8 yyr2[] =
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
- 0, 0, 51, 57, 52, 0, 46, 53, 82, 0,
- 0, 44, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 3, 58, 19, 11, 20, 0, 0,
- 0, 17, 8, 81, 7, 9, 4, 107, 107, 107,
- 84, 83, 95, 0, 86, 0, 87, 0, 88, 0,
- 89, 91, 99, 78, 79, 56, 0, 58, 80, 0,
- 42, 0, 0, 70, 75, 76, 0, 1, 5, 6,
- 0, 0, 0, 0, 39, 0, 0, 0, 0, 0,
+ 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, 0, 0, 0, 0, 0, 0, 0, 0,
- 108, 0, 0, 106, 0, 93, 97, 0, 94, 0,
- 0, 0, 90, 46, 0, 0, 43, 0, 0, 0,
- 0, 77, 2, 0, 47, 0, 0, 46, 0, 66,
- 67, 65, 68, 69, 72, 73, 74, 59, 60, 61,
- 62, 63, 64, 71, 54, 0, 55, 85, 96, 92,
- 98, 101, 12, 16, 14, 15, 13, 48, 0, 41,
- 48, 0, 40, 109, 102, 0, 47, 0, 0, 47,
- 47, 18, 0, 105, 49, 50, 0, 0, 47, 46,
- 27, 103, 0, 48, 0, 47, 48, 0, 48, 0,
- 45, 46, 47, 35, 0, 104, 100, 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, 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
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 22, 164, 23, 57, 25, 165, 27, 208, 192,
- 193, 183, 194, 73, 28, 29, 30, 184, 218, 148,
- 156, 31, 161, 41, 33, 50, 51, 34, 103, 155,
- 173, 35, 91
+ -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
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -142
+#define YYPACT_NINF -165
static const yytype_int16 yypact[] =
{
- 138, -51, -142, -142, -142, -49, 465, -142, -142, 11,
- -1, -142, 14, 27, 41, 224, 22, 88, 224, 224,
- 224, 224, 4, -142, 10, -142, -142, -142, 31, 54,
- 345, 446, -142, -142, -142, -142, -142, 224, 224, 224,
- -142, 44, -142, 51, -142, 93, -142, 83, -142, 26,
- 25, -142, -142, -142, -142, 59, 224, -142, 360, 108,
- -142, -15, 5, 508, 508, 508, 403, -142, -142, 193,
- 345, 224, 345, 87, 427, 224, 224, 224, 224, 224,
- 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
- 446, 53, 56, 63, 114, -142, -142, 116, -142, 118,
- 119, 106, -142, -142, 360, 124, -142, 224, 224, 224,
- 224, -142, -142, 79, 446, 81, 379, 84, 224, 446,
- 446, 446, 446, 446, 446, 446, 446, 489, 489, 508,
- 508, 446, 446, 446, -142, 224, -142, -142, -142, -142,
- -142, 134, -142, 446, 446, 446, 446, -142, -10, -142,
- -142, 315, 446, 446, -142, 29, 233, 110, 224, 233,
- -142, -142, 140, 89, -142, -142, 137, 224, 446, 17,
- 3, -142, 155, -142, 135, 446, -142, 145, -142, 153,
- -142, -142, 153, -142, 345, -142, 233, -142, -142, 233,
- -142, 233, 153, 153, -142, 345, 315, -142, 136, 141,
- 233, 156, 160, -142, 162, 146, -142, -142, -142, -142,
- 163, 149, 161, 165, -11, -142, 315, -142, 284, 151,
- -142, -142, -142, 233, -142, -142, -142, -142, -142
+ 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
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -142, -142, -20, 121, 18, -105, 0, -142, -142, -142,
- 33, -140, 16, -67, -142, -142, -142, -141, -5, -66,
- -128, -4, 19, -142, -142, -142, 142, -142, -142, -142,
- -142, -142, 61
+ -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
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
@@ -744,155 +748,160 @@ static const yytype_int16 yypgoto[] =
#define YYTABLE_NINF -57
static const yytype_int16 yytable[] =
{
- 26, 39, 69, 113, 67, 115, 157, -48, -48, 36,
- -10, 58, 37, 42, 63, 64, 65, 66, 24, 32,
- 43, 180, 159, 107, 40, 44, 74, 52, 158, 45,
- 46, 47, 48, 90, 90, 90, 177, 49, 195, 108,
- 98, 53, 197, 109, 181, 186, 160, 99, 189, -48,
- 191, 195, 104, 197, 54, 45, 100, 47, 178, 110,
- 200, 59, 60, 101, 68, 95, 74, 114, 116, 26,
- -10, 119, 120, 121, 122, 123, 124, 125, 126, 127,
- 128, 129, 130, 131, 132, 133, 223, 24, 32, 68,
- 166, 206, 70, 169, 170, 162, 61, 150, 141, 92,
- 93, 62, 176, 143, 144, 145, 146, 96, 71, 188,
- 94, 224, 151, 97, 152, 134, 198, 199, 136, 135,
- 38, 106, 135, 201, 117, 202, 204, 137, 205, 135,
- 138, 153, 139, 140, 210, 163, 100, 142, -6, 1,
- 215, 147, 217, 149, 68, 2, 3, 154, 167, 4,
- 5, 6, 7, 171, 168, 172, 174, 227, 8, 228,
- 9, 10, 11, 175, 179, 12, 13, 14, 185, 190,
- 187, 180, 15, 16, 17, 211, 196, 207, 209, 212,
- 74, 213, 219, 214, 220, 221, 226, 0, 18, 222,
- 112, 74, 102, 19, 20, 0, 0, 0, -6, 21,
- 2, 3, 216, 182, 4, 5, 6, 7, 203, 0,
- 0, 0, 0, 8, 0, 9, 10, 11, 225, 0,
- 12, 13, 14, 0, 0, 0, 0, 15, 16, 17,
- 0, 2, 3, 0, 0, 4, 5, 55, 7, 0,
- 2, 3, 0, 18, 4, 5, 55, 7, 19, 20,
- 0, 0, 0, 8, 21, 9, 10, 11, 56, 0,
- 17, 13, 14, 0, 0, 0, 0, 15, 16, 17,
- 0, 0, 0, 0, 18, 0, 0, 0, 0, 19,
- 20, 0, 0, 18, 0, 21, 0, 0, 19, 20,
- 0, 2, 3, 68, 21, 4, 5, 55, 7, 0,
- 0, 0, 0, 0, 8, 0, 9, 10, 11, 0,
- 0, 0, 13, 14, 0, 0, 0, 0, 15, 16,
- 17, 0, 2, 3, 0, 0, 4, 5, 55, 7,
- 0, 0, 0, 0, 18, 8, 0, 9, 10, 19,
- 20, 0, 0, 13, 14, 21, 0, 0, 0, 15,
- 0, 17, 2, 3, 0, 0, 4, 5, 55, 7,
- 0, 0, 0, 0, 0, 18, 0, 0, 0, 0,
- 19, 20, 0, 0, 0, 0, 21, 0, 0, 56,
- 0, 17, 0, 0, 0, 105, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 18, 0, 0, 0, 0,
- 19, 20, 75, 76, 0, 0, 72, 77, 78, 79,
- 0, 80, 81, 82, 0, 83, 84, 85, 86, 0,
- 0, 75, 76, 87, 88, 89, 77, 78, 79, 0,
- 80, 81, 82, 118, 83, 84, 85, 86, 0, 0,
- 0, 111, 87, 88, 89, 75, 76, 0, 0, 0,
- 77, 78, 79, 0, 80, 81, 82, 0, 83, 84,
- 85, 86, 0, 0, 0, 111, 87, 88, 89, 75,
- 76, 0, 0, 0, 77, 78, 79, 0, 80, 81,
- 82, 118, 83, 84, 85, 86, 0, 0, 75, 76,
- 87, 88, 89, 77, 78, 79, 0, 80, 81, 82,
- 0, 83, 84, 85, 86, 0, 0, -56, -56, 87,
- 88, 89, -56, -56, -56, 0, -56, -56, -56, 0,
- 0, 0, -56, -56, 0, 0, 38, 0, -56, -56,
- -56, 75, 76, 0, 0, 0, 77, 78, 79, 0,
- 80, 81, 82, 0, 0, 0, 85, 86, 0, 0,
- 75, 76, 87, 88, 89, 77, 78, 79, 0, 80,
- 81, 82, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 87, 88, 89
+ 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,
+ 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,
+ 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
};
static const yytype_int16 yycheck[] =
{
- 0, 6, 22, 70, 0, 72, 16, 18, 19, 60,
- 0, 15, 61, 14, 18, 19, 20, 21, 0, 0,
- 21, 18, 150, 38, 13, 26, 30, 13, 38, 30,
- 31, 32, 33, 37, 38, 39, 19, 38, 179, 54,
- 14, 14, 182, 38, 41, 173, 151, 21, 176, 60,
- 178, 192, 56, 193, 13, 30, 30, 32, 41, 54,
- 188, 39, 40, 38, 60, 14, 70, 71, 72, 69,
- 60, 75, 76, 77, 78, 79, 80, 81, 82, 83,
- 84, 85, 86, 87, 88, 89, 214, 69, 69, 60,
- 156, 196, 61, 159, 160, 66, 8, 117, 103, 38,
- 39, 13, 168, 107, 108, 109, 110, 14, 54, 175,
- 66, 216, 117, 30, 118, 62, 182, 184, 62, 66,
- 61, 13, 66, 189, 37, 191, 192, 13, 195, 66,
- 14, 135, 14, 14, 200, 155, 30, 13, 0, 1,
- 206, 62, 208, 62, 60, 7, 8, 13, 38, 11,
- 12, 13, 14, 13, 158, 66, 19, 223, 20, 225,
- 22, 23, 24, 167, 169, 27, 28, 29, 13, 24,
- 35, 18, 34, 35, 36, 19, 181, 41, 37, 19,
- 184, 19, 19, 37, 35, 24, 35, -1, 50, 24,
- 69, 195, 50, 55, 56, -1, -1, -1, 60, 61,
- 7, 8, 207, 170, 11, 12, 13, 14, 192, -1,
- -1, -1, -1, 20, -1, 22, 23, 24, 218, -1,
- 27, 28, 29, -1, -1, -1, -1, 34, 35, 36,
- -1, 7, 8, -1, -1, 11, 12, 13, 14, -1,
- 7, 8, -1, 50, 11, 12, 13, 14, 55, 56,
- -1, -1, -1, 20, 61, 22, 23, 24, 34, -1,
- 36, 28, 29, -1, -1, -1, -1, 34, 35, 36,
- -1, -1, -1, -1, 50, -1, -1, -1, -1, 55,
- 56, -1, -1, 50, -1, 61, -1, -1, 55, 56,
- -1, 7, 8, 60, 61, 11, 12, 13, 14, -1,
- -1, -1, -1, -1, 20, -1, 22, 23, 24, -1,
- -1, -1, 28, 29, -1, -1, -1, -1, 34, 35,
- 36, -1, 7, 8, -1, -1, 11, 12, 13, 14,
- -1, -1, -1, -1, 50, 20, -1, 22, 23, 55,
- 56, -1, -1, 28, 29, 61, -1, -1, -1, 34,
- -1, 36, 7, 8, -1, -1, 11, 12, 13, 14,
- -1, -1, -1, -1, -1, 50, -1, -1, -1, -1,
- 55, 56, -1, -1, -1, -1, 61, -1, -1, 34,
- -1, 36, -1, -1, -1, 25, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 50, -1, -1, -1, -1,
- 55, 56, 42, 43, -1, -1, 61, 47, 48, 49,
- -1, 51, 52, 53, -1, 55, 56, 57, 58, -1,
- -1, 42, 43, 63, 64, 65, 47, 48, 49, -1,
- 51, 52, 53, 54, 55, 56, 57, 58, -1, -1,
- -1, 62, 63, 64, 65, 42, 43, -1, -1, -1,
- 47, 48, 49, -1, 51, 52, 53, -1, 55, 56,
- 57, 58, -1, -1, -1, 62, 63, 64, 65, 42,
- 43, -1, -1, -1, 47, 48, 49, -1, 51, 52,
- 53, 54, 55, 56, 57, 58, -1, -1, 42, 43,
- 63, 64, 65, 47, 48, 49, -1, 51, 52, 53,
- -1, 55, 56, 57, 58, -1, -1, 42, 43, 63,
- 64, 65, 47, 48, 49, -1, 51, 52, 53, -1,
- -1, -1, 57, 58, -1, -1, 61, -1, 63, 64,
- 65, 42, 43, -1, -1, -1, 47, 48, 49, -1,
- 51, 52, 53, -1, -1, -1, 57, 58, -1, -1,
- 42, 43, 63, 64, 65, 47, 48, 49, -1, 51,
- 52, 53, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 63, 64, 65
+ 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,
+ 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,
+ 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,
+ 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,
+ 50, 51, 52, -1, 54, 55, 56, 57, -1, -1,
+ -1, 61, 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, -1, 54, 55, 56,
+ 57, -1, -1, 41, 42, 62, 63, 64, 46, 47,
+ 48, -1, 50, 51, 52, -1, -1, -1, 56, 57,
+ -1, -1, 60, -1, 62, 63, 64, 41, 42, -1,
+ -1, -1, 46, 47, 48, -1, 50, 51, 52, -1,
+ -1, -1, 56, 57, -1, -1, 41, 42, 62, 63,
+ 64, 46, 47, 48, -1, 50, 51, 52, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 62, 63, 64
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
- 0, 1, 7, 8, 11, 12, 13, 14, 20, 22,
- 23, 24, 27, 28, 29, 34, 35, 36, 50, 55,
- 56, 61, 68, 70, 71, 72, 73, 74, 81, 82,
- 83, 88, 89, 91, 94, 98, 60, 61, 61, 85,
- 13, 90, 14, 21, 26, 30, 31, 32, 33, 38,
- 92, 93, 13, 14, 13, 13, 34, 71, 88, 39,
- 40, 8, 13, 88, 88, 88, 88, 0, 60, 69,
- 61, 54, 61, 80, 88, 42, 43, 47, 48, 49,
- 51, 52, 53, 55, 56, 57, 58, 63, 64, 65,
- 88, 99, 99, 99, 66, 14, 14, 30, 14, 21,
- 30, 38, 93, 95, 88, 25, 13, 38, 54, 38,
- 54, 62, 70, 80, 88, 80, 88, 37, 54, 88,
- 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
- 88, 88, 88, 88, 62, 66, 62, 13, 14, 14,
- 14, 85, 13, 88, 88, 88, 88, 62, 86, 62,
- 69, 85, 88, 88, 13, 96, 87, 16, 38, 87,
- 72, 89, 66, 69, 69, 73, 86, 38, 88, 86,
- 86, 13, 66, 97, 19, 88, 86, 19, 41, 85,
- 18, 41, 77, 78, 84, 13, 87, 35, 86, 87,
- 24, 87, 76, 77, 79, 84, 85, 78, 86, 80,
- 87, 86, 86, 79, 86, 80, 72, 41, 75, 37,
- 86, 19, 19, 19, 37, 86, 85, 86, 85, 19,
- 35, 24, 24, 87, 72, 73, 35, 86, 86
+ 0, 1, 7, 8, 9, 10, 11, 12, 13, 19,
+ 21, 22, 23, 26, 27, 28, 33, 34, 35, 49,
+ 54, 55, 60, 67, 69, 70, 71, 72, 73, 80,
+ 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
};
#define yyerrok (yyerrstatus = 0)
@@ -1707,12 +1716,12 @@ yyreduce:
switch (yyn)
{
case 4:
-#line 100 "engines/director/lingo/lingo-gr.y"
+#line 102 "engines/director/lingo/lingo-gr.y"
{ yyerrok; ;}
break;
case 5:
-#line 103 "engines/director/lingo/lingo-gr.y"
+#line 105 "engines/director/lingo/lingo-gr.y"
{
g_lingo->_linenumber++;
g_lingo->_colnumber = 1;
@@ -1720,12 +1729,12 @@ yyreduce:
break;
case 10:
-#line 112 "engines/director/lingo/lingo-gr.y"
+#line 114 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_xpop); ;}
break;
case 12:
-#line 116 "engines/director/lingo/lingo-gr.y"
+#line 118 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_varpush);
g_lingo->codeString((yyvsp[(4) - (4)].s)->c_str());
@@ -1735,7 +1744,7 @@ yyreduce:
break;
case 13:
-#line 122 "engines/director/lingo/lingo-gr.y"
+#line 124 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_varpush);
g_lingo->codeString((yyvsp[(2) - (4)].s)->c_str());
@@ -1745,19 +1754,19 @@ yyreduce:
break;
case 14:
-#line 128 "engines/director/lingo/lingo-gr.y"
+#line 130 "engines/director/lingo/lingo-gr.y"
{
+ g_lingo->code2(g_lingo->c_constpush, 0); // Put dummy id
g_lingo->code1(g_lingo->c_theentityassign);
- inst e = 0, f = 0, i = 0;
- WRITE_UINT32(&e, (yyvsp[(2) - (4)].i));
- WRITE_UINT32(&f, 0);
- WRITE_UINT32(&i, 0);
- g_lingo->code3(e, f, i);
+ inst e = 0, f = 0;
+ WRITE_UINT32(&e, (yyvsp[(2) - (4)].e)[0]);
+ WRITE_UINT32(&f, (yyvsp[(2) - (4)].e)[1]);
+ g_lingo->code2(e, f);
(yyval.code) = (yyvsp[(4) - (4)].code); ;}
break;
case 15:
-#line 136 "engines/director/lingo/lingo-gr.y"
+#line 138 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_varpush);
g_lingo->codeString((yyvsp[(2) - (4)].s)->c_str());
@@ -1767,23 +1776,24 @@ yyreduce:
break;
case 16:
-#line 142 "engines/director/lingo/lingo-gr.y"
+#line 144 "engines/director/lingo/lingo-gr.y"
{
+ g_lingo->code2(g_lingo->c_constpush, 0); // Put dummy id
g_lingo->code1(g_lingo->c_theentityassign);
inst e = 0, f = 0;
- WRITE_UINT32(&e, (yyvsp[(2) - (4)].i));
- WRITE_UINT32(&f, 0);
+ WRITE_UINT32(&e, (yyvsp[(2) - (4)].e)[0]);
+ WRITE_UINT32(&f, (yyvsp[(2) - (4)].e)[1]);
g_lingo->code2(e, f);
(yyval.code) = (yyvsp[(4) - (4)].code); ;}
break;
case 17:
-#line 150 "engines/director/lingo/lingo-gr.y"
+#line 153 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_xpop); ;}
break;
case 21:
-#line 159 "engines/director/lingo/lingo-gr.y"
+#line 162 "engines/director/lingo/lingo-gr.y"
{
inst body = 0, end = 0;
WRITE_UINT32(&body, (yyvsp[(5) - (8)].code));
@@ -1793,7 +1803,7 @@ yyreduce:
break;
case 22:
-#line 170 "engines/director/lingo/lingo-gr.y"
+#line 173 "engines/director/lingo/lingo-gr.y"
{
inst init = 0, finish = 0, body = 0, end = 0, inc = 0;
WRITE_UINT32(&init, (yyvsp[(3) - (11)].code));
@@ -1809,7 +1819,7 @@ yyreduce:
break;
case 23:
-#line 186 "engines/director/lingo/lingo-gr.y"
+#line 189 "engines/director/lingo/lingo-gr.y"
{
inst init = 0, finish = 0, body = 0, end = 0, inc = 0;
WRITE_UINT32(&init, (yyvsp[(3) - (12)].code));
@@ -1825,7 +1835,7 @@ yyreduce:
break;
case 24:
-#line 200 "engines/director/lingo/lingo-gr.y"
+#line 203 "engines/director/lingo/lingo-gr.y"
{
inst then = 0, end = 0;
WRITE_UINT32(&then, (yyvsp[(5) - (8)].code));
@@ -1836,7 +1846,7 @@ yyreduce:
break;
case 25:
-#line 207 "engines/director/lingo/lingo-gr.y"
+#line 210 "engines/director/lingo/lingo-gr.y"
{
inst then = 0, else1 = 0, end = 0;
WRITE_UINT32(&then, (yyvsp[(5) - (11)].code));
@@ -1849,7 +1859,7 @@ yyreduce:
break;
case 26:
-#line 216 "engines/director/lingo/lingo-gr.y"
+#line 219 "engines/director/lingo/lingo-gr.y"
{
inst then = 0, else1 = 0, end = 0;
WRITE_UINT32(&then, (yyvsp[(5) - (11)].code));
@@ -1862,7 +1872,7 @@ yyreduce:
break;
case 27:
-#line 225 "engines/director/lingo/lingo-gr.y"
+#line 228 "engines/director/lingo/lingo-gr.y"
{
inst then = 0, else1 = 0, end = 0;
WRITE_UINT32(&then, (yyvsp[(4) - (6)].code));
@@ -1876,7 +1886,7 @@ yyreduce:
break;
case 28:
-#line 235 "engines/director/lingo/lingo-gr.y"
+#line 238 "engines/director/lingo/lingo-gr.y"
{
inst then = 0, else1 = 0, end = 0;
WRITE_UINT32(&then, (yyvsp[(4) - (10)].code));
@@ -1890,7 +1900,7 @@ yyreduce:
break;
case 29:
-#line 245 "engines/director/lingo/lingo-gr.y"
+#line 248 "engines/director/lingo/lingo-gr.y"
{
inst then = 0, else1 = 0, end = 0;
WRITE_UINT32(&then, (yyvsp[(4) - (10)].code));
@@ -1904,17 +1914,17 @@ yyreduce:
break;
case 30:
-#line 256 "engines/director/lingo/lingo-gr.y"
+#line 259 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = 0; ;}
break;
case 31:
-#line 257 "engines/director/lingo/lingo-gr.y"
+#line 260 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = (yyvsp[(2) - (3)].code); ;}
break;
case 36:
-#line 268 "engines/director/lingo/lingo-gr.y"
+#line 271 "engines/director/lingo/lingo-gr.y"
{
inst then = 0;
WRITE_UINT32(&then, (yyvsp[(4) - (6)].code));
@@ -1924,7 +1934,7 @@ yyreduce:
break;
case 38:
-#line 277 "engines/director/lingo/lingo-gr.y"
+#line 280 "engines/director/lingo/lingo-gr.y"
{
inst then = 0;
WRITE_UINT32(&then, (yyvsp[(4) - (5)].code));
@@ -1934,22 +1944,22 @@ yyreduce:
break;
case 39:
-#line 285 "engines/director/lingo/lingo-gr.y"
+#line 288 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(STOP); ;}
break;
case 40:
-#line 286 "engines/director/lingo/lingo-gr.y"
+#line 289 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code2(g_lingo->c_eq, STOP); ;}
break;
case 42:
-#line 289 "engines/director/lingo/lingo-gr.y"
+#line 292 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = g_lingo->code3(g_lingo->c_repeatwhilecode, STOP, STOP); ;}
break;
case 43:
-#line 291 "engines/director/lingo/lingo-gr.y"
+#line 294 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code3(g_lingo->c_repeatwithcode, STOP, STOP);
g_lingo->code3(STOP, STOP, STOP);
@@ -1958,7 +1968,7 @@ yyreduce:
break;
case 44:
-#line 297 "engines/director/lingo/lingo-gr.y"
+#line 300 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code1(g_lingo->c_ifcode);
g_lingo->code3(STOP, STOP, STOP);
@@ -1967,7 +1977,7 @@ yyreduce:
break;
case 45:
-#line 303 "engines/director/lingo/lingo-gr.y"
+#line 306 "engines/director/lingo/lingo-gr.y"
{
inst skipEnd;
WRITE_UINT32(&skipEnd, 1); // We have to skip end to avoid multiple executions
@@ -1977,22 +1987,22 @@ yyreduce:
break;
case 46:
-#line 310 "engines/director/lingo/lingo-gr.y"
+#line 313 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = g_lingo->_currentScript->size(); ;}
break;
case 47:
-#line 312 "engines/director/lingo/lingo-gr.y"
+#line 315 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(STOP); (yyval.code) = g_lingo->_currentScript->size(); ;}
break;
case 48:
-#line 314 "engines/director/lingo/lingo-gr.y"
+#line 317 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = g_lingo->_currentScript->size(); ;}
break;
case 51:
-#line 319 "engines/director/lingo/lingo-gr.y"
+#line 322 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code1(g_lingo->c_constpush);
inst i = 0;
@@ -2001,21 +2011,21 @@ yyreduce:
break;
case 52:
-#line 324 "engines/director/lingo/lingo-gr.y"
+#line 327 "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 327 "engines/director/lingo/lingo-gr.y"
+#line 330 "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 330 "engines/director/lingo/lingo-gr.y"
+#line 333 "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));
@@ -2025,7 +2035,7 @@ yyreduce:
break;
case 55:
-#line 336 "engines/director/lingo/lingo-gr.y"
+#line 339 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code1(g_lingo->c_call);
g_lingo->codeString((yyvsp[(1) - (4)].s)->c_str());
@@ -2037,166 +2047,176 @@ yyreduce:
break;
case 56:
-#line 344 "engines/director/lingo/lingo-gr.y"
+#line 347 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->codeId(*(yyvsp[(1) - (1)].s));
delete (yyvsp[(1) - (1)].s); ;}
break;
case 57:
-#line 347 "engines/director/lingo/lingo-gr.y"
+#line 350 "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);
+ inst e = 0, f = 0;
+ WRITE_UINT32(&e, (yyvsp[(1) - (1)].e)[0]);
+ WRITE_UINT32(&f, (yyvsp[(1) - (1)].e)[1]);
+ g_lingo->code2(e, f); ;}
+ break;
+
+ case 58:
+#line 357 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code1(g_lingo->c_theentitypush);
- inst e = 0, f = 0, i = 0;
- WRITE_UINT32(&e, (yyvsp[(1) - (1)].i));
- WRITE_UINT32(&f, 0);
- WRITE_UINT32(&i, 0);
- g_lingo->code3(e, f, i); ;}
+ inst e = 0, f = 0;
+ WRITE_UINT32(&e, (yyvsp[(1) - (2)].e)[0]);
+ WRITE_UINT32(&f, (yyvsp[(1) - (2)].e)[1]);
+ g_lingo->code2(e, f); ;}
break;
- case 59:
-#line 355 "engines/director/lingo/lingo-gr.y"
+ case 60:
+#line 364 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_add); ;}
break;
- case 60:
-#line 356 "engines/director/lingo/lingo-gr.y"
+ case 61:
+#line 365 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_sub); ;}
break;
- case 61:
-#line 357 "engines/director/lingo/lingo-gr.y"
+ case 62:
+#line 366 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_mul); ;}
break;
- case 62:
-#line 358 "engines/director/lingo/lingo-gr.y"
+ case 63:
+#line 367 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_div); ;}
break;
- case 63:
-#line 359 "engines/director/lingo/lingo-gr.y"
+ case 64:
+#line 368 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_gt); ;}
break;
- case 64:
-#line 360 "engines/director/lingo/lingo-gr.y"
+ case 65:
+#line 369 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_lt); ;}
break;
- case 65:
-#line 361 "engines/director/lingo/lingo-gr.y"
+ case 66:
+#line 370 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_neq); ;}
break;
- case 66:
-#line 362 "engines/director/lingo/lingo-gr.y"
+ case 67:
+#line 371 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_ge); ;}
break;
- case 67:
-#line 363 "engines/director/lingo/lingo-gr.y"
+ case 68:
+#line 372 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_le); ;}
break;
- case 68:
-#line 364 "engines/director/lingo/lingo-gr.y"
+ case 69:
+#line 373 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_and); ;}
break;
- case 69:
-#line 365 "engines/director/lingo/lingo-gr.y"
+ case 70:
+#line 374 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_or); ;}
break;
- case 70:
-#line 366 "engines/director/lingo/lingo-gr.y"
+ case 71:
+#line 375 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_not); ;}
break;
- case 71:
-#line 367 "engines/director/lingo/lingo-gr.y"
+ case 72:
+#line 376 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_ampersand); ;}
break;
- case 72:
-#line 368 "engines/director/lingo/lingo-gr.y"
+ case 73:
+#line 377 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_concat); ;}
break;
- case 73:
-#line 369 "engines/director/lingo/lingo-gr.y"
+ case 74:
+#line 378 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_contains); ;}
break;
- case 74:
-#line 370 "engines/director/lingo/lingo-gr.y"
+ case 75:
+#line 379 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_starts); ;}
break;
- case 75:
-#line 371 "engines/director/lingo/lingo-gr.y"
+ case 76:
+#line 380 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = (yyvsp[(2) - (2)].code); ;}
break;
- case 76:
-#line 372 "engines/director/lingo/lingo-gr.y"
+ case 77:
+#line 381 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = (yyvsp[(2) - (2)].code); g_lingo->code1(g_lingo->c_negate); ;}
break;
- case 77:
-#line 373 "engines/director/lingo/lingo-gr.y"
+ case 78:
+#line 382 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = (yyvsp[(2) - (3)].code); ;}
break;
- case 78:
-#line 376 "engines/director/lingo/lingo-gr.y"
+ case 79:
+#line 385 "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 79:
-#line 377 "engines/director/lingo/lingo-gr.y"
+ case 80:
+#line 386 "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 80:
-#line 378 "engines/director/lingo/lingo-gr.y"
+ case 81:
+#line 387 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_printtop); ;}
break;
- case 82:
-#line 380 "engines/director/lingo/lingo-gr.y"
+ case 83:
+#line 389 "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 84:
-#line 385 "engines/director/lingo/lingo-gr.y"
+ case 85:
+#line 394 "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 85:
-#line 386 "engines/director/lingo/lingo-gr.y"
+ case 86:
+#line 395 "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 86:
-#line 397 "engines/director/lingo/lingo-gr.y"
+ case 87:
+#line 406 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_gotoloop); ;}
break;
- case 87:
-#line 398 "engines/director/lingo/lingo-gr.y"
+ case 88:
+#line 407 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_gotonext); ;}
break;
- case 88:
-#line 399 "engines/director/lingo/lingo-gr.y"
+ case 89:
+#line 408 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_gotoprevious); ;}
break;
- case 89:
-#line 400 "engines/director/lingo/lingo-gr.y"
+ case 90:
+#line 409 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_goto);
g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str());
@@ -2204,8 +2224,8 @@ yyreduce:
delete (yyvsp[(2) - (2)].s); ;}
break;
- case 90:
-#line 405 "engines/director/lingo/lingo-gr.y"
+ case 91:
+#line 414 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_goto);
g_lingo->codeString((yyvsp[(2) - (3)].s)->c_str());
@@ -2214,8 +2234,8 @@ yyreduce:
delete (yyvsp[(3) - (3)].s); ;}
break;
- case 91:
-#line 411 "engines/director/lingo/lingo-gr.y"
+ case 92:
+#line 420 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_goto);
g_lingo->codeString("");
@@ -2223,48 +2243,48 @@ yyreduce:
delete (yyvsp[(2) - (2)].s); ;}
break;
- case 92:
-#line 418 "engines/director/lingo/lingo-gr.y"
+ case 93:
+#line 427 "engines/director/lingo/lingo-gr.y"
{ (yyval.s) = (yyvsp[(3) - (3)].s); ;}
break;
- case 93:
-#line 419 "engines/director/lingo/lingo-gr.y"
+ case 94:
+#line 428 "engines/director/lingo/lingo-gr.y"
{ (yyval.s) = (yyvsp[(2) - (2)].s); ;}
break;
- case 94:
-#line 420 "engines/director/lingo/lingo-gr.y"
+ case 95:
+#line 429 "engines/director/lingo/lingo-gr.y"
{ (yyval.s) = (yyvsp[(2) - (2)].s); ;}
break;
- case 95:
-#line 421 "engines/director/lingo/lingo-gr.y"
+ case 96:
+#line 430 "engines/director/lingo/lingo-gr.y"
{ (yyval.s) = (yyvsp[(1) - (1)].s); ;}
break;
- case 96:
-#line 424 "engines/director/lingo/lingo-gr.y"
+ case 97:
+#line 433 "engines/director/lingo/lingo-gr.y"
{ (yyval.s) = (yyvsp[(3) - (3)].s); ;}
break;
- case 97:
-#line 425 "engines/director/lingo/lingo-gr.y"
+ case 98:
+#line 434 "engines/director/lingo/lingo-gr.y"
{ (yyval.s) = (yyvsp[(2) - (2)].s); ;}
break;
- case 98:
-#line 426 "engines/director/lingo/lingo-gr.y"
+ case 99:
+#line 435 "engines/director/lingo/lingo-gr.y"
{ (yyval.s) = (yyvsp[(3) - (3)].s); ;}
break;
- case 99:
-#line 454 "engines/director/lingo/lingo-gr.y"
+ case 100:
+#line 463 "engines/director/lingo/lingo-gr.y"
{ g_lingo->_indef = true; ;}
break;
- case 100:
-#line 455 "engines/director/lingo/lingo-gr.y"
+ case 101:
+#line 464 "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);
@@ -2272,33 +2292,33 @@ yyreduce:
g_lingo->_indef = false; ;}
break;
- case 101:
-#line 461 "engines/director/lingo/lingo-gr.y"
+ case 102:
+#line 470 "engines/director/lingo/lingo-gr.y"
{ (yyval.narg) = 0; ;}
break;
- case 102:
-#line 462 "engines/director/lingo/lingo-gr.y"
+ case 103:
+#line 471 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeArg((yyvsp[(1) - (1)].s)); (yyval.narg) = 1; ;}
break;
- case 103:
-#line 463 "engines/director/lingo/lingo-gr.y"
+ case 104:
+#line 472 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeArg((yyvsp[(3) - (3)].s)); (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}
break;
- case 104:
-#line 464 "engines/director/lingo/lingo-gr.y"
+ case 105:
+#line 473 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeArg((yyvsp[(4) - (4)].s)); (yyval.narg) = (yyvsp[(1) - (4)].narg) + 1; ;}
break;
- case 105:
-#line 466 "engines/director/lingo/lingo-gr.y"
+ case 106:
+#line 475 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeArgStore(); ;}
break;
- case 106:
-#line 469 "engines/director/lingo/lingo-gr.y"
+ case 107:
+#line 478 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_call);
g_lingo->codeString((yyvsp[(1) - (3)].s)->c_str());
@@ -2307,24 +2327,24 @@ yyreduce:
g_lingo->code1(numpar); ;}
break;
- case 107:
-#line 477 "engines/director/lingo/lingo-gr.y"
+ case 108:
+#line 486 "engines/director/lingo/lingo-gr.y"
{ (yyval.narg) = 0; ;}
break;
- case 108:
-#line 478 "engines/director/lingo/lingo-gr.y"
+ case 109:
+#line 487 "engines/director/lingo/lingo-gr.y"
{ (yyval.narg) = 1; ;}
break;
- case 109:
-#line 479 "engines/director/lingo/lingo-gr.y"
+ case 110:
+#line 488 "engines/director/lingo/lingo-gr.y"
{ (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}
break;
/* Line 1267 of yacc.c. */
-#line 2328 "engines/director/lingo/lingo-gr.cpp"
+#line 2348 "engines/director/lingo/lingo-gr.cpp"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2538,6 +2558,6 @@ yyreturn:
}
-#line 482 "engines/director/lingo/lingo-gr.y"
+#line 491 "engines/director/lingo/lingo-gr.y"
diff --git a/engines/director/lingo/lingo-gr.h b/engines/director/lingo/lingo-gr.h
index ea393a6e95..2841e615ba 100644
--- a/engines/director/lingo/lingo-gr.h
+++ b/engines/director/lingo/lingo-gr.h
@@ -46,50 +46,49 @@
INT = 262,
THEENTITY = 263,
THEENTITYWITHID = 264,
- THEFIELD = 265,
- FLOAT = 266,
- BLTIN = 267,
- ID = 268,
- STRING = 269,
- HANDLER = 270,
- tDOWN = 271,
- tELSE = 272,
- tNLELSIF = 273,
- tEND = 274,
- tEXIT = 275,
- tFRAME = 276,
- tGLOBAL = 277,
- tGO = 278,
- tIF = 279,
- tINTO = 280,
- tLOOP = 281,
- tMACRO = 282,
- tMCI = 283,
- tMCIWAIT = 284,
- tMOVIE = 285,
- tNEXT = 286,
- tOF = 287,
- tPREVIOUS = 288,
- tPUT = 289,
- tREPEAT = 290,
- tSET = 291,
- tTHEN = 292,
- tTO = 293,
- tWITH = 294,
- tWHILE = 295,
- tNLELSE = 296,
- tGE = 297,
- tLE = 298,
- tGT = 299,
- tLT = 300,
- tEQ = 301,
- tNEQ = 302,
- tAND = 303,
- tOR = 304,
- tNOT = 305,
- tCONCAT = 306,
- tCONTAINS = 307,
- tSTARTS = 308
+ FLOAT = 265,
+ BLTIN = 266,
+ ID = 267,
+ STRING = 268,
+ HANDLER = 269,
+ tDOWN = 270,
+ tELSE = 271,
+ tNLELSIF = 272,
+ tEND = 273,
+ tEXIT = 274,
+ tFRAME = 275,
+ tGLOBAL = 276,
+ tGO = 277,
+ tIF = 278,
+ tINTO = 279,
+ tLOOP = 280,
+ tMACRO = 281,
+ tMCI = 282,
+ tMCIWAIT = 283,
+ tMOVIE = 284,
+ tNEXT = 285,
+ tOF = 286,
+ tPREVIOUS = 287,
+ tPUT = 288,
+ tREPEAT = 289,
+ tSET = 290,
+ tTHEN = 291,
+ tTO = 292,
+ tWITH = 293,
+ tWHILE = 294,
+ tNLELSE = 295,
+ tGE = 296,
+ tLE = 297,
+ tGT = 298,
+ tLT = 299,
+ tEQ = 300,
+ tNEQ = 301,
+ tAND = 302,
+ tOR = 303,
+ tNOT = 304,
+ tCONCAT = 305,
+ tCONTAINS = 306,
+ tSTARTS = 307
};
#endif
/* Tokens. */
@@ -100,50 +99,49 @@
#define INT 262
#define THEENTITY 263
#define THEENTITYWITHID 264
-#define THEFIELD 265
-#define FLOAT 266
-#define BLTIN 267
-#define ID 268
-#define STRING 269
-#define HANDLER 270
-#define tDOWN 271
-#define tELSE 272
-#define tNLELSIF 273
-#define tEND 274
-#define tEXIT 275
-#define tFRAME 276
-#define tGLOBAL 277
-#define tGO 278
-#define tIF 279
-#define tINTO 280
-#define tLOOP 281
-#define tMACRO 282
-#define tMCI 283
-#define tMCIWAIT 284
-#define tMOVIE 285
-#define tNEXT 286
-#define tOF 287
-#define tPREVIOUS 288
-#define tPUT 289
-#define tREPEAT 290
-#define tSET 291
-#define tTHEN 292
-#define tTO 293
-#define tWITH 294
-#define tWHILE 295
-#define tNLELSE 296
-#define tGE 297
-#define tLE 298
-#define tGT 299
-#define tLT 300
-#define tEQ 301
-#define tNEQ 302
-#define tAND 303
-#define tOR 304
-#define tNOT 305
-#define tCONCAT 306
-#define tCONTAINS 307
-#define tSTARTS 308
+#define FLOAT 265
+#define BLTIN 266
+#define ID 267
+#define STRING 268
+#define HANDLER 269
+#define tDOWN 270
+#define tELSE 271
+#define tNLELSIF 272
+#define tEND 273
+#define tEXIT 274
+#define tFRAME 275
+#define tGLOBAL 276
+#define tGO 277
+#define tIF 278
+#define tINTO 279
+#define tLOOP 280
+#define tMACRO 281
+#define tMCI 282
+#define tMCIWAIT 283
+#define tMOVIE 284
+#define tNEXT 285
+#define tOF 286
+#define tPREVIOUS 287
+#define tPUT 288
+#define tREPEAT 289
+#define tSET 290
+#define tTHEN 291
+#define tTO 292
+#define tWITH 293
+#define tWHILE 294
+#define tNLELSE 295
+#define tGE 296
+#define tLE 297
+#define tGT 298
+#define tLT 299
+#define tEQ 300
+#define tNEQ 301
+#define tAND 302
+#define tOR 303
+#define tNOT 304
+#define tCONCAT 305
+#define tCONTAINS 306
+#define tSTARTS 307
@@ -155,11 +153,12 @@ typedef union YYSTYPE
Common::String *s;
int i;
double f;
+ int e[2]; // Entity + field
int code;
int narg; /* number of arguments */
}
/* Line 1529 of yacc.c. */
-#line 163 "engines/director/lingo/lingo-gr.hpp"
+#line 162 "engines/director/lingo/lingo-gr.hpp"
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y
index f830505713..cc0d1fdfb7 100644
--- a/engines/director/lingo/lingo-gr.y
+++ b/engines/director/lingo/lingo-gr.y
@@ -70,12 +70,14 @@ void yyerror(char *s) {
Common::String *s;
int i;
double f;
+ int e[2]; // Entity + field
int code;
int narg; /* number of arguments */
}
%token CASTREF UNARY VOID VAR
-%token<i> INT THEENTITY THEENTITYWITHID THEFIELD
+%token<i> INT
+%token<e> THEENTITY THEENTITYWITHID
%token<f> FLOAT
%token<s> BLTIN ID STRING HANDLER
%token tDOWN tELSE tNLELSIF tEND tEXIT tFRAME tGLOBAL tGO tIF tINTO tLOOP tMACRO
@@ -126,12 +128,12 @@ asgn: tPUT expr tINTO ID {
$$ = $4;
delete $2; }
| tSET THEENTITY '=' expr {
+ g_lingo->code2(g_lingo->c_constpush, 0); // Put dummy id
g_lingo->code1(g_lingo->c_theentityassign);
- inst e = 0, f = 0, i = 0;
- WRITE_UINT32(&e, $2);
- WRITE_UINT32(&f, 0);
- WRITE_UINT32(&i, 0);
- g_lingo->code3(e, f, i);
+ inst e = 0, f = 0;
+ WRITE_UINT32(&e, $2[0]);
+ WRITE_UINT32(&f, $2[1]);
+ g_lingo->code2(e, f);
$$ = $4; }
| tSET ID tTO expr {
g_lingo->code1(g_lingo->c_varpush);
@@ -140,10 +142,11 @@ asgn: tPUT expr tINTO ID {
$$ = $4;
delete $2; }
| tSET THEENTITY tTO expr {
+ g_lingo->code2(g_lingo->c_constpush, 0); // Put dummy id
g_lingo->code1(g_lingo->c_theentityassign);
inst e = 0, f = 0;
- WRITE_UINT32(&e, $2);
- WRITE_UINT32(&f, 0);
+ WRITE_UINT32(&e, $2[0]);
+ WRITE_UINT32(&f, $2[1]);
g_lingo->code2(e, f);
$$ = $4; }
;
@@ -345,12 +348,18 @@ expr: INT {
$$ = g_lingo->codeId(*$1);
delete $1; }
| THEENTITY {
+ $$ = g_lingo->code2(g_lingo->c_constpush, 0); // Put dummy id
+ g_lingo->code1(g_lingo->c_theentitypush);
+ inst e = 0, f = 0;
+ WRITE_UINT32(&e, $1[0]);
+ WRITE_UINT32(&f, $1[1]);
+ g_lingo->code2(e, f); }
+ | THEENTITYWITHID expr {
$$ = g_lingo->code1(g_lingo->c_theentitypush);
- inst e = 0, f = 0, i = 0;
- WRITE_UINT32(&e, $1);
- WRITE_UINT32(&f, 0);
- WRITE_UINT32(&i, 0);
- g_lingo->code3(e, f, i); }
+ inst e = 0, f = 0;
+ WRITE_UINT32(&e, $1[0]);
+ WRITE_UINT32(&f, $1[1]);
+ g_lingo->code2(e, f); }
| asgn
| expr '+' expr { g_lingo->code1(g_lingo->c_add); }
| expr '-' expr { g_lingo->code1(g_lingo->c_sub); }
diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp
index e8b376bf0a..fabac3f287 100644
--- a/engines/director/lingo/lingo-lex.cpp
+++ b/engines/director/lingo/lingo-lex.cpp
@@ -364,8 +364,8 @@ static void yy_fatal_error (yyconst char msg[] );
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
-#define YY_NUM_RULES 47
-#define YY_END_OF_BUFFER 48
+#define YY_NUM_RULES 48
+#define YY_END_OF_BUFFER 49
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
@@ -373,25 +373,25 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[154] =
+static yyconst flex_int16_t yy_accept[159] =
{ 0,
- 0, 0, 48, 46, 3, 44, 44, 46, 46, 43,
- 43, 43, 42, 43, 43, 40, 40, 40, 40, 40,
- 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
- 40, 40, 2, 2, 3, 44, 0, 0, 44, 0,
- 0, 45, 39, 1, 41, 42, 38, 36, 37, 40,
- 40, 40, 40, 40, 40, 40, 40, 40, 15, 7,
- 40, 40, 40, 40, 40, 40, 40, 24, 25, 40,
- 40, 40, 40, 40, 40, 33, 40, 40, 2, 2,
- 0, 1, 41, 4, 40, 40, 40, 11, 40, 40,
- 40, 40, 40, 40, 19, 40, 40, 23, 40, 27,
-
- 40, 29, 40, 40, 40, 40, 0, 40, 6, 10,
- 12, 40, 40, 16, 17, 40, 40, 40, 22, 40,
- 40, 40, 0, 32, 40, 34, 9, 40, 13, 40,
- 18, 40, 21, 40, 40, 40, 31, 35, 0, 40,
- 14, 40, 40, 28, 30, 0, 40, 20, 40, 8,
- 5, 26, 0
+ 0, 0, 49, 47, 3, 45, 45, 47, 47, 44,
+ 44, 44, 43, 44, 44, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 2, 2, 3, 45, 0, 0, 45, 0,
+ 0, 46, 40, 1, 42, 43, 39, 37, 38, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 15, 7,
+ 41, 41, 41, 41, 41, 41, 41, 24, 25, 41,
+ 41, 41, 41, 41, 41, 34, 41, 41, 2, 2,
+ 0, 1, 42, 4, 41, 41, 41, 11, 41, 41,
+ 41, 41, 41, 41, 19, 41, 41, 23, 41, 27,
+
+ 41, 29, 41, 41, 41, 41, 0, 41, 6, 10,
+ 12, 41, 41, 16, 17, 41, 41, 41, 22, 41,
+ 41, 41, 0, 33, 41, 35, 9, 41, 13, 41,
+ 18, 41, 21, 41, 41, 41, 32, 36, 0, 41,
+ 14, 41, 41, 28, 30, 0, 0, 41, 20, 41,
+ 0, 8, 5, 26, 0, 0, 31, 0
} ;
static yyconst flex_int32_t yy_ec[256] =
@@ -436,13 +436,13 @@ static yyconst flex_int32_t yy_meta[59] =
6, 6, 6, 6, 6, 6, 6, 6
} ;
-static yyconst flex_int16_t yy_base[158] =
+static yyconst flex_int16_t yy_base[164] =
{ 0,
- 0, 57, 188, 380, 61, 65, 69, 73, 153, 380,
+ 0, 57, 188, 395, 61, 65, 69, 73, 153, 395,
137, 91, 50, 66, 85, 54, 0, 54, 55, 65,
56, 66, 75, 59, 82, 87, 97, 95, 77, 102,
108, 116, 161, 165, 169, 138, 173, 141, 177, 101,
- 87, 380, 380, 0, 78, 141, 380, 380, 380, 0,
+ 87, 395, 395, 0, 78, 141, 395, 395, 395, 0,
113, 106, 100, 153, 167, 163, 172, 161, 0, 0,
158, 163, 175, 170, 161, 162, 167, 0, 0, 181,
170, 174, 172, 190, 188, 0, 191, 186, 229, 239,
@@ -453,32 +453,34 @@ static yyconst flex_int16_t yy_base[158] =
0, 252, 258, 0, 0, 250, 259, 261, 0, 259,
268, 255, 192, 0, 265, 0, 290, 268, 0, 268,
0, 275, 0, 273, 270, 273, 308, 0, 314, 284,
- 0, 280, 284, 0, 0, 279, 287, 0, 289, 380,
- 0, 0, 380, 360, 362, 368, 373
+ 0, 280, 284, 0, 0, 320, 298, 289, 0, 296,
+ 308, 395, 0, 0, 327, 333, 338, 395, 370, 372,
+ 378, 383, 388
} ;
-static yyconst flex_int16_t yy_def[158] =
+static yyconst flex_int16_t yy_def[164] =
{ 0,
- 153, 1, 153, 153, 153, 153, 153, 153, 154, 153,
- 153, 153, 153, 153, 153, 155, 155, 155, 155, 155,
- 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
- 155, 155, 153, 153, 153, 153, 153, 153, 153, 153,
- 154, 153, 153, 156, 153, 153, 153, 153, 153, 155,
- 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
- 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
- 155, 155, 155, 155, 155, 155, 155, 155, 153, 153,
- 153, 156, 153, 155, 155, 155, 155, 155, 155, 155,
- 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
-
- 155, 155, 155, 155, 155, 155, 153, 155, 155, 155,
- 155, 155, 155, 155, 155, 155, 155, 155, 155, 155,
- 155, 155, 157, 155, 155, 155, 153, 155, 155, 155,
- 155, 155, 155, 155, 155, 155, 157, 155, 153, 155,
- 155, 155, 155, 155, 155, 153, 155, 155, 155, 153,
- 155, 155, 0, 153, 153, 153, 153
+ 158, 1, 158, 158, 158, 158, 158, 158, 159, 158,
+ 158, 158, 158, 158, 158, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 158, 158, 158, 158, 158, 158, 158, 158,
+ 159, 158, 158, 161, 158, 158, 158, 158, 158, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160, 158, 158,
+ 158, 161, 158, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
+
+ 160, 160, 160, 160, 160, 160, 158, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 160, 160, 160, 160,
+ 160, 160, 162, 160, 160, 160, 158, 160, 160, 160,
+ 160, 160, 160, 160, 160, 160, 162, 160, 158, 160,
+ 160, 160, 160, 160, 160, 158, 158, 160, 160, 160,
+ 158, 158, 160, 160, 158, 163, 163, 0, 158, 158,
+ 158, 158, 158
} ;
-static yyconst flex_int16_t yy_nxt[439] =
+static yyconst flex_int16_t yy_nxt[454] =
{ 0,
4, 5, 6, 7, 8, 9, 10, 11, 12, 4,
13, 14, 10, 15, 16, 17, 18, 19, 20, 21,
@@ -499,38 +501,40 @@ static yyconst flex_int16_t yy_nxt[439] =
45, 46, 75, 84, 85, 74, 86, 76, 42, 40,
77, 78, 79, 36, 36, 80, 80, 36, 36, 80,
35, 36, 36, 37, 37, 36, 36, 37, 38, 39,
- 39, 38, 40, 87, 88, 89, 90, 153, 91, 92,
+ 39, 38, 40, 87, 88, 89, 90, 158, 91, 92,
93, 94, 95, 123, 96, 40, 123, 97, 98, 99,
- 153, 100, 101, 102, 103, 87, 104, 88, 89, 90,
+ 158, 100, 101, 102, 103, 87, 104, 88, 89, 90,
91, 92, 93, 105, 94, 95, 96, 106, 40, 97,
98, 110, 99, 100, 101, 102, 107, 103, 108, 104,
79, 36, 36, 80, 109, 111, 105, 112, 113, 106,
80, 36, 36, 80, 110, 114, 115, 116, 107, 117,
- 108, 118, 153, 119, 120, 121, 109, 111, 122, 112,
+ 108, 118, 158, 119, 120, 121, 109, 111, 122, 112,
123, 113, 125, 123, 126, 127, 128, 114, 115, 116,
129, 117, 130, 132, 118, 119, 120, 131, 121, 133,
122, 134, 135, 138, 125, 124, 136, 126, 127, 128,
- 140, 139, 141, 129, 139, 130, 132, 142, 150, 131,
-
- 143, 144, 133, 145, 134, 135, 138, 124, 136, 153,
- 147, 148, 153, 140, 141, 139, 149, 151, 139, 152,
- 142, 150, 143, 144, 153, 145, 153, 153, 153, 153,
- 153, 153, 147, 148, 153, 153, 146, 153, 149, 151,
- 153, 152, 153, 153, 153, 153, 153, 153, 153, 153,
- 153, 153, 153, 153, 153, 153, 153, 153, 153, 146,
- 41, 41, 153, 41, 41, 41, 50, 50, 82, 82,
- 153, 153, 82, 82, 137, 153, 153, 153, 137, 3,
- 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
- 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
-
- 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
- 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
- 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
- 153, 153, 153, 153, 153, 153, 153, 153
+ 140, 139, 141, 129, 139, 130, 132, 142, 158, 131,
+
+ 143, 144, 133, 145, 134, 135, 138, 124, 136, 146,
+ 148, 149, 146, 140, 141, 139, 150, 152, 139, 153,
+ 142, 146, 143, 144, 146, 145, 154, 155, 156, 158,
+ 158, 156, 148, 149, 156, 158, 147, 156, 150, 158,
+ 152, 153, 158, 158, 158, 158, 158, 151, 154, 158,
+ 155, 158, 158, 158, 158, 158, 158, 158, 158, 147,
+ 158, 158, 158, 158, 158, 158, 158, 158, 158, 151,
+ 41, 41, 158, 41, 41, 41, 50, 50, 82, 82,
+ 158, 158, 82, 82, 137, 158, 158, 158, 137, 157,
+ 158, 158, 158, 157, 3, 158, 158, 158, 158, 158,
+
+ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
+ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
+ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
+ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
+ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
+ 158, 158, 158
} ;
-static yyconst flex_int16_t yy_chk[439] =
+static yyconst flex_int16_t yy_chk[454] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -563,23 +567,25 @@ static yyconst flex_int16_t yy_chk[439] =
104, 91, 105, 104, 106, 107, 108, 92, 93, 94,
112, 95, 113, 117, 96, 97, 99, 116, 101, 118,
103, 120, 121, 125, 105, 104, 122, 106, 107, 108,
- 128, 127, 130, 112, 127, 113, 117, 132, 146, 116,
+ 128, 127, 130, 112, 127, 113, 117, 132, 0, 116,
134, 135, 118, 136, 120, 121, 125, 104, 122, 137,
- 140, 142, 137, 128, 130, 139, 143, 147, 139, 149,
- 132, 146, 134, 135, 0, 136, 0, 0, 0, 0,
- 0, 0, 140, 142, 0, 0, 139, 0, 143, 147,
- 0, 149, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 139,
- 154, 154, 0, 154, 154, 154, 155, 155, 156, 156,
- 0, 0, 156, 156, 157, 0, 0, 0, 157, 153,
- 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
- 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
-
- 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
- 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
- 153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
- 153, 153, 153, 153, 153, 153, 153, 153
+ 140, 142, 137, 128, 130, 139, 143, 147, 139, 148,
+ 132, 146, 134, 135, 146, 136, 150, 151, 155, 0,
+ 0, 155, 140, 142, 156, 0, 139, 156, 143, 157,
+ 147, 148, 157, 0, 0, 0, 0, 146, 150, 0,
+ 151, 0, 0, 0, 0, 0, 0, 0, 0, 139,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 146,
+ 159, 159, 0, 159, 159, 159, 160, 160, 161, 161,
+ 0, 0, 161, 161, 162, 0, 0, 0, 162, 163,
+ 0, 0, 0, 163, 158, 158, 158, 158, 158, 158,
+
+ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
+ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
+ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
+ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
+ 158, 158, 158, 158, 158, 158, 158, 158, 158, 158,
+ 158, 158, 158
} ;
static yy_state_type yy_last_accepting_state;
@@ -644,7 +650,7 @@ static void countnl() {
g_lingo->_colnumber = strlen(p);
}
-#line 648 "engines/director/lingo/lingo-lex.cpp"
+#line 654 "engines/director/lingo/lingo-lex.cpp"
#define INITIAL 0
@@ -832,7 +838,7 @@ YY_DECL
#line 60 "engines/director/lingo/lingo-lex.l"
-#line 836 "engines/director/lingo/lingo-lex.cpp"
+#line 842 "engines/director/lingo/lingo-lex.cpp"
if ( !(yy_init) )
{
@@ -886,13 +892,13 @@ yy_match:
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 154 )
+ if ( yy_current_state >= 159 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
- while ( yy_base[yy_current_state] != 380 );
+ while ( yy_base[yy_current_state] != 395 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
@@ -1078,16 +1084,33 @@ YY_RULE_SETUP
while (*ptr == ' ' || *ptr == '\t')
ptr++;
+ Common::String field;
+ while (*ptr != ' ' && *ptr != '\t')
+ field += *ptr++;
+
+ if (!g_lingo->_theEntityFields.contains(field)) {
+ error("Unhandled the field %s", ptr);
+ }
+
+ while (*ptr == ' ' || *ptr == '\t')
+ ptr++;
+
+ ptr += 3; // Skip 'of '
+
+ while (*ptr == ' ' || *ptr == '\t')
+ ptr++;
+
if (g_lingo->_theEntities.contains(ptr)) {
- yylval.i = g_lingo->_theEntities[ptr]->entity;
+ if (g_lingo->_theEntityFields[field]->entity != g_lingo->_theEntities[ptr]->entity)
+ error("Unsupported field '%s' for entity '%s'", field.c_str(), ptr);
+
+ yylval.e[0] = g_lingo->_theEntities[ptr]->entity;
+ yylval.e[1] = g_lingo->_theEntityFields[field]->field;
if (g_lingo->_theEntities[ptr]->hasId)
return THEENTITYWITHID;
else
return THEENTITY;
- } else if (g_lingo->_theEntityFields.contains(ptr)) {
- yylval.i = g_lingo->_theEntityFields[ptr]->field;
- return THEFIELD;
}
error("Unhandled the entity %s", ptr);
@@ -1095,47 +1118,72 @@ YY_RULE_SETUP
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 114 "engines/director/lingo/lingo-lex.l"
-{ count(); return tTHEN; }
+#line 131 "engines/director/lingo/lingo-lex.l"
+{
+ count();
+
+ const char *ptr = &yytext[4]; // Skip 'the '
+ while (*ptr == ' ' || *ptr == '\t')
+ ptr++;
+
+ if (g_lingo->_theEntities.contains(ptr)) {
+ yylval.e[0] = g_lingo->_theEntities[ptr]->entity;
+ yylval.e[1] = 0; // No field
+
+ if (g_lingo->_theEntities[ptr]->hasId)
+ return THEENTITYWITHID;
+ else
+ return THEENTITY;
+ } else if (g_lingo->_theEntityFields.contains(ptr)) {
+ error("the field without entity: %s", ptr);
+ }
+
+ error("Unhandled the entity %s", ptr);
+ }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 115 "engines/director/lingo/lingo-lex.l"
-{ count(); return tTO; }
+#line 152 "engines/director/lingo/lingo-lex.l"
+{ count(); return tTHEN; }
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 116 "engines/director/lingo/lingo-lex.l"
-{ count(); return tWITH; }
+#line 153 "engines/director/lingo/lingo-lex.l"
+{ count(); return tTO; }
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 117 "engines/director/lingo/lingo-lex.l"
-{ count(); return tWHILE; }
+#line 154 "engines/director/lingo/lingo-lex.l"
+{ count(); return tWITH; }
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 119 "engines/director/lingo/lingo-lex.l"
-{ count(); return tNEQ; }
+#line 155 "engines/director/lingo/lingo-lex.l"
+{ count(); return tWHILE; }
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 120 "engines/director/lingo/lingo-lex.l"
-{ count(); return tGE; }
+#line 157 "engines/director/lingo/lingo-lex.l"
+{ count(); return tNEQ; }
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 121 "engines/director/lingo/lingo-lex.l"
-{ count(); return tLE; }
+#line 158 "engines/director/lingo/lingo-lex.l"
+{ count(); return tGE; }
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 122 "engines/director/lingo/lingo-lex.l"
-{ count(); return tCONCAT; }
+#line 159 "engines/director/lingo/lingo-lex.l"
+{ count(); return tLE; }
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 124 "engines/director/lingo/lingo-lex.l"
+#line 160 "engines/director/lingo/lingo-lex.l"
+{ count(); return tCONCAT; }
+ YY_BREAK
+case 41:
+YY_RULE_SETUP
+#line 162 "engines/director/lingo/lingo-lex.l"
{
count();
yylval.s = new Common::String(yytext);
@@ -1146,43 +1194,43 @@ YY_RULE_SETUP
return ID;
}
YY_BREAK
-case 41:
+case 42:
YY_RULE_SETUP
-#line 133 "engines/director/lingo/lingo-lex.l"
+#line 171 "engines/director/lingo/lingo-lex.l"
{ count(); yylval.f = atof(yytext); return FLOAT; }
YY_BREAK
-case 42:
+case 43:
YY_RULE_SETUP
-#line 134 "engines/director/lingo/lingo-lex.l"
+#line 172 "engines/director/lingo/lingo-lex.l"
{ count(); yylval.i = strtol(yytext, NULL, 10); return INT; }
YY_BREAK
-case 43:
+case 44:
YY_RULE_SETUP
-#line 135 "engines/director/lingo/lingo-lex.l"
+#line 173 "engines/director/lingo/lingo-lex.l"
{ count(); return *yytext; }
YY_BREAK
-case 44:
-/* rule 44 can match eol */
+case 45:
+/* rule 45 can match eol */
YY_RULE_SETUP
-#line 136 "engines/director/lingo/lingo-lex.l"
+#line 174 "engines/director/lingo/lingo-lex.l"
{ return '\n'; }
YY_BREAK
-case 45:
+case 46:
YY_RULE_SETUP
-#line 137 "engines/director/lingo/lingo-lex.l"
+#line 175 "engines/director/lingo/lingo-lex.l"
{ count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return STRING; }
YY_BREAK
-case 46:
+case 47:
YY_RULE_SETUP
-#line 138 "engines/director/lingo/lingo-lex.l"
+#line 176 "engines/director/lingo/lingo-lex.l"
YY_BREAK
-case 47:
+case 48:
YY_RULE_SETUP
-#line 140 "engines/director/lingo/lingo-lex.l"
+#line 178 "engines/director/lingo/lingo-lex.l"
ECHO;
YY_BREAK
-#line 1186 "engines/director/lingo/lingo-lex.cpp"
+#line 1234 "engines/director/lingo/lingo-lex.cpp"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1475,7 +1523,7 @@ static int yy_get_next_buffer (void)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 154 )
+ if ( yy_current_state >= 159 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1503,11 +1551,11 @@ static int yy_get_next_buffer (void)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 154 )
+ if ( yy_current_state >= 159 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- yy_is_jam = (yy_current_state == 153);
+ yy_is_jam = (yy_current_state == 158);
return yy_is_jam ? 0 : yy_current_state;
}
@@ -2182,7 +2230,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 140 "engines/director/lingo/lingo-lex.l"
+#line 178 "engines/director/lingo/lingo-lex.l"
diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l
index 1f1cd76661..4739d20d86 100644
--- a/engines/director/lingo/lingo-lex.l
+++ b/engines/director/lingo/lingo-lex.l
@@ -90,6 +90,44 @@ whitespace [\t ]
(?i:repeat) { count(); return tREPEAT; }
(?i:set) { count(); return tSET; }
(?i:starts) { count(); return tSTARTS; }
+(?i:the[ \t]+[[:alpha:]]+[\t ]+of[\t ]+[[:alpha:]]+) {
+ count();
+
+ const char *ptr = &yytext[4]; // Skip 'the '
+ while (*ptr == ' ' || *ptr == '\t')
+ ptr++;
+
+ Common::String field;
+ while (*ptr != ' ' && *ptr != '\t')
+ field += *ptr++;
+
+ if (!g_lingo->_theEntityFields.contains(field)) {
+ error("Unhandled the field %s", ptr);
+ }
+
+ while (*ptr == ' ' || *ptr == '\t')
+ ptr++;
+
+ ptr += 3; // Skip 'of '
+
+ while (*ptr == ' ' || *ptr == '\t')
+ ptr++;
+
+ if (g_lingo->_theEntities.contains(ptr)) {
+ if (g_lingo->_theEntityFields[field]->entity != g_lingo->_theEntities[ptr]->entity)
+ error("Unsupported field '%s' for entity '%s'", field.c_str(), ptr);
+
+ yylval.e[0] = g_lingo->_theEntities[ptr]->entity;
+ yylval.e[1] = g_lingo->_theEntityFields[field]->field;
+
+ if (g_lingo->_theEntities[ptr]->hasId)
+ return THEENTITYWITHID;
+ else
+ return THEENTITY;
+ }
+
+ error("Unhandled the entity %s", ptr);
+ }
(?i:the[ \t]+[[:alpha:]]+) {
count();
@@ -98,15 +136,15 @@ whitespace [\t ]
ptr++;
if (g_lingo->_theEntities.contains(ptr)) {
- yylval.i = g_lingo->_theEntities[ptr]->entity;
+ yylval.e[0] = g_lingo->_theEntities[ptr]->entity;
+ yylval.e[1] = 0; // No field
if (g_lingo->_theEntities[ptr]->hasId)
return THEENTITYWITHID;
else
return THEENTITY;
} else if (g_lingo->_theEntityFields.contains(ptr)) {
- yylval.i = g_lingo->_theEntityFields[ptr]->field;
- return THEFIELD;
+ error("the field without entity: %s", ptr);
}
error("Unhandled the entity %s", ptr);
diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index 8680426aa6..aaeec3e46d 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -173,7 +173,7 @@ void Lingo::initTheEntities() {
}
}
-void Lingo::setTheEntity(int entity, int id, int field, Datum &d) {
+void Lingo::setTheEntity(int entity, Datum &id, int field, Datum &d) {
switch (entity) {
case kTheSprite:
setTheSprite(id, field, d);
@@ -192,7 +192,14 @@ void Lingo::setTheEntity(int entity, int id, int field, Datum &d) {
}
}
-void Lingo::setTheSprite(int id, int field, Datum &d) {
+void Lingo::setTheSprite(Datum &id1, int field, Datum &d) {
+ int id = 0;
+
+ if (id1.type == INT)
+ id = id1.u.i;
+ else
+ warning("Unknown the sprite id type: %s", id1.type2str());
+
Sprite *sprite = _vm->_currentScore->getSpriteById(id);
d.toInt(); // Enforce Integer
@@ -231,7 +238,7 @@ void Lingo::setTheSprite(int id, int field, Datum &d) {
}
}
-Datum Lingo::getTheEntity(int entity, int id, int field) {
+Datum Lingo::getTheEntity(int entity, Datum &id, int field) {
Datum d;
switch (entity) {
@@ -254,8 +261,15 @@ Datum Lingo::getTheEntity(int entity, int id, int field) {
return d;
}
-Datum Lingo::getTheSprite(int id, int field) {
+Datum Lingo::getTheSprite(Datum &id1, int field) {
Datum d;
+ int id = 0;
+
+ if (id1.type == INT)
+ id = id1.u.i;
+ else
+ warning("Unknown the sprite id type: %s", id1.type2str());
+
Sprite *sprite = _vm->_currentScore->getSpriteById(id);
d.type = INT;
@@ -292,13 +306,19 @@ Datum Lingo::getTheSprite(int id, int field) {
return d;
}
-Datum Lingo::getTheCast(int id, int field) {
+Datum Lingo::getTheCast(Datum &id1, int field) {
Datum d;
d.type = INT;
+ int id = 0;
+
+ if (id1.type == INT)
+ id = id1.u.i;
+ else
+ warning("Unknown the cast id type: %s", id1.type2str());
+
Cast *cast;
if (!_vm->_currentScore->_casts.contains(id)) {
-
if (field == kTheLoaded) {
d.u.i = 0;
}
@@ -344,7 +364,14 @@ Datum Lingo::getTheCast(int id, int field) {
}
}
-void Lingo::setTheCast(int id, int field, Datum &d) {
+void Lingo::setTheCast(Datum &id1, int field, Datum &d) {
+ int id = 0;
+
+ if (id1.type == INT)
+ id = id1.u.i;
+ else
+ warning("Unknown the sprite id type: %s", id1.type2str());
+
Cast *cast = _vm->_currentScore->_casts[id];
switch (field) {
case kTheCastType:
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index f1fc96a1d3..5eed2012da 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -255,12 +255,12 @@ public:
void func_gotoprevious();
public:
- void setTheEntity(int entity, int id, int field, Datum &d);
- void setTheSprite(int id, int field, Datum &d);
- void setTheCast(int id, int field, Datum &d);
- Datum getTheEntity(int entity, int id, int field);
- Datum getTheSprite(int id, int field);
- Datum getTheCast(int id, int field);
+ void setTheEntity(int entity, Datum &id, int field, Datum &d);
+ void setTheSprite(Datum &id, int field, Datum &d);
+ void setTheCast(Datum &id, int field, Datum &d);
+ Datum getTheEntity(int entity, Datum &id, int field);
+ Datum getTheSprite(Datum &id, int field);
+ Datum getTheCast(Datum &id, int field);
public:
ScriptData *_currentScript;
diff --git a/engines/director/lingo/tests/the.lingo b/engines/director/lingo/tests/the.lingo
index fbfbebd6e4..2376dd8086 100644
--- a/engines/director/lingo/tests/the.lingo
+++ b/engines/director/lingo/tests/the.lingo
@@ -1,3 +1,4 @@
put 1.0 / 3
set the floatPrecision to 6
put 1.0 / 3
+put the loch of sprite 4