diff options
author | Eugene Sandulenko | 2019-12-31 13:13:19 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2019-12-31 16:27:28 +0100 |
commit | ccb0aa0bb1be057e2bde400f732f04a0cfce39ac (patch) | |
tree | af1ab718a51d7c0d28cfbb1a92a01ab6937e9ead | |
parent | fe9c19db1527eb33756ae8eacd8b011f9cc95ef4 (diff) | |
download | scummvm-rg350-ccb0aa0bb1be057e2bde400f732f04a0cfce39ac.tar.gz scummvm-rg350-ccb0aa0bb1be057e2bde400f732f04a0cfce39ac.tar.bz2 scummvm-rg350-ccb0aa0bb1be057e2bde400f732f04a0cfce39ac.zip |
DIRECTOR: LINGO: Allow numbers in object names
-rw-r--r-- | engines/director/lingo/lingo-lex.cpp | 224 | ||||
-rw-r--r-- | engines/director/lingo/lingo-lex.l | 2 |
2 files changed, 115 insertions, 111 deletions
diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp index d114f77c93..58cc534724 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[297] = +static yyconst flex_int16_t yy_accept[298] = { 0, 0, 0, 76, 74, 4, 72, 72, 74, 74, 74, 71, 71, 71, 70, 71, 67, 71, 68, 68, 68, @@ -405,8 +405,8 @@ static yyconst flex_int16_t yy_accept[297] = 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 + 53, 0, 0, 0, 0, 0, 20, 52, 0, 0, + 0, 0, 49, 50, 51, 51, 0 } ; @@ -453,18 +453,18 @@ static yyconst flex_int32_t yy_meta[66] = 5, 5, 5, 5, 1 } ; -static yyconst flex_int16_t yy_base[310] = +static yyconst flex_int16_t yy_base[312] = { 0, - 0, 64, 554, 743, 68, 743, 743, 72, 492, 0, - 743, 426, 418, 55, 63, 743, 365, 59, 59, 59, + 0, 64, 554, 747, 68, 747, 747, 72, 492, 0, + 747, 426, 418, 55, 63, 747, 365, 59, 59, 59, 55, 63, 0, 64, 75, 70, 100, 77, 110, 102, - 98, 129, 128, 131, 83, 166, 187, 293, 191, 743, - 195, 144, 320, 743, 0, 743, 0, 305, 160, 743, - 743, 743, 0, 66, 131, 156, 162, 74, 173, 149, + 98, 129, 128, 131, 83, 166, 187, 293, 191, 747, + 195, 144, 320, 747, 0, 747, 0, 305, 160, 747, + 747, 747, 0, 66, 131, 156, 162, 74, 173, 149, 167, 180, 156, 91, 0, 174, 193, 172, 186, 198, 184, 200, 183, 188, 0, 0, 203, 0, 211, 208, 192, 210, 209, 215, 233, 228, 236, 0, 238, 231, - 234, 743, 290, 294, 271, 225, 0, 0, 223, 237, + 234, 747, 290, 294, 271, 225, 0, 0, 223, 237, 0, 246, 244, 243, 243, 251, 260, 213, 250, 268, 268, 270, 286, 282, 266, 283, 282, 284, 0, 292, @@ -479,57 +479,59 @@ static yyconst flex_int16_t yy_base[310] = 421, 86, 79, 0, 427, 415, 0, 0, 466, 426, 431, 470, 440, 448, 442, 444, 0, 0, 0, 479, - 470, 484, 502, 517, 0, 42, 20, 448, 743, 460, + 470, 484, 502, 517, 0, 42, 20, 448, 747, 460, 464, 476, 521, 0, 479, 479, 474, 476, 526, 513, 514, 512, 541, 543, 547, 18, 0, 0, 522, 0, 499, 0, 0, 513, 520, 0, 0, 515, 558, 538, - 565, 567, 577, 743, 545, 547, 0, 563, 0, 564, - 584, 567, 591, 599, 589, 571, 0, 743, 743, 601, - 743, 610, 573, 622, 586, 626, 743, 620, 630, 636, - 592, 646, 652, 657, 658, 743, 690, 692, 695, 698, + 565, 567, 577, 747, 545, 547, 0, 563, 0, 564, + 584, 567, 591, 599, 589, 571, 0, 747, 747, 0, + 747, 601, 573, 610, 586, 622, 747, 0, 620, 630, + 636, 592, 641, 646, 654, 658, 747, 690, 692, 695, - 704, 709, 714, 716, 721, 726, 729, 732, 737 + 698, 704, 709, 714, 716, 721, 726, 729, 732, 737, + 740 } ; -static yyconst flex_int16_t yy_def[310] = +static yyconst flex_int16_t yy_def[312] = { 0, - 296, 1, 296, 296, 296, 296, 296, 296, 297, 298, - 296, 296, 296, 296, 296, 296, 296, 299, 299, 299, - 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, - 299, 299, 299, 299, 296, 296, 296, 299, 296, 296, - 296, 296, 297, 296, 300, 296, 301, 296, 296, 296, - 296, 296, 299, 299, 299, 299, 299, 299, 299, 299, - 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, - 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, - 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, - 299, 296, 296, 296, 296, 299, 300, 301, 296, 299, - - 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, - 296, 299, 299, 299, 299, 299, 299, 299, 299, 299, - 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, - 299, 299, 299, 299, 299, 299, 299, 296, 299, 299, - 299, 299, 299, 299, 299, 299, 302, 299, 299, 296, - 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, - 299, 299, 299, 299, 299, 299, 299, 299, 303, 299, - 299, 299, 299, 299, 296, 299, 299, 299, 299, 296, - 304, 299, 296, 299, 299, 299, 299, 299, 296, 299, - 299, 299, 299, 299, 299, 303, 303, 303, 303, 299, - - 299, 296, 299, 299, 299, 296, 304, 299, 296, 299, - 299, 305, 296, 299, 299, 299, 299, 299, 299, 296, - 296, 303, 303, 303, 299, 296, 299, 299, 296, 296, - 299, 299, 306, 307, 296, 299, 299, 299, 296, 296, - 296, 296, 303, 303, 303, 296, 299, 299, 296, 299, - 299, 308, 307, 296, 299, 299, 299, 296, 296, 296, - 303, 303, 303, 296, 296, 299, 308, 296, 299, 296, - 309, 296, 296, 296, 303, 296, 299, 296, 296, 309, - 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, - 296, 309, 309, 296, 309, 0, 296, 296, 296, 296, - - 296, 296, 296, 296, 296, 296, 296, 296, 296 + 297, 1, 297, 297, 297, 297, 297, 297, 298, 299, + 297, 297, 297, 297, 297, 297, 297, 300, 300, 300, + 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, + 300, 300, 300, 300, 297, 297, 297, 300, 297, 297, + 297, 297, 298, 297, 301, 297, 302, 297, 297, 297, + 297, 297, 300, 300, 300, 300, 300, 300, 300, 300, + 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, + 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, + 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, + 300, 297, 297, 297, 297, 300, 301, 302, 297, 300, + + 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, + 297, 300, 300, 300, 300, 300, 300, 300, 300, 300, + 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, + 300, 300, 300, 300, 300, 300, 300, 297, 300, 300, + 300, 300, 300, 300, 300, 300, 303, 300, 300, 297, + 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, + 300, 300, 300, 300, 300, 300, 300, 300, 304, 300, + 300, 300, 300, 300, 297, 300, 300, 300, 300, 297, + 305, 300, 297, 300, 300, 300, 300, 300, 297, 300, + 300, 300, 300, 300, 300, 304, 304, 304, 304, 300, + + 300, 297, 300, 300, 300, 297, 305, 300, 297, 300, + 300, 306, 297, 300, 300, 300, 300, 300, 300, 297, + 297, 304, 304, 304, 300, 297, 300, 300, 297, 297, + 300, 300, 307, 308, 297, 300, 300, 300, 297, 297, + 297, 297, 304, 304, 304, 297, 300, 300, 297, 300, + 300, 309, 308, 297, 300, 300, 300, 297, 297, 297, + 304, 304, 304, 297, 297, 300, 309, 297, 300, 297, + 310, 297, 297, 297, 304, 297, 300, 297, 297, 311, + 297, 297, 297, 297, 297, 297, 297, 311, 297, 297, + 297, 297, 310, 310, 297, 310, 0, 297, 297, 297, + + 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, + 297 } ; -static yyconst flex_int16_t yy_nxt[809] = +static yyconst flex_int16_t yy_nxt[813] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 11, 13, 4, 14, 15, 16, 17, 18, 19, 20, 21, @@ -591,38 +593,39 @@ static yyconst flex_int16_t yy_nxt[809] = 254, 220, 233, 240, 255, 233, 221, 239, 242, 258, 239, 256, 241, 266, 244, 259, 260, 242, 265, 257, 268, 243, 220, 245, 220, 220, 269, 220, 220, 270, - 221, 220, 221, 296, 258, 241, 221, 266, 244, 271, + 221, 220, 221, 297, 258, 241, 221, 266, 244, 271, 259, 260, 271, 265, 268, 272, 273, 245, 274, 273, 269, 274, 276, 270, 221, 261, 221, 262, 220, 241, 277, 220, 263, 278, 279, 271, 221, 281, 271, 272, - 286, 287, 282, 286, 288, 282, 276, 275, 221, 261, - - 284, 262, 296, 284, 277, 296, 263, 289, 278, 279, - 240, 282, 281, 294, 282, 296, 287, 296, 240, 288, - 283, 292, 275, 284, 292, 242, 284, 290, 285, 296, - 290, 293, 289, 242, 293, 240, 296, 290, 294, 283, - 290, 296, 296, 240, 283, 240, 296, 292, 296, 242, - 292, 285, 285, 293, 296, 291, 293, 242, 295, 295, - 242, 295, 295, 283, 296, 291, 296, 296, 296, 296, - 240, 296, 296, 296, 296, 285, 296, 296, 296, 291, - 296, 296, 296, 296, 242, 296, 296, 296, 296, 291, - 43, 43, 296, 43, 43, 43, 45, 45, 53, 53, - - 53, 97, 97, 97, 98, 98, 296, 98, 98, 98, - 181, 296, 296, 181, 181, 196, 296, 296, 196, 207, - 207, 207, 234, 296, 234, 234, 234, 252, 296, 296, - 252, 252, 253, 253, 253, 267, 267, 267, 280, 296, - 296, 280, 3, 296, 296, 296, 296, 296, 296, 296, - 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, - 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, - 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, - 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, - 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, - - 296, 296, 296, 296, 296, 296, 296, 296 + 286, 287, 282, 286, 289, 282, 276, 275, 221, 261, + + 284, 262, 282, 284, 277, 282, 263, 290, 278, 279, + 240, 284, 281, 295, 284, 297, 287, 297, 240, 289, + 283, 293, 275, 291, 293, 242, 291, 297, 285, 297, + 283, 294, 290, 242, 294, 240, 297, 291, 295, 285, + 291, 240, 293, 240, 283, 293, 297, 294, 297, 242, + 294, 292, 285, 297, 283, 296, 242, 242, 296, 296, + 297, 297, 296, 285, 297, 292, 240, 297, 297, 297, + 297, 297, 297, 297, 297, 292, 297, 297, 297, 297, + 242, 297, 297, 297, 297, 297, 297, 297, 297, 292, + 43, 43, 297, 43, 43, 43, 45, 45, 53, 53, + + 53, 97, 97, 97, 98, 98, 297, 98, 98, 98, + 181, 297, 297, 181, 181, 196, 297, 297, 196, 207, + 207, 207, 234, 297, 234, 234, 234, 252, 297, 297, + 252, 252, 253, 253, 253, 267, 267, 267, 280, 297, + 297, 280, 280, 288, 288, 288, 3, 297, 297, 297, + 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, + 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, + 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, + 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, + 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, + + 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, + 297, 297 } ; -static yyconst flex_int16_t yy_chk[809] = +static yyconst flex_int16_t yy_chk[813] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -690,29 +693,30 @@ static yyconst flex_int16_t yy_chk[809] = 266, 263, 245, 268, 270, 271, 263, 272, 271, 260, 275, 276, 273, 275, 283, 273, 265, 263, 275, 243, - 274, 244, 280, 274, 266, 280, 245, 285, 268, 270, - 273, 282, 272, 291, 282, 0, 276, 0, 274, 283, - 273, 288, 263, 284, 288, 273, 284, 286, 274, 0, - 286, 289, 285, 274, 289, 273, 0, 290, 291, 282, - 290, 0, 0, 274, 273, 286, 0, 292, 0, 273, - 292, 284, 274, 293, 0, 286, 293, 274, 294, 295, - 286, 294, 295, 282, 0, 290, 0, 0, 0, 0, - 286, 0, 0, 0, 0, 284, 0, 0, 0, 286, - 0, 0, 0, 0, 286, 0, 0, 0, 0, 290, - 297, 297, 0, 297, 297, 297, 298, 298, 299, 299, - - 299, 300, 300, 300, 301, 301, 0, 301, 301, 301, - 302, 0, 0, 302, 302, 303, 0, 0, 303, 304, - 304, 304, 305, 0, 305, 305, 305, 306, 0, 0, - 306, 306, 307, 307, 307, 308, 308, 308, 309, 0, - 0, 309, 296, 296, 296, 296, 296, 296, 296, 296, - 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, - 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, - 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, - 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, - 296, 296, 296, 296, 296, 296, 296, 296, 296, 296, - - 296, 296, 296, 296, 296, 296, 296, 296 + 274, 244, 282, 274, 266, 282, 245, 285, 268, 270, + 273, 284, 272, 292, 284, 0, 276, 0, 274, 283, + 273, 289, 263, 286, 289, 273, 286, 0, 274, 0, + 282, 290, 285, 274, 290, 273, 0, 291, 292, 284, + 291, 286, 293, 274, 273, 293, 0, 294, 0, 273, + 294, 286, 274, 0, 282, 295, 286, 274, 295, 296, + 0, 0, 296, 284, 0, 291, 286, 0, 0, 0, + 0, 0, 0, 0, 0, 286, 0, 0, 0, 0, + 286, 0, 0, 0, 0, 0, 0, 0, 0, 291, + 298, 298, 0, 298, 298, 298, 299, 299, 300, 300, + + 300, 301, 301, 301, 302, 302, 0, 302, 302, 302, + 303, 0, 0, 303, 303, 304, 0, 0, 304, 305, + 305, 305, 306, 0, 306, 306, 306, 307, 0, 0, + 307, 307, 308, 308, 308, 309, 309, 309, 310, 0, + 0, 310, 310, 311, 311, 311, 297, 297, 297, 297, + 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, + 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, + 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, + 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, + 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, + + 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, + 297, 297 } ; static yy_state_type yy_last_accepting_state; @@ -801,7 +805,7 @@ static int checkImmediate(int token) { return token; } -#line 805 "engines/director/lingo/lingo-lex.cpp" +#line 809 "engines/director/lingo/lingo-lex.cpp" #define INITIAL 0 @@ -987,7 +991,7 @@ YY_DECL #line 87 "engines/director/lingo/lingo-lex.l" -#line 991 "engines/director/lingo/lingo-lex.cpp" +#line 995 "engines/director/lingo/lingo-lex.cpp" if ( !(yy_init) ) { @@ -1041,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 >= 297 ) + if ( yy_current_state >= 298 ) 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 != 296 ); + while ( yy_current_state != 297 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); @@ -1644,7 +1648,7 @@ YY_RULE_SETUP #line 368 "engines/director/lingo/lingo-lex.l" ECHO; YY_BREAK -#line 1648 "engines/director/lingo/lingo-lex.cpp" +#line 1652 "engines/director/lingo/lingo-lex.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1938,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 >= 297 ) + if ( yy_current_state >= 298 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1966,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 >= 297 ) + if ( yy_current_state >= 298 ) 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 == 296); + yy_is_jam = (yy_current_state == 297); 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 b3928730eb..4c9b1f1411 100644 --- a/engines/director/lingo/lingo-lex.l +++ b/engines/director/lingo/lingo-lex.l @@ -186,7 +186,7 @@ whitespace [\t ] return FBLTINONEARG; } -(?i:the[ \t]+[[:alpha:]]+[\t ]+of[\t ]+[[:alpha:]]+) { +(?i:the[ \t]+[[:alpha:]]+[\t ]+of[\t ]+{identifier}) { count(); const char *ptr = &yytext[4]; // Skip 'the ' |