Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66114 - in trunk/libs/serialization: doc src
From: admin_at_[hidden]
Date: 2010-10-19 20:44:18


Author: wash
Date: 2010-10-19 20:44:17 EDT (Tue, 19 Oct 2010)
New Revision: 66114
URL: http://svn.boost.org/trac/boost/changeset/66114

Log:
Broken compiler fix for MSVC-7.1; shamelessly added myself to the acknowledgements page.

Text files modified:
   trunk/libs/serialization/doc/acknowledgments.html | 1
   trunk/libs/serialization/src/basic_xml_grammar.ipp | 68 ++++++++++++++++++++--------------------
   trunk/libs/serialization/src/xml_grammar.cpp | 4 +-
   trunk/libs/serialization/src/xml_wgrammar.cpp | 2
   4 files changed, 38 insertions(+), 37 deletions(-)

Modified: trunk/libs/serialization/doc/acknowledgments.html
==============================================================================
--- trunk/libs/serialization/doc/acknowledgments.html (original)
+++ trunk/libs/serialization/doc/acknowledgments.html 2010-10-19 20:44:17 EDT (Tue, 19 Oct 2010)
@@ -80,6 +80,7 @@
   of the overrides for serialization of pointers. This resulted in a simpler
   and more effective method of accounting for non-default constructors
   required by serialization of pointers and STL collections.
+ <li><a href="mailto:admin_at_[hidden]">Bryce Lelbach</a> rewrote the XML Serialization grammar using Boost.Spirit 2.x.
 </ul>
 <hr>
 <p><i>&copy; Copyright Robert Ramey 2002-2004.

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-10-19 20:44:17 EDT (Tue, 19 Oct 2010)
@@ -139,14 +139,14 @@
     ETag = -S >> "</" >> Name >> !S >> '>';
 
     /* [6] CharData ::= (AnyChar - ("&" | "<"))+ */
- CharData = +(AnyChar - (qi::lit(L"&") | L"<"))
+ CharData = +(AnyChar - (qi::lit('&') | '<'))
       [phoenix::ref(rv.contents) += qi::_1]
     ;
 
     /* [7] CharRef ::= ("&#" Digit* ';') | ("&#x" HexDigit* ';') */
     CharRef
- = (qi::lit(L"&#") >> *Digit[phoenix::ref(rv.contents) += qi::_1] >> L';')
- | (L"&#x" >> *HexDigit[phoenix::ref(rv.contents) += qi::_1] >> L';')
+ = (qi::lit("&#") >> *Digit[phoenix::ref(rv.contents) += qi::_1] >> ';')
+ | ("&#x" >> *HexDigit[phoenix::ref(rv.contents) += qi::_1] >> ';')
     ;
 
     /* [8] AmpRef ::= "&amp;" *
@@ -154,18 +154,18 @@
      * [a] GTRef ::= "&gt;" *
      * [b] AposRef ::= "&apos;" *
      * [c] QuoteRef ::= "&quot;" */
- AmpRef = qi::lit(L"&amp;") [phoenix::ref(rv.contents) += L'&'];
- LTRef = qi::lit(L"&lt;") [phoenix::ref(rv.contents) += L'<'];
- GTRef = qi::lit(L"&gt;") [phoenix::ref(rv.contents) += L'>'];
- AposRef = qi::lit(L"&apos;")[phoenix::ref(rv.contents) += L'\''];
- QuoteRef = qi::lit(L"&quot;")[phoenix::ref(rv.contents) += L'"'];
+ AmpRef = qi::lit("&amp;") [phoenix::ref(rv.contents) += '&'];
+ LTRef = qi::lit("&lt;") [phoenix::ref(rv.contents) += '<'];
+ GTRef = qi::lit("&gt;") [phoenix::ref(rv.contents) += '>'];
+ AposRef = qi::lit("&apos;")[phoenix::ref(rv.contents) += '\''];
+ QuoteRef = qi::lit("&quot;")[phoenix::ref(rv.contents) += '"'];
     
     /* [d] AmpName ::= "&amp;" *
      * [e] LTName ::= "&lt;" *
      * [f] GTName ::= "&gt;" */
- AmpName = qi::lit(L"&amp;")[phoenix::ref(rv.class_name) += L'&'];
- LTName = qi::lit(L"&lt;") [phoenix::ref(rv.class_name) += L'<'];
- GTName = qi::lit(L"&gt;") [phoenix::ref(rv.class_name) += L'>'];
+ AmpName = qi::lit("&amp;")[phoenix::ref(rv.class_name) += '&'];
+ LTName = qi::lit("&lt;") [phoenix::ref(rv.class_name) += '<'];
+ GTName = qi::lit("&gt;") [phoenix::ref(rv.class_name) += '>'];
 
     /* [10] Reference ::= AmpRef LTRef GTRef AposRef QuoteRef CharRef */
     Reference
@@ -178,15 +178,15 @@
     ;
 
     /* [11] content ::= '<' | (Reference | CharData)+ '<' */
- content = qi::lit(L'<') | +(Reference | CharData) >> qi::lit(L'<');
+ content = qi::lit('<') | +(Reference | CharData) >> qi::lit('<');
 
     ClassIDAttribute
       = qi::lit(BOOST_ARCHIVE_XML_CLASS_ID())
>> *NameChar
>> Eq
- >> L'"'
+ >> '"'
>> qi::short_[phoenix::ref(rv.class_id) = qi::_1]
- >> L'"'
+ >> '"'
     ;
 
     ObjectIDAttribute
@@ -195,17 +195,17 @@
         )
>> *NameChar
>> Eq
- >> L'"'
- >> qi::lit(L'_')
+ >> '"'
+ >> qi::lit('_')
>> qi::uint_[phoenix::ref(rv.object_id) = qi::_1]
- >> L'"'
+ >> '"'
     ;
         
     ClassNameChar
       = AmpName
       | LTName
       | GTName
- | (qi::char_ - L'"')[phoenix::ref(rv.class_name) += qi::_1]
+ | (qi::char_ - '"')[phoenix::ref(rv.class_name) += qi::_1]
     ;
     
     ClassName = *ClassNameChar;
@@ -213,33 +213,33 @@
     ClassNameAttribute
       = qi::lit(BOOST_ARCHIVE_XML_CLASS_NAME())
>> Eq
- >> L'"'
+ >> '"'
>> ClassName
- >> L'"'
+ >> '"'
     ;
 
     TrackingAttribute
       = qi::lit(BOOST_ARCHIVE_XML_TRACKING())
>> Eq
- >> L'"'
+ >> '"'
>> qi::uint_[phoenix::ref(rv.tracking_level) = qi::_1]
- >> L'"'
+ >> '"'
     ;
 
     VersionAttribute
       = qi::lit(BOOST_ARCHIVE_XML_VERSION())
>> Eq
- >> L'"'
+ >> '"'
>> qi::uint_[phoenix::ref(rv.version) = qi::_1]
- >> L'"'
+ >> '"'
     ;
 
     UnusedAttribute
       = Name
>> Eq
- >> L'"'
+ >> '"'
>> !CharData
- >> L'"'
+ >> '"'
     ;
 
     Attribute
@@ -253,29 +253,29 @@
 
     XMLDecl
       = -S
- >> L"<?xml"
+ >> "<?xml"
>> S
- >> L"version"
+ >> "version"
>> Eq
- >> L"\"1.0\""
+ >> "\"1.0\""
>> XMLDeclChars
>> !S
- >> L"?>"
+ >> "?>"
     ;
 
- DocTypeDecl = -S >> L"<!DOCTYPE" >> DocTypeDeclChars >> L">";
+ DocTypeDecl = -S >> "<!DOCTYPE" >> DocTypeDeclChars >> '>';
 
- SignatureAttribute = qi::lit(L"signature") >> Eq >> L'"' >> Name >> L'"';
+ SignatureAttribute = qi::lit("signature") >> Eq >> '"' >> Name >> '"';
     
     SerializationWrapper
       = -S
- >> L"<boost_serialization"
+ >> "<boost_serialization"
>> S
>> SignatureAttribute
>> S
>> VersionAttribute
>> !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-10-19 20:44:17 EDT (Tue, 19 Oct 2010)
@@ -61,12 +61,12 @@
     Letter = standard::char_("\x41-\x5A\x61-\x7A\xC0-\xD6\xD8-\xF6\xF8-\xFF");
     Digit = standard::digit;
     HexDigit = standard::xdigit;
- Extender = standard::char_("\xB7");
+ Extender = standard::char_('\xB7');
     Sch = standard::char_("\x20\x9\xD\xA");
     NameChar = Letter | Digit | standard::char_("._:-") | Extender ;
     AnyChar = standard::char_;
 
- DocTypeDeclChars = *(standard::char_ - qi::lit(">"));
+ DocTypeDeclChars = *(standard::char_ - qi::lit('>'));
     XMLDeclChars = *(standard::char_ - qi::lit("?>"));
     
     Name =

Modified: trunk/libs/serialization/src/xml_wgrammar.cpp
==============================================================================
--- trunk/libs/serialization/src/xml_wgrammar.cpp (original)
+++ trunk/libs/serialization/src/xml_wgrammar.cpp 2010-10-19 20:44:17 EDT (Tue, 19 Oct 2010)
@@ -144,7 +144,7 @@
 
     AnyChar = standard_wide::char_;
 
- DocTypeDeclChars = *(standard_wide::char_ - qi::lit(L">"));
+ DocTypeDeclChars = *(standard_wide::char_ - qi::lit(L'>'));
     XMLDeclChars = *(standard_wide::char_ - qi::lit(L"?>"));
     
     Name =


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