aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2017-01-10 18:58:37 +0100
committerEugene Sandulenko2017-01-10 18:58:37 +0100
commit0e58b35c672c2416d818ca8a7bd388432b01be3d (patch)
tree411133e9bce12692b9de4920a7f3a8963cdf84f4 /engines
parentaf2a917ab27481a5383922c25a8e66fd4add4ce8 (diff)
downloadscummvm-rg350-0e58b35c672c2416d818ca8a7bd388432b01be3d.tar.gz
scummvm-rg350-0e58b35c672c2416d818ca8a7bd388432b01be3d.tar.bz2
scummvm-rg350-0e58b35c672c2416d818ca8a7bd388432b01be3d.zip
DIRECTOR: Lingo: Implemented stub for 'the time' entity
Diffstat (limited to 'engines')
-rw-r--r--engines/director/lingo/lingo-lex.cpp304
-rw-r--r--engines/director/lingo/lingo-lex.l15
-rw-r--r--engines/director/lingo/lingo-the.cpp6
-rw-r--r--engines/director/lingo/lingo-the.h1
-rw-r--r--engines/director/lingo/tests/the.lingo2
5 files changed, 171 insertions, 157 deletions
diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp
index 7745d9f1b5..65df2a29b9 100644
--- a/engines/director/lingo/lingo-lex.cpp
+++ b/engines/director/lingo/lingo-lex.cpp
@@ -373,7 +373,7 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[248] =
+static yyconst flex_int16_t yy_accept[252] =
{ 0,
0, 0, 70, 68, 3, 66, 66, 68, 68, 68,
65, 65, 65, 64, 65, 65, 62, 62, 62, 62,
@@ -399,9 +399,10 @@ static yyconst flex_int16_t yy_accept[248] =
0, 7, 62, 16, 62, 20, 62, 62, 30, 62,
42, 52, 45, 0, 0, 49, 54, 0, 62, 17,
- 62, 62, 62, 0, 0, 0, 49, 13, 9, 23,
- 62, 40, 0, 0, 49, 62, 0, 0, 0, 24,
- 48, 47, 0, 0, 0, 46, 0
+ 62, 62, 62, 0, 0, 0, 0, 49, 13, 9,
+ 23, 62, 40, 0, 0, 0, 49, 62, 0, 0,
+ 0, 0, 24, 48, 47, 48, 0, 0, 0, 46,
+ 0
} ;
static yyconst flex_int32_t yy_ec[256] =
@@ -447,14 +448,14 @@ static yyconst flex_int32_t yy_meta[65] =
5, 5, 5, 5
} ;
-static yyconst flex_int16_t yy_base[259] =
+static yyconst flex_int16_t yy_base[263] =
{ 0,
- 0, 63, 187, 637, 67, 71, 75, 79, 168, 0,
- 637, 151, 148, 54, 70, 122, 65, 67, 65, 61,
+ 0, 63, 187, 644, 67, 71, 75, 79, 168, 0,
+ 644, 151, 148, 54, 70, 122, 65, 67, 65, 61,
71, 87, 72, 0, 103, 81, 119, 109, 135, 118,
- 82, 149, 118, 161, 194, 214, 218, 637, 222, 207,
- 227, 82, 99, 637, 0, 637, 0, 88, 95, 637,
- 637, 637, 0, 112, 96, 105, 141, 124, 204, 142,
+ 82, 149, 118, 161, 194, 214, 218, 644, 222, 207,
+ 227, 82, 99, 644, 0, 644, 0, 88, 95, 644,
+ 644, 644, 0, 112, 96, 105, 141, 124, 204, 142,
161, 164, 194, 217, 206, 88, 0, 205, 216, 212,
213, 225, 211, 231, 208, 215, 0, 0, 231, 0,
237, 234, 223, 230, 237, 239, 245, 239, 262, 0,
@@ -468,50 +469,52 @@ static yyconst flex_int16_t yy_base[259] =
368, 373, 362, 377, 363, 0, 0, 0, 0, 367,
368, 378, 0, 0, 0, 376, 385, 385, 372, 374,
408, 0, 0, 397, 398, 0, 200, 0, 404, 403,
- 0, 0, 399, 0, 407, 637, 406, 402, 0, 409,
+ 0, 0, 399, 0, 407, 644, 406, 402, 0, 409,
0, 407, 403, 0, 418, 407, 442, 465, 0, 416,
466, 0, 420, 0, 415, 0, 432, 436, 0, 427,
- 0, 0, 0, 472, 458, 478, 0, 459, 438, 0,
- 463, 466, 455, 488, 477, 473, 502, 637, 0, 0,
- 463, 0, 464, 288, 522, 467, 484, 526, 534, 0,
- 637, 536, 538, 486, 542, 543, 637, 592, 594, 597,
- 600, 606, 611, 616, 619, 624, 626, 631
+ 0, 0, 0, 472, 460, 476, 0, 461, 438, 0,
+ 464, 469, 456, 498, 476, 476, 474, 510, 644, 0,
+ 0, 466, 0, 471, 288, 483, 527, 488, 513, 534,
+ 517, 538, 0, 644, 539, 644, 545, 520, 546, 551,
+ 644, 599, 601, 604, 607, 613, 618, 623, 626, 631,
+ 633, 638
} ;
-static yyconst flex_int16_t yy_def[259] =
+static yyconst flex_int16_t yy_def[263] =
{ 0,
- 247, 1, 247, 247, 247, 247, 247, 247, 248, 249,
- 247, 247, 247, 247, 247, 247, 250, 250, 250, 250,
- 250, 250, 250, 250, 250, 250, 250, 250, 250, 250,
- 250, 250, 250, 250, 247, 247, 247, 247, 247, 247,
- 247, 247, 248, 247, 251, 247, 252, 247, 247, 247,
- 247, 247, 250, 250, 250, 250, 250, 250, 250, 250,
- 250, 250, 250, 250, 250, 250, 250, 250, 250, 250,
- 250, 250, 250, 250, 250, 250, 250, 250, 250, 250,
- 250, 250, 250, 250, 250, 250, 250, 250, 250, 250,
- 250, 250, 250, 247, 247, 247, 251, 252, 247, 250,
-
- 250, 250, 250, 250, 250, 250, 250, 253, 250, 250,
- 250, 250, 247, 250, 250, 250, 250, 250, 250, 250,
- 250, 250, 250, 250, 250, 250, 250, 250, 250, 250,
- 250, 250, 250, 250, 250, 250, 250, 250, 247, 250,
- 250, 250, 250, 250, 250, 250, 254, 255, 250, 250,
- 250, 250, 247, 250, 250, 250, 250, 250, 250, 250,
- 250, 250, 250, 250, 250, 250, 250, 250, 250, 250,
- 256, 250, 250, 250, 250, 250, 247, 250, 250, 250,
- 257, 255, 250, 250, 250, 247, 250, 250, 250, 250,
- 250, 250, 250, 250, 250, 250, 256, 256, 250, 250,
-
- 247, 250, 250, 257, 250, 250, 250, 250, 250, 250,
- 250, 250, 250, 247, 247, 256, 250, 247, 250, 250,
- 250, 250, 250, 247, 247, 247, 256, 247, 250, 250,
- 250, 250, 247, 247, 256, 250, 247, 258, 247, 250,
- 247, 258, 247, 247, 247, 258, 0, 247, 247, 247,
- 247, 247, 247, 247, 247, 247, 247, 247
+ 251, 1, 251, 251, 251, 251, 251, 251, 252, 253,
+ 251, 251, 251, 251, 251, 251, 254, 254, 254, 254,
+ 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
+ 254, 254, 254, 254, 251, 251, 251, 251, 251, 251,
+ 251, 251, 252, 251, 255, 251, 256, 251, 251, 251,
+ 251, 251, 254, 254, 254, 254, 254, 254, 254, 254,
+ 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
+ 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
+ 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
+ 254, 254, 254, 251, 251, 251, 255, 256, 251, 254,
+
+ 254, 254, 254, 254, 254, 254, 254, 257, 254, 254,
+ 254, 254, 251, 254, 254, 254, 254, 254, 254, 254,
+ 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
+ 254, 254, 254, 254, 254, 254, 254, 254, 251, 254,
+ 254, 254, 254, 254, 254, 254, 258, 259, 254, 254,
+ 254, 254, 251, 254, 254, 254, 254, 254, 254, 254,
+ 254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
+ 260, 254, 254, 254, 254, 254, 251, 254, 254, 254,
+ 261, 259, 254, 254, 254, 251, 254, 254, 254, 254,
+ 254, 254, 254, 254, 254, 254, 260, 260, 254, 254,
+
+ 251, 254, 254, 261, 254, 254, 254, 254, 254, 254,
+ 254, 254, 254, 251, 251, 260, 254, 251, 254, 254,
+ 254, 254, 254, 251, 251, 251, 251, 260, 251, 254,
+ 254, 254, 254, 251, 251, 251, 260, 254, 251, 262,
+ 251, 251, 254, 251, 262, 251, 251, 251, 251, 262,
+ 0, 251, 251, 251, 251, 251, 251, 251, 251, 251,
+ 251, 251
} ;
-static yyconst flex_int16_t yy_nxt[702] =
+static yyconst flex_int16_t yy_nxt[709] =
{ 0,
4, 5, 6, 7, 8, 9, 10, 11, 12, 11,
13, 4, 14, 15, 11, 16, 17, 18, 19, 20,
@@ -532,68 +535,68 @@ static yyconst flex_int16_t yy_nxt[702] =
82, 102, 104, 83, 75, 68, 77, 103, 47, 46,
72, 69, 76, 78, 73, 79, 89, 80, 81, 85,
100, 90, 74, 44, 82, 107, 104, 83, 86, 87,
- 108, 77, 103, 88, 91, 92, 247, 78, 109, 79,
- 93, 80, 247, 247, 85, 94, 38, 38, 95, 107,
+ 108, 77, 103, 88, 91, 92, 251, 78, 109, 79,
+ 93, 80, 251, 251, 85, 94, 38, 38, 95, 107,
- 247, 201, 86, 87, 201, 108, 247, 88, 40, 91,
+ 251, 201, 86, 87, 201, 108, 251, 88, 40, 91,
92, 40, 110, 109, 93, 95, 38, 38, 95, 37,
38, 38, 39, 39, 38, 38, 39, 42, 40, 41,
- 41, 40, 105, 111, 247, 112, 116, 110, 114, 115,
- 117, 106, 118, 119, 247, 120, 123, 42, 247, 124,
+ 41, 40, 105, 111, 251, 112, 116, 110, 114, 115,
+ 117, 106, 118, 119, 251, 120, 123, 42, 251, 124,
121, 125, 42, 126, 127, 133, 105, 128, 111, 112,
129, 116, 114, 115, 117, 106, 118, 122, 119, 120,
123, 130, 42, 124, 131, 121, 125, 132, 126, 127,
- 133, 128, 134, 135, 129, 137, 138, 136, 247, 238,
- 247, 122, 238, 139, 140, 130, 141, 142, 131, 143,
+ 133, 128, 134, 135, 129, 137, 138, 136, 251, 240,
+ 251, 122, 240, 139, 140, 130, 141, 142, 131, 143,
144, 132, 94, 38, 38, 95, 145, 134, 135, 137,
138, 146, 136, 95, 38, 38, 95, 139, 149, 140,
141, 142, 150, 143, 147, 144, 151, 147, 152, 113,
- 145, 154, 113, 157, 155, 53, 146, 159, 158, 247,
+ 145, 154, 113, 157, 155, 53, 146, 159, 158, 251,
160, 161, 149, 156, 162, 167, 150, 163, 164, 165,
151, 166, 168, 152, 169, 154, 170, 157, 173, 155,
174, 159, 153, 158, 160, 171, 161, 156, 171, 162,
167, 163, 164, 165, 175, 166, 168, 176, 177, 169,
170, 178, 173, 179, 174, 180, 153, 183, 184, 185,
- 247, 186, 172, 187, 247, 188, 189, 190, 191, 175,
+ 251, 186, 172, 187, 251, 188, 189, 190, 191, 175,
192, 193, 176, 177, 194, 178, 195, 179, 196, 171,
180, 183, 171, 184, 185, 186, 172, 199, 187, 188,
189, 190, 200, 191, 202, 192, 193, 203, 209, 194,
- 195, 205, 196, 206, 207, 208, 210, 211, 212, 247,
- 213, 198, 199, 214, 217, 247, 214, 200, 219, 202,
+ 195, 205, 196, 206, 207, 208, 210, 211, 212, 251,
+ 213, 198, 199, 214, 217, 251, 214, 200, 219, 202,
221, 215, 203, 209, 220, 205, 222, 206, 207, 208,
210, 211, 223, 212, 213, 198, 214, 201, 217, 214,
- 201, 229, 219, 224, 215, 221, 224, 225, 220, 214,
- 228, 222, 214, 230, 231, 247, 223, 215, 232, 224,
- 218, 225, 224, 233, 234, 229, 216, 236, 237, 247,
-
- 240, 226, 225, 214, 241, 228, 214, 245, 230, 231,
- 227, 215, 232, 247, 247, 218, 225, 226, 233, 234,
- 216, 236, 237, 239, 240, 226, 239, 238, 247, 241,
- 238, 215, 245, 247, 227, 243, 235, 247, 243, 243,
- 247, 226, 243, 246, 246, 247, 246, 246, 247, 247,
- 247, 247, 247, 225, 247, 247, 247, 247, 247, 247,
- 235, 247, 247, 244, 247, 247, 247, 244, 247, 247,
- 247, 247, 247, 247, 247, 247, 247, 247, 225, 247,
- 247, 247, 247, 247, 247, 247, 247, 244, 247, 247,
- 247, 244, 43, 43, 247, 43, 43, 43, 45, 45,
-
- 53, 53, 53, 97, 97, 97, 98, 98, 247, 98,
- 98, 98, 148, 247, 148, 148, 148, 181, 247, 247,
- 181, 181, 182, 182, 182, 197, 247, 247, 197, 204,
- 204, 204, 242, 247, 247, 242, 3, 247, 247, 247,
- 247, 247, 247, 247, 247, 247, 247, 247, 247, 247,
- 247, 247, 247, 247, 247, 247, 247, 247, 247, 247,
- 247, 247, 247, 247, 247, 247, 247, 247, 247, 247,
- 247, 247, 247, 247, 247, 247, 247, 247, 247, 247,
- 247, 247, 247, 247, 247, 247, 247, 247, 247, 247,
- 247, 247, 247, 247, 247, 247, 247, 247, 247, 247,
-
- 247
+ 201, 230, 219, 224, 215, 221, 224, 214, 220, 225,
+ 214, 222, 229, 251, 231, 215, 223, 232, 251, 233,
+ 218, 225, 234, 251, 227, 230, 216, 235, 236, 224,
+
+ 238, 226, 224, 251, 225, 239, 227, 229, 228, 231,
+ 241, 214, 232, 233, 214, 218, 225, 234, 227, 215,
+ 216, 243, 235, 236, 238, 226, 251, 226, 242, 239,
+ 227, 242, 228, 244, 241, 240, 215, 246, 240, 247,
+ 251, 249, 247, 251, 237, 243, 247, 250, 251, 247,
+ 250, 226, 250, 251, 251, 250, 251, 225, 244, 251,
+ 251, 251, 246, 251, 251, 251, 249, 248, 237, 251,
+ 251, 251, 227, 251, 248, 251, 251, 251, 251, 251,
+ 251, 251, 225, 251, 251, 251, 251, 251, 251, 251,
+ 251, 248, 251, 251, 251, 251, 227, 251, 248, 43,
+
+ 43, 251, 43, 43, 43, 45, 45, 53, 53, 53,
+ 97, 97, 97, 98, 98, 251, 98, 98, 98, 148,
+ 251, 148, 148, 148, 181, 251, 251, 181, 181, 182,
+ 182, 182, 197, 251, 251, 197, 204, 204, 204, 245,
+ 251, 251, 245, 3, 251, 251, 251, 251, 251, 251,
+ 251, 251, 251, 251, 251, 251, 251, 251, 251, 251,
+ 251, 251, 251, 251, 251, 251, 251, 251, 251, 251,
+ 251, 251, 251, 251, 251, 251, 251, 251, 251, 251,
+ 251, 251, 251, 251, 251, 251, 251, 251, 251, 251,
+ 251, 251, 251, 251, 251, 251, 251, 251, 251, 251,
+
+ 251, 251, 251, 251, 251, 251, 251, 251
} ;
-static yyconst flex_int16_t yy_chk[702] =
+static yyconst flex_int16_t yy_chk[709] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -625,8 +628,8 @@ static yyconst flex_int16_t yy_chk[702] =
74, 79, 40, 81, 82, 88, 59, 83, 64, 65,
84, 69, 68, 68, 70, 59, 71, 74, 72, 73,
75, 85, 41, 76, 86, 74, 79, 87, 81, 82,
- 88, 83, 89, 91, 84, 92, 93, 91, 0, 234,
- 0, 74, 234, 96, 100, 85, 102, 103, 86, 104,
+ 88, 83, 89, 91, 84, 92, 93, 91, 0, 235,
+ 0, 74, 235, 96, 100, 85, 102, 103, 86, 104,
105, 87, 94, 94, 94, 94, 106, 89, 91, 92,
93, 107, 91, 95, 95, 95, 95, 96, 109, 100,
@@ -646,33 +649,33 @@ static yyconst flex_int16_t yy_chk[702] =
196, 171, 174, 197, 200, 0, 197, 175, 203, 179,
207, 197, 180, 190, 205, 183, 208, 185, 187, 188,
192, 193, 210, 195, 196, 171, 198, 201, 200, 198,
- 201, 219, 203, 214, 198, 207, 214, 215, 205, 216,
- 218, 208, 216, 221, 222, 0, 210, 216, 223, 224,
- 201, 214, 224, 225, 226, 219, 198, 231, 233, 0,
-
- 236, 214, 215, 227, 237, 218, 227, 244, 221, 222,
- 216, 227, 223, 0, 0, 201, 214, 224, 225, 226,
- 198, 231, 233, 235, 236, 214, 235, 238, 0, 237,
- 238, 235, 244, 0, 216, 239, 227, 242, 239, 243,
- 242, 224, 243, 245, 246, 0, 245, 246, 0, 0,
- 0, 0, 0, 239, 0, 0, 0, 0, 0, 0,
- 227, 0, 0, 239, 0, 0, 0, 243, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 239, 0,
- 0, 0, 0, 0, 0, 0, 0, 239, 0, 0,
- 0, 243, 248, 248, 0, 248, 248, 248, 249, 249,
-
- 250, 250, 250, 251, 251, 251, 252, 252, 0, 252,
- 252, 252, 253, 0, 253, 253, 253, 254, 0, 0,
- 254, 254, 255, 255, 255, 256, 0, 0, 256, 257,
- 257, 257, 258, 0, 0, 258, 247, 247, 247, 247,
- 247, 247, 247, 247, 247, 247, 247, 247, 247, 247,
- 247, 247, 247, 247, 247, 247, 247, 247, 247, 247,
- 247, 247, 247, 247, 247, 247, 247, 247, 247, 247,
- 247, 247, 247, 247, 247, 247, 247, 247, 247, 247,
- 247, 247, 247, 247, 247, 247, 247, 247, 247, 247,
- 247, 247, 247, 247, 247, 247, 247, 247, 247, 247,
-
- 247
+ 201, 219, 203, 214, 198, 207, 214, 216, 205, 215,
+ 216, 208, 218, 0, 221, 216, 210, 222, 0, 223,
+ 201, 214, 225, 0, 215, 219, 198, 226, 227, 224,
+
+ 232, 214, 224, 0, 215, 234, 214, 218, 216, 221,
+ 236, 228, 222, 223, 228, 201, 214, 225, 215, 228,
+ 198, 238, 226, 227, 232, 214, 0, 224, 237, 234,
+ 214, 237, 216, 239, 236, 240, 237, 241, 240, 242,
+ 245, 248, 242, 245, 228, 238, 247, 249, 0, 247,
+ 249, 224, 250, 0, 0, 250, 0, 242, 239, 0,
+ 0, 0, 241, 0, 0, 0, 248, 242, 228, 0,
+ 0, 0, 242, 0, 247, 0, 0, 0, 0, 0,
+ 0, 0, 242, 0, 0, 0, 0, 0, 0, 0,
+ 0, 242, 0, 0, 0, 0, 242, 0, 247, 252,
+
+ 252, 0, 252, 252, 252, 253, 253, 254, 254, 254,
+ 255, 255, 255, 256, 256, 0, 256, 256, 256, 257,
+ 0, 257, 257, 257, 258, 0, 0, 258, 258, 259,
+ 259, 259, 260, 0, 0, 260, 261, 261, 261, 262,
+ 0, 0, 262, 251, 251, 251, 251, 251, 251, 251,
+ 251, 251, 251, 251, 251, 251, 251, 251, 251, 251,
+ 251, 251, 251, 251, 251, 251, 251, 251, 251, 251,
+ 251, 251, 251, 251, 251, 251, 251, 251, 251, 251,
+ 251, 251, 251, 251, 251, 251, 251, 251, 251, 251,
+ 251, 251, 251, 251, 251, 251, 251, 251, 251, 251,
+
+ 251, 251, 251, 251, 251, 251, 251, 251
} ;
static yy_state_type yy_last_accepting_state;
@@ -746,7 +749,7 @@ static void countnl() {
g_lingo->_colnumber = strlen(p);
}
-#line 750 "engines/director/lingo/lingo-lex.cpp"
+#line 753 "engines/director/lingo/lingo-lex.cpp"
#define INITIAL 0
@@ -934,7 +937,7 @@ YY_DECL
#line 69 "engines/director/lingo/lingo-lex.l"
-#line 938 "engines/director/lingo/lingo-lex.cpp"
+#line 941 "engines/director/lingo/lingo-lex.cpp"
if ( !(yy_init) )
{
@@ -988,13 +991,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 >= 248 )
+ if ( yy_current_state >= 252 )
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] != 637 );
+ while ( yy_base[yy_current_state] != 644 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
@@ -1317,15 +1320,16 @@ YY_RULE_SETUP
{
count();
- const char *p = &yytext[4]; // Skip 'the '
- while (*p == ' ' || *p == '\t')
- p++;
+ const char *ptr = &yytext[4]; // Skip 'the '
+ while (*ptr == ' ' || *ptr == '\t')
+ ptr++;
Common::String field;
- while (*p != ' ' && *p != '\t')
- field += *p++;
+ while (*ptr != ' ' && *ptr != '\t')
+ field += *ptr++;
- const char *ptr = "date";
+ while (*ptr == ' ' || *ptr == '\t')
+ ptr++;
field = Common::String::format("%d%s", g_lingo->_theEntities[ptr]->entity, field.c_str());
@@ -1347,7 +1351,7 @@ YY_RULE_SETUP
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 206 "engines/director/lingo/lingo-lex.l"
+#line 207 "engines/director/lingo/lingo-lex.l"
{
count();
@@ -1370,67 +1374,67 @@ YY_RULE_SETUP
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 225 "engines/director/lingo/lingo-lex.l"
+#line 226 "engines/director/lingo/lingo-lex.l"
{ count(); return tTHEN; }
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 226 "engines/director/lingo/lingo-lex.l"
+#line 227 "engines/director/lingo/lingo-lex.l"
{ count(); return tTO; }
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 227 "engines/director/lingo/lingo-lex.l"
+#line 228 "engines/director/lingo/lingo-lex.l"
{ count(); return tSPRITE; }
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 228 "engines/director/lingo/lingo-lex.l"
+#line 229 "engines/director/lingo/lingo-lex.l"
{ count(); return tWITH; }
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 229 "engines/director/lingo/lingo-lex.l"
+#line 230 "engines/director/lingo/lingo-lex.l"
{ count(); return tWITHIN; }
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 230 "engines/director/lingo/lingo-lex.l"
+#line 231 "engines/director/lingo/lingo-lex.l"
{ count(); return tWHEN; }
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 231 "engines/director/lingo/lingo-lex.l"
+#line 232 "engines/director/lingo/lingo-lex.l"
{ count(); return tWHILE; }
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 232 "engines/director/lingo/lingo-lex.l"
+#line 233 "engines/director/lingo/lingo-lex.l"
{ count(); return tWORD; }
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 234 "engines/director/lingo/lingo-lex.l"
+#line 235 "engines/director/lingo/lingo-lex.l"
{ count(); return tNEQ; }
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 235 "engines/director/lingo/lingo-lex.l"
+#line 236 "engines/director/lingo/lingo-lex.l"
{ count(); return tGE; }
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 236 "engines/director/lingo/lingo-lex.l"
+#line 237 "engines/director/lingo/lingo-lex.l"
{ count(); return tLE; }
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 237 "engines/director/lingo/lingo-lex.l"
+#line 238 "engines/director/lingo/lingo-lex.l"
{ count(); return tCONCAT; }
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 239 "engines/director/lingo/lingo-lex.l"
+#line 240 "engines/director/lingo/lingo-lex.l"
{
count();
yylval.s = new Common::String(yytext);
@@ -1463,41 +1467,41 @@ YY_RULE_SETUP
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 268 "engines/director/lingo/lingo-lex.l"
+#line 269 "engines/director/lingo/lingo-lex.l"
{ count(); yylval.f = atof(yytext); return FLOAT; }
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 269 "engines/director/lingo/lingo-lex.l"
+#line 270 "engines/director/lingo/lingo-lex.l"
{ count(); yylval.i = strtol(yytext, NULL, 10); return INT; }
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 270 "engines/director/lingo/lingo-lex.l"
+#line 271 "engines/director/lingo/lingo-lex.l"
{ count(); return *yytext; }
YY_BREAK
case 66:
/* rule 66 can match eol */
YY_RULE_SETUP
-#line 271 "engines/director/lingo/lingo-lex.l"
+#line 272 "engines/director/lingo/lingo-lex.l"
{ return '\n'; }
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 272 "engines/director/lingo/lingo-lex.l"
+#line 273 "engines/director/lingo/lingo-lex.l"
{ count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return STRING; }
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 273 "engines/director/lingo/lingo-lex.l"
+#line 274 "engines/director/lingo/lingo-lex.l"
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 275 "engines/director/lingo/lingo-lex.l"
+#line 276 "engines/director/lingo/lingo-lex.l"
ECHO;
YY_BREAK
-#line 1501 "engines/director/lingo/lingo-lex.cpp"
+#line 1505 "engines/director/lingo/lingo-lex.cpp"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1790,7 +1794,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 >= 248 )
+ if ( yy_current_state >= 252 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1818,11 +1822,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 >= 248 )
+ if ( yy_current_state >= 252 )
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 == 247);
+ yy_is_jam = (yy_current_state == 251);
return yy_is_jam ? 0 : yy_current_state;
}
@@ -2497,7 +2501,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 275 "engines/director/lingo/lingo-lex.l"
+#line 276 "engines/director/lingo/lingo-lex.l"
diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l
index 498862835e..75fc176869 100644
--- a/engines/director/lingo/lingo-lex.l
+++ b/engines/director/lingo/lingo-lex.l
@@ -173,18 +173,19 @@ whitespace [\t ]
warning("Unhandled the entity %s", ptr);
}
-(?i:the[ \t]+[[:alpha:]]+[ \t+]date) {
+(?i:the[ \t]+[[:alpha:]]+[ \t+](date|time)) {
count();
- const char *p = &yytext[4]; // Skip 'the '
- while (*p == ' ' || *p == '\t')
- p++;
+ const char *ptr = &yytext[4]; // Skip 'the '
+ while (*ptr == ' ' || *ptr == '\t')
+ ptr++;
Common::String field;
- while (*p != ' ' && *p != '\t')
- field += *p++;
+ while (*ptr != ' ' && *ptr != '\t')
+ field += *ptr++;
- const char *ptr = "date";
+ while (*ptr == ' ' || *ptr == '\t')
+ ptr++;
field = Common::String::format("%d%s", g_lingo->_theEntities[ptr]->entity, field.c_str());
diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index a9f298e0b7..fafe22f8ef 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -116,6 +116,7 @@ TheEntity entities[] = {
{ kTheTimeoutMouse, "timeoutMouse", false }, // D2 p
{ kTheTimeoutPlay, "timeoutPlay", false }, // D2 p
{ kTheTimeoutScript, "timeoutScript", false }, // D2 p
+ { kTheTime, "time", false }, // D3 f
{ kTheTimer, "timer", false }, // D2 p
{ kTheWindow, "window", false },
{ kTheWords, "words", true }, // D3
@@ -226,6 +227,11 @@ TheEntityField fields[] = {
{ kTheDate, "abbreviated", kTheAbbr }, // D3 f
{ kTheDate, "abbrev", kTheAbbr }, // D3 f
{ kTheDate, "abbr", kTheAbbr }, // D3 f
+ { kTheTime, "short", kTheShort }, // D3 f
+ { kTheTime, "long", kTheLong }, // D3 f
+ { kTheTime, "abbreviated", kTheAbbr }, // D3 f
+ { kTheTime, "abbrev", kTheAbbr }, // D3 f
+ { kTheTime, "abbr", kTheAbbr }, // D3 f
{ kTheNOEntity, NULL, kTheNOField }
};
diff --git a/engines/director/lingo/lingo-the.h b/engines/director/lingo/lingo-the.h
index 44737eb953..9614edb404 100644
--- a/engines/director/lingo/lingo-the.h
+++ b/engines/director/lingo/lingo-the.h
@@ -41,6 +41,7 @@ enum TheEntityType {
kTheMouseV,
kTheMouseDownScript,
kTheMouseUpScript,
+ kTheTime,
kTheField,
diff --git a/engines/director/lingo/tests/the.lingo b/engines/director/lingo/tests/the.lingo
index d711e4a044..f728fb7938 100644
--- a/engines/director/lingo/tests/the.lingo
+++ b/engines/director/lingo/tests/the.lingo
@@ -7,3 +7,5 @@ set the castnum of sprite 8 to the number of cast "A Blank Castmember"
put the date
put the long date
+put the abbreviated time
+put the short time