On 6/25/2010 7:35 AM, Alex Dubov wrote:
Eric Niebler
writes: On 6/16/2010 3:04 AM, Alex Dubov wrote:
However, raised assertion will not stop the matching, because it only applies to one branch of the regexp. It could be very handy if there was a way to signal from assertion that a larger containing expression matched it results.
I don't understand that last sentence. Can you clarify?
I thought about something on the lines of:
sregex large_expr(*((expr)[check(cond())] | _));
With cond() being able to use a statement
<something>.set_matched(large_expr)
to signal that "large_expr" as a whole can be considered matched for now.
Oh. No, xpressive's flow control would not allow for random jumps like that. It would seriously mess up how xpressive does backtracking. Sorry. -- Eric Niebler BoostPro Computing http://www.boostpro.com