Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66459 - in trunk: boost/archive/impl libs/serialization/src
From: admin_at_[hidden]
Date: 2010-11-08 12:12:42


Author: wash
Date: 2010-11-08 12:12:38 EST (Mon, 08 Nov 2010)
New Revision: 66459
URL: http://svn.boost.org/trac/boost/changeset/66459

Log:
Fix for https://svn.boost.org/trac/boost/ticket/4809; fixed includes for Spirit
Classic.

Text files modified:
   trunk/boost/archive/impl/basic_xml_grammar.hpp | 28 +++++-----------------------
   trunk/libs/serialization/src/basic_xml_grammar.ipp | 16 ++++++++--------
   trunk/libs/serialization/src/xml_grammar.cpp | 2 +-
   trunk/libs/serialization/src/xml_wgrammar.cpp | 2 +-
   4 files changed, 15 insertions(+), 33 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-08 12:12:38 EST (Mon, 08 Nov 2010)
@@ -55,26 +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
-#if BOOST_WORKAROUND(BOOST_MSVC, <= 1200)
-#define arg xarg
-#endif
-
-// 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_rule.hpp>
 #include <boost/spirit/include/classic_chset.hpp>
-#endif
-
-#if BOOST_WORKAROUND(BOOST_MSVC, <= 1200)
-#undef arg
-#endif
 
 #include <boost/archive/basic_archive.hpp>
 #include <boost/serialization/tracking.hpp>
@@ -97,12 +79,12 @@
 private:
     typedef BOOST_DEDUCED_TYPENAME std::basic_istream<CharType> IStream;
     typedef BOOST_DEDUCED_TYPENAME std::basic_string<CharType> StringType;
- 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<
+ typedef BOOST_DEDUCED_TYPENAME boost::spirit::classic::chset<CharType> chset_t;
+ typedef BOOST_DEDUCED_TYPENAME boost::spirit::classic::chlit<CharType> chlit_t;
+ typedef BOOST_DEDUCED_TYPENAME boost::spirit::classic::scanner<
         BOOST_DEDUCED_TYPENAME std::basic_string<CharType>::iterator
> scanner_t;
- typedef BOOST_DEDUCED_TYPENAME boost::spirit::rule<scanner_t> rule_t;
+ typedef BOOST_DEDUCED_TYPENAME boost::spirit::classic::rule<scanner_t> rule_t;
     // Start grammar definition
     rule_t
         Reference,

Modified: trunk/libs/serialization/src/basic_xml_grammar.ipp
==============================================================================
--- trunk/libs/serialization/src/basic_xml_grammar.ipp (original)
+++ trunk/libs/serialization/src/basic_xml_grammar.ipp 2010-11-08 12:12:38 EST (Mon, 08 Nov 2010)
@@ -22,9 +22,9 @@
 #endif
 
 // spirit stuff
-#include <boost/spirit/core/composite/operators.hpp>
-#include <boost/spirit/core/composite/actions.hpp>
-#include <boost/spirit/core/primitives/numerics.hpp>
+#include <boost/spirit/include/classic_operators.hpp>
+#include <boost/spirit/include/classic_actions.hpp>
+#include <boost/spirit/include/classic_numerics.hpp>
 
 #ifdef BOOST_MSVC
 #pragma warning(pop)
@@ -42,7 +42,7 @@
 #include <boost/archive/basic_xml_archive.hpp>
 #include <boost/archive/iterators/xml_unescape.hpp>
 
-using namespace boost::spirit;
+using namespace boost::spirit::classic;
 
 namespace boost {
 namespace archive {
@@ -207,7 +207,7 @@
     // and transaction data logging in the standard way.
     
     parse_info<BOOST_DEDUCED_TYPENAME std::basic_string<CharType>::iterator>
- result = boost::spirit::parse(arg.begin(), arg.end(), rule_);
+ result = boost::spirit::classic::parse(arg.begin(), arg.end(), rule_);
     return result.hit;
 }
 
@@ -426,9 +426,9 @@
         !S
>> str_p(L"<boost_serialization")
>> S
- >> SignatureAttribute
- >> S
- >> VersionAttribute
+ >> ( (SignatureAttribute >> S >> VersionAttribute)
+ | (VersionAttribute >> S >> SignatureAttribute)
+ )
>> !S
>> L'>'
     ;

Modified: trunk/libs/serialization/src/xml_grammar.cpp
==============================================================================
--- trunk/libs/serialization/src/xml_grammar.cpp (original)
+++ trunk/libs/serialization/src/xml_grammar.cpp 2010-11-08 12:12:38 EST (Mon, 08 Nov 2010)
@@ -15,7 +15,7 @@
 #define BOOST_ARCHIVE_SOURCE
 #include <boost/archive/impl/basic_xml_grammar.hpp>
 
-using namespace boost::spirit;
+using namespace boost::spirit::classic;
 
 #include <boost/config.hpp>
 

Modified: trunk/libs/serialization/src/xml_wgrammar.cpp
==============================================================================
--- trunk/libs/serialization/src/xml_wgrammar.cpp (original)
+++ trunk/libs/serialization/src/xml_wgrammar.cpp 2010-11-08 12:12:38 EST (Mon, 08 Nov 2010)
@@ -17,7 +17,7 @@
 #define BOOST_WARCHIVE_SOURCE
 #include <boost/archive/impl/basic_xml_grammar.hpp>
 
-using namespace boost::spirit;
+using namespace boost::spirit::classic;
 
 // fixup for RogueWave
 #include <boost/config.hpp>


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