From cf2001de5fd542b4605d14f249f3aa7c6159ada5 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Wed, 19 Feb 2020 00:01:51 +0100 Subject: [PATCH] Allow compiling parser in debug mode with `-DYYDEBUG=1` --- src/asm/main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/asm/main.c b/src/asm/main.c index 412d5423..26eafa15 100644 --- a/src/asm/main.c +++ b/src/asm/main.c @@ -44,7 +44,9 @@ uint32_t nTotalLines, nPC, nIFDepth, nUnionDepth; bool skipElif; uint32_t unionStart[128], unionSize[128]; -/* extern int yydebug; */ +#if defined(YYDEBUG) && YYDEBUG +extern int yydebug; +#endif FILE *dependfile; bool oGeneratedMissingIncludes; @@ -335,7 +337,9 @@ int main(int argc, char *argv[]) if (!cldefines) fatalerror("No memory for command line defines"); - /* yydebug=1; */ +#if defined(YYDEBUG) && YYDEBUG + yydebug = 1; +#endif nMaxRecursionDepth = 64; oGeneratePhonyDeps = false;