Boost logo

Boost Users :

Subject: Re: [Boost-users] tokenize string delimiter
From: Matthias Vallentin (vallentin_at_[hidden])
Date: 2010-02-12 00:53:02


On Thu, Feb 11, 2010 at 03:22:53PM -0700, OvermindDL1 wrote:
> std::string result;
> parse(str.begin(),str.end(), raw[+~char_(delim)]%lit(delim), result);

This fails in the first argument of qi::parse:

    using boost::spirit::qi::lit;
    using boost::spirit::qi::raw;
    using boost::spirit::qi::string;

    std::string str("foo---bar---baz");
    std::string delim("---");
    std::string result;
    boost::spirit::qi::parse(str.begin(), str.end(),
            raw[+~string(delim)] % lit(delim), result);

Any ideas why?

   Matthias

-- 
Matthias Vallentin
vallentin_at_[hidden]
http://www.icir.org/matthias

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net