Boost logo

Boost Users :

From: Joel de Guzman (djowel_at_[hidden])
Date: 2003-04-30 00:18:53


Markus Werle wrote:
> Hi!
>
> While playing around with the examples of the spirit library
> I feel like I missed some essential points.

Hi Markus,

First of all, FYI, Spirit has its own mailing list:
Spirit-general_at_[hidden]
https://lists.sourceforge.net/lists/listinfo/spirit-general

I'm regularly reading this mailing list but I would want to
request that further discussion happen there so that other
Spirit users may see your post.

> std::string comment_c;
>
> all =
> (
> *cpp_comment[actor_string(comment_c)]
> |
> *anychar_p
> )
> ;

Try:

    all =
        *(cpp_comment[actor_string(comment_c)] |anychar_p)
        ;

Notice the Star. Also, anychar_p should probably be replaced by your
assignment rule.

> result = parse (pCComment, all, space_p);

I think it is better to work on the character level rather
than the phrase level. I suggest taking out the skip parser
"space_p".

HTH,

-- 
Joel de Guzman
joel at boost-consulting.com
http://www.boost-consulting.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