Commit Graph

254 Commits

Author SHA1 Message Date
Philip Hazel 0246c6bf64 Add support for Bidi_Control and Bidi_Class properties 2021-12-08 15:34:27 +00:00
Philip Hazel 2a294ddadb Add check for NULL subject to POSIX regexec(). 2021-11-28 16:38:36 +00:00
Philip Hazel cb854a912e Add options for NULL pointers to pcre2test. 2021-11-28 16:22:24 +00:00
Carlo Marcelo Arenas Belón acc520924c
test: avoid failing RunTest if pcre2test -S is not supported (#37)
* test: avoid failing RunTest if pcre2test -S is not supported

If `pcre2test -S` is not supported then then avoid checking for it
in a test.

There is already a conditional check for it to be used when it is
needed and it is available, so adjust that as well.

* pcre2test: update list of platform support for -S

Minix 3 has a BSD userspace and now works fine, but Haiku still
doesn't support stack limits, so update accordingly.
2021-11-09 17:23:02 +00:00
Carlo Marcelo Arenas Belón d46f1863be
improve on 'auto' mode for DISABLE_PERCENT_ZT (#28)
Visual Studio 2013 includes support for %zu and %td, so let newer
versions of it avoid the fallback, and while at it, make sure that
the first check is for DISABLE_PERCENT_ZT so it will be always
honoured if chosen.

prtdiff_t is signed, so use a signed type instead, and make sure
that an appropiate width is chosen if pointers are 64bit wide.

Remove the need for the size_t cast and instead change the size
of the equivalent format identifier to avoid truncations.
2021-10-29 14:29:47 +01:00
Philip Hazel 21c26698b3 Lock out \K in lookaround assertions by default, but provide an option to
re-enable the old behaviour, just in case.
2021-08-30 16:57:44 +01:00
Philip.Hazel 000bbf2ea7 File tidies for 10.36-RC1 2020-11-06 17:27:35 +00:00
Philip.Hazel a2f0fd01c7 Update pcre2test to check delimiters after #perltest and fix some in test 1. 2020-09-14 15:39:39 +00:00
Philip.Hazel ce558bbff1 Second attempt at getting rid of gcc 10 warning. 2020-04-24 15:36:53 +00:00
Philip.Hazel ca55d0be6b Avoid using [-1] as a suffix in pcre2test as it can provoke a compiler warning. 2020-04-23 15:41:23 +00:00
Philip.Hazel f988433788 Fix resource leak in pcre2test introduced by recent patch. 2020-03-24 17:25:58 +00:00
Philip.Hazel 8057c3c8b9 Renamed dftables as pcre2_dftables and enable it to write the tables in binary.
Update documentation about character tables.
2020-03-20 18:09:59 +00:00
Philip.Hazel e8d70e2459 Implement PCRE2_SUBSTITUTE_REPLACEMENT_ONLY. 2020-01-22 17:50:12 +00:00
Philip.Hazel d170829b26 Implement PCRE2_SUBSTITUTE_MATCHED. 2019-12-27 13:35:17 +00:00
Philip.Hazel f3fd8b18cb Implement PCRE2_SUBSTITUTE_LITERAL. 2019-12-26 14:53:24 +00:00
Philip.Hazel add4db4c87 Final file tidies for 10.34 2019-11-21 16:31:08 +00:00
Philip.Hazel 26fc863155 Update comment about %lu warnings. 2019-11-17 17:38:53 +00:00
Philip.Hazel c0ed5a3ab3 Minor upgrade to pcre2test and comment in ucptest. 2019-07-30 17:59:42 +00:00
Philip.Hazel bca9888a2c Implemented pcre2_get_match_data_size(). 2019-07-16 15:50:09 +00:00
Philip.Hazel a5c601091e Give error for zero timing argument to pcre2test. 2019-07-03 17:15:37 +00:00
Philip.Hazel 434e3f7468 Make pcre2test show actual pre-match consulted characters for a partial match,
not the length of the longest lookbehind. Control this by "allusedtext".
2019-06-26 08:23:47 +00:00
Philip.Hazel 1f6b9097f4 Minor improvement to minimum length calculation. 2019-06-13 16:00:11 +00:00
Philip.Hazel 16c046ce50 Implement support for invalid UTF in the pcre2_match() interpreter. 2019-05-24 17:15:48 +00:00
Philip.Hazel 4acee004ec Casts and rewrites to avoid clang sanitize warnings. 2019-04-16 14:49:07 +00:00
Philip.Hazel 95c9d011e3 Change a number of expressions like 1<<10 to 1u<<10. 2019-04-12 14:40:27 +00:00
Philip.Hazel e85de98d0a Fix crash in pcre2_substitute() with NULL match context. 2019-03-11 17:29:08 +00:00
Philip.Hazel 8c8deae8eb Implement PCRE2_EXTRA_ALT_BSUX to support ECMAscript 6's \u{hhh..} syntax. 2019-02-12 17:50:19 +00:00
Philip.Hazel d7b10a57d1 Allow non-ASCII in group names when UTF is set; revise group naming terminology
in documentation to use "capture group", as Perl does.
2019-02-06 18:11:36 +00:00
Philip.Hazel 149af0e21b Implement --disable-percent-zt to avoid %zu and %td even if the environment
claims to be C99 or greater.
2018-11-15 18:09:02 +00:00
Philip.Hazel 9bc81d5229 Upgrade the as yet unreleased substitute callout facility. 2018-11-12 16:02:01 +00:00
Philip.Hazel 900f457222 Update VMS-specific code in pcre2test, on the advice of a VMS user. 2018-11-09 18:10:25 +00:00
Philip.Hazel 87a9887e6e Add "kibibytes" to the output of pcre2test -C to show the units of the heap
limit.
2018-10-22 16:56:11 +00:00
Philip.Hazel f90ce1a333 Implement PCRE2_COPY_MATCHED_SUBJECT. 2018-10-17 08:33:38 +00:00
Philip.Hazel 69254c77f1 Implement PCRE2_EXTRA_ESCAPED_CR_IS_LF 2018-09-21 16:59:48 +00:00
Philip.Hazel a69267246f Implement callouts from pcre2_substitute(). 2018-09-18 16:31:30 +00:00
Philip.Hazel 3fce7c75e9 Add "allvector" to pcre2test. 2018-09-15 17:10:39 +00:00
Philip.Hazel 1a8cc3dab6 Make bcopy() emulation of memmove() work properly. 2018-08-10 16:27:44 +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 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 9d87fcb727 Patches for portability. 2018-06-20 17:05:31 +00:00
Philip.Hazel fabea723cf Typos in documentation and comments noted by Jason Hood. 2018-06-17 14:13:28 +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 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 958cd1484f Source tidies and version etc. updates for 10.31-RC1. 2018-01-13 16:53:02 +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 cc2182261a Add -LM to pcre2test. 2017-10-17 16:26:20 +00:00
Philip.Hazel 8bbf2b1924 Fixed a small memory leak in pcre2test (convert contexts). 2017-09-18 15:51:44 +00:00