Skip to content

Commit

Permalink
Added the new pp hooks to Wave.
Browse files Browse the repository at this point in the history
[SVN r34072]
  • Loading branch information
hkaiser committed May 23, 2006
1 parent 20d9781 commit e96accd
Show file tree
Hide file tree
Showing 13 changed files with 11,568 additions and 12,789 deletions.
8 changes: 7 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ CHANGELOG
- Changed the return value of the 'evaluated_conditional_expression()' pp hook
to 'bool' allowing to force Wave to re-evaluate the current conditional
expression. This was suggested by Felipe Magno de Almeida.
- Added a wave::context object as first parameter to all pp hook functions.
This is an interface compatibility breaking change. The new pp-hooks can be
disabled by defining the BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS
compile time constant to something not equal to zero. By default this
constant will be defined to zero for Boost V1.35.0 and newer, switching to
the new interface by default.

Boost V1.34.0
- Wave Version 1.2.4
Expand Down Expand Up @@ -130,7 +136,7 @@ Boost V1.34.0
- Fixed a bug which lead to reporting of an illegal preprocessing directive
inside not-evaluated conditional blocks under certain circumstances (thanks
to Tobias Schwinger for reporting).

Sat Feb 18 2005
- Version 1.2.3
- Added a missing throw() specification to the function
Expand Down
155 changes: 98 additions & 57 deletions doc/class_reference_ctxpolicy.html

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion doc/compiletime_config.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@
<td class="table_cells"><p>If this is defined to a string literal it will be used as the pragma keyword recogniyed by the library as specific Wave pragma's. This constant defaults to <span class="literal">&quot;wave&quot;</span>, i.e. the library recognizes all <span class="preprocessor">#pragma wave option [(argument)]</span> directives and dispatches the handling to the interpret_pragma() preprocessing hook function (see: <a href="class_reference_ctxpolicy.html">Preprocessing Hooks</a>). The arguments part of the pragma is optional.<br>
</p> </td>
</tr>
<tr>
<td class="table_cells"><code>BOOST_WAVE_USE_DEPRECIATED_PREPROCESSING_HOOKS</code></td>
<td class="table_cells"><p>If defined to something not equal to zero (<span class="literal">'0'</span>) Wave will be compiled to use the depreciated preprocessing hooks. The interface of the preprocessing hooks has been changed after the Boost V1.34.x releases. This constant allows to compile applications using the older interface. </p></td>
</tr>
</table>
<P dir="ltr"><b><a name="using_custom_lexer"></a>Using a different token type or lexer type in conjunction with Wave </b></P>
<P dir="ltr">It is possible to use the <tt>Wave</tt> library while using your own token and/or lexer types. This may be achieved by providing your lexer type as the second template parameter while instantiating the <tt>boost::wave::context&lt;&gt;</tt> object. The token type used by the library is derived from the <tt>token_type</tt> typedef to be provided by the lexer type. If you want to provide your own token type only, you may use the <tt>boost::wave::lex_iterator&lt;&gt;</tt> type contained with the library. This type needs to be parametrized with the token type to use. </P>
Expand Down Expand Up @@ -211,7 +215,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 -->Tuesday, May 2, 2006 17:10<!-- #EndDate -->
<!-- #BeginDate format:fcAm1m -->Tuesday, May 23, 2006 11:46<!-- #EndDate -->
</span></p>
</body>
</html>
11 changes: 0 additions & 11 deletions include/boost/wave/cpp_context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,6 @@ class context : private boost::noncopyable
token_type(T_IDENTIFIER, name, macros.get_main_pos()),
even_predefined);
}
// bool remove_macro_definition(token_type const &token,
// bool even_predefined = false)
// { return macros.remove_macro(token, even_predefined); }
void reset_macro_definitions()
{ macros.reset_macromap(); macros.init_predefined_macros(); }

Expand Down Expand Up @@ -331,14 +328,6 @@ class context : private boost::noncopyable
{ return includes.add_pragma_once_header(filename, guard_name); }
#endif

// forwarding functions for the context policy hooks
template <typename ContainerT>
bool interpret_pragma(ContainerT &pending, token_type const &option,
ContainerT const &values, token_type const &act_token)
{
return hooks.interpret_pragma(*this, pending, option, values, act_token);
}

#if BOOST_WAVE_SERIALIZATION != 0
public:
BOOST_STATIC_CONSTANT(unsigned int, version = 0x10);
Expand Down
Loading

0 comments on commit e96accd

Please sign in to comment.