|
Boost Users : |
Subject: Re: [Boost-users] Xpressive, symantic actions and combination enumeration
From: Eric Niebler (eric_at_[hidden])
Date: 2009-05-05 12:34:06
Lee Simpson wrote:
> Hi,
>
> First let me say. Awesome library and thanks for releasing it to the world.
Thanks!
> I'm looking for a way to apply all the currently queued semantic actions
> _without_ turning off backtracking.
> So, as the manual suggests, keep manages to apply the queued actions but
> it also turns off backtracking.
>
<snip>
>
> Any ideas?
You don't have to turn off backtracking for the whole regex. You can use
keep() in a few strategic places within your regex as follows:
sregex rx = ... >> keep(nil[ /*semantic action*/ ]) >> ...;
"nil" always succeeds and consumes 0 characters. It's a way to cause the
semantic action to execute immediately. Would something like that help you?
-- 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