|
Boost Users : |
Subject: Re: [Boost-users] boost.xpressive: using placeholders with custom (check()) assertions
From: Eric Niebler (eric_at_[hidden])
Date: 2010-06-25 10:00:12
On 6/25/2010 7:35 AM, Alex Dubov wrote:
> Eric Niebler <eric <at> boostpro.com> 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
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