aboutsummaryrefslogtreecommitdiff
path: root/engines/director/lingo
diff options
context:
space:
mode:
authorEugene Sandulenko2016-07-15 19:21:48 +0300
committerEugene Sandulenko2016-08-03 23:40:36 +0200
commit78b198cee9920e62ea19879959316b426fe1834c (patch)
tree8045537b4f555a671a7919b792bdaf06ca7b6f17 /engines/director/lingo
parent5f0f0193f921008bf2deb5e249e40936aada8483 (diff)
downloadscummvm-rg350-78b198cee9920e62ea19879959316b426fe1834c.tar.gz
scummvm-rg350-78b198cee9920e62ea19879959316b426fe1834c.tar.bz2
scummvm-rg350-78b198cee9920e62ea19879959316b426fe1834c.zip
DIRECTOR: Lingo: Added support for parameter-less built-ins
Diffstat (limited to 'engines/director/lingo')
-rw-r--r--engines/director/lingo/lingo-builtins.cpp10
-rw-r--r--engines/director/lingo/lingo-gr.cpp1042
-rw-r--r--engines/director/lingo/lingo-gr.h176
-rw-r--r--engines/director/lingo/lingo-gr.y11
-rw-r--r--engines/director/lingo/lingo-lex.cpp26
-rw-r--r--engines/director/lingo/lingo-lex.l8
-rw-r--r--engines/director/lingo/lingo.h2
-rw-r--r--engines/director/lingo/tests/factory.lingo4
8 files changed, 658 insertions, 621 deletions
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index 0555a13df7..ab6e3b0986 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -47,6 +47,8 @@ static struct BuiltinProto {
{ "chars", Lingo::b_chars, 3},
{ "length", Lingo::b_length, 1},
{ "string", Lingo::b_string, 1},
+ // Misc
+ { "dontpassevent", Lingo::b_dontpassevent, -1 },
{ 0, 0, 0 }
};
@@ -207,5 +209,11 @@ void Lingo::b_string() {
g_lingo->push(d);
}
-
+///////////////////
+// Misc
+///////////////////
+void Lingo::b_dontpassevent() {
+ warning("STUB: b_dontpassevent");
}
+
+} // End of namespace Director
diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp
index 035302f73c..dbbc100263 100644
--- a/engines/director/lingo/lingo-gr.cpp
+++ b/engines/director/lingo/lingo-gr.cpp
@@ -75,49 +75,50 @@
THEENTITYWITHID = 264,
FLOAT = 265,
BLTIN = 266,
- ID = 267,
- STRING = 268,
- HANDLER = 269,
- tDOWN = 270,
- tELSE = 271,
- tNLELSIF = 272,
- tEND = 273,
- tEXIT = 274,
- tFRAME = 275,
- tGLOBAL = 276,
- tGO = 277,
- tIF = 278,
- tINTO = 279,
- tLOOP = 280,
- tMACRO = 281,
- tMCI = 282,
- tMCIWAIT = 283,
- tMOVIE = 284,
- tNEXT = 285,
- tOF = 286,
- tPREVIOUS = 287,
- tPUT = 288,
- tREPEAT = 289,
- tSET = 290,
- tTHEN = 291,
- tTO = 292,
- tWITH = 293,
- tWHILE = 294,
- tNLELSE = 295,
- tFACTORY = 296,
- tMETHOD = 297,
- tGE = 298,
- tLE = 299,
- tGT = 300,
- tLT = 301,
- tEQ = 302,
- tNEQ = 303,
- tAND = 304,
- tOR = 305,
- tNOT = 306,
- tCONCAT = 307,
- tCONTAINS = 308,
- tSTARTS = 309
+ BLTINNOARGS = 267,
+ ID = 268,
+ STRING = 269,
+ HANDLER = 270,
+ tDOWN = 271,
+ tELSE = 272,
+ tNLELSIF = 273,
+ tEND = 274,
+ tEXIT = 275,
+ tFRAME = 276,
+ tGLOBAL = 277,
+ tGO = 278,
+ tIF = 279,
+ tINTO = 280,
+ tLOOP = 281,
+ tMACRO = 282,
+ tMCI = 283,
+ tMCIWAIT = 284,
+ tMOVIE = 285,
+ tNEXT = 286,
+ tOF = 287,
+ tPREVIOUS = 288,
+ tPUT = 289,
+ tREPEAT = 290,
+ tSET = 291,
+ tTHEN = 292,
+ tTO = 293,
+ tWITH = 294,
+ tWHILE = 295,
+ tNLELSE = 296,
+ tFACTORY = 297,
+ tMETHOD = 298,
+ tGE = 299,
+ tLE = 300,
+ tGT = 301,
+ tLT = 302,
+ tEQ = 303,
+ tNEQ = 304,
+ tAND = 305,
+ tOR = 306,
+ tNOT = 307,
+ tCONCAT = 308,
+ tCONTAINS = 309,
+ tSTARTS = 310
};
#endif
/* Tokens. */
@@ -130,49 +131,50 @@
#define THEENTITYWITHID 264
#define FLOAT 265
#define BLTIN 266
-#define ID 267
-#define STRING 268
-#define HANDLER 269
-#define tDOWN 270
-#define tELSE 271
-#define tNLELSIF 272
-#define tEND 273
-#define tEXIT 274
-#define tFRAME 275
-#define tGLOBAL 276
-#define tGO 277
-#define tIF 278
-#define tINTO 279
-#define tLOOP 280
-#define tMACRO 281
-#define tMCI 282
-#define tMCIWAIT 283
-#define tMOVIE 284
-#define tNEXT 285
-#define tOF 286
-#define tPREVIOUS 287
-#define tPUT 288
-#define tREPEAT 289
-#define tSET 290
-#define tTHEN 291
-#define tTO 292
-#define tWITH 293
-#define tWHILE 294
-#define tNLELSE 295
-#define tFACTORY 296
-#define tMETHOD 297
-#define tGE 298
-#define tLE 299
-#define tGT 300
-#define tLT 301
-#define tEQ 302
-#define tNEQ 303
-#define tAND 304
-#define tOR 305
-#define tNOT 306
-#define tCONCAT 307
-#define tCONTAINS 308
-#define tSTARTS 309
+#define BLTINNOARGS 267
+#define ID 268
+#define STRING 269
+#define HANDLER 270
+#define tDOWN 271
+#define tELSE 272
+#define tNLELSIF 273
+#define tEND 274
+#define tEXIT 275
+#define tFRAME 276
+#define tGLOBAL 277
+#define tGO 278
+#define tIF 279
+#define tINTO 280
+#define tLOOP 281
+#define tMACRO 282
+#define tMCI 283
+#define tMCIWAIT 284
+#define tMOVIE 285
+#define tNEXT 286
+#define tOF 287
+#define tPREVIOUS 288
+#define tPUT 289
+#define tREPEAT 290
+#define tSET 291
+#define tTHEN 292
+#define tTO 293
+#define tWITH 294
+#define tWHILE 295
+#define tNLELSE 296
+#define tFACTORY 297
+#define tMETHOD 298
+#define tGE 299
+#define tLE 300
+#define tGT 301
+#define tLT 302
+#define tEQ 303
+#define tNEQ 304
+#define tAND 305
+#define tOR 306
+#define tNOT 307
+#define tCONCAT 308
+#define tCONTAINS 309
+#define tSTARTS 310
@@ -193,7 +195,7 @@ extern int yyparse();
using namespace Director;
void yyerror(char *s) {
g_lingo->_hadError = true;
- warning("%s at line %d col %d", s, g_lingo->_linenumber, g_lingo->_colnumber);
+ error("%s at line %d col %d", s, g_lingo->_linenumber, g_lingo->_colnumber);
}
@@ -229,7 +231,7 @@ typedef union YYSTYPE
int narg; /* number of arguments */
}
/* Line 193 of yacc.c. */
-#line 233 "engines/director/lingo/lingo-gr.cpp"
+#line 235 "engines/director/lingo/lingo-gr.cpp"
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
@@ -242,7 +244,7 @@ typedef union YYSTYPE
/* Line 216 of yacc.c. */
-#line 246 "engines/director/lingo/lingo-gr.cpp"
+#line 248 "engines/director/lingo/lingo-gr.cpp"
#ifdef short
# undef short
@@ -455,22 +457,22 @@ union yyalloc
#endif
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 74
+#define YYFINAL 75
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 626
+#define YYLAST 641
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 68
+#define YYNTOKENS 69
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 34
/* YYNRULES -- Number of rules. */
-#define YYNRULES 115
+#define YYNRULES 116
/* YYNRULES -- Number of states. */
-#define YYNSTATES 247
+#define YYNSTATES 248
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 309
+#define YYMAXUTOK 310
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -479,12 +481,12 @@ union yyalloc
static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 61, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 62, 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, 60, 66, 2,
- 62, 63, 58, 56, 67, 57, 2, 59, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 61, 67, 2,
+ 63, 64, 59, 57, 68, 58, 2, 60, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 65, 55, 64, 2, 2, 2, 2, 2, 2, 2,
+ 66, 56, 65, 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,
@@ -508,7 +510,8 @@ 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, 49, 50, 51, 52, 53, 54
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55
};
#if YYDEBUG
@@ -521,62 +524,62 @@ static const yytype_uint16 yyprhs[] =
64, 66, 68, 70, 79, 91, 104, 113, 125, 137,
144, 155, 166, 167, 171, 174, 176, 179, 181, 188,
190, 196, 198, 202, 206, 209, 213, 215, 217, 218,
- 219, 220, 223, 226, 228, 230, 232, 237, 242, 244,
- 246, 249, 251, 255, 259, 263, 267, 271, 275, 279,
- 283, 287, 291, 295, 298, 302, 306, 310, 314, 317,
- 320, 324, 327, 330, 333, 335, 337, 340, 342, 346,
- 349, 352, 355, 358, 362, 365, 369, 372, 375, 377,
- 381, 384, 388, 389, 398, 401, 402, 411, 412, 414,
- 418, 423, 424, 428, 429, 431
+ 219, 220, 223, 226, 228, 230, 232, 237, 239, 244,
+ 246, 248, 251, 253, 257, 261, 265, 269, 273, 277,
+ 281, 285, 289, 293, 297, 300, 304, 308, 312, 316,
+ 319, 322, 326, 329, 332, 335, 337, 339, 342, 344,
+ 348, 351, 354, 357, 360, 364, 367, 371, 374, 377,
+ 379, 383, 386, 390, 391, 400, 403, 404, 413, 414,
+ 416, 420, 425, 426, 430, 431, 433
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int8 yyrhs[] =
{
- 69, 0, -1, 69, 70, 71, -1, 71, -1, 1,
- 61, -1, 61, -1, -1, 95, -1, 90, -1, 100,
- -1, 72, -1, 74, -1, 33, 89, 24, 12, -1,
- 35, 12, 55, 89, -1, 35, 8, 55, 89, -1,
- 35, 9, 89, 55, 89, -1, 35, 12, 37, 89,
- -1, 35, 8, 37, 89, -1, 35, 9, 89, 37,
- 89, -1, 89, -1, 90, -1, 73, -1, 75, -1,
- 82, 62, 81, 63, 88, 87, 18, 34, -1, 83,
- 55, 89, 87, 37, 89, 87, 88, 87, 18, 34,
- -1, 83, 55, 89, 87, 15, 37, 89, 87, 88,
- 87, 18, 34, -1, 84, 81, 36, 70, 88, 87,
- 18, 23, -1, 84, 81, 36, 70, 88, 87, 40,
- 88, 87, 18, 23, -1, 84, 81, 36, 70, 88,
- 87, 86, 77, 87, 18, 23, -1, 84, 81, 36,
- 86, 73, 87, -1, 84, 81, 36, 86, 73, 87,
- 40, 86, 73, 87, -1, 84, 81, 36, 86, 73,
- 87, 78, 87, 76, 87, -1, -1, 40, 86, 73,
- -1, 77, 80, -1, 80, -1, 78, 79, -1, 79,
- -1, 85, 81, 36, 86, 74, 87, -1, 78, -1,
- 85, 81, 36, 88, 87, -1, 89, -1, 89, 55,
- 89, -1, 62, 81, 63, -1, 34, 39, -1, 34,
- 38, 12, -1, 23, -1, 17, -1, -1, -1, -1,
- 88, 70, -1, 88, 74, -1, 7, -1, 10, -1,
- 13, -1, 11, 62, 101, 63, -1, 12, 62, 101,
- 63, -1, 12, -1, 8, -1, 9, 89, -1, 72,
- -1, 89, 56, 89, -1, 89, 57, 89, -1, 89,
- 58, 89, -1, 89, 59, 89, -1, 89, 64, 89,
- -1, 89, 65, 89, -1, 89, 48, 89, -1, 89,
- 43, 89, -1, 89, 44, 89, -1, 89, 49, 89,
- -1, 89, 50, 89, -1, 51, 89, -1, 89, 66,
- 89, -1, 89, 52, 89, -1, 89, 53, 89, -1,
- 89, 54, 89, -1, 56, 89, -1, 57, 89, -1,
- 62, 89, 63, -1, 27, 13, -1, 28, 12, -1,
- 33, 89, -1, 92, -1, 19, -1, 21, 91, -1,
- 12, -1, 91, 67, 12, -1, 22, 25, -1, 22,
- 30, -1, 22, 32, -1, 22, 93, -1, 22, 93,
- 94, -1, 22, 94, -1, 37, 20, 13, -1, 20,
- 13, -1, 37, 13, -1, 13, -1, 31, 29, 13,
- -1, 29, 13, -1, 37, 29, 13, -1, -1, 26,
- 12, 96, 86, 98, 70, 99, 88, -1, 41, 12,
- -1, -1, 42, 12, 97, 86, 98, 70, 99, 88,
- -1, -1, 12, -1, 98, 67, 12, -1, 98, 70,
- 67, 12, -1, -1, 12, 86, 101, -1, -1, 89,
- -1, 101, 67, 89, -1
+ 70, 0, -1, 70, 71, 72, -1, 72, -1, 1,
+ 62, -1, 62, -1, -1, 96, -1, 91, -1, 101,
+ -1, 73, -1, 75, -1, 34, 90, 25, 13, -1,
+ 36, 13, 56, 90, -1, 36, 8, 56, 90, -1,
+ 36, 9, 90, 56, 90, -1, 36, 13, 38, 90,
+ -1, 36, 8, 38, 90, -1, 36, 9, 90, 38,
+ 90, -1, 90, -1, 91, -1, 74, -1, 76, -1,
+ 83, 63, 82, 64, 89, 88, 19, 35, -1, 84,
+ 56, 90, 88, 38, 90, 88, 89, 88, 19, 35,
+ -1, 84, 56, 90, 88, 16, 38, 90, 88, 89,
+ 88, 19, 35, -1, 85, 82, 37, 71, 89, 88,
+ 19, 24, -1, 85, 82, 37, 71, 89, 88, 41,
+ 89, 88, 19, 24, -1, 85, 82, 37, 71, 89,
+ 88, 87, 78, 88, 19, 24, -1, 85, 82, 37,
+ 87, 74, 88, -1, 85, 82, 37, 87, 74, 88,
+ 41, 87, 74, 88, -1, 85, 82, 37, 87, 74,
+ 88, 79, 88, 77, 88, -1, -1, 41, 87, 74,
+ -1, 78, 81, -1, 81, -1, 79, 80, -1, 80,
+ -1, 86, 82, 37, 87, 75, 88, -1, 79, -1,
+ 86, 82, 37, 89, 88, -1, 90, -1, 90, 56,
+ 90, -1, 63, 82, 64, -1, 35, 40, -1, 35,
+ 39, 13, -1, 24, -1, 18, -1, -1, -1, -1,
+ 89, 71, -1, 89, 75, -1, 7, -1, 10, -1,
+ 14, -1, 11, 63, 102, 64, -1, 12, -1, 13,
+ 63, 102, 64, -1, 13, -1, 8, -1, 9, 90,
+ -1, 73, -1, 90, 57, 90, -1, 90, 58, 90,
+ -1, 90, 59, 90, -1, 90, 60, 90, -1, 90,
+ 65, 90, -1, 90, 66, 90, -1, 90, 49, 90,
+ -1, 90, 44, 90, -1, 90, 45, 90, -1, 90,
+ 50, 90, -1, 90, 51, 90, -1, 52, 90, -1,
+ 90, 67, 90, -1, 90, 53, 90, -1, 90, 54,
+ 90, -1, 90, 55, 90, -1, 57, 90, -1, 58,
+ 90, -1, 63, 90, 64, -1, 28, 14, -1, 29,
+ 13, -1, 34, 90, -1, 93, -1, 20, -1, 22,
+ 92, -1, 13, -1, 92, 68, 13, -1, 23, 26,
+ -1, 23, 31, -1, 23, 33, -1, 23, 94, -1,
+ 23, 94, 95, -1, 23, 95, -1, 38, 21, 14,
+ -1, 21, 14, -1, 38, 14, -1, 14, -1, 32,
+ 30, 14, -1, 30, 14, -1, 38, 30, 14, -1,
+ -1, 27, 13, 97, 87, 99, 71, 100, 89, -1,
+ 42, 13, -1, -1, 43, 13, 98, 87, 99, 71,
+ 100, 89, -1, -1, 13, -1, 99, 68, 13, -1,
+ 99, 71, 68, 13, -1, -1, 13, 87, 102, -1,
+ -1, 90, -1, 102, 68, 90, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
@@ -587,13 +590,13 @@ static const yytype_uint16 yyrline[] =
170, 172, 173, 178, 189, 205, 219, 226, 235, 244,
254, 264, 275, 276, 279, 280, 283, 284, 287, 295,
296, 304, 305, 306, 308, 310, 316, 322, 329, 331,
- 333, 334, 335, 338, 343, 346, 349, 355, 363, 366,
- 373, 379, 380, 381, 382, 383, 384, 385, 386, 387,
- 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
- 398, 401, 402, 403, 404, 405, 407, 410, 411, 422,
- 423, 424, 425, 430, 436, 443, 444, 445, 446, 449,
- 450, 451, 479, 479, 485, 488, 488, 494, 495, 496,
- 497, 499, 503, 511, 512, 513
+ 333, 334, 335, 338, 343, 346, 349, 355, 358, 366,
+ 369, 376, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, 396, 397, 398, 399,
+ 400, 401, 404, 405, 406, 407, 408, 410, 413, 414,
+ 425, 426, 427, 428, 433, 439, 446, 447, 448, 449,
+ 452, 453, 454, 482, 482, 488, 491, 491, 497, 498,
+ 499, 500, 502, 506, 514, 515, 516
};
#endif
@@ -603,16 +606,16 @@ static const yytype_uint16 yyrline[] =
static const char *const yytname[] =
{
"$end", "error", "$undefined", "CASTREF", "UNARY", "VOID", "VAR", "INT",
- "THEENTITY", "THEENTITYWITHID", "FLOAT", "BLTIN", "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", "tWITH", "tWHILE", "tNLELSE", "tFACTORY", "tMETHOD",
- "tGE", "tLE", "tGT", "tLT", "tEQ", "tNEQ", "tAND", "tOR", "tNOT",
- "tCONCAT", "tCONTAINS", "tSTARTS", "'='", "'+'", "'-'", "'*'", "'/'",
- "'%'", "'\\n'", "'('", "')'", "'>'", "'<'", "'&'", "','", "$accept",
- "program", "nl", "programline", "asgn", "stmtoneliner", "stmt", "ifstmt",
- "elsestmtoneliner", "elseifstmt", "elseifstmtoneliner",
+ "THEENTITY", "THEENTITYWITHID", "FLOAT", "BLTIN", "BLTINNOARGS", "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", "tWITH", "tWHILE", "tNLELSE", "tFACTORY",
+ "tMETHOD", "tGE", "tLE", "tGT", "tLT", "tEQ", "tNEQ", "tAND", "tOR",
+ "tNOT", "tCONCAT", "tCONTAINS", "tSTARTS", "'='", "'+'", "'-'", "'*'",
+ "'/'", "'%'", "'\\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", "defn", "@1", "@2",
@@ -630,26 +633,26 @@ static const yytype_uint16 yytoknum[] =
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, 304,
- 305, 306, 307, 308, 309, 61, 43, 45, 42, 47,
- 37, 10, 40, 41, 62, 60, 38, 44
+ 305, 306, 307, 308, 309, 310, 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, 68, 69, 69, 69, 70, 71, 71, 71, 71,
- 71, 71, 72, 72, 72, 72, 72, 72, 72, 73,
- 73, 74, 74, 74, 74, 74, 75, 75, 75, 75,
- 75, 75, 76, 76, 77, 77, 78, 78, 79, 80,
- 80, 81, 81, 81, 82, 83, 84, 85, 86, 87,
- 88, 88, 88, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 90, 90, 90, 90, 90, 90, 91, 91, 92,
- 92, 92, 92, 92, 92, 93, 93, 93, 93, 94,
- 94, 94, 96, 95, 95, 97, 95, 98, 98, 98,
- 98, 99, 100, 101, 101, 101
+ 0, 69, 70, 70, 70, 71, 72, 72, 72, 72,
+ 72, 72, 73, 73, 73, 73, 73, 73, 73, 74,
+ 74, 75, 75, 75, 75, 75, 76, 76, 76, 76,
+ 76, 76, 77, 77, 78, 78, 79, 79, 80, 81,
+ 81, 82, 82, 82, 83, 84, 85, 86, 87, 88,
+ 89, 89, 89, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 91, 91, 91, 91, 91, 91, 92, 92,
+ 93, 93, 93, 93, 93, 93, 94, 94, 94, 94,
+ 95, 95, 95, 97, 96, 96, 98, 96, 99, 99,
+ 99, 99, 100, 101, 102, 102, 102
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@@ -660,13 +663,13 @@ static const yytype_uint8 yyr2[] =
1, 1, 1, 8, 11, 12, 8, 11, 11, 6,
10, 10, 0, 3, 2, 1, 2, 1, 6, 1,
5, 1, 3, 3, 2, 3, 1, 1, 0, 0,
- 0, 2, 2, 1, 1, 1, 4, 4, 1, 1,
- 2, 1, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 2, 3, 3, 3, 3, 2, 2,
- 3, 2, 2, 2, 1, 1, 2, 1, 3, 2,
- 2, 2, 2, 3, 2, 3, 2, 2, 1, 3,
- 2, 3, 0, 8, 2, 0, 8, 0, 1, 3,
- 4, 0, 3, 0, 1, 3
+ 0, 2, 2, 1, 1, 1, 4, 1, 4, 1,
+ 1, 2, 1, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 2, 3, 3, 3, 3, 2,
+ 2, 3, 2, 2, 2, 1, 1, 2, 1, 3,
+ 2, 2, 2, 2, 3, 2, 3, 2, 2, 1,
+ 3, 2, 3, 0, 8, 2, 0, 8, 0, 1,
+ 3, 4, 0, 3, 0, 1, 3
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -674,251 +677,255 @@ static const yytype_uint8 yyr2[] =
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
- 0, 0, 53, 59, 0, 54, 0, 48, 55, 85,
- 0, 0, 46, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 3, 61, 21, 11,
- 22, 0, 0, 0, 19, 8, 84, 7, 9, 4,
- 58, 0, 61, 60, 113, 113, 113, 87, 86, 98,
- 0, 89, 0, 90, 0, 91, 0, 92, 94, 102,
- 81, 82, 83, 0, 44, 0, 0, 0, 104, 105,
- 73, 78, 79, 0, 1, 5, 6, 0, 0, 0,
- 0, 41, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 114, 0,
- 0, 112, 0, 96, 100, 0, 97, 0, 0, 0,
- 93, 48, 0, 45, 0, 0, 0, 0, 0, 48,
- 80, 2, 0, 49, 0, 0, 48, 0, 69, 70,
- 68, 71, 72, 75, 76, 77, 62, 63, 64, 65,
- 66, 67, 74, 56, 0, 57, 88, 99, 95, 101,
- 107, 12, 17, 14, 0, 0, 16, 13, 107, 50,
- 0, 43, 50, 0, 42, 115, 108, 0, 18, 15,
- 0, 49, 0, 0, 49, 49, 20, 0, 111, 111,
- 51, 52, 0, 0, 49, 48, 29, 109, 0, 50,
- 50, 0, 49, 50, 0, 50, 0, 47, 48, 49,
- 37, 0, 110, 103, 106, 23, 50, 49, 26, 49,
- 49, 39, 35, 0, 0, 36, 32, 0, 49, 0,
- 0, 34, 0, 0, 49, 48, 49, 48, 0, 0,
- 0, 0, 48, 30, 0, 31, 0, 0, 24, 27,
- 28, 49, 33, 49, 25, 40, 38
+ 0, 0, 53, 60, 0, 54, 0, 57, 48, 55,
+ 86, 0, 0, 46, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 3, 62, 21,
+ 11, 22, 0, 0, 0, 19, 8, 85, 7, 9,
+ 4, 59, 0, 62, 61, 114, 114, 114, 88, 87,
+ 99, 0, 90, 0, 91, 0, 92, 0, 93, 95,
+ 103, 82, 83, 84, 0, 44, 0, 0, 0, 105,
+ 106, 74, 79, 80, 0, 1, 5, 6, 0, 0,
+ 0, 0, 41, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 115,
+ 0, 0, 113, 0, 97, 101, 0, 98, 0, 0,
+ 0, 94, 48, 0, 45, 0, 0, 0, 0, 0,
+ 48, 81, 2, 0, 49, 0, 0, 48, 0, 70,
+ 71, 69, 72, 73, 76, 77, 78, 63, 64, 65,
+ 66, 67, 68, 75, 56, 0, 58, 89, 100, 96,
+ 102, 108, 12, 17, 14, 0, 0, 16, 13, 108,
+ 50, 0, 43, 50, 0, 42, 116, 109, 0, 18,
+ 15, 0, 49, 0, 0, 49, 49, 20, 0, 112,
+ 112, 51, 52, 0, 0, 49, 48, 29, 110, 0,
+ 50, 50, 0, 49, 50, 0, 50, 0, 47, 48,
+ 49, 37, 0, 111, 104, 107, 23, 50, 49, 26,
+ 49, 49, 39, 35, 0, 0, 36, 32, 0, 49,
+ 0, 0, 34, 0, 0, 49, 48, 49, 48, 0,
+ 0, 0, 0, 48, 30, 0, 31, 0, 0, 24,
+ 27, 28, 49, 33, 49, 25, 40, 38
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 25, 180, 26, 42, 28, 181, 30, 226, 210,
- 211, 200, 212, 80, 31, 32, 33, 201, 236, 160,
- 171, 34, 176, 48, 36, 57, 58, 37, 111, 119,
- 167, 189, 38, 99
+ -1, 26, 181, 27, 43, 29, 182, 31, 227, 211,
+ 212, 201, 213, 81, 32, 33, 34, 202, 237, 161,
+ 172, 35, 177, 49, 37, 58, 59, 38, 112, 120,
+ 168, 190, 39, 100
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -178
+#define YYPACT_NINF -176
static const yytype_int16 yypact[] =
{
- 199, -40, -178, -178, 2, -178, -21, 517, -178, -178,
- 32, 128, -178, 38, 42, 49, 2, 43, 98, 58,
- 86, 2, 2, 2, 2, 4, -178, 7, -178, -178,
- -178, 47, 56, 236, 498, -178, -178, -178, -178, -178,
- 52, 2, -178, 498, 2, 2, 2, -178, 57, -178,
- 109, -178, 110, -178, 96, -178, 23, 40, -178, -178,
- -178, -178, 388, 114, -178, -17, 2, -7, -178, -178,
- 560, 560, 560, 455, -178, -178, 255, 236, 2, 236,
- 91, 479, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 388, 498, 45,
- 54, 62, 119, -178, -178, 121, -178, 122, 125, 103,
- -178, -178, 127, -178, 2, 2, 412, 2, 2, -178,
- -178, -178, 77, 498, 80, 431, 88, 2, 498, 498,
- 498, 498, 498, 498, 498, 498, 541, 541, 560, 560,
- 498, 498, 498, -178, 2, -178, -178, -178, -178, -178,
- 138, -178, 498, 498, 2, 2, 498, 498, 138, -178,
- 3, -178, -178, 373, 498, 498, -178, 5, 498, 498,
- 5, 311, 115, 2, 311, -178, -178, 139, 95, 95,
- -178, -178, 145, 2, 498, 9, -1, -178, 152, -178,
- -178, 132, 498, -178, 144, -178, 151, -178, -178, 151,
- -178, 236, -178, 311, 311, -178, -178, 311, -178, 311,
- 151, 151, -178, 236, 373, -178, 130, 137, 311, 157,
- 158, -178, 159, 142, -178, -178, -178, -178, 163, 148,
- 160, 162, 14, -178, 373, -178, 342, 153, -178, -178,
- -178, 311, -178, -178, -178, -178, -178
+ 200, -43, -176, -176, 4, -176, -19, -176, 550, -176,
+ -176, 26, 119, -176, 41, 43, 56, 4, 76, 98,
+ 61, 96, 4, 4, 4, 4, 6, -176, 9, -176,
+ -176, -176, -16, 67, 406, 531, -176, -176, -176, -176,
+ -176, 49, 4, -176, 531, 4, 4, 4, -176, 58,
+ -176, 103, -176, 110, -176, 100, -176, 21, 34, -176,
+ -176, -176, -176, 421, 121, -176, -15, 4, -4, -176,
+ -176, 574, 574, 574, 488, -176, -176, 257, 406, 4,
+ 406, 95, 512, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 421, 531,
+ 40, 46, 68, 122, -176, -176, 123, -176, 127, 128,
+ 113, -176, -176, 141, -176, 4, 4, 445, 4, 4,
+ -176, -176, -176, 91, 531, 92, 464, 104, 4, 531,
+ 531, 531, 531, 531, 531, 531, 531, 252, 252, 574,
+ 574, 531, 531, 531, -176, 4, -176, -176, -176, -176,
+ -176, 147, -176, 531, 531, 4, 4, 531, 531, 147,
+ -176, 5, -176, -176, 376, 531, 531, -176, 16, 531,
+ 531, 16, 314, 124, 4, 314, -176, -176, 152, 99,
+ 99, -176, -176, 149, 4, 531, 12, -8, -176, 156,
+ -176, -176, 135, 531, -176, 150, -176, 153, -176, -176,
+ 153, -176, 406, -176, 314, 314, -176, -176, 314, -176,
+ 314, 153, 153, -176, 406, 376, -176, 132, 138, 314,
+ 157, 162, -176, 163, 146, -176, -176, -176, -176, 165,
+ 151, 161, 164, 11, -176, 376, -176, 345, 154, -176,
+ -176, -176, 314, -176, -176, -176, -176, -176
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -178, -178, -23, 113, 26, -160, 0, -178, -178, -178,
- 8, -148, -20, -71, -178, -178, -178, -177, -6, -38,
- -133, 1, 28, -178, -178, -178, 134, -178, -178, -178,
- 35, 16, -178, 55
+ -176, -176, -24, 114, 8, -160, 0, -176, -176, -176,
+ 7, -154, -21, -75, -176, -176, -176, -175, -7, -47,
+ -131, 3, 24, -176, -176, -176, 140, -176, -176, -176,
+ 37, 13, -176, 33
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -59
+#define YYTABLE_NINF -60
static const yytype_int16 yytable[] =
{
- 29, 46, 76, 175, 74, 43, 122, -10, 124, 2,
- 3, 4, 5, 6, 40, 8, 197, 62, 172, 213,
- 114, 39, 70, 71, 72, 73, 27, 194, 35, 174,
- 117, -50, -50, 213, 81, 41, 106, 18, 115, 198,
- 173, 44, 97, 107, 47, 98, 98, 98, 118, 195,
- 59, 215, 108, 21, 224, 60, 203, 204, 22, 23,
- 207, 61, 209, 215, 24, 75, 75, 116, -10, 52,
- 68, 54, 177, 218, 242, -50, 29, 109, 81, 123,
- 125, 63, 64, 128, 129, 130, 131, 132, 133, 134,
- 135, 136, 137, 138, 139, 140, 141, 142, 69, 241,
- 100, 101, 27, 162, 35, 150, 65, 66, 143, 77,
- 67, 78, 144, 158, 45, 152, 153, 145, 156, 157,
- 163, 144, 103, 104, 102, 105, 113, 126, 164, 144,
- 217, 146, 108, 182, 147, 148, 185, 186, 149, 151,
- 159, 49, 223, 161, 178, 165, 193, 179, 50, 75,
- 166, 187, 183, 51, 206, 168, 169, 52, 53, 54,
- 55, 216, 188, 191, 202, 56, 205, 208, 197, 219,
- 225, 220, 222, 227, 184, 229, 230, 231, 232, 196,
- 228, 237, 238, 239, 192, 240, 233, 244, 235, 121,
- 221, 110, 214, 170, 199, 190, 0, 0, 0, -6,
- 1, 0, 81, 245, 0, 246, 2, 3, 4, 5,
- 6, 7, 8, 0, 81, 0, 0, 0, 9, 234,
- 10, 11, 12, 0, 0, 13, 14, 15, 0, 0,
- 0, 0, 16, 17, 18, 0, 243, 0, 0, 0,
- 19, 20, 0, 2, 3, 4, 5, 6, 40, 8,
- 21, 0, 0, 0, 0, 22, 23, 0, 0, 0,
- -6, 24, 2, 3, 4, 5, 6, 7, 8, 41,
- 0, 18, 0, 0, 9, 0, 10, 11, 12, 0,
- 0, 13, 14, 15, 0, 0, 0, 21, 16, 17,
- 18, 0, 22, 23, 0, 0, 19, 20, 79, 0,
- 0, 0, 0, 0, 0, 0, 21, 0, 0, 0,
- 0, 22, 23, 0, 0, 0, 0, 24, 2, 3,
- 4, 5, 6, 40, 8, 0, 0, 0, 0, 0,
- 9, 0, 10, 11, 12, 0, 0, 0, 14, 15,
- 0, 0, 0, 0, 16, 17, 18, 0, 0, 2,
- 3, 4, 5, 6, 40, 8, 0, 0, 0, 0,
- 0, 9, 21, 10, 11, 12, 0, 22, 23, 14,
- 15, 0, 75, 24, 0, 16, 17, 18, 0, 0,
- 2, 3, 4, 5, 6, 40, 8, 0, 0, 0,
- 0, 0, 9, 21, 10, 11, 0, 0, 22, 23,
- 14, 15, 0, 0, 24, 0, 16, 0, 18, 0,
- 0, 0, 112, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 21, 0, 0, 0, 0, 22,
- 23, 82, 83, 0, 0, 24, 84, 85, 86, 0,
- 87, 88, 89, 0, 90, 91, 92, 93, 0, 154,
- 0, 0, 94, 95, 96, 82, 83, 0, 0, 0,
- 84, 85, 86, 0, 87, 88, 89, 155, 90, 91,
- 92, 93, 0, 0, 82, 83, 94, 95, 96, 84,
- 85, 86, 0, 87, 88, 89, 127, 90, 91, 92,
- 93, 0, 0, 0, 120, 94, 95, 96, 82, 83,
- 0, 0, 0, 84, 85, 86, 0, 87, 88, 89,
- 0, 90, 91, 92, 93, 0, 0, 0, 120, 94,
- 95, 96, 82, 83, 0, 0, 0, 84, 85, 86,
- 0, 87, 88, 89, 127, 90, 91, 92, 93, 0,
- 0, 82, 83, 94, 95, 96, 84, 85, 86, 0,
- 87, 88, 89, 0, 90, 91, 92, 93, 0, 0,
- -58, -58, 94, 95, 96, -58, -58, -58, 0, -58,
- -58, -58, 0, 0, 0, -58, -58, 0, 0, 45,
- 0, -58, -58, -58, 82, 83, 0, 0, 0, 84,
- 85, 86, 0, 87, 88, 89, 0, 0, 0, 92,
- 93, 0, 0, 82, 83, 94, 95, 96, 84, 85,
- 86, 0, 87, 88, 89, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 94, 95, 96
+ 30, 47, 77, 123, 176, 125, 75, 44, 28, -10,
+ 198, 2, 3, 4, 5, 6, 7, 41, 9, 40,
+ 63, 173, 214, 115, 36, 71, 72, 73, 74, -50,
+ -50, 195, 175, 199, 118, 107, 214, 82, 42, 48,
+ 19, 116, 108, 174, 45, 98, 216, 78, 99, 99,
+ 99, 109, 119, 196, 60, 225, 22, 61, 216, 204,
+ 205, 23, 24, 208, 53, 210, 55, 25, 76, 62,
+ 117, -10, 110, -50, 69, 243, 219, 30, 76, 101,
+ 102, 82, 124, 126, 178, 28, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
+ 143, 36, 242, 163, 144, 151, 66, 67, 145, 70,
+ 146, 68, 46, 159, 145, 64, 65, 104, 153, 154,
+ 164, 157, 158, 79, 105, 183, 103, 218, 186, 187,
+ 106, 165, 127, 50, 114, 147, 145, 148, 194, 224,
+ 51, 149, 150, 109, 179, 52, 207, 180, 166, 53,
+ 54, 55, 56, 217, 152, 160, 162, 57, 169, 170,
+ 167, 220, 184, 221, 223, 188, 76, 189, 192, 203,
+ 206, 198, 229, 226, 209, 228, 230, 185, 234, 197,
+ 236, 231, 232, 233, 238, 240, 239, 193, 241, 245,
+ 222, 122, 215, 191, 200, 246, 171, 247, 111, 0,
+ -6, 1, 0, 0, 0, 82, 0, 2, 3, 4,
+ 5, 6, 7, 8, 9, 0, 0, 82, 0, 235,
+ 10, 0, 11, 12, 13, 0, 0, 14, 15, 16,
+ 0, 0, 0, 0, 17, 18, 19, 244, 0, 0,
+ 0, 0, 20, 21, 0, 0, 0, 0, 0, 0,
+ 0, 0, 22, 0, 0, 0, 0, 23, 24, 0,
+ 0, 0, -6, 25, 2, 3, 4, 5, 6, 7,
+ 8, 9, 0, 0, 0, 0, 0, 10, 0, 11,
+ 12, 13, 0, 0, 14, 15, 16, 0, 0, 0,
+ 0, 17, 18, 19, 0, 0, 83, 84, 0, 20,
+ 21, 85, 86, 87, 0, 88, 89, 90, 0, 22,
+ 0, 93, 94, 0, 23, 24, 0, 95, 96, 97,
+ 25, 2, 3, 4, 5, 6, 7, 41, 9, 0,
+ 0, 0, 0, 0, 10, 0, 11, 12, 13, 0,
+ 0, 0, 15, 16, 0, 0, 0, 0, 17, 18,
+ 19, 0, 2, 3, 4, 5, 6, 7, 41, 9,
+ 0, 0, 0, 0, 0, 10, 22, 11, 12, 13,
+ 0, 23, 24, 15, 16, 0, 76, 25, 0, 17,
+ 18, 19, 0, 2, 3, 4, 5, 6, 7, 41,
+ 9, 0, 0, 0, 0, 0, 10, 22, 11, 12,
+ 0, 0, 23, 24, 15, 16, 0, 0, 25, 0,
+ 17, 0, 19, 2, 3, 4, 5, 6, 7, 41,
+ 9, 0, 0, 0, 0, 0, 0, 0, 22, 0,
+ 0, 0, 0, 23, 24, 0, 0, 0, 0, 25,
+ 42, 0, 19, 0, 0, 0, 113, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 22, 0,
+ 0, 0, 0, 23, 24, 83, 84, 0, 0, 80,
+ 85, 86, 87, 0, 88, 89, 90, 0, 91, 92,
+ 93, 94, 0, 155, 0, 0, 95, 96, 97, 83,
+ 84, 0, 0, 0, 85, 86, 87, 0, 88, 89,
+ 90, 156, 91, 92, 93, 94, 0, 0, 83, 84,
+ 95, 96, 97, 85, 86, 87, 0, 88, 89, 90,
+ 128, 91, 92, 93, 94, 0, 0, 0, 121, 95,
+ 96, 97, 83, 84, 0, 0, 0, 85, 86, 87,
+ 0, 88, 89, 90, 0, 91, 92, 93, 94, 0,
+ 0, 0, 121, 95, 96, 97, 83, 84, 0, 0,
+ 0, 85, 86, 87, 0, 88, 89, 90, 128, 91,
+ 92, 93, 94, 0, 0, 83, 84, 95, 96, 97,
+ 85, 86, 87, 0, 88, 89, 90, 0, 91, 92,
+ 93, 94, 0, 0, -59, -59, 95, 96, 97, -59,
+ -59, -59, 0, -59, -59, -59, 0, 0, 0, -59,
+ -59, 0, 0, 46, 0, -59, -59, -59, 83, 84,
+ 0, 0, 0, 85, 86, 87, 0, 88, 89, 90,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 95,
+ 96, 97
};
static const yytype_int16 yycheck[] =
{
- 0, 7, 25, 163, 0, 4, 77, 0, 79, 7,
- 8, 9, 10, 11, 12, 13, 17, 16, 15, 196,
- 37, 61, 21, 22, 23, 24, 0, 18, 0, 162,
- 37, 17, 18, 210, 33, 33, 13, 35, 55, 40,
- 37, 62, 41, 20, 12, 44, 45, 46, 55, 40,
- 12, 199, 29, 51, 214, 13, 189, 190, 56, 57,
- 193, 12, 195, 211, 62, 61, 61, 66, 61, 29,
- 12, 31, 67, 206, 234, 61, 76, 37, 77, 78,
- 79, 38, 39, 82, 83, 84, 85, 86, 87, 88,
- 89, 90, 91, 92, 93, 94, 95, 96, 12, 232,
- 45, 46, 76, 126, 76, 111, 8, 9, 63, 62,
- 12, 55, 67, 119, 62, 114, 115, 63, 117, 118,
- 126, 67, 13, 13, 67, 29, 12, 36, 127, 67,
- 201, 12, 29, 171, 13, 13, 174, 175, 13, 12,
- 63, 13, 213, 63, 167, 144, 184, 170, 20, 61,
- 12, 12, 37, 25, 192, 154, 155, 29, 30, 31,
- 32, 199, 67, 18, 12, 37, 34, 23, 17, 207,
- 40, 209, 210, 36, 173, 18, 18, 18, 36, 185,
- 218, 18, 34, 23, 183, 23, 224, 34, 226, 76,
- 210, 57, 198, 158, 186, 179, -1, -1, -1, 0,
- 1, -1, 201, 241, -1, 243, 7, 8, 9, 10,
- 11, 12, 13, -1, 213, -1, -1, -1, 19, 225,
- 21, 22, 23, -1, -1, 26, 27, 28, -1, -1,
- -1, -1, 33, 34, 35, -1, 236, -1, -1, -1,
- 41, 42, -1, 7, 8, 9, 10, 11, 12, 13,
- 51, -1, -1, -1, -1, 56, 57, -1, -1, -1,
- 61, 62, 7, 8, 9, 10, 11, 12, 13, 33,
- -1, 35, -1, -1, 19, -1, 21, 22, 23, -1,
- -1, 26, 27, 28, -1, -1, -1, 51, 33, 34,
- 35, -1, 56, 57, -1, -1, 41, 42, 62, -1,
- -1, -1, -1, -1, -1, -1, 51, -1, -1, -1,
- -1, 56, 57, -1, -1, -1, -1, 62, 7, 8,
- 9, 10, 11, 12, 13, -1, -1, -1, -1, -1,
- 19, -1, 21, 22, 23, -1, -1, -1, 27, 28,
- -1, -1, -1, -1, 33, 34, 35, -1, -1, 7,
- 8, 9, 10, 11, 12, 13, -1, -1, -1, -1,
- -1, 19, 51, 21, 22, 23, -1, 56, 57, 27,
- 28, -1, 61, 62, -1, 33, 34, 35, -1, -1,
- 7, 8, 9, 10, 11, 12, 13, -1, -1, -1,
- -1, -1, 19, 51, 21, 22, -1, -1, 56, 57,
- 27, 28, -1, -1, 62, -1, 33, -1, 35, -1,
- -1, -1, 24, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 51, -1, -1, -1, -1, 56,
- 57, 43, 44, -1, -1, 62, 48, 49, 50, -1,
- 52, 53, 54, -1, 56, 57, 58, 59, -1, 37,
- -1, -1, 64, 65, 66, 43, 44, -1, -1, -1,
- 48, 49, 50, -1, 52, 53, 54, 55, 56, 57,
- 58, 59, -1, -1, 43, 44, 64, 65, 66, 48,
- 49, 50, -1, 52, 53, 54, 55, 56, 57, 58,
- 59, -1, -1, -1, 63, 64, 65, 66, 43, 44,
- -1, -1, -1, 48, 49, 50, -1, 52, 53, 54,
- -1, 56, 57, 58, 59, -1, -1, -1, 63, 64,
- 65, 66, 43, 44, -1, -1, -1, 48, 49, 50,
- -1, 52, 53, 54, 55, 56, 57, 58, 59, -1,
- -1, 43, 44, 64, 65, 66, 48, 49, 50, -1,
- 52, 53, 54, -1, 56, 57, 58, 59, -1, -1,
- 43, 44, 64, 65, 66, 48, 49, 50, -1, 52,
- 53, 54, -1, -1, -1, 58, 59, -1, -1, 62,
- -1, 64, 65, 66, 43, 44, -1, -1, -1, 48,
- 49, 50, -1, 52, 53, 54, -1, -1, -1, 58,
- 59, -1, -1, 43, 44, 64, 65, 66, 48, 49,
- 50, -1, 52, 53, 54, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 64, 65, 66
+ 0, 8, 26, 78, 164, 80, 0, 4, 0, 0,
+ 18, 7, 8, 9, 10, 11, 12, 13, 14, 62,
+ 17, 16, 197, 38, 0, 22, 23, 24, 25, 18,
+ 19, 19, 163, 41, 38, 14, 211, 34, 34, 13,
+ 36, 56, 21, 38, 63, 42, 200, 63, 45, 46,
+ 47, 30, 56, 41, 13, 215, 52, 14, 212, 190,
+ 191, 57, 58, 194, 30, 196, 32, 63, 62, 13,
+ 67, 62, 38, 62, 13, 235, 207, 77, 62, 46,
+ 47, 78, 79, 80, 68, 77, 83, 84, 85, 86,
+ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
+ 97, 77, 233, 127, 64, 112, 8, 9, 68, 13,
+ 64, 13, 63, 120, 68, 39, 40, 14, 115, 116,
+ 127, 118, 119, 56, 14, 172, 68, 202, 175, 176,
+ 30, 128, 37, 14, 13, 13, 68, 14, 185, 214,
+ 21, 14, 14, 30, 168, 26, 193, 171, 145, 30,
+ 31, 32, 33, 200, 13, 64, 64, 38, 155, 156,
+ 13, 208, 38, 210, 211, 13, 62, 68, 19, 13,
+ 35, 18, 219, 41, 24, 37, 19, 174, 225, 186,
+ 227, 19, 19, 37, 19, 24, 35, 184, 24, 35,
+ 211, 77, 199, 180, 187, 242, 159, 244, 58, -1,
+ 0, 1, -1, -1, -1, 202, -1, 7, 8, 9,
+ 10, 11, 12, 13, 14, -1, -1, 214, -1, 226,
+ 20, -1, 22, 23, 24, -1, -1, 27, 28, 29,
+ -1, -1, -1, -1, 34, 35, 36, 237, -1, -1,
+ -1, -1, 42, 43, -1, -1, -1, -1, -1, -1,
+ -1, -1, 52, -1, -1, -1, -1, 57, 58, -1,
+ -1, -1, 62, 63, 7, 8, 9, 10, 11, 12,
+ 13, 14, -1, -1, -1, -1, -1, 20, -1, 22,
+ 23, 24, -1, -1, 27, 28, 29, -1, -1, -1,
+ -1, 34, 35, 36, -1, -1, 44, 45, -1, 42,
+ 43, 49, 50, 51, -1, 53, 54, 55, -1, 52,
+ -1, 59, 60, -1, 57, 58, -1, 65, 66, 67,
+ 63, 7, 8, 9, 10, 11, 12, 13, 14, -1,
+ -1, -1, -1, -1, 20, -1, 22, 23, 24, -1,
+ -1, -1, 28, 29, -1, -1, -1, -1, 34, 35,
+ 36, -1, 7, 8, 9, 10, 11, 12, 13, 14,
+ -1, -1, -1, -1, -1, 20, 52, 22, 23, 24,
+ -1, 57, 58, 28, 29, -1, 62, 63, -1, 34,
+ 35, 36, -1, 7, 8, 9, 10, 11, 12, 13,
+ 14, -1, -1, -1, -1, -1, 20, 52, 22, 23,
+ -1, -1, 57, 58, 28, 29, -1, -1, 63, -1,
+ 34, -1, 36, 7, 8, 9, 10, 11, 12, 13,
+ 14, -1, -1, -1, -1, -1, -1, -1, 52, -1,
+ -1, -1, -1, 57, 58, -1, -1, -1, -1, 63,
+ 34, -1, 36, -1, -1, -1, 25, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 52, -1,
+ -1, -1, -1, 57, 58, 44, 45, -1, -1, 63,
+ 49, 50, 51, -1, 53, 54, 55, -1, 57, 58,
+ 59, 60, -1, 38, -1, -1, 65, 66, 67, 44,
+ 45, -1, -1, -1, 49, 50, 51, -1, 53, 54,
+ 55, 56, 57, 58, 59, 60, -1, -1, 44, 45,
+ 65, 66, 67, 49, 50, 51, -1, 53, 54, 55,
+ 56, 57, 58, 59, 60, -1, -1, -1, 64, 65,
+ 66, 67, 44, 45, -1, -1, -1, 49, 50, 51,
+ -1, 53, 54, 55, -1, 57, 58, 59, 60, -1,
+ -1, -1, 64, 65, 66, 67, 44, 45, -1, -1,
+ -1, 49, 50, 51, -1, 53, 54, 55, 56, 57,
+ 58, 59, 60, -1, -1, 44, 45, 65, 66, 67,
+ 49, 50, 51, -1, 53, 54, 55, -1, 57, 58,
+ 59, 60, -1, -1, 44, 45, 65, 66, 67, 49,
+ 50, 51, -1, 53, 54, 55, -1, -1, -1, 59,
+ 60, -1, -1, 63, -1, 65, 66, 67, 44, 45,
+ -1, -1, -1, 49, 50, 51, -1, 53, 54, 55,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 65,
+ 66, 67
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
- 0, 1, 7, 8, 9, 10, 11, 12, 13, 19,
- 21, 22, 23, 26, 27, 28, 33, 34, 35, 41,
- 42, 51, 56, 57, 62, 69, 71, 72, 73, 74,
- 75, 82, 83, 84, 89, 90, 92, 95, 100, 61,
- 12, 33, 72, 89, 62, 62, 86, 12, 91, 13,
- 20, 25, 29, 30, 31, 32, 37, 93, 94, 12,
- 13, 12, 89, 38, 39, 8, 9, 12, 12, 12,
- 89, 89, 89, 89, 0, 61, 70, 62, 55, 62,
- 81, 89, 43, 44, 48, 49, 50, 52, 53, 54,
- 56, 57, 58, 59, 64, 65, 66, 89, 89, 101,
- 101, 101, 67, 13, 13, 29, 13, 20, 29, 37,
- 94, 96, 24, 12, 37, 55, 89, 37, 55, 97,
- 63, 71, 81, 89, 81, 89, 36, 55, 89, 89,
- 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 63, 67, 63, 12, 13, 13, 13,
- 86, 12, 89, 89, 37, 55, 89, 89, 86, 63,
- 87, 63, 70, 86, 89, 89, 12, 98, 89, 89,
- 98, 88, 15, 37, 88, 73, 90, 67, 70, 70,
- 70, 74, 87, 37, 89, 87, 87, 12, 67, 99,
- 99, 18, 89, 87, 18, 40, 86, 17, 40, 78,
- 79, 85, 12, 88, 88, 34, 87, 88, 23, 88,
- 77, 78, 80, 85, 86, 79, 87, 81, 88, 87,
- 87, 80, 87, 81, 73, 40, 76, 36, 87, 18,
- 18, 18, 36, 87, 86, 87, 86, 18, 34, 23,
- 23, 88, 73, 74, 34, 87, 87
+ 0, 1, 7, 8, 9, 10, 11, 12, 13, 14,
+ 20, 22, 23, 24, 27, 28, 29, 34, 35, 36,
+ 42, 43, 52, 57, 58, 63, 70, 72, 73, 74,
+ 75, 76, 83, 84, 85, 90, 91, 93, 96, 101,
+ 62, 13, 34, 73, 90, 63, 63, 87, 13, 92,
+ 14, 21, 26, 30, 31, 32, 33, 38, 94, 95,
+ 13, 14, 13, 90, 39, 40, 8, 9, 13, 13,
+ 13, 90, 90, 90, 90, 0, 62, 71, 63, 56,
+ 63, 82, 90, 44, 45, 49, 50, 51, 53, 54,
+ 55, 57, 58, 59, 60, 65, 66, 67, 90, 90,
+ 102, 102, 102, 68, 14, 14, 30, 14, 21, 30,
+ 38, 95, 97, 25, 13, 38, 56, 90, 38, 56,
+ 98, 64, 72, 82, 90, 82, 90, 37, 56, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 64, 68, 64, 13, 14, 14,
+ 14, 87, 13, 90, 90, 38, 56, 90, 90, 87,
+ 64, 88, 64, 71, 87, 90, 90, 13, 99, 90,
+ 90, 99, 89, 16, 38, 89, 74, 91, 68, 71,
+ 71, 71, 75, 88, 38, 90, 88, 88, 13, 68,
+ 100, 100, 19, 90, 88, 19, 41, 87, 18, 41,
+ 79, 80, 86, 13, 89, 89, 35, 88, 89, 24,
+ 89, 78, 79, 81, 86, 87, 80, 88, 82, 89,
+ 88, 88, 81, 88, 82, 74, 41, 77, 37, 88,
+ 19, 19, 19, 37, 88, 87, 88, 87, 19, 35,
+ 24, 24, 89, 74, 75, 35, 88, 88
};
#define yyerrok (yyerrstatus = 0)
@@ -2078,6 +2085,13 @@ yyreduce:
case 57:
#line 355 "engines/director/lingo/lingo-gr.y"
{
+ (yyval.code) = g_lingo->code1(g_lingo->_builtins[*(yyvsp[(1) - (1)].s)]->func);
+ delete (yyvsp[(1) - (1)].s); ;}
+ break;
+
+ case 58:
+#line 358 "engines/director/lingo/lingo-gr.y"
+ {
(yyval.code) = g_lingo->code1(g_lingo->c_call);
g_lingo->codeString((yyvsp[(1) - (4)].s)->c_str());
@@ -2087,15 +2101,15 @@ yyreduce:
delete (yyvsp[(1) - (4)].s); ;}
break;
- case 58:
-#line 363 "engines/director/lingo/lingo-gr.y"
+ case 59:
+#line 366 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->codeId(*(yyvsp[(1) - (1)].s));
delete (yyvsp[(1) - (1)].s); ;}
break;
- case 59:
-#line 366 "engines/director/lingo/lingo-gr.y"
+ case 60:
+#line 369 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code2(g_lingo->c_constpush, 0); // Put dummy id
g_lingo->code1(g_lingo->c_theentitypush);
@@ -2105,8 +2119,8 @@ yyreduce:
g_lingo->code2(e, f); ;}
break;
- case 60:
-#line 373 "engines/director/lingo/lingo-gr.y"
+ case 61:
+#line 376 "engines/director/lingo/lingo-gr.y"
{
(yyval.code) = g_lingo->code1(g_lingo->c_theentitypush);
inst e = 0, f = 0;
@@ -2115,149 +2129,149 @@ yyreduce:
g_lingo->code2(e, f); ;}
break;
- case 62:
-#line 380 "engines/director/lingo/lingo-gr.y"
+ case 63:
+#line 383 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_add); ;}
break;
- case 63:
-#line 381 "engines/director/lingo/lingo-gr.y"
+ case 64:
+#line 384 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_sub); ;}
break;
- case 64:
-#line 382 "engines/director/lingo/lingo-gr.y"
+ case 65:
+#line 385 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_mul); ;}
break;
- case 65:
-#line 383 "engines/director/lingo/lingo-gr.y"
+ case 66:
+#line 386 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_div); ;}
break;
- case 66:
-#line 384 "engines/director/lingo/lingo-gr.y"
+ case 67:
+#line 387 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_gt); ;}
break;
- case 67:
-#line 385 "engines/director/lingo/lingo-gr.y"
+ case 68:
+#line 388 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_lt); ;}
break;
- case 68:
-#line 386 "engines/director/lingo/lingo-gr.y"
+ case 69:
+#line 389 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_neq); ;}
break;
- case 69:
-#line 387 "engines/director/lingo/lingo-gr.y"
+ case 70:
+#line 390 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_ge); ;}
break;
- case 70:
-#line 388 "engines/director/lingo/lingo-gr.y"
+ case 71:
+#line 391 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_le); ;}
break;
- case 71:
-#line 389 "engines/director/lingo/lingo-gr.y"
+ case 72:
+#line 392 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_and); ;}
break;
- case 72:
-#line 390 "engines/director/lingo/lingo-gr.y"
+ case 73:
+#line 393 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_or); ;}
break;
- case 73:
-#line 391 "engines/director/lingo/lingo-gr.y"
+ case 74:
+#line 394 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_not); ;}
break;
- case 74:
-#line 392 "engines/director/lingo/lingo-gr.y"
+ case 75:
+#line 395 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_ampersand); ;}
break;
- case 75:
-#line 393 "engines/director/lingo/lingo-gr.y"
+ case 76:
+#line 396 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_concat); ;}
break;
- case 76:
-#line 394 "engines/director/lingo/lingo-gr.y"
+ case 77:
+#line 397 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_contains); ;}
break;
- case 77:
-#line 395 "engines/director/lingo/lingo-gr.y"
+ case 78:
+#line 398 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_starts); ;}
break;
- case 78:
-#line 396 "engines/director/lingo/lingo-gr.y"
+ case 79:
+#line 399 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = (yyvsp[(2) - (2)].code); ;}
break;
- case 79:
-#line 397 "engines/director/lingo/lingo-gr.y"
+ case 80:
+#line 400 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = (yyvsp[(2) - (2)].code); g_lingo->code1(g_lingo->c_negate); ;}
break;
- case 80:
-#line 398 "engines/director/lingo/lingo-gr.y"
+ case 81:
+#line 401 "engines/director/lingo/lingo-gr.y"
{ (yyval.code) = (yyvsp[(2) - (3)].code); ;}
break;
- case 81:
-#line 401 "engines/director/lingo/lingo-gr.y"
+ case 82:
+#line 404 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_mci); g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str()); delete (yyvsp[(2) - (2)].s); ;}
break;
- case 82:
-#line 402 "engines/director/lingo/lingo-gr.y"
+ case 83:
+#line 405 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_mciwait); g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str()); delete (yyvsp[(2) - (2)].s); ;}
break;
- case 83:
-#line 403 "engines/director/lingo/lingo-gr.y"
+ case 84:
+#line 406 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_printtop); ;}
break;
- case 85:
-#line 405 "engines/director/lingo/lingo-gr.y"
- { g_lingo->code2(g_lingo->c_constpush, (inst)0); // Push fake value on stack
- g_lingo->code1(g_lingo->c_procret); ;}
+ case 86:
+#line 408 "engines/director/lingo/lingo-gr.y"
+ { g_lingo->code2(g_lingo->c_constpush, (inst)0); // Push fake value on stack
+ g_lingo->code1(g_lingo->c_procret); ;}
break;
- case 87:
-#line 410 "engines/director/lingo/lingo-gr.y"
+ case 88:
+#line 413 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_global); g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); delete (yyvsp[(1) - (1)].s); ;}
break;
- case 88:
-#line 411 "engines/director/lingo/lingo-gr.y"
+ case 89:
+#line 414 "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 89:
-#line 422 "engines/director/lingo/lingo-gr.y"
+ case 90:
+#line 425 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_gotoloop); ;}
break;
- case 90:
-#line 423 "engines/director/lingo/lingo-gr.y"
+ case 91:
+#line 426 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_gotonext); ;}
break;
- case 91:
-#line 424 "engines/director/lingo/lingo-gr.y"
+ case 92:
+#line 427 "engines/director/lingo/lingo-gr.y"
{ g_lingo->code1(g_lingo->c_gotoprevious); ;}
break;
- case 92:
-#line 425 "engines/director/lingo/lingo-gr.y"
+ case 93:
+#line 428 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_goto);
g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str());
@@ -2265,8 +2279,8 @@ yyreduce:
delete (yyvsp[(2) - (2)].s); ;}
break;
- case 93:
-#line 430 "engines/director/lingo/lingo-gr.y"
+ case 94:
+#line 433 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_goto);
g_lingo->codeString((yyvsp[(2) - (3)].s)->c_str());
@@ -2275,8 +2289,8 @@ yyreduce:
delete (yyvsp[(3) - (3)].s); ;}
break;
- case 94:
-#line 436 "engines/director/lingo/lingo-gr.y"
+ case 95:
+#line 439 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_goto);
g_lingo->codeString("");
@@ -2284,48 +2298,48 @@ yyreduce:
delete (yyvsp[(2) - (2)].s); ;}
break;
- case 95:
-#line 443 "engines/director/lingo/lingo-gr.y"
- { (yyval.s) = (yyvsp[(3) - (3)].s); ;}
- break;
-
case 96:
-#line 444 "engines/director/lingo/lingo-gr.y"
- { (yyval.s) = (yyvsp[(2) - (2)].s); ;}
+#line 446 "engines/director/lingo/lingo-gr.y"
+ { (yyval.s) = (yyvsp[(3) - (3)].s); ;}
break;
case 97:
-#line 445 "engines/director/lingo/lingo-gr.y"
+#line 447 "engines/director/lingo/lingo-gr.y"
{ (yyval.s) = (yyvsp[(2) - (2)].s); ;}
break;
case 98:
-#line 446 "engines/director/lingo/lingo-gr.y"
- { (yyval.s) = (yyvsp[(1) - (1)].s); ;}
+#line 448 "engines/director/lingo/lingo-gr.y"
+ { (yyval.s) = (yyvsp[(2) - (2)].s); ;}
break;
case 99:
#line 449 "engines/director/lingo/lingo-gr.y"
- { (yyval.s) = (yyvsp[(3) - (3)].s); ;}
+ { (yyval.s) = (yyvsp[(1) - (1)].s); ;}
break;
case 100:
-#line 450 "engines/director/lingo/lingo-gr.y"
- { (yyval.s) = (yyvsp[(2) - (2)].s); ;}
+#line 452 "engines/director/lingo/lingo-gr.y"
+ { (yyval.s) = (yyvsp[(3) - (3)].s); ;}
break;
case 101:
-#line 451 "engines/director/lingo/lingo-gr.y"
- { (yyval.s) = (yyvsp[(3) - (3)].s); ;}
+#line 453 "engines/director/lingo/lingo-gr.y"
+ { (yyval.s) = (yyvsp[(2) - (2)].s); ;}
break;
case 102:
-#line 479 "engines/director/lingo/lingo-gr.y"
- { g_lingo->_indef = true; ;}
+#line 454 "engines/director/lingo/lingo-gr.y"
+ { (yyval.s) = (yyvsp[(3) - (3)].s); ;}
break;
case 103:
-#line 480 "engines/director/lingo/lingo-gr.y"
+#line 482 "engines/director/lingo/lingo-gr.y"
+ { g_lingo->_indef = true; ;}
+ break;
+
+ case 104:
+#line 483 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code2(g_lingo->c_constpush, (inst)0); // Push fake value on stack
g_lingo->code1(g_lingo->c_procret);
@@ -2333,20 +2347,20 @@ yyreduce:
g_lingo->_indef = false; ;}
break;
- case 104:
-#line 485 "engines/director/lingo/lingo-gr.y"
+ case 105:
+#line 488 "engines/director/lingo/lingo-gr.y"
{
g_lingo->codeFactory(*(yyvsp[(2) - (2)].s));
;}
break;
- case 105:
-#line 488 "engines/director/lingo/lingo-gr.y"
+ case 106:
+#line 491 "engines/director/lingo/lingo-gr.y"
{ g_lingo->_indef = true; ;}
break;
- case 106:
-#line 489 "engines/director/lingo/lingo-gr.y"
+ case 107:
+#line 492 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code2(g_lingo->c_constpush, (inst)0); // Push fake value on stack
g_lingo->code1(g_lingo->c_procret);
@@ -2354,33 +2368,33 @@ yyreduce:
g_lingo->_indef = false; ;}
break;
- case 107:
-#line 494 "engines/director/lingo/lingo-gr.y"
+ case 108:
+#line 497 "engines/director/lingo/lingo-gr.y"
{ (yyval.narg) = 0; ;}
break;
- case 108:
-#line 495 "engines/director/lingo/lingo-gr.y"
+ case 109:
+#line 498 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeArg((yyvsp[(1) - (1)].s)); (yyval.narg) = 1; ;}
break;
- case 109:
-#line 496 "engines/director/lingo/lingo-gr.y"
+ case 110:
+#line 499 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeArg((yyvsp[(3) - (3)].s)); (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}
break;
- case 110:
-#line 497 "engines/director/lingo/lingo-gr.y"
+ case 111:
+#line 500 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeArg((yyvsp[(4) - (4)].s)); (yyval.narg) = (yyvsp[(1) - (4)].narg) + 1; ;}
break;
- case 111:
-#line 499 "engines/director/lingo/lingo-gr.y"
+ case 112:
+#line 502 "engines/director/lingo/lingo-gr.y"
{ g_lingo->codeArgStore(); ;}
break;
- case 112:
-#line 503 "engines/director/lingo/lingo-gr.y"
+ case 113:
+#line 506 "engines/director/lingo/lingo-gr.y"
{
g_lingo->code1(g_lingo->c_call);
g_lingo->codeString((yyvsp[(1) - (3)].s)->c_str());
@@ -2389,24 +2403,24 @@ yyreduce:
g_lingo->code1(numpar); ;}
break;
- case 113:
-#line 511 "engines/director/lingo/lingo-gr.y"
+ case 114:
+#line 514 "engines/director/lingo/lingo-gr.y"
{ (yyval.narg) = 0; ;}
break;
- case 114:
-#line 512 "engines/director/lingo/lingo-gr.y"
+ case 115:
+#line 515 "engines/director/lingo/lingo-gr.y"
{ (yyval.narg) = 1; ;}
break;
- case 115:
-#line 513 "engines/director/lingo/lingo-gr.y"
+ case 116:
+#line 516 "engines/director/lingo/lingo-gr.y"
{ (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}
break;
/* Line 1267 of yacc.c. */
-#line 2410 "engines/director/lingo/lingo-gr.cpp"
+#line 2424 "engines/director/lingo/lingo-gr.cpp"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2620,6 +2634,6 @@ yyreturn:
}
-#line 516 "engines/director/lingo/lingo-gr.y"
+#line 519 "engines/director/lingo/lingo-gr.y"
diff --git a/engines/director/lingo/lingo-gr.h b/engines/director/lingo/lingo-gr.h
index 9ef3b17e7f..e55340ea85 100644
--- a/engines/director/lingo/lingo-gr.h
+++ b/engines/director/lingo/lingo-gr.h
@@ -48,49 +48,50 @@
THEENTITYWITHID = 264,
FLOAT = 265,
BLTIN = 266,
- ID = 267,
- STRING = 268,
- HANDLER = 269,
- tDOWN = 270,
- tELSE = 271,
- tNLELSIF = 272,
- tEND = 273,
- tEXIT = 274,
- tFRAME = 275,
- tGLOBAL = 276,
- tGO = 277,
- tIF = 278,
- tINTO = 279,
- tLOOP = 280,
- tMACRO = 281,
- tMCI = 282,
- tMCIWAIT = 283,
- tMOVIE = 284,
- tNEXT = 285,
- tOF = 286,
- tPREVIOUS = 287,
- tPUT = 288,
- tREPEAT = 289,
- tSET = 290,
- tTHEN = 291,
- tTO = 292,
- tWITH = 293,
- tWHILE = 294,
- tNLELSE = 295,
- tFACTORY = 296,
- tMETHOD = 297,
- tGE = 298,
- tLE = 299,
- tGT = 300,
- tLT = 301,
- tEQ = 302,
- tNEQ = 303,
- tAND = 304,
- tOR = 305,
- tNOT = 306,
- tCONCAT = 307,
- tCONTAINS = 308,
- tSTARTS = 309
+ BLTINNOARGS = 267,
+ ID = 268,
+ STRING = 269,
+ HANDLER = 270,
+ tDOWN = 271,
+ tELSE = 272,
+ tNLELSIF = 273,
+ tEND = 274,
+ tEXIT = 275,
+ tFRAME = 276,
+ tGLOBAL = 277,
+ tGO = 278,
+ tIF = 279,
+ tINTO = 280,
+ tLOOP = 281,
+ tMACRO = 282,
+ tMCI = 283,
+ tMCIWAIT = 284,
+ tMOVIE = 285,
+ tNEXT = 286,
+ tOF = 287,
+ tPREVIOUS = 288,
+ tPUT = 289,
+ tREPEAT = 290,
+ tSET = 291,
+ tTHEN = 292,
+ tTO = 293,
+ tWITH = 294,
+ tWHILE = 295,
+ tNLELSE = 296,
+ tFACTORY = 297,
+ tMETHOD = 298,
+ tGE = 299,
+ tLE = 300,
+ tGT = 301,
+ tLT = 302,
+ tEQ = 303,
+ tNEQ = 304,
+ tAND = 305,
+ tOR = 306,
+ tNOT = 307,
+ tCONCAT = 308,
+ tCONTAINS = 309,
+ tSTARTS = 310
};
#endif
/* Tokens. */
@@ -103,49 +104,50 @@
#define THEENTITYWITHID 264
#define FLOAT 265
#define BLTIN 266
-#define ID 267
-#define STRING 268
-#define HANDLER 269
-#define tDOWN 270
-#define tELSE 271
-#define tNLELSIF 272
-#define tEND 273
-#define tEXIT 274
-#define tFRAME 275
-#define tGLOBAL 276
-#define tGO 277
-#define tIF 278
-#define tINTO 279
-#define tLOOP 280
-#define tMACRO 281
-#define tMCI 282
-#define tMCIWAIT 283
-#define tMOVIE 284
-#define tNEXT 285
-#define tOF 286
-#define tPREVIOUS 287
-#define tPUT 288
-#define tREPEAT 289
-#define tSET 290
-#define tTHEN 291
-#define tTO 292
-#define tWITH 293
-#define tWHILE 294
-#define tNLELSE 295
-#define tFACTORY 296
-#define tMETHOD 297
-#define tGE 298
-#define tLE 299
-#define tGT 300
-#define tLT 301
-#define tEQ 302
-#define tNEQ 303
-#define tAND 304
-#define tOR 305
-#define tNOT 306
-#define tCONCAT 307
-#define tCONTAINS 308
-#define tSTARTS 309
+#define BLTINNOARGS 267
+#define ID 268
+#define STRING 269
+#define HANDLER 270
+#define tDOWN 271
+#define tELSE 272
+#define tNLELSIF 273
+#define tEND 274
+#define tEXIT 275
+#define tFRAME 276
+#define tGLOBAL 277
+#define tGO 278
+#define tIF 279
+#define tINTO 280
+#define tLOOP 281
+#define tMACRO 282
+#define tMCI 283
+#define tMCIWAIT 284
+#define tMOVIE 285
+#define tNEXT 286
+#define tOF 287
+#define tPREVIOUS 288
+#define tPUT 289
+#define tREPEAT 290
+#define tSET 291
+#define tTHEN 292
+#define tTO 293
+#define tWITH 294
+#define tWHILE 295
+#define tNLELSE 296
+#define tFACTORY 297
+#define tMETHOD 298
+#define tGE 299
+#define tLE 300
+#define tGT 301
+#define tLT 302
+#define tEQ 303
+#define tNEQ 304
+#define tAND 305
+#define tOR 306
+#define tNOT 307
+#define tCONCAT 308
+#define tCONTAINS 309
+#define tSTARTS 310
@@ -162,7 +164,7 @@ typedef union YYSTYPE
int narg; /* number of arguments */
}
/* Line 1529 of yacc.c. */
-#line 166 "engines/director/lingo/lingo-gr.hpp"
+#line 168 "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 9bdb29ed39..15c6c686b6 100644
--- a/engines/director/lingo/lingo-gr.y
+++ b/engines/director/lingo/lingo-gr.y
@@ -60,7 +60,7 @@ extern int yyparse();
using namespace Director;
void yyerror(char *s) {
g_lingo->_hadError = true;
- warning("%s at line %d col %d", s, g_lingo->_linenumber, g_lingo->_colnumber);
+ error("%s at line %d col %d", s, g_lingo->_linenumber, g_lingo->_colnumber);
}
@@ -79,7 +79,7 @@ void yyerror(char *s) {
%token<i> INT
%token<e> THEENTITY THEENTITYWITHID
%token<f> FLOAT
-%token<s> BLTIN ID STRING HANDLER
+%token<s> BLTIN BLTINNOARGS 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
%token tWITH tWHILE tNLELSE tFACTORY tMETHOD
@@ -352,6 +352,9 @@ expr: INT {
$$ = g_lingo->code1(g_lingo->_builtins[*$1]->func);
delete $1; }
+ | BLTINNOARGS {
+ $$ = g_lingo->code1(g_lingo->_builtins[*$1]->func);
+ delete $1; }
| ID '(' arglist ')' {
$$ = g_lingo->code1(g_lingo->c_call);
g_lingo->codeString($1->c_str());
@@ -402,8 +405,8 @@ func: tMCI STRING { g_lingo->code1(g_lingo->c_mci); g_lingo->codeString($2->c_
| tMCIWAIT ID { g_lingo->code1(g_lingo->c_mciwait); g_lingo->codeString($2->c_str()); delete $2; }
| tPUT expr { g_lingo->code1(g_lingo->c_printtop); }
| gotofunc
- | tEXIT { g_lingo->code2(g_lingo->c_constpush, (inst)0); // Push fake value on stack
- g_lingo->code1(g_lingo->c_procret); }
+ | tEXIT { g_lingo->code2(g_lingo->c_constpush, (inst)0); // Push fake value on stack
+ g_lingo->code1(g_lingo->c_procret); }
| tGLOBAL globallist
;
diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp
index 111574c6e9..f630dfd769 100644
--- a/engines/director/lingo/lingo-lex.cpp
+++ b/engines/director/lingo/lingo-lex.cpp
@@ -1205,49 +1205,53 @@ YY_RULE_SETUP
count();
yylval.s = new Common::String(yytext);
- if (g_lingo->_builtins.contains(yytext))
- return BLTIN;
+ if (g_lingo->_builtins.contains(yytext)) {
+ if (g_lingo->_builtins[yytext]->nargs == -1)
+ return BLTINNOARGS;
+ else
+ return BLTIN;
+ }
return ID;
}
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 173 "engines/director/lingo/lingo-lex.l"
+#line 177 "engines/director/lingo/lingo-lex.l"
{ count(); yylval.f = atof(yytext); return FLOAT; }
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 174 "engines/director/lingo/lingo-lex.l"
+#line 178 "engines/director/lingo/lingo-lex.l"
{ count(); yylval.i = strtol(yytext, NULL, 10); return INT; }
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 175 "engines/director/lingo/lingo-lex.l"
+#line 179 "engines/director/lingo/lingo-lex.l"
{ count(); return *yytext; }
YY_BREAK
case 47:
/* rule 47 can match eol */
YY_RULE_SETUP
-#line 176 "engines/director/lingo/lingo-lex.l"
+#line 180 "engines/director/lingo/lingo-lex.l"
{ return '\n'; }
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 177 "engines/director/lingo/lingo-lex.l"
+#line 181 "engines/director/lingo/lingo-lex.l"
{ count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return STRING; }
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 178 "engines/director/lingo/lingo-lex.l"
+#line 182 "engines/director/lingo/lingo-lex.l"
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 180 "engines/director/lingo/lingo-lex.l"
+#line 184 "engines/director/lingo/lingo-lex.l"
ECHO;
YY_BREAK
-#line 1251 "engines/director/lingo/lingo-lex.cpp"
+#line 1255 "engines/director/lingo/lingo-lex.cpp"
case YY_STATE_EOF(INITIAL):
yyterminate();
@@ -2247,7 +2251,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#line 180 "engines/director/lingo/lingo-lex.l"
+#line 184 "engines/director/lingo/lingo-lex.l"
diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l
index dd1fbace94..21110ceb3d 100644
--- a/engines/director/lingo/lingo-lex.l
+++ b/engines/director/lingo/lingo-lex.l
@@ -165,8 +165,12 @@ whitespace [\t ]
count();
yylval.s = new Common::String(yytext);
- if (g_lingo->_builtins.contains(yytext))
- return BLTIN;
+ if (g_lingo->_builtins.contains(yytext)) {
+ if (g_lingo->_builtins[yytext]->nargs == -1)
+ return BLTINNOARGS;
+ else
+ return BLTIN;
+ }
return ID;
}
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index 953e90bc7e..0afef2fa7e 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -253,6 +253,8 @@ public:
static void b_string();
static void b_tan();
+ static void b_dontpassevent();
+
void func_mci(Common::String &s);
void func_mciwait(Common::String &s);
void func_goto(Common::String &frame, Common::String &movie);
diff --git a/engines/director/lingo/tests/factory.lingo b/engines/director/lingo/tests/factory.lingo
index d458ba4bff..048bb606a1 100644
--- a/engines/director/lingo/tests/factory.lingo
+++ b/engines/director/lingo/tests/factory.lingo
@@ -37,11 +37,11 @@ method mAtFrame
dontpassevent
set the castnum of sprite 14 to bcast
set the LocV of sprite 14 to (startV-stepV)
- if sprite 14 intersects 10 and (startV-6) <= targetV then
+-- if sprite 14 intersects 10 and (startV-6) <= targetV then
set the castnum of sprite 14 to f16
set the perframehook to false
me(hit)
- exit
+-- exit
end if
if startV < targetV or bcast>g17 then
set the perframehook to false