| 2544 |
else |
else |
| 2545 |
#endif /* SUPPORT_UTF8 */ |
#endif /* SUPPORT_UTF8 */ |
| 2546 |
return (item == cd->fcc[next]); /* Non-UTF-8 mode */ |
return (item == cd->fcc[next]); /* Non-UTF-8 mode */ |
| 2547 |
|
|
| 2548 |
|
/* Note that OP_DIGIT etc. are generated only when PCRE_UCP is *not* set. |
| 2549 |
|
When it is set, \d etc. are converted into OP_(NOT_)PROP codes. */ |
| 2550 |
|
|
| 2551 |
case OP_DIGIT: |
case OP_DIGIT: |
| 2552 |
return next > 127 || (cd->ctypes[next] & ctype_digit) == 0; |
return next > 127 || (cd->ctypes[next] & ctype_digit) == 0; |
| 2589 |
case 0x202f: |
case 0x202f: |
| 2590 |
case 0x205f: |
case 0x205f: |
| 2591 |
case 0x3000: |
case 0x3000: |
| 2592 |
return op_code != OP_HSPACE; |
return op_code == OP_NOT_HSPACE; |
| 2593 |
default: |
default: |
| 2594 |
return op_code == OP_HSPACE; |
return op_code != OP_NOT_HSPACE; |
| 2595 |
} |
} |
| 2596 |
|
|
| 2597 |
|
case OP_ANYNL: |
| 2598 |
case OP_VSPACE: |
case OP_VSPACE: |
| 2599 |
case OP_NOT_VSPACE: |
case OP_NOT_VSPACE: |
| 2600 |
switch(next) |
switch(next) |
| 2606 |
case 0x85: |
case 0x85: |
| 2607 |
case 0x2028: |
case 0x2028: |
| 2608 |
case 0x2029: |
case 0x2029: |
| 2609 |
return op_code != OP_VSPACE; |
return op_code == OP_NOT_VSPACE; |
| 2610 |
default: |
default: |
| 2611 |
return op_code == OP_VSPACE; |
return op_code != OP_NOT_VSPACE; |
| 2612 |
} |
} |
| 2613 |
|
|
| 2614 |
default: |
default: |
| 2616 |
} |
} |
| 2617 |
|
|
| 2618 |
|
|
| 2619 |
/* Handle the case when the next item is \d, \s, etc. */ |
/* Handle the case when the next item is \d, \s, etc. Note that when PCRE_UCP |
| 2620 |
|
is set, \d turns into ESC_du rather than ESC_d, etc., so ESC_d etc. are |
| 2621 |
|
generated only when PCRE_UCP is *not* set, that is, when only ASCII |
| 2622 |
|
characteristics are recognized. */ |
| 2623 |
|
|
| 2624 |
switch(op_code) |
switch(op_code) |
| 2625 |
{ |
{ |
| 2698 |
|
|
| 2699 |
case OP_DIGIT: |
case OP_DIGIT: |
| 2700 |
return next == -ESC_D || next == -ESC_s || next == -ESC_W || |
return next == -ESC_D || next == -ESC_s || next == -ESC_W || |
| 2701 |
next == -ESC_h || next == -ESC_v; |
next == -ESC_h || next == -ESC_v || next == -ESC_R; |
| 2702 |
|
|
| 2703 |
case OP_NOT_DIGIT: |
case OP_NOT_DIGIT: |
| 2704 |
return next == -ESC_d; |
return next == -ESC_d; |
| 2705 |
|
|
| 2706 |
case OP_WHITESPACE: |
case OP_WHITESPACE: |
| 2707 |
return next == -ESC_S || next == -ESC_d || next == -ESC_w; |
return next == -ESC_S || next == -ESC_d || next == -ESC_w || next == -ESC_R; |
| 2708 |
|
|
| 2709 |
case OP_NOT_WHITESPACE: |
case OP_NOT_WHITESPACE: |
| 2710 |
return next == -ESC_s || next == -ESC_h || next == -ESC_v; |
return next == -ESC_s || next == -ESC_h || next == -ESC_v; |
| 2711 |
|
|
| 2712 |
case OP_HSPACE: |
case OP_HSPACE: |
| 2713 |
return next == -ESC_S || next == -ESC_H || next == -ESC_d || next == -ESC_w; |
return next == -ESC_S || next == -ESC_H || next == -ESC_d || |
| 2714 |
|
next == -ESC_w || next == -ESC_v || next == -ESC_R; |
| 2715 |
|
|
| 2716 |
case OP_NOT_HSPACE: |
case OP_NOT_HSPACE: |
| 2717 |
return next == -ESC_h; |
return next == -ESC_h; |
| 2718 |
|
|
| 2719 |
/* Can't have \S in here because VT matches \S (Perl anomaly) */ |
/* Can't have \S in here because VT matches \S (Perl anomaly) */ |
| 2720 |
|
case OP_ANYNL: |
| 2721 |
case OP_VSPACE: |
case OP_VSPACE: |
| 2722 |
return next == -ESC_V || next == -ESC_d || next == -ESC_w; |
return next == -ESC_V || next == -ESC_d || next == -ESC_w; |
| 2723 |
|
|
| 2724 |
case OP_NOT_VSPACE: |
case OP_NOT_VSPACE: |
| 2725 |
return next == -ESC_v; |
return next == -ESC_v || next == -ESC_R; |
| 2726 |
|
|
| 2727 |
case OP_WORDCHAR: |
case OP_WORDCHAR: |
| 2728 |
return next == -ESC_W || next == -ESC_s || next == -ESC_h || next == -ESC_v; |
return next == -ESC_W || next == -ESC_s || next == -ESC_h || |
| 2729 |
|
next == -ESC_v || next == -ESC_R; |
| 2730 |
|
|
| 2731 |
case OP_NOT_WORDCHAR: |
case OP_NOT_WORDCHAR: |
| 2732 |
return next == -ESC_w || next == -ESC_d; |
return next == -ESC_w || next == -ESC_d; |