Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65968 - in branches/release: . boost boost/algorithm/string boost/archive boost/bimap boost/config boost/detail boost/filesystem boost/functional/hash boost/fusion boost/gil boost/graph boost/integer boost/interprocess boost/intrusive boost/io boost/iostreams boost/math boost/msm boost/numeric/ublas boost/program_options boost/property_tree boost/python boost/range boost/regex boost/serialization boost/signals boost/signals2 boost/spirit boost/spirit/home boost/spirit/home/karma boost/spirit/home/support boost/statechart boost/system boost/thread boost/tr1 boost/type_traits boost/unordered boost/utility boost/uuid boost/variant boost/wave boost/wave/grammars boost/wave/util doc libs libs/algorithm/string libs/array/doc libs/array/test libs/bimap libs/config libs/filesystem libs/functional/hash libs/fusion libs/graph_parallel libs/integer libs/interprocess libs/intrusive libs/iostreams libs/math libs/math/doc/sf_and_dist libs/mpi/build libs/mpl/doc/refmanual libs/mpl/doc/src/refmanual libs/msm libs/numeric/ublas libs/numeric/ublas/doc libs/program_options libs/property_tree libs/python libs/range libs/regex libs/serialization libs/serialization/doc libs/serialization/test libs/signals libs/signals2 libs/spirit libs/spirit/classic/example libs/spirit/doc libs/spirit/example libs/spirit/phoenix libs/spirit/test libs/spirit/test/qi libs/statechart libs/static_assert libs/system libs/thread libs/timer libs/tr1 libs/type_traits libs/type_traits/doc libs/unordered libs/utility libs/utility/swap/test libs/uuid libs/wave libs/wave/src libs/wave/test/testwave libs/wave/test/testwave/testfiles more more/getting_started status tools tools/bcp tools/boostbook tools/build/v2 tools/inspect tools/quickbook tools/regression tools/regression/src tools/release tools/wave
From: hartmut.kaiser_at_[hidden]
Date: 2010-10-14 23:39:18


Author: hkaiser
Date: 2010-10-14 23:39:14 EDT (Thu, 14 Oct 2010)
New Revision: 65968
URL: http://svn.boost.org/trac/boost/changeset/65968

Log:
Wave merging from trunk
Added:
   branches/release/libs/wave/test/testwave/testfiles/t_2_020.cpp
      - copied unchanged from r65314, /trunk/libs/wave/test/testwave/testfiles/t_2_020.cpp
Properties modified:
   branches/release/ (props changed)
   branches/release/INSTALL (props changed)
   branches/release/Jamroot (props changed)
   branches/release/LICENSE_1_0.txt (props changed)
   branches/release/boost/ (props changed)
   branches/release/boost-build.jam (props changed)
   branches/release/boost.css (props changed)
   branches/release/boost.png (props changed)
   branches/release/boost/algorithm/string/ (props changed)
   branches/release/boost/archive/ (props changed)
   branches/release/boost/archive/basic_archive.hpp (props changed)
   branches/release/boost/array.hpp (props changed)
   branches/release/boost/bimap/ (props changed)
   branches/release/boost/config/ (props changed)
   branches/release/boost/config.hpp (props changed)
   branches/release/boost/detail/ (props changed)
   branches/release/boost/detail/endian.hpp (props changed)
   branches/release/boost/filesystem/ (props changed)
   branches/release/boost/filesystem.hpp (props changed)
   branches/release/boost/functional/hash/ (props changed)
   branches/release/boost/fusion/ (props changed)
   branches/release/boost/gil/ (props changed)
   branches/release/boost/graph/ (props changed)
   branches/release/boost/integer/ (props changed)
   branches/release/boost/interprocess/ (props changed)
   branches/release/boost/intrusive/ (props changed)
   branches/release/boost/io/ (props changed)
   branches/release/boost/iostreams/ (props changed)
   branches/release/boost/math/ (props changed)
   branches/release/boost/math_fwd.hpp (props changed)
   branches/release/boost/msm/ (props changed)
   branches/release/boost/numeric/ublas/ (props changed)
   branches/release/boost/numeric/ublas/functional.hpp (props changed)
   branches/release/boost/program_options/ (props changed)
   branches/release/boost/property_tree/ (props changed)
   branches/release/boost/python/ (props changed)
   branches/release/boost/range/ (props changed)
   branches/release/boost/regex/ (props changed)
   branches/release/boost/serialization/ (props changed)
   branches/release/boost/signals/ (props changed)
   branches/release/boost/signals2/ (props changed)
   branches/release/boost/signals2.hpp (props changed)
   branches/release/boost/spirit/ (props changed)
   branches/release/boost/spirit/home/ (props changed)
   branches/release/boost/spirit/home/karma/ (props changed)
   branches/release/boost/spirit/home/support/attributes.hpp (props changed)
   branches/release/boost/statechart/ (props changed)
   branches/release/boost/system/ (props changed)
   branches/release/boost/thread/ (props changed)
   branches/release/boost/thread.hpp (props changed)
   branches/release/boost/tr1/ (props changed)
   branches/release/boost/type_traits/ (props changed)
   branches/release/boost/unordered/ (props changed)
   branches/release/boost/utility/ (props changed)
   branches/release/boost/utility/value_init.hpp (props changed)
   branches/release/boost/uuid/ (props changed)
   branches/release/boost/variant/ (props changed)
   branches/release/boost/version.hpp (props changed)
   branches/release/boost/wave/ (props changed)
   branches/release/bootstrap.bat (props changed)
   branches/release/bootstrap.sh (props changed)
   branches/release/doc/ (props changed)
   branches/release/index.htm (props changed)
   branches/release/index.html (props changed)
   branches/release/libs/ (props changed)
   branches/release/libs/algorithm/string/ (props changed)
   branches/release/libs/array/doc/array.xml (props changed)
   branches/release/libs/array/test/array0.cpp (props changed)
   branches/release/libs/array/test/array2.cpp (props changed)
   branches/release/libs/bimap/ (props changed)
   branches/release/libs/config/ (props changed)
   branches/release/libs/filesystem/ (props changed)
   branches/release/libs/functional/hash/ (props changed)
   branches/release/libs/fusion/ (props changed)
   branches/release/libs/graph_parallel/ (props changed)
   branches/release/libs/integer/ (props changed)
   branches/release/libs/interprocess/ (props changed)
   branches/release/libs/intrusive/ (props changed)
   branches/release/libs/iostreams/ (props changed)
   branches/release/libs/libraries.htm (props changed)
   branches/release/libs/maintainers.txt (props changed)
   branches/release/libs/math/ (props changed)
   branches/release/libs/math/doc/sf_and_dist/ (props changed)
   branches/release/libs/mpi/build/ (props changed)
   branches/release/libs/mpl/doc/refmanual/broken-compiler-workarounds.html (props changed)
   branches/release/libs/mpl/doc/refmanual/categorized-index-concepts.html (props changed)
   branches/release/libs/mpl/doc/refmanual/cfg-no-preprocessed-headers.html (props changed)
   branches/release/libs/mpl/doc/refmanual/composition-and-argument-binding.html (props changed)
   branches/release/libs/mpl/doc/refmanual/data-types-concepts.html (props changed)
   branches/release/libs/mpl/doc/refmanual/data-types-miscellaneous.html (props changed)
   branches/release/libs/mpl/doc/refmanual/extensible-associative-sequence.html (props changed)
   branches/release/libs/mpl/doc/refmanual/inserter-class.html (props changed)
   branches/release/libs/mpl/doc/refmanual/tag-dispatched-metafunction.html (props changed)
   branches/release/libs/mpl/doc/refmanual/trivial-metafunctions-summary.html (props changed)
   branches/release/libs/mpl/doc/src/refmanual/Iterators-Iterator.rst (props changed)
   branches/release/libs/msm/ (props changed)
   branches/release/libs/numeric/ublas/ (props changed)
   branches/release/libs/numeric/ublas/doc/ (props changed)
   branches/release/libs/program_options/ (props changed)
   branches/release/libs/property_tree/ (props changed)
   branches/release/libs/python/ (props changed)
   branches/release/libs/range/ (props changed)
   branches/release/libs/regex/ (props changed)
   branches/release/libs/serialization/ (props changed)
   branches/release/libs/serialization/doc/ (props changed)
   branches/release/libs/serialization/test/ (props changed)
   branches/release/libs/serialization/test/A.cpp (props changed)
   branches/release/libs/serialization/test/A.hpp (props changed)
   branches/release/libs/serialization/test/A.ipp (props changed)
   branches/release/libs/serialization/test/B.hpp (props changed)
   branches/release/libs/serialization/test/C.hpp (props changed)
   branches/release/libs/serialization/test/D.hpp (props changed)
   branches/release/libs/serialization/test/J.hpp (props changed)
   branches/release/libs/serialization/test/Jamfile.v2 (props changed)
   branches/release/libs/serialization/test/base.hpp (props changed)
   branches/release/libs/serialization/test/binary_archive.hpp (props changed)
   branches/release/libs/serialization/test/binary_warchive.hpp (props changed)
   branches/release/libs/serialization/test/derived2.hpp (props changed)
   branches/release/libs/serialization/test/dll_a.cpp (props changed)
   branches/release/libs/serialization/test/dll_base.cpp (props changed)
   branches/release/libs/serialization/test/dll_derived2.cpp (props changed)
   branches/release/libs/serialization/test/polymorphic_array_binary_archive.hpp (props changed)
   branches/release/libs/serialization/test/polymorphic_base.cpp (props changed)
   branches/release/libs/serialization/test/polymorphic_base.hpp (props changed)
   branches/release/libs/serialization/test/polymorphic_binary_archive.hpp (props changed)
   branches/release/libs/serialization/test/polymorphic_derived1.cpp (props changed)
   branches/release/libs/serialization/test/polymorphic_derived1.hpp (props changed)
   branches/release/libs/serialization/test/polymorphic_derived2.cpp (props changed)
   branches/release/libs/serialization/test/polymorphic_derived2.hpp (props changed)
   branches/release/libs/serialization/test/polymorphic_text_archive.hpp (props changed)
   branches/release/libs/serialization/test/polymorphic_text_warchive.hpp (props changed)
   branches/release/libs/serialization/test/polymorphic_xml_archive.hpp (props changed)
   branches/release/libs/serialization/test/polymorphic_xml_warchive.hpp (props changed)
   branches/release/libs/serialization/test/portable_binary_archive.hpp (props changed)
   branches/release/libs/serialization/test/test_array.cpp (props changed)
   branches/release/libs/serialization/test/test_binary.cpp (props changed)
   branches/release/libs/serialization/test/test_bitset.cpp (props changed)
   branches/release/libs/serialization/test/test_check.cpp (props changed)
   branches/release/libs/serialization/test/test_class_info_load.cpp (props changed)
   branches/release/libs/serialization/test/test_class_info_save.cpp (props changed)
   branches/release/libs/serialization/test/test_codecvt_null.cpp (props changed)
   branches/release/libs/serialization/test/test_complex.cpp (props changed)
   branches/release/libs/serialization/test/test_const_load_fail1.cpp (props changed)
   branches/release/libs/serialization/test/test_const_load_fail1_nvp.cpp (props changed)
   branches/release/libs/serialization/test/test_const_load_fail2.cpp (props changed)
   branches/release/libs/serialization/test/test_const_load_fail2_nvp.cpp (props changed)
   branches/release/libs/serialization/test/test_const_load_fail3.cpp (props changed)
   branches/release/libs/serialization/test/test_const_load_fail3_nvp.cpp (props changed)
   branches/release/libs/serialization/test/test_const_pass.cpp (props changed)
   branches/release/libs/serialization/test/test_const_save_warn1.cpp (props changed)
   branches/release/libs/serialization/test/test_const_save_warn1_nvp.cpp (props changed)
   branches/release/libs/serialization/test/test_const_save_warn2.cpp (props changed)
   branches/release/libs/serialization/test/test_const_save_warn2_nvp.cpp (props changed)
   branches/release/libs/serialization/test/test_const_save_warn3.cpp (props changed)
   branches/release/libs/serialization/test/test_const_save_warn3_nvp.cpp (props changed)
   branches/release/libs/serialization/test/test_const_save_warn4.cpp (props changed)
   branches/release/libs/serialization/test/test_const_save_warn4_nvp.cpp (props changed)
   branches/release/libs/serialization/test/test_contained_class.cpp (props changed)
   branches/release/libs/serialization/test/test_cyclic_ptrs.cpp (props changed)
   branches/release/libs/serialization/test/test_decl.hpp (props changed)
   branches/release/libs/serialization/test/test_delete_pointer.cpp (props changed)
   branches/release/libs/serialization/test/test_deque.cpp (props changed)
   branches/release/libs/serialization/test/test_derived.cpp (props changed)
   branches/release/libs/serialization/test/test_derived_class.cpp (props changed)
   branches/release/libs/serialization/test/test_derived_class_ptr.cpp (props changed)
   branches/release/libs/serialization/test/test_diamond.cpp (props changed)
   branches/release/libs/serialization/test/test_diamond_complex.cpp (props changed)
   branches/release/libs/serialization/test/test_dll_exported.cpp (props changed)
   branches/release/libs/serialization/test/test_dll_plugin.cpp (props changed)
   branches/release/libs/serialization/test/test_dll_simple.cpp (props changed)
   branches/release/libs/serialization/test/test_exported.cpp (props changed)
   branches/release/libs/serialization/test/test_inclusion.cpp (props changed)
   branches/release/libs/serialization/test/test_iterators.cpp (props changed)
   branches/release/libs/serialization/test/test_iterators_base64.cpp (props changed)
   branches/release/libs/serialization/test/test_list.cpp (props changed)
   branches/release/libs/serialization/test/test_list_ptrs.cpp (props changed)
   branches/release/libs/serialization/test/test_map.cpp (props changed)
   branches/release/libs/serialization/test/test_mi.cpp (props changed)
   branches/release/libs/serialization/test/test_mult_archive_types.cpp (props changed)
   branches/release/libs/serialization/test/test_multiple_inheritance.cpp (props changed)
   branches/release/libs/serialization/test/test_multiple_ptrs.cpp (props changed)
   branches/release/libs/serialization/test/test_new_operator.cpp (props changed)
   branches/release/libs/serialization/test/test_no_rtti.cpp (props changed)
   branches/release/libs/serialization/test/test_non_default_ctor.cpp (props changed)
   branches/release/libs/serialization/test/test_non_default_ctor2.cpp (props changed)
   branches/release/libs/serialization/test/test_non_intrusive.cpp (props changed)
   branches/release/libs/serialization/test/test_not_serializable.cpp (props changed)
   branches/release/libs/serialization/test/test_null_ptr.cpp (props changed)
   branches/release/libs/serialization/test/test_nvp.cpp (props changed)
   branches/release/libs/serialization/test/test_object.cpp (props changed)
   branches/release/libs/serialization/test/test_optional.cpp (props changed)
   branches/release/libs/serialization/test/test_pimpl.cpp (props changed)
   branches/release/libs/serialization/test/test_polymorphic.cpp (props changed)
   branches/release/libs/serialization/test/test_polymorphic2.cpp (props changed)
   branches/release/libs/serialization/test/test_polymorphic2.hpp (props changed)
   branches/release/libs/serialization/test/test_polymorphic2imp.cpp (props changed)
   branches/release/libs/serialization/test/test_polymorphic_A.cpp (props changed)
   branches/release/libs/serialization/test/test_polymorphic_A.hpp (props changed)
   branches/release/libs/serialization/test/test_primitive.cpp (props changed)
   branches/release/libs/serialization/test/test_private_base.cpp (props changed)
   branches/release/libs/serialization/test/test_private_ctor.cpp (props changed)
   branches/release/libs/serialization/test/test_recursion.cpp (props changed)
   branches/release/libs/serialization/test/test_registered.cpp (props changed)
   branches/release/libs/serialization/test/test_reset_object_address.cpp (props changed)
   branches/release/libs/serialization/test/test_set.cpp (props changed)
   branches/release/libs/serialization/test/test_shared_ptr.cpp (props changed)
   branches/release/libs/serialization/test/test_shared_ptr_132.cpp (props changed)
   branches/release/libs/serialization/test/test_shared_ptr_multi_base.cpp (props changed)
   branches/release/libs/serialization/test/test_simple_class.cpp (props changed)
   branches/release/libs/serialization/test/test_simple_class_ptr.cpp (props changed)
   branches/release/libs/serialization/test/test_singleton.cpp (props changed)
   branches/release/libs/serialization/test/test_smart_cast.cpp (props changed)
   branches/release/libs/serialization/test/test_split.cpp (props changed)
   branches/release/libs/serialization/test/test_static_warning.cpp (props changed)
   branches/release/libs/serialization/test/test_tools.hpp (props changed)
   branches/release/libs/serialization/test/test_tracking.cpp (props changed)
   branches/release/libs/serialization/test/test_traits_fail.cpp (props changed)
   branches/release/libs/serialization/test/test_traits_pass.cpp (props changed)
   branches/release/libs/serialization/test/test_unregistered.cpp (props changed)
   branches/release/libs/serialization/test/test_utf8_codecvt.cpp (props changed)
   branches/release/libs/serialization/test/test_valarray.cpp (props changed)
   branches/release/libs/serialization/test/test_variant.cpp (props changed)
   branches/release/libs/serialization/test/test_vector.cpp (props changed)
   branches/release/libs/serialization/test/test_void_cast.cpp (props changed)
   branches/release/libs/serialization/test/text_archive.hpp (props changed)
   branches/release/libs/serialization/test/text_warchive.hpp (props changed)
   branches/release/libs/serialization/test/xml_archive.hpp (props changed)
   branches/release/libs/serialization/test/xml_warchive.hpp (props changed)
   branches/release/libs/signals/ (props changed)
   branches/release/libs/signals2/ (props changed)
   branches/release/libs/spirit/ (props changed)
   branches/release/libs/spirit/classic/example/ (props changed)
   branches/release/libs/spirit/doc/ (props changed)
   branches/release/libs/spirit/example/ (props changed)
   branches/release/libs/spirit/phoenix/ (props changed)
   branches/release/libs/spirit/test/ (props changed)
   branches/release/libs/spirit/test/qi/optional.cpp (props changed)
   branches/release/libs/statechart/ (props changed)
   branches/release/libs/static_assert/ (props changed)
   branches/release/libs/system/ (props changed)
   branches/release/libs/thread/ (props changed)
   branches/release/libs/timer/ (props changed)
   branches/release/libs/tr1/ (props changed)
   branches/release/libs/type_traits/ (props changed)
   branches/release/libs/type_traits/doc/ (props changed)
   branches/release/libs/unordered/ (props changed)
   branches/release/libs/utility/ (props changed)
   branches/release/libs/utility/swap.html (props changed)
   branches/release/libs/utility/swap/test/std_bitset.cpp (props changed)
   branches/release/libs/utility/value_init.htm (props changed)
   branches/release/libs/utility/value_init_test.cpp (props changed)
   branches/release/libs/uuid/ (props changed)
   branches/release/libs/wave/ (props changed)
   branches/release/more/ (props changed)
   branches/release/more/getting_started/ (props changed)
   branches/release/rst.css (props changed)
   branches/release/status/ (props changed)
   branches/release/status/Jamfile.v2 (props changed)
   branches/release/status/explicit-failures-markup.xml (props changed)
   branches/release/tools/ (props changed)
   branches/release/tools/bcp/ (props changed)
   branches/release/tools/boostbook/ (props changed)
   branches/release/tools/build/v2/ (props changed)
   branches/release/tools/inspect/ (props changed)
   branches/release/tools/quickbook/ (props changed)
   branches/release/tools/regression/ (props changed)
   branches/release/tools/regression/src/library_status.cpp (props changed)
   branches/release/tools/release/ (props changed)
   branches/release/tools/wave/ (props changed)
Text files modified:
   branches/release/boost/wave/grammars/cpp_defined_grammar.hpp | 7 +-
   branches/release/boost/wave/grammars/cpp_grammar.hpp | 36 ++++++++++------
   branches/release/boost/wave/grammars/cpp_predef_macros_grammar.hpp | 16 ++++--
   branches/release/boost/wave/token_ids.hpp | 60 +++++++++++++++++++----------
   branches/release/boost/wave/util/cpp_iterator.hpp | 82 +++++++++++++++++++++++++--------------
   branches/release/boost/wave/util/cpp_macromap.hpp | 46 ++++++++++++++-------
   branches/release/boost/wave/util/cpp_macromap_utils.hpp | 13 ++++++
   branches/release/boost/wave/util/insert_whitespace_detection.hpp | 5 ++
   branches/release/boost/wave/util/interpret_pragma.hpp | 12 +++--
   branches/release/boost/wave/wave_version.hpp | 6 +-
   branches/release/libs/wave/ChangeLog | 16 +++++++
   branches/release/libs/wave/src/token_ids.cpp | 2
   branches/release/libs/wave/test/testwave/collect_hooks_information.hpp | 48 ++++++++++++++++++++--
   branches/release/libs/wave/test/testwave/testfiles/t_1_037.cpp | 13 +----
   branches/release/libs/wave/test/testwave/testfiles/test.cfg | 1
   branches/release/libs/wave/test/testwave/testwave_app.cpp | 8 +++
   16 files changed, 258 insertions(+), 113 deletions(-)

Modified: branches/release/boost/wave/grammars/cpp_defined_grammar.hpp
==============================================================================
--- branches/release/boost/wave/grammars/cpp_defined_grammar.hpp (original)
+++ branches/release/boost/wave/grammars/cpp_defined_grammar.hpp 2010-10-14 23:39:14 EDT (Thu, 14 Oct 2010)
@@ -85,15 +85,16 @@
                     [
                         spirit_append_actor(self.result_seq)
                     ]
- | pattern_p(KeywordTokenType, TokenTypeMask)
+ | pattern_p(KeywordTokenType, TokenTypeMask|PPTokenFlag)
                     [
                         spirit_append_actor(self.result_seq)
                     ]
- | pattern_p(OperatorTokenType|AltExtTokenType, ExtTokenTypeMask)
+ | pattern_p(OperatorTokenType|AltExtTokenType,
+ ExtTokenTypeMask|PPTokenFlag)
                     [
                         spirit_append_actor(self.result_seq)
                     ]
- | pattern_p(BoolLiteralTokenType, TokenTypeMask)
+ | pattern_p(BoolLiteralTokenType, TokenTypeMask|PPTokenFlag)
                     [
                         spirit_append_actor(self.result_seq)
                     ]

Modified: branches/release/boost/wave/grammars/cpp_grammar.hpp
==============================================================================
--- branches/release/boost/wave/grammars/cpp_grammar.hpp (original)
+++ branches/release/boost/wave/grammars/cpp_grammar.hpp 2010-10-14 23:39:14 EDT (Thu, 14 Oct 2010)
@@ -331,10 +331,12 @@
>> +ppsp
                     ]
>> ( ch_p(T_IDENTIFIER)
- | pattern_p(KeywordTokenType, TokenTypeMask)
+ | pattern_p(KeywordTokenType,
+ TokenTypeMask|PPTokenFlag)
                         | pattern_p(OperatorTokenType|AltExtTokenType,
- ExtTokenTypeMask) // and, bit_and etc.
- | pattern_p(BoolLiteralTokenType, TokenTypeMask) // true/false
+ ExtTokenTypeMask|PPTokenFlag) // and, bit_and etc.
+ | pattern_p(BoolLiteralTokenType,
+ TokenTypeMask|PPTokenFlag) // true/false
                         )
>> ( ( no_node_d[eps_p(ch_p(T_LEFTPAREN))]
>> macro_parameters
@@ -353,10 +355,12 @@
                         no_node_d[ch_p(T_LEFTPAREN) >> *ppsp],
                        !list_p(
                             ( ch_p(T_IDENTIFIER)
- | pattern_p(KeywordTokenType, TokenTypeMask)
+ | pattern_p(KeywordTokenType,
+ TokenTypeMask|PPTokenFlag)
                             | pattern_p(OperatorTokenType|AltExtTokenType,
- ExtTokenTypeMask) // and, bit_and etc.
- | pattern_p(BoolLiteralTokenType, TokenTypeMask) // true/false
+ ExtTokenTypeMask|PPTokenFlag) // and, bit_and etc.
+ | pattern_p(BoolLiteralTokenType,
+ TokenTypeMask|PPTokenFlag) // true/false
 #if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0
                             | ch_p(T_ELLIPSIS)
 #endif
@@ -384,10 +388,12 @@
>> +ppsp
                     ]
>> ( ch_p(T_IDENTIFIER)
- | pattern_p(KeywordTokenType, TokenTypeMask)
+ | pattern_p(KeywordTokenType,
+ TokenTypeMask|PPTokenFlag)
                         | pattern_p(OperatorTokenType|AltExtTokenType,
- ExtTokenTypeMask) // and, bit_and etc.
- | pattern_p(BoolLiteralTokenType, TokenTypeMask) // true/false
+ ExtTokenTypeMask|PPTokenFlag) // and, bit_and etc.
+ | pattern_p(BoolLiteralTokenType,
+ TokenTypeMask|PPTokenFlag) // true/false
                         )
                 ;
 
@@ -417,7 +423,7 @@
                     [
                         ch_p(T_PP_IF)
                         [ store_found_directive_type(self.found_directive) ]
- >> *ppsp
+// >> *ppsp
                     ]
>> +( anychar_p -
                             (ch_p(T_NEWLINE) | ch_p(T_CPPCOMMENT) | ch_p(T_EOF))
@@ -437,7 +443,7 @@
                     [
                         ch_p(T_PP_ELIF)
                         [ store_found_directive_type(self.found_directive) ]
- >> *ppsp
+// >> *ppsp
                     ]
>> +( anychar_p -
                             (ch_p(T_NEWLINE) | ch_p(T_CPPCOMMENT) | ch_p(T_EOF))
@@ -546,10 +552,12 @@
             ppqualifiedname
                 = no_node_d[*ppsp]
>> ( ch_p(T_IDENTIFIER)
- | pattern_p(KeywordTokenType, TokenTypeMask)
+ | pattern_p(KeywordTokenType,
+ TokenTypeMask|PPTokenFlag)
                         | pattern_p(OperatorTokenType|AltExtTokenType,
- ExtTokenTypeMask) // and, bit_and etc.
- | pattern_p(BoolLiteralTokenType, TokenTypeMask) // true/false
+ ExtTokenTypeMask|PPTokenFlag) // and, bit_and etc.
+ | pattern_p(BoolLiteralTokenType,
+ TokenTypeMask|PPTokenFlag) // true/false
                         )
                 ;
 

Modified: branches/release/boost/wave/grammars/cpp_predef_macros_grammar.hpp
==============================================================================
--- branches/release/boost/wave/grammars/cpp_predef_macros_grammar.hpp (original)
+++ branches/release/boost/wave/grammars/cpp_predef_macros_grammar.hpp 2010-10-14 23:39:14 EDT (Thu, 14 Oct 2010)
@@ -76,10 +76,12 @@
         // make it possible to reuse the parse tree traversal code
             plain_define
                 = ( ch_p(T_IDENTIFIER)
- | pattern_p(KeywordTokenType, TokenTypeMask)
+ | pattern_p(KeywordTokenType,
+ TokenTypeMask|PPTokenFlag)
                     | pattern_p(OperatorTokenType|AltExtTokenType,
- ExtTokenTypeMask) // and, bit_and etc.
- | pattern_p(BoolLiteralTokenType, TokenTypeMask) // true/false
+ ExtTokenTypeMask|PPTokenFlag) // and, bit_and etc.
+ | pattern_p(BoolLiteralTokenType,
+ TokenTypeMask|PPTokenFlag) // true/false
                     )
>> !macro_parameters
>> !macro_definition
@@ -91,10 +93,12 @@
                         no_node_d[ch_p(T_LEFTPAREN) >> *ch_p(T_SPACE)],
                        !list_p(
                             ( ch_p(T_IDENTIFIER)
- | pattern_p(KeywordTokenType, TokenTypeMask)
+ | pattern_p(KeywordTokenType,
+ TokenTypeMask|PPTokenFlag)
                             | pattern_p(OperatorTokenType|AltExtTokenType,
- ExtTokenTypeMask) // and, bit_and etc.
- | pattern_p(BoolLiteralTokenType, TokenTypeMask) // true/false
+ ExtTokenTypeMask|PPTokenFlag) // and, bit_and etc.
+ | pattern_p(BoolLiteralTokenType,
+ TokenTypeMask|PPTokenFlag) // true/false
 #if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0
                             | ch_p(T_ELLIPSIS)
 #endif

Modified: branches/release/boost/wave/token_ids.hpp
==============================================================================
--- branches/release/boost/wave/token_ids.hpp (original)
+++ branches/release/boost/wave/token_ids.hpp 2010-10-14 23:39:14 EDT (Thu, 14 Oct 2010)
@@ -44,30 +44,31 @@
 ///////////////////////////////////////////////////////////////////////////////
 // the token_category helps to classify the different token types
 enum token_category {
- IdentifierTokenType = 0x10000000,
- ParameterTokenType = 0x11000000,
- ExtParameterTokenType = 0x11100000,
- KeywordTokenType = 0x20000000,
- OperatorTokenType = 0x30000000,
- LiteralTokenType = 0x40000000,
- IntegerLiteralTokenType = 0x41000000,
- FloatingLiteralTokenType = 0x42000000,
- StringLiteralTokenType = 0x43000000,
- CharacterLiteralTokenType = 0x44000000,
- BoolLiteralTokenType = 0x45000000,
- PPTokenType = 0x50000000,
- PPConditionalTokenType = 0x50800000,
+ IdentifierTokenType = 0x10080000,
+ ParameterTokenType = 0x11080000,
+ ExtParameterTokenType = 0x11180000,
+ KeywordTokenType = 0x20080000,
+ OperatorTokenType = 0x30080000,
+ LiteralTokenType = 0x40080000,
+ IntegerLiteralTokenType = 0x41080000,
+ FloatingLiteralTokenType = 0x42080000,
+ StringLiteralTokenType = 0x43080000,
+ CharacterLiteralTokenType = 0x44080000,
+ BoolLiteralTokenType = 0x45080000,
+ PPTokenType = 0x50080000,
+ PPConditionalTokenType = 0x50880000,
 
     UnknownTokenType = 0xA0000000,
     EOLTokenType = 0xB0000000,
     EOFTokenType = 0xC0000000,
     WhiteSpaceTokenType = 0xD0000000,
- InternalTokenType = 0xE0000000,
-
+ InternalTokenType = 0xE0080000,
+
     TokenTypeMask = 0xFF000000,
     AltTokenType = 0x00100000,
     TriGraphTokenType = 0x00200000,
     AltExtTokenType = 0x00500000, // and, bit_and etc.
+ PPTokenFlag = 0x00080000, // these are 'real' pp-tokens
     ExtTokenTypeMask = 0xFFF00000,
     ExtTokenOnlyMask = 0x00F00000,
     TokenValueMask = 0x000FFFFF,
@@ -262,7 +263,7 @@
     T_EOF = TOKEN_FROM_ID(401, EOFTokenType), // end of file reached
     T_EOI = TOKEN_FROM_ID(402, EOFTokenType), // end of input reached
     T_PP_NUMBER = TOKEN_FROM_ID(403, InternalTokenType),
-
+
 // MS extensions
     T_MSEXT_INT8 = TOKEN_FROM_ID(404, KeywordTokenType),
     T_MSEXT_INT16 = TOKEN_FROM_ID(405, KeywordTokenType),
@@ -287,7 +288,7 @@
     T_IMPORT = TOKEN_FROM_ID(421, KeywordTokenType),
 
     T_LAST_TOKEN_ID,
- T_LAST_TOKEN = ID_FROM_TOKEN(T_LAST_TOKEN_ID),
+ T_LAST_TOKEN = ID_FROM_TOKEN(T_LAST_TOKEN_ID & ~PPTokenFlag),
 
 // pseudo tokens to help streamlining macro replacement, these should not
 // returned from the lexer nor should these be returned from the pp-iterator
@@ -304,11 +305,15 @@
 #define TOKEN_FROM_ID(id, cat) boost::wave::token_id((id) | (cat))
 
 #undef ID_FROM_TOKEN
-#define ID_FROM_TOKEN(tok) ((tok) & ~boost::wave::TokenTypeMask)
+#define ID_FROM_TOKEN(tok) \
+ boost::wave::token_id((tok) & \
+ ~(boost::wave::TokenTypeMask|boost::wave::PPTokenFlag)) \
+ /**/
 
 #undef BASEID_FROM_TOKEN
 #define BASEID_FROM_TOKEN(tok) \
- boost::wave::token_id(((tok) & ~boost::wave::ExtTokenTypeMask)) \
+ boost::wave::token_id((tok) & \
+ ~(boost::wave::ExtTokenTypeMask|boost::wave::PPTokenFlag)) \
     /**/
 #define BASE_TOKEN(tok) \
     boost::wave::token_id((tok) & boost::wave::MainTokenMask) \
@@ -316,13 +321,26 @@
 #define CATEGORY_FROM_TOKEN(tok) ((tok) & boost::wave::TokenTypeMask)
 #define EXTCATEGORY_FROM_TOKEN(tok) ((tok) & boost::wave::ExtTokenTypeMask)
 #define IS_CATEGORY(tok, cat) \
- ((CATEGORY_FROM_TOKEN(tok) == (cat)) ? true : false) \
+ ((CATEGORY_FROM_TOKEN(tok) == CATEGORY_FROM_TOKEN(cat)) ? true : false) \
     /**/
 #define IS_EXTCATEGORY(tok, cat) \
- ((EXTCATEGORY_FROM_TOKEN(tok) == (cat)) ? true : false) \
+ ((EXTCATEGORY_FROM_TOKEN(tok) == EXTCATEGORY_FROM_TOKEN(cat)) ? true : false) \
     /**/
 
 ///////////////////////////////////////////////////////////////////////////////
+// verify whether the given token(-id) represents a valid pp_token
+inline bool is_pp_token(boost::wave::token_id id)
+{
+ return (id & boost::wave::PPTokenFlag) ? true : false;
+}
+
+template <typename TokenT>
+inline bool is_pp_token(TokenT const& tok)
+{
+ return is_pp_token(boost::wave::token_id(tok));
+}
+
+///////////////////////////////////////////////////////////////////////////////
 // return a token name
 BOOST_WAVE_DECL
 BOOST_WAVE_STRINGTYPE get_token_name(token_id tokid);

Modified: branches/release/boost/wave/util/cpp_iterator.hpp
==============================================================================
--- branches/release/boost/wave/util/cpp_iterator.hpp (original)
+++ branches/release/boost/wave/util/cpp_iterator.hpp 2010-10-14 23:39:14 EDT (Thu, 14 Oct 2010)
@@ -306,9 +306,9 @@
     template <typename IteratorT>
     bool extract_identifier(IteratorT &it);
     template <typename IteratorT>
- bool ensure_is_last_on_line(IteratorT& it);
+ bool ensure_is_last_on_line(IteratorT& it, bool call_hook = true);
     template <typename IteratorT>
- bool skip_to_eol_with_check(IteratorT &it);
+ bool skip_to_eol_with_check(IteratorT &it, bool call_hook = true);
 
     bool pp_directive();
     template <typename IteratorT>
@@ -340,8 +340,7 @@
         typename parse_tree_type::const_iterator const &end);
     void on_elif(result_type const& found_directive,
         typename parse_tree_type::const_iterator const &begin,
- typename parse_tree_type::const_iterator const &end,
- token_sequence_type const& found_eoltokens);
+ typename parse_tree_type::const_iterator const &end);
     void on_error(typename parse_tree_type::const_iterator const &begin,
         typename parse_tree_type::const_iterator const &end);
 #if BOOST_WAVE_SUPPORT_WARNING_DIRECTIVE != 0
@@ -663,11 +662,7 @@
                 if (!ctx.get_if_block_status()) {
                 // skip this token because of the disabled #if block
                     whitespace.shift_tokens(id); // whitespace controller
-#if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS != 0
- ctx.get_hooks().skipped_token(act_token);
-#else
- ctx.get_hooks().skipped_token(ctx.derived(), act_token);
-#endif
+ util::call_skipped_token_hook(ctx, act_token);
                     continue;
                 }
                 return act_token;
@@ -676,6 +671,7 @@
 
             if (was_seen_newline && pp_directive()) {
             // a pp directive was found
+// pending_queue.push_back(result_type(T_NEWLINE, "\n", act_pos));
 // seen_newline = true;
 // must_emit_line_directive = true;
 
@@ -698,11 +694,7 @@
                 }
 
             // next token
-#if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS != 0
- ctx.get_hooks().skipped_token(act_token);
-#else
- ctx.get_hooks().skipped_token(ctx.derived(), act_token);
-#endif
+ util::call_skipped_token_hook(ctx, act_token);
                 ++iter_ctx->first;
             }
 
@@ -913,7 +905,7 @@
             }
 
             // this token gets skipped
- call_skipped_token_hook(ctx, *it);
+ util::call_skipped_token_hook(ctx, *it);
         }
         BOOST_ASSERT(it == end || id != T_UNKNOWN);
         return it != end && IS_CATEGORY(id, PPTokenType);
@@ -928,7 +920,7 @@
 
         // this token gets skipped
         if (call_hook)
- call_skipped_token_hook(ctx, *it);
+ util::call_skipped_token_hook(ctx, *it);
 
         for (++it; it != end; ++it) {
         token_id id = token_id(*it);
@@ -937,7 +929,7 @@
                 context_policies::util::ccomment_has_newline(*it))
             {
                 if (call_hook)
- call_skipped_token_hook(ctx, *it);
+ util::call_skipped_token_hook(ctx, *it);
                 ++it; // skip eol/C/C++ comment
                 return true; // no more significant tokens on this line
             }
@@ -947,31 +939,49 @@
 
             // this token gets skipped
             if (call_hook)
- call_skipped_token_hook(ctx, *it);
+ util::call_skipped_token_hook(ctx, *it);
         }
         return false;
     }
 
     ///////////////////////////////////////////////////////////////////////////
     template <typename ContextT, typename IteratorT>
- bool skip_to_eol(ContextT &ctx, IteratorT &it, IteratorT const &end)
+ bool skip_to_eol(ContextT &ctx, IteratorT &it, IteratorT const &end,
+ bool call_hook = true)
     {
         using namespace boost::wave;
 
         for (/**/; it != end; ++it) {
         token_id id = token_id(*it);
 
- call_skipped_token_hook(ctx, *it);
             if (T_CPPCOMMENT == id || T_NEWLINE == id ||
                 context_policies::util::ccomment_has_newline(*it))
             {
+ // always call hook for eol
+ util::call_skipped_token_hook(ctx, *it);
                 ++it; // skip eol/C/C++ comment
                 return true; // found eol
             }
+
+ if (call_hook)
+ util::call_skipped_token_hook(ctx, *it);
         }
         return false;
     }
 
+ ///////////////////////////////////////////////////////////////////////////
+ template <typename ContextT, typename ContainerT>
+ inline void
+ remove_leading_whitespace(ContextT &ctx, ContainerT& c, bool call_hook = true)
+ {
+ typename ContainerT::iterator it = c.begin();
+ while (IS_CATEGORY(*it, WhiteSpaceTokenType)) {
+ typename ContainerT::iterator save = it++;
+ if (call_hook)
+ util::call_skipped_token_hook(ctx, *save);
+ c.erase(save);
+ }
+ }
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -1005,9 +1015,9 @@
 template <typename ContextT>
 template <typename IteratorT>
 inline bool
-pp_iterator_functor<ContextT>::ensure_is_last_on_line(IteratorT& it)
+pp_iterator_functor<ContextT>::ensure_is_last_on_line(IteratorT& it, bool call_hook)
 {
- if (!impl::pp_is_last_on_line(ctx, it, iter_ctx->last, false))
+ if (!impl::pp_is_last_on_line(ctx, it, iter_ctx->last, call_hook))
     {
     // enable error recovery (start over with the next line)
         impl::skip_to_eol(ctx, it, iter_ctx->last);
@@ -1042,10 +1052,10 @@
 template <typename ContextT>
 template <typename IteratorT>
 inline bool
-pp_iterator_functor<ContextT>::skip_to_eol_with_check(IteratorT &it)
+pp_iterator_functor<ContextT>::skip_to_eol_with_check(IteratorT &it, bool call_hook)
 {
     typename ContextT::string_type value ((*it).get_value());
- if (!impl::skip_to_eol(ctx, it, iter_ctx->last) &&
+ if (!impl::skip_to_eol(ctx, it, iter_ctx->last, call_hook) &&
         !need_single_line(ctx.get_language()))
     {
     // The line doesn't end with an eol but eof token.
@@ -1074,6 +1084,7 @@
 {
     token_id id = token_id(*it);
     bool can_exit = true;
+ bool call_hook_in_skip = true;
     if (!ctx.get_if_block_status()) {
         if (IS_EXTCATEGORY(*it, PPConditionalTokenType)) {
         // simulate the if block hierarchy
@@ -1122,6 +1133,9 @@
                 break;
             }
         }
+ else {
+ util::call_skipped_token_hook(ctx, *it);
+ }
     }
     else {
     // try to handle the simple pp directives without parsing
@@ -1207,6 +1221,7 @@
             {
                 on_undefine(it);
             }
+ call_hook_in_skip = false;
             break;
 
         case T_PP_IFDEF: // #ifdef
@@ -1215,6 +1230,7 @@
             {
                 on_ifdef(directive, it);
             }
+ call_hook_in_skip = false;
             break;
 
         case T_PP_IFNDEF: // #ifndef
@@ -1223,6 +1239,7 @@
             {
                 on_ifndef(directive, it);
             }
+ call_hook_in_skip = false;
             break;
 
 #if BOOST_WAVE_SUPPORT_MS_EXTENSIONS != 0
@@ -1241,7 +1258,7 @@
 
 // start over with the next line, if only possible
     if (can_exit) {
- skip_to_eol_with_check(it);
+ skip_to_eol_with_check(it, call_hook_in_skip);
         return true; // may be safely ignored
     }
     return false; // do not ignore this pp directive
@@ -1430,7 +1447,7 @@
         break;
 
     case T_PP_ELIF: // #elif
- on_elif(found_directive, begin_child_it, end_child_it, found_eoltokens);
+ on_elif(found_directive, begin_child_it, end_child_it);
         break;
 
 // case T_PP_ELSE: // #else
@@ -1480,6 +1497,10 @@
         }
         break;
     }
+
+ // properly skip trailing newline for all directives
+ typename token_sequence_type::const_iterator eol = found_eoltokens.begin();
+ impl::skip_to_eol(ctx, eol, found_eoltokens.end());
     return true; // return newline only
 }
 
@@ -1946,6 +1967,8 @@
         make_ref_transform_iterator(end, get_value),
         std::inserter(toexpand, toexpand.end()));
 
+ impl::remove_leading_whitespace(ctx, toexpand);
+
 bool if_status = false;
 grammars::value_error status = grammars::error_noerror;
 token_sequence_type expanded;
@@ -2020,8 +2043,7 @@
 pp_iterator_functor<ContextT>::on_elif(
     result_type const& found_directive,
     typename parse_tree_type::const_iterator const &begin,
- typename parse_tree_type::const_iterator const &end,
- token_sequence_type const& found_eoltokens)
+ typename parse_tree_type::const_iterator const &end)
 {
 // preprocess the given sequence into the provided list
 get_token_value<result_type, parse_node_type> get_value;
@@ -2031,6 +2053,8 @@
         make_ref_transform_iterator(end, get_value),
         std::inserter(toexpand, toexpand.end()));
 
+ impl::remove_leading_whitespace(ctx, toexpand);
+
 // check current if block status
     if (ctx.get_if_block_some_part_status()) {
         if (!ctx.enter_elif_block(false)) {
@@ -2042,10 +2066,8 @@
 
     // skip all the expression and the trailing whitespace
     typename token_sequence_type::iterator begin2 = toexpand.begin();
- typename token_sequence_type::const_iterator begin3 = found_eoltokens.begin();
 
         impl::skip_to_eol(ctx, begin2, toexpand.end());
- impl::skip_to_eol(ctx, begin3, found_eoltokens.end());
         return; // one of previous #if/#elif was true, so don't enter this #elif
     }
 

Modified: branches/release/boost/wave/util/cpp_macromap.hpp
==============================================================================
--- branches/release/boost/wave/util/cpp_macromap.hpp (original)
+++ branches/release/boost/wave/util/cpp_macromap.hpp 2010-10-14 23:39:14 EDT (Thu, 14 Oct 2010)
@@ -970,7 +970,7 @@
         typename ContainerT::size_type i;
 #if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0
         bool is_ellipsis = false;
-
+
             if (IS_EXTCATEGORY((*cit), ExtParameterTokenType)) {
                 BOOST_ASSERT(boost::wave::need_variadics(ctx.get_language()));
                 i = token_id(*cit) - T_EXTPARAMETERBASE;
@@ -981,10 +981,10 @@
             {
                 i = token_id(*cit) - T_PARAMETERBASE;
             }
-
+
             BOOST_ASSERT(i < arguments.size());
             if (use_replaced_arg) {
-
+
 #if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0
                 if (is_ellipsis) {
                 position_type const &pos = (*cit).get_position();
@@ -1276,8 +1276,9 @@
                     seqstart, seqend))
             {
                 // do not expand this macro, just copy the whole sequence
+ expanded.push_back(curr_token);
                 std::copy(seqstart, first,
- std::inserter(replacement_list, replacement_list.end()));
+ std::inserter(expanded, expanded.end()));
                 return false; // no further preprocessing required
             }
 #endif
@@ -1296,7 +1297,7 @@
                   macro_def.macroname, macro_def.macrodefinition, curr_token))
             {
                 // do not expand this macro, just copy the whole sequence
- replacement_list.push_back(curr_token);
+ expanded.push_back(curr_token);
                 ++first; // skip macro name
                 return false; // no further preprocessing required
             }
@@ -1339,7 +1340,7 @@
                   macro_def.macroname, macro_def.macrodefinition, curr_token))
             {
                 // do not expand this macro, just copy the whole sequence
- replacement_list.push_back(curr_token);
+ expanded.push_back(curr_token);
                 ++first; // skip macro name
                 return false; // no further preprocessing required
             }
@@ -1636,7 +1637,13 @@
         lang);
     lexer_type end = lexer_type();
     for (/**/; it != end && T_EOF != token_id(*it); ++it)
+ {
+ // as of Wave V2.0.7 pasting of tokens is valid only if the resulting
+ // tokens are pp_tokens (as mandated by C++0x)
+ if (!is_pp_token(*it))
+ return false;
         rescanned.push_back(*it);
+ }
 
 #if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0
     if (boost::wave::need_variadics(ctx.get_language()))
@@ -1644,8 +1651,6 @@
 #endif
 
 // test if the newly generated token sequence contains more than 1 token
-// the second one is the T_EOF token
-// BOOST_ASSERT(T_EOF == token_id(rescanned.back()));
     return 1 == rescanned.size();
 }
 
@@ -1655,6 +1660,22 @@
 // token sequence.
 //
 ///////////////////////////////////////////////////////////////////////////////
+template <typename Context>
+inline void report_invalid_concatenation(Context& ctx,
+ typename Context::token_type const& prev,
+ typename Context::token_type const& next,
+ typename Context::position_type const& main_pos)
+{
+typename Context::string_type error_string("\"");
+
+ error_string += prev.get_value();
+ error_string += "\" and \"";
+ error_string += next.get_value();
+ error_string += "\"";
+ BOOST_WAVE_THROW_CTX(ctx, preprocess_exception, invalid_concat,
+ error_string.c_str(), main_pos);
+}
+
 template <typename ContextT>
 template <typename ContainerT>
 inline bool
@@ -1725,14 +1746,7 @@
                 !IS_CATEGORY(*prev, WhiteSpaceTokenType) &&
                 !IS_CATEGORY(*next, WhiteSpaceTokenType))
             {
- string_type error_string("\"");
-
- error_string += (*prev).get_value();
- error_string += "\" and \"";
- error_string += (*next).get_value();
- error_string += "\"";
- BOOST_WAVE_THROW_CTX(ctx, preprocess_exception, invalid_concat,
- error_string.c_str(), main_pos);
+ report_invalid_concatenation(ctx, *prev, *next, main_pos);
                 return false;
             }
 

Modified: branches/release/boost/wave/util/cpp_macromap_utils.hpp
==============================================================================
--- branches/release/boost/wave/util/cpp_macromap_utils.hpp (original)
+++ branches/release/boost/wave/util/cpp_macromap_utils.hpp 2010-10-14 23:39:14 EDT (Thu, 14 Oct 2010)
@@ -542,6 +542,19 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
+// call 'skipped_token' preprocessing hook
+template <typename ContextT>
+void call_skipped_token_hook(ContextT& ctx,
+ typename ContextT::token_type const& skipped)
+{
+#if BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS != 0
+ ctx.get_hooks().skipped_token(skipped);
+#else
+ ctx.get_hooks().skipped_token(ctx.derived(), skipped);
+#endif
+}
+
+///////////////////////////////////////////////////////////////////////////////
 } // namespace util
 } // namespace wave
 } // namespace boost

Modified: branches/release/boost/wave/util/insert_whitespace_detection.hpp
==============================================================================
--- branches/release/boost/wave/util/insert_whitespace_detection.hpp (original)
+++ branches/release/boost/wave/util/insert_whitespace_detection.hpp 2010-10-14 23:39:14 EDT (Thu, 14 Oct 2010)
@@ -476,6 +476,11 @@
                 return true; // prevent ->*
             }
             break;
+
+ case T_POUND:
+ if (T_POUND == prev)
+ return true;
+ break;
         }
 
     // FIXME: else, handle operators separately (will catch to many cases)

Modified: branches/release/boost/wave/util/interpret_pragma.hpp
==============================================================================
--- branches/release/boost/wave/util/interpret_pragma.hpp (original)
+++ branches/release/boost/wave/util/interpret_pragma.hpp 2010-10-14 23:39:14 EDT (Thu, 14 Oct 2010)
@@ -85,16 +85,18 @@
                                 [
                                     spirit_assign_actor(option)
                                 ]
- | pattern_p(KeywordTokenType, TokenTypeMask)
+ | pattern_p(KeywordTokenType,
+ TokenTypeMask|PPTokenFlag)
                                 [
                                     spirit_assign_actor(option)
                                 ]
                             | pattern_p(OperatorTokenType|AltExtTokenType,
- ExtTokenTypeMask) // and, bit_and etc.
+ ExtTokenTypeMask|PPTokenFlag) // and, bit_and etc.
                                 [
                                     spirit_assign_actor(option)
                                 ]
- | pattern_p(BoolLiteralTokenType, TokenTypeMask)
+ | pattern_p(BoolLiteralTokenType,
+ TokenTypeMask|PPTokenFlag)
                                 [
                                     spirit_assign_actor(option)
                                 ]
@@ -103,7 +105,7 @@
                                 ch_p(T_LEFTPAREN),
                                 ch_p(T_RIGHTPAREN)
                             )[spirit_assign_actor(values)],
- pattern_p(WhiteSpaceTokenType, TokenTypeMask)).hit)
+ pattern_p(WhiteSpaceTokenType, TokenTypeMask|PPTokenFlag)).hit)
             {
                 BOOST_WAVE_THROW_CTX(ctx, preprocess_exception,
                     ill_formed_pragma_option,
@@ -163,7 +165,7 @@
                                     *(anychar_p[spirit_append_actor(values)] - ch_p(T_NEWLINE))
                                 ]
                             ),
- pattern_p(WhiteSpaceTokenType, TokenTypeMask)
+ pattern_p(WhiteSpaceTokenType, TokenTypeMask|PPTokenFlag)
                        ).hit
                )
             {

Modified: branches/release/boost/wave/wave_version.hpp
==============================================================================
--- branches/release/boost/wave/wave_version.hpp (original)
+++ branches/release/boost/wave/wave_version.hpp 2010-10-14 23:39:14 EDT (Thu, 14 Oct 2010)
@@ -16,11 +16,11 @@
 // BOOST_WAVE_VERSION & 0x0000FF is the sub-minor version
 // BOOST_WAVE_VERSION & 0x00FF00 is the minor version
 // BOOST_WAVE_VERSION & 0xFF0000 is the major version
-#define BOOST_WAVE_VERSION 0x020006
+#define BOOST_WAVE_VERSION 0x020100
 
 // The following defines contain the same information as above
 #define BOOST_WAVE_VERSION_MAJOR 2
-#define BOOST_WAVE_VERSION_MINOR 0
-#define BOOST_WAVE_VERSION_SUBMINOR 6
+#define BOOST_WAVE_VERSION_MINOR 1
+#define BOOST_WAVE_VERSION_SUBMINOR 0
 
 #endif // !defined(WAVE_VERSION_H_9D79ABDB_AC54_4C0A_89B1_F70A2DCFE21E_INCLUDED)

Modified: branches/release/libs/wave/ChangeLog
==============================================================================
--- branches/release/libs/wave/ChangeLog (original)
+++ branches/release/libs/wave/ChangeLog 2010-10-14 23:39:14 EDT (Thu, 14 Oct 2010)
@@ -20,6 +20,22 @@
 
 CHANGELOG
 
+Boost V1.45.0
+- V2.1.0
+- Token pasting is well formed only as long as the formed token(s) are
+ pp_tokens as defined by the C++0x Standard. Until now, Wave allowed for
+ non-pp_tokens to be formed in --variadics mode.
+- Fixed a problem, which prevented reporting /##/ in a macro definition as
+ invalid token pasting.
+- Fixed problem preventing the skipped_token hook to be called for 'inactive'
+ conditional preprocessing directive tokens. Improved overall consistency in
+ reporting skipped tokens to the hooks function when processing conditional
+ preprocessing directives. Added a new test case verifying the skipped_token
+ hook gets called reproducibly (t_2_020.cpp).
+- Fixed a problem with the pp hooks 'expanding_object_like_macro' and
+ 'expanding_function_like_macro', which when returning true were stopping all
+ preprocessing instead of just inhibiting the expansion of the macro.
+
 Boost V1.44.0
 - V2.0.6
 - Added information about the file type to iteration context. This can be

Modified: branches/release/libs/wave/src/token_ids.cpp
==============================================================================
--- branches/release/libs/wave/src/token_ids.cpp (original)
+++ branches/release/libs/wave/src/token_ids.cpp 2010-10-14 23:39:14 EDT (Thu, 14 Oct 2010)
@@ -216,7 +216,7 @@
     BOOST_STATIC_ASSERT(
         sizeof(tok_names)/sizeof(tok_names[0]) == T_LAST_TOKEN-T_FIRST_TOKEN
     );
-
+
     unsigned int id = BASEID_FROM_TOKEN(tokid)-T_FIRST_TOKEN;
     return (id < T_LAST_TOKEN-T_FIRST_TOKEN) ? tok_names[id] : "<UnknownToken>";
 }

Modified: branches/release/libs/wave/test/testwave/collect_hooks_information.hpp
==============================================================================
--- branches/release/libs/wave/test/testwave/collect_hooks_information.hpp (original)
+++ branches/release/libs/wave/test/testwave/collect_hooks_information.hpp 2010-10-14 23:39:14 EDT (Thu, 14 Oct 2010)
@@ -53,6 +53,35 @@
     return handle_filepath(pos.get_file()) + String("(") + linenum.c_str() + ")";
 }
 
+template <typename String>
+inline String repr(String const& value)
+{
+ String result;
+ typename String::const_iterator end = value.end();
+ for (typename String::const_iterator it = value.begin(); it != end; ++it)
+ {
+ typedef typename String::value_type char_type;
+ char_type c = *it;
+ if (c == static_cast<char_type>('\a'))
+ result.append("\\a");
+ else if (c == static_cast<char_type>('\b'))
+ result.append("\\b");
+ else if (c == static_cast<char_type>('\f'))
+ result.append("\\f");
+ else if (c == static_cast<char_type>('\n'))
+ result.append("\\n");
+ else if (c == static_cast<char_type>('\r'))
+ result.append("\\r");
+ else if (c == static_cast<char_type>('\t'))
+ result.append("\\t");
+ else if (c == static_cast<char_type>('\v'))
+ result.append("\\v");
+ else
+ result += static_cast<char_type>(c);
+ }
+ return result;
+}
+
 ///////////////////////////////////////////////////////////////////////////////
 template <typename Token>
 class collect_hooks_information
@@ -62,9 +91,14 @@
 
 public:
     collect_hooks_information(std::string& trace)
- : hooks_trace(trace)
+ : hooks_trace(trace), skipped_token_hooks(false)
     {}
 
+ void set_skipped_token_hooks(bool flag)
+ {
+ skipped_token_hooks = flag;
+ }
+
     ///////////////////////////////////////////////////////////////////////////
     //
     // The function 'expanding_function_like_macro' is called, whenever a
@@ -488,10 +522,13 @@
     void
     skipped_token(Context const& ctx, Token const& token)
     {
-// this generates a lot of noise
-// BOOST_WAVETEST_OSSTREAM strm;
-// strm << "12: " << std::endl;
-// hooks_trace += BOOST_WAVETEST_GETSTRING(strm);
+ // this normally generates a lot of noise
+ if (skipped_token_hooks) {
+ BOOST_WAVETEST_OSSTREAM strm;
+ strm << "12: " << repr(token.get_position()) << ": >"
+ << repr(token.get_value()) << "<" << std::endl;
+ hooks_trace += BOOST_WAVETEST_GETSTRING(strm);
+ }
     }
 
     ///////////////////////////////////////////////////////////////////////////
@@ -790,6 +827,7 @@
 
 private:
     std::string& hooks_trace;
+ bool skipped_token_hooks;
 };
 
 #endif

Modified: branches/release/libs/wave/test/testwave/testfiles/t_1_037.cpp
==============================================================================
--- branches/release/libs/wave/test/testwave/testfiles/t_1_037.cpp (original)
+++ branches/release/libs/wave/test/testwave/testfiles/t_1_037.cpp 2010-10-14 23:39:14 EDT (Thu, 14 Oct 2010)
@@ -7,16 +7,11 @@
     LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 =============================================================================*/
 
-// the following concatenation failed
+// the following concatenation needs to fail (even if this construct is used
+// in some MS headers)
 
-
-//R #line 16 "t_1_037.cpp"
-//R // bool;
+//R
+//E t_1_037.cpp(16): error: pasting the following two tokens does not give a valid preprocessing token: "/" and "/"
 #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/release/libs/wave/test/testwave/testfiles/test.cfg
==============================================================================
--- branches/release/libs/wave/test/testwave/testfiles/test.cfg (original)
+++ branches/release/libs/wave/test/testwave/testfiles/test.cfg 2010-10-14 23:39:14 EDT (Thu, 14 Oct 2010)
@@ -72,6 +72,7 @@
 t_2_017.cpp
 t_2_018.cpp
 t_2_019.cpp
+t_2_020.cpp
 
 #
 # t_3: Predefined macros

Modified: branches/release/libs/wave/test/testwave/testwave_app.cpp
==============================================================================
--- branches/release/libs/wave/test/testwave/testwave_app.cpp (original)
+++ branches/release/libs/wave/test/testwave/testwave_app.cpp 2010-10-14 23:39:14 EDT (Thu, 14 Oct 2010)
@@ -336,6 +336,7 @@
 #if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0
         ("noguard,G", "disable include guard detection")
 #endif
+ ("skipped_token_hooks", "record skipped_token hook calls")
     ;
 }
 
@@ -840,6 +841,13 @@
         std::cerr << "initialise_options: initializing options" << std::endl;
     }
 
+ if (vm.count("skipped_token_hooks")) {
+ if (9 == debuglevel) {
+ std::cerr << "initialise_options: option: skipped_token_hooks" << std::endl;
+ }
+ ctx.get_hooks().set_skipped_token_hooks(true);
+ }
+
 // initialize the given context from the parsed options
 #if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0
 // enable C99 mode, if appropriate (implies variadics)


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