Boost logo

Boost Users :

From: Joel de Guzman (joel_at_[hidden])
Date: 2007-12-13 23:42:04


john wrote:
> Hello,
>
> I have a string I want to parse that is like that
>
> A or A or A or ( C or C or C or ( D) or C) or B.
>
> Obviously A and B are just something else but we don't care about it here.
>
> I define it as
> mystring = (A | (ch_p('(') >> A >> ch_p(')'))) >> * ("or" >> (A | mystring))
>
> the problem is that as this is exactly the same over and over, I'm getting the
> end results in the furthest mystring possible: B will be part of "( C or C or C
> or ( D) or C) or B" and not of the total string and that messes my grammar :(
>
> I have no idea how to pass that trouble, so any help on that would be
> appreciated (well if anyone understood what I said ;) )

Spirit, I assume? The proper mailing list is:
https://lists.sourceforge.net/lists/listinfo/spirit-general

Cya there.

Regards,

-- 
Joel de Guzman
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