diff options
author | Eugene Sandulenko | 2016-06-25 10:27:51 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | 327e625507f34c5656e4392c07d1b73bab95b976 (patch) | |
tree | 41762dec8742bbeeed8825eea9f4a8be8cdf4bc1 /engines/director | |
parent | 0c4d0155d5e1b5d0f3319eb9329e3b0e3e81ec39 (diff) | |
download | scummvm-rg350-327e625507f34c5656e4392c07d1b73bab95b976.tar.gz scummvm-rg350-327e625507f34c5656e4392c07d1b73bab95b976.tar.bz2 scummvm-rg350-327e625507f34c5656e4392c07d1b73bab95b976.zip |
DIRECTOR: Lingo: Make all keywords case-insensitive
Diffstat (limited to 'engines/director')
-rw-r--r-- | engines/director/lingo/lingo-lex.cpp | 132 | ||||
-rw-r--r-- | engines/director/lingo/lingo-lex.l | 46 |
2 files changed, 103 insertions, 75 deletions
diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp index 106771aa47..c7c7a7a641 100644 --- a/engines/director/lingo/lingo-lex.cpp +++ b/engines/director/lingo/lingo-lex.cpp @@ -398,14 +398,14 @@ static yyconst flex_int32_t yy_ec[256] = 1, 5, 6, 7, 1, 1, 8, 1, 1, 8, 8, 8, 8, 8, 9, 10, 8, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 8, 1, 12, - 13, 14, 1, 1, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 1, 1, 1, 8, 15, 1, 16, 15, 17, 18, - - 19, 20, 21, 22, 23, 15, 15, 24, 25, 26, - 27, 28, 15, 29, 30, 31, 32, 33, 34, 35, - 15, 15, 1, 1, 1, 1, 1, 1, 1, 1, + 13, 14, 1, 1, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 16, 16, 24, 25, 26, 27, 28, + 16, 29, 30, 31, 32, 33, 34, 35, 16, 16, + 1, 1, 1, 8, 16, 1, 36, 16, 37, 38, + + 39, 40, 41, 42, 43, 16, 16, 44, 45, 46, + 47, 48, 16, 49, 50, 51, 52, 53, 54, 55, + 16, 16, 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, @@ -422,29 +422,31 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[36] = +static yyconst flex_int32_t yy_meta[56] = { 0, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 } ; static yyconst flex_int16_t yy_base[117] = { 0, - 0, 34, 133, 134, 130, 34, 37, 118, 123, 134, - 120, 32, 115, 114, 0, 99, 20, 96, 97, 25, - 96, 31, 103, 101, 20, 101, 100, 32, 34, 116, - 134, 115, 57, 134, 109, 134, 0, 104, 52, 134, - 134, 0, 80, 83, 94, 88, 94, 0, 0, 78, - 81, 90, 83, 72, 69, 0, 84, 71, 73, 69, - 80, 0, 75, 66, 0, 85, 69, 75, 0, 62, - 67, 64, 62, 60, 54, 64, 55, 52, 0, 65, - 0, 57, 58, 59, 0, 0, 0, 61, 0, 0, - 52, 62, 58, 0, 53, 59, 0, 55, 0, 0, - - 0, 50, 0, 45, 39, 0, 38, 33, 0, 0, - 23, 0, 134, 63, 46, 67 + 0, 54, 210, 227, 207, 54, 57, 195, 198, 227, + 194, 52, 188, 187, 0, 37, 41, 37, 41, 49, + 43, 56, 55, 57, 49, 60, 61, 80, 82, 197, + 227, 184, 105, 227, 109, 227, 0, 80, 100, 227, + 227, 0, 72, 82, 95, 91, 100, 0, 0, 86, + 91, 102, 97, 88, 88, 0, 109, 98, 102, 100, + 116, 0, 119, 113, 0, 71, 119, 127, 0, 116, + 127, 126, 126, 127, 123, 135, 128, 127, 0, 142, + 0, 137, 144, 147, 0, 0, 0, 151, 0, 0, + 144, 160, 163, 0, 161, 170, 0, 168, 0, 0, + + 0, 169, 0, 166, 163, 0, 164, 165, 0, 0, + 168, 0, 227, 218, 68, 222 } ; static yyconst flex_int16_t yy_def[117] = @@ -464,48 +466,74 @@ static yyconst flex_int16_t yy_def[117] = 115, 115, 0, 113, 113, 113 } ; -static yyconst flex_int16_t yy_nxt[170] = +static yyconst flex_int16_t yy_nxt[283] = { 0, 4, 5, 6, 7, 4, 8, 9, 10, 11, 4, 12, 13, 10, 14, 15, 15, 15, 16, 17, 18, 19, 15, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 15, 15, 29, 15, 15, 15, 16, 17, 18, + 19, 15, 20, 21, 22, 23, 24, 25, 26, 27, 28, 15, 15, 29, 15, 30, 33, 33, 31, 33, - 33, 38, 39, 44, 49, 45, 52, 53, 57, 42, - 50, 58, 112, 61, 46, 63, 64, 54, 62, 33, - 33, 38, 39, 35, 111, 35, 35, 65, 110, 109, - 65, 108, 107, 106, 105, 104, 103, 102, 101, 100, - 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, - 89, 88, 87, 86, 85, 66, 84, 83, 82, 81, - - 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, - 70, 69, 68, 67, 66, 36, 32, 32, 60, 59, - 56, 55, 51, 48, 47, 43, 41, 40, 37, 36, - 34, 32, 113, 3, 113, 113, 113, 113, 113, 113, + 33, 38, 39, 43, 44, 47, 45, 48, 49, 51, + 52, 42, 53, 55, 50, 46, 56, 57, 59, 60, + 58, 66, 54, 43, 44, 47, 45, 48, 49, 51, + 66, 52, 53, 55, 50, 46, 56, 57, 59, 60, + + 58, 61, 54, 63, 64, 67, 62, 33, 33, 38, + 39, 68, 69, 70, 71, 36, 72, 73, 74, 75, + 76, 61, 77, 63, 64, 67, 62, 78, 79, 80, + 81, 68, 69, 70, 82, 71, 72, 73, 74, 75, + 76, 83, 77, 84, 85, 86, 87, 78, 79, 80, + 81, 88, 89, 90, 82, 91, 92, 93, 94, 95, + 96, 83, 97, 84, 85, 86, 87, 98, 99, 100, + 101, 88, 89, 90, 102, 91, 92, 93, 94, 95, + 96, 103, 97, 104, 105, 32, 106, 98, 99, 100, + 101, 107, 108, 109, 110, 102, 111, 112, 32, 41, + + 40, 103, 37, 104, 36, 105, 106, 34, 32, 113, + 113, 107, 108, 109, 110, 113, 111, 112, 35, 113, + 35, 35, 65, 113, 113, 65, 3, 113, 113, 113, + 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, + 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, + 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, - 113, 113, 113, 113, 113, 113, 113, 113, 113 + 113, 113 } ; -static yyconst flex_int16_t yy_chk[170] = +static yyconst flex_int16_t yy_chk[283] = { 0, 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, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 6, 6, 2, 7, - 7, 12, 12, 17, 20, 17, 22, 22, 25, 115, - 20, 25, 111, 28, 17, 29, 29, 22, 28, 33, - 33, 39, 39, 114, 108, 114, 114, 116, 107, 105, - 116, 104, 102, 98, 96, 95, 93, 92, 91, 88, - 84, 83, 82, 80, 78, 77, 76, 75, 74, 73, - 72, 71, 70, 68, 67, 66, 64, 63, 61, 60, - - 59, 58, 57, 55, 54, 53, 52, 51, 50, 47, - 46, 45, 44, 43, 38, 35, 32, 30, 27, 26, - 24, 23, 21, 19, 18, 16, 14, 13, 11, 9, - 8, 5, 3, 113, 113, 113, 113, 113, 113, 113, + 7, 12, 12, 16, 17, 18, 17, 19, 20, 21, + 22, 115, 22, 23, 20, 17, 24, 25, 26, 27, + 25, 66, 22, 16, 17, 18, 17, 19, 20, 21, + 38, 22, 22, 23, 20, 17, 24, 25, 26, 27, + + 25, 28, 22, 29, 29, 43, 28, 33, 33, 39, + 39, 44, 45, 46, 47, 35, 50, 51, 52, 53, + 54, 28, 55, 29, 29, 43, 28, 57, 58, 59, + 60, 44, 45, 46, 61, 47, 50, 51, 52, 53, + 54, 63, 55, 64, 67, 68, 70, 57, 58, 59, + 60, 71, 72, 73, 61, 74, 75, 76, 77, 78, + 80, 63, 82, 64, 67, 68, 70, 83, 84, 88, + 91, 71, 72, 73, 92, 74, 75, 76, 77, 78, + 80, 93, 82, 95, 96, 32, 98, 83, 84, 88, + 91, 102, 104, 105, 107, 92, 108, 111, 30, 14, + + 13, 93, 11, 95, 9, 96, 98, 8, 5, 3, + 0, 102, 104, 105, 107, 0, 108, 111, 114, 0, + 114, 114, 116, 0, 0, 116, 113, 113, 113, 113, + 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, + 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, + 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, - 113, 113, 113, 113, 113, 113, 113, 113, 113 + 113, 113 } ; static yy_state_type yy_last_accepting_state; @@ -555,7 +583,7 @@ char *yytext; int yyparse(); -#line 559 "engines/director/lingo/lingo-lex.cpp" +#line 587 "engines/director/lingo/lingo-lex.cpp" #define INITIAL 0 @@ -743,7 +771,7 @@ YY_DECL #line 45 "engines/director/lingo/lingo-lex.l" -#line 747 "engines/director/lingo/lingo-lex.cpp" +#line 775 "engines/director/lingo/lingo-lex.cpp" if ( !(yy_init) ) { @@ -803,7 +831,7 @@ yy_match: yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 134 ); + while ( yy_base[yy_current_state] != 227 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1013,7 +1041,7 @@ YY_RULE_SETUP #line 87 "engines/director/lingo/lingo-lex.l" ECHO; YY_BREAK -#line 1017 "engines/director/lingo/lingo-lex.cpp" +#line 1045 "engines/director/lingo/lingo-lex.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l index df33121e74..3634df8b0f 100644 --- a/engines/director/lingo/lingo-lex.l +++ b/engines/director/lingo/lingo-lex.l @@ -48,29 +48,29 @@ whitespace [\t ] ^{whitespace} [\t]+ { return ' '; } -down { return tDOWN; } -if { return tIF; } -else { return tELSE; } -end { return tEND; } -exit { return tEXIT; } -frame { return tFRAME; } -go { return tGO; } -into { return tINTO; } -loop { return tLOOP; } -macro { return tMACRO; } -mci { return tMCI; } -mciwait { return tMCIWAIT; } -movie { return tMOVIE; } -next { return tNEXT; } -of { return tOF; } -previous { return tPREVIOUS; } -put { return tPUT; } -repeat { return tREPEAT; } -set { return tSET; } -then { return tTHEN; } -to { return tTO; } -with { return tWITH; } -while { return tWHILE; } +(?i:down) { return tDOWN; } +(?i:if) { return tIF; } +(?i:else) { return tELSE; } +(?i:end) { return tEND; } +(?i:exit) { return tEXIT; } +(?i:frame) { return tFRAME; } +(?i:go) { return tGO; } +(?i:into) { return tINTO; } +(?i:loop) { return tLOOP; } +(?i:macro) { return tMACRO; } +(?i:mci) { return tMCI; } +(?i:mciwait) { return tMCIWAIT; } +(?i:movie) { return tMOVIE; } +(?i:next) { return tNEXT; } +(?i:of) { return tOF; } +(?i:previous) { return tPREVIOUS; } +(?i:put) { return tPUT; } +(?i:repeat) { return tREPEAT; } +(?i:set) { return tSET; } +(?i:then) { return tTHEN; } +(?i:to) { return tTO; } +(?i:with) { return tWITH; } +(?i:while) { return tWHILE; } [!][=] { return tNEQ; } [>][=] { return tGE; } |