Boost logo

Boost-Commit :

From: eric_at_[hidden]
Date: 2008-03-10 16:14:39


Author: eric_niebler
Date: 2008-03-10 16:14:31 EDT (Mon, 10 Mar 2008)
New Revision: 43554
URL: http://svn.boost.org/trac/boost/changeset/43554

Log:
Merged revisions 43533-43552 via svnmerge from
https://svn.boost.org/svn/boost/trunk

........
  r43534 | eric_niebler | 2008-03-06 23:37:46 -0800 (Thu, 06 Mar 2008) | 1 line
  
  fix oops
........
  r43535 | hkaiser | 2008-03-07 05:26:53 -0800 (Fri, 07 Mar 2008) | 1 line
  
  Wave: more fixes for #1673
........
  r43537 | vladimir_prus | 2008-03-07 08:18:13 -0800 (Fri, 07 Mar 2008) | 1 line
  
  Fix PCH on OSX
........
  r43538 | eric_niebler | 2008-03-07 09:46:38 -0800 (Fri, 07 Mar 2008) | 1 line
  
  use a __pragma to disable a msvc warning, fixes #1672
........
  r43539 | eric_niebler | 2008-03-07 09:47:40 -0800 (Fri, 07 Mar 2008) | 1 line
  
  fix oops
........
  r43540 | hkaiser | 2008-03-07 11:51:26 -0800 (Fri, 07 Mar 2008) | 1 line
  
  Wave: Started to add testing of preprocessor hooks.
........
  r43541 | grafik | 2008-03-07 13:59:06 -0800 (Fri, 07 Mar 2008) | 1 line
  
  Disable exception testing line as it's breaking testing.
........
  r43542 | hkaiser | 2008-03-07 14:53:13 -0800 (Fri, 07 Mar 2008) | 1 line
  
  Wave: Applied a workaround for Intel compilers and for Pathscale.
........
  r43544 | emildotchevski | 2008-03-07 15:07:13 -0800 (Fri, 07 Mar 2008) | 1 line
  
  Hooking up boost exception for testing, second attempt.
........
  r43546 | rwgk | 2008-03-08 20:30:13 -0800 (Sat, 08 Mar 2008) | 1 line
  
  map std::invalid_argument -> Python ValueError
........

Added:
   branches/proto/v3/libs/wave/test/testwave/collect_hooks_information.hpp
      - copied unchanged from r43546, /trunk/libs/wave/test/testwave/collect_hooks_information.hpp
Properties modified:
   branches/proto/v3/ (props changed)
Text files modified:
   branches/proto/v3/boost/foreach.hpp | 14
   branches/proto/v3/boost/wave/cpplexer/cpp_lex_iterator.hpp | 2
   branches/proto/v3/boost/wave/util/cpp_iterator.hpp | 52 +
   branches/proto/v3/libs/python/src/errors.cpp | 4
   branches/proto/v3/libs/wave/ChangeLog | 5
   branches/proto/v3/libs/wave/samples/cpp_tokens/slex_iterator.hpp | 3
   branches/proto/v3/libs/wave/src/cpplexer/re2clex/cpp.re | 840 ++++++++++++++++++++--------------------
   branches/proto/v3/libs/wave/src/cpplexer/re2clex/strict_cpp.re | 840 ++++++++++++++++++++--------------------
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_001.cpp | 16
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_002.cpp | 9
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_003.cpp | 31 +
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_004.cpp | 56 ++
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_005.cpp | 10
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_006.cpp | 30 +
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_007.cpp | 29 +
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_008.cpp | 105 +++++
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_009.cpp | 10
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_010.cpp | 10
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_011.cpp | 13
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_012.cpp | 27 +
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_013.cpp | 53 ++
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_014.cpp | 2
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_015.cpp | 9
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_016.cpp | 11
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_020.cpp | 12
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_021.cpp | 21 +
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_022.cpp | 12
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_023.cpp | 13
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_025.cpp | 15
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_026.cpp | 3
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_029.cpp | 21 +
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_030.cpp | 16
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_031.cpp | 9
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_033.cpp | 15
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_034.cpp | 16
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_035.cpp | 23 +
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_036.cpp | 6
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_037.cpp | 6
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_038.cpp | 5
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_001.cpp | 14
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_002.cpp | 6
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_003.cpp | 6
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_004.cpp | 16
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_005.cpp | 2
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_006.cpp | 13
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_007.cpp | 12
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_008.cpp | 11
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_009.cpp | 33 +
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_010.cpp | 8
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_011.cpp | 6
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_012.cpp | 3
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_013.cpp | 6
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_014.cpp | 28 +
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_015.cpp | 11
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_016.cpp | 7
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_017.cpp | 12
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_3_001.cpp | 3
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_3_002.cpp | 19
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_3_003.cpp | 22 +
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_3_004.cpp | 25 +
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_4_001.cpp | 4
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_4_002.cpp | 9
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_4_004.cpp | 26 +
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_5_030.cpp | 4
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_6_063.cpp | 5
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_6_067.cpp | 5
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_001.cpp | 3
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_002.cpp | 3
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_003.cpp | 15
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_004.cpp | 7
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_006.cpp | 8
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_007.cpp | 5
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_008.cpp | 5
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_009.cpp | 11
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_010.cpp | 41 +
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_011.cpp | 11
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_012.cpp | 6
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_013.cpp | 4
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_016.cpp | 22 +
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_017.cpp | 27 +
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_018.cpp | 5
   branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_019.cpp | 6
   branches/proto/v3/libs/wave/test/testwave/testwave.cpp | 2
   branches/proto/v3/libs/wave/test/testwave/testwave_app.cpp | 196 +++++---
   branches/proto/v3/libs/wave/test/testwave/testwave_app.hpp | 14
   branches/proto/v3/status/Jamfile.v2 | 2
   branches/proto/v3/tools/build/v2/tools/darwin.jam | 4
   branches/proto/v3/tools/wave/cpp.cpp | 6
   88 files changed, 2121 insertions(+), 972 deletions(-)

Modified: branches/proto/v3/boost/foreach.hpp
==============================================================================
--- branches/proto/v3/boost/foreach.hpp (original)
+++ branches/proto/v3/boost/foreach.hpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 2008)
@@ -860,6 +860,13 @@
 } // namespace foreach_detail_
 } // namespace boost
 
+// Suppress a bogus code analysis warning on vc8+
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
+# define BOOST_FOREACH_SUPPRESS_WARNINGS() __pragma(warning(suppress:6001))
+#else
+# define BOOST_FOREACH_SUPPRESS_WARNINGS()
+#endif
+
 // A sneaky way to get the type of the collection without evaluating the expression
 #define BOOST_FOREACH_TYPEOF(COL) \
     (true ? 0 : boost::foreach_detail_::encode_type(COL, boost::foreach_detail_::is_const_(COL)))
@@ -885,7 +892,7 @@
 
 // No variable is needed to track the rvalue-ness of the collection expression
 # define BOOST_FOREACH_PREAMBLE() \
- /**/
+ BOOST_FOREACH_SUPPRESS_WARNINGS()
 
 // Evaluate the collection expression
 # define BOOST_FOREACH_EVALUATE(COL) \
@@ -903,6 +910,7 @@
 
 // Declare a variable to track the rvalue-ness of the collection expression
 # define BOOST_FOREACH_PREAMBLE() \
+ BOOST_FOREACH_SUPPRESS_WARNINGS() \
     if (bool _foreach_is_rvalue = false) {} else
 
 // Evaluate the collection expression, and detect if it is an lvalue or and rvalue
@@ -928,7 +936,7 @@
 
 // No variable is needed to track the rvalue-ness of the collection expression
 # define BOOST_FOREACH_PREAMBLE() \
- /**/
+ BOOST_FOREACH_SUPPRESS_WARNINGS()
 
 // Evaluate the collection expression
 # define BOOST_FOREACH_EVALUATE(COL) \
@@ -948,7 +956,7 @@
 
 // No variable is needed to track the rvalue-ness of the collection expression
 # define BOOST_FOREACH_PREAMBLE() \
- /**/
+ BOOST_FOREACH_SUPPRESS_WARNINGS()
 
 // Evaluate the collection expression
 # define BOOST_FOREACH_EVALUATE(COL) \

Modified: branches/proto/v3/boost/wave/cpplexer/cpp_lex_iterator.hpp
==============================================================================
--- branches/proto/v3/boost/wave/cpplexer/cpp_lex_iterator.hpp (original)
+++ branches/proto/v3/boost/wave/cpplexer/cpp_lex_iterator.hpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 2008)
@@ -61,7 +61,7 @@
             position_type const &pos, boost::wave::language_support language)
     : functor_ptr(lex_input_interface_generator<TokenT>
             ::new_lexer(first, last, pos, language))
-#if 0 != __DECCXX_VER || BOOST_INTEL_CXX_VERSION > 900
+#if 0 != __DECCXX_VER || BOOST_INTEL_CXX_VERSION > 900 || defined(__PGI)
       , eof()
 #endif // 0 != __DECCXX_VER
     {}

Modified: branches/proto/v3/boost/wave/util/cpp_iterator.hpp
==============================================================================
--- branches/proto/v3/boost/wave/util/cpp_iterator.hpp (original)
+++ branches/proto/v3/boost/wave/util/cpp_iterator.hpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 2008)
@@ -65,7 +65,8 @@
>
 inline bool
 retrieve_macroname(ContextT& ctx, ParseNodeT const &node,
- boost::spirit::parser_id id, TokenT &macroname, PositionT const &act_pos)
+ boost::spirit::parser_id id, TokenT &macroname, PositionT& act_pos,
+ bool update_position)
 {
 ParseNodeT const *name_node = 0;
 
@@ -91,16 +92,20 @@
 
 // retrieve the macro name
     macroname = *children.front().value.begin();
+ if (update_position) {
+ macroname.set_position(act_pos);
+ act_pos.set_column(act_pos.get_column() + macroname.get_value().size());
+ }
     return true;
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 // retrieve the macro parameters or the macro definition from the parse tree
-template <typename ParseNodeT, typename TokenT, typename ContainerT>
+template <typename ParseNodeT, typename ContainerT, typename PositionT>
 inline bool
 retrieve_macrodefinition(
     ParseNodeT const &node, boost::spirit::parser_id id,
- ContainerT &macrodefinition, TokenT const &/*t*/)
+ ContainerT &macrodefinition, PositionT& act_pos, bool update_position)
 {
     using namespace boost::wave;
     typedef typename ParseNodeT::const_tree_iterator const_tree_iterator;
@@ -125,11 +130,21 @@
                 {
                     last_nonwhite = inserted;
                 }
+
+ if (update_position) {
+ (*inserted).set_position(act_pos);
+ act_pos.set_column(
+ act_pos.get_column() + (*inserted).get_value().size());
+ }
             }
         }
         
     // trim trailing whitespace (leading whitespace is trimmed by the grammar)
         if (last_nonwhite != macrodefinition.end()) {
+ if (update_position) {
+ act_pos.set_column((*last_nonwhite).get_position().get_column() +
+ (*last_nonwhite).get_value().size());
+ }
             macrodefinition.erase(++last_nonwhite, macrodefinition.end());
         }
         return true;
@@ -161,7 +176,7 @@
         ++begin;
         
 // parse the macro definition
-position_type act_pos("<command line>", 0);
+position_type act_pos("<command line>");
 boost::spirit::tree_parse_info<lexer_type> hit =
     predef_macros_type::parse_predefined_macro(
         lexer_type(begin, end, position_type(), language), lexer_type());
@@ -171,7 +186,7 @@
             macrostring.c_str(), act_pos);
         return false;
     }
-
+
 // retrieve the macro definition from the parse tree
 token_type macroname;
 std::vector<token_type> macroparameters;
@@ -179,12 +194,12 @@
 bool has_parameters = false;
 
     if (!boost::wave::util::retrieve_macroname(ctx, *hit.trees.begin(),
- BOOST_WAVE_PLAIN_DEFINE_ID, macroname, act_pos))
+ BOOST_WAVE_PLAIN_DEFINE_ID, macroname, act_pos, true))
         return false;
     has_parameters = boost::wave::util::retrieve_macrodefinition(*hit.trees.begin(),
- BOOST_WAVE_MACRO_PARAMETERS_ID, macroparameters, token_type());
+ BOOST_WAVE_MACRO_PARAMETERS_ID, macroparameters, act_pos, true);
     boost::wave::util::retrieve_macrodefinition(*hit.trees.begin(),
- BOOST_WAVE_MACRO_DEFINITION_ID, macrodefinition, token_type());
+ BOOST_WAVE_MACRO_DEFINITION_ID, macrodefinition, act_pos, true);
 
 // If no macrodefinition is given, and the macro string does not end with a
 // '=', then the macro should be defined with the value '1'
@@ -283,8 +298,8 @@
         bool include_next);
     
 protected:
- result_type const &get_next_token(bool& skipped_newline);
- result_type const &pp_token(bool& skipped_newline);
+ result_type const &get_next_token();
+ result_type const &pp_token();
 
     bool pp_directive();
     template <typename IteratorT>
@@ -472,7 +487,7 @@
         // get_next_token assigns result to act_token member
             if (skipped_newline)
                 seen_newline = true;
- get_next_token(skipped_newline);
+ get_next_token();
 
         // if comments shouldn't be preserved replace them with newlines
             id = token_id(act_token);
@@ -573,14 +588,14 @@
 ///////////////////////////////////////////////////////////////////////////////
 template <typename ContextT>
 inline typename pp_iterator_functor<ContextT>::result_type const &
-pp_iterator_functor<ContextT>::get_next_token(bool& skipped_newline)
+pp_iterator_functor<ContextT>::get_next_token()
 {
     using namespace boost::wave;
     
 // if there is something in the unput_queue, then return the next token from
 // there (all tokens in the queue are preprocessed already)
     if (!pending_queue.empty() || !unput_queue.empty())
- return pp_token(skipped_newline); // return next token
+ return pp_token(); // return next token
     
 // test for EOF, if there is a pending input context, pop it back and continue
 // parsing with it
@@ -657,7 +672,7 @@
             else if (ctx.get_if_block_status()) {
             // preprocess this token, eat up more, if appropriate, return
             // the next preprocessed token
- return pp_token(skipped_newline);
+ return pp_token();
             }
             else {
             // compilation condition is false: if the current token is a
@@ -785,7 +800,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 template <typename ContextT>
 inline typename pp_iterator_functor<ContextT>::result_type const &
-pp_iterator_functor<ContextT>::pp_token(bool& skipped_newline)
+pp_iterator_functor<ContextT>::pp_token()
 {
     using namespace boost::wave;
 
@@ -1415,14 +1430,15 @@
 std::vector<result_type> macroparameters;
 token_sequence_type macrodefinition;
 bool has_parameters = false;
+position_type pos(act_token.get_position());
 
     if (!boost::wave::util::retrieve_macroname(ctx, node,
- BOOST_WAVE_PLAIN_DEFINE_ID, macroname, act_token.get_position()))
+ BOOST_WAVE_PLAIN_DEFINE_ID, macroname, pos, false))
         return;
     has_parameters = boost::wave::util::retrieve_macrodefinition(node,
- BOOST_WAVE_MACRO_PARAMETERS_ID, macroparameters, act_token);
+ BOOST_WAVE_MACRO_PARAMETERS_ID, macroparameters, pos, false);
     boost::wave::util::retrieve_macrodefinition(node,
- BOOST_WAVE_MACRO_DEFINITION_ID, macrodefinition, act_token);
+ BOOST_WAVE_MACRO_DEFINITION_ID, macrodefinition, pos, false);
 
     if (has_parameters) {
 #if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0

Modified: branches/proto/v3/libs/python/src/errors.cpp
==============================================================================
--- branches/proto/v3/libs/python/src/errors.cpp (original)
+++ branches/proto/v3/libs/python/src/errors.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 2008)
@@ -41,6 +41,10 @@
     {
         PyErr_SetString(PyExc_IndexError, x.what());
     }
+ catch(const std::invalid_argument& x)
+ {
+ PyErr_SetString(PyExc_ValueError, x.what());
+ }
     catch(const std::exception& x)
     {
         PyErr_SetString(PyExc_RuntimeError, x.what());

Modified: branches/proto/v3/libs/wave/ChangeLog
==============================================================================
--- branches/proto/v3/libs/wave/ChangeLog (original)
+++ branches/proto/v3/libs/wave/ChangeLog 2008-03-10 16:14:31 EDT (Mon, 10 Mar 2008)
@@ -169,7 +169,10 @@
   unconditionally between two operators even if one of these was a comma.
 - Fixed #line directive after a macro invocation containing newlines to
   correctly reference the line number.
-
+- Positions of macros defined on the command line now get properly reported as
+ "<command line>":1:...
+- Added testing of the preprocessor hooks.
+
 Boost V1.34.0
 - Wave Version 1.2.4
 - Added the possibility to explicitly enable/disable the generation of #line

Modified: branches/proto/v3/libs/wave/samples/cpp_tokens/slex_iterator.hpp
==============================================================================
--- branches/proto/v3/libs/wave/samples/cpp_tokens/slex_iterator.hpp (original)
+++ branches/proto/v3/libs/wave/samples/cpp_tokens/slex_iterator.hpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 2008)
@@ -18,7 +18,6 @@
 
 #include <boost/assert.hpp>
 #include <boost/shared_ptr.hpp>
-#include <boost/detail/workaround.hpp>
 #include <boost/spirit/iterator/multi_pass.hpp>
 
 #include <boost/wave/language_support.hpp>
@@ -56,7 +55,7 @@
             boost::wave::language_support language)
     : functor_ptr(slex_input_interface<TokenT>
             ::new_lexer(first, last, pos, language))
-#if 0 != __DECCXX_VER || BOOST_WORKAROUND(BOOST_INTEL_LINUX, == 1010)
+#if 0 != __DECCXX_VER || BOOST_INTEL_CXX_VERSION > 900 || defined(__PGI)
       , eof()
 #endif // 0 != __DECCXX_VER
     {}

Modified: branches/proto/v3/libs/wave/src/cpplexer/re2clex/cpp.re
==============================================================================
--- branches/proto/v3/libs/wave/src/cpplexer/re2clex/cpp.re (original)
+++ branches/proto/v3/libs/wave/src/cpplexer/re2clex/cpp.re 2008-03-10 16:14:31 EDT (Mon, 10 Mar 2008)
@@ -1,437 +1,437 @@
-/*=============================================================================
- Boost.Wave: A Standard compliant C++ preprocessor library
-
- Copyright (c) 2001 Daniel C. Nuffer
+/*=============================================================================
+ Boost.Wave: A Standard compliant C++ preprocessor library
+
+ Copyright (c) 2001 Daniel C. Nuffer
     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)
-
- This is a lexer conforming to the Standard with a few exceptions.
- So it does allow the '$' to be part of identifiers. If you need strict
- Standards conforming behaviour, please include the lexer definition
- provided in the file strict_cpp.re.
-
- TODO:
- handle errors better.
-=============================================================================*/
-
-/*!re2c
-re2c:indent:string = " ";
-any = [\t\v\f\r\n\040-\377];
-anyctrl = [\001-\037];
-OctalDigit = [0-7];
-Digit = [0-9];
-HexDigit = [a-fA-F0-9];
-Integer = (("0" [xX] HexDigit+) | ("0" OctalDigit*) | ([1-9] Digit*));
-ExponentStart = [Ee] [+-];
-ExponentPart = [Ee] [+-]? Digit+;
-FractionalConstant = (Digit* "." Digit+) | (Digit+ ".");
-FloatingSuffix = [fF] [lL]? | [lL] [fF]?;
-IntegerSuffix = [uU] [lL]? | [lL] [uU]?;
-LongIntegerSuffix = [uU] ([lL] [lL]) | ([lL] [lL]) [uU]?;
-Backslash = [\\] | "??/";
-EscapeSequence = Backslash ([abfnrtv?'"] | Backslash | "x" HexDigit+ | OctalDigit OctalDigit? OctalDigit?);
-HexQuad = HexDigit HexDigit HexDigit HexDigit;
-UniversalChar = Backslash ("u" HexQuad | "U" HexQuad HexQuad);
-Newline = "\r\n" | "\n" | "\r";
-PPSpace = ([ \t\f\v]|("/*"(any\[*]|Newline|("*"+(any\[*/]|Newline)))*"*"+"/"))*;
-Pound = "#" | "??=" | "%:";
-NonDigit = [a-zA-Z_$] | UniversalChar;
-*/
-
-/*!re2c
- "/*" { goto ccomment; }
- "//" { goto cppcomment; }
- "."? Digit { goto pp_number; }
-
- "asm" { BOOST_WAVE_RET(T_ASM); }
- "auto" { BOOST_WAVE_RET(T_AUTO); }
- "bool" { BOOST_WAVE_RET(T_BOOL); }
- "break" { BOOST_WAVE_RET(T_BREAK); }
- "case" { BOOST_WAVE_RET(T_CASE); }
- "catch" { BOOST_WAVE_RET(T_CATCH); }
- "char" { BOOST_WAVE_RET(T_CHAR); }
- "class" { BOOST_WAVE_RET(T_CLASS); }
- "const" { BOOST_WAVE_RET(T_CONST); }
- "const_cast" { BOOST_WAVE_RET(T_CONSTCAST); }
- "continue" { BOOST_WAVE_RET(T_CONTINUE); }
- "default" { BOOST_WAVE_RET(T_DEFAULT); }
- "delete" { BOOST_WAVE_RET(T_DELETE); }
- "do" { BOOST_WAVE_RET(T_DO); }
- "double" { BOOST_WAVE_RET(T_DOUBLE); }
- "dynamic_cast" { BOOST_WAVE_RET(T_DYNAMICCAST); }
- "else" { BOOST_WAVE_RET(T_ELSE); }
- "enum" { BOOST_WAVE_RET(T_ENUM); }
- "explicit" { BOOST_WAVE_RET(T_EXPLICIT); }
- "export" { BOOST_WAVE_RET(T_EXPORT); }
- "extern" { BOOST_WAVE_RET(T_EXTERN); }
- "false" { BOOST_WAVE_RET(T_FALSE); }
- "float" { BOOST_WAVE_RET(T_FLOAT); }
- "for" { BOOST_WAVE_RET(T_FOR); }
- "friend" { BOOST_WAVE_RET(T_FRIEND); }
- "goto" { BOOST_WAVE_RET(T_GOTO); }
- "if" { BOOST_WAVE_RET(T_IF); }
- "import" { BOOST_WAVE_RET(s->enable_import_keyword ? T_IMPORT : T_IDENTIFIER); }
- "inline" { BOOST_WAVE_RET(T_INLINE); }
- "int" { BOOST_WAVE_RET(T_INT); }
- "long" { BOOST_WAVE_RET(T_LONG); }
- "mutable" { BOOST_WAVE_RET(T_MUTABLE); }
- "namespace" { BOOST_WAVE_RET(T_NAMESPACE); }
- "new" { BOOST_WAVE_RET(T_NEW); }
- "operator" { BOOST_WAVE_RET(T_OPERATOR); }
- "private" { BOOST_WAVE_RET(T_PRIVATE); }
- "protected" { BOOST_WAVE_RET(T_PROTECTED); }
- "public" { BOOST_WAVE_RET(T_PUBLIC); }
- "register" { BOOST_WAVE_RET(T_REGISTER); }
- "reinterpret_cast" { BOOST_WAVE_RET(T_REINTERPRETCAST); }
- "return" { BOOST_WAVE_RET(T_RETURN); }
- "short" { BOOST_WAVE_RET(T_SHORT); }
- "signed" { BOOST_WAVE_RET(T_SIGNED); }
- "sizeof" { BOOST_WAVE_RET(T_SIZEOF); }
- "static" { BOOST_WAVE_RET(T_STATIC); }
- "static_cast" { BOOST_WAVE_RET(T_STATICCAST); }
- "struct" { BOOST_WAVE_RET(T_STRUCT); }
- "switch" { BOOST_WAVE_RET(T_SWITCH); }
- "template" { BOOST_WAVE_RET(T_TEMPLATE); }
- "this" { BOOST_WAVE_RET(T_THIS); }
- "throw" { BOOST_WAVE_RET(T_THROW); }
- "true" { BOOST_WAVE_RET(T_TRUE); }
- "try" { BOOST_WAVE_RET(T_TRY); }
- "typedef" { BOOST_WAVE_RET(T_TYPEDEF); }
- "typeid" { BOOST_WAVE_RET(T_TYPEID); }
- "typename" { BOOST_WAVE_RET(T_TYPENAME); }
- "union" { BOOST_WAVE_RET(T_UNION); }
- "unsigned" { BOOST_WAVE_RET(T_UNSIGNED); }
- "using" { BOOST_WAVE_RET(T_USING); }
- "virtual" { BOOST_WAVE_RET(T_VIRTUAL); }
- "void" { BOOST_WAVE_RET(T_VOID); }
- "volatile" { BOOST_WAVE_RET(T_VOLATILE); }
- "wchar_t" { BOOST_WAVE_RET(T_WCHART); }
- "while" { BOOST_WAVE_RET(T_WHILE); }
-
- "__int8" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_INT8 : T_IDENTIFIER); }
- "__int16" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_INT16 : T_IDENTIFIER); }
- "__int32" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_INT32 : T_IDENTIFIER); }
- "__int64" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_INT64 : T_IDENTIFIER); }
- "_"? "_based" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_BASED : T_IDENTIFIER); }
- "_"? "_declspec" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_DECLSPEC : T_IDENTIFIER); }
- "_"? "_cdecl" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_CDECL : T_IDENTIFIER); }
- "_"? "_fastcall" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_FASTCALL : T_IDENTIFIER); }
- "_"? "_stdcall" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_STDCALL : T_IDENTIFIER); }
- "__try" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_TRY : T_IDENTIFIER); }
- "__except" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_EXCEPT : T_IDENTIFIER); }
- "__finally" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_FINALLY : T_IDENTIFIER); }
- "__leave" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_LEAVE : T_IDENTIFIER); }
- "_"? "_inline" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_INLINE : T_IDENTIFIER); }
- "_"? "_asm" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_ASM : T_IDENTIFIER); }
-
- "{" { BOOST_WAVE_RET(T_LEFTBRACE); }
- "??<" { BOOST_WAVE_RET(T_LEFTBRACE_TRIGRAPH); }
- "<%" { BOOST_WAVE_RET(T_LEFTBRACE_ALT); }
- "}" { BOOST_WAVE_RET(T_RIGHTBRACE); }
- "??>" { BOOST_WAVE_RET(T_RIGHTBRACE_TRIGRAPH); }
- "%>" { BOOST_WAVE_RET(T_RIGHTBRACE_ALT); }
- "[" { BOOST_WAVE_RET(T_LEFTBRACKET); }
- "??(" { BOOST_WAVE_RET(T_LEFTBRACKET_TRIGRAPH); }
- "<:" { BOOST_WAVE_RET(T_LEFTBRACKET_ALT); }
- "]" { BOOST_WAVE_RET(T_RIGHTBRACKET); }
- "??)" { BOOST_WAVE_RET(T_RIGHTBRACKET_TRIGRAPH); }
- ":>" { BOOST_WAVE_RET(T_RIGHTBRACKET_ALT); }
- "#" { BOOST_WAVE_RET(T_POUND); }
- "%:" { BOOST_WAVE_RET(T_POUND_ALT); }
- "??=" { BOOST_WAVE_RET(T_POUND_TRIGRAPH); }
- "##" { BOOST_WAVE_RET(T_POUND_POUND); }
- "#??=" { BOOST_WAVE_RET(T_POUND_POUND_TRIGRAPH); }
- "??=#" { BOOST_WAVE_RET(T_POUND_POUND_TRIGRAPH); }
- "??=??=" { BOOST_WAVE_RET(T_POUND_POUND_TRIGRAPH); }
- "%:%:" { BOOST_WAVE_RET(T_POUND_POUND_ALT); }
- "(" { BOOST_WAVE_RET(T_LEFTPAREN); }
- ")" { BOOST_WAVE_RET(T_RIGHTPAREN); }
- ";" { BOOST_WAVE_RET(T_SEMICOLON); }
- ":" { BOOST_WAVE_RET(T_COLON); }
- "..." { BOOST_WAVE_RET(T_ELLIPSIS); }
- "?" { BOOST_WAVE_RET(T_QUESTION_MARK); }
- "::"
- {
- if (s->act_in_c99_mode) {
- --YYCURSOR;
- BOOST_WAVE_RET(T_COLON);
- }
- else {
- BOOST_WAVE_RET(T_COLON_COLON);
- }
- }
- "." { BOOST_WAVE_RET(T_DOT); }
- ".*"
- {
- if (s->act_in_c99_mode) {
- --YYCURSOR;
- BOOST_WAVE_RET(T_DOT);
- }
- else {
- BOOST_WAVE_RET(T_DOTSTAR);
- }
- }
- "+" { BOOST_WAVE_RET(T_PLUS); }
- "-" { BOOST_WAVE_RET(T_MINUS); }
- "*" { BOOST_WAVE_RET(T_STAR); }
- "/" { BOOST_WAVE_RET(T_DIVIDE); }
- "%" { BOOST_WAVE_RET(T_PERCENT); }
- "^" { BOOST_WAVE_RET(T_XOR); }
- "??'" { BOOST_WAVE_RET(T_XOR_TRIGRAPH); }
- "xor" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_XOR_ALT); }
- "&" { BOOST_WAVE_RET(T_AND); }
- "bitand" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_AND_ALT); }
- "|" { BOOST_WAVE_RET(T_OR); }
- "bitor" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_OR_ALT); }
- "??!" { BOOST_WAVE_RET(T_OR_TRIGRAPH); }
- "~" { BOOST_WAVE_RET(T_COMPL); }
- "??-" { BOOST_WAVE_RET(T_COMPL_TRIGRAPH); }
- "compl" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_COMPL_ALT); }
- "!" { BOOST_WAVE_RET(T_NOT); }
- "not" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_NOT_ALT); }
- "=" { BOOST_WAVE_RET(T_ASSIGN); }
- "<" { BOOST_WAVE_RET(T_LESS); }
- ">" { BOOST_WAVE_RET(T_GREATER); }
- "+=" { BOOST_WAVE_RET(T_PLUSASSIGN); }
- "-=" { BOOST_WAVE_RET(T_MINUSASSIGN); }
- "*=" { BOOST_WAVE_RET(T_STARASSIGN); }
- "/=" { BOOST_WAVE_RET(T_DIVIDEASSIGN); }
- "%=" { BOOST_WAVE_RET(T_PERCENTASSIGN); }
- "^=" { BOOST_WAVE_RET(T_XORASSIGN); }
- "xor_eq" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_XORASSIGN_ALT); }
- "??'=" { BOOST_WAVE_RET(T_XORASSIGN_TRIGRAPH); }
- "&=" { BOOST_WAVE_RET(T_ANDASSIGN); }
- "and_eq" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_ANDASSIGN_ALT); }
- "|=" { BOOST_WAVE_RET(T_ORASSIGN); }
- "or_eq" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_ORASSIGN_ALT); }
- "??!=" { BOOST_WAVE_RET(T_ORASSIGN_TRIGRAPH); }
- "<<" { BOOST_WAVE_RET(T_SHIFTLEFT); }
- ">>" { BOOST_WAVE_RET(T_SHIFTRIGHT); }
- ">>=" { BOOST_WAVE_RET(T_SHIFTRIGHTASSIGN); }
- "<<=" { BOOST_WAVE_RET(T_SHIFTLEFTASSIGN); }
- "==" { BOOST_WAVE_RET(T_EQUAL); }
- "!=" { BOOST_WAVE_RET(T_NOTEQUAL); }
- "not_eq" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_NOTEQUAL_ALT); }
- "<=" { BOOST_WAVE_RET(T_LESSEQUAL); }
- ">=" { BOOST_WAVE_RET(T_GREATEREQUAL); }
- "&&" { BOOST_WAVE_RET(T_ANDAND); }
- "and" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_ANDAND_ALT); }
- "||" { BOOST_WAVE_RET(T_OROR); }
- "??!|" { BOOST_WAVE_RET(T_OROR_TRIGRAPH); }
- "|??!" { BOOST_WAVE_RET(T_OROR_TRIGRAPH); }
- "or" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_OROR_ALT); }
- "??!??!" { BOOST_WAVE_RET(T_OROR_TRIGRAPH); }
- "++" { BOOST_WAVE_RET(T_PLUSPLUS); }
- "--" { BOOST_WAVE_RET(T_MINUSMINUS); }
- "," { BOOST_WAVE_RET(T_COMMA); }
- "->*"
- {
- if (s->act_in_c99_mode) {
- --YYCURSOR;
- BOOST_WAVE_RET(T_ARROW);
- }
- else {
- BOOST_WAVE_RET(T_ARROWSTAR);
- }
- }
- "->" { BOOST_WAVE_RET(T_ARROW); }
- "??/" { BOOST_WAVE_RET(T_ANY_TRIGRAPH); }
-
-
- ([a-zA-Z_$] | UniversalChar) ([a-zA-Z_0-9$] | UniversalChar)*
- { BOOST_WAVE_RET(T_IDENTIFIER); }
-
- "L"? (['] (EscapeSequence|any\[\n\r\\']|UniversalChar)+ ['])
- { BOOST_WAVE_RET(T_CHARLIT); }
-
- "L"? (["] (EscapeSequence|any\[\n\r\\"]|UniversalChar)* ["])
- { BOOST_WAVE_RET(T_STRINGLIT); }
-
-
- Pound PPSpace ( "include" | "include_next") PPSpace "<" (any\[\n\r>])+ ">"
- { BOOST_WAVE_RET(T_PP_HHEADER); }
-
- Pound PPSpace ( "include" | "include_next") PPSpace "\"" (any\[\n\r"])+ "\""
- { BOOST_WAVE_RET(T_PP_QHEADER); }
-
- Pound PPSpace ( "include" | "include_next") PPSpace
- { BOOST_WAVE_RET(T_PP_INCLUDE); }
-
- Pound PPSpace "if" { BOOST_WAVE_RET(T_PP_IF); }
- Pound PPSpace "ifdef" { BOOST_WAVE_RET(T_PP_IFDEF); }
- Pound PPSpace "ifndef" { BOOST_WAVE_RET(T_PP_IFNDEF); }
- Pound PPSpace "else" { BOOST_WAVE_RET(T_PP_ELSE); }
- Pound PPSpace "elif" { BOOST_WAVE_RET(T_PP_ELIF); }
- Pound PPSpace "endif" { BOOST_WAVE_RET(T_PP_ENDIF); }
- Pound PPSpace "define" { BOOST_WAVE_RET(T_PP_DEFINE); }
- Pound PPSpace "undef" { BOOST_WAVE_RET(T_PP_UNDEF); }
- Pound PPSpace "line" { BOOST_WAVE_RET(T_PP_LINE); }
- Pound PPSpace "error" { BOOST_WAVE_RET(T_PP_ERROR); }
- Pound PPSpace "pragma" { BOOST_WAVE_RET(T_PP_PRAGMA); }
-
- Pound PPSpace "warning" { BOOST_WAVE_RET(T_PP_WARNING); }
-
- Pound PPSpace "region" { BOOST_WAVE_RET(T_MSEXT_PP_REGION); }
- Pound PPSpace "endregion" { BOOST_WAVE_RET(T_MSEXT_PP_ENDREGION); }
-
- [ \t\v\f]+
- { BOOST_WAVE_RET(T_SPACE); }
-
- Newline
- {
- s->line++;
- cursor.column = 1;
- BOOST_WAVE_RET(T_NEWLINE);
- }
-
- "\000"
- {
- if (s->eof && cursor != s->eof)
- {
- BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
+ 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)
+
+ This is a lexer conforming to the Standard with a few exceptions.
+ So it does allow the '$' to be part of identifiers. If you need strict
+ Standards conforming behaviour, please include the lexer definition
+ provided in the file strict_cpp.re.
+
+ TODO:
+ handle errors better.
+=============================================================================*/
+
+/*!re2c
+re2c:indent:string = " ";
+any = [\t\v\f\r\n\040-\377];
+anyctrl = [\001-\037];
+OctalDigit = [0-7];
+Digit = [0-9];
+HexDigit = [a-fA-F0-9];
+Integer = (("0" [xX] HexDigit+) | ("0" OctalDigit*) | ([1-9] Digit*));
+ExponentStart = [Ee] [+-];
+ExponentPart = [Ee] [+-]? Digit+;
+FractionalConstant = (Digit* "." Digit+) | (Digit+ ".");
+FloatingSuffix = [fF] [lL]? | [lL] [fF]?;
+IntegerSuffix = [uU] [lL]? | [lL] [uU]?;
+LongIntegerSuffix = [uU] ([lL] [lL]) | ([lL] [lL]) [uU]?;
+Backslash = [\\] | "??/";
+EscapeSequence = Backslash ([abfnrtv?'"] | Backslash | "x" HexDigit+ | OctalDigit OctalDigit? OctalDigit?);
+HexQuad = HexDigit HexDigit HexDigit HexDigit;
+UniversalChar = Backslash ("u" HexQuad | "U" HexQuad HexQuad);
+Newline = "\r\n" | "\n" | "\r";
+PPSpace = ([ \t\f\v]|("/*"(any\[*]|Newline|("*"+(any\[*/]|Newline)))*"*"+"/"))*;
+Pound = "#" | "??=" | "%:";
+NonDigit = [a-zA-Z_$] | UniversalChar;
+*/
+
+/*!re2c
+ "/*" { goto ccomment; }
+ "//" { goto cppcomment; }
+ "."? Digit { goto pp_number; }
+
+ "asm" { BOOST_WAVE_RET(T_ASM); }
+ "auto" { BOOST_WAVE_RET(T_AUTO); }
+ "bool" { BOOST_WAVE_RET(T_BOOL); }
+ "break" { BOOST_WAVE_RET(T_BREAK); }
+ "case" { BOOST_WAVE_RET(T_CASE); }
+ "catch" { BOOST_WAVE_RET(T_CATCH); }
+ "char" { BOOST_WAVE_RET(T_CHAR); }
+ "class" { BOOST_WAVE_RET(T_CLASS); }
+ "const" { BOOST_WAVE_RET(T_CONST); }
+ "const_cast" { BOOST_WAVE_RET(T_CONSTCAST); }
+ "continue" { BOOST_WAVE_RET(T_CONTINUE); }
+ "default" { BOOST_WAVE_RET(T_DEFAULT); }
+ "delete" { BOOST_WAVE_RET(T_DELETE); }
+ "do" { BOOST_WAVE_RET(T_DO); }
+ "double" { BOOST_WAVE_RET(T_DOUBLE); }
+ "dynamic_cast" { BOOST_WAVE_RET(T_DYNAMICCAST); }
+ "else" { BOOST_WAVE_RET(T_ELSE); }
+ "enum" { BOOST_WAVE_RET(T_ENUM); }
+ "explicit" { BOOST_WAVE_RET(T_EXPLICIT); }
+ "export" { BOOST_WAVE_RET(T_EXPORT); }
+ "extern" { BOOST_WAVE_RET(T_EXTERN); }
+ "false" { BOOST_WAVE_RET(T_FALSE); }
+ "float" { BOOST_WAVE_RET(T_FLOAT); }
+ "for" { BOOST_WAVE_RET(T_FOR); }
+ "friend" { BOOST_WAVE_RET(T_FRIEND); }
+ "goto" { BOOST_WAVE_RET(T_GOTO); }
+ "if" { BOOST_WAVE_RET(T_IF); }
+ "import" { BOOST_WAVE_RET(s->enable_import_keyword ? T_IMPORT : T_IDENTIFIER); }
+ "inline" { BOOST_WAVE_RET(T_INLINE); }
+ "int" { BOOST_WAVE_RET(T_INT); }
+ "long" { BOOST_WAVE_RET(T_LONG); }
+ "mutable" { BOOST_WAVE_RET(T_MUTABLE); }
+ "namespace" { BOOST_WAVE_RET(T_NAMESPACE); }
+ "new" { BOOST_WAVE_RET(T_NEW); }
+ "operator" { BOOST_WAVE_RET(T_OPERATOR); }
+ "private" { BOOST_WAVE_RET(T_PRIVATE); }
+ "protected" { BOOST_WAVE_RET(T_PROTECTED); }
+ "public" { BOOST_WAVE_RET(T_PUBLIC); }
+ "register" { BOOST_WAVE_RET(T_REGISTER); }
+ "reinterpret_cast" { BOOST_WAVE_RET(T_REINTERPRETCAST); }
+ "return" { BOOST_WAVE_RET(T_RETURN); }
+ "short" { BOOST_WAVE_RET(T_SHORT); }
+ "signed" { BOOST_WAVE_RET(T_SIGNED); }
+ "sizeof" { BOOST_WAVE_RET(T_SIZEOF); }
+ "static" { BOOST_WAVE_RET(T_STATIC); }
+ "static_cast" { BOOST_WAVE_RET(T_STATICCAST); }
+ "struct" { BOOST_WAVE_RET(T_STRUCT); }
+ "switch" { BOOST_WAVE_RET(T_SWITCH); }
+ "template" { BOOST_WAVE_RET(T_TEMPLATE); }
+ "this" { BOOST_WAVE_RET(T_THIS); }
+ "throw" { BOOST_WAVE_RET(T_THROW); }
+ "true" { BOOST_WAVE_RET(T_TRUE); }
+ "try" { BOOST_WAVE_RET(T_TRY); }
+ "typedef" { BOOST_WAVE_RET(T_TYPEDEF); }
+ "typeid" { BOOST_WAVE_RET(T_TYPEID); }
+ "typename" { BOOST_WAVE_RET(T_TYPENAME); }
+ "union" { BOOST_WAVE_RET(T_UNION); }
+ "unsigned" { BOOST_WAVE_RET(T_UNSIGNED); }
+ "using" { BOOST_WAVE_RET(T_USING); }
+ "virtual" { BOOST_WAVE_RET(T_VIRTUAL); }
+ "void" { BOOST_WAVE_RET(T_VOID); }
+ "volatile" { BOOST_WAVE_RET(T_VOLATILE); }
+ "wchar_t" { BOOST_WAVE_RET(T_WCHART); }
+ "while" { BOOST_WAVE_RET(T_WHILE); }
+
+ "__int8" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_INT8 : T_IDENTIFIER); }
+ "__int16" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_INT16 : T_IDENTIFIER); }
+ "__int32" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_INT32 : T_IDENTIFIER); }
+ "__int64" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_INT64 : T_IDENTIFIER); }
+ "_"? "_based" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_BASED : T_IDENTIFIER); }
+ "_"? "_declspec" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_DECLSPEC : T_IDENTIFIER); }
+ "_"? "_cdecl" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_CDECL : T_IDENTIFIER); }
+ "_"? "_fastcall" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_FASTCALL : T_IDENTIFIER); }
+ "_"? "_stdcall" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_STDCALL : T_IDENTIFIER); }
+ "__try" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_TRY : T_IDENTIFIER); }
+ "__except" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_EXCEPT : T_IDENTIFIER); }
+ "__finally" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_FINALLY : T_IDENTIFIER); }
+ "__leave" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_LEAVE : T_IDENTIFIER); }
+ "_"? "_inline" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_INLINE : T_IDENTIFIER); }
+ "_"? "_asm" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_ASM : T_IDENTIFIER); }
+
+ "{" { BOOST_WAVE_RET(T_LEFTBRACE); }
+ "??<" { BOOST_WAVE_RET(T_LEFTBRACE_TRIGRAPH); }
+ "<%" { BOOST_WAVE_RET(T_LEFTBRACE_ALT); }
+ "}" { BOOST_WAVE_RET(T_RIGHTBRACE); }
+ "??>" { BOOST_WAVE_RET(T_RIGHTBRACE_TRIGRAPH); }
+ "%>" { BOOST_WAVE_RET(T_RIGHTBRACE_ALT); }
+ "[" { BOOST_WAVE_RET(T_LEFTBRACKET); }
+ "??(" { BOOST_WAVE_RET(T_LEFTBRACKET_TRIGRAPH); }
+ "<:" { BOOST_WAVE_RET(T_LEFTBRACKET_ALT); }
+ "]" { BOOST_WAVE_RET(T_RIGHTBRACKET); }
+ "??)" { BOOST_WAVE_RET(T_RIGHTBRACKET_TRIGRAPH); }
+ ":>" { BOOST_WAVE_RET(T_RIGHTBRACKET_ALT); }
+ "#" { BOOST_WAVE_RET(T_POUND); }
+ "%:" { BOOST_WAVE_RET(T_POUND_ALT); }
+ "??=" { BOOST_WAVE_RET(T_POUND_TRIGRAPH); }
+ "##" { BOOST_WAVE_RET(T_POUND_POUND); }
+ "#??=" { BOOST_WAVE_RET(T_POUND_POUND_TRIGRAPH); }
+ "??=#" { BOOST_WAVE_RET(T_POUND_POUND_TRIGRAPH); }
+ "??=??=" { BOOST_WAVE_RET(T_POUND_POUND_TRIGRAPH); }
+ "%:%:" { BOOST_WAVE_RET(T_POUND_POUND_ALT); }
+ "(" { BOOST_WAVE_RET(T_LEFTPAREN); }
+ ")" { BOOST_WAVE_RET(T_RIGHTPAREN); }
+ ";" { BOOST_WAVE_RET(T_SEMICOLON); }
+ ":" { BOOST_WAVE_RET(T_COLON); }
+ "..." { BOOST_WAVE_RET(T_ELLIPSIS); }
+ "?" { BOOST_WAVE_RET(T_QUESTION_MARK); }
+ "::"
+ {
+ if (s->act_in_c99_mode) {
+ --YYCURSOR;
+ BOOST_WAVE_RET(T_COLON);
+ }
+ else {
+ BOOST_WAVE_RET(T_COLON_COLON);
+ }
+ }
+ "." { BOOST_WAVE_RET(T_DOT); }
+ ".*"
+ {
+ if (s->act_in_c99_mode) {
+ --YYCURSOR;
+ BOOST_WAVE_RET(T_DOT);
+ }
+ else {
+ BOOST_WAVE_RET(T_DOTSTAR);
+ }
+ }
+ "+" { BOOST_WAVE_RET(T_PLUS); }
+ "-" { BOOST_WAVE_RET(T_MINUS); }
+ "*" { BOOST_WAVE_RET(T_STAR); }
+ "/" { BOOST_WAVE_RET(T_DIVIDE); }
+ "%" { BOOST_WAVE_RET(T_PERCENT); }
+ "^" { BOOST_WAVE_RET(T_XOR); }
+ "??'" { BOOST_WAVE_RET(T_XOR_TRIGRAPH); }
+ "xor" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_XOR_ALT); }
+ "&" { BOOST_WAVE_RET(T_AND); }
+ "bitand" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_AND_ALT); }
+ "|" { BOOST_WAVE_RET(T_OR); }
+ "bitor" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_OR_ALT); }
+ "??!" { BOOST_WAVE_RET(T_OR_TRIGRAPH); }
+ "~" { BOOST_WAVE_RET(T_COMPL); }
+ "??-" { BOOST_WAVE_RET(T_COMPL_TRIGRAPH); }
+ "compl" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_COMPL_ALT); }
+ "!" { BOOST_WAVE_RET(T_NOT); }
+ "not" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_NOT_ALT); }
+ "=" { BOOST_WAVE_RET(T_ASSIGN); }
+ "<" { BOOST_WAVE_RET(T_LESS); }
+ ">" { BOOST_WAVE_RET(T_GREATER); }
+ "+=" { BOOST_WAVE_RET(T_PLUSASSIGN); }
+ "-=" { BOOST_WAVE_RET(T_MINUSASSIGN); }
+ "*=" { BOOST_WAVE_RET(T_STARASSIGN); }
+ "/=" { BOOST_WAVE_RET(T_DIVIDEASSIGN); }
+ "%=" { BOOST_WAVE_RET(T_PERCENTASSIGN); }
+ "^=" { BOOST_WAVE_RET(T_XORASSIGN); }
+ "xor_eq" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_XORASSIGN_ALT); }
+ "??'=" { BOOST_WAVE_RET(T_XORASSIGN_TRIGRAPH); }
+ "&=" { BOOST_WAVE_RET(T_ANDASSIGN); }
+ "and_eq" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_ANDASSIGN_ALT); }
+ "|=" { BOOST_WAVE_RET(T_ORASSIGN); }
+ "or_eq" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_ORASSIGN_ALT); }
+ "??!=" { BOOST_WAVE_RET(T_ORASSIGN_TRIGRAPH); }
+ "<<" { BOOST_WAVE_RET(T_SHIFTLEFT); }
+ ">>" { BOOST_WAVE_RET(T_SHIFTRIGHT); }
+ ">>=" { BOOST_WAVE_RET(T_SHIFTRIGHTASSIGN); }
+ "<<=" { BOOST_WAVE_RET(T_SHIFTLEFTASSIGN); }
+ "==" { BOOST_WAVE_RET(T_EQUAL); }
+ "!=" { BOOST_WAVE_RET(T_NOTEQUAL); }
+ "not_eq" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_NOTEQUAL_ALT); }
+ "<=" { BOOST_WAVE_RET(T_LESSEQUAL); }
+ ">=" { BOOST_WAVE_RET(T_GREATEREQUAL); }
+ "&&" { BOOST_WAVE_RET(T_ANDAND); }
+ "and" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_ANDAND_ALT); }
+ "||" { BOOST_WAVE_RET(T_OROR); }
+ "??!|" { BOOST_WAVE_RET(T_OROR_TRIGRAPH); }
+ "|??!" { BOOST_WAVE_RET(T_OROR_TRIGRAPH); }
+ "or" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_OROR_ALT); }
+ "??!??!" { BOOST_WAVE_RET(T_OROR_TRIGRAPH); }
+ "++" { BOOST_WAVE_RET(T_PLUSPLUS); }
+ "--" { BOOST_WAVE_RET(T_MINUSMINUS); }
+ "," { BOOST_WAVE_RET(T_COMMA); }
+ "->*"
+ {
+ if (s->act_in_c99_mode) {
+ --YYCURSOR;
+ BOOST_WAVE_RET(T_ARROW);
+ }
+ else {
+ BOOST_WAVE_RET(T_ARROWSTAR);
+ }
+ }
+ "->" { BOOST_WAVE_RET(T_ARROW); }
+ "??/" { BOOST_WAVE_RET(T_ANY_TRIGRAPH); }
+
+
+ ([a-zA-Z_$] | UniversalChar) ([a-zA-Z_0-9$] | UniversalChar)*
+ { BOOST_WAVE_RET(T_IDENTIFIER); }
+
+ "L"? (['] (EscapeSequence|any\[\n\r\\']|UniversalChar)+ ['])
+ { BOOST_WAVE_RET(T_CHARLIT); }
+
+ "L"? (["] (EscapeSequence|any\[\n\r\\"]|UniversalChar)* ["])
+ { BOOST_WAVE_RET(T_STRINGLIT); }
+
+
+ Pound PPSpace ( "include" | "include_next") PPSpace "<" (any\[\n\r>])+ ">"
+ { BOOST_WAVE_RET(T_PP_HHEADER); }
+
+ Pound PPSpace ( "include" | "include_next") PPSpace "\"" (any\[\n\r"])+ "\""
+ { BOOST_WAVE_RET(T_PP_QHEADER); }
+
+ Pound PPSpace ( "include" | "include_next") PPSpace
+ { BOOST_WAVE_RET(T_PP_INCLUDE); }
+
+ Pound PPSpace "if" { BOOST_WAVE_RET(T_PP_IF); }
+ Pound PPSpace "ifdef" { BOOST_WAVE_RET(T_PP_IFDEF); }
+ Pound PPSpace "ifndef" { BOOST_WAVE_RET(T_PP_IFNDEF); }
+ Pound PPSpace "else" { BOOST_WAVE_RET(T_PP_ELSE); }
+ Pound PPSpace "elif" { BOOST_WAVE_RET(T_PP_ELIF); }
+ Pound PPSpace "endif" { BOOST_WAVE_RET(T_PP_ENDIF); }
+ Pound PPSpace "define" { BOOST_WAVE_RET(T_PP_DEFINE); }
+ Pound PPSpace "undef" { BOOST_WAVE_RET(T_PP_UNDEF); }
+ Pound PPSpace "line" { BOOST_WAVE_RET(T_PP_LINE); }
+ Pound PPSpace "error" { BOOST_WAVE_RET(T_PP_ERROR); }
+ Pound PPSpace "pragma" { BOOST_WAVE_RET(T_PP_PRAGMA); }
+
+ Pound PPSpace "warning" { BOOST_WAVE_RET(T_PP_WARNING); }
+
+ Pound PPSpace "region" { BOOST_WAVE_RET(T_MSEXT_PP_REGION); }
+ Pound PPSpace "endregion" { BOOST_WAVE_RET(T_MSEXT_PP_ENDREGION); }
+
+ [ \t\v\f]+
+ { BOOST_WAVE_RET(T_SPACE); }
+
+ Newline
+ {
+ s->line++;
+ cursor.column = 1;
+ BOOST_WAVE_RET(T_NEWLINE);
+ }
+
+ "\000"
+ {
+ if (s->eof && cursor != s->eof)
+ {
+ BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
             (*s->error_proc)(s, lexing_exception::generic_lexing_error,
                 "invalid character '\\000' in input stream");
- }
- BOOST_WAVE_RET(T_EOF);
- }
-
- any { BOOST_WAVE_RET(TOKEN_FROM_ID(*s->tok, UnknownTokenType)); }
-
- anyctrl
- {
- // flag the error
- BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
+ }
+ BOOST_WAVE_RET(T_EOF);
+ }
+
+ any { BOOST_WAVE_RET(TOKEN_FROM_ID(*s->tok, UnknownTokenType)); }
+
+ anyctrl
+ {
+ // flag the error
+ BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
         (*s->error_proc)(s, lexing_exception::generic_lexing_error,
             "invalid character '\\%03o' in input stream", *--YYCURSOR);
- }
-*/
-
-ccomment:
-/*!re2c
- "*/" { BOOST_WAVE_RET(T_CCOMMENT); }
-
- Newline
- {
- /*if(cursor == s->eof) BOOST_WAVE_RET(T_EOF);*/
- /*s->tok = cursor; */
- s->line += count_backslash_newlines(s, cursor) +1;
- cursor.column = 1;
- goto ccomment;
- }
-
- any { goto ccomment; }
-
- "\000"
- {
- if(cursor == s->eof)
- {
- BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
+ }
+*/
+
+ccomment:
+/*!re2c
+ "*/" { BOOST_WAVE_RET(T_CCOMMENT); }
+
+ Newline
+ {
+ /*if(cursor == s->eof) BOOST_WAVE_RET(T_EOF);*/
+ /*s->tok = cursor; */
+ s->line += count_backslash_newlines(s, cursor) +1;
+ cursor.column = 1;
+ goto ccomment;
+ }
+
+ any { goto ccomment; }
+
+ "\000"
+ {
+ if(cursor == s->eof)
+ {
+ BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
             (*s->error_proc)(s, lexing_exception::generic_lexing_warning,
                 "Unterminated 'C' style comment");
- }
- else
- {
- --YYCURSOR; // next call returns T_EOF
- BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
+ }
+ else
+ {
+ --YYCURSOR; // next call returns T_EOF
+ BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
             (*s->error_proc)(s, lexing_exception::generic_lexing_error,
                 "invalid character: '\\000' in input stream");
- }
- }
-
- anyctrl
- {
- // flag the error
- BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
+ }
+ }
+
+ anyctrl
+ {
+ // flag the error
+ BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
         (*s->error_proc)(s, lexing_exception::generic_lexing_error,
             "invalid character '\\%03o' in input stream", *--YYCURSOR);
- }
-*/
-
-cppcomment:
-/*!re2c
- Newline
- {
- /*if(cursor == s->eof) BOOST_WAVE_RET(T_EOF); */
- /*s->tok = cursor; */
- s->line++;
- cursor.column = 1;
- BOOST_WAVE_RET(T_CPPCOMMENT);
- }
-
- any { goto cppcomment; }
-
- "\000"
- {
- if (s->eof && cursor != s->eof)
- {
- --YYCURSOR; // next call returns T_EOF
- BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
+ }
+*/
+
+cppcomment:
+/*!re2c
+ Newline
+ {
+ /*if(cursor == s->eof) BOOST_WAVE_RET(T_EOF); */
+ /*s->tok = cursor; */
+ s->line++;
+ cursor.column = 1;
+ BOOST_WAVE_RET(T_CPPCOMMENT);
+ }
+
+ any { goto cppcomment; }
+
+ "\000"
+ {
+ if (s->eof && cursor != s->eof)
+ {
+ --YYCURSOR; // next call returns T_EOF
+ BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
             (*s->error_proc)(s, lexing_exception::generic_lexing_error,
                 "invalid character '\\000' in input stream");
- }
-
- --YYCURSOR; // next call returns T_EOF
- if (!s->single_line_only)
- {
- BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
+ }
+
+ --YYCURSOR; // next call returns T_EOF
+ if (!s->single_line_only)
+ {
+ BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
             (*s->error_proc)(s, lexing_exception::generic_lexing_warning,
                 "Unterminated 'C++' style comment");
- }
- BOOST_WAVE_RET(T_CPPCOMMENT);
- }
-
- anyctrl
- {
- // flag the error
- BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
+ }
+ BOOST_WAVE_RET(T_CPPCOMMENT);
+ }
+
+ anyctrl
+ {
+ // flag the error
+ BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
         (*s->error_proc)(s, lexing_exception::generic_lexing_error,
             "invalid character '\\%03o' in input stream", *--YYCURSOR);
- }
-*/
-
-/* this subscanner is called whenever a pp_number has been started */
-pp_number:
-{
- cursor = uchar_wrapper(s->tok = s->cur, s->column = s->curr_column);
- marker = uchar_wrapper(s->ptr);
- limit = uchar_wrapper(s->lim);
-
- if (s->detect_pp_numbers) {
- /*!re2c
- "."? Digit (Digit | NonDigit | ExponentStart | ".")*
- { BOOST_WAVE_RET(T_PP_NUMBER); }
- */
- }
- else {
- /*!re2c
- ((FractionalConstant ExponentPart?) | (Digit+ ExponentPart)) FloatingSuffix?
- { BOOST_WAVE_RET(T_FLOATLIT); }
-
- Integer { goto integer_suffix; }
- */
- }
-}
-
-/* this subscanner is called, whenever a Integer was recognized */
-integer_suffix:
-{
- if (s->enable_ms_extensions) {
- /*!re2c
- LongIntegerSuffix | "i64"
- { BOOST_WAVE_RET(T_LONGINTLIT); }
-
- IntegerSuffix?
- { BOOST_WAVE_RET(T_INTLIT); }
- */
- }
- else {
- /*!re2c
- LongIntegerSuffix
- { BOOST_WAVE_RET(T_LONGINTLIT); }
-
- IntegerSuffix?
- { BOOST_WAVE_RET(T_INTLIT); }
- */
- }
-}
+ }
+*/
+
+/* this subscanner is called whenever a pp_number has been started */
+pp_number:
+{
+ cursor = uchar_wrapper(s->tok = s->cur, s->column = s->curr_column);
+ marker = uchar_wrapper(s->ptr);
+ limit = uchar_wrapper(s->lim);
+
+ if (s->detect_pp_numbers) {
+ /*!re2c
+ "."? Digit (Digit | NonDigit | ExponentStart | ".")*
+ { BOOST_WAVE_RET(T_PP_NUMBER); }
+ */
+ }
+ else {
+ /*!re2c
+ ((FractionalConstant ExponentPart?) | (Digit+ ExponentPart)) FloatingSuffix?
+ { BOOST_WAVE_RET(T_FLOATLIT); }
+
+ Integer { goto integer_suffix; }
+ */
+ }
+}
+
+/* this subscanner is called, whenever a Integer was recognized */
+integer_suffix:
+{
+ if (s->enable_ms_extensions) {
+ /*!re2c
+ LongIntegerSuffix | "i64"
+ { BOOST_WAVE_RET(T_LONGINTLIT); }
+
+ IntegerSuffix?
+ { BOOST_WAVE_RET(T_INTLIT); }
+ */
+ }
+ else {
+ /*!re2c
+ LongIntegerSuffix
+ { BOOST_WAVE_RET(T_LONGINTLIT); }
+
+ IntegerSuffix?
+ { BOOST_WAVE_RET(T_INTLIT); }
+ */
+ }
+}

Modified: branches/proto/v3/libs/wave/src/cpplexer/re2clex/strict_cpp.re
==============================================================================
--- branches/proto/v3/libs/wave/src/cpplexer/re2clex/strict_cpp.re (original)
+++ branches/proto/v3/libs/wave/src/cpplexer/re2clex/strict_cpp.re 2008-03-10 16:14:31 EDT (Mon, 10 Mar 2008)
@@ -1,437 +1,437 @@
-/*=============================================================================
- Boost.Wave: A Standard compliant C++ preprocessor library
-
- Copyright (c) 2001 Daniel C. Nuffer
+/*=============================================================================
+ Boost.Wave: A Standard compliant C++ preprocessor library
+
+ Copyright (c) 2001 Daniel C. Nuffer
     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)
-
- This is a strict lexer conforming to the Standard as close as possible.
- It does not allow the '$' to be part of identifiers. If you need the '$'
- character in identifiers please include the lexer definition provided
- in the cpp.re file.
-
- TODO:
- handle errors better.
-=============================================================================*/
-
-/*!re2c
-re2c:indent:string = " ";
-any = [\t\v\f\r\n\040-\377];
-anyctrl = [\001-\037];
-OctalDigit = [0-7];
-Digit = [0-9];
-HexDigit = [a-fA-F0-9];
-Integer = (("0" [xX] HexDigit+) | ("0" OctalDigit*) | ([1-9] Digit*));
-ExponentStart = [Ee] [+-];
-ExponentPart = [Ee] [+-]? Digit+;
-FractionalConstant = (Digit* "." Digit+) | (Digit+ ".");
-FloatingSuffix = [fF] [lL]? | [lL] [fF]?;
-IntegerSuffix = [uU] [lL]? | [lL] [uU]?;
-LongIntegerSuffix = [uU] ([lL] [lL]) | ([lL] [lL]) [uU]?;
-Backslash = [\\] | "??/";
-EscapeSequence = Backslash ([abfnrtv?'"] | Backslash | "x" HexDigit+ | OctalDigit OctalDigit? OctalDigit?);
-HexQuad = HexDigit HexDigit HexDigit HexDigit;
-UniversalChar = Backslash ("u" HexQuad | "U" HexQuad HexQuad);
-Newline = "\r\n" | "\n" | "\r";
-PPSpace = ([ \t\f\v]|("/*"(any\[*]|Newline|("*"+(any\[*/]|Newline)))*"*"+"/"))*;
-Pound = "#" | "??=" | "%:";
-NonDigit = [a-zA-Z_] | UniversalChar;
-*/
-
-/*!re2c
- "/*" { goto ccomment; }
- "//" { goto cppcomment; }
- "."? Digit { goto pp_number; }
-
- "asm" { BOOST_WAVE_RET(T_ASM); }
- "auto" { BOOST_WAVE_RET(T_AUTO); }
- "bool" { BOOST_WAVE_RET(T_BOOL); }
- "break" { BOOST_WAVE_RET(T_BREAK); }
- "case" { BOOST_WAVE_RET(T_CASE); }
- "catch" { BOOST_WAVE_RET(T_CATCH); }
- "char" { BOOST_WAVE_RET(T_CHAR); }
- "class" { BOOST_WAVE_RET(T_CLASS); }
- "const" { BOOST_WAVE_RET(T_CONST); }
- "const_cast" { BOOST_WAVE_RET(T_CONSTCAST); }
- "continue" { BOOST_WAVE_RET(T_CONTINUE); }
- "default" { BOOST_WAVE_RET(T_DEFAULT); }
- "delete" { BOOST_WAVE_RET(T_DELETE); }
- "do" { BOOST_WAVE_RET(T_DO); }
- "double" { BOOST_WAVE_RET(T_DOUBLE); }
- "dynamic_cast" { BOOST_WAVE_RET(T_DYNAMICCAST); }
- "else" { BOOST_WAVE_RET(T_ELSE); }
- "enum" { BOOST_WAVE_RET(T_ENUM); }
- "explicit" { BOOST_WAVE_RET(T_EXPLICIT); }
- "export" { BOOST_WAVE_RET(T_EXPORT); }
- "extern" { BOOST_WAVE_RET(T_EXTERN); }
- "false" { BOOST_WAVE_RET(T_FALSE); }
- "float" { BOOST_WAVE_RET(T_FLOAT); }
- "for" { BOOST_WAVE_RET(T_FOR); }
- "friend" { BOOST_WAVE_RET(T_FRIEND); }
- "goto" { BOOST_WAVE_RET(T_GOTO); }
- "if" { BOOST_WAVE_RET(T_IF); }
- "import" { BOOST_WAVE_RET(s->enable_import_keyword ? T_IMPORT : T_IDENTIFIER); }
- "inline" { BOOST_WAVE_RET(T_INLINE); }
- "int" { BOOST_WAVE_RET(T_INT); }
- "long" { BOOST_WAVE_RET(T_LONG); }
- "mutable" { BOOST_WAVE_RET(T_MUTABLE); }
- "namespace" { BOOST_WAVE_RET(T_NAMESPACE); }
- "new" { BOOST_WAVE_RET(T_NEW); }
- "operator" { BOOST_WAVE_RET(T_OPERATOR); }
- "private" { BOOST_WAVE_RET(T_PRIVATE); }
- "protected" { BOOST_WAVE_RET(T_PROTECTED); }
- "public" { BOOST_WAVE_RET(T_PUBLIC); }
- "register" { BOOST_WAVE_RET(T_REGISTER); }
- "reinterpret_cast" { BOOST_WAVE_RET(T_REINTERPRETCAST); }
- "return" { BOOST_WAVE_RET(T_RETURN); }
- "short" { BOOST_WAVE_RET(T_SHORT); }
- "signed" { BOOST_WAVE_RET(T_SIGNED); }
- "sizeof" { BOOST_WAVE_RET(T_SIZEOF); }
- "static" { BOOST_WAVE_RET(T_STATIC); }
- "static_cast" { BOOST_WAVE_RET(T_STATICCAST); }
- "struct" { BOOST_WAVE_RET(T_STRUCT); }
- "switch" { BOOST_WAVE_RET(T_SWITCH); }
- "template" { BOOST_WAVE_RET(T_TEMPLATE); }
- "this" { BOOST_WAVE_RET(T_THIS); }
- "throw" { BOOST_WAVE_RET(T_THROW); }
- "true" { BOOST_WAVE_RET(T_TRUE); }
- "try" { BOOST_WAVE_RET(T_TRY); }
- "typedef" { BOOST_WAVE_RET(T_TYPEDEF); }
- "typeid" { BOOST_WAVE_RET(T_TYPEID); }
- "typename" { BOOST_WAVE_RET(T_TYPENAME); }
- "union" { BOOST_WAVE_RET(T_UNION); }
- "unsigned" { BOOST_WAVE_RET(T_UNSIGNED); }
- "using" { BOOST_WAVE_RET(T_USING); }
- "virtual" { BOOST_WAVE_RET(T_VIRTUAL); }
- "void" { BOOST_WAVE_RET(T_VOID); }
- "volatile" { BOOST_WAVE_RET(T_VOLATILE); }
- "wchar_t" { BOOST_WAVE_RET(T_WCHART); }
- "while" { BOOST_WAVE_RET(T_WHILE); }
-
- "__int8" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_INT8 : T_IDENTIFIER); }
- "__int16" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_INT16 : T_IDENTIFIER); }
- "__int32" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_INT32 : T_IDENTIFIER); }
- "__int64" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_INT64 : T_IDENTIFIER); }
- "_"? "_based" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_BASED : T_IDENTIFIER); }
- "_"? "_declspec" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_DECLSPEC : T_IDENTIFIER); }
- "_"? "_cdecl" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_CDECL : T_IDENTIFIER); }
- "_"? "_fastcall" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_FASTCALL : T_IDENTIFIER); }
- "_"? "_stdcall" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_STDCALL : T_IDENTIFIER); }
- "__try" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_TRY : T_IDENTIFIER); }
- "__except" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_EXCEPT : T_IDENTIFIER); }
- "__finally" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_FINALLY : T_IDENTIFIER); }
- "__leave" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_LEAVE : T_IDENTIFIER); }
- "_"? "_inline" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_INLINE : T_IDENTIFIER); }
- "_"? "_asm" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_ASM : T_IDENTIFIER); }
-
- "{" { BOOST_WAVE_RET(T_LEFTBRACE); }
- "??<" { BOOST_WAVE_RET(T_LEFTBRACE_TRIGRAPH); }
- "<%" { BOOST_WAVE_RET(T_LEFTBRACE_ALT); }
- "}" { BOOST_WAVE_RET(T_RIGHTBRACE); }
- "??>" { BOOST_WAVE_RET(T_RIGHTBRACE_TRIGRAPH); }
- "%>" { BOOST_WAVE_RET(T_RIGHTBRACE_ALT); }
- "[" { BOOST_WAVE_RET(T_LEFTBRACKET); }
- "??(" { BOOST_WAVE_RET(T_LEFTBRACKET_TRIGRAPH); }
- "<:" { BOOST_WAVE_RET(T_LEFTBRACKET_ALT); }
- "]" { BOOST_WAVE_RET(T_RIGHTBRACKET); }
- "??)" { BOOST_WAVE_RET(T_RIGHTBRACKET_TRIGRAPH); }
- ":>" { BOOST_WAVE_RET(T_RIGHTBRACKET_ALT); }
- "#" { BOOST_WAVE_RET(T_POUND); }
- "%:" { BOOST_WAVE_RET(T_POUND_ALT); }
- "??=" { BOOST_WAVE_RET(T_POUND_TRIGRAPH); }
- "##" { BOOST_WAVE_RET(T_POUND_POUND); }
- "#??=" { BOOST_WAVE_RET(T_POUND_POUND_TRIGRAPH); }
- "??=#" { BOOST_WAVE_RET(T_POUND_POUND_TRIGRAPH); }
- "??=??=" { BOOST_WAVE_RET(T_POUND_POUND_TRIGRAPH); }
- "%:%:" { BOOST_WAVE_RET(T_POUND_POUND_ALT); }
- "(" { BOOST_WAVE_RET(T_LEFTPAREN); }
- ")" { BOOST_WAVE_RET(T_RIGHTPAREN); }
- ";" { BOOST_WAVE_RET(T_SEMICOLON); }
- ":" { BOOST_WAVE_RET(T_COLON); }
- "..." { BOOST_WAVE_RET(T_ELLIPSIS); }
- "?" { BOOST_WAVE_RET(T_QUESTION_MARK); }
- "::"
- {
- if (s->act_in_c99_mode) {
- --YYCURSOR;
- BOOST_WAVE_RET(T_COLON);
- }
- else {
- BOOST_WAVE_RET(T_COLON_COLON);
- }
- }
- "." { BOOST_WAVE_RET(T_DOT); }
- ".*"
- {
- if (s->act_in_c99_mode) {
- --YYCURSOR;
- BOOST_WAVE_RET(T_DOT);
- }
- else {
- BOOST_WAVE_RET(T_DOTSTAR);
- }
- }
- "+" { BOOST_WAVE_RET(T_PLUS); }
- "-" { BOOST_WAVE_RET(T_MINUS); }
- "*" { BOOST_WAVE_RET(T_STAR); }
- "/" { BOOST_WAVE_RET(T_DIVIDE); }
- "%" { BOOST_WAVE_RET(T_PERCENT); }
- "^" { BOOST_WAVE_RET(T_XOR); }
- "??'" { BOOST_WAVE_RET(T_XOR_TRIGRAPH); }
- "xor" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_XOR_ALT); }
- "&" { BOOST_WAVE_RET(T_AND); }
- "bitand" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_AND_ALT); }
- "|" { BOOST_WAVE_RET(T_OR); }
- "bitor" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_OR_ALT); }
- "??!" { BOOST_WAVE_RET(T_OR_TRIGRAPH); }
- "~" { BOOST_WAVE_RET(T_COMPL); }
- "??-" { BOOST_WAVE_RET(T_COMPL_TRIGRAPH); }
- "compl" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_COMPL_ALT); }
- "!" { BOOST_WAVE_RET(T_NOT); }
- "not" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_NOT_ALT); }
- "=" { BOOST_WAVE_RET(T_ASSIGN); }
- "<" { BOOST_WAVE_RET(T_LESS); }
- ">" { BOOST_WAVE_RET(T_GREATER); }
- "+=" { BOOST_WAVE_RET(T_PLUSASSIGN); }
- "-=" { BOOST_WAVE_RET(T_MINUSASSIGN); }
- "*=" { BOOST_WAVE_RET(T_STARASSIGN); }
- "/=" { BOOST_WAVE_RET(T_DIVIDEASSIGN); }
- "%=" { BOOST_WAVE_RET(T_PERCENTASSIGN); }
- "^=" { BOOST_WAVE_RET(T_XORASSIGN); }
- "xor_eq" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_XORASSIGN_ALT); }
- "??'=" { BOOST_WAVE_RET(T_XORASSIGN_TRIGRAPH); }
- "&=" { BOOST_WAVE_RET(T_ANDASSIGN); }
- "and_eq" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_ANDASSIGN_ALT); }
- "|=" { BOOST_WAVE_RET(T_ORASSIGN); }
- "or_eq" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_ORASSIGN_ALT); }
- "??!=" { BOOST_WAVE_RET(T_ORASSIGN_TRIGRAPH); }
- "<<" { BOOST_WAVE_RET(T_SHIFTLEFT); }
- ">>" { BOOST_WAVE_RET(T_SHIFTRIGHT); }
- ">>=" { BOOST_WAVE_RET(T_SHIFTRIGHTASSIGN); }
- "<<=" { BOOST_WAVE_RET(T_SHIFTLEFTASSIGN); }
- "==" { BOOST_WAVE_RET(T_EQUAL); }
- "!=" { BOOST_WAVE_RET(T_NOTEQUAL); }
- "not_eq" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_NOTEQUAL_ALT); }
- "<=" { BOOST_WAVE_RET(T_LESSEQUAL); }
- ">=" { BOOST_WAVE_RET(T_GREATEREQUAL); }
- "&&" { BOOST_WAVE_RET(T_ANDAND); }
- "and" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_ANDAND_ALT); }
- "||" { BOOST_WAVE_RET(T_OROR); }
- "??!|" { BOOST_WAVE_RET(T_OROR_TRIGRAPH); }
- "|??!" { BOOST_WAVE_RET(T_OROR_TRIGRAPH); }
- "or" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_OROR_ALT); }
- "??!??!" { BOOST_WAVE_RET(T_OROR_TRIGRAPH); }
- "++" { BOOST_WAVE_RET(T_PLUSPLUS); }
- "--" { BOOST_WAVE_RET(T_MINUSMINUS); }
- "," { BOOST_WAVE_RET(T_COMMA); }
- "->*"
- {
- if (s->act_in_c99_mode) {
- --YYCURSOR;
- BOOST_WAVE_RET(T_ARROW);
- }
- else {
- BOOST_WAVE_RET(T_ARROWSTAR);
- }
- }
- "->" { BOOST_WAVE_RET(T_ARROW); }
- "??/" { BOOST_WAVE_RET(T_ANY_TRIGRAPH); }
-
-
- ([a-zA-Z_] | UniversalChar) ([a-zA-Z_0-9] | UniversalChar)*
- { BOOST_WAVE_RET(T_IDENTIFIER); }
-
- "L"? (['] (EscapeSequence|any\[\n\r\\']|UniversalChar)+ ['])
- { BOOST_WAVE_RET(T_CHARLIT); }
-
- "L"? (["] (EscapeSequence|any\[\n\r\\"]|UniversalChar)* ["])
- { BOOST_WAVE_RET(T_STRINGLIT); }
-
-
- Pound PPSpace ( "include" | "include_next") PPSpace "<" (any\[\n\r>])+ ">"
- { BOOST_WAVE_RET(T_PP_HHEADER); }
-
- Pound PPSpace ( "include" | "include_next") PPSpace "\"" (any\[\n\r"])+ "\""
- { BOOST_WAVE_RET(T_PP_QHEADER); }
-
- Pound PPSpace ( "include" | "include_next") PPSpace
- { BOOST_WAVE_RET(T_PP_INCLUDE); }
-
- Pound PPSpace "if" { BOOST_WAVE_RET(T_PP_IF); }
- Pound PPSpace "ifdef" { BOOST_WAVE_RET(T_PP_IFDEF); }
- Pound PPSpace "ifndef" { BOOST_WAVE_RET(T_PP_IFNDEF); }
- Pound PPSpace "else" { BOOST_WAVE_RET(T_PP_ELSE); }
- Pound PPSpace "elif" { BOOST_WAVE_RET(T_PP_ELIF); }
- Pound PPSpace "endif" { BOOST_WAVE_RET(T_PP_ENDIF); }
- Pound PPSpace "define" { BOOST_WAVE_RET(T_PP_DEFINE); }
- Pound PPSpace "undef" { BOOST_WAVE_RET(T_PP_UNDEF); }
- Pound PPSpace "line" { BOOST_WAVE_RET(T_PP_LINE); }
- Pound PPSpace "error" { BOOST_WAVE_RET(T_PP_ERROR); }
- Pound PPSpace "pragma" { BOOST_WAVE_RET(T_PP_PRAGMA); }
-
- Pound PPSpace "warning" { BOOST_WAVE_RET(T_PP_WARNING); }
-
- Pound PPSpace "region" { BOOST_WAVE_RET(T_MSEXT_PP_REGION); }
- Pound PPSpace "endregion" { BOOST_WAVE_RET(T_MSEXT_PP_ENDREGION); }
-
- [ \t\v\f]+
- { BOOST_WAVE_RET(T_SPACE); }
-
- Newline
- {
- s->line++;
- cursor.column = 1;
- BOOST_WAVE_RET(T_NEWLINE);
- }
-
- "\000"
- {
- if (s->eof && cursor != s->eof)
- {
- BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
+ 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)
+
+ This is a strict lexer conforming to the Standard as close as possible.
+ It does not allow the '$' to be part of identifiers. If you need the '$'
+ character in identifiers please include the lexer definition provided
+ in the cpp.re file.
+
+ TODO:
+ handle errors better.
+=============================================================================*/
+
+/*!re2c
+re2c:indent:string = " ";
+any = [\t\v\f\r\n\040-\377];
+anyctrl = [\001-\037];
+OctalDigit = [0-7];
+Digit = [0-9];
+HexDigit = [a-fA-F0-9];
+Integer = (("0" [xX] HexDigit+) | ("0" OctalDigit*) | ([1-9] Digit*));
+ExponentStart = [Ee] [+-];
+ExponentPart = [Ee] [+-]? Digit+;
+FractionalConstant = (Digit* "." Digit+) | (Digit+ ".");
+FloatingSuffix = [fF] [lL]? | [lL] [fF]?;
+IntegerSuffix = [uU] [lL]? | [lL] [uU]?;
+LongIntegerSuffix = [uU] ([lL] [lL]) | ([lL] [lL]) [uU]?;
+Backslash = [\\] | "??/";
+EscapeSequence = Backslash ([abfnrtv?'"] | Backslash | "x" HexDigit+ | OctalDigit OctalDigit? OctalDigit?);
+HexQuad = HexDigit HexDigit HexDigit HexDigit;
+UniversalChar = Backslash ("u" HexQuad | "U" HexQuad HexQuad);
+Newline = "\r\n" | "\n" | "\r";
+PPSpace = ([ \t\f\v]|("/*"(any\[*]|Newline|("*"+(any\[*/]|Newline)))*"*"+"/"))*;
+Pound = "#" | "??=" | "%:";
+NonDigit = [a-zA-Z_] | UniversalChar;
+*/
+
+/*!re2c
+ "/*" { goto ccomment; }
+ "//" { goto cppcomment; }
+ "."? Digit { goto pp_number; }
+
+ "asm" { BOOST_WAVE_RET(T_ASM); }
+ "auto" { BOOST_WAVE_RET(T_AUTO); }
+ "bool" { BOOST_WAVE_RET(T_BOOL); }
+ "break" { BOOST_WAVE_RET(T_BREAK); }
+ "case" { BOOST_WAVE_RET(T_CASE); }
+ "catch" { BOOST_WAVE_RET(T_CATCH); }
+ "char" { BOOST_WAVE_RET(T_CHAR); }
+ "class" { BOOST_WAVE_RET(T_CLASS); }
+ "const" { BOOST_WAVE_RET(T_CONST); }
+ "const_cast" { BOOST_WAVE_RET(T_CONSTCAST); }
+ "continue" { BOOST_WAVE_RET(T_CONTINUE); }
+ "default" { BOOST_WAVE_RET(T_DEFAULT); }
+ "delete" { BOOST_WAVE_RET(T_DELETE); }
+ "do" { BOOST_WAVE_RET(T_DO); }
+ "double" { BOOST_WAVE_RET(T_DOUBLE); }
+ "dynamic_cast" { BOOST_WAVE_RET(T_DYNAMICCAST); }
+ "else" { BOOST_WAVE_RET(T_ELSE); }
+ "enum" { BOOST_WAVE_RET(T_ENUM); }
+ "explicit" { BOOST_WAVE_RET(T_EXPLICIT); }
+ "export" { BOOST_WAVE_RET(T_EXPORT); }
+ "extern" { BOOST_WAVE_RET(T_EXTERN); }
+ "false" { BOOST_WAVE_RET(T_FALSE); }
+ "float" { BOOST_WAVE_RET(T_FLOAT); }
+ "for" { BOOST_WAVE_RET(T_FOR); }
+ "friend" { BOOST_WAVE_RET(T_FRIEND); }
+ "goto" { BOOST_WAVE_RET(T_GOTO); }
+ "if" { BOOST_WAVE_RET(T_IF); }
+ "import" { BOOST_WAVE_RET(s->enable_import_keyword ? T_IMPORT : T_IDENTIFIER); }
+ "inline" { BOOST_WAVE_RET(T_INLINE); }
+ "int" { BOOST_WAVE_RET(T_INT); }
+ "long" { BOOST_WAVE_RET(T_LONG); }
+ "mutable" { BOOST_WAVE_RET(T_MUTABLE); }
+ "namespace" { BOOST_WAVE_RET(T_NAMESPACE); }
+ "new" { BOOST_WAVE_RET(T_NEW); }
+ "operator" { BOOST_WAVE_RET(T_OPERATOR); }
+ "private" { BOOST_WAVE_RET(T_PRIVATE); }
+ "protected" { BOOST_WAVE_RET(T_PROTECTED); }
+ "public" { BOOST_WAVE_RET(T_PUBLIC); }
+ "register" { BOOST_WAVE_RET(T_REGISTER); }
+ "reinterpret_cast" { BOOST_WAVE_RET(T_REINTERPRETCAST); }
+ "return" { BOOST_WAVE_RET(T_RETURN); }
+ "short" { BOOST_WAVE_RET(T_SHORT); }
+ "signed" { BOOST_WAVE_RET(T_SIGNED); }
+ "sizeof" { BOOST_WAVE_RET(T_SIZEOF); }
+ "static" { BOOST_WAVE_RET(T_STATIC); }
+ "static_cast" { BOOST_WAVE_RET(T_STATICCAST); }
+ "struct" { BOOST_WAVE_RET(T_STRUCT); }
+ "switch" { BOOST_WAVE_RET(T_SWITCH); }
+ "template" { BOOST_WAVE_RET(T_TEMPLATE); }
+ "this" { BOOST_WAVE_RET(T_THIS); }
+ "throw" { BOOST_WAVE_RET(T_THROW); }
+ "true" { BOOST_WAVE_RET(T_TRUE); }
+ "try" { BOOST_WAVE_RET(T_TRY); }
+ "typedef" { BOOST_WAVE_RET(T_TYPEDEF); }
+ "typeid" { BOOST_WAVE_RET(T_TYPEID); }
+ "typename" { BOOST_WAVE_RET(T_TYPENAME); }
+ "union" { BOOST_WAVE_RET(T_UNION); }
+ "unsigned" { BOOST_WAVE_RET(T_UNSIGNED); }
+ "using" { BOOST_WAVE_RET(T_USING); }
+ "virtual" { BOOST_WAVE_RET(T_VIRTUAL); }
+ "void" { BOOST_WAVE_RET(T_VOID); }
+ "volatile" { BOOST_WAVE_RET(T_VOLATILE); }
+ "wchar_t" { BOOST_WAVE_RET(T_WCHART); }
+ "while" { BOOST_WAVE_RET(T_WHILE); }
+
+ "__int8" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_INT8 : T_IDENTIFIER); }
+ "__int16" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_INT16 : T_IDENTIFIER); }
+ "__int32" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_INT32 : T_IDENTIFIER); }
+ "__int64" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_INT64 : T_IDENTIFIER); }
+ "_"? "_based" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_BASED : T_IDENTIFIER); }
+ "_"? "_declspec" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_DECLSPEC : T_IDENTIFIER); }
+ "_"? "_cdecl" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_CDECL : T_IDENTIFIER); }
+ "_"? "_fastcall" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_FASTCALL : T_IDENTIFIER); }
+ "_"? "_stdcall" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_STDCALL : T_IDENTIFIER); }
+ "__try" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_TRY : T_IDENTIFIER); }
+ "__except" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_EXCEPT : T_IDENTIFIER); }
+ "__finally" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_FINALLY : T_IDENTIFIER); }
+ "__leave" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_LEAVE : T_IDENTIFIER); }
+ "_"? "_inline" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_INLINE : T_IDENTIFIER); }
+ "_"? "_asm" { BOOST_WAVE_RET(s->enable_ms_extensions ? T_MSEXT_ASM : T_IDENTIFIER); }
+
+ "{" { BOOST_WAVE_RET(T_LEFTBRACE); }
+ "??<" { BOOST_WAVE_RET(T_LEFTBRACE_TRIGRAPH); }
+ "<%" { BOOST_WAVE_RET(T_LEFTBRACE_ALT); }
+ "}" { BOOST_WAVE_RET(T_RIGHTBRACE); }
+ "??>" { BOOST_WAVE_RET(T_RIGHTBRACE_TRIGRAPH); }
+ "%>" { BOOST_WAVE_RET(T_RIGHTBRACE_ALT); }
+ "[" { BOOST_WAVE_RET(T_LEFTBRACKET); }
+ "??(" { BOOST_WAVE_RET(T_LEFTBRACKET_TRIGRAPH); }
+ "<:" { BOOST_WAVE_RET(T_LEFTBRACKET_ALT); }
+ "]" { BOOST_WAVE_RET(T_RIGHTBRACKET); }
+ "??)" { BOOST_WAVE_RET(T_RIGHTBRACKET_TRIGRAPH); }
+ ":>" { BOOST_WAVE_RET(T_RIGHTBRACKET_ALT); }
+ "#" { BOOST_WAVE_RET(T_POUND); }
+ "%:" { BOOST_WAVE_RET(T_POUND_ALT); }
+ "??=" { BOOST_WAVE_RET(T_POUND_TRIGRAPH); }
+ "##" { BOOST_WAVE_RET(T_POUND_POUND); }
+ "#??=" { BOOST_WAVE_RET(T_POUND_POUND_TRIGRAPH); }
+ "??=#" { BOOST_WAVE_RET(T_POUND_POUND_TRIGRAPH); }
+ "??=??=" { BOOST_WAVE_RET(T_POUND_POUND_TRIGRAPH); }
+ "%:%:" { BOOST_WAVE_RET(T_POUND_POUND_ALT); }
+ "(" { BOOST_WAVE_RET(T_LEFTPAREN); }
+ ")" { BOOST_WAVE_RET(T_RIGHTPAREN); }
+ ";" { BOOST_WAVE_RET(T_SEMICOLON); }
+ ":" { BOOST_WAVE_RET(T_COLON); }
+ "..." { BOOST_WAVE_RET(T_ELLIPSIS); }
+ "?" { BOOST_WAVE_RET(T_QUESTION_MARK); }
+ "::"
+ {
+ if (s->act_in_c99_mode) {
+ --YYCURSOR;
+ BOOST_WAVE_RET(T_COLON);
+ }
+ else {
+ BOOST_WAVE_RET(T_COLON_COLON);
+ }
+ }
+ "." { BOOST_WAVE_RET(T_DOT); }
+ ".*"
+ {
+ if (s->act_in_c99_mode) {
+ --YYCURSOR;
+ BOOST_WAVE_RET(T_DOT);
+ }
+ else {
+ BOOST_WAVE_RET(T_DOTSTAR);
+ }
+ }
+ "+" { BOOST_WAVE_RET(T_PLUS); }
+ "-" { BOOST_WAVE_RET(T_MINUS); }
+ "*" { BOOST_WAVE_RET(T_STAR); }
+ "/" { BOOST_WAVE_RET(T_DIVIDE); }
+ "%" { BOOST_WAVE_RET(T_PERCENT); }
+ "^" { BOOST_WAVE_RET(T_XOR); }
+ "??'" { BOOST_WAVE_RET(T_XOR_TRIGRAPH); }
+ "xor" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_XOR_ALT); }
+ "&" { BOOST_WAVE_RET(T_AND); }
+ "bitand" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_AND_ALT); }
+ "|" { BOOST_WAVE_RET(T_OR); }
+ "bitor" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_OR_ALT); }
+ "??!" { BOOST_WAVE_RET(T_OR_TRIGRAPH); }
+ "~" { BOOST_WAVE_RET(T_COMPL); }
+ "??-" { BOOST_WAVE_RET(T_COMPL_TRIGRAPH); }
+ "compl" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_COMPL_ALT); }
+ "!" { BOOST_WAVE_RET(T_NOT); }
+ "not" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_NOT_ALT); }
+ "=" { BOOST_WAVE_RET(T_ASSIGN); }
+ "<" { BOOST_WAVE_RET(T_LESS); }
+ ">" { BOOST_WAVE_RET(T_GREATER); }
+ "+=" { BOOST_WAVE_RET(T_PLUSASSIGN); }
+ "-=" { BOOST_WAVE_RET(T_MINUSASSIGN); }
+ "*=" { BOOST_WAVE_RET(T_STARASSIGN); }
+ "/=" { BOOST_WAVE_RET(T_DIVIDEASSIGN); }
+ "%=" { BOOST_WAVE_RET(T_PERCENTASSIGN); }
+ "^=" { BOOST_WAVE_RET(T_XORASSIGN); }
+ "xor_eq" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_XORASSIGN_ALT); }
+ "??'=" { BOOST_WAVE_RET(T_XORASSIGN_TRIGRAPH); }
+ "&=" { BOOST_WAVE_RET(T_ANDASSIGN); }
+ "and_eq" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_ANDASSIGN_ALT); }
+ "|=" { BOOST_WAVE_RET(T_ORASSIGN); }
+ "or_eq" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_ORASSIGN_ALT); }
+ "??!=" { BOOST_WAVE_RET(T_ORASSIGN_TRIGRAPH); }
+ "<<" { BOOST_WAVE_RET(T_SHIFTLEFT); }
+ ">>" { BOOST_WAVE_RET(T_SHIFTRIGHT); }
+ ">>=" { BOOST_WAVE_RET(T_SHIFTRIGHTASSIGN); }
+ "<<=" { BOOST_WAVE_RET(T_SHIFTLEFTASSIGN); }
+ "==" { BOOST_WAVE_RET(T_EQUAL); }
+ "!=" { BOOST_WAVE_RET(T_NOTEQUAL); }
+ "not_eq" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_NOTEQUAL_ALT); }
+ "<=" { BOOST_WAVE_RET(T_LESSEQUAL); }
+ ">=" { BOOST_WAVE_RET(T_GREATEREQUAL); }
+ "&&" { BOOST_WAVE_RET(T_ANDAND); }
+ "and" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_ANDAND_ALT); }
+ "||" { BOOST_WAVE_RET(T_OROR); }
+ "??!|" { BOOST_WAVE_RET(T_OROR_TRIGRAPH); }
+ "|??!" { BOOST_WAVE_RET(T_OROR_TRIGRAPH); }
+ "or" { BOOST_WAVE_RET(s->act_in_c99_mode ? T_IDENTIFIER : T_OROR_ALT); }
+ "??!??!" { BOOST_WAVE_RET(T_OROR_TRIGRAPH); }
+ "++" { BOOST_WAVE_RET(T_PLUSPLUS); }
+ "--" { BOOST_WAVE_RET(T_MINUSMINUS); }
+ "," { BOOST_WAVE_RET(T_COMMA); }
+ "->*"
+ {
+ if (s->act_in_c99_mode) {
+ --YYCURSOR;
+ BOOST_WAVE_RET(T_ARROW);
+ }
+ else {
+ BOOST_WAVE_RET(T_ARROWSTAR);
+ }
+ }
+ "->" { BOOST_WAVE_RET(T_ARROW); }
+ "??/" { BOOST_WAVE_RET(T_ANY_TRIGRAPH); }
+
+
+ ([a-zA-Z_] | UniversalChar) ([a-zA-Z_0-9] | UniversalChar)*
+ { BOOST_WAVE_RET(T_IDENTIFIER); }
+
+ "L"? (['] (EscapeSequence|any\[\n\r\\']|UniversalChar)+ ['])
+ { BOOST_WAVE_RET(T_CHARLIT); }
+
+ "L"? (["] (EscapeSequence|any\[\n\r\\"]|UniversalChar)* ["])
+ { BOOST_WAVE_RET(T_STRINGLIT); }
+
+
+ Pound PPSpace ( "include" | "include_next") PPSpace "<" (any\[\n\r>])+ ">"
+ { BOOST_WAVE_RET(T_PP_HHEADER); }
+
+ Pound PPSpace ( "include" | "include_next") PPSpace "\"" (any\[\n\r"])+ "\""
+ { BOOST_WAVE_RET(T_PP_QHEADER); }
+
+ Pound PPSpace ( "include" | "include_next") PPSpace
+ { BOOST_WAVE_RET(T_PP_INCLUDE); }
+
+ Pound PPSpace "if" { BOOST_WAVE_RET(T_PP_IF); }
+ Pound PPSpace "ifdef" { BOOST_WAVE_RET(T_PP_IFDEF); }
+ Pound PPSpace "ifndef" { BOOST_WAVE_RET(T_PP_IFNDEF); }
+ Pound PPSpace "else" { BOOST_WAVE_RET(T_PP_ELSE); }
+ Pound PPSpace "elif" { BOOST_WAVE_RET(T_PP_ELIF); }
+ Pound PPSpace "endif" { BOOST_WAVE_RET(T_PP_ENDIF); }
+ Pound PPSpace "define" { BOOST_WAVE_RET(T_PP_DEFINE); }
+ Pound PPSpace "undef" { BOOST_WAVE_RET(T_PP_UNDEF); }
+ Pound PPSpace "line" { BOOST_WAVE_RET(T_PP_LINE); }
+ Pound PPSpace "error" { BOOST_WAVE_RET(T_PP_ERROR); }
+ Pound PPSpace "pragma" { BOOST_WAVE_RET(T_PP_PRAGMA); }
+
+ Pound PPSpace "warning" { BOOST_WAVE_RET(T_PP_WARNING); }
+
+ Pound PPSpace "region" { BOOST_WAVE_RET(T_MSEXT_PP_REGION); }
+ Pound PPSpace "endregion" { BOOST_WAVE_RET(T_MSEXT_PP_ENDREGION); }
+
+ [ \t\v\f]+
+ { BOOST_WAVE_RET(T_SPACE); }
+
+ Newline
+ {
+ s->line++;
+ cursor.column = 1;
+ BOOST_WAVE_RET(T_NEWLINE);
+ }
+
+ "\000"
+ {
+ if (s->eof && cursor != s->eof)
+ {
+ BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
             (*s->error_proc)(s, lexing_exception::generic_lexing_error,
                 "invalid character '\\000' in input stream");
- }
- BOOST_WAVE_RET(T_EOF);
- }
-
- any { BOOST_WAVE_RET(TOKEN_FROM_ID(*s->tok, UnknownTokenType)); }
-
- anyctrl
- {
- // flag the error
- BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
+ }
+ BOOST_WAVE_RET(T_EOF);
+ }
+
+ any { BOOST_WAVE_RET(TOKEN_FROM_ID(*s->tok, UnknownTokenType)); }
+
+ anyctrl
+ {
+ // flag the error
+ BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
         (*s->error_proc)(s, lexing_exception::generic_lexing_error,
             "invalid character '\\%03o' in input stream", *--YYCURSOR);
- }
-*/
-
-ccomment:
-/*!re2c
- "*/" { BOOST_WAVE_RET(T_CCOMMENT); }
-
- Newline
- {
- /*if(cursor == s->eof) BOOST_WAVE_RET(T_EOF);*/
- /*s->tok = cursor; */
- s->line += count_backslash_newlines(s, cursor) +1;
- cursor.column = 1;
- goto ccomment;
- }
-
- any { goto ccomment; }
-
- "\000"
- {
- if(cursor == s->eof)
- {
- BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
+ }
+*/
+
+ccomment:
+/*!re2c
+ "*/" { BOOST_WAVE_RET(T_CCOMMENT); }
+
+ Newline
+ {
+ /*if(cursor == s->eof) BOOST_WAVE_RET(T_EOF);*/
+ /*s->tok = cursor; */
+ s->line += count_backslash_newlines(s, cursor) +1;
+ cursor.column = 1;
+ goto ccomment;
+ }
+
+ any { goto ccomment; }
+
+ "\000"
+ {
+ if(cursor == s->eof)
+ {
+ BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
             (*s->error_proc)(s, lexing_exception::generic_lexing_warning,
                 "unterminated 'C' style comment");
- }
- else
- {
- --YYCURSOR; // next call returns T_EOF
- BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
+ }
+ else
+ {
+ --YYCURSOR; // next call returns T_EOF
+ BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
             (*s->error_proc)(s, lexing_exception::generic_lexing_error,
                 "invalid character: '\\000' in input stream");
- }
- }
-
- anyctrl
- {
- // flag the error
- BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
+ }
+ }
+
+ anyctrl
+ {
+ // flag the error
+ BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
         (*s->error_proc)(s, lexing_exception::generic_lexing_error,
             "invalid character '\\%03o' in input stream", *--YYCURSOR);
- }
-*/
-
-cppcomment:
-/*!re2c
- Newline
- {
- /*if(cursor == s->eof) BOOST_WAVE_RET(T_EOF); */
- /*s->tok = cursor; */
- s->line++;
- cursor.column = 1;
- BOOST_WAVE_RET(T_CPPCOMMENT);
- }
-
- any { goto cppcomment; }
-
- "\000"
- {
- if (s->eof && cursor != s->eof)
- {
- --YYCURSOR; // next call returns T_EOF
- BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
+ }
+*/
+
+cppcomment:
+/*!re2c
+ Newline
+ {
+ /*if(cursor == s->eof) BOOST_WAVE_RET(T_EOF); */
+ /*s->tok = cursor; */
+ s->line++;
+ cursor.column = 1;
+ BOOST_WAVE_RET(T_CPPCOMMENT);
+ }
+
+ any { goto cppcomment; }
+
+ "\000"
+ {
+ if (s->eof && cursor != s->eof)
+ {
+ --YYCURSOR; // next call returns T_EOF
+ BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
             (*s->error_proc)(s, lexing_exception::generic_lexing_error,
                 "invalid character '\\000' in input stream");
- }
-
- --YYCURSOR; // next call returns T_EOF
- if (!s->single_line_only)
- {
- BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
+ }
+
+ --YYCURSOR; // next call returns T_EOF
+ if (!s->single_line_only)
+ {
+ BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
             (*s->error_proc)(s, lexing_exception::generic_lexing_warning,
                 "Unterminated 'C++' style comment");
- }
- BOOST_WAVE_RET(T_CPPCOMMENT);
- }
-
- anyctrl
- {
- // flag the error
- BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
+ }
+ BOOST_WAVE_RET(T_CPPCOMMENT);
+ }
+
+ anyctrl
+ {
+ // flag the error
+ BOOST_WAVE_UPDATE_CURSOR(); // adjust the input cursor
         (*s->error_proc)(s, lexing_exception::generic_lexing_error,
             "invalid character '\\%03o' in input stream", *--YYCURSOR);
- }
-*/
-
-/* this subscanner is called whenever a pp_number has been started */
-pp_number:
-{
- cursor = uchar_wrapper(s->tok = s->cur, s->column = s->curr_column);
- marker = uchar_wrapper(s->ptr);
- limit = uchar_wrapper(s->lim);
-
- if (s->detect_pp_numbers) {
- /*!re2c
- "."? Digit (Digit | NonDigit | ExponentStart | ".")*
- { BOOST_WAVE_RET(T_PP_NUMBER); }
- */
- }
- else {
- /*!re2c
- ((FractionalConstant ExponentPart?) | (Digit+ ExponentPart)) FloatingSuffix?
- { BOOST_WAVE_RET(T_FLOATLIT); }
-
- Integer { goto integer_suffix; }
- */
- }
-}
-
-/* this subscanner is called, whenever a Integer was recognized */
-integer_suffix:
-{
- if (s->enable_ms_extensions) {
- /*!re2c
- LongIntegerSuffix | "i64"
- { BOOST_WAVE_RET(T_LONGINTLIT); }
-
- IntegerSuffix?
- { BOOST_WAVE_RET(T_INTLIT); }
- */
- }
- else {
- /*!re2c
- LongIntegerSuffix
- { BOOST_WAVE_RET(T_LONGINTLIT); }
-
- IntegerSuffix?
- { BOOST_WAVE_RET(T_INTLIT); }
- */
- }
-}
+ }
+*/
+
+/* this subscanner is called whenever a pp_number has been started */
+pp_number:
+{
+ cursor = uchar_wrapper(s->tok = s->cur, s->column = s->curr_column);
+ marker = uchar_wrapper(s->ptr);
+ limit = uchar_wrapper(s->lim);
+
+ if (s->detect_pp_numbers) {
+ /*!re2c
+ "."? Digit (Digit | NonDigit | ExponentStart | ".")*
+ { BOOST_WAVE_RET(T_PP_NUMBER); }
+ */
+ }
+ else {
+ /*!re2c
+ ((FractionalConstant ExponentPart?) | (Digit+ ExponentPart)) FloatingSuffix?
+ { BOOST_WAVE_RET(T_FLOATLIT); }
+
+ Integer { goto integer_suffix; }
+ */
+ }
+}
+
+/* this subscanner is called, whenever a Integer was recognized */
+integer_suffix:
+{
+ if (s->enable_ms_extensions) {
+ /*!re2c
+ LongIntegerSuffix | "i64"
+ { BOOST_WAVE_RET(T_LONGINTLIT); }
+
+ IntegerSuffix?
+ { BOOST_WAVE_RET(T_INTLIT); }
+ */
+ }
+ else {
+ /*!re2c
+ LongIntegerSuffix
+ { BOOST_WAVE_RET(T_LONGINTLIT); }
+
+ IntegerSuffix?
+ { BOOST_WAVE_RET(T_INTLIT); }
+ */
+ }
+}

Modified: branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_001.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_001.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_001.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_1_002.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_002.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_002.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_1_003.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_003.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_003.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_1_004.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_004.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_004.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_1_005.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_005.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_005.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_1_006.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_006.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_006.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_1_007.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_007.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_007.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_1_008.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_008.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_008.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_1_009.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_009.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_009.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_1_010.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_010.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_010.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_1_011.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_011.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_011.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_1_012.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_012.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_012.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_1_013.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_013.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_013.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_1_014.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_014.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_014.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_1_015.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_015.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_015.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_1_016.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_016.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_016.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_1_020.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_020.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_020.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_1_021.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_021.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_021.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_1_022.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_022.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_022.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_1_023.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_023.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_023.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_1_025.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_025.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_025.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_1_026.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_026.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_026.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_1_029.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_029.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_029.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_1_030.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_030.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_030.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_1_031.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_031.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_031.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_1_033.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_033.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_033.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_1_034.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_034.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_034.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 2008)
@@ -19,3 +19,19 @@
 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: ""

Modified: branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_035.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_035.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_035.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 2008)
@@ -22,3 +22,26 @@
 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

Modified: branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_036.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_036.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_036.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_1_037.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_037.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_037.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_1_038.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_038.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_1_038.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 2008)
@@ -30,3 +30,8 @@
 //R
 //R struct bar {};
 
+//H 10: t_1_038.cpp(12): #define
+//H 08: t_1_038.cpp(12): BAZ(T, E)=T E
+//H 00: t_1_038.cpp(16): BAZ(bool, value = true ), [t_1_038.cpp(12): BAZ(T, E)=T E]
+//H 02: bool value = true
+//H 03: bool value = true

Modified: branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_001.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_001.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_001.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_2_002.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_002.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_002.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_2_003.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_003.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_003.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_2_004.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_004.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_004.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_2_005.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_005.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_005.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_2_006.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_006.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_006.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_2_007.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_007.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_007.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_2_008.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_008.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_008.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_2_009.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_009.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_009.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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: ./t_2_009.cpp (C:/CVS/wave/libs/wave/test/testwave/testfiles/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/proto/v3/libs/wave/test/testwave/testfiles/t_2_010.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_010.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_010.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_2_011.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_011.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_011.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_2_012.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_012.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_012.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_2_013.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_013.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_013.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_2_014.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_014.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_014.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_2_015.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_015.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_015.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_2_016.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_016.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_016.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_2_017.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_017.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_2_017.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_3_001.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_3_001.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_3_001.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_3_002.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_3_002.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_3_002.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_3_003.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_3_003.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_3_003.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_3_004.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_3_004.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_3_004.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_4_001.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_4_001.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_4_001.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_4_002.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_4_002.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_4_002.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_4_004.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_4_004.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_4_004.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_5_030.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_5_030.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_5_030.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_6_063.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_6_063.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_6_063.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_6_067.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_6_067.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_6_067.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_9_001.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_001.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_001.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_9_002.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_002.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_002.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_9_003.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_003.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_003.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 2008)
@@ -35,3 +35,18 @@
 //R
 DOT()DOT()DOT() //R .. .
 STRINGIZE( DOT()DOT()DOT() ) //R "..."
+
+// the following are regressions reported by Stefan Seefeld
+#define COMMA() ,
+#define AND() &
+#define CHAR() char
+#define STAR() *
+
+// Make sure no whitespace gets inserted in between the operator symbols
+//R #line 47 "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/proto/v3/libs/wave/test/testwave/testfiles/t_9_004.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_004.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_004.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_9_006.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_006.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_006.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_9_007.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_007.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_007.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_9_008.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_008.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_008.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_9_009.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_009.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_009.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_9_010.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_010.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_010.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_9_011.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_011.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_011.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_9_012.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_012.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_012.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_9_013.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_013.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_013.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_9_016.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_016.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_016.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_9_017.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_017.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_017.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_9_018.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_018.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_018.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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/proto/v3/libs/wave/test/testwave/testfiles/t_9_019.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_019.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testfiles/t_9_019.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 2008)
@@ -13,3 +13,9 @@
 //E t_9_019.hpp(11): error: could not find include file: t_9_019.hpp
 #include "t_9_019.hpp"
 
+// 10: t_9_019.cpp(14): #include "t_9_019.hpp"
+// 04: "t_9_019.hpp"
+// 05: $B(t_9_019.hpp) ($B(t_9_019.hpp))
+// 10: t_9_019.hpp(11): #include_next "t_9_019.hpp"
+// 04: "t_9_019.hpp" (include_next)
+// 18: boost::wave::preprocess_exception

Modified: branches/proto/v3/libs/wave/test/testwave/testwave.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testwave.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testwave.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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
 //

Modified: branches/proto/v3/libs/wave/test/testwave/testwave_app.cpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testwave_app.cpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testwave_app.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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)
@@ -128,10 +102,11 @@
 ///////////////////////////////////////////////////////////////////////////
 //
 // 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 (but using forward slahs '/' on Windows)
 // $V: to the current Boost version number
 //
 ///////////////////////////////////////////////////////////////////////////
@@ -159,9 +134,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 +158,12 @@
                 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());
+
                     if ('(' == expected[pos1+2]) {
                     // the $P(basename) syntax is used
                         std::size_t p = expected.find_first_of(")", pos1+1);
@@ -199,17 +176,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 +262,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
@@ -285,11 +275,12 @@
         return false; // error was reported already
 
 // 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 +323,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 (!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 +376,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 +389,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 +588,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 +634,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 +696,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);
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -873,7 +910,7 @@
                 std::cerr << "initialise_options: option: -D" << *cit
                           << std::endl;
             }
- ctx.add_macro_definition(*cit);
+ ctx.add_macro_definition(*cit, true);
         }
     }
 
@@ -889,7 +926,7 @@
                 std::cerr << "initialise_options: option: -P" << *cit
                           << std::endl;
             }
- ctx.add_macro_definition(*cit);
+ ctx.add_macro_definition(*cit, true);
         }
     }
 
@@ -941,7 +978,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 +1007,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 +1036,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 +1054,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 +1143,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 +1163,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/proto/v3/libs/wave/test/testwave/testwave_app.hpp
==============================================================================
--- branches/proto/v3/libs/wave/test/testwave/testwave_app.hpp (original)
+++ branches/proto/v3/libs/wave/test/testwave/testwave_app.hpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 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>

Modified: branches/proto/v3/status/Jamfile.v2
==============================================================================
--- branches/proto/v3/status/Jamfile.v2 (original)
+++ branches/proto/v3/status/Jamfile.v2 2008-03-10 16:14:31 EDT (Mon, 10 Mar 2008)
@@ -38,7 +38,7 @@
 build-project ../libs/date_time/test ; # test-suite date_time
 build-project ../libs/disjoint_sets ; # test-suite disjoint_sets
 build-project ../libs/dynamic_bitset ; # test-suite dynamic_bitset
-build-project ../libs/exception ;
+build-project ../libs/exception/test ;
 build-project ../libs/filesystem/test ; # test-suite filesystem
 build-project ../libs/foreach/test ; # test-suite foreach
 build-project ../libs/format/test ; # test-suite format

Modified: branches/proto/v3/tools/build/v2/tools/darwin.jam
==============================================================================
--- branches/proto/v3/tools/build/v2/tools/darwin.jam (original)
+++ branches/proto/v3/tools/build/v2/tools/darwin.jam 2008-03-10 16:14:31 EDT (Mon, 10 Mar 2008)
@@ -24,6 +24,10 @@
 generators.override darwin.prebuilt : builtin.prebuilt ;
 generators.override darwin.searched-lib-generator : searched-lib-generator ;
 
+# Override default do-nothing generators.
+generators.override darwin.compile.c.pch : pch.default-c-pch-generator ;
+generators.override darwin.compile.c++.pch : pch.default-cpp-pch-generator ;
+
 toolset.inherit-rules darwin : gcc ;
 toolset.inherit-flags darwin : gcc
   : <runtime-link>static

Modified: branches/proto/v3/tools/wave/cpp.cpp
==============================================================================
--- branches/proto/v3/tools/wave/cpp.cpp (original)
+++ branches/proto/v3/tools/wave/cpp.cpp 2008-03-10 16:14:31 EDT (Mon, 10 Mar 2008)
@@ -568,7 +568,7 @@
             
             if (ctx.get_macro_definition(*it, has_pars, predef, pos, pars, def))
             {
- macronames_out << *it;
+ macronames_out << (predef ? "-P" : "-D") << *it;
                 if (has_pars) {
                 // list the parameter names for function style macros
                     macronames_out << "(";
@@ -592,10 +592,6 @@
                     macronames_out << (*dit).get_value();
                 }
 
- // predefined macros get a 'P' appended
- if (predef)
- macronames_out << " (P)";
-
                 macronames_out << std::endl;
             }
         }


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