aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2019-12-31 01:11:58 +0100
committerEugene Sandulenko2019-12-31 01:12:54 +0100
commit993974b7b671ce9b1c1942bd668a04681a224a38 (patch)
tree6e2bf472e60e8b7b6d82205c7c84c693e3327910
parent62530d25c9ab58061754d557d2a7f20e134c6db6 (diff)
downloadscummvm-rg350-993974b7b671ce9b1c1942bd668a04681a224a38.tar.gz
scummvm-rg350-993974b7b671ce9b1c1942bd668a04681a224a38.tar.bz2
scummvm-rg350-993974b7b671ce9b1c1942bd668a04681a224a38.zip
DIRECTOR: LINGO: Implement function flavour of factory() built-in
-rw-r--r--engines/director/lingo/lingo-builtins.cpp10
-rw-r--r--engines/director/lingo/lingo-lex.cpp562
-rw-r--r--engines/director/lingo/lingo-lex.l2
-rw-r--r--engines/director/lingo/lingo.h1
4 files changed, 294 insertions, 281 deletions
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index 8a9144a755..c9d2a32c39 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -131,6 +131,7 @@ static struct BuiltinProto {
// when mouseUp // D2
// when timeOut // D2
// Types
+ { "factory", Lingo::b_factoryP, 1, 1, true, 3, FBLTIN }, // D3
{ "floatP", Lingo::b_floatP, 1, 1, true, 3, FBLTIN }, // D3
{ "ilk", Lingo::b_ilk, 1, 2, false, 4, FBLTIN }, // D4 f
{ "integerp", Lingo::b_integerp, 1, 1, true, 2, FBLTIN }, // D2 f
@@ -951,6 +952,15 @@ void Lingo::b_startTimer(int nargs) {
///////////////////
// Types
///////////////////
+void Lingo::b_factoryP(int nargs) {
+ Datum d = g_lingo->pop();
+ d.toInt();
+ d.u.i = 1;
+ g_lingo->push(d);
+
+ warning("STUB: b_factoryP");
+}
+
void Lingo::b_floatP(int nargs) {
Datum d = g_lingo->pop();
int res = (d.type == FLOAT) ? 1 : 0;
diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp
index 5e600a0dcf..8a68f32c70 100644
--- a/engines/director/lingo/lingo-lex.cpp
+++ b/engines/director/lingo/lingo-lex.cpp
@@ -373,39 +373,41 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[290] =
+static yyconst flex_int16_t yy_accept[292] =
{ 0,
0, 0, 76, 74, 4, 72, 72, 74, 74, 74,
71, 71, 71, 70, 71, 67, 71, 68, 68, 68,
68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
- 68, 68, 68, 68, 68, 74, 3, 3, 4, 72,
+ 68, 68, 68, 68, 71, 74, 3, 3, 4, 72,
0, 0, 0, 73, 5, 66, 2, 69, 70, 65,
63, 64, 68, 68, 68, 68, 68, 68, 68, 68,
- 68, 68, 68, 68, 22, 13, 68, 68, 68, 68,
- 68, 68, 68, 68, 68, 35, 36, 68, 38, 68,
- 68, 68, 68, 68, 68, 68, 68, 68, 56, 68,
- 68, 68, 1, 3, 3, 5, 2, 69, 68, 7,
+ 68, 68, 68, 22, 13, 68, 68, 68, 68, 68,
+ 68, 68, 68, 68, 35, 36, 68, 38, 68, 68,
+ 68, 68, 68, 68, 68, 68, 68, 56, 68, 68,
+ 68, 0, 0, 1, 3, 3, 5, 2, 69, 68,
- 68, 68, 68, 68, 68, 68, 16, 68, 68, 68,
+ 7, 68, 68, 68, 68, 68, 68, 16, 68, 68,
0, 68, 68, 68, 68, 68, 68, 68, 31, 68,
68, 34, 68, 68, 68, 68, 44, 68, 46, 68,
- 68, 68, 68, 68, 68, 68, 68, 68, 68, 9,
- 68, 11, 12, 15, 0, 18, 68, 68, 0, 68,
+ 68, 68, 68, 68, 68, 68, 68, 0, 68, 68,
+ 9, 68, 11, 12, 15, 0, 18, 68, 0, 68,
68, 25, 26, 27, 28, 68, 68, 68, 33, 37,
40, 68, 68, 68, 68, 68, 48, 0, 55, 60,
- 68, 58, 62, 6, 68, 68, 0, 16, 68, 68,
+ 68, 58, 62, 0, 6, 68, 68, 0, 16, 68,
21, 68, 68, 29, 68, 32, 0, 68, 68, 68,
- 68, 68, 68, 54, 54, 54, 54, 61, 68, 8,
+ 68, 68, 68, 54, 54, 54, 54, 61, 68, 0,
- 68, 0, 16, 68, 19, 0, 68, 68, 68, 0,
+ 8, 68, 0, 16, 19, 0, 68, 68, 68, 0,
68, 68, 68, 45, 57, 47, 0, 0, 54, 54,
- 54, 59, 68, 14, 17, 0, 68, 68, 0, 30,
+ 54, 59, 0, 68, 14, 0, 68, 68, 0, 30,
0, 68, 68, 68, 0, 0, 0, 0, 54, 54,
- 54, 10, 0, 23, 68, 30, 30, 0, 68, 42,
- 43, 0, 0, 0, 54, 54, 54, 0, 68, 30,
- 0, 41, 0, 0, 0, 0, 0, 54, 0, 24,
- 39, 53, 52, 53, 0, 0, 0, 0, 0, 20,
- 0, 0, 0, 0, 49, 50, 51, 51, 0
+ 54, 0, 10, 0, 23, 68, 30, 30, 0, 68,
+ 42, 43, 0, 0, 0, 54, 54, 54, 17, 0,
+ 68, 30, 0, 41, 0, 0, 0, 0, 0, 54,
+ 0, 24, 39, 53, 52, 53, 0, 0, 0, 0,
+ 0, 20, 0, 0, 0, 0, 49, 50, 51, 51,
+ 0
+
} ;
static yyconst flex_int32_t yy_ec[256] =
@@ -419,18 +421,18 @@ static yyconst flex_int32_t yy_ec[256] =
15, 16, 1, 1, 17, 18, 19, 20, 21, 22,
23, 24, 25, 26, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 26,
- 8, 1, 8, 8, 41, 1, 42, 43, 44, 45,
+ 8, 1, 8, 41, 42, 1, 43, 44, 45, 46,
- 46, 47, 48, 49, 50, 26, 26, 51, 52, 53,
- 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
- 64, 26, 1, 1, 1, 1, 1, 1, 1, 1,
+ 47, 48, 49, 50, 51, 26, 26, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 26, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 65, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 66, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -440,189 +442,189 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst flex_int32_t yy_meta[66] =
+static yyconst flex_int32_t yy_meta[67] =
{ 0,
1, 2, 3, 3, 2, 1, 1, 1, 1, 1,
1, 1, 4, 1, 1, 1, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 6, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 1, 6, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 1
+ 5, 5, 5, 5, 5, 1
} ;
-static yyconst flex_int16_t yy_base[303] =
+static yyconst flex_int16_t yy_base[305] =
{ 0,
- 0, 64, 186, 760, 68, 760, 760, 72, 179, 0,
- 760, 161, 154, 55, 63, 760, 142, 58, 60, 58,
- 54, 62, 68, 63, 0, 87, 69, 109, 74, 114,
- 102, 75, 129, 128, 148, 94, 187, 191, 201, 760,
- 205, 99, 142, 760, 0, 760, 0, 114, 119, 760,
- 760, 760, 0, 65, 121, 132, 139, 89, 182, 110,
- 156, 162, 180, 183, 81, 0, 180, 179, 187, 187,
- 199, 186, 210, 183, 191, 0, 0, 202, 0, 211,
- 221, 198, 203, 201, 216, 212, 232, 240, 0, 243,
- 228, 239, 760, 274, 295, 0, 0, 79, 244, 0,
-
- 250, 248, 247, 248, 255, 264, 178, 253, 256, 274,
- 309, 260, 286, 273, 281, 278, 280, 279, 0, 293,
- 286, 0, 293, 283, 287, 295, 0, 308, 0, 305,
- 301, 308, 336, 313, 322, 307, 316, 318, 319, 0,
- 336, 0, 0, 362, 367, 0, 327, 345, 340, 346,
- 338, 0, 0, 0, 0, 344, 347, 358, 0, 0,
- 380, 355, 362, 367, 351, 355, 0, 391, 0, 0,
- 370, 367, 0, 0, 378, 377, 398, 0, 373, 380,
- 410, 382, 379, 0, 399, 0, 424, 401, 402, 400,
- 399, 415, 404, 445, 449, 458, 462, 0, 412, 0,
-
- 424, 447, 0, 433, 0, 473, 455, 455, 479, 449,
- 461, 447, 450, 0, 0, 0, 491, 468, 513, 520,
- 514, 0, 452, 760, 0, 475, 466, 498, 438, 0,
- 512, 510, 494, 493, 532, 518, 516, 514, 538, 556,
- 565, 0, 527, 0, 520, 0, 0, 531, 541, 0,
- 0, 537, 544, 546, 579, 580, 597, 548, 546, 0,
- 557, 0, 566, 603, 567, 604, 612, 617, 574, 0,
- 760, 760, 621, 760, 626, 588, 631, 594, 648, 760,
- 635, 643, 649, 599, 650, 657, 662, 667, 760, 707,
- 709, 712, 715, 721, 726, 731, 733, 738, 743, 746,
-
- 749, 754
+ 0, 65, 226, 758, 69, 758, 758, 73, 158, 0,
+ 758, 147, 138, 56, 64, 758, 127, 59, 61, 59,
+ 55, 63, 0, 64, 64, 70, 111, 75, 107, 110,
+ 76, 113, 129, 127, 165, 100, 186, 190, 194, 758,
+ 198, 171, 127, 758, 0, 758, 0, 98, 168, 758,
+ 758, 758, 0, 66, 163, 163, 169, 77, 176, 86,
+ 186, 182, 117, 82, 0, 181, 187, 175, 180, 198,
+ 184, 200, 183, 188, 0, 0, 203, 0, 208, 206,
+ 203, 211, 210, 216, 211, 228, 210, 0, 244, 223,
+ 226, 266, 249, 758, 273, 294, 0, 0, 85, 258,
+
+ 0, 251, 249, 250, 265, 261, 266, 216, 258, 276,
+ 298, 266, 281, 276, 287, 285, 284, 285, 0, 294,
+ 286, 0, 293, 283, 287, 294, 0, 306, 0, 305,
+ 299, 310, 338, 309, 317, 327, 332, 335, 326, 328,
+ 0, 338, 0, 0, 363, 368, 0, 347, 336, 354,
+ 341, 0, 0, 0, 0, 345, 346, 351, 0, 0,
+ 377, 358, 364, 370, 354, 358, 0, 400, 0, 0,
+ 374, 371, 0, 368, 0, 383, 381, 410, 0, 381,
+ 405, 387, 383, 0, 399, 0, 421, 405, 399, 398,
+ 403, 404, 405, 455, 465, 466, 475, 0, 418, 418,
+
+ 0, 420, 418, 0, 0, 479, 434, 457, 481, 454,
+ 469, 454, 456, 0, 0, 0, 491, 482, 495, 520,
+ 529, 0, 462, 465, 758, 474, 488, 491, 453, 0,
+ 502, 512, 479, 500, 539, 530, 526, 524, 550, 556,
+ 562, 503, 0, 533, 0, 522, 0, 0, 534, 536,
+ 0, 0, 535, 501, 543, 587, 597, 598, 758, 551,
+ 546, 0, 562, 0, 565, 588, 580, 609, 613, 615,
+ 585, 0, 758, 758, 619, 758, 626, 604, 632, 613,
+ 645, 758, 636, 644, 649, 618, 655, 665, 669, 680,
+ 758, 705, 707, 710, 713, 719, 724, 729, 731, 736,
+
+ 741, 744, 747, 752
} ;
-static yyconst flex_int16_t yy_def[303] =
+static yyconst flex_int16_t yy_def[305] =
{ 0,
- 289, 1, 289, 289, 289, 289, 289, 289, 290, 291,
- 289, 289, 289, 289, 289, 289, 289, 292, 292, 292,
- 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
- 292, 292, 292, 292, 292, 289, 289, 289, 289, 289,
- 289, 289, 290, 289, 293, 289, 294, 289, 289, 289,
- 289, 289, 292, 292, 292, 292, 292, 292, 292, 292,
- 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
- 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
- 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
- 292, 292, 289, 289, 289, 293, 294, 289, 292, 292,
-
- 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
- 289, 292, 292, 292, 292, 292, 292, 292, 292, 292,
- 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
- 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
- 292, 292, 292, 292, 295, 292, 292, 292, 289, 292,
- 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
- 292, 292, 292, 292, 292, 292, 292, 296, 292, 292,
- 292, 292, 292, 292, 292, 292, 289, 297, 292, 292,
- 289, 292, 292, 292, 292, 292, 289, 292, 292, 292,
- 292, 292, 292, 296, 296, 296, 296, 292, 292, 292,
-
- 292, 289, 297, 292, 292, 289, 292, 292, 298, 289,
- 292, 292, 292, 292, 292, 292, 289, 289, 296, 296,
- 296, 292, 292, 289, 292, 289, 292, 292, 299, 300,
- 289, 292, 292, 292, 289, 289, 289, 289, 296, 296,
- 296, 292, 289, 292, 292, 301, 300, 289, 292, 292,
- 292, 289, 289, 289, 296, 296, 296, 289, 292, 301,
- 289, 292, 289, 302, 289, 289, 289, 296, 289, 292,
- 289, 289, 302, 289, 289, 289, 289, 289, 289, 289,
- 289, 289, 289, 289, 302, 302, 289, 302, 0, 289,
- 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
-
- 289, 289
+ 291, 1, 291, 291, 291, 291, 291, 291, 292, 293,
+ 291, 291, 291, 291, 291, 291, 291, 294, 294, 294,
+ 294, 294, 294, 294, 294, 294, 294, 294, 294, 294,
+ 294, 294, 294, 294, 291, 291, 291, 291, 291, 291,
+ 291, 291, 292, 291, 295, 291, 296, 291, 291, 291,
+ 291, 291, 294, 294, 294, 294, 294, 294, 294, 294,
+ 294, 294, 294, 294, 294, 294, 294, 294, 294, 294,
+ 294, 294, 294, 294, 294, 294, 294, 294, 294, 294,
+ 294, 294, 294, 294, 294, 294, 294, 294, 294, 294,
+ 294, 291, 291, 291, 291, 291, 295, 296, 291, 294,
+
+ 294, 294, 294, 294, 294, 294, 294, 294, 294, 294,
+ 291, 294, 294, 294, 294, 294, 294, 294, 294, 294,
+ 294, 294, 294, 294, 294, 294, 294, 294, 294, 294,
+ 294, 294, 294, 294, 294, 294, 294, 291, 294, 294,
+ 294, 294, 294, 294, 294, 297, 294, 294, 291, 294,
+ 294, 294, 294, 294, 294, 294, 294, 294, 294, 294,
+ 294, 294, 294, 294, 294, 294, 294, 298, 294, 294,
+ 294, 294, 294, 291, 294, 294, 294, 291, 299, 294,
+ 291, 294, 294, 294, 294, 294, 291, 294, 294, 294,
+ 294, 294, 294, 298, 298, 298, 298, 294, 294, 291,
+
+ 294, 294, 291, 299, 294, 291, 294, 294, 300, 291,
+ 294, 294, 294, 294, 294, 294, 291, 291, 298, 298,
+ 298, 294, 291, 294, 291, 291, 294, 294, 301, 302,
+ 291, 294, 294, 294, 291, 291, 291, 291, 298, 298,
+ 298, 291, 294, 291, 294, 294, 303, 302, 291, 294,
+ 294, 294, 291, 291, 291, 298, 298, 298, 291, 291,
+ 294, 303, 291, 294, 291, 304, 291, 291, 291, 298,
+ 291, 294, 291, 291, 304, 291, 291, 291, 291, 291,
+ 291, 291, 291, 291, 291, 291, 304, 304, 291, 304,
+ 0, 291, 291, 291, 291, 291, 291, 291, 291, 291,
+
+ 291, 291, 291, 291
} ;
-static yyconst flex_int16_t yy_nxt[826] =
+static yyconst flex_int16_t yy_nxt[825] =
{ 0,
4, 5, 6, 7, 8, 9, 10, 11, 12, 11,
13, 4, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 23, 24, 25, 26, 25, 27, 28, 29, 30,
- 31, 25, 32, 33, 34, 25, 25, 35, 25, 25,
- 25, 18, 19, 20, 21, 22, 23, 24, 25, 26,
- 27, 28, 29, 30, 31, 25, 32, 33, 34, 25,
- 25, 35, 25, 25, 36, 37, 48, 49, 38, 39,
- 40, 40, 41, 41, 40, 40, 41, 50, 51, 54,
- 56, 57, 111, 59, 63, 111, 55, 58, 60, 64,
- 61, 98, 65, 69, 74, 83, 93, 93, 70, 99,
-
- 62, 93, 93, 75, 54, 56, 57, 59, 66, 63,
- 55, 58, 60, 64, 61, 67, 65, 103, 69, 74,
- 83, 68, 70, 99, 62, 71, 98, 75, 80, 72,
- 48, 49, 42, 66, 81, 76, 42, 82, 73, 67,
- 100, 103, 77, 106, 78, 68, 79, 44, 87, 84,
- 71, 88, 80, 101, 72, 102, 52, 89, 81, 85,
- 76, 82, 73, 86, 47, 100, 77, 106, 78, 46,
- 79, 90, 91, 87, 84, 107, 88, 92, 101, 145,
- 102, 89, 145, 85, 44, 289, 108, 86, 94, 40,
- 40, 95, 95, 40, 40, 95, 90, 91, 109, 114,
-
- 107, 92, 39, 40, 40, 41, 41, 40, 40, 41,
- 104, 108, 110, 112, 113, 115, 116, 117, 289, 105,
- 118, 121, 123, 109, 114, 122, 289, 124, 131, 119,
- 289, 289, 127, 128, 104, 129, 110, 112, 113, 115,
- 116, 125, 117, 105, 118, 121, 120, 123, 130, 122,
- 126, 42, 124, 131, 119, 42, 127, 128, 132, 129,
- 133, 289, 136, 134, 138, 42, 125, 135, 142, 42,
- 120, 137, 130, 289, 126, 94, 40, 40, 95, 139,
- 140, 141, 132, 143, 144, 133, 136, 146, 134, 138,
- 147, 148, 135, 142, 150, 137, 95, 40, 40, 95,
-
- 153, 154, 157, 139, 140, 141, 151, 143, 155, 144,
- 111, 146, 156, 111, 147, 152, 148, 158, 150, 289,
- 159, 160, 161, 162, 153, 163, 154, 157, 164, 165,
- 172, 151, 155, 166, 167, 173, 156, 168, 42, 152,
- 168, 170, 158, 149, 159, 160, 161, 162, 171, 163,
- 174, 175, 176, 164, 165, 172, 179, 166, 167, 42,
- 173, 180, 182, 177, 169, 170, 177, 149, 145, 181,
- 183, 145, 171, 184, 174, 175, 185, 176, 186, 189,
- 179, 187, 190, 191, 187, 192, 180, 182, 169, 193,
- 198, 199, 168, 181, 183, 168, 188, 184, 200, 177,
-
- 185, 201, 177, 186, 189, 204, 205, 190, 191, 192,
- 207, 206, 208, 193, 206, 198, 199, 195, 209, 211,
- 289, 188, 202, 200, 196, 187, 201, 197, 187, 204,
- 205, 212, 213, 214, 207, 215, 208, 216, 289, 229,
- 222, 195, 229, 209, 211, 210, 217, 202, 196, 217,
- 217, 197, 223, 217, 218, 212, 213, 214, 218, 217,
- 215, 216, 217, 217, 222, 219, 217, 218, 224, 289,
- 210, 218, 225, 227, 206, 228, 223, 206, 221, 232,
- 229, 231, 233, 229, 234, 242, 244, 236, 289, 220,
- 219, 53, 235, 224, 226, 235, 225, 289, 227, 289,
-
- 228, 289, 238, 221, 232, 231, 233, 243, 234, 242,
- 236, 244, 236, 220, 217, 217, 245, 217, 217, 226,
- 237, 217, 218, 218, 217, 238, 238, 250, 248, 218,
- 249, 243, 251, 235, 252, 236, 235, 253, 254, 217,
- 241, 245, 217, 258, 237, 264, 239, 218, 264, 238,
- 289, 250, 240, 248, 259, 249, 251, 217, 261, 252,
- 217, 237, 253, 254, 241, 218, 217, 262, 258, 217,
- 239, 263, 255, 265, 218, 269, 240, 271, 259, 270,
- 266, 267, 261, 266, 267, 237, 272, 274, 218, 218,
- 256, 262, 289, 289, 280, 263, 255, 265, 217, 269,
-
- 257, 217, 271, 270, 264, 275, 218, 264, 275, 281,
- 289, 272, 274, 277, 256, 282, 277, 268, 279, 280,
- 287, 279, 289, 236, 257, 289, 218, 275, 289, 289,
- 275, 236, 277, 276, 281, 277, 285, 289, 238, 285,
- 282, 278, 268, 289, 286, 287, 238, 286, 236, 283,
- 283, 285, 283, 283, 285, 276, 236, 276, 286, 289,
- 278, 286, 238, 288, 289, 278, 288, 236, 288, 289,
- 238, 288, 289, 289, 289, 289, 289, 284, 284, 276,
- 289, 289, 238, 289, 278, 289, 289, 289, 289, 289,
- 289, 289, 236, 289, 289, 289, 289, 289, 289, 289,
-
- 289, 284, 284, 289, 289, 289, 238, 43, 43, 289,
- 43, 43, 43, 45, 45, 53, 53, 53, 96, 96,
- 96, 97, 97, 289, 97, 97, 97, 178, 289, 289,
- 178, 178, 194, 289, 289, 194, 203, 203, 203, 230,
- 289, 230, 230, 230, 246, 289, 289, 246, 246, 247,
- 247, 247, 260, 260, 260, 273, 289, 289, 273, 3,
- 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
- 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
- 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
- 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
-
- 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
- 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
- 289, 289, 289, 289, 289
+ 22, 23, 24, 23, 25, 23, 26, 27, 28, 29,
+ 30, 23, 31, 32, 33, 23, 23, 34, 23, 23,
+ 35, 23, 18, 19, 20, 21, 22, 23, 24, 23,
+ 25, 26, 27, 28, 29, 30, 23, 31, 32, 33,
+ 23, 23, 34, 23, 23, 36, 37, 48, 49, 38,
+ 39, 40, 40, 41, 41, 40, 40, 41, 50, 51,
+ 54, 56, 57, 111, 59, 65, 111, 55, 58, 60,
+ 63, 61, 66, 64, 68, 73, 82, 99, 67, 69,
+
+ 100, 62, 94, 94, 74, 104, 54, 56, 57, 59,
+ 99, 65, 55, 58, 60, 63, 61, 66, 64, 107,
+ 68, 73, 82, 67, 69, 100, 62, 70, 75, 74,
+ 104, 71, 44, 83, 42, 76, 79, 77, 42, 78,
+ 72, 52, 80, 84, 107, 81, 110, 85, 47, 86,
+ 89, 90, 87, 70, 75, 46, 91, 71, 88, 83,
+ 76, 79, 77, 44, 78, 72, 92, 80, 84, 92,
+ 81, 110, 85, 94, 94, 86, 89, 90, 87, 48,
+ 49, 91, 101, 88, 102, 103, 93, 95, 40, 40,
+ 96, 96, 40, 40, 96, 39, 40, 40, 41, 41,
+
+ 40, 40, 41, 115, 105, 108, 109, 114, 101, 116,
+ 102, 103, 93, 106, 112, 113, 117, 146, 118, 119,
+ 146, 121, 122, 123, 124, 291, 125, 131, 115, 105,
+ 133, 108, 109, 114, 116, 126, 120, 127, 106, 112,
+ 113, 128, 117, 118, 129, 119, 121, 122, 130, 123,
+ 124, 42, 125, 131, 132, 42, 133, 136, 137, 42,
+ 126, 120, 127, 42, 134, 138, 128, 92, 135, 129,
+ 92, 291, 291, 130, 95, 40, 40, 96, 139, 132,
+ 140, 141, 136, 137, 142, 143, 145, 93, 291, 144,
+ 134, 138, 147, 148, 135, 96, 40, 40, 96, 111,
+
+ 150, 151, 111, 153, 139, 140, 141, 154, 157, 142,
+ 152, 143, 145, 93, 144, 155, 156, 147, 158, 148,
+ 159, 160, 161, 162, 163, 150, 164, 151, 153, 165,
+ 291, 166, 149, 154, 157, 152, 167, 170, 42, 168,
+ 155, 156, 168, 171, 158, 159, 160, 161, 162, 163,
+ 172, 173, 164, 174, 177, 165, 166, 149, 175, 42,
+ 176, 167, 170, 180, 178, 181, 169, 178, 171, 146,
+ 182, 186, 146, 183, 184, 185, 172, 173, 187, 174,
+ 177, 187, 189, 175, 190, 176, 191, 291, 192, 180,
+ 181, 169, 193, 188, 198, 199, 182, 186, 183, 184,
+
+ 185, 168, 200, 201, 168, 202, 206, 205, 189, 206,
+ 190, 178, 191, 192, 178, 207, 208, 193, 209, 188,
+ 198, 199, 187, 211, 215, 187, 195, 200, 212, 201,
+ 213, 202, 205, 196, 203, 291, 197, 214, 216, 225,
+ 207, 208, 210, 291, 209, 291, 222, 223, 224, 211,
+ 215, 195, 227, 212, 229, 213, 217, 229, 196, 217,
+ 203, 197, 214, 216, 218, 225, 217, 217, 210, 217,
+ 217, 222, 223, 224, 218, 218, 217, 228, 227, 217,
+ 206, 219, 229, 206, 218, 229, 231, 232, 291, 233,
+ 234, 221, 235, 53, 242, 235, 217, 220, 243, 217,
+
+ 226, 236, 266, 228, 218, 266, 244, 219, 245, 246,
+ 236, 231, 251, 232, 233, 234, 238, 221, 249, 242,
+ 237, 217, 220, 243, 217, 238, 226, 236, 239, 218,
+ 217, 244, 250, 217, 245, 246, 236, 251, 218, 252,
+ 235, 238, 259, 235, 249, 237, 253, 254, 255, 260,
+ 238, 217, 240, 239, 217, 241, 261, 217, 250, 218,
+ 217, 263, 264, 217, 252, 218, 217, 259, 237, 265,
+ 267, 218, 253, 254, 255, 260, 291, 240, 271, 272,
+ 241, 261, 273, 291, 256, 274, 263, 264, 268, 266,
+ 257, 268, 266, 237, 265, 267, 218, 258, 269, 217,
+
+ 276, 269, 217, 271, 272, 282, 218, 218, 273, 256,
+ 277, 274, 291, 277, 279, 257, 281, 279, 270, 281,
+ 291, 291, 258, 291, 218, 283, 276, 277, 236, 291,
+ 277, 282, 236, 279, 284, 291, 279, 287, 278, 289,
+ 287, 291, 280, 238, 270, 288, 285, 238, 288, 285,
+ 285, 283, 291, 285, 236, 278, 287, 291, 236, 287,
+ 284, 280, 291, 278, 236, 289, 288, 280, 238, 288,
+ 290, 291, 238, 290, 286, 291, 291, 291, 286, 238,
+ 278, 290, 291, 291, 290, 291, 280, 291, 291, 291,
+ 236, 291, 291, 291, 291, 291, 291, 291, 291, 286,
+
+ 291, 291, 291, 286, 238, 43, 43, 291, 43, 43,
+ 43, 45, 45, 53, 53, 53, 97, 97, 97, 98,
+ 98, 291, 98, 98, 98, 179, 291, 291, 179, 179,
+ 194, 291, 291, 194, 204, 204, 204, 230, 291, 230,
+ 230, 230, 247, 291, 291, 247, 247, 248, 248, 248,
+ 262, 262, 262, 275, 291, 291, 275, 3, 291, 291,
+ 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
+ 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
+ 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
+ 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
+
+ 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
+ 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
+ 291, 291, 291, 291
} ;
-static yyconst flex_int16_t yy_chk[826] =
+static yyconst flex_int16_t yy_chk[825] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -630,91 +632,91 @@ static yyconst flex_int16_t yy_chk[826] =
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 2, 14, 14, 2, 5,
- 5, 5, 5, 8, 8, 8, 8, 15, 15, 18,
- 19, 20, 65, 21, 23, 65, 18, 20, 22, 24,
- 22, 98, 24, 27, 29, 32, 36, 36, 27, 54,
-
- 22, 42, 42, 29, 18, 19, 20, 21, 26, 23,
- 18, 20, 22, 24, 22, 26, 24, 58, 27, 29,
- 32, 26, 27, 54, 22, 28, 48, 29, 31, 28,
- 49, 49, 5, 26, 31, 30, 8, 31, 28, 26,
- 55, 58, 30, 60, 30, 26, 30, 43, 34, 33,
- 28, 34, 31, 56, 28, 57, 17, 34, 31, 33,
- 30, 31, 28, 33, 13, 55, 30, 60, 30, 12,
- 30, 35, 35, 34, 33, 61, 34, 35, 56, 107,
- 57, 34, 107, 33, 9, 3, 62, 33, 37, 37,
- 37, 37, 38, 38, 38, 38, 35, 35, 63, 68,
-
- 61, 35, 39, 39, 39, 39, 41, 41, 41, 41,
- 59, 62, 64, 67, 67, 69, 70, 71, 0, 59,
- 72, 74, 78, 63, 68, 75, 0, 80, 86, 73,
- 0, 0, 82, 83, 59, 84, 64, 67, 67, 69,
- 70, 81, 71, 59, 72, 74, 73, 78, 85, 75,
- 81, 37, 80, 86, 73, 38, 82, 83, 87, 84,
- 88, 0, 91, 90, 99, 39, 81, 90, 104, 41,
- 73, 92, 85, 0, 81, 94, 94, 94, 94, 101,
- 102, 103, 87, 105, 106, 88, 91, 108, 90, 99,
- 109, 110, 90, 104, 112, 92, 95, 95, 95, 95,
-
- 114, 115, 118, 101, 102, 103, 113, 105, 116, 106,
- 111, 108, 117, 111, 109, 113, 110, 120, 112, 0,
- 121, 123, 124, 125, 114, 126, 115, 118, 128, 130,
- 136, 113, 116, 131, 132, 137, 117, 133, 94, 113,
- 133, 134, 120, 111, 121, 123, 124, 125, 135, 126,
- 138, 139, 141, 128, 130, 136, 147, 131, 132, 95,
- 137, 148, 150, 144, 133, 134, 144, 111, 145, 149,
- 151, 145, 135, 156, 138, 139, 157, 141, 158, 162,
- 147, 161, 163, 164, 161, 165, 148, 150, 133, 166,
- 171, 172, 168, 149, 151, 168, 161, 156, 175, 177,
-
- 157, 176, 177, 158, 162, 179, 180, 163, 164, 165,
- 182, 181, 183, 166, 181, 171, 172, 168, 185, 188,
- 0, 161, 177, 175, 168, 187, 176, 168, 187, 179,
- 180, 189, 190, 191, 182, 192, 183, 193, 0, 229,
- 199, 168, 229, 185, 188, 187, 194, 177, 168, 194,
- 195, 168, 201, 195, 194, 189, 190, 191, 195, 196,
- 192, 193, 196, 197, 199, 195, 197, 196, 202, 0,
- 187, 197, 204, 207, 206, 208, 201, 206, 197, 211,
- 209, 210, 212, 209, 213, 223, 227, 218, 0, 196,
- 195, 209, 217, 202, 206, 217, 204, 0, 207, 0,
-
- 208, 0, 218, 197, 211, 210, 212, 226, 213, 223,
- 217, 227, 218, 196, 219, 221, 228, 219, 221, 206,
- 217, 220, 219, 221, 220, 217, 218, 233, 231, 220,
- 232, 226, 234, 235, 236, 217, 235, 237, 238, 239,
- 221, 228, 239, 243, 217, 253, 219, 239, 253, 217,
- 0, 233, 220, 231, 245, 232, 234, 240, 248, 236,
- 240, 235, 237, 238, 221, 240, 241, 249, 243, 241,
- 219, 252, 239, 254, 241, 258, 220, 261, 245, 259,
- 255, 256, 248, 255, 256, 235, 263, 265, 255, 256,
- 240, 249, 0, 0, 269, 252, 239, 254, 257, 258,
-
- 241, 257, 261, 259, 264, 266, 257, 264, 266, 276,
- 0, 263, 265, 267, 240, 278, 267, 257, 268, 269,
- 284, 268, 273, 266, 241, 273, 268, 275, 0, 0,
- 275, 267, 277, 266, 276, 277, 281, 0, 266, 281,
- 278, 267, 257, 0, 282, 284, 267, 282, 266, 279,
- 283, 285, 279, 283, 285, 275, 267, 266, 286, 0,
- 277, 286, 266, 287, 0, 267, 287, 279, 288, 0,
- 267, 288, 0, 0, 0, 0, 0, 279, 283, 275,
- 0, 0, 279, 0, 277, 0, 0, 0, 0, 0,
- 0, 0, 279, 0, 0, 0, 0, 0, 0, 0,
-
- 0, 279, 283, 0, 0, 0, 279, 290, 290, 0,
- 290, 290, 290, 291, 291, 292, 292, 292, 293, 293,
- 293, 294, 294, 0, 294, 294, 294, 295, 0, 0,
- 295, 295, 296, 0, 0, 296, 297, 297, 297, 298,
- 0, 298, 298, 298, 299, 0, 0, 299, 299, 300,
- 300, 300, 301, 301, 301, 302, 0, 0, 302, 289,
- 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
- 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
- 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
- 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
-
- 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
- 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
- 289, 289, 289, 289, 289
+ 1, 1, 1, 1, 1, 1, 2, 14, 14, 2,
+ 5, 5, 5, 5, 8, 8, 8, 8, 15, 15,
+ 18, 19, 20, 64, 21, 25, 64, 18, 20, 22,
+ 24, 22, 25, 24, 26, 28, 31, 99, 25, 26,
+
+ 54, 22, 36, 36, 28, 58, 18, 19, 20, 21,
+ 48, 25, 18, 20, 22, 24, 22, 25, 24, 60,
+ 26, 28, 31, 25, 26, 54, 22, 27, 29, 28,
+ 58, 27, 43, 32, 5, 29, 30, 29, 8, 29,
+ 27, 17, 30, 32, 60, 30, 63, 32, 13, 33,
+ 34, 34, 33, 27, 29, 12, 34, 27, 33, 32,
+ 29, 30, 29, 9, 29, 27, 35, 30, 32, 35,
+ 30, 63, 32, 42, 42, 33, 34, 34, 33, 49,
+ 49, 34, 55, 33, 56, 57, 35, 37, 37, 37,
+ 37, 38, 38, 38, 38, 39, 39, 39, 39, 41,
+
+ 41, 41, 41, 68, 59, 61, 62, 67, 55, 69,
+ 56, 57, 35, 59, 66, 66, 70, 108, 71, 72,
+ 108, 73, 74, 77, 79, 3, 80, 85, 68, 59,
+ 87, 61, 62, 67, 69, 80, 72, 81, 59, 66,
+ 66, 82, 70, 71, 83, 72, 73, 74, 84, 77,
+ 79, 37, 80, 85, 86, 38, 87, 90, 91, 39,
+ 80, 72, 81, 41, 89, 93, 82, 92, 89, 83,
+ 92, 0, 0, 84, 95, 95, 95, 95, 100, 86,
+ 102, 103, 90, 91, 104, 105, 107, 92, 0, 106,
+ 89, 93, 109, 110, 89, 96, 96, 96, 96, 111,
+
+ 112, 113, 111, 114, 100, 102, 103, 115, 118, 104,
+ 113, 105, 107, 92, 106, 116, 117, 109, 120, 110,
+ 121, 123, 124, 125, 126, 112, 128, 113, 114, 130,
+ 0, 131, 111, 115, 118, 113, 132, 134, 95, 133,
+ 116, 117, 133, 135, 120, 121, 123, 124, 125, 126,
+ 136, 137, 128, 138, 142, 130, 131, 111, 139, 96,
+ 140, 132, 134, 148, 145, 149, 133, 145, 135, 146,
+ 150, 158, 146, 151, 156, 157, 136, 137, 161, 138,
+ 142, 161, 162, 139, 163, 140, 164, 0, 165, 148,
+ 149, 133, 166, 161, 171, 172, 150, 158, 151, 156,
+
+ 157, 168, 174, 176, 168, 177, 181, 180, 162, 181,
+ 163, 178, 164, 165, 178, 182, 183, 166, 185, 161,
+ 171, 172, 187, 188, 192, 187, 168, 174, 189, 176,
+ 190, 177, 180, 168, 178, 0, 168, 191, 193, 203,
+ 182, 183, 187, 0, 185, 0, 199, 200, 202, 188,
+ 192, 168, 207, 189, 229, 190, 194, 229, 168, 194,
+ 178, 168, 191, 193, 194, 203, 195, 196, 187, 195,
+ 196, 199, 200, 202, 195, 196, 197, 208, 207, 197,
+ 206, 195, 209, 206, 197, 209, 210, 211, 0, 212,
+ 213, 197, 217, 209, 223, 217, 219, 196, 224, 219,
+
+ 206, 218, 254, 208, 219, 254, 226, 195, 227, 228,
+ 217, 210, 233, 211, 212, 213, 218, 197, 231, 223,
+ 217, 220, 196, 224, 220, 217, 206, 218, 219, 220,
+ 221, 226, 232, 221, 227, 228, 217, 233, 221, 234,
+ 235, 218, 242, 235, 231, 217, 236, 237, 238, 244,
+ 217, 239, 220, 219, 239, 221, 246, 240, 232, 239,
+ 240, 249, 250, 241, 234, 240, 241, 242, 235, 253,
+ 255, 241, 236, 237, 238, 244, 0, 220, 260, 261,
+ 221, 246, 263, 0, 239, 265, 249, 250, 256, 266,
+ 240, 256, 266, 235, 253, 255, 256, 241, 257, 258,
+
+ 267, 257, 258, 260, 261, 271, 257, 258, 263, 239,
+ 268, 265, 0, 268, 269, 240, 270, 269, 258, 270,
+ 275, 0, 241, 275, 270, 278, 267, 277, 268, 0,
+ 277, 271, 269, 279, 280, 0, 279, 283, 268, 286,
+ 283, 0, 269, 268, 258, 284, 281, 269, 284, 281,
+ 285, 278, 0, 285, 268, 277, 287, 0, 269, 287,
+ 280, 279, 0, 268, 281, 286, 288, 269, 268, 288,
+ 289, 0, 269, 289, 281, 0, 0, 0, 285, 281,
+ 277, 290, 0, 0, 290, 0, 279, 0, 0, 0,
+ 281, 0, 0, 0, 0, 0, 0, 0, 0, 281,
+
+ 0, 0, 0, 285, 281, 292, 292, 0, 292, 292,
+ 292, 293, 293, 294, 294, 294, 295, 295, 295, 296,
+ 296, 0, 296, 296, 296, 297, 0, 0, 297, 297,
+ 298, 0, 0, 298, 299, 299, 299, 300, 0, 300,
+ 300, 300, 301, 0, 0, 301, 301, 302, 302, 302,
+ 303, 303, 303, 304, 0, 0, 304, 291, 291, 291,
+ 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
+ 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
+ 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
+ 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
+
+ 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
+ 291, 291, 291, 291, 291, 291, 291, 291, 291, 291,
+ 291, 291, 291, 291
} ;
static yy_state_type yy_last_accepting_state;
@@ -803,7 +805,7 @@ static int checkImmediate(int token) {
return token;
}
-#line 807 "engines/director/lingo/lingo-lex.cpp"
+#line 809 "engines/director/lingo/lingo-lex.cpp"
#define INITIAL 0
@@ -989,7 +991,7 @@ YY_DECL
#line 87 "engines/director/lingo/lingo-lex.l"
-#line 993 "engines/director/lingo/lingo-lex.cpp"
+#line 995 "engines/director/lingo/lingo-lex.cpp"
if ( !(yy_init) )
{
@@ -1043,13 +1045,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 >= 290 )
+ if ( yy_current_state >= 292 )
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_current_state != 289 );
+ while ( yy_current_state != 291 );
yy_cp = (yy_last_accepting_cpos);
yy_current_state = (yy_last_accepting_state);
@@ -1646,7 +1648,7 @@ YY_RULE_SETUP
#line 368 "engines/director/lingo/lingo-lex.l"
ECHO;
YY_BREAK
-#line 1650 "engines/director/lingo/lingo-lex.cpp"
+#line 1652 "engines/director/lingo/lingo-lex.cpp"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1940,7 +1942,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 >= 290 )
+ if ( yy_current_state >= 292 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1968,11 +1970,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 >= 290 )
+ if ( yy_current_state >= 292 )
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 == 289);
+ yy_is_jam = (yy_current_state == 291);
return yy_is_jam ? 0 : yy_current_state;
}
diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l
index 16e26526d4..d9dbc36dd1 100644
--- a/engines/director/lingo/lingo-lex.l
+++ b/engines/director/lingo/lingo-lex.l
@@ -121,7 +121,7 @@ whitespace [\t ]
return ENDCLAUSE;
}
-(?i:factory) { count(); return tFACTORY; }
+(?i:^[ \t]*factory) { count(); return tFACTORY; }
(?i:exit) { count(); return tEXIT; }
(?i:global) { count(); return tGLOBAL; }
(?i:go[\t ]+to[\t ]+frame) { count(); return tGO; }
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index 3deb44e830..2c218b8dfe 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -429,6 +429,7 @@ public:
static void b_setProp(int nargs);
static void b_sort(int nargs);
+ static void b_factoryP(int nargs);
static void b_floatP(int nargs);
static void b_ilk(int nargs);
static void b_integerp(int nargs);