DIRECTOR: Lingo: Suport multiple one-line 'else if' statements

This commit is contained in:
Eugene Sandulenko 2016-07-08 01:14:02 +02:00
parent bfe252edac
commit 336f0bee9d
4 changed files with 357 additions and 351 deletions

View File

@ -115,6 +115,7 @@ Common::Error DirectorEngine::run() {
repeat with x = 1 to 5\n\
if x = 3 then put 30\n\
else if x = 4 then put 40\n\
else if x = 5 then put 50\n\
else put 10.0\n\
if x = 1 then\n\
put 1\n\

View File

@ -437,11 +437,11 @@ union yyalloc
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 57
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 32
#define YYNNTS 33
/* YYNRULES -- Number of rules. */
#define YYNRULES 96
#define YYNRULES 98
/* YYNRULES -- Number of states. */
#define YYNSTATES 206
#define YYNSTATES 208
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
@ -493,55 +493,55 @@ static const yytype_uint16 yyprhs[] =
0, 0, 3, 7, 9, 11, 12, 14, 16, 18,
20, 22, 24, 29, 34, 39, 41, 43, 45, 47,
56, 68, 81, 90, 102, 115, 122, 133, 144, 145,
149, 152, 154, 161, 163, 169, 171, 175, 179, 182,
186, 188, 190, 191, 192, 193, 196, 199, 201, 203,
208, 213, 215, 217, 221, 225, 229, 233, 237, 241,
245, 249, 253, 256, 259, 263, 266, 269, 272, 274,
276, 279, 281, 285, 288, 291, 294, 297, 301, 304,
308, 311, 314, 316, 320, 323, 327, 328, 337, 338,
340, 344, 349, 350, 354, 355, 357
149, 152, 154, 157, 159, 166, 168, 174, 176, 180,
184, 187, 191, 193, 195, 196, 197, 198, 201, 204,
206, 208, 213, 218, 220, 222, 226, 230, 234, 238,
242, 246, 250, 254, 258, 261, 264, 268, 271, 274,
277, 279, 281, 284, 286, 290, 293, 296, 299, 302,
306, 309, 313, 316, 319, 321, 325, 328, 332, 333,
342, 343, 345, 349, 354, 355, 359, 360, 362
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int8 yyrhs[] =
{
58, 0, -1, 58, 59, 60, -1, 60, -1, 51,
-1, -1, 83, -1, 78, -1, 87, -1, 61, -1,
63, -1, 1, -1, 31, 77, 22, 10, -1, 33,
10, 45, 77, -1, 33, 10, 35, 77, -1, 77,
-1, 78, -1, 62, -1, 64, -1, 70, 52, 69,
53, 76, 75, 16, 32, -1, 71, 45, 77, 75,
35, 77, 75, 76, 75, 16, 32, -1, 71, 45,
77, 75, 13, 35, 77, 75, 76, 75, 16, 32,
-1, 72, 69, 34, 59, 76, 75, 16, 21, -1,
72, 69, 34, 59, 76, 75, 14, 76, 75, 16,
21, -1, 72, 69, 34, 59, 76, 75, 74, 66,
75, 59, 16, 21, -1, 72, 69, 34, 74, 62,
75, -1, 72, 69, 34, 74, 62, 75, 38, 74,
62, 75, -1, 72, 69, 34, 74, 62, 75, 67,
75, 65, 75, -1, -1, 38, 74, 62, -1, 66,
68, -1, 68, -1, 73, 69, 34, 74, 63, 75,
-1, 67, -1, 73, 69, 34, 76, 75, -1, 77,
-1, 77, 45, 77, -1, 52, 69, 53, -1, 32,
37, -1, 32, 36, 10, -1, 21, -1, 15, -1,
-1, -1, -1, 76, 59, -1, 76, 63, -1, 7,
-1, 8, -1, 9, 52, 88, 53, -1, 10, 52,
88, 53, -1, 10, -1, 61, -1, 77, 46, 77,
-1, 77, 47, 77, -1, 77, 48, 77, -1, 77,
49, 77, -1, 77, 54, 77, -1, 77, 55, 77,
-1, 77, 44, 77, -1, 77, 39, 77, -1, 77,
40, 77, -1, 46, 77, -1, 47, 77, -1, 52,
77, 53, -1, 25, 11, -1, 26, 10, -1, 31,
77, -1, 80, -1, 17, -1, 19, 79, -1, 10,
-1, 79, 56, 10, -1, 20, 23, -1, 20, 28,
-1, 20, 30, -1, 20, 81, -1, 20, 81, 82,
-1, 20, 82, -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,
84, 74, 85, 59, 86, 76, -1, -1, 10, -1,
85, 56, 10, -1, 85, 59, 56, 10, -1, -1,
10, 74, 88, -1, -1, 77, -1, 88, 56, 77,
-1
-1, -1, 84, -1, 79, -1, 88, -1, 61, -1,
63, -1, 1, -1, 31, 78, 22, 10, -1, 33,
10, 45, 78, -1, 33, 10, 35, 78, -1, 78,
-1, 79, -1, 62, -1, 64, -1, 71, 52, 70,
53, 77, 76, 16, 32, -1, 72, 45, 78, 76,
35, 78, 76, 77, 76, 16, 32, -1, 72, 45,
78, 76, 13, 35, 78, 76, 77, 76, 16, 32,
-1, 73, 70, 34, 59, 77, 76, 16, 21, -1,
73, 70, 34, 59, 77, 76, 14, 77, 76, 16,
21, -1, 73, 70, 34, 59, 77, 76, 75, 66,
76, 59, 16, 21, -1, 73, 70, 34, 75, 62,
76, -1, 73, 70, 34, 75, 62, 76, 38, 75,
62, 76, -1, 73, 70, 34, 75, 62, 76, 67,
76, 65, 76, -1, -1, 38, 75, 62, -1, 66,
69, -1, 69, -1, 67, 68, -1, 68, -1, 74,
70, 34, 75, 63, 76, -1, 67, -1, 74, 70,
34, 77, 76, -1, 78, -1, 78, 45, 78, -1,
52, 70, 53, -1, 32, 37, -1, 32, 36, 10,
-1, 21, -1, 15, -1, -1, -1, -1, 77, 59,
-1, 77, 63, -1, 7, -1, 8, -1, 9, 52,
89, 53, -1, 10, 52, 89, 53, -1, 10, -1,
61, -1, 78, 46, 78, -1, 78, 47, 78, -1,
78, 48, 78, -1, 78, 49, 78, -1, 78, 54,
78, -1, 78, 55, 78, -1, 78, 44, 78, -1,
78, 39, 78, -1, 78, 40, 78, -1, 46, 78,
-1, 47, 78, -1, 52, 78, 53, -1, 25, 11,
-1, 26, 10, -1, 31, 78, -1, 81, -1, 17,
-1, 19, 80, -1, 10, -1, 80, 56, 10, -1,
20, 23, -1, 20, 28, -1, 20, 30, -1, 20,
82, -1, 20, 82, 83, -1, 20, 83, -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, 85, 75, 86, 59, 87,
77, -1, -1, 10, -1, 86, 56, 10, -1, 86,
59, 56, 10, -1, -1, 10, 75, 89, -1, -1,
78, -1, 89, 56, 78, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
@ -550,13 +550,13 @@ static const yytype_uint16 yyrline[] =
0, 93, 93, 94, 97, 102, 103, 104, 105, 106,
107, 108, 111, 117, 123, 130, 131, 133, 134, 139,
150, 166, 180, 187, 196, 205, 215, 225, 236, 237,
240, 241, 244, 251, 252, 260, 261, 262, 264, 266,
272, 278, 285, 287, 289, 290, 291, 294, 299, 302,
308, 316, 319, 320, 321, 322, 323, 324, 325, 326,
327, 328, 329, 330, 331, 334, 335, 336, 337, 338,
340, 343, 344, 355, 356, 357, 358, 363, 369, 376,
377, 378, 379, 382, 383, 384, 412, 412, 419, 420,
421, 422, 424, 427, 435, 436, 437
240, 241, 244, 245, 248, 256, 257, 265, 266, 267,
269, 271, 277, 283, 290, 292, 294, 295, 296, 299,
304, 307, 313, 321, 324, 325, 326, 327, 328, 329,
330, 331, 332, 333, 334, 335, 336, 339, 340, 341,
342, 343, 345, 348, 349, 360, 361, 362, 363, 368,
374, 381, 382, 383, 384, 387, 388, 389, 417, 417,
424, 425, 426, 427, 429, 432, 440, 441, 442
};
#endif
@ -574,10 +574,10 @@ static const char *const yytname[] =
"'+'", "'-'", "'*'", "'/'", "'%'", "'\\n'", "'('", "')'", "'>'", "'<'",
"','", "$accept", "program", "nl", "programline", "asgn", "stmtoneliner",
"stmt", "ifstmt", "elsestmtoneliner", "elseifstmt", "elseifstmtoneliner",
"elseifstmt1", "cond", "repeatwhile", "repeatwith", "if", "elseif",
"begin", "end", "stmtlist", "expr", "func", "globallist", "gotofunc",
"gotoframe", "gotomovie", "defn", "@1", "argdef", "argstore", "macro",
"arglist", 0
"elseifstmtoneliner1", "elseifstmt1", "cond", "repeatwhile",
"repeatwith", "if", "elseif", "begin", "end", "stmtlist", "expr", "func",
"globallist", "gotofunc", "gotoframe", "gotomovie", "defn", "@1",
"argdef", "argstore", "macro", "arglist", 0
};
#endif
@ -601,13 +601,13 @@ static const yytype_uint8 yyr1[] =
0, 57, 58, 58, 59, 60, 60, 60, 60, 60,
60, 60, 61, 61, 61, 62, 62, 63, 63, 63,
63, 63, 64, 64, 64, 64, 64, 64, 65, 65,
66, 66, 67, 68, 68, 69, 69, 69, 70, 71,
72, 73, 74, 75, 76, 76, 76, 77, 77, 77,
77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
77, 77, 77, 77, 77, 78, 78, 78, 78, 78,
78, 79, 79, 80, 80, 80, 80, 80, 80, 81,
81, 81, 81, 82, 82, 82, 84, 83, 85, 85,
85, 85, 86, 87, 88, 88, 88
66, 66, 67, 67, 68, 69, 69, 70, 70, 70,
71, 72, 73, 74, 75, 76, 77, 77, 77, 78,
78, 78, 78, 78, 78, 78, 78, 78, 78, 78,
78, 78, 78, 78, 78, 78, 78, 79, 79, 79,
79, 79, 79, 80, 80, 81, 81, 81, 81, 81,
81, 82, 82, 82, 82, 83, 83, 83, 85, 84,
86, 86, 86, 86, 87, 88, 89, 89, 89
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@ -616,13 +616,13 @@ static const yytype_uint8 yyr2[] =
0, 2, 3, 1, 1, 0, 1, 1, 1, 1,
1, 1, 4, 4, 4, 1, 1, 1, 1, 8,
11, 12, 8, 11, 12, 6, 10, 10, 0, 3,
2, 1, 6, 1, 5, 1, 3, 3, 2, 3,
1, 1, 0, 0, 0, 2, 2, 1, 1, 4,
4, 1, 1, 3, 3, 3, 3, 3, 3, 3,
3, 3, 2, 2, 3, 2, 2, 2, 1, 1,
2, 1, 3, 2, 2, 2, 2, 3, 2, 3,
2, 2, 1, 3, 2, 3, 0, 8, 0, 1,
3, 4, 0, 3, 0, 1, 3
2, 1, 2, 1, 6, 1, 5, 1, 3, 3,
2, 3, 1, 1, 0, 0, 0, 2, 2, 1,
1, 4, 4, 1, 1, 3, 3, 3, 3, 3,
3, 3, 3, 3, 2, 2, 3, 2, 2, 2,
1, 1, 2, 1, 3, 2, 2, 2, 2, 3,
2, 3, 2, 2, 1, 3, 2, 3, 0, 8,
0, 1, 3, 4, 0, 3, 0, 1, 3
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@ -630,165 +630,165 @@ static const yytype_uint8 yyr2[] =
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
0, 11, 47, 48, 0, 42, 69, 0, 0, 40,
0, 11, 49, 50, 0, 44, 71, 0, 0, 42,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
3, 52, 17, 10, 18, 0, 0, 0, 15, 7,
68, 6, 8, 94, 94, 94, 71, 70, 82, 0,
73, 0, 74, 0, 75, 0, 76, 78, 86, 65,
66, 51, 0, 52, 67, 0, 38, 0, 62, 63,
0, 1, 4, 0, 0, 0, 0, 0, 35, 0,
0, 0, 0, 0, 0, 0, 0, 0, 95, 0,
0, 93, 0, 80, 84, 0, 81, 0, 0, 0,
77, 42, 0, 0, 39, 0, 0, 64, 2, 0,
43, 0, 0, 42, 0, 60, 61, 59, 53, 54,
55, 56, 57, 58, 49, 0, 50, 72, 83, 79,
85, 88, 12, 14, 13, 44, 0, 37, 44, 0,
36, 96, 89, 0, 43, 0, 0, 43, 43, 16,
0, 92, 45, 46, 0, 0, 43, 42, 25, 90,
0, 44, 0, 43, 44, 44, 0, 0, 41, 42,
43, 0, 91, 87, 19, 44, 43, 43, 22, 43,
33, 31, 0, 0, 28, 0, 43, 0, 0, 30,
0, 0, 43, 42, 43, 42, 0, 0, 0, 0,
42, 26, 0, 27, 0, 0, 20, 23, 0, 43,
29, 43, 21, 24, 34, 32
3, 54, 17, 10, 18, 0, 0, 0, 15, 7,
70, 6, 8, 96, 96, 96, 73, 72, 84, 0,
75, 0, 76, 0, 77, 0, 78, 80, 88, 67,
68, 53, 0, 54, 69, 0, 40, 0, 64, 65,
0, 1, 4, 0, 0, 0, 0, 0, 37, 0,
0, 0, 0, 0, 0, 0, 0, 0, 97, 0,
0, 95, 0, 82, 86, 0, 83, 0, 0, 0,
79, 44, 0, 0, 41, 0, 0, 66, 2, 0,
45, 0, 0, 44, 0, 62, 63, 61, 55, 56,
57, 58, 59, 60, 51, 0, 52, 74, 85, 81,
87, 90, 12, 14, 13, 46, 0, 39, 46, 0,
38, 98, 91, 0, 45, 0, 0, 45, 45, 16,
0, 94, 47, 48, 0, 0, 45, 44, 25, 92,
0, 46, 0, 45, 46, 46, 0, 0, 43, 44,
45, 33, 0, 93, 89, 19, 46, 45, 45, 22,
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, 23,
0, 45, 29, 45, 21, 24, 36, 34
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
-1, 19, 142, 20, 53, 22, 143, 24, 184, 169,
170, 171, 67, 25, 26, 27, 172, 194, 126, 134,
28, 139, 37, 30, 46, 47, 31, 91, 133, 151,
32, 79
-1, 19, 142, 20, 53, 22, 143, 24, 186, 170,
171, 161, 172, 67, 25, 26, 27, 162, 196, 126,
134, 28, 139, 37, 30, 46, 47, 31, 91, 133,
151, 32, 79
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
#define YYPACT_NINF -127
#define YYPACT_NINF -147
static const yytype_int16 yypact[] =
{
164, -127, -127, -127, -18, -24, -127, 19, 308, -127,
25, 54, 63, 123, -23, 73, 123, 123, 123, 8,
-127, 10, -127, -127, -127, 41, 39, 192, 337, -127,
-127, -127, -127, 123, 123, 123, -127, 42, -127, 99,
-127, 103, -127, 88, -127, 79, 33, -127, -127, -127,
-127, 65, 123, -127, -3, 109, -127, 13, 68, 68,
313, -127, -127, 164, 192, 123, 192, 87, 325, 123,
123, 123, 123, 123, 123, 123, 123, 123, 337, 32,
38, 70, 118, -127, -127, 124, -127, 125, 126, 102,
-127, -127, -3, 128, -127, 123, 123, -127, -127, 86,
337, 91, 301, 94, 123, 337, 337, 337, 230, 230,
68, 68, 337, 337, -127, 123, -127, -127, -127, -127,
-127, 136, -127, 337, 337, -127, -2, -127, -127, 287,
337, 337, -127, -39, 210, 112, 123, 210, -127, -127,
138, 93, -127, -127, 135, 123, 337, 89, 11, -127,
142, -127, 121, 337, -127, -127, 137, 145, -127, -127,
-127, 192, -127, 210, -127, -127, 210, 210, -127, 145,
-127, -127, 192, 287, 129, 127, 210, 146, 152, -127,
94, 144, -127, -127, -127, -127, 160, 148, 161, 170,
-9, -127, 287, -127, 256, 155, -127, -127, 171, 210,
-127, -127, -127, -127, -127, -127
169, -147, -147, -147, -26, 337, -147, 46, 23, -147,
50, 78, 51, 197, 11, 54, 197, 197, 197, 6,
-147, 8, -147, -147, -147, 38, 48, 243, 325, -147,
-147, -147, -147, 197, 197, 197, -147, 35, -147, 83,
-147, 89, -147, 76, -147, 12, 53, -147, -147, -147,
-147, 55, 197, -147, 282, 92, -147, -23, 95, 95,
313, -147, -147, 169, 243, 197, 243, 71, 75, 197,
197, 197, 197, 197, 197, 197, 197, 197, 325, -28,
9, 52, 99, -147, -147, 102, -147, 116, 120, 105,
-147, -147, 282, 100, -147, 197, 197, -147, -147, 80,
325, 84, 301, 90, 197, 325, 325, 325, 118, 118,
95, 95, 325, 325, -147, 197, -147, -147, -147, -147,
-147, 130, -147, 325, 325, -147, 3, -147, -147, 292,
325, 325, -147, -24, 215, 110, 197, 215, -147, -147,
136, 96, -147, -147, 132, 197, 325, 69, -5, -147,
141, -147, 121, 325, -147, -147, 133, 145, -147, -147,
145, -147, 243, -147, 215, -147, -147, 215, 215, -147,
145, 145, -147, 243, 292, -147, 125, 122, 215, 152,
155, -147, 90, 140, -147, -147, -147, -147, 164, 150,
162, 168, -6, -147, 292, -147, 261, 153, -147, -147,
166, 215, -147, -147, -147, -147, -147, -147
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
-127, -127, -17, 130, 4, -126, 0, -127, -127, -127,
43, 29, -59, -127, -127, -127, 55, -4, -42, -101,
5, 9, -127, -127, -127, 158, -127, -127, -127, -127,
-127, 21
-147, -147, -17, 128, 7, -125, 0, -147, -147, -147,
44, -129, 27, -61, -147, -147, -147, -146, -4, -42,
-111, 2, 21, -147, -147, -147, 157, -147, -147, -147,
-147, -147, -21
};
/* 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 -52
#define YYTABLE_NINF -54
static const yytype_int16 yytable[] =
{
23, 35, 63, 138, 21, 99, -44, 101, 61, 29,
-9, 135, 62, 55, 56, -51, -51, 140, 54, 93,
-51, 58, 59, 60, -51, -51, 158, 137, 34, 36,
-51, -51, 68, 136, 33, 48, 69, 70, 78, 78,
78, 71, -44, 72, 73, 74, 75, 182, 95, 159,
163, 76, 77, 166, 167, 80, 81, 92, 96, 62,
41, -9, 43, 23, 176, 49, 200, 21, 89, 68,
100, 102, 29, 50, 105, 106, 107, 108, 109, 110,
111, 112, 113, 57, 65, 114, 128, 121, 115, 199,
86, 116, 144, 64, 115, 147, 148, 87, 82, 129,
123, 124, 175, 155, 154, 156, 88, 69, 70, 130,
83, 165, 71, 181, 84, 85, 141, 34, 174, 94,
131, 103, 76, 77, 177, 178, 115, 180, 117, 88,
2, 3, 4, 51, 186, 118, 119, 120, 122, 125,
191, 146, 193, 157, 127, 62, 132, 145, 149, 150,
153, 152, 162, 164, 52, 173, 15, 204, 168, 205,
158, 185, 187, 189, -5, 1, 68, 183, 188, 16,
17, 2, 3, 4, 5, 18, 195, 68, 190, 192,
196, 6, 197, 7, 8, 9, 198, 202, 10, 11,
12, 160, 203, 98, 201, 13, 14, 15, 179, 2,
3, 4, 51, 161, 90, 0, 0, 0, 0, 0,
16, 17, 0, 0, 0, -5, 18, 2, 3, 4,
51, 0, 0, 52, 0, 15, 0, 6, 0, 7,
8, 9, 0, 0, 0, 11, 12, 0, 16, 17,
0, 13, 14, 15, 66, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 16, 17, 0, 0,
0, 62, 18, 2, 3, 4, 51, 0, 0, 69,
70, 0, 0, 6, 71, 7, 8, 9, 74, 75,
0, 11, 12, 0, 76, 77, 0, 13, 14, 15,
0, 0, 0, 0, 2, 3, 4, 51, 0, 0,
0, 0, 16, 17, 6, 0, 7, 8, 18, 0,
0, 0, 11, 12, 0, 0, 0, 0, 13, 38,
15, 0, 0, 0, 0, 0, 39, 0, 0, 0,
0, 40, 0, 16, 17, 41, 42, 43, 44, 18,
69, 70, 0, 45, 0, 71, 104, 72, 73, 74,
23, 35, 63, 99, 138, 101, 61, 21, -9, -46,
158, 173, 95, 80, 81, 54, 135, 137, 58, 59,
60, 29, 96, 86, 173, 114, 33, 62, 115, 68,
87, 175, 140, 159, 38, 78, 78, 78, 136, 88,
164, 39, 175, 167, 168, -46, 40, 55, 56, 184,
41, 42, 43, 44, 92, 178, 36, 62, 45, -9,
48, 50, 116, 23, 57, 115, 68, 100, 102, 202,
21, 105, 106, 107, 108, 109, 110, 111, 112, 113,
41, 201, 43, 155, 29, 156, 128, 121, 89, 49,
64, 82, 144, 65, 83, 147, 148, 123, 124, 129,
84, 177, 94, 85, 154, 103, 130, 34, 115, 117,
122, 166, 183, 118, 69, 70, 141, 131, 176, 71,
104, 72, 73, 74, 75, 179, 180, 119, 182, 76,
77, 120, 88, 125, 69, 70, 188, 127, 146, 71,
132, 62, 193, 157, 195, 145, 149, 153, 152, 76,
77, 163, 150, 165, 169, 174, 187, 69, 70, 206,
158, 207, 71, 185, 68, 191, 74, 75, 189, -5,
1, 190, 76, 77, 192, 68, 2, 3, 4, 5,
197, 194, 198, 199, 200, 204, 6, 205, 7, 8,
9, 98, 160, 10, 11, 12, 203, 181, 0, 0,
13, 14, 15, 90, 2, 3, 4, 51, 0, 0,
0, 0, 0, 0, 0, 16, 17, 0, 0, 0,
-5, 18, 2, 3, 4, 51, 0, 0, 52, 0,
15, 0, 6, 0, 7, 8, 9, 0, 0, 0,
11, 12, 0, 16, 17, 0, 13, 14, 15, 18,
2, 3, 4, 51, 0, 0, 0, 0, 0, 0,
0, 16, 17, 0, 0, 0, 62, 18, 2, 3,
4, 51, 0, 0, 52, 0, 15, 0, 6, 0,
7, 8, 9, 0, 0, 0, 11, 12, 0, 16,
17, 0, 13, 14, 15, 66, 0, 0, 0, 2,
3, 4, 51, 0, 93, 0, 0, 16, 17, 6,
0, 7, 8, 18, 0, 0, 0, 11, 12, 0,
0, 69, 70, 13, 0, 15, 71, 0, 72, 73,
74, 75, 0, 0, 0, 0, 76, 77, 16, 17,
69, 70, 0, 0, 18, 71, 104, 72, 73, 74,
75, 0, 69, 70, 97, 76, 77, 71, 0, 72,
73, 74, 75, 0, 69, 70, 97, 76, 77, 71,
104, 72, 73, 74, 75, 0, 69, 70, 0, 76,
77, 71, 0, 72, 73, 74, 75, 0, 0, 0,
0, 76, 77
0, 72, 73, 74, 75, 0, -53, -53, 0, 76,
77, -53, 0, 0, 0, -53, -53, 0, 0, 34,
0, -53, -53
};
static const yytype_int16 yycheck[] =
{
0, 5, 19, 129, 0, 64, 15, 66, 0, 0,
0, 13, 51, 36, 37, 39, 40, 56, 13, 22,
44, 16, 17, 18, 48, 49, 15, 128, 52, 10,
54, 55, 27, 35, 52, 10, 39, 40, 33, 34,
35, 44, 51, 46, 47, 48, 49, 173, 35, 38,
151, 54, 55, 154, 155, 34, 35, 52, 45, 51,
27, 51, 29, 63, 165, 11, 192, 63, 35, 64,
65, 66, 63, 10, 69, 70, 71, 72, 73, 74,
75, 76, 77, 10, 45, 53, 103, 91, 56, 190,
11, 53, 134, 52, 56, 137, 138, 18, 56, 103,
95, 96, 161, 14, 146, 16, 27, 39, 40, 104,
11, 153, 44, 172, 11, 27, 133, 52, 160, 10,
115, 34, 54, 55, 166, 167, 56, 169, 10, 27,
7, 8, 9, 10, 176, 11, 11, 11, 10, 53,
182, 136, 184, 147, 53, 51, 10, 35, 10, 56,
145, 16, 10, 32, 31, 159, 33, 199, 21, 201,
15, 34, 16, 180, 0, 1, 161, 38, 16, 46,
47, 7, 8, 9, 10, 52, 16, 172, 34, 183,
32, 17, 21, 19, 20, 21, 16, 32, 24, 25,
26, 148, 21, 63, 194, 31, 32, 33, 169, 7,
8, 9, 10, 148, 46, -1, -1, -1, -1, -1,
46, 47, -1, -1, -1, 51, 52, 7, 8, 9,
10, -1, -1, 31, -1, 33, -1, 17, -1, 19,
20, 21, -1, -1, -1, 25, 26, -1, 46, 47,
-1, 31, 32, 33, 52, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 46, 47, -1, -1,
-1, 51, 52, 7, 8, 9, 10, -1, -1, 39,
40, -1, -1, 17, 44, 19, 20, 21, 48, 49,
-1, 25, 26, -1, 54, 55, -1, 31, 32, 33,
-1, -1, -1, -1, 7, 8, 9, 10, -1, -1,
-1, -1, 46, 47, 17, -1, 19, 20, 52, -1,
-1, -1, 25, 26, -1, -1, -1, -1, 31, 11,
33, -1, -1, -1, -1, -1, 18, -1, -1, -1,
-1, 23, -1, 46, 47, 27, 28, 29, 30, 52,
39, 40, -1, 35, -1, 44, 45, 46, 47, 48,
0, 5, 19, 64, 129, 66, 0, 0, 0, 15,
15, 157, 35, 34, 35, 13, 13, 128, 16, 17,
18, 0, 45, 11, 170, 53, 52, 51, 56, 27,
18, 160, 56, 38, 11, 33, 34, 35, 35, 27,
151, 18, 171, 154, 155, 51, 23, 36, 37, 174,
27, 28, 29, 30, 52, 166, 10, 51, 35, 51,
10, 10, 53, 63, 10, 56, 64, 65, 66, 194,
63, 69, 70, 71, 72, 73, 74, 75, 76, 77,
27, 192, 29, 14, 63, 16, 103, 91, 35, 11,
52, 56, 134, 45, 11, 137, 138, 95, 96, 103,
11, 162, 10, 27, 146, 34, 104, 52, 56, 10,
10, 153, 173, 11, 39, 40, 133, 115, 160, 44,
45, 46, 47, 48, 49, 167, 168, 11, 170, 54,
55, 11, 27, 53, 39, 40, 178, 53, 136, 44,
10, 51, 184, 147, 186, 35, 10, 145, 16, 54,
55, 10, 56, 32, 21, 159, 34, 39, 40, 201,
15, 203, 44, 38, 162, 182, 48, 49, 16, 0,
1, 16, 54, 55, 34, 173, 7, 8, 9, 10,
16, 185, 32, 21, 16, 32, 17, 21, 19, 20,
21, 63, 148, 24, 25, 26, 196, 170, -1, -1,
31, 32, 33, 46, 7, 8, 9, 10, -1, -1,
-1, -1, -1, -1, -1, 46, 47, -1, -1, -1,
51, 52, 7, 8, 9, 10, -1, -1, 31, -1,
33, -1, 17, -1, 19, 20, 21, -1, -1, -1,
25, 26, -1, 46, 47, -1, 31, 32, 33, 52,
7, 8, 9, 10, -1, -1, -1, -1, -1, -1,
-1, 46, 47, -1, -1, -1, 51, 52, 7, 8,
9, 10, -1, -1, 31, -1, 33, -1, 17, -1,
19, 20, 21, -1, -1, -1, 25, 26, -1, 46,
47, -1, 31, 32, 33, 52, -1, -1, -1, 7,
8, 9, 10, -1, 22, -1, -1, 46, 47, 17,
-1, 19, 20, 52, -1, -1, -1, 25, 26, -1,
-1, 39, 40, 31, -1, 33, 44, -1, 46, 47,
48, 49, -1, -1, -1, -1, 54, 55, 46, 47,
39, 40, -1, -1, 52, 44, 45, 46, 47, 48,
49, -1, 39, 40, 53, 54, 55, 44, -1, 46,
47, 48, 49, -1, 39, 40, 53, 54, 55, 44,
45, 46, 47, 48, 49, -1, 39, 40, -1, 54,
55, 44, -1, 46, 47, 48, 49, -1, -1, -1,
-1, 46, 47, 48, 49, -1, 39, 40, -1, 54,
55, 44, -1, -1, -1, 48, 49, -1, -1, 52,
-1, 54, 55
};
@ -798,25 +798,25 @@ static const yytype_uint8 yystos[] =
{
0, 1, 7, 8, 9, 10, 17, 19, 20, 21,
24, 25, 26, 31, 32, 33, 46, 47, 52, 58,
60, 61, 62, 63, 64, 70, 71, 72, 77, 78,
80, 83, 87, 52, 52, 74, 10, 79, 11, 18,
23, 27, 28, 29, 30, 35, 81, 82, 10, 11,
10, 10, 31, 61, 77, 36, 37, 10, 77, 77,
77, 0, 51, 59, 52, 45, 52, 69, 77, 39,
40, 44, 46, 47, 48, 49, 54, 55, 77, 88,
88, 88, 56, 11, 11, 27, 11, 18, 27, 35,
82, 84, 77, 22, 10, 35, 45, 53, 60, 69,
77, 69, 77, 34, 45, 77, 77, 77, 77, 77,
77, 77, 77, 77, 53, 56, 53, 10, 11, 11,
11, 74, 10, 77, 77, 53, 75, 53, 59, 74,
77, 77, 10, 85, 76, 13, 35, 76, 62, 78,
56, 59, 59, 63, 75, 35, 77, 75, 75, 10,
56, 86, 16, 77, 75, 14, 16, 74, 15, 38,
67, 73, 10, 76, 32, 75, 76, 76, 21, 66,
67, 68, 73, 74, 75, 69, 76, 75, 75, 68,
75, 69, 62, 38, 65, 34, 75, 16, 16, 59,
34, 75, 74, 75, 74, 16, 32, 21, 16, 76,
62, 63, 32, 21, 75, 75
60, 61, 62, 63, 64, 71, 72, 73, 78, 79,
81, 84, 88, 52, 52, 75, 10, 80, 11, 18,
23, 27, 28, 29, 30, 35, 82, 83, 10, 11,
10, 10, 31, 61, 78, 36, 37, 10, 78, 78,
78, 0, 51, 59, 52, 45, 52, 70, 78, 39,
40, 44, 46, 47, 48, 49, 54, 55, 78, 89,
89, 89, 56, 11, 11, 27, 11, 18, 27, 35,
83, 85, 78, 22, 10, 35, 45, 53, 60, 70,
78, 70, 78, 34, 45, 78, 78, 78, 78, 78,
78, 78, 78, 78, 53, 56, 53, 10, 11, 11,
11, 75, 10, 78, 78, 53, 76, 53, 59, 75,
78, 78, 10, 86, 77, 13, 35, 77, 62, 79,
56, 59, 59, 63, 76, 35, 78, 76, 76, 10,
56, 87, 16, 78, 76, 14, 16, 75, 15, 38,
67, 68, 74, 10, 77, 32, 76, 77, 77, 21,
66, 67, 69, 74, 75, 68, 76, 70, 77, 76,
76, 69, 76, 70, 62, 38, 65, 34, 76, 16,
16, 59, 34, 76, 75, 76, 75, 16, 32, 21,
16, 77, 62, 63, 32, 21, 76, 76
};
#define yyerrok (yyerrstatus = 0)
@ -1814,8 +1814,8 @@ yyreduce:
{ (yyval.code) = (yyvsp[(2) - (3)].code); ;}
break;
case 32:
#line 244 "engines/director/lingo/lingo-gr.y"
case 34:
#line 248 "engines/director/lingo/lingo-gr.y"
{
inst then = 0;
WRITE_UINT32(&then, (yyvsp[(4) - (6)].code));
@ -1824,8 +1824,8 @@ yyreduce:
g_lingo->codeLabel((yyvsp[(1) - (6)].code)); ;}
break;
case 34:
#line 252 "engines/director/lingo/lingo-gr.y"
case 36:
#line 257 "engines/director/lingo/lingo-gr.y"
{
inst then = 0;
WRITE_UINT32(&then, (yyvsp[(4) - (5)].code));
@ -1834,23 +1834,23 @@ yyreduce:
g_lingo->codeLabel((yyvsp[(1) - (5)].code)); ;}
break;
case 35:
#line 260 "engines/director/lingo/lingo-gr.y"
case 37:
#line 265 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(STOP); ;}
break;
case 36:
#line 261 "engines/director/lingo/lingo-gr.y"
case 38:
#line 266 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code2(g_lingo->c_eq, STOP); ;}
break;
case 38:
#line 264 "engines/director/lingo/lingo-gr.y"
case 40:
#line 269 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = g_lingo->code3(g_lingo->c_repeatwhilecode, STOP, STOP); ;}
break;
case 39:
#line 266 "engines/director/lingo/lingo-gr.y"
case 41:
#line 271 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code3(g_lingo->c_repeatwithcode, STOP, STOP);
g_lingo->code3(STOP, STOP, STOP);
@ -1858,8 +1858,8 @@ yyreduce:
delete (yyvsp[(3) - (3)].s); ;}
break;
case 40:
#line 272 "engines/director/lingo/lingo-gr.y"
case 42:
#line 277 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code1(g_lingo->c_ifcode);
g_lingo->code3(STOP, STOP, STOP);
@ -1867,8 +1867,8 @@ yyreduce:
g_lingo->codeLabel(0); ;}
break;
case 41:
#line 278 "engines/director/lingo/lingo-gr.y"
case 43:
#line 283 "engines/director/lingo/lingo-gr.y"
{
inst skipEnd;
WRITE_UINT32(&skipEnd, 1); // We have to skip end to avoid multiple executions
@ -1877,23 +1877,23 @@ yyreduce:
g_lingo->code1(skipEnd); ;}
break;
case 42:
#line 285 "engines/director/lingo/lingo-gr.y"
case 44:
#line 290 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = g_lingo->_currentScript->size(); ;}
break;
case 43:
#line 287 "engines/director/lingo/lingo-gr.y"
case 45:
#line 292 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(STOP); (yyval.code) = g_lingo->_currentScript->size(); ;}
break;
case 44:
#line 289 "engines/director/lingo/lingo-gr.y"
case 46:
#line 294 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = g_lingo->_currentScript->size(); ;}
break;
case 47:
#line 294 "engines/director/lingo/lingo-gr.y"
case 49:
#line 299 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code1(g_lingo->c_constpush);
inst i = 0;
@ -1901,15 +1901,15 @@ yyreduce:
g_lingo->code1(i); ;}
break;
case 48:
#line 299 "engines/director/lingo/lingo-gr.y"
case 50:
#line 304 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code1(g_lingo->c_fconstpush);
g_lingo->codeFloat((yyvsp[(1) - (1)].f)); ;}
break;
case 49:
#line 302 "engines/director/lingo/lingo-gr.y"
case 51:
#line 307 "engines/director/lingo/lingo-gr.y"
{
if ((yyvsp[(3) - (4)].narg) != g_lingo->_builtins[*(yyvsp[(1) - (4)].s)]->nargs)
error("Built-in function %s expects %d arguments but got %d", (yyvsp[(1) - (4)].s)->c_str(), g_lingo->_builtins[*(yyvsp[(1) - (4)].s)]->nargs, (yyvsp[(3) - (4)].narg));
@ -1918,8 +1918,8 @@ yyreduce:
delete (yyvsp[(1) - (4)].s); ;}
break;
case 50:
#line 308 "engines/director/lingo/lingo-gr.y"
case 52:
#line 313 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code1(g_lingo->c_call);
g_lingo->codeString((yyvsp[(1) - (4)].s)->c_str());
@ -1930,121 +1930,121 @@ yyreduce:
delete (yyvsp[(1) - (4)].s); ;}
break;
case 51:
#line 316 "engines/director/lingo/lingo-gr.y"
case 53:
#line 321 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->codeId(*(yyvsp[(1) - (1)].s));
delete (yyvsp[(1) - (1)].s); ;}
break;
case 53:
#line 320 "engines/director/lingo/lingo-gr.y"
case 55:
#line 325 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_add); ;}
break;
case 54:
#line 321 "engines/director/lingo/lingo-gr.y"
case 56:
#line 326 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_sub); ;}
break;
case 55:
#line 322 "engines/director/lingo/lingo-gr.y"
case 57:
#line 327 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_mul); ;}
break;
case 56:
#line 323 "engines/director/lingo/lingo-gr.y"
case 58:
#line 328 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_div); ;}
break;
case 57:
#line 324 "engines/director/lingo/lingo-gr.y"
case 59:
#line 329 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_gt); ;}
break;
case 58:
#line 325 "engines/director/lingo/lingo-gr.y"
case 60:
#line 330 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_lt); ;}
break;
case 59:
#line 326 "engines/director/lingo/lingo-gr.y"
case 61:
#line 331 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_neq); ;}
break;
case 60:
#line 327 "engines/director/lingo/lingo-gr.y"
case 62:
#line 332 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_ge); ;}
break;
case 61:
#line 328 "engines/director/lingo/lingo-gr.y"
case 63:
#line 333 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_le); ;}
break;
case 62:
#line 329 "engines/director/lingo/lingo-gr.y"
case 64:
#line 334 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = (yyvsp[(2) - (2)].code); ;}
break;
case 63:
#line 330 "engines/director/lingo/lingo-gr.y"
case 65:
#line 335 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = (yyvsp[(2) - (2)].code); g_lingo->code1(g_lingo->c_negate); ;}
break;
case 64:
#line 331 "engines/director/lingo/lingo-gr.y"
case 66:
#line 336 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = (yyvsp[(2) - (3)].code); ;}
break;
case 65:
#line 334 "engines/director/lingo/lingo-gr.y"
case 67:
#line 339 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_mci); g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str()); delete (yyvsp[(2) - (2)].s); ;}
break;
case 66:
#line 335 "engines/director/lingo/lingo-gr.y"
case 68:
#line 340 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_mciwait); g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str()); delete (yyvsp[(2) - (2)].s); ;}
break;
case 67:
#line 336 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_printtop); ;}
break;
case 69:
#line 338 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code2(g_lingo->c_constpush, (inst)0); // Push fake value on stack
g_lingo->code1(g_lingo->c_procret); ;}
#line 341 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_printtop); ;}
break;
case 71:
#line 343 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_global); g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); delete (yyvsp[(1) - (1)].s); ;}
break;
case 72:
#line 344 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_global); g_lingo->codeString((yyvsp[(3) - (3)].s)->c_str()); delete (yyvsp[(3) - (3)].s); ;}
{ g_lingo->code2(g_lingo->c_constpush, (inst)0); // Push fake value on stack
g_lingo->code1(g_lingo->c_procret); ;}
break;
case 73:
#line 355 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_gotoloop); ;}
#line 348 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_global); g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); delete (yyvsp[(1) - (1)].s); ;}
break;
case 74:
#line 356 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_gotonext); ;}
#line 349 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_global); g_lingo->codeString((yyvsp[(3) - (3)].s)->c_str()); delete (yyvsp[(3) - (3)].s); ;}
break;
case 75:
#line 357 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_gotoprevious); ;}
#line 360 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_gotoloop); ;}
break;
case 76:
#line 358 "engines/director/lingo/lingo-gr.y"
#line 361 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_gotonext); ;}
break;
case 77:
#line 362 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_gotoprevious); ;}
break;
case 78:
#line 363 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_goto);
g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str());
@ -2052,8 +2052,8 @@ yyreduce:
delete (yyvsp[(2) - (2)].s); ;}
break;
case 77:
#line 363 "engines/director/lingo/lingo-gr.y"
case 79:
#line 368 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_goto);
g_lingo->codeString((yyvsp[(2) - (3)].s)->c_str());
@ -2062,8 +2062,8 @@ yyreduce:
delete (yyvsp[(3) - (3)].s); ;}
break;
case 78:
#line 369 "engines/director/lingo/lingo-gr.y"
case 80:
#line 374 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_goto);
g_lingo->codeString("");
@ -2071,48 +2071,48 @@ yyreduce:
delete (yyvsp[(2) - (2)].s); ;}
break;
case 79:
#line 376 "engines/director/lingo/lingo-gr.y"
{ (yyval.s) = (yyvsp[(3) - (3)].s); ;}
break;
case 80:
#line 377 "engines/director/lingo/lingo-gr.y"
{ (yyval.s) = (yyvsp[(2) - (2)].s); ;}
break;
case 81:
#line 378 "engines/director/lingo/lingo-gr.y"
{ (yyval.s) = (yyvsp[(2) - (2)].s); ;}
#line 381 "engines/director/lingo/lingo-gr.y"
{ (yyval.s) = (yyvsp[(3) - (3)].s); ;}
break;
case 82:
#line 379 "engines/director/lingo/lingo-gr.y"
{ (yyval.s) = (yyvsp[(1) - (1)].s); ;}
#line 382 "engines/director/lingo/lingo-gr.y"
{ (yyval.s) = (yyvsp[(2) - (2)].s); ;}
break;
case 83:
#line 382 "engines/director/lingo/lingo-gr.y"
{ (yyval.s) = (yyvsp[(3) - (3)].s); ;}
break;
case 84:
#line 383 "engines/director/lingo/lingo-gr.y"
{ (yyval.s) = (yyvsp[(2) - (2)].s); ;}
break;
case 85:
case 84:
#line 384 "engines/director/lingo/lingo-gr.y"
{ (yyval.s) = (yyvsp[(1) - (1)].s); ;}
break;
case 85:
#line 387 "engines/director/lingo/lingo-gr.y"
{ (yyval.s) = (yyvsp[(3) - (3)].s); ;}
break;
case 86:
#line 412 "engines/director/lingo/lingo-gr.y"
{ g_lingo->_indef = true; ;}
#line 388 "engines/director/lingo/lingo-gr.y"
{ (yyval.s) = (yyvsp[(2) - (2)].s); ;}
break;
case 87:
#line 413 "engines/director/lingo/lingo-gr.y"
#line 389 "engines/director/lingo/lingo-gr.y"
{ (yyval.s) = (yyvsp[(3) - (3)].s); ;}
break;
case 88:
#line 417 "engines/director/lingo/lingo-gr.y"
{ g_lingo->_indef = true; ;}
break;
case 89:
#line 418 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code2(g_lingo->c_constpush, (inst)0); // Push fake value on stack
g_lingo->code1(g_lingo->c_procret);
@ -2120,33 +2120,33 @@ yyreduce:
g_lingo->_indef = false; ;}
break;
case 88:
#line 419 "engines/director/lingo/lingo-gr.y"
case 90:
#line 424 "engines/director/lingo/lingo-gr.y"
{ (yyval.narg) = 0; ;}
break;
case 89:
#line 420 "engines/director/lingo/lingo-gr.y"
case 91:
#line 425 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeArg((yyvsp[(1) - (1)].s)); (yyval.narg) = 1; ;}
break;
case 90:
#line 421 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeArg((yyvsp[(3) - (3)].s)); (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}
break;
case 91:
#line 422 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeArg((yyvsp[(4) - (4)].s)); (yyval.narg) = (yyvsp[(1) - (4)].narg) + 1; ;}
break;
case 92:
#line 424 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeArgStore(); ;}
#line 426 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeArg((yyvsp[(3) - (3)].s)); (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}
break;
case 93:
#line 427 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeArg((yyvsp[(4) - (4)].s)); (yyval.narg) = (yyvsp[(1) - (4)].narg) + 1; ;}
break;
case 94:
#line 429 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeArgStore(); ;}
break;
case 95:
#line 432 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_call);
g_lingo->codeString((yyvsp[(1) - (3)].s)->c_str());
@ -2155,18 +2155,18 @@ yyreduce:
g_lingo->code1(numpar); ;}
break;
case 94:
#line 435 "engines/director/lingo/lingo-gr.y"
case 96:
#line 440 "engines/director/lingo/lingo-gr.y"
{ (yyval.narg) = 0; ;}
break;
case 95:
#line 436 "engines/director/lingo/lingo-gr.y"
case 97:
#line 441 "engines/director/lingo/lingo-gr.y"
{ (yyval.narg) = 1; ;}
break;
case 96:
#line 437 "engines/director/lingo/lingo-gr.y"
case 98:
#line 442 "engines/director/lingo/lingo-gr.y"
{ (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}
break;
@ -2386,6 +2386,6 @@ yyreturn:
}
#line 440 "engines/director/lingo/lingo-gr.y"
#line 445 "engines/director/lingo/lingo-gr.y"

View File

@ -241,12 +241,17 @@ elseifstmt: elseifstmt elseifstmt1
| elseifstmt1
;
elseifstmtoneliner: elseif cond tTHEN begin stmt end {
elseifstmtoneliner: elseifstmtoneliner elseifstmtoneliner1
| elseifstmtoneliner1
;
elseifstmtoneliner1: elseif cond tTHEN begin stmt end {
inst then = 0;
WRITE_UINT32(&then, $4);
(*g_lingo->_currentScript)[$1 + 1] = then; /* thenpart */
g_lingo->codeLabel($1); }
;
elseifstmt1: elseifstmtoneliner
| elseif cond tTHEN stmtlist end {

View File

@ -88,9 +88,9 @@ whitespace [\t ]
(?i:with) { count(); return tWITH; }
(?i:while) { count(); return tWHILE; }
[!][=] { count(); return tNEQ; }
[>][=] { count(); return tGE; }
[<][=] { count(); return tLE; }
[!][=] { count(); return tNEQ; }
[>][=] { count(); return tGE; }
[<][=] { count(); return tLE; }
{identifier} {
count();