Commit Graph

776 Commits

Author SHA1 Message Date
Philip.Hazel b196143523 Make /x more Perl-compatible by recognizing all of Unicode's "Pattern White
Space" characters, not just the ASCII ones.
2018-08-03 09:38:36 +00:00
Philip.Hazel 6e245572b8 Add support for (?^) as now supported by Perl. 2018-07-28 16:23:24 +00:00
Philip.Hazel a9453f096f Give specific error for \F as for \L, \U etc. 2018-07-27 16:55:52 +00:00
Philip.Hazel e9aa3c0a21 Add support for \N{U+dd...}, for ASCII and Unicode modes only. 2018-07-27 16:30:40 +00:00
Philip.Hazel 7d97c226c7 Fix oversight in recent OP_COMMIT_ARG update. 2018-07-22 15:19:43 +00:00
Philip.Hazel 5ea9f6b0f1 Some places where the new opcode OP_COMMIT_ARG needs to be handled and which I
forgot.
2018-07-21 14:52:26 +00:00
Philip.Hazel 192b82cf6e Allow :NAME on (*ACCEPT), (*FAIL), and (*COMMIT) and fix bug with (*MARK)
followed by (*ACCEPT) in an assertion. More small updates to perltest.sh.
2018-07-21 14:34:51 +00:00
Philip.Hazel 666e94cd59 Fixed atomic group backtracking bug. 2018-07-16 15:24:32 +00:00
Philip.Hazel d01c822c6d Minor tweak (may give minor performance improvement) to JIT UCD handling. 2018-07-14 17:00:17 +00:00
Philip.Hazel 937617f343 Update to Unicode 11.0.0 2018-07-07 16:10:29 +00:00
Philip.Hazel 50aa69657e Fix bug in VERSION number reading. 2018-07-02 12:26:04 +00:00
Philip.Hazel b2294373d7 Ignore qualifiers on lookaheads within lookbehinds when checking for a fixed
length.
2018-07-02 11:23:45 +00:00
Philip.Hazel 1c79bdf36f Fix global search/replace in pcre2test and pcre2_substitute() when the pattern
matches an empty string, but never at the starting offset.
2018-07-02 10:54:03 +00:00
Philip.Hazel 89c2a02027 Fix bug when \K is used in a lookbehind in a substitute pattern. 2018-06-22 16:29:56 +00:00
Philip.Hazel fced6feb5b Remove src/pcre2.h because it can cause trouble when building in a different
directory. Why was it there anyway?
2018-06-22 14:50:43 +00:00
Philip.Hazel 9d87fcb727 Patches for portability. 2018-06-20 17:05:31 +00:00
Philip.Hazel 7aaced3475 Make stdint.h an optional inclusion, in case it's not present in some systems.
Use inttypes.h instead if it exists.
2018-06-19 17:41:01 +00:00
Philip.Hazel b4aaf222d7 Undefine WIN32 for pcre2grep under Cygwin. 2018-06-19 16:27:42 +00:00
Philip.Hazel e75410a5d8 More typos and changes to "Kibibytes" for "Kilobytes". 2018-06-18 14:03:33 +00:00
Philip.Hazel fabea723cf Typos in documentation and comments noted by Jason Hood. 2018-06-17 14:13:28 +00:00
Philip.Hazel 3fb01b0443 Ensure all match limit tests set a limit, don't rely on the default. 2018-04-29 15:07:44 +00:00
Philip.Hazel 75747ebb11 Re-factor pcre2_dfa_match() to use the heap instead of the stack for workspace
vectors when doing recursive function calls.
2018-04-27 16:48:35 +00:00
Philip.Hazel fb413521fc Minor code tidy. 2018-04-21 16:43:49 +00:00
Philip.Hazel f7187b38c7 Apply some of Daniel Richard G's Windows patches. 2018-04-19 16:52:57 +00:00
Zoltán Herczeg 7ccd0fa994 MIPS-JIT compiler fix: flags were not preserved for fast return. 2018-03-19 08:15:52 +00:00
Zoltán Herczeg 6f6d44305a JIT compiler update. 2018-03-13 12:05:48 +00:00
Philip.Hazel a7b2b6ff64 Set error offset zero for early errors in pcre2_pattern_convert(). 2018-03-04 15:13:37 +00:00
Philip.Hazel 26edb6cb43 Minor tweak to the m68k patch. 2018-02-28 09:03:12 +00:00
Philip.Hazel dbb53b3585 Add alignment patch for m68k. 2018-02-27 17:19:51 +00:00
Philip.Hazel ee7e093af0 A small fix to pcre2grep to avoid compiler warnings for -Wformat-overflow=2. 2018-02-25 12:12:48 +00:00
Philip.Hazel 04919e9d03 Add support to pcre2grep for binary zeros in -f files. 2018-02-24 17:09:19 +00:00
Philip.Hazel b26aa366ba Fix \C bug with repeated character classes in UTF-8 mode. 2018-02-19 17:26:33 +00:00
Philip.Hazel 553bf8a1dc Oops, forgot about "-C bsr" in previous patch. 2018-02-19 17:00:45 +00:00
Philip.Hazel af9bcb7f13 Fix pcre2test -C to correctly show what \R matches. 2018-02-19 16:55:47 +00:00
Philip.Hazel aff77100bb Fix the value passed back for POSIX unset groups when REG_STARTEND has a
non-zero starting offset, and make pcre2test show relevant POSIX unset groups.
2018-02-19 14:49:42 +00:00
Philip.Hazel 7eae1c5d17 Final file tidies for 10.31 2018-02-12 11:33:56 +00:00
Philip.Hazel 53a588431c Fix auto-possessification bug at the end of a capturing group that is called
recursively.
2018-01-31 17:53:56 +00:00
Philip.Hazel 7a5b962509 Increment dummy ovector size in internal structures to avoid spurious array
bound checker warnings. This fixes oss-fuzz 5415.
2018-01-16 16:50:40 +00:00
Philip.Hazel 958cd1484f Source tidies and version etc. updates for 10.31-RC1. 2018-01-13 16:53:02 +00:00
Philip.Hazel 9d197bfe76 Avoid pointer overflow for unset captures in pcre2_substring_list_get(), though
it could never have caused a problem.
2018-01-12 18:48:27 +00:00
Philip.Hazel a6237da13e Fix problem when compiling without Unicode support. 2018-01-12 17:55:47 +00:00
Zoltán Herczeg 940627c83a Fix a typo in JIT and add a test. 2018-01-10 09:28:03 +00:00
Zoltán Herczeg 1e0f88bba4 Update some register assignments and the JIT compiler. 2018-01-09 08:38:32 +00:00
Zoltán Herczeg 4a4389fa50 Support the new EXTUNI in JIT. 2018-01-06 08:48:11 +00:00
Zoltán Herczeg 11ed257eaa JIT compiler update. 2018-01-05 09:30:45 +00:00
Philip.Hazel 85f8ecba58 Tidy ACROSSCHAR macro to take same form as FORWARDCHAR and BACKCHAR. 2018-01-01 15:13:24 +00:00
Philip.Hazel 4048606896 Small tidy to start of match optimizations. 2018-01-01 15:05:27 +00:00
Philip.Hazel 807f37095d Previous FIRSTLINE patch was broken. Fix it. 2018-01-01 14:54:06 +00:00
Philip.Hazel 7a6e8a4454 Fix PCRE2_FIRSTLINE bug when a pattern match starts with the first code unit of
a newline sequence.
2018-01-01 14:12:35 +00:00
Philip.Hazel f36a3235bc Tidy up callout code in pcre2_dfa_match(). 2017-12-26 16:43:45 +00:00
Philip.Hazel 911d43cd1e Fix \K issues in pcre2grep. 2017-12-26 15:10:04 +00:00
Philip.Hazel a9f7c80fa3 Update pcre2demo to deal with various \K inside assertion anomalies. 2017-12-23 17:15:51 +00:00
Philip.Hazel 94d5f4a050 Add callout_flags to callout blocks, and set bits within it from pcre2_match()
interpretation.
2017-12-22 15:56:27 +00:00
Philip.Hazel 814cc96bc5 Save extra compile options with the compiled pattern, and add an info call to
retrieve them.
2017-12-16 17:49:26 +00:00
Philip.Hazel 5cbab74c97 Rejig how callout blocks are allocated in pcre2_match(). 2017-12-16 16:43:47 +00:00
Philip.Hazel 9e38537b87 A small code tidy for one error return. 2017-12-16 16:07:29 +00:00
Philip.Hazel 3458a2e2cd Fix infelicity in not finding a first character inside a non-assertive group
within a positive assertion.
2017-12-12 16:23:01 +00:00
Philip.Hazel 59d85d7b55 Fix incorrect first matching character when a backreference with zero minimum
repeat starts a pattern (possibly after assertions).
2017-12-12 15:01:51 +00:00
Philip.Hazel 1a81b738fe Change pcre2grep line number and count variables to unsigned long int. 2017-12-08 10:25:49 +00:00
Zoltán Herczeg 77513bfc04 Fix after JIT compiler update. 2017-11-30 08:15:28 +00:00
Zoltán Herczeg 28e73c60e3 JIT compiler update. 2017-11-29 13:30:31 +00:00
Zoltán Herczeg f93d278054 Fix pcre2_jit_match early check. 2017-11-23 07:54:39 +00:00
Philip.Hazel 2881730084 Very minor code tidy. 2017-11-16 17:44:50 +00:00
Philip.Hazel 2543ba81f7 Fix crash for --line-buffered with a .gz or .bz2 file in pcre2grep. 2017-11-13 17:12:55 +00:00
Philip.Hazel 76814d92c7 Fix multiple multiline matching issues in pcre2grep. 2017-11-13 16:52:39 +00:00
Philip.Hazel 1cc5351f6c Remove superflous variable. 2017-11-09 17:50:59 +00:00
Philip.Hazel 36366914f5 Fix oss-fuzz bugs 3852 and 3891 (same bug); mis-closing external captures by
*ACCEPT inside assertions.
2017-10-29 16:58:38 +00:00
Philip.Hazel 13fe9767cf Fix memory leak issue introduced in last bug fix in pcre2grep. 2017-10-22 16:17:44 +00:00
Philip.Hazel 3a55923da8 Fix pcre2grep recursive file name length issue. 2017-10-20 16:51:59 +00:00
Philip.Hazel cc2182261a Add -LM to pcre2test. 2017-10-17 16:26:20 +00:00
Philip.Hazel aa0c168332 Set PCRE2GREP_RC to the pcre2grep exit status when running under VMS. 2017-10-11 16:49:10 +00:00
Philip.Hazel 6f4ee08469 Add some casts to avoid compiler warnings. 2017-09-26 17:01:23 +00:00
Philip.Hazel 8bbf2b1924 Fixed a small memory leak in pcre2test (convert contexts). 2017-09-18 15:51:44 +00:00
Philip.Hazel 897d547046 Define names for compiler error codes and use them in pcre2_convert.c 2017-09-17 16:56:41 +00:00
Philip.Hazel 5e3a1da503 Remove \C tests from JIT regression when NEVER_BACKSLASH_C is defined. 2017-09-16 11:46:08 +00:00
Philip.Hazel 4ac74a013b Add PCRE2_CONFIG_COMPILED_WIDTHS and PCRE2_CONFIG_NEVER_BACKSLASH_C. 2017-09-16 11:39:38 +00:00
Philip.Hazel d8692f30b7 Make pcre2_internal.h idempotent. 2017-09-13 09:07:00 +00:00
Philip.Hazel 42f547bf4d Replace multiple copies of extended grapheme sequence code with a single
subroutine.
2017-09-12 16:28:42 +00:00
Philip.Hazel badfbcdd12 Documentation update. 2017-09-12 11:41:31 +00:00
Philip.Hazel 3cd616c3a9 Fix typo in VMS code in pcre2test. 2017-08-28 14:59:04 +00:00
Philip.Hazel 94cb52befb Final file tidies for 10.30 release. 2017-08-15 10:58:32 +00:00
Philip.Hazel 18d7627293 Fix "maybe uninitialized" warning. 2017-08-12 16:22:52 +00:00
Zoltán Herczeg 6a42f68b34 Minor JIT compiler update. 2017-08-01 08:26:01 +00:00
Philip.Hazel 4d82a61d47 Hyphen at the end of a character class is always literal. Give error for false
range after \d etc.
2017-07-29 15:54:04 +00:00
Philip.Hazel 33a4edf837 Modify #ifdefs for Cygwin. 2017-07-27 16:17:19 +00:00
Philip.Hazel 0ba5272960 Fix bug in /xx implementation. 2017-07-25 15:27:30 +00:00
Zoltán Herczeg 464d03799f JIT compiler update. 2017-07-24 04:05:38 +00:00
Philip.Hazel 89ebfca28d Put back pcre2_set_recursion_limit() as a real function, synonym for
pcre2_set_depth_limit() in order to preserve the ABI.
2017-07-21 08:53:02 +00:00
Philip.Hazel d4f82ba62a Use %z format to avoid compiler warning. 2017-07-21 08:41:21 +00:00
Philip.Hazel c747990046 Rename the FWRITE macro in pcre2grep to avoid clash in cygwin. 2017-07-21 08:22:03 +00:00
Philip.Hazel 810d9b6da5 Code tidies for 10.30-RC1 release candidate. 2017-07-19 16:04:15 +00:00
Philip.Hazel a23715d7b1 Document experimental pattern conversion functions and remove unimplemented
features.
2017-07-12 16:34:49 +00:00
Philip.Hazel 4f7a608d56 Update grapheme breaking rules for Unicode 10.0.0. 2017-07-05 08:55:49 +00:00
Philip.Hazel 41bb787fb3 Update to Unicode 10.0.0 and add callout_no_where to pcre2test to aid testing. 2017-07-02 16:32:01 +00:00
Philip.Hazel b7d5cee61f Allow anchored patterns to use "first code unit" optimization. 2017-06-30 16:00:33 +00:00
Philip.Hazel cc089cf971 Increase limit for "must be present" code units for 8-bit searches, which use
memchr().
2017-06-26 16:25:16 +00:00
Philip.Hazel 76a57bd839 Convert pcre2grep to use new pcre2_compile() options, thereby fixing two minor
(?) bugs.
2017-06-17 11:32:06 +00:00
Philip.Hazel 69eab9cfe7 Minor code tidy. 2017-06-16 18:04:41 +00:00
Philip.Hazel a083420cac Implement PCRE2_EXTRA_MATCH_LINE and PCRE2_EXTRA_MATCH_WORD for the benefit
of pcre2grep.
2017-06-16 17:51:13 +00:00
Zoltán Herczeg 6679349203 Fix a match offset check in JIT. 2017-06-16 10:27:02 +00:00