bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Don't define debugging functions when !YYDEBUG.


From: Akim Demaille
Subject: [PATCH] Don't define debugging functions when !YYDEBUG.
Date: Tue, 21 Oct 2008 16:14:23 -0500

        * data/lalr1.cc (debug_stream, set_debug_stream)
        (debug_level_type, debug_level, set_debug_level): Don't
        declare them when YYDEBUG is not defined.
        The implementation are already YYDEBUG-aware.
---
 data/lalr1.cc |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/data/lalr1.cc b/data/lalr1.cc
index 9d108c4..857f2e8 100644
--- a/data/lalr1.cc
+++ b/data/lalr1.cc
@@ -130,6 +130,7 @@ b4_user_stype
     /// \returns  0 iff parsing succeeded.
     virtual int parse ();
 
+#if YYDEBUG
     /// The current debugging stream.
     std::ostream& debug_stream () const;
     /// Set the current debugging stream.
@@ -141,6 +142,7 @@ b4_user_stype
     debug_level_type debug_level () const;
     /// Set the current debugging level.
     void set_debug_level (debug_level_type l);
+#endif
 
   private:
     /// Report a syntax error.
-- 
1.6.0.2.588.g3102





reply via email to

[Prev in Thread] Current Thread [Next in Thread]