Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74894 - in branches/release: . boost boost/spirit boost/spirit/home boost/spirit/home/karma boost/spirit/home/karma/nonterminal boost/spirit/home/lex/lexer boost/spirit/home/qi/binary boost/spirit/home/qi/nonterminal boost/spirit/home/support/detail boost/spirit/home/support/detail/endian boost/spirit/repository/home/qi boost/spirit/repository/home/qi/directive boost/spirit/repository/home/support boost/spirit/repository/include libs libs/spirit libs/spirit/repository/doc libs/spirit/repository/doc/qi libs/spirit/repository/example/qi libs/spirit/repository/test libs/spirit/repository/test/qi
From: hartmut.kaiser_at_[hidden]
Date: 2011-10-10 09:28:35


Author: hkaiser
Date: 2011-10-10 09:28:33 EDT (Mon, 10 Oct 2011)
New Revision: 74894
URL: http://svn.boost.org/trac/boost/changeset/74894

Log:
Spirit: merging to release
Added:
   branches/release/boost/spirit/repository/home/qi/directive/seek.hpp
      - copied unchanged from r74797, /trunk/boost/spirit/repository/home/qi/directive/seek.hpp
   branches/release/boost/spirit/repository/home/support/seek.hpp
      - copied unchanged from r74797, /trunk/boost/spirit/repository/home/support/seek.hpp
   branches/release/boost/spirit/repository/include/qi_seek.hpp
      - copied unchanged from r74797, /trunk/boost/spirit/repository/include/qi_seek.hpp
   branches/release/libs/spirit/repository/doc/qi/seek.qbk
      - copied unchanged from r74797, /trunk/libs/spirit/repository/doc/qi/seek.qbk
   branches/release/libs/spirit/repository/example/qi/seek.cpp
      - copied unchanged from r74797, /trunk/libs/spirit/repository/example/qi/seek.cpp
   branches/release/libs/spirit/repository/test/qi/seek.cpp
      - copied unchanged from r74797, /trunk/libs/spirit/repository/test/qi/seek.cpp
Properties modified:
   branches/release/ (props changed)
   branches/release/boost/ (props changed)
   branches/release/boost/spirit/ (props changed)
   branches/release/boost/spirit/home/ (props changed)
   branches/release/boost/spirit/home/karma/ (props changed)
   branches/release/libs/ (props changed)
   branches/release/libs/spirit/ (props changed)
Text files modified:
   branches/release/boost/spirit/home/karma/nonterminal/rule.hpp | 11 +++++++++
   branches/release/boost/spirit/home/lex/lexer/lexer.hpp | 17 +++++++++++++++
   branches/release/boost/spirit/home/qi/binary/binary.hpp | 4 +++
   branches/release/boost/spirit/home/qi/nonterminal/rule.hpp | 11 +++++++++
   branches/release/boost/spirit/home/support/detail/endian.hpp | 4 ---
   branches/release/boost/spirit/home/support/detail/endian/endian.hpp | 6 +++++
   branches/release/boost/spirit/home/support/detail/pow10.hpp | 6 ++--
   branches/release/boost/spirit/repository/home/qi/directive.hpp | 1
   branches/release/libs/spirit/repository/doc/qi/directives.qbk | 1
   branches/release/libs/spirit/repository/doc/spirit2_repository.qbk | 45 ++++++++++++++++++++++++++++++++++++++++
   branches/release/libs/spirit/repository/example/qi/Jamfile | 1
   branches/release/libs/spirit/repository/test/Jamfile | 1
   12 files changed, 101 insertions(+), 7 deletions(-)

Modified: branches/release/boost/spirit/home/karma/nonterminal/rule.hpp
==============================================================================
--- branches/release/boost/spirit/home/karma/nonterminal/rule.hpp (original)
+++ branches/release/boost/spirit/home/karma/nonterminal/rule.hpp 2011-10-10 09:28:33 EDT (Mon, 10 Oct 2011)
@@ -240,6 +240,7 @@
             return r;
         }
 
+#if defined(BOOST_NO_RVALUE_REFERENCES)
         // non-const version needed to suppress proto's %= kicking in
         template <typename Expr>
         friend rule& operator%=(rule& r, Expr& expr)
@@ -247,6 +248,16 @@
             return r %= static_cast<Expr const&>(expr);
         }
 #else
+ // for rvalue references
+ template <typename Expr>
+ friend rule& operator%=(rule& r, Expr&& expr)
+ {
+ define<mpl::true_>(r, expr, traits::matches<karma::domain, Expr>());
+ return r;
+ }
+#endif
+
+#else
         // both friend functions have to be defined out of class as VC7.1
         // will complain otherwise
         template <typename OutputIterator_, typename T1_, typename T2_

Modified: branches/release/boost/spirit/home/lex/lexer/lexer.hpp
==============================================================================
--- branches/release/boost/spirit/home/lex/lexer/lexer.hpp (original)
+++ branches/release/boost/spirit/home/lex/lexer/lexer.hpp 2011-10-10 09:28:33 EDT (Mon, 10 Oct 2011)
@@ -285,6 +285,7 @@
             lexer_def_& operator= (lexer_def_ const&);
         };
 
+#if defined(BOOST_NO_RVALUE_REFERENCES)
         // allow to assign a token definition expression
         template <typename LexerDef, typename Expr>
         inline lexer_def_<LexerDef>&
@@ -299,6 +300,22 @@
             lexdef.define(xpr);
             return lexdef;
         }
+#else
+ // allow to assign a token definition expression
+ template <typename LexerDef, typename Expr>
+ inline lexer_def_<LexerDef>&
+ operator+= (lexer_def_<LexerDef>& lexdef, Expr&& xpr)
+ {
+ // Report invalid expression error as early as possible.
+ // If you got an error_invalid_expression error message here,
+ // then the expression (expr) is not a valid spirit lex
+ // expression.
+ BOOST_SPIRIT_ASSERT_MATCH(lex::domain, Expr);
+
+ lexdef.define(xpr);
+ return lexdef;
+ }
+#endif
 
         template <typename LexerDef, typename Expr>
         inline lexer_def_<LexerDef>&

Modified: branches/release/boost/spirit/home/qi/binary/binary.hpp
==============================================================================
--- branches/release/boost/spirit/home/qi/binary/binary.hpp (original)
+++ branches/release/boost/spirit/home/qi/binary/binary.hpp 2011-10-10 09:28:33 EDT (Mon, 10 Oct 2011)
@@ -112,18 +112,21 @@
         template <>
         struct integer<8>
         {
+ enum { size = 1 };
             typedef uint_least8_t type;
         };
 
         template <>
         struct integer<16>
         {
+ enum { size = 2 };
             typedef uint_least16_t type;
         };
 
         template <>
         struct integer<32>
         {
+ enum { size = 4 };
             typedef uint_least32_t type;
         };
 
@@ -131,6 +134,7 @@
         template <>
         struct integer<64>
         {
+ enum { size = 8 };
             typedef uint_least64_t type;
         };
 #endif

Modified: branches/release/boost/spirit/home/qi/nonterminal/rule.hpp
==============================================================================
--- branches/release/boost/spirit/home/qi/nonterminal/rule.hpp (original)
+++ branches/release/boost/spirit/home/qi/nonterminal/rule.hpp 2011-10-10 09:28:33 EDT (Mon, 10 Oct 2011)
@@ -231,6 +231,7 @@
             return r;
         }
 
+#if defined(BOOST_NO_RVALUE_REFERENCES)
         // non-const version needed to suppress proto's %= kicking in
         template <typename Expr>
         friend rule& operator%=(rule& r, Expr& expr)
@@ -238,6 +239,16 @@
             return r %= static_cast<Expr const&>(expr);
         }
 #else
+ // for rvalue references
+ template <typename Expr>
+ friend rule& operator%=(rule& r, Expr&& expr)
+ {
+ define<mpl::true_>(r, expr, traits::matches<qi::domain, Expr>());
+ return r;
+ }
+#endif
+
+#else
         // both friend functions have to be defined out of class as VC7.1
         // will complain otherwise
         template <typename OutputIterator_, typename T1_, typename T2_

Modified: branches/release/boost/spirit/home/support/detail/endian.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/detail/endian.hpp (original)
+++ branches/release/boost/spirit/home/support/detail/endian.hpp 2011-10-10 09:28:33 EDT (Mon, 10 Oct 2011)
@@ -24,10 +24,6 @@
 #include <boost/endian/integers.hpp>
 #else
 #include <boost/spirit/home/support/detail/endian/endian.hpp>
-namespace boost { namespace endian
-{
- using namespace boost::spirit::endian;
-}}
 #endif
 
 #endif

Modified: branches/release/boost/spirit/home/support/detail/endian/endian.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/detail/endian/endian.hpp (original)
+++ branches/release/boost/spirit/home/support/detail/endian/endian.hpp 2011-10-10 09:28:33 EDT (Mon, 10 Oct 2011)
@@ -419,6 +419,12 @@
   } // namespace endian
 }} // namespace boost::spirit
 
+// import the namespace above into boost::endian
+namespace boost { namespace endian
+{
+ using namespace boost::spirit::endian;
+}}
+
 #if defined(__BORLANDC__) || defined( __CODEGEARC__)
 # pragma pack(pop)
 #endif

Modified: branches/release/boost/spirit/home/support/detail/pow10.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/detail/pow10.hpp (original)
+++ branches/release/boost/spirit/home/support/detail/pow10.hpp 2011-10-10 09:28:33 EDT (Mon, 10 Oct 2011)
@@ -44,7 +44,7 @@
         }
     };
 
-#if (DBL_MAX_EXP == 308) // for IEEE-754
+#if (DBL_MAX_10_EXP == 308) // for IEEE-754
     template <>
     struct pow10_helper<double>
     {
@@ -90,9 +90,9 @@
     };
 
     template <>
- struct pow10_helper<double>
+ struct pow10_helper<float>
     {
- inline float pow10<float>(unsigned dim)
+ static float call(unsigned dim)
         {
             return pow10_helper<double>::call(dim);
         }

Modified: branches/release/boost/spirit/repository/home/qi/directive.hpp
==============================================================================
--- branches/release/boost/spirit/repository/home/qi/directive.hpp (original)
+++ branches/release/boost/spirit/repository/home/qi/directive.hpp 2011-10-10 09:28:33 EDT (Mon, 10 Oct 2011)
@@ -14,6 +14,7 @@
 #include <boost/spirit/repository/home/qi/directive/distinct.hpp>
 #include <boost/spirit/repository/home/qi/directive/confix.hpp>
 #include <boost/spirit/repository/home/qi/directive/kwd.hpp>
+#include <boost/spirit/repository/home/qi/directive/seek.hpp>
 
 #endif
 

Modified: branches/release/libs/spirit/repository/doc/qi/directives.qbk
==============================================================================
--- branches/release/libs/spirit/repository/doc/qi/directives.qbk (original)
+++ branches/release/libs/spirit/repository/doc/qi/directives.qbk 2011-10-10 09:28:33 EDT (Mon, 10 Oct 2011)
@@ -10,4 +10,5 @@
 [include confix.qbk]
 [include distinct.qbk]
 [include kwd.qbk]
+[include seek.qbk]
 [endsect]

Modified: branches/release/libs/spirit/repository/doc/spirit2_repository.qbk
==============================================================================
--- branches/release/libs/spirit/repository/doc/spirit2_repository.qbk (original)
+++ branches/release/libs/spirit/repository/doc/spirit2_repository.qbk 2011-10-10 09:28:33 EDT (Mon, 10 Oct 2011)
@@ -55,6 +55,51 @@
 [def __caution__ [$images/caution.png]]
 [def __danger__ [$images/alert.png]]
 
+[/ ----------------------------------------------------------------------------]
+[/ $$$ Refer to spirit2.qbk $$$]
+
+[/ References to abstracts ]
+
+[def __include_structure__ [@../../../doc/html/spirit/structure/include.html Include Structure]]
+
+[/ quick-ref]
+[def __qi_comp_attr_notation__ [@../../../doc/html/spirit/qi/quick_reference/compound_attribute_rules.html#spirit.qi.quick_reference.compound_attribute_rules.notation Compound Attribute Notation]]
+
+[/ concepts]
+[def __parser_concept__ [@../../../doc/html/spirit/qi/reference/parser_concepts/parser.html `Parser`]]
+[def __primitive_parser_concept__ [@../../../doc/html/spirit/qi/reference/parser_concepts/primitiveparser.html `PrimitiveParser`]]
+[def __unary_parser_concept__ [@../../../doc/html/spirit/qi/reference/parser_concepts/unaryparser.html `UnaryParser`]]
+[def __binary_parser_concept__ [@../../../doc/html/spirit/qi/reference/parser_concepts/binaryparser.html `BinaryParser`]]
+[def __nary_parser_concept__ [@../../../doc/html/spirit/qi/reference/parser_concepts/naryparser.html `NaryParser`]]
+[def __qi_nonterminal__ [@../../../doc/html/spirit/qi/reference/parser_concepts/nonterminal.html `Nonterminal`]]
+[def __qi_nonterminal_attribute__ [@../../../doc/html/spirit/qi/reference/parser_concepts/nonterminal.html#spirit.qi.reference.parser_concepts.nonterminal.attributes `Attribute`]]
+
+[/ basics]
+[def __qi_lazy_argument__ [@../../../doc/html/spirit/qi/reference/basics.html#spirit.qi.reference.basics.lazy_argument Lazy Argument]]
+[def __qi_lazy_arguments__ [@../../../doc/html/spirit/qi/reference/basics.html#spirit.qi.reference.basics.lazy_argument Lazy Arguments]]
+[def __char_encoding_namespace__ [@../../../doc/html/spirit/qi/reference/basics.html#spirit.qi.reference.basics.character_encoding_namespace Character Encoding Namespace]]
+[def __string__ [@../../../doc/html/spirit/qi/reference/basics.html#spirit.qi.reference.basics.string String]]
+[def __qi_basics_examples__ [@../../../doc/html/spirit/qi/reference/basics.html#spirit.qi.reference.basics.examples Basics Examples]]
+
+[/ quick-ref]
+[def __karma_comp_attr_notation__ [@../../../doc/html/spirit/karma/quick_reference/compound_attribute_rules.html#spirit.karma.quick_reference.compound_attribute_rules.notation Compound Attribute Notation]]
+
+[/ concepts]
+[def __generator_concept__ [@../../../doc/html/spirit/karma/reference/generator_concepts/generator.html `Generator`]]
+[def __primitive_generator_concept__ [@../../../doc/html/spirit/karma/reference/generator_concepts/primitivegenerator.html `PrimitiveGenerator`]]
+[def __unary_generator_concept__ [@../../../doc/html/spirit/karma/reference/generator_concepts/unarygenerator.html `UnaryGenerator`]]
+[def __binary_generator_concept__ [@../../../doc/html/spirit/karma/reference/generator_concepts/binarygenerator.html `BinaryGenerator`]]
+[def __nary_generator_concept__ [@../../../doc/html/spirit/karma/reference/generator_concepts/narygenerator.html `NaryGenerator`]]
+[def __karma_nonterminal_concept__ [@../../../doc/html/spirit/karma/reference/generator_concepts/nonterminal.html `Nonterminal`]]
+[def __karma_nonterminal_attribute__ [@../../../doc/html/spirit/karma/reference/generator_concepts/nonterminal.html#spirit.karma.reference.generator_concepts.nonterminal.attributes `Attribute`]]
+
+[/ basics]
+[def __karma_lazy_argument__ [@../../../doc/html/spirit/karma/reference/basics.html#spirit.karma.reference.basics.lazy_argument Lazy Argument]]
+[def __karma_lazy_arguments__ [@../../../doc/html/spirit/karma/reference/basics.html#spirit.karma.reference.basics.lazy_argument Lazy Arguments]]
+[def __karma_basics_examples__ [@../../../doc/html/spirit/karma/reference/basics.html#spirit.karma.reference.basics.examples Basics Examples]]
+
+[/ ----------------------------------------------------------------------------]
+
 [/ Here we go ]
 
 [include preface.qbk]

Modified: branches/release/libs/spirit/repository/example/qi/Jamfile
==============================================================================
--- branches/release/libs/spirit/repository/example/qi/Jamfile (original)
+++ branches/release/libs/spirit/repository/example/qi/Jamfile 2011-10-10 09:28:33 EDT (Mon, 10 Oct 2011)
@@ -21,3 +21,4 @@
 exe keywords : keywords.cpp ;
 exe derived : derived.cpp ;
 exe options : options.cpp ;
+exe seek : seek.cpp ;

Modified: branches/release/libs/spirit/repository/test/Jamfile
==============================================================================
--- branches/release/libs/spirit/repository/test/Jamfile (original)
+++ branches/release/libs/spirit/repository/test/Jamfile 2011-10-10 09:28:33 EDT (Mon, 10 Oct 2011)
@@ -27,6 +27,7 @@
     [ run qi/distinct.cpp : : : : qi_repo_distinct ]
     [ run qi/subrule.cpp : : : : qi_repo_subrule ]
     [ run qi/keywords.cpp : : : : qi_repo_keywords ]
+ [ run qi/seek.cpp : : : : qi_repo_seek ]
 
     # run Karma repository tests
     [ run karma/confix.cpp : : : : karma_repo_confix ]


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