[4800] in Athena Bugs
YACC bug
daemon@ATHENA.MIT.EDU (Jonathan I. Kamens)
Thu Apr 19 20:44:35 1990
Date: Thu, 19 Apr 90 20:44:14 -0400
From: "Jonathan I. Kamens" <jik@pit-manager.MIT.EDU>
To: pushpak@ATHENA.MIT.EDU
Cc: bugs@ATHENA.MIT.EDU
In-Reply-To: bugs[4731]
From: pushpak@ATHENA.MIT.EDU
Date: Tue, 10 Apr 90 20:52:50 EDT
YACC should not output y.tab.c with int yydebug=0.That defeats the
purpose of compiling with -DYYDEBUG option.
- PUSHPAK BHATTACHARYYA
(pushpak@athena.mit.edu)
Thank you for reporting this problem; however, your report is
incorrect.
Even when you compile with the YYDEBUG option set, the printing of
debugging messages is still disabled by default; this is why the
yydebug variable is initialized to 0.
In order to turn debugging on, you set yydebug to 1 in your program
before invoking the parser; since yydebug is a global integer
variable, you declare it as "extern int yydebug;" in your source code
and do "yydebug = 1;" before calling "yyparse()".
If you have any more questions about this, please contact the Project
Athena consulting service, either by stopping by the consulting office
(11-115), calling them on the phone (x3-4435), or by using olc (type
"olc" at the athena% prompt).
Furthermore, you might find it useful in the future to check with them
before sending mail to bugs, because they may be able to offer you a
solution (as in this case).
Jonathan Kamens
Project Athena Quality Assurance