$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r78313 - in trunk/boost/spirit/repository/home/qi/operator: . detail
From: joel_at_[hidden]
Date: 2012-05-02 20:50:20
Author: djowel
Date: 2012-05-02 20:50:19 EDT (Wed, 02 May 2012)
New Revision: 78313
URL: http://svn.boost.org/trac/boost/changeset/78313
Log:
patches from teejay
Text files modified: 
   trunk/boost/spirit/repository/home/qi/operator/detail/keywords.hpp |    15 ++++---                                 
   trunk/boost/spirit/repository/home/qi/operator/keywords.hpp        |    78 ++++++++++++++++++++--------------------
   2 files changed, 47 insertions(+), 46 deletions(-)
Modified: trunk/boost/spirit/repository/home/qi/operator/detail/keywords.hpp
==============================================================================
--- trunk/boost/spirit/repository/home/qi/operator/detail/keywords.hpp	(original)
+++ trunk/boost/spirit/repository/home/qi/operator/detail/keywords.hpp	2012-05-02 20:50:19 EDT (Wed, 02 May 2012)
@@ -369,8 +369,8 @@
 
                         // Make the keyword/parse index entry in the tst parser
                         lookup->add(
-                                traits::get_begin<char_type>(parser.subject.keyword.str),
-                                traits::get_end<char_type>(parser.subject.keyword.str),
+                                traits::get_begin<char_type>(get_string(parser.subject.keyword)),
+                                traits::get_end<char_type>(get_string(parser.subject.keyword)),
                                 position
                                 );
                         // Get the initial state of the flags array and store it in the flags initializer
@@ -397,8 +397,8 @@
                     {
                         // Make the keyword/parse index entry in the tst parser
                         lookup->add(
-                                traits::get_begin<char_type>(parser.subject.keyword.str),
-                                traits::get_end<char_type>(parser.subject.keyword.str),
+                                traits::get_begin<char_type>(get_string(parser.subject.keyword)),
+                                traits::get_end<char_type>(get_string(parser.subject.keyword)),
                                 position
                                 );
                         // Get the initial state of the flags array and store it in the flags initializer
@@ -406,19 +406,20 @@
                         return 0;
                     }
 
+
                 template <typename String, bool no_attribute>
-                const String & get_string(const boost::spirit::qi::literal_string<String,no_attribute> &parser) const
+                const String get_string(const boost::spirit::qi::literal_string<String,no_attribute> &parser) const
                 {
                         return parser.str;
                 }
 
-                template <typename String, bool no_attribute>
+        template <typename String, bool no_attribute>
                 const typename boost::spirit::qi::no_case_literal_string<String,no_attribute>::string_type &
                         get_string(const boost::spirit::qi::no_case_literal_string<String,no_attribute> &parser) const
                 {
                         return parser.str_lo;
                 }
-
+   
 
 
                 shared_ptr<keywords_type> lookup;
Modified: trunk/boost/spirit/repository/home/qi/operator/keywords.hpp
==============================================================================
--- trunk/boost/spirit/repository/home/qi/operator/keywords.hpp	(original)
+++ trunk/boost/spirit/repository/home/qi/operator/keywords.hpp	2012-05-02 20:50:19 EDT (Wed, 02 May 2012)
@@ -166,7 +166,7 @@
         {};
 
         // filter out the string kwd directives
-        typedef typename mpl::filter_view< Elements, is_kwd_parser<mpl_::_> >::type string_keywords;
+        typedef typename mpl::filter_view< Elements, is_kwd_parser<mpl::_> >::type string_keywords;
 
         typedef typename mpl::filter_view< parser_index_vector ,
                                          is_kwd_parser_filter< mpl::_ >
@@ -272,27 +272,27 @@
                     save = first;
                 }
                 else {
-          // restore the position to the last successful keyword parse
-          first = save;
-          if(!complex_keywords_inst.parse(complex_function))
-          {
-            first = save;
-            // Check that we are leaving the keywords parser in a successfull state
-            BOOST_FOREACH(bool &valid,flags)
-            {
-              if(!valid)
-              {
-                return false;
-              }
-            }
-            return true;
-          }
-          else
-            save = first;
-        }
+                  // restore the position to the last successful keyword parse
+                  first = save;
+                  if(!complex_keywords_inst.parse(complex_function))
+                  {
+                    first = save;
+                    // Check that we are leaving the keywords parser in a successfull state
+                    BOOST_FOREACH(bool &valid,flags)
+                    {
+                      if(!valid)
+                      {
+                        return false;
+                      }
+                    }
+                    return true;
+                  }
+                  else
+                    save = first;
+                }
             }
             return false;
-        }
+          }
 
         // Handle the mixed kwd and ikwd case
         template <typename Iterator, typename Context
@@ -353,29 +353,29 @@
                     save = first;
                 }
                 else {
-          first = save;
+                  first = save;
 
-          if(!complex_keywords_inst.parse(complex_function))
-          {
-            first = save;
-            // Check that we are leaving the keywords parser in a successfull state
-            BOOST_FOREACH(bool &valid,flags)
-            {
-              if(!valid)
-              {
-                return false;
-              }
-            }
-            return true;
-          }
-          else
-          {
-            save = first;
-          }
+                  if(!complex_keywords_inst.parse(complex_function))
+                  {
+                    first = save;
+                    // Check that we are leaving the keywords parser in a successfull state
+                    BOOST_FOREACH(bool &valid,flags)
+                    {
+                      if(!valid)
+                      {
+                        return false;
+                      }
+                    }
+                    return true;
+                  }
+                  else
+                  {
+                    save = first;
+                  }
                 }
             }
             return false;
-        }
+          }
 
         template <typename Context>
         info what(Context& context) const