Boost logo

Boost Users :

Subject: Re: [Boost-users] [spirit] first steps
From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2010-02-18 17:07:05


> > Your last 'text' parser eats your '\r\n' characters. As a result the
> eol parser fails.
>
> Ah, right, and the last struct field has "\r\n" at the end.
>
> If I change to:
> text %= lexeme[+(char_ - ':' - '\r' - '\n')];

I'd rather write:

  text %= lexeme[+~char_("\r\n:")];

which is more efficient.

> the last field is set correctly, but phrase_parse() still returns
> false. If I change eol to the explicit "\r\n", it still returns false.

Yeah, now your skip parser (space) is eating the eol characters. Use
qi::blank instead (which matches space and tab only).

Regards Hartmut

---------------
Meet me at BoostCon
www.boostcon.com


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