Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66391 - trunk/boost/archive/impl
From: ramey_at_[hidden]
Date: 2010-11-03 19:33:37


Author: ramey
Date: 2010-11-03 19:33:31 EDT (Wed, 03 Nov 2010)
New Revision: 66391
URL: http://svn.boost.org/trac/boost/changeset/66391

Log:
Temporarily backout changes to xml_archive until after next release
Text files modified:
   trunk/boost/archive/impl/basic_xml_grammar.hpp | 50 +++++++++++++++++++++++----------------
   trunk/boost/archive/impl/xml_iarchive_impl.ipp | 2
   2 files changed, 30 insertions(+), 22 deletions(-)

Modified: trunk/boost/archive/impl/basic_xml_grammar.hpp
==============================================================================
--- trunk/boost/archive/impl/basic_xml_grammar.hpp (original)
+++ trunk/boost/archive/impl/basic_xml_grammar.hpp 2010-11-03 19:33:31 EDT (Wed, 03 Nov 2010)
@@ -9,7 +9,6 @@
 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
 // basic_xml_grammar.hpp
 
-// (C) Copyright 2010 Bryce Lelbach
 // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
 // Use, modification and distribution is subject to the Boost Software
 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@@ -56,6 +55,8 @@
 # pragma warning (disable : 4786) // too long name, harmless warning
 #endif
 
+//#define BOOST_SPIRIT_DEBUG
+#include <boost/spirit/core/non_terminal/rule.hpp>
 
 // the following hack is to evade a bogus error generated by using the
 // word "arg" when bind.hpp has been included
@@ -63,22 +64,18 @@
 #define arg xarg
 #endif
 
-/*#if (defined __BORLANDC__) && (__BORLANDC__ < 0x593) \
+// spirit stuff
+#if (defined __BORLANDC__) && (__BORLANDC__ < 0x593) \
     || (defined _MSC_VER) && (_MSC_VER <= 1300)
 #include <boost/spirit/utility/chset.hpp>
 #else
 #include <boost/spirit/include/classic_chset.hpp>
-#endif */
-
-// spirit stuff
-#include <boost/spirit/include/qi_nonterminal.hpp>
+#endif
 
 #if BOOST_WORKAROUND(BOOST_MSVC, <= 1200)
 #undef arg
 #endif
 
-#include <boost/integer.hpp>
-
 #include <boost/archive/basic_archive.hpp>
 #include <boost/serialization/tracking.hpp>
 #include <boost/serialization/version.hpp>
@@ -100,30 +97,37 @@
 private:
     typedef BOOST_DEDUCED_TYPENAME std::basic_istream<CharType> IStream;
     typedef BOOST_DEDUCED_TYPENAME std::basic_string<CharType> StringType;
- typedef BOOST_DEDUCED_TYPENAME std::basic_string<CharType>::iterator Iterator;
- typedef BOOST_DEDUCED_TYPENAME boost::spirit::qi::rule<Iterator> rule_t;
-
+ typedef BOOST_DEDUCED_TYPENAME boost::spirit::chset<CharType> chset_t;
+ typedef BOOST_DEDUCED_TYPENAME boost::spirit::chlit<CharType> chlit_t;
+ typedef BOOST_DEDUCED_TYPENAME boost::spirit::scanner<
+ BOOST_DEDUCED_TYPENAME std::basic_string<CharType>::iterator
+ > scanner_t;
+ typedef BOOST_DEDUCED_TYPENAME boost::spirit::rule<scanner_t> rule_t;
+ // Start grammar definition
     rule_t
         Reference,
         Eq,
         STag,
         ETag,
- Name,
- CharData,
         LetterOrUnderscoreOrColon,
         AttValue,
+ CharRef1,
+ CharRef2,
         CharRef,
         AmpRef,
         LTRef,
         GTRef,
         AposRef,
         QuoteRef,
+ CharData,
+ CharDataChars,
         content,
         AmpName,
         LTName,
         GTName,
         ClassNameChar,
         ClassName,
+ Name,
         XMLDecl,
         XMLDeclChars,
         DocTypeDecl,
@@ -137,21 +141,22 @@
         Attribute,
         SignatureAttribute,
         SerializationWrapper,
+ NameHead,
+ NameTail,
         AttributeList,
         S;
 
- BOOST_DEDUCED_TYPENAME boost::spirit::qi::rule<Iterator, CharType()>
+ // XML Character classes
+ chset_t
         BaseChar,
         Ideographic,
         Char,
         Letter,
         Digit,
- HexDigit,
         CombiningChar,
         Extender,
         Sch,
- NameChar,
- AnyChar;
+ NameChar;
 
     void init_chset();
 
@@ -164,9 +169,12 @@
     struct return_values {
         StringType object_name;
         StringType contents;
- BOOST_DEDUCED_TYPENAME boost::int_t<16>::least class_id;
- BOOST_DEDUCED_TYPENAME boost::uint_t<32>::least object_id;
- BOOST_DEDUCED_TYPENAME boost::uint_t<32>::least version;
+ //class_id_type class_id;
+ int_least16_t class_id;
+ //object_id_type object_id;
+ uint_least32_t object_id;
+ //version_type version;
+ unsigned int version;
         tracking_type tracking_level;
         StringType class_name;
         return_values() :
@@ -175,7 +183,7 @@
         {}
     } rv;
     bool parse_start_tag(IStream & is) /*const*/;
- bool parse_end_tag(IStream & is) /*const*/;
+ bool parse_end_tag(IStream & is) const;
     bool parse_string(IStream & is, StringType & s) /*const*/;
     void init(IStream & is);
     void windup(IStream & is);

Modified: trunk/boost/archive/impl/xml_iarchive_impl.ipp
==============================================================================
--- trunk/boost/archive/impl/xml_iarchive_impl.ipp (original)
+++ trunk/boost/archive/impl/xml_iarchive_impl.ipp 2010-11-03 19:33:31 EDT (Wed, 03 Nov 2010)
@@ -178,7 +178,7 @@
         BOOST_TRY{
             init();
         }
- BOOST_CATCH(...){
+ BOOST_CATCH(...){
             delete gimpl;
             #ifndef BOOST_NO_EXCEPTIONS
                 throw; // re-throw


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