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
d90de8b053
Previout bug-fix was bad. This properly fixes an overrun while reading a
...
Unicode group name.
2019-02-07 17:59:37 +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
86349f8814
Fix bug in VERSION conditional test in DFA matching.
2019-01-29 14:34:59 +00:00
Philip.Hazel
7de013bac3
Fix issues with BAD_ESCAPE_IS_LITERAL in character classes.
2019-01-04 16:41:32 +00:00
Philip.Hazel
0b64d9cfca
Fix non-recognition of anchoring when preceded by (*MARK) etc.
2018-11-27 16:00:58 +00:00
Philip.Hazel
0ad7ff1549
Add --disable-pcre2grep-callout-fork configuration setting.
2018-11-17 16:45:57 +00:00
Philip.Hazel
9bc81d5229
Upgrade the as yet unreleased substitute callout facility.
2018-11-12 16:02:01 +00:00
Philip.Hazel
996892434f
Fix zero-repeated subroutine call at start of pattern bug, which recorded an
...
incorrect first code unit.
2018-10-20 09:28:02 +00:00
Philip.Hazel
f90ce1a333
Implement PCRE2_COPY_MATCHED_SUBJECT.
2018-10-17 08:33:38 +00:00
Philip.Hazel
2ba22647d1
Update Makefile.am for compiling with gcov. Add Script Run tests to improve
...
coverage.
2018-10-14 15:56:36 +00:00
Philip.Hazel
1c4dc562e4
Upgrade the ucptest program (used only by maintainer) and script run tests.
2018-10-14 14:27:16 +00:00
Philip.Hazel
0fc5cda13b
Documentation and tests update for script runs.
2018-10-12 17:02:34 +00:00
Philip.Hazel
4e7a204d18
Update Script Run code to use the Script Extension property instead of the
...
Script property.
2018-10-09 16:42:21 +00:00
Philip.Hazel
cda4780fb6
Fix bugs of omission in new script run code.
2018-10-03 15:41:47 +00:00
Philip.Hazel
866750fd53
Basic "script run" implementation. Not yet complete, and not yet documented.
2018-10-02 15:25:58 +00:00
Philip.Hazel
f26b0b0bae
Implement Perl 5.28's alphabetic lookaround syntax, e.g. (*pla:...) and also
...
(*atomic:...).
2018-09-24 16:23:53 +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
bfad956b34
Treat empty-string-matching repeated conditionals the same as ordinary ones
...
when checking for an anchored pattern.
2018-09-03 15:20:40 +00:00
Philip.Hazel
59c2175ed9
Fix anchoring bug in conditionals with only one branch.
2018-09-02 16:53:29 +00:00
Philip.Hazel
50f0de6015
Lock out \N{U+hhhh} in non-UTF (non-Unicode) modes.
2018-09-02 16:03:27 +00:00
Philip.Hazel
6e6bb40a3d
Fix bad auto-possessification of certain types of class.
2018-08-17 14:45:35 +00:00
Philip.Hazel
9332d4be69
Fix dynamic options changing bug.
2018-08-04 08:20:18 +00:00
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
775481293a
Add more tests for further ClusterFuzz issues, all were fixed by the previous
...
patch; they just crashed in different ways. The fixed issues are ClusterFuzz
numbers 9522, 9534, 9535, 9541, 9542. The bug was a new one, introduced by a
recent code update (never in a release).
2018-07-22 15:43:00 +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
a0e367f5b6
Update Perl tester to allow for optimization to be turned off. Required moving
...
some tests out of the Perl-compatible files.
2018-07-14 16:16:51 +00:00
Philip.Hazel
7db5904b9f
Documentation and tests update and minor tweak to perltest.sh.
2018-07-12 17:04:43 +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
e75410a5d8
More typos and changes to "Kibibytes" for "Kilobytes".
2018-06-18 14:03:33 +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
fb15b37b2c
Remove ctrl/Z from the input for test 6.
2018-04-28 16:05:48 +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
04919e9d03
Add support to pcre2grep for binary zeros in -f files.
2018-02-24 17:09:19 +00:00
Philip.Hazel
c440473190
Add another test.
2018-02-20 15:37:49 +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
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
53a588431c
Fix auto-possessification bug at the end of a capturing group that is called
...
recursively.
2018-01-31 17:53:56 +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
4a4389fa50
Support the new EXTUNI in JIT.
2018-01-06 08:48:11 +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
911d43cd1e
Fix \K issues in pcre2grep.
2017-12-26 15:10:04 +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
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
76814d92c7
Fix multiple multiline matching issues in pcre2grep.
2017-11-13 16:52:39 +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
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
0ba5272960
Fix bug in /xx implementation.
2017-07-25 15:27:30 +00:00
Philip.Hazel
810d9b6da5
Code tidies for 10.30-RC1 release candidate.
2017-07-19 16:04:15 +00:00
Philip.Hazel
e3052af6fd
Cut out the binary zero pcre2grep test on Solaris (SunOS) as it isn't possible
...
to check the output because sed won't handle binary zeros on Solaris.
2017-07-18 17:22:39 +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
651ce3dea1
Update convert tests so they run on Windows.
2017-06-24 15:54:14 +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
a083420cac
Implement PCRE2_EXTRA_MATCH_LINE and PCRE2_EXTRA_MATCH_WORD for the benefit
...
of pcre2grep.
2017-06-16 17:51:13 +00:00
Philip.Hazel
c4fac10bad
Implement PCRE2_LITERAL and REG_NOSPEC.
2017-06-15 16:41:44 +00:00
Philip.Hazel
6e30ed1b40
Add subject_literal and allow jitstack in pcre2test pattern modifiers, and add
...
another big pattern test.
2017-06-12 17:48:03 +00:00
Philip.Hazel
bcba497c0b
Implement REG_PEND (GNU extension) for the POSIX wrapper.
2017-06-05 18:25:47 +00:00
Philip.Hazel
e4c86e2ced
Fix matching offsets from regexec() in the POSIX wrapper when called with
...
REG_STARTEND and a starting offset greater than zero.
2017-06-03 16:42:58 +00:00
Philip.Hazel
e3a0f22349
Implement PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL.
2017-06-01 18:10:15 +00:00
Philip.Hazel
c0902e176f
Make pcre2_dfa_match() take notice of the match limit, to catch patterns that
...
use too much resource. This should fix oss-fuzz 1761.
2017-05-30 10:42:57 +00:00
Zoltán Herczeg
3f831482ab
Fix alnum parsing in glob conversion.
2017-05-28 04:05:58 +00:00
Philip.Hazel
c34544b11f
Update POSIX basic regex conversion code.
2017-05-27 17:08:28 +00:00
Philip.Hazel
3f96e07e6b
Fix lookbehind with zero-length branch in DFA matching. Fixes oss-fuzz 1959.
2017-05-27 15:49:29 +00:00
Philip.Hazel
3d80fa4fc2
Implement PCRE2_NEWLINE_NUL.
2017-05-26 17:14:36 +00:00
Zoltán Herczeg
bf6f53b089
Support invalid character classes in conversion.
2017-05-25 13:19:42 +00:00
Zoltán Herczeg
0b2052f714
Support the general case of starstar in glob conversion.
2017-05-24 15:22:03 +00:00
Zoltán Herczeg
9826db624e
Rework character range parsing in glob conversion.
2017-05-24 10:14:43 +00:00
Philip.Hazel
231a800557
More experimental convert code evolution.
2017-05-23 16:08:48 +00:00
Zoltán Herczeg
51df11a591
Use atomic blocks after starstar during conversion.
2017-05-23 15:17:44 +00:00
Zoltán Herczeg
e36e582af0
Implement flags in the glob convert functions.
2017-05-22 10:23:36 +00:00
Philip.Hazel
62564c08fd
pcre2test can now handle lists of conversion options.
2017-05-20 11:40:12 +00:00
Philip.Hazel
b704c0828f
Tests update.
2017-05-19 16:41:10 +00:00
Zoltán Herczeg
095924ee65
Implement starstar in glob conversion.
2017-05-19 03:55:39 +00:00
Philip.Hazel
e88ee34d6d
Test update.
2017-05-18 14:21:55 +00:00
Zoltán Herczeg
ac12e979b3
Support character classes in glob conversion.
2017-05-18 06:46:22 +00:00
Philip.Hazel
dfc9712bcd
Add additional compile options and PCRE2_EXTRA_ALLOW_SURROGATE_ESCAPES.
2017-05-17 17:55:11 +00:00
Zoltán Herczeg
d9c33d0708
Reworking bash glob conversion.
2017-05-17 13:44:24 +00:00
Zoltán Herczeg
dcbba52985
Initial version of bash glob conversion.
2017-05-16 07:14:11 +00:00
Philip.Hazel
f8256af661
Experimental conversion: fix POSIX BRE starting ^*.
2017-05-14 12:04:13 +00:00
Philip.Hazel
7927ac0ee3
Updates to experimental conversion code.
2017-05-13 17:46:27 +00:00
Philip.Hazel
3813b518ce
Correct fix for experimental POSIX pattern translation.
2017-05-10 15:42:13 +00:00
Philip.Hazel
7ca875b1db
Fix bug in experimental conversion code.
2017-05-09 10:44:50 +00:00
Philip.Hazel
382b64b01c
Fix crash when more than one kind of "push" was set in pcre2test.
2017-05-06 16:56:07 +00:00
Philip.Hazel
6e943e5f47
Experimental pattern conversion code (no public documentation yet).
2017-05-06 16:19:39 +00:00
Philip.Hazel
05a8186117
Add a fancy test for multiple named subpatterns.
2017-04-22 14:35:14 +00:00
Philip.Hazel
369d82e03a
Implement Perl's /n option, which is the same as PCRE2_NO_AUTO_CAPTURE.
2017-04-18 16:21:50 +00:00
Philip.Hazel
3dca43fdff
Implement PCRE2_EXTENDED_MORE and friends.
2017-04-18 12:32:52 +00:00
Philip.Hazel
e21268b367
Update 16-bit and 32-bit tests.
2017-04-16 13:04:57 +00:00
Philip.Hazel
202cb2cf41
Improve testing coverage with updates to pcre2test and test files; also get rid
...
of redundant code in pcre2_match().
2017-04-16 13:03:30 +00:00
Zoltán Herczeg
1379a48d94
Support end anchored in JIT.
2017-04-13 11:52:36 +00:00
Philip.Hazel
0cb5a91218
Update test output.
2017-04-12 13:26:23 +00:00
Philip.Hazel
3b8672bf49
Fix ACCEPT issue with ENDANCHORED.
2017-04-11 14:53:26 +00:00
Philip.Hazel
14989bd454
Add explicit heap limiting options to pcre2_match(), with associated features
...
for listing, configuring, etc.
2017-04-11 11:47:25 +00:00
Philip.Hazel
09f87cbfce
Extend auto-anchoring to ignore "never-obeyed" groups at the start.
2017-04-07 08:46:29 +00:00
Philip.Hazel
88abc14e42
Jason Hood's pcre2grep patches (modified a bit) to add --output to pcre2grep,
...
and also an inbuilt callout echo.
2017-04-06 18:02:40 +00:00
Philip.Hazel
59c461817e
Add endanchored tests for DFA matching.
2017-04-05 15:32:07 +00:00
Philip.Hazel
a3275d1e0f
Implement PCRE2_ENDANCHORED.
2017-04-04 17:09:33 +00:00
Philip.Hazel
0757041114
Fix non-passing of mark values out of recursions.
2017-04-04 11:37:21 +00:00
Philip.Hazel
fcd0c39b26
Fix capturing in conditional negative assertions ended with (*ACCEPT).
2017-04-03 18:02:07 +00:00
Zoltán Herczeg
bdac9df4cf
Fix character type detection when 32-bit and UCP are enabled but UTF is not in JIT.
2017-03-31 05:40:37 +00:00
Zoltán Herczeg
25cec7a966
Support full ovector data for JIT callouts.
2017-03-25 06:33:41 +00:00
Philip.Hazel
39d9294d14
Move some tests back into test 1 now that JIT has been updated.
2017-03-24 18:40:15 +00:00
Philip.Hazel
5c1984d94a
Make \=find_limits apply to DFA matching, to find the minimum depth limit.
2017-03-24 18:20:34 +00:00
Philip.Hazel
45ddeb70cf
Fix issues with (*VERB)s inside recursive subroutine calls.
2017-03-23 17:54:58 +00:00
Philip.Hazel
d5ca2dee9d
Fix misbehaving DFA match for possessively repeated character class (Bugzilla
...
2086).
2017-03-22 15:12:06 +00:00
Philip.Hazel
cde5f12cee
Fix 32-bit error buffer size bug in pcre2test (Bugzilla 2079).
2017-03-21 17:46:21 +00:00
Zoltán Herczeg
131209e22d
Capture control verbs inside the conditional assertion of a conditional block.
2017-03-20 10:41:13 +00:00
Philip.Hazel
d6faa55b91
Fix pcre2test bug for global match with zero terminated subject.
2017-03-19 18:34:27 +00:00
Zoltán Herczeg
b55ef12cc1
Reworked the recursive pattern matching in the JIT compiler to follow the interpreter changes.
2017-03-19 03:35:27 +00:00
Philip.Hazel
d7da2dcb37
Fix crash for forward reference in lookbehind with PCRE2_ANCHORED. Fixes
...
oss-fuzz issue 865.
2017-03-16 17:17:47 +00:00
Philip.Hazel
88db1be123
Change "limit recursion" to "limit depth" in code and build systems because the
...
old name, which is retained as a synonym for the moment, is no longer
appropriate.
2017-03-12 13:47:01 +00:00
Philip.Hazel
04da0725f3
Remove obsolete OP_ONCE_NC internal opcode.
2017-03-11 17:59:23 +00:00
Philip.Hazel
26e92bc554
Fix crash for pattern with very many captures. Fixes oss-fuzz issue 783.
2017-03-10 16:34:54 +00:00
Philip.Hazel
20804215a8
Code for new interpreter (build system and documentation still to be done).
2017-03-09 16:23:28 +00:00
Philip.Hazel
53bf29d689
Fix 32-bit non-UTF property test crash.
2017-02-24 18:25:32 +00:00
Philip.Hazel
f6f7c9148f
Check malloc returns in pcre2test.
2017-02-23 17:05:43 +00:00
Philip.Hazel
0299bba9d9
Fix previously broken fix for pcre2grep with -Mo matching strings that cross
...
line boundaries.
2017-02-10 17:39:29 +00:00
Philip.Hazel
3fb194afa4
Cache group minima to speed up studying of pathological patterns. Fixes
...
oss-fuzz #557 .
2017-02-10 16:33:15 +00:00
Philip.Hazel
7ab91fdfb2
Reduce recursion limit for auto-possessify to reduce stack usage at compile
...
time. Fixes oss-fuzz issue 553.
2017-02-08 17:03:30 +00:00
Philip.Hazel
4311f49d0e
Fix \g+ bug when the number that follows is too big.
2017-01-31 17:15:30 +00:00
Philip.Hazel
6332aa1101
Fix pcre2test mishandling "end before start" return with POSIX interface.
2017-01-11 17:02:27 +00:00
Philip.Hazel
1226e2e0d0
Fix hyphen after \E after POSIX class causing an error.
2017-01-11 16:40:35 +00:00
Philip.Hazel
255bc030d9
Improve class handling for \H and \V by ignoring caseless.
2017-01-03 18:17:31 +00:00
Philip.Hazel
84601d910b
Reduce stack requirements for test 6.
2017-01-02 16:15:11 +00:00
Philip.Hazel
396a7c7d29
Upgrade pcre2grep for Windows courtesy of Jason Hood.
2016-12-31 17:40:45 +00:00
Philip.Hazel
18dd19eae0
Make the test for over-complication while auto-possessifying bite sooner.
2016-12-31 13:35:31 +00:00
Philip.Hazel
25dbe146bd
Very minor tidy to pcre2grep, plus fix typos in comments.
2016-12-29 16:29:05 +00:00
Philip.Hazel
62659dd2f3
Add callout_error to pcre2test and stop the fuzzer after 100 callouts.
2016-12-28 15:05:48 +00:00
Philip.Hazel
f676362977
Fix issue with \Q\E after a callout before an assertion condition.
2016-12-28 12:26:12 +00:00
Philip.Hazel
fdf7946ee0
Fail hyphen after POSIX character class.
2016-12-27 11:50:28 +00:00
Philip.Hazel
8933d999d8
Fix class bug when UCP but not UTF was set and all wide characters need to be
...
included.
2016-12-26 17:11:18 +00:00
Philip.Hazel
a7a25ed91d
Fix bug when a character > 0xffff appears in a lookbehind within a lookbehind.
2016-12-24 16:25:11 +00:00