Skip to content

Commit

Permalink
DIRECTOR: Lingo: Renamed UNDEF -> VOID
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Aug 3, 2016
1 parent fc144c7 commit 8fb7aaf
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions engines/director/lingo/lingo-code.cpp
Expand Up @@ -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;
Expand All @@ -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;
}
Expand All @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions engines/director/lingo/lingo-gr.cpp
Expand Up @@ -67,7 +67,7 @@
know about them. */
enum yytokentype {
UNARY = 258,
UNDEF = 259,
VOID = 259,
INT = 260,
FLOAT = 261,
VAR = 262,
Expand Down Expand Up @@ -99,7 +99,7 @@
#endif
/* Tokens. */
#define UNARY 258
#define UNDEF 259
#define VOID 259
#define INT 260
#define FLOAT 261
#define VAR 262
Expand Down Expand Up @@ -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", "'='",
Expand Down Expand Up @@ -1937,6 +1937,6 @@ yyparse ()
}


#line 215 "engines/director/lingo/lingo-gr.y"
#line 228 "engines/director/lingo/lingo-gr.y"


4 changes: 2 additions & 2 deletions engines/director/lingo/lingo-gr.h
Expand Up @@ -40,7 +40,7 @@
know about them. */
enum yytokentype {
UNARY = 258,
UNDEF = 259,
VOID = 259,
INT = 260,
FLOAT = 261,
VAR = 262,
Expand Down Expand Up @@ -72,7 +72,7 @@
#endif
/* Tokens. */
#define UNARY 258
#define UNDEF 259
#define VOID 259
#define INT 260
#define FLOAT 261
#define VAR 262
Expand Down
2 changes: 1 addition & 1 deletion engines/director/lingo/lingo-gr.y
Expand Up @@ -69,7 +69,7 @@ using namespace Director;
int code;
}

%token UNARY UNDEF
%token UNARY VOID
%token<i> INT
%token<f> FLOAT
%token<s> VAR STRING
Expand Down
2 changes: 1 addition & 1 deletion engines/director/lingo/lingo.cpp
Expand Up @@ -69,7 +69,7 @@ struct EventHandlerType {

Symbol::Symbol() {
name = NULL;
type = UNDEF;
type = VOID;
u.str = NULL;
}

Expand Down

0 comments on commit 8fb7aaf

Please sign in to comment.