aboutsummaryrefslogtreecommitdiff
path: root/engines/director
diff options
context:
space:
mode:
authorEugene Sandulenko2020-01-01 22:22:08 +0100
committerEugene Sandulenko2020-01-01 22:28:10 +0100
commit48c6da247a248cf5c6cb9f3897fd3b7315d2e69e (patch)
treebff91313375a66c1c6cdd6c90bf4c0095b6ddc05 /engines/director
parentf4a7652e20ebba93d594d3799ef6433cfb7fe391 (diff)
downloadscummvm-rg350-48c6da247a248cf5c6cb9f3897fd3b7315d2e69e.tar.gz
scummvm-rg350-48c6da247a248cf5c6cb9f3897fd3b7315d2e69e.tar.bz2
scummvm-rg350-48c6da247a248cf5c6cb9f3897fd3b7315d2e69e.zip
DIRECTOR: LINGO: Improved lexer debug output
Diffstat (limited to 'engines/director')
-rw-r--r--engines/director/lingo/lingo-lex.cpp8
-rw-r--r--engines/director/lingo/lingo-lex.l8
2 files changed, 8 insertions, 8 deletions
diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp
index 2a1af94eb2..b6f9e63e06 100644
--- a/engines/director/lingo/lingo-lex.cpp
+++ b/engines/director/lingo/lingo-lex.cpp
@@ -1420,7 +1420,7 @@ YY_RULE_SETUP
if (g_lingo->_builtins.contains(*yylval.s))
return FBLTINONEARG;
else
- error("LEXER: Unhandled chunk expression %s", yylval.s->c_str());
+ error("LEXER: Unhandled chunk expression '%s'", yylval.s->c_str());
}
YY_BREAK
case 53:
@@ -1467,7 +1467,7 @@ YY_RULE_SETUP
field = Common::String::format("%d%s", g_lingo->_objectEntityId, field.c_str());
if (!g_lingo->_theEntityFields.contains(field)) {
- error("LEXER: Unhandled the field %s for object", field.c_str());
+ error("LEXER: Unhandled the field '%s' for object", field.c_str());
}
yylval.objectfield.s = new Common::String(ptr);
@@ -1477,7 +1477,7 @@ YY_RULE_SETUP
}
}
- warning("LEXER: Unhandled the entity %s", ptr);
+ warning("LEXER: Unhandled the entity '%s', field '%s'", ptr, field.c_str());
}
YY_BREAK
case 54:
@@ -1535,7 +1535,7 @@ YY_RULE_SETUP
return THEENTITY;
}
- warning("LEXER: Unhandled the entity %s", ptr);
+ warning("LEXER: Unhandled the entity '%s'", ptr);
}
YY_BREAK
case 56:
diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l
index eaa9b00f2c..fc554259a9 100644
--- a/engines/director/lingo/lingo-lex.l
+++ b/engines/director/lingo/lingo-lex.l
@@ -207,7 +207,7 @@ whitespace [\t ]
if (g_lingo->_builtins.contains(*yylval.s))
return FBLTINONEARG;
else
- error("LEXER: Unhandled chunk expression %s", yylval.s->c_str());
+ error("LEXER: Unhandled chunk expression '%s'", yylval.s->c_str());
}
(?i:the[ \t]+[[:alpha:]]+[\t ]+of[\t ]+{identifier}) {
count();
@@ -250,7 +250,7 @@ whitespace [\t ]
field = Common::String::format("%d%s", g_lingo->_objectEntityId, field.c_str());
if (!g_lingo->_theEntityFields.contains(field)) {
- error("LEXER: Unhandled the field %s for object", field.c_str());
+ error("LEXER: Unhandled the field '%s' for object", field.c_str());
}
yylval.objectfield.s = new Common::String(ptr);
@@ -260,7 +260,7 @@ whitespace [\t ]
}
}
- warning("LEXER: Unhandled the entity %s", ptr);
+ warning("LEXER: Unhandled the entity '%s', field '%s'", ptr, field.c_str());
}
(?i:the[ \t]+[[:alpha:]]+[ \t+](date|time)) {
count();
@@ -310,7 +310,7 @@ whitespace [\t ]
return THEENTITY;
}
- warning("LEXER: Unhandled the entity %s", ptr);
+ warning("LEXER: Unhandled the entity '%s'", ptr);
}
(?i:then) { count(); return tTHEN; }
(?i:to) { count(); return tTO; }