diff options
author | Eugene Sandulenko | 2017-01-07 17:08:48 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2017-01-07 17:08:48 +0100 |
commit | 993418674e849262e56b3d1fb95c2aa2815380ae (patch) | |
tree | 6031d5f80b847747f5f58e307c6a6b568f9bdc7a /engines/director | |
parent | 22929379e5a3184f0cbcc8d5ac18b9175d31267c (diff) | |
download | scummvm-rg350-993418674e849262e56b3d1fb95c2aa2815380ae.tar.gz scummvm-rg350-993418674e849262e56b3d1fb95c2aa2815380ae.tar.bz2 scummvm-rg350-993418674e849262e56b3d1fb95c2aa2815380ae.zip |
DIRECTOR: Lingo: Fix 'on' keyword parsing
It requires handler name after 'end' keyword
Diffstat (limited to 'engines/director')
-rw-r--r-- | engines/director/lingo/lingo-gr.cpp | 657 | ||||
-rw-r--r-- | engines/director/lingo/lingo-gr.y | 17 | ||||
-rw-r--r-- | engines/director/lingo/tests/events.lingo | 9 |
3 files changed, 325 insertions, 358 deletions
diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp index 260c92a198..8a20ac7e47 100644 --- a/engines/director/lingo/lingo-gr.cpp +++ b/engines/director/lingo/lingo-gr.cpp @@ -496,16 +496,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 94 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 1098 +#define YYLAST 974 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 87 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 39 +#define YYNNTS 38 /* YYNRULES -- Number of rules. */ -#define YYNRULES 134 +#define YYNRULES 132 /* YYNRULES -- Number of states. */ -#define YYNSTATES 282 +#define YYNSTATES 279 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 @@ -569,15 +569,15 @@ static const yytype_uint16 yyprhs[] = 353, 355, 358, 361, 364, 367, 369, 372, 377, 380, 382, 386, 388, 392, 395, 398, 401, 404, 408, 411, 414, 416, 420, 423, 426, 429, 433, 436, 437, 446, - 449, 450, 459, 460, 468, 469, 478, 479, 481, 485, - 490, 491, 495, 496, 498 + 449, 450, 459, 460, 471, 472, 474, 478, 483, 484, + 488, 489, 491 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { 88, 0, -1, 88, 89, 90, -1, 90, -1, 1, - 89, -1, 81, -1, -1, 117, -1, 110, -1, 124, + 89, -1, 81, -1, -1, 117, -1, 110, -1, 123, -1, 91, -1, 93, -1, 40, 109, 33, 21, -1, 42, 21, 74, 109, -1, 42, 13, 74, 109, -1, 42, 14, 109, 74, 109, -1, 42, 21, 44, 109, @@ -600,7 +600,7 @@ static const yytype_int8 yyrhs[] = 41, 47, -1, 41, 46, 21, -1, 32, -1, 26, -1, -1, -1, -1, 107, 89, -1, 107, 93, -1, 45, 21, 43, -1, 12, -1, 15, -1, 22, -1, - 17, -1, 21, 82, 125, 83, -1, 21, -1, 13, + 17, -1, 21, 82, 124, 83, -1, 21, -1, 13, -1, 14, 109, -1, 91, -1, 109, 76, 109, -1, 109, 77, 109, -1, 109, 78, 109, -1, 109, 79, 109, -1, 109, 65, 109, -1, 109, 84, 109, -1, @@ -613,20 +613,19 @@ static const yytype_int8 yyrhs[] = 71, 109, -1, 40, 109, -1, 113, -1, 116, -1, 28, 41, -1, 28, -1, 30, 111, -1, 55, 112, -1, 19, 109, -1, 18, 109, -1, 18, -1, 20, - 125, -1, 51, 109, 46, 109, -1, 51, 109, -1, + 124, -1, 51, 109, 46, 109, -1, 51, 109, -1, 21, -1, 111, 86, 21, -1, 21, -1, 112, 86, 21, -1, 31, 34, -1, 31, 37, -1, 31, 39, -1, 31, 114, -1, 31, 114, 115, -1, 31, 115, -1, 29, 109, -1, 109, -1, 38, 36, 109, -1, 36, 109, -1, 52, 53, -1, 52, 114, -1, 52, 114, 115, -1, 52, 115, -1, -1, 35, 21, 118, - 105, 122, 89, 123, 107, -1, 49, 21, -1, -1, - 50, 21, 119, 105, 122, 89, 123, 107, -1, -1, - 72, 21, 120, 105, 89, 107, 27, -1, -1, 72, - 21, 121, 105, 73, 89, 107, 27, -1, -1, 21, - -1, 122, 86, 21, -1, 122, 89, 86, 21, -1, - -1, 21, 105, 125, -1, -1, 109, -1, 125, 86, - 109, -1 + 105, 121, 89, 122, 107, -1, 49, 21, -1, -1, + 50, 21, 119, 105, 121, 89, 122, 107, -1, -1, + 72, 21, 120, 105, 121, 89, 122, 107, 27, 21, + -1, -1, 21, -1, 121, 86, 21, -1, 121, 89, + 86, 21, -1, -1, 21, 105, 124, -1, -1, 109, + -1, 124, 86, 109, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ @@ -644,8 +643,8 @@ static const yytype_uint16 yyrline[] = 415, 417, 418, 419, 422, 425, 428, 429, 430, 433, 434, 437, 438, 449, 450, 451, 452, 455, 458, 463, 464, 467, 468, 471, 472, 475, 478, 508, 508, 514, - 517, 517, 522, 522, 528, 528, 535, 536, 537, 538, - 540, 544, 552, 553, 554 + 517, 517, 522, 522, 534, 535, 536, 537, 539, 543, + 551, 552, 553 }; #endif @@ -671,8 +670,8 @@ static const char *const yytname[] = "elseifstmtoneliner1", "elseifstmt1", "cond", "repeatwhile", "repeatwith", "if", "elseif", "begin", "end", "stmtlist", "when", "expr", "func", "globallist", "instancelist", "gotofunc", "gotoframe", - "gotomovie", "playfunc", "defn", "@1", "@2", "@3", "@4", "argdef", - "argstore", "macro", "arglist", 0 + "gotomovie", "playfunc", "defn", "@1", "@2", "@3", "argdef", "argstore", + "macro", "arglist", 0 }; #endif @@ -708,8 +707,8 @@ static const yytype_uint8 yyr1[] = 110, 110, 110, 110, 110, 110, 110, 110, 110, 111, 111, 112, 112, 113, 113, 113, 113, 113, 113, 114, 114, 115, 115, 116, 116, 116, 116, 118, 117, 117, - 119, 117, 120, 117, 121, 117, 122, 122, 122, 122, - 123, 124, 125, 125, 125 + 119, 117, 120, 117, 121, 121, 121, 121, 122, 123, + 124, 124, 124 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -727,8 +726,8 @@ static const yytype_uint8 yyr2[] = 1, 2, 2, 2, 2, 1, 2, 4, 2, 1, 3, 1, 3, 2, 2, 2, 2, 3, 2, 2, 1, 3, 2, 2, 2, 3, 2, 0, 8, 2, - 0, 8, 0, 7, 0, 8, 0, 1, 3, 4, - 0, 3, 0, 1, 3 + 0, 8, 0, 10, 0, 1, 3, 4, 0, 3, + 0, 1, 3 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -736,44 +735,43 @@ static const yytype_uint8 yyr2[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 0, 0, 55, 61, 0, 56, 58, 95, 0, 132, + 0, 0, 55, 61, 0, 56, 58, 95, 0, 130, 49, 57, 90, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 63, 21, 11, 22, 0, 0, 0, 0, 19, 8, 87, 88, 7, 9, 5, 4, - 60, 0, 63, 62, 94, 93, 133, 96, 132, 132, + 60, 0, 63, 62, 94, 93, 131, 96, 130, 130, 89, 99, 91, 0, 103, 0, 104, 0, 105, 110, 106, 108, 117, 86, 0, 45, 0, 0, 0, 0, 119, 120, 98, 113, 114, 116, 101, 92, 76, 0, 122, 81, 82, 0, 1, 6, 0, 0, 0, 0, 42, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 131, 0, 109, 112, 0, 107, 49, 0, 46, + 0, 129, 0, 109, 112, 0, 107, 49, 0, 46, 0, 0, 0, 0, 0, 54, 49, 0, 115, 0, - 0, 0, 49, 49, 83, 2, 0, 50, 0, 0, - 49, 0, 26, 72, 73, 71, 74, 75, 68, 78, - 79, 80, 77, 64, 65, 66, 67, 69, 70, 134, - 59, 100, 111, 126, 12, 17, 14, 0, 0, 16, - 13, 126, 97, 102, 84, 85, 0, 0, 51, 0, - 44, 51, 0, 43, 127, 0, 18, 15, 0, 51, - 0, 50, 0, 0, 50, 50, 20, 0, 130, 130, - 0, 51, 52, 53, 0, 0, 50, 49, 30, 128, - 0, 51, 51, 123, 0, 0, 50, 51, 0, 51, - 0, 48, 49, 50, 38, 0, 129, 118, 121, 125, - 23, 51, 50, 27, 50, 50, 40, 36, 0, 0, - 37, 33, 0, 50, 0, 0, 35, 0, 0, 50, - 49, 50, 49, 0, 0, 0, 0, 49, 31, 0, - 32, 0, 0, 24, 28, 29, 50, 34, 50, 25, - 41, 39 + 0, 0, 49, 83, 2, 0, 50, 0, 0, 49, + 0, 26, 72, 73, 71, 74, 75, 68, 78, 79, + 80, 77, 64, 65, 66, 67, 69, 70, 132, 59, + 100, 111, 124, 12, 17, 14, 0, 0, 16, 13, + 124, 97, 102, 84, 85, 124, 51, 0, 44, 51, + 0, 43, 125, 0, 18, 15, 0, 0, 50, 0, + 0, 50, 50, 20, 0, 128, 128, 128, 52, 53, + 0, 0, 50, 49, 30, 126, 0, 51, 51, 51, + 0, 50, 51, 0, 51, 0, 48, 49, 50, 38, + 0, 127, 118, 121, 0, 23, 51, 50, 27, 50, + 50, 40, 36, 0, 0, 37, 33, 0, 0, 50, + 0, 0, 35, 0, 0, 50, 49, 50, 49, 123, + 0, 0, 0, 0, 49, 31, 0, 32, 0, 0, + 24, 28, 29, 50, 34, 50, 25, 41, 39 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 32, 212, 33, 52, 35, 213, 37, 261, 245, - 246, 234, 247, 99, 38, 39, 40, 235, 271, 152, - 201, 41, 42, 206, 62, 87, 44, 70, 71, 45, - 46, 127, 136, 142, 143, 195, 221, 47, 57 + -1, 32, 208, 33, 52, 35, 209, 37, 257, 240, + 241, 229, 242, 99, 38, 39, 40, 230, 268, 151, + 198, 41, 42, 203, 62, 87, 44, 70, 71, 45, + 46, 127, 136, 142, 193, 217, 47, 57 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing @@ -781,277 +779,252 @@ static const yytype_int16 yydefgoto[] = #define YYPACT_NINF -214 static const yytype_int16 yypact[] = { - 272, -55, -214, -214, 825, -214, -214, 825, 825, 825, - 1013, -214, 1, 25, 749, -214, 32, 825, 29, 37, - 35, 41, 44, 825, 781, 51, 825, 825, 56, 825, - 825, 825, 3, -214, 4, -214, -214, -214, 7, 12, - 839, 825, 988, -214, -214, -214, -214, -214, -214, -214, - 8, 825, -214, 988, 988, 988, 988, 6, 825, 825, - -214, -214, 10, 825, -214, 825, -214, 57, -214, 988, - -14, -214, -214, 45, 66, -214, -36, 825, -35, 61, - -214, -214, 863, -214, -14, -214, -214, 23, -50, 888, - 21, -50, -50, 938, -214, 359, 839, 825, 839, 71, - 963, 988, 825, 825, 825, 825, 825, 825, 825, 825, - 825, 825, 825, 825, 825, 825, 825, 825, 45, 825, - -31, 6, 94, 988, 988, 825, -214, -214, 95, -214, - 825, 825, 673, 825, 825, -214, -214, 825, -214, 98, - 825, 825, -214, -214, -214, -214, 42, 988, 43, 913, - -55, 825, -214, -48, -48, -48, -50, -50, -50, 988, - -48, -48, 150, 174, 174, -50, -50, 988, 988, 988, - -214, -214, 988, 107, -214, 988, 988, 825, 825, 988, - 988, 107, 988, -214, 988, 988, -55, 58, -214, -3, - -214, -214, 691, 988, -214, -7, 988, 988, -7, -214, - -55, 567, 88, 825, 567, -214, -214, 118, 54, 54, - 425, -214, -214, -214, 131, 825, 988, -8, -16, -214, - 139, -214, -214, -214, 496, 122, 988, -214, 132, -214, - 140, -214, -214, 140, -214, 839, -214, 567, 567, -214, - -214, -214, 567, -214, 567, 140, 140, -214, 839, 691, - -214, 119, 125, 567, 142, 145, -214, 149, 135, -214, - -214, -214, -214, 152, 141, 151, 153, -20, -214, 691, - -214, 638, 143, -214, -214, -214, 567, -214, -214, -214, - -214, -214 + 244, -65, -214, -214, 9, -214, -214, 9, 9, 9, + 889, -214, -23, 12, 634, -214, 18, 9, 28, 31, + 20, 29, 36, 9, 666, 40, 9, 9, 46, 9, + 9, 9, 2, -214, 3, -214, -214, -214, -5, 7, + 710, 9, 864, -214, -214, -214, -214, -214, -214, -214, + 11, 9, -214, 864, 864, 864, 864, 19, 9, 9, + -214, -214, 33, 9, -214, 9, -214, 60, -214, 864, + 65, -214, -214, 705, 94, -214, -37, 9, -36, 74, + -214, -214, 739, -214, 65, -214, -214, 42, -30, 764, + -214, -30, -30, 814, -214, 315, 710, 9, 710, 82, + 839, 864, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 705, 9, + 26, 19, 117, 864, 864, 9, -214, -214, 118, -214, + 9, 9, 558, 9, 9, -214, -214, 9, -214, 136, + 9, 9, -214, -214, -214, 77, 864, 79, 789, -65, + 9, -214, 45, 45, 45, -30, -30, -30, 864, 45, + 45, 147, 225, 225, -30, -30, 864, 864, 864, -214, + -214, 864, 142, -214, 864, 864, 9, 9, 864, 864, + 142, 864, -214, 864, 864, 142, -214, -10, -214, -214, + 576, 864, -214, -61, 864, 864, -61, -61, 452, 121, + 9, 452, -214, -214, 145, 81, 81, 81, -214, -214, + 141, 9, 864, -8, -13, -214, 150, -214, -214, -214, + 134, 864, -214, 151, -214, 158, -214, -214, 158, -214, + 710, -214, 452, 452, 381, -214, -214, 452, -214, 452, + 158, 158, -214, 710, 576, -214, 129, 143, 164, 452, + 160, 161, -214, 163, 148, -214, -214, -214, -214, -214, + 166, 153, 165, 167, -17, -214, 576, -214, 523, 154, + -214, -214, -214, 452, -214, -214, -214, -214, -214 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -214, -214, 11, 91, 2, -181, 0, -214, -214, -214, - -30, -213, -58, -73, -214, -214, -214, -185, -9, -12, - 129, -214, 40, 5, -214, -214, -214, 166, -11, -214, - -214, -214, -214, -214, -214, 13, -13, -214, 24 + -214, -214, 10, 101, 4, -184, 0, -214, -214, -214, + -16, -213, -40, -69, -214, -214, -214, -208, -9, -20, + -130, -214, 39, 5, -214, -214, -214, 178, -12, -214, + -214, -214, -214, -214, -109, -93, -214, 73 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If zero, do what YYDEFACT says. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -125 +#define YYTABLE_NINF -61 static const yytype_int16 yytable[] = { - 36, 59, 34, 94, -10, 43, -51, -51, 130, 133, - 231, 205, 49, 85, 105, 106, 108, 107, 108, 228, - 250, 202, 65, 146, 67, 148, 48, 111, 112, 113, - 114, 115, 232, 250, 116, 117, 116, 117, 131, 134, - 229, 203, 60, 95, 53, 248, 61, 54, 55, 56, - 76, 77, 170, 72, 69, 119, 79, 73, 78, 126, - 248, -51, 80, 82, 69, 81, 88, 89, 259, 91, - 92, 93, 86, 138, 48, 74, 75, 90, 128, 207, - 100, 101, 120, 121, 48, -10, 97, 129, 277, 96, - 58, 118, 119, 125, -124, 36, 122, 34, 56, 56, - 43, 102, 103, 123, 135, 124, 104, 105, 106, 139, - 107, 108, 109, 110, 150, 171, 174, 132, 173, 183, - 111, 112, 113, 114, 115, 188, 190, 181, 194, 116, - 117, 200, 215, 186, 187, 189, 100, 147, 149, 219, - 220, 192, 153, 154, 155, 156, 157, 158, 159, 160, - 161, 162, 163, 164, 165, 166, 167, 168, 225, 169, - 236, 191, 252, 240, 243, 172, 231, 260, 262, 264, - 175, 176, 265, 179, 180, 258, 266, 182, 267, 272, - 184, 185, 273, 274, 279, 275, 145, 256, 233, 214, - 84, 193, 217, 218, 198, 0, 222, 199, 0, 0, - 0, 0, 0, 0, 227, 0, 208, 0, 230, 209, - 0, 211, 105, 106, 241, 107, 108, 196, 197, 0, - 0, 251, 0, 249, 0, 0, 112, 113, 114, 115, - 254, 0, 255, 257, 116, 117, 105, 106, 0, 107, - 108, 263, 0, 216, 0, 0, 0, 268, 0, 270, - 0, 269, 114, 115, 0, 226, 0, 0, 116, 117, - 0, 0, 0, 0, 280, 0, 281, 0, 0, 0, - 0, 278, -6, 1, 0, 100, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 3, 4, 5, 100, 6, - 7, 8, 9, 10, 11, 0, 0, 0, 0, 0, - 12, 0, 13, 14, 15, 0, 0, 16, 0, 0, + 36, 59, 94, -10, 34, 43, 202, 130, 133, -51, + -51, 49, 85, 226, 199, 245, 48, 243, 60, 223, + 48, 2, 3, 4, 5, 204, 6, 145, 245, 147, + 50, 11, 243, 61, 200, 227, 108, 131, 134, 72, + 224, 79, 95, 53, 76, 77, 54, 55, 56, 51, + 80, 19, 78, 69, 116, 117, 73, 81, 126, 201, + 255, 86, 82, 69, -51, 88, 89, 90, 91, 92, + 93, 196, 138, 26, 74, 75, 197, 96, 27, 100, + 101, 97, 274, 48, -10, 29, 30, 232, 233, 234, + 118, 31, 237, 58, 239, 36, 125, 56, 56, 34, + 43, 65, 123, 67, 124, 119, 249, 105, 106, 169, + 107, 108, 119, 218, 219, 129, 132, 135, 172, 122, + 111, 112, 113, 114, 115, 149, 187, 180, 139, 116, + 117, 120, 121, 185, 273, 100, 146, 148, 170, 173, + 190, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 163, 164, 165, 166, 167, 182, 168, 189, + 186, 247, 188, 192, 171, 211, 215, 216, 220, 174, + 175, 231, 178, 179, 254, 235, 181, 256, 210, 183, + 184, 213, 214, 238, 226, 259, 258, 261, 262, 191, + 263, 264, 222, 269, 270, 276, 144, 271, 228, 272, + 252, 236, 84, 205, 225, 0, 206, 207, 246, 105, + 106, 0, 107, 108, 0, 194, 195, 250, 244, 251, + 253, 0, 0, 112, 113, 114, 115, 0, 0, 260, + 0, 116, 117, 0, 0, 265, 0, 267, 0, 212, + 0, 0, 0, 0, -6, 1, 0, 266, 0, 0, + 221, 0, 0, 277, 0, 278, 2, 3, 4, 5, + 0, 6, 7, 8, 9, 10, 11, 0, 275, 100, + 0, 0, 12, 0, 13, 14, 15, 0, 0, 16, + 0, 0, 100, 0, 17, 18, 19, 105, 106, 20, + 107, 108, 0, 21, 22, 23, 24, 0, 0, 25, + 0, 0, 0, 114, 115, 0, 0, 0, 26, 116, + 117, 0, 0, 27, 0, 0, 28, 0, 0, 0, + 29, 30, 0, 0, 0, -6, 31, 2, 3, 4, + 5, 0, 6, 7, 8, 9, 10, 11, 0, 0, + 0, 0, 0, 12, 0, 13, 14, 15, 0, 0, + 16, 0, 0, 0, 0, 17, 18, 19, 0, 0, + 20, 0, 0, 0, 21, 22, 23, 24, 0, 0, + 25, 0, 0, 0, 0, 0, 0, 0, 0, 26, + 0, 0, 0, 0, 27, 0, 0, 28, 0, 0, + 0, 29, 30, 2, 3, 4, 5, 31, 6, 7, + 8, 9, 50, 11, 0, 0, 0, 0, 248, 12, + 0, 13, 14, 15, 0, 0, 0, 0, 0, 0, + 0, 17, 18, 19, 0, 0, 20, 0, 0, 0, + 0, 0, 23, 24, 0, 0, 25, 0, 0, 0, + 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, + 27, 0, 0, 0, 0, 0, 0, 29, 30, 0, + 0, 0, 48, 31, 2, 3, 4, 5, 0, 6, + 7, 8, 9, 50, 11, 0, 0, 0, 0, 0, + 12, 0, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 17, 18, 19, 0, 0, 20, 0, 0, - 204, 21, 22, 23, 24, 0, 0, 25, 210, 0, + 0, 0, 0, 23, 24, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, - 224, 27, 0, 0, 28, 0, 0, 0, 29, 30, - 237, 238, 0, -6, 31, 0, 242, 0, 244, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 253, 2, 3, 4, 5, 0, 6, 7, 8, 9, - 10, 11, 0, 0, 0, 0, 0, 12, 0, 13, - 14, 15, 0, 0, 16, 0, 276, 0, 0, 17, - 18, 19, 0, 0, 20, 0, 0, 0, 21, 22, - 23, 24, 0, 0, 25, 0, 0, 0, 0, 0, - 0, 0, 0, 26, 0, 0, 0, 0, 27, 0, - 0, 28, 0, 0, 0, 29, 30, 2, 3, 4, - 5, 31, 6, 7, 8, 9, 50, 11, 0, 0, - 0, 0, 223, 12, 0, 13, 14, 15, 0, 0, - 0, 0, 0, 0, 0, 17, 18, 19, 0, 0, - 20, 0, 0, 0, 0, 0, 23, 24, 0, 0, - 25, 0, 0, 0, 0, 0, 0, 0, 0, 26, - 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, - 0, 29, 30, 0, 0, 0, 48, 31, 2, 3, - 4, 5, 0, 6, 7, 8, 9, 50, 11, 0, - 0, 0, 0, 239, 12, 0, 13, 14, 15, 0, - 0, 0, 0, 0, 0, 0, 17, 18, 19, 0, - 0, 20, 0, 0, 0, 0, 0, 23, 24, 0, - 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, - 26, 0, 0, 0, 0, 27, 0, 0, 0, 0, - 0, 0, 29, 30, 0, 0, 0, 48, 31, 2, - 3, 4, 5, 0, 6, 7, 8, 9, 50, 11, - 0, 0, 0, 0, 0, 12, 0, 13, 14, 15, - 0, 0, 0, 0, 0, 0, 0, 17, 18, 19, - 0, 0, 20, 0, 0, 0, 0, 0, 23, 24, - 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, - 0, 26, 0, 0, 0, 0, 27, 0, 0, 0, - 0, 0, 0, 29, 30, 0, 0, 0, 48, 31, - 2, 3, 4, 5, 0, 6, 7, 8, 9, 50, - 11, 0, 0, 0, 0, 0, 12, 0, 13, 14, - 15, 0, 0, 0, 0, 0, 0, 0, 17, 18, - 19, 0, 0, 20, 0, 0, 0, 0, 0, 23, - 24, 0, 0, 25, 0, 0, 0, 0, 0, 0, - 0, 0, 26, 2, 3, 4, 5, 27, 6, 7, - 8, 9, 50, 11, 29, 30, 0, 177, 0, 12, - 31, 13, 14, 0, 0, 0, 0, 0, 0, 102, - 103, 17, 0, 19, 104, 105, 106, 0, 107, 108, - 109, 110, 23, 24, 0, 0, 25, 178, 111, 112, - 113, 114, 115, 0, 0, 26, 0, 116, 117, 0, - 27, 2, 3, 4, 5, 0, 6, 29, 30, 0, - 50, 11, 0, 31, 0, 0, 0, 0, 63, 0, - 0, 0, 0, 64, 0, 65, 66, 67, 68, 51, - 0, 19, 0, 2, 3, 4, 5, 0, 6, 0, - 0, 0, 50, 11, 0, 0, 0, 0, 0, 0, - 63, 0, 0, 26, 0, 0, 0, 65, 27, 67, - 0, 51, 0, 19, 0, 29, 30, 0, 0, 0, - 0, 31, 0, 0, 83, 0, 0, 2, 3, 4, - 5, 0, 6, 0, 0, 26, 50, 11, 0, 0, - 27, 2, 3, 4, 5, 0, 6, 29, 30, 0, - 50, 11, 0, 31, 0, 51, 0, 19, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, - 0, 19, 0, 0, 0, 0, 0, 0, 0, 26, - 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, - 0, 29, 30, 26, 0, 0, 0, 31, 27, 137, - 0, 0, 0, 0, 0, 29, 30, 0, 0, 102, - 103, 98, 0, 0, 104, 105, 106, 0, 107, 108, - 109, 110, 0, 0, 0, 0, 0, 0, 111, 112, - 113, 114, 115, 0, 102, 103, 0, 116, 117, 104, - 105, 106, 0, 107, 108, 109, 110, 0, 140, 141, - 0, 0, 0, 111, 112, 113, 114, 115, 0, 102, - 103, 0, 116, 117, 104, 105, 106, 0, 107, 108, - 109, 110, 0, 0, 0, 0, 0, 151, 111, 112, - 113, 114, 115, 0, 102, 103, 144, 116, 117, 104, - 105, 106, 0, 107, 108, 109, 110, 0, 0, 0, - 0, 0, 0, 111, 112, 113, 114, 115, 0, 102, - 103, 144, 116, 117, 104, 105, 106, 0, 107, 108, - 109, 110, 0, 0, 0, 0, 0, 151, 111, 112, - 113, 114, 115, 0, 102, 103, 0, 116, 117, 104, - 105, 106, 0, 107, 108, 109, 110, 0, 0, 0, - 0, 0, 0, 111, 112, 113, 114, 115, 0, -60, - -60, 0, 116, 117, -60, -60, -60, 0, -60, -60, - -60, -60, 0, 0, 0, 0, 0, 0, -60, 0, - 0, -60, -60, 0, 0, 58, 0, -60, -60 + 0, 27, 0, 0, 0, 0, 0, 0, 29, 30, + 0, 0, 0, 48, 31, 2, 3, 4, 5, 0, + 6, 7, 8, 9, 50, 11, 0, 0, 0, 0, + 0, 12, 0, 13, 14, 15, 0, 0, 0, 0, + 0, 0, 0, 17, 18, 19, 0, 0, 20, 0, + 0, 0, 0, 0, 23, 24, 0, 0, 25, 0, + 0, 0, 0, 0, 0, 0, 0, 26, 2, 3, + 4, 5, 27, 6, 7, 8, 9, 50, 11, 29, + 30, 0, 176, 0, 12, 31, 13, 14, 0, 0, + 0, 0, 0, 0, 102, 103, 17, 0, 19, 104, + 105, 106, 0, 107, 108, 109, 110, 23, 24, 0, + 0, 25, 177, 111, 112, 113, 114, 115, 0, 0, + 26, 0, 116, 117, 0, 27, 2, 3, 4, 5, + 0, 6, 29, 30, 0, 50, 11, 0, 31, 0, + 0, 0, 0, 63, 0, 0, 0, 0, 64, 0, + 65, 66, 67, 68, 51, 0, 19, 0, 2, 3, + 4, 5, 0, 6, 0, 0, 0, 50, 11, 0, + 0, 0, 0, 0, 0, 63, 0, 0, 26, 0, + 0, 0, 65, 27, 67, 0, 51, 0, 19, 0, + 29, 30, 0, 0, 0, 0, 31, 0, 0, 83, + 0, 0, 2, 3, 4, 5, 0, 6, 0, 0, + 26, 50, 11, 0, 0, 27, 0, 0, 128, 0, + 0, 0, 29, 30, 0, 0, 0, 0, 31, 0, + 51, 0, 19, 0, 0, 0, 0, 0, 0, 0, + 0, 102, 103, 0, 0, 0, 104, 105, 106, 0, + 107, 108, 109, 110, 26, 0, 0, 0, 0, 27, + 111, 112, 113, 114, 115, 137, 29, 30, 0, 116, + 117, 0, 98, 0, 0, 102, 103, 0, 0, 0, + 104, 105, 106, 0, 107, 108, 109, 110, 0, 0, + 0, 0, 0, 0, 111, 112, 113, 114, 115, 0, + 102, 103, 0, 116, 117, 104, 105, 106, 0, 107, + 108, 109, 110, 0, 140, 141, 0, 0, 0, 111, + 112, 113, 114, 115, 0, 102, 103, 0, 116, 117, + 104, 105, 106, 0, 107, 108, 109, 110, 0, 0, + 0, 0, 0, 150, 111, 112, 113, 114, 115, 0, + 102, 103, 143, 116, 117, 104, 105, 106, 0, 107, + 108, 109, 110, 0, 0, 0, 0, 0, 0, 111, + 112, 113, 114, 115, 0, 102, 103, 143, 116, 117, + 104, 105, 106, 0, 107, 108, 109, 110, 0, 0, + 0, 0, 0, 150, 111, 112, 113, 114, 115, 0, + 102, 103, 0, 116, 117, 104, 105, 106, 0, 107, + 108, 109, 110, 0, 0, 0, 0, 0, 0, 111, + 112, 113, 114, 115, 0, -60, -60, 0, 116, 117, + -60, -60, -60, 0, -60, -60, -60, -60, 0, 0, + 0, 0, 0, 0, -60, 0, 0, -60, -60, 0, + 0, 58, 0, -60, -60 }; static const yytype_int16 yycheck[] = { - 0, 10, 0, 0, 0, 0, 26, 27, 44, 44, - 26, 192, 1, 24, 62, 63, 66, 65, 66, 27, - 233, 24, 36, 96, 38, 98, 81, 75, 76, 77, - 78, 79, 48, 246, 84, 85, 84, 85, 74, 74, - 48, 44, 41, 32, 4, 230, 21, 7, 8, 9, - 13, 14, 83, 21, 14, 86, 21, 17, 21, 70, - 245, 81, 21, 23, 24, 21, 26, 27, 249, 29, - 30, 31, 21, 84, 81, 46, 47, 21, 33, 86, - 40, 41, 58, 59, 81, 81, 74, 21, 269, 82, - 82, 51, 86, 36, 73, 95, 86, 95, 58, 59, - 95, 56, 57, 63, 43, 65, 61, 62, 63, 86, - 65, 66, 67, 68, 43, 21, 21, 77, 127, 21, - 75, 76, 77, 78, 79, 83, 83, 136, 21, 84, - 85, 73, 44, 142, 143, 147, 96, 97, 98, 21, - 86, 150, 102, 103, 104, 105, 106, 107, 108, 109, - 110, 111, 112, 113, 114, 115, 116, 117, 27, 119, - 21, 150, 235, 41, 32, 125, 26, 48, 43, 27, - 130, 131, 27, 133, 134, 248, 27, 137, 43, 27, - 140, 141, 41, 32, 41, 32, 95, 245, 218, 201, - 24, 151, 204, 205, 181, -1, 209, 186, -1, -1, - -1, -1, -1, -1, 216, -1, 195, -1, 217, 198, - -1, 200, 62, 63, 226, 65, 66, 177, 178, -1, - -1, 233, -1, 232, -1, -1, 76, 77, 78, 79, - 242, -1, 244, 245, 84, 85, 62, 63, -1, 65, - 66, 253, -1, 203, -1, -1, -1, 259, -1, 261, - -1, 260, 78, 79, -1, 215, -1, -1, 84, 85, - -1, -1, -1, -1, 276, -1, 278, -1, -1, -1, - -1, 271, 0, 1, -1, 235, -1, -1, -1, -1, - -1, -1, -1, -1, 12, 13, 14, 15, 248, 17, + 0, 10, 0, 0, 0, 0, 190, 44, 44, 26, + 27, 1, 24, 26, 24, 228, 81, 225, 41, 27, + 81, 12, 13, 14, 15, 86, 17, 96, 241, 98, + 21, 22, 240, 21, 44, 48, 66, 74, 74, 21, + 48, 21, 32, 4, 13, 14, 7, 8, 9, 40, + 21, 42, 21, 14, 84, 85, 17, 21, 70, 189, + 244, 21, 23, 24, 81, 26, 27, 21, 29, 30, + 31, 180, 84, 64, 46, 47, 185, 82, 69, 40, + 41, 74, 266, 81, 81, 76, 77, 217, 218, 219, + 51, 82, 222, 82, 224, 95, 36, 58, 59, 95, + 95, 36, 63, 38, 65, 86, 236, 62, 63, 83, + 65, 66, 86, 206, 207, 21, 77, 43, 127, 86, + 75, 76, 77, 78, 79, 43, 146, 136, 86, 84, + 85, 58, 59, 142, 264, 96, 97, 98, 21, 21, + 149, 102, 103, 104, 105, 106, 107, 108, 109, 110, + 111, 112, 113, 114, 115, 116, 117, 21, 119, 149, + 83, 230, 83, 21, 125, 44, 21, 86, 27, 130, + 131, 21, 133, 134, 243, 41, 137, 48, 198, 140, + 141, 201, 202, 32, 26, 21, 43, 27, 27, 150, + 27, 43, 212, 27, 41, 41, 95, 32, 214, 32, + 240, 221, 24, 193, 213, -1, 196, 197, 228, 62, + 63, -1, 65, 66, -1, 176, 177, 237, 227, 239, + 240, -1, -1, 76, 77, 78, 79, -1, -1, 249, + -1, 84, 85, -1, -1, 255, -1, 257, -1, 200, + -1, -1, -1, -1, 0, 1, -1, 256, -1, -1, + 211, -1, -1, 273, -1, 275, 12, 13, 14, 15, + -1, 17, 18, 19, 20, 21, 22, -1, 268, 230, + -1, -1, 28, -1, 30, 31, 32, -1, -1, 35, + -1, -1, 243, -1, 40, 41, 42, 62, 63, 45, + 65, 66, -1, 49, 50, 51, 52, -1, -1, 55, + -1, -1, -1, 78, 79, -1, -1, -1, 64, 84, + 85, -1, -1, 69, -1, -1, 72, -1, -1, -1, + 76, 77, -1, -1, -1, 81, 82, 12, 13, 14, + 15, -1, 17, 18, 19, 20, 21, 22, -1, -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, 69, -1, -1, 72, -1, -1, + -1, 76, 77, 12, 13, 14, 15, 82, 17, 18, + 19, 20, 21, 22, -1, -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, + 69, -1, -1, -1, -1, -1, -1, 76, 77, -1, + -1, -1, 81, 82, 12, 13, 14, 15, -1, 17, 18, 19, 20, 21, 22, -1, -1, -1, -1, -1, - 28, -1, 30, 31, 32, -1, -1, 35, -1, -1, + 28, -1, 30, 31, 32, -1, -1, -1, -1, -1, -1, -1, 40, 41, 42, -1, -1, 45, -1, -1, - 191, 49, 50, 51, 52, -1, -1, 55, 199, -1, + -1, -1, -1, 51, 52, -1, -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, 64, -1, -1, -1, - 211, 69, -1, -1, 72, -1, -1, -1, 76, 77, - 221, 222, -1, 81, 82, -1, 227, -1, 229, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 241, 12, 13, 14, 15, -1, 17, 18, 19, 20, - 21, 22, -1, -1, -1, -1, -1, 28, -1, 30, - 31, 32, -1, -1, 35, -1, 267, -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, 69, -1, - -1, 72, -1, -1, -1, 76, 77, 12, 13, 14, - 15, 82, 17, 18, 19, 20, 21, 22, -1, -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, 69, -1, -1, -1, -1, -1, - -1, 76, 77, -1, -1, -1, 81, 82, 12, 13, - 14, 15, -1, 17, 18, 19, 20, 21, 22, -1, - -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, 69, -1, -1, -1, -1, - -1, -1, 76, 77, -1, -1, -1, 81, 82, 12, - 13, 14, 15, -1, 17, 18, 19, 20, 21, 22, - -1, -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, 69, -1, -1, -1, - -1, -1, -1, 76, 77, -1, -1, -1, 81, 82, - 12, 13, 14, 15, -1, 17, 18, 19, 20, 21, - 22, -1, -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, 12, 13, 14, 15, 69, 17, 18, - 19, 20, 21, 22, 76, 77, -1, 44, -1, 28, - 82, 30, 31, -1, -1, -1, -1, -1, -1, 56, - 57, 40, -1, 42, 61, 62, 63, -1, 65, 66, - 67, 68, 51, 52, -1, -1, 55, 74, 75, 76, - 77, 78, 79, -1, -1, 64, -1, 84, 85, -1, - 69, 12, 13, 14, 15, -1, 17, 76, 77, -1, - 21, 22, -1, 82, -1, -1, -1, -1, 29, -1, - -1, -1, -1, 34, -1, 36, 37, 38, 39, 40, - -1, 42, -1, 12, 13, 14, 15, -1, 17, -1, - -1, -1, 21, 22, -1, -1, -1, -1, -1, -1, - 29, -1, -1, 64, -1, -1, -1, 36, 69, 38, - -1, 40, -1, 42, -1, 76, 77, -1, -1, -1, - -1, 82, -1, -1, 53, -1, -1, 12, 13, 14, - 15, -1, 17, -1, -1, 64, 21, 22, -1, -1, - 69, 12, 13, 14, 15, -1, 17, 76, 77, -1, - 21, 22, -1, 82, -1, 40, -1, 42, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 40, - -1, 42, -1, -1, -1, -1, -1, -1, -1, 64, - -1, -1, -1, -1, 69, -1, -1, -1, -1, -1, - -1, 76, 77, 64, -1, -1, -1, 82, 69, 46, - -1, -1, -1, -1, -1, 76, 77, -1, -1, 56, - 57, 82, -1, -1, 61, 62, 63, -1, 65, 66, - 67, 68, -1, -1, -1, -1, -1, -1, 75, 76, - 77, 78, 79, -1, 56, 57, -1, 84, 85, 61, - 62, 63, -1, 65, 66, 67, 68, -1, 70, 71, - -1, -1, -1, 75, 76, 77, 78, 79, -1, 56, - 57, -1, 84, 85, 61, 62, 63, -1, 65, 66, - 67, 68, -1, -1, -1, -1, -1, 74, 75, 76, - 77, 78, 79, -1, 56, 57, 83, 84, 85, 61, - 62, 63, -1, 65, 66, 67, 68, -1, -1, -1, - -1, -1, -1, 75, 76, 77, 78, 79, -1, 56, - 57, 83, 84, 85, 61, 62, 63, -1, 65, 66, - 67, 68, -1, -1, -1, -1, -1, 74, 75, 76, - 77, 78, 79, -1, 56, 57, -1, 84, 85, 61, - 62, 63, -1, 65, 66, 67, 68, -1, -1, -1, - -1, -1, -1, 75, 76, 77, 78, 79, -1, 56, - 57, -1, 84, 85, 61, 62, 63, -1, 65, 66, - 67, 68, -1, -1, -1, -1, -1, -1, 75, -1, - -1, 78, 79, -1, -1, 82, -1, 84, 85 + -1, 69, -1, -1, -1, -1, -1, -1, 76, 77, + -1, -1, -1, 81, 82, 12, 13, 14, 15, -1, + 17, 18, 19, 20, 21, 22, -1, -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, 12, 13, + 14, 15, 69, 17, 18, 19, 20, 21, 22, 76, + 77, -1, 44, -1, 28, 82, 30, 31, -1, -1, + -1, -1, -1, -1, 56, 57, 40, -1, 42, 61, + 62, 63, -1, 65, 66, 67, 68, 51, 52, -1, + -1, 55, 74, 75, 76, 77, 78, 79, -1, -1, + 64, -1, 84, 85, -1, 69, 12, 13, 14, 15, + -1, 17, 76, 77, -1, 21, 22, -1, 82, -1, + -1, -1, -1, 29, -1, -1, -1, -1, 34, -1, + 36, 37, 38, 39, 40, -1, 42, -1, 12, 13, + 14, 15, -1, 17, -1, -1, -1, 21, 22, -1, + -1, -1, -1, -1, -1, 29, -1, -1, 64, -1, + -1, -1, 36, 69, 38, -1, 40, -1, 42, -1, + 76, 77, -1, -1, -1, -1, 82, -1, -1, 53, + -1, -1, 12, 13, 14, 15, -1, 17, -1, -1, + 64, 21, 22, -1, -1, 69, -1, -1, 33, -1, + -1, -1, 76, 77, -1, -1, -1, -1, 82, -1, + 40, -1, 42, -1, -1, -1, -1, -1, -1, -1, + -1, 56, 57, -1, -1, -1, 61, 62, 63, -1, + 65, 66, 67, 68, 64, -1, -1, -1, -1, 69, + 75, 76, 77, 78, 79, 46, 76, 77, -1, 84, + 85, -1, 82, -1, -1, 56, 57, -1, -1, -1, + 61, 62, 63, -1, 65, 66, 67, 68, -1, -1, + -1, -1, -1, -1, 75, 76, 77, 78, 79, -1, + 56, 57, -1, 84, 85, 61, 62, 63, -1, 65, + 66, 67, 68, -1, 70, 71, -1, -1, -1, 75, + 76, 77, 78, 79, -1, 56, 57, -1, 84, 85, + 61, 62, 63, -1, 65, 66, 67, 68, -1, -1, + -1, -1, -1, 74, 75, 76, 77, 78, 79, -1, + 56, 57, 83, 84, 85, 61, 62, 63, -1, 65, + 66, 67, 68, -1, -1, -1, -1, -1, -1, 75, + 76, 77, 78, 79, -1, 56, 57, 83, 84, 85, + 61, 62, 63, -1, 65, 66, 67, 68, -1, -1, + -1, -1, -1, 74, 75, 76, 77, 78, 79, -1, + 56, 57, -1, 84, 85, 61, 62, 63, -1, 65, + 66, 67, 68, -1, -1, -1, -1, -1, -1, 75, + 76, 77, 78, 79, -1, 56, 57, -1, 84, 85, + 61, 62, 63, -1, 65, 66, 67, 68, -1, -1, + -1, -1, -1, -1, 75, -1, -1, 78, 79, -1, + -1, 82, -1, 84, 85 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -1062,31 +1035,30 @@ static const yytype_uint8 yystos[] = 21, 22, 28, 30, 31, 32, 35, 40, 41, 42, 45, 49, 50, 51, 52, 55, 64, 69, 72, 76, 77, 82, 88, 90, 91, 92, 93, 94, 101, 102, - 103, 108, 109, 110, 113, 116, 117, 124, 81, 89, - 21, 40, 91, 109, 109, 109, 109, 125, 82, 105, + 103, 108, 109, 110, 113, 116, 117, 123, 81, 89, + 21, 40, 91, 109, 109, 109, 109, 124, 82, 105, 41, 21, 111, 29, 34, 36, 37, 38, 39, 109, 114, 115, 21, 109, 46, 47, 13, 14, 21, 21, 21, 21, 109, 53, 114, 115, 21, 112, 109, 109, 21, 109, 109, 109, 0, 89, 82, 74, 82, 100, 109, 109, 56, 57, 61, 62, 63, 65, 66, 67, 68, 75, 76, 77, 78, 79, 84, 85, 109, 86, - 125, 125, 86, 109, 109, 36, 115, 118, 33, 21, + 124, 124, 86, 109, 109, 36, 115, 118, 33, 21, 44, 74, 109, 44, 74, 43, 119, 46, 115, 86, - 70, 71, 120, 121, 83, 90, 100, 109, 100, 109, - 43, 74, 106, 109, 109, 109, 109, 109, 109, 109, - 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, - 83, 21, 109, 105, 21, 109, 109, 44, 74, 109, - 109, 105, 109, 21, 109, 109, 105, 105, 83, 106, - 83, 89, 105, 109, 21, 122, 109, 109, 122, 89, - 73, 107, 24, 44, 107, 92, 110, 86, 89, 89, - 107, 89, 89, 93, 106, 44, 109, 106, 106, 21, - 86, 123, 123, 27, 107, 27, 109, 106, 27, 48, - 105, 26, 48, 97, 98, 104, 21, 107, 107, 27, - 41, 106, 107, 32, 107, 96, 97, 99, 104, 105, - 98, 106, 100, 107, 106, 106, 99, 106, 100, 92, - 48, 95, 43, 106, 27, 27, 27, 43, 106, 105, - 106, 105, 27, 41, 32, 32, 107, 92, 93, 41, - 106, 106 + 70, 71, 120, 83, 90, 100, 109, 100, 109, 43, + 74, 106, 109, 109, 109, 109, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 109, 109, 109, 83, + 21, 109, 105, 21, 109, 109, 44, 74, 109, 109, + 105, 109, 21, 109, 109, 105, 83, 106, 83, 89, + 105, 109, 21, 121, 109, 109, 121, 121, 107, 24, + 44, 107, 92, 110, 86, 89, 89, 89, 89, 93, + 106, 44, 109, 106, 106, 21, 86, 122, 122, 122, + 27, 109, 106, 27, 48, 105, 26, 48, 97, 98, + 104, 21, 107, 107, 107, 41, 106, 107, 32, 107, + 96, 97, 99, 104, 105, 98, 106, 100, 27, 107, + 106, 106, 99, 106, 100, 92, 48, 95, 43, 21, + 106, 27, 27, 27, 43, 106, 105, 106, 105, 27, + 41, 32, 32, 107, 92, 93, 41, 106, 106 }; #define yyerrok (yyerrstatus = 0) @@ -2579,51 +2551,42 @@ yyreduce: { g_lingo->codeConst(0); // Push fake value on stack g_lingo->code1(g_lingo->c_procret); - g_lingo->define(*(yyvsp[(2) - (7)].s), (yyvsp[(4) - (7)].code), 0); - g_lingo->_indef = false; ;} + g_lingo->define(*(yyvsp[(2) - (10)].s), (yyvsp[(4) - (10)].code), (yyvsp[(5) - (10)].narg)); + g_lingo->_indef = false; + + if (*(yyvsp[(2) - (10)].s) != *(yyvsp[(10) - (10)].s)) { + yyerror("on vs end handler mismatch"); + } + ;} break; case 124: -#line 528 "engines/director/lingo/lingo-gr.y" - { g_lingo->_indef = true; g_lingo->_currentFactory.clear(); ;} +#line 534 "engines/director/lingo/lingo-gr.y" + { (yyval.narg) = 0; ;} break; case 125: -#line 529 "engines/director/lingo/lingo-gr.y" - { - g_lingo->codeConst(0); // Push fake value on stack - g_lingo->code1(g_lingo->c_procret); - g_lingo->define(*(yyvsp[(2) - (8)].s), (yyvsp[(4) - (8)].code), 0); - g_lingo->_indef = false; ;} - break; - - case 126: #line 535 "engines/director/lingo/lingo-gr.y" - { (yyval.narg) = 0; ;} - break; - - case 127: -#line 536 "engines/director/lingo/lingo-gr.y" { g_lingo->codeArg((yyvsp[(1) - (1)].s)); (yyval.narg) = 1; ;} break; - case 128: -#line 537 "engines/director/lingo/lingo-gr.y" + case 126: +#line 536 "engines/director/lingo/lingo-gr.y" { g_lingo->codeArg((yyvsp[(3) - (3)].s)); (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;} break; - case 129: -#line 538 "engines/director/lingo/lingo-gr.y" + case 127: +#line 537 "engines/director/lingo/lingo-gr.y" { g_lingo->codeArg((yyvsp[(4) - (4)].s)); (yyval.narg) = (yyvsp[(1) - (4)].narg) + 1; ;} break; - case 130: -#line 540 "engines/director/lingo/lingo-gr.y" + case 128: +#line 539 "engines/director/lingo/lingo-gr.y" { g_lingo->codeArgStore(); ;} break; - case 131: -#line 544 "engines/director/lingo/lingo-gr.y" + case 129: +#line 543 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_call); g_lingo->codeString((yyvsp[(1) - (3)].s)->c_str()); @@ -2632,24 +2595,24 @@ yyreduce: g_lingo->code1(numpar); ;} break; - case 132: -#line 552 "engines/director/lingo/lingo-gr.y" + case 130: +#line 551 "engines/director/lingo/lingo-gr.y" { (yyval.narg) = 0; ;} break; - case 133: -#line 553 "engines/director/lingo/lingo-gr.y" + case 131: +#line 552 "engines/director/lingo/lingo-gr.y" { (yyval.narg) = 1; ;} break; - case 134: -#line 554 "engines/director/lingo/lingo-gr.y" + case 132: +#line 553 "engines/director/lingo/lingo-gr.y" { (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;} break; /* Line 1267 of yacc.c. */ -#line 2653 "engines/director/lingo/lingo-gr.cpp" +#line 2616 "engines/director/lingo/lingo-gr.cpp" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -2863,6 +2826,6 @@ yyreturn: } -#line 557 "engines/director/lingo/lingo-gr.y" +#line 556 "engines/director/lingo/lingo-gr.y" diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y index 8e7a60d40e..5686187b82 100644 --- a/engines/director/lingo/lingo-gr.y +++ b/engines/director/lingo/lingo-gr.y @@ -520,17 +520,16 @@ defn: tMACRO ID { g_lingo->_indef = true; g_lingo->_currentFactory.clear(); } g_lingo->define(*$2, $4, $5 + 1, &g_lingo->_currentFactory); g_lingo->_indef = false; } ; | tON ID { g_lingo->_indef = true; g_lingo->_currentFactory.clear(); } - begin nl stmtlist tEND { + begin argdef nl argstore stmtlist tEND ID { g_lingo->codeConst(0); // Push fake value on stack g_lingo->code1(g_lingo->c_procret); - g_lingo->define(*$2, $4, 0); - g_lingo->_indef = false; } - | tON ID { g_lingo->_indef = true; g_lingo->_currentFactory.clear(); } - begin tME nl stmtlist tEND { - g_lingo->codeConst(0); // Push fake value on stack - g_lingo->code1(g_lingo->c_procret); - g_lingo->define(*$2, $4, 0); - g_lingo->_indef = false; } + g_lingo->define(*$2, $4, $5); + g_lingo->_indef = false; + + if (*$2 != *$10) { + yyerror("on vs end handler mismatch"); + } + } argdef: /* nothing */ { $$ = 0; } | ID { g_lingo->codeArg($1); $$ = 1; } diff --git a/engines/director/lingo/tests/events.lingo b/engines/director/lingo/tests/events.lingo index 53d139a4f8..5a6d6c7d98 100644 --- a/engines/director/lingo/tests/events.lingo +++ b/engines/director/lingo/tests/events.lingo @@ -1,7 +1,12 @@ on exitFrame beep -end +end exitFrame on enterFrame me beep -end +end enterFrame + +on annoy howMuch + beep random(howMuch) + alert "Aren't handlers fun?" +end annoy |