Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r49305 - in branches/release: boost/wave/cpplexer libs/wave/doc libs/wave/samples/cpp_tokens libs/wave/samples/cpp_tokens/slex libs/wave/samples/list_includes libs/wave/samples/list_includes/lexertl
From: hartmut.kaiser_at_[hidden]
Date: 2008-10-12 21:24:35


Author: hkaiser
Date: 2008-10-12 21:24:34 EDT (Sun, 12 Oct 2008)
New Revision: 49305
URL: http://svn.boost.org/trac/boost/changeset/49305

Log:
Wave: merging fixes to release branch
Text files modified:
   branches/release/boost/wave/cpplexer/cpp_lex_iterator.hpp | 20
   branches/release/libs/wave/doc/class_reference_context.html | 4
   branches/release/libs/wave/doc/class_reference_ctxpolicy.html | 590 +++++++++------------------------------
   branches/release/libs/wave/doc/class_reference_filepos.html | 4
   branches/release/libs/wave/doc/class_reference_inptpolcy.html | 4
   branches/release/libs/wave/doc/class_reference_lexer.html | 6
   branches/release/libs/wave/doc/class_reference_tokentype.html | 4
   branches/release/libs/wave/samples/cpp_tokens/slex/cpp_slex_lexer.hpp | 6
   branches/release/libs/wave/samples/cpp_tokens/slex_iterator.hpp | 30 +-
   branches/release/libs/wave/samples/list_includes/lexertl/lexertl_lexer.hpp | 14
   branches/release/libs/wave/samples/list_includes/lexertl_iterator.hpp | 115 +++++--
   11 files changed, 265 insertions(+), 532 deletions(-)

Modified: branches/release/boost/wave/cpplexer/cpp_lex_iterator.hpp
==============================================================================
--- branches/release/boost/wave/cpplexer/cpp_lex_iterator.hpp (original)
+++ branches/release/boost/wave/cpplexer/cpp_lex_iterator.hpp 2008-10-12 21:24:34 EDT (Sun, 12 Oct 2008)
@@ -99,7 +99,7 @@
     {
         return mp.shared->ftor->has_include_guards(guard_name);
     }
-#endif
+#endif
 };
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -156,7 +156,7 @@
     typedef boost::spirit::multi_pass_policies::no_check check_policy;
 #endif
     typedef boost::spirit::multi_pass_policies::split_std_deque storage_policy;
-
+
     typedef boost::spirit::multi_pass_policies::default_policy<
             ownership_policy, check_policy, input_policy, storage_policy>
         policy_type;
@@ -169,20 +169,20 @@
 : public make_multi_pass<impl::lex_iterator_functor_shim<TokenT> >::type
 {
     typedef impl::lex_iterator_functor_shim<TokenT> input_policy_type;
-
+
     typedef typename make_multi_pass<input_policy_type>::type base_type;
     typedef typename make_multi_pass<input_policy_type>::functor_data_type
         functor_data_type;
 
     typedef typename input_policy_type::unique unique_functor_type;
     typedef typename input_policy_type::shared shared_functor_type;
-
+
 public:
     typedef TokenT token_type;
-
+
     lex_iterator()
     {}
-
+
     template <typename IteratorT>
     lex_iterator(IteratorT const &first, IteratorT const &last,
             typename TokenT::position_type const &pos,
@@ -199,7 +199,7 @@
     void set_position(typename TokenT::position_type const &pos)
     {
         typedef typename TokenT::position_type position_type;
-
+
     // set the new position in the current token
     token_type& currtoken = this->base_type::dereference(*this);
     position_type currpos = currtoken.get_position();
@@ -207,7 +207,7 @@
         currpos.set_file(pos.get_file());
         currpos.set_line(pos.get_line());
         currtoken.set_position(currpos);
-
+
     // set the new position for future tokens as well
         if (token_type::string_type::npos !=
             currtoken.get_value().find_first_of('\n'))
@@ -216,7 +216,7 @@
         }
         unique_functor_type::set_position(*this, currpos);
     }
-
+
 #if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0
     // return, whether the current file has include guards
     // this function returns meaningful results only if the file was scanned
@@ -225,7 +225,7 @@
     {
         return unique_functor_type::has_include_guards(*this, guard_name);
     }
-#endif
+#endif
 };
 
 ///////////////////////////////////////////////////////////////////////////////

Modified: branches/release/libs/wave/doc/class_reference_context.html
==============================================================================
--- branches/release/libs/wave/doc/class_reference_context.html (original)
+++ branches/release/libs/wave/doc/class_reference_context.html 2008-10-12 21:24:34 EDT (Sun, 12 Oct 2008)
@@ -51,7 +51,7 @@
     for instance to control, whether to enable several extensions to the
     C++ Standard (as for instance variadics and placemarkers) or not.</p>
 </blockquote>
-<h2><b><a name="header_synopsis"></a>Header wave/cpp_context.hpp synopsis</b></h2>
+<h2><b><a name="header_synopsis"></a>Header wave/cpp_context.hpp synopsis</b></h2>
 <pre><span class="keyword">namespace</span> <span class="identifier">boost</span> {<br><span class="keyword">namespace</span> <span class="identifier">wave</span> { <br> <br> <span class="keyword"> struct</span> this_type {};<br><br> <span class="keyword">template</span> &lt;<br> <span class="keyword">typename</span> Iterator, <span class="keyword">typename</span> LexIterator, <br> <span class="keyword">typename</span> InputPolicy, <span class="keyword">typename</span> ContextPolicy,<br> <span class="keyword">typename</span> Derived = this_type<br> &gt; <br> <span class="keyword"> class</span> context <span class="special">:</span> <span class="keyword">public</span> InputPolicy <br> {<br> <span class="keyword">typedef</span> &lt;unspecified&gt; token_sequence_type;<br><br> <span class="keyword">public</span>: <br><br> <span class="keyword"> typedef</span> pp_iterator&lt;context&gt; iterator_type; <br> <span class="keyword">typedef</span> Token token_
type;<br> <span class="keyword">typedef</span> <span class="keyword">typename</span> token_type::position_type position_type;<br> <span class="keyword">typedef</span> std::list&lt;token_type&gt; token_sequence_type;<br><br><span class="comment"> // constructor</span><br> context(Iterator<span class="keyword"> const</span> &amp;first_, <br> Iterator <span class="keyword">const</span> &amp;last_, <br> <span class="keyword">char const</span> *fname = <span class="string">"&lt;Unknown&gt;"</span>,<br> ContextPolicy <span class="keyword">const</span>&amp; ctx_policy = ContextPolicy())<br><br> <span class="comment">// iterator interface</span><br> iterator_type begin() <span class="keyword">const</span>;<br> iterator_type begin(Iterator<span class="keywo
rd"> const</span> &amp;first, <br> Iterator <span class="keyword">const</span> &amp;last) <span class="keyword">const</span>;<br> iterator_type end() <span class="keyword">const</span>;<br><br> <span class="comment">// maintain include paths</span><br><span class="keyword"> bool</span> add_include_path(<span class="keyword">char const</span> *path_);<br> <span class="keyword">bool</span> add_sysinclude_path(<span class="keyword">char const</span> *path_);<br> <span class="keyword">void</span> set_sysinclude_delimiter();<br> <br> size_t get_iteration_depth() <span class="keyword">const</span>;<br><br> <span class="comment"> // maintain defined m
acros</span><br> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> String&gt;<br><span class="keyword"> bool</span> add_macro_definition(<span class="keyword">String</span> macrostring, <br> <span class="keyword"> bool</span> is_predefined = <span class="keyword">false</span>);<br> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> String&gt;<br><span class="keyword"></span> <span class="keyword">bool</span> add_macro_definition(StringT <span class="keyword">const</span> &amp;name, <br> position_type <span class="keyword">const</span>&amp; pos, <span class="keyword">bool</span> has_params, <br> std::vector&lt;token_type&gt; &amp;parameters, <br> token_sequence_type &amp;definition, <br> <span class="keyword">bool</span> is_predefined = <span class="keyword">false</span>)<br><br> <span class="keyword"
>template</span> &lt;<span class="keyword">typename</span> String&gt;<br> <span class="keyword">bool</span> is_defined_macro(<span class="keyword">String const</span> &amp;name) <span class="keyword">const</span>;<br> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> String&gt;<br> <span class="keyword">bool</span> remove_macro_definition(String<span class="keyword"> const</span> &amp;name, <br> <span class="keyword"> bool</span> even_predefined = <span class="keyword">false</span>);<br> <span class="keyword">void</span> reset_macro_definitions();<br> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> String&gt;<br> <span class="keyword"> bool</span> <a href="class_reference_context.html#get_macro_definition">
get_macro_definition</a>(<br> <span class="keyword"> </span>String<span class="keyword"> const</span> &amp;name, <span class="keyword">bool</span> &amp;is_function_style, <span class="keyword"><br> bool</span> &amp;is_predefined, position_type &amp;pos, <br> std::vector&lt;token_type&gt; &amp;parameters, <br> token_sequence_type &amp;definition) <span class="keyword">const</span>; <br><br> <span class="keyword">typedef</span> &lt;unspecified&gt; macromap_type;<br> <span class="keyword">typedef</span> typename macromap_type::name_iterator name_iterator;<br> <span class="keyword">typedef</span> typename macromap_type::const_name_iterator const_name_iterator;<br><br> name_iterator macro_names_begin();<br> name_iterator macro_names_end();<br> const_name_iterator <a href="class_reference_context.html#m
acro_names_iterators">macro_names_begin</a>() <span class="keyword">const</span>;<br> const_name_iterator macro_names_end() <span class="keyword">const</span>;<br><br> <span class="comment">// other options</span><br><span class="keyword"> void</span> set_language(language_support enable);<br> language_support get_language() <span class="keyword">const</span>;<br><br><span class="keyword"> void</span> set_max_include_nesting_depth(std::size_t new_depth);<br> size_t get_max_include_nesting_depth() <span class="keyword">const</span>;<br><br><span class="comment"> // get the Wave version information </span><br><span class="keyword"> static
 std::string</span> get_version();<br> <span class="keyword">static std::string</span> get_version_string();<br> };<br><br>} <span class="comment">// namespace wave</span><br>} <span class="comment">// namespace boost</span></pre>
 <h2><b><a name="template_parameters"></a>Template
   parameters</b></h2>
@@ -477,7 +477,7 @@
 <span class="updated"></span>
 <p class="copyright"><span class="updated">Last
   updated:
- <!-- #BeginDate format:fcAm1m -->Tuesday, July 29, 2008 20:30<!-- #EndDate -->
+ <!-- #BeginDate format:fcAm1m -->Sunday, October 12, 2008 20:14<!-- #EndDate -->
   </span> </p>
 <p>&nbsp;</p>
 </body>

Modified: branches/release/libs/wave/doc/class_reference_ctxpolicy.html
==============================================================================
--- branches/release/libs/wave/doc/class_reference_ctxpolicy.html (original)
+++ branches/release/libs/wave/doc/class_reference_ctxpolicy.html 2008-10-12 21:24:34 EDT (Sun, 12 Oct 2008)
@@ -1,102 +1,56 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
-
-
- <title>The Context Policy</title>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-
- <link href="theme/style.css" rel="stylesheet" type="text/css">
+<title>The Context Policy</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link href="theme/style.css" rel="stylesheet" type="text/css">
 </head>
-
-
 <body>
-
 <table background="theme/bkd2.gif" border="0" cellspacing="2" width="100%">
-
   <tbody>
     <tr>
-
- <td width="21">
- <h1></h1>
- </td>
-
- <td width="885"> <font face="Verdana, Arial, Helvetica, sans-serif"><b><font size="6">The
- Context Policy </font></b></font></td>
-
- <td width="96"></td>
-
- </tr>
-
+ <td width="21">&nbsp;</td>
+ <td width="885"><font size="6" face="Verdana, Arial, Helvetica, sans-serif"><b>The
+ Context Policy </b></font></td>
+ <td width="96"></td>
+ </tr>
   </tbody>
 </table>
-
 <br>
-
 <table border="0">
-
   <tbody>
     <tr>
-
- <td width="10"></td>
-
- <td width="30"></td>
-
- <td width="30"></td>
-
- <td width="30"></td>
-
- </tr>
-
+ <td width="10"></td>
+ <td width="30"></td>
+ <td width="30"></td>
+ <td width="30"></td>
+ </tr>
   </tbody>
 </table>
-
-<blockquote>
-
+<blockquote>
   <p>Introduction<br>
-
     <a href="class_reference_ctxpolicy.html#header_synopsis">Header 'wave/preprocessing_hooks.hpp'
     synopsis</a><br>
-
     <a href="class_reference_ctxpolicy.html#member_functions">Member functions</a></p>
-
 </blockquote>
-
 <h2><b><a name="introduction"></a>Introduction</b></h2>
-
 <p>Please note that the following description relates to the new
-preprocessing hooks interface used by default starting with the Boost
-V1.35.0 release. If you are interested in the older interface please
-look here. </p>
-
+ preprocessing hooks interface used by default starting with the Boost
+ V1.35.0 release. If you are interested in the older interface please
+ look here. </p>
 <p>The context policy is used to provide callback hooks, which are called from inside the library into the user code, whenever</p>
-
 <ul>
-
   <li>a preprocessor directive has been recognized, </li>
-
   <li>a token is about to be returned from the preprocessor, </li>
-
   <li>a macro get's defined or undefined, </li>
-
   <li>a macro has been expanded or rescanned,</li>
-
   <li>an include file has been opened or closed, </li>
-
   <li>a conditional expression was evaluated,</li>
-
   <li>a token has to be skipped because it is contained in a non-evaluated conditional block, </li>
-
   <li> a pragma of the form <tt>'wave option[(value)]'</tt> has been recognized. </li>
-
 </ul>
-
-<p>This policy type is used as a template parameter to the boost::wave::context<>
- object, where the default policy provides empty hook functions only.</p>
-
-<h2><a name="header_synopsis"></a>Header wave/preprocessing_hooks.hpp
- synopsis</h2>
-
+<p>This policy type is used as a template parameter to the boost::wave::context<> object, where the default policy provides empty hook functions only.</p>
+<h2><a name="header_synopsis"></a>Header wave/preprocessing_hooks.hpp synopsis</h2>
 <pre><span class="keyword">namespace</span> boost {<br><span class="keyword">namespace</span> wave {<br><span class="keyword">namespace</span> context_policies {<br> <br> <span class="keyword">struct</span> default_preprocessing_hooks {<br><br> <span class="comment">// general hook functions</span>
         <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> TokenT&gt;<br> <span class="keyword">bool</span> found_directive(ContextT <span class="keyword">const</span> &amp;ctx, <br> TokenT <span class="keyword">const </span>&amp;directive);<br><br> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> ExceptionT&gt;<br> void throw_exception(ContextT <span class="keyword">const</span> &amp;ctx, <br> ExceptionT <span class="keyword">const</span>&amp; e);<br><br> <span class="comment">// test, whether a given token may be skipped</span><br> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT&gt;<br> <span class="keyword">bool</span> <a href="c
lass_reference_ctxpolicy.html#may_skip_whitespace">may_skip_whitespace</a> (ContextT <span class="keyword">const</span>&amp; ctx,<br> TokenT &amp;token, <span class="keyword">bool</span> &amp;skipped_newline);<br>
         <span class="comment">// Conditional compilation</span><span class="keyword">
@@ -112,573 +66,313 @@
             bool</span> is_functionlike, ParametersT <span class="keyword">const</span> &amp;parameters, <br> DefinitionT <span class="keyword">const</span> &amp;definition, <span class="keyword">bool</span> is_predefined);<br><br> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> TokenT&gt;<br> <span class="keyword">void</span> undefined_macro(ContextT <span class="keyword">const</span> &amp;ctx, <br> TokenT<span class="keyword"> const</span> &amp;name);<br><br> <span class="comment">// #error and #warning directive hooks</span>
         <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> ContainerT&gt;<br> <span class="keyword">bool</span> found_warning_directive(ContextT <span class="keyword">const</span> &amp;ctx, <br> ContainerT <span class="keyword">const</span> &amp;message);<br><br> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> ContainerT&gt;<br> <span class="keyword">bool</span> found_error_directive(ContextT <span class="keyword">const</span> &amp;ctx, <br> ContainerT <span class="keyword">const</span> &amp;message);<br><br> <span class="comment">// #line directive hook</span>
         <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> ContainerT&gt;<br> <span class="keyword">void</span> found_line_directive(ContextT <span class="keyword">const</span> &amp;ctx, <br> ContainerT <span class="keyword">const</span> &amp;arguments, <span class="keyword">unsigned int</span> line,<br> std::string <span class="keyword">const</span>&amp; filename);<br> };<br><br>}}} <span class="comment">// namespace boost::wave::context_policies</span></pre>
-
 <h2><a name="member_functions"></a>Member functions</h2>
-
 <h3>General hook functions </h3>
-
 <p><a name="found_directive"></a><strong>found_directive</strong></p>
-
-<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> TokenT&gt;<br> <span class="keyword">bool</span> found_directive(ContextT <span class="keyword">const</span>&amp; ctx, TokenT <span class="keyword">const </span>&amp;directive);<br></pre>
-
+<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> TokenT&gt;<br> <span class="keyword">bool</span> found_directive(ContextT <span class="keyword">const</span>&amp; ctx, TokenT <span class="keyword">const </span>&amp;directive);<br>
+</pre>
 <blockquote>
-
   <p>The function <tt>found_directive</tt> is called, whenever the preprocessor has detected one of the preprocessing directives (<span class="preprocessor">#define</span>, <span class="preprocessor">#undef</span>, <span class="preprocessor">#if</span>, <span class="preprocessor">#idef</span>, <span class="preprocessor">#ifndef</span>, <span class="preprocessor">#elif</span>, <span class="preprocessor">#endif</span>, <span class="preprocessor">#error</span>, <span class="preprocessor">#include</span>, <span class="preprocessor">#pragma</span> or <span class="preprocessor">#warning</span>) .</p>
-
-
- <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt>
-used during instantiation of the preprocessing iterators by the user.
-Note, this parameter was added for the Boost V1.35.0 release. </p>
-
-
+ <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt> used during instantiation of the preprocessing iterators by the user.
+ Note, this parameter was added for the Boost V1.35.0 release. </p>
   <p>The parameter <tt>directive</tt> refers to the token containing the detected preprocessing directive. </p>
-
-
   <p>If the return value is <tt>true</tt>, the directive will be
-skipped altogether, i.e. no preprocessing is done. The overall
-directive is replaced by a single newline character. If the return
-value is <tt>false</tt>, the directive is processed in the normal manner. </p>
-
+ skipped altogether, i.e. no preprocessing is done. The overall
+ directive is replaced by a single newline character. If the return
+ value is <tt>false</tt>, the directive is processed in the normal manner. </p>
 </blockquote>
-
 <p><a name="throw_exception"></a><strong>throw_exception</strong></p>
-
 <pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> ExceptionT&gt;<br> void throw_exception(ContextT <span class="keyword">const</span> &amp;ctx, <br> ExceptionT <span class="keyword">const</span>&amp; e);</pre>
-
 <blockquote>
-
   <p>he function&nbsp;<tt>throw_exception</tt> is called, whenever a preprocessing exception occurs .</p>
-
-
- <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt>
-used during instantiation of the preprocessing iterators by the user.&nbsp; </p>
-
-
+ <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt> used during instantiation of the preprocessing iterators by the user.&nbsp; </p>
   <p>The parameter&nbsp;<tt>e</tt> is the exception object containing detailed error information. </p>
-
-
 </blockquote>
-
 <p><a name="may_skip_whitespace" id="may_skip"></a><strong>may_skipwhitespace</strong></p>
-
-<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> TokenT&gt;<br> <span class="keyword">bool</span> may_skip_whitespace(ContextT <span class="keyword">const</span>&amp; ctx, TokenT &amp;token, <br> <span class="keyword">bool</span>&amp; skipped_newline);<br></pre>
-
+<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> TokenT&gt;<br> <span class="keyword">bool</span> may_skip_whitespace(ContextT <span class="keyword">const</span>&amp; ctx, TokenT &amp;token, <br> <span class="keyword">bool</span>&amp; skipped_newline);<br>
+</pre>
 <blockquote>
-
   <p>The function <tt>may_skipwhitespace</tt> will be called by the library, whenever a token is about to be returned to the calling application. </p>
-
-
- <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt>
-used during instantiation of the preprocessing iterators by the user.
-Note, this parameter was added for the Wave V1.2.4 release. </p>
-
-
+ <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt> used during instantiation of the preprocessing iterators by the user.
+ Note, this parameter was added for the Wave V1.2.4 release. </p>
   <p>The <tt>token</tt> parameter holds a reference to the current token. The policy is free to change this token if needed.</p>
-
-
   <p>The <tt>skipped_newline</tt> parameter holds a reference to a
-boolean value which should be set to true by the policy function
-whenever a newline is going to be skipped. </p>
-
-
+ boolean value which should be set to true by the policy function
+ whenever a newline is going to be skipped. </p>
   <p>If the return value is <tt>true</tt>, the given token is skipped and the preprocessing continues to the next token. If the return value is <tt>false</tt>, the given token is returned to the calling application. Caution has to be used, because by returning <span class="keyword">true</span> the policy function is able to force skipping even significant tokens not only whitespace. </p>
-
 </blockquote>
-
 <h3>Conditional compilation hook functions </h3>
-
 <p><a name="evaluated_conditional_expression"></a><strong>evaluated_conditional_expression</strong></p>
-
-<pre><span class="keyword"> template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> TokenT, <span class="keyword">typename</span> ContainerT&gt;<br><span class="keyword"> bool</span> evaluated_conditional_expression(ContextT <span class="keyword">const</span>&amp; ctx, <br> TokenT <span class="keyword">const</span>&amp; directive, ContainerT <span class="keyword">const</span>&amp; expression, <span class="keyword"><br> bool</span> expression_value);<br></pre>
-
-<blockquote>
-
- <p>The function <tt>evaluated_conditional_expression</tt> is called, whenever the preprocessor has encountered a <span class="preprocessor">#if</span>, <span class="preprocessor">#elif</span>, <span class="preprocessor">#ifdef</span> or <span class="preprocessor">#ifndef</span>
-directive. This hook gets passed the non-expanded conditional
-expression (as it was given in the analysed source file) and the result
-of the evaluation of this expression in the current preprocessing
-context.</p>
-
-
- <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt>
-used during instantiation of the preprocessing iterators by the user.
-Note, this parameter was added for the Boost V1.35.0 release. </p>
-
-
+<pre><span class="keyword"> template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> TokenT, <span class="keyword">typename</span> ContainerT&gt;<br><span class="keyword"> bool</span> evaluated_conditional_expression(ContextT <span class="keyword">const</span>&amp; ctx, <br> TokenT <span class="keyword">const</span>&amp; directive, ContainerT <span class="keyword">const</span>&amp; expression, <span class="keyword"><br> bool</span> expression_value);<br>
+</pre>
+<blockquote>
+ <p>The function <tt>evaluated_conditional_expression</tt> is called, whenever the preprocessor has encountered a <span class="preprocessor">#if</span>, <span class="preprocessor">#elif</span>, <span class="preprocessor">#ifdef</span> or <span class="preprocessor">#ifndef</span> directive. This hook gets passed the non-expanded conditional
+ expression (as it was given in the analysed source file) and the result
+ of the evaluation of this expression in the current preprocessing
+ context.</p>
+ <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt> used during instantiation of the preprocessing iterators by the user.
+ Note, this parameter was added for the Boost V1.35.0 release. </p>
   <p>The <tt>token</tt> parameter holds a reference to the evaluated directive token.&nbsp;</p>
-
-
   <p>The parameter <tt>expression</tt> holds the non-expanded token sequence
     comprising the evaluated expression.</p>
-
-
   <p>The parameter <tt>expression_value</tt> contains the result of the evaluation of
     the expression in the current preprocessing context. </p>
-
-
   <p>The return value defines, whether the given expression has to be
-evaluated again, allowing to decide which of the conditional branches
-should be expanded. You need to return '<span class="keyword">true</span>' from this hook function to force the expression to be re-evaluated. Note, this was changed from a '<span class="keyword">void</span>' for the Boost V1.35.0 release. <br>
-
+ evaluated again, allowing to decide which of the conditional branches
+ should be expanded. You need to return '<span class="keyword">true</span>' from this hook function to force the expression to be re-evaluated. Note, this was changed from a '<span class="keyword">void</span>' for the Boost V1.35.0 release. <br>
   </p>
-
 </blockquote>
-
 <p><a name="skipped_token"></a><strong>skipped_token</strong></p>
-
-<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> TokenT&gt;<br> <span class="keyword">void</span> skipped_token(ContextT <span class="keyword">const</span>&amp; ctx, TokenT <span class="keyword">const</span>&amp; token);<br></pre>
-
+<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> TokenT&gt;<br> <span class="keyword">void</span> skipped_token(ContextT <span class="keyword">const</span>&amp; ctx, TokenT <span class="keyword">const</span>&amp; token);<br>
+</pre>
 <blockquote>
-
   <p>The function <tt>skipped_token</tt> is called, whenever a token is about to be skipped due to a false preprocessor condition (code fragments to be
- skipped inside the not evaluated conditional <span class="preprocessor">#if</span>/<span class="preprocessor">#else</span>/<span class="preprocessor">#endif</span> branches).</p>
-
-
- <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt>
-used during instantiation of the preprocessing iterators by the user.
-Note, this parameter was added for the Boost V1.35.0 release. </p>
-
-
+ skipped inside the not evaluated conditional <span class="preprocessor">#if</span>/<span class="preprocessor">#else</span>/<span class="preprocessor">#endif</span> branches).</p>
+ <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt> used during instantiation of the preprocessing iterators by the user.
+ Note, this parameter was added for the Boost V1.35.0 release. </p>
   <p>The parameter <tt>token</tt> refers to the token to be skipped.</p>
-
 </blockquote>
-
 <p><a name="generated_token"></a><strong>generated_token</strong></p>
-
-<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> TokenT&gt;<br> TokenT <span class="keyword">const</span>&amp; generated_token(ContextT <span class="keyword">const</span>&amp; ctx, TokenT <span class="keyword">const</span>&amp; token);<br></pre>
-
+<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> TokenT&gt;<br> TokenT <span class="keyword">const</span>&amp; generated_token(ContextT <span class="keyword">const</span>&amp; ctx, TokenT <span class="keyword">const</span>&amp; token);<br>
+</pre>
 <blockquote>
-
   <p>The function <tt>generated_token</tt> is called, whenever a token is about to be returned from the library.</p>
-
-
- <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt>
-used during instantiation of the preprocessing iterators by the user.
-Note, this parameter was added for the Boost V1.35.0 release. </p>
-
-
+ <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt> used during instantiation of the preprocessing iterators by the user.
+ Note, this parameter was added for the Boost V1.35.0 release. </p>
   <p>The parameter <tt>token</tt> refers to the token about to be
-returned from the library. This function may alter the token, but in
-this case it must be implemented with a non-const reference for the
-token parameter, allowing to modify the token in place.</p>
+ returned from the library. This function may alter the token, but in
+ this case it must be implemented with a non-const reference for the
+ token parameter, allowing to modify the token in place.</p>
   <p>The default behavior is to return the passed token reference unchanged to the caller.</p>
-
 </blockquote>
-
 <h3>Macro expansion tracking functions</h3>
-
 <p><a name="expanding_function_like_macro"></a><b>expanding_function_like_macro</b></p>
-
 <pre><span class="keyword"> template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> TokenT, <span class="keyword">typename</span> ContainerT&gt;<br> <span class="keyword">bool</span> expanding_function_like_macro(<br> ContextT <span class="keyword">const</span>&amp; ctx, TokenT <span class="keyword">const</span> &amp;macrodef, <br> <span class="keyword">std::vector</span>&lt;TokenT&gt; <span class="keyword">const</span> &amp;formal_args, <br> ContainerT <span class="keyword">const</span> &amp;definition, TokenT <span class="keyword">const</span> &amp;macrocall, <br> <span class="keyword">std::vector</span>&lt;ContainerT&gt; <span class="keyword">const</span> &amp;arguments,<br> IteratorT <span class="keyword">const</span> &amp;seqstart, Iterator <span class="keyword">const</span> &amp;seqend);</pre>
-
-<blockquote>
-
+<blockquote>
   <p>The function <tt>expanding_function_like_macro</tt> is called, whenever a
     function-like macro is to be expanded, i.e. <i>before</i> the actual expansion
     starts.</p>
-
-
- <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt>
-used during instantiation of the preprocessing iterators by the user.
-Note, this parameter was added for the Boost V1.35.0 release. </p>
-
-
+ <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt> used during instantiation of the preprocessing iterators by the user.
+ Note, this parameter was added for the Boost V1.35.0 release. </p>
   <p>The <tt>macroname</tt> parameter marks the position where the macro to expand
     is defined. It contains the token which identifies the macro name used inside
     the corresponding macro definition.</p>
-
-
   <p>The <tt>formal_args</tt> parameter holds the formal arguments used during
     the definition of the macro. </p>
-
-
   <p>The <tt>definition</tt> parameter holds the macro definition for the macro
     to trace. This is a standard STL container which holds the token sequence
     identified during the macro definition as the macro replacement list.</p>
-
-
   <p>The <tt>macrocall</tt> parameter marks the position where this macro is invoked.
     It contains the token, which identifies the macro call inside the preprocessed
     input stream. </p>
-
-
   <p>The <tt>arguments</tt> parameter holds the macro arguments used during the
     invocation of the macro. This is a vector of standard STL containers which
     contain the token sequences identified at the position of the macro call as
     the arguments to be used during the macro expansion. </p>
-
-
   <p>The parameters <tt>seqstart</tt> and <tt>seqend</tt> point into the input token
     stream allowing to access the whole token sequence comprising the macro
     invocation (starting with the opening parenthesis and ending after the
- closing one).</p>
-
-
+ closing one).</p>
   <p>If the return value is <tt>true</tt>, the macro is not expanded,
-i.e. the overall macro invocation sequence, including the parameters
-are copied to the output without further processing . If the return
-value is <tt>false</tt>, the macro is expanded as expected. <br>
-
+ i.e. the overall macro invocation sequence, including the parameters
+ are copied to the output without further processing . If the return
+ value is <tt>false</tt>, the macro is expanded as expected. <br>
   </p>
-
 </blockquote>
-
 <p><a name="expanding_object_like_macro"></a><b>expanding_object_like_macro</b></p>
-
-<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> TokenT, <span class="keyword">typename</span> ContainerT&gt;<br> <span class="keyword">bool</span> expanding_object_like_macro(<br> ContextT <span class="keyword">const</span>&amp; ctx, TokenT <span class="keyword">const</span> &amp;macro, <br> ContainerT <span class="keyword">const</span> &amp;definition, TokenT <span class="keyword">const</span> &amp;macrocall);<br></pre>
-
-<blockquote>
-
+<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> TokenT, <span class="keyword">typename</span> ContainerT&gt;<br> <span class="keyword">bool</span> expanding_object_like_macro(<br> ContextT <span class="keyword">const</span>&amp; ctx, TokenT <span class="keyword">const</span> &amp;macro, <br> ContainerT <span class="keyword">const</span> &amp;definition, TokenT <span class="keyword">const</span> &amp;macrocall);<br>
+</pre>
+<blockquote>
   <p>The function <tt>expanding_object_like_macro</tt> is called, whenever a object-like
     macro is to be expanded, i.e. <i>before</i> the actual expansion starts.</p>
-
-
- <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt>
-used during instantiation of the preprocessing iterators by the user.
-Note, this parameter was added for the Boost V1.35.0 release. </p>
-
-
+ <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt> used during instantiation of the preprocessing iterators by the user.
+ Note, this parameter was added for the Boost V1.35.0 release. </p>
   <p>The <tt>macroname</tt> parameter marks the position where the macro to expand
     is defined. It contains the token which identifies the macro name used inside
     the corresponding macro definition.</p>
-
-
   <p> The <tt>definition</tt> parameter holds the macro definition for the macro
     to trace. This is a standard STL container which holds the token sequence
     identified during the macro definition as the macro replacement list.</p>
-
-
   <p>The <tt>macrocall</tt> parameter marks the position where this macro is invoked.
     It contains the token which identifies the macro call inside the preprocessed
     input stream. </p>
-
-
   <p>If the return value is <tt>true</tt>, the macro is not expanded, i.e. the macro symbol is copied to the output without further processing. If the return value is <tt>false</tt>, the macro is expanded as expected. <br>
-
   </p>
-
 </blockquote>
-
 <p><a name="expanded_macro"></a><b>expanded_macro</b></p>
-
-<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> ContainerT&gt;<br> <span class="keyword">void</span> expanded_macro(ContextT <span class="keyword">const</span>&amp; ctx, ContainerT <span class="keyword">const</span> &amp;result);<br></pre>
-
-<blockquote>
-
+<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> ContainerT&gt;<br> <span class="keyword">void</span> expanded_macro(ContextT <span class="keyword">const</span>&amp; ctx, ContainerT <span class="keyword">const</span> &amp;result);<br>
+</pre>
+<blockquote>
   <p>The function <tt>expanded_macro</tt> is called whenever the expansion of
     a macro is finished, the replacement list is completely scanned and the identified
- macros herein are replaced by its corresponding expansion results, but <i>before</i>
- the rescanning process starts.</p>
-
-
- <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt>
-used during instantiation of the preprocessing iterators by the user.
-Note, this parameter was added for the Boost V1.35.0 release. </p>
-
-
+ macros herein are replaced by its corresponding expansion results, but <i>before</i> the rescanning process starts.</p>
+ <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt> used during instantiation of the preprocessing iterators by the user.
+ Note, this parameter was added for the Boost V1.35.0 release. </p>
   <p>The parameter <tt>result</tt> contains the the result of the macro expansion
     so far. This is a standard STL container containing the generated token sequence.</p>
-
 </blockquote>
-
 <p><a name="rescanned_macro"></a><b>rescanned_macro</b></p>
-
-<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> ContainerT&gt;<br> <span class="keyword">void</span> rescanned_macro(ContextT <span class="keyword">const</span>&amp; ctx, ContainerT <span class="keyword">const</span> &amp;result);<br></pre>
-
-<blockquote>
-
+<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> ContainerT&gt;<br> <span class="keyword">void</span> rescanned_macro(ContextT <span class="keyword">const</span>&amp; ctx, ContainerT <span class="keyword">const</span> &amp;result);<br>
+</pre>
+<blockquote>
   <p>The function <tt>rescanned_macro</tt> is called whenever the rescanning
     of a macro is finished, i.e. the macro expansion is complete.</p>
-
-
- <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt>
-used during instantiation of the preprocessing iterators by the user.
-Note, this parameter was added for the Boost V1.35.0 release. </p>
-
-
+ <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt> used during instantiation of the preprocessing iterators by the user.
+ Note, this parameter was added for the Boost V1.35.0 release. </p>
   <p>The parameter <tt>result</tt> contains the the result of the whole macro
     expansion. This is a standard STL container containing the generated token
     sequence.</p>
-
 </blockquote>
-
 <h3>Include file tracing functions</h3>
-
 <p><a name="opened_include_file" id="found_include_directive"></a><strong>found_include_directive</strong></p>
-
-<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT&gt;<br> <span class="keyword">bool</span> found_include_directive(ContextT <span class="keyword">const</span>&amp; ctx, <br> std::string <span class="keyword">const</span> &amp;filename, <span class="keyword">bool</span> include_next);<br></pre>
-
+<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT&gt;<br> <span class="keyword">bool</span> found_include_directive(ContextT <span class="keyword">const</span>&amp; ctx, <br> std::string <span class="keyword">const</span> &amp;filename, <span class="keyword">bool</span> include_next);<br>
+</pre>
 <blockquote>
-
   <p>The function <tt>found_include_directive</tt> is called whenever whenever a #include directive was located..</p>
-
-
- <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt>
-used during instantiation of the preprocessing iterators by the user.
-Note, this parameter was added for the Boost V1.35.0 release. </p>
-
-
+ <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt> used during instantiation of the preprocessing iterators by the user.
+ Note, this parameter was added for the Boost V1.35.0 release. </p>
   <p>The parameter <tt>filename</tt> contains the (expanded) file name found after
     the <span class="preprocessor">#include</span> directive. This has the format <tt>&lt;file&gt;</tt>, <tt>"file"</tt> or <tt>file</tt>.
     The formats <tt>&lt;file&gt;</tt> or <tt>"file"</tt> are used for <span class="preprocessor">#include</span> directives found
     in the preprocessed token stream, the format <tt>file</tt> is used for files
     specified through the --force_include command line argument.</p>
-
-
   <p>The parameter <tt>include_next</tt> is set to true if the found directive was
- a <span class="preprocessor">#include_next</span> directive and the <tt>BOOST_WAVE_SUPPORT_INCLUDE_NEXT</tt> preprocessing constant was defined to something != 0.</p>
-
-
+ a <span class="preprocessor">#include_next</span> directive and the <tt>BOOST_WAVE_SUPPORT_INCLUDE_NEXT</tt> preprocessing constant was defined to something != 0.</p>
   <p>If the return value is <tt>true</tt>, the include directive is not
-executed, i.e. the file to include is not loaded nor processed. The
-overall directive is replaced by a single newline character. If the
-return value is <tt>false</tt>, the directive is executed in a normal manner. <br>
-
+ executed, i.e. the file to include is not loaded nor processed. The
+ overall directive is replaced by a single newline character. If the
+ return value is <tt>false</tt>, the directive is executed in a normal manner. <br>
   </p>
-
 </blockquote>
-
 <p><a name="opened_include_file" id="opened_include_file"></a><strong>opened_include_file</strong></p>
-
-<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT&gt;<br> <span class="keyword">void</span> opened_include_file(ContextT <span class="keyword">const</span>&amp; ctx, <br> std::string <span class="keyword">const</span> &amp;rel_filename, std::string <span class="keyword">const</span> &amp;abs_filename, <br> <span class="keyword">bool</span> is_system_include);<br></pre>
-
-<blockquote>
-
+<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT&gt;<br> <span class="keyword">void</span> opened_include_file(ContextT <span class="keyword">const</span>&amp; ctx, <br> std::string <span class="keyword">const</span> &amp;rel_filename, std::string <span class="keyword">const</span> &amp;abs_filename, <br> <span class="keyword">bool</span> is_system_include);<br>
+</pre>
+<blockquote>
   <p>The function <tt>opened_include_file</tt> is called whenever a file referred
     by an <span class="preprocessor">#include</span> directive was successfully located and opened.</p>
-
-
- <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt>
-used during instantiation of the preprocessing iterators by the user.
-Note, this parameter was added for the Boost V1.35.0 release. </p>
-
-
+ <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt> used during instantiation of the preprocessing iterators by the user.
+ Note, this parameter was added for the Boost V1.35.0 release. </p>
   <p>The parameter <tt>rel_filename</tt> contains the (normalised)
-probably relative file system path of the opened file. The concrete
-format of this file name depends on the format of the include search
-path given to the library beforehand.</p>
-
-
+ probably relative file system path of the opened file. The concrete
+ format of this file name depends on the format of the include search
+ path given to the library beforehand.</p>
   <p>The parameter <tt>abs_filename</tt> contains the (normalised) full file system path of the
- opened file.</p>
+ opened file.</p>
   <p>The <tt>is_system_include</tt> parameter denotes, if the given file was found
     as a result of a <tt>#include&nbsp;&lt;...&gt;</tt> directive.</p>
-
 </blockquote>
-
 <p><a name="returning_from_include_file" id="returning_from_include_file"></a><strong>returning_from_include_file</strong></p>
-
-<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT&gt;<br> <span class="keyword">void</span> returning_from_include_file(ContextT <span class="keyword">const</span>&amp; ctx);<br></pre>
-
-<blockquote>
-
+<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT&gt;<br> <span class="keyword">void</span> returning_from_include_file(ContextT <span class="keyword">const</span>&amp; ctx);<br>
+</pre>
+<blockquote>
   <p>The function <tt>returning_from_include_file</tt> is called whenever an
     included file is about to be closed after it's processing is complete.</p>
-
-
- <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt>
-used during instantiation of the preprocessing iterators by the user.
-Note, this parameter was added for the Boost V1.35.0 release. </p>
-
+ <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt> used during instantiation of the preprocessing iterators by the user.
+ Note, this parameter was added for the Boost V1.35.0 release. </p>
 </blockquote>
-
 <h3>Interpretation of #pragma's</h3>
-
 <p><strong><a name="interpret_pragma"></a>interpret_pragma</strong></p>
-
-<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> ContainerT&gt;<br> bool interpret_pragma(ContextT <span class="keyword">const</span> &amp;ctx, ContainerT &amp;pending, <br> <span class="keyword">typename</span> ContextT::token_type <span class="keyword">const</span> &amp;option, <br> ContainerT <span class="keyword">const</span> &amp;values, <br> <span class="keyword">typename</span> ContextT::token_type<span class="keyword"> const</span> &amp;pragma_token);<br></pre>
-
-<blockquote>
-
- <p>The function <tt>interpret_pragma</tt> is called whenever an unrecognized
- <tt>#pragma&nbsp;wave&nbsp;...</tt> or operator <tt>_Pragma("wave&nbsp;...")</tt>
- is found in the input stream.</p>
-
-
+<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> ContainerT&gt;<br> bool interpret_pragma(ContextT <span class="keyword">const</span> &amp;ctx, ContainerT &amp;pending, <br> <span class="keyword">typename</span> ContextT::token_type <span class="keyword">const</span> &amp;option, <br> ContainerT <span class="keyword">const</span> &amp;values, <br> <span class="keyword">typename</span> ContextT::token_type<span class="keyword"> const</span> &amp;pragma_token);<br>
+</pre>
+<blockquote>
+ <p>The function <tt>interpret_pragma</tt> is called whenever an unrecognized <tt>#pragma&nbsp;wave&nbsp;...</tt> or operator <tt>_Pragma("wave&nbsp;...")</tt> is found in the input stream.</p>
   <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt> used during instantiation of the preprocessing iterators by the user. </p>
-
-
   <p>The <tt>pending</tt> parameter may be used to push tokens back into the input
- stream which are to be used as the replacement text for the whole <tt>#pragma&nbsp;wave()</tt>
- directive. If this sequence is left empty, no replacement takes place, i.e.
+ stream which are to be used as the replacement text for the whole <tt>#pragma&nbsp;wave()</tt> directive. If this sequence is left empty, no replacement takes place, i.e.
     the interpreted directive is removed from the generated token stream.</p>
-
-
   <p>The <tt>option</tt> parameter contains the name of the interpreted pragma.</p>
-
-
   <p>The <tt>values</tt> parameter holds the value of the parameter provided to
     the pragma operator.</p>
-
-
   <p>The <tt>pragma_token</tt> parameter contains the actual #pragma token which
     may be used for extraction of the location information for some error output.</p>
-
-
   <p>If the return value is 'false', the whole #pragma directive is interpreted
     as unknown and a corresponding error message is issued. A return value of
     'true' signs a successful interpretation of the given #pragma.<br>
-
   </p>
-
 </blockquote>
-
 <h3>Macro definition </h3>
-
 <p><strong><a name="defined_macro" id="defined_macro"></a>defined_macro</strong></p>
-
 <pre> <span class="keyword">template</span> &lt;<br> <span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> TokenT, <span class="keyword">typename</span> ParametersT, <span class="keyword">
- typename</span> DefinitionT<br> &gt;<br> <span class="keyword">void</span> defined_macro(ContextT <span class="keyword">const</span>&amp; ctx, <br> TokenT <span class="keyword">const</span> &amp;name, <span class="keyword">bool</span> is_functionlike,<br> ParametersT <span class="keyword">const</span> &amp;parameters, DefinitionT <span class="keyword">const</span> &amp;definition,<br> <span class="keyword">bool</span> is_predefined);<br></pre>
-
-<blockquote>
+ typename</span> DefinitionT<br> &gt;<br> <span class="keyword">void</span> defined_macro(ContextT <span class="keyword">const</span>&amp; ctx, <br> TokenT <span class="keyword">const</span> &amp;name, <span class="keyword">bool</span> is_functionlike,<br> ParametersT <span class="keyword">const</span> &amp;parameters, DefinitionT <span class="keyword">const</span> &amp;definition,<br> <span class="keyword">bool</span> is_predefined);<br>
+</pre>
+<blockquote>
   <p>The function <tt>defined_macro</tt> is called whenever a macro was defined successfully.</p>
-
-
- <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt>
-used during instantiation of the preprocessing iterators by the user.
-Note, this parameter was added for the Boost V1.35.0 release. </p>
-
-
+ <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt> used during instantiation of the preprocessing iterators by the user.
+ Note, this parameter was added for the Boost V1.35.0 release. </p>
   <p>The parameter <tt>name</tt> is a reference to the token holding the macro name.</p>
-
-
   <p>The parameter <tt>is_functionlike</tt> is set to true whenever the newly
     defined macro is defined as a function like macro.</p>
-
-
   <p>The parameter <tt>parameters</tt> holds the parameter tokens for the macro
- definition. If the macro has no parameters or if it is a object like
- macro, then this container is empty.</p>
-
-
+ definition. If the macro has no parameters or if it is a object like
+ macro, then this container is empty.</p>
   <p>The parameter <tt>definition</tt> contains the token sequence given as the
- replacement sequence (definition part) of the newly defined macro.</p>
-
-
+ replacement sequence (definition part) of the newly defined macro.</p>
   <p>The parameter <tt>is_predefined</tt> is set to true for all macros predefined
- during the initialisation pahase of the library.<br>
-
+ during the initialisation pahase of the library.<br>
   </p>
-
 </blockquote>
-
 <p><strong><a name="undefined_macro" id="undefined_macro"></a>undefined_macro</strong></p>
-
-<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> TokenT&gt;<br> <span class="keyword">void</span> undefined_macro(ContextT <span class="keyword">const</span>&amp; ctx, TokenT <span class="keyword">const</span> &amp;name);<br></pre>
-
+<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> TokenT&gt;<br> <span class="keyword">void</span> undefined_macro(ContextT <span class="keyword">const</span>&amp; ctx, TokenT <span class="keyword">const</span> &amp;name);<br>
+</pre>
 <blockquote>
-
   <p>The function <tt>undefined_macro</tt> is called whenever a macro definition
     was removed successfully.</p>
-
-
- <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt>
-used during instantiation of the preprocessing iterators by the user.
-Note, this parameter was added for the Boost V1.35.0 release. </p>
-
-
+ <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt> used during instantiation of the preprocessing iterators by the user.
+ Note, this parameter was added for the Boost V1.35.0 release. </p>
   <p>The parameter <tt>name</tt> holds the token of the macro which definition was removed.<br>
-
   </p>
-
 </blockquote>
-
 <p><strong><a name="found_warning_directive" id="found_warning_directive"></a>found_warning_drective</strong></p>
-
-<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> ContainerT&gt;<br> <span class="keyword">bool</span> found_warning_directive(ContextT <span class="keyword">const</span>&amp; ctx, <br> ContainerT <span class="keyword">const</span> &amp;message);<br></pre>
-
+<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> ContainerT&gt;<br> <span class="keyword">bool</span> found_warning_directive(ContextT <span class="keyword">const</span>&amp; ctx, <br> ContainerT <span class="keyword">const</span> &amp;message);<br>
+</pre>
 <blockquote>
-
   <p>The function <tt>found_warning_directive </tt> is called whenever a <span class="preprocessor">#warning </span>directive
-has been encountered. Note, this function was added for the Boost
-V1.35.0 release. This function will be called only if the <tt>BOOST_WAVE_SUPPORT_WARNING_DIRECTIVE</tt> compile time constant was defined to something not equal to zero (see the Compile Time Configuration for more information). </p>
-
-
+ has been encountered. Note, this function was added for the Boost
+ V1.35.0 release. This function will be called only if the <tt>BOOST_WAVE_SUPPORT_WARNING_DIRECTIVE</tt> compile time constant was defined to something not equal to zero (see the Compile Time Configuration for more information). </p>
   <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt> used during instantiation of the preprocessing iterators by the user. </p>
-
-
   <p>The parameter <tt>message</tt> references the argument token sequence of the encountered <span class="preprocessor">#warning</span> directive.</p>
-
-
   <p>If the return value is <tt>false</tt>, the library throws a preprocessor
- exception of the type <code>warning_directive</code> (normal execution continues), if the return value is <tt>true</tt> the execution continues as if no <span class="preprocessor">#warning</span> directive has been found and the overall directive is replaced by a single newline. </p>
-
+ exception of the type <code>warning_directive</code> (normal execution continues), if the return value is <tt>true</tt> the execution continues as if no <span class="preprocessor">#warning</span> directive has been found and the overall directive is replaced by a single newline. </p>
 </blockquote>
-
 <p><strong><a name="found_error_directive" id="found_error_directive"></a>found_error_drective</strong></p>
-
-<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> ContainerT&gt;<br> <span class="keyword">bool</span> found_error_directive(ContextT <span class="keyword">const</span>&amp; ctx, <br> ContainerT <span class="keyword">const</span> &amp;message);<br></pre>
-
+<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> ContainerT&gt;<br> <span class="keyword">bool</span> found_error_directive(ContextT <span class="keyword">const</span>&amp; ctx, <br> ContainerT <span class="keyword">const</span> &amp;message);<br>
+</pre>
 <blockquote>
-
   <p>The function <tt>found_error_directive </tt> is called whenever a <span class="preprocessor">#error </span>directive has been encountered. Note, this function was added for the Boost V1.35.0 release. </p>
-
-
   <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt> used during instantiation of the preprocessing iterators by the user. </p>
-
-
   <p>The parameter <tt>message</tt> references the argument token sequence of the encountered <span class="preprocessor">#error</span> directive.</p>
-
-
   <p>If the return value is <tt>false</tt>, the library throws a preprocessor
- exception of the type <code>error_directive</code> (normal execution continues), if the return value is <tt>true</tt> the execution continues as if no <span class="preprocessor">#error</span> directive has been found and the overall directive is replaced by a single newline. </p>
-
+ exception of the type <code>error_directive</code> (normal execution continues), if the return value is <tt>true</tt> the execution continues as if no <span class="preprocessor">#error</span> directive has been found and the overall directive is replaced by a single newline. </p>
 </blockquote>
-
 <p><strong><a name="found_line_directive" id="found_line_directive"></a>found_line_drective</strong></p>
-
-<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> ContainerT&gt;<br> <span class="keyword">void</span> found_line_drective(ContextT <span class="keyword">const</span>&amp; ctx, <br> ContainerT <span class="keyword">const</span> &amp;arguments, <span class="keyword">unsigned int</span> line,<br> std::string <span class="keyword">const</span>&amp; filename);<br></pre>
-
+<pre> <span class="keyword">template</span> &lt;<span class="keyword">typename</span> ContextT, <span class="keyword">typename</span> ContainerT&gt;<br> <span class="keyword">void</span> found_line_drective(ContextT <span class="keyword">const</span>&amp; ctx, <br> ContainerT <span class="keyword">const</span> &amp;arguments, <span class="keyword">unsigned int</span> line,<br> std::string <span class="keyword">const</span>&amp; filename);<br>
+</pre>
 <blockquote>
-
   <p>The function <tt>found_line_directive </tt> is called whenever a <span class="preprocessor">#line </span>directive has been encountered. Note, this function was added for the Boost V1.35.0 release. </p>
-
-
   <p>The <tt>ctx</tt> parameter provides a reference to the <tt>context_type</tt> used during instantiation of the preprocessing iterators by the user. </p>
-
-
   <p>The parameter <tt>arguments</tt> references the argument token sequence of the encountered <span class="preprocessor">#line</span> directive.</p>
-
-
- <p>The parameter <tt>line</tt> contains the recognized line number from the <span class="preprocessor">#line</span> directive.</p>
-
-
- <p>The parameter <tt>filename</tt> references the recognized file name from the <span class="preprocessor">#line</span> directive (if there was one given).<br>
-
+ <p>The parameter <tt>line</tt> contains the recognized line number from the <span class="preprocessor">#line</span> directive.</p>
+ <p>The parameter <tt>filename</tt> references the recognized file name from the <span class="preprocessor">#line</span> directive (if there was one given).<br>
   </p>
-
 </blockquote>
-
 <table border="0">
-
   <tbody>
     <tr>
-
- <td width="10"></td>
-
- <td width="30"></td>
-
- <td width="30"></td>
-
- <td width="30"></td>
-
- </tr>
-
+ <td width="10"></td>
+ <td width="30"></td>
+ <td width="30"></td>
+ <td width="30"></td>
+ </tr>
   </tbody>
 </table>
-
 <hr size="1">
 <p class="copyright">Copyright &copy; 2003-2008 Hartmut Kaiser<br>
-
   <br>
-
-<font size="2">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) </font> </p>
-
-<p class="copyright"><span class="updated">Last updated:
- <!-- #BeginDate format:fcAm1m -->Tuesday, July 29, 2008 20:31<!-- #EndDate -->
-</span></p>
-
+ <font size="2">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) </font> </p>
+<p class="copyright"><span class="updated">Last updated:
+ <!-- #BeginDate format:fcAm1m -->Sunday, October 12, 2008 20:13<!-- #EndDate -->
+ </span></p>
 </body>
 </html>

Modified: branches/release/libs/wave/doc/class_reference_filepos.html
==============================================================================
--- branches/release/libs/wave/doc/class_reference_filepos.html (original)
+++ branches/release/libs/wave/doc/class_reference_filepos.html 2008-10-12 21:24:34 EDT (Sun, 12 Oct 2008)
@@ -35,7 +35,7 @@
 <p>The file position template is used to represent a concrete token position inside
   the underlying input stream. This token position contains the corresponding
   filename, the line number and the column number, where the token was recognized.</p>
-<h2><b><a name="header_synopsis"></a>Header wave/util/file_position.hpp
+<h2><b><a name="header_synopsis"></a>Header wave/util/file_position.hpp
   synopsis</b></h2>
 <pre><span class="keyword">namespace</span> <span class="identifier">boost</span> {
 <span class="keyword">namespace</span> <span class="identifier">wave</span> {
@@ -113,7 +113,7 @@
   <br>
 <font size="2">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) </font> </p>
 <p class="copyright"><span class="updated">Last updated:
- <!-- #BeginDate format:fcAm1m -->Thursday, December 1, 2005 11:52<!-- #EndDate -->
+ <!-- #BeginDate format:fcAm1m -->Sunday, October 12, 2008 20:14<!-- #EndDate -->
 </span></p>
 </body>
 </html>

Modified: branches/release/libs/wave/doc/class_reference_inptpolcy.html
==============================================================================
--- branches/release/libs/wave/doc/class_reference_inptpolcy.html (original)
+++ branches/release/libs/wave/doc/class_reference_inptpolcy.html 2008-10-12 21:24:34 EDT (Sun, 12 Oct 2008)
@@ -39,7 +39,7 @@
   input sequence. If this template parameter is not given while instantiating
   the context object, it defaults to the <tt>iteration_context_policies::load_file_to_string</tt>
   type. </p>
-<h2><b><a name="header_synopsis"></a>Header wave/iteration_context.hpp
+<h2><b><a name="header_synopsis"></a>Header wave/iteration_context.hpp
   synopsis</b></h2>
 <p>The following code listing does not show the required interface only, but for
   brevity reasons the whole implementation of an input policy, which loads the
@@ -126,7 +126,7 @@
   <font size="2">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) </font> </p>
 <span class="updated"></span>
 <p class="copyright"><span class="updated">Last updated:
- <!-- #BeginDate format:fcAm1m -->Sunday, May 15, 2005 12:23<!-- #EndDate -->
+ <!-- #BeginDate format:fcAm1m -->Sunday, October 12, 2008 20:14<!-- #EndDate -->
   </span></p>
 </body>
 </html>

Modified: branches/release/libs/wave/doc/class_reference_lexer.html
==============================================================================
--- branches/release/libs/wave/doc/class_reference_lexer.html (original)
+++ branches/release/libs/wave/doc/class_reference_lexer.html 2008-10-12 21:24:34 EDT (Sun, 12 Oct 2008)
@@ -34,7 +34,7 @@
 <h2><b><a name="introduction"></a>Introduction</b></h2>
 <p>Every lexer, which should be used in conjunction with the <tt>Wave</tt> library, has to return tokens formed from the input stream. These tokens should conform to the synopsis described in the topic The Token Type. The lexer type should expose an interface which conforms at least to a <tt>forward_iterator</tt> (in the sense defined by the the C++ Standard) returning the token type. The code sample below does not show the definition of this forward iterator interface because this is highly implementation defined.</p>
 <h2><a name="header_synopsis"></a>Wave lexer
- synopsis (header: wave/cpplexer/cpp_lexer_interface.hpp)</h2>
+ synopsis (header: wave/cpplexer/cpp_lexer_interface.hpp)</h2>
 <pre> <span class="keyword">struct</span> lex_iterator
     {
         <span class="keyword">typedef</span> boost::wave::lex_token&lt;&gt; token_type;
@@ -53,7 +53,7 @@
     };
 
 </pre>
-<p>Please note, that the <tt>lex_iterator</tt> defined in the library header wave/cpplexer/cpp_lexer_interface.hpp actually is a template class taking the token type to use as its template parameter. This is omitted in the synopsis above because it is an implementation detail of the Re2C lexer provided as part of the Wave library.</p>
+<p>Please note, that the <tt>lex_iterator</tt> defined in the library header wave/cpplexer/cpp_lexer_interface.hpp actually is a template class taking the token type to use as its template parameter. This is omitted in the synopsis above because it is an implementation detail of the Re2C lexer provided as part of the Wave library.</p>
 <p>If you want to use Wave in conjunction with your own lexing component this will have to conform to the interface described above only. </p>
 <h2><a name="public_typedefs" id="public_typedefs"></a>Public Typedefs</h2>
 <p>Besides the typedefs mandated for a <tt>forward_iterator</tt> by the C++ standard every lexer to be used with the <tt>Wave</tt> library should define the following typedefs: </p>
@@ -97,7 +97,7 @@
   <br>
 <font size="2">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) </font> </p>
 <p class="copyright"><span class="updated">Last updated:
- <!-- #BeginDate format:fcAm1m -->Thursday, December 1, 2005 11:53<!-- #EndDate -->
+ <!-- #BeginDate format:fcAm1m -->Sunday, October 12, 2008 20:15<!-- #EndDate -->
   </span>
 </p>
 </body>

Modified: branches/release/libs/wave/doc/class_reference_tokentype.html
==============================================================================
--- branches/release/libs/wave/doc/class_reference_tokentype.html (original)
+++ branches/release/libs/wave/doc/class_reference_tokentype.html 2008-10-12 21:24:34 EDT (Sun, 12 Oct 2008)
@@ -50,7 +50,7 @@
   library, which is used in conjunction with the two predefined C++ lexers contained
   in the <tt>Wave</tt> library too. If you need to use your own token type, it
   is required to implement the interafce described below.</p>
-<h2><b><a name="header_synopsis"></a>Header wave/cpplexer/cpp_lex_token.hpp
+<h2><b><a name="header_synopsis"></a>Header wave/cpplexer/cpp_lex_token.hpp
   synopsis</b></h2>
 <pre><span class="keyword">namespace</span> boost {
 <span class="keyword">namespace</span> wave {
@@ -170,7 +170,7 @@
   <font size="2">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) </font> </p>
 <span class="updated"></span>
 <p class="copyright"><span class="updated">Last updated:
- <!-- #BeginDate format:fcAm1m -->Thursday, December 1, 2005 11:48<!-- #EndDate -->
+ <!-- #BeginDate format:fcAm1m -->Sunday, October 12, 2008 20:15<!-- #EndDate -->
   </span></p>
 </body>
 </html>

Modified: branches/release/libs/wave/samples/cpp_tokens/slex/cpp_slex_lexer.hpp
==============================================================================
--- branches/release/libs/wave/samples/cpp_tokens/slex/cpp_slex_lexer.hpp (original)
+++ branches/release/libs/wave/samples/cpp_tokens/slex/cpp_slex_lexer.hpp 2008-10-12 21:24:34 EDT (Sun, 12 Oct 2008)
@@ -670,7 +670,7 @@
                         }
                         break;
                     }
-
+
                     result = token_type(id, token_val, pos);
 #if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0
                     return guards.detect_guard(result);
@@ -678,13 +678,13 @@
                     return result;
 #endif
                 }
-
+
             // skip the T_CONTLINE token
             } while (true);
         }
         return result = token_type(); // return T_EOI
     }
-
+
     void set_position(PositionT const &pos)
     {
         // set position has to change the file name and line number only

Modified: branches/release/libs/wave/samples/cpp_tokens/slex_iterator.hpp
==============================================================================
--- branches/release/libs/wave/samples/cpp_tokens/slex_iterator.hpp (original)
+++ branches/release/libs/wave/samples/cpp_tokens/slex_iterator.hpp 2008-10-12 21:24:34 EDT (Sun, 12 Oct 2008)
@@ -64,7 +64,7 @@
     typedef lex_input_interface<TokenT>* shared;
 
     BOOST_WAVE_EOF_PREFIX result_type const eof;
-
+
     template <typename MultiPass>
     static result_type& get_next(MultiPass& mp, result_type& result)
     {
@@ -84,14 +84,14 @@
     {
         mp.shared->ftor->set_position(pos);
     }
-
+
 #if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0
     template <typename MultiPass>
     static bool has_include_guards(MultiPass& mp, std::string& guard_name)
     {
         return mp.shared->ftor->has_include_guards(guard_name);
     }
-#endif
+#endif
 
 private:
     boost::shared_ptr<lex_input_interface<TokenT> > functor_ptr;
@@ -149,7 +149,7 @@
     typedef boost::spirit::multi_pass_policies::no_check check_policy;
 #endif
     typedef boost::spirit::multi_pass_policies::split_std_deque storage_policy;
-
+
     typedef boost::spirit::multi_pass_policies::default_policy<
             ownership_policy, check_policy, input_policy, storage_policy>
         policy_type;
@@ -169,13 +169,13 @@
 
     typedef typename input_policy_type::unique unique_functor_type;
     typedef typename input_policy_type::shared shared_functor_type;
-
+
 public:
     typedef TokenT token_type;
-
+
     slex_iterator()
     {}
-
+
     template <typename IteratorT>
     slex_iterator(IteratorT const &first, IteratorT const &last,
             typename TokenT::position_type const &pos,
@@ -192,22 +192,22 @@
     void set_position(typename TokenT::position_type const &pos)
     {
         typedef typename token_type::position_type position_type;
-
+
     // set the new position in the current token
- token_type const& currtoken = base_type::get_input();
+ token_type& currtoken = this->base_type::dereference(*this);
     position_type currpos = currtoken.get_position();
-
+
         currpos.set_file(pos.get_file());
         currpos.set_line(pos.get_line());
- base_type::get_input().set_position(currpos);
-
+ currtoken.set_position(currpos);
+
     // set the new position for future tokens as well
         if (token_type::string_type::npos !=
             currtoken.get_value().find_first_of('\n'))
         {
             currpos.set_line(pos.get_line() + 1);
         }
- unique_functor_type::get_functor().set_position(currpos);
+ unique_functor_type::set_position(*this, currpos);
     }
 
 #if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0
@@ -216,9 +216,9 @@
     // completely
     bool has_include_guards(std::string& guard_name) const
     {
- return unique_functor_type::has_include_guards(guard_name);
+ return unique_functor_type::has_include_guards(*this, guard_name);
     }
-#endif
+#endif
 };
 
 ///////////////////////////////////////////////////////////////////////////////

Modified: branches/release/libs/wave/samples/list_includes/lexertl/lexertl_lexer.hpp
==============================================================================
--- branches/release/libs/wave/samples/list_includes/lexertl/lexertl_lexer.hpp (original)
+++ branches/release/libs/wave/samples/list_includes/lexertl/lexertl_lexer.hpp 2008-10-12 21:24:34 EDT (Sun, 12 Oct 2008)
@@ -602,9 +602,8 @@
     ~lexertl_functor() {}
 
 // get the next token from the input stream
- token_type get()
+ token_type& get(token_type& result)
     {
- token_type token;
         if (lexer_.is_initialized() && !at_eof) {
             do {
             // generate and return the next token
@@ -710,18 +709,19 @@
                         }
                         break;
                     }
-
+
+ result = token_type(id, token_val, pos);
 #if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0
- return guards.detect_guard(token_type(id, token_val, pos));
+ return guards.detect_guard(result);
 #else
- return token_type(id, token_val, pos);
+ return result;
 #endif
                 }
             } while (true); // skip the T_CONTLINE token
         }
- return token; // return T_EOI
+ return result = token_type(); // return T_EOI
     }
-
+
     void set_position(Position const &pos)
     {
         // set position has to change the file name and line number only

Modified: branches/release/libs/wave/samples/list_includes/lexertl_iterator.hpp
==============================================================================
--- branches/release/libs/wave/samples/list_includes/lexertl_iterator.hpp (original)
+++ branches/release/libs/wave/samples/list_includes/lexertl_iterator.hpp 2008-10-12 21:24:34 EDT (Sun, 12 Oct 2008)
@@ -17,7 +17,7 @@
 
 #include <boost/assert.hpp>
 #include <boost/shared_ptr.hpp>
-#include <boost/spirit/include/classic_multi_pass.hpp>
+#include <boost/spirit/include/support_multi_pass.hpp>
 
 #include <boost/wave/language_support.hpp>
 #include <boost/wave/util/file_position.hpp>
@@ -47,14 +47,11 @@
 template <typename TokenT>
 class iterator_functor_shim
 {
+ typedef typename TokenT::position_type position_type;
+
 public:
- template <typename IteratorT>
- iterator_functor_shim(IteratorT const &first, IteratorT const &last,
- typename TokenT::position_type const &pos,
- wave::language_support language)
- : functor_ptr(lexertl_input_interface<TokenT>
- ::new_lexer(first, last, pos, language))
-#if 0 != __DECCXX_VER || defined(__PGI)
+ iterator_functor_shim()
+#if /*0 != __DECCXX_VER || */defined(__PGI)
       , eof()
 #endif // 0 != __DECCXX_VER
     {}
@@ -62,27 +59,38 @@
 // interface to the boost::spirit::classic::multi_pass_policies::functor_input
 // policy
     typedef TokenT result_type;
+ typedef iterator_functor_shim unique;
+ typedef lex_input_interface<TokenT>* shared;
 
     BOOST_WAVE_EOF_PREFIX result_type const eof;
-
- result_type operator()()
+
+ template <typename MultiPass>
+ static result_type& get_next(MultiPass& mp, result_type& result)
     {
- BOOST_ASSERT(0 != functor_ptr.get());
- return functor_ptr->get();
+ return mp.shared->ftor->get(result);
     }
- void set_position(typename TokenT::position_type const &pos)
+
+ // this will be called whenever the last reference to a multi_pass will
+ // be released
+ template <typename MultiPass>
+ static void destroy(MultiPass& mp)
+ {
+ delete mp.shared->ftor;
+ }
+
+ template <typename MultiPass>
+ static void set_position(MultiPass& mp, position_type const &pos)
     {
- BOOST_ASSERT(0 != functor_ptr.get());
- functor_ptr->set_position(pos);
+ mp.shared->ftor->set_position(pos);
     }
-
+
 #if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0
- bool has_include_guards(std::string& guard_name) const
+ template <typename MultiPass>
+ static bool has_include_guards(MultiPass& mp, std::string& guard_name)
     {
- BOOST_ASSERT(0 != functor_ptr.get());
- return functor_ptr->has_include_guards(guard_name);
+ return mp.shared->ftor->has_include_guards(guard_name);
     }
-#endif
+#endif
 
 private:
     boost::shared_ptr<lex_input_interface<TokenT> > functor_ptr;
@@ -121,31 +129,62 @@
 //
 ///////////////////////////////////////////////////////////////////////////////
 
+///////////////////////////////////////////////////////////////////////////////
+// Divide the given functor type into its components (unique and shared)
+// and build a std::pair from these parts
+template <typename FunctorData>
+struct make_multi_pass
+{
+ typedef
+ std::pair<typename FunctorData::unique, typename FunctorData::shared>
+ functor_data_type;
+ typedef typename FunctorData::result_type result_type;
+
+ typedef boost::spirit::multi_pass_policies::split_functor_input input_policy;
+ typedef boost::spirit::multi_pass_policies::ref_counted ownership_policy;
+#if defined(BOOST_WAVE_DEBUG)
+ typedef boost::spirit::multi_pass_policies::buf_id_check check_policy;
+#else
+ typedef boost::spirit::multi_pass_policies::no_check check_policy;
+#endif
+ typedef boost::spirit::multi_pass_policies::split_std_deque storage_policy;
+
+ typedef boost::spirit::multi_pass_policies::default_policy<
+ ownership_policy, check_policy, input_policy, storage_policy>
+ policy_type;
+ typedef boost::spirit::multi_pass<functor_data_type, policy_type> type;
+};
+
 template <typename TokenT>
 class lex_iterator
-: public boost::spirit::classic::multi_pass<
- impl::iterator_functor_shim<TokenT>,
- boost::wave::util::functor_input
- >
+: public make_multi_pass<impl::iterator_functor_shim<TokenT> >::type
 {
     typedef impl::iterator_functor_shim<TokenT> input_policy_type;
- typedef
- boost::spirit::classic::multi_pass<input_policy_type,
- boost::wave::util::functor_input>
- base_type;
- typedef lex_iterator<TokenT> self_type;
-
+
+ typedef typename make_multi_pass<input_policy_type>::type base_type;
+ typedef typename make_multi_pass<input_policy_type>::functor_data_type
+ functor_data_type;
+
+ typedef typename input_policy_type::unique unique_functor_type;
+ typedef typename input_policy_type::shared shared_functor_type;
+
 public:
     typedef TokenT token_type;
-
+
     lex_iterator()
     {}
-
+
     template <typename IteratorT>
     lex_iterator(IteratorT const &first, IteratorT const &last,
             typename TokenT::position_type const &pos,
             boost::wave::language_support language)
- : base_type(input_policy_type(first, last, pos, language))
+ : base_type(
+ functor_data_type(
+ unique_functor_type(),
+ lexertl_input_interface<TokenT>
+ ::new_lexer(first, last, pos, language)
+ )
+ )
     {}
 
     void set_position(typename TokenT::position_type const &pos)
@@ -153,7 +192,7 @@
         typedef typename TokenT::position_type position_type;
         
     // set the new position in the current token
- token_type& currtoken = base_type::get_input();
+ token_type& currtoken = this->base_type::dereference(*this);
     position_type currpos = currtoken.get_position();
 
         currpos.set_file(pos.get_file());
@@ -166,18 +205,18 @@
         {
             currpos.set_line(pos.get_line() + 1);
         }
- base_type::get_functor().set_position(currpos);
+ unique_functor_type::set_position(*this, currpos);
     }
-
+
 #if BOOST_WAVE_SUPPORT_PRAGMA_ONCE != 0
     // Return, whether the current file has include guards. This function
     // returns meaningful results only if the file was scanned completely.
     // For now we always return false, but this can be fixed easily later on.
     bool has_include_guards(std::string& guard_name) const
     {
- return base_type::get_functor().has_include_guards(guard_name);
+ return base_type::get_functor().has_include_guards(*this, guard_name);
     }
-#endif
+#endif
 };
 
 ///////////////////////////////////////////////////////////////////////////////


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