|
Boost-Commit : |
From: joel_at_[hidden]
Date: 2008-07-09 21:44:18
Author: djowel
Date: 2008-07-09 21:44:17 EDT (Wed, 09 Jul 2008)
New Revision: 47280
URL: http://svn.boost.org/trac/boost/changeset/47280
Log:
images and stuff
Added:
branches/release/libs/spirit/doc/html/images/alert.png (contents, props changed)
branches/release/libs/spirit/doc/html/images/caution.png (contents, props changed)
branches/release/libs/spirit/doc/html/images/important.png (contents, props changed)
branches/release/libs/spirit/doc/html/images/note.png (contents, props changed)
branches/release/libs/spirit/doc/html/images/tip.png (contents, props changed)
branches/release/libs/spirit/doc/qi_and_karma/sum_tutorial.qbk (contents, props changed)
Binary files modified:
branches/release/libs/spirit/doc/html/images/callouts/Thumbs.db
Text files modified:
branches/release/libs/spirit/doc/Jamfile | 9 ++++---
branches/release/libs/spirit/doc/qi_and_karma/warming_up.qbk | 9 +++----
branches/release/libs/spirit/doc/spirit2.qbk | 10 ++++----
branches/release/libs/spirit/doc/what_s_new.qbk | 42 ++++++++++++++++++++--------------------
branches/release/libs/spirit/example/qi/num_list1.cpp | 17 +++++++--------
5 files changed, 43 insertions(+), 44 deletions(-)
Modified: branches/release/libs/spirit/doc/Jamfile
==============================================================================
--- branches/release/libs/spirit/doc/Jamfile (original)
+++ branches/release/libs/spirit/doc/Jamfile 2008-07-09 21:44:17 EDT (Wed, 09 Jul 2008)
@@ -19,9 +19,10 @@
<xsl:param>boost.root=../../../..
<xsl:param>boost.libraries=../../../libraries.htm
<xsl:param>html.stylesheet=../../../../doc/html/boostbook.css
- <xsl:param>chunk.section.depth=5
- <xsl:param>chunk.first.sections=1
- <xsl:param>toc.section.depth=4
- <xsl:param>toc.max.depth=4
+ <xsl:param>chunk.section.depth=4
+ #<xsl:param>chunk.first.sections=1
+ <xsl:param>toc.section.depth=3
+ <xsl:param>toc.max.depth=3
<xsl:param>generate.section.toc.level=4
+ <xsl:param>admon.graphics.path=images/
;
Added: branches/release/libs/spirit/doc/html/images/alert.png
==============================================================================
Binary file. No diff available.
Modified: branches/release/libs/spirit/doc/html/images/callouts/Thumbs.db
==============================================================================
Binary files. No diff available.
Added: branches/release/libs/spirit/doc/html/images/caution.png
==============================================================================
Binary file. No diff available.
Added: branches/release/libs/spirit/doc/html/images/important.png
==============================================================================
Binary file. No diff available.
Added: branches/release/libs/spirit/doc/html/images/note.png
==============================================================================
Binary file. No diff available.
Added: branches/release/libs/spirit/doc/html/images/tip.png
==============================================================================
Binary file. No diff available.
Added: branches/release/libs/spirit/doc/qi_and_karma/sum_tutorial.qbk
==============================================================================
--- (empty file)
+++ branches/release/libs/spirit/doc/qi_and_karma/sum_tutorial.qbk 2008-07-09 21:44:17 EDT (Wed, 09 Jul 2008)
@@ -0,0 +1,16 @@
+[/==============================================================================
+ Copyright (C) 2001-2008 Joel de Guzman
+ 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)
+===============================================================================/]
+
+[section Sum - adding numbers]
+
+
+
+[import ../../example/qi/sum.cpp]
+[tutorial_adder]
+
+[endsect]
Modified: branches/release/libs/spirit/doc/qi_and_karma/warming_up.qbk
==============================================================================
--- branches/release/libs/spirit/doc/qi_and_karma/warming_up.qbk (original)
+++ branches/release/libs/spirit/doc/qi_and_karma/warming_up.qbk 2008-07-09 21:44:17 EDT (Wed, 09 Jul 2008)
@@ -81,10 +81,10 @@
use the `phrase_parse` function. One overload of this function accepts four
arguments:
-* An iterator pointing to the start of the input
-* An iterator pointing to one past the end of the input
-* The parser object
-* Another parser called the skip parser
+# An iterator pointing to the start of the input
+# An iterator pointing to one past the end of the input
+# The parser object
+# Another parser called the skip parser
In our example, we wish to skip spaces and tabs. Another parser named `space`
is included in Spirit's repertoire of predefined parsers. It is a very simple
@@ -133,5 +133,4 @@
the input) by checking if the first iterator, after parsing, is equal to the end
iterator. You may strike out this part if partial matches are to be allowed.
-
[endsect] [/ Warming up]
Modified: branches/release/libs/spirit/doc/spirit2.qbk
==============================================================================
--- branches/release/libs/spirit/doc/spirit2.qbk (original)
+++ branches/release/libs/spirit/doc/spirit2.qbk 2008-07-09 21:44:17 EDT (Wed, 09 Jul 2008)
@@ -97,11 +97,11 @@
[/ Some images ]
-[def __note__ [$../../../../doc/html/images/adm_note.png]]
-[def __tip__ [$../../../../doc/html/images/adm_tip.png]]
-[def __important__ [$../../../../doc/html/images/adm_important.png]]
-[def __caution__ [$../../../../doc/html/images/adm_caution.png]]
-[def __danger__ [$../../../../doc/html/images/adm_danger.png]]
+[def __note__ [$images/note.png]]
+[def __tip__ [$images/tip.png]]
+[def __important__ [$images/important.png]]
+[def __caution__ [$images/caution.png]]
+[def __danger__ [$images/alert.png]]
[/ some templates]
Modified: branches/release/libs/spirit/doc/what_s_new.qbk
==============================================================================
--- branches/release/libs/spirit/doc/what_s_new.qbk (original)
+++ branches/release/libs/spirit/doc/what_s_new.qbk 2008-07-09 21:44:17 EDT (Wed, 09 Jul 2008)
@@ -10,36 +10,36 @@
[heading Spirit Classic]
-The Spirit V1.8.x code base has been integrated with Spirit V2. It is now called
-__classic__. Even if the directory structure has changed (the Spirit Classic
-headers are now moved to the '$BOOST_ROOT/boost/spirit/home/classic' directory),
-we created forwarding headers allowing to compile existing applications without
-any change. These forwarding headers are deprecated, though, which will result
-in corresponding warnings generated for each of the headers starting with Boost
-V1.38. The forwarding headers are expected to be removed in the future.
-
-The recommended way of using Spirit Classic now is to include header files from
-the directory '$BOOST_ROOT/boost/spirit/include'. All files of Spirit Classic
-in this directory have a 'classic_' prefixed to their name. For example the
-include
+The Spirit V1.8.x code base has been integrated with Spirit V2. It is now called
+__classic__. Even if the directory structure has changed (the Spirit Classic
+headers are now moved to the '''$BOOST_ROOT/boost/spirit/home/classic''' directory),
+we created forwarding headers allowing to compile existing applications without
+any change. These forwarding headers are deprecated, though, which will result
+in corresponding warnings generated for each of the headers starting with Boost
+V1.38. The forwarding headers are expected to be removed in the future.
+
+The recommended way of using Spirit Classic now is to include header files from
+the directory '''$BOOST_ROOT/boost/spirit/include'''. All files of Spirit Classic
+in this directory have a 'classic_' prefixed to their name. For example the
+include
#include <boost/spirit/core/core.hpp>
-now should be written as:
+now should be written as:
#include <boost/spirit/include/classic_core.hpp>
-To avoid namespace conflicts with the new Spirit V2 library we moved Spirit Classic
-into the namespace `boost::spirit::classic`. All references to the former
+To avoid namespace conflicts with the new Spirit V2 library we moved Spirit Classic
+into the namespace `boost::spirit::classic`. All references to the former
namespace `boost::spirit` need to be adjusted as soon as the header names are
-corrected as described above. As an alternative you can define the preprocessor
-constant `BOOST_SPIRIT_USE_OLD_NAMESPACE`, which will force the Spirit Classic
-code to be in the namespace `boost::spirit` as before. This is not recommended,
+corrected as described above. As an alternative you can define the preprocessor
+constant `BOOST_SPIRIT_USE_OLD_NAMESPACE`, which will force the Spirit Classic
+code to be in the namespace `boost::spirit` as before. This is not recommended,
though, as it may result in naming clashes.
-The change of the namespace will be automatically deactivated whenever the
-deprecated include files are being used. This ensures full backwards
-compatibility for existing applications.
+The change of the namespace will be automatically deactivated whenever the
+deprecated include files are being used. This ensures full backwards
+compatibility for existing applications.
[endsect]
Modified: branches/release/libs/spirit/example/qi/num_list1.cpp
==============================================================================
--- branches/release/libs/spirit/example/qi/num_list1.cpp (original)
+++ branches/release/libs/spirit/example/qi/num_list1.cpp 2008-07-09 21:44:17 EDT (Wed, 09 Jul 2008)
@@ -32,9 +32,14 @@
///////////////////////////////////////////////////////////////////////////////
//[tutorial_numlist1
template <typename Iterator>
-bool parse_numbers(Iterator first, Iterator last, std::vector<double>& v)
+bool parse_numbers(Iterator first, Iterator last)
{
- bool r = phrase_parse(first, last, double_ >> *(',' >> double_), space);
+ bool r = phrase_parse(
+ first, /*< start iterator >*/
+ last, /*< end iterator >*/
+ double_ >> *(',' >> double_), /*< the parser >*/
+ space /*< the skip-parser >*/
+ );
if (first != last) // fail if we did not get a full match
return false;
return r;
@@ -60,17 +65,11 @@
if (str.empty() || str[0] == 'q' || str[0] == 'Q')
break;
- std::vector<double> v;
- if (parse_numbers(str.begin(), str.end(), v))
+ if (parse_numbers(str.begin(), str.end()))
{
std::cout << "-------------------------\n";
std::cout << "Parsing succeeded\n";
std::cout << str << " Parses OK: " << std::endl;
-
- for (std::vector<double>::size_type i = 0; i < v.size(); ++i)
- std::cout << i << ": " << v[i] << std::endl;
-
- std::cout << "\n-------------------------\n";
}
else
{
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