diff options
-rw-r--r-- | engines/director/lingo/lingo-lex.cpp | 494 | ||||
-rw-r--r-- | engines/director/lingo/lingo-lex.l | 7 | ||||
-rw-r--r-- | engines/director/lingo/tests/the.lingo | 2 |
3 files changed, 269 insertions, 234 deletions
diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp index d8bfaec3cc..e7c683ee57 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 75 -#define YY_END_OF_BUFFER 76 +#define YY_NUM_RULES 76 +#define YY_END_OF_BUFFER 77 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -373,38 +373,39 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[275] = +static yyconst flex_int16_t yy_accept[285] = { 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, - 0, 0, 0, 0, 0, 73, 5, 66, 2, 69, - 70, 65, 63, 64, 68, 68, 68, 68, 68, 68, - 68, 68, 68, 68, 68, 68, 68, 23, 13, 68, - 68, 68, 68, 68, 68, 68, 68, 68, 36, 37, - 68, 39, 68, 68, 68, 68, 68, 68, 68, 68, - 68, 56, 68, 68, 68, 1, 3, 3, 0, 5, - - 2, 69, 68, 7, 68, 68, 68, 68, 68, 68, - 17, 68, 68, 68, 68, 0, 68, 68, 68, 68, - 68, 68, 68, 32, 68, 68, 35, 68, 68, 68, - 68, 44, 68, 46, 68, 68, 68, 68, 68, 68, - 68, 68, 0, 68, 68, 9, 68, 11, 12, 16, - 0, 17, 19, 68, 68, 68, 0, 68, 68, 26, - 27, 28, 29, 68, 68, 68, 34, 38, 40, 68, - 68, 68, 68, 68, 48, 0, 54, 60, 68, 58, - 62, 15, 6, 68, 68, 17, 17, 68, 20, 68, - 22, 68, 68, 30, 68, 33, 68, 68, 68, 68, - - 68, 68, 53, 53, 53, 55, 61, 68, 0, 8, - 68, 17, 68, 21, 68, 68, 31, 68, 68, 68, - 45, 57, 47, 0, 0, 53, 53, 59, 0, 68, - 18, 68, 68, 68, 68, 68, 0, 0, 0, 0, - 53, 53, 14, 10, 24, 68, 68, 42, 43, 0, - 0, 0, 53, 53, 68, 41, 0, 0, 0, 0, - 0, 25, 52, 51, 52, 0, 0, 0, 0, 0, - 0, 49, 50, 0 + 0, 0, 77, 75, 4, 73, 73, 75, 75, 75, + 72, 72, 72, 71, 72, 68, 72, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 75, 3, 3, 4, 73, + 0, 0, 0, 0, 0, 74, 5, 67, 2, 70, + 71, 66, 64, 65, 69, 69, 69, 69, 69, 69, + 69, 69, 69, 69, 69, 69, 69, 23, 13, 69, + 69, 69, 69, 69, 69, 69, 69, 69, 36, 37, + 69, 39, 69, 69, 69, 69, 69, 69, 69, 69, + 69, 57, 69, 69, 69, 1, 3, 3, 0, 5, + + 2, 70, 69, 7, 69, 69, 69, 69, 69, 69, + 17, 69, 69, 69, 69, 0, 69, 69, 69, 69, + 69, 69, 69, 32, 69, 69, 35, 69, 69, 69, + 69, 44, 69, 46, 69, 69, 69, 69, 69, 69, + 69, 69, 0, 69, 69, 9, 69, 11, 12, 16, + 0, 17, 19, 69, 69, 69, 0, 69, 69, 26, + 27, 28, 29, 69, 69, 69, 34, 38, 40, 69, + 69, 69, 69, 69, 48, 0, 55, 61, 69, 59, + 63, 15, 6, 69, 69, 17, 17, 69, 20, 69, + 22, 69, 69, 30, 69, 33, 69, 69, 69, 69, + + 69, 69, 54, 54, 54, 54, 56, 62, 69, 0, + 8, 69, 17, 69, 21, 69, 69, 31, 69, 69, + 69, 45, 58, 47, 0, 0, 54, 54, 54, 60, + 0, 69, 18, 69, 69, 69, 69, 69, 0, 0, + 0, 0, 54, 54, 54, 14, 10, 24, 69, 69, + 42, 43, 0, 0, 0, 54, 54, 54, 69, 41, + 0, 0, 0, 0, 0, 54, 25, 53, 52, 53, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, + 50, 51, 51, 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -450,18 +451,18 @@ static yyconst flex_int32_t yy_meta[66] = 5, 5, 5, 5, 1 } ; -static yyconst flex_int16_t yy_base[286] = +static yyconst flex_int16_t yy_base[296] = { 0, - 0, 64, 188, 702, 68, 72, 76, 80, 148, 0, - 702, 129, 106, 55, 71, 702, 95, 66, 68, 66, + 0, 64, 188, 741, 68, 72, 76, 80, 148, 0, + 741, 129, 106, 55, 71, 741, 95, 66, 68, 66, 62, 72, 88, 73, 0, 104, 82, 120, 110, 136, - 119, 83, 113, 154, 156, 105, 192, 209, 213, 702, - 217, 180, 225, 120, 100, 702, 0, 702, 0, 89, - 130, 702, 702, 702, 0, 114, 108, 155, 181, 178, + 119, 83, 113, 154, 156, 105, 192, 209, 213, 741, + 217, 180, 225, 120, 100, 741, 0, 741, 0, 89, + 130, 741, 741, 741, 0, 114, 108, 155, 181, 178, 195, 191, 189, 210, 217, 220, 202, 89, 0, 205, 220, 214, 214, 226, 215, 232, 212, 219, 0, 0, 226, 0, 238, 252, 224, 234, 241, 246, 267, 254, - 264, 0, 265, 253, 259, 702, 292, 315, 265, 0, + 264, 0, 265, 253, 259, 741, 292, 315, 265, 0, 0, 85, 280, 0, 274, 274, 273, 281, 284, 293, 320, 286, 289, 301, 312, 333, 299, 319, 308, 320, @@ -471,56 +472,60 @@ static yyconst flex_int16_t yy_base[286] = 185, 0, 0, 363, 373, 379, 368, 382, 368, 0, 0, 0, 0, 373, 375, 387, 0, 0, 392, 385, 390, 395, 380, 383, 0, 418, 157, 0, 405, 403, - 0, 395, 0, 409, 406, 0, 0, 407, 0, 414, - 702, 414, 410, 0, 412, 0, 427, 418, 416, 415, - - 433, 424, 473, 475, 479, 456, 0, 433, 488, 0, - 434, 0, 430, 0, 447, 474, 0, 477, 452, 463, - 0, 0, 0, 495, 483, 497, 499, 0, 486, 471, - 0, 493, 497, 498, 476, 483, 522, 509, 514, 512, - 543, 555, 702, 0, 0, 508, 519, 0, 0, 515, - 561, 530, 567, 578, 534, 0, 538, 584, 550, 589, - 593, 0, 702, 595, 702, 599, 559, 603, 563, 610, - 615, 616, 620, 702, 657, 659, 662, 665, 671, 676, - 681, 684, 689, 691, 696 + 0, 395, 0, 410, 407, 0, 0, 397, 0, 413, + 741, 412, 409, 0, 426, 0, 428, 414, 416, 415, + + 437, 426, 475, 476, 485, 486, 458, 0, 441, 487, + 0, 446, 0, 442, 0, 478, 477, 0, 481, 466, + 470, 0, 0, 0, 514, 495, 499, 522, 533, 0, + 489, 473, 0, 493, 501, 500, 508, 507, 546, 533, + 530, 528, 559, 560, 578, 741, 0, 0, 523, 536, + 0, 0, 532, 461, 544, 587, 588, 599, 547, 0, + 553, 508, 564, 601, 621, 606, 0, 741, 610, 741, + 620, 580, 627, 595, 628, 632, 638, 642, 602, 657, + 659, 663, 665, 741, 696, 698, 701, 704, 710, 715, + 720, 723, 728, 730, 735 + } ; -static yyconst flex_int16_t yy_def[286] = +static yyconst flex_int16_t yy_def[296] = { 0, - 274, 1, 274, 274, 274, 274, 274, 274, 275, 276, - 274, 274, 274, 274, 274, 274, 274, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 275, 274, 278, 274, 279, 274, - 274, 274, 274, 274, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 274, 274, 274, 274, 278, - - 279, 274, 277, 277, 277, 277, 277, 277, 277, 277, - 280, 277, 277, 277, 277, 274, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 274, 277, 277, 277, 277, 277, 277, 277, - 281, 282, 277, 277, 277, 277, 274, 277, 277, 277, - 277, 277, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 277, 277, 283, 277, 277, 277, 277, - 277, 274, 277, 277, 277, 284, 282, 277, 277, 277, - 274, 277, 277, 277, 277, 277, 277, 277, 277, 277, - - 277, 277, 283, 283, 283, 274, 277, 277, 274, 277, - 277, 284, 277, 277, 277, 277, 277, 277, 277, 277, - 277, 277, 277, 274, 274, 283, 283, 277, 274, 277, - 277, 277, 277, 277, 277, 277, 274, 274, 274, 274, - 283, 283, 274, 277, 277, 277, 277, 277, 277, 274, - 274, 274, 283, 283, 277, 277, 274, 285, 274, 274, - 274, 277, 274, 285, 274, 274, 274, 274, 274, 274, - 274, 285, 285, 0, 274, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 274 + 284, 1, 284, 284, 284, 284, 284, 284, 285, 286, + 284, 284, 284, 284, 284, 284, 284, 287, 287, 287, + 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, + 287, 287, 287, 287, 287, 284, 284, 284, 284, 284, + 284, 284, 284, 284, 285, 284, 288, 284, 289, 284, + 284, 284, 284, 284, 287, 287, 287, 287, 287, 287, + 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, + 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, + 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, + 287, 287, 287, 287, 287, 284, 284, 284, 284, 288, + + 289, 284, 287, 287, 287, 287, 287, 287, 287, 287, + 290, 287, 287, 287, 287, 284, 287, 287, 287, 287, + 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, + 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, + 287, 287, 284, 287, 287, 287, 287, 287, 287, 287, + 291, 292, 287, 287, 287, 287, 284, 287, 287, 287, + 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, + 287, 287, 287, 287, 287, 293, 287, 287, 287, 287, + 287, 284, 287, 287, 287, 294, 292, 287, 287, 287, + 284, 287, 287, 287, 287, 287, 287, 287, 287, 287, + + 287, 287, 293, 293, 293, 293, 284, 287, 287, 284, + 287, 287, 294, 287, 287, 287, 287, 287, 287, 287, + 287, 287, 287, 287, 284, 284, 293, 293, 293, 287, + 284, 287, 287, 287, 287, 287, 287, 287, 284, 284, + 284, 284, 293, 293, 293, 284, 287, 287, 287, 287, + 287, 287, 284, 284, 284, 293, 293, 293, 287, 287, + 284, 295, 284, 284, 284, 293, 287, 284, 295, 284, + 284, 284, 284, 284, 284, 284, 284, 284, 284, 295, + 295, 284, 295, 0, 284, 284, 284, 284, 284, 284, + 284, 284, 284, 284, 284 + } ; -static yyconst flex_int16_t yy_nxt[768] = +static yyconst flex_int16_t yy_nxt[807] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 11, 13, 4, 14, 15, 16, 17, 18, 19, 20, 21, @@ -538,77 +543,82 @@ static yyconst flex_int16_t yy_nxt[768] = 66, 44, 62, 67, 63, 69, 68, 104, 86, 65, 77, 72, 70, 87, 64, 73, 74, 48, 71, 78, 75, 50, 51, 88, 66, 83, 99, 89, 103, 76, - 69, 84, 104, 46, 85, 77, 70, 79, 87, 206, - 206, 74, 71, 78, 80, 75, 81, 88, 82, 83, + 69, 84, 104, 46, 85, 77, 70, 79, 87, 207, + 207, 74, 71, 78, 80, 75, 81, 88, 82, 83, 99, 89, 103, 76, 90, 84, 105, 91, 85, 93, - 94, 42, 79, 92, 42, 95, 151, 274, 80, 151, - 81, 274, 82, 97, 40, 40, 98, 106, 274, 90, + 94, 42, 79, 92, 42, 95, 151, 284, 80, 151, + 81, 284, 82, 97, 40, 40, 98, 106, 284, 90, - 44, 105, 91, 274, 93, 94, 107, 92, 111, 95, + 44, 105, 91, 284, 93, 94, 107, 92, 111, 95, 98, 40, 40, 98, 39, 40, 40, 41, 41, 40, 40, 41, 106, 108, 110, 44, 42, 43, 43, 42, - 107, 115, 109, 111, 112, 113, 114, 274, 117, 118, - 119, 274, 120, 121, 122, 44, 128, 108, 110, 123, - 126, 124, 274, 127, 129, 115, 109, 274, 132, 112, + 107, 115, 109, 111, 112, 113, 114, 284, 117, 118, + 119, 284, 120, 121, 122, 44, 128, 108, 110, 123, + 126, 124, 284, 127, 129, 115, 109, 284, 132, 112, 113, 114, 117, 118, 133, 119, 120, 121, 125, 122, 44, 128, 130, 123, 126, 134, 124, 127, 135, 129, - 137, 131, 132, 136, 138, 139, 274, 141, 133, 140, - 274, 142, 125, 97, 40, 40, 98, 130, 143, 134, + 137, 131, 132, 136, 138, 139, 284, 141, 133, 140, + 284, 142, 125, 97, 40, 40, 98, 130, 143, 134, 144, 148, 135, 145, 137, 131, 146, 147, 136, 138, 139, 141, 149, 150, 140, 142, 98, 40, 40, 98, 153, 151, 143, 154, 151, 144, 148, 145, 155, 156, 146, 147, 55, 158, 116, 161, 149, 116, 150, 159, - 162, 274, 163, 165, 153, 164, 166, 154, 160, 167, + 162, 284, 163, 165, 153, 164, 166, 154, 160, 167, 168, 169, 155, 170, 156, 171, 172, 158, 173, 161, - 174, 175, 274, 178, 159, 162, 163, 157, 165, 164, + 174, 175, 284, 178, 159, 162, 163, 157, 165, 164, 179, 166, 160, 167, 168, 169, 180, 170, 181, 171, 182, 172, 183, 173, 174, 175, 176, 178, 184, 176, - 185, 157, 188, 189, 179, 190, 209, 191, 192, 209, + 185, 157, 188, 189, 179, 190, 210, 191, 192, 210, 193, 180, 194, 181, 195, 182, 183, 196, 197, 198, 199, 200, 184, 177, 201, 185, 188, 202, 189, 176, - 190, 191, 176, 192, 193, 207, 194, 208, 195, 210, - 211, 217, 196, 197, 198, 199, 200, 177, 201, 213, - 214, 202, 215, 216, 204, 218, 274, 219, 220, 221, - 207, 205, 208, 222, 210, 211, 217, 223, 206, 206, - 274, 228, 230, 213, 214, 232, 215, 216, 204, 231, - 218, 219, 220, 221, 224, 205, 224, 224, 222, 224, - 224, 223, 225, 224, 225, 228, 230, 235, 225, 209, - 232, 226, 209, 231, 233, 234, 237, 236, 224, 237, - - 224, 224, 238, 224, 244, 274, 225, 243, 225, 248, - 227, 235, 229, 245, 238, 246, 226, 240, 247, 233, - 234, 236, 249, 237, 239, 250, 237, 238, 244, 240, - 241, 242, 243, 248, 227, 251, 252, 229, 245, 238, - 246, 240, 255, 247, 224, 256, 249, 224, 239, 257, - 250, 239, 225, 240, 241, 242, 224, 259, 263, 224, - 251, 252, 258, 274, 225, 258, 255, 262, 260, 256, - 265, 260, 274, 257, 274, 239, 225, 253, 274, 261, - 270, 259, 261, 263, 271, 258, 274, 225, 258, 254, - 266, 262, 274, 266, 268, 265, 274, 268, 274, 274, - - 266, 253, 274, 266, 268, 270, 274, 268, 238, 271, - 274, 272, 238, 254, 272, 274, 273, 272, 267, 273, - 272, 273, 269, 240, 273, 274, 274, 240, 267, 274, - 274, 274, 269, 238, 274, 274, 274, 238, 274, 274, - 274, 274, 267, 274, 274, 274, 269, 240, 274, 274, - 274, 240, 267, 274, 274, 274, 269, 45, 45, 274, - 45, 45, 45, 47, 47, 55, 55, 55, 100, 100, - 100, 101, 101, 274, 101, 101, 101, 152, 274, 152, - 152, 152, 186, 274, 274, 186, 186, 187, 187, 187, - 203, 274, 274, 203, 212, 212, 212, 264, 274, 274, - - 264, 3, 274, 274, 274, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 274, 274, 274 + 190, 191, 176, 192, 193, 208, 194, 209, 195, 214, + 211, 212, 196, 197, 198, 199, 200, 177, 201, 215, + 216, 202, 217, 220, 204, 218, 219, 284, 221, 222, + 208, 205, 209, 214, 206, 211, 212, 223, 284, 224, + 207, 207, 262, 215, 216, 262, 217, 220, 204, 230, + 218, 219, 221, 222, 232, 205, 225, 225, 206, 225, + 225, 233, 223, 224, 226, 226, 225, 225, 210, 225, + 225, 210, 227, 230, 226, 226, 234, 235, 232, 236, + + 225, 237, 229, 225, 238, 233, 247, 284, 226, 262, + 246, 231, 262, 248, 240, 239, 228, 227, 239, 249, + 250, 234, 235, 225, 236, 237, 225, 229, 238, 242, + 247, 226, 243, 240, 225, 246, 231, 225, 248, 240, + 228, 251, 226, 241, 249, 250, 252, 239, 242, 253, + 239, 254, 255, 242, 244, 284, 243, 259, 240, 245, + 225, 225, 260, 225, 225, 251, 261, 241, 226, 226, + 252, 263, 242, 268, 253, 241, 254, 255, 244, 225, + 267, 259, 225, 245, 270, 284, 260, 226, 264, 265, + 261, 264, 265, 256, 257, 263, 226, 226, 268, 241, + + 225, 276, 271, 225, 267, 271, 284, 275, 226, 270, + 275, 284, 284, 258, 284, 226, 277, 256, 257, 266, + 240, 271, 273, 282, 271, 273, 276, 284, 273, 278, + 272, 273, 278, 280, 284, 242, 280, 258, 284, 281, + 240, 277, 281, 278, 266, 240, 278, 240, 282, 272, + 274, 284, 284, 284, 272, 242, 274, 279, 280, 242, + 281, 280, 242, 281, 283, 240, 283, 283, 284, 283, + 284, 279, 240, 272, 274, 284, 284, 284, 284, 242, + 274, 279, 284, 284, 284, 284, 242, 284, 284, 284, + 284, 284, 284, 284, 284, 279, 45, 45, 284, 45, + + 45, 45, 47, 47, 55, 55, 55, 100, 100, 100, + 101, 101, 284, 101, 101, 101, 152, 284, 152, 152, + 152, 186, 284, 284, 186, 186, 187, 187, 187, 203, + 284, 284, 203, 213, 213, 213, 269, 284, 284, 269, + 3, 284, 284, 284, 284, 284, 284, 284, 284, 284, + 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, + 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, + 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, + 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, + 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, + + 284, 284, 284, 284, 284, 284 } ; -static yyconst flex_int16_t yy_chk[768] = +static yyconst flex_int16_t yy_chk[807] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -656,44 +666,49 @@ static yyconst flex_int16_t yy_chk[768] = 159, 141, 164, 142, 165, 143, 144, 166, 169, 170, 171, 172, 145, 138, 173, 147, 154, 174, 155, 176, - 156, 157, 176, 158, 159, 179, 164, 180, 165, 184, - 185, 195, 166, 169, 170, 171, 172, 138, 173, 188, - 190, 174, 192, 193, 176, 197, 0, 198, 199, 200, - 179, 176, 180, 201, 184, 185, 195, 202, 206, 206, - 0, 208, 211, 188, 190, 215, 192, 193, 176, 213, - 197, 198, 199, 200, 203, 176, 204, 203, 201, 204, - 205, 202, 203, 205, 204, 208, 211, 219, 205, 209, - 215, 204, 209, 213, 216, 218, 224, 220, 226, 224, - - 227, 226, 225, 227, 230, 0, 226, 229, 227, 235, - 205, 219, 209, 232, 224, 233, 204, 225, 234, 216, - 218, 220, 236, 237, 224, 238, 237, 225, 230, 224, - 226, 227, 229, 235, 205, 239, 240, 209, 232, 224, - 233, 225, 246, 234, 241, 247, 236, 241, 224, 250, - 238, 237, 241, 224, 226, 227, 242, 252, 257, 242, - 239, 240, 251, 0, 242, 251, 246, 255, 253, 247, - 259, 253, 0, 250, 0, 237, 253, 241, 0, 254, - 267, 252, 254, 257, 269, 258, 0, 254, 258, 242, - 260, 255, 0, 260, 261, 259, 264, 261, 0, 264, - - 266, 241, 0, 266, 268, 267, 0, 268, 260, 269, - 0, 270, 261, 242, 270, 0, 271, 272, 260, 271, - 272, 273, 261, 260, 273, 0, 0, 261, 266, 0, - 0, 0, 268, 260, 0, 0, 0, 261, 0, 0, - 0, 0, 260, 0, 0, 0, 261, 260, 0, 0, - 0, 261, 266, 0, 0, 0, 268, 275, 275, 0, - 275, 275, 275, 276, 276, 277, 277, 277, 278, 278, - 278, 279, 279, 0, 279, 279, 279, 280, 0, 280, - 280, 280, 281, 0, 0, 281, 281, 282, 282, 282, - 283, 0, 0, 283, 284, 284, 284, 285, 0, 0, - - 285, 274, 274, 274, 274, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 274, 274, 274, 274, 274, 274, - 274, 274, 274, 274, 274, 274, 274 + 156, 157, 176, 158, 159, 179, 164, 180, 165, 188, + 184, 185, 166, 169, 170, 171, 172, 138, 173, 190, + 192, 174, 193, 198, 176, 195, 197, 0, 199, 200, + 179, 176, 180, 188, 176, 184, 185, 201, 0, 202, + 207, 207, 254, 190, 192, 254, 193, 198, 176, 209, + 195, 197, 199, 200, 212, 176, 203, 204, 176, 203, + 204, 214, 201, 202, 203, 204, 205, 206, 210, 205, + 206, 210, 204, 209, 205, 206, 216, 217, 212, 219, + + 227, 220, 206, 227, 221, 214, 232, 0, 227, 262, + 231, 210, 262, 234, 226, 225, 205, 204, 225, 235, + 236, 216, 217, 228, 219, 220, 228, 206, 221, 226, + 232, 228, 227, 225, 229, 231, 210, 229, 234, 226, + 205, 237, 229, 225, 235, 236, 238, 239, 225, 240, + 239, 241, 242, 226, 228, 0, 227, 249, 225, 229, + 243, 244, 250, 243, 244, 237, 253, 225, 243, 244, + 238, 255, 225, 261, 240, 239, 241, 242, 228, 245, + 259, 249, 245, 229, 263, 0, 250, 245, 256, 257, + 253, 256, 257, 243, 244, 255, 256, 257, 261, 239, + + 258, 272, 264, 258, 259, 264, 0, 266, 258, 263, + 266, 269, 0, 245, 269, 266, 274, 243, 244, 258, + 264, 271, 265, 279, 271, 265, 272, 0, 273, 275, + 264, 273, 275, 276, 0, 264, 276, 245, 0, 277, + 265, 274, 277, 278, 258, 264, 278, 275, 279, 271, + 265, 0, 0, 0, 264, 265, 273, 275, 280, 264, + 281, 280, 275, 281, 282, 265, 283, 282, 0, 283, + 0, 278, 275, 271, 265, 0, 0, 0, 0, 265, + 273, 275, 0, 0, 0, 0, 275, 0, 0, 0, + 0, 0, 0, 0, 0, 278, 285, 285, 0, 285, + + 285, 285, 286, 286, 287, 287, 287, 288, 288, 288, + 289, 289, 0, 289, 289, 289, 290, 0, 290, 290, + 290, 291, 0, 0, 291, 291, 292, 292, 292, 293, + 0, 0, 293, 294, 294, 294, 295, 0, 0, 295, + 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, + 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, + 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, + 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, + 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, + 284, 284, 284, 284, 284, 284, 284, 284, 284, 284, + + 284, 284, 284, 284, 284, 284 } ; static yy_state_type yy_last_accepting_state; @@ -773,7 +788,7 @@ static int checkImmediate(int token) { return token; } -#line 777 "engines/director/lingo/lingo-lex.cpp" +#line 792 "engines/director/lingo/lingo-lex.cpp" #define INITIAL 0 @@ -959,7 +974,7 @@ YY_DECL #line 78 "engines/director/lingo/lingo-lex.l" -#line 963 "engines/director/lingo/lingo-lex.cpp" +#line 978 "engines/director/lingo/lingo-lex.cpp" if ( !(yy_init) ) { @@ -1013,13 +1028,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 >= 275 ) + if ( yy_current_state >= 285 ) 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 != 274 ); + while ( yy_current_state != 284 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); @@ -1322,6 +1337,17 @@ YY_RULE_SETUP { count(); + yylval.s = new Common::String("value"); + + return FBLTINONEARG; + } + YY_BREAK +case 52: +YY_RULE_SETUP +#line 163 "engines/director/lingo/lingo-lex.l" +{ + count(); + const char *ptr = &yytext[4]; // Skip 'the ' while (*ptr == ' ' || *ptr == '\t') ptr++; @@ -1360,9 +1386,9 @@ YY_RULE_SETUP warning("Unhandled the entity %s", ptr); } YY_BREAK -case 52: +case 53: YY_RULE_SETUP -#line 196 "engines/director/lingo/lingo-lex.l" +#line 203 "engines/director/lingo/lingo-lex.l" { count(); @@ -1395,9 +1421,9 @@ YY_RULE_SETUP return THEENTITY; } YY_BREAK -case 53: +case 54: YY_RULE_SETUP -#line 227 "engines/director/lingo/lingo-lex.l" +#line 234 "engines/director/lingo/lingo-lex.l" { count(); @@ -1418,80 +1444,80 @@ YY_RULE_SETUP warning("Unhandled the entity %s", ptr); } YY_BREAK -case 54: +case 55: YY_RULE_SETUP -#line 246 "engines/director/lingo/lingo-lex.l" +#line 253 "engines/director/lingo/lingo-lex.l" { count(); return tTHEN; } YY_BREAK -case 55: -/* rule 55 can match eol */ +case 56: +/* rule 56 can match eol */ YY_RULE_SETUP -#line 247 "engines/director/lingo/lingo-lex.l" +#line 254 "engines/director/lingo/lingo-lex.l" { count(); return tTHENNL; } YY_BREAK -case 56: +case 57: YY_RULE_SETUP -#line 248 "engines/director/lingo/lingo-lex.l" +#line 255 "engines/director/lingo/lingo-lex.l" { count(); return tTO; } YY_BREAK -case 57: +case 58: YY_RULE_SETUP -#line 249 "engines/director/lingo/lingo-lex.l" +#line 256 "engines/director/lingo/lingo-lex.l" { count(); return tSPRITE; } YY_BREAK -case 58: +case 59: YY_RULE_SETUP -#line 250 "engines/director/lingo/lingo-lex.l" +#line 257 "engines/director/lingo/lingo-lex.l" { count(); return tWITH; } YY_BREAK -case 59: +case 60: YY_RULE_SETUP -#line 251 "engines/director/lingo/lingo-lex.l" +#line 258 "engines/director/lingo/lingo-lex.l" { count(); return tWITHIN; } YY_BREAK -case 60: +case 61: YY_RULE_SETUP -#line 252 "engines/director/lingo/lingo-lex.l" +#line 259 "engines/director/lingo/lingo-lex.l" { count(); return tWHEN; } YY_BREAK -case 61: +case 62: YY_RULE_SETUP -#line 253 "engines/director/lingo/lingo-lex.l" +#line 260 "engines/director/lingo/lingo-lex.l" { count(); return tWHILE; } YY_BREAK -case 62: +case 63: YY_RULE_SETUP -#line 254 "engines/director/lingo/lingo-lex.l" +#line 261 "engines/director/lingo/lingo-lex.l" { count(); return tWORD; } YY_BREAK -case 63: +case 64: YY_RULE_SETUP -#line 256 "engines/director/lingo/lingo-lex.l" +#line 263 "engines/director/lingo/lingo-lex.l" { count(); return tNEQ; } YY_BREAK -case 64: +case 65: YY_RULE_SETUP -#line 257 "engines/director/lingo/lingo-lex.l" +#line 264 "engines/director/lingo/lingo-lex.l" { count(); return tGE; } YY_BREAK -case 65: +case 66: YY_RULE_SETUP -#line 258 "engines/director/lingo/lingo-lex.l" +#line 265 "engines/director/lingo/lingo-lex.l" { count(); return tLE; } YY_BREAK -case 66: +case 67: YY_RULE_SETUP -#line 259 "engines/director/lingo/lingo-lex.l" +#line 266 "engines/director/lingo/lingo-lex.l" { count(); return tCONCAT; } YY_BREAK -case 67: +case 68: YY_RULE_SETUP -#line 260 "engines/director/lingo/lingo-lex.l" +#line 267 "engines/director/lingo/lingo-lex.l" { count(); return g_lingo->_inCond ? tEQ : '='; } YY_BREAK -case 68: +case 69: YY_RULE_SETUP -#line 262 "engines/director/lingo/lingo-lex.l" +#line 269 "engines/director/lingo/lingo-lex.l" { count(); yylval.s = new Common::String(yytext); @@ -1538,43 +1564,43 @@ YY_RULE_SETUP return ID; } YY_BREAK -case 69: +case 70: YY_RULE_SETUP -#line 307 "engines/director/lingo/lingo-lex.l" +#line 314 "engines/director/lingo/lingo-lex.l" { count(); yylval.f = atof(yytext); return FLOAT; } YY_BREAK -case 70: +case 71: YY_RULE_SETUP -#line 308 "engines/director/lingo/lingo-lex.l" +#line 315 "engines/director/lingo/lingo-lex.l" { count(); yylval.i = strtol(yytext, NULL, 10); return INT; } YY_BREAK -case 71: +case 72: YY_RULE_SETUP -#line 309 "engines/director/lingo/lingo-lex.l" +#line 316 "engines/director/lingo/lingo-lex.l" { count(); return *yytext; } YY_BREAK -case 72: -/* rule 72 can match eol */ +case 73: +/* rule 73 can match eol */ YY_RULE_SETUP -#line 310 "engines/director/lingo/lingo-lex.l" +#line 317 "engines/director/lingo/lingo-lex.l" { return '\n'; } YY_BREAK -case 73: +case 74: YY_RULE_SETUP -#line 311 "engines/director/lingo/lingo-lex.l" +#line 318 "engines/director/lingo/lingo-lex.l" { count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return STRING; } YY_BREAK -case 74: +case 75: YY_RULE_SETUP -#line 312 "engines/director/lingo/lingo-lex.l" +#line 319 "engines/director/lingo/lingo-lex.l" { count(); } YY_BREAK -case 75: +case 76: YY_RULE_SETUP -#line 314 "engines/director/lingo/lingo-lex.l" +#line 321 "engines/director/lingo/lingo-lex.l" ECHO; YY_BREAK -#line 1578 "engines/director/lingo/lingo-lex.cpp" +#line 1604 "engines/director/lingo/lingo-lex.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1868,7 +1894,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 >= 275 ) + if ( yy_current_state >= 285 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1896,11 +1922,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 >= 275 ) + if ( yy_current_state >= 285 ) 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 == 274); + yy_is_jam = (yy_current_state == 284); return yy_is_jam ? 0 : yy_current_state; } @@ -2534,7 +2560,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 314 "engines/director/lingo/lingo-lex.l" +#line 321 "engines/director/lingo/lingo-lex.l" diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l index 15dc312110..c133b866a0 100644 --- a/engines/director/lingo/lingo-lex.l +++ b/engines/director/lingo/lingo-lex.l @@ -153,6 +153,13 @@ whitespace [\t ] return THEENTITYWITHID; } +(?i:the[ \t]+value[\t ]+of[\t ]*) { + count(); + + yylval.s = new Common::String("value"); + + return FBLTINONEARG; + } (?i:the[ \t]+[[:alpha:]]+[\t ]+of[\t ]+[[:alpha:]]+) { count(); diff --git a/engines/director/lingo/tests/the.lingo b/engines/director/lingo/tests/the.lingo index f728fb7938..28388d981b 100644 --- a/engines/director/lingo/tests/the.lingo +++ b/engines/director/lingo/tests/the.lingo @@ -9,3 +9,5 @@ put the date put the long date put the abbreviated time put the short time + +set gravityConst = the value of ( the text of cast A14) |