aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2017-01-10 11:06:42 +0100
committerEugene Sandulenko2017-01-10 11:06:42 +0100
commit66624ef9274248afe640ec16d80de84d479fff18 (patch)
tree95c381c1926cac2f75ef2adc666388df3994a0e5
parent5df6cdca6ee6101839bfbdb9da53b43a65dd6029 (diff)
downloadscummvm-rg350-66624ef9274248afe640ec16d80de84d479fff18.tar.gz
scummvm-rg350-66624ef9274248afe640ec16d80de84d479fff18.tar.bz2
scummvm-rg350-66624ef9274248afe640ec16d80de84d479fff18.zip
DIRECTOR: Smarter checks for 'end' clause in grammar/lexer
-rw-r--r--engines/director/lingo/lingo-gr.cpp1173
-rw-r--r--engines/director/lingo/lingo-gr.h18
-rw-r--r--engines/director/lingo/lingo-gr.y52
-rw-r--r--engines/director/lingo/lingo-lex.cpp432
-rw-r--r--engines/director/lingo/lingo-lex.l12
-rw-r--r--engines/director/lingo/tests/events.lingo2
6 files changed, 879 insertions, 810 deletions
diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp
index 138686cf74..84bde0b512 100644
--- a/engines/director/lingo/lingo-gr.cpp
+++ b/engines/director/lingo/lingo-gr.cpp
@@ -87,10 +87,10 @@
STRING = 276,
HANDLER = 277,
SYMBOL = 278,
- tDOWN = 279,
- tELSE = 280,
- tNLELSIF = 281,
- tEND = 282,
+ ENDCLAUSE = 279,
+ tDOWN = 280,
+ tELSE = 281,
+ tNLELSIF = 282,
tEXIT = 283,
tFRAME = 284,
tGLOBAL = 285,
@@ -167,10 +167,10 @@
#define STRING 276
#define HANDLER 277
#define SYMBOL 278
-#define tDOWN 279
-#define tELSE 280
-#define tNLELSIF 281
-#define tEND 282
+#define ENDCLAUSE 279
+#define tDOWN 280
+#define tELSE 281
+#define tNLELSIF 282
#define tEXIT 283
#define tFRAME 284
#define tGLOBAL 285
@@ -246,6 +246,16 @@ void yyerror(const char *s) {
warning("%s at line %d col %d", s, g_lingo->_linenumber, g_lingo->_colnumber);
}
+void checkEnd(Common::String *token, const char *expect, bool required) {
+ if (required) {
+ if (token->compareToIgnoreCase(expect)) {
+ Common::String err = Common::String::format("end mismatch. Expected %s but got %s", expect, token->c_str());
+ yyerror(err.c_str());
+ }
+ }
+
+ delete token;
+}
@@ -269,7 +279,7 @@ void yyerror(const char *s) {
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 69 "engines/director/lingo/lingo-gr.y"
+#line 79 "engines/director/lingo/lingo-gr.y"
{
Common::String *s;
int i;
@@ -280,7 +290,7 @@ typedef union YYSTYPE
Common::Array<double> *arr;
}
/* Line 193 of yacc.c. */
-#line 284 "engines/director/lingo/lingo-gr.cpp"
+#line 294 "engines/director/lingo/lingo-gr.cpp"
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
@@ -293,7 +303,7 @@ typedef union YYSTYPE
/* Line 216 of yacc.c. */
-#line 297 "engines/director/lingo/lingo-gr.cpp"
+#line 307 "engines/director/lingo/lingo-gr.cpp"
#ifdef short
# undef short
@@ -508,7 +518,7 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 105
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 1550
+#define YYLAST 1548
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 93
@@ -517,7 +527,7 @@ union yyalloc
/* YYNRULES -- Number of rules. */
#define YYNRULES 146
/* YYNRULES -- Number of states. */
-#define YYNSTATES 321
+#define YYNSTATES 315
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
@@ -572,19 +582,19 @@ static const yytype_uint16 yyprhs[] =
{
0, 0, 3, 7, 9, 12, 14, 15, 17, 19,
21, 23, 25, 30, 35, 40, 45, 50, 56, 61,
- 66, 72, 74, 76, 78, 80, 89, 101, 114, 118,
- 127, 139, 151, 158, 169, 180, 181, 185, 188, 190,
- 193, 195, 202, 204, 210, 212, 216, 220, 223, 227,
- 229, 231, 232, 233, 234, 237, 240, 244, 246, 248,
- 250, 252, 254, 259, 261, 263, 266, 268, 272, 276,
- 280, 284, 288, 292, 296, 300, 304, 308, 312, 316,
- 319, 323, 327, 331, 335, 339, 342, 345, 349, 354,
- 359, 364, 371, 376, 383, 388, 395, 400, 407, 410,
- 412, 414, 417, 419, 422, 425, 428, 431, 433, 436,
- 441, 444, 448, 450, 454, 456, 460, 463, 466, 469,
- 472, 476, 479, 482, 484, 488, 491, 494, 497, 501,
- 504, 505, 514, 517, 518, 527, 528, 529, 540, 541,
- 543, 547, 552, 553, 557, 558, 560
+ 66, 72, 74, 76, 78, 80, 88, 99, 111, 115,
+ 123, 134, 145, 152, 163, 174, 175, 179, 182, 184,
+ 187, 189, 196, 198, 204, 206, 210, 214, 217, 221,
+ 223, 225, 226, 227, 228, 231, 234, 238, 240, 242,
+ 244, 246, 248, 253, 255, 257, 260, 262, 266, 270,
+ 274, 278, 282, 286, 290, 294, 298, 302, 306, 310,
+ 313, 317, 321, 325, 329, 333, 336, 339, 343, 348,
+ 353, 358, 365, 370, 377, 382, 389, 394, 401, 404,
+ 406, 408, 411, 413, 416, 419, 422, 425, 427, 430,
+ 435, 438, 442, 444, 448, 450, 454, 457, 460, 463,
+ 466, 470, 473, 476, 478, 482, 485, 488, 491, 495,
+ 498, 499, 508, 511, 512, 521, 522, 523, 534, 535,
+ 537, 541, 546, 547, 551, 552, 554
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
@@ -598,75 +608,74 @@ static const yytype_int16 yyrhs[] =
42, 13, 115, 80, 115, -1, 42, 20, 44, 115,
-1, 42, 12, 44, 115, -1, 42, 13, 115, 44,
115, -1, 115, -1, 116, -1, 98, -1, 100, -1,
- 107, 88, 106, 89, 113, 112, 27, 41, -1, 108,
- 80, 115, 112, 44, 115, 112, 113, 112, 27, 41,
- -1, 108, 80, 115, 112, 24, 44, 115, 112, 113,
- 112, 27, 41, -1, 114, 115, 112, -1, 109, 106,
- 43, 95, 113, 112, 27, 32, -1, 109, 106, 43,
- 95, 113, 112, 48, 113, 112, 27, 32, -1, 109,
- 106, 43, 95, 113, 112, 111, 102, 112, 27, 32,
- -1, 109, 106, 43, 111, 98, 112, -1, 109, 106,
- 43, 111, 98, 112, 48, 111, 98, 112, -1, 109,
- 106, 43, 111, 98, 112, 103, 112, 101, 112, -1,
- -1, 48, 111, 98, -1, 102, 105, -1, 105, -1,
- 103, 104, -1, 104, -1, 110, 106, 43, 111, 99,
- 112, -1, 103, -1, 110, 106, 43, 113, 112, -1,
- 115, -1, 115, 80, 115, -1, 88, 106, 89, -1,
- 41, 47, -1, 41, 46, 20, -1, 32, -1, 26,
- -1, -1, -1, -1, 113, 95, -1, 113, 99, -1,
- 45, 20, 43, -1, 11, -1, 14, -1, 23, -1,
- 21, -1, 16, -1, 20, 88, 131, 89, -1, 20,
- -1, 12, -1, 13, 115, -1, 97, -1, 115, 82,
- 115, -1, 115, 83, 115, -1, 115, 84, 115, -1,
- 115, 85, 115, -1, 115, 65, 115, -1, 115, 90,
- 115, -1, 115, 91, 115, -1, 115, 61, 115, -1,
- 115, 56, 115, -1, 115, 57, 115, -1, 115, 62,
- 115, -1, 115, 63, 115, -1, 64, 115, -1, 115,
- 81, 115, -1, 115, 66, 115, -1, 115, 68, 115,
- -1, 115, 69, 115, -1, 115, 70, 115, -1, 82,
- 115, -1, 83, 115, -1, 88, 115, 89, -1, 75,
- 115, 76, 115, -1, 75, 115, 77, 115, -1, 71,
- 115, 38, 115, -1, 71, 115, 44, 115, 38, 115,
- -1, 72, 115, 38, 115, -1, 72, 115, 44, 115,
- 38, 115, -1, 73, 115, 38, 115, -1, 73, 115,
- 44, 115, 38, 115, -1, 74, 115, 38, 115, -1,
- 74, 115, 44, 115, 38, 115, -1, 40, 115, -1,
- 119, -1, 122, -1, 28, 41, -1, 28, -1, 30,
- 117, -1, 55, 118, -1, 18, 115, -1, 17, 115,
- -1, 17, -1, 19, 131, -1, 51, 115, 46, 115,
- -1, 51, 115, -1, 79, 20, 131, -1, 20, -1,
- 117, 92, 20, -1, 20, -1, 118, 92, 20, -1,
- 31, 34, -1, 31, 37, -1, 31, 39, -1, 31,
- 120, -1, 31, 120, 121, -1, 31, 121, -1, 29,
- 115, -1, 115, -1, 38, 36, 115, -1, 36, 115,
- -1, 52, 53, -1, 52, 120, -1, 52, 120, 121,
- -1, 52, 121, -1, -1, 35, 20, 124, 111, 128,
- 95, 129, 113, -1, 49, 20, -1, -1, 50, 20,
- 125, 111, 128, 95, 129, 113, -1, -1, -1, 78,
- 20, 126, 111, 127, 128, 95, 129, 113, 27, -1,
- -1, 20, -1, 128, 92, 20, -1, 128, 95, 92,
- 20, -1, -1, 20, 111, 131, -1, -1, 115, -1,
- 131, 92, 115, -1
+ 107, 88, 106, 89, 113, 112, 24, -1, 108, 80,
+ 115, 112, 44, 115, 112, 113, 112, 24, -1, 108,
+ 80, 115, 112, 25, 44, 115, 112, 113, 112, 24,
+ -1, 114, 115, 112, -1, 109, 106, 43, 95, 113,
+ 112, 24, -1, 109, 106, 43, 95, 113, 112, 48,
+ 113, 112, 24, -1, 109, 106, 43, 95, 113, 112,
+ 111, 102, 112, 24, -1, 109, 106, 43, 111, 98,
+ 112, -1, 109, 106, 43, 111, 98, 112, 48, 111,
+ 98, 112, -1, 109, 106, 43, 111, 98, 112, 103,
+ 112, 101, 112, -1, -1, 48, 111, 98, -1, 102,
+ 105, -1, 105, -1, 103, 104, -1, 104, -1, 110,
+ 106, 43, 111, 99, 112, -1, 103, -1, 110, 106,
+ 43, 113, 112, -1, 115, -1, 115, 80, 115, -1,
+ 88, 106, 89, -1, 41, 47, -1, 41, 46, 20,
+ -1, 32, -1, 27, -1, -1, -1, -1, 113, 95,
+ -1, 113, 99, -1, 45, 20, 43, -1, 11, -1,
+ 14, -1, 23, -1, 21, -1, 16, -1, 20, 88,
+ 131, 89, -1, 20, -1, 12, -1, 13, 115, -1,
+ 97, -1, 115, 82, 115, -1, 115, 83, 115, -1,
+ 115, 84, 115, -1, 115, 85, 115, -1, 115, 65,
+ 115, -1, 115, 90, 115, -1, 115, 91, 115, -1,
+ 115, 61, 115, -1, 115, 56, 115, -1, 115, 57,
+ 115, -1, 115, 62, 115, -1, 115, 63, 115, -1,
+ 64, 115, -1, 115, 81, 115, -1, 115, 66, 115,
+ -1, 115, 68, 115, -1, 115, 69, 115, -1, 115,
+ 70, 115, -1, 82, 115, -1, 83, 115, -1, 88,
+ 115, 89, -1, 75, 115, 76, 115, -1, 75, 115,
+ 77, 115, -1, 71, 115, 38, 115, -1, 71, 115,
+ 44, 115, 38, 115, -1, 72, 115, 38, 115, -1,
+ 72, 115, 44, 115, 38, 115, -1, 73, 115, 38,
+ 115, -1, 73, 115, 44, 115, 38, 115, -1, 74,
+ 115, 38, 115, -1, 74, 115, 44, 115, 38, 115,
+ -1, 40, 115, -1, 119, -1, 122, -1, 28, 41,
+ -1, 28, -1, 30, 117, -1, 55, 118, -1, 18,
+ 115, -1, 17, 115, -1, 17, -1, 19, 131, -1,
+ 51, 115, 46, 115, -1, 51, 115, -1, 79, 20,
+ 131, -1, 20, -1, 117, 92, 20, -1, 20, -1,
+ 118, 92, 20, -1, 31, 34, -1, 31, 37, -1,
+ 31, 39, -1, 31, 120, -1, 31, 120, 121, -1,
+ 31, 121, -1, 29, 115, -1, 115, -1, 38, 36,
+ 115, -1, 36, 115, -1, 52, 53, -1, 52, 120,
+ -1, 52, 120, 121, -1, 52, 121, -1, -1, 35,
+ 20, 124, 111, 128, 95, 129, 113, -1, 49, 20,
+ -1, -1, 50, 20, 125, 111, 128, 95, 129, 113,
+ -1, -1, -1, 78, 20, 126, 111, 127, 128, 95,
+ 129, 113, 24, -1, -1, 20, -1, 128, 92, 20,
+ -1, 128, 95, 92, 20, -1, -1, 20, 111, 131,
+ -1, -1, 115, -1, 131, 92, 115, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 106, 106, 107, 108, 111, 116, 117, 118, 119,
- 120, 121, 124, 130, 131, 132, 138, 146, 154, 160,
- 168, 177, 178, 180, 181, 186, 197, 213, 225, 233,
- 240, 249, 258, 268, 278, 289, 290, 293, 294, 297,
- 298, 301, 309, 310, 318, 319, 320, 322, 324, 330,
- 336, 343, 345, 347, 348, 349, 352, 358, 359, 362,
- 365, 368, 371, 374, 378, 385, 391, 392, 393, 394,
- 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
- 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
- 415, 416, 417, 418, 419, 420, 421, 422, 425, 426,
- 427, 428, 429, 431, 432, 433, 436, 439, 442, 443,
- 444, 445, 448, 449, 452, 453, 464, 465, 466, 467,
- 470, 473, 478, 479, 482, 483, 486, 487, 490, 493,
- 523, 523, 529, 532, 532, 537, 538, 537, 550, 551,
- 552, 553, 555, 559, 567, 568, 569
+ 0, 117, 117, 118, 119, 122, 127, 128, 129, 130,
+ 131, 132, 135, 141, 142, 143, 149, 157, 165, 171,
+ 179, 188, 189, 191, 192, 197, 210, 228, 242, 250,
+ 260, 272, 284, 294, 304, 315, 316, 319, 320, 323,
+ 324, 327, 335, 336, 344, 345, 346, 348, 350, 356,
+ 362, 369, 371, 373, 374, 375, 378, 384, 385, 388,
+ 391, 394, 397, 400, 404, 411, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, 445, 446, 447, 448, 451, 452,
+ 453, 454, 455, 457, 458, 459, 462, 465, 468, 469,
+ 470, 471, 474, 475, 478, 479, 490, 491, 492, 493,
+ 496, 499, 504, 505, 508, 509, 512, 513, 516, 519,
+ 549, 549, 555, 558, 558, 563, 564, 563, 574, 575,
+ 576, 577, 579, 583, 591, 592, 593
};
#endif
@@ -679,7 +688,7 @@ static const char *const yytname[] =
"POINT", "RECT", "ARRAY", "OBJECT", "INT", "THEENTITY",
"THEENTITYWITHID", "FLOAT", "BLTIN", "BLTINNOARGS", "BLTINNOARGSORONE",
"BLTINONEARG", "BLTINARGLIST", "ID", "STRING", "HANDLER", "SYMBOL",
- "tDOWN", "tELSE", "tNLELSIF", "tEND", "tEXIT", "tFRAME", "tGLOBAL",
+ "ENDCLAUSE", "tDOWN", "tELSE", "tNLELSIF", "tEXIT", "tFRAME", "tGLOBAL",
"tGO", "tIF", "tINTO", "tLOOP", "tMACRO", "tMOVIE", "tNEXT", "tOF",
"tPREVIOUS", "tPUT", "tREPEAT", "tSET", "tTHEN", "tTO", "tWHEN", "tWITH",
"tWHILE", "tNLELSE", "tFACTORY", "tMETHOD", "tOPEN", "tPLAY", "tDONE",
@@ -741,8 +750,8 @@ static const yytype_uint8 yyr2[] =
{
0, 2, 3, 1, 2, 1, 0, 1, 1, 1,
1, 1, 4, 4, 4, 4, 4, 5, 4, 4,
- 5, 1, 1, 1, 1, 8, 11, 12, 3, 8,
- 11, 11, 6, 10, 10, 0, 3, 2, 1, 2,
+ 5, 1, 1, 1, 1, 7, 10, 11, 3, 7,
+ 10, 10, 6, 10, 10, 0, 3, 2, 1, 2,
1, 6, 1, 5, 1, 3, 3, 2, 3, 1,
1, 0, 0, 0, 2, 2, 3, 1, 1, 1,
1, 1, 4, 1, 1, 2, 1, 3, 3, 3,
@@ -787,71 +796,69 @@ static const yytype_uint8 yydefact[] =
0, 0, 0, 0, 0, 138, 52, 0, 0, 52,
52, 22, 0, 142, 142, 91, 93, 95, 97, 0,
54, 55, 0, 0, 52, 51, 32, 140, 0, 53,
- 53, 142, 0, 52, 53, 0, 53, 0, 50, 51,
- 52, 40, 0, 141, 131, 134, 53, 25, 53, 52,
- 29, 52, 52, 42, 38, 0, 0, 39, 35, 0,
- 0, 52, 0, 0, 37, 0, 0, 52, 51, 52,
- 51, 137, 0, 0, 0, 0, 51, 33, 0, 34,
- 0, 0, 26, 30, 31, 52, 36, 52, 27, 43,
- 41
+ 53, 142, 25, 52, 53, 29, 53, 0, 50, 51,
+ 52, 40, 0, 141, 131, 134, 53, 53, 52, 52,
+ 52, 42, 38, 0, 0, 39, 35, 0, 0, 52,
+ 0, 0, 37, 0, 0, 52, 51, 52, 51, 137,
+ 0, 26, 30, 31, 51, 33, 0, 34, 0, 27,
+ 52, 36, 52, 43, 41
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 38, 250, 39, 58, 41, 251, 43, 299, 282,
- 283, 271, 284, 110, 44, 45, 46, 272, 310, 174,
+ -1, 38, 250, 39, 58, 41, 251, 43, 297, 280,
+ 281, 271, 282, 110, 44, 45, 46, 272, 308, 174,
236, 47, 48, 241, 68, 93, 50, 76, 77, 51,
52, 139, 150, 164, 235, 227, 259, 53, 63
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -244
+#define YYPACT_NINF -247
static const yytype_int16 yypact[] =
{
- 300, -52, -244, -244, 862, -244, -244, 862, 862, 862,
- 1459, -244, -244, -5, 17, 753, -244, 34, 862, -17,
- 13, 38, 46, 54, 862, 826, 55, 862, 862, 862,
- 862, 862, 862, 58, 65, 862, 862, 862, 3, -244,
- 5, -244, -244, -244, -16, 6, 899, 862, 1428, -244,
- -244, -244, -244, -244, -244, -244, 7, 862, -244, 1428,
- 1428, 1428, 1428, 8, 862, 862, -244, -244, 9, 862,
- -244, 862, -244, 60, -244, 1428, 26, -244, -244, 923,
- 74, -244, -30, 862, -28, 59, -244, -244, 1273, -244,
- 26, -244, -244, 11, -49, 959, 995, 1031, 1067, 1304,
- -244, 862, -49, -49, 1366, -244, 378, 899, 862, 899,
- 61, 1397, 1428, 862, 862, 862, 862, 862, 862, 862,
- 862, 862, 862, 862, 862, 862, 862, 862, 862, 862,
- 923, 862, -58, 8, 77, 1428, 1428, 862, -244, -244,
- 85, 862, 862, -244, 862, 862, 1242, 862, 862, -244,
- -244, 862, -244, 87, 862, 862, 862, 862, 862, 862,
- 862, 862, 862, 862, -244, 8, -244, -244, 22, 1428,
- 23, 1335, -52, 862, -244, 166, 166, 166, -49, -49,
- -49, 1428, 1428, 166, 166, 715, 203, 203, -49, -49,
- 1428, 1428, 1428, -244, -244, 1428, 93, -244, 1428, 1428,
- 1428, 1428, 862, 862, 1428, 1428, 93, 1428, -244, 1428,
- 1103, 1428, 1139, 1428, 1175, 1428, 1211, 1428, 1428, -244,
- -244, -1, -244, -244, 680, 1428, -244, -60, 1428, 1428,
- -60, 862, 862, 862, 862, 93, 529, 70, 862, 529,
- -244, -244, 95, 27, 27, 1428, 1428, 1428, 1428, -60,
- -244, -244, 91, 862, 1428, 1, -8, -244, 100, -244,
- -244, 27, 81, 1428, -244, 92, -244, 99, -244, -244,
- 99, -244, 899, -244, 529, 529, -244, -244, -244, 529,
- -244, 529, 99, 99, -244, 899, 680, -244, 78, 84,
- 451, 529, 101, 102, -244, 104, 89, -244, -244, -244,
- -244, -244, 106, 96, 107, 108, -14, -244, 680, -244,
- 607, 97, -244, -244, -244, 529, -244, -244, -244, -244,
- -244
+ 319, -58, -247, -247, 881, -247, -247, 881, 881, 881,
+ 1447, -247, -247, 15, 12, 772, -247, 18, 881, 7,
+ 14, 24, 29, 41, 881, 845, 42, 881, 881, 881,
+ 881, 881, 881, 43, 45, 881, 881, 881, 2, -247,
+ 5, -247, -247, -247, -21, -10, 918, 881, 1416, -247,
+ -247, -247, -247, -247, -247, -247, -14, 881, -247, 1416,
+ 1416, 1416, 1416, -8, 881, 881, -247, -247, -7, 881,
+ -247, 881, -247, 37, -247, 1416, 10, -247, -247, 942,
+ 57, -247, -37, 881, -29, 48, -247, -247, 1261, -247,
+ 10, -247, -247, 1, -49, 978, 1014, 1050, 1086, 1292,
+ -247, 881, -49, -49, 1354, -247, 397, 918, 881, 918,
+ 52, 1385, 1416, 881, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, 881, 881, 881, 881, 881, 881,
+ 942, 881, -61, -8, 74, 1416, 1416, 881, -247, -247,
+ 76, 881, 881, -247, 881, 881, 160, 881, 881, -247,
+ -247, 881, -247, 79, 881, 881, 881, 881, 881, 881,
+ 881, 881, 881, 881, -247, -8, -247, -247, 13, 1416,
+ 22, 1323, -58, 881, -247, 734, 734, 734, -49, -49,
+ -49, 1416, 1416, 734, 734, 1457, 63, 63, -49, -49,
+ 1416, 1416, 1416, -247, -247, 1416, 83, -247, 1416, 1416,
+ 1416, 1416, 881, 881, 1416, 1416, 83, 1416, -247, 1416,
+ 1122, 1416, 1158, 1416, 1194, 1416, 1230, 1416, 1416, -247,
+ -247, 8, -247, -247, 699, 1416, -247, -62, 1416, 1416,
+ -62, 881, 881, 881, 881, 83, 548, 60, 881, 548,
+ -247, -247, 92, 21, 21, 1416, 1416, 1416, 1416, -62,
+ -247, -247, 90, 881, 1416, -3, -11, -247, 99, -247,
+ -247, 21, -247, 1416, -247, -247, -247, 94, -247, -247,
+ 94, -247, 918, -247, 548, 548, -247, -247, 548, 548,
+ 94, 94, -247, 918, 699, -247, 75, 81, 470, 548,
+ 103, 108, -247, 109, 93, -247, -247, -247, -247, -247,
+ 111, -247, -247, -247, -15, -247, 699, -247, 626, -247,
+ 548, -247, -247, -247, -247
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -244, -244, 10, 28, 2, -217, 0, -244, -244, -244,
- -120, -215, -140, -87, -244, -244, -244, -243, -9, -18,
- -213, -244, 52, 4, -244, -244, -244, 118, -19, -244,
- -244, -244, -244, -244, -244, -191, -223, -244, -56
+ -247, -247, 9, 31, 3, -216, 0, -247, -247, -247,
+ -118, -246, -141, -89, -247, -247, -247, -244, -9, 16,
+ -159, -247, 51, 4, -247, -247, -247, 115, -19, -247,
+ -247, -247, -247, -247, -247, -195, -222, -247, -51
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
@@ -861,322 +868,320 @@ static const yytype_int16 yypgoto[] =
#define YYTABLE_NINF -64
static const yytype_int16 yytable[] =
{
- 42, 65, 40, 105, 49, -10, 91, 240, 132, 133,
- 239, 55, -53, -53, 144, 230, 147, 119, 268, 120,
- 168, 260, 170, 237, 285, 82, 83, 54, 265, 80,
- 81, 193, 242, 84, 131, 54, 66, 67, 276, 285,
- 269, 128, 129, 238, 249, 165, 274, 275, 106, 266,
- 145, 279, 148, 281, 78, 287, 59, 138, 85, 60,
- 61, 62, 71, 290, 73, 291, 86, 75, 287, 297,
- 79, 152, 107, -53, 87, 92, 88, 75, 100, 94,
- 95, 96, 97, 98, 99, 101, 108, 102, 103, 104,
- 54, 316, -10, 315, 143, 64, 137, 194, 111, 112,
- 131, 134, 149, 153, 172, 197, 42, 208, 40, 130,
- 49, 220, 222, 226, 253, 257, 62, 62, 262, 258,
- 273, 135, 277, 136, 280, 268, 298, 300, 303, 304,
- 196, 305, 306, 311, 167, 146, 270, 312, 318, 313,
- 314, 206, 294, 90, 0, 0, 0, 0, 0, 0,
- 0, 221, 0, 62, 0, 219, 0, 0, 0, 111,
- 169, 171, 0, 224, 0, 175, 176, 177, 178, 179,
- 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
- 190, 191, 223, 192, 0, 289, 0, 0, 0, 195,
- 0, 0, 0, 198, 199, 0, 200, 201, 296, 204,
- 205, 0, 0, 207, 0, 0, 209, 210, 211, 212,
- 213, 214, 215, 216, 217, 218, 0, 0, 252, 0,
- 0, 255, 256, 0, 0, 225, 0, 0, 116, 117,
- 0, 118, 119, 0, 120, 0, 264, 243, 0, 0,
- 244, 0, 0, 0, 0, 278, 267, 123, 124, 125,
- 126, 127, 288, 0, 228, 229, 128, 129, 0, 261,
- 286, 292, 0, 293, 295, 116, 117, 0, 118, 119,
- 0, 120, 0, 302, 0, 0, 0, 0, 0, 307,
- 0, 309, 0, 245, 246, 247, 248, 126, 127, 308,
- 254, 0, 0, 128, 129, 0, 0, 319, 0, 320,
- -6, 1, 0, 0, 0, 263, 0, 0, 0, 0,
- 317, 2, 3, 4, 5, 0, 6, 7, 8, 9,
- 10, 11, 0, 12, 111, 0, 0, 0, 13, 0,
- 14, 15, 16, 0, 0, 17, 0, 111, 0, 0,
- 18, 19, 20, 0, 0, 21, 0, 0, 0, 22,
- 23, 24, 25, 0, 0, 26, 0, 0, 0, 0,
- 0, 0, 0, 0, 27, 0, 0, 0, 0, 0,
- 0, 28, 29, 30, 31, 32, 0, 0, 33, 34,
- 0, 0, 35, 36, 0, 0, 0, -6, 37, 2,
- 3, 4, 5, 0, 6, 7, 8, 9, 10, 11,
- 0, 12, 0, 0, 0, 0, 13, 0, 14, 15,
- 16, 0, 0, 17, 0, 0, 0, 0, 18, 19,
- 20, 0, 0, 21, 0, 0, 0, 22, 23, 24,
- 25, 0, 0, 26, 0, 0, 0, 0, 0, 0,
- 0, 0, 27, 0, 0, 0, 0, 0, 0, 28,
- 29, 30, 31, 32, 0, 0, 33, 34, 0, 0,
- 35, 36, 2, 3, 4, 5, 37, 6, 7, 8,
- 9, 56, 11, 0, 12, 0, 0, 0, 301, 13,
- 0, 14, 15, 16, 0, 0, 0, 0, 0, 0,
- 0, 18, 19, 20, 0, 0, 21, 0, 0, 0,
- 0, 0, 24, 25, 0, 0, 26, 0, 0, 0,
- 0, 0, 0, 0, 0, 27, 0, 0, 0, 0,
- 0, 0, 28, 29, 30, 31, 32, 0, 0, 0,
- 34, 0, 0, 35, 36, 0, 0, 0, 54, 37,
- 2, 3, 4, 5, 0, 6, 7, 8, 9, 56,
+ 42, 65, 105, 40, 49, -10, 91, 144, 240, -53,
+ 55, 230, -53, 132, 133, 147, 268, 119, 168, 120,
+ 170, 265, 260, 283, 285, 54, 82, 83, 193, 54,
+ 242, 131, 67, 237, 84, 285, 283, 269, 78, 276,
+ 249, 128, 129, 145, 85, 266, 71, 106, 73, 86,
+ 165, 148, 238, 80, 81, 59, 66, 138, 60, 61,
+ 62, 87, 92, 100, 239, 101, 75, 107, 295, 79,
+ 108, 152, -53, 137, 64, 88, 75, 143, 94, 95,
+ 96, 97, 98, 99, 131, 134, 102, 103, 104, 54,
+ 311, 149, -10, 153, 194, 172, 197, 111, 112, 208,
+ 274, 275, 220, 226, 253, 278, 42, 279, 130, 40,
+ 49, 222, 257, 258, 262, 62, 62, 288, 289, 273,
+ 135, 268, 136, 296, 298, 116, 117, 301, 118, 119,
+ 196, 120, 302, 303, 146, 309, 304, 167, 270, 292,
+ 90, 206, 0, 0, 0, 310, 0, 126, 127, 0,
+ 0, 0, 62, 128, 129, 219, 0, 0, 111, 169,
+ 171, 0, 0, 224, 175, 176, 177, 178, 179, 180,
+ 181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
+ 191, 223, 192, 287, 0, 221, 0, 0, 195, 0,
+ 0, 0, 198, 199, 294, 200, 201, 0, 204, 205,
+ 0, 0, 207, 0, 202, 209, 210, 211, 212, 213,
+ 214, 215, 216, 217, 218, 0, 113, 114, 0, 0,
+ 0, 115, 116, 117, 225, 118, 119, 0, 120, 121,
+ 122, 0, 0, 0, 0, 0, 243, 0, 0, 244,
+ 203, 123, 124, 125, 126, 127, 267, 0, 0, 0,
+ 128, 129, 252, 228, 229, 255, 256, 0, 261, 0,
+ 284, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 264, 0, 0, 0, 0, 0, 0, 0, 0, 277,
+ 0, 0, 245, 246, 247, 248, 286, 306, 0, 254,
+ 0, 0, 0, 0, 290, 291, 293, 0, 0, 0,
+ 0, 0, 0, 0, 263, 300, 0, 0, 312, 0,
+ 0, 305, 0, 307, 0, 0, 0, 0, 0, -6,
+ 1, 0, 0, 111, 0, 0, 313, 0, 314, 0,
+ 2, 3, 4, 5, 111, 6, 7, 8, 9, 10,
11, 0, 12, 0, 0, 0, 0, 13, 0, 14,
- 15, 16, 0, 0, 0, 0, 0, 0, 0, 18,
- 19, 20, 0, 0, 21, 0, 0, 0, 0, 0,
+ 15, 16, 0, 0, 17, 0, 0, 0, 0, 18,
+ 19, 20, 0, 0, 21, 0, 0, 0, 22, 23,
24, 25, 0, 0, 26, 0, 0, 0, 0, 0,
0, 0, 0, 27, 0, 0, 0, 0, 0, 0,
- 28, 29, 30, 31, 32, 0, 0, 0, 34, 0,
- 0, 35, 36, 0, 0, 0, 54, 37, 2, 3,
- 4, 5, 0, 6, 7, 8, 9, 56, 11, 0,
+ 28, 29, 30, 31, 32, 0, 0, 33, 34, 0,
+ 0, 35, 36, 0, 0, 0, -6, 37, 2, 3,
+ 4, 5, 0, 6, 7, 8, 9, 10, 11, 0,
12, 0, 0, 0, 0, 13, 0, 14, 15, 16,
- 0, 0, 0, 0, 0, 0, 0, 18, 19, 20,
- 0, 0, 21, 0, 0, 0, 0, 0, 24, 25,
+ 0, 0, 17, 0, 0, 0, 0, 18, 19, 20,
+ 0, 0, 21, 0, 0, 0, 22, 23, 24, 25,
0, 0, 26, 0, 0, 0, 0, 0, 0, 0,
0, 27, 0, 0, 0, 0, 0, 0, 28, 29,
- 30, 31, 32, 0, 0, 0, 34, 0, 0, 35,
+ 30, 31, 32, 0, 0, 33, 34, 0, 0, 35,
36, 2, 3, 4, 5, 37, 6, 7, 8, 9,
- 56, 11, 0, 12, 0, 0, 0, 0, 13, 0,
- 14, 15, 0, 0, 0, 0, 0, 0, 0, 0,
- 18, 0, 20, 0, 0, 0, 0, 0, 0, 0,
+ 56, 11, 0, 12, 299, 0, 0, 0, 13, 0,
+ 14, 15, 16, 0, 0, 0, 0, 0, 0, 0,
+ 18, 19, 20, 0, 0, 21, 0, 0, 0, 0,
0, 24, 25, 0, 0, 26, 0, 0, 0, 0,
0, 0, 0, 0, 27, 0, 0, 0, 0, 0,
0, 28, 29, 30, 31, 32, 0, 0, 0, 34,
- 0, 0, 35, 36, 2, 3, 4, 5, 37, 6,
- 0, 0, 0, 56, 11, 0, 12, 116, 117, 0,
- 118, 119, 69, 120, 0, 0, 0, 70, 0, 71,
- 72, 73, 74, 57, 0, 20, 0, 124, 125, 126,
- 127, 0, 0, 0, 0, 128, 129, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 27, 0, 0,
- 0, 0, 0, 0, 28, 29, 30, 31, 32, 0,
- 0, 0, 0, 0, 0, 35, 36, 2, 3, 4,
- 5, 37, 6, 0, 0, 0, 56, 11, 0, 12,
- 0, 0, 0, 0, 0, 69, 0, 0, 0, 0,
- 0, 0, 71, 0, 73, 0, 57, 0, 20, 0,
- 0, 0, 0, 2, 3, 4, 5, 0, 6, 89,
- 0, 0, 56, 11, 0, 12, 0, 0, 0, 0,
+ 0, 0, 35, 36, 0, 0, 0, 54, 37, 2,
+ 3, 4, 5, 0, 6, 7, 8, 9, 56, 11,
+ 0, 12, 0, 0, 0, 0, 13, 0, 14, 15,
+ 16, 0, 0, 0, 0, 0, 0, 0, 18, 19,
+ 20, 0, 0, 21, 0, 0, 0, 0, 0, 24,
+ 25, 0, 0, 26, 0, 0, 0, 0, 0, 0,
+ 0, 0, 27, 0, 0, 0, 0, 0, 0, 28,
+ 29, 30, 31, 32, 0, 0, 0, 34, 0, 0,
+ 35, 36, 0, 0, 0, 54, 37, 2, 3, 4,
+ 5, 0, 6, 7, 8, 9, 56, 11, 0, 12,
+ 0, 0, 0, 0, 13, 0, 14, 15, 16, 0,
+ 0, 0, 0, 0, 0, 0, 18, 19, 20, 0,
+ 0, 21, 0, 0, 0, 0, 0, 24, 25, 0,
+ 0, 26, 0, 0, 0, 0, 0, 0, 0, 0,
27, 0, 0, 0, 0, 0, 0, 28, 29, 30,
- 31, 32, 57, 0, 20, 0, 0, 0, 35, 36,
- 2, 3, 4, 5, 37, 6, 0, 0, 0, 56,
- 11, 0, 12, 0, 0, 0, 27, 0, 0, 0,
- 0, 0, 0, 28, 29, 30, 31, 32, 0, 57,
- 0, 20, 0, 0, 35, 36, 0, 0, 0, 0,
- 37, 0, 0, 0, 0, 0, 140, 0, 0, 0,
+ 31, 32, 0, 0, 0, 34, 0, 0, 35, 36,
+ 2, 3, 4, 5, 37, 6, 7, 8, 9, 56,
+ 11, 0, 12, 0, 0, 0, 0, 13, 0, 14,
+ 15, 0, 0, 0, 0, 0, 0, 0, 0, 18,
+ 0, 20, 0, 0, 0, 0, 0, 0, 0, 0,
+ 24, 25, 0, 0, 26, 0, 0, 0, 0, 0,
0, 0, 0, 27, 0, 0, 0, 0, 0, 0,
- 28, 29, 30, 31, 32, 0, 0, 0, 0, 113,
- 114, 35, 36, 0, 115, 116, 117, 109, 118, 141,
- 142, 120, 121, 122, 0, 0, 0, 154, 0, 0,
- 0, 0, 0, 155, 123, 124, 125, 126, 127, 0,
- 0, 0, 0, 128, 129, 113, 114, 0, 0, 0,
- 115, 116, 117, 0, 118, 119, 0, 120, 121, 122,
- 0, 0, 0, 156, 0, 0, 0, 0, 0, 157,
- 123, 124, 125, 126, 127, 0, 0, 0, 0, 128,
- 129, 113, 114, 0, 0, 0, 115, 116, 117, 0,
- 118, 119, 0, 120, 121, 122, 0, 0, 0, 158,
- 0, 0, 0, 0, 0, 159, 123, 124, 125, 126,
- 127, 0, 0, 0, 0, 128, 129, 113, 114, 0,
- 0, 0, 115, 116, 117, 0, 118, 119, 0, 120,
- 121, 122, 0, 0, 0, 160, 0, 0, 0, 0,
- 0, 161, 123, 124, 125, 126, 127, 0, 0, 0,
- 0, 128, 129, 113, 114, 0, 0, 0, 115, 116,
- 117, 0, 118, 119, 0, 120, 121, 122, 0, 0,
- 0, 231, 0, 0, 0, 0, 0, 0, 123, 124,
- 125, 126, 127, 0, 0, 0, 0, 128, 129, 113,
- 114, 0, 0, 0, 115, 116, 117, 0, 118, 119,
- 0, 120, 121, 122, 0, 0, 0, 232, 0, 0,
- 0, 0, 0, 0, 123, 124, 125, 126, 127, 0,
- 0, 0, 0, 128, 129, 113, 114, 0, 0, 0,
- 115, 116, 117, 0, 118, 119, 0, 120, 121, 122,
- 0, 0, 0, 233, 0, 0, 0, 0, 0, 0,
- 123, 124, 125, 126, 127, 0, 0, 0, 0, 128,
- 129, 113, 114, 0, 0, 0, 115, 116, 117, 0,
- 118, 119, 0, 120, 121, 122, 0, 0, 0, 234,
- 0, 0, 0, 0, 0, 0, 123, 124, 125, 126,
- 127, 0, 0, 0, 0, 128, 129, 113, 114, 0,
- 0, 0, 115, 116, 117, 0, 118, 119, 0, 120,
- 121, 122, 0, 0, 0, 0, 202, 0, 0, 0,
+ 28, 29, 30, 31, 32, 0, 0, 0, 34, 0,
+ 0, 35, 36, 2, 3, 4, 5, 37, 6, 0,
+ 0, 0, 56, 11, 0, 12, 116, 117, 0, 118,
+ 119, 69, 120, 0, 0, 0, 70, 0, 71, 72,
+ 73, 74, 57, 0, 20, 123, 124, 125, 126, 127,
+ 0, 0, 0, 0, 128, 129, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 27, 0, 0, 0,
+ 0, 0, 0, 28, 29, 30, 31, 32, 0, 0,
+ 0, 0, 0, 0, 35, 36, 2, 3, 4, 5,
+ 37, 6, 0, 0, 0, 56, 11, 0, 12, 0,
+ 0, 0, 0, 0, 69, 0, 0, 0, 0, 0,
+ 0, 71, 0, 73, 0, 57, 0, 20, 0, 0,
+ 0, 0, 2, 3, 4, 5, 0, 6, 89, 0,
+ 0, 56, 11, 0, 12, 0, 0, 0, 0, 27,
+ 0, 0, 0, 0, 0, 0, 28, 29, 30, 31,
+ 32, 57, 0, 20, 0, 0, 0, 35, 36, 2,
+ 3, 4, 5, 37, 6, 0, 0, 0, 56, 11,
+ 0, 12, 0, 0, 0, 27, 0, 0, 0, 0,
+ 0, 0, 28, 29, 30, 31, 32, 0, 57, 0,
+ 20, 0, 0, 35, 36, 0, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 140, 0, 0, 0, 0,
+ 0, 0, 27, 0, 0, 0, 0, 0, 0, 28,
+ 29, 30, 31, 32, 0, 0, 0, 0, 113, 114,
+ 35, 36, 0, 115, 116, 117, 109, 118, 141, 142,
+ 120, 121, 122, 0, 0, 0, 154, 0, 0, 0,
+ 0, 0, 155, 123, 124, 125, 126, 127, 0, 0,
+ 0, 0, 128, 129, 113, 114, 0, 0, 0, 115,
+ 116, 117, 0, 118, 119, 0, 120, 121, 122, 0,
+ 0, 0, 156, 0, 0, 0, 0, 0, 157, 123,
+ 124, 125, 126, 127, 0, 0, 0, 0, 128, 129,
+ 113, 114, 0, 0, 0, 115, 116, 117, 0, 118,
+ 119, 0, 120, 121, 122, 0, 0, 0, 158, 0,
+ 0, 0, 0, 0, 159, 123, 124, 125, 126, 127,
+ 0, 0, 0, 0, 128, 129, 113, 114, 0, 0,
+ 0, 115, 116, 117, 0, 118, 119, 0, 120, 121,
+ 122, 0, 0, 0, 160, 0, 0, 0, 0, 0,
+ 161, 123, 124, 125, 126, 127, 0, 0, 0, 0,
+ 128, 129, 113, 114, 0, 0, 0, 115, 116, 117,
+ 0, 118, 119, 0, 120, 121, 122, 0, 0, 0,
+ 231, 0, 0, 0, 0, 0, 0, 123, 124, 125,
+ 126, 127, 0, 0, 0, 0, 128, 129, 113, 114,
+ 0, 0, 0, 115, 116, 117, 0, 118, 119, 0,
+ 120, 121, 122, 0, 0, 0, 232, 0, 0, 0,
+ 0, 0, 0, 123, 124, 125, 126, 127, 0, 0,
+ 0, 0, 128, 129, 113, 114, 0, 0, 0, 115,
+ 116, 117, 0, 118, 119, 0, 120, 121, 122, 0,
+ 0, 0, 233, 0, 0, 0, 0, 0, 0, 123,
+ 124, 125, 126, 127, 0, 0, 0, 0, 128, 129,
+ 113, 114, 0, 0, 0, 115, 116, 117, 0, 118,
+ 119, 0, 120, 121, 122, 0, 0, 0, 234, 0,
+ 0, 0, 0, 0, 0, 123, 124, 125, 126, 127,
+ 0, 0, 0, 0, 128, 129, 113, 114, 0, 0,
+ 0, 115, 116, 117, 0, 118, 119, 0, 120, 121,
+ 122, 0, 0, 0, 0, 0, 0, 151, 0, 0,
+ 0, 123, 124, 125, 126, 127, 0, 113, 114, 0,
+ 128, 129, 115, 116, 117, 0, 118, 119, 0, 120,
+ 121, 122, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 123, 124, 125, 126, 127, 0, 113, 114,
0, 128, 129, 115, 116, 117, 0, 118, 119, 0,
- 120, 121, 122, 0, 0, 0, 0, 0, 0, 151,
- 0, 0, 203, 123, 124, 125, 126, 127, 0, 113,
+ 120, 121, 122, 0, 0, 0, 0, 0, 162, 163,
+ 0, 0, 0, 123, 124, 125, 126, 127, 0, 113,
114, 0, 128, 129, 115, 116, 117, 0, 118, 119,
0, 120, 121, 122, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 123, 124, 125, 126, 127, 0,
- 113, 114, 0, 128, 129, 115, 116, 117, 0, 118,
+ 0, 0, 0, 173, 123, 124, 125, 126, 127, 0,
+ 113, 114, 166, 128, 129, 115, 116, 117, 0, 118,
119, 0, 120, 121, 122, 0, 0, 0, 0, 0,
- 162, 163, 0, 0, 0, 123, 124, 125, 126, 127,
- 0, 113, 114, 0, 128, 129, 115, 116, 117, 0,
+ 0, 0, 0, 0, 0, 123, 124, 125, 126, 127,
+ 0, 113, 114, 166, 128, 129, 115, 116, 117, 0,
118, 119, 0, 120, 121, 122, 0, 0, 0, 0,
0, 0, 0, 0, 0, 173, 123, 124, 125, 126,
- 127, 0, 113, 114, 166, 128, 129, 115, 116, 117,
+ 127, 0, 113, 114, 0, 128, 129, 115, 116, 117,
0, 118, 119, 0, 120, 121, 122, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 123, 124, 125,
- 126, 127, 0, 113, 114, 166, 128, 129, 115, 116,
- 117, 0, 118, 119, 0, 120, 121, 122, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 173, 123, 124,
- 125, 126, 127, 0, 113, 114, 0, 128, 129, 115,
- 116, 117, 0, 118, 119, 0, 120, 121, 122, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 123,
- 124, 125, 126, 127, 0, -63, -63, 0, 128, 129,
- -63, -63, -63, 0, -63, -63, 0, -63, -63, -63,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- -63, 0, 0, -63, -63, 0, 0, 64, 0, -63,
- -63
+ 126, 127, 0, -63, -63, 0, 128, 129, -63, -63,
+ -63, 0, -63, -63, 0, -63, -63, -63, 0, 116,
+ 117, 0, 118, 119, 0, 120, 0, 0, -63, 0,
+ 0, -63, -63, 0, 0, 64, 0, -63, -63, 124,
+ 125, 126, 127, 0, 0, 0, 0, 128, 129
};
static const yytype_int16 yycheck[] =
{
- 0, 10, 0, 0, 0, 0, 25, 224, 64, 65,
- 223, 1, 26, 27, 44, 206, 44, 66, 26, 68,
- 107, 244, 109, 24, 267, 12, 13, 87, 27, 46,
- 47, 89, 92, 20, 92, 87, 41, 20, 261, 282,
- 48, 90, 91, 44, 235, 101, 259, 260, 38, 48,
- 80, 264, 80, 266, 20, 270, 4, 76, 20, 7,
- 8, 9, 36, 276, 38, 278, 20, 15, 283, 286,
- 18, 90, 88, 87, 20, 20, 24, 25, 20, 27,
- 28, 29, 30, 31, 32, 20, 80, 35, 36, 37,
- 87, 308, 87, 306, 20, 88, 36, 20, 46, 47,
- 92, 92, 43, 92, 43, 20, 106, 20, 106, 57,
- 106, 89, 89, 20, 44, 20, 64, 65, 27, 92,
- 20, 69, 41, 71, 32, 26, 48, 43, 27, 27,
- 139, 27, 43, 27, 106, 83, 256, 41, 41, 32,
- 32, 150, 282, 25, -1, -1, -1, -1, -1, -1,
- -1, 169, -1, 101, -1, 164, -1, -1, -1, 107,
- 108, 109, -1, 172, -1, 113, 114, 115, 116, 117,
- 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
- 128, 129, 172, 131, -1, 272, -1, -1, -1, 137,
- -1, -1, -1, 141, 142, -1, 144, 145, 285, 147,
- 148, -1, -1, 151, -1, -1, 154, 155, 156, 157,
- 158, 159, 160, 161, 162, 163, -1, -1, 236, -1,
- -1, 239, 240, -1, -1, 173, -1, -1, 62, 63,
- -1, 65, 66, -1, 68, -1, 254, 227, -1, -1,
- 230, -1, -1, -1, -1, 263, 255, 81, 82, 83,
- 84, 85, 270, -1, 202, 203, 90, 91, -1, 249,
- 269, 279, -1, 281, 282, 62, 63, -1, 65, 66,
- -1, 68, -1, 291, -1, -1, -1, -1, -1, 297,
- -1, 299, -1, 231, 232, 233, 234, 84, 85, 298,
- 238, -1, -1, 90, 91, -1, -1, 315, -1, 317,
- 0, 1, -1, -1, -1, 253, -1, -1, -1, -1,
- 310, 11, 12, 13, 14, -1, 16, 17, 18, 19,
- 20, 21, -1, 23, 272, -1, -1, -1, 28, -1,
- 30, 31, 32, -1, -1, 35, -1, 285, -1, -1,
- 40, 41, 42, -1, -1, 45, -1, -1, -1, 49,
- 50, 51, 52, -1, -1, 55, -1, -1, -1, -1,
- -1, -1, -1, -1, 64, -1, -1, -1, -1, -1,
- -1, 71, 72, 73, 74, 75, -1, -1, 78, 79,
- -1, -1, 82, 83, -1, -1, -1, 87, 88, 11,
- 12, 13, 14, -1, 16, 17, 18, 19, 20, 21,
- -1, 23, -1, -1, -1, -1, 28, -1, 30, 31,
- 32, -1, -1, 35, -1, -1, -1, -1, 40, 41,
- 42, -1, -1, 45, -1, -1, -1, 49, 50, 51,
- 52, -1, -1, 55, -1, -1, -1, -1, -1, -1,
- -1, -1, 64, -1, -1, -1, -1, -1, -1, 71,
- 72, 73, 74, 75, -1, -1, 78, 79, -1, -1,
- 82, 83, 11, 12, 13, 14, 88, 16, 17, 18,
- 19, 20, 21, -1, 23, -1, -1, -1, 27, 28,
- -1, 30, 31, 32, -1, -1, -1, -1, -1, -1,
- -1, 40, 41, 42, -1, -1, 45, -1, -1, -1,
- -1, -1, 51, 52, -1, -1, 55, -1, -1, -1,
- -1, -1, -1, -1, -1, 64, -1, -1, -1, -1,
- -1, -1, 71, 72, 73, 74, 75, -1, -1, -1,
- 79, -1, -1, 82, 83, -1, -1, -1, 87, 88,
- 11, 12, 13, 14, -1, 16, 17, 18, 19, 20,
+ 0, 10, 0, 0, 0, 0, 25, 44, 224, 24,
+ 1, 206, 27, 64, 65, 44, 27, 66, 107, 68,
+ 109, 24, 244, 267, 270, 87, 12, 13, 89, 87,
+ 92, 92, 20, 25, 20, 281, 280, 48, 20, 261,
+ 235, 90, 91, 80, 20, 48, 36, 38, 38, 20,
+ 101, 80, 44, 46, 47, 4, 41, 76, 7, 8,
+ 9, 20, 20, 20, 223, 20, 15, 88, 284, 18,
+ 80, 90, 87, 36, 88, 24, 25, 20, 27, 28,
+ 29, 30, 31, 32, 92, 92, 35, 36, 37, 87,
+ 306, 43, 87, 92, 20, 43, 20, 46, 47, 20,
+ 259, 260, 89, 20, 44, 264, 106, 266, 57, 106,
+ 106, 89, 20, 92, 24, 64, 65, 276, 277, 20,
+ 69, 27, 71, 48, 43, 62, 63, 24, 65, 66,
+ 139, 68, 24, 24, 83, 24, 43, 106, 256, 280,
+ 25, 150, -1, -1, -1, 304, -1, 84, 85, -1,
+ -1, -1, 101, 90, 91, 164, -1, -1, 107, 108,
+ 109, -1, -1, 172, 113, 114, 115, 116, 117, 118,
+ 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
+ 129, 172, 131, 272, -1, 169, -1, -1, 137, -1,
+ -1, -1, 141, 142, 283, 144, 145, -1, 147, 148,
+ -1, -1, 151, -1, 44, 154, 155, 156, 157, 158,
+ 159, 160, 161, 162, 163, -1, 56, 57, -1, -1,
+ -1, 61, 62, 63, 173, 65, 66, -1, 68, 69,
+ 70, -1, -1, -1, -1, -1, 227, -1, -1, 230,
+ 80, 81, 82, 83, 84, 85, 255, -1, -1, -1,
+ 90, 91, 236, 202, 203, 239, 240, -1, 249, -1,
+ 269, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 254, -1, -1, -1, -1, -1, -1, -1, -1, 263,
+ -1, -1, 231, 232, 233, 234, 270, 296, -1, 238,
+ -1, -1, -1, -1, 278, 279, 280, -1, -1, -1,
+ -1, -1, -1, -1, 253, 289, -1, -1, 308, -1,
+ -1, 295, -1, 297, -1, -1, -1, -1, -1, 0,
+ 1, -1, -1, 272, -1, -1, 310, -1, 312, -1,
+ 11, 12, 13, 14, 283, 16, 17, 18, 19, 20,
21, -1, 23, -1, -1, -1, -1, 28, -1, 30,
- 31, 32, -1, -1, -1, -1, -1, -1, -1, 40,
- 41, 42, -1, -1, 45, -1, -1, -1, -1, -1,
+ 31, 32, -1, -1, 35, -1, -1, -1, -1, 40,
+ 41, 42, -1, -1, 45, -1, -1, -1, 49, 50,
51, 52, -1, -1, 55, -1, -1, -1, -1, -1,
-1, -1, -1, 64, -1, -1, -1, -1, -1, -1,
- 71, 72, 73, 74, 75, -1, -1, -1, 79, -1,
+ 71, 72, 73, 74, 75, -1, -1, 78, 79, -1,
-1, 82, 83, -1, -1, -1, 87, 88, 11, 12,
13, 14, -1, 16, 17, 18, 19, 20, 21, -1,
23, -1, -1, -1, -1, 28, -1, 30, 31, 32,
- -1, -1, -1, -1, -1, -1, -1, 40, 41, 42,
- -1, -1, 45, -1, -1, -1, -1, -1, 51, 52,
+ -1, -1, 35, -1, -1, -1, -1, 40, 41, 42,
+ -1, -1, 45, -1, -1, -1, 49, 50, 51, 52,
-1, -1, 55, -1, -1, -1, -1, -1, -1, -1,
-1, 64, -1, -1, -1, -1, -1, -1, 71, 72,
- 73, 74, 75, -1, -1, -1, 79, -1, -1, 82,
+ 73, 74, 75, -1, -1, 78, 79, -1, -1, 82,
83, 11, 12, 13, 14, 88, 16, 17, 18, 19,
- 20, 21, -1, 23, -1, -1, -1, -1, 28, -1,
- 30, 31, -1, -1, -1, -1, -1, -1, -1, -1,
- 40, -1, 42, -1, -1, -1, -1, -1, -1, -1,
+ 20, 21, -1, 23, 24, -1, -1, -1, 28, -1,
+ 30, 31, 32, -1, -1, -1, -1, -1, -1, -1,
+ 40, 41, 42, -1, -1, 45, -1, -1, -1, -1,
-1, 51, 52, -1, -1, 55, -1, -1, -1, -1,
-1, -1, -1, -1, 64, -1, -1, -1, -1, -1,
-1, 71, 72, 73, 74, 75, -1, -1, -1, 79,
- -1, -1, 82, 83, 11, 12, 13, 14, 88, 16,
- -1, -1, -1, 20, 21, -1, 23, 62, 63, -1,
- 65, 66, 29, 68, -1, -1, -1, 34, -1, 36,
- 37, 38, 39, 40, -1, 42, -1, 82, 83, 84,
- 85, -1, -1, -1, -1, 90, 91, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 64, -1, -1,
- -1, -1, -1, -1, 71, 72, 73, 74, 75, -1,
- -1, -1, -1, -1, -1, 82, 83, 11, 12, 13,
- 14, 88, 16, -1, -1, -1, 20, 21, -1, 23,
- -1, -1, -1, -1, -1, 29, -1, -1, -1, -1,
- -1, -1, 36, -1, 38, -1, 40, -1, 42, -1,
- -1, -1, -1, 11, 12, 13, 14, -1, 16, 53,
- -1, -1, 20, 21, -1, 23, -1, -1, -1, -1,
+ -1, -1, 82, 83, -1, -1, -1, 87, 88, 11,
+ 12, 13, 14, -1, 16, 17, 18, 19, 20, 21,
+ -1, 23, -1, -1, -1, -1, 28, -1, 30, 31,
+ 32, -1, -1, -1, -1, -1, -1, -1, 40, 41,
+ 42, -1, -1, 45, -1, -1, -1, -1, -1, 51,
+ 52, -1, -1, 55, -1, -1, -1, -1, -1, -1,
+ -1, -1, 64, -1, -1, -1, -1, -1, -1, 71,
+ 72, 73, 74, 75, -1, -1, -1, 79, -1, -1,
+ 82, 83, -1, -1, -1, 87, 88, 11, 12, 13,
+ 14, -1, 16, 17, 18, 19, 20, 21, -1, 23,
+ -1, -1, -1, -1, 28, -1, 30, 31, 32, -1,
+ -1, -1, -1, -1, -1, -1, 40, 41, 42, -1,
+ -1, 45, -1, -1, -1, -1, -1, 51, 52, -1,
+ -1, 55, -1, -1, -1, -1, -1, -1, -1, -1,
64, -1, -1, -1, -1, -1, -1, 71, 72, 73,
- 74, 75, 40, -1, 42, -1, -1, -1, 82, 83,
- 11, 12, 13, 14, 88, 16, -1, -1, -1, 20,
- 21, -1, 23, -1, -1, -1, 64, -1, -1, -1,
- -1, -1, -1, 71, 72, 73, 74, 75, -1, 40,
- -1, 42, -1, -1, 82, 83, -1, -1, -1, -1,
- 88, -1, -1, -1, -1, -1, 33, -1, -1, -1,
+ 74, 75, -1, -1, -1, 79, -1, -1, 82, 83,
+ 11, 12, 13, 14, 88, 16, 17, 18, 19, 20,
+ 21, -1, 23, -1, -1, -1, -1, 28, -1, 30,
+ 31, -1, -1, -1, -1, -1, -1, -1, -1, 40,
+ -1, 42, -1, -1, -1, -1, -1, -1, -1, -1,
+ 51, 52, -1, -1, 55, -1, -1, -1, -1, -1,
-1, -1, -1, 64, -1, -1, -1, -1, -1, -1,
- 71, 72, 73, 74, 75, -1, -1, -1, -1, 56,
- 57, 82, 83, -1, 61, 62, 63, 88, 65, 66,
- 67, 68, 69, 70, -1, -1, -1, 38, -1, -1,
- -1, -1, -1, 44, 81, 82, 83, 84, 85, -1,
- -1, -1, -1, 90, 91, 56, 57, -1, -1, -1,
- 61, 62, 63, -1, 65, 66, -1, 68, 69, 70,
- -1, -1, -1, 38, -1, -1, -1, -1, -1, 44,
- 81, 82, 83, 84, 85, -1, -1, -1, -1, 90,
- 91, 56, 57, -1, -1, -1, 61, 62, 63, -1,
- 65, 66, -1, 68, 69, 70, -1, -1, -1, 38,
- -1, -1, -1, -1, -1, 44, 81, 82, 83, 84,
- 85, -1, -1, -1, -1, 90, 91, 56, 57, -1,
- -1, -1, 61, 62, 63, -1, 65, 66, -1, 68,
- 69, 70, -1, -1, -1, 38, -1, -1, -1, -1,
- -1, 44, 81, 82, 83, 84, 85, -1, -1, -1,
- -1, 90, 91, 56, 57, -1, -1, -1, 61, 62,
- 63, -1, 65, 66, -1, 68, 69, 70, -1, -1,
- -1, 38, -1, -1, -1, -1, -1, -1, 81, 82,
- 83, 84, 85, -1, -1, -1, -1, 90, 91, 56,
- 57, -1, -1, -1, 61, 62, 63, -1, 65, 66,
- -1, 68, 69, 70, -1, -1, -1, 38, -1, -1,
- -1, -1, -1, -1, 81, 82, 83, 84, 85, -1,
- -1, -1, -1, 90, 91, 56, 57, -1, -1, -1,
- 61, 62, 63, -1, 65, 66, -1, 68, 69, 70,
- -1, -1, -1, 38, -1, -1, -1, -1, -1, -1,
- 81, 82, 83, 84, 85, -1, -1, -1, -1, 90,
- 91, 56, 57, -1, -1, -1, 61, 62, 63, -1,
- 65, 66, -1, 68, 69, 70, -1, -1, -1, 38,
- -1, -1, -1, -1, -1, -1, 81, 82, 83, 84,
- 85, -1, -1, -1, -1, 90, 91, 56, 57, -1,
- -1, -1, 61, 62, 63, -1, 65, 66, -1, 68,
- 69, 70, -1, -1, -1, -1, 44, -1, -1, -1,
+ 71, 72, 73, 74, 75, -1, -1, -1, 79, -1,
+ -1, 82, 83, 11, 12, 13, 14, 88, 16, -1,
+ -1, -1, 20, 21, -1, 23, 62, 63, -1, 65,
+ 66, 29, 68, -1, -1, -1, 34, -1, 36, 37,
+ 38, 39, 40, -1, 42, 81, 82, 83, 84, 85,
+ -1, -1, -1, -1, 90, 91, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 64, -1, -1, -1,
+ -1, -1, -1, 71, 72, 73, 74, 75, -1, -1,
+ -1, -1, -1, -1, 82, 83, 11, 12, 13, 14,
+ 88, 16, -1, -1, -1, 20, 21, -1, 23, -1,
+ -1, -1, -1, -1, 29, -1, -1, -1, -1, -1,
+ -1, 36, -1, 38, -1, 40, -1, 42, -1, -1,
+ -1, -1, 11, 12, 13, 14, -1, 16, 53, -1,
+ -1, 20, 21, -1, 23, -1, -1, -1, -1, 64,
+ -1, -1, -1, -1, -1, -1, 71, 72, 73, 74,
+ 75, 40, -1, 42, -1, -1, -1, 82, 83, 11,
+ 12, 13, 14, 88, 16, -1, -1, -1, 20, 21,
+ -1, 23, -1, -1, -1, 64, -1, -1, -1, -1,
+ -1, -1, 71, 72, 73, 74, 75, -1, 40, -1,
+ 42, -1, -1, 82, 83, -1, -1, -1, -1, 88,
+ -1, -1, -1, -1, -1, 33, -1, -1, -1, -1,
+ -1, -1, 64, -1, -1, -1, -1, -1, -1, 71,
+ 72, 73, 74, 75, -1, -1, -1, -1, 56, 57,
+ 82, 83, -1, 61, 62, 63, 88, 65, 66, 67,
+ 68, 69, 70, -1, -1, -1, 38, -1, -1, -1,
+ -1, -1, 44, 81, 82, 83, 84, 85, -1, -1,
+ -1, -1, 90, 91, 56, 57, -1, -1, -1, 61,
+ 62, 63, -1, 65, 66, -1, 68, 69, 70, -1,
+ -1, -1, 38, -1, -1, -1, -1, -1, 44, 81,
+ 82, 83, 84, 85, -1, -1, -1, -1, 90, 91,
+ 56, 57, -1, -1, -1, 61, 62, 63, -1, 65,
+ 66, -1, 68, 69, 70, -1, -1, -1, 38, -1,
+ -1, -1, -1, -1, 44, 81, 82, 83, 84, 85,
+ -1, -1, -1, -1, 90, 91, 56, 57, -1, -1,
+ -1, 61, 62, 63, -1, 65, 66, -1, 68, 69,
+ 70, -1, -1, -1, 38, -1, -1, -1, -1, -1,
+ 44, 81, 82, 83, 84, 85, -1, -1, -1, -1,
+ 90, 91, 56, 57, -1, -1, -1, 61, 62, 63,
+ -1, 65, 66, -1, 68, 69, 70, -1, -1, -1,
+ 38, -1, -1, -1, -1, -1, -1, 81, 82, 83,
+ 84, 85, -1, -1, -1, -1, 90, 91, 56, 57,
+ -1, -1, -1, 61, 62, 63, -1, 65, 66, -1,
+ 68, 69, 70, -1, -1, -1, 38, -1, -1, -1,
+ -1, -1, -1, 81, 82, 83, 84, 85, -1, -1,
+ -1, -1, 90, 91, 56, 57, -1, -1, -1, 61,
+ 62, 63, -1, 65, 66, -1, 68, 69, 70, -1,
+ -1, -1, 38, -1, -1, -1, -1, -1, -1, 81,
+ 82, 83, 84, 85, -1, -1, -1, -1, 90, 91,
+ 56, 57, -1, -1, -1, 61, 62, 63, -1, 65,
+ 66, -1, 68, 69, 70, -1, -1, -1, 38, -1,
+ -1, -1, -1, -1, -1, 81, 82, 83, 84, 85,
+ -1, -1, -1, -1, 90, 91, 56, 57, -1, -1,
+ -1, 61, 62, 63, -1, 65, 66, -1, 68, 69,
+ 70, -1, -1, -1, -1, -1, -1, 46, -1, -1,
+ -1, 81, 82, 83, 84, 85, -1, 56, 57, -1,
+ 90, 91, 61, 62, 63, -1, 65, 66, -1, 68,
+ 69, 70, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 81, 82, 83, 84, 85, -1, 56, 57,
-1, 90, 91, 61, 62, 63, -1, 65, 66, -1,
- 68, 69, 70, -1, -1, -1, -1, -1, -1, 46,
- -1, -1, 80, 81, 82, 83, 84, 85, -1, 56,
+ 68, 69, 70, -1, -1, -1, -1, -1, 76, 77,
+ -1, -1, -1, 81, 82, 83, 84, 85, -1, 56,
57, -1, 90, 91, 61, 62, 63, -1, 65, 66,
-1, 68, 69, 70, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 81, 82, 83, 84, 85, -1,
- 56, 57, -1, 90, 91, 61, 62, 63, -1, 65,
+ -1, -1, -1, 80, 81, 82, 83, 84, 85, -1,
+ 56, 57, 89, 90, 91, 61, 62, 63, -1, 65,
66, -1, 68, 69, 70, -1, -1, -1, -1, -1,
- 76, 77, -1, -1, -1, 81, 82, 83, 84, 85,
- -1, 56, 57, -1, 90, 91, 61, 62, 63, -1,
+ -1, -1, -1, -1, -1, 81, 82, 83, 84, 85,
+ -1, 56, 57, 89, 90, 91, 61, 62, 63, -1,
65, 66, -1, 68, 69, 70, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 80, 81, 82, 83, 84,
- 85, -1, 56, 57, 89, 90, 91, 61, 62, 63,
+ 85, -1, 56, 57, -1, 90, 91, 61, 62, 63,
-1, 65, 66, -1, 68, 69, 70, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 81, 82, 83,
- 84, 85, -1, 56, 57, 89, 90, 91, 61, 62,
- 63, -1, 65, 66, -1, 68, 69, 70, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 80, 81, 82,
- 83, 84, 85, -1, 56, 57, -1, 90, 91, 61,
- 62, 63, -1, 65, 66, -1, 68, 69, 70, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 81,
- 82, 83, 84, 85, -1, 56, 57, -1, 90, 91,
- 61, 62, 63, -1, 65, 66, -1, 68, 69, 70,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 81, -1, -1, 84, 85, -1, -1, 88, -1, 90,
- 91
+ 84, 85, -1, 56, 57, -1, 90, 91, 61, 62,
+ 63, -1, 65, 66, -1, 68, 69, 70, -1, 62,
+ 63, -1, 65, 66, -1, 68, -1, -1, 81, -1,
+ -1, 84, 85, -1, -1, 88, -1, 90, 91, 82,
+ 83, 84, 85, -1, -1, -1, -1, 90, 91
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -1206,16 +1211,15 @@ static const yytype_uint8 yystos[] =
115, 115, 44, 80, 115, 115, 111, 115, 20, 115,
115, 115, 115, 115, 115, 115, 115, 115, 115, 111,
89, 112, 89, 95, 111, 115, 20, 128, 115, 115,
- 128, 38, 38, 38, 38, 127, 113, 24, 44, 113,
+ 128, 38, 38, 38, 38, 127, 113, 25, 44, 113,
98, 116, 92, 95, 95, 115, 115, 115, 115, 128,
95, 99, 112, 44, 115, 112, 112, 20, 92, 129,
- 129, 95, 27, 115, 112, 27, 48, 111, 26, 48,
- 103, 104, 110, 20, 113, 113, 129, 41, 112, 113,
- 32, 113, 102, 103, 105, 110, 111, 104, 112, 106,
- 113, 113, 112, 112, 105, 112, 106, 98, 48, 101,
- 43, 27, 112, 27, 27, 27, 43, 112, 111, 112,
- 111, 27, 41, 32, 32, 113, 98, 99, 41, 112,
- 112
+ 129, 95, 24, 115, 112, 24, 48, 111, 27, 48,
+ 103, 104, 110, 20, 113, 113, 129, 112, 113, 113,
+ 102, 103, 105, 110, 111, 104, 112, 106, 113, 113,
+ 112, 112, 105, 112, 106, 98, 48, 101, 43, 24,
+ 112, 24, 24, 24, 43, 112, 111, 112, 111, 24,
+ 113, 98, 99, 112, 112
};
#define yyerrok (yyerrstatus = 0)
@@ -2030,12 +2034,12 @@ yyreduce:
switch (yyn)
{
case 4:
-#line 108 "engines/director/lingo/lingo-gr.y"
+#line 119 "engines/director/lingo/lingo-gr.y"
{ yyerrok; ;}
break;
case 5:
-#line 111 "engines/director/lingo/lingo-gr.y"
+#line 122 "engines/director/lingo/lingo-gr.y"
{
g_lingo->_linenumber++;
g_lingo->_colnumber = 1;
@@ -2043,12 +2047,12 @@ yyreduce:
break;
case 10:
-#line 120 "engines/director/lingo/lingo-gr.y"
+#line 131 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_xpop); ;}
break;
case 12:
-#line 124 "engines/director/lingo/lingo-gr.y"
+#line 135 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_varpush);
g_lingo->codeString((yyvsp[(4) - (4)].s)->c_str());
@@ -2058,17 +2062,17 @@ yyreduce:
break;
case 13:
-#line 130 "engines/director/lingo/lingo-gr.y"
+#line 141 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = g_lingo->code1(g_lingo->c_after); ;}
break;
case 14:
-#line 131 "engines/director/lingo/lingo-gr.y"
+#line 142 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = g_lingo->code1(g_lingo->c_before); ;}
break;
case 15:
-#line 132 "engines/director/lingo/lingo-gr.y"
+#line 143 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_varpush);
g_lingo->codeString((yyvsp[(2) - (4)].s)->c_str());
@@ -2078,7 +2082,7 @@ yyreduce:
break;
case 16:
-#line 138 "engines/director/lingo/lingo-gr.y"
+#line 149 "engines/director/lingo/lingo-gr.y"
{
g_lingo->codeConst(0); // Put dummy id
g_lingo->code1(g_lingo->c_theentityassign);
@@ -2090,7 +2094,7 @@ yyreduce:
break;
case 17:
-#line 146 "engines/director/lingo/lingo-gr.y"
+#line 157 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_swap);
g_lingo->code1(g_lingo->c_theentityassign);
@@ -2102,7 +2106,7 @@ yyreduce:
break;
case 18:
-#line 154 "engines/director/lingo/lingo-gr.y"
+#line 165 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_varpush);
g_lingo->codeString((yyvsp[(2) - (4)].s)->c_str());
@@ -2112,7 +2116,7 @@ yyreduce:
break;
case 19:
-#line 160 "engines/director/lingo/lingo-gr.y"
+#line 171 "engines/director/lingo/lingo-gr.y"
{
g_lingo->codeConst(0); // Put dummy id
g_lingo->code1(g_lingo->c_theentityassign);
@@ -2124,7 +2128,7 @@ yyreduce:
break;
case 20:
-#line 168 "engines/director/lingo/lingo-gr.y"
+#line 179 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_swap);
g_lingo->code1(g_lingo->c_theentityassign);
@@ -2136,54 +2140,60 @@ yyreduce:
break;
case 21:
-#line 177 "engines/director/lingo/lingo-gr.y"
+#line 188 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_xpop); ;}
break;
case 25:
-#line 186 "engines/director/lingo/lingo-gr.y"
+#line 197 "engines/director/lingo/lingo-gr.y"
{
inst body = 0, end = 0;
- WRITE_UINT32(&body, (yyvsp[(5) - (8)].code));
- WRITE_UINT32(&end, (yyvsp[(6) - (8)].code));
- (*g_lingo->_currentScript)[(yyvsp[(1) - (8)].code) + 1] = body; /* body of loop */
- (*g_lingo->_currentScript)[(yyvsp[(1) - (8)].code) + 2] = end; ;}
+ WRITE_UINT32(&body, (yyvsp[(5) - (7)].code));
+ WRITE_UINT32(&end, (yyvsp[(6) - (7)].code));
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (7)].code) + 1] = body; /* body of loop */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (7)].code) + 2] = end; /* end, if cond fails */
+
+ checkEnd((yyvsp[(7) - (7)].s), "repeat", true); ;}
break;
case 26:
-#line 197 "engines/director/lingo/lingo-gr.y"
+#line 210 "engines/director/lingo/lingo-gr.y"
{
inst init = 0, finish = 0, body = 0, end = 0, inc = 0;
- WRITE_UINT32(&init, (yyvsp[(3) - (11)].code));
- WRITE_UINT32(&finish, (yyvsp[(6) - (11)].code));
- WRITE_UINT32(&body, (yyvsp[(8) - (11)].code));
- WRITE_UINT32(&end, (yyvsp[(9) - (11)].code));
+ WRITE_UINT32(&init, (yyvsp[(3) - (10)].code));
+ WRITE_UINT32(&finish, (yyvsp[(6) - (10)].code));
+ WRITE_UINT32(&body, (yyvsp[(8) - (10)].code));
+ WRITE_UINT32(&end, (yyvsp[(9) - (10)].code));
WRITE_UINT32(&inc, 1);
- (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 1] = init; /* initial count value */
- (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 2] = finish;/* final count value */
- (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 3] = body; /* body of loop */
- (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 4] = inc; /* increment */
- (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 5] = end; ;}
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (10)].code) + 1] = init; /* initial count value */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (10)].code) + 2] = finish;/* final count value */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (10)].code) + 3] = body; /* body of loop */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (10)].code) + 4] = inc; /* increment */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (10)].code) + 5] = end; /* end, if cond fails */
+
+ checkEnd((yyvsp[(10) - (10)].s), "repeat", true); ;}
break;
case 27:
-#line 213 "engines/director/lingo/lingo-gr.y"
+#line 228 "engines/director/lingo/lingo-gr.y"
{
inst init = 0, finish = 0, body = 0, end = 0, inc = 0;
- WRITE_UINT32(&init, (yyvsp[(3) - (12)].code));
- WRITE_UINT32(&finish, (yyvsp[(7) - (12)].code));
- WRITE_UINT32(&body, (yyvsp[(9) - (12)].code));
- WRITE_UINT32(&end, (yyvsp[(10) - (12)].code));
+ WRITE_UINT32(&init, (yyvsp[(3) - (11)].code));
+ WRITE_UINT32(&finish, (yyvsp[(7) - (11)].code));
+ WRITE_UINT32(&body, (yyvsp[(9) - (11)].code));
+ WRITE_UINT32(&end, (yyvsp[(10) - (11)].code));
WRITE_UINT32(&inc, -1);
- (*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 1] = init; /* initial count value */
- (*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 2] = finish;/* final count value */
- (*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 3] = body; /* body of loop */
- (*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 4] = inc; /* increment */
- (*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 5] = end; ;}
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 1] = init; /* initial count value */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 2] = finish;/* final count value */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 3] = body; /* body of loop */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 4] = inc; /* increment */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 5] = end; /* end, if cond fails */
+
+ checkEnd((yyvsp[(11) - (11)].s), "repeat", true); ;}
break;
case 28:
-#line 225 "engines/director/lingo/lingo-gr.y"
+#line 242 "engines/director/lingo/lingo-gr.y"
{
inst end = 0;
WRITE_UINT32(&end, (yyvsp[(3) - (3)].code));
@@ -2193,44 +2203,53 @@ yyreduce:
break;
case 29:
-#line 233 "engines/director/lingo/lingo-gr.y"
+#line 250 "engines/director/lingo/lingo-gr.y"
{
inst then = 0, end = 0;
- WRITE_UINT32(&then, (yyvsp[(5) - (8)].code));
- WRITE_UINT32(&end, (yyvsp[(6) - (8)].code));
- (*g_lingo->_currentScript)[(yyvsp[(1) - (8)].code) + 1] = then; /* thenpart */
- (*g_lingo->_currentScript)[(yyvsp[(1) - (8)].code) + 3] = end; /* end, if cond fails */
+ WRITE_UINT32(&then, (yyvsp[(5) - (7)].code));
+ WRITE_UINT32(&end, (yyvsp[(6) - (7)].code));
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (7)].code) + 1] = then; /* thenpart */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (7)].code) + 3] = end; /* end, if cond fails */
+
+ checkEnd((yyvsp[(7) - (7)].s), "if", true);
+
g_lingo->processIf(0, 0); ;}
break;
case 30:
-#line 240 "engines/director/lingo/lingo-gr.y"
+#line 260 "engines/director/lingo/lingo-gr.y"
{
inst then = 0, else1 = 0, end = 0;
- 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 */
+ WRITE_UINT32(&then, (yyvsp[(5) - (10)].code));
+ WRITE_UINT32(&else1, (yyvsp[(8) - (10)].code));
+ WRITE_UINT32(&end, (yyvsp[(9) - (10)].code));
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (10)].code) + 1] = then; /* thenpart */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (10)].code) + 2] = else1; /* elsepart */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (10)].code) + 3] = end; /* end, if cond fails */
+
+ checkEnd((yyvsp[(10) - (10)].s), "if", true);
+
g_lingo->processIf(0, 0); ;}
break;
case 31:
-#line 249 "engines/director/lingo/lingo-gr.y"
+#line 272 "engines/director/lingo/lingo-gr.y"
{
inst then = 0, else1 = 0, end = 0;
- WRITE_UINT32(&then, (yyvsp[(5) - (11)].code));
- WRITE_UINT32(&else1, (yyvsp[(7) - (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, (yyvsp[(9) - (11)].code)); ;}
+ WRITE_UINT32(&then, (yyvsp[(5) - (10)].code));
+ WRITE_UINT32(&else1, (yyvsp[(7) - (10)].code));
+ WRITE_UINT32(&end, (yyvsp[(9) - (10)].code));
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (10)].code) + 1] = then; /* thenpart */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (10)].code) + 2] = else1; /* elsepart */
+ (*g_lingo->_currentScript)[(yyvsp[(1) - (10)].code) + 3] = end; /* end, if cond fails */
+
+ checkEnd((yyvsp[(10) - (10)].s), "if", true);
+
+ g_lingo->processIf(0, (yyvsp[(9) - (10)].code)); ;}
break;
case 32:
-#line 258 "engines/director/lingo/lingo-gr.y"
+#line 284 "engines/director/lingo/lingo-gr.y"
{
inst then = 0, else1 = 0, end = 0;
WRITE_UINT32(&then, (yyvsp[(4) - (6)].code));
@@ -2244,7 +2263,7 @@ yyreduce:
break;
case 33:
-#line 268 "engines/director/lingo/lingo-gr.y"
+#line 294 "engines/director/lingo/lingo-gr.y"
{
inst then = 0, else1 = 0, end = 0;
WRITE_UINT32(&then, (yyvsp[(4) - (10)].code));
@@ -2258,7 +2277,7 @@ yyreduce:
break;
case 34:
-#line 278 "engines/director/lingo/lingo-gr.y"
+#line 304 "engines/director/lingo/lingo-gr.y"
{
inst then = 0, else1 = 0, end = 0;
WRITE_UINT32(&then, (yyvsp[(4) - (10)].code));
@@ -2272,17 +2291,17 @@ yyreduce:
break;
case 35:
-#line 289 "engines/director/lingo/lingo-gr.y"
+#line 315 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = 0; ;}
break;
case 36:
-#line 290 "engines/director/lingo/lingo-gr.y"
+#line 316 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = (yyvsp[(2) - (3)].code); ;}
break;
case 41:
-#line 301 "engines/director/lingo/lingo-gr.y"
+#line 327 "engines/director/lingo/lingo-gr.y"
{
inst then = 0;
WRITE_UINT32(&then, (yyvsp[(4) - (6)].code));
@@ -2292,7 +2311,7 @@ yyreduce:
break;
case 43:
-#line 310 "engines/director/lingo/lingo-gr.y"
+#line 336 "engines/director/lingo/lingo-gr.y"
{
inst then = 0;
WRITE_UINT32(&then, (yyvsp[(4) - (5)].code));
@@ -2302,22 +2321,22 @@ yyreduce:
break;
case 44:
-#line 318 "engines/director/lingo/lingo-gr.y"
+#line 344 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(STOP); ;}
break;
case 45:
-#line 319 "engines/director/lingo/lingo-gr.y"
+#line 345 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code2(g_lingo->c_eq, STOP); ;}
break;
case 47:
-#line 322 "engines/director/lingo/lingo-gr.y"
+#line 348 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = g_lingo->code3(g_lingo->c_repeatwhilecode, STOP, STOP); ;}
break;
case 48:
-#line 324 "engines/director/lingo/lingo-gr.y"
+#line 350 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code3(g_lingo->c_repeatwithcode, STOP, STOP);
g_lingo->code3(STOP, STOP, STOP);
@@ -2326,7 +2345,7 @@ yyreduce:
break;
case 49:
-#line 330 "engines/director/lingo/lingo-gr.y"
+#line 356 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code1(g_lingo->c_ifcode);
g_lingo->code3(STOP, STOP, STOP);
@@ -2335,7 +2354,7 @@ yyreduce:
break;
case 50:
-#line 336 "engines/director/lingo/lingo-gr.y"
+#line 362 "engines/director/lingo/lingo-gr.y"
{
inst skipEnd;
WRITE_UINT32(&skipEnd, 1); // We have to skip end to avoid multiple executions
@@ -2345,22 +2364,22 @@ yyreduce:
break;
case 51:
-#line 343 "engines/director/lingo/lingo-gr.y"
+#line 369 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = g_lingo->_currentScript->size(); ;}
break;
case 52:
-#line 345 "engines/director/lingo/lingo-gr.y"
+#line 371 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(STOP); (yyval.code) = g_lingo->_currentScript->size(); ;}
break;
case 53:
-#line 347 "engines/director/lingo/lingo-gr.y"
+#line 373 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = g_lingo->_currentScript->size(); ;}
break;
case 56:
-#line 352 "engines/director/lingo/lingo-gr.y"
+#line 378 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code1(g_lingo->c_whencode);
g_lingo->code1(STOP);
@@ -2369,47 +2388,47 @@ yyreduce:
break;
case 57:
-#line 358 "engines/director/lingo/lingo-gr.y"
+#line 384 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = g_lingo->codeConst((yyvsp[(1) - (1)].i)); ;}
break;
case 58:
-#line 359 "engines/director/lingo/lingo-gr.y"
+#line 385 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code1(g_lingo->c_fconstpush);
g_lingo->codeFloat((yyvsp[(1) - (1)].f)); ;}
break;
case 59:
-#line 362 "engines/director/lingo/lingo-gr.y"
+#line 388 "engines/director/lingo/lingo-gr.y"
{ // D3
(yyval.code) = g_lingo->code1(g_lingo->c_symbolpush);
g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); ;}
break;
case 60:
-#line 365 "engines/director/lingo/lingo-gr.y"
+#line 391 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code1(g_lingo->c_stringpush);
g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); ;}
break;
case 61:
-#line 368 "engines/director/lingo/lingo-gr.y"
+#line 394 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code1(g_lingo->_handlers[*(yyvsp[(1) - (1)].s)]->u.func);
delete (yyvsp[(1) - (1)].s); ;}
break;
case 62:
-#line 371 "engines/director/lingo/lingo-gr.y"
+#line 397 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->codeFunc((yyvsp[(1) - (4)].s), (yyvsp[(3) - (4)].narg));
delete (yyvsp[(1) - (4)].s); ;}
break;
case 63:
-#line 374 "engines/director/lingo/lingo-gr.y"
+#line 400 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code1(g_lingo->c_eval);
g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str());
@@ -2417,7 +2436,7 @@ yyreduce:
break;
case 64:
-#line 378 "engines/director/lingo/lingo-gr.y"
+#line 404 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->codeConst(0); // Put dummy id
g_lingo->code1(g_lingo->c_theentitypush);
@@ -2428,7 +2447,7 @@ yyreduce:
break;
case 65:
-#line 385 "engines/director/lingo/lingo-gr.y"
+#line 411 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code1(g_lingo->c_theentitypush);
inst e = 0, f = 0;
@@ -2438,306 +2457,306 @@ yyreduce:
break;
case 67:
-#line 392 "engines/director/lingo/lingo-gr.y"
+#line 418 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_add); ;}
break;
case 68:
-#line 393 "engines/director/lingo/lingo-gr.y"
+#line 419 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_sub); ;}
break;
case 69:
-#line 394 "engines/director/lingo/lingo-gr.y"
+#line 420 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_mul); ;}
break;
case 70:
-#line 395 "engines/director/lingo/lingo-gr.y"
+#line 421 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_div); ;}
break;
case 71:
-#line 396 "engines/director/lingo/lingo-gr.y"
+#line 422 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_mod); ;}
break;
case 72:
-#line 397 "engines/director/lingo/lingo-gr.y"
+#line 423 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_gt); ;}
break;
case 73:
-#line 398 "engines/director/lingo/lingo-gr.y"
+#line 424 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_lt); ;}
break;
case 74:
-#line 399 "engines/director/lingo/lingo-gr.y"
+#line 425 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_neq); ;}
break;
case 75:
-#line 400 "engines/director/lingo/lingo-gr.y"
+#line 426 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_ge); ;}
break;
case 76:
-#line 401 "engines/director/lingo/lingo-gr.y"
+#line 427 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_le); ;}
break;
case 77:
-#line 402 "engines/director/lingo/lingo-gr.y"
+#line 428 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_and); ;}
break;
case 78:
-#line 403 "engines/director/lingo/lingo-gr.y"
+#line 429 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_or); ;}
break;
case 79:
-#line 404 "engines/director/lingo/lingo-gr.y"
+#line 430 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_not); ;}
break;
case 80:
-#line 405 "engines/director/lingo/lingo-gr.y"
+#line 431 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_ampersand); ;}
break;
case 81:
-#line 406 "engines/director/lingo/lingo-gr.y"
+#line 432 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_after); ;}
break;
case 82:
-#line 407 "engines/director/lingo/lingo-gr.y"
+#line 433 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_concat); ;}
break;
case 83:
-#line 408 "engines/director/lingo/lingo-gr.y"
+#line 434 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_contains); ;}
break;
case 84:
-#line 409 "engines/director/lingo/lingo-gr.y"
+#line 435 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_starts); ;}
break;
case 85:
-#line 410 "engines/director/lingo/lingo-gr.y"
+#line 436 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = (yyvsp[(2) - (2)].code); ;}
break;
case 86:
-#line 411 "engines/director/lingo/lingo-gr.y"
+#line 437 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = (yyvsp[(2) - (2)].code); g_lingo->code1(g_lingo->c_negate); ;}
break;
case 87:
-#line 412 "engines/director/lingo/lingo-gr.y"
+#line 438 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = (yyvsp[(2) - (3)].code); ;}
break;
case 88:
-#line 413 "engines/director/lingo/lingo-gr.y"
+#line 439 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_intersects); ;}
break;
case 89:
-#line 414 "engines/director/lingo/lingo-gr.y"
+#line 440 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_within); ;}
break;
case 90:
-#line 415 "engines/director/lingo/lingo-gr.y"
+#line 441 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_charOf); ;}
break;
case 91:
-#line 416 "engines/director/lingo/lingo-gr.y"
+#line 442 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_charToOf); ;}
break;
case 92:
-#line 417 "engines/director/lingo/lingo-gr.y"
+#line 443 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_itemOf); ;}
break;
case 93:
-#line 418 "engines/director/lingo/lingo-gr.y"
+#line 444 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_itemToOf); ;}
break;
case 94:
-#line 419 "engines/director/lingo/lingo-gr.y"
+#line 445 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_lineOf); ;}
break;
case 95:
-#line 420 "engines/director/lingo/lingo-gr.y"
+#line 446 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_lineToOf); ;}
break;
case 96:
-#line 421 "engines/director/lingo/lingo-gr.y"
+#line 447 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_wordOf); ;}
break;
case 97:
-#line 422 "engines/director/lingo/lingo-gr.y"
+#line 448 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_wordToOf); ;}
break;
case 98:
-#line 425 "engines/director/lingo/lingo-gr.y"
+#line 451 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_printtop); ;}
break;
case 101:
-#line 428 "engines/director/lingo/lingo-gr.y"
+#line 454 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_exitRepeat); ;}
break;
case 102:
-#line 429 "engines/director/lingo/lingo-gr.y"
+#line 455 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeConst(0); // Push fake value on stack
g_lingo->code1(g_lingo->c_procret); ;}
break;
case 105:
-#line 433 "engines/director/lingo/lingo-gr.y"
+#line 459 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->_handlers[*(yyvsp[(1) - (2)].s)]->u.func);
delete (yyvsp[(1) - (2)].s); ;}
break;
case 106:
-#line 436 "engines/director/lingo/lingo-gr.y"
+#line 462 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->_handlers[*(yyvsp[(1) - (2)].s)]->u.func);
delete (yyvsp[(1) - (2)].s); ;}
break;
case 107:
-#line 439 "engines/director/lingo/lingo-gr.y"
+#line 465 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code2(g_lingo->c_voidpush, g_lingo->_handlers[*(yyvsp[(1) - (1)].s)]->u.func);
delete (yyvsp[(1) - (1)].s); ;}
break;
case 108:
-#line 442 "engines/director/lingo/lingo-gr.y"
+#line 468 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeFunc((yyvsp[(1) - (2)].s), (yyvsp[(2) - (2)].narg)); ;}
break;
case 109:
-#line 443 "engines/director/lingo/lingo-gr.y"
+#line 469 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_open); ;}
break;
case 110:
-#line 444 "engines/director/lingo/lingo-gr.y"
+#line 470 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code2(g_lingo->c_voidpush, g_lingo->c_open); ;}
break;
case 111:
-#line 445 "engines/director/lingo/lingo-gr.y"
+#line 471 "engines/director/lingo/lingo-gr.y"
{ Common::String s("sound-"); s += *(yyvsp[(2) - (3)].s); g_lingo->codeFunc(&s, (yyvsp[(3) - (3)].narg)); ;}
break;
case 112:
-#line 448 "engines/director/lingo/lingo-gr.y"
+#line 474 "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 113:
-#line 449 "engines/director/lingo/lingo-gr.y"
+#line 475 "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 114:
-#line 452 "engines/director/lingo/lingo-gr.y"
+#line 478 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_instance); g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); delete (yyvsp[(1) - (1)].s); ;}
break;
case 115:
-#line 453 "engines/director/lingo/lingo-gr.y"
+#line 479 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_instance); g_lingo->codeString((yyvsp[(3) - (3)].s)->c_str()); delete (yyvsp[(3) - (3)].s); ;}
break;
case 116:
-#line 464 "engines/director/lingo/lingo-gr.y"
+#line 490 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_gotoloop); ;}
break;
case 117:
-#line 465 "engines/director/lingo/lingo-gr.y"
+#line 491 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_gotonext); ;}
break;
case 118:
-#line 466 "engines/director/lingo/lingo-gr.y"
+#line 492 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_gotoprevious); ;}
break;
case 119:
-#line 467 "engines/director/lingo/lingo-gr.y"
+#line 493 "engines/director/lingo/lingo-gr.y"
{
g_lingo->codeConst(1);
g_lingo->code1(g_lingo->c_goto); ;}
break;
case 120:
-#line 470 "engines/director/lingo/lingo-gr.y"
+#line 496 "engines/director/lingo/lingo-gr.y"
{
g_lingo->codeConst(3);
g_lingo->code1(g_lingo->c_goto); ;}
break;
case 121:
-#line 473 "engines/director/lingo/lingo-gr.y"
+#line 499 "engines/director/lingo/lingo-gr.y"
{
g_lingo->codeConst(2);
g_lingo->code1(g_lingo->c_goto); ;}
break;
case 126:
-#line 486 "engines/director/lingo/lingo-gr.y"
+#line 512 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_playdone); ;}
break;
case 127:
-#line 487 "engines/director/lingo/lingo-gr.y"
+#line 513 "engines/director/lingo/lingo-gr.y"
{
g_lingo->codeConst(1);
g_lingo->code1(g_lingo->c_play); ;}
break;
case 128:
-#line 490 "engines/director/lingo/lingo-gr.y"
+#line 516 "engines/director/lingo/lingo-gr.y"
{
g_lingo->codeConst(3);
g_lingo->code1(g_lingo->c_play); ;}
break;
case 129:
-#line 493 "engines/director/lingo/lingo-gr.y"
+#line 519 "engines/director/lingo/lingo-gr.y"
{
g_lingo->codeConst(2);
g_lingo->code1(g_lingo->c_play); ;}
break;
case 130:
-#line 523 "engines/director/lingo/lingo-gr.y"
+#line 549 "engines/director/lingo/lingo-gr.y"
{ g_lingo->_indef = true; g_lingo->_currentFactory.clear(); ;}
break;
case 131:
-#line 524 "engines/director/lingo/lingo-gr.y"
+#line 550 "engines/director/lingo/lingo-gr.y"
{
g_lingo->codeConst(0); // Push fake value on stack
g_lingo->code1(g_lingo->c_procret);
@@ -2746,19 +2765,19 @@ yyreduce:
break;
case 132:
-#line 529 "engines/director/lingo/lingo-gr.y"
+#line 555 "engines/director/lingo/lingo-gr.y"
{
g_lingo->codeFactory(*(yyvsp[(2) - (2)].s));
;}
break;
case 133:
-#line 532 "engines/director/lingo/lingo-gr.y"
+#line 558 "engines/director/lingo/lingo-gr.y"
{ g_lingo->_indef = true; ;}
break;
case 134:
-#line 533 "engines/director/lingo/lingo-gr.y"
+#line 559 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_procret);
g_lingo->define(*(yyvsp[(2) - (8)].s), (yyvsp[(4) - (8)].code), (yyvsp[(5) - (8)].narg) + 1, &g_lingo->_currentFactory);
@@ -2766,17 +2785,17 @@ yyreduce:
break;
case 135:
-#line 537 "engines/director/lingo/lingo-gr.y"
+#line 563 "engines/director/lingo/lingo-gr.y"
{ g_lingo->_indef = true; g_lingo->_currentFactory.clear(); ;}
break;
case 136:
-#line 538 "engines/director/lingo/lingo-gr.y"
+#line 564 "engines/director/lingo/lingo-gr.y"
{ g_lingo->_ignoreMe = true; ;}
break;
case 137:
-#line 538 "engines/director/lingo/lingo-gr.y"
+#line 564 "engines/director/lingo/lingo-gr.y"
{
g_lingo->codeConst(0); // Push fake value on stack
g_lingo->code1(g_lingo->c_procret);
@@ -2784,39 +2803,37 @@ yyreduce:
g_lingo->_indef = false;
g_lingo->_ignoreMe = false;
- //if (*$2 != *$11) {
- // yyerror("on vs end handler mismatch");
- //}
+ checkEnd((yyvsp[(10) - (10)].s), (yyvsp[(2) - (10)].s)->c_str(), false);
;}
break;
case 138:
-#line 550 "engines/director/lingo/lingo-gr.y"
+#line 574 "engines/director/lingo/lingo-gr.y"
{ (yyval.narg) = 0; ;}
break;
case 139:
-#line 551 "engines/director/lingo/lingo-gr.y"
+#line 575 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeArg((yyvsp[(1) - (1)].s)); (yyval.narg) = 1; ;}
break;
case 140:
-#line 552 "engines/director/lingo/lingo-gr.y"
+#line 576 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeArg((yyvsp[(3) - (3)].s)); (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}
break;
case 141:
-#line 553 "engines/director/lingo/lingo-gr.y"
+#line 577 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeArg((yyvsp[(4) - (4)].s)); (yyval.narg) = (yyvsp[(1) - (4)].narg) + 1; ;}
break;
case 142:
-#line 555 "engines/director/lingo/lingo-gr.y"
+#line 579 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeArgStore(); ;}
break;
case 143:
-#line 559 "engines/director/lingo/lingo-gr.y"
+#line 583 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_call);
g_lingo->codeString((yyvsp[(1) - (3)].s)->c_str());
@@ -2826,23 +2843,23 @@ yyreduce:
break;
case 144:
-#line 567 "engines/director/lingo/lingo-gr.y"
+#line 591 "engines/director/lingo/lingo-gr.y"
{ (yyval.narg) = 0; ;}
break;
case 145:
-#line 568 "engines/director/lingo/lingo-gr.y"
+#line 592 "engines/director/lingo/lingo-gr.y"
{ (yyval.narg) = 1; ;}
break;
case 146:
-#line 569 "engines/director/lingo/lingo-gr.y"
+#line 593 "engines/director/lingo/lingo-gr.y"
{ (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}
break;
/* Line 1267 of yacc.c. */
-#line 2846 "engines/director/lingo/lingo-gr.cpp"
+#line 2863 "engines/director/lingo/lingo-gr.cpp"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -3056,6 +3073,6 @@ yyreturn:
}
-#line 572 "engines/director/lingo/lingo-gr.y"
+#line 596 "engines/director/lingo/lingo-gr.y"
diff --git a/engines/director/lingo/lingo-gr.h b/engines/director/lingo/lingo-gr.h
index 27cfd6e9b3..7ca6875c97 100644
--- a/engines/director/lingo/lingo-gr.h
+++ b/engines/director/lingo/lingo-gr.h
@@ -60,10 +60,10 @@
STRING = 276,
HANDLER = 277,
SYMBOL = 278,
- tDOWN = 279,
- tELSE = 280,
- tNLELSIF = 281,
- tEND = 282,
+ ENDCLAUSE = 279,
+ tDOWN = 280,
+ tELSE = 281,
+ tNLELSIF = 282,
tEXIT = 283,
tFRAME = 284,
tGLOBAL = 285,
@@ -140,10 +140,10 @@
#define STRING 276
#define HANDLER 277
#define SYMBOL 278
-#define tDOWN 279
-#define tELSE 280
-#define tNLELSIF 281
-#define tEND 282
+#define ENDCLAUSE 279
+#define tDOWN 280
+#define tELSE 281
+#define tNLELSIF 282
#define tEXIT 283
#define tFRAME 284
#define tGLOBAL 285
@@ -202,7 +202,7 @@
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 69 "engines/director/lingo/lingo-gr.y"
+#line 79 "engines/director/lingo/lingo-gr.y"
{
Common::String *s;
int i;
diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y
index a148a9c6a7..0696261962 100644
--- a/engines/director/lingo/lingo-gr.y
+++ b/engines/director/lingo/lingo-gr.y
@@ -63,6 +63,16 @@ void yyerror(const char *s) {
warning("%s at line %d col %d", s, g_lingo->_linenumber, g_lingo->_colnumber);
}
+void checkEnd(Common::String *token, const char *expect, bool required) {
+ if (required) {
+ if (token->compareToIgnoreCase(expect)) {
+ Common::String err = Common::String::format("end mismatch. Expected %s but got %s", expect, token->c_str());
+ yyerror(err.c_str());
+ }
+ }
+
+ delete token;
+}
%}
@@ -83,7 +93,8 @@ void yyerror(const char *s) {
%token<f> FLOAT
%token<s> BLTIN BLTINNOARGS BLTINNOARGSORONE BLTINONEARG BLTINARGLIST
%token<s> ID STRING HANDLER SYMBOL
-%token tDOWN tELSE tNLELSIF tEND tEXIT tFRAME tGLOBAL tGO tIF tINTO tLOOP tMACRO
+%token<s> ENDCLAUSE
+%token tDOWN tELSE tNLELSIF tEXIT tFRAME tGLOBAL tGO tIF tINTO tLOOP tMACRO
%token tMOVIE tNEXT tOF tPREVIOUS tPUT tREPEAT tSET tTHEN tTO tWHEN
%token tWITH tWHILE tNLELSE tFACTORY tMETHOD tOPEN tPLAY tDONE tPLAYACCEL tINSTANCE
%token tGE tLE tGT tLT tEQ tNEQ tAND tOR tNOT tMOD
@@ -183,18 +194,20 @@ stmt: stmtoneliner
// statements
// end repeat
//
- | repeatwhile '(' cond ')' stmtlist end tEND tREPEAT {
+ | repeatwhile '(' cond ')' stmtlist end ENDCLAUSE {
inst body = 0, end = 0;
WRITE_UINT32(&body, $5);
WRITE_UINT32(&end, $6);
(*g_lingo->_currentScript)[$1 + 1] = body; /* body of loop */
- (*g_lingo->_currentScript)[$1 + 2] = end; } /* end, if cond fails */
+ (*g_lingo->_currentScript)[$1 + 2] = end; /* end, if cond fails */
+
+ checkEnd($7, "repeat", true); }
;
// repeat with index = start to end
// statements
// end repeat
//
- | repeatwith '=' expr end tTO expr end stmtlist end tEND tREPEAT {
+ | repeatwith '=' expr end tTO expr end stmtlist end ENDCLAUSE {
inst init = 0, finish = 0, body = 0, end = 0, inc = 0;
WRITE_UINT32(&init, $3);
WRITE_UINT32(&finish, $6);
@@ -205,12 +218,14 @@ stmt: stmtoneliner
(*g_lingo->_currentScript)[$1 + 2] = finish;/* final count value */
(*g_lingo->_currentScript)[$1 + 3] = body; /* body of loop */
(*g_lingo->_currentScript)[$1 + 4] = inc; /* increment */
- (*g_lingo->_currentScript)[$1 + 5] = end; } /* end, if cond fails */
+ (*g_lingo->_currentScript)[$1 + 5] = end; /* end, if cond fails */
+
+ checkEnd($10, "repeat", true); }
// repeat with index = high down to low
// statements
// end repeat
//
- | repeatwith '=' expr end tDOWN tTO expr end stmtlist end tEND tREPEAT {
+ | repeatwith '=' expr end tDOWN tTO expr end stmtlist end ENDCLAUSE {
inst init = 0, finish = 0, body = 0, end = 0, inc = 0;
WRITE_UINT32(&init, $3);
WRITE_UINT32(&finish, $7);
@@ -221,7 +236,9 @@ stmt: stmtoneliner
(*g_lingo->_currentScript)[$1 + 2] = finish;/* final count value */
(*g_lingo->_currentScript)[$1 + 3] = body; /* body of loop */
(*g_lingo->_currentScript)[$1 + 4] = inc; /* increment */
- (*g_lingo->_currentScript)[$1 + 5] = end; } /* end, if cond fails */
+ (*g_lingo->_currentScript)[$1 + 5] = end; /* end, if cond fails */
+
+ checkEnd($11, "repeat", true); }
| when expr end {
inst end = 0;
WRITE_UINT32(&end, $3);
@@ -230,14 +247,17 @@ stmt: stmtoneliner
}
;
-ifstmt: if cond tTHEN nl stmtlist end tEND tIF {
+ifstmt: if cond tTHEN nl stmtlist end ENDCLAUSE {
inst then = 0, end = 0;
WRITE_UINT32(&then, $5);
WRITE_UINT32(&end, $6);
(*g_lingo->_currentScript)[$1 + 1] = then; /* thenpart */
(*g_lingo->_currentScript)[$1 + 3] = end; /* end, if cond fails */
+
+ checkEnd($7, "if", true);
+
g_lingo->processIf(0, 0); }
- | if cond tTHEN nl stmtlist end tNLELSE stmtlist end tEND tIF {
+ | if cond tTHEN nl stmtlist end tNLELSE stmtlist end ENDCLAUSE {
inst then = 0, else1 = 0, end = 0;
WRITE_UINT32(&then, $5);
WRITE_UINT32(&else1, $8);
@@ -245,8 +265,11 @@ ifstmt: if cond tTHEN nl stmtlist end tEND tIF {
(*g_lingo->_currentScript)[$1 + 1] = then; /* thenpart */
(*g_lingo->_currentScript)[$1 + 2] = else1; /* elsepart */
(*g_lingo->_currentScript)[$1 + 3] = end; /* end, if cond fails */
+
+ checkEnd($10, "if", true);
+
g_lingo->processIf(0, 0); }
- | if cond tTHEN nl stmtlist end begin elseifstmt end tEND tIF {
+ | if cond tTHEN nl stmtlist end begin elseifstmt end ENDCLAUSE {
inst then = 0, else1 = 0, end = 0;
WRITE_UINT32(&then, $5);
WRITE_UINT32(&else1, $7);
@@ -254,6 +277,9 @@ ifstmt: if cond tTHEN nl stmtlist end tEND tIF {
(*g_lingo->_currentScript)[$1 + 1] = then; /* thenpart */
(*g_lingo->_currentScript)[$1 + 2] = else1; /* elsepart */
(*g_lingo->_currentScript)[$1 + 3] = end; /* end, if cond fails */
+
+ checkEnd($10, "if", true);
+
g_lingo->processIf(0, $9); }
| if cond tTHEN begin stmtoneliner end {
inst then = 0, else1 = 0, end = 0;
@@ -535,16 +561,14 @@ 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(); } // D3
- begin { g_lingo->_ignoreMe = true; } argdef nl argstore stmtlist tEND {
+ begin { g_lingo->_ignoreMe = true; } argdef nl argstore stmtlist ENDCLAUSE {
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");
- //}
+ checkEnd($10, $2->c_str(), false);
}
argdef: /* nothing */ { $$ = 0; }
diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp
index 6a2861c3dd..07a2aa5729 100644
--- a/engines/director/lingo/lingo-lex.cpp
+++ b/engines/director/lingo/lingo-lex.cpp
@@ -373,7 +373,7 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[236] =
+static yyconst flex_int16_t yy_accept[241] =
{ 0,
0, 0, 69, 67, 3, 65, 65, 67, 67, 67,
64, 64, 64, 63, 64, 64, 61, 61, 61, 61,
@@ -390,17 +390,17 @@ static yyconst flex_int16_t yy_accept[236] =
61, 61, 0, 61, 61, 61, 61, 61, 61, 61,
31, 61, 61, 34, 61, 61, 61, 41, 61, 43,
61, 61, 61, 61, 61, 61, 61, 61, 0, 61,
- 61, 8, 61, 10, 11, 15, 18, 61, 61, 61,
- 0, 61, 61, 25, 26, 27, 28, 61, 61, 61,
- 33, 37, 39, 61, 61, 61, 61, 61, 0, 49,
- 54, 61, 52, 56, 14, 5, 61, 61, 61, 19,
- 61, 21, 61, 61, 29, 61, 32, 61, 61, 44,
- 61, 61, 48, 48, 55, 61, 0, 7, 61, 61,
-
- 20, 61, 61, 30, 61, 42, 51, 45, 0, 48,
- 53, 0, 61, 17, 61, 61, 61, 0, 48, 13,
- 9, 23, 61, 40, 0, 48, 61, 0, 0, 24,
- 47, 0, 0, 46, 0
+ 61, 8, 61, 10, 11, 15, 0, 16, 18, 61,
+ 61, 61, 0, 61, 61, 25, 26, 27, 28, 61,
+ 61, 61, 33, 37, 39, 61, 61, 61, 61, 61,
+ 0, 49, 54, 61, 52, 56, 14, 5, 61, 61,
+ 16, 16, 61, 19, 61, 21, 61, 61, 29, 61,
+ 32, 61, 61, 44, 61, 61, 48, 48, 55, 61,
+
+ 0, 7, 61, 16, 61, 20, 61, 61, 30, 61,
+ 42, 51, 45, 0, 48, 53, 0, 61, 17, 61,
+ 61, 61, 0, 48, 13, 9, 23, 61, 40, 0,
+ 48, 61, 0, 0, 24, 47, 0, 0, 46, 0
} ;
static yyconst flex_int32_t yy_ec[256] =
@@ -446,69 +446,71 @@ static yyconst flex_int32_t yy_meta[64] =
5, 5, 5
} ;
-static yyconst flex_int16_t yy_base[243] =
+static yyconst flex_int16_t yy_base[252] =
{ 0,
- 0, 62, 201, 569, 66, 70, 74, 78, 193, 0,
- 569, 184, 182, 54, 70, 158, 65, 67, 68, 60,
+ 0, 62, 206, 598, 66, 70, 74, 78, 195, 0,
+ 598, 190, 183, 54, 70, 178, 65, 67, 68, 60,
70, 86, 75, 0, 102, 85, 117, 106, 135, 118,
- 79, 149, 118, 161, 193, 213, 217, 569, 221, 225,
- 229, 79, 139, 569, 0, 569, 0, 98, 95, 569,
- 569, 569, 0, 97, 120, 136, 145, 121, 176, 119,
+ 79, 149, 118, 161, 193, 213, 217, 598, 221, 225,
+ 229, 79, 166, 598, 0, 598, 0, 133, 95, 598,
+ 598, 598, 0, 97, 120, 136, 145, 121, 176, 119,
156, 156, 193, 213, 159, 90, 0, 205, 215, 212,
212, 224, 210, 233, 209, 214, 0, 0, 230, 0,
235, 233, 221, 226, 223, 223, 227, 245, 246, 0,
264, 239, 255, 296, 300, 257, 0, 0, 76, 265,
- 0, 263, 262, 261, 276, 278, 287, 0, 278, 281,
+ 0, 263, 262, 261, 276, 278, 287, 98, 278, 281,
290, 291, 318, 288, 305, 297, 306, 299, 299, 312,
0, 313, 306, 0, 314, 304, 308, 0, 318, 0,
317, 323, 317, 352, 331, 335, 333, 346, 350, 342,
- 343, 0, 355, 0, 0, 0, 0, 348, 358, 366,
- 355, 370, 356, 0, 0, 0, 0, 360, 362, 372,
- 0, 0, 0, 369, 378, 378, 366, 368, 404, 0,
- 0, 385, 386, 0, 98, 0, 394, 392, 388, 0,
- 395, 569, 395, 392, 0, 408, 0, 400, 397, 0,
- 412, 401, 138, 431, 0, 412, 441, 0, 414, 409,
-
- 0, 420, 430, 0, 419, 0, 0, 0, 454, 465,
- 0, 430, 427, 0, 448, 451, 438, 452, 472, 569,
- 0, 0, 445, 0, 241, 480, 447, 486, 487, 0,
- 494, 466, 500, 506, 569, 540, 542, 545, 548, 554,
- 559, 563
+ 343, 0, 355, 0, 0, 0, 138, 0, 0, 348,
+ 358, 366, 355, 370, 356, 0, 0, 0, 0, 360,
+ 362, 372, 0, 0, 0, 369, 378, 378, 366, 368,
+ 404, 0, 0, 385, 386, 0, 241, 0, 394, 392,
+ 0, 0, 388, 0, 395, 598, 395, 392, 0, 408,
+ 0, 400, 397, 0, 412, 401, 431, 438, 0, 410,
+
+ 446, 0, 414, 0, 411, 0, 428, 434, 0, 421,
+ 0, 0, 0, 458, 462, 0, 438, 432, 0, 452,
+ 455, 435, 454, 476, 598, 0, 0, 443, 0, 480,
+ 481, 455, 494, 500, 0, 501, 469, 502, 511, 598,
+ 553, 555, 558, 561, 567, 572, 577, 580, 585, 587,
+ 592
} ;
-static yyconst flex_int16_t yy_def[243] =
+static yyconst flex_int16_t yy_def[252] =
{ 0,
- 235, 1, 235, 235, 235, 235, 235, 235, 236, 237,
- 235, 235, 235, 235, 235, 235, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 235, 235, 235, 235, 235, 235,
- 235, 235, 236, 235, 239, 235, 240, 235, 235, 235,
- 235, 235, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 235, 235, 235, 239, 240, 235, 238,
-
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 235, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 235, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 235, 238, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 238, 238, 238, 238, 238, 238, 241, 238,
- 238, 238, 238, 238, 235, 238, 238, 238, 238, 238,
- 238, 235, 238, 238, 238, 238, 238, 238, 238, 238,
- 238, 238, 241, 241, 238, 238, 235, 238, 238, 238,
-
- 238, 238, 238, 238, 238, 238, 238, 238, 235, 241,
- 238, 235, 238, 238, 238, 238, 238, 235, 241, 235,
- 238, 238, 238, 238, 235, 241, 238, 242, 235, 238,
- 242, 235, 235, 242, 0, 235, 235, 235, 235, 235,
- 235, 235
+ 240, 1, 240, 240, 240, 240, 240, 240, 241, 242,
+ 240, 240, 240, 240, 240, 240, 243, 243, 243, 243,
+ 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
+ 243, 243, 243, 243, 240, 240, 240, 240, 240, 240,
+ 240, 240, 241, 240, 244, 240, 245, 240, 240, 240,
+ 240, 240, 243, 243, 243, 243, 243, 243, 243, 243,
+ 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
+ 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
+ 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
+ 243, 243, 243, 240, 240, 240, 244, 245, 240, 243,
+
+ 243, 243, 243, 243, 243, 243, 243, 246, 243, 243,
+ 243, 243, 240, 243, 243, 243, 243, 243, 243, 243,
+ 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
+ 243, 243, 243, 243, 243, 243, 243, 243, 240, 243,
+ 243, 243, 243, 243, 243, 243, 247, 248, 243, 243,
+ 243, 243, 240, 243, 243, 243, 243, 243, 243, 243,
+ 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
+ 249, 243, 243, 243, 243, 243, 240, 243, 243, 243,
+ 250, 248, 243, 243, 243, 240, 243, 243, 243, 243,
+ 243, 243, 243, 243, 243, 243, 249, 249, 243, 243,
+
+ 240, 243, 243, 250, 243, 243, 243, 243, 243, 243,
+ 243, 243, 243, 240, 249, 243, 240, 243, 243, 243,
+ 243, 243, 240, 249, 240, 243, 243, 243, 243, 240,
+ 249, 243, 251, 240, 243, 251, 240, 240, 251, 0,
+ 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
+ 240
} ;
-static yyconst flex_int16_t yy_nxt[633] =
+static yyconst flex_int16_t yy_nxt[662] =
{ 0,
4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
4, 14, 15, 11, 16, 17, 18, 19, 20, 21,
@@ -519,70 +521,73 @@ static yyconst flex_int16_t yy_nxt[633] =
34, 24, 24, 35, 48, 49, 36, 37, 38, 38,
39, 40, 41, 41, 40, 40, 41, 41, 40, 39,
38, 38, 39, 50, 51, 54, 56, 99, 59, 42,
- 57, 113, 55, 42, 113, 60, 58, 61, 84, 197,
+ 57, 113, 55, 42, 113, 60, 58, 61, 84, 147,
- 65, 63, 197, 66, 96, 48, 49, 62, 70, 99,
+ 65, 63, 147, 66, 96, 48, 49, 62, 70, 53,
54, 56, 59, 71, 42, 57, 55, 64, 42, 60,
58, 61, 67, 84, 65, 75, 63, 66, 96, 68,
- 100, 62, 72, 70, 76, 69, 73, 71, 101, 209,
- 89, 64, 209, 81, 44, 74, 90, 67, 104, 82,
+ 100, 62, 72, 70, 76, 69, 73, 71, 101, 147,
+ 89, 64, 147, 81, 99, 74, 90, 67, 104, 82,
75, 107, 83, 68, 100, 77, 102, 72, 76, 69,
103, 73, 78, 101, 79, 89, 80, 81, 85, 74,
- 90, 52, 104, 82, 108, 107, 83, 86, 87, 109,
+ 90, 44, 104, 82, 108, 107, 83, 86, 87, 109,
77, 102, 88, 91, 92, 103, 78, 112, 79, 93,
- 80, 47, 46, 85, 94, 38, 38, 95, 44, 108,
+ 80, 52, 47, 85, 94, 38, 38, 95, 46, 108,
- 235, 86, 87, 105, 109, 235, 88, 235, 91, 92,
+ 44, 86, 87, 105, 109, 240, 88, 240, 91, 92,
110, 112, 106, 93, 95, 38, 38, 95, 37, 38,
38, 39, 39, 38, 38, 39, 40, 105, 111, 40,
40, 41, 41, 40, 116, 110, 106, 114, 115, 117,
- 118, 119, 228, 120, 42, 228, 123, 124, 42, 125,
+ 118, 119, 201, 120, 42, 201, 123, 124, 42, 125,
126, 121, 127, 111, 128, 129, 130, 131, 132, 116,
133, 114, 115, 117, 118, 134, 119, 120, 122, 42,
123, 124, 137, 42, 125, 126, 121, 127, 128, 129,
- 130, 131, 132, 135, 140, 133, 138, 136, 235, 139,
+ 130, 131, 132, 135, 140, 133, 138, 136, 240, 139,
134, 141, 122, 142, 143, 144, 137, 94, 38, 38,
- 95, 95, 38, 38, 95, 145, 146, 150, 135, 140,
- 138, 147, 136, 139, 148, 141, 149, 142, 143, 113,
- 144, 152, 113, 155, 153, 156, 235, 235, 157, 145,
- 158, 146, 150, 154, 159, 147, 160, 165, 148, 161,
- 149, 162, 163, 164, 166, 152, 167, 155, 168, 153,
- 156, 151, 157, 169, 158, 173, 169, 154, 171, 159,
- 172, 160, 165, 161, 174, 162, 163, 164, 166, 175,
- 178, 167, 168, 176, 177, 151, 179, 180, 235, 170,
- 173, 181, 171, 182, 172, 183, 235, 184, 185, 174,
- 186, 187, 188, 189, 175, 178, 190, 176, 177, 191,
-
- 179, 192, 180, 170, 195, 169, 181, 182, 169, 196,
- 183, 184, 185, 198, 186, 199, 187, 188, 189, 200,
- 201, 190, 202, 191, 203, 192, 204, 235, 205, 195,
- 206, 207, 209, 208, 196, 209, 194, 215, 198, 211,
- 199, 213, 197, 200, 201, 197, 202, 214, 203, 216,
- 220, 204, 205, 217, 206, 209, 207, 208, 209, 221,
- 194, 210, 215, 211, 212, 213, 209, 222, 223, 209,
- 224, 214, 225, 209, 216, 220, 209, 217, 227, 230,
- 235, 229, 218, 221, 229, 210, 233, 228, 229, 212,
- 228, 229, 222, 223, 224, 235, 219, 225, 235, 235,
-
- 235, 234, 227, 230, 234, 226, 218, 234, 235, 235,
- 234, 233, 235, 235, 235, 232, 235, 235, 235, 235,
- 219, 235, 235, 235, 235, 235, 235, 235, 235, 226,
- 235, 235, 235, 235, 235, 235, 235, 235, 235, 232,
- 43, 43, 235, 43, 43, 43, 45, 45, 53, 53,
- 53, 97, 97, 97, 98, 98, 235, 98, 98, 98,
- 193, 235, 235, 193, 231, 235, 235, 231, 3, 235,
- 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
- 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
- 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
-
- 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
- 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
- 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
- 235, 235
+ 95, 95, 38, 38, 95, 145, 146, 152, 135, 140,
+ 138, 149, 136, 139, 150, 141, 151, 142, 143, 113,
+ 144, 154, 113, 157, 155, 158, 240, 240, 159, 145,
+ 160, 146, 152, 156, 161, 149, 162, 167, 150, 163,
+ 151, 164, 165, 166, 168, 154, 169, 157, 170, 155,
+ 158, 153, 159, 171, 160, 175, 171, 156, 173, 161,
+ 174, 162, 167, 163, 176, 164, 165, 166, 168, 177,
+ 180, 169, 170, 178, 179, 153, 183, 184, 240, 172,
+ 175, 185, 173, 186, 174, 187, 240, 188, 189, 176,
+ 190, 191, 192, 193, 177, 180, 194, 178, 179, 195,
+
+ 183, 196, 184, 172, 199, 171, 185, 186, 171, 200,
+ 187, 188, 189, 202, 190, 203, 191, 192, 193, 205,
+ 206, 194, 207, 195, 208, 196, 209, 240, 210, 199,
+ 211, 212, 214, 213, 200, 214, 198, 216, 202, 214,
+ 203, 218, 214, 205, 206, 220, 207, 201, 208, 219,
+ 201, 209, 210, 221, 211, 222, 212, 213, 225, 214,
+ 198, 216, 214, 214, 226, 218, 214, 229, 215, 217,
+ 220, 227, 228, 219, 230, 240, 232, 214, 221, 222,
+ 214, 233, 234, 225, 233, 234, 223, 235, 226, 238,
+ 240, 229, 215, 224, 217, 233, 227, 228, 233, 230,
+
+ 232, 234, 240, 239, 234, 240, 239, 240, 240, 231,
+ 223, 235, 239, 240, 238, 239, 240, 224, 240, 240,
+ 240, 240, 240, 240, 240, 240, 240, 240, 237, 240,
+ 240, 240, 240, 231, 240, 240, 240, 240, 240, 240,
+ 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
+ 240, 240, 237, 43, 43, 240, 43, 43, 43, 45,
+ 45, 53, 53, 53, 97, 97, 97, 98, 98, 240,
+ 98, 98, 98, 148, 240, 148, 148, 148, 181, 240,
+ 240, 181, 181, 182, 182, 182, 197, 240, 240, 197,
+ 204, 204, 204, 236, 240, 240, 236, 3, 240, 240,
+
+ 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
+ 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
+ 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
+ 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
+ 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
+ 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
+ 240
} ;
-static yyconst flex_int16_t yy_chk[633] =
+static yyconst flex_int16_t yy_chk[662] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -593,24 +598,24 @@ static yyconst flex_int16_t yy_chk[633] =
1, 1, 1, 2, 14, 14, 2, 5, 5, 5,
5, 6, 6, 6, 6, 7, 7, 7, 7, 8,
8, 8, 8, 15, 15, 17, 18, 99, 20, 6,
- 19, 66, 17, 7, 66, 21, 19, 21, 31, 175,
+ 19, 66, 17, 7, 66, 21, 19, 21, 31, 108,
- 23, 22, 175, 23, 42, 49, 49, 21, 26, 48,
+ 23, 22, 108, 23, 42, 49, 49, 21, 26, 108,
17, 18, 20, 26, 6, 19, 17, 22, 7, 21,
19, 21, 25, 31, 23, 28, 22, 23, 42, 25,
- 54, 21, 27, 26, 28, 25, 27, 26, 55, 193,
- 33, 22, 193, 30, 43, 27, 33, 25, 58, 30,
+ 54, 21, 27, 26, 28, 25, 27, 26, 55, 147,
+ 33, 22, 147, 30, 48, 27, 33, 25, 58, 30,
28, 60, 30, 25, 54, 29, 56, 27, 28, 25,
57, 27, 29, 55, 29, 33, 29, 30, 32, 27,
- 33, 16, 58, 30, 61, 60, 30, 32, 32, 62,
+ 33, 43, 58, 30, 61, 60, 30, 32, 32, 62,
29, 56, 32, 34, 34, 57, 29, 65, 29, 34,
- 29, 13, 12, 32, 35, 35, 35, 35, 9, 61,
+ 29, 16, 13, 32, 35, 35, 35, 35, 12, 61,
- 3, 32, 32, 59, 62, 0, 32, 0, 34, 34,
+ 9, 32, 32, 59, 62, 3, 32, 0, 34, 34,
63, 65, 59, 34, 36, 36, 36, 36, 37, 37,
37, 37, 39, 39, 39, 39, 40, 59, 64, 40,
41, 41, 41, 41, 69, 63, 59, 68, 68, 70,
- 71, 72, 225, 73, 40, 225, 75, 76, 41, 79,
+ 71, 72, 177, 73, 40, 177, 75, 76, 41, 79,
81, 74, 82, 64, 83, 84, 85, 86, 87, 69,
88, 68, 68, 70, 71, 89, 72, 73, 74, 40,
75, 76, 92, 41, 79, 81, 74, 82, 83, 84,
@@ -624,36 +629,39 @@ static yyconst flex_int16_t yy_chk[633] =
111, 125, 126, 127, 131, 114, 132, 116, 133, 115,
117, 113, 118, 134, 119, 137, 134, 115, 135, 120,
136, 122, 129, 123, 138, 125, 126, 127, 131, 139,
- 143, 132, 133, 140, 141, 113, 148, 149, 0, 134,
- 137, 150, 135, 151, 136, 152, 0, 153, 158, 138,
- 159, 160, 164, 165, 139, 143, 166, 140, 141, 167,
-
- 148, 168, 149, 134, 172, 169, 150, 151, 169, 173,
- 152, 153, 158, 177, 159, 178, 160, 164, 165, 179,
- 181, 166, 183, 167, 184, 168, 186, 0, 188, 172,
- 189, 191, 194, 192, 173, 194, 169, 202, 177, 196,
- 178, 199, 197, 179, 181, 197, 183, 200, 184, 203,
- 212, 186, 188, 205, 189, 209, 191, 192, 209, 213,
- 169, 194, 202, 196, 197, 199, 210, 215, 216, 210,
- 217, 200, 218, 219, 203, 212, 219, 205, 223, 227,
- 0, 226, 209, 213, 226, 194, 232, 228, 229, 197,
- 228, 229, 215, 216, 217, 231, 210, 218, 231, 0,
-
- 0, 233, 223, 227, 233, 219, 209, 234, 0, 0,
- 234, 232, 0, 0, 0, 229, 0, 0, 0, 0,
- 210, 0, 0, 0, 0, 0, 0, 0, 0, 219,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 229,
- 236, 236, 0, 236, 236, 236, 237, 237, 238, 238,
- 238, 239, 239, 239, 240, 240, 0, 240, 240, 240,
- 241, 0, 0, 241, 242, 0, 0, 242, 235, 235,
- 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
- 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
- 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
-
- 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
- 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
- 235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
- 235, 235
+ 143, 132, 133, 140, 141, 113, 150, 151, 0, 134,
+ 137, 152, 135, 153, 136, 154, 0, 155, 160, 138,
+ 161, 162, 166, 167, 139, 143, 168, 140, 141, 169,
+
+ 150, 170, 151, 134, 174, 171, 152, 153, 171, 175,
+ 154, 155, 160, 179, 161, 180, 162, 166, 167, 183,
+ 185, 168, 187, 169, 188, 170, 190, 0, 192, 174,
+ 193, 195, 197, 196, 175, 197, 171, 200, 179, 198,
+ 180, 203, 198, 183, 185, 207, 187, 201, 188, 205,
+ 201, 190, 192, 208, 193, 210, 195, 196, 217, 214,
+ 171, 200, 214, 215, 218, 203, 215, 222, 198, 201,
+ 207, 220, 221, 205, 223, 0, 228, 224, 208, 210,
+ 224, 230, 231, 217, 230, 231, 214, 232, 218, 237,
+ 0, 222, 198, 215, 201, 233, 220, 221, 233, 223,
+
+ 228, 234, 236, 238, 234, 236, 238, 0, 0, 224,
+ 214, 232, 239, 0, 237, 239, 0, 215, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 234, 0,
+ 0, 0, 0, 224, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 234, 241, 241, 0, 241, 241, 241, 242,
+ 242, 243, 243, 243, 244, 244, 244, 245, 245, 0,
+ 245, 245, 245, 246, 0, 246, 246, 246, 247, 0,
+ 0, 247, 247, 248, 248, 248, 249, 0, 0, 249,
+ 250, 250, 250, 251, 0, 0, 251, 240, 240, 240,
+
+ 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
+ 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
+ 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
+ 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
+ 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
+ 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
+ 240
} ;
static yy_state_type yy_last_accepting_state;
@@ -727,7 +735,7 @@ static void countnl() {
g_lingo->_colnumber = strlen(p);
}
-#line 731 "engines/director/lingo/lingo-lex.cpp"
+#line 739 "engines/director/lingo/lingo-lex.cpp"
#define INITIAL 0
@@ -915,7 +923,7 @@ YY_DECL
#line 69 "engines/director/lingo/lingo-lex.l"
-#line 919 "engines/director/lingo/lingo-lex.cpp"
+#line 927 "engines/director/lingo/lingo-lex.cpp"
if ( !(yy_init) )
{
@@ -969,13 +977,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 >= 236 )
+ if ( yy_current_state >= 241 )
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] != 569 );
+ while ( yy_base[yy_current_state] != 598 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
@@ -1079,156 +1087,166 @@ YY_RULE_SETUP
case 16:
YY_RULE_SETUP
#line 88 "engines/director/lingo/lingo-lex.l"
-{ count(); return tEND; }
+{
+ count();
+
+ const char *ptr = &yytext[4]; // Skip 'end '
+ while (*ptr == ' ' || *ptr == '\t')
+ ptr++;
+
+ yylval.s = new Common::String(ptr);
+
+ return ENDCLAUSE;
+ }
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 89 "engines/director/lingo/lingo-lex.l"
+#line 99 "engines/director/lingo/lingo-lex.l"
{ count(); return tFACTORY; }
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 90 "engines/director/lingo/lingo-lex.l"
+#line 100 "engines/director/lingo/lingo-lex.l"
{ count(); return tEXIT; }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 91 "engines/director/lingo/lingo-lex.l"
+#line 101 "engines/director/lingo/lingo-lex.l"
{ count(); return tFRAME; }
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 92 "engines/director/lingo/lingo-lex.l"
+#line 102 "engines/director/lingo/lingo-lex.l"
{ count(); return tGLOBAL; }
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 93 "engines/director/lingo/lingo-lex.l"
+#line 103 "engines/director/lingo/lingo-lex.l"
{ count(); return tGO; }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 94 "engines/director/lingo/lingo-lex.l"
+#line 104 "engines/director/lingo/lingo-lex.l"
{ count(); return tGO; }
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 95 "engines/director/lingo/lingo-lex.l"
+#line 105 "engines/director/lingo/lingo-lex.l"
{ count(); return tINSTANCE; }
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 96 "engines/director/lingo/lingo-lex.l"
+#line 106 "engines/director/lingo/lingo-lex.l"
{ count(); return tINTERSECTS; }
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 97 "engines/director/lingo/lingo-lex.l"
+#line 107 "engines/director/lingo/lingo-lex.l"
{ count(); return tINTO; }
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 98 "engines/director/lingo/lingo-lex.l"
+#line 108 "engines/director/lingo/lingo-lex.l"
{ count(); return tITEM; }
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 99 "engines/director/lingo/lingo-lex.l"
+#line 109 "engines/director/lingo/lingo-lex.l"
{ count(); return tLINE; }
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 100 "engines/director/lingo/lingo-lex.l"
+#line 110 "engines/director/lingo/lingo-lex.l"
{ count(); return tLOOP; }
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 101 "engines/director/lingo/lingo-lex.l"
+#line 111 "engines/director/lingo/lingo-lex.l"
{ count(); return tMACRO; }
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 102 "engines/director/lingo/lingo-lex.l"
+#line 112 "engines/director/lingo/lingo-lex.l"
{ count(); return tMETHOD; }
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 103 "engines/director/lingo/lingo-lex.l"
+#line 113 "engines/director/lingo/lingo-lex.l"
{ count(); return tMOD; }
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 104 "engines/director/lingo/lingo-lex.l"
+#line 114 "engines/director/lingo/lingo-lex.l"
{ count(); return tMOVIE; }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 105 "engines/director/lingo/lingo-lex.l"
+#line 115 "engines/director/lingo/lingo-lex.l"
{ count(); return tNEXT; }
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 106 "engines/director/lingo/lingo-lex.l"
+#line 116 "engines/director/lingo/lingo-lex.l"
{ count(); return tNOT; }
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 107 "engines/director/lingo/lingo-lex.l"
+#line 117 "engines/director/lingo/lingo-lex.l"
{ count(); return tOF; }
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 108 "engines/director/lingo/lingo-lex.l"
+#line 118 "engines/director/lingo/lingo-lex.l"
{ count(); return tON; } // D3
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 109 "engines/director/lingo/lingo-lex.l"
+#line 119 "engines/director/lingo/lingo-lex.l"
{ count(); return tOPEN; }
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 110 "engines/director/lingo/lingo-lex.l"
+#line 120 "engines/director/lingo/lingo-lex.l"
{ count(); return tOR; }
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 111 "engines/director/lingo/lingo-lex.l"
+#line 121 "engines/director/lingo/lingo-lex.l"
{ count(); return tPLAY; }
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 112 "engines/director/lingo/lingo-lex.l"
+#line 122 "engines/director/lingo/lingo-lex.l"
{ count(); return tPREVIOUS; }
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 113 "engines/director/lingo/lingo-lex.l"
+#line 123 "engines/director/lingo/lingo-lex.l"
{ count(); return tPUT; }
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 114 "engines/director/lingo/lingo-lex.l"
+#line 124 "engines/director/lingo/lingo-lex.l"
{ count(); return tREPEAT; }
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 115 "engines/director/lingo/lingo-lex.l"
+#line 125 "engines/director/lingo/lingo-lex.l"
{ count(); return tSET; }
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 116 "engines/director/lingo/lingo-lex.l"
+#line 126 "engines/director/lingo/lingo-lex.l"
{ count(); return tSOUND; } // D3
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 117 "engines/director/lingo/lingo-lex.l"
+#line 127 "engines/director/lingo/lingo-lex.l"
{ count(); return tSTARTS; }
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 118 "engines/director/lingo/lingo-lex.l"
+#line 128 "engines/director/lingo/lingo-lex.l"
{
count();
@@ -1240,7 +1258,7 @@ YY_RULE_SETUP
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 126 "engines/director/lingo/lingo-lex.l"
+#line 136 "engines/director/lingo/lingo-lex.l"
{
count();
@@ -1284,7 +1302,7 @@ YY_RULE_SETUP
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 166 "engines/director/lingo/lingo-lex.l"
+#line 176 "engines/director/lingo/lingo-lex.l"
{
count();
@@ -1307,67 +1325,67 @@ YY_RULE_SETUP
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 185 "engines/director/lingo/lingo-lex.l"
+#line 195 "engines/director/lingo/lingo-lex.l"
{ count(); return tTHEN; }
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 186 "engines/director/lingo/lingo-lex.l"
+#line 196 "engines/director/lingo/lingo-lex.l"
{ count(); return tTO; }
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 187 "engines/director/lingo/lingo-lex.l"
+#line 197 "engines/director/lingo/lingo-lex.l"
{ count(); return tSPRITE; }
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 188 "engines/director/lingo/lingo-lex.l"
+#line 198 "engines/director/lingo/lingo-lex.l"
{ count(); return tWITH; }
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 189 "engines/director/lingo/lingo-lex.l"
+#line 199 "engines/director/lingo/lingo-lex.l"
{ count(); return tWITHIN; }
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 190 "engines/director/lingo/lingo-lex.l"
+#line 200 "engines/director/lingo/lingo-lex.l"
{ count(); return tWHEN; }
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 191 "engines/director/lingo/lingo-lex.l"
+#line 201 "engines/director/lingo/lingo-lex.l"
{ count(); return tWHILE; }
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 192 "engines/director/lingo/lingo-lex.l"
+#line 202 "engines/director/lingo/lingo-lex.l"
{ count(); return tWORD; }
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 194 "engines/director/lingo/lingo-lex.l"
+#line 204 "engines/director/lingo/lingo-lex.l"
{ count(); return tNEQ; }
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 195 "engines/director/lingo/lingo-lex.l"
+#line 205 "engines/director/lingo/lingo-lex.l"
{ count(); return tGE; }
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 196 "engines/director/lingo/lingo-lex.l"
+#line 206 "engines/director/lingo/lingo-lex.l"
{ count(); return tLE; }
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 197 "engines/director/lingo/lingo-lex.l"
+#line 207 "engines/director/lingo/lingo-lex.l"
{ count(); return tCONCAT; }
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 199 "engines/director/lingo/lingo-lex.l"
+#line 209 "engines/director/lingo/lingo-lex.l"
{
count();
yylval.s = new Common::String(yytext);
@@ -1400,41 +1418,41 @@ YY_RULE_SETUP
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 228 "engines/director/lingo/lingo-lex.l"
+#line 238 "engines/director/lingo/lingo-lex.l"
{ count(); yylval.f = atof(yytext); return FLOAT; }
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 229 "engines/director/lingo/lingo-lex.l"
+#line 239 "engines/director/lingo/lingo-lex.l"
{ count(); yylval.i = strtol(yytext, NULL, 10); return INT; }
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 230 "engines/director/lingo/lingo-lex.l"
+#line 240 "engines/director/lingo/lingo-lex.l"
{ count(); return *yytext; }
YY_BREAK
case 65:
/* rule 65 can match eol */
YY_RULE_SETUP
-#line 231 "engines/director/lingo/lingo-lex.l"
+#line 241 "engines/director/lingo/lingo-lex.l"
{ return '\n'; }
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 232 "engines/director/lingo/lingo-lex.l"
+#line 242 "engines/director/lingo/lingo-lex.l"
{ count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return STRING; }
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 233 "engines/director/lingo/lingo-lex.l"
+#line 243 "engines/director/lingo/lingo-lex.l"
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 235 "engines/director/lingo/lingo-lex.l"
+#line 245 "engines/director/lingo/lingo-lex.l"
ECHO;
YY_BREAK
-#line 1438 "engines/director/lingo/lingo-lex.cpp"
+#line 1456 "engines/director/lingo/lingo-lex.cpp"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -1727,7 +1745,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 >= 236 )
+ if ( yy_current_state >= 241 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1755,11 +1773,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 >= 236 )
+ if ( yy_current_state >= 241 )
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 == 235);
+ yy_is_jam = (yy_current_state == 240);
return yy_is_jam ? 0 : yy_current_state;
}
@@ -2434,7 +2452,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 235 "engines/director/lingo/lingo-lex.l"
+#line 245 "engines/director/lingo/lingo-lex.l"
diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l
index f6be12d7e3..43c9bc392c 100644
--- a/engines/director/lingo/lingo-lex.l
+++ b/engines/director/lingo/lingo-lex.l
@@ -85,7 +85,17 @@ whitespace [\t ]
(?i:[\n\r]+[\t ]*else[\t ]+if) { countnl(); return tNLELSIF; }
(?i:[\n\r]+[\t ]*else) { countnl(); return tNLELSE; }
(?i:else) { count(); return tELSE; }
-(?i:end) { count(); return tEND; }
+(?i:end)([\t ]*{identifier})? {
+ count();
+
+ const char *ptr = &yytext[4]; // Skip 'end '
+ while (*ptr == ' ' || *ptr == '\t')
+ ptr++;
+
+ yylval.s = new Common::String(ptr);
+
+ return ENDCLAUSE;
+ }
(?i:factory) { count(); return tFACTORY; }
(?i:exit) { count(); return tEXIT; }
(?i:frame) { count(); return tFRAME; }
diff --git a/engines/director/lingo/tests/events.lingo b/engines/director/lingo/tests/events.lingo
index 5a6d6c7d98..a04a12da07 100644
--- a/engines/director/lingo/tests/events.lingo
+++ b/engines/director/lingo/tests/events.lingo
@@ -4,7 +4,7 @@ end exitFrame
on enterFrame me
beep
-end enterFrame
+end
on annoy howMuch
beep random(howMuch)