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

sev- sev at scummvm.org
Fri Aug 5 07:49:10 CEST 2016


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

Summary:
b60c5d927e DIRECTOR: Lingo: Revert adding prefix 'v' to all Symbol types.


Commit: b60c5d927e6d4a86660937f8426cf557e7e90f7e
    https://github.com/scummvm/scummvm/commit/b60c5d927e6d4a86660937f8426cf557e7e90f7e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-08-05T07:49:00+02:00

Commit Message:
DIRECTOR: Lingo: Revert adding prefix 'v' to all Symbol types.

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



diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index 8a779b9..acec593 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -64,7 +64,7 @@ void Lingo::initBuiltIns() {
 
 		sym->name = (char *)calloc(strlen(blt->name) + 1, 1);
 		Common::strlcpy(sym->name, blt->name, strlen(blt->name));
-		sym->type = vBLTIN;
+		sym->type = BLTIN;
 		sym->nargs = blt->nparams;
 		sym->u.func = blt->func;
 
@@ -78,9 +78,9 @@ void Lingo::initBuiltIns() {
 void Lingo::b_abs() {
 	Datum d = g_lingo->pop();
 
-	if (d.type == vINT)
+	if (d.type == INT)
 		d.u.i = ABS(d.u.i);
-	else if (d.type == vFLOAT)
+	else if (d.type == FLOAT)
 		d.u.f = ABS(d.u.f);
 
 	g_lingo->push(d);
@@ -150,7 +150,7 @@ void Lingo::b_random() {
 	max.toInt();
 
 	res.u.i = g_lingo->_vm->_rnd.getRandomNumber(max.u.i);
-	res.type = vINT;
+	res.type = INT;
 
 	g_lingo->push(res);
 }
@@ -184,7 +184,7 @@ void Lingo::b_chars() {
 	Datum from = g_lingo->pop();
 	Datum s = g_lingo->pop();
 
-	if (s.type != vSTRING)
+	if (s.type != STRING)
 		error("Incorrect type for 'chars' function: %s", s.type2str());
 
 	to.toInt();
@@ -199,21 +199,21 @@ void Lingo::b_chars() {
 	delete s.u.s;
 
 	s.u.s = res;
-	s.type = vSTRING;
+	s.type = STRING;
 	g_lingo->push(s);
 }
 
 void Lingo::b_length() {
 	Datum d = g_lingo->pop();
 
-	if (d.type != vSTRING)
+	if (d.type != STRING)
 		error("Incorrect type for 'length' function: %s", d.type2str());
 
 	int len = strlen(d.u.s->c_str());
 	delete d.u.s;
 
 	d.u.i = len;
-	d.type = vINT;
+	d.type = INT;
 	g_lingo->push(d);
 }
 
@@ -237,7 +237,7 @@ void Lingo::b_updatestage() {
 void Lingo::b_ilk() {
 	Datum d = g_lingo->pop();
 	d.u.i = d.type;
-	d.type = vSYMBOL;
+	d.type = SYMBOL;
 	g_lingo->push(d);
 }
 
@@ -264,7 +264,7 @@ void Lingo::b_point() {
 
 	d.u.arr->push_back(x.u.f);
 	d.u.arr->push_back(y.u.f);
-	d.type = vPOINT;
+	d.type = POINT;
 
 	g_lingo->push(d);
 }
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp
index 05c10f6..bcd479f 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -58,7 +58,7 @@ void Lingo::push(Datum d) {
 void Lingo::pushVoid() {
 	Datum d;
 	d.u.i = 0;
-	d.type = vVOID;
+	d.type = VOID;
 	push(d);
 }
 
@@ -80,16 +80,16 @@ void Lingo::c_printtop(void) {
 	Datum d = g_lingo->pop();
 
 	switch (d.type) {
-	case vVOID:
+	case VOID:
 		warning("Void");
 		break;
-	case vINT:
+	case INT:
 		warning("%d", d.u.i);
 		break;
-	case vFLOAT:
+	case FLOAT:
 		warning(g_lingo->_floatPrecisionFormat.c_str(), d.u.f);
 		break;
-	case vVAR:
+	case VAR:
 		if (!d.u.sym) {
 			warning("Inconsistent stack: var, val: %d", d.u.i);
 		} else {
@@ -99,13 +99,13 @@ void Lingo::c_printtop(void) {
 				warning("Nameless var. val: %d", d.u.sym->u.i);
 		}
 		break;
-	case vSTRING:
+	case STRING:
 		warning("%s", d.u.s->c_str());
 		break;
-	case vPOINT:
+	case POINT:
 		warning("point(%d, %d)", (int)((*d.u.arr)[0]), (int)((*d.u.arr)[1]));
 		break;
-	case vSYMBOL:
+	case SYMBOL:
 		warning("%s", d.type2str(true));
 		break;
 	default:
@@ -117,7 +117,7 @@ void Lingo::c_constpush() {
 	Datum d;
 	inst i = (*g_lingo->_currentScript)[g_lingo->_pc++];
 	d.u.i = READ_UINT32(&i);
-	d.type = vINT;
+	d.type = INT;
 	g_lingo->push(d);
 }
 
@@ -125,7 +125,7 @@ void Lingo::c_fconstpush() {
 	Datum d;
 	inst i = (*g_lingo->_currentScript)[g_lingo->_pc];
 	d.u.f = *((double *)&i);
-	d.type = vFLOAT;
+	d.type = FLOAT;
 
 	g_lingo->_pc += g_lingo->calcCodeAlignment(sizeof(double));
 
@@ -138,7 +138,7 @@ void Lingo::c_stringpush() {
 	g_lingo->_pc += g_lingo->calcStringAlignment(s);
 
 	d.u.s = new Common::String(s);
-	d.type = vSTRING;
+	d.type = STRING;
 	g_lingo->push(d);
 }
 
@@ -147,15 +147,15 @@ void Lingo::c_varpush() {
 	Datum d;
 
 	d.u.sym = g_lingo->lookupVar(name);
-	if (d.u.sym->type == vCASTREF) {
-		d.type = vINT;
+	if (d.u.sym->type == CASTREF) {
+		d.type = INT;
 		int val = d.u.sym->u.i;
 
 		delete d.u.sym;
 
 		d.u.i = val;
 	} else {
-		d.type = vVAR;
+		d.type = VAR;
 	}
 
 	g_lingo->_pc += g_lingo->calcStringAlignment(name);
@@ -168,34 +168,34 @@ void Lingo::c_assign() {
 	d1 = g_lingo->pop();
 	d2 = g_lingo->pop();
 
-	if (d1.type != vVAR) {
+	if (d1.type != VAR) {
 		warning("assignment to non-variable");
 		return;
 	}
 
-	if (d1.u.sym->type != vINT && d1.u.sym->type != vVOID &&
-			d1.u.sym->type != vFLOAT && d1.u.sym->type != vSTRING) {
+	if (d1.u.sym->type != INT && d1.u.sym->type != VOID &&
+			d1.u.sym->type != FLOAT && d1.u.sym->type != STRING) {
 		warning("assignment to non-variable '%s'", d1.u.sym->name);
 		return;
 	}
 
-	if (d1.u.sym->type == vSTRING) // Free memory if needed
+	if (d1.u.sym->type == STRING) // Free memory if needed
 		delete d1.u.sym->u.s;
 
-	if (d1.u.sym->type == vPOINT || d1.u.sym->type == vRECT || d1.u.sym->type == vARRAY)
+	if (d1.u.sym->type == POINT || d1.u.sym->type == RECT || d1.u.sym->type == ARRAY)
 		delete d1.u.sym->u.arr;
 
-	if (d2.type == vINT) {
+	if (d2.type == INT) {
 		d1.u.sym->u.i = d2.u.i;
-	} else if (d2.type == vFLOAT) {
+	} else if (d2.type == FLOAT) {
 		d1.u.sym->u.f = d2.u.f;
-	} else if (d2.type == vSTRING) {
+	} else if (d2.type == STRING) {
 		d1.u.sym->u.s = new Common::String(*d2.u.s);
 		delete d2.u.s;
-	} else if (d2.type == vPOINT) {
+	} else if (d2.type == POINT) {
 		d1.u.sym->u.arr = new FloatArray(*d2.u.arr);
 		delete d2.u.arr;
-	} else if (d2.type == vSYMBOL) {
+	} else if (d2.type == SYMBOL) {
 		d1.u.sym->u.i = d2.u.i;
 	} else {
 		warning("c_assign: unhandled type: %s", d2.type2str());
@@ -207,13 +207,13 @@ void Lingo::c_assign() {
 }
 
 bool Lingo::verify(Symbol *s) {
-	if (s->type != vINT && s->type != vVOID && s->type != vFLOAT && s->type != vSTRING && s->type != vPOINT) {
+	if (s->type != INT && s->type != VOID && s->type != FLOAT && s->type != STRING && s->type != POINT) {
 		warning("attempt to evaluate non-variable '%s'", s->name);
 
 		return false;
 	}
 
-	if (s->type == vVOID)
+	if (s->type == VOID)
 		warning("Variable used before assigning a value '%s'", s->name);
 
 	return true;
@@ -225,7 +225,7 @@ void Lingo::c_eval() {
 	Datum d;
 	d = g_lingo->pop();
 
-	if (d.type != vVAR) { // It could be cast ref
+	if (d.type != VAR) { // It could be cast ref
 		g_lingo->push(d);
 		return;
 	}
@@ -235,15 +235,15 @@ void Lingo::c_eval() {
 
 	d.type = d.u.sym->type;
 
-	if (d.u.sym->type == vINT)
+	if (d.u.sym->type == INT)
 		d.u.i = d.u.sym->u.i;
-	else if (d.u.sym->type == vFLOAT)
+	else if (d.u.sym->type == FLOAT)
 		d.u.f = d.u.sym->u.f;
-	else if (d.u.sym->type == vSTRING)
+	else if (d.u.sym->type == STRING)
 		d.u.s = new Common::String(*d.u.sym->u.s);
-	else if (d.u.sym->type == vPOINT)
+	else if (d.u.sym->type == POINT)
 		d.u.arr = d.u.sym->u.arr;
-	else if (d.u.sym->type == vSYMBOL)
+	else if (d.u.sym->type == SYMBOL)
 		d.u.i = d.u.sym->u.i;
 	else
 		warning("c_eval: unhandled type: %s", d.type2str());
@@ -288,7 +288,7 @@ void Lingo::c_add() {
 	Datum d2 = g_lingo->pop();
 	Datum d1 = g_lingo->pop();
 
-	if (g_lingo->alignTypes(d1, d2) == vFLOAT) {
+	if (g_lingo->alignTypes(d1, d2) == FLOAT) {
 		d1.u.f += d2.u.f;
 	} else {
 		d1.u.i += d2.u.i;
@@ -300,7 +300,7 @@ void Lingo::c_sub() {
 	Datum d2 = g_lingo->pop();
 	Datum d1 = g_lingo->pop();
 
-	if (g_lingo->alignTypes(d1, d2) == vFLOAT) {
+	if (g_lingo->alignTypes(d1, d2) == FLOAT) {
 		d1.u.f -= d2.u.f;
 	} else {
 		d1.u.i -= d2.u.i;
@@ -312,7 +312,7 @@ void Lingo::c_mul() {
 	Datum d2 = g_lingo->pop();
 	Datum d1 = g_lingo->pop();
 
-	if (g_lingo->alignTypes(d1, d2) == vFLOAT) {
+	if (g_lingo->alignTypes(d1, d2) == FLOAT) {
 		d1.u.f *= d2.u.f;
 	} else {
 		d1.u.i *= d2.u.i;
@@ -323,13 +323,13 @@ void Lingo::c_mul() {
 void Lingo::c_div() {
 	Datum d2 = g_lingo->pop();
 
-	if ((d2.type == vINT && d2.u.i == 0) ||
-			(d2.type == vFLOAT && d2.u.f == 0.0))
+	if ((d2.type == INT && d2.u.i == 0) ||
+			(d2.type == FLOAT && d2.u.f == 0.0))
 		error("division by zero");
 
 	Datum d1 = g_lingo->pop();
 
-	if (g_lingo->alignTypes(d1, d2) == vFLOAT) {
+	if (g_lingo->alignTypes(d1, d2) == FLOAT) {
 		d1.u.f /= d2.u.f;
 	} else {
 		d1.u.i /= d2.u.i;
@@ -340,9 +340,9 @@ void Lingo::c_div() {
 void Lingo::c_negate() {
 	Datum d = g_lingo->pop();
 
-	if (d.type == vINT)
+	if (d.type == INT)
 		d.u.i = -d.u.i;
-	else if (d.type == vFLOAT)
+	else if (d.type == FLOAT)
 		d.u.f = -d.u.f;
 
 	g_lingo->push(d);
@@ -394,7 +394,7 @@ void Lingo::c_contains() {
 	delete s1;
 	delete s2;
 
-	d1.type = vINT;
+	d1.type = INT;
 	d1.u.i = res;
 
 	g_lingo->push(d1);
@@ -417,7 +417,7 @@ void Lingo::c_starts() {
 	delete s1;
 	delete s2;
 
-	d1.type = vINT;
+	d1.type = INT;
 	d1.u.i = res;
 
 	g_lingo->push(d1);
@@ -479,9 +479,9 @@ void Lingo::c_eq() {
 	Datum d2 = g_lingo->pop();
 	Datum d1 = g_lingo->pop();
 
-	if (g_lingo->alignTypes(d1, d2) == vFLOAT) {
+	if (g_lingo->alignTypes(d1, d2) == FLOAT) {
 		d1.u.i = (d1.u.f == d2.u.f) ? 1 : 0;
-		d1.type = vINT;
+		d1.type = INT;
 	} else {
 		d1.u.i = (d1.u.i == d2.u.i) ? 1 : 0;
 	}
@@ -492,9 +492,9 @@ void Lingo::c_neq() {
 	Datum d2 = g_lingo->pop();
 	Datum d1 = g_lingo->pop();
 
-	if (g_lingo->alignTypes(d1, d2) == vFLOAT) {
+	if (g_lingo->alignTypes(d1, d2) == FLOAT) {
 		d1.u.i = (d1.u.f != d2.u.f) ? 1 : 0;
-		d1.type = vINT;
+		d1.type = INT;
 	} else {
 		d1.u.i = (d1.u.i != d2.u.i) ? 1 : 0;
 	}
@@ -505,9 +505,9 @@ void Lingo::c_gt() {
 	Datum d2 = g_lingo->pop();
 	Datum d1 = g_lingo->pop();
 
-	if (g_lingo->alignTypes(d1, d2) == vFLOAT) {
+	if (g_lingo->alignTypes(d1, d2) == FLOAT) {
 		d1.u.i = (d1.u.f > d2.u.f) ? 1 : 0;
-		d1.type = vINT;
+		d1.type = INT;
 	} else {
 		d1.u.i = (d1.u.i > d2.u.i) ? 1 : 0;
 	}
@@ -518,9 +518,9 @@ void Lingo::c_lt() {
 	Datum d2 = g_lingo->pop();
 	Datum d1 = g_lingo->pop();
 
-	if (g_lingo->alignTypes(d1, d2) == vFLOAT) {
+	if (g_lingo->alignTypes(d1, d2) == FLOAT) {
 		d1.u.i = (d1.u.f < d2.u.f) ? 1 : 0;
-		d1.type = vINT;
+		d1.type = INT;
 	} else {
 		d1.u.i = (d1.u.i < d2.u.i) ? 1 : 0;
 	}
@@ -531,9 +531,9 @@ void Lingo::c_ge() {
 	Datum d2 = g_lingo->pop();
 	Datum d1 = g_lingo->pop();
 
-	if (g_lingo->alignTypes(d1, d2) == vFLOAT) {
+	if (g_lingo->alignTypes(d1, d2) == FLOAT) {
 		d1.u.i = (d1.u.f >= d2.u.f) ? 1 : 0;
-		d1.type = vINT;
+		d1.type = INT;
 	} else {
 		d1.u.i = (d1.u.i >= d2.u.i) ? 1 : 0;
 	}
@@ -544,9 +544,9 @@ void Lingo::c_le() {
 	Datum d2 = g_lingo->pop();
 	Datum d1 = g_lingo->pop();
 
-	if (g_lingo->alignTypes(d1, d2) == vFLOAT) {
+	if (g_lingo->alignTypes(d1, d2) == FLOAT) {
 		d1.u.i = (d1.u.f <= d2.u.f) ? 1 : 0;
-		d1.type = vINT;
+		d1.type = INT;
 	} else {
 		d1.u.i = (d1.u.i <= d2.u.i) ? 1 : 0;
 	}
@@ -590,7 +590,7 @@ void Lingo::c_repeatwithcode(void) {
 	Common::String countername((char *)&(*g_lingo->_currentScript)[savepc + 5]);
 	Symbol *counter = g_lingo->lookupVar(countername.c_str());
 
-	if (counter->type == vCASTREF) {
+	if (counter->type == CASTREF) {
 		error("Cast ref used as index: %s", countername.c_str());
 	}
 
@@ -598,7 +598,7 @@ void Lingo::c_repeatwithcode(void) {
 	d = g_lingo->pop();
 	d.toInt();
 	counter->u.i = d.u.i;
-	counter->type = vINT;
+	counter->type = INT;
 
 	while (true) {
 		g_lingo->execute(body);	/* body */
@@ -761,7 +761,7 @@ void Lingo::c_call() {
 			g_lingo->pop();
 	}
 
-	if (sym->type == vBLTIN) {
+	if (sym->type == BLTIN) {
 		if (sym->nargs > 0 && nargs < sym->nargs) {
 			warning("Too few arguments for function %s. Expecting %d but got %d", name.c_str(), sym->nargs, nargs);
 			for (int i = 0; i < nargs; i++)
@@ -780,7 +780,7 @@ void Lingo::c_call() {
 		Datum d;
 
 		d.u.i = 0;
-		d.type = vVOID;
+		d.type = VOID;
 		g_lingo->push(d);
 	}
 
diff --git a/engines/director/lingo/lingo-codegen.cpp b/engines/director/lingo/lingo-codegen.cpp
index 8618463..4284fa7 100644
--- a/engines/director/lingo/lingo-codegen.cpp
+++ b/engines/director/lingo/lingo-codegen.cpp
@@ -80,7 +80,7 @@ Symbol *Lingo::lookupVar(const char *name, bool create, bool putInGlobalList) {
 				int val = (tolower(name[0]) - 'a') * 64 + (name[1] - '1') * 8 + (name[2] - '1') + 1;
 				sym = new Symbol;
 
-				sym->type = vCASTREF;
+				sym->type = CASTREF;
 				sym->u.i = val;
 
 				return sym;
@@ -95,7 +95,7 @@ Symbol *Lingo::lookupVar(const char *name, bool create, bool putInGlobalList) {
 		sym = new Symbol;
 		sym->name = (char *)calloc(strlen(name) + 1, 1);
 		Common::strlcpy(sym->name, name, strlen(name) + 1);
-		sym->type = vVOID;
+		sym->type = VOID;
 		sym->u.i = 0;
 
 		(*_localvars)[name] = sym;
@@ -136,7 +136,7 @@ void Lingo::define(Common::String &name, int start, int nargs, Common::String *p
 
 		sym->name = (char *)calloc(name.size() + 1, 1);
 		Common::strlcpy(sym->name, name.c_str(), name.size() + 1);
-		sym->type = vHANDLER;
+		sym->type = HANDLER;
 
 		_handlers[name] = sym;
 	} else {
diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp
index fa37d73..b8e71e2 100644
--- a/engines/director/lingo/lingo-gr.cpp
+++ b/engines/director/lingo/lingo-gr.cpp
@@ -67,22 +67,22 @@
       know about them.  */
    enum yytokentype {
      UNARY = 258,
-     vCASTREF = 259,
-     vVOID = 260,
-     vVAR = 261,
-     vPOINT = 262,
-     vRECT = 263,
-     vARRAY = 264,
-     vSYMBOL = 265,
-     vINT = 266,
-     vTHEENTITY = 267,
-     vTHEENTITYWITHID = 268,
-     vFLOAT = 269,
-     vBLTIN = 270,
-     vBLTINNOARGS = 271,
-     vSTRING = 272,
-     vHANDLER = 273,
-     ID = 274,
+     CASTREF = 259,
+     VOID = 260,
+     VAR = 261,
+     POINT = 262,
+     RECT = 263,
+     ARRAY = 264,
+     SYMBOL = 265,
+     INT = 266,
+     THEENTITY = 267,
+     THEENTITYWITHID = 268,
+     FLOAT = 269,
+     BLTIN = 270,
+     BLTINNOARGS = 271,
+     ID = 272,
+     STRING = 273,
+     HANDLER = 274,
      tDOWN = 275,
      tELSE = 276,
      tNLELSIF = 277,
@@ -137,22 +137,22 @@
 #endif
 /* Tokens.  */
 #define UNARY 258
-#define vCASTREF 259
-#define vVOID 260
-#define vVAR 261
-#define vPOINT 262
-#define vRECT 263
-#define vARRAY 264
-#define vSYMBOL 265
-#define vINT 266
-#define vTHEENTITY 267
-#define vTHEENTITYWITHID 268
-#define vFLOAT 269
-#define vBLTIN 270
-#define vBLTINNOARGS 271
-#define vSTRING 272
-#define vHANDLER 273
-#define ID 274
+#define CASTREF 259
+#define VOID 260
+#define VAR 261
+#define POINT 262
+#define RECT 263
+#define ARRAY 264
+#define SYMBOL 265
+#define INT 266
+#define THEENTITY 267
+#define THEENTITYWITHID 268
+#define FLOAT 269
+#define BLTIN 270
+#define BLTINNOARGS 271
+#define ID 272
+#define STRING 273
+#define HANDLER 274
 #define tDOWN 275
 #define tELSE 276
 #define tNLELSIF 277
@@ -488,7 +488,7 @@ union yyalloc
 /* YYFINAL -- State number of the termination state.  */
 #define YYFINAL  89
 /* YYLAST -- Last index in YYTABLE.  */
-#define YYLAST   755
+#define YYLAST   783
 
 /* YYNTOKENS -- Number of terminals.  */
 #define YYNTOKENS  83
@@ -569,15 +569,15 @@ static const yytype_int8 yyrhs[] =
 {
       84,     0,    -1,    84,    85,    86,    -1,    86,    -1,     1,
       76,    -1,    76,    -1,    -1,   110,    -1,   105,    -1,   115,
-      -1,    87,    -1,    89,    -1,    38,   104,    29,    19,    -1,
-      40,    19,    70,   104,    -1,    40,    12,    70,   104,    -1,
-      40,    13,   104,    70,   104,    -1,    40,    19,    42,   104,
+      -1,    87,    -1,    89,    -1,    38,   104,    29,    17,    -1,
+      40,    17,    70,   104,    -1,    40,    12,    70,   104,    -1,
+      40,    13,   104,    70,   104,    -1,    40,    17,    42,   104,
       -1,    40,    12,    42,   104,    -1,    40,    13,   104,    42,
      104,    -1,   104,    -1,   105,    -1,    88,    -1,    90,    -1,
       97,    77,    96,    78,   103,   102,    23,    39,    -1,    98,
       70,   104,   102,    42,   104,   102,   103,   102,    23,    39,
       -1,    98,    70,   104,   102,    20,    42,   104,   102,   103,
-     102,    23,    39,    -1,    43,    19,    41,   104,    -1,    99,
+     102,    23,    39,    -1,    43,    17,    41,   104,    -1,    99,
       96,    41,    85,   103,   102,    23,    28,    -1,    99,    96,
       41,    85,   103,   102,    46,   103,   102,    23,    28,    -1,
       99,    96,    41,    85,   103,   102,   101,    92,   102,    23,
@@ -588,10 +588,10 @@ static const yytype_int8 yyrhs[] =
       -1,    93,    94,    -1,    94,    -1,   100,    96,    41,   101,
       89,   102,    -1,    93,    -1,   100,    96,    41,   103,   102,
       -1,   104,    -1,   104,    70,   104,    -1,    77,    96,    78,
-      -1,    39,    45,    -1,    39,    44,    19,    -1,    28,    -1,
+      -1,    39,    45,    -1,    39,    44,    17,    -1,    28,    -1,
       22,    -1,    -1,    -1,    -1,   103,    85,    -1,   103,    89,
-      -1,    11,    -1,    14,    -1,    17,    -1,    16,    -1,    19,
-      77,   116,    78,    -1,    19,    -1,    12,    -1,    13,   104,
+      -1,    11,    -1,    14,    -1,    18,    -1,    16,    -1,    17,
+      77,   116,    78,    -1,    17,    -1,    12,    -1,    13,   104,
       -1,    87,    -1,   104,    71,   104,    -1,   104,    72,   104,
       -1,   104,    73,   104,    -1,   104,    74,   104,    -1,   104,
       79,   104,    -1,   104,    80,   104,    -1,   104,    60,   104,
@@ -600,39 +600,39 @@ static const yytype_int8 yyrhs[] =
      104,    81,   104,    -1,   104,    64,   104,    -1,   104,    65,
      104,    -1,   104,    66,   104,    -1,    71,   104,    -1,    72,
      104,    -1,    77,   104,    78,    -1,    67,   104,    68,   104,
-      -1,    67,   104,    69,   104,    -1,    32,    17,    -1,    33,
-      19,    -1,    38,   104,    -1,   107,    -1,    24,    -1,    26,
+      -1,    67,   104,    69,   104,    -1,    32,    18,    -1,    33,
+      17,    -1,    38,   104,    -1,   107,    -1,    24,    -1,    26,
      106,    -1,    49,   104,    -1,    50,    11,    -1,    50,    -1,
       51,   104,    -1,    51,    -1,    52,   104,    -1,    52,    -1,
-      53,   104,    -1,    54,   104,    -1,    19,    -1,   106,    82,
-      19,    -1,    27,    30,    -1,    27,    35,    -1,    27,    37,
+      53,   104,    -1,    54,   104,    -1,    17,    -1,   106,    82,
+      17,    -1,    27,    30,    -1,    27,    35,    -1,    27,    37,
       -1,    27,   108,    -1,    27,   108,   109,    -1,    27,   109,
-      -1,    42,    25,    17,    -1,    25,    17,    -1,    42,    17,
-      -1,    17,    -1,    36,    34,    17,    -1,    34,    17,    -1,
-      42,    34,    17,    -1,    -1,    31,    19,   111,   101,   113,
-      85,   114,   103,    -1,    47,    19,    -1,    -1,    48,    19,
-     112,   101,   113,    85,   114,   103,    -1,    -1,    19,    -1,
-     113,    82,    19,    -1,   113,    85,    82,    19,    -1,    -1,
-      19,   101,   116,    -1,    -1,   104,    -1,   116,    82,   104,
+      -1,    42,    25,    18,    -1,    25,    18,    -1,    42,    18,
+      -1,    18,    -1,    36,    34,    18,    -1,    34,    18,    -1,
+      42,    34,    18,    -1,    -1,    31,    17,   111,   101,   113,
+      85,   114,   103,    -1,    47,    17,    -1,    -1,    48,    17,
+     112,   101,   113,    85,   114,   103,    -1,    -1,    17,    -1,
+     113,    82,    17,    -1,   113,    85,    82,    17,    -1,    -1,
+      17,   101,   116,    -1,    -1,   104,    -1,   116,    82,   104,
       -1
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const yytype_uint16 yyrline[] =
 {
-       0,   105,   105,   106,   107,   110,   115,   116,   117,   118,
-     119,   120,   123,   129,   135,   143,   151,   157,   165,   174,
-     175,   177,   178,   183,   194,   210,   222,   227,   234,   243,
-     252,   262,   272,   283,   284,   287,   288,   291,   292,   295,
-     303,   304,   312,   313,   314,   316,   318,   324,   330,   337,
-     339,   341,   342,   343,   346,   347,   350,   353,   357,   360,
-     364,   371,   377,   378,   379,   380,   381,   382,   383,   384,
-     385,   386,   387,   388,   389,   390,   391,   392,   393,   394,
-     395,   396,   397,   398,   401,   402,   403,   404,   405,   407,
-     408,   409,   412,   415,   416,   419,   420,   423,   424,   427,
-     428,   439,   440,   441,   442,   447,   453,   460,   461,   462,
-     463,   466,   467,   468,   496,   496,   502,   505,   505,   511,
-     512,   513,   514,   516,   520,   528,   529,   530
+       0,   104,   104,   105,   106,   109,   114,   115,   116,   117,
+     118,   119,   122,   128,   134,   142,   150,   156,   164,   173,
+     174,   176,   177,   182,   193,   209,   221,   226,   233,   242,
+     251,   261,   271,   282,   283,   286,   287,   290,   291,   294,
+     302,   303,   311,   312,   313,   315,   317,   323,   329,   336,
+     338,   340,   341,   342,   345,   346,   349,   352,   356,   359,
+     363,   370,   376,   377,   378,   379,   380,   381,   382,   383,
+     384,   385,   386,   387,   388,   389,   390,   391,   392,   393,
+     394,   395,   396,   397,   400,   401,   402,   403,   404,   406,
+     407,   408,   411,   414,   415,   418,   419,   422,   423,   426,
+     427,   438,   439,   440,   441,   446,   452,   459,   460,   461,
+     462,   465,   466,   467,   495,   495,   501,   504,   504,   510,
+     511,   512,   513,   515,   519,   527,   528,   529
 };
 #endif
 
@@ -641,19 +641,19 @@ static const yytype_uint16 yyrline[] =
    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
 static const char *const yytname[] =
 {
-  "$end", "error", "$undefined", "UNARY", "vCASTREF", "vVOID", "vVAR",
-  "vPOINT", "vRECT", "vARRAY", "vSYMBOL", "vINT", "vTHEENTITY",
-  "vTHEENTITYWITHID", "vFLOAT", "vBLTIN", "vBLTINNOARGS", "vSTRING",
-  "vHANDLER", "ID", "tDOWN", "tELSE", "tNLELSIF", "tEND", "tEXIT",
-  "tFRAME", "tGLOBAL", "tGO", "tIF", "tINTO", "tLOOP", "tMACRO", "tMCI",
-  "tMCIWAIT", "tMOVIE", "tNEXT", "tOF", "tPREVIOUS", "tPUT", "tREPEAT",
-  "tSET", "tTHEN", "tTO", "tWHEN", "tWITH", "tWHILE", "tNLELSE",
-  "tFACTORY", "tMETHOD", "tALERT", "tBEEP", "tCLOSERESFILE", "tCLOSEXLIB",
-  "tCURSOR", "tDELAY", "tGE", "tLE", "tGT", "tLT", "tEQ", "tNEQ", "tAND",
-  "tOR", "tNOT", "tCONCAT", "tCONTAINS", "tSTARTS", "tSPRITE",
-  "tINTERSECTS", "tWITHIN", "'='", "'+'", "'-'", "'*'", "'/'", "'%'",
-  "'\\n'", "'('", "')'", "'>'", "'<'", "'&'", "','", "$accept", "program",
-  "nl", "programline", "asgn", "stmtoneliner", "stmt", "ifstmt",
+  "$end", "error", "$undefined", "UNARY", "CASTREF", "VOID", "VAR",
+  "POINT", "RECT", "ARRAY", "SYMBOL", "INT", "THEENTITY",
+  "THEENTITYWITHID", "FLOAT", "BLTIN", "BLTINNOARGS", "ID", "STRING",
+  "HANDLER", "tDOWN", "tELSE", "tNLELSIF", "tEND", "tEXIT", "tFRAME",
+  "tGLOBAL", "tGO", "tIF", "tINTO", "tLOOP", "tMACRO", "tMCI", "tMCIWAIT",
+  "tMOVIE", "tNEXT", "tOF", "tPREVIOUS", "tPUT", "tREPEAT", "tSET",
+  "tTHEN", "tTO", "tWHEN", "tWITH", "tWHILE", "tNLELSE", "tFACTORY",
+  "tMETHOD", "tALERT", "tBEEP", "tCLOSERESFILE", "tCLOSEXLIB", "tCURSOR",
+  "tDELAY", "tGE", "tLE", "tGT", "tLT", "tEQ", "tNEQ", "tAND", "tOR",
+  "tNOT", "tCONCAT", "tCONTAINS", "tSTARTS", "tSPRITE", "tINTERSECTS",
+  "tWITHIN", "'='", "'+'", "'-'", "'*'", "'/'", "'%'", "'\\n'", "'('",
+  "')'", "'>'", "'<'", "'&'", "','", "$accept", "program", "nl",
+  "programline", "asgn", "stmtoneliner", "stmt", "ifstmt",
   "elsestmtoneliner", "elseifstmt", "elseifstmtoneliner",
   "elseifstmtoneliner1", "elseifstmt1", "cond", "repeatwhile",
   "repeatwith", "if", "elseif", "begin", "end", "stmtlist", "expr", "func",
@@ -720,7 +720,7 @@ static const yytype_uint8 yyr2[] =
    means the default is an error.  */
 static const yytype_uint8 yydefact[] =
 {
-       0,     0,    54,    60,     0,    55,    57,    56,    49,    88,
+       0,     0,    54,    60,     0,    55,    57,    49,    56,    88,
        0,     0,    47,     0,     0,     0,     0,     0,     0,     0,
        0,     0,     0,    92,    94,    96,     0,     0,     0,     0,
        0,     0,     0,     0,     3,    62,    21,    11,    22,     0,
@@ -760,45 +760,45 @@ static const yytype_int16 yydefgoto[] =
 
 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    STATE-NUM.  */
-#define YYPACT_NINF -181
+#define YYPACT_NINF -180
 static const yytype_int16 yypact[] =
 {
-     200,   -64,  -181,  -181,    52,  -181,  -181,  -181,    88,  -181,
-      -5,   141,  -181,     4,    29,    28,    52,    40,    64,    63,
-      68,    69,    52,    11,    52,    52,    52,    52,    52,    52,
-      52,    52,    52,     3,  -181,     5,  -181,  -181,  -181,   -20,
-      16,   540,   226,  -181,  -181,  -181,  -181,  -181,    12,    52,
-    -181,   226,    52,    52,  -181,   -34,  -181,    76,  -181,    80,
-    -181,    83,  -181,    33,    38,  -181,  -181,  -181,  -181,   521,
-     101,  -181,   -33,    52,   -32,    81,  -181,  -181,   226,  -181,
-     226,   226,   226,   226,   126,   576,   126,   126,   625,  -181,
-    -181,   304,   540,    52,   540,    84,   652,    52,    52,    52,
-      52,    52,    52,    52,    52,    52,    52,    52,    52,    52,
-      52,    52,   521,   226,   -22,    39,   107,  -181,  -181,   111,
-    -181,   115,   123,   108,  -181,  -181,   122,  -181,    52,    52,
-     554,    52,    52,    52,  -181,    52,    52,  -181,  -181,    77,
-     226,    78,   598,    71,    52,   226,   226,   226,   226,   226,
-     226,   226,   226,   674,   674,   126,   126,   226,   226,   226,
-    -181,    52,  -181,  -181,  -181,  -181,   140,  -181,   226,   226,
-      52,    52,   226,   226,   226,   140,   226,   226,  -181,    20,
-    -181,  -181,   495,   226,   226,  -181,   -61,   226,   226,   -61,
-     366,   103,    52,   366,  -181,  -181,   145,    92,    92,  -181,
-    -181,   147,    52,   226,    -4,    -2,  -181,   160,  -181,  -181,
-     146,   226,  -181,   152,  -181,   162,  -181,  -181,   162,  -181,
-     540,  -181,   366,   366,  -181,  -181,   366,  -181,   366,   162,
-     162,  -181,   540,   495,  -181,   143,   154,   366,   170,   173,
-    -181,   175,   158,  -181,  -181,  -181,  -181,   179,   164,   180,
-     181,    -6,  -181,   495,  -181,   433,   176,  -181,  -181,  -181,
-     366,  -181,  -181,  -181,  -181,  -181
+     213,   -38,  -180,  -180,   501,  -180,  -180,   675,  -180,  -180,
+      36,   735,  -180,    42,    31,    44,   501,   -24,    77,    53,
+      75,    76,   501,    87,   501,   501,   501,   501,   501,   501,
+     501,   501,   501,     6,  -180,     9,  -180,  -180,  -180,    39,
+      48,   519,   653,  -180,  -180,  -180,  -180,  -180,    43,   501,
+    -180,   653,   501,   501,  -180,    40,  -180,   103,  -180,   105,
+    -180,    90,  -180,    32,    41,  -180,  -180,  -180,  -180,     7,
+     108,  -180,   -30,   501,   -27,    85,  -180,  -180,   653,  -180,
+     653,   653,   653,   653,   284,   555,   284,   284,   604,  -180,
+    -180,   280,   519,   501,   519,    86,   631,   501,   501,   501,
+     501,   501,   501,   501,   501,   501,   501,   501,   501,   501,
+     501,   501,     7,   653,   -60,    47,   116,  -180,  -180,   122,
+    -180,   123,   125,   110,  -180,  -180,   128,  -180,   501,   501,
+     533,   501,   501,   501,  -180,   501,   501,  -180,  -180,    68,
+     653,    70,   577,    74,   501,   653,   653,   653,   653,   653,
+     653,   653,   653,   702,   702,   284,   284,   653,   653,   653,
+    -180,   501,  -180,  -180,  -180,  -180,   134,  -180,   653,   653,
+     501,   501,   653,   653,   653,   134,   653,   653,  -180,     4,
+    -180,  -180,   471,   653,   653,  -180,   -59,   653,   653,   -59,
+     342,   112,   501,   342,  -180,  -180,   138,    78,    78,  -180,
+    -180,   133,   501,   653,    -7,    -9,  -180,   140,  -180,  -180,
+     120,   653,  -180,   135,  -180,   143,  -180,  -180,   143,  -180,
+     519,  -180,   342,   342,  -180,  -180,   342,  -180,   342,   143,
+     143,  -180,   519,   471,  -180,   121,   127,   342,   146,   148,
+    -180,   149,   137,  -180,  -180,  -180,  -180,   152,   141,   151,
+     153,   -12,  -180,   471,  -180,   409,   144,  -180,  -180,  -180,
+     342,  -180,  -180,  -180,  -180,  -180
 };
 
 /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int16 yypgoto[] =
 {
-    -181,  -181,   -29,   127,     7,  -180,     0,  -181,  -181,  -181,
-      15,  -169,    -8,   -81,  -181,  -181,  -181,  -170,    -7,    67,
-    -173,     2,    25,  -181,  -181,  -181,   159,  -181,  -181,  -181,
-      50,    31,  -181,   177
+    -180,  -180,   -28,    91,     8,  -179,     0,  -180,  -180,  -180,
+     -39,  -170,   -53,   -90,  -180,  -180,  -180,  -164,    -6,   -41,
+    -167,     3,    26,  -180,  -180,  -180,   126,  -180,  -180,  -180,
+      11,   -14,  -180,   136
 };
 
 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
@@ -808,191 +808,197 @@ static const yytype_int16 yypgoto[] =
 #define YYTABLE_NINF -60
 static const yytype_int16 yytable[] =
 {
-      37,    53,   194,    89,    91,   -10,    51,    35,   193,   128,
-     131,   139,    47,   141,    54,    90,   -51,   -51,    69,   213,
-     216,   196,    79,    66,    78,    43,    80,    81,    82,    83,
-      84,    85,    86,    87,    88,   222,   223,   129,   132,   226,
-     191,   228,   214,    96,   217,   232,    67,    68,   116,   234,
-     120,   112,   237,   243,   113,   113,   160,    92,   121,   232,
-     161,   234,   192,     2,     3,     4,     5,   122,     6,     7,
-     -51,    48,    59,   261,    61,   130,    72,    73,   260,    90,
-     123,   -10,    75,    74,    70,    71,    93,    76,    77,    52,
-      49,    37,    18,   117,    96,   140,   142,   118,    35,   145,
-     146,   147,   148,   149,   150,   151,   152,   153,   154,   155,
-     156,   157,   158,   159,   181,    28,    43,   119,   166,    29,
-     127,   161,   133,    30,    31,   143,   162,   175,   163,    32,
-     168,   169,   164,   172,   173,   174,   182,   176,   177,   236,
-     165,   167,   122,   -59,   -59,   202,   183,    90,   -59,   -59,
-     -59,   242,   -59,   -59,   -59,   178,   180,   197,    56,   185,
-     198,   -59,   -59,   184,   206,    52,    57,   -59,   -59,   -59,
-     210,    58,   187,   188,   207,    59,    60,    61,    62,   221,
-     227,    97,    98,    63,   216,   224,    99,   100,   101,   244,
-     102,   103,   104,   248,   203,   246,   249,   215,   250,   251,
-      -6,     1,   256,   257,   211,   109,   110,   111,   258,   259,
-     233,     2,     3,     4,     5,   263,     6,     7,   138,     8,
-     218,   240,    96,   124,     9,   189,    10,    11,    12,   209,
-     115,    13,    14,    15,    96,     0,     0,   253,    16,    17,
-      18,     0,     0,    19,     0,     0,     0,    20,    21,    22,
-      23,    24,    25,    26,    27,   262,     0,   201,     0,     0,
-     204,   205,     0,    28,     0,     0,     0,    29,     0,     0,
-     212,    30,    31,     0,     0,     0,    -6,    32,   225,     0,
-       0,    97,    98,     0,     0,   235,    99,   100,   101,     0,
-     102,   103,   104,   238,     0,   239,   241,   105,   106,   107,
-     108,     0,     0,     0,   247,   109,   110,   111,     0,     0,
-     252,     0,   254,     0,     0,     2,     3,     4,     5,     0,
-       6,     7,     0,     8,     0,     0,     0,   264,     9,   265,
-      10,    11,    12,     0,     0,    13,    14,    15,     0,     0,
-       0,     0,    16,    17,    18,     0,     0,    19,     0,     0,
-       0,    20,    21,    22,    23,    24,    25,    26,    27,     0,
-       0,     0,     0,     0,     0,     0,     0,    28,     0,     0,
-       0,    29,     0,     0,     0,    30,    31,     2,     3,     4,
-       5,    32,     6,     7,     0,    48,     0,     0,     0,     0,
-       9,     0,    10,    11,    12,     0,     0,     0,    14,    15,
-       0,     0,     0,     0,    16,    17,    18,     0,     0,    19,
-       0,     0,     0,     0,     0,    22,    23,    24,    25,    26,
-      27,     0,     0,     0,     0,     0,     0,     0,     0,    28,
-       0,     0,     0,    29,     0,     0,     0,    30,    31,     0,
-       0,     0,    90,    32,     2,     3,     4,     5,     0,     6,
-       7,     0,    48,     0,     0,     0,     0,     9,     0,    10,
-      11,    12,     0,     0,     0,    14,    15,     0,     0,     0,
-       0,    16,    17,    18,     0,     0,    19,     0,     0,     0,
-       0,     0,    22,    23,    24,    25,    26,    27,     0,     0,
+      37,    53,   139,   194,   141,    91,    89,    51,    35,   -10,
+     -51,   -51,   128,   216,   193,   131,   213,    90,   160,    69,
+      70,    71,   161,   196,   191,    78,    43,    80,    81,    82,
+      83,    84,    85,    86,    87,    88,   126,   217,    47,   214,
+     129,   222,   223,   132,    96,   226,   192,   228,   234,    67,
+     120,   232,   112,    54,   243,   113,   113,   121,   237,    66,
+     234,    68,    97,    98,   -51,   232,   122,    99,   100,   101,
+      75,   102,   103,   104,   261,    59,   130,    61,   105,   106,
+     107,   108,    90,   123,   260,   -10,   109,   110,   111,    72,
+      73,    37,    76,    77,    74,    96,   140,   142,    79,    35,
+     145,   146,   147,   148,   149,   150,   151,   152,   153,   154,
+     155,   156,   157,   158,   159,   181,    92,    43,    93,   166,
+      52,   117,   116,   118,   119,   127,   133,   143,   175,   161,
+     236,   168,   169,   162,   172,   173,   174,   182,   176,   177,
+     163,   164,   242,   165,   122,   167,   178,   183,   180,   201,
+      90,   185,   204,   205,   202,   206,   210,   221,   197,   224,
+     207,   198,   212,   227,   184,   216,   218,   244,   246,   248,
+     225,   249,   250,   187,   188,   256,   240,   235,   251,   258,
+     257,   259,   138,   263,   209,   238,   189,   239,   241,   115,
+     124,     0,     0,     0,     0,   203,   247,     0,   215,     0,
+       0,     0,   252,     0,   254,   211,     0,     0,     0,     0,
+       0,   233,     0,    -6,     1,     0,     0,     0,     0,   264,
+       0,   265,     0,    96,     2,     3,     4,     5,     0,     6,
+       7,     8,     0,     0,     0,    96,     0,     9,   253,    10,
+      11,    12,     0,     0,    13,    14,    15,     0,     0,     0,
+       0,    16,    17,    18,     0,   262,    19,     0,     0,     0,
+      20,    21,    22,    23,    24,    25,    26,    27,     0,     0,
        0,     0,     0,     0,     0,     0,    28,     0,     0,     0,
-      29,     0,     0,     0,    30,    31,     2,     3,     4,     5,
-      32,     6,     7,     0,    48,     0,     0,     0,     0,     9,
-       0,    10,    11,     0,     0,     0,     0,    14,    15,     0,
-       0,     0,     0,    16,     0,    18,     0,     0,     0,     0,
-       0,     0,     0,     0,    22,    23,    24,    25,    26,    27,
-     126,     2,     3,     4,     5,     0,     6,     7,    28,    48,
-       0,     0,    29,     0,     0,     0,    30,    31,     0,     0,
-       0,     0,    32,     0,     0,     0,    97,    98,    49,     0,
-      18,    99,   100,   101,     0,   102,   103,   104,     0,     0,
-       0,     0,   105,   106,   107,   108,   170,     0,     0,     0,
-     109,   110,   111,    28,     0,     0,     0,    29,     0,    97,
-      98,    30,    31,     0,    99,   100,   101,    94,   102,   103,
-     104,     0,     0,     0,   171,   105,   106,   107,   108,     0,
-       0,    97,    98,   109,   110,   111,    99,   100,   101,     0,
-     102,   103,   104,     0,   135,   136,     0,   105,   106,   107,
-     108,     0,     0,    97,    98,   109,   110,   111,    99,   100,
-     101,     0,   102,   103,   104,     0,     0,     0,   144,   105,
-     106,   107,   108,     0,     0,     0,   137,   109,   110,   111,
-      97,    98,     0,     0,     0,    99,   100,   101,     0,   102,
-     103,   104,     0,     0,     0,     0,   105,   106,   107,   108,
-       0,     0,     0,   137,   109,   110,   111,    97,    98,     0,
-       0,     0,    99,   100,   101,     0,   102,   103,   104,     0,
-       0,     0,   144,   105,   106,   107,   108,     0,     0,    97,
-      98,   109,   110,   111,    99,   100,   101,     0,   102,   103,
-     104,     0,     0,     0,     0,     0,     0,   107,   108,     0,
-       0,     0,     0,   109,   110,   111
+      29,     0,     0,     0,    30,    31,     0,     0,     0,    -6,
+      32,     2,     3,     4,     5,     0,     6,     7,     8,     0,
+       0,     0,     0,     0,     9,     0,    10,    11,    12,     0,
+       0,    13,    14,    15,     0,     0,     0,     0,    16,    17,
+      18,     0,     0,    19,     0,     0,     0,    20,    21,    22,
+      23,    24,    25,    26,    27,     0,     0,     0,     0,    97,
+      98,     0,     0,    28,    99,   100,   101,    29,   102,   103,
+     104,    30,    31,     2,     3,     4,     5,    32,     6,    48,
+       8,     0,     0,   109,   110,   111,     9,     0,    10,    11,
+      12,     0,     0,     0,    14,    15,     0,     0,     0,     0,
+      16,    17,    18,     0,     0,    19,     0,     0,     0,     0,
+       0,    22,    23,    24,    25,    26,    27,     0,     0,     0,
+       0,     0,     0,     0,     0,    28,     0,     0,     0,    29,
+       0,     0,     0,    30,    31,     0,     0,     0,    90,    32,
+       2,     3,     4,     5,     0,     6,    48,     8,     0,     0,
+       0,     0,     0,     9,     0,    10,    11,    12,     0,     0,
+       0,    14,    15,     0,     0,     0,     0,    16,    17,    18,
+       0,     0,    19,     0,     0,     0,     0,     0,    22,    23,
+      24,    25,    26,    27,     0,     0,     0,     0,     0,     0,
+       0,     0,    28,     0,     0,     0,    29,     0,     0,     0,
+      30,    31,     2,     3,     4,     5,    32,     6,    48,     8,
+       0,     0,     0,     0,     0,     9,     0,    10,    11,     0,
+       0,     0,     0,    14,    15,     0,     0,     0,     0,    16,
+       0,    18,     2,     3,     4,     5,     0,     6,    48,     8,
+      22,    23,    24,    25,    26,    27,     0,     0,     0,     0,
+       2,     3,     4,     5,    28,     6,    48,     8,    29,    49,
+       0,    18,    30,    31,     0,     0,     0,     0,    32,     0,
+       0,     0,     0,     0,     0,     0,     0,    49,     0,    18,
+       0,     0,     0,     0,    28,     0,     0,     0,    29,     0,
+       0,     0,    30,    31,     0,   170,     0,     0,    32,     0,
+       0,     0,    28,     0,     0,     0,    29,     0,    97,    98,
+      30,    31,     0,    99,   100,   101,    94,   102,   103,   104,
+       0,     0,     0,   171,   105,   106,   107,   108,     0,     0,
+      97,    98,   109,   110,   111,    99,   100,   101,     0,   102,
+     103,   104,     0,   135,   136,     0,   105,   106,   107,   108,
+       0,     0,    97,    98,   109,   110,   111,    99,   100,   101,
+       0,   102,   103,   104,     0,     0,     0,   144,   105,   106,
+     107,   108,     0,     0,     0,   137,   109,   110,   111,    97,
+      98,     0,     0,     0,    99,   100,   101,     0,   102,   103,
+     104,     0,     0,     0,     0,   105,   106,   107,   108,     0,
+       0,     0,   137,   109,   110,   111,    97,    98,     0,     0,
+       0,    99,   100,   101,     0,   102,   103,   104,     0,     0,
+       0,   144,   105,   106,   107,   108,     0,     0,    97,    98,
+     109,   110,   111,    99,   100,   101,     0,   102,   103,   104,
+       0,     0,     0,     0,   105,   106,   107,   108,     0,     0,
+     -59,   -59,   109,   110,   111,   -59,   -59,   -59,     0,   -59,
+     -59,   -59,     0,     0,     0,     0,     0,     0,   -59,   -59,
+       0,     0,    52,    56,   -59,   -59,   -59,    97,    98,     0,
+      57,     0,    99,   100,   101,    58,   102,   103,   104,    59,
+      60,    61,    62,     0,     0,   107,   108,    63,     0,     0,
+       0,   109,   110,   111
 };
 
 static const yytype_int16 yycheck[] =
 {
-       0,     8,   182,     0,    33,     0,     4,     0,   181,    42,
-      42,    92,    76,    94,    19,    76,    22,    23,    16,    23,
-      22,    82,    11,    19,    22,     0,    24,    25,    26,    27,
-      28,    29,    30,    31,    32,   208,   209,    70,    70,   212,
-      20,   214,    46,    41,    46,   215,    17,    19,    82,   218,
-      17,    49,   225,   233,    52,    53,    78,    77,    25,   229,
-      82,   230,    42,    11,    12,    13,    14,    34,    16,    17,
-      76,    19,    34,   253,    36,    73,    12,    13,   251,    76,
-      42,    76,    19,    19,    44,    45,    70,    19,    19,    77,
-      38,    91,    40,    17,    92,    93,    94,    17,    91,    97,
-      98,    99,   100,   101,   102,   103,   104,   105,   106,   107,
-     108,   109,   110,   111,   143,    63,    91,    34,   125,    67,
-      19,    82,    41,    71,    72,    41,    19,   134,    17,    77,
-     128,   129,    17,   131,   132,   133,   143,   135,   136,   220,
-      17,    19,    34,    55,    56,    42,   144,    76,    60,    61,
-      62,   232,    64,    65,    66,    78,    78,   186,    17,    19,
-     189,    73,    74,   161,    19,    77,    25,    79,    80,    81,
-      23,    30,   170,   171,    82,    34,    35,    36,    37,    19,
-      28,    55,    56,    42,    22,    39,    60,    61,    62,    46,
-      64,    65,    66,    23,   192,    41,    23,   204,    23,    41,
-       0,     1,    23,    39,   202,    79,    80,    81,    28,    28,
-     217,    11,    12,    13,    14,    39,    16,    17,    91,    19,
-     205,   229,   220,    64,    24,   175,    26,    27,    28,   198,
-      53,    31,    32,    33,   232,    -1,    -1,   244,    38,    39,
-      40,    -1,    -1,    43,    -1,    -1,    -1,    47,    48,    49,
-      50,    51,    52,    53,    54,   255,    -1,   190,    -1,    -1,
-     193,   194,    -1,    63,    -1,    -1,    -1,    67,    -1,    -1,
-     203,    71,    72,    -1,    -1,    -1,    76,    77,   211,    -1,
-      -1,    55,    56,    -1,    -1,   218,    60,    61,    62,    -1,
-      64,    65,    66,   226,    -1,   228,   229,    71,    72,    73,
-      74,    -1,    -1,    -1,   237,    79,    80,    81,    -1,    -1,
-     243,    -1,   245,    -1,    -1,    11,    12,    13,    14,    -1,
-      16,    17,    -1,    19,    -1,    -1,    -1,   260,    24,   262,
-      26,    27,    28,    -1,    -1,    31,    32,    33,    -1,    -1,
-      -1,    -1,    38,    39,    40,    -1,    -1,    43,    -1,    -1,
-      -1,    47,    48,    49,    50,    51,    52,    53,    54,    -1,
-      -1,    -1,    -1,    -1,    -1,    -1,    -1,    63,    -1,    -1,
-      -1,    67,    -1,    -1,    -1,    71,    72,    11,    12,    13,
-      14,    77,    16,    17,    -1,    19,    -1,    -1,    -1,    -1,
-      24,    -1,    26,    27,    28,    -1,    -1,    -1,    32,    33,
-      -1,    -1,    -1,    -1,    38,    39,    40,    -1,    -1,    43,
-      -1,    -1,    -1,    -1,    -1,    49,    50,    51,    52,    53,
-      54,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    63,
-      -1,    -1,    -1,    67,    -1,    -1,    -1,    71,    72,    -1,
-      -1,    -1,    76,    77,    11,    12,    13,    14,    -1,    16,
-      17,    -1,    19,    -1,    -1,    -1,    -1,    24,    -1,    26,
-      27,    28,    -1,    -1,    -1,    32,    33,    -1,    -1,    -1,
-      -1,    38,    39,    40,    -1,    -1,    43,    -1,    -1,    -1,
-      -1,    -1,    49,    50,    51,    52,    53,    54,    -1,    -1,
+       0,     7,    92,   182,    94,    33,     0,     4,     0,     0,
+      22,    23,    42,    22,   181,    42,    23,    76,    78,    16,
+      44,    45,    82,    82,    20,    22,     0,    24,    25,    26,
+      27,    28,    29,    30,    31,    32,    29,    46,    76,    46,
+      70,   208,   209,    70,    41,   212,    42,   214,   218,    18,
+      18,   215,    49,    17,   233,    52,    53,    25,   225,    17,
+     230,    17,    55,    56,    76,   229,    34,    60,    61,    62,
+      17,    64,    65,    66,   253,    34,    73,    36,    71,    72,
+      73,    74,    76,    42,   251,    76,    79,    80,    81,    12,
+      13,    91,    17,    17,    17,    92,    93,    94,    11,    91,
+      97,    98,    99,   100,   101,   102,   103,   104,   105,   106,
+     107,   108,   109,   110,   111,   143,    77,    91,    70,   125,
+      77,    18,    82,    18,    34,    17,    41,    41,   134,    82,
+     220,   128,   129,    17,   131,   132,   133,   143,   135,   136,
+      18,    18,   232,    18,    34,    17,    78,   144,    78,   190,
+      76,    17,   193,   194,    42,    17,    23,    17,   186,    39,
+      82,   189,   203,    28,   161,    22,   205,    46,    41,    23,
+     211,    23,    23,   170,   171,    23,   229,   218,    41,    28,
+      39,    28,    91,    39,   198,   226,   175,   228,   229,    53,
+      64,    -1,    -1,    -1,    -1,   192,   237,    -1,   204,    -1,
+      -1,    -1,   243,    -1,   245,   202,    -1,    -1,    -1,    -1,
+      -1,   217,    -1,     0,     1,    -1,    -1,    -1,    -1,   260,
+      -1,   262,    -1,   220,    11,    12,    13,    14,    -1,    16,
+      17,    18,    -1,    -1,    -1,   232,    -1,    24,   244,    26,
+      27,    28,    -1,    -1,    31,    32,    33,    -1,    -1,    -1,
+      -1,    38,    39,    40,    -1,   255,    43,    -1,    -1,    -1,
+      47,    48,    49,    50,    51,    52,    53,    54,    -1,    -1,
       -1,    -1,    -1,    -1,    -1,    -1,    63,    -1,    -1,    -1,
-      67,    -1,    -1,    -1,    71,    72,    11,    12,    13,    14,
-      77,    16,    17,    -1,    19,    -1,    -1,    -1,    -1,    24,
-      -1,    26,    27,    -1,    -1,    -1,    -1,    32,    33,    -1,
-      -1,    -1,    -1,    38,    -1,    40,    -1,    -1,    -1,    -1,
-      -1,    -1,    -1,    -1,    49,    50,    51,    52,    53,    54,
-      29,    11,    12,    13,    14,    -1,    16,    17,    63,    19,
-      -1,    -1,    67,    -1,    -1,    -1,    71,    72,    -1,    -1,
-      -1,    -1,    77,    -1,    -1,    -1,    55,    56,    38,    -1,
-      40,    60,    61,    62,    -1,    64,    65,    66,    -1,    -1,
-      -1,    -1,    71,    72,    73,    74,    42,    -1,    -1,    -1,
-      79,    80,    81,    63,    -1,    -1,    -1,    67,    -1,    55,
-      56,    71,    72,    -1,    60,    61,    62,    77,    64,    65,
-      66,    -1,    -1,    -1,    70,    71,    72,    73,    74,    -1,
-      -1,    55,    56,    79,    80,    81,    60,    61,    62,    -1,
-      64,    65,    66,    -1,    68,    69,    -1,    71,    72,    73,
-      74,    -1,    -1,    55,    56,    79,    80,    81,    60,    61,
-      62,    -1,    64,    65,    66,    -1,    -1,    -1,    70,    71,
-      72,    73,    74,    -1,    -1,    -1,    78,    79,    80,    81,
-      55,    56,    -1,    -1,    -1,    60,    61,    62,    -1,    64,
-      65,    66,    -1,    -1,    -1,    -1,    71,    72,    73,    74,
-      -1,    -1,    -1,    78,    79,    80,    81,    55,    56,    -1,
-      -1,    -1,    60,    61,    62,    -1,    64,    65,    66,    -1,
-      -1,    -1,    70,    71,    72,    73,    74,    -1,    -1,    55,
-      56,    79,    80,    81,    60,    61,    62,    -1,    64,    65,
-      66,    -1,    -1,    -1,    -1,    -1,    -1,    73,    74,    -1,
-      -1,    -1,    -1,    79,    80,    81
+      67,    -1,    -1,    -1,    71,    72,    -1,    -1,    -1,    76,
+      77,    11,    12,    13,    14,    -1,    16,    17,    18,    -1,
+      -1,    -1,    -1,    -1,    24,    -1,    26,    27,    28,    -1,
+      -1,    31,    32,    33,    -1,    -1,    -1,    -1,    38,    39,
+      40,    -1,    -1,    43,    -1,    -1,    -1,    47,    48,    49,
+      50,    51,    52,    53,    54,    -1,    -1,    -1,    -1,    55,
+      56,    -1,    -1,    63,    60,    61,    62,    67,    64,    65,
+      66,    71,    72,    11,    12,    13,    14,    77,    16,    17,
+      18,    -1,    -1,    79,    80,    81,    24,    -1,    26,    27,
+      28,    -1,    -1,    -1,    32,    33,    -1,    -1,    -1,    -1,
+      38,    39,    40,    -1,    -1,    43,    -1,    -1,    -1,    -1,
+      -1,    49,    50,    51,    52,    53,    54,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    63,    -1,    -1,    -1,    67,
+      -1,    -1,    -1,    71,    72,    -1,    -1,    -1,    76,    77,
+      11,    12,    13,    14,    -1,    16,    17,    18,    -1,    -1,
+      -1,    -1,    -1,    24,    -1,    26,    27,    28,    -1,    -1,
+      -1,    32,    33,    -1,    -1,    -1,    -1,    38,    39,    40,
+      -1,    -1,    43,    -1,    -1,    -1,    -1,    -1,    49,    50,
+      51,    52,    53,    54,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    63,    -1,    -1,    -1,    67,    -1,    -1,    -1,
+      71,    72,    11,    12,    13,    14,    77,    16,    17,    18,
+      -1,    -1,    -1,    -1,    -1,    24,    -1,    26,    27,    -1,
+      -1,    -1,    -1,    32,    33,    -1,    -1,    -1,    -1,    38,
+      -1,    40,    11,    12,    13,    14,    -1,    16,    17,    18,
+      49,    50,    51,    52,    53,    54,    -1,    -1,    -1,    -1,
+      11,    12,    13,    14,    63,    16,    17,    18,    67,    38,
+      -1,    40,    71,    72,    -1,    -1,    -1,    -1,    77,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    38,    -1,    40,
+      -1,    -1,    -1,    -1,    63,    -1,    -1,    -1,    67,    -1,
+      -1,    -1,    71,    72,    -1,    42,    -1,    -1,    77,    -1,
+      -1,    -1,    63,    -1,    -1,    -1,    67,    -1,    55,    56,
+      71,    72,    -1,    60,    61,    62,    77,    64,    65,    66,
+      -1,    -1,    -1,    70,    71,    72,    73,    74,    -1,    -1,
+      55,    56,    79,    80,    81,    60,    61,    62,    -1,    64,
+      65,    66,    -1,    68,    69,    -1,    71,    72,    73,    74,
+      -1,    -1,    55,    56,    79,    80,    81,    60,    61,    62,
+      -1,    64,    65,    66,    -1,    -1,    -1,    70,    71,    72,
+      73,    74,    -1,    -1,    -1,    78,    79,    80,    81,    55,
+      56,    -1,    -1,    -1,    60,    61,    62,    -1,    64,    65,
+      66,    -1,    -1,    -1,    -1,    71,    72,    73,    74,    -1,
+      -1,    -1,    78,    79,    80,    81,    55,    56,    -1,    -1,
+      -1,    60,    61,    62,    -1,    64,    65,    66,    -1,    -1,
+      -1,    70,    71,    72,    73,    74,    -1,    -1,    55,    56,
+      79,    80,    81,    60,    61,    62,    -1,    64,    65,    66,
+      -1,    -1,    -1,    -1,    71,    72,    73,    74,    -1,    -1,
+      55,    56,    79,    80,    81,    60,    61,    62,    -1,    64,
+      65,    66,    -1,    -1,    -1,    -1,    -1,    -1,    73,    74,
+      -1,    -1,    77,    18,    79,    80,    81,    55,    56,    -1,
+      25,    -1,    60,    61,    62,    30,    64,    65,    66,    34,
+      35,    36,    37,    -1,    -1,    73,    74,    42,    -1,    -1,
+      -1,    79,    80,    81
 };
 
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
    symbol of state STATE-NUM.  */
 static const yytype_uint8 yystos[] =
 {
-       0,     1,    11,    12,    13,    14,    16,    17,    19,    24,
+       0,     1,    11,    12,    13,    14,    16,    17,    18,    24,
       26,    27,    28,    31,    32,    33,    38,    39,    40,    43,
       47,    48,    49,    50,    51,    52,    53,    54,    63,    67,
       71,    72,    77,    84,    86,    87,    88,    89,    90,    97,
-      98,    99,   104,   105,   107,   110,   115,    76,    19,    38,
-      87,   104,    77,   101,    19,   106,    17,    25,    30,    34,
-      35,    36,    37,    42,   108,   109,    19,    17,    19,   104,
-      44,    45,    12,    13,    19,    19,    19,    19,   104,    11,
+      98,    99,   104,   105,   107,   110,   115,    76,    17,    38,
+      87,   104,    77,   101,    17,   106,    18,    25,    30,    34,
+      35,    36,    37,    42,   108,   109,    17,    18,    17,   104,
+      44,    45,    12,    13,    17,    17,    17,    17,   104,    11,
      104,   104,   104,   104,   104,   104,   104,   104,   104,     0,
       76,    85,    77,    70,    77,    96,   104,    55,    56,    60,
       61,    62,    64,    65,    66,    71,    72,    73,    74,    79,
-      80,    81,   104,   104,   116,   116,    82,    17,    17,    34,
-      17,    25,    34,    42,   109,   111,    29,    19,    42,    70,
+      80,    81,   104,   104,   116,   116,    82,    18,    18,    34,
+      18,    25,    34,    42,   109,   111,    29,    17,    42,    70,
      104,    42,    70,    41,   112,    68,    69,    78,    86,    96,
      104,    96,   104,    41,    70,   104,   104,   104,   104,   104,
      104,   104,   104,   104,   104,   104,   104,   104,   104,   104,
-      78,    82,    19,    17,    17,    17,   101,    19,   104,   104,
+      78,    82,    17,    18,    18,    18,   101,    17,   104,   104,
       42,    70,   104,   104,   104,   101,   104,   104,    78,   102,
-      78,    85,   101,   104,   104,    19,   113,   104,   104,   113,
+      78,    85,   101,   104,   104,    17,   113,   104,   104,   113,
      103,    20,    42,   103,    88,   105,    82,    85,    85,    85,
-      89,   102,    42,   104,   102,   102,    19,    82,   114,   114,
+      89,   102,    42,   104,   102,   102,    17,    82,   114,   114,
       23,   104,   102,    23,    46,   101,    22,    46,    93,    94,
-     100,    19,   103,   103,    39,   102,   103,    28,   103,    92,
+     100,    17,   103,   103,    39,   102,   103,    28,   103,    92,
       93,    95,   100,   101,    94,   102,    96,   103,   102,   102,
       95,   102,    96,    88,    46,    91,    41,   102,    23,    23,
       23,    41,   102,   101,   102,   101,    23,    39,    28,    28,
@@ -1811,12 +1817,12 @@ yyreduce:
   switch (yyn)
     {
         case 4:
-#line 107 "engines/director/lingo/lingo-gr.y"
+#line 106 "engines/director/lingo/lingo-gr.y"
     { yyerrok; ;}
     break;
 
   case 5:
-#line 110 "engines/director/lingo/lingo-gr.y"
+#line 109 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->_linenumber++;
 		g_lingo->_colnumber = 1;
@@ -1824,12 +1830,12 @@ yyreduce:
     break;
 
   case 10:
-#line 119 "engines/director/lingo/lingo-gr.y"
+#line 118 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_xpop); ;}
     break;
 
   case 12:
-#line 123 "engines/director/lingo/lingo-gr.y"
+#line 122 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->code1(g_lingo->c_varpush);
 		g_lingo->codeString((yyvsp[(4) - (4)].s)->c_str());
@@ -1839,7 +1845,7 @@ yyreduce:
     break;
 
   case 13:
-#line 129 "engines/director/lingo/lingo-gr.y"
+#line 128 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->code1(g_lingo->c_varpush);
 		g_lingo->codeString((yyvsp[(2) - (4)].s)->c_str());
@@ -1849,7 +1855,7 @@ yyreduce:
     break;
 
   case 14:
-#line 135 "engines/director/lingo/lingo-gr.y"
+#line 134 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(0); // Put dummy id
 		g_lingo->code1(g_lingo->c_theentityassign);
@@ -1861,7 +1867,7 @@ yyreduce:
     break;
 
   case 15:
-#line 143 "engines/director/lingo/lingo-gr.y"
+#line 142 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->code1(g_lingo->c_swap);
 		g_lingo->code1(g_lingo->c_theentityassign);
@@ -1873,7 +1879,7 @@ yyreduce:
     break;
 
   case 16:
-#line 151 "engines/director/lingo/lingo-gr.y"
+#line 150 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->code1(g_lingo->c_varpush);
 		g_lingo->codeString((yyvsp[(2) - (4)].s)->c_str());
@@ -1883,7 +1889,7 @@ yyreduce:
     break;
 
   case 17:
-#line 157 "engines/director/lingo/lingo-gr.y"
+#line 156 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(0); // Put dummy id
 		g_lingo->code1(g_lingo->c_theentityassign);
@@ -1895,7 +1901,7 @@ yyreduce:
     break;
 
   case 18:
-#line 165 "engines/director/lingo/lingo-gr.y"
+#line 164 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->code1(g_lingo->c_swap);
 		g_lingo->code1(g_lingo->c_theentityassign);
@@ -1907,12 +1913,12 @@ yyreduce:
     break;
 
   case 19:
-#line 174 "engines/director/lingo/lingo-gr.y"
+#line 173 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_xpop); ;}
     break;
 
   case 23:
-#line 183 "engines/director/lingo/lingo-gr.y"
+#line 182 "engines/director/lingo/lingo-gr.y"
     {
 		inst body = 0, end = 0;
 		WRITE_UINT32(&body, (yyvsp[(5) - (8)].code));
@@ -1922,7 +1928,7 @@ yyreduce:
     break;
 
   case 24:
-#line 194 "engines/director/lingo/lingo-gr.y"
+#line 193 "engines/director/lingo/lingo-gr.y"
     {
 		inst init = 0, finish = 0, body = 0, end = 0, inc = 0;
 		WRITE_UINT32(&init, (yyvsp[(3) - (11)].code));
@@ -1938,7 +1944,7 @@ yyreduce:
     break;
 
   case 25:
-#line 210 "engines/director/lingo/lingo-gr.y"
+#line 209 "engines/director/lingo/lingo-gr.y"
     {
 		inst init = 0, finish = 0, body = 0, end = 0, inc = 0;
 		WRITE_UINT32(&init, (yyvsp[(3) - (12)].code));
@@ -1954,14 +1960,14 @@ yyreduce:
     break;
 
   case 26:
-#line 222 "engines/director/lingo/lingo-gr.y"
+#line 221 "engines/director/lingo/lingo-gr.y"
     {
 			g_lingo->code1(g_lingo->c_ifcode);
 		;}
     break;
 
   case 27:
-#line 227 "engines/director/lingo/lingo-gr.y"
+#line 226 "engines/director/lingo/lingo-gr.y"
     {
 		inst then = 0, end = 0;
 		WRITE_UINT32(&then, (yyvsp[(5) - (8)].code));
@@ -1972,7 +1978,7 @@ yyreduce:
     break;
 
   case 28:
-#line 234 "engines/director/lingo/lingo-gr.y"
+#line 233 "engines/director/lingo/lingo-gr.y"
     {
 		inst then = 0, else1 = 0, end = 0;
 		WRITE_UINT32(&then, (yyvsp[(5) - (11)].code));
@@ -1985,7 +1991,7 @@ yyreduce:
     break;
 
   case 29:
-#line 243 "engines/director/lingo/lingo-gr.y"
+#line 242 "engines/director/lingo/lingo-gr.y"
     {
 		inst then = 0, else1 = 0, end = 0;
 		WRITE_UINT32(&then, (yyvsp[(5) - (11)].code));
@@ -1998,7 +2004,7 @@ yyreduce:
     break;
 
   case 30:
-#line 252 "engines/director/lingo/lingo-gr.y"
+#line 251 "engines/director/lingo/lingo-gr.y"
     {
 		inst then = 0, else1 = 0, end = 0;
 		WRITE_UINT32(&then, (yyvsp[(4) - (6)].code));
@@ -2012,7 +2018,7 @@ yyreduce:
     break;
 
   case 31:
-#line 262 "engines/director/lingo/lingo-gr.y"
+#line 261 "engines/director/lingo/lingo-gr.y"
     {
 		inst then = 0, else1 = 0, end = 0;
 		WRITE_UINT32(&then, (yyvsp[(4) - (10)].code));
@@ -2026,7 +2032,7 @@ yyreduce:
     break;
 
   case 32:
-#line 272 "engines/director/lingo/lingo-gr.y"
+#line 271 "engines/director/lingo/lingo-gr.y"
     {
 		inst then = 0, else1 = 0, end = 0;
 		WRITE_UINT32(&then, (yyvsp[(4) - (10)].code));
@@ -2040,17 +2046,17 @@ yyreduce:
     break;
 
   case 33:
-#line 283 "engines/director/lingo/lingo-gr.y"
+#line 282 "engines/director/lingo/lingo-gr.y"
     { (yyval.code) = 0; ;}
     break;
 
   case 34:
-#line 284 "engines/director/lingo/lingo-gr.y"
+#line 283 "engines/director/lingo/lingo-gr.y"
     { (yyval.code) = (yyvsp[(2) - (3)].code); ;}
     break;
 
   case 39:
-#line 295 "engines/director/lingo/lingo-gr.y"
+#line 294 "engines/director/lingo/lingo-gr.y"
     {
 		inst then = 0;
 		WRITE_UINT32(&then, (yyvsp[(4) - (6)].code));
@@ -2060,7 +2066,7 @@ yyreduce:
     break;
 
   case 41:
-#line 304 "engines/director/lingo/lingo-gr.y"
+#line 303 "engines/director/lingo/lingo-gr.y"
     {
 		inst then = 0;
 		WRITE_UINT32(&then, (yyvsp[(4) - (5)].code));
@@ -2070,22 +2076,22 @@ yyreduce:
     break;
 
   case 42:
-#line 312 "engines/director/lingo/lingo-gr.y"
+#line 311 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(STOP); ;}
     break;
 
   case 43:
-#line 313 "engines/director/lingo/lingo-gr.y"
+#line 312 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code2(g_lingo->c_eq, STOP); ;}
     break;
 
   case 45:
-#line 316 "engines/director/lingo/lingo-gr.y"
+#line 315 "engines/director/lingo/lingo-gr.y"
     { (yyval.code) = g_lingo->code3(g_lingo->c_repeatwhilecode, STOP, STOP); ;}
     break;
 
   case 46:
-#line 318 "engines/director/lingo/lingo-gr.y"
+#line 317 "engines/director/lingo/lingo-gr.y"
     {
 		(yyval.code) = g_lingo->code3(g_lingo->c_repeatwithcode, STOP, STOP);
 		g_lingo->code3(STOP, STOP, STOP);
@@ -2094,7 +2100,7 @@ yyreduce:
     break;
 
   case 47:
-#line 324 "engines/director/lingo/lingo-gr.y"
+#line 323 "engines/director/lingo/lingo-gr.y"
     {
 		(yyval.code) = g_lingo->code1(g_lingo->c_ifcode);
 		g_lingo->code3(STOP, STOP, STOP);
@@ -2103,7 +2109,7 @@ yyreduce:
     break;
 
   case 48:
-#line 330 "engines/director/lingo/lingo-gr.y"
+#line 329 "engines/director/lingo/lingo-gr.y"
     {
 		inst skipEnd;
 		WRITE_UINT32(&skipEnd, 1); // We have to skip end to avoid multiple executions
@@ -2113,41 +2119,41 @@ yyreduce:
     break;
 
   case 49:
-#line 337 "engines/director/lingo/lingo-gr.y"
+#line 336 "engines/director/lingo/lingo-gr.y"
     { (yyval.code) = g_lingo->_currentScript->size(); ;}
     break;
 
   case 50:
-#line 339 "engines/director/lingo/lingo-gr.y"
+#line 338 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(STOP); (yyval.code) = g_lingo->_currentScript->size(); ;}
     break;
 
   case 51:
-#line 341 "engines/director/lingo/lingo-gr.y"
+#line 340 "engines/director/lingo/lingo-gr.y"
     { (yyval.code) = g_lingo->_currentScript->size(); ;}
     break;
 
   case 54:
-#line 346 "engines/director/lingo/lingo-gr.y"
+#line 345 "engines/director/lingo/lingo-gr.y"
     { (yyval.code) = g_lingo->codeConst((yyvsp[(1) - (1)].i)); ;}
     break;
 
   case 55:
-#line 347 "engines/director/lingo/lingo-gr.y"
+#line 346 "engines/director/lingo/lingo-gr.y"
     {
 		(yyval.code) = g_lingo->code1(g_lingo->c_fconstpush);
 		g_lingo->codeFloat((yyvsp[(1) - (1)].f)); ;}
     break;
 
   case 56:
-#line 350 "engines/director/lingo/lingo-gr.y"
+#line 349 "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 57:
-#line 353 "engines/director/lingo/lingo-gr.y"
+#line 352 "engines/director/lingo/lingo-gr.y"
     {
 		(yyval.code) = g_lingo->code1(g_lingo->_handlers[*(yyvsp[(1) - (1)].s)]->u.func);
 		g_lingo->codeConst(0); // Put dummy value
@@ -2155,14 +2161,14 @@ yyreduce:
     break;
 
   case 58:
-#line 357 "engines/director/lingo/lingo-gr.y"
+#line 356 "engines/director/lingo/lingo-gr.y"
     {
 		(yyval.code) = g_lingo->codeFunc((yyvsp[(1) - (4)].s), (yyvsp[(3) - (4)].narg));
 		delete (yyvsp[(1) - (4)].s); ;}
     break;
 
   case 59:
-#line 360 "engines/director/lingo/lingo-gr.y"
+#line 359 "engines/director/lingo/lingo-gr.y"
     {
 		(yyval.code) = g_lingo->code1(g_lingo->c_eval);
 		g_lingo->codeString((yyvsp[(1) - (1)].s)->c_str());
@@ -2170,7 +2176,7 @@ yyreduce:
     break;
 
   case 60:
-#line 364 "engines/director/lingo/lingo-gr.y"
+#line 363 "engines/director/lingo/lingo-gr.y"
     {
 		(yyval.code) = g_lingo->codeConst(0); // Put dummy id
 		g_lingo->code1(g_lingo->c_theentitypush);
@@ -2181,7 +2187,7 @@ yyreduce:
     break;
 
   case 61:
-#line 371 "engines/director/lingo/lingo-gr.y"
+#line 370 "engines/director/lingo/lingo-gr.y"
     {
 		(yyval.code) = g_lingo->code1(g_lingo->c_theentitypush);
 		inst e = 0, f = 0;
@@ -2191,211 +2197,211 @@ yyreduce:
     break;
 
   case 63:
-#line 378 "engines/director/lingo/lingo-gr.y"
+#line 377 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_add); ;}
     break;
 
   case 64:
-#line 379 "engines/director/lingo/lingo-gr.y"
+#line 378 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_sub); ;}
     break;
 
   case 65:
-#line 380 "engines/director/lingo/lingo-gr.y"
+#line 379 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_mul); ;}
     break;
 
   case 66:
-#line 381 "engines/director/lingo/lingo-gr.y"
+#line 380 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_div); ;}
     break;
 
   case 67:
-#line 382 "engines/director/lingo/lingo-gr.y"
+#line 381 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_gt); ;}
     break;
 
   case 68:
-#line 383 "engines/director/lingo/lingo-gr.y"
+#line 382 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_lt); ;}
     break;
 
   case 69:
-#line 384 "engines/director/lingo/lingo-gr.y"
+#line 383 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_neq); ;}
     break;
 
   case 70:
-#line 385 "engines/director/lingo/lingo-gr.y"
+#line 384 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_ge); ;}
     break;
 
   case 71:
-#line 386 "engines/director/lingo/lingo-gr.y"
+#line 385 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_le); ;}
     break;
 
   case 72:
-#line 387 "engines/director/lingo/lingo-gr.y"
+#line 386 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_and); ;}
     break;
 
   case 73:
-#line 388 "engines/director/lingo/lingo-gr.y"
+#line 387 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_or); ;}
     break;
 
   case 74:
-#line 389 "engines/director/lingo/lingo-gr.y"
+#line 388 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_not); ;}
     break;
 
   case 75:
-#line 390 "engines/director/lingo/lingo-gr.y"
+#line 389 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_ampersand); ;}
     break;
 
   case 76:
-#line 391 "engines/director/lingo/lingo-gr.y"
+#line 390 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_concat); ;}
     break;
 
   case 77:
-#line 392 "engines/director/lingo/lingo-gr.y"
+#line 391 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_contains); ;}
     break;
 
   case 78:
-#line 393 "engines/director/lingo/lingo-gr.y"
+#line 392 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_starts); ;}
     break;
 
   case 79:
-#line 394 "engines/director/lingo/lingo-gr.y"
+#line 393 "engines/director/lingo/lingo-gr.y"
     { (yyval.code) = (yyvsp[(2) - (2)].code); ;}
     break;
 
   case 80:
-#line 395 "engines/director/lingo/lingo-gr.y"
+#line 394 "engines/director/lingo/lingo-gr.y"
     { (yyval.code) = (yyvsp[(2) - (2)].code); g_lingo->code1(g_lingo->c_negate); ;}
     break;
 
   case 81:
-#line 396 "engines/director/lingo/lingo-gr.y"
+#line 395 "engines/director/lingo/lingo-gr.y"
     { (yyval.code) = (yyvsp[(2) - (3)].code); ;}
     break;
 
   case 82:
-#line 397 "engines/director/lingo/lingo-gr.y"
+#line 396 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_intersects); ;}
     break;
 
   case 83:
-#line 398 "engines/director/lingo/lingo-gr.y"
+#line 397 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_within); ;}
     break;
 
   case 84:
-#line 401 "engines/director/lingo/lingo-gr.y"
+#line 400 "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 85:
-#line 402 "engines/director/lingo/lingo-gr.y"
+#line 401 "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 86:
-#line 403 "engines/director/lingo/lingo-gr.y"
+#line 402 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_printtop); ;}
     break;
 
   case 88:
-#line 405 "engines/director/lingo/lingo-gr.y"
+#line 404 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeConst(0); // Push fake value on stack
 							  g_lingo->code1(g_lingo->c_procret); ;}
     break;
 
   case 90:
-#line 408 "engines/director/lingo/lingo-gr.y"
+#line 407 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_alert); ;}
     break;
 
   case 91:
-#line 409 "engines/director/lingo/lingo-gr.y"
+#line 408 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst((yyvsp[(2) - (2)].i));
 		g_lingo->code1(g_lingo->c_beep); ;}
     break;
 
   case 92:
-#line 412 "engines/director/lingo/lingo-gr.y"
+#line 411 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(0);
 		g_lingo->code1(g_lingo->c_beep); ;}
     break;
 
   case 93:
-#line 415 "engines/director/lingo/lingo-gr.y"
+#line 414 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_closeResFile); ;}
     break;
 
   case 94:
-#line 416 "engines/director/lingo/lingo-gr.y"
+#line 415 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(0);
 		g_lingo->code1(g_lingo->c_closeResFile); ;}
     break;
 
   case 95:
-#line 419 "engines/director/lingo/lingo-gr.y"
+#line 418 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_closeXlib); ;}
     break;
 
   case 96:
-#line 420 "engines/director/lingo/lingo-gr.y"
+#line 419 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->codeConst(0);
 		g_lingo->code1(g_lingo->c_closeXlib); ;}
     break;
 
   case 97:
-#line 423 "engines/director/lingo/lingo-gr.y"
+#line 422 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_cursor); ;}
     break;
 
   case 98:
-#line 424 "engines/director/lingo/lingo-gr.y"
+#line 423 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_delay); ;}
     break;
 
   case 99:
-#line 427 "engines/director/lingo/lingo-gr.y"
+#line 426 "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 100:
-#line 428 "engines/director/lingo/lingo-gr.y"
+#line 427 "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 101:
-#line 439 "engines/director/lingo/lingo-gr.y"
+#line 438 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_gotoloop); ;}
     break;
 
   case 102:
-#line 440 "engines/director/lingo/lingo-gr.y"
+#line 439 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_gotonext); ;}
     break;
 
   case 103:
-#line 441 "engines/director/lingo/lingo-gr.y"
+#line 440 "engines/director/lingo/lingo-gr.y"
     { g_lingo->code1(g_lingo->c_gotoprevious); ;}
     break;
 
   case 104:
-#line 442 "engines/director/lingo/lingo-gr.y"
+#line 441 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->code1(g_lingo->c_goto);
 		g_lingo->codeString((yyvsp[(2) - (2)].s)->c_str());
@@ -2404,7 +2410,7 @@ yyreduce:
     break;
 
   case 105:
-#line 447 "engines/director/lingo/lingo-gr.y"
+#line 446 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->code1(g_lingo->c_goto);
 		g_lingo->codeString((yyvsp[(2) - (3)].s)->c_str());
@@ -2414,7 +2420,7 @@ yyreduce:
     break;
 
   case 106:
-#line 453 "engines/director/lingo/lingo-gr.y"
+#line 452 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->code1(g_lingo->c_goto);
 		g_lingo->codeString("");
@@ -2423,47 +2429,47 @@ yyreduce:
     break;
 
   case 107:
-#line 460 "engines/director/lingo/lingo-gr.y"
+#line 459 "engines/director/lingo/lingo-gr.y"
     { (yyval.s) = (yyvsp[(3) - (3)].s); ;}
     break;
 
   case 108:
-#line 461 "engines/director/lingo/lingo-gr.y"
+#line 460 "engines/director/lingo/lingo-gr.y"
     { (yyval.s) = (yyvsp[(2) - (2)].s); ;}
     break;
 
   case 109:
-#line 462 "engines/director/lingo/lingo-gr.y"
+#line 461 "engines/director/lingo/lingo-gr.y"
     { (yyval.s) = (yyvsp[(2) - (2)].s); ;}
     break;
 
   case 110:
-#line 463 "engines/director/lingo/lingo-gr.y"
+#line 462 "engines/director/lingo/lingo-gr.y"
     { (yyval.s) = (yyvsp[(1) - (1)].s); ;}
     break;
 
   case 111:
-#line 466 "engines/director/lingo/lingo-gr.y"
+#line 465 "engines/director/lingo/lingo-gr.y"
     { (yyval.s) = (yyvsp[(3) - (3)].s); ;}
     break;
 
   case 112:
-#line 467 "engines/director/lingo/lingo-gr.y"
+#line 466 "engines/director/lingo/lingo-gr.y"
     { (yyval.s) = (yyvsp[(2) - (2)].s); ;}
     break;
 
   case 113:
-#line 468 "engines/director/lingo/lingo-gr.y"
+#line 467 "engines/director/lingo/lingo-gr.y"
     { (yyval.s) = (yyvsp[(3) - (3)].s); ;}
     break;
 
   case 114:
-#line 496 "engines/director/lingo/lingo-gr.y"
+#line 495 "engines/director/lingo/lingo-gr.y"
     { g_lingo->_indef = true; g_lingo->_currentFactory.clear(); ;}
     break;
 
   case 115:
-#line 497 "engines/director/lingo/lingo-gr.y"
+#line 496 "engines/director/lingo/lingo-gr.y"
     {
 			g_lingo->codeConst(0); // Push fake value on stack
 			g_lingo->code1(g_lingo->c_procret);
@@ -2472,19 +2478,19 @@ yyreduce:
     break;
 
   case 116:
-#line 502 "engines/director/lingo/lingo-gr.y"
+#line 501 "engines/director/lingo/lingo-gr.y"
     {
 			g_lingo->codeFactory(*(yyvsp[(2) - (2)].s));
 		;}
     break;
 
   case 117:
-#line 505 "engines/director/lingo/lingo-gr.y"
+#line 504 "engines/director/lingo/lingo-gr.y"
     { g_lingo->_indef = true; ;}
     break;
 
   case 118:
-#line 506 "engines/director/lingo/lingo-gr.y"
+#line 505 "engines/director/lingo/lingo-gr.y"
     {
 			g_lingo->codeConst(0); // Push fake value on stack
 			g_lingo->code1(g_lingo->c_procret);
@@ -2493,32 +2499,32 @@ yyreduce:
     break;
 
   case 119:
-#line 511 "engines/director/lingo/lingo-gr.y"
+#line 510 "engines/director/lingo/lingo-gr.y"
     { (yyval.narg) = 0; ;}
     break;
 
   case 120:
-#line 512 "engines/director/lingo/lingo-gr.y"
+#line 511 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeArg((yyvsp[(1) - (1)].s)); (yyval.narg) = 1; ;}
     break;
 
   case 121:
-#line 513 "engines/director/lingo/lingo-gr.y"
+#line 512 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeArg((yyvsp[(3) - (3)].s)); (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}
     break;
 
   case 122:
-#line 514 "engines/director/lingo/lingo-gr.y"
+#line 513 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeArg((yyvsp[(4) - (4)].s)); (yyval.narg) = (yyvsp[(1) - (4)].narg) + 1; ;}
     break;
 
   case 123:
-#line 516 "engines/director/lingo/lingo-gr.y"
+#line 515 "engines/director/lingo/lingo-gr.y"
     { g_lingo->codeArgStore(); ;}
     break;
 
   case 124:
-#line 520 "engines/director/lingo/lingo-gr.y"
+#line 519 "engines/director/lingo/lingo-gr.y"
     {
 		g_lingo->code1(g_lingo->c_call);
 		g_lingo->codeString((yyvsp[(1) - (3)].s)->c_str());
@@ -2528,23 +2534,23 @@ yyreduce:
     break;
 
   case 125:
-#line 528 "engines/director/lingo/lingo-gr.y"
+#line 527 "engines/director/lingo/lingo-gr.y"
     { (yyval.narg) = 0; ;}
     break;
 
   case 126:
-#line 529 "engines/director/lingo/lingo-gr.y"
+#line 528 "engines/director/lingo/lingo-gr.y"
     { (yyval.narg) = 1; ;}
     break;
 
   case 127:
-#line 530 "engines/director/lingo/lingo-gr.y"
+#line 529 "engines/director/lingo/lingo-gr.y"
     { (yyval.narg) = (yyvsp[(1) - (3)].narg) + 1; ;}
     break;
 
 
 /* Line 1267 of yacc.c.  */
-#line 2548 "engines/director/lingo/lingo-gr.cpp"
+#line 2554 "engines/director/lingo/lingo-gr.cpp"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -2758,6 +2764,6 @@ yyreturn:
 }
 
 
-#line 533 "engines/director/lingo/lingo-gr.y"
+#line 532 "engines/director/lingo/lingo-gr.y"
 
 
diff --git a/engines/director/lingo/lingo-gr.h b/engines/director/lingo/lingo-gr.h
index baec65c..484da36 100644
--- a/engines/director/lingo/lingo-gr.h
+++ b/engines/director/lingo/lingo-gr.h
@@ -40,22 +40,22 @@
       know about them.  */
    enum yytokentype {
      UNARY = 258,
-     vCASTREF = 259,
-     vVOID = 260,
-     vVAR = 261,
-     vPOINT = 262,
-     vRECT = 263,
-     vARRAY = 264,
-     vSYMBOL = 265,
-     vINT = 266,
-     vTHEENTITY = 267,
-     vTHEENTITYWITHID = 268,
-     vFLOAT = 269,
-     vBLTIN = 270,
-     vBLTINNOARGS = 271,
-     vSTRING = 272,
-     vHANDLER = 273,
-     ID = 274,
+     CASTREF = 259,
+     VOID = 260,
+     VAR = 261,
+     POINT = 262,
+     RECT = 263,
+     ARRAY = 264,
+     SYMBOL = 265,
+     INT = 266,
+     THEENTITY = 267,
+     THEENTITYWITHID = 268,
+     FLOAT = 269,
+     BLTIN = 270,
+     BLTINNOARGS = 271,
+     ID = 272,
+     STRING = 273,
+     HANDLER = 274,
      tDOWN = 275,
      tELSE = 276,
      tNLELSIF = 277,
@@ -110,22 +110,22 @@
 #endif
 /* Tokens.  */
 #define UNARY 258
-#define vCASTREF 259
-#define vVOID 260
-#define vVAR 261
-#define vPOINT 262
-#define vRECT 263
-#define vARRAY 264
-#define vSYMBOL 265
-#define vINT 266
-#define vTHEENTITY 267
-#define vTHEENTITYWITHID 268
-#define vFLOAT 269
-#define vBLTIN 270
-#define vBLTINNOARGS 271
-#define vSTRING 272
-#define vHANDLER 273
-#define ID 274
+#define CASTREF 259
+#define VOID 260
+#define VAR 261
+#define POINT 262
+#define RECT 263
+#define ARRAY 264
+#define SYMBOL 265
+#define INT 266
+#define THEENTITY 267
+#define THEENTITYWITHID 268
+#define FLOAT 269
+#define BLTIN 270
+#define BLTINNOARGS 271
+#define ID 272
+#define STRING 273
+#define HANDLER 274
 #define tDOWN 275
 #define tELSE 276
 #define tNLELSIF 277
diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y
index 82833e8..c5df8c3 100644
--- a/engines/director/lingo/lingo-gr.y
+++ b/engines/director/lingo/lingo-gr.y
@@ -77,12 +77,11 @@ void yyerror(char *s) {
 }
 
 %token UNARY
-%token vCASTREF vVOID vVAR vPOINT vRECT vARRAY vSYMBOL
-%token<i> vINT
-%token<e> vTHEENTITY vTHEENTITYWITHID
-%token<f> vFLOAT
-%token<s> vBLTIN vBLTINNOARGS vSTRING vHANDLER
-%token<s> ID
+%token CASTREF VOID VAR POINT RECT ARRAY SYMBOL
+%token<i> INT
+%token<e> THEENTITY THEENTITYWITHID
+%token<f> FLOAT
+%token<s> BLTIN BLTINNOARGS ID STRING HANDLER
 %token tDOWN tELSE tNLELSIF tEND tEXIT tFRAME tGLOBAL tGO tIF tINTO tLOOP tMACRO
 %token tMCI tMCIWAIT tMOVIE tNEXT tOF tPREVIOUS tPUT tREPEAT tSET tTHEN tTO tWHEN
 %token tWITH tWHILE tNLELSE tFACTORY tMETHOD tALERT tBEEP tCLOSERESFILE tCLOSEXLIB
@@ -132,7 +131,7 @@ asgn: tPUT expr tINTO ID 		{
 		g_lingo->code1(g_lingo->c_assign);
 		$$ = $4;
 		delete $2; }
-	| tSET vTHEENTITY '=' expr	{
+	| tSET THEENTITY '=' expr	{
 		g_lingo->codeConst(0); // Put dummy id
 		g_lingo->code1(g_lingo->c_theentityassign);
 		inst e = 0, f = 0;
@@ -140,7 +139,7 @@ asgn: tPUT expr tINTO ID 		{
 		WRITE_UINT32(&f, $2[1]);
 		g_lingo->code2(e, f);
 		$$ = $4; }
-	| tSET vTHEENTITYWITHID expr '=' expr	{
+	| tSET THEENTITYWITHID expr '=' expr	{
 		g_lingo->code1(g_lingo->c_swap);
 		g_lingo->code1(g_lingo->c_theentityassign);
 		inst e = 0, f = 0;
@@ -154,7 +153,7 @@ asgn: tPUT expr tINTO ID 		{
 		g_lingo->code1(g_lingo->c_assign);
 		$$ = $4;
 		delete $2; }
-	| tSET vTHEENTITY tTO expr	{
+	| tSET THEENTITY tTO expr	{
 		g_lingo->codeConst(0); // Put dummy id
 		g_lingo->code1(g_lingo->c_theentityassign);
 		inst e = 0, f = 0;
@@ -162,7 +161,7 @@ asgn: tPUT expr tINTO ID 		{
 		WRITE_UINT32(&f, $2[1]);
 		g_lingo->code2(e, f);
 		$$ = $4; }
-	| tSET vTHEENTITYWITHID expr tTO expr	{
+	| tSET THEENTITYWITHID expr tTO expr	{
 		g_lingo->code1(g_lingo->c_swap);
 		g_lingo->code1(g_lingo->c_theentityassign);
 		inst e = 0, f = 0;
@@ -343,14 +342,14 @@ stmtlist: /* nothing */		{ $$ = g_lingo->_currentScript->size(); }
 	| stmtlist stmt
 	;
 
-expr: vINT		{ $$ = g_lingo->codeConst($1); }
-	| vFLOAT		{
+expr: INT		{ $$ = g_lingo->codeConst($1); }
+	| FLOAT		{
 		$$ = g_lingo->code1(g_lingo->c_fconstpush);
 		g_lingo->codeFloat($1); }
-	| vSTRING		{
+	| STRING		{
 		$$ = g_lingo->code1(g_lingo->c_stringpush);
 		g_lingo->codeString($1->c_str()); }
-	| vBLTINNOARGS 	{
+	| BLTINNOARGS 	{
 		$$ = g_lingo->code1(g_lingo->_handlers[*$1]->u.func);
 		g_lingo->codeConst(0); // Put dummy value
 		delete $1; }
@@ -361,14 +360,14 @@ expr: vINT		{ $$ = g_lingo->codeConst($1); }
 		$$ = g_lingo->code1(g_lingo->c_eval);
 		g_lingo->codeString($1->c_str());
 		delete $1; }
-	| vTHEENTITY	{
+	| THEENTITY	{
 		$$ = g_lingo->codeConst(0); // Put dummy id
 		g_lingo->code1(g_lingo->c_theentitypush);
 		inst e = 0, f = 0;
 		WRITE_UINT32(&e, $1[0]);
 		WRITE_UINT32(&f, $1[1]);
 		g_lingo->code2(e, f); }
-	| vTHEENTITYWITHID expr	{
+	| THEENTITYWITHID expr	{
 		$$ = g_lingo->code1(g_lingo->c_theentitypush);
 		inst e = 0, f = 0;
 		WRITE_UINT32(&e, $1[0]);
@@ -398,7 +397,7 @@ expr: vINT		{ $$ = g_lingo->codeConst($1); }
 	| tSPRITE expr tWITHIN expr		 	{ g_lingo->code1(g_lingo->c_within); }
 	;
 
-func: tMCI vSTRING			{ g_lingo->code1(g_lingo->c_mci); g_lingo->codeString($2->c_str()); delete $2; }
+func: tMCI STRING			{ g_lingo->code1(g_lingo->c_mci); g_lingo->codeString($2->c_str()); delete $2; }
 	| tMCIWAIT ID			{ g_lingo->code1(g_lingo->c_mciwait); g_lingo->codeString($2->c_str()); delete $2; }
 	| tPUT expr				{ g_lingo->code1(g_lingo->c_printtop); }
 	| gotofunc
@@ -406,7 +405,7 @@ func: tMCI vSTRING			{ g_lingo->code1(g_lingo->c_mci); g_lingo->codeString($2->c
 							  g_lingo->code1(g_lingo->c_procret); }
 	| tGLOBAL globallist
 	| tALERT expr			{ g_lingo->code1(g_lingo->c_alert); }
-	| tBEEP vINT			{
+	| tBEEP INT			{
 		g_lingo->codeConst($2);
 		g_lingo->code1(g_lingo->c_beep); }
 	| tBEEP 				{
@@ -457,15 +456,15 @@ gotofunc: tGO tLOOP				{ g_lingo->code1(g_lingo->c_gotoloop); }
 		delete $2; }
 	;
 
-gotoframe: tTO tFRAME vSTRING	{ $$ = $3; }
-	| tFRAME vSTRING			{ $$ = $2; }
-	| tTO vSTRING				{ $$ = $2; }
-	| vSTRING					{ $$ = $1; }
+gotoframe: tTO tFRAME STRING	{ $$ = $3; }
+	| tFRAME STRING				{ $$ = $2; }
+	| tTO STRING				{ $$ = $2; }
+	| STRING					{ $$ = $1; }
 	;
 
-gotomovie: tOF tMOVIE vSTRING	{ $$ = $3; }
-	| tMOVIE vSTRING			{ $$ = $2; }
-	| tTO tMOVIE vSTRING		{ $$ = $3; }
+gotomovie: tOF tMOVIE STRING	{ $$ = $3; }
+	| tMOVIE STRING				{ $$ = $2; }
+	| tTO tMOVIE STRING			{ $$ = $3; }
 	;
 
 // macro
diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp
index 35ae9c6..1cdd8a7 100644
--- a/engines/director/lingo/lingo-lex.cpp
+++ b/engines/director/lingo/lingo-lex.cpp
@@ -1209,9 +1209,9 @@ YY_RULE_SETUP
 			yylval.e[1] = g_lingo->_theEntityFields[field]->field;
 
 			if (g_lingo->_theEntities[ptr]->hasId)
-				return vTHEENTITYWITHID;
+				return THEENTITYWITHID;
 			else
-				return vTHEENTITY;
+				return THEENTITY;
 		}
 
 		warning("Unhandled the entity %s", ptr);
@@ -1232,9 +1232,9 @@ YY_RULE_SETUP
 			yylval.e[1] = 0;	// No field
 
 			if (g_lingo->_theEntities[ptr]->hasId)
-				return vTHEENTITYWITHID;
+				return THEENTITYWITHID;
 			else
-				return vTHEENTITY;
+				return THEENTITY;
 		}
 
 		warning("Unhandled the entity %s", ptr);
@@ -1303,8 +1303,8 @@ YY_RULE_SETUP
 		yylval.s = new Common::String(yytext);
 
 		if (g_lingo->_handlers.contains(yytext)) {
-			if (g_lingo->_handlers[yytext]->type == vBLTIN && g_lingo->_handlers[yytext]->nargs == -1)
-				return vBLTINNOARGS;
+			if (g_lingo->_handlers[yytext]->type == BLTIN && g_lingo->_handlers[yytext]->nargs == -1)
+				return BLTINNOARGS;
 		}
 
 		return ID;
@@ -1313,12 +1313,12 @@ YY_RULE_SETUP
 case 54:
 YY_RULE_SETUP
 #line 194 "engines/director/lingo/lingo-lex.l"
-{ count(); yylval.f = atof(yytext); return vFLOAT; }
+{ count(); yylval.f = atof(yytext); return FLOAT; }
 	YY_BREAK
 case 55:
 YY_RULE_SETUP
 #line 195 "engines/director/lingo/lingo-lex.l"
-{ count(); yylval.i = strtol(yytext, NULL, 10); return vINT; }
+{ count(); yylval.i = strtol(yytext, NULL, 10); return INT; }
 	YY_BREAK
 case 56:
 YY_RULE_SETUP
@@ -1334,7 +1334,7 @@ YY_RULE_SETUP
 case 58:
 YY_RULE_SETUP
 #line 198 "engines/director/lingo/lingo-lex.l"
-{ count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return vSTRING; }
+{ count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return STRING; }
 	YY_BREAK
 case 59:
 YY_RULE_SETUP
diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l
index 831b30b..5e64922 100644
--- a/engines/director/lingo/lingo-lex.l
+++ b/engines/director/lingo/lingo-lex.l
@@ -141,9 +141,9 @@ whitespace [\t ]
 			yylval.e[1] = g_lingo->_theEntityFields[field]->field;
 
 			if (g_lingo->_theEntities[ptr]->hasId)
-				return vTHEENTITYWITHID;
+				return THEENTITYWITHID;
 			else
-				return vTHEENTITY;
+				return THEENTITY;
 		}
 
 		warning("Unhandled the entity %s", ptr);
@@ -160,9 +160,9 @@ whitespace [\t ]
 			yylval.e[1] = 0;	// No field
 
 			if (g_lingo->_theEntities[ptr]->hasId)
-				return vTHEENTITYWITHID;
+				return THEENTITYWITHID;
 			else
-				return vTHEENTITY;
+				return THEENTITY;
 		}
 
 		warning("Unhandled the entity %s", ptr);
@@ -185,17 +185,17 @@ whitespace [\t ]
 		yylval.s = new Common::String(yytext);
 
 		if (g_lingo->_handlers.contains(yytext)) {
-			if (g_lingo->_handlers[yytext]->type == vBLTIN && g_lingo->_handlers[yytext]->nargs == -1)
-				return vBLTINNOARGS;
+			if (g_lingo->_handlers[yytext]->type == BLTIN && g_lingo->_handlers[yytext]->nargs == -1)
+				return BLTINNOARGS;
 		}
 
 		return ID;
 	}
-{constfloat}	{ count(); yylval.f = atof(yytext); return vFLOAT; }
-{constinteger}	{ count(); yylval.i = strtol(yytext, NULL, 10); return vINT; }
+{constfloat}	{ count(); yylval.f = atof(yytext); return FLOAT; }
+{constinteger}	{ count(); yylval.i = strtol(yytext, NULL, 10); return INT; }
 {operator}		{ count(); return *yytext; }
 {newline}		{ return '\n'; }
-{conststring}	{ count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return vSTRING; }
+{conststring}	{ count(); yylval.s = new Common::String(&yytext[1]); yylval.s->deleteLastChar(); return STRING; }
 .
 
 %%
diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index 84654eb..2aedf32 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -196,7 +196,7 @@ void Lingo::setTheEntity(int entity, Datum &id, int field, Datum &d) {
 void Lingo::setTheSprite(Datum &id1, int field, Datum &d) {
 	int id = 0;
 
-	if (id1.type == vINT) {
+	if (id1.type == INT) {
 		id = id1.u.i;
 	} else {
 		warning("Unknown the sprite id type: %s", id1.type2str());
@@ -315,12 +315,12 @@ Datum Lingo::getTheEntity(int entity, Datum &id, int field) {
 		warning("STUB: getting the perframehook");
 		break;
 	case kTheFloatPrecision:
-		d.type = vINT;
+		d.type = INT;
 		d.u.i = _floatPrecision;
 		break;
 	default:
 		warning("Unprocessed getting field %d of entity %d", field, entity);
-		d.type = vVOID;
+		d.type = VOID;
 	}
 
 	return d;
@@ -330,7 +330,7 @@ Datum Lingo::getTheSprite(Datum &id1, int field) {
 	Datum d;
 	int id = 0;
 
-	if (id1.type == vINT) {
+	if (id1.type == INT) {
 		id = id1.u.i;
 	} else {
 		warning("Unknown the sprite id type: %s", id1.type2str());
@@ -347,7 +347,7 @@ Datum Lingo::getTheSprite(Datum &id1, int field) {
 	if (!sprite)
 		return d;
 
-	d.type = vINT;
+	d.type = INT;
 
 	switch (field) {
 	case kTheCastNum:
@@ -431,7 +431,7 @@ Datum Lingo::getTheSprite(Datum &id1, int field) {
 		break;
 	default:
 		warning("Unprocessed getting field %d of sprite", field);
-		d.type = vVOID;
+		d.type = VOID;
 	}
 
 	return d;
@@ -441,7 +441,7 @@ Datum Lingo::getTheCast(Datum &id1, int field) {
 	Datum d;
 	int id = 0;
 
-	if (id1.type == vINT) {
+	if (id1.type == INT) {
 		id = id1.u.i;
 	} else {
 		warning("Unknown the cast id type: %s", id1.type2str());
@@ -457,7 +457,7 @@ Datum Lingo::getTheCast(Datum &id1, int field) {
 	CastInfo *castInfo;
 	if (!_vm->_currentScore->_casts.contains(id)) {
 		if (field == kTheLoaded) {
-			d.type = vINT;
+			d.type = INT;
 			d.u.i = 0;
 		}
 
@@ -469,7 +469,7 @@ Datum Lingo::getTheCast(Datum &id1, int field) {
 	cast = _vm->_currentScore->_casts[id];
 	castInfo = _vm->_currentScore->_castsInfo[id];
 
-	d.type = vINT;
+	d.type = INT;
 
 	switch (field) {
 	case kTheCastType:
@@ -497,7 +497,7 @@ Datum Lingo::getTheCast(Datum &id1, int field) {
 		{
 			if (cast->type != kCastShape) {
 				warning("Field %d of cast %d not found", field, id);
-				d.type = vVOID;
+				d.type = VOID;
 				return d;
 			}
 
@@ -509,7 +509,7 @@ Datum Lingo::getTheCast(Datum &id1, int field) {
 		{
 			if (cast->type != kCastShape) {
 				warning("Field %d of cast %d not found", field, id);
-				d.type = vVOID;
+				d.type = VOID;
 				return d;
 			}
 
@@ -522,7 +522,7 @@ Datum Lingo::getTheCast(Datum &id1, int field) {
 		break;
 	default:
 		warning("Unprocessed getting field %d of cast %d", field, id);
-		d.type = vVOID;
+		d.type = VOID;
 	//TODO find out about String fields
 	}
 
@@ -532,7 +532,7 @@ Datum Lingo::getTheCast(Datum &id1, int field) {
 void Lingo::setTheCast(Datum &id1, int field, Datum &d) {
 	int id = 0;
 
-	if (id1.type == vINT) {
+	if (id1.type == INT) {
 		id = id1.u.i;
 	} else {
 		warning("Unknown the cast id type: %s", id1.type2str());
diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp
index e5fa09c..0bb4309 100644
--- a/engines/director/lingo/lingo.cpp
+++ b/engines/director/lingo/lingo.cpp
@@ -69,7 +69,7 @@ struct EventHandlerType {
 
 Symbol::Symbol() {
 	name = NULL;
-	type = vVOID;
+	type = VOID;
 	u.s = NULL;
 	nargs = 0;
 	global = false;
@@ -224,10 +224,10 @@ void Lingo::processEvent(LEvent event, int entityId) {
 }
 
 int Lingo::alignTypes(Datum &d1, Datum &d2) {
-	int opType = vINT;
+	int opType = INT;
 
-	if (d1.type == vFLOAT || d2.type == vFLOAT) {
-		opType = vFLOAT;
+	if (d1.type == FLOAT || d2.type == FLOAT) {
+		opType = FLOAT;
 		d1.toFloat();
 		d2.toFloat();
 	}
@@ -237,12 +237,12 @@ int Lingo::alignTypes(Datum &d1, Datum &d2) {
 
 int Datum::toInt() {
 	switch (type) {
-	case vINT:
+	case INT:
 		// no-op
 		break;
-	case vFLOAT:
+	case FLOAT:
 		u.i = (int)u.f;
-		type = vINT;
+		type = INT;
 		break;
 	default:
 		warning("Incorrect operation toInt() for type: %s", type2str());
@@ -253,11 +253,11 @@ int Datum::toInt() {
 
 double Datum::toFloat() {
 	switch (type) {
-	case vINT:
+	case INT:
 		u.f = (double)u.i;
-		type = vFLOAT;
+		type = FLOAT;
 		break;
-	case vFLOAT:
+	case FLOAT:
 		// no-op
 		break;
 	default:
@@ -270,13 +270,13 @@ double Datum::toFloat() {
 Common::String *Datum::toString() {
 	Common::String *s = new Common::String;
 	switch (type) {
-	case vINT:
+	case INT:
 		s->format("%d", u.i);
 		break;
-	case vFLOAT:
+	case FLOAT:
 		s->format(g_lingo->_floatPrecisionFormat.c_str(), u.f);
 		break;
-	case vSTRING:
+	case STRING:
 		delete s;
 		s = u.s;
 		break;
@@ -285,7 +285,7 @@ Common::String *Datum::toString() {
 	}
 
 	u.s = s;
-	type = vSTRING;
+	type = STRING;
 
 	return u.s;
 }
@@ -294,20 +294,20 @@ const char *Datum::type2str(bool isk) {
 	static char res[20];
 
 	switch (isk ? u.i : type) {
-	case vINT:
-		return isk ? "#integer" : "vINT";
-	case vFLOAT:
-		return isk ? "#float" : "vFLOAT";
-	case vSTRING:
-		return isk ? "#string" : "vSTRING";
-	case vCASTREF:
-		return "vCASTREF";
-	case vVOID:
-		return isk ? "#void" : "vVOID";
-	case vPOINT:
-		return isk ? "#point" : "vPOINT";
-	case vSYMBOL:
-		return isk ? "#symbol" : "vSYMBOL";
+	case INT:
+		return isk ? "#integer" : "INT";
+	case FLOAT:
+		return isk ? "#float" : "FLOAT";
+	case STRING:
+		return isk ? "#string" : "STRING";
+	case CASTREF:
+		return "CASTREF";
+	case VOID:
+		return isk ? "#void" : "VOID";
+	case POINT:
+		return isk ? "#point" : "POINT";
+	case SYMBOL:
+		return isk ? "#symbol" : "SYMBOL";
 	default:
 		snprintf(res, 20, "-- (%d) --", type);
 		return res;
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index e71136a..8e73e23 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -82,12 +82,12 @@ struct Symbol {	/* symbol table entry */
 	char *name;
 	int type;
 	union {
-		int		i;			/* vVAR */
-		double	f;			/* vFLOAT */
-		ScriptData	*defn;	/* vFUNCTION, vPROCEDURE */
-		void (*func)(void); /* vBUILTIN */
-		Common::String	*s;	/* vSTRING */
-		FloatArray *arr;	/* vARRAY, vPOINT, vRECT */
+		int		i;			/* VAR */
+		double	f;			/* FLOAT */
+		ScriptData	*defn;	/* FUNCTION, PROCEDURE */
+		void (*func)(void); /* BUILTIN */
+		Common::String	*s;	/* STRING */
+		FloatArray *arr;	/* ARRAY, POINT, RECT */
 	} u;
 	int nargs;
 	bool global;
@@ -103,10 +103,10 @@ struct Datum {	/* interpreter stack type */
 		double f;
 		Common::String *s;
 		Symbol	*sym;
-		FloatArray *arr;	/* vARRAY, vPOINT, vRECT */
+		FloatArray *arr;	/* ARRAY, POINT, RECT */
 	} u;
 
-	Datum() { u.sym = NULL; type = vVOID; }
+	Datum() { u.sym = NULL; type = VOID; }
 
 	double toFloat();
 	int toInt();






More information about the Scummvm-git-logs mailing list