Boost logo

Boost Users :

Subject: Re: [Boost-users] [spirit] qi::raw and skip parsers
From: Joel de Guzman (joel_at_[hidden])
Date: 2010-11-25 06:50:48


On 11/25/2010 7:19 PM, Juraj Ivanèiæ wrote:
> Hi.
>
> I got unexpected results when I introduced qi::raw[] inside qi expressions. It seems that
> under certain circumstances qi::raw[] inhibits skip parser and thus fails to parse valid
> input. Furthermore, parse error only occurs if expression is stored in a rule - if
> expression is used directly as an argument to qi::parse everything works. Example attached.
>
> Is this a bug?
> If not - could someone kindly explain the rationale for this behavior.

You need to give the rule the skip parser to use, otherwise
it will inhibit skip parsing. try:

   qi::rule<std::string::const_iterator, std::string(), qi::space_type> rule( expr );

Regards,

-- 
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net

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