Boost.Wave: A Standard compliant C++ preprocessor library http://www.boost.org/ 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) ------------------------------------------------------------------------------- TODO (known issues): - Fix expansion of macros, which replacement-list terminates in a partial macro expansion. - Fix the re2c lexer for iterators others then string::iterator (or more generally for iterators, which aren't random access iterators) - Try to remove the second parameter from the pp_iterator<>::force_include function. - Fix the trigraph backslash problem in the re2c (C/C++ and IDL) scanners, if there is the end of the (internal) buffer just in between a '??/' and a '\n'. - Do a sourceforge release. ------------------------------------------------------------------------------- CHANGELOG Boost V1.37.0 - Updated examples to reflect the recent changes in the used multi_pass iterator. - Fixed documentation links still pointing to the old Boost CVS (thanks to Jürgen Hunold for providing the patch). Boost V1.36.0 - Wave Version 2.0 is a new major release introducing some breaking API changes, preventing it to be used with Boost versions earlier than V1.36.0. The API and hook interface have been streamlined for more consistency. See the documentation for more details. - Added an additional template parameter to the context object, allowing to specify any possibly derived type. This change propagates to the preprocessing hooks, which now get passed the most derived context type as its first argument allowing to access protected members in the original context type. This fixes ticket #1752. - Fixed a problem during parsing of #pragma wave directive, where the value sequence contained a closing parenthesis. This caused a premature end of the pragma value parsing. - Fixed handling of support_option_single_line, which was ignored under certain circumstances. - Fixed ticket #1766: Wrong evaluation of conditional preprocessor directives with predefined macros __FILE__, __LINE__ and __INCLUDE_LEVEL__. This bug triggered an error in constructs like #ifndef __FILE__. Thanks to Daniel Wadehn for reporting and supplying a patch. Added corresponding regression test: t_2_018.cpp. - Fixed a bug which reported a valid macro redefinition as invalid if the macro replacement text referred to a second or higher parameter of this macro. - Fixed a problem in the wave tool to allow two errors to occur while preprocessing two consecutive tokens. - Adjusted Spirit header includes to point to conform to the new directory structure, removed support for Spirit versions earlier than V1.7. - Started to migrate to new multi_pass iterators from Spirit V2.0. Boost V1.35.0 - Wave Version 1.3 - 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. - Added optional support for the import keyword (needed for the C++ module proposal). The identifier import will be recognized as a keyword, if the compile time constant BOOST_WAVE_SUPPORT_IMPORT_KEYWORD is defined to something not equal zero. - Added new preprocessing hook functions: found_error_directive() and found_warning_directive() to be called when #error/#warning directives are encountered. This was suggested by Andreas Sæbjørnsen. - Added a new sample to Wave: hannibal, a partial C++ parser implementation initially written by Danny Havenith (http://havenith-verlinden.nl/hannibal/) who agreed to add this here. Thanks! - Added new preprocessing hook function: found_line_directive() to be called when a #line directive is encountered. This was suggested by Andreas Sæbjørnsen. - Improved command line handling for the wave applet. - Incorporated latest bug fixes for the Hannibal sample provided by Danny Havenith. - Added loading of a wave.cfg file from anywhere up the filesystem hierarchy starting from the main input file for the wave driver applet up to the root of the file system. - Added support_option_emit_pragma_directive to allow to control at runtime, whether unknown #pragma directives should be emitted or not. To maintain compatibility with earlier versions this option is by default on if the compile time constant BOOST_WAVE_EMIT_PRAGMA_DIRECTIVES was defined to be not equal to zero and it is off otherwise. - Enabled XML serialization support. - Added the throw_exception preprocessing hook, which gets called for every occurring error (whenever an exception would have been thrown). The default of this new hook function is to throw the corresponding exception, which reproduces the old behavior. - Implemented a new preprocessing hook: generated_token(), which get's called whenever a token is about to be returned form the library. This function may be used to alter the token before it gets returned to the calling application. - Added a new sample 'real_positions' demonstrating the new generated_token() preprocessing hook and showing how to use Wave with a new token type without using a new lexer type. - Factored out the pure lex_input_interface to simplify writing different lexer types for Wave. - Added the token_statistics sample showing how to use Xpressive to build a lexer for Wave. - Changed the list_includes sample to use a lexer which is based on the lexertl library written by Ben Hanson (http://www.benhanson.net/lexertl.html). - Added a new support_option: insert_whitespace, allowing to switch off whitespace insertion which is normally (by default) in place to disambiugate C++ tokens, which would otherwise form different tokens in the output. - Added a new commandline option to the Wave applet: --disambiguate, allowing to control whitespace insertion. The default value for this option is --disambiguate=1, resembling the previous behaviour. Specifying the option --disambiguate=0 allows to suppress whitespace insertion alltogether. - Added pragma option values push and pop to the line, preserve and output options allowing to store and restore the current option. The syntax is: #pragma wave options(