aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2017-01-07 17:13:33 +0100
committerEugene Sandulenko2017-01-07 17:13:33 +0100
commite3a7fe4caba7f4d8d46cfaf2d2e1c8dfb0e4316c (patch)
treeaa24cae74cdb6fb4bea6224de78a5c7807fbd24a
parent993418674e849262e56b3d1fb95c2aa2815380ae (diff)
downloadscummvm-rg350-e3a7fe4caba7f4d8d46cfaf2d2e1c8dfb0e4316c.tar.gz
scummvm-rg350-e3a7fe4caba7f4d8d46cfaf2d2e1c8dfb0e4316c.tar.bz2
scummvm-rg350-e3a7fe4caba7f4d8d46cfaf2d2e1c8dfb0e4316c.zip
DIRECTOR: Lingo: Switch bison debug at runtime
--debugflags=lingocompile -d10
-rw-r--r--engines/director/lingo/lingo-lex.cpp5
-rw-r--r--engines/director/lingo/lingo-lex.l5
2 files changed, 8 insertions, 2 deletions
diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp
index 009ae8fe57..dc48bc6e7a 100644
--- a/engines/director/lingo/lingo-lex.cpp
+++ b/engines/director/lingo/lingo-lex.cpp
@@ -2386,7 +2386,10 @@ namespace Director {
int Lingo::parse(const char *code) {
YY_BUFFER_STATE bp;
- yydebug = 0;
+ if (debugChannelSet(10, kDebugLingoCompile))
+ yydebug = 1;
+ else
+ yydebug = 0;
yy_delete_buffer(YY_CURRENT_BUFFER);
diff --git a/engines/director/lingo/lingo-lex.l b/engines/director/lingo/lingo-lex.l
index e7d3a84475..d0a93ca739 100644
--- a/engines/director/lingo/lingo-lex.l
+++ b/engines/director/lingo/lingo-lex.l
@@ -230,7 +230,10 @@ namespace Director {
int Lingo::parse(const char *code) {
YY_BUFFER_STATE bp;
- yydebug = 0;
+ if (debugChannelSet(10, kDebugLingoCompile))
+ yydebug = 1;
+ else
+ yydebug = 0;
yy_delete_buffer(YY_CURRENT_BUFFER);