Changeset 27752 in webkit for trunk/JavaScriptCore/pcre/pcre_exec.cpp
- Timestamp:
- Nov 13, 2007, 9:25:26 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/pcre/pcre_exec.cpp
r27733 r27752 604 604 BEGIN_OPCODE(KETRMIN): 605 605 BEGIN_OPCODE(KETRMAX): 606 {607 606 frame->prev = frame->ecode - GET(frame->ecode, 1); 608 607 frame->saved_eptr = frame->eptrb->epb_saved_eptr; … … 682 681 if (is_match) RRETURN; 683 682 } 684 }685 683 RRETURN; 686 684 687 /* Start of subject unless notbol, or after internal newline if multiline*/685 /* Start of subject, or after internal newline if multiline. */ 688 686 689 687 BEGIN_OPCODE(CIRC): 690 if (md->multiline) 691 { 692 if (frame->eptr != md->start_subject && !IS_NEWLINE(frame->eptr[-1])) 693 RRETURN_NO_MATCH; 694 frame->ecode++; 695 NEXT_OPCODE; 696 } 697 if (frame->eptr != md->start_subject) RRETURN_NO_MATCH; 688 if (frame->eptr != md->start_subject && (!md->multiline || !IS_NEWLINE(frame->eptr[-1]))) 689 RRETURN_NO_MATCH; 698 690 frame->ecode++; 699 691 NEXT_OPCODE; 700 692 701 /* Assert before internal newline if multiline, or before a terminating 702 newline unless endonly is set, else end of subject unless noteol is set. */ 693 /* End of subject, or before internal newline if multiline. */ 703 694 704 695 BEGIN_OPCODE(DOLL): 705 if (md->multiline) 706 { 707 if (frame->eptr < md->end_subject) 708 { if (!IS_NEWLINE(*frame->eptr)) RRETURN_NO_MATCH; } 709 frame->ecode++; 710 } 711 else 712 { 713 if (frame->eptr < md->end_subject - 1 || 714 (frame->eptr == md->end_subject - 1 && !IS_NEWLINE(*frame->eptr))) 715 RRETURN_NO_MATCH; 716 frame->ecode++; 717 } 696 if (frame->eptr < md->end_subject && (!md->multiline || !IS_NEWLINE(*frame->eptr))) 697 RRETURN_NO_MATCH; 698 frame->ecode++; 718 699 NEXT_OPCODE; 719 700 … … 722 703 BEGIN_OPCODE(NOT_WORD_BOUNDARY): 723 704 BEGIN_OPCODE(WORD_BOUNDARY): 724 {725 705 /* Find out if the previous and current characters are "word" characters. 726 706 It takes a bit more work in UTF-8 mode. Characters > 128 are assumed to 727 707 be "non-word" characters. */ 728 708 729 {730 709 if (frame->eptr == md->start_subject) prev_is_word = false; else 731 710 { … … 740 719 cur_is_word = c < 128 && (md->ctypes[c] & ctype_word) != 0; 741 720 } 742 }743 721 744 722 /* Now see if the situation is what we want */ … … 747 725 cur_is_word == prev_is_word : cur_is_word != prev_is_word) 748 726 RRETURN_NO_MATCH; 749 }750 727 NEXT_OPCODE; 751 728
Note:
See TracChangeset
for help on using the changeset viewer.