aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-06-20 18:44:38 +0200
committerEugene Sandulenko2016-08-03 23:40:36 +0200
commita7ec15f77affc6ec9ee6f08d3e4a4b4d697770ac (patch)
treeb36767af8b3381667e5ca4a0e2e77708ad10eaec
parent31329a62a9f59ec9a8b60963f51657124c2f9c92 (diff)
downloadscummvm-rg350-a7ec15f77affc6ec9ee6f08d3e4a4b4d697770ac.tar.gz
scummvm-rg350-a7ec15f77affc6ec9ee6f08d3e4a4b4d697770ac.tar.bz2
scummvm-rg350-a7ec15f77affc6ec9ee6f08d3e4a4b4d697770ac.zip
DIRECTOR: Lingvo: Fix 'put' function
-rw-r--r--engines/director/lingo/lingo-gr.cpp94
-rw-r--r--engines/director/lingo/lingo-gr.y2
2 files changed, 47 insertions, 49 deletions
diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp
index 53d59df8b5..c4cddd37d8 100644
--- a/engines/director/lingo/lingo-gr.cpp
+++ b/engines/director/lingo/lingo-gr.cpp
@@ -389,9 +389,9 @@ union yyalloc
#endif
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 39
+#define YYFINAL 38
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 98
+#define YYLAST 89
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 34
@@ -400,7 +400,7 @@ union yyalloc
/* YYNRULES -- Number of rules. */
#define YYNRULES 47
/* YYNRULES -- Number of states. */
-#define YYNSTATES 78
+#define YYNSTATES 77
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
@@ -466,7 +466,7 @@ static const yytype_int8 yyrhs[] =
39, -1, 39, 29, 39, -1, 26, 39, -1, 27,
39, -1, 32, 39, 33, -1, 39, -1, 9, -1,
-1, -1, 43, 31, -1, 43, 38, -1, 15, 8,
- -1, 16, 7, -1, 21, 7, -1, 45, -1, 12,
+ -1, 16, 7, -1, 21, 39, -1, 45, -1, 12,
14, -1, 12, 18, -1, 12, 20, -1, 12, 46,
-1, 12, 46, 47, -1, 12, 47, -1, 24, 11,
8, -1, 11, 8, -1, 24, 8, -1, 8, -1,
@@ -540,17 +540,17 @@ static const yytype_uint8 yydefact[] =
0, 9, 16, 17, 26, 0, 0, 0, 0, 0,
0, 0, 0, 0, 3, 6, 7, 8, 0, 5,
34, 44, 0, 35, 0, 36, 0, 37, 0, 38,
- 40, 31, 32, 17, 0, 0, 22, 23, 0, 1,
- 0, 0, 0, 0, 0, 25, 0, 42, 46, 0,
- 43, 0, 0, 0, 39, 0, 0, 0, 24, 2,
- 18, 19, 20, 21, 28, 45, 41, 47, 11, 13,
- 12, 27, 29, 30, 14, 0, 0, 15
+ 40, 31, 32, 33, 0, 22, 23, 0, 1, 0,
+ 0, 0, 0, 0, 25, 0, 42, 46, 0, 43,
+ 0, 0, 0, 39, 0, 0, 0, 24, 2, 18,
+ 19, 20, 21, 28, 45, 41, 47, 11, 13, 12,
+ 27, 29, 30, 14, 0, 0, 15
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int8 yydefgoto[] =
{
- -1, 13, 14, 15, 16, 17, 46, 18, 75, 71,
+ -1, 13, 14, 15, 16, 17, 45, 18, 74, 70,
19, 20, 29, 30
};
@@ -559,54 +559,52 @@ static const yytype_int8 yydefgoto[] =
#define YYPACT_NINF -19
static const yytype_int8 yypact[] =
{
- 38, -19, -19, -19, -19, -3, 10, 12, 50, 13,
- 66, 66, 66, 26, -2, -19, -19, 61, 66, -19,
- -19, -19, 19, -19, 22, -19, 24, -19, 20, 67,
- -19, -19, -19, 1, -4, -18, -19, -19, 52, -19,
- 38, 66, 66, 66, 66, 61, 23, -19, -19, 43,
- -19, 44, 48, 41, -19, 65, 66, 66, -19, -19,
- -16, -16, -19, -19, -19, -19, -19, -19, -19, 61,
- 61, 35, -19, -19, 61, 58, 74, -19
+ 37, -19, -19, -19, -19, 5, -7, 8, 4, 13,
+ 4, 4, 4, 12, -10, -19, -19, 60, 4, -19,
+ -19, -19, 18, -19, 19, -19, 11, -19, -3, 61,
+ -19, -19, -19, 44, -18, -19, -19, 48, -19, 37,
+ 4, 4, 4, 4, 60, 17, -19, -19, 42, -19,
+ 43, 46, 28, -19, 49, 4, 4, -19, -19, -11,
+ -11, -19, -19, -19, -19, -19, -19, -19, 60, 60,
+ 34, -19, -19, 60, 45, 58, -19
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int8 yypgoto[] =
{
- -19, 34, -19, -19, 4, -8, -19, -19, -19, -19,
- -19, -19, -19, 68
+ -19, 40, -19, -19, 14, -8, -19, -19, -19, -19,
+ -19, -19, -19, 53
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -34
+#define YYTABLE_NINF -5
static const yytype_int8 yytable[] =
{
- 34, -33, 36, 37, 38, 21, 56, 57, 22, 55,
- 45, 23, 43, 44, 24, 25, 26, 27, 31, 32,
- 35, 28, 41, 42, 43, 44, 39, 47, 50, 40,
- 48, 51, -33, 60, 61, 62, 63, 52, -4, 1,
- 2, 49, 3, 2, 4, 3, 64, 4, 69, 70,
- 5, 65, 66, 6, 7, 2, 67, 33, 52, 8,
- 9, 10, 11, 74, 10, 11, 72, 12, 76, -4,
- 12, 2, 68, 3, 59, 73, 10, 11, 41, 42,
- 43, 44, 12, 77, 24, 58, 26, 41, 42, 43,
- 44, 53, 10, 11, 0, 0, 0, 54, 12
+ 33, 31, 35, 36, 37, 49, 55, 56, 50, 2,
+ 44, 3, 38, 21, 51, 32, 22, 42, 43, 23,
+ 34, 39, 24, 25, 26, 27, 46, 47, 48, 28,
+ 10, 11, 59, 60, 61, 62, 12, -4, 1, 2,
+ 63, 3, 2, 4, 3, 51, 4, 68, 69, 5,
+ 64, 65, 6, 7, 66, 75, 67, 54, 8, 9,
+ 10, 11, 73, 10, 11, 71, 12, 76, -4, 12,
+ 40, 41, 42, 43, 40, 41, 42, 43, 24, 58,
+ 26, 57, 53, 0, 72, 52, 40, 41, 42, 43
};
static const yytype_int8 yycheck[] =
{
- 8, 0, 10, 11, 12, 8, 24, 25, 11, 13,
- 18, 14, 28, 29, 17, 18, 19, 20, 8, 7,
- 7, 24, 26, 27, 28, 29, 0, 8, 8, 31,
- 8, 11, 31, 41, 42, 43, 44, 17, 0, 1,
- 5, 17, 7, 5, 9, 7, 23, 9, 56, 57,
- 12, 8, 8, 15, 16, 5, 8, 7, 17, 21,
- 22, 26, 27, 71, 26, 27, 31, 32, 10, 31,
- 32, 5, 7, 7, 40, 71, 26, 27, 26, 27,
- 28, 29, 32, 9, 17, 33, 19, 26, 27, 28,
- 29, 24, 26, 27, -1, -1, -1, 29, 32
+ 8, 8, 10, 11, 12, 8, 24, 25, 11, 5,
+ 18, 7, 0, 8, 17, 7, 11, 28, 29, 14,
+ 7, 31, 17, 18, 19, 20, 8, 8, 17, 24,
+ 26, 27, 40, 41, 42, 43, 32, 0, 1, 5,
+ 23, 7, 5, 9, 7, 17, 9, 55, 56, 12,
+ 8, 8, 15, 16, 8, 10, 7, 13, 21, 22,
+ 26, 27, 70, 26, 27, 31, 32, 9, 31, 32,
+ 26, 27, 28, 29, 26, 27, 28, 29, 17, 39,
+ 19, 33, 29, -1, 70, 24, 26, 27, 28, 29
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -616,11 +614,11 @@ static const yytype_uint8 yystos[] =
0, 1, 5, 7, 9, 12, 15, 16, 21, 22,
26, 27, 32, 35, 36, 37, 38, 39, 41, 44,
45, 8, 11, 14, 17, 18, 19, 20, 24, 46,
- 47, 8, 7, 7, 39, 7, 39, 39, 39, 0,
- 31, 26, 27, 28, 29, 39, 40, 8, 8, 17,
- 8, 11, 17, 24, 47, 13, 24, 25, 33, 35,
- 39, 39, 39, 39, 23, 8, 8, 8, 7, 39,
- 39, 43, 31, 38, 39, 42, 10, 9
+ 47, 8, 7, 39, 7, 39, 39, 39, 0, 31,
+ 26, 27, 28, 29, 39, 40, 8, 8, 17, 8,
+ 11, 17, 24, 47, 13, 24, 25, 33, 35, 39,
+ 39, 39, 39, 23, 8, 8, 8, 7, 39, 39,
+ 43, 31, 38, 39, 42, 10, 9
};
#define yyerrok (yyerrstatus = 0)
@@ -1556,7 +1554,7 @@ yyreduce:
case 33:
#line 140 "engines/director/lingo/lingo-gr.y"
- { g_lingo->code1(g_lingo->func_varpush); g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str()); g_lingo->code1(g_lingo->func_eval); g_lingo->code1(g_lingo->func_printtop); delete (yyvsp[(2) - (2)].s); ;}
+ { g_lingo->code1(g_lingo->func_printtop); ;}
break;
case 35:
@@ -1626,7 +1624,7 @@ yyreduce:
/* Line 1267 of yacc.c. */
-#line 1630 "engines/director/lingo/lingo-gr.cpp"
+#line 1628 "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 eb90db1e5c..76a706af5d 100644
--- a/engines/director/lingo/lingo-gr.y
+++ b/engines/director/lingo/lingo-gr.y
@@ -137,7 +137,7 @@ stmtlist: /* nothing */ { $$ = g_lingo->_currentScript->size(); }
func: tMCI STRING { g_lingo->code1(g_lingo->func_mci); g_lingo->codeString($2->c_str()); delete $2; }
| tMCIWAIT VAR { g_lingo->code1(g_lingo->func_mciwait); g_lingo->codeString($2->c_str()); delete $2; }
- | tPUT VAR { g_lingo->code1(g_lingo->func_varpush); g_lingo->codeString($2->c_str()); g_lingo->code1(g_lingo->func_eval); g_lingo->code1(g_lingo->func_printtop); delete $2; }
+ | tPUT expr { g_lingo->code1(g_lingo->func_printtop); }
| gotofunc
;