Eric Niebler wrote:
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?
In case I wasn't clear, here is a little program that demonstrates what
I was getting at:
#include <string>
#include <iostream>
#include