[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Debug mode without using "-d"
From: |
Ervin Hegedüs |
Subject: |
Debug mode without using "-d" |
Date: |
Sun, 8 Dec 2019 19:46:19 +0100 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
Hi there,
I'm a Bison beginner, just started to play with a demo.
I see there is a "-d" command line option, which shows some debug
information.
I'ld like to control this feature through my code. I realized
that this option set a variable in generated source file:
1577 extern int yy_flex_debug;
1578 int yy_flex_debug = 1;
...
1657 void yyset_debug ( int debug_flag );
...
3254 void yyset_debug (int _bdebug )
3255 {
3256 yy_flex_debug = _bdebug ;
3257 }
Okay, I tried to use this variable with this way in my own
source:
int main(int argc, char* argv[]) {
if (argc > 1) {
if (strcmp(argv[1], "debug") == 0) {
yyset_debug(1);
}
...
but has no effect (if I use "flex" command without "-d").
What am I missing?
Thanks,
a.
- Debug mode without using "-d",
Ervin Hegedüs <=