aboutsummaryrefslogtreecommitdiff
path: root/engines/director
diff options
context:
space:
mode:
authorEugene Sandulenko2016-07-11 10:58:32 +0200
committerEugene Sandulenko2016-08-03 23:40:36 +0200
commitd72670e29decf23c8fa7af692615ff85bc97673c (patch)
tree84c1e1349b892699e38afd2210dcc515701af238 /engines/director
parentfa4c1710d126b2d74cbdd784c59ea435cdc0d1e5 (diff)
downloadscummvm-rg350-d72670e29decf23c8fa7af692615ff85bc97673c.tar.gz
scummvm-rg350-d72670e29decf23c8fa7af692615ff85bc97673c.tar.bz2
scummvm-rg350-d72670e29decf23c8fa7af692615ff85bc97673c.zip
DIRECTOR: Lingo: Fix multiline if() statement
Diffstat (limited to 'engines/director')
-rw-r--r--engines/director/lingo/lingo-gr.cpp128
-rw-r--r--engines/director/lingo/lingo-gr.y2
2 files changed, 65 insertions, 65 deletions
diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp
index e04aacd979..b0312e3305 100644
--- a/engines/director/lingo/lingo-gr.cpp
+++ b/engines/director/lingo/lingo-gr.cpp
@@ -454,7 +454,7 @@ union yyalloc
/* YYNRULES -- Number of rules. */
#define YYNRULES 106
/* YYNRULES -- Number of states. */
-#define YYNSTATES 225
+#define YYNSTATES 224
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
@@ -506,15 +506,15 @@ static const yytype_uint16 yyprhs[] =
{
0, 0, 3, 7, 9, 12, 14, 15, 17, 19,
21, 23, 25, 30, 35, 40, 42, 44, 46, 48,
- 57, 69, 82, 91, 104, 117, 124, 135, 146, 147,
- 151, 154, 156, 159, 161, 168, 170, 176, 178, 182,
- 186, 189, 193, 195, 197, 198, 199, 200, 203, 206,
- 208, 210, 212, 217, 222, 224, 226, 230, 234, 238,
- 242, 246, 250, 254, 258, 262, 266, 270, 273, 277,
- 281, 285, 289, 292, 295, 299, 302, 305, 308, 310,
- 312, 315, 317, 321, 324, 327, 330, 333, 337, 340,
- 344, 347, 350, 352, 356, 359, 363, 364, 373, 374,
- 376, 380, 385, 386, 390, 391, 393
+ 57, 69, 82, 91, 103, 116, 123, 134, 145, 146,
+ 150, 153, 155, 158, 160, 167, 169, 175, 177, 181,
+ 185, 188, 192, 194, 196, 197, 198, 199, 202, 205,
+ 207, 209, 211, 216, 221, 223, 225, 229, 233, 237,
+ 241, 245, 249, 253, 257, 261, 265, 269, 272, 276,
+ 280, 284, 288, 291, 294, 298, 301, 304, 307, 309,
+ 311, 314, 316, 320, 323, 326, 329, 332, 336, 339,
+ 343, 346, 349, 351, 355, 358, 362, 363, 372, 373,
+ 375, 379, 384, 385, 389, 390, 392
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
@@ -530,36 +530,36 @@ static const yytype_int8 yyrhs[] =
51, 85, 83, 13, 35, 85, 83, 84, 83, 16,
32, -1, 80, 77, 34, 66, 84, 83, 16, 21,
-1, 80, 77, 34, 66, 84, 83, 38, 84, 83,
- 66, 16, 21, -1, 80, 77, 34, 66, 84, 83,
- 82, 73, 83, 66, 16, 21, -1, 80, 77, 34,
+ 16, 21, -1, 80, 77, 34, 66, 84, 83, 82,
+ 73, 83, 66, 16, 21, -1, 80, 77, 34, 82,
+ 69, 83, -1, 80, 77, 34, 82, 69, 83, 38,
82, 69, 83, -1, 80, 77, 34, 82, 69, 83,
- 38, 82, 69, 83, -1, 80, 77, 34, 82, 69,
- 83, 74, 83, 72, 83, -1, -1, 38, 82, 69,
- -1, 73, 76, -1, 76, -1, 74, 75, -1, 75,
- -1, 81, 77, 34, 82, 70, 83, -1, 74, -1,
- 81, 77, 34, 84, 83, -1, 85, -1, 85, 51,
- 85, -1, 58, 77, 59, -1, 32, 37, -1, 32,
- 36, 10, -1, 21, -1, 15, -1, -1, -1, -1,
- 84, 66, -1, 84, 70, -1, 7, -1, 8, -1,
- 11, -1, 9, 58, 96, 59, -1, 10, 58, 96,
- 59, -1, 10, -1, 68, -1, 85, 52, 85, -1,
- 85, 53, 85, -1, 85, 54, 85, -1, 85, 55,
- 85, -1, 85, 60, 85, -1, 85, 61, 85, -1,
- 85, 44, 85, -1, 85, 39, 85, -1, 85, 40,
- 85, -1, 85, 45, 85, -1, 85, 46, 85, -1,
- 47, 85, -1, 85, 62, 85, -1, 85, 48, 85,
- -1, 85, 49, 85, -1, 85, 50, 85, -1, 52,
- 85, -1, 53, 85, -1, 58, 85, 59, -1, 25,
- 11, -1, 26, 10, -1, 31, 85, -1, 88, -1,
- 17, -1, 19, 87, -1, 10, -1, 87, 63, 10,
- -1, 20, 23, -1, 20, 28, -1, 20, 30, -1,
- 20, 89, -1, 20, 89, 90, -1, 20, 90, -1,
- 35, 18, 11, -1, 18, 11, -1, 35, 11, -1,
- 11, -1, 29, 27, 11, -1, 27, 11, -1, 35,
- 27, 11, -1, -1, 24, 10, 92, 82, 93, 66,
- 94, 84, -1, -1, 10, -1, 93, 63, 10, -1,
- 93, 66, 63, 10, -1, -1, 10, 82, 96, -1,
- -1, 85, -1, 96, 63, 85, -1
+ 74, 83, 72, 83, -1, -1, 38, 82, 69, -1,
+ 73, 76, -1, 76, -1, 74, 75, -1, 75, -1,
+ 81, 77, 34, 82, 70, 83, -1, 74, -1, 81,
+ 77, 34, 84, 83, -1, 85, -1, 85, 51, 85,
+ -1, 58, 77, 59, -1, 32, 37, -1, 32, 36,
+ 10, -1, 21, -1, 15, -1, -1, -1, -1, 84,
+ 66, -1, 84, 70, -1, 7, -1, 8, -1, 11,
+ -1, 9, 58, 96, 59, -1, 10, 58, 96, 59,
+ -1, 10, -1, 68, -1, 85, 52, 85, -1, 85,
+ 53, 85, -1, 85, 54, 85, -1, 85, 55, 85,
+ -1, 85, 60, 85, -1, 85, 61, 85, -1, 85,
+ 44, 85, -1, 85, 39, 85, -1, 85, 40, 85,
+ -1, 85, 45, 85, -1, 85, 46, 85, -1, 47,
+ 85, -1, 85, 62, 85, -1, 85, 48, 85, -1,
+ 85, 49, 85, -1, 85, 50, 85, -1, 52, 85,
+ -1, 53, 85, -1, 58, 85, 59, -1, 25, 11,
+ -1, 26, 10, -1, 31, 85, -1, 88, -1, 17,
+ -1, 19, 87, -1, 10, -1, 87, 63, 10, -1,
+ 20, 23, -1, 20, 28, -1, 20, 30, -1, 20,
+ 89, -1, 20, 89, 90, -1, 20, 90, -1, 35,
+ 18, 11, -1, 18, 11, -1, 35, 11, -1, 11,
+ -1, 29, 27, 11, -1, 27, 11, -1, 35, 27,
+ 11, -1, -1, 24, 10, 92, 82, 93, 66, 94,
+ 84, -1, -1, 10, -1, 93, 63, 10, -1, 93,
+ 66, 63, 10, -1, -1, 10, 82, 96, -1, -1,
+ 85, -1, 96, 63, 85, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
@@ -637,7 +637,7 @@ static const yytype_uint8 yyr2[] =
{
0, 2, 3, 1, 2, 1, 0, 1, 1, 1,
1, 1, 4, 4, 4, 1, 1, 1, 1, 8,
- 11, 12, 8, 12, 12, 6, 10, 10, 0, 3,
+ 11, 12, 8, 11, 12, 6, 10, 10, 0, 3,
2, 1, 2, 1, 6, 1, 5, 1, 3, 3,
2, 3, 1, 1, 0, 0, 0, 2, 2, 1,
1, 1, 4, 4, 1, 1, 3, 3, 3, 3,
@@ -671,11 +671,11 @@ static const yytype_uint8 yydefact[] =
45, 0, 0, 45, 45, 16, 0, 102, 47, 48,
0, 0, 45, 44, 25, 100, 0, 46, 0, 45,
46, 0, 46, 0, 43, 44, 45, 33, 0, 101,
- 97, 19, 46, 45, 22, 0, 45, 35, 31, 0,
+ 97, 19, 46, 45, 22, 45, 45, 35, 31, 0,
0, 32, 28, 0, 45, 0, 0, 30, 0, 0,
45, 44, 45, 44, 0, 0, 0, 0, 44, 26,
- 0, 27, 0, 0, 20, 0, 0, 45, 29, 45,
- 21, 23, 24, 36, 34
+ 0, 27, 0, 0, 20, 23, 0, 45, 29, 45,
+ 21, 24, 36, 34
};
/* YYDEFGOTO[NTERM-NUM]. */
@@ -711,18 +711,18 @@ static const yytype_int16 yypact[] =
128, 342, 450, -1, -3, -161, 140, -161, 123, 450,
-161, 135, -161, 142, -161, -161, 142, -161, 349, -161,
256, -161, -161, 256, -161, 256, 142, 142, -161, 349,
- 314, -161, 120, 126, 256, 145, 81, -161, 81, 130,
- -161, -161, -161, -161, 146, 133, 151, 153, -5, -161,
- 314, -161, 285, 138, -161, 152, 157, 256, -161, -161,
- -161, -161, -161, -161, -161
+ 314, -161, 120, 126, 256, 145, 146, -161, 81, 130,
+ -161, -161, -161, -161, 149, 137, 151, 154, -5, -161,
+ 314, -161, 285, 141, -161, -161, 153, 256, -161, -161,
+ -161, -161, -161, -161
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
-161, -161, -19, 114, 6, -141, 0, -161, -161, -161,
- 8, -128, -12, -65, -161, -161, -161, -160, -4, -51,
- -117, 2, 7, -161, -161, -161, 139, -161, -161, -161,
+ 3, -128, -9, -65, -161, -161, -161, -160, -4, -51,
+ -117, 2, 7, -161, -161, -161, 138, -161, -161, -161,
-161, -161, -20
};
@@ -749,9 +749,9 @@ static const yytype_int16 yytable[] =
157, 138, 195, 147, 196, 198, 42, 143, 66, 148,
161, 43, 165, 204, 168, 44, 45, 46, 47, 209,
179, 211, 166, 48, 162, 181, 184, 174, 201, 173,
- 203, 205, 213, 169, 208, 214, 223, 215, 224, 216,
- 220, 190, 176, 221, 197, -6, 1, 206, 222, 207,
- 72, 108, 2, 3, 4, 5, 6, 0, 100, 0,
+ 203, 205, 206, 169, 208, 213, 222, 176, 223, 214,
+ 216, 190, 215, 220, 221, -6, 1, 197, 0, 207,
+ 72, 108, 2, 3, 4, 5, 6, 100, 0, 0,
0, 72, 7, 0, 8, 9, 10, 210, 0, 11,
12, 13, 0, 0, 0, 0, 14, 15, 16, 0,
0, 0, 219, 0, 0, 0, 0, 0, 0, 0,
@@ -809,9 +809,9 @@ static const yytype_int16 yycheck[] =
149, 10, 183, 131, 185, 186, 18, 59, 57, 10,
35, 23, 10, 194, 16, 27, 28, 29, 30, 200,
10, 202, 63, 35, 152, 32, 21, 15, 38, 163,
- 34, 16, 16, 161, 34, 32, 217, 16, 219, 16,
- 32, 175, 164, 21, 186, 0, 1, 196, 21, 198,
- 178, 67, 7, 8, 9, 10, 11, -1, 49, -1,
+ 34, 16, 16, 161, 34, 16, 217, 164, 219, 32,
+ 16, 175, 21, 32, 21, 0, 1, 186, -1, 198,
+ 178, 67, 7, 8, 9, 10, 11, 49, -1, -1,
-1, 189, 17, -1, 19, 20, 21, 201, -1, 24,
25, 26, -1, -1, -1, -1, 31, 32, 33, -1,
-1, -1, 212, -1, -1, -1, -1, -1, -1, -1,
@@ -875,9 +875,9 @@ static const yytype_uint8 yystos[] =
83, 16, 38, 82, 15, 38, 74, 75, 81, 10,
84, 32, 83, 84, 21, 84, 73, 74, 76, 81,
82, 75, 83, 77, 84, 83, 83, 76, 83, 77,
- 69, 38, 72, 34, 83, 16, 66, 66, 34, 83,
- 82, 83, 82, 16, 32, 16, 16, 84, 69, 70,
- 32, 21, 21, 83, 83
+ 69, 38, 72, 34, 83, 16, 16, 66, 34, 83,
+ 82, 83, 82, 16, 32, 21, 16, 84, 69, 70,
+ 32, 21, 83, 83
};
#define yyerrok (yyerrstatus = 0)
@@ -1801,12 +1801,12 @@ yyreduce:
#line 189 "engines/director/lingo/lingo-gr.y"
{
inst then = 0, else1 = 0, end = 0;
- WRITE_UINT32(&then, (yyvsp[(5) - (12)].code));
- WRITE_UINT32(&else1, (yyvsp[(8) - (12)].code));
- WRITE_UINT32(&end, (yyvsp[(9) - (12)].code));
- (*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 1] = then; /* thenpart */
- (*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 2] = else1; /* elsepart */
- (*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 3] = end; /* end, if cond fails */
+ WRITE_UINT32(&then, (yyvsp[(5) - (11)].code));
+ WRITE_UINT32(&else1, (yyvsp[(8) - (11)].code));
+ WRITE_UINT32(&end, (yyvsp[(9) - (11)].code));
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 1] = then; /* thenpart */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 2] = else1; /* elsepart */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 3] = end; /* end, if cond fails */
g_lingo->processIf(0, 0); ;}
break;
diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y
index 4e2c657519..f1b5a496db 100644
--- a/engines/director/lingo/lingo-gr.y
+++ b/engines/director/lingo/lingo-gr.y
@@ -186,7 +186,7 @@ ifstmt: if cond tTHEN nl stmtlist end tEND tIF {
(*g_lingo->_currentScript)[$1 + 1] = then; /* thenpart */
(*g_lingo->_currentScript)[$1 + 3] = end; /* end, if cond fails */
g_lingo->processIf(0, 0); }
- | if cond tTHEN nl stmtlist end tNLELSE stmtlist end nl tEND tIF {
+ | if cond tTHEN nl stmtlist end tNLELSE stmtlist end tEND tIF {
inst then = 0, else1 = 0, end = 0;
WRITE_UINT32(&then, $5);
WRITE_UINT32(&else1, $8);