diff options
| -rw-r--r-- | engines/director/lingo/lingo-code.cpp | 26 | ||||
| -rw-r--r-- | engines/director/lingo/lingo-gr.cpp | 1128 | ||||
| -rw-r--r-- | engines/director/lingo/lingo-gr.h | 180 | ||||
| -rw-r--r-- | engines/director/lingo/lingo-gr.y | 24 | ||||
| -rw-r--r-- | engines/director/lingo/lingo-lex.cpp | 266 | ||||
| -rw-r--r-- | engines/director/lingo/lingo-lex.l | 16 | ||||
| -rw-r--r-- | engines/director/lingo/lingo-the.cpp | 99 | ||||
| -rw-r--r-- | engines/director/lingo/lingo-the.h | 2 | ||||
| -rw-r--r-- | engines/director/lingo/lingo.cpp | 1 | ||||
| -rw-r--r-- | engines/director/lingo/lingo.h | 16 | ||||
| -rw-r--r-- | engines/director/lingo/tests/the.lingo | 3 | 
11 files changed, 946 insertions, 815 deletions
| diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp index a8881d7888..16bd7dbde4 100644 --- a/engines/director/lingo/lingo-code.cpp +++ b/engines/director/lingo/lingo-code.cpp @@ -218,6 +218,32 @@ void Lingo::c_eval() {  	g_lingo->push(d);  } +void Lingo::c_theentitypush() { +	inst e = (*g_lingo->_currentScript)[g_lingo->_pc++]; +	inst f = (*g_lingo->_currentScript)[g_lingo->_pc++]; +	inst i = (*g_lingo->_currentScript)[g_lingo->_pc++]; + +	int entity = READ_UINT32(&e); +	int field  = READ_UINT32(&f); +	int id     = READ_UINT32(&i); + +	Datum d = g_lingo->getTheEntity(entity, id, field); +	g_lingo->push(d); +} + +void Lingo::c_theentityassign() { +	inst e = (*g_lingo->_currentScript)[g_lingo->_pc++]; +	inst f = (*g_lingo->_currentScript)[g_lingo->_pc++]; +	inst i = (*g_lingo->_currentScript)[g_lingo->_pc++]; + +	int entity = READ_UINT32(&e); +	int field  = READ_UINT32(&f); +	int id     = READ_UINT32(&i); + +	Datum d = g_lingo->pop(); +	g_lingo->setTheEntity(entity, id, field, d); +} +  void Lingo::c_add() {  	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 577afc1f9a..75bbfa3909 100644 --- a/engines/director/lingo/lingo-gr.cpp +++ b/engines/director/lingo/lingo-gr.cpp @@ -71,49 +71,52 @@       VOID = 260,       VAR = 261,       INT = 262, -     FLOAT = 263, -     BLTIN = 264, -     ID = 265, -     STRING = 266, -     HANDLER = 267, -     tDOWN = 268, -     tELSE = 269, -     tNLELSIF = 270, -     tEND = 271, -     tEXIT = 272, -     tFRAME = 273, -     tGLOBAL = 274, -     tGO = 275, -     tIF = 276, -     tINTO = 277, -     tLOOP = 278, -     tMACRO = 279, -     tMCI = 280, -     tMCIWAIT = 281, -     tMOVIE = 282, -     tNEXT = 283, -     tOF = 284, -     tPREVIOUS = 285, -     tPUT = 286, -     tREPEAT = 287, -     tSET = 288, -     tTHEN = 289, -     tTO = 290, -     tWITH = 291, -     tWHILE = 292, -     tNLELSE = 293, -     tGE = 294, -     tLE = 295, -     tGT = 296, -     tLT = 297, -     tEQ = 298, -     tNEQ = 299, -     tAND = 300, -     tOR = 301, -     tNOT = 302, -     tCONCAT = 303, -     tCONTAINS = 304, -     tSTARTS = 305 +     THEENTITY = 263, +     THEENTITYWITHID = 264, +     THEFIELD = 265, +     FLOAT = 266, +     BLTIN = 267, +     ID = 268, +     STRING = 269, +     HANDLER = 270, +     tDOWN = 271, +     tELSE = 272, +     tNLELSIF = 273, +     tEND = 274, +     tEXIT = 275, +     tFRAME = 276, +     tGLOBAL = 277, +     tGO = 278, +     tIF = 279, +     tINTO = 280, +     tLOOP = 281, +     tMACRO = 282, +     tMCI = 283, +     tMCIWAIT = 284, +     tMOVIE = 285, +     tNEXT = 286, +     tOF = 287, +     tPREVIOUS = 288, +     tPUT = 289, +     tREPEAT = 290, +     tSET = 291, +     tTHEN = 292, +     tTO = 293, +     tWITH = 294, +     tWHILE = 295, +     tNLELSE = 296, +     tGE = 297, +     tLE = 298, +     tGT = 299, +     tLT = 300, +     tEQ = 301, +     tNEQ = 302, +     tAND = 303, +     tOR = 304, +     tNOT = 305, +     tCONCAT = 306, +     tCONTAINS = 307, +     tSTARTS = 308     };  #endif  /* Tokens.  */ @@ -122,49 +125,52 @@  #define VOID 260  #define VAR 261  #define INT 262 -#define FLOAT 263 -#define BLTIN 264 -#define ID 265 -#define STRING 266 -#define HANDLER 267 -#define tDOWN 268 -#define tELSE 269 -#define tNLELSIF 270 -#define tEND 271 -#define tEXIT 272 -#define tFRAME 273 -#define tGLOBAL 274 -#define tGO 275 -#define tIF 276 -#define tINTO 277 -#define tLOOP 278 -#define tMACRO 279 -#define tMCI 280 -#define tMCIWAIT 281 -#define tMOVIE 282 -#define tNEXT 283 -#define tOF 284 -#define tPREVIOUS 285 -#define tPUT 286 -#define tREPEAT 287 -#define tSET 288 -#define tTHEN 289 -#define tTO 290 -#define tWITH 291 -#define tWHILE 292 -#define tNLELSE 293 -#define tGE 294 -#define tLE 295 -#define tGT 296 -#define tLT 297 -#define tEQ 298 -#define tNEQ 299 -#define tAND 300 -#define tOR 301 -#define tNOT 302 -#define tCONCAT 303 -#define tCONTAINS 304 -#define tSTARTS 305 +#define THEENTITY 263 +#define THEENTITYWITHID 264 +#define THEFIELD 265 +#define FLOAT 266 +#define BLTIN 267 +#define ID 268 +#define STRING 269 +#define HANDLER 270 +#define tDOWN 271 +#define tELSE 272 +#define tNLELSIF 273 +#define tEND 274 +#define tEXIT 275 +#define tFRAME 276 +#define tGLOBAL 277 +#define tGO 278 +#define tIF 279 +#define tINTO 280 +#define tLOOP 281 +#define tMACRO 282 +#define tMCI 283 +#define tMCIWAIT 284 +#define tMOVIE 285 +#define tNEXT 286 +#define tOF 287 +#define tPREVIOUS 288 +#define tPUT 289 +#define tREPEAT 290 +#define tSET 291 +#define tTHEN 292 +#define tTO 293 +#define tWITH 294 +#define tWHILE 295 +#define tNLELSE 296 +#define tGE 297 +#define tLE 298 +#define tGT 299 +#define tLT 300 +#define tEQ 301 +#define tNEQ 302 +#define tAND 303 +#define tOR 304 +#define tNOT 305 +#define tCONCAT 306 +#define tCONTAINS 307 +#define tSTARTS 308 @@ -220,7 +226,7 @@ typedef union YYSTYPE  	int	narg;	/* number of arguments */  }  /* Line 193 of yacc.c.  */ -#line 224 "engines/director/lingo/lingo-gr.cpp" +#line 230 "engines/director/lingo/lingo-gr.cpp"  	YYSTYPE;  # define yystype YYSTYPE /* obsolescent; will be withdrawn */  # define YYSTYPE_IS_DECLARED 1 @@ -233,7 +239,7 @@ typedef union YYSTYPE  /* Line 216 of yacc.c.  */ -#line 237 "engines/director/lingo/lingo-gr.cpp" +#line 243 "engines/director/lingo/lingo-gr.cpp"  #ifdef short  # undef short @@ -446,22 +452,22 @@ union yyalloc  #endif  /* YYFINAL -- State number of the termination state.  */ -#define YYFINAL  65 +#define YYFINAL  67  /* YYLAST -- Last index in YYTABLE.  */  #define YYLAST   573  /* YYNTOKENS -- Number of terminals.  */ -#define YYNTOKENS  64 +#define YYNTOKENS  67  /* YYNNTS -- Number of nonterminals.  */  #define YYNNTS  33  /* YYNRULES -- Number of rules.  */ -#define YYNRULES  106 +#define YYNRULES  109  /* YYNRULES -- Number of states.  */ -#define YYNSTATES  223 +#define YYNSTATES  229  /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */  #define YYUNDEFTOK  2 -#define YYMAXUTOK   305 +#define YYMAXUTOK   308  #define YYTRANSLATE(YYX)						\    ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -470,12 +476,12 @@ union yyalloc  static const yytype_uint8 yytranslate[] =  {         0,     2,     2,     2,     2,     2,     2,     2,     2,     2, -      57,     2,     2,     2,     2,     2,     2,     2,     2,     2, +      60,     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,    56,    62,     2, -      58,    59,    54,    52,    63,    53,     2,    55,     2,     2, +       2,     2,     2,     2,     2,     2,     2,    59,    65,     2, +      61,    62,    57,    55,    66,    56,     2,    58,     2,     2,         2,     2,     2,     2,     2,     2,     2,     2,     2,     2, -      61,    51,    60,     2,     2,     2,     2,     2,     2,     2, +      64,    54,    63,     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, @@ -499,7 +505,7 @@ static const yytype_uint8 yytranslate[] =        15,    16,    17,    18,    19,    20,    21,    22,    23,    24,        25,    26,    27,    28,    29,    30,    31,    32,    33,    34,        35,    36,    37,    38,    39,    40,    41,    42,    43,    44, -      45,    46,    47,    48,    49,    50 +      45,    46,    47,    48,    49,    50,    51,    52,    53  };  #if YYDEBUG @@ -508,77 +514,78 @@ 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,    42,    44,    46,    48, -      57,    69,    82,    91,   103,   115,   122,   133,   144,   145, -     149,   152,   154,   157,   159,   166,   168,   174,   176,   180, -     184,   187,   191,   193,   195,   196,   197,   198,   201,   204, -     206,   208,   210,   215,   220,   222,   224,   228,   232,   236, -     240,   244,   248,   252,   256,   260,   264,   268,   271,   275, -     279,   283,   287,   290,   293,   297,   300,   303,   306,   308, -     310,   313,   315,   319,   322,   325,   328,   331,   335,   338, -     342,   345,   348,   350,   354,   357,   361,   362,   371,   372, -     374,   378,   383,   384,   388,   389,   391 +      21,    23,    25,    30,    35,    40,    45,    50,    52,    54, +      56,    58,    67,    79,    92,   101,   113,   125,   132,   143, +     154,   155,   159,   162,   164,   167,   169,   176,   178,   184, +     186,   190,   194,   197,   201,   203,   205,   206,   207,   208, +     211,   214,   216,   218,   220,   225,   230,   232,   234,   236, +     240,   244,   248,   252,   256,   260,   264,   268,   272,   276, +     280,   283,   287,   291,   295,   299,   302,   305,   309,   312, +     315,   318,   320,   322,   325,   327,   331,   334,   337,   340, +     343,   347,   350,   354,   357,   360,   362,   366,   369,   373, +     374,   383,   384,   386,   390,   395,   396,   400,   401,   403  };  /* YYRHS -- A `-1'-separated list of the rules' RHS.  */  static const yytype_int8 yyrhs[] =  { -      65,     0,    -1,    65,    66,    67,    -1,    67,    -1,     1, -      57,    -1,    57,    -1,    -1,    91,    -1,    86,    -1,    95, -      -1,    68,    -1,    70,    -1,    31,    85,    22,    10,    -1, -      33,    10,    51,    85,    -1,    33,    10,    35,    85,    -1, -      85,    -1,    86,    -1,    69,    -1,    71,    -1,    78,    58, -      77,    59,    84,    83,    16,    32,    -1,    79,    51,    85, -      83,    35,    85,    83,    84,    83,    16,    32,    -1,    79, -      51,    85,    83,    13,    35,    85,    83,    84,    83,    16, -      32,    -1,    80,    77,    34,    66,    84,    83,    16,    21, -      -1,    80,    77,    34,    66,    84,    83,    38,    84,    83, -      16,    21,    -1,    80,    77,    34,    66,    84,    83,    82, -      73,    83,    16,    21,    -1,    80,    77,    34,    82,    69, -      83,    -1,    80,    77,    34,    82,    69,    83,    38,    82, -      69,    83,    -1,    80,    77,    34,    82,    69,    83,    74, -      83,    72,    83,    -1,    -1,    38,    82,    69,    -1,    73, -      76,    -1,    76,    -1,    74,    75,    -1,    75,    -1,    81, -      77,    34,    82,    70,    83,    -1,    74,    -1,    81,    77, -      34,    84,    83,    -1,    85,    -1,    85,    51,    85,    -1, -      58,    77,    59,    -1,    32,    37,    -1,    32,    36,    10, -      -1,    21,    -1,    15,    -1,    -1,    -1,    -1,    84,    66, -      -1,    84,    70,    -1,     7,    -1,     8,    -1,    11,    -1, -       9,    58,    96,    59,    -1,    10,    58,    96,    59,    -1, -      10,    -1,    68,    -1,    85,    52,    85,    -1,    85,    53, -      85,    -1,    85,    54,    85,    -1,    85,    55,    85,    -1, -      85,    60,    85,    -1,    85,    61,    85,    -1,    85,    44, -      85,    -1,    85,    39,    85,    -1,    85,    40,    85,    -1, -      85,    45,    85,    -1,    85,    46,    85,    -1,    47,    85, -      -1,    85,    62,    85,    -1,    85,    48,    85,    -1,    85, -      49,    85,    -1,    85,    50,    85,    -1,    52,    85,    -1, -      53,    85,    -1,    58,    85,    59,    -1,    25,    11,    -1, -      26,    10,    -1,    31,    85,    -1,    88,    -1,    17,    -1, -      19,    87,    -1,    10,    -1,    87,    63,    10,    -1,    20, -      23,    -1,    20,    28,    -1,    20,    30,    -1,    20,    89, -      -1,    20,    89,    90,    -1,    20,    90,    -1,    35,    18, -      11,    -1,    18,    11,    -1,    35,    11,    -1,    11,    -1, -      29,    27,    11,    -1,    27,    11,    -1,    35,    27,    11, -      -1,    -1,    24,    10,    92,    82,    93,    66,    94,    84, -      -1,    -1,    10,    -1,    93,    63,    10,    -1,    93,    66, -      63,    10,    -1,    -1,    10,    82,    96,    -1,    -1,    85, -      -1,    96,    63,    85,    -1 +      68,     0,    -1,    68,    69,    70,    -1,    70,    -1,     1, +      60,    -1,    60,    -1,    -1,    94,    -1,    89,    -1,    98, +      -1,    71,    -1,    73,    -1,    34,    88,    25,    13,    -1, +      36,    13,    54,    88,    -1,    36,     8,    54,    88,    -1, +      36,    13,    38,    88,    -1,    36,     8,    38,    88,    -1, +      88,    -1,    89,    -1,    72,    -1,    74,    -1,    81,    61, +      80,    62,    87,    86,    19,    35,    -1,    82,    54,    88, +      86,    38,    88,    86,    87,    86,    19,    35,    -1,    82, +      54,    88,    86,    16,    38,    88,    86,    87,    86,    19, +      35,    -1,    83,    80,    37,    69,    87,    86,    19,    24, +      -1,    83,    80,    37,    69,    87,    86,    41,    87,    86, +      19,    24,    -1,    83,    80,    37,    69,    87,    86,    85, +      76,    86,    19,    24,    -1,    83,    80,    37,    85,    72, +      86,    -1,    83,    80,    37,    85,    72,    86,    41,    85, +      72,    86,    -1,    83,    80,    37,    85,    72,    86,    77, +      86,    75,    86,    -1,    -1,    41,    85,    72,    -1,    76, +      79,    -1,    79,    -1,    77,    78,    -1,    78,    -1,    84, +      80,    37,    85,    73,    86,    -1,    77,    -1,    84,    80, +      37,    87,    86,    -1,    88,    -1,    88,    54,    88,    -1, +      61,    80,    62,    -1,    35,    40,    -1,    35,    39,    13, +      -1,    24,    -1,    18,    -1,    -1,    -1,    -1,    87,    69, +      -1,    87,    73,    -1,     7,    -1,    11,    -1,    14,    -1, +      12,    61,    99,    62,    -1,    13,    61,    99,    62,    -1, +      13,    -1,     8,    -1,    71,    -1,    88,    55,    88,    -1, +      88,    56,    88,    -1,    88,    57,    88,    -1,    88,    58, +      88,    -1,    88,    63,    88,    -1,    88,    64,    88,    -1, +      88,    47,    88,    -1,    88,    42,    88,    -1,    88,    43, +      88,    -1,    88,    48,    88,    -1,    88,    49,    88,    -1, +      50,    88,    -1,    88,    65,    88,    -1,    88,    51,    88, +      -1,    88,    52,    88,    -1,    88,    53,    88,    -1,    55, +      88,    -1,    56,    88,    -1,    61,    88,    62,    -1,    28, +      14,    -1,    29,    13,    -1,    34,    88,    -1,    91,    -1, +      20,    -1,    22,    90,    -1,    13,    -1,    90,    66,    13, +      -1,    23,    26,    -1,    23,    31,    -1,    23,    33,    -1, +      23,    92,    -1,    23,    92,    93,    -1,    23,    93,    -1, +      38,    21,    14,    -1,    21,    14,    -1,    38,    14,    -1, +      14,    -1,    32,    30,    14,    -1,    30,    14,    -1,    38, +      30,    14,    -1,    -1,    27,    13,    95,    85,    96,    69, +      97,    87,    -1,    -1,    13,    -1,    96,    66,    13,    -1, +      96,    69,    66,    13,    -1,    -1,    13,    85,    99,    -1, +      -1,    88,    -1,    99,    66,    88,    -1  };  /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */  static const yytype_uint16 yyrline[] =  {         0,    98,    98,    99,   100,   103,   108,   109,   110,   111, -     112,   113,   116,   122,   128,   135,   136,   138,   139,   144, -     155,   171,   185,   192,   201,   210,   220,   230,   241,   242, -     245,   246,   249,   250,   253,   261,   262,   270,   271,   272, -     274,   276,   282,   288,   295,   297,   299,   300,   301,   304, -     309,   312,   315,   321,   329,   332,   333,   334,   335,   336, -     337,   338,   339,   340,   341,   342,   343,   344,   345,   346, -     347,   348,   349,   350,   351,   354,   355,   356,   357,   358, -     360,   363,   364,   375,   376,   377,   378,   383,   389,   396, -     397,   398,   399,   402,   403,   404,   432,   432,   439,   440, -     441,   442,   444,   447,   455,   456,   457 +     112,   113,   116,   122,   128,   136,   142,   150,   151,   153, +     154,   159,   170,   186,   200,   207,   216,   225,   235,   245, +     256,   257,   260,   261,   264,   265,   268,   276,   277,   285, +     286,   287,   289,   291,   297,   303,   310,   312,   314,   315, +     316,   319,   324,   327,   330,   336,   344,   347,   354,   355, +     356,   357,   358,   359,   360,   361,   362,   363,   364,   365, +     366,   367,   368,   369,   370,   371,   372,   373,   376,   377, +     378,   379,   380,   382,   385,   386,   397,   398,   399,   400, +     405,   411,   418,   419,   420,   421,   424,   425,   426,   454, +     454,   461,   462,   463,   464,   466,   469,   477,   478,   479  };  #endif @@ -588,15 +595,16 @@ static const yytype_uint16 yyrline[] =  static const char *const yytname[] =  {    "$end", "error", "$undefined", "CASTREF", "UNARY", "VOID", "VAR", "INT", -  "FLOAT", "BLTIN", "ID", "STRING", "HANDLER", "tDOWN", "tELSE", -  "tNLELSIF", "tEND", "tEXIT", "tFRAME", "tGLOBAL", "tGO", "tIF", "tINTO", -  "tLOOP", "tMACRO", "tMCI", "tMCIWAIT", "tMOVIE", "tNEXT", "tOF", -  "tPREVIOUS", "tPUT", "tREPEAT", "tSET", "tTHEN", "tTO", "tWITH", -  "tWHILE", "tNLELSE", "tGE", "tLE", "tGT", "tLT", "tEQ", "tNEQ", "tAND", -  "tOR", "tNOT", "tCONCAT", "tCONTAINS", "tSTARTS", "'='", "'+'", "'-'", -  "'*'", "'/'", "'%'", "'\\n'", "'('", "')'", "'>'", "'<'", "'&'", "','", -  "$accept", "program", "nl", "programline", "asgn", "stmtoneliner", -  "stmt", "ifstmt", "elsestmtoneliner", "elseifstmt", "elseifstmtoneliner", +  "THEENTITY", "THEENTITYWITHID", "THEFIELD", "FLOAT", "BLTIN", "ID", +  "STRING", "HANDLER", "tDOWN", "tELSE", "tNLELSIF", "tEND", "tEXIT", +  "tFRAME", "tGLOBAL", "tGO", "tIF", "tINTO", "tLOOP", "tMACRO", "tMCI", +  "tMCIWAIT", "tMOVIE", "tNEXT", "tOF", "tPREVIOUS", "tPUT", "tREPEAT", +  "tSET", "tTHEN", "tTO", "tWITH", "tWHILE", "tNLELSE", "tGE", "tLE", +  "tGT", "tLT", "tEQ", "tNEQ", "tAND", "tOR", "tNOT", "tCONCAT", +  "tCONTAINS", "tSTARTS", "'='", "'+'", "'-'", "'*'", "'/'", "'%'", +  "'\\n'", "'('", "')'", "'>'", "'<'", "'&'", "','", "$accept", "program", +  "nl", "programline", "asgn", "stmtoneliner", "stmt", "ifstmt", +  "elsestmtoneliner", "elseifstmt", "elseifstmtoneliner",    "elseifstmtoneliner1", "elseifstmt1", "cond", "repeatwhile",    "repeatwith", "if", "elseif", "begin", "end", "stmtlist", "expr", "func",    "globallist", "gotofunc", "gotoframe", "gotomovie", "defn", "@1", @@ -614,41 +622,41 @@ static const yytype_uint16 yytoknum[] =       275,   276,   277,   278,   279,   280,   281,   282,   283,   284,       285,   286,   287,   288,   289,   290,   291,   292,   293,   294,       295,   296,   297,   298,   299,   300,   301,   302,   303,   304, -     305,    61,    43,    45,    42,    47,    37,    10,    40,    41, -      62,    60,    38,    44 +     305,   306,   307,   308,    61,    43,    45,    42,    47,    37, +      10,    40,    41,    62,    60,    38,    44  };  # endif  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */  static const yytype_uint8 yyr1[] =  { -       0,    64,    65,    65,    65,    66,    67,    67,    67,    67, -      67,    67,    68,    68,    68,    69,    69,    70,    70,    70, -      70,    70,    71,    71,    71,    71,    71,    71,    72,    72, -      73,    73,    74,    74,    75,    76,    76,    77,    77,    77, -      78,    79,    80,    81,    82,    83,    84,    84,    84,    85, -      85,    85,    85,    85,    85,    85,    85,    85,    85,    85, -      85,    85,    85,    85,    85,    85,    85,    85,    85,    85, -      85,    85,    85,    85,    85,    86,    86,    86,    86,    86, -      86,    87,    87,    88,    88,    88,    88,    88,    88,    89, -      89,    89,    89,    90,    90,    90,    92,    91,    93,    93, -      93,    93,    94,    95,    96,    96,    96 +       0,    67,    68,    68,    68,    69,    70,    70,    70,    70, +      70,    70,    71,    71,    71,    71,    71,    72,    72,    73, +      73,    73,    73,    73,    74,    74,    74,    74,    74,    74, +      75,    75,    76,    76,    77,    77,    78,    79,    79,    80, +      80,    80,    81,    82,    83,    84,    85,    86,    87,    87, +      87,    88,    88,    88,    88,    88,    88,    88,    88,    88, +      88,    88,    88,    88,    88,    88,    88,    88,    88,    88, +      88,    88,    88,    88,    88,    88,    88,    88,    89,    89, +      89,    89,    89,    89,    90,    90,    91,    91,    91,    91, +      91,    91,    92,    92,    92,    92,    93,    93,    93,    95, +      94,    96,    96,    96,    96,    97,    98,    99,    99,    99  };  /* 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,     1,     1,     1,     1,     8, -      11,    12,     8,    11,    11,     6,    10,    10,     0,     3, -       2,     1,     2,     1,     6,     1,     5,     1,     3,     3, -       2,     3,     1,     1,     0,     0,     0,     2,     2,     1, -       1,     1,     4,     4,     1,     1,     3,     3,     3,     3, -       3,     3,     3,     3,     3,     3,     3,     2,     3,     3, -       3,     3,     2,     2,     3,     2,     2,     2,     1,     1, -       2,     1,     3,     2,     2,     2,     2,     3,     2,     3, -       2,     2,     1,     3,     2,     3,     0,     8,     0,     1, -       3,     4,     0,     3,     0,     1,     3 +       1,     1,     4,     4,     4,     4,     4,     1,     1,     1, +       1,     8,    11,    12,     8,    11,    11,     6,    10,    10, +       0,     3,     2,     1,     2,     1,     6,     1,     5,     1, +       3,     3,     2,     3,     1,     1,     0,     0,     0,     2, +       2,     1,     1,     1,     4,     4,     1,     1,     1,     3, +       3,     3,     3,     3,     3,     3,     3,     3,     3,     3, +       2,     3,     3,     3,     3,     2,     2,     3,     2,     2, +       2,     1,     1,     2,     1,     3,     2,     2,     2,     2, +       3,     2,     3,     2,     2,     1,     3,     2,     3,     0, +       8,     0,     1,     3,     4,     0,     3,     0,     1,     3  };  /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -656,235 +664,235 @@ static const yytype_uint8 yyr2[] =     means the default is an error.  */  static const yytype_uint8 yydefact[] =  { -       0,     0,    49,    50,     0,    44,    51,    79,     0,     0, -      42,     0,     0,     0,     0,     0,     0,     0,     0,     0, -       0,     0,     3,    55,    17,    11,    18,     0,     0,     0, -      15,     8,    78,     7,     9,     4,   104,   104,   104,    81, -      80,    92,     0,    83,     0,    84,     0,    85,     0,    86, -      88,    96,    75,    76,    54,     0,    55,    77,     0,    40, -       0,    67,    72,    73,     0,     1,     5,     6,     0,     0, -       0,     0,    37,     0,     0,     0,     0,     0,     0,     0, -       0,     0,     0,     0,     0,     0,     0,     0,   105,     0, -       0,   103,     0,    90,    94,     0,    91,     0,     0,     0, -      87,    44,     0,     0,    41,     0,     0,    74,     2,     0, -      45,     0,     0,    44,     0,    63,    64,    62,    65,    66, -      69,    70,    71,    56,    57,    58,    59,    60,    61,    68, -      52,     0,    53,    82,    93,    89,    95,    98,    12,    14, -      13,    46,     0,    39,    46,     0,    38,   106,    99,     0, -      45,     0,     0,    45,    45,    16,     0,   102,    47,    48, -       0,     0,    45,    44,    25,   100,     0,    46,     0,    45, -      46,     0,    46,     0,    43,    44,    45,    33,     0,   101, -      97,    19,    46,    45,    22,    45,    45,    35,    31,     0, -       0,    32,    28,     0,    45,     0,     0,    30,     0,     0, -      45,    44,    45,    44,     0,     0,     0,     0,    44,    26, -       0,    27,     0,     0,    20,    23,    24,    45,    29,    45, -      21,    36,    34 +       0,     0,    51,    57,    52,     0,    46,    53,    82,     0, +       0,    44,     0,     0,     0,     0,     0,     0,     0,     0, +       0,     0,     0,     3,    58,    19,    11,    20,     0,     0, +       0,    17,     8,    81,     7,     9,     4,   107,   107,   107, +      84,    83,    95,     0,    86,     0,    87,     0,    88,     0, +      89,    91,    99,    78,    79,    56,     0,    58,    80,     0, +      42,     0,     0,    70,    75,    76,     0,     1,     5,     6, +       0,     0,     0,     0,    39,     0,     0,     0,     0,     0, +       0,     0,     0,     0,     0,     0,     0,     0,     0,     0, +     108,     0,     0,   106,     0,    93,    97,     0,    94,     0, +       0,     0,    90,    46,     0,     0,    43,     0,     0,     0, +       0,    77,     2,     0,    47,     0,     0,    46,     0,    66, +      67,    65,    68,    69,    72,    73,    74,    59,    60,    61, +      62,    63,    64,    71,    54,     0,    55,    85,    96,    92, +      98,   101,    12,    16,    14,    15,    13,    48,     0,    41, +      48,     0,    40,   109,   102,     0,    47,     0,     0,    47, +      47,    18,     0,   105,    49,    50,     0,     0,    47,    46, +      27,   103,     0,    48,     0,    47,    48,     0,    48,     0, +      45,    46,    47,    35,     0,   104,   100,    21,    48,    47, +      24,    47,    47,    37,    33,     0,     0,    34,    30,     0, +      47,     0,     0,    32,     0,     0,    47,    46,    47,    46, +       0,     0,     0,     0,    46,    28,     0,    29,     0,     0, +      22,    25,    26,    47,    31,    47,    23,    38,    36  };  /* YYDEFGOTO[NTERM-NUM].  */  static const yytype_int16 yydefgoto[] =  { -      -1,    21,   158,    22,    56,    24,   159,    26,   202,   186, -     187,   177,   188,    71,    27,    28,    29,   178,   212,   142, -     150,    30,   155,    40,    32,    49,    50,    33,   101,   149, -     167,    34,    89 +      -1,    22,   164,    23,    57,    25,   165,    27,   208,   192, +     193,   183,   194,    73,    28,    29,    30,   184,   218,   148, +     156,    31,   161,    41,    33,    50,    51,    34,   103,   155, +     173,    35,    91  };  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing     STATE-NUM.  */ -#define YYPACT_NINF -145 +#define YYPACT_NINF -142  static const yytype_int16 yypact[] =  { -     174,   -46,  -145,  -145,    -9,   468,  -145,  -145,    47,     5, -    -145,    54,    57,    82,   341,    23,    83,   341,   341,   341, -     341,     4,  -145,     9,  -145,  -145,  -145,    40,    50,   348, -     449,  -145,  -145,  -145,  -145,  -145,   341,   341,   341,  -145, -      39,  -145,    94,  -145,    97,  -145,    84,  -145,    -1,    16, -    -145,  -145,  -145,  -145,    52,   341,  -145,   363,   104,  -145, -     -10,   511,   511,   511,   406,  -145,  -145,   226,   348,   341, -     348,    86,   430,   341,   341,   341,   341,   341,   341,   341, -     341,   341,   341,   341,   341,   341,   341,   341,   449,   -15, -      36,    53,   107,  -145,  -145,   110,  -145,   111,   112,    91, -    -145,  -145,   363,   115,  -145,   341,   341,  -145,  -145,    68, -     449,    69,   382,    72,   341,   449,   449,   449,   449,   449, -     449,   449,   449,   492,   492,   511,   511,   449,   449,   449, -    -145,   341,  -145,  -145,  -145,  -145,  -145,   121,  -145,   449, -     449,  -145,    11,  -145,  -145,   313,   449,   449,  -145,    33, -     255,    99,   341,   255,  -145,  -145,   127,    75,  -145,  -145, -     123,   341,   449,    -2,    -7,  -145,   130,  -145,   109,   449, -    -145,   122,  -145,   131,  -145,  -145,   131,  -145,   348,  -145, -     255,  -145,  -145,   255,  -145,   255,   131,   131,  -145,   348, -     313,  -145,   113,   108,   255,   129,   132,  -145,   133,   120, -    -145,  -145,  -145,  -145,   139,   124,   126,   136,    -3,  -145, -     313,  -145,   284,   128,  -145,  -145,  -145,   255,  -145,  -145, -    -145,  -145,  -145 +     138,   -51,  -142,  -142,  -142,   -49,   465,  -142,  -142,    11, +      -1,  -142,    14,    27,    41,   224,    22,    88,   224,   224, +     224,   224,     4,  -142,    10,  -142,  -142,  -142,    31,    54, +     345,   446,  -142,  -142,  -142,  -142,  -142,   224,   224,   224, +    -142,    44,  -142,    51,  -142,    93,  -142,    83,  -142,    26, +      25,  -142,  -142,  -142,  -142,    59,   224,  -142,   360,   108, +    -142,   -15,     5,   508,   508,   508,   403,  -142,  -142,   193, +     345,   224,   345,    87,   427,   224,   224,   224,   224,   224, +     224,   224,   224,   224,   224,   224,   224,   224,   224,   224, +     446,    53,    56,    63,   114,  -142,  -142,   116,  -142,   118, +     119,   106,  -142,  -142,   360,   124,  -142,   224,   224,   224, +     224,  -142,  -142,    79,   446,    81,   379,    84,   224,   446, +     446,   446,   446,   446,   446,   446,   446,   489,   489,   508, +     508,   446,   446,   446,  -142,   224,  -142,  -142,  -142,  -142, +    -142,   134,  -142,   446,   446,   446,   446,  -142,   -10,  -142, +    -142,   315,   446,   446,  -142,    29,   233,   110,   224,   233, +    -142,  -142,   140,    89,  -142,  -142,   137,   224,   446,    17, +       3,  -142,   155,  -142,   135,   446,  -142,   145,  -142,   153, +    -142,  -142,   153,  -142,   345,  -142,   233,  -142,  -142,   233, +    -142,   233,   153,   153,  -142,   345,   315,  -142,   136,   141, +     233,   156,   160,  -142,   162,   146,  -142,  -142,  -142,  -142, +     163,   149,   161,   165,   -11,  -142,   315,  -142,   284,   151, +    -142,  -142,  -142,   233,  -142,  -142,  -142,  -142,  -142  };  /* YYPGOTO[NTERM-NUM].  */  static const yytype_int16 yypgoto[] =  { -    -145,  -145,   -19,    96,     6,  -138,     0,  -145,  -145,  -145, -      -6,  -129,   -25,   -65,  -145,  -145,  -145,  -144,    -4,   -50, -    -117,     1,    22,  -145,  -145,  -145,   116,  -145,  -145,  -145, -    -145,  -145,    25 +    -142,  -142,   -20,   121,    18,  -105,     0,  -142,  -142,  -142, +      33,  -140,    16,   -67,  -142,  -142,  -142,  -141,    -5,   -66, +    -128,    -4,    19,  -142,  -142,  -142,   142,  -142,  -142,  -142, +    -142,  -142,    61  };  /* 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 -55 +#define YYTABLE_NINF -57  static const yytype_int16 yytable[] =  { -      25,    38,    67,   109,    65,   111,    23,   154,   174,   -10, -      96,    35,   -46,   -46,   171,    57,    41,    97,    61,    62, -      63,    64,    31,    42,   151,   105,    98,   153,    43,   189, -      72,   175,    44,    45,    46,    47,   172,    88,    88,    88, -      48,   106,   189,    44,   130,    46,   152,   191,   131,    36, -     180,    99,   200,   183,   -46,   185,   102,    39,   191,    58, -      59,    66,    90,    91,    51,   194,   -10,    25,    52,    72, -     110,   112,   218,    23,   115,   116,   117,   118,   119,   120, -     121,   122,   123,   124,   125,   126,   127,   128,   129,    31, -      66,   217,    53,    60,   144,   132,   156,   137,    68,   131, -     160,    69,    92,   163,   164,    93,   139,   140,    94,   145, -      37,    95,   170,   193,   104,   146,   131,   133,    98,   182, -     113,   134,   135,   136,   199,   138,   192,   141,   143,    66, -     157,   148,   147,   195,   161,   196,   198,   165,   166,   168, -     179,   181,   203,   184,   204,   205,   174,   215,   206,   207, -     209,   201,   211,   162,   208,   213,   214,   216,   176,   173, -     220,   197,   169,   108,     0,   100,     0,   221,     0,   222, -       0,   190,     0,     0,    -6,     1,     0,     0,     0,    72, -       0,     2,     3,     4,     5,     6,     0,     0,     0,     0, -      72,     7,     0,     8,     9,    10,     0,   210,    11,    12, -      13,     0,     0,     0,     0,    14,    15,    16,     0,     0, -       0,     0,   219,     0,     0,     0,     0,     0,     0,     0, -       0,    17,     0,     0,     0,     0,    18,    19,     0,     0, -       0,    -6,    20,     2,     3,     4,     5,     6,     0,     0, -       0,     0,     0,     7,     0,     8,     9,    10,     0,     0, -      11,    12,    13,     0,     0,     0,     0,    14,    15,    16, -       0,     0,     2,     3,     4,    54,     6,     0,     0,     0, -       0,     0,     7,    17,     8,     9,    10,     0,    18,    19, -      12,    13,     0,     0,    20,     0,    14,    15,    16,     0, -       0,     2,     3,     4,    54,     6,     0,     0,     0,     0, -       0,     7,    17,     8,     9,    10,     0,    18,    19,    12, -      13,     0,    66,    20,     0,    14,    15,    16,     0,     0, -       2,     3,     4,    54,     6,     0,     0,     0,     0,     0, -       7,    17,     8,     9,     0,     0,    18,    19,    12,    13, -       0,     0,    20,     0,    14,     0,    16,     0,     2,     3, -       4,    54,     6,     0,     0,     2,     3,     4,    54,     6, -      17,     0,     0,     0,     0,    18,    19,     0,     0,     0, -       0,    20,    55,     0,    16,     0,     0,     0,     0,    55, -       0,    16,     0,     0,     0,   103,     0,     0,    17,     0, -       0,     0,     0,    18,    19,    17,     0,     0,     0,    20, -      18,    19,    73,    74,     0,     0,    70,    75,    76,    77, -       0,    78,    79,    80,     0,    81,    82,    83,    84,     0, -       0,    73,    74,    85,    86,    87,    75,    76,    77,     0, -      78,    79,    80,   114,    81,    82,    83,    84,     0,     0, -       0,   107,    85,    86,    87,    73,    74,     0,     0,     0, -      75,    76,    77,     0,    78,    79,    80,     0,    81,    82, -      83,    84,     0,     0,     0,   107,    85,    86,    87,    73, -      74,     0,     0,     0,    75,    76,    77,     0,    78,    79, -      80,   114,    81,    82,    83,    84,     0,     0,    73,    74, -      85,    86,    87,    75,    76,    77,     0,    78,    79,    80, -       0,    81,    82,    83,    84,     0,     0,   -54,   -54,    85, -      86,    87,   -54,   -54,   -54,     0,   -54,   -54,   -54,     0, -       0,     0,   -54,   -54,     0,     0,    37,     0,   -54,   -54, -     -54,    73,    74,     0,     0,     0,    75,    76,    77,     0, -      78,    79,    80,     0,     0,     0,    83,    84,     0,     0, -      73,    74,    85,    86,    87,    75,    76,    77,     0,    78, -      79,    80,     0,     0,     0,     0,     0,     0,     0,     0, -       0,    85,    86,    87 +      26,    39,    69,   113,    67,   115,   157,   -48,   -48,    36, +     -10,    58,    37,    42,    63,    64,    65,    66,    24,    32, +      43,   180,   159,   107,    40,    44,    74,    52,   158,    45, +      46,    47,    48,    90,    90,    90,   177,    49,   195,   108, +      98,    53,   197,   109,   181,   186,   160,    99,   189,   -48, +     191,   195,   104,   197,    54,    45,   100,    47,   178,   110, +     200,    59,    60,   101,    68,    95,    74,   114,   116,    26, +     -10,   119,   120,   121,   122,   123,   124,   125,   126,   127, +     128,   129,   130,   131,   132,   133,   223,    24,    32,    68, +     166,   206,    70,   169,   170,   162,    61,   150,   141,    92, +      93,    62,   176,   143,   144,   145,   146,    96,    71,   188, +      94,   224,   151,    97,   152,   134,   198,   199,   136,   135, +      38,   106,   135,   201,   117,   202,   204,   137,   205,   135, +     138,   153,   139,   140,   210,   163,   100,   142,    -6,     1, +     215,   147,   217,   149,    68,     2,     3,   154,   167,     4, +       5,     6,     7,   171,   168,   172,   174,   227,     8,   228, +       9,    10,    11,   175,   179,    12,    13,    14,   185,   190, +     187,   180,    15,    16,    17,   211,   196,   207,   209,   212, +      74,   213,   219,   214,   220,   221,   226,     0,    18,   222, +     112,    74,   102,    19,    20,     0,     0,     0,    -6,    21, +       2,     3,   216,   182,     4,     5,     6,     7,   203,     0, +       0,     0,     0,     8,     0,     9,    10,    11,   225,     0, +      12,    13,    14,     0,     0,     0,     0,    15,    16,    17, +       0,     2,     3,     0,     0,     4,     5,    55,     7,     0, +       2,     3,     0,    18,     4,     5,    55,     7,    19,    20, +       0,     0,     0,     8,    21,     9,    10,    11,    56,     0, +      17,    13,    14,     0,     0,     0,     0,    15,    16,    17, +       0,     0,     0,     0,    18,     0,     0,     0,     0,    19, +      20,     0,     0,    18,     0,    21,     0,     0,    19,    20, +       0,     2,     3,    68,    21,     4,     5,    55,     7,     0, +       0,     0,     0,     0,     8,     0,     9,    10,    11,     0, +       0,     0,    13,    14,     0,     0,     0,     0,    15,    16, +      17,     0,     2,     3,     0,     0,     4,     5,    55,     7, +       0,     0,     0,     0,    18,     8,     0,     9,    10,    19, +      20,     0,     0,    13,    14,    21,     0,     0,     0,    15, +       0,    17,     2,     3,     0,     0,     4,     5,    55,     7, +       0,     0,     0,     0,     0,    18,     0,     0,     0,     0, +      19,    20,     0,     0,     0,     0,    21,     0,     0,    56, +       0,    17,     0,     0,     0,   105,     0,     0,     0,     0, +       0,     0,     0,     0,     0,    18,     0,     0,     0,     0, +      19,    20,    75,    76,     0,     0,    72,    77,    78,    79, +       0,    80,    81,    82,     0,    83,    84,    85,    86,     0, +       0,    75,    76,    87,    88,    89,    77,    78,    79,     0, +      80,    81,    82,   118,    83,    84,    85,    86,     0,     0, +       0,   111,    87,    88,    89,    75,    76,     0,     0,     0, +      77,    78,    79,     0,    80,    81,    82,     0,    83,    84, +      85,    86,     0,     0,     0,   111,    87,    88,    89,    75, +      76,     0,     0,     0,    77,    78,    79,     0,    80,    81, +      82,   118,    83,    84,    85,    86,     0,     0,    75,    76, +      87,    88,    89,    77,    78,    79,     0,    80,    81,    82, +       0,    83,    84,    85,    86,     0,     0,   -56,   -56,    87, +      88,    89,   -56,   -56,   -56,     0,   -56,   -56,   -56,     0, +       0,     0,   -56,   -56,     0,     0,    38,     0,   -56,   -56, +     -56,    75,    76,     0,     0,     0,    77,    78,    79,     0, +      80,    81,    82,     0,     0,     0,    85,    86,     0,     0, +      75,    76,    87,    88,    89,    77,    78,    79,     0,    80, +      81,    82,     0,     0,     0,     0,     0,     0,     0,     0, +       0,    87,    88,    89  };  static const yytype_int16 yycheck[] =  { -       0,     5,    21,    68,     0,    70,     0,   145,    15,     0, -      11,    57,    15,    16,    16,    14,    11,    18,    17,    18, -      19,    20,     0,    18,    13,    35,    27,   144,    23,   173, -      29,    38,    27,    28,    29,    30,    38,    36,    37,    38, -      35,    51,   186,    27,    59,    29,    35,   176,    63,    58, -     167,    35,   190,   170,    57,   172,    55,    10,   187,    36, -      37,    57,    37,    38,    10,   182,    57,    67,    11,    68, -      69,    70,   210,    67,    73,    74,    75,    76,    77,    78, -      79,    80,    81,    82,    83,    84,    85,    86,    87,    67, -      57,   208,    10,    10,   113,    59,    63,   101,    58,    63, -     150,    51,    63,   153,   154,    11,   105,   106,    11,   113, -      58,    27,   162,   178,    10,   114,    63,    10,    27,   169, -      34,    11,    11,    11,   189,    10,   176,    59,    59,    57, -     149,    10,   131,   183,    35,   185,   186,    10,    63,    16, -      10,    32,    34,    21,   194,    16,    15,    21,    16,    16, -     200,    38,   202,   152,    34,    16,    32,    21,   164,   163, -      32,   186,   161,    67,    -1,    49,    -1,   217,    -1,   219, -      -1,   175,    -1,    -1,     0,     1,    -1,    -1,    -1,   178, -      -1,     7,     8,     9,    10,    11,    -1,    -1,    -1,    -1, -     189,    17,    -1,    19,    20,    21,    -1,   201,    24,    25, -      26,    -1,    -1,    -1,    -1,    31,    32,    33,    -1,    -1, -      -1,    -1,   212,    -1,    -1,    -1,    -1,    -1,    -1,    -1, -      -1,    47,    -1,    -1,    -1,    -1,    52,    53,    -1,    -1, -      -1,    57,    58,     7,     8,     9,    10,    11,    -1,    -1, -      -1,    -1,    -1,    17,    -1,    19,    20,    21,    -1,    -1, -      24,    25,    26,    -1,    -1,    -1,    -1,    31,    32,    33, -      -1,    -1,     7,     8,     9,    10,    11,    -1,    -1,    -1, -      -1,    -1,    17,    47,    19,    20,    21,    -1,    52,    53, -      25,    26,    -1,    -1,    58,    -1,    31,    32,    33,    -1, -      -1,     7,     8,     9,    10,    11,    -1,    -1,    -1,    -1, -      -1,    17,    47,    19,    20,    21,    -1,    52,    53,    25, -      26,    -1,    57,    58,    -1,    31,    32,    33,    -1,    -1, -       7,     8,     9,    10,    11,    -1,    -1,    -1,    -1,    -1, -      17,    47,    19,    20,    -1,    -1,    52,    53,    25,    26, -      -1,    -1,    58,    -1,    31,    -1,    33,    -1,     7,     8, -       9,    10,    11,    -1,    -1,     7,     8,     9,    10,    11, -      47,    -1,    -1,    -1,    -1,    52,    53,    -1,    -1,    -1, -      -1,    58,    31,    -1,    33,    -1,    -1,    -1,    -1,    31, -      -1,    33,    -1,    -1,    -1,    22,    -1,    -1,    47,    -1, -      -1,    -1,    -1,    52,    53,    47,    -1,    -1,    -1,    58, -      52,    53,    39,    40,    -1,    -1,    58,    44,    45,    46, -      -1,    48,    49,    50,    -1,    52,    53,    54,    55,    -1, -      -1,    39,    40,    60,    61,    62,    44,    45,    46,    -1, -      48,    49,    50,    51,    52,    53,    54,    55,    -1,    -1, -      -1,    59,    60,    61,    62,    39,    40,    -1,    -1,    -1, -      44,    45,    46,    -1,    48,    49,    50,    -1,    52,    53, -      54,    55,    -1,    -1,    -1,    59,    60,    61,    62,    39, -      40,    -1,    -1,    -1,    44,    45,    46,    -1,    48,    49, -      50,    51,    52,    53,    54,    55,    -1,    -1,    39,    40, -      60,    61,    62,    44,    45,    46,    -1,    48,    49,    50, -      -1,    52,    53,    54,    55,    -1,    -1,    39,    40,    60, -      61,    62,    44,    45,    46,    -1,    48,    49,    50,    -1, -      -1,    -1,    54,    55,    -1,    -1,    58,    -1,    60,    61, -      62,    39,    40,    -1,    -1,    -1,    44,    45,    46,    -1, -      48,    49,    50,    -1,    -1,    -1,    54,    55,    -1,    -1, -      39,    40,    60,    61,    62,    44,    45,    46,    -1,    48, -      49,    50,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1, -      -1,    60,    61,    62 +       0,     6,    22,    70,     0,    72,    16,    18,    19,    60, +       0,    15,    61,    14,    18,    19,    20,    21,     0,     0, +      21,    18,   150,    38,    13,    26,    30,    13,    38,    30, +      31,    32,    33,    37,    38,    39,    19,    38,   179,    54, +      14,    14,   182,    38,    41,   173,   151,    21,   176,    60, +     178,   192,    56,   193,    13,    30,    30,    32,    41,    54, +     188,    39,    40,    38,    60,    14,    70,    71,    72,    69, +      60,    75,    76,    77,    78,    79,    80,    81,    82,    83, +      84,    85,    86,    87,    88,    89,   214,    69,    69,    60, +     156,   196,    61,   159,   160,    66,     8,   117,   103,    38, +      39,    13,   168,   107,   108,   109,   110,    14,    54,   175, +      66,   216,   117,    30,   118,    62,   182,   184,    62,    66, +      61,    13,    66,   189,    37,   191,   192,    13,   195,    66, +      14,   135,    14,    14,   200,   155,    30,    13,     0,     1, +     206,    62,   208,    62,    60,     7,     8,    13,    38,    11, +      12,    13,    14,    13,   158,    66,    19,   223,    20,   225, +      22,    23,    24,   167,   169,    27,    28,    29,    13,    24, +      35,    18,    34,    35,    36,    19,   181,    41,    37,    19, +     184,    19,    19,    37,    35,    24,    35,    -1,    50,    24, +      69,   195,    50,    55,    56,    -1,    -1,    -1,    60,    61, +       7,     8,   207,   170,    11,    12,    13,    14,   192,    -1, +      -1,    -1,    -1,    20,    -1,    22,    23,    24,   218,    -1, +      27,    28,    29,    -1,    -1,    -1,    -1,    34,    35,    36, +      -1,     7,     8,    -1,    -1,    11,    12,    13,    14,    -1, +       7,     8,    -1,    50,    11,    12,    13,    14,    55,    56, +      -1,    -1,    -1,    20,    61,    22,    23,    24,    34,    -1, +      36,    28,    29,    -1,    -1,    -1,    -1,    34,    35,    36, +      -1,    -1,    -1,    -1,    50,    -1,    -1,    -1,    -1,    55, +      56,    -1,    -1,    50,    -1,    61,    -1,    -1,    55,    56, +      -1,     7,     8,    60,    61,    11,    12,    13,    14,    -1, +      -1,    -1,    -1,    -1,    20,    -1,    22,    23,    24,    -1, +      -1,    -1,    28,    29,    -1,    -1,    -1,    -1,    34,    35, +      36,    -1,     7,     8,    -1,    -1,    11,    12,    13,    14, +      -1,    -1,    -1,    -1,    50,    20,    -1,    22,    23,    55, +      56,    -1,    -1,    28,    29,    61,    -1,    -1,    -1,    34, +      -1,    36,     7,     8,    -1,    -1,    11,    12,    13,    14, +      -1,    -1,    -1,    -1,    -1,    50,    -1,    -1,    -1,    -1, +      55,    56,    -1,    -1,    -1,    -1,    61,    -1,    -1,    34, +      -1,    36,    -1,    -1,    -1,    25,    -1,    -1,    -1,    -1, +      -1,    -1,    -1,    -1,    -1,    50,    -1,    -1,    -1,    -1, +      55,    56,    42,    43,    -1,    -1,    61,    47,    48,    49, +      -1,    51,    52,    53,    -1,    55,    56,    57,    58,    -1, +      -1,    42,    43,    63,    64,    65,    47,    48,    49,    -1, +      51,    52,    53,    54,    55,    56,    57,    58,    -1,    -1, +      -1,    62,    63,    64,    65,    42,    43,    -1,    -1,    -1, +      47,    48,    49,    -1,    51,    52,    53,    -1,    55,    56, +      57,    58,    -1,    -1,    -1,    62,    63,    64,    65,    42, +      43,    -1,    -1,    -1,    47,    48,    49,    -1,    51,    52, +      53,    54,    55,    56,    57,    58,    -1,    -1,    42,    43, +      63,    64,    65,    47,    48,    49,    -1,    51,    52,    53, +      -1,    55,    56,    57,    58,    -1,    -1,    42,    43,    63, +      64,    65,    47,    48,    49,    -1,    51,    52,    53,    -1, +      -1,    -1,    57,    58,    -1,    -1,    61,    -1,    63,    64, +      65,    42,    43,    -1,    -1,    -1,    47,    48,    49,    -1, +      51,    52,    53,    -1,    -1,    -1,    57,    58,    -1,    -1, +      42,    43,    63,    64,    65,    47,    48,    49,    -1,    51, +      52,    53,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1, +      -1,    63,    64,    65  };  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing     symbol of state STATE-NUM.  */  static const yytype_uint8 yystos[] =  { -       0,     1,     7,     8,     9,    10,    11,    17,    19,    20, -      21,    24,    25,    26,    31,    32,    33,    47,    52,    53, -      58,    65,    67,    68,    69,    70,    71,    78,    79,    80, -      85,    86,    88,    91,    95,    57,    58,    58,    82,    10, -      87,    11,    18,    23,    27,    28,    29,    30,    35,    89, -      90,    10,    11,    10,    10,    31,    68,    85,    36,    37, -      10,    85,    85,    85,    85,     0,    57,    66,    58,    51, -      58,    77,    85,    39,    40,    44,    45,    46,    48,    49, -      50,    52,    53,    54,    55,    60,    61,    62,    85,    96, -      96,    96,    63,    11,    11,    27,    11,    18,    27,    35, -      90,    92,    85,    22,    10,    35,    51,    59,    67,    77, -      85,    77,    85,    34,    51,    85,    85,    85,    85,    85, -      85,    85,    85,    85,    85,    85,    85,    85,    85,    85, -      59,    63,    59,    10,    11,    11,    11,    82,    10,    85, -      85,    59,    83,    59,    66,    82,    85,    85,    10,    93, -      84,    13,    35,    84,    69,    86,    63,    66,    66,    70, -      83,    35,    85,    83,    83,    10,    63,    94,    16,    85, -      83,    16,    38,    82,    15,    38,    74,    75,    81,    10, -      84,    32,    83,    84,    21,    84,    73,    74,    76,    81, -      82,    75,    83,    77,    84,    83,    83,    76,    83,    77, -      69,    38,    72,    34,    83,    16,    16,    16,    34,    83, -      82,    83,    82,    16,    32,    21,    21,    84,    69,    70, -      32,    83,    83 +       0,     1,     7,     8,    11,    12,    13,    14,    20,    22, +      23,    24,    27,    28,    29,    34,    35,    36,    50,    55, +      56,    61,    68,    70,    71,    72,    73,    74,    81,    82, +      83,    88,    89,    91,    94,    98,    60,    61,    61,    85, +      13,    90,    14,    21,    26,    30,    31,    32,    33,    38, +      92,    93,    13,    14,    13,    13,    34,    71,    88,    39, +      40,     8,    13,    88,    88,    88,    88,     0,    60,    69, +      61,    54,    61,    80,    88,    42,    43,    47,    48,    49, +      51,    52,    53,    55,    56,    57,    58,    63,    64,    65, +      88,    99,    99,    99,    66,    14,    14,    30,    14,    21, +      30,    38,    93,    95,    88,    25,    13,    38,    54,    38, +      54,    62,    70,    80,    88,    80,    88,    37,    54,    88, +      88,    88,    88,    88,    88,    88,    88,    88,    88,    88, +      88,    88,    88,    88,    62,    66,    62,    13,    14,    14, +      14,    85,    13,    88,    88,    88,    88,    62,    86,    62, +      69,    85,    88,    88,    13,    96,    87,    16,    38,    87, +      72,    89,    66,    69,    69,    73,    86,    38,    88,    86, +      86,    13,    66,    97,    19,    88,    86,    19,    41,    85, +      18,    41,    77,    78,    84,    13,    87,    35,    86,    87, +      24,    87,    76,    77,    79,    84,    85,    78,    86,    80, +      87,    86,    86,    79,    86,    80,    72,    41,    75,    37, +      86,    19,    19,    19,    37,    86,    85,    86,    85,    19, +      35,    24,    24,    87,    72,    73,    35,    86,    86  };  #define yyerrok		(yyerrstatus = 0) @@ -1739,6 +1747,18 @@ yyreduce:    case 14:  #line 128 "engines/director/lingo/lingo-gr.y"      { +		g_lingo->code1(g_lingo->c_theentityassign); +		inst e = 0, f = 0, i = 0; +		WRITE_UINT32(&e, (yyvsp[(2) - (4)].i)); +		WRITE_UINT32(&f, 0); +		WRITE_UINT32(&i, 0); +		g_lingo->code3(e, f, i); +		(yyval.code) = (yyvsp[(4) - (4)].code); ;} +    break; + +  case 15: +#line 136 "engines/director/lingo/lingo-gr.y" +    {  		g_lingo->code1(g_lingo->c_varpush);  		g_lingo->codeString((yyvsp[(2) - (4)].s)->c_str());  		g_lingo->code1(g_lingo->c_assign); @@ -1746,13 +1766,24 @@ yyreduce:  		delete (yyvsp[(2) - (4)].s); ;}      break; -  case 15: -#line 135 "engines/director/lingo/lingo-gr.y" +  case 16: +#line 142 "engines/director/lingo/lingo-gr.y" +    { +		g_lingo->code1(g_lingo->c_theentityassign); +		inst e = 0, f = 0; +		WRITE_UINT32(&e, (yyvsp[(2) - (4)].i)); +		WRITE_UINT32(&f, 0); +		g_lingo->code2(e, f); +		(yyval.code) = (yyvsp[(4) - (4)].code); ;} +    break; + +  case 17: +#line 150 "engines/director/lingo/lingo-gr.y"      { g_lingo->code1(g_lingo->c_xpop); ;}      break; -  case 19: -#line 144 "engines/director/lingo/lingo-gr.y" +  case 21: +#line 159 "engines/director/lingo/lingo-gr.y"      {  		inst body = 0, end = 0;  		WRITE_UINT32(&body, (yyvsp[(5) - (8)].code)); @@ -1761,8 +1792,8 @@ yyreduce:  		(*g_lingo->_currentScript)[(yyvsp[(1) - (8)].code) + 2] = end; ;}      break; -  case 20: -#line 155 "engines/director/lingo/lingo-gr.y" +  case 22: +#line 170 "engines/director/lingo/lingo-gr.y"      {  		inst init = 0, finish = 0, body = 0, end = 0, inc = 0;  		WRITE_UINT32(&init, (yyvsp[(3) - (11)].code)); @@ -1777,8 +1808,8 @@ yyreduce:  		(*g_lingo->_currentScript)[(yyvsp[(1) - (11)].code) + 5] = end; ;}      break; -  case 21: -#line 171 "engines/director/lingo/lingo-gr.y" +  case 23: +#line 186 "engines/director/lingo/lingo-gr.y"      {  		inst init = 0, finish = 0, body = 0, end = 0, inc = 0;  		WRITE_UINT32(&init, (yyvsp[(3) - (12)].code)); @@ -1793,8 +1824,8 @@ yyreduce:  		(*g_lingo->_currentScript)[(yyvsp[(1) - (12)].code) + 5] = end; ;}      break; -  case 22: -#line 185 "engines/director/lingo/lingo-gr.y" +  case 24: +#line 200 "engines/director/lingo/lingo-gr.y"      {  		inst then = 0, end = 0;  		WRITE_UINT32(&then, (yyvsp[(5) - (8)].code)); @@ -1804,8 +1835,8 @@ yyreduce:  		g_lingo->processIf(0, 0); ;}      break; -  case 23: -#line 192 "engines/director/lingo/lingo-gr.y" +  case 25: +#line 207 "engines/director/lingo/lingo-gr.y"      {  		inst then = 0, else1 = 0, end = 0;  		WRITE_UINT32(&then, (yyvsp[(5) - (11)].code)); @@ -1817,8 +1848,8 @@ yyreduce:  		g_lingo->processIf(0, 0); ;}      break; -  case 24: -#line 201 "engines/director/lingo/lingo-gr.y" +  case 26: +#line 216 "engines/director/lingo/lingo-gr.y"      {  		inst then = 0, else1 = 0, end = 0;  		WRITE_UINT32(&then, (yyvsp[(5) - (11)].code)); @@ -1830,8 +1861,8 @@ yyreduce:  		g_lingo->processIf(0, (yyvsp[(9) - (11)].code)); ;}      break; -  case 25: -#line 210 "engines/director/lingo/lingo-gr.y" +  case 27: +#line 225 "engines/director/lingo/lingo-gr.y"      {  		inst then = 0, else1 = 0, end = 0;  		WRITE_UINT32(&then, (yyvsp[(4) - (6)].code)); @@ -1844,8 +1875,8 @@ yyreduce:  		g_lingo->processIf(0, 0); ;}      break; -  case 26: -#line 220 "engines/director/lingo/lingo-gr.y" +  case 28: +#line 235 "engines/director/lingo/lingo-gr.y"      {  		inst then = 0, else1 = 0, end = 0;  		WRITE_UINT32(&then, (yyvsp[(4) - (10)].code)); @@ -1858,8 +1889,8 @@ yyreduce:  		g_lingo->processIf(0, 0); ;}      break; -  case 27: -#line 230 "engines/director/lingo/lingo-gr.y" +  case 29: +#line 245 "engines/director/lingo/lingo-gr.y"      {  		inst then = 0, else1 = 0, end = 0;  		WRITE_UINT32(&then, (yyvsp[(4) - (10)].code)); @@ -1872,18 +1903,18 @@ yyreduce:  		g_lingo->processIf(0, (yyvsp[(10) - (10)].code)); ;}      break; -  case 28: -#line 241 "engines/director/lingo/lingo-gr.y" +  case 30: +#line 256 "engines/director/lingo/lingo-gr.y"      { (yyval.code) = 0; ;}      break; -  case 29: -#line 242 "engines/director/lingo/lingo-gr.y" +  case 31: +#line 257 "engines/director/lingo/lingo-gr.y"      { (yyval.code) = (yyvsp[(2) - (3)].code); ;}      break; -  case 34: -#line 253 "engines/director/lingo/lingo-gr.y" +  case 36: +#line 268 "engines/director/lingo/lingo-gr.y"      {  		inst then = 0;  		WRITE_UINT32(&then, (yyvsp[(4) - (6)].code)); @@ -1892,8 +1923,8 @@ yyreduce:  		g_lingo->codeLabel((yyvsp[(1) - (6)].code)); ;}      break; -  case 36: -#line 262 "engines/director/lingo/lingo-gr.y" +  case 38: +#line 277 "engines/director/lingo/lingo-gr.y"      {  		inst then = 0;  		WRITE_UINT32(&then, (yyvsp[(4) - (5)].code)); @@ -1902,23 +1933,23 @@ yyreduce:  		g_lingo->codeLabel((yyvsp[(1) - (5)].code)); ;}      break; -  case 37: -#line 270 "engines/director/lingo/lingo-gr.y" +  case 39: +#line 285 "engines/director/lingo/lingo-gr.y"      { g_lingo->code1(STOP); ;}      break; -  case 38: -#line 271 "engines/director/lingo/lingo-gr.y" +  case 40: +#line 286 "engines/director/lingo/lingo-gr.y"      { g_lingo->code2(g_lingo->c_eq, STOP); ;}      break; -  case 40: -#line 274 "engines/director/lingo/lingo-gr.y" +  case 42: +#line 289 "engines/director/lingo/lingo-gr.y"      { (yyval.code) = g_lingo->code3(g_lingo->c_repeatwhilecode, STOP, STOP); ;}      break; -  case 41: -#line 276 "engines/director/lingo/lingo-gr.y" +  case 43: +#line 291 "engines/director/lingo/lingo-gr.y"      {  		(yyval.code) = g_lingo->code3(g_lingo->c_repeatwithcode, STOP, STOP);  		g_lingo->code3(STOP, STOP, STOP); @@ -1926,8 +1957,8 @@ yyreduce:  		delete (yyvsp[(3) - (3)].s); ;}      break; -  case 42: -#line 282 "engines/director/lingo/lingo-gr.y" +  case 44: +#line 297 "engines/director/lingo/lingo-gr.y"      {  		(yyval.code) = g_lingo->code1(g_lingo->c_ifcode);  		g_lingo->code3(STOP, STOP, STOP); @@ -1935,8 +1966,8 @@ yyreduce:  		g_lingo->codeLabel(0); ;}      break; -  case 43: -#line 288 "engines/director/lingo/lingo-gr.y" +  case 45: +#line 303 "engines/director/lingo/lingo-gr.y"      {  		inst skipEnd;  		WRITE_UINT32(&skipEnd, 1); // We have to skip end to avoid multiple executions @@ -1945,23 +1976,23 @@ yyreduce:  		g_lingo->code1(skipEnd); ;}      break; -  case 44: -#line 295 "engines/director/lingo/lingo-gr.y" +  case 46: +#line 310 "engines/director/lingo/lingo-gr.y"      { (yyval.code) = g_lingo->_currentScript->size(); ;}      break; -  case 45: -#line 297 "engines/director/lingo/lingo-gr.y" +  case 47: +#line 312 "engines/director/lingo/lingo-gr.y"      { g_lingo->code1(STOP); (yyval.code) = g_lingo->_currentScript->size(); ;}      break; -  case 46: -#line 299 "engines/director/lingo/lingo-gr.y" +  case 48: +#line 314 "engines/director/lingo/lingo-gr.y"      { (yyval.code) = g_lingo->_currentScript->size(); ;}      break; -  case 49: -#line 304 "engines/director/lingo/lingo-gr.y" +  case 51: +#line 319 "engines/director/lingo/lingo-gr.y"      {  		(yyval.code) = g_lingo->code1(g_lingo->c_constpush);  		inst i = 0; @@ -1969,22 +2000,22 @@ yyreduce:  		g_lingo->code1(i); ;}      break; -  case 50: -#line 309 "engines/director/lingo/lingo-gr.y" +  case 52: +#line 324 "engines/director/lingo/lingo-gr.y"      {  		(yyval.code) = g_lingo->code1(g_lingo->c_fconstpush);  		g_lingo->codeFloat((yyvsp[(1) - (1)].f)); ;}      break; -  case 51: -#line 312 "engines/director/lingo/lingo-gr.y" +  case 53: +#line 327 "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 52: -#line 315 "engines/director/lingo/lingo-gr.y" +  case 54: +#line 330 "engines/director/lingo/lingo-gr.y"      {  		if ((yyvsp[(3) - (4)].narg) != g_lingo->_builtins[*(yyvsp[(1) - (4)].s)]->nargs)  			error("Built-in function %s expects %d arguments but got %d", (yyvsp[(1) - (4)].s)->c_str(), g_lingo->_builtins[*(yyvsp[(1) - (4)].s)]->nargs, (yyvsp[(3) - (4)].narg)); @@ -1993,8 +2024,8 @@ yyreduce:  		delete (yyvsp[(1) - (4)].s); ;}      break; -  case 53: -#line 321 "engines/director/lingo/lingo-gr.y" +  case 55: +#line 336 "engines/director/lingo/lingo-gr.y"      {  		(yyval.code) = g_lingo->code1(g_lingo->c_call);  		g_lingo->codeString((yyvsp[(1) - (4)].s)->c_str()); @@ -2005,156 +2036,167 @@ yyreduce:  		delete (yyvsp[(1) - (4)].s); ;}      break; -  case 54: -#line 329 "engines/director/lingo/lingo-gr.y" +  case 56: +#line 344 "engines/director/lingo/lingo-gr.y"      {  		(yyval.code) = g_lingo->codeId(*(yyvsp[(1) - (1)].s));  		delete (yyvsp[(1) - (1)].s); ;}      break; -  case 56: -#line 333 "engines/director/lingo/lingo-gr.y" +  case 57: +#line 347 "engines/director/lingo/lingo-gr.y" +    { +		(yyval.code) = g_lingo->code1(g_lingo->c_theentitypush); +		inst e = 0, f = 0, i = 0; +		WRITE_UINT32(&e, (yyvsp[(1) - (1)].i)); +		WRITE_UINT32(&f, 0); +		WRITE_UINT32(&i, 0); +		g_lingo->code3(e, f, i); ;} +    break; + +  case 59: +#line 355 "engines/director/lingo/lingo-gr.y"      { g_lingo->code1(g_lingo->c_add); ;}      break; -  case 57: -#line 334 "engines/director/lingo/lingo-gr.y" +  case 60: +#line 356 "engines/director/lingo/lingo-gr.y"      { g_lingo->code1(g_lingo->c_sub); ;}      break; -  case 58: -#line 335 "engines/director/lingo/lingo-gr.y" +  case 61: +#line 357 "engines/director/lingo/lingo-gr.y"      { g_lingo->code1(g_lingo->c_mul); ;}      break; -  case 59: -#line 336 "engines/director/lingo/lingo-gr.y" +  case 62: +#line 358 "engines/director/lingo/lingo-gr.y"      { g_lingo->code1(g_lingo->c_div); ;}      break; -  case 60: -#line 337 "engines/director/lingo/lingo-gr.y" +  case 63: +#line 359 "engines/director/lingo/lingo-gr.y"      { g_lingo->code1(g_lingo->c_gt); ;}      break; -  case 61: -#line 338 "engines/director/lingo/lingo-gr.y" +  case 64: +#line 360 "engines/director/lingo/lingo-gr.y"      { g_lingo->code1(g_lingo->c_lt); ;}      break; -  case 62: -#line 339 "engines/director/lingo/lingo-gr.y" +  case 65: +#line 361 "engines/director/lingo/lingo-gr.y"      { g_lingo->code1(g_lingo->c_neq); ;}      break; -  case 63: -#line 340 "engines/director/lingo/lingo-gr.y" +  case 66: +#line 362 "engines/director/lingo/lingo-gr.y"      { g_lingo->code1(g_lingo->c_ge); ;}      break; -  case 64: -#line 341 "engines/director/lingo/lingo-gr.y" +  case 67: +#line 363 "engines/director/lingo/lingo-gr.y"      { g_lingo->code1(g_lingo->c_le); ;}      break; -  case 65: -#line 342 "engines/director/lingo/lingo-gr.y" +  case 68: +#line 364 "engines/director/lingo/lingo-gr.y"      { g_lingo->code1(g_lingo->c_and); ;}      break; -  case 66: -#line 343 "engines/director/lingo/lingo-gr.y" +  case 69: +#line 365 "engines/director/lingo/lingo-gr.y"      { g_lingo->code1(g_lingo->c_or); ;}      break; -  case 67: -#line 344 "engines/director/lingo/lingo-gr.y" +  case 70: +#line 366 "engines/director/lingo/lingo-gr.y"      { g_lingo->code1(g_lingo->c_not); ;}      break; -  case 68: -#line 345 "engines/director/lingo/lingo-gr.y" +  case 71: +#line 367 "engines/director/lingo/lingo-gr.y"      { g_lingo->code1(g_lingo->c_ampersand); ;}      break; -  case 69: -#line 346 "engines/director/lingo/lingo-gr.y" +  case 72: +#line 368 "engines/director/lingo/lingo-gr.y"      { g_lingo->code1(g_lingo->c_concat); ;}      break; -  case 70: -#line 347 "engines/director/lingo/lingo-gr.y" +  case 73: +#line 369 "engines/director/lingo/lingo-gr.y"      { g_lingo->code1(g_lingo->c_contains); ;}      break; -  case 71: -#line 348 "engines/director/lingo/lingo-gr.y" +  case 74: +#line 370 "engines/director/lingo/lingo-gr.y"      { g_lingo->code1(g_lingo->c_starts); ;}      break; -  case 72: -#line 349 "engines/director/lingo/lingo-gr.y" +  case 75: +#line 371 "engines/director/lingo/lingo-gr.y"      { (yyval.code) = (yyvsp[(2) - (2)].code); ;}      break; -  case 73: -#line 350 "engines/director/lingo/lingo-gr.y" +  case 76: +#line 372 "engines/director/lingo/lingo-gr.y"      { (yyval.code) = (yyvsp[(2) - (2)].code); g_lingo->code1(g_lingo->c_negate); ;}      break; -  case 74: -#line 351 "engines/director/lingo/lingo-gr.y" +  case 77: +#line 373 "engines/director/lingo/lingo-gr.y"      { (yyval.code) = (yyvsp[(2) - (3)].code); ;}      break; -  case 75: -#line 354 "engines/director/lingo/lingo-gr.y" +  case 78: +#line 376 "engines/director/lingo/lingo-gr.y"      { g_lingo->code1(g_lingo->c_mci); g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str()); delete (yyvsp[(2) - (2)].s); ;}      break; -  case 76: -#line 355 "engines/director/lingo/lingo-gr.y" +  case 79: +#line 377 "engines/director/lingo/lingo-gr.y"      { g_lingo->code1(g_lingo->c_mciwait); g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str()); delete (yyvsp[(2) - (2)].s); ;}      break; -  case 77: -#line 356 "engines/director/lingo/lingo-gr.y" +  case 80: +#line 378 "engines/director/lingo/lingo-gr.y"      { g_lingo->code1(g_lingo->c_printtop); ;}      break; -  case 79: -#line 358 "engines/director/lingo/lingo-gr.y" +  case 82: +#line 380 "engines/director/lingo/lingo-gr.y"      { 	g_lingo->code2(g_lingo->c_constpush, (inst)0); // Push fake value on stack  								g_lingo->code1(g_lingo->c_procret); ;}      break; -  case 81: -#line 363 "engines/director/lingo/lingo-gr.y" +  case 84: +#line 385 "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 82: -#line 364 "engines/director/lingo/lingo-gr.y" +  case 85: +#line 386 "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 83: -#line 375 "engines/director/lingo/lingo-gr.y" +  case 86: +#line 397 "engines/director/lingo/lingo-gr.y"      { g_lingo->code1(g_lingo->c_gotoloop); ;}      break; -  case 84: -#line 376 "engines/director/lingo/lingo-gr.y" +  case 87: +#line 398 "engines/director/lingo/lingo-gr.y"      { g_lingo->code1(g_lingo->c_gotonext); ;}      break; -  case 85: -#line 377 "engines/director/lingo/lingo-gr.y" +  case 88: +#line 399 "engines/director/lingo/lingo-gr.y"      { g_lingo->code1(g_lingo->c_gotoprevious); ;}      break; -  case 86: -#line 378 "engines/director/lingo/lingo-gr.y" +  case 89: +#line 400 "engines/director/lingo/lingo-gr.y"      {  		g_lingo->code1(g_lingo->c_goto);  		g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str()); @@ -2162,8 +2204,8 @@ yyreduce:  		delete (yyvsp[(2) - (2)].s); ;}      break; -  case 87: -#line 383 "engines/director/lingo/lingo-gr.y" +  case 90: +#line 405 "engines/director/lingo/lingo-gr.y"      {  		g_lingo->code1(g_lingo->c_goto);  		g_lingo->codeString((yyvsp[(2) - (3)].s)->c_str()); @@ -2172,8 +2214,8 @@ yyreduce:  		delete (yyvsp[(3) - (3)].s); ;}      break; -  case 88: -#line 389 "engines/director/lingo/lingo-gr.y" +  case 91: +#line 411 "engines/director/lingo/lingo-gr.y"      {  		g_lingo->code1(g_lingo->c_goto);  		g_lingo->codeString(""); @@ -2181,48 +2223,48 @@ yyreduce:  		delete (yyvsp[(2) - (2)].s); ;}      break; -  case 89: -#line 396 "engines/director/lingo/lingo-gr.y" +  case 92: +#line 418 "engines/director/lingo/lingo-gr.y"      { (yyval.s) = (yyvsp[(3) - (3)].s); ;}      break; -  case 90: -#line 397 "engines/director/lingo/lingo-gr.y" +  case 93: +#line 419 "engines/director/lingo/lingo-gr.y"      { (yyval.s) = (yyvsp[(2) - (2)].s); ;}      break; -  case 91: -#line 398 "engines/director/lingo/lingo-gr.y" +  case 94: +#line 420 "engines/director/lingo/lingo-gr.y"      { (yyval.s) = (yyvsp[(2) - (2)].s); ;}      break; -  case 92: -#line 399 "engines/director/lingo/lingo-gr.y" +  case 95: +#line 421 "engines/director/lingo/lingo-gr.y"      { (yyval.s) = (yyvsp[(1) - (1)].s); ;}      break; -  case 93: -#line 402 "engines/director/lingo/lingo-gr.y" +  case 96: +#line 424 "engines/director/lingo/lingo-gr.y"      { (yyval.s) = (yyvsp[(3) - (3)].s); ;}      break; -  case 94: -#line 403 "engines/director/lingo/lingo-gr.y" +  case 97: +#line 425 "engines/director/lingo/lingo-gr.y"      { (yyval.s) = (yyvsp[(2) - (2)].s); ;}      break; -  case 95: -#line 404 "engines/director/lingo/lingo-gr.y" +  case 98: +#line 426 "engines/director/lingo/lingo-gr.y"      { (yyval.s) = (yyvsp[(3) - (3)].s); ;}      break; -  case 96: -#line 432 "engines/director/lingo/lingo-gr.y" +  case 99: +#line 454 "engines/director/lingo/lingo-gr.y"      { g_lingo->_indef = true; ;}      break; -  case 97: -#line 433 "engines/director/lingo/lingo-gr.y" +  case 100: +#line 455 "engines/director/lingo/lingo-gr.y"      {  			g_lingo->code2(g_lingo->c_constpush, (inst)0); // Push fake value on stack  			g_lingo->code1(g_lingo->c_procret); @@ -2230,33 +2272,33 @@ yyreduce:  			g_lingo->_indef = false; ;}      break; -  case 98: -#line 439 "engines/director/lingo/lingo-gr.y" +  case 101: +#line 461 "engines/director/lingo/lingo-gr.y"      { (yyval.narg) = 0; ;}      break; -  case 99: -#line 440 "engines/director/lingo/lingo-gr.y" +  case 102: +#line 462 "engines/director/lingo/lingo-gr.y"      { g_lingo->codeArg((yyvsp[(1) - (1)].s)); (yyval.narg) = 1; ;}      break; -  case 100: -#line 441 "engines/director/lingo/lingo-gr.y" +  case 103: +#line 463 "engines/director/lingo/lingo-gr.y"      { g_lingo->codeArg((yyvsp[(3) - (3)].s)); (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}      break; -  case 101: -#line 442 "engines/director/lingo/lingo-gr.y" +  case 104: +#line 464 "engines/director/lingo/lingo-gr.y"      { g_lingo->codeArg((yyvsp[(4) - (4)].s)); (yyval.narg) = (yyvsp[(1) - (4)].narg) + 1; ;}      break; -  case 102: -#line 444 "engines/director/lingo/lingo-gr.y" +  case 105: +#line 466 "engines/director/lingo/lingo-gr.y"      { g_lingo->codeArgStore(); ;}      break; -  case 103: -#line 447 "engines/director/lingo/lingo-gr.y" +  case 106: +#line 469 "engines/director/lingo/lingo-gr.y"      {  		g_lingo->code1(g_lingo->c_call);  		g_lingo->codeString((yyvsp[(1) - (3)].s)->c_str()); @@ -2265,24 +2307,24 @@ yyreduce:  		g_lingo->code1(numpar); ;}      break; -  case 104: -#line 455 "engines/director/lingo/lingo-gr.y" +  case 107: +#line 477 "engines/director/lingo/lingo-gr.y"      { (yyval.narg) = 0; ;}      break; -  case 105: -#line 456 "engines/director/lingo/lingo-gr.y" +  case 108: +#line 478 "engines/director/lingo/lingo-gr.y"      { (yyval.narg) = 1; ;}      break; -  case 106: -#line 457 "engines/director/lingo/lingo-gr.y" +  case 109: +#line 479 "engines/director/lingo/lingo-gr.y"      { (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}      break;  /* Line 1267 of yacc.c.  */ -#line 2286 "engines/director/lingo/lingo-gr.cpp" +#line 2328 "engines/director/lingo/lingo-gr.cpp"        default: break;      }    YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -2496,6 +2538,6 @@ yyreturn:  } -#line 460 "engines/director/lingo/lingo-gr.y" +#line 482 "engines/director/lingo/lingo-gr.y" diff --git a/engines/director/lingo/lingo-gr.h b/engines/director/lingo/lingo-gr.h index 1ee739453b..ea393a6e95 100644 --- a/engines/director/lingo/lingo-gr.h +++ b/engines/director/lingo/lingo-gr.h @@ -44,49 +44,52 @@       VOID = 260,       VAR = 261,       INT = 262, -     FLOAT = 263, -     BLTIN = 264, -     ID = 265, -     STRING = 266, -     HANDLER = 267, -     tDOWN = 268, -     tELSE = 269, -     tNLELSIF = 270, -     tEND = 271, -     tEXIT = 272, -     tFRAME = 273, -     tGLOBAL = 274, -     tGO = 275, -     tIF = 276, -     tINTO = 277, -     tLOOP = 278, -     tMACRO = 279, -     tMCI = 280, -     tMCIWAIT = 281, -     tMOVIE = 282, -     tNEXT = 283, -     tOF = 284, -     tPREVIOUS = 285, -     tPUT = 286, -     tREPEAT = 287, -     tSET = 288, -     tTHEN = 289, -     tTO = 290, -     tWITH = 291, -     tWHILE = 292, -     tNLELSE = 293, -     tGE = 294, -     tLE = 295, -     tGT = 296, -     tLT = 297, -     tEQ = 298, -     tNEQ = 299, -     tAND = 300, -     tOR = 301, -     tNOT = 302, -     tCONCAT = 303, -     tCONTAINS = 304, -     tSTARTS = 305 +     THEENTITY = 263, +     THEENTITYWITHID = 264, +     THEFIELD = 265, +     FLOAT = 266, +     BLTIN = 267, +     ID = 268, +     STRING = 269, +     HANDLER = 270, +     tDOWN = 271, +     tELSE = 272, +     tNLELSIF = 273, +     tEND = 274, +     tEXIT = 275, +     tFRAME = 276, +     tGLOBAL = 277, +     tGO = 278, +     tIF = 279, +     tINTO = 280, +     tLOOP = 281, +     tMACRO = 282, +     tMCI = 283, +     tMCIWAIT = 284, +     tMOVIE = 285, +     tNEXT = 286, +     tOF = 287, +     tPREVIOUS = 288, +     tPUT = 289, +     tREPEAT = 290, +     tSET = 291, +     tTHEN = 292, +     tTO = 293, +     tWITH = 294, +     tWHILE = 295, +     tNLELSE = 296, +     tGE = 297, +     tLE = 298, +     tGT = 299, +     tLT = 300, +     tEQ = 301, +     tNEQ = 302, +     tAND = 303, +     tOR = 304, +     tNOT = 305, +     tCONCAT = 306, +     tCONTAINS = 307, +     tSTARTS = 308     };  #endif  /* Tokens.  */ @@ -95,49 +98,52 @@  #define VOID 260  #define VAR 261  #define INT 262 -#define FLOAT 263 -#define BLTIN 264 -#define ID 265 -#define STRING 266 -#define HANDLER 267 -#define tDOWN 268 -#define tELSE 269 -#define tNLELSIF 270 -#define tEND 271 -#define tEXIT 272 -#define tFRAME 273 -#define tGLOBAL 274 -#define tGO 275 -#define tIF 276 -#define tINTO 277 -#define tLOOP 278 -#define tMACRO 279 -#define tMCI 280 -#define tMCIWAIT 281 -#define tMOVIE 282 -#define tNEXT 283 -#define tOF 284 -#define tPREVIOUS 285 -#define tPUT 286 -#define tREPEAT 287 -#define tSET 288 -#define tTHEN 289 -#define tTO 290 -#define tWITH 291 -#define tWHILE 292 -#define tNLELSE 293 -#define tGE 294 -#define tLE 295 -#define tGT 296 -#define tLT 297 -#define tEQ 298 -#define tNEQ 299 -#define tAND 300 -#define tOR 301 -#define tNOT 302 -#define tCONCAT 303 -#define tCONTAINS 304 -#define tSTARTS 305 +#define THEENTITY 263 +#define THEENTITYWITHID 264 +#define THEFIELD 265 +#define FLOAT 266 +#define BLTIN 267 +#define ID 268 +#define STRING 269 +#define HANDLER 270 +#define tDOWN 271 +#define tELSE 272 +#define tNLELSIF 273 +#define tEND 274 +#define tEXIT 275 +#define tFRAME 276 +#define tGLOBAL 277 +#define tGO 278 +#define tIF 279 +#define tINTO 280 +#define tLOOP 281 +#define tMACRO 282 +#define tMCI 283 +#define tMCIWAIT 284 +#define tMOVIE 285 +#define tNEXT 286 +#define tOF 287 +#define tPREVIOUS 288 +#define tPUT 289 +#define tREPEAT 290 +#define tSET 291 +#define tTHEN 292 +#define tTO 293 +#define tWITH 294 +#define tWHILE 295 +#define tNLELSE 296 +#define tGE 297 +#define tLE 298 +#define tGT 299 +#define tLT 300 +#define tEQ 301 +#define tNEQ 302 +#define tAND 303 +#define tOR 304 +#define tNOT 305 +#define tCONCAT 306 +#define tCONTAINS 307 +#define tSTARTS 308 @@ -153,7 +159,7 @@ typedef union YYSTYPE  	int	narg;	/* number of arguments */  }  /* Line 1529 of yacc.c.  */ -#line 157 "engines/director/lingo/lingo-gr.hpp" +#line 163 "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 adb2075366..f830505713 100644 --- a/engines/director/lingo/lingo-gr.y +++ b/engines/director/lingo/lingo-gr.y @@ -75,7 +75,7 @@ void yyerror(char *s) {  }  %token CASTREF UNARY VOID VAR -%token<i> INT +%token<i> INT THEENTITY THEENTITYWITHID THEFIELD  %token<f> FLOAT  %token<s> BLTIN ID STRING HANDLER  %token tDOWN tELSE tNLELSIF tEND tEXIT tFRAME tGLOBAL tGO tIF tINTO tLOOP tMACRO @@ -125,12 +125,27 @@ asgn: tPUT expr tINTO ID 		{  		g_lingo->code1(g_lingo->c_assign);  		$$ = $4;  		delete $2; } +	| tSET THEENTITY '=' expr	{ +		g_lingo->code1(g_lingo->c_theentityassign); +		inst e = 0, f = 0, i = 0; +		WRITE_UINT32(&e, $2); +		WRITE_UINT32(&f, 0); +		WRITE_UINT32(&i, 0); +		g_lingo->code3(e, f, i); +		$$ = $4; }  	| tSET ID tTO expr			{  		g_lingo->code1(g_lingo->c_varpush);  		g_lingo->codeString($2->c_str());  		g_lingo->code1(g_lingo->c_assign);  		$$ = $4;  		delete $2; } +	| tSET THEENTITY tTO expr	{ +		g_lingo->code1(g_lingo->c_theentityassign); +		inst e = 0, f = 0; +		WRITE_UINT32(&e, $2); +		WRITE_UINT32(&f, 0); +		g_lingo->code2(e, f); +		$$ = $4; }  	;  stmtoneliner: expr 				{ g_lingo->code1(g_lingo->c_xpop); }  	| func @@ -329,6 +344,13 @@ expr: INT		{  	| ID		{  		$$ = g_lingo->codeId(*$1);  		delete $1; } +	| THEENTITY	{ +		$$ = g_lingo->code1(g_lingo->c_theentitypush); +		inst e = 0, f = 0, i = 0; +		WRITE_UINT32(&e, $1); +		WRITE_UINT32(&f, 0); +		WRITE_UINT32(&i, 0); +		g_lingo->code3(e, f, i); }  	| asgn  	| expr '+' expr				{ g_lingo->code1(g_lingo->c_add); }  	| expr '-' expr				{ g_lingo->code1(g_lingo->c_sub); } diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp index 58d052ee0c..e8b376bf0a 100644 --- a/engines/director/lingo/lingo-lex.cpp +++ b/engines/director/lingo/lingo-lex.cpp @@ -401,15 +401,15 @@ static yyconst flex_int32_t yy_ec[256] =          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,   12,    1,   13, -       14,   15,    1,    1,   16,   17,   18,   19,   20,   21, -       22,   23,   24,   25,   25,   26,   27,   28,   29,   30, -       25,   31,   32,   33,   34,   35,   36,   37,   25,   25, -        1,    1,    1,    7,   25,    1,   38,   39,   40,   41, - -       42,   43,   44,   45,   46,   25,   25,   47,   48,   49, -       50,   51,   25,   52,   53,   54,   55,   56,   57,   58, -       25,   25,    1,    1,    1,    1,    1,    1,    1,    1, +       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, +       24,   30,   31,   32,   33,   34,   35,   36,   24,   24, +        1,    1,    1,    7,   37,    1,   38,   39,   40,   41, + +       42,   43,   44,   45,   46,   24,   24,   47,   48,   49, +       50,   51,   24,   52,   53,   54,   55,   56,   57,   58, +       24,   24,    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, @@ -429,32 +429,32 @@ static yyconst flex_int32_t yy_ec[256] =  static yyconst flex_int32_t yy_meta[59] =      {   0,          1,    2,    3,    4,    2,    1,    1,    1,    1,    1, -        5,    2,    1,    1,    1,    6,    5,    5,    5,    5, -        5,    5,    6,    5,    5,    6,    5,    5,    5,    6, -        5,    5,    5,    5,    5,    5,    5,    6,    5,    5, -        5,    5,    5,    5,    6,    5,    6,    5,    5,    5, -        6,    5,    5,    5,    5,    5,    5,    5 +        5,    1,    1,    1,    6,    6,    6,    6,    6,    6, +        6,    6,    6,    6,    6,    6,    6,    6,    6,    6, +        6,    6,    6,    6,    6,    6,    5,    6,    6,    6, +        6,    6,    6,    6,    6,    6,    6,    6,    6,    6, +        6,    6,    6,    6,    6,    6,    6,    6      } ;  static yyconst flex_int16_t yy_base[158] =      {   0, -        0,   57,  202,  367,   61,   65,   69,   73,  188,  367, -      180,  168,   50,   65,  136,   53,    0,   53,   54,   68, -       56,   62,   71,   66,  103,   81,   97,   93,   64,   80, -      106,  113,  158,  162,  166,   94,  170,  137,  178,   99, -      132,  367,  367,    0,  122,  144,  367,  367,  367,    0, -      111,  148,  142,  152,  166,  162,  171,  160,    0,    0, -      157,  162,  174,  169,  160,  159,  167,    0,    0,  181, -      170,  174,  173,  197,  198,    0,  195,  189,  226,  234, -      194,    0,   75,    0,  199,  205,  214,    0,  209,  217, -      228,  219,  219,  219,  215,  222,  219,    0,  220,    0, - -      237,    0,  228,  256,  234,  241,  246,  258,    0,    0, -        0,  255,  261,    0,    0,  233,  262,  262,    0,  261, -      271,  256,   88,    0,  270,    0,  142,  267,    0,  267, -        0,  270,    0,  269,  268,  270,  290,    0,  301,  280, -        0,  278,  281,    0,    0,  296,  288,    0,  289,  367, -        0,    0,  367,  347,  349,  355,  360 +        0,   57,  188,  380,   61,   65,   69,   73,  153,  380, +      137,   91,   50,   66,   85,   54,    0,   54,   55,   65, +       56,   66,   75,   59,   82,   87,   97,   95,   77,  102, +      108,  116,  161,  165,  169,  138,  173,  141,  177,  101, +       87,  380,  380,    0,   78,  141,  380,  380,  380,    0, +      113,  106,  100,  153,  167,  163,  172,  161,    0,    0, +      158,  163,  175,  170,  161,  162,  167,    0,    0,  181, +      170,  174,  172,  190,  188,    0,  191,  186,  229,  239, +      196,    0,   74,    0,  197,  208,  203,    0,  204,  212, +      223,  218,  218,  218,  215,  229,  222,    0,  221,    0, + +      237,    0,  229,  259,  238,  243,  247,  252,    0,    0, +        0,  252,  258,    0,    0,  250,  259,  261,    0,  259, +      268,  255,  192,    0,  265,    0,  290,  268,    0,  268, +        0,  275,    0,  273,  270,  273,  308,    0,  314,  284, +        0,  280,  284,    0,    0,  279,  287,    0,  289,  380, +        0,    0,  380,  360,  362,  368,  373      } ;  static yyconst flex_int16_t yy_def[158] = @@ -478,58 +478,59 @@ static yyconst flex_int16_t yy_def[158] =        155,  155,    0,  153,  153,  153,  153      } ; -static yyconst flex_int16_t yy_nxt[426] = +static yyconst flex_int16_t yy_nxt[439] =      {   0,          4,    5,    6,    7,    8,    9,   10,   11,   12,    4, -       13,   10,   14,   10,   15,   16,   17,   18,   19,   20, -       21,   22,   17,   23,   17,   24,   25,   26,   27,   28, -       29,   30,   31,   17,   17,   32,   17,   16,   17,   18, +       13,   14,   10,   15,   16,   17,   18,   19,   20,   21, +       22,   17,   23,   17,   24,   25,   26,   27,   28,   29, +       30,   31,   17,   17,   32,   17,   17,   16,   17,   18,         19,   20,   21,   22,   17,   23,   24,   25,   26,   27,         28,   29,   30,   31,   17,   17,   32,   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,   72,   40,   83,   57,   58,   40,  123, -       59,   60,  123,   54,   62,   55,   36,   36,   61,   73, - -       66,   51,   52,   53,   56,   72,   40,   57,   58,   67, -       40,   59,   74,   60,   54,   62,   55,   68,   63,   61, -       64,   73,   66,   70,   81,   56,   71,   69,   75,   84, -       67,   65,   83,   74,   76,   77,   78,   42,   38,   68, -       63,   38,   64,  139,   70,   81,  139,   71,   69,   49, -       75,   84,   65,   45,   46,   76,   40,   77,   78,   79, -       36,   36,   80,   80,   36,   36,   80,   35,   36,   36, -       37,   37,   36,   36,   37,   85,   44,   86,   40,   38, -       39,   39,   38,   87,   88,   89,   90,   43,   91,   92, -       93,   94,   95,   42,   96,   97,   85,   40,   86,   98, - -       99,  153,  100,  101,   87,  102,   88,   89,   90,   91, -       92,   93,  103,   94,   95,   96,   97,  104,  105,   40, -       98,  106,   99,  100,  101,  107,  102,   79,   36,   36, -       80,  108,  109,  110,  103,   80,   36,   36,   80,  104, -      105,  111,  106,  112,  113,  118,  107,  114,  115,  116, -      117,  119,  108,  109,  120,  110,  121,  123,  122,  125, -      123,  131,  111,  126,  112,  127,  113,  118,  114,  115, -      116,  117,  119,  128,  129,  120,  130,  132,  121,  122, -      125,  133,  131,  124,  134,  126,  135,  127,  136,  138, -      140,  153,  141,  142,  153,  128,  129,  143,  130,  132, - -      144,  145,  139,  133,  124,  139,  134,  147,  135,  136, -      148,  138,  140,  141,  149,  142,  150,  153,  143,  151, -      152,  144,  145,  153,  146,  153,  153,  153,  147,  153, -      153,  148,  153,  153,  153,  149,  153,  153,  150,  153, -      151,  152,  153,  153,  153,  153,  146,   41,   41,  153, -       41,   41,   41,   50,   50,   82,   82,  153,  153,   82, -       82,  137,  153,  153,  153,  137,    3,  153,  153,  153, -      153,  153,  153,  153,  153,  153,  153,  153,  153,  153, +       51,   52,   53,   40,   83,   57,   62,   40,   83,   54, +       58,   55,   42,   59,   60,   72,   63,   49,   64,   44, + +       56,   61,   51,   52,   53,   66,   40,   57,   62,   65, +       40,   54,   58,   55,   67,   59,   68,   60,   72,   63, +       73,   64,   56,   61,   70,   81,   69,   71,   66,   75, +       84,   65,   85,   74,   86,   76,   67,   77,   78,   68, +       36,   36,   38,   73,   43,   38,   70,   81,   69,   71, +       45,   46,   75,   84,   85,   74,   86,   76,   42,   40, +       77,   78,   79,   36,   36,   80,   80,   36,   36,   80, +       35,   36,   36,   37,   37,   36,   36,   37,   38,   39, +       39,   38,   40,   87,   88,   89,   90,  153,   91,   92, +       93,   94,   95,  123,   96,   40,  123,   97,   98,   99, + +      153,  100,  101,  102,  103,   87,  104,   88,   89,   90, +       91,   92,   93,  105,   94,   95,   96,  106,   40,   97, +       98,  110,   99,  100,  101,  102,  107,  103,  108,  104, +       79,   36,   36,   80,  109,  111,  105,  112,  113,  106, +       80,   36,   36,   80,  110,  114,  115,  116,  107,  117, +      108,  118,  153,  119,  120,  121,  109,  111,  122,  112, +      123,  113,  125,  123,  126,  127,  128,  114,  115,  116, +      129,  117,  130,  132,  118,  119,  120,  131,  121,  133, +      122,  134,  135,  138,  125,  124,  136,  126,  127,  128, +      140,  139,  141,  129,  139,  130,  132,  142,  150,  131, + +      143,  144,  133,  145,  134,  135,  138,  124,  136,  153, +      147,  148,  153,  140,  141,  139,  149,  151,  139,  152, +      142,  150,  143,  144,  153,  145,  153,  153,  153,  153, +      153,  153,  147,  148,  153,  153,  146,  153,  149,  151, +      153,  152,  153,  153,  153,  153,  153,  153,  153,  153, +      153,  153,  153,  153,  153,  153,  153,  153,  153,  146, +       41,   41,  153,   41,   41,   41,   50,   50,   82,   82, +      153,  153,   82,   82,  137,  153,  153,  153,  137,    3,        153,  153,  153,  153,  153,  153,  153,  153,  153,  153,        153,  153,  153,  153,  153,  153,  153,  153,  153,  153,        153,  153,  153,  153,  153,  153,  153,  153,  153,  153,        153,  153,  153,  153,  153,  153,  153,  153,  153,  153, -      153,  153,  153,  153,  153 +      153,  153,  153,  153,  153,  153,  153,  153,  153,  153, +      153,  153,  153,  153,  153,  153,  153,  153      } ; -static yyconst flex_int16_t yy_chk[426] = +static yyconst flex_int16_t yy_chk[439] =      {   0,          1,    1,    1,    1,    1,    1,    1,    1,    1,    1,          1,    1,    1,    1,    1,    1,    1,    1,    1,    1, @@ -539,45 +540,46 @@ static yyconst flex_int16_t yy_chk[426] =          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,   29,    6,   83,   21,   22,    7,  123, -       22,   23,  123,   20,   24,   20,   36,   36,   23,   30, - -       26,   16,   18,   19,   20,   29,    6,   21,   22,   26, -        7,   22,   30,   23,   20,   24,   20,   27,   25,   23, -       25,   30,   26,   28,   40,   20,   28,   27,   31,   51, -       26,   25,   45,   30,   31,   32,   32,   41,   38,   27, -       25,   38,   25,  127,   28,   40,  127,   28,   27,   15, -       31,   51,   25,   46,   46,   31,   38,   32,   32,   33, -       33,   33,   33,   34,   34,   34,   34,   35,   35,   35, -       35,   37,   37,   37,   37,   52,   12,   53,   38,   39, -       39,   39,   39,   54,   55,   56,   57,   11,   58,   61, -       62,   63,   64,    9,   65,   66,   52,   39,   53,   67, - -       70,    3,   71,   72,   54,   73,   55,   56,   57,   58, -       61,   62,   74,   63,   64,   65,   66,   75,   77,   39, -       67,   78,   70,   71,   72,   81,   73,   79,   79,   79, -       79,   85,   86,   87,   74,   80,   80,   80,   80,   75, -       77,   89,   78,   90,   91,   96,   81,   92,   93,   94, -       95,   97,   85,   86,   99,   87,  101,  104,  103,  105, -      104,  116,   89,  106,   90,  107,   91,   96,   92,   93, -       94,   95,   97,  108,  112,   99,  113,  117,  101,  103, -      105,  118,  116,  104,  120,  106,  121,  107,  122,  125, -      128,  137,  130,  132,  137,  108,  112,  134,  113,  117, - -      135,  136,  139,  118,  104,  139,  120,  140,  121,  122, -      142,  125,  128,  130,  143,  132,  146,    0,  134,  147, -      149,  135,  136,    0,  139,    0,    0,    0,  140,    0, -        0,  142,    0,    0,    0,  143,    0,    0,  146,    0, -      147,  149,    0,    0,    0,    0,  139,  154,  154,    0, -      154,  154,  154,  155,  155,  156,  156,    0,    0,  156, -      156,  157,    0,    0,    0,  157,  153,  153,  153,  153, -      153,  153,  153,  153,  153,  153,  153,  153,  153,  153, +       16,   18,   19,    6,   83,   21,   24,    7,   45,   20, +       22,   20,   41,   22,   23,   29,   25,   15,   25,   12, + +       20,   23,   16,   18,   19,   26,    6,   21,   24,   25, +        7,   20,   22,   20,   26,   22,   27,   23,   29,   25, +       30,   25,   20,   23,   28,   40,   27,   28,   26,   31, +       51,   25,   52,   30,   53,   31,   26,   32,   32,   27, +       36,   36,   38,   30,   11,   38,   28,   40,   27,   28, +       46,   46,   31,   51,   52,   30,   53,   31,    9,   38, +       32,   32,   33,   33,   33,   33,   34,   34,   34,   34, +       35,   35,   35,   35,   37,   37,   37,   37,   39,   39, +       39,   39,   38,   54,   55,   56,   57,    3,   58,   61, +       62,   63,   64,  123,   65,   39,  123,   66,   67,   70, + +        0,   71,   72,   73,   74,   54,   75,   55,   56,   57, +       58,   61,   62,   77,   63,   64,   65,   78,   39,   66, +       67,   87,   70,   71,   72,   73,   81,   74,   85,   75, +       79,   79,   79,   79,   86,   89,   77,   90,   91,   78, +       80,   80,   80,   80,   87,   92,   93,   94,   81,   95, +       85,   96,    0,   97,   99,  101,   86,   89,  103,   90, +      104,   91,  105,  104,  106,  107,  108,   92,   93,   94, +      112,   95,  113,  117,   96,   97,   99,  116,  101,  118, +      103,  120,  121,  125,  105,  104,  122,  106,  107,  108, +      128,  127,  130,  112,  127,  113,  117,  132,  146,  116, + +      134,  135,  118,  136,  120,  121,  125,  104,  122,  137, +      140,  142,  137,  128,  130,  139,  143,  147,  139,  149, +      132,  146,  134,  135,    0,  136,    0,    0,    0,    0, +        0,    0,  140,  142,    0,    0,  139,    0,  143,  147, +        0,  149,    0,    0,    0,    0,    0,    0,    0,    0, +        0,    0,    0,    0,    0,    0,    0,    0,    0,  139, +      154,  154,    0,  154,  154,  154,  155,  155,  156,  156, +        0,    0,  156,  156,  157,    0,    0,    0,  157,  153,        153,  153,  153,  153,  153,  153,  153,  153,  153,  153,        153,  153,  153,  153,  153,  153,  153,  153,  153,  153,        153,  153,  153,  153,  153,  153,  153,  153,  153,  153,        153,  153,  153,  153,  153,  153,  153,  153,  153,  153, -      153,  153,  153,  153,  153 +      153,  153,  153,  153,  153,  153,  153,  153,  153,  153, +      153,  153,  153,  153,  153,  153,  153,  153      } ;  static yy_state_type yy_last_accepting_state; @@ -642,7 +644,7 @@ static void countnl() {  	g_lingo->_colnumber = strlen(p);  } -#line 646 "engines/director/lingo/lingo-lex.cpp" +#line 648 "engines/director/lingo/lingo-lex.cpp"  #define INITIAL 0 @@ -830,7 +832,7 @@ YY_DECL  #line 60 "engines/director/lingo/lingo-lex.l" -#line 834 "engines/director/lingo/lingo-lex.cpp" +#line 836 "engines/director/lingo/lingo-lex.cpp"  	if ( !(yy_init) )  		{ @@ -890,7 +892,7 @@ yy_match:  			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];  			++yy_cp;  			} -		while ( yy_base[yy_current_state] != 367 ); +		while ( yy_base[yy_current_state] != 380 );  yy_find_action:  		yy_act = yy_accept[yy_current_state]; @@ -1076,52 +1078,64 @@ YY_RULE_SETUP  		while (*ptr == ' ' || *ptr == '\t')  			ptr++; -		return tTHEN; +		if (g_lingo->_theEntities.contains(ptr)) { +			yylval.i = g_lingo->_theEntities[ptr]->entity; + +			if (g_lingo->_theEntities[ptr]->hasId) +				return THEENTITYWITHID; +			else +				return THEENTITY; +		} else if (g_lingo->_theEntityFields.contains(ptr)) { +			yylval.i = g_lingo->_theEntityFields[ptr]->field; +			return THEFIELD; +		} + +		error("Unhandled the entity %s", ptr);  	}  	YY_BREAK  case 32:  YY_RULE_SETUP -#line 102 "engines/director/lingo/lingo-lex.l" +#line 114 "engines/director/lingo/lingo-lex.l"  { count(); return tTHEN; }  	YY_BREAK  case 33:  YY_RULE_SETUP -#line 103 "engines/director/lingo/lingo-lex.l" +#line 115 "engines/director/lingo/lingo-lex.l"  { count(); return tTO; }  	YY_BREAK  case 34:  YY_RULE_SETUP -#line 104 "engines/director/lingo/lingo-lex.l" +#line 116 "engines/director/lingo/lingo-lex.l"  { count(); return tWITH; }  	YY_BREAK  case 35:  YY_RULE_SETUP -#line 105 "engines/director/lingo/lingo-lex.l" +#line 117 "engines/director/lingo/lingo-lex.l"  { count(); return tWHILE; }  	YY_BREAK  case 36:  YY_RULE_SETUP -#line 107 "engines/director/lingo/lingo-lex.l" +#line 119 "engines/director/lingo/lingo-lex.l"  { count(); return tNEQ; }  	YY_BREAK  case 37:  YY_RULE_SETUP -#line 108 "engines/director/lingo/lingo-lex.l" +#line 120 "engines/director/lingo/lingo-lex.l"  { count(); return tGE; }  	YY_BREAK  case 38:  YY_RULE_SETUP -#line 109 "engines/director/lingo/lingo-lex.l" +#line 121 "engines/director/lingo/lingo-lex.l"  { count(); return tLE; }  	YY_BREAK  case 39:  YY_RULE_SETUP -#line 110 "engines/director/lingo/lingo-lex.l" +#line 122 "engines/director/lingo/lingo-lex.l"  { count(); return tCONCAT; }  	YY_BREAK  case 40:  YY_RULE_SETUP -#line 112 "engines/director/lingo/lingo-lex.l" +#line 124 "engines/director/lingo/lingo-lex.l"  {  		count();  		yylval.s = new Common::String(yytext); @@ -1134,41 +1148,41 @@ YY_RULE_SETUP  	YY_BREAK  case 41:  YY_RULE_SETUP -#line 121 "engines/director/lingo/lingo-lex.l" +#line 133 "engines/director/lingo/lingo-lex.l"  { count(); yylval.f = atof(yytext); return FLOAT; }  	YY_BREAK  case 42:  YY_RULE_SETUP -#line 122 "engines/director/lingo/lingo-lex.l" +#line 134 "engines/director/lingo/lingo-lex.l"  { count(); yylval.i = strtol(yytext, NULL, 10); return INT; }  	YY_BREAK  case 43:  YY_RULE_SETUP -#line 123 "engines/director/lingo/lingo-lex.l" +#line 135 "engines/director/lingo/lingo-lex.l"  { count(); return *yytext; }  	YY_BREAK  case 44:  /* rule 44 can match eol */  YY_RULE_SETUP -#line 124 "engines/director/lingo/lingo-lex.l" +#line 136 "engines/director/lingo/lingo-lex.l"  { return '\n'; }  	YY_BREAK  case 45:  YY_RULE_SETUP -#line 125 "engines/director/lingo/lingo-lex.l" +#line 137 "engines/director/lingo/lingo-lex.l"  { count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return STRING; }  	YY_BREAK  case 46:  YY_RULE_SETUP -#line 126 "engines/director/lingo/lingo-lex.l" +#line 138 "engines/director/lingo/lingo-lex.l"  	YY_BREAK  case 47:  YY_RULE_SETUP -#line 128 "engines/director/lingo/lingo-lex.l" +#line 140 "engines/director/lingo/lingo-lex.l"  ECHO;  	YY_BREAK -#line 1172 "engines/director/lingo/lingo-lex.cpp" +#line 1186 "engines/director/lingo/lingo-lex.cpp"  case YY_STATE_EOF(INITIAL):  	yyterminate(); @@ -2168,7 +2182,7 @@ void yyfree (void * ptr )  #define YYTABLES_NAME "yytables" -#line 128 "engines/director/lingo/lingo-lex.l" +#line 140 "engines/director/lingo/lingo-lex.l" diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l index 40f66a6e34..1f1cd76661 100644 --- a/engines/director/lingo/lingo-lex.l +++ b/engines/director/lingo/lingo-lex.l @@ -90,14 +90,26 @@ whitespace [\t ]  (?i:repeat)			{ count(); return tREPEAT; }  (?i:set)			{ count(); return tSET; }  (?i:starts)			{ count(); return tSTARTS; } -(?i:the[ \t]+[:alpha:]+)		{ +(?i:the[ \t]+[[:alpha:]]+)		{  		count();  		const char *ptr = &yytext[4]; // Skip 'the '  		while (*ptr == ' ' || *ptr == '\t')  			ptr++; -		return tTHEN; +		if (g_lingo->_theEntities.contains(ptr)) { +			yylval.i = g_lingo->_theEntities[ptr]->entity; + +			if (g_lingo->_theEntities[ptr]->hasId) +				return THEENTITYWITHID; +			else +				return THEENTITY; +		} else if (g_lingo->_theEntityFields.contains(ptr)) { +			yylval.i = g_lingo->_theEntityFields[ptr]->field; +			return THEFIELD; +		} + +		error("Unhandled the entity %s", ptr);  	}  (?i:then)			{ count(); return tTHEN; }  (?i:to)				{ count(); return tTO; } diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp index b631732d09..8680426aa6 100644 --- a/engines/director/lingo/lingo-the.cpp +++ b/engines/director/lingo/lingo-the.cpp @@ -27,48 +27,48 @@ namespace Director {  class Sprite;  TheEntity entities[] = { -	{ kTheCast,				"cast",				INT  }, // string? -	{ kTheClickOn,			"clickOn",			VOID }, -	{ kTheColorDepth,		"colorDepth",		VOID }, -	{ kTheColorQD,			"colorQD",			VOID }, -	{ kTheCommandDown,		"commandDown",		VOID }, -	{ kTheControlDown,		"controlDown",		VOID }, -	{ kTheDoubleClick,		"doubleClick",		VOID }, -	{ kTheExitLock,			"exitlock",			VOID }, -	{ kTheFloatPrecision,	"floatPrecision",	VOID }, -	{ kTheFrame,			"frame",			VOID }, -	{ kTheItemDelimiter,	"itemDelimiter",	VOID }, -	{ kTheKey,				"key",				VOID }, -	{ kTheLastClick,		"lastClick",		VOID }, -	{ kTheLastEvent,		"lastEvent",		VOID }, -	{ kTheLastFrame,		"lastFrame",		VOID }, -	{ kTheMenu,				"menu",				INT  }, -	{ kTheMenus,			"menus",			VOID }, -	{ kTheMenuItem,			"menuitem",			STRING  }, // int? -	{ kTheMenuItems,		"menuitems",		VOID  }, -	{ kTheMouseDown,		"mouseDown",		VOID }, -	{ kTheMouseDownScript,  "mouseDownScript",	VOID }, -	{ kTheMouseH,			"mouseh",			VOID }, -	{ kTheMouseUp,			"mouseUp",			VOID }, -	{ kTheMouseUpScript,  	"mouseUpScript",	VOID }, -	{ kTheMouseV,			"mousev",			VOID }, -	{ kTheMovie,			"movie",			VOID }, -	{ kTheMultiSound,		"multiSound",		VOID }, -	{ kTheOptionDown,		"optionDown",		VOID }, -	{ kThePathName,			"pathname",			VOID }, -	{ kThePerFrameHook,		"perframehook",		VOID }, -	{ kThePreloadEventAbort,"preloadEventAbort",VOID }, -	{ kTheRightMouseDown,	"rightMouseDown",	VOID }, -	{ kTheRightMouseUp,		"rightMouseUp",		VOID }, -	{ kTheRomanLingo,		"romanLingo",		VOID }, -	{ kTheShiftDown,		"shiftDown",		VOID }, -	{ kTheSprite,			"sprite",			INT  }, -	{ kTheStage,			"stage",			VOID }, -	{ kTheStillDown,		"stillDown",		VOID }, -	{ kTheTicks,			"ticks",			VOID }, -	{ kTheTimeoutLength,	"timeoutlength",	VOID }, -	{ kTheTimer,			"timer",			VOID }, -	{ kTheWindow,			"window",			VOID }, +	{ kTheCast,				"cast",				true  }, +	{ kTheClickOn,			"clickOn",			false }, +	{ kTheColorDepth,		"colorDepth",		false }, +	{ kTheColorQD,			"colorQD",			false }, +	{ kTheCommandDown,		"commandDown",		false }, +	{ kTheControlDown,		"controlDown",		false }, +	{ kTheDoubleClick,		"doubleClick",		false }, +	{ kTheExitLock,			"exitlock",			false }, +	{ kTheFloatPrecision,	"floatPrecision",	false }, +	{ kTheFrame,			"frame",			false }, +	{ kTheItemDelimiter,	"itemDelimiter",	false }, +	{ kTheKey,				"key",				false }, +	{ kTheLastClick,		"lastClick",		false }, +	{ kTheLastEvent,		"lastEvent",		false }, +	{ kTheLastFrame,		"lastFrame",		false }, +	{ kTheMenu,				"menu",				true  }, +	{ kTheMenus,			"menus",			false }, +	{ kTheMenuItem,			"menuitem",			true  }, +	{ kTheMenuItems,		"menuitems",		false }, +	{ kTheMouseDown,		"mouseDown",		false }, +	{ kTheMouseDownScript,  "mouseDownScript",	false }, +	{ kTheMouseH,			"mouseh",			false }, +	{ kTheMouseUp,			"mouseUp",			false }, +	{ kTheMouseUpScript,  	"mouseUpScript",	false }, +	{ kTheMouseV,			"mousev",			false }, +	{ kTheMovie,			"movie",			false }, +	{ kTheMultiSound,		"multiSound",		false }, +	{ kTheOptionDown,		"optionDown",		false }, +	{ kThePathName,			"pathname",			false }, +	{ kThePerFrameHook,		"perframehook",		false }, +	{ kThePreloadEventAbort,"preloadEventAbort",false }, +	{ kTheRightMouseDown,	"rightMouseDown",	false }, +	{ kTheRightMouseUp,		"rightMouseUp",		false }, +	{ kTheRomanLingo,		"romanLingo",		false }, +	{ kTheShiftDown,		"shiftDown",		false }, +	{ kTheSprite,			"sprite",			true  }, +	{ kTheStage,			"stage",			false }, +	{ kTheStillDown,		"stillDown",		false }, +	{ kTheTicks,			"ticks",			false }, +	{ kTheTimeoutLength,	"timeoutlength",	false }, +	{ kTheTimer,			"timer",			false }, +	{ kTheWindow,			"window",			false },  	{ kTheNOEntity, NULL, false }  }; @@ -173,7 +173,7 @@ void Lingo::initTheEntities() {  	}  } -void Lingo::setTheEntity(TheEntityType entity, int id, TheFieldType field, Datum &d) { +void Lingo::setTheEntity(int entity, int id, int field, Datum &d) {  	switch (entity) {  	case kTheSprite:  		setTheSprite(id, field, d); @@ -184,14 +184,15 @@ void Lingo::setTheEntity(TheEntityType entity, int id, TheFieldType field, Datum  	case kTheFloatPrecision:  		_floatPrecision = d.toInt();  		_floatPrecision = MAX(0, MIN(_floatPrecision, 19)); // 0 to 19 -		_floatPrecisionFormat.format("%%.%df", _floatPrecision); +		_floatPrecisionFormat = Common::String::format("%%.%df", _floatPrecision); +		warning("set to %d: %s", _floatPrecision, _floatPrecisionFormat.c_str());  		break;  	default:  		error("Unprocessed setting field %d of entity %d", field, entity);  	}  } -void Lingo::setTheSprite(int id, TheFieldType field, Datum &d) { +void Lingo::setTheSprite(int id, int field, Datum &d) {  	Sprite *sprite = _vm->_currentScore->getSpriteById(id);  	d.toInt(); // Enforce Integer @@ -230,7 +231,7 @@ void Lingo::setTheSprite(int id, TheFieldType field, Datum &d) {  	}  } -Datum Lingo::getTheEntity(TheEntityType entity, int id, TheFieldType field) { +Datum Lingo::getTheEntity(int entity, int id, int field) {  	Datum d;  	switch (entity) { @@ -253,7 +254,7 @@ Datum Lingo::getTheEntity(TheEntityType entity, int id, TheFieldType field) {  	return d;  } -Datum Lingo::getTheSprite(int id, TheFieldType field) { +Datum Lingo::getTheSprite(int id, int field) {  	Datum d;  	Sprite *sprite = _vm->_currentScore->getSpriteById(id); @@ -291,7 +292,7 @@ Datum Lingo::getTheSprite(int id, TheFieldType field) {  	return d;  } -Datum Lingo::getTheCast(int id, TheFieldType field) { +Datum Lingo::getTheCast(int id, int field) {  	Datum d;  	d.type = INT; @@ -343,7 +344,7 @@ Datum Lingo::getTheCast(int id, TheFieldType field) {  	}  } -void Lingo::setTheCast(int id, TheFieldType field, Datum &d) { +void Lingo::setTheCast(int id, int field, Datum &d) {  	Cast *cast = _vm->_currentScore->_casts[id];  	switch (field) {  	case kTheCastType: diff --git a/engines/director/lingo/lingo-the.h b/engines/director/lingo/lingo-the.h index c867b8dfc6..806c295204 100644 --- a/engines/director/lingo/lingo-the.h +++ b/engines/director/lingo/lingo-the.h @@ -138,7 +138,7 @@ enum TheFieldType {  struct TheEntity {  	TheEntityType entity;  	const char *name; -	int idType; +	bool hasId;  };  struct TheEntityField { diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp index 7c7f51ed87..ccbb66898d 100644 --- a/engines/director/lingo/lingo.cpp +++ b/engines/director/lingo/lingo.cpp @@ -82,6 +82,7 @@ Lingo::Lingo(DirectorEngine *vm) : _vm(vm) {  		_eventHandlerTypes[t->handler] = t->name;  	initBuiltIns(); +	initTheEntities();  	_currentScript = 0;  	_currentScriptType = kMovieScript; diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h index 5dc6c07d82..f1fc96a1d3 100644 --- a/engines/director/lingo/lingo.h +++ b/engines/director/lingo/lingo.h @@ -206,6 +206,10 @@ public:  	static void c_assign();  	bool verify(Symbol *s);  	static void c_eval(); + +	static void c_theentitypush(); +	static void c_theentityassign(); +  	static void c_repeatwhilecode();  	static void c_repeatwithcode();  	static void c_ifcode(); @@ -251,12 +255,12 @@ public:  	void func_gotoprevious();  public: -	void setTheEntity(TheEntityType entity, int id, TheFieldType field, Datum &d); -	void setTheSprite(int id, TheFieldType field, Datum &d); -	void setTheCast(int id, TheFieldType field, Datum &d); -	Datum getTheEntity(TheEntityType entity, int id, TheFieldType field); -	Datum getTheSprite(int id, TheFieldType field); -	Datum getTheCast(int id, TheFieldType field); +	void setTheEntity(int entity, int id, int field, Datum &d); +	void setTheSprite(int id, int field, Datum &d); +	void setTheCast(int id, int field, Datum &d); +	Datum getTheEntity(int entity, int id, int field); +	Datum getTheSprite(int id, int field); +	Datum getTheCast(int id, int field);  public:  	ScriptData *_currentScript; diff --git a/engines/director/lingo/tests/the.lingo b/engines/director/lingo/tests/the.lingo new file mode 100644 index 0000000000..fbfbebd6e4 --- /dev/null +++ b/engines/director/lingo/tests/the.lingo @@ -0,0 +1,3 @@ +put 1.0 / 3 +set the floatPrecision to 6 +put 1.0 / 3 | 
