Fixed atomic group backtracking bug.
This commit is contained in:
parent
d01c822c6d
commit
666e94cd59
|
@ -111,6 +111,12 @@ such as the 04 in 10.04 incorrectly and hence giving wrong results.
|
|||
24. Updated to Unicode version 11.0.0. As well as the usual addition of new
|
||||
scripts and characters, this involved re-jigging the grapheme break property
|
||||
algorithm because Unicode has changed the way emojis are handled.
|
||||
|
||||
25. Fixed an obscure bug that struck when there were two atomic groups not
|
||||
separated by something with a backtracking point. There could be an incorrect
|
||||
backtrack into the first of the atomic groups. A complicated example is
|
||||
/(?>a(*:1))(?>b)(*SKIP:1)x|.*/ matched against "abc", where the *SKIP
|
||||
shouldn't find a MARK (because is in an atomic group), but it did.
|
||||
|
||||
|
||||
Version 10.31 12-February-2018
|
||||
|
|
|
@ -5509,7 +5509,7 @@ fprintf(stderr, "++ op=%d\n", *Fecode);
|
|||
frame so that it points to the final branch. */
|
||||
|
||||
case OP_ONCE:
|
||||
Fback_frame = ((char *)F - (char *)P) + frame_size;
|
||||
Fback_frame = ((char *)F - (char *)P);
|
||||
for (;;)
|
||||
{
|
||||
uint32_t y = GET(P->ecode,1);
|
||||
|
|
|
@ -6203,4 +6203,10 @@ ef) x/x,mark
|
|||
/a(?:(*:X))(*SKIP:X)(*F)|(.)/
|
||||
abc
|
||||
|
||||
/(?>a(*:1))(?>b(*:1))(*SKIP:1)x|.*/no_start_optimize
|
||||
abc
|
||||
|
||||
/(?>a(*:1))(?>b)(*SKIP:1)x|.*/no_start_optimize
|
||||
abc
|
||||
|
||||
# End of testinput1
|
||||
|
|
|
@ -9846,4 +9846,12 @@ No match
|
|||
0: b
|
||||
1: b
|
||||
|
||||
/(?>a(*:1))(?>b(*:1))(*SKIP:1)x|.*/no_start_optimize
|
||||
abc
|
||||
0: abc
|
||||
|
||||
/(?>a(*:1))(?>b)(*SKIP:1)x|.*/no_start_optimize
|
||||
abc
|
||||
0: abc
|
||||
|
||||
# End of testinput1
|
||||
|
|
Loading…
Reference in New Issue