From e3a7fe4caba7f4d8d46cfaf2d2e1c8dfb0e4316c Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 7 Jan 2017 17:13:33 +0100 Subject: DIRECTOR: Lingo: Switch bison debug at runtime --debugflags=lingocompile -d10 --- engines/director/lingo/lingo-lex.cpp | 5 ++++- engines/director/lingo/lingo-lex.l | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'engines') 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); -- cgit v1.2.3