diff --git a/engines/hypno/grammar_mis.cpp b/engines/hypno/grammar_mis.cpp index ee1a3d48eef..12686e19720 100644 --- a/engines/hypno/grammar_mis.cpp +++ b/engines/hypno/grammar_mis.cpp @@ -168,27 +168,28 @@ extern int HYPNO_MIS_debug; ESCPTOK = 280, NRTOK = 281, AMBITOK = 282, - GLOBTOK = 283, - TONTOK = 284, - TOFFTOK = 285, - TALKTOK = 286, - INACTOK = 287, - FDTOK = 288, - BOXXTOK = 289, - ESCAPETOK = 290, - SECONDTOK = 291, - INTROTOK = 292, - DEFAULTTOK = 293, - PG = 294, - PA = 295, - PD = 296, - PH = 297, - PF = 298, - PE = 299, - PP = 300, - PI = 301, - PL = 302, - PS = 303 + SWPTTOK = 283, + GLOBTOK = 284, + TONTOK = 285, + TOFFTOK = 286, + TALKTOK = 287, + INACTOK = 288, + FDTOK = 289, + BOXXTOK = 290, + ESCAPETOK = 291, + SECONDTOK = 292, + INTROTOK = 293, + DEFAULTTOK = 294, + PG = 295, + PA = 296, + PD = 297, + PH = 298, + PF = 299, + PE = 300, + PP = 301, + PI = 302, + PL = 303, + PS = 304 }; #endif @@ -202,7 +203,7 @@ union HYPNO_MIS_STYPE char *s; /* string value */ int i; /* integer value */ -#line 206 "engines/hypno/grammar_mis.cpp" /* yacc.c:355 */ +#line 207 "engines/hypno/grammar_mis.cpp" /* yacc.c:355 */ }; typedef union HYPNO_MIS_STYPE HYPNO_MIS_STYPE; @@ -219,7 +220,7 @@ int HYPNO_MIS_parse (void); /* Copy the second part of user declarations. */ -#line 223 "engines/hypno/grammar_mis.cpp" /* yacc.c:358 */ +#line 224 "engines/hypno/grammar_mis.cpp" /* yacc.c:358 */ #ifdef short # undef short @@ -461,21 +462,21 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 3 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 114 +#define YYLAST 119 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 49 +#define YYNTOKENS 50 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 10 +#define YYNNTS 11 /* YYNRULES -- Number of rules. */ -#define YYNRULES 49 +#define YYNRULES 53 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 121 +#define YYNSTATES 127 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 303 +#define YYMAXUTOK 304 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -514,7 +515,7 @@ static const yytype_uint8 yytranslate[] = 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48 + 45, 46, 47, 48, 49 }; #if HYPNO_MIS_DEBUG @@ -522,10 +523,11 @@ static const yytype_uint8 yytranslate[] = static const yytype_uint16 yyrline[] = { 0, 74, 74, 77, 84, 85, 89, 101, 107, 122, - 128, 129, 136, 143, 149, 155, 161, 168, 175, 182, - 188, 194, 200, 206, 209, 216, 219, 220, 224, 227, - 230, 234, 238, 243, 249, 250, 256, 262, 268, 275, - 282, 288, 293, 294, 297, 298, 301, 302, 305, 306 + 128, 129, 130, 137, 144, 150, 156, 162, 169, 176, + 183, 190, 196, 202, 208, 214, 217, 218, 221, 228, + 231, 232, 236, 239, 242, 246, 250, 255, 261, 262, + 268, 274, 280, 287, 294, 300, 305, 306, 309, 310, + 313, 314, 317, 318 }; #endif @@ -538,11 +540,11 @@ static const char *const yytname[] = "GSSWITCH", "COMMAND", "WALNTOK", "NUM", "HOTSTOK", "CUTSTOK", "BACKTOK", "INTRTOK", "RETTOK", "TIMETOK", "PALETOK", "BBOXTOK", "OVERTOK", "MICETOK", "PLAYTOK", "ENDTOK", "MENUTOK", "SMENTOK", "ESCPTOK", "NRTOK", - "AMBITOK", "GLOBTOK", "TONTOK", "TOFFTOK", "TALKTOK", "INACTOK", "FDTOK", - "BOXXTOK", "ESCAPETOK", "SECONDTOK", "INTROTOK", "DEFAULTTOK", "PG", - "PA", "PD", "PH", "PF", "PE", "PP", "PI", "PL", "PS", "$accept", "start", - "init", "lines", "line", "alloctalk", "talk", "mflag", "flag", - "gsswitch", YY_NULLPTR + "AMBITOK", "SWPTTOK", "GLOBTOK", "TONTOK", "TOFFTOK", "TALKTOK", + "INACTOK", "FDTOK", "BOXXTOK", "ESCAPETOK", "SECONDTOK", "INTROTOK", + "DEFAULTTOK", "PG", "PA", "PD", "PH", "PF", "PE", "PP", "PI", "PL", "PS", + "$accept", "start", "init", "lines", "line", "anything", "alloctalk", + "talk", "mflag", "flag", "gsswitch", YY_NULLPTR }; #endif @@ -555,14 +557,14 @@ static const yytype_uint16 yytoknum[] = 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303 + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304 }; # endif -#define YYPACT_NINF -75 +#define YYPACT_NINF -81 #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-75))) + (!!((Yystate) == (-81))) #define YYTABLE_NINF -1 @@ -573,19 +575,19 @@ static const yytype_uint16 yytoknum[] = STATE-NUM. */ static const yytype_int8 yypact[] = { - -75, 4, 64, -75, 1, -6, 9, 10, 13, -75, - 8, 15, 17, 19, 20, 11, 25, -75, -75, 23, - 22, -75, -75, 64, 21, 28, -75, 29, 30, -75, - -75, 31, 32, 34, -75, -75, 25, 36, 27, 24, - -75, 37, 38, 39, 40, 41, -75, 42, -75, 43, - -75, 70, 24, 24, 72, -75, 86, 89, 90, 24, - 24, 24, 24, 24, -75, 87, 88, 24, 24, -75, - 26, 91, 26, -75, 94, 26, 94, 92, -75, -75, - 93, 95, 96, 97, -75, -75, -75, -75, -75, 98, - 99, -75, -75, -75, 94, 100, 94, -75, -75, 94, - -75, 101, -75, 102, 103, 104, 24, 24, -75, -75, - 94, -75, 26, -75, -75, -75, -75, -75, -75, 94, - -75 + -81, 5, 65, -81, 9, -4, 13, 14, 15, -81, + 11, 19, 20, 22, 23, 25, 26, -81, -81, 27, + 28, 32, -81, -81, 65, 30, 31, -81, 34, 36, + 26, -81, 37, 38, 39, 25, 17, -81, 26, 40, + -81, 48, 24, -81, 42, 43, 46, 73, -81, 81, + -81, 85, -81, -81, -81, 86, -81, 29, 24, 24, + 88, -81, 71, 95, 96, 24, 24, 24, 24, 24, + -81, 91, 92, 24, 24, -81, 35, 93, 35, -81, + 99, 35, 99, 97, -81, -81, 98, 100, 101, 102, + -81, -81, -81, -81, -81, 103, 104, -81, -81, -81, + 99, 105, 99, -81, -81, 99, -81, 106, -81, 107, + 108, 109, 24, 24, -81, -81, 99, -81, 35, -81, + -81, -81, -81, -81, -81, 99, -81 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -593,31 +595,33 @@ static const yytype_int8 yypact[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 3, 0, 5, 1, 0, 0, 0, 0, 0, 23, - 0, 0, 0, 0, 0, 0, 45, 8, 9, 0, - 0, 24, 2, 5, 0, 0, 18, 0, 0, 10, - 16, 0, 0, 0, 22, 44, 45, 0, 0, 43, - 4, 0, 0, 0, 0, 0, 20, 0, 6, 0, - 12, 0, 43, 43, 0, 29, 0, 0, 0, 43, - 43, 43, 43, 43, 42, 0, 0, 43, 43, 21, - 49, 0, 49, 17, 47, 49, 47, 0, 25, 26, - 0, 0, 0, 0, 33, 36, 37, 34, 35, 0, - 0, 41, 40, 48, 47, 0, 47, 46, 15, 47, - 13, 0, 28, 0, 0, 0, 43, 43, 19, 7, - 47, 14, 49, 30, 31, 32, 38, 39, 11, 47, - 27 + 3, 0, 5, 1, 0, 0, 0, 0, 0, 25, + 0, 0, 0, 0, 0, 27, 49, 8, 9, 0, + 0, 0, 28, 2, 5, 0, 0, 20, 0, 19, + 49, 17, 0, 0, 0, 27, 0, 48, 49, 0, + 11, 0, 47, 4, 0, 0, 0, 0, 10, 0, + 22, 0, 26, 24, 6, 0, 13, 0, 47, 47, + 0, 33, 0, 0, 0, 47, 47, 47, 47, 47, + 46, 0, 0, 47, 47, 23, 53, 0, 53, 18, + 51, 53, 51, 0, 29, 30, 0, 0, 0, 0, + 37, 40, 41, 38, 39, 0, 0, 45, 44, 52, + 51, 0, 51, 50, 16, 51, 14, 0, 32, 0, + 0, 0, 47, 47, 21, 7, 51, 15, 53, 34, + 35, 36, 42, 43, 12, 51, 31 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { - -75, -75, -75, 12, -75, -75, -52, -4, -74, -69 + -81, -81, -81, 6, -81, -1, -81, -58, -26, -80, + -75 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { - -1, 1, 2, 22, 23, 39, 69, 36, 98, 94 + -1, 1, 2, 23, 24, 36, 42, 75, 38, 104, + 100 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -625,73 +629,75 @@ static const yytype_int8 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { - 78, 79, 100, 96, 3, 24, 99, 84, 85, 86, - 87, 88, 25, 26, 27, 91, 92, 28, 29, 30, - 108, 31, 110, 32, 33, 111, 34, 37, 35, 38, - 50, 41, 48, 93, 0, 40, 118, 51, 42, 43, - 44, 45, 46, 119, 47, 120, 49, 70, 71, 72, - 73, 74, 75, 76, 116, 117, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 4, 77, 5, 6, 7, 8, 9, - 10, 11, 80, 12, 13, 14, 15, 16, 17, 18, - 81, 19, 20, 82, 83, 21, 0, 89, 90, 97, - 0, 95, 101, 102, 0, 103, 104, 105, 106, 107, - 109, 112, 113, 114, 115 + 84, 85, 106, 102, 48, 3, 105, 90, 91, 92, + 93, 94, 54, 25, 26, 97, 98, 27, 28, 29, + 114, 30, 116, 31, 32, 117, 33, 34, 35, 37, + 43, 39, 53, 83, 52, 0, 124, 57, 40, 41, + 44, 45, 99, 125, 46, 126, 47, 49, 50, 51, + 55, 56, 76, 77, 122, 123, 78, 58, 59, 60, + 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, 72, 73, 74, 4, 87, 5, 6, 7, 8, + 9, 10, 11, 79, 12, 13, 14, 15, 16, 17, + 18, 80, 19, 20, 21, 81, 82, 22, 86, 88, + 89, 95, 96, 101, 103, 0, 0, 107, 108, 0, + 109, 110, 111, 112, 113, 115, 118, 119, 120, 121 }; static const yytype_int8 yycheck[] = { - 52, 53, 76, 72, 0, 4, 75, 59, 60, 61, - 62, 63, 18, 4, 4, 67, 68, 4, 10, 4, - 94, 4, 96, 4, 4, 99, 15, 4, 3, 7, - 3, 10, 36, 7, -1, 23, 110, 13, 10, 10, - 10, 10, 10, 112, 10, 119, 10, 10, 10, 10, - 10, 10, 10, 10, 106, 107, 32, 33, 34, 35, + 58, 59, 82, 78, 30, 0, 81, 65, 66, 67, + 68, 69, 38, 4, 18, 73, 74, 4, 4, 4, + 100, 10, 102, 4, 4, 105, 4, 4, 3, 3, + 24, 4, 15, 4, 35, -1, 116, 13, 10, 7, + 10, 10, 7, 118, 10, 125, 10, 10, 10, 10, + 10, 3, 10, 10, 112, 113, 10, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 9, 4, 11, 12, 13, 14, 15, - 16, 17, 10, 19, 20, 21, 22, 23, 24, 25, - 4, 27, 28, 4, 4, 31, -1, 10, 10, 5, - -1, 10, 10, 10, -1, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10 + 46, 47, 48, 49, 9, 4, 11, 12, 13, 14, + 15, 16, 17, 10, 19, 20, 21, 22, 23, 24, + 25, 10, 27, 28, 29, 10, 10, 32, 10, 4, + 4, 10, 10, 10, 5, -1, -1, 10, 10, -1, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { - 0, 50, 51, 0, 9, 11, 12, 13, 14, 15, + 0, 51, 52, 0, 9, 11, 12, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 27, - 28, 31, 52, 53, 4, 18, 4, 4, 4, 10, - 4, 4, 4, 4, 15, 3, 56, 4, 7, 54, - 52, 10, 10, 10, 10, 10, 10, 10, 56, 10, - 3, 13, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 55, - 10, 10, 10, 10, 10, 10, 10, 4, 55, 55, - 10, 4, 4, 4, 55, 55, 55, 55, 55, 10, - 10, 55, 55, 7, 58, 10, 58, 5, 57, 58, - 57, 10, 10, 10, 10, 10, 10, 10, 57, 10, - 57, 57, 10, 10, 10, 10, 55, 55, 57, 58, - 57 + 28, 29, 32, 53, 54, 4, 18, 4, 4, 4, + 10, 4, 4, 4, 4, 3, 55, 3, 58, 4, + 10, 7, 56, 53, 10, 10, 10, 10, 58, 10, + 10, 10, 55, 15, 58, 10, 3, 13, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 57, 10, 10, 10, 10, + 10, 10, 10, 4, 57, 57, 10, 4, 4, 4, + 57, 57, 57, 57, 57, 10, 10, 57, 57, 7, + 60, 10, 60, 5, 59, 60, 59, 10, 10, 10, + 10, 10, 10, 10, 59, 10, 59, 59, 10, 10, + 10, 10, 57, 57, 59, 60, 59 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 49, 50, 51, 52, 52, 53, 53, 53, 53, - 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, - 53, 53, 53, 53, 54, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 56, 56, 57, 57, 58, 58 + 0, 50, 51, 52, 53, 53, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 55, 55, 56, 57, + 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 57, 57, 57, 57, 57, 57, 58, 58, + 59, 59, 60, 60 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 2, 0, 2, 0, 3, 6, 1, 1, - 2, 7, 3, 5, 6, 5, 2, 4, 2, 6, - 3, 3, 2, 1, 0, 2, 2, 6, 3, 1, - 4, 4, 4, 2, 2, 2, 2, 2, 4, 4, - 2, 2, 1, 0, 1, 0, 1, 0, 1, 0 + 3, 2, 7, 3, 5, 6, 5, 2, 4, 2, + 2, 6, 3, 3, 3, 1, 2, 0, 0, 2, + 2, 6, 3, 1, 4, 4, 4, 2, 2, 2, + 2, 2, 4, 4, 2, 2, 1, 0, 1, 0, + 1, 0, 1, 0 }; @@ -1375,14 +1381,14 @@ yyreduce: stack = new Hypno::HotspotsStack(); stack->push_back(new Hotspots()); } -#line 1379 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1385 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; case 6: #line 89 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { Hotspot *hot = new Hotspot(MakeMenu, (yyvsp[-1].s)); - debugC(1, kHypnoDebugParser, "MENU %d.", hot->type); + debugC(1, kHypnoDebugParser, "MENU %s %s", (yyvsp[-1].s), (yyvsp[0].s)); Hotspots *cur = stack->back(); cur->push_back(*hot); @@ -1392,7 +1398,7 @@ yyreduce: smenu_idx->pop_back(); smenu_idx->push_back(idx); } -#line 1396 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1402 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; case 7: @@ -1403,7 +1409,7 @@ yyreduce: Hotspots *cur = stack->back(); cur->push_back(*hot); } -#line 1407 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1413 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; case 8: @@ -1423,7 +1429,7 @@ yyreduce: stack->push_back(hot->smenu); debugC(1, kHypnoDebugParser, "SUBMENU"); } -#line 1427 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1433 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; case 9: @@ -1434,17 +1440,23 @@ yyreduce: Hotspot *hot = &cur->back(); hot->actions.push_back(a); debugC(1, kHypnoDebugParser, "ESC SUBMENU"); } -#line 1438 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1444 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; case 10: #line 128 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ - { debugC(1, kHypnoDebugParser, "TIME %d", (yyvsp[0].i)); } -#line 1444 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ + { debugC(1, kHypnoDebugParser, "TIME %d", (yyvsp[-1].i)); } +#line 1450 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; case 11: #line 129 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + { debugC(1, kHypnoDebugParser, "SWPT %d", (yyvsp[0].i)); } +#line 1456 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ + break; + + case 12: +#line 130 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { Background *a = new Background((yyvsp[-5].s), Common::Point((yyvsp[-4].i), (yyvsp[-3].i)), (yyvsp[-2].s), (yyvsp[-1].s), (yyvsp[0].s)); Hotspots *cur = stack->back(); @@ -1452,11 +1464,11 @@ yyreduce: hot->actions.push_back(a); debugC(1, kHypnoDebugParser, "BACK"); } -#line 1456 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1468 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 12: -#line 136 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 13: +#line 137 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { Global *a = new Global((yyvsp[-1].s), (yyvsp[0].s)); Hotspots *cur = stack->back(); @@ -1464,44 +1476,44 @@ yyreduce: hot->actions.push_back(a); debugC(1, kHypnoDebugParser, "GLOB"); } -#line 1468 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1480 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 13: -#line 143 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 14: +#line 144 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { Ambient *a = new Ambient((yyvsp[-3].s), Common::Point((yyvsp[-2].i), (yyvsp[-1].i)), (yyvsp[0].s)); Hotspots *cur = stack->back(); Hotspot *hot = &cur->back(); hot->actions.push_back(a); debugC(1, kHypnoDebugParser, "AMBI %d %d", (yyvsp[-2].i), (yyvsp[-1].i)); } -#line 1479 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1491 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 14: -#line 149 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 15: +#line 150 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { Play *a = new Play((yyvsp[-4].s), Common::Point((yyvsp[-3].i), (yyvsp[-2].i)), (yyvsp[-1].s), (yyvsp[0].s)); Hotspots *cur = stack->back(); Hotspot *hot = &cur->back(); hot->actions.push_back(a); debugC(1, kHypnoDebugParser, "PLAY %s.", (yyvsp[-4].s)); } -#line 1490 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1502 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 15: -#line 155 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 16: +#line 156 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { Overlay *a = new Overlay((yyvsp[-3].s), Common::Point((yyvsp[-2].i), (yyvsp[-1].i)), (yyvsp[0].s)); Hotspots *cur = stack->back(); Hotspot *hot = &cur->back(); hot->actions.push_back(a); } -#line 1501 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1513 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 16: -#line 161 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 17: +#line 162 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { Palette *a = new Palette((yyvsp[0].s)); Hotspots *cur = stack->back(); @@ -1509,11 +1521,11 @@ yyreduce: hot->actions.push_back(a); debugC(1, kHypnoDebugParser, "PALE"); } -#line 1513 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1525 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 17: -#line 168 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 18: +#line 169 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { Cutscene *a = new Cutscene(Common::String("cine/") + (yyvsp[-2].s)); Hotspots *cur = stack->back(); @@ -1521,11 +1533,23 @@ yyreduce: hot->actions.push_back(a); debugC(1, kHypnoDebugParser, "INTRO %s %d %d", (yyvsp[-2].s), (yyvsp[-1].i), (yyvsp[0].i)); } -#line 1525 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1537 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 18: -#line 175 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 19: +#line 176 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + { + Cutscene *a = new Cutscene(Common::String("cine/") + (yyvsp[0].s)); + Hotspots *cur = stack->back(); + Hotspot *hot = &cur->back(); + hot->actions.push_back(a); + debugC(1, kHypnoDebugParser, "INTRO %s", (yyvsp[0].s)); + } +#line 1549 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ + break; + + case 20: +#line 183 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { Cutscene *a = new Cutscene((yyvsp[0].s)); Hotspots *cur = stack->back(); @@ -1533,189 +1557,189 @@ yyreduce: hot->actions.push_back(a); debugC(1, kHypnoDebugParser, "CUTS %s", (yyvsp[0].s)); } -#line 1537 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1561 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 19: -#line 182 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 21: +#line 190 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { WalN *a = new WalN((yyvsp[-5].s), (yyvsp[-4].s), Common::Point((yyvsp[-3].i), (yyvsp[-2].i)), (yyvsp[-1].s), (yyvsp[0].s)); Hotspots *cur = stack->back(); Hotspot *hot = &cur->back(); hot->actions.push_back(a); debugC(1, kHypnoDebugParser, "WALN %s %d %d", (yyvsp[-4].s), (yyvsp[-3].i), (yyvsp[-2].i)); } -#line 1548 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1572 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 20: -#line 188 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 22: +#line 196 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { Mice *a = new Mice((yyvsp[-1].s), (yyvsp[0].i)-1); Hotspots *cur = stack->back(); Hotspot *hot = &cur->back(); hot->actions.push_back(a); } -#line 1559 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1583 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 21: -#line 194 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 23: +#line 202 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { Hotspots *cur = stack->back(); Hotspot *hot = &cur->back(); hot->actions.push_back(talk_action); talk_action = nullptr; debugC(1, kHypnoDebugParser, "TALK"); } -#line 1570 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1594 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 22: -#line 200 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 24: +#line 208 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { debugC(1, kHypnoDebugParser, "explicit END"); g_parsedHots = stack->back(); stack->pop_back(); smenu_idx->pop_back(); } -#line 1581 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1605 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 23: -#line 206 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 25: +#line 214 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { debugC(1, kHypnoDebugParser, "implicit END"); } -#line 1587 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1611 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 24: -#line 209 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 28: +#line 221 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { assert(talk_action == nullptr); talk_action = new Talk(); talk_action->escape = false; talk_action->active = true; } -#line 1598 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1622 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 25: -#line 216 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 29: +#line 228 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { talk_action->active = false; debugC(1, kHypnoDebugParser, "inactive"); } -#line 1606 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1630 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 26: -#line 219 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 30: +#line 231 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { debugC(1, kHypnoDebugParser, "inactive"); } -#line 1612 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1636 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 27: -#line 220 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 31: +#line 232 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { talk_action->background = (yyvsp[-4].s); talk_action->backgroundPos = Common::Point((yyvsp[-3].i), (yyvsp[-2].i)); debugC(1, kHypnoDebugParser, "BACK in TALK"); } -#line 1621 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1645 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 28: -#line 224 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 32: +#line 236 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { talk_action->boxPos = Common::Point((yyvsp[-1].i), (yyvsp[0].i)); debugC(1, kHypnoDebugParser, "BOXX %d %d", (yyvsp[-1].i), (yyvsp[0].i)); } -#line 1629 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1653 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 29: -#line 227 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 33: +#line 239 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { talk_action->escape = true; debugC(1, kHypnoDebugParser, "ESCAPE"); } -#line 1637 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1661 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 30: -#line 230 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 34: +#line 242 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { talk_action->second = (yyvsp[-2].s); talk_action->secondPos = Common::Point((yyvsp[-1].i), (yyvsp[0].i)); debugC(1, kHypnoDebugParser, "SECOND %s %d %d", (yyvsp[-2].s), (yyvsp[-1].i), (yyvsp[0].i)); } -#line 1646 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1670 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 31: -#line 234 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 35: +#line 246 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { talk_action->intro = (yyvsp[-2].s); talk_action->introPos = Common::Point((yyvsp[-1].i), (yyvsp[0].i)); debugC(1, kHypnoDebugParser, "INTRO %s %d %d", (yyvsp[-2].s), (yyvsp[-1].i), (yyvsp[0].i)); } -#line 1655 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1679 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 32: -#line 238 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 36: +#line 250 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { // Unsure how this is different from second talk_action->second = (yyvsp[-2].s); talk_action->secondPos = Common::Point((yyvsp[-1].i), (yyvsp[0].i)); debugC(1, kHypnoDebugParser, "DEFAULT %s %d %d", (yyvsp[-2].s), (yyvsp[-1].i), (yyvsp[0].i)); } -#line 1665 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1689 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 33: -#line 243 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 37: +#line 255 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { TalkCommand talk_cmd; talk_cmd.command = "G"; talk_cmd.path = (yyvsp[-1].s)+2; talk_action->commands.push_back(talk_cmd); debugC(1, kHypnoDebugParser, "%s", (yyvsp[-1].s)); } -#line 1676 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1700 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 34: -#line 249 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 38: +#line 261 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { debugC(1, kHypnoDebugParser, "%s", (yyvsp[-1].s)); } -#line 1682 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1706 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 35: -#line 250 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 39: +#line 262 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { TalkCommand talk_cmd; talk_cmd.command = "F"; talk_cmd.num = atoi((yyvsp[-1].s)+2)-1; talk_action->commands.push_back(talk_cmd); debugC(1, kHypnoDebugParser, "%s", (yyvsp[-1].s)); } -#line 1693 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1717 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 36: -#line 256 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 40: +#line 268 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { TalkCommand talk_cmd; talk_cmd.command = "A"; talk_cmd.num = atoi((yyvsp[-1].s)+2)-1; talk_action->commands.push_back(talk_cmd); debugC(1, kHypnoDebugParser, "|A%d", talk_cmd.num); } -#line 1704 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1728 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 37: -#line 262 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 41: +#line 274 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { TalkCommand talk_cmd; talk_cmd.command = "D"; talk_cmd.num = atoi((yyvsp[-1].s)+2)-1; talk_action->commands.push_back(talk_cmd); debugC(1, kHypnoDebugParser, "%s", (yyvsp[-1].s)); } -#line 1715 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1739 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 38: -#line 268 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 42: +#line 280 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { TalkCommand talk_cmd; talk_cmd.command = "P"; @@ -1723,11 +1747,11 @@ yyreduce: talk_cmd.position = Common::Point((yyvsp[-2].i), (yyvsp[-1].i)); talk_action->commands.push_back(talk_cmd); debugC(1, kHypnoDebugParser, "%s %d %d", (yyvsp[-3].s), (yyvsp[-2].i), (yyvsp[-1].i)); } -#line 1727 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1751 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 39: -#line 275 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 43: +#line 287 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { TalkCommand talk_cmd; talk_cmd.command = "I"; @@ -1735,74 +1759,74 @@ yyreduce: talk_cmd.position = Common::Point((yyvsp[-2].i), (yyvsp[-1].i)); talk_action->commands.push_back(talk_cmd); debugC(1, kHypnoDebugParser, "%s %d %d", (yyvsp[-3].s), (yyvsp[-2].i), (yyvsp[-1].i)); } -#line 1739 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1763 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 40: -#line 282 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 44: +#line 294 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { TalkCommand talk_cmd; talk_cmd.command = "S"; talk_cmd.variable = (yyvsp[-1].s)+2; talk_action->commands.push_back(talk_cmd); debugC(1, kHypnoDebugParser, "%s", (yyvsp[-1].s)); } -#line 1750 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ +#line 1774 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 41: -#line 288 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + case 45: +#line 300 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { TalkCommand talk_cmd; talk_cmd.command = "L"; talk_action->commands.push_back(talk_cmd); debugC(1, kHypnoDebugParser, "|L"); } -#line 1760 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ - break; - - case 42: -#line 293 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ - { debugC(1, kHypnoDebugParser, "|E"); } -#line 1766 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ - break; - - case 44: -#line 297 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ - { (yyval.s) = (yyvsp[0].s); debugC(1, kHypnoDebugParser, "name: %s", (yyvsp[0].s)); } -#line 1772 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ - break; - - case 45: -#line 298 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ - { (yyval.s) = scumm_strdup(""); } -#line 1778 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ - break; - - case 46: -#line 301 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ - { (yyval.s) = (yyvsp[0].s); debugC(1, kHypnoDebugParser, "flag: %s", (yyvsp[0].s)); } #line 1784 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; - case 47: -#line 302 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ - { (yyval.s) = scumm_strdup(""); } + case 46: +#line 305 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + { debugC(1, kHypnoDebugParser, "|E"); } #line 1790 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; case 48: -#line 305 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ - { (yyval.s) = (yyvsp[0].s); debugC(1, kHypnoDebugParser, "switch %s", (yyvsp[0].s)); } +#line 309 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + { (yyval.s) = (yyvsp[0].s); } #line 1796 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; case 49: -#line 306 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ +#line 310 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ { (yyval.s) = scumm_strdup(""); } #line 1802 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ break; + case 50: +#line 313 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + { (yyval.s) = (yyvsp[0].s); debugC(1, kHypnoDebugParser, "flag: %s", (yyvsp[0].s)); } +#line 1808 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ + break; -#line 1806 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ + case 51: +#line 314 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + { (yyval.s) = scumm_strdup(""); } +#line 1814 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ + break; + + case 52: +#line 317 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + { (yyval.s) = (yyvsp[0].s); debugC(1, kHypnoDebugParser, "switch %s", (yyvsp[0].s)); } +#line 1820 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ + break; + + case 53: +#line 318 "engines/hypno/grammar_mis.y" /* yacc.c:1646 */ + { (yyval.s) = scumm_strdup(""); } +#line 1826 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ + break; + + +#line 1830 "engines/hypno/grammar_mis.cpp" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires diff --git a/engines/hypno/grammar_mis.y b/engines/hypno/grammar_mis.y index 09d3864a06d..f221754ed86 100644 --- a/engines/hypno/grammar_mis.y +++ b/engines/hypno/grammar_mis.y @@ -62,7 +62,7 @@ using namespace Hypno; %token NAME FILENAME FLAG COMMENT GSSWITCH COMMAND WALNTOK %token NUM %token HOTSTOK CUTSTOK BACKTOK INTRTOK RETTOK TIMETOK PALETOK BBOXTOK OVERTOK MICETOK PLAYTOK ENDTOK -%token MENUTOK SMENTOK ESCPTOK NRTOK AMBITOK +%token MENUTOK SMENTOK ESCPTOK NRTOK AMBITOK SWPTTOK %token GLOBTOK TONTOK TOFFTOK %token TALKTOK INACTOK FDTOK BOXXTOK ESCAPETOK SECONDTOK INTROTOK DEFAULTTOK %token PG PA PD PH PF PE PP PI PL PS @@ -88,7 +88,7 @@ lines: line lines line: MENUTOK mflag mflag { Hotspot *hot = new Hotspot(MakeMenu, $2); - debugC(1, kHypnoDebugParser, "MENU %d.", hot->type); + debugC(1, kHypnoDebugParser, "MENU %s %s", $2, $3); Hotspots *cur = stack->back(); cur->push_back(*hot); @@ -125,7 +125,8 @@ line: MENUTOK mflag mflag { Hotspot *hot = &cur->back(); hot->actions.push_back(a); debugC(1, kHypnoDebugParser, "ESC SUBMENU"); } - | TIMETOK NUM { debugC(1, kHypnoDebugParser, "TIME %d", $2); } + | TIMETOK NUM mflag { debugC(1, kHypnoDebugParser, "TIME %d", $2); } + | SWPTTOK NUM { debugC(1, kHypnoDebugParser, "SWPT %d", $2); } | BACKTOK FILENAME NUM NUM gsswitch flag flag { Background *a = new Background($2, Common::Point($3, $4), $5, $6, $7); Hotspots *cur = stack->back(); @@ -172,6 +173,13 @@ line: MENUTOK mflag mflag { hot->actions.push_back(a); debugC(1, kHypnoDebugParser, "INTRO %s %d %d", $2, $3, $4); } + | INTRTOK FILENAME { + Cutscene *a = new Cutscene(Common::String("cine/") + $2); + Hotspots *cur = stack->back(); + Hotspot *hot = &cur->back(); + hot->actions.push_back(a); + debugC(1, kHypnoDebugParser, "INTRO %s", $2); + } | CUTSTOK FILENAME { Cutscene *a = new Cutscene($2); Hotspots *cur = stack->back(); @@ -197,7 +205,7 @@ line: MENUTOK mflag mflag { hot->actions.push_back(talk_action); talk_action = nullptr; debugC(1, kHypnoDebugParser, "TALK"); } - | ENDTOK RETTOK { + | ENDTOK anything RETTOK { debugC(1, kHypnoDebugParser, "explicit END"); g_parsedHots = stack->back(); stack->pop_back(); @@ -206,6 +214,10 @@ line: MENUTOK mflag mflag { | RETTOK { debugC(1, kHypnoDebugParser, "implicit END"); } ; +anything: NAME anything + | // nothing + ; + alloctalk: { assert(talk_action == nullptr); talk_action = new Talk(); @@ -294,7 +306,7 @@ talk: INACTOK talk { | /*nothing*/ ; -mflag: NAME { $$ = $1; debugC(1, kHypnoDebugParser, "name: %s", $1); } +mflag: NAME { $$ = $1; } | /* nothing */ { $$ = scumm_strdup(""); } ; diff --git a/engines/hypno/lexer_mis.cpp b/engines/hypno/lexer_mis.cpp index d1e0072b4af..f3c5c1385e8 100644 --- a/engines/hypno/lexer_mis.cpp +++ b/engines/hypno/lexer_mis.cpp @@ -633,8 +633,8 @@ static void yynoreturn yy_fatal_error ( const char* msg ); (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; -#define YY_NUM_RULES 46 -#define YY_END_OF_BUFFER 47 +#define YY_NUM_RULES 47 +#define YY_END_OF_BUFFER 48 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -642,24 +642,24 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[144] = +static const flex_int16_t yy_accept[147] = { 0, - 0, 0, 47, 45, 44, 43, 43, 45, 39, 42, - 42, 45, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, 43, 44, - 42, 0, 39, 39, 0, 1, 41, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, - 0, 0, 35, 0, 0, 0, 0, 36, 0, 0, - 2, 39, 0, 40, 40, 40, 40, 40, 11, 40, - 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, - 40, 40, 40, 40, 40, 32, 33, 34, 28, 31, + 0, 0, 48, 46, 45, 44, 44, 46, 40, 43, + 43, 46, 41, 41, 41, 41, 41, 41, 41, 41, + 41, 41, 41, 41, 41, 41, 41, 41, 44, 45, + 43, 0, 40, 40, 0, 1, 42, 41, 41, 41, + 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, + 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, + 41, 0, 0, 36, 0, 0, 0, 0, 37, 0, + 0, 2, 40, 0, 41, 41, 41, 41, 41, 11, + 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, + 41, 41, 41, 41, 41, 41, 41, 33, 34, 35, - 30, 29, 27, 39, 0, 4, 5, 20, 6, 40, - 40, 15, 7, 37, 9, 40, 24, 3, 10, 13, - 8, 16, 40, 14, 17, 12, 26, 39, 19, 40, - 40, 40, 23, 40, 38, 40, 21, 40, 22, 25, - 40, 18, 0 + 29, 32, 31, 30, 28, 40, 0, 4, 5, 20, + 6, 41, 41, 15, 7, 38, 9, 41, 24, 3, + 10, 13, 8, 16, 41, 14, 25, 17, 12, 27, + 40, 19, 41, 41, 41, 23, 41, 39, 41, 21, + 41, 22, 26, 41, 18, 0 } ; static const YY_CHAR yy_ec[256] = @@ -702,49 +702,49 @@ static const YY_CHAR yy_meta[40] = 5, 5, 5, 5, 5, 5, 5, 5, 1 } ; -static const flex_int16_t yy_base[155] = +static const flex_int16_t yy_base[158] = { 0, - 0, 0, 299, 300, 296, 300, 300, 32, 36, 36, - 39, 0, 45, 46, 47, 48, 50, 291, 51, 55, - 52, 66, 56, 61, 71, 78, 58, 0, 87, 294, - 84, 0, 287, 83, 277, 0, 0, 282, 54, 80, - 63, 95, 96, 103, 106, 104, 107, 110, 112, 114, - 117, 116, 118, 121, 122, 129, 123, 124, 130, 0, - 142, 147, 300, 150, 0, 153, 0, 300, 0, 0, - 0, 138, 258, 132, 158, 133, 142, 160, 276, 161, - 163, 164, 165, 169, 170, 172, 173, 174, 176, 177, - 179, 181, 182, 180, 186, 200, 206, 209, 0, 212, + 0, 0, 305, 306, 302, 306, 306, 32, 36, 36, + 39, 0, 45, 46, 47, 48, 50, 297, 51, 55, + 52, 66, 56, 61, 71, 78, 58, 0, 93, 299, + 84, 0, 291, 83, 281, 0, 0, 286, 54, 80, + 63, 94, 97, 102, 101, 95, 96, 98, 113, 114, + 121, 118, 122, 124, 126, 125, 128, 133, 137, 139, + 0, 139, 142, 306, 145, 0, 150, 0, 306, 0, + 0, 0, 154, 262, 158, 159, 132, 160, 162, 280, + 163, 164, 165, 166, 168, 171, 167, 178, 179, 180, + 174, 182, 181, 183, 188, 187, 207, 208, 211, 214, - 0, 0, 0, 189, 244, 268, 265, 260, 255, 194, - 195, 254, 252, 192, 251, 205, 185, 250, 249, 248, - 247, 246, 219, 245, 244, 241, 238, 220, 300, 222, - 223, 227, 237, 225, 300, 228, 236, 229, 233, 231, - 232, 60, 300, 259, 264, 267, 58, 272, 275, 278, - 281, 284, 287, 290 + 0, 217, 0, 0, 0, 194, 246, 272, 267, 262, + 261, 196, 206, 260, 258, 192, 257, 200, 226, 256, + 255, 254, 253, 252, 229, 246, 245, 244, 241, 239, + 226, 306, 230, 231, 235, 238, 233, 306, 234, 237, + 236, 199, 186, 240, 60, 306, 266, 271, 274, 58, + 279, 282, 285, 288, 291, 294, 297 } ; -static const flex_int16_t yy_def[155] = +static const flex_int16_t yy_def[158] = { 0, - 143, 1, 143, 143, 143, 143, 143, 143, 144, 143, - 143, 145, 146, 146, 146, 146, 146, 146, 146, 146, - 146, 146, 146, 146, 146, 146, 146, 147, 143, 143, - 143, 148, 144, 144, 143, 145, 149, 146, 146, 146, - 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, - 146, 146, 146, 146, 146, 146, 146, 146, 146, 147, - 143, 143, 143, 143, 150, 143, 151, 143, 152, 153, - 148, 144, 143, 146, 146, 146, 146, 146, 146, 146, - 146, 154, 146, 146, 146, 146, 146, 146, 146, 146, - 146, 146, 146, 146, 146, 143, 143, 143, 150, 143, + 146, 1, 146, 146, 146, 146, 146, 146, 147, 146, + 146, 148, 149, 149, 149, 149, 149, 149, 149, 149, + 149, 149, 149, 149, 149, 149, 149, 150, 146, 146, + 146, 151, 147, 147, 146, 148, 152, 149, 149, 149, + 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, + 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, + 150, 146, 146, 146, 146, 153, 146, 154, 146, 155, + 156, 151, 147, 146, 149, 149, 149, 149, 149, 149, + 149, 149, 157, 149, 149, 149, 149, 149, 149, 149, + 149, 149, 149, 149, 149, 149, 149, 146, 146, 146, - 151, 152, 153, 144, 143, 146, 146, 146, 146, 146, - 146, 146, 146, 154, 146, 146, 146, 146, 146, 146, - 146, 146, 146, 146, 146, 146, 146, 144, 143, 146, - 146, 146, 146, 146, 143, 146, 146, 146, 146, 146, - 146, 146, 0, 143, 143, 143, 143, 143, 143, 143, - 143, 143, 143, 143 + 153, 146, 154, 155, 156, 147, 146, 149, 149, 149, + 149, 149, 149, 149, 149, 157, 149, 149, 149, 149, + 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, + 147, 146, 149, 149, 149, 149, 149, 146, 149, 149, + 149, 149, 149, 149, 149, 0, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146 } ; -static const flex_int16_t yy_nxt[340] = +static const flex_int16_t yy_nxt[346] = { 0, 4, 5, 6, 7, 8, 4, 9, 10, 10, 11, 12, 4, 13, 14, 15, 16, 17, 18, 19, 20, @@ -752,40 +752,41 @@ static const flex_int16_t yy_nxt[340] = 26, 18, 18, 27, 18, 18, 28, 18, 29, 31, 31, 31, 32, 31, 31, 31, 31, 31, 31, 34, 37, 37, 37, 37, 35, 37, 37, 37, 40, 37, - 37, 37, 60, 37, 43, 37, 37, 74, 37, 39, - 59, 37, 41, 53, 46, 44, 37, 49, 42, 45, - 47, 48, 50, 37, 54, 37, 51, 55, 52, 143, - 57, 31, 31, 31, 75, 56, 72, 76, 58, 61, + 37, 37, 61, 37, 43, 37, 37, 75, 37, 39, + 60, 37, 41, 53, 46, 44, 37, 49, 42, 45, + 47, 48, 50, 37, 54, 37, 51, 55, 52, 146, + 58, 31, 31, 31, 76, 56, 73, 77, 59, 37, - 37, 37, 62, 63, 64, 65, 66, 67, 37, 37, - 68, 37, 37, 78, 69, 37, 70, 37, 79, 37, - 80, 37, 37, 37, 84, 77, 37, 37, 37, 37, - 81, 87, 88, 90, 37, 37, 91, 37, 37, 86, - 83, 89, 85, 82, 143, 92, 93, 37, 94, 96, - 96, 96, 106, 95, 97, 97, 97, 98, 98, 98, - 100, 100, 100, 37, 104, 37, 37, 108, 37, 37, - 37, 109, 110, 111, 37, 37, 113, 37, 37, 37, - 107, 37, 37, 116, 37, 37, 37, 37, 112, 119, - 37, 37, 121, 127, 115, 143, 126, 37, 117, 37, + 37, 37, 37, 37, 57, 62, 37, 37, 63, 64, + 65, 66, 67, 68, 79, 81, 69, 80, 37, 37, + 70, 82, 71, 37, 78, 85, 37, 37, 84, 37, + 37, 37, 83, 37, 89, 88, 91, 37, 37, 87, + 92, 93, 37, 86, 37, 90, 98, 98, 98, 99, + 99, 99, 100, 100, 100, 94, 95, 102, 102, 102, + 146, 96, 97, 37, 37, 37, 110, 37, 37, 37, + 37, 37, 37, 37, 112, 113, 37, 115, 108, 37, + 106, 109, 118, 37, 37, 37, 37, 37, 37, 111, + 114, 37, 37, 37, 121, 117, 123, 37, 120, 119, - 37, 38, 120, 118, 125, 123, 124, 96, 96, 96, - 37, 133, 122, 97, 97, 97, 98, 98, 98, 100, - 100, 100, 131, 128, 37, 130, 143, 37, 37, 38, - 37, 135, 37, 37, 37, 132, 37, 37, 37, 137, - 139, 37, 37, 37, 134, 136, 37, 138, 142, 37, - 37, 37, 37, 37, 37, 37, 37, 37, 140, 37, - 37, 141, 33, 33, 36, 37, 36, 36, 36, 38, - 37, 38, 71, 37, 71, 71, 71, 37, 129, 37, - 99, 37, 99, 101, 105, 101, 102, 37, 102, 103, - 73, 103, 114, 143, 114, 30, 37, 30, 143, 3, + 146, 37, 38, 129, 37, 37, 126, 122, 125, 124, + 128, 37, 37, 127, 130, 98, 98, 98, 99, 99, + 99, 100, 100, 100, 102, 102, 102, 133, 131, 38, + 135, 37, 146, 134, 37, 37, 37, 138, 37, 37, + 37, 37, 37, 37, 37, 37, 37, 140, 142, 37, + 37, 37, 136, 139, 137, 141, 145, 37, 37, 37, + 37, 37, 37, 37, 143, 37, 37, 37, 144, 33, + 33, 36, 37, 36, 36, 36, 38, 37, 38, 72, + 132, 72, 72, 72, 37, 37, 37, 101, 107, 101, + 103, 37, 103, 104, 74, 104, 105, 146, 105, 116, - 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, - 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, - 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, - 143, 143, 143, 143, 143, 143, 143, 143, 143 + 30, 116, 37, 30, 146, 3, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146 } ; -static const flex_int16_t yy_chk[340] = +static const flex_int16_t yy_chk[346] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -793,45 +794,46 @@ static const flex_int16_t yy_chk[340] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 8, 8, 9, 10, 10, 10, 11, 11, 11, 9, 13, 14, 15, 16, 11, 17, 19, 21, 14, 39, - 20, 23, 147, 27, 16, 142, 24, 39, 41, 13, + 20, 23, 150, 27, 16, 145, 24, 39, 41, 13, 27, 22, 14, 24, 19, 17, 25, 21, 15, 17, 19, 20, 22, 26, 24, 40, 22, 25, 23, 34, - 26, 31, 31, 31, 40, 25, 34, 41, 26, 29, + 26, 31, 31, 31, 40, 25, 34, 41, 26, 42, - 42, 43, 29, 29, 29, 29, 29, 29, 44, 46, - 29, 45, 47, 43, 29, 48, 29, 49, 44, 50, - 45, 52, 51, 53, 49, 42, 54, 55, 57, 58, - 46, 51, 52, 54, 56, 59, 55, 74, 76, 50, - 48, 53, 49, 47, 72, 56, 57, 77, 58, 61, - 61, 61, 74, 59, 62, 62, 62, 64, 64, 64, - 66, 66, 66, 75, 72, 78, 80, 76, 81, 82, - 83, 77, 78, 80, 84, 85, 81, 86, 87, 88, - 75, 89, 90, 84, 91, 94, 92, 93, 80, 87, - 117, 95, 89, 95, 83, 104, 94, 114, 85, 110, + 46, 47, 43, 48, 25, 29, 45, 44, 29, 29, + 29, 29, 29, 29, 43, 45, 29, 44, 49, 50, + 29, 46, 29, 52, 42, 49, 51, 53, 48, 54, + 56, 55, 47, 57, 52, 51, 54, 77, 58, 50, + 55, 56, 59, 49, 60, 53, 62, 62, 62, 63, + 63, 63, 65, 65, 65, 57, 58, 67, 67, 67, + 73, 59, 60, 75, 76, 78, 77, 79, 81, 82, + 83, 84, 87, 85, 79, 81, 86, 82, 75, 91, + 73, 76, 85, 88, 89, 90, 93, 92, 94, 78, + 81, 143, 96, 95, 88, 84, 90, 116, 87, 86, - 111, 82, 88, 86, 93, 91, 92, 96, 96, 96, - 116, 117, 90, 97, 97, 97, 98, 98, 98, 100, - 100, 100, 111, 104, 123, 110, 128, 130, 131, 114, - 134, 128, 132, 136, 138, 116, 140, 141, 139, 131, - 134, 137, 133, 127, 123, 130, 126, 132, 141, 125, - 124, 122, 121, 120, 119, 118, 115, 113, 136, 112, - 109, 138, 144, 144, 145, 108, 145, 145, 145, 146, - 107, 146, 148, 106, 148, 148, 148, 149, 105, 149, - 150, 79, 150, 151, 73, 151, 152, 38, 152, 153, - 35, 153, 154, 33, 154, 30, 18, 5, 3, 143, + 106, 112, 83, 96, 142, 118, 93, 89, 92, 91, + 95, 113, 97, 94, 97, 98, 98, 98, 99, 99, + 99, 100, 100, 100, 102, 102, 102, 112, 106, 116, + 118, 119, 131, 113, 125, 133, 134, 131, 137, 139, + 135, 141, 140, 136, 130, 144, 129, 134, 137, 128, + 127, 126, 119, 133, 125, 135, 144, 124, 123, 122, + 121, 120, 117, 115, 139, 114, 111, 110, 141, 147, + 147, 148, 109, 148, 148, 148, 149, 108, 149, 151, + 107, 151, 151, 151, 152, 80, 152, 153, 74, 153, + 154, 38, 154, 155, 35, 155, 156, 33, 156, 157, - 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, - 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, - 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, - 143, 143, 143, 143, 143, 143, 143, 143, 143 + 30, 157, 18, 5, 3, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, + 146, 146, 146, 146, 146 } ; /* Table of booleans, true if rule could match eol. */ -static const flex_int32_t yy_rule_can_match_eol[47] = +static const flex_int32_t yy_rule_can_match_eol[48] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 1, 0, 0, 0, }; + 0, 0, 0, 0, 1, 0, 0, 0, }; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; @@ -878,8 +880,8 @@ char *yytext; #include "hypno/grammar.h" #include "hypno/tokens_mis.h" -#line 882 "engines/hypno/lexer_mis.cpp" -#line 883 "engines/hypno/lexer_mis.cpp" +#line 884 "engines/hypno/lexer_mis.cpp" +#line 885 "engines/hypno/lexer_mis.cpp" #define INITIAL 0 @@ -1096,7 +1098,7 @@ YY_DECL { #line 42 "engines/hypno/lexer_mis.l" -#line 1100 "engines/hypno/lexer_mis.cpp" +#line 1102 "engines/hypno/lexer_mis.cpp" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -1123,13 +1125,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 >= 144 ) + if ( yy_current_state >= 147 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_current_state != 143 ); + while ( yy_current_state != 146 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); @@ -1282,115 +1284,120 @@ return INTRTOK; case 25: YY_RULE_SETUP #line 67 "engines/hypno/lexer_mis.l" -return DEFAULTTOK; +return SWPTTOK; YY_BREAK case 26: YY_RULE_SETUP #line 68 "engines/hypno/lexer_mis.l" -HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return WALNTOK; +return DEFAULTTOK; YY_BREAK case 27: YY_RULE_SETUP #line 69 "engines/hypno/lexer_mis.l" -HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PS; +HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return WALNTOK; YY_BREAK case 28: YY_RULE_SETUP #line 70 "engines/hypno/lexer_mis.l" -HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PG; +HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PS; YY_BREAK case 29: YY_RULE_SETUP #line 71 "engines/hypno/lexer_mis.l" -HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PP; +HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PG; YY_BREAK case 30: YY_RULE_SETUP #line 72 "engines/hypno/lexer_mis.l" -HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PI; +HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PP; YY_BREAK case 31: YY_RULE_SETUP #line 73 "engines/hypno/lexer_mis.l" -HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PH; +HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PI; YY_BREAK case 32: YY_RULE_SETUP #line 74 "engines/hypno/lexer_mis.l" -HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PA; +HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PH; YY_BREAK case 33: YY_RULE_SETUP #line 75 "engines/hypno/lexer_mis.l" -HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PD; +HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PA; YY_BREAK case 34: YY_RULE_SETUP #line 76 "engines/hypno/lexer_mis.l" -HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PF; +HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PD; YY_BREAK case 35: YY_RULE_SETUP #line 77 "engines/hypno/lexer_mis.l" -return PE; +HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PF; YY_BREAK case 36: YY_RULE_SETUP #line 78 "engines/hypno/lexer_mis.l" -return PL; +return PE; YY_BREAK case 37: YY_RULE_SETUP #line 79 "engines/hypno/lexer_mis.l" -HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return GSSWITCH; +return PL; YY_BREAK case 38: YY_RULE_SETUP #line 80 "engines/hypno/lexer_mis.l" -return BBOXTOK; +HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return GSSWITCH; YY_BREAK case 39: YY_RULE_SETUP #line 81 "engines/hypno/lexer_mis.l" -HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return FLAG; +return BBOXTOK; YY_BREAK case 40: YY_RULE_SETUP #line 82 "engines/hypno/lexer_mis.l" -HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return NAME; +HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return FLAG; YY_BREAK case 41: YY_RULE_SETUP #line 83 "engines/hypno/lexer_mis.l" -HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return FILENAME; +HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return NAME; YY_BREAK case 42: YY_RULE_SETUP #line 84 "engines/hypno/lexer_mis.l" -HYPNO_MIS_lval.i = atoi(HYPNO_MIS_text); return NUM; +HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return FILENAME; YY_BREAK case 43: -/* rule 43 can match eol */ YY_RULE_SETUP #line 85 "engines/hypno/lexer_mis.l" -return RETTOK; +HYPNO_MIS_lval.i = atoi(HYPNO_MIS_text); return NUM; YY_BREAK case 44: +/* rule 44 can match eol */ YY_RULE_SETUP #line 86 "engines/hypno/lexer_mis.l" -/* ignore whitespace */; +return RETTOK; YY_BREAK case 45: YY_RULE_SETUP #line 87 "engines/hypno/lexer_mis.l" -debugC(1, Hypno::kHypnoDebugParser, "", *yytext); return *yytext; +/* ignore whitespace */; YY_BREAK case 46: YY_RULE_SETUP #line 88 "engines/hypno/lexer_mis.l" +debugC(1, Hypno::kHypnoDebugParser, "", *yytext); return *yytext; + YY_BREAK +case 47: +YY_RULE_SETUP +#line 89 "engines/hypno/lexer_mis.l" ECHO; YY_BREAK -#line 1394 "engines/hypno/lexer_mis.cpp" +#line 1401 "engines/hypno/lexer_mis.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1688,7 +1695,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 >= 144 ) + if ( yy_current_state >= 147 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -1716,11 +1723,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 >= 144 ) + if ( yy_current_state >= 147 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 143); + yy_is_jam = (yy_current_state == 146); return yy_is_jam ? 0 : yy_current_state; } @@ -2367,7 +2374,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 88 "engines/hypno/lexer_mis.l" +#line 89 "engines/hypno/lexer_mis.l" namespace Hypno { diff --git a/engines/hypno/lexer_mis.l b/engines/hypno/lexer_mis.l index 5e584a73ea3..4da468bf795 100644 --- a/engines/hypno/lexer_mis.l +++ b/engines/hypno/lexer_mis.l @@ -64,6 +64,7 @@ ESCAPE return ESCAPETOK; SECOND return SECONDTOK; INTRO return INTROTOK; INTR return INTRTOK; +SWPT return SWPTTOK; DEFAULT return DEFAULTTOK; WAL[0-1] HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return WALNTOK; \|S[A-Za-z_0-9\\\.]+ HYPNO_MIS_lval.s = scumm_strdup(HYPNO_MIS_text); return PS; diff --git a/engines/hypno/spider/spider.cpp b/engines/hypno/spider/spider.cpp index 2dbdbff5c39..7dea2ece188 100644 --- a/engines/hypno/spider/spider.cpp +++ b/engines/hypno/spider/spider.cpp @@ -75,7 +75,8 @@ void SpiderEngine::loadAssetsFullGame() { sc->hots[4].actions.push_back(cl); loadSceneLevel("bank.mi_", "", prefix); - //loadSceneLevel("busintro.mi_", "", prefix); + loadSceneLevel("busintro.mi_", "buspuz.mi_", prefix); + loadSceneLevel("buspuz.mi_", "", prefix); loadArcadeLevel("c1", "", "spider"); loadArcadeLevel("c2", "", "spider"); diff --git a/engines/hypno/tokens_mis.h b/engines/hypno/tokens_mis.h index ebfa8d9d9a0..fc601d5c87a 100644 --- a/engines/hypno/tokens_mis.h +++ b/engines/hypno/tokens_mis.h @@ -78,27 +78,28 @@ extern int HYPNO_MIS_debug; ESCPTOK = 280, NRTOK = 281, AMBITOK = 282, - GLOBTOK = 283, - TONTOK = 284, - TOFFTOK = 285, - TALKTOK = 286, - INACTOK = 287, - FDTOK = 288, - BOXXTOK = 289, - ESCAPETOK = 290, - SECONDTOK = 291, - INTROTOK = 292, - DEFAULTTOK = 293, - PG = 294, - PA = 295, - PD = 296, - PH = 297, - PF = 298, - PE = 299, - PP = 300, - PI = 301, - PL = 302, - PS = 303 + SWPTTOK = 283, + GLOBTOK = 284, + TONTOK = 285, + TOFFTOK = 286, + TALKTOK = 287, + INACTOK = 288, + FDTOK = 289, + BOXXTOK = 290, + ESCAPETOK = 291, + SECONDTOK = 292, + INTROTOK = 293, + DEFAULTTOK = 294, + PG = 295, + PA = 296, + PD = 297, + PH = 298, + PF = 299, + PE = 300, + PP = 301, + PI = 302, + PL = 303, + PS = 304 }; #endif @@ -112,7 +113,7 @@ union HYPNO_MIS_STYPE char *s; /* string value */ int i; /* integer value */ -#line 116 "engines/hypno/tokens_mis.h" /* yacc.c:1909 */ +#line 117 "engines/hypno/tokens_mis.h" /* yacc.c:1909 */ }; typedef union HYPNO_MIS_STYPE HYPNO_MIS_STYPE;