diff options
author | Eugene Sandulenko | 2016-06-11 22:43:05 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | 824c3fb6616b9afa65ac3db5d2c8d97a26004dd8 (patch) | |
tree | 5ead080d129dbbd329accf012b68ae4571279b25 /engines/director/lingo/lingo-lex.cpp | |
parent | e4428587b763b0f1da48de9decf251f98ddd3f00 (diff) | |
download | scummvm-rg350-824c3fb6616b9afa65ac3db5d2c8d97a26004dd8.tar.gz scummvm-rg350-824c3fb6616b9afa65ac3db5d2c8d97a26004dd8.tar.bz2 scummvm-rg350-824c3fb6616b9afa65ac3db5d2c8d97a26004dd8.zip |
DIRECTOR: Added stub for 'mci' Lingo command
Diffstat (limited to 'engines/director/lingo/lingo-lex.cpp')
-rw-r--r-- | engines/director/lingo/lingo-lex.cpp | 105 |
1 files changed, 56 insertions, 49 deletions
diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp index 5379ceb861..d0391b6721 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 5 -#define YY_END_OF_BUFFER 6 +#define YY_NUM_RULES 6 +#define YY_END_OF_BUFFER 7 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -373,9 +373,10 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[11] = +static yyconst flex_int16_t yy_accept[17] = { 0, - 0, 0, 6, 4, 3, 2, 1, 2, 1, 0 + 0, 0, 7, 6, 6, 4, 3, 2, 2, 0, + 5, 3, 2, 2, 1, 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -383,17 +384,17 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 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, 3, 1, 1, 1, - 1, 3, 3, 3, 3, 1, 3, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 3, 1, 1, - 3, 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, 5, 5, - 1, 1, 1, 3, 5, 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, - 5, 5, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 3, 1, 1, 4, 1, 1, 1, + 1, 4, 4, 4, 4, 1, 4, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 4, 1, 1, + 4, 1, 1, 1, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 1, 1, 1, 4, 6, 1, 6, 6, 7, 6, + + 6, 6, 6, 6, 8, 6, 6, 6, 9, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 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, @@ -410,33 +411,35 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[6] = +static yyconst flex_int32_t yy_meta[10] = { 0, - 1, 1, 1, 2, 3 + 1, 2, 1, 1, 3, 3, 3, 3, 3 } ; -static yyconst flex_int16_t yy_base[13] = +static yyconst flex_int16_t yy_base[19] = { 0, - 0, 0, 9, 10, 10, 0, 0, 0, 0, 10, - 6, 4 + 0, 0, 19, 20, 15, 20, 12, 0, 9, 12, + 20, 9, 0, 5, 0, 20, 9, 8 } ; -static yyconst flex_int16_t yy_def[13] = +static yyconst flex_int16_t yy_def[19] = { 0, - 10, 1, 10, 10, 10, 11, 12, 11, 12, 0, - 10, 10 + 16, 1, 16, 16, 17, 16, 16, 18, 18, 17, + 16, 16, 18, 18, 18, 0, 16, 16 } ; -static yyconst flex_int16_t yy_nxt[16] = +static yyconst flex_int16_t yy_nxt[30] = { 0, - 4, 4, 5, 6, 7, 9, 9, 8, 10, 3, - 10, 10, 10, 10, 10 + 4, 4, 5, 6, 7, 8, 8, 8, 9, 10, + 13, 10, 15, 12, 11, 14, 12, 11, 16, 3, + 16, 16, 16, 16, 16, 16, 16, 16, 16 } ; -static yyconst flex_int16_t yy_chk[16] = +static yyconst flex_int16_t yy_chk[30] = { 0, - 1, 1, 1, 1, 1, 12, 12, 11, 3, 10, - 10, 10, 10, 10, 10 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 17, + 18, 17, 14, 12, 10, 9, 7, 5, 3, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16 } ; static yy_state_type yy_last_accepting_state; @@ -486,7 +489,7 @@ char *yytext; void yyparse(); -#line 490 "engines/director/lingo/lingo-lex.cpp" +#line 493 "engines/director/lingo/lingo-lex.cpp" #define INITIAL 0 @@ -668,10 +671,10 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -#line 37 "engines/director/lingo/lingo-lex.l" +#line 42 "engines/director/lingo/lingo-lex.l" -#line 675 "engines/director/lingo/lingo-lex.cpp" +#line 678 "engines/director/lingo/lingo-lex.cpp" if ( !(yy_init) ) { @@ -724,13 +727,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 >= 11 ) + if ( yy_current_state >= 17 ) 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] != 10 ); + while ( yy_base[yy_current_state] != 20 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -756,31 +759,35 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 39 "engines/director/lingo/lingo-lex.l" -yylval.s = new Common::String(yytext); return VAR; +#line 44 "engines/director/lingo/lingo-lex.l" +{ return FUNC_MCI; } YY_BREAK case 2: YY_RULE_SETUP -#line 40 "engines/director/lingo/lingo-lex.l" -yylval.i = strtol(yytext, NULL, 10); return INT; +#line 45 "engines/director/lingo/lingo-lex.l" +{ yylval.s = new Common::String(yytext); return VAR; } YY_BREAK case 3: YY_RULE_SETUP -#line 41 "engines/director/lingo/lingo-lex.l" -return *yytext; +#line 46 "engines/director/lingo/lingo-lex.l" +{ yylval.i = strtol(yytext, NULL, 10); return INT; } YY_BREAK case 4: -/* rule 4 can match eol */ YY_RULE_SETUP -#line 42 "engines/director/lingo/lingo-lex.l" -; /* ignore all the rest */ +#line 47 "engines/director/lingo/lingo-lex.l" +{ return *yytext; } YY_BREAK case 5: YY_RULE_SETUP -#line 44 "engines/director/lingo/lingo-lex.l" +#line 48 "engines/director/lingo/lingo-lex.l" +{ yylval.s = new Common::String(yytext); return STRING; } + YY_BREAK +case 6: +YY_RULE_SETUP +#line 50 "engines/director/lingo/lingo-lex.l" ECHO; YY_BREAK -#line 784 "engines/director/lingo/lingo-lex.cpp" +#line 791 "engines/director/lingo/lingo-lex.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1072,7 +1079,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 >= 11 ) + if ( yy_current_state >= 17 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1100,11 +1107,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 >= 11 ) + if ( yy_current_state >= 17 ) 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 == 10); + yy_is_jam = (yy_current_state == 16); return yy_is_jam ? 0 : yy_current_state; } @@ -1777,7 +1784,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 44 "engines/director/lingo/lingo-lex.l" +#line 50 "engines/director/lingo/lingo-lex.l" |