Boost logo

Boost Users :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-05-16 18:29:29


"Hartmut Kaiser" <hartmut.kaiser_at_[hidden]> wrote in message
news:4288f4fa.479e9ebb.0475.ffffac35_at_mx.gmail.com...
|
| Sorry...
|
| > Thorsten Ottosen wrote:
| >
| > > Shouldn't it be possible to parse with the following syntax:
| > >
| > > std::string text( "fooooo");
| > > static rule<> r = *space_p >> '"' >>
| > > (*alnum_p)[assign_a(name)] >> '"';
| > > parse_info<std::string::const_iterator> info =
| > > boost::spirit::parse( text.begin(), text.end(), r );
| > >
| > > How do I otherwise interpret
| > >
| > > http://www.boost.org/libs/spirit/doc/scanner.html
| > >
| > > ?
| >
| > It should be:
| >
| > std::string text( "fooooo");
| > static rule<std::string::iterator> r =
| > *space_p >> '"' >> (*alnum_p)[assign_a(name)] >> '"';
| > parse_info<std::string::const_iterator> info =
|
| It should be:
|
| parse_info<std::string::iterator> info =
|
| > boost::spirit::parse( text.begin(), text.end(), r );

I still can't get it to work. Apparently the template argument for rule is a
scanner...so we cannot pass an iterator there, right?

This should be a pretty simple thing...what should I do to fix the example?

Thanks

-Thorsten, the confused


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