aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/director/director.cpp10
-rw-r--r--engines/director/lingo/lingo-lex.cpp220
-rw-r--r--engines/director/lingo/lingo-lex.l2
3 files changed, 119 insertions, 113 deletions
diff --git a/engines/director/director.cpp b/engines/director/director.cpp
index 45f6a5afa1..edb36e7d95 100644
--- a/engines/director/director.cpp
+++ b/engines/director/director.cpp
@@ -77,16 +77,16 @@ Common::Error DirectorEngine::run() {
#if 0
_lingo->addCode("--\n\
-macro check par1, par2\n\
+macro check par1, par2 \n\
, par3\n\
if par1 = 3 then\n\
put -3\n\
else\n\
put 0\n\
-end if\n\
-if par2 = 2 then\n\
- put 2\n\
-else\n\
+end if \n\
+if par2 = 2 then \n\
+ put 2 \n\
+else \n\
put 0\n\
end if\n\
put par1\n\
diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp
index c7c7a7a641..535daacafc 100644
--- a/engines/director/lingo/lingo-lex.cpp
+++ b/engines/director/lingo/lingo-lex.cpp
@@ -373,21 +373,21 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[114] =
+static yyconst flex_int16_t yy_accept[116] =
{ 0,
- 0, 0, 38, 36, 3, 34, 34, 36, 36, 33,
- 33, 32, 33, 33, 30, 30, 30, 30, 30, 30,
- 30, 30, 30, 30, 30, 30, 30, 30, 30, 2,
- 2, 3, 34, 27, 0, 35, 1, 31, 32, 29,
- 28, 30, 30, 30, 30, 30, 30, 10, 5, 30,
- 30, 30, 30, 30, 30, 18, 30, 30, 30, 30,
- 30, 24, 30, 30, 1, 31, 30, 30, 7, 30,
- 30, 30, 30, 30, 14, 30, 30, 30, 20, 30,
- 22, 30, 30, 30, 4, 6, 8, 30, 11, 12,
- 30, 30, 30, 17, 30, 30, 23, 30, 25, 9,
-
- 13, 30, 16, 30, 30, 26, 30, 30, 21, 15,
- 30, 19, 0
+ 0, 0, 38, 36, 3, 34, 34, 36, 36, 36,
+ 33, 33, 32, 33, 33, 30, 30, 30, 30, 30,
+ 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ 2, 2, 3, 34, 0, 27, 0, 35, 1, 31,
+ 32, 29, 28, 30, 30, 30, 30, 30, 30, 10,
+ 5, 30, 30, 30, 30, 30, 30, 18, 30, 30,
+ 30, 30, 30, 24, 30, 30, 1, 31, 30, 30,
+ 7, 30, 30, 30, 30, 30, 14, 30, 30, 30,
+ 20, 30, 22, 30, 30, 30, 4, 6, 8, 30,
+ 11, 12, 30, 30, 30, 17, 30, 30, 23, 30,
+
+ 25, 9, 13, 30, 16, 30, 30, 26, 30, 30,
+ 21, 15, 30, 19, 0
} ;
static yyconst flex_int32_t yy_ec[256] =
@@ -432,108 +432,114 @@ static yyconst flex_int32_t yy_meta[56] =
4, 4, 4, 4, 4
} ;
-static yyconst flex_int16_t yy_base[117] =
+static yyconst flex_int16_t yy_base[119] =
{ 0,
- 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
+ 0, 54, 232, 255, 58, 54, 61, 64, 217, 222,
+ 255, 219, 60, 214, 185, 0, 45, 49, 45, 49,
+ 57, 51, 64, 63, 65, 57, 68, 69, 88, 90,
+ 114, 118, 122, 125, 134, 255, 138, 255, 0, 88,
+ 130, 255, 255, 0, 80, 101, 124, 120, 129, 0,
+ 0, 115, 120, 131, 126, 117, 117, 0, 134, 123,
+ 127, 125, 138, 0, 135, 128, 0, 79, 134, 142,
+ 0, 133, 146, 155, 155, 156, 152, 164, 157, 156,
+ 0, 171, 0, 166, 169, 172, 0, 0, 0, 176,
+ 0, 0, 169, 182, 180, 0, 177, 186, 0, 185,
+
+ 0, 0, 0, 188, 0, 190, 190, 0, 192, 193,
+ 0, 0, 196, 0, 255, 246, 76, 250
} ;
-static yyconst flex_int16_t yy_def[117] =
+static yyconst flex_int16_t yy_def[119] =
{ 0,
- 113, 1, 113, 113, 113, 113, 113, 113, 114, 113,
- 113, 113, 113, 113, 115, 115, 115, 115, 115, 115,
- 115, 115, 115, 115, 115, 115, 115, 115, 115, 113,
- 113, 113, 113, 113, 114, 113, 116, 113, 113, 113,
- 113, 115, 115, 115, 115, 115, 115, 115, 115, 115,
- 115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
- 115, 115, 115, 115, 116, 113, 115, 115, 115, 115,
+ 115, 1, 115, 115, 115, 115, 115, 115, 115, 116,
+ 115, 115, 115, 115, 115, 117, 117, 117, 117, 117,
+ 117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
+ 115, 115, 115, 115, 115, 115, 116, 115, 118, 115,
+ 115, 115, 115, 117, 117, 117, 117, 117, 117, 117,
+ 117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
+ 117, 117, 117, 117, 117, 117, 118, 115, 117, 117,
+ 117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
+ 117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
+ 117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
+
+ 117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
+ 117, 117, 117, 117, 0, 115, 115, 115
+ } ;
+
+static yyconst flex_int16_t yy_nxt[311] =
+ { 0,
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, 4,
+ 13, 14, 11, 15, 16, 16, 16, 17, 18, 19,
+ 20, 16, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 16, 16, 30, 16, 16, 16, 17, 18, 19,
+ 20, 16, 21, 22, 23, 24, 25, 26, 27, 28,
+ 29, 16, 16, 30, 16, 31, 34, 34, 32, 33,
+ 34, 34, 35, 34, 34, 35, 34, 34, 35, 40,
+ 41, 45, 46, 49, 47, 50, 51, 53, 54, 44,
+ 55, 57, 52, 48, 58, 59, 61, 62, 60, 68,
+ 56, 45, 46, 49, 47, 50, 51, 53, 68, 54,
+
+ 55, 57, 52, 48, 58, 59, 61, 62, 60, 63,
+ 56, 65, 66, 69, 64, 33, 34, 34, 35, 35,
+ 34, 34, 35, 33, 34, 34, 35, 34, 34, 63,
+ 70, 65, 66, 69, 64, 35, 34, 34, 35, 40,
+ 41, 71, 72, 73, 38, 74, 75, 76, 77, 78,
+ 70, 79, 80, 81, 82, 83, 84, 85, 86, 87,
+ 88, 71, 72, 89, 73, 74, 75, 76, 77, 78,
+ 90, 79, 80, 81, 82, 83, 84, 85, 86, 87,
+ 88, 91, 92, 89, 93, 94, 95, 96, 97, 98,
+ 90, 99, 100, 101, 102, 103, 104, 43, 105, 106,
+
+ 107, 91, 92, 108, 93, 94, 95, 96, 97, 98,
+ 109, 99, 100, 101, 102, 103, 110, 104, 105, 106,
+ 111, 107, 112, 108, 113, 114, 42, 39, 38, 36,
+ 109, 115, 115, 115, 115, 115, 110, 115, 115, 115,
+ 111, 115, 112, 115, 113, 114, 37, 115, 37, 37,
+ 67, 115, 115, 67, 3, 115, 115, 115, 115, 115,
115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
-
115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
- 115, 115, 0, 113, 113, 113
- } ;
-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, 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
+ 115, 115, 115, 115, 115, 115, 115, 115, 115, 115
} ;
-static yyconst flex_int16_t yy_chk[283] =
+static yyconst flex_int16_t yy_chk[311] =
{ 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, 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
+ 1, 1, 1, 1, 1, 2, 6, 6, 2, 5,
+ 5, 5, 5, 7, 7, 8, 8, 8, 8, 13,
+ 13, 17, 18, 19, 18, 20, 21, 22, 23, 117,
+ 23, 24, 21, 18, 25, 26, 27, 28, 26, 68,
+ 23, 17, 18, 19, 18, 20, 21, 22, 40, 23,
+
+ 23, 24, 21, 18, 25, 26, 27, 28, 26, 29,
+ 23, 30, 30, 45, 29, 31, 31, 31, 31, 32,
+ 32, 32, 32, 33, 33, 33, 33, 34, 34, 29,
+ 46, 30, 30, 45, 29, 35, 35, 35, 35, 41,
+ 41, 47, 48, 49, 37, 52, 53, 54, 55, 56,
+ 46, 57, 59, 60, 61, 62, 63, 65, 66, 69,
+ 70, 47, 48, 72, 49, 52, 53, 54, 55, 56,
+ 73, 57, 59, 60, 61, 62, 63, 65, 66, 69,
+ 70, 74, 75, 72, 76, 77, 78, 79, 80, 82,
+ 73, 84, 85, 86, 90, 93, 94, 15, 95, 97,
+
+ 98, 74, 75, 100, 76, 77, 78, 79, 80, 82,
+ 104, 84, 85, 86, 90, 93, 106, 94, 95, 97,
+ 107, 98, 109, 100, 110, 113, 14, 12, 10, 9,
+ 104, 3, 0, 0, 0, 0, 106, 0, 0, 0,
+ 107, 0, 109, 0, 110, 113, 116, 0, 116, 116,
+ 118, 0, 0, 118, 115, 115, 115, 115, 115, 115,
+ 115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
+ 115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
+ 115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
+ 115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
+
+ 115, 115, 115, 115, 115, 115, 115, 115, 115, 115
} ;
static yy_state_type yy_last_accepting_state;
@@ -583,7 +589,7 @@ char *yytext;
int yyparse();
-#line 587 "engines/director/lingo/lingo-lex.cpp"
+#line 593 "engines/director/lingo/lingo-lex.cpp"
#define INITIAL 0
@@ -771,7 +777,7 @@ YY_DECL
#line 45 "engines/director/lingo/lingo-lex.l"
-#line 775 "engines/director/lingo/lingo-lex.cpp"
+#line 781 "engines/director/lingo/lingo-lex.cpp"
if ( !(yy_init) )
{
@@ -825,13 +831,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 >= 114 )
+ if ( yy_current_state >= 116 )
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] != 227 );
+ while ( yy_base[yy_current_state] != 255 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
@@ -1041,7 +1047,7 @@ YY_RULE_SETUP
#line 87 "engines/director/lingo/lingo-lex.l"
ECHO;
YY_BREAK
-#line 1045 "engines/director/lingo/lingo-lex.cpp"
+#line 1051 "engines/director/lingo/lingo-lex.cpp"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1334,7 +1340,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 >= 114 )
+ if ( yy_current_state >= 116 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1362,11 +1368,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 >= 114 )
+ if ( yy_current_state >= 116 )
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 == 113);
+ yy_is_jam = (yy_current_state == 115);
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 3634df8b0f..3d92963adc 100644
--- a/engines/director/lingo/lingo-lex.l
+++ b/engines/director/lingo/lingo-lex.l
@@ -39,7 +39,7 @@ constfloat [[:digit:]]+\.[[:digit:]]*
constinteger [[:digit:]]+
conststring \"[^\"\n]*\"
operator [-+*/%=^:,()><]
-newline [\n\r]+
+newline [ \t]*[\n\r]+
whitespace [\t ]
%%