diff options
-rw-r--r-- | engines/director/lingo/lingo-lex.cpp | 204 | ||||
-rw-r--r-- | engines/director/lingo/lingo-lex.l | 2 |
2 files changed, 104 insertions, 102 deletions
diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp index fb8fbb125c..8c192ada77 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[305] = +static yyconst flex_int16_t yy_accept[307] = { 0, 0, 0, 76, 74, 4, 72, 72, 74, 74, 74, 71, 71, 71, 70, 71, 67, 71, 68, 68, 68, @@ -408,7 +408,7 @@ static yyconst flex_int16_t yy_accept[305] = 53, 54, 0, 0, 0, 20, 52, 0, 0, 0, 0, 0, 0, 49, 50, 0, 50, 0, 52, 0, - 52, 0, 51, 0 + 52, 0, 0, 51, 51, 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -454,7 +454,7 @@ static yyconst flex_int32_t yy_meta[66] = 5, 5, 5, 5, 1 } ; -static yyconst flex_int16_t yy_base[321] = +static yyconst flex_int16_t yy_base[323] = { 0, 0, 64, 485, 800, 68, 800, 800, 72, 474, 0, 800, 427, 419, 55, 63, 800, 365, 59, 59, 59, @@ -487,49 +487,51 @@ static yyconst flex_int16_t yy_base[321] = 571, 575, 585, 800, 555, 550, 0, 565, 0, 567, 595, 568, 599, 610, 600, 577, 0, 800, 800, 0, 800, 614, 620, 581, 631, 800, 0, 632, 624, 633, - 599, 642, 621, 637, 652, 668, 673, 677, 679, 633, + 599, 642, 621, 637, 652, 668, 673, 677, 679, 658, - 692, 612, 800, 800, 733, 735, 738, 741, 747, 752, - 757, 759, 764, 769, 772, 775, 780, 783, 788, 793 + 692, 612, 667, 800, 800, 800, 733, 735, 738, 741, + 747, 752, 757, 759, 764, 769, 772, 775, 780, 783, + 788, 793 } ; -static yyconst flex_int16_t yy_def[321] = +static yyconst flex_int16_t yy_def[323] = { 0, - 304, 1, 304, 304, 304, 304, 304, 304, 305, 306, - 304, 304, 304, 304, 304, 304, 304, 307, 307, 307, - 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, - 307, 307, 307, 307, 304, 304, 304, 307, 304, 304, - 304, 304, 305, 304, 308, 304, 309, 304, 304, 304, - 304, 304, 307, 307, 307, 307, 307, 307, 307, 307, - 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, - 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, - 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, - 307, 304, 304, 304, 304, 307, 308, 309, 304, 307, - - 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, - 304, 307, 307, 307, 307, 307, 307, 307, 307, 307, - 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, - 307, 307, 307, 307, 307, 307, 307, 304, 307, 307, - 307, 307, 307, 307, 307, 307, 310, 307, 307, 304, - 307, 307, 307, 307, 307, 307, 307, 307, 307, 307, - 307, 307, 307, 307, 307, 307, 307, 307, 311, 307, - 307, 307, 307, 307, 304, 307, 307, 307, 307, 304, - 312, 307, 304, 307, 307, 307, 307, 307, 304, 307, - 307, 307, 307, 307, 307, 311, 311, 311, 311, 307, - - 307, 304, 307, 307, 307, 304, 312, 307, 304, 307, - 307, 313, 304, 307, 307, 307, 307, 307, 307, 304, - 304, 311, 311, 311, 307, 304, 307, 307, 304, 304, - 307, 307, 314, 315, 304, 307, 307, 307, 304, 304, - 304, 304, 311, 311, 311, 304, 307, 307, 304, 307, - 307, 316, 315, 304, 307, 307, 307, 304, 304, 304, - 311, 311, 311, 304, 304, 307, 316, 304, 307, 304, - 317, 304, 311, 304, 311, 304, 307, 304, 304, 318, - 304, 311, 304, 304, 304, 304, 318, 304, 304, 304, - 304, 304, 304, 317, 304, 304, 317, 319, 320, 304, - - 320, 304, 304, 0, 304, 304, 304, 304, 304, 304, - 304, 304, 304, 304, 304, 304, 304, 304, 304, 304 + 306, 1, 306, 306, 306, 306, 306, 306, 307, 308, + 306, 306, 306, 306, 306, 306, 306, 309, 309, 309, + 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, + 309, 309, 309, 309, 306, 306, 306, 309, 306, 306, + 306, 306, 307, 306, 310, 306, 311, 306, 306, 306, + 306, 306, 309, 309, 309, 309, 309, 309, 309, 309, + 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, + 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, + 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, + 309, 306, 306, 306, 306, 309, 310, 311, 306, 309, + + 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, + 306, 309, 309, 309, 309, 309, 309, 309, 309, 309, + 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, + 309, 309, 309, 309, 309, 309, 309, 306, 309, 309, + 309, 309, 309, 309, 309, 309, 312, 309, 309, 306, + 309, 309, 309, 309, 309, 309, 309, 309, 309, 309, + 309, 309, 309, 309, 309, 309, 309, 309, 313, 309, + 309, 309, 309, 309, 306, 309, 309, 309, 309, 306, + 314, 309, 306, 309, 309, 309, 309, 309, 306, 309, + 309, 309, 309, 309, 309, 313, 313, 313, 313, 309, + + 309, 306, 309, 309, 309, 306, 314, 309, 306, 309, + 309, 315, 306, 309, 309, 309, 309, 309, 309, 306, + 306, 313, 313, 313, 309, 306, 309, 309, 306, 306, + 309, 309, 316, 317, 306, 309, 309, 309, 306, 306, + 306, 306, 313, 313, 313, 306, 309, 309, 306, 309, + 309, 318, 317, 306, 309, 309, 309, 306, 306, 306, + 313, 313, 313, 306, 306, 309, 318, 306, 309, 306, + 319, 306, 313, 306, 313, 306, 309, 306, 306, 320, + 306, 313, 306, 306, 306, 306, 320, 306, 306, 306, + 306, 306, 306, 319, 306, 306, 319, 321, 322, 306, + + 322, 306, 306, 306, 306, 0, 306, 306, 306, 306, + 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, + 306, 306 } ; static yyconst flex_int16_t yy_nxt[866] = @@ -586,49 +588,49 @@ static yyconst flex_int16_t yy_nxt[866] = 231, 220, 218, 206, 220, 220, 219, 220, 220, 221, 220, 229, 213, 221, 235, 221, 232, 236, 225, 209, 224, 233, 209, 228, 233, 231, 237, 238, 240, 44, - 239, 248, 53, 239, 304, 222, 249, 223, 235, 230, + 239, 248, 53, 239, 306, 222, 249, 223, 235, 230, 250, 232, 236, 242, 220, 224, 220, 220, 240, 220, - 237, 238, 221, 240, 221, 248, 251, 304, 241, 222, + 237, 238, 221, 240, 221, 248, 251, 306, 241, 222, 249, 223, 256, 242, 230, 250, 220, 242, 233, 220, 243, 233, 254, 240, 221, 255, 239, 244, 257, 239, - 258, 251, 241, 259, 260, 304, 256, 242, 266, 304, - 220, 245, 265, 220, 243, 304, 268, 254, 221, 269, - 255, 244, 257, 270, 241, 258, 261, 304, 259, 260, + 258, 251, 241, 259, 260, 306, 256, 242, 266, 306, + 220, 245, 265, 220, 243, 306, 268, 254, 221, 269, + 255, 244, 257, 270, 241, 258, 261, 306, 259, 260, 220, 220, 266, 220, 220, 245, 272, 265, 221, 221, 268, 271, 220, 269, 271, 220, 274, 270, 241, 274, 221, 261, 276, 277, 221, 278, 220, 279, 281, 220, - 272, 273, 304, 262, 221, 263, 271, 286, 304, 271, + 272, 273, 306, 262, 221, 263, 271, 286, 306, 271, 220, 285, 289, 220, 285, 275, 276, 277, 221, 221, 278, 283, 279, 281, 283, 288, 273, 262, 288, 263, - 295, 283, 286, 221, 283, 294, 304, 289, 294, 240, + 295, 283, 286, 221, 283, 294, 306, 289, 294, 240, 275, 282, 290, 292, 290, 290, 292, 290, 294, 284, - 303, 294, 296, 292, 242, 295, 292, 304, 304, 284, - 240, 240, 304, 297, 240, 282, 297, 302, 304, 304, - 291, 293, 291, 284, 303, 242, 242, 296, 242, 298, - 304, 293, 298, 284, 297, 240, 240, 297, 298, 304, - 300, 298, 302, 300, 291, 293, 291, 304, 304, 242, - 242, 287, 304, 300, 304, 293, 300, 304, 304, 304, - - 304, 304, 304, 304, 287, 304, 304, 304, 304, 304, - 304, 304, 304, 304, 304, 304, 304, 280, 304, 287, - 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, - 304, 304, 287, 43, 43, 304, 43, 43, 43, 45, - 45, 53, 53, 53, 97, 97, 97, 98, 98, 304, - 98, 98, 98, 181, 304, 304, 181, 181, 196, 304, - 304, 196, 207, 207, 207, 234, 304, 234, 234, 234, - 252, 304, 304, 252, 252, 253, 253, 253, 267, 267, - 267, 280, 304, 304, 280, 280, 287, 287, 287, 299, - 304, 304, 299, 299, 301, 304, 301, 301, 301, 3, - - 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, - 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, - 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, - 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, - 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, - 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, - 304, 304, 304, 304, 304 + 304, 294, 296, 292, 242, 295, 292, 306, 306, 284, + 240, 240, 306, 297, 240, 282, 297, 306, 306, 306, + 291, 293, 291, 284, 304, 242, 242, 296, 242, 298, + 306, 293, 298, 284, 297, 240, 240, 297, 298, 306, + 300, 298, 302, 300, 291, 293, 291, 303, 305, 242, + 242, 287, 306, 300, 306, 293, 300, 306, 306, 306, + + 306, 306, 306, 306, 287, 306, 306, 302, 306, 306, + 306, 303, 306, 305, 306, 306, 306, 280, 306, 287, + 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, + 306, 306, 287, 43, 43, 306, 43, 43, 43, 45, + 45, 53, 53, 53, 97, 97, 97, 98, 98, 306, + 98, 98, 98, 181, 306, 306, 181, 181, 196, 306, + 306, 196, 207, 207, 207, 234, 306, 234, 234, 234, + 252, 306, 306, 252, 252, 253, 253, 253, 267, 267, + 267, 280, 306, 306, 280, 280, 287, 287, 287, 299, + 306, 306, 299, 299, 301, 306, 301, 301, 301, 3, + + 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, + 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, + 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, + 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, + 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, + 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, + 306, 306, 306, 306, 306 } ; static yyconst flex_int16_t yy_chk[866] = @@ -704,30 +706,30 @@ static yyconst flex_int16_t yy_chk[866] = 291, 283, 276, 282, 283, 289, 0, 284, 289, 274, 263, 273, 285, 288, 290, 285, 288, 290, 294, 274, 302, 294, 293, 292, 274, 291, 292, 0, 0, 283, - 285, 288, 0, 295, 274, 273, 295, 300, 0, 0, + 285, 288, 0, 295, 274, 273, 295, 0, 0, 0, 285, 288, 290, 274, 302, 285, 288, 293, 274, 296, 0, 292, 296, 283, 297, 285, 288, 297, 298, 0, - 299, 298, 300, 299, 285, 288, 290, 0, 0, 285, + 299, 298, 300, 299, 285, 288, 290, 300, 303, 285, 288, 299, 0, 301, 0, 292, 301, 0, 0, 0, - 0, 0, 0, 0, 301, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 298, 0, 299, + 0, 0, 0, 0, 301, 0, 0, 300, 0, 0, + 0, 300, 0, 303, 0, 0, 0, 298, 0, 299, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 301, 305, 305, 0, 305, 305, 305, 306, - 306, 307, 307, 307, 308, 308, 308, 309, 309, 0, - 309, 309, 309, 310, 0, 0, 310, 310, 311, 0, - 0, 311, 312, 312, 312, 313, 0, 313, 313, 313, - 314, 0, 0, 314, 314, 315, 315, 315, 316, 316, - 316, 317, 0, 0, 317, 317, 318, 318, 318, 319, - 0, 0, 319, 319, 320, 0, 320, 320, 320, 304, - - 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, - 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, - 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, - 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, - 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, - 304, 304, 304, 304, 304, 304, 304, 304, 304, 304, - 304, 304, 304, 304, 304 + 0, 0, 301, 307, 307, 0, 307, 307, 307, 308, + 308, 309, 309, 309, 310, 310, 310, 311, 311, 0, + 311, 311, 311, 312, 0, 0, 312, 312, 313, 0, + 0, 313, 314, 314, 314, 315, 0, 315, 315, 315, + 316, 0, 0, 316, 316, 317, 317, 317, 318, 318, + 318, 319, 0, 0, 319, 319, 320, 320, 320, 321, + 0, 0, 321, 321, 322, 0, 322, 322, 322, 306, + + 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, + 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, + 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, + 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, + 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, + 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, + 306, 306, 306, 306, 306 } ; static yy_state_type yy_last_accepting_state; @@ -816,7 +818,7 @@ static int checkImmediate(int token) { return token; } -#line 820 "engines/director/lingo/lingo-lex.cpp" +#line 822 "engines/director/lingo/lingo-lex.cpp" #define INITIAL 0 @@ -1002,7 +1004,7 @@ YY_DECL #line 87 "engines/director/lingo/lingo-lex.l" -#line 1006 "engines/director/lingo/lingo-lex.cpp" +#line 1008 "engines/director/lingo/lingo-lex.cpp" if ( !(yy_init) ) { @@ -1056,13 +1058,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 >= 305 ) + if ( yy_current_state >= 307 ) 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 != 304 ); + while ( yy_current_state != 306 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); @@ -1674,7 +1676,7 @@ YY_RULE_SETUP #line 383 "engines/director/lingo/lingo-lex.l" ECHO; YY_BREAK -#line 1678 "engines/director/lingo/lingo-lex.cpp" +#line 1680 "engines/director/lingo/lingo-lex.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1968,7 +1970,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 >= 305 ) + if ( yy_current_state >= 307 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1996,11 +1998,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 >= 305 ) + if ( yy_current_state >= 307 ) 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 == 304); + yy_is_jam = (yy_current_state == 306); 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 13a1db9c00..cb07b80a95 100644 --- a/engines/director/lingo/lingo-lex.l +++ b/engines/director/lingo/lingo-lex.l @@ -178,7 +178,7 @@ whitespace [\t ] return FBLTINONEARG; } -(?i:the[ \t]+number[\t ]+of[\t ]+[[:alpha:]]+[\t ]in) { +(?i:the[ \t]+number[\t ]+of[\t ]+[[:alpha:]]+[\t ](in|of)) { count(); const char *ptr = &yytext[4]; // Skip 'the ' |