]> git.saurik.com Git - bison.git/commit - data/c++.m4
Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 13 Sep 2006 17:41:19 +0000 (17:41 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 13 Sep 2006 17:41:19 +0000 (17:41 +0000)
commitfa7b79c063589793d5786be7906d3b52b1732636
treedd89ed4a8ebd8d79d5ea29c58c2eda441e00f398
parent4ec13d6058441738f2b8d48e418e539808efa4e6
Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
runtime cost when YYDEBUG is not defined, and so that some tests
that used to fail now work.  Problem and initial suggestion by
Paolo Bonzini.
* data/c++.m4 (b4_parse_param_cons): Omit leading ','.
* data/glr.cc (b4_parser_class_name):
Initialize yycdebug_ only if YYDEBUG.  Also, initialize yydebug_.
(debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
(yydebug_) [YYDEBUG]: New member.
(yycdebug_): Now defined only if YYDEBUG.
* data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
(YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
(b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
if YYYDEBUG.
(debug_stream, set_debug_stream, debug_level, set_debug_level):
Define only if YYDEBUG.
* tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
set_debug_level.
* tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
* tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
AT_CHECK_CALC_GLR_CC that are working now.
ChangeLog
data/c++.m4
data/glr.cc
data/lalr1.cc
tests/calc.at
tests/regression.at