| OLD | NEW |
| 1 /* This is JavaScriptCore's variant of the PCRE library. While this library | 1 /* This is JavaScriptCore's variant of the PCRE library. While this library |
| 2 started out as a copy of PCRE, many of the features of PCRE have been | 2 started out as a copy of PCRE, many of the features of PCRE have been |
| 3 removed. This library now supports only the regular expression features | 3 removed. This library now supports only the regular expression features |
| 4 required by the JavaScript language specification, and has only the functions | 4 required by the JavaScript language specification, and has only the functions |
| 5 needed by JavaScriptCore and the rest of WebKit. | 5 needed by JavaScriptCore and the rest of WebKit. |
| 6 | 6 |
| 7 Originally written by Philip Hazel | 7 Originally written by Philip Hazel |
| 8 Copyright (c) 1997-2006 University of Cambridge | 8 Copyright (c) 1997-2006 University of Cambridge |
| 9 Copyright (C) 2002, 2004, 2006, 2007 Apple Inc. All rights reserved. | 9 Copyright (C) 2002, 2004, 2006, 2007 Apple Inc. All rights reserved. |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 35 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 36 POSSIBILITY OF SUCH DAMAGE. | 36 POSSIBILITY OF SUCH DAMAGE. |
| 37 ----------------------------------------------------------------------------- | 37 ----------------------------------------------------------------------------- |
| 38 */ | 38 */ |
| 39 | 39 |
| 40 /* This module contains an internal function that is used to match an extended | 40 /* This module contains an internal function that is used to match an extended |
| 41 class (one that contains characters whose values are > 255). */ | 41 class (one that contains characters whose values are > 255). */ |
| 42 | 42 |
| 43 #include "pcre_internal.h" | 43 #include "pcre_internal.h" |
| 44 | 44 |
| 45 namespace v8 { namespace jscre { |
| 46 |
| 45 /************************************************* | 47 /************************************************* |
| 46 * Match character against an XCLASS * | 48 * Match character against an XCLASS * |
| 47 *************************************************/ | 49 *************************************************/ |
| 48 | 50 |
| 49 /* This function is called to match a character against an extended class that | 51 /* This function is called to match a character against an extended class that |
| 50 might contain values > 255. | 52 might contain values > 255. |
| 51 | 53 |
| 52 Arguments: | 54 Arguments: |
| 53 c the character | 55 c the character |
| 54 data points to the flag byte of the XCLASS data | 56 data points to the flag byte of the XCLASS data |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 int x, y; | 107 int x, y; |
| 106 getUTF8CharAndAdvancePointer(x, data); | 108 getUTF8CharAndAdvancePointer(x, data); |
| 107 getUTF8CharAndAdvancePointer(y, data); | 109 getUTF8CharAndAdvancePointer(y, data); |
| 108 if (c >= x && c <= y) | 110 if (c >= x && c <= y) |
| 109 return !negated; | 111 return !negated; |
| 110 } | 112 } |
| 111 } | 113 } |
| 112 | 114 |
| 113 return negated; /* char did not match */ | 115 return negated; /* char did not match */ |
| 114 } | 116 } |
| 117 |
| 118 } } // namespace v8::jscre |
| OLD | NEW |