Boost logo

Boost Users :

From: john (john.ettedgui_at_[hidden])
Date: 2007-12-13 19:05:26


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 ;) )

Thanks


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