| 4994 |
KETRPOS. (It turns out to be convenient at runtime to detect this kind of |
KETRPOS. (It turns out to be convenient at runtime to detect this kind of |
| 4995 |
subpattern at both the start and at the end.) The use of special opcodes |
subpattern at both the start and at the end.) The use of special opcodes |
| 4996 |
makes it possible to reduce greatly the stack usage in pcre_exec(). If |
makes it possible to reduce greatly the stack usage in pcre_exec(). If |
| 4997 |
the group is preceded by OP_BRAZERO, convert this to OP_BRAPOSZERO. Then |
the group is preceded by OP_BRAZERO, convert this to OP_BRAPOSZERO. |
| 4998 |
cancel the possessive flag so that the default action below, of wrapping |
|
| 4999 |
everything inside atomic brackets, does not happen. */ |
Then, if the minimum number of matches is 1 or 0, cancel the possessive |
| 5000 |
|
flag so that the default action below, of wrapping everything inside |
| 5001 |
|
atomic brackets, does not happen. When the minimum is greater than 1, |
| 5002 |
|
there will be earlier copies of the group, and so we still have to wrap |
| 5003 |
|
the whole thing. */ |
| 5004 |
|
|
| 5005 |
else |
else |
| 5006 |
{ |
{ |
| 5072 |
} |
} |
| 5073 |
|
|
| 5074 |
/* If the minimum is zero, mark it as possessive, then unset the |
/* If the minimum is zero, mark it as possessive, then unset the |
| 5075 |
possessive flag. */ |
possessive flag when the minimum is 0 or 1. */ |
| 5076 |
|
|
| 5077 |
if (brazeroptr != NULL) *brazeroptr = OP_BRAPOSZERO; |
if (brazeroptr != NULL) *brazeroptr = OP_BRAPOSZERO; |
| 5078 |
possessive_quantifier = FALSE; |
if (repeat_min < 2) possessive_quantifier = FALSE; |
| 5079 |
} |
} |
| 5080 |
|
|
| 5081 |
/* Non-possessive quantifier */ |
/* Non-possessive quantifier */ |
| 5107 |
notation is just syntactic sugar, taken from Sun's Java package, but the |
notation is just syntactic sugar, taken from Sun's Java package, but the |
| 5108 |
special opcodes can optimize it. |
special opcodes can optimize it. |
| 5109 |
|
|
| 5110 |
Possessively repeated subpatterns have already been handled in the code |
Some (but not all) possessively repeated subpatterns have already been |
| 5111 |
just above, so possessive_quantifier is always FALSE for them at this |
completely handled in the code just above. For them, possessive_quantifier |
| 5112 |
stage. |
is always FALSE at this stage. |
| 5113 |
|
|
| 5114 |
Note that the repeated item starts at tempcode, not at previous, which |
Note that the repeated item starts at tempcode, not at previous, which |
| 5115 |
might be the first part of a string whose (former) last char we repeated. |
might be the first part of a string whose (former) last char we repeated. |