[Scummvm-git-logs] scummvm master -> 677dd99bdb564b86c93657fb0e8c3cf1cd5f612d

sev- sev at scummvm.org
Tue Jan 10 01:03:51 CET 2017


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

Summary:
2c69ffc3ff DIRECTOR: Lingo: Added stub for handling symbols
5ee51026c7 DIRECTOR: Lingo: More documentation for D3 differences
bfc2fa8aa2 DIRECTOR: Lingo: Implemented stubs for put..after and put..before
525f916b2d DIRECTOR: Lingo: Implemented stub for char..of and char..to..of
677dd99bdb DIRECTOR: Lingo: Added stubs for D3 Text-related syntax


Commit: 2c69ffc3ff4d14dd56616a5e35f5ee60dcf08e5a
    https://github.com/scummvm/scummvm/commit/2c69ffc3ff4d14dd56616a5e35f5ee60dcf08e5a
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-01-10T01:02:56+01:00

Commit Message:
DIRECTOR: Lingo: Added stub for handling symbols

Changed paths:
    engines/director/lingo/lingo-code.cpp
    engines/director/lingo/lingo-gr.cpp
    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 c9f9c14..7767740 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -60,6 +60,7 @@ static struct FuncDescr {
 	{ Lingo::c_voidpush,	"c_voidpush",	"" },
 	{ Lingo::c_fconstpush,	"c_fconstpush",	"f" },
 	{ Lingo::c_stringpush,	"c_stringpush",	"s" },
+	{ Lingo::c_symbolpush,	"c_symbolpush","s" },
 	{ Lingo::c_varpush,		"c_varpush",	"s" },
 	{ Lingo::c_assign,		"c_assign",		"" },
 	{ Lingo::c_eval,		"c_eval",		"s" },
@@ -212,6 +213,16 @@ void Lingo::c_stringpush() {
 	g_lingo->push(Datum(new Common::String(s)));
 }
 
+void Lingo::c_symbolpush() {
+	char *s = (char *)&(*g_lingo->_currentScript)[g_lingo->_pc];
+	g_lingo->_pc += g_lingo->calcStringAlignment(s);
+
+	warning("STUB: c_symbolpush()");
+
+	// TODO: FIXME: Must push symbol instead of string
+	g_lingo->push(Datum(new Common::String(s)));
+}
+
 void Lingo::c_varpush() {
 	char *name = (char *)&(*g_lingo->_currentScript)[g_lingo->_pc];
 	Datum d;
diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp
index ab17a35..97a676e 100644
--- a/engines/director/lingo/lingo-gr.cpp
+++ b/engines/director/lingo/lingo-gr.cpp
@@ -494,18 +494,18 @@ union yyalloc
 #endif
 
 /* YYFINAL -- State number of the termination state.  */
-#define YYFINAL  96
+#define YYFINAL  97
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   1029
+#define YYLAST   1030
 
 /* YYNTOKENS -- Number of terminals.  */
 #define YYNTOKENS  87
 /* YYNNTS -- Number of nonterminals.  */
 #define YYNNTS  39
 /* YYNRULES -- Number of rules.  */
-#define YYNRULES  134
+#define YYNRULES  135
 /* YYNRULES -- Number of states.  */
-#define YYNSTATES  282
+#define YYNSTATES  283
 
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 #define YYUNDEFTOK  2
@@ -563,14 +563,14 @@ static const yytype_uint16 yyprhs[] =
      141,   148,   159,   170,   171,   175,   178,   180,   183,   185,
      192,   194,   200,   202,   206,   210,   213,   217,   219,   221,
      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,   304,   307,   311,   315,
-     319,   323,   326,   329,   333,   338,   343,   346,   348,   350,
-     353,   355,   358,   361,   364,   367,   369,   372,   377,   380,
-     384,   386,   390,   392,   396,   399,   402,   405,   408,   412,
-     415,   418,   420,   424,   427,   430,   433,   437,   440,   441,
-     450,   453,   454,   463,   464,   465,   476,   477,   479,   483,
-     488,   489,   493,   494,   496
+     244,   249,   251,   253,   256,   258,   262,   266,   270,   274,
+     278,   282,   286,   290,   294,   298,   302,   306,   309,   313,
+     317,   321,   325,   328,   331,   335,   340,   345,   348,   350,
+     352,   355,   357,   360,   363,   366,   369,   371,   374,   379,
+     382,   386,   388,   392,   394,   398,   401,   404,   407,   410,
+     414,   417,   420,   422,   426,   429,   432,   435,   439,   442,
+     443,   452,   455,   456,   465,   466,   467,   478,   479,   481,
+     485,   490,   491,   495,   496,   498
 };
 
 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
@@ -599,33 +599,34 @@ static const yytype_int8 yyrhs[] =
      109,    -1,   109,    74,   109,    -1,    82,   100,    83,    -1,
       41,    47,    -1,    41,    46,    21,    -1,    32,    -1,    26,
       -1,    -1,    -1,    -1,   107,    89,    -1,   107,    93,    -1,
-      45,    21,    43,    -1,    12,    -1,    15,    -1,    22,    -1,
-      17,    -1,    21,    82,   125,    83,    -1,    21,    -1,    13,
-      -1,    14,   109,    -1,    91,    -1,   109,    76,   109,    -1,
-     109,    77,   109,    -1,   109,    78,   109,    -1,   109,    79,
-     109,    -1,   109,    65,   109,    -1,   109,    84,   109,    -1,
-     109,    85,   109,    -1,   109,    61,   109,    -1,   109,    56,
-     109,    -1,   109,    57,   109,    -1,   109,    62,   109,    -1,
-     109,    63,   109,    -1,    64,   109,    -1,   109,    75,   109,
-      -1,   109,    66,   109,    -1,   109,    67,   109,    -1,   109,
-      68,   109,    -1,    76,   109,    -1,    77,   109,    -1,    82,
-     109,    83,    -1,    69,   109,    70,   109,    -1,    69,   109,
-      71,   109,    -1,    40,   109,    -1,   113,    -1,   116,    -1,
-      28,    41,    -1,    28,    -1,    30,   111,    -1,    55,   112,
-      -1,    19,   109,    -1,    18,   109,    -1,    18,    -1,    20,
-     125,    -1,    51,   109,    46,   109,    -1,    51,   109,    -1,
-      73,    21,   125,    -1,    21,    -1,   111,    86,    21,    -1,
-      21,    -1,   112,    86,    21,    -1,    31,    34,    -1,    31,
-      37,    -1,    31,    39,    -1,    31,   114,    -1,    31,   114,
-     115,    -1,    31,   115,    -1,    29,   109,    -1,   109,    -1,
-      38,    36,   109,    -1,    36,   109,    -1,    52,    53,    -1,
-      52,   114,    -1,    52,   114,   115,    -1,    52,   115,    -1,
-      -1,    35,    21,   118,   105,   122,    89,   123,   107,    -1,
-      49,    21,    -1,    -1,    50,    21,   119,   105,   122,    89,
-     123,   107,    -1,    -1,    -1,    72,    21,   120,   105,   121,
-     122,    89,   123,   107,    27,    -1,    -1,    21,    -1,   122,
-      86,    21,    -1,   122,    89,    86,    21,    -1,    -1,    21,
-     105,   125,    -1,    -1,   109,    -1,   125,    86,   109,    -1
+      45,    21,    43,    -1,    12,    -1,    15,    -1,    10,    -1,
+      22,    -1,    17,    -1,    21,    82,   125,    83,    -1,    21,
+      -1,    13,    -1,    14,   109,    -1,    91,    -1,   109,    76,
+     109,    -1,   109,    77,   109,    -1,   109,    78,   109,    -1,
+     109,    79,   109,    -1,   109,    65,   109,    -1,   109,    84,
+     109,    -1,   109,    85,   109,    -1,   109,    61,   109,    -1,
+     109,    56,   109,    -1,   109,    57,   109,    -1,   109,    62,
+     109,    -1,   109,    63,   109,    -1,    64,   109,    -1,   109,
+      75,   109,    -1,   109,    66,   109,    -1,   109,    67,   109,
+      -1,   109,    68,   109,    -1,    76,   109,    -1,    77,   109,
+      -1,    82,   109,    83,    -1,    69,   109,    70,   109,    -1,
+      69,   109,    71,   109,    -1,    40,   109,    -1,   113,    -1,
+     116,    -1,    28,    41,    -1,    28,    -1,    30,   111,    -1,
+      55,   112,    -1,    19,   109,    -1,    18,   109,    -1,    18,
+      -1,    20,   125,    -1,    51,   109,    46,   109,    -1,    51,
+     109,    -1,    73,    21,   125,    -1,    21,    -1,   111,    86,
+      21,    -1,    21,    -1,   112,    86,    21,    -1,    31,    34,
+      -1,    31,    37,    -1,    31,    39,    -1,    31,   114,    -1,
+      31,   114,   115,    -1,    31,   115,    -1,    29,   109,    -1,
+     109,    -1,    38,    36,   109,    -1,    36,   109,    -1,    52,
+      53,    -1,    52,   114,    -1,    52,   114,   115,    -1,    52,
+     115,    -1,    -1,    35,    21,   118,   105,   122,    89,   123,
+     107,    -1,    49,    21,    -1,    -1,    50,    21,   119,   105,
+     122,    89,   123,   107,    -1,    -1,    -1,    72,    21,   120,
+     105,   121,   122,    89,   123,   107,    27,    -1,    -1,    21,
+      -1,   122,    86,    21,    -1,   122,    89,    86,    21,    -1,
+      -1,    21,   105,   125,    -1,    -1,   109,    -1,   125,    86,
+     109,    -1
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
@@ -637,14 +638,14 @@ static const yytype_uint16 yyrline[] =
      256,   266,   276,   287,   288,   291,   292,   295,   296,   299,
      307,   308,   316,   317,   318,   320,   322,   328,   334,   341,
      343,   345,   346,   347,   350,   356,   357,   360,   363,   366,
-     369,   373,   380,   386,   387,   388,   389,   390,   391,   392,
-     393,   394,   395,   396,   397,   398,   399,   400,   401,   402,
-     403,   404,   405,   406,   407,   408,   411,   412,   413,   414,
-     415,   417,   418,   419,   422,   425,   428,   429,   430,   431,
-     434,   435,   438,   439,   450,   451,   452,   453,   456,   459,
-     464,   465,   468,   469,   472,   473,   476,   479,   509,   509,
-     515,   518,   518,   523,   524,   523,   536,   537,   538,   539,
-     541,   545,   553,   554,   555
+     369,   372,   376,   383,   389,   390,   391,   392,   393,   394,
+     395,   396,   397,   398,   399,   400,   401,   402,   403,   404,
+     405,   406,   407,   408,   409,   410,   411,   414,   415,   416,
+     417,   418,   420,   421,   422,   425,   428,   431,   432,   433,
+     434,   437,   438,   441,   442,   453,   454,   455,   456,   459,
+     462,   467,   468,   471,   472,   475,   476,   479,   482,   512,
+     512,   518,   521,   521,   526,   527,   526,   539,   540,   541,
+     542,   544,   548,   556,   557,   558
 };
 #endif
 
@@ -703,12 +704,12 @@ static const yytype_uint8 yyr1[] =
      106,   107,   107,   107,   108,   109,   109,   109,   109,   109,
      109,   109,   109,   109,   109,   109,   109,   109,   109,   109,
      109,   109,   109,   109,   109,   109,   109,   109,   109,   109,
-     109,   109,   109,   109,   109,   109,   110,   110,   110,   110,
+     109,   109,   109,   109,   109,   109,   109,   110,   110,   110,
      110,   110,   110,   110,   110,   110,   110,   110,   110,   110,
-     111,   111,   112,   112,   113,   113,   113,   113,   113,   113,
-     114,   114,   115,   115,   116,   116,   116,   116,   118,   117,
-     117,   119,   117,   120,   121,   117,   122,   122,   122,   122,
-     123,   124,   125,   125,   125
+     110,   111,   111,   112,   112,   113,   113,   113,   113,   113,
+     113,   114,   114,   115,   115,   116,   116,   116,   116,   118,
+     117,   117,   119,   117,   120,   121,   117,   122,   122,   122,
+     122,   123,   124,   125,   125,   125
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
@@ -719,15 +720,15 @@ static const yytype_uint8 yyr2[] =
        1,     1,     1,     8,    11,    12,     3,     8,    11,    11,
        6,    10,    10,     0,     3,     2,     1,     2,     1,     6,
        1,     5,     1,     3,     3,     2,     3,     1,     1,     0,
-       0,     0,     2,     2,     3,     1,     1,     1,     1,     4,
-       1,     1,     2,     1,     3,     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,     2,     1,     2,     4,     2,     3,
-       1,     3,     1,     3,     2,     2,     2,     2,     3,     2,
-       2,     1,     3,     2,     2,     2,     3,     2,     0,     8,
-       2,     0,     8,     0,     0,    10,     0,     1,     3,     4,
-       0,     3,     0,     1,     3
+       0,     0,     2,     2,     3,     1,     1,     1,     1,     1,
+       4,     1,     1,     2,     1,     3,     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,     2,     1,     2,     4,     2,
+       3,     1,     3,     1,     3,     2,     2,     2,     2,     3,
+       2,     2,     1,     3,     2,     2,     2,     3,     2,     0,
+       8,     2,     0,     8,     0,     0,    10,     0,     1,     3,
+       4,     0,     3,     0,     1,     3
 };
 
 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -735,343 +736,345 @@ static const yytype_uint8 yyr2[] =
    means the default is an error.  */
 static const yytype_uint8 yydefact[] =
 {
-       0,     0,    55,    61,     0,    56,    58,    95,     0,   132,
-      49,    57,    90,     0,     0,    47,     0,     0,     0,     0,
+       0,     0,    57,    55,    62,     0,    56,    59,    96,     0,
+     133,    49,    58,    91,     0,     0,    47,     0,     0,     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,    87,    88,     7,     9,     5,
-       4,    60,     0,    63,    62,    94,    93,   133,    96,   132,
-     132,    89,   100,    91,     0,   104,     0,   105,     0,   106,
-     111,   107,   109,   118,    86,     0,    45,     0,     0,     0,
-       0,   120,   121,    98,   114,   115,   117,   102,    92,    76,
-       0,   123,   132,    81,    82,     0,     1,     6,     0,     0,
-       0,     0,    42,    50,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     3,    64,    21,    11,    22,
+       0,     0,     0,     0,    19,     8,    88,    89,     7,     9,
+       5,     4,    61,     0,    64,    63,    95,    94,   134,    97,
+     133,   133,    90,   101,    92,     0,   105,     0,   106,     0,
+     107,   112,   108,   110,   119,    87,     0,    45,     0,     0,
+       0,     0,   121,   122,    99,   115,   116,   118,   103,    93,
+      77,     0,   124,   133,    82,    83,     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,     0,   131,     0,   110,   113,     0,   108,    49,
-       0,    46,     0,     0,     0,     0,     0,    54,    49,     0,
-     116,     0,     0,     0,    49,    99,    83,     2,     0,    50,
-       0,     0,    49,     0,    26,    72,    73,    71,    74,    75,
-      68,    78,    79,    80,    77,    64,    65,    66,    67,    69,
-      70,   134,    59,   101,   112,   126,    12,    17,    14,     0,
-       0,    16,    13,   126,    97,   103,    84,    85,   124,    51,
-       0,    44,    51,     0,    43,   127,     0,    18,    15,     0,
-     126,    50,     0,     0,    50,    50,    20,     0,   130,   130,
-       0,    52,    53,     0,     0,    50,    49,    30,   128,     0,
-      51,    51,   130,     0,    50,    51,     0,    51,     0,    48,
-      49,    50,    38,     0,   129,   119,   122,    51,    23,    51,
-      50,    27,    50,    50,    40,    36,     0,     0,    37,    33,
-       0,     0,    50,     0,     0,    35,     0,     0,    50,    49,
-      50,    49,   125,     0,     0,     0,     0,    49,    31,     0,
-      32,     0,     0,    24,    28,    29,    50,    34,    50,    25,
-      41,    39
+       0,     0,     0,     0,   132,     0,   111,   114,     0,   109,
+      49,     0,    46,     0,     0,     0,     0,     0,    54,    49,
+       0,   117,     0,     0,     0,    49,   100,    84,     2,     0,
+      50,     0,     0,    49,     0,    26,    73,    74,    72,    75,
+      76,    69,    79,    80,    81,    78,    65,    66,    67,    68,
+      70,    71,   135,    60,   102,   113,   127,    12,    17,    14,
+       0,     0,    16,    13,   127,    98,   104,    85,    86,   125,
+      51,     0,    44,    51,     0,    43,   128,     0,    18,    15,
+       0,   127,    50,     0,     0,    50,    50,    20,     0,   131,
+     131,     0,    52,    53,     0,     0,    50,    49,    30,   129,
+       0,    51,    51,   131,     0,    50,    51,     0,    51,     0,
+      48,    49,    50,    38,     0,   130,   120,   123,    51,    23,
+      51,    50,    27,    50,    50,    40,    36,     0,     0,    37,
+      33,     0,     0,    50,     0,     0,    35,     0,     0,    50,
+      49,    50,    49,   126,     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,    33,   211,    34,    53,    36,   212,    38,   260,   243,
-     244,   232,   245,   101,    39,    40,    41,   233,   271,   154,
-     201,    42,    43,   206,    63,    88,    45,    71,    72,    46,
-      47,   129,   138,   144,   200,   196,   220,    48,    58
+      -1,    34,   212,    35,    54,    37,   213,    39,   261,   244,
+     245,   233,   246,   102,    40,    41,    42,   234,   272,   155,
+     202,    43,    44,   207,    64,    89,    46,    72,    73,    47,
+      48,   130,   139,   145,   201,   197,   221,    49,    59
 };
 
 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    STATE-NUM.  */
-#define YYPACT_NINF -217
+#define YYPACT_NINF -213
 static const yytype_int16 yypact[] =
 {
-     275,   -30,  -217,  -217,   762,  -217,  -217,   762,   762,   762,
-     173,  -217,    17,    10,   686,  -217,    32,   762,    13,    64,
-      41,    47,    52,   762,   718,    55,   762,   762,    58,    59,
-     762,   762,   762,     2,  -217,     3,  -217,  -217,  -217,     6,
-      15,   776,   762,   944,  -217,  -217,  -217,  -217,  -217,  -217,
-    -217,     9,   762,  -217,   944,   944,   944,   944,     8,   762,
-     762,  -217,  -217,    19,   762,  -217,   762,  -217,    50,  -217,
-     944,   -11,  -217,  -217,   794,    74,  -217,   -28,   762,   -24,
-      53,  -217,  -217,   819,  -217,   -11,  -217,  -217,    21,   -10,
-     844,  -217,   762,   -10,   -10,   894,  -217,   346,   776,   762,
-     776,    60,   919,   944,   762,   762,   762,   762,   762,   762,
-     762,   762,   762,   762,   762,   762,   762,   762,   762,   762,
-     794,   762,     7,     8,    77,   944,   944,   762,  -217,  -217,
-      89,  -217,   762,   762,   602,   762,   762,  -217,  -217,   762,
-    -217,    92,   762,   762,  -217,     8,  -217,  -217,    31,   944,
-      33,   869,   -30,   762,  -217,    46,    46,    46,   -10,   -10,
-     -10,   944,    46,    46,   256,   -44,   -44,   -10,   -10,   944,
-     944,   944,  -217,  -217,   944,    94,  -217,   944,   944,   762,
-     762,   944,   944,    94,   944,  -217,   944,   944,  -217,  -217,
-      -7,  -217,  -217,   620,   944,  -217,   -57,   944,   944,   -57,
-      94,   483,    73,   762,   483,  -217,  -217,    98,    42,    42,
-     -57,  -217,  -217,    99,   762,   944,   -15,   -12,  -217,   106,
-    -217,  -217,    42,    93,   944,  -217,   101,  -217,   110,  -217,
-    -217,   110,  -217,   776,  -217,   483,   483,  -217,  -217,  -217,
-     483,  -217,   483,   110,   110,  -217,   776,   620,  -217,   112,
-     119,   412,   483,   114,   115,  -217,   136,   123,  -217,  -217,
-    -217,  -217,  -217,   141,    96,   138,   142,   -20,  -217,   620,
-    -217,   554,   139,  -217,  -217,  -217,   483,  -217,  -217,  -217,
-    -217,  -217
+     275,   -64,  -213,  -213,  -213,   175,  -213,  -213,   175,   175,
+     175,   945,  -213,   -14,    10,   707,  -213,    29,   175,   -21,
+       8,    30,    34,    37,   175,   752,    38,   175,   175,    44,
+      56,   175,   175,   175,     2,  -213,     5,  -213,  -213,  -213,
+       6,    15,   738,   175,   920,  -213,  -213,  -213,  -213,  -213,
+    -213,  -213,     9,   175,  -213,   920,   920,   920,   920,     7,
+     175,   175,  -213,  -213,    17,   175,  -213,   175,  -213,    54,
+    -213,   920,    42,  -213,  -213,   770,    73,  -213,   -33,   175,
+     -28,    52,  -213,  -213,   795,  -213,    42,  -213,  -213,    19,
+     -32,   820,  -213,   175,   -32,   -32,   870,  -213,   348,   738,
+     175,   738,    53,   895,   920,   175,   175,   175,   175,   175,
+     175,   175,   175,   175,   175,   175,   175,   175,   175,   175,
+     175,   770,   175,    -7,     7,    76,   920,   920,   175,  -213,
+    -213,    86,  -213,   175,   175,   618,   175,   175,  -213,  -213,
+     175,  -213,    89,   175,   175,  -213,     7,  -213,  -213,    31,
+     920,    33,   845,   -64,   175,  -213,    46,    46,    46,   -32,
+     -32,   -32,   920,    46,    46,   256,   329,   329,   -32,   -32,
+     920,   920,   920,  -213,  -213,   920,    92,  -213,   920,   920,
+     175,   175,   920,   920,    92,   920,  -213,   920,   920,  -213,
+    -213,    -6,  -213,  -213,   636,   920,  -213,   -58,   920,   920,
+     -58,    92,   492,    75,   175,   492,  -213,  -213,    96,    40,
+      40,   -58,  -213,  -213,   100,   175,   920,   -13,   -11,  -213,
+     107,  -213,  -213,    40,    93,   920,  -213,   101,  -213,   110,
+    -213,  -213,   110,  -213,   738,  -213,   492,   492,  -213,  -213,
+    -213,   492,  -213,   492,   110,   110,  -213,   738,   636,  -213,
+      94,    98,   419,   492,   133,   135,  -213,   136,   123,  -213,
+    -213,  -213,  -213,  -213,   141,   128,   105,   138,   -20,  -213,
+     636,  -213,   565,   139,  -213,  -213,  -213,   492,  -213,  -213,
+    -213,  -213,  -213
 };
 
 /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int16 yypgoto[] =
 {
-    -217,  -217,    12,    80,     4,  -182,     0,  -217,  -217,  -217,
-     -36,  -216,   -59,   -68,  -217,  -217,  -217,  -205,    -9,    22,
-     -23,  -217,    40,     5,  -217,  -217,  -217,   161,   -16,  -217,
-    -217,  -217,  -217,  -217,  -217,  -157,  -170,  -217,   -50
+    -213,  -213,    11,    79,     3,  -186,     0,  -213,  -213,  -213,
+     -44,  -212,   -63,   -69,  -213,  -213,  -213,  -205,   -10,    21,
+    -153,  -213,    39,     4,  -213,  -213,  -213,   159,   -12,  -213,
+    -213,  -213,  -213,  -213,  -213,  -165,  -167,  -213,   -51
 };
 
 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
    positive, shift that token.  If negative, reduce the rule which
    number is the opposite.  If zero, do what YYDEFACT says.
    If YYTABLE_NINF, syntax error.  */
-#define YYTABLE_NINF -61
+#define YYTABLE_NINF -62
 static const yytype_int16 yytable[] =
 {
-      37,    60,    96,   -10,    35,    44,   -51,   -51,    86,   122,
-     123,   205,   226,    50,   229,   248,   132,   202,   107,   108,
-     135,   109,   110,   246,    49,    66,   199,    68,   248,   207,
-     148,    62,   150,   227,   116,   117,   230,   203,   246,   221,
-     118,   119,   145,   210,    54,    97,   133,    55,    56,    57,
-     136,    49,   237,    73,    70,   128,   110,    74,    61,    75,
-      76,   -51,    80,    83,    70,   258,    89,    90,    81,   140,
-      93,    94,    95,    82,   118,   119,    87,    77,    78,    91,
-      92,   102,   103,    49,   -10,    79,   127,   277,    98,    99,
-     172,    59,   120,   121,   121,   131,   137,    37,   173,    57,
-      57,    35,    44,   152,   125,   124,   126,   141,   107,   108,
-     176,   109,   110,   185,   189,   195,   191,   214,   134,   218,
-     175,   113,   114,   115,   116,   117,   223,   234,   219,   183,
-     118,   119,    57,   241,   238,   188,   229,   273,   102,   149,
-     151,   264,   265,   193,   155,   156,   157,   158,   159,   160,
-     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
-     259,   171,   261,   266,   192,   250,   267,   174,   272,   204,
-     274,   190,   177,   178,   275,   181,   182,   147,   257,   184,
-     279,   231,   186,   187,   255,    85,     0,     0,     0,     0,
-       0,     0,     0,   194,     0,     0,     0,   235,   236,     0,
-       0,     0,   240,     0,   242,     0,     0,   228,   208,     0,
-       0,   209,     0,     0,   251,     0,   252,     0,     0,   197,
-     198,   247,   222,   213,     0,     0,   216,   217,     0,   -60,
-     -60,     0,     0,     0,   -60,   -60,   -60,   225,   -60,   -60,
-     -60,   -60,     0,   215,   276,     0,   239,     0,   -60,     0,
-     269,   -60,   -60,   249,   224,    59,     0,   -60,   -60,     0,
-       0,     0,   253,     0,   254,   256,     0,     0,     0,     0,
-       0,   278,     0,   102,   263,    -6,     1,     0,     0,     0,
-     268,     0,   270,     0,     0,     0,   102,     2,     3,     4,
-       5,     0,     6,     7,     8,     9,    10,    11,   280,     0,
-     281,     0,     0,    12,     0,    13,    14,    15,     0,     0,
-      16,     0,     0,     0,     0,    17,    18,    19,   107,   108,
-      20,   109,   110,     0,    21,    22,    23,    24,     0,     0,
-      25,     0,   114,   115,   116,   117,     0,     0,     0,    26,
-     118,   119,     0,     0,    27,     0,     0,    28,    29,     0,
-       0,    30,    31,     0,     0,     0,    -6,    32,     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,     0,    27,     0,     0,    28,    29,
-       0,     0,    30,    31,     2,     3,     4,     5,    32,     6,
-       7,     8,     9,    51,    11,     0,     0,     0,     0,   262,
-      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,
-       0,    27,     0,     0,     0,    29,     0,     0,    30,    31,
-       0,     0,     0,    49,    32,     2,     3,     4,     5,     0,
-       6,     7,     8,     9,    51,    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,     0,    27,     0,     0,     0,    29,     0,     0,    30,
-      31,     0,     0,     0,    49,    32,     2,     3,     4,     5,
-       0,     6,     7,     8,     9,    51,    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,     0,    27,     0,     0,     0,    29,     0,     0,
-      30,    31,     2,     3,     4,     5,    32,     6,     7,     8,
-       9,    51,    11,     0,     0,     0,   179,     0,    12,     0,
-      13,    14,     0,     0,     0,     0,     0,     0,   104,   105,
-      17,     0,    19,   106,   107,   108,     0,   109,   110,   111,
-     112,    23,    24,     0,     0,    25,   180,   113,   114,   115,
-     116,   117,     0,     0,    26,     0,   118,   119,     0,    27,
-       0,     0,     0,    29,     0,     0,    30,    31,     2,     3,
-       4,     5,    32,     6,     0,     0,     0,    51,    11,     0,
-       0,     0,     0,     0,     0,    64,     0,     0,     0,     0,
-      65,     0,    66,    67,    68,    69,    52,     0,    19,     0,
-       2,     3,     4,     5,     0,     6,     0,     0,     0,    51,
-      11,     0,     0,     0,     0,     0,     0,    64,     0,     0,
-      26,     0,     0,     0,    66,    27,    68,     0,    52,     0,
-      19,     0,    30,    31,     0,     0,     0,     0,    32,     0,
-       0,    84,     0,     0,     2,     3,     4,     5,     0,     6,
-       0,     0,    26,    51,    11,     0,     0,    27,     2,     3,
-       4,     5,     0,     6,    30,    31,     0,    51,    11,     0,
-      32,     0,    52,     0,    19,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,    52,     0,    19,     0,
-       0,     0,     0,     0,     0,     0,    26,   130,     0,     0,
-       0,    27,     0,     0,     0,     0,     0,     0,    30,    31,
-      26,     0,     0,     0,    32,    27,     0,     0,     0,     0,
-     104,   105,    30,    31,     0,   106,   107,   108,   100,   109,
-     110,   111,   112,     0,     0,   139,     0,     0,     0,   113,
-     114,   115,   116,   117,     0,   104,   105,     0,   118,   119,
-     106,   107,   108,     0,   109,   110,   111,   112,     0,     0,
-       0,     0,     0,     0,   113,   114,   115,   116,   117,     0,
-     104,   105,     0,   118,   119,   106,   107,   108,     0,   109,
-     110,   111,   112,     0,   142,   143,     0,     0,     0,   113,
-     114,   115,   116,   117,     0,   104,   105,     0,   118,   119,
-     106,   107,   108,     0,   109,   110,   111,   112,     0,     0,
-       0,     0,     0,   153,   113,   114,   115,   116,   117,     0,
-     104,   105,   146,   118,   119,   106,   107,   108,     0,   109,
-     110,   111,   112,     0,     0,     0,     0,     0,     0,   113,
-     114,   115,   116,   117,     0,   104,   105,   146,   118,   119,
-     106,   107,   108,     0,   109,   110,   111,   112,     0,     0,
-       0,     0,     0,   153,   113,   114,   115,   116,   117,     0,
-     104,   105,     0,   118,   119,   106,   107,   108,     0,   109,
-     110,   111,   112,     0,     0,     0,     0,     0,     0,   113,
-     114,   115,   116,   117,     0,     0,     0,     0,   118,   119
+      38,    61,    97,    36,    45,   -10,   -51,   -51,   206,   123,
+     124,   133,    51,    87,   227,   230,   136,    50,   203,   200,
+     249,    78,    79,    50,   247,    76,    77,    62,   208,    80,
+     149,    63,   151,   249,   111,   228,   211,   231,   204,   247,
+     205,   134,   146,   222,    55,    98,   137,    56,    57,    58,
+      74,    81,   119,   120,    71,    82,   238,    75,    83,    88,
+     129,   -51,   259,    84,    71,    92,    90,    91,   236,   237,
+      94,    95,    96,   241,   141,   243,   173,    93,    67,   122,
+      69,   103,   104,    50,   278,   252,   -10,   253,    99,   100,
+     128,    60,   121,   122,   132,   138,   153,   174,    38,    58,
+      58,    36,    45,   125,   126,   142,   127,   177,   108,   109,
+     186,   110,   111,   196,   190,   277,   192,   219,   135,   215,
+     176,   114,   115,   116,   117,   118,   220,   224,   235,   184,
+     119,   120,    58,   242,   239,   189,   230,   275,   103,   150,
+     152,   262,   260,   194,   156,   157,   158,   159,   160,   161,
+     162,   163,   164,   165,   166,   167,   168,   169,   170,   171,
+     265,   172,   266,   267,   193,   251,   268,   175,   273,   274,
+     276,   191,   178,   179,   232,   182,   183,   148,   258,   185,
+     280,   256,   187,   188,    86,     2,     0,     3,     4,     5,
+       6,     0,     7,   195,     0,     0,    52,    12,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   229,   209,     0,
+       0,   210,     0,     0,     0,    53,     0,    20,     0,   198,
+     199,   248,   223,   214,     0,     0,   217,   218,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   226,     0,    27,
+       0,     0,     0,   216,    28,     0,   240,     0,     0,     0,
+     270,    31,    32,   250,   225,     0,     0,    33,     0,     0,
+       0,     0,   254,     0,   255,   257,     0,     0,     0,     0,
+       0,     0,   279,   103,   264,    -6,     1,     0,     0,     0,
+     269,     0,   271,     0,     0,     2,   103,     3,     4,     5,
+       6,     0,     7,     8,     9,    10,    11,    12,   281,     0,
+     282,     0,     0,    13,     0,    14,    15,    16,     0,     0,
+      17,     0,     0,     0,     0,    18,    19,    20,   108,   109,
+      21,   110,   111,     0,    22,    23,    24,    25,     0,     0,
+      26,     0,   115,   116,   117,   118,     0,     0,     0,    27,
+     119,   120,     0,     0,    28,     0,     0,    29,    30,     0,
+       0,    31,    32,     0,     0,     0,    -6,    33,     2,     0,
+       3,     4,     5,     6,     0,     7,     8,     9,    10,    11,
+      12,     0,     0,     0,     0,     0,    13,     0,    14,    15,
+      16,     0,     0,    17,     0,     0,     0,     0,    18,    19,
+      20,   108,   109,    21,   110,   111,     0,    22,    23,    24,
+      25,     0,     0,    26,     0,     0,     0,   117,   118,     0,
+       0,     0,    27,   119,   120,     0,     0,    28,     0,     0,
+      29,    30,     0,     0,    31,    32,     0,     0,     0,     2,
+      33,     3,     4,     5,     6,     0,     7,     8,     9,    10,
+      52,    12,     0,     0,     0,     0,   263,    13,     0,    14,
+      15,    16,     0,     0,     0,     0,     0,     0,     0,    18,
+      19,    20,     0,     0,    21,     0,     0,     0,     0,     0,
+      24,    25,     0,     0,    26,     0,     0,     0,     0,     0,
+       0,     0,     0,    27,     0,     0,     0,     0,    28,     0,
+       0,     0,    30,     0,     0,    31,    32,     0,     0,     0,
+      50,    33,     2,     0,     3,     4,     5,     6,     0,     7,
+       8,     9,    10,    52,    12,     0,     0,     0,     0,     0,
+      13,     0,    14,    15,    16,     0,     0,     0,     0,     0,
+       0,     0,    18,    19,    20,     0,     0,    21,     0,     0,
+       0,     0,     0,    24,    25,     0,     0,    26,     0,     0,
+       0,     0,     0,     0,     0,     0,    27,     0,     0,     0,
+       0,    28,     0,     0,     0,    30,     0,     0,    31,    32,
+       0,     0,     0,    50,    33,     2,     0,     3,     4,     5,
+       6,     0,     7,     8,     9,    10,    52,    12,     0,     0,
+       0,     0,     0,    13,     0,    14,    15,    16,     0,     0,
+       0,     0,     0,     0,     0,    18,    19,    20,     0,     0,
+      21,     0,     0,     0,     0,     0,    24,    25,     0,     0,
+      26,     0,     0,     0,     0,     0,     0,     0,     0,    27,
+       0,     0,     0,     0,    28,     0,     0,     0,    30,     0,
+       0,    31,    32,     0,     0,     0,     2,    33,     3,     4,
+       5,     6,     0,     7,     8,     9,    10,    52,    12,     0,
+       0,     0,   180,     0,    13,     0,    14,    15,     0,     0,
+       0,     0,     0,     0,   105,   106,    18,     0,    20,   107,
+     108,   109,     0,   110,   111,   112,   113,    24,    25,     0,
+       0,    26,   181,   114,   115,   116,   117,   118,     0,     0,
+      27,     0,   119,   120,     0,    28,     0,     0,     0,    30,
+       0,     0,    31,    32,     0,     0,     0,     2,    33,     3,
+       4,     5,     6,     0,     7,     0,     0,     0,    52,    12,
+       0,     0,     0,     0,     0,     0,    65,     0,     0,     0,
+       0,    66,     0,    67,    68,    69,    70,    53,     2,    20,
+       3,     4,     5,     6,     0,     7,     0,     0,     0,    52,
+      12,     0,     2,     0,     3,     4,     5,     6,     0,     7,
+       0,    27,     0,    52,    12,     0,    28,     0,    53,     0,
+      20,    65,     0,    31,    32,     0,     0,     0,    67,    33,
+      69,     0,    53,     0,    20,     0,     0,     0,     0,     0,
+       0,     0,    27,   131,     0,    85,     0,    28,     0,     0,
+       0,     0,     0,     0,    31,    32,    27,     0,     0,     0,
+     101,    28,     0,     0,     0,     0,   105,   106,    31,    32,
+       0,   107,   108,   109,    33,   110,   111,   112,   113,     0,
+       0,   140,     0,     0,     0,   114,   115,   116,   117,   118,
+       0,   105,   106,     0,   119,   120,   107,   108,   109,     0,
+     110,   111,   112,   113,     0,     0,     0,     0,     0,     0,
+     114,   115,   116,   117,   118,     0,   105,   106,     0,   119,
+     120,   107,   108,   109,     0,   110,   111,   112,   113,     0,
+     143,   144,     0,     0,     0,   114,   115,   116,   117,   118,
+       0,   105,   106,     0,   119,   120,   107,   108,   109,     0,
+     110,   111,   112,   113,     0,     0,     0,     0,     0,   154,
+     114,   115,   116,   117,   118,     0,   105,   106,   147,   119,
+     120,   107,   108,   109,     0,   110,   111,   112,   113,     0,
+       0,     0,     0,     0,     0,   114,   115,   116,   117,   118,
+       0,   105,   106,   147,   119,   120,   107,   108,   109,     0,
+     110,   111,   112,   113,     0,     0,     0,     0,     0,   154,
+     114,   115,   116,   117,   118,     0,   105,   106,     0,   119,
+     120,   107,   108,   109,     0,   110,   111,   112,   113,     0,
+       0,     0,     0,     0,     0,   114,   115,   116,   117,   118,
+       0,   -61,   -61,     0,   119,   120,   -61,   -61,   -61,     0,
+     -61,   -61,   -61,   -61,     0,     0,     0,     0,     0,     0,
+     -61,     0,     0,   -61,   -61,     0,     0,    60,     0,   -61,
+     -61
 };
 
 static const yytype_int16 yycheck[] =
 {
-       0,    10,     0,     0,     0,     0,    26,    27,    24,    59,
-      60,   193,    27,     1,    26,   231,    44,    24,    62,    63,
-      44,    65,    66,   228,    81,    36,   183,    38,   244,    86,
-      98,    21,   100,    48,    78,    79,    48,    44,   243,   209,
-      84,    85,    92,   200,     4,    33,    74,     7,     8,     9,
-      74,    81,   222,    21,    14,    71,    66,    17,    41,    46,
-      47,    81,    21,    23,    24,   247,    26,    27,    21,    85,
-      30,    31,    32,    21,    84,    85,    21,    13,    14,    21,
-      21,    41,    42,    81,    81,    21,    36,   269,    82,    74,
-      83,    82,    52,    86,    86,    21,    43,    97,    21,    59,
-      60,    97,    97,    43,    64,    86,    66,    86,    62,    63,
-      21,    65,    66,    21,    83,    21,    83,    44,    78,    21,
-     129,    75,    76,    77,    78,    79,    27,    21,    86,   138,
-      84,    85,    92,    32,    41,   144,    26,    41,    98,    99,
-     100,    27,    27,   152,   104,   105,   106,   107,   108,   109,
-     110,   111,   112,   113,   114,   115,   116,   117,   118,   119,
-      48,   121,    43,    27,   152,   233,    43,   127,    27,   192,
-      32,   149,   132,   133,    32,   135,   136,    97,   246,   139,
-      41,   217,   142,   143,   243,    24,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,   153,    -1,    -1,    -1,   220,   221,    -1,
-      -1,    -1,   225,    -1,   227,    -1,    -1,   216,   196,    -1,
-      -1,   199,    -1,    -1,   237,    -1,   239,    -1,    -1,   179,
-     180,   230,   210,   201,    -1,    -1,   204,   205,    -1,    56,
-      57,    -1,    -1,    -1,    61,    62,    63,   215,    65,    66,
-      67,    68,    -1,   203,   267,    -1,   224,    -1,    75,    -1,
-     259,    78,    79,   231,   214,    82,    -1,    84,    85,    -1,
-      -1,    -1,   240,    -1,   242,   243,    -1,    -1,    -1,    -1,
-      -1,   271,    -1,   233,   252,     0,     1,    -1,    -1,    -1,
-     258,    -1,   260,    -1,    -1,    -1,   246,    12,    13,    14,
-      15,    -1,    17,    18,    19,    20,    21,    22,   276,    -1,
-     278,    -1,    -1,    28,    -1,    30,    31,    32,    -1,    -1,
+       0,    11,     0,     0,     0,     0,    26,    27,   194,    60,
+      61,    44,     1,    25,    27,    26,    44,    81,    24,   184,
+     232,    13,    14,    81,   229,    46,    47,    41,    86,    21,
+      99,    21,   101,   245,    66,    48,   201,    48,    44,   244,
+     193,    74,    93,   210,     5,    34,    74,     8,     9,    10,
+      21,    21,    84,    85,    15,    21,   223,    18,    21,    21,
+      72,    81,   248,    24,    25,    21,    27,    28,   221,   222,
+      31,    32,    33,   226,    86,   228,    83,    21,    36,    86,
+      38,    42,    43,    81,   270,   238,    81,   240,    82,    74,
+      36,    82,    53,    86,    21,    43,    43,    21,    98,    60,
+      61,    98,    98,    86,    65,    86,    67,    21,    62,    63,
+      21,    65,    66,    21,    83,   268,    83,    21,    79,    44,
+     130,    75,    76,    77,    78,    79,    86,    27,    21,   139,
+      84,    85,    93,    32,    41,   145,    26,    32,    99,   100,
+     101,    43,    48,   153,   105,   106,   107,   108,   109,   110,
+     111,   112,   113,   114,   115,   116,   117,   118,   119,   120,
+      27,   122,    27,    27,   153,   234,    43,   128,    27,    41,
+      32,   150,   133,   134,   218,   136,   137,    98,   247,   140,
+      41,   244,   143,   144,    25,    10,    -1,    12,    13,    14,
+      15,    -1,    17,   154,    -1,    -1,    21,    22,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   217,   197,    -1,
+      -1,   200,    -1,    -1,    -1,    40,    -1,    42,    -1,   180,
+     181,   231,   211,   202,    -1,    -1,   205,   206,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,   216,    -1,    64,
+      -1,    -1,    -1,   204,    69,    -1,   225,    -1,    -1,    -1,
+     260,    76,    77,   232,   215,    -1,    -1,    82,    -1,    -1,
+      -1,    -1,   241,    -1,   243,   244,    -1,    -1,    -1,    -1,
+      -1,    -1,   272,   234,   253,     0,     1,    -1,    -1,    -1,
+     259,    -1,   261,    -1,    -1,    10,   247,    12,    13,    14,
+      15,    -1,    17,    18,    19,    20,    21,    22,   277,    -1,
+     279,    -1,    -1,    28,    -1,    30,    31,    32,    -1,    -1,
       35,    -1,    -1,    -1,    -1,    40,    41,    42,    62,    63,
       45,    65,    66,    -1,    49,    50,    51,    52,    -1,    -1,
       55,    -1,    76,    77,    78,    79,    -1,    -1,    -1,    64,
       84,    85,    -1,    -1,    69,    -1,    -1,    72,    73,    -1,
-      -1,    76,    77,    -1,    -1,    -1,    81,    82,    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,    -1,    69,    -1,    -1,    72,    73,
-      -1,    -1,    76,    77,    12,    13,    14,    15,    82,    17,
-      18,    19,    20,    21,    22,    -1,    -1,    -1,    -1,    27,
+      -1,    76,    77,    -1,    -1,    -1,    81,    82,    10,    -1,
+      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,    62,    63,    45,    65,    66,    -1,    49,    50,    51,
+      52,    -1,    -1,    55,    -1,    -1,    -1,    78,    79,    -1,
+      -1,    -1,    64,    84,    85,    -1,    -1,    69,    -1,    -1,
+      72,    73,    -1,    -1,    76,    77,    -1,    -1,    -1,    10,
+      82,    12,    13,    14,    15,    -1,    17,    18,    19,    20,
+      21,    22,    -1,    -1,    -1,    -1,    27,    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,    -1,    69,    -1,
+      -1,    -1,    73,    -1,    -1,    76,    77,    -1,    -1,    -1,
+      81,    82,    10,    -1,    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,    55,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    64,    -1,    -1,    -1,
       -1,    69,    -1,    -1,    -1,    73,    -1,    -1,    76,    77,
-      -1,    -1,    -1,    81,    82,    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,    55,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    64,    -1,    -1,
-      -1,    -1,    69,    -1,    -1,    -1,    73,    -1,    -1,    76,
-      77,    -1,    -1,    -1,    81,    82,    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,    55,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    64,    -1,
-      -1,    -1,    -1,    69,    -1,    -1,    -1,    73,    -1,    -1,
-      76,    77,    12,    13,    14,    15,    82,    17,    18,    19,
-      20,    21,    22,    -1,    -1,    -1,    44,    -1,    28,    -1,
-      30,    31,    -1,    -1,    -1,    -1,    -1,    -1,    56,    57,
-      40,    -1,    42,    61,    62,    63,    -1,    65,    66,    67,
-      68,    51,    52,    -1,    -1,    55,    74,    75,    76,    77,
-      78,    79,    -1,    -1,    64,    -1,    84,    85,    -1,    69,
-      -1,    -1,    -1,    73,    -1,    -1,    76,    77,    12,    13,
-      14,    15,    82,    17,    -1,    -1,    -1,    21,    22,    -1,
-      -1,    -1,    -1,    -1,    -1,    29,    -1,    -1,    -1,    -1,
-      34,    -1,    36,    37,    38,    39,    40,    -1,    42,    -1,
+      -1,    -1,    -1,    81,    82,    10,    -1,    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,
+      55,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    64,
+      -1,    -1,    -1,    -1,    69,    -1,    -1,    -1,    73,    -1,
+      -1,    76,    77,    -1,    -1,    -1,    10,    82,    12,    13,
+      14,    15,    -1,    17,    18,    19,    20,    21,    22,    -1,
+      -1,    -1,    44,    -1,    28,    -1,    30,    31,    -1,    -1,
+      -1,    -1,    -1,    -1,    56,    57,    40,    -1,    42,    61,
+      62,    63,    -1,    65,    66,    67,    68,    51,    52,    -1,
+      -1,    55,    74,    75,    76,    77,    78,    79,    -1,    -1,
+      64,    -1,    84,    85,    -1,    69,    -1,    -1,    -1,    73,
+      -1,    -1,    76,    77,    -1,    -1,    -1,    10,    82,    12,
+      13,    14,    15,    -1,    17,    -1,    -1,    -1,    21,    22,
+      -1,    -1,    -1,    -1,    -1,    -1,    29,    -1,    -1,    -1,
+      -1,    34,    -1,    36,    37,    38,    39,    40,    10,    42,
       12,    13,    14,    15,    -1,    17,    -1,    -1,    -1,    21,
-      22,    -1,    -1,    -1,    -1,    -1,    -1,    29,    -1,    -1,
-      64,    -1,    -1,    -1,    36,    69,    38,    -1,    40,    -1,
-      42,    -1,    76,    77,    -1,    -1,    -1,    -1,    82,    -1,
-      -1,    53,    -1,    -1,    12,    13,    14,    15,    -1,    17,
-      -1,    -1,    64,    21,    22,    -1,    -1,    69,    12,    13,
-      14,    15,    -1,    17,    76,    77,    -1,    21,    22,    -1,
-      82,    -1,    40,    -1,    42,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    40,    -1,    42,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    64,    33,    -1,    -1,
-      -1,    69,    -1,    -1,    -1,    -1,    -1,    -1,    76,    77,
-      64,    -1,    -1,    -1,    82,    69,    -1,    -1,    -1,    -1,
-      56,    57,    76,    77,    -1,    61,    62,    63,    82,    65,
-      66,    67,    68,    -1,    -1,    46,    -1,    -1,    -1,    75,
-      76,    77,    78,    79,    -1,    56,    57,    -1,    84,    85,
-      61,    62,    63,    -1,    65,    66,    67,    68,    -1,    -1,
-      -1,    -1,    -1,    -1,    75,    76,    77,    78,    79,    -1,
-      56,    57,    -1,    84,    85,    61,    62,    63,    -1,    65,
-      66,    67,    68,    -1,    70,    71,    -1,    -1,    -1,    75,
-      76,    77,    78,    79,    -1,    56,    57,    -1,    84,    85,
-      61,    62,    63,    -1,    65,    66,    67,    68,    -1,    -1,
-      -1,    -1,    -1,    74,    75,    76,    77,    78,    79,    -1,
-      56,    57,    83,    84,    85,    61,    62,    63,    -1,    65,
-      66,    67,    68,    -1,    -1,    -1,    -1,    -1,    -1,    75,
-      76,    77,    78,    79,    -1,    56,    57,    83,    84,    85,
-      61,    62,    63,    -1,    65,    66,    67,    68,    -1,    -1,
-      -1,    -1,    -1,    74,    75,    76,    77,    78,    79,    -1,
-      56,    57,    -1,    84,    85,    61,    62,    63,    -1,    65,
-      66,    67,    68,    -1,    -1,    -1,    -1,    -1,    -1,    75,
-      76,    77,    78,    79,    -1,    -1,    -1,    -1,    84,    85
+      22,    -1,    10,    -1,    12,    13,    14,    15,    -1,    17,
+      -1,    64,    -1,    21,    22,    -1,    69,    -1,    40,    -1,
+      42,    29,    -1,    76,    77,    -1,    -1,    -1,    36,    82,
+      38,    -1,    40,    -1,    42,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    64,    33,    -1,    53,    -1,    69,    -1,    -1,
+      -1,    -1,    -1,    -1,    76,    77,    64,    -1,    -1,    -1,
+      82,    69,    -1,    -1,    -1,    -1,    56,    57,    76,    77,
+      -1,    61,    62,    63,    82,    65,    66,    67,    68,    -1,
+      -1,    46,    -1,    -1,    -1,    75,    76,    77,    78,    79,
+      -1,    56,    57,    -1,    84,    85,    61,    62,    63,    -1,
+      65,    66,    67,    68,    -1,    -1,    -1,    -1,    -1,    -1,
+      75,    76,    77,    78,    79,    -1,    56,    57,    -1,    84,
+      85,    61,    62,    63,    -1,    65,    66,    67,    68,    -1,
+      70,    71,    -1,    -1,    -1,    75,    76,    77,    78,    79,
+      -1,    56,    57,    -1,    84,    85,    61,    62,    63,    -1,
+      65,    66,    67,    68,    -1,    -1,    -1,    -1,    -1,    74,
+      75,    76,    77,    78,    79,    -1,    56,    57,    83,    84,
+      85,    61,    62,    63,    -1,    65,    66,    67,    68,    -1,
+      -1,    -1,    -1,    -1,    -1,    75,    76,    77,    78,    79,
+      -1,    56,    57,    83,    84,    85,    61,    62,    63,    -1,
+      65,    66,    67,    68,    -1,    -1,    -1,    -1,    -1,    74,
+      75,    76,    77,    78,    79,    -1,    56,    57,    -1,    84,
+      85,    61,    62,    63,    -1,    65,    66,    67,    68,    -1,
+      -1,    -1,    -1,    -1,    -1,    75,    76,    77,    78,    79,
+      -1,    56,    57,    -1,    84,    85,    61,    62,    63,    -1,
+      65,    66,    67,    68,    -1,    -1,    -1,    -1,    -1,    -1,
+      75,    -1,    -1,    78,    79,    -1,    -1,    82,    -1,    84,
+      85
 };
 
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
    symbol of state STATE-NUM.  */
 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,    55,    64,    69,    72,    73,
-      76,    77,    82,    88,    90,    91,    92,    93,    94,   101,
-     102,   103,   108,   109,   110,   113,   116,   117,   124,    81,
-      89,    21,    40,    91,   109,   109,   109,   109,   125,    82,
-     105,    41,    21,   111,    29,    34,    36,    37,    38,    39,
-     109,   114,   115,    21,   109,    46,    47,    13,    14,    21,
-      21,    21,    21,   109,    53,   114,   115,    21,   112,   109,
-     109,    21,    21,   109,   109,   109,     0,    89,    82,    74,
-      82,   100,   109,   109,    56,    57,    61,    62,    63,    65,
-      66,    67,    68,    75,    76,    77,    78,    79,    84,    85,
-     109,    86,   125,   125,    86,   109,   109,    36,   115,   118,
-      33,    21,    44,    74,   109,    44,    74,    43,   119,    46,
-     115,    86,    70,    71,   120,   125,    83,    90,   100,   109,
-     100,   109,    43,    74,   106,   109,   109,   109,   109,   109,
+       0,     1,    10,    12,    13,    14,    15,    17,    18,    19,
+      20,    21,    22,    28,    30,    31,    32,    35,    40,    41,
+      42,    45,    49,    50,    51,    52,    55,    64,    69,    72,
+      73,    76,    77,    82,    88,    90,    91,    92,    93,    94,
+     101,   102,   103,   108,   109,   110,   113,   116,   117,   124,
+      81,    89,    21,    40,    91,   109,   109,   109,   109,   125,
+      82,   105,    41,    21,   111,    29,    34,    36,    37,    38,
+      39,   109,   114,   115,    21,   109,    46,    47,    13,    14,
+      21,    21,    21,    21,   109,    53,   114,   115,    21,   112,
+     109,   109,    21,    21,   109,   109,   109,     0,    89,    82,
+      74,    82,   100,   109,   109,    56,    57,    61,    62,    63,
+      65,    66,    67,    68,    75,    76,    77,    78,    79,    84,
+      85,   109,    86,   125,   125,    86,   109,   109,    36,   115,
+     118,    33,    21,    44,    74,   109,    44,    74,    43,   119,
+      46,   115,    86,    70,    71,   120,   125,    83,    90,   100,
+     109,   100,   109,    43,    74,   106,   109,   109,   109,   109,
      109,   109,   109,   109,   109,   109,   109,   109,   109,   109,
-     109,   109,    83,    21,   109,   105,    21,   109,   109,    44,
-      74,   109,   109,   105,   109,    21,   109,   109,   105,    83,
-     106,    83,    89,   105,   109,    21,   122,   109,   109,   122,
-     121,   107,    24,    44,   107,    92,   110,    86,    89,    89,
-     122,    89,    93,   106,    44,   109,   106,   106,    21,    86,
-     123,   123,    89,    27,   109,   106,    27,    48,   105,    26,
-      48,    97,    98,   104,    21,   107,   107,   123,    41,   106,
-     107,    32,   107,    96,    97,    99,   104,   105,    98,   106,
-     100,   107,   107,   106,   106,    99,   106,   100,    92,    48,
-      95,    43,    27,   106,    27,    27,    27,    43,   106,   105,
-     106,   105,    27,    41,    32,    32,   107,    92,    93,    41,
-     106,   106
+     109,   109,   109,    83,    21,   109,   105,    21,   109,   109,
+      44,    74,   109,   109,   105,   109,    21,   109,   109,   105,
+      83,   106,    83,    89,   105,   109,    21,   122,   109,   109,
+     122,   121,   107,    24,    44,   107,    92,   110,    86,    89,
+      89,   122,    89,    93,   106,    44,   109,   106,   106,    21,
+      86,   123,   123,    89,    27,   109,   106,    27,    48,   105,
+      26,    48,    97,    98,   104,    21,   107,   107,   123,    41,
+     106,   107,    32,   107,    96,    97,    99,   104,   105,    98,
+     106,   100,   107,   107,   106,   106,    99,   106,   100,    92,
+      48,    95,    43,    27,   106,    27,    27,    27,    43,   106,
+     105,   106,   105,    27,    41,    32,    32,   107,    92,    93,
+      41,   106,   106
 };
 
 #define yyerrok		(yyerrstatus = 0)
@@ -2229,34 +2232,41 @@ yyreduce:
   case 57:
 #line 360 "engines/director/lingo/lingo-gr.y"
     {
-		(yyval.code) = g_lingo->code1(g_lingo->c_stringpush);
+		(yyval.code) = g_lingo->code1(g_lingo->c_symbolpush);
 		g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); ;}
     break;
 
   case 58:
 #line 363 "engines/director/lingo/lingo-gr.y"
     {
-		(yyval.code) = g_lingo->code1(g_lingo->_handlers[*(yyvsp[(1) - (1)].s)]->u.func);
-		delete (yyvsp[(1) - (1)].s); ;}
+		(yyval.code) = g_lingo->code1(g_lingo->c_stringpush);
+		g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); ;}
     break;
 
   case 59:
 #line 366 "engines/director/lingo/lingo-gr.y"
     {
-		(yyval.code) = g_lingo->codeFunc((yyvsp[(1) - (4)].s), (yyvsp[(3) - (4)].narg));
-		delete (yyvsp[(1) - (4)].s); ;}
+		(yyval.code) = g_lingo->code1(g_lingo->_handlers[*(yyvsp[(1) - (1)].s)]->u.func);
+		delete (yyvsp[(1) - (1)].s); ;}
     break;
 
   case 60:
 #line 369 "engines/director/lingo/lingo-gr.y"
     {
+		(yyval.code) = g_lingo->codeFunc((yyvsp[(1) - (4)].s), (yyvsp[(3) - (4)].narg));
+		delete (yyvsp[(1) - (4)].s); ;}
+    break;
+
+  case 61:
+#line 372 "engines/director/lingo/lingo-gr.y"
+    {
 		(yyval.code) = g_lingo->code1(g_lingo->c_eval);
 		g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str());
 		delete (yyvsp[(1) - (1)].s); ;}
     break;
 
-  case 61:
-#line 373 "engines/director/lingo/lingo-gr.y"
+  case 62:
+#line 376 "engines/director/lingo/lingo-gr.y"
     {
 		(yyval.code) = g_lingo->codeConst(0); // Put dummy id
 		g_lingo->code1(g_lingo->c_theentitypush);
@@ -2266,8 +2276,8 @@ yyreduce:
 		g_lingo->code2(e, f); ;}
     break;
 
-  case 62:
-#line 380 "engines/director/lingo/lingo-gr.y"
+  case 63:
+#line 383 "engines/director/lingo/lingo-gr.y"
     {
 		(yyval.code) = g_lingo->code1(g_lingo->c_theentitypush);
 		inst e = 0, f = 0;
@@ -2276,139 +2286,132 @@ yyreduce:
 		g_lingo->code2(e, f); ;}
     break;
 
-  case 64:
-#line 387 "engines/director/lingo/lingo-gr.y"
+  case 65:
+#line 390 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_add); ;}
     break;
 
-  case 65:
-#line 388 "engines/director/lingo/lingo-gr.y"
+  case 66:
+#line 391 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_sub); ;}
     break;
 
-  case 66:
-#line 389 "engines/director/lingo/lingo-gr.y"
+  case 67:
+#line 392 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_mul); ;}
     break;
 
-  case 67:
-#line 390 "engines/director/lingo/lingo-gr.y"
+  case 68:
+#line 393 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_div); ;}
     break;
 
-  case 68:
-#line 391 "engines/director/lingo/lingo-gr.y"
+  case 69:
+#line 394 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_mod); ;}
     break;
 
-  case 69:
-#line 392 "engines/director/lingo/lingo-gr.y"
+  case 70:
+#line 395 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_gt); ;}
     break;
 
-  case 70:
-#line 393 "engines/director/lingo/lingo-gr.y"
+  case 71:
+#line 396 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_lt); ;}
     break;
 
-  case 71:
-#line 394 "engines/director/lingo/lingo-gr.y"
+  case 72:
+#line 397 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_neq); ;}
     break;
 
-  case 72:
-#line 395 "engines/director/lingo/lingo-gr.y"
+  case 73:
+#line 398 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_ge); ;}
     break;
 
-  case 73:
-#line 396 "engines/director/lingo/lingo-gr.y"
+  case 74:
+#line 399 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_le); ;}
     break;
 
-  case 74:
-#line 397 "engines/director/lingo/lingo-gr.y"
+  case 75:
+#line 400 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_and); ;}
     break;
 
-  case 75:
-#line 398 "engines/director/lingo/lingo-gr.y"
+  case 76:
+#line 401 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_or); ;}
     break;
 
-  case 76:
-#line 399 "engines/director/lingo/lingo-gr.y"
+  case 77:
+#line 402 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_not); ;}
     break;
 
-  case 77:
-#line 400 "engines/director/lingo/lingo-gr.y"
+  case 78:
+#line 403 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_ampersand); ;}
     break;
 
-  case 78:
-#line 401 "engines/director/lingo/lingo-gr.y"
+  case 79:
+#line 404 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_concat); ;}
     break;
 
-  case 79:
-#line 402 "engines/director/lingo/lingo-gr.y"
+  case 80:
+#line 405 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_contains); ;}
     break;
 
-  case 80:
-#line 403 "engines/director/lingo/lingo-gr.y"
+  case 81:
+#line 406 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_starts); ;}
     break;
 
-  case 81:
-#line 404 "engines/director/lingo/lingo-gr.y"
+  case 82:
+#line 407 "engines/director/lingo/lingo-gr.y"
     { (yyval.code) = (yyvsp[(2) - (2)].code); ;}
     break;
 
-  case 82:
-#line 405 "engines/director/lingo/lingo-gr.y"
+  case 83:
+#line 408 "engines/director/lingo/lingo-gr.y"
     { (yyval.code) = (yyvsp[(2) - (2)].code); g_lingo->code1(g_lingo->c_negate); ;}
     break;
 
-  case 83:
-#line 406 "engines/director/lingo/lingo-gr.y"
+  case 84:
+#line 409 "engines/director/lingo/lingo-gr.y"
     { (yyval.code) = (yyvsp[(2) - (3)].code); ;}
     break;
 
-  case 84:
-#line 407 "engines/director/lingo/lingo-gr.y"
+  case 85:
+#line 410 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_intersects); ;}
     break;
 
-  case 85:
-#line 408 "engines/director/lingo/lingo-gr.y"
+  case 86:
+#line 411 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_within); ;}
     break;
 
-  case 86:
-#line 411 "engines/director/lingo/lingo-gr.y"
+  case 87:
+#line 414 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_printtop); ;}
     break;
 
-  case 89:
-#line 414 "engines/director/lingo/lingo-gr.y"
+  case 90:
+#line 417 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_exitRepeat); ;}
     break;
 
-  case 90:
-#line 415 "engines/director/lingo/lingo-gr.y"
+  case 91:
+#line 418 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeConst(0); // Push fake value on stack
 							  g_lingo->code1(g_lingo->c_procret); ;}
     break;
 
-  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 94:
 #line 422 "engines/director/lingo/lingo-gr.y"
     {
@@ -2419,119 +2422,126 @@ yyreduce:
   case 95:
 #line 425 "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); ;}
+		g_lingo->code1(g_lingo->_handlers[*(yyvsp[(1) - (2)].s)]->u.func);
+		delete (yyvsp[(1) - (2)].s); ;}
     break;
 
   case 96:
 #line 428 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->codeFunc((yyvsp[(1) - (2)].s), (yyvsp[(2) - (2)].narg)); ;}
+    {
+		g_lingo->code2(g_lingo->c_voidpush, g_lingo->_handlers[*(yyvsp[(1) - (1)].s)]->u.func);
+		delete (yyvsp[(1) - (1)].s); ;}
     break;
 
   case 97:
-#line 429 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_open); ;}
+#line 431 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->codeFunc((yyvsp[(1) - (2)].s), (yyvsp[(2) - (2)].narg)); ;}
     break;
 
   case 98:
-#line 430 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code2(g_lingo->c_voidpush, g_lingo->c_open); ;}
+#line 432 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->code1(g_lingo->c_open); ;}
     break;
 
   case 99:
-#line 431 "engines/director/lingo/lingo-gr.y"
-    { Common::String s("sound-"); s += *(yyvsp[(2) - (3)].s); g_lingo->codeFunc(&s, (yyvsp[(3) - (3)].narg)); ;}
+#line 433 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->code2(g_lingo->c_voidpush, g_lingo->c_open); ;}
     break;
 
   case 100:
 #line 434 "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); ;}
+    { Common::String s("sound-"); s += *(yyvsp[(2) - (3)].s); g_lingo->codeFunc(&s, (yyvsp[(3) - (3)].narg)); ;}
     break;
 
   case 101:
-#line 435 "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); ;}
+#line 437 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->code1(g_lingo->c_global); g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); delete (yyvsp[(1) - (1)].s); ;}
     break;
 
   case 102:
 #line 438 "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); ;}
+    { g_lingo->code1(g_lingo->c_global); g_lingo->codeString((yyvsp[(3) - (3)].s)->c_str()); delete (yyvsp[(3) - (3)].s); ;}
     break;
 
   case 103:
-#line 439 "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); ;}
+#line 441 "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 104:
-#line 450 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_gotoloop); ;}
+#line 442 "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 105:
-#line 451 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_gotonext); ;}
+#line 453 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->code1(g_lingo->c_gotoloop); ;}
     break;
 
   case 106:
-#line 452 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_gotoprevious); ;}
+#line 454 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->code1(g_lingo->c_gotonext); ;}
     break;
 
   case 107:
-#line 453 "engines/director/lingo/lingo-gr.y"
-    {
-		g_lingo->codeConst(1);
-		g_lingo->code1(g_lingo->c_goto); ;}
+#line 455 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->code1(g_lingo->c_gotoprevious); ;}
     break;
 
   case 108:
 #line 456 "engines/director/lingo/lingo-gr.y"
     {
-		g_lingo->codeConst(3);
+		g_lingo->codeConst(1);
 		g_lingo->code1(g_lingo->c_goto); ;}
     break;
 
   case 109:
 #line 459 "engines/director/lingo/lingo-gr.y"
     {
+		g_lingo->codeConst(3);
+		g_lingo->code1(g_lingo->c_goto); ;}
+    break;
+
+  case 110:
+#line 462 "engines/director/lingo/lingo-gr.y"
+    {
 		g_lingo->codeConst(2);
 		g_lingo->code1(g_lingo->c_goto); ;}
     break;
 
-  case 114:
-#line 472 "engines/director/lingo/lingo-gr.y"
+  case 115:
+#line 475 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_playdone); ;}
     break;
 
-  case 115:
-#line 473 "engines/director/lingo/lingo-gr.y"
+  case 116:
+#line 476 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(1);
 		g_lingo->code1(g_lingo->c_play); ;}
     break;
 
-  case 116:
-#line 476 "engines/director/lingo/lingo-gr.y"
+  case 117:
+#line 479 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(3);
 		g_lingo->code1(g_lingo->c_play); ;}
     break;
 
-  case 117:
-#line 479 "engines/director/lingo/lingo-gr.y"
+  case 118:
+#line 482 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(2);
 		g_lingo->code1(g_lingo->c_play); ;}
     break;
 
-  case 118:
-#line 509 "engines/director/lingo/lingo-gr.y"
+  case 119:
+#line 512 "engines/director/lingo/lingo-gr.y"
     { g_lingo->_indef = true; g_lingo->_currentFactory.clear(); ;}
     break;
 
-  case 119:
-#line 510 "engines/director/lingo/lingo-gr.y"
+  case 120:
+#line 513 "engines/director/lingo/lingo-gr.y"
     {
 			g_lingo->codeConst(0); // Push fake value on stack
 			g_lingo->code1(g_lingo->c_procret);
@@ -2539,38 +2549,38 @@ yyreduce:
 			g_lingo->_indef = false; ;}
     break;
 
-  case 120:
-#line 515 "engines/director/lingo/lingo-gr.y"
+  case 121:
+#line 518 "engines/director/lingo/lingo-gr.y"
     {
 			g_lingo->codeFactory(*(yyvsp[(2) - (2)].s));
 		;}
     break;
 
-  case 121:
-#line 518 "engines/director/lingo/lingo-gr.y"
+  case 122:
+#line 521 "engines/director/lingo/lingo-gr.y"
     { g_lingo->_indef = true; ;}
     break;
 
-  case 122:
-#line 519 "engines/director/lingo/lingo-gr.y"
+  case 123:
+#line 522 "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 123:
-#line 523 "engines/director/lingo/lingo-gr.y"
+  case 124:
+#line 526 "engines/director/lingo/lingo-gr.y"
     { g_lingo->_indef = true; g_lingo->_currentFactory.clear(); ;}
     break;
 
-  case 124:
-#line 524 "engines/director/lingo/lingo-gr.y"
+  case 125:
+#line 527 "engines/director/lingo/lingo-gr.y"
     { g_lingo->_ignoreMe = true; ;}
     break;
 
-  case 125:
-#line 524 "engines/director/lingo/lingo-gr.y"
+  case 126:
+#line 527 "engines/director/lingo/lingo-gr.y"
     {
 				g_lingo->codeConst(0); // Push fake value on stack
 				g_lingo->code1(g_lingo->c_procret);
@@ -2584,33 +2594,33 @@ yyreduce:
 			;}
     break;
 
-  case 126:
-#line 536 "engines/director/lingo/lingo-gr.y"
+  case 127:
+#line 539 "engines/director/lingo/lingo-gr.y"
     { (yyval.narg) = 0; ;}
     break;
 
-  case 127:
-#line 537 "engines/director/lingo/lingo-gr.y"
+  case 128:
+#line 540 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeArg((yyvsp[(1) - (1)].s)); (yyval.narg) = 1; ;}
     break;
 
-  case 128:
-#line 538 "engines/director/lingo/lingo-gr.y"
+  case 129:
+#line 541 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeArg((yyvsp[(3) - (3)].s)); (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}
     break;
 
-  case 129:
-#line 539 "engines/director/lingo/lingo-gr.y"
+  case 130:
+#line 542 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeArg((yyvsp[(4) - (4)].s)); (yyval.narg) = (yyvsp[(1) - (4)].narg) + 1; ;}
     break;
 
-  case 130:
-#line 541 "engines/director/lingo/lingo-gr.y"
+  case 131:
+#line 544 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeArgStore(); ;}
     break;
 
-  case 131:
-#line 545 "engines/director/lingo/lingo-gr.y"
+  case 132:
+#line 548 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->code1(g_lingo->c_call);
 		g_lingo->codeString((yyvsp[(1) - (3)].s)->c_str());
@@ -2619,24 +2629,24 @@ yyreduce:
 		g_lingo->code1(numpar); ;}
     break;
 
-  case 132:
-#line 553 "engines/director/lingo/lingo-gr.y"
+  case 133:
+#line 556 "engines/director/lingo/lingo-gr.y"
     { (yyval.narg) = 0; ;}
     break;
 
-  case 133:
-#line 554 "engines/director/lingo/lingo-gr.y"
+  case 134:
+#line 557 "engines/director/lingo/lingo-gr.y"
     { (yyval.narg) = 1; ;}
     break;
 
-  case 134:
-#line 555 "engines/director/lingo/lingo-gr.y"
+  case 135:
+#line 558 "engines/director/lingo/lingo-gr.y"
     { (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}
     break;
 
 
 /* Line 1267 of yacc.c.  */
-#line 2640 "engines/director/lingo/lingo-gr.cpp"
+#line 2650 "engines/director/lingo/lingo-gr.cpp"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2850,6 +2860,6 @@ yyreturn:
 }
 
 
-#line 558 "engines/director/lingo/lingo-gr.y"
+#line 561 "engines/director/lingo/lingo-gr.y"
 
 
diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y
index 8c00780..b9f15aa 100644
--- a/engines/director/lingo/lingo-gr.y
+++ b/engines/director/lingo/lingo-gr.y
@@ -82,7 +82,7 @@ void yyerror(const char *s) {
 %token<e> THEENTITY THEENTITYWITHID
 %token<f> FLOAT
 %token<s> BLTIN BLTINNOARGS BLTINNOARGSORONE BLTINONEARG BLTINARGLIST
-%token<s> ID STRING HANDLER
+%token<s> ID STRING HANDLER SYMBOL
 %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 tINSTANCE
@@ -357,6 +357,9 @@ expr: INT		{ $$ = g_lingo->codeConst($1); }
 	| FLOAT		{
 		$$ = g_lingo->code1(g_lingo->c_fconstpush);
 		g_lingo->codeFloat($1); }
+	| SYMBOL	{
+		$$ = g_lingo->code1(g_lingo->c_symbolpush);
+		g_lingo->codeString($1->c_str()); }
 	| STRING		{
 		$$ = g_lingo->code1(g_lingo->c_stringpush);
 		g_lingo->codeString($1->c_str()); }
diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp
index dea1475..840c349 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 61
-#define YY_END_OF_BUFFER 62
+#define YY_NUM_RULES 62
+#define YY_END_OF_BUFFER 63
 /* This struct is not used in this scanner,
    but its presence is necessary. */
 struct yy_trans_info
@@ -373,31 +373,32 @@ struct yy_trans_info
 	flex_int32_t yy_verify;
 	flex_int32_t yy_nxt;
 	};
-static yyconst flex_int16_t yy_accept[211] =
+static yyconst flex_int16_t yy_accept[214] =
     {   0,
-        0,    0,   62,   60,    3,   58,   58,   60,   60,   57,
-       57,   57,   56,   57,   57,   54,   54,   54,   54,   54,
-       54,   54,   54,   54,   54,   54,   54,   54,   54,   54,
-       54,   54,    2,    2,    3,   58,    0,    0,    0,    0,
-        0,   59,   53,    1,   55,   56,   52,   50,   51,   54,
-       54,   54,   54,   54,   54,   54,   54,   54,   54,   18,
-        8,   54,   54,   54,   54,   54,   54,   54,   29,   30,
-       54,   32,   54,   54,   54,   54,   54,   54,   54,   54,
-       54,   44,   54,   54,    2,    2,    0,    1,   55,    4,
-       54,   54,   54,   54,   12,   54,   54,   54,   54,    0,
-
-       54,   54,   54,   54,   54,   25,   54,   54,   28,   54,
-       54,   54,   35,   54,   37,   54,   54,   54,   54,   54,
-       54,   54,    0,   54,    6,    7,   11,   14,   54,   54,
-       54,    0,   54,   54,   21,   22,   54,   54,   54,   27,
-       31,   33,   54,   54,   54,   54,   54,    0,   43,   48,
-       54,   46,   10,   54,   54,   15,   54,   17,   54,   54,
-       23,   54,   26,   54,   54,   38,   54,   54,   42,   42,
-       49,   54,    0,   54,   54,   16,   54,   54,   24,   54,
-       36,   45,   39,    0,   42,   47,    0,   54,   13,   54,
-       54,   54,    0,   42,    9,    5,   19,   54,   34,    0,
-
-       42,   54,    0,    0,   20,   41,    0,    0,   40,    0
+        0,    0,   63,   61,    3,   59,   59,   61,   61,   61,
+       58,   58,   58,   57,   58,   58,   55,   55,   55,   55,
+       55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
+       55,   55,   55,    2,    2,    3,   59,    0,    0,    0,
+        0,    0,   60,    4,   54,    1,   56,   57,   53,   51,
+       52,   55,   55,   55,   55,   55,   55,   55,   55,   55,
+       55,   19,    9,   55,   55,   55,   55,   55,   55,   55,
+       30,   31,   55,   33,   55,   55,   55,   55,   55,   55,
+       55,   55,   55,   45,   55,   55,    2,    2,    0,    4,
+        1,   56,    5,   55,   55,   55,   55,   13,   55,   55,
+
+       55,   55,    0,   55,   55,   55,   55,   55,   26,   55,
+       55,   29,   55,   55,   55,   36,   55,   38,   55,   55,
+       55,   55,   55,   55,   55,    0,   55,    7,    8,   12,
+       15,   55,   55,   55,    0,   55,   55,   22,   23,   55,
+       55,   55,   28,   32,   34,   55,   55,   55,   55,   55,
+        0,   44,   49,   55,   47,   11,   55,   55,   16,   55,
+       18,   55,   55,   24,   55,   27,   55,   55,   39,   55,
+       55,   43,   43,   50,   55,    0,   55,   55,   17,   55,
+       55,   25,   55,   37,   46,   40,    0,   43,   48,    0,
+       55,   14,   55,   55,   55,    0,   43,   10,    6,   20,
+
+       55,   35,    0,   43,   55,    0,    0,   21,   42,    0,
+        0,   41,    0
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -405,17 +406,17 @@ static yyconst flex_int32_t yy_ec[256] =
         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
         1,    1,    4,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    5,    1,    6,    1,    1,    7,    8,    1,    7,
-        7,    7,    7,    7,    9,   10,    7,   11,   11,   11,
-       11,   11,   11,   11,   11,   11,   11,    7,    1,   12,
-       13,   14,    1,    1,   15,   16,   17,   18,   19,   20,
-       21,   22,   23,   24,   24,   25,   26,   27,   28,   29,
-       30,   31,   32,   33,   34,   35,   36,   37,   38,   24,
-        1,    1,    1,    7,   39,    1,   40,   41,   42,   43,
-
-       44,   45,   46,   47,   48,   24,   24,   49,   50,   51,
-       52,   53,   54,   55,   56,   57,   58,   59,   60,   61,
-       62,   24,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    5,    1,    6,    7,    1,    8,    9,    1,    8,
+        8,    8,    8,    8,   10,   11,    8,   12,   12,   12,
+       12,   12,   12,   12,   12,   12,   12,    8,    1,   13,
+       14,   15,    1,    1,   16,   17,   18,   19,   20,   21,
+       22,   23,   24,   25,   25,   26,   27,   28,   29,   30,
+       31,   32,   33,   34,   35,   36,   37,   38,   39,   25,
+        1,    1,    1,    8,   40,    1,   41,   42,   43,   44,
+
+       45,   46,   47,   48,   49,   25,   25,   50,   51,   52,
+       53,   54,   55,   56,   57,   58,   59,   60,   61,   62,
+       63,   25,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -432,142 +433,144 @@ static yyconst flex_int32_t yy_ec[256] =
         1,    1,    1,    1,    1
     } ;
 
-static yyconst flex_int32_t yy_meta[63] =
+static yyconst flex_int32_t yy_meta[64] =
     {   0,
         1,    2,    3,    3,    2,    1,    1,    1,    1,    1,
-        4,    1,    1,    1,    5,    5,    5,    5,    5,    5,
+        1,    4,    1,    1,    1,    5,    5,    5,    5,    5,
         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
-        5,    5,    5,    5,    5,    5,    5,    5,    4,    5,
+        5,    5,    5,    5,    5,    5,    5,    5,    5,    6,
         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
         5,    5,    5,    5,    5,    5,    5,    5,    5,    5,
-        5,    5
+        5,    5,    5
     } ;
 
-static yyconst flex_int16_t yy_base[216] =
+static yyconst flex_int16_t yy_base[221] =
     {   0,
-        0,   61,  205,  519,   65,   69,   73,   77,  179,  519,
-      143,  137,   54,   70,  118,   58,    0,   58,   59,   69,
-       74,   70,   70,   71,   88,  105,  107,  110,   81,  142,
-      117,  125,  151,  174,  178,  519,  185,  191,  198,   77,
-      102,  519,  519,    0,   82,  132,  519,  519,  519,    0,
-       94,  123,  170,  135,  166,  175,  187,  192,  164,   99,
-        0,  180,  186,  191,  182,  206,  182,  187,    0,    0,
-      203,    0,  210,  207,  195,  202,  201,  206,  214,  231,
-      229,    0,  234,  223,  257,  272,  231,    0,   80,    0,
-      233,  235,  240,  249,    0,  237,  239,  255,  267,  283,
-
-      253,  270,  266,  266,  262,    0,  269,  266,    0,  273,
-      263,  267,    0,  284,    0,  279,  281,  276,  310,  284,
-      293,  291,  301,  312,    0,    0,    0,    0,  304,  314,
-      319,  308,  324,  310,    0,    0,  315,  316,  327,    0,
-        0,    0,  324,  333,  331,  318,  320,  352,    0,    0,
-      336,  339,  161,  340,  335,    0,  344,  519,  343,  344,
-        0,  360,    0,  353,  349,    0,  360,  351,  384,  390,
-        0,  358,  394,  364,  359,    0,  381,  382,    0,  376,
-        0,    0,    0,  409,  414,    0,  382,  380,    0,  394,
-      401,  390,  404,  423,  519,    0,    0,  396,    0,  428,
-
-      430,  399,  445,  446,    0,  452,  419,  457,  458,  519,
-      498,  500,  505,  509,  513
+        0,   62,  166,  531,   66,   70,   74,   78,  158,    0,
+      531,  145,  128,   54,   70,  119,   58,    0,   58,   59,
+       70,   73,   71,   71,   72,  110,   89,  115,   81,   82,
+      128,  112,  126,  174,  185,  189,  531,  193,  197,  201,
+       78,   89,  531,    0,  531,    0,   81,  141,  531,  531,
+      531,    0,  140,  116,  172,  113,  164,  161,  183,  191,
+      127,  101,    0,  178,  184,  196,  182,  208,  181,  189,
+        0,    0,  200,    0,  209,  208,  196,  201,  200,  203,
+      209,  232,  229,    0,  236,  217,  267,  274,  226,    0,
+        0,   79,    0,  229,  237,  236,  241,    0,  232,  233,
+
+      253,  267,  287,  259,  274,  266,  266,  276,    0,  276,
+      268,    0,  277,  267,  271,    0,  288,    0,  282,  287,
+      281,  310,  288,  292,  291,  303,  312,    0,    0,    0,
+        0,  303,  315,  325,  314,  328,  314,    0,    0,  318,
+      320,  330,    0,    0,    0,  327,  336,  335,  323,  324,
+      359,    0,    0,  335,  335,  213,  339,  333,    0,  346,
+      531,  346,  345,    0,  349,    0,  354,  351,    0,  366,
+      357,  389,  395,    0,  367,  399,  375,  366,    0,  369,
+      379,    0,  371,    0,    0,    0,  408,  413,    0,  387,
+      384,    0,  401,  404,  387,  407,  429,  531,    0,    0,
+
+      391,    0,  430,  434,  405,  438,  449,    0,  450,  421,
+      454,  455,  531,  502,  504,  507,  510,  516,  521,  525
     } ;
 
-static yyconst flex_int16_t yy_def[216] =
+static yyconst flex_int16_t yy_def[221] =
     {   0,
-      210,    1,  210,  210,  210,  210,  210,  210,  211,  210,
-      210,  210,  210,  210,  210,  212,  212,  212,  212,  212,
-      212,  212,  212,  212,  212,  212,  212,  212,  212,  212,
-      212,  212,  210,  210,  210,  210,  210,  210,  210,  210,
-      211,  210,  210,  213,  210,  210,  210,  210,  210,  212,
-      212,  212,  212,  212,  212,  212,  212,  212,  212,  212,
-      212,  212,  212,  212,  212,  212,  212,  212,  212,  212,
-      212,  212,  212,  212,  212,  212,  212,  212,  212,  212,
-      212,  212,  212,  212,  210,  210,  210,  213,  210,  212,
-      212,  212,  212,  212,  212,  212,  212,  212,  212,  210,
-
-      212,  212,  212,  212,  212,  212,  212,  212,  212,  212,
-      212,  212,  212,  212,  212,  212,  212,  212,  212,  212,
-      212,  212,  210,  212,  212,  212,  212,  212,  212,  212,
-      212,  210,  212,  212,  212,  212,  212,  212,  212,  212,
-      212,  212,  212,  212,  212,  212,  212,  214,  212,  212,
-      212,  212,  210,  212,  212,  212,  212,  210,  212,  212,
-      212,  212,  212,  212,  212,  212,  212,  212,  214,  214,
-      212,  212,  210,  212,  212,  212,  212,  212,  212,  212,
-      212,  212,  212,  210,  214,  212,  210,  212,  212,  212,
-      212,  212,  210,  214,  210,  212,  212,  212,  212,  210,
-
-      214,  212,  215,  210,  212,  215,  210,  210,  215,    0,
-      210,  210,  210,  210,  210
+      213,    1,  213,  213,  213,  213,  213,  213,  214,  215,
+      213,  213,  213,  213,  213,  213,  216,  216,  216,  216,
+      216,  216,  216,  216,  216,  216,  216,  216,  216,  216,
+      216,  216,  216,  213,  213,  213,  213,  213,  213,  213,
+      213,  214,  213,  217,  213,  218,  213,  213,  213,  213,
+      213,  216,  216,  216,  216,  216,  216,  216,  216,  216,
+      216,  216,  216,  216,  216,  216,  216,  216,  216,  216,
+      216,  216,  216,  216,  216,  216,  216,  216,  216,  216,
+      216,  216,  216,  216,  216,  216,  213,  213,  213,  217,
+      218,  213,  216,  216,  216,  216,  216,  216,  216,  216,
+
+      216,  216,  213,  216,  216,  216,  216,  216,  216,  216,
+      216,  216,  216,  216,  216,  216,  216,  216,  216,  216,
+      216,  216,  216,  216,  216,  213,  216,  216,  216,  216,
+      216,  216,  216,  216,  213,  216,  216,  216,  216,  216,
+      216,  216,  216,  216,  216,  216,  216,  216,  216,  216,
+      219,  216,  216,  216,  216,  213,  216,  216,  216,  216,
+      213,  216,  216,  216,  216,  216,  216,  216,  216,  216,
+      216,  219,  219,  216,  216,  213,  216,  216,  216,  216,
+      216,  216,  216,  216,  216,  216,  213,  219,  216,  213,
+      216,  216,  216,  216,  216,  213,  219,  213,  216,  216,
+
+      216,  216,  213,  219,  216,  220,  213,  216,  220,  213,
+      213,  220,    0,  213,  213,  213,  213,  213,  213,  213
     } ;
 
-static yyconst flex_int16_t yy_nxt[582] =
+static yyconst flex_int16_t yy_nxt[595] =
     {   0,
-        4,    5,    6,    7,    8,    9,   10,   11,   12,    4,
-       13,   14,   10,   15,   16,   17,   18,   19,   20,   21,
-       22,   17,   23,   17,   24,   25,   26,   27,   28,   17,
-       29,   30,   31,   17,   17,   32,   17,   17,   17,   16,
-       17,   18,   19,   20,   21,   22,   17,   23,   24,   25,
-       26,   27,   28,   17,   29,   30,   31,   17,   17,   32,
-       17,   17,   33,   45,   46,   34,   35,   36,   36,   37,
-       38,   39,   39,   38,   38,   39,   39,   38,   37,   36,
-       36,   37,   47,   48,   51,   52,   53,   40,   57,   61,
-       89,   40,   89,   54,   59,   55,   62,   60,   63,   76,
-
-      100,   87,   64,  100,   58,   56,   65,   42,   51,   52,
-       53,   90,   40,   57,   61,   66,   40,   54,   59,   55,
-       62,   60,   63,   67,   76,   87,   69,   64,   58,   56,
-       49,   65,   68,   70,   73,   71,   90,   72,   81,   66,
-       74,   45,   46,   75,   82,   44,   83,   84,   67,   91,
-       43,   69,   85,   36,   36,   86,   68,   70,   73,   71,
-       77,   72,  173,   81,   74,  173,   94,   75,   82,   78,
-       79,   83,   84,   91,   80,   86,   36,   36,   86,   35,
-       36,   36,   37,   95,   42,   77,   37,   36,   36,   37,
-       94,   99,   38,   78,   79,   38,   92,   96,   80,   38,
-
-       39,   39,   38,   97,  210,   93,   98,  104,   95,   40,
-      210,  101,  102,  103,  105,   99,   40,  210,  108,  109,
-       92,  110,   96,  106,  111,  112,  210,  113,   97,   93,
-      114,   98,  104,  115,   40,  101,  102,  103,  105,  116,
-      107,   40,  108,  109,  117,  118,  110,  119,  106,  111,
-      112,  113,  120,  125,  114,  122,  121,  115,   85,   36,
-       36,   86,  123,  116,  107,  124,  126,  127,  117,  128,
-      118,  129,  119,   86,   36,   36,   86,  120,  125,  122,
-      130,  121,  131,  138,  100,  133,  123,  100,  134,  124,
-      126,  139,  127,  128,  136,  129,  137,  135,  140,  141,
-
-      142,  143,  144,  146,  130,  145,  147,  131,  138,  133,
-      150,  148,  152,  134,  148,  132,  139,  151,  136,  153,
-      137,  135,  140,  141,  142,  143,  154,  144,  146,  145,
-      147,  155,  156,  157,  150,  158,  149,  152,  159,  132,
-      160,  151,  161,  162,  153,  163,  164,  165,  166,  210,
-      167,  154,  168,  148,  171,  155,  148,  156,  157,  158,
-      149,  172,  174,  159,  160,  175,  161,  162,  176,  177,
-      163,  164,  165,  166,  167,  178,  168,  179,  182,  171,
-      180,  181,  183,  170,  186,  184,  172,  174,  184,  175,
-      188,  184,  176,  177,  184,  173,  189,  190,  173,  178,
-
-      191,  195,  179,  182,  180,  181,  183,  170,  186,  192,
-      184,  196,  197,  184,  188,  184,  187,  198,  184,  185,
-      189,  199,  190,  200,  184,  191,  195,  184,  202,  203,
-      205,  204,  203,  192,  204,  196,  193,  197,  208,  210,
-      210,  187,  198,  185,  194,  199,  203,  204,  200,  203,
-      204,  210,  202,  210,  205,  201,  210,  210,  209,  209,
-      193,  209,  209,  208,  210,  210,  210,  210,  194,  210,
-      210,  210,  210,  207,  210,  210,  210,  210,  210,  201,
-      210,  210,  210,  210,  210,  210,  210,  210,  210,  210,
-      210,  210,  210,  210,  210,  210,  210,  207,   41,   41,
-
-      210,   41,   41,   50,   50,   88,   88,  210,   88,   88,
-      169,  210,  210,  169,  206,  210,  210,  206,    3,  210,
-      210,  210,  210,  210,  210,  210,  210,  210,  210,  210,
-      210,  210,  210,  210,  210,  210,  210,  210,  210,  210,
-      210,  210,  210,  210,  210,  210,  210,  210,  210,  210,
-      210,  210,  210,  210,  210,  210,  210,  210,  210,  210,
-      210,  210,  210,  210,  210,  210,  210,  210,  210,  210,
-      210,  210,  210,  210,  210,  210,  210,  210,  210,  210,
-      210
+        4,    5,    6,    7,    8,    9,   10,   11,   12,   13,
+        4,   14,   15,   11,   16,   17,   18,   19,   20,   21,
+       22,   23,   18,   24,   18,   25,   26,   27,   28,   29,
+       18,   30,   31,   32,   18,   18,   33,   18,   18,   18,
+       17,   18,   19,   20,   21,   22,   23,   18,   24,   25,
+       26,   27,   28,   29,   18,   30,   31,   32,   18,   18,
+       33,   18,   18,   34,   47,   48,   35,   36,   37,   37,
+       38,   39,   40,   40,   39,   39,   40,   40,   39,   38,
+       37,   37,   38,   49,   50,   53,   54,   55,   59,   41,
+       92,   63,   92,   41,   43,   56,   61,   57,   64,   62,
+
+       65,   78,  103,   89,   60,  103,   75,   58,   69,   53,
+       54,   55,   76,   59,   41,   77,   63,   70,   41,   56,
+       61,   57,   64,   62,   65,   66,   78,   89,   60,   67,
+       75,   58,   51,   69,   83,   71,   76,   46,   68,   77,
+       84,   70,   72,   94,   73,   97,   74,   79,   85,   86,
+       66,   47,   48,   45,   67,  102,   80,   81,   93,   83,
+       71,   82,   68,   43,   84,  213,   72,   94,   73,   97,
+       74,  213,   79,   85,   86,   87,   37,   37,   88,  102,
+       80,   81,   98,   93,   99,   82,   88,   37,   37,   88,
+       36,   37,   37,   38,   38,   37,   37,   38,   39,   95,
+
+      100,   39,   39,   40,   40,   39,  101,   98,   96,   99,
+      104,  105,  106,  107,  176,  108,   41,  176,  111,  113,
+       41,  213,  112,   95,  114,  100,  109,  115,  213,  116,
+      117,  101,   96,  118,  104,  105,  106,  119,  107,  108,
+      120,   41,  111,  110,  113,   41,  112,  121,  122,  114,
+      125,  109,  115,  116,  117,  123,  128,  118,  126,  124,
+      130,  119,  127,  129,  120,  131,  132,  110,   87,   37,
+       37,   88,  121,  122,  125,   88,   37,   37,   88,  133,
+      123,  128,  126,  134,  124,  130,  127,  129,  103,  131,
+      132,  103,  136,  137,  213,  139,  213,  140,  141,  142,
+
+      213,  143,  138,  133,  144,  145,  146,  147,  134,  148,
+      149,  151,  150,  155,  151,  153,  136,  154,  137,  139,
+      135,  140,  156,  141,  142,  143,  138,  157,  144,  145,
+      146,  158,  147,  148,  159,  149,  150,  152,  155,  153,
+      160,  154,  161,  162,  135,  163,  164,  156,  165,  166,
+      167,  168,  157,  169,  174,  158,  170,  171,  175,  159,
+      151,  152,  177,  151,  178,  160,  161,  182,  162,  163,
+      164,  179,  165,  180,  166,  167,  168,  181,  169,  174,
+      170,  171,  183,  175,  184,  185,  193,  177,  178,  186,
+      187,  173,  182,  187,  189,  179,  187,  180,  194,  187,
+
+      176,  181,  191,  176,  192,  195,  183,  198,  184,  187,
+      185,  193,  187,  186,  187,  173,  199,  187,  189,  202,
+      200,  201,  190,  194,  205,  188,  191,  203,  192,  195,
+      187,  206,  198,  187,  206,  207,  196,  208,  207,  206,
+      199,  211,  206,  202,  197,  200,  201,  190,  205,  188,
+      207,  213,  203,  207,  213,  212,  212,  213,  212,  212,
+      196,  208,  204,  213,  213,  213,  211,  213,  197,  213,
+      213,  213,  213,  213,  213,  213,  213,  210,  213,  213,
+      213,  213,  213,  213,  213,  213,  204,  213,  213,  213,
+      213,  213,  213,  213,  213,  213,  213,  213,  213,  213,
+
+      213,  210,   42,   42,  213,   42,   42,   42,   44,   44,
+       52,   52,   52,   90,   90,   90,   91,   91,  213,   91,
+       91,   91,  172,  213,  213,  172,  209,  213,  213,  209,
+        3,  213,  213,  213,  213,  213,  213,  213,  213,  213,
+      213,  213,  213,  213,  213,  213,  213,  213,  213,  213,
+      213,  213,  213,  213,  213,  213,  213,  213,  213,  213,
+      213,  213,  213,  213,  213,  213,  213,  213,  213,  213,
+      213,  213,  213,  213,  213,  213,  213,  213,  213,  213,
+      213,  213,  213,  213,  213,  213,  213,  213,  213,  213,
+      213,  213,  213,  213
+
     } ;
 
-static yyconst flex_int16_t yy_chk[582] =
+static yyconst flex_int16_t yy_chk[595] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -575,64 +578,66 @@ static yyconst flex_int16_t yy_chk[582] =
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    1,    2,   13,   13,    2,    5,    5,    5,    5,
-        6,    6,    6,    6,    7,    7,    7,    7,    8,    8,
-        8,    8,   14,   14,   16,   18,   19,    6,   21,   23,
-       89,    7,   45,   20,   22,   20,   23,   22,   24,   29,
-
-       60,   40,   25,   60,   21,   20,   25,   41,   16,   18,
-       19,   51,    6,   21,   23,   25,    7,   20,   22,   20,
-       23,   22,   24,   26,   29,   40,   27,   25,   21,   20,
-       15,   25,   26,   27,   28,   27,   51,   27,   31,   25,
-       28,   46,   46,   28,   31,   12,   32,   32,   26,   52,
-       11,   27,   33,   33,   33,   33,   26,   27,   28,   27,
-       30,   27,  153,   31,   28,  153,   54,   28,   31,   30,
-       30,   32,   32,   52,   30,   34,   34,   34,   34,   35,
-       35,   35,   35,   55,    9,   30,   37,   37,   37,   37,
-       54,   59,   38,   30,   30,   38,   53,   56,   30,   39,
-
-       39,   39,   39,   57,    3,   53,   58,   64,   55,   38,
-        0,   62,   62,   63,   65,   59,   39,    0,   67,   68,
-       53,   71,   56,   66,   73,   74,    0,   75,   57,   53,
-       76,   58,   64,   77,   38,   62,   62,   63,   65,   78,
-       66,   39,   67,   68,   79,   80,   71,   81,   66,   73,
-       74,   75,   83,   92,   76,   84,   83,   77,   85,   85,
-       85,   85,   87,   78,   66,   91,   93,   94,   79,   96,
-       80,   97,   81,   86,   86,   86,   86,   83,   92,   84,
-       98,   83,   99,  105,  100,  101,   87,  100,  102,   91,
-       93,  107,   94,   96,  103,   97,  104,  102,  108,  110,
-
-      111,  112,  114,  117,   98,  116,  118,   99,  105,  101,
-      120,  119,  122,  102,  119,  100,  107,  121,  103,  123,
-      104,  102,  108,  110,  111,  112,  124,  114,  117,  116,
-      118,  129,  130,  131,  120,  132,  119,  122,  133,  100,
-      134,  121,  137,  138,  123,  139,  143,  144,  145,    0,
-      146,  124,  147,  148,  151,  129,  148,  130,  131,  132,
-      119,  152,  154,  133,  134,  155,  137,  138,  157,  159,
-      139,  143,  144,  145,  146,  160,  147,  162,  167,  151,
-      164,  165,  168,  148,  172,  169,  152,  154,  169,  155,
-      174,  170,  157,  159,  170,  173,  175,  177,  173,  160,
-
-      178,  187,  162,  167,  164,  165,  168,  148,  172,  180,
-      184,  188,  190,  184,  174,  185,  173,  191,  185,  170,
-      175,  192,  177,  193,  194,  178,  187,  194,  198,  200,
-      202,  201,  200,  180,  201,  188,  184,  190,  207,    0,
-        0,  173,  191,  170,  185,  192,  203,  204,  193,  203,
-      204,    0,  198,  206,  202,  194,  206,    0,  208,  209,
-      184,  208,  209,  207,    0,    0,    0,    0,  185,    0,
-        0,    0,    0,  204,    0,    0,    0,    0,    0,  194,
+        1,    1,    1,    2,   14,   14,    2,    5,    5,    5,
+        5,    6,    6,    6,    6,    7,    7,    7,    7,    8,
+        8,    8,    8,   15,   15,   17,   19,   20,   22,    6,
+       92,   24,   47,    7,   42,   21,   23,   21,   24,   23,
+
+       25,   30,   62,   41,   22,   62,   29,   21,   27,   17,
+       19,   20,   29,   22,    6,   29,   24,   27,    7,   21,
+       23,   21,   24,   23,   25,   26,   30,   41,   22,   26,
+       29,   21,   16,   27,   32,   28,   29,   13,   26,   29,
+       32,   27,   28,   54,   28,   56,   28,   31,   33,   33,
+       26,   48,   48,   12,   26,   61,   31,   31,   53,   32,
+       28,   31,   26,    9,   32,    3,   28,   54,   28,   56,
+       28,    0,   31,   33,   33,   34,   34,   34,   34,   61,
+       31,   31,   57,   53,   58,   31,   35,   35,   35,   35,
+       36,   36,   36,   36,   38,   38,   38,   38,   39,   55,
+
+       59,   39,   40,   40,   40,   40,   60,   57,   55,   58,
+       64,   64,   65,   66,  156,   67,   39,  156,   69,   73,
+       40,    0,   70,   55,   75,   59,   68,   76,    0,   77,
+       78,   60,   55,   79,   64,   64,   65,   80,   66,   67,
+       81,   39,   69,   68,   73,   40,   70,   82,   83,   75,
+       86,   68,   76,   77,   78,   85,   95,   79,   89,   85,
+       97,   80,   94,   96,   81,   99,  100,   68,   87,   87,
+       87,   87,   82,   83,   86,   88,   88,   88,   88,  101,
+       85,   95,   89,  102,   85,   97,   94,   96,  103,   99,
+      100,  103,  104,  105,    0,  106,    0,  107,  108,  110,
+
+        0,  111,  105,  101,  113,  114,  115,  117,  102,  119,
+      120,  122,  121,  125,  122,  123,  104,  124,  105,  106,
+      103,  107,  126,  108,  110,  111,  105,  127,  113,  114,
+      115,  132,  117,  119,  133,  120,  121,  122,  125,  123,
+      134,  124,  135,  136,  103,  137,  140,  126,  141,  142,
+      146,  147,  127,  148,  154,  132,  149,  150,  155,  133,
+      151,  122,  157,  151,  158,  134,  135,  165,  136,  137,
+      140,  160,  141,  162,  142,  146,  147,  163,  148,  154,
+      149,  150,  167,  155,  168,  170,  180,  157,  158,  171,
+      172,  151,  165,  172,  175,  160,  173,  162,  181,  173,
+
+      176,  163,  177,  176,  178,  183,  167,  190,  168,  187,
+      170,  180,  187,  171,  188,  151,  191,  188,  175,  195,
+      193,  194,  176,  181,  201,  173,  177,  196,  178,  183,
+      197,  203,  190,  197,  203,  204,  187,  205,  204,  206,
+      191,  210,  206,  195,  188,  193,  194,  176,  201,  173,
+      207,  209,  196,  207,  209,  211,  212,    0,  211,  212,
+      187,  205,  197,    0,    0,    0,  210,    0,  188,    0,
+        0,    0,    0,    0,    0,    0,    0,  207,    0,    0,
+        0,    0,    0,    0,    0,    0,  197,    0,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,    0,  204,  211,  211,
-
-        0,  211,  211,  212,  212,  213,  213,    0,  213,  213,
-      214,    0,    0,  214,  215,    0,    0,  215,  210,  210,
-      210,  210,  210,  210,  210,  210,  210,  210,  210,  210,
-      210,  210,  210,  210,  210,  210,  210,  210,  210,  210,
-      210,  210,  210,  210,  210,  210,  210,  210,  210,  210,
-      210,  210,  210,  210,  210,  210,  210,  210,  210,  210,
-      210,  210,  210,  210,  210,  210,  210,  210,  210,  210,
-      210,  210,  210,  210,  210,  210,  210,  210,  210,  210,
-      210
+
+        0,  207,  214,  214,    0,  214,  214,  214,  215,  215,
+      216,  216,  216,  217,  217,  217,  218,  218,    0,  218,
+      218,  218,  219,    0,    0,  219,  220,    0,    0,  220,
+      213,  213,  213,  213,  213,  213,  213,  213,  213,  213,
+      213,  213,  213,  213,  213,  213,  213,  213,  213,  213,
+      213,  213,  213,  213,  213,  213,  213,  213,  213,  213,
+      213,  213,  213,  213,  213,  213,  213,  213,  213,  213,
+      213,  213,  213,  213,  213,  213,  213,  213,  213,  213,
+      213,  213,  213,  213,  213,  213,  213,  213,  213,  213,
+      213,  213,  213,  213
+
     } ;
 
 static yy_state_type yy_last_accepting_state;
@@ -706,7 +711,7 @@ static void countnl() {
 	g_lingo->_colnumber = strlen(p);
 }
 
-#line 710 "engines/director/lingo/lingo-lex.cpp"
+#line 715 "engines/director/lingo/lingo-lex.cpp"
 
 #define INITIAL 0
 
@@ -894,7 +899,7 @@ YY_DECL
 #line 69 "engines/director/lingo/lingo-lex.l"
 
 
-#line 898 "engines/director/lingo/lingo-lex.cpp"
+#line 903 "engines/director/lingo/lingo-lex.cpp"
 
 	if ( !(yy_init) )
 		{
@@ -948,13 +953,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 >= 211 )
+				if ( yy_current_state >= 214 )
 					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] != 519 );
+		while ( yy_base[yy_current_state] != 531 );
 
 yy_find_action:
 		yy_act = yy_accept[yy_current_state];
@@ -996,188 +1001,193 @@ YY_RULE_SETUP
 case 4:
 YY_RULE_SETUP
 #line 75 "engines/director/lingo/lingo-lex.l"
-{ count(); return tAND; }
+{ count(); yylval.s = new Common::String(yytext); return SYMBOL; }
 	YY_BREAK
 case 5:
 YY_RULE_SETUP
-#line 76 "engines/director/lingo/lingo-lex.l"
-{ count(); return tCONTAINS; }
+#line 77 "engines/director/lingo/lingo-lex.l"
+{ count(); return tAND; }
 	YY_BREAK
 case 6:
 YY_RULE_SETUP
-#line 77 "engines/director/lingo/lingo-lex.l"
-{ count(); return tDONE; }
+#line 78 "engines/director/lingo/lingo-lex.l"
+{ count(); return tCONTAINS; }
 	YY_BREAK
 case 7:
 YY_RULE_SETUP
-#line 78 "engines/director/lingo/lingo-lex.l"
-{ count(); return tDOWN; }
+#line 79 "engines/director/lingo/lingo-lex.l"
+{ count(); return tDONE; }
 	YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 79 "engines/director/lingo/lingo-lex.l"
-{ count(); return tIF; }
+#line 80 "engines/director/lingo/lingo-lex.l"
+{ count(); return tDOWN; }
 	YY_BREAK
 case 9:
-/* rule 9 can match eol */
 YY_RULE_SETUP
-#line 80 "engines/director/lingo/lingo-lex.l"
-{ countnl(); return tNLELSIF; }
+#line 81 "engines/director/lingo/lingo-lex.l"
+{ count(); return tIF; }
 	YY_BREAK
 case 10:
 /* rule 10 can match eol */
 YY_RULE_SETUP
-#line 81 "engines/director/lingo/lingo-lex.l"
-{ countnl(); return tNLELSE; }
+#line 82 "engines/director/lingo/lingo-lex.l"
+{ countnl(); return tNLELSIF; }
 	YY_BREAK
 case 11:
+/* rule 11 can match eol */
 YY_RULE_SETUP
-#line 82 "engines/director/lingo/lingo-lex.l"
-{ count(); return tELSE; }
+#line 83 "engines/director/lingo/lingo-lex.l"
+{ countnl(); return tNLELSE; }
 	YY_BREAK
 case 12:
 YY_RULE_SETUP
-#line 83 "engines/director/lingo/lingo-lex.l"
-{ count(); return tEND; }
+#line 84 "engines/director/lingo/lingo-lex.l"
+{ count(); return tELSE; }
 	YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 84 "engines/director/lingo/lingo-lex.l"
-{ count(); return tFACTORY; }
+#line 85 "engines/director/lingo/lingo-lex.l"
+{ count(); return tEND; }
 	YY_BREAK
 case 14:
 YY_RULE_SETUP
-#line 85 "engines/director/lingo/lingo-lex.l"
-{ count(); return tEXIT; }
+#line 86 "engines/director/lingo/lingo-lex.l"
+{ count(); return tFACTORY; }
 	YY_BREAK
 case 15:
 YY_RULE_SETUP
-#line 86 "engines/director/lingo/lingo-lex.l"
-{ count(); return tFRAME; }
+#line 87 "engines/director/lingo/lingo-lex.l"
+{ count(); return tEXIT; }
 	YY_BREAK
 case 16:
 YY_RULE_SETUP
-#line 87 "engines/director/lingo/lingo-lex.l"
-{ count(); return tGLOBAL; }
+#line 88 "engines/director/lingo/lingo-lex.l"
+{ count(); return tFRAME; }
 	YY_BREAK
 case 17:
 YY_RULE_SETUP
-#line 88 "engines/director/lingo/lingo-lex.l"
-{ count(); return tGO; }
+#line 89 "engines/director/lingo/lingo-lex.l"
+{ count(); return tGLOBAL; }
 	YY_BREAK
 case 18:
 YY_RULE_SETUP
-#line 89 "engines/director/lingo/lingo-lex.l"
+#line 90 "engines/director/lingo/lingo-lex.l"
 { count(); return tGO; }
 	YY_BREAK
 case 19:
 YY_RULE_SETUP
-#line 90 "engines/director/lingo/lingo-lex.l"
-{ count(); return tINSTANCE; }
+#line 91 "engines/director/lingo/lingo-lex.l"
+{ count(); return tGO; }
 	YY_BREAK
 case 20:
 YY_RULE_SETUP
-#line 91 "engines/director/lingo/lingo-lex.l"
-{ count(); return tINTERSECTS; }
+#line 92 "engines/director/lingo/lingo-lex.l"
+{ count(); return tINSTANCE; }
 	YY_BREAK
 case 21:
 YY_RULE_SETUP
-#line 92 "engines/director/lingo/lingo-lex.l"
-{ count(); return tINTO; }
+#line 93 "engines/director/lingo/lingo-lex.l"
+{ count(); return tINTERSECTS; }
 	YY_BREAK
 case 22:
 YY_RULE_SETUP
-#line 93 "engines/director/lingo/lingo-lex.l"
-{ count(); return tLOOP; }
+#line 94 "engines/director/lingo/lingo-lex.l"
+{ count(); return tINTO; }
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 94 "engines/director/lingo/lingo-lex.l"
-{ count(); return tMACRO; }
+#line 95 "engines/director/lingo/lingo-lex.l"
+{ count(); return tLOOP; }
 	YY_BREAK
 case 24:
 YY_RULE_SETUP
-#line 95 "engines/director/lingo/lingo-lex.l"
-{ count(); return tMETHOD; }
+#line 96 "engines/director/lingo/lingo-lex.l"
+{ count(); return tMACRO; }
 	YY_BREAK
 case 25:
 YY_RULE_SETUP
-#line 96 "engines/director/lingo/lingo-lex.l"
-{ count(); return tMOD; }
+#line 97 "engines/director/lingo/lingo-lex.l"
+{ count(); return tMETHOD; }
 	YY_BREAK
 case 26:
 YY_RULE_SETUP
-#line 97 "engines/director/lingo/lingo-lex.l"
-{ count(); return tMOVIE; }
+#line 98 "engines/director/lingo/lingo-lex.l"
+{ count(); return tMOD; }
 	YY_BREAK
 case 27:
 YY_RULE_SETUP
-#line 98 "engines/director/lingo/lingo-lex.l"
-{ count(); return tNEXT; }
+#line 99 "engines/director/lingo/lingo-lex.l"
+{ count(); return tMOVIE; }
 	YY_BREAK
 case 28:
 YY_RULE_SETUP
-#line 99 "engines/director/lingo/lingo-lex.l"
-{ count(); return tNOT; }
+#line 100 "engines/director/lingo/lingo-lex.l"
+{ count(); return tNEXT; }
 	YY_BREAK
 case 29:
 YY_RULE_SETUP
-#line 100 "engines/director/lingo/lingo-lex.l"
-{ count(); return tOF; }
+#line 101 "engines/director/lingo/lingo-lex.l"
+{ count(); return tNOT; }
 	YY_BREAK
 case 30:
 YY_RULE_SETUP
-#line 101 "engines/director/lingo/lingo-lex.l"
-{ count(); return tON; }
+#line 102 "engines/director/lingo/lingo-lex.l"
+{ count(); return tOF; }
 	YY_BREAK
 case 31:
 YY_RULE_SETUP
-#line 102 "engines/director/lingo/lingo-lex.l"
-{ count(); return tOPEN; }
+#line 103 "engines/director/lingo/lingo-lex.l"
+{ count(); return tON; }
 	YY_BREAK
 case 32:
 YY_RULE_SETUP
-#line 103 "engines/director/lingo/lingo-lex.l"
-{ count(); return tOR; }
+#line 104 "engines/director/lingo/lingo-lex.l"
+{ count(); return tOPEN; }
 	YY_BREAK
 case 33:
 YY_RULE_SETUP
-#line 104 "engines/director/lingo/lingo-lex.l"
-{ count(); return tPLAY; }
+#line 105 "engines/director/lingo/lingo-lex.l"
+{ count(); return tOR; }
 	YY_BREAK
 case 34:
 YY_RULE_SETUP
-#line 105 "engines/director/lingo/lingo-lex.l"
-{ count(); return tPREVIOUS; }
+#line 106 "engines/director/lingo/lingo-lex.l"
+{ count(); return tPLAY; }
 	YY_BREAK
 case 35:
 YY_RULE_SETUP
-#line 106 "engines/director/lingo/lingo-lex.l"
-{ count(); return tPUT; }
+#line 107 "engines/director/lingo/lingo-lex.l"
+{ count(); return tPREVIOUS; }
 	YY_BREAK
 case 36:
 YY_RULE_SETUP
-#line 107 "engines/director/lingo/lingo-lex.l"
-{ count(); return tREPEAT; }
+#line 108 "engines/director/lingo/lingo-lex.l"
+{ count(); return tPUT; }
 	YY_BREAK
 case 37:
 YY_RULE_SETUP
-#line 108 "engines/director/lingo/lingo-lex.l"
-{ count(); return tSET; }
+#line 109 "engines/director/lingo/lingo-lex.l"
+{ count(); return tREPEAT; }
 	YY_BREAK
 case 38:
 YY_RULE_SETUP
-#line 109 "engines/director/lingo/lingo-lex.l"
-{ count(); return tSOUND; }
+#line 110 "engines/director/lingo/lingo-lex.l"
+{ count(); return tSET; }
 	YY_BREAK
 case 39:
 YY_RULE_SETUP
-#line 110 "engines/director/lingo/lingo-lex.l"
-{ count(); return tSTARTS; }
+#line 111 "engines/director/lingo/lingo-lex.l"
+{ count(); return tSOUND; }
 	YY_BREAK
 case 40:
 YY_RULE_SETUP
-#line 111 "engines/director/lingo/lingo-lex.l"
+#line 112 "engines/director/lingo/lingo-lex.l"
+{ count(); return tSTARTS; }
+	YY_BREAK
+case 41:
+YY_RULE_SETUP
+#line 113 "engines/director/lingo/lingo-lex.l"
 {
 		count();
 
@@ -1187,9 +1197,9 @@ YY_RULE_SETUP
 		return THEENTITYWITHID;
 	}
 	YY_BREAK
-case 41:
+case 42:
 YY_RULE_SETUP
-#line 119 "engines/director/lingo/lingo-lex.l"
+#line 121 "engines/director/lingo/lingo-lex.l"
 {
 		count();
 
@@ -1231,9 +1241,9 @@ YY_RULE_SETUP
 		warning("Unhandled the entity %s", ptr);
 	}
 	YY_BREAK
-case 42:
+case 43:
 YY_RULE_SETUP
-#line 159 "engines/director/lingo/lingo-lex.l"
+#line 161 "engines/director/lingo/lingo-lex.l"
 {
 		count();
 
@@ -1254,64 +1264,64 @@ YY_RULE_SETUP
 		warning("Unhandled the entity %s", ptr);
 	}
 	YY_BREAK
-case 43:
-YY_RULE_SETUP
-#line 178 "engines/director/lingo/lingo-lex.l"
-{ count(); return tTHEN; }
-	YY_BREAK
 case 44:
 YY_RULE_SETUP
-#line 179 "engines/director/lingo/lingo-lex.l"
-{ count(); return tTO; }
+#line 180 "engines/director/lingo/lingo-lex.l"
+{ count(); return tTHEN; }
 	YY_BREAK
 case 45:
 YY_RULE_SETUP
-#line 180 "engines/director/lingo/lingo-lex.l"
-{ count(); return tSPRITE; }
+#line 181 "engines/director/lingo/lingo-lex.l"
+{ count(); return tTO; }
 	YY_BREAK
 case 46:
 YY_RULE_SETUP
-#line 181 "engines/director/lingo/lingo-lex.l"
-{ count(); return tWITH; }
+#line 182 "engines/director/lingo/lingo-lex.l"
+{ count(); return tSPRITE; }
 	YY_BREAK
 case 47:
 YY_RULE_SETUP
-#line 182 "engines/director/lingo/lingo-lex.l"
-{ count(); return tWITHIN; }
+#line 183 "engines/director/lingo/lingo-lex.l"
+{ count(); return tWITH; }
 	YY_BREAK
 case 48:
 YY_RULE_SETUP
-#line 183 "engines/director/lingo/lingo-lex.l"
-{ count(); return tWHEN; }
+#line 184 "engines/director/lingo/lingo-lex.l"
+{ count(); return tWITHIN; }
 	YY_BREAK
 case 49:
 YY_RULE_SETUP
-#line 184 "engines/director/lingo/lingo-lex.l"
-{ count(); return tWHILE; }
+#line 185 "engines/director/lingo/lingo-lex.l"
+{ count(); return tWHEN; }
 	YY_BREAK
 case 50:
 YY_RULE_SETUP
 #line 186 "engines/director/lingo/lingo-lex.l"
-{ count(); return tNEQ; }
+{ count(); return tWHILE; }
 	YY_BREAK
 case 51:
 YY_RULE_SETUP
-#line 187 "engines/director/lingo/lingo-lex.l"
-{ count(); return tGE; }
+#line 188 "engines/director/lingo/lingo-lex.l"
+{ count(); return tNEQ; }
 	YY_BREAK
 case 52:
 YY_RULE_SETUP
-#line 188 "engines/director/lingo/lingo-lex.l"
-{ count(); return tLE; }
+#line 189 "engines/director/lingo/lingo-lex.l"
+{ count(); return tGE; }
 	YY_BREAK
 case 53:
 YY_RULE_SETUP
-#line 189 "engines/director/lingo/lingo-lex.l"
-{ count(); return tCONCAT; }
+#line 190 "engines/director/lingo/lingo-lex.l"
+{ count(); return tLE; }
 	YY_BREAK
 case 54:
 YY_RULE_SETUP
 #line 191 "engines/director/lingo/lingo-lex.l"
+{ count(); return tCONCAT; }
+	YY_BREAK
+case 55:
+YY_RULE_SETUP
+#line 193 "engines/director/lingo/lingo-lex.l"
 {
 		count();
 		yylval.s = new Common::String(yytext);
@@ -1342,43 +1352,43 @@ YY_RULE_SETUP
 		return ID;
 	}
 	YY_BREAK
-case 55:
+case 56:
 YY_RULE_SETUP
-#line 220 "engines/director/lingo/lingo-lex.l"
+#line 222 "engines/director/lingo/lingo-lex.l"
 { count(); yylval.f = atof(yytext); return FLOAT; }
 	YY_BREAK
-case 56:
+case 57:
 YY_RULE_SETUP
-#line 221 "engines/director/lingo/lingo-lex.l"
+#line 223 "engines/director/lingo/lingo-lex.l"
 { count(); yylval.i = strtol(yytext, NULL, 10); return INT; }
 	YY_BREAK
-case 57:
+case 58:
 YY_RULE_SETUP
-#line 222 "engines/director/lingo/lingo-lex.l"
+#line 224 "engines/director/lingo/lingo-lex.l"
 { count(); return *yytext; }
 	YY_BREAK
-case 58:
-/* rule 58 can match eol */
+case 59:
+/* rule 59 can match eol */
 YY_RULE_SETUP
-#line 223 "engines/director/lingo/lingo-lex.l"
+#line 225 "engines/director/lingo/lingo-lex.l"
 { return '\n'; }
 	YY_BREAK
-case 59:
+case 60:
 YY_RULE_SETUP
-#line 224 "engines/director/lingo/lingo-lex.l"
+#line 226 "engines/director/lingo/lingo-lex.l"
 { count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return STRING; }
 	YY_BREAK
-case 60:
+case 61:
 YY_RULE_SETUP
-#line 225 "engines/director/lingo/lingo-lex.l"
+#line 227 "engines/director/lingo/lingo-lex.l"
 
 	YY_BREAK
-case 61:
+case 62:
 YY_RULE_SETUP
-#line 227 "engines/director/lingo/lingo-lex.l"
+#line 229 "engines/director/lingo/lingo-lex.l"
 ECHO;
 	YY_BREAK
-#line 1382 "engines/director/lingo/lingo-lex.cpp"
+#line 1392 "engines/director/lingo/lingo-lex.cpp"
 case YY_STATE_EOF(INITIAL):
 	yyterminate();
 
@@ -1671,7 +1681,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 >= 211 )
+			if ( yy_current_state >= 214 )
 				yy_c = yy_meta[(unsigned int) yy_c];
 			}
 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1699,11 +1709,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 >= 211 )
+		if ( yy_current_state >= 214 )
 			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 == 210);
+	yy_is_jam = (yy_current_state == 213);
 
 	return yy_is_jam ? 0 : yy_current_state;
 }
@@ -2378,7 +2388,7 @@ void yyfree (void * ptr )
 
 #define YYTABLES_NAME "yytables"
 
-#line 227 "engines/director/lingo/lingo-lex.l"
+#line 229 "engines/director/lingo/lingo-lex.l"
 
 
 
diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l
index 25fde2a..5d39b3f 100644
--- a/engines/director/lingo/lingo-lex.l
+++ b/engines/director/lingo/lingo-lex.l
@@ -72,6 +72,8 @@ whitespace [\t ]
 ^{whitespace}+		{ count(); }
 [\t]+				{ count(); return ' '; }
 
+[#]{identifier}		{ count(); yylval.s = new Common::String(yytext); return SYMBOL; }
+
 (?i:and)			{ count(); return tAND; }
 (?i:contains)		{ count(); return tCONTAINS; }
 (?i:done)			{ count(); return tDONE; }
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index 0ed69de..cc0bff1 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -252,6 +252,7 @@ public:
 	static void c_voidpush();
 	static void c_fconstpush();
 	static void c_stringpush();
+	static void c_symbolpush();
 	static void c_varpush();
 	static void c_assign();
 	bool verify(Symbol *s);


Commit: 5ee51026c7f492e4d862551aeda31fea26e76ae7
    https://github.com/scummvm/scummvm/commit/5ee51026c7f492e4d862551aeda31fea26e76ae7
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-01-10T01:02:56+01:00

Commit Message:
DIRECTOR: Lingo: More documentation for D3 differences

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


diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index a536013..30936c6 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -75,6 +75,8 @@ static struct BuiltinProto {
 		// play													// D2
 	{ "playAccel",		Lingo::b_playAccel,		-1,0, false },	// D2
 		// play done											// D2
+	{ "preLoad",		Lingo::b_preLoad,		-1,0, false },	//		D3
+	{ "preLoadCast",	Lingo::b_preLoadCast,	-1,0, false },	//		D3
 	{ "quit",			Lingo::b_quit,			0, 0, false },	// D2
 	{ "restart",		Lingo::b_restart,		0, 0, false },	// D2
 	{ "shutDown",		Lingo::b_shutDown,		0, 0, false },	// D2
@@ -136,6 +138,7 @@ static struct BuiltinProto {
 	{ "return",			Lingo::b_return,		0, 0, false },	// D2
 	{ "tab",			Lingo::b_tab,			0, 0, false },	// D2
 	{ "true",			Lingo::b_true,			0, 0, false },	// D2
+	{ "version",		Lingo::b_version,		0, 0, false },	//		D3
 	// References
 	{ "field",			Lingo::b_field,			1, 1, false },	//		D3
 	{ "me",				Lingo::b_me,			-1,0, false },	//		D3
@@ -526,6 +529,18 @@ void Lingo::b_playAccel(int nargs) {
 	g_lingo->dropStack(nargs);
 }
 
+void Lingo::b_preLoad(int nargs) {
+	g_lingo->printStubWithArglist("b_preLoad", nargs);
+
+	g_lingo->dropStack(nargs);
+}
+
+void Lingo::b_preLoadCast(int nargs) {
+	g_lingo->printStubWithArglist("b_preLoadCast", nargs);
+
+	g_lingo->dropStack(nargs);
+}
+
 void Lingo::b_printFrom(int nargs) {
 	g_lingo->printStubWithArglist("b_printFrom", nargs);
 
@@ -851,6 +866,10 @@ void Lingo::b_true(int nargs) {
 	g_lingo->push(Datum(1));
 }
 
+void Lingo::b_version(int nargs) {
+	g_lingo->push(Datum(g_director->getVersion()));
+}
+
 ///////////////////
 // Factory
 ///////////////////
@@ -858,6 +877,20 @@ void Lingo::b_factory(int nargs) {
 	// This is intentionally empty
 }
 
+// TODO:
+// List of predefined methods in D3
+// mAtFrame
+// mDescribe
+// mDispose
+// mGet
+// mInstanceRespondsTo
+// mMessageList
+// mName
+// mNew
+// mPerform
+// mPut
+// mRespondsTo
+
 void Lingo::factoryCall(Common::String &name, int nargs) {
 	Common::String s("factoryCall: ");
 
diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index 8eb37a0..898bdf5 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -44,7 +44,7 @@ TheEntity entities[] = {
 	{ kTheDoubleClick,		"doubleClick",		false },	// D2 f
 	{ kTheExitLock,			"exitLock",			false },	// D2 p
 	{ kTheFixStageSize,		"fixStageSize",		false },	// D2 p
-	{ kTheFloatPrecision,	"floatPrecision",	false },
+	{ kTheFloatPrecision,	"floatPrecision",	false },	//		D3 p
 	{ kTheFrame,			"frame",			false },	// D2 f
 	{ kTheFreeBlock,		"freeBlock",		false },	// D2 f
 	{ kTheFreeBytes,		"freeBytes",		false },	// D2 f
@@ -54,6 +54,7 @@ TheEntity entities[] = {
 	{ kTheKey,				"key",				false },	// D2 f
 	{ kTheKeyCode,			"keyCode",			false },	// D2 f
 	{ kTheKeyDownScript,	"keyDownScript",	false },	// D2 p
+	{ kTheLabelList,		"labelList",		false },	//		D3 f
 	{ kTheLastClick,		"lastClick",		false },	// D2 f
 	{ kTheLastEvent,		"lastEvent",		false },	// D2 f
 	{ kTheLastFrame,		"lastFrame",		false },
@@ -95,6 +96,7 @@ TheEntity entities[] = {
 	{ kTheSqrt,				"sqrt",				false },	// D2 f
 	{ kTheStage,			"stage",			false },
 	{ kTheStageBottom,		"stageBottom",		false },	// D2 f
+	{ kTheStageColor,		"stageColor",		false },	//		D3 p
 	{ kTheStageLeft,		"stageLeft",		false },	// D2 f
 	{ kTheStageRight,		"stageRight",		false },	// D2 f
 	{ kTheStageTop,			"stageTop",			false },	// D2 f
diff --git a/engines/director/lingo/lingo-the.h b/engines/director/lingo/lingo-the.h
index a939d56..ba3ef8b 100644
--- a/engines/director/lingo/lingo-the.h
+++ b/engines/director/lingo/lingo-the.h
@@ -70,6 +70,7 @@ enum TheEntityType {
 	kTheKey,
 	kTheKeyDownScript,
 	kTheKeyCode,
+	kTheLabelList,
 	kTheLastClick,
 	kTheLastEvent,
 	kTheLastFrame,
@@ -107,6 +108,7 @@ enum TheEntityType {
 	kTheRomanLingo,
 	kTheStage,
 	kTheStageBottom,
+	kTheStageColor,
 	kTheStageLeft,
 	kTheStageRight,
 	kTheStageTop
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index cc0bff1..4502eda 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -358,6 +358,8 @@ public:
 	static void b_nothing(int nargs);
 	static void b_pause(int nargs);
 	static void b_playAccel(int nargs);
+	static void b_preLoad(int nargs);
+	static void b_preLoadCast(int nargs);
 	static void b_quit(int nargs);
 	static void b_restart(int nargs);
 	static void b_shutDown(int nargs);
@@ -393,6 +395,7 @@ public:
 	static void b_return(int nargs);
 	static void b_tab(int nargs);
 	static void b_true(int nargs);
+	static void b_version(int nargs);
 
 	static void b_factory(int nargs);
 	void factoryCall(Common::String &name, int nargs);


Commit: bfc2fa8aa27e4c36e06cc36806621f9acf77b067
    https://github.com/scummvm/scummvm/commit/bfc2fa8aa27e4c36e06cc36806621f9acf77b067
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-01-10T01:02:56+01:00

Commit Message:
DIRECTOR: Lingo: Implemented stubs for put..after and put..before

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 7767740..f950d35 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -74,6 +74,8 @@ static struct FuncDescr {
 	{ Lingo::c_mod,			"c_mod",		"" },
 	{ Lingo::c_negate,		"c_negate",		"" },
 	{ Lingo::c_ampersand,	"c_ampersand",	"" },
+	{ Lingo::c_after,		"c_after",		"" },
+	{ Lingo::c_before,		"c_before",		"" },
 	{ Lingo::c_concat,		"c_concat",		"" },
 	{ Lingo::c_contains,	"c_contains",	"" },
 	{ Lingo::c_starts,		"c_starts",		"" },
@@ -476,6 +478,34 @@ void Lingo::c_ampersand() {
 	g_lingo->push(d1);
 }
 
+void Lingo::c_after() {
+	Datum d2 = g_lingo->pop();
+	Datum d1 = g_lingo->pop();
+
+	d1.toString();
+	d2.toString();
+
+	warning("STUB: c_after");
+
+	delete d2.u.s;
+
+	g_lingo->push(d1);
+}
+
+void Lingo::c_before() {
+	Datum d2 = g_lingo->pop();
+	Datum d1 = g_lingo->pop();
+
+	d1.toString();
+	d2.toString();
+
+	warning("STUB: c_before");
+
+	delete d2.u.s;
+
+	g_lingo->push(d1);
+}
+
 void Lingo::c_concat() {
 	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 97a676e..a943ced 100644
--- a/engines/director/lingo/lingo-gr.cpp
+++ b/engines/director/lingo/lingo-gr.cpp
@@ -129,14 +129,16 @@
      tOR = 318,
      tNOT = 319,
      tMOD = 320,
-     tCONCAT = 321,
-     tCONTAINS = 322,
-     tSTARTS = 323,
-     tSPRITE = 324,
-     tINTERSECTS = 325,
-     tWITHIN = 326,
-     tON = 327,
-     tSOUND = 328
+     tAFTER = 321,
+     tBEFORE = 322,
+     tCONCAT = 323,
+     tCONTAINS = 324,
+     tSTARTS = 325,
+     tSPRITE = 326,
+     tINTERSECTS = 327,
+     tWITHIN = 328,
+     tON = 329,
+     tSOUND = 330
    };
 #endif
 /* Tokens.  */
@@ -203,14 +205,16 @@
 #define tOR 318
 #define tNOT 319
 #define tMOD 320
-#define tCONCAT 321
-#define tCONTAINS 322
-#define tSTARTS 323
-#define tSPRITE 324
-#define tINTERSECTS 325
-#define tWITHIN 326
-#define tON 327
-#define tSOUND 328
+#define tAFTER 321
+#define tBEFORE 322
+#define tCONCAT 323
+#define tCONTAINS 324
+#define tSTARTS 325
+#define tSPRITE 326
+#define tINTERSECTS 327
+#define tWITHIN 328
+#define tON 329
+#define tSOUND 330
 
 
 
@@ -268,7 +272,7 @@ typedef union YYSTYPE
 	Common::Array<double> *arr;
 }
 /* Line 193 of yacc.c.  */
-#line 272 "engines/director/lingo/lingo-gr.cpp"
+#line 276 "engines/director/lingo/lingo-gr.cpp"
 	YYSTYPE;
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
@@ -281,7 +285,7 @@ typedef union YYSTYPE
 
 
 /* Line 216 of yacc.c.  */
-#line 285 "engines/director/lingo/lingo-gr.cpp"
+#line 289 "engines/director/lingo/lingo-gr.cpp"
 
 #ifdef short
 # undef short
@@ -496,20 +500,20 @@ union yyalloc
 /* YYFINAL -- State number of the termination state.  */
 #define YYFINAL  97
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   1030
+#define YYLAST   1146
 
 /* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  87
+#define YYNTOKENS  89
 /* YYNNTS -- Number of nonterminals.  */
 #define YYNNTS  39
 /* YYNRULES -- Number of rules.  */
-#define YYNRULES  135
+#define YYNRULES  138
 /* YYNRULES -- Number of states.  */
-#define YYNSTATES  283
+#define YYNSTATES  289
 
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 #define YYUNDEFTOK  2
-#define YYMAXUTOK   328
+#define YYMAXUTOK   330
 
 #define YYTRANSLATE(YYX)						\
   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -518,12 +522,12 @@ union yyalloc
 static const yytype_uint8 yytranslate[] =
 {
        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-      81,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+      83,     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,    80,    75,     2,
-      82,    83,    78,    76,    86,    77,     2,    79,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,    82,    77,     2,
+      84,    85,    80,    78,    88,    79,     2,    81,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-      85,    74,    84,     2,     2,     2,     2,     2,     2,     2,
+      87,    76,    86,     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,
@@ -549,7 +553,8 @@ 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,    70,    71,    72,    73
+      65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
+      75
 };
 
 #if YYDEBUG
@@ -558,94 +563,95 @@ static const yytype_uint8 yytranslate[] =
 static const yytype_uint16 yyprhs[] =
 {
        0,     0,     3,     7,     9,    12,    14,    15,    17,    19,
-      21,    23,    25,    30,    35,    40,    46,    51,    56,    62,
-      64,    66,    68,    70,    79,    91,   104,   108,   117,   129,
-     141,   148,   159,   170,   171,   175,   178,   180,   183,   185,
-     192,   194,   200,   202,   206,   210,   213,   217,   219,   221,
-     222,   223,   224,   227,   230,   234,   236,   238,   240,   242,
-     244,   249,   251,   253,   256,   258,   262,   266,   270,   274,
-     278,   282,   286,   290,   294,   298,   302,   306,   309,   313,
-     317,   321,   325,   328,   331,   335,   340,   345,   348,   350,
-     352,   355,   357,   360,   363,   366,   369,   371,   374,   379,
-     382,   386,   388,   392,   394,   398,   401,   404,   407,   410,
-     414,   417,   420,   422,   426,   429,   432,   435,   439,   442,
-     443,   452,   455,   456,   465,   466,   467,   478,   479,   481,
-     485,   490,   491,   495,   496,   498
+      21,    23,    25,    30,    35,    40,    45,    50,    56,    61,
+      66,    72,    74,    76,    78,    80,    89,   101,   114,   118,
+     127,   139,   151,   158,   169,   180,   181,   185,   188,   190,
+     193,   195,   202,   204,   210,   212,   216,   220,   223,   227,
+     229,   231,   232,   233,   234,   237,   240,   244,   246,   248,
+     250,   252,   254,   259,   261,   263,   266,   268,   272,   276,
+     280,   284,   288,   292,   296,   300,   304,   308,   312,   316,
+     319,   323,   327,   331,   335,   339,   342,   345,   349,   354,
+     359,   362,   364,   366,   369,   371,   374,   377,   380,   383,
+     385,   388,   393,   396,   400,   402,   406,   408,   412,   415,
+     418,   421,   424,   428,   431,   434,   436,   440,   443,   446,
+     449,   453,   456,   457,   466,   469,   470,   479,   480,   481,
+     492,   493,   495,   499,   504,   505,   509,   510,   512
 };
 
 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
 static const yytype_int8 yyrhs[] =
 {
-      88,     0,    -1,    88,    89,    90,    -1,    90,    -1,     1,
-      89,    -1,    81,    -1,    -1,   117,    -1,   110,    -1,   124,
-      -1,    91,    -1,    93,    -1,    40,   109,    33,    21,    -1,
-      42,    21,    74,   109,    -1,    42,    13,    74,   109,    -1,
-      42,    14,   109,    74,   109,    -1,    42,    21,    44,   109,
-      -1,    42,    13,    44,   109,    -1,    42,    14,   109,    44,
-     109,    -1,   109,    -1,   110,    -1,    92,    -1,    94,    -1,
-     101,    82,   100,    83,   107,   106,    27,    41,    -1,   102,
-      74,   109,   106,    44,   109,   106,   107,   106,    27,    41,
-      -1,   102,    74,   109,   106,    24,    44,   109,   106,   107,
-     106,    27,    41,    -1,   108,   109,   106,    -1,   103,   100,
-      43,    89,   107,   106,    27,    32,    -1,   103,   100,    43,
-      89,   107,   106,    48,   107,   106,    27,    32,    -1,   103,
-     100,    43,    89,   107,   106,   105,    96,   106,    27,    32,
-      -1,   103,   100,    43,   105,    92,   106,    -1,   103,   100,
-      43,   105,    92,   106,    48,   105,    92,   106,    -1,   103,
-     100,    43,   105,    92,   106,    97,   106,    95,   106,    -1,
-      -1,    48,   105,    92,    -1,    96,    99,    -1,    99,    -1,
-      97,    98,    -1,    98,    -1,   104,   100,    43,   105,    93,
-     106,    -1,    97,    -1,   104,   100,    43,   107,   106,    -1,
-     109,    -1,   109,    74,   109,    -1,    82,   100,    83,    -1,
+      90,     0,    -1,    90,    91,    92,    -1,    92,    -1,     1,
+      91,    -1,    83,    -1,    -1,   119,    -1,   112,    -1,   126,
+      -1,    93,    -1,    95,    -1,    40,   111,    33,    21,    -1,
+      40,   111,    66,   111,    -1,    40,   111,    67,   111,    -1,
+      42,    21,    76,   111,    -1,    42,    13,    76,   111,    -1,
+      42,    14,   111,    76,   111,    -1,    42,    21,    44,   111,
+      -1,    42,    13,    44,   111,    -1,    42,    14,   111,    44,
+     111,    -1,   111,    -1,   112,    -1,    94,    -1,    96,    -1,
+     103,    84,   102,    85,   109,   108,    27,    41,    -1,   104,
+      76,   111,   108,    44,   111,   108,   109,   108,    27,    41,
+      -1,   104,    76,   111,   108,    24,    44,   111,   108,   109,
+     108,    27,    41,    -1,   110,   111,   108,    -1,   105,   102,
+      43,    91,   109,   108,    27,    32,    -1,   105,   102,    43,
+      91,   109,   108,    48,   109,   108,    27,    32,    -1,   105,
+     102,    43,    91,   109,   108,   107,    98,   108,    27,    32,
+      -1,   105,   102,    43,   107,    94,   108,    -1,   105,   102,
+      43,   107,    94,   108,    48,   107,    94,   108,    -1,   105,
+     102,    43,   107,    94,   108,    99,   108,    97,   108,    -1,
+      -1,    48,   107,    94,    -1,    98,   101,    -1,   101,    -1,
+      99,   100,    -1,   100,    -1,   106,   102,    43,   107,    95,
+     108,    -1,    99,    -1,   106,   102,    43,   109,   108,    -1,
+     111,    -1,   111,    76,   111,    -1,    84,   102,    85,    -1,
       41,    47,    -1,    41,    46,    21,    -1,    32,    -1,    26,
-      -1,    -1,    -1,    -1,   107,    89,    -1,   107,    93,    -1,
+      -1,    -1,    -1,    -1,   109,    91,    -1,   109,    95,    -1,
       45,    21,    43,    -1,    12,    -1,    15,    -1,    10,    -1,
-      22,    -1,    17,    -1,    21,    82,   125,    83,    -1,    21,
-      -1,    13,    -1,    14,   109,    -1,    91,    -1,   109,    76,
-     109,    -1,   109,    77,   109,    -1,   109,    78,   109,    -1,
-     109,    79,   109,    -1,   109,    65,   109,    -1,   109,    84,
-     109,    -1,   109,    85,   109,    -1,   109,    61,   109,    -1,
-     109,    56,   109,    -1,   109,    57,   109,    -1,   109,    62,
-     109,    -1,   109,    63,   109,    -1,    64,   109,    -1,   109,
-      75,   109,    -1,   109,    66,   109,    -1,   109,    67,   109,
-      -1,   109,    68,   109,    -1,    76,   109,    -1,    77,   109,
-      -1,    82,   109,    83,    -1,    69,   109,    70,   109,    -1,
-      69,   109,    71,   109,    -1,    40,   109,    -1,   113,    -1,
-     116,    -1,    28,    41,    -1,    28,    -1,    30,   111,    -1,
-      55,   112,    -1,    19,   109,    -1,    18,   109,    -1,    18,
-      -1,    20,   125,    -1,    51,   109,    46,   109,    -1,    51,
-     109,    -1,    73,    21,   125,    -1,    21,    -1,   111,    86,
-      21,    -1,    21,    -1,   112,    86,    21,    -1,    31,    34,
-      -1,    31,    37,    -1,    31,    39,    -1,    31,   114,    -1,
-      31,   114,   115,    -1,    31,   115,    -1,    29,   109,    -1,
-     109,    -1,    38,    36,   109,    -1,    36,   109,    -1,    52,
-      53,    -1,    52,   114,    -1,    52,   114,   115,    -1,    52,
-     115,    -1,    -1,    35,    21,   118,   105,   122,    89,   123,
-     107,    -1,    49,    21,    -1,    -1,    50,    21,   119,   105,
-     122,    89,   123,   107,    -1,    -1,    -1,    72,    21,   120,
-     105,   121,   122,    89,   123,   107,    27,    -1,    -1,    21,
-      -1,   122,    86,    21,    -1,   122,    89,    86,    21,    -1,
-      -1,    21,   105,   125,    -1,    -1,   109,    -1,   125,    86,
-     109,    -1
+      22,    -1,    17,    -1,    21,    84,   127,    85,    -1,    21,
+      -1,    13,    -1,    14,   111,    -1,    93,    -1,   111,    78,
+     111,    -1,   111,    79,   111,    -1,   111,    80,   111,    -1,
+     111,    81,   111,    -1,   111,    65,   111,    -1,   111,    86,
+     111,    -1,   111,    87,   111,    -1,   111,    61,   111,    -1,
+     111,    56,   111,    -1,   111,    57,   111,    -1,   111,    62,
+     111,    -1,   111,    63,   111,    -1,    64,   111,    -1,   111,
+      77,   111,    -1,   111,    66,   111,    -1,   111,    68,   111,
+      -1,   111,    69,   111,    -1,   111,    70,   111,    -1,    78,
+     111,    -1,    79,   111,    -1,    84,   111,    85,    -1,    71,
+     111,    72,   111,    -1,    71,   111,    73,   111,    -1,    40,
+     111,    -1,   115,    -1,   118,    -1,    28,    41,    -1,    28,
+      -1,    30,   113,    -1,    55,   114,    -1,    19,   111,    -1,
+      18,   111,    -1,    18,    -1,    20,   127,    -1,    51,   111,
+      46,   111,    -1,    51,   111,    -1,    75,    21,   127,    -1,
+      21,    -1,   113,    88,    21,    -1,    21,    -1,   114,    88,
+      21,    -1,    31,    34,    -1,    31,    37,    -1,    31,    39,
+      -1,    31,   116,    -1,    31,   116,   117,    -1,    31,   117,
+      -1,    29,   111,    -1,   111,    -1,    38,    36,   111,    -1,
+      36,   111,    -1,    52,    53,    -1,    52,   116,    -1,    52,
+     116,   117,    -1,    52,   117,    -1,    -1,    35,    21,   120,
+     107,   124,    91,   125,   109,    -1,    49,    21,    -1,    -1,
+      50,    21,   121,   107,   124,    91,   125,   109,    -1,    -1,
+      -1,    74,    21,   122,   107,   123,   124,    91,   125,   109,
+      27,    -1,    -1,    21,    -1,   124,    88,    21,    -1,   124,
+      91,    88,    21,    -1,    -1,    21,   107,   127,    -1,    -1,
+     111,    -1,   127,    88,   111,    -1
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
        0,   106,   106,   107,   108,   111,   116,   117,   118,   119,
-     120,   121,   124,   130,   136,   144,   152,   158,   166,   175,
-     176,   178,   179,   184,   195,   211,   223,   231,   238,   247,
-     256,   266,   276,   287,   288,   291,   292,   295,   296,   299,
-     307,   308,   316,   317,   318,   320,   322,   328,   334,   341,
-     343,   345,   346,   347,   350,   356,   357,   360,   363,   366,
-     369,   372,   376,   383,   389,   390,   391,   392,   393,   394,
+     120,   121,   124,   130,   131,   132,   138,   146,   154,   160,
+     168,   177,   178,   180,   181,   186,   197,   213,   225,   233,
+     240,   249,   258,   268,   278,   289,   290,   293,   294,   297,
+     298,   301,   309,   310,   318,   319,   320,   322,   324,   330,
+     336,   343,   345,   347,   348,   349,   352,   358,   359,   362,
+     365,   368,   371,   374,   378,   385,   391,   392,   393,   394,
      395,   396,   397,   398,   399,   400,   401,   402,   403,   404,
-     405,   406,   407,   408,   409,   410,   411,   414,   415,   416,
-     417,   418,   420,   421,   422,   425,   428,   431,   432,   433,
-     434,   437,   438,   441,   442,   453,   454,   455,   456,   459,
-     462,   467,   468,   471,   472,   475,   476,   479,   482,   512,
-     512,   518,   521,   521,   526,   527,   526,   539,   540,   541,
-     542,   544,   548,   556,   557,   558
+     405,   406,   407,   408,   409,   410,   411,   412,   413,   414,
+     417,   418,   419,   420,   421,   423,   424,   425,   428,   431,
+     434,   435,   436,   437,   440,   441,   444,   445,   456,   457,
+     458,   459,   462,   465,   470,   471,   474,   475,   478,   479,
+     482,   485,   515,   515,   521,   524,   524,   529,   530,   529,
+     542,   543,   544,   545,   547,   551,   559,   560,   561
 };
 #endif
 
@@ -663,11 +669,12 @@ static const char *const yytname[] =
   "tPUT", "tREPEAT", "tSET", "tTHEN", "tTO", "tWHEN", "tWITH", "tWHILE",
   "tNLELSE", "tFACTORY", "tMETHOD", "tOPEN", "tPLAY", "tDONE",
   "tPLAYACCEL", "tINSTANCE", "tGE", "tLE", "tGT", "tLT", "tEQ", "tNEQ",
-  "tAND", "tOR", "tNOT", "tMOD", "tCONCAT", "tCONTAINS", "tSTARTS",
-  "tSPRITE", "tINTERSECTS", "tWITHIN", "tON", "tSOUND", "'='", "'&'",
-  "'+'", "'-'", "'*'", "'/'", "'%'", "'\\n'", "'('", "')'", "'>'", "'<'",
-  "','", "$accept", "program", "nl", "programline", "asgn", "stmtoneliner",
-  "stmt", "ifstmt", "elsestmtoneliner", "elseifstmt", "elseifstmtoneliner",
+  "tAND", "tOR", "tNOT", "tMOD", "tAFTER", "tBEFORE", "tCONCAT",
+  "tCONTAINS", "tSTARTS", "tSPRITE", "tINTERSECTS", "tWITHIN", "tON",
+  "tSOUND", "'='", "'&'", "'+'", "'-'", "'*'", "'/'", "'%'", "'\\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", "instancelist", "gotofunc", "gotoframe",
@@ -688,47 +695,47 @@ 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,
-     325,   326,   327,   328,    61,    38,    43,    45,    42,    47,
-      37,    10,    40,    41,    62,    60,    44
+     325,   326,   327,   328,   329,   330,    61,    38,    43,    45,
+      42,    47,    37,    10,    40,    41,    62,    60,    44
 };
 # endif
 
 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
 static const yytype_uint8 yyr1[] =
 {
-       0,    87,    88,    88,    88,    89,    90,    90,    90,    90,
-      90,    90,    91,    91,    91,    91,    91,    91,    91,    92,
-      92,    93,    93,    93,    93,    93,    93,    94,    94,    94,
-      94,    94,    94,    95,    95,    96,    96,    97,    97,    98,
-      99,    99,   100,   100,   100,   101,   102,   103,   104,   105,
-     106,   107,   107,   107,   108,   109,   109,   109,   109,   109,
-     109,   109,   109,   109,   109,   109,   109,   109,   109,   109,
-     109,   109,   109,   109,   109,   109,   109,   109,   109,   109,
-     109,   109,   109,   109,   109,   109,   109,   110,   110,   110,
-     110,   110,   110,   110,   110,   110,   110,   110,   110,   110,
-     110,   111,   111,   112,   112,   113,   113,   113,   113,   113,
-     113,   114,   114,   115,   115,   116,   116,   116,   116,   118,
-     117,   117,   119,   117,   120,   121,   117,   122,   122,   122,
-     122,   123,   124,   125,   125,   125
+       0,    89,    90,    90,    90,    91,    92,    92,    92,    92,
+      92,    92,    93,    93,    93,    93,    93,    93,    93,    93,
+      93,    94,    94,    95,    95,    95,    95,    95,    95,    96,
+      96,    96,    96,    96,    96,    97,    97,    98,    98,    99,
+      99,   100,   101,   101,   102,   102,   102,   103,   104,   105,
+     106,   107,   108,   109,   109,   109,   110,   111,   111,   111,
+     111,   111,   111,   111,   111,   111,   111,   111,   111,   111,
+     111,   111,   111,   111,   111,   111,   111,   111,   111,   111,
+     111,   111,   111,   111,   111,   111,   111,   111,   111,   111,
+     112,   112,   112,   112,   112,   112,   112,   112,   112,   112,
+     112,   112,   112,   112,   113,   113,   114,   114,   115,   115,
+     115,   115,   115,   115,   116,   116,   117,   117,   118,   118,
+     118,   118,   120,   119,   119,   121,   119,   122,   123,   119,
+     124,   124,   124,   124,   125,   126,   127,   127,   127
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
 static const yytype_uint8 yyr2[] =
 {
        0,     2,     3,     1,     2,     1,     0,     1,     1,     1,
-       1,     1,     4,     4,     4,     5,     4,     4,     5,     1,
-       1,     1,     1,     8,    11,    12,     3,     8,    11,    11,
-       6,    10,    10,     0,     3,     2,     1,     2,     1,     6,
-       1,     5,     1,     3,     3,     2,     3,     1,     1,     0,
-       0,     0,     2,     2,     3,     1,     1,     1,     1,     1,
-       4,     1,     1,     2,     1,     3,     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,     2,     1,     2,     4,     2,
-       3,     1,     3,     1,     3,     2,     2,     2,     2,     3,
-       2,     2,     1,     3,     2,     2,     2,     3,     2,     0,
-       8,     2,     0,     8,     0,     0,    10,     0,     1,     3,
-       4,     0,     3,     0,     1,     3
+       1,     1,     4,     4,     4,     4,     4,     5,     4,     4,
+       5,     1,     1,     1,     1,     8,    11,    12,     3,     8,
+      11,    11,     6,    10,    10,     0,     3,     2,     1,     2,
+       1,     6,     1,     5,     1,     3,     3,     2,     3,     1,
+       1,     0,     0,     0,     2,     2,     3,     1,     1,     1,
+       1,     1,     4,     1,     1,     2,     1,     3,     3,     3,
+       3,     3,     3,     3,     3,     3,     3,     3,     3,     2,
+       3,     3,     3,     3,     3,     2,     2,     3,     4,     4,
+       2,     1,     1,     2,     1,     2,     2,     2,     2,     1,
+       2,     4,     2,     3,     1,     3,     1,     3,     2,     2,
+       2,     2,     3,     2,     2,     1,     3,     2,     2,     2,
+       3,     2,     0,     8,     2,     0,     8,     0,     0,    10,
+       0,     1,     3,     4,     0,     3,     0,     1,     3
 };
 
 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -736,154 +743,154 @@ static const yytype_uint8 yyr2[] =
    means the default is an error.  */
 static const yytype_uint8 yydefact[] =
 {
-       0,     0,    57,    55,    62,     0,    56,    59,    96,     0,
-     133,    49,    58,    91,     0,     0,    47,     0,     0,     0,
+       0,     0,    59,    57,    64,     0,    58,    61,    99,     0,
+     136,    51,    60,    94,     0,     0,    49,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     3,    64,    21,    11,    22,
-       0,     0,     0,     0,    19,     8,    88,    89,     7,     9,
-       5,     4,    61,     0,    64,    63,    95,    94,   134,    97,
-     133,   133,    90,   101,    92,     0,   105,     0,   106,     0,
-     107,   112,   108,   110,   119,    87,     0,    45,     0,     0,
-       0,     0,   121,   122,    99,   115,   116,   118,   103,    93,
-      77,     0,   124,   133,    82,    83,     0,     1,     6,     0,
-       0,     0,     0,    42,    50,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     3,    66,    23,    11,    24,
+       0,     0,     0,     0,    21,     8,    91,    92,     7,     9,
+       5,     4,    63,     0,    66,    65,    98,    97,   137,   100,
+     136,   136,    93,   104,    95,     0,   108,     0,   109,     0,
+     110,   115,   111,   113,   122,    90,     0,    47,     0,     0,
+       0,     0,   124,   125,   102,   118,   119,   121,   106,    96,
+      79,     0,   127,   136,    85,    86,     0,     1,     6,     0,
+       0,     0,     0,    44,    52,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,   132,     0,   111,   114,     0,   109,
-      49,     0,    46,     0,     0,     0,     0,     0,    54,    49,
-       0,   117,     0,     0,     0,    49,   100,    84,     2,     0,
-      50,     0,     0,    49,     0,    26,    73,    74,    72,    75,
-      76,    69,    79,    80,    81,    78,    65,    66,    67,    68,
-      70,    71,   135,    60,   102,   113,   127,    12,    17,    14,
-       0,     0,    16,    13,   127,    98,   104,    85,    86,   125,
-      51,     0,    44,    51,     0,    43,   128,     0,    18,    15,
-       0,   127,    50,     0,     0,    50,    50,    20,     0,   131,
-     131,     0,    52,    53,     0,     0,    50,    49,    30,   129,
-       0,    51,    51,   131,     0,    50,    51,     0,    51,     0,
-      48,    49,    50,    38,     0,   130,   120,   123,    51,    23,
-      51,    50,    27,    50,    50,    40,    36,     0,     0,    37,
-      33,     0,     0,    50,     0,     0,    35,     0,     0,    50,
-      49,    50,    49,   126,     0,     0,     0,     0,    49,    31,
-       0,    32,     0,     0,    24,    28,    29,    50,    34,    50,
-      25,    41,    39
+       0,     0,     0,     0,     0,   135,     0,   114,   117,     0,
+     112,    51,     0,     0,     0,    48,     0,     0,     0,     0,
+       0,    56,    51,     0,   120,     0,     0,     0,    51,   103,
+      87,     2,     0,    52,     0,     0,    51,     0,    28,    75,
+      76,    74,    77,    78,    71,    81,    82,    83,    84,    80,
+      67,    68,    69,    70,    72,    73,   138,    62,   105,   116,
+     130,    12,    13,    14,    19,    16,     0,     0,    18,    15,
+     130,   101,   107,    88,    89,   128,    53,     0,    46,    53,
+       0,    45,   131,     0,    20,    17,     0,   130,    52,     0,
+       0,    52,    52,    22,     0,   134,   134,     0,    54,    55,
+       0,     0,    52,    51,    32,   132,     0,    53,    53,   134,
+       0,    52,    53,     0,    53,     0,    50,    51,    52,    40,
+       0,   133,   123,   126,    53,    25,    53,    52,    29,    52,
+      52,    42,    38,     0,     0,    39,    35,     0,     0,    52,
+       0,     0,    37,     0,     0,    52,    51,    52,    51,   129,
+       0,     0,     0,     0,    51,    33,     0,    34,     0,     0,
+      26,    30,    31,    52,    36,    52,    27,    43,    41
 };
 
 /* YYDEFGOTO[NTERM-NUM].  */
 static const yytype_int16 yydefgoto[] =
 {
-      -1,    34,   212,    35,    54,    37,   213,    39,   261,   244,
-     245,   233,   246,   102,    40,    41,    42,   234,   272,   155,
-     202,    43,    44,   207,    64,    89,    46,    72,    73,    47,
-      48,   130,   139,   145,   201,   197,   221,    49,    59
+      -1,    34,   218,    35,    54,    37,   219,    39,   267,   250,
+     251,   239,   252,   102,    40,    41,    42,   240,   278,   158,
+     208,    43,    44,   213,    64,    89,    46,    72,    73,    47,
+      48,   131,   142,   148,   207,   203,   227,    49,    59
 };
 
 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    STATE-NUM.  */
-#define YYPACT_NINF -213
+#define YYPACT_NINF -221
 static const yytype_int16 yypact[] =
 {
-     275,   -64,  -213,  -213,  -213,   175,  -213,  -213,   175,   175,
-     175,   945,  -213,   -14,    10,   707,  -213,    29,   175,   -21,
-       8,    30,    34,    37,   175,   752,    38,   175,   175,    44,
-      56,   175,   175,   175,     2,  -213,     5,  -213,  -213,  -213,
-       6,    15,   738,   175,   920,  -213,  -213,  -213,  -213,  -213,
-    -213,  -213,     9,   175,  -213,   920,   920,   920,   920,     7,
-     175,   175,  -213,  -213,    17,   175,  -213,   175,  -213,    54,
-    -213,   920,    42,  -213,  -213,   770,    73,  -213,   -33,   175,
-     -28,    52,  -213,  -213,   795,  -213,    42,  -213,  -213,    19,
-     -32,   820,  -213,   175,   -32,   -32,   870,  -213,   348,   738,
-     175,   738,    53,   895,   920,   175,   175,   175,   175,   175,
-     175,   175,   175,   175,   175,   175,   175,   175,   175,   175,
-     175,   770,   175,    -7,     7,    76,   920,   920,   175,  -213,
-    -213,    86,  -213,   175,   175,   618,   175,   175,  -213,  -213,
-     175,  -213,    89,   175,   175,  -213,     7,  -213,  -213,    31,
-     920,    33,   845,   -64,   175,  -213,    46,    46,    46,   -32,
-     -32,   -32,   920,    46,    46,   256,   329,   329,   -32,   -32,
-     920,   920,   920,  -213,  -213,   920,    92,  -213,   920,   920,
-     175,   175,   920,   920,    92,   920,  -213,   920,   920,  -213,
-    -213,    -6,  -213,  -213,   636,   920,  -213,   -58,   920,   920,
-     -58,    92,   492,    75,   175,   492,  -213,  -213,    96,    40,
-      40,   -58,  -213,  -213,   100,   175,   920,   -13,   -11,  -213,
-     107,  -213,  -213,    40,    93,   920,  -213,   101,  -213,   110,
-    -213,  -213,   110,  -213,   738,  -213,   492,   492,  -213,  -213,
-    -213,   492,  -213,   492,   110,   110,  -213,   738,   636,  -213,
-      94,    98,   419,   492,   133,   135,  -213,   136,   123,  -213,
-    -213,  -213,  -213,  -213,   141,   128,   105,   138,   -20,  -213,
-     636,  -213,   565,   139,  -213,  -213,  -213,   492,  -213,  -213,
-    -213,  -213,  -213
+     267,   -34,  -221,  -221,  -221,   790,  -221,  -221,   790,   790,
+     790,  1059,  -221,    -6,    36,   711,  -221,    42,   790,   -22,
+      52,    57,    59,    60,   790,   745,    62,   790,   790,    68,
+      69,   790,   790,   790,     4,  -221,     5,  -221,  -221,  -221,
+     -20,    15,   823,   790,  1032,  -221,  -221,  -221,  -221,  -221,
+    -221,  -221,     8,   790,  -221,  1032,  1032,  1032,  1032,     7,
+     790,   790,  -221,  -221,    11,   790,  -221,   790,  -221,    58,
+    -221,  1032,    41,  -221,  -221,   843,    72,  -221,   -37,   790,
+     -30,    54,  -221,  -221,   897,  -221,    41,  -221,  -221,    14,
+     -46,   924,  -221,   790,   -46,   -46,   978,  -221,   342,   823,
+     790,   823,    63,  1005,  1032,   790,   790,   790,   790,   790,
+     790,   790,   790,   790,   790,   790,   790,   790,   790,   790,
+     790,   790,   843,   790,   -26,     7,    84,  1032,  1032,   790,
+    -221,  -221,    86,   790,   790,  -221,   790,   790,   870,   790,
+     790,  -221,  -221,   790,  -221,    88,   790,   790,  -221,     7,
+    -221,  -221,    26,  1032,    27,   951,   -34,   790,  -221,   396,
+     396,   396,   -46,   -46,   -46,  1032,  1032,   396,   396,   179,
+     471,   471,   -46,   -46,  1032,  1032,  1032,  -221,  -221,  1032,
+      92,  -221,  1032,  1032,  1032,  1032,   790,   790,  1032,  1032,
+      92,  1032,  -221,  1032,  1032,  -221,  -221,     6,  -221,  -221,
+     638,  1032,  -221,   -60,  1032,  1032,   -60,    92,   490,    70,
+     790,   490,  -221,  -221,    94,    28,    28,   -60,  -221,  -221,
+      90,   790,  1032,    -1,   -15,  -221,    97,  -221,  -221,    28,
+      78,  1032,  -221,    91,  -221,    98,  -221,  -221,    98,  -221,
+     823,  -221,   490,   490,  -221,  -221,  -221,   490,  -221,   490,
+      98,    98,  -221,   823,   638,  -221,    77,    83,   415,   490,
+      93,   100,  -221,   101,    87,  -221,  -221,  -221,  -221,  -221,
+     102,    96,    99,   103,   -11,  -221,   638,  -221,   565,   104,
+    -221,  -221,  -221,   490,  -221,  -221,  -221,  -221,  -221
 };
 
 /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int16 yypgoto[] =
 {
-    -213,  -213,    11,    79,     3,  -186,     0,  -213,  -213,  -213,
-     -44,  -212,   -63,   -69,  -213,  -213,  -213,  -205,   -10,    21,
-    -153,  -213,    39,     4,  -213,  -213,  -213,   159,   -12,  -213,
-    -213,  -213,  -213,  -213,  -213,  -165,  -167,  -213,   -51
+    -221,  -221,     9,    35,     2,  -194,     0,  -221,  -221,  -221,
+     -90,  -220,  -111,   -72,  -221,  -221,  -221,  -214,   -10,   -13,
+    -190,  -221,    43,     3,  -221,  -221,  -221,   116,   -17,  -221,
+    -221,  -221,  -221,  -221,  -221,  -173,  -197,  -221,   -48
 };
 
 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
    positive, shift that token.  If negative, reduce the rule which
    number is the opposite.  If zero, do what YYDEFACT says.
    If YYTABLE_NINF, syntax error.  */
-#define YYTABLE_NINF -62
+#define YYTABLE_NINF -64
 static const yytype_int16 yytable[] =
 {
-      38,    61,    97,    36,    45,   -10,   -51,   -51,   206,   123,
-     124,   133,    51,    87,   227,   230,   136,    50,   203,   200,
-     249,    78,    79,    50,   247,    76,    77,    62,   208,    80,
-     149,    63,   151,   249,   111,   228,   211,   231,   204,   247,
-     205,   134,   146,   222,    55,    98,   137,    56,    57,    58,
-      74,    81,   119,   120,    71,    82,   238,    75,    83,    88,
-     129,   -51,   259,    84,    71,    92,    90,    91,   236,   237,
-      94,    95,    96,   241,   141,   243,   173,    93,    67,   122,
-      69,   103,   104,    50,   278,   252,   -10,   253,    99,   100,
-     128,    60,   121,   122,   132,   138,   153,   174,    38,    58,
-      58,    36,    45,   125,   126,   142,   127,   177,   108,   109,
-     186,   110,   111,   196,   190,   277,   192,   219,   135,   215,
-     176,   114,   115,   116,   117,   118,   220,   224,   235,   184,
-     119,   120,    58,   242,   239,   189,   230,   275,   103,   150,
-     152,   262,   260,   194,   156,   157,   158,   159,   160,   161,
-     162,   163,   164,   165,   166,   167,   168,   169,   170,   171,
-     265,   172,   266,   267,   193,   251,   268,   175,   273,   274,
-     276,   191,   178,   179,   232,   182,   183,   148,   258,   185,
-     280,   256,   187,   188,    86,     2,     0,     3,     4,     5,
-       6,     0,     7,   195,     0,     0,    52,    12,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   229,   209,     0,
-       0,   210,     0,     0,     0,    53,     0,    20,     0,   198,
-     199,   248,   223,   214,     0,     0,   217,   218,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   226,     0,    27,
-       0,     0,     0,   216,    28,     0,   240,     0,     0,     0,
-     270,    31,    32,   250,   225,     0,     0,    33,     0,     0,
-       0,     0,   254,     0,   255,   257,     0,     0,     0,     0,
-       0,     0,   279,   103,   264,    -6,     1,     0,     0,     0,
-     269,     0,   271,     0,     0,     2,   103,     3,     4,     5,
-       6,     0,     7,     8,     9,    10,    11,    12,   281,     0,
-     282,     0,     0,    13,     0,    14,    15,    16,     0,     0,
-      17,     0,     0,     0,     0,    18,    19,    20,   108,   109,
-      21,   110,   111,     0,    22,    23,    24,    25,     0,     0,
-      26,     0,   115,   116,   117,   118,     0,     0,     0,    27,
-     119,   120,     0,     0,    28,     0,     0,    29,    30,     0,
-       0,    31,    32,     0,     0,     0,    -6,    33,     2,     0,
-       3,     4,     5,     6,     0,     7,     8,     9,    10,    11,
-      12,     0,     0,     0,     0,     0,    13,     0,    14,    15,
-      16,     0,     0,    17,     0,     0,     0,     0,    18,    19,
-      20,   108,   109,    21,   110,   111,     0,    22,    23,    24,
-      25,     0,     0,    26,     0,     0,     0,   117,   118,     0,
-       0,     0,    27,   119,   120,     0,     0,    28,     0,     0,
-      29,    30,     0,     0,    31,    32,     0,     0,     0,     2,
-      33,     3,     4,     5,     6,     0,     7,     8,     9,    10,
-      52,    12,     0,     0,     0,     0,   263,    13,     0,    14,
-      15,    16,     0,     0,     0,     0,     0,     0,     0,    18,
-      19,    20,     0,     0,    21,     0,     0,     0,     0,     0,
-      24,    25,     0,     0,    26,     0,     0,     0,     0,     0,
-       0,     0,     0,    27,     0,     0,     0,     0,    28,     0,
-       0,     0,    30,     0,     0,    31,    32,     0,     0,     0,
-      50,    33,     2,     0,     3,     4,     5,     6,     0,     7,
-       8,     9,    10,    52,    12,     0,     0,     0,     0,     0,
-      13,     0,    14,    15,    16,     0,     0,     0,     0,     0,
+      38,    61,    36,    45,    97,   -10,   212,   136,    87,   211,
+      51,   236,   124,   125,   139,   -53,   -53,   206,   255,   228,
+     111,   253,   112,    50,    76,    77,   233,   152,   214,   154,
+     209,   255,   244,   237,   217,    62,   253,   242,   243,   137,
+     120,   121,   247,    98,   249,   149,   140,   234,    55,    50,
+     210,    56,    57,    58,   258,   130,   259,    63,    71,   177,
+     265,    75,   123,    74,    99,    78,    79,    84,    71,   144,
+      90,    91,   -53,    80,    94,    95,    96,    67,    81,    69,
+      82,    83,   284,    88,   283,   103,   104,    50,   -10,    92,
+      93,   100,    60,   135,   129,   123,   122,   141,    38,   126,
+      36,    45,   145,    58,    58,   178,   156,   181,   127,   192,
+     128,   196,   198,   202,   221,   225,   226,   230,   241,   245,
+     271,   180,   138,   248,   236,   266,   268,   272,   273,   279,
+     274,   281,   190,   151,   238,   282,    58,   280,   195,   262,
+     197,    86,   103,   153,   155,   286,   200,     0,   159,   160,
+     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
+     171,   172,   173,   174,   175,   199,   176,     0,   257,     0,
+       0,     0,   179,     0,     0,     0,   182,   183,     0,   184,
+     185,   264,   188,   189,     0,     0,   191,     0,     0,   193,
+     194,     0,     0,     0,     0,   220,     0,     0,   223,   224,
+     201,     0,     0,     0,     0,     0,     0,     0,     0,   232,
+       0,     0,   215,   235,     0,   216,     0,     0,   246,     0,
+       0,     0,     0,     0,     0,   256,   229,   254,     0,   204,
+     205,     0,     0,     0,   260,     0,   261,   263,     0,     0,
+       0,   108,   109,     0,   110,   111,   270,   112,     0,     0,
+       0,     0,   275,   222,   277,     0,   276,   116,   117,   118,
+     119,     0,     0,     0,   231,   120,   121,    -6,     1,     0,
+     287,     0,   288,     0,     0,     0,     0,     2,   285,     3,
+       4,     5,     6,   103,     7,     8,     9,    10,    11,    12,
+       0,     0,     0,     0,     0,    13,   103,    14,    15,    16,
+       0,     0,    17,     0,     0,     0,     0,    18,    19,    20,
+       0,     0,    21,     0,     0,     0,    22,    23,    24,    25,
+       0,     0,    26,     0,     0,     0,     0,     0,     0,     0,
+       0,    27,     0,     0,     0,     0,     0,     0,    28,     0,
+       0,    29,    30,     0,     0,    31,    32,     0,     0,     0,
+      -6,    33,     2,     0,     3,     4,     5,     6,     0,     7,
+       8,     9,    10,    11,    12,     0,     0,     0,     0,     0,
+      13,     0,    14,    15,    16,     0,     0,    17,     0,     0,
        0,     0,    18,    19,    20,     0,     0,    21,     0,     0,
-       0,     0,     0,    24,    25,     0,     0,    26,     0,     0,
+       0,    22,    23,    24,    25,     0,     0,    26,     0,     0,
        0,     0,     0,     0,     0,     0,    27,     0,     0,     0,
+       0,     0,     0,    28,     0,     0,    29,    30,     0,     0,
+      31,    32,     0,     0,     0,     2,    33,     3,     4,     5,
+       6,     0,     7,     8,     9,    10,    52,    12,     0,     0,
+       0,     0,   269,    13,     0,    14,    15,    16,     0,     0,
+       0,     0,     0,     0,     0,    18,    19,    20,   108,   109,
+      21,   110,   111,     0,   112,     0,    24,    25,     0,     0,
+      26,     0,     0,   115,   116,   117,   118,   119,     0,    27,
+       0,     0,   120,   121,     0,     0,    28,     0,     0,     0,
+      30,     0,     0,    31,    32,     0,     0,     0,    50,    33,
+       2,     0,     3,     4,     5,     6,     0,     7,     8,     9,
+      10,    52,    12,     0,     0,     0,     0,     0,    13,     0,
+      14,    15,    16,     0,     0,     0,     0,     0,     0,     0,
+      18,    19,    20,   108,   109,    21,   110,   111,     0,   112,
+       0,    24,    25,     0,     0,    26,     0,     0,     0,     0,
+       0,   118,   119,     0,    27,     0,     0,   120,   121,     0,
        0,    28,     0,     0,     0,    30,     0,     0,    31,    32,
        0,     0,     0,    50,    33,     2,     0,     3,     4,     5,
        6,     0,     7,     8,     9,    10,    52,    12,     0,     0,
@@ -891,155 +898,177 @@ static const yytype_int16 yytable[] =
        0,     0,     0,     0,     0,    18,    19,    20,     0,     0,
       21,     0,     0,     0,     0,     0,    24,    25,     0,     0,
       26,     0,     0,     0,     0,     0,     0,     0,     0,    27,
-       0,     0,     0,     0,    28,     0,     0,     0,    30,     0,
-       0,    31,    32,     0,     0,     0,     2,    33,     3,     4,
-       5,     6,     0,     7,     8,     9,    10,    52,    12,     0,
-       0,     0,   180,     0,    13,     0,    14,    15,     0,     0,
-       0,     0,     0,     0,   105,   106,    18,     0,    20,   107,
-     108,   109,     0,   110,   111,   112,   113,    24,    25,     0,
-       0,    26,   181,   114,   115,   116,   117,   118,     0,     0,
-      27,     0,   119,   120,     0,    28,     0,     0,     0,    30,
-       0,     0,    31,    32,     0,     0,     0,     2,    33,     3,
-       4,     5,     6,     0,     7,     0,     0,     0,    52,    12,
-       0,     0,     0,     0,     0,     0,    65,     0,     0,     0,
-       0,    66,     0,    67,    68,    69,    70,    53,     2,    20,
-       3,     4,     5,     6,     0,     7,     0,     0,     0,    52,
-      12,     0,     2,     0,     3,     4,     5,     6,     0,     7,
-       0,    27,     0,    52,    12,     0,    28,     0,    53,     0,
-      20,    65,     0,    31,    32,     0,     0,     0,    67,    33,
-      69,     0,    53,     0,    20,     0,     0,     0,     0,     0,
-       0,     0,    27,   131,     0,    85,     0,    28,     0,     0,
-       0,     0,     0,     0,    31,    32,    27,     0,     0,     0,
-     101,    28,     0,     0,     0,     0,   105,   106,    31,    32,
-       0,   107,   108,   109,    33,   110,   111,   112,   113,     0,
-       0,   140,     0,     0,     0,   114,   115,   116,   117,   118,
-       0,   105,   106,     0,   119,   120,   107,   108,   109,     0,
-     110,   111,   112,   113,     0,     0,     0,     0,     0,     0,
-     114,   115,   116,   117,   118,     0,   105,   106,     0,   119,
-     120,   107,   108,   109,     0,   110,   111,   112,   113,     0,
-     143,   144,     0,     0,     0,   114,   115,   116,   117,   118,
-       0,   105,   106,     0,   119,   120,   107,   108,   109,     0,
-     110,   111,   112,   113,     0,     0,     0,     0,     0,   154,
-     114,   115,   116,   117,   118,     0,   105,   106,   147,   119,
-     120,   107,   108,   109,     0,   110,   111,   112,   113,     0,
-       0,     0,     0,     0,     0,   114,   115,   116,   117,   118,
-       0,   105,   106,   147,   119,   120,   107,   108,   109,     0,
-     110,   111,   112,   113,     0,     0,     0,     0,     0,   154,
-     114,   115,   116,   117,   118,     0,   105,   106,     0,   119,
-     120,   107,   108,   109,     0,   110,   111,   112,   113,     0,
-       0,     0,     0,     0,     0,   114,   115,   116,   117,   118,
-       0,   -61,   -61,     0,   119,   120,   -61,   -61,   -61,     0,
-     -61,   -61,   -61,   -61,     0,     0,     0,     0,     0,     0,
-     -61,     0,     0,   -61,   -61,     0,     0,    60,     0,   -61,
-     -61
+       0,     0,     0,     0,     0,     0,    28,     0,     0,     0,
+      30,     0,     0,    31,    32,     0,     0,     0,     2,    33,
+       3,     4,     5,     6,     0,     7,     8,     9,    10,    52,
+      12,     0,     0,     0,     0,     0,    13,     0,    14,    15,
+       0,     0,     0,     0,     0,     0,     0,     0,    18,     0,
+      20,     0,     0,     0,     0,     0,     0,     0,     0,    24,
+      25,     0,     0,    26,     0,     0,     0,     0,     0,     0,
+       0,     0,    27,     0,     0,     0,     0,     0,     0,    28,
+       0,     0,     0,    30,     0,     0,    31,    32,     0,     0,
+       0,     2,    33,     3,     4,     5,     6,     0,     7,     0,
+       0,     0,    52,    12,     0,     0,     0,     0,     0,     0,
+      65,     0,     0,     0,     0,    66,     0,    67,    68,    69,
+      70,    53,     0,    20,     0,     2,     0,     3,     4,     5,
+       6,     0,     7,     0,     0,     0,    52,    12,     0,     0,
+       0,     0,     0,     0,    65,    27,     0,     0,     0,     0,
+       0,    67,    28,    69,     0,    53,     0,    20,     0,    31,
+      32,     0,     0,     0,     0,    33,     0,     0,    85,     0,
+       2,     0,     3,     4,     5,     6,     0,     7,     0,    27,
+       0,    52,    12,     0,     0,     0,    28,     0,     0,     0,
+       0,     0,     0,    31,    32,     0,     0,     0,     0,    33,
+      53,     0,    20,     2,     0,     3,     4,     5,     6,     0,
+       7,     0,     0,     0,    52,    12,     0,     0,     0,     0,
+       0,     0,     0,     0,    27,     0,     0,     0,     0,     0,
+       0,    28,     0,    53,     0,    20,     0,     0,    31,    32,
+       0,     0,     0,     0,    33,     0,   132,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,    27,     0,     0,
+       0,     0,     0,     0,    28,     0,     0,     0,     0,   105,
+     106,    31,    32,     0,   107,   108,   109,   101,   110,   133,
+     134,   112,   113,   114,   186,     0,     0,     0,     0,     0,
+     115,   116,   117,   118,   119,     0,   105,   106,     0,   120,
+     121,   107,   108,   109,     0,   110,   111,     0,   112,   113,
+     114,     0,     0,   143,     0,     0,   187,   115,   116,   117,
+     118,   119,     0,   105,   106,     0,   120,   121,   107,   108,
+     109,     0,   110,   111,     0,   112,   113,   114,     0,     0,
+       0,     0,     0,     0,   115,   116,   117,   118,   119,     0,
+     105,   106,     0,   120,   121,   107,   108,   109,     0,   110,
+     111,     0,   112,   113,   114,     0,   146,   147,     0,     0,
+       0,   115,   116,   117,   118,   119,     0,   105,   106,     0,
+     120,   121,   107,   108,   109,     0,   110,   111,     0,   112,
+     113,   114,     0,     0,     0,     0,     0,   157,   115,   116,
+     117,   118,   119,     0,   105,   106,   150,   120,   121,   107,
+     108,   109,     0,   110,   111,     0,   112,   113,   114,     0,
+       0,     0,     0,     0,     0,   115,   116,   117,   118,   119,
+       0,   105,   106,   150,   120,   121,   107,   108,   109,     0,
+     110,   111,     0,   112,   113,   114,     0,     0,     0,     0,
+       0,   157,   115,   116,   117,   118,   119,     0,   105,   106,
+       0,   120,   121,   107,   108,   109,     0,   110,   111,     0,
+     112,   113,   114,     0,     0,     0,     0,     0,     0,   115,
+     116,   117,   118,   119,     0,   -63,   -63,     0,   120,   121,
+     -63,   -63,   -63,     0,   -63,   -63,     0,   -63,   -63,   -63,
+       0,     0,     0,     0,     0,     0,   -63,     0,     0,   -63,
+     -63,     0,     0,    60,     0,   -63,   -63
 };
 
 static const yytype_int16 yycheck[] =
 {
-       0,    11,     0,     0,     0,     0,    26,    27,   194,    60,
-      61,    44,     1,    25,    27,    26,    44,    81,    24,   184,
-     232,    13,    14,    81,   229,    46,    47,    41,    86,    21,
-      99,    21,   101,   245,    66,    48,   201,    48,    44,   244,
-     193,    74,    93,   210,     5,    34,    74,     8,     9,    10,
-      21,    21,    84,    85,    15,    21,   223,    18,    21,    21,
-      72,    81,   248,    24,    25,    21,    27,    28,   221,   222,
-      31,    32,    33,   226,    86,   228,    83,    21,    36,    86,
-      38,    42,    43,    81,   270,   238,    81,   240,    82,    74,
-      36,    82,    53,    86,    21,    43,    43,    21,    98,    60,
-      61,    98,    98,    86,    65,    86,    67,    21,    62,    63,
-      21,    65,    66,    21,    83,   268,    83,    21,    79,    44,
-     130,    75,    76,    77,    78,    79,    86,    27,    21,   139,
-      84,    85,    93,    32,    41,   145,    26,    32,    99,   100,
-     101,    43,    48,   153,   105,   106,   107,   108,   109,   110,
-     111,   112,   113,   114,   115,   116,   117,   118,   119,   120,
-      27,   122,    27,    27,   153,   234,    43,   128,    27,    41,
-      32,   150,   133,   134,   218,   136,   137,    98,   247,   140,
-      41,   244,   143,   144,    25,    10,    -1,    12,    13,    14,
-      15,    -1,    17,   154,    -1,    -1,    21,    22,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   217,   197,    -1,
-      -1,   200,    -1,    -1,    -1,    40,    -1,    42,    -1,   180,
-     181,   231,   211,   202,    -1,    -1,   205,   206,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,   216,    -1,    64,
-      -1,    -1,    -1,   204,    69,    -1,   225,    -1,    -1,    -1,
-     260,    76,    77,   232,   215,    -1,    -1,    82,    -1,    -1,
-      -1,    -1,   241,    -1,   243,   244,    -1,    -1,    -1,    -1,
-      -1,    -1,   272,   234,   253,     0,     1,    -1,    -1,    -1,
-     259,    -1,   261,    -1,    -1,    10,   247,    12,    13,    14,
-      15,    -1,    17,    18,    19,    20,    21,    22,   277,    -1,
-     279,    -1,    -1,    28,    -1,    30,    31,    32,    -1,    -1,
-      35,    -1,    -1,    -1,    -1,    40,    41,    42,    62,    63,
-      45,    65,    66,    -1,    49,    50,    51,    52,    -1,    -1,
-      55,    -1,    76,    77,    78,    79,    -1,    -1,    -1,    64,
-      84,    85,    -1,    -1,    69,    -1,    -1,    72,    73,    -1,
-      -1,    76,    77,    -1,    -1,    -1,    81,    82,    10,    -1,
-      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,    62,    63,    45,    65,    66,    -1,    49,    50,    51,
-      52,    -1,    -1,    55,    -1,    -1,    -1,    78,    79,    -1,
-      -1,    -1,    64,    84,    85,    -1,    -1,    69,    -1,    -1,
-      72,    73,    -1,    -1,    76,    77,    -1,    -1,    -1,    10,
-      82,    12,    13,    14,    15,    -1,    17,    18,    19,    20,
-      21,    22,    -1,    -1,    -1,    -1,    27,    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,    -1,    69,    -1,
-      -1,    -1,    73,    -1,    -1,    76,    77,    -1,    -1,    -1,
-      81,    82,    10,    -1,    12,    13,    14,    15,    -1,    17,
+       0,    11,     0,     0,     0,     0,   200,    44,    25,   199,
+       1,    26,    60,    61,    44,    26,    27,   190,   238,   216,
+      66,   235,    68,    83,    46,    47,    27,    99,    88,   101,
+      24,   251,   229,    48,   207,    41,   250,   227,   228,    76,
+      86,    87,   232,    34,   234,    93,    76,    48,     5,    83,
+      44,     8,     9,    10,   244,    72,   246,    21,    15,    85,
+     254,    18,    88,    21,    84,    13,    14,    24,    25,    86,
+      27,    28,    83,    21,    31,    32,    33,    36,    21,    38,
+      21,    21,   276,    21,   274,    42,    43,    83,    83,    21,
+      21,    76,    84,    21,    36,    88,    53,    43,    98,    88,
+      98,    98,    88,    60,    61,    21,    43,    21,    65,    21,
+      67,    85,    85,    21,    44,    21,    88,    27,    21,    41,
+      27,   131,    79,    32,    26,    48,    43,    27,    27,    27,
+      43,    32,   142,    98,   224,    32,    93,    41,   148,   250,
+     153,    25,    99,   100,   101,    41,   156,    -1,   105,   106,
+     107,   108,   109,   110,   111,   112,   113,   114,   115,   116,
+     117,   118,   119,   120,   121,   156,   123,    -1,   240,    -1,
+      -1,    -1,   129,    -1,    -1,    -1,   133,   134,    -1,   136,
+     137,   253,   139,   140,    -1,    -1,   143,    -1,    -1,   146,
+     147,    -1,    -1,    -1,    -1,   208,    -1,    -1,   211,   212,
+     157,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   222,
+      -1,    -1,   203,   223,    -1,   206,    -1,    -1,   231,    -1,
+      -1,    -1,    -1,    -1,    -1,   238,   217,   237,    -1,   186,
+     187,    -1,    -1,    -1,   247,    -1,   249,   250,    -1,    -1,
+      -1,    62,    63,    -1,    65,    66,   259,    68,    -1,    -1,
+      -1,    -1,   265,   210,   267,    -1,   266,    78,    79,    80,
+      81,    -1,    -1,    -1,   221,    86,    87,     0,     1,    -1,
+     283,    -1,   285,    -1,    -1,    -1,    -1,    10,   278,    12,
+      13,    14,    15,   240,    17,    18,    19,    20,    21,    22,
+      -1,    -1,    -1,    -1,    -1,    28,   253,    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,    -1,    -1,    -1,    71,    -1,
+      -1,    74,    75,    -1,    -1,    78,    79,    -1,    -1,    -1,
+      83,    84,    10,    -1,    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,
+      28,    -1,    30,    31,    32,    -1,    -1,    35,    -1,    -1,
       -1,    -1,    40,    41,    42,    -1,    -1,    45,    -1,    -1,
-      -1,    -1,    -1,    51,    52,    -1,    -1,    55,    -1,    -1,
+      -1,    49,    50,    51,    52,    -1,    -1,    55,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    64,    -1,    -1,    -1,
-      -1,    69,    -1,    -1,    -1,    73,    -1,    -1,    76,    77,
-      -1,    -1,    -1,    81,    82,    10,    -1,    12,    13,    14,
+      -1,    -1,    -1,    71,    -1,    -1,    74,    75,    -1,    -1,
+      78,    79,    -1,    -1,    -1,    10,    84,    12,    13,    14,
+      15,    -1,    17,    18,    19,    20,    21,    22,    -1,    -1,
+      -1,    -1,    27,    28,    -1,    30,    31,    32,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    40,    41,    42,    62,    63,
+      45,    65,    66,    -1,    68,    -1,    51,    52,    -1,    -1,
+      55,    -1,    -1,    77,    78,    79,    80,    81,    -1,    64,
+      -1,    -1,    86,    87,    -1,    -1,    71,    -1,    -1,    -1,
+      75,    -1,    -1,    78,    79,    -1,    -1,    -1,    83,    84,
+      10,    -1,    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,    62,    63,    45,    65,    66,    -1,    68,
+      -1,    51,    52,    -1,    -1,    55,    -1,    -1,    -1,    -1,
+      -1,    80,    81,    -1,    64,    -1,    -1,    86,    87,    -1,
+      -1,    71,    -1,    -1,    -1,    75,    -1,    -1,    78,    79,
+      -1,    -1,    -1,    83,    84,    10,    -1,    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,
       55,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    64,
-      -1,    -1,    -1,    -1,    69,    -1,    -1,    -1,    73,    -1,
-      -1,    76,    77,    -1,    -1,    -1,    10,    82,    12,    13,
-      14,    15,    -1,    17,    18,    19,    20,    21,    22,    -1,
-      -1,    -1,    44,    -1,    28,    -1,    30,    31,    -1,    -1,
-      -1,    -1,    -1,    -1,    56,    57,    40,    -1,    42,    61,
-      62,    63,    -1,    65,    66,    67,    68,    51,    52,    -1,
-      -1,    55,    74,    75,    76,    77,    78,    79,    -1,    -1,
-      64,    -1,    84,    85,    -1,    69,    -1,    -1,    -1,    73,
-      -1,    -1,    76,    77,    -1,    -1,    -1,    10,    82,    12,
-      13,    14,    15,    -1,    17,    -1,    -1,    -1,    21,    22,
-      -1,    -1,    -1,    -1,    -1,    -1,    29,    -1,    -1,    -1,
-      -1,    34,    -1,    36,    37,    38,    39,    40,    10,    42,
-      12,    13,    14,    15,    -1,    17,    -1,    -1,    -1,    21,
-      22,    -1,    10,    -1,    12,    13,    14,    15,    -1,    17,
-      -1,    64,    -1,    21,    22,    -1,    69,    -1,    40,    -1,
-      42,    29,    -1,    76,    77,    -1,    -1,    -1,    36,    82,
-      38,    -1,    40,    -1,    42,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    64,    33,    -1,    53,    -1,    69,    -1,    -1,
-      -1,    -1,    -1,    -1,    76,    77,    64,    -1,    -1,    -1,
-      82,    69,    -1,    -1,    -1,    -1,    56,    57,    76,    77,
-      -1,    61,    62,    63,    82,    65,    66,    67,    68,    -1,
-      -1,    46,    -1,    -1,    -1,    75,    76,    77,    78,    79,
-      -1,    56,    57,    -1,    84,    85,    61,    62,    63,    -1,
-      65,    66,    67,    68,    -1,    -1,    -1,    -1,    -1,    -1,
-      75,    76,    77,    78,    79,    -1,    56,    57,    -1,    84,
-      85,    61,    62,    63,    -1,    65,    66,    67,    68,    -1,
-      70,    71,    -1,    -1,    -1,    75,    76,    77,    78,    79,
-      -1,    56,    57,    -1,    84,    85,    61,    62,    63,    -1,
-      65,    66,    67,    68,    -1,    -1,    -1,    -1,    -1,    74,
-      75,    76,    77,    78,    79,    -1,    56,    57,    83,    84,
-      85,    61,    62,    63,    -1,    65,    66,    67,    68,    -1,
-      -1,    -1,    -1,    -1,    -1,    75,    76,    77,    78,    79,
-      -1,    56,    57,    83,    84,    85,    61,    62,    63,    -1,
-      65,    66,    67,    68,    -1,    -1,    -1,    -1,    -1,    74,
-      75,    76,    77,    78,    79,    -1,    56,    57,    -1,    84,
-      85,    61,    62,    63,    -1,    65,    66,    67,    68,    -1,
-      -1,    -1,    -1,    -1,    -1,    75,    76,    77,    78,    79,
-      -1,    56,    57,    -1,    84,    85,    61,    62,    63,    -1,
-      65,    66,    67,    68,    -1,    -1,    -1,    -1,    -1,    -1,
-      75,    -1,    -1,    78,    79,    -1,    -1,    82,    -1,    84,
-      85
+      -1,    -1,    -1,    -1,    -1,    -1,    71,    -1,    -1,    -1,
+      75,    -1,    -1,    78,    79,    -1,    -1,    -1,    10,    84,
+      12,    13,    14,    15,    -1,    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,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    64,    -1,    -1,    -1,    -1,    -1,    -1,    71,
+      -1,    -1,    -1,    75,    -1,    -1,    78,    79,    -1,    -1,
+      -1,    10,    84,    12,    13,    14,    15,    -1,    17,    -1,
+      -1,    -1,    21,    22,    -1,    -1,    -1,    -1,    -1,    -1,
+      29,    -1,    -1,    -1,    -1,    34,    -1,    36,    37,    38,
+      39,    40,    -1,    42,    -1,    10,    -1,    12,    13,    14,
+      15,    -1,    17,    -1,    -1,    -1,    21,    22,    -1,    -1,
+      -1,    -1,    -1,    -1,    29,    64,    -1,    -1,    -1,    -1,
+      -1,    36,    71,    38,    -1,    40,    -1,    42,    -1,    78,
+      79,    -1,    -1,    -1,    -1,    84,    -1,    -1,    53,    -1,
+      10,    -1,    12,    13,    14,    15,    -1,    17,    -1,    64,
+      -1,    21,    22,    -1,    -1,    -1,    71,    -1,    -1,    -1,
+      -1,    -1,    -1,    78,    79,    -1,    -1,    -1,    -1,    84,
+      40,    -1,    42,    10,    -1,    12,    13,    14,    15,    -1,
+      17,    -1,    -1,    -1,    21,    22,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    64,    -1,    -1,    -1,    -1,    -1,
+      -1,    71,    -1,    40,    -1,    42,    -1,    -1,    78,    79,
+      -1,    -1,    -1,    -1,    84,    -1,    33,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    64,    -1,    -1,
+      -1,    -1,    -1,    -1,    71,    -1,    -1,    -1,    -1,    56,
+      57,    78,    79,    -1,    61,    62,    63,    84,    65,    66,
+      67,    68,    69,    70,    44,    -1,    -1,    -1,    -1,    -1,
+      77,    78,    79,    80,    81,    -1,    56,    57,    -1,    86,
+      87,    61,    62,    63,    -1,    65,    66,    -1,    68,    69,
+      70,    -1,    -1,    46,    -1,    -1,    76,    77,    78,    79,
+      80,    81,    -1,    56,    57,    -1,    86,    87,    61,    62,
+      63,    -1,    65,    66,    -1,    68,    69,    70,    -1,    -1,
+      -1,    -1,    -1,    -1,    77,    78,    79,    80,    81,    -1,
+      56,    57,    -1,    86,    87,    61,    62,    63,    -1,    65,
+      66,    -1,    68,    69,    70,    -1,    72,    73,    -1,    -1,
+      -1,    77,    78,    79,    80,    81,    -1,    56,    57,    -1,
+      86,    87,    61,    62,    63,    -1,    65,    66,    -1,    68,
+      69,    70,    -1,    -1,    -1,    -1,    -1,    76,    77,    78,
+      79,    80,    81,    -1,    56,    57,    85,    86,    87,    61,
+      62,    63,    -1,    65,    66,    -1,    68,    69,    70,    -1,
+      -1,    -1,    -1,    -1,    -1,    77,    78,    79,    80,    81,
+      -1,    56,    57,    85,    86,    87,    61,    62,    63,    -1,
+      65,    66,    -1,    68,    69,    70,    -1,    -1,    -1,    -1,
+      -1,    76,    77,    78,    79,    80,    81,    -1,    56,    57,
+      -1,    86,    87,    61,    62,    63,    -1,    65,    66,    -1,
+      68,    69,    70,    -1,    -1,    -1,    -1,    -1,    -1,    77,
+      78,    79,    80,    81,    -1,    56,    57,    -1,    86,    87,
+      61,    62,    63,    -1,    65,    66,    -1,    68,    69,    70,
+      -1,    -1,    -1,    -1,    -1,    -1,    77,    -1,    -1,    80,
+      81,    -1,    -1,    84,    -1,    86,    87
 };
 
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -1048,33 +1077,33 @@ static const yytype_uint8 yystos[] =
 {
        0,     1,    10,    12,    13,    14,    15,    17,    18,    19,
       20,    21,    22,    28,    30,    31,    32,    35,    40,    41,
-      42,    45,    49,    50,    51,    52,    55,    64,    69,    72,
-      73,    76,    77,    82,    88,    90,    91,    92,    93,    94,
-     101,   102,   103,   108,   109,   110,   113,   116,   117,   124,
-      81,    89,    21,    40,    91,   109,   109,   109,   109,   125,
-      82,   105,    41,    21,   111,    29,    34,    36,    37,    38,
-      39,   109,   114,   115,    21,   109,    46,    47,    13,    14,
-      21,    21,    21,    21,   109,    53,   114,   115,    21,   112,
-     109,   109,    21,    21,   109,   109,   109,     0,    89,    82,
-      74,    82,   100,   109,   109,    56,    57,    61,    62,    63,
-      65,    66,    67,    68,    75,    76,    77,    78,    79,    84,
-      85,   109,    86,   125,   125,    86,   109,   109,    36,   115,
-     118,    33,    21,    44,    74,   109,    44,    74,    43,   119,
-      46,   115,    86,    70,    71,   120,   125,    83,    90,   100,
-     109,   100,   109,    43,    74,   106,   109,   109,   109,   109,
-     109,   109,   109,   109,   109,   109,   109,   109,   109,   109,
-     109,   109,   109,    83,    21,   109,   105,    21,   109,   109,
-      44,    74,   109,   109,   105,   109,    21,   109,   109,   105,
-      83,   106,    83,    89,   105,   109,    21,   122,   109,   109,
-     122,   121,   107,    24,    44,   107,    92,   110,    86,    89,
-      89,   122,    89,    93,   106,    44,   109,   106,   106,    21,
-      86,   123,   123,    89,    27,   109,   106,    27,    48,   105,
-      26,    48,    97,    98,   104,    21,   107,   107,   123,    41,
-     106,   107,    32,   107,    96,    97,    99,   104,   105,    98,
-     106,   100,   107,   107,   106,   106,    99,   106,   100,    92,
-      48,    95,    43,    27,   106,    27,    27,    27,    43,   106,
-     105,   106,   105,    27,    41,    32,    32,   107,    92,    93,
-      41,   106,   106
+      42,    45,    49,    50,    51,    52,    55,    64,    71,    74,
+      75,    78,    79,    84,    90,    92,    93,    94,    95,    96,
+     103,   104,   105,   110,   111,   112,   115,   118,   119,   126,
+      83,    91,    21,    40,    93,   111,   111,   111,   111,   127,
+      84,   107,    41,    21,   113,    29,    34,    36,    37,    38,
+      39,   111,   116,   117,    21,   111,    46,    47,    13,    14,
+      21,    21,    21,    21,   111,    53,   116,   117,    21,   114,
+     111,   111,    21,    21,   111,   111,   111,     0,    91,    84,
+      76,    84,   102,   111,   111,    56,    57,    61,    62,    63,
+      65,    66,    68,    69,    70,    77,    78,    79,    80,    81,
+      86,    87,   111,    88,   127,   127,    88,   111,   111,    36,
+     117,   120,    33,    66,    67,    21,    44,    76,   111,    44,
+      76,    43,   121,    46,   117,    88,    72,    73,   122,   127,
+      85,    92,   102,   111,   102,   111,    43,    76,   108,   111,
+     111,   111,   111,   111,   111,   111,   111,   111,   111,   111,
+     111,   111,   111,   111,   111,   111,   111,    85,    21,   111,
+     107,    21,   111,   111,   111,   111,    44,    76,   111,   111,
+     107,   111,    21,   111,   111,   107,    85,   108,    85,    91,
+     107,   111,    21,   124,   111,   111,   124,   123,   109,    24,
+      44,   109,    94,   112,    88,    91,    91,   124,    91,    95,
+     108,    44,   111,   108,   108,    21,    88,   125,   125,    91,
+      27,   111,   108,    27,    48,   107,    26,    48,    99,   100,
+     106,    21,   109,   109,   125,    41,   108,   109,    32,   109,
+      98,    99,   101,   106,   107,   100,   108,   102,   109,   109,
+     108,   108,   101,   108,   102,    94,    48,    97,    43,    27,
+     108,    27,    27,    27,    43,   108,   107,   108,   107,    27,
+      41,    32,    32,   109,    94,    95,    41,   108,   108
 };
 
 #define yyerrok		(yyerrstatus = 0)
@@ -1918,6 +1947,16 @@ yyreduce:
 
   case 13:
 #line 130 "engines/director/lingo/lingo-gr.y"
+    { (yyval.code) = g_lingo->code1(g_lingo->c_after); ;}
+    break;
+
+  case 14:
+#line 131 "engines/director/lingo/lingo-gr.y"
+    { (yyval.code) = g_lingo->code1(g_lingo->c_before); ;}
+    break;
+
+  case 15:
+#line 132 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->code1(g_lingo->c_varpush);
 		g_lingo->codeString((yyvsp[(2) - (4)].s)->c_str());
@@ -1926,8 +1965,8 @@ yyreduce:
 		delete (yyvsp[(2) - (4)].s); ;}
     break;
 
-  case 14:
-#line 136 "engines/director/lingo/lingo-gr.y"
+  case 16:
+#line 138 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(0); // Put dummy id
 		g_lingo->code1(g_lingo->c_theentityassign);
@@ -1938,8 +1977,8 @@ yyreduce:
 		(yyval.code) = (yyvsp[(4) - (4)].code); ;}
     break;
 
-  case 15:
-#line 144 "engines/director/lingo/lingo-gr.y"
+  case 17:
+#line 146 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->code1(g_lingo->c_swap);
 		g_lingo->code1(g_lingo->c_theentityassign);
@@ -1950,8 +1989,8 @@ yyreduce:
 		(yyval.code) = (yyvsp[(5) - (5)].code); ;}
     break;
 
-  case 16:
-#line 152 "engines/director/lingo/lingo-gr.y"
+  case 18:
+#line 154 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->code1(g_lingo->c_varpush);
 		g_lingo->codeString((yyvsp[(2) - (4)].s)->c_str());
@@ -1960,8 +1999,8 @@ yyreduce:
 		delete (yyvsp[(2) - (4)].s); ;}
     break;
 
-  case 17:
-#line 158 "engines/director/lingo/lingo-gr.y"
+  case 19:
+#line 160 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(0); // Put dummy id
 		g_lingo->code1(g_lingo->c_theentityassign);
@@ -1972,8 +2011,8 @@ yyreduce:
 		(yyval.code) = (yyvsp[(4) - (4)].code); ;}
     break;
 
-  case 18:
-#line 166 "engines/director/lingo/lingo-gr.y"
+  case 20:
+#line 168 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->code1(g_lingo->c_swap);
 		g_lingo->code1(g_lingo->c_theentityassign);
@@ -1984,13 +2023,13 @@ yyreduce:
 		(yyval.code) = (yyvsp[(5) - (5)].code); ;}
     break;
 
-  case 19:
-#line 175 "engines/director/lingo/lingo-gr.y"
+  case 21:
+#line 177 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_xpop); ;}
     break;
 
-  case 23:
-#line 184 "engines/director/lingo/lingo-gr.y"
+  case 25:
+#line 186 "engines/director/lingo/lingo-gr.y"
     {
 		inst body = 0, end = 0;
 		WRITE_UINT32(&body, (yyvsp[(5) - (8)].code));
@@ -1999,8 +2038,8 @@ yyreduce:
 		(*g_lingo->_currentScript)[(yyvsp[(1) - (8)].code) + 2] = end; ;}
     break;
 
-  case 24:
-#line 195 "engines/director/lingo/lingo-gr.y"
+  case 26:
+#line 197 "engines/director/lingo/lingo-gr.y"
     {
 		inst init = 0, finish = 0, body = 0, end = 0, inc = 0;
 		WRITE_UINT32(&init, (yyvsp[(3) - (11)].code));
@@ -2015,8 +2054,8 @@ yyreduce:
 		(*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 5] = end; ;}
     break;
 
-  case 25:
-#line 211 "engines/director/lingo/lingo-gr.y"
+  case 27:
+#line 213 "engines/director/lingo/lingo-gr.y"
     {
 		inst init = 0, finish = 0, body = 0, end = 0, inc = 0;
 		WRITE_UINT32(&init, (yyvsp[(3) - (12)].code));
@@ -2031,8 +2070,8 @@ yyreduce:
 		(*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 5] = end; ;}
     break;
 
-  case 26:
-#line 223 "engines/director/lingo/lingo-gr.y"
+  case 28:
+#line 225 "engines/director/lingo/lingo-gr.y"
     {
 			inst end = 0;
 			WRITE_UINT32(&end, (yyvsp[(3) - (3)].code));
@@ -2041,8 +2080,8 @@ yyreduce:
 		;}
     break;
 
-  case 27:
-#line 231 "engines/director/lingo/lingo-gr.y"
+  case 29:
+#line 233 "engines/director/lingo/lingo-gr.y"
     {
 		inst then = 0, end = 0;
 		WRITE_UINT32(&then, (yyvsp[(5) - (8)].code));
@@ -2052,8 +2091,8 @@ yyreduce:
 		g_lingo->processIf(0, 0); ;}
     break;
 
-  case 28:
-#line 238 "engines/director/lingo/lingo-gr.y"
+  case 30:
+#line 240 "engines/director/lingo/lingo-gr.y"
     {
 		inst then = 0, else1 = 0, end = 0;
 		WRITE_UINT32(&then, (yyvsp[(5) - (11)].code));
@@ -2065,8 +2104,8 @@ yyreduce:
 		g_lingo->processIf(0, 0); ;}
     break;
 
-  case 29:
-#line 247 "engines/director/lingo/lingo-gr.y"
+  case 31:
+#line 249 "engines/director/lingo/lingo-gr.y"
     {
 		inst then = 0, else1 = 0, end = 0;
 		WRITE_UINT32(&then, (yyvsp[(5) - (11)].code));
@@ -2078,8 +2117,8 @@ yyreduce:
 		g_lingo->processIf(0, (yyvsp[(9) - (11)].code)); ;}
     break;
 
-  case 30:
-#line 256 "engines/director/lingo/lingo-gr.y"
+  case 32:
+#line 258 "engines/director/lingo/lingo-gr.y"
     {
 		inst then = 0, else1 = 0, end = 0;
 		WRITE_UINT32(&then, (yyvsp[(4) - (6)].code));
@@ -2092,8 +2131,8 @@ yyreduce:
 		g_lingo->processIf(0, 0); ;}
     break;
 
-  case 31:
-#line 266 "engines/director/lingo/lingo-gr.y"
+  case 33:
+#line 268 "engines/director/lingo/lingo-gr.y"
     {
 		inst then = 0, else1 = 0, end = 0;
 		WRITE_UINT32(&then, (yyvsp[(4) - (10)].code));
@@ -2106,8 +2145,8 @@ yyreduce:
 		g_lingo->processIf(0, 0); ;}
     break;
 
-  case 32:
-#line 276 "engines/director/lingo/lingo-gr.y"
+  case 34:
+#line 278 "engines/director/lingo/lingo-gr.y"
     {
 		inst then = 0, else1 = 0, end = 0;
 		WRITE_UINT32(&then, (yyvsp[(4) - (10)].code));
@@ -2120,18 +2159,18 @@ yyreduce:
 		g_lingo->processIf(0, (yyvsp[(10) - (10)].code)); ;}
     break;
 
-  case 33:
-#line 287 "engines/director/lingo/lingo-gr.y"
+  case 35:
+#line 289 "engines/director/lingo/lingo-gr.y"
     { (yyval.code) = 0; ;}
     break;
 
-  case 34:
-#line 288 "engines/director/lingo/lingo-gr.y"
+  case 36:
+#line 290 "engines/director/lingo/lingo-gr.y"
     { (yyval.code) = (yyvsp[(2) - (3)].code); ;}
     break;
 
-  case 39:
-#line 299 "engines/director/lingo/lingo-gr.y"
+  case 41:
+#line 301 "engines/director/lingo/lingo-gr.y"
     {
 		inst then = 0;
 		WRITE_UINT32(&then, (yyvsp[(4) - (6)].code));
@@ -2140,8 +2179,8 @@ yyreduce:
 		g_lingo->codeLabel((yyvsp[(1) - (6)].code)); ;}
     break;
 
-  case 41:
-#line 308 "engines/director/lingo/lingo-gr.y"
+  case 43:
+#line 310 "engines/director/lingo/lingo-gr.y"
     {
 		inst then = 0;
 		WRITE_UINT32(&then, (yyvsp[(4) - (5)].code));
@@ -2150,23 +2189,23 @@ yyreduce:
 		g_lingo->codeLabel((yyvsp[(1) - (5)].code)); ;}
     break;
 
-  case 42:
-#line 316 "engines/director/lingo/lingo-gr.y"
+  case 44:
+#line 318 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(STOP); ;}
     break;
 
-  case 43:
-#line 317 "engines/director/lingo/lingo-gr.y"
+  case 45:
+#line 319 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code2(g_lingo->c_eq, STOP); ;}
     break;
 
-  case 45:
-#line 320 "engines/director/lingo/lingo-gr.y"
+  case 47:
+#line 322 "engines/director/lingo/lingo-gr.y"
     { (yyval.code) = g_lingo->code3(g_lingo->c_repeatwhilecode, STOP, STOP); ;}
     break;
 
-  case 46:
-#line 322 "engines/director/lingo/lingo-gr.y"
+  case 48:
+#line 324 "engines/director/lingo/lingo-gr.y"
     {
 		(yyval.code) = g_lingo->code3(g_lingo->c_repeatwithcode, STOP, STOP);
 		g_lingo->code3(STOP, STOP, STOP);
@@ -2174,8 +2213,8 @@ yyreduce:
 		delete (yyvsp[(3) - (3)].s); ;}
     break;
 
-  case 47:
-#line 328 "engines/director/lingo/lingo-gr.y"
+  case 49:
+#line 330 "engines/director/lingo/lingo-gr.y"
     {
 		(yyval.code) = g_lingo->code1(g_lingo->c_ifcode);
 		g_lingo->code3(STOP, STOP, STOP);
@@ -2183,8 +2222,8 @@ yyreduce:
 		g_lingo->codeLabel(0); ;}
     break;
 
-  case 48:
-#line 334 "engines/director/lingo/lingo-gr.y"
+  case 50:
+#line 336 "engines/director/lingo/lingo-gr.y"
     {
 		inst skipEnd;
 		WRITE_UINT32(&skipEnd, 1); // We have to skip end to avoid multiple executions
@@ -2193,23 +2232,23 @@ yyreduce:
 		g_lingo->code1(skipEnd); ;}
     break;
 
-  case 49:
-#line 341 "engines/director/lingo/lingo-gr.y"
+  case 51:
+#line 343 "engines/director/lingo/lingo-gr.y"
     { (yyval.code) = g_lingo->_currentScript->size(); ;}
     break;
 
-  case 50:
-#line 343 "engines/director/lingo/lingo-gr.y"
+  case 52:
+#line 345 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(STOP); (yyval.code) = g_lingo->_currentScript->size(); ;}
     break;
 
-  case 51:
-#line 345 "engines/director/lingo/lingo-gr.y"
+  case 53:
+#line 347 "engines/director/lingo/lingo-gr.y"
     { (yyval.code) = g_lingo->_currentScript->size(); ;}
     break;
 
-  case 54:
-#line 350 "engines/director/lingo/lingo-gr.y"
+  case 56:
+#line 352 "engines/director/lingo/lingo-gr.y"
     {
 		(yyval.code) = g_lingo->code1(g_lingo->c_whencode);
 		g_lingo->code1(STOP);
@@ -2217,56 +2256,56 @@ yyreduce:
 		delete (yyvsp[(2) - (3)].s); ;}
     break;
 
-  case 55:
-#line 356 "engines/director/lingo/lingo-gr.y"
+  case 57:
+#line 358 "engines/director/lingo/lingo-gr.y"
     { (yyval.code) = g_lingo->codeConst((yyvsp[(1) - (1)].i)); ;}
     break;
 
-  case 56:
-#line 357 "engines/director/lingo/lingo-gr.y"
+  case 58:
+#line 359 "engines/director/lingo/lingo-gr.y"
     {
 		(yyval.code) = g_lingo->code1(g_lingo->c_fconstpush);
 		g_lingo->codeFloat((yyvsp[(1) - (1)].f)); ;}
     break;
 
-  case 57:
-#line 360 "engines/director/lingo/lingo-gr.y"
-    {
+  case 59:
+#line 362 "engines/director/lingo/lingo-gr.y"
+    {											// D3
 		(yyval.code) = g_lingo->code1(g_lingo->c_symbolpush);
 		g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); ;}
     break;
 
-  case 58:
-#line 363 "engines/director/lingo/lingo-gr.y"
+  case 60:
+#line 365 "engines/director/lingo/lingo-gr.y"
     {
 		(yyval.code) = g_lingo->code1(g_lingo->c_stringpush);
 		g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); ;}
     break;
 
-  case 59:
-#line 366 "engines/director/lingo/lingo-gr.y"
+  case 61:
+#line 368 "engines/director/lingo/lingo-gr.y"
     {
 		(yyval.code) = g_lingo->code1(g_lingo->_handlers[*(yyvsp[(1) - (1)].s)]->u.func);
 		delete (yyvsp[(1) - (1)].s); ;}
     break;
 
-  case 60:
-#line 369 "engines/director/lingo/lingo-gr.y"
+  case 62:
+#line 371 "engines/director/lingo/lingo-gr.y"
     {
 		(yyval.code) = g_lingo->codeFunc((yyvsp[(1) - (4)].s), (yyvsp[(3) - (4)].narg));
 		delete (yyvsp[(1) - (4)].s); ;}
     break;
 
-  case 61:
-#line 372 "engines/director/lingo/lingo-gr.y"
+  case 63:
+#line 374 "engines/director/lingo/lingo-gr.y"
     {
 		(yyval.code) = g_lingo->code1(g_lingo->c_eval);
 		g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str());
 		delete (yyvsp[(1) - (1)].s); ;}
     break;
 
-  case 62:
-#line 376 "engines/director/lingo/lingo-gr.y"
+  case 64:
+#line 378 "engines/director/lingo/lingo-gr.y"
     {
 		(yyval.code) = g_lingo->codeConst(0); // Put dummy id
 		g_lingo->code1(g_lingo->c_theentitypush);
@@ -2276,8 +2315,8 @@ yyreduce:
 		g_lingo->code2(e, f); ;}
     break;
 
-  case 63:
-#line 383 "engines/director/lingo/lingo-gr.y"
+  case 65:
+#line 385 "engines/director/lingo/lingo-gr.y"
     {
 		(yyval.code) = g_lingo->code1(g_lingo->c_theentitypush);
 		inst e = 0, f = 0;
@@ -2286,262 +2325,267 @@ yyreduce:
 		g_lingo->code2(e, f); ;}
     break;
 
-  case 65:
-#line 390 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_add); ;}
-    break;
-
-  case 66:
-#line 391 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_sub); ;}
-    break;
-
   case 67:
 #line 392 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_mul); ;}
+    { g_lingo->code1(g_lingo->c_add); ;}
     break;
 
   case 68:
 #line 393 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_div); ;}
+    { g_lingo->code1(g_lingo->c_sub); ;}
     break;
 
   case 69:
 #line 394 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_mod); ;}
+    { g_lingo->code1(g_lingo->c_mul); ;}
     break;
 
   case 70:
 #line 395 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_gt); ;}
+    { g_lingo->code1(g_lingo->c_div); ;}
     break;
 
   case 71:
 #line 396 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_lt); ;}
+    { g_lingo->code1(g_lingo->c_mod); ;}
     break;
 
   case 72:
 #line 397 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_neq); ;}
+    { g_lingo->code1(g_lingo->c_gt); ;}
     break;
 
   case 73:
 #line 398 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_ge); ;}
+    { g_lingo->code1(g_lingo->c_lt); ;}
     break;
 
   case 74:
 #line 399 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_le); ;}
+    { g_lingo->code1(g_lingo->c_neq); ;}
     break;
 
   case 75:
 #line 400 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_and); ;}
+    { g_lingo->code1(g_lingo->c_ge); ;}
     break;
 
   case 76:
 #line 401 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_or); ;}
+    { g_lingo->code1(g_lingo->c_le); ;}
     break;
 
   case 77:
 #line 402 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_not); ;}
+    { g_lingo->code1(g_lingo->c_and); ;}
     break;
 
   case 78:
 #line 403 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_ampersand); ;}
+    { g_lingo->code1(g_lingo->c_or); ;}
     break;
 
   case 79:
 #line 404 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_concat); ;}
+    { g_lingo->code1(g_lingo->c_not); ;}
     break;
 
   case 80:
 #line 405 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_contains); ;}
+    { g_lingo->code1(g_lingo->c_ampersand); ;}
     break;
 
   case 81:
 #line 406 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_starts); ;}
+    { g_lingo->code1(g_lingo->c_after); ;}
     break;
 
   case 82:
 #line 407 "engines/director/lingo/lingo-gr.y"
-    { (yyval.code) = (yyvsp[(2) - (2)].code); ;}
+    { g_lingo->code1(g_lingo->c_concat); ;}
     break;
 
   case 83:
 #line 408 "engines/director/lingo/lingo-gr.y"
-    { (yyval.code) = (yyvsp[(2) - (2)].code); g_lingo->code1(g_lingo->c_negate); ;}
+    { g_lingo->code1(g_lingo->c_contains); ;}
     break;
 
   case 84:
 #line 409 "engines/director/lingo/lingo-gr.y"
-    { (yyval.code) = (yyvsp[(2) - (3)].code); ;}
+    { g_lingo->code1(g_lingo->c_starts); ;}
     break;
 
   case 85:
 #line 410 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_intersects); ;}
+    { (yyval.code) = (yyvsp[(2) - (2)].code); ;}
     break;
 
   case 86:
 #line 411 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_within); ;}
+    { (yyval.code) = (yyvsp[(2) - (2)].code); g_lingo->code1(g_lingo->c_negate); ;}
     break;
 
   case 87:
+#line 412 "engines/director/lingo/lingo-gr.y"
+    { (yyval.code) = (yyvsp[(2) - (3)].code); ;}
+    break;
+
+  case 88:
+#line 413 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->code1(g_lingo->c_intersects); ;}
+    break;
+
+  case 89:
 #line 414 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_printtop); ;}
+    { g_lingo->code1(g_lingo->c_within); ;}
     break;
 
   case 90:
 #line 417 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->code1(g_lingo->c_printtop); ;}
+    break;
+
+  case 93:
+#line 420 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_exitRepeat); ;}
     break;
 
-  case 91:
-#line 418 "engines/director/lingo/lingo-gr.y"
+  case 94:
+#line 421 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeConst(0); // Push fake value on stack
 							  g_lingo->code1(g_lingo->c_procret); ;}
     break;
 
-  case 94:
-#line 422 "engines/director/lingo/lingo-gr.y"
+  case 97:
+#line 425 "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 95:
-#line 425 "engines/director/lingo/lingo-gr.y"
+  case 98:
+#line 428 "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 96:
-#line 428 "engines/director/lingo/lingo-gr.y"
+  case 99:
+#line 431 "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 97:
-#line 431 "engines/director/lingo/lingo-gr.y"
+  case 100:
+#line 434 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeFunc((yyvsp[(1) - (2)].s), (yyvsp[(2) - (2)].narg)); ;}
     break;
 
-  case 98:
-#line 432 "engines/director/lingo/lingo-gr.y"
+  case 101:
+#line 435 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_open); ;}
     break;
 
-  case 99:
-#line 433 "engines/director/lingo/lingo-gr.y"
+  case 102:
+#line 436 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code2(g_lingo->c_voidpush, g_lingo->c_open); ;}
     break;
 
-  case 100:
-#line 434 "engines/director/lingo/lingo-gr.y"
+  case 103:
+#line 437 "engines/director/lingo/lingo-gr.y"
     { Common::String s("sound-"); s += *(yyvsp[(2) - (3)].s); g_lingo->codeFunc(&s, (yyvsp[(3) - (3)].narg)); ;}
     break;
 
-  case 101:
-#line 437 "engines/director/lingo/lingo-gr.y"
+  case 104:
+#line 440 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_global); g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); delete (yyvsp[(1) - (1)].s); ;}
     break;
 
-  case 102:
-#line 438 "engines/director/lingo/lingo-gr.y"
+  case 105:
+#line 441 "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 103:
-#line 441 "engines/director/lingo/lingo-gr.y"
+  case 106:
+#line 444 "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 104:
-#line 442 "engines/director/lingo/lingo-gr.y"
+  case 107:
+#line 445 "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 105:
-#line 453 "engines/director/lingo/lingo-gr.y"
+  case 108:
+#line 456 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_gotoloop); ;}
     break;
 
-  case 106:
-#line 454 "engines/director/lingo/lingo-gr.y"
+  case 109:
+#line 457 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_gotonext); ;}
     break;
 
-  case 107:
-#line 455 "engines/director/lingo/lingo-gr.y"
+  case 110:
+#line 458 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_gotoprevious); ;}
     break;
 
-  case 108:
-#line 456 "engines/director/lingo/lingo-gr.y"
+  case 111:
+#line 459 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(1);
 		g_lingo->code1(g_lingo->c_goto); ;}
     break;
 
-  case 109:
-#line 459 "engines/director/lingo/lingo-gr.y"
+  case 112:
+#line 462 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(3);
 		g_lingo->code1(g_lingo->c_goto); ;}
     break;
 
-  case 110:
-#line 462 "engines/director/lingo/lingo-gr.y"
+  case 113:
+#line 465 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(2);
 		g_lingo->code1(g_lingo->c_goto); ;}
     break;
 
-  case 115:
-#line 475 "engines/director/lingo/lingo-gr.y"
+  case 118:
+#line 478 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_playdone); ;}
     break;
 
-  case 116:
-#line 476 "engines/director/lingo/lingo-gr.y"
+  case 119:
+#line 479 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(1);
 		g_lingo->code1(g_lingo->c_play); ;}
     break;
 
-  case 117:
-#line 479 "engines/director/lingo/lingo-gr.y"
+  case 120:
+#line 482 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(3);
 		g_lingo->code1(g_lingo->c_play); ;}
     break;
 
-  case 118:
-#line 482 "engines/director/lingo/lingo-gr.y"
+  case 121:
+#line 485 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(2);
 		g_lingo->code1(g_lingo->c_play); ;}
     break;
 
-  case 119:
-#line 512 "engines/director/lingo/lingo-gr.y"
+  case 122:
+#line 515 "engines/director/lingo/lingo-gr.y"
     { g_lingo->_indef = true; g_lingo->_currentFactory.clear(); ;}
     break;
 
-  case 120:
-#line 513 "engines/director/lingo/lingo-gr.y"
+  case 123:
+#line 516 "engines/director/lingo/lingo-gr.y"
     {
 			g_lingo->codeConst(0); // Push fake value on stack
 			g_lingo->code1(g_lingo->c_procret);
@@ -2549,38 +2593,38 @@ yyreduce:
 			g_lingo->_indef = false; ;}
     break;
 
-  case 121:
-#line 518 "engines/director/lingo/lingo-gr.y"
+  case 124:
+#line 521 "engines/director/lingo/lingo-gr.y"
     {
 			g_lingo->codeFactory(*(yyvsp[(2) - (2)].s));
 		;}
     break;
 
-  case 122:
-#line 521 "engines/director/lingo/lingo-gr.y"
+  case 125:
+#line 524 "engines/director/lingo/lingo-gr.y"
     { g_lingo->_indef = true; ;}
     break;
 
-  case 123:
-#line 522 "engines/director/lingo/lingo-gr.y"
+  case 126:
+#line 525 "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 124:
-#line 526 "engines/director/lingo/lingo-gr.y"
+  case 127:
+#line 529 "engines/director/lingo/lingo-gr.y"
     { g_lingo->_indef = true; g_lingo->_currentFactory.clear(); ;}
     break;
 
-  case 125:
-#line 527 "engines/director/lingo/lingo-gr.y"
+  case 128:
+#line 530 "engines/director/lingo/lingo-gr.y"
     { g_lingo->_ignoreMe = true; ;}
     break;
 
-  case 126:
-#line 527 "engines/director/lingo/lingo-gr.y"
+  case 129:
+#line 530 "engines/director/lingo/lingo-gr.y"
     {
 				g_lingo->codeConst(0); // Push fake value on stack
 				g_lingo->code1(g_lingo->c_procret);
@@ -2594,33 +2638,33 @@ yyreduce:
 			;}
     break;
 
-  case 127:
-#line 539 "engines/director/lingo/lingo-gr.y"
+  case 130:
+#line 542 "engines/director/lingo/lingo-gr.y"
     { (yyval.narg) = 0; ;}
     break;
 
-  case 128:
-#line 540 "engines/director/lingo/lingo-gr.y"
+  case 131:
+#line 543 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeArg((yyvsp[(1) - (1)].s)); (yyval.narg) = 1; ;}
     break;
 
-  case 129:
-#line 541 "engines/director/lingo/lingo-gr.y"
+  case 132:
+#line 544 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeArg((yyvsp[(3) - (3)].s)); (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}
     break;
 
-  case 130:
-#line 542 "engines/director/lingo/lingo-gr.y"
+  case 133:
+#line 545 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeArg((yyvsp[(4) - (4)].s)); (yyval.narg) = (yyvsp[(1) - (4)].narg) + 1; ;}
     break;
 
-  case 131:
-#line 544 "engines/director/lingo/lingo-gr.y"
+  case 134:
+#line 547 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeArgStore(); ;}
     break;
 
-  case 132:
-#line 548 "engines/director/lingo/lingo-gr.y"
+  case 135:
+#line 551 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->code1(g_lingo->c_call);
 		g_lingo->codeString((yyvsp[(1) - (3)].s)->c_str());
@@ -2629,24 +2673,24 @@ yyreduce:
 		g_lingo->code1(numpar); ;}
     break;
 
-  case 133:
-#line 556 "engines/director/lingo/lingo-gr.y"
+  case 136:
+#line 559 "engines/director/lingo/lingo-gr.y"
     { (yyval.narg) = 0; ;}
     break;
 
-  case 134:
-#line 557 "engines/director/lingo/lingo-gr.y"
+  case 137:
+#line 560 "engines/director/lingo/lingo-gr.y"
     { (yyval.narg) = 1; ;}
     break;
 
-  case 135:
-#line 558 "engines/director/lingo/lingo-gr.y"
+  case 138:
+#line 561 "engines/director/lingo/lingo-gr.y"
     { (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}
     break;
 
 
 /* Line 1267 of yacc.c.  */
-#line 2650 "engines/director/lingo/lingo-gr.cpp"
+#line 2694 "engines/director/lingo/lingo-gr.cpp"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2860,6 +2904,6 @@ yyreturn:
 }
 
 
-#line 561 "engines/director/lingo/lingo-gr.y"
+#line 564 "engines/director/lingo/lingo-gr.y"
 
 
diff --git a/engines/director/lingo/lingo-gr.h b/engines/director/lingo/lingo-gr.h
index 34c0598e..d7482bc 100644
--- a/engines/director/lingo/lingo-gr.h
+++ b/engines/director/lingo/lingo-gr.h
@@ -102,14 +102,16 @@
      tOR = 318,
      tNOT = 319,
      tMOD = 320,
-     tCONCAT = 321,
-     tCONTAINS = 322,
-     tSTARTS = 323,
-     tSPRITE = 324,
-     tINTERSECTS = 325,
-     tWITHIN = 326,
-     tON = 327,
-     tSOUND = 328
+     tAFTER = 321,
+     tBEFORE = 322,
+     tCONCAT = 323,
+     tCONTAINS = 324,
+     tSTARTS = 325,
+     tSPRITE = 326,
+     tINTERSECTS = 327,
+     tWITHIN = 328,
+     tON = 329,
+     tSOUND = 330
    };
 #endif
 /* Tokens.  */
@@ -176,14 +178,16 @@
 #define tOR 318
 #define tNOT 319
 #define tMOD 320
-#define tCONCAT 321
-#define tCONTAINS 322
-#define tSTARTS 323
-#define tSPRITE 324
-#define tINTERSECTS 325
-#define tWITHIN 326
-#define tON 327
-#define tSOUND 328
+#define tAFTER 321
+#define tBEFORE 322
+#define tCONCAT 323
+#define tCONTAINS 324
+#define tSTARTS 325
+#define tSPRITE 326
+#define tINTERSECTS 327
+#define tWITHIN 328
+#define tON 329
+#define tSOUND 330
 
 
 
@@ -201,7 +205,7 @@ typedef union YYSTYPE
 	Common::Array<double> *arr;
 }
 /* Line 1529 of yacc.c.  */
-#line 205 "engines/director/lingo/lingo-gr.hpp"
+#line 209 "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 b9f15aa..17391c6 100644
--- a/engines/director/lingo/lingo-gr.y
+++ b/engines/director/lingo/lingo-gr.y
@@ -87,7 +87,7 @@ void yyerror(const char *s) {
 %token tMOVIE tNEXT tOF tPREVIOUS tPUT tREPEAT tSET tTHEN tTO tWHEN
 %token tWITH tWHILE tNLELSE tFACTORY tMETHOD tOPEN tPLAY tDONE tPLAYACCEL tINSTANCE
 %token tGE tLE tGT tLT tEQ tNEQ tAND tOR tNOT tMOD
-%token tCONCAT tCONTAINS tSTARTS
+%token tAFTER tBEFORE tCONCAT tCONTAINS tSTARTS
 %token tSPRITE tINTERSECTS tWITHIN
 %token tON tSOUND
 
@@ -127,6 +127,8 @@ asgn: tPUT expr tINTO ID 		{
 		g_lingo->code1(g_lingo->c_assign);
 		$$ = $2;
 		delete $4; }
+	| tPUT expr tAFTER expr 		{ $$ = g_lingo->code1(g_lingo->c_after); }		// D3
+	| tPUT expr tBEFORE expr 		{ $$ = g_lingo->code1(g_lingo->c_before); }		// D3
 	| tSET ID '=' expr			{
 		g_lingo->code1(g_lingo->c_varpush);
 		g_lingo->codeString($2->c_str());
@@ -357,7 +359,7 @@ expr: INT		{ $$ = g_lingo->codeConst($1); }
 	| FLOAT		{
 		$$ = g_lingo->code1(g_lingo->c_fconstpush);
 		g_lingo->codeFloat($1); }
-	| SYMBOL	{
+	| SYMBOL	{											// D3
 		$$ = g_lingo->code1(g_lingo->c_symbolpush);
 		g_lingo->codeString($1->c_str()); }
 	| STRING		{
@@ -401,6 +403,7 @@ expr: INT		{ $$ = g_lingo->codeConst($1); }
 	| expr tOR expr				{ g_lingo->code1(g_lingo->c_or); }
 	| tNOT expr  %prec UNARY	{ g_lingo->code1(g_lingo->c_not); }
 	| expr '&' expr				{ g_lingo->code1(g_lingo->c_ampersand); }
+	| expr tAFTER expr			{ g_lingo->code1(g_lingo->c_after); }
 	| expr tCONCAT expr			{ g_lingo->code1(g_lingo->c_concat); }
 	| expr tCONTAINS expr		{ g_lingo->code1(g_lingo->c_contains); }
 	| expr tSTARTS expr			{ g_lingo->code1(g_lingo->c_starts); }
@@ -523,7 +526,7 @@ defn: tMACRO ID { g_lingo->_indef = true; g_lingo->_currentFactory.clear(); }
 			g_lingo->code1(g_lingo->c_procret);
 			g_lingo->define(*$2, $4, $5 + 1, &g_lingo->_currentFactory);
 			g_lingo->_indef = false; }	;
-	| tON ID { g_lingo->_indef = true; g_lingo->_currentFactory.clear(); }
+	| tON ID { g_lingo->_indef = true; g_lingo->_currentFactory.clear(); }			// D3
 		begin { g_lingo->_ignoreMe = true; } argdef nl argstore stmtlist tEND	{
 				g_lingo->codeConst(0); // Push fake value on stack
 				g_lingo->code1(g_lingo->c_procret);
diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp
index 840c349..2e4ba95 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 62
-#define YY_END_OF_BUFFER 63
+#define YY_NUM_RULES 64
+#define YY_END_OF_BUFFER 65
 /* This struct is not used in this scanner,
    but its presence is necessary. */
 struct yy_trans_info
@@ -373,32 +373,33 @@ struct yy_trans_info
 	flex_int32_t yy_verify;
 	flex_int32_t yy_nxt;
 	};
-static yyconst flex_int16_t yy_accept[214] =
+static yyconst flex_int16_t yy_accept[224] =
     {   0,
-        0,    0,   63,   61,    3,   59,   59,   61,   61,   61,
-       58,   58,   58,   57,   58,   58,   55,   55,   55,   55,
-       55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
-       55,   55,   55,    2,    2,    3,   59,    0,    0,    0,
-        0,    0,   60,    4,   54,    1,   56,   57,   53,   51,
-       52,   55,   55,   55,   55,   55,   55,   55,   55,   55,
-       55,   19,    9,   55,   55,   55,   55,   55,   55,   55,
-       30,   31,   55,   33,   55,   55,   55,   55,   55,   55,
-       55,   55,   55,   45,   55,   55,    2,    2,    0,    4,
-        1,   56,    5,   55,   55,   55,   55,   13,   55,   55,
-
-       55,   55,    0,   55,   55,   55,   55,   55,   26,   55,
-       55,   29,   55,   55,   55,   36,   55,   38,   55,   55,
-       55,   55,   55,   55,   55,    0,   55,    7,    8,   12,
-       15,   55,   55,   55,    0,   55,   55,   22,   23,   55,
-       55,   55,   28,   32,   34,   55,   55,   55,   55,   55,
-        0,   44,   49,   55,   47,   11,   55,   55,   16,   55,
-       18,   55,   55,   24,   55,   27,   55,   55,   39,   55,
-       55,   43,   43,   50,   55,    0,   55,   55,   17,   55,
-       55,   25,   55,   37,   46,   40,    0,   43,   48,    0,
-       55,   14,   55,   55,   55,    0,   43,   10,    6,   20,
-
-       55,   35,    0,   43,   55,    0,    0,   21,   42,    0,
-        0,   41,    0
+        0,    0,   65,   63,    3,   61,   61,   63,   63,   63,
+       60,   60,   60,   59,   60,   60,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,    2,    2,    3,   61,    0,    0,
+        0,    0,    0,   62,    4,   56,    1,   58,   59,   55,
+       53,   54,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   21,   11,   57,   57,   57,   57,
+       57,   57,   57,   32,   33,   57,   35,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   47,   57,   57,    2,
+        2,    0,    4,    1,   58,   57,    6,   57,   57,   57,
+
+       57,   57,   15,   57,   57,   57,   57,    0,   57,   57,
+       57,   57,   57,   28,   57,   57,   31,   57,   57,   57,
+       38,   57,   40,   57,   57,   57,   57,   57,   57,   57,
+        0,   57,   57,   57,    9,   10,   14,   17,   57,   57,
+       57,    0,   57,   57,   24,   25,   57,   57,   57,   30,
+       34,   36,   57,   57,   57,   57,   57,    0,   46,   51,
+       57,   49,   13,    5,   57,   57,   57,   18,   57,   20,
+       57,   57,   26,   57,   29,   57,   57,   41,   57,   57,
+       45,   45,   52,   57,    0,    7,   57,   57,   19,   57,
+       57,   27,   57,   39,   48,   42,    0,   45,   50,    0,
+
+       57,   16,   57,   57,   57,    0,   45,   12,    8,   22,
+       57,   37,    0,   45,   57,    0,    0,   23,   44,    0,
+        0,   43,    0
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -444,133 +445,137 @@ static yyconst flex_int32_t yy_meta[64] =
         5,    5,    5
     } ;
 
-static yyconst flex_int16_t yy_base[221] =
+static yyconst flex_int16_t yy_base[231] =
     {   0,
-        0,   62,  166,  531,   66,   70,   74,   78,  158,    0,
-      531,  145,  128,   54,   70,  119,   58,    0,   58,   59,
-       70,   73,   71,   71,   72,  110,   89,  115,   81,   82,
-      128,  112,  126,  174,  185,  189,  531,  193,  197,  201,
-       78,   89,  531,    0,  531,    0,   81,  141,  531,  531,
-      531,    0,  140,  116,  172,  113,  164,  161,  183,  191,
-      127,  101,    0,  178,  184,  196,  182,  208,  181,  189,
-        0,    0,  200,    0,  209,  208,  196,  201,  200,  203,
-      209,  232,  229,    0,  236,  217,  267,  274,  226,    0,
-        0,   79,    0,  229,  237,  236,  241,    0,  232,  233,
-
-      253,  267,  287,  259,  274,  266,  266,  276,    0,  276,
-      268,    0,  277,  267,  271,    0,  288,    0,  282,  287,
-      281,  310,  288,  292,  291,  303,  312,    0,    0,    0,
-        0,  303,  315,  325,  314,  328,  314,    0,    0,  318,
-      320,  330,    0,    0,    0,  327,  336,  335,  323,  324,
-      359,    0,    0,  335,  335,  213,  339,  333,    0,  346,
-      531,  346,  345,    0,  349,    0,  354,  351,    0,  366,
-      357,  389,  395,    0,  367,  399,  375,  366,    0,  369,
-      379,    0,  371,    0,    0,    0,  408,  413,    0,  387,
-      384,    0,  401,  404,  387,  407,  429,  531,    0,    0,
-
-      391,    0,  430,  434,  405,  438,  449,    0,  450,  421,
-      454,  455,  531,  502,  504,  507,  510,  516,  521,  525
+        0,   62,  172,  556,   66,   70,   74,   78,  160,    0,
+      556,  145,  143,   54,   70,  125,   65,   67,   60,   63,
+       70,   86,   71,    0,   82,   70,   85,  111,  115,  109,
+       84,  128,  126,  127,  185,  189,  193,  556,  197,  158,
+      202,   83,  131,  556,    0,  556,    0,  113,   95,  556,
+      556,  556,    0,  112,  133,  162,  157,  182,  178,  193,
+      189,  196,  199,  188,   86,    0,  187,  189,  205,  191,
+      210,  188,  193,    0,    0,  208,    0,  214,  211,  199,
+      206,  218,  223,  227,  245,  242,    0,  243,  231,  269,
+      275,  233,    0,    0,   83,  248,    0,  246,  247,  249,
+
+      256,  265,    0,  257,  261,  269,  280,  296,  266,  282,
+      274,  275,  286,    0,  288,  280,    0,  288,  278,  282,
+        0,  301,    0,  295,  301,  297,  331,  304,  313,  303,
+      323,  313,  316,  333,    0,    0,    0,    0,  323,  335,
+      341,  331,  345,  332,    0,    0,  336,  337,  342,    0,
+        0,    0,  343,  354,  352,  339,  341,  376,    0,    0,
+      357,  355,  301,    0,  365,  367,  361,    0,  368,  556,
+      370,  367,    0,  382,    0,  374,  371,    0,  386,  375,
+      409,  410,    0,  385,  418,    0,  391,  382,    0,  407,
+      408,    0,  395,    0,    0,    0,  433,  434,    0,  413,
+
+      407,    0,  424,  428,  415,  428,  450,  556,    0,    0,
+      417,    0,  455,  456,  423,  468,  474,    0,  476,  442,
+      480,  487,  556,  527,  529,  532,  535,  541,  546,  550
     } ;
 
-static yyconst flex_int16_t yy_def[221] =
+static yyconst flex_int16_t yy_def[231] =
     {   0,
-      213,    1,  213,  213,  213,  213,  213,  213,  214,  215,
-      213,  213,  213,  213,  213,  213,  216,  216,  216,  216,
-      216,  216,  216,  216,  216,  216,  216,  216,  216,  216,
-      216,  216,  216,  213,  213,  213,  213,  213,  213,  213,
-      213,  214,  213,  217,  213,  218,  213,  213,  213,  213,
-      213,  216,  216,  216,  216,  216,  216,  216,  216,  216,
-      216,  216,  216,  216,  216,  216,  216,  216,  216,  216,
-      216,  216,  216,  216,  216,  216,  216,  216,  216,  216,
-      216,  216,  216,  216,  216,  216,  213,  213,  213,  217,
-      218,  213,  216,  216,  216,  216,  216,  216,  216,  216,
-
-      216,  216,  213,  216,  216,  216,  216,  216,  216,  216,
-      216,  216,  216,  216,  216,  216,  216,  216,  216,  216,
-      216,  216,  216,  216,  216,  213,  216,  216,  216,  216,
-      216,  216,  216,  216,  213,  216,  216,  216,  216,  216,
-      216,  216,  216,  216,  216,  216,  216,  216,  216,  216,
-      219,  216,  216,  216,  216,  213,  216,  216,  216,  216,
-      213,  216,  216,  216,  216,  216,  216,  216,  216,  216,
-      216,  219,  219,  216,  216,  213,  216,  216,  216,  216,
-      216,  216,  216,  216,  216,  216,  213,  219,  216,  213,
-      216,  216,  216,  216,  216,  213,  219,  213,  216,  216,
-
-      216,  216,  213,  219,  216,  220,  213,  216,  220,  213,
-      213,  220,    0,  213,  213,  213,  213,  213,  213,  213
+      223,    1,  223,  223,  223,  223,  223,  223,  224,  225,
+      223,  223,  223,  223,  223,  223,  226,  226,  226,  226,
+      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
+      226,  226,  226,  226,  223,  223,  223,  223,  223,  223,
+      223,  223,  224,  223,  227,  223,  228,  223,  223,  223,
+      223,  223,  226,  226,  226,  226,  226,  226,  226,  226,
+      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
+      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
+      226,  226,  226,  226,  226,  226,  226,  226,  226,  223,
+      223,  223,  227,  228,  223,  226,  226,  226,  226,  226,
+
+      226,  226,  226,  226,  226,  226,  226,  223,  226,  226,
+      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
+      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
+      223,  226,  226,  226,  226,  226,  226,  226,  226,  226,
+      226,  223,  226,  226,  226,  226,  226,  226,  226,  226,
+      226,  226,  226,  226,  226,  226,  226,  229,  226,  226,
+      226,  226,  223,  226,  226,  226,  226,  226,  226,  223,
+      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
+      229,  229,  226,  226,  223,  226,  226,  226,  226,  226,
+      226,  226,  226,  226,  226,  226,  223,  229,  226,  223,
+
+      226,  226,  226,  226,  226,  223,  229,  223,  226,  226,
+      226,  226,  223,  229,  226,  230,  223,  226,  230,  223,
+      223,  230,    0,  223,  223,  223,  223,  223,  223,  223
     } ;
 
-static yyconst flex_int16_t yy_nxt[595] =
+static yyconst flex_int16_t yy_nxt[620] =
     {   0,
         4,    5,    6,    7,    8,    9,   10,   11,   12,   13,
         4,   14,   15,   11,   16,   17,   18,   19,   20,   21,
-       22,   23,   18,   24,   18,   25,   26,   27,   28,   29,
-       18,   30,   31,   32,   18,   18,   33,   18,   18,   18,
-       17,   18,   19,   20,   21,   22,   23,   18,   24,   25,
-       26,   27,   28,   29,   18,   30,   31,   32,   18,   18,
-       33,   18,   18,   34,   47,   48,   35,   36,   37,   37,
-       38,   39,   40,   40,   39,   39,   40,   40,   39,   38,
-       37,   37,   38,   49,   50,   53,   54,   55,   59,   41,
-       92,   63,   92,   41,   43,   56,   61,   57,   64,   62,
-
-       65,   78,  103,   89,   60,  103,   75,   58,   69,   53,
-       54,   55,   76,   59,   41,   77,   63,   70,   41,   56,
-       61,   57,   64,   62,   65,   66,   78,   89,   60,   67,
-       75,   58,   51,   69,   83,   71,   76,   46,   68,   77,
-       84,   70,   72,   94,   73,   97,   74,   79,   85,   86,
-       66,   47,   48,   45,   67,  102,   80,   81,   93,   83,
-       71,   82,   68,   43,   84,  213,   72,   94,   73,   97,
-       74,  213,   79,   85,   86,   87,   37,   37,   88,  102,
-       80,   81,   98,   93,   99,   82,   88,   37,   37,   88,
-       36,   37,   37,   38,   38,   37,   37,   38,   39,   95,
-
-      100,   39,   39,   40,   40,   39,  101,   98,   96,   99,
-      104,  105,  106,  107,  176,  108,   41,  176,  111,  113,
-       41,  213,  112,   95,  114,  100,  109,  115,  213,  116,
-      117,  101,   96,  118,  104,  105,  106,  119,  107,  108,
-      120,   41,  111,  110,  113,   41,  112,  121,  122,  114,
-      125,  109,  115,  116,  117,  123,  128,  118,  126,  124,
-      130,  119,  127,  129,  120,  131,  132,  110,   87,   37,
-       37,   88,  121,  122,  125,   88,   37,   37,   88,  133,
-      123,  128,  126,  134,  124,  130,  127,  129,  103,  131,
-      132,  103,  136,  137,  213,  139,  213,  140,  141,  142,
-
-      213,  143,  138,  133,  144,  145,  146,  147,  134,  148,
-      149,  151,  150,  155,  151,  153,  136,  154,  137,  139,
-      135,  140,  156,  141,  142,  143,  138,  157,  144,  145,
-      146,  158,  147,  148,  159,  149,  150,  152,  155,  153,
-      160,  154,  161,  162,  135,  163,  164,  156,  165,  166,
-      167,  168,  157,  169,  174,  158,  170,  171,  175,  159,
-      151,  152,  177,  151,  178,  160,  161,  182,  162,  163,
-      164,  179,  165,  180,  166,  167,  168,  181,  169,  174,
-      170,  171,  183,  175,  184,  185,  193,  177,  178,  186,
-      187,  173,  182,  187,  189,  179,  187,  180,  194,  187,
-
-      176,  181,  191,  176,  192,  195,  183,  198,  184,  187,
-      185,  193,  187,  186,  187,  173,  199,  187,  189,  202,
-      200,  201,  190,  194,  205,  188,  191,  203,  192,  195,
-      187,  206,  198,  187,  206,  207,  196,  208,  207,  206,
-      199,  211,  206,  202,  197,  200,  201,  190,  205,  188,
-      207,  213,  203,  207,  213,  212,  212,  213,  212,  212,
-      196,  208,  204,  213,  213,  213,  211,  213,  197,  213,
-      213,  213,  213,  213,  213,  213,  213,  210,  213,  213,
-      213,  213,  213,  213,  213,  213,  204,  213,  213,  213,
-      213,  213,  213,  213,  213,  213,  213,  213,  213,  213,
-
-      213,  210,   42,   42,  213,   42,   42,   42,   44,   44,
-       52,   52,   52,   90,   90,   90,   91,   91,  213,   91,
-       91,   91,  172,  213,  213,  172,  209,  213,  213,  209,
-        3,  213,  213,  213,  213,  213,  213,  213,  213,  213,
-      213,  213,  213,  213,  213,  213,  213,  213,  213,  213,
-      213,  213,  213,  213,  213,  213,  213,  213,  213,  213,
-      213,  213,  213,  213,  213,  213,  213,  213,  213,  213,
-      213,  213,  213,  213,  213,  213,  213,  213,  213,  213,
-      213,  213,  213,  213,  213,  213,  213,  213,  213,  213,
-      213,  213,  213,  213
-
+       22,   23,   24,   25,   24,   26,   27,   28,   29,   30,
+       24,   31,   32,   33,   24,   24,   34,   24,   24,   24,
+       17,   18,   19,   20,   21,   22,   23,   24,   25,   26,
+       27,   28,   29,   30,   24,   31,   32,   33,   24,   24,
+       34,   24,   24,   35,   48,   49,   36,   37,   38,   38,
+       39,   40,   41,   41,   40,   40,   41,   41,   40,   39,
+       38,   38,   39,   50,   51,   54,   56,  108,   57,   42,
+      108,   58,   55,   42,   95,   59,   64,   60,   68,   65,
+
+       69,   62,   66,   81,   70,   48,   49,   61,   92,   67,
+       54,   56,   57,   71,   42,   58,   55,   63,   42,   59,
+       64,   60,   68,   65,   95,   69,   62,   66,   81,   70,
+       72,   61,   92,   67,   78,   74,   44,   71,   52,   73,
+       79,   63,   75,   80,   76,   96,   77,   82,   86,   88,
+       89,   97,   47,   46,   87,   72,   83,   84,   78,   40,
+       74,   85,   40,   73,   79,   44,   75,   80,   76,   96,
+       77,  223,   82,   86,   88,   89,   97,   42,   87,  223,
+       83,   84,   98,  223,   99,   85,   90,   38,   38,   91,
+       91,   38,   38,   91,   37,   38,   38,   39,   39,   38,
+
+       38,   39,   42,   40,   41,   41,   40,   98,   99,  100,
+      102,  103,  104,  105,  106,  223,  107,  111,  101,  109,
+      110,   42,  112,  223,  113,  116,  117,  118,  114,  119,
+      120,  223,  121,  100,  102,  122,  103,  104,  105,  106,
+      107,  111,  101,  109,  110,  115,   42,  112,  113,  116,
+      117,  123,  118,  114,  119,  120,  121,  124,  125,  122,
+      126,  127,  128,  223,  130,  131,  129,  132,  135,  115,
+       90,   38,   38,   91,  133,  123,   91,   38,   38,   91,
+      134,  124,  125,  136,  137,  126,  127,  128,  130,  131,
+      138,  129,  132,  135,  139,  140,  141,  108,  133,  143,
+
+      108,  144,  185,  146,  134,  185,  147,  136,  148,  137,
+      145,  149,  223,  150,  138,  151,  152,  153,  139,  140,
+      154,  141,  155,  143,  156,  162,  144,  146,  157,  142,
+      147,  160,  158,  148,  145,  158,  149,  150,  161,  151,
+      152,  153,  163,  223,  164,  154,  155,  165,  166,  156,
+      162,  167,  157,  142,  168,  160,  169,  223,  159,  170,
+      171,  175,  161,  172,  173,  174,  176,  163,  164,  177,
+      178,  165,  179,  166,  180,  167,  183,  158,  184,  168,
+      158,  169,  159,  170,  186,  171,  175,  172,  173,  174,
+      187,  176,  188,  189,  177,  178,  179,  190,  180,  191,
+
+      192,  183,  193,  184,  194,  195,  223,  196,  182,  186,
+      197,  197,  199,  197,  197,  187,  188,  189,  201,  185,
+      202,  190,  185,  191,  203,  192,  193,  204,  194,  205,
+      195,  196,  182,  208,  197,  197,  199,  197,  197,  209,
+      198,  200,  201,  210,  202,  211,  223,  212,  213,  203,
+      215,  197,  204,  205,  197,  218,  216,  217,  208,  216,
+      217,  206,  221,  209,  198,  207,  200,  223,  210,  216,
+      211,  212,  216,  213,  215,  217,  223,  223,  217,  218,
+      223,  222,  223,  214,  222,  206,  223,  221,  222,  207,
+      223,  222,  223,  223,  223,  223,  223,  223,  223,  223,
+
+      223,  223,  220,  223,  223,  223,  223,  214,  223,  223,
+      223,  223,  223,  223,  223,  223,  223,  223,  223,  223,
+      223,  223,  223,  223,  223,  223,  220,   43,   43,  223,
+       43,   43,   43,   45,   45,   53,   53,   53,   93,   93,
+       93,   94,   94,  223,   94,   94,   94,  181,  223,  223,
+      181,  219,  223,  223,  219,    3,  223,  223,  223,  223,
+      223,  223,  223,  223,  223,  223,  223,  223,  223,  223,
+      223,  223,  223,  223,  223,  223,  223,  223,  223,  223,
+      223,  223,  223,  223,  223,  223,  223,  223,  223,  223,
+      223,  223,  223,  223,  223,  223,  223,  223,  223,  223,
+
+      223,  223,  223,  223,  223,  223,  223,  223,  223,  223,
+      223,  223,  223,  223,  223,  223,  223,  223,  223
     } ;
 
-static yyconst flex_int16_t yy_chk[595] =
+static yyconst flex_int16_t yy_chk[620] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -580,64 +585,66 @@ static yyconst flex_int16_t yy_chk[595] =
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    2,   14,   14,    2,    5,    5,    5,
         5,    6,    6,    6,    6,    7,    7,    7,    7,    8,
-        8,    8,    8,   15,   15,   17,   19,   20,   22,    6,
-       92,   24,   47,    7,   42,   21,   23,   21,   24,   23,
-
-       25,   30,   62,   41,   22,   62,   29,   21,   27,   17,
-       19,   20,   29,   22,    6,   29,   24,   27,    7,   21,
-       23,   21,   24,   23,   25,   26,   30,   41,   22,   26,
-       29,   21,   16,   27,   32,   28,   29,   13,   26,   29,
-       32,   27,   28,   54,   28,   56,   28,   31,   33,   33,
-       26,   48,   48,   12,   26,   61,   31,   31,   53,   32,
-       28,   31,   26,    9,   32,    3,   28,   54,   28,   56,
-       28,    0,   31,   33,   33,   34,   34,   34,   34,   61,
-       31,   31,   57,   53,   58,   31,   35,   35,   35,   35,
-       36,   36,   36,   36,   38,   38,   38,   38,   39,   55,
-
-       59,   39,   40,   40,   40,   40,   60,   57,   55,   58,
-       64,   64,   65,   66,  156,   67,   39,  156,   69,   73,
-       40,    0,   70,   55,   75,   59,   68,   76,    0,   77,
-       78,   60,   55,   79,   64,   64,   65,   80,   66,   67,
-       81,   39,   69,   68,   73,   40,   70,   82,   83,   75,
-       86,   68,   76,   77,   78,   85,   95,   79,   89,   85,
-       97,   80,   94,   96,   81,   99,  100,   68,   87,   87,
-       87,   87,   82,   83,   86,   88,   88,   88,   88,  101,
-       85,   95,   89,  102,   85,   97,   94,   96,  103,   99,
-      100,  103,  104,  105,    0,  106,    0,  107,  108,  110,
-
-        0,  111,  105,  101,  113,  114,  115,  117,  102,  119,
-      120,  122,  121,  125,  122,  123,  104,  124,  105,  106,
-      103,  107,  126,  108,  110,  111,  105,  127,  113,  114,
-      115,  132,  117,  119,  133,  120,  121,  122,  125,  123,
-      134,  124,  135,  136,  103,  137,  140,  126,  141,  142,
-      146,  147,  127,  148,  154,  132,  149,  150,  155,  133,
-      151,  122,  157,  151,  158,  134,  135,  165,  136,  137,
-      140,  160,  141,  162,  142,  146,  147,  163,  148,  154,
-      149,  150,  167,  155,  168,  170,  180,  157,  158,  171,
-      172,  151,  165,  172,  175,  160,  173,  162,  181,  173,
-
-      176,  163,  177,  176,  178,  183,  167,  190,  168,  187,
-      170,  180,  187,  171,  188,  151,  191,  188,  175,  195,
-      193,  194,  176,  181,  201,  173,  177,  196,  178,  183,
-      197,  203,  190,  197,  203,  204,  187,  205,  204,  206,
-      191,  210,  206,  195,  188,  193,  194,  176,  201,  173,
-      207,  209,  196,  207,  209,  211,  212,    0,  211,  212,
-      187,  205,  197,    0,    0,    0,  210,    0,  188,    0,
-        0,    0,    0,    0,    0,    0,    0,  207,    0,    0,
-        0,    0,    0,    0,    0,    0,  197,    0,    0,    0,
+        8,    8,    8,   15,   15,   17,   18,   65,   19,    6,
+       65,   20,   17,    7,   95,   21,   23,   21,   26,   23,
+
+       27,   22,   25,   31,   27,   49,   49,   21,   42,   25,
+       17,   18,   19,   27,    6,   20,   17,   22,    7,   21,
+       23,   21,   26,   23,   48,   27,   22,   25,   31,   27,
+       28,   21,   42,   25,   30,   29,   43,   27,   16,   28,
+       30,   22,   29,   30,   29,   54,   29,   32,   33,   34,
+       34,   55,   13,   12,   33,   28,   32,   32,   30,   40,
+       29,   32,   40,   28,   30,    9,   29,   30,   29,   54,
+       29,    3,   32,   33,   34,   34,   55,   40,   33,    0,
+       32,   32,   56,    0,   57,   32,   35,   35,   35,   35,
+       36,   36,   36,   36,   37,   37,   37,   37,   39,   39,
+
+       39,   39,   40,   41,   41,   41,   41,   56,   57,   58,
+       59,   60,   61,   62,   63,    0,   64,   68,   58,   67,
+       67,   41,   69,    0,   70,   72,   73,   76,   71,   78,
+       79,    0,   80,   58,   59,   81,   60,   61,   62,   63,
+       64,   68,   58,   67,   67,   71,   41,   69,   70,   72,
+       73,   82,   76,   71,   78,   79,   80,   83,   84,   81,
+       85,   86,   88,    0,   89,   92,   88,   96,  100,   71,
+       90,   90,   90,   90,   98,   82,   91,   91,   91,   91,
+       99,   83,   84,  101,  102,   85,   86,   88,   89,   92,
+      104,   88,   96,  100,  105,  106,  107,  108,   98,  109,
+
+      108,  110,  163,  111,   99,  163,  112,  101,  113,  102,
+      110,  115,    0,  116,  104,  118,  119,  120,  105,  106,
+      122,  107,  124,  109,  125,  130,  110,  111,  126,  108,
+      112,  128,  127,  113,  110,  127,  115,  116,  129,  118,
+      119,  120,  131,    0,  132,  122,  124,  133,  134,  125,
+      130,  139,  126,  108,  140,  128,  141,    0,  127,  142,
+      143,  149,  129,  144,  147,  148,  153,  131,  132,  154,
+      155,  133,  156,  134,  157,  139,  161,  158,  162,  140,
+      158,  141,  127,  142,  165,  143,  149,  144,  147,  148,
+      166,  153,  167,  169,  154,  155,  156,  171,  157,  172,
+
+      174,  161,  176,  162,  177,  179,    0,  180,  158,  165,
+      181,  182,  184,  181,  182,  166,  167,  169,  187,  185,
+      188,  171,  185,  172,  190,  174,  176,  191,  177,  193,
+      179,  180,  158,  200,  197,  198,  184,  197,  198,  201,
+      182,  185,  187,  203,  188,  204,    0,  205,  206,  190,
+      211,  207,  191,  193,  207,  215,  213,  214,  200,  213,
+      214,  197,  220,  201,  182,  198,  185,    0,  203,  216,
+      204,  205,  216,  206,  211,  217,    0,  219,  217,  215,
+      219,  221,    0,  207,  221,  197,    0,  220,  222,  198,
+        0,  222,    0,    0,    0,    0,    0,    0,    0,    0,
+
+        0,    0,  217,    0,    0,    0,    0,  207,    0,    0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-
-        0,  207,  214,  214,    0,  214,  214,  214,  215,  215,
-      216,  216,  216,  217,  217,  217,  218,  218,    0,  218,
-      218,  218,  219,    0,    0,  219,  220,    0,    0,  220,
-      213,  213,  213,  213,  213,  213,  213,  213,  213,  213,
-      213,  213,  213,  213,  213,  213,  213,  213,  213,  213,
-      213,  213,  213,  213,  213,  213,  213,  213,  213,  213,
-      213,  213,  213,  213,  213,  213,  213,  213,  213,  213,
-      213,  213,  213,  213,  213,  213,  213,  213,  213,  213,
-      213,  213,  213,  213,  213,  213,  213,  213,  213,  213,
-      213,  213,  213,  213
-
+        0,    0,    0,    0,    0,    0,  217,  224,  224,    0,
+      224,  224,  224,  225,  225,  226,  226,  226,  227,  227,
+      227,  228,  228,    0,  228,  228,  228,  229,    0,    0,
+      229,  230,    0,    0,  230,  223,  223,  223,  223,  223,
+      223,  223,  223,  223,  223,  223,  223,  223,  223,  223,
+      223,  223,  223,  223,  223,  223,  223,  223,  223,  223,
+      223,  223,  223,  223,  223,  223,  223,  223,  223,  223,
+      223,  223,  223,  223,  223,  223,  223,  223,  223,  223,
+
+      223,  223,  223,  223,  223,  223,  223,  223,  223,  223,
+      223,  223,  223,  223,  223,  223,  223,  223,  223
     } ;
 
 static yy_state_type yy_last_accepting_state;
@@ -711,7 +718,7 @@ static void countnl() {
 	g_lingo->_colnumber = strlen(p);
 }
 
-#line 715 "engines/director/lingo/lingo-lex.cpp"
+#line 722 "engines/director/lingo/lingo-lex.cpp"
 
 #define INITIAL 0
 
@@ -899,7 +906,7 @@ YY_DECL
 #line 69 "engines/director/lingo/lingo-lex.l"
 
 
-#line 903 "engines/director/lingo/lingo-lex.cpp"
+#line 910 "engines/director/lingo/lingo-lex.cpp"
 
 	if ( !(yy_init) )
 		{
@@ -953,13 +960,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 >= 214 )
+				if ( yy_current_state >= 224 )
 					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] != 531 );
+		while ( yy_base[yy_current_state] != 556 );
 
 yy_find_action:
 		yy_act = yy_accept[yy_current_state];
@@ -1001,193 +1008,203 @@ YY_RULE_SETUP
 case 4:
 YY_RULE_SETUP
 #line 75 "engines/director/lingo/lingo-lex.l"
-{ count(); yylval.s = new Common::String(yytext); return SYMBOL; }
+{ count(); yylval.s = new Common::String(yytext); return SYMBOL; }	// D3
 	YY_BREAK
 case 5:
 YY_RULE_SETUP
 #line 77 "engines/director/lingo/lingo-lex.l"
-{ count(); return tAND; }
+{ count(); return tAFTER; }		// D3
 	YY_BREAK
 case 6:
 YY_RULE_SETUP
 #line 78 "engines/director/lingo/lingo-lex.l"
-{ count(); return tCONTAINS; }
+{ count(); return tAND; }
 	YY_BREAK
 case 7:
 YY_RULE_SETUP
 #line 79 "engines/director/lingo/lingo-lex.l"
-{ count(); return tDONE; }
+{ count(); return tBEFORE; }	// D3
 	YY_BREAK
 case 8:
 YY_RULE_SETUP
 #line 80 "engines/director/lingo/lingo-lex.l"
-{ count(); return tDOWN; }
+{ count(); return tCONTAINS; }
 	YY_BREAK
 case 9:
 YY_RULE_SETUP
 #line 81 "engines/director/lingo/lingo-lex.l"
-{ count(); return tIF; }
+{ count(); return tDONE; }
 	YY_BREAK
 case 10:
-/* rule 10 can match eol */
 YY_RULE_SETUP
 #line 82 "engines/director/lingo/lingo-lex.l"
-{ countnl(); return tNLELSIF; }
+{ count(); return tDOWN; }
 	YY_BREAK
 case 11:
-/* rule 11 can match eol */
 YY_RULE_SETUP
 #line 83 "engines/director/lingo/lingo-lex.l"
-{ countnl(); return tNLELSE; }
+{ count(); return tIF; }
 	YY_BREAK
 case 12:
+/* rule 12 can match eol */
 YY_RULE_SETUP
 #line 84 "engines/director/lingo/lingo-lex.l"
-{ count(); return tELSE; }
+{ countnl(); return tNLELSIF; }
 	YY_BREAK
 case 13:
+/* rule 13 can match eol */
 YY_RULE_SETUP
 #line 85 "engines/director/lingo/lingo-lex.l"
-{ count(); return tEND; }
+{ countnl(); return tNLELSE; }
 	YY_BREAK
 case 14:
 YY_RULE_SETUP
 #line 86 "engines/director/lingo/lingo-lex.l"
-{ count(); return tFACTORY; }
+{ count(); return tELSE; }
 	YY_BREAK
 case 15:
 YY_RULE_SETUP
 #line 87 "engines/director/lingo/lingo-lex.l"
-{ count(); return tEXIT; }
+{ count(); return tEND; }
 	YY_BREAK
 case 16:
 YY_RULE_SETUP
 #line 88 "engines/director/lingo/lingo-lex.l"
-{ count(); return tFRAME; }
+{ count(); return tFACTORY; }
 	YY_BREAK
 case 17:
 YY_RULE_SETUP
 #line 89 "engines/director/lingo/lingo-lex.l"
-{ count(); return tGLOBAL; }
+{ count(); return tEXIT; }
 	YY_BREAK
 case 18:
 YY_RULE_SETUP
 #line 90 "engines/director/lingo/lingo-lex.l"
-{ count(); return tGO; }
+{ count(); return tFRAME; }
 	YY_BREAK
 case 19:
 YY_RULE_SETUP
 #line 91 "engines/director/lingo/lingo-lex.l"
-{ count(); return tGO; }
+{ count(); return tGLOBAL; }
 	YY_BREAK
 case 20:
 YY_RULE_SETUP
 #line 92 "engines/director/lingo/lingo-lex.l"
-{ count(); return tINSTANCE; }
+{ count(); return tGO; }
 	YY_BREAK
 case 21:
 YY_RULE_SETUP
 #line 93 "engines/director/lingo/lingo-lex.l"
-{ count(); return tINTERSECTS; }
+{ count(); return tGO; }
 	YY_BREAK
 case 22:
 YY_RULE_SETUP
 #line 94 "engines/director/lingo/lingo-lex.l"
-{ count(); return tINTO; }
+{ count(); return tINSTANCE; }
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
 #line 95 "engines/director/lingo/lingo-lex.l"
-{ count(); return tLOOP; }
+{ count(); return tINTERSECTS; }
 	YY_BREAK
 case 24:
 YY_RULE_SETUP
 #line 96 "engines/director/lingo/lingo-lex.l"
-{ count(); return tMACRO; }
+{ count(); return tINTO; }
 	YY_BREAK
 case 25:
 YY_RULE_SETUP
 #line 97 "engines/director/lingo/lingo-lex.l"
-{ count(); return tMETHOD; }
+{ count(); return tLOOP; }
 	YY_BREAK
 case 26:
 YY_RULE_SETUP
 #line 98 "engines/director/lingo/lingo-lex.l"
-{ count(); return tMOD; }
+{ count(); return tMACRO; }
 	YY_BREAK
 case 27:
 YY_RULE_SETUP
 #line 99 "engines/director/lingo/lingo-lex.l"
-{ count(); return tMOVIE; }
+{ count(); return tMETHOD; }
 	YY_BREAK
 case 28:
 YY_RULE_SETUP
 #line 100 "engines/director/lingo/lingo-lex.l"
-{ count(); return tNEXT; }
+{ count(); return tMOD; }
 	YY_BREAK
 case 29:
 YY_RULE_SETUP
 #line 101 "engines/director/lingo/lingo-lex.l"
-{ count(); return tNOT; }
+{ count(); return tMOVIE; }
 	YY_BREAK
 case 30:
 YY_RULE_SETUP
 #line 102 "engines/director/lingo/lingo-lex.l"
-{ count(); return tOF; }
+{ count(); return tNEXT; }
 	YY_BREAK
 case 31:
 YY_RULE_SETUP
 #line 103 "engines/director/lingo/lingo-lex.l"
-{ count(); return tON; }
+{ count(); return tNOT; }
 	YY_BREAK
 case 32:
 YY_RULE_SETUP
 #line 104 "engines/director/lingo/lingo-lex.l"
-{ count(); return tOPEN; }
+{ count(); return tOF; }
 	YY_BREAK
 case 33:
 YY_RULE_SETUP
 #line 105 "engines/director/lingo/lingo-lex.l"
-{ count(); return tOR; }
+{ count(); return tON; }		// D3
 	YY_BREAK
 case 34:
 YY_RULE_SETUP
 #line 106 "engines/director/lingo/lingo-lex.l"
-{ count(); return tPLAY; }
+{ count(); return tOPEN; }
 	YY_BREAK
 case 35:
 YY_RULE_SETUP
 #line 107 "engines/director/lingo/lingo-lex.l"
-{ count(); return tPREVIOUS; }
+{ count(); return tOR; }
 	YY_BREAK
 case 36:
 YY_RULE_SETUP
 #line 108 "engines/director/lingo/lingo-lex.l"
-{ count(); return tPUT; }
+{ count(); return tPLAY; }
 	YY_BREAK
 case 37:
 YY_RULE_SETUP
 #line 109 "engines/director/lingo/lingo-lex.l"
-{ count(); return tREPEAT; }
+{ count(); return tPREVIOUS; }
 	YY_BREAK
 case 38:
 YY_RULE_SETUP
 #line 110 "engines/director/lingo/lingo-lex.l"
-{ count(); return tSET; }
+{ count(); return tPUT; }
 	YY_BREAK
 case 39:
 YY_RULE_SETUP
 #line 111 "engines/director/lingo/lingo-lex.l"
-{ count(); return tSOUND; }
+{ count(); return tREPEAT; }
 	YY_BREAK
 case 40:
 YY_RULE_SETUP
 #line 112 "engines/director/lingo/lingo-lex.l"
-{ count(); return tSTARTS; }
+{ count(); return tSET; }
 	YY_BREAK
 case 41:
 YY_RULE_SETUP
 #line 113 "engines/director/lingo/lingo-lex.l"
+{ count(); return tSOUND; }		// D3
+	YY_BREAK
+case 42:
+YY_RULE_SETUP
+#line 114 "engines/director/lingo/lingo-lex.l"
+{ count(); return tSTARTS; }
+	YY_BREAK
+case 43:
+YY_RULE_SETUP
+#line 115 "engines/director/lingo/lingo-lex.l"
 {
 		count();
 
@@ -1197,9 +1214,9 @@ YY_RULE_SETUP
 		return THEENTITYWITHID;
 	}
 	YY_BREAK
-case 42:
+case 44:
 YY_RULE_SETUP
-#line 121 "engines/director/lingo/lingo-lex.l"
+#line 123 "engines/director/lingo/lingo-lex.l"
 {
 		count();
 
@@ -1241,9 +1258,9 @@ YY_RULE_SETUP
 		warning("Unhandled the entity %s", ptr);
 	}
 	YY_BREAK
-case 43:
+case 45:
 YY_RULE_SETUP
-#line 161 "engines/director/lingo/lingo-lex.l"
+#line 163 "engines/director/lingo/lingo-lex.l"
 {
 		count();
 
@@ -1264,64 +1281,64 @@ YY_RULE_SETUP
 		warning("Unhandled the entity %s", ptr);
 	}
 	YY_BREAK
-case 44:
-YY_RULE_SETUP
-#line 180 "engines/director/lingo/lingo-lex.l"
-{ count(); return tTHEN; }
-	YY_BREAK
-case 45:
-YY_RULE_SETUP
-#line 181 "engines/director/lingo/lingo-lex.l"
-{ count(); return tTO; }
-	YY_BREAK
 case 46:
 YY_RULE_SETUP
 #line 182 "engines/director/lingo/lingo-lex.l"
-{ count(); return tSPRITE; }
+{ count(); return tTHEN; }
 	YY_BREAK
 case 47:
 YY_RULE_SETUP
 #line 183 "engines/director/lingo/lingo-lex.l"
-{ count(); return tWITH; }
+{ count(); return tTO; }
 	YY_BREAK
 case 48:
 YY_RULE_SETUP
 #line 184 "engines/director/lingo/lingo-lex.l"
-{ count(); return tWITHIN; }
+{ count(); return tSPRITE; }
 	YY_BREAK
 case 49:
 YY_RULE_SETUP
 #line 185 "engines/director/lingo/lingo-lex.l"
-{ count(); return tWHEN; }
+{ count(); return tWITH; }
 	YY_BREAK
 case 50:
 YY_RULE_SETUP
 #line 186 "engines/director/lingo/lingo-lex.l"
-{ count(); return tWHILE; }
+{ count(); return tWITHIN; }
 	YY_BREAK
 case 51:
 YY_RULE_SETUP
-#line 188 "engines/director/lingo/lingo-lex.l"
-{ count(); return tNEQ; }
+#line 187 "engines/director/lingo/lingo-lex.l"
+{ count(); return tWHEN; }
 	YY_BREAK
 case 52:
 YY_RULE_SETUP
-#line 189 "engines/director/lingo/lingo-lex.l"
-{ count(); return tGE; }
+#line 188 "engines/director/lingo/lingo-lex.l"
+{ count(); return tWHILE; }
 	YY_BREAK
 case 53:
 YY_RULE_SETUP
 #line 190 "engines/director/lingo/lingo-lex.l"
-{ count(); return tLE; }
+{ count(); return tNEQ; }
 	YY_BREAK
 case 54:
 YY_RULE_SETUP
 #line 191 "engines/director/lingo/lingo-lex.l"
-{ count(); return tCONCAT; }
+{ count(); return tGE; }
 	YY_BREAK
 case 55:
 YY_RULE_SETUP
+#line 192 "engines/director/lingo/lingo-lex.l"
+{ count(); return tLE; }
+	YY_BREAK
+case 56:
+YY_RULE_SETUP
 #line 193 "engines/director/lingo/lingo-lex.l"
+{ count(); return tCONCAT; }
+	YY_BREAK
+case 57:
+YY_RULE_SETUP
+#line 195 "engines/director/lingo/lingo-lex.l"
 {
 		count();
 		yylval.s = new Common::String(yytext);
@@ -1352,43 +1369,43 @@ YY_RULE_SETUP
 		return ID;
 	}
 	YY_BREAK
-case 56:
-YY_RULE_SETUP
-#line 222 "engines/director/lingo/lingo-lex.l"
-{ count(); yylval.f = atof(yytext); return FLOAT; }
-	YY_BREAK
-case 57:
-YY_RULE_SETUP
-#line 223 "engines/director/lingo/lingo-lex.l"
-{ count(); yylval.i = strtol(yytext, NULL, 10); return INT; }
-	YY_BREAK
 case 58:
 YY_RULE_SETUP
 #line 224 "engines/director/lingo/lingo-lex.l"
-{ count(); return *yytext; }
+{ count(); yylval.f = atof(yytext); return FLOAT; }
 	YY_BREAK
 case 59:
-/* rule 59 can match eol */
 YY_RULE_SETUP
 #line 225 "engines/director/lingo/lingo-lex.l"
-{ return '\n'; }
+{ count(); yylval.i = strtol(yytext, NULL, 10); return INT; }
 	YY_BREAK
 case 60:
 YY_RULE_SETUP
 #line 226 "engines/director/lingo/lingo-lex.l"
-{ count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return STRING; }
+{ count(); return *yytext; }
 	YY_BREAK
 case 61:
+/* rule 61 can match eol */
 YY_RULE_SETUP
 #line 227 "engines/director/lingo/lingo-lex.l"
-
+{ return '\n'; }
 	YY_BREAK
 case 62:
 YY_RULE_SETUP
+#line 228 "engines/director/lingo/lingo-lex.l"
+{ count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return STRING; }
+	YY_BREAK
+case 63:
+YY_RULE_SETUP
 #line 229 "engines/director/lingo/lingo-lex.l"
+
+	YY_BREAK
+case 64:
+YY_RULE_SETUP
+#line 231 "engines/director/lingo/lingo-lex.l"
 ECHO;
 	YY_BREAK
-#line 1392 "engines/director/lingo/lingo-lex.cpp"
+#line 1409 "engines/director/lingo/lingo-lex.cpp"
 case YY_STATE_EOF(INITIAL):
 	yyterminate();
 
@@ -1681,7 +1698,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 >= 214 )
+			if ( yy_current_state >= 224 )
 				yy_c = yy_meta[(unsigned int) yy_c];
 			}
 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1709,11 +1726,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 >= 214 )
+		if ( yy_current_state >= 224 )
 			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 == 213);
+	yy_is_jam = (yy_current_state == 223);
 
 	return yy_is_jam ? 0 : yy_current_state;
 }
@@ -2388,7 +2405,7 @@ void yyfree (void * ptr )
 
 #define YYTABLES_NAME "yytables"
 
-#line 229 "engines/director/lingo/lingo-lex.l"
+#line 231 "engines/director/lingo/lingo-lex.l"
 
 
 
diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l
index 5d39b3f..56317d1 100644
--- a/engines/director/lingo/lingo-lex.l
+++ b/engines/director/lingo/lingo-lex.l
@@ -72,9 +72,11 @@ whitespace [\t ]
 ^{whitespace}+		{ count(); }
 [\t]+				{ count(); return ' '; }
 
-[#]{identifier}		{ count(); yylval.s = new Common::String(yytext); return SYMBOL; }
+[#]{identifier}		{ count(); yylval.s = new Common::String(yytext); return SYMBOL; }	// D3
 
+(?i:after)			{ count(); return tAFTER; }		// D3
 (?i:and)			{ count(); return tAND; }
+(?i:before)			{ count(); return tBEFORE; }	// D3
 (?i:contains)		{ count(); return tCONTAINS; }
 (?i:done)			{ count(); return tDONE; }
 (?i:down)			{ count(); return tDOWN; }
@@ -100,7 +102,7 @@ whitespace [\t ]
 (?i:next)			{ count(); return tNEXT; }
 (?i:not)			{ count(); return tNOT; }
 (?i:of)				{ count(); return tOF; }
-(?i:on)				{ count(); return tON; }
+(?i:on)				{ count(); return tON; }		// D3
 (?i:open)			{ count(); return tOPEN; }
 (?i:or)				{ count(); return tOR; }
 (?i:play)			{ count(); return tPLAY; }
@@ -108,7 +110,7 @@ whitespace [\t ]
 (?i:put)			{ count(); return tPUT; }
 (?i:repeat)			{ count(); return tREPEAT; }
 (?i:set)			{ count(); return tSET; }
-(?i:sound)			{ count(); return tSOUND; }
+(?i:sound)			{ count(); return tSOUND; }		// D3
 (?i:starts)			{ count(); return tSTARTS; }
 (?i:the[ \t]+sqrt[\t ]+of[\t ]+)	{
 		count();
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index 4502eda..89632ef 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -241,6 +241,8 @@ public:
 	static void c_not();
 
 	static void c_ampersand();
+	static void c_after();
+	static void c_before();
 	static void c_concat();
 	static void c_contains();
 	static void c_starts();


Commit: 525f916b2d645076797e4e8f713b4e4d16e3e4f1
    https://github.com/scummvm/scummvm/commit/525f916b2d645076797e4e8f713b4e4d16e3e4f1
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-01-10T01:02:56+01:00

Commit Message:
DIRECTOR: Lingo: Implemented stub for char..of and char..to..of

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 f950d35..4f4a2b3 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -60,7 +60,7 @@ static struct FuncDescr {
 	{ Lingo::c_voidpush,	"c_voidpush",	"" },
 	{ Lingo::c_fconstpush,	"c_fconstpush",	"f" },
 	{ Lingo::c_stringpush,	"c_stringpush",	"s" },
-	{ Lingo::c_symbolpush,	"c_symbolpush","s" },
+	{ Lingo::c_symbolpush,	"c_symbolpush","s" },	// D3
 	{ Lingo::c_varpush,		"c_varpush",	"s" },
 	{ Lingo::c_assign,		"c_assign",		"" },
 	{ Lingo::c_eval,		"c_eval",		"s" },
@@ -74,13 +74,15 @@ static struct FuncDescr {
 	{ Lingo::c_mod,			"c_mod",		"" },
 	{ Lingo::c_negate,		"c_negate",		"" },
 	{ Lingo::c_ampersand,	"c_ampersand",	"" },
-	{ Lingo::c_after,		"c_after",		"" },
-	{ Lingo::c_before,		"c_before",		"" },
+	{ Lingo::c_after,		"c_after",		"" },	// D3
+	{ Lingo::c_before,		"c_before",		"" },	// D3
 	{ Lingo::c_concat,		"c_concat",		"" },
 	{ Lingo::c_contains,	"c_contains",	"" },
 	{ Lingo::c_starts,		"c_starts",		"" },
 	{ Lingo::c_intersects,	"c_intersects",	"" },
 	{ Lingo::c_within,		"c_within",		"" },
+	{ Lingo::c_charOf,		"c_charOf",		"" },	// D3
+	{ Lingo::c_charToOf,	"c_charToOf",	"" },	// D3
 	{ Lingo::c_and,			"c_and",		"" },
 	{ Lingo::c_or,			"c_or",			"" },
 	{ Lingo::c_not,			"c_not",		"" },
@@ -571,7 +573,7 @@ void Lingo::c_intersects() {
 	Datum d2 = g_lingo->pop();
 	Datum d1 = g_lingo->pop();
 
-	warning("STUB: c_intersects: %d", d2.u.i);
+	warning("STUB: c_intersects: %d %d", d1.u.i, d2.u.i);
 
 	g_lingo->push(d1);
 }
@@ -580,7 +582,26 @@ void Lingo::c_within() {
 	Datum d2 = g_lingo->pop();
 	Datum d1 = g_lingo->pop();
 
-	warning("STUB: c_within: %d", d2.u.i);
+	warning("STUB: c_within: %d %d", d1.u.i, d2.u.i);
+
+	g_lingo->push(d1);
+}
+
+void Lingo::c_charOf() {
+	Datum d2 = g_lingo->pop();
+	Datum d1 = g_lingo->pop();
+
+	warning("STUB: c_charOf: %d %d", d1.u.i, d2.u.i);
+
+	g_lingo->push(d1);
+}
+
+void Lingo::c_charToOf() {
+	Datum d3 = g_lingo->pop();
+	Datum d2 = g_lingo->pop();
+	Datum d1 = g_lingo->pop();
+
+	warning("STUB: c_charToOf: %d %d %d", d1.u.i, d2.u.i, d3.u.i);
 
 	g_lingo->push(d1);
 }
diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp
index a943ced..d5c5779 100644
--- a/engines/director/lingo/lingo-gr.cpp
+++ b/engines/director/lingo/lingo-gr.cpp
@@ -73,20 +73,20 @@
      POINT = 262,
      RECT = 263,
      ARRAY = 264,
-     SYMBOL = 265,
-     OBJECT = 266,
-     INT = 267,
-     THEENTITY = 268,
-     THEENTITYWITHID = 269,
-     FLOAT = 270,
-     BLTIN = 271,
-     BLTINNOARGS = 272,
-     BLTINNOARGSORONE = 273,
-     BLTINONEARG = 274,
-     BLTINARGLIST = 275,
-     ID = 276,
-     STRING = 277,
-     HANDLER = 278,
+     OBJECT = 265,
+     INT = 266,
+     THEENTITY = 267,
+     THEENTITYWITHID = 268,
+     FLOAT = 269,
+     BLTIN = 270,
+     BLTINNOARGS = 271,
+     BLTINNOARGSORONE = 272,
+     BLTINONEARG = 273,
+     BLTINARGLIST = 274,
+     ID = 275,
+     STRING = 276,
+     HANDLER = 277,
+     SYMBOL = 278,
      tDOWN = 279,
      tELSE = 280,
      tNLELSIF = 281,
@@ -134,11 +134,12 @@
      tCONCAT = 323,
      tCONTAINS = 324,
      tSTARTS = 325,
-     tSPRITE = 326,
-     tINTERSECTS = 327,
-     tWITHIN = 328,
-     tON = 329,
-     tSOUND = 330
+     tCHAR = 326,
+     tSPRITE = 327,
+     tINTERSECTS = 328,
+     tWITHIN = 329,
+     tON = 330,
+     tSOUND = 331
    };
 #endif
 /* Tokens.  */
@@ -149,20 +150,20 @@
 #define POINT 262
 #define RECT 263
 #define ARRAY 264
-#define SYMBOL 265
-#define OBJECT 266
-#define INT 267
-#define THEENTITY 268
-#define THEENTITYWITHID 269
-#define FLOAT 270
-#define BLTIN 271
-#define BLTINNOARGS 272
-#define BLTINNOARGSORONE 273
-#define BLTINONEARG 274
-#define BLTINARGLIST 275
-#define ID 276
-#define STRING 277
-#define HANDLER 278
+#define OBJECT 265
+#define INT 266
+#define THEENTITY 267
+#define THEENTITYWITHID 268
+#define FLOAT 269
+#define BLTIN 270
+#define BLTINNOARGS 271
+#define BLTINNOARGSORONE 272
+#define BLTINONEARG 273
+#define BLTINARGLIST 274
+#define ID 275
+#define STRING 276
+#define HANDLER 277
+#define SYMBOL 278
 #define tDOWN 279
 #define tELSE 280
 #define tNLELSIF 281
@@ -210,11 +211,12 @@
 #define tCONCAT 323
 #define tCONTAINS 324
 #define tSTARTS 325
-#define tSPRITE 326
-#define tINTERSECTS 327
-#define tWITHIN 328
-#define tON 329
-#define tSOUND 330
+#define tCHAR 326
+#define tSPRITE 327
+#define tINTERSECTS 328
+#define tWITHIN 329
+#define tON 330
+#define tSOUND 331
 
 
 
@@ -272,7 +274,7 @@ typedef union YYSTYPE
 	Common::Array<double> *arr;
 }
 /* Line 193 of yacc.c.  */
-#line 276 "engines/director/lingo/lingo-gr.cpp"
+#line 278 "engines/director/lingo/lingo-gr.cpp"
 	YYSTYPE;
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
@@ -285,7 +287,7 @@ typedef union YYSTYPE
 
 
 /* Line 216 of yacc.c.  */
-#line 289 "engines/director/lingo/lingo-gr.cpp"
+#line 291 "engines/director/lingo/lingo-gr.cpp"
 
 #ifdef short
 # undef short
@@ -498,22 +500,22 @@ union yyalloc
 #endif
 
 /* YYFINAL -- State number of the termination state.  */
-#define YYFINAL  97
+#define YYFINAL  99
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   1146
+#define YYLAST   1191
 
 /* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  89
+#define YYNTOKENS  90
 /* YYNNTS -- Number of nonterminals.  */
 #define YYNNTS  39
 /* YYNRULES -- Number of rules.  */
-#define YYNRULES  138
+#define YYNRULES  140
 /* YYNRULES -- Number of states.  */
-#define YYNSTATES  289
+#define YYNSTATES  297
 
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 #define YYUNDEFTOK  2
-#define YYMAXUTOK   330
+#define YYMAXUTOK   331
 
 #define YYTRANSLATE(YYX)						\
   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -522,12 +524,12 @@ union yyalloc
 static const yytype_uint8 yytranslate[] =
 {
        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-      83,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+      84,     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,    82,    77,     2,
-      84,    85,    80,    78,    88,    79,     2,    81,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,    83,    78,     2,
+      85,    86,    81,    79,    89,    80,     2,    82,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-      87,    76,    86,     2,     2,     2,     2,     2,     2,     2,
+      88,    77,    87,     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,
@@ -554,7 +556,7 @@ static const yytype_uint8 yytranslate[] =
       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,    70,    71,    72,    73,    74,
-      75
+      75,    76
 };
 
 #if YYDEBUG
@@ -571,68 +573,70 @@ static const yytype_uint16 yyprhs[] =
      250,   252,   254,   259,   261,   263,   266,   268,   272,   276,
      280,   284,   288,   292,   296,   300,   304,   308,   312,   316,
      319,   323,   327,   331,   335,   339,   342,   345,   349,   354,
-     359,   362,   364,   366,   369,   371,   374,   377,   380,   383,
-     385,   388,   393,   396,   400,   402,   406,   408,   412,   415,
-     418,   421,   424,   428,   431,   434,   436,   440,   443,   446,
-     449,   453,   456,   457,   466,   469,   470,   479,   480,   481,
-     492,   493,   495,   499,   504,   505,   509,   510,   512
+     359,   364,   371,   374,   376,   378,   381,   383,   386,   389,
+     392,   395,   397,   400,   405,   408,   412,   414,   418,   420,
+     424,   427,   430,   433,   436,   440,   443,   446,   448,   452,
+     455,   458,   461,   465,   468,   469,   478,   481,   482,   491,
+     492,   493,   504,   505,   507,   511,   516,   517,   521,   522,
+     524
 };
 
 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
-static const yytype_int8 yyrhs[] =
+static const yytype_int16 yyrhs[] =
 {
-      90,     0,    -1,    90,    91,    92,    -1,    92,    -1,     1,
-      91,    -1,    83,    -1,    -1,   119,    -1,   112,    -1,   126,
-      -1,    93,    -1,    95,    -1,    40,   111,    33,    21,    -1,
-      40,   111,    66,   111,    -1,    40,   111,    67,   111,    -1,
-      42,    21,    76,   111,    -1,    42,    13,    76,   111,    -1,
-      42,    14,   111,    76,   111,    -1,    42,    21,    44,   111,
-      -1,    42,    13,    44,   111,    -1,    42,    14,   111,    44,
-     111,    -1,   111,    -1,   112,    -1,    94,    -1,    96,    -1,
-     103,    84,   102,    85,   109,   108,    27,    41,    -1,   104,
-      76,   111,   108,    44,   111,   108,   109,   108,    27,    41,
-      -1,   104,    76,   111,   108,    24,    44,   111,   108,   109,
-     108,    27,    41,    -1,   110,   111,   108,    -1,   105,   102,
-      43,    91,   109,   108,    27,    32,    -1,   105,   102,    43,
-      91,   109,   108,    48,   109,   108,    27,    32,    -1,   105,
-     102,    43,    91,   109,   108,   107,    98,   108,    27,    32,
-      -1,   105,   102,    43,   107,    94,   108,    -1,   105,   102,
-      43,   107,    94,   108,    48,   107,    94,   108,    -1,   105,
-     102,    43,   107,    94,   108,    99,   108,    97,   108,    -1,
-      -1,    48,   107,    94,    -1,    98,   101,    -1,   101,    -1,
-      99,   100,    -1,   100,    -1,   106,   102,    43,   107,    95,
-     108,    -1,    99,    -1,   106,   102,    43,   109,   108,    -1,
-     111,    -1,   111,    76,   111,    -1,    84,   102,    85,    -1,
-      41,    47,    -1,    41,    46,    21,    -1,    32,    -1,    26,
-      -1,    -1,    -1,    -1,   109,    91,    -1,   109,    95,    -1,
-      45,    21,    43,    -1,    12,    -1,    15,    -1,    10,    -1,
-      22,    -1,    17,    -1,    21,    84,   127,    85,    -1,    21,
-      -1,    13,    -1,    14,   111,    -1,    93,    -1,   111,    78,
-     111,    -1,   111,    79,   111,    -1,   111,    80,   111,    -1,
-     111,    81,   111,    -1,   111,    65,   111,    -1,   111,    86,
-     111,    -1,   111,    87,   111,    -1,   111,    61,   111,    -1,
-     111,    56,   111,    -1,   111,    57,   111,    -1,   111,    62,
-     111,    -1,   111,    63,   111,    -1,    64,   111,    -1,   111,
-      77,   111,    -1,   111,    66,   111,    -1,   111,    68,   111,
-      -1,   111,    69,   111,    -1,   111,    70,   111,    -1,    78,
-     111,    -1,    79,   111,    -1,    84,   111,    85,    -1,    71,
-     111,    72,   111,    -1,    71,   111,    73,   111,    -1,    40,
-     111,    -1,   115,    -1,   118,    -1,    28,    41,    -1,    28,
-      -1,    30,   113,    -1,    55,   114,    -1,    19,   111,    -1,
-      18,   111,    -1,    18,    -1,    20,   127,    -1,    51,   111,
-      46,   111,    -1,    51,   111,    -1,    75,    21,   127,    -1,
-      21,    -1,   113,    88,    21,    -1,    21,    -1,   114,    88,
-      21,    -1,    31,    34,    -1,    31,    37,    -1,    31,    39,
-      -1,    31,   116,    -1,    31,   116,   117,    -1,    31,   117,
-      -1,    29,   111,    -1,   111,    -1,    38,    36,   111,    -1,
-      36,   111,    -1,    52,    53,    -1,    52,   116,    -1,    52,
-     116,   117,    -1,    52,   117,    -1,    -1,    35,    21,   120,
-     107,   124,    91,   125,   109,    -1,    49,    21,    -1,    -1,
-      50,    21,   121,   107,   124,    91,   125,   109,    -1,    -1,
-      -1,    74,    21,   122,   107,   123,   124,    91,   125,   109,
-      27,    -1,    -1,    21,    -1,   124,    88,    21,    -1,   124,
-      91,    88,    21,    -1,    -1,    21,   107,   127,    -1,    -1,
-     111,    -1,   127,    88,   111,    -1
+      91,     0,    -1,    91,    92,    93,    -1,    93,    -1,     1,
+      92,    -1,    84,    -1,    -1,   120,    -1,   113,    -1,   127,
+      -1,    94,    -1,    96,    -1,    40,   112,    33,    20,    -1,
+      40,   112,    66,   112,    -1,    40,   112,    67,   112,    -1,
+      42,    20,    77,   112,    -1,    42,    12,    77,   112,    -1,
+      42,    13,   112,    77,   112,    -1,    42,    20,    44,   112,
+      -1,    42,    12,    44,   112,    -1,    42,    13,   112,    44,
+     112,    -1,   112,    -1,   113,    -1,    95,    -1,    97,    -1,
+     104,    85,   103,    86,   110,   109,    27,    41,    -1,   105,
+      77,   112,   109,    44,   112,   109,   110,   109,    27,    41,
+      -1,   105,    77,   112,   109,    24,    44,   112,   109,   110,
+     109,    27,    41,    -1,   111,   112,   109,    -1,   106,   103,
+      43,    92,   110,   109,    27,    32,    -1,   106,   103,    43,
+      92,   110,   109,    48,   110,   109,    27,    32,    -1,   106,
+     103,    43,    92,   110,   109,   108,    99,   109,    27,    32,
+      -1,   106,   103,    43,   108,    95,   109,    -1,   106,   103,
+      43,   108,    95,   109,    48,   108,    95,   109,    -1,   106,
+     103,    43,   108,    95,   109,   100,   109,    98,   109,    -1,
+      -1,    48,   108,    95,    -1,    99,   102,    -1,   102,    -1,
+     100,   101,    -1,   101,    -1,   107,   103,    43,   108,    96,
+     109,    -1,   100,    -1,   107,   103,    43,   110,   109,    -1,
+     112,    -1,   112,    77,   112,    -1,    85,   103,    86,    -1,
+      41,    47,    -1,    41,    46,    20,    -1,    32,    -1,    26,
+      -1,    -1,    -1,    -1,   110,    92,    -1,   110,    96,    -1,
+      45,    20,    43,    -1,    11,    -1,    14,    -1,    23,    -1,
+      21,    -1,    16,    -1,    20,    85,   128,    86,    -1,    20,
+      -1,    12,    -1,    13,   112,    -1,    94,    -1,   112,    79,
+     112,    -1,   112,    80,   112,    -1,   112,    81,   112,    -1,
+     112,    82,   112,    -1,   112,    65,   112,    -1,   112,    87,
+     112,    -1,   112,    88,   112,    -1,   112,    61,   112,    -1,
+     112,    56,   112,    -1,   112,    57,   112,    -1,   112,    62,
+     112,    -1,   112,    63,   112,    -1,    64,   112,    -1,   112,
+      78,   112,    -1,   112,    66,   112,    -1,   112,    68,   112,
+      -1,   112,    69,   112,    -1,   112,    70,   112,    -1,    79,
+     112,    -1,    80,   112,    -1,    85,   112,    86,    -1,    72,
+     112,    73,   112,    -1,    72,   112,    74,   112,    -1,    71,
+     112,    38,   112,    -1,    71,   112,    44,   112,    38,   112,
+      -1,    40,   112,    -1,   116,    -1,   119,    -1,    28,    41,
+      -1,    28,    -1,    30,   114,    -1,    55,   115,    -1,    18,
+     112,    -1,    17,   112,    -1,    17,    -1,    19,   128,    -1,
+      51,   112,    46,   112,    -1,    51,   112,    -1,    76,    20,
+     128,    -1,    20,    -1,   114,    89,    20,    -1,    20,    -1,
+     115,    89,    20,    -1,    31,    34,    -1,    31,    37,    -1,
+      31,    39,    -1,    31,   117,    -1,    31,   117,   118,    -1,
+      31,   118,    -1,    29,   112,    -1,   112,    -1,    38,    36,
+     112,    -1,    36,   112,    -1,    52,    53,    -1,    52,   117,
+      -1,    52,   117,   118,    -1,    52,   118,    -1,    -1,    35,
+      20,   121,   108,   125,    92,   126,   110,    -1,    49,    20,
+      -1,    -1,    50,    20,   122,   108,   125,    92,   126,   110,
+      -1,    -1,    -1,    75,    20,   123,   108,   124,   125,    92,
+     126,   110,    27,    -1,    -1,    20,    -1,   125,    89,    20,
+      -1,   125,    92,    89,    20,    -1,    -1,    20,   108,   128,
+      -1,    -1,   112,    -1,   128,    89,   112,    -1
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
@@ -647,11 +651,12 @@ static const yytype_uint16 yyrline[] =
      365,   368,   371,   374,   378,   385,   391,   392,   393,   394,
      395,   396,   397,   398,   399,   400,   401,   402,   403,   404,
      405,   406,   407,   408,   409,   410,   411,   412,   413,   414,
-     417,   418,   419,   420,   421,   423,   424,   425,   428,   431,
-     434,   435,   436,   437,   440,   441,   444,   445,   456,   457,
-     458,   459,   462,   465,   470,   471,   474,   475,   478,   479,
-     482,   485,   515,   515,   521,   524,   524,   529,   530,   529,
-     542,   543,   544,   545,   547,   551,   559,   560,   561
+     415,   416,   419,   420,   421,   422,   423,   425,   426,   427,
+     430,   433,   436,   437,   438,   439,   442,   443,   446,   447,
+     458,   459,   460,   461,   464,   467,   472,   473,   476,   477,
+     480,   481,   484,   487,   517,   517,   523,   526,   526,   531,
+     532,   531,   544,   545,   546,   547,   549,   553,   561,   562,
+     563
 };
 #endif
 
@@ -661,18 +666,18 @@ static const yytype_uint16 yyrline[] =
 static const char *const yytname[] =
 {
   "$end", "error", "$undefined", "UNARY", "CASTREF", "VOID", "VAR",
-  "POINT", "RECT", "ARRAY", "SYMBOL", "OBJECT", "INT", "THEENTITY",
+  "POINT", "RECT", "ARRAY", "OBJECT", "INT", "THEENTITY",
   "THEENTITYWITHID", "FLOAT", "BLTIN", "BLTINNOARGS", "BLTINNOARGSORONE",
-  "BLTINONEARG", "BLTINARGLIST", "ID", "STRING", "HANDLER", "tDOWN",
-  "tELSE", "tNLELSIF", "tEND", "tEXIT", "tFRAME", "tGLOBAL", "tGO", "tIF",
-  "tINTO", "tLOOP", "tMACRO", "tMOVIE", "tNEXT", "tOF", "tPREVIOUS",
-  "tPUT", "tREPEAT", "tSET", "tTHEN", "tTO", "tWHEN", "tWITH", "tWHILE",
-  "tNLELSE", "tFACTORY", "tMETHOD", "tOPEN", "tPLAY", "tDONE",
+  "BLTINONEARG", "BLTINARGLIST", "ID", "STRING", "HANDLER", "SYMBOL",
+  "tDOWN", "tELSE", "tNLELSIF", "tEND", "tEXIT", "tFRAME", "tGLOBAL",
+  "tGO", "tIF", "tINTO", "tLOOP", "tMACRO", "tMOVIE", "tNEXT", "tOF",
+  "tPREVIOUS", "tPUT", "tREPEAT", "tSET", "tTHEN", "tTO", "tWHEN", "tWITH",
+  "tWHILE", "tNLELSE", "tFACTORY", "tMETHOD", "tOPEN", "tPLAY", "tDONE",
   "tPLAYACCEL", "tINSTANCE", "tGE", "tLE", "tGT", "tLT", "tEQ", "tNEQ",
   "tAND", "tOR", "tNOT", "tMOD", "tAFTER", "tBEFORE", "tCONCAT",
-  "tCONTAINS", "tSTARTS", "tSPRITE", "tINTERSECTS", "tWITHIN", "tON",
-  "tSOUND", "'='", "'&'", "'+'", "'-'", "'*'", "'/'", "'%'", "'\\n'",
-  "'('", "')'", "'>'", "'<'", "','", "$accept", "program", "nl",
+  "tCONTAINS", "tSTARTS", "tCHAR", "tSPRITE", "tINTERSECTS", "tWITHIN",
+  "tON", "tSOUND", "'='", "'&'", "'+'", "'-'", "'*'", "'/'", "'%'",
+  "'\\n'", "'('", "')'", "'>'", "'<'", "','", "$accept", "program", "nl",
   "programline", "asgn", "stmtoneliner", "stmt", "ifstmt",
   "elsestmtoneliner", "elseifstmt", "elseifstmtoneliner",
   "elseifstmtoneliner1", "elseifstmt1", "cond", "repeatwhile",
@@ -695,28 +700,29 @@ 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,
-     325,   326,   327,   328,   329,   330,    61,    38,    43,    45,
-      42,    47,    37,    10,    40,    41,    62,    60,    44
+     325,   326,   327,   328,   329,   330,   331,    61,    38,    43,
+      45,    42,    47,    37,    10,    40,    41,    62,    60,    44
 };
 # endif
 
 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
 static const yytype_uint8 yyr1[] =
 {
-       0,    89,    90,    90,    90,    91,    92,    92,    92,    92,
-      92,    92,    93,    93,    93,    93,    93,    93,    93,    93,
-      93,    94,    94,    95,    95,    95,    95,    95,    95,    96,
-      96,    96,    96,    96,    96,    97,    97,    98,    98,    99,
-      99,   100,   101,   101,   102,   102,   102,   103,   104,   105,
-     106,   107,   108,   109,   109,   109,   110,   111,   111,   111,
-     111,   111,   111,   111,   111,   111,   111,   111,   111,   111,
-     111,   111,   111,   111,   111,   111,   111,   111,   111,   111,
-     111,   111,   111,   111,   111,   111,   111,   111,   111,   111,
+       0,    90,    91,    91,    91,    92,    93,    93,    93,    93,
+      93,    93,    94,    94,    94,    94,    94,    94,    94,    94,
+      94,    95,    95,    96,    96,    96,    96,    96,    96,    97,
+      97,    97,    97,    97,    97,    98,    98,    99,    99,   100,
+     100,   101,   102,   102,   103,   103,   103,   104,   105,   106,
+     107,   108,   109,   110,   110,   110,   111,   112,   112,   112,
      112,   112,   112,   112,   112,   112,   112,   112,   112,   112,
-     112,   112,   112,   112,   113,   113,   114,   114,   115,   115,
-     115,   115,   115,   115,   116,   116,   117,   117,   118,   118,
-     118,   118,   120,   119,   119,   121,   119,   122,   123,   119,
-     124,   124,   124,   124,   125,   126,   127,   127,   127
+     112,   112,   112,   112,   112,   112,   112,   112,   112,   112,
+     112,   112,   112,   112,   112,   112,   112,   112,   112,   112,
+     112,   112,   113,   113,   113,   113,   113,   113,   113,   113,
+     113,   113,   113,   113,   113,   113,   114,   114,   115,   115,
+     116,   116,   116,   116,   116,   116,   117,   117,   118,   118,
+     119,   119,   119,   119,   121,   120,   120,   122,   120,   123,
+     124,   120,   125,   125,   125,   125,   126,   127,   128,   128,
+     128
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
@@ -731,11 +737,12 @@ static const yytype_uint8 yyr2[] =
        1,     1,     4,     1,     1,     2,     1,     3,     3,     3,
        3,     3,     3,     3,     3,     3,     3,     3,     3,     2,
        3,     3,     3,     3,     3,     2,     2,     3,     4,     4,
-       2,     1,     1,     2,     1,     2,     2,     2,     2,     1,
-       2,     4,     2,     3,     1,     3,     1,     3,     2,     2,
-       2,     2,     3,     2,     2,     1,     3,     2,     2,     2,
-       3,     2,     0,     8,     2,     0,     8,     0,     0,    10,
-       0,     1,     3,     4,     0,     3,     0,     1,     3
+       4,     6,     2,     1,     1,     2,     1,     2,     2,     2,
+       2,     1,     2,     4,     2,     3,     1,     3,     1,     3,
+       2,     2,     2,     2,     3,     2,     2,     1,     3,     2,
+       2,     2,     3,     2,     0,     8,     2,     0,     8,     0,
+       0,    10,     0,     1,     3,     4,     0,     3,     0,     1,
+       3
 };
 
 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -743,89 +750,91 @@ static const yytype_uint8 yyr2[] =
    means the default is an error.  */
 static const yytype_uint8 yydefact[] =
 {
-       0,     0,    59,    57,    64,     0,    58,    61,    99,     0,
-     136,    51,    60,    94,     0,     0,    49,     0,     0,     0,
+       0,     0,    57,    64,     0,    58,    61,   101,     0,   138,
+      51,    60,    59,    96,     0,     0,    49,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     3,    66,    23,    11,    24,
-       0,     0,     0,     0,    21,     8,    91,    92,     7,     9,
-       5,     4,    63,     0,    66,    65,    98,    97,   137,   100,
-     136,   136,    93,   104,    95,     0,   108,     0,   109,     0,
-     110,   115,   111,   113,   122,    90,     0,    47,     0,     0,
-       0,     0,   124,   125,   102,   118,   119,   121,   106,    96,
-      79,     0,   127,   136,    85,    86,     0,     1,     6,     0,
-       0,     0,     0,    44,    52,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     3,    66,    23,    11,
+      24,     0,     0,     0,     0,    21,     8,    93,    94,     7,
+       9,     5,     4,    63,     0,    66,    65,   100,    99,   139,
+     102,   138,   138,    95,   106,    97,     0,   110,     0,   111,
+       0,   112,   117,   113,   115,   124,    92,     0,    47,     0,
+       0,     0,     0,   126,   127,   104,   120,   121,   123,   108,
+      98,    79,     0,     0,   129,   138,    85,    86,     0,     1,
+       6,     0,     0,     0,     0,    44,    52,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,   135,     0,   114,   117,     0,
-     112,    51,     0,     0,     0,    48,     0,     0,     0,     0,
-       0,    56,    51,     0,   120,     0,     0,     0,    51,   103,
-      87,     2,     0,    52,     0,     0,    51,     0,    28,    75,
-      76,    74,    77,    78,    71,    81,    82,    83,    84,    80,
-      67,    68,    69,    70,    72,    73,   138,    62,   105,   116,
-     130,    12,    13,    14,    19,    16,     0,     0,    18,    15,
-     130,   101,   107,    88,    89,   128,    53,     0,    46,    53,
-       0,    45,   131,     0,    20,    17,     0,   130,    52,     0,
-       0,    52,    52,    22,     0,   134,   134,     0,    54,    55,
-       0,     0,    52,    51,    32,   132,     0,    53,    53,   134,
-       0,    52,    53,     0,    53,     0,    50,    51,    52,    40,
-       0,   133,   123,   126,    53,    25,    53,    52,    29,    52,
-      52,    42,    38,     0,     0,    39,    35,     0,     0,    52,
-       0,     0,    37,     0,     0,    52,    51,    52,    51,   129,
-       0,     0,     0,     0,    51,    33,     0,    34,     0,     0,
-      26,    30,    31,    52,    36,    52,    27,    43,    41
+       0,     0,     0,     0,     0,     0,     0,   137,     0,   116,
+     119,     0,   114,    51,     0,     0,     0,    48,     0,     0,
+       0,     0,     0,    56,    51,     0,   122,     0,     0,     0,
+       0,     0,    51,   105,    87,     2,     0,    52,     0,     0,
+      51,     0,    28,    75,    76,    74,    77,    78,    71,    81,
+      82,    83,    84,    80,    67,    68,    69,    70,    72,    73,
+     140,    62,   107,   118,   132,    12,    13,    14,    19,    16,
+       0,     0,    18,    15,   132,   103,   109,    90,     0,    88,
+      89,   130,    53,     0,    46,    53,     0,    45,   133,     0,
+      20,    17,     0,     0,   132,    52,     0,     0,    52,    52,
+      22,     0,   136,   136,    91,     0,    54,    55,     0,     0,
+      52,    51,    32,   134,     0,    53,    53,   136,     0,    52,
+      53,     0,    53,     0,    50,    51,    52,    40,     0,   135,
+     125,   128,    53,    25,    53,    52,    29,    52,    52,    42,
+      38,     0,     0,    39,    35,     0,     0,    52,     0,     0,
+      37,     0,     0,    52,    51,    52,    51,   131,     0,     0,
+       0,     0,    51,    33,     0,    34,     0,     0,    26,    30,
+      31,    52,    36,    52,    27,    43,    41
 };
 
 /* YYDEFGOTO[NTERM-NUM].  */
 static const yytype_int16 yydefgoto[] =
 {
-      -1,    34,   218,    35,    54,    37,   219,    39,   267,   250,
-     251,   239,   252,   102,    40,    41,    42,   240,   278,   158,
-     208,    43,    44,   213,    64,    89,    46,    72,    73,    47,
-      48,   131,   142,   148,   207,   203,   227,    49,    59
+      -1,    35,   226,    36,    55,    38,   227,    40,   275,   258,
+     259,   247,   260,   104,    41,    42,    43,   248,   286,   162,
+     215,    44,    45,   220,    65,    90,    47,    73,    74,    48,
+      49,   133,   144,   152,   214,   209,   235,    50,    60
 };
 
 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    STATE-NUM.  */
-#define YYPACT_NINF -221
+#define YYPACT_NINF -228
 static const yytype_int16 yypact[] =
 {
-     267,   -34,  -221,  -221,  -221,   790,  -221,  -221,   790,   790,
-     790,  1059,  -221,    -6,    36,   711,  -221,    42,   790,   -22,
-      52,    57,    59,    60,   790,   745,    62,   790,   790,    68,
-      69,   790,   790,   790,     4,  -221,     5,  -221,  -221,  -221,
-     -20,    15,   823,   790,  1032,  -221,  -221,  -221,  -221,  -221,
-    -221,  -221,     8,   790,  -221,  1032,  1032,  1032,  1032,     7,
-     790,   790,  -221,  -221,    11,   790,  -221,   790,  -221,    58,
-    -221,  1032,    41,  -221,  -221,   843,    72,  -221,   -37,   790,
-     -30,    54,  -221,  -221,   897,  -221,    41,  -221,  -221,    14,
-     -46,   924,  -221,   790,   -46,   -46,   978,  -221,   342,   823,
-     790,   823,    63,  1005,  1032,   790,   790,   790,   790,   790,
-     790,   790,   790,   790,   790,   790,   790,   790,   790,   790,
-     790,   790,   843,   790,   -26,     7,    84,  1032,  1032,   790,
-    -221,  -221,    86,   790,   790,  -221,   790,   790,   870,   790,
-     790,  -221,  -221,   790,  -221,    88,   790,   790,  -221,     7,
-    -221,  -221,    26,  1032,    27,   951,   -34,   790,  -221,   396,
-     396,   396,   -46,   -46,   -46,  1032,  1032,   396,   396,   179,
-     471,   471,   -46,   -46,  1032,  1032,  1032,  -221,  -221,  1032,
-      92,  -221,  1032,  1032,  1032,  1032,   790,   790,  1032,  1032,
-      92,  1032,  -221,  1032,  1032,  -221,  -221,     6,  -221,  -221,
-     638,  1032,  -221,   -60,  1032,  1032,   -60,    92,   490,    70,
-     790,   490,  -221,  -221,    94,    28,    28,   -60,  -221,  -221,
-      90,   790,  1032,    -1,   -15,  -221,    97,  -221,  -221,    28,
-      78,  1032,  -221,    91,  -221,    98,  -221,  -221,    98,  -221,
-     823,  -221,   490,   490,  -221,  -221,  -221,   490,  -221,   490,
-      98,    98,  -221,   823,   638,  -221,    77,    83,   415,   490,
-      93,   100,  -221,   101,    87,  -221,  -221,  -221,  -221,  -221,
-     102,    96,    99,   103,   -11,  -221,   638,  -221,   565,   104,
-    -221,  -221,  -221,   490,  -221,  -221,  -221,  -221,  -221
+     261,   -53,  -228,  -228,   760,  -228,  -228,   760,   760,   760,
+    1103,  -228,  -228,     9,    32,   680,  -228,    33,   760,   -17,
+      94,    38,    41,    44,   760,   726,    50,   760,   760,   760,
+      53,    58,   760,   760,   760,     4,  -228,     5,  -228,  -228,
+    -228,    -8,     6,   796,   760,  1075,  -228,  -228,  -228,  -228,
+    -228,  -228,  -228,    -1,   760,  -228,  1075,  1075,  1075,  1075,
+      -3,   760,   760,  -228,  -228,     8,   760,  -228,   760,  -228,
+      63,  -228,  1075,    31,  -228,  -228,   817,    74,  -228,   -38,
+     760,   -33,    61,  -228,  -228,   935,  -228,    31,  -228,  -228,
+      16,   -52,   850,   963,  -228,   760,   -52,   -52,  1019,  -228,
+     336,   796,   760,   796,    67,  1047,  1075,   760,   760,   760,
+     760,   760,   760,   760,   760,   760,   760,   760,   760,   760,
+     760,   760,   760,   760,   817,   760,   -61,    -3,    96,  1075,
+    1075,   760,  -228,  -228,   101,   760,   760,  -228,   760,   760,
+     907,   760,   760,  -228,  -228,   760,  -228,   106,   760,   760,
+     760,   760,  -228,    -3,  -228,  -228,    42,  1075,    43,   991,
+     -53,   760,  -228,   387,   387,   387,   -52,   -52,   -52,  1075,
+    1075,   387,   387,    57,    30,    30,   -52,   -52,  1075,  1075,
+    1075,  -228,  -228,  1075,   110,  -228,  1075,  1075,  1075,  1075,
+     760,   760,  1075,  1075,   110,  1075,  -228,  1075,   879,  1075,
+    1075,  -228,  -228,    -7,  -228,  -228,   626,  1075,  -228,   -62,
+    1075,  1075,   -62,   760,   110,   481,    87,   760,   481,  -228,
+    -228,   113,    45,    45,  1075,   -62,  -228,  -228,   114,   760,
+    1075,    -6,    12,  -228,   120,  -228,  -228,    45,   105,  1075,
+    -228,   115,  -228,   126,  -228,  -228,   126,  -228,   796,  -228,
+     481,   481,  -228,  -228,  -228,   481,  -228,   481,   126,   126,
+    -228,   796,   626,  -228,   125,   132,   406,   481,   149,   150,
+    -228,   152,   137,  -228,  -228,  -228,  -228,  -228,   154,   112,
+     155,   159,   -18,  -228,   626,  -228,   556,   158,  -228,  -228,
+    -228,   481,  -228,  -228,  -228,  -228,  -228
 };
 
 /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int16 yypgoto[] =
 {
-    -221,  -221,     9,    35,     2,  -194,     0,  -221,  -221,  -221,
-     -90,  -220,  -111,   -72,  -221,  -221,  -221,  -214,   -10,   -13,
-    -190,  -221,    43,     3,  -221,  -221,  -221,   116,   -17,  -221,
-    -221,  -221,  -221,  -221,  -221,  -173,  -197,  -221,   -48
+    -228,  -228,    14,   100,     2,  -199,     0,  -228,  -228,  -228,
+     -31,  -227,   -56,   -77,  -228,  -228,  -228,  -225,    -9,   -25,
+    -195,  -228,    47,     3,  -228,  -228,  -228,   178,    -5,  -228,
+    -228,  -228,  -228,  -228,  -228,  -171,  -189,  -228,   -49
 };
 
 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
@@ -835,275 +844,286 @@ static const yytype_int16 yypgoto[] =
 #define YYTABLE_NINF -64
 static const yytype_int16 yytable[] =
 {
-      38,    61,    36,    45,    97,   -10,   212,   136,    87,   211,
-      51,   236,   124,   125,   139,   -53,   -53,   206,   255,   228,
-     111,   253,   112,    50,    76,    77,   233,   152,   214,   154,
-     209,   255,   244,   237,   217,    62,   253,   242,   243,   137,
-     120,   121,   247,    98,   249,   149,   140,   234,    55,    50,
-     210,    56,    57,    58,   258,   130,   259,    63,    71,   177,
-     265,    75,   123,    74,    99,    78,    79,    84,    71,   144,
-      90,    91,   -53,    80,    94,    95,    96,    67,    81,    69,
-      82,    83,   284,    88,   283,   103,   104,    50,   -10,    92,
-      93,   100,    60,   135,   129,   123,   122,   141,    38,   126,
-      36,    45,   145,    58,    58,   178,   156,   181,   127,   192,
-     128,   196,   198,   202,   221,   225,   226,   230,   241,   245,
-     271,   180,   138,   248,   236,   266,   268,   272,   273,   279,
-     274,   281,   190,   151,   238,   282,    58,   280,   195,   262,
-     197,    86,   103,   153,   155,   286,   200,     0,   159,   160,
-     161,   162,   163,   164,   165,   166,   167,   168,   169,   170,
-     171,   172,   173,   174,   175,   199,   176,     0,   257,     0,
-       0,     0,   179,     0,     0,     0,   182,   183,     0,   184,
-     185,   264,   188,   189,     0,     0,   191,     0,     0,   193,
-     194,     0,     0,     0,     0,   220,     0,     0,   223,   224,
-     201,     0,     0,     0,     0,     0,     0,     0,     0,   232,
-       0,     0,   215,   235,     0,   216,     0,     0,   246,     0,
-       0,     0,     0,     0,     0,   256,   229,   254,     0,   204,
-     205,     0,     0,     0,   260,     0,   261,   263,     0,     0,
-       0,   108,   109,     0,   110,   111,   270,   112,     0,     0,
-       0,     0,   275,   222,   277,     0,   276,   116,   117,   118,
-     119,     0,     0,     0,   231,   120,   121,    -6,     1,     0,
-     287,     0,   288,     0,     0,     0,     0,     2,   285,     3,
-       4,     5,     6,   103,     7,     8,     9,    10,    11,    12,
-       0,     0,     0,     0,     0,    13,   103,    14,    15,    16,
-       0,     0,    17,     0,     0,     0,     0,    18,    19,    20,
-       0,     0,    21,     0,     0,     0,    22,    23,    24,    25,
-       0,     0,    26,     0,     0,     0,     0,     0,     0,     0,
-       0,    27,     0,     0,     0,     0,     0,     0,    28,     0,
-       0,    29,    30,     0,     0,    31,    32,     0,     0,     0,
-      -6,    33,     2,     0,     3,     4,     5,     6,     0,     7,
-       8,     9,    10,    11,    12,     0,     0,     0,     0,     0,
-      13,     0,    14,    15,    16,     0,     0,    17,     0,     0,
-       0,     0,    18,    19,    20,     0,     0,    21,     0,     0,
-       0,    22,    23,    24,    25,     0,     0,    26,     0,     0,
-       0,     0,     0,     0,     0,     0,    27,     0,     0,     0,
-       0,     0,     0,    28,     0,     0,    29,    30,     0,     0,
-      31,    32,     0,     0,     0,     2,    33,     3,     4,     5,
-       6,     0,     7,     8,     9,    10,    52,    12,     0,     0,
-       0,     0,   269,    13,     0,    14,    15,    16,     0,     0,
-       0,     0,     0,     0,     0,    18,    19,    20,   108,   109,
-      21,   110,   111,     0,   112,     0,    24,    25,     0,     0,
-      26,     0,     0,   115,   116,   117,   118,   119,     0,    27,
-       0,     0,   120,   121,     0,     0,    28,     0,     0,     0,
-      30,     0,     0,    31,    32,     0,     0,     0,    50,    33,
-       2,     0,     3,     4,     5,     6,     0,     7,     8,     9,
-      10,    52,    12,     0,     0,     0,     0,     0,    13,     0,
-      14,    15,    16,     0,     0,     0,     0,     0,     0,     0,
-      18,    19,    20,   108,   109,    21,   110,   111,     0,   112,
-       0,    24,    25,     0,     0,    26,     0,     0,     0,     0,
-       0,   118,   119,     0,    27,     0,     0,   120,   121,     0,
-       0,    28,     0,     0,     0,    30,     0,     0,    31,    32,
-       0,     0,     0,    50,    33,     2,     0,     3,     4,     5,
-       6,     0,     7,     8,     9,    10,    52,    12,     0,     0,
-       0,     0,     0,    13,     0,    14,    15,    16,     0,     0,
-       0,     0,     0,     0,     0,    18,    19,    20,     0,     0,
-      21,     0,     0,     0,     0,     0,    24,    25,     0,     0,
-      26,     0,     0,     0,     0,     0,     0,     0,     0,    27,
-       0,     0,     0,     0,     0,     0,    28,     0,     0,     0,
-      30,     0,     0,    31,    32,     0,     0,     0,     2,    33,
-       3,     4,     5,     6,     0,     7,     8,     9,    10,    52,
-      12,     0,     0,     0,     0,     0,    13,     0,    14,    15,
-       0,     0,     0,     0,     0,     0,     0,     0,    18,     0,
-      20,     0,     0,     0,     0,     0,     0,     0,     0,    24,
-      25,     0,     0,    26,     0,     0,     0,     0,     0,     0,
-       0,     0,    27,     0,     0,     0,     0,     0,     0,    28,
-       0,     0,     0,    30,     0,     0,    31,    32,     0,     0,
-       0,     2,    33,     3,     4,     5,     6,     0,     7,     0,
-       0,     0,    52,    12,     0,     0,     0,     0,     0,     0,
-      65,     0,     0,     0,     0,    66,     0,    67,    68,    69,
-      70,    53,     0,    20,     0,     2,     0,     3,     4,     5,
-       6,     0,     7,     0,     0,     0,    52,    12,     0,     0,
-       0,     0,     0,     0,    65,    27,     0,     0,     0,     0,
-       0,    67,    28,    69,     0,    53,     0,    20,     0,    31,
-      32,     0,     0,     0,     0,    33,     0,     0,    85,     0,
-       2,     0,     3,     4,     5,     6,     0,     7,     0,    27,
-       0,    52,    12,     0,     0,     0,    28,     0,     0,     0,
-       0,     0,     0,    31,    32,     0,     0,     0,     0,    33,
-      53,     0,    20,     2,     0,     3,     4,     5,     6,     0,
-       7,     0,     0,     0,    52,    12,     0,     0,     0,     0,
+      39,    62,    37,    46,    99,   -10,   138,   219,   -53,   -53,
+     218,   141,   126,   127,   113,    52,   114,   216,   261,   263,
+      88,   241,    51,   212,   156,   181,   158,   221,   125,    77,
+      78,    51,   263,   261,   236,   122,   123,   217,   244,   139,
+     250,   251,   242,   225,   142,   255,   153,   257,   252,   100,
+      63,    56,    64,    75,    57,    58,    59,   266,    82,   267,
+     245,    83,    72,   273,    84,    76,   -53,    68,   132,    70,
+      89,    85,    72,    94,    91,    92,    93,   101,    95,    96,
+      97,    98,   146,   102,    61,   292,   125,   291,    51,   -10,
+     105,   106,   110,   111,   137,   112,   113,   128,   114,   131,
+      39,   124,    37,    46,   143,   147,    79,    80,    59,    59,
+     160,   120,   121,   129,    81,   130,   182,   122,   123,   110,
+     111,   185,   112,   113,   184,   114,   196,   140,   202,   204,
+     208,   229,   203,   233,   234,   194,   118,   119,   120,   121,
+     249,   238,    59,   201,   122,   123,   253,   256,   105,   157,
+     159,   206,   244,   288,   163,   164,   165,   166,   167,   168,
+     169,   170,   171,   172,   173,   174,   175,   176,   177,   178,
+     179,   265,   180,   274,   205,   276,   279,   280,   183,   281,
+     282,   287,   186,   187,   272,   188,   189,   289,   192,   193,
+     228,   290,   195,   231,   232,   197,   198,   199,   200,   294,
+     155,   246,   270,    87,     0,   240,     0,     0,   207,     0,
+       0,     0,     0,     0,   254,     0,     0,     0,     0,     0,
+       0,   264,   243,   222,     0,     0,   223,     0,     0,     0,
+     268,     0,   269,   271,     0,     0,   262,   210,   211,   237,
+       0,     0,   278,     0,     0,     0,     0,     0,   283,     0,
+     285,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     224,    -6,     1,     0,   230,   284,   295,     0,   296,     0,
+       0,     0,     2,     3,     4,     5,   239,     6,     7,     8,
+       9,    10,    11,     0,    12,     0,   293,     0,     0,    13,
+       0,    14,    15,    16,     0,   105,    17,     0,     0,     0,
+       0,    18,    19,    20,     0,     0,    21,     0,   105,     0,
+      22,    23,    24,    25,     0,     0,    26,     0,     0,     0,
+       0,     0,     0,     0,     0,    27,     0,     0,     0,     0,
+       0,     0,    28,    29,     0,     0,    30,    31,     0,     0,
+      32,    33,     0,     0,     0,    -6,    34,     2,     3,     4,
+       5,     0,     6,     7,     8,     9,    10,    11,     0,    12,
+       0,     0,     0,     0,    13,     0,    14,    15,    16,     0,
+       0,    17,     0,     0,     0,     0,    18,    19,    20,     0,
+       0,    21,     0,     0,     0,    22,    23,    24,    25,     0,
+       0,    26,     0,     0,     0,     0,     0,     0,     0,     0,
+      27,     0,     0,     0,     0,     0,     0,    28,    29,     0,
+       0,    30,    31,     0,     0,    32,    33,     2,     3,     4,
+       5,    34,     6,     7,     8,     9,    53,    11,     0,    12,
+       0,     0,     0,   277,    13,     0,    14,    15,    16,     0,
+       0,     0,     0,     0,     0,     0,    18,    19,    20,   110,
+     111,    21,   112,   113,     0,   114,     0,    24,    25,     0,
+       0,    26,     0,     0,     0,   117,   118,   119,   120,   121,
+      27,     0,     0,     0,   122,   123,     0,    28,    29,     0,
+       0,     0,    31,     0,     0,    32,    33,     0,     0,     0,
+      51,    34,     2,     3,     4,     5,     0,     6,     7,     8,
+       9,    53,    11,     0,    12,     0,     0,     0,     0,    13,
+       0,    14,    15,    16,     0,     0,     0,     0,     0,     0,
+       0,    18,    19,    20,     0,     0,    21,     0,     0,     0,
+       0,     0,    24,    25,     0,     0,    26,     0,     0,     0,
+       0,     0,     0,     0,     0,    27,     0,     0,     0,     0,
+       0,     0,    28,    29,     0,     0,     0,    31,     0,     0,
+      32,    33,     0,     0,     0,    51,    34,     2,     3,     4,
+       5,     0,     6,     7,     8,     9,    53,    11,     0,    12,
+       0,     0,     0,     0,    13,     0,    14,    15,    16,     0,
+       0,     0,     0,     0,     0,     0,    18,    19,    20,     0,
+       0,    21,     0,     0,     0,     0,     0,    24,    25,     0,
+       0,    26,     0,     0,     0,     0,     0,     0,     0,     0,
+      27,     0,     0,     0,     0,     0,     0,    28,    29,     0,
+       0,     0,    31,     0,     0,    32,    33,     2,     3,     4,
+       5,    34,     6,     7,     8,     9,    53,    11,     0,    12,
+       0,     0,     0,     0,    13,     0,    14,    15,     0,     0,
+       0,     0,     0,     0,     0,     0,    18,     0,    20,     0,
+       0,     0,     0,     0,     0,     0,     0,    24,    25,     0,
+       0,    26,     0,     0,     0,     0,     0,     0,     0,     0,
+      27,     2,     3,     4,     5,     0,     6,    28,    29,     0,
+      53,    11,    31,    12,     0,    32,    33,     0,     0,    66,
+       0,    34,     0,     0,    67,     0,    68,    69,    70,    71,
+      54,     0,    20,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     2,     3,     4,
+       5,     0,     6,     0,    27,     0,    53,    11,     0,    12,
+       0,    28,    29,     0,     0,    66,     0,     0,     0,    32,
+      33,     0,    68,     0,    70,    34,    54,     0,    20,     0,
+       0,     2,     3,     4,     5,     0,     6,     0,     0,    86,
+      53,    11,     0,    12,     0,     0,     0,     0,     0,     0,
+      27,     0,     0,     0,     0,     0,     0,    28,    29,     0,
+      54,     0,    20,     0,     0,    32,    33,     2,     3,     4,
+       5,    34,     6,     0,     0,     0,    53,    11,     0,    12,
        0,     0,     0,     0,    27,     0,     0,     0,     0,     0,
-       0,    28,     0,    53,     0,    20,     0,     0,    31,    32,
-       0,     0,     0,     0,    33,     0,   132,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,    27,     0,     0,
-       0,     0,     0,     0,    28,     0,     0,     0,     0,   105,
-     106,    31,    32,     0,   107,   108,   109,   101,   110,   133,
-     134,   112,   113,   114,   186,     0,     0,     0,     0,     0,
-     115,   116,   117,   118,   119,     0,   105,   106,     0,   120,
-     121,   107,   108,   109,     0,   110,   111,     0,   112,   113,
-     114,     0,     0,   143,     0,     0,   187,   115,   116,   117,
-     118,   119,     0,   105,   106,     0,   120,   121,   107,   108,
-     109,     0,   110,   111,     0,   112,   113,   114,     0,     0,
-       0,     0,     0,     0,   115,   116,   117,   118,   119,     0,
-     105,   106,     0,   120,   121,   107,   108,   109,     0,   110,
-     111,     0,   112,   113,   114,     0,   146,   147,     0,     0,
-       0,   115,   116,   117,   118,   119,     0,   105,   106,     0,
-     120,   121,   107,   108,   109,     0,   110,   111,     0,   112,
-     113,   114,     0,     0,     0,     0,     0,   157,   115,   116,
-     117,   118,   119,     0,   105,   106,   150,   120,   121,   107,
-     108,   109,     0,   110,   111,     0,   112,   113,   114,     0,
-       0,     0,     0,     0,     0,   115,   116,   117,   118,   119,
-       0,   105,   106,   150,   120,   121,   107,   108,   109,     0,
-     110,   111,     0,   112,   113,   114,     0,     0,     0,     0,
-       0,   157,   115,   116,   117,   118,   119,     0,   105,   106,
-       0,   120,   121,   107,   108,   109,     0,   110,   111,     0,
-     112,   113,   114,     0,     0,     0,     0,     0,     0,   115,
-     116,   117,   118,   119,     0,   -63,   -63,     0,   120,   121,
-     -63,   -63,   -63,     0,   -63,   -63,     0,   -63,   -63,   -63,
-       0,     0,     0,     0,     0,     0,   -63,     0,     0,   -63,
-     -63,     0,     0,    60,     0,   -63,   -63
+       0,    28,    29,     0,     0,     0,    54,     0,    20,    32,
+      33,     0,     0,     0,     0,    34,     0,     0,     0,     0,
+     134,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+      27,     0,     0,     0,     0,     0,     0,    28,    29,     0,
+       0,     0,     0,   107,   108,    32,    33,     0,   109,   110,
+     111,   103,   112,   135,   136,   114,   115,   116,   148,     0,
+       0,     0,     0,     0,   149,   117,   118,   119,   120,   121,
+       0,     0,     0,     0,   122,   123,   107,   108,     0,     0,
+       0,   109,   110,   111,     0,   112,   113,   213,   114,   115,
+     116,     0,     0,     0,     0,     0,     0,     0,   117,   118,
+     119,   120,   121,     0,     0,   107,   108,   122,   123,     0,
+     109,   110,   111,     0,   112,   113,     0,   114,   115,   116,
+       0,   190,     0,     0,     0,     0,     0,   117,   118,   119,
+     120,   121,     0,   107,   108,     0,   122,   123,   109,   110,
+     111,     0,   112,   113,     0,   114,   115,   116,     0,     0,
+       0,   145,     0,     0,   191,   117,   118,   119,   120,   121,
+       0,   107,   108,     0,   122,   123,   109,   110,   111,     0,
+     112,   113,     0,   114,   115,   116,     0,     0,     0,     0,
+       0,     0,     0,   117,   118,   119,   120,   121,     0,   107,
+     108,     0,   122,   123,   109,   110,   111,     0,   112,   113,
+       0,   114,   115,   116,     0,     0,   150,   151,     0,     0,
+       0,   117,   118,   119,   120,   121,     0,   107,   108,     0,
+     122,   123,   109,   110,   111,     0,   112,   113,     0,   114,
+     115,   116,     0,     0,     0,     0,     0,     0,   161,   117,
+     118,   119,   120,   121,     0,   107,   108,   154,   122,   123,
+     109,   110,   111,     0,   112,   113,     0,   114,   115,   116,
+       0,     0,     0,     0,     0,     0,     0,   117,   118,   119,
+     120,   121,     0,   107,   108,   154,   122,   123,   109,   110,
+     111,     0,   112,   113,     0,   114,   115,   116,     0,     0,
+       0,     0,     0,     0,   161,   117,   118,   119,   120,   121,
+       0,   107,   108,     0,   122,   123,   109,   110,   111,     0,
+     112,   113,     0,   114,   115,   116,     0,     0,     0,     0,
+       0,     0,     0,   117,   118,   119,   120,   121,     0,   -63,
+     -63,     0,   122,   123,   -63,   -63,   -63,     0,   -63,   -63,
+       0,   -63,   -63,   -63,     0,     0,     0,     0,     0,     0,
+       0,   -63,     0,     0,   -63,   -63,     0,     0,    61,     0,
+     -63,   -63
 };
 
 static const yytype_int16 yycheck[] =
 {
-       0,    11,     0,     0,     0,     0,   200,    44,    25,   199,
-       1,    26,    60,    61,    44,    26,    27,   190,   238,   216,
-      66,   235,    68,    83,    46,    47,    27,    99,    88,   101,
-      24,   251,   229,    48,   207,    41,   250,   227,   228,    76,
-      86,    87,   232,    34,   234,    93,    76,    48,     5,    83,
-      44,     8,     9,    10,   244,    72,   246,    21,    15,    85,
-     254,    18,    88,    21,    84,    13,    14,    24,    25,    86,
-      27,    28,    83,    21,    31,    32,    33,    36,    21,    38,
-      21,    21,   276,    21,   274,    42,    43,    83,    83,    21,
-      21,    76,    84,    21,    36,    88,    53,    43,    98,    88,
-      98,    98,    88,    60,    61,    21,    43,    21,    65,    21,
-      67,    85,    85,    21,    44,    21,    88,    27,    21,    41,
-      27,   131,    79,    32,    26,    48,    43,    27,    27,    27,
-      43,    32,   142,    98,   224,    32,    93,    41,   148,   250,
-     153,    25,    99,   100,   101,    41,   156,    -1,   105,   106,
-     107,   108,   109,   110,   111,   112,   113,   114,   115,   116,
-     117,   118,   119,   120,   121,   156,   123,    -1,   240,    -1,
-      -1,    -1,   129,    -1,    -1,    -1,   133,   134,    -1,   136,
-     137,   253,   139,   140,    -1,    -1,   143,    -1,    -1,   146,
-     147,    -1,    -1,    -1,    -1,   208,    -1,    -1,   211,   212,
-     157,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   222,
-      -1,    -1,   203,   223,    -1,   206,    -1,    -1,   231,    -1,
-      -1,    -1,    -1,    -1,    -1,   238,   217,   237,    -1,   186,
-     187,    -1,    -1,    -1,   247,    -1,   249,   250,    -1,    -1,
-      -1,    62,    63,    -1,    65,    66,   259,    68,    -1,    -1,
-      -1,    -1,   265,   210,   267,    -1,   266,    78,    79,    80,
-      81,    -1,    -1,    -1,   221,    86,    87,     0,     1,    -1,
-     283,    -1,   285,    -1,    -1,    -1,    -1,    10,   278,    12,
-      13,    14,    15,   240,    17,    18,    19,    20,    21,    22,
-      -1,    -1,    -1,    -1,    -1,    28,   253,    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,    -1,    -1,    -1,    71,    -1,
-      -1,    74,    75,    -1,    -1,    78,    79,    -1,    -1,    -1,
-      83,    84,    10,    -1,    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,
-      -1,    -1,    -1,    71,    -1,    -1,    74,    75,    -1,    -1,
-      78,    79,    -1,    -1,    -1,    10,    84,    12,    13,    14,
-      15,    -1,    17,    18,    19,    20,    21,    22,    -1,    -1,
-      -1,    -1,    27,    28,    -1,    30,    31,    32,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    40,    41,    42,    62,    63,
-      45,    65,    66,    -1,    68,    -1,    51,    52,    -1,    -1,
-      55,    -1,    -1,    77,    78,    79,    80,    81,    -1,    64,
-      -1,    -1,    86,    87,    -1,    -1,    71,    -1,    -1,    -1,
-      75,    -1,    -1,    78,    79,    -1,    -1,    -1,    83,    84,
-      10,    -1,    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,    62,    63,    45,    65,    66,    -1,    68,
-      -1,    51,    52,    -1,    -1,    55,    -1,    -1,    -1,    -1,
-      -1,    80,    81,    -1,    64,    -1,    -1,    86,    87,    -1,
-      -1,    71,    -1,    -1,    -1,    75,    -1,    -1,    78,    79,
-      -1,    -1,    -1,    83,    84,    10,    -1,    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,
-      55,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    64,
-      -1,    -1,    -1,    -1,    -1,    -1,    71,    -1,    -1,    -1,
-      75,    -1,    -1,    78,    79,    -1,    -1,    -1,    10,    84,
-      12,    13,    14,    15,    -1,    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,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    64,    -1,    -1,    -1,    -1,    -1,    -1,    71,
-      -1,    -1,    -1,    75,    -1,    -1,    78,    79,    -1,    -1,
-      -1,    10,    84,    12,    13,    14,    15,    -1,    17,    -1,
-      -1,    -1,    21,    22,    -1,    -1,    -1,    -1,    -1,    -1,
-      29,    -1,    -1,    -1,    -1,    34,    -1,    36,    37,    38,
-      39,    40,    -1,    42,    -1,    10,    -1,    12,    13,    14,
-      15,    -1,    17,    -1,    -1,    -1,    21,    22,    -1,    -1,
-      -1,    -1,    -1,    -1,    29,    64,    -1,    -1,    -1,    -1,
-      -1,    36,    71,    38,    -1,    40,    -1,    42,    -1,    78,
-      79,    -1,    -1,    -1,    -1,    84,    -1,    -1,    53,    -1,
-      10,    -1,    12,    13,    14,    15,    -1,    17,    -1,    64,
-      -1,    21,    22,    -1,    -1,    -1,    71,    -1,    -1,    -1,
-      -1,    -1,    -1,    78,    79,    -1,    -1,    -1,    -1,    84,
-      40,    -1,    42,    10,    -1,    12,    13,    14,    15,    -1,
-      17,    -1,    -1,    -1,    21,    22,    -1,    -1,    -1,    -1,
+       0,    10,     0,     0,     0,     0,    44,   206,    26,    27,
+     205,    44,    61,    62,    66,     1,    68,    24,   243,   246,
+      25,    27,    84,   194,   101,    86,   103,    89,    89,    46,
+      47,    84,   259,   258,   223,    87,    88,    44,    26,    77,
+     235,   236,    48,   214,    77,   240,    95,   242,   237,    35,
+      41,     4,    20,    20,     7,     8,     9,   252,    20,   254,
+      48,    20,    15,   262,    20,    18,    84,    36,    73,    38,
+      20,    24,    25,    20,    27,    28,    29,    85,    20,    32,
+      33,    34,    87,    77,    85,   284,    89,   282,    84,    84,
+      43,    44,    62,    63,    20,    65,    66,    89,    68,    36,
+     100,    54,   100,   100,    43,    89,    12,    13,    61,    62,
+      43,    81,    82,    66,    20,    68,    20,    87,    88,    62,
+      63,    20,    65,    66,   133,    68,    20,    80,    86,    86,
+      20,    44,   157,    20,    89,   144,    79,    80,    81,    82,
+      20,    27,    95,   152,    87,    88,    41,    32,   101,   102,
+     103,   160,    26,    41,   107,   108,   109,   110,   111,   112,
+     113,   114,   115,   116,   117,   118,   119,   120,   121,   122,
+     123,   248,   125,    48,   160,    43,    27,    27,   131,    27,
+      43,    27,   135,   136,   261,   138,   139,    32,   141,   142,
+     215,    32,   145,   218,   219,   148,   149,   150,   151,    41,
+     100,   232,   258,    25,    -1,   230,    -1,    -1,   161,    -1,
+      -1,    -1,    -1,    -1,   239,    -1,    -1,    -1,    -1,    -1,
+      -1,   246,   231,   209,    -1,    -1,   212,    -1,    -1,    -1,
+     255,    -1,   257,   258,    -1,    -1,   245,   190,   191,   225,
+      -1,    -1,   267,    -1,    -1,    -1,    -1,    -1,   273,    -1,
+     275,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+     213,     0,     1,    -1,   217,   274,   291,    -1,   293,    -1,
+      -1,    -1,    11,    12,    13,    14,   229,    16,    17,    18,
+      19,    20,    21,    -1,    23,    -1,   286,    -1,    -1,    28,
+      -1,    30,    31,    32,    -1,   248,    35,    -1,    -1,    -1,
+      -1,    40,    41,    42,    -1,    -1,    45,    -1,   261,    -1,
+      49,    50,    51,    52,    -1,    -1,    55,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    64,    -1,    -1,    -1,    -1,
+      -1,    -1,    71,    72,    -1,    -1,    75,    76,    -1,    -1,
+      79,    80,    -1,    -1,    -1,    84,    85,    11,    12,    13,
+      14,    -1,    16,    17,    18,    19,    20,    21,    -1,    23,
+      -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,    -1,    -1,    -1,    71,    72,    -1,
+      -1,    75,    76,    -1,    -1,    79,    80,    11,    12,    13,
+      14,    85,    16,    17,    18,    19,    20,    21,    -1,    23,
+      -1,    -1,    -1,    27,    28,    -1,    30,    31,    32,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    40,    41,    42,    62,
+      63,    45,    65,    66,    -1,    68,    -1,    51,    52,    -1,
+      -1,    55,    -1,    -1,    -1,    78,    79,    80,    81,    82,
+      64,    -1,    -1,    -1,    87,    88,    -1,    71,    72,    -1,
+      -1,    -1,    76,    -1,    -1,    79,    80,    -1,    -1,    -1,
+      84,    85,    11,    12,    13,    14,    -1,    16,    17,    18,
+      19,    20,    21,    -1,    23,    -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,    -1,
+      -1,    -1,    71,    72,    -1,    -1,    -1,    76,    -1,    -1,
+      79,    80,    -1,    -1,    -1,    84,    85,    11,    12,    13,
+      14,    -1,    16,    17,    18,    19,    20,    21,    -1,    23,
+      -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,    -1,    -1,    -1,    71,    72,    -1,
+      -1,    -1,    76,    -1,    -1,    79,    80,    11,    12,    13,
+      14,    85,    16,    17,    18,    19,    20,    21,    -1,    23,
+      -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,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      64,    11,    12,    13,    14,    -1,    16,    71,    72,    -1,
+      20,    21,    76,    23,    -1,    79,    80,    -1,    -1,    29,
+      -1,    85,    -1,    -1,    34,    -1,    36,    37,    38,    39,
+      40,    -1,    42,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    11,    12,    13,
+      14,    -1,    16,    -1,    64,    -1,    20,    21,    -1,    23,
+      -1,    71,    72,    -1,    -1,    29,    -1,    -1,    -1,    79,
+      80,    -1,    36,    -1,    38,    85,    40,    -1,    42,    -1,
+      -1,    11,    12,    13,    14,    -1,    16,    -1,    -1,    53,
+      20,    21,    -1,    23,    -1,    -1,    -1,    -1,    -1,    -1,
+      64,    -1,    -1,    -1,    -1,    -1,    -1,    71,    72,    -1,
+      40,    -1,    42,    -1,    -1,    79,    80,    11,    12,    13,
+      14,    85,    16,    -1,    -1,    -1,    20,    21,    -1,    23,
       -1,    -1,    -1,    -1,    64,    -1,    -1,    -1,    -1,    -1,
-      -1,    71,    -1,    40,    -1,    42,    -1,    -1,    78,    79,
-      -1,    -1,    -1,    -1,    84,    -1,    33,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    64,    -1,    -1,
-      -1,    -1,    -1,    -1,    71,    -1,    -1,    -1,    -1,    56,
-      57,    78,    79,    -1,    61,    62,    63,    84,    65,    66,
-      67,    68,    69,    70,    44,    -1,    -1,    -1,    -1,    -1,
-      77,    78,    79,    80,    81,    -1,    56,    57,    -1,    86,
-      87,    61,    62,    63,    -1,    65,    66,    -1,    68,    69,
-      70,    -1,    -1,    46,    -1,    -1,    76,    77,    78,    79,
-      80,    81,    -1,    56,    57,    -1,    86,    87,    61,    62,
+      -1,    71,    72,    -1,    -1,    -1,    40,    -1,    42,    79,
+      80,    -1,    -1,    -1,    -1,    85,    -1,    -1,    -1,    -1,
+      33,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      64,    -1,    -1,    -1,    -1,    -1,    -1,    71,    72,    -1,
+      -1,    -1,    -1,    56,    57,    79,    80,    -1,    61,    62,
+      63,    85,    65,    66,    67,    68,    69,    70,    38,    -1,
+      -1,    -1,    -1,    -1,    44,    78,    79,    80,    81,    82,
+      -1,    -1,    -1,    -1,    87,    88,    56,    57,    -1,    -1,
+      -1,    61,    62,    63,    -1,    65,    66,    38,    68,    69,
+      70,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    78,    79,
+      80,    81,    82,    -1,    -1,    56,    57,    87,    88,    -1,
+      61,    62,    63,    -1,    65,    66,    -1,    68,    69,    70,
+      -1,    44,    -1,    -1,    -1,    -1,    -1,    78,    79,    80,
+      81,    82,    -1,    56,    57,    -1,    87,    88,    61,    62,
       63,    -1,    65,    66,    -1,    68,    69,    70,    -1,    -1,
-      -1,    -1,    -1,    -1,    77,    78,    79,    80,    81,    -1,
-      56,    57,    -1,    86,    87,    61,    62,    63,    -1,    65,
-      66,    -1,    68,    69,    70,    -1,    72,    73,    -1,    -1,
-      -1,    77,    78,    79,    80,    81,    -1,    56,    57,    -1,
-      86,    87,    61,    62,    63,    -1,    65,    66,    -1,    68,
-      69,    70,    -1,    -1,    -1,    -1,    -1,    76,    77,    78,
-      79,    80,    81,    -1,    56,    57,    85,    86,    87,    61,
-      62,    63,    -1,    65,    66,    -1,    68,    69,    70,    -1,
-      -1,    -1,    -1,    -1,    -1,    77,    78,    79,    80,    81,
-      -1,    56,    57,    85,    86,    87,    61,    62,    63,    -1,
+      -1,    46,    -1,    -1,    77,    78,    79,    80,    81,    82,
+      -1,    56,    57,    -1,    87,    88,    61,    62,    63,    -1,
       65,    66,    -1,    68,    69,    70,    -1,    -1,    -1,    -1,
-      -1,    76,    77,    78,    79,    80,    81,    -1,    56,    57,
-      -1,    86,    87,    61,    62,    63,    -1,    65,    66,    -1,
-      68,    69,    70,    -1,    -1,    -1,    -1,    -1,    -1,    77,
-      78,    79,    80,    81,    -1,    56,    57,    -1,    86,    87,
+      -1,    -1,    -1,    78,    79,    80,    81,    82,    -1,    56,
+      57,    -1,    87,    88,    61,    62,    63,    -1,    65,    66,
+      -1,    68,    69,    70,    -1,    -1,    73,    74,    -1,    -1,
+      -1,    78,    79,    80,    81,    82,    -1,    56,    57,    -1,
+      87,    88,    61,    62,    63,    -1,    65,    66,    -1,    68,
+      69,    70,    -1,    -1,    -1,    -1,    -1,    -1,    77,    78,
+      79,    80,    81,    82,    -1,    56,    57,    86,    87,    88,
       61,    62,    63,    -1,    65,    66,    -1,    68,    69,    70,
-      -1,    -1,    -1,    -1,    -1,    -1,    77,    -1,    -1,    80,
-      81,    -1,    -1,    84,    -1,    86,    87
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    78,    79,    80,
+      81,    82,    -1,    56,    57,    86,    87,    88,    61,    62,
+      63,    -1,    65,    66,    -1,    68,    69,    70,    -1,    -1,
+      -1,    -1,    -1,    -1,    77,    78,    79,    80,    81,    82,
+      -1,    56,    57,    -1,    87,    88,    61,    62,    63,    -1,
+      65,    66,    -1,    68,    69,    70,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    78,    79,    80,    81,    82,    -1,    56,
+      57,    -1,    87,    88,    61,    62,    63,    -1,    65,    66,
+      -1,    68,    69,    70,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    78,    -1,    -1,    81,    82,    -1,    -1,    85,    -1,
+      87,    88
 };
 
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
    symbol of state STATE-NUM.  */
 static const yytype_uint8 yystos[] =
 {
-       0,     1,    10,    12,    13,    14,    15,    17,    18,    19,
-      20,    21,    22,    28,    30,    31,    32,    35,    40,    41,
-      42,    45,    49,    50,    51,    52,    55,    64,    71,    74,
-      75,    78,    79,    84,    90,    92,    93,    94,    95,    96,
-     103,   104,   105,   110,   111,   112,   115,   118,   119,   126,
-      83,    91,    21,    40,    93,   111,   111,   111,   111,   127,
-      84,   107,    41,    21,   113,    29,    34,    36,    37,    38,
-      39,   111,   116,   117,    21,   111,    46,    47,    13,    14,
-      21,    21,    21,    21,   111,    53,   116,   117,    21,   114,
-     111,   111,    21,    21,   111,   111,   111,     0,    91,    84,
-      76,    84,   102,   111,   111,    56,    57,    61,    62,    63,
-      65,    66,    68,    69,    70,    77,    78,    79,    80,    81,
-      86,    87,   111,    88,   127,   127,    88,   111,   111,    36,
-     117,   120,    33,    66,    67,    21,    44,    76,   111,    44,
-      76,    43,   121,    46,   117,    88,    72,    73,   122,   127,
-      85,    92,   102,   111,   102,   111,    43,    76,   108,   111,
-     111,   111,   111,   111,   111,   111,   111,   111,   111,   111,
-     111,   111,   111,   111,   111,   111,   111,    85,    21,   111,
-     107,    21,   111,   111,   111,   111,    44,    76,   111,   111,
-     107,   111,    21,   111,   111,   107,    85,   108,    85,    91,
-     107,   111,    21,   124,   111,   111,   124,   123,   109,    24,
-      44,   109,    94,   112,    88,    91,    91,   124,    91,    95,
-     108,    44,   111,   108,   108,    21,    88,   125,   125,    91,
-      27,   111,   108,    27,    48,   107,    26,    48,    99,   100,
-     106,    21,   109,   109,   125,    41,   108,   109,    32,   109,
-      98,    99,   101,   106,   107,   100,   108,   102,   109,   109,
-     108,   108,   101,   108,   102,    94,    48,    97,    43,    27,
-     108,    27,    27,    27,    43,   108,   107,   108,   107,    27,
-      41,    32,    32,   109,    94,    95,    41,   108,   108
+       0,     1,    11,    12,    13,    14,    16,    17,    18,    19,
+      20,    21,    23,    28,    30,    31,    32,    35,    40,    41,
+      42,    45,    49,    50,    51,    52,    55,    64,    71,    72,
+      75,    76,    79,    80,    85,    91,    93,    94,    95,    96,
+      97,   104,   105,   106,   111,   112,   113,   116,   119,   120,
+     127,    84,    92,    20,    40,    94,   112,   112,   112,   112,
+     128,    85,   108,    41,    20,   114,    29,    34,    36,    37,
+      38,    39,   112,   117,   118,    20,   112,    46,    47,    12,
+      13,    20,    20,    20,    20,   112,    53,   117,   118,    20,
+     115,   112,   112,   112,    20,    20,   112,   112,   112,     0,
+      92,    85,    77,    85,   103,   112,   112,    56,    57,    61,
+      62,    63,    65,    66,    68,    69,    70,    78,    79,    80,
+      81,    82,    87,    88,   112,    89,   128,   128,    89,   112,
+     112,    36,   118,   121,    33,    66,    67,    20,    44,    77,
+     112,    44,    77,    43,   122,    46,   118,    89,    38,    44,
+      73,    74,   123,   128,    86,    93,   103,   112,   103,   112,
+      43,    77,   109,   112,   112,   112,   112,   112,   112,   112,
+     112,   112,   112,   112,   112,   112,   112,   112,   112,   112,
+     112,    86,    20,   112,   108,    20,   112,   112,   112,   112,
+      44,    77,   112,   112,   108,   112,    20,   112,   112,   112,
+     112,   108,    86,   109,    86,    92,   108,   112,    20,   125,
+     112,   112,   125,    38,   124,   110,    24,    44,   110,    95,
+     113,    89,    92,    92,   112,   125,    92,    96,   109,    44,
+     112,   109,   109,    20,    89,   126,   126,    92,    27,   112,
+     109,    27,    48,   108,    26,    48,   100,   101,   107,    20,
+     110,   110,   126,    41,   109,   110,    32,   110,    99,   100,
+     102,   107,   108,   101,   109,   103,   110,   110,   109,   109,
+     102,   109,   103,    95,    48,    98,    43,    27,   109,    27,
+      27,    27,    43,   109,   108,   109,   108,    27,    41,    32,
+      32,   110,    95,    96,    41,   109,   109
 };
 
 #define yyerrok		(yyerrstatus = 0)
@@ -2441,151 +2461,161 @@ yyreduce:
     break;
 
   case 90:
-#line 417 "engines/director/lingo/lingo-gr.y"
+#line 415 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->code1(g_lingo->c_charOf); ;}
+    break;
+
+  case 91:
+#line 416 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->code1(g_lingo->c_charToOf); ;}
+    break;
+
+  case 92:
+#line 419 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_printtop); ;}
     break;
 
-  case 93:
-#line 420 "engines/director/lingo/lingo-gr.y"
+  case 95:
+#line 422 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_exitRepeat); ;}
     break;
 
-  case 94:
-#line 421 "engines/director/lingo/lingo-gr.y"
+  case 96:
+#line 423 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeConst(0); // Push fake value on stack
 							  g_lingo->code1(g_lingo->c_procret); ;}
     break;
 
-  case 97:
-#line 425 "engines/director/lingo/lingo-gr.y"
+  case 99:
+#line 427 "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 98:
-#line 428 "engines/director/lingo/lingo-gr.y"
+  case 100:
+#line 430 "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 99:
-#line 431 "engines/director/lingo/lingo-gr.y"
+  case 101:
+#line 433 "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 100:
-#line 434 "engines/director/lingo/lingo-gr.y"
+  case 102:
+#line 436 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeFunc((yyvsp[(1) - (2)].s), (yyvsp[(2) - (2)].narg)); ;}
     break;
 
-  case 101:
-#line 435 "engines/director/lingo/lingo-gr.y"
+  case 103:
+#line 437 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_open); ;}
     break;
 
-  case 102:
-#line 436 "engines/director/lingo/lingo-gr.y"
+  case 104:
+#line 438 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code2(g_lingo->c_voidpush, g_lingo->c_open); ;}
     break;
 
-  case 103:
-#line 437 "engines/director/lingo/lingo-gr.y"
+  case 105:
+#line 439 "engines/director/lingo/lingo-gr.y"
     { Common::String s("sound-"); s += *(yyvsp[(2) - (3)].s); g_lingo->codeFunc(&s, (yyvsp[(3) - (3)].narg)); ;}
     break;
 
-  case 104:
-#line 440 "engines/director/lingo/lingo-gr.y"
+  case 106:
+#line 442 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_global); g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); delete (yyvsp[(1) - (1)].s); ;}
     break;
 
-  case 105:
-#line 441 "engines/director/lingo/lingo-gr.y"
+  case 107:
+#line 443 "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 106:
-#line 444 "engines/director/lingo/lingo-gr.y"
+  case 108:
+#line 446 "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 107:
-#line 445 "engines/director/lingo/lingo-gr.y"
+  case 109:
+#line 447 "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 108:
-#line 456 "engines/director/lingo/lingo-gr.y"
+  case 110:
+#line 458 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_gotoloop); ;}
     break;
 
-  case 109:
-#line 457 "engines/director/lingo/lingo-gr.y"
+  case 111:
+#line 459 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_gotonext); ;}
     break;
 
-  case 110:
-#line 458 "engines/director/lingo/lingo-gr.y"
+  case 112:
+#line 460 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_gotoprevious); ;}
     break;
 
-  case 111:
-#line 459 "engines/director/lingo/lingo-gr.y"
+  case 113:
+#line 461 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(1);
 		g_lingo->code1(g_lingo->c_goto); ;}
     break;
 
-  case 112:
-#line 462 "engines/director/lingo/lingo-gr.y"
+  case 114:
+#line 464 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(3);
 		g_lingo->code1(g_lingo->c_goto); ;}
     break;
 
-  case 113:
-#line 465 "engines/director/lingo/lingo-gr.y"
+  case 115:
+#line 467 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(2);
 		g_lingo->code1(g_lingo->c_goto); ;}
     break;
 
-  case 118:
-#line 478 "engines/director/lingo/lingo-gr.y"
+  case 120:
+#line 480 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_playdone); ;}
     break;
 
-  case 119:
-#line 479 "engines/director/lingo/lingo-gr.y"
+  case 121:
+#line 481 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(1);
 		g_lingo->code1(g_lingo->c_play); ;}
     break;
 
-  case 120:
-#line 482 "engines/director/lingo/lingo-gr.y"
+  case 122:
+#line 484 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(3);
 		g_lingo->code1(g_lingo->c_play); ;}
     break;
 
-  case 121:
-#line 485 "engines/director/lingo/lingo-gr.y"
+  case 123:
+#line 487 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(2);
 		g_lingo->code1(g_lingo->c_play); ;}
     break;
 
-  case 122:
-#line 515 "engines/director/lingo/lingo-gr.y"
+  case 124:
+#line 517 "engines/director/lingo/lingo-gr.y"
     { g_lingo->_indef = true; g_lingo->_currentFactory.clear(); ;}
     break;
 
-  case 123:
-#line 516 "engines/director/lingo/lingo-gr.y"
+  case 125:
+#line 518 "engines/director/lingo/lingo-gr.y"
     {
 			g_lingo->codeConst(0); // Push fake value on stack
 			g_lingo->code1(g_lingo->c_procret);
@@ -2593,38 +2623,38 @@ yyreduce:
 			g_lingo->_indef = false; ;}
     break;
 
-  case 124:
-#line 521 "engines/director/lingo/lingo-gr.y"
+  case 126:
+#line 523 "engines/director/lingo/lingo-gr.y"
     {
 			g_lingo->codeFactory(*(yyvsp[(2) - (2)].s));
 		;}
     break;
 
-  case 125:
-#line 524 "engines/director/lingo/lingo-gr.y"
+  case 127:
+#line 526 "engines/director/lingo/lingo-gr.y"
     { g_lingo->_indef = true; ;}
     break;
 
-  case 126:
-#line 525 "engines/director/lingo/lingo-gr.y"
+  case 128:
+#line 527 "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 127:
-#line 529 "engines/director/lingo/lingo-gr.y"
+  case 129:
+#line 531 "engines/director/lingo/lingo-gr.y"
     { g_lingo->_indef = true; g_lingo->_currentFactory.clear(); ;}
     break;
 
-  case 128:
-#line 530 "engines/director/lingo/lingo-gr.y"
+  case 130:
+#line 532 "engines/director/lingo/lingo-gr.y"
     { g_lingo->_ignoreMe = true; ;}
     break;
 
-  case 129:
-#line 530 "engines/director/lingo/lingo-gr.y"
+  case 131:
+#line 532 "engines/director/lingo/lingo-gr.y"
     {
 				g_lingo->codeConst(0); // Push fake value on stack
 				g_lingo->code1(g_lingo->c_procret);
@@ -2638,33 +2668,33 @@ yyreduce:
 			;}
     break;
 
-  case 130:
-#line 542 "engines/director/lingo/lingo-gr.y"
+  case 132:
+#line 544 "engines/director/lingo/lingo-gr.y"
     { (yyval.narg) = 0; ;}
     break;
 
-  case 131:
-#line 543 "engines/director/lingo/lingo-gr.y"
+  case 133:
+#line 545 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeArg((yyvsp[(1) - (1)].s)); (yyval.narg) = 1; ;}
     break;
 
-  case 132:
-#line 544 "engines/director/lingo/lingo-gr.y"
+  case 134:
+#line 546 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeArg((yyvsp[(3) - (3)].s)); (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}
     break;
 
-  case 133:
-#line 545 "engines/director/lingo/lingo-gr.y"
+  case 135:
+#line 547 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeArg((yyvsp[(4) - (4)].s)); (yyval.narg) = (yyvsp[(1) - (4)].narg) + 1; ;}
     break;
 
-  case 134:
-#line 547 "engines/director/lingo/lingo-gr.y"
+  case 136:
+#line 549 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeArgStore(); ;}
     break;
 
-  case 135:
-#line 551 "engines/director/lingo/lingo-gr.y"
+  case 137:
+#line 553 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->code1(g_lingo->c_call);
 		g_lingo->codeString((yyvsp[(1) - (3)].s)->c_str());
@@ -2673,24 +2703,24 @@ yyreduce:
 		g_lingo->code1(numpar); ;}
     break;
 
-  case 136:
-#line 559 "engines/director/lingo/lingo-gr.y"
+  case 138:
+#line 561 "engines/director/lingo/lingo-gr.y"
     { (yyval.narg) = 0; ;}
     break;
 
-  case 137:
-#line 560 "engines/director/lingo/lingo-gr.y"
+  case 139:
+#line 562 "engines/director/lingo/lingo-gr.y"
     { (yyval.narg) = 1; ;}
     break;
 
-  case 138:
-#line 561 "engines/director/lingo/lingo-gr.y"
+  case 140:
+#line 563 "engines/director/lingo/lingo-gr.y"
     { (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}
     break;
 
 
 /* Line 1267 of yacc.c.  */
-#line 2694 "engines/director/lingo/lingo-gr.cpp"
+#line 2724 "engines/director/lingo/lingo-gr.cpp"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2904,6 +2934,6 @@ yyreturn:
 }
 
 
-#line 564 "engines/director/lingo/lingo-gr.y"
+#line 566 "engines/director/lingo/lingo-gr.y"
 
 
diff --git a/engines/director/lingo/lingo-gr.h b/engines/director/lingo/lingo-gr.h
index d7482bc..11d2db1 100644
--- a/engines/director/lingo/lingo-gr.h
+++ b/engines/director/lingo/lingo-gr.h
@@ -46,20 +46,20 @@
      POINT = 262,
      RECT = 263,
      ARRAY = 264,
-     SYMBOL = 265,
-     OBJECT = 266,
-     INT = 267,
-     THEENTITY = 268,
-     THEENTITYWITHID = 269,
-     FLOAT = 270,
-     BLTIN = 271,
-     BLTINNOARGS = 272,
-     BLTINNOARGSORONE = 273,
-     BLTINONEARG = 274,
-     BLTINARGLIST = 275,
-     ID = 276,
-     STRING = 277,
-     HANDLER = 278,
+     OBJECT = 265,
+     INT = 266,
+     THEENTITY = 267,
+     THEENTITYWITHID = 268,
+     FLOAT = 269,
+     BLTIN = 270,
+     BLTINNOARGS = 271,
+     BLTINNOARGSORONE = 272,
+     BLTINONEARG = 273,
+     BLTINARGLIST = 274,
+     ID = 275,
+     STRING = 276,
+     HANDLER = 277,
+     SYMBOL = 278,
      tDOWN = 279,
      tELSE = 280,
      tNLELSIF = 281,
@@ -107,11 +107,12 @@
      tCONCAT = 323,
      tCONTAINS = 324,
      tSTARTS = 325,
-     tSPRITE = 326,
-     tINTERSECTS = 327,
-     tWITHIN = 328,
-     tON = 329,
-     tSOUND = 330
+     tCHAR = 326,
+     tSPRITE = 327,
+     tINTERSECTS = 328,
+     tWITHIN = 329,
+     tON = 330,
+     tSOUND = 331
    };
 #endif
 /* Tokens.  */
@@ -122,20 +123,20 @@
 #define POINT 262
 #define RECT 263
 #define ARRAY 264
-#define SYMBOL 265
-#define OBJECT 266
-#define INT 267
-#define THEENTITY 268
-#define THEENTITYWITHID 269
-#define FLOAT 270
-#define BLTIN 271
-#define BLTINNOARGS 272
-#define BLTINNOARGSORONE 273
-#define BLTINONEARG 274
-#define BLTINARGLIST 275
-#define ID 276
-#define STRING 277
-#define HANDLER 278
+#define OBJECT 265
+#define INT 266
+#define THEENTITY 267
+#define THEENTITYWITHID 268
+#define FLOAT 269
+#define BLTIN 270
+#define BLTINNOARGS 271
+#define BLTINNOARGSORONE 272
+#define BLTINONEARG 273
+#define BLTINARGLIST 274
+#define ID 275
+#define STRING 276
+#define HANDLER 277
+#define SYMBOL 278
 #define tDOWN 279
 #define tELSE 280
 #define tNLELSIF 281
@@ -183,11 +184,12 @@
 #define tCONCAT 323
 #define tCONTAINS 324
 #define tSTARTS 325
-#define tSPRITE 326
-#define tINTERSECTS 327
-#define tWITHIN 328
-#define tON 329
-#define tSOUND 330
+#define tCHAR 326
+#define tSPRITE 327
+#define tINTERSECTS 328
+#define tWITHIN 329
+#define tON 330
+#define tSOUND 331
 
 
 
@@ -205,7 +207,7 @@ typedef union YYSTYPE
 	Common::Array<double> *arr;
 }
 /* Line 1529 of yacc.c.  */
-#line 209 "engines/director/lingo/lingo-gr.hpp"
+#line 211 "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 17391c6..4b2af27 100644
--- a/engines/director/lingo/lingo-gr.y
+++ b/engines/director/lingo/lingo-gr.y
@@ -77,7 +77,7 @@ void yyerror(const char *s) {
 }
 
 %token UNARY
-%token CASTREF VOID VAR POINT RECT ARRAY SYMBOL OBJECT
+%token CASTREF VOID VAR POINT RECT ARRAY OBJECT
 %token<i> INT
 %token<e> THEENTITY THEENTITYWITHID
 %token<f> FLOAT
@@ -87,7 +87,7 @@ void yyerror(const char *s) {
 %token tMOVIE tNEXT tOF tPREVIOUS tPUT tREPEAT tSET tTHEN tTO tWHEN
 %token tWITH tWHILE tNLELSE tFACTORY tMETHOD tOPEN tPLAY tDONE tPLAYACCEL tINSTANCE
 %token tGE tLE tGT tLT tEQ tNEQ tAND tOR tNOT tMOD
-%token tAFTER tBEFORE tCONCAT tCONTAINS tSTARTS
+%token tAFTER tBEFORE tCONCAT tCONTAINS tSTARTS tCHAR
 %token tSPRITE tINTERSECTS tWITHIN
 %token tON tSOUND
 
@@ -412,6 +412,8 @@ expr: INT		{ $$ = g_lingo->codeConst($1); }
 	| '(' expr ')'				{ $$ = $2; }
 	| tSPRITE expr tINTERSECTS expr 	{ g_lingo->code1(g_lingo->c_intersects); }
 	| tSPRITE expr tWITHIN expr		 	{ g_lingo->code1(g_lingo->c_within); }
+	| tCHAR expr tOF expr				{ g_lingo->code1(g_lingo->c_charOf); }
+	| tCHAR expr tTO expr tOF expr		{ g_lingo->code1(g_lingo->c_charToOf); }
 	;
 
 func: tPUT expr				{ g_lingo->code1(g_lingo->c_printtop); }
diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp
index 2e4ba95..54cf786 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 64
-#define YY_END_OF_BUFFER 65
+#define YY_NUM_RULES 65
+#define YY_END_OF_BUFFER 66
 /* This struct is not used in this scanner,
    but its presence is necessary. */
 struct yy_trans_info
@@ -373,33 +373,33 @@ struct yy_trans_info
 	flex_int32_t yy_verify;
 	flex_int32_t yy_nxt;
 	};
-static yyconst flex_int16_t yy_accept[224] =
+static yyconst flex_int16_t yy_accept[227] =
     {   0,
-        0,    0,   65,   63,    3,   61,   61,   63,   63,   63,
-       60,   60,   60,   59,   60,   60,   57,   57,   57,   57,
-       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
-       57,   57,   57,   57,    2,    2,    3,   61,    0,    0,
-        0,    0,    0,   62,    4,   56,    1,   58,   59,   55,
-       53,   54,   57,   57,   57,   57,   57,   57,   57,   57,
-       57,   57,   57,   57,   21,   11,   57,   57,   57,   57,
-       57,   57,   57,   32,   33,   57,   35,   57,   57,   57,
-       57,   57,   57,   57,   57,   57,   47,   57,   57,    2,
-        2,    0,    4,    1,   58,   57,    6,   57,   57,   57,
-
-       57,   57,   15,   57,   57,   57,   57,    0,   57,   57,
-       57,   57,   57,   28,   57,   57,   31,   57,   57,   57,
-       38,   57,   40,   57,   57,   57,   57,   57,   57,   57,
-        0,   57,   57,   57,    9,   10,   14,   17,   57,   57,
-       57,    0,   57,   57,   24,   25,   57,   57,   57,   30,
-       34,   36,   57,   57,   57,   57,   57,    0,   46,   51,
-       57,   49,   13,    5,   57,   57,   57,   18,   57,   20,
-       57,   57,   26,   57,   29,   57,   57,   41,   57,   57,
-       45,   45,   52,   57,    0,    7,   57,   57,   19,   57,
-       57,   27,   57,   39,   48,   42,    0,   45,   50,    0,
-
-       57,   16,   57,   57,   57,    0,   45,   12,    8,   22,
-       57,   37,    0,   45,   57,    0,    0,   23,   44,    0,
-        0,   43,    0
+        0,    0,   66,   64,    3,   62,   62,   64,   64,   64,
+       61,   61,   61,   60,   61,   61,   58,   58,   58,   58,
+       58,   58,   58,   58,   58,   58,   58,   58,   58,   58,
+       58,   58,   58,   58,    2,    2,    3,   62,    0,    0,
+        0,    0,    0,   63,    4,   57,    1,   59,   60,   56,
+       54,   55,   58,   58,   58,   58,   58,   58,   58,   58,
+       58,   58,   58,   58,   58,   22,   12,   58,   58,   58,
+       58,   58,   58,   58,   33,   34,   58,   36,   58,   58,
+       58,   58,   58,   58,   58,   58,   58,   48,   58,   58,
+        2,    2,    0,    4,    1,   59,   58,    6,   58,   58,
+
+       58,   58,   58,   58,   16,   58,   58,   58,   58,    0,
+       58,   58,   58,   58,   58,   29,   58,   58,   32,   58,
+       58,   58,   39,   58,   41,   58,   58,   58,   58,   58,
+       58,   58,    0,   58,   58,    8,   58,   10,   11,   15,
+       18,   58,   58,   58,    0,   58,   58,   25,   26,   58,
+       58,   58,   31,   35,   37,   58,   58,   58,   58,   58,
+        0,   47,   52,   58,   50,   14,    5,   58,   58,   58,
+       19,   58,   21,   58,   58,   27,   58,   30,   58,   58,
+       42,   58,   58,   46,   46,   53,   58,    0,    7,   58,
+       58,   20,   58,   58,   28,   58,   40,   49,   43,    0,
+
+       46,   51,    0,   58,   17,   58,   58,   58,    0,   46,
+       13,    9,   23,   58,   38,    0,   46,   58,    0,    0,
+       24,   45,    0,    0,   44,    0
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -445,65 +445,67 @@ static yyconst flex_int32_t yy_meta[64] =
         5,    5,    5
     } ;
 
-static yyconst flex_int16_t yy_base[231] =
+static yyconst flex_int16_t yy_base[234] =
     {   0,
-        0,   62,  172,  556,   66,   70,   74,   78,  160,    0,
-      556,  145,  143,   54,   70,  125,   65,   67,   60,   63,
-       70,   86,   71,    0,   82,   70,   85,  111,  115,  109,
-       84,  128,  126,  127,  185,  189,  193,  556,  197,  158,
-      202,   83,  131,  556,    0,  556,    0,  113,   95,  556,
-      556,  556,    0,  112,  133,  162,  157,  182,  178,  193,
-      189,  196,  199,  188,   86,    0,  187,  189,  205,  191,
-      210,  188,  193,    0,    0,  208,    0,  214,  211,  199,
-      206,  218,  223,  227,  245,  242,    0,  243,  231,  269,
-      275,  233,    0,    0,   83,  248,    0,  246,  247,  249,
-
-      256,  265,    0,  257,  261,  269,  280,  296,  266,  282,
-      274,  275,  286,    0,  288,  280,    0,  288,  278,  282,
-        0,  301,    0,  295,  301,  297,  331,  304,  313,  303,
-      323,  313,  316,  333,    0,    0,    0,    0,  323,  335,
-      341,  331,  345,  332,    0,    0,  336,  337,  342,    0,
-        0,    0,  343,  354,  352,  339,  341,  376,    0,    0,
-      357,  355,  301,    0,  365,  367,  361,    0,  368,  556,
-      370,  367,    0,  382,    0,  374,  371,    0,  386,  375,
-      409,  410,    0,  385,  418,    0,  391,  382,    0,  407,
-      408,    0,  395,    0,    0,    0,  433,  434,    0,  413,
-
-      407,    0,  424,  428,  415,  428,  450,  556,    0,    0,
-      417,    0,  455,  456,  423,  468,  474,    0,  476,  442,
-      480,  487,  556,  527,  529,  532,  535,  541,  546,  550
+        0,   62,  228,  553,   66,   70,   74,   78,  205,    0,
+      553,  161,  156,   54,   70,  135,   65,   67,   68,   60,
+       70,   86,   75,    0,   78,   76,   94,  111,  113,  118,
+      106,  128,  123,  131,  185,  189,  193,  553,  197,  158,
+      202,   83,  132,  553,    0,  553,    0,   95,  125,  553,
+      553,  553,    0,  127,  164,  163,  194,  184,  187,  180,
+      197,  193,  200,  203,  185,   90,    0,  192,  192,  209,
+      195,  215,  192,  197,    0,    0,  212,    0,  217,  220,
+      212,  226,  226,  226,  230,  247,  244,    0,  247,  232,
+      274,  295,  236,    0,    0,   76,  261,    0,  254,  255,
+
+      257,  274,  273,  275,    0,  268,  269,  277,  288,  307,
+      274,  293,  280,  284,  291,    0,  293,  287,    0,  295,
+      285,  293,    0,  298,    0,  303,  309,  303,  347,  308,
+      311,  321,  331,  318,  322,    0,  340,    0,    0,    0,
+        0,  333,  337,  347,  337,  348,  335,    0,    0,  339,
+      341,  351,    0,    0,    0,  348,  357,  358,  345,  346,
+      382,    0,    0,  363,  361,   98,    0,  373,  371,  368,
+        0,  375,  553,  377,  373,    0,  388,    0,  380,  377,
+        0,  392,  381,  170,  411,    0,  389,  421,    0,  391,
+      383,    0,  409,  408,    0,  396,    0,    0,    0,  442,
+
+      446,    0,  413,  403,    0,  420,  431,  423,  429,  452,
+      553,    0,    0,  424,    0,  218,  459,  430,  467,  471,
+        0,  479,  446,  483,  488,  553,  524,  526,  529,  532,
+      538,  543,  547
     } ;
 
-static yyconst flex_int16_t yy_def[231] =
+static yyconst flex_int16_t yy_def[234] =
     {   0,
-      223,    1,  223,  223,  223,  223,  223,  223,  224,  225,
-      223,  223,  223,  223,  223,  223,  226,  226,  226,  226,
-      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
-      226,  226,  226,  226,  223,  223,  223,  223,  223,  223,
-      223,  223,  224,  223,  227,  223,  228,  223,  223,  223,
-      223,  223,  226,  226,  226,  226,  226,  226,  226,  226,
-      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
-      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
-      226,  226,  226,  226,  226,  226,  226,  226,  226,  223,
-      223,  223,  227,  228,  223,  226,  226,  226,  226,  226,
-
-      226,  226,  226,  226,  226,  226,  226,  223,  226,  226,
-      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
-      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
-      223,  226,  226,  226,  226,  226,  226,  226,  226,  226,
-      226,  223,  226,  226,  226,  226,  226,  226,  226,  226,
-      226,  226,  226,  226,  226,  226,  226,  229,  226,  226,
-      226,  226,  223,  226,  226,  226,  226,  226,  226,  223,
-      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
-      229,  229,  226,  226,  223,  226,  226,  226,  226,  226,
-      226,  226,  226,  226,  226,  226,  223,  229,  226,  223,
-
-      226,  226,  226,  226,  226,  223,  229,  223,  226,  226,
-      226,  226,  223,  229,  226,  230,  223,  226,  230,  223,
-      223,  230,    0,  223,  223,  223,  223,  223,  223,  223
+      226,    1,  226,  226,  226,  226,  226,  226,  227,  228,
+      226,  226,  226,  226,  226,  226,  229,  229,  229,  229,
+      229,  229,  229,  229,  229,  229,  229,  229,  229,  229,
+      229,  229,  229,  229,  226,  226,  226,  226,  226,  226,
+      226,  226,  227,  226,  230,  226,  231,  226,  226,  226,
+      226,  226,  229,  229,  229,  229,  229,  229,  229,  229,
+      229,  229,  229,  229,  229,  229,  229,  229,  229,  229,
+      229,  229,  229,  229,  229,  229,  229,  229,  229,  229,
+      229,  229,  229,  229,  229,  229,  229,  229,  229,  229,
+      226,  226,  226,  230,  231,  226,  229,  229,  229,  229,
+
+      229,  229,  229,  229,  229,  229,  229,  229,  229,  226,
+      229,  229,  229,  229,  229,  229,  229,  229,  229,  229,
+      229,  229,  229,  229,  229,  229,  229,  229,  229,  229,
+      229,  229,  226,  229,  229,  229,  229,  229,  229,  229,
+      229,  229,  229,  229,  226,  229,  229,  229,  229,  229,
+      229,  229,  229,  229,  229,  229,  229,  229,  229,  229,
+      232,  229,  229,  229,  229,  226,  229,  229,  229,  229,
+      229,  229,  226,  229,  229,  229,  229,  229,  229,  229,
+      229,  229,  229,  232,  232,  229,  229,  226,  229,  229,
+      229,  229,  229,  229,  229,  229,  229,  229,  229,  226,
+
+      232,  229,  226,  229,  229,  229,  229,  229,  226,  232,
+      226,  229,  229,  229,  229,  226,  232,  229,  233,  226,
+      229,  233,  226,  226,  233,    0,  226,  226,  226,  226,
+      226,  226,  226
     } ;
 
-static yyconst flex_int16_t yy_nxt[620] =
+static yyconst flex_int16_t yy_nxt[617] =
     {   0,
         4,    5,    6,    7,    8,    9,   10,   11,   12,   13,
         4,   14,   15,   11,   16,   17,   18,   19,   20,   21,
@@ -513,69 +515,69 @@ static yyconst flex_int16_t yy_nxt[620] =
        27,   28,   29,   30,   24,   31,   32,   33,   24,   24,
        34,   24,   24,   35,   48,   49,   36,   37,   38,   38,
        39,   40,   41,   41,   40,   40,   41,   41,   40,   39,
-       38,   38,   39,   50,   51,   54,   56,  108,   57,   42,
-      108,   58,   55,   42,   95,   59,   64,   60,   68,   65,
-
-       69,   62,   66,   81,   70,   48,   49,   61,   92,   67,
-       54,   56,   57,   71,   42,   58,   55,   63,   42,   59,
-       64,   60,   68,   65,   95,   69,   62,   66,   81,   70,
-       72,   61,   92,   67,   78,   74,   44,   71,   52,   73,
-       79,   63,   75,   80,   76,   96,   77,   82,   86,   88,
-       89,   97,   47,   46,   87,   72,   83,   84,   78,   40,
-       74,   85,   40,   73,   79,   44,   75,   80,   76,   96,
-       77,  223,   82,   86,   88,   89,   97,   42,   87,  223,
-       83,   84,   98,  223,   99,   85,   90,   38,   38,   91,
-       91,   38,   38,   91,   37,   38,   38,   39,   39,   38,
+       38,   38,   39,   50,   51,   54,   56,   96,   59,   42,
+       57,  110,   55,   42,  110,   60,   58,   61,   67,  188,
+
+       65,   63,  188,   66,   69,   68,   96,   62,   93,   70,
+       54,   56,   59,   71,   42,   57,   55,   64,   42,   60,
+       58,   61,   72,   67,   65,   82,   63,   66,   69,   68,
+       73,   62,   93,   75,   70,   48,   49,   44,   71,   74,
+       76,   64,   77,   79,   78,   87,   72,   83,   52,   80,
+       82,   88,   81,   89,   90,   73,   84,   85,   75,   40,
+       97,   86,   40,   74,   76,   47,   77,   79,   78,   46,
+       87,  200,   83,   80,  200,   88,   81,   42,   89,   90,
+       84,   85,   98,   99,   97,   86,   91,   38,   38,   92,
+       92,   38,   38,   92,   37,   38,   38,   39,   39,   38,
 
        38,   39,   42,   40,   41,   41,   40,   98,   99,  100,
-      102,  103,  104,  105,  106,  223,  107,  111,  101,  109,
-      110,   42,  112,  223,  113,  116,  117,  118,  114,  119,
-      120,  223,  121,  100,  102,  122,  103,  104,  105,  106,
-      107,  111,  101,  109,  110,  115,   42,  112,  113,  116,
-      117,  123,  118,  114,  119,  120,  121,  124,  125,  122,
-      126,  127,  128,  223,  130,  131,  129,  132,  135,  115,
-       90,   38,   38,   91,  133,  123,   91,   38,   38,   91,
-      134,  124,  125,  136,  137,  126,  127,  128,  130,  131,
-      138,  129,  132,  135,  139,  140,  141,  108,  133,  143,
-
-      108,  144,  185,  146,  134,  185,  147,  136,  148,  137,
-      145,  149,  223,  150,  138,  151,  152,  153,  139,  140,
-      154,  141,  155,  143,  156,  162,  144,  146,  157,  142,
-      147,  160,  158,  148,  145,  158,  149,  150,  161,  151,
-      152,  153,  163,  223,  164,  154,  155,  165,  166,  156,
-      162,  167,  157,  142,  168,  160,  169,  223,  159,  170,
-      171,  175,  161,  172,  173,  174,  176,  163,  164,  177,
-      178,  165,  179,  166,  180,  167,  183,  158,  184,  168,
-      158,  169,  159,  170,  186,  171,  175,  172,  173,  174,
-      187,  176,  188,  189,  177,  178,  179,  190,  180,  191,
-
-      192,  183,  193,  184,  194,  195,  223,  196,  182,  186,
-      197,  197,  199,  197,  197,  187,  188,  189,  201,  185,
-      202,  190,  185,  191,  203,  192,  193,  204,  194,  205,
-      195,  196,  182,  208,  197,  197,  199,  197,  197,  209,
-      198,  200,  201,  210,  202,  211,  223,  212,  213,  203,
-      215,  197,  204,  205,  197,  218,  216,  217,  208,  216,
-      217,  206,  221,  209,  198,  207,  200,  223,  210,  216,
-      211,  212,  216,  213,  215,  217,  223,  223,  217,  218,
-      223,  222,  223,  214,  222,  206,  223,  221,  222,  207,
-      223,  222,  223,  223,  223,  223,  223,  223,  223,  223,
-
-      223,  223,  220,  223,  223,  223,  223,  214,  223,  223,
-      223,  223,  223,  223,  223,  223,  223,  223,  223,  223,
-      223,  223,  223,  223,  223,  223,  220,   43,   43,  223,
-       43,   43,   43,   45,   45,   53,   53,   53,   93,   93,
-       93,   94,   94,  223,   94,   94,   94,  181,  223,  223,
-      181,  219,  223,  223,  219,    3,  223,  223,  223,  223,
-      223,  223,  223,  223,  223,  223,  223,  223,  223,  223,
-      223,  223,  223,  223,  223,  223,  223,  223,  223,  223,
-      223,  223,  223,  223,  223,  223,  223,  223,  223,  223,
-      223,  223,  223,  223,  223,  223,  223,  223,  223,  223,
-
-      223,  223,  223,  223,  223,  223,  223,  223,  223,  223,
-      223,  223,  223,  223,  223,  223,  223,  223,  223
+       44,  101,  104,  109,  102,  105,  106,  107,  108,  219,
+      113,   42,  219,  103,  111,  112,  114,  226,  115,  118,
+      119,  120,  121,  116,  100,  101,  104,  109,  102,  122,
+      105,  106,  107,  108,  113,  123,   42,  103,  111,  112,
+      117,  114,  115,  118,  119,  124,  120,  121,  116,  125,
+      126,  127,  128,  129,  122,  132,  130,  226,  133,  123,
+      131,  226,  226,  226,  117,   91,   38,   38,   92,  124,
+      134,  226,  135,  125,  126,  127,  136,  128,  129,  132,
+      137,  130,  133,  138,  140,  131,   92,   38,   38,   92,
+
+      139,  141,  142,  143,  144,  134,  135,  146,  110,  149,
+      136,  110,  147,  151,  137,  150,  152,  157,  138,  140,
+      153,  148,  154,  155,  139,  141,  142,  143,  156,  144,
+      158,  146,  159,  149,  160,  163,  164,  147,  151,  150,
+      145,  152,  157,  165,  153,  148,  154,  155,  161,  167,
+      166,  161,  156,  168,  158,  169,  171,  159,  160,  163,
+      164,  170,  172,  174,  145,  173,  175,  176,  165,  177,
+      178,  179,  180,  167,  162,  166,  181,  168,  182,  183,
+      169,  171,  186,  161,  187,  170,  161,  172,  174,  173,
+      175,  176,  189,  177,  190,  178,  179,  180,  162,  191,
+
+      192,  181,  182,  183,  193,  194,  195,  186,  196,  187,
+      197,  198,  200,  199,  185,  200,  202,  189,  204,  190,
+      226,  205,  188,  191,  192,  188,  206,  207,  193,  194,
+      208,  195,  196,  211,  197,  212,  198,  199,  185,  213,
+      202,  201,  204,  200,  203,  205,  200,  200,  214,  216,
+      200,  206,  207,  200,  208,  215,  200,  218,  211,  212,
+      220,  226,  221,  220,  213,  201,  224,  226,  219,  203,
+      209,  219,  220,  214,  216,  220,  226,  210,  226,  215,
+      226,  218,  226,  226,  225,  217,  221,  225,  226,  225,
+      226,  224,  225,  226,  209,  226,  226,  226,  226,  223,
+
+      226,  210,  226,  226,  226,  226,  226,  226,  226,  217,
+      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
+      226,  226,  226,  223,   43,   43,  226,   43,   43,   43,
+       45,   45,   53,   53,   53,   94,   94,   94,   95,   95,
+      226,   95,   95,   95,  184,  226,  226,  184,  222,  226,
+      226,  222,    3,  226,  226,  226,  226,  226,  226,  226,
+      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
+      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
+      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
+      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
+
+      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
+      226,  226,  226,  226,  226,  226
     } ;
 
-static yyconst flex_int16_t yy_chk[620] =
+static yyconst flex_int16_t yy_chk[617] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -585,66 +587,66 @@ static yyconst flex_int16_t yy_chk[620] =
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    2,   14,   14,    2,    5,    5,    5,
         5,    6,    6,    6,    6,    7,    7,    7,    7,    8,
-        8,    8,    8,   15,   15,   17,   18,   65,   19,    6,
-       65,   20,   17,    7,   95,   21,   23,   21,   26,   23,
-
-       27,   22,   25,   31,   27,   49,   49,   21,   42,   25,
-       17,   18,   19,   27,    6,   20,   17,   22,    7,   21,
-       23,   21,   26,   23,   48,   27,   22,   25,   31,   27,
-       28,   21,   42,   25,   30,   29,   43,   27,   16,   28,
-       30,   22,   29,   30,   29,   54,   29,   32,   33,   34,
-       34,   55,   13,   12,   33,   28,   32,   32,   30,   40,
-       29,   32,   40,   28,   30,    9,   29,   30,   29,   54,
-       29,    3,   32,   33,   34,   34,   55,   40,   33,    0,
-       32,   32,   56,    0,   57,   32,   35,   35,   35,   35,
+        8,    8,    8,   15,   15,   17,   18,   96,   20,    6,
+       19,   66,   17,    7,   66,   21,   19,   21,   25,  166,
+
+       23,   22,  166,   23,   26,   25,   48,   21,   42,   27,
+       17,   18,   20,   27,    6,   19,   17,   22,    7,   21,
+       19,   21,   27,   25,   23,   31,   22,   23,   26,   25,
+       28,   21,   42,   29,   27,   49,   49,   43,   27,   28,
+       29,   22,   29,   30,   29,   33,   27,   32,   16,   30,
+       31,   33,   30,   34,   34,   28,   32,   32,   29,   40,
+       54,   32,   40,   28,   29,   13,   29,   30,   29,   12,
+       33,  184,   32,   30,  184,   33,   30,   40,   34,   34,
+       32,   32,   55,   56,   54,   32,   35,   35,   35,   35,
        36,   36,   36,   36,   37,   37,   37,   37,   39,   39,
 
-       39,   39,   40,   41,   41,   41,   41,   56,   57,   58,
-       59,   60,   61,   62,   63,    0,   64,   68,   58,   67,
-       67,   41,   69,    0,   70,   72,   73,   76,   71,   78,
-       79,    0,   80,   58,   59,   81,   60,   61,   62,   63,
-       64,   68,   58,   67,   67,   71,   41,   69,   70,   72,
-       73,   82,   76,   71,   78,   79,   80,   83,   84,   81,
-       85,   86,   88,    0,   89,   92,   88,   96,  100,   71,
-       90,   90,   90,   90,   98,   82,   91,   91,   91,   91,
-       99,   83,   84,  101,  102,   85,   86,   88,   89,   92,
-      104,   88,   96,  100,  105,  106,  107,  108,   98,  109,
-
-      108,  110,  163,  111,   99,  163,  112,  101,  113,  102,
-      110,  115,    0,  116,  104,  118,  119,  120,  105,  106,
-      122,  107,  124,  109,  125,  130,  110,  111,  126,  108,
-      112,  128,  127,  113,  110,  127,  115,  116,  129,  118,
-      119,  120,  131,    0,  132,  122,  124,  133,  134,  125,
-      130,  139,  126,  108,  140,  128,  141,    0,  127,  142,
-      143,  149,  129,  144,  147,  148,  153,  131,  132,  154,
-      155,  133,  156,  134,  157,  139,  161,  158,  162,  140,
-      158,  141,  127,  142,  165,  143,  149,  144,  147,  148,
-      166,  153,  167,  169,  154,  155,  156,  171,  157,  172,
-
-      174,  161,  176,  162,  177,  179,    0,  180,  158,  165,
-      181,  182,  184,  181,  182,  166,  167,  169,  187,  185,
-      188,  171,  185,  172,  190,  174,  176,  191,  177,  193,
-      179,  180,  158,  200,  197,  198,  184,  197,  198,  201,
-      182,  185,  187,  203,  188,  204,    0,  205,  206,  190,
-      211,  207,  191,  193,  207,  215,  213,  214,  200,  213,
-      214,  197,  220,  201,  182,  198,  185,    0,  203,  216,
-      204,  205,  216,  206,  211,  217,    0,  219,  217,  215,
-      219,  221,    0,  207,  221,  197,    0,  220,  222,  198,
-        0,  222,    0,    0,    0,    0,    0,    0,    0,    0,
-
-        0,    0,  217,    0,    0,    0,    0,  207,    0,    0,
+       39,   39,   40,   41,   41,   41,   41,   55,   56,   57,
+        9,   58,   60,   65,   59,   61,   62,   63,   64,  216,
+       69,   41,  216,   59,   68,   68,   70,    3,   71,   73,
+       74,   77,   79,   72,   57,   58,   60,   65,   59,   80,
+       61,   62,   63,   64,   69,   81,   41,   59,   68,   68,
+       72,   70,   71,   73,   74,   82,   77,   79,   72,   83,
+       84,   85,   86,   87,   80,   90,   89,    0,   93,   81,
+       89,    0,    0,    0,   72,   91,   91,   91,   91,   82,
+       97,    0,   99,   83,   84,   85,  100,   86,   87,   90,
+      101,   89,   93,  102,  104,   89,   92,   92,   92,   92,
+
+      103,  106,  107,  108,  109,   97,   99,  111,  110,  113,
+      100,  110,  112,  115,  101,  114,  117,  124,  102,  104,
+      118,  112,  120,  121,  103,  106,  107,  108,  122,  109,
+      126,  111,  127,  113,  128,  130,  131,  112,  115,  114,
+      110,  117,  124,  132,  118,  112,  120,  121,  129,  134,
+      133,  129,  122,  135,  126,  137,  143,  127,  128,  130,
+      131,  142,  144,  146,  110,  145,  147,  150,  132,  151,
+      152,  156,  157,  134,  129,  133,  158,  135,  159,  160,
+      137,  143,  164,  161,  165,  142,  161,  144,  146,  145,
+      147,  150,  168,  151,  169,  152,  156,  157,  129,  170,
+
+      172,  158,  159,  160,  174,  175,  177,  164,  179,  165,
+      180,  182,  185,  183,  161,  185,  187,  168,  190,  169,
+        0,  191,  188,  170,  172,  188,  193,  194,  174,  175,
+      196,  177,  179,  203,  180,  204,  182,  183,  161,  206,
+      187,  185,  190,  200,  188,  191,  200,  201,  207,  209,
+      201,  193,  194,  210,  196,  208,  210,  214,  203,  204,
+      217,    0,  218,  217,  206,  185,  223,    0,  219,  188,
+      200,  219,  220,  207,  209,  220,    0,  201,    0,  208,
+      222,  214,    0,  222,  224,  210,  218,  224,    0,  225,
+        0,  223,  225,    0,  200,    0,    0,    0,    0,  220,
+
+        0,  201,    0,    0,    0,    0,    0,    0,    0,  210,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,    0,    0,    0,  217,  224,  224,    0,
-      224,  224,  224,  225,  225,  226,  226,  226,  227,  227,
-      227,  228,  228,    0,  228,  228,  228,  229,    0,    0,
-      229,  230,    0,    0,  230,  223,  223,  223,  223,  223,
-      223,  223,  223,  223,  223,  223,  223,  223,  223,  223,
-      223,  223,  223,  223,  223,  223,  223,  223,  223,  223,
-      223,  223,  223,  223,  223,  223,  223,  223,  223,  223,
-      223,  223,  223,  223,  223,  223,  223,  223,  223,  223,
-
-      223,  223,  223,  223,  223,  223,  223,  223,  223,  223,
-      223,  223,  223,  223,  223,  223,  223,  223,  223
+        0,    0,    0,  220,  227,  227,    0,  227,  227,  227,
+      228,  228,  229,  229,  229,  230,  230,  230,  231,  231,
+        0,  231,  231,  231,  232,    0,    0,  232,  233,    0,
+        0,  233,  226,  226,  226,  226,  226,  226,  226,  226,
+      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
+      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
+      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
+      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
+
+      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
+      226,  226,  226,  226,  226,  226
     } ;
 
 static yy_state_type yy_last_accepting_state;
@@ -718,7 +720,7 @@ static void countnl() {
 	g_lingo->_colnumber = strlen(p);
 }
 
-#line 722 "engines/director/lingo/lingo-lex.cpp"
+#line 724 "engines/director/lingo/lingo-lex.cpp"
 
 #define INITIAL 0
 
@@ -906,7 +908,7 @@ YY_DECL
 #line 69 "engines/director/lingo/lingo-lex.l"
 
 
-#line 910 "engines/director/lingo/lingo-lex.cpp"
+#line 912 "engines/director/lingo/lingo-lex.cpp"
 
 	if ( !(yy_init) )
 		{
@@ -960,13 +962,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 >= 224 )
+				if ( yy_current_state >= 227 )
 					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] != 556 );
+		while ( yy_base[yy_current_state] != 553 );
 
 yy_find_action:
 		yy_act = yy_accept[yy_current_state];
@@ -1028,69 +1030,69 @@ YY_RULE_SETUP
 case 8:
 YY_RULE_SETUP
 #line 80 "engines/director/lingo/lingo-lex.l"
-{ count(); return tCONTAINS; }
+{ count(); return tCHAR; }		// D3
 	YY_BREAK
 case 9:
 YY_RULE_SETUP
 #line 81 "engines/director/lingo/lingo-lex.l"
-{ count(); return tDONE; }
+{ count(); return tCONTAINS; }
 	YY_BREAK
 case 10:
 YY_RULE_SETUP
 #line 82 "engines/director/lingo/lingo-lex.l"
-{ count(); return tDOWN; }
+{ count(); return tDONE; }
 	YY_BREAK
 case 11:
 YY_RULE_SETUP
 #line 83 "engines/director/lingo/lingo-lex.l"
-{ count(); return tIF; }
+{ count(); return tDOWN; }
 	YY_BREAK
 case 12:
-/* rule 12 can match eol */
 YY_RULE_SETUP
 #line 84 "engines/director/lingo/lingo-lex.l"
-{ countnl(); return tNLELSIF; }
+{ count(); return tIF; }
 	YY_BREAK
 case 13:
 /* rule 13 can match eol */
 YY_RULE_SETUP
 #line 85 "engines/director/lingo/lingo-lex.l"
-{ countnl(); return tNLELSE; }
+{ countnl(); return tNLELSIF; }
 	YY_BREAK
 case 14:
+/* rule 14 can match eol */
 YY_RULE_SETUP
 #line 86 "engines/director/lingo/lingo-lex.l"
-{ count(); return tELSE; }
+{ countnl(); return tNLELSE; }
 	YY_BREAK
 case 15:
 YY_RULE_SETUP
 #line 87 "engines/director/lingo/lingo-lex.l"
-{ count(); return tEND; }
+{ count(); return tELSE; }
 	YY_BREAK
 case 16:
 YY_RULE_SETUP
 #line 88 "engines/director/lingo/lingo-lex.l"
-{ count(); return tFACTORY; }
+{ count(); return tEND; }
 	YY_BREAK
 case 17:
 YY_RULE_SETUP
 #line 89 "engines/director/lingo/lingo-lex.l"
-{ count(); return tEXIT; }
+{ count(); return tFACTORY; }
 	YY_BREAK
 case 18:
 YY_RULE_SETUP
 #line 90 "engines/director/lingo/lingo-lex.l"
-{ count(); return tFRAME; }
+{ count(); return tEXIT; }
 	YY_BREAK
 case 19:
 YY_RULE_SETUP
 #line 91 "engines/director/lingo/lingo-lex.l"
-{ count(); return tGLOBAL; }
+{ count(); return tFRAME; }
 	YY_BREAK
 case 20:
 YY_RULE_SETUP
 #line 92 "engines/director/lingo/lingo-lex.l"
-{ count(); return tGO; }
+{ count(); return tGLOBAL; }
 	YY_BREAK
 case 21:
 YY_RULE_SETUP
@@ -1100,111 +1102,116 @@ YY_RULE_SETUP
 case 22:
 YY_RULE_SETUP
 #line 94 "engines/director/lingo/lingo-lex.l"
-{ count(); return tINSTANCE; }
+{ count(); return tGO; }
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
 #line 95 "engines/director/lingo/lingo-lex.l"
-{ count(); return tINTERSECTS; }
+{ count(); return tINSTANCE; }
 	YY_BREAK
 case 24:
 YY_RULE_SETUP
 #line 96 "engines/director/lingo/lingo-lex.l"
-{ count(); return tINTO; }
+{ count(); return tINTERSECTS; }
 	YY_BREAK
 case 25:
 YY_RULE_SETUP
 #line 97 "engines/director/lingo/lingo-lex.l"
-{ count(); return tLOOP; }
+{ count(); return tINTO; }
 	YY_BREAK
 case 26:
 YY_RULE_SETUP
 #line 98 "engines/director/lingo/lingo-lex.l"
-{ count(); return tMACRO; }
+{ count(); return tLOOP; }
 	YY_BREAK
 case 27:
 YY_RULE_SETUP
 #line 99 "engines/director/lingo/lingo-lex.l"
-{ count(); return tMETHOD; }
+{ count(); return tMACRO; }
 	YY_BREAK
 case 28:
 YY_RULE_SETUP
 #line 100 "engines/director/lingo/lingo-lex.l"
-{ count(); return tMOD; }
+{ count(); return tMETHOD; }
 	YY_BREAK
 case 29:
 YY_RULE_SETUP
 #line 101 "engines/director/lingo/lingo-lex.l"
-{ count(); return tMOVIE; }
+{ count(); return tMOD; }
 	YY_BREAK
 case 30:
 YY_RULE_SETUP
 #line 102 "engines/director/lingo/lingo-lex.l"
-{ count(); return tNEXT; }
+{ count(); return tMOVIE; }
 	YY_BREAK
 case 31:
 YY_RULE_SETUP
 #line 103 "engines/director/lingo/lingo-lex.l"
-{ count(); return tNOT; }
+{ count(); return tNEXT; }
 	YY_BREAK
 case 32:
 YY_RULE_SETUP
 #line 104 "engines/director/lingo/lingo-lex.l"
-{ count(); return tOF; }
+{ count(); return tNOT; }
 	YY_BREAK
 case 33:
 YY_RULE_SETUP
 #line 105 "engines/director/lingo/lingo-lex.l"
-{ count(); return tON; }		// D3
+{ count(); return tOF; }
 	YY_BREAK
 case 34:
 YY_RULE_SETUP
 #line 106 "engines/director/lingo/lingo-lex.l"
-{ count(); return tOPEN; }
+{ count(); return tON; }		// D3
 	YY_BREAK
 case 35:
 YY_RULE_SETUP
 #line 107 "engines/director/lingo/lingo-lex.l"
-{ count(); return tOR; }
+{ count(); return tOPEN; }
 	YY_BREAK
 case 36:
 YY_RULE_SETUP
 #line 108 "engines/director/lingo/lingo-lex.l"
-{ count(); return tPLAY; }
+{ count(); return tOR; }
 	YY_BREAK
 case 37:
 YY_RULE_SETUP
 #line 109 "engines/director/lingo/lingo-lex.l"
-{ count(); return tPREVIOUS; }
+{ count(); return tPLAY; }
 	YY_BREAK
 case 38:
 YY_RULE_SETUP
 #line 110 "engines/director/lingo/lingo-lex.l"
-{ count(); return tPUT; }
+{ count(); return tPREVIOUS; }
 	YY_BREAK
 case 39:
 YY_RULE_SETUP
 #line 111 "engines/director/lingo/lingo-lex.l"
-{ count(); return tREPEAT; }
+{ count(); return tPUT; }
 	YY_BREAK
 case 40:
 YY_RULE_SETUP
 #line 112 "engines/director/lingo/lingo-lex.l"
-{ count(); return tSET; }
+{ count(); return tREPEAT; }
 	YY_BREAK
 case 41:
 YY_RULE_SETUP
 #line 113 "engines/director/lingo/lingo-lex.l"
-{ count(); return tSOUND; }		// D3
+{ count(); return tSET; }
 	YY_BREAK
 case 42:
 YY_RULE_SETUP
 #line 114 "engines/director/lingo/lingo-lex.l"
-{ count(); return tSTARTS; }
+{ count(); return tSOUND; }		// D3
 	YY_BREAK
 case 43:
 YY_RULE_SETUP
 #line 115 "engines/director/lingo/lingo-lex.l"
+{ count(); return tSTARTS; }
+	YY_BREAK
+case 44:
+YY_RULE_SETUP
+#line 116 "engines/director/lingo/lingo-lex.l"
 {
 		count();
 
@@ -1214,9 +1221,9 @@ YY_RULE_SETUP
 		return THEENTITYWITHID;
 	}
 	YY_BREAK
-case 44:
+case 45:
 YY_RULE_SETUP
-#line 123 "engines/director/lingo/lingo-lex.l"
+#line 124 "engines/director/lingo/lingo-lex.l"
 {
 		count();
 
@@ -1258,9 +1265,9 @@ YY_RULE_SETUP
 		warning("Unhandled the entity %s", ptr);
 	}
 	YY_BREAK
-case 45:
+case 46:
 YY_RULE_SETUP
-#line 163 "engines/director/lingo/lingo-lex.l"
+#line 164 "engines/director/lingo/lingo-lex.l"
 {
 		count();
 
@@ -1281,64 +1288,64 @@ YY_RULE_SETUP
 		warning("Unhandled the entity %s", ptr);
 	}
 	YY_BREAK
-case 46:
-YY_RULE_SETUP
-#line 182 "engines/director/lingo/lingo-lex.l"
-{ count(); return tTHEN; }
-	YY_BREAK
 case 47:
 YY_RULE_SETUP
 #line 183 "engines/director/lingo/lingo-lex.l"
-{ count(); return tTO; }
+{ count(); return tTHEN; }
 	YY_BREAK
 case 48:
 YY_RULE_SETUP
 #line 184 "engines/director/lingo/lingo-lex.l"
-{ count(); return tSPRITE; }
+{ count(); return tTO; }
 	YY_BREAK
 case 49:
 YY_RULE_SETUP
 #line 185 "engines/director/lingo/lingo-lex.l"
-{ count(); return tWITH; }
+{ count(); return tSPRITE; }
 	YY_BREAK
 case 50:
 YY_RULE_SETUP
 #line 186 "engines/director/lingo/lingo-lex.l"
-{ count(); return tWITHIN; }
+{ count(); return tWITH; }
 	YY_BREAK
 case 51:
 YY_RULE_SETUP
 #line 187 "engines/director/lingo/lingo-lex.l"
-{ count(); return tWHEN; }
+{ count(); return tWITHIN; }
 	YY_BREAK
 case 52:
 YY_RULE_SETUP
 #line 188 "engines/director/lingo/lingo-lex.l"
-{ count(); return tWHILE; }
+{ count(); return tWHEN; }
 	YY_BREAK
 case 53:
 YY_RULE_SETUP
-#line 190 "engines/director/lingo/lingo-lex.l"
-{ count(); return tNEQ; }
+#line 189 "engines/director/lingo/lingo-lex.l"
+{ count(); return tWHILE; }
 	YY_BREAK
 case 54:
 YY_RULE_SETUP
 #line 191 "engines/director/lingo/lingo-lex.l"
-{ count(); return tGE; }
+{ count(); return tNEQ; }
 	YY_BREAK
 case 55:
 YY_RULE_SETUP
 #line 192 "engines/director/lingo/lingo-lex.l"
-{ count(); return tLE; }
+{ count(); return tGE; }
 	YY_BREAK
 case 56:
 YY_RULE_SETUP
 #line 193 "engines/director/lingo/lingo-lex.l"
-{ count(); return tCONCAT; }
+{ count(); return tLE; }
 	YY_BREAK
 case 57:
 YY_RULE_SETUP
-#line 195 "engines/director/lingo/lingo-lex.l"
+#line 194 "engines/director/lingo/lingo-lex.l"
+{ count(); return tCONCAT; }
+	YY_BREAK
+case 58:
+YY_RULE_SETUP
+#line 196 "engines/director/lingo/lingo-lex.l"
 {
 		count();
 		yylval.s = new Common::String(yytext);
@@ -1369,43 +1376,43 @@ YY_RULE_SETUP
 		return ID;
 	}
 	YY_BREAK
-case 58:
-YY_RULE_SETUP
-#line 224 "engines/director/lingo/lingo-lex.l"
-{ count(); yylval.f = atof(yytext); return FLOAT; }
-	YY_BREAK
 case 59:
 YY_RULE_SETUP
 #line 225 "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 60:
 YY_RULE_SETUP
 #line 226 "engines/director/lingo/lingo-lex.l"
-{ count(); return *yytext; }
+{ count(); yylval.i = strtol(yytext, NULL, 10); return INT; }
 	YY_BREAK
 case 61:
-/* rule 61 can match eol */
 YY_RULE_SETUP
 #line 227 "engines/director/lingo/lingo-lex.l"
-{ return '\n'; }
+{ count(); return *yytext; }
 	YY_BREAK
 case 62:
+/* rule 62 can match eol */
 YY_RULE_SETUP
 #line 228 "engines/director/lingo/lingo-lex.l"
-{ count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return STRING; }
+{ return '\n'; }
 	YY_BREAK
 case 63:
 YY_RULE_SETUP
 #line 229 "engines/director/lingo/lingo-lex.l"
-
+{ count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return STRING; }
 	YY_BREAK
 case 64:
 YY_RULE_SETUP
-#line 231 "engines/director/lingo/lingo-lex.l"
+#line 230 "engines/director/lingo/lingo-lex.l"
+
+	YY_BREAK
+case 65:
+YY_RULE_SETUP
+#line 232 "engines/director/lingo/lingo-lex.l"
 ECHO;
 	YY_BREAK
-#line 1409 "engines/director/lingo/lingo-lex.cpp"
+#line 1416 "engines/director/lingo/lingo-lex.cpp"
 case YY_STATE_EOF(INITIAL):
 	yyterminate();
 
@@ -1698,7 +1705,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 >= 224 )
+			if ( yy_current_state >= 227 )
 				yy_c = yy_meta[(unsigned int) yy_c];
 			}
 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1726,11 +1733,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 >= 224 )
+		if ( yy_current_state >= 227 )
 			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 == 223);
+	yy_is_jam = (yy_current_state == 226);
 
 	return yy_is_jam ? 0 : yy_current_state;
 }
@@ -2405,7 +2412,7 @@ void yyfree (void * ptr )
 
 #define YYTABLES_NAME "yytables"
 
-#line 231 "engines/director/lingo/lingo-lex.l"
+#line 232 "engines/director/lingo/lingo-lex.l"
 
 
 
diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l
index 56317d1..2c6f079 100644
--- a/engines/director/lingo/lingo-lex.l
+++ b/engines/director/lingo/lingo-lex.l
@@ -77,6 +77,7 @@ whitespace [\t ]
 (?i:after)			{ count(); return tAFTER; }		// D3
 (?i:and)			{ count(); return tAND; }
 (?i:before)			{ count(); return tBEFORE; }	// D3
+(?i:char)			{ count(); return tCHAR; }		// D3
 (?i:contains)		{ count(); return tCONTAINS; }
 (?i:done)			{ count(); return tDONE; }
 (?i:down)			{ count(); return tDOWN; }
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index 89632ef..d51a5f0 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -249,6 +249,8 @@ public:
 
 	static void c_intersects();
 	static void c_within();
+	static void c_charOf();
+	static void c_charToOf();
 
 	static void c_constpush();
 	static void c_voidpush();


Commit: 677dd99bdb564b86c93657fb0e8c3cf1cd5f612d
    https://github.com/scummvm/scummvm/commit/677dd99bdb564b86c93657fb0e8c3cf1cd5f612d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2017-01-10T01:02:56+01:00

Commit Message:
DIRECTOR: Lingo: Added stubs for D3 Text-related syntax

Changed paths:
    engines/director/lingo/lingo-builtins.cpp
    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-the.cpp
    engines/director/lingo/lingo-the.h
    engines/director/lingo/lingo.h


diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index 30936c6..52f840d 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -48,6 +48,8 @@ static struct BuiltinProto {
 	// String
 	{ "chars",			Lingo::b_chars,			3, 3, true },	// D2
 	{ "charToNum",		Lingo::b_charToNum,		1, 1, true },	// D2
+	{ "delete",			Lingo::b_delete,		1, 1, true },	//		D3
+	{ "hilite",			Lingo::b_hilite,		1, 1, true },	//		D3
 	{ "length",			Lingo::b_length,		1, 1, true },	// D2
 	{ "numToChar",		Lingo::b_numToChar,		1, 1, true },	// D2
 	{ "offset",			Lingo::b_offset,		2, 2, true },	// D2
@@ -353,6 +355,26 @@ void Lingo::b_charToNum(int nargs) {
 	g_lingo->push(d);
 }
 
+void Lingo::b_delete(int nargs) {
+	Datum d = g_lingo->pop();
+
+	d.toInt();
+
+	warning("STUB: b_delete");
+
+	g_lingo->push(Datum((char)d.u.i));
+}
+
+void Lingo::b_hilite(int nargs) {
+	Datum d = g_lingo->pop();
+
+	d.toInt();
+
+	warning("STUB: b_hilite");
+
+	g_lingo->push(Datum((char)d.u.i));
+}
+
 void Lingo::b_length(int nargs) {
 	Datum d = g_lingo->pop();
 
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp
index 4f4a2b3..675f7ef 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -83,6 +83,12 @@ static struct FuncDescr {
 	{ Lingo::c_within,		"c_within",		"" },
 	{ Lingo::c_charOf,		"c_charOf",		"" },	// D3
 	{ Lingo::c_charToOf,	"c_charToOf",	"" },	// D3
+	{ Lingo::c_itemOf,		"c_itemOf",		"" },	// D3
+	{ Lingo::c_itemToOf,	"c_itemToOf",	"" },	// D3
+	{ Lingo::c_lineOf,		"c_lineOf",		"" },	// D3
+	{ Lingo::c_lineToOf,	"c_lineToOf",	"" },	// D3
+	{ Lingo::c_wordOf,		"c_wordOf",		"" },	// D3
+	{ Lingo::c_wordToOf,	"c_wordToOf",	"" },	// D3
 	{ Lingo::c_and,			"c_and",		"" },
 	{ Lingo::c_or,			"c_or",			"" },
 	{ Lingo::c_not,			"c_not",		"" },
@@ -606,6 +612,63 @@ void Lingo::c_charToOf() {
 	g_lingo->push(d1);
 }
 
+void Lingo::c_itemOf() {
+	Datum d2 = g_lingo->pop();
+	Datum d1 = g_lingo->pop();
+
+	warning("STUB: c_itemOf: %d %d", d1.u.i, d2.u.i);
+
+	g_lingo->push(d1);
+}
+
+void Lingo::c_itemToOf() {
+	Datum d3 = g_lingo->pop();
+	Datum d2 = g_lingo->pop();
+	Datum d1 = g_lingo->pop();
+
+	warning("STUB: c_itemToOf: %d %d %d", d1.u.i, d2.u.i, d3.u.i);
+
+	g_lingo->push(d1);
+}
+
+void Lingo::c_lineOf() {
+	Datum d2 = g_lingo->pop();
+	Datum d1 = g_lingo->pop();
+
+	warning("STUB: c_lineOf: %d %d", d1.u.i, d2.u.i);
+
+	g_lingo->push(d1);
+}
+
+void Lingo::c_lineToOf() {
+	Datum d3 = g_lingo->pop();
+	Datum d2 = g_lingo->pop();
+	Datum d1 = g_lingo->pop();
+
+	warning("STUB: c_lineToOf: %d %d %d", d1.u.i, d2.u.i, d3.u.i);
+
+	g_lingo->push(d1);
+}
+
+void Lingo::c_wordOf() {
+	Datum d2 = g_lingo->pop();
+	Datum d1 = g_lingo->pop();
+
+	warning("STUB: c_wordOf: %d %d", d1.u.i, d2.u.i);
+
+	g_lingo->push(d1);
+}
+
+void Lingo::c_wordToOf() {
+	Datum d3 = g_lingo->pop();
+	Datum d2 = g_lingo->pop();
+	Datum d1 = g_lingo->pop();
+
+	warning("STUB: c_wordToOf: %d %d %d", d1.u.i, d2.u.i, d3.u.i);
+
+	g_lingo->push(d1);
+}
+
 void Lingo::c_and() {
 	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 d5c5779..138686c 100644
--- a/engines/director/lingo/lingo-gr.cpp
+++ b/engines/director/lingo/lingo-gr.cpp
@@ -135,11 +135,14 @@
      tCONTAINS = 324,
      tSTARTS = 325,
      tCHAR = 326,
-     tSPRITE = 327,
-     tINTERSECTS = 328,
-     tWITHIN = 329,
-     tON = 330,
-     tSOUND = 331
+     tITEM = 327,
+     tLINE = 328,
+     tWORD = 329,
+     tSPRITE = 330,
+     tINTERSECTS = 331,
+     tWITHIN = 332,
+     tON = 333,
+     tSOUND = 334
    };
 #endif
 /* Tokens.  */
@@ -212,11 +215,14 @@
 #define tCONTAINS 324
 #define tSTARTS 325
 #define tCHAR 326
-#define tSPRITE 327
-#define tINTERSECTS 328
-#define tWITHIN 329
-#define tON 330
-#define tSOUND 331
+#define tITEM 327
+#define tLINE 328
+#define tWORD 329
+#define tSPRITE 330
+#define tINTERSECTS 331
+#define tWITHIN 332
+#define tON 333
+#define tSOUND 334
 
 
 
@@ -274,7 +280,7 @@ typedef union YYSTYPE
 	Common::Array<double> *arr;
 }
 /* Line 193 of yacc.c.  */
-#line 278 "engines/director/lingo/lingo-gr.cpp"
+#line 284 "engines/director/lingo/lingo-gr.cpp"
 	YYSTYPE;
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
@@ -287,7 +293,7 @@ typedef union YYSTYPE
 
 
 /* Line 216 of yacc.c.  */
-#line 291 "engines/director/lingo/lingo-gr.cpp"
+#line 297 "engines/director/lingo/lingo-gr.cpp"
 
 #ifdef short
 # undef short
@@ -500,22 +506,22 @@ union yyalloc
 #endif
 
 /* YYFINAL -- State number of the termination state.  */
-#define YYFINAL  99
+#define YYFINAL  105
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   1191
+#define YYLAST   1550
 
 /* YYNTOKENS -- Number of terminals.  */
-#define YYNTOKENS  90
+#define YYNTOKENS  93
 /* YYNNTS -- Number of nonterminals.  */
 #define YYNNTS  39
 /* YYNRULES -- Number of rules.  */
-#define YYNRULES  140
+#define YYNRULES  146
 /* YYNRULES -- Number of states.  */
-#define YYNSTATES  297
+#define YYNSTATES  321
 
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 #define YYUNDEFTOK  2
-#define YYMAXUTOK   331
+#define YYMAXUTOK   334
 
 #define YYTRANSLATE(YYX)						\
   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -524,12 +530,12 @@ union yyalloc
 static const yytype_uint8 yytranslate[] =
 {
        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-      84,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+      87,     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,    83,    78,     2,
-      85,    86,    81,    79,    89,    80,     2,    82,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,    86,    81,     2,
+      88,    89,    84,    82,    92,    83,     2,    85,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-      88,    77,    87,     2,     2,     2,     2,     2,     2,     2,
+      91,    80,    90,     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,
@@ -556,7 +562,7 @@ static const yytype_uint8 yytranslate[] =
       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,    70,    71,    72,    73,    74,
-      75,    76
+      75,    76,    77,    78,    79
 };
 
 #if YYDEBUG
@@ -573,70 +579,74 @@ static const yytype_uint16 yyprhs[] =
      250,   252,   254,   259,   261,   263,   266,   268,   272,   276,
      280,   284,   288,   292,   296,   300,   304,   308,   312,   316,
      319,   323,   327,   331,   335,   339,   342,   345,   349,   354,
-     359,   364,   371,   374,   376,   378,   381,   383,   386,   389,
-     392,   395,   397,   400,   405,   408,   412,   414,   418,   420,
-     424,   427,   430,   433,   436,   440,   443,   446,   448,   452,
-     455,   458,   461,   465,   468,   469,   478,   481,   482,   491,
-     492,   493,   504,   505,   507,   511,   516,   517,   521,   522,
-     524
+     359,   364,   371,   376,   383,   388,   395,   400,   407,   410,
+     412,   414,   417,   419,   422,   425,   428,   431,   433,   436,
+     441,   444,   448,   450,   454,   456,   460,   463,   466,   469,
+     472,   476,   479,   482,   484,   488,   491,   494,   497,   501,
+     504,   505,   514,   517,   518,   527,   528,   529,   540,   541,
+     543,   547,   552,   553,   557,   558,   560
 };
 
 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
 static const yytype_int16 yyrhs[] =
 {
-      91,     0,    -1,    91,    92,    93,    -1,    93,    -1,     1,
-      92,    -1,    84,    -1,    -1,   120,    -1,   113,    -1,   127,
-      -1,    94,    -1,    96,    -1,    40,   112,    33,    20,    -1,
-      40,   112,    66,   112,    -1,    40,   112,    67,   112,    -1,
-      42,    20,    77,   112,    -1,    42,    12,    77,   112,    -1,
-      42,    13,   112,    77,   112,    -1,    42,    20,    44,   112,
-      -1,    42,    12,    44,   112,    -1,    42,    13,   112,    44,
-     112,    -1,   112,    -1,   113,    -1,    95,    -1,    97,    -1,
-     104,    85,   103,    86,   110,   109,    27,    41,    -1,   105,
-      77,   112,   109,    44,   112,   109,   110,   109,    27,    41,
-      -1,   105,    77,   112,   109,    24,    44,   112,   109,   110,
-     109,    27,    41,    -1,   111,   112,   109,    -1,   106,   103,
-      43,    92,   110,   109,    27,    32,    -1,   106,   103,    43,
-      92,   110,   109,    48,   110,   109,    27,    32,    -1,   106,
-     103,    43,    92,   110,   109,   108,    99,   109,    27,    32,
-      -1,   106,   103,    43,   108,    95,   109,    -1,   106,   103,
-      43,   108,    95,   109,    48,   108,    95,   109,    -1,   106,
-     103,    43,   108,    95,   109,   100,   109,    98,   109,    -1,
-      -1,    48,   108,    95,    -1,    99,   102,    -1,   102,    -1,
-     100,   101,    -1,   101,    -1,   107,   103,    43,   108,    96,
-     109,    -1,   100,    -1,   107,   103,    43,   110,   109,    -1,
-     112,    -1,   112,    77,   112,    -1,    85,   103,    86,    -1,
+      94,     0,    -1,    94,    95,    96,    -1,    96,    -1,     1,
+      95,    -1,    87,    -1,    -1,   123,    -1,   116,    -1,   130,
+      -1,    97,    -1,    99,    -1,    40,   115,    33,    20,    -1,
+      40,   115,    66,   115,    -1,    40,   115,    67,   115,    -1,
+      42,    20,    80,   115,    -1,    42,    12,    80,   115,    -1,
+      42,    13,   115,    80,   115,    -1,    42,    20,    44,   115,
+      -1,    42,    12,    44,   115,    -1,    42,    13,   115,    44,
+     115,    -1,   115,    -1,   116,    -1,    98,    -1,   100,    -1,
+     107,    88,   106,    89,   113,   112,    27,    41,    -1,   108,
+      80,   115,   112,    44,   115,   112,   113,   112,    27,    41,
+      -1,   108,    80,   115,   112,    24,    44,   115,   112,   113,
+     112,    27,    41,    -1,   114,   115,   112,    -1,   109,   106,
+      43,    95,   113,   112,    27,    32,    -1,   109,   106,    43,
+      95,   113,   112,    48,   113,   112,    27,    32,    -1,   109,
+     106,    43,    95,   113,   112,   111,   102,   112,    27,    32,
+      -1,   109,   106,    43,   111,    98,   112,    -1,   109,   106,
+      43,   111,    98,   112,    48,   111,    98,   112,    -1,   109,
+     106,    43,   111,    98,   112,   103,   112,   101,   112,    -1,
+      -1,    48,   111,    98,    -1,   102,   105,    -1,   105,    -1,
+     103,   104,    -1,   104,    -1,   110,   106,    43,   111,    99,
+     112,    -1,   103,    -1,   110,   106,    43,   113,   112,    -1,
+     115,    -1,   115,    80,   115,    -1,    88,   106,    89,    -1,
       41,    47,    -1,    41,    46,    20,    -1,    32,    -1,    26,
-      -1,    -1,    -1,    -1,   110,    92,    -1,   110,    96,    -1,
+      -1,    -1,    -1,    -1,   113,    95,    -1,   113,    99,    -1,
       45,    20,    43,    -1,    11,    -1,    14,    -1,    23,    -1,
-      21,    -1,    16,    -1,    20,    85,   128,    86,    -1,    20,
-      -1,    12,    -1,    13,   112,    -1,    94,    -1,   112,    79,
-     112,    -1,   112,    80,   112,    -1,   112,    81,   112,    -1,
-     112,    82,   112,    -1,   112,    65,   112,    -1,   112,    87,
-     112,    -1,   112,    88,   112,    -1,   112,    61,   112,    -1,
-     112,    56,   112,    -1,   112,    57,   112,    -1,   112,    62,
-     112,    -1,   112,    63,   112,    -1,    64,   112,    -1,   112,
-      78,   112,    -1,   112,    66,   112,    -1,   112,    68,   112,
-      -1,   112,    69,   112,    -1,   112,    70,   112,    -1,    79,
-     112,    -1,    80,   112,    -1,    85,   112,    86,    -1,    72,
-     112,    73,   112,    -1,    72,   112,    74,   112,    -1,    71,
-     112,    38,   112,    -1,    71,   112,    44,   112,    38,   112,
-      -1,    40,   112,    -1,   116,    -1,   119,    -1,    28,    41,
-      -1,    28,    -1,    30,   114,    -1,    55,   115,    -1,    18,
-     112,    -1,    17,   112,    -1,    17,    -1,    19,   128,    -1,
-      51,   112,    46,   112,    -1,    51,   112,    -1,    76,    20,
-     128,    -1,    20,    -1,   114,    89,    20,    -1,    20,    -1,
-     115,    89,    20,    -1,    31,    34,    -1,    31,    37,    -1,
-      31,    39,    -1,    31,   117,    -1,    31,   117,   118,    -1,
-      31,   118,    -1,    29,   112,    -1,   112,    -1,    38,    36,
-     112,    -1,    36,   112,    -1,    52,    53,    -1,    52,   117,
-      -1,    52,   117,   118,    -1,    52,   118,    -1,    -1,    35,
-      20,   121,   108,   125,    92,   126,   110,    -1,    49,    20,
-      -1,    -1,    50,    20,   122,   108,   125,    92,   126,   110,
-      -1,    -1,    -1,    75,    20,   123,   108,   124,   125,    92,
-     126,   110,    27,    -1,    -1,    20,    -1,   125,    89,    20,
-      -1,   125,    92,    89,    20,    -1,    -1,    20,   108,   128,
-      -1,    -1,   112,    -1,   128,    89,   112,    -1
+      21,    -1,    16,    -1,    20,    88,   131,    89,    -1,    20,
+      -1,    12,    -1,    13,   115,    -1,    97,    -1,   115,    82,
+     115,    -1,   115,    83,   115,    -1,   115,    84,   115,    -1,
+     115,    85,   115,    -1,   115,    65,   115,    -1,   115,    90,
+     115,    -1,   115,    91,   115,    -1,   115,    61,   115,    -1,
+     115,    56,   115,    -1,   115,    57,   115,    -1,   115,    62,
+     115,    -1,   115,    63,   115,    -1,    64,   115,    -1,   115,
+      81,   115,    -1,   115,    66,   115,    -1,   115,    68,   115,
+      -1,   115,    69,   115,    -1,   115,    70,   115,    -1,    82,
+     115,    -1,    83,   115,    -1,    88,   115,    89,    -1,    75,
+     115,    76,   115,    -1,    75,   115,    77,   115,    -1,    71,
+     115,    38,   115,    -1,    71,   115,    44,   115,    38,   115,
+      -1,    72,   115,    38,   115,    -1,    72,   115,    44,   115,
+      38,   115,    -1,    73,   115,    38,   115,    -1,    73,   115,
+      44,   115,    38,   115,    -1,    74,   115,    38,   115,    -1,
+      74,   115,    44,   115,    38,   115,    -1,    40,   115,    -1,
+     119,    -1,   122,    -1,    28,    41,    -1,    28,    -1,    30,
+     117,    -1,    55,   118,    -1,    18,   115,    -1,    17,   115,
+      -1,    17,    -1,    19,   131,    -1,    51,   115,    46,   115,
+      -1,    51,   115,    -1,    79,    20,   131,    -1,    20,    -1,
+     117,    92,    20,    -1,    20,    -1,   118,    92,    20,    -1,
+      31,    34,    -1,    31,    37,    -1,    31,    39,    -1,    31,
+     120,    -1,    31,   120,   121,    -1,    31,   121,    -1,    29,
+     115,    -1,   115,    -1,    38,    36,   115,    -1,    36,   115,
+      -1,    52,    53,    -1,    52,   120,    -1,    52,   120,   121,
+      -1,    52,   121,    -1,    -1,    35,    20,   124,   111,   128,
+      95,   129,   113,    -1,    49,    20,    -1,    -1,    50,    20,
+     125,   111,   128,    95,   129,   113,    -1,    -1,    -1,    78,
+      20,   126,   111,   127,   128,    95,   129,   113,    27,    -1,
+      -1,    20,    -1,   128,    92,    20,    -1,   128,    95,    92,
+      20,    -1,    -1,    20,   111,   131,    -1,    -1,   115,    -1,
+     131,    92,   115,    -1
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
@@ -651,12 +661,12 @@ static const yytype_uint16 yyrline[] =
      365,   368,   371,   374,   378,   385,   391,   392,   393,   394,
      395,   396,   397,   398,   399,   400,   401,   402,   403,   404,
      405,   406,   407,   408,   409,   410,   411,   412,   413,   414,
-     415,   416,   419,   420,   421,   422,   423,   425,   426,   427,
-     430,   433,   436,   437,   438,   439,   442,   443,   446,   447,
-     458,   459,   460,   461,   464,   467,   472,   473,   476,   477,
-     480,   481,   484,   487,   517,   517,   523,   526,   526,   531,
-     532,   531,   544,   545,   546,   547,   549,   553,   561,   562,
-     563
+     415,   416,   417,   418,   419,   420,   421,   422,   425,   426,
+     427,   428,   429,   431,   432,   433,   436,   439,   442,   443,
+     444,   445,   448,   449,   452,   453,   464,   465,   466,   467,
+     470,   473,   478,   479,   482,   483,   486,   487,   490,   493,
+     523,   523,   529,   532,   532,   537,   538,   537,   550,   551,
+     552,   553,   555,   559,   567,   568,   569
 };
 #endif
 
@@ -675,11 +685,11 @@ static const char *const yytname[] =
   "tWHILE", "tNLELSE", "tFACTORY", "tMETHOD", "tOPEN", "tPLAY", "tDONE",
   "tPLAYACCEL", "tINSTANCE", "tGE", "tLE", "tGT", "tLT", "tEQ", "tNEQ",
   "tAND", "tOR", "tNOT", "tMOD", "tAFTER", "tBEFORE", "tCONCAT",
-  "tCONTAINS", "tSTARTS", "tCHAR", "tSPRITE", "tINTERSECTS", "tWITHIN",
-  "tON", "tSOUND", "'='", "'&'", "'+'", "'-'", "'*'", "'/'", "'%'",
-  "'\\n'", "'('", "')'", "'>'", "'<'", "','", "$accept", "program", "nl",
-  "programline", "asgn", "stmtoneliner", "stmt", "ifstmt",
-  "elsestmtoneliner", "elseifstmt", "elseifstmtoneliner",
+  "tCONTAINS", "tSTARTS", "tCHAR", "tITEM", "tLINE", "tWORD", "tSPRITE",
+  "tINTERSECTS", "tWITHIN", "tON", "tSOUND", "'='", "'&'", "'+'", "'-'",
+  "'*'", "'/'", "'%'", "'\\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", "instancelist", "gotofunc", "gotoframe",
@@ -700,29 +710,30 @@ 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,
-     325,   326,   327,   328,   329,   330,   331,    61,    38,    43,
-      45,    42,    47,    37,    10,    40,    41,    62,    60,    44
+     325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
+      61,    38,    43,    45,    42,    47,    37,    10,    40,    41,
+      62,    60,    44
 };
 # endif
 
 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
 static const yytype_uint8 yyr1[] =
 {
-       0,    90,    91,    91,    91,    92,    93,    93,    93,    93,
-      93,    93,    94,    94,    94,    94,    94,    94,    94,    94,
-      94,    95,    95,    96,    96,    96,    96,    96,    96,    97,
-      97,    97,    97,    97,    97,    98,    98,    99,    99,   100,
-     100,   101,   102,   102,   103,   103,   103,   104,   105,   106,
-     107,   108,   109,   110,   110,   110,   111,   112,   112,   112,
-     112,   112,   112,   112,   112,   112,   112,   112,   112,   112,
-     112,   112,   112,   112,   112,   112,   112,   112,   112,   112,
-     112,   112,   112,   112,   112,   112,   112,   112,   112,   112,
-     112,   112,   113,   113,   113,   113,   113,   113,   113,   113,
-     113,   113,   113,   113,   113,   113,   114,   114,   115,   115,
-     116,   116,   116,   116,   116,   116,   117,   117,   118,   118,
-     119,   119,   119,   119,   121,   120,   120,   122,   120,   123,
-     124,   120,   125,   125,   125,   125,   126,   127,   128,   128,
-     128
+       0,    93,    94,    94,    94,    95,    96,    96,    96,    96,
+      96,    96,    97,    97,    97,    97,    97,    97,    97,    97,
+      97,    98,    98,    99,    99,    99,    99,    99,    99,   100,
+     100,   100,   100,   100,   100,   101,   101,   102,   102,   103,
+     103,   104,   105,   105,   106,   106,   106,   107,   108,   109,
+     110,   111,   112,   113,   113,   113,   114,   115,   115,   115,
+     115,   115,   115,   115,   115,   115,   115,   115,   115,   115,
+     115,   115,   115,   115,   115,   115,   115,   115,   115,   115,
+     115,   115,   115,   115,   115,   115,   115,   115,   115,   115,
+     115,   115,   115,   115,   115,   115,   115,   115,   116,   116,
+     116,   116,   116,   116,   116,   116,   116,   116,   116,   116,
+     116,   116,   117,   117,   118,   118,   119,   119,   119,   119,
+     119,   119,   120,   120,   121,   121,   122,   122,   122,   122,
+     124,   123,   123,   125,   123,   126,   127,   123,   128,   128,
+     128,   128,   129,   130,   131,   131,   131
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
@@ -737,12 +748,12 @@ static const yytype_uint8 yyr2[] =
        1,     1,     4,     1,     1,     2,     1,     3,     3,     3,
        3,     3,     3,     3,     3,     3,     3,     3,     3,     2,
        3,     3,     3,     3,     3,     2,     2,     3,     4,     4,
-       4,     6,     2,     1,     1,     2,     1,     2,     2,     2,
-       2,     1,     2,     4,     2,     3,     1,     3,     1,     3,
-       2,     2,     2,     2,     3,     2,     2,     1,     3,     2,
-       2,     2,     3,     2,     0,     8,     2,     0,     8,     0,
-       0,    10,     0,     1,     3,     4,     0,     3,     0,     1,
-       3
+       4,     6,     4,     6,     4,     6,     4,     6,     2,     1,
+       1,     2,     1,     2,     2,     2,     2,     1,     2,     4,
+       2,     3,     1,     3,     1,     3,     2,     2,     2,     2,
+       3,     2,     2,     1,     3,     2,     2,     2,     3,     2,
+       0,     8,     2,     0,     8,     0,     0,    10,     0,     1,
+       3,     4,     0,     3,     0,     1,     3
 };
 
 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -750,91 +761,97 @@ static const yytype_uint8 yyr2[] =
    means the default is an error.  */
 static const yytype_uint8 yydefact[] =
 {
-       0,     0,    57,    64,     0,    58,    61,   101,     0,   138,
-      51,    60,    59,    96,     0,     0,    49,     0,     0,     0,
+       0,     0,    57,    64,     0,    58,    61,   107,     0,   144,
+      51,    60,    59,   102,     0,     0,    49,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     3,    66,    23,    11,
-      24,     0,     0,     0,     0,    21,     8,    93,    94,     7,
-       9,     5,     4,    63,     0,    66,    65,   100,    99,   139,
-     102,   138,   138,    95,   106,    97,     0,   110,     0,   111,
-       0,   112,   117,   113,   115,   124,    92,     0,    47,     0,
-       0,     0,     0,   126,   127,   104,   120,   121,   123,   108,
-      98,    79,     0,     0,   129,   138,    85,    86,     0,     1,
-       6,     0,     0,     0,     0,    44,    52,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     3,
+      66,    23,    11,    24,     0,     0,     0,     0,    21,     8,
+      99,   100,     7,     9,     5,     4,    63,     0,    66,    65,
+     106,   105,   145,   108,   144,   144,   101,   112,   103,     0,
+     116,     0,   117,     0,   118,   123,   119,   121,   130,    98,
+       0,    47,     0,     0,     0,     0,   132,   133,   110,   126,
+     127,   129,   114,   104,    79,     0,     0,     0,     0,     0,
+     135,   144,    85,    86,     0,     1,     6,     0,     0,     0,
+       0,    44,    52,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,   137,     0,   116,
-     119,     0,   114,    51,     0,     0,     0,    48,     0,     0,
-       0,     0,     0,    56,    51,     0,   122,     0,     0,     0,
-       0,     0,    51,   105,    87,     2,     0,    52,     0,     0,
-      51,     0,    28,    75,    76,    74,    77,    78,    71,    81,
-      82,    83,    84,    80,    67,    68,    69,    70,    72,    73,
-     140,    62,   107,   118,   132,    12,    13,    14,    19,    16,
-       0,     0,    18,    15,   132,   103,   109,    90,     0,    88,
-      89,   130,    53,     0,    46,    53,     0,    45,   133,     0,
-      20,    17,     0,     0,   132,    52,     0,     0,    52,    52,
-      22,     0,   136,   136,    91,     0,    54,    55,     0,     0,
-      52,    51,    32,   134,     0,    53,    53,   136,     0,    52,
-      53,     0,    53,     0,    50,    51,    52,    40,     0,   135,
-     125,   128,    53,    25,    53,    52,    29,    52,    52,    42,
-      38,     0,     0,    39,    35,     0,     0,    52,     0,     0,
-      37,     0,     0,    52,    51,    52,    51,   131,     0,     0,
-       0,     0,    51,    33,     0,    34,     0,     0,    26,    30,
-      31,    52,    36,    52,    27,    43,    41
+       0,     0,     0,   143,     0,   122,   125,     0,   120,    51,
+       0,     0,     0,    48,     0,     0,     0,     0,     0,    56,
+      51,     0,   128,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,    51,   111,    87,     2,     0,    52,
+       0,     0,    51,     0,    28,    75,    76,    74,    77,    78,
+      71,    81,    82,    83,    84,    80,    67,    68,    69,    70,
+      72,    73,   146,    62,   113,   124,   138,    12,    13,    14,
+      19,    16,     0,     0,    18,    15,   138,   109,   115,    90,
+       0,    92,     0,    94,     0,    96,     0,    88,    89,   136,
+      53,     0,    46,    53,     0,    45,   139,     0,    20,    17,
+       0,     0,     0,     0,     0,   138,    52,     0,     0,    52,
+      52,    22,     0,   142,   142,    91,    93,    95,    97,     0,
+      54,    55,     0,     0,    52,    51,    32,   140,     0,    53,
+      53,   142,     0,    52,    53,     0,    53,     0,    50,    51,
+      52,    40,     0,   141,   131,   134,    53,    25,    53,    52,
+      29,    52,    52,    42,    38,     0,     0,    39,    35,     0,
+       0,    52,     0,     0,    37,     0,     0,    52,    51,    52,
+      51,   137,     0,     0,     0,     0,    51,    33,     0,    34,
+       0,     0,    26,    30,    31,    52,    36,    52,    27,    43,
+      41
 };
 
 /* YYDEFGOTO[NTERM-NUM].  */
 static const yytype_int16 yydefgoto[] =
 {
-      -1,    35,   226,    36,    55,    38,   227,    40,   275,   258,
-     259,   247,   260,   104,    41,    42,    43,   248,   286,   162,
-     215,    44,    45,   220,    65,    90,    47,    73,    74,    48,
-      49,   133,   144,   152,   214,   209,   235,    50,    60
+      -1,    38,   250,    39,    58,    41,   251,    43,   299,   282,
+     283,   271,   284,   110,    44,    45,    46,   272,   310,   174,
+     236,    47,    48,   241,    68,    93,    50,    76,    77,    51,
+      52,   139,   150,   164,   235,   227,   259,    53,    63
 };
 
 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    STATE-NUM.  */
-#define YYPACT_NINF -228
+#define YYPACT_NINF -244
 static const yytype_int16 yypact[] =
 {
-     261,   -53,  -228,  -228,   760,  -228,  -228,   760,   760,   760,
-    1103,  -228,  -228,     9,    32,   680,  -228,    33,   760,   -17,
-      94,    38,    41,    44,   760,   726,    50,   760,   760,   760,
-      53,    58,   760,   760,   760,     4,  -228,     5,  -228,  -228,
-    -228,    -8,     6,   796,   760,  1075,  -228,  -228,  -228,  -228,
-    -228,  -228,  -228,    -1,   760,  -228,  1075,  1075,  1075,  1075,
-      -3,   760,   760,  -228,  -228,     8,   760,  -228,   760,  -228,
-      63,  -228,  1075,    31,  -228,  -228,   817,    74,  -228,   -38,
-     760,   -33,    61,  -228,  -228,   935,  -228,    31,  -228,  -228,
-      16,   -52,   850,   963,  -228,   760,   -52,   -52,  1019,  -228,
-     336,   796,   760,   796,    67,  1047,  1075,   760,   760,   760,
-     760,   760,   760,   760,   760,   760,   760,   760,   760,   760,
-     760,   760,   760,   760,   817,   760,   -61,    -3,    96,  1075,
-    1075,   760,  -228,  -228,   101,   760,   760,  -228,   760,   760,
-     907,   760,   760,  -228,  -228,   760,  -228,   106,   760,   760,
-     760,   760,  -228,    -3,  -228,  -228,    42,  1075,    43,   991,
-     -53,   760,  -228,   387,   387,   387,   -52,   -52,   -52,  1075,
-    1075,   387,   387,    57,    30,    30,   -52,   -52,  1075,  1075,
-    1075,  -228,  -228,  1075,   110,  -228,  1075,  1075,  1075,  1075,
-     760,   760,  1075,  1075,   110,  1075,  -228,  1075,   879,  1075,
-    1075,  -228,  -228,    -7,  -228,  -228,   626,  1075,  -228,   -62,
-    1075,  1075,   -62,   760,   110,   481,    87,   760,   481,  -228,
-    -228,   113,    45,    45,  1075,   -62,  -228,  -228,   114,   760,
-    1075,    -6,    12,  -228,   120,  -228,  -228,    45,   105,  1075,
-    -228,   115,  -228,   126,  -228,  -228,   126,  -228,   796,  -228,
-     481,   481,  -228,  -228,  -228,   481,  -228,   481,   126,   126,
-    -228,   796,   626,  -228,   125,   132,   406,   481,   149,   150,
-    -228,   152,   137,  -228,  -228,  -228,  -228,  -228,   154,   112,
-     155,   159,   -18,  -228,   626,  -228,   556,   158,  -228,  -228,
-    -228,   481,  -228,  -228,  -228,  -228,  -228
+     300,   -52,  -244,  -244,   862,  -244,  -244,   862,   862,   862,
+    1459,  -244,  -244,    -5,    17,   753,  -244,    34,   862,   -17,
+      13,    38,    46,    54,   862,   826,    55,   862,   862,   862,
+     862,   862,   862,    58,    65,   862,   862,   862,     3,  -244,
+       5,  -244,  -244,  -244,   -16,     6,   899,   862,  1428,  -244,
+    -244,  -244,  -244,  -244,  -244,  -244,     7,   862,  -244,  1428,
+    1428,  1428,  1428,     8,   862,   862,  -244,  -244,     9,   862,
+    -244,   862,  -244,    60,  -244,  1428,    26,  -244,  -244,   923,
+      74,  -244,   -30,   862,   -28,    59,  -244,  -244,  1273,  -244,
+      26,  -244,  -244,    11,   -49,   959,   995,  1031,  1067,  1304,
+    -244,   862,   -49,   -49,  1366,  -244,   378,   899,   862,   899,
+      61,  1397,  1428,   862,   862,   862,   862,   862,   862,   862,
+     862,   862,   862,   862,   862,   862,   862,   862,   862,   862,
+     923,   862,   -58,     8,    77,  1428,  1428,   862,  -244,  -244,
+      85,   862,   862,  -244,   862,   862,  1242,   862,   862,  -244,
+    -244,   862,  -244,    87,   862,   862,   862,   862,   862,   862,
+     862,   862,   862,   862,  -244,     8,  -244,  -244,    22,  1428,
+      23,  1335,   -52,   862,  -244,   166,   166,   166,   -49,   -49,
+     -49,  1428,  1428,   166,   166,   715,   203,   203,   -49,   -49,
+    1428,  1428,  1428,  -244,  -244,  1428,    93,  -244,  1428,  1428,
+    1428,  1428,   862,   862,  1428,  1428,    93,  1428,  -244,  1428,
+    1103,  1428,  1139,  1428,  1175,  1428,  1211,  1428,  1428,  -244,
+    -244,    -1,  -244,  -244,   680,  1428,  -244,   -60,  1428,  1428,
+     -60,   862,   862,   862,   862,    93,   529,    70,   862,   529,
+    -244,  -244,    95,    27,    27,  1428,  1428,  1428,  1428,   -60,
+    -244,  -244,    91,   862,  1428,     1,    -8,  -244,   100,  -244,
+    -244,    27,    81,  1428,  -244,    92,  -244,    99,  -244,  -244,
+      99,  -244,   899,  -244,   529,   529,  -244,  -244,  -244,   529,
+    -244,   529,    99,    99,  -244,   899,   680,  -244,    78,    84,
+     451,   529,   101,   102,  -244,   104,    89,  -244,  -244,  -244,
+    -244,  -244,   106,    96,   107,   108,   -14,  -244,   680,  -244,
+     607,    97,  -244,  -244,  -244,   529,  -244,  -244,  -244,  -244,
+    -244
 };
 
 /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int16 yypgoto[] =
 {
-    -228,  -228,    14,   100,     2,  -199,     0,  -228,  -228,  -228,
-     -31,  -227,   -56,   -77,  -228,  -228,  -228,  -225,    -9,   -25,
-    -195,  -228,    47,     3,  -228,  -228,  -228,   178,    -5,  -228,
-    -228,  -228,  -228,  -228,  -228,  -171,  -189,  -228,   -49
+    -244,  -244,    10,    28,     2,  -217,     0,  -244,  -244,  -244,
+    -120,  -215,  -140,   -87,  -244,  -244,  -244,  -243,    -9,   -18,
+    -213,  -244,    52,     4,  -244,  -244,  -244,   118,   -19,  -244,
+    -244,  -244,  -244,  -244,  -244,  -191,  -223,  -244,   -56
 };
 
 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
@@ -844,250 +861,322 @@ static const yytype_int16 yypgoto[] =
 #define YYTABLE_NINF -64
 static const yytype_int16 yytable[] =
 {
-      39,    62,    37,    46,    99,   -10,   138,   219,   -53,   -53,
-     218,   141,   126,   127,   113,    52,   114,   216,   261,   263,
-      88,   241,    51,   212,   156,   181,   158,   221,   125,    77,
-      78,    51,   263,   261,   236,   122,   123,   217,   244,   139,
-     250,   251,   242,   225,   142,   255,   153,   257,   252,   100,
-      63,    56,    64,    75,    57,    58,    59,   266,    82,   267,
-     245,    83,    72,   273,    84,    76,   -53,    68,   132,    70,
-      89,    85,    72,    94,    91,    92,    93,   101,    95,    96,
-      97,    98,   146,   102,    61,   292,   125,   291,    51,   -10,
-     105,   106,   110,   111,   137,   112,   113,   128,   114,   131,
-      39,   124,    37,    46,   143,   147,    79,    80,    59,    59,
-     160,   120,   121,   129,    81,   130,   182,   122,   123,   110,
-     111,   185,   112,   113,   184,   114,   196,   140,   202,   204,
-     208,   229,   203,   233,   234,   194,   118,   119,   120,   121,
-     249,   238,    59,   201,   122,   123,   253,   256,   105,   157,
-     159,   206,   244,   288,   163,   164,   165,   166,   167,   168,
-     169,   170,   171,   172,   173,   174,   175,   176,   177,   178,
-     179,   265,   180,   274,   205,   276,   279,   280,   183,   281,
-     282,   287,   186,   187,   272,   188,   189,   289,   192,   193,
-     228,   290,   195,   231,   232,   197,   198,   199,   200,   294,
-     155,   246,   270,    87,     0,   240,     0,     0,   207,     0,
-       0,     0,     0,     0,   254,     0,     0,     0,     0,     0,
-       0,   264,   243,   222,     0,     0,   223,     0,     0,     0,
-     268,     0,   269,   271,     0,     0,   262,   210,   211,   237,
-       0,     0,   278,     0,     0,     0,     0,     0,   283,     0,
-     285,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-     224,    -6,     1,     0,   230,   284,   295,     0,   296,     0,
-       0,     0,     2,     3,     4,     5,   239,     6,     7,     8,
-       9,    10,    11,     0,    12,     0,   293,     0,     0,    13,
-       0,    14,    15,    16,     0,   105,    17,     0,     0,     0,
-       0,    18,    19,    20,     0,     0,    21,     0,   105,     0,
-      22,    23,    24,    25,     0,     0,    26,     0,     0,     0,
-       0,     0,     0,     0,     0,    27,     0,     0,     0,     0,
-       0,     0,    28,    29,     0,     0,    30,    31,     0,     0,
-      32,    33,     0,     0,     0,    -6,    34,     2,     3,     4,
-       5,     0,     6,     7,     8,     9,    10,    11,     0,    12,
-       0,     0,     0,     0,    13,     0,    14,    15,    16,     0,
-       0,    17,     0,     0,     0,     0,    18,    19,    20,     0,
-       0,    21,     0,     0,     0,    22,    23,    24,    25,     0,
-       0,    26,     0,     0,     0,     0,     0,     0,     0,     0,
-      27,     0,     0,     0,     0,     0,     0,    28,    29,     0,
-       0,    30,    31,     0,     0,    32,    33,     2,     3,     4,
-       5,    34,     6,     7,     8,     9,    53,    11,     0,    12,
-       0,     0,     0,   277,    13,     0,    14,    15,    16,     0,
-       0,     0,     0,     0,     0,     0,    18,    19,    20,   110,
-     111,    21,   112,   113,     0,   114,     0,    24,    25,     0,
-       0,    26,     0,     0,     0,   117,   118,   119,   120,   121,
-      27,     0,     0,     0,   122,   123,     0,    28,    29,     0,
-       0,     0,    31,     0,     0,    32,    33,     0,     0,     0,
-      51,    34,     2,     3,     4,     5,     0,     6,     7,     8,
-       9,    53,    11,     0,    12,     0,     0,     0,     0,    13,
+      42,    65,    40,   105,    49,   -10,    91,   240,   132,   133,
+     239,    55,   -53,   -53,   144,   230,   147,   119,   268,   120,
+     168,   260,   170,   237,   285,    82,    83,    54,   265,    80,
+      81,   193,   242,    84,   131,    54,    66,    67,   276,   285,
+     269,   128,   129,   238,   249,   165,   274,   275,   106,   266,
+     145,   279,   148,   281,    78,   287,    59,   138,    85,    60,
+      61,    62,    71,   290,    73,   291,    86,    75,   287,   297,
+      79,   152,   107,   -53,    87,    92,    88,    75,   100,    94,
+      95,    96,    97,    98,    99,   101,   108,   102,   103,   104,
+      54,   316,   -10,   315,   143,    64,   137,   194,   111,   112,
+     131,   134,   149,   153,   172,   197,    42,   208,    40,   130,
+      49,   220,   222,   226,   253,   257,    62,    62,   262,   258,
+     273,   135,   277,   136,   280,   268,   298,   300,   303,   304,
+     196,   305,   306,   311,   167,   146,   270,   312,   318,   313,
+     314,   206,   294,    90,     0,     0,     0,     0,     0,     0,
+       0,   221,     0,    62,     0,   219,     0,     0,     0,   111,
+     169,   171,     0,   224,     0,   175,   176,   177,   178,   179,
+     180,   181,   182,   183,   184,   185,   186,   187,   188,   189,
+     190,   191,   223,   192,     0,   289,     0,     0,     0,   195,
+       0,     0,     0,   198,   199,     0,   200,   201,   296,   204,
+     205,     0,     0,   207,     0,     0,   209,   210,   211,   212,
+     213,   214,   215,   216,   217,   218,     0,     0,   252,     0,
+       0,   255,   256,     0,     0,   225,     0,     0,   116,   117,
+       0,   118,   119,     0,   120,     0,   264,   243,     0,     0,
+     244,     0,     0,     0,     0,   278,   267,   123,   124,   125,
+     126,   127,   288,     0,   228,   229,   128,   129,     0,   261,
+     286,   292,     0,   293,   295,   116,   117,     0,   118,   119,
+       0,   120,     0,   302,     0,     0,     0,     0,     0,   307,
+       0,   309,     0,   245,   246,   247,   248,   126,   127,   308,
+     254,     0,     0,   128,   129,     0,     0,   319,     0,   320,
+      -6,     1,     0,     0,     0,   263,     0,     0,     0,     0,
+     317,     2,     3,     4,     5,     0,     6,     7,     8,     9,
+      10,    11,     0,    12,   111,     0,     0,     0,    13,     0,
+      14,    15,    16,     0,     0,    17,     0,   111,     0,     0,
+      18,    19,    20,     0,     0,    21,     0,     0,     0,    22,
+      23,    24,    25,     0,     0,    26,     0,     0,     0,     0,
+       0,     0,     0,     0,    27,     0,     0,     0,     0,     0,
+       0,    28,    29,    30,    31,    32,     0,     0,    33,    34,
+       0,     0,    35,    36,     0,     0,     0,    -6,    37,     2,
+       3,     4,     5,     0,     6,     7,     8,     9,    10,    11,
+       0,    12,     0,     0,     0,     0,    13,     0,    14,    15,
+      16,     0,     0,    17,     0,     0,     0,     0,    18,    19,
+      20,     0,     0,    21,     0,     0,     0,    22,    23,    24,
+      25,     0,     0,    26,     0,     0,     0,     0,     0,     0,
+       0,     0,    27,     0,     0,     0,     0,     0,     0,    28,
+      29,    30,    31,    32,     0,     0,    33,    34,     0,     0,
+      35,    36,     2,     3,     4,     5,    37,     6,     7,     8,
+       9,    56,    11,     0,    12,     0,     0,     0,   301,    13,
        0,    14,    15,    16,     0,     0,     0,     0,     0,     0,
        0,    18,    19,    20,     0,     0,    21,     0,     0,     0,
        0,     0,    24,    25,     0,     0,    26,     0,     0,     0,
        0,     0,     0,     0,     0,    27,     0,     0,     0,     0,
-       0,     0,    28,    29,     0,     0,     0,    31,     0,     0,
-      32,    33,     0,     0,     0,    51,    34,     2,     3,     4,
-       5,     0,     6,     7,     8,     9,    53,    11,     0,    12,
-       0,     0,     0,     0,    13,     0,    14,    15,    16,     0,
-       0,     0,     0,     0,     0,     0,    18,    19,    20,     0,
-       0,    21,     0,     0,     0,     0,     0,    24,    25,     0,
-       0,    26,     0,     0,     0,     0,     0,     0,     0,     0,
-      27,     0,     0,     0,     0,     0,     0,    28,    29,     0,
-       0,     0,    31,     0,     0,    32,    33,     2,     3,     4,
-       5,    34,     6,     7,     8,     9,    53,    11,     0,    12,
-       0,     0,     0,     0,    13,     0,    14,    15,     0,     0,
-       0,     0,     0,     0,     0,     0,    18,     0,    20,     0,
-       0,     0,     0,     0,     0,     0,     0,    24,    25,     0,
-       0,    26,     0,     0,     0,     0,     0,     0,     0,     0,
-      27,     2,     3,     4,     5,     0,     6,    28,    29,     0,
-      53,    11,    31,    12,     0,    32,    33,     0,     0,    66,
-       0,    34,     0,     0,    67,     0,    68,    69,    70,    71,
-      54,     0,    20,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,     0,     0,     0,     0,     0,     2,     3,     4,
-       5,     0,     6,     0,    27,     0,    53,    11,     0,    12,
-       0,    28,    29,     0,     0,    66,     0,     0,     0,    32,
-      33,     0,    68,     0,    70,    34,    54,     0,    20,     0,
-       0,     2,     3,     4,     5,     0,     6,     0,     0,    86,
-      53,    11,     0,    12,     0,     0,     0,     0,     0,     0,
-      27,     0,     0,     0,     0,     0,     0,    28,    29,     0,
-      54,     0,    20,     0,     0,    32,    33,     2,     3,     4,
-       5,    34,     6,     0,     0,     0,    53,    11,     0,    12,
+       0,     0,    28,    29,    30,    31,    32,     0,     0,     0,
+      34,     0,     0,    35,    36,     0,     0,     0,    54,    37,
+       2,     3,     4,     5,     0,     6,     7,     8,     9,    56,
+      11,     0,    12,     0,     0,     0,     0,    13,     0,    14,
+      15,    16,     0,     0,     0,     0,     0,     0,     0,    18,
+      19,    20,     0,     0,    21,     0,     0,     0,     0,     0,
+      24,    25,     0,     0,    26,     0,     0,     0,     0,     0,
+       0,     0,     0,    27,     0,     0,     0,     0,     0,     0,
+      28,    29,    30,    31,    32,     0,     0,     0,    34,     0,
+       0,    35,    36,     0,     0,     0,    54,    37,     2,     3,
+       4,     5,     0,     6,     7,     8,     9,    56,    11,     0,
+      12,     0,     0,     0,     0,    13,     0,    14,    15,    16,
+       0,     0,     0,     0,     0,     0,     0,    18,    19,    20,
+       0,     0,    21,     0,     0,     0,     0,     0,    24,    25,
+       0,     0,    26,     0,     0,     0,     0,     0,     0,     0,
+       0,    27,     0,     0,     0,     0,     0,     0,    28,    29,
+      30,    31,    32,     0,     0,     0,    34,     0,     0,    35,
+      36,     2,     3,     4,     5,    37,     6,     7,     8,     9,
+      56,    11,     0,    12,     0,     0,     0,     0,    13,     0,
+      14,    15,     0,     0,     0,     0,     0,     0,     0,     0,
+      18,     0,    20,     0,     0,     0,     0,     0,     0,     0,
+       0,    24,    25,     0,     0,    26,     0,     0,     0,     0,
        0,     0,     0,     0,    27,     0,     0,     0,     0,     0,
-       0,    28,    29,     0,     0,     0,    54,     0,    20,    32,
-      33,     0,     0,     0,     0,    34,     0,     0,     0,     0,
-     134,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-      27,     0,     0,     0,     0,     0,     0,    28,    29,     0,
-       0,     0,     0,   107,   108,    32,    33,     0,   109,   110,
-     111,   103,   112,   135,   136,   114,   115,   116,   148,     0,
-       0,     0,     0,     0,   149,   117,   118,   119,   120,   121,
-       0,     0,     0,     0,   122,   123,   107,   108,     0,     0,
-       0,   109,   110,   111,     0,   112,   113,   213,   114,   115,
-     116,     0,     0,     0,     0,     0,     0,     0,   117,   118,
-     119,   120,   121,     0,     0,   107,   108,   122,   123,     0,
-     109,   110,   111,     0,   112,   113,     0,   114,   115,   116,
-       0,   190,     0,     0,     0,     0,     0,   117,   118,   119,
-     120,   121,     0,   107,   108,     0,   122,   123,   109,   110,
-     111,     0,   112,   113,     0,   114,   115,   116,     0,     0,
-       0,   145,     0,     0,   191,   117,   118,   119,   120,   121,
-       0,   107,   108,     0,   122,   123,   109,   110,   111,     0,
-     112,   113,     0,   114,   115,   116,     0,     0,     0,     0,
-       0,     0,     0,   117,   118,   119,   120,   121,     0,   107,
-     108,     0,   122,   123,   109,   110,   111,     0,   112,   113,
-       0,   114,   115,   116,     0,     0,   150,   151,     0,     0,
-       0,   117,   118,   119,   120,   121,     0,   107,   108,     0,
-     122,   123,   109,   110,   111,     0,   112,   113,     0,   114,
-     115,   116,     0,     0,     0,     0,     0,     0,   161,   117,
-     118,   119,   120,   121,     0,   107,   108,   154,   122,   123,
-     109,   110,   111,     0,   112,   113,     0,   114,   115,   116,
-       0,     0,     0,     0,     0,     0,     0,   117,   118,   119,
-     120,   121,     0,   107,   108,   154,   122,   123,   109,   110,
-     111,     0,   112,   113,     0,   114,   115,   116,     0,     0,
-       0,     0,     0,     0,   161,   117,   118,   119,   120,   121,
-       0,   107,   108,     0,   122,   123,   109,   110,   111,     0,
-     112,   113,     0,   114,   115,   116,     0,     0,     0,     0,
-       0,     0,     0,   117,   118,   119,   120,   121,     0,   -63,
-     -63,     0,   122,   123,   -63,   -63,   -63,     0,   -63,   -63,
-       0,   -63,   -63,   -63,     0,     0,     0,     0,     0,     0,
-       0,   -63,     0,     0,   -63,   -63,     0,     0,    61,     0,
-     -63,   -63
+       0,    28,    29,    30,    31,    32,     0,     0,     0,    34,
+       0,     0,    35,    36,     2,     3,     4,     5,    37,     6,
+       0,     0,     0,    56,    11,     0,    12,   116,   117,     0,
+     118,   119,    69,   120,     0,     0,     0,    70,     0,    71,
+      72,    73,    74,    57,     0,    20,     0,   124,   125,   126,
+     127,     0,     0,     0,     0,   128,   129,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,    27,     0,     0,
+       0,     0,     0,     0,    28,    29,    30,    31,    32,     0,
+       0,     0,     0,     0,     0,    35,    36,     2,     3,     4,
+       5,    37,     6,     0,     0,     0,    56,    11,     0,    12,
+       0,     0,     0,     0,     0,    69,     0,     0,     0,     0,
+       0,     0,    71,     0,    73,     0,    57,     0,    20,     0,
+       0,     0,     0,     2,     3,     4,     5,     0,     6,    89,
+       0,     0,    56,    11,     0,    12,     0,     0,     0,     0,
+      27,     0,     0,     0,     0,     0,     0,    28,    29,    30,
+      31,    32,    57,     0,    20,     0,     0,     0,    35,    36,
+       2,     3,     4,     5,    37,     6,     0,     0,     0,    56,
+      11,     0,    12,     0,     0,     0,    27,     0,     0,     0,
+       0,     0,     0,    28,    29,    30,    31,    32,     0,    57,
+       0,    20,     0,     0,    35,    36,     0,     0,     0,     0,
+      37,     0,     0,     0,     0,     0,   140,     0,     0,     0,
+       0,     0,     0,    27,     0,     0,     0,     0,     0,     0,
+      28,    29,    30,    31,    32,     0,     0,     0,     0,   113,
+     114,    35,    36,     0,   115,   116,   117,   109,   118,   141,
+     142,   120,   121,   122,     0,     0,     0,   154,     0,     0,
+       0,     0,     0,   155,   123,   124,   125,   126,   127,     0,
+       0,     0,     0,   128,   129,   113,   114,     0,     0,     0,
+     115,   116,   117,     0,   118,   119,     0,   120,   121,   122,
+       0,     0,     0,   156,     0,     0,     0,     0,     0,   157,
+     123,   124,   125,   126,   127,     0,     0,     0,     0,   128,
+     129,   113,   114,     0,     0,     0,   115,   116,   117,     0,
+     118,   119,     0,   120,   121,   122,     0,     0,     0,   158,
+       0,     0,     0,     0,     0,   159,   123,   124,   125,   126,
+     127,     0,     0,     0,     0,   128,   129,   113,   114,     0,
+       0,     0,   115,   116,   117,     0,   118,   119,     0,   120,
+     121,   122,     0,     0,     0,   160,     0,     0,     0,     0,
+       0,   161,   123,   124,   125,   126,   127,     0,     0,     0,
+       0,   128,   129,   113,   114,     0,     0,     0,   115,   116,
+     117,     0,   118,   119,     0,   120,   121,   122,     0,     0,
+       0,   231,     0,     0,     0,     0,     0,     0,   123,   124,
+     125,   126,   127,     0,     0,     0,     0,   128,   129,   113,
+     114,     0,     0,     0,   115,   116,   117,     0,   118,   119,
+       0,   120,   121,   122,     0,     0,     0,   232,     0,     0,
+       0,     0,     0,     0,   123,   124,   125,   126,   127,     0,
+       0,     0,     0,   128,   129,   113,   114,     0,     0,     0,
+     115,   116,   117,     0,   118,   119,     0,   120,   121,   122,
+       0,     0,     0,   233,     0,     0,     0,     0,     0,     0,
+     123,   124,   125,   126,   127,     0,     0,     0,     0,   128,
+     129,   113,   114,     0,     0,     0,   115,   116,   117,     0,
+     118,   119,     0,   120,   121,   122,     0,     0,     0,   234,
+       0,     0,     0,     0,     0,     0,   123,   124,   125,   126,
+     127,     0,     0,     0,     0,   128,   129,   113,   114,     0,
+       0,     0,   115,   116,   117,     0,   118,   119,     0,   120,
+     121,   122,     0,     0,     0,     0,   202,     0,     0,     0,
+       0,     0,   123,   124,   125,   126,   127,     0,   113,   114,
+       0,   128,   129,   115,   116,   117,     0,   118,   119,     0,
+     120,   121,   122,     0,     0,     0,     0,     0,     0,   151,
+       0,     0,   203,   123,   124,   125,   126,   127,     0,   113,
+     114,     0,   128,   129,   115,   116,   117,     0,   118,   119,
+       0,   120,   121,   122,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,   123,   124,   125,   126,   127,     0,
+     113,   114,     0,   128,   129,   115,   116,   117,     0,   118,
+     119,     0,   120,   121,   122,     0,     0,     0,     0,     0,
+     162,   163,     0,     0,     0,   123,   124,   125,   126,   127,
+       0,   113,   114,     0,   128,   129,   115,   116,   117,     0,
+     118,   119,     0,   120,   121,   122,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,   173,   123,   124,   125,   126,
+     127,     0,   113,   114,   166,   128,   129,   115,   116,   117,
+       0,   118,   119,     0,   120,   121,   122,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   123,   124,   125,
+     126,   127,     0,   113,   114,   166,   128,   129,   115,   116,
+     117,     0,   118,   119,     0,   120,   121,   122,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,   173,   123,   124,
+     125,   126,   127,     0,   113,   114,     0,   128,   129,   115,
+     116,   117,     0,   118,   119,     0,   120,   121,   122,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,   123,
+     124,   125,   126,   127,     0,   -63,   -63,     0,   128,   129,
+     -63,   -63,   -63,     0,   -63,   -63,     0,   -63,   -63,   -63,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     -63,     0,     0,   -63,   -63,     0,     0,    64,     0,   -63,
+     -63
 };
 
 static const yytype_int16 yycheck[] =
 {
-       0,    10,     0,     0,     0,     0,    44,   206,    26,    27,
-     205,    44,    61,    62,    66,     1,    68,    24,   243,   246,
-      25,    27,    84,   194,   101,    86,   103,    89,    89,    46,
-      47,    84,   259,   258,   223,    87,    88,    44,    26,    77,
-     235,   236,    48,   214,    77,   240,    95,   242,   237,    35,
-      41,     4,    20,    20,     7,     8,     9,   252,    20,   254,
-      48,    20,    15,   262,    20,    18,    84,    36,    73,    38,
-      20,    24,    25,    20,    27,    28,    29,    85,    20,    32,
-      33,    34,    87,    77,    85,   284,    89,   282,    84,    84,
-      43,    44,    62,    63,    20,    65,    66,    89,    68,    36,
-     100,    54,   100,   100,    43,    89,    12,    13,    61,    62,
-      43,    81,    82,    66,    20,    68,    20,    87,    88,    62,
-      63,    20,    65,    66,   133,    68,    20,    80,    86,    86,
-      20,    44,   157,    20,    89,   144,    79,    80,    81,    82,
-      20,    27,    95,   152,    87,    88,    41,    32,   101,   102,
-     103,   160,    26,    41,   107,   108,   109,   110,   111,   112,
-     113,   114,   115,   116,   117,   118,   119,   120,   121,   122,
-     123,   248,   125,    48,   160,    43,    27,    27,   131,    27,
-      43,    27,   135,   136,   261,   138,   139,    32,   141,   142,
-     215,    32,   145,   218,   219,   148,   149,   150,   151,    41,
-     100,   232,   258,    25,    -1,   230,    -1,    -1,   161,    -1,
-      -1,    -1,    -1,    -1,   239,    -1,    -1,    -1,    -1,    -1,
-      -1,   246,   231,   209,    -1,    -1,   212,    -1,    -1,    -1,
-     255,    -1,   257,   258,    -1,    -1,   245,   190,   191,   225,
-      -1,    -1,   267,    -1,    -1,    -1,    -1,    -1,   273,    -1,
-     275,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-     213,     0,     1,    -1,   217,   274,   291,    -1,   293,    -1,
-      -1,    -1,    11,    12,    13,    14,   229,    16,    17,    18,
-      19,    20,    21,    -1,    23,    -1,   286,    -1,    -1,    28,
-      -1,    30,    31,    32,    -1,   248,    35,    -1,    -1,    -1,
-      -1,    40,    41,    42,    -1,    -1,    45,    -1,   261,    -1,
-      49,    50,    51,    52,    -1,    -1,    55,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    -1,    64,    -1,    -1,    -1,    -1,
-      -1,    -1,    71,    72,    -1,    -1,    75,    76,    -1,    -1,
-      79,    80,    -1,    -1,    -1,    84,    85,    11,    12,    13,
-      14,    -1,    16,    17,    18,    19,    20,    21,    -1,    23,
-      -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,    -1,    -1,    -1,    71,    72,    -1,
-      -1,    75,    76,    -1,    -1,    79,    80,    11,    12,    13,
-      14,    85,    16,    17,    18,    19,    20,    21,    -1,    23,
-      -1,    -1,    -1,    27,    28,    -1,    30,    31,    32,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    40,    41,    42,    62,
-      63,    45,    65,    66,    -1,    68,    -1,    51,    52,    -1,
-      -1,    55,    -1,    -1,    -1,    78,    79,    80,    81,    82,
-      64,    -1,    -1,    -1,    87,    88,    -1,    71,    72,    -1,
-      -1,    -1,    76,    -1,    -1,    79,    80,    -1,    -1,    -1,
-      84,    85,    11,    12,    13,    14,    -1,    16,    17,    18,
-      19,    20,    21,    -1,    23,    -1,    -1,    -1,    -1,    28,
+       0,    10,     0,     0,     0,     0,    25,   224,    64,    65,
+     223,     1,    26,    27,    44,   206,    44,    66,    26,    68,
+     107,   244,   109,    24,   267,    12,    13,    87,    27,    46,
+      47,    89,    92,    20,    92,    87,    41,    20,   261,   282,
+      48,    90,    91,    44,   235,   101,   259,   260,    38,    48,
+      80,   264,    80,   266,    20,   270,     4,    76,    20,     7,
+       8,     9,    36,   276,    38,   278,    20,    15,   283,   286,
+      18,    90,    88,    87,    20,    20,    24,    25,    20,    27,
+      28,    29,    30,    31,    32,    20,    80,    35,    36,    37,
+      87,   308,    87,   306,    20,    88,    36,    20,    46,    47,
+      92,    92,    43,    92,    43,    20,   106,    20,   106,    57,
+     106,    89,    89,    20,    44,    20,    64,    65,    27,    92,
+      20,    69,    41,    71,    32,    26,    48,    43,    27,    27,
+     139,    27,    43,    27,   106,    83,   256,    41,    41,    32,
+      32,   150,   282,    25,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,   169,    -1,   101,    -1,   164,    -1,    -1,    -1,   107,
+     108,   109,    -1,   172,    -1,   113,   114,   115,   116,   117,
+     118,   119,   120,   121,   122,   123,   124,   125,   126,   127,
+     128,   129,   172,   131,    -1,   272,    -1,    -1,    -1,   137,
+      -1,    -1,    -1,   141,   142,    -1,   144,   145,   285,   147,
+     148,    -1,    -1,   151,    -1,    -1,   154,   155,   156,   157,
+     158,   159,   160,   161,   162,   163,    -1,    -1,   236,    -1,
+      -1,   239,   240,    -1,    -1,   173,    -1,    -1,    62,    63,
+      -1,    65,    66,    -1,    68,    -1,   254,   227,    -1,    -1,
+     230,    -1,    -1,    -1,    -1,   263,   255,    81,    82,    83,
+      84,    85,   270,    -1,   202,   203,    90,    91,    -1,   249,
+     269,   279,    -1,   281,   282,    62,    63,    -1,    65,    66,
+      -1,    68,    -1,   291,    -1,    -1,    -1,    -1,    -1,   297,
+      -1,   299,    -1,   231,   232,   233,   234,    84,    85,   298,
+     238,    -1,    -1,    90,    91,    -1,    -1,   315,    -1,   317,
+       0,     1,    -1,    -1,    -1,   253,    -1,    -1,    -1,    -1,
+     310,    11,    12,    13,    14,    -1,    16,    17,    18,    19,
+      20,    21,    -1,    23,   272,    -1,    -1,    -1,    28,    -1,
+      30,    31,    32,    -1,    -1,    35,    -1,   285,    -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,    -1,    -1,
+      -1,    71,    72,    73,    74,    75,    -1,    -1,    78,    79,
+      -1,    -1,    82,    83,    -1,    -1,    -1,    87,    88,    11,
+      12,    13,    14,    -1,    16,    17,    18,    19,    20,    21,
+      -1,    23,    -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,    -1,    -1,    -1,    71,
+      72,    73,    74,    75,    -1,    -1,    78,    79,    -1,    -1,
+      82,    83,    11,    12,    13,    14,    88,    16,    17,    18,
+      19,    20,    21,    -1,    23,    -1,    -1,    -1,    27,    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,    -1,
-      -1,    -1,    71,    72,    -1,    -1,    -1,    76,    -1,    -1,
-      79,    80,    -1,    -1,    -1,    84,    85,    11,    12,    13,
-      14,    -1,    16,    17,    18,    19,    20,    21,    -1,    23,
-      -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,    -1,    -1,    -1,    71,    72,    -1,
-      -1,    -1,    76,    -1,    -1,    79,    80,    11,    12,    13,
-      14,    85,    16,    17,    18,    19,    20,    21,    -1,    23,
-      -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,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      64,    11,    12,    13,    14,    -1,    16,    71,    72,    -1,
-      20,    21,    76,    23,    -1,    79,    80,    -1,    -1,    29,
-      -1,    85,    -1,    -1,    34,    -1,    36,    37,    38,    39,
+      -1,    -1,    71,    72,    73,    74,    75,    -1,    -1,    -1,
+      79,    -1,    -1,    82,    83,    -1,    -1,    -1,    87,    88,
+      11,    12,    13,    14,    -1,    16,    17,    18,    19,    20,
+      21,    -1,    23,    -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,    -1,    -1,    -1,
+      71,    72,    73,    74,    75,    -1,    -1,    -1,    79,    -1,
+      -1,    82,    83,    -1,    -1,    -1,    87,    88,    11,    12,
+      13,    14,    -1,    16,    17,    18,    19,    20,    21,    -1,
+      23,    -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,    -1,    -1,    -1,    71,    72,
+      73,    74,    75,    -1,    -1,    -1,    79,    -1,    -1,    82,
+      83,    11,    12,    13,    14,    88,    16,    17,    18,    19,
+      20,    21,    -1,    23,    -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,    -1,    -1,    -1,    -1,    -1,    -1,    11,    12,    13,
-      14,    -1,    16,    -1,    64,    -1,    20,    21,    -1,    23,
-      -1,    71,    72,    -1,    -1,    29,    -1,    -1,    -1,    79,
-      80,    -1,    36,    -1,    38,    85,    40,    -1,    42,    -1,
-      -1,    11,    12,    13,    14,    -1,    16,    -1,    -1,    53,
-      20,    21,    -1,    23,    -1,    -1,    -1,    -1,    -1,    -1,
-      64,    -1,    -1,    -1,    -1,    -1,    -1,    71,    72,    -1,
-      40,    -1,    42,    -1,    -1,    79,    80,    11,    12,    13,
-      14,    85,    16,    -1,    -1,    -1,    20,    21,    -1,    23,
+      -1,    51,    52,    -1,    -1,    55,    -1,    -1,    -1,    -1,
       -1,    -1,    -1,    -1,    64,    -1,    -1,    -1,    -1,    -1,
-      -1,    71,    72,    -1,    -1,    -1,    40,    -1,    42,    79,
-      80,    -1,    -1,    -1,    -1,    85,    -1,    -1,    -1,    -1,
-      33,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      64,    -1,    -1,    -1,    -1,    -1,    -1,    71,    72,    -1,
-      -1,    -1,    -1,    56,    57,    79,    80,    -1,    61,    62,
-      63,    85,    65,    66,    67,    68,    69,    70,    38,    -1,
-      -1,    -1,    -1,    -1,    44,    78,    79,    80,    81,    82,
-      -1,    -1,    -1,    -1,    87,    88,    56,    57,    -1,    -1,
-      -1,    61,    62,    63,    -1,    65,    66,    38,    68,    69,
-      70,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    78,    79,
-      80,    81,    82,    -1,    -1,    56,    57,    87,    88,    -1,
+      -1,    71,    72,    73,    74,    75,    -1,    -1,    -1,    79,
+      -1,    -1,    82,    83,    11,    12,    13,    14,    88,    16,
+      -1,    -1,    -1,    20,    21,    -1,    23,    62,    63,    -1,
+      65,    66,    29,    68,    -1,    -1,    -1,    34,    -1,    36,
+      37,    38,    39,    40,    -1,    42,    -1,    82,    83,    84,
+      85,    -1,    -1,    -1,    -1,    90,    91,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    64,    -1,    -1,
+      -1,    -1,    -1,    -1,    71,    72,    73,    74,    75,    -1,
+      -1,    -1,    -1,    -1,    -1,    82,    83,    11,    12,    13,
+      14,    88,    16,    -1,    -1,    -1,    20,    21,    -1,    23,
+      -1,    -1,    -1,    -1,    -1,    29,    -1,    -1,    -1,    -1,
+      -1,    -1,    36,    -1,    38,    -1,    40,    -1,    42,    -1,
+      -1,    -1,    -1,    11,    12,    13,    14,    -1,    16,    53,
+      -1,    -1,    20,    21,    -1,    23,    -1,    -1,    -1,    -1,
+      64,    -1,    -1,    -1,    -1,    -1,    -1,    71,    72,    73,
+      74,    75,    40,    -1,    42,    -1,    -1,    -1,    82,    83,
+      11,    12,    13,    14,    88,    16,    -1,    -1,    -1,    20,
+      21,    -1,    23,    -1,    -1,    -1,    64,    -1,    -1,    -1,
+      -1,    -1,    -1,    71,    72,    73,    74,    75,    -1,    40,
+      -1,    42,    -1,    -1,    82,    83,    -1,    -1,    -1,    -1,
+      88,    -1,    -1,    -1,    -1,    -1,    33,    -1,    -1,    -1,
+      -1,    -1,    -1,    64,    -1,    -1,    -1,    -1,    -1,    -1,
+      71,    72,    73,    74,    75,    -1,    -1,    -1,    -1,    56,
+      57,    82,    83,    -1,    61,    62,    63,    88,    65,    66,
+      67,    68,    69,    70,    -1,    -1,    -1,    38,    -1,    -1,
+      -1,    -1,    -1,    44,    81,    82,    83,    84,    85,    -1,
+      -1,    -1,    -1,    90,    91,    56,    57,    -1,    -1,    -1,
       61,    62,    63,    -1,    65,    66,    -1,    68,    69,    70,
-      -1,    44,    -1,    -1,    -1,    -1,    -1,    78,    79,    80,
-      81,    82,    -1,    56,    57,    -1,    87,    88,    61,    62,
+      -1,    -1,    -1,    38,    -1,    -1,    -1,    -1,    -1,    44,
+      81,    82,    83,    84,    85,    -1,    -1,    -1,    -1,    90,
+      91,    56,    57,    -1,    -1,    -1,    61,    62,    63,    -1,
+      65,    66,    -1,    68,    69,    70,    -1,    -1,    -1,    38,
+      -1,    -1,    -1,    -1,    -1,    44,    81,    82,    83,    84,
+      85,    -1,    -1,    -1,    -1,    90,    91,    56,    57,    -1,
+      -1,    -1,    61,    62,    63,    -1,    65,    66,    -1,    68,
+      69,    70,    -1,    -1,    -1,    38,    -1,    -1,    -1,    -1,
+      -1,    44,    81,    82,    83,    84,    85,    -1,    -1,    -1,
+      -1,    90,    91,    56,    57,    -1,    -1,    -1,    61,    62,
       63,    -1,    65,    66,    -1,    68,    69,    70,    -1,    -1,
-      -1,    46,    -1,    -1,    77,    78,    79,    80,    81,    82,
-      -1,    56,    57,    -1,    87,    88,    61,    62,    63,    -1,
-      65,    66,    -1,    68,    69,    70,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    78,    79,    80,    81,    82,    -1,    56,
-      57,    -1,    87,    88,    61,    62,    63,    -1,    65,    66,
-      -1,    68,    69,    70,    -1,    -1,    73,    74,    -1,    -1,
-      -1,    78,    79,    80,    81,    82,    -1,    56,    57,    -1,
-      87,    88,    61,    62,    63,    -1,    65,    66,    -1,    68,
-      69,    70,    -1,    -1,    -1,    -1,    -1,    -1,    77,    78,
-      79,    80,    81,    82,    -1,    56,    57,    86,    87,    88,
+      -1,    38,    -1,    -1,    -1,    -1,    -1,    -1,    81,    82,
+      83,    84,    85,    -1,    -1,    -1,    -1,    90,    91,    56,
+      57,    -1,    -1,    -1,    61,    62,    63,    -1,    65,    66,
+      -1,    68,    69,    70,    -1,    -1,    -1,    38,    -1,    -1,
+      -1,    -1,    -1,    -1,    81,    82,    83,    84,    85,    -1,
+      -1,    -1,    -1,    90,    91,    56,    57,    -1,    -1,    -1,
       61,    62,    63,    -1,    65,    66,    -1,    68,    69,    70,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    78,    79,    80,
-      81,    82,    -1,    56,    57,    86,    87,    88,    61,    62,
-      63,    -1,    65,    66,    -1,    68,    69,    70,    -1,    -1,
-      -1,    -1,    -1,    -1,    77,    78,    79,    80,    81,    82,
-      -1,    56,    57,    -1,    87,    88,    61,    62,    63,    -1,
-      65,    66,    -1,    68,    69,    70,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    78,    79,    80,    81,    82,    -1,    56,
-      57,    -1,    87,    88,    61,    62,    63,    -1,    65,    66,
+      -1,    -1,    -1,    38,    -1,    -1,    -1,    -1,    -1,    -1,
+      81,    82,    83,    84,    85,    -1,    -1,    -1,    -1,    90,
+      91,    56,    57,    -1,    -1,    -1,    61,    62,    63,    -1,
+      65,    66,    -1,    68,    69,    70,    -1,    -1,    -1,    38,
+      -1,    -1,    -1,    -1,    -1,    -1,    81,    82,    83,    84,
+      85,    -1,    -1,    -1,    -1,    90,    91,    56,    57,    -1,
+      -1,    -1,    61,    62,    63,    -1,    65,    66,    -1,    68,
+      69,    70,    -1,    -1,    -1,    -1,    44,    -1,    -1,    -1,
+      -1,    -1,    81,    82,    83,    84,    85,    -1,    56,    57,
+      -1,    90,    91,    61,    62,    63,    -1,    65,    66,    -1,
+      68,    69,    70,    -1,    -1,    -1,    -1,    -1,    -1,    46,
+      -1,    -1,    80,    81,    82,    83,    84,    85,    -1,    56,
+      57,    -1,    90,    91,    61,    62,    63,    -1,    65,    66,
       -1,    68,    69,    70,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    78,    -1,    -1,    81,    82,    -1,    -1,    85,    -1,
-      87,    88
+      -1,    -1,    -1,    -1,    81,    82,    83,    84,    85,    -1,
+      56,    57,    -1,    90,    91,    61,    62,    63,    -1,    65,
+      66,    -1,    68,    69,    70,    -1,    -1,    -1,    -1,    -1,
+      76,    77,    -1,    -1,    -1,    81,    82,    83,    84,    85,
+      -1,    56,    57,    -1,    90,    91,    61,    62,    63,    -1,
+      65,    66,    -1,    68,    69,    70,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    80,    81,    82,    83,    84,
+      85,    -1,    56,    57,    89,    90,    91,    61,    62,    63,
+      -1,    65,    66,    -1,    68,    69,    70,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    81,    82,    83,
+      84,    85,    -1,    56,    57,    89,    90,    91,    61,    62,
+      63,    -1,    65,    66,    -1,    68,    69,    70,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    80,    81,    82,
+      83,    84,    85,    -1,    56,    57,    -1,    90,    91,    61,
+      62,    63,    -1,    65,    66,    -1,    68,    69,    70,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    81,
+      82,    83,    84,    85,    -1,    56,    57,    -1,    90,    91,
+      61,    62,    63,    -1,    65,    66,    -1,    68,    69,    70,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      81,    -1,    -1,    84,    85,    -1,    -1,    88,    -1,    90,
+      91
 };
 
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -1097,33 +1186,36 @@ static const yytype_uint8 yystos[] =
        0,     1,    11,    12,    13,    14,    16,    17,    18,    19,
       20,    21,    23,    28,    30,    31,    32,    35,    40,    41,
       42,    45,    49,    50,    51,    52,    55,    64,    71,    72,
-      75,    76,    79,    80,    85,    91,    93,    94,    95,    96,
-      97,   104,   105,   106,   111,   112,   113,   116,   119,   120,
-     127,    84,    92,    20,    40,    94,   112,   112,   112,   112,
-     128,    85,   108,    41,    20,   114,    29,    34,    36,    37,
-      38,    39,   112,   117,   118,    20,   112,    46,    47,    12,
-      13,    20,    20,    20,    20,   112,    53,   117,   118,    20,
-     115,   112,   112,   112,    20,    20,   112,   112,   112,     0,
-      92,    85,    77,    85,   103,   112,   112,    56,    57,    61,
-      62,    63,    65,    66,    68,    69,    70,    78,    79,    80,
-      81,    82,    87,    88,   112,    89,   128,   128,    89,   112,
-     112,    36,   118,   121,    33,    66,    67,    20,    44,    77,
-     112,    44,    77,    43,   122,    46,   118,    89,    38,    44,
-      73,    74,   123,   128,    86,    93,   103,   112,   103,   112,
-      43,    77,   109,   112,   112,   112,   112,   112,   112,   112,
-     112,   112,   112,   112,   112,   112,   112,   112,   112,   112,
-     112,    86,    20,   112,   108,    20,   112,   112,   112,   112,
-      44,    77,   112,   112,   108,   112,    20,   112,   112,   112,
-     112,   108,    86,   109,    86,    92,   108,   112,    20,   125,
-     112,   112,   125,    38,   124,   110,    24,    44,   110,    95,
-     113,    89,    92,    92,   112,   125,    92,    96,   109,    44,
-     112,   109,   109,    20,    89,   126,   126,    92,    27,   112,
-     109,    27,    48,   108,    26,    48,   100,   101,   107,    20,
-     110,   110,   126,    41,   109,   110,    32,   110,    99,   100,
-     102,   107,   108,   101,   109,   103,   110,   110,   109,   109,
-     102,   109,   103,    95,    48,    98,    43,    27,   109,    27,
-      27,    27,    43,   109,   108,   109,   108,    27,    41,    32,
-      32,   110,    95,    96,    41,   109,   109
+      73,    74,    75,    78,    79,    82,    83,    88,    94,    96,
+      97,    98,    99,   100,   107,   108,   109,   114,   115,   116,
+     119,   122,   123,   130,    87,    95,    20,    40,    97,   115,
+     115,   115,   115,   131,    88,   111,    41,    20,   117,    29,
+      34,    36,    37,    38,    39,   115,   120,   121,    20,   115,
+      46,    47,    12,    13,    20,    20,    20,    20,   115,    53,
+     120,   121,    20,   118,   115,   115,   115,   115,   115,   115,
+      20,    20,   115,   115,   115,     0,    95,    88,    80,    88,
+     106,   115,   115,    56,    57,    61,    62,    63,    65,    66,
+      68,    69,    70,    81,    82,    83,    84,    85,    90,    91,
+     115,    92,   131,   131,    92,   115,   115,    36,   121,   124,
+      33,    66,    67,    20,    44,    80,   115,    44,    80,    43,
+     125,    46,   121,    92,    38,    44,    38,    44,    38,    44,
+      38,    44,    76,    77,   126,   131,    89,    96,   106,   115,
+     106,   115,    43,    80,   112,   115,   115,   115,   115,   115,
+     115,   115,   115,   115,   115,   115,   115,   115,   115,   115,
+     115,   115,   115,    89,    20,   115,   111,    20,   115,   115,
+     115,   115,    44,    80,   115,   115,   111,   115,    20,   115,
+     115,   115,   115,   115,   115,   115,   115,   115,   115,   111,
+      89,   112,    89,    95,   111,   115,    20,   128,   115,   115,
+     128,    38,    38,    38,    38,   127,   113,    24,    44,   113,
+      98,   116,    92,    95,    95,   115,   115,   115,   115,   128,
+      95,    99,   112,    44,   115,   112,   112,    20,    92,   129,
+     129,    95,    27,   115,   112,    27,    48,   111,    26,    48,
+     103,   104,   110,    20,   113,   113,   129,    41,   112,   113,
+      32,   113,   102,   103,   105,   110,   111,   104,   112,   106,
+     113,   113,   112,   112,   105,   112,   106,    98,    48,   101,
+      43,    27,   112,    27,    27,    27,    43,   112,   111,   112,
+     111,    27,    41,    32,    32,   113,    98,    99,    41,   112,
+     112
 };
 
 #define yyerrok		(yyerrstatus = 0)
@@ -2471,151 +2563,181 @@ yyreduce:
     break;
 
   case 92:
+#line 417 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->code1(g_lingo->c_itemOf); ;}
+    break;
+
+  case 93:
+#line 418 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->code1(g_lingo->c_itemToOf); ;}
+    break;
+
+  case 94:
 #line 419 "engines/director/lingo/lingo-gr.y"
-    { g_lingo->code1(g_lingo->c_printtop); ;}
+    { g_lingo->code1(g_lingo->c_lineOf); ;}
     break;
 
   case 95:
+#line 420 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->code1(g_lingo->c_lineToOf); ;}
+    break;
+
+  case 96:
+#line 421 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->code1(g_lingo->c_wordOf); ;}
+    break;
+
+  case 97:
 #line 422 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->code1(g_lingo->c_wordToOf); ;}
+    break;
+
+  case 98:
+#line 425 "engines/director/lingo/lingo-gr.y"
+    { g_lingo->code1(g_lingo->c_printtop); ;}
+    break;
+
+  case 101:
+#line 428 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_exitRepeat); ;}
     break;
 
-  case 96:
-#line 423 "engines/director/lingo/lingo-gr.y"
+  case 102:
+#line 429 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeConst(0); // Push fake value on stack
 							  g_lingo->code1(g_lingo->c_procret); ;}
     break;
 
-  case 99:
-#line 427 "engines/director/lingo/lingo-gr.y"
+  case 105:
+#line 433 "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 100:
-#line 430 "engines/director/lingo/lingo-gr.y"
+  case 106:
+#line 436 "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 101:
-#line 433 "engines/director/lingo/lingo-gr.y"
+  case 107:
+#line 439 "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 102:
-#line 436 "engines/director/lingo/lingo-gr.y"
+  case 108:
+#line 442 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeFunc((yyvsp[(1) - (2)].s), (yyvsp[(2) - (2)].narg)); ;}
     break;
 
-  case 103:
-#line 437 "engines/director/lingo/lingo-gr.y"
+  case 109:
+#line 443 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_open); ;}
     break;
 
-  case 104:
-#line 438 "engines/director/lingo/lingo-gr.y"
+  case 110:
+#line 444 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code2(g_lingo->c_voidpush, g_lingo->c_open); ;}
     break;
 
-  case 105:
-#line 439 "engines/director/lingo/lingo-gr.y"
+  case 111:
+#line 445 "engines/director/lingo/lingo-gr.y"
     { Common::String s("sound-"); s += *(yyvsp[(2) - (3)].s); g_lingo->codeFunc(&s, (yyvsp[(3) - (3)].narg)); ;}
     break;
 
-  case 106:
-#line 442 "engines/director/lingo/lingo-gr.y"
+  case 112:
+#line 448 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_global); g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str()); delete (yyvsp[(1) - (1)].s); ;}
     break;
 
-  case 107:
-#line 443 "engines/director/lingo/lingo-gr.y"
+  case 113:
+#line 449 "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 108:
-#line 446 "engines/director/lingo/lingo-gr.y"
+  case 114:
+#line 452 "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 109:
-#line 447 "engines/director/lingo/lingo-gr.y"
+  case 115:
+#line 453 "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 110:
-#line 458 "engines/director/lingo/lingo-gr.y"
+  case 116:
+#line 464 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_gotoloop); ;}
     break;
 
-  case 111:
-#line 459 "engines/director/lingo/lingo-gr.y"
+  case 117:
+#line 465 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_gotonext); ;}
     break;
 
-  case 112:
-#line 460 "engines/director/lingo/lingo-gr.y"
+  case 118:
+#line 466 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_gotoprevious); ;}
     break;
 
-  case 113:
-#line 461 "engines/director/lingo/lingo-gr.y"
+  case 119:
+#line 467 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(1);
 		g_lingo->code1(g_lingo->c_goto); ;}
     break;
 
-  case 114:
-#line 464 "engines/director/lingo/lingo-gr.y"
+  case 120:
+#line 470 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(3);
 		g_lingo->code1(g_lingo->c_goto); ;}
     break;
 
-  case 115:
-#line 467 "engines/director/lingo/lingo-gr.y"
+  case 121:
+#line 473 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(2);
 		g_lingo->code1(g_lingo->c_goto); ;}
     break;
 
-  case 120:
-#line 480 "engines/director/lingo/lingo-gr.y"
+  case 126:
+#line 486 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_playdone); ;}
     break;
 
-  case 121:
-#line 481 "engines/director/lingo/lingo-gr.y"
+  case 127:
+#line 487 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(1);
 		g_lingo->code1(g_lingo->c_play); ;}
     break;
 
-  case 122:
-#line 484 "engines/director/lingo/lingo-gr.y"
+  case 128:
+#line 490 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(3);
 		g_lingo->code1(g_lingo->c_play); ;}
     break;
 
-  case 123:
-#line 487 "engines/director/lingo/lingo-gr.y"
+  case 129:
+#line 493 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(2);
 		g_lingo->code1(g_lingo->c_play); ;}
     break;
 
-  case 124:
-#line 517 "engines/director/lingo/lingo-gr.y"
+  case 130:
+#line 523 "engines/director/lingo/lingo-gr.y"
     { g_lingo->_indef = true; g_lingo->_currentFactory.clear(); ;}
     break;
 
-  case 125:
-#line 518 "engines/director/lingo/lingo-gr.y"
+  case 131:
+#line 524 "engines/director/lingo/lingo-gr.y"
     {
 			g_lingo->codeConst(0); // Push fake value on stack
 			g_lingo->code1(g_lingo->c_procret);
@@ -2623,38 +2745,38 @@ yyreduce:
 			g_lingo->_indef = false; ;}
     break;
 
-  case 126:
-#line 523 "engines/director/lingo/lingo-gr.y"
+  case 132:
+#line 529 "engines/director/lingo/lingo-gr.y"
     {
 			g_lingo->codeFactory(*(yyvsp[(2) - (2)].s));
 		;}
     break;
 
-  case 127:
-#line 526 "engines/director/lingo/lingo-gr.y"
+  case 133:
+#line 532 "engines/director/lingo/lingo-gr.y"
     { g_lingo->_indef = true; ;}
     break;
 
-  case 128:
-#line 527 "engines/director/lingo/lingo-gr.y"
+  case 134:
+#line 533 "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 129:
-#line 531 "engines/director/lingo/lingo-gr.y"
+  case 135:
+#line 537 "engines/director/lingo/lingo-gr.y"
     { g_lingo->_indef = true; g_lingo->_currentFactory.clear(); ;}
     break;
 
-  case 130:
-#line 532 "engines/director/lingo/lingo-gr.y"
+  case 136:
+#line 538 "engines/director/lingo/lingo-gr.y"
     { g_lingo->_ignoreMe = true; ;}
     break;
 
-  case 131:
-#line 532 "engines/director/lingo/lingo-gr.y"
+  case 137:
+#line 538 "engines/director/lingo/lingo-gr.y"
     {
 				g_lingo->codeConst(0); // Push fake value on stack
 				g_lingo->code1(g_lingo->c_procret);
@@ -2668,33 +2790,33 @@ yyreduce:
 			;}
     break;
 
-  case 132:
-#line 544 "engines/director/lingo/lingo-gr.y"
+  case 138:
+#line 550 "engines/director/lingo/lingo-gr.y"
     { (yyval.narg) = 0; ;}
     break;
 
-  case 133:
-#line 545 "engines/director/lingo/lingo-gr.y"
+  case 139:
+#line 551 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeArg((yyvsp[(1) - (1)].s)); (yyval.narg) = 1; ;}
     break;
 
-  case 134:
-#line 546 "engines/director/lingo/lingo-gr.y"
+  case 140:
+#line 552 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeArg((yyvsp[(3) - (3)].s)); (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}
     break;
 
-  case 135:
-#line 547 "engines/director/lingo/lingo-gr.y"
+  case 141:
+#line 553 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeArg((yyvsp[(4) - (4)].s)); (yyval.narg) = (yyvsp[(1) - (4)].narg) + 1; ;}
     break;
 
-  case 136:
-#line 549 "engines/director/lingo/lingo-gr.y"
+  case 142:
+#line 555 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeArgStore(); ;}
     break;
 
-  case 137:
-#line 553 "engines/director/lingo/lingo-gr.y"
+  case 143:
+#line 559 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->code1(g_lingo->c_call);
 		g_lingo->codeString((yyvsp[(1) - (3)].s)->c_str());
@@ -2703,24 +2825,24 @@ yyreduce:
 		g_lingo->code1(numpar); ;}
     break;
 
-  case 138:
-#line 561 "engines/director/lingo/lingo-gr.y"
+  case 144:
+#line 567 "engines/director/lingo/lingo-gr.y"
     { (yyval.narg) = 0; ;}
     break;
 
-  case 139:
-#line 562 "engines/director/lingo/lingo-gr.y"
+  case 145:
+#line 568 "engines/director/lingo/lingo-gr.y"
     { (yyval.narg) = 1; ;}
     break;
 
-  case 140:
-#line 563 "engines/director/lingo/lingo-gr.y"
+  case 146:
+#line 569 "engines/director/lingo/lingo-gr.y"
     { (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}
     break;
 
 
 /* Line 1267 of yacc.c.  */
-#line 2724 "engines/director/lingo/lingo-gr.cpp"
+#line 2846 "engines/director/lingo/lingo-gr.cpp"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2934,6 +3056,6 @@ yyreturn:
 }
 
 
-#line 566 "engines/director/lingo/lingo-gr.y"
+#line 572 "engines/director/lingo/lingo-gr.y"
 
 
diff --git a/engines/director/lingo/lingo-gr.h b/engines/director/lingo/lingo-gr.h
index 11d2db1..27cfd6e 100644
--- a/engines/director/lingo/lingo-gr.h
+++ b/engines/director/lingo/lingo-gr.h
@@ -108,11 +108,14 @@
      tCONTAINS = 324,
      tSTARTS = 325,
      tCHAR = 326,
-     tSPRITE = 327,
-     tINTERSECTS = 328,
-     tWITHIN = 329,
-     tON = 330,
-     tSOUND = 331
+     tITEM = 327,
+     tLINE = 328,
+     tWORD = 329,
+     tSPRITE = 330,
+     tINTERSECTS = 331,
+     tWITHIN = 332,
+     tON = 333,
+     tSOUND = 334
    };
 #endif
 /* Tokens.  */
@@ -185,11 +188,14 @@
 #define tCONTAINS 324
 #define tSTARTS 325
 #define tCHAR 326
-#define tSPRITE 327
-#define tINTERSECTS 328
-#define tWITHIN 329
-#define tON 330
-#define tSOUND 331
+#define tITEM 327
+#define tLINE 328
+#define tWORD 329
+#define tSPRITE 330
+#define tINTERSECTS 331
+#define tWITHIN 332
+#define tON 333
+#define tSOUND 334
 
 
 
@@ -207,7 +213,7 @@ typedef union YYSTYPE
 	Common::Array<double> *arr;
 }
 /* Line 1529 of yacc.c.  */
-#line 211 "engines/director/lingo/lingo-gr.hpp"
+#line 217 "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 4b2af27..a148a9c 100644
--- a/engines/director/lingo/lingo-gr.y
+++ b/engines/director/lingo/lingo-gr.y
@@ -87,7 +87,7 @@ void yyerror(const char *s) {
 %token tMOVIE tNEXT tOF tPREVIOUS tPUT tREPEAT tSET tTHEN tTO tWHEN
 %token tWITH tWHILE tNLELSE tFACTORY tMETHOD tOPEN tPLAY tDONE tPLAYACCEL tINSTANCE
 %token tGE tLE tGT tLT tEQ tNEQ tAND tOR tNOT tMOD
-%token tAFTER tBEFORE tCONCAT tCONTAINS tSTARTS tCHAR
+%token tAFTER tBEFORE tCONCAT tCONTAINS tSTARTS tCHAR tITEM tLINE tWORD
 %token tSPRITE tINTERSECTS tWITHIN
 %token tON tSOUND
 
@@ -414,6 +414,12 @@ expr: INT		{ $$ = g_lingo->codeConst($1); }
 	| tSPRITE expr tWITHIN expr		 	{ g_lingo->code1(g_lingo->c_within); }
 	| tCHAR expr tOF expr				{ g_lingo->code1(g_lingo->c_charOf); }
 	| tCHAR expr tTO expr tOF expr		{ g_lingo->code1(g_lingo->c_charToOf); }
+	| tITEM expr tOF expr				{ g_lingo->code1(g_lingo->c_itemOf); }
+	| tITEM expr tTO expr tOF expr		{ g_lingo->code1(g_lingo->c_itemToOf); }
+	| tLINE expr tOF expr				{ g_lingo->code1(g_lingo->c_lineOf); }
+	| tLINE expr tTO expr tOF expr		{ g_lingo->code1(g_lingo->c_lineToOf); }
+	| tWORD expr tOF expr				{ g_lingo->code1(g_lingo->c_wordOf); }
+	| tWORD expr tTO expr tOF expr		{ g_lingo->code1(g_lingo->c_wordToOf); }
 	;
 
 func: tPUT expr				{ g_lingo->code1(g_lingo->c_printtop); }
diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp
index 54cf786..6a2861c 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 65
-#define YY_END_OF_BUFFER 66
+#define YY_NUM_RULES 68
+#define YY_END_OF_BUFFER 69
 /* This struct is not used in this scanner,
    but its presence is necessary. */
 struct yy_trans_info
@@ -373,33 +373,34 @@ struct yy_trans_info
 	flex_int32_t yy_verify;
 	flex_int32_t yy_nxt;
 	};
-static yyconst flex_int16_t yy_accept[227] =
+static yyconst flex_int16_t yy_accept[236] =
     {   0,
-        0,    0,   66,   64,    3,   62,   62,   64,   64,   64,
-       61,   61,   61,   60,   61,   61,   58,   58,   58,   58,
-       58,   58,   58,   58,   58,   58,   58,   58,   58,   58,
-       58,   58,   58,   58,    2,    2,    3,   62,    0,    0,
-        0,    0,    0,   63,    4,   57,    1,   59,   60,   56,
-       54,   55,   58,   58,   58,   58,   58,   58,   58,   58,
-       58,   58,   58,   58,   58,   22,   12,   58,   58,   58,
-       58,   58,   58,   58,   33,   34,   58,   36,   58,   58,
-       58,   58,   58,   58,   58,   58,   58,   48,   58,   58,
-        2,    2,    0,    4,    1,   59,   58,    6,   58,   58,
-
-       58,   58,   58,   58,   16,   58,   58,   58,   58,    0,
-       58,   58,   58,   58,   58,   29,   58,   58,   32,   58,
-       58,   58,   39,   58,   41,   58,   58,   58,   58,   58,
-       58,   58,    0,   58,   58,    8,   58,   10,   11,   15,
-       18,   58,   58,   58,    0,   58,   58,   25,   26,   58,
-       58,   58,   31,   35,   37,   58,   58,   58,   58,   58,
-        0,   47,   52,   58,   50,   14,    5,   58,   58,   58,
-       19,   58,   21,   58,   58,   27,   58,   30,   58,   58,
-       42,   58,   58,   46,   46,   53,   58,    0,    7,   58,
-       58,   20,   58,   58,   28,   58,   40,   49,   43,    0,
-
-       46,   51,    0,   58,   17,   58,   58,   58,    0,   46,
-       13,    9,   23,   58,   38,    0,   46,   58,    0,    0,
-       24,   45,    0,    0,   44,    0
+        0,    0,   69,   67,    3,   65,   65,   67,   67,   67,
+       64,   64,   64,   63,   64,   64,   61,   61,   61,   61,
+       61,   61,   61,   61,   61,   61,   61,   61,   61,   61,
+       61,   61,   61,   61,    2,    2,    3,   65,    0,    0,
+        0,    0,    0,   66,    4,   60,    1,   62,   63,   59,
+       57,   58,   61,   61,   61,   61,   61,   61,   61,   61,
+       61,   61,   61,   61,   61,   22,   12,   61,   61,   61,
+       61,   61,   61,   61,   61,   61,   35,   36,   61,   38,
+       61,   61,   61,   61,   61,   61,   61,   61,   61,   50,
+       61,   61,   61,    2,    2,    0,    4,    1,   62,   61,
+
+        6,   61,   61,   61,   61,   61,   61,   16,   61,   61,
+       61,   61,    0,   61,   61,   61,   61,   61,   61,   61,
+       31,   61,   61,   34,   61,   61,   61,   41,   61,   43,
+       61,   61,   61,   61,   61,   61,   61,   61,    0,   61,
+       61,    8,   61,   10,   11,   15,   18,   61,   61,   61,
+        0,   61,   61,   25,   26,   27,   28,   61,   61,   61,
+       33,   37,   39,   61,   61,   61,   61,   61,    0,   49,
+       54,   61,   52,   56,   14,    5,   61,   61,   61,   19,
+       61,   21,   61,   61,   29,   61,   32,   61,   61,   44,
+       61,   61,   48,   48,   55,   61,    0,    7,   61,   61,
+
+       20,   61,   61,   30,   61,   42,   51,   45,    0,   48,
+       53,    0,   61,   17,   61,   61,   61,    0,   48,   13,
+        9,   23,   61,   40,    0,   48,   61,    0,    0,   24,
+       47,    0,    0,   46,    0
     } ;
 
 static yyconst flex_int32_t yy_ec[256] =
@@ -445,67 +446,69 @@ static yyconst flex_int32_t yy_meta[64] =
         5,    5,    5
     } ;
 
-static yyconst flex_int16_t yy_base[234] =
+static yyconst flex_int16_t yy_base[243] =
     {   0,
-        0,   62,  228,  553,   66,   70,   74,   78,  205,    0,
-      553,  161,  156,   54,   70,  135,   65,   67,   68,   60,
-       70,   86,   75,    0,   78,   76,   94,  111,  113,  118,
-      106,  128,  123,  131,  185,  189,  193,  553,  197,  158,
-      202,   83,  132,  553,    0,  553,    0,   95,  125,  553,
-      553,  553,    0,  127,  164,  163,  194,  184,  187,  180,
-      197,  193,  200,  203,  185,   90,    0,  192,  192,  209,
-      195,  215,  192,  197,    0,    0,  212,    0,  217,  220,
-      212,  226,  226,  226,  230,  247,  244,    0,  247,  232,
-      274,  295,  236,    0,    0,   76,  261,    0,  254,  255,
-
-      257,  274,  273,  275,    0,  268,  269,  277,  288,  307,
-      274,  293,  280,  284,  291,    0,  293,  287,    0,  295,
-      285,  293,    0,  298,    0,  303,  309,  303,  347,  308,
-      311,  321,  331,  318,  322,    0,  340,    0,    0,    0,
-        0,  333,  337,  347,  337,  348,  335,    0,    0,  339,
-      341,  351,    0,    0,    0,  348,  357,  358,  345,  346,
-      382,    0,    0,  363,  361,   98,    0,  373,  371,  368,
-        0,  375,  553,  377,  373,    0,  388,    0,  380,  377,
-        0,  392,  381,  170,  411,    0,  389,  421,    0,  391,
-      383,    0,  409,  408,    0,  396,    0,    0,    0,  442,
-
-      446,    0,  413,  403,    0,  420,  431,  423,  429,  452,
-      553,    0,    0,  424,    0,  218,  459,  430,  467,  471,
-        0,  479,  446,  483,  488,  553,  524,  526,  529,  532,
-      538,  543,  547
+        0,   62,  201,  569,   66,   70,   74,   78,  193,    0,
+      569,  184,  182,   54,   70,  158,   65,   67,   68,   60,
+       70,   86,   75,    0,  102,   85,  117,  106,  135,  118,
+       79,  149,  118,  161,  193,  213,  217,  569,  221,  225,
+      229,   79,  139,  569,    0,  569,    0,   98,   95,  569,
+      569,  569,    0,   97,  120,  136,  145,  121,  176,  119,
+      156,  156,  193,  213,  159,   90,    0,  205,  215,  212,
+      212,  224,  210,  233,  209,  214,    0,    0,  230,    0,
+      235,  233,  221,  226,  223,  223,  227,  245,  246,    0,
+      264,  239,  255,  296,  300,  257,    0,    0,   76,  265,
+
+        0,  263,  262,  261,  276,  278,  287,    0,  278,  281,
+      290,  291,  318,  288,  305,  297,  306,  299,  299,  312,
+        0,  313,  306,    0,  314,  304,  308,    0,  318,    0,
+      317,  323,  317,  352,  331,  335,  333,  346,  350,  342,
+      343,    0,  355,    0,    0,    0,    0,  348,  358,  366,
+      355,  370,  356,    0,    0,    0,    0,  360,  362,  372,
+        0,    0,    0,  369,  378,  378,  366,  368,  404,    0,
+        0,  385,  386,    0,   98,    0,  394,  392,  388,    0,
+      395,  569,  395,  392,    0,  408,    0,  400,  397,    0,
+      412,  401,  138,  431,    0,  412,  441,    0,  414,  409,
+
+        0,  420,  430,    0,  419,    0,    0,    0,  454,  465,
+        0,  430,  427,    0,  448,  451,  438,  452,  472,  569,
+        0,    0,  445,    0,  241,  480,  447,  486,  487,    0,
+      494,  466,  500,  506,  569,  540,  542,  545,  548,  554,
+      559,  563
     } ;
 
-static yyconst flex_int16_t yy_def[234] =
+static yyconst flex_int16_t yy_def[243] =
     {   0,
-      226,    1,  226,  226,  226,  226,  226,  226,  227,  228,
-      226,  226,  226,  226,  226,  226,  229,  229,  229,  229,
-      229,  229,  229,  229,  229,  229,  229,  229,  229,  229,
-      229,  229,  229,  229,  226,  226,  226,  226,  226,  226,
-      226,  226,  227,  226,  230,  226,  231,  226,  226,  226,
-      226,  226,  229,  229,  229,  229,  229,  229,  229,  229,
-      229,  229,  229,  229,  229,  229,  229,  229,  229,  229,
-      229,  229,  229,  229,  229,  229,  229,  229,  229,  229,
-      229,  229,  229,  229,  229,  229,  229,  229,  229,  229,
-      226,  226,  226,  230,  231,  226,  229,  229,  229,  229,
-
-      229,  229,  229,  229,  229,  229,  229,  229,  229,  226,
-      229,  229,  229,  229,  229,  229,  229,  229,  229,  229,
-      229,  229,  229,  229,  229,  229,  229,  229,  229,  229,
-      229,  229,  226,  229,  229,  229,  229,  229,  229,  229,
-      229,  229,  229,  229,  226,  229,  229,  229,  229,  229,
-      229,  229,  229,  229,  229,  229,  229,  229,  229,  229,
-      232,  229,  229,  229,  229,  226,  229,  229,  229,  229,
-      229,  229,  226,  229,  229,  229,  229,  229,  229,  229,
-      229,  229,  229,  232,  232,  229,  229,  226,  229,  229,
-      229,  229,  229,  229,  229,  229,  229,  229,  229,  226,
-
-      232,  229,  226,  229,  229,  229,  229,  229,  226,  232,
-      226,  229,  229,  229,  229,  226,  232,  229,  233,  226,
-      229,  233,  226,  226,  233,    0,  226,  226,  226,  226,
-      226,  226,  226
+      235,    1,  235,  235,  235,  235,  235,  235,  236,  237,
+      235,  235,  235,  235,  235,  235,  238,  238,  238,  238,
+      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
+      238,  238,  238,  238,  235,  235,  235,  235,  235,  235,
+      235,  235,  236,  235,  239,  235,  240,  235,  235,  235,
+      235,  235,  238,  238,  238,  238,  238,  238,  238,  238,
+      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
+      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
+      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
+      238,  238,  238,  235,  235,  235,  239,  240,  235,  238,
+
+      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
+      238,  238,  235,  238,  238,  238,  238,  238,  238,  238,
+      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
+      238,  238,  238,  238,  238,  238,  238,  238,  235,  238,
+      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
+      235,  238,  238,  238,  238,  238,  238,  238,  238,  238,
+      238,  238,  238,  238,  238,  238,  238,  238,  241,  238,
+      238,  238,  238,  238,  235,  238,  238,  238,  238,  238,
+      238,  235,  238,  238,  238,  238,  238,  238,  238,  238,
+      238,  238,  241,  241,  238,  238,  235,  238,  238,  238,
+
+      238,  238,  238,  238,  238,  238,  238,  238,  235,  241,
+      238,  235,  238,  238,  238,  238,  238,  235,  241,  235,
+      238,  238,  238,  238,  235,  241,  238,  242,  235,  238,
+      242,  235,  235,  242,    0,  235,  235,  235,  235,  235,
+      235,  235
     } ;
 
-static yyconst flex_int16_t yy_nxt[617] =
+static yyconst flex_int16_t yy_nxt[633] =
     {   0,
         4,    5,    6,    7,    8,    9,   10,   11,   12,   13,
         4,   14,   15,   11,   16,   17,   18,   19,   20,   21,
@@ -515,69 +518,71 @@ static yyconst flex_int16_t yy_nxt[617] =
        27,   28,   29,   30,   24,   31,   32,   33,   24,   24,
        34,   24,   24,   35,   48,   49,   36,   37,   38,   38,
        39,   40,   41,   41,   40,   40,   41,   41,   40,   39,
-       38,   38,   39,   50,   51,   54,   56,   96,   59,   42,
-       57,  110,   55,   42,  110,   60,   58,   61,   67,  188,
+       38,   38,   39,   50,   51,   54,   56,   99,   59,   42,
+       57,  113,   55,   42,  113,   60,   58,   61,   84,  197,
 
-       65,   63,  188,   66,   69,   68,   96,   62,   93,   70,
+       65,   63,  197,   66,   96,   48,   49,   62,   70,   99,
        54,   56,   59,   71,   42,   57,   55,   64,   42,   60,
-       58,   61,   72,   67,   65,   82,   63,   66,   69,   68,
-       73,   62,   93,   75,   70,   48,   49,   44,   71,   74,
-       76,   64,   77,   79,   78,   87,   72,   83,   52,   80,
-       82,   88,   81,   89,   90,   73,   84,   85,   75,   40,
-       97,   86,   40,   74,   76,   47,   77,   79,   78,   46,
-       87,  200,   83,   80,  200,   88,   81,   42,   89,   90,
-       84,   85,   98,   99,   97,   86,   91,   38,   38,   92,
-       92,   38,   38,   92,   37,   38,   38,   39,   39,   38,
-
-       38,   39,   42,   40,   41,   41,   40,   98,   99,  100,
-       44,  101,  104,  109,  102,  105,  106,  107,  108,  219,
-      113,   42,  219,  103,  111,  112,  114,  226,  115,  118,
-      119,  120,  121,  116,  100,  101,  104,  109,  102,  122,
-      105,  106,  107,  108,  113,  123,   42,  103,  111,  112,
-      117,  114,  115,  118,  119,  124,  120,  121,  116,  125,
-      126,  127,  128,  129,  122,  132,  130,  226,  133,  123,
-      131,  226,  226,  226,  117,   91,   38,   38,   92,  124,
-      134,  226,  135,  125,  126,  127,  136,  128,  129,  132,
-      137,  130,  133,  138,  140,  131,   92,   38,   38,   92,
-
-      139,  141,  142,  143,  144,  134,  135,  146,  110,  149,
-      136,  110,  147,  151,  137,  150,  152,  157,  138,  140,
-      153,  148,  154,  155,  139,  141,  142,  143,  156,  144,
-      158,  146,  159,  149,  160,  163,  164,  147,  151,  150,
-      145,  152,  157,  165,  153,  148,  154,  155,  161,  167,
-      166,  161,  156,  168,  158,  169,  171,  159,  160,  163,
-      164,  170,  172,  174,  145,  173,  175,  176,  165,  177,
-      178,  179,  180,  167,  162,  166,  181,  168,  182,  183,
-      169,  171,  186,  161,  187,  170,  161,  172,  174,  173,
-      175,  176,  189,  177,  190,  178,  179,  180,  162,  191,
-
-      192,  181,  182,  183,  193,  194,  195,  186,  196,  187,
-      197,  198,  200,  199,  185,  200,  202,  189,  204,  190,
-      226,  205,  188,  191,  192,  188,  206,  207,  193,  194,
-      208,  195,  196,  211,  197,  212,  198,  199,  185,  213,
-      202,  201,  204,  200,  203,  205,  200,  200,  214,  216,
-      200,  206,  207,  200,  208,  215,  200,  218,  211,  212,
-      220,  226,  221,  220,  213,  201,  224,  226,  219,  203,
-      209,  219,  220,  214,  216,  220,  226,  210,  226,  215,
-      226,  218,  226,  226,  225,  217,  221,  225,  226,  225,
-      226,  224,  225,  226,  209,  226,  226,  226,  226,  223,
-
-      226,  210,  226,  226,  226,  226,  226,  226,  226,  217,
-      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
-      226,  226,  226,  223,   43,   43,  226,   43,   43,   43,
-       45,   45,   53,   53,   53,   94,   94,   94,   95,   95,
-      226,   95,   95,   95,  184,  226,  226,  184,  222,  226,
-      226,  222,    3,  226,  226,  226,  226,  226,  226,  226,
-      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
-      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
-      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
-      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
-
-      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
-      226,  226,  226,  226,  226,  226
+       58,   61,   67,   84,   65,   75,   63,   66,   96,   68,
+      100,   62,   72,   70,   76,   69,   73,   71,  101,  209,
+       89,   64,  209,   81,   44,   74,   90,   67,  104,   82,
+       75,  107,   83,   68,  100,   77,  102,   72,   76,   69,
+      103,   73,   78,  101,   79,   89,   80,   81,   85,   74,
+       90,   52,  104,   82,  108,  107,   83,   86,   87,  109,
+       77,  102,   88,   91,   92,  103,   78,  112,   79,   93,
+       80,   47,   46,   85,   94,   38,   38,   95,   44,  108,
+
+      235,   86,   87,  105,  109,  235,   88,  235,   91,   92,
+      110,  112,  106,   93,   95,   38,   38,   95,   37,   38,
+       38,   39,   39,   38,   38,   39,   40,  105,  111,   40,
+       40,   41,   41,   40,  116,  110,  106,  114,  115,  117,
+      118,  119,  228,  120,   42,  228,  123,  124,   42,  125,
+      126,  121,  127,  111,  128,  129,  130,  131,  132,  116,
+      133,  114,  115,  117,  118,  134,  119,  120,  122,   42,
+      123,  124,  137,   42,  125,  126,  121,  127,  128,  129,
+      130,  131,  132,  135,  140,  133,  138,  136,  235,  139,
+      134,  141,  122,  142,  143,  144,  137,   94,   38,   38,
+
+       95,   95,   38,   38,   95,  145,  146,  150,  135,  140,
+      138,  147,  136,  139,  148,  141,  149,  142,  143,  113,
+      144,  152,  113,  155,  153,  156,  235,  235,  157,  145,
+      158,  146,  150,  154,  159,  147,  160,  165,  148,  161,
+      149,  162,  163,  164,  166,  152,  167,  155,  168,  153,
+      156,  151,  157,  169,  158,  173,  169,  154,  171,  159,
+      172,  160,  165,  161,  174,  162,  163,  164,  166,  175,
+      178,  167,  168,  176,  177,  151,  179,  180,  235,  170,
+      173,  181,  171,  182,  172,  183,  235,  184,  185,  174,
+      186,  187,  188,  189,  175,  178,  190,  176,  177,  191,
+
+      179,  192,  180,  170,  195,  169,  181,  182,  169,  196,
+      183,  184,  185,  198,  186,  199,  187,  188,  189,  200,
+      201,  190,  202,  191,  203,  192,  204,  235,  205,  195,
+      206,  207,  209,  208,  196,  209,  194,  215,  198,  211,
+      199,  213,  197,  200,  201,  197,  202,  214,  203,  216,
+      220,  204,  205,  217,  206,  209,  207,  208,  209,  221,
+      194,  210,  215,  211,  212,  213,  209,  222,  223,  209,
+      224,  214,  225,  209,  216,  220,  209,  217,  227,  230,
+      235,  229,  218,  221,  229,  210,  233,  228,  229,  212,
+      228,  229,  222,  223,  224,  235,  219,  225,  235,  235,
+
+      235,  234,  227,  230,  234,  226,  218,  234,  235,  235,
+      234,  233,  235,  235,  235,  232,  235,  235,  235,  235,
+      219,  235,  235,  235,  235,  235,  235,  235,  235,  226,
+      235,  235,  235,  235,  235,  235,  235,  235,  235,  232,
+       43,   43,  235,   43,   43,   43,   45,   45,   53,   53,
+       53,   97,   97,   97,   98,   98,  235,   98,   98,   98,
+      193,  235,  235,  193,  231,  235,  235,  231,    3,  235,
+      235,  235,  235,  235,  235,  235,  235,  235,  235,  235,
+      235,  235,  235,  235,  235,  235,  235,  235,  235,  235,
+      235,  235,  235,  235,  235,  235,  235,  235,  235,  235,
+
+      235,  235,  235,  235,  235,  235,  235,  235,  235,  235,
+      235,  235,  235,  235,  235,  235,  235,  235,  235,  235,
+      235,  235,  235,  235,  235,  235,  235,  235,  235,  235,
+      235,  235
     } ;
 
-static yyconst flex_int16_t yy_chk[617] =
+static yyconst flex_int16_t yy_chk[633] =
     {   0,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -587,66 +592,68 @@ static yyconst flex_int16_t yy_chk[617] =
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    2,   14,   14,    2,    5,    5,    5,
         5,    6,    6,    6,    6,    7,    7,    7,    7,    8,
-        8,    8,    8,   15,   15,   17,   18,   96,   20,    6,
-       19,   66,   17,    7,   66,   21,   19,   21,   25,  166,
-
-       23,   22,  166,   23,   26,   25,   48,   21,   42,   27,
-       17,   18,   20,   27,    6,   19,   17,   22,    7,   21,
-       19,   21,   27,   25,   23,   31,   22,   23,   26,   25,
-       28,   21,   42,   29,   27,   49,   49,   43,   27,   28,
-       29,   22,   29,   30,   29,   33,   27,   32,   16,   30,
-       31,   33,   30,   34,   34,   28,   32,   32,   29,   40,
-       54,   32,   40,   28,   29,   13,   29,   30,   29,   12,
-       33,  184,   32,   30,  184,   33,   30,   40,   34,   34,
-       32,   32,   55,   56,   54,   32,   35,   35,   35,   35,
-       36,   36,   36,   36,   37,   37,   37,   37,   39,   39,
-
-       39,   39,   40,   41,   41,   41,   41,   55,   56,   57,
-        9,   58,   60,   65,   59,   61,   62,   63,   64,  216,
-       69,   41,  216,   59,   68,   68,   70,    3,   71,   73,
-       74,   77,   79,   72,   57,   58,   60,   65,   59,   80,
-       61,   62,   63,   64,   69,   81,   41,   59,   68,   68,
-       72,   70,   71,   73,   74,   82,   77,   79,   72,   83,
-       84,   85,   86,   87,   80,   90,   89,    0,   93,   81,
-       89,    0,    0,    0,   72,   91,   91,   91,   91,   82,
-       97,    0,   99,   83,   84,   85,  100,   86,   87,   90,
-      101,   89,   93,  102,  104,   89,   92,   92,   92,   92,
-
-      103,  106,  107,  108,  109,   97,   99,  111,  110,  113,
-      100,  110,  112,  115,  101,  114,  117,  124,  102,  104,
-      118,  112,  120,  121,  103,  106,  107,  108,  122,  109,
-      126,  111,  127,  113,  128,  130,  131,  112,  115,  114,
-      110,  117,  124,  132,  118,  112,  120,  121,  129,  134,
-      133,  129,  122,  135,  126,  137,  143,  127,  128,  130,
-      131,  142,  144,  146,  110,  145,  147,  150,  132,  151,
-      152,  156,  157,  134,  129,  133,  158,  135,  159,  160,
-      137,  143,  164,  161,  165,  142,  161,  144,  146,  145,
-      147,  150,  168,  151,  169,  152,  156,  157,  129,  170,
-
-      172,  158,  159,  160,  174,  175,  177,  164,  179,  165,
-      180,  182,  185,  183,  161,  185,  187,  168,  190,  169,
-        0,  191,  188,  170,  172,  188,  193,  194,  174,  175,
-      196,  177,  179,  203,  180,  204,  182,  183,  161,  206,
-      187,  185,  190,  200,  188,  191,  200,  201,  207,  209,
-      201,  193,  194,  210,  196,  208,  210,  214,  203,  204,
-      217,    0,  218,  217,  206,  185,  223,    0,  219,  188,
-      200,  219,  220,  207,  209,  220,    0,  201,    0,  208,
-      222,  214,    0,  222,  224,  210,  218,  224,    0,  225,
-        0,  223,  225,    0,  200,    0,    0,    0,    0,  220,
-
-        0,  201,    0,    0,    0,    0,    0,    0,    0,  210,
-        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-        0,    0,    0,  220,  227,  227,    0,  227,  227,  227,
-      228,  228,  229,  229,  229,  230,  230,  230,  231,  231,
-        0,  231,  231,  231,  232,    0,    0,  232,  233,    0,
-        0,  233,  226,  226,  226,  226,  226,  226,  226,  226,
-      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
-      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
-      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
-      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
-
-      226,  226,  226,  226,  226,  226,  226,  226,  226,  226,
-      226,  226,  226,  226,  226,  226
+        8,    8,    8,   15,   15,   17,   18,   99,   20,    6,
+       19,   66,   17,    7,   66,   21,   19,   21,   31,  175,
+
+       23,   22,  175,   23,   42,   49,   49,   21,   26,   48,
+       17,   18,   20,   26,    6,   19,   17,   22,    7,   21,
+       19,   21,   25,   31,   23,   28,   22,   23,   42,   25,
+       54,   21,   27,   26,   28,   25,   27,   26,   55,  193,
+       33,   22,  193,   30,   43,   27,   33,   25,   58,   30,
+       28,   60,   30,   25,   54,   29,   56,   27,   28,   25,
+       57,   27,   29,   55,   29,   33,   29,   30,   32,   27,
+       33,   16,   58,   30,   61,   60,   30,   32,   32,   62,
+       29,   56,   32,   34,   34,   57,   29,   65,   29,   34,
+       29,   13,   12,   32,   35,   35,   35,   35,    9,   61,
+
+        3,   32,   32,   59,   62,    0,   32,    0,   34,   34,
+       63,   65,   59,   34,   36,   36,   36,   36,   37,   37,
+       37,   37,   39,   39,   39,   39,   40,   59,   64,   40,
+       41,   41,   41,   41,   69,   63,   59,   68,   68,   70,
+       71,   72,  225,   73,   40,  225,   75,   76,   41,   79,
+       81,   74,   82,   64,   83,   84,   85,   86,   87,   69,
+       88,   68,   68,   70,   71,   89,   72,   73,   74,   40,
+       75,   76,   92,   41,   79,   81,   74,   82,   83,   84,
+       85,   86,   87,   91,  100,   88,   93,   91,    0,   96,
+       89,  102,   74,  103,  104,  105,   92,   94,   94,   94,
+
+       94,   95,   95,   95,   95,  106,  107,  112,   91,  100,
+       93,  109,   91,   96,  110,  102,  111,  103,  104,  113,
+      105,  114,  113,  116,  115,  117,    0,    0,  118,  106,
+      119,  107,  112,  115,  120,  109,  122,  129,  110,  123,
+      111,  125,  126,  127,  131,  114,  132,  116,  133,  115,
+      117,  113,  118,  134,  119,  137,  134,  115,  135,  120,
+      136,  122,  129,  123,  138,  125,  126,  127,  131,  139,
+      143,  132,  133,  140,  141,  113,  148,  149,    0,  134,
+      137,  150,  135,  151,  136,  152,    0,  153,  158,  138,
+      159,  160,  164,  165,  139,  143,  166,  140,  141,  167,
+
+      148,  168,  149,  134,  172,  169,  150,  151,  169,  173,
+      152,  153,  158,  177,  159,  178,  160,  164,  165,  179,
+      181,  166,  183,  167,  184,  168,  186,    0,  188,  172,
+      189,  191,  194,  192,  173,  194,  169,  202,  177,  196,
+      178,  199,  197,  179,  181,  197,  183,  200,  184,  203,
+      212,  186,  188,  205,  189,  209,  191,  192,  209,  213,
+      169,  194,  202,  196,  197,  199,  210,  215,  216,  210,
+      217,  200,  218,  219,  203,  212,  219,  205,  223,  227,
+        0,  226,  209,  213,  226,  194,  232,  228,  229,  197,
+      228,  229,  215,  216,  217,  231,  210,  218,  231,    0,
+
+        0,  233,  223,  227,  233,  219,  209,  234,    0,    0,
+      234,  232,    0,    0,    0,  229,    0,    0,    0,    0,
+      210,    0,    0,    0,    0,    0,    0,    0,    0,  219,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,  229,
+      236,  236,    0,  236,  236,  236,  237,  237,  238,  238,
+      238,  239,  239,  239,  240,  240,    0,  240,  240,  240,
+      241,    0,    0,  241,  242,    0,    0,  242,  235,  235,
+      235,  235,  235,  235,  235,  235,  235,  235,  235,  235,
+      235,  235,  235,  235,  235,  235,  235,  235,  235,  235,
+      235,  235,  235,  235,  235,  235,  235,  235,  235,  235,
+
+      235,  235,  235,  235,  235,  235,  235,  235,  235,  235,
+      235,  235,  235,  235,  235,  235,  235,  235,  235,  235,
+      235,  235,  235,  235,  235,  235,  235,  235,  235,  235,
+      235,  235
     } ;
 
 static yy_state_type yy_last_accepting_state;
@@ -720,7 +727,7 @@ static void countnl() {
 	g_lingo->_colnumber = strlen(p);
 }
 
-#line 724 "engines/director/lingo/lingo-lex.cpp"
+#line 731 "engines/director/lingo/lingo-lex.cpp"
 
 #define INITIAL 0
 
@@ -908,7 +915,7 @@ YY_DECL
 #line 69 "engines/director/lingo/lingo-lex.l"
 
 
-#line 912 "engines/director/lingo/lingo-lex.cpp"
+#line 919 "engines/director/lingo/lingo-lex.cpp"
 
 	if ( !(yy_init) )
 		{
@@ -962,13 +969,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 >= 227 )
+				if ( yy_current_state >= 236 )
 					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] != 553 );
+		while ( yy_base[yy_current_state] != 569 );
 
 yy_find_action:
 		yy_act = yy_accept[yy_current_state];
@@ -1122,96 +1129,106 @@ YY_RULE_SETUP
 case 26:
 YY_RULE_SETUP
 #line 98 "engines/director/lingo/lingo-lex.l"
-{ count(); return tLOOP; }
+{ count(); return tITEM; }
 	YY_BREAK
 case 27:
 YY_RULE_SETUP
 #line 99 "engines/director/lingo/lingo-lex.l"
-{ count(); return tMACRO; }
+{ count(); return tLINE; }
 	YY_BREAK
 case 28:
 YY_RULE_SETUP
 #line 100 "engines/director/lingo/lingo-lex.l"
-{ count(); return tMETHOD; }
+{ count(); return tLOOP; }
 	YY_BREAK
 case 29:
 YY_RULE_SETUP
 #line 101 "engines/director/lingo/lingo-lex.l"
-{ count(); return tMOD; }
+{ count(); return tMACRO; }
 	YY_BREAK
 case 30:
 YY_RULE_SETUP
 #line 102 "engines/director/lingo/lingo-lex.l"
-{ count(); return tMOVIE; }
+{ count(); return tMETHOD; }
 	YY_BREAK
 case 31:
 YY_RULE_SETUP
 #line 103 "engines/director/lingo/lingo-lex.l"
-{ count(); return tNEXT; }
+{ count(); return tMOD; }
 	YY_BREAK
 case 32:
 YY_RULE_SETUP
 #line 104 "engines/director/lingo/lingo-lex.l"
-{ count(); return tNOT; }
+{ count(); return tMOVIE; }
 	YY_BREAK
 case 33:
 YY_RULE_SETUP
 #line 105 "engines/director/lingo/lingo-lex.l"
-{ count(); return tOF; }
+{ count(); return tNEXT; }
 	YY_BREAK
 case 34:
 YY_RULE_SETUP
 #line 106 "engines/director/lingo/lingo-lex.l"
-{ count(); return tON; }		// D3
+{ count(); return tNOT; }
 	YY_BREAK
 case 35:
 YY_RULE_SETUP
 #line 107 "engines/director/lingo/lingo-lex.l"
-{ count(); return tOPEN; }
+{ count(); return tOF; }
 	YY_BREAK
 case 36:
 YY_RULE_SETUP
 #line 108 "engines/director/lingo/lingo-lex.l"
-{ count(); return tOR; }
+{ count(); return tON; }		// D3
 	YY_BREAK
 case 37:
 YY_RULE_SETUP
 #line 109 "engines/director/lingo/lingo-lex.l"
-{ count(); return tPLAY; }
+{ count(); return tOPEN; }
 	YY_BREAK
 case 38:
 YY_RULE_SETUP
 #line 110 "engines/director/lingo/lingo-lex.l"
-{ count(); return tPREVIOUS; }
+{ count(); return tOR; }
 	YY_BREAK
 case 39:
 YY_RULE_SETUP
 #line 111 "engines/director/lingo/lingo-lex.l"
-{ count(); return tPUT; }
+{ count(); return tPLAY; }
 	YY_BREAK
 case 40:
 YY_RULE_SETUP
 #line 112 "engines/director/lingo/lingo-lex.l"
-{ count(); return tREPEAT; }
+{ count(); return tPREVIOUS; }
 	YY_BREAK
 case 41:
 YY_RULE_SETUP
 #line 113 "engines/director/lingo/lingo-lex.l"
-{ count(); return tSET; }
+{ count(); return tPUT; }
 	YY_BREAK
 case 42:
 YY_RULE_SETUP
 #line 114 "engines/director/lingo/lingo-lex.l"
-{ count(); return tSOUND; }		// D3
+{ count(); return tREPEAT; }
 	YY_BREAK
 case 43:
 YY_RULE_SETUP
 #line 115 "engines/director/lingo/lingo-lex.l"
-{ count(); return tSTARTS; }
+{ count(); return tSET; }
 	YY_BREAK
 case 44:
 YY_RULE_SETUP
 #line 116 "engines/director/lingo/lingo-lex.l"
+{ count(); return tSOUND; }		// D3
+	YY_BREAK
+case 45:
+YY_RULE_SETUP
+#line 117 "engines/director/lingo/lingo-lex.l"
+{ count(); return tSTARTS; }
+	YY_BREAK
+case 46:
+YY_RULE_SETUP
+#line 118 "engines/director/lingo/lingo-lex.l"
 {
 		count();
 
@@ -1221,9 +1238,9 @@ YY_RULE_SETUP
 		return THEENTITYWITHID;
 	}
 	YY_BREAK
-case 45:
+case 47:
 YY_RULE_SETUP
-#line 124 "engines/director/lingo/lingo-lex.l"
+#line 126 "engines/director/lingo/lingo-lex.l"
 {
 		count();
 
@@ -1265,9 +1282,9 @@ YY_RULE_SETUP
 		warning("Unhandled the entity %s", ptr);
 	}
 	YY_BREAK
-case 46:
+case 48:
 YY_RULE_SETUP
-#line 164 "engines/director/lingo/lingo-lex.l"
+#line 166 "engines/director/lingo/lingo-lex.l"
 {
 		count();
 
@@ -1288,64 +1305,69 @@ YY_RULE_SETUP
 		warning("Unhandled the entity %s", ptr);
 	}
 	YY_BREAK
-case 47:
-YY_RULE_SETUP
-#line 183 "engines/director/lingo/lingo-lex.l"
-{ count(); return tTHEN; }
-	YY_BREAK
-case 48:
-YY_RULE_SETUP
-#line 184 "engines/director/lingo/lingo-lex.l"
-{ count(); return tTO; }
-	YY_BREAK
 case 49:
 YY_RULE_SETUP
 #line 185 "engines/director/lingo/lingo-lex.l"
-{ count(); return tSPRITE; }
+{ count(); return tTHEN; }
 	YY_BREAK
 case 50:
 YY_RULE_SETUP
 #line 186 "engines/director/lingo/lingo-lex.l"
-{ count(); return tWITH; }
+{ count(); return tTO; }
 	YY_BREAK
 case 51:
 YY_RULE_SETUP
 #line 187 "engines/director/lingo/lingo-lex.l"
-{ count(); return tWITHIN; }
+{ count(); return tSPRITE; }
 	YY_BREAK
 case 52:
 YY_RULE_SETUP
 #line 188 "engines/director/lingo/lingo-lex.l"
-{ count(); return tWHEN; }
+{ count(); return tWITH; }
 	YY_BREAK
 case 53:
 YY_RULE_SETUP
 #line 189 "engines/director/lingo/lingo-lex.l"
-{ count(); return tWHILE; }
+{ count(); return tWITHIN; }
 	YY_BREAK
 case 54:
 YY_RULE_SETUP
-#line 191 "engines/director/lingo/lingo-lex.l"
-{ count(); return tNEQ; }
+#line 190 "engines/director/lingo/lingo-lex.l"
+{ count(); return tWHEN; }
 	YY_BREAK
 case 55:
 YY_RULE_SETUP
-#line 192 "engines/director/lingo/lingo-lex.l"
-{ count(); return tGE; }
+#line 191 "engines/director/lingo/lingo-lex.l"
+{ count(); return tWHILE; }
 	YY_BREAK
 case 56:
 YY_RULE_SETUP
-#line 193 "engines/director/lingo/lingo-lex.l"
-{ count(); return tLE; }
+#line 192 "engines/director/lingo/lingo-lex.l"
+{ count(); return tWORD; }
 	YY_BREAK
 case 57:
 YY_RULE_SETUP
 #line 194 "engines/director/lingo/lingo-lex.l"
-{ count(); return tCONCAT; }
+{ count(); return tNEQ; }
 	YY_BREAK
 case 58:
 YY_RULE_SETUP
+#line 195 "engines/director/lingo/lingo-lex.l"
+{ count(); return tGE; }
+	YY_BREAK
+case 59:
+YY_RULE_SETUP
 #line 196 "engines/director/lingo/lingo-lex.l"
+{ count(); return tLE; }
+	YY_BREAK
+case 60:
+YY_RULE_SETUP
+#line 197 "engines/director/lingo/lingo-lex.l"
+{ count(); return tCONCAT; }
+	YY_BREAK
+case 61:
+YY_RULE_SETUP
+#line 199 "engines/director/lingo/lingo-lex.l"
 {
 		count();
 		yylval.s = new Common::String(yytext);
@@ -1376,43 +1398,43 @@ YY_RULE_SETUP
 		return ID;
 	}
 	YY_BREAK
-case 59:
+case 62:
 YY_RULE_SETUP
-#line 225 "engines/director/lingo/lingo-lex.l"
+#line 228 "engines/director/lingo/lingo-lex.l"
 { count(); yylval.f = atof(yytext); return FLOAT; }
 	YY_BREAK
-case 60:
+case 63:
 YY_RULE_SETUP
-#line 226 "engines/director/lingo/lingo-lex.l"
+#line 229 "engines/director/lingo/lingo-lex.l"
 { count(); yylval.i = strtol(yytext, NULL, 10); return INT; }
 	YY_BREAK
-case 61:
+case 64:
 YY_RULE_SETUP
-#line 227 "engines/director/lingo/lingo-lex.l"
+#line 230 "engines/director/lingo/lingo-lex.l"
 { count(); return *yytext; }
 	YY_BREAK
-case 62:
-/* rule 62 can match eol */
+case 65:
+/* rule 65 can match eol */
 YY_RULE_SETUP
-#line 228 "engines/director/lingo/lingo-lex.l"
+#line 231 "engines/director/lingo/lingo-lex.l"
 { return '\n'; }
 	YY_BREAK
-case 63:
+case 66:
 YY_RULE_SETUP
-#line 229 "engines/director/lingo/lingo-lex.l"
+#line 232 "engines/director/lingo/lingo-lex.l"
 { count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return STRING; }
 	YY_BREAK
-case 64:
+case 67:
 YY_RULE_SETUP
-#line 230 "engines/director/lingo/lingo-lex.l"
+#line 233 "engines/director/lingo/lingo-lex.l"
 
 	YY_BREAK
-case 65:
+case 68:
 YY_RULE_SETUP
-#line 232 "engines/director/lingo/lingo-lex.l"
+#line 235 "engines/director/lingo/lingo-lex.l"
 ECHO;
 	YY_BREAK
-#line 1416 "engines/director/lingo/lingo-lex.cpp"
+#line 1438 "engines/director/lingo/lingo-lex.cpp"
 case YY_STATE_EOF(INITIAL):
 	yyterminate();
 
@@ -1705,7 +1727,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 >= 227 )
+			if ( yy_current_state >= 236 )
 				yy_c = yy_meta[(unsigned int) yy_c];
 			}
 		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -1733,11 +1755,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 >= 227 )
+		if ( yy_current_state >= 236 )
 			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 == 226);
+	yy_is_jam = (yy_current_state == 235);
 
 	return yy_is_jam ? 0 : yy_current_state;
 }
@@ -2412,7 +2434,7 @@ void yyfree (void * ptr )
 
 #define YYTABLES_NAME "yytables"
 
-#line 232 "engines/director/lingo/lingo-lex.l"
+#line 235 "engines/director/lingo/lingo-lex.l"
 
 
 
diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l
index 2c6f079..f6be12d 100644
--- a/engines/director/lingo/lingo-lex.l
+++ b/engines/director/lingo/lingo-lex.l
@@ -95,6 +95,8 @@ whitespace [\t ]
 (?i:instance)		{ count(); return tINSTANCE; }
 (?i:intersects)		{ count(); return tINTERSECTS; }
 (?i:into)			{ count(); return tINTO; }
+(?i:item)			{ count(); return tITEM; }
+(?i:line)			{ count(); return tLINE; }
 (?i:loop)			{ count(); return tLOOP; }
 (?i:macro)			{ count(); return tMACRO; }
 (?i:method)			{ count(); return tMETHOD; }
@@ -187,6 +189,7 @@ whitespace [\t ]
 (?i:within)			{ count(); return tWITHIN; }
 (?i:when)			{ count(); return tWHEN; }
 (?i:while)			{ count(); return tWHILE; }
+(?i:word)			{ count(); return tWORD; }
 
 [<][>]				{ count(); return tNEQ; }
 [>][=]				{ count(); return tGE; }
diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index 898bdf5..b23ec7b 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -34,6 +34,7 @@ TheEntity entities[] = {
 	{ kTheCast,				"cast",				true  },	// D3
 	{ kTheCastMembers,		"castmembers",		true  },	//		 D3
 	{ kTheCenterStage,		"centerStage",		false },	// D2 p
+	{ kTheChars,			"chars",			true  },	//		 D3
 	{ kTheCheckBoxAccess,	"checkBoxAccess",	false },	// D2 p
 	{ kTheCheckBoxType,		"checkBoxType",		false },	// D2 p
 	{ kTheClickOn,			"clickOn",			false },	// D2 function
@@ -43,6 +44,7 @@ TheEntity entities[] = {
 	{ kTheControlDown,		"controlDown",		false },	// D2 f
 	{ kTheDoubleClick,		"doubleClick",		false },	// D2 f
 	{ kTheExitLock,			"exitLock",			false },	// D2 p
+	{ kTheField,			"field",			true  },	//		 D3
 	{ kTheFixStageSize,		"fixStageSize",		false },	// D2 p
 	{ kTheFloatPrecision,	"floatPrecision",	false },	//		D3 p
 	{ kTheFrame,			"frame",			false },	// D2 f
@@ -50,6 +52,7 @@ TheEntity entities[] = {
 	{ kTheFreeBytes,		"freeBytes",		false },	// D2 f
 	{ kTheFullColorPermit,	"fullColorPermit",	false },	// D2 p
 	{ kTheImageDirect,		"imageDirect",		false },	// D2 p
+	{ kTheItems,			"items",			true  },	//		 D3
 	{ kTheItemDelimiter,	"itemDelimiter",	false },
 	{ kTheKey,				"key",				false },	// D2 f
 	{ kTheKeyCode,			"keyCode",			false },	// D2 f
@@ -60,6 +63,7 @@ TheEntity entities[] = {
 	{ kTheLastFrame,		"lastFrame",		false },
 	{ kTheLastKey,			"lastKey",			false },	// D2 f
 	{ kTheLastRoll,			"lastRoll",			false },	// D2 f
+	{ kTheLines,			"lines",			true  },	//		 D3
 	{ kTheMachineType,		"machineType",		false },	// D2 f
 	{ kTheMemorySize,		"memorySize",		false },	// D2 f
 	{ kTheMenu,				"menu",				true  },
@@ -89,6 +93,8 @@ TheEntity entities[] = {
 	{ kTheRightMouseUp,		"rightMouseUp",		false },
 	{ kTheRomanLingo,		"romanLingo",		false },
 	{ kTheSelection,		"selection",		false },	// D2 f
+	{ kTheSelEnd,			"selEnd",			false },	// D2 p
+	{ kTheSelStart,			"selStart",			false },	// D2 p
 	{ kTheShiftDown,		"shiftDown",		false },	// D2 f
 	{ kTheSoundEnabled,		"soundEnabled",		false },	// D2 p
 	{ kTheSoundLevel,		"soundLevel",		false },	// D2 p
@@ -111,6 +117,7 @@ TheEntity entities[] = {
 	{ kTheTimeoutScript,	"timeoutScript",	false },	// D2 p
 	{ kTheTimer,			"timer",			false },	// D2 p
 	{ kTheWindow,			"window",			false },
+	{ kTheWords,			"words",			true  },	//		 D3
 	{ kTheNOEntity, NULL, false }
 };
 
@@ -184,11 +191,16 @@ TheEntityField fields[] = {
 
 	// TextCast fields
 	{ kTheCast,		"hilite",		kTheHilite },		// D2 p
-	{ kTheCast,		"selEnd",		kTheSelEnd },		// D2 p
-	{ kTheCast,		"selStart",		kTheSelStart },		// D2 p
 	{ kTheCast,		"size",			kTheSize },
 	{ kTheCast,		"text",			kTheText },			// D2 p
 
+	// Field fields
+	{ kTheField,	"textAlign",	kTheTextAlign },	//		D3 p
+	{ kTheField,	"textFont",		kTheTextFont },		//		D3 p
+	{ kTheField,	"textHeight",	kTheTextheight },	//		D3 p
+	{ kTheField,	"textSize",		kTheTextSize },		//		D3 p
+	{ kTheField,	"textStyle",	kTheTextStyle },	//		D3 p
+
 	{ kTheWindow,	"drawRect",		kTheDrawRect },
 	{ kTheWindow,	"filename",		kTheFilename },
 	{ kTheWindow,	"sourceRect",	kTheSourceRect },
@@ -201,8 +213,12 @@ TheEntityField fields[] = {
 
 	{ kTheMenu,		"name",			kTheName },			//		D3 p
 
+	{ kTheChars,	"number",		kTheNumber },		//		D3 p
+	{ kTheItems,	"number",		kTheNumber },		//		D3 p
+	{ kTheLines,	"number",		kTheNumber },		//		D3 p
 	{ kTheMenuItems,"number",		kTheNumber },		//		D3 p
 	{ kTheMenus,	"number",		kTheNumber },		//		D3 p
+	{ kTheWords,	"number",		kTheNumber },		//		D3 p
 
 	{ kTheNOEntity, NULL, kTheNOField }
 };
diff --git a/engines/director/lingo/lingo-the.h b/engines/director/lingo/lingo-the.h
index ba3ef8b..bbca636 100644
--- a/engines/director/lingo/lingo-the.h
+++ b/engines/director/lingo/lingo-the.h
@@ -41,6 +41,13 @@ enum TheEntityType {
 	kTheMouseDownScript,
 	kTheMouseUpScript,
 
+	kTheField,
+
+	kTheChars,
+	kTheItems,
+	kTheLines,
+	kTheWords,
+
 	kTheSprite,
 	kTheCast,
 	kTheCastMembers,
@@ -95,6 +102,8 @@ enum TheEntityType {
 	kTheSwitchColorDepth,
 	kTheResult,
 	kTheSelection,
+	kTheSelEnd,
+	kTheSelStart,
 	kTheShiftDown,
 	kTheSqrt,
 
@@ -165,13 +174,16 @@ enum TheFieldType {
 	kTheScript,
 	kTheScriptNum,
 	kTheScriptText,
-	kTheSelEnd,
-	kTheSelStart,
 	kTheSize,
 	kTheStrech,
 	kTheSound,
 	kTheSourceRect,
 	kTheText,
+	kTheTextAlign,
+	kTheTextFont,
+	kTheTextheight,
+	kTheTextSize,
+	kTheTextStyle,
 	kTheTop,
 	kTheTrails,
 	kTheType,
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index d51a5f0..cd0943f 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -251,6 +251,12 @@ public:
 	static void c_within();
 	static void c_charOf();
 	static void c_charToOf();
+	static void c_itemOf();
+	static void c_itemToOf();
+	static void c_lineOf();
+	static void c_lineToOf();
+	static void c_wordOf();
+	static void c_wordToOf();
 
 	static void c_constpush();
 	static void c_voidpush();
@@ -319,6 +325,8 @@ public:
 
 	static void b_chars(int nargs);
 	static void b_charToNum(int nargs);
+	static void b_delete(int nargs);
+	static void b_hilite(int nargs);
 	static void b_length(int nargs);
 	static void b_numToChar(int nargs);
 	static void b_offset(int nargs);





More information about the Scummvm-git-logs mailing list