├── .gitignore └── .gitignore ├── Bin └── mtent12.txt ├── CMakeLists.txt ├── CompilePCREx64.ps1 ├── CompilePCREx86.ps1 ├── Demos ├── benchmark.dpr ├── benchmark.dproj └── benchmark.res ├── LICENSE ├── PatchRegularExpressionsAPI.ps1 ├── README.md ├── Source ├── RegularExpressionsApi.diff └── obj │ └── pcre │ ├── win32 │ ├── dirinfo.txt │ ├── pcre16_byte_order.obj │ ├── pcre16_chartables.obj │ ├── pcre16_compile.obj │ ├── pcre16_config.obj │ ├── pcre16_dfa_exec.obj │ ├── pcre16_exec.obj │ ├── pcre16_fullinfo.obj │ ├── pcre16_get.obj │ ├── pcre16_globals.obj │ ├── pcre16_jit_compile.obj │ ├── pcre16_maketables.obj │ ├── pcre16_newline.obj │ ├── pcre16_ord2utf16.obj │ ├── pcre16_refcount.obj │ ├── pcre16_string_utils.obj │ ├── pcre16_study.obj │ ├── pcre16_tables.obj │ ├── pcre16_ucd.obj │ ├── pcre16_utf16_utils.obj │ ├── pcre16_valid_utf16.obj │ ├── pcre16_version.obj │ └── pcre16_xclass.obj │ └── win64 │ ├── dirinfo.txt │ ├── pcre16_byte_order.obj │ ├── pcre16_chartables.obj │ ├── pcre16_compile.obj │ ├── pcre16_config.obj │ ├── pcre16_dfa_exec.obj │ ├── pcre16_exec.obj │ ├── pcre16_fullinfo.obj │ ├── pcre16_get.obj │ ├── pcre16_globals.obj │ ├── pcre16_jit_compile.obj │ ├── pcre16_maketables.obj │ ├── pcre16_newline.obj │ ├── pcre16_ord2utf16.obj │ ├── pcre16_refcount.obj │ ├── pcre16_string_utils.obj │ ├── pcre16_study.obj │ ├── pcre16_tables.obj │ ├── pcre16_ucd.obj │ ├── pcre16_utf16_utils.obj │ ├── pcre16_valid_utf16.obj │ ├── pcre16_version.obj │ └── pcre16_xclass.obj ├── objconv.exe └── pcre-8.44.zip /.gitignore/.gitignore: -------------------------------------------------------------------------------- 1 | # Uncomment these types if you want even more clean repository. But be careful. 2 | # It can make harm to an existing project source. Read explanations below. 3 | # 4 | # Resource files are binaries containing manifest, project icon and version info. 5 | # They can not be viewed as text or compared by diff-tools. Consider replacing them with .rc files. 6 | #*.res 7 | # 8 | # Type library file (binary). In old Delphi versions it should be stored. 9 | # Since Delphi 2009 it is produced from .ridl file and can safely be ignored. 10 | #*.tlb 11 | # 12 | # Diagram Portfolio file. Used by the diagram editor up to Delphi 7. 13 | # Uncomment this if you are not using diagrams or use newer Delphi version. 14 | #*.ddp 15 | # 16 | # Visual LiveBindings file. Added in Delphi XE2. 17 | # Uncomment this if you are not using LiveBindings Designer. 18 | #*.vlb 19 | # 20 | # Deployment Manager configuration file for your project. Added in Delphi XE2. 21 | # Uncomment this if it is not mobile development and you do not use remote debug feature. 22 | #*.deployproj 23 | # 24 | # C++ object files produced when C/C++ Output file generation is configured. 25 | # Uncomment this if you are not using external objects (zlib library for example). 26 | #*.obj 27 | # 28 | 29 | # Delphi compiler-generated binaries (safe to delete) 30 | *.exe 31 | *.dll 32 | *.bpl 33 | *.bpi 34 | *.dcp 35 | *.so 36 | *.apk 37 | *.drc 38 | *.map 39 | *.dres 40 | *.rsm 41 | *.tds 42 | *.dcu 43 | *.lib 44 | *.a 45 | *.o 46 | *.ocx 47 | 48 | # Delphi autogenerated files (duplicated info) 49 | *.cfg 50 | *.hpp 51 | *Resource.rc 52 | 53 | # Delphi local files (user-specific info) 54 | *.local 55 | *.identcache 56 | *.projdata 57 | *.tvsconfig 58 | *.dsk 59 | 60 | # Delphi history and backups 61 | __history/ 62 | __recovery/ 63 | *.~* 64 | 65 | # Castalia statistics file (since XE7 Castalia is distributed with Delphi) 66 | *.stat 67 | 68 | # Boss dependency manager vendor folder https://github.com/HashLoad/boss 69 | modules/ 70 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # CMakeLists.txt 2 | # 3 | # 4 | # This file allows building PCRE with the CMake configuration and build 5 | # tool. Download CMake in source or binary form from http://www.cmake.org/ 6 | # 7 | # Original listfile by Christian Ehrlicher 8 | # Refined and expanded by Daniel Richard G. 9 | # 2007-09-14 mod by Sheri so 7.4 supported configuration options can be entered 10 | # 2007-09-19 Adjusted by PH to retain previous default settings 11 | # 2007-12-26 (a) On UNIX, use names libpcre instead of just pcre 12 | # (b) Ensure pcretest and pcregrep link with the local library, 13 | # not a previously-installed one. 14 | # (c) Add PCRE_SUPPORT_LIBREADLINE, PCRE_SUPPORT_LIBZ, and 15 | # PCRE_SUPPORT_LIBBZ2. 16 | # 2008-01-20 Brought up to date to include several new features by Christian 17 | # Ehrlicher. 18 | # 2008-01-22 Sheri added options for backward compatibility of library names 19 | # when building with minGW: 20 | # if "ON", NON_STANDARD_LIB_PREFIX causes shared libraries to 21 | # be built without "lib" as prefix. (The libraries will be named 22 | # pcre.dll, pcreposix.dll and pcrecpp.dll). 23 | # if "ON", NON_STANDARD_LIB_SUFFIX causes shared libraries to 24 | # be built with suffix of "-0.dll". (The libraries will be named 25 | # libpcre-0.dll, libpcreposix-0.dll and libpcrecpp-0.dll - same names 26 | # built by default with Configure and Make. 27 | # 2008-01-23 PH removed the automatic build of pcredemo. 28 | # 2008-04-22 PH modified READLINE support so it finds NCURSES when needed. 29 | # 2008-07-03 PH updated for revised UCP property support (change of files) 30 | # 2009-03-23 PH applied Steven Van Ingelgem's patch to change the name 31 | # CMAKE_BINARY_DIR to PROJECT_BINARY_DIR so that it works when PCRE 32 | # is included within another project. 33 | # 2009-03-23 PH applied a modified version of Steven Van Ingelgem's patches to 34 | # add options to stop the building of pcregrep and the tests, and 35 | # to disable the final configuration report. 36 | # 2009-04-11 PH applied Christian Ehrlicher's patch to show compiler flags that 37 | # are set by specifying a release type. 38 | # 2010-01-02 PH added test for stdint.h 39 | # 2010-03-02 PH added test for inttypes.h 40 | # 2011-08-01 PH added PCREGREP_BUFSIZE 41 | # 2011-08-22 PH added PCRE_SUPPORT_JIT 42 | # 2011-09-06 PH modified WIN32 ADD_TEST line as suggested by Sergey Cherepanov 43 | # 2011-09-06 PH added PCRE_SUPPORT_PCREGREP_JIT 44 | # 2011-10-04 Sheri added support for including coff data in windows shared libraries 45 | # compiled with MINGW if pcre.rc and/or pcreposix.rc are placed in 46 | # the source dir by the user prior to building 47 | # 2011-10-04 Sheri changed various add_test's to use exes' location built instead 48 | # of DEBUG location only (likely only matters in MSVC) 49 | # 2011-10-04 Sheri added scripts to provide needed variables to RunTest and 50 | # RunGrepTest (used for UNIX and Msys) 51 | # 2011-10-04 Sheri added scripts to provide needed variables and to execute 52 | # RunTest.bat in Win32 (for effortless testing with "make test") 53 | # 2011-10-04 Sheri Increased minimum required cmake version 54 | # 2012-01-06 PH removed pcre_info.c and added pcre_string_utils.c 55 | # 2012-01-10 Zoltan Herczeg added libpcre16 support 56 | # 2012-01-13 Stephen Kelly added out of source build support 57 | # 2012-01-17 PH applied Stephen Kelly's patch to parse the version data out 58 | # of the configure.ac file 59 | # 2012-02-26 PH added support for libedit 60 | # 2012-09-06 PH added support for PCRE_EBCDIC_NL25 61 | # 2012-09-08 ChPe added PCRE32 support 62 | # 2012-10-23 PH added support for VALGRIND and GCOV 63 | # 2012-12-08 PH added patch from Daniel Richard G to quash some MSVC warnings 64 | # 2013-07-01 PH realized that the "support" for GCOV was a total nonsense and 65 | # so it has been removed. 66 | # 2013-10-08 PH got rid of the "source" command, which is a bash-ism (use ".") 67 | # 2013-11-05 PH added support for PARENS_NEST_LIMIT 68 | # 2016-03-01 PH applied Chris Wilson's patch for MSVC static build 69 | # 2016-06-24 PH applied Chris Wilson's revised patch (adds a separate option) 70 | 71 | PROJECT(PCRE C CXX) 72 | 73 | # Increased minimum to 2.8.0 to support newer add_test features. Set policy 74 | # CMP0026 to avoid warnings for the use of LOCATION in GET_TARGET_PROPERTY. 75 | 76 | CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0) 77 | CMAKE_POLICY(SET CMP0026 OLD) 78 | 79 | SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) # for FindReadline.cmake 80 | 81 | # external packages 82 | FIND_PACKAGE( BZip2 ) 83 | FIND_PACKAGE( ZLIB ) 84 | FIND_PACKAGE( Readline ) 85 | FIND_PACKAGE( Editline ) 86 | 87 | # Configuration checks 88 | 89 | INCLUDE(CheckIncludeFile) 90 | INCLUDE(CheckIncludeFileCXX) 91 | INCLUDE(CheckFunctionExists) 92 | INCLUDE(CheckTypeSize) 93 | 94 | CHECK_INCLUDE_FILE(dirent.h HAVE_DIRENT_H) 95 | CHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H) 96 | CHECK_INCLUDE_FILE(inttypes.h HAVE_INTTYPES_H) 97 | CHECK_INCLUDE_FILE(sys/stat.h HAVE_SYS_STAT_H) 98 | CHECK_INCLUDE_FILE(sys/types.h HAVE_SYS_TYPES_H) 99 | CHECK_INCLUDE_FILE(unistd.h HAVE_UNISTD_H) 100 | CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_H) 101 | 102 | CHECK_INCLUDE_FILE_CXX(type_traits.h HAVE_TYPE_TRAITS_H) 103 | CHECK_INCLUDE_FILE_CXX(bits/type_traits.h HAVE_BITS_TYPE_TRAITS_H) 104 | 105 | CHECK_FUNCTION_EXISTS(bcopy HAVE_BCOPY) 106 | CHECK_FUNCTION_EXISTS(memmove HAVE_MEMMOVE) 107 | CHECK_FUNCTION_EXISTS(strerror HAVE_STRERROR) 108 | CHECK_FUNCTION_EXISTS(strtoll HAVE_STRTOLL) 109 | CHECK_FUNCTION_EXISTS(strtoq HAVE_STRTOQ) 110 | CHECK_FUNCTION_EXISTS(_strtoi64 HAVE__STRTOI64) 111 | 112 | CHECK_TYPE_SIZE("long long" LONG_LONG) 113 | CHECK_TYPE_SIZE("unsigned long long" UNSIGNED_LONG_LONG) 114 | 115 | # User-configurable options 116 | # 117 | # (Note: CMakeSetup displays these in alphabetical order, regardless of 118 | # the order we use here) 119 | 120 | SET(BUILD_SHARED_LIBS OFF CACHE BOOL 121 | "Build shared libraries instead of static ones.") 122 | 123 | OPTION(PCRE_BUILD_PCRE8 "Build 8 bit PCRE library" ON) 124 | 125 | OPTION(PCRE_BUILD_PCRE16 "Build 16 bit PCRE library" OFF) 126 | 127 | OPTION(PCRE_BUILD_PCRE32 "Build 32 bit PCRE library" OFF) 128 | 129 | OPTION(PCRE_BUILD_PCRECPP "Build the PCRE C++ library (pcrecpp)." ON) 130 | 131 | SET(PCRE_EBCDIC OFF CACHE BOOL 132 | "Use EBCDIC coding instead of ASCII. (This is rarely used outside of mainframe systems.)") 133 | 134 | SET(PCRE_EBCDIC_NL25 OFF CACHE BOOL 135 | "Use 0x25 as EBCDIC NL character instead of 0x15; implies EBCDIC.") 136 | 137 | SET(PCRE_LINK_SIZE "2" CACHE STRING 138 | "Internal link size (2, 3 or 4 allowed). See LINK_SIZE in config.h.in for details.") 139 | 140 | SET(PCRE_PARENS_NEST_LIMIT "250" CACHE STRING 141 | "Default nested parentheses limit. See PARENS_NEST_LIMIT in config.h.in for details.") 142 | 143 | SET(PCRE_MATCH_LIMIT "10000000" CACHE STRING 144 | "Default limit on internal looping. See MATCH_LIMIT in config.h.in for details.") 145 | 146 | SET(PCRE_MATCH_LIMIT_RECURSION "MATCH_LIMIT" CACHE STRING 147 | "Default limit on internal recursion. See MATCH_LIMIT_RECURSION in config.h.in for details.") 148 | 149 | SET(PCREGREP_BUFSIZE "20480" CACHE STRING 150 | "Buffer size parameter for pcregrep. See PCREGREP_BUFSIZE in config.h.in for details.") 151 | 152 | SET(PCRE_NEWLINE "LF" CACHE STRING 153 | "What to recognize as a newline (one of CR, LF, CRLF, ANY, ANYCRLF).") 154 | 155 | SET(PCRE_NO_RECURSE OFF CACHE BOOL 156 | "If ON, then don't use stack recursion when matching. See NO_RECURSE in config.h.in for details.") 157 | 158 | SET(PCRE_POSIX_MALLOC_THRESHOLD "10" CACHE STRING 159 | "Threshold for malloc() usage. See POSIX_MALLOC_THRESHOLD in config.h.in for details.") 160 | 161 | SET(PCRE_SUPPORT_JIT OFF CACHE BOOL 162 | "Enable support for Just-in-time compiling.") 163 | 164 | SET(PCRE_SUPPORT_PCREGREP_JIT ON CACHE BOOL 165 | "Enable use of Just-in-time compiling in pcregrep.") 166 | 167 | SET(PCRE_SUPPORT_UTF OFF CACHE BOOL 168 | "Enable support for Unicode Transformation Format (UTF-8/UTF-16/UTF-32) encoding.") 169 | 170 | SET(PCRE_SUPPORT_UNICODE_PROPERTIES OFF CACHE BOOL 171 | "Enable support for Unicode properties (if set, UTF support will be enabled as well).") 172 | 173 | SET(PCRE_SUPPORT_BSR_ANYCRLF OFF CACHE BOOL 174 | "ON=Backslash-R matches only LF CR and CRLF, OFF=Backslash-R matches all Unicode Linebreaks") 175 | 176 | SET(PCRE_SUPPORT_VALGRIND OFF CACHE BOOL 177 | "Enable Valgrind support.") 178 | 179 | OPTION(PCRE_SHOW_REPORT "Show the final configuration report" ON) 180 | OPTION(PCRE_BUILD_PCREGREP "Build pcregrep" ON) 181 | OPTION(PCRE_BUILD_TESTS "Build the tests" ON) 182 | 183 | IF (MINGW) 184 | OPTION(NON_STANDARD_LIB_PREFIX 185 | "ON=Shared libraries built in mingw will be named pcre.dll, etc., instead of libpcre.dll, etc." 186 | OFF) 187 | 188 | OPTION(NON_STANDARD_LIB_SUFFIX 189 | "ON=Shared libraries built in mingw will be named libpcre-0.dll, etc., instead of libpcre.dll, etc." 190 | OFF) 191 | ENDIF(MINGW) 192 | 193 | IF(MSVC) 194 | OPTION(PCRE_STATIC_RUNTIME 195 | "ON=Compile against the static runtime (/MT)." 196 | OFF) 197 | OPTION(INSTALL_MSVC_PDB 198 | "ON=Install .pdb files built by MSVC, if generated" 199 | OFF) 200 | ENDIF(MSVC) 201 | 202 | # bzip2 lib 203 | IF(BZIP2_FOUND) 204 | OPTION (PCRE_SUPPORT_LIBBZ2 "Enable support for linking pcregrep with libbz2." ON) 205 | ENDIF(BZIP2_FOUND) 206 | IF(PCRE_SUPPORT_LIBBZ2) 207 | INCLUDE_DIRECTORIES(${BZIP2_INCLUDE_DIR}) 208 | ENDIF(PCRE_SUPPORT_LIBBZ2) 209 | 210 | # zlib 211 | IF(ZLIB_FOUND) 212 | OPTION (PCRE_SUPPORT_LIBZ "Enable support for linking pcregrep with libz." ON) 213 | ENDIF(ZLIB_FOUND) 214 | IF(PCRE_SUPPORT_LIBZ) 215 | INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) 216 | ENDIF(PCRE_SUPPORT_LIBZ) 217 | 218 | # editline lib 219 | IF(EDITLINE_FOUND) 220 | OPTION (PCRE_SUPPORT_LIBEDIT "Enable support for linking pcretest with libedit." OFF) 221 | ENDIF(EDITLINE_FOUND) 222 | IF(PCRE_SUPPORT_LIBEDIT) 223 | INCLUDE_DIRECTORIES(${EDITLINE_INCLUDE_DIR}) 224 | ENDIF(PCRE_SUPPORT_LIBEDIT) 225 | 226 | # readline lib 227 | IF(READLINE_FOUND) 228 | OPTION (PCRE_SUPPORT_LIBREADLINE "Enable support for linking pcretest with libreadline." ON) 229 | ENDIF(READLINE_FOUND) 230 | IF(PCRE_SUPPORT_LIBREADLINE) 231 | INCLUDE_DIRECTORIES(${READLINE_INCLUDE_DIR}) 232 | ENDIF(PCRE_SUPPORT_LIBREADLINE) 233 | 234 | # Prepare build configuration 235 | 236 | SET(pcre_have_type_traits 0) 237 | SET(pcre_have_bits_type_traits 0) 238 | 239 | IF(HAVE_TYPE_TRAITS_H) 240 | SET(pcre_have_type_traits 1) 241 | ENDIF(HAVE_TYPE_TRAITS_H) 242 | 243 | IF(HAVE_BITS_TYPE_TRAITS_H) 244 | SET(pcre_have_bits_type_traits 1) 245 | ENDIF(HAVE_BITS_TYPE_TRAITS_H) 246 | 247 | SET(pcre_have_long_long 0) 248 | SET(pcre_have_ulong_long 0) 249 | 250 | IF(HAVE_LONG_LONG) 251 | SET(pcre_have_long_long 1) 252 | ENDIF(HAVE_LONG_LONG) 253 | 254 | IF(HAVE_UNSIGNED_LONG_LONG) 255 | SET(pcre_have_ulong_long 1) 256 | ENDIF(HAVE_UNSIGNED_LONG_LONG) 257 | 258 | IF(NOT BUILD_SHARED_LIBS) 259 | SET(PCRE_STATIC 1) 260 | ENDIF(NOT BUILD_SHARED_LIBS) 261 | 262 | IF(NOT PCRE_BUILD_PCRE8 AND NOT PCRE_BUILD_PCRE16 AND NOT PCRE_BUILD_PCRE32) 263 | MESSAGE(FATAL_ERROR "At least one of PCRE_BUILD_PCRE8, PCRE_BUILD_PCRE16 or PCRE_BUILD_PCRE32 must be enabled") 264 | ENDIF(NOT PCRE_BUILD_PCRE8 AND NOT PCRE_BUILD_PCRE16 AND NOT PCRE_BUILD_PCRE32) 265 | 266 | IF(PCRE_BUILD_PCRE8) 267 | SET(SUPPORT_PCRE8 1) 268 | ENDIF(PCRE_BUILD_PCRE8) 269 | 270 | IF(PCRE_BUILD_PCRE16) 271 | SET(SUPPORT_PCRE16 1) 272 | ENDIF(PCRE_BUILD_PCRE16) 273 | 274 | IF(PCRE_BUILD_PCRE32) 275 | SET(SUPPORT_PCRE32 1) 276 | ENDIF(PCRE_BUILD_PCRE32) 277 | 278 | IF(PCRE_BUILD_PCRECPP AND NOT PCRE_BUILD_PCRE8) 279 | MESSAGE(STATUS "** PCRE_BUILD_PCRE8 must be enabled for the C++ library support") 280 | SET(PCRE_BUILD_PCRECPP OFF) 281 | ENDIF(PCRE_BUILD_PCRECPP AND NOT PCRE_BUILD_PCRE8) 282 | 283 | IF(PCRE_BUILD_PCREGREP AND NOT PCRE_BUILD_PCRE8) 284 | MESSAGE(STATUS "** PCRE_BUILD_PCRE8 must be enabled for the pcregrep program") 285 | SET(PCRE_BUILD_PCREGREP OFF) 286 | ENDIF(PCRE_BUILD_PCREGREP AND NOT PCRE_BUILD_PCRE8) 287 | 288 | IF(PCRE_SUPPORT_LIBREADLINE AND PCRE_SUPPORT_LIBEDIT) 289 | MESSAGE(FATAL_ERROR "Only one of libreadline or libeditline can be specified") 290 | ENDIF(PCRE_SUPPORT_LIBREADLINE AND PCRE_SUPPORT_LIBEDIT) 291 | 292 | IF(PCRE_SUPPORT_BSR_ANYCRLF) 293 | SET(BSR_ANYCRLF 1) 294 | ENDIF(PCRE_SUPPORT_BSR_ANYCRLF) 295 | 296 | IF(PCRE_SUPPORT_UTF OR PCRE_SUPPORT_UNICODE_PROPERTIES) 297 | SET(SUPPORT_UTF 1) 298 | SET(PCRE_SUPPORT_UTF ON) 299 | ENDIF(PCRE_SUPPORT_UTF OR PCRE_SUPPORT_UNICODE_PROPERTIES) 300 | 301 | IF(PCRE_SUPPORT_UNICODE_PROPERTIES) 302 | SET(SUPPORT_UCP 1) 303 | ENDIF(PCRE_SUPPORT_UNICODE_PROPERTIES) 304 | 305 | IF(PCRE_SUPPORT_JIT) 306 | SET(SUPPORT_JIT 1) 307 | ENDIF(PCRE_SUPPORT_JIT) 308 | 309 | IF(PCRE_SUPPORT_PCREGREP_JIT) 310 | SET(SUPPORT_PCREGREP_JIT 1) 311 | ENDIF(PCRE_SUPPORT_PCREGREP_JIT) 312 | 313 | IF(PCRE_SUPPORT_VALGRIND) 314 | SET(SUPPORT_VALGRIND 1) 315 | ENDIF(PCRE_SUPPORT_VALGRIND) 316 | 317 | # This next one used to contain 318 | # SET(PCRETEST_LIBS ${READLINE_LIBRARY}) 319 | # but I was advised to add the NCURSES test as well, along with 320 | # some modifications to cmake/FindReadline.cmake which should 321 | # make it possible to override the default if necessary. PH 322 | 323 | IF(PCRE_SUPPORT_LIBREADLINE) 324 | SET(SUPPORT_LIBREADLINE 1) 325 | SET(PCRETEST_LIBS ${READLINE_LIBRARY} ${NCURSES_LIBRARY}) 326 | ENDIF(PCRE_SUPPORT_LIBREADLINE) 327 | 328 | # libedit is a plug-compatible alternative to libreadline 329 | 330 | IF(PCRE_SUPPORT_LIBEDIT) 331 | SET(SUPPORT_LIBEDIT 1) 332 | SET(PCRETEST_LIBS ${EDITLINE_LIBRARY} ${NCURSES_LIBRARY}) 333 | ENDIF(PCRE_SUPPORT_LIBEDIT) 334 | 335 | IF(PCRE_SUPPORT_LIBZ) 336 | SET(SUPPORT_LIBZ 1) 337 | SET(PCREGREP_LIBS ${PCREGREP_LIBS} ${ZLIB_LIBRARIES}) 338 | ENDIF(PCRE_SUPPORT_LIBZ) 339 | 340 | IF(PCRE_SUPPORT_LIBBZ2) 341 | SET(SUPPORT_LIBBZ2 1) 342 | SET(PCREGREP_LIBS ${PCREGREP_LIBS} ${BZIP2_LIBRARIES}) 343 | ENDIF(PCRE_SUPPORT_LIBBZ2) 344 | 345 | SET(NEWLINE "") 346 | 347 | IF(PCRE_NEWLINE STREQUAL "LF") 348 | SET(NEWLINE "10") 349 | ENDIF(PCRE_NEWLINE STREQUAL "LF") 350 | IF(PCRE_NEWLINE STREQUAL "CR") 351 | SET(NEWLINE "13") 352 | ENDIF(PCRE_NEWLINE STREQUAL "CR") 353 | IF(PCRE_NEWLINE STREQUAL "CRLF") 354 | SET(NEWLINE "3338") 355 | ENDIF(PCRE_NEWLINE STREQUAL "CRLF") 356 | IF(PCRE_NEWLINE STREQUAL "ANY") 357 | SET(NEWLINE "-1") 358 | ENDIF(PCRE_NEWLINE STREQUAL "ANY") 359 | IF(PCRE_NEWLINE STREQUAL "ANYCRLF") 360 | SET(NEWLINE "-2") 361 | ENDIF(PCRE_NEWLINE STREQUAL "ANYCRLF") 362 | 363 | IF(NEWLINE STREQUAL "") 364 | MESSAGE(FATAL_ERROR "The PCRE_NEWLINE variable must be set to one of the following values: \"LF\", \"CR\", \"CRLF\", \"ANY\", \"ANYCRLF\".") 365 | ENDIF(NEWLINE STREQUAL "") 366 | 367 | IF(PCRE_EBCDIC) 368 | SET(EBCDIC 1) 369 | IF(PCRE_NEWLINE STREQUAL "LF") 370 | SET(NEWLINE "21") 371 | ENDIF(PCRE_NEWLINE STREQUAL "LF") 372 | IF(PCRE_NEWLINE STREQUAL "CRLF") 373 | SET(NEWLINE "3349") 374 | ENDIF(PCRE_NEWLINE STREQUAL "CRLF") 375 | ENDIF(PCRE_EBCDIC) 376 | 377 | IF(PCRE_EBCDIC_NL25) 378 | SET(EBCDIC 1) 379 | SET(EBCDIC_NL25 1) 380 | IF(PCRE_NEWLINE STREQUAL "LF") 381 | SET(NEWLINE "37") 382 | ENDIF(PCRE_NEWLINE STREQUAL "LF") 383 | IF(PCRE_NEWLINE STREQUAL "CRLF") 384 | SET(NEWLINE "3365") 385 | ENDIF(PCRE_NEWLINE STREQUAL "CRLF") 386 | ENDIF(PCRE_EBCDIC_NL25) 387 | 388 | IF(PCRE_NO_RECURSE) 389 | SET(NO_RECURSE 1) 390 | ENDIF(PCRE_NO_RECURSE) 391 | 392 | # Output files 393 | CONFIGURE_FILE(config-cmake.h.in 394 | ${PROJECT_BINARY_DIR}/config.h 395 | @ONLY) 396 | 397 | # Parse version numbers and date out of configure.ac 398 | 399 | file(STRINGS ${PROJECT_SOURCE_DIR}/configure.ac 400 | configure_lines 401 | LIMIT_COUNT 50 # Read only the first 50 lines of the file 402 | ) 403 | 404 | set(SEARCHED_VARIABLES "pcre_major" "pcre_minor" "pcre_prerelease" "pcre_date") 405 | foreach(configure_line ${configure_lines}) 406 | foreach(_substitution_variable ${SEARCHED_VARIABLES}) 407 | string(TOUPPER ${_substitution_variable} _substitution_variable_upper) 408 | if (NOT ${_substitution_variable_upper}) 409 | string(REGEX MATCH "m4_define\\(${_substitution_variable}, \\[(.*)\\]" MACTHED_STRING ${configure_line}) 410 | if (CMAKE_MATCH_1) 411 | set(${_substitution_variable_upper} ${CMAKE_MATCH_1}) 412 | endif() 413 | endif() 414 | endforeach() 415 | endforeach() 416 | 417 | CONFIGURE_FILE(pcre.h.in 418 | ${PROJECT_BINARY_DIR}/pcre.h 419 | @ONLY) 420 | 421 | # What about pcre-config and libpcre.pc? 422 | 423 | IF(PCRE_BUILD_PCRECPP) 424 | CONFIGURE_FILE(pcre_stringpiece.h.in 425 | ${PROJECT_BINARY_DIR}/pcre_stringpiece.h 426 | @ONLY) 427 | 428 | CONFIGURE_FILE(pcrecpparg.h.in 429 | ${PROJECT_BINARY_DIR}/pcrecpparg.h 430 | @ONLY) 431 | ENDIF(PCRE_BUILD_PCRECPP) 432 | 433 | # Character table generation 434 | 435 | OPTION(PCRE_REBUILD_CHARTABLES "Rebuild char tables" OFF) 436 | IF(PCRE_REBUILD_CHARTABLES) 437 | ADD_EXECUTABLE(dftables dftables.c) 438 | 439 | GET_TARGET_PROPERTY(DFTABLES_EXE dftables LOCATION) 440 | 441 | ADD_CUSTOM_COMMAND( 442 | COMMENT "Generating character tables (pcre_chartables.c) for current locale" 443 | DEPENDS dftables 444 | COMMAND ${DFTABLES_EXE} 445 | ARGS ${PROJECT_BINARY_DIR}/pcre_chartables.c 446 | OUTPUT ${PROJECT_BINARY_DIR}/pcre_chartables.c 447 | ) 448 | ELSE(PCRE_REBUILD_CHARTABLES) 449 | CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/pcre_chartables.c.dist 450 | ${PROJECT_BINARY_DIR}/pcre_chartables.c 451 | COPYONLY) 452 | ENDIF(PCRE_REBUILD_CHARTABLES) 453 | 454 | # Source code 455 | 456 | SET(PCRE_HEADERS ${PROJECT_BINARY_DIR}/pcre.h) 457 | 458 | IF(PCRE_BUILD_PCRE8) 459 | SET(PCRE_SOURCES 460 | pcre_byte_order.c 461 | pcre_chartables.c 462 | pcre_compile.c 463 | pcre_config.c 464 | pcre_dfa_exec.c 465 | pcre_exec.c 466 | pcre_fullinfo.c 467 | pcre_get.c 468 | pcre_globals.c 469 | pcre_jit_compile.c 470 | pcre_maketables.c 471 | pcre_newline.c 472 | pcre_ord2utf8.c 473 | pcre_refcount.c 474 | pcre_string_utils.c 475 | pcre_study.c 476 | pcre_tables.c 477 | pcre_ucd.c 478 | pcre_valid_utf8.c 479 | pcre_version.c 480 | pcre_xclass.c 481 | ) 482 | 483 | SET(PCREPOSIX_HEADERS pcreposix.h) 484 | 485 | SET(PCREPOSIX_SOURCES pcreposix.c) 486 | 487 | ENDIF(PCRE_BUILD_PCRE8) 488 | 489 | IF(PCRE_BUILD_PCRE16) 490 | SET(PCRE16_SOURCES 491 | pcre16_byte_order.c 492 | pcre16_chartables.c 493 | pcre16_compile.c 494 | pcre16_config.c 495 | pcre16_dfa_exec.c 496 | pcre16_exec.c 497 | pcre16_fullinfo.c 498 | pcre16_get.c 499 | pcre16_globals.c 500 | pcre16_jit_compile.c 501 | pcre16_maketables.c 502 | pcre16_newline.c 503 | pcre16_ord2utf16.c 504 | pcre16_refcount.c 505 | pcre16_string_utils.c 506 | pcre16_study.c 507 | pcre16_tables.c 508 | pcre16_ucd.c 509 | pcre16_utf16_utils.c 510 | pcre16_valid_utf16.c 511 | pcre16_version.c 512 | pcre16_xclass.c 513 | ) 514 | ENDIF(PCRE_BUILD_PCRE16) 515 | 516 | IF(PCRE_BUILD_PCRE32) 517 | SET(PCRE32_SOURCES 518 | pcre32_byte_order.c 519 | pcre32_chartables.c 520 | pcre32_compile.c 521 | pcre32_config.c 522 | pcre32_dfa_exec.c 523 | pcre32_exec.c 524 | pcre32_fullinfo.c 525 | pcre32_get.c 526 | pcre32_globals.c 527 | pcre32_jit_compile.c 528 | pcre32_maketables.c 529 | pcre32_newline.c 530 | pcre32_ord2utf32.c 531 | pcre32_refcount.c 532 | pcre32_string_utils.c 533 | pcre32_study.c 534 | pcre32_tables.c 535 | pcre32_ucd.c 536 | pcre32_utf32_utils.c 537 | pcre32_valid_utf32.c 538 | pcre32_version.c 539 | pcre32_xclass.c 540 | ) 541 | ENDIF(PCRE_BUILD_PCRE32) 542 | 543 | IF(MINGW AND NOT PCRE_STATIC) 544 | IF (EXISTS ${PROJECT_SOURCE_DIR}/pcre.rc) 545 | ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/pcre.o 546 | PRE-LINK 547 | COMMAND windres ARGS pcre.rc pcre.o 548 | WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} 549 | COMMENT Using pcre coff info in mingw build) 550 | SET(PCRE_SOURCES 551 | ${PCRE_SOURCES} ${PROJECT_SOURCE_DIR}/pcre.o 552 | ) 553 | ENDIF(EXISTS ${PROJECT_SOURCE_DIR}/pcre.rc) 554 | IF (EXISTS ${PROJECT_SOURCE_DIR}/pcreposix.rc) 555 | ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/pcreposix.o 556 | PRE-LINK 557 | COMMAND windres ARGS pcreposix.rc pcreposix.o 558 | WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} 559 | COMMENT Using pcreposix coff info in mingw build) 560 | SET(PCREPOSIX_SOURCES 561 | ${PCREPOSIX_SOURCES} ${PROJECT_SOURCE_DIR}/pcreposix.o 562 | ) 563 | ENDIF(EXISTS ${PROJECT_SOURCE_DIR}/pcreposix.rc) 564 | ENDIF(MINGW AND NOT PCRE_STATIC) 565 | 566 | IF(MSVC AND NOT PCRE_STATIC) 567 | IF (EXISTS ${PROJECT_SOURCE_DIR}/pcre.rc) 568 | SET(PCRE_SOURCES 569 | ${PCRE_SOURCES} pcre.rc) 570 | ENDIF(EXISTS ${PROJECT_SOURCE_DIR}/pcre.rc) 571 | IF (EXISTS ${PROJECT_SOURCE_DIR}/pcreposix.rc) 572 | SET(PCREPOSIX_SOURCES 573 | ${PCREPOSIX_SOURCES} pcreposix.rc) 574 | ENDIF (EXISTS ${PROJECT_SOURCE_DIR}/pcreposix.rc) 575 | ENDIF(MSVC AND NOT PCRE_STATIC) 576 | 577 | # Fix static compilation with MSVC: https://bugs.exim.org/show_bug.cgi?id=1681 578 | # This code was taken from the CMake wiki, not from WebM. 579 | 580 | IF(MSVC AND PCRE_STATIC_RUNTIME) 581 | MESSAGE(STATUS "** MSVC and PCRE_STATIC_RUNTIME: modifying compiler flags to use static runtime library") 582 | foreach(flag_var 583 | CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE 584 | CMAKE_C_ _MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO 585 | CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE 586 | CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) 587 | string(REGEX REPLACE "/MD" "/MT /GS-" ${flag_var} "${${flag_var}}") 588 | endforeach() 589 | ENDIF(MSVC AND PCRE_STATIC_RUNTIME) 590 | 591 | SET(PCRECPP_HEADERS 592 | pcrecpp.h 593 | pcre_scanner.h 594 | ${PROJECT_BINARY_DIR}/pcrecpparg.h 595 | ${PROJECT_BINARY_DIR}/pcre_stringpiece.h 596 | ) 597 | 598 | SET(PCRECPP_SOURCES 599 | pcrecpp.cc 600 | pcre_scanner.cc 601 | pcre_stringpiece.cc 602 | ) 603 | 604 | # Build setup 605 | 606 | ADD_DEFINITIONS(-DHAVE_CONFIG_H) 607 | 608 | IF(MSVC) 609 | ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS) 610 | ENDIF(MSVC) 611 | 612 | SET(CMAKE_INCLUDE_CURRENT_DIR 1) 613 | # needed to make sure to not link debug libs 614 | # against release libs and vice versa 615 | IF(WIN32) 616 | SET(CMAKE_DEBUG_POSTFIX "d") 617 | ENDIF(WIN32) 618 | 619 | SET(targets) 620 | 621 | # Libraries 622 | # pcre 623 | IF(PCRE_BUILD_PCRE8) 624 | ADD_LIBRARY(pcre ${PCRE_HEADERS} ${PCRE_SOURCES} ${PROJECT_BINARY_DIR}/config.h) 625 | SET(targets ${targets} pcre) 626 | ADD_LIBRARY(pcreposix ${PCREPOSIX_HEADERS} ${PCREPOSIX_SOURCES}) 627 | SET(targets ${targets} pcreposix) 628 | TARGET_LINK_LIBRARIES(pcreposix pcre) 629 | 630 | IF(MINGW AND NOT PCRE_STATIC) 631 | IF(NON_STANDARD_LIB_PREFIX) 632 | SET_TARGET_PROPERTIES(pcre pcreposix 633 | PROPERTIES PREFIX "" 634 | ) 635 | ENDIF(NON_STANDARD_LIB_PREFIX) 636 | 637 | IF(NON_STANDARD_LIB_SUFFIX) 638 | SET_TARGET_PROPERTIES(pcre pcreposix 639 | PROPERTIES SUFFIX "-0.dll" 640 | ) 641 | ENDIF(NON_STANDARD_LIB_SUFFIX) 642 | ENDIF(MINGW AND NOT PCRE_STATIC) 643 | 644 | ENDIF(PCRE_BUILD_PCRE8) 645 | 646 | IF(PCRE_BUILD_PCRE16) 647 | ADD_LIBRARY(pcre16 ${PCRE_HEADERS} ${PCRE16_SOURCES} ${PROJECT_BINARY_DIR}/config.h) 648 | SET(targets ${targets} pcre16) 649 | 650 | IF(MINGW AND NOT PCRE_STATIC) 651 | IF(NON_STANDARD_LIB_PREFIX) 652 | SET_TARGET_PROPERTIES(pcre16 653 | PROPERTIES PREFIX "" 654 | ) 655 | ENDIF(NON_STANDARD_LIB_PREFIX) 656 | 657 | IF(NON_STANDARD_LIB_SUFFIX) 658 | SET_TARGET_PROPERTIES(pcre16 659 | PROPERTIES SUFFIX "-0.dll" 660 | ) 661 | ENDIF(NON_STANDARD_LIB_SUFFIX) 662 | ENDIF(MINGW AND NOT PCRE_STATIC) 663 | 664 | ENDIF(PCRE_BUILD_PCRE16) 665 | 666 | IF(PCRE_BUILD_PCRE32) 667 | ADD_LIBRARY(pcre32 ${PCRE_HEADERS} ${PCRE32_SOURCES} ${PROJECT_BINARY_DIR}/config.h) 668 | SET(targets ${targets} pcre32) 669 | 670 | IF(MINGW AND NOT PCRE_STATIC) 671 | IF(NON_STANDARD_LIB_PREFIX) 672 | SET_TARGET_PROPERTIES(pcre32 673 | PROPERTIES PREFIX "" 674 | ) 675 | ENDIF(NON_STANDARD_LIB_PREFIX) 676 | 677 | IF(NON_STANDARD_LIB_SUFFIX) 678 | SET_TARGET_PROPERTIES(pcre32 679 | PROPERTIES SUFFIX "-0.dll" 680 | ) 681 | ENDIF(NON_STANDARD_LIB_SUFFIX) 682 | ENDIF(MINGW AND NOT PCRE_STATIC) 683 | 684 | ENDIF(PCRE_BUILD_PCRE32) 685 | 686 | # pcrecpp 687 | IF(PCRE_BUILD_PCRECPP) 688 | ADD_LIBRARY(pcrecpp ${PCRECPP_HEADERS} ${PCRECPP_SOURCES}) 689 | SET(targets ${targets} pcrecpp) 690 | TARGET_LINK_LIBRARIES(pcrecpp pcre) 691 | 692 | IF(MINGW AND NOT PCRE_STATIC) 693 | IF(NON_STANDARD_LIB_PREFIX) 694 | SET_TARGET_PROPERTIES(pcrecpp 695 | PROPERTIES PREFIX "" 696 | ) 697 | ENDIF(NON_STANDARD_LIB_PREFIX) 698 | 699 | IF(NON_STANDARD_LIB_SUFFIX) 700 | SET_TARGET_PROPERTIES(pcrecpp 701 | PROPERTIES SUFFIX "-0.dll" 702 | ) 703 | ENDIF(NON_STANDARD_LIB_SUFFIX) 704 | ENDIF(MINGW AND NOT PCRE_STATIC) 705 | ENDIF(PCRE_BUILD_PCRECPP) 706 | 707 | 708 | # Executables 709 | 710 | # Removed by PH (2008-01-23) because pcredemo shouldn't really be built 711 | # automatically, and it gave trouble in some environments anyway. 712 | # ADD_EXECUTABLE(pcredemo pcredemo.c) 713 | # TARGET_LINK_LIBRARIES(pcredemo pcreposix) 714 | # IF(NOT BUILD_SHARED_LIBS) 715 | # # make sure to not use declspec(dllimport) in static mode on windows 716 | # SET_TARGET_PROPERTIES(pcredemo PROPERTIES COMPILE_FLAGS "-DPCRE_STATIC") 717 | # ENDIF(NOT BUILD_SHARED_LIBS) 718 | 719 | IF(PCRE_BUILD_PCREGREP) 720 | ADD_EXECUTABLE(pcregrep pcregrep.c) 721 | SET(targets ${targets} pcregrep) 722 | TARGET_LINK_LIBRARIES(pcregrep pcreposix ${PCREGREP_LIBS}) 723 | ENDIF(PCRE_BUILD_PCREGREP) 724 | 725 | # Testing 726 | IF(PCRE_BUILD_TESTS) 727 | ENABLE_TESTING() 728 | 729 | SET(PCRETEST_SOURCES pcretest.c) 730 | IF(PCRE_BUILD_PCRE8) 731 | LIST(APPEND PCRETEST_SOURCES pcre_printint.c) 732 | ENDIF(PCRE_BUILD_PCRE8) 733 | IF(PCRE_BUILD_PCRE16) 734 | LIST(APPEND PCRETEST_SOURCES pcre16_printint.c) 735 | ENDIF(PCRE_BUILD_PCRE16) 736 | IF(PCRE_BUILD_PCRE32) 737 | LIST(APPEND PCRETEST_SOURCES pcre32_printint.c) 738 | ENDIF(PCRE_BUILD_PCRE32) 739 | 740 | ADD_EXECUTABLE(pcretest ${PCRETEST_SOURCES}) 741 | SET(targets ${targets} pcretest) 742 | IF(PCRE_BUILD_PCRE8) 743 | LIST(APPEND PCRETEST_LIBS pcreposix pcre) 744 | ENDIF(PCRE_BUILD_PCRE8) 745 | IF(PCRE_BUILD_PCRE16) 746 | LIST(APPEND PCRETEST_LIBS pcre16) 747 | ENDIF(PCRE_BUILD_PCRE16) 748 | IF(PCRE_BUILD_PCRE32) 749 | LIST(APPEND PCRETEST_LIBS pcre32) 750 | ENDIF(PCRE_BUILD_PCRE32) 751 | TARGET_LINK_LIBRARIES(pcretest ${PCRETEST_LIBS}) 752 | 753 | IF(PCRE_SUPPORT_JIT) 754 | ADD_EXECUTABLE(pcre_jit_test pcre_jit_test.c) 755 | SET(targets ${targets} pcre_jit_test) 756 | SET(PCRE_JIT_TEST_LIBS ) 757 | IF(PCRE_BUILD_PCRE8) 758 | LIST(APPEND PCRE_JIT_TEST_LIBS pcre) 759 | ENDIF(PCRE_BUILD_PCRE8) 760 | IF(PCRE_BUILD_PCRE16) 761 | LIST(APPEND PCRE_JIT_TEST_LIBS pcre16) 762 | ENDIF(PCRE_BUILD_PCRE16) 763 | IF(PCRE_BUILD_PCRE32) 764 | LIST(APPEND PCRE_JIT_TEST_LIBS pcre32) 765 | ENDIF(PCRE_BUILD_PCRE32) 766 | TARGET_LINK_LIBRARIES(pcre_jit_test ${PCRE_JIT_TEST_LIBS}) 767 | ENDIF(PCRE_SUPPORT_JIT) 768 | 769 | IF(PCRE_BUILD_PCRECPP) 770 | ADD_EXECUTABLE(pcrecpp_unittest pcrecpp_unittest.cc) 771 | SET(targets ${targets} pcrecpp_unittest) 772 | TARGET_LINK_LIBRARIES(pcrecpp_unittest pcrecpp) 773 | IF(MINGW AND NON_STANDARD_LIB_NAMES AND NOT PCRE_STATIC) 774 | SET_TARGET_PROPERTIES(pcrecpp 775 | PROPERTIES PREFIX "" 776 | ) 777 | ENDIF(MINGW AND NON_STANDARD_LIB_NAMES AND NOT PCRE_STATIC) 778 | 779 | ADD_EXECUTABLE(pcre_scanner_unittest pcre_scanner_unittest.cc) 780 | SET(targets ${targets} pcre_scanner_unittest) 781 | TARGET_LINK_LIBRARIES(pcre_scanner_unittest pcrecpp) 782 | 783 | ADD_EXECUTABLE(pcre_stringpiece_unittest pcre_stringpiece_unittest.cc) 784 | SET(targets ${targets} pcre_stringpiece_unittest) 785 | TARGET_LINK_LIBRARIES(pcre_stringpiece_unittest pcrecpp) 786 | ENDIF(PCRE_BUILD_PCRECPP) 787 | 788 | # exes in Debug location tested by the RunTest shell script 789 | # via "make test" 790 | IF(PCRE_BUILD_PCREGREP) 791 | GET_TARGET_PROPERTY(PCREGREP_EXE pcregrep DEBUG_LOCATION) 792 | ENDIF(PCRE_BUILD_PCREGREP) 793 | 794 | GET_TARGET_PROPERTY(PCRETEST_EXE pcretest DEBUG_LOCATION) 795 | 796 | # ================================================= 797 | # Write out a CTest configuration file 798 | # 799 | FILE(WRITE ${PROJECT_BINARY_DIR}/CTestCustom.ctest 800 | "# This is a generated file. 801 | MESSAGE(\"When testing is complete, review test output in the 802 | \\\"${PROJECT_BINARY_DIR}/Testing/Temporary\\\" folder.\") 803 | MESSAGE(\" \") 804 | ") 805 | 806 | FILE(WRITE ${PROJECT_BINARY_DIR}/pcre_test.sh 807 | "#! /bin/sh 808 | # This is a generated file. 809 | srcdir=${PROJECT_SOURCE_DIR} 810 | pcretest=${PCRETEST_EXE} 811 | . ${PROJECT_SOURCE_DIR}/RunTest 812 | if test \"$?\" != \"0\"; then exit 1; fi 813 | # End 814 | ") 815 | 816 | IF(UNIX) 817 | ADD_TEST(pcre_test sh ${PROJECT_BINARY_DIR}/pcre_test.sh) 818 | ENDIF(UNIX) 819 | 820 | IF(PCRE_BUILD_PCREGREP) 821 | FILE(WRITE ${PROJECT_BINARY_DIR}/pcre_grep_test.sh 822 | "#! /bin/sh 823 | # This is a generated file. 824 | srcdir=${PROJECT_SOURCE_DIR} 825 | pcregrep=${PCREGREP_EXE} 826 | pcretest=${PCRETEST_EXE} 827 | . ${PROJECT_SOURCE_DIR}/RunGrepTest 828 | if test \"$?\" != \"0\"; then exit 1; fi 829 | # End 830 | ") 831 | 832 | IF(UNIX) 833 | ADD_TEST(pcre_grep_test sh ${PROJECT_BINARY_DIR}/pcre_grep_test.sh) 834 | ENDIF(UNIX) 835 | ENDIF(PCRE_BUILD_PCREGREP) 836 | 837 | IF(WIN32) 838 | # Provide environment for executing the bat file version of RunTest 839 | FILE(TO_NATIVE_PATH ${PROJECT_SOURCE_DIR} winsrc) 840 | FILE(TO_NATIVE_PATH ${PROJECT_BINARY_DIR} winbin) 841 | FILE(TO_NATIVE_PATH ${PCRETEST_EXE} winexe) 842 | 843 | FILE(WRITE ${PROJECT_BINARY_DIR}/pcre_test.bat 844 | "\@REM This is a generated file. 845 | \@echo off 846 | setlocal 847 | SET srcdir=\"${winsrc}\" 848 | SET pcretest=\"${winexe}\" 849 | if not [%CMAKE_CONFIG_TYPE%]==[] SET pcretest=\"${winbin}\\%CMAKE_CONFIG_TYPE%\\pcretest.exe\" 850 | call %srcdir%\\RunTest.Bat 851 | if errorlevel 1 exit /b 1 852 | echo RunTest.bat tests successfully completed 853 | ") 854 | 855 | ADD_TEST(NAME pcre_test_bat 856 | COMMAND pcre_test.bat) 857 | SET_TESTS_PROPERTIES(pcre_test_bat PROPERTIES 858 | PASS_REGULAR_EXPRESSION "RunTest\\.bat tests successfully completed") 859 | 860 | IF("$ENV{OSTYPE}" STREQUAL "msys") 861 | # Both the sh and bat file versions of RunTest are run if make test is used 862 | # in msys 863 | ADD_TEST(pcre_test_sh sh.exe ${PROJECT_BINARY_DIR}/pcre_test.sh) 864 | IF(PCRE_BUILD_PCREGREP) 865 | ADD_TEST(pcre_grep_test sh.exe ${PROJECT_BINARY_DIR}/pcre_grep_test.sh) 866 | ENDIF(PCRE_BUILD_PCREGREP) 867 | ENDIF("$ENV{OSTYPE}" STREQUAL "msys") 868 | 869 | ENDIF(WIN32) 870 | 871 | # Changed to accommodate testing whichever location was just built 872 | 873 | IF(PCRE_SUPPORT_JIT) 874 | ADD_TEST(pcre_jit_test pcre_jit_test) 875 | ENDIF(PCRE_SUPPORT_JIT) 876 | 877 | IF(PCRE_BUILD_PCRECPP) 878 | ADD_TEST(pcrecpp_test pcrecpp_unittest) 879 | ADD_TEST(pcre_scanner_test pcre_scanner_unittest) 880 | ADD_TEST(pcre_stringpiece_test pcre_stringpiece_unittest) 881 | ENDIF(PCRE_BUILD_PCRECPP) 882 | 883 | ENDIF(PCRE_BUILD_TESTS) 884 | 885 | # Installation 886 | SET(CMAKE_INSTALL_ALWAYS 1) 887 | 888 | INSTALL(TARGETS ${targets} 889 | RUNTIME DESTINATION bin 890 | LIBRARY DESTINATION lib 891 | ARCHIVE DESTINATION lib) 892 | 893 | INSTALL(FILES ${PCRE_HEADERS} ${PCREPOSIX_HEADERS} DESTINATION include) 894 | 895 | FILE(GLOB html ${PROJECT_SOURCE_DIR}/doc/html/*.html) 896 | FILE(GLOB man1 ${PROJECT_SOURCE_DIR}/doc/*.1) 897 | FILE(GLOB man3 ${PROJECT_SOURCE_DIR}/doc/*.3) 898 | 899 | IF(PCRE_BUILD_PCRECPP) 900 | INSTALL(FILES ${PCRECPP_HEADERS} DESTINATION include) 901 | ELSE(PCRE_BUILD_PCRECPP) 902 | # Remove pcrecpp.3 903 | FOREACH(man ${man3}) 904 | GET_FILENAME_COMPONENT(man_tmp ${man} NAME) 905 | IF(NOT man_tmp STREQUAL "pcrecpp.3") 906 | SET(man3_new ${man3} ${man}) 907 | ENDIF(NOT man_tmp STREQUAL "pcrecpp.3") 908 | ENDFOREACH(man ${man3}) 909 | SET(man3 ${man3_new}) 910 | ENDIF(PCRE_BUILD_PCRECPP) 911 | 912 | INSTALL(FILES ${man1} DESTINATION man/man1) 913 | INSTALL(FILES ${man3} DESTINATION man/man3) 914 | INSTALL(FILES ${html} DESTINATION share/doc/pcre/html) 915 | 916 | IF(MSVC AND INSTALL_MSVC_PDB) 917 | INSTALL(FILES ${PROJECT_BINARY_DIR}/pcre.pdb 918 | ${PROJECT_BINARY_DIR}/pcreposix.pdb 919 | DESTINATION bin 920 | CONFIGURATIONS RelWithDebInfo) 921 | INSTALL(FILES ${PROJECT_BINARY_DIR}/pcred.pdb 922 | ${PROJECT_BINARY_DIR}/pcreposixd.pdb 923 | DESTINATION bin 924 | CONFIGURATIONS Debug) 925 | ENDIF(MSVC AND INSTALL_MSVC_PDB) 926 | 927 | # help, only for nice output 928 | IF(BUILD_SHARED_LIBS) 929 | SET(BUILD_STATIC_LIBS OFF) 930 | ELSE(BUILD_SHARED_LIBS) 931 | SET(BUILD_STATIC_LIBS ON) 932 | ENDIF(BUILD_SHARED_LIBS) 933 | 934 | IF(PCRE_SHOW_REPORT) 935 | STRING(TOUPPER "${CMAKE_BUILD_TYPE}" buildtype) 936 | IF (CMAKE_C_FLAGS) 937 | SET(cfsp " ") 938 | ENDIF(CMAKE_C_FLAGS) 939 | IF (CMAKE_CXX_FLAGS) 940 | SET(cxxfsp " ") 941 | ENDIF(CMAKE_CXX_FLAGS) 942 | MESSAGE(STATUS "") 943 | MESSAGE(STATUS "") 944 | MESSAGE(STATUS "PCRE configuration summary:") 945 | MESSAGE(STATUS "") 946 | MESSAGE(STATUS " Install prefix .................. : ${CMAKE_INSTALL_PREFIX}") 947 | MESSAGE(STATUS " C compiler ...................... : ${CMAKE_C_COMPILER}") 948 | MESSAGE(STATUS " C++ compiler .................... : ${CMAKE_CXX_COMPILER}") 949 | MESSAGE(STATUS " C compiler flags ................ : ${CMAKE_C_FLAGS}${cfsp}${CMAKE_C_FLAGS_${buildtype}}") 950 | MESSAGE(STATUS " C++ compiler flags .............. : ${CMAKE_CXX_FLAGS}${cxxfsp}${CMAKE_CXX_FLAGS_${buildtype}}") 951 | MESSAGE(STATUS "") 952 | MESSAGE(STATUS " Build 8 bit PCRE library ........ : ${PCRE_BUILD_PCRE8}") 953 | MESSAGE(STATUS " Build 16 bit PCRE library ....... : ${PCRE_BUILD_PCRE16}") 954 | MESSAGE(STATUS " Build 32 bit PCRE library ....... : ${PCRE_BUILD_PCRE32}") 955 | MESSAGE(STATUS " Build C++ library ............... : ${PCRE_BUILD_PCRECPP}") 956 | MESSAGE(STATUS " Enable JIT compiling support .... : ${PCRE_SUPPORT_JIT}") 957 | MESSAGE(STATUS " Enable UTF support .............. : ${PCRE_SUPPORT_UTF}") 958 | MESSAGE(STATUS " Unicode properties .............. : ${PCRE_SUPPORT_UNICODE_PROPERTIES}") 959 | MESSAGE(STATUS " Newline char/sequence ........... : ${PCRE_NEWLINE}") 960 | MESSAGE(STATUS " \\R matches only ANYCRLF ......... : ${PCRE_SUPPORT_BSR_ANYCRLF}") 961 | MESSAGE(STATUS " EBCDIC coding ................... : ${PCRE_EBCDIC}") 962 | MESSAGE(STATUS " EBCDIC coding with NL=0x25 ...... : ${PCRE_EBCDIC_NL25}") 963 | MESSAGE(STATUS " Rebuild char tables ............. : ${PCRE_REBUILD_CHARTABLES}") 964 | MESSAGE(STATUS " No stack recursion .............. : ${PCRE_NO_RECURSE}") 965 | MESSAGE(STATUS " POSIX mem threshold ............. : ${PCRE_POSIX_MALLOC_THRESHOLD}") 966 | MESSAGE(STATUS " Internal link size .............. : ${PCRE_LINK_SIZE}") 967 | MESSAGE(STATUS " Parentheses nest limit .......... : ${PCRE_PARENS_NEST_LIMIT}") 968 | MESSAGE(STATUS " Match limit ..................... : ${PCRE_MATCH_LIMIT}") 969 | MESSAGE(STATUS " Match limit recursion ........... : ${PCRE_MATCH_LIMIT_RECURSION}") 970 | MESSAGE(STATUS " Build shared libs ............... : ${BUILD_SHARED_LIBS}") 971 | MESSAGE(STATUS " Build static libs ............... : ${BUILD_STATIC_LIBS}") 972 | MESSAGE(STATUS " Build pcregrep .................. : ${PCRE_BUILD_PCREGREP}") 973 | MESSAGE(STATUS " Enable JIT in pcregrep .......... : ${PCRE_SUPPORT_PCREGREP_JIT}") 974 | MESSAGE(STATUS " Buffer size for pcregrep ........ : ${PCREGREP_BUFSIZE}") 975 | MESSAGE(STATUS " Build tests (implies pcretest .. : ${PCRE_BUILD_TESTS}") 976 | MESSAGE(STATUS " and pcregrep)") 977 | IF(ZLIB_FOUND) 978 | MESSAGE(STATUS " Link pcregrep with libz ......... : ${PCRE_SUPPORT_LIBZ}") 979 | ELSE(ZLIB_FOUND) 980 | MESSAGE(STATUS " Link pcregrep with libz ......... : Library not found" ) 981 | ENDIF(ZLIB_FOUND) 982 | IF(BZIP2_FOUND) 983 | MESSAGE(STATUS " Link pcregrep with libbz2 ....... : ${PCRE_SUPPORT_LIBBZ2}") 984 | ELSE(BZIP2_FOUND) 985 | MESSAGE(STATUS " Link pcregrep with libbz2 ....... : Library not found" ) 986 | ENDIF(BZIP2_FOUND) 987 | IF(EDITLINE_FOUND) 988 | MESSAGE(STATUS " Link pcretest with libeditline .. : ${PCRE_SUPPORT_LIBEDIT}") 989 | ELSE(EDITLINE_FOUND) 990 | MESSAGE(STATUS " Link pcretest with libeditline .. : Library not found" ) 991 | ENDIF(EDITLINE_FOUND) 992 | IF(READLINE_FOUND) 993 | MESSAGE(STATUS " Link pcretest with libreadline .. : ${PCRE_SUPPORT_LIBREADLINE}") 994 | ELSE(READLINE_FOUND) 995 | MESSAGE(STATUS " Link pcretest with libreadline .. : Library not found" ) 996 | ENDIF(READLINE_FOUND) 997 | MESSAGE(STATUS " Support Valgrind .................: ${PCRE_SUPPORT_VALGRIND}") 998 | MESSAGE(STATUS " Support coverage .................: ${PCRE_SUPPORT_COVERAGE}") 999 | 1000 | IF(MINGW AND NOT PCRE_STATIC) 1001 | MESSAGE(STATUS " Non-standard dll names (prefix) . : ${NON_STANDARD_LIB_PREFIX}") 1002 | MESSAGE(STATUS " Non-standard dll names (suffix) . : ${NON_STANDARD_LIB_SUFFIX}") 1003 | ENDIF(MINGW AND NOT PCRE_STATIC) 1004 | 1005 | IF(MSVC) 1006 | MESSAGE(STATUS " Install MSVC .pdb files ..........: ${INSTALL_MSVC_PDB}") 1007 | ENDIF(MSVC) 1008 | 1009 | MESSAGE(STATUS "") 1010 | ENDIF(PCRE_SHOW_REPORT) 1011 | 1012 | # end CMakeLists.txt 1013 | -------------------------------------------------------------------------------- /CompilePCREx64.ps1: -------------------------------------------------------------------------------- 1 | $addPath = 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin' 2 | $regexAddPath = [regex]::Escape($addPath) 3 | $arrPath = $env:Path -split ';' | Where-Object {$_ -notMatch "^$regexAddPath\\?"} 4 | $env:Path = ($arrPath + $addPath) -join ';' 5 | 6 | $pcrePath = 'pcre-8.44' 7 | Remove-Item –path $pcrePath –recurse 8 | Expand-Archive -LiteralPath $pcrePath'.Zip' -DestinationPath . 9 | copy CMakeLists.txt $pcrePath 10 | 11 | pushd $pcrePath 12 | cmake . -G "Visual Studio 16 2019" -A x64 -DBUILD_SHARED_LIBS=OFF -DPCRE_BUILD_PCRE16=ON -DPCRE_BUILD_PCRE8=OFF -DPCRE_SUPPORT_UNICODE_PROPERTIES=ON -DPCRE_SUPPORT_JIT=ON -DPCRE_STATIC_RUNTIME=ON -DCMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH=OFF 13 | cmake --build . --config Release 14 | copy .\pcre16.dir\Release\*.obj ..\Source\obj\pcre\win64\ 15 | popd 16 | -------------------------------------------------------------------------------- /CompilePCREx86.ps1: -------------------------------------------------------------------------------- 1 | $addPath = 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin' 2 | $regexAddPath = [regex]::Escape($addPath) 3 | $arrPath = $env:Path -split ';' | Where-Object {$_ -notMatch "^$regexAddPath\\?"} 4 | $env:Path = ($arrPath + $addPath) -join ';' 5 | 6 | $pcrePath = 'pcre-8.44' 7 | Remove-Item –path $pcrePath –recurse 8 | Expand-Archive -LiteralPath $pcrePath'.Zip' -DestinationPath . 9 | copy CMakeLists.txt $pcrePath 10 | 11 | pushd $pcrePath 12 | cmake . -G "Visual Studio 16 2019" -A Win32 -DBUILD_SHARED_LIBS=OFF -DPCRE_BUILD_PCRE16=ON -DPCRE_BUILD_PCRE8=OFF -DPCRE_SUPPORT_UNICODE_PROPERTIES=ON -DPCRE_SUPPORT_JIT=ON -DPCRE_STATIC_RUNTIME=ON -DCMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH=OFF 13 | cmake --build . --config Release 14 | ..\objconv "-ns:@4:" "-ns:@8:" "-ns:@12" "-ns:@16:" .\pcre16.dir\Release\pcre16_jit_compile.obj .\pcre16.dir\Release\pcre16_jit_compile.new 15 | del .\pcre16.dir\Release\pcre16_jit_compile.obj 16 | ren .\pcre16.dir\Release\pcre16_jit_compile.new pcre16_jit_compile.obj 17 | copy .\pcre16.dir\Release\*.obj ..\Source\obj\pcre\win32\ 18 | popd 19 | 20 | 21 | -------------------------------------------------------------------------------- /Demos/benchmark.dpr: -------------------------------------------------------------------------------- 1 | (* 2 | ** You do need the mtent12.txt from 3 | ** http://www.gutenberg.org/files/3200/old/mtent12.zip for this benchmark 4 | **) 5 | // JCL_DEBUG_EXPERT_GENERATEJDBG OFF 6 | // JCL_DEBUG_EXPERT_INSERTJDBG OFF 7 | // JCL_DEBUG_EXPERT_DELETEMAPFILE OFF 8 | program benchmark; 9 | 10 | {$apptype console} 11 | 12 | uses 13 | System.SysUtils, 14 | System.Classes, 15 | System.Diagnostics, 16 | System.RegularExpressionsAPI in '..\Source\System.RegularExpressionsAPI.pas', 17 | System.RegularExpressionsConsts, 18 | System.RegularExpressionsCore, 19 | System.RegularExpressions; 20 | 21 | const BenchmarkCount=1; 22 | 23 | BenchmarkPatterns:array[0..14] of String=('Twain', 24 | '(?i)Twain', 25 | '[a-z]shing', 26 | 'Huck[a-zA-Z]+|Saw[a-zA-Z]+', 27 | '\b\w+nn\b', 28 | '[a-q][^u-z]{13}x', 29 | 'Tom|Sawyer|Huckleberry|Finn', 30 | '(?i)Tom|Sawyer|Huckleberry|Finn', 31 | '.{0,2}(Tom|Sawyer|Huckleberry|Finn)', 32 | '.{2,4}(Tom|Sawyer|Huckleberry|Finn)', 33 | 'Tom.{10,25}river|river.{10,25}Tom', 34 | '[a-zA-Z]+ing', 35 | '\s[a-zA-Z]{0,12}ing\s', 36 | '([A-Za-z]awyer|[A-Za-z]inn)\s', 37 | '["''][^"'']{0,30}[?!\.]["'']'); 38 | 39 | 40 | type 41 | { TPerlRegExHelper } 42 | TPerlRegExHelper = class helper for TPerlRegEx 43 | public 44 | procedure SetAdditionalPCREOptions(PCREOptions : Integer); 45 | procedure StudyJIT; 46 | end; 47 | 48 | procedure TPerlRegExHelper.SetAdditionalPCREOptions(PCREOptions: Integer); 49 | begin 50 | with Self do FPCREOptions := FPCREOptions or PCREOptions; 51 | end; 52 | 53 | 54 | procedure TPerlRegExHelper.StudyJIT; 55 | var 56 | Error: MarshaledAString; 57 | begin 58 | with Self do begin 59 | if not FCompiled then 60 | Compile; 61 | FHints := pcre_study(FPattern, PCRE_STUDY_JIT_COMPILE, @Error); 62 | if Error <> nil then 63 | raise ERegularExpressionError.CreateResFmt(@SRegExStudyError, [string(Error)]); 64 | FStudied := True 65 | end; 66 | end; 67 | 68 | type 69 | { TRegExHelper } 70 | TRegExHelper = record helper for TRegEx 71 | public 72 | procedure Study; 73 | procedure StudyJIT; 74 | procedure SetAdditionalPCREOptions(PCREOptions : Integer); 75 | function PerlRegEx: TPerlRegEx; 76 | end; 77 | 78 | procedure TRegExHelper.Study; 79 | begin 80 | with Self do FRegEx.Study; 81 | end; 82 | 83 | procedure TRegExHelper.StudyJIT; 84 | begin 85 | with Self do FRegEx.StudyJIT; 86 | end; 87 | 88 | function TRegExHelper.PerlRegEx: TPerlRegEx; 89 | begin 90 | With Self do Result := FRegEx; 91 | end; 92 | 93 | procedure TRegExHelper.SetAdditionalPCREOptions(PCREOptions: Integer); 94 | begin 95 | with Self do FRegEx.SetAdditionalPCREOptions(PCREOptions); 96 | end; 97 | 98 | procedure BenchmarkDelphiRegEx(Subject : String; Study, JIT: Boolean); 99 | Var 100 | i,j:integer; 101 | StopWatch : TStopWatch; 102 | RegEx : TRegEx; 103 | Matches : TMatchCollection; 104 | TotalStopWatch: TStopWatch; 105 | Count : integer; 106 | begin 107 | TotalStopWatch := TStopWatch.StartNew; 108 | for i:=low(BenchmarkPatterns) to high(BenchmarkPatterns) do begin 109 | RegEx.Create(BenchmarkPatterns[i]); 110 | RegEx.SetAdditionalPCREOptions(PCRE_UCP); 111 | if JIT then 112 | RegEx.StudyJIT 113 | else if Study then 114 | RegEx.Study; 115 | try 116 | write('/'+BenchmarkPatterns[i]+'/ : ':50,'Please wait... '); 117 | StopWatch := TStopWatch.StartNew; 118 | Count := 0; 119 | for j:=1 to BenchmarkCount do begin 120 | Matches := RegEx.Matches(Subject); 121 | Inc(Count, Matches.Count); 122 | end; 123 | StopWatch.Stop; 124 | Write(#8#8#8#8#8#8#8#8#8#8#8#8#8#8#8); 125 | Writeln((StopWatch.ElapsedMilliseconds / BenchmarkCount):11:2, ' ms |', Count:12); 126 | except 127 | on e:Exception do begin 128 | writeln(e.Message); 129 | end; 130 | end; 131 | end; 132 | TotalStopWatch.Stop; 133 | Writeln('Total Time: ', (TotalStopWatch.ElapsedMilliseconds / BenchmarkCount):11:2, ' ms'); 134 | end; 135 | 136 | function FileToText(FileName : string) : string; 137 | var 138 | SL : TStringList; 139 | begin 140 | SL := TStringList.Create; 141 | try 142 | SL.LoadFromFile(FileName, TEncoding.UTF8); 143 | Result := SL.Text; 144 | finally 145 | SL.Free; 146 | end; 147 | end; 148 | 149 | Var 150 | Subject: String; 151 | JitAvail: integer; 152 | 153 | begin 154 | if pcre_config(PCRE_CONFIG_JIT, @JITAvail) = 0 then 155 | if JITAvail <> 1 then 156 | Writeln('JIT not available'); 157 | 158 | 159 | Subject := FileToText('mtent12.txt'); 160 | 161 | Writeln(' ':50,' Time | Match count'); 162 | 163 | 164 | Writeln('=============================================================================='); 165 | writeln('Delphi''s own TRegEx:'); 166 | BenchmarkDelphiRegEx(Subject, False, False); 167 | 168 | Writeln('=============================================================================='); 169 | writeln('Delphi''s own TRegEx with Study:'); 170 | BenchmarkDelphiRegEx(Subject, True, False); 171 | 172 | Writeln('=============================================================================='); 173 | writeln('Delphi''s own TRegEx with JIT:'); 174 | BenchmarkDelphiRegEx(Subject, False, True); 175 | 176 | Readln; 177 | End. 178 | 179 | 180 | -------------------------------------------------------------------------------- /Demos/benchmark.dproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | {BEA5EA53-5B05-4D35-AD63-E91BEB0E1426} 4 | benchmark.dpr 5 | True 6 | Debug 7 | 3 8 | Console 9 | None 10 | 19.0 11 | Win64 12 | 13 | 14 | true 15 | 16 | 17 | true 18 | Base 19 | true 20 | 21 | 22 | true 23 | Base 24 | true 25 | 26 | 27 | true 28 | Base 29 | true 30 | 31 | 32 | true 33 | Base 34 | true 35 | 36 | 37 | true 38 | Base 39 | true 40 | 41 | 42 | true 43 | Base 44 | true 45 | 46 | 47 | true 48 | Base 49 | true 50 | 51 | 52 | true 53 | Base 54 | true 55 | 56 | 57 | true 58 | Cfg_2 59 | true 60 | true 61 | 62 | 63 | false 64 | false 65 | false 66 | false 67 | false 68 | 00400000 69 | benchmark 70 | 1033 71 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName= 72 | System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) 73 | $(BDS)\bin\delphi_PROJECTICON.ico 74 | $(BDS)\bin\delphi_PROJECTICNS.icns 75 | ..\Bin 76 | 77 | 78 | $(BDS)\bin\Artwork\Android\FM_LauncherIcon_36x36.png 79 | $(BDS)\bin\Artwork\Android\FM_LauncherIcon_48x48.png 80 | $(BDS)\bin\Artwork\Android\FM_LauncherIcon_72x72.png 81 | $(BDS)\bin\Artwork\Android\FM_LauncherIcon_96x96.png 82 | $(BDS)\bin\Artwork\Android\FM_LauncherIcon_144x144.png 83 | $(BDS)\bin\Artwork\Android\FM_SplashImage_426x320.png 84 | $(BDS)\bin\Artwork\Android\FM_SplashImage_470x320.png 85 | $(BDS)\bin\Artwork\Android\FM_SplashImage_640x480.png 86 | $(BDS)\bin\Artwork\Android\FM_SplashImage_960x720.png 87 | true 88 | true 89 | true 90 | true 91 | true 92 | true 93 | true 94 | true 95 | true 96 | true 97 | $(BDS)\bin\Artwork\Android\FM_NotificationIcon_24x24.png 98 | $(BDS)\bin\Artwork\Android\FM_NotificationIcon_36x36.png 99 | $(BDS)\bin\Artwork\Android\FM_NotificationIcon_48x48.png 100 | $(BDS)\bin\Artwork\Android\FM_NotificationIcon_72x72.png 101 | $(BDS)\bin\Artwork\Android\FM_NotificationIcon_96x96.png 102 | 103 | 104 | $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png 105 | $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png 106 | $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png 107 | $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png 108 | $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png 109 | $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png 110 | $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png 111 | $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png 112 | 113 | 114 | $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png 115 | $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png 116 | $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png 117 | $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png 118 | $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png 119 | $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png 120 | $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png 121 | $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png 122 | 123 | 124 | $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_60x60.png 125 | $(BDS)\bin\Artwork\iOS\iPhone\FM_ApplicationIcon_120x120.png 126 | $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_40x40.png 127 | $(BDS)\bin\Artwork\iOS\iPhone\FM_SpotlightSearchIcon_80x80.png 128 | $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_40x40.png 129 | $(BDS)\bin\Artwork\iOS\iPad\FM_SpotlightSearchIcon_80x80.png 130 | $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_76x76.png 131 | $(BDS)\bin\Artwork\iOS\iPad\FM_ApplicationIcon_152x152.png 132 | 133 | 134 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) 135 | Debug 136 | CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName) 137 | 1033 138 | 139 | 140 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) 141 | Debug 142 | CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= 143 | 144 | 145 | RELEASE;$(DCC_Define) 146 | 0 147 | false 148 | 0 149 | 150 | 151 | DEBUG;$(DCC_Define) 152 | false 153 | true 154 | 155 | 156 | CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName) 157 | (None) 158 | 159 | 160 | 161 | MainSource 162 | 163 | 164 | 165 | Cfg_2 166 | Base 167 | 168 | 169 | Base 170 | 171 | 172 | Cfg_1 173 | Base 174 | 175 | 176 | 177 | Delphi.Personality.12 178 | 179 | 180 | 181 | 182 | benchmark.dpr 183 | 184 | 185 | Microsoft Office 2000 Sample Automation Server Wrapper Components 186 | Microsoft Office XP Sample Automation Server Wrapper Components 187 | 188 | 189 | 190 | False 191 | False 192 | False 193 | False 194 | False 195 | False 196 | True 197 | True 198 | 199 | 200 | 201 | 202 | benchmark.exe 203 | true 204 | 205 | 206 | 207 | 208 | true 209 | 210 | 211 | 212 | 213 | true 214 | 215 | 216 | 217 | 218 | true 219 | 220 | 221 | 222 | 223 | 1 224 | 225 | 226 | 0 227 | 228 | 229 | 230 | 231 | classes 232 | 1 233 | 234 | 235 | classes 236 | 1 237 | 238 | 239 | 240 | 241 | res\xml 242 | 1 243 | 244 | 245 | res\xml 246 | 1 247 | 248 | 249 | 250 | 251 | library\lib\armeabi-v7a 252 | 1 253 | 254 | 255 | 256 | 257 | library\lib\armeabi 258 | 1 259 | 260 | 261 | library\lib\armeabi 262 | 1 263 | 264 | 265 | 266 | 267 | library\lib\armeabi-v7a 268 | 1 269 | 270 | 271 | 272 | 273 | library\lib\mips 274 | 1 275 | 276 | 277 | library\lib\mips 278 | 1 279 | 280 | 281 | 282 | 283 | library\lib\armeabi-v7a 284 | 1 285 | 286 | 287 | library\lib\arm64-v8a 288 | 1 289 | 290 | 291 | 292 | 293 | library\lib\armeabi-v7a 294 | 1 295 | 296 | 297 | 298 | 299 | res\drawable 300 | 1 301 | 302 | 303 | res\drawable 304 | 1 305 | 306 | 307 | 308 | 309 | res\values 310 | 1 311 | 312 | 313 | res\values 314 | 1 315 | 316 | 317 | 318 | 319 | res\values-v21 320 | 1 321 | 322 | 323 | res\values-v21 324 | 1 325 | 326 | 327 | 328 | 329 | res\values 330 | 1 331 | 332 | 333 | res\values 334 | 1 335 | 336 | 337 | 338 | 339 | res\drawable 340 | 1 341 | 342 | 343 | res\drawable 344 | 1 345 | 346 | 347 | 348 | 349 | res\drawable-xxhdpi 350 | 1 351 | 352 | 353 | res\drawable-xxhdpi 354 | 1 355 | 356 | 357 | 358 | 359 | res\drawable-ldpi 360 | 1 361 | 362 | 363 | res\drawable-ldpi 364 | 1 365 | 366 | 367 | 368 | 369 | res\drawable-mdpi 370 | 1 371 | 372 | 373 | res\drawable-mdpi 374 | 1 375 | 376 | 377 | 378 | 379 | res\drawable-hdpi 380 | 1 381 | 382 | 383 | res\drawable-hdpi 384 | 1 385 | 386 | 387 | 388 | 389 | res\drawable-xhdpi 390 | 1 391 | 392 | 393 | res\drawable-xhdpi 394 | 1 395 | 396 | 397 | 398 | 399 | res\drawable-mdpi 400 | 1 401 | 402 | 403 | res\drawable-mdpi 404 | 1 405 | 406 | 407 | 408 | 409 | res\drawable-hdpi 410 | 1 411 | 412 | 413 | res\drawable-hdpi 414 | 1 415 | 416 | 417 | 418 | 419 | res\drawable-xhdpi 420 | 1 421 | 422 | 423 | res\drawable-xhdpi 424 | 1 425 | 426 | 427 | 428 | 429 | res\drawable-xxhdpi 430 | 1 431 | 432 | 433 | res\drawable-xxhdpi 434 | 1 435 | 436 | 437 | 438 | 439 | res\drawable-xxxhdpi 440 | 1 441 | 442 | 443 | res\drawable-xxxhdpi 444 | 1 445 | 446 | 447 | 448 | 449 | res\drawable-small 450 | 1 451 | 452 | 453 | res\drawable-small 454 | 1 455 | 456 | 457 | 458 | 459 | res\drawable-normal 460 | 1 461 | 462 | 463 | res\drawable-normal 464 | 1 465 | 466 | 467 | 468 | 469 | res\drawable-large 470 | 1 471 | 472 | 473 | res\drawable-large 474 | 1 475 | 476 | 477 | 478 | 479 | res\drawable-xlarge 480 | 1 481 | 482 | 483 | res\drawable-xlarge 484 | 1 485 | 486 | 487 | 488 | 489 | res\values 490 | 1 491 | 492 | 493 | res\values 494 | 1 495 | 496 | 497 | 498 | 499 | 1 500 | 501 | 502 | 1 503 | 504 | 505 | 0 506 | 507 | 508 | 509 | 510 | 1 511 | .framework 512 | 513 | 514 | 1 515 | .framework 516 | 517 | 518 | 0 519 | 520 | 521 | 522 | 523 | 1 524 | .dylib 525 | 526 | 527 | 1 528 | .dylib 529 | 530 | 531 | 0 532 | .dll;.bpl 533 | 534 | 535 | 536 | 537 | 1 538 | .dylib 539 | 540 | 541 | 1 542 | .dylib 543 | 544 | 545 | 1 546 | .dylib 547 | 548 | 549 | 1 550 | .dylib 551 | 552 | 553 | 1 554 | .dylib 555 | 556 | 557 | 0 558 | .bpl 559 | 560 | 561 | 562 | 563 | 0 564 | 565 | 566 | 0 567 | 568 | 569 | 0 570 | 571 | 572 | 0 573 | 574 | 575 | 0 576 | 577 | 578 | 0 579 | 580 | 581 | 0 582 | 583 | 584 | 0 585 | 586 | 587 | 588 | 589 | ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 590 | 1 591 | 592 | 593 | ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 594 | 1 595 | 596 | 597 | 598 | 599 | ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 600 | 1 601 | 602 | 603 | ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 604 | 1 605 | 606 | 607 | 608 | 609 | ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 610 | 1 611 | 612 | 613 | ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 614 | 1 615 | 616 | 617 | 618 | 619 | ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 620 | 1 621 | 622 | 623 | ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 624 | 1 625 | 626 | 627 | 628 | 629 | ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 630 | 1 631 | 632 | 633 | ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 634 | 1 635 | 636 | 637 | 638 | 639 | ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 640 | 1 641 | 642 | 643 | ..\$(PROJECTNAME).launchscreen\Assets\LaunchScreenImage.imageset 644 | 1 645 | 646 | 647 | 648 | 649 | 1 650 | 651 | 652 | 1 653 | 654 | 655 | 656 | 657 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 658 | 1 659 | 660 | 661 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 662 | 1 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 1 672 | 673 | 674 | 1 675 | 676 | 677 | 1 678 | 679 | 680 | 681 | 682 | 683 | 684 | 685 | Contents\Resources 686 | 1 687 | 688 | 689 | Contents\Resources 690 | 1 691 | 692 | 693 | 694 | 695 | library\lib\armeabi-v7a 696 | 1 697 | 698 | 699 | library\lib\arm64-v8a 700 | 1 701 | 702 | 703 | 1 704 | 705 | 706 | 1 707 | 708 | 709 | 1 710 | 711 | 712 | 1 713 | 714 | 715 | 1 716 | 717 | 718 | 1 719 | 720 | 721 | 0 722 | 723 | 724 | 725 | 726 | library\lib\armeabi-v7a 727 | 1 728 | 729 | 730 | 731 | 732 | 1 733 | 734 | 735 | 1 736 | 737 | 738 | 739 | 740 | Assets 741 | 1 742 | 743 | 744 | Assets 745 | 1 746 | 747 | 748 | 749 | 750 | Assets 751 | 1 752 | 753 | 754 | Assets 755 | 1 756 | 757 | 758 | 759 | 760 | 761 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 769 | 770 | 12 771 | 772 | 773 | 774 | 775 | 776 | -------------------------------------------------------------------------------- /Demos/benchmark.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Demos/benchmark.res -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 pyscripter 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /PatchRegularExpressionsAPI.ps1: -------------------------------------------------------------------------------- 1 | Push-Location Source 2 | Copy-Item "C:\Program Files (x86)\Embarcadero\Studio\21.0\source\rtl\common\System.RegularExpressionsAPI.pas" 3 | git apply --ignore-space-change --ignore-whitespace --whitespace=nowarn --unsafe-paths .\RegularExpressionsApi.diff 4 | Pop-Location -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Pcre-Jit-Delphi 2 | 3 | Delphi wraps the [PCRE](https://www.pcre.org/) library into the System.RegularExpressions unit. This unit provides a high-level easy-to-use interface to PCRE. 4 | A limitation however is that it does not provide access to the Just-In-Time (JIT) compiler of PCRE. PCRE JIT can improve the performance of regular expression matching 5 | dramatically and is particularly useful, when you apply the same regular expression repetitively. The purpose of this project is to patch the Delphi RTL in 6 | order to provide access to JIT. 7 | 8 | ## Instructions for using Pcre-Jit-Delphi 9 | 10 | 1. Clone this repository. 11 | 2. You then need to create the patched System.RegularExpressionsAPI.pas file in the Source directory (it is not in the repository due to licensing restrictions). 12 | The PowerShell script PatchRegularExpressionsAPI.ps1 does that. It copies the unit from the Delphi installation direcotry into the Source directory and then applies the patch "RegularExpressionsApi.diff" located in the same directory. Git needs to be accessible from the command line for this to work. The script assumes you have Delphi 10.4 installed. If not, you can manually apply the patch by studying RegularExpressionsApi.diff, 13 | which is relatively easy (small number of changes). 14 | 3. To use PCRE JIT in your delphi projects, you need to add the Source\System.RegularExpressionsAPI.pas to your project, so that it is used instead of he one provided by 15 | Delphi. You can then study the class helpers in the Benchmark.dpr console program (in the Demos directory) to see how you can use the PCRE JIT. With the class helpers 16 | all you need to do is call RegEx.StudyJIT before matching. 17 | 18 | ## Instructions for compiling PCRE from sources 19 | 20 | The compiled object files that the patched System.RegularExpressionsAPI.pas needs, are provided in the Source\obj folder. To recreate these files from the PCRE sources you 21 | need the following: 22 | 23 | 1. You need to have [Visual Studio](https://visualstudio.microsoft.com/) installed. The [Community edition](https://visualstudio.microsoft.com/vs/community/) will do. 24 | 2. Execute the Powershell scripts CompilePCREx64 and CompilePCREx86 to recreate the Win64 and Win32 object files. 25 | 26 | 27 | ## Benchmark 28 | 29 | The console project Benchmark.dpr in Demos folder compares the performance of the built-in Delphi regualar expressions library, with the those of using Study without JIT and 30 | Study with JIT on a commonly used regular expression benchmark. 31 | 32 | Here are the results I got from the 64 bit version. 33 | 34 | ``` 35 | Time | Match count 36 | ============================================================================== 37 | Delphi's own TRegEx: 38 | /Twain/ : 7.00 ms | 811 39 | /(?i)Twain/ : 41.00 ms | 965 40 | /[a-z]shing/ : 384.00 ms | 1540 41 | /Huck[a-zA-Z]+|Saw[a-zA-Z]+/ : 461.00 ms | 262 42 | /\b\w+nn\b/ : 588.00 ms | 262 43 | /[a-q][^u-z]{13}x/ : 539.00 ms | 4094 44 | /Tom|Sawyer|Huckleberry|Finn/ : 757.00 ms | 2598 45 | /(?i)Tom|Sawyer|Huckleberry|Finn/ : 861.00 ms | 4152 46 | /.{0,2}(Tom|Sawyer|Huckleberry|Finn)/ : 2615.00 ms | 2598 47 | /.{2,4}(Tom|Sawyer|Huckleberry|Finn)/ : 2766.00 ms | 1976 48 | /Tom.{10,25}river|river.{10,25}Tom/ : 455.00 ms | 2 49 | /[a-zA-Z]+ing/ : 807.00 ms | 78423 50 | /\s[a-zA-Z]{0,12}ing\s/ : 560.00 ms | 49659 51 | /([A-Za-z]awyer|[A-Za-z]inn)\s/ : 789.00 ms | 209 52 | /["'][^"']{0,30}[?!\.]["']/ : 321.00 ms | 8885 53 | Total Time: 11963.00 ms 54 | ============================================================================== 55 | Delphi's own TRegEx with Study: 56 | /Twain/ : 6.00 ms | 811 57 | /(?i)Twain/ : 41.00 ms | 965 58 | /[a-z]shing/ : 316.00 ms | 1540 59 | /Huck[a-zA-Z]+|Saw[a-zA-Z]+/ : 21.00 ms | 262 60 | /\b\w+nn\b/ : 581.00 ms | 262 61 | /[a-q][^u-z]{13}x/ : 413.00 ms | 4094 62 | /Tom|Sawyer|Huckleberry|Finn/ : 28.00 ms | 2598 63 | /(?i)Tom|Sawyer|Huckleberry|Finn/ : 217.00 ms | 4152 64 | /.{0,2}(Tom|Sawyer|Huckleberry|Finn)/ : 2632.00 ms | 2598 65 | /.{2,4}(Tom|Sawyer|Huckleberry|Finn)/ : 2785.00 ms | 1976 66 | /Tom.{10,25}river|river.{10,25}Tom/ : 50.00 ms | 2 67 | /[a-zA-Z]+ing/ : 759.00 ms | 78423 68 | /\s[a-zA-Z]{0,12}ing\s/ : 563.00 ms | 49659 69 | /([A-Za-z]awyer|[A-Za-z]inn)\s/ : 699.00 ms | 209 70 | /["'][^"']{0,30}[?!\.]["']/ : 52.00 ms | 8885 71 | Total Time: 9179.00 ms 72 | ============================================================================== 73 | Delphi's own TRegEx with JIT: 74 | /Twain/ : 11.00 ms | 811 75 | /(?i)Twain/ : 14.00 ms | 965 76 | /[a-z]shing/ : 12.00 ms | 1540 77 | /Huck[a-zA-Z]+|Saw[a-zA-Z]+/ : 3.00 ms | 262 78 | /\b\w+nn\b/ : 126.00 ms | 262 79 | /[a-q][^u-z]{13}x/ : 154.00 ms | 4094 80 | /Tom|Sawyer|Huckleberry|Finn/ : 22.00 ms | 2598 81 | /(?i)Tom|Sawyer|Huckleberry|Finn/ : 61.00 ms | 4152 82 | /.{0,2}(Tom|Sawyer|Huckleberry|Finn)/ : 277.00 ms | 2598 83 | /.{2,4}(Tom|Sawyer|Huckleberry|Finn)/ : 346.00 ms | 1976 84 | /Tom.{10,25}river|river.{10,25}Tom/ : 12.00 ms | 2 85 | /[a-zA-Z]+ing/ : 84.00 ms | 78423 86 | /\s[a-zA-Z]{0,12}ing\s/ : 156.00 ms | 49659 87 | /([A-Za-z]awyer|[A-Za-z]inn)\s/ : 35.00 ms | 209 88 | /["'][^"']{0,30}[?!\.]["']/ : 18.00 ms | 8885 89 | Total Time: 1350.00 ms 90 | ``` 91 | 92 | As you can see the increase in performance is impressive. 93 | 94 | ## Credits 95 | 96 | Many thanks to [Mahdi Safsafi](https://github.com/MahdiSafsafi) who provided the assembly code for __chkstk. 97 | 98 | ### Please note the PCRE-Jit is now included in Delphi 11.2. 99 | 100 | -------------------------------------------------------------------------------- /Source/RegularExpressionsApi.diff: -------------------------------------------------------------------------------- 1 | diff --git a/Source/System.RegularExpressionsAPI.pas b/Source/System.RegularExpressionsAPI.pas 2 | index 058683f..8df05d9 100644 3 | --- a/Source/System.RegularExpressionsAPI.pas 4 | +++ b/Source/System.RegularExpressionsAPI.pas 5 | @@ -116,6 +116,7 @@ 6 | { } 7 | {******************************************************************************} 8 | 9 | + 10 | unit System.RegularExpressionsAPI; 11 | 12 | interface 13 | @@ -576,8 +577,9 @@ var 14 | pcre_maketables: function: MarshaledAString; cdecl = nil; 15 | pcre_refcount: function(argument_re: PPCRE; adjust: Integer): Integer; cdecl = nil; 16 | pcre_study: function(const code: PPCRE; options: Integer; const errptr: PMarshaledAString): PPCREExtra; cdecl = nil; 17 | + pcre_free_study: procedure(extra: PPCREExtra); cdecl = nil; 18 | pcre_version: function: MarshaledAString; cdecl = nil; 19 | - 20 | + 21 | {$NODEFINE pcre_get_substring_list} 22 | 23 | function LoadPCRELib: Boolean; 24 | @@ -593,6 +595,7 @@ implementation 25 | 26 | {$IFDEF MSWINDOWS} 27 | uses 28 | + WinApi.Windows, 29 | System.Win.Crtl; {$NOINCLUDE System.Win.Crtl} 30 | {$ENDIF MSWINDOWS} 31 | {$IF defined(DYNAMIC_LIB) and defined(POSIX)} 32 | @@ -608,43 +611,45 @@ var 33 | {$IFDEF MSWINDOWS} 34 | {$IFDEF PCRE16} 35 | {$IF Defined(Win32)} 36 | - {$L pcre16_study.obj} 37 | - {$L pcre16_compile.obj} 38 | - {$L pcre16_config.obj} 39 | - {$L pcre16_dfa_exec.obj} 40 | - {$L pcre16_exec.obj} 41 | - {$L pcre16_fullinfo.obj} 42 | - {$L pcre16_get.obj} 43 | - {$L pcre16_maketables.obj} 44 | - {$L pcre16_newline.obj} 45 | - {$L pcre16_ord2utf16.obj} 46 | - {$L pcre16_refcount.obj} 47 | - {$L pcre16_tables.obj} 48 | - {$L pcre16_string_utils.obj} 49 | - {$L pcre16_ucd.obj} 50 | - {$L pcre16_valid_utf16.obj} 51 | - {$L pcre16_version.obj} 52 | - {$L pcre16_xclass.obj} 53 | - {$L pcre16_default_tables.obj} 54 | + {$L obj\pcre\win32\pcre16_study.obj} 55 | + {$L obj\pcre\win32\pcre16_compile.obj} 56 | + {$L obj\pcre\win32\pcre16_config.obj} 57 | + {$L obj\pcre\win32\pcre16_dfa_exec.obj} 58 | + {$L obj\pcre\win32\pcre16_exec.obj} 59 | + {$L obj\pcre\win32\pcre16_fullinfo.obj} 60 | + {$L obj\pcre\win32\pcre16_get.obj} 61 | + {$L obj\pcre\win32\pcre16_maketables.obj} 62 | + {$L obj\pcre\win32\pcre16_newline.obj} 63 | + {$L obj\pcre\win32\pcre16_ord2utf16.obj} 64 | + {$L obj\pcre\win32\pcre16_refcount.obj} 65 | + {$L obj\pcre\win32\pcre16_tables.obj} 66 | + {$L obj\pcre\win32\pcre16_string_utils.obj} 67 | + {$L obj\pcre\win32\pcre16_ucd.obj} 68 | + {$L obj\pcre\win32\pcre16_valid_utf16.obj} 69 | + {$L obj\pcre\win32\pcre16_version.obj} 70 | + {$L obj\pcre\win32\pcre16_xclass.obj} 71 | + {$L obj\pcre\win32\pcre16_chartables.obj} 72 | + {$L obj\pcre\win32\pcre16_jit_compile.obj} 73 | {$ELSEIF Defined(Win64)} 74 | - {$L pcre16_study.o} 75 | - {$L pcre16_compile.o} 76 | - {$L pcre16_config.o} 77 | - {$L pcre16_dfa_exec.o} 78 | - {$L pcre16_exec.o} 79 | - {$L pcre16_fullinfo.o} 80 | - {$L pcre16_get.o} 81 | - {$L pcre16_maketables.o} 82 | - {$L pcre16_newline.o} 83 | - {$L pcre16_ord2utf16.o} 84 | - {$L pcre16_refcount.o} 85 | - {$L pcre16_string_utils.o} 86 | - {$L pcre16_tables.o} 87 | - {$L pcre16_ucd.o} 88 | - {$L pcre16_valid_utf16.o} 89 | - {$L pcre16_version.o} 90 | - {$L pcre16_xclass.o} 91 | - {$L pcre16_default_tables.o} 92 | + {$L obj\pcre\win64\pcre16_study.obj} 93 | + {$L obj\pcre\win64\pcre16_compile.obj} 94 | + {$L obj\pcre\win64\pcre16_config.obj} 95 | + {$L obj\pcre\win64\pcre16_dfa_exec.obj} 96 | + {$L obj\pcre\win64\pcre16_exec.obj} 97 | + {$L obj\pcre\win64\pcre16_fullinfo.obj} 98 | + {$L obj\pcre\win64\pcre16_get.obj} 99 | + {$L obj\pcre\win64\pcre16_maketables.obj} 100 | + {$L obj\pcre\win64\pcre16_newline.obj} 101 | + {$L obj\pcre\win64\pcre16_ord2utf16.obj} 102 | + {$L obj\pcre\win64\pcre16_refcount.obj} 103 | + {$L obj\pcre\win64\pcre16_string_utils.obj} 104 | + {$L obj\pcre\win64\pcre16_tables.obj} 105 | + {$L obj\pcre\win64\pcre16_ucd.obj} 106 | + {$L obj\pcre\win64\pcre16_valid_utf16.obj} 107 | + {$L obj\pcre\win64\pcre16_version.obj} 108 | + {$L obj\pcre\win64\pcre16_xclass.obj} 109 | + {$L obj\pcre\win64\pcre16_chartables.obj} 110 | + {$L obj\pcre\win64\pcre16_jit_compile.obj} 111 | {$ENDIF} 112 | {$ELSE} 113 | {$IF Defined(Win32)} 114 | @@ -864,22 +869,84 @@ begin 115 | if pattern <> nil then 116 | __pcre_free(pattern); 117 | if hints <> nil then 118 | - __pcre_free(hints); 119 | + pcre_free_study(hints); 120 | if chartable <> nil then 121 | __pcre_free(chartable); 122 | end; 123 | 124 | {$IFDEF WIN64} 125 | -procedure __chkstk; 126 | +//procedure __chkstk; cdecl; external name '__chkstk'; 127 | +procedure __chkstk(); 128 | asm 129 | + .NOFRAME 130 | + sub rsp, $10 131 | + mov [rsp], r10 132 | + mov [rsp+8], r11 133 | + xor r11,r11 134 | + lea r10, [rsp+$18] 135 | + sub r10,rax 136 | + cmovb r10,r11 137 | + mov r11, qword ptr gs:[$10] 138 | + cmp r10,r11 139 | + db $f2 140 | + jae @@L1 141 | + and r10w,$F000 142 | +@@L2: 143 | + lea r11, [r11-$1000] 144 | + mov byte [r11],0 145 | + cmp r10,r11 146 | + db $f2 147 | + jne @@L2 148 | +@@L1: 149 | + mov r10, [rsp] 150 | + mov r11, [rsp+8] 151 | + add rsp, $10 152 | + db $f2 153 | + ret 154 | end; 155 | {$ENDIF WIN64} 156 | 157 | {$IFDEF WIN32} 158 | -procedure __chkstk_noalloc; 159 | -asm 160 | +procedure __chkstk(); // function chkstk(LocalFrameSize: Integer): Pointer; 161 | +const 162 | + _PAGESIZE_ = $1000; 163 | + asm 164 | + push ecx 165 | + 166 | + // Calculate new TOS. 167 | + 168 | + lea ecx, [esp] + 8 - 4 // TOS before entering function + size for ret value 169 | + sub ecx, eax // new TOS 170 | + 171 | + // Handle allocation size that results in wraparound. 172 | + // Wraparound will result in StackOverflow exception. 173 | + 174 | + sbb eax, eax // 0 if CF==0, ~0 if CF==1 175 | + not eax // ~0 if TOS did not wrapped around, 0 otherwise 176 | + and ecx, eax // set to 0 if wraparound 177 | + 178 | + mov eax, esp // current TOS 179 | + and eax, not ( _PAGESIZE_ - 1) // Round down to current page boundary 180 | + 181 | + @@cs10: 182 | + cmp ecx, eax // Is new TOS 183 | + db $f2 184 | + jb @@cs20 // in probed page? 185 | + mov eax, ecx // yes. 186 | + pop ecx 187 | + xchg esp, eax // update esp 188 | + mov eax, [eax] // get return address 189 | + mov [esp], eax // and put it at new TOS 190 | + db $f2 191 | + ret 192 | + 193 | + // Find next lower page and probe 194 | + @@cs20: 195 | + sub eax, _PAGESIZE_ // decrease by PAGESIZE 196 | + test [eax], eax // probe page. 197 | + jmp @@cs10 198 | end; 199 | -{$ENDIF WIN64} 200 | +{$ENDIF WIN32} 201 | 202 | {$IFDEF DYNAMIC_LIB} 203 | function LoadPCRELib: Boolean; 204 | @@ -923,6 +990,7 @@ begin 205 | @pcre_maketables := GetProcAddr('pcre_maketables'); 206 | @pcre_refcount := GetProcAddr('pcre_refcount'); 207 | @pcre_study := GetProcAddr('pcre_study'); 208 | + @pcre_free_study := GetProcAddr('pcre_free_study'); 209 | @pcre_version := GetProcAddr('pcre_version'); 210 | 211 | // Hook the global variables exported from the library for memory allocation 212 | @@ -945,6 +1013,32 @@ begin 213 | end; 214 | {$ENDIF} 215 | 216 | + 217 | +{$IFDEF WIN32} 218 | +procedure __pcre16_ucp_typerange; external; 219 | + 220 | +Const 221 | + __imp__WaitForSingleObject: Pointer = @WaitForSingleObject; 222 | + __imp__ReleaseMutex: Pointer = @ReleaseMutex; 223 | + __imp__CreateMutexA: Pointer = @CreateMutexA; 224 | + __imp__GetSystemInfo: Pointer = @GetSystemInfo; 225 | + __imp__VirtualAlloc: Pointer = @VirtualAlloc; 226 | + __imp__VirtualFree: Pointer = @VirtualFree; 227 | +{$ENDIF WIN32} 228 | + 229 | + 230 | +{$IFDEF WIN64} 231 | +procedure _pcre16_ucp_typerange; external; 232 | + 233 | +Const 234 | + __imp_WaitForSingleObject: Pointer = @WaitForSingleObject; 235 | + __imp_ReleaseMutex: Pointer = @ReleaseMutex; 236 | + __imp_CreateMutexA: Pointer = @CreateMutexA; 237 | + __imp_GetSystemInfo: Pointer = @GetSystemInfo; 238 | + __imp_VirtualAlloc: Pointer = @VirtualAlloc; 239 | + __imp_VirtualFree: Pointer = @VirtualFree; 240 | +{$ENDIF WIN64} 241 | + 242 | {$IFDEF STATIC_LIB} 243 | initialization 244 | set_pcre_malloc(@__pcre_malloc); 245 | -------------------------------------------------------------------------------- /Source/obj/pcre/win32/dirinfo.txt: -------------------------------------------------------------------------------- 1 | This is the directory where object files of PCRE (http://www.pcre.org/) for win32 reside. -------------------------------------------------------------------------------- /Source/obj/pcre/win32/pcre16_byte_order.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win32/pcre16_byte_order.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win32/pcre16_chartables.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win32/pcre16_chartables.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win32/pcre16_compile.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win32/pcre16_compile.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win32/pcre16_config.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win32/pcre16_config.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win32/pcre16_dfa_exec.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win32/pcre16_dfa_exec.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win32/pcre16_exec.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win32/pcre16_exec.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win32/pcre16_fullinfo.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win32/pcre16_fullinfo.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win32/pcre16_get.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win32/pcre16_get.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win32/pcre16_globals.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win32/pcre16_globals.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win32/pcre16_jit_compile.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win32/pcre16_jit_compile.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win32/pcre16_maketables.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win32/pcre16_maketables.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win32/pcre16_newline.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win32/pcre16_newline.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win32/pcre16_ord2utf16.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win32/pcre16_ord2utf16.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win32/pcre16_refcount.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win32/pcre16_refcount.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win32/pcre16_string_utils.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win32/pcre16_string_utils.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win32/pcre16_study.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win32/pcre16_study.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win32/pcre16_tables.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win32/pcre16_tables.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win32/pcre16_ucd.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win32/pcre16_ucd.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win32/pcre16_utf16_utils.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win32/pcre16_utf16_utils.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win32/pcre16_valid_utf16.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win32/pcre16_valid_utf16.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win32/pcre16_version.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win32/pcre16_version.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win32/pcre16_xclass.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win32/pcre16_xclass.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win64/dirinfo.txt: -------------------------------------------------------------------------------- 1 | This is the directory where object files of PCRE (http://www.pcre.org/) for win64 reside. -------------------------------------------------------------------------------- /Source/obj/pcre/win64/pcre16_byte_order.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win64/pcre16_byte_order.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win64/pcre16_chartables.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win64/pcre16_chartables.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win64/pcre16_compile.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win64/pcre16_compile.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win64/pcre16_config.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win64/pcre16_config.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win64/pcre16_dfa_exec.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win64/pcre16_dfa_exec.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win64/pcre16_exec.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win64/pcre16_exec.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win64/pcre16_fullinfo.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win64/pcre16_fullinfo.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win64/pcre16_get.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win64/pcre16_get.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win64/pcre16_globals.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win64/pcre16_globals.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win64/pcre16_jit_compile.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win64/pcre16_jit_compile.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win64/pcre16_maketables.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win64/pcre16_maketables.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win64/pcre16_newline.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win64/pcre16_newline.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win64/pcre16_ord2utf16.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win64/pcre16_ord2utf16.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win64/pcre16_refcount.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win64/pcre16_refcount.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win64/pcre16_string_utils.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win64/pcre16_string_utils.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win64/pcre16_study.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win64/pcre16_study.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win64/pcre16_tables.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win64/pcre16_tables.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win64/pcre16_ucd.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win64/pcre16_ucd.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win64/pcre16_utf16_utils.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win64/pcre16_utf16_utils.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win64/pcre16_valid_utf16.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win64/pcre16_valid_utf16.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win64/pcre16_version.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win64/pcre16_version.obj -------------------------------------------------------------------------------- /Source/obj/pcre/win64/pcre16_xclass.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/Source/obj/pcre/win64/pcre16_xclass.obj -------------------------------------------------------------------------------- /objconv.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/objconv.exe -------------------------------------------------------------------------------- /pcre-8.44.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pyscripter/Pcre-Jit-Delphi/3a224f4cf03987469ef8b3bb3a87afb8beea4fe5/pcre-8.44.zip --------------------------------------------------------------------------------