diff options
-rw-r--r-- | engines/director/lingo/lingo-builtins.cpp | 9 | ||||
-rw-r--r-- | engines/director/lingo/lingo-code.cpp | 2 | ||||
-rw-r--r-- | engines/director/lingo/lingo-gr.cpp | 1020 | ||||
-rw-r--r-- | engines/director/lingo/lingo-gr.h | 206 | ||||
-rw-r--r-- | engines/director/lingo/lingo-gr.y | 5 | ||||
-rw-r--r-- | engines/director/lingo/lingo-lex.cpp | 24 | ||||
-rw-r--r-- | engines/director/lingo/lingo-lex.l | 4 | ||||
-rw-r--r-- | engines/director/lingo/lingo.h | 2 | ||||
-rw-r--r-- | engines/director/lingo/tests/goto.lingo | 3 |
9 files changed, 665 insertions, 610 deletions
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp index 180e434a6c..c407e338bb 100644 --- a/engines/director/lingo/lingo-builtins.cpp +++ b/engines/director/lingo/lingo-builtins.cpp @@ -63,12 +63,14 @@ static struct BuiltinProto { { "do", Lingo::b_do, 1, 1, false }, { "nothing", Lingo::b_nothing, 0, 0, false }, { "pause", Lingo::b_pause, 0, 0, false }, + { "playAccel", Lingo::b_playAccel, -1,0, false }, // variable number of parameters // Misc { "alert", Lingo::b_alert, 1, 1, false }, { "cursor", Lingo::b_cursor, 1, 1, false }, { "editableText", Lingo::b_editableText, 0, 0, false }, { "installMenu", Lingo::b_installMenu, 1, 1, false }, { "moveableSprite", Lingo::b_moveableSprite,0, 0, false }, + { "printFrom", Lingo::b_printFrom, -1,0, false }, { "updatestage", Lingo::b_updatestage, 0, 0, false }, { "ilk", Lingo::b_ilk, 1, 2, true }, // Point @@ -333,6 +335,13 @@ void Lingo::b_pause() { warning("STUB: b_pause"); } +void Lingo::b_playAccel() { + warning("STUB: b_playAccel"); +} + +void Lingo::b_printFrom() { + warning("STUB: b_printFrom"); +} /////////////////// // Misc diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp index 779ddf768c..82640f85db 100644 --- a/engines/director/lingo/lingo-code.cpp +++ b/engines/director/lingo/lingo-code.cpp @@ -724,7 +724,7 @@ void Lingo::c_call() { } else { sym = g_lingo->_handlers[name]; - if (sym->type == BLTIN && sym->nargs != nargs && sym->maxArgs != nargs) { + if (sym->type == BLTIN && sym->nargs != -1 && sym->nargs != nargs && sym->maxArgs != nargs) { if (sym->nargs == sym->maxArgs) warning("Incorrect number of arguments to handler '%s', expecting %d. Dropping %d stack items", name.c_str(), sym->nargs, nargs); else diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp index 89cf48f3e2..a9b8dc69d9 100644 --- a/engines/director/lingo/lingo-gr.cpp +++ b/engines/director/lingo/lingo-gr.cpp @@ -82,56 +82,58 @@ BLTINNOARGS = 271, BLTINNOARGSORONE = 272, BLTINONEARG = 273, - ID = 274, - STRING = 275, - HANDLER = 276, - tDOWN = 277, - tELSE = 278, - tNLELSIF = 279, - tEND = 280, - tEXIT = 281, - tFRAME = 282, - tGLOBAL = 283, - tGO = 284, - tIF = 285, - tINTO = 286, - tLOOP = 287, - tMACRO = 288, - tMCI = 289, - tMCIWAIT = 290, - tMOVIE = 291, - tNEXT = 292, - tOF = 293, - tPREVIOUS = 294, - tPUT = 295, - tREPEAT = 296, - tSET = 297, - tTHEN = 298, - tTO = 299, - tWHEN = 300, - tWITH = 301, - tWHILE = 302, - tNLELSE = 303, - tFACTORY = 304, - tMETHOD = 305, - tOPEN = 306, - tPLAY = 307, - tDONE = 308, - tGE = 309, - tLE = 310, - tGT = 311, - tLT = 312, - tEQ = 313, - tNEQ = 314, - tAND = 315, - tOR = 316, - tNOT = 317, - tCONCAT = 318, - tCONTAINS = 319, - tSTARTS = 320, - tSPRITE = 321, - tINTERSECTS = 322, - tWITHIN = 323 + BLTINARGLIST = 274, + ID = 275, + STRING = 276, + HANDLER = 277, + tDOWN = 278, + tELSE = 279, + tNLELSIF = 280, + tEND = 281, + tEXIT = 282, + tFRAME = 283, + tGLOBAL = 284, + tGO = 285, + tIF = 286, + tINTO = 287, + tLOOP = 288, + tMACRO = 289, + tMCI = 290, + tMCIWAIT = 291, + tMOVIE = 292, + tNEXT = 293, + tOF = 294, + tPREVIOUS = 295, + tPUT = 296, + tREPEAT = 297, + tSET = 298, + tTHEN = 299, + tTO = 300, + tWHEN = 301, + tWITH = 302, + tWHILE = 303, + tNLELSE = 304, + tFACTORY = 305, + tMETHOD = 306, + tOPEN = 307, + tPLAY = 308, + tDONE = 309, + tPLAYACCEL = 310, + tGE = 311, + tLE = 312, + tGT = 313, + tLT = 314, + tEQ = 315, + tNEQ = 316, + tAND = 317, + tOR = 318, + tNOT = 319, + tCONCAT = 320, + tCONTAINS = 321, + tSTARTS = 322, + tSPRITE = 323, + tINTERSECTS = 324, + tWITHIN = 325 }; #endif /* Tokens. */ @@ -151,56 +153,58 @@ #define BLTINNOARGS 271 #define BLTINNOARGSORONE 272 #define BLTINONEARG 273 -#define ID 274 -#define STRING 275 -#define HANDLER 276 -#define tDOWN 277 -#define tELSE 278 -#define tNLELSIF 279 -#define tEND 280 -#define tEXIT 281 -#define tFRAME 282 -#define tGLOBAL 283 -#define tGO 284 -#define tIF 285 -#define tINTO 286 -#define tLOOP 287 -#define tMACRO 288 -#define tMCI 289 -#define tMCIWAIT 290 -#define tMOVIE 291 -#define tNEXT 292 -#define tOF 293 -#define tPREVIOUS 294 -#define tPUT 295 -#define tREPEAT 296 -#define tSET 297 -#define tTHEN 298 -#define tTO 299 -#define tWHEN 300 -#define tWITH 301 -#define tWHILE 302 -#define tNLELSE 303 -#define tFACTORY 304 -#define tMETHOD 305 -#define tOPEN 306 -#define tPLAY 307 -#define tDONE 308 -#define tGE 309 -#define tLE 310 -#define tGT 311 -#define tLT 312 -#define tEQ 313 -#define tNEQ 314 -#define tAND 315 -#define tOR 316 -#define tNOT 317 -#define tCONCAT 318 -#define tCONTAINS 319 -#define tSTARTS 320 -#define tSPRITE 321 -#define tINTERSECTS 322 -#define tWITHIN 323 +#define BLTINARGLIST 274 +#define ID 275 +#define STRING 276 +#define HANDLER 277 +#define tDOWN 278 +#define tELSE 279 +#define tNLELSIF 280 +#define tEND 281 +#define tEXIT 282 +#define tFRAME 283 +#define tGLOBAL 284 +#define tGO 285 +#define tIF 286 +#define tINTO 287 +#define tLOOP 288 +#define tMACRO 289 +#define tMCI 290 +#define tMCIWAIT 291 +#define tMOVIE 292 +#define tNEXT 293 +#define tOF 294 +#define tPREVIOUS 295 +#define tPUT 296 +#define tREPEAT 297 +#define tSET 298 +#define tTHEN 299 +#define tTO 300 +#define tWHEN 301 +#define tWITH 302 +#define tWHILE 303 +#define tNLELSE 304 +#define tFACTORY 305 +#define tMETHOD 306 +#define tOPEN 307 +#define tPLAY 308 +#define tDONE 309 +#define tPLAYACCEL 310 +#define tGE 311 +#define tLE 312 +#define tGT 313 +#define tLT 314 +#define tEQ 315 +#define tNEQ 316 +#define tAND 317 +#define tOR 318 +#define tNOT 319 +#define tCONCAT 320 +#define tCONTAINS 321 +#define tSTARTS 322 +#define tSPRITE 323 +#define tINTERSECTS 324 +#define tWITHIN 325 @@ -258,7 +262,7 @@ typedef union YYSTYPE Common::Array<double> *arr; } /* Line 193 of yacc.c. */ -#line 262 "engines/director/lingo/lingo-gr.cpp" +#line 266 "engines/director/lingo/lingo-gr.cpp" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -271,7 +275,7 @@ typedef union YYSTYPE /* Line 216 of yacc.c. */ -#line 275 "engines/director/lingo/lingo-gr.cpp" +#line 279 "engines/director/lingo/lingo-gr.cpp" #ifdef short # undef short @@ -484,22 +488,22 @@ union yyalloc #endif /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 88 +#define YYFINAL 91 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 748 +#define YYLAST 855 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 82 +#define YYNTOKENS 84 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 35 /* YYNRULES -- Number of rules. */ -#define YYNRULES 125 +#define YYNRULES 126 /* YYNRULES -- Number of states. */ -#define YYNSTATES 261 +#define YYNSTATES 263 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 323 +#define YYMAXUTOK 325 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -508,12 +512,12 @@ union yyalloc static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 75, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 77, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 74, 80, 2, - 76, 77, 72, 70, 81, 71, 2, 73, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 76, 82, 2, + 78, 79, 74, 72, 83, 73, 2, 75, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 79, 69, 78, 2, 2, 2, 2, 2, 2, 2, + 81, 71, 80, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -539,7 +543,7 @@ static const yytype_uint8 yytranslate[] = 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68 + 65, 66, 67, 68, 69, 70 }; #if YYDEBUG @@ -556,62 +560,62 @@ static const yytype_uint16 yyprhs[] = 246, 248, 251, 253, 257, 261, 265, 269, 273, 277, 281, 285, 289, 293, 297, 300, 304, 308, 312, 316, 319, 322, 326, 331, 336, 339, 342, 345, 347, 349, - 351, 354, 357, 360, 362, 367, 370, 372, 376, 379, - 382, 385, 388, 392, 395, 398, 400, 404, 407, 410, - 413, 417, 420, 421, 430, 433, 434, 443, 444, 446, - 450, 455, 456, 460, 461, 463 + 351, 354, 357, 360, 362, 365, 370, 373, 375, 379, + 382, 385, 388, 391, 395, 398, 401, 403, 407, 410, + 413, 416, 420, 423, 424, 433, 436, 437, 446, 447, + 449, 453, 458, 459, 463, 464, 466 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { - 83, 0, -1, 83, 84, 85, -1, 85, -1, 1, - 84, -1, 75, -1, -1, 110, -1, 104, -1, 115, - -1, 86, -1, 88, -1, 40, 103, 31, 19, -1, - 42, 19, 69, 103, -1, 42, 12, 69, 103, -1, - 42, 13, 103, 69, 103, -1, 42, 19, 44, 103, - -1, 42, 12, 44, 103, -1, 42, 13, 103, 44, - 103, -1, 103, -1, 104, -1, 87, -1, 89, -1, - 96, 76, 95, 77, 102, 101, 25, 41, -1, 97, - 69, 103, 101, 44, 103, 101, 102, 101, 25, 41, - -1, 97, 69, 103, 101, 22, 44, 103, 101, 102, - 101, 25, 41, -1, 45, 19, 43, 103, -1, 98, - 95, 43, 84, 102, 101, 25, 30, -1, 98, 95, - 43, 84, 102, 101, 48, 102, 101, 25, 30, -1, - 98, 95, 43, 84, 102, 101, 100, 91, 101, 25, - 30, -1, 98, 95, 43, 100, 87, 101, -1, 98, - 95, 43, 100, 87, 101, 48, 100, 87, 101, -1, - 98, 95, 43, 100, 87, 101, 92, 101, 90, 101, - -1, -1, 48, 100, 87, -1, 91, 94, -1, 94, - -1, 92, 93, -1, 93, -1, 99, 95, 43, 100, - 88, 101, -1, 92, -1, 99, 95, 43, 102, 101, - -1, 103, -1, 103, 69, 103, -1, 76, 95, 77, - -1, 41, 47, -1, 41, 46, 19, -1, 30, -1, - 24, -1, -1, -1, -1, 102, 84, -1, 102, 88, - -1, 11, -1, 14, -1, 20, -1, 16, -1, 19, - 76, 116, 77, -1, 19, -1, 12, -1, 13, 103, - -1, 86, -1, 103, 70, 103, -1, 103, 71, 103, - -1, 103, 72, 103, -1, 103, 73, 103, -1, 103, - 78, 103, -1, 103, 79, 103, -1, 103, 59, 103, - -1, 103, 54, 103, -1, 103, 55, 103, -1, 103, - 60, 103, -1, 103, 61, 103, -1, 62, 103, -1, - 103, 80, 103, -1, 103, 63, 103, -1, 103, 64, - 103, -1, 103, 65, 103, -1, 70, 103, -1, 71, - 103, -1, 76, 103, 77, -1, 66, 103, 67, 103, - -1, 66, 103, 68, 103, -1, 34, 20, -1, 35, - 19, -1, 40, 103, -1, 106, -1, 109, -1, 26, - -1, 28, 105, -1, 18, 103, -1, 17, 103, -1, - 17, -1, 51, 103, 46, 103, -1, 51, 103, -1, - 19, -1, 105, 81, 19, -1, 29, 32, -1, 29, - 37, -1, 29, 39, -1, 29, 107, -1, 29, 107, - 108, -1, 29, 108, -1, 27, 20, -1, 20, -1, - 38, 36, 20, -1, 36, 20, -1, 52, 53, -1, - 52, 107, -1, 52, 107, 108, -1, 52, 108, -1, - -1, 33, 19, 111, 100, 113, 84, 114, 102, -1, - 49, 19, -1, -1, 50, 19, 112, 100, 113, 84, - 114, 102, -1, -1, 19, -1, 113, 81, 19, -1, - 113, 84, 81, 19, -1, -1, 19, 100, 116, -1, - -1, 103, -1, 116, 81, 103, -1 + 85, 0, -1, 85, 86, 87, -1, 87, -1, 1, + 86, -1, 77, -1, -1, 112, -1, 106, -1, 117, + -1, 88, -1, 90, -1, 41, 105, 32, 20, -1, + 43, 20, 71, 105, -1, 43, 12, 71, 105, -1, + 43, 13, 105, 71, 105, -1, 43, 20, 45, 105, + -1, 43, 12, 45, 105, -1, 43, 13, 105, 45, + 105, -1, 105, -1, 106, -1, 89, -1, 91, -1, + 98, 78, 97, 79, 104, 103, 26, 42, -1, 99, + 71, 105, 103, 45, 105, 103, 104, 103, 26, 42, + -1, 99, 71, 105, 103, 23, 45, 105, 103, 104, + 103, 26, 42, -1, 46, 20, 44, 105, -1, 100, + 97, 44, 86, 104, 103, 26, 31, -1, 100, 97, + 44, 86, 104, 103, 49, 104, 103, 26, 31, -1, + 100, 97, 44, 86, 104, 103, 102, 93, 103, 26, + 31, -1, 100, 97, 44, 102, 89, 103, -1, 100, + 97, 44, 102, 89, 103, 49, 102, 89, 103, -1, + 100, 97, 44, 102, 89, 103, 94, 103, 92, 103, + -1, -1, 49, 102, 89, -1, 93, 96, -1, 96, + -1, 94, 95, -1, 95, -1, 101, 97, 44, 102, + 90, 103, -1, 94, -1, 101, 97, 44, 104, 103, + -1, 105, -1, 105, 71, 105, -1, 78, 97, 79, + -1, 42, 48, -1, 42, 47, 20, -1, 31, -1, + 25, -1, -1, -1, -1, 104, 86, -1, 104, 90, + -1, 11, -1, 14, -1, 21, -1, 16, -1, 20, + 78, 118, 79, -1, 20, -1, 12, -1, 13, 105, + -1, 88, -1, 105, 72, 105, -1, 105, 73, 105, + -1, 105, 74, 105, -1, 105, 75, 105, -1, 105, + 80, 105, -1, 105, 81, 105, -1, 105, 61, 105, + -1, 105, 56, 105, -1, 105, 57, 105, -1, 105, + 62, 105, -1, 105, 63, 105, -1, 64, 105, -1, + 105, 82, 105, -1, 105, 65, 105, -1, 105, 66, + 105, -1, 105, 67, 105, -1, 72, 105, -1, 73, + 105, -1, 78, 105, 79, -1, 68, 105, 69, 105, + -1, 68, 105, 70, 105, -1, 35, 21, -1, 36, + 20, -1, 41, 105, -1, 108, -1, 111, -1, 27, + -1, 29, 107, -1, 18, 105, -1, 17, 105, -1, + 17, -1, 19, 118, -1, 52, 105, 47, 105, -1, + 52, 105, -1, 20, -1, 107, 83, 20, -1, 30, + 33, -1, 30, 38, -1, 30, 40, -1, 30, 109, + -1, 30, 109, 110, -1, 30, 110, -1, 28, 21, + -1, 21, -1, 39, 37, 21, -1, 37, 21, -1, + 53, 54, -1, 53, 109, -1, 53, 109, 110, -1, + 53, 110, -1, -1, 34, 20, 113, 102, 115, 86, + 116, 104, -1, 50, 20, -1, -1, 51, 20, 114, + 102, 115, 86, 116, 104, -1, -1, 20, -1, 115, + 83, 20, -1, 115, 86, 83, 20, -1, -1, 20, + 102, 118, -1, -1, 105, -1, 118, 83, 105, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ @@ -626,10 +630,10 @@ static const yytype_uint16 yyrline[] = 362, 369, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 399, 400, 401, 402, 403, 404, - 406, 407, 410, 413, 416, 417, 420, 421, 432, 433, - 434, 435, 440, 446, 453, 454, 457, 458, 461, 462, - 467, 473, 505, 505, 511, 514, 514, 520, 521, 522, - 523, 525, 529, 537, 538, 539 + 406, 407, 410, 413, 416, 417, 418, 421, 422, 433, + 434, 435, 436, 441, 447, 454, 455, 458, 459, 462, + 463, 468, 474, 506, 506, 512, 515, 515, 521, 522, + 523, 524, 526, 530, 538, 539, 540 }; #endif @@ -641,20 +645,21 @@ static const char *const yytname[] = "$end", "error", "$undefined", "UNARY", "CASTREF", "VOID", "VAR", "POINT", "RECT", "ARRAY", "SYMBOL", "INT", "THEENTITY", "THEENTITYWITHID", "FLOAT", "BLTIN", "BLTINNOARGS", "BLTINNOARGSORONE", - "BLTINONEARG", "ID", "STRING", "HANDLER", "tDOWN", "tELSE", "tNLELSIF", - "tEND", "tEXIT", "tFRAME", "tGLOBAL", "tGO", "tIF", "tINTO", "tLOOP", - "tMACRO", "tMCI", "tMCIWAIT", "tMOVIE", "tNEXT", "tOF", "tPREVIOUS", - "tPUT", "tREPEAT", "tSET", "tTHEN", "tTO", "tWHEN", "tWITH", "tWHILE", - "tNLELSE", "tFACTORY", "tMETHOD", "tOPEN", "tPLAY", "tDONE", "tGE", - "tLE", "tGT", "tLT", "tEQ", "tNEQ", "tAND", "tOR", "tNOT", "tCONCAT", - "tCONTAINS", "tSTARTS", "tSPRITE", "tINTERSECTS", "tWITHIN", "'='", - "'+'", "'-'", "'*'", "'/'", "'%'", "'\\n'", "'('", "')'", "'>'", "'<'", - "'&'", "','", "$accept", "program", "nl", "programline", "asgn", - "stmtoneliner", "stmt", "ifstmt", "elsestmtoneliner", "elseifstmt", - "elseifstmtoneliner", "elseifstmtoneliner1", "elseifstmt1", "cond", - "repeatwhile", "repeatwith", "if", "elseif", "begin", "end", "stmtlist", - "expr", "func", "globallist", "gotofunc", "gotoframe", "gotomovie", - "playfunc", "defn", "@1", "@2", "argdef", "argstore", "macro", "arglist", 0 + "BLTINONEARG", "BLTINARGLIST", "ID", "STRING", "HANDLER", "tDOWN", + "tELSE", "tNLELSIF", "tEND", "tEXIT", "tFRAME", "tGLOBAL", "tGO", "tIF", + "tINTO", "tLOOP", "tMACRO", "tMCI", "tMCIWAIT", "tMOVIE", "tNEXT", "tOF", + "tPREVIOUS", "tPUT", "tREPEAT", "tSET", "tTHEN", "tTO", "tWHEN", "tWITH", + "tWHILE", "tNLELSE", "tFACTORY", "tMETHOD", "tOPEN", "tPLAY", "tDONE", + "tPLAYACCEL", "tGE", "tLE", "tGT", "tLT", "tEQ", "tNEQ", "tAND", "tOR", + "tNOT", "tCONCAT", "tCONTAINS", "tSTARTS", "tSPRITE", "tINTERSECTS", + "tWITHIN", "'='", "'+'", "'-'", "'*'", "'/'", "'%'", "'\\n'", "'('", + "')'", "'>'", "'<'", "'&'", "','", "$accept", "program", "nl", + "programline", "asgn", "stmtoneliner", "stmt", "ifstmt", + "elsestmtoneliner", "elseifstmt", "elseifstmtoneliner", + "elseifstmtoneliner1", "elseifstmt1", "cond", "repeatwhile", + "repeatwith", "if", "elseif", "begin", "end", "stmtlist", "expr", "func", + "globallist", "gotofunc", "gotoframe", "gotomovie", "playfunc", "defn", + "@1", "@2", "argdef", "argstore", "macro", "arglist", 0 }; #endif @@ -669,28 +674,28 @@ static const yytype_uint16 yytoknum[] = 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 61, - 43, 45, 42, 47, 37, 10, 40, 41, 62, 60, - 38, 44 + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 61, 43, 45, 42, 47, 37, 10, 40, 41, + 62, 60, 38, 44 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { - 0, 82, 83, 83, 83, 84, 85, 85, 85, 85, - 85, 85, 86, 86, 86, 86, 86, 86, 86, 87, - 87, 88, 88, 88, 88, 88, 88, 89, 89, 89, - 89, 89, 89, 90, 90, 91, 91, 92, 92, 93, - 94, 94, 95, 95, 95, 96, 97, 98, 99, 100, - 101, 102, 102, 102, 103, 103, 103, 103, 103, 103, - 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, - 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, - 103, 103, 103, 103, 104, 104, 104, 104, 104, 104, - 104, 104, 104, 104, 104, 104, 105, 105, 106, 106, - 106, 106, 106, 106, 107, 107, 108, 108, 109, 109, - 109, 109, 111, 110, 110, 112, 110, 113, 113, 113, - 113, 114, 115, 116, 116, 116 + 0, 84, 85, 85, 85, 86, 87, 87, 87, 87, + 87, 87, 88, 88, 88, 88, 88, 88, 88, 89, + 89, 90, 90, 90, 90, 90, 90, 91, 91, 91, + 91, 91, 91, 92, 92, 93, 93, 94, 94, 95, + 96, 96, 97, 97, 97, 98, 99, 100, 101, 102, + 103, 104, 104, 104, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 106, 106, 106, 106, 106, 106, + 106, 106, 106, 106, 106, 106, 106, 107, 107, 108, + 108, 108, 108, 108, 108, 109, 109, 110, 110, 111, + 111, 111, 111, 113, 112, 112, 114, 112, 115, 115, + 115, 115, 116, 117, 118, 118, 118 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -705,10 +710,10 @@ static const yytype_uint8 yyr2[] = 1, 2, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 2, 2, 3, 4, 4, 2, 2, 2, 1, 1, 1, - 2, 2, 2, 1, 4, 2, 1, 3, 2, 2, - 2, 2, 3, 2, 2, 1, 3, 2, 2, 2, - 3, 2, 0, 8, 2, 0, 8, 0, 1, 3, - 4, 0, 3, 0, 1, 3 + 2, 2, 2, 1, 2, 4, 2, 1, 3, 2, + 2, 2, 2, 3, 2, 2, 1, 3, 2, 2, + 2, 3, 2, 0, 8, 2, 0, 8, 0, 1, + 3, 4, 0, 3, 0, 1, 3 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -716,85 +721,85 @@ static const yytype_uint8 yyr2[] = means the default is an error. */ static const yytype_uint8 yydefact[] = { - 0, 0, 54, 60, 0, 55, 57, 93, 0, 49, - 56, 89, 0, 0, 47, 0, 0, 0, 0, 0, + 0, 0, 54, 60, 0, 55, 57, 93, 0, 124, + 49, 56, 89, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 3, 62, 21, 11, 22, 0, 0, 0, - 19, 8, 87, 88, 7, 9, 5, 4, 59, 0, - 62, 61, 92, 91, 123, 123, 96, 90, 105, 0, - 98, 0, 99, 0, 100, 101, 103, 112, 84, 85, - 86, 0, 45, 0, 0, 0, 0, 114, 115, 95, - 108, 109, 111, 74, 0, 79, 80, 0, 1, 6, - 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, + 0, 0, 0, 3, 62, 21, 11, 22, 0, 0, + 0, 19, 8, 87, 88, 7, 9, 5, 4, 59, + 0, 62, 61, 92, 91, 125, 94, 124, 124, 97, + 90, 106, 0, 99, 0, 100, 0, 101, 102, 104, + 113, 84, 85, 86, 0, 45, 0, 0, 0, 0, + 115, 116, 96, 109, 110, 112, 74, 0, 79, 80, + 0, 1, 6, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 124, 0, 122, 0, 104, 107, 0, 102, 49, - 0, 46, 0, 0, 0, 0, 0, 0, 49, 0, - 110, 0, 0, 81, 2, 0, 50, 0, 0, 49, - 0, 70, 71, 69, 72, 73, 76, 77, 78, 63, - 64, 65, 66, 67, 68, 75, 58, 0, 97, 106, - 117, 12, 17, 14, 0, 0, 16, 13, 26, 117, - 94, 82, 83, 51, 0, 44, 51, 0, 43, 125, - 118, 0, 18, 15, 0, 50, 0, 0, 50, 50, - 20, 0, 121, 121, 52, 53, 0, 0, 50, 49, - 30, 119, 0, 51, 51, 0, 50, 51, 0, 51, - 0, 48, 49, 50, 38, 0, 120, 113, 116, 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, 0, 0, 0, 0, 123, 0, 105, 108, + 0, 103, 49, 0, 46, 0, 0, 0, 0, 0, + 0, 49, 0, 111, 0, 0, 81, 2, 0, 50, + 0, 0, 49, 0, 70, 71, 69, 72, 73, 76, + 77, 78, 63, 64, 65, 66, 67, 68, 75, 126, + 58, 98, 107, 118, 12, 17, 14, 0, 0, 16, + 13, 26, 118, 95, 82, 83, 51, 0, 44, 51, + 0, 43, 119, 0, 18, 15, 0, 50, 0, 0, + 50, 50, 20, 0, 122, 122, 52, 53, 0, 0, + 50, 49, 30, 120, 0, 51, 51, 0, 50, 51, + 0, 51, 0, 48, 49, 50, 38, 0, 121, 114, + 117, 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 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 31, 194, 32, 50, 34, 195, 36, 240, 224, - 225, 214, 226, 93, 37, 38, 39, 215, 250, 174, - 185, 40, 190, 57, 42, 65, 66, 43, 44, 119, - 128, 181, 203, 45, 112 + -1, 32, 196, 33, 51, 35, 197, 37, 242, 226, + 227, 216, 228, 96, 38, 39, 40, 217, 252, 177, + 187, 41, 192, 60, 43, 68, 69, 44, 45, 122, + 131, 183, 205, 46, 56 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -190 +#define YYPACT_NINF -197 static const yytype_int16 yypact[] = { - 206, -53, -190, -190, 478, -190, -190, 478, 478, 117, - -190, -190, 5, 49, -190, 14, 37, 41, 478, 67, - 59, 46, 51, 54, 478, 26, 478, 478, 478, 478, - 478, 2, -190, 7, -190, -190, -190, 4, -1, 539, - 646, -190, -190, -190, -190, -190, -190, -190, 18, 478, - -190, 646, 646, 646, 478, 478, -190, 9, -190, 63, - -190, 95, -190, 80, -190, 25, -190, -190, -190, -190, - 90, 98, -190, -31, 478, -26, 75, -190, -190, 232, - -190, 25, -190, 311, 575, 311, 311, 597, -190, 307, - 539, 478, 539, 76, 624, 478, 478, 478, 478, 478, - 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, - 90, 646, -29, 44, 103, -190, -190, 109, -190, -190, - 115, -190, 478, 478, 553, 478, 478, 478, -190, 478, - -190, 478, 478, -190, -190, 60, 646, 61, 513, -53, - 478, 646, 646, 646, 646, 646, 646, 646, 646, 668, - 668, 311, 311, 646, 646, 646, -190, 478, -190, -190, - 120, -190, 646, 646, 478, 478, 646, 646, 646, 120, - 646, 646, 646, -190, -5, -190, -190, 495, 646, 646, - -190, -49, 646, 646, -49, 368, 92, 478, 368, -190, - -190, 121, 62, 62, -190, -190, 123, 478, 646, 11, - -4, -190, 127, -190, -190, 111, 646, -190, 126, -190, - 133, -190, -190, 133, -190, 539, -190, 368, 368, -190, - -190, 368, -190, 368, 133, 133, -190, 539, 495, -190, - 116, 124, 368, 134, 148, -190, 149, 132, -190, -190, - -190, -190, 154, 142, 155, 156, -9, -190, 495, -190, - 434, 151, -190, -190, -190, 368, -190, -190, -190, -190, - -190 + 248, -51, -197, -197, 169, -197, -197, 169, 169, 169, + 49, -197, -197, 18, 178, -197, 32, 2, 37, 169, + 14, 15, 39, 44, 45, 169, -7, 169, 169, 169, + 169, 169, 6, -197, 7, -197, -197, -197, -2, 4, + 394, 729, -197, -197, -197, -197, -197, -197, -197, -1, + 169, -197, 729, 729, 729, 729, 11, 169, 169, -197, + 13, -197, 59, -197, 61, -197, 48, -197, 17, -197, + -197, -197, -197, 556, 66, -197, -30, 169, -28, 43, + -197, -197, 609, -197, 17, -197, 773, 631, 773, 773, + 680, -197, 348, 394, 169, 394, 46, 707, 169, 169, + 169, 169, 169, 169, 169, 169, 169, 169, 169, 169, + 169, 169, 169, 556, 169, -54, 11, 68, -197, -197, + 72, -197, -197, 69, -197, 169, 169, 587, 169, 169, + 169, -197, 169, -197, 169, 169, -197, -197, 21, 729, + 22, 653, -51, 169, 729, 729, 729, 729, 729, 729, + 729, 729, 751, 751, 773, 773, 729, 729, 729, 729, + -197, -197, -197, 82, -197, 729, 729, 169, 169, 729, + 729, 729, 82, 729, 729, 729, -197, 10, -197, -197, + 542, 729, -197, -59, 729, 729, -59, 411, 58, 169, + 411, -197, -197, 84, 24, 24, -197, -197, 83, 169, + 729, -10, -3, -197, 88, -197, -197, 75, 729, -197, + 89, -197, 94, -197, -197, 94, -197, 394, -197, 411, + 411, -197, -197, 411, -197, 411, 94, 94, -197, 394, + 542, -197, 76, 77, 411, 102, 106, -197, 111, 112, + -197, -197, -197, -197, 131, 116, 128, 129, -14, -197, + 542, -197, 479, 119, -197, -197, -197, 411, -197, -197, + -197, -197, -197 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -190, -190, 3, 105, 6, -174, 0, -190, -190, -190, - 8, -176, -25, -80, -190, -190, -190, -189, -8, 77, - -162, 1, 23, -190, -190, 175, -14, -190, -190, -190, - -190, 32, 10, -190, 147 + -197, -197, 12, 70, 3, -172, 0, -197, -197, -197, + -39, -196, -62, -91, -197, -197, -197, -192, -9, 115, + -169, 41, 5, -197, -197, 139, -17, -197, -197, -197, + -197, -4, -23, -197, 16 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -804,160 +809,182 @@ static const yytype_int16 yypgoto[] = #define YYTABLE_NINF -60 static const yytype_int16 yytable[] = { - 35, 55, 88, 189, 47, 51, 33, -10, 52, 53, - 135, 82, 137, 122, 188, -51, -51, 186, 125, 70, - 211, 227, 46, 41, 56, 79, 46, 83, 84, 85, - 86, 87, 191, 67, 89, 227, 208, 229, 123, 187, - 94, 217, 218, 126, 212, 221, 58, 223, 156, 229, - 110, 118, 157, 59, 238, 111, 111, 68, 232, 209, - 69, 61, 61, 63, 63, 76, -51, 130, 91, 58, - 77, 73, 74, 78, 256, 124, 59, 46, 75, 80, - 90, 60, -10, 115, 255, 61, 62, 63, 64, 35, - 114, 94, 136, 138, 54, 33, 141, 142, 143, 144, + 36, 58, 138, 34, 140, 42, 91, -10, 191, 85, + 190, -51, -51, 48, 61, 125, 210, 128, 47, 231, + 229, 62, 213, 71, 193, 160, 47, 76, 77, 114, + 64, 231, 66, 188, 229, 78, 219, 220, 59, 211, + 223, 126, 225, 129, 92, 52, 214, 83, 53, 54, + 55, 121, 70, 234, 64, 189, 66, 72, 240, 79, + 73, 74, 75, -51, 80, 81, 82, 133, 86, 87, + 88, 89, 90, 115, 116, 94, 93, 57, 258, 257, + 118, 97, 119, 47, -10, 120, 124, 130, 161, 164, + 142, 113, 36, 162, 114, 34, 117, 42, 55, 55, + 176, 178, 182, 199, 203, -59, -59, 204, 218, 207, + -59, -59, -59, 163, -59, -59, -59, 221, 127, 213, + 224, 243, 172, -59, -59, 241, 233, 57, 245, -59, + -59, -59, 246, 180, 97, 139, 141, 247, 239, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, - 155, 160, 41, 71, 72, 116, 117, 121, 127, 139, - 169, 120, 158, 162, 163, 157, 166, 167, 168, 159, - 170, 177, 171, 172, 161, 231, 197, 173, 175, 180, - 201, 178, 176, 202, 95, 96, 216, 237, 205, 97, - 98, 99, 219, 100, 101, 102, 222, 211, 179, 243, - 103, 104, 105, 106, 239, 182, 183, 241, 107, 108, - 109, -59, -59, 244, 245, 246, -59, -59, -59, 251, - -59, -59, -59, 252, 192, 253, 254, 193, 198, -59, - -59, 210, 258, 54, 134, -59, -59, -59, 206, 235, - 81, 184, 113, 204, 228, 0, -6, 1, 213, 0, - 0, 0, 0, 0, 0, 0, 94, 2, 3, 4, - 5, 0, 6, 7, 8, 9, 10, 0, 94, 0, - 0, 248, 11, 0, 12, 13, 14, 0, 0, 15, - 16, 17, 0, 0, 0, 0, 18, 19, 20, 0, - 257, 21, 0, 0, 0, 22, 23, 24, 25, 0, - 0, 0, 196, 0, 0, 199, 200, 0, 26, 0, - 0, 0, 27, 0, 0, 207, 28, 29, 129, 0, - 0, -6, 30, 220, 0, 0, 95, 96, 0, 0, - 230, 97, 98, 99, 0, 100, 101, 102, 233, 0, - 234, 236, 103, 104, 105, 106, 0, 0, 0, 242, - 107, 108, 109, 0, 0, 247, 0, 249, 2, 3, - 4, 5, 0, 6, 7, 8, 9, 10, 0, 0, - 0, 0, 259, 11, 260, 12, 13, 14, 0, 0, - 15, 16, 17, 0, 0, 0, 0, 18, 19, 20, - 0, 0, 21, 0, 0, 0, 22, 23, 24, 25, - 0, 0, 0, 0, 0, 95, 96, 0, 0, 26, - 97, 98, 99, 27, 100, 101, 102, 28, 29, 2, - 3, 4, 5, 30, 6, 7, 8, 48, 10, 107, - 108, 109, 0, 0, 11, 0, 12, 13, 14, 0, - 0, 0, 16, 17, 0, 0, 0, 0, 18, 19, - 20, 0, 0, 21, 0, 0, 0, 0, 0, 24, - 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 26, 0, 0, 0, 27, 0, 0, 0, 28, 29, - 0, 0, 0, 46, 30, 2, 3, 4, 5, 0, - 6, 7, 8, 48, 10, 0, 0, 0, 0, 0, - 11, 0, 12, 13, 14, 0, 0, 0, 16, 17, - 0, 0, 0, 0, 18, 19, 20, 0, 0, 21, - 0, 0, 0, 0, 0, 24, 25, 0, 0, 2, - 3, 4, 5, 0, 6, 0, 26, 48, 10, 0, - 27, 0, 0, 0, 28, 29, 2, 3, 4, 5, - 30, 6, 7, 8, 48, 10, 0, 0, 49, 0, - 20, 11, 0, 12, 13, 0, 0, 0, 0, 16, - 17, 0, 0, 0, 0, 18, 0, 20, 0, 0, - 26, 0, 0, 0, 27, 0, 24, 25, 28, 29, - 2, 3, 4, 5, 30, 6, 0, 26, 48, 10, - 0, 27, 0, 0, 0, 28, 29, 95, 96, 0, - 0, 30, 97, 98, 99, 0, 100, 101, 102, 49, - 0, 20, 140, 103, 104, 105, 106, 0, 0, 0, - 133, 107, 108, 109, 0, 0, 0, 164, 0, 0, - 0, 26, 0, 0, 0, 27, 0, 95, 96, 28, - 29, 0, 97, 98, 99, 92, 100, 101, 102, 0, - 0, 0, 165, 103, 104, 105, 106, 0, 0, 95, - 96, 107, 108, 109, 97, 98, 99, 0, 100, 101, - 102, 0, 131, 132, 0, 103, 104, 105, 106, 0, - 0, 95, 96, 107, 108, 109, 97, 98, 99, 0, - 100, 101, 102, 0, 0, 0, 0, 103, 104, 105, - 106, 0, 0, 0, 133, 107, 108, 109, 95, 96, - 0, 0, 0, 97, 98, 99, 0, 100, 101, 102, - 0, 0, 0, 140, 103, 104, 105, 106, 0, 0, - 95, 96, 107, 108, 109, 97, 98, 99, 0, 100, - 101, 102, 0, 0, 0, 0, 103, 104, 105, 106, - 0, 0, 95, 96, 107, 108, 109, 97, 98, 99, - 0, 100, 101, 102, 0, 0, 0, 0, 0, 0, - 105, 106, 0, 0, 0, 0, 107, 108, 109 + 155, 156, 157, 158, 179, 159, 248, 253, 254, 255, + 256, 260, 137, 215, 237, 84, 165, 166, 186, 169, + 170, 171, 206, 173, 0, 174, 175, 0, 0, 0, + 2, 3, 4, 5, 181, 6, 0, 0, 0, 49, + 11, 0, 212, 0, 0, 194, 0, 0, 195, 61, + 0, 0, 0, 0, 0, 230, 62, 0, 184, 185, + 50, 63, 21, 0, 0, 64, 65, 66, 67, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 200, 0, 250, 27, 0, 0, 0, 28, 0, 0, + 208, 29, 30, 0, 0, 0, 0, 31, -6, 1, + 0, 0, 259, 0, 0, 0, 0, 0, 97, 2, + 3, 4, 5, 0, 6, 7, 8, 9, 10, 11, + 97, 0, 0, 0, 0, 12, 0, 13, 14, 15, + 0, 0, 16, 17, 18, 0, 0, 0, 0, 19, + 20, 21, 0, 0, 22, 0, 0, 0, 23, 24, + 25, 26, 198, 0, 0, 201, 202, 0, 0, 0, + 0, 0, 27, 0, 0, 209, 28, 0, 0, 0, + 29, 30, 0, 222, 0, -6, 31, 0, 0, 0, + 232, 0, 0, 0, 0, 0, 0, 0, 235, 0, + 236, 238, 0, 0, 0, 0, 0, 0, 0, 244, + 0, 0, 0, 0, 0, 249, 0, 251, 0, 2, + 3, 4, 5, 0, 6, 7, 8, 9, 10, 11, + 0, 0, 261, 0, 262, 12, 0, 13, 14, 15, + 0, 0, 16, 17, 18, 0, 0, 0, 0, 19, + 20, 21, 0, 0, 22, 0, 0, 0, 23, 24, + 25, 26, 0, 0, 0, 2, 3, 4, 5, 0, + 6, 0, 27, 0, 49, 11, 28, 0, 0, 0, + 29, 30, 2, 3, 4, 5, 31, 6, 7, 8, + 9, 49, 11, 0, 0, 50, 0, 21, 12, 0, + 13, 14, 15, 0, 0, 0, 17, 18, 0, 0, + 0, 0, 19, 20, 21, 0, 0, 22, 27, 0, + 0, 0, 28, 25, 26, 0, 29, 30, 0, 0, + 0, 0, 95, 0, 0, 27, 0, 0, 0, 28, + 0, 0, 0, 29, 30, 0, 0, 0, 47, 31, + 2, 3, 4, 5, 0, 6, 7, 8, 9, 49, + 11, 0, 0, 0, 0, 0, 12, 0, 13, 14, + 15, 0, 0, 0, 17, 18, 0, 0, 0, 0, + 19, 20, 21, 0, 0, 22, 0, 0, 0, 0, + 0, 25, 26, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 27, 0, 0, 0, 28, 0, 0, + 0, 29, 30, 2, 3, 4, 5, 31, 6, 7, + 8, 9, 49, 11, 0, 0, 0, 0, 0, 12, + 0, 13, 14, 0, 0, 0, 0, 17, 18, 0, + 0, 0, 0, 19, 0, 21, 0, 0, 123, 0, + 0, 0, 0, 0, 25, 26, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, + 28, 0, 98, 99, 29, 30, 0, 100, 101, 102, + 31, 103, 104, 105, 0, 0, 0, 0, 106, 107, + 108, 109, 167, 0, 0, 0, 110, 111, 112, 0, + 0, 0, 0, 98, 99, 0, 0, 0, 100, 101, + 102, 0, 103, 104, 105, 0, 132, 0, 168, 106, + 107, 108, 109, 0, 0, 98, 99, 110, 111, 112, + 100, 101, 102, 0, 103, 104, 105, 0, 0, 0, + 0, 106, 107, 108, 109, 0, 0, 98, 99, 110, + 111, 112, 100, 101, 102, 0, 103, 104, 105, 0, + 134, 135, 0, 106, 107, 108, 109, 0, 0, 98, + 99, 110, 111, 112, 100, 101, 102, 0, 103, 104, + 105, 0, 0, 0, 143, 106, 107, 108, 109, 0, + 0, 0, 136, 110, 111, 112, 98, 99, 0, 0, + 0, 100, 101, 102, 0, 103, 104, 105, 0, 0, + 0, 0, 106, 107, 108, 109, 0, 0, 0, 136, + 110, 111, 112, 98, 99, 0, 0, 0, 100, 101, + 102, 0, 103, 104, 105, 0, 0, 0, 143, 106, + 107, 108, 109, 0, 0, 98, 99, 110, 111, 112, + 100, 101, 102, 0, 103, 104, 105, 0, 0, 0, + 0, 106, 107, 108, 109, 0, 0, 98, 99, 110, + 111, 112, 100, 101, 102, 0, 103, 104, 105, 0, + 0, 0, 0, 0, 0, 108, 109, 0, 0, 98, + 99, 110, 111, 112, 100, 101, 102, 0, 103, 104, + 105, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 110, 111, 112 }; static const yytype_int16 yycheck[] = { - 0, 9, 0, 177, 1, 4, 0, 0, 7, 8, - 90, 25, 92, 44, 176, 24, 25, 22, 44, 18, - 24, 210, 75, 0, 19, 24, 75, 26, 27, 28, - 29, 30, 81, 19, 31, 224, 25, 213, 69, 44, - 39, 203, 204, 69, 48, 207, 20, 209, 77, 225, - 49, 65, 81, 27, 228, 54, 55, 20, 220, 48, - 19, 36, 36, 38, 38, 19, 75, 81, 69, 20, - 19, 12, 13, 19, 248, 74, 27, 75, 19, 53, - 76, 32, 75, 20, 246, 36, 37, 38, 39, 89, - 81, 90, 91, 92, 76, 89, 95, 96, 97, 98, + 0, 10, 93, 0, 95, 0, 0, 0, 180, 26, + 179, 25, 26, 1, 21, 45, 26, 45, 77, 215, + 212, 28, 25, 21, 83, 79, 77, 12, 13, 83, + 37, 227, 39, 23, 226, 20, 205, 206, 20, 49, + 209, 71, 211, 71, 32, 4, 49, 54, 7, 8, + 9, 68, 20, 222, 37, 45, 39, 20, 230, 20, + 19, 47, 48, 77, 20, 20, 25, 84, 27, 28, + 29, 30, 31, 57, 58, 71, 78, 78, 250, 248, + 21, 40, 21, 77, 77, 37, 20, 44, 20, 20, + 44, 50, 92, 21, 83, 92, 83, 92, 57, 58, + 79, 79, 20, 45, 20, 56, 57, 83, 20, 26, + 61, 62, 63, 122, 65, 66, 67, 42, 77, 25, + 31, 44, 131, 74, 75, 49, 217, 78, 26, 80, + 81, 82, 26, 142, 93, 94, 95, 26, 229, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 119, 89, 46, 47, 20, 36, 19, 43, 43, - 128, 31, 19, 122, 123, 81, 125, 126, 127, 20, - 129, 139, 131, 132, 19, 215, 44, 77, 77, 19, - 19, 140, 139, 81, 54, 55, 19, 227, 25, 59, - 60, 61, 41, 63, 64, 65, 30, 24, 157, 25, - 70, 71, 72, 73, 48, 164, 165, 43, 78, 79, - 80, 54, 55, 25, 25, 43, 59, 60, 61, 25, - 63, 64, 65, 41, 181, 30, 30, 184, 187, 72, - 73, 199, 41, 76, 89, 78, 79, 80, 197, 224, - 25, 169, 55, 193, 212, -1, 0, 1, 200, -1, - -1, -1, -1, -1, -1, -1, 215, 11, 12, 13, - 14, -1, 16, 17, 18, 19, 20, -1, 227, -1, - -1, 239, 26, -1, 28, 29, 30, -1, -1, 33, - 34, 35, -1, -1, -1, -1, 40, 41, 42, -1, - 250, 45, -1, -1, -1, 49, 50, 51, 52, -1, - -1, -1, 185, -1, -1, 188, 189, -1, 62, -1, - -1, -1, 66, -1, -1, 198, 70, 71, 46, -1, - -1, 75, 76, 206, -1, -1, 54, 55, -1, -1, - 213, 59, 60, 61, -1, 63, 64, 65, 221, -1, - 223, 224, 70, 71, 72, 73, -1, -1, -1, 232, - 78, 79, 80, -1, -1, 238, -1, 240, 11, 12, - 13, 14, -1, 16, 17, 18, 19, 20, -1, -1, - -1, -1, 255, 26, 257, 28, 29, 30, -1, -1, - 33, 34, 35, -1, -1, -1, -1, 40, 41, 42, - -1, -1, 45, -1, -1, -1, 49, 50, 51, 52, - -1, -1, -1, -1, -1, 54, 55, -1, -1, 62, - 59, 60, 61, 66, 63, 64, 65, 70, 71, 11, - 12, 13, 14, 76, 16, 17, 18, 19, 20, 78, - 79, 80, -1, -1, 26, -1, 28, 29, 30, -1, - -1, -1, 34, 35, -1, -1, -1, -1, 40, 41, - 42, -1, -1, 45, -1, -1, -1, -1, -1, 51, - 52, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 62, -1, -1, -1, 66, -1, -1, -1, 70, 71, - -1, -1, -1, 75, 76, 11, 12, 13, 14, -1, - 16, 17, 18, 19, 20, -1, -1, -1, -1, -1, - 26, -1, 28, 29, 30, -1, -1, -1, 34, 35, - -1, -1, -1, -1, 40, 41, 42, -1, -1, 45, - -1, -1, -1, -1, -1, 51, 52, -1, -1, 11, - 12, 13, 14, -1, 16, -1, 62, 19, 20, -1, - 66, -1, -1, -1, 70, 71, 11, 12, 13, 14, - 76, 16, 17, 18, 19, 20, -1, -1, 40, -1, - 42, 26, -1, 28, 29, -1, -1, -1, -1, 34, - 35, -1, -1, -1, -1, 40, -1, 42, -1, -1, - 62, -1, -1, -1, 66, -1, 51, 52, 70, 71, - 11, 12, 13, 14, 76, 16, -1, 62, 19, 20, - -1, 66, -1, -1, -1, 70, 71, 54, 55, -1, - -1, 76, 59, 60, 61, -1, 63, 64, 65, 40, - -1, 42, 69, 70, 71, 72, 73, -1, -1, -1, - 77, 78, 79, 80, -1, -1, -1, 44, -1, -1, - -1, 62, -1, -1, -1, 66, -1, 54, 55, 70, - 71, -1, 59, 60, 61, 76, 63, 64, 65, -1, - -1, -1, 69, 70, 71, 72, 73, -1, -1, 54, - 55, 78, 79, 80, 59, 60, 61, -1, 63, 64, - 65, -1, 67, 68, -1, 70, 71, 72, 73, -1, - -1, 54, 55, 78, 79, 80, 59, 60, 61, -1, - 63, 64, 65, -1, -1, -1, -1, 70, 71, 72, - 73, -1, -1, -1, 77, 78, 79, 80, 54, 55, - -1, -1, -1, 59, 60, 61, -1, 63, 64, 65, - -1, -1, -1, 69, 70, 71, 72, 73, -1, -1, - 54, 55, 78, 79, 80, 59, 60, 61, -1, 63, - 64, 65, -1, -1, -1, -1, 70, 71, 72, 73, - -1, -1, 54, 55, 78, 79, 80, 59, 60, 61, - -1, 63, 64, 65, -1, -1, -1, -1, -1, -1, - 72, 73, -1, -1, -1, -1, 78, 79, 80 + 109, 110, 111, 112, 142, 114, 44, 26, 42, 31, + 31, 42, 92, 202, 226, 26, 125, 126, 172, 128, + 129, 130, 195, 132, -1, 134, 135, -1, -1, -1, + 11, 12, 13, 14, 143, 16, -1, -1, -1, 20, + 21, -1, 201, -1, -1, 183, -1, -1, 186, 21, + -1, -1, -1, -1, -1, 214, 28, -1, 167, 168, + 41, 33, 43, -1, -1, 37, 38, 39, 40, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 189, -1, 241, 64, -1, -1, -1, 68, -1, -1, + 199, 72, 73, -1, -1, -1, -1, 78, 0, 1, + -1, -1, 252, -1, -1, -1, -1, -1, 217, 11, + 12, 13, 14, -1, 16, 17, 18, 19, 20, 21, + 229, -1, -1, -1, -1, 27, -1, 29, 30, 31, + -1, -1, 34, 35, 36, -1, -1, -1, -1, 41, + 42, 43, -1, -1, 46, -1, -1, -1, 50, 51, + 52, 53, 187, -1, -1, 190, 191, -1, -1, -1, + -1, -1, 64, -1, -1, 200, 68, -1, -1, -1, + 72, 73, -1, 208, -1, 77, 78, -1, -1, -1, + 215, -1, -1, -1, -1, -1, -1, -1, 223, -1, + 225, 226, -1, -1, -1, -1, -1, -1, -1, 234, + -1, -1, -1, -1, -1, 240, -1, 242, -1, 11, + 12, 13, 14, -1, 16, 17, 18, 19, 20, 21, + -1, -1, 257, -1, 259, 27, -1, 29, 30, 31, + -1, -1, 34, 35, 36, -1, -1, -1, -1, 41, + 42, 43, -1, -1, 46, -1, -1, -1, 50, 51, + 52, 53, -1, -1, -1, 11, 12, 13, 14, -1, + 16, -1, 64, -1, 20, 21, 68, -1, -1, -1, + 72, 73, 11, 12, 13, 14, 78, 16, 17, 18, + 19, 20, 21, -1, -1, 41, -1, 43, 27, -1, + 29, 30, 31, -1, -1, -1, 35, 36, -1, -1, + -1, -1, 41, 42, 43, -1, -1, 46, 64, -1, + -1, -1, 68, 52, 53, -1, 72, 73, -1, -1, + -1, -1, 78, -1, -1, 64, -1, -1, -1, 68, + -1, -1, -1, 72, 73, -1, -1, -1, 77, 78, + 11, 12, 13, 14, -1, 16, 17, 18, 19, 20, + 21, -1, -1, -1, -1, -1, 27, -1, 29, 30, + 31, -1, -1, -1, 35, 36, -1, -1, -1, -1, + 41, 42, 43, -1, -1, 46, -1, -1, -1, -1, + -1, 52, 53, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 64, -1, -1, -1, 68, -1, -1, + -1, 72, 73, 11, 12, 13, 14, 78, 16, 17, + 18, 19, 20, 21, -1, -1, -1, -1, -1, 27, + -1, 29, 30, -1, -1, -1, -1, 35, 36, -1, + -1, -1, -1, 41, -1, 43, -1, -1, 32, -1, + -1, -1, -1, -1, 52, 53, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 64, -1, -1, -1, + 68, -1, 56, 57, 72, 73, -1, 61, 62, 63, + 78, 65, 66, 67, -1, -1, -1, -1, 72, 73, + 74, 75, 45, -1, -1, -1, 80, 81, 82, -1, + -1, -1, -1, 56, 57, -1, -1, -1, 61, 62, + 63, -1, 65, 66, 67, -1, 47, -1, 71, 72, + 73, 74, 75, -1, -1, 56, 57, 80, 81, 82, + 61, 62, 63, -1, 65, 66, 67, -1, -1, -1, + -1, 72, 73, 74, 75, -1, -1, 56, 57, 80, + 81, 82, 61, 62, 63, -1, 65, 66, 67, -1, + 69, 70, -1, 72, 73, 74, 75, -1, -1, 56, + 57, 80, 81, 82, 61, 62, 63, -1, 65, 66, + 67, -1, -1, -1, 71, 72, 73, 74, 75, -1, + -1, -1, 79, 80, 81, 82, 56, 57, -1, -1, + -1, 61, 62, 63, -1, 65, 66, 67, -1, -1, + -1, -1, 72, 73, 74, 75, -1, -1, -1, 79, + 80, 81, 82, 56, 57, -1, -1, -1, 61, 62, + 63, -1, 65, 66, 67, -1, -1, -1, 71, 72, + 73, 74, 75, -1, -1, 56, 57, 80, 81, 82, + 61, 62, 63, -1, 65, 66, 67, -1, -1, -1, + -1, 72, 73, 74, 75, -1, -1, 56, 57, 80, + 81, 82, 61, 62, 63, -1, 65, 66, 67, -1, + -1, -1, -1, -1, -1, 74, 75, -1, -1, 56, + 57, 80, 81, 82, 61, 62, 63, -1, 65, 66, + 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 80, 81, 82 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing @@ -965,32 +992,32 @@ static const yytype_int16 yycheck[] = static const yytype_uint8 yystos[] = { 0, 1, 11, 12, 13, 14, 16, 17, 18, 19, - 20, 26, 28, 29, 30, 33, 34, 35, 40, 41, - 42, 45, 49, 50, 51, 52, 62, 66, 70, 71, - 76, 83, 85, 86, 87, 88, 89, 96, 97, 98, - 103, 104, 106, 109, 110, 115, 75, 84, 19, 40, - 86, 103, 103, 103, 76, 100, 19, 105, 20, 27, - 32, 36, 37, 38, 39, 107, 108, 19, 20, 19, - 103, 46, 47, 12, 13, 19, 19, 19, 19, 103, - 53, 107, 108, 103, 103, 103, 103, 103, 0, 84, - 76, 69, 76, 95, 103, 54, 55, 59, 60, 61, - 63, 64, 65, 70, 71, 72, 73, 78, 79, 80, - 103, 103, 116, 116, 81, 20, 20, 36, 108, 111, - 31, 19, 44, 69, 103, 44, 69, 43, 112, 46, - 108, 67, 68, 77, 85, 95, 103, 95, 103, 43, - 69, 103, 103, 103, 103, 103, 103, 103, 103, 103, - 103, 103, 103, 103, 103, 103, 77, 81, 19, 20, - 100, 19, 103, 103, 44, 69, 103, 103, 103, 100, - 103, 103, 103, 77, 101, 77, 84, 100, 103, 103, - 19, 113, 103, 103, 113, 102, 22, 44, 102, 87, - 104, 81, 84, 84, 84, 88, 101, 44, 103, 101, - 101, 19, 81, 114, 114, 25, 103, 101, 25, 48, - 100, 24, 48, 92, 93, 99, 19, 102, 102, 41, - 101, 102, 30, 102, 91, 92, 94, 99, 100, 93, - 101, 95, 102, 101, 101, 94, 101, 95, 87, 48, - 90, 43, 101, 25, 25, 25, 43, 101, 100, 101, - 100, 25, 41, 30, 30, 102, 87, 88, 41, 101, - 101 + 20, 21, 27, 29, 30, 31, 34, 35, 36, 41, + 42, 43, 46, 50, 51, 52, 53, 64, 68, 72, + 73, 78, 85, 87, 88, 89, 90, 91, 98, 99, + 100, 105, 106, 108, 111, 112, 117, 77, 86, 20, + 41, 88, 105, 105, 105, 105, 118, 78, 102, 20, + 107, 21, 28, 33, 37, 38, 39, 40, 109, 110, + 20, 21, 20, 105, 47, 48, 12, 13, 20, 20, + 20, 20, 105, 54, 109, 110, 105, 105, 105, 105, + 105, 0, 86, 78, 71, 78, 97, 105, 56, 57, + 61, 62, 63, 65, 66, 67, 72, 73, 74, 75, + 80, 81, 82, 105, 83, 118, 118, 83, 21, 21, + 37, 110, 113, 32, 20, 45, 71, 105, 45, 71, + 44, 114, 47, 110, 69, 70, 79, 87, 97, 105, + 97, 105, 44, 71, 105, 105, 105, 105, 105, 105, + 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, + 79, 20, 21, 102, 20, 105, 105, 45, 71, 105, + 105, 105, 102, 105, 105, 105, 79, 103, 79, 86, + 102, 105, 20, 115, 105, 105, 115, 104, 23, 45, + 104, 89, 106, 83, 86, 86, 86, 90, 103, 45, + 105, 103, 103, 20, 83, 116, 116, 26, 105, 103, + 26, 49, 102, 25, 49, 94, 95, 101, 20, 104, + 104, 42, 103, 104, 31, 104, 93, 94, 96, 101, + 102, 95, 103, 97, 104, 103, 103, 96, 103, 97, + 89, 49, 92, 44, 103, 26, 26, 26, 44, 103, + 102, 103, 102, 26, 42, 31, 31, 104, 89, 90, + 42, 103, 103 }; #define yyerrok (yyerrstatus = 0) @@ -2333,41 +2360,46 @@ yyreduce: case 94: #line 416 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_open); ;} + { g_lingo->codeFunc((yyvsp[(1) - (2)].s), (yyvsp[(2) - (2)].narg)); ;} break; case 95: #line 417 "engines/director/lingo/lingo-gr.y" - { g_lingo->code2(g_lingo->c_voidpush, g_lingo->c_open); ;} + { g_lingo->code1(g_lingo->c_open); ;} break; case 96: -#line 420 "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); ;} +#line 418 "engines/director/lingo/lingo-gr.y" + { g_lingo->code2(g_lingo->c_voidpush, g_lingo->c_open); ;} break; case 97: #line 421 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_global); g_lingo->codeString((yyvsp[(3) - (3)].s)->c_str()); delete (yyvsp[(3) - (3)].s); ;} + { g_lingo->code1(g_lingo->c_global); g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); delete (yyvsp[(1) - (1)].s); ;} break; case 98: -#line 432 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_gotoloop); ;} +#line 422 "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 99: #line 433 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_gotonext); ;} + { g_lingo->code1(g_lingo->c_gotoloop); ;} break; case 100: #line 434 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_gotoprevious); ;} + { g_lingo->code1(g_lingo->c_gotonext); ;} break; case 101: #line 435 "engines/director/lingo/lingo-gr.y" + { g_lingo->code1(g_lingo->c_gotoprevious); ;} + break; + + case 102: +#line 436 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_goto); g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str()); @@ -2375,8 +2407,8 @@ yyreduce: delete (yyvsp[(2) - (2)].s); ;} break; - case 102: -#line 440 "engines/director/lingo/lingo-gr.y" + case 103: +#line 441 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_goto); g_lingo->codeString((yyvsp[(2) - (3)].s)->c_str()); @@ -2385,8 +2417,8 @@ yyreduce: delete (yyvsp[(3) - (3)].s); ;} break; - case 103: -#line 446 "engines/director/lingo/lingo-gr.y" + case 104: +#line 447 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_goto); g_lingo->codeString(""); @@ -2394,33 +2426,33 @@ yyreduce: delete (yyvsp[(2) - (2)].s); ;} break; - case 104: -#line 453 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = (yyvsp[(2) - (2)].s); ;} - break; - case 105: #line 454 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = (yyvsp[(1) - (1)].s); ;} + { (yyval.s) = (yyvsp[(2) - (2)].s); ;} break; case 106: -#line 457 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = (yyvsp[(3) - (3)].s); ;} +#line 455 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = (yyvsp[(1) - (1)].s); ;} break; case 107: #line 458 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = (yyvsp[(2) - (2)].s); ;} + { (yyval.s) = (yyvsp[(3) - (3)].s); ;} break; case 108: -#line 461 "engines/director/lingo/lingo-gr.y" - { g_lingo->code1(g_lingo->c_playdone); ;} +#line 459 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = (yyvsp[(2) - (2)].s); ;} break; case 109: #line 462 "engines/director/lingo/lingo-gr.y" + { g_lingo->code1(g_lingo->c_playdone); ;} + break; + + case 110: +#line 463 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_play); g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str()); @@ -2428,8 +2460,8 @@ yyreduce: delete (yyvsp[(2) - (2)].s); ;} break; - case 110: -#line 467 "engines/director/lingo/lingo-gr.y" + case 111: +#line 468 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_play); g_lingo->codeString((yyvsp[(2) - (3)].s)->c_str()); @@ -2438,8 +2470,8 @@ yyreduce: delete (yyvsp[(3) - (3)].s); ;} break; - case 111: -#line 473 "engines/director/lingo/lingo-gr.y" + case 112: +#line 474 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_play); g_lingo->codeString(""); @@ -2447,13 +2479,13 @@ yyreduce: delete (yyvsp[(2) - (2)].s); ;} break; - case 112: -#line 505 "engines/director/lingo/lingo-gr.y" + case 113: +#line 506 "engines/director/lingo/lingo-gr.y" { g_lingo->_indef = true; g_lingo->_currentFactory.clear(); ;} break; - case 113: -#line 506 "engines/director/lingo/lingo-gr.y" + case 114: +#line 507 "engines/director/lingo/lingo-gr.y" { g_lingo->codeConst(0); // Push fake value on stack g_lingo->code1(g_lingo->c_procret); @@ -2461,20 +2493,20 @@ yyreduce: g_lingo->_indef = false; ;} break; - case 114: -#line 511 "engines/director/lingo/lingo-gr.y" + case 115: +#line 512 "engines/director/lingo/lingo-gr.y" { g_lingo->codeFactory(*(yyvsp[(2) - (2)].s)); ;} break; - case 115: -#line 514 "engines/director/lingo/lingo-gr.y" + case 116: +#line 515 "engines/director/lingo/lingo-gr.y" { g_lingo->_indef = true; ;} break; - case 116: -#line 515 "engines/director/lingo/lingo-gr.y" + case 117: +#line 516 "engines/director/lingo/lingo-gr.y" { g_lingo->codeConst(0); // Push fake value on stack g_lingo->code1(g_lingo->c_procret); @@ -2482,33 +2514,33 @@ yyreduce: g_lingo->_indef = false; ;} break; - case 117: -#line 520 "engines/director/lingo/lingo-gr.y" - { (yyval.narg) = 0; ;} - break; - case 118: #line 521 "engines/director/lingo/lingo-gr.y" - { g_lingo->codeArg((yyvsp[(1) - (1)].s)); (yyval.narg) = 1; ;} + { (yyval.narg) = 0; ;} break; case 119: #line 522 "engines/director/lingo/lingo-gr.y" - { g_lingo->codeArg((yyvsp[(3) - (3)].s)); (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;} + { g_lingo->codeArg((yyvsp[(1) - (1)].s)); (yyval.narg) = 1; ;} break; case 120: #line 523 "engines/director/lingo/lingo-gr.y" - { g_lingo->codeArg((yyvsp[(4) - (4)].s)); (yyval.narg) = (yyvsp[(1) - (4)].narg) + 1; ;} + { g_lingo->codeArg((yyvsp[(3) - (3)].s)); (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;} break; case 121: -#line 525 "engines/director/lingo/lingo-gr.y" - { g_lingo->codeArgStore(); ;} +#line 524 "engines/director/lingo/lingo-gr.y" + { g_lingo->codeArg((yyvsp[(4) - (4)].s)); (yyval.narg) = (yyvsp[(1) - (4)].narg) + 1; ;} break; case 122: -#line 529 "engines/director/lingo/lingo-gr.y" +#line 526 "engines/director/lingo/lingo-gr.y" + { g_lingo->codeArgStore(); ;} + break; + + case 123: +#line 530 "engines/director/lingo/lingo-gr.y" { g_lingo->code1(g_lingo->c_call); g_lingo->codeString((yyvsp[(1) - (3)].s)->c_str()); @@ -2517,24 +2549,24 @@ yyreduce: g_lingo->code1(numpar); ;} break; - case 123: -#line 537 "engines/director/lingo/lingo-gr.y" - { (yyval.narg) = 0; ;} - break; - case 124: #line 538 "engines/director/lingo/lingo-gr.y" - { (yyval.narg) = 1; ;} + { (yyval.narg) = 0; ;} break; case 125: #line 539 "engines/director/lingo/lingo-gr.y" + { (yyval.narg) = 1; ;} + break; + + case 126: +#line 540 "engines/director/lingo/lingo-gr.y" { (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;} break; /* Line 1267 of yacc.c. */ -#line 2538 "engines/director/lingo/lingo-gr.cpp" +#line 2570 "engines/director/lingo/lingo-gr.cpp" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -2748,6 +2780,6 @@ yyreturn: } -#line 542 "engines/director/lingo/lingo-gr.y" +#line 543 "engines/director/lingo/lingo-gr.y" diff --git a/engines/director/lingo/lingo-gr.h b/engines/director/lingo/lingo-gr.h index 387ebfefef..d7ab8924cf 100644 --- a/engines/director/lingo/lingo-gr.h +++ b/engines/director/lingo/lingo-gr.h @@ -55,56 +55,58 @@ BLTINNOARGS = 271, BLTINNOARGSORONE = 272, BLTINONEARG = 273, - ID = 274, - STRING = 275, - HANDLER = 276, - tDOWN = 277, - tELSE = 278, - tNLELSIF = 279, - tEND = 280, - tEXIT = 281, - tFRAME = 282, - tGLOBAL = 283, - tGO = 284, - tIF = 285, - tINTO = 286, - tLOOP = 287, - tMACRO = 288, - tMCI = 289, - tMCIWAIT = 290, - tMOVIE = 291, - tNEXT = 292, - tOF = 293, - tPREVIOUS = 294, - tPUT = 295, - tREPEAT = 296, - tSET = 297, - tTHEN = 298, - tTO = 299, - tWHEN = 300, - tWITH = 301, - tWHILE = 302, - tNLELSE = 303, - tFACTORY = 304, - tMETHOD = 305, - tOPEN = 306, - tPLAY = 307, - tDONE = 308, - tGE = 309, - tLE = 310, - tGT = 311, - tLT = 312, - tEQ = 313, - tNEQ = 314, - tAND = 315, - tOR = 316, - tNOT = 317, - tCONCAT = 318, - tCONTAINS = 319, - tSTARTS = 320, - tSPRITE = 321, - tINTERSECTS = 322, - tWITHIN = 323 + BLTINARGLIST = 274, + ID = 275, + STRING = 276, + HANDLER = 277, + tDOWN = 278, + tELSE = 279, + tNLELSIF = 280, + tEND = 281, + tEXIT = 282, + tFRAME = 283, + tGLOBAL = 284, + tGO = 285, + tIF = 286, + tINTO = 287, + tLOOP = 288, + tMACRO = 289, + tMCI = 290, + tMCIWAIT = 291, + tMOVIE = 292, + tNEXT = 293, + tOF = 294, + tPREVIOUS = 295, + tPUT = 296, + tREPEAT = 297, + tSET = 298, + tTHEN = 299, + tTO = 300, + tWHEN = 301, + tWITH = 302, + tWHILE = 303, + tNLELSE = 304, + tFACTORY = 305, + tMETHOD = 306, + tOPEN = 307, + tPLAY = 308, + tDONE = 309, + tPLAYACCEL = 310, + tGE = 311, + tLE = 312, + tGT = 313, + tLT = 314, + tEQ = 315, + tNEQ = 316, + tAND = 317, + tOR = 318, + tNOT = 319, + tCONCAT = 320, + tCONTAINS = 321, + tSTARTS = 322, + tSPRITE = 323, + tINTERSECTS = 324, + tWITHIN = 325 }; #endif /* Tokens. */ @@ -124,56 +126,58 @@ #define BLTINNOARGS 271 #define BLTINNOARGSORONE 272 #define BLTINONEARG 273 -#define ID 274 -#define STRING 275 -#define HANDLER 276 -#define tDOWN 277 -#define tELSE 278 -#define tNLELSIF 279 -#define tEND 280 -#define tEXIT 281 -#define tFRAME 282 -#define tGLOBAL 283 -#define tGO 284 -#define tIF 285 -#define tINTO 286 -#define tLOOP 287 -#define tMACRO 288 -#define tMCI 289 -#define tMCIWAIT 290 -#define tMOVIE 291 -#define tNEXT 292 -#define tOF 293 -#define tPREVIOUS 294 -#define tPUT 295 -#define tREPEAT 296 -#define tSET 297 -#define tTHEN 298 -#define tTO 299 -#define tWHEN 300 -#define tWITH 301 -#define tWHILE 302 -#define tNLELSE 303 -#define tFACTORY 304 -#define tMETHOD 305 -#define tOPEN 306 -#define tPLAY 307 -#define tDONE 308 -#define tGE 309 -#define tLE 310 -#define tGT 311 -#define tLT 312 -#define tEQ 313 -#define tNEQ 314 -#define tAND 315 -#define tOR 316 -#define tNOT 317 -#define tCONCAT 318 -#define tCONTAINS 319 -#define tSTARTS 320 -#define tSPRITE 321 -#define tINTERSECTS 322 -#define tWITHIN 323 +#define BLTINARGLIST 274 +#define ID 275 +#define STRING 276 +#define HANDLER 277 +#define tDOWN 278 +#define tELSE 279 +#define tNLELSIF 280 +#define tEND 281 +#define tEXIT 282 +#define tFRAME 283 +#define tGLOBAL 284 +#define tGO 285 +#define tIF 286 +#define tINTO 287 +#define tLOOP 288 +#define tMACRO 289 +#define tMCI 290 +#define tMCIWAIT 291 +#define tMOVIE 292 +#define tNEXT 293 +#define tOF 294 +#define tPREVIOUS 295 +#define tPUT 296 +#define tREPEAT 297 +#define tSET 298 +#define tTHEN 299 +#define tTO 300 +#define tWHEN 301 +#define tWITH 302 +#define tWHILE 303 +#define tNLELSE 304 +#define tFACTORY 305 +#define tMETHOD 306 +#define tOPEN 307 +#define tPLAY 308 +#define tDONE 309 +#define tPLAYACCEL 310 +#define tGE 311 +#define tLE 312 +#define tGT 313 +#define tLT 314 +#define tEQ 315 +#define tNEQ 316 +#define tAND 317 +#define tOR 318 +#define tNOT 319 +#define tCONCAT 320 +#define tCONTAINS 321 +#define tSTARTS 322 +#define tSPRITE 323 +#define tINTERSECTS 324 +#define tWITHIN 325 @@ -191,7 +195,7 @@ typedef union YYSTYPE Common::Array<double> *arr; } /* Line 1529 of yacc.c. */ -#line 195 "engines/director/lingo/lingo-gr.hpp" +#line 199 "engines/director/lingo/lingo-gr.hpp" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y index 2cdb8b338f..117b3ea50c 100644 --- a/engines/director/lingo/lingo-gr.y +++ b/engines/director/lingo/lingo-gr.y @@ -81,10 +81,10 @@ void yyerror(char *s) { %token<i> INT %token<e> THEENTITY THEENTITYWITHID %token<f> FLOAT -%token<s> BLTIN BLTINNOARGS BLTINNOARGSORONE BLTINONEARG ID STRING HANDLER +%token<s> BLTIN BLTINNOARGS BLTINNOARGSORONE BLTINONEARG BLTINARGLIST ID STRING HANDLER %token tDOWN tELSE tNLELSIF tEND tEXIT tFRAME tGLOBAL tGO tIF tINTO tLOOP tMACRO %token tMCI tMCIWAIT tMOVIE tNEXT tOF tPREVIOUS tPUT tREPEAT tSET tTHEN tTO tWHEN -%token tWITH tWHILE tNLELSE tFACTORY tMETHOD tOPEN tPLAY tDONE +%token tWITH tWHILE tNLELSE tFACTORY tMETHOD tOPEN tPLAY tDONE tPLAYACCEL %token tGE tLE tGT tLT tEQ tNEQ tAND tOR tNOT %token tCONCAT tCONTAINS tSTARTS %token tSPRITE tINTERSECTS tWITHIN @@ -413,6 +413,7 @@ func: tMCI STRING { g_lingo->code1(g_lingo->c_mci); g_lingo->codeString($2->c_ | BLTINNOARGSORONE { g_lingo->code2(g_lingo->c_voidpush, g_lingo->_handlers[*$1]->u.func); delete $1; } + | BLTINARGLIST arglist { g_lingo->codeFunc($1, $2); } | tOPEN expr tWITH expr { g_lingo->code1(g_lingo->c_open); } | tOPEN expr { g_lingo->code2(g_lingo->c_voidpush, g_lingo->c_open); } ; diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp index 7a940dab2d..69c8745a86 100644 --- a/engines/director/lingo/lingo-lex.cpp +++ b/engines/director/lingo/lingo-lex.cpp @@ -380,7 +380,7 @@ static yyconst flex_int16_t yy_accept[197] = 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 2, 2, 3, 55, 0, 0, 0, 0, 0, 56, 50, 1, 52, 53, 49, 47, 48, 51, - 51, 51, 51, 51, 51, 51, 51, 51, 51, 17, + 51, 51, 51, 51, 51, 51, 51, 51, 51, 18, 8, 51, 51, 51, 51, 51, 51, 51, 51, 29, 51, 31, 51, 51, 51, 51, 51, 51, 51, 51, 41, 51, 51, 2, 2, 0, 1, 52, 4, 51, @@ -391,7 +391,7 @@ static yyconst flex_int16_t yy_accept[197] = 51, 6, 7, 11, 14, 51, 51, 51, 0, 51, 20, 21, 51, 51, 51, 51, 27, 30, 32, 51, 51, 51, 51, 0, 40, 45, 51, 43, 10, 51, - 51, 15, 51, 18, 51, 22, 51, 51, 26, 51, + 51, 15, 51, 17, 51, 22, 51, 51, 26, 51, 51, 51, 51, 39, 46, 51, 0, 51, 51, 16, 51, 51, 25, 51, 35, 42, 37, 0, 44, 0, 51, 13, 51, 24, 51, 0, 9, 5, 51, 33, @@ -1290,6 +1290,8 @@ YY_RULE_SETUP } else if (g_lingo->_handlers[yytext]->nargs == 1 && g_lingo->_handlers[yytext]->maxArgs == 1) { return BLTINONEARG; + } else if (g_lingo->_handlers[yytext]->nargs == -1) { + return BLTINARGLIST; } else { error("Incorrect setup for builtin: %s", yytext); } @@ -1301,41 +1303,41 @@ YY_RULE_SETUP YY_BREAK case 52: YY_RULE_SETUP -#line 205 "engines/director/lingo/lingo-lex.l" +#line 207 "engines/director/lingo/lingo-lex.l" { count(); yylval.f = atof(yytext); return FLOAT; } YY_BREAK case 53: YY_RULE_SETUP -#line 206 "engines/director/lingo/lingo-lex.l" +#line 208 "engines/director/lingo/lingo-lex.l" { count(); yylval.i = strtol(yytext, NULL, 10); return INT; } YY_BREAK case 54: YY_RULE_SETUP -#line 207 "engines/director/lingo/lingo-lex.l" +#line 209 "engines/director/lingo/lingo-lex.l" { count(); return *yytext; } YY_BREAK case 55: /* rule 55 can match eol */ YY_RULE_SETUP -#line 208 "engines/director/lingo/lingo-lex.l" +#line 210 "engines/director/lingo/lingo-lex.l" { return '\n'; } YY_BREAK case 56: YY_RULE_SETUP -#line 209 "engines/director/lingo/lingo-lex.l" +#line 211 "engines/director/lingo/lingo-lex.l" { count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return STRING; } YY_BREAK case 57: YY_RULE_SETUP -#line 210 "engines/director/lingo/lingo-lex.l" +#line 212 "engines/director/lingo/lingo-lex.l" YY_BREAK case 58: YY_RULE_SETUP -#line 212 "engines/director/lingo/lingo-lex.l" +#line 214 "engines/director/lingo/lingo-lex.l" ECHO; YY_BREAK -#line 1339 "engines/director/lingo/lingo-lex.cpp" +#line 1341 "engines/director/lingo/lingo-lex.cpp" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -2335,7 +2337,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 212 "engines/director/lingo/lingo-lex.l" +#line 214 "engines/director/lingo/lingo-lex.l" diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l index 005d78b455..0693399fec 100644 --- a/engines/director/lingo/lingo-lex.l +++ b/engines/director/lingo/lingo-lex.l @@ -85,8 +85,8 @@ whitespace [\t ] (?i:exit) { count(); return tEXIT; } (?i:frame) { count(); return tFRAME; } (?i:global) { count(); return tGLOBAL; } -(?i:go) { count(); return tGO; } (?i:go[\t ]+to) { count(); return tGO; } +(?i:go) { count(); return tGO; } (?i:intersects) { count(); return tINTERSECTS; } (?i:into) { count(); return tINTO; } (?i:loop) { count(); return tLOOP; } @@ -194,6 +194,8 @@ whitespace [\t ] } else if (g_lingo->_handlers[yytext]->nargs == 1 && g_lingo->_handlers[yytext]->maxArgs == 1) { return BLTINONEARG; + } else if (g_lingo->_handlers[yytext]->nargs == -1) { + return BLTINARGLIST; } else { error("Incorrect setup for builtin: %s", yytext); } diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h index 15b581c974..862917bffa 100644 --- a/engines/director/lingo/lingo.h +++ b/engines/director/lingo/lingo.h @@ -278,6 +278,7 @@ public: static void b_moveableSprite(); static void b_alert(); static void b_cursor(); + static void b_printFrom(); static void b_dontPassEvent(); static void b_delay(); @@ -285,6 +286,7 @@ public: static void b_nothing(); static void b_continue(); static void b_pause(); + static void b_playAccel(); static void b_closeDA(); static void b_closeResFile(); diff --git a/engines/director/lingo/tests/goto.lingo b/engines/director/lingo/tests/goto.lingo index 43c7ebcd20..854506e260 100644 --- a/engines/director/lingo/tests/goto.lingo +++ b/engines/director/lingo/tests/goto.lingo @@ -21,3 +21,6 @@ play movie "Desert Scene" play frame 23 of movie "Chicago" play frame varframe of movie varmovie play frame "main loop" of movie "Basic With" + +playAccel "Lungs.mma" +playAccel "Bolitas.mma", loop, clickStop, whatFits |