| 6 |
and semantics are as close as possible to those of the Perl 5 language. |
and semantics are as close as possible to those of the Perl 5 language. |
| 7 |
|
|
| 8 |
Written by Philip Hazel |
Written by Philip Hazel |
| 9 |
Copyright (c) 1997-2008 University of Cambridge |
Copyright (c) 1997-2009 University of Cambridge |
| 10 |
|
|
| 11 |
----------------------------------------------------------------------------- |
----------------------------------------------------------------------------- |
| 12 |
Redistribution and use in source and binary forms, with or without |
Redistribution and use in source and binary forms, with or without |
| 5811 |
NULL, 0, FALSE); |
NULL, 0, FALSE); |
| 5812 |
register int op = *scode; |
register int op = *scode; |
| 5813 |
|
|
| 5814 |
/* If we are at the start of a conditional group, skip over the condition. |
/* If we are at the start of a conditional assertion group, *both* the |
| 5815 |
before inspecting the first opcode after the condition. */ |
conditional assertion *and* what follows the condition must satisfy the test |
| 5816 |
|
for start of line. Other kinds of condition fail. Note that there may be an |
| 5817 |
|
auto-callout at the start of a condition. */ |
| 5818 |
|
|
| 5819 |
if (op == OP_COND) |
if (op == OP_COND) |
| 5820 |
{ |
{ |
| 5821 |
scode += 1 + LINK_SIZE; |
scode += 1 + LINK_SIZE; |
| 5822 |
|
if (*scode == OP_CALLOUT) scode += _pcre_OP_lengths[OP_CALLOUT]; |
| 5823 |
switch (*scode) |
switch (*scode) |
| 5824 |
{ |
{ |
| 5825 |
case OP_CREF: |
case OP_CREF: |
| 5826 |
case OP_RREF: |
case OP_RREF: |
|
scode += 3; |
|
|
break; |
|
|
|
|
| 5827 |
case OP_DEF: |
case OP_DEF: |
| 5828 |
scode += 1; |
return FALSE; |
|
break; |
|
| 5829 |
|
|
| 5830 |
default: /* Assertion */ |
default: /* Assertion */ |
| 5831 |
|
if (!is_startline(scode, bracket_map, backref_map)) return FALSE; |
| 5832 |
do scode += GET(scode, 1); while (*scode == OP_ALT); |
do scode += GET(scode, 1); while (*scode == OP_ALT); |
| 5833 |
|
scode += 1 + LINK_SIZE; |
| 5834 |
break; |
break; |
| 5835 |
} |
} |
|
|
|
| 5836 |
scode = first_significant_code(scode, NULL, 0, FALSE); |
scode = first_significant_code(scode, NULL, 0, FALSE); |
| 5837 |
op = *scode; |
op = *scode; |
| 5838 |
} |
} |
| 6055 |
} |
} |
| 6056 |
#endif |
#endif |
| 6057 |
|
|
| 6058 |
if ((options & ~PUBLIC_OPTIONS) != 0) |
if ((options & ~PUBLIC_COMPILE_OPTIONS) != 0) |
| 6059 |
{ |
{ |
| 6060 |
errorcode = ERR17; |
errorcode = ERR17; |
| 6061 |
goto PCRE_EARLY_ERROR_RETURN; |
goto PCRE_EARLY_ERROR_RETURN; |