|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r67894 - in trunk: boost/wave/util doc libs/wave libs/wave/doc libs/wave/test/testwave tools/wave
From: hartmut.kaiser_at_[hidden]
Date: 2011-01-09 17:19:23
Author: hkaiser
Date: 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
New Revision: 67894
URL: http://svn.boost.org/trac/boost/changeset/67894
Log:
Wave: updated copyrights, added C++0x mode to docs, added predefined macros for C++0x mode
Text files modified:
trunk/boost/wave/util/cpp_macromap.hpp | 33 ++++++++++++-----
trunk/boost/wave/util/cpp_macromap_predef.hpp | 50 ++++++++++++++++++---------
trunk/doc/Jamfile.v2 | 2 +
trunk/libs/wave/ChangeLog | 2 +
trunk/libs/wave/doc/acknowledgements.html | 2
trunk/libs/wave/doc/class_ref_ctxpolicy_depr.html | 2
trunk/libs/wave/doc/class_reference_context.html | 3 -
trunk/libs/wave/doc/class_reference_ctxpolicy.html | 2
trunk/libs/wave/doc/class_reference_filepos.html | 2
trunk/libs/wave/doc/class_reference_inptpolcy.html | 2
trunk/libs/wave/doc/class_reference_lexer.html | 2
trunk/libs/wave/doc/class_reference_tokentype.html | 2
trunk/libs/wave/doc/compiletime_config.html | 10 +++-
trunk/libs/wave/doc/introduction.html | 2
trunk/libs/wave/doc/macro_expansion_process.html | 2
trunk/libs/wave/doc/predefined_macros.html | 10 ++--
trunk/libs/wave/doc/preface.html | 4 +-
trunk/libs/wave/doc/quickstart.html | 2
trunk/libs/wave/doc/references.html | 2
trunk/libs/wave/doc/samples.html | 2
trunk/libs/wave/doc/supported_pragmas.html | 2
trunk/libs/wave/doc/token_ids.html | 2
trunk/libs/wave/doc/tracing_facility.html | 2
trunk/libs/wave/doc/wave_driver.html | 22 ++++++++---
trunk/libs/wave/test/testwave/testwave_app.cpp | 2
trunk/tools/wave/cpp.cpp | 33 ++++++++++++------
trunk/tools/wave/cpp.hpp | 2
trunk/tools/wave/cpp_config.hpp | 2
trunk/tools/wave/cpp_version.hpp | 6 +-
trunk/tools/wave/stop_watch.hpp | 2
trunk/tools/wave/trace_macro_expansion.hpp | 72 ++++++++++++++++++++++++++++-----------
31 files changed, 186 insertions(+), 99 deletions(-)
Modified: trunk/boost/wave/util/cpp_macromap.hpp
==============================================================================
--- trunk/boost/wave/util/cpp_macromap.hpp (original)
+++ trunk/boost/wave/util/cpp_macromap.hpp 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -1844,20 +1844,33 @@
else
#endif
{
- // define C++ specifics
- for (int i = 0; 0 != predef.static_data_cpp(i).name; ++i) {
- predefined_macros::static_macros const& m = predef.static_data_cpp(i);
- predefine_macro(current_scope, m.name,
- token_type(m.token_id, m.value, pos));
+#if BOOST_WAVE_SUPPORT_CPP0X != 0
+ if (boost::wave::need_cpp0x(ctx.get_language())) {
+ // define C++0x specifics
+ for (int i = 0; 0 != predef.static_data_cpp0x(i).name; ++i) {
+ predefined_macros::static_macros const& m = predef.static_data_cpp0x(i);
+ predefine_macro(current_scope, m.name,
+ token_type(m.token_id, m.value, pos));
+ }
}
+ else
+#endif
+ {
+ // define C++ specifics
+ for (int i = 0; 0 != predef.static_data_cpp(i).name; ++i) {
+ predefined_macros::static_macros const& m = predef.static_data_cpp(i);
+ predefine_macro(current_scope, m.name,
+ token_type(m.token_id, m.value, pos));
+ }
#if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0
- // define __WAVE_HAS_VARIADICS__, if appropriate
- if (boost::wave::need_variadics(ctx.get_language())) {
- predefine_macro(current_scope, "__WAVE_HAS_VARIADICS__",
- token_type(T_INTLIT, "1", pos));
- }
+ // define __WAVE_HAS_VARIADICS__, if appropriate
+ if (boost::wave::need_variadics(ctx.get_language())) {
+ predefine_macro(current_scope, "__WAVE_HAS_VARIADICS__",
+ token_type(T_INTLIT, "1", pos));
+ }
#endif
+ }
}
// predefine the __BASE_FILE__ macro which contains the main file name
Modified: trunk/boost/wave/util/cpp_macromap_predef.hpp
==============================================================================
--- trunk/boost/wave/util/cpp_macromap_predef.hpp (original)
+++ trunk/boost/wave/util/cpp_macromap_predef.hpp 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -75,9 +75,9 @@
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};
-
+
// for some systems sprintf, time_t etc. is in namespace std
- using namespace std;
+ using namespace std;
time_t tt = time(0);
struct tm *tb = 0;
@@ -98,7 +98,7 @@
void reset_timestr()
{
// for some systems sprintf, time_t etc. is in namespace std
- using namespace std;
+ using namespace std;
time_t tt = time(0);
struct tm *tb = 0;
@@ -119,9 +119,9 @@
void reset_version()
{
char buffer[sizeof("0x00000000")+1];
-
+
// for some systems sprintf, time_t etc. is in namespace std
- using namespace std;
+ using namespace std;
// calculate the number of days since Dec 13 2001
// (the day the Wave project was started)
@@ -140,13 +140,13 @@
seconds/(3600*24));
version_ = buffer;
}
-
+
void reset_versionstr()
{
char buffer[sizeof("\"00.00.00.0000 \"")+sizeof(BOOST_PLATFORM)+sizeof(BOOST_COMPILER)+4];
// for some systems sprintf, time_t etc. is in namespace std
- using namespace std;
+ using namespace std;
// calculate the number of days since Dec 13 2001
// (the day the Wave project was started)
@@ -164,11 +164,11 @@
seconds/(3600*24), BOOST_PLATFORM, BOOST_COMPILER);
versionstr_ = buffer;
}
-
+
// dynamic predefined macros
string_type get_date() const { return datestr_; } // __DATE__
string_type get_time() const { return timestr_; } // __TIME__
-
+
// __SPIRIT_PP__/__WAVE__
string_type get_version() const
{
@@ -179,7 +179,7 @@
BOOST_WAVE_VERSION_MINOR, BOOST_WAVE_VERSION_SUBMINOR);
return buffer;
}
-
+
// __WAVE_CONFIG__
string_type get_config() const
{
@@ -189,7 +189,7 @@
sprintf(buffer, "0x%08x", BOOST_WAVE_CONFIG);
return buffer;
}
-
+
public:
predefined_macros()
: compilation_time_(__DATE__ " " __TIME__)
@@ -198,19 +198,19 @@
reset_version();
reset_versionstr();
}
-
+
void reset()
{
reset_datestr();
reset_timestr();
}
-
+
// __SPIRIT_PP_VERSION__/__WAVE_VERSION__
string_type get_fullversion() const { return version_; }
-
+
// __SPIRIT_PP_VERSION_STR__/__WAVE_VERSION_STR__
string_type get_versionstr() const { return versionstr_; }
-
+
// C++ mode
static_macros const& static_data_cpp(std::size_t i) const
{
@@ -222,7 +222,24 @@
BOOST_ASSERT(i < sizeof(data)/sizeof(data[0]));
return data[i];
}
-
+
+#if BOOST_WAVE_SUPPORT_CPP0X != 0
+ // C++0x mode
+ static_macros const& static_data_cpp0x(std::size_t i) const
+ {
+ static static_macros data[] = {
+ { "__STDC__", T_INTLIT, "1" },
+ { "__cplusplus", T_INTLIT, "201101L" },
+ { "__STDC_VERSION__", T_INTLIT, "199901L" },
+ { "__STDC_HOSTED__", T_INTLIT, "0" },
+ { "__WAVE_HAS_VARIADICS__", T_INTLIT, "1" },
+ { 0, T_EOF, 0 }
+ };
+ BOOST_ASSERT(i < sizeof(data)/sizeof(data[0]));
+ return data[i];
+ }
+#endif
+
#if BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS != 0
// C99 mode
static_macros const& static_data_c99(std::size_t i) const
@@ -256,7 +273,6 @@
BOOST_ASSERT(i < sizeof(data)/sizeof(data[0]));
return data[i];
}
-
}; // predefined_macros
///////////////////////////////////////////////////////////////////////////////
Modified: trunk/doc/Jamfile.v2
==============================================================================
--- trunk/doc/Jamfile.v2 (original)
+++ trunk/doc/Jamfile.v2 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -50,6 +50,7 @@
<dependency>../libs/thread/doc//thread
<dependency>../libs/signals2/doc//hello_world_def_code_snippet.xml
<dependency>../libs/random/doc//random
+ <dependency>../libs/spirit/doc//spirit
## Add path references to the QuickBook generated docs...
@@ -73,6 +74,7 @@
<implicit-dependency>../libs/thread/doc//thread
<implicit-dependency>../libs/signals2/doc//hello_world_def_code_snippet.xml
<implicit-dependency>../libs/random/doc//random
+ <implicit-dependency>../libs/spirit/doc//spirit
<xsl:param>boost.libraries=../../libs/libraries.htm
Modified: trunk/libs/wave/ChangeLog
==============================================================================
--- trunk/libs/wave/ChangeLog (original)
+++ trunk/libs/wave/ChangeLog 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -29,6 +29,8 @@
the default from now on).
- Added support for extended character and string literals, added test case
(which required to add C++0x support to the test application).
+- Added proper predefined macros fro --c++0x mode. __cplusplus is currently
+ defined to 201101L, but this will change when the Standard is finalized.
- Fixed a problem with object like macros, which when being adjacent to a
parenthesis, caused the parenthesis to disappear when the macro expansion
was suppressed by the expanding_object_like_macro() hook function.
Modified: trunk/libs/wave/doc/acknowledgements.html
==============================================================================
--- trunk/libs/wave/doc/acknowledgements.html (original)
+++ trunk/libs/wave/doc/acknowledgements.html 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -83,7 +83,7 @@
</tr>
</table>
<hr size="1">
-<p class="copyright">Copyright © 2003-2010 Hartmut Kaiser<br>
+<p class="copyright">Copyright © 2003-2011 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)
Modified: trunk/libs/wave/doc/class_ref_ctxpolicy_depr.html
==============================================================================
--- trunk/libs/wave/doc/class_ref_ctxpolicy_depr.html (original)
+++ trunk/libs/wave/doc/class_ref_ctxpolicy_depr.html 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -332,7 +332,7 @@
</tr>
</table>
<hr size="1">
-<p class="copyright">Copyright © 2003-2010 Hartmut Kaiser<br>
+<p class="copyright">Copyright © 2003-2011 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:
Modified: trunk/libs/wave/doc/class_reference_context.html
==============================================================================
--- trunk/libs/wave/doc/class_reference_context.html (original)
+++ trunk/libs/wave/doc/class_reference_context.html 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -468,8 +468,7 @@
</tbody>
</table>
<hr size="1">
-<p class="copyright">Copyright © 2003-2010
- Hartmut Kaiser<br>
+<p class="copyright">Copyright © 2003-2011 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
Modified: trunk/libs/wave/doc/class_reference_ctxpolicy.html
==============================================================================
--- trunk/libs/wave/doc/class_reference_ctxpolicy.html (original)
+++ trunk/libs/wave/doc/class_reference_ctxpolicy.html 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -422,7 +422,7 @@
</tbody>
</table>
<hr size="1">
-<p class="copyright">Copyright © 2003-2010 Hartmut Kaiser<br>
+<p class="copyright">Copyright © 2003-2011 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
Modified: trunk/libs/wave/doc/class_reference_filepos.html
==============================================================================
--- trunk/libs/wave/doc/class_reference_filepos.html (original)
+++ trunk/libs/wave/doc/class_reference_filepos.html 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -109,7 +109,7 @@
</tr>
</table>
<hr size="1">
-<p class="copyright">Copyright © 2003-2010 Hartmut Kaiser<br>
+<p class="copyright">Copyright © 2003-2011 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:
Modified: trunk/libs/wave/doc/class_reference_inptpolcy.html
==============================================================================
--- trunk/libs/wave/doc/class_reference_inptpolcy.html (original)
+++ trunk/libs/wave/doc/class_reference_inptpolcy.html 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -121,7 +121,7 @@
</tr>
</table>
<hr size="1">
-<p class="copyright">Copyright © 2003-2010 Hartmut Kaiser<br>
+<p class="copyright">Copyright © 2003-2011 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>
<span class="updated"></span>
Modified: trunk/libs/wave/doc/class_reference_lexer.html
==============================================================================
--- trunk/libs/wave/doc/class_reference_lexer.html (original)
+++ trunk/libs/wave/doc/class_reference_lexer.html 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -93,7 +93,7 @@
</tr>
</table>
<hr size="1">
-<p class="copyright">Copyright © 2003-2010 Hartmut Kaiser<br>
+<p class="copyright">Copyright © 2003-2011 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:
Modified: trunk/libs/wave/doc/class_reference_tokentype.html
==============================================================================
--- trunk/libs/wave/doc/class_reference_tokentype.html (original)
+++ trunk/libs/wave/doc/class_reference_tokentype.html 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -165,7 +165,7 @@
</tr>
</table>
<hr size="1">
-<p class="copyright">Copyright © 2003-2010 Hartmut Kaiser<br>
+<p class="copyright">Copyright © 2003-2011 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>
<span class="updated"></span>
Modified: trunk/libs/wave/doc/compiletime_config.html
==============================================================================
--- trunk/libs/wave/doc/compiletime_config.html (original)
+++ trunk/libs/wave/doc/compiletime_config.html 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -84,7 +84,11 @@
variadics and placemarkers. Note, to support C99 mode, this constant must
be defined too.</p></td>
</tr>
- <tr>
+<tr>
+ <td class="table_cells"><code>BOOST_WAVE_SUPPORT_CPP0X</code></td>
+ <td class="table_cells"><p>If defined, then the preprocessor library supports
+ C++0x keywords and C++0x specific features, such as variadics, placemarkers, extended character and string literals. This implies the definitions of the <code>BOOST_WAVE_SUPPORT_VARIADICS_PLACEMARKERS</code> constant.</p></td>
+ </tr> <tr>
<td class="table_cells"><code>BOOST_WAVE_MAX_INCLUDE_LEVEL_DEPTH</code></td>
<td class="table_cells"><p>If defined, it will determine the initial maximal
possible include file nesting depth supported. It defaults to 1024.</p></td>
@@ -239,12 +243,12 @@
</tr>
</table>
<hr size="1">
-<p class="copyright">Copyright © 2003-2010 Hartmut Kaiser<br>
+<p class="copyright">Copyright © 2003-2011 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>
<span class="updated"></span>
<p class="copyright"><span class="updated">Last updated:
- <!-- #BeginDate format:fcAm1m -->Tuesday, July 29, 2008 20:38<!-- #EndDate -->
+ <!-- #BeginDate format:fcAm1m -->Sunday, January 9, 2011 16:16<!-- #EndDate -->
</span></p>
</body>
</html>
Modified: trunk/libs/wave/doc/introduction.html
==============================================================================
--- trunk/libs/wave/doc/introduction.html (original)
+++ trunk/libs/wave/doc/introduction.html 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -82,7 +82,7 @@
</tr>
</table>
<hr size="1">
-<p class="copyright">Copyright © 2003-2010 Hartmut Kaiser<br>
+<p class="copyright">Copyright © 2003-2011 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>
<span class="updated"></span>
Modified: trunk/libs/wave/doc/macro_expansion_process.html
==============================================================================
--- trunk/libs/wave/doc/macro_expansion_process.html (original)
+++ trunk/libs/wave/doc/macro_expansion_process.html 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -88,7 +88,7 @@
</tr>
</table>
<hr size="1">
-<p class="copyright">Copyright © 2003-2010 Hartmut Kaiser<br>
+<p class="copyright">Copyright © 2003-2011 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>
<span class="updated"></span>
Modified: trunk/libs/wave/doc/predefined_macros.html
==============================================================================
--- trunk/libs/wave/doc/predefined_macros.html (original)
+++ trunk/libs/wave/doc/predefined_macros.html 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -121,19 +121,19 @@
</tr>
<tr>
<td class="table_cells"><code>__STDC_VERSION__</code></td>
- <td class="table_cells"><p>199901L (a decimal constant), this is defined in C99 mode only</p></td>
+ <td class="table_cells"><p>199901L (a decimal constant), this is defined in C99 and C++0x modes only</p></td>
<td class="table_cells"><p>yes</p></td>
</tr>
<tr>
<td class="table_cells"><code>__STDC_HOSTED__</code></td>
- <td class="table_cells"><p>0L (a decimal constant), this is defined in C99 mode only</p></td>
+ <td class="table_cells"><p>0L (a decimal constant), this is defined in C99 and C++0x modes only</p></td>
<td class="table_cells"><p>yes</p></td>
</tr>
<tr>
<td class="table_cells"><code>__WAVE_HAS_VARIADICS__</code></td>
<td class="table_cells"><p>1 (a decimal constant), this is defined in C++
mode only if variadics and placemarkers are enabled, and it is defined
- in the C99 mode</p></td>
+ in the C99 and C++0x modes</p></td>
<td class="table_cells"><p>no</p></td>
</tr>
<tr>
@@ -167,12 +167,12 @@
</tr>
</table>
<hr size="1">
-<p class="copyright">Copyright © 2003-2010 Hartmut Kaiser<br>
+<p class="copyright">Copyright © 2003-2011 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>
<span class="updated"></span>
<p class="copyright"><span class="updated">Last updated:
- <!-- #BeginDate format:fcAm1m -->Monday, March 13, 2006 13:47<!-- #EndDate -->
+ <!-- #BeginDate format:fcAm1m -->Sunday, January 9, 2011 16:12<!-- #EndDate -->
</span></p>
</body>
</html>
Modified: trunk/libs/wave/doc/preface.html
==============================================================================
--- trunk/libs/wave/doc/preface.html (original)
+++ trunk/libs/wave/doc/preface.html 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -166,7 +166,7 @@
</table>
<hr size="1">
-<p class="copyright">Copyright © 2003-2010 Hartmut Kaiser<br>
+<p class="copyright">Copyright © 2003-2011 Hartmut Kaiser<br>
<br>
@@ -176,7 +176,7 @@
<span class="updated"></span>
<p class="copyright"><span class="updated">Last updated:
- <!-- #BeginDate format:fcAm1m -->Sunday, December 2, 2007 19:03<!-- #EndDate -->
+ <!-- #BeginDate format:fcAm1m -->Sunday, January 9, 2011 16:17<!-- #EndDate -->
</span></p>
</body>
Modified: trunk/libs/wave/doc/quickstart.html
==============================================================================
--- trunk/libs/wave/doc/quickstart.html (original)
+++ trunk/libs/wave/doc/quickstart.html 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -110,7 +110,7 @@
</tr>
</table>
<hr size="1">
-<p class="copyright">Copyright © 2003-2010 Hartmut Kaiser<br>
+<p class="copyright">Copyright © 2003-2011 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>
<span class="updated"></span>
Modified: trunk/libs/wave/doc/references.html
==============================================================================
--- trunk/libs/wave/doc/references.html (original)
+++ trunk/libs/wave/doc/references.html 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -89,7 +89,7 @@
</tr>
</table>
<hr size="1">
-<p class="copyright">Copyright © 2003-2010 Hartmut Kaiser<br>
+<p class="copyright">Copyright © 2003-2011 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>
<span class="updated"></span>
Modified: trunk/libs/wave/doc/samples.html
==============================================================================
--- trunk/libs/wave/doc/samples.html (original)
+++ trunk/libs/wave/doc/samples.html 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -103,7 +103,7 @@
</tr>
</table>
<hr size="1">
-<p class="copyright">Copyright © 2003-2010 Hartmut Kaiser<br>
+<p class="copyright">Copyright © 2003-2011 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>
<span class="updated"></span>
Modified: trunk/libs/wave/doc/supported_pragmas.html
==============================================================================
--- trunk/libs/wave/doc/supported_pragmas.html (original)
+++ trunk/libs/wave/doc/supported_pragmas.html 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -129,7 +129,7 @@
</tr>
</table>
<hr size="1">
-<p class="copyright">Copyright © 2003-2010 Hartmut Kaiser<br>
+<p class="copyright">Copyright © 2003-2011 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>
<span class="updated"></span>
Modified: trunk/libs/wave/doc/token_ids.html
==============================================================================
--- trunk/libs/wave/doc/token_ids.html (original)
+++ trunk/libs/wave/doc/token_ids.html 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -965,7 +965,7 @@
</tr>
</table>
<hr size="1">
-<p class="copyright">Copyright © 2003-2010 Hartmut Kaiser<br>
+<p class="copyright">Copyright © 2003-2011 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>
<span class="updated"></span>
Modified: trunk/libs/wave/doc/tracing_facility.html
==============================================================================
--- trunk/libs/wave/doc/tracing_facility.html (original)
+++ trunk/libs/wave/doc/tracing_facility.html 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -149,7 +149,7 @@
</tr>
</table>
<hr size="1">
-<p class="copyright">Copyright © 2003-2010 Hartmut Kaiser<br>
+<p class="copyright">Copyright © 2003-2011 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:
Modified: trunk/libs/wave/doc/wave_driver.html
==============================================================================
--- trunk/libs/wave/doc/wave_driver.html (original)
+++ trunk/libs/wave/doc/wave_driver.html 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -56,6 +56,7 @@
--long_long: enable long long support if C++ mode
--variadics: enable variadics and placemarkers in C++ mode
--c99: enable C99 mode (implies variadics and placemarkers)
+ --c++0x enable C++0x mode (implies --variadics and --long_long)
-l [ --listincludes ] arg: list included file to a file [arg] or to stdout [-]
-m [ --macronames ] arg: list names of all defined macros to a file [arg] or
to stdout [-]
@@ -63,8 +64,9 @@
stdout [-]
-p [ --preserve ] arg (=0): preserve whitespace
0: no whitespace is preserved (default),
- 1: comments are preserved,
- 2: all whitespace is preserved
+ 1: begin of line whitespace is preserved,
+ 2: comments and begin of line whitespace is preserved,
+ 3: all whitespace is preserved
-L [ --line ] arg (=1): control the generation of #line directives
0: no #line directives are generated
1: #line directives will be emitted (default)
@@ -182,7 +184,7 @@
</blockquote>
<p dir="ltr">--c99</p>
<blockquote>
- <p dir="ltr">Enable the C99 mode. This mode enables certain C99 specific features
+ <p dir="ltr">Enable the C99 mode. This mode enables certain C99 specific features, such
as variadics (macros with variable parameter lists), placemarkers (empty macro
arguments) and <tt>operator _Pragma</tt> support and disables some C++
specific token types as for instance <tt>'::'</tt>, <tt>'->*'</tt> and <tt>'->.'</tt>.
@@ -190,6 +192,14 @@
about predefined macros you may look here.
</p>
</blockquote>
+<p dir="ltr">--c++0x</p>
+<blockquote>
+ <p dir="ltr">Enable the C++0x mode. This mode enables C++0x specific keywords and features, such
+ as variadics (macros with variable parameter lists), placemarkers (empty macro
+ arguments) and <tt>operator _Pragma</tt> support.
+ Several predefined macros are different for this mode, for more information
+ about predefined macros you may look here. </p>
+</blockquote>
<p dir="ltr">-l [--listincludes] path</p>
<blockquote>
<p dir="ltr">Enable the output of the names of all opened include files. The path specifies the filename to use for the output of the generated include log. If the filename given equals to <tt>'-'</tt> (without the quotes), the include log is put into the standard output stream (stdout).</p>
@@ -204,7 +214,7 @@
</blockquote>
<p dir="ltr">-p [--preserve] arg </p>
<blockquote>
- <p dir="ltr">Preserve the whitespace from the input stream not located inside of macro definitions. The argument defines the amount of whitespace to be preserved. A value of '0' (zero) skips all whitespace, a value of '1' preserves all the comments and a value of '2' will preserve all whitespace in the output.</p>
+ <p dir="ltr">Preserve the whitespace from the input stream not located inside of macro definitions. The argument defines the amount of whitespace to be preserved. A value of '0' (zero) skips all whitespace, a value of '1' preserves begin of line whitespace only, a value of '2' preserves all the comments andd all begin of line whitespace, and a value of '3' will preserve all whitespace in the output.</p>
<p dir="ltr">The comments located inside macro definitions are skipped even if this option is specified with an argument not '0' (zero) . If this option is not specified on the command line only essential whitespace is preserved (equivalent to '0' as the argument value). </p>
</blockquote>
<p dir="ltr">-L [--line]</p>
@@ -283,12 +293,12 @@
</tr>
</table>
<hr size="1">
-<p class="copyright">Copyright © 2003-2010 Hartmut Kaiser<br>
+<p class="copyright">Copyright © 2003-2011 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>
<span class="updated"></span>
<p class="copyright"><span class="updated">Last updated:
- <!-- #BeginDate format:fcAm1m -->Thursday, September 17, 2009 12:40<!-- #EndDate -->
+ <!-- #BeginDate format:fcAm1m -->Sunday, January 9, 2011 16:12<!-- #EndDate -->
</span></p>
</body>
</html>
Modified: trunk/libs/wave/test/testwave/testwave_app.cpp
==============================================================================
--- trunk/libs/wave/test/testwave/testwave_app.cpp (original)
+++ trunk/libs/wave/test/testwave/testwave_app.cpp 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -54,7 +54,7 @@
///////////////////////////////////////////////////////////////////////////////
// testwave version definitions
#define TESTWAVE_VERSION_MAJOR 0
-#define TESTWAVE_VERSION_MINOR 5
+#define TESTWAVE_VERSION_MINOR 6
#define TESTWAVE_VERSION_SUBMINOR 0
namespace {
Modified: trunk/tools/wave/cpp.cpp
==============================================================================
--- trunk/tools/wave/cpp.cpp (original)
+++ trunk/tools/wave/cpp.cpp 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -3,7 +3,7 @@
http://www.boost.org/
- Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost
+ Copyright (c) 2001-2011 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)
=============================================================================*/
@@ -138,7 +138,7 @@
"Wave: A Standard conformant C++ preprocessor based on the Boost.Wave library",
"http://www.boost.org/",
"",
- "Copyright (c) 2001-2010 Hartmut Kaiser, Distributed under the Boost",
+ "Copyright (c) 2001-2011 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)",
0
@@ -752,22 +752,31 @@
// enable preserving comments mode
bool preserve_comments = false;
bool preserve_whitespace = false;
+ bool preserve_bol_whitespace = false;
if (vm.count("preserve")) {
int preserve = vm["preserve"].as<int>();
switch(preserve) {
- case 0: break;
- case 2:
+ case 0: break; // preserve no whitespace
+ case 3: // preserve all whitespace
preserve_whitespace = true;
- /* fall through */
- case 1:
preserve_comments = true;
+ preserve_bol_whitespace = true;
+ break;
+
+ case 2: // preserve comments and BOL whitespace only
+ preserve_comments = true;
+ preserve_bol_whitespace = true;
+ break;
+
+ case 1: // preserve BOL whitespace only
+ preserve_bol_whitespace = true;
break;
default:
cerr << "wave: bogus preserve whitespace option value: "
- << preserve << ", should be 0, 1, or 2" << endl;
+ << preserve << ", should be 0, 1, 2, or 3" << endl;
return -1;
}
}
@@ -785,8 +794,9 @@
bool allow_output = true; // will be manipulated from inside the hooks object
std::string default_outfile; // will be used from inside the hooks object
trace_macro_expansion<token_type> hooks(preserve_whitespace,
- output, traceout, includelistout, listguardsout, enable_trace,
- enable_system_command, allow_output, default_outfile);
+ preserve_bol_whitespace, output, traceout, includelistout,
+ listguardsout, enable_trace, enable_system_command, allow_output,
+ default_outfile);
// enable macro invocation count, if appropriate
if (vm.count("macrocounts"))
@@ -1254,8 +1264,9 @@
("preserve,p", po::value<int>()->default_value(0),
"preserve whitespace\n"
"0: no whitespace is preserved (default),\n"
- "1: comments are preserved,\n"
- "2: all whitespace is preserved")
+ "1: begin of line whitespace is preserved,\n"
+ "2: comments and begin of line whitespace is preserved,\n"
+ "3: all whitespace is preserved")
("line,L", po::value<int>()->default_value(1),
"control the generation of #line directives\n"
"0: no #line directives are generated,\n"
Modified: trunk/tools/wave/cpp.hpp
==============================================================================
--- trunk/tools/wave/cpp.hpp (original)
+++ trunk/tools/wave/cpp.hpp 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -3,7 +3,7 @@
http://www.boost.org/
- Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost
+ Copyright (c) 2001-2011 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)
=============================================================================*/
Modified: trunk/tools/wave/cpp_config.hpp
==============================================================================
--- trunk/tools/wave/cpp_config.hpp (original)
+++ trunk/tools/wave/cpp_config.hpp 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -4,7 +4,7 @@
http://www.boost.org/
- Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost
+ Copyright (c) 2001-2011 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)
=============================================================================*/
Modified: trunk/tools/wave/cpp_version.hpp
==============================================================================
--- trunk/tools/wave/cpp_version.hpp (original)
+++ trunk/tools/wave/cpp_version.hpp 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -2,7 +2,7 @@
Boost.Wave: A Standard compliant C++ preprocessor library
http://www.boost.org/
- Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost
+ Copyright (c) 2001-2011 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)
=============================================================================*/
@@ -19,7 +19,7 @@
#define CPP_VERSION_FULL_STR BOOST_PP_STRINGIZE(CPP_VERSION_FULL)
-#define CPP_VERSION_DATE 20100324L
-#define CPP_VERSION_DATE_STR "20100324"
+#define CPP_VERSION_DATE 20110109L
+#define CPP_VERSION_DATE_STR "20110109"
#endif // !defined(CPP_VERSION_HPP_CE4FE67F_63F9_468D_8364_C855F89D3C5D_INCLUDED)
Modified: trunk/tools/wave/stop_watch.hpp
==============================================================================
--- trunk/tools/wave/stop_watch.hpp (original)
+++ trunk/tools/wave/stop_watch.hpp 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -2,7 +2,7 @@
Boost.Wave: A Standard compliant C++ preprocessor library
http://www.boost.org/
- Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost
+ Copyright (c) 2001-2011 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)
=============================================================================*/
Modified: trunk/tools/wave/trace_macro_expansion.hpp
==============================================================================
--- trunk/tools/wave/trace_macro_expansion.hpp (original)
+++ trunk/tools/wave/trace_macro_expansion.hpp 2011-01-09 17:19:16 EST (Sun, 09 Jan 2011)
@@ -2,7 +2,7 @@
Boost.Wave: A Standard compliant C++ preprocessor library
http://www.boost.org/
- Copyright (c) 2001-2010 Hartmut Kaiser. Distributed under the Boost
+ Copyright (c) 2001-2011 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)
=============================================================================*/
@@ -145,7 +145,8 @@
typedef boost::wave::context_policies::eat_whitespace<TokenT> base_type;
public:
- trace_macro_expansion(bool preserve_whitespace_,
+ trace_macro_expansion(
+ bool preserve_whitespace_, bool preserve_bol_whitespace_,
std::ofstream &output_, std::ostream &tracestrm_,
std::ostream &includestrm_, std::ostream &guardstrm_,
trace_flags flags_, bool enable_system_command_,
@@ -155,6 +156,7 @@
level(0), flags(flags_), logging_flags(trace_nothing),
enable_system_command(enable_system_command_),
preserve_whitespace(preserve_whitespace_),
+ preserve_bol_whitespace(preserve_bol_whitespace_),
generate_output(generate_output_),
default_outfile(default_outfile_),
emit_relative_filenames(false)
@@ -741,7 +743,9 @@
bool may_skip_whitespace(ContextT const &ctx, TokenT &token,
bool &skipped_newline)
{
- return this->base_type::may_skip_whitespace(ctx, token, skipped_newline) ?
+ return this->base_type::may_skip_whitespace(
+ ctx, token, need_preserve_comments(ctx.get_language()),
+ preserve_bol_whitespace, skipped_newline) ?
!preserve_whitespace : false;
}
@@ -781,7 +785,7 @@
using namespace boost::wave;
if (e.get_errorcode() != preprocess_exception::ill_formed_directive)
return false;
-
+
// the error string is formatted as 'severity: error: directive'
std::string error(e.description());
std::string::size_type p = error.find_last_of(":");
@@ -841,24 +845,44 @@
}
///////////////////////////////////////////////////////////////////////////
- // interpret the pragma wave option(preserve: [0|1|2|push|pop]) directive
+ // interpret the pragma wave option(preserve: [0|1|2|3|push|pop]) directive
template <typename ContextT>
static bool
interpret_pragma_option_preserve_set(int mode, bool &preserve_whitespace,
- ContextT &ctx)
+ bool& preserve_bol_whitespace, ContextT &ctx)
{
switch(mode) {
- case 0:
+ // preserve no whitespace
+ case 0:
preserve_whitespace = false;
+ preserve_bol_whitespace = false;
ctx.set_language(
enable_preserve_comments(ctx.get_language(), false),
false);
break;
+ // preserve BOL whitespace only
+ case 1:
+ preserve_whitespace = false;
+ preserve_bol_whitespace = true;
+ ctx.set_language(
+ enable_preserve_comments(ctx.get_language(), false),
+ false);
+ break;
+
+ // preserve comments and BOL whitespace only
case 2:
+ preserve_whitespace = false;
+ preserve_bol_whitespace = true;
+ ctx.set_language(
+ enable_preserve_comments(ctx.get_language()),
+ false);
+ break;
+
+ // preserve all whitespace
+ case 3:
preserve_whitespace = true;
- /* fall through */
- case 1:
+ preserve_bol_whitespace = true;
ctx.set_language(
enable_preserve_comments(ctx.get_language()),
false);
@@ -885,15 +909,18 @@
if (T_IDENTIFIER == id) {
if ((*it).get_value() == "push") {
// push current preserve option onto the internal option stack
- if (preserve_whitespace) {
- if (need_preserve_comments(ctx.get_language()))
- preserve_options.push(2);
+ if (need_preserve_comments(ctx.get_language())) {
+ if (preserve_whitespace)
+ preserve_options.push(3);
else
- preserve_options.push(1);
+ preserve_options.push(2);
+ }
+ else if (preserve_bol_whitespace) {
+ preserve_options.push(1);
}
else {
preserve_options.push(0);
- }
+ }
return true;
}
else if ((*it).get_value() == "pop") {
@@ -903,10 +930,11 @@
pragma_mismatched_push_pop, "preserve",
act_token.get_position());
}
-
+
// pop output preserve from the internal option stack
bool result = interpret_pragma_option_preserve_set(
- preserve_options.top(), preserve_whitespace, ctx);
+ preserve_options.top(), preserve_whitespace,
+ preserve_bol_whitespace, ctx);
preserve_options.pop();
return result;
}
@@ -918,10 +946,11 @@
using namespace std; // some platforms have atoi in namespace std
return interpret_pragma_option_preserve_set(
- atoi((*it).get_value().c_str()), preserve_whitespace, ctx);
+ atoi((*it).get_value().c_str()), preserve_whitespace,
+ preserve_bol_whitespace, ctx);
}
- // interpret the pragma wave option(line: [0|1|push|pop]) directive
+ // interpret the pragma wave option(line: [0|1|2|push|pop]) directive
template <typename ContextT, typename IteratorT>
bool
interpret_pragma_option_line(ContextT &ctx, IteratorT &it,
@@ -970,7 +999,7 @@
using namespace std; // some platforms have atoi in namespace std
int emit_lines = atoi((*it).get_value().c_str());
- if (0 == emit_lines || 1 == emit_lines) {
+ if (0 == emit_lines || 1 == emit_lines || 2 == emit_lines) {
// set the new emit #line directive mode
ctx.set_language(
enable_emit_line_directives(ctx.get_language(), emit_lines),
@@ -1133,12 +1162,12 @@
token_type const &value = *it;
if (value.get_value() == "preserve") {
- // #pragma wave option(preserve: [0|1|2|push|pop])
+ // #pragma wave option(preserve: [0|1|2|3|push|pop])
valid_option = interpret_pragma_option_preserve(ctx, it, end,
act_token);
}
else if (value.get_value() == "line") {
- // #pragma wave option(line: [0|1|push|pop])
+ // #pragma wave option(line: [0|1|2|push|pop])
valid_option = interpret_pragma_option_line(ctx, it, end,
act_token);
}
@@ -1336,6 +1365,7 @@
trace_flags logging_flags; // enabled by a #pragma
bool enable_system_command; // enable #pragma wave system() command
bool preserve_whitespace; // enable whitespace preservation
+ bool preserve_bol_whitespace; // enable begin of line whitespace preservation
bool& generate_output; // allow generated tokens to be streamed to output
std::string const& default_outfile; // name of the output file given on command line
boost::filesystem::path current_outfile; // name of the current output file
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