Boost logo

Boost-Commit :

From: troy_at_[hidden]
Date: 2008-06-30 08:38:24


Author: troy
Date: 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
New Revision: 46903
URL: http://svn.boost.org/trac/boost/changeset/46903

Log:
merge from release branch
Added:
   branches/CMake/release/libs/wave/test/testwave/collect_hooks_information.hpp
      - copied unchanged from r46809, /branches/release/libs/wave/test/testwave/collect_hooks_information.hpp
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_038.cpp
      - copied unchanged from r46809, /branches/release/libs/wave/test/testwave/testfiles/t_1_038.cpp
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_018.cpp
      - copied unchanged from r46809, /branches/release/libs/wave/test/testwave/testfiles/t_2_018.cpp
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_019.cpp
      - copied unchanged from r46809, /branches/release/libs/wave/test/testwave/testfiles/t_9_019.cpp
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_019.hpp
      - copied unchanged from r46809, /branches/release/libs/wave/test/testwave/testfiles/t_9_019.hpp
Properties modified:
   branches/CMake/release/libs/wave/samples/waveidl/idllexer/idl.re (contents, props changed)
   branches/CMake/release/libs/wave/test/testwave/testfiles/test.cfg (contents, props changed)
Text files modified:
   branches/CMake/release/libs/wave/samples/cpp_tokens/cpp_tokens.cpp | 2
   branches/CMake/release/libs/wave/samples/cpp_tokens/slex/cpp_slex_lexer.hpp | 19 +-
   branches/CMake/release/libs/wave/samples/cpp_tokens/slex/lexer.hpp | 16 +-
   branches/CMake/release/libs/wave/samples/cpp_tokens/slex_iterator.hpp | 105 ++++++++++++-----
   branches/CMake/release/libs/wave/samples/list_includes/lexertl_iterator.hpp | 15 +-
   branches/CMake/release/libs/wave/samples/list_includes/list_includes.cpp | 2
   branches/CMake/release/libs/wave/samples/quick_start/quick_start.cpp | 17 ++
   branches/CMake/release/libs/wave/samples/token_statistics/token_statistics.cpp | 2
   branches/CMake/release/libs/wave/samples/token_statistics/xlex/xlex_lexer.hpp | 2
   branches/CMake/release/libs/wave/samples/token_statistics/xlex_iterator.hpp | 9
   branches/CMake/release/libs/wave/samples/waveidl/idllexer/idl.re | 48 +++---
   branches/CMake/release/libs/wave/samples/waveidl/idllexer/idl_lex_iterator.hpp | 9
   branches/CMake/release/libs/wave/samples/waveidl/idllexer/idl_re2c_lexer.hpp | 2
   branches/CMake/release/libs/wave/test/CMakeLists.txt | 2
   branches/CMake/release/libs/wave/test/build/Jamfile.v2 | 2
   branches/CMake/release/libs/wave/test/testlexers/test_slex_lexer.cpp | 2
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_001.cpp | 16 ++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_002.cpp | 9 +
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_003.cpp | 31 ++++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_004.cpp | 56 +++++++++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_005.cpp | 10 +
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_006.cpp | 30 ++++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_007.cpp | 29 ++++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_008.cpp | 105 +++++++++++++++++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_009.cpp | 10 +
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_010.cpp | 10 +
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_011.cpp | 13 ++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_012.cpp | 27 ++++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_013.cpp | 53 ++++++++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_014.cpp | 2
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_015.cpp | 9 +
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_016.cpp | 11 +
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_020.cpp | 12 +
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_021.cpp | 21 +++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_022.cpp | 12 +
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_023.cpp | 13 ++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_025.cpp | 15 ++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_026.cpp | 3
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_029.cpp | 21 +++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_030.cpp | 16 ++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_031.cpp | 9 +
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_033.cpp | 15 ++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_034.cpp | 18 ++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_035.cpp | 25 ++++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_036.cpp | 6
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_037.cpp | 6
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_001.cpp | 14 ++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_002.cpp | 6
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_003.cpp | 6
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_004.cpp | 16 ++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_005.cpp | 2
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_006.cpp | 13 ++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_007.cpp | 12 +
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_008.cpp | 11 +
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_009.cpp | 33 ++++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_010.cpp | 8 +
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_011.cpp | 6
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_012.cpp | 3
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_013.cpp | 6
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_014.cpp | 28 ++++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_015.cpp | 11 +
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_016.cpp | 7 +
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_017.cpp | 12 +
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_3_001.cpp | 3
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_3_002.cpp | 19 ++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_3_003.cpp | 22 +++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_3_004.cpp | 25 +++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_4_001.cpp | 4
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_4_002.cpp | 9 +
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_4_004.cpp | 26 ++++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_5_030.cpp | 4
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_6_023.cpp | 2
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_6_063.cpp | 5
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_6_067.cpp | 5
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_001.cpp | 3
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_002.cpp | 3
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_003.cpp | 26 ++++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_004.cpp | 7 +
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_006.cpp | 8 +
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_007.cpp | 5
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_008.cpp | 5
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_009.cpp | 11 +
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_010.cpp | 41 ++++++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_011.cpp | 11 +
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_012.cpp | 6
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_013.cpp | 4
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_016.cpp | 22 +++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_017.cpp | 27 ++++
   branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_018.cpp | 5
   branches/CMake/release/libs/wave/test/testwave/testfiles/test.cfg | 4
   branches/CMake/release/libs/wave/test/testwave/testwave.cpp | 8
   branches/CMake/release/libs/wave/test/testwave/testwave_app.cpp | 245 +++++++++++++++++++++++----------------
   branches/CMake/release/libs/wave/test/testwave/testwave_app.hpp | 14 +
   93 files changed, 1411 insertions(+), 229 deletions(-)

Modified: branches/CMake/release/libs/wave/samples/cpp_tokens/cpp_tokens.cpp
==============================================================================
--- branches/CMake/release/libs/wave/samples/cpp_tokens/cpp_tokens.cpp (original)
+++ branches/CMake/release/libs/wave/samples/cpp_tokens/cpp_tokens.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -32,7 +32,7 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 // import required names
-using namespace boost::spirit;
+using namespace boost::spirit::classic;
 
 using std::string;
 using std::getline;

Modified: branches/CMake/release/libs/wave/samples/cpp_tokens/slex/cpp_slex_lexer.hpp
==============================================================================
--- branches/CMake/release/libs/wave/samples/cpp_tokens/slex/cpp_slex_lexer.hpp (original)
+++ branches/CMake/release/libs/wave/samples/cpp_tokens/slex/cpp_slex_lexer.hpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -19,7 +19,7 @@
 #endif // defined(BOOST_SPIRIT_DEBUG)
 
 #include <boost/assert.hpp>
-#include <boost/spirit/core.hpp>
+#include <boost/spirit/include/classic_core.hpp>
 
 #include <boost/wave/wave_config.hpp>
 #include <boost/wave/language_support.hpp>
@@ -60,7 +60,7 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 //
-// encapsulation of the boost::spirit::slex based cpp lexer
+// encapsulation of the boost::spirit::classic::slex based cpp lexer
 //
 ///////////////////////////////////////////////////////////////////////////////
 
@@ -69,14 +69,14 @@
 // bug (at least up to CW V9.5).
 template <typename IteratorT, typename PositionT>
 class lexer_base
-: public boost::spirit::lexer<
+: public boost::spirit::classic::lexer<
         boost::wave::util::position_iterator<IteratorT, PositionT> >
 {
 protected:
     typedef boost::wave::util::position_iterator<IteratorT, PositionT>
         iterator_type;
     typedef typename std::iterator_traits<IteratorT>::value_type char_type;
- typedef boost::spirit::lexer<iterator_type> base_type;
+ typedef boost::spirit::classic::lexer<iterator_type> base_type;
 
     lexer_base();
     
@@ -578,10 +578,8 @@
     virtual ~slex_functor() {}
 
 // get the next token from the input stream
- token_type get()
+ token_type& get(token_type& result)
     {
- token_type token;
-
         if (!at_eof) {
             do {
             // generate and return the next token
@@ -673,17 +671,18 @@
                         break;
                     }
                     
+ result = token_type(id, token_val, pos);
 #if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0
- return guards.detect_guard(token_type(id, token_val, pos));
+ return guards.detect_guard(result);
 #else
- return token_type(id, token_val, pos);
+ return result;
 #endif
                 }
             
             // skip the T_CONTLINE token
             } while (true);
         }
- return token; // return T_EOI
+ return result = token_type(); // return T_EOI
     }
     
     void set_position(PositionT const &pos)

Modified: branches/CMake/release/libs/wave/samples/cpp_tokens/slex/lexer.hpp
==============================================================================
--- branches/CMake/release/libs/wave/samples/cpp_tokens/slex/lexer.hpp (original)
+++ branches/CMake/release/libs/wave/samples/cpp_tokens/slex/lexer.hpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -42,10 +42,10 @@
 ///////////////////////////////////////////////////////////////////////////////
 #include <boost/throw_exception.hpp>
 
-#include <boost/spirit/core.hpp>
-#include <boost/spirit/symbols/symbols.hpp>
-#include <boost/spirit/utility/chset.hpp>
-#include <boost/spirit/utility/escape_char.hpp>
+#include <boost/spirit/include/classic_core.hpp>
+#include <boost/spirit/include/classic_symbols.hpp>
+#include <boost/spirit/include/classic_chset.hpp>
+#include <boost/spirit/include/classic_escape_char.hpp>
 
 #include <set>
 #include <map>
@@ -57,10 +57,6 @@
 #include <boost/assert.hpp>
 #include <boost/limits.hpp>
 
-#if SPIRIT_VERSION < 0x1700 && defined(BOOST_MSVC) && (BOOST_MSVC <= 1300)
-#include <boost/spirit/core/impl/msvc.hpp>
-#endif
-
 #if defined(BOOST_NO_STD_ITERATOR_TRAITS)
 #define BOOST_SPIRIT_IT_NS impl
 #else
@@ -70,6 +66,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 namespace boost {
 namespace spirit {
+namespace classic {
 
 typedef unsigned char uchar;
 typedef unsigned int node_id_t;
@@ -1887,7 +1884,7 @@
 // lexeme definitions passed to lexer::register_regex.
 //
 ///////////////////////////////////////////////////////////////////////////////
-class lexer_grammar : public boost::spirit::grammar<lexer_grammar>
+class lexer_grammar : public boost::spirit::classic::grammar<lexer_grammar>
 {
 public:
     lexer_grammar(std::stack<node*> &node_stack_)
@@ -2890,6 +2887,7 @@
     return m_ignore_current_token;
 }
 
+} // namespace classic
 } // namespace spirit
 } // namespace boost
 

Modified: branches/CMake/release/libs/wave/samples/cpp_tokens/slex_iterator.hpp
==============================================================================
--- branches/CMake/release/libs/wave/samples/cpp_tokens/slex_iterator.hpp (original)
+++ branches/CMake/release/libs/wave/samples/cpp_tokens/slex_iterator.hpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -18,7 +18,7 @@
 
 #include <boost/assert.hpp>
 #include <boost/shared_ptr.hpp>
-#include <boost/spirit/iterator/multi_pass.hpp>
+#include <boost/spirit/include/support_multi_pass.hpp>
 
 #include <boost/wave/language_support.hpp>
 #include <boost/wave/util/file_position.hpp>
@@ -26,7 +26,7 @@
 
 #include "slex_interface.hpp"
 
-#if 0 != __COMO_VERSION__
+#if 0 != __COMO_VERSION__ || !BOOST_WORKAROUND(BOOST_MSVC, <= 1310)
 #define BOOST_WAVE_EOF_PREFIX static
 #else
 #define BOOST_WAVE_EOF_PREFIX
@@ -48,38 +48,48 @@
 template <typename TokenT>
 class slex_iterator_functor_shim
 {
+ typedef typename TokenT::position_type position_type;
+
 public:
- template <typename IteratorT>
- slex_iterator_functor_shim(IteratorT const &first, IteratorT const &last,
- typename TokenT::position_type const &pos,
- boost::wave::language_support language)
- : functor_ptr(slex_input_interface<TokenT>
- ::new_lexer(first, last, pos, language))
-#if 0 != __DECCXX_VER || BOOST_INTEL_CXX_VERSION > 900 || defined(__PGI)
- , eof()
+ slex_iterator_functor_shim()
+#if /*0 != __DECCXX_VER || */defined(__PGI)
+ : eof()
 #endif // 0 != __DECCXX_VER
     {}
 
-// interface to the boost::spirit::multi_pass_policies::functor_input policy
+// interface to the boost::spirit::classic::multi_pass_policies::functor_input
+// policy
     typedef TokenT result_type;
+ typedef slex_iterator_functor_shim unique;
+ typedef lex_input_interface<TokenT>* shared;
 
     BOOST_WAVE_EOF_PREFIX result_type const eof;
     
- result_type operator()()
+ template <typename MultiPass>
+ static result_type& get_next(MultiPass& mp, result_type& result)
     {
- BOOST_ASSERT(0 != functor_ptr.get());
- return functor_ptr->get();
+ return mp.shared->ftor->get(result);
     }
- void set_position(typename TokenT::position_type const &pos)
+
+ // this will be called whenever the last reference to a multi_pass will
+ // be released
+ template <typename MultiPass>
+ static void destroy(MultiPass& mp)
+ {
+ delete mp.shared->ftor;
+ }
+
+ template <typename MultiPass>
+ static void set_position(MultiPass& mp, position_type const &pos)
     {
- BOOST_ASSERT(0 != functor_ptr.get());
- functor_ptr->set_position(pos);
+ mp.shared->ftor->set_position(pos);
     }
     
 #if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0
- bool has_include_guards(std::string& guard_name) const
+ template <typename MultiPass>
+ static bool has_include_guards(MultiPass& mp, std::string& guard_name)
     {
- return functor_ptr->has_include_guards(guard_name);
+ return mp.shared->ftor->has_include_guards(guard_name);
     }
 #endif
 
@@ -87,7 +97,7 @@
     boost::shared_ptr<lex_input_interface<TokenT> > functor_ptr;
 };
 
-#if 0 != __COMO_VERSION__
+#if 0 != __COMO_VERSION__ || !BOOST_WORKAROUND(BOOST_MSVC, <= 1310)
 ///////////////////////////////////////////////////////////////////////////////
 // eof token
 template <typename TokenT>
@@ -120,18 +130,45 @@
 //
 ///////////////////////////////////////////////////////////////////////////////
 
+///////////////////////////////////////////////////////////////////////////////
+// Divide the given functor type into its components (unique and shared)
+// and build a std::pair from these parts
+template <typename FunctorData>
+struct make_multi_pass
+{
+ typedef
+ std::pair<typename FunctorData::unique, typename FunctorData::shared>
+ functor_data_type;
+ typedef typename FunctorData::result_type result_type;
+
+ typedef boost::spirit::multi_pass_policies::split_functor_input input_policy;
+ typedef boost::spirit::multi_pass_policies::ref_counted ownership_policy;
+#if defined(BOOST_WAVE_DEBUG)
+ typedef boost::spirit::multi_pass_policies::buf_id_check check_policy;
+#else
+ typedef boost::spirit::multi_pass_policies::no_check check_policy;
+#endif
+ typedef boost::spirit::multi_pass_policies::split_std_deque storage_policy;
+
+ typedef boost::spirit::multi_pass_policies::default_policy<
+ ownership_policy, check_policy, input_policy, storage_policy>
+ policy_type;
+ typedef boost::spirit::multi_pass<functor_data_type, policy_type> type;
+};
+
+///////////////////////////////////////////////////////////////////////////////
 template <typename TokenT>
 class slex_iterator
-: public boost::spirit::multi_pass<
- impl::slex_iterator_functor_shim<TokenT>,
- boost::wave::util::functor_input
- >
+: public make_multi_pass<impl::slex_iterator_functor_shim<TokenT> >::type
 {
     typedef impl::slex_iterator_functor_shim<TokenT> input_policy_type;
- typedef
- boost::spirit::multi_pass<input_policy_type,
- boost::wave::util::functor_input>
- base_type;
+
+ typedef typename make_multi_pass<input_policy_type>::type base_type;
+ typedef typename make_multi_pass<input_policy_type>::functor_data_type
+ functor_data_type;
+
+ typedef typename input_policy_type::unique unique_functor_type;
+ typedef typename input_policy_type::shared shared_functor_type;
     
 public:
     typedef TokenT token_type;
@@ -143,7 +180,13 @@
     slex_iterator(IteratorT const &first, IteratorT const &last,
             typename TokenT::position_type const &pos,
             boost::wave::language_support language)
- : base_type(input_policy_type(first, last, pos, language))
+ : base_type(
+ functor_data_type(
+ unique_functor_type(),
+ slex_input_interface<TokenT>
+ ::new_lexer(first, last, pos, language)
+ )
+ )
     {}
 
     void set_position(typename TokenT::position_type const &pos)
@@ -164,7 +207,7 @@
         {
             currpos.set_line(pos.get_line() + 1);
         }
- base_type::get_functor().set_position(currpos);
+ unique_functor_type::get_functor().set_position(currpos);
     }
 
 #if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0
@@ -173,7 +216,7 @@
     // completely
     bool has_include_guards(std::string& guard_name) const
     {
- return base_type::get_functor().has_include_guards(guard_name);
+ return unique_functor_type::has_include_guards(guard_name);
     }
 #endif
 };

Modified: branches/CMake/release/libs/wave/samples/list_includes/lexertl_iterator.hpp
==============================================================================
--- branches/CMake/release/libs/wave/samples/list_includes/lexertl_iterator.hpp (original)
+++ branches/CMake/release/libs/wave/samples/list_includes/lexertl_iterator.hpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -17,7 +17,7 @@
 
 #include <boost/assert.hpp>
 #include <boost/shared_ptr.hpp>
-#include <boost/spirit/iterator/multi_pass.hpp>
+#include <boost/spirit/include/classic_multi_pass.hpp>
 
 #include <boost/wave/language_support.hpp>
 #include <boost/wave/util/file_position.hpp>
@@ -25,7 +25,7 @@
 
 #include "lexertl_interface.hpp"
 
-#if 0 != __COMO_VERSION__
+#if 0 != __COMO_VERSION__ || !BOOST_WORKAROUND(BOOST_MSVC, <= 1310)
 #define BOOST_WAVE_EOF_PREFIX static
 #else
 #define BOOST_WAVE_EOF_PREFIX
@@ -54,12 +54,13 @@
             wave::language_support language)
     : functor_ptr(lexertl_input_interface<TokenT>
             ::new_lexer(first, last, pos, language))
-#if 0 != __DECCXX_VER
+#if 0 != __DECCXX_VER || defined(__PGI)
       , eof()
 #endif // 0 != __DECCXX_VER
     {}
 
-// interface to the boost::spirit::multi_pass_policies::functor_input policy
+// interface to the boost::spirit::classic::multi_pass_policies::functor_input
+// policy
     typedef TokenT result_type;
 
     BOOST_WAVE_EOF_PREFIX result_type const eof;
@@ -87,7 +88,7 @@
     boost::shared_ptr<lex_input_interface<TokenT> > functor_ptr;
 };
 
-#if 0 != __COMO_VERSION__
+#if 0 != __COMO_VERSION__ || !BOOST_WORKAROUND(BOOST_MSVC, <= 1310)
 ///////////////////////////////////////////////////////////////////////////////
 // eof token
 template <typename TokenT>
@@ -122,14 +123,14 @@
 
 template <typename TokenT>
 class lex_iterator
-: public boost::spirit::multi_pass<
+: public boost::spirit::classic::multi_pass<
         impl::iterator_functor_shim<TokenT>,
         boost::wave::util::functor_input
>
 {
     typedef impl::iterator_functor_shim<TokenT> input_policy_type;
     typedef
- boost::spirit::multi_pass<input_policy_type,
+ boost::spirit::classic::multi_pass<input_policy_type,
                 boost::wave::util::functor_input>
         base_type;
     typedef lex_iterator<TokenT> self_type;

Modified: branches/CMake/release/libs/wave/samples/list_includes/list_includes.cpp
==============================================================================
--- branches/CMake/release/libs/wave/samples/list_includes/list_includes.cpp (original)
+++ branches/CMake/release/libs/wave/samples/list_includes/list_includes.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -44,7 +44,7 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 // import required names
-using namespace boost::spirit;
+using namespace boost::spirit::classic;
 
 using std::string;
 using std::vector;

Modified: branches/CMake/release/libs/wave/samples/quick_start/quick_start.cpp
==============================================================================
--- branches/CMake/release/libs/wave/samples/quick_start/quick_start.cpp (original)
+++ branches/CMake/release/libs/wave/samples/quick_start/quick_start.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -35,6 +35,8 @@
 boost::wave::util::file_position_type current_position;
 
     try {
+//[quick_start_main
+ // The following preprocesses the given input file (given by argv[1]).
     // Open and read in the specified input file.
     std::ifstream instream(argv[1]);
     std::string instring;
@@ -47,12 +49,14 @@
         instring = std::string(std::istreambuf_iterator<char>(instream.rdbuf()),
                                 std::istreambuf_iterator<char>());
             
- // The template boost::wave::cpplexer::lex_token<> is the token type to be
- // used by the Wave library.
+ // This token type is one of the central types used throughout the library,
+ // because it is a template parameter to some of the public classes and
+ // instances of this type are returned from the iterators.
         typedef boost::wave::cpplexer::lex_token<> token_type;
     
     // The template boost::wave::cpplexer::lex_iterator<> is the lexer type to
- // be used by the Wave library.
+ // to use as the token source for the preprocessing engine. It is
+ // parametrized with the token type.
         typedef boost::wave::cpplexer::lex_iterator<token_type> lex_iterator_type;
         
     // This is the resulting context type to use. The first template parameter
@@ -70,15 +74,20 @@
     // scenes during iteration over the context_type::iterator_type stream.
     context_type ctx (instring.begin(), instring.end(), argv[1]);
 
- // analyze the input file
+ // Get the preprocessor iterators and use them to generate
+ // the token sequence.
     context_type::iterator_type first = ctx.begin();
     context_type::iterator_type last = ctx.end();
         
+
+ // The input stream is preprocessed for you while iterating over the range
+ // [first, last)
         while (first != last) {
             current_position = (*first).get_position();
             std::cout << (*first).get_value();
             ++first;
         }
+//]
     }
     catch (boost::wave::cpp_exception const& e) {
     // some preprocessing error

Modified: branches/CMake/release/libs/wave/samples/token_statistics/token_statistics.cpp
==============================================================================
--- branches/CMake/release/libs/wave/samples/token_statistics/token_statistics.cpp (original)
+++ branches/CMake/release/libs/wave/samples/token_statistics/token_statistics.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -28,7 +28,7 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 // import required names
-using namespace boost::spirit;
+using namespace boost::spirit::classic;
 
 using std::string;
 using std::vector;

Modified: branches/CMake/release/libs/wave/samples/token_statistics/xlex/xlex_lexer.hpp
==============================================================================
--- branches/CMake/release/libs/wave/samples/token_statistics/xlex/xlex_lexer.hpp (original)
+++ branches/CMake/release/libs/wave/samples/token_statistics/xlex/xlex_lexer.hpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -22,7 +22,7 @@
 
 #include <boost/concept_check.hpp>
 #include <boost/assert.hpp>
-#include <boost/spirit/core.hpp>
+#include <boost/spirit/include/classic_core.hpp>
 
 #include <boost/wave/token_ids.hpp>
 #include <boost/wave/language_support.hpp>

Modified: branches/CMake/release/libs/wave/samples/token_statistics/xlex_iterator.hpp
==============================================================================
--- branches/CMake/release/libs/wave/samples/token_statistics/xlex_iterator.hpp (original)
+++ branches/CMake/release/libs/wave/samples/token_statistics/xlex_iterator.hpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -18,7 +18,7 @@
 
 #include <boost/assert.hpp>
 #include <boost/shared_ptr.hpp>
-#include <boost/spirit/iterator/multi_pass.hpp>
+#include <boost/spirit/include/classic_multi_pass.hpp>
 
 #include <boost/wave/language_support.hpp>
 #include <boost/wave/util/file_position.hpp>
@@ -51,7 +51,8 @@
             ::new_lexer(first, last, pos, language))
     {}
 
-// interface to the boost::spirit::multi_pass_policies::functor_input policy
+// interface to the boost::spirit::classic::multi_pass_policies::functor_input
+// policy
     typedef TokenT result_type;
 
     /*static*/ result_type const eof;
@@ -111,14 +112,14 @@
 
 template <typename TokenT>
 class xlex_iterator
-: public boost::spirit::multi_pass<
+: public boost::spirit::classic::multi_pass<
         impl::xlex_iterator_functor_shim<TokenT>,
         boost::wave::util::functor_input
>
 {
     typedef impl::xlex_iterator_functor_shim<TokenT> input_policy_type;
     typedef
- boost::spirit::multi_pass<input_policy_type,
+ boost::spirit::classic::multi_pass<input_policy_type,
                 boost::wave::util::functor_input>
         base_type;
     

Modified: branches/CMake/release/libs/wave/samples/waveidl/idllexer/idl.re
==============================================================================
--- branches/CMake/release/libs/wave/samples/waveidl/idllexer/idl.re (original)
+++ branches/CMake/release/libs/wave/samples/waveidl/idllexer/idl.re 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -5,7 +5,7 @@
 
     http://www.boost.org/
 
- Copyright (c) 2001-2008 Hartmut Kaiser. Distributed under the Boost
+ Copyright (c) 2001-2008 Hartmut Kaiser. Distributed under the Boost
     Software License, Version 1.0. (See accompanying file
     LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
@@ -33,7 +33,7 @@
 #include <boost/wave/token_ids.hpp>
 #include <boost/wave/cpplexer/re2clex/aq.hpp>
 #include <boost/wave/cpplexer/re2clex/scanner.hpp>
-#include <boost/wave/cpplexer/cpplexer_exceptions.hpp>
+#include <boost/wave/cpplexer/cpplexer_exceptions.hpp>
 
 #include "idl_re.hpp"
 
@@ -200,11 +200,11 @@
             if (buf == 0)
             {
                 using namespace std; // some systems have printf in std
- if (0 != s->error_proc) {
- (*s->error_proc)(s,
- cpplexer::lexing_exception::unexpected_error,
- "Out of memory!");
- }
+ if (0 != s->error_proc) {
+ (*s->error_proc)(s,
+ cpplexer::lexing_exception::unexpected_error,
+ "Out of memory!");
+ }
                 else
                     printf("Out of memory!\n");
                     
@@ -477,11 +477,11 @@
         if(cursor != s->eof)
         {
             using namespace std; // some systems have printf in std
- if (0 != s->error_proc) {
- (*s->error_proc)(s,
- cpplexer::lexing_exception::generic_lexing_error,
- "'\\000' in input stream");
- }
+ if (0 != s->error_proc) {
+ (*s->error_proc)(s,
+ cpplexer::lexing_exception::generic_lexing_error,
+ "'\\000' in input stream");
+ }
             else
                 printf("Error: 0 in file\n");
         }
@@ -513,18 +513,18 @@
         if(cursor == s->eof)
         {
             if (s->error_proc)
- (*s->error_proc)(s,
- cpplexer::lexing_exception::generic_lexing_warning,
- "Unterminated comment");
+ (*s->error_proc)(s,
+ cpplexer::lexing_exception::generic_lexing_warning,
+ "Unterminated comment");
             else
                 printf("Error: Unterminated comment\n");
         }
         else
         {
             if (s->error_proc)
- (*s->error_proc)(s,
- cpplexer::lexing_exception::generic_lexing_error,
- "'\\000' in input stream");
+ (*s->error_proc)(s,
+ cpplexer::lexing_exception::generic_lexing_error,
+ "'\\000' in input stream");
             else
                 printf("Error: 0 in file");
         }
@@ -537,9 +537,9 @@
     anyctrl
     {
         if (s->error_proc)
- (*s->error_proc)(s,
- cpplexer::lexing_exception::generic_lexing_error,
- "invalid character in input stream");
+ (*s->error_proc)(s,
+ cpplexer::lexing_exception::generic_lexing_error,
+ "invalid character in input stream");
         else
             printf("Error: 0 in file");
     }
@@ -564,9 +564,9 @@
         if(cursor != s->eof)
         {
             if (s->error_proc)
- (*s->error_proc)(s,
- cpplexer::lexing_exception::generic_lexing_error,
- "'\\000' in input stream");
+ (*s->error_proc)(s,
+ cpplexer::lexing_exception::generic_lexing_error,
+ "'\\000' in input stream");
             else
                 printf("Error: 0 in file");
         }

Modified: branches/CMake/release/libs/wave/samples/waveidl/idllexer/idl_lex_iterator.hpp
==============================================================================
--- branches/CMake/release/libs/wave/samples/waveidl/idllexer/idl_lex_iterator.hpp (original)
+++ branches/CMake/release/libs/wave/samples/waveidl/idllexer/idl_lex_iterator.hpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -19,7 +19,7 @@
 
 #include <boost/assert.hpp>
 #include <boost/shared_ptr.hpp>
-#include <boost/spirit/iterator/multi_pass.hpp>
+#include <boost/spirit/include/classic_multi_pass.hpp>
 
 #include <boost/wave/language_support.hpp>
 #include <boost/wave/util/file_position.hpp>
@@ -58,7 +58,8 @@
     : functor_ptr(lex_input_interface_type::new_lexer(first, last, pos, language))
     {}
 
-// interface to the boost::spirit::multi_pass_policies::functor_input policy
+// interface to the boost::spirit::classic::multi_pass_policies::functor_input
+// policy
     typedef TokenT result_type;
 
     BOOST_WAVE_EOF_PREFIX result_type const eof;
@@ -110,14 +111,14 @@
 
 template <typename TokenT>
 class lex_iterator
-: public boost::spirit::multi_pass<
+: public boost::spirit::classic::multi_pass<
         impl::lex_iterator_functor_shim<TokenT>,
         boost::wave::util::functor_input
>
 {
     typedef impl::lex_iterator_functor_shim<TokenT> input_policy_type;
     typedef
- boost::spirit::multi_pass<input_policy_type,
+ boost::spirit::classic::multi_pass<input_policy_type,
                 boost::wave::util::functor_input>
         base_type;
     typedef lex_iterator<TokenT> self_type;

Modified: branches/CMake/release/libs/wave/samples/waveidl/idllexer/idl_re2c_lexer.hpp
==============================================================================
--- branches/CMake/release/libs/wave/samples/waveidl/idllexer/idl_re2c_lexer.hpp (original)
+++ branches/CMake/release/libs/wave/samples/waveidl/idllexer/idl_re2c_lexer.hpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -22,7 +22,7 @@
 
 #include <boost/concept_check.hpp>
 #include <boost/assert.hpp>
-#include <boost/spirit/core.hpp>
+#include <boost/spirit/include/classic_core.hpp>
 
 #include <boost/wave/token_ids.hpp>
 #include <boost/wave/language_support.hpp>

Modified: branches/CMake/release/libs/wave/test/CMakeLists.txt
==============================================================================
--- branches/CMake/release/libs/wave/test/CMakeLists.txt (original)
+++ branches/CMake/release/libs/wave/test/CMakeLists.txt 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -0,0 +1,2 @@
+message(STATUS "wave tests need love")
+

Modified: branches/CMake/release/libs/wave/test/build/Jamfile.v2
==============================================================================
--- branches/CMake/release/libs/wave/test/build/Jamfile.v2 (original)
+++ branches/CMake/release/libs/wave/test/build/Jamfile.v2 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -21,7 +21,7 @@
 SOURCES = $(SOURCE_STATIC) $(SOURCES_DYNAMIC)
     ;
     
-path-constant TESTWAVE_DIR : ../testwave/testfiles
+path-constant TESTWAVE_DIR : $(BOOST_ROOT)/libs/wave/test/testwave/testfiles
     ;
 
 #

Modified: branches/CMake/release/libs/wave/test/testlexers/test_slex_lexer.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testlexers/test_slex_lexer.cpp (original)
+++ branches/CMake/release/libs/wave/test/testlexers/test_slex_lexer.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -57,7 +57,7 @@
             boost::wave::support_option_long_long);
         lexer_type end = lexer_type();
 
- // verify the correct outcome of the tokenisation
+ // verify the correct outcome of the tokenization
 #if defined(TESTLEXERS_VERBOSE)
         std::cerr << boost::wave::get_token_name(data->id) << std::endl;
 #endif

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_001.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_001.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_001.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -14,3 +14,19 @@
 
 //R #line 16 "t_1_001.cpp"
 C( A(2, 3) ) //R [2][3]
+
+//H 10: t_1_001.cpp(11): #define
+//H 08: t_1_001.cpp(11): A(x, y)=x, y
+//H 10: t_1_001.cpp(12): #define
+//H 08: t_1_001.cpp(12): B(x, y)=[x][y]
+//H 10: t_1_001.cpp(13): #define
+//H 08: t_1_001.cpp(13): C(x)=B(x)
+//H 00: t_1_001.cpp(16): C( A(2, 3) ), [t_1_001.cpp(13): C(x)=B(x)]
+//H 00: t_1_001.cpp(16): A(2, 3), [t_1_001.cpp(11): A(x, y)=x, y]
+//H 02: 2, 3
+//H 03: 2, 3
+//H 02: B(2, 3)
+//H 00: t_1_001.cpp(13): B(2, 3), [t_1_001.cpp(12): B(x, y)=[x][y]]
+//H 02: [2][3]
+//H 03: [2][3]
+//H 03: [2][3]

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_002.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_002.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_002.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -14,3 +14,12 @@
 
 //R #line 16 "t_1_002.cpp"
 ABC() //R 1
+
+//H 10: t_1_002.cpp(11): #if
+//H 11: t_1_002.cpp(11): #if defined(TEST): 1
+//H 10: t_1_002.cpp(12): #define
+//H 08: t_1_002.cpp(12): ABC()=1
+//H 10: t_1_002.cpp(13): #endif
+//H 00: t_1_002.cpp(16): ABC(), [t_1_002.cpp(12): ABC()=1]
+//H 02: 1
+//H 03: 1

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_003.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_003.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_003.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -25,7 +25,36 @@
 //R #line 27 "t_1_003.cpp"
 //R CONCAT(1, 2)
 CONCAT(CONCAT_, INDIRECT())(1, 2)
-// E t_1_003.cpp(29): error: pasting the following two tokens does not give a valid preprocessing token: "1" and "CONCAT"
+
 //R #line 31 "t_1_003.cpp"
 //R 1 CONCAT(2, 3)
 CONCAT(1, CONCAT(2, 3))
+
+//H 10: t_1_003.cpp(13): #define
+//H 08: t_1_003.cpp(13): CONCAT(a, b)=a ## b
+//H 10: t_1_003.cpp(14): #define
+//H 08: t_1_003.cpp(14): CONCAT_INDIRECT()=CONCAT
+//H 00: t_1_003.cpp(18): CONCAT(CON, CAT), [t_1_003.cpp(13): CONCAT(a, b)=a ## b]
+//H 02: CONCAT
+//H 03: CONCAT
+//H 00: t_1_003.cpp(21): CONCAT(CON, CAT(1, 2)), [t_1_003.cpp(13): CONCAT(a, b)=a ## b]
+//H 02: CONCAT(1, 2)
+//H 03: CONCAT(1, 2)
+//H 00: t_1_003.cpp(24): CONCAT(CONCAT_, INDIRECT), [t_1_003.cpp(13): CONCAT(a, b)=a ## b]
+//H 02: CONCAT_INDIRECT
+//H 03: CONCAT_INDIRECT
+//H 00: t_1_003.cpp(24): CONCAT_INDIRECT(), [t_1_003.cpp(14): CONCAT_INDIRECT()=CONCAT]
+//H 02: CONCAT
+//H 03: CONCAT
+//H 00: t_1_003.cpp(14): CONCAT(1, 2), [t_1_003.cpp(13): CONCAT(a, b)=a ## b]
+//H 02: 12
+//H 03: 12
+//H 00: t_1_003.cpp(27): CONCAT(CONCAT_, INDIRECT()), [t_1_003.cpp(13): CONCAT(a, b)=a ## b]
+//H 02: CONCAT_INDIRECT()
+//H 00: t_1_003.cpp(27): CONCAT_INDIRECT(), [t_1_003.cpp(14): CONCAT_INDIRECT()=CONCAT]
+//H 02: CONCAT
+//H 03: CONCAT
+//H 03: CONCAT
+//H 00: t_1_003.cpp(31): CONCAT(1, CONCAT(2, 3)), [t_1_003.cpp(13): CONCAT(a, b)=a ## b]
+//H 02: 1CONCAT(2, 3)
+//H 03: 1CONCAT(2, 3)

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_004.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_004.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_004.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -30,3 +30,59 @@
 //R #line 32 "t_1_004.cpp"
 //R 1 CONCAT(2, 3)
 CONCAT(1, CONCAT(2, 3))
+
+//H 10: t_1_004.cpp(15): #define
+//H 08: t_1_004.cpp(15): CONCAT(a, b)=a ## b
+//H 10: t_1_004.cpp(16): #define
+//H 08: t_1_004.cpp(16): CONCAT_INDIRECT()=CONCAT
+//H 00: t_1_004.cpp(20): CONCAT(CON, CAT), [t_1_004.cpp(15): CONCAT(a, b)=a ## b]
+//H 02: CONCAT
+//H 03: CONCAT
+//H 00: t_1_004.cpp(23): CONCAT(CON, CAT(1, 2)), [t_1_004.cpp(15): CONCAT(a, b)=a ## b]
+//H 02: CONCAT(1, 2)
+//H 03: CONCAT(1, 2)
+//H 00: t_1_004.cpp(26): CONCAT(CONCAT_, INDIRECT), [t_1_004.cpp(15): CONCAT(a, b)=a ## b]
+//H 02: CONCAT_INDIRECT
+//H 03: CONCAT_INDIRECT
+//H 00: t_1_004.cpp(26): CONCAT_INDIRECT(), [t_1_004.cpp(16): CONCAT_INDIRECT()=CONCAT]
+//H 02: CONCAT
+//H 03: CONCAT
+//H 00: t_1_004.cpp(16): CONCAT(1, 2), [t_1_004.cpp(15): CONCAT(a, b)=a ## b]
+//H 02: 12
+//H 03: 12
+//H 00: t_1_004.cpp(29): CONCAT(CONCAT_, INDIRECT()), [t_1_004.cpp(15): CONCAT(a, b)=a ## b]
+//H 02: CONCAT_INDIRECT()
+//H 00: t_1_004.cpp(29): CONCAT_INDIRECT(), [t_1_004.cpp(16): CONCAT_INDIRECT()=CONCAT]
+//H 02: CONCAT
+//H 03: CONCAT
+//H 03: CONCAT
+//H 00: t_1_004.cpp(32): CONCAT(1, CONCAT(2, 3)), [t_1_004.cpp(15): CONCAT(a, b)=a ## b]
+//H 02: 1CONCAT(2, 3)
+//H 03: 1CONCAT(2, 3)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_005.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_005.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_005.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -15,3 +15,13 @@
 //R #line 16 "t_1_005.cpp"
 A()(123) //R 123
 
+//H 10: t_1_005.cpp(12): #define
+//H 08: t_1_005.cpp(12): A()=B
+//H 10: t_1_005.cpp(13): #define
+//H 08: t_1_005.cpp(13): B(x)=x
+//H 00: t_1_005.cpp(16): A(), [t_1_005.cpp(12): A()=B]
+//H 02: B
+//H 03: B
+//H 00: t_1_005.cpp(12): B(123), [t_1_005.cpp(13): B(x)=x]
+//H 02: 123
+//H 03: 123

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_006.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_006.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_006.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -23,3 +23,33 @@
 //R #line 25 "t_1_006.cpp"
 //R 1 CONCAT(2, 3)
 PRIMITIVE_CONCAT(1, CONCAT(2, 3))
+
+//H 10: t_1_006.cpp(13): #define
+//H 08: t_1_006.cpp(13): CONCAT(a, b)=PRIMITIVE_CONCAT(a, b)
+//H 10: t_1_006.cpp(14): #define
+//H 08: t_1_006.cpp(14): PRIMITIVE_CONCAT(a, b)=a ## b
+//H 00: t_1_006.cpp(18): CONCAT(1, PRIMITIVE_CONCAT(2, 3)), [t_1_006.cpp(13): CONCAT(a, b)=PRIMITIVE_CONCAT(a, b)]
+//H 00: t_1_006.cpp(18): PRIMITIVE_CONCAT(2, 3), [t_1_006.cpp(14): PRIMITIVE_CONCAT(a, b)=a ## b]
+//H 02: 23
+//H 03: 23
+//H 02: PRIMITIVE_CONCAT(1, 23)
+//H 00: t_1_006.cpp(13): PRIMITIVE_CONCAT(1, 23), [t_1_006.cpp(14): PRIMITIVE_CONCAT(a, b)=a ## b]
+//H 02: 123
+//H 03: 123
+//H 03: 123
+//H 00: t_1_006.cpp(21): CONCAT(1, CONCAT(2, 3)), [t_1_006.cpp(13): CONCAT(a, b)=PRIMITIVE_CONCAT(a, b)]
+//H 00: t_1_006.cpp(21): CONCAT(2, 3), [t_1_006.cpp(13): CONCAT(a, b)=PRIMITIVE_CONCAT(a, b)]
+//H 02: PRIMITIVE_CONCAT(2, 3)
+//H 00: t_1_006.cpp(13): PRIMITIVE_CONCAT(2, 3), [t_1_006.cpp(14): PRIMITIVE_CONCAT(a, b)=a ## b]
+//H 02: 23
+//H 03: 23
+//H 03: 23
+//H 02: PRIMITIVE_CONCAT(1, 23)
+//H 00: t_1_006.cpp(13): PRIMITIVE_CONCAT(1, 23), [t_1_006.cpp(14): PRIMITIVE_CONCAT(a, b)=a ## b]
+//H 02: 123
+//H 03: 123
+//H 03: 123
+//H 00: t_1_006.cpp(25): PRIMITIVE_CONCAT(1, CONCAT(2, 3)), [t_1_006.cpp(14): PRIMITIVE_CONCAT(a, b)=a ## b]
+//H 02: 1CONCAT(2, 3)
+//H 03: 1CONCAT(2, 3)
+

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_007.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_007.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_007.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -24,3 +24,32 @@
 //R #line 26 "t_1_007.cpp"
 //R 1 CONCAT(2, 3)
 PRIMITIVE_CONCAT(1, CONCAT(2, 3))
+
+//H 10: t_1_007.cpp(15): #define
+//H 08: t_1_007.cpp(15): CONCAT(a, b)=PRIMITIVE_CONCAT(a, b)
+//H 10: t_1_007.cpp(16): #define
+//H 08: t_1_007.cpp(16): PRIMITIVE_CONCAT(a, b)=a ## b
+//H 00: t_1_007.cpp(20): CONCAT(1, PRIMITIVE_CONCAT(2, 3)), [t_1_007.cpp(15): CONCAT(a, b)=PRIMITIVE_CONCAT(a, b)]
+//H 00: t_1_007.cpp(20): PRIMITIVE_CONCAT(2, 3), [t_1_007.cpp(16): PRIMITIVE_CONCAT(a, b)=a ## b]
+//H 02: 23
+//H 03: 23
+//H 02: PRIMITIVE_CONCAT(1, 23)
+//H 00: t_1_007.cpp(15): PRIMITIVE_CONCAT(1, 23), [t_1_007.cpp(16): PRIMITIVE_CONCAT(a, b)=a ## b]
+//H 02: 123
+//H 03: 123
+//H 03: 123
+//H 00: t_1_007.cpp(23): CONCAT(1, CONCAT(2, 3)), [t_1_007.cpp(15): CONCAT(a, b)=PRIMITIVE_CONCAT(a, b)]
+//H 00: t_1_007.cpp(23): CONCAT(2, 3), [t_1_007.cpp(15): CONCAT(a, b)=PRIMITIVE_CONCAT(a, b)]
+//H 02: PRIMITIVE_CONCAT(2, 3)
+//H 00: t_1_007.cpp(15): PRIMITIVE_CONCAT(2, 3), [t_1_007.cpp(16): PRIMITIVE_CONCAT(a, b)=a ## b]
+//H 02: 23
+//H 03: 23
+//H 03: 23
+//H 02: PRIMITIVE_CONCAT(1, 23)
+//H 00: t_1_007.cpp(15): PRIMITIVE_CONCAT(1, 23), [t_1_007.cpp(16): PRIMITIVE_CONCAT(a, b)=a ## b]
+//H 02: 123
+//H 03: 123
+//H 03: 123
+//H 00: t_1_007.cpp(26): PRIMITIVE_CONCAT(1, CONCAT(2, 3)), [t_1_007.cpp(16): PRIMITIVE_CONCAT(a, b)=a ## b]
+//H 02: 1CONCAT(2, 3)
+//H 03: 1CONCAT(2, 3)

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_008.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_008.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_008.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -38,3 +38,108 @@
 //R #line 40 "t_1_008.cpp"
 //R XY
 PARTIAL_CAT(3)( PARTIAL X, Y PARTIAL )
+
+//H 10: t_1_008.cpp(14): #define
+//H 08: t_1_008.cpp(14): CAT(a, b)=a ## b
+//H 10: t_1_008.cpp(16): #define
+//H 08: t_1_008.cpp(16): PARTIAL_CAT(i)=CAT(PARTIAL_CAT_, i)
+//H 10: t_1_008.cpp(18): #define
+//H 08: t_1_008.cpp(18): PARTIAL_CAT_0(a, b)=CAT(a, b)
+//H 10: t_1_008.cpp(19): #define
+//H 08: t_1_008.cpp(19): PARTIAL_CAT_1(a, b)=CAT(PARTIAL ## a, b)
+//H 10: t_1_008.cpp(20): #define
+//H 08: t_1_008.cpp(20): PARTIAL_CAT_2(a, b)=CAT(a, b ## PARTIAL)
+//H 10: t_1_008.cpp(21): #define
+//H 08: t_1_008.cpp(21): PARTIAL_CAT_3(a, b)=CAT(PARTIAL ## a, b ## PARTIAL)
+//H 10: t_1_008.cpp(23): #define
+//H 08: t_1_008.cpp(23): PARTIAL=
+//H 10: t_1_008.cpp(24): #define
+//H 08: t_1_008.cpp(24): PARTIALPARTIAL=
+//H 10: t_1_008.cpp(26): #define
+//H 08: t_1_008.cpp(26): X=Token1
+//H 10: t_1_008.cpp(27): #define
+//H 08: t_1_008.cpp(27): Y=Token2
+//H 00: t_1_008.cpp(31): PARTIAL_CAT(0), [t_1_008.cpp(16): PARTIAL_CAT(i)=CAT(PARTIAL_CAT_, i)]
+//H 02: CAT(PARTIAL_CAT_, 0)
+//H 00: t_1_008.cpp(16): CAT(PARTIAL_CAT_, 0), [t_1_008.cpp(14): CAT(a, b)=a ## b]
+//H 02: PARTIAL_CAT_0
+//H 03: PARTIAL_CAT_0
+//H 03: PARTIAL_CAT_0
+//H 00: t_1_008.cpp(16): PARTIAL_CAT_0( PARTIAL X, Y PARTIAL ), [t_1_008.cpp(18): PARTIAL_CAT_0(a, b)=CAT(a, b)]
+//H 01: t_1_008.cpp(23): PARTIAL
+//H 02:
+//H 03: _
+//H 01: t_1_008.cpp(26): X
+//H 02: Token1
+//H 03: Token1
+//H 01: t_1_008.cpp(27): Y
+//H 02: Token2
+//H 03: Token2
+//H 01: t_1_008.cpp(23): PARTIAL
+//H 02:
+//H 03: _
+//H 02: CAT(Token1, Token2)
+//H 00: t_1_008.cpp(18): CAT(Token1, Token2), [t_1_008.cpp(14): CAT(a, b)=a ## b]
+//H 02: Token1Token2
+//H 03: Token1Token2
+//H 03: Token1Token2
+//H 00: t_1_008.cpp(34): PARTIAL_CAT(1), [t_1_008.cpp(16): PARTIAL_CAT(i)=CAT(PARTIAL_CAT_, i)]
+//H 02: CAT(PARTIAL_CAT_, 1)
+//H 00: t_1_008.cpp(16): CAT(PARTIAL_CAT_, 1), [t_1_008.cpp(14): CAT(a, b)=a ## b]
+//H 02: PARTIAL_CAT_1
+//H 03: PARTIAL_CAT_1
+//H 03: PARTIAL_CAT_1
+//H 00: t_1_008.cpp(16): PARTIAL_CAT_1( PARTIAL X, Y PARTIAL ), [t_1_008.cpp(19): PARTIAL_CAT_1(a, b)=CAT(PARTIAL ## a, b)]
+//H 01: t_1_008.cpp(27): Y
+//H 02: Token2
+//H 03: Token2
+//H 01: t_1_008.cpp(23): PARTIAL
+//H 02:
+//H 03: _
+//H 02: CAT(PARTIALPARTIAL X, Token2)
+//H 00: t_1_008.cpp(19): CAT(PARTIALPARTIAL X, Token2), [t_1_008.cpp(14): CAT(a, b)=a ## b]
+//H 02: PARTIALPARTIAL XToken2
+//H 01: t_1_008.cpp(24): PARTIALPARTIAL
+//H 02:
+//H 03: _
+//H 03: XToken2
+//H 03: XToken2
+//H 00: t_1_008.cpp(37): PARTIAL_CAT(2), [t_1_008.cpp(16): PARTIAL_CAT(i)=CAT(PARTIAL_CAT_, i)]
+//H 02: CAT(PARTIAL_CAT_, 2)
+//H 00: t_1_008.cpp(16): CAT(PARTIAL_CAT_, 2), [t_1_008.cpp(14): CAT(a, b)=a ## b]
+//H 02: PARTIAL_CAT_2
+//H 03: PARTIAL_CAT_2
+//H 03: PARTIAL_CAT_2
+//H 00: t_1_008.cpp(16): PARTIAL_CAT_2( PARTIAL X, Y PARTIAL ), [t_1_008.cpp(20): PARTIAL_CAT_2(a, b)=CAT(a, b ## PARTIAL)]
+//H 01: t_1_008.cpp(23): PARTIAL
+//H 02:
+//H 03: _
+//H 01: t_1_008.cpp(26): X
+//H 02: Token1
+//H 03: Token1
+//H 02: CAT(Token1, Y PARTIALPARTIAL)
+//H 00: t_1_008.cpp(20): CAT(Token1, Y PARTIALPARTIAL), [t_1_008.cpp(14): CAT(a, b)=a ## b]
+//H 02: Token1Y PARTIALPARTIAL
+//H 01: t_1_008.cpp(24): PARTIALPARTIAL
+//H 02:
+//H 03: _
+//H 03: Token1Y_
+//H 03: Token1Y_
+//H 00: t_1_008.cpp(40): PARTIAL_CAT(3), [t_1_008.cpp(16): PARTIAL_CAT(i)=CAT(PARTIAL_CAT_, i)]
+//H 02: CAT(PARTIAL_CAT_, 3)
+//H 00: t_1_008.cpp(16): CAT(PARTIAL_CAT_, 3), [t_1_008.cpp(14): CAT(a, b)=a ## b]
+//H 02: PARTIAL_CAT_3
+//H 03: PARTIAL_CAT_3
+//H 03: PARTIAL_CAT_3
+//H 00: t_1_008.cpp(16): PARTIAL_CAT_3( PARTIAL X, Y PARTIAL ), [t_1_008.cpp(21): PARTIAL_CAT_3(a, b)=CAT(PARTIAL ## a, b ## PARTIAL)]
+//H 02: CAT(PARTIALPARTIAL X, Y PARTIALPARTIAL)
+//H 00: t_1_008.cpp(21): CAT(PARTIALPARTIAL X, Y PARTIALPARTIAL), [t_1_008.cpp(14): CAT(a, b)=a ## b]
+//H 02: PARTIALPARTIAL XY PARTIALPARTIAL
+//H 01: t_1_008.cpp(24): PARTIALPARTIAL
+//H 02:
+//H 03: _
+//H 01: t_1_008.cpp(24): PARTIALPARTIAL
+//H 02:
+//H 03: _
+//H 03: XY_
+//H 03: XY_

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_009.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_009.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_009.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -17,3 +17,13 @@
 TEST1()
 //E t_1_009.cpp(19): error: ill formed preprocessing operator: concat ('##')
 TEST2() // error
+
+//H 10: t_1_009.cpp(12): #define
+//H 08: t_1_009.cpp(12): TEST1()=A ## B
+//H 10: t_1_009.cpp(13): #define
+//H 08: t_1_009.cpp(13): TEST2()=## A
+//H 00: t_1_009.cpp(17): TEST1(), [t_1_009.cpp(12): TEST1()=A ## B]
+//H 02: AB
+//H 03: AB
+//H 00: t_1_009.cpp(19): TEST2(), [t_1_009.cpp(13): TEST2()=## A]
+//H 18: boost::wave::preprocess_exception

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_010.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_010.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_010.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -17,3 +17,13 @@
 TEST1()
 //E t_1_010.cpp(19): error: ill formed preprocessing operator: concat ('##')
 TEST2() // error
+
+//H 10: t_1_010.cpp(12): #define
+//H 08: t_1_010.cpp(12): TEST1()=A ## B
+//H 10: t_1_010.cpp(13): #define
+//H 08: t_1_010.cpp(13): TEST2()=A ##
+//H 00: t_1_010.cpp(17): TEST1(), [t_1_010.cpp(12): TEST1()=A ## B]
+//H 02: AB
+//H 03: AB
+//H 00: t_1_010.cpp(19): TEST2(), [t_1_010.cpp(13): TEST2()=A ##]
+//H 18: boost::wave::preprocess_exception

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_011.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_011.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_011.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -17,3 +17,16 @@
 //R #line 19 "t_1_011.cpp"
 //R XMACRO(*)
 CAT( MACRO(*) )
+
+//H 10: t_1_011.cpp(12): #define
+//H 08: t_1_011.cpp(12): MACRO()=
+//H 10: t_1_011.cpp(13): #define
+//H 08: t_1_011.cpp(13): ID(x)=
+//H 10: t_1_011.cpp(14): #define
+//H 08: t_1_011.cpp(14): CAT(x)=X ## x
+//H 00: t_1_011.cpp(16): ID( MACRO(*) ), [t_1_011.cpp(13): ID(x)=]
+//H 02:
+//H 03: _
+//H 00: t_1_011.cpp(19): CAT( MACRO(*) ), [t_1_011.cpp(14): CAT(x)=X ## x]
+//H 02: XMACRO(*)
+//H 03: XMACRO(*)

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_012.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_012.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_012.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -28,3 +28,30 @@
 //R #line 30 "t_1_012.cpp"
 //R 12
 EXPAND(CAT ARGS)
+
+//H 10: t_1_012.cpp(13): #define
+//H 08: t_1_012.cpp(13): CAT(a, b)=a ## b
+//H 10: t_1_012.cpp(14): #define
+//H 08: t_1_012.cpp(14): ARGS=(1, 2)
+//H 01: t_1_012.cpp(14): ARGS
+//H 02: (1, 2)
+//H 03: (1, 2)
+//H 10: t_1_012.cpp(20): #define
+//H 08: t_1_012.cpp(20): INVOKE(macro)=macro ARGS
+//H 00: t_1_012.cpp(24): INVOKE(CAT), [t_1_012.cpp(20): INVOKE(macro)=macro ARGS]
+//H 02: CAT ARGS
+//H 01: t_1_012.cpp(14): ARGS
+//H 02: (1, 2)
+//H 03: (1, 2)
+//H 03: CAT (1, 2)
+//H 10: t_1_012.cpp(26): #define
+//H 08: t_1_012.cpp(26): EXPAND(x)=x
+//H 00: t_1_012.cpp(30): EXPAND(CAT ARGS), [t_1_012.cpp(26): EXPAND(x)=x]
+//H 01: t_1_012.cpp(14): ARGS
+//H 02: (1, 2)
+//H 03: (1, 2)
+//H 02: CAT (1, 2)
+//H 00: t_1_012.cpp(30): CAT(1, 2), [t_1_012.cpp(13): CAT(a, b)=a ## b]
+//H 02: 12
+//H 03: 12
+//H 03: 12

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_013.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_013.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_013.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -34,3 +34,56 @@
 //R "vers2.hpp"
 //R "hello";
 //R "hello" ", world"
+
+//H 10: t_1_013.cpp(13): #define
+//H 08: t_1_013.cpp(13): str(s)=# s
+//H 10: t_1_013.cpp(14): #define
+//H 08: t_1_013.cpp(14): xstr(s)=str(s)
+//H 10: t_1_013.cpp(15): #define
+//H 08: t_1_013.cpp(15): debug(s, t)=printf("x" # s "= %d, x" # t "= %s", x ## s, x ## t)
+//H 10: t_1_013.cpp(17): #define
+//H 08: t_1_013.cpp(17): INCFILE(n)=vers ## n
+//H 10: t_1_013.cpp(18): #define
+//H 08: t_1_013.cpp(18): glue(a, b)=a ## b
+//H 10: t_1_013.cpp(19): #define
+//H 08: t_1_013.cpp(19): xglue(a, b)=glue(a, b)
+//H 10: t_1_013.cpp(20): #define
+//H 08: t_1_013.cpp(20): HIGHLOW="hello"
+//H 10: t_1_013.cpp(21): #define
+//H 08: t_1_013.cpp(21): LOW=LOW ", world"
+//H 00: t_1_013.cpp(22): debug(1, 2), [t_1_013.cpp(15): debug(s, t)=printf("x" # s "= %d, x" # t "= %s", x ## s, x ## t)]
+//H 02: printf("x" "1" "= %d, x" "2" "= %s", x1, x2)
+//H 03: printf("x" "1" "= %d, x" "2" "= %s", x1, x2)
+//H 00: t_1_013.cpp(23): str(strncmp("abc\0d?", "abc", '\4', "\u1234") == 0), [t_1_013.cpp(13): str(s)=# s]
+//H 02: "strncmp(\"abc\\0d\?\", \"abc\", '\\4', \"\\u1234\") == 0"
+//H 03: "strncmp(\"abc\\0d\?\", \"abc\", '\\4', \"\\u1234\") == 0"
+//H 00: t_1_013.cpp(24): str(: @\n), [t_1_013.cpp(13): str(s)=# s]
+//H 02: ": @\n"
+//H 03: ": @\n"
+//H 00: t_1_013.cpp(25): xstr(INCFILE(2).hpp), [t_1_013.cpp(14): xstr(s)=str(s)]
+//H 00: t_1_013.cpp(25): INCFILE(2), [t_1_013.cpp(17): INCFILE(n)=vers ## n]
+//H 02: vers2
+//H 03: vers2
+//H 02: str(vers2.hpp)
+//H 00: t_1_013.cpp(14): str(vers2.hpp), [t_1_013.cpp(13): str(s)=# s]
+//H 02: "vers2.hpp"
+//H 03: "vers2.hpp"
+//H 03: "vers2.hpp"
+//H 00: t_1_013.cpp(26): glue(HIGH, LOW), [t_1_013.cpp(18): glue(a, b)=a ## b]
+//H 02: HIGHLOW
+//H 01: t_1_013.cpp(20): HIGHLOW
+//H 02: "hello"
+//H 03: "hello"
+//H 03: "hello"
+//H 00: t_1_013.cpp(27): xglue(HIGH, LOW), [t_1_013.cpp(19): xglue(a, b)=glue(a, b)]
+//H 01: t_1_013.cpp(21): LOW
+//H 02: LOW ", world"
+//H 03: LOW ", world"
+//H 02: glue(HIGH, LOW ", world")
+//H 00: t_1_013.cpp(19): glue(HIGH, LOW ", world"), [t_1_013.cpp(18): glue(a, b)=a ## b]
+//H 02: HIGHLOW ", world"
+//H 01: t_1_013.cpp(20): HIGHLOW
+//H 02: "hello"
+//H 03: "hello"
+//H 03: "hello" ", world"
+//H 03: "hello" ", world"

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_014.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_014.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_014.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -30,6 +30,6 @@
 
 //R #line 27 "t_1_014.cpp"
 //R f(2 * (y+1)) + f(2 * (f(2 * (z[0])))) % f(2 * (0)) + t(1);
-//R f(2 * (2+ (3,4) -0,1))
+//R f(2 * (2+(3,4)-0,1))
 //E t_1_014.cpp(29): error: improperly terminated macro invocation or replacement-list terminates in partial macro expansion (not supported yet): missing ')'
 // should expand to: f(2 * g( ~ 5)) & f(2 * (0,1))^m(0,1);

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_015.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_015.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_015.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -14,3 +14,12 @@
 //R #line 16 "t_1_015.cpp"
 //R (4-f((4-f(1))))
 f(f(1))
+
+//H 10: t_1_015.cpp(12): #define
+//H 08: t_1_015.cpp(12): f(x)=(4-f(x))
+//H 00: t_1_015.cpp(16): f(f(1)), [t_1_015.cpp(12): f(x)=(4-f(x))]
+//H 00: t_1_015.cpp(16): f(1), [t_1_015.cpp(12): f(x)=(4-f(x))]
+//H 02: (4-f(1))
+//H 03: (4-f(1))
+//H 02: (4-f((4-f(1))))
+//H 03: (4-f((4-f(1))))

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_016.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_016.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_016.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -16,3 +16,14 @@
 //R #line 18 "t_1_016.cpp"
 //R Token1 Token2
 A()
+
+//H 10: t_1_016.cpp(13): #define
+//H 08: t_1_016.cpp(13): A=Token1 B
+//H 10: t_1_016.cpp(14): #define
+//H 08: t_1_016.cpp(14): B()=Token2
+//H 01: t_1_016.cpp(13): A
+//H 02: Token1 B
+//H 03: Token1 B
+//H 00: t_1_016.cpp(13): B(), [t_1_016.cpp(14): B()=Token2]
+//H 02: Token2
+//H 03: Token2

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_020.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_020.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_020.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -20,3 +20,15 @@
 //R B()
 A() // not 'anything'!
 
+//H 10: t_1_020.cpp(14): #define
+//H 08: t_1_020.cpp(14): NIL=
+//H 10: t_1_020.cpp(16): #define
+//H 08: t_1_020.cpp(16): A=B NIL
+//H 10: t_1_020.cpp(17): #define
+//H 08: t_1_020.cpp(17): B()=anything
+//H 01: t_1_020.cpp(16): A
+//H 02: B NIL
+//H 01: t_1_020.cpp(14): NIL
+//H 02:
+//H 03: _
+//H 03: B_

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_021.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_021.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_021.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -18,3 +18,24 @@
 //R #line 20 "t_1_021.cpp"
 //R 1 + 2 ...
 MACRO()()
+
+//H 10: t_1_021.cpp(13): #define
+//H 08: t_1_021.cpp(13): MACRO()=X + Y NEXT
+//H 10: t_1_021.cpp(14): #define
+//H 08: t_1_021.cpp(14): X=1
+//H 10: t_1_021.cpp(15): #define
+//H 08: t_1_021.cpp(15): Y=2
+//H 10: t_1_021.cpp(16): #define
+//H 08: t_1_021.cpp(16): NEXT()=...
+//H 00: t_1_021.cpp(20): MACRO(), [t_1_021.cpp(13): MACRO()=X + Y NEXT]
+//H 02: X + Y NEXT
+//H 01: t_1_021.cpp(14): X
+//H 02: 1
+//H 03: 1
+//H 01: t_1_021.cpp(15): Y
+//H 02: 2
+//H 03: 2
+//H 03: 1 + 2 NEXT
+//H 00: t_1_021.cpp(13): NEXT(), [t_1_021.cpp(16): NEXT()=...]
+//H 02: ...
+//H 03: ...

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_022.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_022.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_022.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -22,3 +22,15 @@
 //R 123
 MACRO(
 )
+
+//H 10: t_1_022.cpp(12): #define
+//H 08: t_1_022.cpp(12): MACRO()=123
+//H 00: t_1_022.cpp(16): MACRO(), [t_1_022.cpp(12): MACRO()=123]
+//H 02: 123
+//H 03: 123
+//H 00: t_1_022.cpp(19): MACRO(), [t_1_022.cpp(12): MACRO()=123]
+//H 02: 123
+//H 03: 123
+//H 00: t_1_022.cpp(23): MACRO(), [t_1_022.cpp(12): MACRO()=123]
+//H 02: 123
+//H 03: 123

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_023.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_023.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_023.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -18,3 +18,16 @@
 //R #line 20 "t_1_023.cpp"
 //R EAT_1...
 EAT(1)...
+
+//H 10: t_1_023.cpp(13): #define
+//H 08: t_1_023.cpp(13): PRIMITIVE_CAT(a, b)=a ## b
+//H 10: t_1_023.cpp(15): #define
+//H 08: t_1_023.cpp(15): EAT(n)=PRIMITIVE_CAT(EAT_, n)
+//H 10: t_1_023.cpp(16): #define
+//H 08: t_1_023.cpp(16): EAT_1(a)=
+//H 00: t_1_023.cpp(20): EAT(1), [t_1_023.cpp(15): EAT(n)=PRIMITIVE_CAT(EAT_, n)]
+//H 02: PRIMITIVE_CAT(EAT_, 1)
+//H 00: t_1_023.cpp(15): PRIMITIVE_CAT(EAT_, 1), [t_1_023.cpp(13): PRIMITIVE_CAT(a, b)=a ## b]
+//H 02: EAT_1
+//H 03: EAT_1
+//H 03: EAT_1

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_025.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_025.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_025.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -18,3 +18,18 @@
 //R #line 19 "t_1_025.cpp"
 SCAN(BUG) 1 2 3 4 5 //R 1 2 3 4 5
 
+//H 10: t_1_025.cpp(13): #define
+//H 08: t_1_025.cpp(13): SCAN(x)=x
+//H 10: t_1_025.cpp(15): #define
+//H 08: t_1_025.cpp(15): BUG=BUG_2
+//H 10: t_1_025.cpp(16): #define
+//H 08: t_1_025.cpp(16): BUG_2=
+//H 00: t_1_025.cpp(19): SCAN(BUG), [t_1_025.cpp(13): SCAN(x)=x]
+//H 01: t_1_025.cpp(15): BUG
+//H 02: BUG_2
+//H 01: t_1_025.cpp(16): BUG_2
+//H 02:
+//H 03: _
+//H 03: _
+//H 02:
+//H 03: _

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_026.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_026.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_026.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -14,3 +14,6 @@
            // ^ ^ this is illegal
 
 MACRO(1, 2)
+
+//H 10: t_1_026.cpp(13): #define
+//H 18: boost::wave::macro_handling_exception

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_029.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_029.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_029.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -21,3 +21,24 @@
 //R
 CAT4_1(1, 0, 0, 2) //R 1002
 CAT4_2(1, 0, 0, 2) //R 1002
+
+//H 10: t_1_029.cpp(12): #define
+//H 08: t_1_029.cpp(12): CAT3_1(a, b, c)=a##b##c
+//H 10: t_1_029.cpp(13): #define
+//H 08: t_1_029.cpp(13): CAT3_2(a, b, c)=a ## b ## c
+//H 10: t_1_029.cpp(15): #define
+//H 08: t_1_029.cpp(15): CAT4_1(a, b, c, d)=a##b##c##d
+//H 10: t_1_029.cpp(16): #define
+//H 08: t_1_029.cpp(16): CAT4_2(a, b, c, d)=a ## b ## c ## d
+//H 00: t_1_029.cpp(19): CAT3_1(1, 0, 0), [t_1_029.cpp(12): CAT3_1(a, b, c)=a##b##c]
+//H 02: 100
+//H 03: 100
+//H 00: t_1_029.cpp(20): CAT3_2(1, 0, 0), [t_1_029.cpp(13): CAT3_2(a, b, c)=a ## b ## c]
+//H 02: 100
+//H 03: 100
+//H 00: t_1_029.cpp(22): CAT4_1(1, 0, 0, 2), [t_1_029.cpp(15): CAT4_1(a, b, c, d)=a##b##c##d]
+//H 02: 1002
+//H 03: 1002
+//H 00: t_1_029.cpp(23): CAT4_2(1, 0, 0, 2), [t_1_029.cpp(16): CAT4_2(a, b, c, d)=a ## b ## c ## d]
+//H 02: 1002
+//H 03: 1002

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_030.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_030.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_030.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -15,3 +15,19 @@
 
 //R #line 17 "t_1_030.cpp"
 SCAN( MACRO EMPTY() )(1) //R (1)
+
+//H 10: t_1_030.cpp(12): #define
+//H 08: t_1_030.cpp(12): EMPTY()=
+//H 10: t_1_030.cpp(13): #define
+//H 08: t_1_030.cpp(13): SCAN(x)=x
+//H 10: t_1_030.cpp(14): #define
+//H 08: t_1_030.cpp(14): MACRO(x)=(x)
+//H 00: t_1_030.cpp(17): SCAN( MACRO EMPTY() ), [t_1_030.cpp(13): SCAN(x)=x]
+//H 00: t_1_030.cpp(17): EMPTY(), [t_1_030.cpp(12): EMPTY()=]
+//H 02:
+//H 03: _
+//H 02: MACRO
+//H 03: MACRO
+//H 00: t_1_030.cpp(17): MACRO(1), [t_1_030.cpp(14): MACRO(x)=(x)]
+//H 02: (1)
+//H 03: (1)

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_031.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_031.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_031.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -16,3 +16,12 @@
 //R #line 17 "t_1_031.cpp"
 is_empty( + ) //R is_empty_+other
 is_empty( +text ) //R is_empty_+textother
+
+//H 10: t_1_031.cpp(14): #define
+//H 08: t_1_031.cpp(14): is_empty(...)=is_empty_ ## __VA_ARGS__ ## other
+//H 00: t_1_031.cpp(17): is_empty( + ), [t_1_031.cpp(14): is_empty(...)=is_empty_ ## __VA_ARGS__ ## other]
+//H 02: is_empty_+other
+//H 03: is_empty_+other
+//H 00: t_1_031.cpp(18): is_empty( +text ), [t_1_031.cpp(14): is_empty(...)=is_empty_ ## __VA_ARGS__ ## other]
+//H 02: is_empty_+textother
+//H 03: is_empty_+textother

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_033.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_033.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_033.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -18,3 +18,18 @@
 STR(1,2,3) //R "1,2,3"
 STR(1 , 2 , 3) //R "1 , 2 , 3"
 STR( 1 , 2 , 3 ) //R "1 , 2 , 3"
+
+//H 10: t_1_033.cpp(14): #define
+//H 08: t_1_033.cpp(14): STR(...)=#__VA_ARGS__
+//H 00: t_1_033.cpp(17): STR(1, 2, 3), [t_1_033.cpp(14): STR(...)=#__VA_ARGS__]
+//H 02: "1, 2, 3"
+//H 03: "1, 2, 3"
+//H 00: t_1_033.cpp(18): STR(1,2,3), [t_1_033.cpp(14): STR(...)=#__VA_ARGS__]
+//H 02: "1,2,3"
+//H 03: "1,2,3"
+//H 00: t_1_033.cpp(19): STR(1 , 2 , 3), [t_1_033.cpp(14): STR(...)=#__VA_ARGS__]
+//H 02: "1 , 2 , 3"
+//H 03: "1 , 2 , 3"
+//H 00: t_1_033.cpp(20): STR( 1 , 2 , 3 ), [t_1_033.cpp(14): STR(...)=#__VA_ARGS__]
+//H 02: "1 , 2 , 3"
+//H 03: "1 , 2 , 3"

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_034.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_034.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_034.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -19,3 +19,21 @@
 MACRO1(1,) //R 1 ->
 MACRO2(1, 2) //R 1,2
 STR() //R ""
+
+//H 10: t_1_034.cpp(14): #define
+//H 08: t_1_034.cpp(14): MACRO1(x, ...)=x -> __VA_ARGS__
+//H 10: t_1_034.cpp(15): #define
+//H 08: t_1_034.cpp(15): MACRO2(...)=__VA_ARGS__
+//H 10: t_1_034.cpp(16): #define
+//H 08: t_1_034.cpp(16): STR(...)=#__VA_ARGS__
+//H 00: t_1_034.cpp(19): MACRO1(1,§), [t_1_034.cpp(14): MACRO1(x, ...)=x -> __VA_ARGS__]
+//H 02: 1 -> §
+//H 03: 1 ->
+//H 00: t_1_034.cpp(20): MACRO2(1, 2), [t_1_034.cpp(15): MACRO2(...)=__VA_ARGS__]
+//H 02: 1,2
+//H 03: 1,2
+//H 00: t_1_034.cpp(21): STR(§), [t_1_034.cpp(16): STR(...)=#__VA_ARGS__]
+//H 02: ""
+//H 03: ""
+
+// boostinspect:noascii this file needs to contain non-ASCII characters

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_035.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_035.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_035.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -22,3 +22,28 @@
 PASTE2(1, ,3,4) //R 134
 PASTE2(1,,3,4) //R 134
 PASTE2(1, , , 4) //R 14
+
+//H 10: t_1_035.cpp(14): #define
+//H 08: t_1_035.cpp(14): PASTE1(a, b, c, d)=a ## b ## c ## d
+//H 10: t_1_035.cpp(15): #define
+//H 08: t_1_035.cpp(15): PASTE2(a, b, c, d)=a##b##c##d
+//H 00: t_1_035.cpp(18): PASTE1(1, §,3,4), [t_1_035.cpp(14): PASTE1(a, b, c, d)=a ## b ## c ## d]
+//H 02: 134
+//H 03: 134
+//H 00: t_1_035.cpp(19): PASTE1(1,§,3,4), [t_1_035.cpp(14): PASTE1(a, b, c, d)=a ## b ## c ## d]
+//H 02: 134
+//H 03: 134
+//H 00: t_1_035.cpp(20): PASTE1(1, §, §, 4), [t_1_035.cpp(14): PASTE1(a, b, c, d)=a ## b ## c ## d]
+//H 02: 14
+//H 03: 14
+//H 00: t_1_035.cpp(22): PASTE2(1, §,3,4), [t_1_035.cpp(15): PASTE2(a, b, c, d)=a##b##c##d]
+//H 02: 134
+//H 03: 134
+//H 00: t_1_035.cpp(23): PASTE2(1,§,3,4), [t_1_035.cpp(15): PASTE2(a, b, c, d)=a##b##c##d]
+//H 02: 134
+//H 03: 134
+//H 00: t_1_035.cpp(24): PASTE2(1, §, §, 4), [t_1_035.cpp(15): PASTE2(a, b, c, d)=a##b##c##d]
+//H 02: 14
+//H 03: 14
+
+// boostinspect:noascii this file needs to contain non-ASCII characters

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_036.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_036.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_036.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -13,3 +13,9 @@
 
 //R #line 15 "t_1_036.cpp"
 OBJECT //R ab
+
+//H 10: t_1_036.cpp(12): #define
+//H 08: t_1_036.cpp(12): OBJECT=a ## b
+//H 01: t_1_036.cpp(12): OBJECT
+//H 02: ab
+//H 03: ab

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_037.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_037.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_1_037.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -14,3 +14,9 @@
 //R // bool;
 #define _VARIANT_BOOL /##/
 _VARIANT_BOOL bool;
+
+//H 10: t_1_037.cpp(15): #define
+//H 08: t_1_037.cpp(15): _VARIANT_BOOL=/##/
+//H 01: t_1_037.cpp(15): _VARIANT_BOOL
+//H 02: //
+//H 03: //

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_001.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_001.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_001.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -16,3 +16,17 @@
 #define WARNING1 This is a
 #define WARNING2 warning
 #warning WARNING1 WARNING2
+
+//H 10: t_2_001.cpp(16): #define
+//H 08: t_2_001.cpp(16): WARNING1=This is a
+//H 10: t_2_001.cpp(17): #define
+//H 08: t_2_001.cpp(17): WARNING2=warning
+//H 10: t_2_001.cpp(18): #warning
+//H 01: t_2_001.cpp(16): WARNING1
+//H 02: This is a
+//H 03: This is a
+//H 01: t_2_001.cpp(17): WARNING2
+//H 02: warning
+//H 03: warning
+//H 15: WARNING1 WARNING2
+//H 18: boost::wave::preprocess_exception

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_002.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_002.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_002.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -14,3 +14,9 @@
 //R
 //E a_nonexisting_file.cpp(8): fatal error: encountered #error directive or #pragma wave stop(): This error should occur at line 8 of "a_nonexisting_file.cpp"
 #error This error should occur at line 8 of "a_nonexisting_file.cpp"
+
+//H 10: t_2_002.cpp(12): #line
+//H 17: 5 "a_nonexisting_file.cpp" (5, "a_nonexisting_file.cpp")
+//H 10: a_nonexisting_file.cpp(8): #error
+//H 16: This error should occur at line 8 of "a_nonexisting_file.cpp"
+//H 18: boost::wave::preprocess_exception

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_003.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_003.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_003.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -14,3 +14,9 @@
 //R
 //E t_2_003.cpp(8): fatal error: encountered #error directive or #pragma wave stop(): This error should occur at line 8 of "t_2_003.cpp"
 #error This error should occur at line 8 of "t_2_003.cpp"
+
+//H 10: t_2_003.cpp(12): #line
+//H 17: 5 (5, "")
+//H 10: t_2_003.cpp(8): #error
+//H 16: This error should occur at line 8 of "t_2_003.cpp"
+//H 18: boost::wave::preprocess_exception

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_004.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_004.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_004.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -16,3 +16,19 @@
 //R
 //E a_nonexisting_file.cpp(8): fatal error: encountered #error directive or #pragma wave stop(): This error should occur at line 8 of "a_nonexisting_file.cpp"
 #error This error should occur at line 8 of "a_nonexisting_file.cpp"
+
+//H 10: t_2_004.cpp(12): #define
+//H 08: t_2_004.cpp(12): LINE_NO=5
+//H 10: t_2_004.cpp(13): #define
+//H 08: t_2_004.cpp(13): FILE_NAME="a_nonexisting_file.cpp"
+//H 10: t_2_004.cpp(14): #line
+//H 01: t_2_004.cpp(12): LINE_NO
+//H 02: 5
+//H 03: 5
+//H 01: t_2_004.cpp(13): FILE_NAME
+//H 02: "a_nonexisting_file.cpp"
+//H 03: "a_nonexisting_file.cpp"
+//H 17: 5 "a_nonexisting_file.cpp" (5, "a_nonexisting_file.cpp")
+//H 10: a_nonexisting_file.cpp(8): #error
+//H 16: This error should occur at line 8 of "a_nonexisting_file.cpp"
+//H 18: boost::wave::preprocess_exception

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_005.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_005.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_005.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -12,3 +12,5 @@
 //R
 //E t_2_005.cpp(14): error: ill formed preprocessor directive: this_is_a_unknown_pp_directive
 #this_is_a_unknown_pp_directive with some parameter
+
+//H 18: boost::wave::preprocess_exception

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_006.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_006.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_006.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -23,3 +23,16 @@
 //R #line 25 "t_2_006.cpp"
 //R #pragma STDC preprocessed pragma body
 #pragma STDC PRAGMA_BODY
+
+//H 10: t_2_006.cpp(12): #define
+//H 08: t_2_006.cpp(12): PRAGMA_BODY=preprocessed pragma body
+//H 10: t_2_006.cpp(16): #pragma
+//H 10: t_2_006.cpp(19): #pragma
+//H 01: t_2_006.cpp(12): PRAGMA_BODY
+//H 02: preprocessed pragma body
+//H 03: preprocessed pragma body
+//H 10: t_2_006.cpp(22): #pragma
+//H 10: t_2_006.cpp(25): #pragma
+//H 01: t_2_006.cpp(12): PRAGMA_BODY
+//H 02: preprocessed pragma body
+//H 03: preprocessed pragma body

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_007.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_007.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_007.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -10,7 +10,7 @@
 //O --c99
 
 // Tests correctness of macro expansion inside #pragma directives
-// Note: in C99 mode the STDC prefix in pragmas supresses macro expansion
+// Note: in C99 mode the STDC prefix in pragma's suppresses macro expansion
 
 #define PRAGMA_BODY preprocessed pragma body
 
@@ -26,3 +26,13 @@
 //R #line 28 "t_2_007.cpp"
 //R #pragma STDC PRAGMA_BODY
 #pragma STDC PRAGMA_BODY
+
+//H 10: t_2_007.cpp(15): #define
+//H 08: t_2_007.cpp(15): PRAGMA_BODY=preprocessed pragma body
+//H 10: t_2_007.cpp(19): #pragma
+//H 10: t_2_007.cpp(22): #pragma
+//H 01: t_2_007.cpp(15): PRAGMA_BODY
+//H 02: preprocessed pragma body
+//H 03: preprocessed pragma body
+//H 10: t_2_007.cpp(25): #pragma
+//H 10: t_2_007.cpp(28): #pragma

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_008.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_008.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_008.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -7,9 +7,18 @@
     LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
 
-// Tests #include statements with macros as argmuments
+// Tests #include statements with macros as arguments
 
 //R
 //E t_2_008.cpp(15): error: could not find include file: some_include_file.h
 #define INCLUDE_FILE "some_include_file.h"
 #include INCLUDE_FILE
+
+//H 10: t_2_008.cpp(14): #define
+//H 08: t_2_008.cpp(14): INCLUDE_FILE="some_include_file.h"
+//H 10: t_2_008.cpp(15): #include
+//H 01: t_2_008.cpp(14): INCLUDE_FILE
+//H 02: "some_include_file.h"
+//H 03: "some_include_file.h"
+//H 04: "some_include_file.h"
+//H 18: boost::wave::preprocess_exception

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_009.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_009.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_009.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -7,9 +7,8 @@
     LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
 
-// The result of macro expansion must be
-// retokenized to find header-name tokens
-// of either <file> or "file"
+// The result of macro expansion must be re-tokenized to find header-name
+// tokens of either <file> or "file"
 
 //O -S.
 
@@ -19,14 +18,38 @@
 #define SYSTEM_HEADER <t_2_009.cpp>
 #define USER_HEADER "t_2_009.cpp"
 
-//R #line 24 "t_2_009.cpp"
+//R #line 23 "t_2_009.cpp"
 //R including <t_2_009.cpp>
 including <t_2_009.cpp>
 #include SYSTEM_HEADER
 
-//R #line 29 "t_2_009.cpp"
+//R #line 28 "t_2_009.cpp"
 //R including "t_2_009.cpp"
 including "t_2_009.cpp"
 #include USER_HEADER
 
 #endif // FILE_002_009_CPP
+
+//H 10: t_2_009.cpp(15): #if
+//H 11: t_2_009.cpp(15): #if !defined(FILE_002_009_CPP) : 1
+//H 10: t_2_009.cpp(16): #define
+//H 08: t_2_009.cpp(16): FILE_002_009_CPP=
+//H 10: t_2_009.cpp(18): #define
+//H 08: t_2_009.cpp(18): SYSTEM_HEADER=<t_2_009.cpp>
+//H 10: t_2_009.cpp(19): #define
+//H 08: t_2_009.cpp(19): USER_HEADER="t_2_009.cpp"
+//H 10: t_2_009.cpp(24): #include
+//H 01: t_2_009.cpp(18): SYSTEM_HEADER
+//H 02: <t_2_009.cpp>
+//H 03: <t_2_009.cpp>
+//H 04: <t_2_009.cpp>
+//H 05: $B(t_2_009.cpp) ($B(t_2_009.cpp))
+//H 10: t_2_009.cpp(15): #if
+//H 11: t_2_009.cpp(15): #if !defined(FILE_002_009_CPP) : 0
+//H 06:
+//H 10: t_2_009.cpp(29): #include
+//H 01: t_2_009.cpp(19): USER_HEADER
+//H 02: "t_2_009.cpp"
+//H 03: "t_2_009.cpp"
+//H 04: "t_2_009.cpp"
+//H 10: t_2_009.cpp(31): #endif

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_010.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_010.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_010.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -9,7 +9,13 @@
 
 // Tests error reporting for missing #endif
 
-//E t_2_010.cpp(16): error: detected at least one missing #endif directive
+//E t_2_010.cpp(22): error: detected at least one missing #endif directive
 #if 1
 #if 0
 #endif
+
+//H 10: t_2_010.cpp(13): #if
+//H 11: t_2_010.cpp(13): #if 1: 1
+//H 10: t_2_010.cpp(14): #if
+//H 11: t_2_010.cpp(14): #if 0: 0
+//H 18: boost::wave::preprocess_exception

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_011.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_011.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_011.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -13,3 +13,9 @@
 #if 1
 #endif
 #endif
+
+//H 10: t_2_011.cpp(13): #if
+//H 11: t_2_011.cpp(13): #if 1: 1
+//H 10: t_2_011.cpp(14): #endif
+//H 10: t_2_011.cpp(15): #endif
+//H 18: boost::wave::preprocess_exception

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_012.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_012.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_012.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -12,3 +12,6 @@
 //E t_2_012.cpp(13): error: the #if for this directive is missing: #else
 #else
 #endif
+
+//H 10: t_2_012.cpp(13): #else
+//H 18: boost::wave::preprocess_exception

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_013.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_013.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_013.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -9,7 +9,11 @@
 
 // Tests error reporting for missing #if
 
-//E t_2_013.cpp(16): error: detected at least one missing #endif directive
+//E t_2_013.cpp(20): error: detected at least one missing #endif directive
 #if 1
 #else
 
+//H 10: t_2_013.cpp(13): #if
+//H 11: t_2_013.cpp(13): #if 1: 1
+//H 10: t_2_013.cpp(14): #else
+//H 18: boost::wave::preprocess_exception

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_014.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_014.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_014.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -81,3 +81,31 @@
 #else
 false
 #endif
+
+//H 10: t_2_014.cpp(15): #if
+//H 11: t_2_014.cpp(15): #if compl 1: 1
+//H 10: t_2_014.cpp(17): #else
+//H 10: t_2_014.cpp(23): #if
+//H 11: t_2_014.cpp(23): #if not 1: 0
+//H 10: t_2_014.cpp(27): #endif
+//H 10: t_2_014.cpp(31): #if
+//H 11: t_2_014.cpp(31): #if 1 or 2: 1
+//H 10: t_2_014.cpp(33): #else
+//H 10: t_2_014.cpp(39): #if
+//H 11: t_2_014.cpp(39): #if 1 and 2: 1
+//H 10: t_2_014.cpp(41): #else
+//H 10: t_2_014.cpp(47): #if
+//H 11: t_2_014.cpp(47): #if not 1: 0
+//H 10: t_2_014.cpp(51): #endif
+//H 10: t_2_014.cpp(55): #if
+//H 11: t_2_014.cpp(55): #if 1 xor 2: 1
+//H 10: t_2_014.cpp(57): #else
+//H 10: t_2_014.cpp(63): #if
+//H 11: t_2_014.cpp(63): #if 1 bitand 2: 0
+//H 10: t_2_014.cpp(67): #endif
+//H 10: t_2_014.cpp(71): #if
+//H 11: t_2_014.cpp(71): #if 1 bitor 2: 1
+//H 10: t_2_014.cpp(73): #else
+//H 10: t_2_014.cpp(79): #if
+//H 11: t_2_014.cpp(79): #if 1 not_eq 2: 1
+//H 10: t_2_014.cpp(81): #else

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_015.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_015.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_015.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -7,7 +7,7 @@
     LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
 
-// Tests, whether #if works when the expression is surrounded by paranthesis
+// Tests, whether #if works when the expression is surrounded by parenthesis
 
 #define WINVER 0x0500
 
@@ -16,3 +16,12 @@
 #if(WINVER >= 0x0500)
 true
 #endif
+
+//H 10: t_2_015.cpp(12): #define
+//H 08: t_2_015.cpp(12): WINVER=0x0500
+//H 10: t_2_015.cpp(16): #if
+//H 01: t_2_015.cpp(12): WINVER
+//H 02: 0x0500
+//H 03: 0x0500
+//H 11: t_2_015.cpp(16): #if (WINVER >= 0x0500): 1
+//H 10: t_2_015.cpp(18): #endif

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_016.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_016.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_016.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -17,3 +17,10 @@
 #if defined (_MSC_VER) && (_MSC_VER >= 1020)
 true
 #endif
+
+//H 10: t_2_016.cpp(17): #if
+//H 01: <command line>(1): _MSC_VER
+//H 02: 1200
+//H 03: 1200
+//H 11: t_2_016.cpp(17): #if defined (_MSC_VER) && (_MSC_VER >= 1020): 1
+//H 10: t_2_016.cpp(19): #endif

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_017.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_017.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_2_017.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -22,3 +22,15 @@
 //R #line 24 "t_2_017.cpp"
 //R file t_2_017.cpp
 file t_2_017.cpp
+
+//H 10: t_2_017.cpp(13): #if
+//H 11: t_2_017.cpp(13): #if !defined(FILE_002_017_CPP) : 1
+//H 10: t_2_017.cpp(14): #define
+//H 08: t_2_017.cpp(14): FILE_002_017_CPP=
+//H 10: t_2_017.cpp(16): #include
+//H 04: "$P(t_2_017.cpp)"
+//H 05: $B(t_2_017.cpp) ($B(t_2_017.cpp))
+//H 10: t_2_017.cpp(13): #if
+//H 11: t_2_017.cpp(13): #if !defined(FILE_002_017_CPP) : 0
+//H 06:
+//H 10: t_2_017.cpp(18): #endif

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_3_001.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_3_001.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_3_001.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -12,3 +12,6 @@
 //R
 //E t_3_001.cpp(14): warning: #undef may not be used on this predefined name: __cplusplus
 #undef __cplusplus // should emit a warning
+
+//H 10: t_3_001.cpp(14): #undef
+//H 18: boost::wave::preprocess_exception

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_3_002.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_3_002.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_3_002.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -15,7 +15,7 @@
 __cplusplus //R 199711L
 __STDC_HOSTED__ //R __STDC_HOSTED__
 __LINE__ //R 17
-__FILE__ //R "$F"
+__FILE__ //R "$P"
 __BASE_FILE__ //R "$F"
 __WAVE_HAS_VARIADICS__ //R __WAVE_HAS_VARIADICS__
 __INCLUDE_LEVEL__ //R 0
@@ -31,3 +31,20 @@
 __FILE__ //R "test.cpp"
 __BASE_FILE__ //R "$F"
 
+//H 01: <built-in>(1): __STDC__
+//H 02: 1
+//H 03: 1
+//H 01: <built-in>(1): __cplusplus
+//H 02: 199711L
+//H 03: 199711L
+//H 01: <built-in>(1): __BASE_FILE__
+//H 02: "$F"
+//H 03: "$F"
+//H 10: t_3_002.cpp(23): #line
+//H 17: 50 "test.cpp" (50, "test.cpp")
+//H 01: <built-in>(1): __BASE_FILE__
+//H 02: "$F"
+//H 03: "$F"
+//H 01: <built-in>(1): __BASE_FILE__
+//H 02: "$F"
+//H 03: "$F"

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_3_003.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_3_003.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_3_003.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -17,7 +17,7 @@
 __cplusplus //R 199711L
 __STDC_HOSTED__ //R __STDC_HOSTED__
 __LINE__ //R 19
-__FILE__ //R "$F"
+__FILE__ //R "$P"
 __BASE_FILE__ //R "$F"
 __WAVE_HAS_VARIADICS__ //R 1
 __INCLUDE_LEVEL__ //R 0
@@ -33,3 +33,23 @@
 __FILE__ //R "test.cpp"
 __BASE_FILE__ //R "$F"
 
+//H 01: <built-in>(1): __STDC__
+//H 02: 1
+//H 03: 1
+//H 01: <built-in>(1): __cplusplus
+//H 02: 199711L
+//H 03: 199711L
+//H 01: <built-in>(1): __BASE_FILE__
+//H 02: "$F"
+//H 03: "$F"
+//H 01: <built-in>(1): __WAVE_HAS_VARIADICS__
+//H 02: 1
+//H 03: 1
+//H 10: t_3_003.cpp(25): #line
+//H 17: 50 "test.cpp" (50, "test.cpp")
+//H 01: <built-in>(1): __BASE_FILE__
+//H 02: "$F"
+//H 03: "$F"
+//H 01: <built-in>(1): __BASE_FILE__
+//H 02: "$F"
+//H 03: "$F"

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_3_004.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_3_004.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_3_004.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -17,7 +17,7 @@
 __cplusplus //R __cplusplus
 __STDC_HOSTED__ //R 0
 __LINE__ //R 19
-__FILE__ //R "$F"
+__FILE__ //R "$P"
 __BASE_FILE__ //R "$F"
 __WAVE_HAS_VARIADICS__ //R 1
 __INCLUDE_LEVEL__ //R 0
@@ -33,3 +33,26 @@
 __FILE__ //R "test.cpp"
 __BASE_FILE__ //R "$F"
 
+//H 01: <built-in>(1): __STDC__
+//H 02: 1
+//H 03: 1
+//H 01: <built-in>(1): __STDC_VERSION__
+//H 02: 199901L
+//H 03: 199901L
+//H 01: <built-in>(1): __STDC_HOSTED__
+//H 02: 0
+//H 03: 0
+//H 01: <built-in>(1): __BASE_FILE__
+//H 02: "$F"
+//H 03: "$F"
+//H 01: <built-in>(1): __WAVE_HAS_VARIADICS__
+//H 02: 1
+//H 03: 1
+//H 10: t_3_004.cpp(25): #line
+//H 17: 50 "test.cpp" (50, "test.cpp")
+//H 01: <built-in>(1): __BASE_FILE__
+//H 02: "$F"
+//H 03: "$F"
+//H 01: <built-in>(1): __BASE_FILE__
+//H 02: "$F"
+//H 03: "$F"

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_4_001.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_4_001.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_4_001.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -16,3 +16,7 @@
 #else
 false
 #endif
+
+//H 10: t_4_001.cpp(14): #if
+//H 11: t_4_001.cpp(14): #if 1 / 10 == 0: 1
+//H 10: t_4_001.cpp(16): #else

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_4_002.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_4_002.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_4_002.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -17,3 +17,12 @@
 #if !C
 true
 #endif
+
+//H 10: t_4_002.cpp(13): #define
+//H 08: t_4_002.cpp(13): C=C
+//H 10: t_4_002.cpp(17): #if
+//H 01: t_4_002.cpp(13): C
+//H 02: C
+//H 03: C
+//H 11: t_4_002.cpp(17): #if !C: 1
+//H 10: t_4_002.cpp(19): #endif

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_4_004.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_4_004.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_4_004.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -33,3 +33,29 @@
 #else
 false
 #endif
+
+//H 10: t_4_004.cpp(12): #define
+//H 08: t_4_004.cpp(12): USHRT_MAX=0xffffU
+//H 10: t_4_004.cpp(15): # if
+//H 11: t_4_004.cpp(15): # if !defined (SIZEOF_SHORT): 1
+//H 10: t_4_004.cpp(16): # if
+//H 01: t_4_004.cpp(12): USHRT_MAX
+//H 02: 0xffffU
+//H 03: 0xffffU
+//H 11: t_4_004.cpp(16): # if (USHRT_MAX) == 255U: 0
+//H 10: t_4_004.cpp(18): # elif
+//H 01: t_4_004.cpp(12): USHRT_MAX
+//H 02: 0xffffU
+//H 03: 0xffffU
+//H 11: t_4_004.cpp(18): # elif (USHRT_MAX) == 65535U: 1
+//H 10: t_4_004.cpp(19): #define
+//H 08: t_4_004.cpp(19): SIZEOF_SHORT=2
+//H 10: t_4_004.cpp(20): # elif
+//H 10: t_4_004.cpp(22): # elif
+//H 10: t_4_004.cpp(27): # endif
+//H 10: t_4_004.cpp(31): #if
+//H 01: t_4_004.cpp(19): SIZEOF_SHORT
+//H 02: 2
+//H 03: 2
+//H 11: t_4_004.cpp(31): #if SIZEOF_SHORT == 2: 1
+//H 10: t_4_004.cpp(33): #else

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_5_030.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_5_030.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_5_030.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -15,7 +15,7 @@
 
 // Tests whether rescanning of a macro replace any macro call in the replacement
 // text after substitution of parameters by pre-expanded-arguments. This
-// re-examination may involve the succeding sequences from the source
+// re-examination may involve the succeeding sequences from the source
 // file (what a queer thing!).
 
 // Note: The tests 27.4 and 27.5 are currently disabled because of Wave's
@@ -57,7 +57,7 @@
 // 27.5: Queer thing.
 // R #line 28 "t_5_030.cpp"
 //#define HEAD SUB(
-//HEAD a,b ) // R
+// HEAD a,b ) // R
 
 // 27.6: Recursive macro.
 //R #line 66 "t_5_030.cpp"

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_6_023.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_6_023.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_6_023.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -16,7 +16,7 @@
 // Tests error reporting: Trailing junk of #else, #endif.
 
 // 16.1: Trailing junk of #else.
-//E t_6_023.cpp(22): error: ill formed preprocessor directive: #else
+//E t_6_023.cpp(22): error: ill formed preprocessor directive: #else MACRO_0
 #define MACRO_0 0
 #if MACRO_0
 #else MACRO_0

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_6_063.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_6_063.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_6_063.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -22,6 +22,11 @@
 //R #line 19 "t_6_063.hpp"
 //R int dummy = 0;
 
+//H 10: t_6_063.cpp(20): #include "t_6_063.hpp"
+//H 04: "t_6_063.hpp"
+//H 05: $B(t_6_063.hpp) ($B(t_6_063.hpp))
+//H 18: boost::wave::preprocess_exception
+
 /*-
  * Copyright (c) 1998, 2002-2005 Kiyoshi Matsui <kmatsui_at_[hidden]>
  * All rights reserved.

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_6_067.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_6_067.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_6_067.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -22,6 +22,11 @@
 //R #line 19 "t_6_067.hpp"
 //R int dummy = 0;
 
+//H 10: t_6_067.cpp(20): #include "t_6_067.hpp"
+//H 04: "t_6_067.hpp"
+//H 05: $B(t_6_067.hpp) ($B(t_6_067.hpp))
+//H 18: boost::wave::lexing_exception
+
 /*-
  * Copyright (c) 1998, 2002-2005 Kiyoshi Matsui <kmatsui_at_[hidden]>
  * All rights reserved.

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_001.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_001.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_001.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -18,3 +18,6 @@
     void exposed() {} //R void exposed() {}
 #endif
 
+//H 10: t_9_001.cpp(16): #if
+//H 11: t_9_001.cpp(16): #if 1: 1
+//H 10: t_9_001.cpp(19): #endif

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_002.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_002.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_002.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -18,3 +18,6 @@
 1
 //R #line 18 "t_9_002.cpp"
 //R 1
+
+//H 10: t_9_002.cpp(10): #if
+//H 11: t_9_002.cpp(10): #if 0: 0

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_003.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_003.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_003.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -16,8 +16,10 @@
 #define PLUS() +
 #define MINUS() -
 #define DOT() .
+#define GREATER() >
+#define LESS() <
 
-//R #line 21 "t_9_003.cpp"
+//R #line 23 "t_9_003.cpp"
 X()2 //R 1 2
 STRINGIZE( X()2 ) //R "12"
 //R
@@ -35,3 +37,25 @@
 //R
 DOT()DOT()DOT() //R .. .
 STRINGIZE( DOT()DOT()DOT() ) //R "..."
+
+// the following are regressions reported by Stefan Seefeld
+//R #line 43 "t_9_003.cpp"
+GREATER()GREATER() //R > >
+STRINGIZE( GREATER()GREATER() ) //R ">>"
+//R
+LESS()LESS() //R < <
+STRINGIZE( LESS()LESS() ) //R "<<"
+
+#define COMMA() ,
+#define AND() &
+#define CHAR() char
+#define STAR() *
+
+// Make sure no whitespace gets inserted in between the operator symbols
+//R #line 56 "t_9_003.cpp"
+void foo(char&, char) //R void foo(char&, char)
+void foo(char *) //R void foo(char *)
+void foo(char *&) //R void foo(char *&)
+void foo(CHAR()AND()COMMA() CHAR()) //R void foo(char&, char)
+void foo(CHAR() STAR()) //R void foo(char *)
+void foo(CHAR() STAR()AND()) //R void foo(char *&)

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_004.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_004.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_004.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -19,3 +19,10 @@
 #define \u0061 weird // 0x61 == 'a'
 
 \u0061
+
+//H 10: t_9_004.cpp(12): #define
+//H 08: t_9_004.cpp(12): \u00ff=...
+//H 01: t_9_004.cpp(12): \u00ff
+//H 02: ...
+//H 03: ...
+//H 18: boost::wave::lexing_exception

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_006.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_006.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_006.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -36,3 +36,11 @@
 "X" is not defined.
 #endif
 
+//H 10: t_9_006.cpp(21): #define
+//H 08: t_9_006.cpp(21): X=
+//H 10: t_9_006.cpp(25): #if
+//H 11: t_9_006.cpp(25): #if defined(X): 1
+//H 10: t_9_006.cpp(27): #else
+//H 10: t_9_006.cpp(33): #if
+//H 11: t_9_006.cpp(33): #if defined X: 1
+//H 10: t_9_006.cpp(35): #else

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_007.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_007.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_007.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -7,7 +7,7 @@
     LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
 
-// Test error reproting during redefinition of 'defined'
+// Test error reporting during redefinition of 'defined'
 
 //E t_9_007.cpp(13): warning: this predefined name may not be redefined: defined
 #define defined 1 // undefined in C++ (16.8/3), error in C99 (6.10.8/4)
@@ -15,3 +15,6 @@
 #if defined // error
 <error>
 #endif
+
+//H 10: t_9_007.cpp(13): #define
+//H 18: boost::wave::macro_handling_exception

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_008.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_008.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_008.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -7,7 +7,10 @@
     LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
 
-// Test error reproting during redefinition of 'defined'
+// Test error reporting during redefinition of 'defined'
 
 //E t_9_008.cpp(13): warning: #undef may not be used on this predefined name: defined
 #undef defined
+
+//H 10: t_9_008.cpp(13): #undef
+//H 18: boost::wave::preprocess_exception

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_009.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_009.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_009.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -14,3 +14,14 @@
 
 //R #line 16 "t_9_009.cpp"
 X() //R ...
+
+//H 10: t_9_009.cpp(12): #define
+//H 08: t_9_009.cpp(12): X()=X_ ## 0R()
+//H 10: t_9_009.cpp(13): #define
+//H 08: t_9_009.cpp(13): X_0R()=...
+//H 00: t_9_009.cpp(16): X(), [t_9_009.cpp(12): X()=X_ ## 0R()]
+//H 02: X_0R()
+//H 00: t_9_009.cpp(12): X_0R(), [t_9_009.cpp(13): X_0R()=...]
+//H 02: ...
+//H 03: ...
+//H 03: ...

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_010.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_010.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_010.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -27,3 +27,44 @@
 //R #line 28 "t_9_010.cpp"
 CAT(A, X() C) //R AB C
 CAT(A, X()C) //R AB C
+
+//H 10: t_9_010.cpp(13): #define
+//H 08: t_9_010.cpp(13): A(x)=x
+//H 00: t_9_010.cpp(16): A(1), [t_9_010.cpp(13): A(x)=x]
+//H 02: 1
+//H 03: 1
+//H 00: t_9_010.cpp(17): A(1), [t_9_010.cpp(13): A(x)=x]
+//H 02: 1
+//H 03: 1
+//H 00: t_9_010.cpp(18): A(X), [t_9_010.cpp(13): A(x)=x]
+//H 02: X
+//H 03: X
+//H 00: t_9_010.cpp(19): A(X), [t_9_010.cpp(13): A(x)=x]
+//H 02: X
+//H 03: X
+//H 10: t_9_010.cpp(21): #define
+//H 08: t_9_010.cpp(21): CAT(a, b)=PRIMITIVE_CAT(a, b)
+//H 10: t_9_010.cpp(22): #define
+//H 08: t_9_010.cpp(22): PRIMITIVE_CAT(a, b)=a ## b
+//H 10: t_9_010.cpp(24): #define
+//H 08: t_9_010.cpp(24): X()=B
+//H 10: t_9_010.cpp(25): #define
+//H 08: t_9_010.cpp(25): ABC=1
+//H 00: t_9_010.cpp(28): CAT(A, X() C), [t_9_010.cpp(21): CAT(a, b)=PRIMITIVE_CAT(a, b)]
+//H 00: t_9_010.cpp(28): X(), [t_9_010.cpp(24): X()=B]
+//H 02: B
+//H 03: B
+//H 02: PRIMITIVE_CAT(A, B C)
+//H 00: t_9_010.cpp(21): PRIMITIVE_CAT(A, B C), [t_9_010.cpp(22): PRIMITIVE_CAT(a, b)=a ## b]
+//H 02: AB C
+//H 03: AB C
+//H 03: AB C
+//H 00: t_9_010.cpp(29): CAT(A, X()C), [t_9_010.cpp(21): CAT(a, b)=PRIMITIVE_CAT(a, b)]
+//H 00: t_9_010.cpp(29): X(), [t_9_010.cpp(24): X()=B]
+//H 02: B
+//H 03: B
+//H 02: PRIMITIVE_CAT(A, BC)
+//H 00: t_9_010.cpp(21): PRIMITIVE_CAT(A, BC), [t_9_010.cpp(22): PRIMITIVE_CAT(a, b)=a ## b]
+//H 02: ABC
+//H 03: ABC
+//H 03: ABC

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_011.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_011.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_011.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -17,3 +17,14 @@
 //R #line 18 "t_9_011.cpp"
 PRIMITIVE_CAT(1, ABC) //R 1 ABC
 PRIMITIVE_CAT3(ABC, 1, ABC) //R ABC1ABC
+
+//H 10: t_9_011.cpp(14): #define
+//H 08: t_9_011.cpp(14): PRIMITIVE_CAT(a, b)=a ## b
+//H 10: t_9_011.cpp(15): #define
+//H 08: t_9_011.cpp(15): PRIMITIVE_CAT3(a, b, c)=a ## b ## c
+//H 00: t_9_011.cpp(18): PRIMITIVE_CAT(1, ABC), [t_9_011.cpp(14): PRIMITIVE_CAT(a, b)=a ## b]
+//H 02: 1ABC
+//H 03: 1ABC
+//H 00: t_9_011.cpp(19): PRIMITIVE_CAT3(ABC, 1, ABC), [t_9_011.cpp(15): PRIMITIVE_CAT3(a, b, c)=a ## b ## c]
+//H 02: ABC1ABC
+//H 03: ABC1ABC

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_012.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_012.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_012.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -17,3 +17,9 @@
 
 //R #line 19 "t_9_012.cpp"
 CreateWindowA(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) //R CreateWindowExA(0L, 1, 2, 3, 4, 5,6, 7, 8, 9, 10, 11)
+
+//H 10: t_9_012.cpp(13): #define
+//H 08: t_9_012.cpp(13): CreateWindowA(lpClassName, lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)=CreateWindowExA(0L, lpClassName, lpWindowName, dwStyle, x, y,nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)
+//H 00: t_9_012.cpp(19): CreateWindowA(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), [t_9_012.cpp(13): CreateWindowA(lpClassName, lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)=CreateWindowExA(0L, lpClassName, lpWindowName, dwStyle, x, y,nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)]
+//H 02: CreateWindowExA(0L, 1, 2, 3, 4, 5,6, 7, 8, 9, 10, 11)
+//H 03: CreateWindowExA(0L, 1, 2, 3, 4, 5,6, 7, 8, 9, 10, 11)

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_013.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_013.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_013.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -13,3 +13,7 @@
 
 //E t_9_013.cpp(15): warning: empty macro arguments are not supported in pure C++ mode, use variadics mode to allow these: MACRO
 MACRO(1,, 3)
+
+//H 10: t_9_013.cpp(12): #define
+//H 08: t_9_013.cpp(12): MACRO(a, b, c)=a ## b ## c
+//H 18: boost::wave::preprocess_exception

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_016.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_016.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_016.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -17,3 +17,25 @@
 #define EXPAND(x) x
 EXPAND(#) define later
 #endif
+
+//H 10: t_9_016.cpp(10): #if
+//H 11: t_9_016.cpp(10): #if !defined(inclusion): 1
+//H 10: t_9_016.cpp(11): #define
+//H 08: t_9_016.cpp(11): inclusion=
+//H 10: t_9_016.cpp(12): # include
+//H 04: "$P(t_9_016.cpp)"
+//H 05: $B(t_9_016.cpp) ($B(t_9_016.cpp))
+//H 10: t_9_016.cpp(10): #if
+//H 11: t_9_016.cpp(10): #if !defined(inclusion): 0
+//H 10: t_9_016.cpp(17): #define
+//H 08: t_9_016.cpp(17): EXPAND(x)=x
+//H 00: t_9_016.cpp(18): EXPAND(#), [t_9_016.cpp(17): EXPAND(x)=x]
+//H 02: #
+//H 03: #
+//H 10: t_9_016.cpp(19): #endif
+//H 06:
+//H 10: t_9_016.cpp(13): # include "t_9_016.hpp"
+//H 04: "t_9_016.hpp"
+//H 05: $B(t_9_016.hpp) ($B(t_9_016.hpp))
+//H 06:
+//H 10: t_9_016.cpp(14): #else

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_017.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_017.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_017.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -46,3 +46,30 @@
 #else
 false is defined
 #endif
+
+//H 10: t_9_017.cpp(12): #define
+//H 08: t_9_017.cpp(12): true=1
+//H 10: t_9_017.cpp(13): #define
+//H 08: t_9_017.cpp(13): false=0
+//H 10: t_9_017.cpp(17): #if
+//H 11: t_9_017.cpp(17): #if defined(true): 1
+//H 01: t_9_017.cpp(12): true
+//H 02: 1
+//H 03: 1
+//H 10: t_9_017.cpp(19): #else
+//H 10: t_9_017.cpp(25): #if
+//H 11: t_9_017.cpp(25): #if defined(false): 1
+//H 01: t_9_017.cpp(13): false
+//H 02: 0
+//H 03: 0
+//H 10: t_9_017.cpp(27): #else
+//H 10: t_9_017.cpp(31): #undef
+//H 09: t_9_017.cpp(31): true
+//H 10: t_9_017.cpp(32): #undef
+//H 09: t_9_017.cpp(32): false
+//H 10: t_9_017.cpp(36): #ifndef
+//H 11: t_9_017.cpp(36): #ifndef true: 0
+//H 10: t_9_017.cpp(38): #else
+//H 10: t_9_017.cpp(44): #ifndef
+//H 11: t_9_017.cpp(44): #ifndef false: 0
+//H 10: t_9_017.cpp(46): #else

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_018.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_018.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/t_9_018.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -13,3 +13,8 @@
 //E t_9_018.cpp(15): warning: illegal macro redefinition: M1
 #define M1 1
 #define M1
+
+//H 10: t_9_018.cpp(14): #define
+//H 08: t_9_018.cpp(14): M1=1
+//H 10: t_9_018.cpp(15): #define
+//H 18: boost::wave::macro_handling_exception

Modified: branches/CMake/release/libs/wave/test/testwave/testfiles/test.cfg
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testfiles/test.cfg (original)
+++ branches/CMake/release/libs/wave/test/testwave/testfiles/test.cfg 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -2,7 +2,7 @@
 # Boost.Wave: A Standard compliant C++ preprocessor library
 # http://www.boost.org/
 #
-# Copyright (c) 2003-2006 Hartmut Kaiser. Distributed under the Boost
+# Copyright (c) 2003-2008 Hartmut Kaiser. Distributed under the Boost
 # Software License, Version 1.0. (See accompanying file
 # LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 #
@@ -48,6 +48,7 @@
 t_1_035.cpp
 t_1_036.cpp
 t_1_037.cpp
+t_1_038.cpp
 
 #
 # t_2: Preprocessing directives
@@ -69,6 +70,7 @@
 t_2_015.cpp
 t_2_016.cpp
 t_2_017.cpp
+t_2_018.cpp
 
 #
 # t_3: Predefined macros

Modified: branches/CMake/release/libs/wave/test/testwave/testwave.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testwave.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testwave.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -37,6 +37,8 @@
 // level 3: prints the expected and real result for failed tests
 // level 4: prints the outcome of every test
 // level 5: prints the real result even for succeeded tests
+// level 6: prints the real hooks information recorded, even for succeeded
+// tests
 //
 // level 9: prints information about almost everything
 //
@@ -59,11 +61,13 @@
             ("copyright,c", "print out the copyright statement")
             ("config-file", po::value<std::vector<std::string> >()->composing(),
                 "specify a config file (alternatively: @arg)")
+ ("hooks", po::value<bool>()->default_value(true),
+ "test preprocessing hooks")
             ("debug,d", po::value<int>(), "set the debug level (0...9)")
         ;
 
     // Hidden options, will be used in in config file analysis to allow to
- // recognise positional arguments, will not be shown to the user.
+ // recognize positional arguments, will not be shown to the user.
         po::options_description desc_hidden("Hidden options");
         desc_hidden.add_options()
             ("input", po::value<std::vector<std::string> >()->composing(),
@@ -172,7 +176,7 @@
                     for (std::vector<std::string>::const_iterator iit = infiles.begin();
                          iit != iend; ++iit)
                     {
- // correct the file name (prepend the cfg file path)
+ // correct the file name (pre-pend the config file path)
                         fs::path cfgpath = fs::complete(
                             fs::path(*cit, fs::native), fs::current_path());
                         fs::path filepath =

Modified: branches/CMake/release/libs/wave/test/testwave/testwave_app.cpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testwave_app.cpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testwave_app.cpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -20,6 +20,10 @@
 #include <boost/detail/workaround.hpp>
 
 // include Wave
+
+// always use new hooks
+#define BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS 0
+
 #include <boost/wave.hpp>
 
 // include the lexer related stuff
@@ -29,6 +33,7 @@
 // test application related headers
 #include "cmd_line_utils.hpp"
 #include "testwave_app.hpp"
+#include "collect_hooks_information.hpp"
 
 namespace po = boost::program_options;
 namespace fs = boost::filesystem;
@@ -36,27 +41,9 @@
 ///////////////////////////////////////////////////////////////////////////////
 // testwave version definitions
 #define TESTWAVE_VERSION_MAJOR 0
-#define TESTWAVE_VERSION_MINOR 4
+#define TESTWAVE_VERSION_MINOR 5
 #define TESTWAVE_VERSION_SUBMINOR 0
 
-///////////////////////////////////////////////////////////////////////////////
-// workaround for missing ostringstream
-#ifdef BOOST_NO_STRINGSTREAM
-#include <strstream>
-#define BOOST_WAVETEST_OSSTREAM std::ostrstream
-std::string BOOST_WAVETEST_GETSTRING(std::ostrstream& ss)
-{
- ss << ends;
- std::string rval = ss.str();
- ss.freeze(false);
- return rval;
-}
-#else
-#include <sstream>
-#define BOOST_WAVETEST_GETSTRING(ss) ss.str()
-#define BOOST_WAVETEST_OSSTREAM std::ostringstream
-#endif
-
 namespace {
 
     ///////////////////////////////////////////////////////////////////////////
@@ -86,19 +73,6 @@
     }
 
     ///////////////////////////////////////////////////////////////////////////
- template <typename String>
- String const& handle_filepath(String &name)
- {
- using boost::wave::util::impl::unescape_lit;
-
- String unesc_name = unescape_lit(name);
- fs::path p (unesc_name.c_str(), fs::native);
-
- name = p.leaf().c_str();
- return name;
- }
-
- ///////////////////////////////////////////////////////////////////////////
     template <typename Iterator>
     bool handle_line_directive(Iterator &it, Iterator const& end,
         std::string &result)
@@ -123,15 +97,34 @@
         result = result + name.c_str();
         return true;
     }
+
+ template <typename T>
+ inline T const&
+ variables_map_as(po::variable_value const& v, T*)
+ {
+#if (__GNUC__ == 3 && (__GNUC_MINOR__ == 2 || __GNUC_MINOR__ == 3)) || \
+ BOOST_WORKAROUND(__MWERKS__, < 0x3200)
+// gcc 3.2.x and 3.3.x choke on vm[...].as<...>()
+// CW 8.3 has problems with the v.as<T>() below
+ T const* r = boost::any_cast<T>(&v.value());
+ if (!r)
+ boost::throw_exception(boost::bad_any_cast());
+ return *r;
+#else
+ return v.as<T>();
+#endif
+ }
+
 }
 
 ///////////////////////////////////////////////////////////////////////////
 //
 // This function compares the real result and the expected one but first
-// replaces all occurences in the expected result of
+// replaces all occurrences in the expected result of
 // $E: to the result of preprocessing the given expression
 // $F: to the passed full filepath
 // $P: to the full path
+// $B: to the full path (same as $P, but using forward slash '/' on Windows)
 // $V: to the current Boost version number
 //
 ///////////////////////////////////////////////////////////////////////////
@@ -159,9 +152,9 @@
                             return false;
                         }
                         std::string source = expected.substr(pos1+3, p-pos1-3);
- std::string result, error;
+ std::string result, error, hooks;
                         bool pp_result = preprocess_file(filename, source,
- result, error, true);
+ result, error, hooks, true);
                         if (!pp_result) {
                             std::cerr
                                 << "testwave: preprocessing error in $E directive: "
@@ -183,10 +176,13 @@
                 break;
 
             case 'P': // insert full path
+ case 'B': // same as 'P', but forward slashs on Windows
                 {
- fs::path fullpath = fs::complete(
- fs::path(filename, fs::native),
- fs::current_path());
+ fs::path fullpath (
+ fs::complete(
+ fs::path(filename, fs::native), fs::current_path())
+ );
+
                     if ('(' == expected[pos1+2]) {
                     // the $P(basename) syntax is used
                         std::size_t p = expected.find_first_of(")", pos1+1);
@@ -199,17 +195,29 @@
                         std::string base = expected.substr(pos1+3, p-pos1-3);
                         fullpath = fullpath.branch_path() /
                             fs::path(base, fs::native);
- full_result = full_result +
- expected.substr(pos, pos1-pos) +
- escape_lit(fullpath.normalize().native_file_string());
+ full_result += expected.substr(pos, pos1-pos);
+ if ('P' == expected[pos1+1]) {
+ full_result +=
+ escape_lit(fullpath.normalize().native_file_string());
+ }
+ else {
+ full_result +=
+ escape_lit(fullpath.normalize().string());
+ }
                         pos1 = expected.find_first_of ("$",
                             pos = pos1 + 4 + base.size());
                     }
                     else {
                     // the $P is used on its own
- full_result = full_result +
- expected.substr(pos, pos1-pos) +
- escape_lit(fullpath.native_file_string());
+ full_result += expected.substr(pos, pos1-pos);
+ if ('P' == expected[pos1+1]) {
+ full_result +=
+ escape_lit(fullpath.native_file_string());
+ }
+ else {
+ full_result +=
+ escape_lit(fullpath.string());
+ }
                         pos1 = expected.find_first_of ("$", pos = pos1 + 2);
                     }
                 }
@@ -273,7 +281,8 @@
 //
 // Test the given file (i.e. preprocess the file and compare the result
 // against the embedded 'R' comments, if an error occurs compare the error
-// message against the given 'E' comments).
+// message against the given 'E' comments, if no error occurred, compare the
+// generated hooks result against the given 'H' comments).
 //
 ///////////////////////////////////////////////////////////////////////////////
 bool
@@ -284,12 +293,17 @@
     if (!read_file(filename, instr))
         return false; // error was reported already
 
+ bool test_hooks = true;
+ if (global_vm.count("hooks"))
+ test_hooks = variables_map_as(global_vm["hooks"], (bool *)NULL);
+
 // extract expected output, preprocess the data and compare results
- std::string expected;
- if (extract_expected_output(filename, instr, expected)) {
+ std::string expected, expected_hooks;
+ if (extract_expected_output(filename, instr, expected, expected_hooks)) {
         bool retval = true; // assume success
- std::string result, error;
- bool pp_result = preprocess_file(filename, instr, result, error);
+ bool printed_result = false;
+ std::string result, error, hooks;
+ bool pp_result = preprocess_file(filename, instr, result, error, hooks);
         if (pp_result || !result.empty()) {
         // did we expect an error?
             std::string expected_error;
@@ -332,13 +346,42 @@
                 }
                 retval = false;
             }
- else if (debuglevel > 4) {
- std::cerr
- << filename << ": succeeded" << std::endl
- << "result: " << std::endl << result << std::endl;
+ else {
+ // preprocessing succeeded, check hook information, if appropriate
+ if (test_hooks && !expected_hooks.empty() &&
+ !got_expected_result(filename, hooks, expected_hooks))
+ {
+ if (debuglevel > 2) {
+ std::cerr << filename << ": failed" << std::endl
+ << "hooks result: " << std::endl << hooks
+ << std::endl;
+ std::cerr << "expected hooks result: " << std::endl
+ << expected_hooks << std::endl;
+ }
+ else if (debuglevel > 1) {
+ std::cerr << filename << ": failed" << std::endl;
+ }
+ retval = false;
+ }
             }
- else if (debuglevel > 3) {
- std::cerr << filename << ": succeeded" << std::endl;
+
+ // print success message, if appropriate
+ if (retval) {
+ if (debuglevel > 5) {
+ std::cerr
+ << filename << ": succeeded" << std::endl
+ << "result: " << std::endl << result << std::endl
+ << "hooks result: " << std::endl << hooks << std::endl;
+ }
+ else if (debuglevel > 4) {
+ std::cerr
+ << filename << ": succeeded" << std::endl
+ << "result: " << std::endl << result << std::endl;
+ }
+ else if (debuglevel > 3) {
+ std::cerr << filename << ": succeeded" << std::endl;
+ }
+ printed_result = true;
             }
         }
         
@@ -356,7 +399,7 @@
 
                     if (!expected_error.empty()) {
                         std::cerr
- << "result: " << std::endl << error << std::endl
+ << "error result: " << std::endl << error << std::endl
                             << "expected error: " << std::endl
                             << expected_error << std::endl;
                     }
@@ -369,14 +412,30 @@
                 }
                 retval = false;
             }
- else if (debuglevel > 4) {
- std::cerr
- << filename << ": succeeded" << std::endl
- << "result: " << std::endl << error << std::endl;
- }
- else if (debuglevel > 3) {
- // caught the expected error message
- std::cerr << filename << ": succeeded" << std::endl;
+
+ if (retval) {
+ if (debuglevel > 5) {
+ std::cerr
+ << filename << ": succeeded (caught expected error)"
+ << std::endl << "error result: " << std::endl << error
+ << std::endl;
+
+ if (!printed_result) {
+ std::cerr
+ << "hooks result: " << std::endl << hooks
+ << std::endl;
+ }
+ }
+ else if (debuglevel > 4) {
+ std::cerr
+ << filename << ": succeeded (caught expected error)"
+ << std::endl << "error result: " << std::endl << error
+ << std::endl;
+ }
+ else if (debuglevel > 3) {
+ // caught the expected error message
+ std::cerr << filename << ": succeeded" << std::endl;
+ }
             }
         }
         return retval;
@@ -552,9 +611,9 @@
                             return false;
                         }
                         std::string source = value.substr(4, p-4);
- std::string result, error;
+ std::string result, error, hooks;
                         bool pp_result = preprocess_file(filename, source,
- result, error, true);
+ result, error, hooks, true);
                         if (!pp_result) {
                             std::cerr
                                 << "testwave: preprocessing error in '" << flag
@@ -598,9 +657,9 @@
                             return false;
                         }
                         std::string source = value.substr(4, p-4);
- std::string result, error;
+ std::string result, error, hooks;
                         bool pp_result = preprocess_file(filename, source,
- result, error, true);
+ result, error, hooks, true);
                         if (!pp_result) {
                             std::cerr
                                 << "testwave: preprocessing error in '" << flag
@@ -660,9 +719,10 @@
 ///////////////////////////////////////////////////////////////////////////////
 inline bool
 testwave_app::extract_expected_output(std::string const& filename,
- std::string const& instr, std::string& expected)
+ std::string const& instr, std::string& expected, std::string& expectedhooks)
 {
- return extract_special_information(filename, instr, 'R', expected);
+ return extract_special_information(filename, instr, 'R', expected) &&
+ extract_special_information(filename, instr, 'H', expectedhooks);
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -709,26 +769,6 @@
     return true;
 }
 
-namespace {
-
- template <typename T>
- inline T const&
- variables_map_as(po::variable_value const& v, T*)
- {
-#if (__GNUC__ == 3 && (__GNUC_MINOR__ == 2 || __GNUC_MINOR__ == 3)) || \
- BOOST_WORKAROUND(__MWERKS__, < 0x3200)
-// gcc 3.2.x and 3.3.x choke on vm[...].as<...>()
-// CW 8.3 has problems with the v.as<T>() below
- T const* r = boost::any_cast<T>(&v.value());
- if (!r)
- boost::throw_exception(boost::bad_any_cast());
- return *r;
-#else
- return v.as<T>();
-#endif
- }
-}
-
 template <typename Context>
 bool
 testwave_app::initialise_options(Context& ctx, po::variables_map const& vm,
@@ -873,7 +913,7 @@
                 std::cerr << "initialise_options: option: -D" << *cit
                           << std::endl;
             }
- ctx.add_macro_definition(*cit);
+ ctx.add_macro_definition(*cit, true);
         }
     }
 
@@ -889,7 +929,7 @@
                 std::cerr << "initialise_options: option: -P" << *cit
                           << std::endl;
             }
- ctx.add_macro_definition(*cit);
+ ctx.add_macro_definition(*cit, true);
         }
     }
 
@@ -941,7 +981,7 @@
     strm << "__TESTWAVE_SIZEOF_" << name << "__=" << value;
 
     std::string macro(BOOST_WAVETEST_GETSTRING(strm));
- if (!ctx.add_macro_definition(macro)) {
+ if (!ctx.add_macro_definition(macro, true)) {
         std::cerr << "testwave: failed to predefine macro: " << macro
                   << std::endl;
         return false;
@@ -970,7 +1010,7 @@
     }
     
     std::string macro(BOOST_WAVETEST_GETSTRING(strm));
- if (!ctx.add_macro_definition(macro)) {
+ if (!ctx.add_macro_definition(macro, true)) {
         std::cerr << "testwave: failed to predefine macro: " << macro
                   << std::endl;
         return false;
@@ -999,7 +1039,7 @@
     }
     
     std::string macro(BOOST_WAVETEST_GETSTRING(strm));
- if (!ctx.add_macro_definition(macro)) {
+ if (!ctx.add_macro_definition(macro, true)) {
         std::cerr << "testwave: failed to predefine macro: " << macro
                   << std::endl;
         return false;
@@ -1017,7 +1057,7 @@
 testwave_app::add_strict_lexer_definition(Context& ctx)
 {
     std::string macro("__TESTWAVE_HAS_STRICT_LEXER__=1");
- if (!ctx.add_macro_definition(macro)) {
+ if (!ctx.add_macro_definition(macro, true)) {
         std::cerr << "testwave: failed to predefine macro: " << macro
                   << std::endl;
         return false;
@@ -1106,14 +1146,18 @@
 ///////////////////////////////////////////////////////////////////////////////
 bool
 testwave_app::preprocess_file(std::string filename, std::string const& instr,
- std::string& result, std::string& error, bool single_line)
+ std::string& result, std::string& error, std::string& hooks,
+ bool single_line)
 {
 // create the wave::context object and initialize it from the file to
 // preprocess (may contain options inside of special comments)
     typedef boost::wave::cpplexer::lex_token<> token_type;
     typedef boost::wave::cpplexer::lex_iterator<token_type> lexer_type;
- typedef boost::wave::context<std::string::const_iterator, lexer_type>
- context_type;
+ typedef boost::wave::context<
+ std::string::const_iterator, lexer_type,
+ boost::wave::iteration_context_policies::load_file_to_string,
+ collect_hooks_information<token_type> >
+ context_type;
 
     if (9 == debuglevel) {
         std::cerr << "preprocess_file: preprocessing input file: " << filename
@@ -1122,7 +1166,8 @@
 
     try {
     // create preprocessing context
- context_type ctx(instr.begin(), instr.end(), filename.c_str());
+ context_type ctx(instr.begin(), instr.end(), filename.c_str(),
+ collect_hooks_information<token_type>(hooks));
 
     // initialize the context from the options given on the command line
         if (!initialise_options(ctx, global_vm, single_line))

Modified: branches/CMake/release/libs/wave/test/testwave/testwave_app.hpp
==============================================================================
--- branches/CMake/release/libs/wave/test/testwave/testwave_app.hpp (original)
+++ branches/CMake/release/libs/wave/test/testwave/testwave_app.hpp 2008-06-30 08:38:16 EDT (Mon, 30 Jun 2008)
@@ -59,12 +59,15 @@
     bool extract_special_information(std::string const& filename,
         std::string const& instr, char flag, std::string& content);
 
- // Extract the expected output from the given input data
+ // Extract the expected output and expected hooks information from the
+ // given input data.
     // The expected output has to be provided inside of special comments which
- // start with a capital 'R'. All such comments are concatenated and
- // returned through the parameter 'expected'.
+ // start with a capital 'R' ('H' for the hooks information). All such
+ // comments are concatenated and returned through the parameter 'expected'
+ // ('expectedhooks' for hooks information).
     bool extract_expected_output(std::string const& filename,
- std::string const& instr, std::string& expected);
+ std::string const& instr, std::string& expected,
+ std::string& expectedhooks);
         
     // Extracts the required preprocessing options from the given input data
     // and initializes the given Wave context object accordingly.
@@ -83,7 +86,8 @@
     // Preprocess the given input data and return the generated output through
     // the parameter 'result'.
     bool preprocess_file(std::string filename, std::string const& instr,
- std::string& result, std::string& error, bool single_line = false);
+ std::string& result, std::string& error, std::string& hooks,
+ bool single_line = false);
 
     // Add special predefined macros to the context object
     template <typename Context>


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk