aboutsummaryrefslogtreecommitdiff
path: root/engines/director
diff options
context:
space:
mode:
authorEugene Sandulenko2017-01-09 23:01:47 +0100
committerEugene Sandulenko2017-01-09 23:01:47 +0100
commit0e20548c157f21e14381110d92b539c27bb9ef63 (patch)
treea01e492e5e59d806243f3d26811e033c045969b1 /engines/director
parent83c4cd19f0d964971991c073815832e1403fc025 (diff)
downloadscummvm-rg350-0e20548c157f21e14381110d92b539c27bb9ef63.tar.gz
scummvm-rg350-0e20548c157f21e14381110d92b539c27bb9ef63.tar.bz2
scummvm-rg350-0e20548c157f21e14381110d92b539c27bb9ef63.zip
DIRECTOR: Lingo: Disable ID presence requirement for handlers
It looks like they are optional. The proper grammar change will follow
Diffstat (limited to 'engines/director')
-rw-r--r--engines/director/lingo/lingo-gr.cpp75
-rw-r--r--engines/director/lingo/lingo-gr.y8
2 files changed, 41 insertions, 42 deletions
diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp
index d4b25c786e..ab17a35691 100644
--- a/engines/director/lingo/lingo-gr.cpp
+++ b/engines/director/lingo/lingo-gr.cpp
@@ -505,7 +505,7 @@ union yyalloc
/* YYNRULES -- Number of rules. */
#define YYNRULES 134
/* YYNRULES -- Number of states. */
-#define YYNSTATES 283
+#define YYNSTATES 282
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
@@ -569,8 +569,8 @@ static const yytype_uint16 yyprhs[] =
353, 355, 358, 361, 364, 367, 369, 372, 377, 380,
384, 386, 390, 392, 396, 399, 402, 405, 408, 412,
415, 418, 420, 424, 427, 430, 433, 437, 440, 441,
- 450, 453, 454, 463, 464, 465, 477, 478, 480, 484,
- 489, 490, 494, 495, 497
+ 450, 453, 454, 463, 464, 465, 476, 477, 479, 483,
+ 488, 489, 493, 494, 496
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
@@ -623,10 +623,9 @@ static const yytype_int8 yyrhs[] =
-1, 35, 21, 118, 105, 122, 89, 123, 107, -1,
49, 21, -1, -1, 50, 21, 119, 105, 122, 89,
123, 107, -1, -1, -1, 72, 21, 120, 105, 121,
- 122, 89, 123, 107, 27, 21, -1, -1, 21, -1,
- 122, 86, 21, -1, 122, 89, 86, 21, -1, -1,
- 21, 105, 125, -1, -1, 109, -1, 125, 86, 109,
- -1
+ 122, 89, 123, 107, 27, -1, -1, 21, -1, 122,
+ 86, 21, -1, 122, 89, 86, 21, -1, -1, 21,
+ 105, 125, -1, -1, 109, -1, 125, 86, 109, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
@@ -727,7 +726,7 @@ static const yytype_uint8 yyr2[] =
1, 2, 2, 2, 2, 1, 2, 4, 2, 3,
1, 3, 1, 3, 2, 2, 2, 2, 3, 2,
2, 1, 3, 2, 2, 2, 3, 2, 0, 8,
- 2, 0, 8, 0, 0, 11, 0, 1, 3, 4,
+ 2, 0, 8, 0, 0, 10, 0, 1, 3, 4,
0, 3, 0, 1, 3
};
@@ -762,9 +761,9 @@ static const yytype_uint8 yydefact[] =
49, 50, 38, 0, 129, 119, 122, 51, 23, 51,
50, 27, 50, 50, 40, 36, 0, 0, 37, 33,
0, 0, 50, 0, 0, 35, 0, 0, 50, 49,
- 50, 49, 0, 0, 0, 0, 0, 49, 31, 0,
- 32, 0, 125, 0, 24, 28, 29, 50, 34, 50,
- 25, 41, 39
+ 50, 49, 125, 0, 0, 0, 0, 49, 31, 0,
+ 32, 0, 0, 24, 28, 29, 50, 34, 50, 25,
+ 41, 39
};
/* YYDEFGOTO[NTERM-NUM]. */
@@ -807,17 +806,17 @@ static const yytype_int16 yypact[] =
-217, 110, -217, 776, -217, 483, 483, -217, -217, -217,
483, -217, 483, 110, 110, -217, 776, 620, -217, 112,
119, 412, 483, 114, 115, -217, 136, 123, -217, -217,
- -217, -217, 116, 141, 129, 142, 145, -20, -217, 620,
- -217, 554, -217, 139, -217, -217, -217, 483, -217, -217,
- -217, -217, -217
+ -217, -217, -217, 141, 96, 138, 142, -20, -217, 620,
+ -217, 554, 139, -217, -217, -217, 483, -217, -217, -217,
+ -217, -217
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -217, -217, 12, 84, 4, -182, 0, -217, -217, -217,
- -33, -216, -58, -68, -217, -217, -217, -205, -9, 22,
- -23, -217, 40, 5, -217, -217, -217, 162, -16, -217,
+ -217, -217, 12, 80, 4, -182, 0, -217, -217, -217,
+ -36, -216, -59, -68, -217, -217, -217, -205, -9, 22,
+ -23, -217, 40, 5, -217, -217, -217, 161, -16, -217,
-217, -217, -217, -217, -217, -157, -170, -217, -50
};
@@ -836,29 +835,29 @@ static const yytype_int16 yytable[] =
136, 49, 237, 73, 70, 128, 110, 74, 61, 75,
76, -51, 80, 83, 70, 258, 89, 90, 81, 140,
93, 94, 95, 82, 118, 119, 87, 77, 78, 91,
- 92, 102, 103, 49, -10, 79, 127, 278, 98, 99,
+ 92, 102, 103, 49, -10, 79, 127, 277, 98, 99,
172, 59, 120, 121, 121, 131, 137, 37, 173, 57,
57, 35, 44, 152, 125, 124, 126, 141, 107, 108,
176, 109, 110, 185, 189, 195, 191, 214, 134, 218,
175, 113, 114, 115, 116, 117, 223, 234, 219, 183,
- 118, 119, 57, 241, 238, 188, 229, 272, 102, 149,
+ 118, 119, 57, 241, 238, 188, 229, 273, 102, 149,
151, 264, 265, 193, 155, 156, 157, 158, 159, 160,
161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
- 259, 171, 261, 266, 192, 250, 267, 174, 273, 204,
- 274, 190, 177, 178, 275, 181, 182, 276, 257, 184,
- 280, 147, 186, 187, 231, 255, 85, 0, 0, 0,
+ 259, 171, 261, 266, 192, 250, 267, 174, 272, 204,
+ 274, 190, 177, 178, 275, 181, 182, 147, 257, 184,
+ 279, 231, 186, 187, 255, 85, 0, 0, 0, 0,
0, 0, 0, 194, 0, 0, 0, 235, 236, 0,
0, 0, 240, 0, 242, 0, 0, 228, 208, 0,
0, 209, 0, 0, 251, 0, 252, 0, 0, 197,
198, 247, 222, 213, 0, 0, 216, 217, 0, -60,
-60, 0, 0, 0, -60, -60, -60, 225, -60, -60,
- -60, -60, 0, 215, 277, 0, 239, 0, -60, 0,
+ -60, -60, 0, 215, 276, 0, 239, 0, -60, 0,
269, -60, -60, 249, 224, 59, 0, -60, -60, 0,
0, 0, 253, 0, 254, 256, 0, 0, 0, 0,
- 0, 279, 0, 102, 263, -6, 1, 0, 0, 0,
+ 0, 278, 0, 102, 263, -6, 1, 0, 0, 0,
268, 0, 270, 0, 0, 0, 102, 2, 3, 4,
- 5, 0, 6, 7, 8, 9, 10, 11, 0, 281,
- 0, 282, 0, 12, 0, 13, 14, 15, 0, 0,
+ 5, 0, 6, 7, 8, 9, 10, 11, 280, 0,
+ 281, 0, 0, 12, 0, 13, 14, 15, 0, 0,
16, 0, 0, 0, 0, 17, 18, 19, 107, 108,
20, 109, 110, 0, 21, 22, 23, 24, 0, 0,
25, 0, 114, 115, 116, 117, 0, 0, 0, 26,
@@ -948,12 +947,12 @@ static const yytype_int16 yycheck[] =
60, 97, 97, 43, 64, 86, 66, 86, 62, 63,
21, 65, 66, 21, 83, 21, 83, 44, 78, 21,
129, 75, 76, 77, 78, 79, 27, 21, 86, 138,
- 84, 85, 92, 32, 41, 144, 26, 21, 98, 99,
+ 84, 85, 92, 32, 41, 144, 26, 41, 98, 99,
100, 27, 27, 152, 104, 105, 106, 107, 108, 109,
110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
48, 121, 43, 27, 152, 233, 43, 127, 27, 192,
- 41, 149, 132, 133, 32, 135, 136, 32, 246, 139,
- 41, 97, 142, 143, 217, 243, 24, -1, -1, -1,
+ 32, 149, 132, 133, 32, 135, 136, 97, 246, 139,
+ 41, 217, 142, 143, 243, 24, -1, -1, -1, -1,
-1, -1, -1, 153, -1, -1, -1, 220, 221, -1,
-1, -1, 225, -1, 227, -1, -1, 216, 196, -1,
-1, 199, -1, -1, 237, -1, 239, -1, -1, 179,
@@ -964,8 +963,8 @@ static const yytype_int16 yycheck[] =
-1, -1, 240, -1, 242, 243, -1, -1, -1, -1,
-1, 271, -1, 233, 252, 0, 1, -1, -1, -1,
258, -1, 260, -1, -1, -1, 246, 12, 13, 14,
- 15, -1, 17, 18, 19, 20, 21, 22, -1, 277,
- -1, 279, -1, 28, -1, 30, 31, 32, -1, -1,
+ 15, -1, 17, 18, 19, 20, 21, 22, 276, -1,
+ 278, -1, -1, 28, -1, 30, 31, 32, -1, -1,
35, -1, -1, -1, -1, 40, 41, 42, 62, 63,
45, 65, 66, -1, 49, 50, 51, 52, -1, -1,
55, -1, 76, 77, 78, 79, -1, -1, -1, 64,
@@ -1071,8 +1070,8 @@ static const yytype_uint8 yystos[] =
107, 32, 107, 96, 97, 99, 104, 105, 98, 106,
100, 107, 107, 106, 106, 99, 106, 100, 92, 48,
95, 43, 27, 106, 27, 27, 27, 43, 106, 105,
- 106, 105, 21, 27, 41, 32, 32, 107, 92, 93,
- 41, 106, 106
+ 106, 105, 27, 41, 32, 32, 107, 92, 93, 41,
+ 106, 106
};
#define yyerrok (yyerrstatus = 0)
@@ -2575,13 +2574,13 @@ yyreduce:
{
g_lingo->codeConst(0); // Push fake value on stack
g_lingo->code1(g_lingo->c_procret);
- g_lingo->define(*(yyvsp[(2) - (11)].s), (yyvsp[(4) - (11)].code), (yyvsp[(6) - (11)].narg));
+ g_lingo->define(*(yyvsp[(2) - (10)].s), (yyvsp[(4) - (10)].code), (yyvsp[(6) - (10)].narg));
g_lingo->_indef = false;
g_lingo->_ignoreMe = false;
- if (*(yyvsp[(2) - (11)].s) != *(yyvsp[(11) - (11)].s)) {
- yyerror("on vs end handler mismatch");
- }
+ //if (*$2 != *$11) {
+ // yyerror("on vs end handler mismatch");
+ //}
;}
break;
@@ -2637,7 +2636,7 @@ yyreduce:
/* Line 1267 of yacc.c. */
-#line 2641 "engines/director/lingo/lingo-gr.cpp"
+#line 2640 "engines/director/lingo/lingo-gr.cpp"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y
index 4b5f7f41ac..8c007800af 100644
--- a/engines/director/lingo/lingo-gr.y
+++ b/engines/director/lingo/lingo-gr.y
@@ -521,16 +521,16 @@ defn: tMACRO ID { g_lingo->_indef = true; g_lingo->_currentFactory.clear(); }
g_lingo->define(*$2, $4, $5 + 1, &g_lingo->_currentFactory);
g_lingo->_indef = false; } ;
| tON ID { g_lingo->_indef = true; g_lingo->_currentFactory.clear(); }
- begin { g_lingo->_ignoreMe = true; } argdef nl argstore stmtlist tEND ID {
+ begin { g_lingo->_ignoreMe = true; } argdef nl argstore stmtlist tEND {
g_lingo->codeConst(0); // Push fake value on stack
g_lingo->code1(g_lingo->c_procret);
g_lingo->define(*$2, $4, $6);
g_lingo->_indef = false;
g_lingo->_ignoreMe = false;
- if (*$2 != *$11) {
- yyerror("on vs end handler mismatch");
- }
+ //if (*$2 != *$11) {
+ // yyerror("on vs end handler mismatch");
+ //}
}
argdef: /* nothing */ { $$ = 0; }