boost-spirit-qi

Boost Spirit QI recursive

I must have missed something with the boost::recursive_wrapper thing, I always get an error: error: no matching function for call to 'boost::tuples::tuple, std::allocator >, client::compare_attr_op_t, std::basic_string, std::allocator >, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null...

How can I extract a std::string with boost.spirit?

Hi Using boost.spirit I try to parse simple command line of the form command:param1 param2... to do so I created this parser: (+(char_ - ':'))[ref(cmd) = _1] >> ':' >> (*char_)[ref(params) = _1] The attribute types of the two compounds parser is vector, so if cmd and params are of type vector this work. However if they are of type s...

Boost.Spirit bug when mixing "alternates" with "optionals"?

I've only been working with Boost.Spirit (from Boost 1.44) for three days, trying to parse raw e-mail messages by way of the exact grammar in RFC2822. I thought I was starting to understand it and get somewhere, but then I ran into a problem: #include <iostream> #include <boost/spirit/include/qi.hpp> namespace qi = boost::spirit::qi; u...

Parsing escaped strings with boost spirit

I´m working with Spirit 2.4 and I'd want to parse a structure like this: Text{text_field}; The point is that in text_field is a escaped string with the symbols '{', '}' and '\'. I would like to create a parser for this using qi. I've been trying this: using boost::spirit::standard::char_; using boost::spirit::standard::string; usi...