Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r68447 - trunk/libs/spirit/example/qi
From: joel_at_[hidden]
Date: 2011-01-25 18:39:33


Author: djowel
Date: 2011-01-25 18:39:30 EST (Tue, 25 Jan 2011)
New Revision: 68447
URL: http://svn.boost.org/trac/boost/changeset/68447

Log:
reverting code to reflect tutorial
Text files modified:
   trunk/libs/spirit/example/qi/mini_xml1.cpp | 8 +++-----
   1 files changed, 3 insertions(+), 5 deletions(-)

Modified: trunk/libs/spirit/example/qi/mini_xml1.cpp
==============================================================================
--- trunk/libs/spirit/example/qi/mini_xml1.cpp (original)
+++ trunk/libs/spirit/example/qi/mini_xml1.cpp 2011-01-25 18:39:30 EST (Tue, 25 Jan 2011)
@@ -18,7 +18,6 @@
 #include <boost/spirit/include/phoenix_operator.hpp>
 #include <boost/spirit/include/phoenix_fusion.hpp>
 #include <boost/spirit/include/phoenix_stl.hpp>
-#include <boost/spirit/include/phoenix_object.hpp>
 #include <boost/fusion/include/adapt_struct.hpp>
 #include <boost/variant/recursive_variant.hpp>
 #include <boost/foreach.hpp>
@@ -139,7 +138,6 @@
         {
             using qi::lit;
             using qi::lexeme;
- using qi::raw;
             using ascii::char_;
             using ascii::string;
             using namespace qi::labels;
@@ -147,13 +145,13 @@
             using phoenix::at_c;
             using phoenix::push_back;
 
- text %= lexeme[+(char_ - '<') ] ; // [_val = phoenix::construct<std::string>(begin(_1),end(_1))];
+ text = lexeme[+(char_ - '<') [_val += _1]];
             node = (xml | text) [_val = _1];
 
- start_tag %=
+ start_tag =
                     '<'
>> !lit('/')
- >> raw[lexeme[+(char_ - '>')]]
+ >> lexeme[+(char_ - '>') [_val += _1]]
>> '>'
             ;
 


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