14 Dec
2007
14 Dec
'07
12:05 a.m.
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