[Scummvm-cvs-logs] scummvm master -> dcbc7e3b4de8525c4638c151eb3a7a662e3b15e1

sev- sev at scummvm.org
Sat Aug 20 12:21:28 CEST 2016


This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
1660b859a1 DIRECTOR: Lingo: Implemented 'exit repeat' keyword
80b8fcf693 DIRECTOR: Lingo: Added stub for 'instance' keyword
223b7f1613 DIRECTOR: Lingo: Stub for 'menu' command. This completes all D2 commands
2bcae4cadc DIRECTOR: Lingo: Added stubs for all D2 properties
8d30487b76 DIRECTOR: Lingo: Added stubs for all D2 sprite properties
dcbc7e3b4d DIRECTOR: Lingo: Added all D2 text properties. This completes D2 grammar. Yay!


Commit: 1660b859a186bc57155c144756b312fd614113c6
    https://github.com/scummvm/scummvm/commit/1660b859a186bc57155c144756b312fd614113c6
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-08-20T11:37:17+02:00

Commit Message:
DIRECTOR: Lingo: Implemented 'exit repeat' keyword

Changed paths:
    engines/director/lingo/lingo-code.cpp
    engines/director/lingo/lingo-gr.cpp
    engines/director/lingo/lingo-gr.y
    engines/director/lingo/lingo.cpp
    engines/director/lingo/lingo.h



diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp
index 8712f09..f9770f5 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -91,6 +91,7 @@ static struct FuncDescr {
 	{ Lingo::c_le,			"c_le",			"" },
 	{ Lingo::c_repeatwhilecode,"c_repeatwhilecode","oo" },
 	{ Lingo::c_repeatwithcode,"c_repeatwithcode","ooooos" },
+	{ Lingo::c_exitRepeat,	"c_exitRepeat",	"" },
 	{ Lingo::c_ifcode,		"c_ifcode",		"oooi" },
 	{ Lingo::c_whencode,	"c_whencode",	"os" },
 	{ Lingo::c_goto,		"c_goto",		"" },
@@ -644,6 +645,11 @@ void Lingo::c_repeatwhilecode(void) {
 		if (g_lingo->_returning)
 			break;
 
+		if (g_lingo->_exitRepeat) {
+			g_lingo->_exitRepeat = false;
+			break;
+		}
+
 		g_lingo->execute(savepc + 2);	/* condition */
 		d = g_lingo->pop();
 		d.toInt();
@@ -680,6 +686,11 @@ void Lingo::c_repeatwithcode(void) {
 		if (g_lingo->_returning)
 			break;
 
+		if (g_lingo->_exitRepeat) {
+			g_lingo->_exitRepeat = false;
+			break;
+		}
+
 		counter->u.i += inc;
 		g_lingo->execute(finish);	/* condition */
 		d = g_lingo->pop();
@@ -693,6 +704,10 @@ void Lingo::c_repeatwithcode(void) {
 		g_lingo->_pc = end; /* next stmt */
 }
 
+void Lingo::c_exitRepeat(void) {
+	g_lingo->_exitRepeat = true;
+}
+
 void Lingo::c_ifcode() {
 	Datum d;
 	int savepc = g_lingo->_pc;	/* then part */
diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp
index be5b3eb..4b6abc2 100644
--- a/engines/director/lingo/lingo-gr.cpp
+++ b/engines/director/lingo/lingo-gr.cpp
@@ -486,18 +486,18 @@ union yyalloc
 #endif
 
 /* YYFINAL -- State number of the termination state.  */
-#define YYFINAL  88
+#define YYFINAL  89
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   931
+#define YYLAST   910
 
 /* YYNTOKENS -- Number of terminals.  */
 #define YYNTOKENS  83
 /* YYNNTS -- Number of nonterminals.  */
 #define YYNNTS  36
 /* YYNRULES -- Number of rules.  */
-#define YYNRULES  125
+#define YYNRULES  126
 /* YYNRULES -- Number of states.  */
-#define YYNSTATES  261
+#define YYNSTATES  262
 
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 #define YYUNDEFTOK  2
@@ -557,11 +557,11 @@ static const yytype_uint16 yyprhs[] =
      222,   223,   224,   227,   230,   234,   236,   238,   240,   242,
      247,   249,   251,   254,   256,   260,   264,   268,   272,   276,
      280,   284,   288,   292,   296,   300,   303,   307,   311,   315,
-     319,   322,   325,   329,   334,   339,   342,   344,   346,   348,
-     351,   354,   357,   359,   362,   367,   370,   372,   376,   379,
-     382,   385,   388,   392,   395,   398,   400,   404,   407,   410,
-     413,   417,   420,   421,   430,   433,   434,   443,   444,   446,
-     450,   455,   456,   460,   461,   463
+     319,   322,   325,   329,   334,   339,   342,   344,   346,   349,
+     351,   354,   357,   360,   362,   365,   370,   373,   375,   379,
+     382,   385,   388,   391,   395,   398,   401,   403,   407,   410,
+     413,   416,   420,   423,   424,   433,   436,   437,   446,   447,
+     449,   453,   458,   459,   463,   464,   466
 };
 
 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
@@ -601,19 +601,19 @@ static const yytype_int8 yyrhs[] =
       -1,   105,    65,   105,    -1,   105,    66,   105,    -1,    71,
      105,    -1,    72,   105,    -1,    77,   105,    78,    -1,    67,
      105,    68,   105,    -1,    67,   105,    69,   105,    -1,    40,
-     105,    -1,   108,    -1,   111,    -1,    28,    -1,    30,   107,
-      -1,    19,   105,    -1,    18,   105,    -1,    18,    -1,    20,
-     118,    -1,    51,   105,    46,   105,    -1,    51,   105,    -1,
-      21,    -1,   107,    82,    21,    -1,    31,    34,    -1,    31,
-      37,    -1,    31,    39,    -1,    31,   109,    -1,    31,   109,
-     110,    -1,    31,   110,    -1,    29,   105,    -1,   105,    -1,
-      38,    36,   105,    -1,    36,   105,    -1,    52,    53,    -1,
-      52,   109,    -1,    52,   109,   110,    -1,    52,   110,    -1,
-      -1,    35,    21,   113,   101,   115,    85,   116,   103,    -1,
-      49,    21,    -1,    -1,    50,    21,   114,   101,   115,    85,
-     116,   103,    -1,    -1,    21,    -1,   115,    82,    21,    -1,
-     115,    85,    82,    21,    -1,    -1,    21,   101,   118,    -1,
-      -1,   105,    -1,   118,    82,   105,    -1
+     105,    -1,   108,    -1,   111,    -1,    28,    41,    -1,    28,
+      -1,    30,   107,    -1,    19,   105,    -1,    18,   105,    -1,
+      18,    -1,    20,   118,    -1,    51,   105,    46,   105,    -1,
+      51,   105,    -1,    21,    -1,   107,    82,    21,    -1,    31,
+      34,    -1,    31,    37,    -1,    31,    39,    -1,    31,   109,
+      -1,    31,   109,   110,    -1,    31,   110,    -1,    29,   105,
+      -1,   105,    -1,    38,    36,   105,    -1,    36,   105,    -1,
+      52,    53,    -1,    52,   109,    -1,    52,   109,   110,    -1,
+      52,   110,    -1,    -1,    35,    21,   113,   101,   115,    85,
+     116,   103,    -1,    49,    21,    -1,    -1,    50,    21,   114,
+     101,   115,    85,   116,   103,    -1,    -1,    21,    -1,   115,
+      82,    21,    -1,   115,    85,    82,    21,    -1,    -1,    21,
+     101,   118,    -1,    -1,   105,    -1,   118,    82,   105,    -1
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
@@ -627,11 +627,11 @@ static const yytype_uint16 yyrline[] =
      340,   342,   343,   344,   347,   353,   354,   357,   360,   364,
      367,   371,   378,   384,   385,   386,   387,   388,   389,   390,
      391,   392,   393,   394,   395,   396,   397,   398,   399,   400,
-     401,   402,   403,   404,   405,   408,   409,   410,   411,   413,
-     414,   417,   420,   423,   424,   425,   428,   429,   440,   441,
-     442,   443,   446,   449,   454,   455,   458,   459,   462,   463,
-     466,   469,   499,   499,   505,   508,   508,   513,   514,   515,
-     516,   518,   522,   530,   531,   532
+     401,   402,   403,   404,   405,   408,   409,   410,   411,   412,
+     414,   415,   418,   421,   424,   425,   426,   429,   430,   441,
+     442,   443,   444,   447,   450,   455,   456,   459,   460,   463,
+     464,   467,   470,   500,   500,   506,   509,   509,   514,   515,
+     516,   517,   519,   523,   531,   532,   533
 };
 #endif
 
@@ -690,10 +690,10 @@ static const yytype_uint8 yyr1[] =
      105,   105,   105,   105,   105,   105,   105,   105,   105,   105,
      105,   105,   105,   105,   105,   105,   105,   105,   105,   105,
      105,   105,   105,   105,   105,   106,   106,   106,   106,   106,
-     106,   106,   106,   106,   106,   106,   107,   107,   108,   108,
-     108,   108,   108,   108,   109,   109,   110,   110,   111,   111,
-     111,   111,   113,   112,   112,   114,   112,   115,   115,   115,
-     115,   116,   117,   118,   118,   118
+     106,   106,   106,   106,   106,   106,   106,   107,   107,   108,
+     108,   108,   108,   108,   108,   109,   109,   110,   110,   111,
+     111,   111,   111,   113,   112,   112,   114,   112,   115,   115,
+     115,   115,   116,   117,   118,   118,   118
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
@@ -707,11 +707,11 @@ static const yytype_uint8 yyr2[] =
        0,     0,     2,     2,     3,     1,     1,     1,     1,     4,
        1,     1,     2,     1,     3,     3,     3,     3,     3,     3,
        3,     3,     3,     3,     3,     2,     3,     3,     3,     3,
-       2,     2,     3,     4,     4,     2,     1,     1,     1,     2,
-       2,     2,     1,     2,     4,     2,     1,     3,     2,     2,
-       2,     2,     3,     2,     2,     1,     3,     2,     2,     2,
-       3,     2,     0,     8,     2,     0,     8,     0,     1,     3,
-       4,     0,     3,     0,     1,     3
+       2,     2,     3,     4,     4,     2,     1,     1,     2,     1,
+       2,     2,     2,     1,     2,     4,     2,     1,     3,     2,
+       2,     2,     2,     3,     2,     2,     1,     3,     2,     2,
+       2,     3,     2,     0,     8,     2,     0,     8,     0,     1,
+       3,     4,     0,     3,     0,     1,     3
 };
 
 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -719,85 +719,85 @@ static const yytype_uint8 yyr2[] =
    means the default is an error.  */
 static const yytype_uint8 yydefact[] =
 {
-       0,     0,    55,    61,     0,    56,    58,    92,     0,   123,
-      49,    57,    88,     0,     0,    47,     0,     0,     0,     0,
+       0,     0,    55,    61,     0,    56,    58,    93,     0,   124,
+      49,    57,    89,     0,     0,    47,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
        0,     3,    63,    21,    11,    22,     0,     0,     0,     0,
       19,     8,    86,    87,     7,     9,     5,     4,    60,     0,
-      63,    62,    91,    90,   124,    93,   123,   123,    96,    89,
-       0,    98,     0,    99,     0,   100,   105,   101,   103,   112,
-      85,     0,    45,     0,     0,     0,     0,   114,   115,    95,
-     108,   109,   111,    75,     0,    80,    81,     0,     1,     6,
-       0,     0,     0,     0,    42,    50,     0,     0,     0,     0,
+      63,    62,    92,    91,   125,    94,   124,   124,    88,    97,
+      90,     0,    99,     0,   100,     0,   101,   106,   102,   104,
+     113,    85,     0,    45,     0,     0,     0,     0,   115,   116,
+      96,   109,   110,   112,    75,     0,    80,    81,     0,     1,
+       6,     0,     0,     0,     0,    42,    50,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   122,     0,   104,   107,     0,   102,
-      49,     0,    46,     0,     0,     0,     0,     0,    54,    49,
-       0,   110,     0,     0,    82,     2,     0,    50,     0,     0,
-      49,     0,    26,    71,    72,    70,    73,    74,    77,    78,
-      79,    64,    65,    66,    67,    68,    69,    76,   125,    59,
-      97,   106,   117,    12,    17,    14,     0,     0,    16,    13,
-     117,    94,    83,    84,    51,     0,    44,    51,     0,    43,
-     118,     0,    18,    15,     0,    50,     0,     0,    50,    50,
-      20,     0,   121,   121,    52,    53,     0,     0,    50,    49,
-      30,   119,     0,    51,    51,     0,    50,    51,     0,    51,
-       0,    48,    49,    50,    38,     0,   120,   113,   116,    23,
-      51,    50,    27,    50,    50,    40,    36,     0,     0,    37,
-      33,     0,    50,     0,     0,    35,     0,     0,    50,    49,
-      50,    49,     0,     0,     0,     0,    49,    31,     0,    32,
-       0,     0,    24,    28,    29,    50,    34,    50,    25,    41,
-      39
+       0,     0,     0,     0,     0,   123,     0,   105,   108,     0,
+     103,    49,     0,    46,     0,     0,     0,     0,     0,    54,
+      49,     0,   111,     0,     0,    82,     2,     0,    50,     0,
+       0,    49,     0,    26,    71,    72,    70,    73,    74,    77,
+      78,    79,    64,    65,    66,    67,    68,    69,    76,   126,
+      59,    98,   107,   118,    12,    17,    14,     0,     0,    16,
+      13,   118,    95,    83,    84,    51,     0,    44,    51,     0,
+      43,   119,     0,    18,    15,     0,    50,     0,     0,    50,
+      50,    20,     0,   122,   122,    52,    53,     0,     0,    50,
+      49,    30,   120,     0,    51,    51,     0,    50,    51,     0,
+      51,     0,    48,    49,    50,    38,     0,   121,   114,   117,
+      23,    51,    50,    27,    50,    50,    40,    36,     0,     0,
+      37,    33,     0,    50,     0,     0,    35,     0,     0,    50,
+      49,    50,    49,     0,     0,     0,     0,    49,    31,     0,
+      32,     0,     0,    24,    28,    29,    50,    34,    50,    25,
+      41,    39
 };
 
 /* YYDEFGOTO[NTERM-NUM].  */
 static const yytype_int16 yydefgoto[] =
 {
-      -1,    30,   194,    31,    50,    33,   195,    35,   240,   224,
-     225,   214,   226,    93,    36,    37,    38,   215,   250,   142,
-     185,    39,    40,   190,    59,    42,    67,    68,    43,    44,
-     120,   129,   181,   203,    45,    55
+      -1,    30,   195,    31,    50,    33,   196,    35,   241,   225,
+     226,   215,   227,    94,    36,    37,    38,   216,   251,   143,
+     186,    39,    40,   191,    60,    42,    68,    69,    43,    44,
+     121,   130,   182,   204,    45,    55
 };
 
 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    STATE-NUM.  */
-#define YYPACT_NINF -195
+#define YYPACT_NINF -197
 static const yytype_int16 yypact[] =
 {
-     254,   -59,  -195,  -195,   364,  -195,  -195,   364,   364,   364,
-     801,  -195,  -195,    14,   552,  -195,    23,   364,    10,     6,
-      30,    32,    39,   364,   592,   364,   364,   364,   364,   364,
-       4,  -195,     5,  -195,  -195,  -195,   -51,     1,   491,   364,
-     779,  -195,  -195,  -195,  -195,  -195,  -195,  -195,    -5,   364,
-    -195,   779,   779,   779,   779,    -8,   364,   364,  -195,    -3,
-     364,  -195,   364,  -195,    37,  -195,   779,    12,  -195,  -195,
-     606,    61,  -195,   -31,   364,   -30,    40,  -195,  -195,   659,
-    -195,    12,  -195,   850,   681,   850,   850,   730,  -195,   320,
-     491,   364,   491,    41,   757,   779,   364,   364,   364,   364,
-     364,   364,   364,   364,   364,   364,   364,   364,   364,   364,
-     364,   606,   364,   -57,    -8,    64,   779,   779,   364,  -195,
-    -195,    65,  -195,   364,   364,   637,   364,   364,  -195,  -195,
-     364,  -195,   364,   364,  -195,  -195,    15,   779,    18,   703,
-     -59,   364,  -195,   779,   779,   779,   779,   779,   779,   779,
-     779,   828,   828,   850,   850,   779,   779,   779,   779,  -195,
-    -195,   779,    67,  -195,   779,   779,   364,   364,   779,   779,
-      67,   779,   779,   779,  -195,    -1,  -195,  -195,   508,   779,
-    -195,   -58,   779,   779,   -58,   381,    46,   364,   381,  -195,
-    -195,    76,    17,    17,  -195,  -195,    74,   364,   779,   -20,
-     -11,  -195,    81,  -195,  -195,    62,   779,  -195,    72,  -195,
-      79,  -195,  -195,    79,  -195,   491,  -195,   381,   381,  -195,
-    -195,   381,  -195,   381,    79,    79,  -195,   491,   508,  -195,
-      58,    66,   381,    80,    83,  -195,    86,    71,  -195,  -195,
-    -195,  -195,    88,    75,    85,    87,   -17,  -195,   508,  -195,
-     447,    77,  -195,  -195,  -195,   381,  -195,  -195,  -195,  -195,
-    -195
+     255,   -59,  -197,  -197,   365,  -197,  -197,   365,   365,   365,
+     802,  -197,    -7,    19,   553,  -197,    27,   365,    22,    84,
+      51,    58,    61,   365,   593,   365,   365,   365,   365,   365,
+       4,  -197,     5,  -197,  -197,  -197,   -51,   -27,   492,   365,
+     780,  -197,  -197,  -197,  -197,  -197,  -197,  -197,     9,   365,
+    -197,   780,   780,   780,   780,     6,   365,   365,  -197,  -197,
+      18,   365,  -197,   365,  -197,    53,  -197,   780,    37,  -197,
+    -197,   607,    70,  -197,   -35,   365,   -34,    59,  -197,  -197,
+     660,  -197,    37,  -197,   -42,   682,   -42,   -42,   731,  -197,
+     321,   492,   365,   492,    60,   758,   780,   365,   365,   365,
+     365,   365,   365,   365,   365,   365,   365,   365,   365,   365,
+     365,   365,   607,   365,   -57,     6,    83,   780,   780,   365,
+    -197,  -197,    85,  -197,   365,   365,   638,   365,   365,  -197,
+    -197,   365,  -197,   365,   365,  -197,  -197,    29,   780,    30,
+     704,   -59,   365,  -197,   780,   780,   780,   780,   780,   780,
+     780,   780,   829,   829,   -42,   -42,   780,   780,   780,   780,
+    -197,  -197,   780,    88,  -197,   780,   780,   365,   365,   780,
+     780,    88,   780,   780,   780,  -197,     7,  -197,  -197,   509,
+     780,  -197,   -32,   780,   780,   -32,   382,    66,   365,   382,
+    -197,  -197,    90,    32,    32,  -197,  -197,    89,   365,   780,
+       1,   -15,  -197,    94,  -197,  -197,    76,   780,  -197,    86,
+    -197,    93,  -197,  -197,    93,  -197,   492,  -197,   382,   382,
+    -197,  -197,   382,  -197,   382,    93,    93,  -197,   492,   509,
+    -197,    72,    79,   382,    96,    97,  -197,    98,    91,  -197,
+    -197,  -197,  -197,   100,    87,   101,   118,   -20,  -197,   509,
+    -197,   448,   112,  -197,  -197,  -197,   382,  -197,  -197,  -197,
+    -197,  -197
 };
 
 /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int16 yypgoto[] =
 {
-    -195,  -195,    11,    19,     2,  -170,     0,  -195,  -195,  -195,
-     -79,  -191,  -102,   -61,  -195,  -195,  -195,  -194,    -9,   -12,
-    -171,  -195,    38,     3,  -195,  -195,    99,   -13,  -195,  -195,
-    -195,  -195,   -46,   -67,  -195,    13
+    -197,  -197,    11,    64,     2,  -171,     0,  -197,  -197,  -197,
+     -45,  -143,   -67,   -61,  -197,  -197,  -197,  -196,    -9,   -12,
+    -151,  -197,    38,     3,  -197,  -197,   135,    -8,  -197,  -197,
+    -197,  -197,   -11,   -33,  -197,    28
 };
 
 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
@@ -807,198 +807,194 @@ static const yytype_int16 yypgoto[] =
 #define YYTABLE_NINF -61
 static const yytype_int16 yytable[] =
 {
-      34,    57,    32,    41,    88,   -10,   188,   208,   189,   -51,
-     -51,    82,    47,   123,   126,   211,   227,    46,    46,    73,
-      74,   159,   229,   186,   191,   112,    90,    75,   209,   136,
-     227,   138,   217,   218,   229,    58,   221,   212,   223,   124,
-     127,    89,    51,   187,    69,    52,    53,    54,    62,   232,
-      64,    76,    66,    77,   119,    70,    71,    72,   238,   -51,
-      78,    79,    66,    83,    84,    85,    86,    87,   131,   113,
-     114,    91,    56,   118,   112,   255,    94,    95,   256,   115,
-      46,   -10,   122,   128,   140,   160,   163,   111,   180,    34,
-     197,    32,    41,   174,    54,    54,   176,   201,   116,   202,
-     117,   205,   216,   219,   222,   211,   239,   243,   135,   241,
-     244,   162,   125,   245,   246,   251,   252,   253,   258,   254,
-     170,   213,   235,    81,   184,   175,   204,     0,    94,   137,
-     139,   178,     0,     0,   143,   144,   145,   146,   147,   148,
-     149,   150,   151,   152,   153,   154,   155,   156,   157,     0,
-     158,   177,     0,     0,   231,     0,   161,     0,     0,     0,
-       0,   164,   165,     0,   168,   169,   237,     0,   171,     0,
-     172,   173,     0,   196,     0,     0,   199,   200,     0,   179,
-       0,     0,     0,     0,     0,     0,   207,     0,     0,     0,
-     210,     0,   192,     0,   220,   193,     0,     0,     0,     0,
-       0,   230,     0,   228,   182,   183,     0,     0,     0,   233,
-       0,   234,   236,     0,     0,     0,     0,     0,     0,     0,
-     242,     0,     0,     0,     0,   198,   247,     0,   249,     0,
-     248,     0,     0,     0,     0,   206,     0,     0,     0,     0,
-       0,     0,     0,   259,     0,   260,     0,     0,     0,     0,
-     257,     0,     0,    94,    -6,     1,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,    94,     2,     3,     4,     5,
-       0,     6,     7,     8,     9,    10,    11,     0,     0,     0,
-       0,     0,    12,     0,    13,    14,    15,     0,     0,    16,
-       0,     0,     0,     0,    17,    18,    19,     0,     0,    20,
-       0,     0,     0,    21,    22,    23,    24,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,    25,     0,     0,
-       0,    26,     0,     0,     0,    27,    28,     0,     0,     0,
-      -6,    29,     2,     3,     4,     5,     0,     6,     7,     8,
-       9,    10,    11,     0,     0,     0,     0,     0,    12,     0,
-      13,    14,    15,     0,     0,    16,     0,     0,     0,     0,
-      17,    18,    19,     0,     0,    20,     0,     0,     0,    21,
-      22,    23,    24,     0,     0,     0,     2,     3,     4,     5,
-       0,     6,     0,    25,     0,    48,    11,    26,     0,     0,
-       0,    27,    28,     2,     3,     4,     5,    29,     6,     7,
-       8,     9,    48,    11,    49,     0,    19,     0,     0,    12,
-       0,    13,    14,    15,     0,     0,     0,     0,     0,     0,
-       0,    17,    18,    19,     0,     0,    20,    25,     0,     0,
-       0,    26,    23,    24,     0,    27,    28,     0,     0,     0,
-       0,    29,     0,     0,    25,     0,     0,     0,    26,     0,
-       0,     0,    27,    28,     0,     0,     0,    46,    29,     2,
-       3,     4,     5,     0,     6,     7,     8,     9,    48,    11,
-       0,     0,     0,     0,     0,    12,     0,    13,    14,    15,
-       0,     0,     0,     0,     0,     0,     0,    17,    18,    19,
-       0,     0,    20,     0,     0,     0,     0,     0,    23,    24,
-       0,     0,     0,     2,     3,     4,     5,     0,     6,     0,
-      25,     0,    48,    11,    26,     0,     0,     0,    27,    28,
-       2,     3,     4,     5,    29,     6,     7,     8,     9,    48,
-      11,    49,     0,    19,     0,     0,    12,     0,    13,    14,
-       0,     0,     0,     0,     0,     0,     0,     0,    17,     0,
-      19,     0,     0,     0,    25,     0,     0,     0,    26,    23,
-      24,     0,    27,    28,     2,     3,     4,     5,    92,     6,
+      34,    57,    32,    41,    89,   -10,   -51,   -51,   190,   124,
+     127,   212,    47,    97,    98,   228,    83,    46,    99,   100,
+     101,   160,   102,   103,   104,   113,    91,   189,   209,   228,
+     137,   187,   139,   213,    58,   125,   128,   109,   110,   111,
+      59,    90,    51,    92,    46,    52,    53,    54,    70,   210,
+     192,   188,    67,   218,   219,    71,   -51,   222,   239,   224,
+     120,    80,    67,    84,    85,    86,    87,    88,    72,    73,
+     233,   230,    77,    63,   132,    65,    95,    96,   257,    78,
+      46,   -10,    79,   230,   114,   115,    56,   112,   113,   119,
+      34,   123,    32,    41,    54,    54,   256,    74,    75,   117,
+     116,   118,   129,   141,   161,    76,   164,   175,   177,   181,
+     198,   202,   163,   126,   203,   217,   206,   220,   223,   212,
+     240,   171,   242,   244,   245,   246,   176,   252,   253,    95,
+     138,   140,   179,   254,   247,   144,   145,   146,   147,   148,
+     149,   150,   151,   152,   153,   154,   155,   156,   157,   158,
+     255,   159,   178,   259,   136,   232,   214,   162,   236,    82,
+     185,   205,   165,   166,     0,   169,   170,   238,     0,   172,
+       0,   173,   174,     0,   197,     0,     0,   200,   201,     0,
+     180,     0,     0,     0,     0,     0,     0,   208,     0,     0,
+       0,   211,     0,   193,     0,   221,   194,     0,     0,     0,
+       0,     0,   231,     0,   229,   183,   184,     0,     0,     0,
+     234,     0,   235,   237,     0,     0,     0,     0,     0,     0,
+       0,   243,     0,     0,     0,     0,   199,   248,     0,   250,
+       0,   249,     0,     0,     0,     0,   207,     0,     0,     0,
+       0,     0,     0,     0,   260,     0,   261,     0,     0,     0,
+       0,   258,     0,     0,    95,    -6,     1,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    95,     2,     3,     4,
+       5,     0,     6,     7,     8,     9,    10,    11,     0,     0,
+       0,     0,     0,    12,     0,    13,    14,    15,     0,     0,
+      16,     0,     0,     0,     0,    17,    18,    19,     0,     0,
+      20,     0,     0,     0,    21,    22,    23,    24,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,    25,     0,
+       0,     0,    26,     0,     0,     0,    27,    28,     0,     0,
+       0,    -6,    29,     2,     3,     4,     5,     0,     6,     7,
+       8,     9,    10,    11,     0,     0,     0,     0,     0,    12,
+       0,    13,    14,    15,     0,     0,    16,     0,     0,     0,
+       0,    17,    18,    19,     0,     0,    20,     0,     0,     0,
+      21,    22,    23,    24,     0,     0,     0,     2,     3,     4,
+       5,     0,     6,     0,    25,     0,    48,    11,    26,     0,
+       0,     0,    27,    28,     2,     3,     4,     5,    29,     6,
+       7,     8,     9,    48,    11,    49,     0,    19,     0,     0,
+      12,     0,    13,    14,    15,     0,     0,     0,     0,     0,
+       0,     0,    17,    18,    19,     0,     0,    20,    25,     0,
+       0,     0,    26,    23,    24,     0,    27,    28,     0,     0,
+       0,     0,    29,     0,     0,    25,     0,     0,     0,    26,
+       0,     0,     0,    27,    28,     0,     0,     0,    46,    29,
+       2,     3,     4,     5,     0,     6,     7,     8,     9,    48,
+      11,     0,     0,     0,     0,     0,    12,     0,    13,    14,
+      15,     0,     0,     0,     0,     0,     0,     0,    17,    18,
+      19,     0,     0,    20,     0,     0,     0,     0,     0,    23,
+      24,     0,     0,     0,     2,     3,     4,     5,     0,     6,
        0,    25,     0,    48,    11,    26,     0,     0,     0,    27,
-      28,    60,     0,     0,     0,    29,    61,     0,    62,    63,
-      64,    65,    49,     0,    19,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     2,     3,     4,     5,     0,     6,
-       0,     0,     0,    48,    11,    25,     0,     0,     0,    26,
-       0,    60,     0,    27,    28,     0,     0,     0,    62,    29,
-      64,     0,    49,     0,    19,     0,     0,     0,     0,   121,
-       0,     0,     0,     0,     0,    80,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,    25,     0,     0,     0,    26,
-       0,    96,    97,    27,    28,     0,    98,    99,   100,    29,
-     101,   102,   103,     0,     0,     0,     0,   104,   105,   106,
-     107,   166,     0,     0,     0,   108,   109,   110,     0,     0,
-       0,     0,    96,    97,     0,     0,     0,    98,    99,   100,
-       0,   101,   102,   103,     0,   130,     0,   167,   104,   105,
-     106,   107,     0,     0,    96,    97,   108,   109,   110,    98,
-      99,   100,     0,   101,   102,   103,     0,     0,     0,     0,
-     104,   105,   106,   107,     0,     0,    96,    97,   108,   109,
-     110,    98,    99,   100,     0,   101,   102,   103,     0,   132,
-     133,     0,   104,   105,   106,   107,     0,     0,    96,    97,
-     108,   109,   110,    98,    99,   100,     0,   101,   102,   103,
-       0,     0,     0,   141,   104,   105,   106,   107,     0,     0,
-       0,   134,   108,   109,   110,    96,    97,     0,     0,     0,
-      98,    99,   100,     0,   101,   102,   103,     0,     0,     0,
-       0,   104,   105,   106,   107,     0,     0,     0,   134,   108,
-     109,   110,    96,    97,     0,     0,     0,    98,    99,   100,
-       0,   101,   102,   103,     0,     0,     0,   141,   104,   105,
-     106,   107,     0,     0,    96,    97,   108,   109,   110,    98,
-      99,   100,     0,   101,   102,   103,     0,     0,     0,     0,
-     104,   105,   106,   107,     0,     0,   -60,   -60,   108,   109,
-     110,   -60,   -60,   -60,     0,   -60,   -60,   -60,     0,     0,
-       0,     0,     0,     0,   -60,   -60,     0,     0,    56,     0,
-     -60,   -60,   -60,    96,    97,     0,     0,     0,    98,    99,
-     100,     0,   101,   102,   103,     0,     0,     0,     0,     0,
-       0,   106,   107,     0,     0,    96,    97,   108,   109,   110,
-      98,    99,   100,     0,   101,   102,   103,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,     0,   108,
-     109,   110
+      28,     2,     3,     4,     5,    29,     6,     7,     8,     9,
+      48,    11,    49,     0,    19,     0,     0,    12,     0,    13,
+      14,     0,     0,     0,     0,     0,     0,     0,     0,    17,
+       0,    19,     0,     0,     0,    25,     0,     0,     0,    26,
+      23,    24,     0,    27,    28,     2,     3,     4,     5,    93,
+       6,     0,    25,     0,    48,    11,    26,     0,     0,     0,
+      27,    28,    61,     0,     0,     0,    29,    62,     0,    63,
+      64,    65,    66,    49,     0,    19,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     2,     3,     4,     5,     0,
+       6,     0,     0,     0,    48,    11,    25,     0,     0,     0,
+      26,     0,    61,     0,    27,    28,     0,     0,     0,    63,
+      29,    65,     0,    49,     0,    19,     0,     0,     0,     0,
+     122,     0,     0,     0,     0,     0,    81,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,    25,     0,     0,     0,
+      26,     0,    97,    98,    27,    28,     0,    99,   100,   101,
+      29,   102,   103,   104,     0,     0,     0,     0,   105,   106,
+     107,   108,   167,     0,     0,     0,   109,   110,   111,     0,
+       0,     0,     0,    97,    98,     0,     0,     0,    99,   100,
+     101,     0,   102,   103,   104,     0,   131,     0,   168,   105,
+     106,   107,   108,     0,     0,    97,    98,   109,   110,   111,
+      99,   100,   101,     0,   102,   103,   104,     0,     0,     0,
+       0,   105,   106,   107,   108,     0,     0,    97,    98,   109,
+     110,   111,    99,   100,   101,     0,   102,   103,   104,     0,
+     133,   134,     0,   105,   106,   107,   108,     0,     0,    97,
+      98,   109,   110,   111,    99,   100,   101,     0,   102,   103,
+     104,     0,     0,     0,   142,   105,   106,   107,   108,     0,
+       0,     0,   135,   109,   110,   111,    97,    98,     0,     0,
+       0,    99,   100,   101,     0,   102,   103,   104,     0,     0,
+       0,     0,   105,   106,   107,   108,     0,     0,     0,   135,
+     109,   110,   111,    97,    98,     0,     0,     0,    99,   100,
+     101,     0,   102,   103,   104,     0,     0,     0,   142,   105,
+     106,   107,   108,     0,     0,    97,    98,   109,   110,   111,
+      99,   100,   101,     0,   102,   103,   104,     0,     0,     0,
+       0,   105,   106,   107,   108,     0,     0,   -60,   -60,   109,
+     110,   111,   -60,   -60,   -60,     0,   -60,   -60,   -60,     0,
+       0,     0,     0,     0,     0,   -60,   -60,     0,     0,    56,
+       0,   -60,   -60,   -60,    97,    98,     0,     0,     0,    99,
+     100,   101,     0,   102,   103,   104,     0,     0,     0,     0,
+       0,     0,   107,   108,     0,     0,     0,     0,   109,   110,
+     111
 };
 
 static const yytype_int16 yycheck[] =
 {
-       0,    10,     0,     0,     0,     0,   177,    27,   178,    26,
-      27,    24,     1,    44,    44,    26,   210,    76,    76,    13,
-      14,    78,   213,    24,    82,    82,    77,    21,    48,    90,
-     224,    92,   203,   204,   225,    21,   207,    48,   209,    70,
-      70,    30,     4,    44,    21,     7,     8,     9,    36,   220,
-      38,    21,    14,    21,    67,    17,    46,    47,   228,    76,
-      21,    23,    24,    25,    26,    27,    28,    29,    81,    56,
-      57,    70,    77,    36,    82,   246,    38,    39,   248,    82,
-      76,    76,    21,    43,    43,    21,    21,    49,    21,    89,
-      44,    89,    89,    78,    56,    57,    78,    21,    60,    82,
-      62,    27,    21,    41,    32,    26,    48,    27,    89,    43,
-      27,   120,    74,    27,    43,    27,    41,    32,    41,    32,
-     129,   200,   224,    24,   170,   137,   193,    -1,    90,    91,
-      92,   140,    -1,    -1,    96,    97,    98,    99,   100,   101,
-     102,   103,   104,   105,   106,   107,   108,   109,   110,    -1,
-     112,   140,    -1,    -1,   215,    -1,   118,    -1,    -1,    -1,
-      -1,   123,   124,    -1,   126,   127,   227,    -1,   130,    -1,
-     132,   133,    -1,   185,    -1,    -1,   188,   189,    -1,   141,
-      -1,    -1,    -1,    -1,    -1,    -1,   198,    -1,    -1,    -1,
-     199,    -1,   181,    -1,   206,   184,    -1,    -1,    -1,    -1,
-      -1,   213,    -1,   212,   166,   167,    -1,    -1,    -1,   221,
-      -1,   223,   224,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     232,    -1,    -1,    -1,    -1,   187,   238,    -1,   240,    -1,
-     239,    -1,    -1,    -1,    -1,   197,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   255,    -1,   257,    -1,    -1,    -1,    -1,
-     250,    -1,    -1,   215,     0,     1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,   227,    12,    13,    14,    15,
-      -1,    17,    18,    19,    20,    21,    22,    -1,    -1,    -1,
-      -1,    -1,    28,    -1,    30,    31,    32,    -1,    -1,    35,
-      -1,    -1,    -1,    -1,    40,    41,    42,    -1,    -1,    45,
-      -1,    -1,    -1,    49,    50,    51,    52,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    63,    -1,    -1,
-      -1,    67,    -1,    -1,    -1,    71,    72,    -1,    -1,    -1,
-      76,    77,    12,    13,    14,    15,    -1,    17,    18,    19,
-      20,    21,    22,    -1,    -1,    -1,    -1,    -1,    28,    -1,
-      30,    31,    32,    -1,    -1,    35,    -1,    -1,    -1,    -1,
-      40,    41,    42,    -1,    -1,    45,    -1,    -1,    -1,    49,
-      50,    51,    52,    -1,    -1,    -1,    12,    13,    14,    15,
-      -1,    17,    -1,    63,    -1,    21,    22,    67,    -1,    -1,
-      -1,    71,    72,    12,    13,    14,    15,    77,    17,    18,
-      19,    20,    21,    22,    40,    -1,    42,    -1,    -1,    28,
-      -1,    30,    31,    32,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    40,    41,    42,    -1,    -1,    45,    63,    -1,    -1,
-      -1,    67,    51,    52,    -1,    71,    72,    -1,    -1,    -1,
-      -1,    77,    -1,    -1,    63,    -1,    -1,    -1,    67,    -1,
-      -1,    -1,    71,    72,    -1,    -1,    -1,    76,    77,    12,
-      13,    14,    15,    -1,    17,    18,    19,    20,    21,    22,
-      -1,    -1,    -1,    -1,    -1,    28,    -1,    30,    31,    32,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    40,    41,    42,
-      -1,    -1,    45,    -1,    -1,    -1,    -1,    -1,    51,    52,
-      -1,    -1,    -1,    12,    13,    14,    15,    -1,    17,    -1,
-      63,    -1,    21,    22,    67,    -1,    -1,    -1,    71,    72,
-      12,    13,    14,    15,    77,    17,    18,    19,    20,    21,
-      22,    40,    -1,    42,    -1,    -1,    28,    -1,    30,    31,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    40,    -1,
-      42,    -1,    -1,    -1,    63,    -1,    -1,    -1,    67,    51,
-      52,    -1,    71,    72,    12,    13,    14,    15,    77,    17,
+       0,    10,     0,     0,     0,     0,    26,    27,   179,    44,
+      44,    26,     1,    55,    56,   211,    24,    76,    60,    61,
+      62,    78,    64,    65,    66,    82,    77,   178,    27,   225,
+      91,    24,    93,    48,    41,    70,    70,    79,    80,    81,
+      21,    30,     4,    70,    76,     7,     8,     9,    21,    48,
+      82,    44,    14,   204,   205,    17,    76,   208,   229,   210,
+      68,    23,    24,    25,    26,    27,    28,    29,    46,    47,
+     221,   214,    21,    36,    82,    38,    38,    39,   249,    21,
+      76,    76,    21,   226,    56,    57,    77,    49,    82,    36,
+      90,    21,    90,    90,    56,    57,   247,    13,    14,    61,
+      82,    63,    43,    43,    21,    21,    21,    78,    78,    21,
+      44,    21,   121,    75,    82,    21,    27,    41,    32,    26,
+      48,   130,    43,    27,    27,    27,   138,    27,    41,    91,
+      92,    93,   141,    32,    43,    97,    98,    99,   100,   101,
+     102,   103,   104,   105,   106,   107,   108,   109,   110,   111,
+      32,   113,   141,    41,    90,   216,   201,   119,   225,    24,
+     171,   194,   124,   125,    -1,   127,   128,   228,    -1,   131,
+      -1,   133,   134,    -1,   186,    -1,    -1,   189,   190,    -1,
+     142,    -1,    -1,    -1,    -1,    -1,    -1,   199,    -1,    -1,
+      -1,   200,    -1,   182,    -1,   207,   185,    -1,    -1,    -1,
+      -1,    -1,   214,    -1,   213,   167,   168,    -1,    -1,    -1,
+     222,    -1,   224,   225,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   233,    -1,    -1,    -1,    -1,   188,   239,    -1,   241,
+      -1,   240,    -1,    -1,    -1,    -1,   198,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,   256,    -1,   258,    -1,    -1,    -1,
+      -1,   251,    -1,    -1,   216,     0,     1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,   228,    12,    13,    14,
+      15,    -1,    17,    18,    19,    20,    21,    22,    -1,    -1,
+      -1,    -1,    -1,    28,    -1,    30,    31,    32,    -1,    -1,
+      35,    -1,    -1,    -1,    -1,    40,    41,    42,    -1,    -1,
+      45,    -1,    -1,    -1,    49,    50,    51,    52,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    63,    -1,
+      -1,    -1,    67,    -1,    -1,    -1,    71,    72,    -1,    -1,
+      -1,    76,    77,    12,    13,    14,    15,    -1,    17,    18,
+      19,    20,    21,    22,    -1,    -1,    -1,    -1,    -1,    28,
+      -1,    30,    31,    32,    -1,    -1,    35,    -1,    -1,    -1,
+      -1,    40,    41,    42,    -1,    -1,    45,    -1,    -1,    -1,
+      49,    50,    51,    52,    -1,    -1,    -1,    12,    13,    14,
+      15,    -1,    17,    -1,    63,    -1,    21,    22,    67,    -1,
+      -1,    -1,    71,    72,    12,    13,    14,    15,    77,    17,
+      18,    19,    20,    21,    22,    40,    -1,    42,    -1,    -1,
+      28,    -1,    30,    31,    32,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    40,    41,    42,    -1,    -1,    45,    63,    -1,
+      -1,    -1,    67,    51,    52,    -1,    71,    72,    -1,    -1,
+      -1,    -1,    77,    -1,    -1,    63,    -1,    -1,    -1,    67,
+      -1,    -1,    -1,    71,    72,    -1,    -1,    -1,    76,    77,
+      12,    13,    14,    15,    -1,    17,    18,    19,    20,    21,
+      22,    -1,    -1,    -1,    -1,    -1,    28,    -1,    30,    31,
+      32,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    40,    41,
+      42,    -1,    -1,    45,    -1,    -1,    -1,    -1,    -1,    51,
+      52,    -1,    -1,    -1,    12,    13,    14,    15,    -1,    17,
       -1,    63,    -1,    21,    22,    67,    -1,    -1,    -1,    71,
-      72,    29,    -1,    -1,    -1,    77,    34,    -1,    36,    37,
-      38,    39,    40,    -1,    42,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    12,    13,    14,    15,    -1,    17,
-      -1,    -1,    -1,    21,    22,    63,    -1,    -1,    -1,    67,
-      -1,    29,    -1,    71,    72,    -1,    -1,    -1,    36,    77,
-      38,    -1,    40,    -1,    42,    -1,    -1,    -1,    -1,    33,
-      -1,    -1,    -1,    -1,    -1,    53,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    63,    -1,    -1,    -1,    67,
-      -1,    55,    56,    71,    72,    -1,    60,    61,    62,    77,
-      64,    65,    66,    -1,    -1,    -1,    -1,    71,    72,    73,
-      74,    44,    -1,    -1,    -1,    79,    80,    81,    -1,    -1,
-      -1,    -1,    55,    56,    -1,    -1,    -1,    60,    61,    62,
-      -1,    64,    65,    66,    -1,    46,    -1,    70,    71,    72,
-      73,    74,    -1,    -1,    55,    56,    79,    80,    81,    60,
-      61,    62,    -1,    64,    65,    66,    -1,    -1,    -1,    -1,
-      71,    72,    73,    74,    -1,    -1,    55,    56,    79,    80,
-      81,    60,    61,    62,    -1,    64,    65,    66,    -1,    68,
-      69,    -1,    71,    72,    73,    74,    -1,    -1,    55,    56,
-      79,    80,    81,    60,    61,    62,    -1,    64,    65,    66,
-      -1,    -1,    -1,    70,    71,    72,    73,    74,    -1,    -1,
-      -1,    78,    79,    80,    81,    55,    56,    -1,    -1,    -1,
+      72,    12,    13,    14,    15,    77,    17,    18,    19,    20,
+      21,    22,    40,    -1,    42,    -1,    -1,    28,    -1,    30,
+      31,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    40,
+      -1,    42,    -1,    -1,    -1,    63,    -1,    -1,    -1,    67,
+      51,    52,    -1,    71,    72,    12,    13,    14,    15,    77,
+      17,    -1,    63,    -1,    21,    22,    67,    -1,    -1,    -1,
+      71,    72,    29,    -1,    -1,    -1,    77,    34,    -1,    36,
+      37,    38,    39,    40,    -1,    42,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    12,    13,    14,    15,    -1,
+      17,    -1,    -1,    -1,    21,    22,    63,    -1,    -1,    -1,
+      67,    -1,    29,    -1,    71,    72,    -1,    -1,    -1,    36,
+      77,    38,    -1,    40,    -1,    42,    -1,    -1,    -1,    -1,
+      33,    -1,    -1,    -1,    -1,    -1,    53,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    63,    -1,    -1,    -1,
+      67,    -1,    55,    56,    71,    72,    -1,    60,    61,    62,
+      77,    64,    65,    66,    -1,    -1,    -1,    -1,    71,    72,
+      73,    74,    44,    -1,    -1,    -1,    79,    80,    81,    -1,
+      -1,    -1,    -1,    55,    56,    -1,    -1,    -1,    60,    61,
+      62,    -1,    64,    65,    66,    -1,    46,    -1,    70,    71,
+      72,    73,    74,    -1,    -1,    55,    56,    79,    80,    81,
       60,    61,    62,    -1,    64,    65,    66,    -1,    -1,    -1,
-      -1,    71,    72,    73,    74,    -1,    -1,    -1,    78,    79,
-      80,    81,    55,    56,    -1,    -1,    -1,    60,    61,    62,
-      -1,    64,    65,    66,    -1,    -1,    -1,    70,    71,    72,
-      73,    74,    -1,    -1,    55,    56,    79,    80,    81,    60,
-      61,    62,    -1,    64,    65,    66,    -1,    -1,    -1,    -1,
-      71,    72,    73,    74,    -1,    -1,    55,    56,    79,    80,
-      81,    60,    61,    62,    -1,    64,    65,    66,    -1,    -1,
-      -1,    -1,    -1,    -1,    73,    74,    -1,    -1,    77,    -1,
+      -1,    71,    72,    73,    74,    -1,    -1,    55,    56,    79,
+      80,    81,    60,    61,    62,    -1,    64,    65,    66,    -1,
+      68,    69,    -1,    71,    72,    73,    74,    -1,    -1,    55,
+      56,    79,    80,    81,    60,    61,    62,    -1,    64,    65,
+      66,    -1,    -1,    -1,    70,    71,    72,    73,    74,    -1,
+      -1,    -1,    78,    79,    80,    81,    55,    56,    -1,    -1,
+      -1,    60,    61,    62,    -1,    64,    65,    66,    -1,    -1,
+      -1,    -1,    71,    72,    73,    74,    -1,    -1,    -1,    78,
       79,    80,    81,    55,    56,    -1,    -1,    -1,    60,    61,
-      62,    -1,    64,    65,    66,    -1,    -1,    -1,    -1,    -1,
-      -1,    73,    74,    -1,    -1,    55,    56,    79,    80,    81,
+      62,    -1,    64,    65,    66,    -1,    -1,    -1,    70,    71,
+      72,    73,    74,    -1,    -1,    55,    56,    79,    80,    81,
       60,    61,    62,    -1,    64,    65,    66,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    79,
-      80,    81
+      -1,    71,    72,    73,    74,    -1,    -1,    55,    56,    79,
+      80,    81,    60,    61,    62,    -1,    64,    65,    66,    -1,
+      -1,    -1,    -1,    -1,    -1,    73,    74,    -1,    -1,    77,
+      -1,    79,    80,    81,    55,    56,    -1,    -1,    -1,    60,
+      61,    62,    -1,    64,    65,    66,    -1,    -1,    -1,    -1,
+      -1,    -1,    73,    74,    -1,    -1,    -1,    -1,    79,    80,
+      81
 };
 
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -1010,28 +1006,28 @@ static const yytype_uint8 yystos[] =
       45,    49,    50,    51,    52,    63,    67,    71,    72,    77,
       84,    86,    87,    88,    89,    90,    97,    98,    99,   104,
      105,   106,   108,   111,   112,   117,    76,    85,    21,    40,
-      87,   105,   105,   105,   105,   118,    77,   101,    21,   107,
-      29,    34,    36,    37,    38,    39,   105,   109,   110,    21,
-     105,    46,    47,    13,    14,    21,    21,    21,    21,   105,
-      53,   109,   110,   105,   105,   105,   105,   105,     0,    85,
-      77,    70,    77,    96,   105,   105,    55,    56,    60,    61,
-      62,    64,    65,    66,    71,    72,    73,    74,    79,    80,
-      81,   105,    82,   118,   118,    82,   105,   105,    36,   110,
-     113,    33,    21,    44,    70,   105,    44,    70,    43,   114,
-      46,   110,    68,    69,    78,    86,    96,   105,    96,   105,
-      43,    70,   102,   105,   105,   105,   105,   105,   105,   105,
-     105,   105,   105,   105,   105,   105,   105,   105,   105,    78,
-      21,   105,   101,    21,   105,   105,    44,    70,   105,   105,
-     101,   105,   105,   105,    78,   102,    78,    85,   101,   105,
-      21,   115,   105,   105,   115,   103,    24,    44,   103,    88,
-     106,    82,    85,    85,    85,    89,   102,    44,   105,   102,
-     102,    21,    82,   116,   116,    27,   105,   102,    27,    48,
-     101,    26,    48,    93,    94,   100,    21,   103,   103,    41,
-     102,   103,    32,   103,    92,    93,    95,   100,   101,    94,
-     102,    96,   103,   102,   102,    95,   102,    96,    88,    48,
-      91,    43,   102,    27,    27,    27,    43,   102,   101,   102,
-     101,    27,    41,    32,    32,   103,    88,    89,    41,   102,
-     102
+      87,   105,   105,   105,   105,   118,    77,   101,    41,    21,
+     107,    29,    34,    36,    37,    38,    39,   105,   109,   110,
+      21,   105,    46,    47,    13,    14,    21,    21,    21,    21,
+     105,    53,   109,   110,   105,   105,   105,   105,   105,     0,
+      85,    77,    70,    77,    96,   105,   105,    55,    56,    60,
+      61,    62,    64,    65,    66,    71,    72,    73,    74,    79,
+      80,    81,   105,    82,   118,   118,    82,   105,   105,    36,
+     110,   113,    33,    21,    44,    70,   105,    44,    70,    43,
+     114,    46,   110,    68,    69,    78,    86,    96,   105,    96,
+     105,    43,    70,   102,   105,   105,   105,   105,   105,   105,
+     105,   105,   105,   105,   105,   105,   105,   105,   105,   105,
+      78,    21,   105,   101,    21,   105,   105,    44,    70,   105,
+     105,   101,   105,   105,   105,    78,   102,    78,    85,   101,
+     105,    21,   115,   105,   105,   115,   103,    24,    44,   103,
+      88,   106,    82,    85,    85,    85,    89,   102,    44,   105,
+     102,   102,    21,    82,   116,   116,    27,   105,   102,    27,
+      48,   101,    26,    48,    93,    94,   100,    21,   103,   103,
+      41,   102,   103,    32,   103,    92,    93,    95,   100,   101,
+      94,   102,    96,   103,   102,   102,    95,   102,    96,    88,
+      48,    91,    43,   102,    27,    27,    27,    43,   102,   101,
+     102,   101,    27,    41,    32,    32,   103,    88,    89,    41,
+     102,   102
 };
 
 #define yyerrok		(yyerrstatus = 0)
@@ -2349,125 +2345,130 @@ yyreduce:
 
   case 88:
 #line 411 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->code1(g_lingo->c_exitRepeat); ;}
+    break;
+
+  case 89:
+#line 412 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeConst(0); // Push fake value on stack
 							  g_lingo->code1(g_lingo->c_procret); ;}
     break;
 
-  case 90:
-#line 414 "engines/director/lingo/lingo-gr.y"
+  case 91:
+#line 415 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->code1(g_lingo->_handlers[*(yyvsp[(1) - (2)].s)]->u.func);
 		delete (yyvsp[(1) - (2)].s); ;}
     break;
 
-  case 91:
-#line 417 "engines/director/lingo/lingo-gr.y"
+  case 92:
+#line 418 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->code1(g_lingo->_handlers[*(yyvsp[(1) - (2)].s)]->u.func);
 		delete (yyvsp[(1) - (2)].s); ;}
     break;
 
-  case 92:
-#line 420 "engines/director/lingo/lingo-gr.y"
+  case 93:
+#line 421 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->code2(g_lingo->c_voidpush, g_lingo->_handlers[*(yyvsp[(1) - (1)].s)]->u.func);
 		delete (yyvsp[(1) - (1)].s); ;}
     break;
 
-  case 93:
-#line 423 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->codeFunc((yyvsp[(1) - (2)].s), (yyvsp[(2) - (2)].narg)); ;}
-    break;
-
   case 94:
 #line 424 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_open); ;}
+    { g_lingo->codeFunc((yyvsp[(1) - (2)].s), (yyvsp[(2) - (2)].narg)); ;}
     break;
 
   case 95:
 #line 425 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code2(g_lingo->c_voidpush, g_lingo->c_open); ;}
+    { g_lingo->code1(g_lingo->c_open); ;}
     break;
 
   case 96:
-#line 428 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_global); g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); delete (yyvsp[(1) - (1)].s); ;}
+#line 426 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->code2(g_lingo->c_voidpush, g_lingo->c_open); ;}
     break;
 
   case 97:
 #line 429 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_global); g_lingo->codeString((yyvsp[(3) - (3)].s)->c_str()); delete (yyvsp[(3) - (3)].s); ;}
+    { g_lingo->code1(g_lingo->c_global); g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); delete (yyvsp[(1) - (1)].s); ;}
     break;
 
   case 98:
-#line 440 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_gotoloop); ;}
+#line 430 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->code1(g_lingo->c_global); g_lingo->codeString((yyvsp[(3) - (3)].s)->c_str()); delete (yyvsp[(3) - (3)].s); ;}
     break;
 
   case 99:
 #line 441 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_gotonext); ;}
+    { g_lingo->code1(g_lingo->c_gotoloop); ;}
     break;
 
   case 100:
 #line 442 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_gotoprevious); ;}
+    { g_lingo->code1(g_lingo->c_gotonext); ;}
     break;
 
   case 101:
 #line 443 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->code1(g_lingo->c_gotoprevious); ;}
+    break;
+
+  case 102:
+#line 444 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(1);
 		g_lingo->code1(g_lingo->c_goto); ;}
     break;
 
-  case 102:
-#line 446 "engines/director/lingo/lingo-gr.y"
+  case 103:
+#line 447 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(3);
 		g_lingo->code1(g_lingo->c_goto); ;}
     break;
 
-  case 103:
-#line 449 "engines/director/lingo/lingo-gr.y"
+  case 104:
+#line 450 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(2);
 		g_lingo->code1(g_lingo->c_goto); ;}
     break;
 
-  case 108:
-#line 462 "engines/director/lingo/lingo-gr.y"
+  case 109:
+#line 463 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_playdone); ;}
     break;
 
-  case 109:
-#line 463 "engines/director/lingo/lingo-gr.y"
+  case 110:
+#line 464 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(1);
 		g_lingo->code1(g_lingo->c_play); ;}
     break;
 
-  case 110:
-#line 466 "engines/director/lingo/lingo-gr.y"
+  case 111:
+#line 467 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(3);
 		g_lingo->code1(g_lingo->c_play); ;}
     break;
 
-  case 111:
-#line 469 "engines/director/lingo/lingo-gr.y"
+  case 112:
+#line 470 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(2);
 		g_lingo->code1(g_lingo->c_play); ;}
     break;
 
-  case 112:
-#line 499 "engines/director/lingo/lingo-gr.y"
+  case 113:
+#line 500 "engines/director/lingo/lingo-gr.y"
     { g_lingo->_indef = true; g_lingo->_currentFactory.clear(); ;}
     break;
 
-  case 113:
-#line 500 "engines/director/lingo/lingo-gr.y"
+  case 114:
+#line 501 "engines/director/lingo/lingo-gr.y"
     {
 			g_lingo->codeConst(0); // Push fake value on stack
 			g_lingo->code1(g_lingo->c_procret);
@@ -2475,53 +2476,53 @@ yyreduce:
 			g_lingo->_indef = false; ;}
     break;
 
-  case 114:
-#line 505 "engines/director/lingo/lingo-gr.y"
+  case 115:
+#line 506 "engines/director/lingo/lingo-gr.y"
     {
 			g_lingo->codeFactory(*(yyvsp[(2) - (2)].s));
 		;}
     break;
 
-  case 115:
-#line 508 "engines/director/lingo/lingo-gr.y"
+  case 116:
+#line 509 "engines/director/lingo/lingo-gr.y"
     { g_lingo->_indef = true; ;}
     break;
 
-  case 116:
-#line 509 "engines/director/lingo/lingo-gr.y"
+  case 117:
+#line 510 "engines/director/lingo/lingo-gr.y"
     {
 			g_lingo->code1(g_lingo->c_procret);
 			g_lingo->define(*(yyvsp[(2) - (8)].s), (yyvsp[(4) - (8)].code), (yyvsp[(5) - (8)].narg) + 1, &g_lingo->_currentFactory);
 			g_lingo->_indef = false; ;}
     break;
 
-  case 117:
-#line 513 "engines/director/lingo/lingo-gr.y"
-    { (yyval.narg) = 0; ;}
-    break;
-
   case 118:
 #line 514 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->codeArg((yyvsp[(1) - (1)].s)); (yyval.narg) = 1; ;}
+    { (yyval.narg) = 0; ;}
     break;
 
   case 119:
 #line 515 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->codeArg((yyvsp[(3) - (3)].s)); (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}
+    { g_lingo->codeArg((yyvsp[(1) - (1)].s)); (yyval.narg) = 1; ;}
     break;
 
   case 120:
 #line 516 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->codeArg((yyvsp[(4) - (4)].s)); (yyval.narg) = (yyvsp[(1) - (4)].narg) + 1; ;}
+    { g_lingo->codeArg((yyvsp[(3) - (3)].s)); (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}
     break;
 
   case 121:
-#line 518 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->codeArgStore(); ;}
+#line 517 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->codeArg((yyvsp[(4) - (4)].s)); (yyval.narg) = (yyvsp[(1) - (4)].narg) + 1; ;}
     break;
 
   case 122:
-#line 522 "engines/director/lingo/lingo-gr.y"
+#line 519 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->codeArgStore(); ;}
+    break;
+
+  case 123:
+#line 523 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->code1(g_lingo->c_call);
 		g_lingo->codeString((yyvsp[(1) - (3)].s)->c_str());
@@ -2530,24 +2531,24 @@ yyreduce:
 		g_lingo->code1(numpar); ;}
     break;
 
-  case 123:
-#line 530 "engines/director/lingo/lingo-gr.y"
-    { (yyval.narg) = 0; ;}
-    break;
-
   case 124:
 #line 531 "engines/director/lingo/lingo-gr.y"
-    { (yyval.narg) = 1; ;}
+    { (yyval.narg) = 0; ;}
     break;
 
   case 125:
 #line 532 "engines/director/lingo/lingo-gr.y"
+    { (yyval.narg) = 1; ;}
+    break;
+
+  case 126:
+#line 533 "engines/director/lingo/lingo-gr.y"
     { (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}
     break;
 
 
 /* Line 1267 of yacc.c.  */
-#line 2551 "engines/director/lingo/lingo-gr.cpp"
+#line 2552 "engines/director/lingo/lingo-gr.cpp"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2761,6 +2762,6 @@ yyreturn:
 }
 
 
-#line 535 "engines/director/lingo/lingo-gr.y"
+#line 536 "engines/director/lingo/lingo-gr.y"
 
 
diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y
index f74244e..aff4199 100644
--- a/engines/director/lingo/lingo-gr.y
+++ b/engines/director/lingo/lingo-gr.y
@@ -408,6 +408,7 @@ expr: INT		{ $$ = g_lingo->codeConst($1); }
 func: tPUT expr				{ g_lingo->code1(g_lingo->c_printtop); }
 	| gotofunc
 	| playfunc
+	| tEXIT tREPEAT			{ g_lingo->code1(g_lingo->c_exitRepeat); }
 	| tEXIT					{ g_lingo->codeConst(0); // Push fake value on stack
 							  g_lingo->code1(g_lingo->c_procret); }
 	| tGLOBAL globallist
diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp
index d37da42..d3e84a0 100644
--- a/engines/director/lingo/lingo.cpp
+++ b/engines/director/lingo/lingo.cpp
@@ -104,6 +104,8 @@ Lingo::Lingo(DirectorEngine *vm) : _vm(vm) {
 	_floatPrecision = 4;
 	_floatPrecisionFormat = "%.4f";
 
+	_exitRepeat = false;
+
 	warning("Lingo Inited");
 }
 
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index 71708cf..9707afb 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -268,6 +268,7 @@ public:
 	static void c_repeatwithcode();
 	static void c_ifcode();
 	static void c_whencode();
+	static void c_exitRepeat();
 	static void c_eq();
 	static void c_neq();
 	static void c_gt();
@@ -425,6 +426,8 @@ public:
 	bool _inFactory;
 	Common::String _currentFactory;
 
+	bool _exitRepeat;
+
 private:
 	int parse(const char *code);
 	void push(Datum d);


Commit: 80b8fcf693da1069f432d016f3d90311772395b1
    https://github.com/scummvm/scummvm/commit/80b8fcf693da1069f432d016f3d90311772395b1
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-08-20T11:42:01+02:00

Commit Message:
DIRECTOR: Lingo: Added stub for 'instance' keyword

Changed paths:
    engines/director/lingo/lingo-code.cpp
    engines/director/lingo/lingo-gr.cpp
    engines/director/lingo/lingo-gr.h
    engines/director/lingo/lingo-gr.y
    engines/director/lingo/lingo-lex.cpp
    engines/director/lingo/lingo-lex.l
    engines/director/lingo/lingo.h



diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp
index f9770f5..c97d669 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -103,6 +103,7 @@ static struct FuncDescr {
 	{ Lingo::c_call,		"c_call",		"si" },
 	{ Lingo::c_procret,		"c_procret",	"" },
 	{ Lingo::c_global,		"c_global",		"s" },
+	{ Lingo::c_instance,	"c_instance",	"s" },
 	{ Lingo::c_open,		"c_open",		"" },
 	{ 0, 0, 0 }
 };
@@ -937,6 +938,14 @@ void Lingo::c_global() {
 	g_lingo->_pc += g_lingo->calcStringAlignment(name.c_str());
 }
 
+void Lingo::c_instance() {
+	Common::String name((char *)&(*g_lingo->_currentScript)[g_lingo->_pc]);
+
+	warning("STUB: c_instance(%s)", name.c_str());
+
+	g_lingo->_pc += g_lingo->calcStringAlignment(name.c_str());
+}
+
 void Lingo::c_open() {
 	Datum d2 = g_lingo->pop();
 	Datum d1 = g_lingo->pop();
diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp
index 4b6abc2..3837029 100644
--- a/engines/director/lingo/lingo-gr.cpp
+++ b/engines/director/lingo/lingo-gr.cpp
@@ -118,21 +118,22 @@
      tPLAY = 307,
      tDONE = 308,
      tPLAYACCEL = 309,
-     tGE = 310,
-     tLE = 311,
-     tGT = 312,
-     tLT = 313,
-     tEQ = 314,
-     tNEQ = 315,
-     tAND = 316,
-     tOR = 317,
-     tNOT = 318,
-     tCONCAT = 319,
-     tCONTAINS = 320,
-     tSTARTS = 321,
-     tSPRITE = 322,
-     tINTERSECTS = 323,
-     tWITHIN = 324
+     tINSTANCE = 310,
+     tGE = 311,
+     tLE = 312,
+     tGT = 313,
+     tLT = 314,
+     tEQ = 315,
+     tNEQ = 316,
+     tAND = 317,
+     tOR = 318,
+     tNOT = 319,
+     tCONCAT = 320,
+     tCONTAINS = 321,
+     tSTARTS = 322,
+     tSPRITE = 323,
+     tINTERSECTS = 324,
+     tWITHIN = 325
    };
 #endif
 /* Tokens.  */
@@ -188,21 +189,22 @@
 #define tPLAY 307
 #define tDONE 308
 #define tPLAYACCEL 309
-#define tGE 310
-#define tLE 311
-#define tGT 312
-#define tLT 313
-#define tEQ 314
-#define tNEQ 315
-#define tAND 316
-#define tOR 317
-#define tNOT 318
-#define tCONCAT 319
-#define tCONTAINS 320
-#define tSTARTS 321
-#define tSPRITE 322
-#define tINTERSECTS 323
-#define tWITHIN 324
+#define tINSTANCE 310
+#define tGE 311
+#define tLE 312
+#define tGT 313
+#define tLT 314
+#define tEQ 315
+#define tNEQ 316
+#define tAND 317
+#define tOR 318
+#define tNOT 319
+#define tCONCAT 320
+#define tCONTAINS 321
+#define tSTARTS 322
+#define tSPRITE 323
+#define tINTERSECTS 324
+#define tWITHIN 325
 
 
 
@@ -260,7 +262,7 @@ typedef union YYSTYPE
 	Common::Array<double> *arr;
 }
 /* Line 193 of yacc.c.  */
-#line 264 "engines/director/lingo/lingo-gr.cpp"
+#line 266 "engines/director/lingo/lingo-gr.cpp"
 	YYSTYPE;
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
@@ -273,7 +275,7 @@ typedef union YYSTYPE
 
 
 /* Line 216 of yacc.c.  */
-#line 277 "engines/director/lingo/lingo-gr.cpp"
+#line 279 "engines/director/lingo/lingo-gr.cpp"
 
 #ifdef short
 # undef short
@@ -486,22 +488,22 @@ union yyalloc
 #endif
 
 /* YYFINAL -- State number of the termination state.  */
-#define YYFINAL  89
+#define YYFINAL  92
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   910
+#define YYLAST   978
 
 /* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  83
+#define YYNTOKENS  84
 /* YYNNTS -- Number of nonterminals.  */
-#define YYNNTS  36
+#define YYNNTS  37
 /* YYNRULES -- Number of rules.  */
-#define YYNRULES  126
+#define YYNRULES  129
 /* YYNRULES -- Number of states.  */
-#define YYNSTATES  262
+#define YYNSTATES  267
 
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 #define YYUNDEFTOK  2
-#define YYMAXUTOK   324
+#define YYMAXUTOK   325
 
 #define YYTRANSLATE(YYX)						\
   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -510,12 +512,12 @@ union yyalloc
 static const yytype_uint8 yytranslate[] =
 {
        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-      76,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+      77,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,    75,    81,     2,
-      77,    78,    73,    71,    82,    72,     2,    74,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,    76,    82,     2,
+      78,    79,    74,    72,    83,    73,     2,    75,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-      80,    70,    79,     2,     2,     2,     2,     2,     2,     2,
+      81,    71,    80,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
@@ -541,7 +543,7 @@ static const yytype_uint8 yytranslate[] =
       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
       55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
-      65,    66,    67,    68,    69
+      65,    66,    67,    68,    69,    70
 };
 
 #if YYDEBUG
@@ -558,62 +560,63 @@ static const yytype_uint16 yyprhs[] =
      247,   249,   251,   254,   256,   260,   264,   268,   272,   276,
      280,   284,   288,   292,   296,   300,   303,   307,   311,   315,
      319,   322,   325,   329,   334,   339,   342,   344,   346,   349,
-     351,   354,   357,   360,   362,   365,   370,   373,   375,   379,
-     382,   385,   388,   391,   395,   398,   401,   403,   407,   410,
-     413,   416,   420,   423,   424,   433,   436,   437,   446,   447,
-     449,   453,   458,   459,   463,   464,   466
+     351,   354,   357,   360,   363,   365,   368,   373,   376,   378,
+     382,   384,   388,   391,   394,   397,   400,   404,   407,   410,
+     412,   416,   419,   422,   425,   429,   432,   433,   442,   445,
+     446,   455,   456,   458,   462,   467,   468,   472,   473,   475
 };
 
 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
 static const yytype_int8 yyrhs[] =
 {
-      84,     0,    -1,    84,    85,    86,    -1,    86,    -1,     1,
-      85,    -1,    76,    -1,    -1,   112,    -1,   106,    -1,   117,
-      -1,    87,    -1,    89,    -1,    40,   105,    33,    21,    -1,
-      42,    21,    70,   105,    -1,    42,    13,    70,   105,    -1,
-      42,    14,   105,    70,   105,    -1,    42,    21,    44,   105,
-      -1,    42,    13,    44,   105,    -1,    42,    14,   105,    44,
-     105,    -1,   105,    -1,   106,    -1,    88,    -1,    90,    -1,
-      97,    77,    96,    78,   103,   102,    27,    41,    -1,    98,
-      70,   105,   102,    44,   105,   102,   103,   102,    27,    41,
-      -1,    98,    70,   105,   102,    24,    44,   105,   102,   103,
-     102,    27,    41,    -1,   104,   105,   102,    -1,    99,    96,
-      43,    85,   103,   102,    27,    32,    -1,    99,    96,    43,
-      85,   103,   102,    48,   103,   102,    27,    32,    -1,    99,
-      96,    43,    85,   103,   102,   101,    92,   102,    27,    32,
-      -1,    99,    96,    43,   101,    88,   102,    -1,    99,    96,
-      43,   101,    88,   102,    48,   101,    88,   102,    -1,    99,
-      96,    43,   101,    88,   102,    93,   102,    91,   102,    -1,
-      -1,    48,   101,    88,    -1,    92,    95,    -1,    95,    -1,
-      93,    94,    -1,    94,    -1,   100,    96,    43,   101,    89,
-     102,    -1,    93,    -1,   100,    96,    43,   103,   102,    -1,
-     105,    -1,   105,    70,   105,    -1,    77,    96,    78,    -1,
+      85,     0,    -1,    85,    86,    87,    -1,    87,    -1,     1,
+      86,    -1,    77,    -1,    -1,   114,    -1,   107,    -1,   119,
+      -1,    88,    -1,    90,    -1,    40,   106,    33,    21,    -1,
+      42,    21,    71,   106,    -1,    42,    13,    71,   106,    -1,
+      42,    14,   106,    71,   106,    -1,    42,    21,    44,   106,
+      -1,    42,    13,    44,   106,    -1,    42,    14,   106,    44,
+     106,    -1,   106,    -1,   107,    -1,    89,    -1,    91,    -1,
+      98,    78,    97,    79,   104,   103,    27,    41,    -1,    99,
+      71,   106,   103,    44,   106,   103,   104,   103,    27,    41,
+      -1,    99,    71,   106,   103,    24,    44,   106,   103,   104,
+     103,    27,    41,    -1,   105,   106,   103,    -1,   100,    97,
+      43,    86,   104,   103,    27,    32,    -1,   100,    97,    43,
+      86,   104,   103,    48,   104,   103,    27,    32,    -1,   100,
+      97,    43,    86,   104,   103,   102,    93,   103,    27,    32,
+      -1,   100,    97,    43,   102,    89,   103,    -1,   100,    97,
+      43,   102,    89,   103,    48,   102,    89,   103,    -1,   100,
+      97,    43,   102,    89,   103,    94,   103,    92,   103,    -1,
+      -1,    48,   102,    89,    -1,    93,    96,    -1,    96,    -1,
+      94,    95,    -1,    95,    -1,   101,    97,    43,   102,    90,
+     103,    -1,    94,    -1,   101,    97,    43,   104,   103,    -1,
+     106,    -1,   106,    71,   106,    -1,    78,    97,    79,    -1,
       41,    47,    -1,    41,    46,    21,    -1,    32,    -1,    26,
-      -1,    -1,    -1,    -1,   103,    85,    -1,   103,    89,    -1,
+      -1,    -1,    -1,    -1,   104,    86,    -1,   104,    90,    -1,
       45,    21,    43,    -1,    12,    -1,    15,    -1,    22,    -1,
-      17,    -1,    21,    77,   118,    78,    -1,    21,    -1,    13,
-      -1,    14,   105,    -1,    87,    -1,   105,    71,   105,    -1,
-     105,    72,   105,    -1,   105,    73,   105,    -1,   105,    74,
-     105,    -1,   105,    79,   105,    -1,   105,    80,   105,    -1,
-     105,    60,   105,    -1,   105,    55,   105,    -1,   105,    56,
-     105,    -1,   105,    61,   105,    -1,   105,    62,   105,    -1,
-      63,   105,    -1,   105,    81,   105,    -1,   105,    64,   105,
-      -1,   105,    65,   105,    -1,   105,    66,   105,    -1,    71,
-     105,    -1,    72,   105,    -1,    77,   105,    78,    -1,    67,
-     105,    68,   105,    -1,    67,   105,    69,   105,    -1,    40,
-     105,    -1,   108,    -1,   111,    -1,    28,    41,    -1,    28,
-      -1,    30,   107,    -1,    19,   105,    -1,    18,   105,    -1,
-      18,    -1,    20,   118,    -1,    51,   105,    46,   105,    -1,
-      51,   105,    -1,    21,    -1,   107,    82,    21,    -1,    31,
-      34,    -1,    31,    37,    -1,    31,    39,    -1,    31,   109,
-      -1,    31,   109,   110,    -1,    31,   110,    -1,    29,   105,
-      -1,   105,    -1,    38,    36,   105,    -1,    36,   105,    -1,
-      52,    53,    -1,    52,   109,    -1,    52,   109,   110,    -1,
-      52,   110,    -1,    -1,    35,    21,   113,   101,   115,    85,
-     116,   103,    -1,    49,    21,    -1,    -1,    50,    21,   114,
-     101,   115,    85,   116,   103,    -1,    -1,    21,    -1,   115,
-      82,    21,    -1,   115,    85,    82,    21,    -1,    -1,    21,
-     101,   118,    -1,    -1,   105,    -1,   118,    82,   105,    -1
+      17,    -1,    21,    78,   120,    79,    -1,    21,    -1,    13,
+      -1,    14,   106,    -1,    88,    -1,   106,    72,   106,    -1,
+     106,    73,   106,    -1,   106,    74,   106,    -1,   106,    75,
+     106,    -1,   106,    80,   106,    -1,   106,    81,   106,    -1,
+     106,    61,   106,    -1,   106,    56,   106,    -1,   106,    57,
+     106,    -1,   106,    62,   106,    -1,   106,    63,   106,    -1,
+      64,   106,    -1,   106,    82,   106,    -1,   106,    65,   106,
+      -1,   106,    66,   106,    -1,   106,    67,   106,    -1,    72,
+     106,    -1,    73,   106,    -1,    78,   106,    79,    -1,    68,
+     106,    69,   106,    -1,    68,   106,    70,   106,    -1,    40,
+     106,    -1,   110,    -1,   113,    -1,    28,    41,    -1,    28,
+      -1,    30,   108,    -1,    55,   109,    -1,    19,   106,    -1,
+      18,   106,    -1,    18,    -1,    20,   120,    -1,    51,   106,
+      46,   106,    -1,    51,   106,    -1,    21,    -1,   108,    83,
+      21,    -1,    21,    -1,   109,    83,    21,    -1,    31,    34,
+      -1,    31,    37,    -1,    31,    39,    -1,    31,   111,    -1,
+      31,   111,   112,    -1,    31,   112,    -1,    29,   106,    -1,
+     106,    -1,    38,    36,   106,    -1,    36,   106,    -1,    52,
+      53,    -1,    52,   111,    -1,    52,   111,   112,    -1,    52,
+     112,    -1,    -1,    35,    21,   115,   102,   117,    86,   118,
+     104,    -1,    49,    21,    -1,    -1,    50,    21,   116,   102,
+     117,    86,   118,   104,    -1,    -1,    21,    -1,   117,    83,
+      21,    -1,   117,    86,    83,    21,    -1,    -1,    21,   102,
+     120,    -1,    -1,   106,    -1,   120,    83,   106,    -1
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
@@ -628,10 +631,10 @@ static const yytype_uint16 yyrline[] =
      367,   371,   378,   384,   385,   386,   387,   388,   389,   390,
      391,   392,   393,   394,   395,   396,   397,   398,   399,   400,
      401,   402,   403,   404,   405,   408,   409,   410,   411,   412,
-     414,   415,   418,   421,   424,   425,   426,   429,   430,   441,
-     442,   443,   444,   447,   450,   455,   456,   459,   460,   463,
-     464,   467,   470,   500,   500,   506,   509,   509,   514,   515,
-     516,   517,   519,   523,   531,   532,   533
+     414,   415,   416,   419,   422,   425,   426,   427,   430,   431,
+     434,   435,   446,   447,   448,   449,   452,   455,   460,   461,
+     464,   465,   468,   469,   472,   475,   505,   505,   511,   514,
+     514,   519,   520,   521,   522,   524,   528,   536,   537,   538
 };
 #endif
 
@@ -648,16 +651,17 @@ static const char *const yytname[] =
   "tINTO", "tLOOP", "tMACRO", "tMOVIE", "tNEXT", "tOF", "tPREVIOUS",
   "tPUT", "tREPEAT", "tSET", "tTHEN", "tTO", "tWHEN", "tWITH", "tWHILE",
   "tNLELSE", "tFACTORY", "tMETHOD", "tOPEN", "tPLAY", "tDONE",
-  "tPLAYACCEL", "tGE", "tLE", "tGT", "tLT", "tEQ", "tNEQ", "tAND", "tOR",
-  "tNOT", "tCONCAT", "tCONTAINS", "tSTARTS", "tSPRITE", "tINTERSECTS",
-  "tWITHIN", "'='", "'+'", "'-'", "'*'", "'/'", "'%'", "'\\n'", "'('",
-  "')'", "'>'", "'<'", "'&'", "','", "$accept", "program", "nl",
-  "programline", "asgn", "stmtoneliner", "stmt", "ifstmt",
+  "tPLAYACCEL", "tINSTANCE", "tGE", "tLE", "tGT", "tLT", "tEQ", "tNEQ",
+  "tAND", "tOR", "tNOT", "tCONCAT", "tCONTAINS", "tSTARTS", "tSPRITE",
+  "tINTERSECTS", "tWITHIN", "'='", "'+'", "'-'", "'*'", "'/'", "'%'",
+  "'\\n'", "'('", "')'", "'>'", "'<'", "'&'", "','", "$accept", "program",
+  "nl", "programline", "asgn", "stmtoneliner", "stmt", "ifstmt",
   "elsestmtoneliner", "elseifstmt", "elseifstmtoneliner",
   "elseifstmtoneliner1", "elseifstmt1", "cond", "repeatwhile",
   "repeatwith", "if", "elseif", "begin", "end", "stmtlist", "when", "expr",
-  "func", "globallist", "gotofunc", "gotoframe", "gotomovie", "playfunc",
-  "defn", "@1", "@2", "argdef", "argstore", "macro", "arglist", 0
+  "func", "globallist", "instancelist", "gotofunc", "gotoframe",
+  "gotomovie", "playfunc", "defn", "@1", "@2", "argdef", "argstore",
+  "macro", "arglist", 0
 };
 #endif
 
@@ -673,27 +677,27 @@ static const yytype_uint16 yytoknum[] =
      295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
      305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
      315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
-      61,    43,    45,    42,    47,    37,    10,    40,    41,    62,
-      60,    38,    44
+     325,    61,    43,    45,    42,    47,    37,    10,    40,    41,
+      62,    60,    38,    44
 };
 # endif
 
 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
 static const yytype_uint8 yyr1[] =
 {
-       0,    83,    84,    84,    84,    85,    86,    86,    86,    86,
-      86,    86,    87,    87,    87,    87,    87,    87,    87,    88,
-      88,    89,    89,    89,    89,    89,    89,    90,    90,    90,
-      90,    90,    90,    91,    91,    92,    92,    93,    93,    94,
-      95,    95,    96,    96,    96,    97,    98,    99,   100,   101,
-     102,   103,   103,   103,   104,   105,   105,   105,   105,   105,
-     105,   105,   105,   105,   105,   105,   105,   105,   105,   105,
-     105,   105,   105,   105,   105,   105,   105,   105,   105,   105,
-     105,   105,   105,   105,   105,   106,   106,   106,   106,   106,
-     106,   106,   106,   106,   106,   106,   106,   107,   107,   108,
-     108,   108,   108,   108,   108,   109,   109,   110,   110,   111,
-     111,   111,   111,   113,   112,   112,   114,   112,   115,   115,
-     115,   115,   116,   117,   118,   118,   118
+       0,    84,    85,    85,    85,    86,    87,    87,    87,    87,
+      87,    87,    88,    88,    88,    88,    88,    88,    88,    89,
+      89,    90,    90,    90,    90,    90,    90,    91,    91,    91,
+      91,    91,    91,    92,    92,    93,    93,    94,    94,    95,
+      96,    96,    97,    97,    97,    98,    99,   100,   101,   102,
+     103,   104,   104,   104,   105,   106,   106,   106,   106,   106,
+     106,   106,   106,   106,   106,   106,   106,   106,   106,   106,
+     106,   106,   106,   106,   106,   106,   106,   106,   106,   106,
+     106,   106,   106,   106,   106,   107,   107,   107,   107,   107,
+     107,   107,   107,   107,   107,   107,   107,   107,   108,   108,
+     109,   109,   110,   110,   110,   110,   110,   110,   111,   111,
+     112,   112,   113,   113,   113,   113,   115,   114,   114,   116,
+     114,   117,   117,   117,   117,   118,   119,   120,   120,   120
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
@@ -708,10 +712,10 @@ static const yytype_uint8 yyr2[] =
        1,     1,     2,     1,     3,     3,     3,     3,     3,     3,
        3,     3,     3,     3,     3,     2,     3,     3,     3,     3,
        2,     2,     3,     4,     4,     2,     1,     1,     2,     1,
-       2,     2,     2,     1,     2,     4,     2,     1,     3,     2,
-       2,     2,     2,     3,     2,     2,     1,     3,     2,     2,
-       2,     3,     2,     0,     8,     2,     0,     8,     0,     1,
-       3,     4,     0,     3,     0,     1,     3
+       2,     2,     2,     2,     1,     2,     4,     2,     1,     3,
+       1,     3,     2,     2,     2,     2,     3,     2,     2,     1,
+       3,     2,     2,     2,     3,     2,     0,     8,     2,     0,
+       8,     0,     1,     3,     4,     0,     3,     0,     1,     3
 };
 
 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -719,85 +723,85 @@ static const yytype_uint8 yyr2[] =
    means the default is an error.  */
 static const yytype_uint8 yydefact[] =
 {
-       0,     0,    55,    61,     0,    56,    58,    93,     0,   124,
+       0,     0,    55,    61,     0,    56,    58,    94,     0,   127,
       49,    57,    89,     0,     0,    47,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     3,    63,    21,    11,    22,     0,     0,     0,     0,
-      19,     8,    86,    87,     7,     9,     5,     4,    60,     0,
-      63,    62,    92,    91,   125,    94,   124,   124,    88,    97,
-      90,     0,    99,     0,   100,     0,   101,   106,   102,   104,
-     113,    85,     0,    45,     0,     0,     0,     0,   115,   116,
-      96,   109,   110,   112,    75,     0,    80,    81,     0,     1,
-       6,     0,     0,     0,     0,    42,    50,     0,     0,     0,
+       0,     0,     3,    63,    21,    11,    22,     0,     0,     0,
+       0,    19,     8,    86,    87,     7,     9,     5,     4,    60,
+       0,    63,    62,    93,    92,   128,    95,   127,   127,    88,
+      98,    90,     0,   102,     0,   103,     0,   104,   109,   105,
+     107,   116,    85,     0,    45,     0,     0,     0,     0,   118,
+     119,    97,   112,   113,   115,   100,    91,    75,     0,    80,
+      81,     0,     1,     6,     0,     0,     0,     0,    42,    50,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   123,     0,   105,   108,     0,
-     103,    49,     0,    46,     0,     0,     0,     0,     0,    54,
-      49,     0,   111,     0,     0,    82,     2,     0,    50,     0,
-       0,    49,     0,    26,    71,    72,    70,    73,    74,    77,
-      78,    79,    64,    65,    66,    67,    68,    69,    76,   126,
-      59,    98,   107,   118,    12,    17,    14,     0,     0,    16,
-      13,   118,    95,    83,    84,    51,     0,    44,    51,     0,
-      43,   119,     0,    18,    15,     0,    50,     0,     0,    50,
-      50,    20,     0,   122,   122,    52,    53,     0,     0,    50,
-      49,    30,   120,     0,    51,    51,     0,    50,    51,     0,
-      51,     0,    48,    49,    50,    38,     0,   121,   114,   117,
-      23,    51,    50,    27,    50,    50,    40,    36,     0,     0,
-      37,    33,     0,    50,     0,     0,    35,     0,     0,    50,
-      49,    50,    49,     0,     0,     0,     0,    49,    31,     0,
-      32,     0,     0,    24,    28,    29,    50,    34,    50,    25,
-      41,    39
+       0,     0,     0,     0,     0,     0,     0,     0,   126,     0,
+     108,   111,     0,   106,    49,     0,    46,     0,     0,     0,
+       0,     0,    54,    49,     0,   114,     0,     0,     0,    82,
+       2,     0,    50,     0,     0,    49,     0,    26,    71,    72,
+      70,    73,    74,    77,    78,    79,    64,    65,    66,    67,
+      68,    69,    76,   129,    59,    99,   110,   121,    12,    17,
+      14,     0,     0,    16,    13,   121,    96,   101,    83,    84,
+      51,     0,    44,    51,     0,    43,   122,     0,    18,    15,
+       0,    50,     0,     0,    50,    50,    20,     0,   125,   125,
+      52,    53,     0,     0,    50,    49,    30,   123,     0,    51,
+      51,     0,    50,    51,     0,    51,     0,    48,    49,    50,
+      38,     0,   124,   117,   120,    23,    51,    50,    27,    50,
+      50,    40,    36,     0,     0,    37,    33,     0,    50,     0,
+       0,    35,     0,     0,    50,    49,    50,    49,     0,     0,
+       0,     0,    49,    31,     0,    32,     0,     0,    24,    28,
+      29,    50,    34,    50,    25,    41,    39
 };
 
 /* YYDEFGOTO[NTERM-NUM].  */
 static const yytype_int16 yydefgoto[] =
 {
-      -1,    30,   195,    31,    50,    33,   196,    35,   241,   225,
-     226,   215,   227,    94,    36,    37,    38,   216,   251,   143,
-     186,    39,    40,   191,    60,    42,    68,    69,    43,    44,
-     121,   130,   182,   204,    45,    55
+      -1,    31,   200,    32,    51,    34,   201,    36,   246,   230,
+     231,   220,   232,    97,    37,    38,    39,   221,   256,   147,
+     191,    40,    41,   196,    61,    86,    43,    69,    70,    44,
+      45,   124,   133,   187,   209,    46,    56
 };
 
 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    STATE-NUM.  */
-#define YYPACT_NINF -197
+#define YYPACT_NINF -203
 static const yytype_int16 yypact[] =
 {
-     255,   -59,  -197,  -197,   365,  -197,  -197,   365,   365,   365,
-     802,  -197,    -7,    19,   553,  -197,    27,   365,    22,    84,
-      51,    58,    61,   365,   593,   365,   365,   365,   365,   365,
-       4,  -197,     5,  -197,  -197,  -197,   -51,   -27,   492,   365,
-     780,  -197,  -197,  -197,  -197,  -197,  -197,  -197,     9,   365,
-    -197,   780,   780,   780,   780,     6,   365,   365,  -197,  -197,
-      18,   365,  -197,   365,  -197,    53,  -197,   780,    37,  -197,
-    -197,   607,    70,  -197,   -35,   365,   -34,    59,  -197,  -197,
-     660,  -197,    37,  -197,   -42,   682,   -42,   -42,   731,  -197,
-     321,   492,   365,   492,    60,   758,   780,   365,   365,   365,
-     365,   365,   365,   365,   365,   365,   365,   365,   365,   365,
-     365,   365,   607,   365,   -57,     6,    83,   780,   780,   365,
-    -197,  -197,    85,  -197,   365,   365,   638,   365,   365,  -197,
-    -197,   365,  -197,   365,   365,  -197,  -197,    29,   780,    30,
-     704,   -59,   365,  -197,   780,   780,   780,   780,   780,   780,
-     780,   780,   829,   829,   -42,   -42,   780,   780,   780,   780,
-    -197,  -197,   780,    88,  -197,   780,   780,   365,   365,   780,
-     780,    88,   780,   780,   780,  -197,     7,  -197,  -197,   509,
-     780,  -197,   -32,   780,   780,   -32,   382,    66,   365,   382,
-    -197,  -197,    90,    32,    32,  -197,  -197,    89,   365,   780,
-       1,   -15,  -197,    94,  -197,  -197,    76,   780,  -197,    86,
-    -197,    93,  -197,  -197,    93,  -197,   492,  -197,   382,   382,
-    -197,  -197,   382,  -197,   382,    93,    93,  -197,   492,   509,
-    -197,    72,    79,   382,    96,    97,  -197,    98,    91,  -197,
-    -197,  -197,  -197,   100,    87,   101,   118,   -20,  -197,   509,
-    -197,   448,   112,  -197,  -197,  -197,   382,  -197,  -197,  -197,
-    -197,  -197
+     275,   -52,  -203,  -203,   653,  -203,  -203,   653,   653,   653,
+     869,  -203,    -5,    29,   578,  -203,    36,   653,   -23,     6,
+      38,    39,    41,   653,   619,    42,   653,   653,   653,   653,
+     653,     8,  -203,     9,  -203,  -203,  -203,   -34,     4,   664,
+     653,   847,  -203,  -203,  -203,  -203,  -203,  -203,  -203,   -12,
+     653,  -203,   847,   847,   847,   847,   -18,   653,   653,  -203,
+    -203,    -4,   653,  -203,   653,  -203,    45,  -203,   847,    11,
+    -203,  -203,   678,    56,  -203,   -37,   653,   -32,    35,  -203,
+    -203,   727,  -203,    11,  -203,  -203,    -1,   163,   749,   163,
+     163,   798,  -203,   342,   664,   653,   664,    46,   825,   847,
+     653,   653,   653,   653,   653,   653,   653,   653,   653,   653,
+     653,   653,   653,   653,   653,   678,   653,   -48,   -18,    66,
+     847,   847,   653,  -203,  -203,    67,  -203,   653,   653,   705,
+     653,   653,  -203,  -203,   653,  -203,    69,   653,   653,  -203,
+    -203,    12,   847,    13,   771,   -52,   653,  -203,   847,   847,
+     847,   847,   847,   847,   847,   847,   896,   896,   163,   163,
+     847,   847,   847,   847,  -203,  -203,   847,    74,  -203,   847,
+     847,   653,   653,   847,   847,    74,   847,  -203,   847,   847,
+    -203,     2,  -203,  -203,   533,   847,  -203,   -55,   847,   847,
+     -55,   404,    53,   653,   404,  -203,  -203,    78,    17,    17,
+    -203,  -203,    76,   653,   847,    -6,    -8,  -203,    83,  -203,
+    -203,    64,   847,  -203,    75,  -203,    84,  -203,  -203,    84,
+    -203,   664,  -203,   404,   404,  -203,  -203,   404,  -203,   404,
+      84,    84,  -203,   664,   533,  -203,    61,    68,   404,    85,
+      86,  -203,    87,    73,  -203,  -203,  -203,  -203,    90,    77,
+      89,    91,   -13,  -203,   533,  -203,   471,    81,  -203,  -203,
+    -203,   404,  -203,  -203,  -203,  -203,  -203
 };
 
 /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int16 yypgoto[] =
 {
-    -197,  -197,    11,    64,     2,  -171,     0,  -197,  -197,  -197,
-     -45,  -143,   -67,   -61,  -197,  -197,  -197,  -196,    -9,   -12,
-    -151,  -197,    38,     3,  -197,  -197,   135,    -8,  -197,  -197,
-    -197,  -197,   -11,   -33,  -197,    28
+    -203,  -203,    14,    26,     3,  -178,     0,  -203,  -203,  -203,
+     -81,  -202,  -104,   -92,  -203,  -203,  -203,  -200,    -9,    23,
+    -172,  -203,    44,     5,  -203,  -203,  -203,   103,   -14,  -203,
+    -203,  -203,  -203,   -47,   -69,  -203,   -25
 };
 
 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
@@ -807,194 +811,206 @@ static const yytype_int16 yypgoto[] =
 #define YYTABLE_NINF -61
 static const yytype_int16 yytable[] =
 {
-      34,    57,    32,    41,    89,   -10,   -51,   -51,   190,   124,
-     127,   212,    47,    97,    98,   228,    83,    46,    99,   100,
-     101,   160,   102,   103,   104,   113,    91,   189,   209,   228,
-     137,   187,   139,   213,    58,   125,   128,   109,   110,   111,
-      59,    90,    51,    92,    46,    52,    53,    54,    70,   210,
-     192,   188,    67,   218,   219,    71,   -51,   222,   239,   224,
-     120,    80,    67,    84,    85,    86,    87,    88,    72,    73,
-     233,   230,    77,    63,   132,    65,    95,    96,   257,    78,
-      46,   -10,    79,   230,   114,   115,    56,   112,   113,   119,
-      34,   123,    32,    41,    54,    54,   256,    74,    75,   117,
-     116,   118,   129,   141,   161,    76,   164,   175,   177,   181,
-     198,   202,   163,   126,   203,   217,   206,   220,   223,   212,
-     240,   171,   242,   244,   245,   246,   176,   252,   253,    95,
-     138,   140,   179,   254,   247,   144,   145,   146,   147,   148,
-     149,   150,   151,   152,   153,   154,   155,   156,   157,   158,
-     255,   159,   178,   259,   136,   232,   214,   162,   236,    82,
-     185,   205,   165,   166,     0,   169,   170,   238,     0,   172,
-       0,   173,   174,     0,   197,     0,     0,   200,   201,     0,
-     180,     0,     0,     0,     0,     0,     0,   208,     0,     0,
-       0,   211,     0,   193,     0,   221,   194,     0,     0,     0,
-       0,     0,   231,     0,   229,   183,   184,     0,     0,     0,
-     234,     0,   235,   237,     0,     0,     0,     0,     0,     0,
-       0,   243,     0,     0,     0,     0,   199,   248,     0,   250,
-       0,   249,     0,     0,     0,     0,   207,     0,     0,     0,
-       0,     0,     0,     0,   260,     0,   261,     0,     0,     0,
-       0,   258,     0,     0,    95,    -6,     1,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,    95,     2,     3,     4,
+      35,    58,   141,    33,   143,    42,   195,   127,    92,   -10,
+      84,   194,   130,   -51,   -51,    48,   233,   235,   217,    75,
+      76,   214,    47,    73,    74,    47,   192,    77,   197,   235,
+     233,   164,   117,   118,   128,   116,    59,   223,   224,   131,
+     218,   227,   215,   229,    94,    93,   193,    64,    52,    66,
+      60,    53,    54,    55,   238,   123,   244,    71,    68,    78,
+      79,    72,    80,    85,   -51,   116,    57,    81,    68,   135,
+      87,    88,    89,    90,    91,    95,   262,   126,   132,   119,
+     261,   122,   136,    98,    99,    47,   -10,   165,   168,   145,
+     177,   180,   182,    35,   115,   186,    33,   203,    42,   207,
+     208,    55,    55,   211,   222,   225,   120,   228,   121,   245,
+     217,   247,   249,   250,   251,   167,   252,   257,   258,   140,
+     129,   259,   264,   260,   175,   219,   241,    83,   190,   237,
+     210,     0,     0,     0,     0,     0,   184,     0,    98,   142,
+     144,   243,     0,     0,   148,   149,   150,   151,   152,   153,
+     154,   155,   156,   157,   158,   159,   160,   161,   162,   183,
+     163,     0,     0,     0,     0,   181,   166,     0,     0,     0,
+       0,   169,   170,     0,   173,   174,     0,     0,   176,     0,
+       0,   178,   179,     0,     0,     0,     0,     0,     0,     0,
+     185,     0,     0,     0,     0,     0,   216,     0,     0,     0,
+       0,   198,     0,     0,   199,     0,     0,     0,     0,   234,
+       0,     0,     0,     0,   202,   188,   189,   205,   206,   100,
+     101,     0,     0,     0,   102,   103,   104,   213,   105,   106,
+     107,     0,     0,     0,     0,   226,   254,   204,     0,     0,
+       0,     0,   236,   112,   113,   114,     0,   212,     0,     0,
+     239,     0,   240,   242,     0,     0,   263,     0,     0,     0,
+       0,   248,     0,     0,     0,    98,     0,   253,     0,   255,
+       0,     0,     0,     0,     0,    -6,     1,    98,     0,     0,
+       0,     0,     0,     0,   265,     0,   266,     2,     3,     4,
        5,     0,     6,     7,     8,     9,    10,    11,     0,     0,
        0,     0,     0,    12,     0,    13,    14,    15,     0,     0,
       16,     0,     0,     0,     0,    17,    18,    19,     0,     0,
       20,     0,     0,     0,    21,    22,    23,    24,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     0,    25,     0,
-       0,     0,    26,     0,     0,     0,    27,    28,     0,     0,
-       0,    -6,    29,     2,     3,     4,     5,     0,     6,     7,
-       8,     9,    10,    11,     0,     0,     0,     0,     0,    12,
-       0,    13,    14,    15,     0,     0,    16,     0,     0,     0,
+      25,     0,     0,     0,     0,     0,     0,     0,     0,    26,
+       0,     0,     0,    27,     0,     0,     0,    28,    29,     0,
+       0,     0,    -6,    30,     2,     3,     4,     5,     0,     6,
+       7,     8,     9,    10,    11,     0,     0,     0,     0,     0,
+      12,     0,    13,    14,    15,     0,     0,    16,     0,     0,
+       0,     0,    17,    18,    19,     0,     0,    20,     0,     0,
+       0,    21,    22,    23,    24,     0,     0,    25,     0,     0,
+       0,     0,     0,     0,     0,     0,    26,     0,     0,     0,
+      27,     0,     0,     0,    28,    29,     2,     3,     4,     5,
+      30,     6,     7,     8,     9,    49,    11,     0,     0,     0,
+       0,     0,    12,     0,    13,    14,    15,     0,     0,     0,
+       0,     0,     0,     0,    17,    18,    19,     0,     0,    20,
+       0,     0,     0,     0,     0,    23,    24,     0,     0,    25,
+       0,     0,     0,     0,     0,     0,     0,     0,    26,     0,
+       0,     0,    27,     0,     0,     0,    28,    29,     0,     0,
+       0,    47,    30,     2,     3,     4,     5,     0,     6,     7,
+       8,     9,    49,    11,     0,     0,     0,     0,     0,    12,
+       0,    13,    14,    15,     0,     0,     0,     0,     0,     0,
        0,    17,    18,    19,     0,     0,    20,     0,     0,     0,
-      21,    22,    23,    24,     0,     0,     0,     2,     3,     4,
-       5,     0,     6,     0,    25,     0,    48,    11,    26,     0,
-       0,     0,    27,    28,     2,     3,     4,     5,    29,     6,
-       7,     8,     9,    48,    11,    49,     0,    19,     0,     0,
-      12,     0,    13,    14,    15,     0,     0,     0,     0,     0,
-       0,     0,    17,    18,    19,     0,     0,    20,    25,     0,
-       0,     0,    26,    23,    24,     0,    27,    28,     0,     0,
-       0,     0,    29,     0,     0,    25,     0,     0,     0,    26,
-       0,     0,     0,    27,    28,     0,     0,     0,    46,    29,
-       2,     3,     4,     5,     0,     6,     7,     8,     9,    48,
-      11,     0,     0,     0,     0,     0,    12,     0,    13,    14,
-      15,     0,     0,     0,     0,     0,     0,     0,    17,    18,
-      19,     0,     0,    20,     0,     0,     0,     0,     0,    23,
-      24,     0,     0,     0,     2,     3,     4,     5,     0,     6,
-       0,    25,     0,    48,    11,    26,     0,     0,     0,    27,
-      28,     2,     3,     4,     5,    29,     6,     7,     8,     9,
-      48,    11,    49,     0,    19,     0,     0,    12,     0,    13,
-      14,     0,     0,     0,     0,     0,     0,     0,     0,    17,
-       0,    19,     0,     0,     0,    25,     0,     0,     0,    26,
-      23,    24,     0,    27,    28,     2,     3,     4,     5,    93,
-       6,     0,    25,     0,    48,    11,    26,     0,     0,     0,
-      27,    28,    61,     0,     0,     0,    29,    62,     0,    63,
-      64,    65,    66,    49,     0,    19,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     2,     3,     4,     5,     0,
-       6,     0,     0,     0,    48,    11,    25,     0,     0,     0,
-      26,     0,    61,     0,    27,    28,     0,     0,     0,    63,
-      29,    65,     0,    49,     0,    19,     0,     0,     0,     0,
-     122,     0,     0,     0,     0,     0,    81,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,    25,     0,     0,     0,
-      26,     0,    97,    98,    27,    28,     0,    99,   100,   101,
-      29,   102,   103,   104,     0,     0,     0,     0,   105,   106,
-     107,   108,   167,     0,     0,     0,   109,   110,   111,     0,
-       0,     0,     0,    97,    98,     0,     0,     0,    99,   100,
-     101,     0,   102,   103,   104,     0,   131,     0,   168,   105,
-     106,   107,   108,     0,     0,    97,    98,   109,   110,   111,
-      99,   100,   101,     0,   102,   103,   104,     0,     0,     0,
-       0,   105,   106,   107,   108,     0,     0,    97,    98,   109,
-     110,   111,    99,   100,   101,     0,   102,   103,   104,     0,
-     133,   134,     0,   105,   106,   107,   108,     0,     0,    97,
-      98,   109,   110,   111,    99,   100,   101,     0,   102,   103,
-     104,     0,     0,     0,   142,   105,   106,   107,   108,     0,
-       0,     0,   135,   109,   110,   111,    97,    98,     0,     0,
-       0,    99,   100,   101,     0,   102,   103,   104,     0,     0,
-       0,     0,   105,   106,   107,   108,     0,     0,     0,   135,
-     109,   110,   111,    97,    98,     0,     0,     0,    99,   100,
-     101,     0,   102,   103,   104,     0,     0,     0,   142,   105,
-     106,   107,   108,     0,     0,    97,    98,   109,   110,   111,
-      99,   100,   101,     0,   102,   103,   104,     0,     0,     0,
-       0,   105,   106,   107,   108,     0,     0,   -60,   -60,   109,
-     110,   111,   -60,   -60,   -60,     0,   -60,   -60,   -60,     0,
-       0,     0,     0,     0,     0,   -60,   -60,     0,     0,    56,
-       0,   -60,   -60,   -60,    97,    98,     0,     0,     0,    99,
-     100,   101,     0,   102,   103,   104,     0,     0,     0,     0,
-       0,     0,   107,   108,     0,     0,     0,     0,   109,   110,
-     111
+       0,     0,    23,    24,     0,     0,    25,     0,     0,     0,
+       0,     0,     0,     0,     0,    26,     0,     0,     0,    27,
+       0,     0,     0,    28,    29,     2,     3,     4,     5,    30,
+       6,     7,     8,     9,    49,    11,     0,     0,     0,     0,
+       0,    12,     0,    13,    14,     0,     0,     0,     0,     0,
+       0,     0,     0,    17,     0,    19,     0,     0,     0,     0,
+       0,     0,     0,     0,    23,    24,     0,     0,    25,     0,
+       2,     3,     4,     5,     0,     6,     0,    26,     0,    49,
+      11,    27,     0,     0,     0,    28,    29,    62,     0,     0,
+       0,    30,    63,     0,    64,    65,    66,    67,    50,     0,
+      19,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+       0,     2,     3,     4,     5,     0,     6,     0,     0,     0,
+      49,    11,    26,     0,     0,     0,    27,     0,    62,     0,
+      28,    29,     0,     0,     0,    64,    30,    66,     0,    50,
+       0,    19,     0,     0,     0,     2,     3,     4,     5,     0,
+       6,     0,    82,     0,    49,    11,     2,     3,     4,     5,
+       0,     6,     0,    26,     0,    49,    11,    27,     0,     0,
+       0,    28,    29,    50,     0,    19,     0,    30,     0,     0,
+       0,     0,     0,     0,    50,     0,    19,     0,     0,     0,
+       0,   125,     0,     0,     0,     0,     0,    26,     0,     0,
+       0,    27,     0,     0,     0,    28,    29,     0,    26,     0,
+       0,    30,    27,     0,   100,   101,    28,    29,     0,   102,
+     103,   104,    96,   105,   106,   107,     0,     0,     0,   171,
+     108,   109,   110,   111,     0,     0,     0,     0,   112,   113,
+     114,   100,   101,     0,     0,     0,   102,   103,   104,     0,
+     105,   106,   107,   134,     0,     0,   172,   108,   109,   110,
+     111,     0,     0,   100,   101,   112,   113,   114,   102,   103,
+     104,     0,   105,   106,   107,     0,     0,     0,     0,   108,
+     109,   110,   111,     0,     0,   100,   101,   112,   113,   114,
+     102,   103,   104,     0,   105,   106,   107,     0,   137,   138,
+       0,   108,   109,   110,   111,     0,     0,   100,   101,   112,
+     113,   114,   102,   103,   104,     0,   105,   106,   107,     0,
+       0,     0,   146,   108,   109,   110,   111,     0,     0,     0,
+     139,   112,   113,   114,   100,   101,     0,     0,     0,   102,
+     103,   104,     0,   105,   106,   107,     0,     0,     0,     0,
+     108,   109,   110,   111,     0,     0,     0,   139,   112,   113,
+     114,   100,   101,     0,     0,     0,   102,   103,   104,     0,
+     105,   106,   107,     0,     0,     0,   146,   108,   109,   110,
+     111,     0,     0,   100,   101,   112,   113,   114,   102,   103,
+     104,     0,   105,   106,   107,     0,     0,     0,     0,   108,
+     109,   110,   111,     0,     0,   -60,   -60,   112,   113,   114,
+     -60,   -60,   -60,     0,   -60,   -60,   -60,     0,     0,     0,
+       0,     0,     0,   -60,   -60,     0,     0,    57,     0,   -60,
+     -60,   -60,   100,   101,     0,     0,     0,   102,   103,   104,
+       0,   105,   106,   107,     0,     0,     0,     0,     0,     0,
+     110,   111,     0,     0,     0,     0,   112,   113,   114
 };
 
 static const yytype_int16 yycheck[] =
 {
-       0,    10,     0,     0,     0,     0,    26,    27,   179,    44,
-      44,    26,     1,    55,    56,   211,    24,    76,    60,    61,
-      62,    78,    64,    65,    66,    82,    77,   178,    27,   225,
-      91,    24,    93,    48,    41,    70,    70,    79,    80,    81,
-      21,    30,     4,    70,    76,     7,     8,     9,    21,    48,
-      82,    44,    14,   204,   205,    17,    76,   208,   229,   210,
-      68,    23,    24,    25,    26,    27,    28,    29,    46,    47,
-     221,   214,    21,    36,    82,    38,    38,    39,   249,    21,
-      76,    76,    21,   226,    56,    57,    77,    49,    82,    36,
-      90,    21,    90,    90,    56,    57,   247,    13,    14,    61,
-      82,    63,    43,    43,    21,    21,    21,    78,    78,    21,
-      44,    21,   121,    75,    82,    21,    27,    41,    32,    26,
-      48,   130,    43,    27,    27,    27,   138,    27,    41,    91,
-      92,    93,   141,    32,    43,    97,    98,    99,   100,   101,
-     102,   103,   104,   105,   106,   107,   108,   109,   110,   111,
-      32,   113,   141,    41,    90,   216,   201,   119,   225,    24,
-     171,   194,   124,   125,    -1,   127,   128,   228,    -1,   131,
-      -1,   133,   134,    -1,   186,    -1,    -1,   189,   190,    -1,
-     142,    -1,    -1,    -1,    -1,    -1,    -1,   199,    -1,    -1,
-      -1,   200,    -1,   182,    -1,   207,   185,    -1,    -1,    -1,
-      -1,    -1,   214,    -1,   213,   167,   168,    -1,    -1,    -1,
-     222,    -1,   224,   225,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,   233,    -1,    -1,    -1,    -1,   188,   239,    -1,   241,
-      -1,   240,    -1,    -1,    -1,    -1,   198,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,   256,    -1,   258,    -1,    -1,    -1,
-      -1,   251,    -1,    -1,   216,     0,     1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,   228,    12,    13,    14,
+       0,    10,    94,     0,    96,     0,   184,    44,     0,     0,
+      24,   183,    44,    26,    27,     1,   216,   219,    26,    13,
+      14,    27,    77,    46,    47,    77,    24,    21,    83,   231,
+     230,    79,    57,    58,    71,    83,    41,   209,   210,    71,
+      48,   213,    48,   215,    78,    31,    44,    36,     4,    38,
+      21,     7,     8,     9,   226,    69,   234,    21,    14,    21,
+      21,    17,    21,    21,    77,    83,    78,    23,    24,    83,
+      26,    27,    28,    29,    30,    71,   254,    21,    43,    83,
+     252,    36,    83,    39,    40,    77,    77,    21,    21,    43,
+      21,    79,    79,    93,    50,    21,    93,    44,    93,    21,
+      83,    57,    58,    27,    21,    41,    62,    32,    64,    48,
+      26,    43,    27,    27,    27,   124,    43,    27,    41,    93,
+      76,    32,    41,    32,   133,   206,   230,    24,   175,   221,
+     199,    -1,    -1,    -1,    -1,    -1,   145,    -1,    94,    95,
+      96,   233,    -1,    -1,   100,   101,   102,   103,   104,   105,
+     106,   107,   108,   109,   110,   111,   112,   113,   114,   145,
+     116,    -1,    -1,    -1,    -1,   142,   122,    -1,    -1,    -1,
+      -1,   127,   128,    -1,   130,   131,    -1,    -1,   134,    -1,
+      -1,   137,   138,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     146,    -1,    -1,    -1,    -1,    -1,   205,    -1,    -1,    -1,
+      -1,   187,    -1,    -1,   190,    -1,    -1,    -1,    -1,   218,
+      -1,    -1,    -1,    -1,   191,   171,   172,   194,   195,    56,
+      57,    -1,    -1,    -1,    61,    62,    63,   204,    65,    66,
+      67,    -1,    -1,    -1,    -1,   212,   245,   193,    -1,    -1,
+      -1,    -1,   219,    80,    81,    82,    -1,   203,    -1,    -1,
+     227,    -1,   229,   230,    -1,    -1,   256,    -1,    -1,    -1,
+      -1,   238,    -1,    -1,    -1,   221,    -1,   244,    -1,   246,
+      -1,    -1,    -1,    -1,    -1,     0,     1,   233,    -1,    -1,
+      -1,    -1,    -1,    -1,   261,    -1,   263,    12,    13,    14,
       15,    -1,    17,    18,    19,    20,    21,    22,    -1,    -1,
       -1,    -1,    -1,    28,    -1,    30,    31,    32,    -1,    -1,
       35,    -1,    -1,    -1,    -1,    40,    41,    42,    -1,    -1,
       45,    -1,    -1,    -1,    49,    50,    51,    52,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    63,    -1,
-      -1,    -1,    67,    -1,    -1,    -1,    71,    72,    -1,    -1,
-      -1,    76,    77,    12,    13,    14,    15,    -1,    17,    18,
+      55,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    64,
+      -1,    -1,    -1,    68,    -1,    -1,    -1,    72,    73,    -1,
+      -1,    -1,    77,    78,    12,    13,    14,    15,    -1,    17,
+      18,    19,    20,    21,    22,    -1,    -1,    -1,    -1,    -1,
+      28,    -1,    30,    31,    32,    -1,    -1,    35,    -1,    -1,
+      -1,    -1,    40,    41,    42,    -1,    -1,    45,    -1,    -1,
+      -1,    49,    50,    51,    52,    -1,    -1,    55,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    64,    -1,    -1,    -1,
+      68,    -1,    -1,    -1,    72,    73,    12,    13,    14,    15,
+      78,    17,    18,    19,    20,    21,    22,    -1,    -1,    -1,
+      -1,    -1,    28,    -1,    30,    31,    32,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    40,    41,    42,    -1,    -1,    45,
+      -1,    -1,    -1,    -1,    -1,    51,    52,    -1,    -1,    55,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    64,    -1,
+      -1,    -1,    68,    -1,    -1,    -1,    72,    73,    -1,    -1,
+      -1,    77,    78,    12,    13,    14,    15,    -1,    17,    18,
       19,    20,    21,    22,    -1,    -1,    -1,    -1,    -1,    28,
-      -1,    30,    31,    32,    -1,    -1,    35,    -1,    -1,    -1,
+      -1,    30,    31,    32,    -1,    -1,    -1,    -1,    -1,    -1,
       -1,    40,    41,    42,    -1,    -1,    45,    -1,    -1,    -1,
-      49,    50,    51,    52,    -1,    -1,    -1,    12,    13,    14,
-      15,    -1,    17,    -1,    63,    -1,    21,    22,    67,    -1,
-      -1,    -1,    71,    72,    12,    13,    14,    15,    77,    17,
-      18,    19,    20,    21,    22,    40,    -1,    42,    -1,    -1,
-      28,    -1,    30,    31,    32,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    40,    41,    42,    -1,    -1,    45,    63,    -1,
-      -1,    -1,    67,    51,    52,    -1,    71,    72,    -1,    -1,
-      -1,    -1,    77,    -1,    -1,    63,    -1,    -1,    -1,    67,
-      -1,    -1,    -1,    71,    72,    -1,    -1,    -1,    76,    77,
-      12,    13,    14,    15,    -1,    17,    18,    19,    20,    21,
-      22,    -1,    -1,    -1,    -1,    -1,    28,    -1,    30,    31,
-      32,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    40,    41,
-      42,    -1,    -1,    45,    -1,    -1,    -1,    -1,    -1,    51,
-      52,    -1,    -1,    -1,    12,    13,    14,    15,    -1,    17,
-      -1,    63,    -1,    21,    22,    67,    -1,    -1,    -1,    71,
-      72,    12,    13,    14,    15,    77,    17,    18,    19,    20,
-      21,    22,    40,    -1,    42,    -1,    -1,    28,    -1,    30,
-      31,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    40,
-      -1,    42,    -1,    -1,    -1,    63,    -1,    -1,    -1,    67,
-      51,    52,    -1,    71,    72,    12,    13,    14,    15,    77,
-      17,    -1,    63,    -1,    21,    22,    67,    -1,    -1,    -1,
-      71,    72,    29,    -1,    -1,    -1,    77,    34,    -1,    36,
-      37,    38,    39,    40,    -1,    42,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    12,    13,    14,    15,    -1,
-      17,    -1,    -1,    -1,    21,    22,    63,    -1,    -1,    -1,
-      67,    -1,    29,    -1,    71,    72,    -1,    -1,    -1,    36,
-      77,    38,    -1,    40,    -1,    42,    -1,    -1,    -1,    -1,
-      33,    -1,    -1,    -1,    -1,    -1,    53,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    63,    -1,    -1,    -1,
-      67,    -1,    55,    56,    71,    72,    -1,    60,    61,    62,
-      77,    64,    65,    66,    -1,    -1,    -1,    -1,    71,    72,
-      73,    74,    44,    -1,    -1,    -1,    79,    80,    81,    -1,
-      -1,    -1,    -1,    55,    56,    -1,    -1,    -1,    60,    61,
-      62,    -1,    64,    65,    66,    -1,    46,    -1,    70,    71,
-      72,    73,    74,    -1,    -1,    55,    56,    79,    80,    81,
-      60,    61,    62,    -1,    64,    65,    66,    -1,    -1,    -1,
-      -1,    71,    72,    73,    74,    -1,    -1,    55,    56,    79,
-      80,    81,    60,    61,    62,    -1,    64,    65,    66,    -1,
-      68,    69,    -1,    71,    72,    73,    74,    -1,    -1,    55,
-      56,    79,    80,    81,    60,    61,    62,    -1,    64,    65,
-      66,    -1,    -1,    -1,    70,    71,    72,    73,    74,    -1,
-      -1,    -1,    78,    79,    80,    81,    55,    56,    -1,    -1,
-      -1,    60,    61,    62,    -1,    64,    65,    66,    -1,    -1,
-      -1,    -1,    71,    72,    73,    74,    -1,    -1,    -1,    78,
-      79,    80,    81,    55,    56,    -1,    -1,    -1,    60,    61,
-      62,    -1,    64,    65,    66,    -1,    -1,    -1,    70,    71,
-      72,    73,    74,    -1,    -1,    55,    56,    79,    80,    81,
-      60,    61,    62,    -1,    64,    65,    66,    -1,    -1,    -1,
-      -1,    71,    72,    73,    74,    -1,    -1,    55,    56,    79,
-      80,    81,    60,    61,    62,    -1,    64,    65,    66,    -1,
-      -1,    -1,    -1,    -1,    -1,    73,    74,    -1,    -1,    77,
-      -1,    79,    80,    81,    55,    56,    -1,    -1,    -1,    60,
-      61,    62,    -1,    64,    65,    66,    -1,    -1,    -1,    -1,
-      -1,    -1,    73,    74,    -1,    -1,    -1,    -1,    79,    80,
-      81
+      -1,    -1,    51,    52,    -1,    -1,    55,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    64,    -1,    -1,    -1,    68,
+      -1,    -1,    -1,    72,    73,    12,    13,    14,    15,    78,
+      17,    18,    19,    20,    21,    22,    -1,    -1,    -1,    -1,
+      -1,    28,    -1,    30,    31,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    40,    -1,    42,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    51,    52,    -1,    -1,    55,    -1,
+      12,    13,    14,    15,    -1,    17,    -1,    64,    -1,    21,
+      22,    68,    -1,    -1,    -1,    72,    73,    29,    -1,    -1,
+      -1,    78,    34,    -1,    36,    37,    38,    39,    40,    -1,
+      42,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    12,    13,    14,    15,    -1,    17,    -1,    -1,    -1,
+      21,    22,    64,    -1,    -1,    -1,    68,    -1,    29,    -1,
+      72,    73,    -1,    -1,    -1,    36,    78,    38,    -1,    40,
+      -1,    42,    -1,    -1,    -1,    12,    13,    14,    15,    -1,
+      17,    -1,    53,    -1,    21,    22,    12,    13,    14,    15,
+      -1,    17,    -1,    64,    -1,    21,    22,    68,    -1,    -1,
+      -1,    72,    73,    40,    -1,    42,    -1,    78,    -1,    -1,
+      -1,    -1,    -1,    -1,    40,    -1,    42,    -1,    -1,    -1,
+      -1,    33,    -1,    -1,    -1,    -1,    -1,    64,    -1,    -1,
+      -1,    68,    -1,    -1,    -1,    72,    73,    -1,    64,    -1,
+      -1,    78,    68,    -1,    56,    57,    72,    73,    -1,    61,
+      62,    63,    78,    65,    66,    67,    -1,    -1,    -1,    44,
+      72,    73,    74,    75,    -1,    -1,    -1,    -1,    80,    81,
+      82,    56,    57,    -1,    -1,    -1,    61,    62,    63,    -1,
+      65,    66,    67,    46,    -1,    -1,    71,    72,    73,    74,
+      75,    -1,    -1,    56,    57,    80,    81,    82,    61,    62,
+      63,    -1,    65,    66,    67,    -1,    -1,    -1,    -1,    72,
+      73,    74,    75,    -1,    -1,    56,    57,    80,    81,    82,
+      61,    62,    63,    -1,    65,    66,    67,    -1,    69,    70,
+      -1,    72,    73,    74,    75,    -1,    -1,    56,    57,    80,
+      81,    82,    61,    62,    63,    -1,    65,    66,    67,    -1,
+      -1,    -1,    71,    72,    73,    74,    75,    -1,    -1,    -1,
+      79,    80,    81,    82,    56,    57,    -1,    -1,    -1,    61,
+      62,    63,    -1,    65,    66,    67,    -1,    -1,    -1,    -1,
+      72,    73,    74,    75,    -1,    -1,    -1,    79,    80,    81,
+      82,    56,    57,    -1,    -1,    -1,    61,    62,    63,    -1,
+      65,    66,    67,    -1,    -1,    -1,    71,    72,    73,    74,
+      75,    -1,    -1,    56,    57,    80,    81,    82,    61,    62,
+      63,    -1,    65,    66,    67,    -1,    -1,    -1,    -1,    72,
+      73,    74,    75,    -1,    -1,    56,    57,    80,    81,    82,
+      61,    62,    63,    -1,    65,    66,    67,    -1,    -1,    -1,
+      -1,    -1,    -1,    74,    75,    -1,    -1,    78,    -1,    80,
+      81,    82,    56,    57,    -1,    -1,    -1,    61,    62,    63,
+      -1,    65,    66,    67,    -1,    -1,    -1,    -1,    -1,    -1,
+      74,    75,    -1,    -1,    -1,    -1,    80,    81,    82
 };
 
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -1003,31 +1019,31 @@ static const yytype_uint8 yystos[] =
 {
        0,     1,    12,    13,    14,    15,    17,    18,    19,    20,
       21,    22,    28,    30,    31,    32,    35,    40,    41,    42,
-      45,    49,    50,    51,    52,    63,    67,    71,    72,    77,
-      84,    86,    87,    88,    89,    90,    97,    98,    99,   104,
-     105,   106,   108,   111,   112,   117,    76,    85,    21,    40,
-      87,   105,   105,   105,   105,   118,    77,   101,    41,    21,
-     107,    29,    34,    36,    37,    38,    39,   105,   109,   110,
-      21,   105,    46,    47,    13,    14,    21,    21,    21,    21,
-     105,    53,   109,   110,   105,   105,   105,   105,   105,     0,
-      85,    77,    70,    77,    96,   105,   105,    55,    56,    60,
-      61,    62,    64,    65,    66,    71,    72,    73,    74,    79,
-      80,    81,   105,    82,   118,   118,    82,   105,   105,    36,
-     110,   113,    33,    21,    44,    70,   105,    44,    70,    43,
-     114,    46,   110,    68,    69,    78,    86,    96,   105,    96,
-     105,    43,    70,   102,   105,   105,   105,   105,   105,   105,
-     105,   105,   105,   105,   105,   105,   105,   105,   105,   105,
-      78,    21,   105,   101,    21,   105,   105,    44,    70,   105,
-     105,   101,   105,   105,   105,    78,   102,    78,    85,   101,
-     105,    21,   115,   105,   105,   115,   103,    24,    44,   103,
-      88,   106,    82,    85,    85,    85,    89,   102,    44,   105,
-     102,   102,    21,    82,   116,   116,    27,   105,   102,    27,
-      48,   101,    26,    48,    93,    94,   100,    21,   103,   103,
-      41,   102,   103,    32,   103,    92,    93,    95,   100,   101,
-      94,   102,    96,   103,   102,   102,    95,   102,    96,    88,
-      48,    91,    43,   102,    27,    27,    27,    43,   102,   101,
-     102,   101,    27,    41,    32,    32,   103,    88,    89,    41,
-     102,   102
+      45,    49,    50,    51,    52,    55,    64,    68,    72,    73,
+      78,    85,    87,    88,    89,    90,    91,    98,    99,   100,
+     105,   106,   107,   110,   113,   114,   119,    77,    86,    21,
+      40,    88,   106,   106,   106,   106,   120,    78,   102,    41,
+      21,   108,    29,    34,    36,    37,    38,    39,   106,   111,
+     112,    21,   106,    46,    47,    13,    14,    21,    21,    21,
+      21,   106,    53,   111,   112,    21,   109,   106,   106,   106,
+     106,   106,     0,    86,    78,    71,    78,    97,   106,   106,
+      56,    57,    61,    62,    63,    65,    66,    67,    72,    73,
+      74,    75,    80,    81,    82,   106,    83,   120,   120,    83,
+     106,   106,    36,   112,   115,    33,    21,    44,    71,   106,
+      44,    71,    43,   116,    46,   112,    83,    69,    70,    79,
+      87,    97,   106,    97,   106,    43,    71,   103,   106,   106,
+     106,   106,   106,   106,   106,   106,   106,   106,   106,   106,
+     106,   106,   106,   106,    79,    21,   106,   102,    21,   106,
+     106,    44,    71,   106,   106,   102,   106,    21,   106,   106,
+      79,   103,    79,    86,   102,   106,    21,   117,   106,   106,
+     117,   104,    24,    44,   104,    89,   107,    83,    86,    86,
+      86,    90,   103,    44,   106,   103,   103,    21,    83,   118,
+     118,    27,   106,   103,    27,    48,   102,    26,    48,    94,
+      95,   101,    21,   104,   104,    41,   103,   104,    32,   104,
+      93,    94,    96,   101,   102,    95,   103,    97,   104,   103,
+     103,    96,   103,    97,    89,    48,    92,    43,   103,    27,
+      27,    27,    43,   103,   102,   103,   102,    27,    41,    32,
+      32,   104,    89,    90,    41,   103,   103
 };
 
 #define yyerrok		(yyerrstatus = 0)
@@ -2354,121 +2370,131 @@ yyreduce:
 							  g_lingo->code1(g_lingo->c_procret); ;}
     break;
 
-  case 91:
-#line 415 "engines/director/lingo/lingo-gr.y"
+  case 92:
+#line 416 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->code1(g_lingo->_handlers[*(yyvsp[(1) - (2)].s)]->u.func);
 		delete (yyvsp[(1) - (2)].s); ;}
     break;
 
-  case 92:
-#line 418 "engines/director/lingo/lingo-gr.y"
+  case 93:
+#line 419 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->code1(g_lingo->_handlers[*(yyvsp[(1) - (2)].s)]->u.func);
 		delete (yyvsp[(1) - (2)].s); ;}
     break;
 
-  case 93:
-#line 421 "engines/director/lingo/lingo-gr.y"
+  case 94:
+#line 422 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->code2(g_lingo->c_voidpush, g_lingo->_handlers[*(yyvsp[(1) - (1)].s)]->u.func);
 		delete (yyvsp[(1) - (1)].s); ;}
     break;
 
-  case 94:
-#line 424 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->codeFunc((yyvsp[(1) - (2)].s), (yyvsp[(2) - (2)].narg)); ;}
-    break;
-
   case 95:
 #line 425 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_open); ;}
+    { g_lingo->codeFunc((yyvsp[(1) - (2)].s), (yyvsp[(2) - (2)].narg)); ;}
     break;
 
   case 96:
 #line 426 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code2(g_lingo->c_voidpush, g_lingo->c_open); ;}
+    { g_lingo->code1(g_lingo->c_open); ;}
     break;
 
   case 97:
-#line 429 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_global); g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); delete (yyvsp[(1) - (1)].s); ;}
+#line 427 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->code2(g_lingo->c_voidpush, g_lingo->c_open); ;}
     break;
 
   case 98:
 #line 430 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_global); g_lingo->codeString((yyvsp[(3) - (3)].s)->c_str()); delete (yyvsp[(3) - (3)].s); ;}
+    { g_lingo->code1(g_lingo->c_global); g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); delete (yyvsp[(1) - (1)].s); ;}
     break;
 
   case 99:
-#line 441 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_gotoloop); ;}
+#line 431 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->code1(g_lingo->c_global); g_lingo->codeString((yyvsp[(3) - (3)].s)->c_str()); delete (yyvsp[(3) - (3)].s); ;}
     break;
 
   case 100:
-#line 442 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_gotonext); ;}
+#line 434 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->code1(g_lingo->c_instance); g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); delete (yyvsp[(1) - (1)].s); ;}
     break;
 
   case 101:
-#line 443 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_gotoprevious); ;}
+#line 435 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->code1(g_lingo->c_instance); g_lingo->codeString((yyvsp[(3) - (3)].s)->c_str()); delete (yyvsp[(3) - (3)].s); ;}
     break;
 
   case 102:
-#line 444 "engines/director/lingo/lingo-gr.y"
+#line 446 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->code1(g_lingo->c_gotoloop); ;}
+    break;
+
+  case 103:
+#line 447 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->code1(g_lingo->c_gotonext); ;}
+    break;
+
+  case 104:
+#line 448 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->code1(g_lingo->c_gotoprevious); ;}
+    break;
+
+  case 105:
+#line 449 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(1);
 		g_lingo->code1(g_lingo->c_goto); ;}
     break;
 
-  case 103:
-#line 447 "engines/director/lingo/lingo-gr.y"
+  case 106:
+#line 452 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(3);
 		g_lingo->code1(g_lingo->c_goto); ;}
     break;
 
-  case 104:
-#line 450 "engines/director/lingo/lingo-gr.y"
+  case 107:
+#line 455 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(2);
 		g_lingo->code1(g_lingo->c_goto); ;}
     break;
 
-  case 109:
-#line 463 "engines/director/lingo/lingo-gr.y"
+  case 112:
+#line 468 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_playdone); ;}
     break;
 
-  case 110:
-#line 464 "engines/director/lingo/lingo-gr.y"
+  case 113:
+#line 469 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(1);
 		g_lingo->code1(g_lingo->c_play); ;}
     break;
 
-  case 111:
-#line 467 "engines/director/lingo/lingo-gr.y"
+  case 114:
+#line 472 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(3);
 		g_lingo->code1(g_lingo->c_play); ;}
     break;
 
-  case 112:
-#line 470 "engines/director/lingo/lingo-gr.y"
+  case 115:
+#line 475 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(2);
 		g_lingo->code1(g_lingo->c_play); ;}
     break;
 
-  case 113:
-#line 500 "engines/director/lingo/lingo-gr.y"
+  case 116:
+#line 505 "engines/director/lingo/lingo-gr.y"
     { g_lingo->_indef = true; g_lingo->_currentFactory.clear(); ;}
     break;
 
-  case 114:
-#line 501 "engines/director/lingo/lingo-gr.y"
+  case 117:
+#line 506 "engines/director/lingo/lingo-gr.y"
     {
 			g_lingo->codeConst(0); // Push fake value on stack
 			g_lingo->code1(g_lingo->c_procret);
@@ -2476,53 +2502,53 @@ yyreduce:
 			g_lingo->_indef = false; ;}
     break;
 
-  case 115:
-#line 506 "engines/director/lingo/lingo-gr.y"
+  case 118:
+#line 511 "engines/director/lingo/lingo-gr.y"
     {
 			g_lingo->codeFactory(*(yyvsp[(2) - (2)].s));
 		;}
     break;
 
-  case 116:
-#line 509 "engines/director/lingo/lingo-gr.y"
+  case 119:
+#line 514 "engines/director/lingo/lingo-gr.y"
     { g_lingo->_indef = true; ;}
     break;
 
-  case 117:
-#line 510 "engines/director/lingo/lingo-gr.y"
+  case 120:
+#line 515 "engines/director/lingo/lingo-gr.y"
     {
 			g_lingo->code1(g_lingo->c_procret);
 			g_lingo->define(*(yyvsp[(2) - (8)].s), (yyvsp[(4) - (8)].code), (yyvsp[(5) - (8)].narg) + 1, &g_lingo->_currentFactory);
 			g_lingo->_indef = false; ;}
     break;
 
-  case 118:
-#line 514 "engines/director/lingo/lingo-gr.y"
+  case 121:
+#line 519 "engines/director/lingo/lingo-gr.y"
     { (yyval.narg) = 0; ;}
     break;
 
-  case 119:
-#line 515 "engines/director/lingo/lingo-gr.y"
+  case 122:
+#line 520 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeArg((yyvsp[(1) - (1)].s)); (yyval.narg) = 1; ;}
     break;
 
-  case 120:
-#line 516 "engines/director/lingo/lingo-gr.y"
+  case 123:
+#line 521 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeArg((yyvsp[(3) - (3)].s)); (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}
     break;
 
-  case 121:
-#line 517 "engines/director/lingo/lingo-gr.y"
+  case 124:
+#line 522 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeArg((yyvsp[(4) - (4)].s)); (yyval.narg) = (yyvsp[(1) - (4)].narg) + 1; ;}
     break;
 
-  case 122:
-#line 519 "engines/director/lingo/lingo-gr.y"
+  case 125:
+#line 524 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeArgStore(); ;}
     break;
 
-  case 123:
-#line 523 "engines/director/lingo/lingo-gr.y"
+  case 126:
+#line 528 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->code1(g_lingo->c_call);
 		g_lingo->codeString((yyvsp[(1) - (3)].s)->c_str());
@@ -2531,24 +2557,24 @@ yyreduce:
 		g_lingo->code1(numpar); ;}
     break;
 
-  case 124:
-#line 531 "engines/director/lingo/lingo-gr.y"
+  case 127:
+#line 536 "engines/director/lingo/lingo-gr.y"
     { (yyval.narg) = 0; ;}
     break;
 
-  case 125:
-#line 532 "engines/director/lingo/lingo-gr.y"
+  case 128:
+#line 537 "engines/director/lingo/lingo-gr.y"
     { (yyval.narg) = 1; ;}
     break;
 
-  case 126:
-#line 533 "engines/director/lingo/lingo-gr.y"
+  case 129:
+#line 538 "engines/director/lingo/lingo-gr.y"
     { (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}
     break;
 
 
 /* Line 1267 of yacc.c.  */
-#line 2552 "engines/director/lingo/lingo-gr.cpp"
+#line 2578 "engines/director/lingo/lingo-gr.cpp"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2762,6 +2788,6 @@ yyreturn:
 }
 
 
-#line 536 "engines/director/lingo/lingo-gr.y"
+#line 541 "engines/director/lingo/lingo-gr.y"
 
 
diff --git a/engines/director/lingo/lingo-gr.h b/engines/director/lingo/lingo-gr.h
index 49bd8b5..34e311c 100644
--- a/engines/director/lingo/lingo-gr.h
+++ b/engines/director/lingo/lingo-gr.h
@@ -91,21 +91,22 @@
      tPLAY = 307,
      tDONE = 308,
      tPLAYACCEL = 309,
-     tGE = 310,
-     tLE = 311,
-     tGT = 312,
-     tLT = 313,
-     tEQ = 314,
-     tNEQ = 315,
-     tAND = 316,
-     tOR = 317,
-     tNOT = 318,
-     tCONCAT = 319,
-     tCONTAINS = 320,
-     tSTARTS = 321,
-     tSPRITE = 322,
-     tINTERSECTS = 323,
-     tWITHIN = 324
+     tINSTANCE = 310,
+     tGE = 311,
+     tLE = 312,
+     tGT = 313,
+     tLT = 314,
+     tEQ = 315,
+     tNEQ = 316,
+     tAND = 317,
+     tOR = 318,
+     tNOT = 319,
+     tCONCAT = 320,
+     tCONTAINS = 321,
+     tSTARTS = 322,
+     tSPRITE = 323,
+     tINTERSECTS = 324,
+     tWITHIN = 325
    };
 #endif
 /* Tokens.  */
@@ -161,21 +162,22 @@
 #define tPLAY 307
 #define tDONE 308
 #define tPLAYACCEL 309
-#define tGE 310
-#define tLE 311
-#define tGT 312
-#define tLT 313
-#define tEQ 314
-#define tNEQ 315
-#define tAND 316
-#define tOR 317
-#define tNOT 318
-#define tCONCAT 319
-#define tCONTAINS 320
-#define tSTARTS 321
-#define tSPRITE 322
-#define tINTERSECTS 323
-#define tWITHIN 324
+#define tINSTANCE 310
+#define tGE 311
+#define tLE 312
+#define tGT 313
+#define tLT 314
+#define tEQ 315
+#define tNEQ 316
+#define tAND 317
+#define tOR 318
+#define tNOT 319
+#define tCONCAT 320
+#define tCONTAINS 321
+#define tSTARTS 322
+#define tSPRITE 323
+#define tINTERSECTS 324
+#define tWITHIN 325
 
 
 
@@ -193,7 +195,7 @@ typedef union YYSTYPE
 	Common::Array<double> *arr;
 }
 /* Line 1529 of yacc.c.  */
-#line 197 "engines/director/lingo/lingo-gr.hpp"
+#line 199 "engines/director/lingo/lingo-gr.hpp"
 	YYSTYPE;
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y
index aff4199..8fa273b 100644
--- a/engines/director/lingo/lingo-gr.y
+++ b/engines/director/lingo/lingo-gr.y
@@ -85,7 +85,7 @@ void yyerror(char *s) {
 %token<s> ID STRING HANDLER
 %token tDOWN tELSE tNLELSIF tEND tEXIT tFRAME tGLOBAL tGO tIF tINTO tLOOP tMACRO
 %token tMOVIE tNEXT tOF tPREVIOUS tPUT tREPEAT tSET tTHEN tTO tWHEN
-%token tWITH tWHILE tNLELSE tFACTORY tMETHOD tOPEN tPLAY tDONE tPLAYACCEL
+%token tWITH tWHILE tNLELSE tFACTORY tMETHOD tOPEN tPLAY tDONE tPLAYACCEL tINSTANCE
 %token tGE tLE tGT tLT tEQ tNEQ tAND tOR tNOT
 %token tCONCAT tCONTAINS tSTARTS
 %token tSPRITE tINTERSECTS tWITHIN
@@ -412,6 +412,7 @@ func: tPUT expr				{ g_lingo->code1(g_lingo->c_printtop); }
 	| tEXIT					{ g_lingo->codeConst(0); // Push fake value on stack
 							  g_lingo->code1(g_lingo->c_procret); }
 	| tGLOBAL globallist
+	| tINSTANCE instancelist
 	| BLTINONEARG expr		{
 		g_lingo->code1(g_lingo->_handlers[*$1]->u.func);
 		delete $1; }
@@ -430,6 +431,10 @@ globallist: ID				{ g_lingo->code1(g_lingo->c_global); g_lingo->codeString($1->c
 	| globallist ',' ID		{ g_lingo->code1(g_lingo->c_global); g_lingo->codeString($3->c_str()); delete $3; }
 	;
 
+instancelist: ID				{ g_lingo->code1(g_lingo->c_instance); g_lingo->codeString($1->c_str()); delete $1; }
+	| instancelist ',' ID		{ g_lingo->code1(g_lingo->c_instance); g_lingo->codeString($3->c_str()); delete $3; }
+	;
+
 // go {to} {frame} whichFrame {of movie whichMovie}
 // go {to} {frame "Open23" of} movie whichMovie
 // go loop
diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp
index 6953c2b..426c6ce 100644
--- a/engines/director/lingo/lingo-lex.cpp
+++ b/engines/director/lingo/lingo-lex.cpp
@@ -364,8 +364,8 @@ static void yy_fatal_error (yyconst char msg[]  );
 	*yy_cp = '\0'; \
 	(yy_c_buf_p) = yy_cp;
 
-#define YY_NUM_RULES 57
-#define YY_END_OF_BUFFER 58
+#define YY_NUM_RULES 58
+#define YY_END_OF_BUFFER 59
 /* This struct is not used in this scanner,
    but its presence is necessary. */
 struct yy_trans_info
@@ -373,30 +373,31 @@ struct yy_trans_info
 	flex_int32_t yy_verify;
 	flex_int32_t yy_nxt;
 	};
-static yyconst flex_int16_t yy_accept[199] =
+static yyconst flex_int16_t yy_accept[205] =
     {   0,
-        0,    0,   58,   56,    3,   54,   54,   56,   56,   53,
-       53,   53,   52,   53,   53,   50,   50,   50,   50,   50,
-       50,   50,   50,   50,   50,   50,   50,   50,   50,   50,
-       50,   50,    2,    2,    3,   54,    0,    0,    0,    0,
-        0,   55,   49,    1,   51,   52,   48,   46,   47,   50,
-       50,   50,   50,   50,   50,   50,   50,   50,   50,   18,
-        8,   50,   50,   50,   50,   50,   50,   50,   27,   50,
-       29,   50,   50,   50,   50,   50,   50,   50,   50,   40,
-       50,   50,    2,    2,    0,    1,   51,    4,   50,   50,
-       50,   50,   12,   50,   50,   50,   50,    0,   50,   50,
-
-       50,   50,   50,   50,   26,   50,   50,   50,   32,   50,
-       34,   50,   50,   50,   50,   50,   50,    0,   50,    6,
-        7,   11,   14,   50,   50,   50,    0,   50,   20,   21,
-       50,   50,   50,   25,   28,   30,   50,   50,   50,   50,
-        0,   39,   44,   50,   42,   10,   50,   50,   15,   50,
-       17,   50,   22,   50,   24,   50,   50,   50,   50,   38,
-       38,   45,   50,    0,   50,   50,   16,   50,   23,   50,
-       33,   41,   35,    0,   38,   43,    0,   50,   13,   50,
-       50,    0,   38,    9,    5,   50,   31,    0,   38,   50,
-        0,    0,   19,   37,    0,    0,   36,    0
-
+        0,    0,   59,   57,    3,   55,   55,   57,   57,   54,
+       54,   54,   53,   54,   54,   51,   51,   51,   51,   51,
+       51,   51,   51,   51,   51,   51,   51,   51,   51,   51,
+       51,   51,    2,    2,    3,   55,    0,    0,    0,    0,
+        0,   56,   50,    1,   52,   53,   49,   47,   48,   51,
+       51,   51,   51,   51,   51,   51,   51,   51,   51,   18,
+        8,   51,   51,   51,   51,   51,   51,   51,   28,   51,
+       30,   51,   51,   51,   51,   51,   51,   51,   51,   41,
+       51,   51,    2,    2,    0,    1,   52,    4,   51,   51,
+       51,   51,   12,   51,   51,   51,   51,    0,   51,   51,
+
+       51,   51,   51,   51,   51,   27,   51,   51,   51,   33,
+       51,   35,   51,   51,   51,   51,   51,   51,    0,   51,
+        6,    7,   11,   14,   51,   51,   51,    0,   51,   51,
+       21,   22,   51,   51,   51,   26,   29,   31,   51,   51,
+       51,   51,    0,   40,   45,   51,   43,   10,   51,   51,
+       15,   51,   17,   51,   51,   23,   51,   25,   51,   51,
+       51,   51,   39,   39,   46,   51,    0,   51,   51,   16,
+       51,   51,   24,   51,   34,   42,   36,    0,   39,   44,
+        0,   51,   13,   51,   51,   51,    0,   39,    9,    5,
+       19,   51,   32,    0,   39,   51,    0,    0,   20,   38,
+
+        0,    0,   37,    0
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -442,61 +443,61 @@ static yyconst flex_int32_t yy_meta[63] =
         5,    5
     } ;
 
-static yyconst flex_int16_t yy_base[204] =
+static yyconst flex_int16_t yy_base[210] =
     {   0,
-        0,   61,  156,  509,   65,   69,   73,   77,  148,  509,
+        0,   61,  156,  516,   65,   69,   73,   77,  148,  516,
       104,   99,   54,   70,   91,   58,    0,   58,   59,   69,
        74,   70,   70,   71,   88,  105,  105,  110,   82,  118,
-      117,  130,  177,  181,  185,  509,  189,  193,  197,  106,
-       94,  509,  509,    0,   82,  132,  509,  509,  509,    0,
+      117,  130,  177,  181,  185,  516,  189,  193,  197,  106,
+       94,  516,  516,    0,   82,  132,  516,  516,  516,    0,
        84,  119,  169,  116,  120,  174,  186,  191,  180,  171,
-        0,  176,  182,  194,  181,  180,  181,  186,    0,  202,
-        0,  208,  205,  193,  198,  197,  204,  225,  225,    0,
-      233,  214,  258,  270,  223,    0,   80,    0,  225,  226,
-      237,  234,    0,  233,  234,  242,  260,  278,  265,  257,
-
-      258,  265,  271,  263,    0,  270,  260,  264,    0,  281,
-        0,  279,  273,  303,  280,  289,  293,  297,  303,    0,
-        0,    0,    0,  296,  307,  317,  301,  303,    0,    0,
-      308,  309,  320,    0,    0,    0,  319,  329,  313,  314,
-      347,    0,    0,  331,  332,  202,  333,  328,    0,  337,
-      509,  331,    0,  347,    0,  340,  339,  347,  341,  301,
-      372,    0,  349,  383,  357,  351,    0,  363,    0,  359,
-        0,    0,    0,  393,  399,    0,  374,  367,    0,  392,
-      373,  390,  409,  509,    0,  379,    0,  413,  420,  384,
-      422,  436,    0,  441,  408,  442,  446,  509,  488,  490,
-
-      495,  499,  503
+        0,  177,  183,  196,  182,  183,  182,  188,    0,  204,
+        0,  209,  206,  194,  201,  203,  209,  229,  227,    0,
+      233,  222,  263,  270,  226,    0,   80,    0,  226,  234,
+      234,  243,    0,  237,  243,  254,  247,  284,  251,  271,
+
+      263,  264,  271,  273,  265,    0,  274,  264,  268,    0,
+      286,    0,  283,  278,  305,  284,  287,  291,  295,  305,
+        0,    0,    0,    0,  296,  309,  314,  306,  322,  309,
+        0,    0,  314,  315,  325,    0,    0,    0,  323,  332,
+      316,  317,  350,    0,    0,  332,  336,  202,  337,  326,
+        0,  338,  516,  338,  336,    0,  343,    0,  342,  342,
+      358,  347,  212,  378,    0,  361,  388,  364,  357,    0,
+      379,  378,    0,  366,    0,    0,    0,  399,  408,    0,
+      378,  373,    0,  390,  399,  375,  397,  423,  516,    0,
+        0,  381,    0,  428,  435,  388,  441,  443,    0,  445,
+
+      415,  447,  452,  516,  495,  497,  502,  506,  510
     } ;
 
-static yyconst flex_int16_t yy_def[204] =
+static yyconst flex_int16_t yy_def[210] =
     {   0,
-      198,    1,  198,  198,  198,  198,  198,  198,  199,  198,
-      198,  198,  198,  198,  198,  200,  200,  200,  200,  200,
-      200,  200,  200,  200,  200,  200,  200,  200,  200,  200,
-      200,  200,  198,  198,  198,  198,  198,  198,  198,  198,
-      199,  198,  198,  201,  198,  198,  198,  198,  198,  200,
-      200,  200,  200,  200,  200,  200,  200,  200,  200,  200,
-      200,  200,  200,  200,  200,  200,  200,  200,  200,  200,
-      200,  200,  200,  200,  200,  200,  200,  200,  200,  200,
-      200,  200,  198,  198,  198,  201,  198,  200,  200,  200,
-      200,  200,  200,  200,  200,  200,  200,  198,  200,  200,
-
-      200,  200,  200,  200,  200,  200,  200,  200,  200,  200,
-      200,  200,  200,  200,  200,  200,  200,  198,  200,  200,
-      200,  200,  200,  200,  200,  200,  198,  200,  200,  200,
-      200,  200,  200,  200,  200,  200,  200,  200,  200,  200,
-      202,  200,  200,  200,  200,  198,  200,  200,  200,  200,
-      198,  200,  200,  200,  200,  200,  200,  200,  200,  202,
-      202,  200,  200,  198,  200,  200,  200,  200,  200,  200,
-      200,  200,  200,  198,  202,  200,  198,  200,  200,  200,
-      200,  198,  202,  198,  200,  200,  200,  198,  202,  200,
-      203,  198,  200,  203,  198,  198,  203,    0,  198,  198,
-
-      198,  198,  198
+      204,    1,  204,  204,  204,  204,  204,  204,  205,  204,
+      204,  204,  204,  204,  204,  206,  206,  206,  206,  206,
+      206,  206,  206,  206,  206,  206,  206,  206,  206,  206,
+      206,  206,  204,  204,  204,  204,  204,  204,  204,  204,
+      205,  204,  204,  207,  204,  204,  204,  204,  204,  206,
+      206,  206,  206,  206,  206,  206,  206,  206,  206,  206,
+      206,  206,  206,  206,  206,  206,  206,  206,  206,  206,
+      206,  206,  206,  206,  206,  206,  206,  206,  206,  206,
+      206,  206,  204,  204,  204,  207,  204,  206,  206,  206,
+      206,  206,  206,  206,  206,  206,  206,  204,  206,  206,
+
+      206,  206,  206,  206,  206,  206,  206,  206,  206,  206,
+      206,  206,  206,  206,  206,  206,  206,  206,  204,  206,
+      206,  206,  206,  206,  206,  206,  206,  204,  206,  206,
+      206,  206,  206,  206,  206,  206,  206,  206,  206,  206,
+      206,  206,  208,  206,  206,  206,  206,  204,  206,  206,
+      206,  206,  204,  206,  206,  206,  206,  206,  206,  206,
+      206,  206,  208,  208,  206,  206,  204,  206,  206,  206,
+      206,  206,  206,  206,  206,  206,  206,  204,  208,  206,
+      204,  206,  206,  206,  206,  206,  204,  208,  204,  206,
+      206,  206,  206,  204,  208,  206,  209,  204,  206,  209,
+
+      204,  204,  209,    0,  204,  204,  204,  204,  204
     } ;
 
-static yyconst flex_int16_t yy_nxt[572] =
+static yyconst flex_int16_t yy_nxt[579] =
     {   0,
         4,    5,    6,    7,    8,    9,   10,   11,   12,    4,
        13,   14,   10,   15,   16,   17,   18,   19,   20,   21,
@@ -514,56 +515,56 @@ static yyconst flex_int16_t yy_nxt[572] =
        62,   60,   63,   67,   69,   75,   88,   64,   58,   56,
        85,   65,   68,   70,   72,   71,   76,   93,   79,   66,
        73,   45,   46,   74,   80,   89,   77,   92,   67,   69,
-       78,   81,   82,   42,   85,  198,   68,   70,   72,   71,
-      198,   76,   93,   79,   73,  198,  198,   74,   80,   89,
-       77,   92,   98,  198,   78,   98,   81,   82,   83,   36,
+       78,   81,   82,   42,   85,  204,   68,   70,   72,   71,
+      204,   76,   93,   79,   73,  204,  204,   74,   80,   89,
+       77,   92,   98,  204,   78,   98,   81,   82,   83,   36,
        36,   84,   84,   36,   36,   84,   35,   36,   36,   37,
        37,   36,   36,   37,   38,   90,   94,   38,   38,   39,
 
-       39,   38,   95,  164,   91,   96,  164,   97,   99,  100,
-      101,   40,  198,  102,  103,   40,  198,  104,  105,   90,
-      106,   94,  107,  108,  198,  109,  110,   95,   91,  111,
-       96,   97,   99,  100,  112,  101,   40,  102,  103,  113,
-       40,  104,  105,  114,  120,  106,  117,  107,  108,  109,
-      110,  115,  122,  111,  118,  116,  198,  119,  112,   83,
-       36,   36,   84,  121,  113,  123,  124,  125,  114,  120,
-      117,   84,   36,   36,   84,  126,  115,  122,  118,   98,
-      116,  119,   98,  128,  198,  130,  132,  121,  131,  123,
-      124,  125,  129,  133,  198,  134,  135,  136,  137,  138,
-
-      126,  139,  174,  140,  141,  174,  143,  141,  128,  130,
-      127,  132,  131,  144,  145,  146,  129,  147,  133,  134,
-      135,  136,  137,  148,  138,  149,  139,  140,  151,  142,
-      143,  150,  198,  152,  127,  153,  154,  144,  155,  145,
-      146,  156,  147,  157,  198,  158,  159,  148,  141,  162,
-      149,  141,  151,  142,  163,  165,  150,  152,  166,  153,
-      154,  167,  168,  155,  169,  172,  156,  170,  157,  158,
-      159,  171,  173,  174,  162,  176,  174,  198,  161,  163,
-      165,  180,  166,  178,  164,  167,  168,  164,  179,  169,
-      172,  170,  181,  184,  174,  171,  173,  174,  185,  176,
-
-      174,  175,  161,  174,  187,  177,  180,  178,  186,  188,
-      174,  190,  179,  174,  191,  193,  181,  191,  184,  198,
-      182,  192,  185,  191,  192,  175,  191,  196,  187,  183,
-      177,  198,  198,  186,  188,  190,  198,  192,  198,  193,
-      192,  189,  198,  197,  182,  198,  197,  197,  198,  198,
-      197,  198,  196,  183,  198,  198,  198,  198,  198,  198,
-      198,  198,  198,  195,  198,  189,  198,  198,  198,  198,
-      198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
-      198,  198,  198,  198,  198,  198,  198,  195,   41,   41,
-      198,   41,   41,   50,   50,   86,   86,  198,   86,   86,
-
-      160,  198,  198,  160,  194,  198,  198,  194,    3,  198,
-      198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
-      198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
-      198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
-      198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
-      198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
-      198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
-      198
+       39,   38,   95,  167,   91,   96,  167,   97,   99,  100,
+      101,   40,  102,  178,  103,   40,  178,  104,  105,   90,
+      106,   94,  107,  108,  109,  204,  110,   95,   91,  111,
+       96,   97,   99,  100,  101,  112,   40,  102,  103,  113,
+       40,  104,  105,  114,  106,  115,  204,  107,  108,  109,
+      110,  116,  121,  111,  118,  117,  204,  119,  120,  112,
+      122,  123,  127,  113,   83,   36,   36,   84,  114,  124,
+      115,   84,   36,   36,   84,  125,  116,  121,  118,  126,
+      117,  119,  120,  129,  122,   98,  123,  127,   98,  130,
+      204,  132,  134,  124,  133,  135,  204,  136,  131,  125,
+
+      137,  138,  139,  126,  140,  141,  143,  129,  142,  143,
+      145,  146,  147,  148,  130,  132,  128,  134,  133,  149,
+      135,  136,  131,  150,  137,  138,  139,  151,  152,  140,
+      141,  144,  142,  153,  145,  146,  154,  147,  148,  155,
+      128,  156,  157,  158,  149,  159,  160,  150,  161,  162,
+      165,  143,  151,  152,  143,  144,  169,  153,  166,  168,
+      173,  154,  170,  155,  171,  156,  157,  172,  158,  174,
+      159,  160,  161,  162,  175,  165,  176,  204,  177,  178,
+      169,  164,  178,  166,  168,  173,  170,  180,  171,  167,
+      182,  172,  167,  174,  183,  184,  185,  189,  175,  186,
+
+      178,  176,  177,  178,  190,  164,  193,  179,  191,  178,
+      181,  180,  178,  196,  182,  192,  194,  204,  183,  199,
+      184,  185,  189,  186,  178,  204,  187,  178,  190,  197,
+      193,  179,  197,  191,  202,  181,  198,  196,  188,  198,
+      192,  194,  197,  199,  198,  197,  204,  198,  203,  204,
+      187,  203,  204,  203,  204,  195,  203,  204,  204,  202,
+      204,  204,  188,  204,  204,  204,  204,  204,  204,  204,
+      201,  204,  204,  204,  204,  204,  204,  204,  204,  195,
+      204,  204,  204,  204,  204,  204,  204,  204,  204,  204,
+      204,  204,  204,  204,  201,   41,   41,  204,   41,   41,
+
+       50,   50,   86,   86,  204,   86,   86,  163,  204,  204,
+      163,  200,  204,  204,  200,    3,  204,  204,  204,  204,
+      204,  204,  204,  204,  204,  204,  204,  204,  204,  204,
+      204,  204,  204,  204,  204,  204,  204,  204,  204,  204,
+      204,  204,  204,  204,  204,  204,  204,  204,  204,  204,
+      204,  204,  204,  204,  204,  204,  204,  204,  204,  204,
+      204,  204,  204,  204,  204,  204,  204,  204,  204,  204,
+      204,  204,  204,  204,  204,  204,  204,  204
     } ;
 
-static yyconst flex_int16_t yy_chk[572] =
+static yyconst flex_int16_t yy_chk[579] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -587,47 +588,47 @@ static yyconst flex_int16_t yy_chk[572] =
        33,   33,   34,   34,   34,   34,   35,   35,   35,   35,
        37,   37,   37,   37,   38,   53,   56,   38,   39,   39,
 
-       39,   39,   57,  146,   53,   58,  146,   59,   62,   63,
-       64,   38,    0,   65,   66,   39,    0,   67,   68,   53,
-       70,   56,   72,   73,    0,   74,   75,   57,   53,   76,
-       58,   59,   62,   63,   77,   64,   38,   65,   66,   78,
-       39,   67,   68,   79,   90,   70,   82,   72,   73,   74,
-       75,   81,   92,   76,   85,   81,    0,   89,   77,   83,
-       83,   83,   83,   91,   78,   94,   95,   96,   79,   90,
-       82,   84,   84,   84,   84,   97,   81,   92,   85,   98,
-       81,   89,   98,   99,    0,  100,  102,   91,  101,   94,
-       95,   96,   99,  103,    0,  104,  106,  107,  108,  110,
-
-       97,  112,  160,  113,  114,  160,  115,  114,   99,  100,
-       98,  102,  101,  116,  117,  118,   99,  119,  103,  104,
-      106,  107,  108,  124,  110,  125,  112,  113,  127,  114,
-      115,  126,    0,  128,   98,  131,  132,  116,  133,  117,
-      118,  137,  119,  138,    0,  139,  140,  124,  141,  144,
-      125,  141,  127,  114,  145,  147,  126,  128,  148,  131,
-      132,  150,  152,  133,  154,  158,  137,  156,  138,  139,
-      140,  157,  159,  161,  144,  163,  161,    0,  141,  145,
-      147,  168,  148,  165,  164,  150,  152,  164,  166,  154,
-      158,  156,  170,  177,  174,  157,  159,  174,  178,  163,
-
-      175,  161,  141,  175,  181,  164,  168,  165,  180,  182,
-      183,  186,  166,  183,  188,  190,  170,  188,  177,    0,
-      174,  189,  178,  191,  189,  161,  191,  195,  181,  175,
-      164,    0,    0,  180,  182,  186,    0,  192,    0,  190,
-      192,  183,  194,  196,  174,  194,  196,  197,    0,    0,
-      197,    0,  195,  175,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,  192,    0,  183,    0,    0,    0,    0,
+       39,   39,   57,  148,   53,   58,  148,   59,   62,   62,
+       63,   38,   64,  163,   65,   39,  163,   66,   67,   53,
+       68,   56,   70,   72,   73,    0,   74,   57,   53,   75,
+       58,   59,   62,   62,   63,   76,   38,   64,   65,   77,
+       39,   66,   67,   78,   68,   79,    0,   70,   72,   73,
+       74,   81,   90,   75,   82,   81,    0,   85,   89,   76,
+       91,   92,   97,   77,   83,   83,   83,   83,   78,   94,
+       79,   84,   84,   84,   84,   95,   81,   90,   82,   96,
+       81,   85,   89,   99,   91,   98,   92,   97,   98,  100,
+        0,  101,  103,   94,  102,  104,    0,  105,  100,   95,
+
+      107,  108,  109,   96,  111,  113,  115,   99,  114,  115,
+      116,  117,  118,  119,  100,  101,   98,  103,  102,  120,
+      104,  105,  100,  125,  107,  108,  109,  126,  127,  111,
+      113,  115,  114,  128,  116,  117,  129,  118,  119,  130,
+       98,  133,  134,  135,  120,  139,  140,  125,  141,  142,
+      146,  143,  126,  127,  143,  115,  150,  128,  147,  149,
+      157,  129,  152,  130,  154,  133,  134,  155,  135,  159,
+      139,  140,  141,  142,  160,  146,  161,    0,  162,  164,
+      150,  143,  164,  147,  149,  157,  152,  166,  154,  167,
+      168,  155,  167,  159,  169,  171,  172,  181,  160,  174,
+
+      178,  161,  162,  178,  182,  143,  186,  164,  184,  179,
+      167,  166,  179,  192,  168,  185,  187,    0,  169,  196,
+      171,  172,  181,  174,  188,    0,  178,  188,  182,  194,
+      186,  164,  194,  184,  201,  167,  195,  192,  179,  195,
+      185,  187,  197,  196,  198,  197,  200,  198,  202,  200,
+      178,  202,    0,  203,    0,  188,  203,    0,    0,  201,
+        0,    0,  179,    0,    0,    0,    0,    0,    0,    0,
+      198,    0,    0,    0,    0,    0,    0,    0,    0,  188,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,  192,  199,  199,
-        0,  199,  199,  200,  200,  201,  201,    0,  201,  201,
-
-      202,    0,    0,  202,  203,    0,    0,  203,  198,  198,
-      198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
-      198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
-      198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
-      198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
-      198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
-      198,  198,  198,  198,  198,  198,  198,  198,  198,  198,
-      198
+        0,    0,    0,    0,  198,  205,  205,    0,  205,  205,
+
+      206,  206,  207,  207,    0,  207,  207,  208,    0,    0,
+      208,  209,    0,    0,  209,  204,  204,  204,  204,  204,
+      204,  204,  204,  204,  204,  204,  204,  204,  204,  204,
+      204,  204,  204,  204,  204,  204,  204,  204,  204,  204,
+      204,  204,  204,  204,  204,  204,  204,  204,  204,  204,
+      204,  204,  204,  204,  204,  204,  204,  204,  204,  204,
+      204,  204,  204,  204,  204,  204,  204,  204,  204,  204,
+      204,  204,  204,  204,  204,  204,  204,  204
     } ;
 
 static yy_state_type yy_last_accepting_state;
@@ -701,7 +702,7 @@ static void countnl() {
 	g_lingo->_colnumber = strlen(p);
 }
 
-#line 705 "engines/director/lingo/lingo-lex.cpp"
+#line 706 "engines/director/lingo/lingo-lex.cpp"
 
 #define INITIAL 0
 
@@ -889,7 +890,7 @@ YY_DECL
 #line 69 "engines/director/lingo/lingo-lex.l"
 
 
-#line 893 "engines/director/lingo/lingo-lex.cpp"
+#line 894 "engines/director/lingo/lingo-lex.cpp"
 
 	if ( !(yy_init) )
 		{
@@ -943,13 +944,13 @@ yy_match:
 			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 				{
 				yy_current_state = (int) yy_def[yy_current_state];
-				if ( yy_current_state >= 199 )
+				if ( yy_current_state >= 205 )
 					yy_c = yy_meta[(unsigned int) yy_c];
 				}
 			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
 			++yy_cp;
 			}
-		while ( yy_base[yy_current_state] != 509 );
+		while ( yy_base[yy_current_state] != 516 );
 
 yy_find_action:
 		yy_act = yy_accept[yy_current_state];
@@ -1068,91 +1069,96 @@ YY_RULE_SETUP
 case 19:
 YY_RULE_SETUP
 #line 90 "engines/director/lingo/lingo-lex.l"
-{ count(); return tINTERSECTS; }
+{ count(); return tINSTANCE; }
 	YY_BREAK
 case 20:
 YY_RULE_SETUP
 #line 91 "engines/director/lingo/lingo-lex.l"
-{ count(); return tINTO; }
+{ count(); return tINTERSECTS; }
 	YY_BREAK
 case 21:
 YY_RULE_SETUP
 #line 92 "engines/director/lingo/lingo-lex.l"
-{ count(); return tLOOP; }
+{ count(); return tINTO; }
 	YY_BREAK
 case 22:
 YY_RULE_SETUP
 #line 93 "engines/director/lingo/lingo-lex.l"
-{ count(); return tMACRO; }
+{ count(); return tLOOP; }
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
 #line 94 "engines/director/lingo/lingo-lex.l"
-{ count(); return tMETHOD; }
+{ count(); return tMACRO; }
 	YY_BREAK
 case 24:
 YY_RULE_SETUP
 #line 95 "engines/director/lingo/lingo-lex.l"
-{ count(); return tMOVIE; }
+{ count(); return tMETHOD; }
 	YY_BREAK
 case 25:
 YY_RULE_SETUP
 #line 96 "engines/director/lingo/lingo-lex.l"
-{ count(); return tNEXT; }
+{ count(); return tMOVIE; }
 	YY_BREAK
 case 26:
 YY_RULE_SETUP
 #line 97 "engines/director/lingo/lingo-lex.l"
-{ count(); return tNOT; }
+{ count(); return tNEXT; }
 	YY_BREAK
 case 27:
 YY_RULE_SETUP
 #line 98 "engines/director/lingo/lingo-lex.l"
-{ count(); return tOF; }
+{ count(); return tNOT; }
 	YY_BREAK
 case 28:
 YY_RULE_SETUP
 #line 99 "engines/director/lingo/lingo-lex.l"
-{ count(); return tOPEN; }
+{ count(); return tOF; }
 	YY_BREAK
 case 29:
 YY_RULE_SETUP
 #line 100 "engines/director/lingo/lingo-lex.l"
-{ count(); return tOR; }
+{ count(); return tOPEN; }
 	YY_BREAK
 case 30:
 YY_RULE_SETUP
 #line 101 "engines/director/lingo/lingo-lex.l"
-{ count(); return tPLAY; }
+{ count(); return tOR; }
 	YY_BREAK
 case 31:
 YY_RULE_SETUP
 #line 102 "engines/director/lingo/lingo-lex.l"
-{ count(); return tPREVIOUS; }
+{ count(); return tPLAY; }
 	YY_BREAK
 case 32:
 YY_RULE_SETUP
 #line 103 "engines/director/lingo/lingo-lex.l"
-{ count(); return tPUT; }
+{ count(); return tPREVIOUS; }
 	YY_BREAK
 case 33:
 YY_RULE_SETUP
 #line 104 "engines/director/lingo/lingo-lex.l"
-{ count(); return tREPEAT; }
+{ count(); return tPUT; }
 	YY_BREAK
 case 34:
 YY_RULE_SETUP
 #line 105 "engines/director/lingo/lingo-lex.l"
-{ count(); return tSET; }
+{ count(); return tREPEAT; }
 	YY_BREAK
 case 35:
 YY_RULE_SETUP
 #line 106 "engines/director/lingo/lingo-lex.l"
-{ count(); return tSTARTS; }
+{ count(); return tSET; }
 	YY_BREAK
 case 36:
 YY_RULE_SETUP
 #line 107 "engines/director/lingo/lingo-lex.l"
+{ count(); return tSTARTS; }
+	YY_BREAK
+case 37:
+YY_RULE_SETUP
+#line 108 "engines/director/lingo/lingo-lex.l"
 {
 		count();
 
@@ -1162,9 +1168,9 @@ YY_RULE_SETUP
 		return THEENTITYWITHID;
 	}
 	YY_BREAK
-case 37:
+case 38:
 YY_RULE_SETUP
-#line 115 "engines/director/lingo/lingo-lex.l"
+#line 116 "engines/director/lingo/lingo-lex.l"
 {
 		count();
 
@@ -1206,9 +1212,9 @@ YY_RULE_SETUP
 		warning("Unhandled the entity %s", ptr);
 	}
 	YY_BREAK
-case 38:
+case 39:
 YY_RULE_SETUP
-#line 155 "engines/director/lingo/lingo-lex.l"
+#line 156 "engines/director/lingo/lingo-lex.l"
 {
 		count();
 
@@ -1229,64 +1235,64 @@ YY_RULE_SETUP
 		warning("Unhandled the entity %s", ptr);
 	}
 	YY_BREAK
-case 39:
-YY_RULE_SETUP
-#line 174 "engines/director/lingo/lingo-lex.l"
-{ count(); return tTHEN; }
-	YY_BREAK
 case 40:
 YY_RULE_SETUP
 #line 175 "engines/director/lingo/lingo-lex.l"
-{ count(); return tTO; }
+{ count(); return tTHEN; }
 	YY_BREAK
 case 41:
 YY_RULE_SETUP
 #line 176 "engines/director/lingo/lingo-lex.l"
-{ count(); return tSPRITE; }
+{ count(); return tTO; }
 	YY_BREAK
 case 42:
 YY_RULE_SETUP
 #line 177 "engines/director/lingo/lingo-lex.l"
-{ count(); return tWITH; }
+{ count(); return tSPRITE; }
 	YY_BREAK
 case 43:
 YY_RULE_SETUP
 #line 178 "engines/director/lingo/lingo-lex.l"
-{ count(); return tWITHIN; }
+{ count(); return tWITH; }
 	YY_BREAK
 case 44:
 YY_RULE_SETUP
 #line 179 "engines/director/lingo/lingo-lex.l"
-{ count(); return tWHEN; }
+{ count(); return tWITHIN; }
 	YY_BREAK
 case 45:
 YY_RULE_SETUP
 #line 180 "engines/director/lingo/lingo-lex.l"
-{ count(); return tWHILE; }
+{ count(); return tWHEN; }
 	YY_BREAK
 case 46:
 YY_RULE_SETUP
-#line 182 "engines/director/lingo/lingo-lex.l"
-{ count(); return tNEQ; }
+#line 181 "engines/director/lingo/lingo-lex.l"
+{ count(); return tWHILE; }
 	YY_BREAK
 case 47:
 YY_RULE_SETUP
 #line 183 "engines/director/lingo/lingo-lex.l"
-{ count(); return tGE; }
+{ count(); return tNEQ; }
 	YY_BREAK
 case 48:
 YY_RULE_SETUP
 #line 184 "engines/director/lingo/lingo-lex.l"
-{ count(); return tLE; }
+{ count(); return tGE; }
 	YY_BREAK
 case 49:
 YY_RULE_SETUP
 #line 185 "engines/director/lingo/lingo-lex.l"
-{ count(); return tCONCAT; }
+{ count(); return tLE; }
 	YY_BREAK
 case 50:
 YY_RULE_SETUP
-#line 187 "engines/director/lingo/lingo-lex.l"
+#line 186 "engines/director/lingo/lingo-lex.l"
+{ count(); return tCONCAT; }
+	YY_BREAK
+case 51:
+YY_RULE_SETUP
+#line 188 "engines/director/lingo/lingo-lex.l"
 {
 		count();
 		yylval.s = new Common::String(yytext);
@@ -1314,43 +1320,43 @@ YY_RULE_SETUP
 		return ID;
 	}
 	YY_BREAK
-case 51:
-YY_RULE_SETUP
-#line 213 "engines/director/lingo/lingo-lex.l"
-{ count(); yylval.f = atof(yytext); return FLOAT; }
-	YY_BREAK
 case 52:
 YY_RULE_SETUP
 #line 214 "engines/director/lingo/lingo-lex.l"
-{ count(); yylval.i = strtol(yytext, NULL, 10); return INT; }
+{ count(); yylval.f = atof(yytext); return FLOAT; }
 	YY_BREAK
 case 53:
 YY_RULE_SETUP
 #line 215 "engines/director/lingo/lingo-lex.l"
-{ count(); return *yytext; }
+{ count(); yylval.i = strtol(yytext, NULL, 10); return INT; }
 	YY_BREAK
 case 54:
-/* rule 54 can match eol */
 YY_RULE_SETUP
 #line 216 "engines/director/lingo/lingo-lex.l"
-{ return '\n'; }
+{ count(); return *yytext; }
 	YY_BREAK
 case 55:
+/* rule 55 can match eol */
 YY_RULE_SETUP
 #line 217 "engines/director/lingo/lingo-lex.l"
-{ count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return STRING; }
+{ return '\n'; }
 	YY_BREAK
 case 56:
 YY_RULE_SETUP
 #line 218 "engines/director/lingo/lingo-lex.l"
-
+{ count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return STRING; }
 	YY_BREAK
 case 57:
 YY_RULE_SETUP
-#line 220 "engines/director/lingo/lingo-lex.l"
+#line 219 "engines/director/lingo/lingo-lex.l"
+
+	YY_BREAK
+case 58:
+YY_RULE_SETUP
+#line 221 "engines/director/lingo/lingo-lex.l"
 ECHO;
 	YY_BREAK
-#line 1354 "engines/director/lingo/lingo-lex.cpp"
+#line 1360 "engines/director/lingo/lingo-lex.cpp"
 case YY_STATE_EOF(INITIAL):
 	yyterminate();
 
@@ -1643,7 +1649,7 @@ static int yy_get_next_buffer (void)
 		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 			{
 			yy_current_state = (int) yy_def[yy_current_state];
-			if ( yy_current_state >= 199 )
+			if ( yy_current_state >= 205 )
 				yy_c = yy_meta[(unsigned int) yy_c];
 			}
 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1671,11 +1677,11 @@ static int yy_get_next_buffer (void)
 	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 		{
 		yy_current_state = (int) yy_def[yy_current_state];
-		if ( yy_current_state >= 199 )
+		if ( yy_current_state >= 205 )
 			yy_c = yy_meta[(unsigned int) yy_c];
 		}
 	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
-	yy_is_jam = (yy_current_state == 198);
+	yy_is_jam = (yy_current_state == 204);
 
 	return yy_is_jam ? 0 : yy_current_state;
 }
@@ -2350,7 +2356,7 @@ void yyfree (void * ptr )
 
 #define YYTABLES_NAME "yytables"
 
-#line 220 "engines/director/lingo/lingo-lex.l"
+#line 221 "engines/director/lingo/lingo-lex.l"
 
 
 
diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l
index 3fca137..571065d 100644
--- a/engines/director/lingo/lingo-lex.l
+++ b/engines/director/lingo/lingo-lex.l
@@ -87,6 +87,7 @@ whitespace [\t ]
 (?i:global)			{ count(); return tGLOBAL; }
 (?i:go[\t ]+to)		{ count(); return tGO; }
 (?i:go)				{ count(); return tGO; }
+(?i:instance)		{ count(); return tINSTANCE; }
 (?i:intersects)		{ count(); return tINTERSECTS; }
 (?i:into)			{ count(); return tINTO; }
 (?i:loop)			{ count(); return tLOOP; }
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index 9707afb..ab6759d 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -288,6 +288,7 @@ public:
 	static void c_gotonext();
 	static void c_gotoprevious();
 	static void c_global();
+	static void c_instance();
 
 	static void c_play();
 	static void c_playdone();


Commit: 223b7f16134e2a15416658e1567b593b4e60485c
    https://github.com/scummvm/scummvm/commit/223b7f16134e2a15416658e1567b593b4e60485c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-08-20T11:49:42+02:00

Commit Message:
DIRECTOR: Lingo: Stub for 'menu' command. This completes all D2 commands

Changed paths:
    engines/director/lingo/lingo.cpp
    engines/director/lingo/lingo.h



diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp
index d3e84a0..21a5b53 100644
--- a/engines/director/lingo/lingo.cpp
+++ b/engines/director/lingo/lingo.cpp
@@ -160,6 +160,13 @@ void Lingo::addCode(const char *code, ScriptType type, uint16 id) {
 
 	const char *begin, *end;
 
+	if (!strncmp(code, "menu:", 5)) {
+		debugC(2, kDebugLingoCompile, "Parsing menu");
+		parseMenu(code);
+
+		return;
+	}
+
 	// macros and factories have conflicting grammar. Thus we ease life for the parser.
 	if ((begin = findNextDefinition(code))) {
 		bool first = true;
@@ -392,6 +399,10 @@ Common::String *Lingo::toLowercaseMac(Common::String *s) {
 	return res;
 }
 
+void Lingo::parseMenu(const char *code) {
+	warning("STUB: parseMenu");
+}
+
 void Lingo::runTests() {
 	Common::File inFile;
 	Common::ArchiveMemberList fsList;
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index ab6759d..e04de92 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -431,6 +431,8 @@ public:
 
 private:
 	int parse(const char *code);
+	void parseMenu(const char *code);
+
 	void push(Datum d);
 	Datum pop(void);
 


Commit: 2bcae4cadcba7dc08e74a62bbbf8452785681a48
    https://github.com/scummvm/scummvm/commit/2bcae4cadcba7dc08e74a62bbbf8452785681a48
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-08-20T12:09:47+02:00

Commit Message:
DIRECTOR: Lingo: Added stubs for all D2 properties

Changed paths:
    engines/director/lingo/lingo-the.cpp
    engines/director/lingo/lingo-the.h



diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index 760576e..a77fbd3 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -27,21 +27,30 @@ namespace Director {
 class Sprite;
 
 TheEntity entities[] = {
+	{ kTheBeepOn,			"beepOn",			false },	// D2 property
+	{ kTheButtonStyle,		"buttonStyle",		false },	// D2 p
 	{ kTheCast,				"cast",				true  },
+	{ kTheCenterStage,		"centerStage",		false },	// D2 p
+	{ kTheCheckBoxAccess,	"checkBoxAccess",	false },	// D2 p
+	{ kTheCheckBoxType,		"checkBoxType",		false },	// D2 p
 	{ kTheClickOn,			"clickOn",			false },	// D2 function
-	{ kTheColorDepth,		"colorDepth",		false },
+	{ kTheColorDepth,		"colorDepth",		false },	// D2 p
 	{ kTheColorQD,			"colorQD",			false },	// D2 f
 	{ kTheCommandDown,		"commandDown",		false },	// D2 f
 	{ kTheControlDown,		"controlDown",		false },	// D2 f
 	{ kTheDoubleClick,		"doubleClick",		false },	// D2 f
-	{ kTheExitLock,			"exitlock",			false },
+	{ kTheExitLock,			"exitLock",			false },	// D2 p
+	{ kTheFixStageSize,		"fixStageSize",		false },	// D2 p
 	{ kTheFloatPrecision,	"floatPrecision",	false },
 	{ kTheFrame,			"frame",			false },	// D2 f
 	{ kTheFreeBlock,		"freeBlock",		false },	// D2 f
 	{ kTheFreeBytes,		"freeBytes",		false },	// D2 f
+	{ kTheFullColorPermit,	"fullColorPermit",	false },	// D2 p
+	{ kTheImageDirect,		"imageDirect",		false },	// D2 p
 	{ kTheItemDelimiter,	"itemDelimiter",	false },
 	{ kTheKey,				"key",				false },	// D2 f
 	{ kTheKeyCode,			"keyCode",			false },	// D2 f
+	{ kTheKeyDownScript,	"keyDownScript",	false },	// D2 p
 	{ kTheLastClick,		"lastClick",		false },	// D2 f
 	{ kTheLastEvent,		"lastEvent",		false },	// D2 f
 	{ kTheLastFrame,		"lastFrame",		false },
@@ -54,17 +63,17 @@ TheEntity entities[] = {
 	{ kTheMenuItem,			"menuitem",			true  },
 	{ kTheMenuItems,		"menuitems",		false },
 	{ kTheMouseDown,		"mouseDown",		false },	// D2 f
-	{ kTheMouseDownScript,  "mouseDownScript",	false },
+	{ kTheMouseDownScript,  "mouseDownScript",	false },	// D2 p
 	{ kTheMouseH,			"mouseH",			false },	// D2 f
 	{ kTheMouseUp,			"mouseUp",			false },	// D2 f
-	{ kTheMouseUpScript,  	"mouseUpScript",	false },
+	{ kTheMouseUpScript,  	"mouseUpScript",	false },	// D2 p
 	{ kTheMouseV,			"mouseV",			false },	// D2 f
 	{ kTheMovie,			"movie",			false },	// D2 f
 	{ kTheMultiSound,		"multiSound",		false },
 	{ kTheOptionDown,		"optionDown",		false },	// D2 f
 	{ kThePathName,			"pathName",			false },	// D2 f
 	{ kThePauseState,		"pauseState",		false },	// D2 f
-	{ kThePerFrameHook,		"perframehook",		false },
+	{ kThePerFrameHook,		"perFrameHook",		false },	// D2 p
 	{ kThePreloadEventAbort,"preloadEventAbort",false },
 	{ kTheResult,			"result",			false },	// D2 f
 	{ kTheRightMouseDown,	"rightMouseDown",	false },
@@ -72,6 +81,8 @@ TheEntity entities[] = {
 	{ kTheRomanLingo,		"romanLingo",		false },
 	{ kTheSelection,		"selection",		false },	// D2 f
 	{ kTheShiftDown,		"shiftDown",		false },	// D2 f
+	{ kTheSoundEnabled,		"soundEnabled",		false },	// D2 p
+	{ kTheSoundLevel,		"soundLevel",		false },	// D2 p
 	{ kTheSprite,			"sprite",			true  },
 	{ kTheSqrt,				"sqrt",				false },	// D2 f
 	{ kTheStage,			"stage",			false },
@@ -80,9 +91,15 @@ TheEntity entities[] = {
 	{ kTheStageRight,		"stageRight",		false },	// D2 f
 	{ kTheStageTop,			"stageTop",			false },	// D2 f
 	{ kTheStillDown,		"stillDown",		false },	// D2 f
+	{ kTheSwitchColorDepth,	"switchColorDepth",	false },	// D2 p
 	{ kTheTicks,			"ticks",			false },	// D2 f
-	{ kTheTimeoutLength,	"timeoutlength",	false },
-	{ kTheTimer,			"timer",			false },
+	{ kTheTimeoutKeydown,	"timeoutKeydown",	false },	// D2 p
+	{ kTheTimeoutLapsed,	"timeoutLapsed",	false },	// D2 p
+	{ kTheTimeoutLength,	"timeoutLength",	false },	// D2 p
+	{ kTheTimeoutMouse,		"timeoutMouse",		false },	// D2 p
+	{ kTheTimeoutPlay,		"timeoutPlay",		false },	// D2 p
+	{ kTheTimeoutScript,	"timeoutScript",	false },	// D2 p
+	{ kTheTimer,			"timer",			false },	// D2 p
 	{ kTheWindow,			"window",			false },
 	{ kTheNOEntity, NULL, false }
 };
diff --git a/engines/director/lingo/lingo-the.h b/engines/director/lingo/lingo-the.h
index 468be64..d24488d 100644
--- a/engines/director/lingo/lingo-the.h
+++ b/engines/director/lingo/lingo-the.h
@@ -46,11 +46,29 @@ enum TheEntityType {
 	kThePerFrameHook,
 	kTheTicks,
 	kTheTimer,
+	kTheTimeoutKeydown,
+	kTheTimeoutLapsed,
 	kTheTimeoutLength,
+	kTheTimeoutMouse,
+	kTheTimeoutPlay,
+	kTheTimeoutScript,
 	kTheWindow,
 
+	kTheBeepOn,
+	kTheButtonStyle,
+	kTheCenterStage,
+	kTheCheckBoxAccess,
+	kTheCheckBoxType,
 	kTheClickOn,
+	kTheControlDown,
+	kTheCommandDown,
 	kTheDoubleClick,
+	kTheFixStageSize,
+	kTheFullColorPermit,
+	kTheImageDirect,
+	kTheKey,
+	kTheKeyDownScript,
+	kTheKeyCode,
 	kTheLastClick,
 	kTheLastEvent,
 	kTheLastFrame,
@@ -60,19 +78,18 @@ enum TheEntityType {
 	kTheMemorySize,
 	kTheMouseDown,
 	kTheMouseUp,
+	kTheOptionDown,
 	kThePauseState,
 	kTheRightMouseUp,
 	kTheRightMouseDown,
+	kTheSoundEnabled,
+	kTheSoundLevel,
 	kTheStillDown,
-	kTheKey,
-	kTheKeyCode,
-	kTheControlDown,
-	kTheCommandDown,
+	kTheSwitchColorDepth,
 	kTheResult,
 	kTheSelection,
 	kTheShiftDown,
 	kTheSqrt,
-	kTheOptionDown,
 
 	kTheColorDepth,
 	kTheColorQD,


Commit: 8d30487b7631af5e59a8539b16f8c2f1f6339d01
    https://github.com/scummvm/scummvm/commit/8d30487b7631af5e59a8539b16f8c2f1f6339d01
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-08-20T12:14:28+02:00

Commit Message:
DIRECTOR: Lingo: Added stubs for all D2 sprite properties

Changed paths:
    engines/director/lingo/lingo-the.cpp
    engines/director/lingo/lingo-the.h



diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index a77fbd3..e11f24e 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -105,34 +105,37 @@ TheEntity entities[] = {
 };
 
 TheEntityField fields[] = {
-	{ kTheSprite,	"backColor",	kTheBackColor },
+	{ kTheSprite,	"backColor",	kTheBackColor },	// D2 p
 	{ kTheSprite,	"blend",		kTheBlend },
-	{ kTheSprite,	"bottom",		kTheBottom },
-	{ kTheSprite,	"castnum",		kTheCastNum },
-	{ kTheSprite,	"constraint",	kTheConstraint },
-	{ kTheSprite,	"cursor",		kTheCursor },
+	{ kTheSprite,	"bottom",		kTheBottom },		// D2 p
+	{ kTheSprite,	"castNum",		kTheCastNum },		// D2 p
+	{ kTheSprite,	"constraint",	kTheConstraint },	// D2 p
+	{ kTheSprite,	"cursor",		kTheCursor },		// D2 p
 	{ kTheSprite,	"editableText", kTheEditableText },
-	{ kTheSprite,	"foreColor",	kTheForeColor },
-	{ kTheSprite,	"height",		kTheHeight },
-	{ kTheSprite,	"ink",			kTheInk },
-	{ kTheSprite,	"left",			kTheLeft },
-	{ kTheSprite,	"lineSize",		kTheLineSize },
-	{ kTheSprite,	"loch",			kTheLocH },
-	{ kTheSprite,	"locv",			kTheLocV },
+	{ kTheSprite,	"foreColor",	kTheForeColor },	// D2 p
+	{ kTheSprite,	"height",		kTheHeight },		// D2 p
+	{ kTheSprite,	"immediate",	kTheImmediate },	// D2 p
+	{ kTheSprite,	"ink",			kTheInk },			// D2 p
+	{ kTheSprite,	"left",			kTheLeft },			// D2 p
+	{ kTheSprite,	"lineSize",		kTheLineSize },		// D2 p
+	{ kTheSprite,	"locH",			kTheLocH },			// D2 p
+	{ kTheSprite,	"locV",			kTheLocV },			// D2 p
 	{ kTheSprite,	"moveable",		kTheMoveable },
 	{ kTheSprite,	"movieRate",	kTheMovieRate },
 	{ kTheSprite,	"movieTime",	kTheMovieTime },
-	{ kTheSprite,	"right",		kTheRight },
+	{ kTheSprite,	"pattern",		kThePattern },		// D2 p
+	{ kTheSprite,	"puppet",		kThePuppet },		// D2 p
+	{ kTheSprite,	"right",		kTheRight },		// D2 p
 	{ kTheSprite,	"scriptNum",	kTheScriptNum },
 	{ kTheSprite,	"startTime",	kTheStartTime },
-	{ kTheSprite,	"stretch",		kTheStrech },
+	{ kTheSprite,	"stretch",		kTheStrech },		// D2 p
 	{ kTheSprite,	"stopTime",		kTheStopTime },
-	{ kTheSprite,	"top",			kTheTop },
+	{ kTheSprite,	"top",			kTheTop },			// D2 p
 	{ kTheSprite,	"trails",		kTheTrails },
-	{ kTheSprite,	"type",			kTheType },
+	{ kTheSprite,	"type",			kTheType },			// D2 p
 	{ kTheSprite,	"visible",		kTheVisible },
 	{ kTheSprite,	"volume",		kTheVolume },
-	{ kTheSprite,	"width",		kTheWidth },
+	{ kTheSprite,	"width",		kTheWidth },		// D2 p
 
 	// Common cast fields
 	{ kTheCast,		"castType",		kTheCastType },
diff --git a/engines/director/lingo/lingo-the.h b/engines/director/lingo/lingo-the.h
index d24488d..c5a32f1 100644
--- a/engines/director/lingo/lingo-the.h
+++ b/engines/director/lingo/lingo-the.h
@@ -129,6 +129,7 @@ enum TheFieldType {
 	kTheFilename,
 	kTheHeight,
 	kTheHilite,
+	kTheImmediate,
 	kTheInk,
 	kTheLeft,
 	kTheLineSize,
@@ -141,9 +142,11 @@ enum TheFieldType {
 	kTheNumber,
 	kTheName,
 	kThePalette,
+	kThePattern,
 	kThePausedAtStart,
 	kThePicture,
 	kThePreload,
+	kThePuppet,
 	kThePurgePriority,
 	kTheRect,
 	kTheRegPoint,


Commit: dcbc7e3b4de8525c4638c151eb3a7a662e3b15e1
    https://github.com/scummvm/scummvm/commit/dcbc7e3b4de8525c4638c151eb3a7a662e3b15e1
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-08-20T12:20:59+02:00

Commit Message:
DIRECTOR: Lingo: Added all D2 text properties. This completes D2 grammar. Yay!

Changed paths:
    engines/director/lingo/lingo-the.cpp
    engines/director/lingo/lingo-the.h



diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index e11f24e..d868b8a 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -170,9 +170,11 @@ TheEntityField fields[] = {
 	{ kTheCast,		"picture",		kThePicture },
 
 	// TextCast fields
-	{ kTheCast,		"hilite",		kTheHilite },
+	{ kTheCast,		"hilite",		kTheHilite },		// D2 p
+	{ kTheCast,		"selEnd",		kTheSelEnd },		// D2 p
+	{ kTheCast,		"selStart",		kTheSelStart },		// D2 p
 	{ kTheCast,		"size",			kTheSize },
-	{ kTheCast,		"text",			kTheText },
+	{ kTheCast,		"text",			kTheText },			// D2 p
 
 	{ kTheWindow,	"drawRect",		kTheDrawRect },
 	{ kTheWindow,	"filename",		kTheFilename },
diff --git a/engines/director/lingo/lingo-the.h b/engines/director/lingo/lingo-the.h
index c5a32f1..f68a81d 100644
--- a/engines/director/lingo/lingo-the.h
+++ b/engines/director/lingo/lingo-the.h
@@ -157,6 +157,8 @@ enum TheFieldType {
 	kTheScript,
 	kTheScriptNum,
 	kTheScriptText,
+	kTheSelEnd,
+	kTheSelStart,
 	kTheSize,
 	kTheStrech,
 	kTheSound,






More information about the Scummvm-git-logs mailing list