diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp index 7f51be57d4b8..11804c2dc16d 100644 --- a/engines/director/lingo/lingo-code.cpp +++ b/engines/director/lingo/lingo-code.cpp @@ -98,7 +98,7 @@ void Lingo::c_varpush() { sym = new Symbol; sym->name = (char *)calloc(strlen(name) + 1, 1); Common::strlcpy(sym->name, name, strlen(name) + 1); - sym->type = UNDEF; + sym->type = VOID; sym->u.val = 0; g_lingo->_vars[name] = sym; @@ -118,7 +118,7 @@ void Lingo::c_assign() { d1 = g_lingo->pop(); d2 = g_lingo->pop(); - if (d1.sym->type != VAR && d1.sym->type != UNDEF) { + if (d1.sym->type != VAR && d1.sym->type != VOID) { warning("assignment to non-variable '%s'", d1.sym->name); return; } @@ -129,13 +129,13 @@ void Lingo::c_assign() { } bool Lingo::verify(Symbol *s) { - if (s->type != VAR && s->type != UNDEF) { + if (s->type != VAR && s->type != VOID) { warning("attempt to evaluate non-variable '%s'", s->name); return false; } - if (s->type == UNDEF) { + if (s->type == VOID) { warning("undefined variable '%s'", s->name); return false; diff --git a/engines/director/lingo/lingo-gr.cpp b/engines/director/lingo/lingo-gr.cpp index c8f1fabbee00..7d7bf1d41cc1 100644 --- a/engines/director/lingo/lingo-gr.cpp +++ b/engines/director/lingo/lingo-gr.cpp @@ -67,7 +67,7 @@ know about them. */ enum yytokentype { UNARY = 258, - UNDEF = 259, + VOID = 259, INT = 260, FLOAT = 261, VAR = 262, @@ -99,7 +99,7 @@ #endif /* Tokens. */ #define UNARY 258 -#define UNDEF 259 +#define VOID 259 #define INT 260 #define FLOAT 261 #define VAR 262 @@ -511,7 +511,7 @@ static const yytype_uint8 yyrline[] = First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "$end", "error", "$undefined", "UNARY", "UNDEF", "INT", "FLOAT", "VAR", + "$end", "error", "$undefined", "UNARY", "VOID", "INT", "FLOAT", "VAR", "STRING", "tIF", "tELSE", "tEND", "tFRAME", "tGO", "tINTO", "tLOOP", "tMCI", "tMCIWAIT", "tMOVIE", "tNEXT", "tOF", "tPREVIOUS", "tPUT", "tSET", "tTHEN", "tTO", "tGE", "tLE", "tGT", "tLT", "tEQ", "tNEQ", "'='", @@ -1937,6 +1937,6 @@ yyparse () } -#line 215 "engines/director/lingo/lingo-gr.y" +#line 228 "engines/director/lingo/lingo-gr.y" diff --git a/engines/director/lingo/lingo-gr.h b/engines/director/lingo/lingo-gr.h index 581f3d236e69..797826974e82 100644 --- a/engines/director/lingo/lingo-gr.h +++ b/engines/director/lingo/lingo-gr.h @@ -40,7 +40,7 @@ know about them. */ enum yytokentype { UNARY = 258, - UNDEF = 259, + VOID = 259, INT = 260, FLOAT = 261, VAR = 262, @@ -72,7 +72,7 @@ #endif /* Tokens. */ #define UNARY 258 -#define UNDEF 259 +#define VOID 259 #define INT 260 #define FLOAT 261 #define VAR 262 diff --git a/engines/director/lingo/lingo-gr.y b/engines/director/lingo/lingo-gr.y index 582ff5309f5c..8d205b8ae158 100644 --- a/engines/director/lingo/lingo-gr.y +++ b/engines/director/lingo/lingo-gr.y @@ -69,7 +69,7 @@ using namespace Director; int code; } -%token UNARY UNDEF +%token UNARY VOID %token INT %token FLOAT %token VAR STRING diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp index 25b449591ec6..fee23d1e346a 100644 --- a/engines/director/lingo/lingo.cpp +++ b/engines/director/lingo/lingo.cpp @@ -69,7 +69,7 @@ struct EventHandlerType { Symbol::Symbol() { name = NULL; - type = UNDEF; + type = VOID; u.str = NULL; }