208 |
"malformed number or name after (?(", |
"malformed number or name after (?(", |
209 |
"conditional group contains more than two branches", |
"conditional group contains more than two branches", |
210 |
"assertion expected after (?(", |
"assertion expected after (?(", |
211 |
"(?R or (?digits must be followed by )", |
"(?R or (?[+-]digits must be followed by )", |
212 |
/* 30 */ |
/* 30 */ |
213 |
"unknown POSIX class name", |
"unknown POSIX class name", |
214 |
"POSIX collating elements are not supported", |
"POSIX collating elements are not supported", |
242 |
/* 55 */ |
/* 55 */ |
243 |
"repeating a DEFINE group is not allowed", |
"repeating a DEFINE group is not allowed", |
244 |
"inconsistent NEWLINE options", |
"inconsistent NEWLINE options", |
245 |
"\\g is not followed by an (optionally braced) non-zero number" |
"\\g is not followed by an (optionally braced) non-zero number", |
246 |
|
"(?+ or (?- or (?(+ or (?(- must be followed by a non-zero number" |
247 |
}; |
}; |
248 |
|
|
249 |
|
|
2096 |
int class_lastchar; |
int class_lastchar; |
2097 |
int newoptions; |
int newoptions; |
2098 |
int recno; |
int recno; |
2099 |
|
int refsign; |
2100 |
int skipbytes; |
int skipbytes; |
2101 |
int subreqbyte; |
int subreqbyte; |
2102 |
int subfirstbyte; |
int subfirstbyte; |
3623 |
|
|
3624 |
code[1+LINK_SIZE] = OP_CREF; |
code[1+LINK_SIZE] = OP_CREF; |
3625 |
skipbytes = 3; |
skipbytes = 3; |
3626 |
|
refsign = -1; |
3627 |
|
|
3628 |
/* Check for a test for recursion in a named group. */ |
/* Check for a test for recursion in a named group. */ |
3629 |
|
|
3647 |
terminator = '\''; |
terminator = '\''; |
3648 |
ptr++; |
ptr++; |
3649 |
} |
} |
3650 |
else terminator = 0; |
else |
3651 |
|
{ |
3652 |
|
terminator = 0; |
3653 |
|
if (ptr[1] == '-' || ptr[1] == '+') refsign = *(++ptr); |
3654 |
|
} |
3655 |
|
|
3656 |
/* We now expect to read a name; any thing else is an error */ |
/* We now expect to read a name; any thing else is an error */ |
3657 |
|
|
3687 |
if (lengthptr != NULL) break; |
if (lengthptr != NULL) break; |
3688 |
|
|
3689 |
/* In the real compile we do the work of looking for the actual |
/* In the real compile we do the work of looking for the actual |
3690 |
reference. */ |
reference. If the string started with "+" or "-" we require the rest to |
3691 |
|
be digits, in which case recno will be set. */ |
3692 |
|
|
3693 |
|
if (refsign > 0) |
3694 |
|
{ |
3695 |
|
if (recno <= 0) |
3696 |
|
{ |
3697 |
|
*errorcodeptr = ERR58; |
3698 |
|
goto FAILED; |
3699 |
|
} |
3700 |
|
if (refsign == '-') |
3701 |
|
{ |
3702 |
|
recno = cd->bracount - recno + 1; |
3703 |
|
if (recno <= 0) |
3704 |
|
{ |
3705 |
|
*errorcodeptr = ERR15; |
3706 |
|
goto FAILED; |
3707 |
|
} |
3708 |
|
} |
3709 |
|
else recno += cd->bracount; |
3710 |
|
PUT2(code, 2+LINK_SIZE, recno); |
3711 |
|
break; |
3712 |
|
} |
3713 |
|
|
3714 |
|
/* Otherwise (did not start with "+" or "-"), start by looking for the |
3715 |
|
name. */ |
3716 |
|
|
3717 |
slot = cd->name_table; |
slot = cd->name_table; |
3718 |
for (i = 0; i < cd->names_found; i++) |
for (i = 0; i < cd->names_found; i++) |
3719 |
{ |
{ |
4031 |
|
|
4032 |
|
|
4033 |
/* ------------------------------------------------------------ */ |
/* ------------------------------------------------------------ */ |
4034 |
|
case '-': case '+': |
4035 |
case '0': case '1': case '2': case '3': case '4': /* Recursion or */ |
case '0': case '1': case '2': case '3': case '4': /* Recursion or */ |
4036 |
case '5': case '6': case '7': case '8': case '9': /* subroutine */ |
case '5': case '6': case '7': case '8': case '9': /* subroutine */ |
4037 |
{ |
{ |
4038 |
const uschar *called; |
const uschar *called; |
4039 |
|
|
4040 |
|
if ((refsign = *ptr) == '+') ptr++; |
4041 |
|
else if (refsign == '-') |
4042 |
|
{ |
4043 |
|
if ((digitab[ptr[1]] & ctype_digit) == 0) |
4044 |
|
goto OTHER_CHAR_AFTER_QUERY; |
4045 |
|
ptr++; |
4046 |
|
} |
4047 |
|
|
4048 |
recno = 0; |
recno = 0; |
4049 |
while((digitab[*ptr] & ctype_digit) != 0) |
while((digitab[*ptr] & ctype_digit) != 0) |
4050 |
recno = recno * 10 + *ptr++ - '0'; |
recno = recno * 10 + *ptr++ - '0'; |
4051 |
|
|
4052 |
if (*ptr != ')') |
if (*ptr != ')') |
4053 |
{ |
{ |
4054 |
*errorcodeptr = ERR29; |
*errorcodeptr = ERR29; |
4055 |
goto FAILED; |
goto FAILED; |
4056 |
} |
} |
4057 |
|
|
4058 |
|
if (refsign == '-') |
4059 |
|
{ |
4060 |
|
if (recno == 0) |
4061 |
|
{ |
4062 |
|
*errorcodeptr = ERR58; |
4063 |
|
goto FAILED; |
4064 |
|
} |
4065 |
|
recno = cd->bracount - recno + 1; |
4066 |
|
if (recno <= 0) |
4067 |
|
{ |
4068 |
|
*errorcodeptr = ERR15; |
4069 |
|
goto FAILED; |
4070 |
|
} |
4071 |
|
} |
4072 |
|
else if (refsign == '+') |
4073 |
|
{ |
4074 |
|
if (recno == 0) |
4075 |
|
{ |
4076 |
|
*errorcodeptr = ERR58; |
4077 |
|
goto FAILED; |
4078 |
|
} |
4079 |
|
recno += cd->bracount; |
4080 |
|
} |
4081 |
|
|
4082 |
/* Come here from code above that handles a named recursion */ |
/* Come here from code above that handles a named recursion */ |
4083 |
|
|
4151 |
|
|
4152 |
/* ------------------------------------------------------------ */ |
/* ------------------------------------------------------------ */ |
4153 |
default: /* Other characters: check option setting */ |
default: /* Other characters: check option setting */ |
4154 |
|
OTHER_CHAR_AFTER_QUERY: |
4155 |
set = unset = 0; |
set = unset = 0; |
4156 |
optset = &set; |
optset = &set; |
4157 |
|
|