diff --git a/engines/director/lingo/lingo-ast.h b/engines/director/lingo/lingo-ast.h index c15658b9b92..f39882280ad 100644 --- a/engines/director/lingo/lingo-ast.h +++ b/engines/director/lingo/lingo-ast.h @@ -47,6 +47,9 @@ struct IntNode; struct FloatNode; struct SymbolNode; struct StringNode; +struct ListNode; +struct PropListNode; +struct PropPairNode; struct FuncNode; struct VarNode; struct ParensNode; @@ -88,6 +91,9 @@ enum NodeType { kFloatNode, kSymbolNode, kStringNode, + kListNode, + kPropListNode, + kPropPairNode, kFuncNode, kVarNode, kParensNode, @@ -123,6 +129,9 @@ public: virtual void visitFloatNode(FloatNode *node) = 0; virtual void visitSymbolNode(SymbolNode *node) = 0; virtual void visitStringNode(StringNode *node) = 0; + virtual void visitListNode(ListNode *node) = 0; + virtual void visitPropListNode(PropListNode *node) = 0; + virtual void visitPropPairNode(PropPairNode *node) = 0; virtual void visitFuncNode(FuncNode *node) = 0; virtual void visitVarNode(VarNode *node) = 0; virtual void visitParensNode(ParensNode *node) = 0; @@ -497,6 +506,51 @@ struct StringNode : ExprNode { } }; +/* ListNode */ + +struct ListNode : ExprNode { + NodeList *items; + + ListNode(NodeList *itemsIn) : ExprNode(kListNode), items(itemsIn) {} + virtual ~ListNode() { + deleteList(items); + } + virtual void accept(NodeVisitor *visitor) { + visitor->visitListNode(this); + } +}; + +/* PropListNode */ + +struct PropListNode : ExprNode { + NodeList *items; + + PropListNode(NodeList *itemsIn) : ExprNode(kListNode), items(itemsIn) {} + virtual ~PropListNode() { + deleteList(items); + } + virtual void accept(NodeVisitor *visitor) { + visitor->visitPropListNode(this); + } +}; + +/* PropPairNode */ + +struct PropPairNode : ExprNode { + Node *key; + Node *val; + + PropPairNode(Node *keyIn, Node *valIn) + : ExprNode(kPropPairNode), key(keyIn), val(valIn) {} + virtual ~PropPairNode() { + delete key; + delete val; + } + virtual void accept(NodeVisitor *visitor) { + visitor->visitPropPairNode(this); + } +}; + /* FuncNode */ struct FuncNode : ExprNode { diff --git a/engines/director/lingo/lingo-codegen.cpp b/engines/director/lingo/lingo-codegen.cpp index 7116267f03c..ecce15946e5 100644 --- a/engines/director/lingo/lingo-codegen.cpp +++ b/engines/director/lingo/lingo-codegen.cpp @@ -693,6 +693,29 @@ void LingoCompiler::visitStringNode(StringNode *node) { codeString(node->val->c_str()); } +/* ListNode */ + +void LingoCompiler::visitListNode(ListNode *node) { + compileList(node->items); + code1(LC::c_arraypush); + codeInt(node->items->size()); +} + +/* PropListNode */ + +void LingoCompiler::visitPropListNode(PropListNode *node) { + compileList(node->items); + code1(LC::c_proparraypush); + codeInt(node->items->size()); +} + +/* PropPairNode */ + +void LingoCompiler::visitPropPairNode(PropPairNode *node) { + compile(node->key); + compile(node->val); +} + /* FuncNode */ void LingoCompiler::visitFuncNode(FuncNode *node) { diff --git a/engines/director/lingo/lingo-codegen.h b/engines/director/lingo/lingo-codegen.h index e84efd67ecd..a6e73dcc3a6 100644 --- a/engines/director/lingo/lingo-codegen.h +++ b/engines/director/lingo/lingo-codegen.h @@ -98,6 +98,9 @@ public: virtual void visitFloatNode(FloatNode *node); virtual void visitSymbolNode(SymbolNode *node); virtual void visitStringNode(StringNode *node); + virtual void visitListNode(ListNode *node); + virtual void visitPropListNode(PropListNode *node); + virtual void visitPropPairNode(PropPairNode *node); virtual void visitFuncNode(FuncNode *node); virtual void visitVarNode(VarNode *node); virtual void visitParensNode(ParensNode *node); diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp index d816255af93..0c7923eb103 100644 --- a/engines/director/lingo/lingo-gr.cpp +++ b/engines/director/lingo/lingo-gr.cpp @@ -242,41 +242,47 @@ enum yysymbol_kind_t YYSYMBOL_87_ = 87, /* ',' */ YYSYMBOL_88_ = 88, /* '(' */ YYSYMBOL_89_ = 89, /* ')' */ - YYSYMBOL_YYACCEPT = 90, /* $accept */ - YYSYMBOL_script = 91, /* script */ - YYSYMBOL_scriptpartlist = 92, /* scriptpartlist */ - YYSYMBOL_scriptpart = 93, /* scriptpart */ - YYSYMBOL_macro = 94, /* macro */ - YYSYMBOL_factory = 95, /* factory */ - YYSYMBOL_method = 96, /* method */ - YYSYMBOL_methodlist = 97, /* methodlist */ - YYSYMBOL_nonemptymethodlist = 98, /* nonemptymethodlist */ - YYSYMBOL_methodlistline = 99, /* methodlistline */ - YYSYMBOL_handler = 100, /* handler */ - YYSYMBOL_endargdef = 101, /* endargdef */ - YYSYMBOL_ID = 102, /* ID */ - YYSYMBOL_idlist = 103, /* idlist */ - YYSYMBOL_nonemptyidlist = 104, /* nonemptyidlist */ - YYSYMBOL_stmt = 105, /* stmt */ - YYSYMBOL_stmtoneliner = 106, /* stmtoneliner */ - YYSYMBOL_proc = 107, /* proc */ - YYSYMBOL_asgn = 108, /* asgn */ - YYSYMBOL_to = 109, /* to */ - YYSYMBOL_definevars = 110, /* definevars */ - YYSYMBOL_ifstmt = 111, /* ifstmt */ - YYSYMBOL_ifelsestmt = 112, /* ifelsestmt */ - YYSYMBOL_loop = 113, /* loop */ - YYSYMBOL_stmtlist = 114, /* stmtlist */ - YYSYMBOL_nonemptystmtlist = 115, /* nonemptystmtlist */ - YYSYMBOL_stmtlistline = 116, /* stmtlistline */ - YYSYMBOL_simpleexprnoparens = 117, /* simpleexprnoparens */ - YYSYMBOL_var = 118, /* var */ - YYSYMBOL_varorchunk = 119, /* varorchunk */ - YYSYMBOL_varorthe = 120, /* varorthe */ - YYSYMBOL_simpleexpr = 121, /* simpleexpr */ - YYSYMBOL_expr = 122, /* expr */ - YYSYMBOL_exprlist = 123, /* exprlist */ - YYSYMBOL_nonemptyexprlist = 124 /* nonemptyexprlist */ + YYSYMBOL_90_ = 90, /* '[' */ + YYSYMBOL_91_ = 91, /* ']' */ + YYSYMBOL_92_ = 92, /* ':' */ + YYSYMBOL_YYACCEPT = 93, /* $accept */ + YYSYMBOL_script = 94, /* script */ + YYSYMBOL_scriptpartlist = 95, /* scriptpartlist */ + YYSYMBOL_scriptpart = 96, /* scriptpart */ + YYSYMBOL_macro = 97, /* macro */ + YYSYMBOL_factory = 98, /* factory */ + YYSYMBOL_method = 99, /* method */ + YYSYMBOL_methodlist = 100, /* methodlist */ + YYSYMBOL_nonemptymethodlist = 101, /* nonemptymethodlist */ + YYSYMBOL_methodlistline = 102, /* methodlistline */ + YYSYMBOL_handler = 103, /* handler */ + YYSYMBOL_endargdef = 104, /* endargdef */ + YYSYMBOL_ID = 105, /* ID */ + YYSYMBOL_idlist = 106, /* idlist */ + YYSYMBOL_nonemptyidlist = 107, /* nonemptyidlist */ + YYSYMBOL_stmt = 108, /* stmt */ + YYSYMBOL_stmtoneliner = 109, /* stmtoneliner */ + YYSYMBOL_proc = 110, /* proc */ + YYSYMBOL_asgn = 111, /* asgn */ + YYSYMBOL_to = 112, /* to */ + YYSYMBOL_definevars = 113, /* definevars */ + YYSYMBOL_ifstmt = 114, /* ifstmt */ + YYSYMBOL_ifelsestmt = 115, /* ifelsestmt */ + YYSYMBOL_loop = 116, /* loop */ + YYSYMBOL_stmtlist = 117, /* stmtlist */ + YYSYMBOL_nonemptystmtlist = 118, /* nonemptystmtlist */ + YYSYMBOL_stmtlistline = 119, /* stmtlistline */ + YYSYMBOL_simpleexprnoparens = 120, /* simpleexprnoparens */ + YYSYMBOL_var = 121, /* var */ + YYSYMBOL_varorchunk = 122, /* varorchunk */ + YYSYMBOL_varorthe = 123, /* varorthe */ + YYSYMBOL_simpleexpr = 124, /* simpleexpr */ + YYSYMBOL_list = 125, /* list */ + YYSYMBOL_proplist = 126, /* proplist */ + YYSYMBOL_proppair = 127, /* proppair */ + YYSYMBOL_expr = 128, /* expr */ + YYSYMBOL_exprlist = 129, /* exprlist */ + YYSYMBOL_nonemptyexprlist = 130 /* nonemptyexprlist */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; @@ -393,7 +399,7 @@ typedef int yytype_uint16; /* Stored state numbers (used for stacks). */ -typedef yytype_uint8 yy_state_t; +typedef yytype_int16 yy_state_t; /* State numbers in computations. */ typedef int yy_state_fast_t; @@ -596,18 +602,18 @@ union yyalloc #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 99 +#define YYFINAL 101 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 1520 +#define YYLAST 1688 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 90 +#define YYNTOKENS 93 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 35 +#define YYNNTS 38 /* YYNRULES -- Number of rules. */ -#define YYNRULES 138 +#define YYNRULES 147 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 248 +#define YYNSTATES 271 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 332 @@ -629,11 +635,11 @@ static const yytype_int8 yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 85, 80, 2, 88, 89, 83, 81, 87, 82, 2, 84, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 92, 2, 78, 2, 79, 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, + 2, 90, 2, 91, 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, @@ -664,20 +670,21 @@ static const yytype_int8 yytranslate[] = /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 193, 193, 195, 201, 208, 209, 210, 211, 212, - 241, 245, 247, 249, 250, 253, 259, 266, 267, 272, - 276, 280, 281, 282, 287, 288, 289, 290, 291, 292, - 293, 296, 298, 301, 303, 304, 305, 306, 309, 310, - 311, 312, 313, 315, 316, 317, 318, 319, 322, 323, - 324, 325, 326, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 339, 340, 343, 347, 357, 358, 359, 360, - 363, 364, 365, 368, 369, 370, 371, 372, 373, 376, - 377, 378, 379, 382, 382, 384, 385, 386, 389, 393, - 397, 403, 407, 411, 415, 417, 419, 423, 424, 428, - 434, 441, 442, 447, 448, 449, 450, 451, 452, 453, - 454, 455, 458, 460, 464, 468, 469, 472, 473, 474, - 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, - 485, 486, 487, 488, 489, 492, 493, 496, 500 + 0, 194, 194, 196, 202, 209, 210, 211, 212, 213, + 242, 246, 248, 250, 251, 254, 260, 267, 268, 273, + 277, 281, 282, 283, 288, 289, 290, 291, 292, 293, + 294, 297, 299, 302, 304, 305, 306, 307, 310, 311, + 312, 313, 314, 316, 317, 318, 319, 320, 323, 324, + 325, 326, 327, 329, 330, 331, 332, 333, 334, 335, + 336, 337, 340, 341, 344, 348, 358, 359, 360, 361, + 364, 365, 366, 369, 370, 371, 372, 373, 374, 377, + 378, 379, 380, 383, 383, 385, 386, 387, 390, 394, + 398, 404, 408, 412, 416, 418, 420, 424, 425, 429, + 435, 442, 443, 448, 449, 450, 451, 452, 453, 454, + 455, 456, 457, 460, 462, 466, 470, 471, 474, 475, + 476, 479, 483, 488, 489, 490, 493, 494, 495, 496, + 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, + 507, 508, 509, 510, 513, 514, 517, 521 }; #endif @@ -707,14 +714,14 @@ yysymbol_name (yysymbol_kind_t yysymbol) "tLINE", "tWORD", "tSPRITE", "tINTERSECTS", "tWITHIN", "tTELL", "tPROPERTY", "tON", "tMETHOD", "tENDIF", "tENDREPEAT", "tENDTELL", "tASSERTERROR", "'<'", "'>'", "'&'", "'+'", "'-'", "'*'", "'/'", "'%'", - "'\\n'", "','", "'('", "')'", "$accept", "script", "scriptpartlist", - "scriptpart", "macro", "factory", "method", "methodlist", - "nonemptymethodlist", "methodlistline", "handler", "endargdef", "ID", - "idlist", "nonemptyidlist", "stmt", "stmtoneliner", "proc", "asgn", "to", - "definevars", "ifstmt", "ifelsestmt", "loop", "stmtlist", - "nonemptystmtlist", "stmtlistline", "simpleexprnoparens", "var", - "varorchunk", "varorthe", "simpleexpr", "expr", "exprlist", - "nonemptyexprlist", YY_NULLPTR + "'\\n'", "','", "'('", "')'", "'['", "']'", "':'", "$accept", "script", + "scriptpartlist", "scriptpart", "macro", "factory", "method", + "methodlist", "nonemptymethodlist", "methodlistline", "handler", + "endargdef", "ID", "idlist", "nonemptyidlist", "stmt", "stmtoneliner", + "proc", "asgn", "to", "definevars", "ifstmt", "ifelsestmt", "loop", + "stmtlist", "nonemptystmtlist", "stmtlistline", "simpleexprnoparens", + "var", "varorchunk", "varorthe", "simpleexpr", "list", "proplist", + "proppair", "expr", "exprlist", "nonemptyexprlist", YY_NULLPTR }; return yy_sname[yysymbol]; } @@ -733,11 +740,12 @@ static const yytype_int16 yytoknum[] = 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 60, 62, - 38, 43, 45, 42, 47, 37, 10, 44, 40, 41 + 38, 43, 45, 42, 47, 37, 10, 44, 40, 41, + 91, 93, 58 }; #endif -#define YYPACT_NINF (-167) +#define YYPACT_NINF (-183) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -751,31 +759,34 @@ static const yytype_int16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 500, -167, -167, -167, -167, -167, -167, -167, -32, 1240, - 281, -167, -167, 1240, -167, -24, -167, -167, 360, -34, - 1240, -167, -167, -167, -167, 1240, -167, -167, 1240, -167, - -167, -167, -167, -167, -167, -167, -167, -167, -167, -167, - -167, -167, -167, -167, 1240, 1240, -167, -167, 12, 500, - -167, -167, -167, -167, 430, -167, -167, -167, -167, -167, - -167, -167, -167, -59, -167, -167, -167, -167, -167, -54, - -47, -167, -167, -167, -167, 281, 281, 281, 281, -50, - -167, -167, -167, 1270, 1240, -45, 281, 42, -44, -40, - 1240, 281, -167, -167, -26, -38, -36, -33, 1240, -167, - -167, 281, 1423, -31, -167, -167, 1240, -167, -167, -167, - 1283, 281, 998, 281, 281, 281, 281, 281, 281, 281, - 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, - -28, -167, 1283, -29, 1240, 1240, 1240, -167, 281, 11, - 1323, -167, -167, 281, -65, -167, -167, -22, -21, -167, - -167, -167, -20, 1059, 41, 103, 103, 103, 103, 1436, - 1436, -167, -1, 103, 103, 103, 103, -1, -53, -53, - -167, -167, 1059, -14, -167, -11, -9, -8, 1423, 281, - 1059, 1336, 1240, -167, -167, 1, -167, -167, 1059, 3, - -167, -167, -167, 561, -167, -167, 1120, 1059, -167, -167, - -167, -167, 87, 623, -167, 1240, -65, 691, -167, 1181, - 5, -167, 1059, -167, 43, 281, 19, 21, -167, 1240, - 1059, -167, -167, 752, 281, 1373, -167, 1059, -68, -167, - 814, 22, 1386, 1059, 1059, -167, 1240, 23, -167, 1059, - 876, -167, -167, 937, 25, 27, -167, -167 + 618, -183, -183, -183, -183, -183, -183, -183, -21, 1417, + 388, -183, -183, 1417, -183, -15, -183, -183, 467, 3, + 1417, -183, -183, -183, -183, 1417, -183, -183, 1417, -183, + -183, -183, -183, -183, -183, -183, -183, -183, -183, -183, + -183, -183, -183, -183, 1417, 1417, -183, -183, 4, 618, + -183, -183, -183, -183, 546, -183, -183, -183, -183, -183, + -183, -183, -183, -74, -183, -183, -183, -183, -183, -59, + -58, -183, -183, -183, -183, 388, 388, 388, 388, 307, + -53, -183, -183, -183, -183, 96, 1417, -48, 388, 1438, + -43, -32, 1417, 388, -183, -183, -26, -34, -22, -20, + 1417, -183, -183, 388, 1591, -19, -183, -183, 1417, -183, + -183, -183, 1451, -23, -14, -10, -77, -68, -183, -9, + 388, 1116, 388, 388, 388, 388, 388, 388, 388, 388, + 388, 388, 388, 388, 388, 388, 388, 388, 388, -16, + -183, 1451, -24, 1417, 1417, 1417, -183, 388, 20, 1491, + -183, -183, 388, -65, -183, -183, -2, -12, -183, -183, + -183, 388, 388, -183, 388, 1358, -183, -183, -4, 1177, + 64, 58, 58, 58, 58, 1604, 1604, -183, -50, 58, + 58, 58, 58, -50, -47, -47, -183, -183, 1177, 5, + -183, 9, 11, 12, 1591, 388, 1177, 1504, 1417, -183, + -183, 13, -183, -183, 1177, 15, 1591, 1591, 1591, -23, + -14, -3, -183, -183, -183, -183, 679, -183, -183, 1238, + 1177, -183, -183, -183, -183, 52, 741, -183, 1417, -65, + 809, -183, 1299, 24, -183, 1177, -183, 48, 388, 25, + 30, -183, 1417, 1177, -183, -183, 870, 388, 1541, -183, + 1177, -29, -183, 932, 31, 1554, 1177, 1177, -183, 1417, + 33, -183, 1177, 994, -183, -183, 1055, 34, 36, -183, + -183 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -784,290 +795,327 @@ static const yytype_int16 yypact[] = static const yytype_uint8 yydefact[] = { 0, 24, 46, 28, 32, 49, 58, 30, 31, 62, - 0, 33, 35, 0, 39, 40, 42, 47, 135, 48, + 0, 33, 35, 0, 39, 40, 42, 47, 144, 48, 50, 53, 56, 59, 57, 0, 43, 45, 62, 26, 44, 41, 38, 25, 27, 51, 29, 36, 37, 61, 55, 34, 60, 52, 62, 0, 54, 5, 0, 2, - 3, 6, 7, 8, 135, 9, 66, 70, 71, 72, + 3, 6, 7, 8, 144, 9, 66, 70, 71, 72, 67, 68, 69, 0, 31, 40, 48, 50, 64, 0, - 63, 103, 104, 106, 105, 41, 0, 0, 0, 112, - 115, 111, 117, 0, 62, 0, 135, 137, 0, 136, - 0, 0, 112, 114, 0, 0, 0, 0, 62, 1, - 4, 135, 137, 0, 78, 85, 0, 109, 107, 108, - 0, 135, 0, 0, 0, 0, 0, 0, 0, 0, + 63, 103, 104, 106, 105, 41, 0, 0, 0, 144, + 113, 116, 111, 126, 112, 0, 62, 0, 144, 146, + 0, 145, 0, 0, 113, 115, 0, 0, 0, 0, + 62, 1, 4, 144, 146, 0, 78, 85, 0, 109, + 107, 108, 0, 106, 105, 0, 113, 0, 121, 0, + 144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 77, 137, 0, 0, 0, 0, 76, 0, 0, - 0, 83, 84, 0, 13, 87, 86, 0, 0, 74, - 65, 116, 0, 97, 88, 127, 128, 125, 126, 129, - 130, 122, 132, 133, 134, 124, 123, 131, 118, 119, - 120, 121, 97, 0, 113, 0, 0, 0, 138, 0, - 97, 0, 0, 17, 18, 11, 14, 15, 97, 0, - 110, 101, 102, 0, 98, 99, 0, 10, 75, 79, - 80, 81, 0, 0, 82, 62, 0, 20, 73, 0, - 0, 100, 97, 90, 0, 0, 0, 0, 16, 21, - 97, 92, 89, 0, 0, 0, 94, 97, 0, 22, - 0, 0, 0, 97, 12, 19, 0, 0, 91, 97, - 0, 23, 93, 0, 0, 0, 95, 96 + 77, 146, 0, 0, 0, 0, 76, 0, 0, 0, + 83, 84, 0, 13, 87, 86, 0, 0, 74, 65, + 117, 0, 0, 119, 0, 0, 120, 118, 0, 97, + 88, 136, 137, 134, 135, 138, 139, 131, 141, 142, + 143, 133, 132, 140, 127, 128, 129, 130, 97, 0, + 114, 0, 0, 0, 147, 0, 97, 0, 0, 17, + 18, 11, 14, 15, 97, 0, 125, 123, 124, 0, + 0, 0, 122, 110, 101, 102, 0, 98, 99, 0, + 10, 75, 79, 80, 81, 0, 0, 82, 62, 0, + 20, 73, 0, 0, 100, 97, 90, 0, 0, 0, + 0, 16, 21, 97, 92, 89, 0, 0, 0, 94, + 97, 0, 22, 0, 0, 0, 97, 12, 19, 0, + 0, 91, 97, 0, 23, 93, 0, 0, 0, 95, + 96 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -167, -167, -167, 37, -167, -167, -167, -167, -167, -118, - -167, -167, 0, -27, -167, 2, -167, -167, -167, -167, - -167, -167, -167, -167, -166, -167, -164, -167, -17, -112, - -167, -41, 140, -49, -167 + -183, -183, -183, 75, -183, -183, -183, -183, -183, -104, + -183, -183, 0, -27, -183, 2, -183, -183, -183, -183, + -183, -183, -183, -183, -182, -183, -170, -183, -17, -82, + -183, -35, -183, -183, -36, 145, -49, -183 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_uint8 yydefgoto[] = { - 0, 48, 49, 50, 51, 52, 184, 185, 186, 187, - 53, 228, 79, 69, 70, 192, 56, 57, 58, 143, - 59, 60, 61, 62, 193, 194, 195, 80, 81, 175, - 94, 82, 102, 88, 89 + 0, 48, 49, 50, 51, 52, 200, 201, 202, 203, + 53, 251, 80, 69, 70, 215, 56, 57, 58, 152, + 59, 60, 61, 62, 216, 217, 218, 81, 82, 191, + 96, 83, 84, 117, 118, 104, 90, 91 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_uint8 yytable[] = +static const yytype_int16 yytable[] = { - 54, 96, 55, 93, 119, 103, 197, 63, 182, 68, - 90, 91, 99, 84, 203, 85, 141, 97, 235, 236, - 92, 183, 207, 176, 177, 95, 142, 104, 68, 211, - 128, 129, 105, 211, 107, 108, 109, 133, 111, 211, - 106, 131, 137, 211, 68, 98, 223, 138, 144, 54, - 145, 55, 148, 146, 230, 149, 119, 130, 172, 211, - 173, 234, 152, 179, 188, 196, 211, 240, 189, 190, - 211, 147, 198, 243, 134, 199, 211, 200, 201, 211, - 126, 127, 128, 129, 68, 224, 100, 206, 218, 208, - 139, 222, 113, 114, 115, 116, 117, 118, 68, 119, - 135, 136, 120, 121, 122, 226, 150, 227, 238, 242, - 214, 246, 54, 247, 154, 0, 0, 174, 174, 174, - 123, 124, 125, 126, 127, 128, 129, 0, 0, 215, - 0, 0, 0, 0, 92, 92, 92, 113, 114, 115, - 116, 117, 118, 0, 119, 0, 0, 120, 121, 122, - 83, 0, 0, 54, 0, 0, 0, 0, 87, 0, - 119, 0, 0, 120, 0, 123, 124, 125, 126, 127, - 128, 129, 54, 0, 0, 0, 0, 0, 217, 0, - 54, 0, 205, 125, 126, 127, 128, 129, 54, 0, - 0, 0, 0, 54, 0, 0, 54, 54, 213, 0, - 0, 0, 0, 54, 0, 68, 0, 54, 0, 54, - 0, 221, 54, 0, 0, 0, 0, 0, 110, 229, - 54, 0, 0, 54, 0, 0, 132, 54, 0, 0, - 54, 140, 0, 54, 54, 0, 241, 0, 0, 54, - 54, 132, 0, 54, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 155, 156, 157, 158, 159, 160, 161, - 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, - 0, 0, 0, 0, 0, 0, 0, 0, 178, 0, - 0, 0, 0, 181, 0, 0, 71, 0, 0, 0, - 0, 72, 0, 0, 1, 73, 74, 0, 2, 0, - 3, 4, 5, 6, 7, 0, 0, 64, 0, 0, - 0, 0, 11, 12, 0, 14, 65, 16, 17, 202, - 66, 67, 0, 21, 22, 23, 24, 0, 26, 27, - 0, 0, 0, 0, 0, 29, 30, 75, 32, 33, - 34, 0, 0, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 0, 0, 0, 225, 0, 0, 46, 0, - 0, 0, 76, 77, 232, 71, 0, 0, 0, 78, - 72, 0, 0, 1, 73, 74, 0, 2, 0, 3, - 4, 5, 6, 7, 0, 0, 64, 0, 0, 0, - 0, 11, 12, 0, 14, 65, 16, 17, 0, 66, - 67, 0, 21, 22, 23, 24, 0, 26, 27, 0, - 0, 0, 0, 0, 29, 30, 75, 32, 33, 34, - 0, 0, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 0, 0, 0, 0, 71, 0, 46, 0, 0, - 72, 76, 77, 1, 73, 74, 0, 2, 86, 3, - 4, 5, 6, 7, 0, 0, 64, 0, 0, 0, - 0, 11, 12, 0, 14, 65, 16, 17, 0, 66, - 67, 0, 21, 22, 23, 24, 0, 26, 27, 0, - 0, 0, 0, 0, 29, 30, 75, 32, 33, 34, - 0, 0, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 0, 0, 0, 0, 0, 0, 46, 0, 0, - 0, 76, 77, 1, 0, 0, 0, 2, 101, 3, - 4, 5, 6, 7, 0, 0, 8, 9, 0, 0, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 0, 21, 22, 23, 24, 25, 26, 27, 28, - 0, 0, 0, 0, 29, 30, 31, 32, 33, 34, - 0, 0, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 0, 1, 0, 0, 46, 2, 0, - 3, 4, 5, 6, 7, 209, 47, 8, 9, 0, - 0, 10, 11, 12, 0, 14, 15, 16, 17, 18, - 19, 20, 0, 21, 22, 23, 24, 0, 26, 27, - 28, 0, 0, 0, 0, 29, 30, 31, 32, 33, - 34, 0, 0, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 0, 0, 210, 1, 0, 46, 0, - 2, 0, 3, 4, 5, 6, 7, 191, 0, 8, - 9, 0, 0, 10, 11, 12, 0, 14, 15, 16, - 17, 18, 19, 20, 0, 21, 22, 23, 24, 0, - 26, 27, 28, 0, 0, 0, 0, 29, 30, 31, - 32, 33, 34, 0, 0, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 0, 0, 0, 216, 0, - 46, 0, 0, 0, 1, 0, 0, 219, 2, 191, - 3, 4, 5, 6, 7, 0, 0, 8, 9, 0, - 0, 10, 11, 12, 0, 14, 15, 16, 17, 18, - 19, 20, 0, 21, 22, 23, 24, 0, 26, 27, - 28, 0, 0, 0, 0, 29, 30, 31, 32, 33, - 34, 0, 0, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 0, 0, 1, 0, 0, 46, 2, - 0, 3, 4, 5, 6, 7, 0, 191, 8, 9, - 0, 0, 10, 11, 12, 0, 14, 15, 16, 17, - 18, 19, 20, 0, 21, 22, 23, 24, 0, 26, - 27, 28, 0, 0, 0, 0, 29, 30, 31, 32, - 33, 34, 0, 0, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 0, 0, 231, 1, 0, 46, - 0, 2, 0, 3, 4, 5, 6, 7, 191, 0, - 8, 9, 0, 0, 10, 11, 12, 0, 14, 15, - 16, 17, 18, 19, 20, 0, 21, 22, 23, 24, - 0, 26, 27, 28, 0, 0, 0, 0, 29, 30, - 31, 32, 33, 34, 0, 0, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 0, 0, 237, 1, - 0, 46, 0, 2, 0, 3, 4, 5, 6, 7, - 191, 0, 8, 9, 0, 0, 10, 11, 12, 0, - 14, 15, 16, 17, 18, 19, 20, 0, 21, 22, - 23, 24, 0, 26, 27, 28, 0, 0, 0, 0, - 29, 30, 31, 32, 33, 34, 0, 0, 35, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 0, 0, - 1, 244, 0, 46, 2, 0, 3, 4, 5, 6, - 7, 0, 191, 8, 9, 0, 0, 10, 11, 12, - 0, 14, 15, 16, 17, 18, 19, 20, 0, 21, - 22, 23, 24, 0, 26, 27, 28, 0, 0, 0, - 0, 29, 30, 31, 32, 33, 34, 0, 0, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 0, - 0, 1, 245, 0, 46, 2, 0, 3, 4, 5, - 6, 7, 0, 191, 8, 9, 0, 0, 10, 11, - 12, 0, 14, 15, 16, 17, 18, 19, 20, 0, - 21, 22, 23, 24, 0, 26, 27, 28, 0, 0, + 54, 98, 55, 95, 101, 105, 220, 128, 198, 68, + 128, 120, 106, 86, 226, 164, 150, 99, 63, 165, + 94, 199, 230, 166, 87, 97, 151, 107, 68, 108, + 119, 135, 136, 137, 138, 120, 137, 138, 140, 142, + 109, 110, 111, 146, 68, 100, 234, 92, 93, 54, + 234, 55, 153, 246, 157, 147, 234, 258, 259, 139, + 234, 253, 192, 193, 154, 189, 155, 158, 257, 161, + 188, 168, 195, 156, 263, 237, 234, 205, 162, 116, + 266, 163, 167, 234, 204, 213, 68, 234, 219, 164, + 247, 221, 148, 234, 238, 222, 234, 223, 224, 229, + 68, 231, 122, 123, 124, 125, 126, 127, 159, 128, + 245, 249, 129, 130, 131, 128, 250, 261, 129, 265, + 269, 54, 270, 170, 102, 241, 190, 190, 190, 212, + 132, 133, 134, 135, 136, 137, 138, 121, 134, 135, + 136, 137, 138, 94, 94, 94, 122, 123, 124, 125, + 126, 127, 0, 128, 0, 85, 129, 130, 131, 0, + 0, 0, 0, 89, 0, 211, 0, 0, 0, 54, + 0, 0, 0, 0, 132, 133, 134, 135, 136, 137, + 138, 0, 0, 0, 0, 0, 0, 0, 54, 0, + 0, 0, 0, 0, 0, 0, 54, 0, 228, 0, + 0, 240, 0, 0, 54, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 54, 0, 0, 54, + 54, 236, 0, 112, 0, 0, 54, 0, 68, 0, + 54, 0, 54, 141, 244, 54, 0, 0, 149, 0, + 0, 0, 252, 54, 0, 0, 54, 0, 141, 0, + 54, 0, 0, 54, 0, 0, 54, 54, 0, 264, + 0, 0, 54, 54, 0, 0, 54, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 0, 0, 0, 0, 0, 0, + 0, 0, 194, 0, 0, 0, 0, 197, 0, 0, + 0, 0, 0, 0, 0, 0, 206, 207, 0, 208, + 0, 0, 71, 0, 0, 0, 0, 72, 0, 0, + 1, 113, 114, 0, 2, 0, 3, 4, 5, 6, + 7, 0, 0, 64, 0, 0, 0, 0, 11, 12, + 225, 14, 65, 16, 17, 0, 66, 67, 0, 21, + 22, 23, 24, 0, 26, 27, 0, 0, 0, 0, + 0, 29, 30, 75, 32, 33, 34, 0, 0, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 0, 0, + 0, 0, 0, 248, 46, 0, 0, 0, 76, 77, + 0, 0, 255, 71, 0, 78, 0, 79, 72, 115, + 0, 1, 73, 74, 0, 2, 0, 3, 4, 5, + 6, 7, 0, 0, 64, 0, 0, 0, 0, 11, + 12, 0, 14, 65, 16, 17, 0, 66, 67, 0, + 21, 22, 23, 24, 0, 26, 27, 0, 0, 0, + 0, 0, 29, 30, 75, 32, 33, 34, 0, 0, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 0, + 0, 0, 0, 0, 0, 46, 0, 0, 0, 76, + 77, 0, 71, 0, 0, 0, 78, 72, 79, 0, + 1, 73, 74, 0, 2, 0, 3, 4, 5, 6, + 7, 0, 0, 64, 0, 0, 0, 0, 11, 12, + 0, 14, 65, 16, 17, 0, 66, 67, 0, 21, + 22, 23, 24, 0, 26, 27, 0, 0, 0, 0, + 0, 29, 30, 75, 32, 33, 34, 0, 0, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 0, 0, + 0, 0, 0, 0, 46, 0, 0, 0, 76, 77, + 0, 71, 0, 0, 0, 88, 72, 79, 0, 1, + 73, 74, 0, 2, 0, 3, 4, 5, 6, 7, + 0, 0, 64, 0, 0, 0, 0, 11, 12, 0, + 14, 65, 16, 17, 0, 66, 67, 0, 21, 22, + 23, 24, 0, 26, 27, 0, 0, 0, 0, 0, + 29, 30, 75, 32, 33, 34, 0, 0, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 0, 0, 0, + 0, 0, 0, 46, 0, 0, 0, 76, 77, 0, + 0, 1, 0, 0, 103, 2, 79, 3, 4, 5, + 6, 7, 0, 0, 8, 9, 0, 0, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 0, + 21, 22, 23, 24, 25, 26, 27, 28, 0, 0, 0, 0, 29, 30, 31, 32, 33, 34, 0, 0, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 0, 0, 1, 0, 0, 46, 2, 0, 3, 4, - 5, 6, 7, 0, 153, 8, 9, 0, 0, 10, + 45, 0, 1, 0, 0, 46, 2, 0, 3, 4, + 5, 6, 7, 232, 47, 8, 9, 0, 0, 10, + 11, 12, 0, 14, 15, 16, 17, 18, 19, 20, + 0, 21, 22, 23, 24, 0, 26, 27, 28, 0, + 0, 0, 0, 29, 30, 31, 32, 33, 34, 0, + 0, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 0, 0, 233, 1, 0, 46, 0, 2, 0, + 3, 4, 5, 6, 7, 214, 0, 8, 9, 0, + 0, 10, 11, 12, 0, 14, 15, 16, 17, 18, + 19, 20, 0, 21, 22, 23, 24, 0, 26, 27, + 28, 0, 0, 0, 0, 29, 30, 31, 32, 33, + 34, 0, 0, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 0, 0, 0, 239, 0, 46, 0, + 0, 0, 1, 0, 0, 242, 2, 214, 3, 4, + 5, 6, 7, 0, 0, 8, 9, 0, 0, 10, 11, 12, 0, 14, 15, 16, 17, 18, 19, 20, 0, 21, 22, 23, 24, 0, 26, 27, 28, 0, 0, 0, 0, 29, 30, 31, 32, 33, 34, 0, 0, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 0, 0, 1, 0, 0, 46, 2, 0, 3, - 4, 5, 6, 7, 0, 191, 8, 9, 0, 0, + 4, 5, 6, 7, 0, 214, 8, 9, 0, 0, 10, 11, 12, 0, 14, 15, 16, 17, 18, 19, 20, 0, 21, 22, 23, 24, 0, 26, 27, 28, 0, 0, 0, 0, 29, 30, 31, 32, 33, 34, 0, 0, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 0, 0, 1, 0, 0, 46, 2, 0, - 3, 4, 5, 6, 7, 0, 212, 8, 9, 0, - 0, 10, 11, 12, 0, 14, 15, 16, 17, 18, - 19, 20, 0, 21, 22, 23, 24, 0, 26, 27, - 28, 0, 0, 0, 0, 29, 30, 31, 32, 33, - 34, 0, 0, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 1, 0, 0, 0, 2, 46, 3, - 4, 5, 6, 7, 0, 0, 64, 220, 0, 0, - 0, 11, 12, 0, 14, 65, 16, 17, 0, 66, - 67, 0, 21, 22, 23, 24, 0, 26, 27, 0, - 0, 0, 0, 0, 29, 30, 31, 32, 33, 34, - 0, 0, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 112, 0, 0, 0, 0, 0, 46, 0, 0, - 113, 114, 115, 116, 117, 118, 0, 119, 0, 0, - 120, 121, 122, 113, 114, 115, 116, 117, 118, 0, - 119, 0, 0, 120, 121, 122, 0, 0, 123, 124, - 125, 126, 127, 128, 129, 0, 0, 0, 0, 0, - 0, 123, 124, 125, 126, 127, 128, 129, 0, 0, - 0, 0, 151, 113, 114, 115, 116, 117, 118, 0, - 119, 0, 0, 120, 121, 122, 113, 114, 115, 116, - 117, 118, 0, 119, 0, 0, 120, 121, 122, 0, - 0, 123, 124, 125, 126, 127, 128, 129, 0, 180, - 0, 0, 0, 0, 123, 124, 125, 126, 127, 128, - 129, 0, 204, 113, 114, 115, 116, 117, 118, 0, - 119, 0, 0, 120, 121, 122, 113, 114, 115, 116, - 117, 118, 0, 119, 0, 0, 120, 121, 122, 0, - 0, 123, 124, 125, 126, 127, 128, 129, 0, 233, - 0, 0, 0, 0, 123, 124, 125, 126, 127, 128, - 129, 0, 239, 113, 114, 115, 116, 117, 118, 0, - 119, 0, 0, 120, 121, 122, 113, 114, 115, 116, - 0, 0, 0, 119, 0, 0, 120, 121, 122, 0, - 0, 123, 124, 125, 126, 127, 128, 129, 0, 0, - 0, 0, 0, 0, 123, 124, 125, 126, 127, 128, - 129 + 43, 44, 0, 0, 254, 1, 0, 46, 0, 2, + 0, 3, 4, 5, 6, 7, 214, 0, 8, 9, + 0, 0, 10, 11, 12, 0, 14, 15, 16, 17, + 18, 19, 20, 0, 21, 22, 23, 24, 0, 26, + 27, 28, 0, 0, 0, 0, 29, 30, 31, 32, + 33, 34, 0, 0, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 0, 0, 260, 1, 0, 46, + 0, 2, 0, 3, 4, 5, 6, 7, 214, 0, + 8, 9, 0, 0, 10, 11, 12, 0, 14, 15, + 16, 17, 18, 19, 20, 0, 21, 22, 23, 24, + 0, 26, 27, 28, 0, 0, 0, 0, 29, 30, + 31, 32, 33, 34, 0, 0, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 44, 0, 0, 1, 267, + 0, 46, 2, 0, 3, 4, 5, 6, 7, 0, + 214, 8, 9, 0, 0, 10, 11, 12, 0, 14, + 15, 16, 17, 18, 19, 20, 0, 21, 22, 23, + 24, 0, 26, 27, 28, 0, 0, 0, 0, 29, + 30, 31, 32, 33, 34, 0, 0, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 0, 0, 1, + 268, 0, 46, 2, 0, 3, 4, 5, 6, 7, + 0, 214, 8, 9, 0, 0, 10, 11, 12, 0, + 14, 15, 16, 17, 18, 19, 20, 0, 21, 22, + 23, 24, 0, 26, 27, 28, 0, 0, 0, 0, + 29, 30, 31, 32, 33, 34, 0, 0, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 0, 0, + 1, 0, 0, 46, 2, 0, 3, 4, 5, 6, + 7, 0, 169, 8, 9, 0, 0, 10, 11, 12, + 0, 14, 15, 16, 17, 18, 19, 20, 0, 21, + 22, 23, 24, 0, 26, 27, 28, 0, 0, 0, + 0, 29, 30, 31, 32, 33, 34, 0, 0, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 0, + 0, 1, 0, 0, 46, 2, 0, 3, 4, 5, + 6, 7, 0, 214, 8, 9, 0, 0, 10, 11, + 12, 0, 14, 15, 16, 17, 18, 19, 20, 0, + 21, 22, 23, 24, 0, 26, 27, 28, 0, 0, + 0, 0, 29, 30, 31, 32, 33, 34, 0, 0, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 0, 0, 1, 0, 0, 46, 2, 0, 3, 4, + 5, 6, 7, 0, 235, 8, 9, 0, 0, 10, + 11, 12, 0, 14, 15, 16, 17, 18, 19, 20, + 0, 21, 22, 23, 24, 0, 26, 27, 28, 0, + 0, 0, 0, 29, 30, 31, 32, 33, 34, 0, + 0, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 1, 209, 210, 0, 2, 46, 3, 4, 5, + 6, 7, 0, 0, 64, 243, 0, 0, 0, 11, + 12, 0, 14, 65, 16, 17, 0, 66, 67, 0, + 21, 22, 23, 24, 0, 26, 27, 0, 0, 0, + 0, 0, 29, 30, 31, 32, 33, 34, 0, 0, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 0, + 1, 0, 0, 0, 2, 46, 3, 4, 5, 6, + 7, 0, 0, 64, 0, 0, 0, 0, 11, 12, + 0, 14, 65, 16, 17, 0, 66, 67, 0, 21, + 22, 23, 24, 0, 26, 27, 0, 0, 0, 0, + 143, 29, 30, 31, 32, 33, 34, 0, 0, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 122, 123, + 124, 125, 126, 127, 46, 128, 144, 145, 129, 130, + 131, 122, 123, 124, 125, 126, 127, 0, 128, 0, + 0, 129, 130, 131, 0, 0, 132, 133, 134, 135, + 136, 137, 138, 0, 0, 0, 0, 0, 0, 132, + 133, 134, 135, 136, 137, 138, 0, 0, 0, 0, + 160, 122, 123, 124, 125, 126, 127, 0, 128, 0, + 0, 129, 130, 131, 122, 123, 124, 125, 126, 127, + 0, 128, 0, 0, 129, 130, 131, 0, 0, 132, + 133, 134, 135, 136, 137, 138, 0, 196, 0, 0, + 0, 0, 132, 133, 134, 135, 136, 137, 138, 0, + 227, 122, 123, 124, 125, 126, 127, 0, 128, 0, + 0, 129, 130, 131, 122, 123, 124, 125, 126, 127, + 0, 128, 0, 0, 129, 130, 131, 0, 0, 132, + 133, 134, 135, 136, 137, 138, 0, 256, 0, 0, + 0, 0, 132, 133, 134, 135, 136, 137, 138, 0, + 262, 122, 123, 124, 125, 126, 127, 0, 128, 0, + 0, 129, 130, 131, 122, 123, 124, 125, 0, 0, + 0, 128, 0, 0, 129, 130, 131, 0, 0, 132, + 133, 134, 135, 136, 137, 138, 0, 0, 0, 0, + 0, 0, 132, 133, 134, 135, 136, 137, 138 }; static const yytype_int16 yycheck[] = { - 0, 28, 0, 20, 57, 54, 172, 39, 73, 9, - 44, 45, 0, 13, 180, 39, 42, 44, 86, 87, - 20, 86, 188, 135, 136, 25, 52, 86, 28, 193, - 83, 84, 86, 197, 75, 76, 77, 86, 88, 203, - 87, 86, 86, 207, 44, 45, 212, 87, 86, 49, - 86, 49, 101, 86, 220, 86, 57, 84, 86, 223, - 89, 227, 111, 52, 86, 24, 230, 233, 89, 89, - 234, 98, 86, 239, 32, 86, 240, 86, 86, 243, - 81, 82, 83, 84, 84, 42, 49, 86, 206, 86, - 90, 86, 50, 51, 52, 53, 54, 55, 98, 57, - 58, 59, 60, 61, 62, 86, 106, 86, 86, 86, - 23, 86, 112, 86, 112, -1, -1, 134, 135, 136, - 78, 79, 80, 81, 82, 83, 84, -1, -1, 42, - -1, -1, -1, -1, 134, 135, 136, 50, 51, 52, - 53, 54, 55, -1, 57, -1, -1, 60, 61, 62, - 10, -1, -1, 153, -1, -1, -1, -1, 18, -1, - 57, -1, -1, 60, -1, 78, 79, 80, 81, 82, - 83, 84, 172, -1, -1, -1, -1, -1, 205, -1, - 180, -1, 182, 80, 81, 82, 83, 84, 188, -1, - -1, -1, -1, 193, -1, -1, 196, 197, 196, -1, - -1, -1, -1, 203, -1, 205, -1, 207, -1, 209, - -1, 209, 212, -1, -1, -1, -1, -1, 78, 219, - 220, -1, -1, 223, -1, -1, 86, 227, -1, -1, - 230, 91, -1, 233, 234, -1, 236, -1, -1, 239, - 240, 101, -1, 243, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, - -1, -1, -1, -1, -1, -1, -1, -1, 138, -1, - -1, -1, -1, 143, -1, -1, 5, -1, -1, -1, - -1, 10, -1, -1, 13, 14, 15, -1, 17, -1, - 19, 20, 21, 22, 23, -1, -1, 26, -1, -1, - -1, -1, 31, 32, -1, 34, 35, 36, 37, 179, - 39, 40, -1, 42, 43, 44, 45, -1, 47, 48, - -1, -1, -1, -1, -1, 54, 55, 56, 57, 58, - 59, -1, -1, 62, 63, 64, 65, 66, 67, 68, - 69, 70, -1, -1, -1, 215, -1, -1, 77, -1, - -1, -1, 81, 82, 224, 5, -1, -1, -1, 88, - 10, -1, -1, 13, 14, 15, -1, 17, -1, 19, - 20, 21, 22, 23, -1, -1, 26, -1, -1, -1, - -1, 31, 32, -1, 34, 35, 36, 37, -1, 39, - 40, -1, 42, 43, 44, 45, -1, 47, 48, -1, - -1, -1, -1, -1, 54, 55, 56, 57, 58, 59, - -1, -1, 62, 63, 64, 65, 66, 67, 68, 69, - 70, -1, -1, -1, -1, 5, -1, 77, -1, -1, - 10, 81, 82, 13, 14, 15, -1, 17, 88, 19, - 20, 21, 22, 23, -1, -1, 26, -1, -1, -1, - -1, 31, 32, -1, 34, 35, 36, 37, -1, 39, - 40, -1, 42, 43, 44, 45, -1, 47, 48, -1, - -1, -1, -1, -1, 54, 55, 56, 57, 58, 59, - -1, -1, 62, 63, 64, 65, 66, 67, 68, 69, - 70, -1, -1, -1, -1, -1, -1, 77, -1, -1, - -1, 81, 82, 13, -1, -1, -1, 17, 88, 19, - 20, 21, 22, 23, -1, -1, 26, 27, -1, -1, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, -1, 42, 43, 44, 45, 46, 47, 48, 49, - -1, -1, -1, -1, 54, 55, 56, 57, 58, 59, - -1, -1, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, -1, 13, -1, -1, 77, 17, -1, - 19, 20, 21, 22, 23, 24, 86, 26, 27, -1, + 0, 28, 0, 20, 0, 54, 188, 57, 73, 9, + 57, 88, 86, 13, 196, 92, 42, 44, 39, 87, + 20, 86, 204, 91, 39, 25, 52, 86, 28, 87, + 79, 81, 82, 83, 84, 88, 83, 84, 86, 88, + 75, 76, 77, 86, 44, 45, 216, 44, 45, 49, + 220, 49, 86, 235, 103, 87, 226, 86, 87, 86, + 230, 243, 144, 145, 86, 89, 86, 86, 250, 92, + 86, 120, 52, 100, 256, 23, 246, 89, 92, 79, + 262, 91, 91, 253, 86, 89, 86, 257, 24, 92, + 42, 86, 92, 263, 42, 86, 266, 86, 86, 86, + 100, 86, 50, 51, 52, 53, 54, 55, 108, 57, + 86, 86, 60, 61, 62, 57, 86, 86, 60, 86, + 86, 121, 86, 121, 49, 229, 143, 144, 145, 165, + 78, 79, 80, 81, 82, 83, 84, 41, 80, 81, + 82, 83, 84, 143, 144, 145, 50, 51, 52, 53, + 54, 55, -1, 57, -1, 10, 60, 61, 62, -1, + -1, -1, -1, 18, -1, 165, -1, -1, -1, 169, + -1, -1, -1, -1, 78, 79, 80, 81, 82, 83, + 84, -1, -1, -1, -1, -1, -1, -1, 188, -1, + -1, -1, -1, -1, -1, -1, 196, -1, 198, -1, + -1, 228, -1, -1, 204, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 216, -1, -1, 219, + 220, 219, -1, 78, -1, -1, 226, -1, 228, -1, + 230, -1, 232, 88, 232, 235, -1, -1, 93, -1, + -1, -1, 242, 243, -1, -1, 246, -1, 103, -1, + 250, -1, -1, 253, -1, -1, 256, 257, -1, 259, + -1, -1, 262, 263, -1, -1, 266, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, -1, -1, -1, -1, -1, -1, + -1, -1, 147, -1, -1, -1, -1, 152, -1, -1, + -1, -1, -1, -1, -1, -1, 161, 162, -1, 164, + -1, -1, 5, -1, -1, -1, -1, 10, -1, -1, + 13, 14, 15, -1, 17, -1, 19, 20, 21, 22, + 23, -1, -1, 26, -1, -1, -1, -1, 31, 32, + 195, 34, 35, 36, 37, -1, 39, 40, -1, 42, + 43, 44, 45, -1, 47, 48, -1, -1, -1, -1, + -1, 54, 55, 56, 57, 58, 59, -1, -1, 62, + 63, 64, 65, 66, 67, 68, 69, 70, -1, -1, + -1, -1, -1, 238, 77, -1, -1, -1, 81, 82, + -1, -1, 247, 5, -1, 88, -1, 90, 10, 92, + -1, 13, 14, 15, -1, 17, -1, 19, 20, 21, + 22, 23, -1, -1, 26, -1, -1, -1, -1, 31, + 32, -1, 34, 35, 36, 37, -1, 39, 40, -1, + 42, 43, 44, 45, -1, 47, 48, -1, -1, -1, + -1, -1, 54, 55, 56, 57, 58, 59, -1, -1, + 62, 63, 64, 65, 66, 67, 68, 69, 70, -1, + -1, -1, -1, -1, -1, 77, -1, -1, -1, 81, + 82, -1, 5, -1, -1, -1, 88, 10, 90, -1, + 13, 14, 15, -1, 17, -1, 19, 20, 21, 22, + 23, -1, -1, 26, -1, -1, -1, -1, 31, 32, + -1, 34, 35, 36, 37, -1, 39, 40, -1, 42, + 43, 44, 45, -1, 47, 48, -1, -1, -1, -1, + -1, 54, 55, 56, 57, 58, 59, -1, -1, 62, + 63, 64, 65, 66, 67, 68, 69, 70, -1, -1, + -1, -1, -1, -1, 77, -1, -1, -1, 81, 82, + -1, 5, -1, -1, -1, 88, 10, 90, -1, 13, + 14, 15, -1, 17, -1, 19, 20, 21, 22, 23, + -1, -1, 26, -1, -1, -1, -1, 31, 32, -1, + 34, 35, 36, 37, -1, 39, 40, -1, 42, 43, + 44, 45, -1, 47, 48, -1, -1, -1, -1, -1, + 54, 55, 56, 57, 58, 59, -1, -1, 62, 63, + 64, 65, 66, 67, 68, 69, 70, -1, -1, -1, + -1, -1, -1, 77, -1, -1, -1, 81, 82, -1, + -1, 13, -1, -1, 88, 17, 90, 19, 20, 21, + 22, 23, -1, -1, 26, 27, -1, -1, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, -1, + 42, 43, 44, 45, 46, 47, 48, 49, -1, -1, + -1, -1, 54, 55, 56, 57, 58, 59, -1, -1, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, -1, 13, -1, -1, 77, 17, -1, 19, 20, + 21, 22, 23, 24, 86, 26, 27, -1, -1, 30, + 31, 32, -1, 34, 35, 36, 37, 38, 39, 40, + -1, 42, 43, 44, 45, -1, 47, 48, 49, -1, + -1, -1, -1, 54, 55, 56, 57, 58, 59, -1, + -1, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, -1, -1, 74, 13, -1, 77, -1, 17, -1, + 19, 20, 21, 22, 23, 86, -1, 26, 27, -1, -1, 30, 31, 32, -1, 34, 35, 36, 37, 38, 39, 40, -1, 42, 43, 44, 45, -1, 47, 48, 49, -1, -1, -1, -1, 54, 55, 56, 57, 58, 59, -1, -1, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, -1, -1, 74, 13, -1, 77, -1, - 17, -1, 19, 20, 21, 22, 23, 86, -1, 26, - 27, -1, -1, 30, 31, 32, -1, 34, 35, 36, - 37, 38, 39, 40, -1, 42, 43, 44, 45, -1, - 47, 48, 49, -1, -1, -1, -1, 54, 55, 56, - 57, 58, 59, -1, -1, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, -1, -1, -1, 75, -1, - 77, -1, -1, -1, 13, -1, -1, 16, 17, 86, - 19, 20, 21, 22, 23, -1, -1, 26, 27, -1, - -1, 30, 31, 32, -1, 34, 35, 36, 37, 38, - 39, 40, -1, 42, 43, 44, 45, -1, 47, 48, - 49, -1, -1, -1, -1, 54, 55, 56, 57, 58, - 59, -1, -1, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, -1, -1, 13, -1, -1, 77, 17, - -1, 19, 20, 21, 22, 23, -1, 86, 26, 27, + 69, 70, 71, -1, -1, -1, 75, -1, 77, -1, + -1, -1, 13, -1, -1, 16, 17, 86, 19, 20, + 21, 22, 23, -1, -1, 26, 27, -1, -1, 30, + 31, 32, -1, 34, 35, 36, 37, 38, 39, 40, + -1, 42, 43, 44, 45, -1, 47, 48, 49, -1, + -1, -1, -1, 54, 55, 56, 57, 58, 59, -1, + -1, 62, 63, 64, 65, 66, 67, 68, 69, 70, + 71, -1, -1, 13, -1, -1, 77, 17, -1, 19, + 20, 21, 22, 23, -1, 86, 26, 27, -1, -1, + 30, 31, 32, -1, 34, 35, 36, 37, 38, 39, + 40, -1, 42, 43, 44, 45, -1, 47, 48, 49, + -1, -1, -1, -1, 54, 55, 56, 57, 58, 59, + -1, -1, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, -1, -1, 74, 13, -1, 77, -1, 17, + -1, 19, 20, 21, 22, 23, 86, -1, 26, 27, -1, -1, 30, 31, 32, -1, 34, 35, 36, 37, 38, 39, 40, -1, 42, 43, 44, 45, -1, 47, 48, 49, -1, -1, -1, -1, 54, 55, 56, 57, @@ -1078,20 +1126,26 @@ static const yytype_int16 yycheck[] = 36, 37, 38, 39, 40, -1, 42, 43, 44, 45, -1, 47, 48, 49, -1, -1, -1, -1, 54, 55, 56, 57, 58, 59, -1, -1, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, -1, -1, 74, 13, - -1, 77, -1, 17, -1, 19, 20, 21, 22, 23, - 86, -1, 26, 27, -1, -1, 30, 31, 32, -1, + 66, 67, 68, 69, 70, 71, -1, -1, 13, 75, + -1, 77, 17, -1, 19, 20, 21, 22, 23, -1, + 86, 26, 27, -1, -1, 30, 31, 32, -1, 34, + 35, 36, 37, 38, 39, 40, -1, 42, 43, 44, + 45, -1, 47, 48, 49, -1, -1, -1, -1, 54, + 55, 56, 57, 58, 59, -1, -1, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, -1, -1, 13, + 75, -1, 77, 17, -1, 19, 20, 21, 22, 23, + -1, 86, 26, 27, -1, -1, 30, 31, 32, -1, 34, 35, 36, 37, 38, 39, 40, -1, 42, 43, 44, 45, -1, 47, 48, 49, -1, -1, -1, -1, 54, 55, 56, 57, 58, 59, -1, -1, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, -1, -1, - 13, 75, -1, 77, 17, -1, 19, 20, 21, 22, + 13, -1, -1, 77, 17, -1, 19, 20, 21, 22, 23, -1, 86, 26, 27, -1, -1, 30, 31, 32, -1, 34, 35, 36, 37, 38, 39, 40, -1, 42, 43, 44, 45, -1, 47, 48, 49, -1, -1, -1, -1, 54, 55, 56, 57, 58, 59, -1, -1, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, -1, - -1, 13, 75, -1, 77, 17, -1, 19, 20, 21, + -1, 13, -1, -1, 77, 17, -1, 19, 20, 21, 22, 23, -1, 86, 26, 27, -1, -1, 30, 31, 32, -1, 34, 35, 36, 37, 38, 39, 40, -1, 42, 43, 44, 45, -1, 47, 48, 49, -1, -1, @@ -1103,96 +1157,92 @@ static const yytype_int16 yycheck[] = -1, 42, 43, 44, 45, -1, 47, 48, 49, -1, -1, -1, -1, 54, 55, 56, 57, 58, 59, -1, -1, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, -1, -1, 13, -1, -1, 77, 17, -1, 19, - 20, 21, 22, 23, -1, 86, 26, 27, -1, -1, - 30, 31, 32, -1, 34, 35, 36, 37, 38, 39, - 40, -1, 42, 43, 44, 45, -1, 47, 48, 49, - -1, -1, -1, -1, 54, 55, 56, 57, 58, 59, - -1, -1, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, -1, -1, 13, -1, -1, 77, 17, -1, - 19, 20, 21, 22, 23, -1, 86, 26, 27, -1, - -1, 30, 31, 32, -1, 34, 35, 36, 37, 38, - 39, 40, -1, 42, 43, 44, 45, -1, 47, 48, - 49, -1, -1, -1, -1, 54, 55, 56, 57, 58, - 59, -1, -1, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 13, -1, -1, -1, 17, 77, 19, - 20, 21, 22, 23, -1, -1, 26, 86, -1, -1, - -1, 31, 32, -1, 34, 35, 36, 37, -1, 39, - 40, -1, 42, 43, 44, 45, -1, 47, 48, -1, - -1, -1, -1, -1, 54, 55, 56, 57, 58, 59, - -1, -1, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 41, -1, -1, -1, -1, -1, 77, -1, -1, - 50, 51, 52, 53, 54, 55, -1, 57, -1, -1, - 60, 61, 62, 50, 51, 52, 53, 54, 55, -1, - 57, -1, -1, 60, 61, 62, -1, -1, 78, 79, - 80, 81, 82, 83, 84, -1, -1, -1, -1, -1, - -1, 78, 79, 80, 81, 82, 83, 84, -1, -1, - -1, -1, 89, 50, 51, 52, 53, 54, 55, -1, - 57, -1, -1, 60, 61, 62, 50, 51, 52, 53, - 54, 55, -1, 57, -1, -1, 60, 61, 62, -1, - -1, 78, 79, 80, 81, 82, 83, 84, -1, 86, - -1, -1, -1, -1, 78, 79, 80, 81, 82, 83, - 84, -1, 86, 50, 51, 52, 53, 54, 55, -1, - 57, -1, -1, 60, 61, 62, 50, 51, 52, 53, - 54, 55, -1, 57, -1, -1, 60, 61, 62, -1, - -1, 78, 79, 80, 81, 82, 83, 84, -1, 86, - -1, -1, -1, -1, 78, 79, 80, 81, 82, 83, - 84, -1, 86, 50, 51, 52, 53, 54, 55, -1, - 57, -1, -1, 60, 61, 62, 50, 51, 52, 53, - -1, -1, -1, 57, -1, -1, 60, 61, 62, -1, - -1, 78, 79, 80, 81, 82, 83, 84, -1, -1, - -1, -1, -1, -1, 78, 79, 80, 81, 82, 83, - 84 + 71, 13, 14, 15, -1, 17, 77, 19, 20, 21, + 22, 23, -1, -1, 26, 86, -1, -1, -1, 31, + 32, -1, 34, 35, 36, 37, -1, 39, 40, -1, + 42, 43, 44, 45, -1, 47, 48, -1, -1, -1, + -1, -1, 54, 55, 56, 57, 58, 59, -1, -1, + 62, 63, 64, 65, 66, 67, 68, 69, 70, -1, + 13, -1, -1, -1, 17, 77, 19, 20, 21, 22, + 23, -1, -1, 26, -1, -1, -1, -1, 31, 32, + -1, 34, 35, 36, 37, -1, 39, 40, -1, 42, + 43, 44, 45, -1, 47, 48, -1, -1, -1, -1, + 32, 54, 55, 56, 57, 58, 59, -1, -1, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 50, 51, + 52, 53, 54, 55, 77, 57, 58, 59, 60, 61, + 62, 50, 51, 52, 53, 54, 55, -1, 57, -1, + -1, 60, 61, 62, -1, -1, 78, 79, 80, 81, + 82, 83, 84, -1, -1, -1, -1, -1, -1, 78, + 79, 80, 81, 82, 83, 84, -1, -1, -1, -1, + 89, 50, 51, 52, 53, 54, 55, -1, 57, -1, + -1, 60, 61, 62, 50, 51, 52, 53, 54, 55, + -1, 57, -1, -1, 60, 61, 62, -1, -1, 78, + 79, 80, 81, 82, 83, 84, -1, 86, -1, -1, + -1, -1, 78, 79, 80, 81, 82, 83, 84, -1, + 86, 50, 51, 52, 53, 54, 55, -1, 57, -1, + -1, 60, 61, 62, 50, 51, 52, 53, 54, 55, + -1, 57, -1, -1, 60, 61, 62, -1, -1, 78, + 79, 80, 81, 82, 83, 84, -1, 86, -1, -1, + -1, -1, 78, 79, 80, 81, 82, 83, 84, -1, + 86, 50, 51, 52, 53, 54, 55, -1, 57, -1, + -1, 60, 61, 62, 50, 51, 52, 53, -1, -1, + -1, 57, -1, -1, 60, 61, 62, -1, -1, 78, + 79, 80, 81, 82, 83, 84, -1, -1, -1, -1, + -1, -1, 78, 79, 80, 81, 82, 83, 84 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ -static const yytype_int8 yystos[] = +static const yytype_uint8 yystos[] = { 0, 13, 17, 19, 20, 21, 22, 23, 26, 27, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 54, 55, 56, 57, 58, 59, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 77, 86, 91, 92, - 93, 94, 95, 100, 102, 105, 106, 107, 108, 110, - 111, 112, 113, 39, 26, 35, 39, 40, 102, 103, - 104, 5, 10, 14, 15, 56, 81, 82, 88, 102, - 117, 118, 121, 122, 102, 39, 88, 122, 123, 124, - 44, 45, 102, 118, 120, 102, 103, 103, 102, 0, - 93, 88, 122, 123, 86, 86, 87, 121, 121, 121, - 122, 88, 41, 50, 51, 52, 53, 54, 55, 57, - 60, 61, 62, 78, 79, 80, 81, 82, 83, 84, - 103, 86, 122, 123, 32, 58, 59, 86, 87, 102, - 122, 42, 52, 109, 86, 86, 86, 103, 123, 86, - 102, 89, 123, 86, 105, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 86, 89, 118, 119, 119, 119, 122, 52, - 86, 122, 73, 86, 96, 97, 98, 99, 86, 89, - 89, 86, 105, 114, 115, 116, 24, 114, 86, 86, - 86, 86, 122, 114, 86, 102, 86, 114, 86, 24, - 74, 116, 86, 105, 23, 42, 75, 103, 99, 16, - 86, 105, 86, 114, 42, 122, 86, 86, 101, 102, - 114, 74, 122, 86, 114, 86, 87, 74, 86, 86, - 114, 102, 86, 114, 75, 75, 86, 86 + 67, 68, 69, 70, 71, 72, 77, 86, 94, 95, + 96, 97, 98, 103, 105, 108, 109, 110, 111, 113, + 114, 115, 116, 39, 26, 35, 39, 40, 105, 106, + 107, 5, 10, 14, 15, 56, 81, 82, 88, 90, + 105, 120, 121, 124, 125, 128, 105, 39, 88, 128, + 129, 130, 44, 45, 105, 121, 123, 105, 106, 106, + 105, 0, 96, 88, 128, 129, 86, 86, 87, 124, + 124, 124, 128, 14, 15, 92, 105, 126, 127, 129, + 88, 41, 50, 51, 52, 53, 54, 55, 57, 60, + 61, 62, 78, 79, 80, 81, 82, 83, 84, 106, + 86, 128, 129, 32, 58, 59, 86, 87, 105, 128, + 42, 52, 112, 86, 86, 86, 106, 129, 86, 105, + 89, 92, 92, 91, 92, 87, 91, 91, 129, 86, + 108, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 86, 89, + 121, 122, 122, 122, 128, 52, 86, 128, 73, 86, + 99, 100, 101, 102, 86, 89, 128, 128, 128, 14, + 15, 105, 127, 89, 86, 108, 117, 118, 119, 24, + 117, 86, 86, 86, 86, 128, 117, 86, 105, 86, + 117, 86, 24, 74, 119, 86, 108, 23, 42, 75, + 106, 102, 16, 86, 108, 86, 117, 42, 128, 86, + 86, 104, 105, 117, 74, 128, 86, 117, 86, 87, + 74, 86, 86, 117, 105, 86, 117, 75, 75, 86, + 86 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_int8 yyr1[] = +static const yytype_uint8 yyr1[] = { - 0, 90, 91, 92, 92, 93, 93, 93, 93, 93, - 94, 95, 96, 97, 97, 98, 98, 99, 99, 100, - 100, 101, 101, 101, 102, 102, 102, 102, 102, 102, - 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, - 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, - 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, - 102, 102, 103, 103, 104, 104, 105, 105, 105, 105, - 106, 106, 106, 107, 107, 107, 107, 107, 107, 108, - 108, 108, 108, 109, 109, 110, 110, 110, 111, 111, - 112, 112, 112, 112, 113, 113, 113, 114, 114, 115, - 115, 116, 116, 117, 117, 117, 117, 117, 117, 117, - 117, 117, 118, 119, 120, 121, 121, 122, 122, 122, - 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 123, 123, 124, 124 + 0, 93, 94, 95, 95, 96, 96, 96, 96, 96, + 97, 98, 99, 100, 100, 101, 101, 102, 102, 103, + 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, 105, 105, 105, 105, 105, 105, + 105, 105, 106, 106, 107, 107, 108, 108, 108, 108, + 109, 109, 109, 110, 110, 110, 110, 110, 110, 111, + 111, 111, 111, 112, 112, 113, 113, 113, 114, 114, + 115, 115, 115, 115, 116, 116, 116, 117, 117, 118, + 118, 119, 119, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 121, 122, 123, 124, 124, 125, 125, + 125, 126, 126, 127, 127, 127, 128, 128, 128, 128, + 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, + 128, 128, 128, 128, 129, 129, 130, 130 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -1209,9 +1259,10 @@ static const yytype_int8 yyr2[] = 5, 5, 5, 1, 1, 3, 3, 3, 4, 7, 6, 9, 7, 10, 7, 11, 12, 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, - 4, 1, 1, 1, 1, 1, 3, 1, 3, 3, + 4, 1, 1, 1, 1, 1, 1, 3, 3, 3, + 3, 1, 3, 3, 3, 3, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 0, 1, 1, 3 + 3, 3, 3, 3, 0, 1, 1, 3 }; @@ -1483,51 +1534,51 @@ yydestruct (const char *yymsg, switch (yykind) { case YYSYMBOL_tTHEFUNC: /* tTHEFUNC */ -#line 187 "engines/director/lingo/lingo-gr.y" +#line 188 "engines/director/lingo/lingo-gr.y" { delete ((*yyvaluep).s); } -#line 1489 "engines/director/lingo/lingo-gr.cpp" +#line 1540 "engines/director/lingo/lingo-gr.cpp" break; case YYSYMBOL_tTHEFUNCINOF: /* tTHEFUNCINOF */ -#line 187 "engines/director/lingo/lingo-gr.y" +#line 188 "engines/director/lingo/lingo-gr.y" { delete ((*yyvaluep).s); } -#line 1495 "engines/director/lingo/lingo-gr.cpp" +#line 1546 "engines/director/lingo/lingo-gr.cpp" break; case YYSYMBOL_tVARID: /* tVARID */ -#line 187 "engines/director/lingo/lingo-gr.y" +#line 188 "engines/director/lingo/lingo-gr.y" { delete ((*yyvaluep).s); } -#line 1501 "engines/director/lingo/lingo-gr.cpp" +#line 1552 "engines/director/lingo/lingo-gr.cpp" break; case YYSYMBOL_tSTRING: /* tSTRING */ -#line 187 "engines/director/lingo/lingo-gr.y" +#line 188 "engines/director/lingo/lingo-gr.y" { delete ((*yyvaluep).s); } -#line 1507 "engines/director/lingo/lingo-gr.cpp" +#line 1558 "engines/director/lingo/lingo-gr.cpp" break; case YYSYMBOL_tSYMBOL: /* tSYMBOL */ -#line 187 "engines/director/lingo/lingo-gr.y" +#line 188 "engines/director/lingo/lingo-gr.y" { delete ((*yyvaluep).s); } -#line 1513 "engines/director/lingo/lingo-gr.cpp" +#line 1564 "engines/director/lingo/lingo-gr.cpp" break; case YYSYMBOL_tENDCLAUSE: /* tENDCLAUSE */ -#line 187 "engines/director/lingo/lingo-gr.y" +#line 188 "engines/director/lingo/lingo-gr.y" { delete ((*yyvaluep).s); } -#line 1519 "engines/director/lingo/lingo-gr.cpp" +#line 1570 "engines/director/lingo/lingo-gr.cpp" break; case YYSYMBOL_tPLAYACCEL: /* tPLAYACCEL */ -#line 187 "engines/director/lingo/lingo-gr.y" +#line 188 "engines/director/lingo/lingo-gr.y" { delete ((*yyvaluep).s); } -#line 1525 "engines/director/lingo/lingo-gr.cpp" +#line 1576 "engines/director/lingo/lingo-gr.cpp" break; case YYSYMBOL_ID: /* ID */ -#line 187 "engines/director/lingo/lingo-gr.y" +#line 188 "engines/director/lingo/lingo-gr.y" { delete ((*yyvaluep).s); } -#line 1531 "engines/director/lingo/lingo-gr.cpp" +#line 1582 "engines/director/lingo/lingo-gr.cpp" break; default: @@ -1793,64 +1844,13 @@ yyreduce: switch (yyn) { case 2: /* script: scriptpartlist */ -#line 193 "engines/director/lingo/lingo-gr.y" +#line 194 "engines/director/lingo/lingo-gr.y" { g_lingo->_compiler->_assemblyAST = new ScriptNode((yyvsp[0].nodelist)); } -#line 1799 "engines/director/lingo/lingo-gr.cpp" - break; - - case 3: /* scriptpartlist: scriptpart */ -#line 195 "engines/director/lingo/lingo-gr.y" - { - NodeList *list = new NodeList; - if ((yyvsp[0].node)) { - list->push_back((yyvsp[0].node)); - } - (yyval.nodelist) = list; } -#line 1810 "engines/director/lingo/lingo-gr.cpp" - break; - - case 4: /* scriptpartlist: scriptpartlist scriptpart */ -#line 201 "engines/director/lingo/lingo-gr.y" - { - if ((yyvsp[0].node)) { - (yyvsp[-1].nodelist)->push_back((yyvsp[0].node)); - } - (yyval.nodelist) = (yyvsp[-1].nodelist); } -#line 1820 "engines/director/lingo/lingo-gr.cpp" - break; - - case 5: /* scriptpart: '\n' */ -#line 208 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = nullptr; } -#line 1826 "engines/director/lingo/lingo-gr.cpp" - break; - - case 10: /* macro: tMACRO ID idlist '\n' stmtlist */ -#line 241 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new HandlerNode((yyvsp[-3].s), (yyvsp[-2].idlist), (yyvsp[0].nodelist)); } -#line 1832 "engines/director/lingo/lingo-gr.cpp" - break; - - case 11: /* factory: tFACTORY ID '\n' methodlist */ -#line 245 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new FactoryNode((yyvsp[-2].s), (yyvsp[0].nodelist)); } -#line 1838 "engines/director/lingo/lingo-gr.cpp" - break; - - case 12: /* method: tMETHOD ID idlist '\n' stmtlist */ -#line 247 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new HandlerNode((yyvsp[-3].s), (yyvsp[-2].idlist), (yyvsp[0].nodelist)); } -#line 1844 "engines/director/lingo/lingo-gr.cpp" - break; - - case 13: /* methodlist: %empty */ -#line 249 "engines/director/lingo/lingo-gr.y" - { (yyval.nodelist) = new NodeList; } #line 1850 "engines/director/lingo/lingo-gr.cpp" break; - case 15: /* nonemptymethodlist: methodlistline */ -#line 253 "engines/director/lingo/lingo-gr.y" + case 3: /* scriptpartlist: scriptpart */ +#line 196 "engines/director/lingo/lingo-gr.y" { NodeList *list = new NodeList; if ((yyvsp[0].node)) { @@ -1860,672 +1860,776 @@ yyreduce: #line 1861 "engines/director/lingo/lingo-gr.cpp" break; - case 16: /* nonemptymethodlist: methodlist '\n' methodlistline */ -#line 259 "engines/director/lingo/lingo-gr.y" + case 4: /* scriptpartlist: scriptpartlist scriptpart */ +#line 202 "engines/director/lingo/lingo-gr.y" { if ((yyvsp[0].node)) { - (yyvsp[-2].nodelist)->push_back((yyvsp[0].node)); + (yyvsp[-1].nodelist)->push_back((yyvsp[0].node)); } - (yyval.nodelist) = (yyvsp[-2].nodelist); } + (yyval.nodelist) = (yyvsp[-1].nodelist); } #line 1871 "engines/director/lingo/lingo-gr.cpp" break; - case 17: /* methodlistline: '\n' */ -#line 266 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = nullptr; } + case 5: /* scriptpart: '\n' */ +#line 209 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = nullptr; } #line 1877 "engines/director/lingo/lingo-gr.cpp" break; - case 19: /* handler: tON ID idlist '\n' stmtlist tENDCLAUSE endargdef '\n' */ -#line 272 "engines/director/lingo/lingo-gr.y" - { // D3 - (yyval.node) = new HandlerNode((yyvsp[-6].s), (yyvsp[-5].idlist), (yyvsp[-3].nodelist)); - checkEnd((yyvsp[-2].s), (yyvsp[-6].s), false); - delete (yyvsp[-2].s); } -#line 1886 "engines/director/lingo/lingo-gr.cpp" + case 10: /* macro: tMACRO ID idlist '\n' stmtlist */ +#line 242 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new HandlerNode((yyvsp[-3].s), (yyvsp[-2].idlist), (yyvsp[0].nodelist)); } +#line 1883 "engines/director/lingo/lingo-gr.cpp" break; - case 20: /* handler: tON ID idlist '\n' stmtlist */ -#line 276 "engines/director/lingo/lingo-gr.y" - { // D4. No 'end' clause - (yyval.node) = new HandlerNode((yyvsp[-3].s), (yyvsp[-2].idlist), (yyvsp[0].nodelist)); } -#line 1893 "engines/director/lingo/lingo-gr.cpp" + case 11: /* factory: tFACTORY ID '\n' methodlist */ +#line 246 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new FactoryNode((yyvsp[-2].s), (yyvsp[0].nodelist)); } +#line 1889 "engines/director/lingo/lingo-gr.cpp" break; - case 22: /* endargdef: ID */ -#line 281 "engines/director/lingo/lingo-gr.y" - { delete (yyvsp[0].s); } -#line 1899 "engines/director/lingo/lingo-gr.cpp" + case 12: /* method: tMETHOD ID idlist '\n' stmtlist */ +#line 248 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new HandlerNode((yyvsp[-3].s), (yyvsp[-2].idlist), (yyvsp[0].nodelist)); } +#line 1895 "engines/director/lingo/lingo-gr.cpp" break; - case 23: /* endargdef: endargdef ',' ID */ -#line 282 "engines/director/lingo/lingo-gr.y" - { delete (yyvsp[0].s); } -#line 1905 "engines/director/lingo/lingo-gr.cpp" - break; - - case 25: /* ID: tAFTER */ -#line 288 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("after"); } -#line 1911 "engines/director/lingo/lingo-gr.cpp" - break; - - case 26: /* ID: tAND */ -#line 289 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("and"); } -#line 1917 "engines/director/lingo/lingo-gr.cpp" - break; - - case 27: /* ID: tBEFORE */ -#line 290 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("before"); } -#line 1923 "engines/director/lingo/lingo-gr.cpp" - break; - - case 28: /* ID: tCAST */ -#line 291 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("cast"); } -#line 1929 "engines/director/lingo/lingo-gr.cpp" - break; - - case 29: /* ID: tCHAR */ -#line 292 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("char"); } -#line 1935 "engines/director/lingo/lingo-gr.cpp" - break; - - case 30: /* ID: tDOWN */ -#line 293 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("down"); } -#line 1941 "engines/director/lingo/lingo-gr.cpp" - break; - - case 31: /* ID: tEXIT */ -#line 296 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("exit"); } -#line 1947 "engines/director/lingo/lingo-gr.cpp" - break; - - case 32: /* ID: tFIELD */ -#line 298 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("field"); } -#line 1953 "engines/director/lingo/lingo-gr.cpp" - break; - - case 33: /* ID: tIN */ -#line 301 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("in"); } -#line 1959 "engines/director/lingo/lingo-gr.cpp" - break; - - case 34: /* ID: tINTERSECTS */ -#line 303 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("intersects"); } -#line 1965 "engines/director/lingo/lingo-gr.cpp" - break; - - case 35: /* ID: tINTO */ -#line 304 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("into"); } -#line 1971 "engines/director/lingo/lingo-gr.cpp" - break; - - case 36: /* ID: tITEM */ -#line 305 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("item"); } -#line 1977 "engines/director/lingo/lingo-gr.cpp" - break; - - case 37: /* ID: tLINE */ -#line 306 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("line"); } -#line 1983 "engines/director/lingo/lingo-gr.cpp" - break; - - case 38: /* ID: tMOD */ -#line 309 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("mod"); } -#line 1989 "engines/director/lingo/lingo-gr.cpp" - break; - - case 39: /* ID: tMOVIE */ -#line 310 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("movie"); } -#line 1995 "engines/director/lingo/lingo-gr.cpp" - break; - - case 40: /* ID: tNEXT */ -#line 311 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("next"); } -#line 2001 "engines/director/lingo/lingo-gr.cpp" - break; - - case 41: /* ID: tNOT */ -#line 312 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("not"); } -#line 2007 "engines/director/lingo/lingo-gr.cpp" - break; - - case 42: /* ID: tOF */ -#line 313 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("of"); } -#line 2013 "engines/director/lingo/lingo-gr.cpp" - break; - - case 43: /* ID: tOPEN */ -#line 315 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("open"); } -#line 2019 "engines/director/lingo/lingo-gr.cpp" - break; - - case 44: /* ID: tOR */ -#line 316 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("or"); } -#line 2025 "engines/director/lingo/lingo-gr.cpp" - break; - - case 45: /* ID: tPLAY */ -#line 317 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("play"); } -#line 2031 "engines/director/lingo/lingo-gr.cpp" - break; - - case 46: /* ID: tPLAYACCEL */ -#line 318 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("playAccel"); } -#line 2037 "engines/director/lingo/lingo-gr.cpp" - break; - - case 47: /* ID: tPREVIOUS */ -#line 319 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("previous"); } -#line 2043 "engines/director/lingo/lingo-gr.cpp" - break; - - case 48: /* ID: tREPEAT */ -#line 322 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("repeat"); } -#line 2049 "engines/director/lingo/lingo-gr.cpp" - break; - - case 49: /* ID: tSCRIPT */ -#line 323 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("script"); } -#line 2055 "engines/director/lingo/lingo-gr.cpp" - break; - - case 50: /* ID: tSET */ -#line 324 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("set"); } -#line 2061 "engines/director/lingo/lingo-gr.cpp" - break; - - case 51: /* ID: tSTARTS */ -#line 325 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("starts"); } -#line 2067 "engines/director/lingo/lingo-gr.cpp" - break; - - case 52: /* ID: tTELL */ -#line 326 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("tell"); } -#line 2073 "engines/director/lingo/lingo-gr.cpp" - break; - - case 53: /* ID: tTO */ -#line 328 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("to"); } -#line 2079 "engines/director/lingo/lingo-gr.cpp" - break; - - case 54: /* ID: tASSERTERROR */ -#line 329 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("scummvmAssertError"); } -#line 2085 "engines/director/lingo/lingo-gr.cpp" - break; - - case 55: /* ID: tSPRITE */ -#line 330 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("sprite"); } -#line 2091 "engines/director/lingo/lingo-gr.cpp" - break; - - case 56: /* ID: tWHEN */ -#line 331 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("when"); } -#line 2097 "engines/director/lingo/lingo-gr.cpp" - break; - - case 57: /* ID: tWHILE */ -#line 332 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("while"); } -#line 2103 "engines/director/lingo/lingo-gr.cpp" - break; - - case 58: /* ID: tWINDOW */ -#line 333 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("window"); } -#line 2109 "engines/director/lingo/lingo-gr.cpp" - break; - - case 59: /* ID: tWITH */ -#line 334 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("with"); } -#line 2115 "engines/director/lingo/lingo-gr.cpp" - break; - - case 60: /* ID: tWITHIN */ -#line 335 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("within"); } -#line 2121 "engines/director/lingo/lingo-gr.cpp" - break; - - case 61: /* ID: tWORD */ -#line 336 "engines/director/lingo/lingo-gr.y" - { (yyval.s) = new Common::String("word"); } -#line 2127 "engines/director/lingo/lingo-gr.cpp" - break; - - case 62: /* idlist: %empty */ -#line 339 "engines/director/lingo/lingo-gr.y" - { (yyval.idlist) = new IDList; } -#line 2133 "engines/director/lingo/lingo-gr.cpp" - break; - - case 64: /* nonemptyidlist: ID */ -#line 343 "engines/director/lingo/lingo-gr.y" - { - Common::Array *list = new IDList; - list->push_back((yyvsp[0].s)); - (yyval.idlist) = list; } -#line 2142 "engines/director/lingo/lingo-gr.cpp" - break; - - case 65: /* nonemptyidlist: nonemptyidlist ',' ID */ -#line 347 "engines/director/lingo/lingo-gr.y" - { - (yyvsp[-2].idlist)->push_back((yyvsp[0].s)); - (yyval.idlist) = (yyvsp[-2].idlist); } -#line 2150 "engines/director/lingo/lingo-gr.cpp" - break; - - case 73: /* proc: ID '(' exprlist ')' '\n' */ -#line 368 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new CmdNode((yyvsp[-4].s), (yyvsp[-2].nodelist)); } -#line 2156 "engines/director/lingo/lingo-gr.cpp" - break; - - case 74: /* proc: ID exprlist '\n' */ -#line 369 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new CmdNode((yyvsp[-2].s), (yyvsp[-1].nodelist)); } -#line 2162 "engines/director/lingo/lingo-gr.cpp" - break; - - case 75: /* proc: tPUT '(' exprlist ')' '\n' */ -#line 370 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new CmdNode(new Common::String("put"), (yyvsp[-2].nodelist)); } -#line 2168 "engines/director/lingo/lingo-gr.cpp" - break; - - case 76: /* proc: tPUT exprlist '\n' */ -#line 371 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new CmdNode(new Common::String("put"), (yyvsp[-1].nodelist)); } -#line 2174 "engines/director/lingo/lingo-gr.cpp" - break; - - case 77: /* proc: tNEXT tREPEAT '\n' */ -#line 372 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new NextRepeatNode(); } -#line 2180 "engines/director/lingo/lingo-gr.cpp" - break; - - case 78: /* proc: tEXIT tREPEAT '\n' */ -#line 373 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new ExitRepeatNode(); } -#line 2186 "engines/director/lingo/lingo-gr.cpp" - break; - - case 79: /* asgn: tPUT expr tINTO varorchunk '\n' */ -#line 376 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new PutIntoNode((yyvsp[-3].node), (yyvsp[-1].node)); } -#line 2192 "engines/director/lingo/lingo-gr.cpp" - break; - - case 80: /* asgn: tPUT expr tAFTER varorchunk '\n' */ -#line 377 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new PutAfterNode((yyvsp[-3].node), (yyvsp[-1].node)); } -#line 2198 "engines/director/lingo/lingo-gr.cpp" - break; - - case 81: /* asgn: tPUT expr tBEFORE varorchunk '\n' */ -#line 378 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new PutBeforeNode((yyvsp[-3].node), (yyvsp[-1].node)); } -#line 2204 "engines/director/lingo/lingo-gr.cpp" - break; - - case 82: /* asgn: tSET varorthe to expr '\n' */ -#line 379 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new SetNode((yyvsp[-3].node), (yyvsp[-1].node)); } -#line 2210 "engines/director/lingo/lingo-gr.cpp" - break; - - case 85: /* definevars: tGLOBAL idlist '\n' */ -#line 384 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new GlobalNode((yyvsp[-1].idlist)); } -#line 2216 "engines/director/lingo/lingo-gr.cpp" - break; - - case 86: /* definevars: tPROPERTY idlist '\n' */ -#line 385 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new PropertyNode((yyvsp[-1].idlist)); } -#line 2222 "engines/director/lingo/lingo-gr.cpp" - break; - - case 87: /* definevars: tINSTANCE idlist '\n' */ -#line 386 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new InstanceNode((yyvsp[-1].idlist)); } -#line 2228 "engines/director/lingo/lingo-gr.cpp" - break; - - case 88: /* ifstmt: tIF expr tTHEN stmt */ -#line 389 "engines/director/lingo/lingo-gr.y" - { - NodeList *stmtlist = new NodeList; - stmtlist->push_back((yyvsp[0].node)); - (yyval.node) = new IfStmtNode((yyvsp[-2].node), stmtlist); } -#line 2237 "engines/director/lingo/lingo-gr.cpp" - break; - - case 89: /* ifstmt: tIF expr tTHEN '\n' stmtlist tENDIF '\n' */ -#line 393 "engines/director/lingo/lingo-gr.y" - { - (yyval.node) = new IfStmtNode((yyvsp[-5].node), (yyvsp[-2].nodelist)); } -#line 2244 "engines/director/lingo/lingo-gr.cpp" - break; - - case 90: /* ifelsestmt: tIF expr tTHEN stmt tELSE stmt */ -#line 397 "engines/director/lingo/lingo-gr.y" - { - NodeList *stmtlist1 = new NodeList; - stmtlist1->push_back((yyvsp[-2].node)); - NodeList *stmtlist2 = new NodeList; - stmtlist2->push_back((yyvsp[0].node)); - (yyval.node) = new IfElseStmtNode((yyvsp[-4].node), stmtlist1, stmtlist2); } -#line 2255 "engines/director/lingo/lingo-gr.cpp" - break; - - case 91: /* ifelsestmt: tIF expr tTHEN stmt tELSE '\n' stmtlist tENDIF '\n' */ -#line 403 "engines/director/lingo/lingo-gr.y" - { - NodeList *stmtlist1 = new NodeList; - stmtlist1->push_back((yyvsp[-5].node)); - (yyval.node) = new IfElseStmtNode((yyvsp[-7].node), stmtlist1, (yyvsp[-2].nodelist)); } -#line 2264 "engines/director/lingo/lingo-gr.cpp" - break; - - case 92: /* ifelsestmt: tIF expr tTHEN '\n' stmtlist tELSE stmt */ -#line 407 "engines/director/lingo/lingo-gr.y" - { - NodeList *stmtlist2 = new NodeList; - stmtlist2->push_back((yyvsp[0].node)); - (yyval.node) = new IfElseStmtNode((yyvsp[-5].node), (yyvsp[-2].nodelist), stmtlist2); } -#line 2273 "engines/director/lingo/lingo-gr.cpp" - break; - - case 93: /* ifelsestmt: tIF expr tTHEN '\n' stmtlist tELSE '\n' stmtlist tENDIF '\n' */ -#line 411 "engines/director/lingo/lingo-gr.y" - { - (yyval.node) = new IfElseStmtNode((yyvsp[-8].node), (yyvsp[-5].nodelist), (yyvsp[-2].nodelist)); } -#line 2280 "engines/director/lingo/lingo-gr.cpp" - break; - - case 94: /* loop: tREPEAT tWHILE expr '\n' stmtlist tENDREPEAT '\n' */ -#line 415 "engines/director/lingo/lingo-gr.y" - { - (yyval.node) = new RepeatWhileNode((yyvsp[-4].node), (yyvsp[-2].nodelist)); } -#line 2287 "engines/director/lingo/lingo-gr.cpp" - break; - - case 95: /* loop: tREPEAT tWITH ID tEQ expr tTO expr '\n' stmtlist tENDREPEAT '\n' */ -#line 417 "engines/director/lingo/lingo-gr.y" - { - (yyval.node) = new RepeatWithToNode((yyvsp[-8].s), (yyvsp[-6].node), false, (yyvsp[-4].node), (yyvsp[-2].nodelist)); } -#line 2294 "engines/director/lingo/lingo-gr.cpp" - break; - - case 96: /* loop: tREPEAT tWITH ID tEQ expr tDOWN tTO expr '\n' stmtlist tENDREPEAT '\n' */ -#line 419 "engines/director/lingo/lingo-gr.y" - { - (yyval.node) = new RepeatWithToNode((yyvsp[-9].s), (yyvsp[-7].node), true, (yyvsp[-4].node), (yyvsp[-2].nodelist)); } -#line 2301 "engines/director/lingo/lingo-gr.cpp" - break; - - case 97: /* stmtlist: %empty */ -#line 423 "engines/director/lingo/lingo-gr.y" + case 13: /* methodlist: %empty */ +#line 250 "engines/director/lingo/lingo-gr.y" { (yyval.nodelist) = new NodeList; } -#line 2307 "engines/director/lingo/lingo-gr.cpp" +#line 1901 "engines/director/lingo/lingo-gr.cpp" break; - case 99: /* nonemptystmtlist: stmtlistline */ -#line 428 "engines/director/lingo/lingo-gr.y" + case 15: /* nonemptymethodlist: methodlistline */ +#line 254 "engines/director/lingo/lingo-gr.y" { NodeList *list = new NodeList; if ((yyvsp[0].node)) { list->push_back((yyvsp[0].node)); } (yyval.nodelist) = list; } -#line 2318 "engines/director/lingo/lingo-gr.cpp" +#line 1912 "engines/director/lingo/lingo-gr.cpp" + break; + + case 16: /* nonemptymethodlist: methodlist '\n' methodlistline */ +#line 260 "engines/director/lingo/lingo-gr.y" + { + if ((yyvsp[0].node)) { + (yyvsp[-2].nodelist)->push_back((yyvsp[0].node)); + } + (yyval.nodelist) = (yyvsp[-2].nodelist); } +#line 1922 "engines/director/lingo/lingo-gr.cpp" + break; + + case 17: /* methodlistline: '\n' */ +#line 267 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = nullptr; } +#line 1928 "engines/director/lingo/lingo-gr.cpp" + break; + + case 19: /* handler: tON ID idlist '\n' stmtlist tENDCLAUSE endargdef '\n' */ +#line 273 "engines/director/lingo/lingo-gr.y" + { // D3 + (yyval.node) = new HandlerNode((yyvsp[-6].s), (yyvsp[-5].idlist), (yyvsp[-3].nodelist)); + checkEnd((yyvsp[-2].s), (yyvsp[-6].s), false); + delete (yyvsp[-2].s); } +#line 1937 "engines/director/lingo/lingo-gr.cpp" + break; + + case 20: /* handler: tON ID idlist '\n' stmtlist */ +#line 277 "engines/director/lingo/lingo-gr.y" + { // D4. No 'end' clause + (yyval.node) = new HandlerNode((yyvsp[-3].s), (yyvsp[-2].idlist), (yyvsp[0].nodelist)); } +#line 1944 "engines/director/lingo/lingo-gr.cpp" + break; + + case 22: /* endargdef: ID */ +#line 282 "engines/director/lingo/lingo-gr.y" + { delete (yyvsp[0].s); } +#line 1950 "engines/director/lingo/lingo-gr.cpp" + break; + + case 23: /* endargdef: endargdef ',' ID */ +#line 283 "engines/director/lingo/lingo-gr.y" + { delete (yyvsp[0].s); } +#line 1956 "engines/director/lingo/lingo-gr.cpp" + break; + + case 25: /* ID: tAFTER */ +#line 289 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("after"); } +#line 1962 "engines/director/lingo/lingo-gr.cpp" + break; + + case 26: /* ID: tAND */ +#line 290 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("and"); } +#line 1968 "engines/director/lingo/lingo-gr.cpp" + break; + + case 27: /* ID: tBEFORE */ +#line 291 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("before"); } +#line 1974 "engines/director/lingo/lingo-gr.cpp" + break; + + case 28: /* ID: tCAST */ +#line 292 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("cast"); } +#line 1980 "engines/director/lingo/lingo-gr.cpp" + break; + + case 29: /* ID: tCHAR */ +#line 293 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("char"); } +#line 1986 "engines/director/lingo/lingo-gr.cpp" + break; + + case 30: /* ID: tDOWN */ +#line 294 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("down"); } +#line 1992 "engines/director/lingo/lingo-gr.cpp" + break; + + case 31: /* ID: tEXIT */ +#line 297 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("exit"); } +#line 1998 "engines/director/lingo/lingo-gr.cpp" + break; + + case 32: /* ID: tFIELD */ +#line 299 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("field"); } +#line 2004 "engines/director/lingo/lingo-gr.cpp" + break; + + case 33: /* ID: tIN */ +#line 302 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("in"); } +#line 2010 "engines/director/lingo/lingo-gr.cpp" + break; + + case 34: /* ID: tINTERSECTS */ +#line 304 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("intersects"); } +#line 2016 "engines/director/lingo/lingo-gr.cpp" + break; + + case 35: /* ID: tINTO */ +#line 305 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("into"); } +#line 2022 "engines/director/lingo/lingo-gr.cpp" + break; + + case 36: /* ID: tITEM */ +#line 306 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("item"); } +#line 2028 "engines/director/lingo/lingo-gr.cpp" + break; + + case 37: /* ID: tLINE */ +#line 307 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("line"); } +#line 2034 "engines/director/lingo/lingo-gr.cpp" + break; + + case 38: /* ID: tMOD */ +#line 310 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("mod"); } +#line 2040 "engines/director/lingo/lingo-gr.cpp" + break; + + case 39: /* ID: tMOVIE */ +#line 311 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("movie"); } +#line 2046 "engines/director/lingo/lingo-gr.cpp" + break; + + case 40: /* ID: tNEXT */ +#line 312 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("next"); } +#line 2052 "engines/director/lingo/lingo-gr.cpp" + break; + + case 41: /* ID: tNOT */ +#line 313 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("not"); } +#line 2058 "engines/director/lingo/lingo-gr.cpp" + break; + + case 42: /* ID: tOF */ +#line 314 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("of"); } +#line 2064 "engines/director/lingo/lingo-gr.cpp" + break; + + case 43: /* ID: tOPEN */ +#line 316 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("open"); } +#line 2070 "engines/director/lingo/lingo-gr.cpp" + break; + + case 44: /* ID: tOR */ +#line 317 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("or"); } +#line 2076 "engines/director/lingo/lingo-gr.cpp" + break; + + case 45: /* ID: tPLAY */ +#line 318 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("play"); } +#line 2082 "engines/director/lingo/lingo-gr.cpp" + break; + + case 46: /* ID: tPLAYACCEL */ +#line 319 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("playAccel"); } +#line 2088 "engines/director/lingo/lingo-gr.cpp" + break; + + case 47: /* ID: tPREVIOUS */ +#line 320 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("previous"); } +#line 2094 "engines/director/lingo/lingo-gr.cpp" + break; + + case 48: /* ID: tREPEAT */ +#line 323 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("repeat"); } +#line 2100 "engines/director/lingo/lingo-gr.cpp" + break; + + case 49: /* ID: tSCRIPT */ +#line 324 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("script"); } +#line 2106 "engines/director/lingo/lingo-gr.cpp" + break; + + case 50: /* ID: tSET */ +#line 325 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("set"); } +#line 2112 "engines/director/lingo/lingo-gr.cpp" + break; + + case 51: /* ID: tSTARTS */ +#line 326 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("starts"); } +#line 2118 "engines/director/lingo/lingo-gr.cpp" + break; + + case 52: /* ID: tTELL */ +#line 327 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("tell"); } +#line 2124 "engines/director/lingo/lingo-gr.cpp" + break; + + case 53: /* ID: tTO */ +#line 329 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("to"); } +#line 2130 "engines/director/lingo/lingo-gr.cpp" + break; + + case 54: /* ID: tASSERTERROR */ +#line 330 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("scummvmAssertError"); } +#line 2136 "engines/director/lingo/lingo-gr.cpp" + break; + + case 55: /* ID: tSPRITE */ +#line 331 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("sprite"); } +#line 2142 "engines/director/lingo/lingo-gr.cpp" + break; + + case 56: /* ID: tWHEN */ +#line 332 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("when"); } +#line 2148 "engines/director/lingo/lingo-gr.cpp" + break; + + case 57: /* ID: tWHILE */ +#line 333 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("while"); } +#line 2154 "engines/director/lingo/lingo-gr.cpp" + break; + + case 58: /* ID: tWINDOW */ +#line 334 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("window"); } +#line 2160 "engines/director/lingo/lingo-gr.cpp" + break; + + case 59: /* ID: tWITH */ +#line 335 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("with"); } +#line 2166 "engines/director/lingo/lingo-gr.cpp" + break; + + case 60: /* ID: tWITHIN */ +#line 336 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("within"); } +#line 2172 "engines/director/lingo/lingo-gr.cpp" + break; + + case 61: /* ID: tWORD */ +#line 337 "engines/director/lingo/lingo-gr.y" + { (yyval.s) = new Common::String("word"); } +#line 2178 "engines/director/lingo/lingo-gr.cpp" + break; + + case 62: /* idlist: %empty */ +#line 340 "engines/director/lingo/lingo-gr.y" + { (yyval.idlist) = new IDList; } +#line 2184 "engines/director/lingo/lingo-gr.cpp" + break; + + case 64: /* nonemptyidlist: ID */ +#line 344 "engines/director/lingo/lingo-gr.y" + { + Common::Array *list = new IDList; + list->push_back((yyvsp[0].s)); + (yyval.idlist) = list; } +#line 2193 "engines/director/lingo/lingo-gr.cpp" + break; + + case 65: /* nonemptyidlist: nonemptyidlist ',' ID */ +#line 348 "engines/director/lingo/lingo-gr.y" + { + (yyvsp[-2].idlist)->push_back((yyvsp[0].s)); + (yyval.idlist) = (yyvsp[-2].idlist); } +#line 2201 "engines/director/lingo/lingo-gr.cpp" + break; + + case 73: /* proc: ID '(' exprlist ')' '\n' */ +#line 369 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new CmdNode((yyvsp[-4].s), (yyvsp[-2].nodelist)); } +#line 2207 "engines/director/lingo/lingo-gr.cpp" + break; + + case 74: /* proc: ID exprlist '\n' */ +#line 370 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new CmdNode((yyvsp[-2].s), (yyvsp[-1].nodelist)); } +#line 2213 "engines/director/lingo/lingo-gr.cpp" + break; + + case 75: /* proc: tPUT '(' exprlist ')' '\n' */ +#line 371 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new CmdNode(new Common::String("put"), (yyvsp[-2].nodelist)); } +#line 2219 "engines/director/lingo/lingo-gr.cpp" + break; + + case 76: /* proc: tPUT exprlist '\n' */ +#line 372 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new CmdNode(new Common::String("put"), (yyvsp[-1].nodelist)); } +#line 2225 "engines/director/lingo/lingo-gr.cpp" + break; + + case 77: /* proc: tNEXT tREPEAT '\n' */ +#line 373 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new NextRepeatNode(); } +#line 2231 "engines/director/lingo/lingo-gr.cpp" + break; + + case 78: /* proc: tEXIT tREPEAT '\n' */ +#line 374 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new ExitRepeatNode(); } +#line 2237 "engines/director/lingo/lingo-gr.cpp" + break; + + case 79: /* asgn: tPUT expr tINTO varorchunk '\n' */ +#line 377 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new PutIntoNode((yyvsp[-3].node), (yyvsp[-1].node)); } +#line 2243 "engines/director/lingo/lingo-gr.cpp" + break; + + case 80: /* asgn: tPUT expr tAFTER varorchunk '\n' */ +#line 378 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new PutAfterNode((yyvsp[-3].node), (yyvsp[-1].node)); } +#line 2249 "engines/director/lingo/lingo-gr.cpp" + break; + + case 81: /* asgn: tPUT expr tBEFORE varorchunk '\n' */ +#line 379 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new PutBeforeNode((yyvsp[-3].node), (yyvsp[-1].node)); } +#line 2255 "engines/director/lingo/lingo-gr.cpp" + break; + + case 82: /* asgn: tSET varorthe to expr '\n' */ +#line 380 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new SetNode((yyvsp[-3].node), (yyvsp[-1].node)); } +#line 2261 "engines/director/lingo/lingo-gr.cpp" + break; + + case 85: /* definevars: tGLOBAL idlist '\n' */ +#line 385 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new GlobalNode((yyvsp[-1].idlist)); } +#line 2267 "engines/director/lingo/lingo-gr.cpp" + break; + + case 86: /* definevars: tPROPERTY idlist '\n' */ +#line 386 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new PropertyNode((yyvsp[-1].idlist)); } +#line 2273 "engines/director/lingo/lingo-gr.cpp" + break; + + case 87: /* definevars: tINSTANCE idlist '\n' */ +#line 387 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new InstanceNode((yyvsp[-1].idlist)); } +#line 2279 "engines/director/lingo/lingo-gr.cpp" + break; + + case 88: /* ifstmt: tIF expr tTHEN stmt */ +#line 390 "engines/director/lingo/lingo-gr.y" + { + NodeList *stmtlist = new NodeList; + stmtlist->push_back((yyvsp[0].node)); + (yyval.node) = new IfStmtNode((yyvsp[-2].node), stmtlist); } +#line 2288 "engines/director/lingo/lingo-gr.cpp" + break; + + case 89: /* ifstmt: tIF expr tTHEN '\n' stmtlist tENDIF '\n' */ +#line 394 "engines/director/lingo/lingo-gr.y" + { + (yyval.node) = new IfStmtNode((yyvsp[-5].node), (yyvsp[-2].nodelist)); } +#line 2295 "engines/director/lingo/lingo-gr.cpp" + break; + + case 90: /* ifelsestmt: tIF expr tTHEN stmt tELSE stmt */ +#line 398 "engines/director/lingo/lingo-gr.y" + { + NodeList *stmtlist1 = new NodeList; + stmtlist1->push_back((yyvsp[-2].node)); + NodeList *stmtlist2 = new NodeList; + stmtlist2->push_back((yyvsp[0].node)); + (yyval.node) = new IfElseStmtNode((yyvsp[-4].node), stmtlist1, stmtlist2); } +#line 2306 "engines/director/lingo/lingo-gr.cpp" + break; + + case 91: /* ifelsestmt: tIF expr tTHEN stmt tELSE '\n' stmtlist tENDIF '\n' */ +#line 404 "engines/director/lingo/lingo-gr.y" + { + NodeList *stmtlist1 = new NodeList; + stmtlist1->push_back((yyvsp[-5].node)); + (yyval.node) = new IfElseStmtNode((yyvsp[-7].node), stmtlist1, (yyvsp[-2].nodelist)); } +#line 2315 "engines/director/lingo/lingo-gr.cpp" + break; + + case 92: /* ifelsestmt: tIF expr tTHEN '\n' stmtlist tELSE stmt */ +#line 408 "engines/director/lingo/lingo-gr.y" + { + NodeList *stmtlist2 = new NodeList; + stmtlist2->push_back((yyvsp[0].node)); + (yyval.node) = new IfElseStmtNode((yyvsp[-5].node), (yyvsp[-2].nodelist), stmtlist2); } +#line 2324 "engines/director/lingo/lingo-gr.cpp" + break; + + case 93: /* ifelsestmt: tIF expr tTHEN '\n' stmtlist tELSE '\n' stmtlist tENDIF '\n' */ +#line 412 "engines/director/lingo/lingo-gr.y" + { + (yyval.node) = new IfElseStmtNode((yyvsp[-8].node), (yyvsp[-5].nodelist), (yyvsp[-2].nodelist)); } +#line 2331 "engines/director/lingo/lingo-gr.cpp" + break; + + case 94: /* loop: tREPEAT tWHILE expr '\n' stmtlist tENDREPEAT '\n' */ +#line 416 "engines/director/lingo/lingo-gr.y" + { + (yyval.node) = new RepeatWhileNode((yyvsp[-4].node), (yyvsp[-2].nodelist)); } +#line 2338 "engines/director/lingo/lingo-gr.cpp" + break; + + case 95: /* loop: tREPEAT tWITH ID tEQ expr tTO expr '\n' stmtlist tENDREPEAT '\n' */ +#line 418 "engines/director/lingo/lingo-gr.y" + { + (yyval.node) = new RepeatWithToNode((yyvsp[-8].s), (yyvsp[-6].node), false, (yyvsp[-4].node), (yyvsp[-2].nodelist)); } +#line 2345 "engines/director/lingo/lingo-gr.cpp" + break; + + case 96: /* loop: tREPEAT tWITH ID tEQ expr tDOWN tTO expr '\n' stmtlist tENDREPEAT '\n' */ +#line 420 "engines/director/lingo/lingo-gr.y" + { + (yyval.node) = new RepeatWithToNode((yyvsp[-9].s), (yyvsp[-7].node), true, (yyvsp[-4].node), (yyvsp[-2].nodelist)); } +#line 2352 "engines/director/lingo/lingo-gr.cpp" + break; + + case 97: /* stmtlist: %empty */ +#line 424 "engines/director/lingo/lingo-gr.y" + { (yyval.nodelist) = new NodeList; } +#line 2358 "engines/director/lingo/lingo-gr.cpp" + break; + + case 99: /* nonemptystmtlist: stmtlistline */ +#line 429 "engines/director/lingo/lingo-gr.y" + { + NodeList *list = new NodeList; + if ((yyvsp[0].node)) { + list->push_back((yyvsp[0].node)); + } + (yyval.nodelist) = list; } +#line 2369 "engines/director/lingo/lingo-gr.cpp" break; case 100: /* nonemptystmtlist: stmtlist stmtlistline */ -#line 434 "engines/director/lingo/lingo-gr.y" +#line 435 "engines/director/lingo/lingo-gr.y" { if ((yyvsp[0].node)) { (yyvsp[-1].nodelist)->push_back((yyvsp[0].node)); } (yyval.nodelist) = (yyvsp[-1].nodelist); } -#line 2328 "engines/director/lingo/lingo-gr.cpp" +#line 2379 "engines/director/lingo/lingo-gr.cpp" break; case 101: /* stmtlistline: '\n' */ -#line 441 "engines/director/lingo/lingo-gr.y" +#line 442 "engines/director/lingo/lingo-gr.y" { (yyval.node) = nullptr; } -#line 2334 "engines/director/lingo/lingo-gr.cpp" +#line 2385 "engines/director/lingo/lingo-gr.cpp" break; case 103: /* simpleexprnoparens: tINT */ -#line 447 "engines/director/lingo/lingo-gr.y" +#line 448 "engines/director/lingo/lingo-gr.y" { (yyval.node) = new IntNode((yyvsp[0].i)); } -#line 2340 "engines/director/lingo/lingo-gr.cpp" +#line 2391 "engines/director/lingo/lingo-gr.cpp" break; case 104: /* simpleexprnoparens: tFLOAT */ -#line 448 "engines/director/lingo/lingo-gr.y" +#line 449 "engines/director/lingo/lingo-gr.y" { (yyval.node) = new FloatNode((yyvsp[0].f)); } -#line 2346 "engines/director/lingo/lingo-gr.cpp" +#line 2397 "engines/director/lingo/lingo-gr.cpp" break; case 105: /* simpleexprnoparens: tSYMBOL */ -#line 449 "engines/director/lingo/lingo-gr.y" +#line 450 "engines/director/lingo/lingo-gr.y" { (yyval.node) = new SymbolNode((yyvsp[0].s)); } -#line 2352 "engines/director/lingo/lingo-gr.cpp" +#line 2403 "engines/director/lingo/lingo-gr.cpp" break; case 106: /* simpleexprnoparens: tSTRING */ -#line 450 "engines/director/lingo/lingo-gr.y" +#line 451 "engines/director/lingo/lingo-gr.y" { (yyval.node) = new StringNode((yyvsp[0].s)); } -#line 2358 "engines/director/lingo/lingo-gr.cpp" +#line 2409 "engines/director/lingo/lingo-gr.cpp" break; case 107: /* simpleexprnoparens: '+' simpleexpr */ -#line 451 "engines/director/lingo/lingo-gr.y" +#line 452 "engines/director/lingo/lingo-gr.y" { (yyval.node) = (yyvsp[0].node); } -#line 2364 "engines/director/lingo/lingo-gr.cpp" +#line 2415 "engines/director/lingo/lingo-gr.cpp" break; case 108: /* simpleexprnoparens: '-' simpleexpr */ -#line 452 "engines/director/lingo/lingo-gr.y" +#line 453 "engines/director/lingo/lingo-gr.y" { (yyval.node) = new UnaryOpNode(LC::c_negate, (yyvsp[0].node)); } -#line 2370 "engines/director/lingo/lingo-gr.cpp" +#line 2421 "engines/director/lingo/lingo-gr.cpp" break; case 109: /* simpleexprnoparens: tNOT simpleexpr */ -#line 453 "engines/director/lingo/lingo-gr.y" +#line 454 "engines/director/lingo/lingo-gr.y" { (yyval.node) = new UnaryOpNode(LC::c_not, (yyvsp[0].node)); } -#line 2376 "engines/director/lingo/lingo-gr.cpp" +#line 2427 "engines/director/lingo/lingo-gr.cpp" break; case 110: /* simpleexprnoparens: ID '(' exprlist ')' */ -#line 454 "engines/director/lingo/lingo-gr.y" +#line 455 "engines/director/lingo/lingo-gr.y" { (yyval.node) = new FuncNode((yyvsp[-3].s), (yyvsp[-1].nodelist)); } -#line 2382 "engines/director/lingo/lingo-gr.cpp" +#line 2433 "engines/director/lingo/lingo-gr.cpp" break; - case 112: /* var: ID */ -#line 458 "engines/director/lingo/lingo-gr.y" + case 113: /* var: ID */ +#line 460 "engines/director/lingo/lingo-gr.y" { (yyval.node) = new VarNode((yyvsp[0].s)); } -#line 2388 "engines/director/lingo/lingo-gr.cpp" +#line 2439 "engines/director/lingo/lingo-gr.cpp" break; - case 116: /* simpleexpr: '(' expr ')' */ -#line 469 "engines/director/lingo/lingo-gr.y" + case 117: /* simpleexpr: '(' expr ')' */ +#line 471 "engines/director/lingo/lingo-gr.y" { (yyval.node) = (yyvsp[-1].node); } -#line 2394 "engines/director/lingo/lingo-gr.cpp" +#line 2445 "engines/director/lingo/lingo-gr.cpp" break; - case 117: /* expr: simpleexpr */ -#line 472 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = (yyvsp[0].node); } -#line 2400 "engines/director/lingo/lingo-gr.cpp" - break; - - case 118: /* expr: expr '+' expr */ -#line 473 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new BinaryOpNode(LC::c_add, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 2406 "engines/director/lingo/lingo-gr.cpp" - break; - - case 119: /* expr: expr '-' expr */ + case 118: /* list: '[' exprlist ']' */ #line 474 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new BinaryOpNode(LC::c_sub, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 2412 "engines/director/lingo/lingo-gr.cpp" + { (yyval.node) = new ListNode((yyvsp[-1].nodelist)); } +#line 2451 "engines/director/lingo/lingo-gr.cpp" break; - case 120: /* expr: expr '*' expr */ + case 119: /* list: '[' ':' ']' */ #line 475 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new BinaryOpNode(LC::c_mul, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 2418 "engines/director/lingo/lingo-gr.cpp" + { (yyval.node) = new PropListNode(new NodeList); } +#line 2457 "engines/director/lingo/lingo-gr.cpp" break; - case 121: /* expr: expr '/' expr */ + case 120: /* list: '[' proplist ']' */ #line 476 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new BinaryOpNode(LC::c_div, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 2424 "engines/director/lingo/lingo-gr.cpp" + { (yyval.node) = new PropListNode((yyvsp[-1].nodelist)); } +#line 2463 "engines/director/lingo/lingo-gr.cpp" break; - case 122: /* expr: expr tMOD expr */ -#line 477 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new BinaryOpNode(LC::c_mod, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 2430 "engines/director/lingo/lingo-gr.cpp" - break; - - case 123: /* expr: expr '>' expr */ -#line 478 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new BinaryOpNode(LC::c_gt, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 2436 "engines/director/lingo/lingo-gr.cpp" - break; - - case 124: /* expr: expr '<' expr */ + case 121: /* proplist: proppair */ #line 479 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new BinaryOpNode(LC::c_lt, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 2442 "engines/director/lingo/lingo-gr.cpp" - break; - - case 125: /* expr: expr tEQ expr */ -#line 480 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new BinaryOpNode(LC::c_eq, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 2448 "engines/director/lingo/lingo-gr.cpp" - break; - - case 126: /* expr: expr tNEQ expr */ -#line 481 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new BinaryOpNode(LC::c_neq, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 2454 "engines/director/lingo/lingo-gr.cpp" - break; - - case 127: /* expr: expr tGE expr */ -#line 482 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new BinaryOpNode(LC::c_ge, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 2460 "engines/director/lingo/lingo-gr.cpp" - break; - - case 128: /* expr: expr tLE expr */ -#line 483 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new BinaryOpNode(LC::c_le, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 2466 "engines/director/lingo/lingo-gr.cpp" - break; - - case 129: /* expr: expr tAND expr */ -#line 484 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new BinaryOpNode(LC::c_and, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 2472 "engines/director/lingo/lingo-gr.cpp" - break; - - case 130: /* expr: expr tOR expr */ -#line 485 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new BinaryOpNode(LC::c_or, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 2478 "engines/director/lingo/lingo-gr.cpp" - break; - - case 131: /* expr: expr '&' expr */ -#line 486 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new BinaryOpNode(LC::c_ampersand, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 2484 "engines/director/lingo/lingo-gr.cpp" - break; - - case 132: /* expr: expr tCONCAT expr */ -#line 487 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new BinaryOpNode(LC::c_concat, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 2490 "engines/director/lingo/lingo-gr.cpp" - break; - - case 133: /* expr: expr tCONTAINS expr */ -#line 488 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new BinaryOpNode(LC::c_contains, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 2496 "engines/director/lingo/lingo-gr.cpp" - break; - - case 134: /* expr: expr tSTARTS expr */ -#line 489 "engines/director/lingo/lingo-gr.y" - { (yyval.node) = new BinaryOpNode(LC::c_starts, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 2502 "engines/director/lingo/lingo-gr.cpp" - break; - - case 135: /* exprlist: %empty */ -#line 492 "engines/director/lingo/lingo-gr.y" - { (yyval.nodelist) = new NodeList; } -#line 2508 "engines/director/lingo/lingo-gr.cpp" - break; - - case 137: /* nonemptyexprlist: expr */ -#line 496 "engines/director/lingo/lingo-gr.y" { NodeList *list = new NodeList; list->push_back((yyvsp[0].node)); (yyval.nodelist) = list; } -#line 2517 "engines/director/lingo/lingo-gr.cpp" +#line 2472 "engines/director/lingo/lingo-gr.cpp" break; - case 138: /* nonemptyexprlist: nonemptyexprlist ',' expr */ -#line 500 "engines/director/lingo/lingo-gr.y" + case 122: /* proplist: proplist ',' proppair */ +#line 483 "engines/director/lingo/lingo-gr.y" { (yyvsp[-2].nodelist)->push_back((yyvsp[0].node)); (yyval.nodelist) = (yyvsp[-2].nodelist); } -#line 2525 "engines/director/lingo/lingo-gr.cpp" +#line 2480 "engines/director/lingo/lingo-gr.cpp" + break; + + case 123: /* proppair: tSYMBOL ':' expr */ +#line 488 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new PropPairNode(new SymbolNode((yyvsp[-2].s)), (yyvsp[0].node)); } +#line 2486 "engines/director/lingo/lingo-gr.cpp" + break; + + case 124: /* proppair: ID ':' expr */ +#line 489 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new PropPairNode(new SymbolNode((yyvsp[-2].s)), (yyvsp[0].node)); } +#line 2492 "engines/director/lingo/lingo-gr.cpp" + break; + + case 125: /* proppair: tSTRING ':' expr */ +#line 490 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new PropPairNode(new StringNode((yyvsp[-2].s)), (yyvsp[0].node)); } +#line 2498 "engines/director/lingo/lingo-gr.cpp" + break; + + case 126: /* expr: simpleexpr */ +#line 493 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = (yyvsp[0].node); } +#line 2504 "engines/director/lingo/lingo-gr.cpp" + break; + + case 127: /* expr: expr '+' expr */ +#line 494 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new BinaryOpNode(LC::c_add, (yyvsp[-2].node), (yyvsp[0].node)); } +#line 2510 "engines/director/lingo/lingo-gr.cpp" + break; + + case 128: /* expr: expr '-' expr */ +#line 495 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new BinaryOpNode(LC::c_sub, (yyvsp[-2].node), (yyvsp[0].node)); } +#line 2516 "engines/director/lingo/lingo-gr.cpp" + break; + + case 129: /* expr: expr '*' expr */ +#line 496 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new BinaryOpNode(LC::c_mul, (yyvsp[-2].node), (yyvsp[0].node)); } +#line 2522 "engines/director/lingo/lingo-gr.cpp" + break; + + case 130: /* expr: expr '/' expr */ +#line 497 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new BinaryOpNode(LC::c_div, (yyvsp[-2].node), (yyvsp[0].node)); } +#line 2528 "engines/director/lingo/lingo-gr.cpp" + break; + + case 131: /* expr: expr tMOD expr */ +#line 498 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new BinaryOpNode(LC::c_mod, (yyvsp[-2].node), (yyvsp[0].node)); } +#line 2534 "engines/director/lingo/lingo-gr.cpp" + break; + + case 132: /* expr: expr '>' expr */ +#line 499 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new BinaryOpNode(LC::c_gt, (yyvsp[-2].node), (yyvsp[0].node)); } +#line 2540 "engines/director/lingo/lingo-gr.cpp" + break; + + case 133: /* expr: expr '<' expr */ +#line 500 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new BinaryOpNode(LC::c_lt, (yyvsp[-2].node), (yyvsp[0].node)); } +#line 2546 "engines/director/lingo/lingo-gr.cpp" + break; + + case 134: /* expr: expr tEQ expr */ +#line 501 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new BinaryOpNode(LC::c_eq, (yyvsp[-2].node), (yyvsp[0].node)); } +#line 2552 "engines/director/lingo/lingo-gr.cpp" + break; + + case 135: /* expr: expr tNEQ expr */ +#line 502 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new BinaryOpNode(LC::c_neq, (yyvsp[-2].node), (yyvsp[0].node)); } +#line 2558 "engines/director/lingo/lingo-gr.cpp" + break; + + case 136: /* expr: expr tGE expr */ +#line 503 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new BinaryOpNode(LC::c_ge, (yyvsp[-2].node), (yyvsp[0].node)); } +#line 2564 "engines/director/lingo/lingo-gr.cpp" + break; + + case 137: /* expr: expr tLE expr */ +#line 504 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new BinaryOpNode(LC::c_le, (yyvsp[-2].node), (yyvsp[0].node)); } +#line 2570 "engines/director/lingo/lingo-gr.cpp" + break; + + case 138: /* expr: expr tAND expr */ +#line 505 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new BinaryOpNode(LC::c_and, (yyvsp[-2].node), (yyvsp[0].node)); } +#line 2576 "engines/director/lingo/lingo-gr.cpp" + break; + + case 139: /* expr: expr tOR expr */ +#line 506 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new BinaryOpNode(LC::c_or, (yyvsp[-2].node), (yyvsp[0].node)); } +#line 2582 "engines/director/lingo/lingo-gr.cpp" + break; + + case 140: /* expr: expr '&' expr */ +#line 507 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new BinaryOpNode(LC::c_ampersand, (yyvsp[-2].node), (yyvsp[0].node)); } +#line 2588 "engines/director/lingo/lingo-gr.cpp" + break; + + case 141: /* expr: expr tCONCAT expr */ +#line 508 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new BinaryOpNode(LC::c_concat, (yyvsp[-2].node), (yyvsp[0].node)); } +#line 2594 "engines/director/lingo/lingo-gr.cpp" + break; + + case 142: /* expr: expr tCONTAINS expr */ +#line 509 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new BinaryOpNode(LC::c_contains, (yyvsp[-2].node), (yyvsp[0].node)); } +#line 2600 "engines/director/lingo/lingo-gr.cpp" + break; + + case 143: /* expr: expr tSTARTS expr */ +#line 510 "engines/director/lingo/lingo-gr.y" + { (yyval.node) = new BinaryOpNode(LC::c_starts, (yyvsp[-2].node), (yyvsp[0].node)); } +#line 2606 "engines/director/lingo/lingo-gr.cpp" + break; + + case 144: /* exprlist: %empty */ +#line 513 "engines/director/lingo/lingo-gr.y" + { (yyval.nodelist) = new NodeList; } +#line 2612 "engines/director/lingo/lingo-gr.cpp" + break; + + case 146: /* nonemptyexprlist: expr */ +#line 517 "engines/director/lingo/lingo-gr.y" + { + NodeList *list = new NodeList; + list->push_back((yyvsp[0].node)); + (yyval.nodelist) = list; } +#line 2621 "engines/director/lingo/lingo-gr.cpp" + break; + + case 147: /* nonemptyexprlist: nonemptyexprlist ',' expr */ +#line 521 "engines/director/lingo/lingo-gr.y" + { + (yyvsp[-2].nodelist)->push_back((yyvsp[0].node)); + (yyval.nodelist) = (yyvsp[-2].nodelist); } +#line 2629 "engines/director/lingo/lingo-gr.cpp" break; -#line 2529 "engines/director/lingo/lingo-gr.cpp" +#line 2633 "engines/director/lingo/lingo-gr.cpp" default: break; } @@ -2724,7 +2828,7 @@ yyreturn: return yyresult; } -#line 505 "engines/director/lingo/lingo-gr.y" +#line 526 "engines/director/lingo/lingo-gr.y" int yyreport_syntax_error(const yypcontext_t *ctx) { diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y index e8966441d92..52ce924d557 100644 --- a/engines/director/lingo/lingo-gr.y +++ b/engines/director/lingo/lingo-gr.y @@ -173,7 +173,8 @@ static void checkEnd(Common::String *token, Common::String *expect, bool require // EXPRESSION %type simpleexprnoparens simpleexpr expr %type var varorchunk varorthe -%type exprlist nonemptyexprlist +%type list proppair +%type proplist exprlist nonemptyexprlist %left tAND tOR %left '<' tLE '>' tGE tEQ tNEQ tCONTAINS tSTARTS @@ -453,6 +454,7 @@ simpleexprnoparens: tINT { $$ = new IntNode($tINT); } | tNOT simpleexpr[arg] %prec tUNARY { $$ = new UnaryOpNode(LC::c_not, $arg); } | ID '(' exprlist[args] ')' { $$ = new FuncNode($ID, $args); } | var + | list ; var: ID { $$ = new VarNode($ID); } ; @@ -469,6 +471,25 @@ simpleexpr: simpleexprnoparens | '(' expr ')' { $$ = $expr; } ; +list: '[' exprlist ']' { $$ = new ListNode($exprlist); } + | '[' ':' ']' { $$ = new PropListNode(new NodeList); } + | '[' proplist ']' { $$ = new PropListNode($proplist); } + ; + +proplist: proppair[item] { + NodeList *list = new NodeList; + list->push_back($item); + $$ = list; } + | proplist[prev] ',' proppair[item] { + $prev->push_back($item); + $$ = $prev; } + ; + +proppair: tSYMBOL ':' expr { $$ = new PropPairNode(new SymbolNode($tSYMBOL), $expr); } + | ID ':' expr { $$ = new PropPairNode(new SymbolNode($ID), $expr); } + | tSTRING ':' expr { $$ = new PropPairNode(new StringNode($tSTRING), $expr); } + ; + expr: simpleexpr { $$ = $simpleexpr; } | expr[a] '+' expr[b] { $$ = new BinaryOpNode(LC::c_add, $a, $b); } | expr[a] '-' expr[b] { $$ = new BinaryOpNode(LC::c_sub, $a, $b); }