Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71372 - in trunk: boost/spirit/home/karma/detail boost/spirit/home/karma/numeric boost/spirit/home/karma/numeric/detail boost/spirit/home/qi/numeric/detail boost/spirit/home/support boost/spirit/home/support/detail libs/spirit/doc libs/spirit/doc/html libs/spirit/doc/html/spirit libs/spirit/doc/html/spirit/abstracts libs/spirit/doc/html/spirit/karma libs/spirit/doc/html/spirit/karma/reference/numeric libs/spirit/doc/html/spirit/qi libs/spirit/doc/html/spirit/qi/reference/operator libs/spirit/doc/html/spirit/what_s_new libs/spirit/doc/karma libs/spirit/repository/doc libs/spirit/repository/doc/html libs/spirit/repository/doc/html/spirit_repository libs/spirit/repository/doc/html/spirit_repository/qi_components/nonterminal libs/spirit/test libs/spirit/test/karma
From: hartmut.kaiser_at_[hidden]
Date: 2011-04-18 13:09:03


Author: hkaiser
Date: 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
New Revision: 71372
URL: http://svn.boost.org/trac/boost/changeset/71372

Log:
Spirit: more karma adapted ADT problems fixed, full radix range for karma::uint_generators
Added:
   trunk/libs/spirit/test/karma/uint_radix.cpp (contents, props changed)
Text files modified:
   trunk/boost/spirit/home/karma/detail/extract_from.hpp | 2
   trunk/boost/spirit/home/karma/numeric/bool.hpp | 2
   trunk/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp | 82 ++++++++++++++----------------------
   trunk/boost/spirit/home/karma/numeric/detail/real_utils.hpp | 2
   trunk/boost/spirit/home/karma/numeric/int.hpp | 2
   trunk/boost/spirit/home/karma/numeric/uint.hpp | 8 +--
   trunk/boost/spirit/home/qi/numeric/detail/numeric_utils.hpp | 2
   trunk/boost/spirit/home/qi/numeric/detail/real_impl.hpp | 2
   trunk/boost/spirit/home/support/adapt_adt_attributes.hpp | 83 +++++++++++++++++++++++++++++++++++++
   trunk/boost/spirit/home/support/attributes.hpp | 87 ++++++++++++++++++++++-----------------
   trunk/boost/spirit/home/support/container.hpp | 10 ++++
   trunk/boost/spirit/home/support/detail/pow10.hpp | 2
   trunk/libs/spirit/doc/html/index.html | 4
   trunk/libs/spirit/doc/html/spirit/abstracts/parsing_expression_grammar.html | 6 +-
   trunk/libs/spirit/doc/html/spirit/abstracts/syntax_diagram.html | 10 ++--
   trunk/libs/spirit/doc/html/spirit/introduction.html | 4
   trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/signed_int.html | 27 ++++++-----
   trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/unsigned_int.html | 58 ++++++++++++-------------
   trunk/libs/spirit/doc/html/spirit/karma/s05.html | 2
   trunk/libs/spirit/doc/html/spirit/preface.html | 4
   trunk/libs/spirit/doc/html/spirit/qi/reference/operator/difference.html | 4
   trunk/libs/spirit/doc/html/spirit/qi/reference/operator/optional.html | 4
   trunk/libs/spirit/doc/html/spirit/qi/s04.html | 2
   trunk/libs/spirit/doc/html/spirit/what_s_new/spirit_2_5.html | 5 ++
   trunk/libs/spirit/doc/karma/numeric.qbk | 35 ++++++++-------
   trunk/libs/spirit/doc/what_s_new.qbk | 2
   trunk/libs/spirit/repository/doc/html/index.html | 4
   trunk/libs/spirit/repository/doc/html/spirit_repository/preface.html | 4
   trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/nonterminal/subrule.html | 2
   trunk/libs/spirit/repository/doc/preface.qbk | 2
   trunk/libs/spirit/test/Jamfile | 3
   trunk/libs/spirit/test/karma/int1.cpp | 2
   trunk/libs/spirit/test/karma/int2.cpp | 2
   trunk/libs/spirit/test/karma/int3.cpp | 2
   trunk/libs/spirit/test/karma/real.hpp | 2
   trunk/libs/spirit/test/karma/real3.cpp | 27 ++++++++++++
   trunk/libs/spirit/test/karma/regression_numerics_adapt_adt.cpp | 53 ++++++++++++++++++++---
   37 files changed, 355 insertions(+), 199 deletions(-)

Modified: trunk/boost/spirit/home/karma/detail/extract_from.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/detail/extract_from.hpp (original)
+++ trunk/boost/spirit/home/karma/detail/extract_from.hpp 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -140,7 +140,7 @@
             typedef typename traits::container_iterator<Attribute const>::type
                 iterator_type;
 
- iterator_type it = boost::begin(attr);
+ iterator_type it = traits::begin(attr);
             type result = *it;
             ++it;
             return result;

Modified: trunk/boost/spirit/home/karma/numeric/bool.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/numeric/bool.hpp (original)
+++ trunk/boost/spirit/home/karma/numeric/bool.hpp 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -10,7 +10,7 @@
 #pragma once
 #endif
 
-#include <limits>
+#include <boost/limits.hpp>
 #include <boost/mpl/bool.hpp>
 #include <boost/utility/enable_if.hpp>
 

Modified: trunk/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp (original)
+++ trunk/boost/spirit/home/karma/numeric/detail/numeric_utils.hpp 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -12,7 +12,7 @@
 
 #include <boost/config.hpp>
 #include <boost/config/no_tr1/cmath.hpp>
-#include <limits>
+#include <boost/limits.hpp>
 
 #include <boost/type_traits/is_integral.hpp>
 #include <boost/spirit/home/support/char_class.hpp>
@@ -414,64 +414,46 @@
     // static int call(unsigned n);
     //
     ///////////////////////////////////////////////////////////////////////
- template <unsigned Radix, typename CharEncoding, typename Tag>
- struct convert_digit;
-
- // Binary
- template <typename CharEncoding, typename Tag>
- struct convert_digit<2, CharEncoding, Tag>
+ namespace detail
     {
- static int call(unsigned n)
+ template <typename CharEncoding, typename Tag, bool radix_less_than_10>
+ struct convert_digit
         {
- return n + '0';
- }
- };
+ static int call(unsigned n)
+ {
+ if (n <= 9)
+ return n + '0';
 
- // Octal
- template <typename CharEncoding, typename Tag>
- struct convert_digit<8, CharEncoding, Tag>
- {
- static int call(unsigned n)
- {
- return n + '0';
- }
- };
+ using spirit::char_class::convert;
+ return convert<CharEncoding>::to(Tag(), n - 10 + 'a');
+ }
+ };
 
- // Decimal
- template <typename CharEncoding, typename Tag>
- struct convert_digit<10, CharEncoding, Tag>
- {
- static int call(unsigned n)
+ template <>
+ struct convert_digit<unused_type, unused_type, false>
         {
- return n + '0';
- }
- };
-
- // Hexadecimal, lower case
- template <>
- struct convert_digit<16, unused_type, unused_type>
- {
- static int call(unsigned n)
- {
- if (n <= 9)
- return n + '0';
- return n - 10 + 'a';
- }
- };
+ static int call(unsigned n)
+ {
+ if (n <= 9)
+ return n + '0';
+ return n - 10 + 'a';
+ }
+ };
 
- // Hexadecimal, upper case
- template <typename CharEncoding, typename Tag>
- struct convert_digit<16, CharEncoding, Tag>
- {
- static int call(unsigned n)
+ template <typename CharEncoding, typename Tag>
+ struct convert_digit<CharEncoding, Tag, true>
         {
- if (n <= 9)
+ static int call(unsigned n)
+ {
                 return n + '0';
+ }
+ };
+ }
 
- using spirit::char_class::convert;
- return convert<CharEncoding>::to(Tag(), n - 10 + 'a');
- }
- };
+ template <unsigned Radix, typename CharEncoding, typename Tag>
+ struct convert_digit
+ : detail::convert_digit<CharEncoding, Tag, (Radix <= 10) ? true : false>
+ {};
 
     ///////////////////////////////////////////////////////////////////////
     template <unsigned Radix>

Modified: trunk/boost/spirit/home/karma/numeric/detail/real_utils.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/numeric/detail/real_utils.hpp (original)
+++ trunk/boost/spirit/home/karma/numeric/detail/real_utils.hpp 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -13,7 +13,7 @@
 #include <boost/config.hpp>
 #include <boost/config/no_tr1/cmath.hpp>
 #include <boost/detail/workaround.hpp>
-#include <limits>
+#include <boost/limits.hpp>
 
 #include <boost/spirit/home/support/char_class.hpp>
 #include <boost/spirit/home/support/unused.hpp>

Modified: trunk/boost/spirit/home/karma/numeric/int.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/numeric/int.hpp (original)
+++ trunk/boost/spirit/home/karma/numeric/int.hpp 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -10,7 +10,7 @@
 #pragma once
 #endif
 
-#include <limits>
+#include <boost/limits.hpp>
 #include <boost/config.hpp>
 #include <boost/mpl/bool.hpp>
 #include <boost/utility/enable_if.hpp>

Modified: trunk/boost/spirit/home/karma/numeric/uint.hpp
==============================================================================
--- trunk/boost/spirit/home/karma/numeric/uint.hpp (original)
+++ trunk/boost/spirit/home/karma/numeric/uint.hpp 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -10,7 +10,7 @@
 #pragma once
 #endif
 
-#include <limits>
+#include <boost/limits.hpp>
 #include <boost/config.hpp>
 #include <boost/mpl/bool.hpp>
 #include <boost/utility/enable_if.hpp>
@@ -254,8 +254,7 @@
 
         // check template Attribute 'Radix' for validity
         BOOST_SPIRIT_ASSERT_MSG(
- Radix == 2 || Radix == 8 || Radix == 10 || Radix == 16,
- not_supported_radix, ());
+ Radix >= 2 && Radix <= 36, not_supported_radix, ());
 
         BOOST_SPIRIT_ASSERT_MSG(
             // the following is a workaround for STLPort, where the simpler
@@ -320,8 +319,7 @@
 
         // check template Attribute 'Radix' for validity
         BOOST_SPIRIT_ASSERT_MSG(
- Radix == 2 || Radix == 8 || Radix == 10 || Radix == 16,
- not_supported_radix, ());
+ Radix >= 2 && Radix <= 36, not_supported_radix, ());
 
         BOOST_SPIRIT_ASSERT_MSG(
             // the following is a workaround for STLPort, where the simpler

Modified: trunk/boost/spirit/home/qi/numeric/detail/numeric_utils.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/numeric/detail/numeric_utils.hpp (original)
+++ trunk/boost/spirit/home/qi/numeric/detail/numeric_utils.hpp 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -28,8 +28,6 @@
 #include <boost/type_traits/is_signed.hpp>
 #include <boost/mpl/bool.hpp>
 #include <boost/mpl/and.hpp>
-
-#include <limits>
 #include <boost/limits.hpp>
 
 #if !defined(SPIRIT_NUMERICS_LOOP_UNROLL)

Modified: trunk/boost/spirit/home/qi/numeric/detail/real_impl.hpp
==============================================================================
--- trunk/boost/spirit/home/qi/numeric/detail/real_impl.hpp (original)
+++ trunk/boost/spirit/home/qi/numeric/detail/real_impl.hpp 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -14,7 +14,7 @@
 #endif
 
 #include <cmath>
-#include <limits>
+#include <boost/limits.hpp>
 #include <boost/type_traits/is_same.hpp>
 #include <boost/spirit/home/support/unused.hpp>
 #include <boost/spirit/home/qi/detail/attributes.hpp>

Modified: trunk/boost/spirit/home/support/adapt_adt_attributes.hpp
==============================================================================
--- trunk/boost/spirit/home/support/adapt_adt_attributes.hpp (original)
+++ trunk/boost/spirit/home/support/adapt_adt_attributes.hpp 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -21,6 +21,23 @@
 namespace boost { namespace spirit { namespace traits
 {
     ///////////////////////////////////////////////////////////////////////////
+ template <typename T, int N, bool Const, typename Domain>
+ struct not_is_variant<
+ fusion::extension::adt_attribute_proxy<T, N, Const>, Domain>
+ : not_is_variant<
+ typename fusion::extension::adt_attribute_proxy<T, N, Const>::type
+ , Domain>
+ {};
+
+ template <typename T, int N, bool Const, typename Domain>
+ struct not_is_optional<
+ fusion::extension::adt_attribute_proxy<T, N, Const>, Domain>
+ : not_is_optional<
+ typename fusion::extension::adt_attribute_proxy<T, N, Const>::type
+ , Domain>
+ {};
+
+ ///////////////////////////////////////////////////////////////////////////
     template <typename T, int N, bool Const>
     struct is_container<fusion::extension::adt_attribute_proxy<T, N, Const> >
       : is_container<
@@ -73,7 +90,8 @@
     };
 
     template <typename T, int N, bool Const>
- struct container_iterator<fusion::extension::adt_attribute_proxy<T, N, Const> >
+ struct container_iterator<
+ fusion::extension::adt_attribute_proxy<T, N, Const> >
       : container_iterator<
             typename remove_reference<
                 typename fusion::extension::adt_attribute_proxy<
@@ -171,6 +189,27 @@
         }
     };
 
+ template <typename T, int N, bool Const, typename Exposed>
+ struct extract_from_attribute<
+ fusion::extension::adt_attribute_proxy<T, N, Const>, Exposed>
+ {
+ typedef typename remove_const<
+ typename remove_reference<
+ typename fusion::extension::adt_attribute_proxy<T, N, Const>::type
+ >::type
+ >::type embedded_type;
+ typedef
+ typename spirit::result_of::extract_from<Exposed, embedded_type>::type
+ type;
+
+ template <typename Context>
+ static type
+ call(fusion::extension::adt_attribute_proxy<T, N, Const> const& val, Context& ctx)
+ {
+ return extract_from<Exposed>(val.get(), ctx);
+ }
+ };
+
     ///////////////////////////////////////////////////////////////////////////
     template <typename T, int N, bool Const>
     struct attribute_type<fusion::extension::adt_attribute_proxy<T, N, Const> >
@@ -178,6 +217,30 @@
     {};
 
     ///////////////////////////////////////////////////////////////////////////
+ template <typename T, int N, bool Const>
+ struct optional_attribute<
+ fusion::extension::adt_attribute_proxy<T, N, Const> >
+ {
+ typedef typename result_of::optional_value<
+ typename remove_reference<
+ typename fusion::extension::adt_attribute_proxy<T, N, Const>::type
+ >::type
+ >::type type;
+
+ static type
+ call(fusion::extension::adt_attribute_proxy<T, N, Const> const& val)
+ {
+ return optional_value(val.get());
+ }
+
+ static bool
+ is_valid(fusion::extension::adt_attribute_proxy<T, N, Const> const& val)
+ {
+ return has_optional_value(val.get());
+ }
+ };
+
+ ///////////////////////////////////////////////////////////////////////////
     template <typename T, int N, typename Attribute, typename Domain>
     struct transform_attribute<
         fusion::extension::adt_attribute_proxy<T, N, false>
@@ -251,6 +314,24 @@
         }
     };
 
+ template <typename T, int N, bool Const>
+ struct attribute_size<fusion::extension::adt_attribute_proxy<T, N, Const> >
+ {
+ typedef typename remove_const<
+ typename remove_reference<
+ typename fusion::extension::adt_attribute_proxy<T, N, Const>::type
+ >::type
+ >::type embedded_type;
+
+ typedef typename attribute_size<embedded_type>::type type;
+
+ static type
+ call(fusion::extension::adt_attribute_proxy<T, N, Const> const& val)
+ {
+ return attribute_size<embedded_type>::call(val.get());
+ }
+ };
+
     ///////////////////////////////////////////////////////////////////////////
     // customization point specializations for numeric generators
     template <typename T, int N, bool Const>

Modified: trunk/boost/spirit/home/support/attributes.hpp
==============================================================================
--- trunk/boost/spirit/home/support/attributes.hpp (original)
+++ trunk/boost/spirit/home/support/attributes.hpp 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -413,50 +413,63 @@
     ///////////////////////////////////////////////////////////////////////////
     // Retrieve the size of an attribute (runtime)
     ///////////////////////////////////////////////////////////////////////////
- template <typename Attribute, typename Enable/* = void*/>
- struct attribute_size
+ namespace detail
     {
- typedef std::size_t type;
-
- static type call(Attribute const&)
+ template <typename Attribute, typename Enable = void>
+ struct attribute_size_impl
         {
- return 1;
- }
- };
+ typedef std::size_t type;
 
- template <typename Attribute>
- struct attribute_size<Attribute
- , typename enable_if<
- mpl::and_<
- fusion::traits::is_sequence<Attribute>
- , mpl::not_<traits::is_container<Attribute> >
- >
- >::type
- > {
- typedef typename fusion::result_of::size<Attribute>::value_type type;
+ static type call(Attribute const&)
+ {
+ return 1;
+ }
+ };
 
- static type call(Attribute const& attr)
+ template <typename Attribute>
+ struct attribute_size_impl<Attribute
+ , typename enable_if<
+ mpl::and_<
+ fusion::traits::is_sequence<Attribute>
+ , mpl::not_<traits::is_container<Attribute> >
+ >
+ >::type>
         {
- return fusion::size(attr);
- }
- };
+ typedef typename fusion::result_of::size<Attribute>::value_type type;
 
- template <typename Attribute>
- struct attribute_size<Attribute
- , typename enable_if<
- mpl::and_<
- traits::is_container<Attribute>
- , mpl::not_<traits::is_iterator_range<Attribute> >
- >
- >::type
- > {
- typedef typename Attribute::size_type type;
+ static type call(Attribute const& attr)
+ {
+ return fusion::size(attr);
+ }
+ };
 
- static type call(Attribute const& attr)
+ template <typename Attribute>
+ struct attribute_size_impl<Attribute
+ , typename enable_if<
+ mpl::and_<
+ traits::is_container<Attribute>
+ , mpl::not_<traits::is_iterator_range<Attribute> >
+ >
+ >::type>
         {
- return attr.size();
- }
- };
+ typedef typename Attribute::size_type type;
+
+ static type call(Attribute const& attr)
+ {
+ return attr.size();
+ }
+ };
+ }
+
+ template <typename Attribute, typename Enable/* = void*/>
+ struct attribute_size
+ : detail::attribute_size_impl<Attribute>
+ {};
+
+ template <typename Attribute>
+ struct attribute_size<optional<Attribute> >
+ : attribute_size<Attribute>
+ {};
 
     template <typename Iterator>
     struct attribute_size<iterator_range<Iterator> >
@@ -483,7 +496,7 @@
 
     template <typename Attribute>
     typename attribute_size<Attribute>::type
- size(Attribute const& attr)
+ size (Attribute const& attr)
     {
         return attribute_size<Attribute>::call(attr);
     }

Modified: trunk/boost/spirit/home/support/container.hpp
==============================================================================
--- trunk/boost/spirit/home/support/container.hpp (original)
+++ trunk/boost/spirit/home/support/container.hpp 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -180,6 +180,16 @@
         typedef typename Container::const_iterator type;
     };
 
+ template <typename T>
+ struct container_iterator<optional<T> >
+ : container_iterator<T>
+ {};
+
+ template <typename T>
+ struct container_iterator<optional<T> const>
+ : container_iterator<T const>
+ {};
+
     template <typename Iterator>
     struct container_iterator<iterator_range<Iterator> >
     {

Modified: trunk/boost/spirit/home/support/detail/pow10.hpp
==============================================================================
--- trunk/boost/spirit/home/support/detail/pow10.hpp (original)
+++ trunk/boost/spirit/home/support/detail/pow10.hpp 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -14,7 +14,7 @@
 #endif
 
 #include <boost/config/no_tr1/cmath.hpp>
-#include <limits>
+#include <boost/limits.hpp>
 #include <boost/spirit/home/support/unused.hpp>
 #include <boost/spirit/home/support/numeric_traits.hpp>
 

Modified: trunk/libs/spirit/doc/html/index.html
==============================================================================
--- trunk/libs/spirit/doc/html/index.html (original)
+++ trunk/libs/spirit/doc/html/index.html 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -33,7 +33,7 @@
 </div></div>
 <div><p class="copyright">Copyright &#169; 2001-2011 Joel de Guzman, Hartmut Kaiser</p></div>
 <div><div class="legalnotice">
-<a name="id792159"></a><p>
+<a name="id868617"></a><p>
         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)
       </p>
@@ -294,7 +294,7 @@
   </p>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: April 16, 2011 at 21:51:21 GMT</small></p></td>
+<td align="left"><p><small>Last revised: April 18, 2011 at 01:05:36 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>

Modified: trunk/libs/spirit/doc/html/spirit/abstracts/parsing_expression_grammar.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/abstracts/parsing_expression_grammar.html (original)
+++ trunk/libs/spirit/doc/html/spirit/abstracts/parsing_expression_grammar.html 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -28,7 +28,7 @@
       Expression Grammar</a>
 </h3></div></div></div>
 <p>
- Parsing Expression Grammars (PEG) <sup>[<a name="id812329" href="#ftn.id812329" class="footnote">6</a>]</sup> are a derivative of Extended Backus-Naur Form (EBNF) <sup>[<a name="id812341" href="#ftn.id812341" class="footnote">7</a>]</sup> with a different interpretation, designed to represent a recursive
+ Parsing Expression Grammars (PEG) <sup>[<a name="id888954" href="#ftn.id888954" class="footnote">6</a>]</sup> are a derivative of Extended Backus-Naur Form (EBNF) <sup>[<a name="id888966" href="#ftn.id888966" class="footnote">7</a>]</sup> with a different interpretation, designed to represent a recursive
         descent parser. A PEG can be directly represented as a recursive-descent
         parser.
       </p>
@@ -189,11 +189,11 @@
 </table></div>
 <div class="footnotes">
 <br><hr width="100" align="left">
-<div class="footnote"><p><sup>[<a name="ftn.id812329" href="#id812329" class="para">6</a>] </sup>
+<div class="footnote"><p><sup>[<a name="ftn.id888954" href="#id888954" class="para">6</a>] </sup>
           Bryan Ford: Parsing Expression Grammars: A Recognition-Based Syntactic
           Foundation, http://pdos.csail.mit.edu/~baford/packrat/popl04/
         </p></div>
-<div class="footnote"><p><sup>[<a name="ftn.id812341" href="#id812341" class="para">7</a>] </sup>
+<div class="footnote"><p><sup>[<a name="ftn.id888966" href="#id888966" class="para">7</a>] </sup>
           Richard E. Pattis: EBNF: A Notation to Describe Syntax, http://www.cs.cmu.edu/~pattis/misc/ebnf.pdf
         </p></div>
 </div>

Modified: trunk/libs/spirit/doc/html/spirit/abstracts/syntax_diagram.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/abstracts/syntax_diagram.html (original)
+++ trunk/libs/spirit/doc/html/spirit/abstracts/syntax_diagram.html 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -28,9 +28,9 @@
 </h3></div></div></div>
 <p>
         In the next section, we will deal with Parsing Expression Grammars (PEG)
- <sup>[<a name="id811922" href="#ftn.id811922" class="footnote">3</a>]</sup>, a variant of Extended Backus-Naur Form (EBNF) <sup>[<a name="id811934" href="#ftn.id811934" class="footnote">4</a>]</sup> with a different interpretation. It is easier to understand PEG
+ <sup>[<a name="id888548" href="#ftn.id888548" class="footnote">3</a>]</sup>, a variant of Extended Backus-Naur Form (EBNF) <sup>[<a name="id888560" href="#ftn.id888560" class="footnote">4</a>]</sup> with a different interpretation. It is easier to understand PEG
         using Syntax Diagrams. Syntax diagrams represent a grammar graphically. It
- was used extensively by Niklaus Wirth <sup>[<a name="id811946" href="#ftn.id811946" class="footnote">5</a>]</sup> in the "Pascal User Manual". Syntax Diagrams are easily
+ was used extensively by Niklaus Wirth <sup>[<a name="id888572" href="#ftn.id888572" class="footnote">5</a>]</sup> in the "Pascal User Manual". Syntax Diagrams are easily
         understandable by programmers due to their similarity to flow charts. The
         isomorphism of the diagrams and functions make them ideal for representing
         Recursive Descent parsers which are essentially mutually recursive functions.
@@ -147,14 +147,14 @@
       </p>
 <div class="footnotes">
 <br><hr width="100" align="left">
-<div class="footnote"><p><sup>[<a name="ftn.id811922" href="#id811922" class="para">3</a>] </sup>
+<div class="footnote"><p><sup>[<a name="ftn.id888548" href="#id888548" class="para">3</a>] </sup>
           Bryan Ford: Parsing Expression Grammars: A Recognition-Based Syntactic
           Foundation, http://pdos.csail.mit.edu/~baford/packrat/popl04/
         </p></div>
-<div class="footnote"><p><sup>[<a name="ftn.id811934" href="#id811934" class="para">4</a>] </sup>
+<div class="footnote"><p><sup>[<a name="ftn.id888560" href="#id888560" class="para">4</a>] </sup>
           Richard E. Pattis: EBNF: A Notation to Describe Syntax, http://www.cs.cmu.edu/~pattis/misc/ebnf.pdf
         </p></div>
-<div class="footnote"><p><sup>[<a name="ftn.id811946" href="#id811946" class="para">5</a>] </sup>
+<div class="footnote"><p><sup>[<a name="ftn.id888572" href="#id888572" class="para">5</a>] </sup>
           Niklaus Wirth: The Programming Language Pascal. (July 1973)
         </p></div>
 </div>

Modified: trunk/libs/spirit/doc/html/spirit/introduction.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/introduction.html (original)
+++ trunk/libs/spirit/doc/html/spirit/introduction.html 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -29,7 +29,7 @@
 <p>
       Boost Spirit is an object-oriented, recursive-descent parser and output generation
       library for C++. It allows you to write grammars and format descriptions using
- a format similar to Extended Backus Naur Form (EBNF)<sup>[<a name="id806959" href="#ftn.id806959" class="footnote">2</a>]</sup> directly in C++. These inline grammar specifications can mix freely
+ a format similar to Extended Backus Naur Form (EBNF)<sup>[<a name="id883447" href="#ftn.id883447" class="footnote">2</a>]</sup> directly in C++. These inline grammar specifications can mix freely
       with other C++ code and, thanks to the generative power of C++ templates, are
       immediately executable. In retrospect, conventional compiler-compilers or parser-generators
       have to perform an additional translation step from the source EBNF code to
@@ -453,7 +453,7 @@
 </div>
 <br class="table-break"><div class="footnotes">
 <br><hr width="100" align="left">
-<div class="footnote"><p><sup>[<a name="ftn.id806959" href="#id806959" class="para">2</a>] </sup>
+<div class="footnote"><p><sup>[<a name="ftn.id883447" href="#id883447" class="para">2</a>] </sup>
         <a href="http://www.cl.cam.ac.uk/%7Emgk25/iso-14977.pdf" target="_top">ISO-EBNF</a>
       </p></div>
 </div>

Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/signed_int.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/signed_int.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/signed_int.html 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -199,7 +199,7 @@
                   </td>
 <td>
                     <p>
- 10
+ <code class="computeroutput"><span class="number">10</span></code>
                     </p>
                   </td>
 </tr>
@@ -297,9 +297,10 @@
 <td>
                     <p>
                       Generate the integer literal <code class="computeroutput"><span class="identifier">num</span></code>
- using the default formatting (radix is 10, sign is only printed
- for negative literals). This generator never fails (unless
- the underlying output stream reports an error).
+ using the default formatting (radix is <code class="computeroutput"><span class="number">10</span></code>,
+ sign is only printed for negative literals). This generator
+ never fails (unless the underlying output stream reports an
+ error).
                     </p>
                   </td>
 </tr>
@@ -318,9 +319,10 @@
 <td>
                     <p>
                       Generate the integer provided by a mandatory attribute using
- the default formatting (radix is 10, sign is only printed for
- negative literals). This generator never fails (unless the
- underlying output stream reports an error).
+ the default formatting (radix is <code class="computeroutput"><span class="number">10</span></code>,
+ sign is only printed for negative literals). This generator
+ never fails (unless the underlying output stream reports an
+ error).
                     </p>
                   </td>
 </tr>
@@ -340,11 +342,12 @@
                     <p>
                       Generate the integer provided by the immediate literal value
                       the generator is initialized from using the default formatting
- (radix is 10, sign is only printed for negative literals).
- If this generator has an associated attribute it succeeds only
- if the attribute is equal to the immediate literal (unless
- the underlying output stream reports an error). Otherwise this
- generator fails and does not generate any output.
+ (radix is <code class="computeroutput"><span class="number">10</span></code>, sign
+ is only printed for negative literals). If this generator has
+ an associated attribute it succeeds only if the attribute is
+ equal to the immediate literal (unless the underlying output
+ stream reports an error). Otherwise this generator fails and
+ does not generate any output.
                     </p>
                   </td>
 </tr>

Modified: trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/unsigned_int.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/unsigned_int.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/reference/numeric/unsigned_int.html 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -207,13 +207,13 @@
                   </td>
 <td>
                     <p>
- The radix base. This can be either 2: binary, 8: octal, 10:
- decimal and 16: hexadecimal.
+ The radix base. This can be any value in the (inclusive) range
+ from <code class="computeroutput"><span class="number">2</span></code> .. <code class="computeroutput"><span class="number">36</span></code>.
                     </p>
                   </td>
 <td>
                     <p>
- 10
+ <code class="computeroutput"><span class="number">10</span></code>
                     </p>
                   </td>
 </tr>
@@ -245,9 +245,7 @@
 <dt><span class="term"><code class="computeroutput"><span class="identifier">Radix</span></code></span></dt>
 <dd><p>
                   An integer literal specifying the required radix for the output
- conversion. Valid values are <code class="computeroutput"><span class="number">2</span></code>,
- <code class="computeroutput"><span class="number">8</span></code>, <code class="computeroutput"><span class="number">10</span></code>,
- and <code class="computeroutput"><span class="number">16</span></code>.
+ conversion. Valid values are from the (inclusive) range <code class="computeroutput"><span class="number">2</span></code> .. <code class="computeroutput"><span class="number">36</span></code>.
                 </p></dd>
 </dl>
 </div>
@@ -287,9 +285,9 @@
 <td>
                     <p>
                       Generate the unsigned integer literal <code class="computeroutput"><span class="identifier">num</span></code>
- using the default formatting (radix is 10). This generator
- never fails (unless the underlying output stream reports an
- error).
+ using the default formatting (radix is <code class="computeroutput"><span class="number">10</span></code>).
+ This generator never fails (unless the underlying output stream
+ reports an error).
                     </p>
                   </td>
 </tr>
@@ -308,9 +306,9 @@
 <td>
                     <p>
                       Generate the unsigned integer provided by a mandatory attribute
- using the default formatting (radix is 10). This generator
- never fails (unless the underlying output stream reports an
- error).
+ using the default formatting (radix is <code class="computeroutput"><span class="number">10</span></code>).
+ This generator never fails (unless the underlying output stream
+ reports an error).
                     </p>
                   </td>
 </tr>
@@ -330,10 +328,11 @@
                     <p>
                       Generate the unsigned integer provided by the immediate literal
                       value the generator is initialized from using the default formatting
- (radix is 10). If this generator has an associated attribute
- it succeeds only if the attribute is equal to the immediate
- literal (unless the underlying output stream reports an error).
- Otherwise this generator fails and does not generate any output.
+ (radix is <code class="computeroutput"><span class="number">10</span></code>).
+ If this generator has an associated attribute it succeeds only
+ if the attribute is equal to the immediate literal (unless
+ the underlying output stream reports an error). Otherwise this
+ generator fails and does not generate any output.
                     </p>
                   </td>
 </tr>
@@ -351,9 +350,9 @@
 <td>
                     <p>
                       Generate the unsigned integer provided by a mandatory attribute
- using the default formatting and the corresponding radix (<code class="computeroutput"><span class="identifier">bin</span></code>: radix is 2, <code class="computeroutput"><span class="identifier">oct</span></code>: radix is 8, <code class="computeroutput"><span class="identifier">hex</span></code>: radix is 16). This generator
- never fails (unless the underlying output stream reports an
- error).
+ using the default formatting and the corresponding radix (<code class="computeroutput"><span class="identifier">bin</span></code>: radix is <code class="computeroutput"><span class="number">2</span></code>, <code class="computeroutput"><span class="identifier">oct</span></code>:
+ radix is <code class="computeroutput"><span class="number">8</span></code>, <code class="computeroutput"><span class="identifier">hex</span></code>: radix is <code class="computeroutput"><span class="number">16</span></code>). This generator never fails
+ (unless the underlying output stream reports an error).
                     </p>
                   </td>
 </tr>
@@ -373,12 +372,12 @@
                       Generate the unsigned integer provided by the immediate literal
                       value the generator is initialized from using the default formatting
                       and the corresponding radix (<code class="computeroutput"><span class="identifier">bin</span></code>:
- radix is 2, <code class="computeroutput"><span class="identifier">oct</span></code>:
- radix is 8, <code class="computeroutput"><span class="identifier">hex</span></code>:
- radix is 16). If this generator has an associated attribute
- it succeeds only if the attribute is equal to the immediate
- literal (unless the underlying output stream reports an error).
- Otherwise this generator fails and does not generate any output.
+ radix is <code class="computeroutput"><span class="number">2</span></code>, <code class="computeroutput"><span class="identifier">oct</span></code>: radix is <code class="computeroutput"><span class="number">8</span></code>, <code class="computeroutput"><span class="identifier">hex</span></code>:
+ radix is <code class="computeroutput"><span class="number">16</span></code>). If
+ this generator has an associated attribute it succeeds only
+ if the attribute is equal to the immediate literal (unless
+ the underlying output stream reports an error). Otherwise this
+ generator fails and does not generate any output.
                     </p>
                   </td>
 </tr>
@@ -423,9 +422,9 @@
 <td>
                     <p>
                       Generate the unsigned integer of type <code class="computeroutput"><span class="identifier">Num</span></code>
- provided by a mandatory attribute using the specified <code class="computeroutput"><span class="identifier">Radix</span></code> (possible values are
- <code class="computeroutput"><span class="number">2</span></code>, <code class="computeroutput"><span class="number">8</span></code>, <code class="computeroutput"><span class="number">10</span></code>,
- and <code class="computeroutput"><span class="number">16</span></code>, the default
+ provided by a mandatory attribute using the specified <code class="computeroutput"><span class="identifier">Radix</span></code> (allowed values are
+ from the (inclusive) range from <code class="computeroutput"><span class="number">2</span></code>
+ .. <code class="computeroutput"><span class="number">36</span></code>, the default
                       value is <code class="computeroutput"><span class="number">10</span></code>).This
                       generator never fails (unless the underlying output stream
                       reports an error).
@@ -448,8 +447,7 @@
                       Generate the unsigned integer of type <code class="computeroutput"><span class="identifier">Num</span></code>
                       provided by the immediate literal value the generator is initialized
                       from, using the specified <code class="computeroutput"><span class="identifier">Radix</span></code>
- (possible values are <code class="computeroutput"><span class="number">2</span></code>,
- <code class="computeroutput"><span class="number">8</span></code>, <code class="computeroutput"><span class="number">10</span></code>, and <code class="computeroutput"><span class="number">16</span></code>,
+ (allowed values are from the (inclusive) range from <code class="computeroutput"><span class="number">2</span></code> .. <code class="computeroutput"><span class="number">36</span></code>,
                       the default value is <code class="computeroutput"><span class="number">10</span></code>).
                       If this generator has an associated attribute it succeeds only
                       if the attribute is equal to the immediate literal (unless

Modified: trunk/libs/spirit/doc/html/spirit/karma/s05.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/karma/s05.html (original)
+++ trunk/libs/spirit/doc/html/spirit/karma/s05.html 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -24,7 +24,7 @@
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="id1168073"></a>Karma Index</h3></div></div></div>
+<a name="id1244598"></a>Karma Index</h3></div></div></div>
 <p><a class="link" href="s05.html#idx_id_23">A</a> <a class="link" href="s05.html#idx_id_24">B</a> <a class="link" href="s05.html#idx_id_25">C</a> <a class="link" href="s05.html#idx_id_26">D</a> <a class="link" href="s05.html#idx_id_27">E</a> <a class="link" href="s05.html#idx_id_28">F</a> <a class="link" href="s05.html#idx_id_29">G</a> <a class="link" href="s05.html#idx_id_30">H</a> <a class="link" href="s05.html#idx_id_31">I</a> <a class="link" href="s05.html#idx_id_32">K</a> <a class="link" href="s05.html#idx_id_33">L</a> <a class="link" href="s05.html#idx_id_34">M</a> <a class="link" href="s05.html#idx_id_35">N</a> <a class="link" href="s05.html#idx_id_36">O</a> <a class="link" href="s05.html#idx_id_37">P</a> <a class="link" href="s05.html#idx_id_38">Q</a> <a class="link" href="s05.html#idx_id_39">R</a> <a class="link" href="s05.html#idx_id_40">S</a> <a class="link" href="s05.html#idx_id_41">T</a> <a class="link" href="s05.html#idx_id_42">U</a> <a class="link" href="s05.html#idx_id_43">V</a> <a class="l
ink" href="s05.html#idx_id_44">W</a> <a class="link" href="s05.html#idx_id_45">X</a> <a class="link" href="s05.html#idx_id_46">_</a> </p>
 <div class="variablelist"><dl>
 <dt>

Modified: trunk/libs/spirit/doc/html/spirit/preface.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/preface.html (original)
+++ trunk/libs/spirit/doc/html/spirit/preface.html 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -162,7 +162,7 @@
     </h4>
 <p>
       Just before the development of Spirit V2 began, Hartmut came across the StringTemplate library that is
- a part of the ANTLR parser framework. <sup>[<a name="id792426" href="#ftn.id792426" class="footnote">1</a>]</sup> The concepts presented in that library lead Hartmut to the next
+ a part of the ANTLR parser framework. <sup>[<a name="id868885" href="#ftn.id868885" class="footnote">1</a>]</sup> The concepts presented in that library lead Hartmut to the next
       step in the evolution of Spirit. Parsing and generation are tightly connected
       to a formal notation, or a grammar. The grammar describes both input and output,
       and therefore, a parser library should have a grammar driven output. This duality
@@ -353,7 +353,7 @@
     </p>
 <div class="footnotes">
 <br><hr width="100" align="left">
-<div class="footnote"><p><sup>[<a name="ftn.id792426" href="#id792426" class="para">1</a>] </sup>
+<div class="footnote"><p><sup>[<a name="ftn.id868885" href="#id868885" class="para">1</a>] </sup>
         Quote from http:<span class="emphasis"><em>/www.stringtemplate.org</em></span>: It is a Java
         template engine (with ports for C# and Python) for generating source code,
         web pages, emails, or any other formatted text output.

Modified: trunk/libs/spirit/doc/html/spirit/qi/reference/operator/difference.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/qi/reference/operator/difference.html (original)
+++ trunk/libs/spirit/doc/html/spirit/qi/reference/operator/difference.html 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -36,7 +36,7 @@
             The difference operator, <code class="computeroutput"><span class="identifier">a</span>
             <span class="special">-</span> <span class="identifier">b</span></code>,
             is a binary operator that matches the first (LHS) operand but not the
- second (RHS). <sup>[<a name="id963540" href="#ftn.id963540" class="footnote">8</a>]</sup>
+ second (RHS). <sup>[<a name="id1040029" href="#ftn.id1040029" class="footnote">8</a>]</sup>
           </p>
 <a name="spirit.qi.reference.operator.difference.header"></a><h6>
 <a name="spirit.qi.reference.operator.difference.header-heading"></a>
@@ -192,7 +192,7 @@
           </p>
 <div class="footnotes">
 <br><hr width="100" align="left">
-<div class="footnote"><p><sup>[<a name="ftn.id963540" href="#id963540" class="para">8</a>] </sup>
+<div class="footnote"><p><sup>[<a name="ftn.id1040029" href="#id1040029" class="para">8</a>] </sup>
               Unlike classic Spirit, with Spirit2, the expression will always fail
               if the RHS is a successful match regardless if the RHS matches less
               characters. For example, the rule <code class="computeroutput"><span class="identifier">lit</span><span class="special">(</span><span class="string">"policeman"</span><span class="special">)</span> <span class="special">-</span> <span class="string">"police"</span></code> will always fail to

Modified: trunk/libs/spirit/doc/html/spirit/qi/reference/operator/optional.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/qi/reference/operator/optional.html (original)
+++ trunk/libs/spirit/doc/html/spirit/qi/reference/operator/optional.html 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -180,7 +180,7 @@
 <p>
           </p>
 <p>
- Parse a person info with name (in quotes) optional age <sup>[<a name="id970997" href="#ftn.id970997" class="footnote">9</a>]</sup> and optional sex, all separated by comma.
+ Parse a person info with name (in quotes) optional age <sup>[<a name="id1047485" href="#ftn.id1047485" class="footnote">9</a>]</sup> and optional sex, all separated by comma.
           </p>
 <p>
             
@@ -206,7 +206,7 @@
           </p>
 <div class="footnotes">
 <br><hr width="100" align="left">
-<div class="footnote"><p><sup>[<a name="ftn.id970997" href="#id970997" class="para">9</a>] </sup>
+<div class="footnote"><p><sup>[<a name="ftn.id1047485" href="#id1047485" class="para">9</a>] </sup>
               James Bond is shy about his age :-)
             </p></div>
 </div>

Modified: trunk/libs/spirit/doc/html/spirit/qi/s04.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/qi/s04.html (original)
+++ trunk/libs/spirit/doc/html/spirit/qi/s04.html 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -24,7 +24,7 @@
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h3 class="title">
-<a name="id991385"></a>Qi Index</h3></div></div></div>
+<a name="id1067873"></a>Qi Index</h3></div></div></div>
 <p><a class="link" href="s04.html#idx_id_0">A</a> <a class="link" href="s04.html#idx_id_1">B</a> <a class="link" href="s04.html#idx_id_2">C</a> <a class="link" href="s04.html#idx_id_3">D</a> <a class="link" href="s04.html#idx_id_4">E</a> <a class="link" href="s04.html#idx_id_5">F</a> <a class="link" href="s04.html#idx_id_6">G</a> <a class="link" href="s04.html#idx_id_7">H</a> <a class="link" href="s04.html#idx_id_8">I</a> <a class="link" href="s04.html#idx_id_9">K</a> <a class="link" href="s04.html#idx_id_10">L</a> <a class="link" href="s04.html#idx_id_11">M</a> <a class="link" href="s04.html#idx_id_12">N</a> <a class="link" href="s04.html#idx_id_13">O</a> <a class="link" href="s04.html#idx_id_14">P</a> <a class="link" href="s04.html#idx_id_15">Q</a> <a class="link" href="s04.html#idx_id_16">R</a> <a class="link" href="s04.html#idx_id_17">S</a> <a class="link" href="s04.html#idx_id_18">T</a> <a class="link" href="s04.html#idx_id_19">U</a> <a class="link" href="s04.html#idx_id_20">W</a> <a class="link" href=
"s04.html#idx_id_21">X</a> <a class="link" href="s04.html#idx_id_22">_</a> </p>
 <div class="variablelist"><dl>
 <dt>

Modified: trunk/libs/spirit/doc/html/spirit/what_s_new/spirit_2_5.html
==============================================================================
--- trunk/libs/spirit/doc/html/spirit/what_s_new/spirit_2_5.html (original)
+++ trunk/libs/spirit/doc/html/spirit/what_s_new/spirit_2_5.html 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -93,6 +93,11 @@
             placeholder allowing to use it everywhere, not only in semantic actions
             attached to the right hand sides of a rule.
           </li>
+<li class="listitem">
+ Added support for <span class="emphasis"><em>Spirit.Karma</em></span> <a class="link" href="../karma/reference/numeric/unsigned_int.html" title="Unsigned Integer Number Generators (uint_, etc.)">unsigned
+ numeric generators</a> with arbitrary radix values in the (inclusive)
+ range from <code class="computeroutput"><span class="number">2</span></code> .. <code class="computeroutput"><span class="number">36</span></code>.
+ </li>
 </ul></div>
 <a name="spirit.what_s_new.spirit_2_5.bug_fixes_in_qi_or_karma"></a><h5>
 <a name="spirit.what_s_new.spirit_2_5.bug_fixes_in_qi_or_karma-heading"></a>

Modified: trunk/libs/spirit/doc/karma/numeric.qbk
==============================================================================
--- trunk/libs/spirit/doc/karma/numeric.qbk (original)
+++ trunk/libs/spirit/doc/karma/numeric.qbk 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -90,8 +90,7 @@
     [[`Num`] [The numeric base type of the
                      numeric generator.] [`unsigned int`]]
     [[`Radix`] [The radix base. This can be
- either 2: binary, 8: octal,
- 10: decimal and 16: hexadecimal.] [10]]
+ any value in the (inclusive) range from `2` .. `36`.] [`10`]]
 ]
 
 [heading Model of]
@@ -105,8 +104,8 @@
     [[`Num`] [Type of `num`: any unsigned integer type, or in case
                          of a __karma_lazy_argument__, its return value]]
     [[`Radix`] [An integer literal specifying the required radix for
- the output conversion. Valid values are `2`, `8`, `10`,
- and `16`.]]
+ the output conversion. Valid values are from the
+ (inclusive) range `2` .. `36`.]]
 ]
 
 [heading Expression Semantics]
@@ -117,7 +116,7 @@
 [table
     [[Expression] [Semantics]]
     [[`lit(num)`] [Generate the unsigned integer literal `num` using the
- default formatting (radix is 10). This generator never
+ default formatting (radix is `10`). This generator never
                          fails (unless the underlying output stream reports
                          an error).]]
     [
@@ -125,7 +124,7 @@
 uint_
 ulong_
 ulong_long``] [Generate the unsigned integer provided by a mandatory
- attribute using the default formatting (radix is 10).
+ attribute using the default formatting (radix is `10`).
                          This generator never fails (unless the underlying
                          output stream reports an error).]]
     [
@@ -134,7 +133,7 @@
 ulong_(num)
 ulong_long(num)``] [Generate the unsigned integer provided by the
                          immediate literal value the generator is initialized
- from using the default formatting (radix is 10). If
+ from using the default formatting (radix is `10`). If
                          this generator has an associated attribute it succeeds
                          only if the attribute is equal to the
                          immediate literal (unless the underlying output
@@ -145,8 +144,8 @@
 oct
 hex``] [Generate the unsigned integer provided by a mandatory
                          attribute using the default formatting and the
- corresponding radix (`bin`: radix is 2, `oct`: radix is 8,
- `hex`: radix is 16). This generator never fails (unless
+ corresponding radix (`bin`: radix is `2`, `oct`: radix is `8`,
+ `hex`: radix is `16`). This generator never fails (unless
                          the underlying output stream reports an error).]]
     [
 [``bin(num)
@@ -154,8 +153,8 @@
 hex(num)``] [Generate the unsigned integer provided by the
                          immediate literal value the generator is initialized
                          from using the default formatting and the
- corresponding radix (`bin`: radix is 2, `oct`:
- radix is 8, `hex`: radix is 16). If
+ corresponding radix (`bin`: radix is `2`, `oct`:
+ radix is `8`, `hex`: radix is `16`). If
                          this generator has an associated attribute it succeeds
                          only if the attribute is equal to the
                          immediate literal (unless the underlying output
@@ -177,7 +176,8 @@
>()``]
                         [Generate the unsigned integer of type `Num` provided
                          by a mandatory attribute using the specified `Radix`
- (possible values are `2`, `8`, `10`, and `16`, the
+ (allowed values are from the (inclusive) range from
+ `2` .. `36`, the
                          default value is `10`).This generator never fails
                          (unless the underlying output stream reports an
                          error).]]
@@ -188,7 +188,8 @@
                         [Generate the unsigned integer of type `Num` provided
                          by the immediate literal value the generator is
                          initialized from, using the specified `Radix`
- (possible values are `2`, `8`, `10`, and `16`, the
+ (allowed values are from the (inclusive) range from
+ `2` .. `36`, the
                          default value is `10`). If this generator has an
                          associated attribute it succeeds only if the
                          attribute is equal to the immediate literal (unless
@@ -367,7 +368,7 @@
                      numeric parser.] [`int`]]
     [[`Radix`] [The radix base. This can be
                      either 2: binary, 8: octal,
- 10: decimal and 16: hexadecimal.] [10]]
+ 10: decimal and 16: hexadecimal.] [`10`]]
     [[`force_sign`] [If `true`, all numbers will
                      have a sign (space for zero)] [`false`]]
 ]
@@ -398,7 +399,7 @@
 [table
     [[Expression] [Semantics]]
     [[`lit(num)`] [Generate the integer literal `num` using the default
- formatting (radix is 10, sign is only printed for
+ formatting (radix is `10`, sign is only printed for
                          negative literals). This generator never fails (unless
                          the underlying output stream reports an error).]]
     [
@@ -406,7 +407,7 @@
 int_
 long_
 long_long``] [Generate the integer provided by a mandatory attribute
- using the default formatting (radix is 10, sign is
+ using the default formatting (radix is `10`, sign is
                          only printed for negative literals). This generator
                          never fails (unless the underlying output stream
                          reports an error).]]
@@ -416,7 +417,7 @@
 long_(num)
 long_long(num)``] [Generate the integer provided by the immediate literal
                          value the generator is initialized from using the
- default formatting (radix is 10, sign is only printed
+ default formatting (radix is `10`, sign is only printed
                          for negative literals). If this generator has an
                          associated attribute it succeeds only if the
                          attribute is equal to the immediate literal (unless

Modified: trunk/libs/spirit/doc/what_s_new.qbk
==============================================================================
--- trunk/libs/spirit/doc/what_s_new.qbk (original)
+++ trunk/libs/spirit/doc/what_s_new.qbk 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -55,6 +55,8 @@
   This change unifies the handling of the `_val` placeholder allowing to use it
   everywhere, not only in semantic actions attached to the right hand sides of
   a rule.
+* Added support for __karma__ [unsigned_int unsigned numeric generators] with
+ arbitrary radix values in the (inclusive) range from `2` .. `36`.
 
 [heading Bug Fixes in Qi or Karma]
 

Modified: trunk/libs/spirit/repository/doc/html/index.html
==============================================================================
--- trunk/libs/spirit/repository/doc/html/index.html (original)
+++ trunk/libs/spirit/repository/doc/html/index.html 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -33,7 +33,7 @@
 </div></div>
 <div><p class="copyright">Copyright &#169; 2001-2011 Joel de Guzman, Hartmut Kaiser</p></div>
 <div><div class="legalnotice">
-<a name="id820812"></a><p>
+<a name="id788044"></a><p>
         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)
       </p>
@@ -90,7 +90,7 @@
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: April 15, 2011 at 23:36:10 GMT</small></p></td>
+<td align="left"><p><small>Last revised: April 16, 2011 at 22:12:58 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>

Modified: trunk/libs/spirit/repository/doc/html/spirit_repository/preface.html
==============================================================================
--- trunk/libs/spirit/repository/doc/html/spirit_repository/preface.html (original)
+++ trunk/libs/spirit/repository/doc/html/spirit_repository/preface.html 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -72,7 +72,7 @@
       General List</a> ensure the targeted high quality standards.
     </p>
 <p>
- Based on the user feedback and general usability of things it it possible over
+ Based on the user feedback and general usability of things it is possible over
       time to move repository components/grammars into the <span class="emphasis"><em>Spirit</em></span>
       core library.
     </p>
@@ -86,7 +86,7 @@
       icons precede some text to indicate:
     </p>
 <div class="table">
-<a name="id820945"></a><p class="title"><b>Table&#160;1.&#160;Icons</b></p>
+<a name="id788177"></a><p class="title"><b>Table&#160;1.&#160;Icons</b></p>
 <div class="table-contents"><table class="table" summary="Icons">
 <colgroup>
 <col>

Modified: trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/nonterminal/subrule.html
==============================================================================
--- trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/nonterminal/subrule.html (original)
+++ trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/nonterminal/subrule.html 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -514,7 +514,7 @@
           examples to subrules, with various compilers.
         </p>
 <div class="table">
-<a name="id840665"></a><p class="title"><b>Table&#160;2.&#160;Subrules performance</b></p>
+<a name="id807897"></a><p class="title"><b>Table&#160;2.&#160;Subrules performance</b></p>
 <div class="table-contents"><table class="table" summary="Subrules performance">
 <colgroup>
 <col>

Modified: trunk/libs/spirit/repository/doc/preface.qbk
==============================================================================
--- trunk/libs/spirit/repository/doc/preface.qbk (original)
+++ trunk/libs/spirit/repository/doc/preface.qbk 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -43,7 +43,7 @@
 contributions on the __spirit_list__ ensure the targeted high quality
 standards.
 
-Based on the user feedback and general usability of things it it possible over
+Based on the user feedback and general usability of things it is possible over
 time to move repository components/grammars into the /Spirit/ core library.
 
 [heading How to use this manual]

Modified: trunk/libs/spirit/test/Jamfile
==============================================================================
--- trunk/libs/spirit/test/Jamfile (original)
+++ trunk/libs/spirit/test/Jamfile 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -110,7 +110,6 @@
      [ run qi/pass_container2.cpp : : : : qi_pass_container2 ]
      [ run qi/permutation.cpp : : : : qi_permutation ]
      [ run qi/plus.cpp : : : : qi_plus ]
- [ run qi/uint_radix.cpp : : : : qi_uint_radix ]
      [ run qi/range_run.cpp : : : : qi_range_run ]
      [ run qi/raw.cpp : : : : qi_raw ]
      [ run qi/real1.cpp : : : : qi_real1 ]
@@ -134,6 +133,7 @@
      [ run qi/uint1.cpp : : : : qi_uint1 ]
      [ run qi/uint2.cpp : : : : qi_uint2 ]
      [ run qi/uint3.cpp : : : : qi_uint3 ]
+ [ run qi/uint_radix.cpp : : : : qi_uint_radix ]
      [ run qi/utree1.cpp : : : : qi_utree1 ]
      [ run qi/utree2.cpp : : : : qi_utree2 ]
      [ run qi/utree3.cpp : : : : qi_utree3 ]
@@ -228,6 +228,7 @@
      [ run karma/symbols2.cpp : : : : karma_symbols2 ]
      [ run karma/symbols3.cpp : : : : karma_symbols3 ]
      [ run karma/tricky_alignment.cpp : : : : karma_tricky_alignment ]
+ [ run karma/uint_radix.cpp : : : : karma_uint_radix ]
      [ run karma/utree1.cpp : : : : karma_utree1 ]
      [ run karma/utree2.cpp : : : : karma_utree2 ]
      [ run karma/utree3.cpp : : : : karma_utree3 ]

Modified: trunk/libs/spirit/test/karma/int1.cpp
==============================================================================
--- trunk/libs/spirit/test/karma/int1.cpp (original)
+++ trunk/libs/spirit/test/karma/int1.cpp 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -23,7 +23,7 @@
 #include <boost/spirit/include/karma_action.hpp>
 #include <boost/spirit/include/karma_phoenix_attributes.hpp>
 
-#include <limits>
+#include <boost/limits.hpp>
 #include "test.hpp"
 
 using namespace spirit_test;

Modified: trunk/libs/spirit/test/karma/int2.cpp
==============================================================================
--- trunk/libs/spirit/test/karma/int2.cpp (original)
+++ trunk/libs/spirit/test/karma/int2.cpp 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -24,7 +24,7 @@
 #include <boost/spirit/include/karma_rule.hpp>
 #include <boost/spirit/include/karma_phoenix_attributes.hpp>
 
-#include <limits>
+#include <boost/limits.hpp>
 #include "test.hpp"
 
 using namespace spirit_test;

Modified: trunk/libs/spirit/test/karma/int3.cpp
==============================================================================
--- trunk/libs/spirit/test/karma/int3.cpp (original)
+++ trunk/libs/spirit/test/karma/int3.cpp 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -23,7 +23,7 @@
 #include <boost/spirit/include/karma_action.hpp>
 #include <boost/spirit/include/karma_phoenix_attributes.hpp>
 
-#include <limits>
+#include <boost/limits.hpp>
 #include "test.hpp"
 
 using namespace spirit_test;

Modified: trunk/libs/spirit/test/karma/real.hpp
==============================================================================
--- trunk/libs/spirit/test/karma/real.hpp (original)
+++ trunk/libs/spirit/test/karma/real.hpp 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -24,7 +24,7 @@
 #include <boost/spirit/include/phoenix_operator.hpp>
 #include <boost/spirit/include/phoenix_statement.hpp>
 
-#include <limits>
+#include <boost/limits.hpp>
 #include "test.hpp"
 
 using namespace spirit_test;

Modified: trunk/libs/spirit/test/karma/real3.cpp
==============================================================================
--- trunk/libs/spirit/test/karma/real3.cpp (original)
+++ trunk/libs/spirit/test/karma/real3.cpp 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -6,9 +6,36 @@
 
 //#define KARMA_FAIL_COMPILATION
 
+#include <boost/spirit/include/version.hpp>
 #include "real.hpp"
 
 ///////////////////////////////////////////////////////////////////////////////
+// the customization points below have been added only recently
+#if SPIRIT_VERSION >= 0x2050
+// does not provide proper std::numeric_limits, we need to roll our own
+namespace boost { namespace spirit { namespace traits
+{
+ template <>
+ struct is_nan<boost::math::concepts::real_concept>
+ {
+ static bool call(boost::math::concepts::real_concept n)
+ {
+ return test_nan(n.value());
+ }
+ };
+
+ template <>
+ struct is_infinite<boost::math::concepts::real_concept>
+ {
+ static bool call(boost::math::concepts::real_concept n)
+ {
+ return test_infinite(n.value());
+ }
+ };
+}}}
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
 int main()
 {
     using namespace boost::spirit;

Modified: trunk/libs/spirit/test/karma/regression_numerics_adapt_adt.cpp
==============================================================================
--- trunk/libs/spirit/test/karma/regression_numerics_adapt_adt.cpp (original)
+++ trunk/libs/spirit/test/karma/regression_numerics_adapt_adt.cpp 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -4,6 +4,7 @@
 // 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)
 
+#include <boost/mpl/print.hpp>
 #include <boost/config/warning_disable.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
@@ -30,17 +31,17 @@
       : width_(width), height_(height)
     {}
 
- int width() const { return width_;}
- int height() const { return height_;}
+ int const& width() const { return width_;}
+ int const& height() const { return height_;}
 
- void set_width(int width) { width_=width;}
- void set_height(int height) { height_=height;}
+ void set_width(int width) { width_ = width;}
+ void set_height(int height) { height_ = height;}
 };
 
 BOOST_FUSION_ADAPT_ADT(
     data1,
- (int, int, obj.width(), obj.set_width(val))
- (int, int, obj.height(), obj.set_height(val))
+ (int, int const&, obj.width(), obj.set_width(val))
+ (int, int const&, obj.height(), obj.set_height(val))
 );
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -78,13 +79,34 @@
       : data_(data)
     {}
 
- double data() const { return data_;}
+ double const& data() const { return data_;}
     void set_data(double data) { data_ = data;}
 };
 
 BOOST_FUSION_ADAPT_ADT(
     data3,
- (double, double, obj.data(), obj.set_data(val))
+ (double, double const&, obj.data(), obj.set_data(val))
+);
+
+///////////////////////////////////////////////////////////////////////////////
+class data4
+{
+public:
+ boost::optional<int> a_;
+ boost::optional<double> b_;
+ boost::optional<std::string> c_;
+
+ boost::optional<int> const& a() const { return a_; }
+ boost::optional<double> const& b() const { return b_; }
+ boost::optional<std::string> const& c() const { return c_; }
+};
+
+
+BOOST_FUSION_ADAPT_ADT(
+ data4,
+ (boost::optional<int>, boost::optional<int> const&, obj.a(), /**/)
+ (boost::optional<double>, boost::optional<double> const&, obj.b(), /**/)
+ (boost::optional<std::string>, boost::optional<std::string> const&, obj.c(), /**/)
 );
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -128,5 +150,20 @@
         }
     }
 
+ {
+ using boost::spirit::karma::double_;
+ using boost::spirit::karma::int_;
+ using boost::spirit::karma::string;
+
+ data4 d;
+ d.b_ = 10;
+
+ BOOST_TEST(test(
+ "Testing: b: 10.0\n",
+ "Testing: " << -("a: " << int_ << "\n")
+ << -("b: " << double_ << "\n")
+ << -("c: " << string << "\n"), d));
+ }
+
     return boost::report_errors();
 }

Added: trunk/libs/spirit/test/karma/uint_radix.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/spirit/test/karma/uint_radix.cpp 2011-04-18 13:08:57 EDT (Mon, 18 Apr 2011)
@@ -0,0 +1,507 @@
+// Copyright (c) 2001-2011 Hartmut Kaiser
+// Copyright (c) 2011 Jan Frederick Eick
+//
+// 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)
+
+#include <boost/config/warning_disable.hpp>
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/spirit/include/karma_numeric.hpp>
+
+#include <boost/cstdint.hpp>
+
+#include "test.hpp"
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// *** BEWARE PLATFORM DEPENDENT!!! ***
+// *** The following assumes 32 bit boost::uint32_tegers.
+// *** Modify these constants when appropriate.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+char const* max_unsigned_base2 = "11111111111111111111111111111111";
+char const* max_unsigned_base3 = "102002022201221111210";
+char const* max_unsigned_base4 = "3333333333333333";
+char const* max_unsigned_base5 = "32244002423140";
+char const* max_unsigned_base6 = "1550104015503";
+char const* max_unsigned_base7 = "211301422353";
+char const* max_unsigned_base8 = "37777777777";
+char const* max_unsigned_base9 = "12068657453";
+char const* max_unsigned_base11 = "1904440553";
+char const* max_unsigned_base12 = "9ba461593";
+char const* max_unsigned_base13 = "535a79888";
+char const* max_unsigned_base14 = "2ca5b7463";
+char const* max_unsigned_base15 = "1a20dcd80";
+char const* max_unsigned_base16 = "ffffffff";
+char const* max_unsigned_base17 = "a7ffda90";
+char const* max_unsigned_base18 = "704he7g3";
+char const* max_unsigned_base19 = "4f5aff65";
+char const* max_unsigned_base20 = "3723ai4f";
+char const* max_unsigned_base21 = "281d55i3";
+char const* max_unsigned_base22 = "1fj8b183";
+char const* max_unsigned_base23 = "1606k7ib";
+char const* max_unsigned_base24 = "mb994af";
+char const* max_unsigned_base25 = "hek2mgk";
+char const* max_unsigned_base26 = "dnchbnl";
+char const* max_unsigned_base27 = "b28jpdl";
+char const* max_unsigned_base28 = "8pfgih3";
+char const* max_unsigned_base29 = "76beigf";
+char const* max_unsigned_base30 = "5qmcpqf";
+char const* max_unsigned_base31 = "4q0jto3";
+char const* max_unsigned_base32 = "3vvvvvv";
+char const* max_unsigned_base33 = "3aokq93";
+char const* max_unsigned_base34 = "2qhxjlh";
+char const* max_unsigned_base35 = "2br45qa";
+char const* max_unsigned_base36 = "1z141z3";
+
+int
+main()
+{
+ using spirit_test::test;
+ using boost::spirit::karma::uint_generator;
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 2)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 2> base2_generator;
+
+ BOOST_TEST(test("1100111100100110010", base2_generator(424242)));
+ BOOST_TEST(test("1100111100100110010", base2_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base2, base2_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base2, base2_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 3)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 3> base3_generator;
+
+ BOOST_TEST(test("210112221200", base3_generator(424242)));
+ BOOST_TEST(test("210112221200", base3_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base3, base3_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base3, base3_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 4)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 4> base4_generator;
+
+ BOOST_TEST(test("1213210302", base4_generator(424242)));
+ BOOST_TEST(test("1213210302", base4_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base4, base4_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base4, base4_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 5)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 5> base5_generator;
+
+ BOOST_TEST(test("102033432", base5_generator(424242)));
+ BOOST_TEST(test("102033432", base5_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base5, base5_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base5, base5_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 6)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 6> base6_generator;
+
+ BOOST_TEST(test("13032030", base6_generator(424242)));
+ BOOST_TEST(test("13032030", base6_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base6, base6_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base6, base6_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 7)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 7> base7_generator;
+
+ BOOST_TEST(test("3414600", base7_generator(424242)));
+ BOOST_TEST(test("3414600", base7_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base7, base7_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base7, base7_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 8)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 8> base8_generator;
+
+ BOOST_TEST(test("1474462", base8_generator(424242)));
+ BOOST_TEST(test("1474462", base8_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base8, base8_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base8, base8_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 9)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 9> base9_generator;
+
+ BOOST_TEST(test("715850", base9_generator(424242)));
+ BOOST_TEST(test("715850", base9_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base9, base9_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base9, base9_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 11)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 11> base11_generator;
+
+ BOOST_TEST(test("26a815", base11_generator(424242)));
+ BOOST_TEST(test("26a815", base11_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base11, base11_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base11, base11_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 12)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 12> base12_generator;
+
+ BOOST_TEST(test("185616", base12_generator(424242)));
+ BOOST_TEST(test("185616", base12_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base12, base12_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base12, base12_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 13)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 13> base13_generator;
+
+ BOOST_TEST(test("11b140", base13_generator(424242)));
+ BOOST_TEST(test("11b140", base13_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base13, base13_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base13, base13_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 14)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 14> base14_generator;
+
+ BOOST_TEST(test("b0870", base14_generator(424242)));
+ BOOST_TEST(test("b0870", base14_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base14, base14_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base14, base14_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 15)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 15> base15_generator;
+
+ BOOST_TEST(test("85a7c", base15_generator(424242)));
+ BOOST_TEST(test("85a7c", base15_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base15, base15_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base15, base15_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 16)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 16> base16_generator;
+
+ BOOST_TEST(test("67932", base16_generator(424242)));
+ BOOST_TEST(test("67932", base16_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base16, base16_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base16, base16_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 17)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 17> base17_generator;
+
+ BOOST_TEST(test("515g7", base17_generator(424242)));
+ BOOST_TEST(test("515g7", base17_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base17, base17_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base17, base17_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 18)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 18> base18_generator;
+
+ BOOST_TEST(test("40d70", base18_generator(424242)));
+ BOOST_TEST(test("40d70", base18_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base18, base18_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base18, base18_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 19)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 19> base19_generator;
+
+ BOOST_TEST(test("34g3a", base19_generator(424242)));
+ BOOST_TEST(test("34g3a", base19_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base19, base19_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base19, base19_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 20)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 20> base20_generator;
+
+ BOOST_TEST(test("2d0c2", base20_generator(424242)));
+ BOOST_TEST(test("2d0c2", base20_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base20, base20_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base20, base20_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 21)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 21> base21_generator;
+
+ BOOST_TEST(test("23h00", base21_generator(424242)));
+ BOOST_TEST(test("23h00", base21_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base21, base21_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base21, base21_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 22)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 22> base22_generator;
+
+ BOOST_TEST(test("1hibg", base22_generator(424242)));
+ BOOST_TEST(test("1hibg", base22_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base22, base22_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base22, base22_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 23)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 23> base23_generator;
+
+ BOOST_TEST(test("1bjm7", base23_generator(424242)));
+ BOOST_TEST(test("1bjm7", base23_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base23, base23_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base23, base23_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 24)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 24> base24_generator;
+
+ BOOST_TEST(test("16gci", base24_generator(424242)));
+ BOOST_TEST(test("16gci", base24_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base24, base24_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base24, base24_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 25)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 25> base25_generator;
+
+ BOOST_TEST(test("123jh", base25_generator(424242)));
+ BOOST_TEST(test("123jh", base25_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base25, base25_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base25, base25_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 26)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 26> base26_generator;
+
+ BOOST_TEST(test("o3f0", base26_generator(424242)));
+ BOOST_TEST(test("o3f0", base26_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base26, base26_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base26, base26_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 27)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 27> base27_generator;
+
+ BOOST_TEST(test("lepi", base27_generator(424242)));
+ BOOST_TEST(test("lepi", base27_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base27, base27_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base27, base27_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 28)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 28> base28_generator;
+
+ BOOST_TEST(test("j93e", base28_generator(424242)));
+ BOOST_TEST(test("j93e", base28_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base28, base28_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base28, base28_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 29)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 29> base29_generator;
+
+ BOOST_TEST(test("hbd1", base29_generator(424242)));
+ BOOST_TEST(test("hbd1", base29_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base29, base29_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base29, base29_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 30)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 30> base30_generator;
+
+ BOOST_TEST(test("flbc", base30_generator(424242)));
+ BOOST_TEST(test("flbc", base30_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base30, base30_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base30, base30_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 31)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 31> base31_generator;
+
+ BOOST_TEST(test("e7e7", base31_generator(424242)));
+ BOOST_TEST(test("e7e7", base31_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base31, base31_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base31, base31_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 32)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 32> base32_generator;
+
+ BOOST_TEST(test("cu9i", base32_generator(424242)));
+ BOOST_TEST(test("cu9i", base32_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base32, base32_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base32, base32_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 33)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 33> base33_generator;
+
+ BOOST_TEST(test("bqir", base33_generator(424242)));
+ BOOST_TEST(test("bqir", base33_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base33, base33_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base33, base33_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 34)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 34> base34_generator;
+
+ BOOST_TEST(test("aqxo", base34_generator(424242)));
+ BOOST_TEST(test("aqxo", base34_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base34, base34_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base34, base34_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 35)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 35> base35_generator;
+
+ BOOST_TEST(test("9vb7", base35_generator(424242)));
+ BOOST_TEST(test("9vb7", base35_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base35, base35_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base35, base35_generator, 0xffffffffu));
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ // arbitrary radix test (base 36)
+ ///////////////////////////////////////////////////////////////////////////
+ {
+ uint_generator<boost::uint32_t, 36> base36_generator;
+
+ BOOST_TEST(test("93ci", base36_generator(424242)));
+ BOOST_TEST(test("93ci", base36_generator, 424242));
+
+ BOOST_TEST(test(max_unsigned_base36, base36_generator(0xffffffffu)));
+ BOOST_TEST(test(max_unsigned_base36, base36_generator, 0xffffffffu));
+ }
+
+ return boost::report_errors();
+}


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