Boost logo

Boost Users :

Subject: Re: [Boost-users] [Boost.Spirit] Skippers for sub-grammars
From: Ovanes Markarian (om_boost_at_[hidden])
Date: 2010-10-22 06:10:28


Hi!

On Fri, Oct 22, 2010 at 10:50 AM, Vitaly Budovski
<vbudovski+news_at_[hidden]<vbudovski%2Bnews_at_[hidden]>
> wrote:

> qi::rule<Iterator/*, sub_grammar_skipper<Iterator> */> start;

Change this line to:
qi::rule<Iterator, void(), sub_grammar_skipper<Iterator> > start;

This should work. void() is needed if you grammar has no attributes. If your
grammar expands into smth. meaningful, than you must pass the type of the
associated attribute, e.g. if you grammar outputs string, you will write the
line like:

qi::rule<Iterator, std::string(), sub_grammar_skipper<Iterator> > start;

With kind regards,
Ovanes



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