aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Aaron Gyes <me@aaron.gy>2016-04-14 22:21:36 -0700
committerGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2016-04-19 11:49:12 +0800
commit0fd3f5c0ddf830162b66067e536bdbf0975523e5 (patch)
treea3ee179caef36f2a62452b9325c0ce6b47c90148
parente7599fd18cba9fde4ed19aae70c10e622d7d2e0e (diff)
Update to pcre2 10.21
Point build tools at 10.21
-rw-r--r--Makefile.in2
-rwxr-xr-xbuild_tools/lint.fish6
-rw-r--r--configure.ac2
-rw-r--r--pcre2-10.20/COPYING674
-rw-r--r--pcre2-10.20/NEWS47
-rw-r--r--pcre2-10.20/src/pcre2_substitute.c315
-rw-r--r--pcre2-10.21/.gitignore (renamed from pcre2-10.20/.gitignore)2
-rwxr-xr-xpcre2-10.21/132html (renamed from pcre2-10.20/132html)2
-rw-r--r--pcre2-10.21/AUTHORS (renamed from pcre2-10.20/AUTHORS)6
-rw-r--r--pcre2-10.21/CMakeLists.txt (renamed from pcre2-10.20/CMakeLists.txt)16
-rw-r--r--pcre2-10.21/COPYING5
-rw-r--r--pcre2-10.21/ChangeLog (renamed from pcre2-10.20/ChangeLog)391
-rwxr-xr-xpcre2-10.21/CheckMan (renamed from pcre2-10.20/CheckMan)0
-rwxr-xr-xpcre2-10.21/CleanTxt (renamed from pcre2-10.20/CleanTxt)0
-rwxr-xr-xpcre2-10.21/Detrail (renamed from pcre2-10.20/Detrail)0
-rw-r--r--pcre2-10.21/HACKING (renamed from pcre2-10.20/HACKING)0
-rw-r--r--pcre2-10.21/INSTALL (renamed from pcre2-10.20/INSTALL)0
-rw-r--r--pcre2-10.21/LICENCE (renamed from pcre2-10.20/LICENCE)6
-rw-r--r--pcre2-10.21/Makefile.am (renamed from pcre2-10.20/Makefile.am)30
-rw-r--r--pcre2-10.21/Makefile.in (renamed from pcre2-10.20/Makefile.in)79
-rw-r--r--pcre2-10.21/NEWS88
-rw-r--r--pcre2-10.21/NON-AUTOTOOLS-BUILD (renamed from pcre2-10.20/NON-AUTOTOOLS-BUILD)3
-rwxr-xr-xpcre2-10.21/PrepareRelease (renamed from pcre2-10.20/PrepareRelease)12
-rw-r--r--pcre2-10.21/README (renamed from pcre2-10.20/README)10
-rwxr-xr-xpcre2-10.21/RunGrepTest (renamed from pcre2-10.20/RunGrepTest)27
-rwxr-xr-xpcre2-10.21/RunTest (renamed from pcre2-10.20/RunTest)213
-rw-r--r--pcre2-10.21/RunTest.bat (renamed from pcre2-10.20/RunTest.bat)115
-rw-r--r--pcre2-10.21/aclocal.m4 (renamed from pcre2-10.20/aclocal.m4)247
-rwxr-xr-xpcre2-10.21/ar-lib (renamed from pcre2-10.20/ar-lib)0
-rw-r--r--pcre2-10.21/cmake/COPYING-CMAKE-SCRIPTS (renamed from pcre2-10.20/cmake/COPYING-CMAKE-SCRIPTS)0
-rw-r--r--pcre2-10.21/cmake/FindEditline.cmake (renamed from pcre2-10.20/cmake/FindEditline.cmake)0
-rw-r--r--pcre2-10.21/cmake/FindPackageHandleStandardArgs.cmake (renamed from pcre2-10.20/cmake/FindPackageHandleStandardArgs.cmake)0
-rw-r--r--pcre2-10.21/cmake/FindReadline.cmake (renamed from pcre2-10.20/cmake/FindReadline.cmake)0
-rwxr-xr-xpcre2-10.21/compile (renamed from pcre2-10.20/compile)0
-rw-r--r--pcre2-10.21/config-cmake.h.in (renamed from pcre2-10.20/config-cmake.h.in)1
-rwxr-xr-xpcre2-10.21/config.guess (renamed from pcre2-10.20/config.guess)0
-rwxr-xr-xpcre2-10.21/config.sub (renamed from pcre2-10.20/config.sub)0
-rwxr-xr-xpcre2-10.21/configure (renamed from pcre2-10.20/configure)95
-rw-r--r--pcre2-10.21/configure.ac (renamed from pcre2-10.20/configure.ac)35
-rwxr-xr-xpcre2-10.21/depcomp (renamed from pcre2-10.20/depcomp)0
-rwxr-xr-xpcre2-10.21/install-sh (renamed from pcre2-10.20/install-sh)0
-rw-r--r--pcre2-10.21/libpcre2-16.pc.in (renamed from pcre2-10.20/libpcre2-16.pc.in)0
-rw-r--r--pcre2-10.21/libpcre2-32.pc.in (renamed from pcre2-10.20/libpcre2-32.pc.in)0
-rw-r--r--pcre2-10.21/libpcre2-8.pc.in (renamed from pcre2-10.20/libpcre2-8.pc.in)0
-rw-r--r--pcre2-10.21/libpcre2-posix.pc.in (renamed from pcre2-10.20/libpcre2-posix.pc.in)0
-rw-r--r--pcre2-10.21/ltmain.sh (renamed from pcre2-10.20/ltmain.sh)0
-rw-r--r--pcre2-10.21/m4/ax_pthread.m4 (renamed from pcre2-10.20/m4/ax_pthread.m4)0
-rw-r--r--pcre2-10.21/m4/libtool.m4 (renamed from pcre2-10.20/m4/libtool.m4)0
-rw-r--r--pcre2-10.21/m4/ltoptions.m4 (renamed from pcre2-10.20/m4/ltoptions.m4)0
-rw-r--r--pcre2-10.21/m4/ltsugar.m4 (renamed from pcre2-10.20/m4/ltsugar.m4)0
-rw-r--r--pcre2-10.21/m4/ltversion.m4 (renamed from pcre2-10.20/m4/ltversion.m4)0
-rw-r--r--pcre2-10.21/m4/lt~obsolete.m4 (renamed from pcre2-10.20/m4/lt~obsolete.m4)0
-rw-r--r--pcre2-10.21/m4/pcre2_visibility.m4 (renamed from pcre2-10.20/m4/pcre2_visibility.m4)0
-rwxr-xr-xpcre2-10.21/missing (renamed from pcre2-10.20/missing)0
-rw-r--r--pcre2-10.21/pcre2-config.in (renamed from pcre2-10.20/pcre2-config.in)0
-rwxr-xr-xpcre2-10.21/perltest.sh (renamed from pcre2-10.20/perltest.sh)4
-rw-r--r--pcre2-10.21/src/config.h.generic (renamed from pcre2-10.20/src/config.h.generic)9
-rw-r--r--pcre2-10.21/src/config.h.in (renamed from pcre2-10.20/src/config.h.in)3
-rw-r--r--pcre2-10.21/src/dftables.c (renamed from pcre2-10.20/src/dftables.c)6
-rw-r--r--pcre2-10.21/src/pcre2.h.generic (renamed from pcre2-10.20/src/pcre2.h.generic)30
-rw-r--r--pcre2-10.21/src/pcre2.h.in (renamed from pcre2-10.20/src/pcre2.h.in)26
-rw-r--r--pcre2-10.21/src/pcre2_auto_possess.c (renamed from pcre2-10.20/src/pcre2_auto_possess.c)60
-rw-r--r--pcre2-10.21/src/pcre2_chartables.c.dist (renamed from pcre2-10.20/src/pcre2_chartables.c.dist)0
-rw-r--r--pcre2-10.21/src/pcre2_compile.c (renamed from pcre2-10.20/src/pcre2_compile.c)2106
-rw-r--r--pcre2-10.21/src/pcre2_config.c (renamed from pcre2-10.20/src/pcre2_config.c)2
-rw-r--r--pcre2-10.21/src/pcre2_context.c (renamed from pcre2-10.20/src/pcre2_context.c)32
-rw-r--r--pcre2-10.21/src/pcre2_dfa_match.c (renamed from pcre2-10.20/src/pcre2_dfa_match.c)87
-rw-r--r--pcre2-10.21/src/pcre2_error.c (renamed from pcre2-10.20/src/pcre2_error.c)32
-rw-r--r--pcre2-10.21/src/pcre2_find_bracket.c218
-rw-r--r--pcre2-10.21/src/pcre2_internal.h (renamed from pcre2-10.20/src/pcre2_internal.h)23
-rw-r--r--pcre2-10.21/src/pcre2_intmodedep.h (renamed from pcre2-10.20/src/pcre2_intmodedep.h)41
-rw-r--r--pcre2-10.21/src/pcre2_jit_compile.c (renamed from pcre2-10.20/src/pcre2_jit_compile.c)1404
-rw-r--r--pcre2-10.21/src/pcre2_jit_match.c (renamed from pcre2-10.20/src/pcre2_jit_match.c)5
-rw-r--r--pcre2-10.21/src/pcre2_jit_misc.c (renamed from pcre2-10.20/src/pcre2_jit_misc.c)2
-rw-r--r--pcre2-10.21/src/pcre2_jit_test.c (renamed from pcre2-10.20/src/pcre2_jit_test.c)21
-rw-r--r--pcre2-10.21/src/pcre2_maketables.c (renamed from pcre2-10.20/src/pcre2_maketables.c)2
-rw-r--r--pcre2-10.21/src/pcre2_match.c (renamed from pcre2-10.20/src/pcre2_match.c)132
-rw-r--r--pcre2-10.21/src/pcre2_match_data.c (renamed from pcre2-10.20/src/pcre2_match_data.c)2
-rw-r--r--pcre2-10.21/src/pcre2_newline.c (renamed from pcre2-10.20/src/pcre2_newline.c)2
-rw-r--r--pcre2-10.21/src/pcre2_ord2utf.c (renamed from pcre2-10.20/src/pcre2_ord2utf.c)2
-rw-r--r--pcre2-10.21/src/pcre2_pattern_info.c (renamed from pcre2-10.20/src/pcre2_pattern_info.c)7
-rw-r--r--pcre2-10.21/src/pcre2_printint.c (renamed from pcre2-10.20/src/pcre2_printint.c)35
-rw-r--r--pcre2-10.21/src/pcre2_serialize.c (renamed from pcre2-10.20/src/pcre2_serialize.c)20
-rw-r--r--pcre2-10.21/src/pcre2_string_utils.c (renamed from pcre2-10.20/src/pcre2_string_utils.c)6
-rw-r--r--pcre2-10.21/src/pcre2_study.c (renamed from pcre2-10.20/src/pcre2_study.c)182
-rw-r--r--pcre2-10.21/src/pcre2_substitute.c850
-rw-r--r--pcre2-10.21/src/pcre2_substring.c (renamed from pcre2-10.20/src/pcre2_substring.c)2
-rw-r--r--pcre2-10.21/src/pcre2_tables.c (renamed from pcre2-10.20/src/pcre2_tables.c)358
-rw-r--r--pcre2-10.21/src/pcre2_ucd.c (renamed from pcre2-10.20/src/pcre2_ucd.c)4432
-rw-r--r--pcre2-10.21/src/pcre2_ucp.h (renamed from pcre2-10.20/src/pcre2_ucp.h)11
-rw-r--r--pcre2-10.21/src/pcre2_valid_utf.c (renamed from pcre2-10.20/src/pcre2_valid_utf.c)11
-rw-r--r--pcre2-10.21/src/pcre2_xclass.c (renamed from pcre2-10.20/src/pcre2_xclass.c)4
-rw-r--r--pcre2-10.21/src/pcre2demo.c (renamed from pcre2-10.20/src/pcre2demo.c)0
-rw-r--r--pcre2-10.21/src/pcre2grep.c (renamed from pcre2-10.20/src/pcre2grep.c)20
-rw-r--r--pcre2-10.21/src/pcre2posix.c (renamed from pcre2-10.20/src/pcre2posix.c)47
-rw-r--r--pcre2-10.21/src/pcre2posix.h (renamed from pcre2-10.20/src/pcre2posix.h)2
-rw-r--r--pcre2-10.21/src/pcre2test.c (renamed from pcre2-10.20/src/pcre2test.c)1054
-rw-r--r--pcre2-10.21/src/sljit/sljitConfig.h (renamed from pcre2-10.20/src/sljit/sljitConfig.h)0
-rw-r--r--pcre2-10.21/src/sljit/sljitConfigInternal.h (renamed from pcre2-10.20/src/sljit/sljitConfigInternal.h)6
-rw-r--r--pcre2-10.21/src/sljit/sljitExecAllocator.c (renamed from pcre2-10.20/src/sljit/sljitExecAllocator.c)0
-rw-r--r--pcre2-10.21/src/sljit/sljitLir.c (renamed from pcre2-10.20/src/sljit/sljitLir.c)0
-rw-r--r--pcre2-10.21/src/sljit/sljitLir.h (renamed from pcre2-10.20/src/sljit/sljitLir.h)88
-rw-r--r--pcre2-10.21/src/sljit/sljitNativeARM_32.c (renamed from pcre2-10.20/src/sljit/sljitNativeARM_32.c)0
-rw-r--r--pcre2-10.21/src/sljit/sljitNativeARM_64.c (renamed from pcre2-10.20/src/sljit/sljitNativeARM_64.c)0
-rw-r--r--pcre2-10.21/src/sljit/sljitNativeARM_T2_32.c (renamed from pcre2-10.20/src/sljit/sljitNativeARM_T2_32.c)0
-rw-r--r--pcre2-10.21/src/sljit/sljitNativeMIPS_32.c (renamed from pcre2-10.20/src/sljit/sljitNativeMIPS_32.c)0
-rw-r--r--pcre2-10.21/src/sljit/sljitNativeMIPS_64.c (renamed from pcre2-10.20/src/sljit/sljitNativeMIPS_64.c)0
-rw-r--r--pcre2-10.21/src/sljit/sljitNativeMIPS_common.c (renamed from pcre2-10.20/src/sljit/sljitNativeMIPS_common.c)0
-rw-r--r--pcre2-10.21/src/sljit/sljitNativePPC_32.c (renamed from pcre2-10.20/src/sljit/sljitNativePPC_32.c)0
-rw-r--r--pcre2-10.21/src/sljit/sljitNativePPC_64.c (renamed from pcre2-10.20/src/sljit/sljitNativePPC_64.c)0
-rw-r--r--pcre2-10.21/src/sljit/sljitNativePPC_common.c (renamed from pcre2-10.20/src/sljit/sljitNativePPC_common.c)0
-rw-r--r--pcre2-10.21/src/sljit/sljitNativeSPARC_32.c (renamed from pcre2-10.20/src/sljit/sljitNativeSPARC_32.c)0
-rw-r--r--pcre2-10.21/src/sljit/sljitNativeSPARC_common.c (renamed from pcre2-10.20/src/sljit/sljitNativeSPARC_common.c)0
-rw-r--r--pcre2-10.21/src/sljit/sljitNativeTILEGX-encoder.c (renamed from pcre2-10.20/src/sljit/sljitNativeTILEGX-encoder.c)0
-rw-r--r--pcre2-10.21/src/sljit/sljitNativeTILEGX_64.c (renamed from pcre2-10.20/src/sljit/sljitNativeTILEGX_64.c)311
-rw-r--r--pcre2-10.21/src/sljit/sljitNativeX86_32.c (renamed from pcre2-10.20/src/sljit/sljitNativeX86_32.c)0
-rw-r--r--pcre2-10.21/src/sljit/sljitNativeX86_64.c (renamed from pcre2-10.20/src/sljit/sljitNativeX86_64.c)0
-rw-r--r--pcre2-10.21/src/sljit/sljitNativeX86_common.c (renamed from pcre2-10.20/src/sljit/sljitNativeX86_common.c)70
-rw-r--r--pcre2-10.21/src/sljit/sljitUtils.c (renamed from pcre2-10.20/src/sljit/sljitUtils.c)0
-rwxr-xr-xpcre2-10.21/test-driver (renamed from pcre2-10.20/test-driver)0
120 files changed, 8475 insertions, 5721 deletions
diff --git a/Makefile.in b/Makefile.in
index 341b9420..0858c647 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -62,7 +62,7 @@ extra_confdir = @extra_confdir@
#
PCRE2_WIDTH = @WCHAR_T_BITS@
-PCRE2_DIR = pcre2-10.20
+PCRE2_DIR = pcre2-10.21
PCRE2_LIBDIR = $(PCRE2_DIR)/.libs
PCRE2_LIB = $(PCRE2_LIBDIR)/libpcre2-$(PCRE2_WIDTH).a
PCRE2_H = $(PCRE2_DIR)/src/pcre2.h
diff --git a/build_tools/lint.fish b/build_tools/lint.fish
index 7182322f..96efc71b 100755
--- a/build_tools/lint.fish
+++ b/build_tools/lint.fish
@@ -78,14 +78,14 @@ if set -q c_files[1]
oclint-xcodebuild xcodebuild.log > /dev/null
end
if test $all = yes
- oclint-json-compilation-database -e '/pcre2-10.20/' -- -enable-global-analysis 2>& 1
+ oclint-json-compilation-database -e '/pcre2-10.21/' -- -enable-global-analysis 2>& 1
else
set i_files
for f in $c_files
set i_files $i_files -i $f
end
- echo oclint-json-compilation-database -e '/pcre2-10.20/' $i_files
- oclint-json-compilation-database -e '/pcre2-10.20/' $i_files 2>& 1
+ echo oclint-json-compilation-database -e '/pcre2-10.21/' $i_files
+ oclint-json-compilation-database -e '/pcre2-10.21/' $i_files 2>& 1
end
else
# Presumably we're on Linux or other platform not requiring special
diff --git a/configure.ac b/configure.ac
index 2a96f63b..90065e9b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -849,7 +849,7 @@ if test "x$included_pcre2" = "xyes"; then
AC_MSG_NOTICE([using included PCRE2 library])
# unfortunately these get added to the global configuration
ac_configure_args="$ac_configure_args --disable-pcre2-8 --enable-pcre2-$WCHAR_T_BITS --disable-shared"
- AC_CONFIG_SUBDIRS([pcre2-10.20])
+ AC_CONFIG_SUBDIRS([pcre2-10.21])
PCRE2_CXXFLAGS='-I$(PCRE2_DIR)/src'
PCRE2_LIBS='-L$(PCRE2_LIBDIR) -lpcre2-$(PCRE2_WIDTH)'
diff --git a/pcre2-10.20/COPYING b/pcre2-10.20/COPYING
deleted file mode 100644
index 94a9ed02..00000000
--- a/pcre2-10.20/COPYING
+++ /dev/null
@@ -1,674 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- <program> Copyright (C) <year> <name of author>
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/pcre2-10.20/NEWS b/pcre2-10.20/NEWS
deleted file mode 100644
index 84f05135..00000000
--- a/pcre2-10.20/NEWS
+++ /dev/null
@@ -1,47 +0,0 @@
-News about PCRE2 releases
--------------------------
-
-Version 10.20 30-June-2015
---------------------------
-
-1. Callouts with string arguments and the pcre2_callout_enumerate() function
-have been implemented.
-
-2. The PCRE2_NEVER_BACKSLASH_C option, which locks out the use of \C, is added.
-
-3. The PCRE2_ALT_CIRCUMFLEX option lets ^ match after a newline at the end of a
-subject in multiline mode.
-
-4. The way named subpatterns are handled has been refactored. The previous
-approach had several bugs.
-
-5. The handling of \c in EBCDIC environments has been changed to conform to the
-perlebcdic document. This is an incompatible change.
-
-6. Bugs have been mended, many of them discovered by fuzzers.
-
-
-Version 10.10 06-March-2015
----------------------------
-
-1. Serialization and de-serialization functions have been added to the API,
-making it possible to save and restore sets of compiled patterns, though
-restoration must be done in the same environment that was used for compilation.
-
-2. The (*NO_JIT) feature has been added; this makes it possible for a pattern
-creator to specify that JIT is not to be used.
-
-3. A number of bugs have been fixed. In particular, bugs that caused building
-on Windows using CMake to fail have been mended.
-
-
-Version 10.00 05-January-2015
------------------------------
-
-Version 10.00 is the first release of PCRE2, a revised API for the PCRE
-library. Changes prior to 10.00 are logged in the ChangeLog file for the old
-API, up to item 20 for release 8.36. New programs are recommended to use the
-new library. Programs that use the original (PCRE1) API will need changing
-before linking with the new library.
-
-****
diff --git a/pcre2-10.20/src/pcre2_substitute.c b/pcre2-10.20/src/pcre2_substitute.c
deleted file mode 100644
index ec00ebb8..00000000
--- a/pcre2-10.20/src/pcre2_substitute.c
+++ /dev/null
@@ -1,315 +0,0 @@
-/*************************************************
-* Perl-Compatible Regular Expressions *
-*************************************************/
-
-/* PCRE is a library of functions to support regular expressions whose syntax
-and semantics are as close as possible to those of the Perl 5 language.
-
- Written by Philip Hazel
- Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2014 University of Cambridge
-
------------------------------------------------------------------------------
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- * Neither the name of the University of Cambridge nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-*/
-
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "pcre2_internal.h"
-
-
-/*************************************************
-* Match and substitute *
-*************************************************/
-
-/* This function applies a compiled re to a subject string and creates a new
-string with substitutions. The first 7 arguments are the same as for
-pcre2_match(). Either string length may be PCRE2_ZERO_TERMINATED.
-
-Arguments:
- code points to the compiled expression
- subject points to the subject string
- length length of subject string (may contain binary zeros)
- start_offset where to start in the subject string
- options option bits
- match_data points to a match_data block, or is NULL
- context points a PCRE2 context
- replacement points to the replacement string
- rlength length of replacement string
- buffer where to put the substituted string
- blength points to length of buffer; updated to length of string
-
-Returns: >= 0 number of substitutions made
- < 0 an error code
- PCRE2_ERROR_BADREPLACEMENT means invalid use of $
-*/
-
-PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
-pcre2_substitute(const pcre2_code *code, PCRE2_SPTR subject, PCRE2_SIZE length,
- PCRE2_SIZE start_offset, uint32_t options, pcre2_match_data *match_data,
- pcre2_match_context *mcontext, PCRE2_SPTR replacement, PCRE2_SIZE rlength,
- PCRE2_UCHAR *buffer, PCRE2_SIZE *blength)
-{
-int rc;
-int subs;
-uint32_t ovector_count;
-uint32_t goptions = 0;
-BOOL match_data_created = FALSE;
-BOOL global = FALSE;
-PCRE2_SIZE buff_offset, lengthleft, fraglength;
-PCRE2_SIZE *ovector;
-
-/* Partial matching is not valid. */
-
-if ((options & (PCRE2_PARTIAL_HARD|PCRE2_PARTIAL_SOFT)) != 0)
- return PCRE2_ERROR_BADOPTION;
-
-/* If no match data block is provided, create one. */
-
-if (match_data == NULL)
- {
- pcre2_general_context *gcontext = (mcontext == NULL)?
- (pcre2_general_context *)code :
- (pcre2_general_context *)mcontext;
- match_data = pcre2_match_data_create_from_pattern(code, gcontext);
- if (match_data == NULL) return PCRE2_ERROR_NOMEMORY;
- match_data_created = TRUE;
- }
-ovector = pcre2_get_ovector_pointer(match_data);
-ovector_count = pcre2_get_ovector_count(match_data);
-
-/* Check UTF replacement string if necessary. */
-
-#ifdef SUPPORT_UNICODE
-if ((code->overall_options & PCRE2_UTF) != 0 &&
- (options & PCRE2_NO_UTF_CHECK) == 0)
- {
- rc = PRIV(valid_utf)(replacement, rlength, &(match_data->rightchar));
- if (rc != 0)
- {
- match_data->leftchar = 0;
- goto EXIT;
- }
- }
-#endif /* SUPPORT_UNICODE */
-
-/* Notice the global option and remove it from the options that are passed to
-pcre2_match(). */
-
-if ((options & PCRE2_SUBSTITUTE_GLOBAL) != 0)
- {
- options &= ~PCRE2_SUBSTITUTE_GLOBAL;
- global = TRUE;
- }
-
-/* Find lengths of zero-terminated strings. */
-
-if (length == PCRE2_ZERO_TERMINATED) length = PRIV(strlen)(subject);
-if (rlength == PCRE2_ZERO_TERMINATED) rlength = PRIV(strlen)(replacement);
-
-/* Copy up to the start offset */
-
-if (start_offset > *blength) goto NOROOM;
-memcpy(buffer, subject, start_offset * (PCRE2_CODE_UNIT_WIDTH/8));
-buff_offset = start_offset;
-lengthleft = *blength - start_offset;
-
-/* Loop for global substituting. */
-
-subs = 0;
-do
- {
- PCRE2_SIZE i;
-
- rc = pcre2_match(code, subject, length, start_offset, options|goptions,
- match_data, mcontext);
-
- /* Any error other than no match returns the error code. No match when not
- doing the special after-empty-match global rematch, or when at the end of the
- subject, breaks the global loop. Otherwise, advance the starting point by one
- character, copying it to the output, and try again. */
-
- if (rc < 0)
- {
- PCRE2_SIZE save_start;
-
- if (rc != PCRE2_ERROR_NOMATCH) goto EXIT;
- if (goptions == 0 || start_offset >= length) break;
-
- save_start = start_offset++;
- if ((code->overall_options & PCRE2_UTF) != 0)
- {
-#if PCRE2_CODE_UNIT_WIDTH == 8
- while (start_offset < length && (subject[start_offset] & 0xc0) == 0x80)
- start_offset++;
-#elif PCRE2_CODE_UNIT_WIDTH == 16
- while (start_offset < length &&
- (subject[start_offset] & 0xfc00) == 0xdc00)
- start_offset++;
-#endif
- }
-
- fraglength = start_offset - save_start;
- if (lengthleft < fraglength) goto NOROOM;
- memcpy(buffer + buff_offset, subject + save_start,
- fraglength*(PCRE2_CODE_UNIT_WIDTH/8));
- buff_offset += fraglength;
- lengthleft -= fraglength;
-
- goptions = 0;
- continue;
- }
-
- /* Handle a successful match. */
-
- subs++;
- if (rc == 0) rc = ovector_count;
- fraglength = ovector[0] - start_offset;
- if (fraglength >= lengthleft) goto NOROOM;
- memcpy(buffer + buff_offset, subject + start_offset,
- fraglength*(PCRE2_CODE_UNIT_WIDTH/8));
- buff_offset += fraglength;
- lengthleft -= fraglength;
-
- for (i = 0; i < rlength; i++)
- {
- if (replacement[i] == CHAR_DOLLAR_SIGN)
- {
- int group, n;
- BOOL inparens;
- PCRE2_SIZE sublength;
- PCRE2_UCHAR next;
- PCRE2_UCHAR name[33];
-
- if (++i == rlength) goto BAD;
- if ((next = replacement[i]) == CHAR_DOLLAR_SIGN) goto LITERAL;
-
- group = -1;
- n = 0;
- inparens = FALSE;
-
- if (next == CHAR_LEFT_CURLY_BRACKET)
- {
- if (++i == rlength) goto BAD;
- next = replacement[i];
- inparens = TRUE;
- }
-
- if (next >= CHAR_0 && next <= CHAR_9)
- {
- group = next - CHAR_0;
- while (++i < rlength)
- {
- next = replacement[i];
- if (next < CHAR_0 || next > CHAR_9) break;
- group = group * 10 + next - CHAR_0;
- }
- }
- else
- {
- const uint8_t *ctypes = code->tables + ctypes_offset;
- while (MAX_255(next) && (ctypes[next] & ctype_word) != 0)
- {
- name[n++] = next;
- if (n > 32) goto BAD;
- if (i == rlength) break;
- next = replacement[++i];
- }
- if (n == 0) goto BAD;
- name[n] = 0;
- }
-
- if (inparens)
- {
- if (i == rlength || next != CHAR_RIGHT_CURLY_BRACKET) goto BAD;
- }
- else i--; /* Last code unit of name/number */
-
- /* Have found a syntactically correct group number or name. */
-
- sublength = lengthleft;
- if (group < 0)
- rc = pcre2_substring_copy_byname(match_data, name,
- buffer + buff_offset, &sublength);
- else
- rc = pcre2_substring_copy_bynumber(match_data, group,
- buffer + buff_offset, &sublength);
-
- if (rc < 0) goto EXIT;
- buff_offset += sublength;
- lengthleft -= sublength;
- }
-
- /* Handle a literal code unit */
-
- else
- {
- LITERAL:
- if (lengthleft-- < 1) goto NOROOM;
- buffer[buff_offset++] = replacement[i];
- }
- }
-
- /* The replacement has been copied to the output. Update the start offset to
- point to the rest of the subject string. If we matched an empty string,
- do the magic for global matches. */
-
- start_offset = ovector[1];
- goptions = (ovector[0] != ovector[1])? 0 :
- PCRE2_ANCHORED|PCRE2_NOTEMPTY_ATSTART;
- } while (global); /* Repeat "do" loop */
-
-/* Copy the rest of the subject and return the number of substitutions. */
-
-rc = subs;
-fraglength = length - start_offset;
-if (fraglength + 1 > lengthleft) goto NOROOM;
-memcpy(buffer + buff_offset, subject + start_offset,
- fraglength*(PCRE2_CODE_UNIT_WIDTH/8));
-buff_offset += fraglength;
-buffer[buff_offset] = 0;
-*blength = buff_offset;
-
-EXIT:
-if (match_data_created) pcre2_match_data_free(match_data);
- else match_data->rc = rc;
-return rc;
-
-NOROOM:
-rc = PCRE2_ERROR_NOMEMORY;
-goto EXIT;
-
-BAD:
-rc = PCRE2_ERROR_BADREPLACEMENT;
-goto EXIT;
-}
-
-/* End of pcre2_substitute.c */
diff --git a/pcre2-10.20/.gitignore b/pcre2-10.21/.gitignore
index 0b7a536b..fa91befa 100644
--- a/pcre2-10.20/.gitignore
+++ b/pcre2-10.21/.gitignore
@@ -12,4 +12,4 @@ pcre2_chartables.c
pcre2-config
pcre2test
pcre2.h
-stamp-h1
+stamp-h1 \ No newline at end of file
diff --git a/pcre2-10.20/132html b/pcre2-10.21/132html
index b0625984..3a16a59e 100755
--- a/pcre2-10.20/132html
+++ b/pcre2-10.21/132html
@@ -148,7 +148,7 @@ while (<STDIN>)
printf("<li><a name=\"TOC%d\" href=\"#SEC%d\">$title</a>\n",
$ref, $ref);
printf TEMP ("<br><a name=\"SEC%d\" href=\"#TOC1\">$title</a><br>\n",
- $ref, $ref);
+ $ref);
$ref++;
}
else
diff --git a/pcre2-10.20/AUTHORS b/pcre2-10.21/AUTHORS
index 14a1a19f..d9a0e156 100644
--- a/pcre2-10.20/AUTHORS
+++ b/pcre2-10.21/AUTHORS
@@ -8,7 +8,7 @@ Email domain: cam.ac.uk
University of Cambridge Computing Service,
Cambridge, England.
-Copyright (c) 1997-2015 University of Cambridge
+Copyright (c) 1997-2016 University of Cambridge
All rights reserved
@@ -19,7 +19,7 @@ Written by: Zoltan Herczeg
Email local part: hzmester
Emain domain: freemail.hu
-Copyright(c) 2010-2015 Zoltan Herczeg
+Copyright(c) 2010-2016 Zoltan Herczeg
All rights reserved.
@@ -30,7 +30,7 @@ Written by: Zoltan Herczeg
Email local part: hzmester
Emain domain: freemail.hu
-Copyright(c) 2009-2015 Zoltan Herczeg
+Copyright(c) 2009-2016 Zoltan Herczeg
All rights reserved.
####
diff --git a/pcre2-10.20/CMakeLists.txt b/pcre2-10.21/CMakeLists.txt
index b76a9530..2c84b054 100644
--- a/pcre2-10.20/CMakeLists.txt
+++ b/pcre2-10.21/CMakeLists.txt
@@ -67,7 +67,10 @@
# 2013-10-08 PH got rid of the "source" command, which is a bash-ism (use ".")
# 2013-11-05 PH added support for PARENS_NEST_LIMIT
# 2014-08-29 PH converted the file for PCRE2 (which has no C++).
-# 2015-04024 PH added support for PCRE2_DEBUG
+# 2015-04-24 PH added support for PCRE2_DEBUG
+# 2015-07-16 PH updated for new pcre2_find_bracket source module
+# 2015-08-24 PH correct C_FLAGS setting (patch from Roy Ivy III)
+# 2015-10=16 PH added support for never-backslash-C
PROJECT(PCRE2 C)
@@ -79,7 +82,7 @@ CMAKE_POLICY(SET CMP0026 OLD)
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) # for FindReadline.cmake
-SET(CMAKE_C_FLAGS -I${PROJECT_SOURCE_DIR}/src)
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${PROJECT_SOURCE_DIR}/src")
# external packages
FIND_PACKAGE( BZip2 )
@@ -160,6 +163,9 @@ SET(PCRE2_SUPPORT_UNICODE ON CACHE BOOL
SET(PCRE2_SUPPORT_BSR_ANYCRLF OFF CACHE BOOL
"ON=Backslash-R matches only LF CR and CRLF, OFF=Backslash-R matches all Unicode Linebreaks")
+SET(PCRE2_NEVER_BACKSLASH_C OFF CACHE BOOL
+ "If ON, backslash-C (upper case C) is locked out.")
+
SET(PCRE2_SUPPORT_VALGRIND OFF CACHE BOOL
"Enable Valgrind support.")
@@ -250,6 +256,10 @@ IF(PCRE2_SUPPORT_BSR_ANYCRLF)
SET(BSR_ANYCRLF 1)
ENDIF(PCRE2_SUPPORT_BSR_ANYCRLF)
+IF(PCRE2_NEVER_BACKSLASH_C)
+ SET(NEVER_BACKSLASH_C 1)
+ENDIF(PCRE2_NEVER_BACKSLASH_C)
+
IF(PCRE2_SUPPORT_UNICODE)
SET(SUPPORT_UNICODE 1)
ENDIF(PCRE2_SUPPORT_UNICODE)
@@ -390,6 +400,7 @@ SET(PCRE2_SOURCES
src/pcre2_context.c
src/pcre2_dfa_match.c
src/pcre2_error.c
+ src/pcre2_find_bracket.c
src/pcre2_jit_compile.c
src/pcre2_maketables.c
src/pcre2_match.c
@@ -716,6 +727,7 @@ IF(PCRE2_SHOW_REPORT)
MESSAGE(STATUS " Enable Unicode support .......... : ${PCRE2_SUPPORT_UNICODE}")
MESSAGE(STATUS " Newline char/sequence ........... : ${PCRE2_NEWLINE}")
MESSAGE(STATUS " \\R matches only ANYCRLF ......... : ${PCRE2_SUPPORT_BSR_ANYCRLF}")
+ MESSAGE(STATUS " \\C is disabled .................. : ${PCRE2_NEVER_BACKSLASH_C}")
MESSAGE(STATUS " EBCDIC coding ................... : ${PCRE2_EBCDIC}")
MESSAGE(STATUS " EBCDIC coding with NL=0x25 ...... : ${PCRE2_EBCDIC_NL25}")
MESSAGE(STATUS " Rebuild char tables ............. : ${PCRE2_REBUILD_CHARTABLES}")
diff --git a/pcre2-10.21/COPYING b/pcre2-10.21/COPYING
new file mode 100644
index 00000000..c233950f
--- /dev/null
+++ b/pcre2-10.21/COPYING
@@ -0,0 +1,5 @@
+PCRE2 LICENCE
+
+Please see the file LICENCE in the PCRE2 distribution for licensing details.
+
+End
diff --git a/pcre2-10.20/ChangeLog b/pcre2-10.21/ChangeLog
index 196e9532..2035490c 100644
--- a/pcre2-10.20/ChangeLog
+++ b/pcre2-10.21/ChangeLog
@@ -1,6 +1,397 @@
Change Log for PCRE2
--------------------
+Version 10.21 12-January-2016
+-----------------------------
+
+1. Improve matching speed of patterns starting with + or * in JIT.
+
+2. Use memchr() to find the first character in an unanchored match in 8-bit
+mode in the interpreter. This gives a significant speed improvement.
+
+3. Removed a redundant copy of the opcode_possessify table in the
+pcre2_auto_possessify.c source.
+
+4. Fix typos in dftables.c for z/OS.
+
+5. Change 36 for 10.20 broke the handling of [[:>:]] and [[:<:]] in that
+processing them could involve a buffer overflow if the following character was
+an opening parenthesis.
+
+6. Change 36 for 10.20 also introduced a bug in processing this pattern:
+/((?x)(*:0))#(?'/. Specifically: if a setting of (?x) was followed by a (*MARK)
+setting (which (*:0) is), then (?x) did not get unset at the end of its group
+during the scan for named groups, and hence the external # was incorrectly
+treated as a comment and the invalid (?' at the end of the pattern was not
+diagnosed. This caused a buffer overflow during the real compile. This bug was
+discovered by Karl Skomski with the LLVM fuzzer.
+
+7. Moved the pcre2_find_bracket() function from src/pcre2_compile.c into its
+own source module to avoid a circular dependency between src/pcre2_compile.c
+and src/pcre2_study.c
+
+8. A callout with a string argument containing an opening square bracket, for
+example /(?C$[$)(?<]/, was incorrectly processed and could provoke a buffer
+overflow. This bug was discovered by Karl Skomski with the LLVM fuzzer.
+
+9. The handling of callouts during the pre-pass for named group identification
+has been tightened up.
+
+10. The quantifier {1} can be ignored, whether greedy, non-greedy, or
+possessive. This is a very minor optimization.
+
+11. A possessively repeated conditional group that could match an empty string,
+for example, /(?(R))*+/, was incorrectly compiled.
+
+12. The Unicode tables have been updated to Unicode 8.0.0 (thanks to Christian
+Persch).
+
+13. An empty comment (?#) in a pattern was incorrectly processed and could
+provoke a buffer overflow. This bug was discovered by Karl Skomski with the
+LLVM fuzzer.
+
+14. Fix infinite recursion in the JIT compiler when certain patterns such as
+/(?:|a|){100}x/ are analysed.
+
+15. Some patterns with character classes involving [: and \\ were incorrectly
+compiled and could cause reading from uninitialized memory or an incorrect
+error diagnosis. Examples are: /[[:\\](?<[::]/ and /[[:\\](?'abc')[a:]. The
+first of these bugs was discovered by Karl Skomski with the LLVM fuzzer.
+
+16. Pathological patterns containing many nested occurrences of [: caused
+pcre2_compile() to run for a very long time. This bug was found by the LLVM
+fuzzer.
+
+17. A missing closing parenthesis for a callout with a string argument was not
+being diagnosed, possibly leading to a buffer overflow. This bug was found by
+the LLVM fuzzer.
+
+18. A conditional group with only one branch has an implicit empty alternative
+branch and must therefore be treated as potentially matching an empty string.
+
+19. If (?R was followed by - or + incorrect behaviour happened instead of a
+diagnostic. This bug was discovered by Karl Skomski with the LLVM fuzzer.
+
+20. Another bug that was introduced by change 36 for 10.20: conditional groups
+whose condition was an assertion preceded by an explicit callout with a string
+argument might be incorrectly processed, especially if the string contained \Q.
+This bug was discovered by Karl Skomski with the LLVM fuzzer.
+
+21. Compiling PCRE2 with the sanitize options of clang showed up a number of
+very pedantic coding infelicities and a buffer overflow while checking a UTF-8
+string if the final multi-byte UTF-8 character was truncated.
+
+22. For Perl compatibility in EBCDIC environments, ranges such as a-z in a
+class, where both values are literal letters in the same case, omit the
+non-letter EBCDIC code points within the range.
+
+23. Finding the minimum matching length of complex patterns with back
+references and/or recursions can take a long time. There is now a cut-off that
+gives up trying to find a minimum length when things get too complex.
+
+24. An optimization has been added that speeds up finding the minimum matching
+length for patterns containing repeated capturing groups or recursions.
+
+25. If a pattern contained a back reference to a group whose number was
+duplicated as a result of appearing in a (?|...) group, the computation of the
+minimum matching length gave a wrong result, which could cause incorrect "no
+match" errors. For such patterns, a minimum matching length cannot at present
+be computed.
+
+26. Added a check for integer overflow in conditions (?(<digits>) and
+(?(R<digits>). This omission was discovered by Karl Skomski with the LLVM
+fuzzer.
+
+27. Fixed an issue when \p{Any} inside an xclass did not read the current
+character.
+
+28. If pcre2grep was given the -q option with -c or -l, or when handling a
+binary file, it incorrectly wrote output to stdout.
+
+29. The JIT compiler did not restore the control verb head in case of *THEN
+control verbs. This issue was found by Karl Skomski with a custom LLVM fuzzer.
+
+30. The way recursive references such as (?3) are compiled has been re-written
+because the old way was the cause of many issues. Now, conversion of the group
+number into a pattern offset does not happen until the pattern has been
+completely compiled. This does mean that detection of all infinitely looping
+recursions is postponed till match time. In the past, some easy ones were
+detected at compile time. This re-writing was done in response to yet another
+bug found by the LLVM fuzzer.
+
+31. A test for a back reference to a non-existent group was missing for items
+such as \987. This caused incorrect code to be compiled. This issue was found
+by Karl Skomski with a custom LLVM fuzzer.
+
+32. Error messages for syntax errors following \g and \k were giving inaccurate
+offsets in the pattern.
+
+33. Improve the performance of starting single character repetitions in JIT.
+
+34. (*LIMIT_MATCH=) now gives an error instead of setting the value to 0.
+
+35. Error messages for syntax errors in *LIMIT_MATCH and *LIMIT_RECURSION now
+give the right offset instead of zero.
+
+36. The JIT compiler should not check repeats after a {0,1} repeat byte code.
+This issue was found by Karl Skomski with a custom LLVM fuzzer.
+
+37. The JIT compiler should restore the control chain for empty possessive
+repeats. This issue was found by Karl Skomski with a custom LLVM fuzzer.
+
+38. A bug which was introduced by the single character repetition optimization
+was fixed.
+
+39. Match limit check added to recursion. This issue was found by Karl Skomski
+with a custom LLVM fuzzer.
+
+40. Arrange for the UTF check in pcre2_match() and pcre2_dfa_match() to look
+only at the part of the subject that is relevant when the starting offset is
+non-zero.
+
+41. Improve first character match in JIT with SSE2 on x86.
+
+42. Fix two assertion fails in JIT. These issues were found by Karl Skomski
+with a custom LLVM fuzzer.
+
+43. Correct the setting of CMAKE_C_FLAGS in CMakeLists.txt (patch from Roy Ivy
+III).
+
+44. Fix bug in RunTest.bat for new test 14, and adjust the script for the added
+test (there are now 20 in total).
+
+45. Fixed a corner case of range optimization in JIT.
+
+46. Add the ${*MARK} facility to pcre2_substitute().
+
+47. Modifier lists in pcre2test were splitting at spaces without the required
+commas.
+
+48. Implemented PCRE2_ALT_VERBNAMES.
+
+49. Fixed two issues in JIT. These were found by Karl Skomski with a custom
+LLVM fuzzer.
+
+50. The pcre2test program has been extended by adding the #newline_default
+command. This has made it possible to run the standard tests when PCRE2 is
+compiled with either CR or CRLF as the default newline convention. As part of
+this work, the new command was added to several test files and the testing
+scripts were modified. The pcre2grep tests can now also be run when there is no
+LF in the default newline convention.
+
+51. The RunTest script has been modified so that, when JIT is used and valgrind
+is specified, a valgrind suppressions file is set up to ignore "Invalid read of
+size 16" errors because these are false positives when the hardware supports
+the SSE2 instruction set.
+
+52. It is now possible to have comment lines amid the subject strings in
+pcre2test (and perltest.sh) input.
+
+53. Implemented PCRE2_USE_OFFSET_LIMIT and pcre2_set_offset_limit().
+
+54. Add the null_context modifier to pcre2test so that calling pcre2_compile()
+and the matching functions with NULL contexts can be tested.
+
+55. Implemented PCRE2_SUBSTITUTE_EXTENDED.
+
+56. In a character class such as [\W\p{Any}] where both a negative-type escape
+("not a word character") and a property escape were present, the property
+escape was being ignored.
+
+57. Fixed integer overflow for patterns whose minimum matching length is very,
+very large.
+
+58. Implemented --never-backslash-C.
+
+59. Change 55 above introduced a bug by which certain patterns provoked the
+erroneous error "\ at end of pattern".
+
+60. The special sequences [[:<:]] and [[:>:]] gave rise to incorrect compiling
+errors or other strange effects if compiled in UCP mode. Found with libFuzzer
+and AddressSanitizer.
+
+61. Whitespace at the end of a pcre2test pattern line caused a spurious error
+message if there were only single-character modifiers. It should be ignored.
+
+62. The use of PCRE2_NO_AUTO_CAPTURE could cause incorrect compilation results
+or segmentation errors for some patterns. Found with libFuzzer and
+AddressSanitizer.
+
+63. Very long names in (*MARK) or (*THEN) etc. items could provoke a buffer
+overflow.
+
+64. Improve error message for overly-complicated patterns.
+
+65. Implemented an optional replication feature for patterns in pcre2test, to
+make it easier to test long repetitive patterns. The tests for 63 above are
+converted to use the new feature.
+
+66. In the POSIX wrapper, if regerror() was given too small a buffer, it could
+misbehave.
+
+67. In pcre2_substitute() in UTF mode, the UTF validity check on the
+replacement string was happening before the length setting when the replacement
+string was zero-terminated.
+
+68. In pcre2_substitute() in UTF mode, PCRE2_NO_UTF_CHECK can be set for the
+second and subsequent calls to pcre2_match().
+
+69. There was no check for integer overflow for a replacement group number in
+pcre2_substitute(). An added check for a number greater than the largest group
+number in the pattern means this is not now needed.
+
+70. The PCRE2-specific VERSION condition didn't work correctly if only one
+digit was given after the decimal point, or if more than two digits were given.
+It now works with one or two digits, and gives a compile time error if more are
+given.
+
+71. In pcre2_substitute() there was the possibility of reading one code unit
+beyond the end of the replacement string.
+
+72. The code for checking a subject's UTF-32 validity for a pattern with a
+lookbehind involved an out-of-bounds pointer, which could potentially cause
+trouble in some environments.
+
+73. The maximum lookbehind length was incorrectly calculated for patterns such
+as /(?<=(a)(?-1))x/ which have a recursion within a backreference.
+
+74. Give an error if a lookbehind assertion is longer than 65535 code units.
+
+75. Give an error in pcre2_substitute() if a match ends before it starts (as a
+result of the use of \K).
+
+76. Check the length of subpattern names and the names in (*MARK:xx) etc.
+dynamically to avoid the possibility of integer overflow.
+
+77. Implement pcre2_set_max_pattern_length() so that programs can restrict the
+size of patterns that they are prepared to handle.
+
+78. (*NO_AUTO_POSSESS) was not working.
+
+79. Adding group information caching improves the speed of compiling when
+checking whether a group has a fixed length and/or could match an empty string,
+especially when recursion or subroutine calls are involved. However, this
+cannot be used when (?| is present in the pattern because the same number may
+be used for groups of different sizes. To catch runaway patterns in this
+situation, counts have been introduced to the functions that scan for empty
+branches or compute fixed lengths.
+
+80. Allow for the possibility of the size of the nest_save structure not being
+a factor of the size of the compiling workspace (it currently is).
+
+81. Check for integer overflow in minimum length calculation and cap it at
+65535.
+
+82. Small optimizations in code for finding the minimum matching length.
+
+83. Lock out configuring for EBCDIC with non-8-bit libraries.
+
+84. Test for error code <= 0 in regerror().
+
+85. Check for too many replacements (more than INT_MAX) in pcre2_substitute().
+
+86. Avoid the possibility of computing with an out-of-bounds pointer (though
+not dereferencing it) while handling lookbehind assertions.
+
+87. Failure to get memory for the match data in regcomp() is now given as a
+regcomp() error instead of waiting for regexec() to pick it up.
+
+88. In pcre2_substitute(), ensure that CRLF is not split when it is a valid
+newline sequence.
+
+89. Paranoid check in regcomp() for bad error code from pcre2_compile().
+
+90. Run test 8 (internal offsets and code sizes) for link sizes 3 and 4 as well
+as for link size 2.
+
+91. Document that JIT has a limit on pattern size, and give more information
+about JIT compile failures in pcre2test.
+
+92. Implement PCRE2_INFO_HASBACKSLASHC.
+
+93. Re-arrange valgrind support code in pcre2test to avoid spurious reports
+with JIT (possibly caused by SSE2?).
+
+94. Support offset_limit in JIT.
+
+95. A sequence such as [[:punct:]b] that is, a POSIX character class followed
+by a single ASCII character in a class item, was incorrectly compiled in UCP
+mode. The POSIX class got lost, but only if the single character followed it.
+
+96. [:punct:] in UCP mode was matching some characters in the range 128-255
+that should not have been matched.
+
+97. If [:^ascii:] or [:^xdigit:] are present in a non-negated class, all
+characters with code points greater than 255 are in the class. When a Unicode
+property was also in the class (if PCRE2_UCP is set, escapes such as \w are
+turned into Unicode properties), wide characters were not correctly handled,
+and could fail to match.
+
+98. In pcre2test, make the "startoffset" modifier a synonym of "offset",
+because it sets the "startoffset" parameter for pcre2_match().
+
+99. If PCRE2_AUTO_CALLOUT was set on a pattern that had a (?# comment between
+an item and its qualifier (for example, A(?#comment)?B) pcre2_compile()
+misbehaved. This bug was found by the LLVM fuzzer.
+
+100. The error for an invalid UTF pattern string always gave the code unit
+offset as zero instead of where the invalidity was found.
+
+101. Further to 97 above, negated classes such as [^[:^ascii:]\d] were also not
+working correctly in UCP mode.
+
+102. Similar to 99 above, if an isolated \E was present between an item and its
+qualifier when PCRE2_AUTO_CALLOUT was set, pcre2_compile() misbehaved. This bug
+was found by the LLVM fuzzer.
+
+103. The POSIX wrapper function regexec() crashed if the option REG_STARTEND
+was set when the pmatch argument was NULL. It now returns REG_INVARG.
+
+104. Allow for up to 32-bit numbers in the ordin() function in pcre2grep.
+
+105. An empty \Q\E sequence between an item and its qualifier caused
+pcre2_compile() to misbehave when auto callouts were enabled. This bug
+was found by the LLVM fuzzer.
+
+106. If both PCRE2_ALT_VERBNAMES and PCRE2_EXTENDED were set, and a (*MARK) or
+other verb "name" ended with whitespace immediately before the closing
+parenthesis, pcre2_compile() misbehaved. Example: /(*:abc )/, but only when
+both those options were set.
+
+107. In a number of places pcre2_compile() was not handling NULL characters
+correctly, and pcre2test with the "bincode" modifier was not always correctly
+displaying fields containing NULLS:
+
+ (a) Within /x extended #-comments
+ (b) Within the "name" part of (*MARK) and other *verbs
+ (c) Within the text argument of a callout
+
+108. If a pattern that was compiled with PCRE2_EXTENDED started with white
+space or a #-type comment that was followed by (?-x), which turns off
+PCRE2_EXTENDED, and there was no subsequent (?x) to turn it on again,
+pcre2_compile() assumed that (?-x) applied to the whole pattern and
+consequently mis-compiled it. This bug was found by the LLVM fuzzer. The fix
+for this bug means that a setting of any of the (?imsxU) options at the start
+of a pattern is no longer transferred to the options that are returned by
+PCRE2_INFO_ALLOPTIONS. In fact, this was an anachronism that should have
+changed when the effects of those options were all moved to compile time.
+
+109. An escaped closing parenthesis in the "name" part of a (*verb) when
+PCRE2_ALT_VERBNAMES was set caused pcre2_compile() to malfunction. This bug
+was found by the LLVM fuzzer.
+
+110. Implemented PCRE2_SUBSTITUTE_UNSET_EMPTY, and updated pcre2test to make it
+possible to test it.
+
+111. "Harden" pcre2test against ridiculously large values in modifiers and
+command line arguments.
+
+112. Implemented PCRE2_SUBSTITUTE_UNKNOWN_UNSET and PCRE2_SUBSTITUTE_OVERFLOW_
+LENGTH.
+
+113. Fix printing of *MARK names that contain binary zeroes in pcre2test.
+
+
Version 10.20 30-June-2015
--------------------------
diff --git a/pcre2-10.20/CheckMan b/pcre2-10.21/CheckMan
index 56867465..56867465 100755
--- a/pcre2-10.20/CheckMan
+++ b/pcre2-10.21/CheckMan
diff --git a/pcre2-10.20/CleanTxt b/pcre2-10.21/CleanTxt
index 1f42519c..1f42519c 100755
--- a/pcre2-10.20/CleanTxt
+++ b/pcre2-10.21/CleanTxt
diff --git a/pcre2-10.20/Detrail b/pcre2-10.21/Detrail
index 1c5c7e9c..1c5c7e9c 100755
--- a/pcre2-10.20/Detrail
+++ b/pcre2-10.21/Detrail
diff --git a/pcre2-10.20/HACKING b/pcre2-10.21/HACKING
index 051520c2..051520c2 100644
--- a/pcre2-10.20/HACKING
+++ b/pcre2-10.21/HACKING
diff --git a/pcre2-10.20/INSTALL b/pcre2-10.21/INSTALL
index 20998407..20998407 100644
--- a/pcre2-10.20/INSTALL
+++ b/pcre2-10.21/INSTALL
diff --git a/pcre2-10.20/LICENCE b/pcre2-10.21/LICENCE
index 30416d84..6600a659 100644
--- a/pcre2-10.20/LICENCE
+++ b/pcre2-10.21/LICENCE
@@ -25,7 +25,7 @@ Email domain: cam.ac.uk
University of Cambridge Computing Service,
Cambridge, England.
-Copyright (c) 1997-2015 University of Cambridge
+Copyright (c) 1997-2016 University of Cambridge
All rights reserved.
@@ -36,7 +36,7 @@ Written by: Zoltan Herczeg
Email local part: hzmester
Emain domain: freemail.hu
-Copyright(c) 2010-2015 Zoltan Herczeg
+Copyright(c) 2010-2016 Zoltan Herczeg
All rights reserved.
@@ -47,7 +47,7 @@ Written by: Zoltan Herczeg
Email local part: hzmester
Emain domain: freemail.hu
-Copyright(c) 2009-2015 Zoltan Herczeg
+Copyright(c) 2009-2016 Zoltan Herczeg
All rights reserved.
diff --git a/pcre2-10.20/Makefile.am b/pcre2-10.21/Makefile.am
index 56f93db2..5977ba06 100644
--- a/pcre2-10.20/Makefile.am
+++ b/pcre2-10.21/Makefile.am
@@ -64,6 +64,7 @@ dist_html_DATA = \
doc/html/pcre2_set_character_tables.html \
doc/html/pcre2_set_compile_recursion_guard.html \
doc/html/pcre2_set_match_limit.html \
+ doc/html/pcre2_set_offset_limit.html \
doc/html/pcre2_set_newline.html \
doc/html/pcre2_set_parens_nest_limit.html \
doc/html/pcre2_set_recursion_limit.html \
@@ -143,6 +144,7 @@ dist_man_MANS = \
doc/pcre2_set_character_tables.3 \
doc/pcre2_set_compile_recursion_guard.3 \
doc/pcre2_set_match_limit.3 \
+ doc/pcre2_set_offset_limit.3 \
doc/pcre2_set_newline.3 \
doc/pcre2_set_parens_nest_limit.3 \
doc/pcre2_set_recursion_limit.3 \
@@ -319,6 +321,7 @@ COMMON_SOURCES = \
src/pcre2_context.c \
src/pcre2_dfa_match.c \
src/pcre2_error.c \
+ src/pcre2_find_bracket.c \
src/pcre2_internal.h \
src/pcre2_intmodedep.h \
src/pcre2_jit_compile.c \
@@ -586,6 +589,10 @@ EXTRA_DIST += \
testdata/testinput17 \
testdata/testinput18 \
testdata/testinput19 \
+ testdata/testinput20 \
+ testdata/testinput21 \
+ testdata/testinput22 \
+ testdata/testinput23 \
testdata/testinputEBC \
testdata/testoutput1 \
testdata/testoutput2 \
@@ -596,9 +603,15 @@ EXTRA_DIST += \
testdata/testoutput5 \
testdata/testoutput6 \
testdata/testoutput7 \
- testdata/testoutput8-16 \
- testdata/testoutput8-32 \
- testdata/testoutput8-8 \
+ testdata/testoutput8-16-2 \
+ testdata/testoutput8-16-3 \
+ testdata/testoutput8-16-3 \
+ testdata/testoutput8-32-2 \
+ testdata/testoutput8-32-3 \
+ testdata/testoutput8-32-4 \
+ testdata/testoutput8-8-2 \
+ testdata/testoutput8-8-3 \
+ testdata/testoutput8-8-4 \
testdata/testoutput9 \
testdata/testoutput10 \
testdata/testoutput11-16 \
@@ -606,13 +619,22 @@ EXTRA_DIST += \
testdata/testoutput12-16 \
testdata/testoutput12-32 \
testdata/testoutput13 \
- testdata/testoutput14 \
+ testdata/testoutput14-16 \
+ testdata/testoutput14-32 \
+ testdata/testoutput14-8 \
testdata/testoutput15 \
testdata/testoutput16 \
testdata/testoutput17 \
testdata/testoutput18 \
testdata/testoutput19 \
+ testdata/testoutput20 \
+ testdata/testoutput21 \
+ testdata/testoutput22-16 \
+ testdata/testoutput22-32 \
+ testdata/testoutput22-8 \
+ testdata/testoutput23 \
testdata/testoutputEBC \
+ testdata/valgrind-jit.supp \
testdata/wintestinput3 \
testdata/wintestoutput3 \
perltest.sh
diff --git a/pcre2-10.20/Makefile.in b/pcre2-10.21/Makefile.in
index defe5d68..d86120b5 100644
--- a/pcre2-10.20/Makefile.in
+++ b/pcre2-10.21/Makefile.in
@@ -186,7 +186,8 @@ LTLIBRARIES = $(lib_LTLIBRARIES)
libpcre2_16_la_DEPENDENCIES =
am__libpcre2_16_la_SOURCES_DIST = src/pcre2_auto_possess.c \
src/pcre2_compile.c src/pcre2_config.c src/pcre2_context.c \
- src/pcre2_dfa_match.c src/pcre2_error.c src/pcre2_internal.h \
+ src/pcre2_dfa_match.c src/pcre2_error.c \
+ src/pcre2_find_bracket.c src/pcre2_internal.h \
src/pcre2_intmodedep.h src/pcre2_jit_compile.c \
src/pcre2_maketables.c src/pcre2_match.c \
src/pcre2_match_data.c src/pcre2_newline.c src/pcre2_ord2utf.c \
@@ -202,6 +203,7 @@ am__objects_1 = src/libpcre2_16_la-pcre2_auto_possess.lo \
src/libpcre2_16_la-pcre2_context.lo \
src/libpcre2_16_la-pcre2_dfa_match.lo \
src/libpcre2_16_la-pcre2_error.lo \
+ src/libpcre2_16_la-pcre2_find_bracket.lo \
src/libpcre2_16_la-pcre2_jit_compile.lo \
src/libpcre2_16_la-pcre2_maketables.lo \
src/libpcre2_16_la-pcre2_match.lo \
@@ -235,7 +237,8 @@ libpcre2_16_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
libpcre2_32_la_DEPENDENCIES =
am__libpcre2_32_la_SOURCES_DIST = src/pcre2_auto_possess.c \
src/pcre2_compile.c src/pcre2_config.c src/pcre2_context.c \
- src/pcre2_dfa_match.c src/pcre2_error.c src/pcre2_internal.h \
+ src/pcre2_dfa_match.c src/pcre2_error.c \
+ src/pcre2_find_bracket.c src/pcre2_internal.h \
src/pcre2_intmodedep.h src/pcre2_jit_compile.c \
src/pcre2_maketables.c src/pcre2_match.c \
src/pcre2_match_data.c src/pcre2_newline.c src/pcre2_ord2utf.c \
@@ -250,6 +253,7 @@ am__objects_3 = src/libpcre2_32_la-pcre2_auto_possess.lo \
src/libpcre2_32_la-pcre2_context.lo \
src/libpcre2_32_la-pcre2_dfa_match.lo \
src/libpcre2_32_la-pcre2_error.lo \
+ src/libpcre2_32_la-pcre2_find_bracket.lo \
src/libpcre2_32_la-pcre2_jit_compile.lo \
src/libpcre2_32_la-pcre2_maketables.lo \
src/libpcre2_32_la-pcre2_match.lo \
@@ -279,7 +283,8 @@ libpcre2_32_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
libpcre2_8_la_DEPENDENCIES =
am__libpcre2_8_la_SOURCES_DIST = src/pcre2_auto_possess.c \
src/pcre2_compile.c src/pcre2_config.c src/pcre2_context.c \
- src/pcre2_dfa_match.c src/pcre2_error.c src/pcre2_internal.h \
+ src/pcre2_dfa_match.c src/pcre2_error.c \
+ src/pcre2_find_bracket.c src/pcre2_internal.h \
src/pcre2_intmodedep.h src/pcre2_jit_compile.c \
src/pcre2_maketables.c src/pcre2_match.c \
src/pcre2_match_data.c src/pcre2_newline.c src/pcre2_ord2utf.c \
@@ -294,6 +299,7 @@ am__objects_5 = src/libpcre2_8_la-pcre2_auto_possess.lo \
src/libpcre2_8_la-pcre2_context.lo \
src/libpcre2_8_la-pcre2_dfa_match.lo \
src/libpcre2_8_la-pcre2_error.lo \
+ src/libpcre2_8_la-pcre2_find_bracket.lo \
src/libpcre2_8_la-pcre2_jit_compile.lo \
src/libpcre2_8_la-pcre2_maketables.lo \
src/libpcre2_8_la-pcre2_match.lo \
@@ -708,7 +714,6 @@ LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
-MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
@@ -865,6 +870,7 @@ dist_html_DATA = \
doc/html/pcre2_set_character_tables.html \
doc/html/pcre2_set_compile_recursion_guard.html \
doc/html/pcre2_set_match_limit.html \
+ doc/html/pcre2_set_offset_limit.html \
doc/html/pcre2_set_newline.html \
doc/html/pcre2_set_parens_nest_limit.html \
doc/html/pcre2_set_recursion_limit.html \
@@ -944,6 +950,7 @@ dist_man_MANS = \
doc/pcre2_set_character_tables.3 \
doc/pcre2_set_compile_recursion_guard.3 \
doc/pcre2_set_match_limit.3 \
+ doc/pcre2_set_offset_limit.3 \
doc/pcre2_set_newline.3 \
doc/pcre2_set_parens_nest_limit.3 \
doc/pcre2_set_recursion_limit.3 \
@@ -1052,21 +1059,30 @@ EXTRA_DIST = m4/ax_pthread.m4 m4/pcre2_visibility.m4 \
testdata/testinput11 testdata/testinput12 testdata/testinput13 \
testdata/testinput14 testdata/testinput15 testdata/testinput16 \
testdata/testinput17 testdata/testinput18 testdata/testinput19 \
- testdata/testinputEBC testdata/testoutput1 \
- testdata/testoutput2 testdata/testoutput3 \
+ testdata/testinput20 testdata/testinput21 testdata/testinput22 \
+ testdata/testinput23 testdata/testinputEBC \
+ testdata/testoutput1 testdata/testoutput2 testdata/testoutput3 \
testdata/testoutput3A testdata/testoutput3B \
testdata/testoutput4 testdata/testoutput5 testdata/testoutput6 \
- testdata/testoutput7 testdata/testoutput8-16 \
- testdata/testoutput8-32 testdata/testoutput8-8 \
+ testdata/testoutput7 testdata/testoutput8-16-2 \
+ testdata/testoutput8-16-3 testdata/testoutput8-16-3 \
+ testdata/testoutput8-32-2 testdata/testoutput8-32-3 \
+ testdata/testoutput8-32-4 testdata/testoutput8-8-2 \
+ testdata/testoutput8-8-3 testdata/testoutput8-8-4 \
testdata/testoutput9 testdata/testoutput10 \
testdata/testoutput11-16 testdata/testoutput11-32 \
testdata/testoutput12-16 testdata/testoutput12-32 \
- testdata/testoutput13 testdata/testoutput14 \
+ testdata/testoutput13 testdata/testoutput14-16 \
+ testdata/testoutput14-32 testdata/testoutput14-8 \
testdata/testoutput15 testdata/testoutput16 \
testdata/testoutput17 testdata/testoutput18 \
- testdata/testoutput19 testdata/testoutputEBC \
- testdata/wintestinput3 testdata/wintestoutput3 perltest.sh \
- src/pcre2demo.c cmake/COPYING-CMAKE-SCRIPTS \
+ testdata/testoutput19 testdata/testoutput20 \
+ testdata/testoutput21 testdata/testoutput22-16 \
+ testdata/testoutput22-32 testdata/testoutput22-8 \
+ testdata/testoutput23 testdata/testoutputEBC \
+ testdata/valgrind-jit.supp testdata/wintestinput3 \
+ testdata/wintestoutput3 perltest.sh src/pcre2demo.c \
+ cmake/COPYING-CMAKE-SCRIPTS \
cmake/FindPackageHandleStandardArgs.cmake \
cmake/FindReadline.cmake cmake/FindEditline.cmake \
CMakeLists.txt config-cmake.h.in
@@ -1088,6 +1104,7 @@ COMMON_SOURCES = \
src/pcre2_context.c \
src/pcre2_dfa_match.c \
src/pcre2_error.c \
+ src/pcre2_find_bracket.c \
src/pcre2_internal.h \
src/pcre2_intmodedep.h \
src/pcre2_jit_compile.c \
@@ -1198,7 +1215,7 @@ all: $(BUILT_SOURCES)
.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
am--refresh: Makefile
@:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -1224,9 +1241,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+$(top_srcdir)/configure: $(am__configure_deps)
$(am__cd) $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
@@ -1237,7 +1254,7 @@ src/config.h: src/stamp-h1
src/stamp-h1: $(top_srcdir)/src/config.h.in $(top_builddir)/config.status
@rm -f src/stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status src/config.h
-$(top_srcdir)/src/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+$(top_srcdir)/src/config.h.in: $(am__configure_deps)
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
rm -f src/stamp-h1
touch $@
@@ -1309,6 +1326,8 @@ src/libpcre2_16_la-pcre2_dfa_match.lo: src/$(am__dirstamp) \
src/$(DEPDIR)/$(am__dirstamp)
src/libpcre2_16_la-pcre2_error.lo: src/$(am__dirstamp) \
src/$(DEPDIR)/$(am__dirstamp)
+src/libpcre2_16_la-pcre2_find_bracket.lo: src/$(am__dirstamp) \
+ src/$(DEPDIR)/$(am__dirstamp)
src/libpcre2_16_la-pcre2_jit_compile.lo: src/$(am__dirstamp) \
src/$(DEPDIR)/$(am__dirstamp)
src/libpcre2_16_la-pcre2_maketables.lo: src/$(am__dirstamp) \
@@ -1358,6 +1377,8 @@ src/libpcre2_32_la-pcre2_dfa_match.lo: src/$(am__dirstamp) \
src/$(DEPDIR)/$(am__dirstamp)
src/libpcre2_32_la-pcre2_error.lo: src/$(am__dirstamp) \
src/$(DEPDIR)/$(am__dirstamp)
+src/libpcre2_32_la-pcre2_find_bracket.lo: src/$(am__dirstamp) \
+ src/$(DEPDIR)/$(am__dirstamp)
src/libpcre2_32_la-pcre2_jit_compile.lo: src/$(am__dirstamp) \
src/$(DEPDIR)/$(am__dirstamp)
src/libpcre2_32_la-pcre2_maketables.lo: src/$(am__dirstamp) \
@@ -1407,6 +1428,8 @@ src/libpcre2_8_la-pcre2_dfa_match.lo: src/$(am__dirstamp) \
src/$(DEPDIR)/$(am__dirstamp)
src/libpcre2_8_la-pcre2_error.lo: src/$(am__dirstamp) \
src/$(DEPDIR)/$(am__dirstamp)
+src/libpcre2_8_la-pcre2_find_bracket.lo: src/$(am__dirstamp) \
+ src/$(DEPDIR)/$(am__dirstamp)
src/libpcre2_8_la-pcre2_jit_compile.lo: src/$(am__dirstamp) \
src/$(DEPDIR)/$(am__dirstamp)
src/libpcre2_8_la-pcre2_maketables.lo: src/$(am__dirstamp) \
@@ -1583,6 +1606,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_16_la-pcre2_context.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_16_la-pcre2_dfa_match.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_16_la-pcre2_error.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_16_la-pcre2_find_bracket.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_16_la-pcre2_jit_compile.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_16_la-pcre2_maketables.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_16_la-pcre2_match.Plo@am__quote@
@@ -1606,6 +1630,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_32_la-pcre2_context.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_32_la-pcre2_dfa_match.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_32_la-pcre2_error.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_32_la-pcre2_find_bracket.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_32_la-pcre2_jit_compile.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_32_la-pcre2_maketables.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_32_la-pcre2_match.Plo@am__quote@
@@ -1629,6 +1654,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_8_la-pcre2_context.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_8_la-pcre2_dfa_match.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_8_la-pcre2_error.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_8_la-pcre2_find_bracket.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_8_la-pcre2_jit_compile.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_8_la-pcre2_maketables.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/libpcre2_8_la-pcre2_match.Plo@am__quote@
@@ -1716,6 +1742,13 @@ src/libpcre2_16_la-pcre2_error.lo: src/pcre2_error.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpcre2_16_la_CFLAGS) $(CFLAGS) -c -o src/libpcre2_16_la-pcre2_error.lo `test -f 'src/pcre2_error.c' || echo '$(srcdir)/'`src/pcre2_error.c
+src/libpcre2_16_la-pcre2_find_bracket.lo: src/pcre2_find_bracket.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpcre2_16_la_CFLAGS) $(CFLAGS) -MT src/libpcre2_16_la-pcre2_find_bracket.lo -MD -MP -MF src/$(DEPDIR)/libpcre2_16_la-pcre2_find_bracket.Tpo -c -o src/libpcre2_16_la-pcre2_find_bracket.lo `test -f 'src/pcre2_find_bracket.c' || echo '$(srcdir)/'`src/pcre2_find_bracket.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/libpcre2_16_la-pcre2_find_bracket.Tpo src/$(DEPDIR)/libpcre2_16_la-pcre2_find_bracket.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/pcre2_find_bracket.c' object='src/libpcre2_16_la-pcre2_find_bracket.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpcre2_16_la_CFLAGS) $(CFLAGS) -c -o src/libpcre2_16_la-pcre2_find_bracket.lo `test -f 'src/pcre2_find_bracket.c' || echo '$(srcdir)/'`src/pcre2_find_bracket.c
+
src/libpcre2_16_la-pcre2_jit_compile.lo: src/pcre2_jit_compile.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpcre2_16_la_CFLAGS) $(CFLAGS) -MT src/libpcre2_16_la-pcre2_jit_compile.lo -MD -MP -MF src/$(DEPDIR)/libpcre2_16_la-pcre2_jit_compile.Tpo -c -o src/libpcre2_16_la-pcre2_jit_compile.lo `test -f 'src/pcre2_jit_compile.c' || echo '$(srcdir)/'`src/pcre2_jit_compile.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/libpcre2_16_la-pcre2_jit_compile.Tpo src/$(DEPDIR)/libpcre2_16_la-pcre2_jit_compile.Plo
@@ -1877,6 +1910,13 @@ src/libpcre2_32_la-pcre2_error.lo: src/pcre2_error.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpcre2_32_la_CFLAGS) $(CFLAGS) -c -o src/libpcre2_32_la-pcre2_error.lo `test -f 'src/pcre2_error.c' || echo '$(srcdir)/'`src/pcre2_error.c
+src/libpcre2_32_la-pcre2_find_bracket.lo: src/pcre2_find_bracket.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpcre2_32_la_CFLAGS) $(CFLAGS) -MT src/libpcre2_32_la-pcre2_find_bracket.lo -MD -MP -MF src/$(DEPDIR)/libpcre2_32_la-pcre2_find_bracket.Tpo -c -o src/libpcre2_32_la-pcre2_find_bracket.lo `test -f 'src/pcre2_find_bracket.c' || echo '$(srcdir)/'`src/pcre2_find_bracket.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/libpcre2_32_la-pcre2_find_bracket.Tpo src/$(DEPDIR)/libpcre2_32_la-pcre2_find_bracket.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/pcre2_find_bracket.c' object='src/libpcre2_32_la-pcre2_find_bracket.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpcre2_32_la_CFLAGS) $(CFLAGS) -c -o src/libpcre2_32_la-pcre2_find_bracket.lo `test -f 'src/pcre2_find_bracket.c' || echo '$(srcdir)/'`src/pcre2_find_bracket.c
+
src/libpcre2_32_la-pcre2_jit_compile.lo: src/pcre2_jit_compile.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpcre2_32_la_CFLAGS) $(CFLAGS) -MT src/libpcre2_32_la-pcre2_jit_compile.lo -MD -MP -MF src/$(DEPDIR)/libpcre2_32_la-pcre2_jit_compile.Tpo -c -o src/libpcre2_32_la-pcre2_jit_compile.lo `test -f 'src/pcre2_jit_compile.c' || echo '$(srcdir)/'`src/pcre2_jit_compile.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/libpcre2_32_la-pcre2_jit_compile.Tpo src/$(DEPDIR)/libpcre2_32_la-pcre2_jit_compile.Plo
@@ -2038,6 +2078,13 @@ src/libpcre2_8_la-pcre2_error.lo: src/pcre2_error.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpcre2_8_la_CFLAGS) $(CFLAGS) -c -o src/libpcre2_8_la-pcre2_error.lo `test -f 'src/pcre2_error.c' || echo '$(srcdir)/'`src/pcre2_error.c
+src/libpcre2_8_la-pcre2_find_bracket.lo: src/pcre2_find_bracket.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpcre2_8_la_CFLAGS) $(CFLAGS) -MT src/libpcre2_8_la-pcre2_find_bracket.lo -MD -MP -MF src/$(DEPDIR)/libpcre2_8_la-pcre2_find_bracket.Tpo -c -o src/libpcre2_8_la-pcre2_find_bracket.lo `test -f 'src/pcre2_find_bracket.c' || echo '$(srcdir)/'`src/pcre2_find_bracket.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/libpcre2_8_la-pcre2_find_bracket.Tpo src/$(DEPDIR)/libpcre2_8_la-pcre2_find_bracket.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/pcre2_find_bracket.c' object='src/libpcre2_8_la-pcre2_find_bracket.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpcre2_8_la_CFLAGS) $(CFLAGS) -c -o src/libpcre2_8_la-pcre2_find_bracket.lo `test -f 'src/pcre2_find_bracket.c' || echo '$(srcdir)/'`src/pcre2_find_bracket.c
+
src/libpcre2_8_la-pcre2_jit_compile.lo: src/pcre2_jit_compile.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpcre2_8_la_CFLAGS) $(CFLAGS) -MT src/libpcre2_8_la-pcre2_jit_compile.lo -MD -MP -MF src/$(DEPDIR)/libpcre2_8_la-pcre2_jit_compile.Tpo -c -o src/libpcre2_8_la-pcre2_jit_compile.lo `test -f 'src/pcre2_jit_compile.c' || echo '$(srcdir)/'`src/pcre2_jit_compile.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/libpcre2_8_la-pcre2_jit_compile.Tpo src/$(DEPDIR)/libpcre2_8_la-pcre2_jit_compile.Plo
diff --git a/pcre2-10.21/NEWS b/pcre2-10.21/NEWS
new file mode 100644
index 00000000..aaeee5c2
--- /dev/null
+++ b/pcre2-10.21/NEWS
@@ -0,0 +1,88 @@
+News about PCRE2 releases
+-------------------------
+
+Version 10.21 12-January-2016
+-----------------------------
+
+1. Many bugs have been fixed. A large number of them were provoked only by very
+strange pattern input, and were discovered by fuzzers. Some others were
+discovered by code auditing. See ChangeLog for details.
+
+2. The Unicode tables have been updated to Unicode version 8.0.0.
+
+3. For Perl compatibility in EBCDIC environments, ranges such as a-z in a
+class, where both values are literal letters in the same case, omit the
+non-letter EBCDIC code points within the range.
+
+4. There have been a number of enhancements to the pcre2_substitute() function,
+giving more flexibility to replacement facilities. It is now also possible to
+cause the function to return the needed buffer size if the one given is too
+small.
+
+5. The PCRE2_ALT_VERBNAMES option causes the "name" parts of special verbs such
+as (*THEN:name) to be processed for backslashes and to take note of
+PCRE2_EXTENDED.
+
+6. PCRE2_INFO_HASBACKSLASHC makes it possible for a client to find out if a
+pattern uses \C, and --never-backslash-C makes it possible to compile a version
+PCRE2 in which the use of \C is always forbidden.
+
+7. A limit to the length of pattern that can be handled can now be set by
+calling pcre2_set_max_pattern_length().
+
+8. When matching an unanchored pattern, a match can be required to begin within
+a given number of code units after the start of the subject by calling
+pcre2_set_offset_limit().
+
+9. The pcre2test program has been extended to test new facilities, and it can
+now run the tests when LF on its own is not a valid newline sequence.
+
+10. The RunTest script has also been updated to enable more tests to be run.
+
+11. There have been some minor performance enhancements.
+
+
+Version 10.20 30-June-2015
+--------------------------
+
+1. Callouts with string arguments and the pcre2_callout_enumerate() function
+have been implemented.
+
+2. The PCRE2_NEVER_BACKSLASH_C option, which locks out the use of \C, is added.
+
+3. The PCRE2_ALT_CIRCUMFLEX option lets ^ match after a newline at the end of a
+subject in multiline mode.
+
+4. The way named subpatterns are handled has been refactored. The previous
+approach had several bugs.
+
+5. The handling of \c in EBCDIC environments has been changed to conform to the
+perlebcdic document. This is an incompatible change.
+
+6. Bugs have been mended, many of them discovered by fuzzers.
+
+
+Version 10.10 06-March-2015
+---------------------------
+
+1. Serialization and de-serialization functions have been added to the API,
+making it possible to save and restore sets of compiled patterns, though
+restoration must be done in the same environment that was used for compilation.
+
+2. The (*NO_JIT) feature has been added; this makes it possible for a pattern
+creator to specify that JIT is not to be used.
+
+3. A number of bugs have been fixed. In particular, bugs that caused building
+on Windows using CMake to fail have been mended.
+
+
+Version 10.00 05-January-2015
+-----------------------------
+
+Version 10.00 is the first release of PCRE2, a revised API for the PCRE
+library. Changes prior to 10.00 are logged in the ChangeLog file for the old
+API, up to item 20 for release 8.36. New programs are recommended to use the
+new library. Programs that use the original (PCRE1) API will need changing
+before linking with the new library.
+
+****
diff --git a/pcre2-10.20/NON-AUTOTOOLS-BUILD b/pcre2-10.21/NON-AUTOTOOLS-BUILD
index d8d9d2b4..ceb92450 100644
--- a/pcre2-10.20/NON-AUTOTOOLS-BUILD
+++ b/pcre2-10.21/NON-AUTOTOOLS-BUILD
@@ -97,6 +97,7 @@ can skip ahead to the CMake section.
pcre2_context.c
pcre2_dfa_match.c
pcre2_error.c
+ pcre2_find_bracket.c
pcre2_jit_compile.c
pcre2_maketables.c
pcre2_match.c
@@ -388,4 +389,4 @@ and executable, is in EBCDIC and native z/OS file formats and this is the
recommended download site.
=============================
-Last Updated: 15 June 2015
+Last Updated: 16 July 2015
diff --git a/pcre2-10.20/PrepareRelease b/pcre2-10.21/PrepareRelease
index f6b138f8..114fce01 100755
--- a/pcre2-10.20/PrepareRelease
+++ b/pcre2-10.21/PrepareRelease
@@ -65,13 +65,9 @@ End
echo "Making pcre2.txt"
for file in pcre2 pcre2api pcre2build pcre2callout pcre2compat pcre2jit \
- pcre2limits pcre2matching pcre2partial pcre2unicode ; do
-
-#for file in \
-# pcre2syntax \
-# pcre2precompile pcre2perform pcre2posix pcre2sample \
-# pcre2stack ; do
-
+ pcre2limits pcre2matching pcre2partial pcre2pattern pcre2perform \
+ pcre2posix pcre2sample pcre2serialize pcre2stack pcre2syntax \
+ pcre2unicode ; do
echo " Processing $file.3"
nroff -c -man $file.3 >$file.rawtxt
perl ../CleanTxt <$file.rawtxt >>pcre2.txt
@@ -153,7 +149,6 @@ for file in *.3 ; do
[ "$base" = "pcre2stack" ] || \
[ "$base" = "pcre2compat" ] || \
[ "$base" = "pcre2limits" ] || \
- [ "$base" = "pcre2perform" ] || \
[ "$base" = "pcre2unicode" ] ; then
toc=""
fi
@@ -204,6 +199,7 @@ files="\
src/pcre2_context.c \
src/pcre2_dfa_match.c \
src/pcre2_error.c \
+ src/pcre2_find_bracket.c \
src/pcre2_internal.h \
src/pcre2_intmodedep.h \
src/pcre2_jit_compile.c \
diff --git a/pcre2-10.20/README b/pcre2-10.21/README
index 7367924c..48d2ffdd 100644
--- a/pcre2-10.20/README
+++ b/pcre2-10.21/README
@@ -220,6 +220,13 @@ library. They are also documented in the pcre2build man page.
restrict \R to match only CR, LF, or CRLF. You can make this the default by
adding --enable-bsr-anycrlf to the "configure" command (bsr = "backslash R").
+. In a pattern, the escape sequence \C matches a single code unit, even in a
+ UTF mode. This can be dangerous because it breaks up multi-code-unit
+ characters. You can build PCRE2 with the use of \C permanently locked out by
+ adding --enable-never-backslash-C (note the upper case C) to the "configure"
+ command. When \C is allowed by the library, individual applications can lock
+ it out by calling pcre2_compile() with the PCRE2_NEVER_BACKSLASH_C option.
+
. PCRE2 has a counter that limits the depth of nesting of parentheses in a
pattern. This limits the amount of system stack that a pattern uses when it
is compiled. The default is 250, but you can change it by setting, for
@@ -724,6 +731,7 @@ The distribution should contain the files listed below.
src/pcre2_context.c )
src/pcre2_dfa_match.c )
src/pcre2_error.c )
+ src/pcre2_find_bracket.c )
src/pcre2_jit_compile.c )
src/pcre2_jit_match.c ) sources for the functions in the library,
src/pcre2_jit_misc.c ) and some internal functions that they use
@@ -832,4 +840,4 @@ The distribution should contain the files listed below.
Philip Hazel
Email local part: ph10
Email domain: cam.ac.uk
-Last updated: 24 April 2015
+Last updated: 16 October 2015
diff --git a/pcre2-10.20/RunGrepTest b/pcre2-10.21/RunGrepTest
index f7db29e6..67d672ba 100755
--- a/pcre2-10.20/RunGrepTest
+++ b/pcre2-10.21/RunGrepTest
@@ -19,12 +19,18 @@ unset cp ls mv rm
builddir=`pwd`
pcre2grep=$builddir/pcre2grep
+pcre2test=$builddir/pcre2test
if [ ! -x $pcre2grep ] ; then
echo "** $pcre2grep does not exist or is not execuatble."
exit 1
fi
+if [ ! -x $pcre2test ] ; then
+ echo "** $pcre2test does not exist or is not execuatble."
+ exit 1
+fi
+
valgrind=
while [ $# -gt 0 ] ; do
case $1 in
@@ -34,7 +40,6 @@ while [ $# -gt 0 ] ; do
shift
done
-echo " "
pcre2grep_version=`$pcre2grep -V`
if [ "$valgrind" = "" ] ; then
echo "Testing $pcre2grep_version"
@@ -69,14 +74,22 @@ fi
# Check for the availability of UTF-8 support
-./pcre2test -C unicode >/dev/null
+$pcre2test -C unicode >/dev/null
utf8=$?
+# Check default newline convention. If it does not include LF, force LF.
+
+nl=`$pcre2test -C newline`
+if [ "$nl" != "LF" -a "$nl" != "ANY" -a "$nl" != "ANYCRLF" ]; then
+ pcre2grep="$pcre2grep -N LF"
+ echo "Default newline setting forced to LF"
+fi
+
# ------ Function to run and check a special pcre2grep arguments test -------
checkspecial()
{
- $valgrind ./pcre2grep $1 >>testtrygrep 2>&1
+ $valgrind $pcre2grep $1 >>testtrygrep 2>&1
if [ $? -ne $2 ] ; then
echo "** pcre2grep $1 failed - check testtrygrep"
exit 1
@@ -530,6 +543,14 @@ echo "aaaaa" >>testtemp1grep
(cd $srcdir; $valgrind $pcre2grep --line-offsets '(?<=\Ka)' $builddir/testtemp1grep) >>testtrygrep 2>&1
echo "RC=$?" >>testtrygrep
+echo "---------------------------- Test 108 ------------------------------" >>testtrygrep
+(cd $srcdir; $valgrind $pcre2grep -lq PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtrygrep
+echo "RC=$?" >>testtrygrep
+
+echo "---------------------------- Test 109 -----------------------------" >>testtrygrep
+(cd $srcdir; $valgrind $pcre2grep -cq lazy ./testdata/grepinput*) >>testtrygrep
+echo "RC=$?" >>testtrygrep
+
# Now compare the results.
$cf $srcdir/testdata/grepoutput testtrygrep
diff --git a/pcre2-10.20/RunTest b/pcre2-10.21/RunTest
index c4d659c7..36dc638e 100755
--- a/pcre2-10.20/RunTest
+++ b/pcre2-10.21/RunTest
@@ -33,6 +33,10 @@
# For backwards compatibility, -nojit, -valgrind, -valgrind-log, and -sim may
# be given without the leading "-" character.
#
+# When PCRE2 is compiled by clang with -fsanitize arguments, some tests need
+# very much more stack than normal. In environments where the stack can be
+# set at runtime, -bigstack sets a gigantic stack.
+#
# There are two special cases where only one argument is allowed:
#
# If the first and only argument is "ebcdic", the script runs the special
@@ -64,13 +68,17 @@ title10="Test 10: Specials for the 8-bit library with UTF-8 and UCP support"
title11="Test 11: Specials for the basic 16-bit and 32-bit libraries"
title12="Test 12: Specials for the 16-bit and 32-bit libraries UTF and UCP support"
title13="Test 13: DFA specials for the basic 16-bit and 32-bit libraries"
-title14="Test 14: Non-JIT limits and other non-JIT tests"
-title15="Test 15: JIT-specific features when JIT is not available"
-title16="Test 16: JIT-specific features when JIT is available"
-title17="Test 17: Tests of the POSIX interface, excluding UTF/UCP"
-title18="Test 18: Tests of the POSIX interface with UTF/UCP"
-title19="Test 19: Serialization tests"
-maxtest=18
+title14="Test 14: DFA specials for UTF and UCP support"
+title15="Test 15: Non-JIT limits and other non-JIT tests"
+title16="Test 16: JIT-specific features when JIT is not available"
+title17="Test 17: JIT-specific features when JIT is available"
+title18="Test 18: Tests of the POSIX interface, excluding UTF/UCP"
+title19="Test 19: Tests of the POSIX interface with UTF/UCP"
+title20="Test 20: Serialization tests"
+title21="Test 21: \C tests without UTF (supported for DFA matching)"
+title22="Test 22: \C tests with UTF (not supported for DFA matching)"
+title23="Test 23: \C disabled test"
+maxtest=23
if [ $# -eq 1 -a "$1" = "list" ]; then
echo $title0
@@ -93,6 +101,10 @@ if [ $# -eq 1 -a "$1" = "list" ]; then
echo $title17
echo $title18
echo $title19
+ echo $title20
+ echo $title21
+ echo $title22
+ echo $title23
exit 0
fi
@@ -151,7 +163,7 @@ checkresult()
checkspecial()
{
- $valgrind ./pcre2test $1 >>testtry
+ $valgrind $vjs ./pcre2test $1 >>testtry
if [ $? -ne 0 ] ; then
echo "** pcre2test $1 failed - check testtry"
exit 1
@@ -184,9 +196,11 @@ arg8=
arg16=
arg32=
nojit=
+bigstack=
sim=
skip=
valgrind=
+vjs=
# This is in case the caller has set aliases (as I do - PH)
unset cp ls mv rm
@@ -214,6 +228,10 @@ do16=no
do17=no
do18=no
do19=no
+do20=no
+do21=no
+do22=no
+do23=no
while [ $# -gt 0 ] ; do
case $1 in
@@ -237,9 +255,14 @@ while [ $# -gt 0 ] ; do
17) do17=yes;;
18) do18=yes;;
19) do19=yes;;
+ 20) do20=yes;;
+ 21) do21=yes;;
+ 22) do22=yes;;
+ 23) do23=yes;;
-8) arg8=yes;;
-16) arg16=yes;;
-32) arg32=yes;;
+ bigstack|-bigstack) bigstack=yes;;
nojit|-nojit) nojit=yes;;
sim|-sim) shift; sim=$1;;
valgrind|-valgrind) valgrind="valgrind --tool=memcheck -q --smc-check=all";;
@@ -287,13 +310,22 @@ fi
# If it is possible to set the system stack size, arrange to set a value for
# test 2, which needs more than the even the Linux default when PCRE2 has been
-# compiled with -fsanitize=address.
+# compiled by gcc with -fsanitize=address. When the compiler is clang, sanitize
+# options require an even bigger stack for test 2, and an increased stack for
+# some of the other tests.
$sim ./pcre2test -S 1 /dev/null /dev/null
if [ $? -eq 0 ] ; then
- test2stack="-S 16"
+ if [ "$bigstack" = "" ] ; then
+ test2stack="-S 16"
+ defaultstack=""
+ else
+ test2stack="-S 1024"
+ defaultstack="-S 64"
+ fi
else
test2stack=""
+ defaultstack=""
fi
# All of 8-bit, 16-bit, and 32-bit character strings may be supported, but only
@@ -306,6 +338,11 @@ support16=$?
$sim ./pcre2test -C pcre2-32 >/dev/null
support32=$?
+# \C may be disabled
+
+$sim ./pcre2test -C backslash-C >/dev/null
+supportBSC=$?
+
# Initialize all bitsizes skipped
test8=skip
@@ -358,11 +395,18 @@ fi
$sim ./pcre2test -C unicode >/dev/null
utf=$?
+# When JIT is used with valgrind, we need to set up valgrind suppressions as
+# otherwise there are a lot of false positive valgrind reports when the
+# the hardware supports SSE2.
+
jitopt=
$sim ./pcre2test -C jit >/dev/null
jit=$?
if [ $jit -ne 0 -a "$nojit" != "yes" ] ; then
jitopt=-jit
+ if [ "$valgrind" != "" ] ; then
+ vjs="--suppressions=$testdata/valgrind-jit.supp"
+ fi
fi
# If no specific tests were requested, select all. Those that are not
@@ -372,7 +416,8 @@ if [ $do0 = no -a $do1 = no -a $do2 = no -a $do3 = no -a \
$do4 = no -a $do5 = no -a $do6 = no -a $do7 = no -a \
$do8 = no -a $do9 = no -a $do10 = no -a $do11 = no -a \
$do12 = no -a $do13 = no -a $do14 = no -a $do15 = no -a \
- $do16 = no -a $do17 = no -a $do18 = no -a $do19 = no \
+ $do16 = no -a $do17 = no -a $do18 = no -a $do19 = no -a \
+ $do20 = no -a $do21 = no -a $do22 = no -a $do23 = no \
]; then
do0=yes
do1=yes
@@ -394,6 +439,10 @@ if [ $do0 = no -a $do1 = no -a $do2 = no -a $do3 = no -a \
do17=yes
do18=yes
do19=yes
+ do20=yes
+ do21=yes
+ do22=yes
+ do23=yes
fi
# Handle any explicit skips at this stage, so that an argument list may consist
@@ -438,7 +487,7 @@ for bmode in "$test8" "$test16" "$test32"; do
if [ $do1 = yes ] ; then
echo $title1
for opt in "" $jitopt; do
- $sim $valgrind ./pcre2test -q $bmode $opt $testdata/testinput1 testtry
+ $sim $valgrind ${opt:+$vjs} ./pcre2test -q $defaultstack $bmode $opt $testdata/testinput1 testtry
checkresult $? 1 "$opt"
done
fi
@@ -448,7 +497,7 @@ for bmode in "$test8" "$test16" "$test32"; do
if [ $do2 = yes ] ; then
echo $title2 "(excluding UTF-$bits)"
for opt in "" $jitopt; do
- $sim $valgrind ./pcre2test -q $test2stack $bmode $opt $testdata/testinput2 testtry
+ $sim $valgrind ${opt:+$vjs} ./pcre2test -q $test2stack $bmode $opt $testdata/testinput2 testtry
if [ $? = 0 ] ; then
checkresult $? 2 "$opt"
else
@@ -508,7 +557,7 @@ for bmode in "$test8" "$test16" "$test32"; do
if [ "$locale" != "" ] ; then
echo $title3 "(using '$locale' locale)"
for opt in "" $jitopt; do
- $sim $valgrind ./pcre2test -q $bmode $opt $infile testtry
+ $sim $valgrind ${opt:+$vjs} ./pcre2test -q $defaultstack $bmode $opt $infile testtry
if [ $? = 0 ] ; then
case "$opt" in
-jit) with=" with JIT";;
@@ -545,7 +594,7 @@ for bmode in "$test8" "$test16" "$test32"; do
echo " Skipped because UTF-$bits support is not available"
else
for opt in "" $jitopt; do
- $sim $valgrind ./pcre2test -q $bmode $opt $testdata/testinput4 testtry
+ $sim $valgrind ${opt:+$vjs} ./pcre2test -q $defaultstack $bmode $opt $testdata/testinput4 testtry
checkresult $? 4 "$opt"
done
fi
@@ -557,7 +606,7 @@ for bmode in "$test8" "$test16" "$test32"; do
echo " Skipped because UTF-$bits support is not available"
else
for opt in "" $jitopt; do
- $sim $valgrind ./pcre2test -q $bmode $opt $testdata/testinput5 testtry
+ $sim $valgrind ${opt:+$vjs} ./pcre2test -q $defaultstack $bmode $opt $testdata/testinput5 testtry
checkresult $? 5 "$opt"
done
fi
@@ -567,7 +616,7 @@ for bmode in "$test8" "$test16" "$test32"; do
if [ $do6 = yes ] ; then
echo $title6
- $sim $valgrind ./pcre2test -q $bmode $testdata/testinput6 testtry
+ $sim $valgrind ./pcre2test -q $defaultstack $bmode $testdata/testinput6 testtry
checkresult $? 6 ""
fi
@@ -576,28 +625,26 @@ for bmode in "$test8" "$test16" "$test32"; do
if [ $utf -eq 0 ] ; then
echo " Skipped because UTF-$bits support is not available"
else
- $sim $valgrind ./pcre2test -q $bmode $opt $testdata/testinput7 testtry
+ $sim $valgrind ./pcre2test -q $defaultstack $bmode $opt $testdata/testinput7 testtry
checkresult $? 7 ""
fi
fi
# Test of internal offsets and code sizes. This test is run only when there
- # is UTF/UCP support and the link size is 2. The actual tests are
- # mostly the same as in some of the above, but in this test we inspect some
- # offsets and sizes that require a known link size. This is a doublecheck for
- # the maintainer, just in case something changes unexpectely. The output from
- # this test is different in 8-bit, 16-bit, and 32-bit modes, so there are
- # mode-specific output files.
+ # is UTF/UCP support. The actual tests are mostly the same as in some of the
+ # above, but in this test we inspect some offsets and sizes. This is a
+ # doublecheck for the maintainer, just in case something changes unexpectely.
+ # The output from this test is different in 8-bit, 16-bit, and 32-bit modes
+ # and for different link sizes, so there are different output files for each
+ # mode and link size.
if [ $do8 = yes ] ; then
echo $title8
- if [ $link_size -ne 2 ] ; then
- echo " Skipped because link size is not 2"
- elif [ $utf -eq 0 ] ; then
+ if [ $utf -eq 0 ] ; then
echo " Skipped because UTF-$bits support is not available"
else
- $sim $valgrind ./pcre2test -q $bmode $testdata/testinput8 testtry
- checkresult $? 8-$bits ""
+ $sim $valgrind ./pcre2test -q $defaultstack $bmode $testdata/testinput8 testtry
+ checkresult $? 8-$bits-$link_size ""
fi
fi
@@ -609,7 +656,7 @@ for bmode in "$test8" "$test16" "$test32"; do
echo " Skipped when running 16/32-bit tests"
else
for opt in "" $jitopt; do
- $sim $valgrind ./pcre2test -q $bmode $opt $testdata/testinput9 testtry
+ $sim $valgrind ${opt:+$vjs} ./pcre2test -q $defaultstack $bmode $opt $testdata/testinput9 testtry
checkresult $? 9 "$opt"
done
fi
@@ -625,7 +672,7 @@ for bmode in "$test8" "$test16" "$test32"; do
echo " Skipped because UTF-$bits support is not available"
else
for opt in "" $jitopt; do
- $sim $valgrind ./pcre2test -q $bmode $opt $testdata/testinput10 testtry
+ $sim $valgrind ${opt:+$vjs} ./pcre2test -q $defaultstack $bmode $opt $testdata/testinput10 testtry
checkresult $? 10 "$opt"
done
fi
@@ -639,7 +686,7 @@ for bmode in "$test8" "$test16" "$test32"; do
echo " Skipped when running 8-bit tests"
else
for opt in "" $jitopt; do
- $sim $valgrind ./pcre2test -q $bmode $opt $testdata/testinput11 testtry
+ $sim $valgrind ${opt:+$vjs} ./pcre2test -q $defaultstack $bmode $opt $testdata/testinput11 testtry
checkresult $? 11-$bits "$opt"
done
fi
@@ -656,7 +703,7 @@ for bmode in "$test8" "$test16" "$test32"; do
echo " Skipped because UTF-$bits support is not available"
else
for opt in "" $jitopt; do
- $sim $valgrind ./pcre2test -q $bmode $opt $testdata/testinput12 testtry
+ $sim $valgrind ${opt:+$vjs} ./pcre2test -q $defaultstack $bmode $opt $testdata/testinput12 testtry
checkresult $? 12-$bits "$opt"
done
fi
@@ -669,75 +716,129 @@ for bmode in "$test8" "$test16" "$test32"; do
if [ "$bits" = "8" ] ; then
echo " Skipped when running 8-bit tests"
else
- $sim $valgrind ./pcre2test -q $bmode $testdata/testinput13 testtry
+ $sim $valgrind ./pcre2test -q $defaultstack $bmode $testdata/testinput13 testtry
checkresult $? 13 ""
fi
fi
- # Test non-JIT match and recursion limits
+ # Tests for DFA UTF and UCP features. Output is different for the different widths.
if [ $do14 = yes ] ; then
echo $title14
- $sim $valgrind ./pcre2test -q $bmode $testdata/testinput14 testtry
- checkresult $? 14 ""
+ if [ $utf -eq 0 ] ; then
+ echo " Skipped because UTF-$bits support is not available"
+ else
+ $sim $valgrind ./pcre2test -q $defaultstack $bmode $opt $testdata/testinput14 testtry
+ checkresult $? 14-$bits ""
+ fi
fi
- # Test JIT-specific features when JIT is not available
+ # Test non-JIT match and recursion limits
if [ $do15 = yes ] ; then
echo $title15
+ $sim $valgrind ./pcre2test -q $defaultstack $bmode $testdata/testinput15 testtry
+ checkresult $? 15 ""
+ fi
+
+ # Test JIT-specific features when JIT is not available
+
+ if [ $do16 = yes ] ; then
+ echo $title16
if [ $jit -ne 0 ] ; then
echo " Skipped because JIT is available"
else
- $sim $valgrind ./pcre2test -q $bmode $testdata/testinput15 testtry
- checkresult $? 15 ""
+ $sim $valgrind ./pcre2test -q $defaultstack $bmode $testdata/testinput16 testtry
+ checkresult $? 16 ""
fi
fi
# Test JIT-specific features when JIT is available
- if [ $do16 = yes ] ; then
- echo $title16
+ if [ $do17 = yes ] ; then
+ echo $title17
if [ $jit -eq 0 -o "$nojit" = "yes" ] ; then
echo " Skipped because JIT is not available or nojit was specified"
else
- $sim $valgrind ./pcre2test -q $bmode $testdata/testinput16 testtry
- checkresult $? 16 ""
+ $sim $valgrind $vjs ./pcre2test -q $defaultstack $bmode $testdata/testinput17 testtry
+ checkresult $? 17 ""
fi
fi
# Tests for the POSIX interface without UTF/UCP (8-bit only)
- if [ $do17 = yes ] ; then
- echo $title17
+ if [ $do18 = yes ] ; then
+ echo $title18
if [ "$bits" = "16" -o "$bits" = "32" ] ; then
echo " Skipped when running 16/32-bit tests"
else
- $sim $valgrind ./pcre2test -q $bmode $testdata/testinput17 testtry
- checkresult $? 17 ""
+ $sim $valgrind ./pcre2test -q $defaultstack $bmode $testdata/testinput18 testtry
+ checkresult $? 18 ""
fi
fi
# Tests for the POSIX interface with UTF/UCP (8-bit only)
- if [ $do18 = yes ] ; then
- echo $title18
+ if [ $do19 = yes ] ; then
+ echo $title19
if [ "$bits" = "16" -o "$bits" = "32" ] ; then
echo " Skipped when running 16/32-bit tests"
elif [ $utf -eq 0 ] ; then
echo " Skipped because UTF-$bits support is not available"
else
- $sim $valgrind ./pcre2test -q $bmode $testdata/testinput18 testtry
- checkresult $? 18 ""
+ $sim $valgrind ./pcre2test -q $defaultstack $bmode $testdata/testinput19 testtry
+ checkresult $? 19 ""
fi
fi
# Serialization tests
- if [ $do19 = yes ] ; then
- echo $title19
- $sim $valgrind ./pcre2test -q $bmode $testdata/testinput19 testtry
- checkresult $? 19 ""
+ if [ $do20 = yes ] ; then
+ echo $title20
+ $sim $valgrind ./pcre2test -q $defaultstack $bmode $testdata/testinput20 testtry
+ checkresult $? 20 ""
+ fi
+
+ # \C tests without UTF - DFA matching is supported
+
+ if [ "$do21" = yes ] ; then
+ echo $title21
+ if [ $supportBSC -eq 0 ] ; then
+ echo " Skipped because \C is disabled"
+ else
+ for opt in "" $jitopt -dfa; do
+ $sim $valgrind ${opt:+$vjs} ./pcre2test -q $defaultstack $bmode $opt $testdata/testinput21 testtry
+ checkresult $? 21 "$opt"
+ done
+ fi
+ fi
+
+ # \C tests with UTF - DFA matching is not supported for \C in UTF mode
+
+ if [ "$do22" = yes ] ; then
+ echo $title22
+ if [ $supportBSC -eq 0 ] ; then
+ echo " Skipped because \C is disabled"
+ elif [ $utf -eq 0 ] ; then
+ echo " Skipped because UTF-$bits support is not available"
+ else
+ for opt in "" $jitopt; do
+ $sim $valgrind ${opt:+$vjs} ./pcre2test -q $defaultstack $bmode $opt $testdata/testinput22 testtry
+ checkresult $? 22-$bits "$opt"
+ done
+ fi
+ fi
+
+ # Test when \C is disabled
+
+ if [ "$do23" = yes ] ; then
+ echo $title23
+ if [ $supportBSC -ne 0 ] ; then
+ echo " Skipped because \C is not disabled"
+ else
+ $sim $valgrind ${opt:+$vjs} ./pcre2test -q $defaultstack $bmode $opt $testdata/testinput23 testtry
+ checkresult $? 23 ""
+ fi
fi
# End of loop for 8/16/32-bit tests
diff --git a/pcre2-10.20/RunTest.bat b/pcre2-10.21/RunTest.bat
index 45bdfcbc..ce9d5b57 100644
--- a/pcre2-10.20/RunTest.bat
+++ b/pcre2-10.21/RunTest.bat
@@ -13,17 +13,18 @@
@rem line. Added argument validation and added error reporting.
@rem
@rem Sheri Pierce added logic to skip feature dependent tests
-@rem tests 4 5 9 15 and 18 require utf support
-@rem tests 6 7 10 16 and 19 require ucp support
-@rem 11 requires ucp and link size 2
-@rem 12 requires presence of jit support
-@rem 13 requires absence of jit support
+@rem tests 4 5 7 10 12 14 19 and 22 require Unicode support
+@rem 8 requires Unicode and link size 2
+@rem 16 requires absence of jit support
+@rem 17 requires presence of jit support
@rem Sheri P also added override tests for study and jit testing
@rem Zoltan Herczeg added libpcre16 support
@rem Zoltan Herczeg added libpcre32 support
@rem -------------------------------------------------------------------
@rem
@rem The file was converted for PCRE2 by PH, February 2015.
+@rem Updated for new test 14 (moving others up a number), August 2015.
+@rem Tidied and updated for new tests 21, 22, 23 by PH, October 2015.
setlocal enabledelayedexpansion
@@ -64,6 +65,8 @@ set support32=%ERRORLEVEL%
set unicode=%ERRORLEVEL%
%pcre2test% -C jit >NUL
set jit=%ERRORLEVEL%
+%pcre2test% -C backslash-C >NUL
+set supportBSC=%ERRORLEVEL%
if %support8% EQU 1 (
if not exist testout8 md testout8
@@ -99,18 +102,22 @@ set do16=no
set do17=no
set do18=no
set do19=no
+set do20=no
+set do21=no
+set do22=no
+set do23=no
set all=yes
for %%a in (%*) do (
set valid=no
- for %%v in (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19) do if %%v == %%a set valid=yes
+ for %%v in (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23) do if %%v == %%a set valid=yes
if "!valid!" == "yes" (
set do%%a=yes
set all=no
) else (
echo Invalid test number - %%a!
echo Usage %0 [ test_number ] ...
- echo Where test_number is one or more optional test numbers 1 through 19, default is all tests.
+ echo Where test_number is one or more optional test numbers 1 through 23, default is all tests.
exit /b 1
)
)
@@ -136,6 +143,10 @@ if "%all%" == "yes" (
set do17=yes
set do18=yes
set do19=yes
+ set do20=yes
+ set do21=yes
+ set do22=yes
+ set do23=yes
)
@echo RunTest.bat's pcre2test output is written to newly created subfolders
@@ -183,6 +194,10 @@ if "%do16%" == "yes" call :do16
if "%do17%" == "yes" call :do17
if "%do18%" == "yes" call :do18
if "%do19%" == "yes" call :do19
+if "%do20%" == "yes" call :do20
+if "%do21%" == "yes" call :do21
+if "%do22%" == "yes" call :do22
+if "%do23%" == "yes" call :do23
:modeSkip
if "%mode%" == "" (
set mode=-16
@@ -253,6 +268,9 @@ if [%1]==[11] (
if [%1]==[12] (
set type=-%bits%
)
+if [%1]==[14] (
+ set type=-%bits%
+)
fc /n %srcdir%\testdata\%testoutput%%type% %2%bits%\%testoutput% >NUL
@@ -316,7 +334,7 @@ if %unicode% EQU 0 (
goto :eof
:do6
- call :runsub 6 testout "DFA matching main non-UTF, non-UCP functionality" -q -dfa
+ call :runsub 6 testout "DFA matching main non-UTF, non-UCP functionality" -q
goto :eof
:do7
@@ -324,7 +342,7 @@ if %unicode% EQU 0 (
echo Test 7 Skipped due to absence of Unicode support.
goto :eof
)
- call :runsub 7 testout "DFA matching with UTF-%bits% and Unicode property support" -q -dfa
+ call :runsub 7 testout "DFA matching with UTF-%bits% and Unicode property support" -q
goto :eof
:do8
@@ -388,55 +406,98 @@ if %bits% EQU 8 (
echo Test 13 Skipped when running 8-bit tests.
goto :eof
)
- call :runsub 13 testout "DFA specials for the basic 16/32-bit library" -q -dfa
+ call :runsub 13 testout "DFA specials for the basic 16/32-bit library" -q
goto :eof
:do14
-call :runsub 14 testout "Non-JIT limits and other non_JIT tests" -q
-goto :eof
+if %unicode% EQU 0 (
+ echo Test 14 Skipped due to absence of Unicode support.
+ goto :eof
+)
+ call :runsub 14 testout "DFA specials for UTF and UCP support" -q
+ goto :eof
:do15
+call :runsub 15 testout "Non-JIT limits and other non_JIT tests" -q
+goto :eof
+
+:do16
if %jit% EQU 1 (
- echo Test 15 Skipped due to presence of JIT support.
+ echo Test 16 Skipped due to presence of JIT support.
goto :eof
)
- call :runsub 15 testout "JIT-specific features when JIT is not available" -q
+ call :runsub 16 testout "JIT-specific features when JIT is not available" -q
goto :eof
-:do16
+:do17
if %jit% EQU 0 (
- echo Test 16 Skipped due to absence of JIT support.
+ echo Test 17 Skipped due to absence of JIT support.
goto :eof
)
- call :runsub 16 testout "JIT-specific features when JIT is available" -q
+ call :runsub 17 testout "JIT-specific features when JIT is available" -q
goto :eof
-:do17
+:do18
if %bits% EQU 16 (
- echo Test 17 Skipped when running 16-bit tests.
+ echo Test 18 Skipped when running 16-bit tests.
goto :eof
)
if %bits% EQU 32 (
- echo Test 17 Skipped when running 32-bit tests.
+ echo Test 18 Skipped when running 32-bit tests.
goto :eof
)
- call :runsub 17 testout "POSIX interface, excluding UTF-8 and UCP" -q
+ call :runsub 18 testout "POSIX interface, excluding UTF-8 and UCP" -q
goto :eof
-:do18
+:do19
if %bits% EQU 16 (
- echo Test 18 Skipped when running 16-bit tests.
+ echo Test 19 Skipped when running 16-bit tests.
goto :eof
)
if %bits% EQU 32 (
- echo Test 18 Skipped when running 32-bit tests.
+ echo Test 19 Skipped when running 32-bit tests.
goto :eof
)
- call :runsub 1 testout "POSIX interface with UTF-8 and UCP" -q
+if %unicode% EQU 0 (
+ echo Test 19 Skipped due to absence of Unicode support.
+ goto :eof
+)
+ call :runsub 19 testout "POSIX interface with UTF-8 and UCP" -q
goto :eof
-:do19
-call :runsub 1 testout "Serialization tests" -q
+:do20
+call :runsub 20 testout "Serialization tests" -q
+goto :eof
+
+:do21
+if %supportBSC% EQU 0 (
+ echo Test 21 Skipped due to absence of backslash-C support.
+ goto :eof
+)
+ call :runsub 21 testout "Backslash-C tests without UTF" -q
+ call :runsub 21 testout "Backslash-C tests without UTF (DFA)" -q -dfa
+ if %jit% EQU 1 call :runsub 21 testoutjit "Test with JIT Override" -q -jit
+goto :eof
+
+:do22
+if %supportBSC% EQU 0 (
+ echo Test 22 Skipped due to absence of backslash-C support.
+ goto :eof
+)
+if %unicode% EQU 0 (
+ echo Test 22 Skipped due to absence of Unicode support.
+ goto :eof
+)
+ call :runsub 22 testout "Backslash-C tests with UTF" -q
+ if %jit% EQU 1 call :runsub 22 testoutjit "Test with JIT Override" -q -jit
+goto :eof
+
+:do23
+if %supportBSC% EQU 1 (
+ echo Test 23 Skipped due to presence of backslash-C support.
+ goto :eof
+)
+ call :runsub 23 testout "Backslash-C disabled test" -q
goto :eof
:conferror
diff --git a/pcre2-10.20/aclocal.m4 b/pcre2-10.21/aclocal.m4
index db6146ab..10c9cd1c 100644
--- a/pcre2-10.20/aclocal.m4
+++ b/pcre2-10.21/aclocal.m4
@@ -20,32 +20,63 @@ You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
-# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
-# serial 1 (pkg-config-0.24)
-#
-# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
+dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+dnl serial 11 (pkg-config-0.29)
+dnl
+dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+dnl 02111-1307, USA.
+dnl
+dnl As a special exception to the GNU General Public License, if you
+dnl distribute this file as part of a program that contains a
+dnl configuration script generated by Autoconf, you may include it under
+dnl the same distribution terms that you use for the rest of that
+dnl program.
+
+dnl PKG_PREREQ(MIN-VERSION)
+dnl -----------------------
+dnl Since: 0.29
+dnl
+dnl Verify that the version of the pkg-config macros are at least
+dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
+dnl installed version of pkg-config, this checks the developer's version
+dnl of pkg.m4 when generating configure.
+dnl
+dnl To ensure that this macro is defined, also add:
+dnl m4_ifndef([PKG_PREREQ],
+dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
+dnl
+dnl See the "Since" comment for each macro you use to see what version
+dnl of the macros you require.
+m4_defun([PKG_PREREQ],
+[m4_define([PKG_MACROS_VERSION], [0.29])
+m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
+ [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
+])dnl PKG_PREREQ
+
+dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
+dnl ----------------------------------
+dnl Since: 0.16
+dnl
+dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
+dnl first found in the path. Checks that the version of pkg-config found
+dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
+dnl used since that's the first version where most current features of
+dnl pkg-config existed.
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
@@ -67,18 +98,19 @@ if test -n "$PKG_CONFIG"; then
PKG_CONFIG=""
fi
fi[]dnl
-])# PKG_PROG_PKG_CONFIG
+])dnl PKG_PROG_PKG_CONFIG
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists. Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-# only at the first occurence in configure.ac, so if the first place
-# it's called might be skipped (such as if it is within an "if", you
-# have to call PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
+dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------------------------------
+dnl Since: 0.18
+dnl
+dnl Check to see whether a particular set of modules exists. Similar to
+dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
+dnl
+dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+dnl only at the first occurence in configure.ac, so if the first place
+dnl it's called might be skipped (such as if it is within an "if", you
+dnl have to call PKG_CHECK_EXISTS manually
AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \
@@ -88,8 +120,10 @@ m4_ifvaln([$3], [else
$3])dnl
fi])
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
+dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+dnl ---------------------------------------------
+dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
+dnl pkg_failed based on the result.
m4_define([_PKG_CONFIG],
[if test -n "$$1"; then
pkg_cv_[]$1="$$1"
@@ -101,10 +135,11 @@ m4_define([_PKG_CONFIG],
else
pkg_failed=untried
fi[]dnl
-])# _PKG_CONFIG
+])dnl _PKG_CONFIG
-# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
+dnl _PKG_SHORT_ERRORS_SUPPORTED
+dnl ---------------------------
+dnl Internal check to see if pkg-config supports short errors.
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -112,19 +147,17 @@ if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
else
_pkg_short_errors_supported=no
fi[]dnl
-])# _PKG_SHORT_ERRORS_SUPPORTED
+])dnl _PKG_SHORT_ERRORS_SUPPORTED
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
-#
-#
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
-#
-#
-# --------------------------------------------------------------
+dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl [ACTION-IF-NOT-FOUND])
+dnl --------------------------------------------------------------
+dnl Since: 0.4.0
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
+dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
@@ -178,16 +211,40 @@ else
AC_MSG_RESULT([yes])
$3
fi[]dnl
-])# PKG_CHECK_MODULES
+])dnl PKG_CHECK_MODULES
-# PKG_INSTALLDIR(DIRECTORY)
-# -------------------------
-# Substitutes the variable pkgconfigdir as the location where a module
-# should install pkg-config .pc files. By default the directory is
-# $libdir/pkgconfig, but the default can be changed by passing
-# DIRECTORY. The user can override through the --with-pkgconfigdir
-# parameter.
+dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl [ACTION-IF-NOT-FOUND])
+dnl ---------------------------------------------------------------------
+dnl Since: 0.29
+dnl
+dnl Checks for existence of MODULES and gathers its build flags with
+dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
+dnl and VARIABLE-PREFIX_LIBS from --libs.
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
+dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
+dnl configure.ac.
+AC_DEFUN([PKG_CHECK_MODULES_STATIC],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+_save_PKG_CONFIG=$PKG_CONFIG
+PKG_CONFIG="$PKG_CONFIG --static"
+PKG_CHECK_MODULES($@)
+PKG_CONFIG=$_save_PKG_CONFIG[]dnl
+])dnl PKG_CHECK_MODULES_STATIC
+
+
+dnl PKG_INSTALLDIR([DIRECTORY])
+dnl -------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable pkgconfigdir as the location where a module
+dnl should install pkg-config .pc files. By default the directory is
+dnl $libdir/pkgconfig, but the default can be changed by passing
+dnl DIRECTORY. The user can override through the --with-pkgconfigdir
+dnl parameter.
AC_DEFUN([PKG_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
m4_pushdef([pkg_description],
@@ -198,16 +255,18 @@ AC_ARG_WITH([pkgconfigdir],
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
-]) dnl PKG_INSTALLDIR
+])dnl PKG_INSTALLDIR
-# PKG_NOARCH_INSTALLDIR(DIRECTORY)
-# -------------------------
-# Substitutes the variable noarch_pkgconfigdir as the location where a
-# module should install arch-independent pkg-config .pc files. By
-# default the directory is $datadir/pkgconfig, but the default can be
-# changed by passing DIRECTORY. The user can override through the
-# --with-noarch-pkgconfigdir parameter.
+dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
+dnl --------------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable noarch_pkgconfigdir as the location where a
+dnl module should install arch-independent pkg-config .pc files. By
+dnl default the directory is $datadir/pkgconfig, but the default can be
+dnl changed by passing DIRECTORY. The user can override through the
+dnl --with-noarch-pkgconfigdir parameter.
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
m4_pushdef([pkg_description],
@@ -218,13 +277,15 @@ AC_ARG_WITH([noarch-pkgconfigdir],
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
-]) dnl PKG_NOARCH_INSTALLDIR
+])dnl PKG_NOARCH_INSTALLDIR
-# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
-# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-# -------------------------------------------
-# Retrieves the value of the pkg-config variable for the given module.
+dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------
+dnl Since: 0.28
+dnl
+dnl Retrieves the value of the pkg-config variable for the given module.
AC_DEFUN([PKG_CHECK_VAR],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
@@ -233,7 +294,7 @@ _PKG_CONFIG([$1], [variable="][$3]["], [$2])
AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl
-])# PKG_CHECK_VAR
+])dnl PKG_CHECK_VAR
# Copyright (C) 2002-2014 Free Software Foundation, Inc.
#
@@ -920,42 +981,6 @@ fi
rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])])
-# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
-# From Jim Meyering
-
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# AM_MAINTAINER_MODE([DEFAULT-MODE])
-# ----------------------------------
-# Control maintainer-specific portions of Makefiles.
-# Default is to disable them, unless 'enable' is passed literally.
-# For symmetry, 'disable' may be passed as well. Anyway, the user
-# can override the default with the --enable/--disable switch.
-AC_DEFUN([AM_MAINTAINER_MODE],
-[m4_case(m4_default([$1], [disable]),
- [enable], [m4_define([am_maintainer_other], [disable])],
- [disable], [m4_define([am_maintainer_other], [enable])],
- [m4_define([am_maintainer_other], [enable])
- m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
-AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode's default is 'disable' unless 'enable' is passed
- AC_ARG_ENABLE([maintainer-mode],
- [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
- am_maintainer_other[ make rules and dependencies not useful
- (and sometimes confusing) to the casual installer])],
- [USE_MAINTAINER_MODE=$enableval],
- [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
- AC_MSG_RESULT([$USE_MAINTAINER_MODE])
- AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST([MAINT])dnl
-]
-)
-
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001-2014 Free Software Foundation, Inc.
diff --git a/pcre2-10.20/ar-lib b/pcre2-10.21/ar-lib
index 463b9ec0..463b9ec0 100755
--- a/pcre2-10.20/ar-lib
+++ b/pcre2-10.21/ar-lib
diff --git a/pcre2-10.20/cmake/COPYING-CMAKE-SCRIPTS b/pcre2-10.21/cmake/COPYING-CMAKE-SCRIPTS
index 4b417765..4b417765 100644
--- a/pcre2-10.20/cmake/COPYING-CMAKE-SCRIPTS
+++ b/pcre2-10.21/cmake/COPYING-CMAKE-SCRIPTS
diff --git a/pcre2-10.20/cmake/FindEditline.cmake b/pcre2-10.21/cmake/FindEditline.cmake
index 2d0b7cc5..2d0b7cc5 100644
--- a/pcre2-10.20/cmake/FindEditline.cmake
+++ b/pcre2-10.21/cmake/FindEditline.cmake
diff --git a/pcre2-10.20/cmake/FindPackageHandleStandardArgs.cmake b/pcre2-10.21/cmake/FindPackageHandleStandardArgs.cmake
index 151d8125..151d8125 100644
--- a/pcre2-10.20/cmake/FindPackageHandleStandardArgs.cmake
+++ b/pcre2-10.21/cmake/FindPackageHandleStandardArgs.cmake
diff --git a/pcre2-10.20/cmake/FindReadline.cmake b/pcre2-10.21/cmake/FindReadline.cmake
index 1d4cc558..1d4cc558 100644
--- a/pcre2-10.20/cmake/FindReadline.cmake
+++ b/pcre2-10.21/cmake/FindReadline.cmake
diff --git a/pcre2-10.20/compile b/pcre2-10.21/compile
index a85b723c..a85b723c 100755
--- a/pcre2-10.20/compile
+++ b/pcre2-10.21/compile
diff --git a/pcre2-10.20/config-cmake.h.in b/pcre2-10.21/config-cmake.h.in
index b74a7aaa..0cfd8b13 100644
--- a/pcre2-10.20/config-cmake.h.in
+++ b/pcre2-10.21/config-cmake.h.in
@@ -33,6 +33,7 @@
#cmakedefine EBCDIC 1
#cmakedefine EBCDIC_NL25 1
#cmakedefine HEAP_MATCH_RECURSE 1
+#cmakedefine NEVER_BACKSLASH_C 1
#define LINK_SIZE @PCRE2_LINK_SIZE@
#define MATCH_LIMIT @PCRE2_MATCH_LIMIT@
diff --git a/pcre2-10.20/config.guess b/pcre2-10.21/config.guess
index 6c32c864..6c32c864 100755
--- a/pcre2-10.20/config.guess
+++ b/pcre2-10.21/config.guess
diff --git a/pcre2-10.20/config.sub b/pcre2-10.21/config.sub
index 7ffe3737..7ffe3737 100755
--- a/pcre2-10.20/config.sub
+++ b/pcre2-10.21/config.sub
diff --git a/pcre2-10.20/configure b/pcre2-10.21/configure
index 21e553b3..e9f9e374 100755
--- a/pcre2-10.20/configure
+++ b/pcre2-10.21/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for PCRE2 10.20.
+# Generated by GNU Autoconf 2.69 for PCRE2 10.21.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='PCRE2'
PACKAGE_TARNAME='pcre2'
-PACKAGE_VERSION='10.20'
-PACKAGE_STRING='PCRE2 10.20'
+PACKAGE_VERSION='10.21'
+PACKAGE_STRING='PCRE2 10.21'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -734,9 +734,6 @@ CFLAGS
CC
ac_ct_AR
AR
-MAINT
-MAINTAINER_MODE_FALSE
-MAINTAINER_MODE_TRUE
AM_BACKSLASH
AM_DEFAULT_VERBOSITY
AM_DEFAULT_V
@@ -806,7 +803,6 @@ ac_subst_files=''
ac_user_opts='
enable_option_checking
enable_silent_rules
-enable_maintainer_mode
enable_dependency_tracking
enable_shared
enable_static
@@ -833,6 +829,7 @@ enable_newline_is_crlf
enable_newline_is_anycrlf
enable_newline_is_any
enable_bsr_anycrlf
+enable_never_backslash_C
enable_ebcdic
enable_ebcdic_nl25
enable_stack_for_recursion
@@ -1405,7 +1402,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures PCRE2 10.20 to adapt to many kinds of systems.
+\`configure' configures PCRE2 10.21 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1475,7 +1472,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of PCRE2 10.20:";;
+ short | recursive ) echo "Configuration of PCRE2 10.21:";;
esac
cat <<\_ACEOF
@@ -1485,9 +1482,6 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-silent-rules less verbose build output (undo: "make V=1")
--disable-silent-rules verbose build output (undo: "make V=0")
- --enable-maintainer-mode
- enable make rules and dependencies not useful (and
- sometimes confusing) to the casual installer
--enable-dependency-tracking
do not reject slow dependency extractors
--disable-dependency-tracking
@@ -1515,6 +1509,8 @@ Optional Features:
use CR, LF, or CRLF as newline sequence
--enable-newline-is-any use any valid Unicode newline sequence
--enable-bsr-anycrlf \R matches only CR, LF, CRLF by default
+ --enable-never-backslash-C
+ use of \C causes an error
--enable-ebcdic assume EBCDIC coding rather than ASCII; incompatible
with --enable-utf; use only in (uncommon) EBCDIC
environments; it implies --enable-rebuild-chartables
@@ -1642,7 +1638,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-PCRE2 configure 10.20
+PCRE2 configure 10.21
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2137,7 +2133,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by PCRE2 $as_me 10.20, which was
+It was created by PCRE2 $as_me 10.21, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3001,7 +2997,7 @@ fi
# Define the identity of the package.
PACKAGE='pcre2'
- VERSION='10.20'
+ VERSION='10.21'
cat >>confdefs.h <<_ACEOF
@@ -3136,33 +3132,6 @@ AM_BACKSLASH='\'
ac_config_headers="$ac_config_headers src/config.h"
-# FISH PATCH
-# Enable maintainer mode to avoid spurious rebuilds due to timestamps in git
-# not being stored. Discussion in https://github.com/fish-shell/fish-shell/issues/2469
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
-$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
- # Check whether --enable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then :
- enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
-$as_echo "$USE_MAINTAINER_MODE" >&6; }
- if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
-
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
# This is a new thing required to stop a warning from automake 1.12
DEPDIR="${am__leading_dot}deps"
@@ -13624,9 +13593,9 @@ _ACEOF
# Versioning
PCRE2_MAJOR="10"
-PCRE2_MINOR="20"
+PCRE2_MINOR="21"
PCRE2_PRERELEASE=""
-PCRE2_DATE="2015-06-30"
+PCRE2_DATE="2016-01-12"
if test "$PCRE2_MINOR" = "08" -o "$PCRE2_MINOR" = "09"
then
@@ -13790,6 +13759,15 @@ else
fi
+# Handle --enable-never-backslash-C
+# Check whether --enable-never-backslash-C was given.
+if test "${enable_never_backslash_C+set}" = set; then :
+ enableval=$enable_never_backslash_C;
+else
+ enable_never_backslash_C=no
+fi
+
+
# Handle --enable-ebcdic
# Check whether --enable-ebcdic was given.
if test "${enable_ebcdic+set}" = set; then :
@@ -13980,13 +13958,17 @@ fi
# Make sure that if enable_ebcdic is set, rebuild_chartables is also enabled.
# Also check that UTF support is not requested, because PCRE2 cannot handle
# EBCDIC and UTF in the same build. To do so it would need to use different
-# character constants depending on the mode.
+# character constants depending on the mode. Also, EBCDIC cannot be used with
+# 16-bit and 32-bit libraries.
#
if test "x$enable_ebcdic" = "xyes"; then
enable_rebuild_chartables=yes
if test "x$enable_unicode" = "xyes"; then
as_fn_error $? "support for EBCDIC and Unicode cannot be enabled at the same time" "$LINENO" 5
fi
+ if test "x$enable_pcre2_16" = "xyes" -o "x$enable_pcre2_32" = "xyes"; then
+ as_fn_error $? "EBCDIC support is available only for the 8-bit library" "$LINENO" 5
+ fi
fi
# Check argument to --with-link-size
@@ -15321,6 +15303,12 @@ $as_echo "#define BSR_ANYCRLF /**/" >>confdefs.h
fi
+if test "$enable_never_backslash_C" = "yes"; then
+
+$as_echo "#define NEVER_BACKSLASH_C /**/" >>confdefs.h
+
+fi
+
cat >>confdefs.h <<_ACEOF
#define LINK_SIZE $with_link_size
@@ -15395,16 +15383,16 @@ esac
# are m4 variables, assigned above.
EXTRA_LIBPCRE2_8_LDFLAGS="$EXTRA_LIBPCRE2_8_LDFLAGS \
- $NO_UNDEFINED -version-info 2:0:2"
+ $NO_UNDEFINED -version-info 3:0:3"
EXTRA_LIBPCRE2_16_LDFLAGS="$EXTRA_LIBPCRE2_16_LDFLAGS \
- $NO_UNDEFINED -version-info 2:0:2"
+ $NO_UNDEFINED -version-info 3:0:3"
EXTRA_LIBPCRE2_32_LDFLAGS="$EXTRA_LIBPCRE2_32_LDFLAGS \
- $NO_UNDEFINED -version-info 2:0:2"
+ $NO_UNDEFINED -version-info 3:0:3"
EXTRA_LIBPCRE2_POSIX_LDFLAGS="$EXTRA_LIBPCRE2_POSIX_LDFLAGS \
- $NO_UNDEFINED -version-info 0:0:0"
+ $NO_UNDEFINED -version-info 0:1:0"
@@ -16002,10 +15990,6 @@ else
am__EXEEXT_FALSE=
fi
-if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
- as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
as_fn_error $? "conditional \"AMDEP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -16451,7 +16435,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by PCRE2 $as_me 10.20, which was
+This file was extended by PCRE2 $as_me 10.21, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -16517,7 +16501,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-PCRE2 config.status 10.20
+PCRE2 config.status 10.21
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@@ -18249,6 +18233,7 @@ $PACKAGE-$VERSION configuration summary:
Enable Unicode support .......... : ${enable_unicode}
Newline char/sequence ........... : ${enable_newline}
\R matches only ANYCRLF ......... : ${enable_bsr_anycrlf}
+ \C is disabled .................. : ${enable_never_backslash_C}
EBCDIC coding ................... : ${enable_ebcdic}
EBCDIC code for NL .............. : ${ebcdic_nl_code}
Rebuild char tables ............. : ${enable_rebuild_chartables}
diff --git a/pcre2-10.20/configure.ac b/pcre2-10.21/configure.ac
index ad6ed7fd..99ad8a9f 100644
--- a/pcre2-10.20/configure.ac
+++ b/pcre2-10.21/configure.ac
@@ -9,18 +9,18 @@ dnl The PCRE2_PRERELEASE feature is for identifying release candidates. It might
dnl be defined as -RC2, for example. For real releases, it should be empty.
m4_define(pcre2_major, [10])
-m4_define(pcre2_minor, [20])
+m4_define(pcre2_minor, [21])
m4_define(pcre2_prerelease, [])
-m4_define(pcre2_date, [2015-06-30])
+m4_define(pcre2_date, [2016-01-12])
# NOTE: The CMakeLists.txt file searches for the above variables in the first
# 50 lines of this file. Please update that if the variables above are moved.
# Libtool shared library interface versions (current:revision:age)
-m4_define(libpcre2_8_version, [2:0:2])
-m4_define(libpcre2_16_version, [2:0:2])
-m4_define(libpcre2_32_version, [2:0:2])
-m4_define(libpcre2_posix_version, [0:0:0])
+m4_define(libpcre2_8_version, [3:0:3])
+m4_define(libpcre2_16_version, [3:0:3])
+m4_define(libpcre2_32_version, [3:0:3])
+m4_define(libpcre2_posix_version, [0:1:0])
AC_PREREQ(2.57)
AC_INIT(PCRE2, pcre2_major.pcre2_minor[]pcre2_prerelease, , pcre2)
@@ -29,11 +29,6 @@ AM_INIT_AUTOMAKE([dist-bzip2 dist-zip])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_CONFIG_HEADERS(src/config.h)
-# FISH PATCH
-# Enable maintainer mode to avoid spurious rebuilds due to timestamps in git
-# not being stored. Discussion in https://github.com/fish-shell/fish-shell/issues/2469
-AM_MAINTAINER_MODE
-
# This is a new thing required to stop a warning from automake 1.12
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
@@ -195,6 +190,12 @@ AC_ARG_ENABLE(bsr-anycrlf,
[\R matches only CR, LF, CRLF by default]),
, enable_bsr_anycrlf=no)
+# Handle --enable-never-backslash-C
+AC_ARG_ENABLE(never-backslash-C,
+ AS_HELP_STRING([--enable-never-backslash-C],
+ [use of \C causes an error]),
+ , enable_never_backslash_C=no)
+
# Handle --enable-ebcdic
AC_ARG_ENABLE(ebcdic,
AS_HELP_STRING([--enable-ebcdic],
@@ -338,13 +339,17 @@ fi
# Make sure that if enable_ebcdic is set, rebuild_chartables is also enabled.
# Also check that UTF support is not requested, because PCRE2 cannot handle
# EBCDIC and UTF in the same build. To do so it would need to use different
-# character constants depending on the mode.
+# character constants depending on the mode. Also, EBCDIC cannot be used with
+# 16-bit and 32-bit libraries.
#
if test "x$enable_ebcdic" = "xyes"; then
enable_rebuild_chartables=yes
if test "x$enable_unicode" = "xyes"; then
AC_MSG_ERROR([support for EBCDIC and Unicode cannot be enabled at the same time])
fi
+ if test "x$enable_pcre2_16" = "xyes" -o "x$enable_pcre2_32" = "xyes"; then
+ AC_MSG_ERROR([EBCDIC support is available only for the 8-bit library])
+ fi
fi
# Check argument to --with-link-size
@@ -609,6 +614,11 @@ if test "$enable_bsr_anycrlf" = "yes"; then
The build-time default can be overridden by the user of PCRE2 at runtime.])
fi
+if test "$enable_never_backslash_C" = "yes"; then
+ AC_DEFINE([NEVER_BACKSLASH_C], [], [
+ Defining NEVER_BACKSLASH_C locks out the use of \C in all patterns.])
+fi
+
AC_DEFINE_UNQUOTED([LINK_SIZE], [$with_link_size], [
The value of LINK_SIZE determines the number of bytes used to store
links as offsets within the compiled regex. The default is 2, which
@@ -886,6 +896,7 @@ $PACKAGE-$VERSION configuration summary:
Enable Unicode support .......... : ${enable_unicode}
Newline char/sequence ........... : ${enable_newline}
\R matches only ANYCRLF ......... : ${enable_bsr_anycrlf}
+ \C is disabled .................. : ${enable_never_backslash_C}
EBCDIC coding ................... : ${enable_ebcdic}
EBCDIC code for NL .............. : ${ebcdic_nl_code}
Rebuild char tables ............. : ${enable_rebuild_chartables}
diff --git a/pcre2-10.20/depcomp b/pcre2-10.21/depcomp
index fc98710e..fc98710e 100755
--- a/pcre2-10.20/depcomp
+++ b/pcre2-10.21/depcomp
diff --git a/pcre2-10.20/install-sh b/pcre2-10.21/install-sh
index 0b0fdcbb..0b0fdcbb 100755
--- a/pcre2-10.20/install-sh
+++ b/pcre2-10.21/install-sh
diff --git a/pcre2-10.20/libpcre2-16.pc.in b/pcre2-10.21/libpcre2-16.pc.in
index 978040df..978040df 100644
--- a/pcre2-10.20/libpcre2-16.pc.in
+++ b/pcre2-10.21/libpcre2-16.pc.in
diff --git a/pcre2-10.20/libpcre2-32.pc.in b/pcre2-10.21/libpcre2-32.pc.in
index d8fb1871..d8fb1871 100644
--- a/pcre2-10.20/libpcre2-32.pc.in
+++ b/pcre2-10.21/libpcre2-32.pc.in
diff --git a/pcre2-10.20/libpcre2-8.pc.in b/pcre2-10.21/libpcre2-8.pc.in
index 5c872d0b..5c872d0b 100644
--- a/pcre2-10.20/libpcre2-8.pc.in
+++ b/pcre2-10.21/libpcre2-8.pc.in
diff --git a/pcre2-10.20/libpcre2-posix.pc.in b/pcre2-10.21/libpcre2-posix.pc.in
index 96415558..96415558 100644
--- a/pcre2-10.20/libpcre2-posix.pc.in
+++ b/pcre2-10.21/libpcre2-posix.pc.in
diff --git a/pcre2-10.20/ltmain.sh b/pcre2-10.21/ltmain.sh
index 0f0a2da3..0f0a2da3 100644
--- a/pcre2-10.20/ltmain.sh
+++ b/pcre2-10.21/ltmain.sh
diff --git a/pcre2-10.20/m4/ax_pthread.m4 b/pcre2-10.21/m4/ax_pthread.m4
index d90de34d..d90de34d 100644
--- a/pcre2-10.20/m4/ax_pthread.m4
+++ b/pcre2-10.21/m4/ax_pthread.m4
diff --git a/pcre2-10.20/m4/libtool.m4 b/pcre2-10.21/m4/libtool.m4
index a3bc337b..a3bc337b 100644
--- a/pcre2-10.20/m4/libtool.m4
+++ b/pcre2-10.21/m4/libtool.m4
diff --git a/pcre2-10.20/m4/ltoptions.m4 b/pcre2-10.21/m4/ltoptions.m4
index 94b08297..94b08297 100644
--- a/pcre2-10.20/m4/ltoptions.m4
+++ b/pcre2-10.21/m4/ltoptions.m4
diff --git a/pcre2-10.20/m4/ltsugar.m4 b/pcre2-10.21/m4/ltsugar.m4
index 48bc9344..48bc9344 100644
--- a/pcre2-10.20/m4/ltsugar.m4
+++ b/pcre2-10.21/m4/ltsugar.m4
diff --git a/pcre2-10.20/m4/ltversion.m4 b/pcre2-10.21/m4/ltversion.m4
index fa04b52a..fa04b52a 100644
--- a/pcre2-10.20/m4/ltversion.m4
+++ b/pcre2-10.21/m4/ltversion.m4
diff --git a/pcre2-10.20/m4/lt~obsolete.m4 b/pcre2-10.21/m4/lt~obsolete.m4
index c6b26f88..c6b26f88 100644
--- a/pcre2-10.20/m4/lt~obsolete.m4
+++ b/pcre2-10.21/m4/lt~obsolete.m4
diff --git a/pcre2-10.20/m4/pcre2_visibility.m4 b/pcre2-10.21/m4/pcre2_visibility.m4
index 480f2eef..480f2eef 100644
--- a/pcre2-10.20/m4/pcre2_visibility.m4
+++ b/pcre2-10.21/m4/pcre2_visibility.m4
diff --git a/pcre2-10.20/missing b/pcre2-10.21/missing
index f62bbae3..f62bbae3 100755
--- a/pcre2-10.20/missing
+++ b/pcre2-10.21/missing
diff --git a/pcre2-10.20/pcre2-config.in b/pcre2-10.21/pcre2-config.in
index 932160ef..932160ef 100644
--- a/pcre2-10.20/pcre2-config.in
+++ b/pcre2-10.21/pcre2-config.in
diff --git a/pcre2-10.20/perltest.sh b/pcre2-10.21/perltest.sh
index f011ccc9..9cf7b17f 100755
--- a/pcre2-10.20/perltest.sh
+++ b/pcre2-10.21/perltest.sh
@@ -204,12 +204,14 @@ for (;;)
printf "data> " if $interact;
last NEXT_RE if ! ($_ = <$infile>);
chomp;
- printf $outfile "$_\n" if ! $interact;
+ printf $outfile "%s", "$_\n" if ! $interact;
s/\s+$//; # Remove trailing space
s/^\s+//; # Remove leading space
last if ($_ eq "");
+ next if $_ =~ /^\\=(?:\s|$)/; # Comment line
+
$x = eval "\"$_\""; # To get escapes processed
# Empty array for holding results, ensure $REGERROR and $REGMARK are
diff --git a/pcre2-10.20/src/config.h.generic b/pcre2-10.21/src/config.h.generic
index 0f9da50c..744f1989 100644
--- a/pcre2-10.20/src/config.h.generic
+++ b/pcre2-10.21/src/config.h.generic
@@ -182,6 +182,9 @@ sure both macros are undefined; an emulation function will then be used. */
#define MAX_NAME_SIZE 32
#endif
+/* Defining NEVER_BACKSLASH_C locks out the use of \C in all patterns. */
+/* #undef NEVER_BACKSLASH_C */
+
/* The value of NEWLINE_DEFAULT determines the default newline character
sequence. PCRE2 client programs can override this by selecting other values
at run time. The valid values are 1 (CR), 2 (LF), 3 (CRLF), 4 (ANY), and 5
@@ -200,7 +203,7 @@ sure both macros are undefined; an emulation function will then be used. */
#define PACKAGE_NAME "PCRE2"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "PCRE2 10.20"
+#define PACKAGE_STRING "PCRE2 10.21"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "pcre2"
@@ -209,7 +212,7 @@ sure both macros are undefined; an emulation function will then be used. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "10.20"
+#define PACKAGE_VERSION "10.21"
/* The value of PARENS_NEST_LIMIT specifies the maximum depth of nested
parentheses (of any kind) in a pattern. This limits the amount of system
@@ -290,7 +293,7 @@ sure both macros are undefined; an emulation function will then be used. */
/* #undef SUPPORT_VALGRIND */
/* Version number of package */
-#define VERSION "10.20"
+#define VERSION "10.21"
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
diff --git a/pcre2-10.20/src/config.h.in b/pcre2-10.21/src/config.h.in
index e3ef2fdd..e55d0a04 100644
--- a/pcre2-10.20/src/config.h.in
+++ b/pcre2-10.21/src/config.h.in
@@ -169,6 +169,9 @@ sure both macros are undefined; an emulation function will then be used. */
overflow caused by enormously large patterns. */
#undef MAX_NAME_SIZE
+/* Defining NEVER_BACKSLASH_C locks out the use of \C in all patterns. */
+#undef NEVER_BACKSLASH_C
+
/* The value of NEWLINE_DEFAULT determines the default newline character
sequence. PCRE2 client programs can override this by selecting other values
at run time. The valid values are 1 (CR), 2 (LF), 3 (CRLF), 4 (ANY), and 5
diff --git a/pcre2-10.20/src/dftables.c b/pcre2-10.21/src/dftables.c
index b6417cc2..dfb90b59 100644
--- a/pcre2-10.20/src/dftables.c
+++ b/pcre2-10.21/src/dftables.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2014 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -102,7 +102,7 @@ fprintf(f,
"/* This file was automatically written by the dftables auxiliary\n"
"program. It contains character tables that are used when no external\n"
"tables are passed to PCRE2 by the application that calls it. The tables\n"
- "are used only for characters whose code values are less than 256.\n\n");
+ "are used only for characters whose code values are less than 256. */\n\n");
/* Force config.h in z/OS */
@@ -115,7 +115,7 @@ fprintf(f,
#endif
fprintf(f,
- "The following #includes are present because without them gcc 4.x may remove\n"
+ "/* The following #includes are present because without them gcc 4.x may remove\n"
"the array definition from the final binary if PCRE2 is built into a static\n"
"library and dead code stripping is activated. This leads to link errors.\n"
"Pulling in the header ensures that the array gets flagged as \"someone\n"
diff --git a/pcre2-10.20/src/pcre2.h.generic b/pcre2-10.21/src/pcre2.h.generic
index 3e97fb8b..7f9ba4f1 100644
--- a/pcre2-10.20/src/pcre2.h.generic
+++ b/pcre2-10.21/src/pcre2.h.generic
@@ -5,7 +5,7 @@
/* This is the public header file for the PCRE library, second API, to be
#included by applications that call PCRE2 functions.
- Copyright (c) 2015 University of Cambridge
+ Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
/* The current PCRE version information. */
#define PCRE2_MAJOR 10
-#define PCRE2_MINOR 20
+#define PCRE2_MINOR 21
#define PCRE2_PRERELEASE
-#define PCRE2_DATE 2015-06-30
+#define PCRE2_DATE 2016-01-12
/* When an application links to a PCRE DLL in Windows, the symbols that are
imported have to be identified as such. When building PCRE2, the appropriate
@@ -120,6 +120,8 @@ D is inspected during pcre2_dfa_match() execution
#define PCRE2_UTF 0x00080000u /* C J M D */
#define PCRE2_NEVER_BACKSLASH_C 0x00100000u /* C */
#define PCRE2_ALT_CIRCUMFLEX 0x00200000u /* J M D */
+#define PCRE2_ALT_VERBNAMES 0x00400000u /* C */
+#define PCRE2_USE_OFFSET_LIMIT 0x00800000u /* J M D */
/* These are for pcre2_jit_compile(). */
@@ -144,9 +146,13 @@ sanity checks). */
#define PCRE2_DFA_RESTART 0x00000040u
#define PCRE2_DFA_SHORTEST 0x00000080u
-/* This is an additional option for pcre2_substitute(). */
+/* These are additional options for pcre2_substitute(). */
-#define PCRE2_SUBSTITUTE_GLOBAL 0x00000100u
+#define PCRE2_SUBSTITUTE_GLOBAL 0x00000100u
+#define PCRE2_SUBSTITUTE_EXTENDED 0x00000200u
+#define PCRE2_SUBSTITUTE_UNSET_EMPTY 0x00000400u
+#define PCRE2_SUBSTITUTE_UNKNOWN_UNSET 0x00000800u
+#define PCRE2_SUBSTITUTE_OVERFLOW_LENGTH 0x00001000u
/* Newline and \R settings, for use in compile contexts. The newline values
must be kept in step with values set in config.h and both sets must all be
@@ -233,6 +239,12 @@ numbers must not be changed. */
#define PCRE2_ERROR_RECURSIONLIMIT (-53)
#define PCRE2_ERROR_UNAVAILABLE (-54)
#define PCRE2_ERROR_UNSET (-55)
+#define PCRE2_ERROR_BADOFFSETLIMIT (-56)
+#define PCRE2_ERROR_BADREPESCAPE (-57)
+#define PCRE2_ERROR_REPMISSINGBRACE (-58)
+#define PCRE2_ERROR_BADSUBSTITUTION (-59)
+#define PCRE2_ERROR_BADSUBSPATTERN (-60)
+#define PCRE2_ERROR_TOOMANYREPLACE (-61)
/* Request types for pcre2_pattern_info() */
@@ -259,6 +271,7 @@ numbers must not be changed. */
#define PCRE2_INFO_NEWLINE 20
#define PCRE2_INFO_RECURSIONLIMIT 21
#define PCRE2_INFO_SIZE 22
+#define PCRE2_INFO_HASBACKSLASHC 23
/* Request types for pcre2_config(). */
@@ -291,6 +304,7 @@ define special values to indicate zero-terminated strings and unset offsets in
the offset vector (ovector). */
#define PCRE2_SIZE size_t
+#define PCRE2_SIZE_MAX SIZE_MAX
#define PCRE2_ZERO_TERMINATED (~(PCRE2_SIZE)0)
#define PCRE2_UNSET (~(PCRE2_SIZE)0)
@@ -388,6 +402,8 @@ PCRE2_EXP_DECL void pcre2_compile_context_free(pcre2_compile_context *); \
PCRE2_EXP_DECL int pcre2_set_bsr(pcre2_compile_context *, uint32_t); \
PCRE2_EXP_DECL int pcre2_set_character_tables(pcre2_compile_context *, \
const unsigned char *); \
+PCRE2_EXP_DECL int pcre2_set_max_pattern_length(pcre2_compile_context *, \
+ PCRE2_SIZE); \
PCRE2_EXP_DECL int pcre2_set_newline(pcre2_compile_context *, uint32_t); \
PCRE2_EXP_DECL int pcre2_set_parens_nest_limit(pcre2_compile_context *, \
uint32_t); \
@@ -405,6 +421,8 @@ PCRE2_EXP_DECL int pcre2_set_callout(pcre2_match_context *, \
int (*)(pcre2_callout_block *, void *), void *); \
PCRE2_EXP_DECL int pcre2_set_match_limit(pcre2_match_context *, \
uint32_t); \
+PCRE2_EXP_DECL int pcre2_set_offset_limit(pcre2_match_context *, \
+ PCRE2_SIZE); \
PCRE2_EXP_DECL int pcre2_set_recursion_limit(pcre2_match_context *, \
uint32_t); \
PCRE2_EXP_DECL int pcre2_set_recursion_memory_management( \
@@ -606,8 +624,10 @@ pcre2_compile are called by application code. */
#define pcre2_set_character_tables PCRE2_SUFFIX(pcre2_set_character_tables_)
#define pcre2_set_compile_recursion_guard PCRE2_SUFFIX(pcre2_set_compile_recursion_guard_)
#define pcre2_set_match_limit PCRE2_SUFFIX(pcre2_set_match_limit_)
+#define pcre2_set_max_pattern_length PCRE2_SUFFIX(pcre2_set_max_pattern_length_)
#define pcre2_set_newline PCRE2_SUFFIX(pcre2_set_newline_)
#define pcre2_set_parens_nest_limit PCRE2_SUFFIX(pcre2_set_parens_nest_limit_)
+#define pcre2_set_offset_limit PCRE2_SUFFIX(pcre2_set_offset_limit_)
#define pcre2_set_recursion_limit PCRE2_SUFFIX(pcre2_set_recursion_limit_)
#define pcre2_set_recursion_memory_management PCRE2_SUFFIX(pcre2_set_recursion_memory_management_)
#define pcre2_substitute PCRE2_SUFFIX(pcre2_substitute_)
diff --git a/pcre2-10.20/src/pcre2.h.in b/pcre2-10.21/src/pcre2.h.in
index 94fbdd5b..49f19096 100644
--- a/pcre2-10.20/src/pcre2.h.in
+++ b/pcre2-10.21/src/pcre2.h.in
@@ -5,7 +5,7 @@
/* This is the public header file for the PCRE library, second API, to be
#included by applications that call PCRE2 functions.
- Copyright (c) 2015 University of Cambridge
+ Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -120,6 +120,8 @@ D is inspected during pcre2_dfa_match() execution
#define PCRE2_UTF 0x00080000u /* C J M D */
#define PCRE2_NEVER_BACKSLASH_C 0x00100000u /* C */
#define PCRE2_ALT_CIRCUMFLEX 0x00200000u /* J M D */
+#define PCRE2_ALT_VERBNAMES 0x00400000u /* C */
+#define PCRE2_USE_OFFSET_LIMIT 0x00800000u /* J M D */
/* These are for pcre2_jit_compile(). */
@@ -144,9 +146,13 @@ sanity checks). */
#define PCRE2_DFA_RESTART 0x00000040u
#define PCRE2_DFA_SHORTEST 0x00000080u
-/* This is an additional option for pcre2_substitute(). */
+/* These are additional options for pcre2_substitute(). */
-#define PCRE2_SUBSTITUTE_GLOBAL 0x00000100u
+#define PCRE2_SUBSTITUTE_GLOBAL 0x00000100u
+#define PCRE2_SUBSTITUTE_EXTENDED 0x00000200u
+#define PCRE2_SUBSTITUTE_UNSET_EMPTY 0x00000400u
+#define PCRE2_SUBSTITUTE_UNKNOWN_UNSET 0x00000800u
+#define PCRE2_SUBSTITUTE_OVERFLOW_LENGTH 0x00001000u
/* Newline and \R settings, for use in compile contexts. The newline values
must be kept in step with values set in config.h and both sets must all be
@@ -233,6 +239,12 @@ numbers must not be changed. */
#define PCRE2_ERROR_RECURSIONLIMIT (-53)
#define PCRE2_ERROR_UNAVAILABLE (-54)
#define PCRE2_ERROR_UNSET (-55)
+#define PCRE2_ERROR_BADOFFSETLIMIT (-56)
+#define PCRE2_ERROR_BADREPESCAPE (-57)
+#define PCRE2_ERROR_REPMISSINGBRACE (-58)
+#define PCRE2_ERROR_BADSUBSTITUTION (-59)
+#define PCRE2_ERROR_BADSUBSPATTERN (-60)
+#define PCRE2_ERROR_TOOMANYREPLACE (-61)
/* Request types for pcre2_pattern_info() */
@@ -259,6 +271,7 @@ numbers must not be changed. */
#define PCRE2_INFO_NEWLINE 20
#define PCRE2_INFO_RECURSIONLIMIT 21
#define PCRE2_INFO_SIZE 22
+#define PCRE2_INFO_HASBACKSLASHC 23
/* Request types for pcre2_config(). */
@@ -291,6 +304,7 @@ define special values to indicate zero-terminated strings and unset offsets in
the offset vector (ovector). */
#define PCRE2_SIZE size_t
+#define PCRE2_SIZE_MAX SIZE_MAX
#define PCRE2_ZERO_TERMINATED (~(PCRE2_SIZE)0)
#define PCRE2_UNSET (~(PCRE2_SIZE)0)
@@ -388,6 +402,8 @@ PCRE2_EXP_DECL void pcre2_compile_context_free(pcre2_compile_context *); \
PCRE2_EXP_DECL int pcre2_set_bsr(pcre2_compile_context *, uint32_t); \
PCRE2_EXP_DECL int pcre2_set_character_tables(pcre2_compile_context *, \
const unsigned char *); \
+PCRE2_EXP_DECL int pcre2_set_max_pattern_length(pcre2_compile_context *, \
+ PCRE2_SIZE); \
PCRE2_EXP_DECL int pcre2_set_newline(pcre2_compile_context *, uint32_t); \
PCRE2_EXP_DECL int pcre2_set_parens_nest_limit(pcre2_compile_context *, \
uint32_t); \
@@ -405,6 +421,8 @@ PCRE2_EXP_DECL int pcre2_set_callout(pcre2_match_context *, \
int (*)(pcre2_callout_block *, void *), void *); \
PCRE2_EXP_DECL int pcre2_set_match_limit(pcre2_match_context *, \
uint32_t); \
+PCRE2_EXP_DECL int pcre2_set_offset_limit(pcre2_match_context *, \
+ PCRE2_SIZE); \
PCRE2_EXP_DECL int pcre2_set_recursion_limit(pcre2_match_context *, \
uint32_t); \
PCRE2_EXP_DECL int pcre2_set_recursion_memory_management( \
@@ -606,8 +624,10 @@ pcre2_compile are called by application code. */
#define pcre2_set_character_tables PCRE2_SUFFIX(pcre2_set_character_tables_)
#define pcre2_set_compile_recursion_guard PCRE2_SUFFIX(pcre2_set_compile_recursion_guard_)
#define pcre2_set_match_limit PCRE2_SUFFIX(pcre2_set_match_limit_)
+#define pcre2_set_max_pattern_length PCRE2_SUFFIX(pcre2_set_max_pattern_length_)
#define pcre2_set_newline PCRE2_SUFFIX(pcre2_set_newline_)
#define pcre2_set_parens_nest_limit PCRE2_SUFFIX(pcre2_set_parens_nest_limit_)
+#define pcre2_set_offset_limit PCRE2_SUFFIX(pcre2_set_offset_limit_)
#define pcre2_set_recursion_limit PCRE2_SUFFIX(pcre2_set_recursion_limit_)
#define pcre2_set_recursion_memory_management PCRE2_SUFFIX(pcre2_set_recursion_memory_management_)
#define pcre2_substitute PCRE2_SUFFIX(pcre2_substitute_)
diff --git a/pcre2-10.20/src/pcre2_auto_possess.c b/pcre2-10.21/src/pcre2_auto_possess.c
index e99a2c44..d4d2334d 100644
--- a/pcre2-10.20/src/pcre2_auto_possess.c
+++ b/pcre2-10.21/src/pcre2_auto_possess.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2014 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -171,64 +171,6 @@ static const uint8_t posspropstab[3][4] = {
{ ucp_L, ucp_N, ucp_P, ucp_Po } /* WORD */
};
-/* This table is used when converting repeating opcodes into possessified
-versions as a result of an explicit possessive quantifier such as ++. A zero
-value means there is no possessified version - in those cases the item in
-question must be wrapped in ONCE brackets. The table is truncated at OP_CALLOUT
-because all relevant opcodes are less than that. */
-
-static const uint8_t opcode_possessify[] = {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0 - 15 */
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 16 - 31 */
-
- 0, /* NOTI */
- OP_POSSTAR, 0, /* STAR, MINSTAR */
- OP_POSPLUS, 0, /* PLUS, MINPLUS */
- OP_POSQUERY, 0, /* QUERY, MINQUERY */
- OP_POSUPTO, 0, /* UPTO, MINUPTO */
- 0, /* EXACT */
- 0, 0, 0, 0, /* POS{STAR,PLUS,QUERY,UPTO} */
-
- OP_POSSTARI, 0, /* STARI, MINSTARI */
- OP_POSPLUSI, 0, /* PLUSI, MINPLUSI */
- OP_POSQUERYI, 0, /* QUERYI, MINQUERYI */
- OP_POSUPTOI, 0, /* UPTOI, MINUPTOI */
- 0, /* EXACTI */
- 0, 0, 0, 0, /* POS{STARI,PLUSI,QUERYI,UPTOI} */
-
- OP_NOTPOSSTAR, 0, /* NOTSTAR, NOTMINSTAR */
- OP_NOTPOSPLUS, 0, /* NOTPLUS, NOTMINPLUS */
- OP_NOTPOSQUERY, 0, /* NOTQUERY, NOTMINQUERY */
- OP_NOTPOSUPTO, 0, /* NOTUPTO, NOTMINUPTO */
- 0, /* NOTEXACT */
- 0, 0, 0, 0, /* NOTPOS{STAR,PLUS,QUERY,UPTO} */
-
- OP_NOTPOSSTARI, 0, /* NOTSTARI, NOTMINSTARI */
- OP_NOTPOSPLUSI, 0, /* NOTPLUSI, NOTMINPLUSI */
- OP_NOTPOSQUERYI, 0, /* NOTQUERYI, NOTMINQUERYI */
- OP_NOTPOSUPTOI, 0, /* NOTUPTOI, NOTMINUPTOI */
- 0, /* NOTEXACTI */
- 0, 0, 0, 0, /* NOTPOS{STARI,PLUSI,QUERYI,UPTOI} */
-
- OP_TYPEPOSSTAR, 0, /* TYPESTAR, TYPEMINSTAR */
- OP_TYPEPOSPLUS, 0, /* TYPEPLUS, TYPEMINPLUS */
- OP_TYPEPOSQUERY, 0, /* TYPEQUERY, TYPEMINQUERY */
- OP_TYPEPOSUPTO, 0, /* TYPEUPTO, TYPEMINUPTO */
- 0, /* TYPEEXACT */
- 0, 0, 0, 0, /* TYPEPOS{STAR,PLUS,QUERY,UPTO} */
-
- OP_CRPOSSTAR, 0, /* CRSTAR, CRMINSTAR */
- OP_CRPOSPLUS, 0, /* CRPLUS, CRMINPLUS */
- OP_CRPOSQUERY, 0, /* CRQUERY, CRMINQUERY */
- OP_CRPOSRANGE, 0, /* CRRANGE, CRMINRANGE */
- 0, 0, 0, 0, /* CRPOS{STAR,PLUS,QUERY,RANGE} */
-
- 0, 0, 0, /* CLASS, NCLASS, XCLASS */
- 0, 0, /* REF, REFI */
- 0, 0, /* DNREF, DNREFI */
- 0, 0 /* RECURSE, CALLOUT */
-};
-
#ifdef SUPPORT_UNICODE
diff --git a/pcre2-10.20/src/pcre2_chartables.c.dist b/pcre2-10.21/src/pcre2_chartables.c.dist
index 203cb1a4..203cb1a4 100644
--- a/pcre2-10.20/src/pcre2_chartables.c.dist
+++ b/pcre2-10.21/src/pcre2_chartables.c.dist
diff --git a/pcre2-10.20/src/pcre2_compile.c b/pcre2-10.21/src/pcre2_compile.c
index 4a9e42e2..d8528378 100644
--- a/pcre2-10.20/src/pcre2_compile.c
+++ b/pcre2-10.21/src/pcre2_compile.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2015 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -96,26 +96,27 @@ static BOOL
* Code parameters and static tables *
*************************************************/
-/* This value specifies the size of stack workspace, which is used during the
-pre-compile phase when determining how much memory is required. The regex is
-partly compiled into this space, but the compiled parts are discarded as soon
-as they can be, so that hopefully there will never be an overrun. The code
-does, however, check for an overrun. The largest amount I've seen used is 218,
-so this number is very generous.
-
-The same workspace is used during the second, actual compile phase for
-remembering forward references to groups so that they can be filled in at the
-end. Each entry in this list occupies LINK_SIZE bytes, so even when LINK_SIZE
-is 4 there is plenty of room for most patterns. However, the memory can get
-filled up by repetitions of forward references, for example patterns like
-/(?1){0,1999}(b)/, and one user did hit the limit. The code has been changed so
-that the workspace is expanded in this situation. The value below is therefore
-a minimum, and we put a maximum on it for safety. The minimum is now also
-defined in terms of LINK_SIZE so that the size increase kicks in at the same
-number of forward references in all cases. */
-
-#define COMPILE_WORK_SIZE (2048*LINK_SIZE)
-#define COMPILE_WORK_SIZE_MAX (100*COMPILE_WORK_SIZE)
+/* This value specifies the size of stack workspace, which is used in different
+ways in the different pattern scans. The group-identifying pre-scan uses it to
+handle nesting, and needs it to be 16-bit aligned.
+
+During the first compiling phase, when determining how much memory is required,
+the regex is partly compiled into this space, but the compiled parts are
+discarded as soon as they can be, so that hopefully there will never be an
+overrun. The code does, however, check for an overrun, which can occur for
+pathological patterns. The size of the workspace depends on LINK_SIZE because
+the length of compiled items varies with this.
+
+In the real compile phase, the workspace is used for remembering data about
+numbered groups, provided there are not too many of them (if there are, extra
+memory is acquired). For this phase the memory must be 32-bit aligned. Having
+defined the size in code units, we set up C32_WORK_SIZE as the number of
+elements in the 32-bit vector. */
+
+#define COMPILE_WORK_SIZE (2048*LINK_SIZE) /* Size in code units */
+
+#define C32_WORK_SIZE \
+ ((COMPILE_WORK_SIZE * sizeof(PCRE2_UCHAR))/sizeof(uint32_t))
/* The overrun tests check for a slightly smaller size so that they detect the
overrun before it actually does run off the end of the data block. */
@@ -160,6 +161,14 @@ have to check them every time. */
#define REQ_UNSET (-2) /* Not yet found anything */
#define REQ_NONE (-1) /* Found not fixed char */
+/* These flags are used in the groupinfo vector. */
+
+#define GI_SET_COULD_BE_EMPTY 0x80000000u
+#define GI_COULD_BE_EMPTY 0x40000000u
+#define GI_NOT_FIXED_LENGTH 0x20000000u
+#define GI_SET_FIXED_LENGTH 0x10000000u
+#define GI_FIXED_LENGTH_MASK 0x0000ffffu
+
/* This bit (which is greater than any UTF value) is used to indicate that a
variable contains a number of code units instead of an actual code point. */
@@ -270,7 +279,7 @@ in UTF-8 mode. It runs from '0' to 'z'. */
#ifndef EBCDIC
#define ESCAPES_FIRST CHAR_0
#define ESCAPES_LAST CHAR_z
-#define ESCAPES_UPPER_CASE (-32) /* Add this to upper case a letter */
+#define UPPER_CASE(c) (c-32)
static const short int escapes[] = {
0, 0,
@@ -323,11 +332,11 @@ because it is defined as 'a', which of course picks up the ASCII value. */
#if 'a' == 0x81 /* Check for a real EBCDIC environment */
#define ESCAPES_FIRST CHAR_a
#define ESCAPES_LAST CHAR_9
-#define ESCAPES_UPPER_CASE (+64) /* Add this to upper case a letter */
+#define UPPER_CASE(c) (c+64)
#else /* Testing in an ASCII environment */
#define ESCAPES_FIRST ((unsigned char)'\x81') /* EBCDIC 'a' */
#define ESCAPES_LAST ((unsigned char)'\xf9') /* EBCDIC '9' */
-#define ESCAPES_UPPER_CASE (-32) /* Add this to upper case a letter */
+#define UPPER_CASE(c) (c-32)
#endif
static const short int escapes[] = {
@@ -573,17 +582,18 @@ static PCRE2_SPTR posix_substitutes[] = {
#define PUBLIC_COMPILE_OPTIONS \
(PCRE2_ANCHORED|PCRE2_ALLOW_EMPTY_CLASS|PCRE2_ALT_BSUX|PCRE2_ALT_CIRCUMFLEX| \
- PCRE2_AUTO_CALLOUT|PCRE2_CASELESS|PCRE2_DOLLAR_ENDONLY|PCRE2_DOTALL| \
- PCRE2_DUPNAMES|PCRE2_EXTENDED|PCRE2_FIRSTLINE|PCRE2_MATCH_UNSET_BACKREF| \
- PCRE2_MULTILINE|PCRE2_NEVER_BACKSLASH_C|PCRE2_NEVER_UCP| \
- PCRE2_NEVER_UTF|PCRE2_NO_AUTO_CAPTURE|PCRE2_NO_AUTO_POSSESS| \
- PCRE2_NO_DOTSTAR_ANCHOR|PCRE2_NO_START_OPTIMIZE|PCRE2_NO_UTF_CHECK| \
- PCRE2_UCP|PCRE2_UNGREEDY|PCRE2_UTF)
+ PCRE2_ALT_VERBNAMES|PCRE2_AUTO_CALLOUT|PCRE2_CASELESS|PCRE2_DOLLAR_ENDONLY| \
+ PCRE2_DOTALL|PCRE2_DUPNAMES|PCRE2_EXTENDED|PCRE2_FIRSTLINE| \
+ PCRE2_MATCH_UNSET_BACKREF|PCRE2_MULTILINE|PCRE2_NEVER_BACKSLASH_C| \
+ PCRE2_NEVER_UCP|PCRE2_NEVER_UTF|PCRE2_NO_AUTO_CAPTURE| \
+ PCRE2_NO_AUTO_POSSESS|PCRE2_NO_DOTSTAR_ANCHOR|PCRE2_NO_START_OPTIMIZE| \
+ PCRE2_NO_UTF_CHECK|PCRE2_UCP|PCRE2_UNGREEDY|PCRE2_USE_OFFSET_LIMIT| \
+ PCRE2_UTF)
/* Compile time error code numbers. They are given names so that they can more
easily be tracked. When a new number is added, the tables called eint1 and
-eint2 in pcre2posix.c must be updated, and a new error text must be added to
-compile_error_texts in pcre2_error.c. */
+eint2 in pcre2posix.c may need to be updated, and a new error text must be
+added to compile_error_texts in pcre2_error.c. */
enum { ERR0 = COMPILE_ERROR_BASE,
ERR1, ERR2, ERR3, ERR4, ERR5, ERR6, ERR7, ERR8, ERR9, ERR10,
@@ -594,7 +604,21 @@ enum { ERR0 = COMPILE_ERROR_BASE,
ERR51, ERR52, ERR53, ERR54, ERR55, ERR56, ERR57, ERR58, ERR59, ERR60,
ERR61, ERR62, ERR63, ERR64, ERR65, ERR66, ERR67, ERR68, ERR69, ERR70,
ERR71, ERR72, ERR73, ERR74, ERR75, ERR76, ERR77, ERR78, ERR79, ERR80,
- ERR81, ERR82, ERR83, ERR84 };
+ ERR81, ERR82, ERR83, ERR84, ERR85, ERR86, ERR87, ERR88 };
+
+/* Error codes that correspond to negative error codes returned by
+find_fixedlength(). */
+
+static int fixed_length_errors[] =
+ {
+ ERR0, /* Not an error */
+ ERR0, /* Not an error; -1 is used for "process later" */
+ ERR25, /* Lookbehind is not fixed length */
+ ERR36, /* \C in lookbehind is not allowed */
+ ERR87, /* Lookbehind is too long */
+ ERR86, /* Pattern too complicated */
+ ERR70 /* Internal error: unknown opcode encountered */
+ };
/* This is a table of start-of-pattern options such as (*UTF) and settings such
as (*LIMIT_MATCH=nnnn) and (*CRLF). For completeness and backward
@@ -791,39 +815,76 @@ PUT(previous_callout, 1 + LINK_SIZE, length);
*************************************************/
/* Scan a branch and compute the fixed length of subject that will match it, if
-the length is fixed. This is needed for dealing with backward assertions. In
+the length is fixed. This is needed for dealing with lookbehind assertions. In
UTF mode, the result is in code units rather than bytes. The branch is
temporarily terminated with OP_END when this function is called.
-This function is called when a backward assertion is encountered, so that if it
-fails, the error message can point to the correct place in the pattern.
+This function is called when a lookbehind assertion is encountered, so that if
+it fails, the error message can point to the correct place in the pattern.
However, we cannot do this when the assertion contains subroutine calls,
because they can be forward references. We solve this by remembering this case
and doing the check at the end; a flag specifies which mode we are running in.
+Lookbehind lengths are held in 16-bit fields and the maximum value is defined
+as LOOKBEHIND_MAX.
+
Arguments:
- code points to the start of the pattern (the bracket)
- utf TRUE in UTF mode
- atend TRUE if called when the pattern is complete
- cb the "compile data" structure
+ code points to the start of the pattern (the bracket)
+ utf TRUE in UTF mode
+ atend TRUE if called when the pattern is complete
+ cb the "compile data" structure
recurses chain of recurse_check to catch mutual recursion
-
-Returns: the fixed length,
- or -1 if there is no fixed length,
- or -2 if \C was encountered (in UTF-8 mode only)
- or -3 if an OP_RECURSE item was encountered and atend is FALSE
- or -4 if an unknown opcode was encountered (internal error)
+ countptr pointer to counter, to catch over-complexity
+
+Returns: if non-negative, the fixed length,
+ or -1 if an OP_RECURSE item was encountered and atend is FALSE
+ or -2 if there is no fixed length,
+ or -3 if \C was encountered (in UTF-8 mode only)
+ or -4 length is too long
+ or -5 if an unknown opcode was encountered (internal error)
*/
+#define FFL_LATER (-1)
+#define FFL_NOTFIXED (-2)
+#define FFL_BACKSLASHC (-3)
+#define FFL_TOOLONG (-4)
+#define FFL_TOOCOMPLICATED (-5)
+#define FFL_UNKNOWNOP (-6)
+
static int
find_fixedlength(PCRE2_UCHAR *code, BOOL utf, BOOL atend, compile_block *cb,
- recurse_check *recurses)
+ recurse_check *recurses, int *countptr)
{
int length = -1;
+uint32_t group = 0;
+uint32_t groupinfo = 0;
recurse_check this_recurse;
register int branchlength = 0;
register PCRE2_UCHAR *cc = code + 1 + LINK_SIZE;
+/* If this is a capturing group, we may have the answer cached, but we can only
+use this information if there are no (?| groups in the pattern, because
+otherwise group numbers are not unique. */
+
+if (*code == OP_CBRA || *code == OP_CBRAPOS || *code == OP_SCBRA ||
+ *code == OP_SCBRAPOS)
+ {
+ group = GET2(cc, 0);
+ cc += IMM2_SIZE;
+ groupinfo = cb->groupinfo[group];
+ if ((cb->external_flags & PCRE2_DUPCAPUSED) == 0)
+ {
+ if ((groupinfo & GI_NOT_FIXED_LENGTH) != 0) return FFL_NOTFIXED;
+ if ((groupinfo & GI_SET_FIXED_LENGTH) != 0)
+ return groupinfo & GI_FIXED_LENGTH_MASK;
+ }
+ }
+
+/* A large and/or complex regex can take too long to process. This can happen
+more often when (?| groups are present in the pattern. */
+
+if ((*countptr)++ > 2000) return FFL_TOOCOMPLICATED;
+
/* Scan along the opcodes for this branch. If we get to the end of the
branch, check the length against that of the other branches. */
@@ -833,6 +894,8 @@ for (;;)
PCRE2_UCHAR *ce, *cs;
register PCRE2_UCHAR op = *cc;
+ if (branchlength > LOOKBEHIND_MAX) return FFL_TOOLONG;
+
switch (op)
{
/* We only need to continue for OP_CBRA (normal capturing bracket) and
@@ -845,8 +908,7 @@ for (;;)
case OP_ONCE:
case OP_ONCE_NC:
case OP_COND:
- d = find_fixedlength(cc + ((op == OP_CBRA)? IMM2_SIZE : 0), utf, atend, cb,
- recurses);
+ d = find_fixedlength(cc, utf, atend, cb, recurses, countptr);
if (d < 0) return d;
branchlength += d;
do cc += GET(cc, 1); while (*cc == OP_ALT);
@@ -865,30 +927,38 @@ for (;;)
case OP_ACCEPT:
case OP_ASSERT_ACCEPT:
if (length < 0) length = branchlength;
- else if (length != branchlength) return -1;
- if (*cc != OP_ALT) return length;
+ else if (length != branchlength) goto ISNOTFIXED;
+ if (*cc != OP_ALT)
+ {
+ if (group > 0)
+ {
+ groupinfo |= (GI_SET_FIXED_LENGTH | length);
+ cb->groupinfo[group] = groupinfo;
+ }
+ return length;
+ }
cc += 1 + LINK_SIZE;
branchlength = 0;
break;
/* A true recursion implies not fixed length, but a subroutine call may
be OK. If the subroutine is a forward reference, we can't deal with
- it until the end of the pattern, so return -3. */
+ it until the end of the pattern, so return FFL_LATER. */
case OP_RECURSE:
- if (!atend) return -3;
+ if (!atend) return FFL_LATER;
cs = ce = (PCRE2_UCHAR *)cb->start_code + GET(cc, 1); /* Start subpattern */
do ce += GET(ce, 1); while (*ce == OP_ALT); /* End subpattern */
- if (cc > cs && cc < ce) return -1; /* Recursion */
+ if (cc > cs && cc < ce) goto ISNOTFIXED; /* Recursion */
else /* Check for mutual recursion */
{
recurse_check *r = recurses;
for (r = recurses; r != NULL; r = r->prev) if (r->group == cs) break;
- if (r != NULL) return -1; /* Mutual recursion */
+ if (r != NULL) goto ISNOTFIXED; /* Mutual recursion */
}
this_recurse.prev = recurses;
this_recurse.group = cs;
- d = find_fixedlength(cs + IMM2_SIZE, utf, atend, cb, &this_recurse);
+ d = find_fixedlength(cs, utf, atend, cb, &this_recurse, countptr);
if (d < 0) return d;
branchlength += d;
cc += 1 + LINK_SIZE;
@@ -1010,7 +1080,7 @@ for (;;)
otherwise \C is coded as OP_ALLANY. */
case OP_ANYBYTE:
- return -2;
+ return FFL_BACKSLASHC;
/* Check a class for variable quantification */
@@ -1039,12 +1109,12 @@ for (;;)
case OP_CRPOSSTAR:
case OP_CRPOSPLUS:
case OP_CRPOSQUERY:
- return -1;
+ goto ISNOTFIXED;
case OP_CRRANGE:
case OP_CRMINRANGE:
case OP_CRPOSRANGE:
- if (GET2(cc,1) != GET2(cc,1+IMM2_SIZE)) return -1;
+ if (GET2(cc,1) != GET2(cc,1+IMM2_SIZE)) goto ISNOTFIXED;
branchlength += (int)GET2(cc,1);
cc += 1 + 2 * IMM2_SIZE;
break;
@@ -1136,16 +1206,24 @@ for (;;)
case OP_TYPEUPTO:
case OP_UPTO:
case OP_UPTOI:
- return -1;
+ goto ISNOTFIXED;
/* Catch unrecognized opcodes so that when new ones are added they
are not forgotten, as has happened in the past. */
default:
- return -4;
+ return FFL_UNKNOWNOP;
}
}
-/* Control never gets here */
+/* Control never gets here except by goto. */
+
+ISNOTFIXED:
+if (group > 0)
+ {
+ groupinfo |= GI_NOT_FIXED_LENGTH;
+ cb->groupinfo[group] = groupinfo;
+ }
+return FFL_NOTFIXED;
}
@@ -1215,30 +1293,72 @@ for (;;)
*************************************************/
/* This function scans through a branch of a compiled pattern to see whether it
-can match the empty string. It is called from could_be_empty() below and from
-compile_branch() when checking for an unlimited repeat of a group that can
-match nothing. Note that first_significant_code() skips over backward and
-negative forward assertions when its final argument is TRUE. If we hit an
-unclosed bracket, we return "empty" - this means we've struck an inner bracket
-whose current branch will already have been scanned.
+can match the empty string. It is called at the end of compiling to check the
+entire pattern, and from compile_branch() when checking for an unlimited repeat
+of a group that can match nothing. In the latter case it is called only when
+doing the real compile, not during the pre-compile that measures the size of
+the compiled pattern.
+
+Note that first_significant_code() skips over backward and negative forward
+assertions when its final argument is TRUE. If we hit an unclosed bracket, we
+return "empty" - this means we've struck an inner bracket whose current branch
+will already have been scanned.
Arguments:
code points to start of search
endcode points to where to stop
utf TRUE if in UTF mode
cb compile data
+ atend TRUE if being called to check an entire pattern
recurses chain of recurse_check to catch mutual recursion
+ countptr pointer to count to catch over-complicated pattern
-Returns: TRUE if what is matched could be empty
+Returns: 0 if what is matched cannot be empty
+ 1 if what is matched could be empty
+ -1 if the pattern is too complicated
*/
-static BOOL
+#define CBE_NOTEMPTY 0
+#define CBE_EMPTY 1
+#define CBE_TOOCOMPLICATED (-1)
+
+
+static int
could_be_empty_branch(PCRE2_SPTR code, PCRE2_SPTR endcode, BOOL utf,
- compile_block *cb, recurse_check *recurses)
+ compile_block *cb, BOOL atend, recurse_check *recurses, int *countptr)
{
+uint32_t group = 0;
+uint32_t groupinfo = 0;
register PCRE2_UCHAR c;
recurse_check this_recurse;
+/* If what we are checking has already been set as "could be empty", we know
+the answer. */
+
+if (*code >= OP_SBRA && *code <= OP_SCOND) return CBE_EMPTY;
+
+/* If this is a capturing group, we may have the answer cached, but we can only
+use this information if there are no (?| groups in the pattern, because
+otherwise group numbers are not unique. */
+
+if ((cb->external_flags & PCRE2_DUPCAPUSED) == 0 &&
+ (*code == OP_CBRA || *code == OP_CBRAPOS))
+ {
+ group = GET2(code, 1 + LINK_SIZE);
+ groupinfo = cb->groupinfo[group];
+ if ((groupinfo & GI_SET_COULD_BE_EMPTY) != 0)
+ return ((groupinfo & GI_COULD_BE_EMPTY) != 0)? CBE_EMPTY : CBE_NOTEMPTY;
+ }
+
+/* A large and/or complex regex can take too long to process. We have to assume
+it can match an empty string. This can happen more often when (?| groups are
+present in the pattern and the caching is disabled. Setting the cap at 1100
+allows the test for more than 1023 capturing patterns to work. */
+
+if ((*countptr)++ > 1100) return CBE_TOOCOMPLICATED;
+
+/* Scan the opcodes for this branch. */
+
for (code = first_significant_code(code + PRIV(OP_lengths)[*code], TRUE);
code < endcode;
code = first_significant_code(code + PRIV(OP_lengths)[c], TRUE))
@@ -1257,35 +1377,27 @@ for (code = first_significant_code(code + PRIV(OP_lengths)[*code], TRUE);
continue;
}
- /* For a recursion/subroutine call, if its end has been reached, which
- implies a backward reference subroutine call, we can scan it. If it's a
- forward reference subroutine call, we can't. To detect forward reference
- we have to scan up the list that is kept in the workspace. This function is
- called only when doing the real compile, not during the pre-compile that
- measures the size of the compiled pattern. */
+ /* For a recursion/subroutine call we can scan the recursion when this
+ function is called at the end, to check a complete pattern. Before then,
+ recursions just have the group number as their argument and in any case may
+ be forward references. In that situation, we return CBE_EMPTY, just in case.
+ It means that unlimited repeats of groups that contain recursions are always
+ treated as "could be empty" - which just adds a bit more processing time
+ because of the runtime check. */
if (c == OP_RECURSE)
{
- PCRE2_SPTR scode = cb->start_code + GET(code, 1);
- PCRE2_SPTR endgroup = scode;
+ PCRE2_SPTR scode, endgroup;
BOOL empty_branch;
- /* Test for forward reference or uncompleted reference. This is disabled
- when called to scan a completed pattern by setting cb->start_workspace to
- NULL. */
+ if (!atend) goto ISTRUE;
+ scode = cb->start_code + GET(code, 1);
+ endgroup = scode;
- if (cb->start_workspace != NULL)
- {
- PCRE2_SPTR tcode;
- for (tcode = cb->start_workspace; tcode < cb->hwm; tcode += LINK_SIZE)
- if ((int)GET(tcode, 0) == (int)(code + 1 - cb->start_code)) return TRUE;
- if (GET(scode, 1) == 0) return TRUE; /* Unclosed */
- }
-
- /* If the reference is to a completed group, we need to detect whether this
- is a recursive call, as otherwise there will be an infinite loop. If it is
- a recursion, just skip over it. Simple recursions are easily detected. For
- mutual recursions we keep a chain on the stack. */
+ /* We need to detect whether this is a recursive call, as otherwise there
+ will be an infinite loop. If it is a recursion, just skip over it. Simple
+ recursions are easily detected. For mutual recursions we keep a chain on
+ the stack. */
do endgroup += GET(endgroup, 1); while (*endgroup == OP_ALT);
if (code >= scode && code <= endgroup) continue; /* Simple recursion */
@@ -1297,8 +1409,8 @@ for (code = first_significant_code(code + PRIV(OP_lengths)[*code], TRUE);
if (r != NULL) continue; /* Mutual recursion */
}
- /* Completed reference; scan the referenced group, remembering it on the
- stack chain to detect mutual recursions. */
+ /* Scan the referenced group, remembering it on the stack chain to detect
+ mutual recursions. */
empty_branch = FALSE;
this_recurse.prev = recurses;
@@ -1306,7 +1418,10 @@ for (code = first_significant_code(code + PRIV(OP_lengths)[*code], TRUE);
do
{
- if (could_be_empty_branch(scode, endcode, utf, cb, &this_recurse))
+ int rc = could_be_empty_branch(scode, endcode, utf, cb, atend,
+ &this_recurse, countptr);
+ if (rc < 0) return rc;
+ if (rc > 0)
{
empty_branch = TRUE;
break;
@@ -1315,7 +1430,7 @@ for (code = first_significant_code(code + PRIV(OP_lengths)[*code], TRUE);
}
while (*scode == OP_ALT);
- if (!empty_branch) return FALSE; /* All branches are non-empty */
+ if (!empty_branch) goto ISFALSE; /* All branches are non-empty */
continue;
}
@@ -1349,7 +1464,7 @@ for (code = first_significant_code(code + PRIV(OP_lengths)[*code], TRUE);
c == OP_COND || c == OP_SCOND)
{
BOOL empty_branch;
- if (GET(code, 1) == 0) return TRUE; /* Hit unclosed bracket */
+ if (GET(code, 1) == 0) goto ISTRUE; /* Hit unclosed bracket */
/* If a conditional group has only one branch, there is a second, implied,
empty branch, so just skip over the conditional, because it could be empty.
@@ -1362,12 +1477,17 @@ for (code = first_significant_code(code + PRIV(OP_lengths)[*code], TRUE);
empty_branch = FALSE;
do
{
- if (!empty_branch && could_be_empty_branch(code, endcode, utf, cb,
- recurses)) empty_branch = TRUE;
+ if (!empty_branch)
+ {
+ int rc = could_be_empty_branch(code, endcode, utf, cb, atend,
+ recurses, countptr);
+ if (rc < 0) return rc;
+ if (rc > 0) empty_branch = TRUE;
+ }
code += GET(code, 1);
}
while (*code == OP_ALT);
- if (!empty_branch) return FALSE; /* All branches are non-empty */
+ if (!empty_branch) goto ISFALSE; /* All branches are non-empty */
}
c = *code;
@@ -1412,12 +1532,12 @@ for (code = first_significant_code(code + PRIV(OP_lengths)[*code], TRUE);
case OP_CRPLUS: /* These repeats aren't empty */
case OP_CRMINPLUS:
case OP_CRPOSPLUS:
- return FALSE;
+ goto ISFALSE;
case OP_CRRANGE:
case OP_CRMINRANGE:
case OP_CRPOSRANGE:
- if (GET2(ccode, 1) > 0) return FALSE; /* Minimum > 0 */
+ if (GET2(ccode, 1) > 0) goto ISFALSE; /* Minimum > 0 */
break;
}
break;
@@ -1474,8 +1594,7 @@ for (code = first_significant_code(code + PRIV(OP_lengths)[*code], TRUE);
case OP_TYPEMINPLUS:
case OP_TYPEPOSPLUS:
case OP_TYPEEXACT:
-
- return FALSE;
+ goto ISFALSE;
/* These are going to continue, as they may be empty, but we have to
fudge the length for the \p and \P cases. */
@@ -1505,7 +1624,7 @@ for (code = first_significant_code(code + PRIV(OP_lengths)[*code], TRUE);
case OP_KETRMIN:
case OP_KETRPOS:
case OP_ALT:
- return TRUE;
+ goto ISTRUE;
/* In UTF-8 or UTF-16 mode, STAR, MINSTAR, POSSTAR, QUERY, MINQUERY,
POSQUERY, UPTO, MINUPTO, and POSUPTO and their caseless and negative
@@ -1579,78 +1698,13 @@ for (code = first_significant_code(code + PRIV(OP_lengths)[*code], TRUE);
}
}
-return TRUE;
-}
-
+ISTRUE:
+groupinfo |= GI_COULD_BE_EMPTY;
+ISFALSE:
+if (group > 0) cb->groupinfo[group] = groupinfo | GI_SET_COULD_BE_EMPTY;
-/*************************************************
-* Scan compiled regex for non-emptiness *
-*************************************************/
-
-/* This function is called to check for left recursive calls. We want to check
-the current branch of the current pattern to see if it could match the empty
-string. If it could, we must look outwards for branches at other levels,
-stopping when we pass beyond the bracket which is the subject of the recursion.
-This function is called only during the real compile, not during the
-pre-compile.
-
-Arguments:
- code points to start of the recursion
- endcode points to where to stop (current RECURSE item)
- bcptr points to the chain of current (unclosed) branch starts
- utf TRUE if in UTF mode
- cb compile data
-
-Returns: TRUE if what is matched could be empty
-*/
-
-static BOOL
-could_be_empty(PCRE2_SPTR code, PCRE2_SPTR endcode, branch_chain *bcptr,
- BOOL utf, compile_block *cb)
-{
-while (bcptr != NULL && bcptr->current_branch >= code)
- {
- if (!could_be_empty_branch(bcptr->current_branch, endcode, utf, cb, NULL))
- return FALSE;
- bcptr = bcptr->outer;
- }
-return TRUE;
-}
-
-
-
-/*************************************************
-* Expand the workspace *
-*************************************************/
-
-/* This function is called during the second compiling phase, if the number of
-forward references fills the existing workspace, which is originally a block on
-the stack. A larger block is obtained from the heap unless the ultimate limit
-has been reached or the increase will be rather small.
-
-Argument: pointer to the compile data block
-Returns: 0 if all went well, else an error number
-*/
-
-static int
-expand_workspace(compile_block *cb)
-{
-PCRE2_UCHAR *newspace;
-int newsize = cb->workspace_size * 2;
-if (newsize > COMPILE_WORK_SIZE_MAX) newsize = COMPILE_WORK_SIZE_MAX;
-if (cb->workspace_size >= COMPILE_WORK_SIZE_MAX ||
- newsize - cb->workspace_size < WORK_SIZE_SAFETY_MARGIN)
- return ERR72;
-newspace = cb->cx->memctl.malloc(CU2BYTES(newsize), cb->cx->memctl.memory_data);
-if (newspace == NULL) return ERR21;
-memcpy(newspace, cb->start_workspace, cb->workspace_size * sizeof(PCRE2_UCHAR));
-cb->hwm = (PCRE2_UCHAR *)newspace + (cb->hwm - cb->start_workspace);
-if (cb->workspace_size > COMPILE_WORK_SIZE)
- cb->cx->memctl.free((void *)cb->start_workspace, cb->cx->memctl.memory_data);
-cb->start_workspace = newspace;
-cb->workspace_size = newsize;
-return 0;
+return ((groupinfo & GI_COULD_BE_EMPTY) != 0)? CBE_EMPTY : CBE_NOTEMPTY;
}
@@ -1697,8 +1751,22 @@ is placed in chptr. A backreference to group n is returned as negative n. On
entry, ptr is pointing at the \. On exit, it points the final code unit of the
escape sequence.
+This function is also called from pcre2_substitute() to handle escape sequences
+in replacement strings. In this case, the cb argument is NULL, and only
+sequences that define a data character are recognised. The isclass argument is
+not relevant, but the options argument is the final value of the compiled
+pattern's options.
+
+There is one "trick" case: when a sequence such as [[:>:]] or \s in UCP mode is
+processed, it is replaced by a nested alternative sequence. If this contains a
+backslash (which is usually does), ptrend does not point to its end - it still
+points to the end of the whole pattern. However, we can detect this case
+because cb->nestptr[0] will be non-NULL. The nested sequences are all zero-
+terminated and there are only ever two levels of nesting.
+
Arguments:
- ptrptr points to the pattern position pointer
+ ptrptr points to the input position pointer
+ ptrend points to the end of the input
chptr points to a returned data character
errorcodeptr points to the errorcode variable (containing zero)
options the current options bits
@@ -1711,9 +1779,9 @@ Returns: zero => a data character
on error, errorcodeptr is set non-zero
*/
-static int
-check_escape(PCRE2_SPTR *ptrptr, uint32_t *chptr, int *errorcodeptr,
- uint32_t options, BOOL isclass, compile_block *cb)
+int
+PRIV(check_escape)(PCRE2_SPTR *ptrptr, PCRE2_SPTR ptrend, uint32_t *chptr,
+ int *errorcodeptr, uint32_t options, BOOL isclass, compile_block *cb)
{
BOOL utf = (options & PCRE2_UTF) != 0;
PCRE2_SPTR ptr = *ptrptr + 1;
@@ -1721,19 +1789,28 @@ register uint32_t c, cc;
int escape = 0;
int i;
-GETCHARINCTEST(c, ptr); /* Get character value, increment pointer */
-ptr--; /* Set pointer back to the last code unit */
+/* Find the end of a nested insert. */
-/* If backslash is at the end of the pattern, it's an error. */
+if (cb != NULL && cb->nestptr[0] != NULL)
+ ptrend = ptr + PRIV(strlen)(ptr);
-if (c == CHAR_NULL && ptr >= cb->end_pattern) *errorcodeptr = ERR1;
+/* If backslash is at the end of the string, it's an error. */
+
+if (ptr >= ptrend)
+ {
+ *errorcodeptr = ERR1;
+ return 0;
+ }
+
+GETCHARINCTEST(c, ptr); /* Get character value, increment pointer */
+ptr--; /* Set pointer back to the last code unit */
/* Non-alphanumerics are literals, so we just leave the value in c. An initial
value test saves a memory lookup for code points outside the alphanumeric
range. Otherwise, do a table lookup. A non-zero result is something that can be
returned immediately. Otherwise further processing is required. */
-else if (c < ESCAPES_FIRST || c > ESCAPES_LAST) {} /* Definitely literal */
+if (c < ESCAPES_FIRST || c > ESCAPES_LAST) {} /* Definitely literal */
else if ((i = escapes[c - ESCAPES_FIRST]) != 0)
{
@@ -1745,7 +1822,9 @@ else if ((i = escapes[c - ESCAPES_FIRST]) != 0)
}
}
-/* Escapes that need further processing, including those that are unknown. */
+/* Escapes that need further processing, including those that are unknown.
+When called from pcre2_substitute(), only \c, \o, and \x are recognized (and \u
+when BSUX is set). */
else
{
@@ -1753,6 +1832,15 @@ else
BOOL braced, negated, overflow;
unsigned int s;
+ /* Filter calls from pcre2_substitute(). */
+
+ if (cb == NULL && c != CHAR_c && c != CHAR_o && c != CHAR_x &&
+ (c != CHAR_u || (options & PCRE2_ALT_BSUX) != 0))
+ {
+ *errorcodeptr = ERR3;
+ return 0;
+ }
+
switch (c)
{
/* A number of Perl escapes are not handled by PCRE. We give an explicit
@@ -1884,7 +1972,7 @@ else
s = cb->bracount - (s - 1);
}
- escape = -s;
+ escape = -(int)s;
break;
/* The handling of escape sequences consisting of a string of digits
@@ -1896,8 +1984,7 @@ else
number is less than 10, or if there are that many previous extracting left
brackets, it is a back reference. Otherwise, up to three octal digits are
read to form an escaped character code. Thus \123 is likely to be octal 123
- (cf \0123, which is octal 012 followed by the literal 3). If the octal
- value is greater than 377, the least significant 8 bits are taken.
+ (cf \0123, which is octal 012 followed by the literal 3).
Inside a character class, \ followed by a digit is always either a literal
8 or 9 or an octal number. */
@@ -1909,7 +1996,7 @@ else
{
oldptr = ptr;
/* The integer range is limited by the machine's int representation. */
- s = (int)(c - CHAR_0);
+ s = c - CHAR_0;
overflow = FALSE;
while (IS_DIGIT(ptr[1]))
{
@@ -1927,13 +2014,12 @@ else
break;
}
- /* \1 to \9 are always back references. \8x and \9x are too, unless there
- are an awful lot of previous captures; \1x to \7x are octal escapes if
- there are not that many previous captures. */
+ /* \1 to \9 are always back references. \8x and \9x are too; \1x to \7x
+ are octal escapes if there are not that many previous captures. */
if (s < 10 || *oldptr >= CHAR_8 || s <= cb->bracount)
{
- escape = -s; /* Indicates a back reference */
+ escape = -(int)s; /* Indicates a back reference */
break;
}
ptr = oldptr; /* Put the pointer back and fall through */
@@ -1981,7 +2067,7 @@ else
#if PCRE2_CODE_UNIT_WIDTH == 32
if (c >= 0x20000000l) { overflow = TRUE; break; }
#endif
- c = (c << 3) + cc - CHAR_0 ;
+ c = (c << 3) + (cc - CHAR_0);
#if PCRE2_CODE_UNIT_WIDTH == 8
if (c > (utf ? 0x10ffffU : 0xffU)) { overflow = TRUE; break; }
#elif PCRE2_CODE_UNIT_WIDTH == 16
@@ -2105,8 +2191,8 @@ else
#endif
c = *(++ptr);
- if (c >= CHAR_a && c <= CHAR_z) c += ESCAPES_UPPER_CASE;
- if (c == CHAR_NULL && ptr >= cb->end_pattern)
+ if (c >= CHAR_a && c <= CHAR_z) c = UPPER_CASE(c);
+ if (c == CHAR_NULL && ptr >= ptrend)
{
*errorcodeptr = ERR2;
break;
@@ -2334,175 +2420,6 @@ return p;
/*************************************************
-* Scan compiled regex for specific bracket *
-*************************************************/
-
-/* This function scans through a compiled pattern until it finds a
-capturing bracket with the given number, or, if the number is negative, an
-instance of OP_REVERSE for a lookbehind. The function is global in the C sense
-so that it can be called from pcre2_study() when finding the minimum matching
-length.
-
-Arguments:
- code points to start of expression
- utf TRUE in UTF mode
- number the required bracket number or negative to find a lookbehind
-
-Returns: pointer to the opcode for the bracket, or NULL if not found
-*/
-
-PCRE2_SPTR
-PRIV(find_bracket)(PCRE2_SPTR code, BOOL utf, int number)
-{
-for (;;)
- {
- register PCRE2_UCHAR c = *code;
-
- if (c == OP_END) return NULL;
-
- /* XCLASS is used for classes that cannot be represented just by a bit map.
- This includes negated single high-valued characters. CALLOUT_STR is used for
- callouts with string arguments. In both cases the length in the table is
- zero; the actual length is stored in the compiled code. */
-
- if (c == OP_XCLASS) code += GET(code, 1);
- else if (c == OP_CALLOUT_STR) code += GET(code, 1 + 2*LINK_SIZE);
-
- /* Handle recursion */
-
- else if (c == OP_REVERSE)
- {
- if (number < 0) return (PCRE2_UCHAR *)code;
- code += PRIV(OP_lengths)[c];
- }
-
- /* Handle capturing bracket */
-
- else if (c == OP_CBRA || c == OP_SCBRA ||
- c == OP_CBRAPOS || c == OP_SCBRAPOS)
- {
- int n = (int)GET2(code, 1+LINK_SIZE);
- if (n == number) return (PCRE2_UCHAR *)code;
- code += PRIV(OP_lengths)[c];
- }
-
- /* Otherwise, we can get the item's length from the table, except that for
- repeated character types, we have to test for \p and \P, which have an extra
- two bytes of parameters, and for MARK/PRUNE/SKIP/THEN with an argument, we
- must add in its length. */
-
- else
- {
- switch(c)
- {
- case OP_TYPESTAR:
- case OP_TYPEMINSTAR:
- case OP_TYPEPLUS:
- case OP_TYPEMINPLUS:
- case OP_TYPEQUERY:
- case OP_TYPEMINQUERY:
- case OP_TYPEPOSSTAR:
- case OP_TYPEPOSPLUS:
- case OP_TYPEPOSQUERY:
- if (code[1] == OP_PROP || code[1] == OP_NOTPROP) code += 2;
- break;
-
- case OP_TYPEUPTO:
- case OP_TYPEMINUPTO:
- case OP_TYPEEXACT:
- case OP_TYPEPOSUPTO:
- if (code[1 + IMM2_SIZE] == OP_PROP || code[1 + IMM2_SIZE] == OP_NOTPROP)
- code += 2;
- break;
-
- case OP_MARK:
- case OP_PRUNE_ARG:
- case OP_SKIP_ARG:
- case OP_THEN_ARG:
- code += code[1];
- break;
- }
-
- /* Add in the fixed length from the table */
-
- code += PRIV(OP_lengths)[c];
-
- /* In UTF-8 and UTF-16 modes, opcodes that are followed by a character may be
- followed by a multi-byte character. The length in the table is a minimum, so
- we have to arrange to skip the extra bytes. */
-
-#ifdef MAYBE_UTF_MULTI
- if (utf) switch(c)
- {
- case OP_CHAR:
- case OP_CHARI:
- case OP_NOT:
- case OP_NOTI:
- case OP_EXACT:
- case OP_EXACTI:
- case OP_NOTEXACT:
- case OP_NOTEXACTI:
- case OP_UPTO:
- case OP_UPTOI:
- case OP_NOTUPTO:
- case OP_NOTUPTOI:
- case OP_MINUPTO:
- case OP_MINUPTOI:
- case OP_NOTMINUPTO:
- case OP_NOTMINUPTOI:
- case OP_POSUPTO:
- case OP_POSUPTOI:
- case OP_NOTPOSUPTO:
- case OP_NOTPOSUPTOI:
- case OP_STAR:
- case OP_STARI:
- case OP_NOTSTAR:
- case OP_NOTSTARI:
- case OP_MINSTAR:
- case OP_MINSTARI:
- case OP_NOTMINSTAR:
- case OP_NOTMINSTARI:
- case OP_POSSTAR:
- case OP_POSSTARI:
- case OP_NOTPOSSTAR:
- case OP_NOTPOSSTARI:
- case OP_PLUS:
- case OP_PLUSI:
- case OP_NOTPLUS:
- case OP_NOTPLUSI:
- case OP_MINPLUS:
- case OP_MINPLUSI:
- case OP_NOTMINPLUS:
- case OP_NOTMINPLUSI:
- case OP_POSPLUS:
- case OP_POSPLUSI:
- case OP_NOTPOSPLUS:
- case OP_NOTPOSPLUSI:
- case OP_QUERY:
- case OP_QUERYI:
- case OP_NOTQUERY:
- case OP_NOTQUERYI:
- case OP_MINQUERY:
- case OP_MINQUERYI:
- case OP_NOTMINQUERY:
- case OP_NOTMINQUERYI:
- case OP_POSQUERY:
- case OP_POSQUERYI:
- case OP_NOTPOSQUERY:
- case OP_NOTPOSQUERYI:
- if (HAS_EXTRALEN(code[-1])) code += GET_EXTRALEN(code[-1]);
- break;
- }
-#else
- (void)(utf); /* Keep compiler happy by referencing function argument */
-#endif /* MAYBE_UTF_MULTI */
- }
- }
-}
-
-
-
-/*************************************************
* Scan compiled regex for recursion reference *
*************************************************/
@@ -2650,82 +2567,6 @@ for (;;)
/*************************************************
-* Adjust OP_RECURSE items in repeated group *
-*************************************************/
-
-/* OP_RECURSE items contain an offset from the start of the regex to the group
-that is referenced. This means that groups can be replicated for fixed
-repetition simply by copying (because the recursion is allowed to refer to
-earlier groups that are outside the current group). However, when a group is
-optional (i.e. the minimum quantifier is zero), OP_BRAZERO or OP_SKIPZERO is
-inserted before it, after it has been compiled. This means that any OP_RECURSE
-items within it that refer to the group itself or any contained groups have to
-have their offsets adjusted. That is one of the jobs of this function. Before
-it is called, the partially compiled regex must be temporarily terminated with
-OP_END.
-
-This function has been extended to cope with forward references for recursions
-and subroutine calls. It must check the list of such references for the
-group we are dealing with. If it finds that one of the recursions in the
-current group is on this list, it does not adjust the value in the reference
-(which is a group number). After the group has been scanned, all the offsets in
-the forward reference list for the group are adjusted.
-
-Arguments:
- group points to the start of the group
- adjust the amount by which the group is to be moved
- utf TRUE in UTF mode
- cb compile data
- save_hwm_offset the hwm forward reference offset at the start of the group
-
-Returns: nothing
-*/
-
-static void
-adjust_recurse(PCRE2_UCHAR *group, int adjust, BOOL utf, compile_block *cb,
- size_t save_hwm_offset)
-{
-uint32_t offset;
-PCRE2_UCHAR *hc;
-PCRE2_UCHAR *ptr = group;
-
-/* Scan the group for recursions. For each one found, check the forward
-reference list. */
-
-while ((ptr = (PCRE2_UCHAR *)find_recurse(ptr, utf)) != NULL)
- {
- for (hc = (PCRE2_UCHAR *)cb->start_workspace + save_hwm_offset; hc < cb->hwm;
- hc += LINK_SIZE)
- {
- offset = (int)GET(hc, 0);
- if (cb->start_code + offset == ptr + 1) break;
- }
-
- /* If we have not found this recursion on the forward reference list, adjust
- the recursion's offset if it's after the start of this group. */
-
- if (hc >= cb->hwm)
- {
- offset = (int)GET(ptr, 1);
- if (cb->start_code + offset >= group) PUT(ptr, 1, offset + adjust);
- }
-
- ptr += 1 + LINK_SIZE;
- }
-
-/* Now adjust all forward reference offsets for the group. */
-
-for (hc = (PCRE2_UCHAR *)cb->start_workspace + save_hwm_offset; hc < cb->hwm;
- hc += LINK_SIZE)
- {
- offset = (int)GET(hc, 0);
- PUT(hc, 0, offset + adjust);
- }
-}
-
-
-
-/*************************************************
* Check for POSIX class syntax *
*************************************************/
@@ -2743,16 +2584,18 @@ didn't consider this to be a POSIX class. Likewise for [:1234:].
The problem in trying to be exactly like Perl is in the handling of escapes. We
have to be sure that [abc[:x\]pqr] is *not* treated as containing a POSIX
class, but [abc[:x\]pqr:]] is (so that an error can be generated). The code
-below handles the special case of \], but does not try to do any other escape
-processing. This makes it different from Perl for cases such as [:l\ower:]
-where Perl recognizes it as the POSIX class "lower" but PCRE does not recognize
-"l\ower". This is a lesser evil than not diagnosing bad classes when Perl does,
-I think.
+below handles the special cases \\ and \], but does not try to do any other
+escape processing. This makes it different from Perl for cases such as
+[:l\ower:] where Perl recognizes it as the POSIX class "lower" but PCRE does
+not recognize "l\ower". This is a lesser evil than not diagnosing bad classes
+when Perl does, I think.
A user pointed out that PCRE was rejecting [:a[:digit:]] whereas Perl was not.
It seems that the appearance of a nested POSIX class supersedes an apparent
external class. For example, [:a[:digit:]b:] matches "a", "b", ":", or
-a digit.
+a digit. This is handled by returning FALSE if the start of a new group with
+the same terminator is encountered, since the next closing sequence must close
+the nested group, not the outer one.
In Perl, unescaped square brackets may also appear as part of class names. For
example, [:a[:abc]b:] gives unknown POSIX class "[:abc]b:]". However, for
@@ -2775,22 +2618,18 @@ terminator = *(++ptr); /* compiler warns about "non-constant" initializer. */
for (++ptr; *ptr != CHAR_NULL; ptr++)
{
- if (*ptr == CHAR_BACKSLASH && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET) ptr++;
- else if (*ptr == CHAR_RIGHT_SQUARE_BRACKET) return FALSE;
- else
+ if (*ptr == CHAR_BACKSLASH &&
+ (ptr[1] == CHAR_RIGHT_SQUARE_BRACKET || ptr[1] == CHAR_BACKSLASH))
+ ptr++;
+ else if ((*ptr == CHAR_LEFT_SQUARE_BRACKET && ptr[1] == terminator) ||
+ *ptr == CHAR_RIGHT_SQUARE_BRACKET) return FALSE;
+ else if (*ptr == terminator && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)
{
- if (*ptr == terminator && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)
- {
- *endptr = ptr;
- return TRUE;
- }
- if (*ptr == CHAR_LEFT_SQUARE_BRACKET &&
- (ptr[1] == CHAR_COLON || ptr[1] == CHAR_DOT ||
- ptr[1] == CHAR_EQUALS_SIGN) &&
- check_posix_syntax(ptr, endptr))
- return FALSE;
+ *endptr = ptr;
+ return TRUE;
}
}
+
return FALSE;
}
@@ -3127,6 +2966,187 @@ return n8;
/*************************************************
+* Process (*VERB) name for escapes *
+*************************************************/
+
+/* This function is called when the PCRE2_ALT_VERBNAMES option is set, to
+process the characters in a verb's name argument. It is called twice, once with
+codeptr == NULL, to find out the length of the processed name, and again to put
+the name into memory.
+
+Arguments:
+ ptrptr pointer to the input pointer
+ codeptr pointer to the compiled code pointer
+ errorcodeptr pointer to the error code
+ options the options bits
+ utf TRUE if processing UTF
+ cb compile data block
+
+Returns: length of the processed name, or < 0 on error
+*/
+
+static int
+process_verb_name(PCRE2_SPTR *ptrptr, PCRE2_UCHAR **codeptr, int *errorcodeptr,
+ uint32_t options, BOOL utf, compile_block *cb)
+{
+int32_t arglen = 0;
+BOOL inescq = FALSE;
+PCRE2_SPTR ptr = *ptrptr;
+PCRE2_UCHAR *code = (codeptr == NULL)? NULL : *codeptr;
+
+for (; ptr < cb->end_pattern; ptr++)
+ {
+ uint32_t x = *ptr;
+
+ /* Skip over literals */
+
+ if (inescq)
+ {
+ if (x == CHAR_BACKSLASH && ptr[1] == CHAR_E)
+ {
+ inescq = FALSE;
+ ptr++;;
+ continue;
+ }
+ }
+
+ else /* Not a literal character */
+ {
+ if (x == CHAR_RIGHT_PARENTHESIS) break;
+
+ /* Skip over comments and whitespace in extended mode. */
+
+ if ((options & PCRE2_EXTENDED) != 0)
+ {
+ PCRE2_SPTR wscptr = ptr;
+ while (MAX_255(x) && (cb->ctypes[x] & ctype_space) != 0) x = *(++ptr);
+ if (x == CHAR_NUMBER_SIGN)
+ {
+ ptr++;
+ while (*ptr != CHAR_NULL || ptr < cb->end_pattern)
+ {
+ if (IS_NEWLINE(ptr)) /* For non-fixed-length newline cases, */
+ { /* IS_NEWLINE sets cb->nllen. */
+ ptr += cb->nllen;
+ break;
+ }
+ ptr++;
+#ifdef SUPPORT_UNICODE
+ if (utf) FORWARDCHAR(ptr);
+#endif
+ }
+ }
+
+ /* If we have skipped any characters, restart the loop. */
+
+ if (ptr > wscptr)
+ {
+ ptr--;
+ continue;
+ }
+ }
+
+ /* Process escapes */
+
+ if (x == '\\')
+ {
+ int rc;
+ *errorcodeptr = 0;
+ rc = PRIV(check_escape)(&ptr, cb->end_pattern, &x, errorcodeptr, options,
+ FALSE, cb);
+ *ptrptr = ptr; /* For possible error */
+ if (*errorcodeptr != 0) return -1;
+ if (rc != 0)
+ {
+ if (rc == ESC_Q)
+ {
+ inescq = TRUE;
+ continue;
+ }
+ if (rc == ESC_E) continue;
+ *errorcodeptr = ERR40;
+ return -1;
+ }
+ }
+ }
+
+ /* We have the next character in the name. */
+
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ if (code == NULL) /* Just want the length */
+ {
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ int i;
+ for (i = 0; i < PRIV(utf8_table1_size); i++)
+ if ((int)x <= PRIV(utf8_table1)[i]) break;
+ arglen += i;
+#elif PCRE2_CODE_UNIT_WIDTH == 16
+ if (x > 0xffff) arglen++;
+#endif
+ }
+ else
+ {
+ PCRE2_UCHAR cbuff[8];
+ x = PRIV(ord2utf)(x, cbuff);
+ memcpy(code, cbuff, CU2BYTES(x));
+ code += x;
+ }
+ }
+ else
+#endif /* SUPPORT_UNICODE */
+
+ /* Not UTF */
+ {
+ if (code != NULL) *code++ = x;
+ }
+
+ arglen++;
+
+ if ((unsigned int)arglen > MAX_MARK)
+ {
+ *errorcodeptr = ERR76;
+ *ptrptr = ptr;
+ return -1;
+ }
+ }
+
+/* Update the pointers before returning. */
+
+*ptrptr = ptr;
+if (codeptr != NULL) *codeptr = code;
+return arglen;
+}
+
+
+
+/*************************************************
+* Macro for the next two functions *
+*************************************************/
+
+/* Both scan_for_captures() and compile_branch() use this macro to generate a
+fragment of code that reads the characters of a name and sets its length
+(checking for not being too long). Count the characters dynamically, to avoid
+the possibility of integer overflow. The same macro is used for reading *VERB
+names. */
+
+#define READ_NAME(ctype, errno, errset) \
+ namelen = 0; \
+ while (MAX_255(*ptr) && (cb->ctypes[*ptr] & ctype) != 0) \
+ { \
+ ptr++; \
+ namelen++; \
+ if (namelen > MAX_NAME_SIZE) \
+ { \
+ errset = errno; \
+ goto FAILED; \
+ } \
+ }
+
+
+
+/*************************************************
* Scan regex to identify named groups *
*************************************************/
@@ -3157,6 +3177,7 @@ static uint32_t scan_for_captures(PCRE2_SPTR *ptrptr, uint32_t options,
compile_block *cb)
{
uint32_t c;
+uint32_t delimiter;
uint32_t nest_depth = 0;
uint32_t set, unset, *optset;
int errorcode = 0;
@@ -3165,18 +3186,39 @@ int namelen;
int i;
BOOL inescq = FALSE;
BOOL isdupname;
+BOOL skiptoket = FALSE;
BOOL utf = (options & PCRE2_UTF) != 0;
BOOL negate_class;
PCRE2_SPTR name;
+PCRE2_SPTR start;
PCRE2_SPTR ptr = *ptrptr;
named_group *ng;
nest_save *top_nest = NULL;
nest_save *end_nests = (nest_save *)(cb->start_workspace + cb->workspace_size);
+/* The size of the nest_save structure might not be a factor of the size of the
+workspace. Therefore we must round down end_nests so as to correctly avoid
+creating a nest_save that spans the end of the workspace. */
+
+end_nests = (nest_save *)((char *)end_nests -
+ ((cb->workspace_size * sizeof(PCRE2_UCHAR)) % sizeof(nest_save)));
+
+/* Now scan the pattern */
+
for (; ptr < cb->end_pattern; ptr++)
{
c = *ptr;
+ /* Parenthesized groups set skiptoket when all following characters up to the
+ next closing parenthesis must be ignored. The parenthesis itself must be
+ processed (to end the nested parenthesized item). */
+
+ if (skiptoket)
+ {
+ if (c != CHAR_RIGHT_PARENTHESIS) continue;
+ skiptoket = FALSE;
+ }
+
/* Skip over literals */
if (inescq)
@@ -3226,7 +3268,8 @@ for (; ptr < cb->end_pattern; ptr++)
case CHAR_BACKSLASH:
errorcode = 0;
- escape = check_escape(&ptr, &c, &errorcode, options, FALSE, cb);
+ escape = PRIV(check_escape)(&ptr, cb->end_pattern, &c, &errorcode, options,
+ FALSE, cb);
if (errorcode != 0) goto FAILED;
if (escape == ESC_Q) inescq = TRUE;
break;
@@ -3238,7 +3281,7 @@ for (; ptr < cb->end_pattern; ptr++)
if (PRIV(strncmp_c8)(ptr+1, STRING_WEIRD_STARTWORD, 6) == 0 ||
PRIV(strncmp_c8)(ptr+1, STRING_WEIRD_ENDWORD, 6) == 0)
{
- ptr += 7;
+ ptr += 6;
break;
}
@@ -3273,6 +3316,8 @@ for (; ptr < cb->end_pattern; ptr++)
for (;;)
{
+ PCRE2_SPTR tempptr;
+
if (c == CHAR_NULL && ptr >= cb->end_pattern)
{
errorcode = ERR6; /* Missing terminating ']' */
@@ -3299,16 +3344,17 @@ for (; ptr < cb->end_pattern; ptr++)
}
/* Skip POSIX class names. */
-
if (c == CHAR_LEFT_SQUARE_BRACKET &&
(ptr[1] == CHAR_COLON || ptr[1] == CHAR_DOT ||
- ptr[1] == CHAR_EQUALS_SIGN) && check_posix_syntax(ptr, &ptr))
- ptr ++;
-
+ ptr[1] == CHAR_EQUALS_SIGN) && check_posix_syntax(ptr, &tempptr))
+ {
+ ptr = tempptr + 1;
+ }
else if (c == CHAR_BACKSLASH)
{
errorcode = 0;
- escape = check_escape(&ptr, &c, &errorcode, options, TRUE, cb);
+ escape = PRIV(check_escape)(&ptr, cb->end_pattern, &c, &errorcode,
+ options, TRUE, cb);
if (errorcode != 0) goto FAILED;
if (escape == ESC_Q) inescq = TRUE;
}
@@ -3326,13 +3372,34 @@ for (; ptr < cb->end_pattern; ptr++)
if (ptr[1] != CHAR_QUESTION_MARK)
{
- if (ptr[1] != CHAR_ASTERISK &&
- (options & PCRE2_NO_AUTO_CAPTURE) == 0)
- cb->bracount++; /* Capturing group */
- else /* (*something) - just skip to closing ket */
+ if (ptr[1] != CHAR_ASTERISK)
+ {
+ if ((options & PCRE2_NO_AUTO_CAPTURE) == 0) cb->bracount++;
+ }
+
+ /* (*something) - just skip to closing ket unless PCRE2_ALT_VERBNAMES is
+ set, in which case we have to process escapes in the string after the
+ name. */
+
+ else
{
ptr += 2;
- while (ptr < cb->end_pattern && *ptr != CHAR_RIGHT_PARENTHESIS) ptr++;
+ while (MAX_255(*ptr) && (cb->ctypes[*ptr] & ctype_word) != 0) ptr++;
+ if (*ptr == CHAR_COLON)
+ {
+ ptr++;
+ if ((options & PCRE2_ALT_VERBNAMES) != 0)
+ {
+ if (process_verb_name(&ptr, NULL, &errorcode, options, utf, cb) < 0)
+ goto FAILED;
+ }
+ else
+ {
+ while (ptr < cb->end_pattern && *ptr != CHAR_RIGHT_PARENTHESIS)
+ ptr++;
+ }
+ }
+ nest_depth--;
}
}
@@ -3342,10 +3409,14 @@ for (; ptr < cb->end_pattern; ptr++)
{
default:
ptr += 2;
- if (ptr[0] == CHAR_R || /* (?R) */
- ptr[0] == CHAR_C || /* (?C) */
- IS_DIGIT(ptr[0]) || /* (?n) */
- (ptr[0] == CHAR_MINUS && IS_DIGIT(ptr[1]))) break; /* (?-n) */
+ if (ptr[0] == CHAR_R || /* (?R) */
+ ptr[0] == CHAR_NUMBER_SIGN || /* (?#) */
+ IS_DIGIT(ptr[0]) || /* (?n) */
+ (ptr[0] == CHAR_MINUS && IS_DIGIT(ptr[1]))) /* (?-n) */
+ {
+ skiptoket = TRUE;
+ break;
+ }
/* Handle (?| and (?imsxJU: which are the only other valid forms. Both
need a new block on the nest stack. */
@@ -3366,6 +3437,7 @@ for (; ptr < cb->end_pattern; ptr++)
top_nest->reset_group = cb->bracount;
top_nest->max_group = cb->bracount;
top_nest->flags |= NSF_RESET;
+ cb->external_flags |= PCRE2_DUPCAPUSED;
break;
}
@@ -3420,19 +3492,93 @@ for (; ptr < cb->end_pattern; ptr++)
}
break;
- case CHAR_NUMBER_SIGN:
- ptr += 3;
- while (ptr < cb->end_pattern && *ptr != CHAR_RIGHT_PARENTHESIS) ptr++;
- if (*ptr != CHAR_RIGHT_PARENTHESIS)
+ /* Skip over a numerical or string argument for a callout. */
+
+ case CHAR_C:
+ ptr += 2;
+ if (ptr[1] == CHAR_RIGHT_PARENTHESIS) break;
+ if (IS_DIGIT(ptr[1]))
{
- errorcode = ERR18;
+ while (IS_DIGIT(ptr[1])) ptr++;
+ }
+
+ /* Handle a string argument */
+
+ else
+ {
+ ptr++;
+ delimiter = 0;
+ for (i = 0; PRIV(callout_start_delims)[i] != 0; i++)
+ {
+ if (*ptr == PRIV(callout_start_delims)[i])
+ {
+ delimiter = PRIV(callout_end_delims)[i];
+ break;
+ }
+ }
+
+ if (delimiter == 0)
+ {
+ errorcode = ERR82;
+ goto FAILED;
+ }
+
+ start = ptr;
+ do
+ {
+ if (++ptr >= cb->end_pattern)
+ {
+ errorcode = ERR81;
+ ptr = start; /* To give a more useful message */
+ goto FAILED;
+ }
+ if (ptr[0] == delimiter && ptr[1] == delimiter) ptr += 2;
+ }
+ while (ptr[0] != delimiter);
+ }
+
+ /* Check terminating ) */
+
+ if (ptr[1] != CHAR_RIGHT_PARENTHESIS)
+ {
+ errorcode = ERR39;
+ ptr++;
goto FAILED;
}
break;
+ /* Conditional group */
+
case CHAR_LEFT_PARENTHESIS:
- nest_depth++;
- /* Fall through */
+ if (ptr[3] != CHAR_QUESTION_MARK) /* Not assertion or callout */
+ {
+ nest_depth++;
+ ptr += 2;
+ break;
+ }
+
+ /* Must be an assertion or a callout */
+
+ switch(ptr[4])
+ {
+ case CHAR_LESS_THAN_SIGN:
+ if (ptr[5] != CHAR_EXCLAMATION_MARK && ptr[5] != CHAR_EQUALS_SIGN)
+ goto MISSING_ASSERTION;
+ /* Fall through */
+
+ case CHAR_C:
+ case CHAR_EXCLAMATION_MARK:
+ case CHAR_EQUALS_SIGN:
+ ptr++;
+ break;
+
+ default:
+ MISSING_ASSERTION:
+ ptr += 3; /* To improve error message */
+ errorcode = ERR28;
+ goto FAILED;
+ }
+ break;
case CHAR_COLON:
case CHAR_GREATER_THAN_SIGN:
@@ -3486,8 +3632,8 @@ for (; ptr < cb->end_pattern; ptr++)
goto FAILED;
}
- while (MAX_255(*ptr) && (cb->ctypes[*ptr] & ctype_word) != 0) ptr++;
- namelen = (int)(ptr - name);
+ /* Advance ptr, set namelen and check its length. */
+ READ_NAME(ctype_word, ERR48, errorcode);
if (*ptr != c)
{
@@ -3502,14 +3648,7 @@ for (; ptr < cb->end_pattern; ptr++)
}
if (namelen + IMM2_SIZE + 1 > cb->name_entry_size)
- {
cb->name_entry_size = namelen + IMM2_SIZE + 1;
- if (namelen > MAX_NAME_SIZE)
- {
- errorcode = ERR48;
- goto FAILED;
- }
- }
/* We have a valid name for this capturing group. */
@@ -3609,7 +3748,7 @@ for (; ptr < cb->end_pattern; ptr++)
if (top_nest == (nest_save *)(cb->start_workspace)) top_nest = NULL;
else top_nest--;
}
- nest_depth--;
+ if (nest_depth > 0) nest_depth--; /* Can be 0 for unmatched ) */
break;
}
}
@@ -3674,7 +3813,6 @@ int32_t req_caseopt, reqvary, tempreqvary;
int after_manual_callout = 0;
int escape;
size_t length_prevgroup = 0;
-size_t item_hwm_offset = 0;
register uint32_t c;
register PCRE2_UCHAR *code = *codeptr;
PCRE2_UCHAR *last_code = code;
@@ -3684,7 +3822,6 @@ BOOL inescq = FALSE;
BOOL groupsetfirstcu = FALSE;
PCRE2_SPTR ptr = *ptrptr;
PCRE2_SPTR tempptr;
-PCRE2_SPTR nestptr = NULL;
PCRE2_UCHAR *previous = NULL;
PCRE2_UCHAR *previous_callout = NULL;
uint8_t classbits[32];
@@ -3745,6 +3882,7 @@ for (;; ptr++)
{
BOOL negate_class;
BOOL should_flip_negation;
+ BOOL match_all_or_no_wide_chars;
BOOL possessive_quantifier;
BOOL is_quantifier;
BOOL is_recurse;
@@ -3772,12 +3910,14 @@ for (;; ptr++)
c = *ptr;
/* If we are at the end of a nested substitution, revert to the outer level
- string. Nesting only happens one level deep. */
+ string. Nesting only happens one or two levels deep, and the inserted string
+ is always zero terminated. */
- if (c == CHAR_NULL && nestptr != NULL)
+ if (c == CHAR_NULL && cb->nestptr[0] != NULL)
{
- ptr = nestptr;
- nestptr = NULL;
+ ptr = cb->nestptr[0];
+ cb->nestptr[0] = cb->nestptr[1];
+ cb->nestptr[1] = NULL;
c = *ptr;
}
@@ -3789,7 +3929,8 @@ for (;; ptr++)
if (code > cb->start_workspace + cb->workspace_size -
WORK_SIZE_SAFETY_MARGIN) /* Check for overrun */
{
- *errorcodeptr = ERR52;
+ *errorcodeptr = (code >= cb->start_workspace + cb->workspace_size)?
+ ERR52 : ERR86;
goto FAILED;
}
@@ -3831,19 +3972,18 @@ for (;; ptr++)
last_code = code;
}
- /* In the real compile phase, just check the workspace used by the forward
- reference list. */
-
- else if (cb->hwm > cb->start_workspace + cb->workspace_size -
- WORK_SIZE_SAFETY_MARGIN)
- {
- *errorcodeptr = ERR52;
- goto FAILED;
- }
+ /* Before doing anything else we must handle all the special items that do
+ nothing, and which may come between an item and its quantifier. Otherwise,
+ when auto-callouts are enabled, a callout gets incorrectly inserted before
+ the quantifier is recognized. After recognizing a "do nothing" item, restart
+ the loop in case another one follows. */
- /* If in \Q...\E, check for the end; if not, we have a literal */
+ /* If c is not NULL we are not at the end of the pattern. If it is NULL, we
+ may still be in the pattern with a NULL data item. In these cases, if we are
+ in \Q...\E, check for the \E that ends the literal string; if not, we have a
+ literal character. If not in \Q...\E, an isolated \E is ignored. */
- if (inescq && (c != CHAR_NULL || ptr < cb->end_pattern))
+ if (c != CHAR_NULL || ptr < cb->end_pattern)
{
if (c == CHAR_BACKSLASH && ptr[1] == CHAR_E)
{
@@ -3851,7 +3991,7 @@ for (;; ptr++)
ptr++;
continue;
}
- else
+ else if (inescq) /* Literal character */
{
if (previous_callout != NULL)
{
@@ -3866,20 +4006,29 @@ for (;; ptr++)
}
goto NORMAL_CHAR;
}
- /* Control does not reach here. */
+
+ /* Check for the start of a \Q...\E sequence. We must do this here rather
+ than later in case it is immediately followed by \E, which turns it into a
+ "do nothing" sequence. */
+
+ if (c == CHAR_BACKSLASH && ptr[1] == CHAR_Q)
+ {
+ inescq = TRUE;
+ ptr++;
+ continue;
+ }
}
- /* In extended mode, skip white space and comments. We need a loop in order
- to check for more white space and more comments after a comment. */
+ /* In extended mode, skip white space and #-comments that end at newline. */
if ((options & PCRE2_EXTENDED) != 0)
{
- for (;;)
+ PCRE2_SPTR wscptr = ptr;
+ while (MAX_255(c) && (cb->ctypes[c] & ctype_space) != 0) c = *(++ptr);
+ if (c == CHAR_NUMBER_SIGN)
{
- while (MAX_255(c) && (cb->ctypes[c] & ctype_space) != 0) c = *(++ptr);
- if (c != CHAR_NUMBER_SIGN) break;
ptr++;
- while (*ptr != CHAR_NULL)
+ while (ptr < cb->end_pattern)
{
if (IS_NEWLINE(ptr)) /* For non-fixed-length newline cases, */
{ /* IS_NEWLINE sets cb->nllen. */
@@ -3891,34 +4040,58 @@ for (;; ptr++)
if (utf) FORWARDCHAR(ptr);
#endif
}
- c = *ptr; /* Either NULL or the char after a newline */
}
+
+ /* If we skipped any characters, restart the loop. Otherwise, we didn't see
+ a comment. */
+
+ if (ptr > wscptr)
+ {
+ ptr--;
+ continue;
+ }
+ }
+
+ /* Skip over (?# comments. */
+
+ if (c == CHAR_LEFT_PARENTHESIS && ptr[1] == CHAR_QUESTION_MARK &&
+ ptr[2] == CHAR_NUMBER_SIGN)
+ {
+ ptr += 3;
+ while (ptr < cb->end_pattern && *ptr != CHAR_RIGHT_PARENTHESIS) ptr++;
+ if (*ptr != CHAR_RIGHT_PARENTHESIS)
+ {
+ *errorcodeptr = ERR18;
+ goto FAILED;
+ }
+ continue;
}
- /* See if the next thing is a quantifier. */
+ /* End of processing "do nothing" items. See if the next thing is a
+ quantifier. */
is_quantifier =
c == CHAR_ASTERISK || c == CHAR_PLUS || c == CHAR_QUESTION_MARK ||
(c == CHAR_LEFT_CURLY_BRACKET && is_counted_repeat(ptr+1));
- /* Fill in length of a previous callout, except when the next thing is a
- quantifier or when processing a property substitution string in UCP mode. */
+ /* Fill in length of a previous callout and create an auto callout if
+ required, except when the next thing is a quantifier or when processing a
+ property substitution string for \w etc in UCP mode. */
- if (!is_quantifier && previous_callout != NULL && nestptr == NULL &&
- after_manual_callout-- <= 0)
+ if (!is_quantifier && cb->nestptr[0] == NULL)
{
- if (lengthptr == NULL) /* Don't attempt in pre-compile phase */
- complete_callout(previous_callout, ptr, cb);
- previous_callout = NULL;
- }
-
- /* Create auto callout, except for quantifiers, or while processing property
- strings that are substituted for \w etc in UCP mode. */
+ if (previous_callout != NULL && after_manual_callout-- <= 0)
+ {
+ if (lengthptr == NULL) /* Don't attempt in pre-compile phase */
+ complete_callout(previous_callout, ptr, cb);
+ previous_callout = NULL;
+ }
- if ((options & PCRE2_AUTO_CALLOUT) != 0 && !is_quantifier && nestptr == NULL)
- {
- previous_callout = code;
- code = auto_callout(code, ptr, cb);
+ if ((options & PCRE2_AUTO_CALLOUT) != 0)
+ {
+ previous_callout = code;
+ code = auto_callout(code, ptr, cb);
+ }
}
/* Process the next pattern item. */
@@ -3982,7 +4155,6 @@ for (;; ptr++)
zeroreqcu = reqcu;
zeroreqcuflags = reqcuflags;
previous = code;
- item_hwm_offset = cb->hwm - cb->start_workspace;
*code++ = ((options & PCRE2_DOTALL) != 0)? OP_ALLANY: OP_ANY;
break;
@@ -4008,28 +4180,31 @@ for (;; ptr++)
In another (POSIX) regex library, the ugly syntax [[:<:]] and [[:>:]] is
used for "start of word" and "end of word". As these are otherwise illegal
sequences, we don't break anything by recognizing them. They are replaced
- by \b(?=\w) and \b(?<=\w) respectively. Sequences like [a[:<:]] are
- erroneous and are handled by the normal code below. */
+ by \b(?=\w) and \b(?<=\w) respectively. This can only happen at the top
+ nesting level, as no other inserted sequences will contains these oddities.
+ Sequences like [a[:<:]] are erroneous and are handled by the normal code
+ below. */
case CHAR_LEFT_SQUARE_BRACKET:
if (PRIV(strncmp_c8)(ptr+1, STRING_WEIRD_STARTWORD, 6) == 0)
{
- nestptr = ptr + 7;
- ptr = sub_start_of_word - 1;
+ cb->nestptr[0] = ptr + 7;
+ ptr = sub_start_of_word; /* Do not combine these statements; clang's */
+ ptr--; /* sanitizer moans about a negative index. */
continue;
}
if (PRIV(strncmp_c8)(ptr+1, STRING_WEIRD_ENDWORD, 6) == 0)
{
- nestptr = ptr + 7;
- ptr = sub_end_of_word - 1;
+ cb->nestptr[0] = ptr + 7;
+ ptr = sub_end_of_word; /* Do not combine these statements; clang's */
+ ptr--; /* sanitizer moans about a negative index. */
continue;
}
/* Handle a real character class. */
previous = code;
- item_hwm_offset = cb->hwm - cb->start_workspace;
/* PCRE supports POSIX class stuff inside a class. Perl gives an error if
they are encountered at the top level, so we'll do that too. */
@@ -4079,11 +4254,13 @@ for (;; ptr++)
break;
}
- /* If a class contains a negative special such as \S, we need to flip the
- negation flag at the end, so that support for characters > 255 works
- correctly (they are all included in the class). */
+ /* If a non-extended class contains a negative special such as \S, we need
+ to flip the negation flag at the end, so that support for characters > 255
+ works correctly (they are all included in the class). An extended class may
+ need to insert specific matching or non-matching code for wide characters.
+ */
- should_flip_negation = FALSE;
+ should_flip_negation = match_all_or_no_wide_chars = FALSE;
/* Extended class (xclass) will be used when characters > 255
might match. */
@@ -4121,6 +4298,9 @@ for (;; ptr++)
for(;;)
{
PCRE2_SPTR oldptr;
+#ifdef EBCDIC
+ BOOL range_is_literal = TRUE;
+#endif
if (c == CHAR_NULL && ptr >= cb->end_pattern)
{
@@ -4203,11 +4383,13 @@ for (;; ptr++)
int pc = posix_class + ((local_negate)? POSIX_SUBSIZE/2 : 0);
/* The posix_substitutes table specifies which POSIX classes can be
- converted to \p or \P items. */
+ converted to \p or \P items. This can only happen at top nestling
+ level, as there will never be a POSIX class in a string that is
+ substituted for something else. */
if (posix_substitutes[pc] != NULL)
{
- nestptr = tempptr + 1;
+ cb->nestptr[0] = tempptr + 1;
ptr = posix_substitutes[pc] - 1;
goto CONTINUE_CLASS;
}
@@ -4232,10 +4414,22 @@ for (;; ptr++)
ptr = tempptr + 1;
goto CONTINUE_CLASS;
- /* For all other POSIX classes, no special action is taken in UCP
- mode. Fall through to the non_UCP case. */
+ /* For the other POSIX classes (ascii, xdigit) we are going to fall
+ through to the non-UCP case and build a bit map for characters with
+ code points less than 256. However, if we are in a negated POSIX
+ class, characters with code points greater than 255 must either all
+ match or all not match, depending on whether the whole class is not
+ or is negated. For example, for [[:^ascii:]... they must all match,
+ whereas for [^[:^xdigit:]... they must not.
+
+ In the special case where there are no xclass items, this is
+ automatically handled by the use of OP_CLASS or OP_NCLASS, but an
+ explicit range is needed for OP_XCLASS. Setting a flag here causes
+ the range to be generated later when it is known that OP_XCLASS is
+ required. */
default:
+ match_all_or_no_wide_chars |= local_negate;
break;
}
}
@@ -4299,9 +4493,16 @@ for (;; ptr++)
if (c == CHAR_BACKSLASH)
{
- escape = check_escape(&ptr, &ec, errorcodeptr, options, TRUE, cb);
+ escape = PRIV(check_escape)(&ptr, cb->end_pattern, &ec, errorcodeptr,
+ options, TRUE, cb);
if (*errorcodeptr != 0) goto FAILED;
- if (escape == 0) c = ec; /* Escaped single char */
+ if (escape == 0) /* Escaped single char */
+ {
+ c = ec;
+#ifdef EBCDIC
+ range_is_literal = FALSE;
+#endif
+ }
else if (escape == ESC_b) c = CHAR_BS; /* \b is backspace in a class */
else if (escape == ESC_N) /* \N is not supported in a class */
{
@@ -4334,9 +4535,10 @@ for (;; ptr++)
case ESC_DU: /* when PCRE2_UCP is set. We replace the */
case ESC_wu: /* escape sequence with an appropriate \p */
case ESC_WU: /* or \P to test Unicode properties instead */
- case ESC_su: /* of the default ASCII testing. */
- case ESC_SU:
- nestptr = ptr;
+ case ESC_su: /* of the default ASCII testing. This might be */
+ case ESC_SU: /* a 2nd-level nesting for [[:<:]] or [[:>:]]. */
+ cb->nestptr[1] = cb->nestptr[0];
+ cb->nestptr[0] = ptr;
ptr = substitutes[escape - ESC_DU] - 1; /* Just before substitute */
class_has_8bitchar--; /* Undo! */
break;
@@ -4503,9 +4705,12 @@ for (;; ptr++)
if (d == CHAR_BACKSLASH)
{
int descape;
- descape = check_escape(&ptr, &d, errorcodeptr, options, TRUE, cb);
+ descape = PRIV(check_escape)(&ptr, cb->end_pattern, &d,
+ errorcodeptr, options, TRUE, cb);
if (*errorcodeptr != 0) goto FAILED;
-
+#ifdef EBCDIC
+ range_is_literal = FALSE;
+#endif
/* 0 means a character was put into d; \b is backspace; any other
special causes an error. */
@@ -4551,9 +4756,48 @@ for (;; ptr++)
if (d == CHAR_CR || d == CHAR_NL) cb->external_flags |= PCRE2_HASCRORLF;
+ /* In an EBCDIC environment, Perl treats alphabetic ranges specially
+ because there are holes in the encoding, and simply using the range A-Z
+ (for example) would include the characters in the holes. This applies
+ only to literal ranges; [\xC1-\xE9] is different to [A-Z]. */
+
+#ifdef EBCDIC
+ if (range_is_literal &&
+ (cb->ctypes[c] & ctype_letter) != 0 &&
+ (cb->ctypes[d] & ctype_letter) != 0 &&
+ (c <= CHAR_z) == (d <= CHAR_z))
+ {
+ uint32_t uc = (c <= CHAR_z)? 0 : 64;
+ uint32_t C = c - uc;
+ uint32_t D = d - uc;
+
+ if (C <= CHAR_i)
+ {
+ class_has_8bitchar +=
+ add_to_class(classbits, &class_uchardata, options, cb, C + uc,
+ ((D < CHAR_i)? D : CHAR_i) + uc);
+ C = CHAR_j;
+ }
+
+ if (C <= D && C <= CHAR_r)
+ {
+ class_has_8bitchar +=
+ add_to_class(classbits, &class_uchardata, options, cb, C + uc,
+ ((D < CHAR_r)? D : CHAR_r) + uc);
+ C = CHAR_s;
+ }
+
+ if (C <= D)
+ {
+ class_has_8bitchar +=
+ add_to_class(classbits, &class_uchardata, options, cb, C + uc,
+ D + uc);
+ }
+ }
+ else
+#endif
class_has_8bitchar +=
add_to_class(classbits, &class_uchardata, options, cb, c, d);
-
goto CONTINUE_CLASS; /* Go get the next char in the class */
}
@@ -4566,16 +4810,20 @@ for (;; ptr++)
CLASS_SINGLE_CHARACTER:
if (class_one_char < 2) class_one_char++;
- /* If class_one_char is 1, we have the first single character in the
- class, and there have been no prior ranges, or XCLASS items generated by
- escapes. If this is the final character in the class, we can optimize by
- turning the item into a 1-character OP_CHAR[I] if it's positive, or
- OP_NOT[I] if it's negative. In the positive case, it can cause firstcu
- to be set. Otherwise, there can be no first char if this item is first,
- whatever repeat count may follow. In the case of reqcu, save the
- previous value for reinstating. */
+ /* If class_one_char is 1 and xclass_has_prop is false, we have the first
+ single character in the class, and there have been no prior ranges, or
+ XCLASS items generated by escapes. If this is the final character in the
+ class, we can optimize by turning the item into a 1-character OP_CHAR[I]
+ if it's positive, or OP_NOT[I] if it's negative. In the positive case, it
+ can cause firstcu to be set. Otherwise, there can be no first char if
+ this item is first, whatever repeat count may follow. In the case of
+ reqcu, save the previous value for reinstating. */
- if (!inescq && class_one_char == 1 && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)
+ if (!inescq &&
+#ifdef SUPPORT_UNICODE
+ !xclass_has_prop &&
+#endif
+ class_one_char == 1 && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)
{
ptr++;
zeroreqcu = reqcu;
@@ -4636,10 +4884,11 @@ for (;; ptr++)
CONTINUE_CLASS:
c = *(++ptr);
- if (c == 0 && nestptr != NULL)
+ if (c == CHAR_NULL && cb->nestptr[0] != NULL)
{
- ptr = nestptr;
- nestptr = NULL;
+ ptr = cb->nestptr[0];
+ cb->nestptr[0] = cb->nestptr[1];
+ cb->nestptr[1] = NULL;
c = *(++ptr);
}
@@ -4675,21 +4924,36 @@ for (;; ptr++)
zeroreqcu = reqcu;
zeroreqcuflags = reqcuflags;
- /* If there are characters with values > 255, we have to compile an
- extended class, with its own opcode, unless there was a negated special
- such as \S in the class, and PCRE2_UCP is not set, because in that case all
- characters > 255 are in the class, so any that were explicitly given as
- well can be ignored. If (when there are explicit characters > 255 that must
- be listed) there are no characters < 256, we can omit the bitmap in the
- actual compiled code. */
+ /* If there are characters with values > 255, or Unicode property settings
+ (\p or \P), we have to compile an extended class, with its own opcode,
+ unless there were no property settings and there was a negated special such
+ as \S in the class, and PCRE2_UCP is not set, because in that case all
+ characters > 255 are in or not in the class, so any that were explicitly
+ given as well can be ignored.
+
+ In the UCP case, if certain negated POSIX classes ([:^ascii:] or
+ [^:xdigit:]) were present in a class, we either have to match or not match
+ all wide characters (depending on whether the whole class is or is not
+ negated). This requirement is indicated by match_all_or_no_wide_chars being
+ true. We do this by including an explicit range, which works in both cases.
+
+ If, when generating an xclass, there are no characters < 256, we can omit
+ the bitmap in the actual compiled code. */
#ifdef SUPPORT_WIDE_CHARS
#ifdef SUPPORT_UNICODE
- if (xclass && (!should_flip_negation || (options & PCRE2_UCP) != 0))
+ if (xclass && (xclass_has_prop || !should_flip_negation ||
+ (options & PCRE2_UCP) != 0))
#elif PCRE2_CODE_UNIT_WIDTH != 8
- if (xclass && !should_flip_negation)
+ if (xclass && (xclass_has_prop || !should_flip_negation))
#endif
{
+ if (match_all_or_no_wide_chars)
+ {
+ *class_uchardata++ = XCL_RANGE;
+ class_uchardata += PRIV(ord2utf)(0x100, class_uchardata);
+ class_uchardata += PRIV(ord2utf)(MAX_UTF_CODE_POINT, class_uchardata);
+ }
*class_uchardata++ = XCL_END; /* Marks the end of extra data */
*code++ = OP_XCLASS;
code += LINK_SIZE;
@@ -4794,26 +5058,26 @@ for (;; ptr++)
if ((options & PCRE2_EXTENDED) != 0)
{
- PCRE2_SPTR p = ptr + 1;
+ ptr++;
for (;;)
{
- while (MAX_255(*p) && (cb->ctypes[*p] & ctype_space) != 0) p++;
- if (*p != CHAR_NUMBER_SIGN) break;
- p++;
- while (*p != CHAR_NULL)
+ while (MAX_255(*ptr) && (cb->ctypes[*ptr] & ctype_space) != 0) ptr++;
+ if (*ptr != CHAR_NUMBER_SIGN) break;
+ ptr++;
+ while (ptr < cb->end_pattern)
{
- if (IS_NEWLINE(p)) /* For non-fixed-length newline cases, */
+ if (IS_NEWLINE(ptr)) /* For non-fixed-length newline cases, */
{ /* IS_NEWLINE sets cb->nllen. */
- p += cb->nllen;
+ ptr += cb->nllen;
break;
}
- p++;
+ ptr++;
#ifdef SUPPORT_UNICODE
- if (utf) FORWARDCHAR(p);
+ if (utf) FORWARDCHAR(ptr);
#endif
} /* Loop for comment characters */
} /* Loop for multiple comments */
- ptr = p - 1; /* Character before the next significant one. */
+ ptr--; /* Last code unit of previous character. */
}
/* If the next character is '+', we have a possessive quantifier. This
@@ -4835,6 +5099,10 @@ for (;; ptr++)
}
else repeat_type = greedy_default;
+ /* If the repeat is {1} we can ignore it. */
+
+ if (repeat_max == 1 && repeat_min == 1) goto END_REPEAT;
+
/* If previous was a recursion call, wrap it in atomic brackets so that
previous becomes the atomic group. All recursions were so wrapped in the
past, but it no longer happens for non-repeated recursions. In fact, the
@@ -4850,16 +5118,6 @@ for (;; ptr++)
PUT(previous, 3 + 2*LINK_SIZE, 2 + 2*LINK_SIZE);
code += 2 + 2 * LINK_SIZE;
length_prevgroup = 3 + 3*LINK_SIZE;
-
- /* When actually compiling, we need to check whether this was a forward
- reference, and if so, adjust the offset. */
-
- if (lengthptr == NULL && cb->hwm >= cb->start_workspace + LINK_SIZE)
- {
- int offset = GET(cb->hwm, -LINK_SIZE);
- if (offset == previous + 1 - cb->start_code)
- PUT(cb->hwm, -LINK_SIZE, offset + 1 + LINK_SIZE);
- }
}
/* Now handle repetition for the different types of item. */
@@ -4888,7 +5146,7 @@ for (;; ptr++)
that it's a length rather than a small character. */
#ifdef MAYBE_UTF_MULTI
- if (utf && NOT_FIRSTCHAR(code[-1]))
+ if (utf && NOT_FIRSTCU(code[-1]))
{
PCRE2_UCHAR *lastchar = code - 1;
BACKCHAR(lastchar);
@@ -5102,7 +5360,6 @@ for (;; ptr++)
{
register int i;
int len = (int)(code - previous);
- size_t base_hwm_offset = item_hwm_offset;
PCRE2_UCHAR *bralink = NULL;
PCRE2_UCHAR *brazeroptr = NULL;
@@ -5150,16 +5407,10 @@ for (;; ptr++)
selectively.
If the maximum is 1 or unlimited, we just have to stick in the BRAZERO
- and do no more at this point. However, we do need to adjust any
- OP_RECURSE calls inside the group that refer to the group itself or any
- internal or forward referenced group, because the offset is from the
- start of the whole regex. Temporarily terminate the pattern while doing
- this. */
+ and do no more at this point. */
if (repeat_max <= 1) /* Covers 0, 1, and unlimited */
{
- *code = OP_END;
- adjust_recurse(previous, 1, utf, cb, item_hwm_offset);
memmove(previous + 1, previous, CU2BYTES(len));
code++;
if (repeat_max == 0)
@@ -5176,14 +5427,11 @@ for (;; ptr++)
The first one has to be handled carefully because it's the original
copy, which has to be moved up. The remainder can be handled by code
that is common with the non-zero minimum case below. We have to
- adjust the value or repeat_max, since one less copy is required. Once
- again, we may have to adjust any OP_RECURSE calls inside the group. */
+ adjust the value or repeat_max, since one less copy is required. */
else
{
int offset;
- *code = OP_END;
- adjust_recurse(previous, 2 + LINK_SIZE, utf, cb, item_hwm_offset);
memmove(previous + 2 + LINK_SIZE, previous, CU2BYTES(len));
code += 2 + LINK_SIZE;
*previous++ = OP_BRAZERO + repeat_type;
@@ -5202,10 +5450,7 @@ for (;; ptr++)
/* If the minimum is greater than zero, replicate the group as many
times as necessary, and adjust the maximum to the number of subsequent
- copies that we need. If we set a first char from the group, and didn't
- set a required char, copy the latter from the former. If there are any
- forward reference subroutine calls in the group, there will be entries on
- the workspace list; replicate these with an appropriate increment. */
+ copies that we need. */
else
{
@@ -5231,9 +5476,7 @@ for (;; ptr++)
}
/* This is compiling for real. If there is a set first byte for
- the group, and we have not yet set a "required byte", set it. Make
- sure there is enough workspace for copying forward references before
- doing the copy. */
+ the group, and we have not yet set a "required byte", set it. */
else
{
@@ -5242,29 +5485,9 @@ for (;; ptr++)
reqcu = firstcu;
reqcuflags = firstcuflags;
}
-
for (i = 1; i < repeat_min; i++)
{
- PCRE2_UCHAR *hc;
- size_t this_hwm_offset = cb->hwm - cb->start_workspace;
memcpy(code, previous, CU2BYTES(len));
-
- while (cb->hwm > cb->start_workspace + cb->workspace_size -
- WORK_SIZE_SAFETY_MARGIN -
- (this_hwm_offset - base_hwm_offset))
- {
- *errorcodeptr = expand_workspace(cb);
- if (*errorcodeptr != 0) goto FAILED;
- }
-
- for (hc = (PCRE2_UCHAR *)cb->start_workspace + base_hwm_offset;
- hc < (PCRE2_UCHAR *)cb->start_workspace + this_hwm_offset;
- hc += LINK_SIZE)
- {
- PUT(cb->hwm, 0, GET(hc, 0) + len);
- cb->hwm += LINK_SIZE;
- }
- base_hwm_offset = this_hwm_offset;
code += len;
}
}
@@ -5308,9 +5531,6 @@ for (;; ptr++)
else for (i = repeat_max - 1; i >= 0; i--)
{
- PCRE2_UCHAR *hc;
- size_t this_hwm_offset = cb->hwm - cb->start_workspace;
-
*code++ = OP_BRAZERO + repeat_type;
/* All but the final copy start a new nesting, maintaining the
@@ -5326,26 +5546,6 @@ for (;; ptr++)
}
memcpy(code, previous, CU2BYTES(len));
-
- /* Ensure there is enough workspace for forward references before
- copying them. */
-
- while (cb->hwm > cb->start_workspace + cb->workspace_size -
- WORK_SIZE_SAFETY_MARGIN -
- (this_hwm_offset - base_hwm_offset))
- {
- *errorcodeptr = expand_workspace(cb);
- if (*errorcodeptr != 0) goto FAILED;
- }
-
- for (hc = (PCRE2_UCHAR *)cb->start_workspace + base_hwm_offset;
- hc < (PCRE2_UCHAR *)cb->start_workspace + this_hwm_offset;
- hc += LINK_SIZE)
- {
- PUT(cb->hwm, 0, GET(hc, 0) + len + ((i != 0)? 2+LINK_SIZE : 1));
- cb->hwm += LINK_SIZE;
- }
- base_hwm_offset = this_hwm_offset;
code += len;
}
@@ -5381,7 +5581,7 @@ for (;; ptr++)
conditional, we convert the BRA code to the POS form, and the KET code to
KETRPOS. (It turns out to be convenient at runtime to detect this kind of
subpattern at both the start and at the end.) The use of special opcodes
- makes it possible to reduce greatly the stack usage in pcre_exec(). If
+ makes it possible to reduce greatly the stack usage in pcre2_match(). If
the group is preceded by OP_BRAZERO, convert this to OP_BRAPOSZERO.
Then, if the minimum number of matches is 1 or 0, cancel the possessive
@@ -5411,14 +5611,23 @@ for (;; ptr++)
else
{
- /* In the compile phase, check for empty string matching. */
+ /* In the compile phase, check whether the group could match an empty
+ string. */
if (lengthptr == NULL)
{
PCRE2_UCHAR *scode = bracode;
do
{
- if (could_be_empty_branch(scode, ketcode, utf, cb, NULL))
+ int count = 0;
+ int rc = could_be_empty_branch(scode, ketcode, utf, cb, FALSE,
+ NULL, &count);
+ if (rc < 0)
+ {
+ *errorcodeptr = ERR86;
+ goto FAILED;
+ }
+ if (rc > 0)
{
*bracode += OP_SBRA - OP_BRA;
break;
@@ -5426,6 +5635,12 @@ for (;; ptr++)
scode += GET(scode, 1);
}
while (*scode == OP_ALT);
+
+ /* A conditional group with only one branch has an implicit empty
+ alternative branch. */
+
+ if (*bracode == OP_COND && bracode[GET(bracode,1)] != OP_ALT)
+ *bracode = OP_SCOND;
}
/* Handle possessive quantifiers. */
@@ -5434,18 +5649,15 @@ for (;; ptr++)
{
/* For COND brackets, we wrap the whole thing in a possessively
repeated non-capturing bracket, because we have not invented POS
- versions of the COND opcodes. Because we are moving code along, we
- must ensure that any pending recursive references are updated. */
+ versions of the COND opcodes. */
if (*bracode == OP_COND || *bracode == OP_SCOND)
{
int nlen = (int)(code - bracode);
- *code = OP_END;
- adjust_recurse(bracode, 1 + LINK_SIZE, utf, cb, item_hwm_offset);
memmove(bracode + 1 + LINK_SIZE, bracode, CU2BYTES(nlen));
code += 1 + LINK_SIZE;
nlen += 1 + LINK_SIZE;
- *bracode = OP_BRAPOS;
+ *bracode = (*bracode == OP_COND)? OP_BRAPOS : OP_SBRAPOS;
*code++ = OP_KETRPOS;
PUTINC(code, 0, nlen);
PUT(bracode, 1, nlen);
@@ -5570,13 +5782,10 @@ for (;; ptr++)
*tempcode = opcode_possessify[repcode];
/* For opcode without a special possessified version, wrap the item in
- ONCE brackets. Because we are moving code along, we must ensure that
- any pending recursive references are updated. */
+ ONCE brackets. */
else
{
- *code = OP_END;
- adjust_recurse(tempcode, 1 + LINK_SIZE, utf, cb, item_hwm_offset);
memmove(tempcode + 1 + LINK_SIZE, tempcode, CU2BYTES(len));
code += 1 + LINK_SIZE;
len += 1 + LINK_SIZE;
@@ -5599,33 +5808,19 @@ for (;; ptr++)
/* ===================================================================*/
- /* Start of nested parenthesized sub-expression, or comment or lookahead or
- lookbehind or option setting or condition or all the other extended
- parenthesis forms. We must save the current high-water-mark for the
- forward reference list so that we know where they start for this group.
- However, because the list may be extended when there are very many forward
- references (usually the result of a replicated inner group), we must use
- an offset rather than an absolute address. */
+ /* Start of nested parenthesized sub-expression, or lookahead or lookbehind
+ or option setting or condition or all the other extended parenthesis forms.
+ We must save the current high-water-mark for the forward reference list so
+ that we know where they start for this group. However, because the list may
+ be extended when there are very many forward references (usually the result
+ of a replicated inner group), we must use an offset rather than an absolute
+ address. Note that (?# comments are dealt with at the top of the loop;
+ they do not get this far. */
case CHAR_LEFT_PARENTHESIS:
ptr++;
- /* First deal with comments. Putting this code right at the start ensures
- that comments have no bad side effects. */
-
- if (ptr[0] == CHAR_QUESTION_MARK && ptr[1] == CHAR_NUMBER_SIGN)
- {
- ptr += 2;
- while (ptr < cb->end_pattern && *ptr != CHAR_RIGHT_PARENTHESIS) ptr++;
- if (*ptr != CHAR_RIGHT_PARENTHESIS)
- {
- *errorcodeptr = ERR18;
- goto FAILED;
- }
- continue;
- }
-
- /* Now deal with various "verbs" that can be introduced by '*'. */
+ /* Deal with various "verbs" that can be introduced by '*'. */
if (ptr[0] == CHAR_ASTERISK && (ptr[1] == ':'
|| (MAX_255(ptr[1]) && ((cb->ctypes[ptr[1]] & ctype_letter) != 0))))
@@ -5637,22 +5832,43 @@ for (;; ptr++)
PCRE2_SPTR arg = NULL;
previous = NULL;
ptr++;
- while (MAX_255(*ptr) && (cb->ctypes[*ptr] & ctype_letter) != 0) ptr++;
- namelen = (int)(ptr - name);
+
+ /* Increment ptr, set namelen, check length */
+
+ READ_NAME(ctype_letter, ERR60, *errorcodeptr);
/* It appears that Perl allows any characters whatsoever, other than
a closing parenthesis, to appear in arguments, so we no longer insist on
- letters, digits, and underscores. */
+ letters, digits, and underscores. Perl does not, however, do any
+ interpretation within arguments, and has no means of including a closing
+ parenthesis. PCRE supports escape processing but only when it is
+ requested by an option. Note that check_escape() will not return values
+ greater than the code unit maximum when not in UTF mode. */
if (*ptr == CHAR_COLON)
{
arg = ++ptr;
- while (*ptr != CHAR_NULL && *ptr != CHAR_RIGHT_PARENTHESIS) ptr++;
- arglen = (int)(ptr - arg);
- if ((unsigned int)arglen > MAX_MARK)
+
+ if ((options & PCRE2_ALT_VERBNAMES) == 0)
{
- *errorcodeptr = ERR76;
- goto FAILED;
+ arglen = 0;
+ while (ptr < cb->end_pattern && *ptr != CHAR_RIGHT_PARENTHESIS)
+ {
+ ptr++; /* Check length as we go */
+ arglen++; /* along, to avoid the */
+ if ((unsigned int)arglen > MAX_MARK) /* possibility of overflow. */
+ {
+ *errorcodeptr = ERR76;
+ goto FAILED;
+ }
+ }
+ }
+ else
+ {
+ /* The length check is in process_verb_names() */
+ arglen = process_verb_name(&ptr, NULL, errorcodeptr, options,
+ utf, cb);
+ if (arglen < 0) goto FAILED;
}
}
@@ -5697,7 +5913,7 @@ for (;; ptr++)
/* Handle other cases with/without an argument */
- else if (arglen == 0)
+ else if (arglen == 0) /* There is no argument */
{
if (verbs[i].op < 0) /* Argument is mandatory */
{
@@ -5707,17 +5923,42 @@ for (;; ptr++)
setverb = *code++ = verbs[i].op;
}
- else
+ else /* An argument is present */
{
- if (verbs[i].op_arg < 0) /* Argument is forbidden */
+ if (verbs[i].op_arg < 0) /* Argument is forbidden */
{
*errorcodeptr = ERR59;
goto FAILED;
}
setverb = *code++ = verbs[i].op_arg;
- *code++ = arglen;
- memcpy(code, arg, CU2BYTES(arglen));
- code += arglen;
+
+ /* Arguments can be very long, especially in 16- and 32-bit modes,
+ and can overflow the workspace in the first pass. Instead of
+ putting the argument into memory, we just update the length counter
+ and set up an empty argument. */
+
+ if (lengthptr != NULL)
+ {
+ *lengthptr += arglen;
+ *code++ = 0;
+ }
+ else
+ {
+ *code++ = arglen;
+ if ((options & PCRE2_ALT_VERBNAMES) != 0)
+ {
+ PCRE2_UCHAR *memcode = code; /* code is "register" */
+ (void)process_verb_name(&arg, &memcode, errorcodeptr, options,
+ utf, cb);
+ code = memcode;
+ }
+ else /* No argument processing */
+ {
+ memcpy(code, arg, CU2BYTES(arglen));
+ code += arglen;
+ }
+ }
+
*code++ = 0;
}
@@ -5911,9 +6152,10 @@ for (;; ptr++)
{
ptr++;
while (IS_DIGIT(*ptr)) minor = minor * 10 + *ptr++ - '0';
+ if (minor < 10) minor *= 10;
}
- if (*ptr != CHAR_RIGHT_PARENTHESIS)
+ if (*ptr != CHAR_RIGHT_PARENTHESIS || minor > 99)
{
*errorcodeptr = ERR79;
goto FAILED;
@@ -5968,6 +6210,12 @@ for (;; ptr++)
{
while (IS_DIGIT(*ptr))
{
+ if (recno > INT_MAX / 10 - 1) /* Integer overflow */
+ {
+ while (IS_DIGIT(*ptr)) ptr++;
+ *errorcodeptr = ERR61;
+ goto FAILED;
+ }
recno = recno * 10 + (int)(*ptr - CHAR_0);
ptr++;
}
@@ -5992,12 +6240,9 @@ for (;; ptr++)
*errorcodeptr = ERR28; /* Assertion expected */
goto FAILED;
}
- name = ptr++;
- while (MAX_255(*ptr) && (cb->ctypes[*ptr] & ctype_word) != 0)
- {
- ptr++;
- }
- namelen = (int)(ptr - name);
+ name = ptr;
+ /* Increment ptr, set namelen, check length */
+ READ_NAME(ctype_word, ERR48, *errorcodeptr);
if (lengthptr != NULL) skipunits += IMM2_SIZE;
}
@@ -6027,7 +6272,7 @@ for (;; ptr++)
goto FAILED;
}
if (refsign != 0) recno = (refsign == CHAR_MINUS)?
- cb->bracount - recno + 1 : recno + cb->bracount;
+ (cb->bracount + 1) - recno : recno + cb->bracount;
if (recno <= 0 || (uint32_t)recno > cb->final_bracount)
{
*errorcodeptr = ERR15;
@@ -6103,7 +6348,12 @@ for (;; ptr++)
{
if (!IS_DIGIT(name[i]))
{
- *errorcodeptr = ERR15;
+ *errorcodeptr = ERR15; /* Non-existent subpattern */
+ goto FAILED;
+ }
+ if (recno > INT_MAX / 10 - 1) /* Integer overflow */
+ {
+ *errorcodeptr = ERR61;
goto FAILED;
}
recno = recno * 10 + name[i] - CHAR_0;
@@ -6229,7 +6479,9 @@ for (;; ptr++)
}
/* During the pre-compile phase, we parse the string and update the
- length. There is no need to generate any code. */
+ length. There is no need to generate any code. (In fact, the string
+ has already been parsed in the pre-pass that looks for named
+ parentheses, but it does no harm to leave this code in.) */
if (lengthptr != NULL) /* Only check the string */
{
@@ -6373,8 +6625,8 @@ for (;; ptr++)
*errorcodeptr = ERR44; /* Group name must start with non-digit */
goto FAILED;
}
- while (MAX_255(*ptr) && (cb->ctypes[*ptr] & ctype_word) != 0) ptr++;
- namelen = (int)(ptr - name);
+ /* Increment ptr, set namelen, check length */
+ READ_NAME(ctype_word, ERR48, *errorcodeptr);
/* In the pre-compile phase, do a syntax check. */
@@ -6390,11 +6642,6 @@ for (;; ptr++)
*errorcodeptr = ERR42;
goto FAILED;
}
- if (namelen > MAX_NAME_SIZE)
- {
- *errorcodeptr = ERR48;
- goto FAILED;
- }
}
/* Scan the list of names generated in the pre-pass in order to get
@@ -6480,7 +6727,6 @@ for (;; ptr++)
if (firstcuflags == REQ_UNSET) firstcuflags = REQ_NONE;
previous = code;
- item_hwm_offset = cb->hwm - cb->start_workspace;
*code++ = ((options & PCRE2_CASELESS) != 0)? OP_DNREFI : OP_DNREF;
PUT2INC(code, 0, index);
PUT2INC(code, 0, count);
@@ -6488,9 +6734,14 @@ for (;; ptr++)
/* ------------------------------------------------------------ */
- case CHAR_R: /* Recursion */
- ptr++; /* Same as (?0) */
- /* Fall through */
+ case CHAR_R: /* Recursion, same as (?0) */
+ recno = 0;
+ if (*(++ptr) != CHAR_RIGHT_PARENTHESIS)
+ {
+ *errorcodeptr = ERR29;
+ goto FAILED;
+ }
+ goto HANDLE_RECURSION;
/* ------------------------------------------------------------ */
@@ -6498,7 +6749,6 @@ for (;; ptr++)
case CHAR_0: case CHAR_1: case CHAR_2: case CHAR_3: case CHAR_4:
case CHAR_5: case CHAR_6: case CHAR_7: case CHAR_8: case CHAR_9:
{
- PCRE2_SPTR called;
terminator = CHAR_RIGHT_PARENTHESIS;
/* Come here from the \g<...> and \g'...' code (Oniguruma
@@ -6550,7 +6800,7 @@ for (;; ptr++)
*errorcodeptr = ERR58;
goto FAILED;
}
- recno = cb->bracount - recno + 1;
+ recno = (int)(cb->bracount + 1) - recno;
if (recno <= 0)
{
*errorcodeptr = ERR15;
@@ -6567,76 +6817,29 @@ for (;; ptr++)
recno += cb->bracount;
}
- /* Come here from code above that handles a named recursion */
-
- HANDLE_RECURSION:
- previous = code;
- item_hwm_offset = cb->hwm - cb->start_workspace;
- called = cb->start_code;
-
- /* When we are actually compiling, find the bracket that is being
- referenced. Temporarily end the regex in case it doesn't exist before
- this point. If we end up with a forward reference, first check that
- the bracket does occur later so we can give the error (and position)
- now. Then remember this forward reference in the workspace so it can
- be filled in at the end. */
-
- if (lengthptr == NULL)
+ if ((uint32_t)recno > cb->final_bracount)
{
- *code = OP_END;
- if (recno != 0)
- called = PRIV(find_bracket)(cb->start_code, utf, recno);
-
- /* Forward reference */
-
- if (called == NULL)
- {
- if ((uint32_t)recno > cb->final_bracount)
- {
- *errorcodeptr = ERR15;
- goto FAILED;
- }
-
- /* Fudge the value of "called" so that when it is inserted as an
- offset below, what it actually inserted is the reference number
- of the group. Then remember the forward reference, expanding the
- working space where the list is kept if necessary. */
-
- called = cb->start_code + recno;
- if (cb->hwm >= cb->start_workspace + cb->workspace_size -
- WORK_SIZE_SAFETY_MARGIN)
- {
- *errorcodeptr = expand_workspace(cb);
- if (*errorcodeptr != 0) goto FAILED;
- }
- PUTINC(cb->hwm, 0, (int)(code + 1 - cb->start_code));
- }
-
- /* If not a forward reference, and the subpattern is still open,
- this is a recursive call. We check to see if this is a left
- recursion that could loop for ever, and diagnose that case. We
- must not, however, do this check if we are in a conditional
- subpattern because the condition might be testing for recursion in
- a pattern such as /(?(R)a+|(?R)b)/, which is perfectly valid.
- Forever loops are also detected at runtime, so those that occur in
- conditional subpatterns will be picked up then. */
-
- else if (GET(called, 1) == 0 && cond_depth <= 0 &&
- could_be_empty(called, code, bcptr, utf, cb))
- {
- *errorcodeptr = ERR40;
- goto FAILED;
- }
+ *errorcodeptr = ERR15;
+ goto FAILED;
}
- /* Insert the recursion/subroutine item. It does not have a set first
- character (relevant if it is repeated, because it will then be
- wrapped with ONCE brackets). */
+ /* Come here from code above that handles a named recursion.
+ We insert the number of the called group after OP_RECURSE. At the
+ end of compiling the pattern is scanned and these numbers are
+ replaced by offsets within the pattern. It is done like this to avoid
+ problems with forward references and adjusting offsets when groups
+ are duplicated and moved (as discovered in previous implementations).
+ Note that a recursion does not have a set first character (relevant
+ if it is repeated, because it will then be wrapped with ONCE
+ brackets). */
+ HANDLE_RECURSION:
+ previous = code;
*code = OP_RECURSE;
- PUT(code, 1, (int)(called - cb->start_code));
+ PUT(code, 1, recno);
code += 1 + LINK_SIZE;
groupsetfirstcu = FALSE;
+ cb->had_recurse = TRUE;
}
/* Can't determine a first byte now */
@@ -6679,44 +6882,16 @@ for (;; ptr++)
newoptions = (options | set) & (~unset);
/* If the options ended with ')' this is not the start of a nested
- group with option changes, so the options change at this level. If this
- item is right at the start of the pattern, the options can be
- abstracted and made external in the pre-compile phase, and ignored in
- the compile phase. This can be helpful when matching -- for instance in
- caseless checking of required bytes.
-
- If the code pointer is not (cb->start_code + 1 + LINK_SIZE), we are
- definitely *not* at the start of the pattern because something has been
- compiled. In the pre-compile phase, however, the code pointer can have
- that value after the start, because it gets reset as code is discarded
- during the pre-compile. However, this can happen only at top level - if
- we are within parentheses, the starting BRA will still be present. At
- any parenthesis level, the length value can be used to test if anything
- has been compiled at that level. Thus, a test for both these conditions
- is necessary to ensure we correctly detect the start of the pattern in
- both phases.
-
- If we are not at the pattern start, reset the greedy defaults and the
- case value for firstcu and reqcu. */
+ group with option changes, so the options change at this level. They
+ must also be passed back for use in subsequent branches. Reset the
+ greedy defaults and the case value for firstcu and reqcu. */
if (*ptr == CHAR_RIGHT_PARENTHESIS)
{
- if (code == cb->start_code + 1 + LINK_SIZE &&
- (lengthptr == NULL || *lengthptr == 2 + 2*LINK_SIZE))
- {
- cb->external_options = newoptions;
- }
- else
- {
- greedy_default = ((newoptions & PCRE2_UNGREEDY) != 0);
- greedy_non_default = greedy_default ^ 1;
- req_caseopt = ((newoptions & PCRE2_CASELESS) != 0)? REQ_CASELESS:0;
- }
-
- /* Change options at this level, and pass them back for use
- in subsequent branches. */
-
*optionsptr = options = newoptions;
+ greedy_default = ((newoptions & PCRE2_UNGREEDY) != 0);
+ greedy_non_default = greedy_default ^ 1;
+ req_caseopt = ((newoptions & PCRE2_CASELESS) != 0)? REQ_CASELESS:0;
previous = NULL; /* This item can't be repeated */
continue; /* It is complete */
}
@@ -6776,7 +6951,6 @@ for (;; ptr++)
else
{
previous = code;
- item_hwm_offset = cb->hwm - cb->start_workspace;
}
*code = bravalue;
@@ -6981,27 +7155,21 @@ for (;; ptr++)
are negative the reference number. Only back references and those types
that consume a character may be repeated. We can test for values between
ESC_b and ESC_Z for the latter; this may have to change if any new ones are
- ever created. */
+ ever created.
+
+ Note: \Q and \E are handled at the start of the character-processing loop,
+ not here. */
case CHAR_BACKSLASH:
tempptr = ptr;
- escape = check_escape(&ptr, &ec, errorcodeptr, options, FALSE, cb);
+ escape = PRIV(check_escape)(&ptr, cb->end_pattern, &ec, errorcodeptr,
+ options, FALSE, cb);
if (*errorcodeptr != 0) goto FAILED;
if (escape == 0) /* The escape coded a single character */
c = ec;
else
{
- if (escape == ESC_Q) /* Handle start of quoted string */
- {
- if (ptr[1] == CHAR_BACKSLASH && ptr[2] == CHAR_E)
- ptr += 2; /* avoid empty string */
- else inescq = TRUE;
- continue;
- }
-
- if (escape == ESC_E) continue; /* Perl ignores an orphan \E */
-
/* For metasequences that actually match a character, we disable the
setting of a first character if it hasn't already been set. */
@@ -7055,7 +7223,7 @@ for (;; ptr++)
if (*p != (PCRE2_UCHAR)terminator)
{
*errorcodeptr = ERR57;
- break;
+ goto FAILED;
}
ptr++;
goto HANDLE_NUMERICAL_RECURSION;
@@ -7070,7 +7238,7 @@ for (;; ptr++)
ptr[1] != CHAR_APOSTROPHE && ptr[1] != CHAR_LEFT_CURLY_BRACKET))
{
*errorcodeptr = ERR69;
- break;
+ goto FAILED;
}
is_recurse = FALSE;
terminator = (*(++ptr) == CHAR_LESS_THAN_SIGN)?
@@ -7092,9 +7260,13 @@ for (;; ptr++)
single group (i.e. not to a duplicated name). */
HANDLE_REFERENCE:
+ if (recno > (int)cb->final_bracount)
+ {
+ *errorcodeptr = ERR15;
+ goto FAILED;
+ }
if (firstcuflags == REQ_UNSET) firstcuflags = REQ_NONE;
previous = code;
- item_hwm_offset = cb->hwm - cb->start_workspace;
*code++ = ((options & PCRE2_CASELESS) != 0)? OP_REFI : OP_REF;
PUT2INC(code, 0, recno);
cb->backref_map |= (recno < 32)? (1u << recno) : 1;
@@ -7124,7 +7296,6 @@ for (;; ptr++)
if (!get_ucp(&ptr, &negated, &ptype, &pdata, errorcodeptr, cb))
goto FAILED;
previous = code;
- item_hwm_offset = cb->hwm - cb->start_workspace;
*code++ = ((escape == ESC_p) != negated)? OP_PROP : OP_NOTPROP;
*code++ = ptype;
*code++ = pdata;
@@ -7143,11 +7314,19 @@ for (;; ptr++)
/* The use of \C can be locked out. */
+#ifdef NEVER_BACKSLASH_C
+ else if (escape == ESC_C)
+ {
+ *errorcodeptr = ERR85;
+ goto FAILED;
+ }
+#else
else if (escape == ESC_C && (options & PCRE2_NEVER_BACKSLASH_C) != 0)
{
*errorcodeptr = ERR83;
goto FAILED;
}
+#endif
/* For the rest (including \X when Unicode properties are supported), we
can obtain the OP value by negating the escape value in the default
@@ -7157,13 +7336,15 @@ for (;; ptr++)
else
{
+ if (escape == ESC_C) cb->external_flags |= PCRE2_HASBKC; /* Record */
if ((escape == ESC_b || escape == ESC_B || escape == ESC_A) &&
cb->max_lookbehind == 0)
cb->max_lookbehind = 1;
#ifdef SUPPORT_UNICODE
if (escape >= ESC_DU && escape <= ESC_wu)
{
- nestptr = ptr + 1; /* Where to resume */
+ cb->nestptr[1] = cb->nestptr[0]; /* Back up if at 2nd level */
+ cb->nestptr[0] = ptr + 1; /* Where to resume */
ptr = substitutes[escape - ESC_DU] - 1; /* Just before substitute */
}
else
@@ -7173,7 +7354,6 @@ for (;; ptr++)
{
previous = (escape > ESC_b && escape < ESC_Z)? code : NULL;
- item_hwm_offset = cb->hwm - cb->start_workspace;
*code++ = (!utf && escape == ESC_C)? OP_ALLANY : escape;
}
}
@@ -7208,7 +7388,6 @@ for (;; ptr++)
ONE_CHAR:
previous = code;
- item_hwm_offset = cb->hwm - cb->start_workspace;
/* For caseless UTF mode, check whether this character has more than one
other case. If so, generate a special OP_PROP item instead of OP_CHARI. */
@@ -7350,7 +7529,6 @@ int32_t firstcuflags, reqcuflags;
uint32_t branchfirstcu, branchreqcu;
int32_t branchfirstcuflags, branchreqcuflags;
size_t length;
-size_t save_hwm_offset;
unsigned int orig_bracount;
unsigned int max_bracount;
branch_chain bc;
@@ -7372,8 +7550,6 @@ bc.current_branch = code;
firstcu = reqcu = 0;
firstcuflags = reqcuflags = REQ_UNSET;
-save_hwm_offset = cb->hwm - cb->start_workspace; /* hwm at start of group */
-
/* Accumulate the length for use in the pre-compile phase. Start with the
length of the BRA and KET and any extra code units that are required at the
beginning. We accumulate in a local variable to save frequent testing of
@@ -7508,26 +7684,26 @@ for (;;)
/* If lookbehind, check that this branch matches a fixed-length string, and
put the length into the OP_REVERSE item. Temporarily mark the end of the
- branch with OP_END. If the branch contains OP_RECURSE, the result is -3
- because there may be forward references that we can't check here. Set a
- flag to cause another lookbehind check at the end. Why not do it all at the
- end? Because common, erroneous checks are picked up here and the offset of
- the problem can be shown. */
+ branch with OP_END. If the branch contains OP_RECURSE, the result is
+ FFL_LATER (a negative value) because there may be forward references that
+ we can't check here. Set a flag to cause another lookbehind check at the
+ end. Why not do it all at the end? Because common errors can be picked up
+ here and the offset of the problem can be shown. */
if (lookbehind)
{
int fixed_length;
+ int count = 0;
*code = OP_END;
fixed_length = find_fixedlength(last_branch, (options & PCRE2_UTF) != 0,
- FALSE, cb, NULL);
- if (fixed_length == -3)
+ FALSE, cb, NULL, &count);
+ if (fixed_length == FFL_LATER)
{
cb->check_lookbehind = TRUE;
}
else if (fixed_length < 0)
{
- *errorcodeptr = (fixed_length == -2)? ERR36 :
- (fixed_length == -4)? ERR70: ERR25;
+ *errorcodeptr = fixed_length_errors[-fixed_length];
*ptrptr = ptr;
return FALSE;
}
@@ -7569,18 +7745,13 @@ for (;;)
code += 1 + LINK_SIZE;
/* If it was a capturing subpattern, check to see if it contained any
- recursive back references. If so, we must wrap it in atomic brackets.
- Because we are moving code along, we must ensure that any pending recursive
- or forward subroutine references are updated. In any event, remove the
- block from the chain. */
+ recursive back references. If so, we must wrap it in atomic brackets. In
+ any event, remove the block from the chain. */
if (capnumber > 0)
{
if (cb->open_caps->flag)
{
- *code = OP_END;
- adjust_recurse(start_bracket, 1 + LINK_SIZE,
- (options & PCRE2_UTF) != 0, cb, save_hwm_offset);
memmove(start_bracket + 1 + LINK_SIZE, start_bracket,
CU2BYTES(code - start_bracket));
*start_bracket = OP_ONCE;
@@ -8051,7 +8222,7 @@ a pointer to a block of store holding a compiled version of the expression.
Arguments:
pattern the regular expression
- patlen the length of the pattern, or < 0 for zero-terminated
+ patlen the length of the pattern, or PCRE2_ZERO_TERMINATED
options option bits
errorptr pointer to errorcode
erroroffset pointer to error offset
@@ -8097,10 +8268,11 @@ PCRE2_UCHAR stack_copied_pattern[COPIED_PATTERN_SIZE];
named_group named_groups[NAMED_GROUP_LIST_SIZE];
/* The workspace is used in different ways in the different compiling phases.
-Ensure that it is 16-bit aligned for the preliminary group scan. */
+It needs to be 16-bit aligned for the preliminary group scan, and 32-bit
+aligned for the group information cache. */
-uint16_t c16workspace[(COMPILE_WORK_SIZE * sizeof(PCRE2_UCHAR))/sizeof(uint16_t)];
-PCRE2_UCHAR *cworkspace = (PCRE2_UCHAR *)c16workspace;
+uint32_t c32workspace[C32_WORK_SIZE];
+PCRE2_UCHAR *cworkspace = (PCRE2_UCHAR *)c32workspace;
/* -------------- Check arguments and set up the pattern ----------------- */
@@ -8135,10 +8307,24 @@ if (ccontext == NULL)
/* A zero-terminated pattern is indicated by the special length value
PCRE2_ZERO_TERMINATED. Otherwise, we make a copy of the pattern and add a zero,
to ensure that it is always possible to look one code unit beyond the end of
-the pattern's characters. */
+the pattern's characters. In both cases, check that the pattern is overlong. */
-if (patlen == PCRE2_ZERO_TERMINATED) patlen = PRIV(strlen)(pattern); else
+if (patlen == PCRE2_ZERO_TERMINATED)
{
+ patlen = PRIV(strlen)(pattern);
+ if (patlen > ccontext->max_pattern_length)
+ {
+ *errorptr = ERR88;
+ return NULL;
+ }
+ }
+else
+ {
+ if (patlen > ccontext->max_pattern_length)
+ {
+ *errorptr = ERR88;
+ return NULL;
+ }
if (patlen < COPIED_PATTERN_SIZE)
copied_pattern = stack_copied_pattern;
else
@@ -8170,9 +8356,11 @@ cb.bracount = cb.final_bracount = 0;
cb.cx = ccontext;
cb.dupnames = FALSE;
cb.end_pattern = pattern + patlen;
+cb.nestptr[0] = cb.nestptr[1] = NULL;
cb.external_flags = 0;
cb.external_options = options;
-cb.hwm = cworkspace;
+cb.groupinfo = c32workspace;
+cb.had_recurse = FALSE;
cb.iscondassert = FALSE;
cb.max_lookbehind = 0;
cb.name_entry_size = 0;
@@ -8240,14 +8428,21 @@ while (ptr[skipatstart] == CHAR_LEFT_PARENTHESIS &&
case PSO_LIMR:
c = 0;
pp = skipatstart;
+ if (!IS_DIGIT(ptr[pp]))
+ {
+ errorcode = ERR60;
+ ptr += pp;
+ goto HAD_ERROR;
+ }
while (IS_DIGIT(ptr[pp]))
{
if (c > UINT32_MAX / 10 - 1) break; /* Integer overflow */
- c = c*10 + ptr[pp++] - CHAR_0;
+ c = c*10 + (ptr[pp++] - CHAR_0);
}
if (ptr[pp++] != CHAR_RIGHT_PARENTHESIS)
{
errorcode = ERR60;
+ ptr += pp;
goto HAD_ERROR;
}
if (p->type == PSO_LIMM) limit_match = c;
@@ -8288,7 +8483,7 @@ if (utf)
}
if ((options & PCRE2_NO_UTF_CHECK) == 0 &&
(errorcode = PRIV(valid_utf)(pattern, patlen, erroroffset)) != 0)
- goto HAD_ERROR;
+ goto HAD_UTF_ERROR;
}
/* Check UCP lockout. */
@@ -8424,7 +8619,7 @@ re->first_codeunit = 0;
re->last_codeunit = 0;
re->bsr_convention = bsr;
re->newline_convention = newline;
-re->max_lookbehind =
+re->max_lookbehind = 0;
re->minlength = 0;
re->top_bracket = 0;
re->top_backref = 0;
@@ -8437,12 +8632,32 @@ code follows after that. */
codestart = (PCRE2_SPTR)((uint8_t *)re + sizeof(pcre2_real_code)) +
re->name_entry_size * re->name_count;
+/* Workspace is needed to remember information about numbered groups: whether a
+group can match an empty string and what its fixed length is. This is done to
+avoid the possibility of recursive references causing very long compile times
+when checking these features. Unnumbered groups do not have this exposure since
+they cannot be referenced. We use an indexed vector for this purpose. If there
+are sufficiently few groups, it can be the c32workspace vector, as set up
+above. Otherwise we have to get/free a special vector. The vector must be
+initialized to zero. */
+
+if (cb.final_bracount >= C32_WORK_SIZE)
+ {
+ cb.groupinfo = ccontext->memctl.malloc(
+ (cb.final_bracount + 1)*sizeof(uint32_t), ccontext->memctl.memory_data);
+ if (cb.groupinfo == NULL)
+ {
+ errorcode = ERR21;
+ goto HAD_ERROR;
+ }
+ }
+memset(cb.groupinfo, 0, (cb.final_bracount + 1) * sizeof(uint32_t));
+
/* Update the compile data block for the actual compile. The starting points of
the name/number translation table and of the code are passed around in the
compile data block. The start/end pattern and initial options are already set
from the pre-compile phase, as is the name_entry_size field. Reset the bracket
-count and the names_found field. Also reset the hwm field; this time it's used
-for remembering forward references to subpatterns. */
+count and the names_found field. */
cb.parens_depth = 0;
cb.assert_depth = 0;
@@ -8450,7 +8665,6 @@ cb.bracount = 0;
cb.max_lookbehind = 0;
cb.name_table = (PCRE2_UCHAR *)((uint8_t *)re + sizeof(pcre2_real_code));
cb.start_code = codestart;
-cb.hwm = (PCRE2_UCHAR *)(cb.start_workspace);
cb.iscondassert = FALSE;
cb.req_varyopt = 0;
cb.had_accept = FALSE;
@@ -8508,44 +8722,72 @@ if (usedlength > length) errorcode = ERR23; else
#endif
}
-/* In rare debugging situations we sometimes need to look at the compiled code
-at this stage. */
+/* Scan the pattern for recursion/subroutine calls and convert the group
+numbers into offsets. Maintain a small cache so that repeated groups containing
+recursions are efficiently handled. */
-#ifdef CALL_PRINTINT
-pcre2_printint(re, stderr, TRUE);
-fprintf(stderr, "Length=%lu Used=%lu\n", length, usedlength);
-#endif
-
-/* Fill in any forward references that are required. There may be repeated
-references; optimize for them, as searching a large regex takes time. The
-test of errorcode inside the loop means that nothing is done if it is already
-non-zero. */
+#define RSCAN_CACHE_SIZE 8
-if (cb.hwm > cb.start_workspace)
+if (errorcode == 0 && cb.had_recurse)
{
- int prev_recno = -1;
- PCRE2_SPTR groupptr = NULL;
- while (errorcode == 0 && cb.hwm > cb.start_workspace)
+ PCRE2_UCHAR *rcode;
+ PCRE2_SPTR rgroup;
+ int ccount = 0;
+ int start = RSCAN_CACHE_SIZE;
+ recurse_cache rc[RSCAN_CACHE_SIZE];
+
+ for (rcode = (PCRE2_UCHAR *)find_recurse(codestart, utf);
+ rcode != NULL;
+ rcode = (PCRE2_UCHAR *)find_recurse(rcode + 1 + LINK_SIZE, utf))
{
- int offset, recno;
- cb.hwm -= LINK_SIZE;
- offset = GET(cb.hwm, 0);
- recno = GET(codestart, offset);
- if (recno != prev_recno)
+ int i, p, recno;
+
+ recno = (int)GET(rcode, 1);
+ if (recno == 0) rgroup = codestart; else
{
- groupptr = PRIV(find_bracket)(codestart, utf, recno);
- prev_recno = recno;
+ PCRE2_SPTR search_from = codestart;
+ rgroup = NULL;
+ for (i = 0, p = start; i < ccount; i++, p = (p + 1) & 7)
+ {
+ if (recno == rc[p].recno)
+ {
+ rgroup = rc[p].group;
+ break;
+ }
+
+ /* Group n+1 must always start to the right of group n, so we can save
+ search time below when the new group number is greater than any of the
+ previously found groups. */
+
+ if (recno > rc[p].recno) search_from = rc[p].group;
+ }
+
+ if (rgroup == NULL)
+ {
+ rgroup = PRIV(find_bracket)(search_from, utf, recno);
+ if (rgroup == NULL)
+ {
+ errorcode = ERR53;
+ break;
+ }
+ if (--start < 0) start = RSCAN_CACHE_SIZE - 1;
+ rc[start].recno = recno;
+ rc[start].group = rgroup;
+ if (ccount < RSCAN_CACHE_SIZE) ccount++;
+ }
}
- if (groupptr == NULL) errorcode = ERR53;
- else PUT(((PCRE2_UCHAR *)codestart), offset, (int)(groupptr - codestart));
+
+ PUT(rcode, 1, rgroup - codestart);
}
}
-/* If the workspace had to be expanded, free the new memory. */
+/* In rare debugging situations we sometimes need to look at the compiled code
+at this stage. */
-if (cb.workspace_size > COMPILE_WORK_SIZE)
- ccontext->memctl.free((void *)cb.start_workspace,
- ccontext->memctl.memory_data);
+#ifdef CALL_PRINTINT
+pcre2_printint(re, stderr, TRUE);
+fprintf(stderr, "Length=%lu Used=%lu\n", length, usedlength);
+#endif
/* After a successful compile, give an error if there's back reference to a
non-existent capturing subpattern. Then, unless disabled, check whether any
@@ -8558,7 +8800,7 @@ compiler gives a warning about loss of "const" attribute if the cast
if (errorcode == 0)
{
if (re->top_backref > re->top_bracket) errorcode = ERR15;
- else if ((options & PCRE2_NO_AUTO_POSSESS) == 0)
+ else if ((re->overall_options & PCRE2_NO_AUTO_POSSESS) == 0)
{
PCRE2_UCHAR *temp = (PCRE2_UCHAR *)codestart;
if (PRIV(auto_possessify)(temp, utf, &cb) != 0) errorcode = ERR80;
@@ -8591,15 +8833,15 @@ if (errorcode == 0 && cb.check_lookbehind)
if (GET(cc, 1) == 0)
{
int fixed_length;
+ int count = 0;
PCRE2_UCHAR *be = cc - 1 - LINK_SIZE + GET(cc, -LINK_SIZE);
int end_op = *be;
*be = OP_END;
- fixed_length = find_fixedlength(cc, utf, TRUE, &cb, NULL);
+ fixed_length = find_fixedlength(cc, utf, TRUE, &cb, NULL, &count);
*be = end_op;
if (fixed_length < 0)
{
- errorcode = (fixed_length == -2)? ERR36 :
- (fixed_length == -4)? ERR70 : ERR25;
+ errorcode = fixed_length_errors[-fixed_length];
break;
}
if (fixed_length > cb.max_lookbehind) cb.max_lookbehind = fixed_length;
@@ -8607,6 +8849,13 @@ if (errorcode == 0 && cb.check_lookbehind)
}
cc += 1 + LINK_SIZE;
}
+
+ /* The previous value of the maximum lookbehind was transferred to the
+ compiled regex block above. We could have updated this value in the loop
+ above, but keep the two values in step, just in case some later code below
+ uses the cb value. */
+
+ re->max_lookbehind = cb.max_lookbehind;
}
/* Failed to compile, or error while post-processing. Earlier errors get here
@@ -8615,10 +8864,11 @@ via the dreaded goto. */
if (errorcode != 0)
{
HAD_ERROR:
+ *erroroffset = (int)(ptr - pattern);
+ HAD_UTF_ERROR:
+ *errorptr = errorcode;
pcre2_code_free(re);
re = NULL;
- *errorptr = errorcode;
- *erroroffset = (int)(ptr - pattern);
goto EXIT;
}
@@ -8712,7 +8962,14 @@ can be provided to applications. */
do
{
- if (could_be_empty_branch(codestart, code, utf, &cb, NULL))
+ int count = 0;
+ int rc = could_be_empty_branch(codestart, code, utf, &cb, TRUE, NULL, &count);
+ if (rc < 0)
+ {
+ errorcode = ERR86;
+ goto HAD_ERROR;
+ }
+ if (rc > 0)
{
re->flags |= PCRE2_MATCH_EMPTY;
break;
@@ -8734,13 +8991,16 @@ if ((re->overall_options & PCRE2_NO_START_OPTIMIZE) == 0 &&
/* Control ends up here in all cases. If memory was obtained for a
zero-terminated copy of the pattern, remember to free it before returning. Also
-free the list of named groups if a larger one had to be obtained. */
+free the list of named groups if a larger one had to be obtained, and likewise
+the group information vector. */
EXIT:
if (copied_pattern != stack_copied_pattern)
ccontext->memctl.free(copied_pattern, ccontext->memctl.memory_data);
if (cb.named_group_list_size > NAMED_GROUP_LIST_SIZE)
ccontext->memctl.free((void *)cb.named_groups, ccontext->memctl.memory_data);
+if (cb.groupinfo != c32workspace)
+ ccontext->memctl.free((void *)cb.groupinfo, ccontext->memctl.memory_data);
return re; /* Will be NULL after an error */
}
diff --git a/pcre2-10.20/src/pcre2_config.c b/pcre2-10.21/src/pcre2_config.c
index 22aa3587..92184594 100644
--- a/pcre2-10.20/src/pcre2_config.c
+++ b/pcre2-10.21/src/pcre2_config.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2014 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
diff --git a/pcre2-10.20/src/pcre2_context.c b/pcre2-10.21/src/pcre2_context.c
index 6146999d..ae050fe9 100644
--- a/pcre2-10.20/src/pcre2_context.c
+++ b/pcre2-10.21/src/pcre2_context.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2014 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -131,13 +131,14 @@ return gcontext;
when no context is supplied to the compile function. */
const pcre2_compile_context PRIV(default_compile_context) = {
- { default_malloc, default_free, NULL },
- NULL,
- NULL,
- PRIV(default_tables),
- BSR_DEFAULT,
- NEWLINE_DEFAULT,
- PARENS_NEST_LIMIT };
+ { default_malloc, default_free, NULL }, /* Default memory handling */
+ NULL, /* Stack guard */
+ NULL, /* Stack guard data */
+ PRIV(default_tables), /* Character tables */
+ PCRE2_UNSET, /* Max pattern length */
+ BSR_DEFAULT, /* Backslash R default */
+ NEWLINE_DEFAULT, /* Newline convention */
+ PARENS_NEST_LIMIT }; /* As it says */
/* The create function copies the default into the new memory, but must
override the default memory handling functions if a gcontext was provided. */
@@ -169,6 +170,7 @@ const pcre2_match_context PRIV(default_match_context) = {
#endif
NULL,
NULL,
+ PCRE2_UNSET, /* Offset limit */
MATCH_LIMIT,
MATCH_LIMIT_RECURSION };
@@ -295,6 +297,13 @@ switch(value)
}
PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_set_max_pattern_length(pcre2_compile_context *ccontext, PCRE2_SIZE length)
+{
+ccontext->max_pattern_length = length;
+return 0;
+}
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
pcre2_set_newline(pcre2_compile_context *ccontext, uint32_t newline)
{
switch(newline)
@@ -348,6 +357,13 @@ return 0;
}
PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_set_offset_limit(pcre2_match_context *mcontext, PCRE2_SIZE limit)
+{
+mcontext->offset_limit = limit;
+return 0;
+}
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
pcre2_set_recursion_limit(pcre2_match_context *mcontext, uint32_t limit)
{
mcontext->recursion_limit = limit;
diff --git a/pcre2-10.20/src/pcre2_dfa_match.c b/pcre2-10.21/src/pcre2_dfa_match.c
index b14477de..76bc0852 100644
--- a/pcre2-10.20/src/pcre2_dfa_match.c
+++ b/pcre2-10.21/src/pcre2_dfa_match.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2014 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -433,13 +433,13 @@ move back, and set up each alternative appropriately. */
if (*first_op == OP_REVERSE)
{
- int max_back = 0;
- int gone_back;
+ size_t max_back = 0;
+ size_t gone_back;
end_code = this_start_code;
do
{
- int back = GET(end_code, 2+LINK_SIZE);
+ size_t back = GET(end_code, 2+LINK_SIZE);
if (back > max_back) max_back = back;
end_code += GET(end_code, 1);
}
@@ -466,8 +466,8 @@ if (*first_op == OP_REVERSE)
/* In byte-mode we can do this quickly. */
{
- gone_back = (current_subject - max_back < start_subject)?
- (int)(current_subject - start_subject) : max_back;
+ size_t current_offset = (size_t)(current_subject - start_subject);
+ gone_back = (current_offset < max_back)? current_offset : max_back;
current_subject -= gone_back;
}
@@ -481,7 +481,7 @@ if (*first_op == OP_REVERSE)
end_code = this_start_code;
do
{
- int back = GET(end_code, 2+LINK_SIZE);
+ size_t back = GET(end_code, 2+LINK_SIZE);
if (back <= gone_back)
{
int bstate = (int)(end_code - start_code + 2 + 2*LINK_SIZE);
@@ -2774,7 +2774,7 @@ for (;;)
{
PCRE2_SPTR p = start_subject + local_offsets[rc];
PCRE2_SPTR pp = start_subject + local_offsets[rc+1];
- while (p < pp) if (NOT_FIRSTCHAR(*p++)) charcount--;
+ while (p < pp) if (NOT_FIRSTCU(*p++)) charcount--;
}
#endif
if (charcount > 0)
@@ -2874,7 +2874,7 @@ for (;;)
PCRE2_SPTR pp = local_ptr;
charcount = (int)(pp - p);
#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
- if (utf) while (p < pp) if (NOT_FIRSTCHAR(*p++)) charcount--;
+ if (utf) while (p < pp) if (NOT_FIRSTCU(*p++)) charcount--;
#endif
ADD_NEW_DATA(-next_state_offset, 0, (charcount - 1));
}
@@ -2960,7 +2960,7 @@ for (;;)
{
PCRE2_SPTR p = start_subject + local_offsets[0];
PCRE2_SPTR pp = start_subject + local_offsets[1];
- while (p < pp) if (NOT_FIRSTCHAR(*p++)) charcount--;
+ while (p < pp) if (NOT_FIRSTCU(*p++)) charcount--;
}
#endif
ADD_NEW_DATA(-next_state_offset, 0, (charcount - 1));
@@ -3116,6 +3116,7 @@ const pcre2_real_code *re = (const pcre2_real_code *)code;
PCRE2_SPTR start_match;
PCRE2_SPTR end_subject;
+PCRE2_SPTR bumpalong_limit;
PCRE2_SPTR req_cu_ptr;
BOOL utf, anchored, startline, firstline;
@@ -3172,15 +3173,10 @@ occur. */
#define FF (PCRE2_NOTEMPTY_SET|PCRE2_NE_ATST_SET)
#define OO (PCRE2_NOTEMPTY|PCRE2_NOTEMPTY_ATSTART)
-options |= (re->flags & FF) / ((FF & -FF) / (OO & -OO));
+options |= (re->flags & FF) / ((FF & (~FF+1)) / (OO & (~OO+1)));
#undef FF
#undef OO
-/* A NULL match context means "use a default context" */
-
-if (mcontext == NULL)
- mcontext = (pcre2_match_context *)(&PRIV(default_match_context));
-
/* If restarting after a partial match, do some sanity checks on the contents
of the workspace. */
@@ -3205,8 +3201,11 @@ where to start. */
startline = (re->flags & PCRE2_STARTLINE) != 0;
firstline = (re->overall_options & PCRE2_FIRSTLINE) != 0;
+bumpalong_limit = end_subject;
-/* Fill in the fields in the match block. */
+/* Get data from the match context, if present, and fill in the fields in the
+match block. It is an error to set an offset limit without setting the flag at
+compile time. */
if (mcontext == NULL)
{
@@ -3215,6 +3214,12 @@ if (mcontext == NULL)
}
else
{
+ if (mcontext->offset_limit != PCRE2_UNSET)
+ {
+ if ((re->overall_options & PCRE2_USE_OFFSET_LIMIT) == 0)
+ return PCRE2_ERROR_BADOFFSETLIMIT;
+ bumpalong_limit = subject + mcontext->offset_limit;
+ }
mb->callout = mcontext->callout;
mb->callout_data = mcontext->callout_data;
mb->memctl = mcontext->memctl;
@@ -3264,18 +3269,50 @@ switch(re->newline_convention)
/* Check a UTF string for validity if required. For 8-bit and 16-bit strings,
we must also check that a starting offset does not point into the middle of a
-multiunit character. */
+multiunit character. We check only the portion of the subject that is going to
+be inspected during matching - from the offset minus the maximum back reference
+to the given length. This saves time when a small part of a large subject is
+being matched by the use of a starting offset. Note that the maximum lookbehind
+is a number of characters, not code units. */
#ifdef SUPPORT_UNICODE
if (utf && (options & PCRE2_NO_UTF_CHECK) == 0)
{
- match_data->rc = PRIV(valid_utf)(subject, length, &(match_data->startchar));
- if (match_data->rc != 0) return match_data->rc;
+ PCRE2_SPTR check_subject = start_match; /* start_match includes offset */
+
+ if (start_offset > 0)
+ {
#if PCRE2_CODE_UNIT_WIDTH != 32
- if (start_offset > 0 && start_offset < length &&
- NOT_FIRSTCHAR(subject[start_offset]))
- return PCRE2_ERROR_BADUTFOFFSET;
+ unsigned int i;
+ if (start_match < end_subject && NOT_FIRSTCU(*start_match))
+ return PCRE2_ERROR_BADUTFOFFSET;
+ for (i = re->max_lookbehind; i > 0 && check_subject > subject; i--)
+ {
+ check_subject--;
+ while (check_subject > subject &&
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ (*check_subject & 0xc0) == 0x80)
+#else /* 16-bit */
+ (*check_subject & 0xfc00) == 0xdc00)
+#endif /* PCRE2_CODE_UNIT_WIDTH == 8 */
+ check_subject--;
+ }
+#else /* In the 32-bit library, one code unit equals one character. */
+ check_subject -= re->max_lookbehind;
+ if (check_subject < subject) check_subject = subject;
#endif /* PCRE2_CODE_UNIT_WIDTH != 32 */
+ }
+
+ /* Validate the relevant portion of the subject. After an error, adjust the
+ offset to be an absolute offset in the whole string. */
+
+ match_data->rc = PRIV(valid_utf)(check_subject,
+ length - (check_subject - subject), &(match_data->startchar));
+ if (match_data->rc != 0)
+ {
+ match_data->startchar += check_subject - subject;
+ return match_data->rc;
+ }
}
#endif /* SUPPORT_UNICODE */
@@ -3507,6 +3544,10 @@ for (;;)
/* ------------ End of start of match optimizations ------------ */
+ /* Give no match if we have passed the bumpalong limit. */
+
+ if (start_match > bumpalong_limit) break;
+
/* OK, now we can do the business */
mb->start_used_ptr = start_match;
diff --git a/pcre2-10.20/src/pcre2_error.c b/pcre2-10.21/src/pcre2_error.c
index c539bd23..6b4756ae 100644
--- a/pcre2-10.20/src/pcre2_error.c
+++ b/pcre2-10.21/src/pcre2_error.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2015 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -51,11 +51,10 @@ POSSIBILITY OF SUCH DAMAGE.
/* The texts of compile-time error messages. Compile-time error numbers start
at COMPILE_ERROR_BASE (100).
-Do not ever re-use any error number, because they are documented. Always add a
-new error instead. This used to be a table of strings, but in order to reduce
-the number of relocations needed when a shared library is loaded dynamically,
-it is now one long string. We cannot use a table of offsets, because the
-lengths of inserts such as XSTRING(MAX_NAME_SIZE) are not known. Instead,
+This used to be a table of strings, but in order to reduce the number of
+relocations needed when a shared library is loaded dynamically, it is now one
+long string. We cannot use a table of offsets, because the lengths of inserts
+such as XSTRING(MAX_NAME_SIZE) are not known. Instead,
pcre2_get_error_message() counts through to the one it wants - this isn't a
performance issue because these strings are used only when there is an error.
@@ -92,7 +91,7 @@ static const char compile_error_texts[] =
"failed to allocate heap memory\0"
"unmatched closing parenthesis\0"
"internal error: code overflow\0"
- "unrecognized character after (?<\0"
+ "letter or underscore expected after (?< or (?'\0"
/* 25 */
"lookbehind assertion is not fixed length\0"
"malformed number or name after (?(\0"
@@ -112,7 +111,7 @@ static const char compile_error_texts[] =
"number after (?C is greater than 255\0"
"closing parenthesis for (?C expected\0"
/* 40 */
- "recursion could loop indefinitely\0"
+ "invalid escape sequence in (*VERB) name\0"
"unrecognized character after (?P\0"
"syntax error in subpattern name (missing terminator)\0"
"two named subpatterns have the same name (PCRE2_DUPNAMES not set)\0"
@@ -154,7 +153,7 @@ static const char compile_error_texts[] =
/* 70 */
"internal error: unknown opcode in find_fixedlength()\0"
"\\N is not supported in a class\0"
- "too many forward references\0"
+ "SPARE ERROR\0"
"disallowed Unicode code point (>= 0xd800 && <= 0xdfff)\0"
"using UTF is disabled by the application\0"
/* 75 */
@@ -169,6 +168,11 @@ static const char compile_error_texts[] =
"unrecognized string delimiter follows (?C\0"
"using \\C is disabled by the application\0"
"(?| and/or (?J: or (?x: parentheses are too deeply nested\0"
+ /* 85 */
+ "using \\C is disabled in this PCRE2 library\0"
+ "regular expression is too complicated\0"
+ "lookbehind assertion is too long\0"
+ "pattern string is longer than the limit set by the application\0"
;
/* Match-time and UTF error texts are in the same format. */
@@ -200,7 +204,7 @@ static const char match_error_texts[] =
/* 20 */
"UTF-8 error: overlong 5-byte sequence\0"
"UTF-8 error: overlong 6-byte sequence\0"
- "UTF-8 error: isolated 0x80 byte\0"
+ "UTF-8 error: isolated byte with 0x80 bit set\0"
"UTF-8 error: illegal byte (0xfe or 0xff)\0"
"UTF-16 error: missing low surrogate at end\0"
/* 25 */
@@ -239,7 +243,15 @@ static const char match_error_texts[] =
"nested recursion at the same subject position\0"
"recursion limit exceeded\0"
"requested value is not available\0"
+ /* 55 */
"requested value is not set\0"
+ "offset limit set without PCRE2_USE_OFFSET_LIMIT\0"
+ "bad escape sequence in replacement string\0"
+ "expected closing curly bracket in replacement string\0"
+ "bad substitution in replacement string\0"
+ /* 60 */
+ "match with end before start is not supported\0"
+ "too many replacements (more than INT_MAX)\0"
;
diff --git a/pcre2-10.21/src/pcre2_find_bracket.c b/pcre2-10.21/src/pcre2_find_bracket.c
new file mode 100644
index 00000000..803e7197
--- /dev/null
+++ b/pcre2-10.21/src/pcre2_find_bracket.c
@@ -0,0 +1,218 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+
+/* This module contains a single function that scans through a compiled pattern
+until it finds a capturing bracket with the given number, or, if the number is
+negative, an instance of OP_REVERSE for a lookbehind. The function is called
+from pcre2_compile.c and also from pcre2_study.c when finding the minimum
+matching length. */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "pcre2_internal.h"
+
+
+/*************************************************
+* Scan compiled regex for specific bracket *
+*************************************************/
+
+/*
+Arguments:
+ code points to start of expression
+ utf TRUE in UTF mode
+ number the required bracket number or negative to find a lookbehind
+
+Returns: pointer to the opcode for the bracket, or NULL if not found
+*/
+
+PCRE2_SPTR
+PRIV(find_bracket)(PCRE2_SPTR code, BOOL utf, int number)
+{
+for (;;)
+ {
+ register PCRE2_UCHAR c = *code;
+
+ if (c == OP_END) return NULL;
+
+ /* XCLASS is used for classes that cannot be represented just by a bit map.
+ This includes negated single high-valued characters. CALLOUT_STR is used for
+ callouts with string arguments. In both cases the length in the table is
+ zero; the actual length is stored in the compiled code. */
+
+ if (c == OP_XCLASS) code += GET(code, 1);
+ else if (c == OP_CALLOUT_STR) code += GET(code, 1 + 2*LINK_SIZE);
+
+ /* Handle lookbehind */
+
+ else if (c == OP_REVERSE)
+ {
+ if (number < 0) return (PCRE2_UCHAR *)code;
+ code += PRIV(OP_lengths)[c];
+ }
+
+ /* Handle capturing bracket */
+
+ else if (c == OP_CBRA || c == OP_SCBRA ||
+ c == OP_CBRAPOS || c == OP_SCBRAPOS)
+ {
+ int n = (int)GET2(code, 1+LINK_SIZE);
+ if (n == number) return (PCRE2_UCHAR *)code;
+ code += PRIV(OP_lengths)[c];
+ }
+
+ /* Otherwise, we can get the item's length from the table, except that for
+ repeated character types, we have to test for \p and \P, which have an extra
+ two bytes of parameters, and for MARK/PRUNE/SKIP/THEN with an argument, we
+ must add in its length. */
+
+ else
+ {
+ switch(c)
+ {
+ case OP_TYPESTAR:
+ case OP_TYPEMINSTAR:
+ case OP_TYPEPLUS:
+ case OP_TYPEMINPLUS:
+ case OP_TYPEQUERY:
+ case OP_TYPEMINQUERY:
+ case OP_TYPEPOSSTAR:
+ case OP_TYPEPOSPLUS:
+ case OP_TYPEPOSQUERY:
+ if (code[1] == OP_PROP || code[1] == OP_NOTPROP) code += 2;
+ break;
+
+ case OP_TYPEUPTO:
+ case OP_TYPEMINUPTO:
+ case OP_TYPEEXACT:
+ case OP_TYPEPOSUPTO:
+ if (code[1 + IMM2_SIZE] == OP_PROP || code[1 + IMM2_SIZE] == OP_NOTPROP)
+ code += 2;
+ break;
+
+ case OP_MARK:
+ case OP_PRUNE_ARG:
+ case OP_SKIP_ARG:
+ case OP_THEN_ARG:
+ code += code[1];
+ break;
+ }
+
+ /* Add in the fixed length from the table */
+
+ code += PRIV(OP_lengths)[c];
+
+ /* In UTF-8 and UTF-16 modes, opcodes that are followed by a character may be
+ followed by a multi-byte character. The length in the table is a minimum, so
+ we have to arrange to skip the extra bytes. */
+
+#ifdef MAYBE_UTF_MULTI
+ if (utf) switch(c)
+ {
+ case OP_CHAR:
+ case OP_CHARI:
+ case OP_NOT:
+ case OP_NOTI:
+ case OP_EXACT:
+ case OP_EXACTI:
+ case OP_NOTEXACT:
+ case OP_NOTEXACTI:
+ case OP_UPTO:
+ case OP_UPTOI:
+ case OP_NOTUPTO:
+ case OP_NOTUPTOI:
+ case OP_MINUPTO:
+ case OP_MINUPTOI:
+ case OP_NOTMINUPTO:
+ case OP_NOTMINUPTOI:
+ case OP_POSUPTO:
+ case OP_POSUPTOI:
+ case OP_NOTPOSUPTO:
+ case OP_NOTPOSUPTOI:
+ case OP_STAR:
+ case OP_STARI:
+ case OP_NOTSTAR:
+ case OP_NOTSTARI:
+ case OP_MINSTAR:
+ case OP_MINSTARI:
+ case OP_NOTMINSTAR:
+ case OP_NOTMINSTARI:
+ case OP_POSSTAR:
+ case OP_POSSTARI:
+ case OP_NOTPOSSTAR:
+ case OP_NOTPOSSTARI:
+ case OP_PLUS:
+ case OP_PLUSI:
+ case OP_NOTPLUS:
+ case OP_NOTPLUSI:
+ case OP_MINPLUS:
+ case OP_MINPLUSI:
+ case OP_NOTMINPLUS:
+ case OP_NOTMINPLUSI:
+ case OP_POSPLUS:
+ case OP_POSPLUSI:
+ case OP_NOTPOSPLUS:
+ case OP_NOTPOSPLUSI:
+ case OP_QUERY:
+ case OP_QUERYI:
+ case OP_NOTQUERY:
+ case OP_NOTQUERYI:
+ case OP_MINQUERY:
+ case OP_MINQUERYI:
+ case OP_NOTMINQUERY:
+ case OP_NOTMINQUERYI:
+ case OP_POSQUERY:
+ case OP_POSQUERYI:
+ case OP_NOTPOSQUERY:
+ case OP_NOTPOSQUERYI:
+ if (HAS_EXTRALEN(code[-1])) code += GET_EXTRALEN(code[-1]);
+ break;
+ }
+#else
+ (void)(utf); /* Keep compiler happy by referencing function argument */
+#endif /* MAYBE_UTF_MULTI */
+ }
+ }
+}
+
+/* End of pcre2_find_bracket.c */
diff --git a/pcre2-10.20/src/pcre2_internal.h b/pcre2-10.21/src/pcre2_internal.h
index a4cf1e08..7c9f66cc 100644
--- a/pcre2-10.20/src/pcre2_internal.h
+++ b/pcre2-10.21/src/pcre2_internal.h
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2015 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,10 @@ POSSIBILITY OF SUCH DAMAGE.
*/
/* We do not support both EBCDIC and Unicode at the same time. The "configure"
-script prevents both being selected, but not everybody uses "configure". */
+script prevents both being selected, but not everybody uses "configure". EBCDIC
+is only supported for the 8-bit library, but the check for this has to be later
+in this file, because the first part is not width-dependent, and is included by
+pcre2test.c with CODE_UNIT_WIDTH == 0. */
#if defined EBCDIC && defined SUPPORT_UNICODE
#error The use of both EBCDIC and SUPPORT_UNICODE is not supported.
@@ -524,9 +527,11 @@ bytes in a code unit in that mode. */
#define PCRE2_NL_SET 0x00008000 /* newline was set in the pattern */
#define PCRE2_NOTEMPTY_SET 0x00010000 /* (*NOTEMPTY) used ) keep */
#define PCRE2_NE_ATST_SET 0x00020000 /* (*NOTEMPTY_ATSTART) used) together */
-#define PCRE2_DEREF_TABLES 0x00040000 /* Release character tables. */
+#define PCRE2_DEREF_TABLES 0x00040000 /* release character tables */
#define PCRE2_NOJIT 0x00080000 /* (*NOJIT) used */
#define PCRE2_HASBKPORX 0x00100000 /* contains \P, \p, or \X */
+#define PCRE2_DUPCAPUSED 0x00200000 /* contains (?| */
+#define PCRE2_HASBKC 0x00400000 /* contains \C */
#define PCRE2_MODE_MASK (PCRE2_MODE8 | PCRE2_MODE16 | PCRE2_MODE32)
@@ -917,6 +922,7 @@ a positive value. */
#define STRING_NOTEMPTY_ATSTART_RIGHTPAR "NOTEMPTY_ATSTART)"
#define STRING_LIMIT_MATCH_EQ "LIMIT_MATCH="
#define STRING_LIMIT_RECURSION_EQ "LIMIT_RECURSION="
+#define STRING_MARK "MARK"
#else /* SUPPORT_UNICODE */
@@ -1189,6 +1195,7 @@ only. */
#define STRING_NOTEMPTY_ATSTART_RIGHTPAR STR_N STR_O STR_T STR_E STR_M STR_P STR_T STR_Y STR_UNDERSCORE STR_A STR_T STR_S STR_T STR_A STR_R STR_T STR_RIGHT_PARENTHESIS
#define STRING_LIMIT_MATCH_EQ STR_L STR_I STR_M STR_I STR_T STR_UNDERSCORE STR_M STR_A STR_T STR_C STR_H STR_EQUALS_SIGN
#define STRING_LIMIT_RECURSION_EQ STR_L STR_I STR_M STR_I STR_T STR_UNDERSCORE STR_R STR_E STR_C STR_U STR_R STR_S STR_I STR_O STR_N STR_EQUALS_SIGN
+#define STRING_MARK STR_M STR_A STR_R STR_K
#endif /* SUPPORT_UNICODE */
@@ -1800,11 +1807,16 @@ typedef struct pcre2_serialized_data {
#if defined PCRE2_CODE_UNIT_WIDTH && PCRE2_CODE_UNIT_WIDTH != 0
+/* EBCDIC is supported only for the 8-bit library. */
+
+#if defined EBCDIC && PCRE2_CODE_UNIT_WIDTH != 8
+#error EBCDIC is not supported for the 16-bit or 32-bit libraries
+#endif
+
/* This is the largest non-UTF code point. */
#define MAX_NON_UTF_CHAR (0xffffffffU >> (32 - PCRE2_CODE_UNIT_WIDTH))
-
/* Internal shared data tables and variables. These are used by more than one
of the exported public functions. They have to be "external" in the C sense,
but are not part of the PCRE2 public API. Although the data for some of them is
@@ -1883,6 +1895,7 @@ not referenced from pcre2test, and must not be defined when no code unit width
is available. */
#define _pcre2_auto_possessify PCRE2_SUFFIX(_pcre2_auto_possessify_)
+#define _pcre2_check_escape PCRE2_SUFFIX(_pcre2_check_escape_)
#define _pcre2_find_bracket PCRE2_SUFFIX(_pcre2_find_bracket_)
#define _pcre2_is_newline PCRE2_SUFFIX(_pcre2_is_newline_)
#define _pcre2_jit_free_rodata PCRE2_SUFFIX(_pcre2_jit_free_rodata_)
@@ -1904,6 +1917,8 @@ is available. */
extern int _pcre2_auto_possessify(PCRE2_UCHAR *, BOOL,
const compile_block *);
+extern int _pcre2_check_escape(PCRE2_SPTR *, PCRE2_SPTR, uint32_t *,
+ int *, uint32_t, BOOL, compile_block *);
extern PCRE2_SPTR _pcre2_find_bracket(PCRE2_SPTR, BOOL, int);
extern BOOL _pcre2_is_newline(PCRE2_SPTR, uint32_t, PCRE2_SPTR,
uint32_t *, BOOL);
diff --git a/pcre2-10.20/src/pcre2_intmodedep.h b/pcre2-10.21/src/pcre2_intmodedep.h
index f20f71e1..90b7959e 100644
--- a/pcre2-10.20/src/pcre2_intmodedep.h
+++ b/pcre2-10.21/src/pcre2_intmodedep.h
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2014 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -72,7 +72,7 @@ just to undefine them all. */
#undef MAX_MARK
#undef MAX_PATTERN_SIZE
#undef MAX_UTF_SINGLE_CU
-#undef NOT_FIRSTCHAR
+#undef NOT_FIRSTCU
#undef PUT
#undef PUT2
#undef PUT2INC
@@ -252,7 +252,7 @@ UTF support is omitted, we don't even define them. */
/* #define MAX_UTF_SINGLE_CU */
/* #define HAS_EXTRALEN(c) */
/* #define GET_EXTRALEN(c) */
-/* #define NOT_FIRSTCHAR(c) */
+/* #define NOT_FIRSTCU(c) */
#define GETCHAR(c, eptr) c = *eptr;
#define GETCHARTEST(c, eptr) c = *eptr;
#define GETCHARINC(c, eptr) c = *eptr++;
@@ -285,10 +285,10 @@ Otherwise it has an undefined behaviour. */
#define GET_EXTRALEN(c) (PRIV(utf8_table4)[(c) & 0x3f])
-/* Returns TRUE, if the given character is not the first character
-of a UTF sequence. */
+/* Returns TRUE, if the given value is not the first code unit of a UTF
+sequence. */
-#define NOT_FIRSTCHAR(c) (((c) & 0xc0) == 0x80)
+#define NOT_FIRSTCU(c) (((c) & 0xc0) == 0x80)
/* Get the next UTF-8 character, not advancing the pointer. This is called when
we know we are in UTF-8 mode. */
@@ -371,10 +371,10 @@ Otherwise it has an undefined behaviour. */
#define GET_EXTRALEN(c) 1
-/* Returns TRUE, if the given character is not the first character
-of a UTF sequence. */
+/* Returns TRUE, if the given value is not the first code unit of a UTF
+sequence. */
-#define NOT_FIRSTCHAR(c) (((c) & 0xfc00) == 0xdc00)
+#define NOT_FIRSTCU(c) (((c) & 0xfc00) == 0xdc00)
/* Base macro to pick up the low surrogate of a UTF-16 character, not
advancing the pointer. */
@@ -469,7 +469,7 @@ into one PCRE2_UCHAR unit. */
#define MAX_UTF_SINGLE_CU (0x10ffffu)
#define HAS_EXTRALEN(c) (0)
#define GET_EXTRALEN(c) (0)
-#define NOT_FIRSTCHAR(c) (0)
+#define NOT_FIRSTCU(c) (0)
/* Get the next UTF-32 character, not advancing the pointer. This is called when
we know we are in UTF-32 mode. */
@@ -562,6 +562,7 @@ typedef struct pcre2_real_compile_context {
int (*stack_guard)(uint32_t, void *);
void *stack_guard_data;
const uint8_t *tables;
+ PCRE2_SIZE max_pattern_length;
uint16_t bsr_convention;
uint16_t newline_convention;
uint32_t parens_nest_limit;
@@ -580,6 +581,7 @@ typedef struct pcre2_real_match_context {
#endif
int (*callout)(pcre2_callout_block *, void *);
void *callout_data;
+ PCRE2_SIZE offset_limit;
uint32_t match_limit;
uint32_t recursion_limit;
} pcre2_real_match_context;
@@ -588,11 +590,17 @@ typedef struct pcre2_real_match_context {
defined specially because it is required in pcre2_serialize_decode() when
copying the size from possibly unaligned memory into a variable of the same
type. Use a macro rather than a typedef to avoid compiler warnings when this
-file is included multiple times by pcre2test. */
+file is included multiple times by pcre2test. LOOKBEHIND_MAX specifies the
+largest lookbehind that is supported. (OP_REVERSE in a pattern has a 16-bit
+argument in 8-bit and 16-bit modes, so we need no more than a 16-bit field
+here.) */
#undef CODE_BLOCKSIZE_TYPE
#define CODE_BLOCKSIZE_TYPE size_t
+#undef LOOKBEHIND_MAX
+#define LOOKBEHIND_MAX UINT16_MAX
+
typedef struct pcre2_real_code {
pcre2_memctl memctl; /* Memory control fields */
const uint8_t *tables; /* The character tables */
@@ -647,6 +655,13 @@ typedef struct recurse_check {
PCRE2_SPTR group;
} recurse_check;
+/* Structure for building a cache when filling in recursion offsets. */
+
+typedef struct recurse_cache {
+ PCRE2_SPTR group;
+ int recno;
+} recurse_cache;
+
/* Structure for maintaining a chain of pointers to the currently incomplete
branches, for testing for left recursion while compiling. */
@@ -678,7 +693,7 @@ typedef struct compile_block {
PCRE2_SPTR start_code; /* The start of the compiled code */
PCRE2_SPTR start_pattern; /* The start of the pattern */
PCRE2_SPTR end_pattern; /* The end of the pattern */
- PCRE2_UCHAR *hwm; /* High watermark of workspace */
+ PCRE2_SPTR nestptr[2]; /* Pointer(s) saved for string substitution */
PCRE2_UCHAR *name_table; /* The name/number table */
size_t workspace_size; /* Size of workspace */
uint16_t names_found; /* Number of entries so far */
@@ -690,6 +705,7 @@ typedef struct compile_block {
uint32_t external_flags; /* External flag bits to be set */
uint32_t bracount; /* Count of capturing parens as we compile */
uint32_t final_bracount; /* Saved value after first pass */
+ uint32_t *groupinfo; /* Group info vector */
uint32_t top_backref; /* Maximum back reference */
uint32_t backref_map; /* Bitmap of low back refs */
uint32_t nltype; /* Newline type */
@@ -701,6 +717,7 @@ typedef struct compile_block {
int req_varyopt; /* "After variable item" flag for reqbyte */
BOOL had_accept; /* (*ACCEPT) encountered */
BOOL had_pruneorskip; /* (*PRUNE) or (*SKIP) encountered */
+ BOOL had_recurse; /* Had a recursion or subroutine call */
BOOL check_lookbehind; /* Lookbehinds need later checking */
BOOL dupnames; /* Duplicate names exist */
BOOL iscondassert; /* Next assert is a condition */
diff --git a/pcre2-10.20/src/pcre2_jit_compile.c b/pcre2-10.21/src/pcre2_jit_compile.c
index 272ab285..b46f4e39 100644
--- a/pcre2-10.20/src/pcre2_jit_compile.c
+++ b/pcre2-10.21/src/pcre2_jit_compile.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2014 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -186,6 +186,7 @@ typedef struct jit_arguments {
int (*callout)(pcre2_callout_block *, void *);
void *callout_data;
/* Everything else after. */
+ sljit_uw offset_limit;
sljit_ui limit_match;
uint32_t oveccount;
uint32_t options;
@@ -359,33 +360,38 @@ typedef struct compiler_common {
/* Current position where a THEN must jump. */
then_trap_backtrack *then_trap;
/* Starting offset of private data for capturing brackets. */
- int cbra_ptr;
+ sljit_si cbra_ptr;
/* Output vector starting point. Must be divisible by 2. */
- int ovector_start;
+ sljit_si ovector_start;
/* Points to the starting character of the current match. */
- int start_ptr;
+ sljit_si start_ptr;
/* Last known position of the requested byte. */
- int req_char_ptr;
+ sljit_si req_char_ptr;
/* Head of the last recursion. */
- int recursive_head_ptr;
+ sljit_si recursive_head_ptr;
/* First inspected character for partial matching.
(Needed for avoiding zero length partial matches.) */
- int start_used_ptr;
+ sljit_si start_used_ptr;
/* Starting pointer for partial soft matches. */
- int hit_start;
- /* End pointer of the first line. */
- int first_line_end;
+ sljit_si hit_start;
+ /* Pointer of the match end position. */
+ sljit_si match_end_ptr;
/* Points to the marked string. */
- int mark_ptr;
+ sljit_si mark_ptr;
/* Recursive control verb management chain. */
- int control_head_ptr;
+ sljit_si control_head_ptr;
/* Points to the last matched capture block index. */
- int capture_last_ptr;
+ sljit_si capture_last_ptr;
+ /* Fast forward skipping byte code pointer. */
+ PCRE2_SPTR fast_forward_bc_ptr;
+ /* Locals used by fast fail optimization. */
+ sljit_si fast_fail_start_ptr;
+ sljit_si fast_fail_end_ptr;
/* Flipped and lower case tables. */
const sljit_ub *fcc;
sljit_sw lcc;
- /* Mode can be PCRE_STUDY_JIT_COMPILE and others. */
+ /* Mode can be PCRE2_JIT_COMPLETE and others. */
int mode;
/* TRUE, when minlength is greater than 0. */
BOOL might_be_empty;
@@ -395,6 +401,8 @@ typedef struct compiler_common {
BOOL has_skip_arg;
/* (*THEN) is found in the pattern. */
BOOL has_then;
+ /* (*SKIP) or (*SKIP:arg) is found in lookbehind assertion. */
+ BOOL has_skip_in_assert_back;
/* Currently in recurse or negative assert. */
BOOL local_exit;
/* Currently in a positive assert. */
@@ -593,11 +601,6 @@ SLJIT_ASSERT(*cc >= OP_KET && *cc <= OP_KETRPOS);
return count;
}
-static int ones_in_half_byte[16] = {
- /* 0 */ 0, 1, 1, 2, /* 4 */ 1, 2, 2, 3,
- /* 8 */ 1, 2, 2, 3, /* 12 */ 2, 3, 3, 4
-};
-
/* Functions whose might need modification for all new supported opcodes:
next_opcode
check_opcode_types
@@ -813,6 +816,7 @@ static BOOL check_opcode_types(compiler_common *common, PCRE2_SPTR cc, PCRE2_SPT
{
int count;
PCRE2_SPTR slot;
+PCRE2_SPTR assert_back_end = cc - 1;
/* Calculate important variables (like stack size) and checks whether all opcodes are supported. */
while (cc < ccend)
@@ -884,6 +888,13 @@ while (cc < ccend)
cc += (*cc == OP_CALLOUT) ? PRIV(OP_lengths)[OP_CALLOUT] : GET(cc, 1 + 2*LINK_SIZE);
break;
+ case OP_ASSERTBACK:
+ slot = bracketend(cc);
+ if (slot > assert_back_end)
+ assert_back_end = slot;
+ cc += 1 + LINK_SIZE;
+ break;
+
case OP_THEN_ARG:
common->has_then = TRUE;
common->control_head_ptr = 1;
@@ -905,9 +916,17 @@ while (cc < ccend)
cc += 1;
break;
+ case OP_SKIP:
+ if (cc < assert_back_end)
+ common->has_skip_in_assert_back = TRUE;
+ cc += 1;
+ break;
+
case OP_SKIP_ARG:
common->control_head_ptr = 1;
common->has_skip_arg = TRUE;
+ if (cc < assert_back_end)
+ common->has_skip_in_assert_back = TRUE;
cc += 1 + 2 + cc[1];
break;
@@ -921,6 +940,185 @@ while (cc < ccend)
return TRUE;
}
+static BOOL is_accelerated_repeat(PCRE2_SPTR cc)
+{
+switch(*cc)
+ {
+ case OP_TYPESTAR:
+ case OP_TYPEMINSTAR:
+ case OP_TYPEPLUS:
+ case OP_TYPEMINPLUS:
+ case OP_TYPEPOSSTAR:
+ case OP_TYPEPOSPLUS:
+ return (cc[1] != OP_ANYNL && cc[1] != OP_EXTUNI);
+
+ case OP_STAR:
+ case OP_MINSTAR:
+ case OP_PLUS:
+ case OP_MINPLUS:
+ case OP_POSSTAR:
+ case OP_POSPLUS:
+
+ case OP_STARI:
+ case OP_MINSTARI:
+ case OP_PLUSI:
+ case OP_MINPLUSI:
+ case OP_POSSTARI:
+ case OP_POSPLUSI:
+
+ case OP_NOTSTAR:
+ case OP_NOTMINSTAR:
+ case OP_NOTPLUS:
+ case OP_NOTMINPLUS:
+ case OP_NOTPOSSTAR:
+ case OP_NOTPOSPLUS:
+
+ case OP_NOTSTARI:
+ case OP_NOTMINSTARI:
+ case OP_NOTPLUSI:
+ case OP_NOTMINPLUSI:
+ case OP_NOTPOSSTARI:
+ case OP_NOTPOSPLUSI:
+ return TRUE;
+
+ case OP_CLASS:
+ case OP_NCLASS:
+#if defined SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH != 8
+ case OP_XCLASS:
+ cc += (*cc == OP_XCLASS) ? GET(cc, 1) : (int)(1 + (32 / sizeof(PCRE2_UCHAR)));
+#else
+ cc += (1 + (32 / sizeof(PCRE2_UCHAR)));
+#endif
+
+ switch(*cc)
+ {
+ case OP_CRSTAR:
+ case OP_CRMINSTAR:
+ case OP_CRPLUS:
+ case OP_CRMINPLUS:
+ case OP_CRPOSSTAR:
+ case OP_CRPOSPLUS:
+ return TRUE;
+ }
+ break;
+ }
+return FALSE;
+}
+
+static SLJIT_INLINE BOOL detect_fast_forward_skip(compiler_common *common, int *private_data_start)
+{
+PCRE2_SPTR cc = common->start;
+PCRE2_SPTR end;
+
+/* Skip not repeated brackets. */
+while (TRUE)
+ {
+ switch(*cc)
+ {
+ case OP_SOD:
+ case OP_SOM:
+ case OP_SET_SOM:
+ case OP_NOT_WORD_BOUNDARY:
+ case OP_WORD_BOUNDARY:
+ case OP_EODN:
+ case OP_EOD:
+ case OP_CIRC:
+ case OP_CIRCM:
+ case OP_DOLL:
+ case OP_DOLLM:
+ /* Zero width assertions. */
+ cc++;
+ continue;
+ }
+
+ if (*cc != OP_BRA && *cc != OP_CBRA)
+ break;
+
+ end = cc + GET(cc, 1);
+ if (*end != OP_KET || PRIVATE_DATA(end) != 0)
+ return FALSE;
+ if (*cc == OP_CBRA)
+ {
+ if (common->optimized_cbracket[GET2(cc, 1 + LINK_SIZE)] == 0)
+ return FALSE;
+ cc += IMM2_SIZE;
+ }
+ cc += 1 + LINK_SIZE;
+ }
+
+if (is_accelerated_repeat(cc))
+ {
+ common->fast_forward_bc_ptr = cc;
+ common->private_data_ptrs[(cc + 1) - common->start] = *private_data_start;
+ *private_data_start += sizeof(sljit_sw);
+ return TRUE;
+ }
+return FALSE;
+}
+
+static SLJIT_INLINE void detect_fast_fail(compiler_common *common, PCRE2_SPTR cc, int *private_data_start, sljit_si depth)
+{
+ PCRE2_SPTR next_alt;
+
+ SLJIT_ASSERT(*cc == OP_BRA || *cc == OP_CBRA);
+
+ if (*cc == OP_CBRA && common->optimized_cbracket[GET2(cc, 1 + LINK_SIZE)] == 0)
+ return;
+
+ next_alt = bracketend(cc) - (1 + LINK_SIZE);
+ if (*next_alt != OP_KET || PRIVATE_DATA(next_alt) != 0)
+ return;
+
+ do
+ {
+ next_alt = cc + GET(cc, 1);
+
+ cc += 1 + LINK_SIZE + ((*cc == OP_CBRA) ? IMM2_SIZE : 0);
+
+ while (TRUE)
+ {
+ switch(*cc)
+ {
+ case OP_SOD:
+ case OP_SOM:
+ case OP_SET_SOM:
+ case OP_NOT_WORD_BOUNDARY:
+ case OP_WORD_BOUNDARY:
+ case OP_EODN:
+ case OP_EOD:
+ case OP_CIRC:
+ case OP_CIRCM:
+ case OP_DOLL:
+ case OP_DOLLM:
+ /* Zero width assertions. */
+ cc++;
+ continue;
+ }
+ break;
+ }
+
+ if (depth > 0 && (*cc == OP_BRA || *cc == OP_CBRA))
+ detect_fast_fail(common, cc, private_data_start, depth - 1);
+
+ if (is_accelerated_repeat(cc))
+ {
+ common->private_data_ptrs[(cc + 1) - common->start] = *private_data_start;
+
+ if (common->fast_fail_start_ptr == 0)
+ common->fast_fail_start_ptr = *private_data_start;
+
+ *private_data_start += sizeof(sljit_sw);
+ common->fast_fail_end_ptr = *private_data_start;
+
+ if (*private_data_start > SLJIT_MAX_LOCAL_SIZE)
+ return;
+ }
+
+ cc = next_alt;
+ }
+ while (*cc == OP_ALT);
+}
+
static int get_class_iterator_size(PCRE2_SPTR cc)
{
sljit_ui min;
@@ -1097,6 +1295,7 @@ PCRE2_SPTR alternative;
PCRE2_SPTR end = NULL;
int private_data_ptr = *private_data_start;
int space, size, bracketlen;
+BOOL repeat_check = TRUE;
while (cc < ccend)
{
@@ -1106,7 +1305,8 @@ while (cc < ccend)
if (private_data_ptr > SLJIT_MAX_LOCAL_SIZE)
break;
- if (*cc == OP_ONCE || *cc == OP_ONCE_NC || *cc == OP_BRA || *cc == OP_CBRA || *cc == OP_COND)
+ if (repeat_check && (*cc == OP_ONCE || *cc == OP_ONCE_NC || *cc == OP_BRA || *cc == OP_CBRA || *cc == OP_COND))
+ {
if (detect_repeat(common, cc))
{
/* These brackets are converted to repeats, so no global
@@ -1114,6 +1314,8 @@ while (cc < ccend)
if (cc >= end)
end = bracketend(cc);
}
+ }
+ repeat_check = TRUE;
switch(*cc)
{
@@ -1169,6 +1371,13 @@ while (cc < ccend)
bracketlen = 1 + LINK_SIZE + IMM2_SIZE;
break;
+ case OP_BRAZERO:
+ case OP_BRAMINZERO:
+ case OP_BRAPOSZERO:
+ repeat_check = FALSE;
+ size = 1;
+ break;
+
CASE_ITERATOR_PRIVATE_DATA_1
space = 1;
size = -2;
@@ -1354,6 +1563,13 @@ while (cc < ccend)
cc += 1 + LINK_SIZE + IMM2_SIZE;
break;
+ case OP_THEN:
+ stack_restore = TRUE;
+ if (common->control_head_ptr != 0)
+ *needs_control_head = TRUE;
+ cc ++;
+ break;
+
default:
stack_restore = TRUE;
/* Fall through. */
@@ -2174,7 +2390,7 @@ static SLJIT_INLINE void reset_ovector(compiler_common *common, int length)
{
DEFINE_COMPILER;
struct sljit_label *loop;
-int i;
+sljit_si i;
/* At this point we can freely use all temporary registers. */
SLJIT_ASSERT(length > 1);
@@ -2196,6 +2412,18 @@ else
}
}
+static SLJIT_INLINE void reset_fast_fail(compiler_common *common)
+{
+DEFINE_COMPILER;
+sljit_si i;
+
+SLJIT_ASSERT(common->fast_fail_start_ptr < common->fast_fail_end_ptr);
+
+OP2(SLJIT_SUB, TMP1, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+for (i = common->fast_fail_start_ptr; i < common->fast_fail_end_ptr; i += sizeof(sljit_sw))
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), i, TMP1, 0);
+}
+
static SLJIT_INLINE void do_reset_match(compiler_common *common, int length)
{
DEFINE_COMPILER;
@@ -2249,6 +2477,7 @@ while (current != NULL)
SLJIT_ASSERT_STOP();
break;
}
+ SLJIT_ASSERT(current > (sljit_sw*)current[-1]);
current = (sljit_sw*)current[-1];
}
return -1;
@@ -3070,14 +3299,14 @@ sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
#endif /* SUPPORT_UNICODE */
-static SLJIT_INLINE struct sljit_label *mainloop_entry(compiler_common *common, BOOL hascrorlf, BOOL firstline)
+static SLJIT_INLINE struct sljit_label *mainloop_entry(compiler_common *common, BOOL hascrorlf, uint32_t overall_options)
{
DEFINE_COMPILER;
struct sljit_label *mainloop;
struct sljit_label *newlinelabel = NULL;
struct sljit_jump *start;
struct sljit_jump *end = NULL;
-struct sljit_jump *nl = NULL;
+struct sljit_jump *end2 = NULL;
#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
struct sljit_jump *singlechar;
#endif
@@ -3085,14 +3314,16 @@ jump_list *newline = NULL;
BOOL newlinecheck = FALSE;
BOOL readuchar = FALSE;
-if (!(hascrorlf || firstline) && (common->nltype == NLTYPE_ANY ||
- common->nltype == NLTYPE_ANYCRLF || common->newline > 255))
+if (!(hascrorlf || (overall_options & PCRE2_FIRSTLINE) != 0)
+ && (common->nltype == NLTYPE_ANY || common->nltype == NLTYPE_ANYCRLF || common->newline > 255))
newlinecheck = TRUE;
-if (firstline)
+SLJIT_ASSERT(common->forced_quit_label == NULL);
+
+if ((overall_options & PCRE2_FIRSTLINE) != 0)
{
/* Search for the end of the first line. */
- SLJIT_ASSERT(common->first_line_end != 0);
+ SLJIT_ASSERT(common->match_end_ptr != 0);
OP1(SLJIT_MOV, TMP3, 0, STR_PTR, 0);
if (common->nltype == NLTYPE_FIXED && common->newline > 255)
@@ -3105,24 +3336,49 @@ if (firstline)
CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff, mainloop);
CMPTO(SLJIT_NOT_EQUAL, TMP2, 0, SLJIT_IMM, common->newline & 0xff, mainloop);
JUMPHERE(end);
- OP2(SLJIT_SUB, SLJIT_MEM1(SLJIT_SP), common->first_line_end, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ OP2(SLJIT_SUB, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
}
else
{
end = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
mainloop = LABEL();
/* Continual stores does not cause data dependency. */
- OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->first_line_end, STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr, STR_PTR, 0);
read_char_range(common, common->nlmin, common->nlmax, TRUE);
check_newlinechar(common, common->nltype, &newline, TRUE);
CMPTO(SLJIT_LESS, STR_PTR, 0, STR_END, 0, mainloop);
JUMPHERE(end);
- OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->first_line_end, STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr, STR_PTR, 0);
set_jumps(newline, LABEL());
}
OP1(SLJIT_MOV, STR_PTR, 0, TMP3, 0);
}
+else if ((overall_options & PCRE2_USE_OFFSET_LIMIT) != 0)
+ {
+ /* Check whether offset limit is set and valid. */
+ SLJIT_ASSERT(common->match_end_ptr != 0);
+
+ OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, offset_limit));
+ OP1(SLJIT_MOV, TMP2, 0, STR_END, 0);
+ end = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, (sljit_sw) PCRE2_UNSET);
+ OP1(SLJIT_MOV, TMP2, 0, ARGUMENTS, 0);
+#if PCRE2_CODE_UNIT_WIDTH == 16
+ OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
+#elif PCRE2_CODE_UNIT_WIDTH == 32
+ OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 2);
+#endif
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, begin));
+ OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, TMP1, 0);
+ end2 = CMP(SLJIT_LESS_EQUAL, TMP2, 0, STR_END, 0);
+ OP1(SLJIT_MOV, TMP2, 0, STR_END, 0);
+ JUMPHERE(end2);
+ OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, PCRE2_ERROR_NOMATCH);
+ add_jump(compiler, &common->forced_quit, CMP(SLJIT_LESS, TMP2, 0, STR_PTR, 0));
+ JUMPHERE(end);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr, TMP2, 0);
+ }
start = JUMP(SLJIT_JUMP);
@@ -3138,7 +3394,7 @@ if (newlinecheck)
OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, UCHAR_SHIFT);
#endif
OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
- nl = JUMP(SLJIT_JUMP);
+ end2 = JUMP(SLJIT_JUMP);
}
mainloop = LABEL();
@@ -3183,51 +3439,52 @@ JUMPHERE(start);
if (newlinecheck)
{
JUMPHERE(end);
- JUMPHERE(nl);
+ JUMPHERE(end2);
}
return mainloop;
}
#define MAX_N_CHARS 16
-#define MAX_N_BYTES 8
+#define MAX_DIFF_CHARS 6
-static SLJIT_INLINE void add_prefix_byte(sljit_ub byte, sljit_ub *bytes)
+static SLJIT_INLINE void add_prefix_char(PCRE2_UCHAR chr, PCRE2_UCHAR *chars)
{
-sljit_ub len = bytes[0];
-int i;
+PCRE2_UCHAR i, len;
+len = chars[0];
if (len == 255)
return;
if (len == 0)
{
- bytes[0] = 1;
- bytes[1] = byte;
+ chars[0] = 1;
+ chars[1] = chr;
return;
}
for (i = len; i > 0; i--)
- if (bytes[i] == byte)
+ if (chars[i] == chr)
return;
-if (len >= MAX_N_BYTES - 1)
+if (len >= MAX_DIFF_CHARS - 1)
{
- bytes[0] = 255;
+ chars[0] = 255;
return;
}
len++;
-bytes[len] = byte;
-bytes[0] = len;
+chars[len] = chr;
+chars[0] = len;
}
-static int scan_prefix(compiler_common *common, PCRE2_SPTR cc, sljit_ui *chars, sljit_ub *bytes, int max_chars)
+static int scan_prefix(compiler_common *common, PCRE2_SPTR cc, PCRE2_UCHAR *chars, int max_chars, uint32_t *rec_count)
{
/* Recursive function, which scans prefix literals. */
-BOOL last, any, caseless;
+BOOL last, any, class, caseless;
int len, repeat, len_save, consumed = 0;
-sljit_ui chr, mask;
+sljit_ui chr; /* Any unicode character. */
+sljit_ub *bytes, *bytes_end, byte;
PCRE2_SPTR alternative, cc_save, oc;
#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8
PCRE2_UCHAR othercase[8];
@@ -3240,9 +3497,15 @@ PCRE2_UCHAR othercase[1];
repeat = 1;
while (TRUE)
{
+ if (*rec_count == 0)
+ return 0;
+ (*rec_count)--;
+
last = TRUE;
any = FALSE;
+ class = FALSE;
caseless = FALSE;
+
switch (*cc)
{
case OP_CHARI:
@@ -3304,7 +3567,7 @@ while (TRUE)
#ifdef SUPPORT_UNICODE
if (common->utf && HAS_EXTRALEN(*cc)) len += GET_EXTRALEN(*cc);
#endif
- max_chars = scan_prefix(common, cc + len, chars, bytes, max_chars);
+ max_chars = scan_prefix(common, cc + len, chars, max_chars, rec_count);
if (max_chars == 0)
return consumed;
last = FALSE;
@@ -3327,7 +3590,7 @@ while (TRUE)
alternative = cc + GET(cc, 1);
while (*alternative == OP_ALT)
{
- max_chars = scan_prefix(common, alternative + 1 + LINK_SIZE, chars, bytes, max_chars);
+ max_chars = scan_prefix(common, alternative + 1 + LINK_SIZE, chars, max_chars, rec_count);
if (max_chars == 0)
return consumed;
alternative += GET(alternative, 1);
@@ -3342,16 +3605,14 @@ while (TRUE)
#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8
if (common->utf && !is_char7_bitset((const sljit_ub *)(cc + 1), FALSE)) return consumed;
#endif
- any = TRUE;
- cc += 1 + 32 / sizeof(PCRE2_UCHAR);
+ class = TRUE;
break;
case OP_NCLASS:
#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
if (common->utf) return consumed;
#endif
- any = TRUE;
- cc += 1 + 32 / sizeof(PCRE2_UCHAR);
+ class = TRUE;
break;
#if defined SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH != 8
@@ -3439,30 +3700,114 @@ while (TRUE)
if (any)
{
-#if PCRE2_CODE_UNIT_WIDTH == 8
- mask = 0xff;
-#elif PCRE2_CODE_UNIT_WIDTH == 16
- mask = 0xffff;
-#elif PCRE2_CODE_UNIT_WIDTH == 32
- mask = 0xffffffff;
-#else
- SLJIT_ASSERT_STOP();
-#endif
+ do
+ {
+ chars[0] = 255;
+
+ consumed++;
+ if (--max_chars == 0)
+ return consumed;
+ chars += MAX_DIFF_CHARS;
+ }
+ while (--repeat > 0);
+
+ repeat = 1;
+ continue;
+ }
+
+ if (class)
+ {
+ bytes = (sljit_ub*) (cc + 1);
+ cc += 1 + 32 / sizeof(PCRE2_UCHAR);
+
+ switch (*cc)
+ {
+ case OP_CRSTAR:
+ case OP_CRMINSTAR:
+ case OP_CRPOSSTAR:
+ case OP_CRQUERY:
+ case OP_CRMINQUERY:
+ case OP_CRPOSQUERY:
+ max_chars = scan_prefix(common, cc + 1, chars, max_chars, rec_count);
+ if (max_chars == 0)
+ return consumed;
+ break;
+
+ default:
+ case OP_CRPLUS:
+ case OP_CRMINPLUS:
+ case OP_CRPOSPLUS:
+ break;
+
+ case OP_CRRANGE:
+ case OP_CRMINRANGE:
+ case OP_CRPOSRANGE:
+ repeat = GET2(cc, 1);
+ if (repeat <= 0)
+ return consumed;
+ break;
+ }
do
{
- chars[0] = mask;
- chars[1] = mask;
- bytes[0] = 255;
+ if (bytes[31] & 0x80)
+ chars[0] = 255;
+ else if (chars[0] != 255)
+ {
+ bytes_end = bytes + 32;
+ chr = 0;
+ do
+ {
+ byte = *bytes++;
+ SLJIT_ASSERT((chr & 0x7) == 0);
+ if (byte == 0)
+ chr += 8;
+ else
+ {
+ do
+ {
+ if ((byte & 0x1) != 0)
+ add_prefix_char(chr, chars);
+ byte >>= 1;
+ chr++;
+ }
+ while (byte != 0);
+ chr = (chr + 7) & ~7;
+ }
+ }
+ while (chars[0] != 255 && bytes < bytes_end);
+ bytes = bytes_end - 32;
+ }
consumed++;
if (--max_chars == 0)
return consumed;
- chars += 2;
- bytes += MAX_N_BYTES;
+ chars += MAX_DIFF_CHARS;
}
while (--repeat > 0);
+ switch (*cc)
+ {
+ case OP_CRSTAR:
+ case OP_CRMINSTAR:
+ case OP_CRPOSSTAR:
+ return consumed;
+
+ case OP_CRQUERY:
+ case OP_CRMINQUERY:
+ case OP_CRPOSQUERY:
+ cc++;
+ break;
+
+ case OP_CRRANGE:
+ case OP_CRMINRANGE:
+ case OP_CRPOSRANGE:
+ if (GET2(cc, 1) != GET2(cc, 1 + IMM2_SIZE))
+ return consumed;
+ cc += 1 + 2 * IMM2_SIZE;
+ break;
+ }
+
repeat = 1;
continue;
}
@@ -3502,43 +3847,16 @@ while (TRUE)
do
{
chr = *cc;
-#if PCRE2_CODE_UNIT_WIDTH == 32
- if (SLJIT_UNLIKELY(chr == NOTACHAR))
- return consumed;
-#endif
- add_prefix_byte((sljit_ub)chr, bytes);
+ add_prefix_char(*cc, chars);
- mask = 0;
if (caseless)
- {
- add_prefix_byte((sljit_ub)*oc, bytes);
- mask = *cc ^ *oc;
- chr |= mask;
- }
-
-#if PCRE2_CODE_UNIT_WIDTH == 32
- if (chars[0] == NOTACHAR && chars[1] == 0)
-#else
- if (chars[0] == NOTACHAR)
-#endif
- {
- chars[0] = chr;
- chars[1] = mask;
- }
- else
- {
- mask |= chars[0] ^ chr;
- chr |= mask;
- chars[0] = chr;
- chars[1] |= mask;
- }
+ add_prefix_char(*oc, chars);
len--;
consumed++;
if (--max_chars == 0)
return consumed;
- chars += 2;
- bytes += MAX_N_BYTES;
+ chars += MAX_DIFF_CHARS;
cc++;
oc++;
}
@@ -3557,65 +3875,504 @@ while (TRUE)
}
}
-static SLJIT_INLINE BOOL fast_forward_first_n_chars(compiler_common *common, BOOL firstline)
+#if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86)
+
+static sljit_si character_to_int32(PCRE2_UCHAR chr)
+{
+sljit_si value = (sljit_si)chr;
+#if PCRE2_CODE_UNIT_WIDTH == 8
+#define SSE2_COMPARE_TYPE_INDEX 0
+return (value << 24) | (value << 16) | (value << 8) | value;
+#elif PCRE2_CODE_UNIT_WIDTH == 16
+#define SSE2_COMPARE_TYPE_INDEX 1
+return (value << 16) | value;
+#elif PCRE2_CODE_UNIT_WIDTH == 32
+#define SSE2_COMPARE_TYPE_INDEX 2
+return value;
+#else
+#error "Unsupported unit width"
+#endif
+}
+
+static SLJIT_INLINE void fast_forward_first_char2_sse2(compiler_common *common, PCRE2_UCHAR char1, PCRE2_UCHAR char2)
+{
+DEFINE_COMPILER;
+struct sljit_label *start;
+struct sljit_jump *quit[3];
+struct sljit_jump *nomatch;
+sljit_ub instruction[8];
+sljit_si tmp1_ind = sljit_get_register_index(TMP1);
+sljit_si tmp2_ind = sljit_get_register_index(TMP2);
+sljit_si str_ptr_ind = sljit_get_register_index(STR_PTR);
+BOOL load_twice = FALSE;
+PCRE2_UCHAR bit;
+
+bit = char1 ^ char2;
+if (!is_powerof2(bit))
+ bit = 0;
+
+if ((char1 != char2) && bit == 0)
+ load_twice = TRUE;
+
+quit[0] = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+
+/* First part (unaligned start) */
+
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, character_to_int32(char1 | bit));
+
+SLJIT_ASSERT(tmp1_ind < 8 && tmp2_ind == 1);
+
+/* MOVD xmm, r/m32 */
+instruction[0] = 0x66;
+instruction[1] = 0x0f;
+instruction[2] = 0x6e;
+instruction[3] = 0xc0 | (2 << 3) | tmp1_ind;
+sljit_emit_op_custom(compiler, instruction, 4);
+
+if (char1 != char2)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, character_to_int32(bit != 0 ? bit : char2));
+
+ /* MOVD xmm, r/m32 */
+ instruction[3] = 0xc0 | (3 << 3) | tmp1_ind;
+ sljit_emit_op_custom(compiler, instruction, 4);
+ }
+
+/* PSHUFD xmm1, xmm2/m128, imm8 */
+instruction[2] = 0x70;
+instruction[3] = 0xc0 | (2 << 3) | 2;
+instruction[4] = 0;
+sljit_emit_op_custom(compiler, instruction, 5);
+
+if (char1 != char2)
+ {
+ /* PSHUFD xmm1, xmm2/m128, imm8 */
+ instruction[3] = 0xc0 | (3 << 3) | 3;
+ instruction[4] = 0;
+ sljit_emit_op_custom(compiler, instruction, 5);
+ }
+
+OP2(SLJIT_AND, TMP2, 0, STR_PTR, 0, SLJIT_IMM, 0xf);
+OP2(SLJIT_AND, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, ~0xf);
+
+/* MOVDQA xmm1, xmm2/m128 */
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+
+if (str_ptr_ind < 8)
+ {
+ instruction[2] = 0x6f;
+ instruction[3] = (0 << 3) | str_ptr_ind;
+ sljit_emit_op_custom(compiler, instruction, 4);
+
+ if (load_twice)
+ {
+ instruction[3] = (1 << 3) | str_ptr_ind;
+ sljit_emit_op_custom(compiler, instruction, 4);
+ }
+ }
+else
+ {
+ instruction[1] = 0x41;
+ instruction[2] = 0x0f;
+ instruction[3] = 0x6f;
+ instruction[4] = (0 << 3) | (str_ptr_ind & 0x7);
+ sljit_emit_op_custom(compiler, instruction, 5);
+
+ if (load_twice)
+ {
+ instruction[4] = (1 << 3) | str_ptr_ind;
+ sljit_emit_op_custom(compiler, instruction, 5);
+ }
+ instruction[1] = 0x0f;
+ }
+
+#else
+
+instruction[2] = 0x6f;
+instruction[3] = (0 << 3) | str_ptr_ind;
+sljit_emit_op_custom(compiler, instruction, 4);
+
+if (load_twice)
+ {
+ instruction[3] = (1 << 3) | str_ptr_ind;
+ sljit_emit_op_custom(compiler, instruction, 4);
+ }
+
+#endif
+
+if (bit != 0)
+ {
+ /* POR xmm1, xmm2/m128 */
+ instruction[2] = 0xeb;
+ instruction[3] = 0xc0 | (0 << 3) | 3;
+ sljit_emit_op_custom(compiler, instruction, 4);
+ }
+
+/* PCMPEQB/W/D xmm1, xmm2/m128 */
+instruction[2] = 0x74 + SSE2_COMPARE_TYPE_INDEX;
+instruction[3] = 0xc0 | (0 << 3) | 2;
+sljit_emit_op_custom(compiler, instruction, 4);
+
+if (load_twice)
+ {
+ instruction[3] = 0xc0 | (1 << 3) | 3;
+ sljit_emit_op_custom(compiler, instruction, 4);
+ }
+
+/* PMOVMSKB reg, xmm */
+instruction[2] = 0xd7;
+instruction[3] = 0xc0 | (tmp1_ind << 3) | 0;
+sljit_emit_op_custom(compiler, instruction, 4);
+
+if (load_twice)
+ {
+ OP1(SLJIT_MOV, TMP3, 0, TMP2, 0);
+ instruction[3] = 0xc0 | (tmp2_ind << 3) | 1;
+ sljit_emit_op_custom(compiler, instruction, 4);
+
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
+ OP1(SLJIT_MOV, TMP2, 0, TMP3, 0);
+ }
+
+OP2(SLJIT_ASHR, TMP1, 0, TMP1, 0, TMP2, 0);
+
+/* BSF r32, r/m32 */
+instruction[0] = 0x0f;
+instruction[1] = 0xbc;
+instruction[2] = 0xc0 | (tmp1_ind << 3) | tmp1_ind;
+sljit_emit_op_custom(compiler, instruction, 3);
+
+nomatch = JUMP(SLJIT_ZERO);
+
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP2, 0);
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
+quit[1] = JUMP(SLJIT_JUMP);
+
+JUMPHERE(nomatch);
+
+start = LABEL();
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, 16);
+quit[2] = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+
+/* Second part (aligned) */
+
+instruction[0] = 0x66;
+instruction[1] = 0x0f;
+
+/* MOVDQA xmm1, xmm2/m128 */
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+
+if (str_ptr_ind < 8)
+ {
+ instruction[2] = 0x6f;
+ instruction[3] = (0 << 3) | str_ptr_ind;
+ sljit_emit_op_custom(compiler, instruction, 4);
+
+ if (load_twice)
+ {
+ instruction[3] = (1 << 3) | str_ptr_ind;
+ sljit_emit_op_custom(compiler, instruction, 4);
+ }
+ }
+else
+ {
+ instruction[1] = 0x41;
+ instruction[2] = 0x0f;
+ instruction[3] = 0x6f;
+ instruction[4] = (0 << 3) | (str_ptr_ind & 0x7);
+ sljit_emit_op_custom(compiler, instruction, 5);
+
+ if (load_twice)
+ {
+ instruction[4] = (1 << 3) | str_ptr_ind;
+ sljit_emit_op_custom(compiler, instruction, 5);
+ }
+ instruction[1] = 0x0f;
+ }
+
+#else
+
+instruction[2] = 0x6f;
+instruction[3] = (0 << 3) | str_ptr_ind;
+sljit_emit_op_custom(compiler, instruction, 4);
+
+if (load_twice)
+ {
+ instruction[3] = (1 << 3) | str_ptr_ind;
+ sljit_emit_op_custom(compiler, instruction, 4);
+ }
+
+#endif
+
+if (bit != 0)
+ {
+ /* POR xmm1, xmm2/m128 */
+ instruction[2] = 0xeb;
+ instruction[3] = 0xc0 | (0 << 3) | 3;
+ sljit_emit_op_custom(compiler, instruction, 4);
+ }
+
+/* PCMPEQB/W/D xmm1, xmm2/m128 */
+instruction[2] = 0x74 + SSE2_COMPARE_TYPE_INDEX;
+instruction[3] = 0xc0 | (0 << 3) | 2;
+sljit_emit_op_custom(compiler, instruction, 4);
+
+if (load_twice)
+ {
+ instruction[3] = 0xc0 | (1 << 3) | 3;
+ sljit_emit_op_custom(compiler, instruction, 4);
+ }
+
+/* PMOVMSKB reg, xmm */
+instruction[2] = 0xd7;
+instruction[3] = 0xc0 | (tmp1_ind << 3) | 0;
+sljit_emit_op_custom(compiler, instruction, 4);
+
+if (load_twice)
+ {
+ instruction[3] = 0xc0 | (tmp2_ind << 3) | 1;
+ sljit_emit_op_custom(compiler, instruction, 4);
+
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
+ }
+
+/* BSF r32, r/m32 */
+instruction[0] = 0x0f;
+instruction[1] = 0xbc;
+instruction[2] = 0xc0 | (tmp1_ind << 3) | tmp1_ind;
+sljit_emit_op_custom(compiler, instruction, 3);
+
+JUMPTO(SLJIT_ZERO, start);
+
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
+
+start = LABEL();
+SET_LABEL(quit[0], start);
+SET_LABEL(quit[1], start);
+SET_LABEL(quit[2], start);
+}
+
+#undef SSE2_COMPARE_TYPE_INDEX
+
+#endif
+
+static void fast_forward_first_char2(compiler_common *common, PCRE2_UCHAR char1, PCRE2_UCHAR char2, sljit_si offset)
{
DEFINE_COMPILER;
struct sljit_label *start;
struct sljit_jump *quit;
-sljit_ui chars[MAX_N_CHARS * 2];
-sljit_ub bytes[MAX_N_CHARS * MAX_N_BYTES];
-sljit_ub ones[MAX_N_CHARS];
-int offsets[3];
-sljit_ui mask;
-sljit_ub *byte_set, *byte_set_end;
-int i, max, from;
-int range_right = -1, range_len = 3 - 1;
-sljit_ub *update_table = NULL;
-BOOL in_range;
+struct sljit_jump *found;
+PCRE2_UCHAR mask;
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+struct sljit_label *utf_start = NULL;
+struct sljit_jump *utf_quit = NULL;
+#endif
+BOOL has_match_end = (common->match_end_ptr != 0);
-for (i = 0; i < MAX_N_CHARS; i++)
+if (offset > 0)
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(offset));
+
+if (has_match_end)
{
- chars[i << 1] = NOTACHAR;
- chars[(i << 1) + 1] = 0;
- bytes[i * MAX_N_BYTES] = 0;
+ OP1(SLJIT_MOV, TMP3, 0, STR_END, 0);
+
+ OP2(SLJIT_ADD, STR_END, 0, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr, SLJIT_IMM, IN_UCHARS(offset + 1));
+#if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86)
+ if (sljit_x86_is_cmov_available())
+ {
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, STR_END, 0, TMP3, 0);
+ sljit_x86_emit_cmov(compiler, SLJIT_GREATER, STR_END, TMP3, 0);
+ }
+#endif
+ {
+ quit = CMP(SLJIT_LESS_EQUAL, STR_END, 0, TMP3, 0);
+ OP1(SLJIT_MOV, STR_END, 0, TMP3, 0);
+ JUMPHERE(quit);
+ }
}
-max = scan_prefix(common, common->start, chars, bytes, MAX_N_CHARS);
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+if (common->utf && offset > 0)
+ utf_start = LABEL();
+#endif
-if (max <= 1)
- return FALSE;
+#if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86)
-for (i = 0; i < max; i++)
+/* SSE2 accelerated first character search. */
+
+if (sljit_x86_is_sse2_available())
{
- mask = chars[(i << 1) + 1];
- ones[i] = ones_in_half_byte[mask & 0xf];
- mask >>= 4;
- while (mask != 0)
+ fast_forward_first_char2_sse2(common, char1, char2);
+
+ SLJIT_ASSERT(common->mode == PCRE2_JIT_COMPLETE || offset == 0);
+ if (common->mode == PCRE2_JIT_COMPLETE)
{
- ones[i] += ones_in_half_byte[mask & 0xf];
- mask >>= 4;
+ /* In complete mode, we don't need to run a match when STR_PTR == STR_END. */
+ SLJIT_ASSERT(common->forced_quit_label == NULL);
+ OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, PCRE2_ERROR_NOMATCH);
+ add_jump(compiler, &common->forced_quit, CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0));
+
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+ if (common->utf && offset > 0)
+ {
+ SLJIT_ASSERT(common->mode == PCRE2_JIT_COMPLETE);
+
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-offset));
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xc0);
+ CMPTO(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, 0x80, utf_start);
+#elif PCRE2_CODE_UNIT_WIDTH == 16
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xfc00);
+ CMPTO(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, 0xdc00, utf_start);
+#else
+#error "Unknown code width"
+#endif
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ }
+#endif
+
+ if (offset > 0)
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(offset));
+ }
+ else if (sljit_x86_is_cmov_available())
+ {
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, STR_PTR, 0, STR_END, 0);
+ sljit_x86_emit_cmov(compiler, SLJIT_GREATER_EQUAL, STR_PTR, has_match_end ? SLJIT_MEM1(SLJIT_SP) : STR_END, has_match_end ? common->match_end_ptr : 0);
}
+ else
+ {
+ quit = CMP(SLJIT_LESS, STR_PTR, 0, STR_END, 0);
+ OP1(SLJIT_MOV, STR_PTR, 0, has_match_end ? SLJIT_MEM1(SLJIT_SP) : STR_END, has_match_end ? common->match_end_ptr : 0);
+ JUMPHERE(quit);
+ }
+
+ if (has_match_end)
+ OP1(SLJIT_MOV, STR_END, 0, TMP3, 0);
+ return;
}
+#endif
+
+quit = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+
+start = LABEL();
+OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
+
+if (char1 == char2)
+ found = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, char1);
+else
+ {
+ mask = char1 ^ char2;
+ if (is_powerof2(mask))
+ {
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, mask);
+ found = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, char1 | mask);
+ }
+ else
+ {
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, char1);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_EQUAL);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, char2);
+ OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_EQUAL);
+ found = JUMP(SLJIT_NOT_ZERO);
+ }
+ }
+
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+CMPTO(SLJIT_LESS, STR_PTR, 0, STR_END, 0, start);
+
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+if (common->utf && offset > 0)
+ utf_quit = JUMP(SLJIT_JUMP);
+#endif
+
+JUMPHERE(found);
+
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+if (common->utf && offset > 0)
+ {
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-offset));
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xc0);
+ CMPTO(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, 0x80, utf_start);
+#elif PCRE2_CODE_UNIT_WIDTH == 16
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xfc00);
+ CMPTO(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, 0xdc00, utf_start);
+#else
+#error "Unknown code width"
+#endif
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ JUMPHERE(utf_quit);
+ }
+#endif
+
+JUMPHERE(quit);
+
+if (has_match_end)
+ {
+ quit = CMP(SLJIT_LESS, STR_PTR, 0, STR_END, 0);
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr);
+ if (offset > 0)
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(offset));
+ JUMPHERE(quit);
+ OP1(SLJIT_MOV, STR_END, 0, TMP3, 0);
+ }
+
+if (offset > 0)
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(offset));
+}
+
+static SLJIT_INLINE BOOL fast_forward_first_n_chars(compiler_common *common)
+{
+DEFINE_COMPILER;
+struct sljit_label *start;
+struct sljit_jump *quit;
+struct sljit_jump *match;
+/* bytes[0] represent the number of characters between 0
+and MAX_N_BYTES - 1, 255 represents any character. */
+PCRE2_UCHAR chars[MAX_N_CHARS * MAX_DIFF_CHARS];
+sljit_si offset;
+PCRE2_UCHAR mask;
+PCRE2_UCHAR *char_set, *char_set_end;
+int i, max, from;
+int range_right = -1, range_len;
+sljit_ub *update_table = NULL;
+BOOL in_range;
+uint32_t rec_count;
+
+for (i = 0; i < MAX_N_CHARS; i++)
+ chars[i * MAX_DIFF_CHARS] = 0;
+
+rec_count = 10000;
+max = scan_prefix(common, common->start, chars, MAX_N_CHARS, &rec_count);
+
+if (max < 1)
+ return FALSE;
+
in_range = FALSE;
-from = 0; /* Prevent compiler "uninitialized" warning */
+/* Prevent compiler "uninitialized" warning */
+from = 0;
+range_len = 4 /* minimum length */ - 1;
for (i = 0; i <= max; i++)
{
- if (in_range && (i - from) > range_len && (bytes[(i - 1) * MAX_N_BYTES] <= 4))
+ if (in_range && (i - from) > range_len && (chars[(i - 1) * MAX_DIFF_CHARS] < 255))
{
range_len = i - from;
range_right = i - 1;
}
- if (i < max && bytes[i * MAX_N_BYTES] < 255)
+ if (i < max && chars[i * MAX_DIFF_CHARS] < 255)
{
+ SLJIT_ASSERT(chars[i * MAX_DIFF_CHARS] > 0);
if (!in_range)
{
in_range = TRUE;
from = i;
}
}
- else if (in_range)
+ else
in_range = FALSE;
}
@@ -3628,90 +4385,66 @@ if (range_right >= 0)
for (i = 0; i < range_len; i++)
{
- byte_set = bytes + ((range_right - i) * MAX_N_BYTES);
- SLJIT_ASSERT(byte_set[0] > 0 && byte_set[0] < 255);
- byte_set_end = byte_set + byte_set[0];
- byte_set++;
- while (byte_set <= byte_set_end)
+ char_set = chars + ((range_right - i) * MAX_DIFF_CHARS);
+ SLJIT_ASSERT(char_set[0] > 0 && char_set[0] < 255);
+ char_set_end = char_set + char_set[0];
+ char_set++;
+ while (char_set <= char_set_end)
{
- if (update_table[*byte_set] > IN_UCHARS(i))
- update_table[*byte_set] = IN_UCHARS(i);
- byte_set++;
+ if (update_table[(*char_set) & 0xff] > IN_UCHARS(i))
+ update_table[(*char_set) & 0xff] = IN_UCHARS(i);
+ char_set++;
}
}
}
-offsets[0] = -1;
-offsets[1] = -1;
-offsets[2] = -1;
+offset = -1;
/* Scan forward. */
for (i = 0; i < max; i++)
- if (ones[i] <= 2) {
- offsets[0] = i;
- break;
- }
-
-if (offsets[0] < 0 && range_right < 0)
- return FALSE;
-
-if (offsets[0] >= 0)
{
- /* Scan backward. */
- for (i = max - 1; i > offsets[0]; i--)
- if (ones[i] <= 2 && i != range_right)
- {
- offsets[1] = i;
- break;
- }
-
- /* This case is handled better by fast_forward_first_char. */
- if (offsets[1] == -1 && offsets[0] == 0 && range_right < 0)
- return FALSE;
-
- /* We only search for a middle character if there is no range check. */
- if (offsets[1] >= 0 && range_right == -1)
+ if (offset == -1)
+ {
+ if (chars[i * MAX_DIFF_CHARS] <= 2)
+ offset = i;
+ }
+ else if (chars[offset * MAX_DIFF_CHARS] == 2 && chars[i * MAX_DIFF_CHARS] <= 2)
{
- /* Scan from middle. */
- for (i = (offsets[0] + offsets[1]) / 2 + 1; i < offsets[1]; i++)
- if (ones[i] <= 2)
+ if (chars[i * MAX_DIFF_CHARS] == 1)
+ offset = i;
+ else
+ {
+ mask = chars[offset * MAX_DIFF_CHARS + 1] ^ chars[offset * MAX_DIFF_CHARS + 2];
+ if (!is_powerof2(mask))
{
- offsets[2] = i;
- break;
+ mask = chars[i * MAX_DIFF_CHARS + 1] ^ chars[i * MAX_DIFF_CHARS + 2];
+ if (is_powerof2(mask))
+ offset = i;
}
-
- if (offsets[2] == -1)
- {
- for (i = (offsets[0] + offsets[1]) / 2; i > offsets[0]; i--)
- if (ones[i] <= 2)
- {
- offsets[2] = i;
- break;
- }
}
}
+ }
- SLJIT_ASSERT(offsets[1] == -1 || (offsets[0] < offsets[1]));
- SLJIT_ASSERT(offsets[2] == -1 || (offsets[0] < offsets[2] && offsets[1] > offsets[2]));
-
- chars[0] = chars[offsets[0] << 1];
- chars[1] = chars[(offsets[0] << 1) + 1];
- if (offsets[2] >= 0)
- {
- chars[2] = chars[offsets[2] << 1];
- chars[3] = chars[(offsets[2] << 1) + 1];
- }
- if (offsets[1] >= 0)
- {
- chars[4] = chars[offsets[1] << 1];
- chars[5] = chars[(offsets[1] << 1) + 1];
- }
+if (range_right < 0)
+ {
+ if (offset < 0)
+ return FALSE;
+ SLJIT_ASSERT(chars[offset * MAX_DIFF_CHARS] >= 1 && chars[offset * MAX_DIFF_CHARS] <= 2);
+ /* Works regardless the value is 1 or 2. */
+ mask = chars[offset * MAX_DIFF_CHARS + chars[offset * MAX_DIFF_CHARS]];
+ fast_forward_first_char2(common, chars[offset * MAX_DIFF_CHARS + 1], mask, offset);
+ return TRUE;
}
+if (range_right == offset)
+ offset = -1;
+
+SLJIT_ASSERT(offset == -1 || (chars[offset * MAX_DIFF_CHARS] >= 1 && chars[offset * MAX_DIFF_CHARS] <= 2));
+
max -= 1;
-if (firstline)
+SLJIT_ASSERT(max > 0);
+if (common->match_end_ptr != 0)
{
- SLJIT_ASSERT(common->first_line_end != 0);
- OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->first_line_end);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr);
OP1(SLJIT_MOV, TMP3, 0, STR_END, 0);
OP2(SLJIT_SUB, STR_END, 0, STR_END, 0, SLJIT_IMM, IN_UCHARS(max));
quit = CMP(SLJIT_LESS_EQUAL, STR_END, 0, TMP1, 0);
@@ -3721,68 +4454,86 @@ if (firstline)
else
OP2(SLJIT_SUB, STR_END, 0, STR_END, 0, SLJIT_IMM, IN_UCHARS(max));
+SLJIT_ASSERT(range_right >= 0);
+
#if !(defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
-if (range_right >= 0)
- OP1(SLJIT_MOV, RETURN_ADDR, 0, SLJIT_IMM, (sljit_sw)update_table);
+OP1(SLJIT_MOV, RETURN_ADDR, 0, SLJIT_IMM, (sljit_sw)update_table);
#endif
start = LABEL();
quit = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
-SLJIT_ASSERT(range_right >= 0 || offsets[0] >= 0);
-
-if (range_right >= 0)
- {
#if PCRE2_CODE_UNIT_WIDTH == 8 || (defined SLJIT_LITTLE_ENDIAN && SLJIT_LITTLE_ENDIAN)
- OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(range_right));
+OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(range_right));
#else
- OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(range_right + 1) - 1);
+OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(range_right + 1) - 1);
#endif
#if !(defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
- OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM2(RETURN_ADDR, TMP1), 0);
+OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM2(RETURN_ADDR, TMP1), 0);
#else
- OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)update_table);
+OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)update_table);
#endif
- OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
- CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, 0, start);
- }
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
+CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, 0, start);
-if (offsets[0] >= 0)
+if (offset >= 0)
{
- OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(offsets[0]));
- if (offsets[1] >= 0)
- OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(offsets[1]));
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(offset));
OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
- if (chars[1] != 0)
- OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, chars[1]);
- CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, chars[0], start);
- if (offsets[2] >= 0)
- OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(offsets[2] - 1));
-
- if (offsets[1] >= 0)
+ if (chars[offset * MAX_DIFF_CHARS] == 1)
+ CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, chars[offset * MAX_DIFF_CHARS + 1], start);
+ else
{
- if (chars[5] != 0)
- OP2(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_IMM, chars[5]);
- CMPTO(SLJIT_NOT_EQUAL, TMP2, 0, SLJIT_IMM, chars[4], start);
+ mask = chars[offset * MAX_DIFF_CHARS + 1] ^ chars[offset * MAX_DIFF_CHARS + 2];
+ if (is_powerof2(mask))
+ {
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, mask);
+ CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, chars[offset * MAX_DIFF_CHARS + 1] | mask, start);
+ }
+ else
+ {
+ match = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, chars[offset * MAX_DIFF_CHARS + 1]);
+ CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, chars[offset * MAX_DIFF_CHARS + 2], start);
+ JUMPHERE(match);
+ }
}
+ }
- if (offsets[2] >= 0)
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+if (common->utf && offset != 0)
+ {
+ if (offset < 0)
{
- if (chars[3] != 0)
- OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, chars[3]);
- CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, chars[2], start);
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
}
- OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ else
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-1));
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xc0);
+ CMPTO(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, 0x80, start);
+#elif PCRE2_CODE_UNIT_WIDTH == 16
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xfc00);
+ CMPTO(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, 0xdc00, start);
+#else
+#error "Unknown code width"
+#endif
+ if (offset < 0)
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
}
+#endif
+
+if (offset >= 0)
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
JUMPHERE(quit);
-if (firstline)
+if (common->match_end_ptr != 0)
{
if (range_right >= 0)
- OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->first_line_end);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr);
OP1(SLJIT_MOV, STR_END, 0, TMP3, 0);
if (range_right >= 0)
{
@@ -3799,24 +4550,9 @@ return TRUE;
#undef MAX_N_CHARS
#undef MAX_N_BYTES
-static SLJIT_INLINE void fast_forward_first_char(compiler_common *common, PCRE2_UCHAR first_char, BOOL caseless, BOOL firstline)
+static SLJIT_INLINE void fast_forward_first_char(compiler_common *common, PCRE2_UCHAR first_char, BOOL caseless)
{
-DEFINE_COMPILER;
-struct sljit_label *start;
-struct sljit_jump *quit;
-struct sljit_jump *found;
-PCRE2_UCHAR oc, bit;
-
-if (firstline)
- {
- SLJIT_ASSERT(common->first_line_end != 0);
- OP1(SLJIT_MOV, TMP3, 0, STR_END, 0);
- OP1(SLJIT_MOV, STR_END, 0, SLJIT_MEM1(SLJIT_SP), common->first_line_end);
- }
-
-start = LABEL();
-quit = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
-OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
+PCRE2_UCHAR oc;
oc = first_char;
if (caseless)
@@ -3827,36 +4563,11 @@ if (caseless)
oc = UCD_OTHERCASE(first_char);
#endif
}
-if (first_char == oc)
- found = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, first_char);
-else
- {
- bit = first_char ^ oc;
- if (is_powerof2(bit))
- {
- OP2(SLJIT_OR, TMP2, 0, TMP1, 0, SLJIT_IMM, bit);
- found = CMP(SLJIT_EQUAL, TMP2, 0, SLJIT_IMM, first_char | bit);
- }
- else
- {
- OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, first_char);
- OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_EQUAL);
- OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, oc);
- OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_EQUAL);
- found = JUMP(SLJIT_NOT_ZERO);
- }
- }
-OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
-JUMPTO(SLJIT_JUMP, start);
-JUMPHERE(found);
-JUMPHERE(quit);
-
-if (firstline)
- OP1(SLJIT_MOV, STR_END, 0, TMP3, 0);
+fast_forward_first_char2(common, first_char, oc, 0);
}
-static SLJIT_INLINE void fast_forward_newline(compiler_common *common, BOOL firstline)
+static SLJIT_INLINE void fast_forward_newline(compiler_common *common)
{
DEFINE_COMPILER;
struct sljit_label *loop;
@@ -3867,11 +4578,10 @@ struct sljit_jump *foundcr = NULL;
struct sljit_jump *notfoundnl;
jump_list *newline = NULL;
-if (firstline)
+if (common->match_end_ptr != 0)
{
- SLJIT_ASSERT(common->first_line_end != 0);
OP1(SLJIT_MOV, TMP3, 0, STR_END, 0);
- OP1(SLJIT_MOV, STR_END, 0, SLJIT_MEM1(SLJIT_SP), common->first_line_end);
+ OP1(SLJIT_MOV, STR_END, 0, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr);
}
if (common->nltype == NLTYPE_FIXED && common->newline > 255)
@@ -3902,7 +4612,7 @@ if (common->nltype == NLTYPE_FIXED && common->newline > 255)
JUMPHERE(firstchar);
JUMPHERE(lastchar);
- if (firstline)
+ if (common->match_end_ptr != 0)
OP1(SLJIT_MOV, STR_END, 0, TMP3, 0);
return;
}
@@ -3940,13 +4650,13 @@ if (common->nltype == NLTYPE_ANY || common->nltype == NLTYPE_ANYCRLF)
JUMPHERE(lastchar);
JUMPHERE(firstchar);
-if (firstline)
+if (common->match_end_ptr != 0)
OP1(SLJIT_MOV, STR_END, 0, TMP3, 0);
}
static BOOL check_class_ranges(compiler_common *common, const sljit_ub *bits, BOOL nclass, BOOL invert, jump_list **backtracks);
-static SLJIT_INLINE void fast_forward_start_bits(compiler_common *common, const sljit_ub *start_bits, BOOL firstline)
+static SLJIT_INLINE void fast_forward_start_bits(compiler_common *common, const sljit_ub *start_bits)
{
DEFINE_COMPILER;
struct sljit_label *start;
@@ -3957,11 +4667,10 @@ jump_list *matches = NULL;
struct sljit_jump *jump;
#endif
-if (firstline)
+if (common->match_end_ptr != 0)
{
- SLJIT_ASSERT(common->first_line_end != 0);
OP1(SLJIT_MOV, RETURN_ADDR, 0, STR_END, 0);
- OP1(SLJIT_MOV, STR_END, 0, SLJIT_MEM1(SLJIT_SP), common->first_line_end);
+ OP1(SLJIT_MOV, STR_END, 0, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr);
}
start = LABEL();
@@ -4019,7 +4728,7 @@ if (matches != NULL)
set_jumps(matches, LABEL());
JUMPHERE(quit);
-if (firstline)
+if (common->match_end_ptr != 0)
OP1(SLJIT_MOV, STR_END, 0, RETURN_ADDR, 0);
}
@@ -4328,8 +5037,10 @@ switch(length)
case 4:
if ((ranges[1] - ranges[0]) == (ranges[3] - ranges[2])
&& (ranges[0] | (ranges[2] - ranges[0])) == ranges[2]
+ && (ranges[1] & (ranges[2] - ranges[0])) == 0
&& is_powerof2(ranges[2] - ranges[0]))
{
+ SLJIT_ASSERT((ranges[0] & (ranges[2] - ranges[0])) == 0 && (ranges[2] & ranges[3] & (ranges[2] - ranges[0])) != 0);
OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, ranges[2] - ranges[0]);
if (ranges[2] + 1 != ranges[3])
{
@@ -4788,6 +5499,7 @@ sljit_uw typeoffset;
cc++;
ccbegin = cc;
compares = 0;
+
if (cc[-1] & XCL_MAP)
{
min = 0;
@@ -4845,9 +5557,8 @@ while (*cc != XCL_END)
/* Any either accepts everything or ignored. */
if (cc[-1] == XCL_PROP)
{
- if (list != backtracks)
- compile_char1_matchingpath(common, OP_ALLANY, cc, backtracks, FALSE);
- else
+ compile_char1_matchingpath(common, OP_ALLANY, cc, backtracks, FALSE);
+ if (list == backtracks)
add_jump(compiler, backtracks, JUMP(SLJIT_JUMP));
return;
}
@@ -4928,9 +5639,10 @@ else if ((cc[-1] & XCL_MAP) != 0)
if (!check_class_ranges(common, (const sljit_ub *)cc, FALSE, TRUE, list))
{
#if PCRE2_CODE_UNIT_WIDTH == 8
- SLJIT_ASSERT(common->utf);
+ jump = NULL;
+ if (common->utf)
#endif
- jump = CMP(SLJIT_GREATER, TMP1, 0, SLJIT_IMM, 255);
+ jump = CMP(SLJIT_GREATER, TMP1, 0, SLJIT_IMM, 255);
OP2(SLJIT_AND, TMP2, 0, TMP1, 0, SLJIT_IMM, 0x7);
OP2(SLJIT_LSHR, TMP1, 0, TMP1, 0, SLJIT_IMM, 3);
@@ -4939,7 +5651,10 @@ else if ((cc[-1] & XCL_MAP) != 0)
OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, TMP2, 0);
add_jump(compiler, list, JUMP(SLJIT_NOT_ZERO));
- JUMPHERE(jump);
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ if (common->utf)
+#endif
+ JUMPHERE(jump);
}
OP1(SLJIT_MOV, TMP1, 0, RETURN_ADDR, 0);
@@ -5280,7 +5995,7 @@ while (*cc != XCL_END)
OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_LESS_EQUAL);
SET_CHAR_OFFSET(0);
- OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xff);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x7f);
OP_FLAGS(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_LESS_EQUAL);
SET_TYPE_OFFSET(ucp_Pc);
@@ -7835,6 +8550,10 @@ while (*cc != OP_KETRPOS)
OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
}
+ /* Even if the match is empty, we need to reset the control head. */
+ if (needs_control_head)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr, SLJIT_MEM1(STACK_TOP), STACK(stack));
+
if (opcode == OP_SBRAPOS || opcode == OP_SCBRAPOS)
add_jump(compiler, &emptymatch, CMP(SLJIT_EQUAL, TMP1, 0, STR_PTR, 0));
@@ -7862,6 +8581,10 @@ while (*cc != OP_KETRPOS)
OP1(SLJIT_MOV, SLJIT_MEM1(TMP2), (framesize + 1) * sizeof(sljit_sw), STR_PTR, 0);
}
+ /* Even if the match is empty, we need to reset the control head. */
+ if (needs_control_head)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr, SLJIT_MEM1(STACK_TOP), STACK(stack));
+
if (opcode == OP_SBRAPOS || opcode == OP_SCBRAPOS)
add_jump(compiler, &emptymatch, CMP(SLJIT_EQUAL, TMP1, 0, STR_PTR, 0));
@@ -7874,9 +8597,6 @@ while (*cc != OP_KETRPOS)
}
}
- if (needs_control_head)
- OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr, SLJIT_MEM1(STACK_TOP), STACK(stack));
-
JUMPTO(SLJIT_JUMP, loop);
flush_stubs(common);
@@ -8082,6 +8802,8 @@ backtrack_common *backtrack;
PCRE2_UCHAR opcode;
PCRE2_UCHAR type;
sljit_ui max = 0, exact;
+BOOL fast_fail;
+sljit_si fast_str_ptr;
BOOL charpos_enabled;
PCRE2_UCHAR charpos_char;
unsigned int charpos_othercasebit;
@@ -8098,6 +8820,19 @@ int tmp_base, tmp_offset;
PUSH_BACKTRACK(sizeof(char_iterator_backtrack), cc, NULL);
+fast_str_ptr = PRIVATE_DATA(cc + 1);
+fast_fail = TRUE;
+
+SLJIT_ASSERT(common->fast_forward_bc_ptr == NULL || fast_str_ptr == 0 || cc == common->fast_forward_bc_ptr);
+
+if (cc == common->fast_forward_bc_ptr)
+ fast_fail = FALSE;
+else if (common->fast_fail_start_ptr == 0)
+ fast_str_ptr = 0;
+
+SLJIT_ASSERT(common->fast_forward_bc_ptr != NULL || fast_str_ptr == 0
+ || (fast_str_ptr >= common->fast_fail_start_ptr && fast_str_ptr <= common->fast_fail_end_ptr));
+
cc = get_iterator_parameters(common, cc, &opcode, &type, &max, &exact, &end);
if (type != OP_EXTUNI)
@@ -8111,9 +8846,13 @@ else
tmp_offset = POSSESSIVE0;
}
+if (fast_fail && fast_str_ptr != 0)
+ add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_LESS_EQUAL, STR_PTR, 0, SLJIT_MEM1(SLJIT_SP), fast_str_ptr));
+
/* Handle fixed part first. */
if (exact > 1)
{
+ SLJIT_ASSERT(fast_str_ptr == 0);
if (common->mode == PCRE2_JIT_COMPLETE
#ifdef SUPPORT_UNICODE
&& !common->utf
@@ -8144,9 +8883,12 @@ switch(opcode)
{
case OP_STAR:
case OP_UPTO:
+ SLJIT_ASSERT(fast_str_ptr == 0 || opcode == OP_STAR);
+
if (type == OP_ANYNL || type == OP_EXTUNI)
{
SLJIT_ASSERT(private_data_ptr == 0);
+ SLJIT_ASSERT(fast_str_ptr == 0);
allocate_stack(common, 2);
OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
@@ -8228,6 +8970,8 @@ switch(opcode)
add_jump(compiler, &backtrack->topbacktracks, JUMP(SLJIT_ZERO));
}
compile_char1_matchingpath(common, type, cc, &backtrack->topbacktracks, FALSE);
+ if (fast_str_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, STR_PTR, 0);
JUMPHERE(jump);
detect_partial_match(common, &backtrack->topbacktracks);
@@ -8249,6 +8993,8 @@ switch(opcode)
/* Search the last instance of charpos_char. */
label = LABEL();
compile_char1_matchingpath(common, type, cc, &no_match, FALSE);
+ if (fast_str_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, STR_PTR, 0);
detect_partial_match(common, &no_match);
OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
if (charpos_othercasebit != 0)
@@ -8304,6 +9050,8 @@ switch(opcode)
set_jumps(no_match, LABEL());
OP1(SLJIT_MOV, STR_PTR, 0, base, offset0);
+ if (fast_str_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, STR_PTR, 0);
}
#endif
else
@@ -8331,6 +9079,8 @@ switch(opcode)
OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
set_jumps(no_match, LABEL());
OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
+ if (fast_str_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, STR_PTR, 0);
}
}
BACKTRACK_AS(char_iterator_backtrack)->matchingpath = LABEL();
@@ -8341,9 +9091,12 @@ switch(opcode)
allocate_stack(common, 1);
OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
BACKTRACK_AS(char_iterator_backtrack)->matchingpath = LABEL();
+ if (fast_str_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, STR_PTR, 0);
break;
case OP_MINUPTO:
+ SLJIT_ASSERT(fast_str_ptr == 0);
if (private_data_ptr == 0)
allocate_stack(common, 2);
OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
@@ -8353,6 +9106,7 @@ switch(opcode)
case OP_QUERY:
case OP_MINQUERY:
+ SLJIT_ASSERT(fast_str_ptr == 0);
if (private_data_ptr == 0)
allocate_stack(common, 1);
OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
@@ -8375,6 +9129,8 @@ switch(opcode)
JUMPTO(SLJIT_JUMP, label);
set_jumps(no_match, LABEL());
OP1(SLJIT_MOV, STR_PTR, 0, tmp_base, tmp_offset);
+ if (fast_str_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, STR_PTR, 0);
break;
}
#endif
@@ -8385,9 +9141,12 @@ switch(opcode)
set_jumps(no_char1_match, LABEL());
OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
set_jumps(no_match, LABEL());
+ if (fast_str_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, STR_PTR, 0);
break;
case OP_POSUPTO:
+ SLJIT_ASSERT(fast_str_ptr == 0);
#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
if (common->utf)
{
@@ -8416,6 +9175,7 @@ switch(opcode)
break;
case OP_POSQUERY:
+ SLJIT_ASSERT(fast_str_ptr == 0);
OP1(SLJIT_MOV, tmp_base, tmp_offset, STR_PTR, 0);
compile_char1_matchingpath(common, type, cc, &no_match, TRUE);
OP1(SLJIT_MOV, tmp_base, tmp_offset, STR_PTR, 0);
@@ -8774,8 +9534,7 @@ while (cc < ccend)
OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), STR_PTR, 0);
}
BACKTRACK_AS(braminzero_backtrack)->matchingpath = LABEL();
- if (cc[1] > OP_ASSERTBACK_NOT)
- count_match(common);
+ count_match(common);
break;
case OP_ONCE:
@@ -9944,7 +10703,7 @@ static SLJIT_INLINE void compile_recurse(compiler_common *common)
DEFINE_COMPILER;
PCRE2_SPTR cc = common->start + common->currententry->start;
PCRE2_SPTR ccbegin = cc + 1 + LINK_SIZE + (*cc == OP_BRA ? 0 : IMM2_SIZE);
-PCRE2_SPTR ccend = bracketend(cc);
+PCRE2_SPTR ccend = bracketend(cc) - (1 + LINK_SIZE);
BOOL needs_control_head;
int framesize = get_framesize(common, cc, NULL, TRUE, &needs_control_head);
int private_data_size = get_private_data_copy_length(common, ccbegin, ccend, needs_control_head);
@@ -9967,6 +10726,7 @@ common->currententry->entry = LABEL();
set_jumps(common->currententry->calls, common->currententry->entry);
sljit_emit_fast_enter(compiler, TMP2, 0);
+count_match(common);
allocate_stack(common, private_data_size + framesize + alternativesize);
OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(private_data_size + framesize + alternativesize - 1), TMP2, 0);
copy_private_data(common, ccbegin, ccend, TRUE, private_data_size + framesize + alternativesize, framesize + alternativesize, needs_control_head);
@@ -10206,9 +10966,9 @@ if (mode != PCRE2_JIT_COMPLETE)
common->ovector_start += sizeof(sljit_sw);
}
}
-if ((re->overall_options & PCRE2_FIRSTLINE) != 0)
+if ((re->overall_options & (PCRE2_FIRSTLINE | PCRE2_USE_OFFSET_LIMIT)) != 0)
{
- common->first_line_end = common->ovector_start;
+ common->match_end_ptr = common->ovector_start;
common->ovector_start += sizeof(sljit_sw);
}
#if defined DEBUG_FORCE_CONTROL_HEAD && DEBUG_FORCE_CONTROL_HEAD
@@ -10251,6 +11011,14 @@ memset(common->private_data_ptrs, 0, total_length * sizeof(sljit_si));
private_data_size = common->cbra_ptr + (re->top_bracket + 1) * sizeof(sljit_sw);
set_private_data_ptrs(common, &private_data_size, ccend);
+if ((re->overall_options & PCRE2_ANCHORED) == 0 && (re->overall_options & PCRE2_NO_START_OPTIMIZE) == 0)
+ {
+ if (!detect_fast_forward_skip(common, &private_data_size) && !common->has_skip_in_assert_back)
+ detect_fast_fail(common, common->start, &private_data_size, 4);
+ }
+
+SLJIT_ASSERT(common->fast_fail_start_ptr <= common->fast_fail_end_ptr);
+
if (private_data_size > SLJIT_MAX_LOCAL_SIZE)
{
SLJIT_FREE(common->private_data_ptrs, allocator_data);
@@ -10290,8 +11058,12 @@ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, stack));
OP1(SLJIT_MOV_UI, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, limit_match));
OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(struct sljit_stack, base));
OP1(SLJIT_MOV, STACK_LIMIT, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(struct sljit_stack, limit));
+OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LIMIT_MATCH, TMP1, 0);
+if (common->fast_fail_start_ptr < common->fast_fail_end_ptr)
+ reset_fast_fail(common);
+
if (mode == PCRE2_JIT_PARTIAL_SOFT)
OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->hit_start, SLJIT_IMM, -1);
if (common->mark_ptr != 0)
@@ -10302,19 +11074,19 @@ if (common->control_head_ptr != 0)
/* Main part of the matching */
if ((re->overall_options & PCRE2_ANCHORED) == 0)
{
- mainloop_label = mainloop_entry(common, (re->flags & PCRE2_HASCRORLF) != 0, (re->overall_options & PCRE2_FIRSTLINE) != 0);
+ mainloop_label = mainloop_entry(common, (re->flags & PCRE2_HASCRORLF) != 0, re->overall_options);
continue_match_label = LABEL();
/* Forward search if possible. */
if ((re->overall_options & PCRE2_NO_START_OPTIMIZE) == 0)
{
- if (mode == PCRE2_JIT_COMPLETE && fast_forward_first_n_chars(common, (re->overall_options & PCRE2_FIRSTLINE) != 0))
+ if (mode == PCRE2_JIT_COMPLETE && fast_forward_first_n_chars(common))
;
else if ((re->flags & PCRE2_FIRSTSET) != 0)
- fast_forward_first_char(common, (PCRE2_UCHAR)(re->first_codeunit), (re->flags & PCRE2_FIRSTCASELESS) != 0, (re->overall_options & PCRE2_FIRSTLINE) != 0);
+ fast_forward_first_char(common, (PCRE2_UCHAR)(re->first_codeunit), (re->flags & PCRE2_FIRSTCASELESS) != 0);
else if ((re->flags & PCRE2_STARTLINE) != 0)
- fast_forward_newline(common, (re->overall_options & PCRE2_FIRSTLINE) != 0);
+ fast_forward_newline(common);
else if ((re->flags & PCRE2_FIRSTMAPSET) != 0)
- fast_forward_start_bits(common, re->start_bitmap, (re->overall_options & PCRE2_FIRSTLINE) != 0);
+ fast_forward_start_bits(common, re->start_bitmap);
}
}
else
@@ -10335,6 +11107,8 @@ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(0), STR_PTR, 0);
OP1(SLJIT_MOV, COUNT_MATCH, 0, SLJIT_MEM1(SLJIT_SP), LIMIT_MATCH);
if (common->capture_last_ptr != 0)
OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->capture_last_ptr, SLJIT_IMM, 0);
+if (common->fast_forward_bc_ptr != NULL)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), PRIVATE_DATA(common->fast_forward_bc_ptr + 1), STR_PTR, 0);
if (common->start_ptr != OVECTOR(0))
OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->start_ptr, STR_PTR, 0);
@@ -10413,28 +11187,37 @@ if (mode == PCRE2_JIT_PARTIAL_SOFT)
}
/* Check we have remaining characters. */
-if ((re->overall_options & PCRE2_ANCHORED) == 0 && (re->overall_options & PCRE2_FIRSTLINE) != 0)
+if ((re->overall_options & PCRE2_ANCHORED) == 0 && common->match_end_ptr != 0)
{
- SLJIT_ASSERT(common->first_line_end != 0);
- OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->first_line_end);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr);
}
-OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_SP), common->start_ptr);
+if (common->fast_forward_bc_ptr != NULL)
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_SP), PRIVATE_DATA(common->fast_forward_bc_ptr + 1));
+else
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_SP), common->start_ptr);
if ((re->overall_options & PCRE2_ANCHORED) == 0)
{
if (common->ff_newline_shortcut != NULL)
{
+ /* There cannot be more newlines if PCRE2_FIRSTLINE is set. */
if ((re->overall_options & PCRE2_FIRSTLINE) == 0)
- CMPTO(SLJIT_LESS, STR_PTR, 0, STR_END, 0, common->ff_newline_shortcut);
- /* There cannot be more newlines here. */
+ {
+ if (common->match_end_ptr != 0)
+ {
+ OP1(SLJIT_MOV, TMP3, 0, STR_END, 0);
+ OP1(SLJIT_MOV, STR_END, 0, TMP1, 0);
+ CMPTO(SLJIT_LESS, STR_PTR, 0, TMP1, 0, common->ff_newline_shortcut);
+ OP1(SLJIT_MOV, STR_END, 0, TMP3, 0);
+ }
+ else
+ CMPTO(SLJIT_LESS, STR_PTR, 0, STR_END, 0, common->ff_newline_shortcut);
+ }
}
else
{
- if ((re->overall_options & PCRE2_FIRSTLINE) == 0)
- CMPTO(SLJIT_LESS, STR_PTR, 0, STR_END, 0, mainloop_label);
- else
- CMPTO(SLJIT_LESS, STR_PTR, 0, TMP1, 0, mainloop_label);
+ CMPTO(SLJIT_LESS, STR_PTR, 0, (common->match_end_ptr == 0) ? STR_END : TMP1, 0, mainloop_label);
}
}
@@ -10464,6 +11247,9 @@ if (common->might_be_empty)
JUMPTO(SLJIT_JUMP, empty_match_backtrack_label);
}
+common->fast_forward_bc_ptr = NULL;
+common->fast_fail_start_ptr = 0;
+common->fast_fail_end_ptr = 0;
common->currententry = common->entries;
common->local_exit = TRUE;
quit_label = common->quit_label;
diff --git a/pcre2-10.20/src/pcre2_jit_match.c b/pcre2-10.21/src/pcre2_jit_match.c
index d8d941e4..d804cfea 100644
--- a/pcre2-10.20/src/pcre2_jit_match.c
+++ b/pcre2-10.21/src/pcre2_jit_match.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2014 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -129,10 +129,12 @@ arguments.match_data = match_data;
arguments.startchar_ptr = subject;
arguments.mark_ptr = NULL;
arguments.options = options;
+
if (mcontext != NULL)
{
arguments.callout = mcontext->callout;
arguments.callout_data = mcontext->callout_data;
+ arguments.offset_limit = mcontext->offset_limit;
arguments.limit_match = (mcontext->match_limit < re->limit_match)?
mcontext->match_limit : re->limit_match;
if (mcontext->jit_callback != NULL)
@@ -144,6 +146,7 @@ else
{
arguments.callout = NULL;
arguments.callout_data = NULL;
+ arguments.offset_limit = PCRE2_UNSET;
arguments.limit_match = (MATCH_LIMIT < re->limit_match)?
MATCH_LIMIT : re->limit_match;
jit_stack = NULL;
diff --git a/pcre2-10.20/src/pcre2_jit_misc.c b/pcre2-10.21/src/pcre2_jit_misc.c
index f5b51286..efdb0558 100644
--- a/pcre2-10.20/src/pcre2_jit_misc.c
+++ b/pcre2-10.21/src/pcre2_jit_misc.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2014 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
diff --git a/pcre2-10.20/src/pcre2_jit_test.c b/pcre2-10.21/src/pcre2_jit_test.c
index b076c67d..78837cf5 100644
--- a/pcre2-10.20/src/pcre2_jit_test.c
+++ b/pcre2-10.21/src/pcre2_jit_test.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2014 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -188,6 +188,7 @@ static struct regression_test_case regression_test_cases[] = {
{ CMUP, A, 0, 0, "\xf0\x90\x90\x80{2}", "\xf0\x90\x90\x80#\xf0\x90\x90\xa8\xf0\x90\x90\x80" },
{ CMUP, A, 0, 0, "\xf0\x90\x90\xa8{2}", "\xf0\x90\x90\x80#\xf0\x90\x90\xa8\xf0\x90\x90\x80" },
{ CMUP, A, 0, 0, "\xe1\xbd\xb8\xe1\xbf\xb8", "\xe1\xbf\xb8\xe1\xbd\xb8" },
+ { M, A, 0, 0, "[3-57-9]", "5" },
/* Assertions. */
{ MU, A, 0, 0, "\\b[^A]", "A_B#" },
@@ -247,13 +248,17 @@ static struct regression_test_case regression_test_cases[] = {
{ M, A, 0, 0, "a\\z", "aaa" },
{ M, A, 0, 0 | F_NOMATCH, "a\\z", "aab" },
- /* Brackets. */
+ /* Brackets and alternatives. */
{ MU, A, 0, 0, "(ab|bb|cd)", "bacde" },
{ MU, A, 0, 0, "(?:ab|a)(bc|c)", "ababc" },
{ MU, A, 0, 0, "((ab|(cc))|(bb)|(?:cd|efg))", "abac" },
{ CMU, A, 0, 0, "((aB|(Cc))|(bB)|(?:cd|EFg))", "AcCe" },
{ MU, A, 0, 0, "((ab|(cc))|(bb)|(?:cd|ebg))", "acebebg" },
{ MU, A, 0, 0, "(?:(a)|(?:b))(cc|(?:d|e))(a|b)k", "accabdbbccbk" },
+ { MU, A, 0, 0, "\xc7\x82|\xc6\x82", "\xf1\x83\x82\x82\xc7\x82\xc7\x83" },
+ { MU, A, 0, 0, "=\xc7\x82|#\xc6\x82", "\xf1\x83\x82\x82=\xc7\x82\xc7\x83" },
+ { MU, A, 0, 0, "\xc7\x82\xc7\x83|\xc6\x82\xc6\x82", "\xf1\x83\x82\x82\xc7\x82\xc7\x83" },
+ { MU, A, 0, 0, "\xc6\x82\xc6\x82|\xc7\x83\xc7\x83|\xc8\x84\xc8\x84", "\xf1\x83\x82\x82\xc8\x84\xc8\x84" },
/* Greedy and non-greedy ? operators. */
{ MU, A, 0, 0, "(?:a)?a", "laab" },
@@ -323,6 +328,14 @@ static struct regression_test_case regression_test_cases[] = {
{ CMU, A, 0, 0, "[^\xe1\xbd\xb8][^\xc3\xa9]", "\xe1\xbd\xb8\xe1\xbf\xb8\xc3\xa9\xc3\x89#" },
{ MU, A, 0, 0, "[^\xe1\xbd\xb8][^\xc3\xa9]", "\xe1\xbd\xb8\xe1\xbf\xb8\xc3\xa9\xc3\x89#" },
{ MU, A, 0, 0, "[^\xe1\xbd\xb8]{3,}?", "##\xe1\xbd\xb8#\xe1\xbd\xb8#\xc3\x89#\xe1\xbd\xb8" },
+ { MU, A, 0, 0, "\\d+123", "987654321,01234" },
+ { MU, A, 0, 0, "abcd*|\\w+xy", "aaaaa,abxyz" },
+ { MU, A, 0, 0, "(?:abc|((?:amc|\\b\\w*xy)))", "aaaaa,abxyz" },
+ { MU, A, 0, 0, "a(?R)|([a-z]++)#", ".abcd.abcd#."},
+ { MU, A, 0, 0, "a(?R)|([a-z]++)#", ".abcd.mbcd#."},
+ { MU, A, 0, 0, ".[ab]*.", "xx" },
+ { MU, A, 0, 0, ".[ab]*a", "xxa" },
+ { MU, A, 0, 0, ".[ab]?.", "xx" },
/* Bracket repeats with limit. */
{ MU, A, 0, 0, "(?:(ab){2}){5}M", "abababababababababababM" },
@@ -679,6 +692,7 @@ static struct regression_test_case regression_test_cases[] = {
{ MU | PCRE2_FIRSTLINE, PCRE2_NEWLINE_CRLF, 0, 1, ".", "\r\n" },
{ PCRE2_FIRSTLINE | PCRE2_DOTALL, PCRE2_NEWLINE_LF, 0, 0 | F_NOMATCH, "ab.", "ab" },
{ MU | PCRE2_FIRSTLINE, A, 0, 1 | F_NOMATCH, "^[a-d0-9]", "\nxx\nd" },
+ { PCRE2_FIRSTLINE | PCRE2_DOTALL, PCRE2_NEWLINE_ANY, 0, 0, "....a", "012\n0a" },
/* Recurse. */
{ MU, A, 0, 0, "(a)(?1)", "aa" },
@@ -813,6 +827,9 @@ static struct regression_test_case regression_test_cases[] = {
/* (*SKIP) verb. */
{ MU, A, 0, 0 | F_NOMATCH, "(?=a(*SKIP)b)ab|ad", "ad" },
+ { MU, A, 0, 0, "(\\w+(*SKIP)#)", "abcd,xyz#," },
+ { MU, A, 0, 0, "\\w+(*SKIP)#|mm", "abcd,xyz#," },
+ { MU, A, 0, 0 | F_NOMATCH, "b+(?<=(*SKIP)#c)|b+", "#bbb" },
/* (*THEN) verb. */
{ MU, A, 0, 0, "((?:a(*THEN)|aab)(*THEN)c|a+)+m", "aabcaabcaabcaabcnacm" },
diff --git a/pcre2-10.20/src/pcre2_maketables.c b/pcre2-10.21/src/pcre2_maketables.c
index ca68bca2..2c7ae84d 100644
--- a/pcre2-10.20/src/pcre2_maketables.c
+++ b/pcre2-10.21/src/pcre2_maketables.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2014 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
diff --git a/pcre2-10.20/src/pcre2_match.c b/pcre2-10.21/src/pcre2_match.c
index d3d5c1df..f5275c7c 100644
--- a/pcre2-10.20/src/pcre2_match.c
+++ b/pcre2-10.21/src/pcre2_match.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2014 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -194,7 +194,7 @@ if (caseless)
GETCHARINC(c, eptr);
GETCHARINC(d, p);
ur = GET_UCD(d);
- if (c != d && c != d + ur->other_case)
+ if (c != d && c != (uint32_t)((int)d + ur->other_case))
{
const uint32_t *pp = PRIV(ucd_caseless_sets) + ur->caseset;
for (;;)
@@ -211,7 +211,7 @@ if (caseless)
/* Not in UTF mode */
{
- while (length-- > 0)
+ for (; length > 0; length--)
{
uint32_t cc, cp;
if (eptr >= mb->end_subject) return 1; /* Partial match */
@@ -226,11 +226,11 @@ if (caseless)
}
/* In the caseful case, we can just compare the code units, whether or not we
-are in UT mode. */
+are in UTF mode. */
else
{
- while (length-- > 0)
+ for (; length > 0; length--)
{
if (eptr >= mb->end_subject) return 1; /* Partial match */
if (UCHAR21INCTEST(p) != UCHAR21INCTEST(eptr)) return -1; /*No match */
@@ -1704,14 +1704,14 @@ for (;;)
back a number of characters, not bytes. */
case OP_REVERSE:
+ i = GET(ecode, 1);
#ifdef SUPPORT_UNICODE
if (utf)
{
- i = GET(ecode, 1);
while (i-- > 0)
{
+ if (eptr <= mb->start_subject) RRETURN(MATCH_NOMATCH);
eptr--;
- if (eptr < mb->start_subject) RRETURN(MATCH_NOMATCH);
BACKCHAR(eptr);
}
}
@@ -1721,8 +1721,8 @@ for (;;)
/* No UTF-8 support, or not in UTF-8 mode: count is byte count */
{
- eptr -= GET(ecode, 1);
- if (eptr < mb->start_subject) RRETURN(MATCH_NOMATCH);
+ if (i > eptr - mb->start_subject) RRETURN(MATCH_NOMATCH);
+ eptr -= i;
}
/* Save the earliest consulted character, then skip to next op code */
@@ -2408,8 +2408,9 @@ for (;;)
ecode++;
break;
- /* Match a single byte, even in UTF-8 mode. This opcode really does match
- any byte, even newline, independent of the setting of PCRE2_DOTALL. */
+ /* Match a single code unit, even in UTF-8 mode. This opcode really does
+ match any code unit, even newline. (It really should be called ANYCODEUNIT,
+ of course - the byte name is from pre-16 bit days.) */
case OP_ANYBYTE:
if (eptr >= mb->end_subject) /* DO NOT merge the eptr++ here; it must */
@@ -3342,7 +3343,10 @@ for (;;)
CHECK_PARTIAL(); /* Not SCHECK_PARTIAL() */
RRETURN(MATCH_NOMATCH);
}
- while (length-- > 0) if (*ecode++ != UCHAR21INC(eptr)) RRETURN(MATCH_NOMATCH);
+ for (; length > 0; length--)
+ {
+ if (*ecode++ != UCHAR21INC(eptr)) RRETURN(MATCH_NOMATCH);
+ }
}
else
#endif
@@ -6459,6 +6463,7 @@ PCRE2_UCHAR first_cu2 = 0;
PCRE2_UCHAR req_cu = 0;
PCRE2_UCHAR req_cu2 = 0;
+PCRE2_SPTR bumpalong_limit;
PCRE2_SPTR end_subject;
PCRE2_SPTR start_match = subject + start_offset;
PCRE2_SPTR req_cu_ptr = start_match - 1;
@@ -6482,6 +6487,7 @@ mb->match_frames_base = &frame_zero;
subject string. */
if (length == PCRE2_ZERO_TERMINATED) length = PRIV(strlen)(subject);
+end_subject = subject + length;
/* Plausibility checks */
@@ -6513,7 +6519,7 @@ occur. */
#define FF (PCRE2_NOTEMPTY_SET|PCRE2_NE_ATST_SET)
#define OO (PCRE2_NOTEMPTY|PCRE2_NOTEMPTY_ATSTART)
-options |= (re->flags & FF) / ((FF & -FF) / (OO & -OO));
+options |= (re->flags & FF) / ((FF & (~FF+1)) / (OO & (~OO+1)));
#undef FF
#undef OO
@@ -6533,21 +6539,66 @@ mb->partial = ((options & PCRE2_PARTIAL_HARD) != 0)? 2 :
/* Check a UTF string for validity if required. For 8-bit and 16-bit strings,
we must also check that a starting offset does not point into the middle of a
-multiunit character. */
+multiunit character. We check only the portion of the subject that is going to
+be inspected during matching - from the offset minus the maximum back reference
+to the given length. This saves time when a small part of a large subject is
+being matched by the use of a starting offset. Note that the maximum lookbehind
+is a number of characters, not code units. */
#ifdef SUPPORT_UNICODE
if (utf && (options & PCRE2_NO_UTF_CHECK) == 0)
{
- match_data->rc = PRIV(valid_utf)(subject, length, &(match_data->startchar));
- if (match_data->rc != 0) return match_data->rc;
+ PCRE2_SPTR check_subject = start_match; /* start_match includes offset */
+
+ if (start_offset > 0)
+ {
#if PCRE2_CODE_UNIT_WIDTH != 32
- if (start_offset > 0 && start_offset < length &&
- NOT_FIRSTCHAR(subject[start_offset]))
- return PCRE2_ERROR_BADUTFOFFSET;
+ unsigned int i;
+ if (start_match < end_subject && NOT_FIRSTCU(*start_match))
+ return PCRE2_ERROR_BADUTFOFFSET;
+ for (i = re->max_lookbehind; i > 0 && check_subject > subject; i--)
+ {
+ check_subject--;
+ while (check_subject > subject &&
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ (*check_subject & 0xc0) == 0x80)
+#else /* 16-bit */
+ (*check_subject & 0xfc00) == 0xdc00)
+#endif /* PCRE2_CODE_UNIT_WIDTH == 8 */
+ check_subject--;
+ }
+#else
+ /* In the 32-bit library, one code unit equals one character. However,
+ we cannot just subtract the lookbehind and then compare pointers, because
+ a very large lookbehind could create an invalid pointer. */
+
+ if (start_offset >= re->max_lookbehind)
+ check_subject -= re->max_lookbehind;
+ else
+ check_subject = subject;
#endif /* PCRE2_CODE_UNIT_WIDTH != 32 */
+ }
+
+ /* Validate the relevant portion of the subject. After an error, adjust the
+ offset to be an absolute offset in the whole string. */
+
+ match_data->rc = PRIV(valid_utf)(check_subject,
+ length - (check_subject - subject), &(match_data->startchar));
+ if (match_data->rc != 0)
+ {
+ match_data->startchar += check_subject - subject;
+ return match_data->rc;
+ }
}
#endif /* SUPPORT_UNICODE */
+/* It is an error to set an offset limit without setting the flag at compile
+time. */
+
+if (mcontext->offset_limit != PCRE2_UNSET &&
+ (re->overall_options & PCRE2_USE_OFFSET_LIMIT) == 0)
+ return PCRE2_ERROR_BADOFFSETLIMIT;
+
/* If the pattern was successfully studied with JIT support, run the JIT
executable instead of the rest of this function. Most options must be set at
compile time for the JIT code to be usable. Fallback to the normal code path if
@@ -6568,30 +6619,21 @@ if (re->executable_jit != NULL && (options & ~PUBLIC_JIT_MATCH_OPTIONS) == 0)
anchored = ((re->overall_options | options) & PCRE2_ANCHORED) != 0;
firstline = (re->overall_options & PCRE2_FIRSTLINE) != 0;
startline = (re->flags & PCRE2_STARTLINE) != 0;
+bumpalong_limit = (mcontext->offset_limit == PCRE2_UNSET)?
+ end_subject : subject + mcontext->offset_limit;
/* Fill in the fields in the match block. */
-if (mcontext == NULL)
- {
- mb->callout = NULL;
- mb->memctl = re->memctl;
+mb->callout = mcontext->callout;
+mb->callout_data = mcontext->callout_data;
+mb->memctl = mcontext->memctl;
#ifdef HEAP_MATCH_RECURSE
- mb->stack_memctl = re->memctl;
+mb->stack_memctl = mcontext->stack_memctl;
#endif
- }
-else
- {
- mb->callout = mcontext->callout;
- mb->callout_data = mcontext->callout_data;
- mb->memctl = mcontext->memctl;
-#ifdef HEAP_MATCH_RECURSE
- mb->stack_memctl = mcontext->stack_memctl;
-#endif
- }
mb->start_subject = subject;
mb->start_offset = start_offset;
-mb->end_subject = end_subject = mb->start_subject + length;
+mb->end_subject = end_subject;
mb->hasthen = (re->flags & PCRE2_HASTHEN) != 0;
mb->moptions = options; /* Match options */
@@ -6783,7 +6825,8 @@ for(;;)
end_subject = t;
}
- /* Advance to a unique first code unit if there is one. */
+ /* Advance to a unique first code unit if there is one. In 8-bit mode, the
+ use of memchr() gives a big speed up. */
if (has_first_cu)
{
@@ -6793,8 +6836,15 @@ for(;;)
(smc = UCHAR21TEST(start_match)) != first_cu && smc != first_cu2)
start_match++;
else
+ {
+#if PCRE2_CODE_UNIT_WIDTH != 8
while (start_match < end_subject && UCHAR21TEST(start_match) != first_cu)
start_match++;
+#else
+ start_match = memchr(start_match, first_cu, end_subject - start_match);
+ if (start_match == NULL) start_match = end_subject;
+#endif
+ }
}
/* Or to just after a linebreak for a multiline match */
@@ -6926,6 +6976,14 @@ for(;;)
/* ------------ End of start of match optimizations ------------ */
+ /* Give no match if we have passed the bumpalong limit. */
+
+ if (start_match > bumpalong_limit)
+ {
+ rc = MATCH_NOMATCH;
+ break;
+ }
+
/* OK, we can now run the match. If "hitend" is set afterwards, remember the
first starting point for which a partial match was found. */
@@ -7044,7 +7102,7 @@ for(;;)
(2) The pattern is anchored or the match was failed by (*COMMIT);
-(3) We are past the end of the subject;
+(3) We are past the end of the subject or the bumpalong limit;
(4) PCRE2_FIRSTLINE is set and we have failed to match at a newline, because
this option requests that a match occur at or before the first newline in
diff --git a/pcre2-10.20/src/pcre2_match_data.c b/pcre2-10.21/src/pcre2_match_data.c
index 1f2fb153..85ac9983 100644
--- a/pcre2-10.20/src/pcre2_match_data.c
+++ b/pcre2-10.21/src/pcre2_match_data.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2014 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
diff --git a/pcre2-10.20/src/pcre2_newline.c b/pcre2-10.21/src/pcre2_newline.c
index 7f482f24..6e9366db 100644
--- a/pcre2-10.20/src/pcre2_newline.c
+++ b/pcre2-10.21/src/pcre2_newline.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2014 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
diff --git a/pcre2-10.20/src/pcre2_ord2utf.c b/pcre2-10.21/src/pcre2_ord2utf.c
index d268e94e..75252b76 100644
--- a/pcre2-10.20/src/pcre2_ord2utf.c
+++ b/pcre2-10.21/src/pcre2_ord2utf.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2014 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
diff --git a/pcre2-10.20/src/pcre2_pattern_info.c b/pcre2-10.21/src/pcre2_pattern_info.c
index a0e734c9..5b32a905 100644
--- a/pcre2-10.20/src/pcre2_pattern_info.c
+++ b/pcre2-10.21/src/pcre2_pattern_info.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2014 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -77,6 +77,7 @@ if (where == NULL) /* Requests field length */
case PCRE2_INFO_CAPTURECOUNT:
case PCRE2_INFO_FIRSTCODETYPE:
case PCRE2_INFO_FIRSTCODEUNIT:
+ case PCRE2_INFO_HASBACKSLASHC:
case PCRE2_INFO_HASCRORLF:
case PCRE2_INFO_JCHANGED:
case PCRE2_INFO_LASTCODETYPE:
@@ -151,6 +152,10 @@ switch(what)
&(re->start_bitmap[0]) : NULL;
break;
+ case PCRE2_INFO_HASBACKSLASHC:
+ *((uint32_t *)where) = (re->flags & PCRE2_HASBKC) != 0;
+ break;
+
case PCRE2_INFO_HASCRORLF:
*((uint32_t *)where) = (re->flags & PCRE2_HASCRORLF) != 0;
break;
diff --git a/pcre2-10.20/src/pcre2_printint.c b/pcre2-10.21/src/pcre2_printint.c
index 2cd01ab6..40a633cf 100644
--- a/pcre2-10.20/src/pcre2_printint.c
+++ b/pcre2-10.21/src/pcre2_printint.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2014 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -58,12 +58,13 @@ static const char *OP_names[] = { OP_NAME_LIST };
/* The functions and tables herein must all have mode-dependent names. */
-#define OP_lengths PCRE2_SUFFIX(OP_lengths_)
-#define get_ucpname PCRE2_SUFFIX(get_ucpname_)
-#define pcre2_printint PCRE2_SUFFIX(pcre2_printint_)
-#define print_char PCRE2_SUFFIX(print_char_)
-#define print_custring PCRE2_SUFFIX(print_custring_)
-#define print_prop PCRE2_SUFFIX(print_prop_)
+#define OP_lengths PCRE2_SUFFIX(OP_lengths_)
+#define get_ucpname PCRE2_SUFFIX(get_ucpname_)
+#define pcre2_printint PCRE2_SUFFIX(pcre2_printint_)
+#define print_char PCRE2_SUFFIX(print_char_)
+#define print_custring PCRE2_SUFFIX(print_custring_)
+#define print_custring_bylen PCRE2_SUFFIX(print_custring_bylen_)
+#define print_prop PCRE2_SUFFIX(print_prop_)
/* Table of sizes for the fixed-length opcodes. It's defined in a macro so that
the definition is next to the definition of the opcodes in pcre2_internal.h.
@@ -188,12 +189,14 @@ return 0;
* Print string as a list of code units *
*************************************************/
-/* This takes no account of UTF as it always prints each individual code unit.
-The string is zero-terminated.
+/* These take no account of UTF as they always print each individual code unit.
+The string is zero-terminated for print_custring(); the length is given for
+print_custring_bylen().
Arguments:
f file to write to
ptr point to the string
+ len length for print_custring_bylen()
Returns: nothing
*/
@@ -208,6 +211,16 @@ while (*ptr != '\0')
}
}
+static void
+print_custring_bylen(FILE *f, PCRE2_SPTR ptr, PCRE2_UCHAR len)
+{
+while (len-- > 0)
+ {
+ register uint32_t c = *ptr++;
+ if (PRINTABLE(c)) fprintf(f, "%c", c); else fprintf(f, "\\x{%x}", c);
+ }
+}
+
/*************************************************
@@ -603,7 +616,7 @@ for(;;)
c = code[1 + 4*LINK_SIZE];
fprintf(f, " %s %c", OP_names[*code], c);
extra = GET(code, 1 + 2*LINK_SIZE);
- print_custring(f, code + 2 + 4*LINK_SIZE);
+ print_custring_bylen(f, code + 2 + 4*LINK_SIZE, extra - 3 - 4*LINK_SIZE);
for (i = 0; PRIV(callout_start_delims)[i] != 0; i++)
if (c == PRIV(callout_start_delims)[i])
{
@@ -791,7 +804,7 @@ for(;;)
case OP_SKIP_ARG:
case OP_THEN_ARG:
fprintf(f, " %s ", OP_names[*code]);
- print_custring(f, code + 2);
+ print_custring_bylen(f, code + 2, code[1]);
extra += code[1];
break;
diff --git a/pcre2-10.20/src/pcre2_serialize.c b/pcre2-10.21/src/pcre2_serialize.c
index 828b9461..8c44acfd 100644
--- a/pcre2-10.20/src/pcre2_serialize.c
+++ b/pcre2-10.21/src/pcre2_serialize.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2015 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -104,7 +104,7 @@ for (i = 0; i < number_of_codes; i++)
return PCRE2_ERROR_MIXEDTABLES;
total_size += re->blocksize;
}
-
+
/* Initialize the byte stream. */
bytes = memctl->malloc(total_size + sizeof(pcre2_memctl), memctl->memory_data);
if (bytes == NULL) return PCRE2_ERROR_NOMEMORY;
@@ -167,7 +167,7 @@ if (number_of_codes > data->number_of_codes)
src_bytes = bytes + sizeof(pcre2_serialized_data);
-/* Decode tables. The reference count for the tables is stored immediately
+/* Decode tables. The reference count for the tables is stored immediately
following them. */
tables = memctl->malloc(tables_length + sizeof(PCRE2_SIZE), memctl->memory_data);
@@ -179,8 +179,8 @@ src_bytes += tables_length;
/* Decode the byte stream. We must not try to read the size from the compiled
code block in the stream, because it might be unaligned, which causes errors on
-hardware such as Sparc-64 that doesn't like unaligned memory accesses. The type
-of the blocksize field is given its own name to ensure that it is the same here
+hardware such as Sparc-64 that doesn't like unaligned memory accesses. The type
+of the blocksize field is given its own name to ensure that it is the same here
as in the block. */
for (i = 0; i < number_of_codes; i++)
@@ -190,8 +190,8 @@ for (i = 0; i < number_of_codes; i++)
sizeof(CODE_BLOCKSIZE_TYPE));
/* The allocator provided by gcontext replaces the original one. */
-
- dst_re = (pcre2_real_code *)PRIV(memctl_malloc)(blocksize,
+
+ dst_re = (pcre2_real_code *)PRIV(memctl_malloc)(blocksize,
(pcre2_memctl *)gcontext);
if (dst_re == NULL)
{
@@ -205,12 +205,12 @@ for (i = 0; i < number_of_codes; i++)
}
/* The new allocator must be preserved. */
-
+
memcpy(((uint8_t *)dst_re) + sizeof(pcre2_memctl),
src_bytes + sizeof(pcre2_memctl), blocksize - sizeof(pcre2_memctl));
/* At the moment only one table is supported. */
-
+
dst_re->tables = tables;
dst_re->executable_jit = NULL;
dst_re->flags |= PCRE2_DEREF_TABLES;
@@ -252,7 +252,7 @@ if (bytes != NULL)
{
pcre2_memctl *memctl = (pcre2_memctl *)(bytes - sizeof(pcre2_memctl));
memctl->free(memctl, memctl->memory_data);
- }
+ }
}
/* End of pcre2_serialize.c */
diff --git a/pcre2-10.20/src/pcre2_string_utils.c b/pcre2-10.21/src/pcre2_string_utils.c
index 888620e1..2a1f2826 100644
--- a/pcre2-10.20/src/pcre2_string_utils.c
+++ b/pcre2-10.21/src/pcre2_string_utils.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2014 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -121,7 +121,7 @@ int
PRIV(strncmp)(PCRE2_SPTR str1, PCRE2_SPTR str2, size_t len)
{
PCRE2_UCHAR c1, c2;
-while (len-- > 0)
+for (; len > 0; len--)
{
c1 = *str1++;
c2 = *str2++;
@@ -150,7 +150,7 @@ int
PRIV(strncmp_c8)(PCRE2_SPTR str1, const char *str2, size_t len)
{
PCRE2_UCHAR c1, c2;
-while (len-- > 0)
+for (; len > 0; len--)
{
c1 = *str1++;
c2 = *str2++;
diff --git a/pcre2-10.20/src/pcre2_study.c b/pcre2-10.21/src/pcre2_study.c
index 25d7e514..18932ade 100644
--- a/pcre2-10.20/src/pcre2_study.c
+++ b/pcre2-10.21/src/pcre2_study.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2014 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -59,15 +59,17 @@ collecting data (e.g. minimum matching length). */
enum { SSB_FAIL, SSB_DONE, SSB_CONTINUE, SSB_UNKNOWN };
-
/*************************************************
* Find the minimum subject length for a group *
*************************************************/
/* Scan a parenthesized group and compute the minimum length of subject that
is needed to match it. This is a lower bound; it does not mean there is a
-string of that length that matches. In UTF8 mode, the result is in characters
-rather than bytes.
+string of that length that matches. In UTF mode, the result is in characters
+rather than code units. The field in a compiled pattern for storing the minimum
+length is 16-bits long (on the grounds that anything longer than that is
+pathological), so we give up when we reach that amount. This also means that
+integer overflow for really crazy patterns cannot happen.
Arguments:
re compiled pattern block
@@ -75,36 +77,57 @@ Arguments:
startcode pointer to start of the whole pattern's code
utf UTF flag
recurses chain of recurse_check to catch mutual recursion
+ countptr pointer to call count (to catch over complexity)
Returns: the minimum length
-1 \C in UTF-8 mode
or (*ACCEPT)
+ or pattern too complicated
+ or back reference to duplicate name/number
-2 internal error (missing capturing bracket)
-3 internal error (opcode not listed)
*/
static int
find_minlength(const pcre2_real_code *re, PCRE2_SPTR code,
- PCRE2_SPTR startcode, BOOL utf, recurse_check *recurses)
+ PCRE2_SPTR startcode, BOOL utf, recurse_check *recurses, int *countptr)
{
int length = -1;
+int prev_cap_recno = -1;
+int prev_cap_d = 0;
+int prev_recurse_recno = -1;
+int prev_recurse_d = 0;
+uint32_t once_fudge = 0;
BOOL had_recurse = FALSE;
+BOOL dupcapused = (re->flags & PCRE2_DUPCAPUSED) != 0;
recurse_check this_recurse;
register int branchlength = 0;
register PCRE2_UCHAR *cc = (PCRE2_UCHAR *)code + 1 + LINK_SIZE;
-if (*code == OP_CBRA || *code == OP_SCBRA ||
- *code == OP_CBRAPOS || *code == OP_SCBRAPOS) cc += IMM2_SIZE;
+/* If this is a "could be empty" group, its minimum length is 0. */
+
+if (*code >= OP_SBRA && *code <= OP_SCOND) return 0;
+
+/* Skip over capturing bracket number */
+
+if (*code == OP_CBRA || *code == OP_CBRAPOS) cc += IMM2_SIZE;
-/* Scan along the opcodes for this branch. If we get to the end of the
-branch, check the length against that of the other branches. */
+/* A large and/or complex regex can take too long to process. */
+
+if ((*countptr)++ > 1000) return -1;
+
+/* Scan along the opcodes for this branch. If we get to the end of the branch,
+check the length against that of the other branches. If the accumulated length
+passes 16-bits, stop. */
for (;;)
{
- int d, min;
+ int d, min, recno;
PCRE2_UCHAR *cs, *ce;
register PCRE2_UCHAR op = *cc;
+ if (branchlength >= UINT16_MAX) return UINT16_MAX;
+
switch (op)
{
case OP_COND:
@@ -112,7 +135,8 @@ for (;;)
/* If there is only one branch in a condition, the implied branch has zero
length, so we don't add anything. This covers the DEFINE "condition"
- automatically. */
+ automatically. If there are two branches we can treat it the same as any
+ other non-capturing subpattern. */
cs = cc + GET(cc, 1);
if (*cs != OP_ALT)
@@ -120,27 +144,56 @@ for (;;)
cc = cs + 1 + LINK_SIZE;
break;
}
+ goto PROCESS_NON_CAPTURE;
- /* Otherwise we can fall through and treat it the same as any other
- subpattern. */
+ /* There's a special case of OP_ONCE, when it is wrapped round an
+ OP_RECURSE. We'd like to process the latter at this level so that
+ remembering the value works for repeated cases. So we do nothing, but
+ set a fudge value to skip over the OP_KET after the recurse. */
- case OP_CBRA:
- case OP_SCBRA:
+ case OP_ONCE:
+ if (cc[1+LINK_SIZE] == OP_RECURSE && cc[2*(1+LINK_SIZE)] == OP_KET)
+ {
+ once_fudge = 1 + LINK_SIZE;
+ cc += 1 + LINK_SIZE;
+ break;
+ }
+ /* Fall through */
+
+ case OP_ONCE_NC:
case OP_BRA:
case OP_SBRA:
- case OP_CBRAPOS:
- case OP_SCBRAPOS:
case OP_BRAPOS:
case OP_SBRAPOS:
- case OP_ONCE:
- case OP_ONCE_NC:
- d = find_minlength(re, cc, startcode, utf, recurses);
+ PROCESS_NON_CAPTURE:
+ d = find_minlength(re, cc, startcode, utf, recurses, countptr);
if (d < 0) return d;
branchlength += d;
do cc += GET(cc, 1); while (*cc == OP_ALT);
cc += 1 + LINK_SIZE;
break;
+ /* To save time for repeated capturing subpatterns, we remember the
+ length of the previous one. Unfortunately we can't do the same for
+ the unnumbered ones above. Nor can we do this if (?| is present in the
+ pattern because captures with the same number are not then identical. */
+
+ case OP_CBRA:
+ case OP_SCBRA:
+ case OP_CBRAPOS:
+ case OP_SCBRAPOS:
+ recno = dupcapused? prev_cap_recno - 1 : (int)GET2(cc, 1+LINK_SIZE);
+ if (recno != prev_cap_recno)
+ {
+ prev_cap_recno = recno;
+ prev_cap_d = find_minlength(re, cc, startcode, utf, recurses, countptr);
+ if (prev_cap_d < 0) return prev_cap_d;
+ }
+ branchlength += prev_cap_d;
+ do cc += GET(cc, 1); while (*cc == OP_ALT);
+ cc += 1 + LINK_SIZE;
+ break;
+
/* ACCEPT makes things far too complicated; we have to give up. */
case OP_ACCEPT:
@@ -388,8 +441,12 @@ for (;;)
matches an empty string (by default it causes a matching failure), so in
that case we must set the minimum length to zero. */
- case OP_DNREF: /* Duplicate named pattern back reference */
+ /* Duplicate named pattern back reference. We cannot reliably find a length
+ for this if duplicate numbers are present in the pattern. */
+
+ case OP_DNREF:
case OP_DNREFI:
+ if (dupcapused) return -1;
if ((re->overall_options & PCRE2_MATCH_UNSET_BACKREF) == 0)
{
int count = GET2(cc, 1+IMM2_SIZE);
@@ -427,7 +484,7 @@ for (;;)
int dd;
this_recurse.prev = recurses;
this_recurse.group = cs;
- dd = find_minlength(re, cs, startcode, utf, &this_recurse);
+ dd = find_minlength(re, cs, startcode, utf, &this_recurse, countptr);
if (dd < d) d = dd;
}
}
@@ -438,8 +495,12 @@ for (;;)
cc += 1 + 2*IMM2_SIZE;
goto REPEAT_BACK_REFERENCE;
- case OP_REF: /* Single back reference */
+ /* Single back reference. We cannot find a length for this if duplicate
+ numbers are present in the pattern. */
+
+ case OP_REF:
case OP_REFI:
+ if (dupcapused) return -1;
if ((re->overall_options & PCRE2_MATCH_UNSET_BACKREF) == 0)
{
ce = cs = (PCRE2_UCHAR *)PRIV(find_bracket)(startcode, utf, GET2(cc, 1));
@@ -463,7 +524,7 @@ for (;;)
{
this_recurse.prev = recurses;
this_recurse.group = cs;
- d = find_minlength(re, cs, startcode, utf, &this_recurse);
+ d = find_minlength(re, cs, startcode, utf, &this_recurse, countptr);
}
}
}
@@ -504,28 +565,51 @@ for (;;)
break;
}
- branchlength += min * d;
+ /* Take care not to overflow: (1) min and d are ints, so check that their
+ product is not greater than INT_MAX. (2) branchlength is limited to
+ UINT16_MAX (checked at the top of the loop). */
+
+ if ((d > 0 && (INT_MAX/d) < min) || UINT16_MAX - branchlength < min*d)
+ branchlength = UINT16_MAX;
+ else branchlength += min * d;
break;
+ /* Recursion always refers to the first occurrence of a subpattern with a
+ given number. Therefore, we can always make use of caching, even when the
+ pattern contains multiple subpatterns with the same number. */
+
case OP_RECURSE:
cs = ce = (PCRE2_UCHAR *)startcode + GET(cc, 1);
- do ce += GET(ce, 1); while (*ce == OP_ALT);
- if (cc > cs && cc < ce) /* Simple recursion */
- had_recurse = TRUE;
+ recno = GET2(cs, 1+LINK_SIZE);
+ if (recno == prev_recurse_recno)
+ {
+ branchlength += prev_recurse_d;
+ }
else
{
- recurse_check *r = recurses;
- for (r = recurses; r != NULL; r = r->prev) if (r->group == cs) break;
- if (r != NULL) /* Mutual recursion */
+ do ce += GET(ce, 1); while (*ce == OP_ALT);
+ if (cc > cs && cc < ce) /* Simple recursion */
had_recurse = TRUE;
else
{
- this_recurse.prev = recurses;
- this_recurse.group = cs;
- branchlength += find_minlength(re, cs, startcode, utf, &this_recurse);
+ recurse_check *r = recurses;
+ for (r = recurses; r != NULL; r = r->prev) if (r->group == cs) break;
+ if (r != NULL) /* Mutual recursion */
+ had_recurse = TRUE;
+ else
+ {
+ this_recurse.prev = recurses;
+ this_recurse.group = cs;
+ prev_recurse_d = find_minlength(re, cs, startcode, utf, &this_recurse,
+ countptr);
+ if (prev_recurse_d < 0) return prev_recurse_d;
+ prev_recurse_recno = recno;
+ branchlength += prev_recurse_d;
+ }
}
}
- cc += 1 + LINK_SIZE;
+ cc += 1 + LINK_SIZE + once_fudge;
+ once_fudge = 0;
break;
/* Anything else does not or need not match a character. We can get the
@@ -1441,6 +1525,7 @@ int
PRIV(study)(pcre2_real_code *re)
{
int min;
+int count = 0;
PCRE2_UCHAR *code;
BOOL utf = (re->overall_options & PCRE2_UTF) != 0;
@@ -1461,22 +1546,27 @@ if ((re->overall_options & PCRE2_ANCHORED) == 0 &&
if (rc == SSB_DONE) re->flags |= PCRE2_FIRSTMAPSET;
}
-/* Find the minimum length of subject string. */
+/* Find the minimum length of subject string. If it can match an empty string,
+the minimum length is already known. */
-switch(min = find_minlength(re, code, code, utf, NULL))
+if ((re->flags & PCRE2_MATCH_EMPTY) == 0)
{
- case -1: /* \C in UTF mode or (*ACCEPT) */
- break; /* Leave minlength unchanged (will be zero) */
+ switch(min = find_minlength(re, code, code, utf, NULL, &count))
+ {
+ case -1: /* \C in UTF mode or (*ACCEPT) or over-complex regex */
+ break; /* Leave minlength unchanged (will be zero) */
- case -2:
- return 2; /* missing capturing bracket */
+ case -2:
+ return 2; /* missing capturing bracket */
- case -3:
- return 3; /* unrecognized opcode */
+ case -3:
+ return 3; /* unrecognized opcode */
- default:
- re->minlength = min;
- break;
+ default:
+ if (min > UINT16_MAX) min = UINT16_MAX;
+ re->minlength = min;
+ break;
+ }
}
return 0;
diff --git a/pcre2-10.21/src/pcre2_substitute.c b/pcre2-10.21/src/pcre2_substitute.c
new file mode 100644
index 00000000..0bf781ef
--- /dev/null
+++ b/pcre2-10.21/src/pcre2_substitute.c
@@ -0,0 +1,850 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "pcre2_internal.h"
+
+#define PTR_STACK_SIZE 20
+
+#define SUBSTITUTE_OPTIONS \
+ (PCRE2_SUBSTITUTE_EXTENDED|PCRE2_SUBSTITUTE_GLOBAL| \
+ PCRE2_SUBSTITUTE_OVERFLOW_LENGTH|PCRE2_SUBSTITUTE_UNKNOWN_UNSET| \
+ PCRE2_SUBSTITUTE_UNSET_EMPTY)
+
+
+
+/*************************************************
+* Find end of substitute text *
+*************************************************/
+
+/* In extended mode, we recognize ${name:+set text:unset text} and similar
+constructions. This requires the identification of unescaped : and }
+characters. This function scans for such. It must deal with nested ${
+constructions. The pointer to the text is updated, either to the required end
+character, or to where an error was detected.
+
+Arguments:
+ code points to the compiled expression (for options)
+ ptrptr points to the pointer to the start of the text (updated)
+ ptrend end of the whole string
+ last TRUE if the last expected string (only } recognized)
+
+Returns: 0 on success
+ negative error code on failure
+*/
+
+static int
+find_text_end(const pcre2_code *code, PCRE2_SPTR *ptrptr, PCRE2_SPTR ptrend,
+ BOOL last)
+{
+int rc = 0;
+uint32_t nestlevel = 0;
+BOOL literal = FALSE;
+PCRE2_SPTR ptr = *ptrptr;
+
+for (; ptr < ptrend; ptr++)
+ {
+ if (literal)
+ {
+ if (ptr[0] == CHAR_BACKSLASH && ptr < ptrend - 1 && ptr[1] == CHAR_E)
+ {
+ literal = FALSE;
+ ptr += 1;
+ }
+ }
+
+ else if (*ptr == CHAR_RIGHT_CURLY_BRACKET)
+ {
+ if (nestlevel == 0) goto EXIT;
+ nestlevel--;
+ }
+
+ else if (*ptr == CHAR_COLON && !last && nestlevel == 0) goto EXIT;
+
+ else if (*ptr == CHAR_DOLLAR_SIGN)
+ {
+ if (ptr < ptrend - 1 && ptr[1] == CHAR_LEFT_CURLY_BRACKET)
+ {
+ nestlevel++;
+ ptr += 1;
+ }
+ }
+
+ else if (*ptr == CHAR_BACKSLASH)
+ {
+ int erc;
+ int errorcode = 0;
+ uint32_t ch;
+
+ if (ptr < ptrend - 1) switch (ptr[1])
+ {
+ case CHAR_L:
+ case CHAR_l:
+ case CHAR_U:
+ case CHAR_u:
+ ptr += 1;
+ continue;
+ }
+
+ erc = PRIV(check_escape)(&ptr, ptrend, &ch, &errorcode,
+ code->overall_options, FALSE, NULL);
+ if (errorcode != 0)
+ {
+ rc = errorcode;
+ goto EXIT;
+ }
+
+ switch(erc)
+ {
+ case 0: /* Data character */
+ case ESC_E: /* Isolated \E is ignored */
+ break;
+
+ case ESC_Q:
+ literal = TRUE;
+ break;
+
+ default:
+ rc = PCRE2_ERROR_BADREPESCAPE;
+ goto EXIT;
+ }
+ }
+ }
+
+rc = PCRE2_ERROR_REPMISSINGBRACE; /* Terminator not found */
+
+EXIT:
+*ptrptr = ptr;
+return rc;
+}
+
+
+
+/*************************************************
+* Match and substitute *
+*************************************************/
+
+/* This function applies a compiled re to a subject string and creates a new
+string with substitutions. The first 7 arguments are the same as for
+pcre2_match(). Either string length may be PCRE2_ZERO_TERMINATED.
+
+Arguments:
+ code points to the compiled expression
+ subject points to the subject string
+ length length of subject string (may contain binary zeros)
+ start_offset where to start in the subject string
+ options option bits
+ match_data points to a match_data block, or is NULL
+ context points a PCRE2 context
+ replacement points to the replacement string
+ rlength length of replacement string
+ buffer where to put the substituted string
+ blength points to length of buffer; updated to length of string
+
+Returns: >= 0 number of substitutions made
+ < 0 an error code
+ PCRE2_ERROR_BADREPLACEMENT means invalid use of $
+*/
+
+/* This macro checks for space in the buffer before copying into it. On
+overflow, either give an error immediately, or keep on, accumulating the
+length. */
+
+#define CHECKMEMCPY(from,length) \
+ if (!overflowed && lengthleft < length) \
+ { \
+ if ((suboptions & PCRE2_SUBSTITUTE_OVERFLOW_LENGTH) == 0) goto NOROOM; \
+ overflowed = TRUE; \
+ extra_needed = length - lengthleft; \
+ } \
+ else if (overflowed) \
+ { \
+ extra_needed += length; \
+ } \
+ else \
+ { \
+ memcpy(buffer + buff_offset, from, CU2BYTES(length)); \
+ buff_offset += length; \
+ lengthleft -= length; \
+ }
+
+/* Here's the function */
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_substitute(const pcre2_code *code, PCRE2_SPTR subject, PCRE2_SIZE length,
+ PCRE2_SIZE start_offset, uint32_t options, pcre2_match_data *match_data,
+ pcre2_match_context *mcontext, PCRE2_SPTR replacement, PCRE2_SIZE rlength,
+ PCRE2_UCHAR *buffer, PCRE2_SIZE *blength)
+{
+int rc;
+int subs;
+int forcecase = 0;
+int forcecasereset = 0;
+uint32_t ovector_count;
+uint32_t goptions = 0;
+uint32_t suboptions;
+BOOL match_data_created = FALSE;
+BOOL literal = FALSE;
+BOOL overflowed = FALSE;
+#ifdef SUPPORT_UNICODE
+BOOL utf = (code->overall_options & PCRE2_UTF) != 0;
+#endif
+PCRE2_UCHAR temp[6];
+PCRE2_SPTR ptr;
+PCRE2_SPTR repend;
+PCRE2_SIZE extra_needed = 0;
+PCRE2_SIZE buff_offset, buff_length, lengthleft, fraglength;
+PCRE2_SIZE *ovector;
+
+buff_offset = 0;
+lengthleft = buff_length = *blength;
+*blength = PCRE2_UNSET;
+
+/* Partial matching is not valid. */
+
+if ((options & (PCRE2_PARTIAL_HARD|PCRE2_PARTIAL_SOFT)) != 0)
+ return PCRE2_ERROR_BADOPTION;
+
+/* If no match data block is provided, create one. */
+
+if (match_data == NULL)
+ {
+ pcre2_general_context *gcontext = (mcontext == NULL)?
+ (pcre2_general_context *)code :
+ (pcre2_general_context *)mcontext;
+ match_data = pcre2_match_data_create_from_pattern(code, gcontext);
+ if (match_data == NULL) return PCRE2_ERROR_NOMEMORY;
+ match_data_created = TRUE;
+ }
+ovector = pcre2_get_ovector_pointer(match_data);
+ovector_count = pcre2_get_ovector_count(match_data);
+
+/* Find lengths of zero-terminated strings and the end of the replacement. */
+
+if (length == PCRE2_ZERO_TERMINATED) length = PRIV(strlen)(subject);
+if (rlength == PCRE2_ZERO_TERMINATED) rlength = PRIV(strlen)(replacement);
+repend = replacement + rlength;
+
+/* Check UTF replacement string if necessary. */
+
+#ifdef SUPPORT_UNICODE
+if (utf && (options & PCRE2_NO_UTF_CHECK) == 0)
+ {
+ rc = PRIV(valid_utf)(replacement, rlength, &(match_data->rightchar));
+ if (rc != 0)
+ {
+ match_data->leftchar = 0;
+ goto EXIT;
+ }
+ }
+#endif /* SUPPORT_UNICODE */
+
+/* Save the substitute options and remove them from the match options. */
+
+suboptions = options & SUBSTITUTE_OPTIONS;
+options &= ~SUBSTITUTE_OPTIONS;
+
+/* Copy up to the start offset */
+
+CHECKMEMCPY(subject, start_offset);
+
+/* Loop for global substituting. */
+
+subs = 0;
+do
+ {
+ PCRE2_SPTR ptrstack[PTR_STACK_SIZE];
+ uint32_t ptrstackptr = 0;
+
+ rc = pcre2_match(code, subject, length, start_offset, options|goptions,
+ match_data, mcontext);
+
+#ifdef SUPPORT_UNICODE
+ if (utf) options |= PCRE2_NO_UTF_CHECK; /* Only need to check once */
+#endif
+
+ /* Any error other than no match returns the error code. No match when not
+ doing the special after-empty-match global rematch, or when at the end of the
+ subject, breaks the global loop. Otherwise, advance the starting point by one
+ character, copying it to the output, and try again. */
+
+ if (rc < 0)
+ {
+ PCRE2_SIZE save_start;
+
+ if (rc != PCRE2_ERROR_NOMATCH) goto EXIT;
+ if (goptions == 0 || start_offset >= length) break;
+
+ /* Advance by one code point. Then, if CRLF is a valid newline sequence and
+ we have advanced into the middle of it, advance one more code point. In
+ other words, do not start in the middle of CRLF, even if CR and LF on their
+ own are valid newlines. */
+
+ save_start = start_offset++;
+ if (subject[start_offset-1] == CHAR_CR &&
+ code->newline_convention != PCRE2_NEWLINE_CR &&
+ code->newline_convention != PCRE2_NEWLINE_LF &&
+ start_offset < length &&
+ subject[start_offset] == CHAR_LF)
+ start_offset++;
+
+ /* Otherwise, in UTF mode, advance past any secondary code points. */
+
+ else if ((code->overall_options & PCRE2_UTF) != 0)
+ {
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ while (start_offset < length && (subject[start_offset] & 0xc0) == 0x80)
+ start_offset++;
+#elif PCRE2_CODE_UNIT_WIDTH == 16
+ while (start_offset < length &&
+ (subject[start_offset] & 0xfc00) == 0xdc00)
+ start_offset++;
+#endif
+ }
+
+ /* Copy what we have advanced past, reset the special global options, and
+ continue to the next match. */
+
+ fraglength = start_offset - save_start;
+ CHECKMEMCPY(subject + save_start, fraglength);
+ goptions = 0;
+ continue;
+ }
+
+ /* Handle a successful match. Matches that use \K to end before they start
+ are not supported. */
+
+ if (ovector[1] < ovector[0])
+ {
+ rc = PCRE2_ERROR_BADSUBSPATTERN;
+ goto EXIT;
+ }
+
+ /* Count substitutions with a paranoid check for integer overflow; surely no
+ real call to this function would ever hit this! */
+
+ if (subs == INT_MAX)
+ {
+ rc = PCRE2_ERROR_TOOMANYREPLACE;
+ goto EXIT;
+ }
+ subs++;
+
+ /* Copy the text leading up to the match. */
+
+ if (rc == 0) rc = ovector_count;
+ fraglength = ovector[0] - start_offset;
+ CHECKMEMCPY(subject + start_offset, fraglength);
+
+ /* Process the replacement string. Literal mode is set by \Q, but only in
+ extended mode when backslashes are being interpreted. In extended mode we
+ must handle nested substrings that are to be reprocessed. */
+
+ ptr = replacement;
+ for (;;)
+ {
+ uint32_t ch;
+ unsigned int chlen;
+
+ /* If at the end of a nested substring, pop the stack. */
+
+ if (ptr >= repend)
+ {
+ if (ptrstackptr <= 0) break; /* End of replacement string */
+ repend = ptrstack[--ptrstackptr];
+ ptr = ptrstack[--ptrstackptr];
+ continue;
+ }
+
+ /* Handle the next character */
+
+ if (literal)
+ {
+ if (ptr[0] == CHAR_BACKSLASH && ptr < repend - 1 && ptr[1] == CHAR_E)
+ {
+ literal = FALSE;
+ ptr += 2;
+ continue;
+ }
+ goto LOADLITERAL;
+ }
+
+ /* Not in literal mode. */
+
+ if (*ptr == CHAR_DOLLAR_SIGN)
+ {
+ int group, n;
+ uint32_t special = 0;
+ BOOL inparens;
+ BOOL star;
+ PCRE2_SIZE sublength;
+ PCRE2_SPTR text1_start = NULL;
+ PCRE2_SPTR text1_end = NULL;
+ PCRE2_SPTR text2_start = NULL;
+ PCRE2_SPTR text2_end = NULL;
+ PCRE2_UCHAR next;
+ PCRE2_UCHAR name[33];
+
+ if (++ptr >= repend) goto BAD;
+ if ((next = *ptr) == CHAR_DOLLAR_SIGN) goto LOADLITERAL;
+
+ group = -1;
+ n = 0;
+ inparens = FALSE;
+ star = FALSE;
+
+ if (next == CHAR_LEFT_CURLY_BRACKET)
+ {
+ if (++ptr >= repend) goto BAD;
+ next = *ptr;
+ inparens = TRUE;
+ }
+
+ if (next == CHAR_ASTERISK)
+ {
+ if (++ptr >= repend) goto BAD;
+ next = *ptr;
+ star = TRUE;
+ }
+
+ if (!star && next >= CHAR_0 && next <= CHAR_9)
+ {
+ group = next - CHAR_0;
+ while (++ptr < repend)
+ {
+ next = *ptr;
+ if (next < CHAR_0 || next > CHAR_9) break;
+ group = group * 10 + next - CHAR_0;
+
+ /* A check for a number greater than the hightest captured group
+ is sufficient here; no need for a separate overflow check. If unknown
+ groups are to be treated as unset, just skip over any remaining
+ digits and carry on. */
+
+ if (group > code->top_bracket)
+ {
+ if ((suboptions & PCRE2_SUBSTITUTE_UNKNOWN_UNSET) != 0)
+ {
+ while (++ptr < repend && *ptr >= CHAR_0 && *ptr <= CHAR_9);
+ break;
+ }
+ else
+ {
+ rc = PCRE2_ERROR_NOSUBSTRING;
+ goto PTREXIT;
+ }
+ }
+ }
+ }
+ else
+ {
+ const uint8_t *ctypes = code->tables + ctypes_offset;
+ while (MAX_255(next) && (ctypes[next] & ctype_word) != 0)
+ {
+ name[n++] = next;
+ if (n > 32) goto BAD;
+ if (++ptr >= repend) break;
+ next = *ptr;
+ }
+ if (n == 0) goto BAD;
+ name[n] = 0;
+ }
+
+ /* In extended mode we recognize ${name:+set text:unset text} and
+ ${name:-default text}. */
+
+ if (inparens)
+ {
+ if ((suboptions & PCRE2_SUBSTITUTE_EXTENDED) != 0 &&
+ !star && ptr < repend - 2 && next == CHAR_COLON)
+ {
+ special = *(++ptr);
+ if (special != CHAR_PLUS && special != CHAR_MINUS)
+ {
+ rc = PCRE2_ERROR_BADSUBSTITUTION;
+ goto PTREXIT;
+ }
+
+ text1_start = ++ptr;
+ rc = find_text_end(code, &ptr, repend, special == CHAR_MINUS);
+ if (rc != 0) goto PTREXIT;
+ text1_end = ptr;
+
+ if (special == CHAR_PLUS && *ptr == CHAR_COLON)
+ {
+ text2_start = ++ptr;
+ rc = find_text_end(code, &ptr, repend, TRUE);
+ if (rc != 0) goto PTREXIT;
+ text2_end = ptr;
+ }
+ }
+
+ else
+ {
+ if (ptr >= repend || *ptr != CHAR_RIGHT_CURLY_BRACKET)
+ {
+ rc = PCRE2_ERROR_REPMISSINGBRACE;
+ goto PTREXIT;
+ }
+ }
+
+ ptr++;
+ }
+
+ /* Have found a syntactically correct group number or name, or *name.
+ Only *MARK is currently recognized. */
+
+ if (star)
+ {
+ if (PRIV(strcmp_c8)(name, STRING_MARK) == 0)
+ {
+ PCRE2_SPTR mark = pcre2_get_mark(match_data);
+ if (mark != NULL)
+ {
+ PCRE2_SPTR mark_start = mark;
+ while (*mark != 0) mark++;
+ fraglength = mark - mark_start;
+ CHECKMEMCPY(mark_start, fraglength);
+ }
+ }
+ else goto BAD;
+ }
+
+ /* Substitute the contents of a group. We don't use substring_copy
+ functions any more, in order to support case forcing. */
+
+ else
+ {
+ PCRE2_SPTR subptr, subptrend;
+
+ /* Find a number for a named group. In case there are duplicate names,
+ search for the first one that is set. If the name is not found when
+ PCRE2_SUBSTITUTE_UNKNOWN_EMPTY is set, set the group number to a
+ non-existent group. */
+
+ if (group < 0)
+ {
+ PCRE2_SPTR first, last, entry;
+ rc = pcre2_substring_nametable_scan(code, name, &first, &last);
+ if (rc == PCRE2_ERROR_NOSUBSTRING &&
+ (suboptions & PCRE2_SUBSTITUTE_UNKNOWN_UNSET) != 0)
+ {
+ group = code->top_bracket + 1;
+ }
+ else
+ {
+ if (rc < 0) goto PTREXIT;
+ for (entry = first; entry <= last; entry += rc)
+ {
+ uint32_t ng = GET2(entry, 0);
+ if (ng < ovector_count)
+ {
+ if (group < 0) group = ng; /* First in ovector */
+ if (ovector[ng*2] != PCRE2_UNSET)
+ {
+ group = ng; /* First that is set */
+ break;
+ }
+ }
+ }
+
+ /* If group is still negative, it means we did not find a group
+ that is in the ovector. Just set the first group. */
+
+ if (group < 0) group = GET2(first, 0);
+ }
+ }
+
+ /* We now have a group that is identified by number. Find the length of
+ the captured string. If a group in a non-special substitution is unset
+ when PCRE2_SUBSTITUTE_UNSET_EMPTY is set, substitute nothing. */
+
+ rc = pcre2_substring_length_bynumber(match_data, group, &sublength);
+ if (rc < 0)
+ {
+ if (rc == PCRE2_ERROR_NOSUBSTRING &&
+ (suboptions & PCRE2_SUBSTITUTE_UNKNOWN_UNSET) != 0)
+ {
+ rc = PCRE2_ERROR_UNSET;
+ }
+ if (rc != PCRE2_ERROR_UNSET) goto PTREXIT; /* Non-unset errors */
+ if (special == 0) /* Plain substitution */
+ {
+ if ((suboptions & PCRE2_SUBSTITUTE_UNSET_EMPTY) != 0) continue;
+ goto PTREXIT; /* Else error */
+ }
+ }
+
+ /* If special is '+' we have a 'set' and possibly an 'unset' text,
+ both of which are reprocessed when used. If special is '-' we have a
+ default text for when the group is unset; it must be reprocessed. */
+
+ if (special != 0)
+ {
+ if (special == CHAR_MINUS)
+ {
+ if (rc == 0) goto LITERAL_SUBSTITUTE;
+ text2_start = text1_start;
+ text2_end = text1_end;
+ }
+
+ if (ptrstackptr >= PTR_STACK_SIZE) goto BAD;
+ ptrstack[ptrstackptr++] = ptr;
+ ptrstack[ptrstackptr++] = repend;
+
+ if (rc == 0)
+ {
+ ptr = text1_start;
+ repend = text1_end;
+ }
+ else
+ {
+ ptr = text2_start;
+ repend = text2_end;
+ }
+ continue;
+ }
+
+ /* Otherwise we have a literal substitution of a group's contents. */
+
+ LITERAL_SUBSTITUTE:
+ subptr = subject + ovector[group*2];
+ subptrend = subject + ovector[group*2 + 1];
+
+ /* Substitute a literal string, possibly forcing alphabetic case. */
+
+ while (subptr < subptrend)
+ {
+ GETCHARINCTEST(ch, subptr);
+ if (forcecase != 0)
+ {
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ uint32_t type = UCD_CHARTYPE(ch);
+ if (PRIV(ucp_gentype)[type] == ucp_L &&
+ type != ((forcecase > 0)? ucp_Lu : ucp_Ll))
+ ch = UCD_OTHERCASE(ch);
+ }
+ else
+#endif
+ {
+ if (((code->tables + cbits_offset +
+ ((forcecase > 0)? cbit_upper:cbit_lower)
+ )[ch/8] & (1 << (ch%8))) == 0)
+ ch = (code->tables + fcc_offset)[ch];
+ }
+ forcecase = forcecasereset;
+ }
+
+#ifdef SUPPORT_UNICODE
+ if (utf) chlen = PRIV(ord2utf)(ch, temp); else
+#endif
+ {
+ temp[0] = ch;
+ chlen = 1;
+ }
+ CHECKMEMCPY(temp, chlen);
+ }
+ }
+ }
+
+ /* Handle an escape sequence in extended mode. We can use check_escape()
+ to process \Q, \E, \c, \o, \x and \ followed by non-alphanumerics, but
+ the case-forcing escapes are not supported in pcre2_compile() so must be
+ recognized here. */
+
+ else if ((suboptions & PCRE2_SUBSTITUTE_EXTENDED) != 0 &&
+ *ptr == CHAR_BACKSLASH)
+ {
+ int errorcode = 0;
+
+ if (ptr < repend - 1) switch (ptr[1])
+ {
+ case CHAR_L:
+ forcecase = forcecasereset = -1;
+ ptr += 2;
+ continue;
+
+ case CHAR_l:
+ forcecase = -1;
+ forcecasereset = 0;
+ ptr += 2;
+ continue;
+
+ case CHAR_U:
+ forcecase = forcecasereset = 1;
+ ptr += 2;
+ continue;
+
+ case CHAR_u:
+ forcecase = 1;
+ forcecasereset = 0;
+ ptr += 2;
+ continue;
+
+ default:
+ break;
+ }
+
+ rc = PRIV(check_escape)(&ptr, repend, &ch, &errorcode,
+ code->overall_options, FALSE, NULL);
+ if (errorcode != 0) goto BADESCAPE;
+ ptr++;
+
+ switch(rc)
+ {
+ case ESC_E:
+ forcecase = forcecasereset = 0;
+ continue;
+
+ case ESC_Q:
+ literal = TRUE;
+ continue;
+
+ case 0: /* Data character */
+ goto LITERAL;
+
+ default:
+ goto BADESCAPE;
+ }
+ }
+
+ /* Handle a literal code unit */
+
+ else
+ {
+ LOADLITERAL:
+ GETCHARINCTEST(ch, ptr); /* Get character value, increment pointer */
+
+ LITERAL:
+ if (forcecase != 0)
+ {
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ uint32_t type = UCD_CHARTYPE(ch);
+ if (PRIV(ucp_gentype)[type] == ucp_L &&
+ type != ((forcecase > 0)? ucp_Lu : ucp_Ll))
+ ch = UCD_OTHERCASE(ch);
+ }
+ else
+#endif
+ {
+ if (((code->tables + cbits_offset +
+ ((forcecase > 0)? cbit_upper:cbit_lower)
+ )[ch/8] & (1 << (ch%8))) == 0)
+ ch = (code->tables + fcc_offset)[ch];
+ }
+ forcecase = forcecasereset;
+ }
+
+#ifdef SUPPORT_UNICODE
+ if (utf) chlen = PRIV(ord2utf)(ch, temp); else
+#endif
+ {
+ temp[0] = ch;
+ chlen = 1;
+ }
+ CHECKMEMCPY(temp, chlen);
+ } /* End handling a literal code unit */
+ } /* End of loop for scanning the replacement. */
+
+ /* The replacement has been copied to the output. Update the start offset to
+ point to the rest of the subject string. If we matched an empty string,
+ do the magic for global matches. */
+
+ start_offset = ovector[1];
+ goptions = (ovector[0] != ovector[1])? 0 :
+ PCRE2_ANCHORED|PCRE2_NOTEMPTY_ATSTART;
+ } while ((suboptions & PCRE2_SUBSTITUTE_GLOBAL) != 0); /* Repeat "do" loop */
+
+/* Copy the rest of the subject. */
+
+fraglength = length - start_offset;
+CHECKMEMCPY(subject + start_offset, fraglength);
+temp[0] = 0;
+CHECKMEMCPY(temp , 1);
+
+/* If overflowed is set it means the PCRE2_SUBSTITUTE_OVERFLOW_LENGTH is set,
+and matching has carried on after a full buffer, in order to compute the length
+needed. Otherwise, an overflow generates an immediate error return. */
+
+if (overflowed)
+ {
+ rc = PCRE2_ERROR_NOMEMORY;
+ *blength = buff_length + extra_needed;
+ }
+
+/* After a successful execution, return the number of substitutions and set the
+length of buffer used, excluding the trailing zero. */
+
+else
+ {
+ rc = subs;
+ *blength = buff_offset - 1;
+ }
+
+EXIT:
+if (match_data_created) pcre2_match_data_free(match_data);
+ else match_data->rc = rc;
+return rc;
+
+NOROOM:
+rc = PCRE2_ERROR_NOMEMORY;
+goto EXIT;
+
+BAD:
+rc = PCRE2_ERROR_BADREPLACEMENT;
+goto PTREXIT;
+
+BADESCAPE:
+rc = PCRE2_ERROR_BADREPESCAPE;
+
+PTREXIT:
+*blength = (PCRE2_SIZE)(ptr - replacement);
+goto EXIT;
+}
+
+/* End of pcre2_substitute.c */
diff --git a/pcre2-10.20/src/pcre2_substring.c b/pcre2-10.21/src/pcre2_substring.c
index eb72ad7d..58b504d5 100644
--- a/pcre2-10.20/src/pcre2_substring.c
+++ b/pcre2-10.21/src/pcre2_substring.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2014 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
diff --git a/pcre2-10.20/src/pcre2_tables.c b/pcre2-10.21/src/pcre2_tables.c
index 17e4537d..b945ed7a 100644
--- a/pcre2-10.20/src/pcre2_tables.c
+++ b/pcre2-10.21/src/pcre2_tables.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2014 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -227,6 +227,8 @@ version. Like all other character and string literals that are compared against
the regular expression pattern, we must use STR_ macros instead of literal
strings to make sure that UTF-8 support works on EBCDIC platforms. */
+#define STRING_Ahom0 STR_A STR_h STR_o STR_m "\0"
+#define STRING_Anatolian_Hieroglyphs0 STR_A STR_n STR_a STR_t STR_o STR_l STR_i STR_a STR_n STR_UNDERSCORE STR_H STR_i STR_e STR_r STR_o STR_g STR_l STR_y STR_p STR_h STR_s "\0"
#define STRING_Any0 STR_A STR_n STR_y "\0"
#define STRING_Arabic0 STR_A STR_r STR_a STR_b STR_i STR_c "\0"
#define STRING_Armenian0 STR_A STR_r STR_m STR_e STR_n STR_i STR_a STR_n "\0"
@@ -274,6 +276,7 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */
#define STRING_Han0 STR_H STR_a STR_n "\0"
#define STRING_Hangul0 STR_H STR_a STR_n STR_g STR_u STR_l "\0"
#define STRING_Hanunoo0 STR_H STR_a STR_n STR_u STR_n STR_o STR_o "\0"
+#define STRING_Hatran0 STR_H STR_a STR_t STR_r STR_a STR_n "\0"
#define STRING_Hebrew0 STR_H STR_e STR_b STR_r STR_e STR_w "\0"
#define STRING_Hiragana0 STR_H STR_i STR_r STR_a STR_g STR_a STR_n STR_a "\0"
#define STRING_Imperial_Aramaic0 STR_I STR_m STR_p STR_e STR_r STR_i STR_a STR_l STR_UNDERSCORE STR_A STR_r STR_a STR_m STR_a STR_i STR_c "\0"
@@ -321,6 +324,7 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */
#define STRING_Modi0 STR_M STR_o STR_d STR_i "\0"
#define STRING_Mongolian0 STR_M STR_o STR_n STR_g STR_o STR_l STR_i STR_a STR_n "\0"
#define STRING_Mro0 STR_M STR_r STR_o "\0"
+#define STRING_Multani0 STR_M STR_u STR_l STR_t STR_a STR_n STR_i "\0"
#define STRING_Myanmar0 STR_M STR_y STR_a STR_n STR_m STR_a STR_r "\0"
#define STRING_N0 STR_N "\0"
#define STRING_Nabataean0 STR_N STR_a STR_b STR_a STR_t STR_a STR_e STR_a STR_n "\0"
@@ -331,6 +335,7 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */
#define STRING_No0 STR_N STR_o "\0"
#define STRING_Ogham0 STR_O STR_g STR_h STR_a STR_m "\0"
#define STRING_Ol_Chiki0 STR_O STR_l STR_UNDERSCORE STR_C STR_h STR_i STR_k STR_i "\0"
+#define STRING_Old_Hungarian0 STR_O STR_l STR_d STR_UNDERSCORE STR_H STR_u STR_n STR_g STR_a STR_r STR_i STR_a STR_n "\0"
#define STRING_Old_Italic0 STR_O STR_l STR_d STR_UNDERSCORE STR_I STR_t STR_a STR_l STR_i STR_c "\0"
#define STRING_Old_North_Arabian0 STR_O STR_l STR_d STR_UNDERSCORE STR_N STR_o STR_r STR_t STR_h STR_UNDERSCORE STR_A STR_r STR_a STR_b STR_i STR_a STR_n "\0"
#define STRING_Old_Permic0 STR_O STR_l STR_d STR_UNDERSCORE STR_P STR_e STR_r STR_m STR_i STR_c "\0"
@@ -362,6 +367,7 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */
#define STRING_Sharada0 STR_S STR_h STR_a STR_r STR_a STR_d STR_a "\0"
#define STRING_Shavian0 STR_S STR_h STR_a STR_v STR_i STR_a STR_n "\0"
#define STRING_Siddham0 STR_S STR_i STR_d STR_d STR_h STR_a STR_m "\0"
+#define STRING_SignWriting0 STR_S STR_i STR_g STR_n STR_W STR_r STR_i STR_t STR_i STR_n STR_g "\0"
#define STRING_Sinhala0 STR_S STR_i STR_n STR_h STR_a STR_l STR_a "\0"
#define STRING_Sk0 STR_S STR_k "\0"
#define STRING_Sm0 STR_S STR_m "\0"
@@ -398,6 +404,8 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */
#define STRING_Zs0 STR_Z STR_s "\0"
const char PRIV(utt_names)[] =
+ STRING_Ahom0
+ STRING_Anatolian_Hieroglyphs0
STRING_Any0
STRING_Arabic0
STRING_Armenian0
@@ -445,6 +453,7 @@ const char PRIV(utt_names)[] =
STRING_Han0
STRING_Hangul0
STRING_Hanunoo0
+ STRING_Hatran0
STRING_Hebrew0
STRING_Hiragana0
STRING_Imperial_Aramaic0
@@ -492,6 +501,7 @@ const char PRIV(utt_names)[] =
STRING_Modi0
STRING_Mongolian0
STRING_Mro0
+ STRING_Multani0
STRING_Myanmar0
STRING_N0
STRING_Nabataean0
@@ -502,6 +512,7 @@ const char PRIV(utt_names)[] =
STRING_No0
STRING_Ogham0
STRING_Ol_Chiki0
+ STRING_Old_Hungarian0
STRING_Old_Italic0
STRING_Old_North_Arabian0
STRING_Old_Permic0
@@ -533,6 +544,7 @@ const char PRIV(utt_names)[] =
STRING_Sharada0
STRING_Shavian0
STRING_Siddham0
+ STRING_SignWriting0
STRING_Sinhala0
STRING_Sk0
STRING_Sm0
@@ -569,175 +581,181 @@ const char PRIV(utt_names)[] =
STRING_Zs0;
const ucp_type_table PRIV(utt)[] = {
- { 0, PT_ANY, 0 },
- { 4, PT_SC, ucp_Arabic },
- { 11, PT_SC, ucp_Armenian },
- { 20, PT_SC, ucp_Avestan },
- { 28, PT_SC, ucp_Balinese },
- { 37, PT_SC, ucp_Bamum },
- { 43, PT_SC, ucp_Bassa_Vah },
- { 53, PT_SC, ucp_Batak },
- { 59, PT_SC, ucp_Bengali },
- { 67, PT_SC, ucp_Bopomofo },
- { 76, PT_SC, ucp_Brahmi },
- { 83, PT_SC, ucp_Braille },
- { 91, PT_SC, ucp_Buginese },
- { 100, PT_SC, ucp_Buhid },
- { 106, PT_GC, ucp_C },
- { 108, PT_SC, ucp_Canadian_Aboriginal },
- { 128, PT_SC, ucp_Carian },
- { 135, PT_SC, ucp_Caucasian_Albanian },
- { 154, PT_PC, ucp_Cc },
- { 157, PT_PC, ucp_Cf },
- { 160, PT_SC, ucp_Chakma },
- { 167, PT_SC, ucp_Cham },
- { 172, PT_SC, ucp_Cherokee },
- { 181, PT_PC, ucp_Cn },
- { 184, PT_PC, ucp_Co },
- { 187, PT_SC, ucp_Common },
- { 194, PT_SC, ucp_Coptic },
- { 201, PT_PC, ucp_Cs },
- { 204, PT_SC, ucp_Cuneiform },
- { 214, PT_SC, ucp_Cypriot },
- { 222, PT_SC, ucp_Cyrillic },
- { 231, PT_SC, ucp_Deseret },
- { 239, PT_SC, ucp_Devanagari },
- { 250, PT_SC, ucp_Duployan },
- { 259, PT_SC, ucp_Egyptian_Hieroglyphs },
- { 280, PT_SC, ucp_Elbasan },
- { 288, PT_SC, ucp_Ethiopic },
- { 297, PT_SC, ucp_Georgian },
- { 306, PT_SC, ucp_Glagolitic },
- { 317, PT_SC, ucp_Gothic },
- { 324, PT_SC, ucp_Grantha },
- { 332, PT_SC, ucp_Greek },
- { 338, PT_SC, ucp_Gujarati },
- { 347, PT_SC, ucp_Gurmukhi },
- { 356, PT_SC, ucp_Han },
- { 360, PT_SC, ucp_Hangul },
- { 367, PT_SC, ucp_Hanunoo },
- { 375, PT_SC, ucp_Hebrew },
- { 382, PT_SC, ucp_Hiragana },
- { 391, PT_SC, ucp_Imperial_Aramaic },
- { 408, PT_SC, ucp_Inherited },
- { 418, PT_SC, ucp_Inscriptional_Pahlavi },
- { 440, PT_SC, ucp_Inscriptional_Parthian },
- { 463, PT_SC, ucp_Javanese },
- { 472, PT_SC, ucp_Kaithi },
- { 479, PT_SC, ucp_Kannada },
- { 487, PT_SC, ucp_Katakana },
- { 496, PT_SC, ucp_Kayah_Li },
- { 505, PT_SC, ucp_Kharoshthi },
- { 516, PT_SC, ucp_Khmer },
- { 522, PT_SC, ucp_Khojki },
- { 529, PT_SC, ucp_Khudawadi },
- { 539, PT_GC, ucp_L },
- { 541, PT_LAMP, 0 },
- { 544, PT_SC, ucp_Lao },
- { 548, PT_SC, ucp_Latin },
- { 554, PT_SC, ucp_Lepcha },
- { 561, PT_SC, ucp_Limbu },
- { 567, PT_SC, ucp_Linear_A },
- { 576, PT_SC, ucp_Linear_B },
- { 585, PT_SC, ucp_Lisu },
- { 590, PT_PC, ucp_Ll },
- { 593, PT_PC, ucp_Lm },
- { 596, PT_PC, ucp_Lo },
- { 599, PT_PC, ucp_Lt },
- { 602, PT_PC, ucp_Lu },
- { 605, PT_SC, ucp_Lycian },
- { 612, PT_SC, ucp_Lydian },
- { 619, PT_GC, ucp_M },
- { 621, PT_SC, ucp_Mahajani },
- { 630, PT_SC, ucp_Malayalam },
- { 640, PT_SC, ucp_Mandaic },
- { 648, PT_SC, ucp_Manichaean },
- { 659, PT_PC, ucp_Mc },
- { 662, PT_PC, ucp_Me },
- { 665, PT_SC, ucp_Meetei_Mayek },
- { 678, PT_SC, ucp_Mende_Kikakui },
- { 692, PT_SC, ucp_Meroitic_Cursive },
- { 709, PT_SC, ucp_Meroitic_Hieroglyphs },
- { 730, PT_SC, ucp_Miao },
- { 735, PT_PC, ucp_Mn },
- { 738, PT_SC, ucp_Modi },
- { 743, PT_SC, ucp_Mongolian },
- { 753, PT_SC, ucp_Mro },
- { 757, PT_SC, ucp_Myanmar },
- { 765, PT_GC, ucp_N },
- { 767, PT_SC, ucp_Nabataean },
- { 777, PT_PC, ucp_Nd },
- { 780, PT_SC, ucp_New_Tai_Lue },
- { 792, PT_SC, ucp_Nko },
- { 796, PT_PC, ucp_Nl },
- { 799, PT_PC, ucp_No },
- { 802, PT_SC, ucp_Ogham },
- { 808, PT_SC, ucp_Ol_Chiki },
- { 817, PT_SC, ucp_Old_Italic },
- { 828, PT_SC, ucp_Old_North_Arabian },
- { 846, PT_SC, ucp_Old_Permic },
- { 857, PT_SC, ucp_Old_Persian },
- { 869, PT_SC, ucp_Old_South_Arabian },
- { 887, PT_SC, ucp_Old_Turkic },
- { 898, PT_SC, ucp_Oriya },
- { 904, PT_SC, ucp_Osmanya },
- { 912, PT_GC, ucp_P },
- { 914, PT_SC, ucp_Pahawh_Hmong },
- { 927, PT_SC, ucp_Palmyrene },
- { 937, PT_SC, ucp_Pau_Cin_Hau },
- { 949, PT_PC, ucp_Pc },
- { 952, PT_PC, ucp_Pd },
- { 955, PT_PC, ucp_Pe },
- { 958, PT_PC, ucp_Pf },
- { 961, PT_SC, ucp_Phags_Pa },
- { 970, PT_SC, ucp_Phoenician },
- { 981, PT_PC, ucp_Pi },
- { 984, PT_PC, ucp_Po },
- { 987, PT_PC, ucp_Ps },
- { 990, PT_SC, ucp_Psalter_Pahlavi },
- { 1006, PT_SC, ucp_Rejang },
- { 1013, PT_SC, ucp_Runic },
- { 1019, PT_GC, ucp_S },
- { 1021, PT_SC, ucp_Samaritan },
- { 1031, PT_SC, ucp_Saurashtra },
- { 1042, PT_PC, ucp_Sc },
- { 1045, PT_SC, ucp_Sharada },
- { 1053, PT_SC, ucp_Shavian },
- { 1061, PT_SC, ucp_Siddham },
- { 1069, PT_SC, ucp_Sinhala },
- { 1077, PT_PC, ucp_Sk },
- { 1080, PT_PC, ucp_Sm },
- { 1083, PT_PC, ucp_So },
- { 1086, PT_SC, ucp_Sora_Sompeng },
- { 1099, PT_SC, ucp_Sundanese },
- { 1109, PT_SC, ucp_Syloti_Nagri },
- { 1122, PT_SC, ucp_Syriac },
- { 1129, PT_SC, ucp_Tagalog },
- { 1137, PT_SC, ucp_Tagbanwa },
- { 1146, PT_SC, ucp_Tai_Le },
- { 1153, PT_SC, ucp_Tai_Tham },
- { 1162, PT_SC, ucp_Tai_Viet },
- { 1171, PT_SC, ucp_Takri },
- { 1177, PT_SC, ucp_Tamil },
- { 1183, PT_SC, ucp_Telugu },
- { 1190, PT_SC, ucp_Thaana },
- { 1197, PT_SC, ucp_Thai },
- { 1202, PT_SC, ucp_Tibetan },
- { 1210, PT_SC, ucp_Tifinagh },
- { 1219, PT_SC, ucp_Tirhuta },
- { 1227, PT_SC, ucp_Ugaritic },
- { 1236, PT_SC, ucp_Vai },
- { 1240, PT_SC, ucp_Warang_Citi },
- { 1252, PT_ALNUM, 0 },
- { 1256, PT_PXSPACE, 0 },
- { 1260, PT_SPACE, 0 },
- { 1264, PT_UCNC, 0 },
- { 1268, PT_WORD, 0 },
- { 1272, PT_SC, ucp_Yi },
- { 1275, PT_GC, ucp_Z },
- { 1277, PT_PC, ucp_Zl },
- { 1280, PT_PC, ucp_Zp },
- { 1283, PT_PC, ucp_Zs }
+ { 0, PT_SC, ucp_Ahom },
+ { 5, PT_SC, ucp_Anatolian_Hieroglyphs },
+ { 27, PT_ANY, 0 },
+ { 31, PT_SC, ucp_Arabic },
+ { 38, PT_SC, ucp_Armenian },
+ { 47, PT_SC, ucp_Avestan },
+ { 55, PT_SC, ucp_Balinese },
+ { 64, PT_SC, ucp_Bamum },
+ { 70, PT_SC, ucp_Bassa_Vah },
+ { 80, PT_SC, ucp_Batak },
+ { 86, PT_SC, ucp_Bengali },
+ { 94, PT_SC, ucp_Bopomofo },
+ { 103, PT_SC, ucp_Brahmi },
+ { 110, PT_SC, ucp_Braille },
+ { 118, PT_SC, ucp_Buginese },
+ { 127, PT_SC, ucp_Buhid },
+ { 133, PT_GC, ucp_C },
+ { 135, PT_SC, ucp_Canadian_Aboriginal },
+ { 155, PT_SC, ucp_Carian },
+ { 162, PT_SC, ucp_Caucasian_Albanian },
+ { 181, PT_PC, ucp_Cc },
+ { 184, PT_PC, ucp_Cf },
+ { 187, PT_SC, ucp_Chakma },
+ { 194, PT_SC, ucp_Cham },
+ { 199, PT_SC, ucp_Cherokee },
+ { 208, PT_PC, ucp_Cn },
+ { 211, PT_PC, ucp_Co },
+ { 214, PT_SC, ucp_Common },
+ { 221, PT_SC, ucp_Coptic },
+ { 228, PT_PC, ucp_Cs },
+ { 231, PT_SC, ucp_Cuneiform },
+ { 241, PT_SC, ucp_Cypriot },
+ { 249, PT_SC, ucp_Cyrillic },
+ { 258, PT_SC, ucp_Deseret },
+ { 266, PT_SC, ucp_Devanagari },
+ { 277, PT_SC, ucp_Duployan },
+ { 286, PT_SC, ucp_Egyptian_Hieroglyphs },
+ { 307, PT_SC, ucp_Elbasan },
+ { 315, PT_SC, ucp_Ethiopic },
+ { 324, PT_SC, ucp_Georgian },
+ { 333, PT_SC, ucp_Glagolitic },
+ { 344, PT_SC, ucp_Gothic },
+ { 351, PT_SC, ucp_Grantha },
+ { 359, PT_SC, ucp_Greek },
+ { 365, PT_SC, ucp_Gujarati },
+ { 374, PT_SC, ucp_Gurmukhi },
+ { 383, PT_SC, ucp_Han },
+ { 387, PT_SC, ucp_Hangul },
+ { 394, PT_SC, ucp_Hanunoo },
+ { 402, PT_SC, ucp_Hatran },
+ { 409, PT_SC, ucp_Hebrew },
+ { 416, PT_SC, ucp_Hiragana },
+ { 425, PT_SC, ucp_Imperial_Aramaic },
+ { 442, PT_SC, ucp_Inherited },
+ { 452, PT_SC, ucp_Inscriptional_Pahlavi },
+ { 474, PT_SC, ucp_Inscriptional_Parthian },
+ { 497, PT_SC, ucp_Javanese },
+ { 506, PT_SC, ucp_Kaithi },
+ { 513, PT_SC, ucp_Kannada },
+ { 521, PT_SC, ucp_Katakana },
+ { 530, PT_SC, ucp_Kayah_Li },
+ { 539, PT_SC, ucp_Kharoshthi },
+ { 550, PT_SC, ucp_Khmer },
+ { 556, PT_SC, ucp_Khojki },
+ { 563, PT_SC, ucp_Khudawadi },
+ { 573, PT_GC, ucp_L },
+ { 575, PT_LAMP, 0 },
+ { 578, PT_SC, ucp_Lao },
+ { 582, PT_SC, ucp_Latin },
+ { 588, PT_SC, ucp_Lepcha },
+ { 595, PT_SC, ucp_Limbu },
+ { 601, PT_SC, ucp_Linear_A },
+ { 610, PT_SC, ucp_Linear_B },
+ { 619, PT_SC, ucp_Lisu },
+ { 624, PT_PC, ucp_Ll },
+ { 627, PT_PC, ucp_Lm },
+ { 630, PT_PC, ucp_Lo },
+ { 633, PT_PC, ucp_Lt },
+ { 636, PT_PC, ucp_Lu },
+ { 639, PT_SC, ucp_Lycian },
+ { 646, PT_SC, ucp_Lydian },
+ { 653, PT_GC, ucp_M },
+ { 655, PT_SC, ucp_Mahajani },
+ { 664, PT_SC, ucp_Malayalam },
+ { 674, PT_SC, ucp_Mandaic },
+ { 682, PT_SC, ucp_Manichaean },
+ { 693, PT_PC, ucp_Mc },
+ { 696, PT_PC, ucp_Me },
+ { 699, PT_SC, ucp_Meetei_Mayek },
+ { 712, PT_SC, ucp_Mende_Kikakui },
+ { 726, PT_SC, ucp_Meroitic_Cursive },
+ { 743, PT_SC, ucp_Meroitic_Hieroglyphs },
+ { 764, PT_SC, ucp_Miao },
+ { 769, PT_PC, ucp_Mn },
+ { 772, PT_SC, ucp_Modi },
+ { 777, PT_SC, ucp_Mongolian },
+ { 787, PT_SC, ucp_Mro },
+ { 791, PT_SC, ucp_Multani },
+ { 799, PT_SC, ucp_Myanmar },
+ { 807, PT_GC, ucp_N },
+ { 809, PT_SC, ucp_Nabataean },
+ { 819, PT_PC, ucp_Nd },
+ { 822, PT_SC, ucp_New_Tai_Lue },
+ { 834, PT_SC, ucp_Nko },
+ { 838, PT_PC, ucp_Nl },
+ { 841, PT_PC, ucp_No },
+ { 844, PT_SC, ucp_Ogham },
+ { 850, PT_SC, ucp_Ol_Chiki },
+ { 859, PT_SC, ucp_Old_Hungarian },
+ { 873, PT_SC, ucp_Old_Italic },
+ { 884, PT_SC, ucp_Old_North_Arabian },
+ { 902, PT_SC, ucp_Old_Permic },
+ { 913, PT_SC, ucp_Old_Persian },
+ { 925, PT_SC, ucp_Old_South_Arabian },
+ { 943, PT_SC, ucp_Old_Turkic },
+ { 954, PT_SC, ucp_Oriya },
+ { 960, PT_SC, ucp_Osmanya },
+ { 968, PT_GC, ucp_P },
+ { 970, PT_SC, ucp_Pahawh_Hmong },
+ { 983, PT_SC, ucp_Palmyrene },
+ { 993, PT_SC, ucp_Pau_Cin_Hau },
+ { 1005, PT_PC, ucp_Pc },
+ { 1008, PT_PC, ucp_Pd },
+ { 1011, PT_PC, ucp_Pe },
+ { 1014, PT_PC, ucp_Pf },
+ { 1017, PT_SC, ucp_Phags_Pa },
+ { 1026, PT_SC, ucp_Phoenician },
+ { 1037, PT_PC, ucp_Pi },
+ { 1040, PT_PC, ucp_Po },
+ { 1043, PT_PC, ucp_Ps },
+ { 1046, PT_SC, ucp_Psalter_Pahlavi },
+ { 1062, PT_SC, ucp_Rejang },
+ { 1069, PT_SC, ucp_Runic },
+ { 1075, PT_GC, ucp_S },
+ { 1077, PT_SC, ucp_Samaritan },
+ { 1087, PT_SC, ucp_Saurashtra },
+ { 1098, PT_PC, ucp_Sc },
+ { 1101, PT_SC, ucp_Sharada },
+ { 1109, PT_SC, ucp_Shavian },
+ { 1117, PT_SC, ucp_Siddham },
+ { 1125, PT_SC, ucp_SignWriting },
+ { 1137, PT_SC, ucp_Sinhala },
+ { 1145, PT_PC, ucp_Sk },
+ { 1148, PT_PC, ucp_Sm },
+ { 1151, PT_PC, ucp_So },
+ { 1154, PT_SC, ucp_Sora_Sompeng },
+ { 1167, PT_SC, ucp_Sundanese },
+ { 1177, PT_SC, ucp_Syloti_Nagri },
+ { 1190, PT_SC, ucp_Syriac },
+ { 1197, PT_SC, ucp_Tagalog },
+ { 1205, PT_SC, ucp_Tagbanwa },
+ { 1214, PT_SC, ucp_Tai_Le },
+ { 1221, PT_SC, ucp_Tai_Tham },
+ { 1230, PT_SC, ucp_Tai_Viet },
+ { 1239, PT_SC, ucp_Takri },
+ { 1245, PT_SC, ucp_Tamil },
+ { 1251, PT_SC, ucp_Telugu },
+ { 1258, PT_SC, ucp_Thaana },
+ { 1265, PT_SC, ucp_Thai },
+ { 1270, PT_SC, ucp_Tibetan },
+ { 1278, PT_SC, ucp_Tifinagh },
+ { 1287, PT_SC, ucp_Tirhuta },
+ { 1295, PT_SC, ucp_Ugaritic },
+ { 1304, PT_SC, ucp_Vai },
+ { 1308, PT_SC, ucp_Warang_Citi },
+ { 1320, PT_ALNUM, 0 },
+ { 1324, PT_PXSPACE, 0 },
+ { 1328, PT_SPACE, 0 },
+ { 1332, PT_UCNC, 0 },
+ { 1336, PT_WORD, 0 },
+ { 1340, PT_SC, ucp_Yi },
+ { 1343, PT_GC, ucp_Z },
+ { 1345, PT_PC, ucp_Zl },
+ { 1348, PT_PC, ucp_Zp },
+ { 1351, PT_PC, ucp_Zs }
};
const size_t PRIV(utt_size) = sizeof(PRIV(utt)) / sizeof(ucp_type_table);
diff --git a/pcre2-10.20/src/pcre2_ucd.c b/pcre2-10.21/src/pcre2_ucd.c
index 7199cbda..116f537b 100644
--- a/pcre2-10.20/src/pcre2_ucd.c
+++ b/pcre2-10.21/src/pcre2_ucd.c
@@ -20,7 +20,7 @@ needed. */
/* Unicode character database. */
/* This file was autogenerated by the MultiStage2.py script. */
-/* Total size: 72576 bytes, block size: 128. */
+/* Total size: 75072 bytes, block size: 128. */
/* The tables herein are needed only when UCP support is built,
and in PCRE2 that happens automatically with UTF support.
@@ -39,7 +39,7 @@ const uint16_t PRIV(ucd_stage2)[] = {0};
const uint32_t PRIV(ucd_caseless_sets)[] = {0};
#else
-const char *PRIV(unicode_version) = "7.0.0";
+const char *PRIV(unicode_version) = "8.0.0";
/* When recompiling tables with a new Unicode version, please check the
types in this structure definition from pcre2_internal.h (the actual
@@ -82,7 +82,7 @@ const uint32_t PRIV(ucd_caseless_sets)[] = {
#ifndef PCRE2_PCRE2TEST
-const ucd_record PRIV(ucd_records)[] = { /* 5760 bytes, record size 8 */
+const ucd_record PRIV(ucd_records)[] = { /* 5952 bytes, record size 8 */
{ 9, 0, 2, 0, 0, }, /* 0 */
{ 9, 0, 1, 0, 0, }, /* 1 */
{ 9, 0, 0, 0, 0, }, /* 2 */
@@ -188,621 +188,645 @@ const ucd_record PRIV(ucd_records)[] = { /* 5760 bytes, record size 8 */
{ 33, 5, 12, 0, -217, }, /* 102 */
{ 33, 5, 12, 0, -71, }, /* 103 */
{ 33, 5, 12, 0, -219, }, /* 104 */
- { 33, 5, 12, 0, 42258, }, /* 105 */
- { 33, 6, 12, 0, 0, }, /* 106 */
- { 9, 6, 12, 0, 0, }, /* 107 */
- { 3, 24, 12, 0, 0, }, /* 108 */
- { 27, 12, 3, 0, 0, }, /* 109 */
- { 27, 12, 3, 21, 116, }, /* 110 */
- { 19, 9, 12, 0, 1, }, /* 111 */
- { 19, 5, 12, 0, -1, }, /* 112 */
- { 19, 24, 12, 0, 0, }, /* 113 */
- { 9, 2, 12, 0, 0, }, /* 114 */
- { 19, 6, 12, 0, 0, }, /* 115 */
- { 19, 5, 12, 0, 130, }, /* 116 */
- { 19, 9, 12, 0, 116, }, /* 117 */
- { 19, 9, 12, 0, 38, }, /* 118 */
- { 19, 9, 12, 0, 37, }, /* 119 */
- { 19, 9, 12, 0, 64, }, /* 120 */
- { 19, 9, 12, 0, 63, }, /* 121 */
- { 19, 5, 12, 0, 0, }, /* 122 */
- { 19, 9, 12, 0, 32, }, /* 123 */
- { 19, 9, 12, 34, 32, }, /* 124 */
- { 19, 9, 12, 59, 32, }, /* 125 */
- { 19, 9, 12, 38, 32, }, /* 126 */
- { 19, 9, 12, 21, 32, }, /* 127 */
- { 19, 9, 12, 51, 32, }, /* 128 */
- { 19, 9, 12, 26, 32, }, /* 129 */
- { 19, 9, 12, 47, 32, }, /* 130 */
- { 19, 9, 12, 55, 32, }, /* 131 */
- { 19, 9, 12, 30, 32, }, /* 132 */
- { 19, 9, 12, 43, 32, }, /* 133 */
- { 19, 9, 12, 67, 32, }, /* 134 */
- { 19, 5, 12, 0, -38, }, /* 135 */
- { 19, 5, 12, 0, -37, }, /* 136 */
- { 19, 5, 12, 0, -32, }, /* 137 */
- { 19, 5, 12, 34, -32, }, /* 138 */
- { 19, 5, 12, 59, -32, }, /* 139 */
- { 19, 5, 12, 38, -32, }, /* 140 */
- { 19, 5, 12, 21, -116, }, /* 141 */
- { 19, 5, 12, 51, -32, }, /* 142 */
- { 19, 5, 12, 26, -775, }, /* 143 */
- { 19, 5, 12, 47, -32, }, /* 144 */
- { 19, 5, 12, 55, -32, }, /* 145 */
- { 19, 5, 12, 30, 1, }, /* 146 */
- { 19, 5, 12, 30, -32, }, /* 147 */
- { 19, 5, 12, 43, -32, }, /* 148 */
- { 19, 5, 12, 67, -32, }, /* 149 */
- { 19, 5, 12, 0, -64, }, /* 150 */
- { 19, 5, 12, 0, -63, }, /* 151 */
- { 19, 9, 12, 0, 8, }, /* 152 */
- { 19, 5, 12, 34, -30, }, /* 153 */
- { 19, 5, 12, 38, -25, }, /* 154 */
- { 19, 9, 12, 0, 0, }, /* 155 */
- { 19, 5, 12, 43, -15, }, /* 156 */
- { 19, 5, 12, 47, -22, }, /* 157 */
- { 19, 5, 12, 0, -8, }, /* 158 */
- { 10, 9, 12, 0, 1, }, /* 159 */
- { 10, 5, 12, 0, -1, }, /* 160 */
- { 19, 5, 12, 51, -54, }, /* 161 */
- { 19, 5, 12, 55, -48, }, /* 162 */
- { 19, 5, 12, 0, 7, }, /* 163 */
- { 19, 5, 12, 0, -116, }, /* 164 */
- { 19, 9, 12, 38, -60, }, /* 165 */
- { 19, 5, 12, 59, -64, }, /* 166 */
- { 19, 25, 12, 0, 0, }, /* 167 */
- { 19, 9, 12, 0, -7, }, /* 168 */
- { 19, 9, 12, 0, -130, }, /* 169 */
- { 12, 9, 12, 0, 80, }, /* 170 */
- { 12, 9, 12, 0, 32, }, /* 171 */
- { 12, 5, 12, 0, -32, }, /* 172 */
- { 12, 5, 12, 0, -80, }, /* 173 */
- { 12, 9, 12, 0, 1, }, /* 174 */
- { 12, 5, 12, 0, -1, }, /* 175 */
- { 12, 26, 12, 0, 0, }, /* 176 */
- { 12, 12, 3, 0, 0, }, /* 177 */
- { 12, 11, 3, 0, 0, }, /* 178 */
- { 12, 9, 12, 0, 15, }, /* 179 */
- { 12, 5, 12, 0, -15, }, /* 180 */
- { 1, 9, 12, 0, 48, }, /* 181 */
- { 1, 6, 12, 0, 0, }, /* 182 */
- { 1, 21, 12, 0, 0, }, /* 183 */
- { 1, 5, 12, 0, -48, }, /* 184 */
- { 1, 5, 12, 0, 0, }, /* 185 */
- { 1, 17, 12, 0, 0, }, /* 186 */
- { 1, 26, 12, 0, 0, }, /* 187 */
- { 1, 23, 12, 0, 0, }, /* 188 */
- { 25, 12, 3, 0, 0, }, /* 189 */
- { 25, 17, 12, 0, 0, }, /* 190 */
- { 25, 21, 12, 0, 0, }, /* 191 */
- { 25, 7, 12, 0, 0, }, /* 192 */
- { 0, 1, 2, 0, 0, }, /* 193 */
- { 0, 25, 12, 0, 0, }, /* 194 */
- { 0, 21, 12, 0, 0, }, /* 195 */
- { 0, 23, 12, 0, 0, }, /* 196 */
- { 0, 26, 12, 0, 0, }, /* 197 */
- { 0, 12, 3, 0, 0, }, /* 198 */
- { 0, 7, 12, 0, 0, }, /* 199 */
- { 0, 6, 12, 0, 0, }, /* 200 */
+ { 33, 5, 12, 0, 42261, }, /* 105 */
+ { 33, 5, 12, 0, 42258, }, /* 106 */
+ { 33, 6, 12, 0, 0, }, /* 107 */
+ { 9, 6, 12, 0, 0, }, /* 108 */
+ { 3, 24, 12, 0, 0, }, /* 109 */
+ { 27, 12, 3, 0, 0, }, /* 110 */
+ { 27, 12, 3, 21, 116, }, /* 111 */
+ { 19, 9, 12, 0, 1, }, /* 112 */
+ { 19, 5, 12, 0, -1, }, /* 113 */
+ { 19, 24, 12, 0, 0, }, /* 114 */
+ { 9, 2, 12, 0, 0, }, /* 115 */
+ { 19, 6, 12, 0, 0, }, /* 116 */
+ { 19, 5, 12, 0, 130, }, /* 117 */
+ { 19, 9, 12, 0, 116, }, /* 118 */
+ { 19, 9, 12, 0, 38, }, /* 119 */
+ { 19, 9, 12, 0, 37, }, /* 120 */
+ { 19, 9, 12, 0, 64, }, /* 121 */
+ { 19, 9, 12, 0, 63, }, /* 122 */
+ { 19, 5, 12, 0, 0, }, /* 123 */
+ { 19, 9, 12, 0, 32, }, /* 124 */
+ { 19, 9, 12, 34, 32, }, /* 125 */
+ { 19, 9, 12, 59, 32, }, /* 126 */
+ { 19, 9, 12, 38, 32, }, /* 127 */
+ { 19, 9, 12, 21, 32, }, /* 128 */
+ { 19, 9, 12, 51, 32, }, /* 129 */
+ { 19, 9, 12, 26, 32, }, /* 130 */
+ { 19, 9, 12, 47, 32, }, /* 131 */
+ { 19, 9, 12, 55, 32, }, /* 132 */
+ { 19, 9, 12, 30, 32, }, /* 133 */
+ { 19, 9, 12, 43, 32, }, /* 134 */
+ { 19, 9, 12, 67, 32, }, /* 135 */
+ { 19, 5, 12, 0, -38, }, /* 136 */
+ { 19, 5, 12, 0, -37, }, /* 137 */
+ { 19, 5, 12, 0, -32, }, /* 138 */
+ { 19, 5, 12, 34, -32, }, /* 139 */
+ { 19, 5, 12, 59, -32, }, /* 140 */
+ { 19, 5, 12, 38, -32, }, /* 141 */
+ { 19, 5, 12, 21, -116, }, /* 142 */
+ { 19, 5, 12, 51, -32, }, /* 143 */
+ { 19, 5, 12, 26, -775, }, /* 144 */
+ { 19, 5, 12, 47, -32, }, /* 145 */
+ { 19, 5, 12, 55, -32, }, /* 146 */
+ { 19, 5, 12, 30, 1, }, /* 147 */
+ { 19, 5, 12, 30, -32, }, /* 148 */
+ { 19, 5, 12, 43, -32, }, /* 149 */
+ { 19, 5, 12, 67, -32, }, /* 150 */
+ { 19, 5, 12, 0, -64, }, /* 151 */
+ { 19, 5, 12, 0, -63, }, /* 152 */
+ { 19, 9, 12, 0, 8, }, /* 153 */
+ { 19, 5, 12, 34, -30, }, /* 154 */
+ { 19, 5, 12, 38, -25, }, /* 155 */
+ { 19, 9, 12, 0, 0, }, /* 156 */
+ { 19, 5, 12, 43, -15, }, /* 157 */
+ { 19, 5, 12, 47, -22, }, /* 158 */
+ { 19, 5, 12, 0, -8, }, /* 159 */
+ { 10, 9, 12, 0, 1, }, /* 160 */
+ { 10, 5, 12, 0, -1, }, /* 161 */
+ { 19, 5, 12, 51, -54, }, /* 162 */
+ { 19, 5, 12, 55, -48, }, /* 163 */
+ { 19, 5, 12, 0, 7, }, /* 164 */
+ { 19, 5, 12, 0, -116, }, /* 165 */
+ { 19, 9, 12, 38, -60, }, /* 166 */
+ { 19, 5, 12, 59, -64, }, /* 167 */
+ { 19, 25, 12, 0, 0, }, /* 168 */
+ { 19, 9, 12, 0, -7, }, /* 169 */
+ { 19, 9, 12, 0, -130, }, /* 170 */
+ { 12, 9, 12, 0, 80, }, /* 171 */
+ { 12, 9, 12, 0, 32, }, /* 172 */
+ { 12, 5, 12, 0, -32, }, /* 173 */
+ { 12, 5, 12, 0, -80, }, /* 174 */
+ { 12, 9, 12, 0, 1, }, /* 175 */
+ { 12, 5, 12, 0, -1, }, /* 176 */
+ { 12, 26, 12, 0, 0, }, /* 177 */
+ { 12, 12, 3, 0, 0, }, /* 178 */
+ { 12, 11, 3, 0, 0, }, /* 179 */
+ { 12, 9, 12, 0, 15, }, /* 180 */
+ { 12, 5, 12, 0, -15, }, /* 181 */
+ { 1, 9, 12, 0, 48, }, /* 182 */
+ { 1, 6, 12, 0, 0, }, /* 183 */
+ { 1, 21, 12, 0, 0, }, /* 184 */
+ { 1, 5, 12, 0, -48, }, /* 185 */
+ { 1, 5, 12, 0, 0, }, /* 186 */
+ { 1, 17, 12, 0, 0, }, /* 187 */
+ { 1, 26, 12, 0, 0, }, /* 188 */
+ { 1, 23, 12, 0, 0, }, /* 189 */
+ { 25, 12, 3, 0, 0, }, /* 190 */
+ { 25, 17, 12, 0, 0, }, /* 191 */
+ { 25, 21, 12, 0, 0, }, /* 192 */
+ { 25, 7, 12, 0, 0, }, /* 193 */
+ { 0, 1, 2, 0, 0, }, /* 194 */
+ { 0, 25, 12, 0, 0, }, /* 195 */
+ { 0, 21, 12, 0, 0, }, /* 196 */
+ { 0, 23, 12, 0, 0, }, /* 197 */
+ { 0, 26, 12, 0, 0, }, /* 198 */
+ { 0, 12, 3, 0, 0, }, /* 199 */
+ { 0, 7, 12, 0, 0, }, /* 200 */
{ 0, 13, 12, 0, 0, }, /* 201 */
- { 49, 21, 12, 0, 0, }, /* 202 */
- { 49, 1, 2, 0, 0, }, /* 203 */
- { 49, 7, 12, 0, 0, }, /* 204 */
- { 49, 12, 3, 0, 0, }, /* 205 */
- { 55, 7, 12, 0, 0, }, /* 206 */
- { 55, 12, 3, 0, 0, }, /* 207 */
- { 63, 13, 12, 0, 0, }, /* 208 */
- { 63, 7, 12, 0, 0, }, /* 209 */
- { 63, 12, 3, 0, 0, }, /* 210 */
- { 63, 6, 12, 0, 0, }, /* 211 */
- { 63, 26, 12, 0, 0, }, /* 212 */
- { 63, 21, 12, 0, 0, }, /* 213 */
- { 89, 7, 12, 0, 0, }, /* 214 */
- { 89, 12, 3, 0, 0, }, /* 215 */
- { 89, 6, 12, 0, 0, }, /* 216 */
- { 89, 21, 12, 0, 0, }, /* 217 */
- { 94, 7, 12, 0, 0, }, /* 218 */
- { 94, 12, 3, 0, 0, }, /* 219 */
- { 94, 21, 12, 0, 0, }, /* 220 */
- { 14, 12, 3, 0, 0, }, /* 221 */
- { 14, 10, 5, 0, 0, }, /* 222 */
- { 14, 7, 12, 0, 0, }, /* 223 */
- { 14, 13, 12, 0, 0, }, /* 224 */
- { 14, 21, 12, 0, 0, }, /* 225 */
- { 14, 6, 12, 0, 0, }, /* 226 */
- { 2, 7, 12, 0, 0, }, /* 227 */
- { 2, 12, 3, 0, 0, }, /* 228 */
- { 2, 10, 5, 0, 0, }, /* 229 */
- { 2, 10, 3, 0, 0, }, /* 230 */
- { 2, 13, 12, 0, 0, }, /* 231 */
- { 2, 23, 12, 0, 0, }, /* 232 */
- { 2, 15, 12, 0, 0, }, /* 233 */
- { 2, 26, 12, 0, 0, }, /* 234 */
- { 21, 12, 3, 0, 0, }, /* 235 */
- { 21, 10, 5, 0, 0, }, /* 236 */
- { 21, 7, 12, 0, 0, }, /* 237 */
- { 21, 13, 12, 0, 0, }, /* 238 */
- { 20, 12, 3, 0, 0, }, /* 239 */
- { 20, 10, 5, 0, 0, }, /* 240 */
- { 20, 7, 12, 0, 0, }, /* 241 */
- { 20, 13, 12, 0, 0, }, /* 242 */
- { 20, 21, 12, 0, 0, }, /* 243 */
- { 20, 23, 12, 0, 0, }, /* 244 */
- { 43, 12, 3, 0, 0, }, /* 245 */
- { 43, 10, 5, 0, 0, }, /* 246 */
- { 43, 7, 12, 0, 0, }, /* 247 */
- { 43, 10, 3, 0, 0, }, /* 248 */
- { 43, 13, 12, 0, 0, }, /* 249 */
- { 43, 26, 12, 0, 0, }, /* 250 */
- { 43, 15, 12, 0, 0, }, /* 251 */
- { 53, 12, 3, 0, 0, }, /* 252 */
- { 53, 7, 12, 0, 0, }, /* 253 */
- { 53, 10, 3, 0, 0, }, /* 254 */
- { 53, 10, 5, 0, 0, }, /* 255 */
- { 53, 13, 12, 0, 0, }, /* 256 */
- { 53, 15, 12, 0, 0, }, /* 257 */
- { 53, 26, 12, 0, 0, }, /* 258 */
- { 53, 23, 12, 0, 0, }, /* 259 */
- { 54, 12, 3, 0, 0, }, /* 260 */
- { 54, 10, 5, 0, 0, }, /* 261 */
- { 54, 7, 12, 0, 0, }, /* 262 */
- { 54, 13, 12, 0, 0, }, /* 263 */
- { 54, 15, 12, 0, 0, }, /* 264 */
- { 54, 26, 12, 0, 0, }, /* 265 */
- { 28, 12, 3, 0, 0, }, /* 266 */
- { 28, 10, 5, 0, 0, }, /* 267 */
- { 28, 7, 12, 0, 0, }, /* 268 */
- { 28, 10, 3, 0, 0, }, /* 269 */
- { 28, 13, 12, 0, 0, }, /* 270 */
- { 36, 12, 3, 0, 0, }, /* 271 */
- { 36, 10, 5, 0, 0, }, /* 272 */
- { 36, 7, 12, 0, 0, }, /* 273 */
- { 36, 10, 3, 0, 0, }, /* 274 */
- { 36, 13, 12, 0, 0, }, /* 275 */
- { 36, 15, 12, 0, 0, }, /* 276 */
- { 36, 26, 12, 0, 0, }, /* 277 */
- { 47, 10, 5, 0, 0, }, /* 278 */
- { 47, 7, 12, 0, 0, }, /* 279 */
- { 47, 12, 3, 0, 0, }, /* 280 */
- { 47, 10, 3, 0, 0, }, /* 281 */
- { 47, 13, 12, 0, 0, }, /* 282 */
- { 47, 21, 12, 0, 0, }, /* 283 */
- { 56, 7, 12, 0, 0, }, /* 284 */
- { 56, 12, 3, 0, 0, }, /* 285 */
- { 56, 7, 5, 0, 0, }, /* 286 */
- { 56, 6, 12, 0, 0, }, /* 287 */
- { 56, 21, 12, 0, 0, }, /* 288 */
- { 56, 13, 12, 0, 0, }, /* 289 */
- { 32, 7, 12, 0, 0, }, /* 290 */
- { 32, 12, 3, 0, 0, }, /* 291 */
- { 32, 7, 5, 0, 0, }, /* 292 */
- { 32, 6, 12, 0, 0, }, /* 293 */
- { 32, 13, 12, 0, 0, }, /* 294 */
- { 57, 7, 12, 0, 0, }, /* 295 */
- { 57, 26, 12, 0, 0, }, /* 296 */
- { 57, 21, 12, 0, 0, }, /* 297 */
- { 57, 12, 3, 0, 0, }, /* 298 */
- { 57, 13, 12, 0, 0, }, /* 299 */
- { 57, 15, 12, 0, 0, }, /* 300 */
- { 57, 22, 12, 0, 0, }, /* 301 */
- { 57, 18, 12, 0, 0, }, /* 302 */
- { 57, 10, 5, 0, 0, }, /* 303 */
- { 38, 7, 12, 0, 0, }, /* 304 */
- { 38, 10, 12, 0, 0, }, /* 305 */
- { 38, 12, 3, 0, 0, }, /* 306 */
- { 38, 10, 5, 0, 0, }, /* 307 */
- { 38, 13, 12, 0, 0, }, /* 308 */
- { 38, 21, 12, 0, 0, }, /* 309 */
- { 38, 26, 12, 0, 0, }, /* 310 */
- { 16, 9, 12, 0, 7264, }, /* 311 */
- { 16, 7, 12, 0, 0, }, /* 312 */
- { 16, 6, 12, 0, 0, }, /* 313 */
- { 23, 7, 6, 0, 0, }, /* 314 */
- { 23, 7, 7, 0, 0, }, /* 315 */
- { 23, 7, 8, 0, 0, }, /* 316 */
- { 15, 7, 12, 0, 0, }, /* 317 */
- { 15, 12, 3, 0, 0, }, /* 318 */
- { 15, 21, 12, 0, 0, }, /* 319 */
- { 15, 15, 12, 0, 0, }, /* 320 */
- { 15, 26, 12, 0, 0, }, /* 321 */
- { 8, 7, 12, 0, 0, }, /* 322 */
- { 7, 17, 12, 0, 0, }, /* 323 */
- { 7, 7, 12, 0, 0, }, /* 324 */
- { 7, 21, 12, 0, 0, }, /* 325 */
- { 40, 29, 12, 0, 0, }, /* 326 */
- { 40, 7, 12, 0, 0, }, /* 327 */
- { 40, 22, 12, 0, 0, }, /* 328 */
- { 40, 18, 12, 0, 0, }, /* 329 */
- { 45, 7, 12, 0, 0, }, /* 330 */
- { 45, 14, 12, 0, 0, }, /* 331 */
- { 50, 7, 12, 0, 0, }, /* 332 */
- { 50, 12, 3, 0, 0, }, /* 333 */
- { 24, 7, 12, 0, 0, }, /* 334 */
- { 24, 12, 3, 0, 0, }, /* 335 */
- { 6, 7, 12, 0, 0, }, /* 336 */
- { 6, 12, 3, 0, 0, }, /* 337 */
- { 51, 7, 12, 0, 0, }, /* 338 */
- { 51, 12, 3, 0, 0, }, /* 339 */
- { 31, 7, 12, 0, 0, }, /* 340 */
- { 31, 12, 3, 0, 0, }, /* 341 */
- { 31, 10, 5, 0, 0, }, /* 342 */
- { 31, 21, 12, 0, 0, }, /* 343 */
- { 31, 6, 12, 0, 0, }, /* 344 */
- { 31, 23, 12, 0, 0, }, /* 345 */
- { 31, 13, 12, 0, 0, }, /* 346 */
- { 31, 15, 12, 0, 0, }, /* 347 */
- { 37, 21, 12, 0, 0, }, /* 348 */
- { 37, 17, 12, 0, 0, }, /* 349 */
- { 37, 12, 3, 0, 0, }, /* 350 */
- { 37, 1, 2, 0, 0, }, /* 351 */
- { 37, 13, 12, 0, 0, }, /* 352 */
- { 37, 7, 12, 0, 0, }, /* 353 */
- { 37, 6, 12, 0, 0, }, /* 354 */
- { 34, 7, 12, 0, 0, }, /* 355 */
- { 34, 12, 3, 0, 0, }, /* 356 */
- { 34, 10, 5, 0, 0, }, /* 357 */
- { 34, 26, 12, 0, 0, }, /* 358 */
- { 34, 21, 12, 0, 0, }, /* 359 */
- { 34, 13, 12, 0, 0, }, /* 360 */
- { 52, 7, 12, 0, 0, }, /* 361 */
- { 39, 7, 12, 0, 0, }, /* 362 */
- { 39, 10, 12, 0, 0, }, /* 363 */
- { 39, 10, 5, 0, 0, }, /* 364 */
- { 39, 13, 12, 0, 0, }, /* 365 */
- { 39, 15, 12, 0, 0, }, /* 366 */
- { 39, 26, 12, 0, 0, }, /* 367 */
- { 31, 26, 12, 0, 0, }, /* 368 */
- { 5, 7, 12, 0, 0, }, /* 369 */
- { 5, 12, 3, 0, 0, }, /* 370 */
- { 5, 10, 5, 0, 0, }, /* 371 */
- { 5, 21, 12, 0, 0, }, /* 372 */
- { 90, 7, 12, 0, 0, }, /* 373 */
- { 90, 10, 5, 0, 0, }, /* 374 */
- { 90, 12, 3, 0, 0, }, /* 375 */
- { 90, 10, 12, 0, 0, }, /* 376 */
- { 90, 13, 12, 0, 0, }, /* 377 */
- { 90, 21, 12, 0, 0, }, /* 378 */
- { 90, 6, 12, 0, 0, }, /* 379 */
- { 27, 11, 3, 0, 0, }, /* 380 */
- { 61, 12, 3, 0, 0, }, /* 381 */
- { 61, 10, 5, 0, 0, }, /* 382 */
- { 61, 7, 12, 0, 0, }, /* 383 */
- { 61, 13, 12, 0, 0, }, /* 384 */
- { 61, 21, 12, 0, 0, }, /* 385 */
- { 61, 26, 12, 0, 0, }, /* 386 */
- { 75, 12, 3, 0, 0, }, /* 387 */
- { 75, 10, 5, 0, 0, }, /* 388 */
- { 75, 7, 12, 0, 0, }, /* 389 */
- { 75, 13, 12, 0, 0, }, /* 390 */
- { 92, 7, 12, 0, 0, }, /* 391 */
- { 92, 12, 3, 0, 0, }, /* 392 */
- { 92, 10, 5, 0, 0, }, /* 393 */
- { 92, 21, 12, 0, 0, }, /* 394 */
- { 69, 7, 12, 0, 0, }, /* 395 */
- { 69, 10, 5, 0, 0, }, /* 396 */
- { 69, 12, 3, 0, 0, }, /* 397 */
- { 69, 21, 12, 0, 0, }, /* 398 */
- { 69, 13, 12, 0, 0, }, /* 399 */
- { 72, 13, 12, 0, 0, }, /* 400 */
- { 72, 7, 12, 0, 0, }, /* 401 */
- { 72, 6, 12, 0, 0, }, /* 402 */
- { 72, 21, 12, 0, 0, }, /* 403 */
- { 75, 21, 12, 0, 0, }, /* 404 */
- { 9, 10, 5, 0, 0, }, /* 405 */
- { 9, 7, 12, 0, 0, }, /* 406 */
- { 12, 5, 12, 0, 0, }, /* 407 */
- { 12, 6, 12, 0, 0, }, /* 408 */
- { 33, 5, 12, 0, 35332, }, /* 409 */
- { 33, 5, 12, 0, 3814, }, /* 410 */
- { 33, 9, 12, 63, 1, }, /* 411 */
- { 33, 5, 12, 63, -1, }, /* 412 */
- { 33, 5, 12, 63, -58, }, /* 413 */
- { 33, 9, 12, 0, -7615, }, /* 414 */
- { 19, 5, 12, 0, 8, }, /* 415 */
- { 19, 9, 12, 0, -8, }, /* 416 */
- { 19, 5, 12, 0, 74, }, /* 417 */
- { 19, 5, 12, 0, 86, }, /* 418 */
- { 19, 5, 12, 0, 100, }, /* 419 */
- { 19, 5, 12, 0, 128, }, /* 420 */
- { 19, 5, 12, 0, 112, }, /* 421 */
- { 19, 5, 12, 0, 126, }, /* 422 */
- { 19, 8, 12, 0, -8, }, /* 423 */
- { 19, 5, 12, 0, 9, }, /* 424 */
- { 19, 9, 12, 0, -74, }, /* 425 */
- { 19, 8, 12, 0, -9, }, /* 426 */
- { 19, 5, 12, 21, -7173, }, /* 427 */
- { 19, 9, 12, 0, -86, }, /* 428 */
- { 19, 9, 12, 0, -100, }, /* 429 */
- { 19, 9, 12, 0, -112, }, /* 430 */
- { 19, 9, 12, 0, -128, }, /* 431 */
- { 19, 9, 12, 0, -126, }, /* 432 */
- { 27, 1, 3, 0, 0, }, /* 433 */
- { 9, 27, 2, 0, 0, }, /* 434 */
- { 9, 28, 2, 0, 0, }, /* 435 */
- { 9, 2, 2, 0, 0, }, /* 436 */
- { 9, 9, 12, 0, 0, }, /* 437 */
- { 9, 5, 12, 0, 0, }, /* 438 */
- { 19, 9, 12, 67, -7517, }, /* 439 */
- { 33, 9, 12, 71, -8383, }, /* 440 */
- { 33, 9, 12, 75, -8262, }, /* 441 */
- { 33, 9, 12, 0, 28, }, /* 442 */
- { 33, 5, 12, 0, -28, }, /* 443 */
- { 33, 14, 12, 0, 16, }, /* 444 */
- { 33, 14, 12, 0, -16, }, /* 445 */
- { 33, 14, 12, 0, 0, }, /* 446 */
- { 9, 26, 12, 0, 26, }, /* 447 */
- { 9, 26, 12, 0, -26, }, /* 448 */
- { 4, 26, 12, 0, 0, }, /* 449 */
- { 17, 9, 12, 0, 48, }, /* 450 */
- { 17, 5, 12, 0, -48, }, /* 451 */
- { 33, 9, 12, 0, -10743, }, /* 452 */
- { 33, 9, 12, 0, -3814, }, /* 453 */
- { 33, 9, 12, 0, -10727, }, /* 454 */
- { 33, 5, 12, 0, -10795, }, /* 455 */
- { 33, 5, 12, 0, -10792, }, /* 456 */
- { 33, 9, 12, 0, -10780, }, /* 457 */
- { 33, 9, 12, 0, -10749, }, /* 458 */
- { 33, 9, 12, 0, -10783, }, /* 459 */
- { 33, 9, 12, 0, -10782, }, /* 460 */
- { 33, 9, 12, 0, -10815, }, /* 461 */
- { 10, 5, 12, 0, 0, }, /* 462 */
- { 10, 26, 12, 0, 0, }, /* 463 */
- { 10, 12, 3, 0, 0, }, /* 464 */
- { 10, 21, 12, 0, 0, }, /* 465 */
- { 10, 15, 12, 0, 0, }, /* 466 */
- { 16, 5, 12, 0, -7264, }, /* 467 */
- { 58, 7, 12, 0, 0, }, /* 468 */
- { 58, 6, 12, 0, 0, }, /* 469 */
- { 58, 21, 12, 0, 0, }, /* 470 */
- { 58, 12, 3, 0, 0, }, /* 471 */
- { 22, 26, 12, 0, 0, }, /* 472 */
- { 22, 6, 12, 0, 0, }, /* 473 */
- { 22, 14, 12, 0, 0, }, /* 474 */
- { 23, 10, 3, 0, 0, }, /* 475 */
- { 26, 7, 12, 0, 0, }, /* 476 */
- { 26, 6, 12, 0, 0, }, /* 477 */
- { 29, 7, 12, 0, 0, }, /* 478 */
- { 29, 6, 12, 0, 0, }, /* 479 */
- { 3, 7, 12, 0, 0, }, /* 480 */
- { 23, 7, 12, 0, 0, }, /* 481 */
- { 23, 26, 12, 0, 0, }, /* 482 */
- { 29, 26, 12, 0, 0, }, /* 483 */
- { 22, 7, 12, 0, 0, }, /* 484 */
- { 60, 7, 12, 0, 0, }, /* 485 */
- { 60, 6, 12, 0, 0, }, /* 486 */
- { 60, 26, 12, 0, 0, }, /* 487 */
- { 85, 7, 12, 0, 0, }, /* 488 */
- { 85, 6, 12, 0, 0, }, /* 489 */
- { 85, 21, 12, 0, 0, }, /* 490 */
- { 76, 7, 12, 0, 0, }, /* 491 */
- { 76, 6, 12, 0, 0, }, /* 492 */
- { 76, 21, 12, 0, 0, }, /* 493 */
- { 76, 13, 12, 0, 0, }, /* 494 */
- { 12, 7, 12, 0, 0, }, /* 495 */
- { 12, 21, 12, 0, 0, }, /* 496 */
- { 78, 7, 12, 0, 0, }, /* 497 */
- { 78, 14, 12, 0, 0, }, /* 498 */
- { 78, 12, 3, 0, 0, }, /* 499 */
- { 78, 21, 12, 0, 0, }, /* 500 */
- { 33, 9, 12, 0, -35332, }, /* 501 */
- { 33, 9, 12, 0, -42280, }, /* 502 */
- { 33, 9, 12, 0, -42308, }, /* 503 */
- { 33, 9, 12, 0, -42319, }, /* 504 */
- { 33, 9, 12, 0, -42315, }, /* 505 */
- { 33, 9, 12, 0, -42305, }, /* 506 */
- { 33, 9, 12, 0, -42258, }, /* 507 */
- { 33, 9, 12, 0, -42282, }, /* 508 */
- { 48, 7, 12, 0, 0, }, /* 509 */
- { 48, 12, 3, 0, 0, }, /* 510 */
- { 48, 10, 5, 0, 0, }, /* 511 */
- { 48, 26, 12, 0, 0, }, /* 512 */
- { 64, 7, 12, 0, 0, }, /* 513 */
- { 64, 21, 12, 0, 0, }, /* 514 */
- { 74, 10, 5, 0, 0, }, /* 515 */
- { 74, 7, 12, 0, 0, }, /* 516 */
- { 74, 12, 3, 0, 0, }, /* 517 */
- { 74, 21, 12, 0, 0, }, /* 518 */
- { 74, 13, 12, 0, 0, }, /* 519 */
- { 68, 13, 12, 0, 0, }, /* 520 */
- { 68, 7, 12, 0, 0, }, /* 521 */
- { 68, 12, 3, 0, 0, }, /* 522 */
- { 68, 21, 12, 0, 0, }, /* 523 */
- { 73, 7, 12, 0, 0, }, /* 524 */
- { 73, 12, 3, 0, 0, }, /* 525 */
- { 73, 10, 5, 0, 0, }, /* 526 */
- { 73, 21, 12, 0, 0, }, /* 527 */
- { 83, 12, 3, 0, 0, }, /* 528 */
- { 83, 10, 5, 0, 0, }, /* 529 */
- { 83, 7, 12, 0, 0, }, /* 530 */
- { 83, 21, 12, 0, 0, }, /* 531 */
- { 83, 13, 12, 0, 0, }, /* 532 */
- { 38, 6, 12, 0, 0, }, /* 533 */
- { 67, 7, 12, 0, 0, }, /* 534 */
- { 67, 12, 3, 0, 0, }, /* 535 */
- { 67, 10, 5, 0, 0, }, /* 536 */
- { 67, 13, 12, 0, 0, }, /* 537 */
- { 67, 21, 12, 0, 0, }, /* 538 */
- { 91, 7, 12, 0, 0, }, /* 539 */
- { 91, 12, 3, 0, 0, }, /* 540 */
- { 91, 6, 12, 0, 0, }, /* 541 */
- { 91, 21, 12, 0, 0, }, /* 542 */
- { 86, 7, 12, 0, 0, }, /* 543 */
- { 86, 10, 5, 0, 0, }, /* 544 */
- { 86, 12, 3, 0, 0, }, /* 545 */
- { 86, 21, 12, 0, 0, }, /* 546 */
- { 86, 6, 12, 0, 0, }, /* 547 */
- { 86, 13, 12, 0, 0, }, /* 548 */
- { 23, 7, 9, 0, 0, }, /* 549 */
- { 23, 7, 10, 0, 0, }, /* 550 */
- { 9, 4, 2, 0, 0, }, /* 551 */
- { 9, 3, 12, 0, 0, }, /* 552 */
- { 25, 25, 12, 0, 0, }, /* 553 */
- { 0, 24, 12, 0, 0, }, /* 554 */
- { 9, 6, 3, 0, 0, }, /* 555 */
- { 35, 7, 12, 0, 0, }, /* 556 */
- { 19, 14, 12, 0, 0, }, /* 557 */
- { 19, 15, 12, 0, 0, }, /* 558 */
- { 19, 26, 12, 0, 0, }, /* 559 */
- { 70, 7, 12, 0, 0, }, /* 560 */
- { 66, 7, 12, 0, 0, }, /* 561 */
- { 41, 7, 12, 0, 0, }, /* 562 */
- { 41, 15, 12, 0, 0, }, /* 563 */
- { 18, 7, 12, 0, 0, }, /* 564 */
- { 18, 14, 12, 0, 0, }, /* 565 */
- { 117, 7, 12, 0, 0, }, /* 566 */
- { 117, 12, 3, 0, 0, }, /* 567 */
- { 59, 7, 12, 0, 0, }, /* 568 */
- { 59, 21, 12, 0, 0, }, /* 569 */
- { 42, 7, 12, 0, 0, }, /* 570 */
- { 42, 21, 12, 0, 0, }, /* 571 */
- { 42, 14, 12, 0, 0, }, /* 572 */
- { 13, 9, 12, 0, 40, }, /* 573 */
- { 13, 5, 12, 0, -40, }, /* 574 */
- { 46, 7, 12, 0, 0, }, /* 575 */
- { 44, 7, 12, 0, 0, }, /* 576 */
- { 44, 13, 12, 0, 0, }, /* 577 */
- { 105, 7, 12, 0, 0, }, /* 578 */
- { 103, 7, 12, 0, 0, }, /* 579 */
- { 103, 21, 12, 0, 0, }, /* 580 */
- { 109, 7, 12, 0, 0, }, /* 581 */
- { 11, 7, 12, 0, 0, }, /* 582 */
- { 80, 7, 12, 0, 0, }, /* 583 */
- { 80, 21, 12, 0, 0, }, /* 584 */
- { 80, 15, 12, 0, 0, }, /* 585 */
- { 119, 7, 12, 0, 0, }, /* 586 */
- { 119, 26, 12, 0, 0, }, /* 587 */
- { 119, 15, 12, 0, 0, }, /* 588 */
- { 115, 7, 12, 0, 0, }, /* 589 */
- { 115, 15, 12, 0, 0, }, /* 590 */
- { 65, 7, 12, 0, 0, }, /* 591 */
- { 65, 15, 12, 0, 0, }, /* 592 */
- { 65, 21, 12, 0, 0, }, /* 593 */
- { 71, 7, 12, 0, 0, }, /* 594 */
- { 71, 21, 12, 0, 0, }, /* 595 */
- { 97, 7, 12, 0, 0, }, /* 596 */
- { 96, 7, 12, 0, 0, }, /* 597 */
- { 30, 7, 12, 0, 0, }, /* 598 */
- { 30, 12, 3, 0, 0, }, /* 599 */
- { 30, 15, 12, 0, 0, }, /* 600 */
- { 30, 21, 12, 0, 0, }, /* 601 */
- { 87, 7, 12, 0, 0, }, /* 602 */
- { 87, 15, 12, 0, 0, }, /* 603 */
- { 87, 21, 12, 0, 0, }, /* 604 */
- { 116, 7, 12, 0, 0, }, /* 605 */
- { 116, 15, 12, 0, 0, }, /* 606 */
- { 111, 7, 12, 0, 0, }, /* 607 */
- { 111, 26, 12, 0, 0, }, /* 608 */
- { 111, 12, 3, 0, 0, }, /* 609 */
- { 111, 15, 12, 0, 0, }, /* 610 */
- { 111, 21, 12, 0, 0, }, /* 611 */
- { 77, 7, 12, 0, 0, }, /* 612 */
- { 77, 21, 12, 0, 0, }, /* 613 */
- { 82, 7, 12, 0, 0, }, /* 614 */
- { 82, 15, 12, 0, 0, }, /* 615 */
- { 81, 7, 12, 0, 0, }, /* 616 */
- { 81, 15, 12, 0, 0, }, /* 617 */
- { 120, 7, 12, 0, 0, }, /* 618 */
- { 120, 21, 12, 0, 0, }, /* 619 */
- { 120, 15, 12, 0, 0, }, /* 620 */
- { 88, 7, 12, 0, 0, }, /* 621 */
- { 0, 15, 12, 0, 0, }, /* 622 */
- { 93, 10, 5, 0, 0, }, /* 623 */
- { 93, 12, 3, 0, 0, }, /* 624 */
- { 93, 7, 12, 0, 0, }, /* 625 */
- { 93, 21, 12, 0, 0, }, /* 626 */
- { 93, 15, 12, 0, 0, }, /* 627 */
- { 93, 13, 12, 0, 0, }, /* 628 */
- { 84, 12, 3, 0, 0, }, /* 629 */
- { 84, 10, 5, 0, 0, }, /* 630 */
- { 84, 7, 12, 0, 0, }, /* 631 */
- { 84, 21, 12, 0, 0, }, /* 632 */
- { 84, 1, 2, 0, 0, }, /* 633 */
- { 100, 7, 12, 0, 0, }, /* 634 */
- { 100, 13, 12, 0, 0, }, /* 635 */
- { 95, 12, 3, 0, 0, }, /* 636 */
- { 95, 7, 12, 0, 0, }, /* 637 */
- { 95, 10, 5, 0, 0, }, /* 638 */
- { 95, 13, 12, 0, 0, }, /* 639 */
- { 95, 21, 12, 0, 0, }, /* 640 */
- { 110, 7, 12, 0, 0, }, /* 641 */
- { 110, 12, 3, 0, 0, }, /* 642 */
- { 110, 21, 12, 0, 0, }, /* 643 */
- { 99, 12, 3, 0, 0, }, /* 644 */
- { 99, 10, 5, 0, 0, }, /* 645 */
- { 99, 7, 12, 0, 0, }, /* 646 */
- { 99, 21, 12, 0, 0, }, /* 647 */
- { 99, 13, 12, 0, 0, }, /* 648 */
- { 47, 15, 12, 0, 0, }, /* 649 */
- { 107, 7, 12, 0, 0, }, /* 650 */
- { 107, 10, 5, 0, 0, }, /* 651 */
- { 107, 12, 3, 0, 0, }, /* 652 */
- { 107, 21, 12, 0, 0, }, /* 653 */
- { 108, 7, 12, 0, 0, }, /* 654 */
- { 108, 12, 3, 0, 0, }, /* 655 */
- { 108, 10, 5, 0, 0, }, /* 656 */
- { 108, 13, 12, 0, 0, }, /* 657 */
- { 106, 12, 3, 0, 0, }, /* 658 */
- { 106, 10, 5, 0, 0, }, /* 659 */
- { 106, 7, 12, 0, 0, }, /* 660 */
- { 106, 10, 3, 0, 0, }, /* 661 */
- { 123, 7, 12, 0, 0, }, /* 662 */
- { 123, 10, 3, 0, 0, }, /* 663 */
- { 123, 10, 5, 0, 0, }, /* 664 */
- { 123, 12, 3, 0, 0, }, /* 665 */
- { 123, 21, 12, 0, 0, }, /* 666 */
- { 123, 13, 12, 0, 0, }, /* 667 */
- { 122, 7, 12, 0, 0, }, /* 668 */
- { 122, 10, 3, 0, 0, }, /* 669 */
- { 122, 10, 5, 0, 0, }, /* 670 */
- { 122, 12, 3, 0, 0, }, /* 671 */
- { 122, 21, 12, 0, 0, }, /* 672 */
- { 113, 7, 12, 0, 0, }, /* 673 */
- { 113, 10, 5, 0, 0, }, /* 674 */
- { 113, 12, 3, 0, 0, }, /* 675 */
- { 113, 21, 12, 0, 0, }, /* 676 */
- { 113, 13, 12, 0, 0, }, /* 677 */
- { 101, 7, 12, 0, 0, }, /* 678 */
- { 101, 12, 3, 0, 0, }, /* 679 */
- { 101, 10, 5, 0, 0, }, /* 680 */
- { 101, 13, 12, 0, 0, }, /* 681 */
- { 124, 9, 12, 0, 32, }, /* 682 */
- { 124, 5, 12, 0, -32, }, /* 683 */
- { 124, 13, 12, 0, 0, }, /* 684 */
- { 124, 15, 12, 0, 0, }, /* 685 */
- { 124, 7, 12, 0, 0, }, /* 686 */
- { 121, 7, 12, 0, 0, }, /* 687 */
- { 62, 7, 12, 0, 0, }, /* 688 */
- { 62, 14, 12, 0, 0, }, /* 689 */
- { 62, 21, 12, 0, 0, }, /* 690 */
- { 79, 7, 12, 0, 0, }, /* 691 */
- { 114, 7, 12, 0, 0, }, /* 692 */
- { 114, 13, 12, 0, 0, }, /* 693 */
- { 114, 21, 12, 0, 0, }, /* 694 */
- { 102, 7, 12, 0, 0, }, /* 695 */
- { 102, 12, 3, 0, 0, }, /* 696 */
- { 102, 21, 12, 0, 0, }, /* 697 */
- { 118, 7, 12, 0, 0, }, /* 698 */
- { 118, 12, 3, 0, 0, }, /* 699 */
- { 118, 21, 12, 0, 0, }, /* 700 */
- { 118, 26, 12, 0, 0, }, /* 701 */
- { 118, 6, 12, 0, 0, }, /* 702 */
- { 118, 13, 12, 0, 0, }, /* 703 */
- { 118, 15, 12, 0, 0, }, /* 704 */
- { 98, 7, 12, 0, 0, }, /* 705 */
- { 98, 10, 5, 0, 0, }, /* 706 */
- { 98, 12, 3, 0, 0, }, /* 707 */
- { 98, 6, 12, 0, 0, }, /* 708 */
- { 104, 7, 12, 0, 0, }, /* 709 */
- { 104, 26, 12, 0, 0, }, /* 710 */
- { 104, 12, 3, 0, 0, }, /* 711 */
- { 104, 21, 12, 0, 0, }, /* 712 */
- { 9, 10, 3, 0, 0, }, /* 713 */
- { 19, 12, 3, 0, 0, }, /* 714 */
- { 112, 7, 12, 0, 0, }, /* 715 */
- { 112, 15, 12, 0, 0, }, /* 716 */
- { 112, 12, 3, 0, 0, }, /* 717 */
- { 9, 26, 11, 0, 0, }, /* 718 */
- { 26, 26, 12, 0, 0, }, /* 719 */
+ { 0, 6, 12, 0, 0, }, /* 202 */
+ { 49, 21, 12, 0, 0, }, /* 203 */
+ { 49, 1, 2, 0, 0, }, /* 204 */
+ { 49, 7, 12, 0, 0, }, /* 205 */
+ { 49, 12, 3, 0, 0, }, /* 206 */
+ { 55, 7, 12, 0, 0, }, /* 207 */
+ { 55, 12, 3, 0, 0, }, /* 208 */
+ { 63, 13, 12, 0, 0, }, /* 209 */
+ { 63, 7, 12, 0, 0, }, /* 210 */
+ { 63, 12, 3, 0, 0, }, /* 211 */
+ { 63, 6, 12, 0, 0, }, /* 212 */
+ { 63, 26, 12, 0, 0, }, /* 213 */
+ { 63, 21, 12, 0, 0, }, /* 214 */
+ { 89, 7, 12, 0, 0, }, /* 215 */
+ { 89, 12, 3, 0, 0, }, /* 216 */
+ { 89, 6, 12, 0, 0, }, /* 217 */
+ { 89, 21, 12, 0, 0, }, /* 218 */
+ { 94, 7, 12, 0, 0, }, /* 219 */
+ { 94, 12, 3, 0, 0, }, /* 220 */
+ { 94, 21, 12, 0, 0, }, /* 221 */
+ { 14, 12, 3, 0, 0, }, /* 222 */
+ { 14, 10, 5, 0, 0, }, /* 223 */
+ { 14, 7, 12, 0, 0, }, /* 224 */
+ { 14, 13, 12, 0, 0, }, /* 225 */
+ { 14, 21, 12, 0, 0, }, /* 226 */
+ { 14, 6, 12, 0, 0, }, /* 227 */
+ { 2, 7, 12, 0, 0, }, /* 228 */
+ { 2, 12, 3, 0, 0, }, /* 229 */
+ { 2, 10, 5, 0, 0, }, /* 230 */
+ { 2, 10, 3, 0, 0, }, /* 231 */
+ { 2, 13, 12, 0, 0, }, /* 232 */
+ { 2, 23, 12, 0, 0, }, /* 233 */
+ { 2, 15, 12, 0, 0, }, /* 234 */
+ { 2, 26, 12, 0, 0, }, /* 235 */
+ { 21, 12, 3, 0, 0, }, /* 236 */
+ { 21, 10, 5, 0, 0, }, /* 237 */
+ { 21, 7, 12, 0, 0, }, /* 238 */
+ { 21, 13, 12, 0, 0, }, /* 239 */
+ { 20, 12, 3, 0, 0, }, /* 240 */
+ { 20, 10, 5, 0, 0, }, /* 241 */
+ { 20, 7, 12, 0, 0, }, /* 242 */
+ { 20, 13, 12, 0, 0, }, /* 243 */
+ { 20, 21, 12, 0, 0, }, /* 244 */
+ { 20, 23, 12, 0, 0, }, /* 245 */
+ { 43, 12, 3, 0, 0, }, /* 246 */
+ { 43, 10, 5, 0, 0, }, /* 247 */
+ { 43, 7, 12, 0, 0, }, /* 248 */
+ { 43, 10, 3, 0, 0, }, /* 249 */
+ { 43, 13, 12, 0, 0, }, /* 250 */
+ { 43, 26, 12, 0, 0, }, /* 251 */
+ { 43, 15, 12, 0, 0, }, /* 252 */
+ { 53, 12, 3, 0, 0, }, /* 253 */
+ { 53, 7, 12, 0, 0, }, /* 254 */
+ { 53, 10, 3, 0, 0, }, /* 255 */
+ { 53, 10, 5, 0, 0, }, /* 256 */
+ { 53, 13, 12, 0, 0, }, /* 257 */
+ { 53, 15, 12, 0, 0, }, /* 258 */
+ { 53, 26, 12, 0, 0, }, /* 259 */
+ { 53, 23, 12, 0, 0, }, /* 260 */
+ { 54, 12, 3, 0, 0, }, /* 261 */
+ { 54, 10, 5, 0, 0, }, /* 262 */
+ { 54, 7, 12, 0, 0, }, /* 263 */
+ { 54, 13, 12, 0, 0, }, /* 264 */
+ { 54, 15, 12, 0, 0, }, /* 265 */
+ { 54, 26, 12, 0, 0, }, /* 266 */
+ { 28, 12, 3, 0, 0, }, /* 267 */
+ { 28, 10, 5, 0, 0, }, /* 268 */
+ { 28, 7, 12, 0, 0, }, /* 269 */
+ { 28, 10, 3, 0, 0, }, /* 270 */
+ { 28, 13, 12, 0, 0, }, /* 271 */
+ { 36, 12, 3, 0, 0, }, /* 272 */
+ { 36, 10, 5, 0, 0, }, /* 273 */
+ { 36, 7, 12, 0, 0, }, /* 274 */
+ { 36, 10, 3, 0, 0, }, /* 275 */
+ { 36, 13, 12, 0, 0, }, /* 276 */
+ { 36, 15, 12, 0, 0, }, /* 277 */
+ { 36, 26, 12, 0, 0, }, /* 278 */
+ { 47, 10, 5, 0, 0, }, /* 279 */
+ { 47, 7, 12, 0, 0, }, /* 280 */
+ { 47, 12, 3, 0, 0, }, /* 281 */
+ { 47, 10, 3, 0, 0, }, /* 282 */
+ { 47, 13, 12, 0, 0, }, /* 283 */
+ { 47, 21, 12, 0, 0, }, /* 284 */
+ { 56, 7, 12, 0, 0, }, /* 285 */
+ { 56, 12, 3, 0, 0, }, /* 286 */
+ { 56, 7, 5, 0, 0, }, /* 287 */
+ { 56, 6, 12, 0, 0, }, /* 288 */
+ { 56, 21, 12, 0, 0, }, /* 289 */
+ { 56, 13, 12, 0, 0, }, /* 290 */
+ { 32, 7, 12, 0, 0, }, /* 291 */
+ { 32, 12, 3, 0, 0, }, /* 292 */
+ { 32, 7, 5, 0, 0, }, /* 293 */
+ { 32, 6, 12, 0, 0, }, /* 294 */
+ { 32, 13, 12, 0, 0, }, /* 295 */
+ { 57, 7, 12, 0, 0, }, /* 296 */
+ { 57, 26, 12, 0, 0, }, /* 297 */
+ { 57, 21, 12, 0, 0, }, /* 298 */
+ { 57, 12, 3, 0, 0, }, /* 299 */
+ { 57, 13, 12, 0, 0, }, /* 300 */
+ { 57, 15, 12, 0, 0, }, /* 301 */
+ { 57, 22, 12, 0, 0, }, /* 302 */
+ { 57, 18, 12, 0, 0, }, /* 303 */
+ { 57, 10, 5, 0, 0, }, /* 304 */
+ { 38, 7, 12, 0, 0, }, /* 305 */
+ { 38, 10, 12, 0, 0, }, /* 306 */
+ { 38, 12, 3, 0, 0, }, /* 307 */
+ { 38, 10, 5, 0, 0, }, /* 308 */
+ { 38, 13, 12, 0, 0, }, /* 309 */
+ { 38, 21, 12, 0, 0, }, /* 310 */
+ { 38, 26, 12, 0, 0, }, /* 311 */
+ { 16, 9, 12, 0, 7264, }, /* 312 */
+ { 16, 7, 12, 0, 0, }, /* 313 */
+ { 16, 6, 12, 0, 0, }, /* 314 */
+ { 23, 7, 6, 0, 0, }, /* 315 */
+ { 23, 7, 7, 0, 0, }, /* 316 */
+ { 23, 7, 8, 0, 0, }, /* 317 */
+ { 15, 7, 12, 0, 0, }, /* 318 */
+ { 15, 12, 3, 0, 0, }, /* 319 */
+ { 15, 21, 12, 0, 0, }, /* 320 */
+ { 15, 15, 12, 0, 0, }, /* 321 */
+ { 15, 26, 12, 0, 0, }, /* 322 */
+ { 8, 9, 12, 0, 38864, }, /* 323 */
+ { 8, 9, 12, 0, 8, }, /* 324 */
+ { 8, 5, 12, 0, -8, }, /* 325 */
+ { 7, 17, 12, 0, 0, }, /* 326 */
+ { 7, 7, 12, 0, 0, }, /* 327 */
+ { 7, 21, 12, 0, 0, }, /* 328 */
+ { 40, 29, 12, 0, 0, }, /* 329 */
+ { 40, 7, 12, 0, 0, }, /* 330 */
+ { 40, 22, 12, 0, 0, }, /* 331 */
+ { 40, 18, 12, 0, 0, }, /* 332 */
+ { 45, 7, 12, 0, 0, }, /* 333 */
+ { 45, 14, 12, 0, 0, }, /* 334 */
+ { 50, 7, 12, 0, 0, }, /* 335 */
+ { 50, 12, 3, 0, 0, }, /* 336 */
+ { 24, 7, 12, 0, 0, }, /* 337 */
+ { 24, 12, 3, 0, 0, }, /* 338 */
+ { 6, 7, 12, 0, 0, }, /* 339 */
+ { 6, 12, 3, 0, 0, }, /* 340 */
+ { 51, 7, 12, 0, 0, }, /* 341 */
+ { 51, 12, 3, 0, 0, }, /* 342 */
+ { 31, 7, 12, 0, 0, }, /* 343 */
+ { 31, 12, 3, 0, 0, }, /* 344 */
+ { 31, 10, 5, 0, 0, }, /* 345 */
+ { 31, 21, 12, 0, 0, }, /* 346 */
+ { 31, 6, 12, 0, 0, }, /* 347 */
+ { 31, 23, 12, 0, 0, }, /* 348 */
+ { 31, 13, 12, 0, 0, }, /* 349 */
+ { 31, 15, 12, 0, 0, }, /* 350 */
+ { 37, 21, 12, 0, 0, }, /* 351 */
+ { 37, 17, 12, 0, 0, }, /* 352 */
+ { 37, 12, 3, 0, 0, }, /* 353 */
+ { 37, 1, 2, 0, 0, }, /* 354 */
+ { 37, 13, 12, 0, 0, }, /* 355 */
+ { 37, 7, 12, 0, 0, }, /* 356 */
+ { 37, 6, 12, 0, 0, }, /* 357 */
+ { 34, 7, 12, 0, 0, }, /* 358 */
+ { 34, 12, 3, 0, 0, }, /* 359 */
+ { 34, 10, 5, 0, 0, }, /* 360 */
+ { 34, 26, 12, 0, 0, }, /* 361 */
+ { 34, 21, 12, 0, 0, }, /* 362 */
+ { 34, 13, 12, 0, 0, }, /* 363 */
+ { 52, 7, 12, 0, 0, }, /* 364 */
+ { 39, 7, 12, 0, 0, }, /* 365 */
+ { 39, 13, 12, 0, 0, }, /* 366 */
+ { 39, 15, 12, 0, 0, }, /* 367 */
+ { 39, 26, 12, 0, 0, }, /* 368 */
+ { 31, 26, 12, 0, 0, }, /* 369 */
+ { 5, 7, 12, 0, 0, }, /* 370 */
+ { 5, 12, 3, 0, 0, }, /* 371 */
+ { 5, 10, 5, 0, 0, }, /* 372 */
+ { 5, 21, 12, 0, 0, }, /* 373 */
+ { 90, 7, 12, 0, 0, }, /* 374 */
+ { 90, 10, 5, 0, 0, }, /* 375 */
+ { 90, 12, 3, 0, 0, }, /* 376 */
+ { 90, 10, 12, 0, 0, }, /* 377 */
+ { 90, 13, 12, 0, 0, }, /* 378 */
+ { 90, 21, 12, 0, 0, }, /* 379 */
+ { 90, 6, 12, 0, 0, }, /* 380 */
+ { 27, 11, 3, 0, 0, }, /* 381 */
+ { 61, 12, 3, 0, 0, }, /* 382 */
+ { 61, 10, 5, 0, 0, }, /* 383 */
+ { 61, 7, 12, 0, 0, }, /* 384 */
+ { 61, 13, 12, 0, 0, }, /* 385 */
+ { 61, 21, 12, 0, 0, }, /* 386 */
+ { 61, 26, 12, 0, 0, }, /* 387 */
+ { 75, 12, 3, 0, 0, }, /* 388 */
+ { 75, 10, 5, 0, 0, }, /* 389 */
+ { 75, 7, 12, 0, 0, }, /* 390 */
+ { 75, 13, 12, 0, 0, }, /* 391 */
+ { 92, 7, 12, 0, 0, }, /* 392 */
+ { 92, 12, 3, 0, 0, }, /* 393 */
+ { 92, 10, 5, 0, 0, }, /* 394 */
+ { 92, 21, 12, 0, 0, }, /* 395 */
+ { 69, 7, 12, 0, 0, }, /* 396 */
+ { 69, 10, 5, 0, 0, }, /* 397 */
+ { 69, 12, 3, 0, 0, }, /* 398 */
+ { 69, 21, 12, 0, 0, }, /* 399 */
+ { 69, 13, 12, 0, 0, }, /* 400 */
+ { 72, 13, 12, 0, 0, }, /* 401 */
+ { 72, 7, 12, 0, 0, }, /* 402 */
+ { 72, 6, 12, 0, 0, }, /* 403 */
+ { 72, 21, 12, 0, 0, }, /* 404 */
+ { 75, 21, 12, 0, 0, }, /* 405 */
+ { 9, 10, 5, 0, 0, }, /* 406 */
+ { 9, 7, 12, 0, 0, }, /* 407 */
+ { 12, 5, 12, 0, 0, }, /* 408 */
+ { 12, 6, 12, 0, 0, }, /* 409 */
+ { 33, 5, 12, 0, 35332, }, /* 410 */
+ { 33, 5, 12, 0, 3814, }, /* 411 */
+ { 33, 9, 12, 63, 1, }, /* 412 */
+ { 33, 5, 12, 63, -1, }, /* 413 */
+ { 33, 5, 12, 63, -58, }, /* 414 */
+ { 33, 9, 12, 0, -7615, }, /* 415 */
+ { 19, 5, 12, 0, 8, }, /* 416 */
+ { 19, 9, 12, 0, -8, }, /* 417 */
+ { 19, 5, 12, 0, 74, }, /* 418 */
+ { 19, 5, 12, 0, 86, }, /* 419 */
+ { 19, 5, 12, 0, 100, }, /* 420 */
+ { 19, 5, 12, 0, 128, }, /* 421 */
+ { 19, 5, 12, 0, 112, }, /* 422 */
+ { 19, 5, 12, 0, 126, }, /* 423 */
+ { 19, 8, 12, 0, -8, }, /* 424 */
+ { 19, 5, 12, 0, 9, }, /* 425 */
+ { 19, 9, 12, 0, -74, }, /* 426 */
+ { 19, 8, 12, 0, -9, }, /* 427 */
+ { 19, 5, 12, 21, -7173, }, /* 428 */
+ { 19, 9, 12, 0, -86, }, /* 429 */
+ { 19, 9, 12, 0, -100, }, /* 430 */
+ { 19, 9, 12, 0, -112, }, /* 431 */
+ { 19, 9, 12, 0, -128, }, /* 432 */
+ { 19, 9, 12, 0, -126, }, /* 433 */
+ { 27, 1, 3, 0, 0, }, /* 434 */
+ { 9, 27, 2, 0, 0, }, /* 435 */
+ { 9, 28, 2, 0, 0, }, /* 436 */
+ { 9, 2, 2, 0, 0, }, /* 437 */
+ { 9, 9, 12, 0, 0, }, /* 438 */
+ { 9, 5, 12, 0, 0, }, /* 439 */
+ { 19, 9, 12, 67, -7517, }, /* 440 */
+ { 33, 9, 12, 71, -8383, }, /* 441 */
+ { 33, 9, 12, 75, -8262, }, /* 442 */
+ { 33, 9, 12, 0, 28, }, /* 443 */
+ { 33, 5, 12, 0, -28, }, /* 444 */
+ { 33, 14, 12, 0, 16, }, /* 445 */
+ { 33, 14, 12, 0, -16, }, /* 446 */
+ { 33, 14, 12, 0, 0, }, /* 447 */
+ { 9, 26, 12, 0, 26, }, /* 448 */
+ { 9, 26, 12, 0, -26, }, /* 449 */
+ { 4, 26, 12, 0, 0, }, /* 450 */
+ { 17, 9, 12, 0, 48, }, /* 451 */
+ { 17, 5, 12, 0, -48, }, /* 452 */
+ { 33, 9, 12, 0, -10743, }, /* 453 */
+ { 33, 9, 12, 0, -3814, }, /* 454 */
+ { 33, 9, 12, 0, -10727, }, /* 455 */
+ { 33, 5, 12, 0, -10795, }, /* 456 */
+ { 33, 5, 12, 0, -10792, }, /* 457 */
+ { 33, 9, 12, 0, -10780, }, /* 458 */
+ { 33, 9, 12, 0, -10749, }, /* 459 */
+ { 33, 9, 12, 0, -10783, }, /* 460 */
+ { 33, 9, 12, 0, -10782, }, /* 461 */
+ { 33, 9, 12, 0, -10815, }, /* 462 */
+ { 10, 5, 12, 0, 0, }, /* 463 */
+ { 10, 26, 12, 0, 0, }, /* 464 */
+ { 10, 12, 3, 0, 0, }, /* 465 */
+ { 10, 21, 12, 0, 0, }, /* 466 */
+ { 10, 15, 12, 0, 0, }, /* 467 */
+ { 16, 5, 12, 0, -7264, }, /* 468 */
+ { 58, 7, 12, 0, 0, }, /* 469 */
+ { 58, 6, 12, 0, 0, }, /* 470 */
+ { 58, 21, 12, 0, 0, }, /* 471 */
+ { 58, 12, 3, 0, 0, }, /* 472 */
+ { 22, 26, 12, 0, 0, }, /* 473 */
+ { 22, 6, 12, 0, 0, }, /* 474 */
+ { 22, 14, 12, 0, 0, }, /* 475 */
+ { 23, 10, 3, 0, 0, }, /* 476 */
+ { 26, 7, 12, 0, 0, }, /* 477 */
+ { 26, 6, 12, 0, 0, }, /* 478 */
+ { 29, 7, 12, 0, 0, }, /* 479 */
+ { 29, 6, 12, 0, 0, }, /* 480 */
+ { 3, 7, 12, 0, 0, }, /* 481 */
+ { 23, 7, 12, 0, 0, }, /* 482 */
+ { 23, 26, 12, 0, 0, }, /* 483 */
+ { 29, 26, 12, 0, 0, }, /* 484 */
+ { 22, 7, 12, 0, 0, }, /* 485 */
+ { 60, 7, 12, 0, 0, }, /* 486 */
+ { 60, 6, 12, 0, 0, }, /* 487 */
+ { 60, 26, 12, 0, 0, }, /* 488 */
+ { 85, 7, 12, 0, 0, }, /* 489 */
+ { 85, 6, 12, 0, 0, }, /* 490 */
+ { 85, 21, 12, 0, 0, }, /* 491 */
+ { 76, 7, 12, 0, 0, }, /* 492 */
+ { 76, 6, 12, 0, 0, }, /* 493 */
+ { 76, 21, 12, 0, 0, }, /* 494 */
+ { 76, 13, 12, 0, 0, }, /* 495 */
+ { 12, 7, 12, 0, 0, }, /* 496 */
+ { 12, 21, 12, 0, 0, }, /* 497 */
+ { 78, 7, 12, 0, 0, }, /* 498 */
+ { 78, 14, 12, 0, 0, }, /* 499 */
+ { 78, 12, 3, 0, 0, }, /* 500 */
+ { 78, 21, 12, 0, 0, }, /* 501 */
+ { 33, 9, 12, 0, -35332, }, /* 502 */
+ { 33, 9, 12, 0, -42280, }, /* 503 */
+ { 33, 9, 12, 0, -42308, }, /* 504 */
+ { 33, 9, 12, 0, -42319, }, /* 505 */
+ { 33, 9, 12, 0, -42315, }, /* 506 */
+ { 33, 9, 12, 0, -42305, }, /* 507 */
+ { 33, 9, 12, 0, -42258, }, /* 508 */
+ { 33, 9, 12, 0, -42282, }, /* 509 */
+ { 33, 9, 12, 0, -42261, }, /* 510 */
+ { 33, 9, 12, 0, 928, }, /* 511 */
+ { 48, 7, 12, 0, 0, }, /* 512 */
+ { 48, 12, 3, 0, 0, }, /* 513 */
+ { 48, 10, 5, 0, 0, }, /* 514 */
+ { 48, 26, 12, 0, 0, }, /* 515 */
+ { 64, 7, 12, 0, 0, }, /* 516 */
+ { 64, 21, 12, 0, 0, }, /* 517 */
+ { 74, 10, 5, 0, 0, }, /* 518 */
+ { 74, 7, 12, 0, 0, }, /* 519 */
+ { 74, 12, 3, 0, 0, }, /* 520 */
+ { 74, 21, 12, 0, 0, }, /* 521 */
+ { 74, 13, 12, 0, 0, }, /* 522 */
+ { 68, 13, 12, 0, 0, }, /* 523 */
+ { 68, 7, 12, 0, 0, }, /* 524 */
+ { 68, 12, 3, 0, 0, }, /* 525 */
+ { 68, 21, 12, 0, 0, }, /* 526 */
+ { 73, 7, 12, 0, 0, }, /* 527 */
+ { 73, 12, 3, 0, 0, }, /* 528 */
+ { 73, 10, 5, 0, 0, }, /* 529 */
+ { 73, 21, 12, 0, 0, }, /* 530 */
+ { 83, 12, 3, 0, 0, }, /* 531 */
+ { 83, 10, 5, 0, 0, }, /* 532 */
+ { 83, 7, 12, 0, 0, }, /* 533 */
+ { 83, 21, 12, 0, 0, }, /* 534 */
+ { 83, 13, 12, 0, 0, }, /* 535 */
+ { 38, 6, 12, 0, 0, }, /* 536 */
+ { 67, 7, 12, 0, 0, }, /* 537 */
+ { 67, 12, 3, 0, 0, }, /* 538 */
+ { 67, 10, 5, 0, 0, }, /* 539 */
+ { 67, 13, 12, 0, 0, }, /* 540 */
+ { 67, 21, 12, 0, 0, }, /* 541 */
+ { 91, 7, 12, 0, 0, }, /* 542 */
+ { 91, 12, 3, 0, 0, }, /* 543 */
+ { 91, 6, 12, 0, 0, }, /* 544 */
+ { 91, 21, 12, 0, 0, }, /* 545 */
+ { 86, 7, 12, 0, 0, }, /* 546 */
+ { 86, 10, 5, 0, 0, }, /* 547 */
+ { 86, 12, 3, 0, 0, }, /* 548 */
+ { 86, 21, 12, 0, 0, }, /* 549 */
+ { 86, 6, 12, 0, 0, }, /* 550 */
+ { 33, 5, 12, 0, -928, }, /* 551 */
+ { 8, 5, 12, 0, -38864, }, /* 552 */
+ { 86, 13, 12, 0, 0, }, /* 553 */
+ { 23, 7, 9, 0, 0, }, /* 554 */
+ { 23, 7, 10, 0, 0, }, /* 555 */
+ { 9, 4, 2, 0, 0, }, /* 556 */
+ { 9, 3, 12, 0, 0, }, /* 557 */
+ { 25, 25, 12, 0, 0, }, /* 558 */
+ { 0, 24, 12, 0, 0, }, /* 559 */
+ { 9, 6, 3, 0, 0, }, /* 560 */
+ { 35, 7, 12, 0, 0, }, /* 561 */
+ { 19, 14, 12, 0, 0, }, /* 562 */
+ { 19, 15, 12, 0, 0, }, /* 563 */
+ { 19, 26, 12, 0, 0, }, /* 564 */
+ { 70, 7, 12, 0, 0, }, /* 565 */
+ { 66, 7, 12, 0, 0, }, /* 566 */
+ { 41, 7, 12, 0, 0, }, /* 567 */
+ { 41, 15, 12, 0, 0, }, /* 568 */
+ { 18, 7, 12, 0, 0, }, /* 569 */
+ { 18, 14, 12, 0, 0, }, /* 570 */
+ { 117, 7, 12, 0, 0, }, /* 571 */
+ { 117, 12, 3, 0, 0, }, /* 572 */
+ { 59, 7, 12, 0, 0, }, /* 573 */
+ { 59, 21, 12, 0, 0, }, /* 574 */
+ { 42, 7, 12, 0, 0, }, /* 575 */
+ { 42, 21, 12, 0, 0, }, /* 576 */
+ { 42, 14, 12, 0, 0, }, /* 577 */
+ { 13, 9, 12, 0, 40, }, /* 578 */
+ { 13, 5, 12, 0, -40, }, /* 579 */
+ { 46, 7, 12, 0, 0, }, /* 580 */
+ { 44, 7, 12, 0, 0, }, /* 581 */
+ { 44, 13, 12, 0, 0, }, /* 582 */
+ { 105, 7, 12, 0, 0, }, /* 583 */
+ { 103, 7, 12, 0, 0, }, /* 584 */
+ { 103, 21, 12, 0, 0, }, /* 585 */
+ { 109, 7, 12, 0, 0, }, /* 586 */
+ { 11, 7, 12, 0, 0, }, /* 587 */
+ { 80, 7, 12, 0, 0, }, /* 588 */
+ { 80, 21, 12, 0, 0, }, /* 589 */
+ { 80, 15, 12, 0, 0, }, /* 590 */
+ { 119, 7, 12, 0, 0, }, /* 591 */
+ { 119, 26, 12, 0, 0, }, /* 592 */
+ { 119, 15, 12, 0, 0, }, /* 593 */
+ { 115, 7, 12, 0, 0, }, /* 594 */
+ { 115, 15, 12, 0, 0, }, /* 595 */
+ { 127, 7, 12, 0, 0, }, /* 596 */
+ { 127, 15, 12, 0, 0, }, /* 597 */
+ { 65, 7, 12, 0, 0, }, /* 598 */
+ { 65, 15, 12, 0, 0, }, /* 599 */
+ { 65, 21, 12, 0, 0, }, /* 600 */
+ { 71, 7, 12, 0, 0, }, /* 601 */
+ { 71, 21, 12, 0, 0, }, /* 602 */
+ { 97, 7, 12, 0, 0, }, /* 603 */
+ { 96, 7, 12, 0, 0, }, /* 604 */
+ { 96, 15, 12, 0, 0, }, /* 605 */
+ { 30, 7, 12, 0, 0, }, /* 606 */
+ { 30, 12, 3, 0, 0, }, /* 607 */
+ { 30, 15, 12, 0, 0, }, /* 608 */
+ { 30, 21, 12, 0, 0, }, /* 609 */
+ { 87, 7, 12, 0, 0, }, /* 610 */
+ { 87, 15, 12, 0, 0, }, /* 611 */
+ { 87, 21, 12, 0, 0, }, /* 612 */
+ { 116, 7, 12, 0, 0, }, /* 613 */
+ { 116, 15, 12, 0, 0, }, /* 614 */
+ { 111, 7, 12, 0, 0, }, /* 615 */
+ { 111, 26, 12, 0, 0, }, /* 616 */
+ { 111, 12, 3, 0, 0, }, /* 617 */
+ { 111, 15, 12, 0, 0, }, /* 618 */
+ { 111, 21, 12, 0, 0, }, /* 619 */
+ { 77, 7, 12, 0, 0, }, /* 620 */
+ { 77, 21, 12, 0, 0, }, /* 621 */
+ { 82, 7, 12, 0, 0, }, /* 622 */
+ { 82, 15, 12, 0, 0, }, /* 623 */
+ { 81, 7, 12, 0, 0, }, /* 624 */
+ { 81, 15, 12, 0, 0, }, /* 625 */
+ { 120, 7, 12, 0, 0, }, /* 626 */
+ { 120, 21, 12, 0, 0, }, /* 627 */
+ { 120, 15, 12, 0, 0, }, /* 628 */
+ { 88, 7, 12, 0, 0, }, /* 629 */
+ { 129, 9, 12, 0, 64, }, /* 630 */
+ { 129, 5, 12, 0, -64, }, /* 631 */
+ { 129, 15, 12, 0, 0, }, /* 632 */
+ { 0, 15, 12, 0, 0, }, /* 633 */
+ { 93, 10, 5, 0, 0, }, /* 634 */
+ { 93, 12, 3, 0, 0, }, /* 635 */
+ { 93, 7, 12, 0, 0, }, /* 636 */
+ { 93, 21, 12, 0, 0, }, /* 637 */
+ { 93, 15, 12, 0, 0, }, /* 638 */
+ { 93, 13, 12, 0, 0, }, /* 639 */
+ { 84, 12, 3, 0, 0, }, /* 640 */
+ { 84, 10, 5, 0, 0, }, /* 641 */
+ { 84, 7, 12, 0, 0, }, /* 642 */
+ { 84, 21, 12, 0, 0, }, /* 643 */
+ { 84, 1, 2, 0, 0, }, /* 644 */
+ { 100, 7, 12, 0, 0, }, /* 645 */
+ { 100, 13, 12, 0, 0, }, /* 646 */
+ { 95, 12, 3, 0, 0, }, /* 647 */
+ { 95, 7, 12, 0, 0, }, /* 648 */
+ { 95, 10, 5, 0, 0, }, /* 649 */
+ { 95, 13, 12, 0, 0, }, /* 650 */
+ { 95, 21, 12, 0, 0, }, /* 651 */
+ { 110, 7, 12, 0, 0, }, /* 652 */
+ { 110, 12, 3, 0, 0, }, /* 653 */
+ { 110, 21, 12, 0, 0, }, /* 654 */
+ { 99, 12, 3, 0, 0, }, /* 655 */
+ { 99, 10, 5, 0, 0, }, /* 656 */
+ { 99, 7, 12, 0, 0, }, /* 657 */
+ { 99, 21, 12, 0, 0, }, /* 658 */
+ { 99, 13, 12, 0, 0, }, /* 659 */
+ { 47, 15, 12, 0, 0, }, /* 660 */
+ { 107, 7, 12, 0, 0, }, /* 661 */
+ { 107, 10, 5, 0, 0, }, /* 662 */
+ { 107, 12, 3, 0, 0, }, /* 663 */
+ { 107, 21, 12, 0, 0, }, /* 664 */
+ { 128, 7, 12, 0, 0, }, /* 665 */
+ { 128, 21, 12, 0, 0, }, /* 666 */
+ { 108, 7, 12, 0, 0, }, /* 667 */
+ { 108, 12, 3, 0, 0, }, /* 668 */
+ { 108, 10, 5, 0, 0, }, /* 669 */
+ { 108, 13, 12, 0, 0, }, /* 670 */
+ { 106, 12, 3, 0, 0, }, /* 671 */
+ { 106, 10, 5, 0, 0, }, /* 672 */
+ { 106, 7, 12, 0, 0, }, /* 673 */
+ { 106, 10, 3, 0, 0, }, /* 674 */
+ { 123, 7, 12, 0, 0, }, /* 675 */
+ { 123, 10, 3, 0, 0, }, /* 676 */
+ { 123, 10, 5, 0, 0, }, /* 677 */
+ { 123, 12, 3, 0, 0, }, /* 678 */
+ { 123, 21, 12, 0, 0, }, /* 679 */
+ { 123, 13, 12, 0, 0, }, /* 680 */
+ { 122, 7, 12, 0, 0, }, /* 681 */
+ { 122, 10, 3, 0, 0, }, /* 682 */
+ { 122, 10, 5, 0, 0, }, /* 683 */
+ { 122, 12, 3, 0, 0, }, /* 684 */
+ { 122, 21, 12, 0, 0, }, /* 685 */
+ { 113, 7, 12, 0, 0, }, /* 686 */
+ { 113, 10, 5, 0, 0, }, /* 687 */
+ { 113, 12, 3, 0, 0, }, /* 688 */
+ { 113, 21, 12, 0, 0, }, /* 689 */
+ { 113, 13, 12, 0, 0, }, /* 690 */
+ { 101, 7, 12, 0, 0, }, /* 691 */
+ { 101, 12, 3, 0, 0, }, /* 692 */
+ { 101, 10, 5, 0, 0, }, /* 693 */
+ { 101, 13, 12, 0, 0, }, /* 694 */
+ { 125, 7, 12, 0, 0, }, /* 695 */
+ { 125, 12, 3, 0, 0, }, /* 696 */
+ { 125, 10, 5, 0, 0, }, /* 697 */
+ { 125, 13, 12, 0, 0, }, /* 698 */
+ { 125, 15, 12, 0, 0, }, /* 699 */
+ { 125, 21, 12, 0, 0, }, /* 700 */
+ { 125, 26, 12, 0, 0, }, /* 701 */
+ { 124, 9, 12, 0, 32, }, /* 702 */
+ { 124, 5, 12, 0, -32, }, /* 703 */
+ { 124, 13, 12, 0, 0, }, /* 704 */
+ { 124, 15, 12, 0, 0, }, /* 705 */
+ { 124, 7, 12, 0, 0, }, /* 706 */
+ { 121, 7, 12, 0, 0, }, /* 707 */
+ { 62, 7, 12, 0, 0, }, /* 708 */
+ { 62, 14, 12, 0, 0, }, /* 709 */
+ { 62, 21, 12, 0, 0, }, /* 710 */
+ { 79, 7, 12, 0, 0, }, /* 711 */
+ { 126, 7, 12, 0, 0, }, /* 712 */
+ { 114, 7, 12, 0, 0, }, /* 713 */
+ { 114, 13, 12, 0, 0, }, /* 714 */
+ { 114, 21, 12, 0, 0, }, /* 715 */
+ { 102, 7, 12, 0, 0, }, /* 716 */
+ { 102, 12, 3, 0, 0, }, /* 717 */
+ { 102, 21, 12, 0, 0, }, /* 718 */
+ { 118, 7, 12, 0, 0, }, /* 719 */
+ { 118, 12, 3, 0, 0, }, /* 720 */
+ { 118, 21, 12, 0, 0, }, /* 721 */
+ { 118, 26, 12, 0, 0, }, /* 722 */
+ { 118, 6, 12, 0, 0, }, /* 723 */
+ { 118, 13, 12, 0, 0, }, /* 724 */
+ { 118, 15, 12, 0, 0, }, /* 725 */
+ { 98, 7, 12, 0, 0, }, /* 726 */
+ { 98, 10, 5, 0, 0, }, /* 727 */
+ { 98, 12, 3, 0, 0, }, /* 728 */
+ { 98, 6, 12, 0, 0, }, /* 729 */
+ { 104, 7, 12, 0, 0, }, /* 730 */
+ { 104, 26, 12, 0, 0, }, /* 731 */
+ { 104, 12, 3, 0, 0, }, /* 732 */
+ { 104, 21, 12, 0, 0, }, /* 733 */
+ { 9, 10, 3, 0, 0, }, /* 734 */
+ { 19, 12, 3, 0, 0, }, /* 735 */
+ { 130, 26, 12, 0, 0, }, /* 736 */
+ { 130, 12, 3, 0, 0, }, /* 737 */
+ { 130, 21, 12, 0, 0, }, /* 738 */
+ { 112, 7, 12, 0, 0, }, /* 739 */
+ { 112, 15, 12, 0, 0, }, /* 740 */
+ { 112, 12, 3, 0, 0, }, /* 741 */
+ { 9, 26, 11, 0, 0, }, /* 742 */
+ { 26, 26, 12, 0, 0, }, /* 743 */
};
const uint8_t PRIV(ucd_stage1)[] = { /* 8704 bytes */
@@ -839,19 +863,19 @@ const uint8_t PRIV(ucd_stage1)[] = { /* 8704 bytes */
123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F000 */
123,123, 95, 95,124,125,126,127,128,128,129,130,131,132,133,134, /* U+F800 */
135,136,137,138,139,140,141,142,143,144,145,139,146,146,147,139, /* U+10000 */
-148,149,150,151,152,153,154,155,156,139,139,139,157,139,139,139, /* U+10800 */
-158,159,160,161,162,163,164,139,139,165,139,166,167,168,139,139, /* U+11000 */
-139,169,139,139,139,170,139,139,139,139,139,139,139,139,139,139, /* U+11800 */
-171,171,171,171,171,171,171,172,173,139,139,139,139,139,139,139, /* U+12000 */
+148,149,150,151,152,153,154,155,156,157,139,139,158,139,139,139, /* U+10800 */
+159,160,161,162,163,164,165,139,139,166,139,167,168,169,170,139, /* U+11000 */
+139,171,139,139,139,172,139,139,139,139,139,139,139,139,139,139, /* U+11800 */
+173,173,173,173,173,173,173,174,175,173,176,139,139,139,139,139, /* U+12000 */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+12800 */
-174,174,174,174,174,174,174,174,175,139,139,139,139,139,139,139, /* U+13000 */
+177,177,177,177,177,177,177,177,178,139,139,139,139,139,139,139, /* U+13000 */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+13800 */
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+14000 */
+139,139,139,139,139,139,139,139,179,179,179,179,180,139,139,139, /* U+14000 */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+14800 */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+15000 */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+15800 */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+16000 */
-176,176,176,176,177,178,179,180,139,139,139,139,139,139,181,182, /* U+16800 */
+181,181,181,181,182,183,184,185,139,139,139,139,139,139,186,187, /* U+16800 */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+17000 */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+17800 */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+18000 */
@@ -860,16 +884,16 @@ const uint8_t PRIV(ucd_stage1)[] = { /* 8704 bytes */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+19800 */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+1A000 */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+1A800 */
-183,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+1B000 */
-139,139,139,139,139,139,139,139,184,185,139,139,139,139,139,139, /* U+1B800 */
+188,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+1B000 */
+139,139,139,139,139,139,139,139,189,190,139,139,139,139,139,139, /* U+1B800 */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+1C000 */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+1C800 */
- 71,186,187,188,189,139,190,139,191,192,193,194,195,196,197,198, /* U+1D000 */
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+1D800 */
+ 71,191,192,193,194,139,195,139,196,197,198,199,200,201,202,203, /* U+1D000 */
+204,204,204,204,205,206,139,139,139,139,139,139,139,139,139,139, /* U+1D800 */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+1E000 */
-199,200,139,139,139,139,139,139,139,139,139,139,201,202,139,139, /* U+1E800 */
-203,204,205,206,207,139,208,209, 71,210,211,212,213,214,215,216, /* U+1F000 */
-217,218,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+1F800 */
+207,208,139,139,139,139,139,139,139,139,139,139,209,210,139,139, /* U+1E800 */
+211,212,213,214,215,139, 71,216, 71, 71,217,218, 71,219,220,221, /* U+1F000 */
+222,223,224,225,139,139,139,139,139,139,139,139,139,139,139,139, /* U+1F800 */
95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+20000 */
95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+20800 */
95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+21000 */
@@ -890,18 +914,18 @@ const uint8_t PRIV(ucd_stage1)[] = { /* 8704 bytes */
95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+28800 */
95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+29000 */
95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+29800 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,219, 95, 95, /* U+2A000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,226, 95, 95, /* U+2A000 */
95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+2A800 */
- 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,220, 95, /* U+2B000 */
-221,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+2B800 */
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+2C000 */
-139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+2C800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,227, 95, /* U+2B000 */
+228, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+2B800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+2C000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,229,139,139, /* U+2C800 */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+2D000 */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+2D800 */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+2E000 */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+2E800 */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+2F000 */
- 95, 95, 95, 95,221,139,139,139,139,139,139,139,139,139,139,139, /* U+2F800 */
+ 95, 95, 95, 95,230,139,139,139,139,139,139,139,139,139,139,139, /* U+2F800 */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+30000 */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+30800 */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+31000 */
@@ -1254,8 +1278,8 @@ const uint8_t PRIV(ucd_stage1)[] = { /* 8704 bytes */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+DE800 */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+DF000 */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+DF800 */
-222,223,224,225,223,223,223,223,223,223,223,223,223,223,223,223, /* U+E0000 */
-223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,223, /* U+E0800 */
+231,232,233,234,232,232,232,232,232,232,232,232,232,232,232,232, /* U+E0000 */
+232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232, /* U+E0800 */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+E1000 */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+E1800 */
139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+E2000 */
@@ -1317,7 +1341,7 @@ const uint8_t PRIV(ucd_stage1)[] = { /* 8704 bytes */
123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FE000 */
123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FE800 */
123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FF000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,226, /* U+FF800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,235, /* U+FF800 */
123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+100000 */
123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+100800 */
123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+101000 */
@@ -1349,10 +1373,10 @@ const uint8_t PRIV(ucd_stage1)[] = { /* 8704 bytes */
123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10E000 */
123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10E800 */
123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10F000 */
-123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,226, /* U+10F800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,235, /* U+10F800 */
};
-const uint16_t PRIV(ucd_stage2)[] = { /* 58112 bytes, block = 128 */
+const uint16_t PRIV(ucd_stage2)[] = { /* 60416 bytes, block = 128 */
/* block 0 */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -1405,533 +1429,533 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 58112 bytes, block = 128 */
/* block 5 */
99, 33, 33, 99, 33, 33, 33,100, 99,101,102,102,103, 33, 33, 33,
- 33, 33,104, 33, 20, 33, 33, 33, 33, 33, 33, 33, 33, 33,105, 33,
+ 33, 33,104, 33, 20, 33, 33, 33, 33, 33, 33, 33, 33,105,106, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
-106,106,106,106,106,106,106,106,106,107,107,107,107,107,107,107,
-107,107, 14, 14, 14, 14,107,107,107,107,107,107,107,107,107,107,
-107,107, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-106,106,106,106,106, 14, 14, 14, 14, 14,108,108,107, 14,107, 14,
+107,107,107,107,107,107,107,107,107,108,108,108,108,108,108,108,
+108,108, 14, 14, 14, 14,108,108,108,108,108,108,108,108,108,108,
+108,108, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+107,107,107,107,107, 14, 14, 14, 14, 14,109,109,108, 14,108, 14,
14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
/* block 6 */
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,110,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-111,112,111,112,107,113,111,112,114,114,115,116,116,116, 4,117,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,111,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+112,113,112,113,108,114,112,113,115,115,116,117,117,117, 4,118,
/* block 7 */
-114,114,114,114,113, 14,118, 4,119,119,119,114,120,114,121,121,
-122,123,124,123,123,125,123,123,126,127,128,123,129,123,123,123,
-130,131,114,132,123,123,133,123,123,134,123,123,135,136,136,136,
-122,137,138,137,137,139,137,137,140,141,142,137,143,137,137,137,
-144,145,146,147,137,137,148,137,137,149,137,137,150,151,151,152,
-153,154,155,155,155,156,157,158,111,112,111,112,111,112,111,112,
-111,112,159,160,159,160,159,160,159,160,159,160,159,160,159,160,
-161,162,163,164,165,166,167,111,112,168,111,112,122,169,169,169,
+115,115,115,115,114, 14,119, 4,120,120,120,115,121,115,122,122,
+123,124,125,124,124,126,124,124,127,128,129,124,130,124,124,124,
+131,132,115,133,124,124,134,124,124,135,124,124,136,137,137,137,
+123,138,139,138,138,140,138,138,141,142,143,138,144,138,138,138,
+145,146,147,148,138,138,149,138,138,150,138,138,151,152,152,153,
+154,155,156,156,156,157,158,159,112,113,112,113,112,113,112,113,
+112,113,160,161,160,161,160,161,160,161,160,161,160,161,160,161,
+162,163,164,165,166,167,168,112,113,169,112,113,123,170,170,170,
/* block 8 */
-170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,
-171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,
171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,
172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
-174,175,174,175,174,175,174,175,174,175,174,175,174,175,174,175,
-174,175,174,175,174,175,174,175,174,175,174,175,174,175,174,175,
+173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
+174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,175,176,
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,175,176,
/* block 9 */
-174,175,176,177,177,109,109,177,178,178,174,175,174,175,174,175,
-174,175,174,175,174,175,174,175,174,175,174,175,174,175,174,175,
-174,175,174,175,174,175,174,175,174,175,174,175,174,175,174,175,
-174,175,174,175,174,175,174,175,174,175,174,175,174,175,174,175,
-179,174,175,174,175,174,175,174,175,174,175,174,175,174,175,180,
-174,175,174,175,174,175,174,175,174,175,174,175,174,175,174,175,
-174,175,174,175,174,175,174,175,174,175,174,175,174,175,174,175,
-174,175,174,175,174,175,174,175,174,175,174,175,174,175,174,175,
+175,176,177,178,178,110,110,178,179,179,175,176,175,176,175,176,
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,175,176,
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,175,176,
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,175,176,
+180,175,176,175,176,175,176,175,176,175,176,175,176,175,176,181,
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,175,176,
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,175,176,
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,175,176,
/* block 10 */
-174,175,174,175,174,175,174,175,174,175,174,175,174,175,174,175,
-174,175,174,175,174,175,174,175,174,175,174,175,174,175,174,175,
-174,175,174,175,174,175,174,175,174,175,174,175,174,175,174,175,
-114,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,
-181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,
-181,181,181,181,181,181,181,114,114,182,183,183,183,183,183,183,
-114,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
-184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,184,
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,175,176,
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,175,176,
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,175,176,
+115,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
+182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
+182,182,182,182,182,182,182,115,115,183,184,184,184,184,184,184,
+115,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
+185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
/* block 11 */
-184,184,184,184,184,184,184,185,114, 4,186,114,114,187,187,188,
-114,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,189,
-189,189,189,189,189,189,189,189,189,189,189,189,189,189,190,189,
-191,189,189,191,189,189,191,189,114,114,114,114,114,114,114,114,
-192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,
-192,192,192,192,192,192,192,192,192,192,192,114,114,114,114,114,
-192,192,192,191,191,114,114,114,114,114,114,114,114,114,114,114,
+185,185,185,185,185,185,185,186,115, 4,187,115,115,188,188,189,
+115,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
+190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
+190,190,190,190,190,190,190,190,190,190,190,190,190,190,191,190,
+192,190,190,192,190,190,192,190,115,115,115,115,115,115,115,115,
+193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,
+193,193,193,193,193,193,193,193,193,193,193,115,115,115,115,115,
+193,193,193,192,192,115,115,115,115,115,115,115,115,115,115,115,
/* block 12 */
-193,193,193,193,193, 22,194,194,194,195,195,196, 4,195,197,197,
-198,198,198,198,198,198,198,198,198,198,198, 4, 22,114,195, 4,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-107,199,199,199,199,199,199,199,199,199,199,109,109,109,109,109,
-109,109,109,109,109,109,198,198,198,198,198,198,198,198,198,198,
- 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,195,195,195,195,199,199,
-109,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
+194,194,194,194,194, 22,195,195,195,196,196,197, 4,196,198,198,
+199,199,199,199,199,199,199,199,199,199,199, 4, 22,115,196, 4,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+108,200,200,200,200,200,200,200,200,200,200,110,110,110,110,110,
+110,110,110,110,110,110,199,199,199,199,199,199,199,199,199,199,
+201,201,201,201,201,201,201,201,201,201,196,196,196,196,200,200,
+110,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
/* block 13 */
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,195,199,198,198,198,198,198,198,198, 22,197,198,
-198,198,198,198,198,200,200,198,198,197,198,198,198,198,199,199,
-201,201,201,201,201,201,201,201,201,201,199,199,199,197,197,199,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,196,200,199,199,199,199,199,199,199, 22,198,199,
+199,199,199,199,199,202,202,199,199,198,199,199,199,199,200,200,
+201,201,201,201,201,201,201,201,201,201,200,200,200,198,198,200,
/* block 14 */
-202,202,202,202,202,202,202,202,202,202,202,202,202,202,114,203,
-204,205,204,204,204,204,204,204,204,204,204,204,204,204,204,204,
-204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,204,
+203,203,203,203,203,203,203,203,203,203,203,203,203,203,115,204,
+205,206,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
-205,205,205,205,205,205,205,205,205,205,205,114,114,204,204,204,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
+206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
+206,206,206,206,206,206,206,206,206,206,206,115,115,205,205,205,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
/* block 15 */
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
-206,206,206,206,206,206,207,207,207,207,207,207,207,207,207,207,
-207,206,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-208,208,208,208,208,208,208,208,208,208,209,209,209,209,209,209,
-209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,209,
-209,209,209,209,209,209,209,209,209,209,209,210,210,210,210,210,
-210,210,210,210,211,211,212,213,213,213,211,114,114,114,114,114,
+207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
+207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
+207,207,207,207,207,207,208,208,208,208,208,208,208,208,208,208,
+208,207,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+209,209,209,209,209,209,209,209,209,209,210,210,210,210,210,210,
+210,210,210,210,210,210,210,210,210,210,210,210,210,210,210,210,
+210,210,210,210,210,210,210,210,210,210,210,211,211,211,211,211,
+211,211,211,211,212,212,213,214,214,214,212,115,115,115,115,115,
/* block 16 */
-214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,
-214,214,214,214,214,214,215,215,215,215,216,215,215,215,215,215,
-215,215,215,215,216,215,215,215,216,215,215,215,215,215,114,114,
-217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,114,
-218,218,218,218,218,218,218,218,218,218,218,218,218,218,218,218,
-218,218,218,218,218,218,218,218,218,219,219,219,114,114,220,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,
+215,215,215,215,215,215,216,216,216,216,217,216,216,216,216,216,
+216,216,216,216,217,216,216,216,217,216,216,216,216,216,115,115,
+218,218,218,218,218,218,218,218,218,218,218,218,218,218,218,115,
+219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,
+219,219,219,219,219,219,219,219,219,220,220,220,115,115,221,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 17 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,199,199,199,199,199,199,199,199,199,199,199,199,199,
199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,198,198,198,198,198,198,198,198,198,198,198,198,
-198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,198,
/* block 18 */
-221,221,221,222,223,223,223,223,223,223,223,223,223,223,223,223,
-223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,
-223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,
-223,223,223,223,223,223,223,223,223,223,221,222,221,223,222,222,
-222,221,221,221,221,221,221,221,221,222,222,222,222,221,222,222,
-223,109,109,221,221,221,221,221,223,223,223,223,223,223,223,223,
-223,223,221,221, 4, 4,224,224,224,224,224,224,224,224,224,224,
-225,226,223,223,223,223,223,223,223,223,223,223,223,223,223,223,
+222,222,222,223,224,224,224,224,224,224,224,224,224,224,224,224,
+224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,
+224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,
+224,224,224,224,224,224,224,224,224,224,222,223,222,224,223,223,
+223,222,222,222,222,222,222,222,222,223,223,223,223,222,223,223,
+224,110,110,222,222,222,222,222,224,224,224,224,224,224,224,224,
+224,224,222,222, 4, 4,225,225,225,225,225,225,225,225,225,225,
+226,227,224,224,224,224,224,224,224,224,224,224,224,224,224,224,
/* block 19 */
-227,228,229,229,114,227,227,227,227,227,227,227,227,114,114,227,
-227,114,114,227,227,227,227,227,227,227,227,227,227,227,227,227,
-227,227,227,227,227,227,227,227,227,114,227,227,227,227,227,227,
-227,114,227,114,114,114,227,227,227,227,114,114,228,227,230,229,
-229,228,228,228,228,114,114,229,229,114,114,229,229,228,227,114,
-114,114,114,114,114,114,114,230,114,114,114,114,227,227,114,227,
-227,227,228,228,114,114,231,231,231,231,231,231,231,231,231,231,
-227,227,232,232,233,233,233,233,233,233,234,232,114,114,114,114,
+228,229,230,230,115,228,228,228,228,228,228,228,228,115,115,228,
+228,115,115,228,228,228,228,228,228,228,228,228,228,228,228,228,
+228,228,228,228,228,228,228,228,228,115,228,228,228,228,228,228,
+228,115,228,115,115,115,228,228,228,228,115,115,229,228,231,230,
+230,229,229,229,229,115,115,230,230,115,115,230,230,229,228,115,
+115,115,115,115,115,115,115,231,115,115,115,115,228,228,115,228,
+228,228,229,229,115,115,232,232,232,232,232,232,232,232,232,232,
+228,228,233,233,234,234,234,234,234,234,235,233,115,115,115,115,
/* block 20 */
-114,235,235,236,114,237,237,237,237,237,237,114,114,114,114,237,
-237,114,114,237,237,237,237,237,237,237,237,237,237,237,237,237,
-237,237,237,237,237,237,237,237,237,114,237,237,237,237,237,237,
-237,114,237,237,114,237,237,114,237,237,114,114,235,114,236,236,
-236,235,235,114,114,114,114,235,235,114,114,235,235,235,114,114,
-114,235,114,114,114,114,114,114,114,237,237,237,237,114,237,114,
-114,114,114,114,114,114,238,238,238,238,238,238,238,238,238,238,
-235,235,237,237,237,235,114,114,114,114,114,114,114,114,114,114,
+115,236,236,237,115,238,238,238,238,238,238,115,115,115,115,238,
+238,115,115,238,238,238,238,238,238,238,238,238,238,238,238,238,
+238,238,238,238,238,238,238,238,238,115,238,238,238,238,238,238,
+238,115,238,238,115,238,238,115,238,238,115,115,236,115,237,237,
+237,236,236,115,115,115,115,236,236,115,115,236,236,236,115,115,
+115,236,115,115,115,115,115,115,115,238,238,238,238,115,238,115,
+115,115,115,115,115,115,239,239,239,239,239,239,239,239,239,239,
+236,236,238,238,238,236,115,115,115,115,115,115,115,115,115,115,
/* block 21 */
-114,239,239,240,114,241,241,241,241,241,241,241,241,241,114,241,
-241,241,114,241,241,241,241,241,241,241,241,241,241,241,241,241,
-241,241,241,241,241,241,241,241,241,114,241,241,241,241,241,241,
-241,114,241,241,114,241,241,241,241,241,114,114,239,241,240,240,
-240,239,239,239,239,239,114,239,239,240,114,240,240,239,114,114,
-241,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-241,241,239,239,114,114,242,242,242,242,242,242,242,242,242,242,
-243,244,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+115,240,240,241,115,242,242,242,242,242,242,242,242,242,115,242,
+242,242,115,242,242,242,242,242,242,242,242,242,242,242,242,242,
+242,242,242,242,242,242,242,242,242,115,242,242,242,242,242,242,
+242,115,242,242,115,242,242,242,242,242,115,115,240,242,241,241,
+241,240,240,240,240,240,115,240,240,241,115,241,241,240,115,115,
+242,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+242,242,240,240,115,115,243,243,243,243,243,243,243,243,243,243,
+244,245,115,115,115,115,115,115,115,242,115,115,115,115,115,115,
/* block 22 */
-114,245,246,246,114,247,247,247,247,247,247,247,247,114,114,247,
-247,114,114,247,247,247,247,247,247,247,247,247,247,247,247,247,
-247,247,247,247,247,247,247,247,247,114,247,247,247,247,247,247,
-247,114,247,247,114,247,247,247,247,247,114,114,245,247,248,245,
-246,245,245,245,245,114,114,246,246,114,114,246,246,245,114,114,
-114,114,114,114,114,114,245,248,114,114,114,114,247,247,114,247,
-247,247,245,245,114,114,249,249,249,249,249,249,249,249,249,249,
-250,247,251,251,251,251,251,251,114,114,114,114,114,114,114,114,
+115,246,247,247,115,248,248,248,248,248,248,248,248,115,115,248,
+248,115,115,248,248,248,248,248,248,248,248,248,248,248,248,248,
+248,248,248,248,248,248,248,248,248,115,248,248,248,248,248,248,
+248,115,248,248,115,248,248,248,248,248,115,115,246,248,249,246,
+247,246,246,246,246,115,115,247,247,115,115,247,247,246,115,115,
+115,115,115,115,115,115,246,249,115,115,115,115,248,248,115,248,
+248,248,246,246,115,115,250,250,250,250,250,250,250,250,250,250,
+251,248,252,252,252,252,252,252,115,115,115,115,115,115,115,115,
/* block 23 */
-114,114,252,253,114,253,253,253,253,253,253,114,114,114,253,253,
-253,114,253,253,253,253,114,114,114,253,253,114,253,114,253,253,
-114,114,114,253,253,114,114,114,253,253,253,114,114,114,253,253,
-253,253,253,253,253,253,253,253,253,253,114,114,114,114,254,255,
-252,255,255,114,114,114,255,255,255,114,255,255,255,252,114,114,
-253,114,114,114,114,114,114,254,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,256,256,256,256,256,256,256,256,256,256,
-257,257,257,258,258,258,258,258,258,259,258,114,114,114,114,114,
+115,115,253,254,115,254,254,254,254,254,254,115,115,115,254,254,
+254,115,254,254,254,254,115,115,115,254,254,115,254,115,254,254,
+115,115,115,254,254,115,115,115,254,254,254,115,115,115,254,254,
+254,254,254,254,254,254,254,254,254,254,115,115,115,115,255,256,
+253,256,256,115,115,115,256,256,256,115,256,256,256,253,115,115,
+254,115,115,115,115,115,115,255,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,257,257,257,257,257,257,257,257,257,257,
+258,258,258,259,259,259,259,259,259,260,259,115,115,115,115,115,
/* block 24 */
-260,261,261,261,114,262,262,262,262,262,262,262,262,114,262,262,
-262,114,262,262,262,262,262,262,262,262,262,262,262,262,262,262,
-262,262,262,262,262,262,262,262,262,114,262,262,262,262,262,262,
-262,262,262,262,262,262,262,262,262,262,114,114,114,262,260,260,
-260,261,261,261,261,114,260,260,260,114,260,260,260,260,114,114,
-114,114,114,114,114,260,260,114,262,262,114,114,114,114,114,114,
-262,262,260,260,114,114,263,263,263,263,263,263,263,263,263,263,
-114,114,114,114,114,114,114,114,264,264,264,264,264,264,264,265,
+261,262,262,262,115,263,263,263,263,263,263,263,263,115,263,263,
+263,115,263,263,263,263,263,263,263,263,263,263,263,263,263,263,
+263,263,263,263,263,263,263,263,263,115,263,263,263,263,263,263,
+263,263,263,263,263,263,263,263,263,263,115,115,115,263,261,261,
+261,262,262,262,262,115,261,261,261,115,261,261,261,261,115,115,
+115,115,115,115,115,261,261,115,263,263,263,115,115,115,115,115,
+263,263,261,261,115,115,264,264,264,264,264,264,264,264,264,264,
+115,115,115,115,115,115,115,115,265,265,265,265,265,265,265,266,
/* block 25 */
-114,266,267,267,114,268,268,268,268,268,268,268,268,114,268,268,
-268,114,268,268,268,268,268,268,268,268,268,268,268,268,268,268,
-268,268,268,268,268,268,268,268,268,114,268,268,268,268,268,268,
-268,268,268,268,114,268,268,268,268,268,114,114,266,268,267,266,
-267,267,269,267,267,114,266,267,267,114,267,267,266,266,114,114,
-114,114,114,114,114,269,269,114,114,114,114,114,114,114,268,114,
-268,268,266,266,114,114,270,270,270,270,270,270,270,270,270,270,
-114,268,268,114,114,114,114,114,114,114,114,114,114,114,114,114,
+115,267,268,268,115,269,269,269,269,269,269,269,269,115,269,269,
+269,115,269,269,269,269,269,269,269,269,269,269,269,269,269,269,
+269,269,269,269,269,269,269,269,269,115,269,269,269,269,269,269,
+269,269,269,269,115,269,269,269,269,269,115,115,267,269,268,267,
+268,268,270,268,268,115,267,268,268,115,268,268,267,267,115,115,
+115,115,115,115,115,270,270,115,115,115,115,115,115,115,269,115,
+269,269,267,267,115,115,271,271,271,271,271,271,271,271,271,271,
+115,269,269,115,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 26 */
-114,271,272,272,114,273,273,273,273,273,273,273,273,114,273,273,
-273,114,273,273,273,273,273,273,273,273,273,273,273,273,273,273,
-273,273,273,273,273,273,273,273,273,273,273,273,273,273,273,273,
-273,273,273,273,273,273,273,273,273,273,273,114,114,273,274,272,
-272,271,271,271,271,114,272,272,272,114,272,272,272,271,273,114,
-114,114,114,114,114,114,114,274,114,114,114,114,114,114,114,114,
-273,273,271,271,114,114,275,275,275,275,275,275,275,275,275,275,
-276,276,276,276,276,276,114,114,114,277,273,273,273,273,273,273,
+115,272,273,273,115,274,274,274,274,274,274,274,274,115,274,274,
+274,115,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
+274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
+274,274,274,274,274,274,274,274,274,274,274,115,115,274,275,273,
+273,272,272,272,272,115,273,273,273,115,273,273,273,272,274,115,
+115,115,115,115,115,115,115,275,115,115,115,115,115,115,115,274,
+274,274,272,272,115,115,276,276,276,276,276,276,276,276,276,276,
+277,277,277,277,277,277,115,115,115,278,274,274,274,274,274,274,
/* block 27 */
-114,114,278,278,114,279,279,279,279,279,279,279,279,279,279,279,
-279,279,279,279,279,279,279,114,114,114,279,279,279,279,279,279,
-279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,279,
-279,279,114,279,279,279,279,279,279,279,279,279,114,279,114,114,
-279,279,279,279,279,279,279,114,114,114,280,114,114,114,114,281,
-278,278,280,280,280,114,280,114,278,278,278,278,278,278,278,281,
-114,114,114,114,114,114,282,282,282,282,282,282,282,282,282,282,
-114,114,278,278,283,114,114,114,114,114,114,114,114,114,114,114,
+115,115,279,279,115,280,280,280,280,280,280,280,280,280,280,280,
+280,280,280,280,280,280,280,115,115,115,280,280,280,280,280,280,
+280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,
+280,280,115,280,280,280,280,280,280,280,280,280,115,280,115,115,
+280,280,280,280,280,280,280,115,115,115,281,115,115,115,115,282,
+279,279,281,281,281,115,281,115,279,279,279,279,279,279,279,282,
+115,115,115,115,115,115,283,283,283,283,283,283,283,283,283,283,
+115,115,279,279,284,115,115,115,115,115,115,115,115,115,115,115,
/* block 28 */
-114,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
-284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
-284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,284,
-284,285,284,286,285,285,285,285,285,285,285,114,114,114,114, 5,
-284,284,284,284,284,284,287,285,285,285,285,285,285,285,285,288,
-289,289,289,289,289,289,289,289,289,289,288,288,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+115,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,
+285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,
+285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,
+285,286,285,287,286,286,286,286,286,286,286,115,115,115,115, 5,
+285,285,285,285,285,285,288,286,286,286,286,286,286,286,286,289,
+290,290,290,290,290,290,290,290,290,290,289,289,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 29 */
-114,290,290,114,290,114,114,290,290,114,290,114,114,290,114,114,
-114,114,114,114,290,290,290,290,114,290,290,290,290,290,290,290,
-114,290,290,290,114,290,114,290,114,114,290,290,114,290,290,290,
-290,291,290,292,291,291,291,291,291,291,114,291,291,290,114,114,
-290,290,290,290,290,114,293,114,291,291,291,291,291,291,114,114,
-294,294,294,294,294,294,294,294,294,294,114,114,290,290,290,290,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+115,291,291,115,291,115,115,291,291,115,291,115,115,291,115,115,
+115,115,115,115,291,291,291,291,115,291,291,291,291,291,291,291,
+115,291,291,291,115,291,115,291,115,115,291,291,115,291,291,291,
+291,292,291,293,292,292,292,292,292,292,115,292,292,291,115,115,
+291,291,291,291,291,115,294,115,292,292,292,292,292,292,115,115,
+295,295,295,295,295,295,295,295,295,295,115,115,291,291,291,291,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 30 */
-295,296,296,296,297,297,297,297,297,297,297,297,297,297,297,297,
-297,297,297,296,297,296,296,296,298,298,296,296,296,296,296,296,
-299,299,299,299,299,299,299,299,299,299,300,300,300,300,300,300,
-300,300,300,300,296,298,296,298,296,298,301,302,301,302,303,303,
-295,295,295,295,295,295,295,295,114,295,295,295,295,295,295,295,
-295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,
-295,295,295,295,295,295,295,295,295,295,295,295,295,114,114,114,
-114,298,298,298,298,298,298,298,298,298,298,298,298,298,298,303,
+296,297,297,297,298,298,298,298,298,298,298,298,298,298,298,298,
+298,298,298,297,298,297,297,297,299,299,297,297,297,297,297,297,
+300,300,300,300,300,300,300,300,300,300,301,301,301,301,301,301,
+301,301,301,301,297,299,297,299,297,299,302,303,302,303,304,304,
+296,296,296,296,296,296,296,296,115,296,296,296,296,296,296,296,
+296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
+296,296,296,296,296,296,296,296,296,296,296,296,296,115,115,115,
+115,299,299,299,299,299,299,299,299,299,299,299,299,299,299,304,
/* block 31 */
-298,298,298,298,298,297,298,298,295,295,295,295,295,298,298,298,
-298,298,298,298,298,298,298,298,114,298,298,298,298,298,298,298,
-298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,
-298,298,298,298,298,298,298,298,298,298,298,298,298,114,296,296,
-296,296,296,296,296,296,298,296,296,296,296,296,296,114,296,296,
-297,297,297,297,297, 19, 19, 19, 19,297,297,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+299,299,299,299,299,298,299,299,296,296,296,296,296,299,299,299,
+299,299,299,299,299,299,299,299,115,299,299,299,299,299,299,299,
+299,299,299,299,299,299,299,299,299,299,299,299,299,299,299,299,
+299,299,299,299,299,299,299,299,299,299,299,299,299,115,297,297,
+297,297,297,297,297,297,299,297,297,297,297,297,297,115,297,297,
+298,298,298,298,298, 19, 19, 19, 19,298,298,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 32 */
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-304,304,304,304,304,304,304,304,304,304,304,305,305,306,306,306,
-306,307,306,306,306,306,306,306,305,306,306,307,307,306,306,304,
-308,308,308,308,308,308,308,308,308,308,309,309,309,309,309,309,
-304,304,304,304,304,304,307,307,306,306,304,304,304,304,306,306,
-306,304,305,305,305,304,304,305,305,305,305,305,305,305,304,304,
-304,306,306,306,306,304,304,304,304,304,304,304,304,304,304,304,
+305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,
+305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,
+305,305,305,305,305,305,305,305,305,305,305,306,306,307,307,307,
+307,308,307,307,307,307,307,307,306,307,307,308,308,307,307,305,
+309,309,309,309,309,309,309,309,309,309,310,310,310,310,310,310,
+305,305,305,305,305,305,308,308,307,307,305,305,305,305,307,307,
+307,305,306,306,306,305,305,306,306,306,306,306,306,306,305,305,
+305,307,307,307,307,305,305,305,305,305,305,305,305,305,305,305,
/* block 33 */
-304,304,306,305,307,306,306,305,305,305,305,305,305,306,304,305,
-308,308,308,308,308,308,308,308,308,308,305,305,305,306,310,310,
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,
-311,311,311,311,311,311,114,311,114,114,114,114,114,311,114,114,
+305,305,307,306,308,307,307,306,306,306,306,306,306,307,305,306,
+309,309,309,309,309,309,309,309,309,309,306,306,306,307,311,311,
312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
-312,312,312,312,312,312,312,312,312,312,312, 4,313,312,312,312,
+312,312,312,312,312,312,115,312,115,115,115,115,115,312,115,115,
+313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
+313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
+313,313,313,313,313,313,313,313,313,313,313, 4,314,313,313,313,
/* block 34 */
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-
-/* block 35 */
315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,315,316,316,316,316,316,316,316,316,
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
+
+/* block 35 */
316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-
-/* block 36 */
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
+316,316,316,316,316,316,316,316,317,317,317,317,317,317,317,317,
317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,114,317,317,317,317,114,114,
-317,317,317,317,317,317,317,114,317,114,317,317,317,317,114,114,
317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
+/* block 36 */
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,318,318,115,318,318,318,318,115,115,
+318,318,318,318,318,318,318,115,318,115,318,318,318,318,115,115,
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+
/* block 37 */
-317,317,317,317,317,317,317,317,317,114,317,317,317,317,114,114,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,114,317,317,317,317,114,114,317,317,317,317,317,317,317,114,
-317,114,317,317,317,317,114,114,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,114,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
+318,318,318,318,318,318,318,318,318,115,318,318,318,318,115,115,
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+318,115,318,318,318,318,115,115,318,318,318,318,318,318,318,115,
+318,115,318,318,318,318,115,115,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,115,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
/* block 38 */
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,114,317,317,317,317,114,114,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,317,317,317,317,114,114,318,318,318,
-319,319,319,319,319,319,319,319,319,320,320,320,320,320,320,320,
-320,320,320,320,320,320,320,320,320,320,320,320,320,114,114,114,
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+318,115,318,318,318,318,115,115,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,318,318,318,318,115,115,319,319,319,
+320,320,320,320,320,320,320,320,320,321,321,321,321,321,321,321,
+321,321,321,321,321,321,321,321,321,321,321,321,321,115,115,115,
/* block 39 */
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-321,321,321,321,321,321,321,321,321,321,114,114,114,114,114,114,
-322,322,322,322,322,322,322,322,322,322,322,322,322,322,322,322,
-322,322,322,322,322,322,322,322,322,322,322,322,322,322,322,322,
-322,322,322,322,322,322,322,322,322,322,322,322,322,322,322,322,
-322,322,322,322,322,322,322,322,322,322,322,322,322,322,322,322,
-322,322,322,322,322,322,322,322,322,322,322,322,322,322,322,322,
-322,322,322,322,322,114,114,114,114,114,114,114,114,114,114,114,
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+322,322,322,322,322,322,322,322,322,322,115,115,115,115,115,115,
+323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,
+323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,
+323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,
+323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,
+323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,
+324,324,324,324,324,324,115,115,325,325,325,325,325,325,115,115,
/* block 40 */
-323,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,
-324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,
-324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,
-324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,
-324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,
-324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,
-324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,
-324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,
+326,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
/* block 41 */
-324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,
-324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,
-324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,
-324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,
-324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,
-324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,
-324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,
-324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
/* block 42 */
-324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,
-324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,
-324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,
-324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,
-324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,
-324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,
-324,324,324,324,324,324,324,324,324,324,324,324,324,325,325,324,
-324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,328,328,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
/* block 43 */
-326,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
-327,327,327,327,327,327,327,327,327,327,327,328,329,114,114,114,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
-330,330,330,330,330,330,330,330,330,330,330, 4, 4, 4,331,331,
-331,330,330,330,330,330,330,330,330,114,114,114,114,114,114,114,
+329,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
+330,330,330,330,330,330,330,330,330,330,330,331,332,115,115,115,
+333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
+333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
+333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
+333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
+333,333,333,333,333,333,333,333,333,333,333, 4, 4, 4,334,334,
+334,333,333,333,333,333,333,333,333,115,115,115,115,115,115,115,
/* block 44 */
-332,332,332,332,332,332,332,332,332,332,332,332,332,114,332,332,
-332,332,333,333,333,114,114,114,114,114,114,114,114,114,114,114,
-334,334,334,334,334,334,334,334,334,334,334,334,334,334,334,334,
-334,334,335,335,335, 4, 4,114,114,114,114,114,114,114,114,114,
-336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,336,
-336,336,337,337,114,114,114,114,114,114,114,114,114,114,114,114,
-338,338,338,338,338,338,338,338,338,338,338,338,338,114,338,338,
-338,114,339,339,114,114,114,114,114,114,114,114,114,114,114,114,
+335,335,335,335,335,335,335,335,335,335,335,335,335,115,335,335,
+335,335,336,336,336,115,115,115,115,115,115,115,115,115,115,115,
+337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,
+337,337,338,338,338, 4, 4,115,115,115,115,115,115,115,115,115,
+339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,
+339,339,340,340,115,115,115,115,115,115,115,115,115,115,115,115,
+341,341,341,341,341,341,341,341,341,341,341,341,341,115,341,341,
+341,115,342,342,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 45 */
-340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,
-340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,
-340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,340,
-340,340,340,340,341,341,342,341,341,341,341,341,341,341,342,342,
-342,342,342,342,342,342,341,342,342,341,341,341,341,341,341,341,
-341,341,341,341,343,343,343,344,343,343,343,345,340,341,114,114,
-346,346,346,346,346,346,346,346,346,346,114,114,114,114,114,114,
-347,347,347,347,347,347,347,347,347,347,114,114,114,114,114,114,
+343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,
+343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,
+343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,
+343,343,343,343,344,344,345,344,344,344,344,344,344,344,345,345,
+345,345,345,345,345,345,344,345,345,344,344,344,344,344,344,344,
+344,344,344,344,346,346,346,347,346,346,346,348,343,344,115,115,
+349,349,349,349,349,349,349,349,349,349,115,115,115,115,115,115,
+350,350,350,350,350,350,350,350,350,350,115,115,115,115,115,115,
/* block 46 */
-348,348, 4, 4,348, 4,349,348,348,348,348,350,350,350,351,114,
-352,352,352,352,352,352,352,352,352,352,114,114,114,114,114,114,
-353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,
-353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,
-353,353,353,354,353,353,353,353,353,353,353,353,353,353,353,353,
-353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,
-353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,
-353,353,353,353,353,353,353,353,114,114,114,114,114,114,114,114,
+351,351, 4, 4,351, 4,352,351,351,351,351,353,353,353,354,115,
+355,355,355,355,355,355,355,355,355,355,115,115,115,115,115,115,
+356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,
+356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,
+356,356,356,357,356,356,356,356,356,356,356,356,356,356,356,356,
+356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,
+356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,
+356,356,356,356,356,356,356,356,115,115,115,115,115,115,115,115,
/* block 47 */
-353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,
-353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,353,
-353,353,353,353,353,353,353,353,353,350,353,114,114,114,114,114,
-324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,
-324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,
-324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,
-324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,324,
-324,324,324,324,324,324,114,114,114,114,114,114,114,114,114,114,
+356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,
+356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,
+356,356,356,356,356,356,356,356,356,353,356,115,115,115,115,115,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,115,115,115,115,115,115,115,115,115,115,
/* block 48 */
-355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,
-355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,114,
-356,356,356,357,357,357,357,356,356,357,357,357,114,114,114,114,
-357,357,356,357,357,357,357,357,357,356,356,356,114,114,114,114,
-358,114,114,114,359,359,360,360,360,360,360,360,360,360,360,360,
-361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,361,
-361,361,361,361,361,361,361,361,361,361,361,361,361,361,114,114,
-361,361,361,361,361,114,114,114,114,114,114,114,114,114,114,114,
+358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,
+358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,115,
+359,359,359,360,360,360,360,359,359,360,360,360,115,115,115,115,
+360,360,359,360,360,360,360,360,360,359,359,359,115,115,115,115,
+361,115,115,115,362,362,363,363,363,363,363,363,363,363,363,363,
+364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
+364,364,364,364,364,364,364,364,364,364,364,364,364,364,115,115,
+364,364,364,364,364,115,115,115,115,115,115,115,115,115,115,115,
/* block 49 */
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,362,
-362,362,362,362,362,362,362,362,362,362,362,362,114,114,114,114,
-363,363,363,363,363,364,364,364,363,363,364,363,363,363,363,363,
-363,362,362,362,362,362,362,362,363,363,114,114,114,114,114,114,
-365,365,365,365,365,365,365,365,365,365,366,114,114,114,367,367,
-368,368,368,368,368,368,368,368,368,368,368,368,368,368,368,368,
-368,368,368,368,368,368,368,368,368,368,368,368,368,368,368,368,
+365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,
+365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,
+365,365,365,365,365,365,365,365,365,365,365,365,115,115,115,115,
+365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,
+365,365,365,365,365,365,365,365,365,365,115,115,115,115,115,115,
+366,366,366,366,366,366,366,366,366,366,367,115,115,115,368,368,
+369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
+369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
/* block 50 */
-369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
-369,369,369,369,369,369,369,370,370,371,371,370,114,114,372,372,
-373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,
-373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,
-373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,373,
-373,373,373,373,373,374,375,374,375,375,375,375,375,375,375,114,
-375,376,375,376,376,375,375,375,375,375,375,375,375,374,374,374,
-374,374,374,375,375,375,375,375,375,375,375,375,375,114,114,375,
+370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,
+370,370,370,370,370,370,370,371,371,372,372,371,115,115,373,373,
+374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
+374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
+374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
+374,374,374,374,374,375,376,375,376,376,376,376,376,376,376,115,
+376,377,376,377,377,376,376,376,376,376,376,376,376,375,375,375,
+375,375,375,376,376,376,376,376,376,376,376,376,376,115,115,376,
/* block 51 */
-377,377,377,377,377,377,377,377,377,377,114,114,114,114,114,114,
-377,377,377,377,377,377,377,377,377,377,114,114,114,114,114,114,
-378,378,378,378,378,378,378,379,378,378,378,378,378,378,114,114,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,380,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+378,378,378,378,378,378,378,378,378,378,115,115,115,115,115,115,
+378,378,378,378,378,378,378,378,378,378,115,115,115,115,115,115,
+379,379,379,379,379,379,379,380,379,379,379,379,379,379,115,115,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,381,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 52 */
-381,381,381,381,382,383,383,383,383,383,383,383,383,383,383,383,
-383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,
-383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,
-383,383,383,383,381,382,381,381,381,381,381,382,381,382,382,382,
-382,382,381,382,382,383,383,383,383,383,383,383,114,114,114,114,
-384,384,384,384,384,384,384,384,384,384,385,385,385,385,385,385,
-385,386,386,386,386,386,386,386,386,386,386,381,381,381,381,381,
-381,381,381,381,386,386,386,386,386,386,386,386,386,114,114,114,
+382,382,382,382,383,384,384,384,384,384,384,384,384,384,384,384,
+384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,
+384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,
+384,384,384,384,382,383,382,382,382,382,382,383,382,383,383,383,
+383,383,382,383,383,384,384,384,384,384,384,384,115,115,115,115,
+385,385,385,385,385,385,385,385,385,385,386,386,386,386,386,386,
+386,387,387,387,387,387,387,387,387,387,387,382,382,382,382,382,
+382,382,382,382,387,387,387,387,387,387,387,387,387,115,115,115,
/* block 53 */
-387,387,388,389,389,389,389,389,389,389,389,389,389,389,389,389,
-389,389,389,389,389,389,389,389,389,389,389,389,389,389,389,389,
-389,388,387,387,387,387,388,388,387,387,388,387,387,387,389,389,
-390,390,390,390,390,390,390,390,390,390,389,389,389,389,389,389,
-391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,
-391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,
-391,391,391,391,391,391,392,393,392,392,393,393,393,392,393,392,
-392,392,393,393,114,114,114,114,114,114,114,114,394,394,394,394,
+388,388,389,390,390,390,390,390,390,390,390,390,390,390,390,390,
+390,390,390,390,390,390,390,390,390,390,390,390,390,390,390,390,
+390,389,388,388,388,388,389,389,388,388,389,388,388,388,390,390,
+391,391,391,391,391,391,391,391,391,391,390,390,390,390,390,390,
+392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,
+392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,
+392,392,392,392,392,392,393,394,393,393,394,394,394,393,394,393,
+393,393,394,394,115,115,115,115,115,115,115,115,395,395,395,395,
/* block 54 */
-395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,
-395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,
-395,395,395,395,396,396,396,396,396,396,396,396,397,397,397,397,
-397,397,397,397,396,396,397,397,114,114,114,398,398,398,398,398,
-399,399,399,399,399,399,399,399,399,399,114,114,114,395,395,395,
-400,400,400,400,400,400,400,400,400,400,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,
-401,401,401,401,401,401,401,401,402,402,402,402,402,402,403,403,
+396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,
+396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,
+396,396,396,396,397,397,397,397,397,397,397,397,398,398,398,398,
+398,398,398,398,397,397,398,398,115,115,115,399,399,399,399,399,
+400,400,400,400,400,400,400,400,400,400,115,115,115,396,396,396,
+401,401,401,401,401,401,401,401,401,401,402,402,402,402,402,402,
+402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,
+402,402,402,402,402,402,402,402,403,403,403,403,403,403,404,404,
/* block 55 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-404,404,404,404,404,404,404,404,114,114,114,114,114,114,114,114,
-109,109,109, 4,109,109,109,109,109,109,109,109,109,109,109,109,
-109,405,109,109,109,109,109,109,109,406,406,406,406,109,406,406,
-406,406,405,405,109,406,406,114,109,109,114,114,114,114,114,114,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+405,405,405,405,405,405,405,405,115,115,115,115,115,115,115,115,
+110,110,110, 4,110,110,110,110,110,110,110,110,110,110,110,110,
+110,406,110,110,110,110,110,110,110,407,407,407,407,110,407,407,
+407,407,406,406,110,407,407,115,110,110,115,115,115,115,115,115,
/* block 56 */
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
- 33, 33, 33, 33, 33, 33,122,122,122,122,122,407,106,106,106,106,
-106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,
-106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,
-106,106,106,106,106,106,106,106,106,106,106,106,106,115,115,115,
-115,115,106,106,106,106,115,115,115,115,115, 33, 33, 33, 33, 33,
- 33, 33, 33, 33, 33, 33, 33, 33,408,409, 33, 33, 33,410, 33, 33,
+ 33, 33, 33, 33, 33, 33,123,123,123,123,123,408,107,107,107,107,
+107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
+107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
+107,107,107,107,107,107,107,107,107,107,107,107,107,116,116,116,
+116,116,107,107,107,107,116,116,116,116,116, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33, 33, 33,409,410, 33, 33, 33,411, 33, 33,
/* block 57 */
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
- 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,106,106,106,106,106,
-106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,
-106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,115,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,114,114,114,114,114,114,109,109,109,109,
+ 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,107,107,107,107,107,
+107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
+107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,116,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,115,115,115,115,115,115,110,110,110,110,
/* block 58 */
30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
@@ -1940,12 +1964,12 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 58112 bytes, block = 128 */
30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
-411,412, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+412,413, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
/* block 59 */
30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 33, 33, 33, 33, 33,413, 33, 33,414, 33,
+ 30, 31, 30, 31, 30, 31, 33, 33, 33, 33, 33,414, 33, 33,415, 33,
30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
@@ -1954,57 +1978,57 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 58112 bytes, block = 128 */
30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
/* block 60 */
-415,415,415,415,415,415,415,415,416,416,416,416,416,416,416,416,
-415,415,415,415,415,415,114,114,416,416,416,416,416,416,114,114,
-415,415,415,415,415,415,415,415,416,416,416,416,416,416,416,416,
-415,415,415,415,415,415,415,415,416,416,416,416,416,416,416,416,
-415,415,415,415,415,415,114,114,416,416,416,416,416,416,114,114,
-122,415,122,415,122,415,122,415,114,416,114,416,114,416,114,416,
-415,415,415,415,415,415,415,415,416,416,416,416,416,416,416,416,
-417,417,418,418,418,418,419,419,420,420,421,421,422,422,114,114,
+416,416,416,416,416,416,416,416,417,417,417,417,417,417,417,417,
+416,416,416,416,416,416,115,115,417,417,417,417,417,417,115,115,
+416,416,416,416,416,416,416,416,417,417,417,417,417,417,417,417,
+416,416,416,416,416,416,416,416,417,417,417,417,417,417,417,417,
+416,416,416,416,416,416,115,115,417,417,417,417,417,417,115,115,
+123,416,123,416,123,416,123,416,115,417,115,417,115,417,115,417,
+416,416,416,416,416,416,416,416,417,417,417,417,417,417,417,417,
+418,418,419,419,419,419,420,420,421,421,422,422,423,423,115,115,
/* block 61 */
-415,415,415,415,415,415,415,415,423,423,423,423,423,423,423,423,
-415,415,415,415,415,415,415,415,423,423,423,423,423,423,423,423,
-415,415,415,415,415,415,415,415,423,423,423,423,423,423,423,423,
-415,415,122,424,122,114,122,122,416,416,425,425,426,113,427,113,
-113,113,122,424,122,114,122,122,428,428,428,428,426,113,113,113,
-415,415,122,122,114,114,122,122,416,416,429,429,114,113,113,113,
-415,415,122,122,122,163,122,122,416,416,430,430,168,113,113,113,
-114,114,122,424,122,114,122,122,431,431,432,432,426,113,113,114,
+416,416,416,416,416,416,416,416,424,424,424,424,424,424,424,424,
+416,416,416,416,416,416,416,416,424,424,424,424,424,424,424,424,
+416,416,416,416,416,416,416,416,424,424,424,424,424,424,424,424,
+416,416,123,425,123,115,123,123,417,417,426,426,427,114,428,114,
+114,114,123,425,123,115,123,123,429,429,429,429,427,114,114,114,
+416,416,123,123,115,115,123,123,417,417,430,430,115,114,114,114,
+416,416,123,123,123,164,123,123,417,417,431,431,169,114,114,114,
+115,115,123,425,123,115,123,123,432,432,433,433,427,114,114,115,
/* block 62 */
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 22,433,433, 22, 22,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 22,434,434, 22, 22,
9, 9, 9, 9, 9, 9, 4, 4, 21, 25, 6, 21, 21, 25, 6, 21,
- 4, 4, 4, 4, 4, 4, 4, 4,434,435, 22, 22, 22, 22, 22, 3,
+ 4, 4, 4, 4, 4, 4, 4, 4,435,436, 22, 22, 22, 22, 22, 3,
4, 4, 4, 4, 4, 4, 4, 4, 4, 21, 25, 4, 4, 4, 4, 15,
15, 4, 4, 4, 8, 6, 7, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 8, 4, 15, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3,
- 22, 22, 22, 22, 22,436, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
- 23,106,114,114, 23, 23, 23, 23, 23, 23, 8, 8, 8, 6, 7,106,
+ 22, 22, 22, 22, 22,437, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 23,107,115,115, 23, 23, 23, 23, 23, 23, 8, 8, 8, 6, 7,107,
/* block 63 */
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 8, 8, 8, 6, 7,114,
-106,106,106,106,106,106,106,106,106,106,106,106,106,114,114,114,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 8, 8, 8, 6, 7,115,
+107,107,107,107,107,107,107,107,107,107,107,107,107,115,115,115,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-109,109,109,109,109,109,109,109,109,109,109,109,109,380,380,380,
-380,109,380,380,380,109,109,109,109,109,109,109,109,109,109,109,
-109,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+110,110,110,110,110,110,110,110,110,110,110,110,110,381,381,381,
+381,110,381,381,381,110,110,110,110,110,110,110,110,110,110,110,
+110,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 64 */
- 19, 19,437, 19, 19, 19, 19,437, 19, 19,438,437,437,437,438,438,
-437,437,437,438, 19,437, 19, 19, 8,437,437,437,437,437, 19, 19,
- 19, 19, 19, 19,437, 19,439, 19,437, 19,440,441,437,437, 19,438,
-437,437,442,437,438,406,406,406,406,438, 19, 19,438,438,437,437,
- 8, 8, 8, 8, 8,437,438,438,438,438, 19, 8, 19, 19,443, 19,
+ 19, 19,438, 19, 19, 19, 19,438, 19, 19,439,438,438,438,439,439,
+438,438,438,439, 19,438, 19, 19, 8,438,438,438,438,438, 19, 19,
+ 19, 19, 19, 19,438, 19,440, 19,438, 19,441,442,438,438, 19,439,
+438,438,443,438,439,407,407,407,407,439, 19, 19,439,439,438,438,
+ 8, 8, 8, 8, 8,438,439,439,439,439, 19, 8, 19, 19,444, 19,
23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,444,
445,445,445,445,445,445,445,445,445,445,445,445,445,445,445,445,
+446,446,446,446,446,446,446,446,446,446,446,446,446,446,446,446,
/* block 65 */
-446,446,446, 30, 31,446,446,446,446, 23,114,114,114,114,114,114,
+447,447,447, 30, 31,447,447,447,447, 23, 19, 19,115,115,115,115,
8, 8, 8, 8, 8, 19, 19, 19, 19, 19, 8, 8, 19, 19, 19, 19,
8, 19, 19, 8, 19, 19, 8, 19, 19, 19, 19, 19, 19, 19, 8, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
@@ -2041,15 +2065,15 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 58112 bytes, block = 128 */
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 8, 8, 8, 8,
8, 8, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,114,114,114,114,114,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,
/* block 69 */
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+ 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
@@ -2057,10 +2081,10 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 58112 bytes, block = 128 */
23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19,447,447,447,447,447,447,447,447,447,447,
-447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,447,
+ 19, 19, 19, 19, 19, 19,448,448,448,448,448,448,448,448,448,448,
448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,
-448,448,448,448,448,448,448,448,448,448, 23, 23, 23, 23, 23, 23,
+449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,
+449,449,449,449,449,449,449,449,449,449, 23, 23, 23, 23, 23, 23,
23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
/* block 71 */
@@ -2114,14 +2138,14 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 58112 bytes, block = 128 */
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
/* block 76 */
-449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,
-449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,
-449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,
-449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,
-449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,
-449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,
-449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,
-449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,
+450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,
+450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,
+450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,
+450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,
+450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,
+450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,
+450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,
+450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,
/* block 77 */
8, 8, 8, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6,
@@ -2141,147 +2165,147 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 58112 bytes, block = 128 */
8, 8, 8, 8, 8, 19, 19, 8, 8, 8, 8, 8, 8, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19,114,114, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19,115,115, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
/* block 79 */
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19,114,114, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19,115,115, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,114,114,114, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19,114, 19, 19, 19, 19, 19, 19,
- 19, 19,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19,115, 19, 19, 19, 19, 19, 19,
+ 19, 19,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115, 19, 19, 19, 19,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 80 */
-450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,
-450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,
-450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,114,
451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,
451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,
-451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,114,
- 30, 31,452,453,454,455,456, 30, 31, 30, 31, 30, 31,457,458,459,
-460, 33, 30, 31, 33, 30, 31, 33, 33, 33, 33, 33,106,106,461,461,
+451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,115,
+452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,
+452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,
+452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,115,
+ 30, 31,453,454,455,456,457, 30, 31, 30, 31, 30, 31,458,459,460,
+461, 33, 30, 31, 33, 30, 31, 33, 33, 33, 33, 33,107,107,462,462,
/* block 81 */
-159,160,159,160,159,160,159,160,159,160,159,160,159,160,159,160,
-159,160,159,160,159,160,159,160,159,160,159,160,159,160,159,160,
-159,160,159,160,159,160,159,160,159,160,159,160,159,160,159,160,
-159,160,159,160,159,160,159,160,159,160,159,160,159,160,159,160,
-159,160,159,160,159,160,159,160,159,160,159,160,159,160,159,160,
-159,160,159,160,159,160,159,160,159,160,159,160,159,160,159,160,
-159,160,159,160,462,463,463,463,463,463,463,159,160,159,160,464,
-464,464,159,160,114,114,114,114,114,465,465,465,465,466,465,465,
+160,161,160,161,160,161,160,161,160,161,160,161,160,161,160,161,
+160,161,160,161,160,161,160,161,160,161,160,161,160,161,160,161,
+160,161,160,161,160,161,160,161,160,161,160,161,160,161,160,161,
+160,161,160,161,160,161,160,161,160,161,160,161,160,161,160,161,
+160,161,160,161,160,161,160,161,160,161,160,161,160,161,160,161,
+160,161,160,161,160,161,160,161,160,161,160,161,160,161,160,161,
+160,161,160,161,463,464,464,464,464,464,464,160,161,160,161,465,
+465,465,160,161,115,115,115,115,115,466,466,466,466,467,466,466,
/* block 82 */
-467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
-467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,
-467,467,467,467,467,467,114,467,114,114,114,114,114,467,114,114,
468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,
468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,
-468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,
-468,468,468,468,468,468,468,468,114,114,114,114,114,114,114,469,
-470,114,114,114,114,114,114,114,114,114,114,114,114,114,114,471,
+468,468,468,468,468,468,115,468,115,115,115,115,115,468,115,115,
+469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,
+469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,
+469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,
+469,469,469,469,469,469,469,469,115,115,115,115,115,115,115,470,
+471,115,115,115,115,115,115,115,115,115,115,115,115,115,115,472,
/* block 83 */
-317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
-317,317,317,317,317,317,317,114,114,114,114,114,114,114,114,114,
-317,317,317,317,317,317,317,114,317,317,317,317,317,317,317,114,
-317,317,317,317,317,317,317,114,317,317,317,317,317,317,317,114,
-317,317,317,317,317,317,317,114,317,317,317,317,317,317,317,114,
-317,317,317,317,317,317,317,114,317,317,317,317,317,317,317,114,
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
-177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,115,115,115,115,115,115,115,115,115,
+318,318,318,318,318,318,318,115,318,318,318,318,318,318,318,115,
+318,318,318,318,318,318,318,115,318,318,318,318,318,318,318,115,
+318,318,318,318,318,318,318,115,318,318,318,318,318,318,318,115,
+318,318,318,318,318,318,318,115,318,318,318,318,318,318,318,115,
+178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,
+178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,
/* block 84 */
4, 4, 21, 25, 21, 25, 4, 4, 4, 21, 25, 4, 21, 25, 4, 4,
4, 4, 4, 4, 4, 4, 4, 9, 4, 4, 9, 4, 21, 25, 4, 4,
- 21, 25, 6, 7, 6, 7, 6, 7, 6, 7, 4, 4, 4, 4, 4,107,
+ 21, 25, 6, 7, 6, 7, 6, 7, 6, 7, 4, 4, 4, 4, 4,108,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 9, 9, 4, 4, 4, 4,
- 9, 4, 6,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+ 9, 4, 6,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 85 */
-472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
-472,472,472,472,472,472,472,472,472,472,114,472,472,472,472,472,
-472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
-472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
-472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
-472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
-472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
-472,472,472,472,114,114,114,114,114,114,114,114,114,114,114,114,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,115,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 86 */
-472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
-472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
-472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
-472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
-472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
-472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
-472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
-472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
/* block 87 */
-472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
-472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
-472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
-472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
-472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,472,
-472,472,472,472,472,472,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,114,114,114,114,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,
/* block 88 */
- 3, 4, 4, 4, 19,473,406,474, 6, 7, 6, 7, 6, 7, 6, 7,
+ 3, 4, 4, 4, 19,474,407,475, 6, 7, 6, 7, 6, 7, 6, 7,
6, 7, 19, 19, 6, 7, 6, 7, 6, 7, 6, 7, 9, 6, 7, 7,
- 19,474,474,474,474,474,474,474,474,474,109,109,109,109,475,475,
- 9,107,107,107,107,107, 19, 19,474,474,474,473,406, 4, 19, 19,
-114,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
-476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
-476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
-476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
+ 19,475,475,475,475,475,475,475,475,475,110,110,110,110,476,476,
+ 9,108,108,108,108,108, 19, 19,475,475,475,474,407, 4, 19, 19,
+115,477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,
+477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,
+477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,
+477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,
/* block 89 */
-476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,476,
-476,476,476,476,476,476,476,114,114,109,109, 14, 14,477,477,476,
- 9,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,
-478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,
-478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,
-478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,
-478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,
-478,478,478,478,478,478,478,478,478,478,478, 4,107,479,479,478,
+477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,
+477,477,477,477,477,477,477,115,115,110,110, 14, 14,478,478,477,
+ 9,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,
+479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,
+479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,
+479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,
+479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,
+479,479,479,479,479,479,479,479,479,479,479, 4,108,480,480,479,
/* block 90 */
-114,114,114,114,114,480,480,480,480,480,480,480,480,480,480,480,
-480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,
-480,480,480,480,480,480,480,480,480,480,480,480,480,480,114,114,
-114,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
-481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
-481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
-481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
+115,115,115,115,115,481,481,481,481,481,481,481,481,481,481,481,
481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
+481,481,481,481,481,481,481,481,481,481,481,481,481,481,115,115,
+115,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
+482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
+482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
+482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
+482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
/* block 91 */
-481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,114,
+482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,115,
19, 19, 23, 23, 23, 23, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,
-480,480,480,480,480,480,480,480,480,480,480,114,114,114,114,114,
+481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
+481,481,481,481,481,481,481,481,481,481,481,115,115,115,115,115,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19,114,114,114,114,114,114,114,114,114,114,114,114,
-478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,
+ 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,115,115,115,
+479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,
/* block 92 */
-482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
-482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,114,
+483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,
+483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,115,
23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 23, 23, 23, 23, 23, 23, 23, 23,
19, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
-482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
-482,482,482,482,482,482,482,482,482,482,482,482,482,482,482, 19,
+483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,
+483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 19,
/* block 93 */
23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 19, 19, 19, 19, 19, 19,
@@ -2289,53 +2313,23 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 58112 bytes, block = 128 */
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,
-483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,
-483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,114,
-
-/* block 94 */
-483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,
-483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,
-483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,
-483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,
-483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,
-483,483,483,483,483,483,483,483, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-
-/* block 95 */
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
+484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,115,
+
+/* block 94 */
484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-
-/* block 96 */
484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,114,114,114,114,114,114,114,114,114,114,
+484,484,484,484,484,484,484,484, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-
-/* block 97 */
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,484,484,484,484,484,484,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-/* block 98 */
+/* block 95 */
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
-485,485,485,485,485,486,485,485,485,485,485,485,485,485,485,485,
485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
@@ -2343,877 +2337,957 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 58112 bytes, block = 128 */
485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
-/* block 99 */
+/* block 96 */
485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,115,115,115,115,115,115,115,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+
+/* block 97 */
485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 98 */
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,487,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+
+/* block 99 */
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
/* block 100 */
-485,485,485,485,485,485,485,485,485,485,485,485,485,114,114,114,
-487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,
-487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,
-487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,
-487,487,487,487,487,487,487,114,114,114,114,114,114,114,114,114,
+486,486,486,486,486,486,486,486,486,486,486,486,486,115,115,115,
488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
-488,488,488,488,488,488,488,488,489,489,489,489,489,489,490,490,
+488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
+488,488,488,488,488,488,488,115,115,115,115,115,115,115,115,115,
+489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,
+489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,
+489,489,489,489,489,489,489,489,490,490,490,490,490,490,491,491,
/* block 101 */
-491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,
-491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,
-491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,
-491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,
-491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,
-491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,
-491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,
-491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,
+492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,
+492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,
+492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,
+492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,
+492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,
+492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,
+492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,
+492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,
/* block 102 */
-491,491,491,491,491,491,491,491,491,491,491,491,492,493,493,493,
-491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,491,
-494,494,494,494,494,494,494,494,494,494,491,491,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-174,175,174,175,174,175,174,175,174,175,174,175,174,175,174,175,
-174,175,174,175,174,175,174,175,174,175,174,175,174,175,174,175,
-174,175,174,175,174,175,174,175,174,175,174,175,174,175,495,177,
-178,178,178,496,177,177,177,177,177,177,177,177,177,177,496,408,
+492,492,492,492,492,492,492,492,492,492,492,492,493,494,494,494,
+492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,
+495,495,495,495,495,495,495,495,495,495,492,492,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,175,176,
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,175,176,
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,496,178,
+179,179,179,497,178,178,178,178,178,178,178,178,178,178,497,409,
/* block 103 */
-174,175,174,175,174,175,174,175,174,175,174,175,174,175,174,175,
-174,175,174,175,174,175,174,175,174,175,174,175,408,408,114,177,
-497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,
-497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,
-497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,
-497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,
-497,497,497,497,497,497,498,498,498,498,498,498,498,498,498,498,
-499,499,500,500,500,500,500,500,114,114,114,114,114,114,114,114,
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,175,176,
+175,176,175,176,175,176,175,176,175,176,175,176,409,409,178,178,
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+498,498,498,498,498,498,499,499,499,499,499,499,499,499,499,499,
+500,500,501,501,501,501,501,501,115,115,115,115,115,115,115,115,
/* block 104 */
14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14,107,107,107,107,107,107,107,107,107,
+ 14, 14, 14, 14, 14, 14, 14,108,108,108,108,108,108,108,108,108,
14, 14, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
33, 33, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
-106, 33, 33, 33, 33, 33, 33, 33, 33, 30, 31, 30, 31,501, 30, 31,
+107, 33, 33, 33, 33, 33, 33, 33, 33, 30, 31, 30, 31,502, 30, 31,
/* block 105 */
- 30, 31, 30, 31, 30, 31, 30, 31,107, 14, 14, 30, 31,502, 33,114,
+ 30, 31, 30, 31, 30, 31, 30, 31,108, 14, 14, 30, 31,503, 33, 20,
30, 31, 30, 31, 33, 33, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
- 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,503,504,505,506,114,114,
-507,508,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114, 20,106,106, 33, 20, 20, 20, 20, 20,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,504,505,506,507,115,115,
+508,509,510,511, 30, 31, 30, 31,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115, 20,107,107, 33, 20, 20, 20, 20, 20,
/* block 106 */
-509,509,510,509,509,509,510,509,509,509,509,510,509,509,509,509,
-509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,
-509,509,509,511,511,510,510,511,512,512,512,512,114,114,114,114,
- 23, 23, 23, 23, 23, 23, 19, 19, 5, 19,114,114,114,114,114,114,
-513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,
-513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,
-513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,
-513,513,513,513,514,514,514,514,114,114,114,114,114,114,114,114,
-
-/* block 107 */
-515,515,516,516,516,516,516,516,516,516,516,516,516,516,516,516,
+512,512,513,512,512,512,513,512,512,512,512,513,512,512,512,512,
+512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,
+512,512,512,514,514,513,513,514,515,515,515,515,115,115,115,115,
+ 23, 23, 23, 23, 23, 23, 19, 19, 5, 19,115,115,115,115,115,115,
+516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,
516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,
516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,
-516,516,516,516,515,515,515,515,515,515,515,515,515,515,515,515,
-515,515,515,515,517,114,114,114,114,114,114,114,114,114,518,518,
-519,519,519,519,519,519,519,519,519,519,114,114,114,114,114,114,
-221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,221,
-221,221,223,223,223,223,223,223,225,225,225,223,114,114,114,114,
+516,516,516,516,517,517,517,517,115,115,115,115,115,115,115,115,
+
+/* block 107 */
+518,518,519,519,519,519,519,519,519,519,519,519,519,519,519,519,
+519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,
+519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,
+519,519,519,519,518,518,518,518,518,518,518,518,518,518,518,518,
+518,518,518,518,520,115,115,115,115,115,115,115,115,115,521,521,
+522,522,522,522,522,522,522,522,522,522,115,115,115,115,115,115,
+222,222,222,222,222,222,222,222,222,222,222,222,222,222,222,222,
+222,222,224,224,224,224,224,224,226,226,226,224,226,224,115,115,
/* block 108 */
-520,520,520,520,520,520,520,520,520,520,521,521,521,521,521,521,
-521,521,521,521,521,521,521,521,521,521,521,521,521,521,521,521,
-521,521,521,521,521,521,522,522,522,522,522,522,522,522, 4,523,
+523,523,523,523,523,523,523,523,523,523,524,524,524,524,524,524,
524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,
-524,524,524,524,524,524,524,525,525,525,525,525,525,525,525,525,
-525,525,526,526,114,114,114,114,114,114,114,114,114,114,114,527,
-314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,314,
-314,314,314,314,314,314,314,314,314,314,314,314,314,114,114,114,
+524,524,524,524,524,524,525,525,525,525,525,525,525,525, 4,526,
+527,527,527,527,527,527,527,527,527,527,527,527,527,527,527,527,
+527,527,527,527,527,527,527,528,528,528,528,528,528,528,528,528,
+528,528,529,529,115,115,115,115,115,115,115,115,115,115,115,530,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,115,115,115,
/* block 109 */
-528,528,528,529,530,530,530,530,530,530,530,530,530,530,530,530,
-530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,
-530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,530,
-530,530,530,528,529,529,528,528,528,528,529,529,528,529,529,529,
-529,531,531,531,531,531,531,531,531,531,531,531,531,531,114,107,
-532,532,532,532,532,532,532,532,532,532,114,114,114,114,531,531,
-304,304,304,304,304,306,533,304,304,304,304,304,304,304,304,304,
-308,308,308,308,308,308,308,308,308,308,304,304,304,304,304,114,
+531,531,531,532,533,533,533,533,533,533,533,533,533,533,533,533,
+533,533,533,533,533,533,533,533,533,533,533,533,533,533,533,533,
+533,533,533,533,533,533,533,533,533,533,533,533,533,533,533,533,
+533,533,533,531,532,532,531,531,531,531,532,532,531,532,532,532,
+532,534,534,534,534,534,534,534,534,534,534,534,534,534,115,108,
+535,535,535,535,535,535,535,535,535,535,115,115,115,115,534,534,
+305,305,305,305,305,307,536,305,305,305,305,305,305,305,305,305,
+309,309,309,309,309,309,309,309,309,309,305,305,305,305,305,115,
/* block 110 */
-534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,
-534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,534,
-534,534,534,534,534,534,534,534,534,535,535,535,535,535,535,536,
-536,535,535,536,536,535,535,114,114,114,114,114,114,114,114,114,
-534,534,534,535,534,534,534,534,534,534,534,534,535,536,114,114,
-537,537,537,537,537,537,537,537,537,537,114,114,538,538,538,538,
-304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,
-533,304,304,304,304,304,304,310,310,310,304,305,306,305,304,304,
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,537,538,538,538,538,538,538,539,
+539,538,538,539,539,538,538,115,115,115,115,115,115,115,115,115,
+537,537,537,538,537,537,537,537,537,537,537,537,538,539,115,115,
+540,540,540,540,540,540,540,540,540,540,115,115,541,541,541,541,
+305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,
+536,305,305,305,305,305,305,311,311,311,305,306,307,306,305,305,
/* block 111 */
-539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,
-539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,
-539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,539,
-540,539,540,540,540,539,539,540,540,539,539,539,539,539,540,540,
-539,540,539,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,539,539,541,542,542,
-543,543,543,543,543,543,543,543,543,543,543,544,545,545,544,544,
-546,546,543,547,547,544,545,114,114,114,114,114,114,114,114,114,
+542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,
+542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,
+542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,
+543,542,543,543,543,542,542,543,543,542,542,542,542,542,543,543,
+542,543,542,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,542,542,544,545,545,
+546,546,546,546,546,546,546,546,546,546,546,547,548,548,547,547,
+549,549,546,550,550,547,548,115,115,115,115,115,115,115,115,115,
/* block 112 */
-114,317,317,317,317,317,317,114,114,317,317,317,317,317,317,114,
-114,317,317,317,317,317,317,114,114,114,114,114,114,114,114,114,
-317,317,317,317,317,317,317,114,317,317,317,317,317,317,317,114,
+115,318,318,318,318,318,318,115,115,318,318,318,318,318,318,115,
+115,318,318,318,318,318,318,115,115,115,115,115,115,115,115,115,
+318,318,318,318,318,318,318,115,318,318,318,318,318,318,318,115,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
- 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 14,106,106,106,106,
-114,114,114,114, 33,122,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+ 33, 33, 33,551, 33, 33, 33, 33, 33, 33, 33, 14,107,107,107,107,
+ 33, 33, 33, 33, 33,123,115,115,115,115,115,115,115,115,115,115,
+552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,
/* block 113 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,
-543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,543,
-543,543,543,544,544,545,544,544,545,544,544,546,544,545,114,114,
-548,548,548,548,548,548,548,548,548,548,114,114,114,114,114,114,
+552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,
+552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,
+552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,
+552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,
+546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,
+546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,
+546,546,546,547,547,548,547,547,548,547,547,549,547,548,115,115,
+553,553,553,553,553,553,553,553,553,553,115,115,115,115,115,115,
/* block 114 */
-549,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,549,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,549,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,549,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-549,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
+554,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,554,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,554,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,554,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+554,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
/* block 115 */
-550,550,550,550,550,550,550,550,550,550,550,550,549,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,549,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,549,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-549,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,549,550,550,550,
+555,555,555,555,555,555,555,555,555,555,555,555,554,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,554,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,554,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+554,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,554,555,555,555,
/* block 116 */
-550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,549,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,549,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-549,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,549,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,554,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,554,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+554,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,554,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
/* block 117 */
-550,550,550,550,550,550,550,550,549,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,549,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-549,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,549,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,549,550,550,550,550,550,550,550,
+555,555,555,555,555,555,555,555,554,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,554,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+554,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,554,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,554,555,555,555,555,555,555,555,
/* block 118 */
-550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,549,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-549,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,549,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,549,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,554,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+554,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,554,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,554,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
/* block 119 */
-550,550,550,550,549,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-549,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,549,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,549,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,549,550,550,550,550,550,550,550,550,550,550,550,
+555,555,555,555,554,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+554,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,554,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,554,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,554,555,555,555,555,555,555,555,555,555,555,555,
/* block 120 */
-550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-549,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,549,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,549,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,549,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+554,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,554,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,554,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,554,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
/* block 121 */
-550,550,550,550,550,550,550,550,549,550,550,550,550,550,550,550,
-550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,550,
-550,550,550,550,114,114,114,114,114,114,114,114,114,114,114,114,
-315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
-315,315,315,315,315,315,315,114,114,114,114,316,316,316,316,316,
-316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
+555,555,555,555,555,555,555,555,554,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,115,115,115,115,115,115,115,115,115,115,115,115,
316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
-316,316,316,316,316,316,316,316,316,316,316,316,114,114,114,114,
+316,316,316,316,316,316,316,115,115,115,115,317,317,317,317,317,
+317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
+317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
+317,317,317,317,317,317,317,317,317,317,317,317,115,115,115,115,
/* block 122 */
-551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,
-551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,
-551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,
-551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,
-551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,
-551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,
-551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,
-551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,551,
+556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
+556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
+556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
+556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
+556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
+556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
+556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
+556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
/* block 123 */
-552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,
-552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,
-552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,
-552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,
-552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,
-552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,
-552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,
-552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
/* block 124 */
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,114,114,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,115,115,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
/* block 125 */
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,484,484,484,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 126 */
- 33, 33, 33, 33, 33, 33, 33,114,114,114,114,114,114,114,114,114,
-114,114,114,185,185,185,185,185,114,114,114,114,114,192,189,192,
-192,192,192,192,192,192,192,192,192,553,192,192,192,192,192,192,
-192,192,192,192,192,192,192,114,192,192,192,192,192,114,192,114,
-192,192,114,192,192,114,192,192,192,192,192,192,192,192,192,192,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
+ 33, 33, 33, 33, 33, 33, 33,115,115,115,115,115,115,115,115,115,
+115,115,115,186,186,186,186,186,115,115,115,115,115,193,190,193,
+193,193,193,193,193,193,193,193,193,558,193,193,193,193,193,193,
+193,193,193,193,193,193,193,115,193,193,193,193,193,115,193,115,
+193,193,115,193,193,115,193,193,193,193,193,193,193,193,193,193,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
/* block 127 */
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,554,554,554,554,554,554,554,554,554,554,554,554,554,554,
-554,554,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,559,559,559,559,559,559,559,559,559,559,559,559,559,559,
+559,559,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
/* block 128 */
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
/* block 129 */
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199, 7, 6,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200, 7, 6,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
/* block 130 */
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-114,114,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-199,199,199,199,199,199,199,199,199,199,199,199,196,197,114,114,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+115,115,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+200,200,200,200,200,200,200,200,200,200,200,200,197,198,115,115,
/* block 131 */
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
- 4, 4, 4, 4, 4, 4, 4, 6, 7, 4,114,114,114,114,114,114,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,114,114,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+ 4, 4, 4, 4, 4, 4, 4, 6, 7, 4,115,115,115,115,115,115,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,178,178,
4, 9, 9, 15, 15, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6,
7, 6, 7, 6, 7, 4, 4, 6, 7, 4, 4, 4, 4, 15, 15, 15,
- 4, 4, 4,114, 4, 4, 4, 4, 9, 6, 7, 6, 7, 6, 7, 4,
- 4, 4, 8, 9, 8, 8, 8,114, 4, 5, 4, 4,114,114,114,114,
-199,199,199,199,199,114,199,199,199,199,199,199,199,199,199,199,
+ 4, 4, 4,115, 4, 4, 4, 4, 9, 6, 7, 6, 7, 6, 7, 4,
+ 4, 4, 8, 9, 8, 8, 8,115, 4, 5, 4, 4,115,115,115,115,
+200,200,200,200,200,115,200,200,200,200,200,200,200,200,200,200,
/* block 132 */
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,114,114, 22,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,115,115, 22,
/* block 133 */
-114, 4, 4, 4, 5, 4, 4, 4, 6, 7, 4, 8, 4, 9, 4, 4,
+115, 4, 4, 4, 5, 4, 4, 4, 6, 7, 4, 8, 4, 9, 4, 4,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 4, 4, 8, 8, 8, 4,
4, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 6, 4, 7, 14, 15,
14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 6, 8, 7, 8, 6,
- 7, 4, 6, 7, 4, 4,478,478,478,478,478,478,478,478,478,478,
-107,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,
+ 7, 4, 6, 7, 4, 4,479,479,479,479,479,479,479,479,479,479,
+108,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,
/* block 134 */
-478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,
-478,478,478,478,478,478,478,478,478,478,478,478,478,478,555,555,
-481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
-481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,114,
-114,114,481,481,481,481,481,481,114,114,481,481,481,481,481,481,
-114,114,481,481,481,481,481,481,114,114,481,481,481,114,114,114,
- 5, 5, 8, 14, 19, 5, 5,114, 19, 8, 8, 8, 8, 19, 19,114,
-436,436,436,436,436,436,436,436,436, 22, 22, 22, 19, 19,114,114,
+479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,
+479,479,479,479,479,479,479,479,479,479,479,479,479,479,560,560,
+482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
+482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,115,
+115,115,482,482,482,482,482,482,115,115,482,482,482,482,482,482,
+115,115,482,482,482,482,482,482,115,115,482,482,482,115,115,115,
+ 5, 5, 8, 14, 19, 5, 5,115, 19, 8, 8, 8, 8, 19, 19,115,
+437,437,437,437,437,437,437,437,437, 22, 22, 22, 19, 19,115,115,
/* block 135 */
-556,556,556,556,556,556,556,556,556,556,556,556,114,556,556,556,
-556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
-556,556,556,556,556,556,556,114,556,556,556,556,556,556,556,556,
-556,556,556,556,556,556,556,556,556,556,556,114,556,556,114,556,
-556,556,556,556,556,556,556,556,556,556,556,556,556,556,114,114,
-556,556,556,556,556,556,556,556,556,556,556,556,556,556,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+561,561,561,561,561,561,561,561,561,561,561,561,115,561,561,561,
+561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,
+561,561,561,561,561,561,561,115,561,561,561,561,561,561,561,561,
+561,561,561,561,561,561,561,561,561,561,561,115,561,561,115,561,
+561,561,561,561,561,561,561,561,561,561,561,561,561,561,115,115,
+561,561,561,561,561,561,561,561,561,561,561,561,561,561,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 136 */
-556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
-556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
-556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
-556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
-556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
-556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
-556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
-556,556,556,556,556,556,556,556,556,556,556,114,114,114,114,114,
+561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,
+561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,
+561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,
+561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,
+561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,
+561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,
+561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,
+561,561,561,561,561,561,561,561,561,561,561,115,115,115,115,115,
/* block 137 */
- 4, 4, 4,114,114,114,114, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 4, 4, 4,115,115,115,115, 23, 23, 23, 23, 23, 23, 23, 23, 23,
23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23,114,114,114, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
-557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
-557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
-557,557,557,557,557,558,558,558,558,559,559,559,559,559,559,559,
+ 23, 23, 23, 23,115,115,115, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,
+562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,
+562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,
+562,562,562,562,562,563,563,563,563,564,564,564,564,564,564,564,
/* block 138 */
-559,559,559,559,559,559,559,559,559,559,558,558,559,114,114,114,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,114,114,114,114,
-559,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+564,564,564,564,564,564,564,564,564,564,563,563,564,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,
+564,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,114,114,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,110,115,115,
/* block 139 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 140 */
-560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,560,
-560,560,560,560,560,560,560,560,560,560,560,560,560,114,114,114,
-561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,
-561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,
-561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,
-561,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-109, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,114,114,114,114,
-
-/* block 141 */
-562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,
-562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,
-563,563,563,563,114,114,114,114,114,114,114,114,114,114,114,114,
-564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,
-564,565,564,564,564,564,564,564,564,564,565,114,114,114,114,114,
+565,565,565,565,565,565,565,565,565,565,565,565,565,565,565,565,
+565,565,565,565,565,565,565,565,565,565,565,565,565,115,115,115,
+566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,
566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,
566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,
-566,566,566,566,566,566,567,567,567,567,567,114,114,114,114,114,
+566,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+110, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,115,115,115,115,
-/* block 142 */
-568,568,568,568,568,568,568,568,568,568,568,568,568,568,568,568,
-568,568,568,568,568,568,568,568,568,568,568,568,568,568,114,569,
-570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
-570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,570,
-570,570,570,570,114,114,114,114,570,570,570,570,570,570,570,570,
-571,572,572,572,572,572,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+/* block 141 */
+567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,
+567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,
+568,568,568,568,115,115,115,115,115,115,115,115,115,115,115,115,
+569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,
+569,570,569,569,569,569,569,569,569,569,570,115,115,115,115,115,
+571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,
+571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,
+571,571,571,571,571,571,572,572,572,572,572,115,115,115,115,115,
-/* block 143 */
-573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,
+/* block 142 */
573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,
-573,573,573,573,573,573,573,573,574,574,574,574,574,574,574,574,
-574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,
-574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,574,
-575,575,575,575,575,575,575,575,575,575,575,575,575,575,575,575,
+573,573,573,573,573,573,573,573,573,573,573,573,573,573,115,574,
575,575,575,575,575,575,575,575,575,575,575,575,575,575,575,575,
575,575,575,575,575,575,575,575,575,575,575,575,575,575,575,575,
+575,575,575,575,115,115,115,115,575,575,575,575,575,575,575,575,
+576,577,577,577,577,577,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-/* block 144 */
-576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,576,
-576,576,576,576,576,576,576,576,576,576,576,576,576,576,114,114,
-577,577,577,577,577,577,577,577,577,577,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-
-/* block 145 */
+/* block 143 */
578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,
578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,
-578,578,578,578,578,578,578,578,114,114,114,114,114,114,114,114,
+578,578,578,578,578,578,578,578,579,579,579,579,579,579,579,579,
579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,
579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,
-579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,
-579,579,579,579,114,114,114,114,114,114,114,114,114,114,114,580,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,
+580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,
+580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,
-/* block 146 */
-581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,
-581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,
-581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,
-581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,
-581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,
-581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,
-581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,
+/* block 144 */
581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,
+581,581,581,581,581,581,581,581,581,581,581,581,581,581,115,115,
+582,582,582,582,582,582,582,582,582,582,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 145 */
+583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,
+583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,
+583,583,583,583,583,583,583,583,115,115,115,115,115,115,115,115,
+584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,
+584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,
+584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,
+584,584,584,584,115,115,115,115,115,115,115,115,115,115,115,585,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 146 */
+586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
+586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
+586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
+586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
+586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
+586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
+586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
+586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
/* block 147 */
-581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,
-581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,
-581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,
-581,581,581,581,581,581,581,114,114,114,114,114,114,114,114,114,
-581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,
-581,581,581,581,581,581,114,114,114,114,114,114,114,114,114,114,
-581,581,581,581,581,581,581,581,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
+586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
+586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
+586,586,586,586,586,586,586,115,115,115,115,115,115,115,115,115,
+586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
+586,586,586,586,586,586,115,115,115,115,115,115,115,115,115,115,
+586,586,586,586,586,586,586,586,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 148 */
-582,582,582,582,582,582,114,114,582,114,582,582,582,582,582,582,
-582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,
-582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,582,
-582,582,582,582,582,582,114,582,582,114,114,114,582,114,114,582,
-583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,
-583,583,583,583,583,583,114,584,585,585,585,585,585,585,585,585,
-586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
-586,586,586,586,586,586,586,587,587,588,588,588,588,588,588,588,
+587,587,587,587,587,587,115,115,587,115,587,587,587,587,587,587,
+587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
+587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
+587,587,587,587,587,587,115,587,587,115,115,115,587,115,115,587,
+588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,
+588,588,588,588,588,588,115,589,590,590,590,590,590,590,590,590,
+591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,
+591,591,591,591,591,591,591,592,592,593,593,593,593,593,593,593,
/* block 149 */
-589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,
-589,589,589,589,589,589,589,589,589,589,589,589,589,589,589,114,
-114,114,114,114,114,114,114,590,590,590,590,590,590,590,590,590,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,
+594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,115,
+115,115,115,115,115,115,115,595,595,595,595,595,595,595,595,595,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,
+596,596,596,115,596,596,115,115,115,115,115,597,597,597,597,597,
/* block 150 */
-591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,
-591,591,591,591,591,591,592,592,592,592,592,592,114,114,114,593,
-594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,
-594,594,594,594,594,594,594,594,594,594,114,114,114,114,114,595,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,
+598,598,598,598,598,598,599,599,599,599,599,599,115,115,115,600,
+601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,
+601,601,601,601,601,601,601,601,601,601,115,115,115,115,115,602,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 151 */
-596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,
-596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,
-597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,597,
-597,597,597,597,597,597,597,597,114,114,114,114,114,114,597,597,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,
+603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,
+604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,
+604,604,604,604,604,604,604,604,115,115,115,115,605,605,604,604,
+605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,
+115,115,605,605,605,605,605,605,605,605,605,605,605,605,605,605,
+605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,
+605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,
/* block 152 */
-598,599,599,599,114,599,599,114,114,114,114,114,599,599,599,599,
-598,598,598,598,114,598,598,598,114,598,598,598,598,598,598,598,
-598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,
-598,598,598,598,114,114,114,114,599,599,599,114,114,114,114,599,
-600,600,600,600,600,600,600,600,114,114,114,114,114,114,114,114,
-601,601,601,601,601,601,601,601,601,114,114,114,114,114,114,114,
-602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,602,
-602,602,602,602,602,602,602,602,602,602,602,602,602,603,603,604,
+606,607,607,607,115,607,607,115,115,115,115,115,607,607,607,607,
+606,606,606,606,115,606,606,606,115,606,606,606,606,606,606,606,
+606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,
+606,606,606,606,115,115,115,115,607,607,607,115,115,115,115,607,
+608,608,608,608,608,608,608,608,115,115,115,115,115,115,115,115,
+609,609,609,609,609,609,609,609,609,115,115,115,115,115,115,115,
+610,610,610,610,610,610,610,610,610,610,610,610,610,610,610,610,
+610,610,610,610,610,610,610,610,610,610,610,610,610,611,611,612,
/* block 153 */
-605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,
-605,605,605,605,605,605,605,605,605,605,605,605,605,606,606,606,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-607,607,607,607,607,607,607,607,608,607,607,607,607,607,607,607,
-607,607,607,607,607,607,607,607,607,607,607,607,607,607,607,607,
-607,607,607,607,607,609,609,114,114,114,114,610,610,610,610,610,
-611,611,611,611,611,611,611,114,114,114,114,114,114,114,114,114,
+613,613,613,613,613,613,613,613,613,613,613,613,613,613,613,613,
+613,613,613,613,613,613,613,613,613,613,613,613,613,614,614,614,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+615,615,615,615,615,615,615,615,616,615,615,615,615,615,615,615,
+615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,
+615,615,615,615,615,617,617,115,115,115,115,618,618,618,618,618,
+619,619,619,619,619,619,619,115,115,115,115,115,115,115,115,115,
/* block 154 */
-612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,
-612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,
-612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,612,
-612,612,612,612,612,612,114,114,114,613,613,613,613,613,613,613,
-614,614,614,614,614,614,614,614,614,614,614,614,614,614,614,614,
-614,614,614,614,614,614,114,114,615,615,615,615,615,615,615,615,
-616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,616,
-616,616,616,114,114,114,114,114,617,617,617,617,617,617,617,617,
+620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,
+620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,
+620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,
+620,620,620,620,620,620,115,115,115,621,621,621,621,621,621,621,
+622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,
+622,622,622,622,622,622,115,115,623,623,623,623,623,623,623,623,
+624,624,624,624,624,624,624,624,624,624,624,624,624,624,624,624,
+624,624,624,115,115,115,115,115,625,625,625,625,625,625,625,625,
/* block 155 */
-618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,618,
-618,618,114,114,114,114,114,114,114,619,619,619,619,114,114,114,
-114,114,114,114,114,114,114,114,114,620,620,620,620,620,620,620,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,
+626,626,115,115,115,115,115,115,115,627,627,627,627,115,115,115,
+115,115,115,115,115,115,115,115,115,628,628,628,628,628,628,628,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 156 */
-621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,
-621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,
-621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,
-621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,621,
-621,621,621,621,621,621,621,621,621,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,
+629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,
+629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,
+629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,
+629,629,629,629,629,629,629,629,629,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 157 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,
-622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,114,
+630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,
+630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,
+630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,
+630,630,630,115,115,115,115,115,115,115,115,115,115,115,115,115,
+631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,
+631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,
+631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,
+631,631,631,115,115,115,115,115,115,115,632,632,632,632,632,632,
/* block 158 */
-623,624,623,625,625,625,625,625,625,625,625,625,625,625,625,625,
-625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,
-625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,625,
-625,625,625,625,625,625,625,625,624,624,624,624,624,624,624,624,
-624,624,624,624,624,624,624,626,626,626,626,626,626,626,114,114,
-114,114,627,627,627,627,627,627,627,627,627,627,627,627,627,627,
-627,627,627,627,627,627,628,628,628,628,628,628,628,628,628,628,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,624,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,
+633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,115,
/* block 159 */
-629,629,630,631,631,631,631,631,631,631,631,631,631,631,631,631,
-631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,
-631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,
-630,630,630,629,629,629,629,630,630,629,629,632,632,633,632,632,
-632,632,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-634,634,634,634,634,634,634,634,634,634,634,634,634,634,634,634,
-634,634,634,634,634,634,634,634,634,114,114,114,114,114,114,114,
-635,635,635,635,635,635,635,635,635,635,114,114,114,114,114,114,
+634,635,634,636,636,636,636,636,636,636,636,636,636,636,636,636,
+636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,
+636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,
+636,636,636,636,636,636,636,636,635,635,635,635,635,635,635,635,
+635,635,635,635,635,635,635,637,637,637,637,637,637,637,115,115,
+115,115,638,638,638,638,638,638,638,638,638,638,638,638,638,638,
+638,638,638,638,638,638,639,639,639,639,639,639,639,639,639,639,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,635,
/* block 160 */
-636,636,636,637,637,637,637,637,637,637,637,637,637,637,637,637,
-637,637,637,637,637,637,637,637,637,637,637,637,637,637,637,637,
-637,637,637,637,637,637,637,636,636,636,636,636,638,636,636,636,
-636,636,636,636,636,114,639,639,639,639,639,639,639,639,639,639,
-640,640,640,640,114,114,114,114,114,114,114,114,114,114,114,114,
-641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,
-641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,641,
-641,641,641,642,643,643,641,114,114,114,114,114,114,114,114,114,
+640,640,641,642,642,642,642,642,642,642,642,642,642,642,642,642,
+642,642,642,642,642,642,642,642,642,642,642,642,642,642,642,642,
+642,642,642,642,642,642,642,642,642,642,642,642,642,642,642,642,
+641,641,641,640,640,640,640,641,641,640,640,643,643,644,643,643,
+643,643,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+645,645,645,645,645,645,645,645,645,645,645,645,645,645,645,645,
+645,645,645,645,645,645,645,645,645,115,115,115,115,115,115,115,
+646,646,646,646,646,646,646,646,646,646,115,115,115,115,115,115,
/* block 161 */
-644,644,645,646,646,646,646,646,646,646,646,646,646,646,646,646,
-646,646,646,646,646,646,646,646,646,646,646,646,646,646,646,646,
-646,646,646,646,646,646,646,646,646,646,646,646,646,646,646,646,
-646,646,646,645,645,645,644,644,644,644,644,644,644,644,644,645,
-645,646,646,646,646,647,647,647,647,114,114,114,114,647,114,114,
-648,648,648,648,648,648,648,648,648,648,646,114,114,114,114,114,
-114,649,649,649,649,649,649,649,649,649,649,649,649,649,649,649,
-649,649,649,649,649,114,114,114,114,114,114,114,114,114,114,114,
+647,647,647,648,648,648,648,648,648,648,648,648,648,648,648,648,
+648,648,648,648,648,648,648,648,648,648,648,648,648,648,648,648,
+648,648,648,648,648,648,648,647,647,647,647,647,649,647,647,647,
+647,647,647,647,647,115,650,650,650,650,650,650,650,650,650,650,
+651,651,651,651,115,115,115,115,115,115,115,115,115,115,115,115,
+652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,
+652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,
+652,652,652,653,654,654,652,115,115,115,115,115,115,115,115,115,
/* block 162 */
-650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,650,
-650,650,114,650,650,650,650,650,650,650,650,650,650,650,650,650,
-650,650,650,650,650,650,650,650,650,650,650,650,651,651,651,652,
-652,652,651,651,652,651,652,652,653,653,653,653,653,653,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+655,655,656,657,657,657,657,657,657,657,657,657,657,657,657,657,
+657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,
+657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,
+657,657,657,656,656,656,655,655,655,655,655,655,655,655,655,656,
+656,657,657,657,657,658,658,658,658,658,655,655,655,658,115,115,
+659,659,659,659,659,659,659,659,659,659,657,658,657,658,658,658,
+115,660,660,660,660,660,660,660,660,660,660,660,660,660,660,660,
+660,660,660,660,660,115,115,115,115,115,115,115,115,115,115,115,
/* block 163 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,
-654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,
-654,654,654,654,654,654,654,654,654,654,654,654,654,654,654,655,
-656,656,656,655,655,655,655,655,655,655,655,114,114,114,114,114,
-657,657,657,657,657,657,657,657,657,657,114,114,114,114,114,114,
+661,661,661,661,661,661,661,661,661,661,661,661,661,661,661,661,
+661,661,115,661,661,661,661,661,661,661,661,661,661,661,661,661,
+661,661,661,661,661,661,661,661,661,661,661,661,662,662,662,663,
+663,663,662,662,663,662,663,663,664,664,664,664,664,664,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 164 */
-114,658,659,659,114,660,660,660,660,660,660,660,660,114,114,660,
-660,114,114,660,660,660,660,660,660,660,660,660,660,660,660,660,
-660,660,660,660,660,660,660,660,660,114,660,660,660,660,660,660,
-660,114,660,660,114,660,660,660,660,660,114,114,658,660,661,659,
-658,659,659,659,659,114,114,659,659,114,114,659,659,659,114,114,
-114,114,114,114,114,114,114,661,114,114,114,114,114,660,660,660,
-660,660,659,659,114,114,658,658,658,658,658,658,658,114,114,114,
-658,658,658,658,658,114,114,114,114,114,114,114,114,114,114,114,
+665,665,665,665,665,665,665,115,665,115,665,665,665,665,115,665,
+665,665,665,665,665,665,665,665,665,665,665,665,665,665,115,665,
+665,665,665,665,665,665,665,665,665,666,115,115,115,115,115,115,
+667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,
+667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,
+667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,668,
+669,669,669,668,668,668,668,668,668,668,668,115,115,115,115,115,
+670,670,670,670,670,670,670,670,670,670,115,115,115,115,115,115,
/* block 165 */
-662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,
-662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,
-662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,662,
-663,664,664,665,665,665,665,665,665,664,665,664,664,663,664,665,
-665,664,665,665,662,662,666,662,114,114,114,114,114,114,114,114,
-667,667,667,667,667,667,667,667,667,667,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+671,671,672,672,115,673,673,673,673,673,673,673,673,115,115,673,
+673,115,115,673,673,673,673,673,673,673,673,673,673,673,673,673,
+673,673,673,673,673,673,673,673,673,115,673,673,673,673,673,673,
+673,115,673,673,115,673,673,673,673,673,115,115,671,673,674,672,
+671,672,672,672,672,115,115,672,672,115,115,672,672,672,115,115,
+673,115,115,115,115,115,115,674,115,115,115,115,115,673,673,673,
+673,673,672,672,115,115,671,671,671,671,671,671,671,115,115,115,
+671,671,671,671,671,115,115,115,115,115,115,115,115,115,115,115,
/* block 166 */
-668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,
-668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,
-668,668,668,668,668,668,668,668,668,668,668,668,668,668,668,669,
-670,670,671,671,671,671,114,114,670,670,670,670,671,671,670,671,
-671,672,672,672,672,672,672,672,672,672,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,
+675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,
+675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,
+676,677,677,678,678,678,678,678,678,677,678,677,677,676,677,678,
+678,677,678,678,675,675,679,675,115,115,115,115,115,115,115,115,
+680,680,680,680,680,680,680,680,680,680,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 167 */
-673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,
-673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,
-673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,673,
-674,674,674,675,675,675,675,675,675,675,675,674,674,675,674,675,
-675,676,676,676,673,114,114,114,114,114,114,114,114,114,114,114,
-677,677,677,677,677,677,677,677,677,677,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,
+681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,
+681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,682,
+683,683,684,684,684,684,115,115,683,683,683,683,684,684,683,684,
+684,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,
+685,685,685,685,685,685,685,685,681,681,681,681,684,684,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 168 */
-678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,
-678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,678,
-678,678,678,678,678,678,678,678,678,678,678,679,680,679,680,680,
-679,679,679,679,679,679,680,679,114,114,114,114,114,114,114,114,
-681,681,681,681,681,681,681,681,681,681,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,
+686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,
+686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,
+687,687,687,688,688,688,688,688,688,688,688,687,687,688,687,688,
+688,689,689,689,686,115,115,115,115,115,115,115,115,115,115,115,
+690,690,690,690,690,690,690,690,690,690,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 169 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,
-682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,
-683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,
-683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,683,
-684,684,684,684,684,684,684,684,684,684,685,685,685,685,685,685,
-685,685,685,114,114,114,114,114,114,114,114,114,114,114,114,686,
+691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,
+691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,
+691,691,691,691,691,691,691,691,691,691,691,692,693,692,693,693,
+692,692,692,692,692,692,693,692,115,115,115,115,115,115,115,115,
+694,694,694,694,694,694,694,694,694,694,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 170 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,
-687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,
-687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,687,
-687,687,687,687,687,687,687,687,687,114,114,114,114,114,114,114,
+695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,
+695,695,695,695,695,695,695,695,695,695,115,115,115,696,696,696,
+697,697,696,696,696,696,697,696,696,696,696,696,115,115,115,115,
+698,698,698,698,698,698,698,698,698,698,699,699,700,700,700,701,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 171 */
-688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,
-688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,
-688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,
-688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,
-688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,
-688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,
-688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,
-688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,
+702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,
+703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,
+703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,
+704,704,704,704,704,704,704,704,704,704,705,705,705,705,705,705,
+705,705,705,115,115,115,115,115,115,115,115,115,115,115,115,706,
/* block 172 */
-688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,688,
-688,688,688,688,688,688,688,688,688,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,
+707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,
+707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,
+707,707,707,707,707,707,707,707,707,115,115,115,115,115,115,115,
/* block 173 */
-689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,
-689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,
-689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,
-689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,
-689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,
-689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,
-689,689,689,689,689,689,689,689,689,689,689,689,689,689,689,114,
-690,690,690,690,690,114,114,114,114,114,114,114,114,114,114,114,
+708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
+708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
+708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
+708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
+708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
+708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
+708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
+708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
/* block 174 */
-691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,
-691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,
-691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,
-691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,
-691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,
-691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,
-691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,
-691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,
+708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
+708,708,708,708,708,708,708,708,708,708,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 175 */
-691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,
-691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,
-691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,
+709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,
+709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,
+709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,
+709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,
+709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,
+709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,115,
+710,710,710,710,710,115,115,115,115,115,115,115,115,115,115,115,
/* block 176 */
-497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,
-497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,
-497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,
-497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,
-497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,
-497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,
-497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,
-497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,
+708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
+708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
+708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
+708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
+708,708,708,708,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 177 */
-497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,
-497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,
-497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,497,
-497,497,497,497,497,497,497,497,497,114,114,114,114,114,114,114,
-692,692,692,692,692,692,692,692,692,692,692,692,692,692,692,692,
-692,692,692,692,692,692,692,692,692,692,692,692,692,692,692,114,
-693,693,693,693,693,693,693,693,693,693,114,114,114,114,694,694,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,
+711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,
+711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,
+711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,
+711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,
+711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,
+711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,
+711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,
/* block 178 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,
-695,695,695,695,695,695,695,695,695,695,695,695,695,695,114,114,
-696,696,696,696,696,697,114,114,114,114,114,114,114,114,114,114,
+711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,
+711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,
+711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 179 */
-698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,
-698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,
-698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,
-699,699,699,699,699,699,699,700,700,700,700,700,701,701,701,701,
-702,702,702,702,700,701,114,114,114,114,114,114,114,114,114,114,
-703,703,703,703,703,703,703,703,703,703,114,704,704,704,704,704,
-704,704,114,698,698,698,698,698,698,698,698,698,698,698,698,698,
-698,698,698,698,698,698,698,698,114,114,114,114,114,698,698,698,
+712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,
+712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,
+712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,
+712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,
+712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,
+712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,
+712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,
+712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,
/* block 180 */
-698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,698,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,
+712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,
+712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,
+712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,
+712,712,712,712,712,712,712,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 181 */
-705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,
-705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,
-705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,
-705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,705,
-705,705,705,705,705,114,114,114,114,114,114,114,114,114,114,114,
-705,706,706,706,706,706,706,706,706,706,706,706,706,706,706,706,
-706,706,706,706,706,706,706,706,706,706,706,706,706,706,706,706,
-706,706,706,706,706,706,706,706,706,706,706,706,706,706,706,114,
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
/* block 182 */
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,707,
-707,707,707,708,708,708,708,708,708,708,708,708,708,708,708,708,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+498,498,498,498,498,498,498,498,498,115,115,115,115,115,115,115,
+713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,
+713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,115,
+714,714,714,714,714,714,714,714,714,714,115,115,115,115,715,715,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 183 */
-478,476,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,
+716,716,716,716,716,716,716,716,716,716,716,716,716,716,115,115,
+717,717,717,717,717,718,115,115,115,115,115,115,115,115,115,115,
/* block 184 */
-709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,
-709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,
-709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,
-709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,
-709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,
-709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,
-709,709,709,709,709,709,709,709,709,709,709,114,114,114,114,114,
-709,709,709,709,709,709,709,709,709,709,709,709,709,114,114,114,
+719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,
+719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,
+719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,
+720,720,720,720,720,720,720,721,721,721,721,721,722,722,722,722,
+723,723,723,723,721,722,115,115,115,115,115,115,115,115,115,115,
+724,724,724,724,724,724,724,724,724,724,115,725,725,725,725,725,
+725,725,115,719,719,719,719,719,719,719,719,719,719,719,719,719,
+719,719,719,719,719,719,719,719,115,115,115,115,115,719,719,719,
/* block 185 */
-709,709,709,709,709,709,709,709,709,114,114,114,114,114,114,114,
-709,709,709,709,709,709,709,709,709,709,114,114,710,711,711,712,
- 22, 22, 22, 22,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
/* block 186 */
+726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,
+726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,
+726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,
+726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,
+726,726,726,726,726,115,115,115,115,115,115,115,115,115,115,115,
+726,727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,
+727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,
+727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,115,
+
+/* block 187 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,728,
+728,728,728,729,729,729,729,729,729,729,729,729,729,729,729,729,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 188 */
+479,477,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 189 */
+730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,
+730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,
+730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,
+730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,
+730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,
+730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,
+730,730,730,730,730,730,730,730,730,730,730,115,115,115,115,115,
+730,730,730,730,730,730,730,730,730,730,730,730,730,115,115,115,
+
+/* block 190 */
+730,730,730,730,730,730,730,730,730,115,115,115,115,115,115,115,
+730,730,730,730,730,730,730,730,730,730,115,115,731,732,732,733,
+ 22, 22, 22, 22,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 191 */
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
@@ -3221,239 +3295,259 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 58112 bytes, block = 128 */
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19,114,114,114,114,114,114,114,114,114,114,
+ 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,115,
-/* block 187 */
+/* block 192 */
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19,114,114, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19,115,115, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19,713,405,109,109,109, 19, 19, 19,405,713,713,
-713,713,713, 22, 22, 22, 22, 22, 22, 22, 22,109,109,109,109,109,
+ 19, 19, 19, 19, 19,734,406,110,110,110, 19, 19, 19,406,734,734,
+734,734,734, 22, 22, 22, 22, 22, 22, 22, 22,110,110,110,110,110,
-/* block 188 */
-109,109,109, 19, 19,109,109,109,109,109,109,109, 19, 19, 19, 19,
+/* block 193 */
+110,110,110, 19, 19,110,110,110,110,110,110,110, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,110,110,110,110, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,109,109,109,109, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-/* block 189 */
-559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,
-559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,
-559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,
-559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,559,
-559,559,714,714,714,559,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+/* block 194 */
+564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,
+564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,
+564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,
+564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,
+564,564,735,735,735,564,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-/* block 190 */
+/* block 195 */
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19,114,114,114,114,114,114,114,114,114,
+ 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,
23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 23,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+ 23, 23,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-/* block 191 */
-437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
-437,437,437,437,437,437,437,437,437,437,438,438,438,438,438,438,
+/* block 196 */
+438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
+438,438,438,438,438,438,438,438,438,438,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
+439,439,439,439,438,438,438,438,438,438,438,438,438,438,438,438,
+438,438,438,438,438,438,438,438,438,438,438,438,438,438,439,439,
+439,439,439,439,439,115,439,439,439,439,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,438,438,438,438,438,438,438,438,
438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
-438,438,438,438,437,437,437,437,437,437,437,437,437,437,437,437,
-437,437,437,437,437,437,437,437,437,437,437,437,437,437,438,438,
-438,438,438,438,438,114,438,438,438,438,438,438,438,438,438,438,
-438,438,438,438,438,438,438,438,437,437,437,437,437,437,437,437,
-437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
-/* block 192 */
-437,437,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
-438,438,438,438,438,438,438,438,438,438,438,438,437,114,437,437,
-114,114,437,114,114,437,437,114,114,437,437,437,437,114,437,437,
-437,437,437,437,437,437,438,438,438,438,114,438,114,438,438,438,
-438,438,438,438,114,438,438,438,438,438,438,438,438,438,438,438,
-437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
-437,437,437,437,437,437,437,437,437,437,438,438,438,438,438,438,
+/* block 197 */
+438,438,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,439,439,439,439,438,115,438,438,
+115,115,438,115,115,438,438,115,115,438,438,438,438,115,438,438,
+438,438,438,438,438,438,439,439,439,439,115,439,115,439,439,439,
+439,439,439,439,115,439,439,439,439,439,439,439,439,439,439,439,
438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
+438,438,438,438,438,438,438,438,438,438,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
-/* block 193 */
-438,438,438,438,437,437,114,437,437,437,437,114,114,437,437,437,
-437,437,437,437,437,114,437,437,437,437,437,437,437,114,438,438,
+/* block 198 */
+439,439,439,439,438,438,115,438,438,438,438,115,115,438,438,438,
+438,438,438,438,438,115,438,438,438,438,438,438,438,115,439,439,
+439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,438,438,115,438,438,438,438,115,
+438,438,438,438,438,115,438,115,115,115,438,438,438,438,438,438,
+438,115,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,439,439,439,439,438,438,438,438,
438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
-438,438,438,438,438,438,438,438,437,437,114,437,437,437,437,114,
-437,437,437,437,437,114,437,114,114,114,437,437,437,437,437,437,
-437,114,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
-438,438,438,438,438,438,438,438,438,438,438,438,437,437,437,437,
-437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
-/* block 194 */
-437,437,437,437,437,437,438,438,438,438,438,438,438,438,438,438,
+/* block 199 */
+438,438,438,438,438,438,439,439,439,439,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
-437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
-437,437,437,437,437,437,437,437,437,437,438,438,438,438,438,438,
+438,438,438,438,438,438,438,438,438,438,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
+439,439,439,439,438,438,438,438,438,438,438,438,438,438,438,438,
+438,438,438,438,438,438,438,438,438,438,438,438,438,438,439,439,
+439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
+
+/* block 200 */
+439,439,439,439,439,439,439,439,438,438,438,438,438,438,438,438,
438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
-438,438,438,438,437,437,437,437,437,437,437,437,437,437,437,437,
-437,437,437,437,437,437,437,437,437,437,437,437,437,437,438,438,
+438,438,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,439,439,439,439,438,438,438,438,
438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
-
-/* block 195 */
-438,438,438,438,438,438,438,438,437,437,437,437,437,437,437,437,
-437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
-437,437,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
-438,438,438,438,438,438,438,438,438,438,438,438,437,437,437,437,
-437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
-437,437,437,437,437,437,438,438,438,438,438,438,438,438,438,438,
+438,438,438,438,438,438,439,439,439,439,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
-437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
-/* block 196 */
-437,437,437,437,437,437,437,437,437,437,438,438,438,438,438,438,
+/* block 201 */
+438,438,438,438,438,438,438,438,438,438,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
+439,439,439,439,439,439,115,115,438,438,438,438,438,438,438,438,
438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
-438,438,438,438,438,438,114,114,437,437,437,437,437,437,437,437,
-437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
-437, 8,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
-438,438,438,438,438,438,438,438,438,438,438, 8,438,438,438,438,
-438,438,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
-437,437,437,437,437,437,437,437,437,437,437, 8,438,438,438,438,
+438, 8,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,439,439,439, 8,439,439,439,439,
+439,439,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
+438,438,438,438,438,438,438,438,438,438,438, 8,439,439,439,439,
-/* block 197 */
+/* block 202 */
+439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
+439,439,439,439,439, 8,439,439,439,439,439,439,438,438,438,438,
438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
-438,438,438,438,438, 8,438,438,438,438,438,438,437,437,437,437,
-437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
-437,437,437,437,437, 8,438,438,438,438,438,438,438,438,438,438,
+438,438,438,438,438, 8,439,439,439,439,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,439,439,439,439,439,439,439, 8,
+439,439,439,439,439,439,438,438,438,438,438,438,438,438,438,438,
438,438,438,438,438,438,438,438,438,438,438,438,438,438,438, 8,
-438,438,438,438,438,438,437,437,437,437,437,437,437,437,437,437,
-437,437,437,437,437,437,437,437,437,437,437,437,437,437,437, 8,
-438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
+439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
-/* block 198 */
-438,438,438,438,438,438,438,438,438, 8,438,438,438,438,438,438,
-437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
-437,437,437,437,437,437,437,437,437, 8,438,438,438,438,438,438,
+/* block 203 */
+439,439,439,439,439,439,439,439,439, 8,439,439,439,439,439,439,
438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
-438,438,438, 8,438,438,438,438,438,438,437,438,114,114, 10, 10,
+438,438,438,438,438,438,438,438,438, 8,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
+439,439,439, 8,439,439,439,439,439,439,438,439,115,115, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
-/* block 199 */
-715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,
-715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,
-715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,
-715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,
-715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,
-715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,
-715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,
-715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,
+/* block 204 */
+736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,
+736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,
+736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,
+736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,
+736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,
+736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,
+736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,
+736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,
-/* block 200 */
-715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,
-715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,
-715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,
-715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,715,
-715,715,715,715,715,114,114,716,716,716,716,716,716,716,716,716,
-717,717,717,717,717,717,717,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+/* block 205 */
+737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,
+737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,
+737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,
+737,737,737,737,737,737,737,736,736,736,736,737,737,737,737,737,
+737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,
+737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,
+737,737,737,737,737,737,737,737,737,737,737,737,737,736,736,736,
+736,736,736,736,736,737,736,736,736,736,736,736,736,736,736,736,
-/* block 201 */
-199,199,199,199,114,199,199,199,199,199,199,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
-114,199,199,114,199,114,114,199,114,199,199,199,199,199,199,199,
-199,199,199,114,199,199,199,199,114,199,114,199,114,114,114,114,
-114,114,199,114,114,114,114,199,114,199,114,199,114,199,199,199,
-114,199,199,114,199,114,114,199,114,199,114,199,114,199,114,199,
-114,199,199,114,199,114,114,199,199,199,199,114,199,199,199,199,
-199,199,199,114,199,199,199,199,114,199,199,199,199,114,199,114,
+/* block 206 */
+736,736,736,736,737,736,736,738,738,738,738,738,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,737,737,737,737,737,
+115,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-/* block 202 */
-199,199,199,199,199,199,199,199,199,199,114,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,114,114,114,114,
-114,199,199,199,114,199,199,199,199,199,114,199,199,199,199,199,
-199,199,199,199,199,199,199,199,199,199,199,199,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-194,194,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+/* block 207 */
+739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,
+739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,
+739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,
+739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,
+739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,
+739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,
+739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,
+739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,
-/* block 203 */
+/* block 208 */
+739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,
+739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,
+739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,
+739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,
+739,739,739,739,739,115,115,740,740,740,740,740,740,740,740,740,
+741,741,741,741,741,741,741,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 209 */
+200,200,200,200,115,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+115,200,200,115,200,115,115,200,115,200,200,200,200,200,200,200,
+200,200,200,115,200,200,200,200,115,200,115,200,115,115,115,115,
+115,115,200,115,115,115,115,200,115,200,115,200,115,200,200,200,
+115,200,200,115,200,115,115,200,115,200,115,200,115,200,115,200,
+115,200,200,115,200,115,115,200,200,200,200,115,200,200,200,200,
+200,200,200,115,200,200,200,200,115,200,200,200,200,115,200,115,
+
+/* block 210 */
+200,200,200,200,200,200,200,200,200,200,115,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,115,115,115,115,
+115,200,200,200,115,200,200,200,200,200,115,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+195,195,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 211 */
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,114,114,114,114,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-/* block 204 */
+/* block 212 */
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19,114,114,114,114,114,114,114,114,114,114,114,114,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,114,
-114, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-114, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-114, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,
+115, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+115, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+115, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19,114,114,114,114,114,114,114,114,114,114,
+ 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,115,
-/* block 205 */
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,114,114,114,
+/* block 213 */
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,115,115,115,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,114,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,114,114,114,114,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-/* block 206 */
+/* block 214 */
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,718,718,718,718,718,718,718,718,718,718,
-718,718,718,718,718,718,718,718,718,718,718,718,718,718,718,718,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,742,742,742,742,742,742,742,742,742,742,
+742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,
-/* block 207 */
-719, 19, 19,114,114,114,114,114,114,114,114,114,114,114,114,114,
+/* block 215 */
+743, 19, 19,115,115,115,115,115,115,115,115,115,115,115,115,115,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,114,114,114,114,114,
- 19, 19, 19, 19, 19, 19, 19, 19, 19,114,114,114,114,114,114,114,
- 19, 19,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,
+ 19, 19,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-/* block 208 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,114,114,114,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+/* block 216 */
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,114,114,
-
-/* block 209 */
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,114,
-114,114,114,114, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,114,114,114,114,114,114,114,114,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 14, 14, 14, 14, 14,
-/* block 210 */
+/* block 217 */
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
@@ -3461,121 +3555,141 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 58112 bytes, block = 128 */
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,114,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115, 19, 19, 19, 19, 19,
-/* block 211 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+/* block 218 */
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19,115, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,114,114,114,114,114,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,114, 19, 19, 19, 19, 19,
-
-/* block 212 */
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19,114, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+
+/* block 219 */
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,
+ 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,115,115,115,
-/* block 213 */
+/* block 220 */
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19,114,114, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,115,115,115,
-/* block 214 */
+/* block 221 */
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,114,114,114,
- 19, 19, 19, 19,114,114,114,114,114,114,114,114,114,114,114,114,
+ 19, 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-/* block 215 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+/* block 222 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19,114,114,114,114,114,114,114,114,114,114,114,114,
-/* block 216 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+/* block 223 */
+ 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,115,
19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-/* block 217 */
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,114,114,114,114,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19,114,114,114,114,114,114,114,114,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,114,114,114,114,114,114,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+/* block 224 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-/* block 218 */
- 19, 19, 19, 19, 19, 19, 19, 19,114,114,114,114,114,114,114,114,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+/* block 225 */
+ 19, 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+ 19,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-/* block 219 */
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+/* block 226 */
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
-/* block 220 */
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,114,114,114,114,114,114,114,114,114,114,114,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
+/* block 227 */
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,115,115,115,115,115,115,115,115,115,115,115,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
-/* block 221 */
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
-484,484,484,484,484,484,484,484,484,484,484,484,484,484,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
-114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,
+/* block 228 */
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,115,115,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
-/* block 222 */
-436, 22,436,436,436,436,436,436,436,436,436,436,436,436,436,436,
-436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,
+/* block 229 */
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 230 */
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 231 */
+437, 22,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
+437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
@@ -3583,45 +3697,45 @@ const uint16_t PRIV(ucd_stage2)[] = { /* 58112 bytes, block = 128 */
22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
-/* block 223 */
-436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,
-436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,
-436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,
-436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,
-436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,
-436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,
-436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,
-436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,
-
-/* block 224 */
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
+/* block 232 */
+437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
+437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
+437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
+437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
+437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
+437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
+437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
+437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
-/* block 225 */
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,
-436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,436,
+/* block 233 */
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+
+/* block 234 */
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
-/* block 226 */
-552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,
-552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,
-552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,
-552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,
-552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,
-552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,
-552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,
-552,552,552,552,552,552,552,552,552,552,552,552,552,552,114,114,
+/* block 235 */
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,115,115,
};
diff --git a/pcre2-10.20/src/pcre2_ucp.h b/pcre2-10.21/src/pcre2_ucp.h
index e7db0c01..0b7553e5 100644
--- a/pcre2-10.20/src/pcre2_ucp.h
+++ b/pcre2-10.21/src/pcre2_ucp.h
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2014 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -253,7 +253,14 @@ enum {
ucp_Pau_Cin_Hau,
ucp_Siddham,
ucp_Tirhuta,
- ucp_Warang_Citi
+ ucp_Warang_Citi,
+ /* New for Unicode 8.0.0: */
+ ucp_Ahom,
+ ucp_Anatolian_Hieroglyphs,
+ ucp_Hatran,
+ ucp_Multani,
+ ucp_Old_Hungarian,
+ ucp_SignWriting
};
#endif
diff --git a/pcre2-10.20/src/pcre2_valid_utf.c b/pcre2-10.21/src/pcre2_valid_utf.c
index a97847ab..2dfd8df3 100644
--- a/pcre2-10.20/src/pcre2_valid_utf.c
+++ b/pcre2-10.21/src/pcre2_valid_utf.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2014 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -131,11 +131,13 @@ PCRE2_ERROR_UTF8_ERR20 Isolated 0x80 byte (not within UTF-8 character)
PCRE2_ERROR_UTF8_ERR21 Byte with the illegal value 0xfe or 0xff
*/
-for (p = string; length-- > 0; p++)
+for (p = string; length > 0; p++)
{
register uint32_t ab, d;
c = *p;
+ length--;
+
if (c < 128) continue; /* ASCII character */
if (c < 0xc0) /* Isolated 10xx xxxx byte */
@@ -324,9 +326,10 @@ PCRE2_ERROR_UTF16_ERR2 Invalid low surrogate
PCRE2_ERROR_UTF16_ERR3 Isolated low surrogate
*/
-for (p = string; length-- > 0; p++)
+for (p = string; length > 0; p++)
{
c = *p;
+ length--;
if ((c & 0xf800) != 0xd800)
{
@@ -368,7 +371,7 @@ PCRE2_ERROR_UTF32_ERR1 Surrogate character
PCRE2_ERROR_UTF32_ERR2 Character > 0x10ffff
*/
-for (p = string; length-- > 0; p++)
+for (p = string; length > 0; length--, p++)
{
c = *p;
if ((c & 0xfffff800u) != 0xd800u)
diff --git a/pcre2-10.20/src/pcre2_xclass.c b/pcre2-10.21/src/pcre2_xclass.c
index 2ea89c4b..407d3f5b 100644
--- a/pcre2-10.20/src/pcre2_xclass.c
+++ b/pcre2-10.21/src/pcre2_xclass.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2014 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -247,7 +247,7 @@ while ((t = *data++) != XCL_END)
case PT_PXPUNCT:
if ((PRIV(ucp_gentype)[prop->chartype] == ucp_P ||
- (c < 256 && PRIV(ucp_gentype)[prop->chartype] == ucp_S)) == isprop)
+ (c < 128 && PRIV(ucp_gentype)[prop->chartype] == ucp_S)) == isprop)
return !negated;
break;
diff --git a/pcre2-10.20/src/pcre2demo.c b/pcre2-10.21/src/pcre2demo.c
index ec51cf11..ec51cf11 100644
--- a/pcre2-10.20/src/pcre2demo.c
+++ b/pcre2-10.21/src/pcre2demo.c
diff --git a/pcre2-10.20/src/pcre2grep.c b/pcre2-10.21/src/pcre2grep.c
index d5a5d6db..aadb22a5 100644
--- a/pcre2-10.20/src/pcre2grep.c
+++ b/pcre2-10.21/src/pcre2grep.c
@@ -13,7 +13,7 @@ distribution because other apparatus is needed to compile pcre2grep for z/OS.
The header can be found in the special z/OS distribution, which is available
from www.zaconsultants.net or from www.cbttape.org.
- Copyright (c) 1997-2014 University of Cambridge
+ Copyright (c) 1997-2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -1691,9 +1691,13 @@ while (ptr < endptr)
if (filenames == FN_NOMATCH_ONLY) return 1;
+ /* If all we want is a yes/no answer, we can return immediately. */
+
+ if (quiet) return 0;
+
/* Just count if just counting is wanted. */
- if (count_only) count++;
+ else if (count_only) count++;
/* When handling a binary file and binary-files==binary, the "binary"
variable will be set true (it's false in all other cases). In this
@@ -1705,8 +1709,8 @@ while (ptr < endptr)
return 0;
}
- /* If all we want is a file name, there is no need to scan any more lines
- in the file. */
+ /* Likewise, if all we want is a file name, there is no need to scan any
+ more lines in the file. */
else if (filenames == FN_MATCH_ONLY)
{
@@ -1714,10 +1718,6 @@ while (ptr < endptr)
return 0;
}
- /* Likewise, if all we want is a yes/no answer. */
-
- else if (quiet) return 0;
-
/* The --only-matching option prints just the substring that matched,
and/or one or more captured portions of it, as long as these strings are
not empty. The --file-offsets and --line-offsets options output offsets for
@@ -2069,7 +2069,7 @@ if (filenames == FN_NOMATCH_ONLY)
/* Print the match count if wanted */
-if (count_only)
+if (count_only && !quiet)
{
if (count > 0 || !omit_zero_count)
{
@@ -2421,7 +2421,7 @@ return options;
static char *
ordin(int n)
{
-static char buffer[8];
+static char buffer[14];
char *p = buffer;
sprintf(p, "%d", n);
while (*p != 0) p++;
diff --git a/pcre2-10.20/src/pcre2posix.c b/pcre2-10.21/src/pcre2posix.c
index da212fc4..1d6e5b79 100644
--- a/pcre2-10.20/src/pcre2posix.c
+++ b/pcre2-10.21/src/pcre2posix.c
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2014 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -106,7 +106,7 @@ static const int eint1[] = {
static const int eint2[] = {
30, REG_ECTYPE, /* unknown POSIX class name */
- 32, REG_INVARG, /* this version of PCRE does not have UTF or UCP support */
+ 32, REG_INVARG, /* this version of PCRE2 does not have Unicode support */
37, REG_EESCAPE, /* PCRE2 does not support \L, \l, \N{name}, \U, or \u */
56, REG_INVARG, /* internal error: unknown newline setting */
};
@@ -144,29 +144,23 @@ static const char *const pstring[] = {
PCRE2POSIX_EXP_DEFN size_t PCRE2_CALL_CONVENTION
regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size)
{
-const char *message, *addmessage;
-size_t length, addlength;
+int used;
+const char *message;
-message = (errcode >= (int)(sizeof(pstring)/sizeof(char *)))?
+message = (errcode <= 0 || errcode >= (int)(sizeof(pstring)/sizeof(char *)))?
"unknown error code" : pstring[errcode];
-length = strlen(message) + 1;
-addmessage = " at offset ";
-addlength = (preg != NULL && (int)preg->re_erroffset != -1)?
- strlen(addmessage) + 6 : 0;
-
-if (errbuf_size > 0)
+if (preg != NULL && (int)preg->re_erroffset != -1)
{
- if (addlength > 0 && errbuf_size >= length + addlength)
- sprintf(errbuf, "%s%s%-6d", message, addmessage, (int)preg->re_erroffset);
- else
- {
- strncpy(errbuf, message, errbuf_size - 1);
- errbuf[errbuf_size-1] = 0;
- }
+ used = snprintf(errbuf, errbuf_size, "%s at offset %-6d", message,
+ (int)preg->re_erroffset);
+ }
+else
+ {
+ used = snprintf(errbuf, errbuf_size, "%s", message);
}
-return length + addlength;
+return used + 1;
}
@@ -223,8 +217,13 @@ preg->re_erroffset = erroffset;
if (preg->re_pcre2_code == NULL)
{
unsigned int i;
- if (errorcode < 0) return REG_BADPAT; /* UTF error */
+
+ /* A negative value is a UTF error; otherwise all error codes are greater
+ than COMPILE_ERROR_BASE, but check, just in case. */
+
+ if (errorcode < COMPILE_ERROR_BASE) return REG_BADPAT;
errorcode -= COMPILE_ERROR_BASE;
+
if (errorcode < (int)(sizeof(eint1)/sizeof(const int)))
return eint1[errorcode];
for (i = 0; i < sizeof(eint2)/(2*sizeof(const int)); i += 2)
@@ -237,6 +236,13 @@ if (preg->re_pcre2_code == NULL)
preg->re_nsub = (size_t)re_nsub;
if ((options & PCRE2_NO_AUTO_CAPTURE) != 0) re_nsub = -1;
preg->re_match_data = pcre2_match_data_create(re_nsub + 1, NULL);
+
+if (preg->re_match_data == NULL)
+ {
+ pcre2_code_free(preg->re_pcre2_code);
+ return REG_ESPACE;
+ }
+
return 0;
}
@@ -279,6 +285,7 @@ start location rather than being passed as a PCRE2 "starting offset". */
if ((eflags & REG_STARTEND) != 0)
{
+ if (pmatch == NULL) return REG_INVARG;
so = pmatch[0].rm_so;
eo = pmatch[0].rm_eo;
}
diff --git a/pcre2-10.20/src/pcre2posix.h b/pcre2-10.21/src/pcre2posix.h
index 6f19b51b..44a2fd8a 100644
--- a/pcre2-10.20/src/pcre2posix.h
+++ b/pcre2-10.21/src/pcre2posix.h
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Original API code Copyright (c) 1997-2012 University of Cambridge
- New API code Copyright (c) 2014 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
diff --git a/pcre2-10.20/src/pcre2test.c b/pcre2-10.21/src/pcre2test.c
index 34cc3a5e..0a5879e4 100644
--- a/pcre2-10.20/src/pcre2test.c
+++ b/pcre2-10.21/src/pcre2test.c
@@ -11,7 +11,7 @@ hacked-up (non-) design had also run out of steam.
Written by Philip Hazel
Original code Copyright (c) 1997-2012 University of Cambridge
- Rewritten code Copyright (c) 2015 University of Cambridge
+ Rewritten code Copyright (c) 2016 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -66,6 +66,14 @@ it references only the enabled library functions. */
#include <locale.h>
#include <errno.h>
+#if defined NATIVE_ZOS
+#include "pcrzoscs.h"
+/* That header is not included in the main PCRE2 distribution because other
+apparatus is needed to compile pcre2test for z/OS. The header can be found in
+the special z/OS distribution, which is available from www.zaconsultants.net or
+from www.cbttape.org. */
+#endif
+
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
@@ -174,13 +182,13 @@ void vms_setsymbol( char *, char *, int );
#define LOCALESIZE 32 /* Size of locale name */
#define LOOPREPEAT 500000 /* Default loop count for timing */
#define PATSTACKSIZE 20 /* Pattern stack for save/restore testing */
-#define REPLACE_MODSIZE 96 /* Field for reading 8-bit replacement */
+#define REPLACE_MODSIZE 100 /* Field for reading 8-bit replacement */
#define VERSION_SIZE 64 /* Size of buffer for the version strings */
/* Make sure the buffer into which replacement strings are copied is big enough
to hold them as 32-bit code units. */
-#define REPLACE_BUFFSIZE (4*REPLACE_MODSIZE)
+#define REPLACE_BUFFSIZE 1024 /* This is a byte value */
/* Execution modes */
@@ -231,6 +239,22 @@ of PRIV avoids name clashes. */
#include "pcre2_tables.c"
#include "pcre2_ucd.c"
+/* 32-bit integer values in the input are read by strtoul() or strtol(). The
+check needed for overflow depends on whether long ints are in fact longer than
+ints. They are defined not to be shorter. */
+
+#if ULONG_MAX > UINT32_MAX
+#define U32OVERFLOW(x) (x > UINT32_MAX)
+#else
+#define U32OVERFLOW(x) (x == UINT32_MAX)
+#endif
+
+#if LONG_MAX > INT32_MAX
+#define S32OVERFLOW(x) (x > INT32_MAX || x < INT32_MIN)
+#else
+#define S32OVERFLOW(x) (x == INT32_MAX || x == INT32_MIN)
+#endif
+
/* When PCRE2_CODE_UNIT_WIDTH is zero, pcre2_internal.h does not include
pcre2_intmodedep.h, which is where mode-dependent macros and structures are
defined. We can now include it for each supported code unit width. Because
@@ -328,17 +352,18 @@ typedef struct cmdstruct {
int value;
} cmdstruct;
-enum { CMD_FORBID_UTF, CMD_LOAD, CMD_PATTERN, CMD_PERLTEST, CMD_POP, CMD_SAVE,
- CMD_SUBJECT, CMD_UNKNOWN };
+enum { CMD_FORBID_UTF, CMD_LOAD, CMD_NEWLINE_DEFAULT, CMD_PATTERN,
+ CMD_PERLTEST, CMD_POP, CMD_SAVE, CMD_SUBJECT, CMD_UNKNOWN };
static cmdstruct cmdlist[] = {
- { "forbid_utf", CMD_FORBID_UTF },
- { "load", CMD_LOAD },
- { "pattern", CMD_PATTERN },
- { "perltest", CMD_PERLTEST },
- { "pop", CMD_POP },
- { "save", CMD_SAVE },
- { "subject", CMD_SUBJECT }};
+ { "forbid_utf", CMD_FORBID_UTF },
+ { "load", CMD_LOAD },
+ { "newline_default", CMD_NEWLINE_DEFAULT },
+ { "pattern", CMD_PATTERN },
+ { "perltest", CMD_PERLTEST },
+ { "pop", CMD_POP },
+ { "save", CMD_SAVE },
+ { "subject", CMD_SUBJECT }};
#define cmdlistcount sizeof(cmdlist)/sizeof(cmdstruct)
@@ -370,38 +395,54 @@ enum { MOD_CTC, /* Applies to a compile context */
MOD_NL, /* Is a newline value */
MOD_NN, /* Is a number or a name; more than one may occur */
MOD_OPT, /* Is an option bit */
+ MOD_SIZ, /* Is a PCRE2_SIZE value */
MOD_STR }; /* Is a string */
/* Control bits. Some apply to compiling, some to matching, but some can be set
-either on a pattern or a data line, so they must all be distinct. */
-
-#define CTL_AFTERTEXT 0x00000001u
-#define CTL_ALLAFTERTEXT 0x00000002u
-#define CTL_ALLCAPTURES 0x00000004u
-#define CTL_ALLUSEDTEXT 0x00000008u
-#define CTL_ALTGLOBAL 0x00000010u
-#define CTL_BINCODE 0x00000020u
-#define CTL_CALLOUT_CAPTURE 0x00000040u
-#define CTL_CALLOUT_INFO 0x00000080u
-#define CTL_CALLOUT_NONE 0x00000100u
-#define CTL_DFA 0x00000200u
-#define CTL_FINDLIMITS 0x00000400u
-#define CTL_FULLBINCODE 0x00000800u
-#define CTL_GETALL 0x00001000u
-#define CTL_GLOBAL 0x00002000u
-#define CTL_HEXPAT 0x00004000u
-#define CTL_INFO 0x00008000u
-#define CTL_JITFAST 0x00010000u
-#define CTL_JITVERIFY 0x00020000u
-#define CTL_MARK 0x00040000u
-#define CTL_MEMORY 0x00080000u
-#define CTL_POSIX 0x00100000u
-#define CTL_PUSH 0x00200000u
-#define CTL_STARTCHAR 0x00400000u
-#define CTL_ZERO_TERMINATE 0x00800000u
-
-#define CTL_BSR_SET 0x80000000u /* This is informational */
-#define CTL_NL_SET 0x40000000u /* This is informational */
+either on a pattern or a data line, so they must all be distinct. There are now
+so many of them that they are split into two fields. */
+
+#define CTL_AFTERTEXT 0x00000001u
+#define CTL_ALLAFTERTEXT 0x00000002u
+#define CTL_ALLCAPTURES 0x00000004u
+#define CTL_ALLUSEDTEXT 0x00000008u
+#define CTL_ALTGLOBAL 0x00000010u
+#define CTL_BINCODE 0x00000020u
+#define CTL_CALLOUT_CAPTURE 0x00000040u
+#define CTL_CALLOUT_INFO 0x00000080u
+#define CTL_CALLOUT_NONE 0x00000100u
+#define CTL_DFA 0x00000200u
+#define CTL_EXPAND 0x00000400u
+#define CTL_FINDLIMITS 0x00000800u
+#define CTL_FULLBINCODE 0x00001000u
+#define CTL_GETALL 0x00002000u
+#define CTL_GLOBAL 0x00004000u
+#define CTL_HEXPAT 0x00008000u
+#define CTL_INFO 0x00010000u
+#define CTL_JITFAST 0x00020000u
+#define CTL_JITVERIFY 0x00040000u
+#define CTL_MARK 0x00080000u
+#define CTL_MEMORY 0x00100000u
+#define CTL_NULLCONTEXT 0x00200000u
+#define CTL_POSIX 0x00400000u
+#define CTL_PUSH 0x00800000u
+#define CTL_STARTCHAR 0x01000000u
+#define CTL_ZERO_TERMINATE 0x02000000u
+/* Spare 0x04000000u */
+/* Spare 0x08000000u */
+/* Spare 0x10000000u */
+/* Spare 0x20000000u */
+#define CTL_NL_SET 0x40000000u /* Informational */
+#define CTL_BSR_SET 0x80000000u /* Informational */
+
+/* Second control word */
+
+#define CTL2_SUBSTITUTE_EXTENDED 0x00000001u
+#define CTL2_SUBSTITUTE_OVERFLOW_LENGTH 0x00000002u
+#define CTL2_SUBSTITUTE_UNKNOWN_UNSET 0x00000004u
+#define CTL2_SUBSTITUTE_UNSET_EMPTY 0x00000008u
+
+/* Combinations */
#define CTL_DEBUG (CTL_FULLBINCODE|CTL_INFO) /* For setting */
#define CTL_ANYINFO (CTL_DEBUG|CTL_BINCODE|CTL_CALLOUT_INFO)
@@ -420,6 +461,11 @@ data line. */
CTL_MEMORY|\
CTL_STARTCHAR)
+#define CTL2_ALLPD (CTL2_SUBSTITUTE_EXTENDED|\
+ CTL2_SUBSTITUTE_OVERFLOW_LENGTH|\
+ CTL2_SUBSTITUTE_UNKNOWN_UNSET|\
+ CTL2_SUBSTITUTE_UNSET_EMPTY)
+
/* Structures for holding modifier information for patterns and subject strings
(data). Fields containing modifiers that can be set either for a pattern or a
subject must be at the start and in the same order in both cases so that the
@@ -428,10 +474,12 @@ same offset in the big table below works for both. */
typedef struct patctl { /* Structure for pattern modifiers. */
uint32_t options; /* Must be in same position as datctl */
uint32_t control; /* Must be in same position as datctl */
+ uint32_t control2; /* Must be in same position as datctl */
uint8_t replacement[REPLACE_MODSIZE]; /* So must this */
uint32_t jit;
uint32_t stackguard_test;
uint32_t tables_id;
+ uint32_t regerror_buffsize;
uint8_t locale[LOCALESIZE];
} patctl;
@@ -441,6 +489,7 @@ typedef struct patctl { /* Structure for pattern modifiers. */
typedef struct datctl { /* Structure for data line modifiers. */
uint32_t options; /* Must be in same position as patctl */
uint32_t control; /* Must be in same position as patctl */
+ uint32_t control2; /* Must be in same position as patctl */
uint8_t replacement[REPLACE_MODSIZE]; /* So must this */
uint32_t cfail[2];
int32_t callout_data;
@@ -481,82 +530,94 @@ typedef struct modstruct {
} modstruct;
static modstruct modlist[] = {
- { "aftertext", MOD_PNDP, MOD_CTL, CTL_AFTERTEXT, PO(control) },
- { "allaftertext", MOD_PNDP, MOD_CTL, CTL_ALLAFTERTEXT, PO(control) },
- { "allcaptures", MOD_PND, MOD_CTL, CTL_ALLCAPTURES, PO(control) },
- { "allow_empty_class", MOD_PAT, MOD_OPT, PCRE2_ALLOW_EMPTY_CLASS, PO(options) },
- { "allusedtext", MOD_PNDP, MOD_CTL, CTL_ALLUSEDTEXT, PO(control) },
- { "alt_bsux", MOD_PAT, MOD_OPT, PCRE2_ALT_BSUX, PO(options) },
- { "alt_circumflex", MOD_PAT, MOD_OPT, PCRE2_ALT_CIRCUMFLEX, PO(options) },
- { "altglobal", MOD_PND, MOD_CTL, CTL_ALTGLOBAL, PO(control) },
- { "anchored", MOD_PD, MOD_OPT, PCRE2_ANCHORED, PD(options) },
- { "auto_callout", MOD_PAT, MOD_OPT, PCRE2_AUTO_CALLOUT, PO(options) },
- { "bincode", MOD_PAT, MOD_CTL, CTL_BINCODE, PO(control) },
- { "bsr", MOD_CTC, MOD_BSR, 0, CO(bsr_convention) },
- { "callout_capture", MOD_DAT, MOD_CTL, CTL_CALLOUT_CAPTURE, DO(control) },
- { "callout_data", MOD_DAT, MOD_INS, 0, DO(callout_data) },
- { "callout_fail", MOD_DAT, MOD_IN2, 0, DO(cfail) },
- { "callout_info", MOD_PAT, MOD_CTL, CTL_CALLOUT_INFO, PO(control) },
- { "callout_none", MOD_DAT, MOD_CTL, CTL_CALLOUT_NONE, DO(control) },
- { "caseless", MOD_PATP, MOD_OPT, PCRE2_CASELESS, PO(options) },
- { "copy", MOD_DAT, MOD_NN, DO(copy_numbers), DO(copy_names) },
- { "debug", MOD_PAT, MOD_CTL, CTL_DEBUG, PO(control) },
- { "dfa", MOD_DAT, MOD_CTL, CTL_DFA, DO(control) },
- { "dfa_restart", MOD_DAT, MOD_OPT, PCRE2_DFA_RESTART, DO(options) },
- { "dfa_shortest", MOD_DAT, MOD_OPT, PCRE2_DFA_SHORTEST, DO(options) },
- { "dollar_endonly", MOD_PAT, MOD_OPT, PCRE2_DOLLAR_ENDONLY, PO(options) },
- { "dotall", MOD_PATP, MOD_OPT, PCRE2_DOTALL, PO(options) },
- { "dupnames", MOD_PATP, MOD_OPT, PCRE2_DUPNAMES, PO(options) },
- { "extended", MOD_PATP, MOD_OPT, PCRE2_EXTENDED, PO(options) },
- { "find_limits", MOD_DAT, MOD_CTL, CTL_FINDLIMITS, DO(control) },
- { "firstline", MOD_PAT, MOD_OPT, PCRE2_FIRSTLINE, PO(options) },
- { "fullbincode", MOD_PAT, MOD_CTL, CTL_FULLBINCODE, PO(control) },
- { "get", MOD_DAT, MOD_NN, DO(get_numbers), DO(get_names) },
- { "getall", MOD_DAT, MOD_CTL, CTL_GETALL, DO(control) },
- { "global", MOD_PNDP, MOD_CTL, CTL_GLOBAL, PO(control) },
- { "hex", MOD_PAT, MOD_CTL, CTL_HEXPAT, PO(control) },
- { "info", MOD_PAT, MOD_CTL, CTL_INFO, PO(control) },
- { "jit", MOD_PAT, MOD_IND, 7, PO(jit) },
- { "jitfast", MOD_PAT, MOD_CTL, CTL_JITFAST, PO(control) },
- { "jitstack", MOD_DAT, MOD_INT, 0, DO(jitstack) },
- { "jitverify", MOD_PAT, MOD_CTL, CTL_JITVERIFY, PO(control) },
- { "locale", MOD_PAT, MOD_STR, LOCALESIZE, PO(locale) },
- { "mark", MOD_PNDP, MOD_CTL, CTL_MARK, PO(control) },
- { "match_limit", MOD_CTM, MOD_INT, 0, MO(match_limit) },
- { "match_unset_backref", MOD_PAT, MOD_OPT, PCRE2_MATCH_UNSET_BACKREF, PO(options) },
- { "memory", MOD_PD, MOD_CTL, CTL_MEMORY, PD(control) },
- { "multiline", MOD_PATP, MOD_OPT, PCRE2_MULTILINE, PO(options) },
- { "never_backslash_c", MOD_PAT, MOD_OPT, PCRE2_NEVER_BACKSLASH_C, PO(options) },
- { "never_ucp", MOD_PAT, MOD_OPT, PCRE2_NEVER_UCP, PO(options) },
- { "never_utf", MOD_PAT, MOD_OPT, PCRE2_NEVER_UTF, PO(options) },
- { "newline", MOD_CTC, MOD_NL, 0, CO(newline_convention) },
- { "no_auto_capture", MOD_PAT, MOD_OPT, PCRE2_NO_AUTO_CAPTURE, PO(options) },
- { "no_auto_possess", MOD_PATP, MOD_OPT, PCRE2_NO_AUTO_POSSESS, PO(options) },
- { "no_dotstar_anchor", MOD_PAT, MOD_OPT, PCRE2_NO_DOTSTAR_ANCHOR, PO(options) },
- { "no_start_optimize", MOD_PATP, MOD_OPT, PCRE2_NO_START_OPTIMIZE, PO(options) },
- { "no_utf_check", MOD_PD, MOD_OPT, PCRE2_NO_UTF_CHECK, PD(options) },
- { "notbol", MOD_DAT, MOD_OPT, PCRE2_NOTBOL, DO(options) },
- { "notempty", MOD_DAT, MOD_OPT, PCRE2_NOTEMPTY, DO(options) },
- { "notempty_atstart", MOD_DAT, MOD_OPT, PCRE2_NOTEMPTY_ATSTART, DO(options) },
- { "noteol", MOD_DAT, MOD_OPT, PCRE2_NOTEOL, DO(options) },
- { "offset", MOD_DAT, MOD_INT, 0, DO(offset) },
- { "ovector", MOD_DAT, MOD_INT, 0, DO(oveccount) },
- { "parens_nest_limit", MOD_CTC, MOD_INT, 0, CO(parens_nest_limit) },
- { "partial_hard", MOD_DAT, MOD_OPT, PCRE2_PARTIAL_HARD, DO(options) },
- { "partial_soft", MOD_DAT, MOD_OPT, PCRE2_PARTIAL_SOFT, DO(options) },
- { "ph", MOD_DAT, MOD_OPT, PCRE2_PARTIAL_HARD, DO(options) },
- { "posix", MOD_PAT, MOD_CTL, CTL_POSIX, PO(control) },
- { "ps", MOD_DAT, MOD_OPT, PCRE2_PARTIAL_SOFT, DO(options) },
- { "push", MOD_PAT, MOD_CTL, CTL_PUSH, PO(control) },
- { "recursion_limit", MOD_CTM, MOD_INT, 0, MO(recursion_limit) },
- { "replace", MOD_PND, MOD_STR, REPLACE_MODSIZE, PO(replacement) },
- { "stackguard", MOD_PAT, MOD_INT, 0, PO(stackguard_test) },
- { "startchar", MOD_PND, MOD_CTL, CTL_STARTCHAR, PO(control) },
- { "tables", MOD_PAT, MOD_INT, 0, PO(tables_id) },
- { "ucp", MOD_PATP, MOD_OPT, PCRE2_UCP, PO(options) },
- { "ungreedy", MOD_PAT, MOD_OPT, PCRE2_UNGREEDY, PO(options) },
- { "utf", MOD_PATP, MOD_OPT, PCRE2_UTF, PO(options) },
- { "zero_terminate", MOD_DAT, MOD_CTL, CTL_ZERO_TERMINATE, DO(control) }
+ { "aftertext", MOD_PNDP, MOD_CTL, CTL_AFTERTEXT, PO(control) },
+ { "allaftertext", MOD_PNDP, MOD_CTL, CTL_ALLAFTERTEXT, PO(control) },
+ { "allcaptures", MOD_PND, MOD_CTL, CTL_ALLCAPTURES, PO(control) },
+ { "allow_empty_class", MOD_PAT, MOD_OPT, PCRE2_ALLOW_EMPTY_CLASS, PO(options) },
+ { "allusedtext", MOD_PNDP, MOD_CTL, CTL_ALLUSEDTEXT, PO(control) },
+ { "alt_bsux", MOD_PAT, MOD_OPT, PCRE2_ALT_BSUX, PO(options) },
+ { "alt_circumflex", MOD_PAT, MOD_OPT, PCRE2_ALT_CIRCUMFLEX, PO(options) },
+ { "alt_verbnames", MOD_PAT, MOD_OPT, PCRE2_ALT_VERBNAMES, PO(options) },
+ { "altglobal", MOD_PND, MOD_CTL, CTL_ALTGLOBAL, PO(control) },
+ { "anchored", MOD_PD, MOD_OPT, PCRE2_ANCHORED, PD(options) },
+ { "auto_callout", MOD_PAT, MOD_OPT, PCRE2_AUTO_CALLOUT, PO(options) },
+ { "bincode", MOD_PAT, MOD_CTL, CTL_BINCODE, PO(control) },
+ { "bsr", MOD_CTC, MOD_BSR, 0, CO(bsr_convention) },
+ { "callout_capture", MOD_DAT, MOD_CTL, CTL_CALLOUT_CAPTURE, DO(control) },
+ { "callout_data", MOD_DAT, MOD_INS, 0, DO(callout_data) },
+ { "callout_fail", MOD_DAT, MOD_IN2, 0, DO(cfail) },
+ { "callout_info", MOD_PAT, MOD_CTL, CTL_CALLOUT_INFO, PO(control) },
+ { "callout_none", MOD_DAT, MOD_CTL, CTL_CALLOUT_NONE, DO(control) },
+ { "caseless", MOD_PATP, MOD_OPT, PCRE2_CASELESS, PO(options) },
+ { "copy", MOD_DAT, MOD_NN, DO(copy_numbers), DO(copy_names) },
+ { "debug", MOD_PAT, MOD_CTL, CTL_DEBUG, PO(control) },
+ { "dfa", MOD_DAT, MOD_CTL, CTL_DFA, DO(control) },
+ { "dfa_restart", MOD_DAT, MOD_OPT, PCRE2_DFA_RESTART, DO(options) },
+ { "dfa_shortest", MOD_DAT, MOD_OPT, PCRE2_DFA_SHORTEST, DO(options) },
+ { "dollar_endonly", MOD_PAT, MOD_OPT, PCRE2_DOLLAR_ENDONLY, PO(options) },
+ { "dotall", MOD_PATP, MOD_OPT, PCRE2_DOTALL, PO(options) },
+ { "dupnames", MOD_PATP, MOD_OPT, PCRE2_DUPNAMES, PO(options) },
+ { "expand", MOD_PAT, MOD_CTL, CTL_EXPAND, PO(control) },
+ { "extended", MOD_PATP, MOD_OPT, PCRE2_EXTENDED, PO(options) },
+ { "find_limits", MOD_DAT, MOD_CTL, CTL_FINDLIMITS, DO(control) },
+ { "firstline", MOD_PAT, MOD_OPT, PCRE2_FIRSTLINE, PO(options) },
+ { "fullbincode", MOD_PAT, MOD_CTL, CTL_FULLBINCODE, PO(control) },
+ { "get", MOD_DAT, MOD_NN, DO(get_numbers), DO(get_names) },
+ { "getall", MOD_DAT, MOD_CTL, CTL_GETALL, DO(control) },
+ { "global", MOD_PNDP, MOD_CTL, CTL_GLOBAL, PO(control) },
+ { "hex", MOD_PAT, MOD_CTL, CTL_HEXPAT, PO(control) },
+ { "info", MOD_PAT, MOD_CTL, CTL_INFO, PO(control) },
+ { "jit", MOD_PAT, MOD_IND, 7, PO(jit) },
+ { "jitfast", MOD_PAT, MOD_CTL, CTL_JITFAST, PO(control) },
+ { "jitstack", MOD_DAT, MOD_INT, 0, DO(jitstack) },
+ { "jitverify", MOD_PAT, MOD_CTL, CTL_JITVERIFY, PO(control) },
+ { "locale", MOD_PAT, MOD_STR, LOCALESIZE, PO(locale) },
+ { "mark", MOD_PNDP, MOD_CTL, CTL_MARK, PO(control) },
+ { "match_limit", MOD_CTM, MOD_INT, 0, MO(match_limit) },
+ { "match_unset_backref", MOD_PAT, MOD_OPT, PCRE2_MATCH_UNSET_BACKREF, PO(options) },
+ { "max_pattern_length", MOD_CTC, MOD_SIZ, 0, CO(max_pattern_length) },
+ { "memory", MOD_PD, MOD_CTL, CTL_MEMORY, PD(control) },
+ { "multiline", MOD_PATP, MOD_OPT, PCRE2_MULTILINE, PO(options) },
+ { "never_backslash_c", MOD_PAT, MOD_OPT, PCRE2_NEVER_BACKSLASH_C, PO(options) },
+ { "never_ucp", MOD_PAT, MOD_OPT, PCRE2_NEVER_UCP, PO(options) },
+ { "never_utf", MOD_PAT, MOD_OPT, PCRE2_NEVER_UTF, PO(options) },
+ { "newline", MOD_CTC, MOD_NL, 0, CO(newline_convention) },
+ { "no_auto_capture", MOD_PAT, MOD_OPT, PCRE2_NO_AUTO_CAPTURE, PO(options) },
+ { "no_auto_possess", MOD_PATP, MOD_OPT, PCRE2_NO_AUTO_POSSESS, PO(options) },
+ { "no_dotstar_anchor", MOD_PAT, MOD_OPT, PCRE2_NO_DOTSTAR_ANCHOR, PO(options) },
+ { "no_start_optimize", MOD_PATP, MOD_OPT, PCRE2_NO_START_OPTIMIZE, PO(options) },
+ { "no_utf_check", MOD_PD, MOD_OPT, PCRE2_NO_UTF_CHECK, PD(options) },
+ { "notbol", MOD_DAT, MOD_OPT, PCRE2_NOTBOL, DO(options) },
+ { "notempty", MOD_DAT, MOD_OPT, PCRE2_NOTEMPTY, DO(options) },
+ { "notempty_atstart", MOD_DAT, MOD_OPT, PCRE2_NOTEMPTY_ATSTART, DO(options) },
+ { "noteol", MOD_DAT, MOD_OPT, PCRE2_NOTEOL, DO(options) },
+ { "null_context", MOD_PD, MOD_CTL, CTL_NULLCONTEXT, PO(control) },
+ { "offset", MOD_DAT, MOD_INT, 0, DO(offset) },
+ { "offset_limit", MOD_CTM, MOD_SIZ, 0, MO(offset_limit)},
+ { "ovector", MOD_DAT, MOD_INT, 0, DO(oveccount) },
+ { "parens_nest_limit", MOD_CTC, MOD_INT, 0, CO(parens_nest_limit) },
+ { "partial_hard", MOD_DAT, MOD_OPT, PCRE2_PARTIAL_HARD, DO(options) },
+ { "partial_soft", MOD_DAT, MOD_OPT, PCRE2_PARTIAL_SOFT, DO(options) },
+ { "ph", MOD_DAT, MOD_OPT, PCRE2_PARTIAL_HARD, DO(options) },
+ { "posix", MOD_PAT, MOD_CTL, CTL_POSIX, PO(control) },
+ { "ps", MOD_DAT, MOD_OPT, PCRE2_PARTIAL_SOFT, DO(options) },
+ { "push", MOD_PAT, MOD_CTL, CTL_PUSH, PO(control) },
+ { "recursion_limit", MOD_CTM, MOD_INT, 0, MO(recursion_limit) },
+ { "regerror_buffsize", MOD_PAT, MOD_INT, 0, PO(regerror_buffsize) },
+ { "replace", MOD_PND, MOD_STR, REPLACE_MODSIZE, PO(replacement) },
+ { "stackguard", MOD_PAT, MOD_INT, 0, PO(stackguard_test) },
+ { "startchar", MOD_PND, MOD_CTL, CTL_STARTCHAR, PO(control) },
+ { "startoffset", MOD_DAT, MOD_INT, 0, DO(offset) },
+ { "substitute_extended", MOD_PND, MOD_CTL, CTL2_SUBSTITUTE_EXTENDED, PO(control2) },
+ { "substitute_overflow_length", MOD_PND, MOD_CTL, CTL2_SUBSTITUTE_OVERFLOW_LENGTH, PO(control2) },
+ { "substitute_unknown_unset", MOD_PND, MOD_CTL, CTL2_SUBSTITUTE_UNKNOWN_UNSET, PO(control2) },
+ { "substitute_unset_empty", MOD_PND, MOD_CTL, CTL2_SUBSTITUTE_UNSET_EMPTY, PO(control2) },
+ { "tables", MOD_PAT, MOD_INT, 0, PO(tables_id) },
+ { "ucp", MOD_PATP, MOD_OPT, PCRE2_UCP, PO(options) },
+ { "ungreedy", MOD_PAT, MOD_OPT, PCRE2_UNGREEDY, PO(options) },
+ { "use_offset_limit", MOD_PAT, MOD_OPT, PCRE2_USE_OFFSET_LIMIT, PO(options) },
+ { "utf", MOD_PATP, MOD_OPT, PCRE2_UTF, PO(options) },
+ { "zero_terminate", MOD_DAT, MOD_CTL, CTL_ZERO_TERMINATE, DO(control) }
};
#define MODLISTCOUNT sizeof(modlist)/sizeof(modstruct)
@@ -568,16 +629,15 @@ static modstruct modlist[] = {
PCRE2_UCP|PCRE2_UTF|PCRE2_UNGREEDY)
#define POSIX_SUPPORTED_COMPILE_CONTROLS ( \
- CTL_AFTERTEXT|CTL_ALLAFTERTEXT|CTL_POSIX)
+ CTL_AFTERTEXT|CTL_ALLAFTERTEXT|CTL_EXPAND|CTL_POSIX)
+
+#define POSIX_SUPPORTED_COMPILE_CONTROLS2 (0)
#define POSIX_SUPPORTED_MATCH_OPTIONS ( \
PCRE2_NOTBOL|PCRE2_NOTEMPTY|PCRE2_NOTEOL)
-#define POSIX_SUPPORTED_MATCH_CONTROLS (CTL_AFTERTEXT|CTL_ALLAFTERTEXT)
-
-/* Controls that are mutually exclusive. */
-
-#define EXCLUSIVE_DAT_CONTROLS (CTL_ALLUSEDTEXT|CTL_STARTCHAR)
+#define POSIX_SUPPORTED_MATCH_CONTROLS (CTL_AFTERTEXT|CTL_ALLAFTERTEXT)
+#define POSIX_SUPPORTED_MATCH_CONTROLS2 (0)
/* Control bits that are not ignored with 'push'. */
@@ -585,14 +645,31 @@ static modstruct modlist[] = {
CTL_BINCODE|CTL_CALLOUT_INFO|CTL_FULLBINCODE|CTL_HEXPAT|CTL_INFO| \
CTL_JITVERIFY|CTL_MEMORY|CTL_PUSH|CTL_BSR_SET|CTL_NL_SET)
+#define PUSH_SUPPORTED_COMPILE_CONTROLS2 (0)
+
/* Controls that apply only at compile time with 'push'. */
-#define PUSH_COMPILE_ONLY_CONTROLS CTL_JITVERIFY
+#define PUSH_COMPILE_ONLY_CONTROLS CTL_JITVERIFY
+#define PUSH_COMPILE_ONLY_CONTROLS2 (0)
/* Controls that are forbidden with #pop. */
#define NOTPOP_CONTROLS (CTL_HEXPAT|CTL_POSIX|CTL_PUSH)
+/* Pattern controls that are mutually exclusive. At present these are all in
+the first control word. */
+
+static uint32_t exclusive_pat_controls[] = {
+ CTL_POSIX | CTL_HEXPAT,
+ CTL_POSIX | CTL_PUSH,
+ CTL_EXPAND | CTL_HEXPAT };
+
+/* Data controls that are mutually exclusive. At present these are all in the
+first control word. */
+static uint32_t exclusive_dat_controls[] = {
+ CTL_ALLUSEDTEXT | CTL_STARTCHAR,
+ CTL_FINDLIMITS | CTL_NULLCONTEXT };
+
/* Table of single-character abbreviated modifiers. The index field is
initialized to -1, but the first time the modifier is encountered, it is filled
in with the index of the full entry in modlist, to save repeated searching when
@@ -648,6 +725,12 @@ table itself easier to read. */
#define EBCDIC_NL 0
#endif
+#ifdef NEVER_BACKSLASH_C
+#define BACKSLASH_C 0
+#else
+#define BACKSLASH_C 1
+#endif
+
typedef struct coptstruct {
const char *name;
uint32_t type;
@@ -662,16 +745,17 @@ enum { CONF_BSR,
};
static coptstruct coptlist[] = {
- { "bsr", CONF_BSR, PCRE2_CONFIG_BSR },
- { "ebcdic", CONF_FIX, SUPPORT_EBCDIC },
- { "ebcdic-nl", CONF_FIZ, EBCDIC_NL },
- { "jit", CONF_INT, PCRE2_CONFIG_JIT },
- { "linksize", CONF_INT, PCRE2_CONFIG_LINKSIZE },
- { "newline", CONF_NL, PCRE2_CONFIG_NEWLINE },
- { "pcre2-16", CONF_FIX, SUPPORT_16 },
- { "pcre2-32", CONF_FIX, SUPPORT_32 },
- { "pcre2-8", CONF_FIX, SUPPORT_8 },
- { "unicode", CONF_INT, PCRE2_CONFIG_UNICODE }
+ { "backslash-C", CONF_FIX, BACKSLASH_C },
+ { "bsr", CONF_BSR, PCRE2_CONFIG_BSR },
+ { "ebcdic", CONF_FIX, SUPPORT_EBCDIC },
+ { "ebcdic-nl", CONF_FIZ, EBCDIC_NL },
+ { "jit", CONF_INT, PCRE2_CONFIG_JIT },
+ { "linksize", CONF_INT, PCRE2_CONFIG_LINKSIZE },
+ { "newline", CONF_NL, PCRE2_CONFIG_NEWLINE },
+ { "pcre2-16", CONF_FIX, SUPPORT_16 },
+ { "pcre2-32", CONF_FIX, SUPPORT_32 },
+ { "pcre2-8", CONF_FIX, SUPPORT_8 },
+ { "unicode", CONF_INT, PCRE2_CONFIG_UNICODE }
};
#define COPTLISTCOUNT sizeof(coptlist)/sizeof(coptstruct)
@@ -697,6 +781,7 @@ static BOOL restrict_for_perl_test = FALSE;
static BOOL show_memory = FALSE;
static int code_unit_size; /* Bytes */
+static int jitrc; /* Return from JIT compile */
static int test_mode = DEFAULT_TEST_MODE;
static int timeit = 0;
static int timeitm = 0;
@@ -711,6 +796,8 @@ static uint32_t maxlookbehind;
static uint32_t max_oveccount;
static uint32_t callout_count;
+static uint16_t local_newline_default = 0;
+
static VERSION_TYPE jittarget[VERSION_SIZE];
static VERSION_TYPE version[VERSION_SIZE];
static VERSION_TYPE uversion[VERSION_SIZE];
@@ -737,7 +824,7 @@ buffer is where all input lines are read. Its size is the same as pbuffer8.
Pattern lines are always copied to pbuffer8 for use in callouts, even if they
are actually compiled from pbuffer16 or pbuffer32. */
-static int pbuffer8_size = 50000; /* Initial size, bytes */
+static size_t pbuffer8_size = 50000; /* Initial size, bytes */
static uint8_t *pbuffer8 = NULL;
static uint8_t *buffer = NULL;
@@ -858,19 +945,19 @@ are supported. */
#define PCRE2_COMPILE(a,b,c,d,e,f,g) \
if (test_mode == PCRE8_MODE) \
- G(a,8) = pcre2_compile_8(G(b,8),c,d,e,f,G(g,8)); \
+ G(a,8) = pcre2_compile_8(G(b,8),c,d,e,f,g); \
else if (test_mode == PCRE16_MODE) \
- G(a,16) = pcre2_compile_16(G(b,16),c,d,e,f,G(g,16)); \
+ G(a,16) = pcre2_compile_16(G(b,16),c,d,e,f,g); \
else \
- G(a,32) = pcre2_compile_32(G(b,32),c,d,e,f,G(g,32))
+ G(a,32) = pcre2_compile_32(G(b,32),c,d,e,f,g)
#define PCRE2_DFA_MATCH(a,b,c,d,e,f,g,h,i,j) \
if (test_mode == PCRE8_MODE) \
- a = pcre2_dfa_match_8(G(b,8),(PCRE2_SPTR8)c,d,e,f,G(g,8),G(h,8),i,j); \
+ a = pcre2_dfa_match_8(G(b,8),(PCRE2_SPTR8)c,d,e,f,G(g,8),h,i,j); \
else if (test_mode == PCRE16_MODE) \
- a = pcre2_dfa_match_16(G(b,16),(PCRE2_SPTR16)c,d,e,f,G(g,16),G(h,16),i,j); \
+ a = pcre2_dfa_match_16(G(b,16),(PCRE2_SPTR16)c,d,e,f,G(g,16),h,i,j); \
else \
- a = pcre2_dfa_match_32(G(b,32),(PCRE2_SPTR32)c,d,e,f,G(g,32),G(h,32),i,j)
+ a = pcre2_dfa_match_32(G(b,32),(PCRE2_SPTR32)c,d,e,f,G(g,32),h,i,j)
#define PCRE2_GET_ERROR_MESSAGE(r,a,b) \
if (test_mode == PCRE8_MODE) \
@@ -896,10 +983,10 @@ are supported. */
else \
a = pcre2_get_startchar_32(G(b,32))
-#define PCRE2_JIT_COMPILE(a,b) \
- if (test_mode == PCRE8_MODE) pcre2_jit_compile_8(G(a,8),b); \
- else if (test_mode == PCRE16_MODE) pcre2_jit_compile_16(G(a,16),b); \
- else pcre2_jit_compile_32(G(a,32),b)
+#define PCRE2_JIT_COMPILE(r,a,b) \
+ if (test_mode == PCRE8_MODE) r = pcre2_jit_compile_8(G(a,8),b); \
+ else if (test_mode == PCRE16_MODE) r = pcre2_jit_compile_16(G(a,16),b); \
+ else r = pcre2_jit_compile_32(G(a,32),b)
#define PCRE2_JIT_FREE_UNUSED_MEMORY(a) \
if (test_mode == PCRE8_MODE) pcre2_jit_free_unused_memory_8(G(a,8)); \
@@ -908,11 +995,11 @@ are supported. */
#define PCRE2_JIT_MATCH(a,b,c,d,e,f,g,h) \
if (test_mode == PCRE8_MODE) \
- a = pcre2_jit_match_8(G(b,8),(PCRE2_SPTR8)c,d,e,f,G(g,8),G(h,8)); \
+ a = pcre2_jit_match_8(G(b,8),(PCRE2_SPTR8)c,d,e,f,G(g,8),h); \
else if (test_mode == PCRE16_MODE) \
- a = pcre2_jit_match_16(G(b,16),(PCRE2_SPTR16)c,d,e,f,G(g,16),G(h,16)); \
+ a = pcre2_jit_match_16(G(b,16),(PCRE2_SPTR16)c,d,e,f,G(g,16),h); \
else \
- a = pcre2_jit_match_32(G(b,32),(PCRE2_SPTR32)c,d,e,f,G(g,32),G(h,32))
+ a = pcre2_jit_match_32(G(b,32),(PCRE2_SPTR32)c,d,e,f,G(g,32),h)
#define PCRE2_JIT_STACK_CREATE(a,b,c,d) \
if (test_mode == PCRE8_MODE) \
@@ -945,11 +1032,11 @@ are supported. */
#define PCRE2_MATCH(a,b,c,d,e,f,g,h) \
if (test_mode == PCRE8_MODE) \
- a = pcre2_match_8(G(b,8),(PCRE2_SPTR8)c,d,e,f,G(g,8),G(h,8)); \
+ a = pcre2_match_8(G(b,8),(PCRE2_SPTR8)c,d,e,f,G(g,8),h); \
else if (test_mode == PCRE16_MODE) \
- a = pcre2_match_16(G(b,16),(PCRE2_SPTR16)c,d,e,f,G(g,16),G(h,16)); \
+ a = pcre2_match_16(G(b,16),(PCRE2_SPTR16)c,d,e,f,G(g,16),h); \
else \
- a = pcre2_match_32(G(b,32),(PCRE2_SPTR32)c,d,e,f,G(g,32),G(h,32))
+ a = pcre2_match_32(G(b,32),(PCRE2_SPTR32)c,d,e,f,G(g,32),h)
#define PCRE2_MATCH_DATA_CREATE(a,b,c) \
if (test_mode == PCRE8_MODE) \
@@ -1055,6 +1142,22 @@ are supported. */
else \
pcre2_set_match_limit_32(G(a,32),b)
+#define PCRE2_SET_MAX_PATTERN_LENGTH(a,b) \
+ if (test_mode == PCRE8_MODE) \
+ pcre2_set_max_pattern_length_8(G(a,8),b); \
+ else if (test_mode == PCRE16_MODE) \
+ pcre2_set_max_pattern_length_16(G(a,16),b); \
+ else \
+ pcre2_set_max_pattern_length_32(G(a,32),b)
+
+#define PCRE2_SET_OFFSET_LIMIT(a,b) \
+ if (test_mode == PCRE8_MODE) \
+ pcre2_set_offset_limit_8(G(a,8),b); \
+ else if (test_mode == PCRE16_MODE) \
+ pcre2_set_offset_limit_16(G(a,16),b); \
+ else \
+ pcre2_set_offset_limit_32(G(a,32),b)
+
#define PCRE2_SET_PARENS_NEST_LIMIT(a,b) \
if (test_mode == PCRE8_MODE) \
pcre2_set_parens_nest_limit_8(G(a,8),b); \
@@ -1293,17 +1396,17 @@ the three different cases. */
#define PCRE2_COMPILE(a,b,c,d,e,f,g) \
if (test_mode == G(G(PCRE,BITONE),_MODE)) \
- G(a,BITONE) = G(pcre2_compile_,BITONE)(G(b,BITONE),c,d,e,f,G(g,BITONE)); \
+ G(a,BITONE) = G(pcre2_compile_,BITONE)(G(b,BITONE),c,d,e,f,g); \
else \
- G(a,BITTWO) = G(pcre2_compile_,BITTWO)(G(b,BITTWO),c,d,e,f,G(g,BITTWO))
+ G(a,BITTWO) = G(pcre2_compile_,BITTWO)(G(b,BITTWO),c,d,e,f,g)
#define PCRE2_DFA_MATCH(a,b,c,d,e,f,g,h,i,j) \
if (test_mode == G(G(PCRE,BITONE),_MODE)) \
a = G(pcre2_dfa_match_,BITONE)(G(b,BITONE),(G(PCRE2_SPTR,BITONE))c,d,e,f, \
- G(g,BITONE),G(h,BITONE),i,j); \
+ G(g,BITONE),h,i,j); \
else \
a = G(pcre2_dfa_match_,BITTWO)(G(b,BITTWO),(G(PCRE2_SPTR,BITTWO))c,d,e,f, \
- G(g,BITTWO),G(h,BITTWO),i,j)
+ G(g,BITTWO),h,i,j)
#define PCRE2_GET_ERROR_MESSAGE(r,a,b) \
if (test_mode == G(G(PCRE,BITONE),_MODE)) \
@@ -1323,11 +1426,11 @@ the three different cases. */
else \
a = G(pcre2_get_startchar_,BITTWO)(G(b,BITTWO))
-#define PCRE2_JIT_COMPILE(a,b) \
+#define PCRE2_JIT_COMPILE(r,a,b) \
if (test_mode == G(G(PCRE,BITONE),_MODE)) \
- G(pcre2_jit_compile_,BITONE)(G(a,BITONE),b); \
+ r = G(pcre2_jit_compile_,BITONE)(G(a,BITONE),b); \
else \
- G(pcre2_jit_compile_,BITTWO)(G(a,BITTWO),b)
+ r = G(pcre2_jit_compile_,BITTWO)(G(a,BITTWO),b)
#define PCRE2_JIT_FREE_UNUSED_MEMORY(a) \
if (test_mode == G(G(PCRE,BITONE),_MODE)) \
@@ -1338,10 +1441,10 @@ the three different cases. */
#define PCRE2_JIT_MATCH(a,b,c,d,e,f,g,h) \
if (test_mode == G(G(PCRE,BITONE),_MODE)) \
a = G(pcre2_jit_match_,BITONE)(G(b,BITONE),(G(PCRE2_SPTR,BITONE))c,d,e,f, \
- G(g,BITONE),G(h,BITONE)); \
+ G(g,BITONE),h); \
else \
a = G(pcre2_jit_match_,BITTWO)(G(b,BITTWO),(G(PCRE2_SPTR,BITTWO))c,d,e,f, \
- G(g,BITTWO),G(h,BITTWO))
+ G(g,BITTWO),h)
#define PCRE2_JIT_STACK_CREATE(a,b,c,d) \
if (test_mode == G(G(PCRE,BITONE),_MODE)) \
@@ -1370,10 +1473,10 @@ the three different cases. */
#define PCRE2_MATCH(a,b,c,d,e,f,g,h) \
if (test_mode == G(G(PCRE,BITONE),_MODE)) \
a = G(pcre2_match_,BITONE)(G(b,BITONE),(G(PCRE2_SPTR,BITONE))c,d,e,f, \
- G(g,BITONE),G(h,BITONE)); \
+ G(g,BITONE),h); \
else \
a = G(pcre2_match_,BITTWO)(G(b,BITTWO),(G(PCRE2_SPTR,BITTWO))c,d,e,f, \
- G(g,BITTWO),G(h,BITTWO))
+ G(g,BITTWO),h)
#define PCRE2_MATCH_DATA_CREATE(a,b,c) \
if (test_mode == G(G(PCRE,BITONE),_MODE)) \
@@ -1455,6 +1558,18 @@ the three different cases. */
else \
G(pcre2_set_match_limit_,BITTWO)(G(a,BITTWO),b)
+#define PCRE2_SET_MAX_PATTERN_LENGTH(a,b) \
+ if (test_mode == G(G(PCRE,BITONE),_MODE)) \
+ G(pcre2_set_max_pattern_length_,BITONE)(G(a,BITONE),b); \
+ else \
+ G(pcre2_set_max_pattern_length_,BITTWO)(G(a,BITTWO),b)
+
+#define PCRE2_SET_OFFSET_LIMIT(a,b) \
+ if (test_mode == G(G(PCRE,BITONE),_MODE)) \
+ G(pcre2_set_offset_limit_,BITONE)(G(a,BITONE),b); \
+ else \
+ G(pcre2_set_offset_limit_,BITTWO)(G(a,BITTWO),b)
+
#define PCRE2_SET_PARENS_NEST_LIMIT(a,b) \
if (test_mode == G(G(PCRE,BITONE),_MODE)) \
G(pcre2_set_parens_nest_limit_,BITONE)(G(a,BITONE),b); \
@@ -1615,17 +1730,17 @@ the three different cases. */
a = pcre2_callout_enumerate_8(compiled_code8, \
(int (*)(struct pcre2_callout_enumerate_block_8 *, void *))b,c)
#define PCRE2_COMPILE(a,b,c,d,e,f,g) \
- G(a,8) = pcre2_compile_8(G(b,8),c,d,e,f,G(g,8))
+ G(a,8) = pcre2_compile_8(G(b,8),c,d,e,f,g)
#define PCRE2_DFA_MATCH(a,b,c,d,e,f,g,h,i,j) \
- a = pcre2_dfa_match_8(G(b,8),(PCRE2_SPTR8)c,d,e,f,G(g,8),G(h,8),i,j)
+ a = pcre2_dfa_match_8(G(b,8),(PCRE2_SPTR8)c,d,e,f,G(g,8),h,i,j)
#define PCRE2_GET_ERROR_MESSAGE(r,a,b) \
r = pcre2_get_error_message_8(a,G(b,8),G(G(b,8),_size))
#define PCRE2_GET_OVECTOR_COUNT(a,b) a = pcre2_get_ovector_count_8(G(b,8))
#define PCRE2_GET_STARTCHAR(a,b) a = pcre2_get_startchar_8(G(b,8))
-#define PCRE2_JIT_COMPILE(a,b) pcre2_jit_compile_8(G(a,8),b)
+#define PCRE2_JIT_COMPILE(r,a,b) r = pcre2_jit_compile_8(G(a,8),b)
#define PCRE2_JIT_FREE_UNUSED_MEMORY(a) pcre2_jit_free_unused_memory_8(G(a,8))
#define PCRE2_JIT_MATCH(a,b,c,d,e,f,g,h) \
- a = pcre2_jit_match_8(G(b,8),(PCRE2_SPTR8)c,d,e,f,G(g,8),G(h,8))
+ a = pcre2_jit_match_8(G(b,8),(PCRE2_SPTR8)c,d,e,f,G(g,8),h)
#define PCRE2_JIT_STACK_CREATE(a,b,c,d) \
a = (PCRE2_JIT_STACK *)pcre2_jit_stack_create_8(b,c,d);
#define PCRE2_JIT_STACK_ASSIGN(a,b,c) \
@@ -1633,7 +1748,7 @@ the three different cases. */
#define PCRE2_JIT_STACK_FREE(a) pcre2_jit_stack_free_8((pcre2_jit_stack_8 *)a);
#define PCRE2_MAKETABLES(a) a = pcre2_maketables_8(NULL)
#define PCRE2_MATCH(a,b,c,d,e,f,g,h) \
- a = pcre2_match_8(G(b,8),(PCRE2_SPTR8)c,d,e,f,G(g,8),G(h,8))
+ a = pcre2_match_8(G(b,8),(PCRE2_SPTR8)c,d,e,f,G(g,8),h)
#define PCRE2_MATCH_DATA_CREATE(a,b,c) G(a,8) = pcre2_match_data_create_8(b,c)
#define PCRE2_MATCH_DATA_CREATE_FROM_PATTERN(a,b,c) \
G(a,8) = pcre2_match_data_create_from_pattern_8(G(b,8),c)
@@ -1653,6 +1768,8 @@ the three different cases. */
#define PCRE2_SET_COMPILE_RECURSION_GUARD(a,b,c) \
pcre2_set_compile_recursion_guard_8(G(a,8),b,c)
#define PCRE2_SET_MATCH_LIMIT(a,b) pcre2_set_match_limit_8(G(a,8),b)
+#define PCRE2_SET_MAX_PATTERN_LENGTH(a,b) pcre2_set_max_pattern_length_8(G(a,8),b)
+#define PCRE2_SET_OFFSET_LIMIT(a,b) pcre2_set_offset_limit_8(G(a,8),b)
#define PCRE2_SET_PARENS_NEST_LIMIT(a,b) pcre2_set_parens_nest_limit_8(G(a,8),b)
#define PCRE2_SET_RECURSION_LIMIT(a,b) pcre2_set_recursion_limit_8(G(a,8),b)
#define PCRE2_SUBSTITUTE(a,b,c,d,e,f,g,h,i,j,k,l) \
@@ -1706,17 +1823,17 @@ the three different cases. */
a = pcre2_callout_enumerate_16(compiled_code16, \
(int (*)(struct pcre2_callout_enumerate_block_16 *, void *))b,c)
#define PCRE2_COMPILE(a,b,c,d,e,f,g) \
- G(a,16) = pcre2_compile_16(G(b,16),c,d,e,f,G(g,16))
+ G(a,16) = pcre2_compile_16(G(b,16),c,d,e,f,g)
#define PCRE2_DFA_MATCH(a,b,c,d,e,f,g,h,i,j) \
- a = pcre2_dfa_match_16(G(b,16),(PCRE2_SPTR16)c,d,e,f,G(g,16),G(h,16),i,j)
+ a = pcre2_dfa_match_16(G(b,16),(PCRE2_SPTR16)c,d,e,f,G(g,16),h,i,j)
#define PCRE2_GET_ERROR_MESSAGE(r,a,b) \
r = pcre2_get_error_message_16(a,G(b,16),G(G(b,16),_size))
#define PCRE2_GET_OVECTOR_COUNT(a,b) a = pcre2_get_ovector_count_16(G(b,16))
#define PCRE2_GET_STARTCHAR(a,b) a = pcre2_get_startchar_16(G(b,16))
-#define PCRE2_JIT_COMPILE(a,b) pcre2_jit_compile_16(G(a,16),b)
+#define PCRE2_JIT_COMPILE(r,a,b) r = pcre2_jit_compile_16(G(a,16),b)
#define PCRE2_JIT_FREE_UNUSED_MEMORY(a) pcre2_jit_free_unused_memory_16(G(a,16))
#define PCRE2_JIT_MATCH(a,b,c,d,e,f,g,h) \
- a = pcre2_jit_match_16(G(b,16),(PCRE2_SPTR16)c,d,e,f,G(g,16),G(h,16))
+ a = pcre2_jit_match_16(G(b,16),(PCRE2_SPTR16)c,d,e,f,G(g,16),h)
#define PCRE2_JIT_STACK_CREATE(a,b,c,d) \
a = (PCRE2_JIT_STACK *)pcre2_jit_stack_create_16(b,c,d);
#define PCRE2_JIT_STACK_ASSIGN(a,b,c) \
@@ -1724,7 +1841,7 @@ the three different cases. */
#define PCRE2_JIT_STACK_FREE(a) pcre2_jit_stack_free_16((pcre2_jit_stack_16 *)a);
#define PCRE2_MAKETABLES(a) a = pcre2_maketables_16(NULL)
#define PCRE2_MATCH(a,b,c,d,e,f,g,h) \
- a = pcre2_match_16(G(b,16),(PCRE2_SPTR16)c,d,e,f,G(g,16),G(h,16))
+ a = pcre2_match_16(G(b,16),(PCRE2_SPTR16)c,d,e,f,G(g,16),h)
#define PCRE2_MATCH_DATA_CREATE(a,b,c) G(a,16) = pcre2_match_data_create_16(b,c)
#define PCRE2_MATCH_DATA_CREATE_FROM_PATTERN(a,b,c) \
G(a,16) = pcre2_match_data_create_from_pattern_16(G(b,16),c)
@@ -1744,6 +1861,8 @@ the three different cases. */
#define PCRE2_SET_COMPILE_RECURSION_GUARD(a,b,c) \
pcre2_set_compile_recursion_guard_16(G(a,16),b,c)
#define PCRE2_SET_MATCH_LIMIT(a,b) pcre2_set_match_limit_16(G(a,16),b)
+#define PCRE2_SET_MAX_PATTERN_LENGTH(a,b) pcre2_set_max_pattern_length_16(G(a,16),b)
+#define PCRE2_SET_OFFSET_LIMIT(a,b) pcre2_set_offset_limit_16(G(a,16),b)
#define PCRE2_SET_PARENS_NEST_LIMIT(a,b) pcre2_set_parens_nest_limit_16(G(a,16),b)
#define PCRE2_SET_RECURSION_LIMIT(a,b) pcre2_set_recursion_limit_16(G(a,16),b)
#define PCRE2_SUBSTITUTE(a,b,c,d,e,f,g,h,i,j,k,l) \
@@ -1797,17 +1916,17 @@ the three different cases. */
a = pcre2_callout_enumerate_32(compiled_code32, \
(int (*)(struct pcre2_callout_enumerate_block_32 *, void *))b,c)
#define PCRE2_COMPILE(a,b,c,d,e,f,g) \
- G(a,32) = pcre2_compile_32(G(b,32),c,d,e,f,G(g,32))
+ G(a,32) = pcre2_compile_32(G(b,32),c,d,e,f,g)
#define PCRE2_DFA_MATCH(a,b,c,d,e,f,g,h,i,j) \
- a = pcre2_dfa_match_32(G(b,32),(PCRE2_SPTR32)c,d,e,f,G(g,32),G(h,32),i,j)
+ a = pcre2_dfa_match_32(G(b,32),(PCRE2_SPTR32)c,d,e,f,G(g,32),h,i,j)
#define PCRE2_GET_ERROR_MESSAGE(r,a,b) \
r = pcre2_get_error_message_32(a,G(b,32),G(G(b,32),_size))
#define PCRE2_GET_OVECTOR_COUNT(a,b) a = pcre2_get_ovector_count_32(G(b,32))
#define PCRE2_GET_STARTCHAR(a,b) a = pcre2_get_startchar_32(G(b,32))
-#define PCRE2_JIT_COMPILE(a,b) pcre2_jit_compile_32(G(a,32),b)
+#define PCRE2_JIT_COMPILE(r,a,b) r = pcre2_jit_compile_32(G(a,32),b)
#define PCRE2_JIT_FREE_UNUSED_MEMORY(a) pcre2_jit_free_unused_memory_32(G(a,32))
#define PCRE2_JIT_MATCH(a,b,c,d,e,f,g,h) \
- a = pcre2_jit_match_32(G(b,32),(PCRE2_SPTR32)c,d,e,f,G(g,32),G(h,32))
+ a = pcre2_jit_match_32(G(b,32),(PCRE2_SPTR32)c,d,e,f,G(g,32),h)
#define PCRE2_JIT_STACK_CREATE(a,b,c,d) \
a = (PCRE2_JIT_STACK *)pcre2_jit_stack_create_32(b,c,d);
#define PCRE2_JIT_STACK_ASSIGN(a,b,c) \
@@ -1815,7 +1934,7 @@ the three different cases. */
#define PCRE2_JIT_STACK_FREE(a) pcre2_jit_stack_free_32((pcre2_jit_stack_32 *)a);
#define PCRE2_MAKETABLES(a) a = pcre2_maketables_32(NULL)
#define PCRE2_MATCH(a,b,c,d,e,f,g,h) \
- a = pcre2_match_32(G(b,32),(PCRE2_SPTR32)c,d,e,f,G(g,32),G(h,32))
+ a = pcre2_match_32(G(b,32),(PCRE2_SPTR32)c,d,e,f,G(g,32),h)
#define PCRE2_MATCH_DATA_CREATE(a,b,c) G(a,32) = pcre2_match_data_create_32(b,c)
#define PCRE2_MATCH_DATA_CREATE_FROM_PATTERN(a,b,c) \
G(a,32) = pcre2_match_data_create_from_pattern_32(G(b,32),c)
@@ -1835,6 +1954,8 @@ the three different cases. */
#define PCRE2_SET_COMPILE_RECURSION_GUARD(a,b,c) \
pcre2_set_compile_recursion_guard_32(G(a,32),b,c)
#define PCRE2_SET_MATCH_LIMIT(a,b) pcre2_set_match_limit_32(G(a,32),b)
+#define PCRE2_SET_MAX_PATTERN_LENGTH(a,b) pcre2_set_max_pattern_length_32(G(a,32),b)
+#define PCRE2_SET_OFFSET_LIMIT(a,b) pcre2_set_offset_limit_32(G(a,32),b)
#define PCRE2_SET_PARENS_NEST_LIMIT(a,b) pcre2_set_parens_nest_limit_32(G(a,32),b)
#define PCRE2_SET_RECURSION_LIMIT(a,b) pcre2_set_recursion_limit_32(G(a,32),b)
#define PCRE2_SUBSTITUTE(a,b,c,d,e,f,g,h,i,j,k,l) \
@@ -2424,13 +2545,14 @@ return (int)(pp - p);
*************************************************/
/* Must handle UTF-8 strings in utf8 mode. Yields number of characters printed.
-If handed a NULL file, just counts chars without printing. */
+For printing *MARK strings, a negative length is given. If handed a NULL file,
+just counts chars without printing. */
static int pchars8(PCRE2_SPTR8 p, int length, BOOL utf, FILE *f)
{
uint32_t c = 0;
int yield = 0;
-if (length < 0) length = strlen((char *)p);
+if (length < 0) length = p[-1];
while (length-- > 0)
{
if (utf)
@@ -2458,12 +2580,13 @@ return yield;
*************************************************/
/* Must handle UTF-16 strings in utf mode. Yields number of characters printed.
-If handed a NULL file, just counts chars without printing. */
+For printing *MARK strings, a negative length is given. If handed a NULL file,
+just counts chars without printing. */
static int pchars16(PCRE2_SPTR16 p, int length, BOOL utf, FILE *f)
{
int yield = 0;
-if (length < 0) length = strlen16(p);
+if (length < 0) length = p[-1];
while (length-- > 0)
{
uint32_t c = *p++ & 0xffff;
@@ -2491,13 +2614,14 @@ return yield;
*************************************************/
/* Must handle UTF-32 strings in utf mode. Yields number of characters printed.
-If handed a NULL file, just counts chars without printing. */
+For printing *MARK strings, a negative length is given.If handed a NULL file,
+just counts chars without printing. */
static int pchars32(PCRE2_SPTR32 p, int length, BOOL utf, FILE *f)
{
int yield = 0;
(void)(utf); /* Avoid compiler warning */
-if (length < 0) length = strlen32(p);
+if (length < 0) length = p[-1];
while (length-- > 0)
{
uint32_t c = *p++;
@@ -2598,7 +2722,7 @@ if (pbuffer16_size < 2*len + 2)
pp = pbuffer16;
if (!utf)
{
- while (len-- > 0) *pp++ = *p++;
+ for (; len > 0; len--) *pp++ = *p++;
}
else while (len > 0)
{
@@ -2675,7 +2799,7 @@ if (pbuffer32_size < 4*len + 4)
pp = pbuffer32;
if (!utf)
{
- while (len-- > 0) *pp++ = *p++;
+ for (; len > 0; len--) *pp++ = *p++;
}
else while (len > 0)
{
@@ -2715,9 +2839,8 @@ Returns: a possibly changed offset
static PCRE2_SIZE
backchars(uint8_t *subject, PCRE2_SIZE offset, uint32_t count, BOOL utf)
{
-long int yield;
-
-if (!utf || test_mode == PCRE32_MODE) yield = offset - count;
+if (!utf || test_mode == PCRE32_MODE)
+ return (count >= offset)? 0 : (offset - count);
else if (test_mode == PCRE8_MODE)
{
@@ -2727,7 +2850,7 @@ else if (test_mode == PCRE8_MODE)
pp--;
while ((*pp & 0xc0) == 0x80) pp--;
}
- yield = pp - (PCRE2_SPTR8)subject;
+ return pp - (PCRE2_SPTR8)subject;
}
else /* 16-bit mode */
@@ -2738,13 +2861,51 @@ else /* 16-bit mode */
pp--;
if ((*pp & 0xfc00) == 0xdc00) pp--;
}
- yield = pp - (PCRE2_SPTR16)subject;
+ return pp - (PCRE2_SPTR16)subject;
+ }
+}
+
+
+
+/*************************************************
+* Expand input buffers *
+*************************************************/
+
+/* This function doubles the size of the input buffer and the buffer for
+keeping an 8-bit copy of patterns (pbuffer8), and copies the current buffers to
+the new ones.
+
+Arguments: none
+Returns: nothing (aborts if malloc() fails)
+*/
+
+static void
+expand_input_buffers(void)
+{
+int new_pbuffer8_size = 2*pbuffer8_size;
+uint8_t *new_buffer = (uint8_t *)malloc(new_pbuffer8_size);
+uint8_t *new_pbuffer8 = (uint8_t *)malloc(new_pbuffer8_size);
+
+if (new_buffer == NULL || new_pbuffer8 == NULL)
+ {
+ fprintf(stderr, "pcre2test: malloc(%d) failed\n", new_pbuffer8_size);
+ exit(1);
}
-return (yield >= 0)? yield : 0;
+memcpy(new_buffer, buffer, pbuffer8_size);
+memcpy(new_pbuffer8, pbuffer8, pbuffer8_size);
+
+pbuffer8_size = new_pbuffer8_size;
+
+free(buffer);
+free(pbuffer8);
+
+buffer = new_buffer;
+pbuffer8 = new_pbuffer8;
}
+
/*************************************************
* Read or extend an input line *
*************************************************/
@@ -2817,29 +2978,11 @@ for (;;)
else
{
- int new_pbuffer8_size = 2*pbuffer8_size;
- uint8_t *new_buffer = (uint8_t *)malloc(new_pbuffer8_size);
- uint8_t *new_pbuffer8 = (uint8_t *)malloc(new_pbuffer8_size);
-
- if (new_buffer == NULL || new_pbuffer8 == NULL)
- {
- fprintf(stderr, "pcre2test: malloc(%d) failed\n", new_pbuffer8_size);
- exit(1);
- }
-
- memcpy(new_buffer, buffer, pbuffer8_size);
- memcpy(new_pbuffer8, pbuffer8, pbuffer8_size);
-
- pbuffer8_size = new_pbuffer8_size;
-
- start = new_buffer + (start - buffer);
- here = new_buffer + (here - buffer);
-
- free(buffer);
- free(pbuffer8);
-
- buffer = new_buffer;
- pbuffer8 = new_pbuffer8;
+ size_t start_offset = start - buffer;
+ size_t here_offset = here - buffer;
+ expand_input_buffers();
+ start = buffer + start_offset;
+ here = buffer + here_offset;
}
}
@@ -2875,33 +3018,6 @@ return 0;
/*************************************************
-* Read number from string *
-*************************************************/
-
-/* We don't use strtoul() because SunOS4 doesn't have it. Rather than mess
-around with conditional compilation, just do the job by hand. It is only used
-for unpicking arguments, so just keep it simple.
-
-Arguments:
- str string to be converted
- endptr where to put the end pointer
-
-Returns: the unsigned long
-*/
-
-static int
-get_value(const char *str, const char **endptr)
-{
-int result = 0;
-while(*str != 0 && isspace(*str)) str++;
-while (isdigit(*str)) result = result * 10 + (int)(*str++ - '0');
-*endptr = str;
-return(result);
-}
-
-
-
-/*************************************************
* Scan the main modifier list *
*************************************************/
@@ -2928,7 +3044,7 @@ while (top > bot)
if (c == 0)
{
if (len == mlen) return mid;
- c = len - mlen;
+ c = (int)len - (int)mlen;
}
if (c > 0) bot = mid + 1; else top = mid;
}
@@ -3050,6 +3166,8 @@ static BOOL
decode_modifiers(uint8_t *p, int ctx, patctl *pctl, datctl *dctl)
{
uint8_t *ep, *pp;
+long li;
+unsigned long uli;
BOOL first = TRUE;
for (;;)
@@ -3066,9 +3184,14 @@ for (;;)
while (isspace(*p) || *p == ',') p++;
if (*p == 0) break;
- /* Find the end of the item. */
+ /* Find the end of the item; lose trailing whitespace at end of line. */
- for (ep = p; *ep != 0 && *ep != ',' && !isspace(*ep); ep++);
+ for (ep = p; *ep != 0 && *ep != ','; ep++);
+ if (*ep == 0)
+ {
+ while (ep > p && isspace(ep[-1])) ep--;
+ *ep = 0;
+ }
/* Remember if the first character is '-'. */
@@ -3210,13 +3333,34 @@ for (;;)
case MOD_IN2: /* One or two unsigned integers */
if (!isdigit(*pp)) goto INVALID_VALUE;
- ((uint32_t *)field)[0] = (uint32_t)strtoul((const char *)pp, &endptr, 10);
+ uli = strtoul((const char *)pp, &endptr, 10);
+ if (U32OVERFLOW(uli)) goto INVALID_VALUE;
+ ((uint32_t *)field)[0] = (uint32_t)uli;
if (*endptr == ':')
- ((uint32_t *)field)[1] = (uint32_t)strtoul((const char *)endptr+1, &endptr, 10);
+ {
+ uli = strtoul((const char *)endptr+1, &endptr, 10);
+ if (U32OVERFLOW(uli)) goto INVALID_VALUE;
+ ((uint32_t *)field)[1] = (uint32_t)uli;
+ }
else ((uint32_t *)field)[1] = 0;
pp = (uint8_t *)endptr;
break;
+ /* PCRE2_SIZE_MAX is usually SIZE_MAX, which may be greater, equal to, or
+ less than ULONG_MAX. So first test for overflowing the long int, and then
+ test for overflowing PCRE2_SIZE_MAX if it is smaller than ULONG_MAX. */
+
+ case MOD_SIZ: /* PCRE2_SIZE value */
+ if (!isdigit(*pp)) goto INVALID_VALUE;
+ uli = strtoul((const char *)pp, &endptr, 10);
+ if (uli == ULONG_MAX) goto INVALID_VALUE;
+#if ULONG_MAX > PCRE2_SIZE_MAX
+ if (uli > PCRE2_SIZE_MAX) goto INVALID_VALUE;
+#endif
+ *((PCRE2_SIZE *)field) = (PCRE2_SIZE)uli;
+ pp = (uint8_t *)endptr;
+ break;
+
case MOD_IND: /* Unsigned integer with default */
if (len == 0)
{
@@ -3227,13 +3371,17 @@ for (;;)
case MOD_INT: /* Unsigned integer */
if (!isdigit(*pp)) goto INVALID_VALUE;
- *((uint32_t *)field) = (uint32_t)strtoul((const char *)pp, &endptr, 10);
+ uli = strtoul((const char *)pp, &endptr, 10);
+ if (U32OVERFLOW(uli)) goto INVALID_VALUE;
+ *((uint32_t *)field) = (uint32_t)uli;
pp = (uint8_t *)endptr;
break;
case MOD_INS: /* Signed integer */
if (!isdigit(*pp) && *pp != '-') goto INVALID_VALUE;
- *((int32_t *)field) = (int32_t)strtol((const char *)pp, &endptr, 10);
+ li = strtol((const char *)pp, &endptr, 10);
+ if (S32OVERFLOW(li)) goto INVALID_VALUE;
+ *((int32_t *)field) = (int32_t)li;
pp = (uint8_t *)endptr;
break;
@@ -3261,7 +3409,10 @@ for (;;)
if (isdigit(*pp) || *pp == '-')
{
int ct = MAXCPYGET - 1;
- int32_t value = (int32_t)strtol((const char *)pp, &endptr, 10);
+ int32_t value;
+ li = strtol((const char *)pp, &endptr, 10);
+ if (S32OVERFLOW(li)) goto INVALID_VALUE;
+ value = (int32_t)li;
field = (char *)field - m->offset + m->value; /* Adjust field ptr */
if (value >= 0) /* Add new number */
{
@@ -3405,15 +3556,16 @@ words.
Arguments:
controls control bits
+ controls2 more control bits
before text to print before
Returns: nothing
*/
static void
-show_controls(uint32_t controls, const char *before)
+show_controls(uint32_t controls, uint32_t controls2, const char *before)
{
-fprintf(outfile, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
+fprintf(outfile, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
before,
((controls & CTL_AFTERTEXT) != 0)? " aftertext" : "",
((controls & CTL_ALLAFTERTEXT) != 0)? " allaftertext" : "",
@@ -3421,10 +3573,12 @@ fprintf(outfile, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
((controls & CTL_ALLUSEDTEXT) != 0)? " allusedtext" : "",
((controls & CTL_ALTGLOBAL) != 0)? " altglobal" : "",
((controls & CTL_BINCODE) != 0)? " bincode" : "",
+ ((controls & CTL_BSR_SET) != 0)? " bsr" : "",
((controls & CTL_CALLOUT_CAPTURE) != 0)? " callout_capture" : "",
((controls & CTL_CALLOUT_INFO) != 0)? " callout_info" : "",
((controls & CTL_CALLOUT_NONE) != 0)? " callout_none" : "",
((controls & CTL_DFA) != 0)? " dfa" : "",
+ ((controls & CTL_EXPAND) != 0)? " expand" : "",
((controls & CTL_FINDLIMITS) != 0)? " find_limits" : "",
((controls & CTL_FULLBINCODE) != 0)? " fullbincode" : "",
((controls & CTL_GETALL) != 0)? " getall" : "",
@@ -3435,9 +3589,15 @@ fprintf(outfile, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
((controls & CTL_JITVERIFY) != 0)? " jitverify" : "",
((controls & CTL_MARK) != 0)? " mark" : "",
((controls & CTL_MEMORY) != 0)? " memory" : "",
+ ((controls & CTL_NL_SET) != 0)? " newline" : "",
+ ((controls & CTL_NULLCONTEXT) != 0)? " null_context" : "",
((controls & CTL_POSIX) != 0)? " posix" : "",
((controls & CTL_PUSH) != 0)? " push" : "",
((controls & CTL_STARTCHAR) != 0)? " startchar" : "",
+ ((controls2 & CTL2_SUBSTITUTE_EXTENDED) != 0)? " substitute_extended" : "",
+ ((controls2 & CTL2_SUBSTITUTE_OVERFLOW_LENGTH) != 0)? " substitute_overflow_length" : "",
+ ((controls2 & CTL2_SUBSTITUTE_UNKNOWN_UNSET) != 0)? " substitute_unknown_unset" : "",
+ ((controls2 & CTL2_SUBSTITUTE_UNSET_EMPTY) != 0)? " substitute_unset_empty" : "",
((controls & CTL_ZERO_TERMINATE) != 0)? " zero_terminate" : "");
}
@@ -3461,10 +3621,11 @@ static void
show_compile_options(uint32_t options, const char *before, const char *after)
{
if (options == 0) fprintf(outfile, "%s <none>%s", before, after);
-else fprintf(outfile, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
+else fprintf(outfile, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
before,
((options & PCRE2_ALT_BSUX) != 0)? " alt_bsux" : "",
((options & PCRE2_ALT_CIRCUMFLEX) != 0)? " alt_circumflex" : "",
+ ((options & PCRE2_ALT_VERBNAMES) != 0)? " alt_verbnames" : "",
((options & PCRE2_ALLOW_EMPTY_CLASS) != 0)? " allow_empty_class" : "",
((options & PCRE2_ANCHORED) != 0)? " anchored" : "",
((options & PCRE2_AUTO_CALLOUT) != 0)? " auto_callout" : "",
@@ -3486,6 +3647,7 @@ else fprintf(outfile, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
((options & PCRE2_NO_START_OPTIMIZE) != 0)? " no_start_optimize" : "",
((options & PCRE2_UCP) != 0)? " ucp" : "",
((options & PCRE2_UNGREEDY) != 0)? " ungreedy" : "",
+ ((options & PCRE2_USE_OFFSET_LIMIT) != 0)? " use_offset_limit" : "",
((options & PCRE2_UTF) != 0)? " utf" : "",
after);
}
@@ -3633,8 +3795,9 @@ if ((pat_patctl.control & CTL_INFO) != 0)
const uint8_t *start_bits;
BOOL match_limit_set, recursion_limit_set;
uint32_t backrefmax, bsr_convention, capture_count, first_ctype, first_cunit,
- hascrorlf, jchanged, last_ctype, last_cunit, match_empty, match_limit,
- minlength, nameentrysize, namecount, newline_convention, recursion_limit;
+ hasbackslashc, hascrorlf, jchanged, last_ctype, last_cunit, match_empty,
+ match_limit, minlength, nameentrysize, namecount, newline_convention,
+ recursion_limit;
/* These info requests may return PCRE2_ERROR_UNSET. */
@@ -3674,6 +3837,7 @@ if ((pat_patctl.control & CTL_INFO) != 0)
pattern_info(PCRE2_INFO_FIRSTBITMAP, &start_bits, FALSE) +
pattern_info(PCRE2_INFO_FIRSTCODEUNIT, &first_cunit, FALSE) +
pattern_info(PCRE2_INFO_FIRSTCODETYPE, &first_ctype, FALSE) +
+ pattern_info(PCRE2_INFO_HASBACKSLASHC, &hasbackslashc, FALSE) +
pattern_info(PCRE2_INFO_HASCRORLF, &hascrorlf, FALSE) +
pattern_info(PCRE2_INFO_JCHANGED, &jchanged, FALSE) +
pattern_info(PCRE2_INFO_LASTCODEUNIT, &last_cunit, FALSE) +
@@ -3704,7 +3868,7 @@ if ((pat_patctl.control & CTL_INFO) != 0)
if (namecount > 0)
{
fprintf(outfile, "Named capturing subpatterns:\n");
- while (namecount-- > 0)
+ for (; namecount > 0; namecount--)
{
int imm2_size = test_mode == PCRE8_MODE ? 2 : 1;
uint32_t length = (uint32_t)STRLEN(nametable + imm2_size);
@@ -3728,8 +3892,9 @@ if ((pat_patctl.control & CTL_INFO) != 0)
}
}
- if (hascrorlf) fprintf(outfile, "Contains explicit CR or LF match\n");
- if (match_empty) fprintf(outfile, "May match empty string\n");
+ if (hascrorlf) fprintf(outfile, "Contains explicit CR or LF match\n");
+ if (hasbackslashc) fprintf(outfile, "Contains \\C\n");
+ if (match_empty) fprintf(outfile, "May match empty string\n");
pattern_info(PCRE2_INFO_ARGOPTIONS, &compile_options, FALSE);
pattern_info(PCRE2_INFO_ALLOPTIONS, &overall_options, FALSE);
@@ -3767,8 +3932,7 @@ if ((pat_patctl.control & CTL_INFO) != 0)
fprintf(outfile, "\\R matches %s\n", (bsr_convention == PCRE2_BSR_UNICODE)?
"any Unicode newline" : "CR, LF, or CRLF");
- if ((pat_patctl.control & CTL_NL_SET) != 0 ||
- (FLD(compiled_code, flags) & PCRE2_NL_SET) != 0)
+ if ((FLD(compiled_code, flags) & PCRE2_NL_SET) != 0)
{
switch (newline_convention)
{
@@ -3866,11 +4030,22 @@ if ((pat_patctl.control & CTL_INFO) != 0)
if (FLD(compiled_code, executable_jit) != NULL)
fprintf(outfile, "JIT compilation was successful\n");
else
+ {
#ifdef SUPPORT_JIT
- fprintf(outfile, "JIT compilation was not successful\n");
+ int len;
+ fprintf(outfile, "JIT compilation was not successful");
+ if (jitrc != 0)
+ {
+ fprintf(outfile, " (");
+ PCRE2_GET_ERROR_MESSAGE(len, jitrc, pbuffer);
+ PCHARSV(CASTVAR(void *, pbuffer), 0, len, FALSE, outfile);
+ fprintf(outfile, ")");
+ }
+ fprintf(outfile, "\n");
#else
fprintf(outfile, "JIT support is not available in this version of PCRE2\n");
#endif
+ }
}
}
@@ -3985,6 +4160,7 @@ FILE *f;
PCRE2_SIZE serial_size;
size_t i;
int rc, cmd, cmdlen;
+uint16_t first_listed_newline;
const char *cmdname;
uint8_t *argptr, *serial;
@@ -4039,6 +4215,31 @@ switch(cmd)
(void)decode_modifiers(argptr, CTX_DEFDAT, NULL, &def_datctl);
break;
+ /* Check the default newline, and if not one of those listed, set up the
+ first one to be forced. An empty list unsets. */
+
+ case CMD_NEWLINE_DEFAULT:
+ local_newline_default = 0; /* Unset */
+ first_listed_newline = 0;
+ for (;;)
+ {
+ while (isspace(*argptr)) argptr++;
+ if (*argptr == 0) break;
+ for (i = 1; i < sizeof(newlines)/sizeof(char *); i++)
+ {
+ size_t nlen = strlen(newlines[i]);
+ if (strncmpic(argptr, (const uint8_t *)newlines[i], nlen) == 0 &&
+ isspace(argptr[nlen]))
+ {
+ if (i == NEWLINE_DEFAULT) return PR_OK; /* Default is valid */
+ if (first_listed_newline == 0) first_listed_newline = i;
+ }
+ }
+ while (*argptr != 0 && !isspace(*argptr)) argptr++;
+ }
+ local_newline_default = first_listed_newline;
+ break;
+
/* Pop a compiled pattern off the stack. Modifiers that do not affect the
compiled pattern (e.g. to give information) are permitted. The default
pattern modifiers are ignored. */
@@ -4055,7 +4256,7 @@ switch(cmd)
SET(compiled_code, patstack[--patstacknext]);
if (pat_patctl.jit != 0)
{
- PCRE2_JIT_COMPILE(compiled_code, pat_patctl.jit);
+ PCRE2_JIT_COMPILE(jitrc, compiled_code, pat_patctl.jit);
}
if ((pat_patctl.control & CTL_MEMORY) != 0) show_memory_info();
if ((pat_patctl.control & CTL_ANYINFO) != 0)
@@ -4178,10 +4379,12 @@ static int
process_pattern(void)
{
BOOL utf;
+uint32_t k;
uint8_t *p = buffer;
const uint8_t *use_tables;
unsigned int delimiter = *p++;
int errorcode;
+void *use_pat_context;
PCRE2_SIZE patlen;
PCRE2_SIZE erroroffset;
@@ -4226,6 +4429,20 @@ patlen = p - buffer - 2;
if (!decode_modifiers(p, CTX_PAT, &pat_patctl, NULL)) return PR_SKIP;
utf = (pat_patctl.options & PCRE2_UTF) != 0;
+/* Check for mutually exclusive modifiers. At present, these are all in the
+first control word. */
+
+for (k = 0; k < sizeof(exclusive_pat_controls)/sizeof(uint32_t); k++)
+ {
+ uint32_t c = pat_patctl.control & exclusive_pat_controls[k];
+ if (c != 0 && c != (c & (~c+1)))
+ {
+ show_controls(c, 0, "** Not allowed together:");
+ fprintf(outfile, "\n");
+ return PR_SKIP;
+ }
+ }
+
/* Assume full JIT compile for jitverify and/or jitfast if nothing else was
specified. */
@@ -4233,28 +4450,16 @@ if (pat_patctl.jit == 0 &&
(pat_patctl.control & (CTL_JITVERIFY|CTL_JITFAST)) != 0)
pat_patctl.jit = 7;
-/* POSIX and 'push' do not play together. */
-
-if ((pat_patctl.control & (CTL_POSIX|CTL_PUSH)) == (CTL_POSIX|CTL_PUSH))
- {
- fprintf(outfile, "** The POSIX interface is incompatible with 'push'\n");
- return PR_ABEND;
- }
-
/* Now copy the pattern to pbuffer8 for use in 8-bit testing and for reflecting
-in callouts. Convert to binary if required. */
+in callouts. Convert from hex if required; this must necessarily be fewer
+characters so will always fit in pbuffer8. Alternatively, process for
+repetition if requested. */
if ((pat_patctl.control & CTL_HEXPAT) != 0)
{
uint8_t *pp, *pt;
uint32_t c, d;
- if ((pat_patctl.control & CTL_POSIX) != 0)
- {
- fprintf(outfile, "** Hex patterns are not supported for the POSIX API\n");
- return PR_SKIP;
- }
-
pt = pbuffer8;
for (pp = buffer + 1; *pp != 0; pp++)
{
@@ -4277,6 +4482,80 @@ if ((pat_patctl.control & CTL_HEXPAT) != 0)
*pt = 0;
patlen = pt - pbuffer8;
}
+
+else if ((pat_patctl.control & CTL_EXPAND) != 0)
+ {
+ uint8_t *pp, *pt;
+
+ pt = pbuffer8;
+ for (pp = buffer + 1; *pp != 0; pp++)
+ {
+ uint8_t *pc = pp;
+ uint32_t count = 1;
+ size_t length = 1;
+
+ /* Check for replication syntax; if not found, the defaults just set will
+ prevail and one character will be copied. */
+
+ if (pp[0] == '\\' && pp[1] == '[')
+ {
+ uint8_t *pe;
+ for (pe = pp + 2; *pe != 0; pe++)
+ {
+ if (pe[0] == ']' && pe[1] == '{')
+ {
+ uint32_t clen = pe - pc - 2;
+ uint32_t i = 0;
+ pe += 2;
+ while (isdigit(*pe)) i = i * 10 + *pe++ - '0';
+ if (*pe == '}')
+ {
+ if (i == 0)
+ {
+ fprintf(outfile, "** Zero repeat not allowed\n");
+ return PR_SKIP;
+ }
+ pc += 2;
+ count = i;
+ length = clen;
+ pp = pe;
+ break;
+ }
+ }
+ }
+ }
+
+ /* Add to output. If the buffer is too small expand it. The function for
+ expanding buffers always keeps buffer and pbuffer8 in step as far as their
+ size goes. */
+
+ while (pt + count * length > pbuffer8 + pbuffer8_size)
+ {
+ size_t pc_offset = pc - buffer;
+ size_t pp_offset = pp - buffer;
+ size_t pt_offset = pt - pbuffer8;
+ expand_input_buffers();
+ pc = buffer + pc_offset;
+ pp = buffer + pp_offset;
+ pt = pbuffer8 + pt_offset;
+ }
+
+ while (count-- > 0)
+ {
+ memcpy(pt, pc, length);
+ pt += length;
+ }
+ }
+
+ *pt = 0;
+ patlen = pt - pbuffer8;
+
+ if ((pat_patctl.control & CTL_INFO) != 0)
+ fprintf(outfile, "Expanded: %s\n", pbuffer8);
+ }
+
+/* Neither hex nor expanded, just copy the input verbatim. */
+
else
{
strncpy((char *)pbuffer8, (char *)(buffer+1), patlen + 1);
@@ -4358,12 +4637,16 @@ if ((pat_patctl.control & CTL_POSIX) != 0)
pat_patctl.options & ~POSIX_SUPPORTED_COMPILE_OPTIONS, msg, "");
msg = "";
}
- if ((pat_patctl.control & ~POSIX_SUPPORTED_COMPILE_CONTROLS) != 0)
+ if ((pat_patctl.control & ~POSIX_SUPPORTED_COMPILE_CONTROLS) != 0 ||
+ (pat_patctl.control2 & ~POSIX_SUPPORTED_COMPILE_CONTROLS2) != 0)
{
- show_controls(pat_patctl.control & ~POSIX_SUPPORTED_COMPILE_CONTROLS, msg);
+ show_controls(pat_patctl.control & ~POSIX_SUPPORTED_COMPILE_CONTROLS,
+ pat_patctl.control2 & ~POSIX_SUPPORTED_COMPILE_CONTROLS2, msg);
msg = "";
}
+ if (local_newline_default != 0) prmsg(&msg, "#newline_default");
+
if (msg[0] == 0) fprintf(outfile, "\n");
/* Translate PCRE2 options to POSIX options and then compile. On success, set
@@ -4380,8 +4663,24 @@ if ((pat_patctl.control & CTL_POSIX) != 0)
rc = regcomp(&preg, (char *)pbuffer8, cflags);
if (rc != 0) /* Failure */
{
- (void)regerror(rc, &preg, (char *)pbuffer8, pbuffer8_size);
+ size_t bsize, usize;
+
+ preg.re_pcre2_code = NULL; /* In case something was left in there */
+ preg.re_match_data = NULL;
+
+ bsize = (pat_patctl.regerror_buffsize != 0)?
+ pat_patctl.regerror_buffsize : pbuffer8_size;
+ if (bsize + 8 < pbuffer8_size)
+ memcpy(pbuffer8 + bsize, "DEADBEEF", 8);
+ usize = regerror(rc, &preg, (char *)pbuffer8, bsize);
+
fprintf(outfile, "Failed: POSIX code %d: %s\n", rc, pbuffer8);
+ if (usize > bsize)
+ {
+ fprintf(outfile, "** regerror() message truncated\n");
+ if (memcmp(pbuffer8 + bsize, "DEADBEEF", 8) != 0)
+ fprintf(outfile, "** regerror() buffer overflow\n");
+ }
return PR_SKIP;
}
return PR_OK;
@@ -4398,15 +4697,19 @@ if ((pat_patctl.control & CTL_PUSH) != 0)
fprintf(outfile, "** Replacement text is not supported with 'push'.\n");
return PR_OK;
}
- if ((pat_patctl.control & ~PUSH_SUPPORTED_COMPILE_CONTROLS) != 0)
+ if ((pat_patctl.control & ~PUSH_SUPPORTED_COMPILE_CONTROLS) != 0 ||
+ (pat_patctl.control2 & ~PUSH_SUPPORTED_COMPILE_CONTROLS2) != 0)
{
show_controls(pat_patctl.control & ~PUSH_SUPPORTED_COMPILE_CONTROLS,
+ pat_patctl.control2 & ~PUSH_SUPPORTED_COMPILE_CONTROLS2,
"** Ignored when compiled pattern is stacked with 'push':");
fprintf(outfile, "\n");
}
- if ((pat_patctl.control & PUSH_COMPILE_ONLY_CONTROLS) != 0)
+ if ((pat_patctl.control & PUSH_COMPILE_ONLY_CONTROLS) != 0 ||
+ (pat_patctl.control2 & PUSH_COMPILE_ONLY_CONTROLS2) != 0)
{
show_controls(pat_patctl.control & PUSH_COMPILE_ONLY_CONTROLS,
+ pat_patctl.control2 & PUSH_COMPILE_ONLY_CONTROLS2,
"** Applies only to compile when pattern is stacked with 'push':");
fprintf(outfile, "\n");
}
@@ -4453,6 +4756,21 @@ if we had a hex pattern. */
if ((pat_patctl.control & CTL_HEXPAT) == 0) patlen = PCRE2_ZERO_TERMINATED;
+/* If #newline_default has been used and the library was not compiled with an
+appropriate default newline setting, local_newline_default will be non-zero. We
+use this if there is no explicit newline modifier. */
+
+if ((pat_patctl.control & CTL_NL_SET) == 0 && local_newline_default != 0)
+ {
+ SETFLD(pat_context, newline_convention, local_newline_default);
+ }
+
+/* The nullcontext modifier is used to test calling pcre2_compile() with a NULL
+context. */
+
+use_pat_context = ((pat_patctl.control & CTL_NULLCONTEXT) != 0)?
+ NULL : PTR(pat_context);
+
/* Compile many times when timing. */
if (timeit > 0)
@@ -4463,7 +4781,7 @@ if (timeit > 0)
{
clock_t start_time = clock();
PCRE2_COMPILE(compiled_code, pbuffer, patlen,
- pat_patctl.options|forbid_utf, &errorcode, &erroroffset, pat_context);
+ pat_patctl.options|forbid_utf, &errorcode, &erroroffset, use_pat_context);
time_taken += clock() - start_time;
if (TEST(compiled_code, !=, NULL))
{ SUB1(pcre2_code_free, compiled_code); }
@@ -4477,7 +4795,7 @@ if (timeit > 0)
/* A final compile that is used "for real". */
PCRE2_COMPILE(compiled_code, pbuffer, patlen, pat_patctl.options|forbid_utf,
- &errorcode, &erroroffset, pat_context);
+ &errorcode, &erroroffset, use_pat_context);
/* Compilation failed; go back for another re, skipping to blank line
if non-interactive. */
@@ -4527,9 +4845,10 @@ if (pat_patctl.jit != 0)
clock_t start_time;
SUB1(pcre2_code_free, compiled_code);
PCRE2_COMPILE(compiled_code, pbuffer, patlen,
- pat_patctl.options|forbid_utf, &errorcode, &erroroffset, pat_context);
+ pat_patctl.options|forbid_utf, &errorcode, &erroroffset,
+ use_pat_context);
start_time = clock();
- PCRE2_JIT_COMPILE(compiled_code, pat_patctl.jit);
+ PCRE2_JIT_COMPILE(jitrc,compiled_code, pat_patctl.jit);
time_taken += clock() - start_time;
}
total_jit_compile_time += time_taken;
@@ -4539,10 +4858,18 @@ if (pat_patctl.jit != 0)
}
else
{
- PCRE2_JIT_COMPILE(compiled_code, pat_patctl.jit);
+ PCRE2_JIT_COMPILE(jitrc, compiled_code, pat_patctl.jit);
}
}
+/* If an explicit newline modifier was given, set the information flag in the
+pattern so that it is preserved over push/pop. */
+
+if ((pat_patctl.control & CTL_NL_SET) != 0)
+ {
+ SETFLD(compiled_code, flags, FLD(compiled_code, flags) | PCRE2_NL_SET);
+ }
+
/* Output code size and other information if requested. */
if ((pat_patctl.control & CTL_MEMORY) != 0) show_memory_info();
@@ -4599,10 +4926,10 @@ for (;;)
if ((pat_patctl.control & CTL_JITFAST) != 0)
PCRE2_JIT_MATCH(capcount, compiled_code, pp, ulen, dat_datctl.offset,
- dat_datctl.options, match_data, dat_context);
+ dat_datctl.options, match_data, PTR(dat_context));
else
PCRE2_MATCH(capcount, compiled_code, pp, ulen, dat_datctl.offset,
- dat_datctl.options, match_data, dat_context);
+ dat_datctl.options, match_data, PTR(dat_context));
if (capcount == errnumber)
{
@@ -5025,10 +5352,11 @@ process_data(void)
{
PCRE2_SIZE len, ulen;
uint32_t gmatched;
-uint32_t c;
+uint32_t c, k;
uint32_t g_notempty = 0;
uint8_t *p, *pp, *start_rep;
size_t needlen;
+void *use_dat_context;
BOOL utf;
#ifdef SUPPORT_PCRE2_8
@@ -5050,6 +5378,7 @@ matching. */
DATCTXCPY(dat_context, default_dat_context);
memcpy(&dat_datctl, &def_datctl, sizeof(datctl));
dat_datctl.control |= (pat_patctl.control & CTL_ALLPD);
+dat_datctl.control2 |= (pat_patctl.control2 & CTL2_ALLPD);
strcpy((char *)dat_datctl.replacement, (char *)pat_patctl.replacement);
/* Initialize for scanning the data line. */
@@ -5098,7 +5427,7 @@ if (dbuffer != NULL)
the number of code units that will be needed (though the buffer may have to be
extended if replication is involved). */
-needlen = (size_t)(len * code_unit_size);
+needlen = (size_t)((len+1) * code_unit_size);
if (dbuffer == NULL || needlen >= dbuffer_size)
{
while (needlen >= dbuffer_size) dbuffer_size *= 2;
@@ -5367,38 +5696,44 @@ ulen = len/code_unit_size; /* Length in code units */
if (p[-1] != 0 && !decode_modifiers(p, CTX_DAT, NULL, &dat_datctl))
return PR_OK;
-/* Check for mutually exclusive modifiers. */
+/* Check for mutually exclusive modifiers. At present, these are all in the
+first control word. */
-c = dat_datctl.control & EXCLUSIVE_DAT_CONTROLS;
-if (c - (c & -c) != 0)
+for (k = 0; k < sizeof(exclusive_dat_controls)/sizeof(uint32_t); k++)
{
- show_controls(c, "** Not allowed together:");
- fprintf(outfile, "\n");
+ c = dat_datctl.control & exclusive_dat_controls[k];
+ if (c != 0 && c != (c & (~c+1)))
+ {
+ show_controls(c, 0, "** Not allowed together:");
+ fprintf(outfile, "\n");
+ return PR_OK;
+ }
+ }
+
+if (pat_patctl.replacement[0] != 0 &&
+ (dat_datctl.control & CTL_NULLCONTEXT) != 0)
+ {
+ fprintf(outfile, "** Replacement text is not supported with null_context.\n");
return PR_OK;
}
-/* If we have explicit valgrind support, mark the data from after its end to
-the end of the buffer as unaddressable, so that a read over the end of the
-buffer will be seen by valgrind, even if it doesn't cause a crash. If we're not
-building with valgrind support, at least move the data to the end of the buffer
-so that it might at least cause a crash. If we are using the POSIX interface,
-or testing zero-termination, we must include the terminating zero. */
+/* We now have the subject in dbuffer, with len containing the byte length, and
+ulen containing the code unit length. Move the data to the end of the buffer so
+that a read over the end can be caught by valgrind or other means. If we have
+explicit valgrind support, mark the unused start of the buffer unaddressable.
+If we are using the POSIX interface, or testing zero-termination, we must
+include the terminating zero in the usable data. */
-pp = dbuffer;
c = code_unit_size * (((pat_patctl.control & CTL_POSIX) +
(dat_datctl.control & CTL_ZERO_TERMINATE) != 0)? 1:0);
-
+pp = memmove(dbuffer + dbuffer_size - len - c, dbuffer, len + c);
#ifdef SUPPORT_VALGRIND
- VALGRIND_MAKE_MEM_NOACCESS(dbuffer + len + c, dbuffer_size - (len + c));
-#else
- pp = memmove(pp + dbuffer_size - len - c, pp, len + c);
+ VALGRIND_MAKE_MEM_NOACCESS(dbuffer, dbuffer_size - (len + c));
#endif
-/* We now have len containing the byte length, ulen containing the code unit
-length, and pp pointing to the subject string. POSIX matching is only possible
-in 8-bit mode, and it does not support timing or other fancy features. Some
-were checked at compile time, but we need to check the match-time settings
-here. */
+/* Now pp points to the subject string. POSIX matching is only possible in
+8-bit mode, and it does not support timing or other fancy features. Some were
+checked at compile time, but we need to check the match-time settings here. */
#ifdef SUPPORT_PCRE2_8
if ((pat_patctl.control & CTL_POSIX) != 0)
@@ -5422,9 +5757,11 @@ if ((pat_patctl.control & CTL_POSIX) != 0)
show_match_options(dat_datctl.options & ~POSIX_SUPPORTED_MATCH_OPTIONS);
msg = "";
}
- if ((dat_datctl.control & ~POSIX_SUPPORTED_MATCH_CONTROLS) != 0)
+ if ((dat_datctl.control & ~POSIX_SUPPORTED_MATCH_CONTROLS) != 0 ||
+ (dat_datctl.control2 & ~POSIX_SUPPORTED_MATCH_CONTROLS2) != 0)
{
- show_controls(dat_datctl.control & ~POSIX_SUPPORTED_MATCH_CONTROLS, msg);
+ show_controls(dat_datctl.control & ~POSIX_SUPPORTED_MATCH_CONTROLS,
+ dat_datctl.control2 & ~POSIX_SUPPORTED_MATCH_CONTROLS2, msg);
msg = "";
}
@@ -5455,14 +5792,14 @@ if ((pat_patctl.control & CTL_POSIX) != 0)
if (pmatch[i].rm_so >= 0)
{
fprintf(outfile, "%2d: ", (int)i);
- PCHARSV(dbuffer, pmatch[i].rm_so,
+ PCHARSV(pp, pmatch[i].rm_so,
pmatch[i].rm_eo - pmatch[i].rm_so, utf, outfile);
fprintf(outfile, "\n");
if ((i == 0 && (dat_datctl.control & CTL_AFTERTEXT) != 0) ||
(dat_datctl.control & CTL_ALLAFTERTEXT) != 0)
{
fprintf(outfile, "%2d+ ", (int)i);
- PCHARSV(dbuffer, pmatch[i].rm_eo, len - pmatch[i].rm_eo,
+ PCHARSV(pp, pmatch[i].rm_eo, len - pmatch[i].rm_eo,
utf, outfile);
fprintf(outfile, "\n");
}
@@ -5498,6 +5835,12 @@ if ((dat_datctl.control & (CTL_ALLUSEDTEXT|CTL_DFA)) == CTL_ALLUSEDTEXT &&
if ((dat_datctl.control & CTL_ZERO_TERMINATE) != 0)
ulen = PCRE2_ZERO_TERMINATED;
+/* The nullcontext modifier is used to test calling pcre2_[jit_]match() with a
+NULL context. */
+
+use_dat_context = ((dat_datctl.control & CTL_NULLCONTEXT) != 0)?
+ NULL : PTR(dat_context);
+
/* Enable display of malloc/free if wanted. */
show_memory = (dat_datctl.control & CTL_MEMORY) != 0;
@@ -5571,7 +5914,7 @@ if (dat_datctl.replacement[0] != 0)
uint8_t *pr;
uint8_t rbuffer[REPLACE_BUFFSIZE];
uint8_t nbuffer[REPLACE_BUFFSIZE];
- uint32_t goption;
+ uint32_t xoptions;
PCRE2_SIZE rlen, nsize, erroroffset;
BOOL badutf = FALSE;
@@ -5588,8 +5931,17 @@ if (dat_datctl.replacement[0] != 0)
if (timeitm)
fprintf(outfile, "** Timing is not supported with replace: ignored\n");
- goption = ((dat_datctl.control & CTL_GLOBAL) == 0)? 0 :
- PCRE2_SUBSTITUTE_GLOBAL;
+ xoptions = (((dat_datctl.control & CTL_GLOBAL) == 0)? 0 :
+ PCRE2_SUBSTITUTE_GLOBAL) |
+ (((dat_datctl.control2 & CTL2_SUBSTITUTE_EXTENDED) == 0)? 0 :
+ PCRE2_SUBSTITUTE_EXTENDED) |
+ (((dat_datctl.control2 & CTL2_SUBSTITUTE_OVERFLOW_LENGTH) == 0)? 0 :
+ PCRE2_SUBSTITUTE_OVERFLOW_LENGTH) |
+ (((dat_datctl.control2 & CTL2_SUBSTITUTE_UNKNOWN_UNSET) == 0)? 0 :
+ PCRE2_SUBSTITUTE_UNKNOWN_UNSET) |
+ (((dat_datctl.control2 & CTL2_SUBSTITUTE_UNSET_EMPTY) == 0)? 0 :
+ PCRE2_SUBSTITUTE_UNSET_EMPTY);
+
SETCASTPTR(r, rbuffer); /* Sets r8, r16, or r32, as appropriate. */
pr = dat_datctl.replacement;
@@ -5676,14 +6028,21 @@ if (dat_datctl.replacement[0] != 0)
else
rlen = (CASTVAR(uint8_t *, r) - rbuffer)/code_unit_size;
PCRE2_SUBSTITUTE(rc, compiled_code, pp, ulen, dat_datctl.offset,
- dat_datctl.options|goption, match_data, dat_context,
+ dat_datctl.options|xoptions, match_data, dat_context,
rbuffer, rlen, nbuffer, &nsize);
if (rc < 0)
{
- fprintf(outfile, "Failed: error %d: ", rc);
- PCRE2_GET_ERROR_MESSAGE(nsize, rc, pbuffer);
- PCHARSV(CASTVAR(void *, pbuffer), 0, nsize, FALSE, outfile);
+ PCRE2_SIZE msize;
+ fprintf(outfile, "Failed: error %d", rc);
+ if (rc != PCRE2_ERROR_NOMEMORY && nsize != PCRE2_UNSET)
+ fprintf(outfile, " at offset %ld in replacement", (long int)nsize);
+ fprintf(outfile, ": ");
+ PCRE2_GET_ERROR_MESSAGE(msize, rc, pbuffer);
+ PCHARSV(CASTVAR(void *, pbuffer), 0, msize, FALSE, outfile);
+ if (rc == PCRE2_ERROR_NOMEMORY &&
+ (xoptions & PCRE2_SUBSTITUTE_OVERFLOW_LENGTH) != 0)
+ fprintf(outfile, ": %ld code units are needed", (long int)nsize);
}
else
{
@@ -5752,7 +6111,7 @@ else for (gmatched = 0;; gmatched++)
{
PCRE2_DFA_MATCH(capcount, compiled_code, pp, ulen,
dat_datctl.offset, dat_datctl.options | g_notempty, match_data,
- dat_context, dfa_workspace, DFA_WS_DIMENSION);
+ use_dat_context, dfa_workspace, DFA_WS_DIMENSION);
}
}
@@ -5763,7 +6122,7 @@ else for (gmatched = 0;; gmatched++)
{
PCRE2_JIT_MATCH(capcount, compiled_code, pp, ulen,
dat_datctl.offset, dat_datctl.options | g_notempty, match_data,
- dat_context);
+ use_dat_context);
}
}
@@ -5774,7 +6133,7 @@ else for (gmatched = 0;; gmatched++)
{
PCRE2_MATCH(capcount, compiled_code, pp, ulen,
dat_datctl.offset, dat_datctl.options | g_notempty, match_data,
- dat_context);
+ use_dat_context);
}
}
total_match_time += (time_taken = clock() - start_time);
@@ -5822,7 +6181,7 @@ else for (gmatched = 0;; gmatched++)
dfa_workspace[0] = -1; /* To catch bad restart */
PCRE2_DFA_MATCH(capcount, compiled_code, pp, ulen,
dat_datctl.offset, dat_datctl.options | g_notempty, match_data,
- dat_context, dfa_workspace, DFA_WS_DIMENSION);
+ use_dat_context, dfa_workspace, DFA_WS_DIMENSION);
if (capcount == 0)
{
fprintf(outfile, "Matched, but offsets vector is too small to show all matches\n");
@@ -5833,10 +6192,10 @@ else for (gmatched = 0;; gmatched++)
{
if ((pat_patctl.control & CTL_JITFAST) != 0)
PCRE2_JIT_MATCH(capcount, compiled_code, pp, ulen, dat_datctl.offset,
- dat_datctl.options | g_notempty, match_data, dat_context);
+ dat_datctl.options | g_notempty, match_data, use_dat_context);
else
PCRE2_MATCH(capcount, compiled_code, pp, ulen, dat_datctl.offset,
- dat_datctl.options | g_notempty, match_data, dat_context);
+ dat_datctl.options | g_notempty, match_data, use_dat_context);
if (capcount == 0)
{
fprintf(outfile, "Matched, but too many substrings\n");
@@ -6046,7 +6405,8 @@ else for (gmatched = 0;; gmatched++)
TESTFLD(match_data, mark, !=, NULL))
{
fprintf(outfile, ", mark=");
- PCHARS(rubriclength, CASTFLD(void *, match_data, mark), 0, -1, utf, outfile);
+ PCHARS(rubriclength, CASTFLD(void *, match_data, mark), 0, -1, utf,
+ outfile);
rubriclength += 7;
}
fprintf(outfile, ": ");
@@ -6344,6 +6704,7 @@ printf(" -b set default pattern control 'fullbincode'\n");
printf(" -C show PCRE2 compile-time options and exit\n");
printf(" -C arg show a specific compile-time option and exit with its\n");
printf(" value if numeric (else 0). The arg can be:\n");
+printf(" backslash-C use of \\C is enabled [0, 1]\n");
printf(" bsr \\R type [ANYCRLF, ANY]\n");
printf(" ebcdic compiled for EBCDIC character code [0,1]\n");
printf(" ebcdic-nl NL code if compiled for EBCDIC\n");
@@ -6454,6 +6815,9 @@ printf("Compiled with\n");
#ifdef EBCDIC
printf(" EBCDIC code support: LF is 0x%02x\n", CHAR_LF);
+#if defined NATIVE_ZOS
+printf(" EBCDIC code page %s or similar\n", pcrz_cpversion());
+#endif
#endif
#ifdef SUPPORT_PCRE2_8
@@ -6492,6 +6856,11 @@ print_newline_config(optval, FALSE);
(void)PCRE2_CONFIG(PCRE2_CONFIG_BSR, &optval);
printf(" \\R matches %s\n", optval? "CR, LF, or CRLF only" :
"all Unicode newlines");
+#ifdef NEVER_BACKSLASH_C
+printf(" \\C is not supported\n");
+#else
+printf(" \\C is supported\n");
+#endif
(void)PCRE2_CONFIG(PCRE2_CONFIG_LINKSIZE, &optval);
printf(" Internal link size = %d\n", optval);
(void)PCRE2_CONFIG(PCRE2_CONFIG_PARENSLIMIT, &optval);
@@ -6532,7 +6901,8 @@ control blocks must be the same so that common options and controls such as
We cannot test this till runtime because "offsetof" does not work in the
preprocessor. */
-if (PO(options) != DO(options) || PO(control) != DO(control))
+if (PO(options) != DO(options) || PO(control) != DO(control) ||
+ PO(control2) != DO(control2))
{
fprintf(stderr, "** Coding error: "
"options and control offsets for pattern and data must be the same.\n");
@@ -6589,8 +6959,9 @@ def_datctl.cfail[0] = def_datctl.cfail[1] = CFAIL_UNSET;
while (argc > 1 && argv[op][0] == '-' && argv[op][1] != 0)
{
- const char *endptr;
+ char *endptr;
char *arg = argv[op];
+ unsigned long uli;
/* Display and/or set return code for configuration options. */
@@ -6640,7 +7011,7 @@ while (argc > 1 && argv[op][0] == '-' && argv[op][1] != 0)
/* Set system stack size */
else if (strcmp(arg, "-S") == 0 && argc > 2 &&
- ((stack_size = get_value(argv[op+1], &endptr)), *endptr == 0))
+ ((uli = strtoul(argv[op+1], &endptr, 10)), *endptr == 0))
{
#if defined(_WIN32) || defined(WIN32) || defined(__minix) || defined(NATIVE_ZOS) || defined(__VMS)
fprintf(stderr, "pcre2test: -S is not supported on this OS\n");
@@ -6648,6 +7019,12 @@ while (argc > 1 && argv[op][0] == '-' && argv[op][1] != 0)
#else
int rc;
struct rlimit rlim;
+ if (U32OVERFLOW(uli))
+ {
+ fprintf(stderr, "+++ Argument for -S is too big\n");
+ exit(1);
+ }
+ stack_size = (uint32_t)uli;
getrlimit(RLIMIT_STACK, &rlim);
rlim.rlim_cur = stack_size * 1024 * 1024;
if (rlim.rlim_cur > rlim.rlim_max)
@@ -6690,12 +7067,16 @@ while (argc > 1 && argv[op][0] == '-' && argv[op][1] != 0)
else if (strcmp(arg, "-t") == 0 || strcmp(arg, "-tm") == 0 ||
strcmp(arg, "-T") == 0 || strcmp(arg, "-TM") == 0)
{
- int temp;
int both = arg[2] == 0;
showtotaltimes = arg[1] == 'T';
- if (argc > 2 && (temp = get_value(argv[op+1], &endptr), *endptr == 0))
+ if (argc > 2 && (uli = strtoul(argv[op+1], &endptr, 10), *endptr == 0))
{
- timeitm = temp;
+ if (U32OVERFLOW(uli))
+ {
+ fprintf(stderr, "+++ Argument for %s is too big\n", arg);
+ exit(1);
+ }
+ timeitm = (int)uli;
op++;
argc--;
}
@@ -6915,7 +7296,8 @@ while (notdone)
skipping = FALSE;
setlocale(LC_CTYPE, "C");
}
- else if (!skipping) rc = process_data();
+ else if (!skipping && !(p[0] == '\\' && p[1] == '=' && isspace(p[2])))
+ rc = process_data();
}
/* We do not have a pattern set up for testing. Lines starting with # are
diff --git a/pcre2-10.20/src/sljit/sljitConfig.h b/pcre2-10.21/src/sljit/sljitConfig.h
index 1c8a521a..1c8a521a 100644
--- a/pcre2-10.20/src/sljit/sljitConfig.h
+++ b/pcre2-10.21/src/sljit/sljitConfig.h
diff --git a/pcre2-10.20/src/sljit/sljitConfigInternal.h b/pcre2-10.21/src/sljit/sljitConfigInternal.h
index 8a4b9664..16e3547c 100644
--- a/pcre2-10.20/src/sljit/sljitConfigInternal.h
+++ b/pcre2-10.21/src/sljit/sljitConfigInternal.h
@@ -613,6 +613,12 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_free_unused_memory_exec(void);
#define SLJIT_LOCALS_OFFSET_BASE ((23 + 1) * sizeof(sljit_sw))
#endif
+#elif (defined SLJIT_CONFIG_TILEGX && SLJIT_CONFIG_TILEGX)
+
+#define SLJIT_NUMBER_OF_REGISTERS 10
+#define SLJIT_NUMBER_OF_SAVED_REGISTERS 5
+#define SLJIT_LOCALS_OFFSET_BASE 0
+
#elif (defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED)
#define SLJIT_NUMBER_OF_REGISTERS 0
diff --git a/pcre2-10.20/src/sljit/sljitExecAllocator.c b/pcre2-10.21/src/sljit/sljitExecAllocator.c
index f24ed337..f24ed337 100644
--- a/pcre2-10.20/src/sljit/sljitExecAllocator.c
+++ b/pcre2-10.21/src/sljit/sljitExecAllocator.c
diff --git a/pcre2-10.20/src/sljit/sljitLir.c b/pcre2-10.21/src/sljit/sljitLir.c
index 0f1b1c9c..0f1b1c9c 100644
--- a/pcre2-10.20/src/sljit/sljitLir.c
+++ b/pcre2-10.21/src/sljit/sljitLir.c
diff --git a/pcre2-10.20/src/sljit/sljitLir.h b/pcre2-10.21/src/sljit/sljitLir.h
index f0969dac..2e2e9ac0 100644
--- a/pcre2-10.20/src/sljit/sljitLir.h
+++ b/pcre2-10.21/src/sljit/sljitLir.h
@@ -869,34 +869,6 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op2(struct sljit_compiler *compiler
sljit_si src1, sljit_sw src1w,
sljit_si src2, sljit_sw src2w);
-/* The following function is a helper function for sljit_emit_op_custom.
- It returns with the real machine register index ( >=0 ) of any SLJIT_R,
- SLJIT_S and SLJIT_SP registers.
-
- Note: it returns with -1 for virtual registers (only on x86-32). */
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_register_index(sljit_si reg);
-
-/* The following function is a helper function for sljit_emit_op_custom.
- It returns with the real machine register index of any SLJIT_FLOAT register.
-
- Note: the index is always an even number on ARM (except ARM-64), MIPS, and SPARC. */
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_float_register_index(sljit_si reg);
-
-/* Any instruction can be inserted into the instruction stream by
- sljit_emit_op_custom. It has a similar purpose as inline assembly.
- The size parameter must match to the instruction size of the target
- architecture:
-
- x86: 0 < size <= 15. The instruction argument can be byte aligned.
- Thumb2: if size == 2, the instruction argument must be 2 byte aligned.
- if size == 4, the instruction argument must be 4 byte aligned.
- Otherwise: size must be 4 and instruction argument must be 4 byte aligned. */
-
-SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_custom(struct sljit_compiler *compiler,
- void *instruction, sljit_si size);
-
/* Returns with non-zero if fpu is available. */
SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_is_fpu_available(void);
@@ -1214,4 +1186,64 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_function_context(void** func_ptr, struct
#endif /* !(defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL) */
+/* --------------------------------------------------------------------- */
+/* CPU specific functions */
+/* --------------------------------------------------------------------- */
+
+/* The following function is a helper function for sljit_emit_op_custom.
+ It returns with the real machine register index ( >=0 ) of any SLJIT_R,
+ SLJIT_S and SLJIT_SP registers.
+
+ Note: it returns with -1 for virtual registers (only on x86-32). */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_register_index(sljit_si reg);
+
+/* The following function is a helper function for sljit_emit_op_custom.
+ It returns with the real machine register index of any SLJIT_FLOAT register.
+
+ Note: the index is always an even number on ARM (except ARM-64), MIPS, and SPARC. */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_float_register_index(sljit_si reg);
+
+/* Any instruction can be inserted into the instruction stream by
+ sljit_emit_op_custom. It has a similar purpose as inline assembly.
+ The size parameter must match to the instruction size of the target
+ architecture:
+
+ x86: 0 < size <= 15. The instruction argument can be byte aligned.
+ Thumb2: if size == 2, the instruction argument must be 2 byte aligned.
+ if size == 4, the instruction argument must be 4 byte aligned.
+ Otherwise: size must be 4 and instruction argument must be 4 byte aligned. */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_custom(struct sljit_compiler *compiler,
+ void *instruction, sljit_si size);
+
+#if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86)
+
+/* Returns with non-zero if sse2 is available. */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_x86_is_sse2_available(void);
+
+/* Returns with non-zero if cmov instruction is available. */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_x86_is_cmov_available(void);
+
+/* Emit a conditional mov instruction on x86 CPUs. This instruction
+ moves src to destination, if the condition is satisfied. Unlike
+ other arithmetic instructions, destination must be a register.
+ Before such instructions are emitted, cmov support should be
+ checked by sljit_x86_is_cmov_available function.
+ type must be between SLJIT_EQUAL and SLJIT_S_ORDERED
+ dst_reg must be a valid register and it can be combined
+ with SLJIT_INT_OP to perform 32 bit arithmetic
+ Flags: I - (never set any flags)
+ */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_x86_emit_cmov(struct sljit_compiler *compiler,
+ sljit_si type,
+ sljit_si dst_reg,
+ sljit_si src, sljit_sw srcw);
+
+#endif
+
#endif /* _SLJIT_LIR_H_ */
diff --git a/pcre2-10.20/src/sljit/sljitNativeARM_32.c b/pcre2-10.21/src/sljit/sljitNativeARM_32.c
index 5cd4c71a..5cd4c71a 100644
--- a/pcre2-10.20/src/sljit/sljitNativeARM_32.c
+++ b/pcre2-10.21/src/sljit/sljitNativeARM_32.c
diff --git a/pcre2-10.20/src/sljit/sljitNativeARM_64.c b/pcre2-10.21/src/sljit/sljitNativeARM_64.c
index 044a675e..044a675e 100644
--- a/pcre2-10.20/src/sljit/sljitNativeARM_64.c
+++ b/pcre2-10.21/src/sljit/sljitNativeARM_64.c
diff --git a/pcre2-10.20/src/sljit/sljitNativeARM_T2_32.c b/pcre2-10.21/src/sljit/sljitNativeARM_T2_32.c
index f9803f5d..f9803f5d 100644
--- a/pcre2-10.20/src/sljit/sljitNativeARM_T2_32.c
+++ b/pcre2-10.21/src/sljit/sljitNativeARM_T2_32.c
diff --git a/pcre2-10.20/src/sljit/sljitNativeMIPS_32.c b/pcre2-10.21/src/sljit/sljitNativeMIPS_32.c
index b2b60d7a..b2b60d7a 100644
--- a/pcre2-10.20/src/sljit/sljitNativeMIPS_32.c
+++ b/pcre2-10.21/src/sljit/sljitNativeMIPS_32.c
diff --git a/pcre2-10.20/src/sljit/sljitNativeMIPS_64.c b/pcre2-10.21/src/sljit/sljitNativeMIPS_64.c
index 185fb576..185fb576 100644
--- a/pcre2-10.20/src/sljit/sljitNativeMIPS_64.c
+++ b/pcre2-10.21/src/sljit/sljitNativeMIPS_64.c
diff --git a/pcre2-10.20/src/sljit/sljitNativeMIPS_common.c b/pcre2-10.21/src/sljit/sljitNativeMIPS_common.c
index cf3535f8..cf3535f8 100644
--- a/pcre2-10.20/src/sljit/sljitNativeMIPS_common.c
+++ b/pcre2-10.21/src/sljit/sljitNativeMIPS_common.c
diff --git a/pcre2-10.20/src/sljit/sljitNativePPC_32.c b/pcre2-10.21/src/sljit/sljitNativePPC_32.c
index b14b75ce..b14b75ce 100644
--- a/pcre2-10.20/src/sljit/sljitNativePPC_32.c
+++ b/pcre2-10.21/src/sljit/sljitNativePPC_32.c
diff --git a/pcre2-10.20/src/sljit/sljitNativePPC_64.c b/pcre2-10.21/src/sljit/sljitNativePPC_64.c
index 182ac7b3..182ac7b3 100644
--- a/pcre2-10.20/src/sljit/sljitNativePPC_64.c
+++ b/pcre2-10.21/src/sljit/sljitNativePPC_64.c
diff --git a/pcre2-10.20/src/sljit/sljitNativePPC_common.c b/pcre2-10.21/src/sljit/sljitNativePPC_common.c
index b6a043f4..b6a043f4 100644
--- a/pcre2-10.20/src/sljit/sljitNativePPC_common.c
+++ b/pcre2-10.21/src/sljit/sljitNativePPC_common.c
diff --git a/pcre2-10.20/src/sljit/sljitNativeSPARC_32.c b/pcre2-10.21/src/sljit/sljitNativeSPARC_32.c
index 4a2e6293..4a2e6293 100644
--- a/pcre2-10.20/src/sljit/sljitNativeSPARC_32.c
+++ b/pcre2-10.21/src/sljit/sljitNativeSPARC_32.c
diff --git a/pcre2-10.20/src/sljit/sljitNativeSPARC_common.c b/pcre2-10.21/src/sljit/sljitNativeSPARC_common.c
index 327c4267..327c4267 100644
--- a/pcre2-10.20/src/sljit/sljitNativeSPARC_common.c
+++ b/pcre2-10.21/src/sljit/sljitNativeSPARC_common.c
diff --git a/pcre2-10.20/src/sljit/sljitNativeTILEGX-encoder.c b/pcre2-10.21/src/sljit/sljitNativeTILEGX-encoder.c
index 71963290..71963290 100644
--- a/pcre2-10.20/src/sljit/sljitNativeTILEGX-encoder.c
+++ b/pcre2-10.21/src/sljit/sljitNativeTILEGX-encoder.c
diff --git a/pcre2-10.20/src/sljit/sljitNativeTILEGX_64.c b/pcre2-10.21/src/sljit/sljitNativeTILEGX_64.c
index 1d6aa5a1..4d40392f 100644
--- a/pcre2-10.20/src/sljit/sljitNativeTILEGX_64.c
+++ b/pcre2-10.21/src/sljit/sljitNativeTILEGX_64.c
@@ -35,21 +35,21 @@
#define SIMM_16BIT_MIN (-0x8000)
#define SIMM_17BIT_MAX (0xffff)
#define SIMM_17BIT_MIN (-0x10000)
-#define SIMM_32BIT_MIN (-0x80000000)
#define SIMM_32BIT_MAX (0x7fffffff)
-#define SIMM_48BIT_MIN (0x800000000000L)
+#define SIMM_32BIT_MIN (-0x7fffffff - 1)
#define SIMM_48BIT_MAX (0x7fffffff0000L)
+#define SIMM_48BIT_MIN (-0x800000000000L)
#define IMM16(imm) ((imm) & 0xffff)
#define UIMM_16BIT_MAX (0xffff)
-#define TMP_REG1 (SLJIT_NO_REGISTERS + 1)
-#define TMP_REG2 (SLJIT_NO_REGISTERS + 2)
-#define TMP_REG3 (SLJIT_NO_REGISTERS + 3)
-#define ADDR_TMP (SLJIT_NO_REGISTERS + 4)
+#define TMP_REG1 (SLJIT_NUMBER_OF_REGISTERS + 2)
+#define TMP_REG2 (SLJIT_NUMBER_OF_REGISTERS + 3)
+#define TMP_REG3 (SLJIT_NUMBER_OF_REGISTERS + 4)
+#define ADDR_TMP (SLJIT_NUMBER_OF_REGISTERS + 5)
#define PIC_ADDR_REG TMP_REG2
-static SLJIT_CONST sljit_ub reg_map[SLJIT_NO_REGISTERS + 5] = {
+static SLJIT_CONST sljit_ub reg_map[SLJIT_NUMBER_OF_REGISTERS + 6] = {
63, 0, 1, 2, 3, 4, 30, 31, 32, 33, 34, 54, 5, 16, 6, 7
};
@@ -58,11 +58,6 @@ static SLJIT_CONST sljit_ub reg_map[SLJIT_NO_REGISTERS + 5] = {
#define TMP_REG2_mapped 16
#define TMP_REG3_mapped 6
#define ADDR_TMP_mapped 7
-#define SLJIT_SAVED_REG1_mapped 30
-#define SLJIT_SAVED_REG2_mapped 31
-#define SLJIT_SAVED_REG3_mapped 32
-#define SLJIT_SAVED_EREG1_mapped 33
-#define SLJIT_SAVED_EREG2_mapped 34
/* Flags are keept in volatile registers. */
#define EQUAL_FLAG 8
@@ -399,6 +394,9 @@ static sljit_si push_inst(struct sljit_compiler *compiler, sljit_ins ins)
#define SUB(dst, srca, srcb) \
push_3_buffer(compiler, TILEGX_OPC_SUB, dst, srca, srcb, __LINE__)
+#define MUL(dst, srca, srcb) \
+ push_3_buffer(compiler, TILEGX_OPC_MULX, dst, srca, srcb, __LINE__)
+
#define NOR(dst, srca, srcb) \
push_3_buffer(compiler, TILEGX_OPC_NOR, dst, srca, srcb, __LINE__)
@@ -547,8 +545,8 @@ const struct Format* compute_format()
const struct Format* match = NULL;
const struct Format *b = NULL;
- unsigned int i = 0;
- for (i; i < sizeof formats / sizeof formats[0]; i++) {
+ unsigned int i;
+ for (i = 0; i < sizeof formats / sizeof formats[0]; i++) {
b = &formats[i];
if ((b->pipe_mask & compatible_pipes) == b->pipe_mask) {
match = b;
@@ -625,7 +623,6 @@ tilegx_bundle_bits get_bundle_bit(struct jit_instr *inst)
static sljit_si update_buffer(struct sljit_compiler *compiler)
{
- int count;
int i;
int orig_index = inst_buf_index;
struct jit_instr inst0 = inst_buf[0];
@@ -738,8 +735,10 @@ static sljit_si update_buffer(struct sljit_compiler *compiler)
static sljit_si flush_buffer(struct sljit_compiler *compiler)
{
- while (inst_buf_index != 0)
- update_buffer(compiler);
+ while (inst_buf_index != 0) {
+ FAIL_IF(update_buffer(compiler));
+ }
+ return SLJIT_SUCCESS;
}
static sljit_si push_4_buffer(struct sljit_compiler *compiler, tilegx_mnemonic opc, int op0, int op1, int op2, int op3, int line)
@@ -787,6 +786,7 @@ static sljit_si push_3_buffer(struct sljit_compiler *compiler, tilegx_mnemonic o
case TILEGX_OPC_ADD:
case TILEGX_OPC_AND:
case TILEGX_OPC_SUB:
+ case TILEGX_OPC_MULX:
case TILEGX_OPC_OR:
case TILEGX_OPC_XOR:
case TILEGX_OPC_NOR:
@@ -905,7 +905,6 @@ static SLJIT_INLINE sljit_ins * detect_jump_type(struct sljit_jump *jump, sljit_
sljit_sw diff;
sljit_uw target_addr;
sljit_ins *inst;
- sljit_ins saved_inst;
if (jump->flags & SLJIT_REWRITABLE_JUMP)
return code_ptr;
@@ -1009,7 +1008,7 @@ SLJIT_API_FUNC_ATTRIBUTE void * sljit_generate_code(struct sljit_compiler *compi
struct sljit_const *const_;
CHECK_ERROR_PTR();
- check_sljit_generate_code(compiler);
+ CHECK_PTR(check_sljit_generate_code(compiler));
reverse_buf(compiler);
code = (sljit_ins *)SLJIT_MALLOC_EXEC(compiler->size * sizeof(sljit_ins));
@@ -1178,13 +1177,13 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compil
sljit_si fscratches, sljit_si fsaveds, sljit_si local_size)
{
sljit_ins base;
- sljit_ins bundle = 0;
-
+ sljit_si i, tmp;
+
CHECK_ERROR();
- check_sljit_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
+ CHECK(check_sljit_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size));
set_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
- local_size += (saveds + 1) * sizeof(sljit_sw);
+ local_size += GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1);
local_size = (local_size + 7) & ~7;
compiler->local_size = local_size;
@@ -1200,56 +1199,52 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compil
local_size = 0;
}
+ /* Save the return address. */
FAIL_IF(ADDLI(ADDR_TMP_mapped, base, local_size - 8));
FAIL_IF(ST_ADD(ADDR_TMP_mapped, RA, -8));
- if (saveds >= 1)
- FAIL_IF(ST_ADD(ADDR_TMP_mapped, SLJIT_SAVED_REG1_mapped, -8));
-
- if (saveds >= 2)
- FAIL_IF(ST_ADD(ADDR_TMP_mapped, SLJIT_SAVED_REG2_mapped, -8));
-
- if (saveds >= 3)
- FAIL_IF(ST_ADD(ADDR_TMP_mapped, SLJIT_SAVED_REG3_mapped, -8));
-
- if (saveds >= 4)
- FAIL_IF(ST_ADD(ADDR_TMP_mapped, SLJIT_SAVED_EREG1_mapped, -8));
-
- if (saveds >= 5)
- FAIL_IF(ST_ADD(ADDR_TMP_mapped, SLJIT_SAVED_EREG2_mapped, -8));
-
- if (args >= 1)
- FAIL_IF(ADD(SLJIT_SAVED_REG1_mapped, 0, ZERO));
+ /* Save the S registers. */
+ tmp = saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - saveds) : SLJIT_FIRST_SAVED_REG;
+ for (i = SLJIT_S0; i >= tmp; i--) {
+ FAIL_IF(ST_ADD(ADDR_TMP_mapped, reg_map[i], -8));
+ }
- if (args >= 2)
- FAIL_IF(ADD(SLJIT_SAVED_REG2_mapped, 1, ZERO));
+ /* Save the R registers that need to be reserved. */
+ for (i = scratches; i >= SLJIT_FIRST_SAVED_REG; i--) {
+ FAIL_IF(ST_ADD(ADDR_TMP_mapped, reg_map[i], -8));
+ }
- if (args >= 3)
- FAIL_IF(ADD(SLJIT_SAVED_REG3_mapped, 2, ZERO));
+ /* Move the arguments to S registers. */
+ for (i = 0; i < args; i++) {
+ FAIL_IF(ADD(reg_map[SLJIT_S0 - i], i, ZERO));
+ }
return SLJIT_SUCCESS;
}
-SLJIT_API_FUNC_ATTRIBUTE void sljit_set_context(struct sljit_compiler *compiler,
+SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_set_context(struct sljit_compiler *compiler,
sljit_si options, sljit_si args, sljit_si scratches, sljit_si saveds,
sljit_si fscratches, sljit_si fsaveds, sljit_si local_size)
{
- CHECK_ERROR_VOID();
- check_sljit_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
+ CHECK_ERROR();
+ CHECK(check_sljit_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size));
set_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
- local_size += (saveds + 1) * sizeof(sljit_sw);
+ local_size += GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1);
compiler->local_size = (local_size + 7) & ~7;
+
+ return SLJIT_SUCCESS;
}
SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compiler, sljit_si op, sljit_si src, sljit_sw srcw)
{
sljit_si local_size;
sljit_ins base;
- int addr_initialized = 0;
+ sljit_si i, tmp;
+ sljit_si saveds;
CHECK_ERROR();
- check_sljit_emit_return(compiler, op, src, srcw);
+ CHECK(check_sljit_emit_return(compiler, op, src, srcw));
FAIL_IF(emit_mov_before_return(compiler, op, src, srcw));
@@ -1263,50 +1258,20 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compi
local_size = 0;
}
+ /* Restore the return address. */
FAIL_IF(ADDLI(ADDR_TMP_mapped, base, local_size - 8));
- FAIL_IF(LD(RA, ADDR_TMP_mapped));
-
- if (compiler->saveds >= 5) {
- FAIL_IF(ADDLI(ADDR_TMP_mapped, base, local_size - 48));
- addr_initialized = 1;
+ FAIL_IF(LD_ADD(RA, ADDR_TMP_mapped, -8));
- FAIL_IF(LD_ADD(SLJIT_SAVED_EREG2_mapped, ADDR_TMP_mapped, 8));
+ /* Restore the S registers. */
+ saveds = compiler->saveds;
+ tmp = saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - saveds) : SLJIT_FIRST_SAVED_REG;
+ for (i = SLJIT_S0; i >= tmp; i--) {
+ FAIL_IF(LD_ADD(reg_map[i], ADDR_TMP_mapped, -8));
}
- if (compiler->saveds >= 4) {
- if (addr_initialized == 0) {
- FAIL_IF(ADDLI(ADDR_TMP_mapped, base, local_size - 40));
- addr_initialized = 1;
- }
-
- FAIL_IF(LD_ADD(SLJIT_SAVED_EREG1_mapped, ADDR_TMP_mapped, 8));
- }
-
- if (compiler->saveds >= 3) {
- if (addr_initialized == 0) {
- FAIL_IF(ADDLI(ADDR_TMP_mapped, base, local_size - 32));
- addr_initialized = 1;
- }
-
- FAIL_IF(LD_ADD(SLJIT_SAVED_REG3_mapped, ADDR_TMP_mapped, 8));
- }
-
- if (compiler->saveds >= 2) {
- if (addr_initialized == 0) {
- FAIL_IF(ADDLI(ADDR_TMP_mapped, base, local_size - 24));
- addr_initialized = 1;
- }
-
- FAIL_IF(LD_ADD(SLJIT_SAVED_REG2_mapped, ADDR_TMP_mapped, 8));
- }
-
- if (compiler->saveds >= 1) {
- if (addr_initialized == 0) {
- FAIL_IF(ADDLI(ADDR_TMP_mapped, base, local_size - 16));
- /* addr_initialized = 1; no need to initialize as it's the last one. */
- }
-
- FAIL_IF(LD_ADD(SLJIT_SAVED_REG1_mapped, ADDR_TMP_mapped, 8));
+ /* Restore the R registers that need to be reserved. */
+ for (i = compiler->scratches; i >= SLJIT_FIRST_SAVED_REG; i--) {
+ FAIL_IF(LD_ADD(reg_map[i], ADDR_TMP_mapped, -8));
}
if (compiler->local_size <= SIMM_16BIT_MAX)
@@ -1585,7 +1550,7 @@ static SLJIT_INLINE sljit_si emit_op_mem2(struct sljit_compiler *compiler, sljit
SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw)
{
CHECK_ERROR();
- check_sljit_emit_fast_enter(compiler, dst, dstw);
+ CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw));
ADJUST_LOCAL_OFFSET(dst, dstw);
/* For UNUSED dst. Uncommon, but possible. */
@@ -1602,7 +1567,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_enter(struct sljit_compiler *c
SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_si src, sljit_sw srcw)
{
CHECK_ERROR();
- check_sljit_emit_fast_return(compiler, src, srcw);
+ CHECK(check_sljit_emit_fast_return(compiler, src, srcw));
ADJUST_LOCAL_OFFSET(src, srcw);
if (FAST_IS_REG(src))
@@ -1636,9 +1601,11 @@ static SLJIT_INLINE sljit_si emit_single_op(struct sljit_compiler *compiler, slj
if (op == SLJIT_MOV_SI)
return BFEXTS(reg_map[dst], reg_map[src2], 0, 31);
- return BFEXTU(reg_map[dst], reg_map[src2], 0, 31);
- } else if (dst != src2)
- SLJIT_ASSERT_STOP();
+ return BFEXTU(reg_map[dst], reg_map[src2], 0, 31);
+ } else if (dst != src2) {
+ SLJIT_ASSERT(src2 == 0);
+ return ADD(reg_map[dst], reg_map[src2], ZERO);
+ }
return SLJIT_SUCCESS;
@@ -1650,8 +1617,10 @@ static SLJIT_INLINE sljit_si emit_single_op(struct sljit_compiler *compiler, slj
return BFEXTS(reg_map[dst], reg_map[src2], 0, 7);
return BFEXTU(reg_map[dst], reg_map[src2], 0, 7);
- } else if (dst != src2)
- SLJIT_ASSERT_STOP();
+ } else if (dst != src2) {
+ SLJIT_ASSERT(src2 == 0);
+ return ADD(reg_map[dst], reg_map[src2], ZERO);
+ }
return SLJIT_SUCCESS;
@@ -1663,8 +1632,10 @@ static SLJIT_INLINE sljit_si emit_single_op(struct sljit_compiler *compiler, slj
return BFEXTS(reg_map[dst], reg_map[src2], 0, 15);
return BFEXTU(reg_map[dst], reg_map[src2], 0, 15);
- } else if (dst != src2)
- SLJIT_ASSERT_STOP();
+ } else if (dst != src2) {
+ SLJIT_ASSERT(src2 == 0);
+ return ADD(reg_map[dst], reg_map[src2], ZERO);
+ }
return SLJIT_SUCCESS;
@@ -1811,7 +1782,6 @@ static SLJIT_INLINE sljit_si emit_single_op(struct sljit_compiler *compiler, slj
else {
/* Rare ocasion. */
FAIL_IF(ADD(TMP_EREG2, reg_map[src1], ZERO));
-
overflow_ra = TMP_EREG2;
}
}
@@ -1903,6 +1873,17 @@ static SLJIT_INLINE sljit_si emit_single_op(struct sljit_compiler *compiler, slj
return SLJIT_SUCCESS;
+ case SLJIT_MUL:
+ if (flags & SRC2_IMM) {
+ FAIL_IF(load_immediate(compiler, TMP_REG2_mapped, src2));
+ src2 = TMP_REG2;
+ flags &= ~SRC2_IMM;
+ }
+
+ FAIL_IF(MUL(reg_map[dst], reg_map[src1], reg_map[src2]));
+
+ return SLJIT_SUCCESS;
+
#define EMIT_LOGICAL(op_imm, op_norm) \
if (flags & SRC2_IMM) { \
FAIL_IF(load_immediate(compiler, ADDR_TMP_mapped, src2)); \
@@ -1950,8 +1931,8 @@ static SLJIT_INLINE sljit_si emit_single_op(struct sljit_compiler *compiler, slj
} else { \
if (op & SLJIT_SET_E) \
FAIL_IF(push_3_buffer( \
- compiler, op_imm, reg_map[dst], reg_map[src1], \
- src2 & 0x3F, __LINE__)); \
+ compiler, op_norm, EQUAL_FLAG, reg_map[src1], \
+ reg_map[src2], __LINE__)); \
if (CHECK_FLAGS(SLJIT_SET_E)) \
FAIL_IF(push_3_buffer( \
compiler, op_norm, reg_map[dst], reg_map[src1], \
@@ -2105,66 +2086,61 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_flags(struct sljit_compiler *com
{
sljit_si sugg_dst_ar, dst_ar;
sljit_si flags = GET_ALL_FLAGS(op);
+ sljit_si mem_type = (op & SLJIT_INT_OP) ? (INT_DATA | SIGNED_DATA) : WORD_DATA;
CHECK_ERROR();
- check_sljit_emit_op_flags(compiler, op, dst, dstw, src, srcw, type);
+ CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, src, srcw, type));
ADJUST_LOCAL_OFFSET(dst, dstw);
if (dst == SLJIT_UNUSED)
return SLJIT_SUCCESS;
op = GET_OPCODE(op);
+ if (op == SLJIT_MOV_SI || op == SLJIT_MOV_UI)
+ mem_type = INT_DATA | SIGNED_DATA;
sugg_dst_ar = reg_map[(op < SLJIT_ADD && FAST_IS_REG(dst)) ? dst : TMP_REG2];
compiler->cache_arg = 0;
compiler->cache_argw = 0;
if (op >= SLJIT_ADD && (src & SLJIT_MEM)) {
ADJUST_LOCAL_OFFSET(src, srcw);
- FAIL_IF(emit_op_mem2(compiler, WORD_DATA | LOAD_DATA, TMP_REG1_mapped, src, srcw, dst, dstw));
+ FAIL_IF(emit_op_mem2(compiler, mem_type | LOAD_DATA, TMP_REG1_mapped, src, srcw, dst, dstw));
src = TMP_REG1;
srcw = 0;
}
- switch (type) {
- case SLJIT_C_EQUAL:
- case SLJIT_C_NOT_EQUAL:
+ switch (type & 0xff) {
+ case SLJIT_EQUAL:
+ case SLJIT_NOT_EQUAL:
FAIL_IF(CMPLTUI(sugg_dst_ar, EQUAL_FLAG, 1));
dst_ar = sugg_dst_ar;
break;
- case SLJIT_C_LESS:
- case SLJIT_C_GREATER_EQUAL:
- case SLJIT_C_FLOAT_LESS:
- case SLJIT_C_FLOAT_GREATER_EQUAL:
+ case SLJIT_LESS:
+ case SLJIT_GREATER_EQUAL:
dst_ar = ULESS_FLAG;
break;
- case SLJIT_C_GREATER:
- case SLJIT_C_LESS_EQUAL:
- case SLJIT_C_FLOAT_GREATER:
- case SLJIT_C_FLOAT_LESS_EQUAL:
+ case SLJIT_GREATER:
+ case SLJIT_LESS_EQUAL:
dst_ar = UGREATER_FLAG;
break;
- case SLJIT_C_SIG_LESS:
- case SLJIT_C_SIG_GREATER_EQUAL:
+ case SLJIT_SIG_LESS:
+ case SLJIT_SIG_GREATER_EQUAL:
dst_ar = LESS_FLAG;
break;
- case SLJIT_C_SIG_GREATER:
- case SLJIT_C_SIG_LESS_EQUAL:
+ case SLJIT_SIG_GREATER:
+ case SLJIT_SIG_LESS_EQUAL:
dst_ar = GREATER_FLAG;
break;
- case SLJIT_C_OVERFLOW:
- case SLJIT_C_NOT_OVERFLOW:
+ case SLJIT_OVERFLOW:
+ case SLJIT_NOT_OVERFLOW:
dst_ar = OVERFLOW_FLAG;
break;
- case SLJIT_C_MUL_OVERFLOW:
- case SLJIT_C_MUL_NOT_OVERFLOW:
+ case SLJIT_MUL_OVERFLOW:
+ case SLJIT_MUL_NOT_OVERFLOW:
FAIL_IF(CMPLTUI(sugg_dst_ar, OVERFLOW_FLAG, 1));
dst_ar = sugg_dst_ar;
type ^= 0x1; /* Flip type bit for the XORI below. */
break;
- case SLJIT_C_FLOAT_EQUAL:
- case SLJIT_C_FLOAT_NOT_EQUAL:
- dst_ar = EQUAL_FLAG;
- break;
default:
SLJIT_ASSERT_STOP();
@@ -2180,11 +2156,11 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_flags(struct sljit_compiler *com
if (op >= SLJIT_ADD) {
if (TMP_REG2_mapped != dst_ar)
FAIL_IF(ADD(TMP_REG2_mapped, dst_ar, ZERO));
- return emit_op(compiler, op | flags, CUMULATIVE_OP | LOGICAL_OP | IMM_OP | ALT_KEEP_CACHE, dst, dstw, src, srcw, TMP_REG2, 0);
+ return emit_op(compiler, op | flags, mem_type | CUMULATIVE_OP | LOGICAL_OP | IMM_OP | ALT_KEEP_CACHE, dst, dstw, src, srcw, TMP_REG2, 0);
}
if (dst & SLJIT_MEM)
- return emit_op_mem(compiler, WORD_DATA, dst_ar, dst, dstw);
+ return emit_op_mem(compiler, mem_type, dst_ar, dst, dstw);
if (sugg_dst_ar != dst_ar)
return ADD(sugg_dst_ar, dst_ar, ZERO);
@@ -2194,7 +2170,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_flags(struct sljit_compiler *com
SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler, sljit_si op) {
CHECK_ERROR();
- check_sljit_emit_op0(compiler, op);
+ CHECK(check_sljit_emit_op0(compiler, op));
op = GET_OPCODE(op);
switch (op) {
@@ -2204,10 +2180,10 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler
case SLJIT_BREAKPOINT:
return PI(BPT);
- case SLJIT_UMUL:
- case SLJIT_SMUL:
- case SLJIT_UDIV:
- case SLJIT_SDIV:
+ case SLJIT_LUMUL:
+ case SLJIT_LSMUL:
+ case SLJIT_UDIVI:
+ case SLJIT_SDIVI:
SLJIT_ASSERT_STOP();
}
@@ -2217,7 +2193,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler
SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op1(struct sljit_compiler *compiler, sljit_si op, sljit_si dst, sljit_sw dstw, sljit_si src, sljit_sw srcw)
{
CHECK_ERROR();
- check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw);
+ CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw));
ADJUST_LOCAL_OFFSET(dst, dstw);
ADJUST_LOCAL_OFFSET(src, srcw);
@@ -2273,7 +2249,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op1(struct sljit_compiler *compiler
return emit_op(compiler, SLJIT_SUB | GET_ALL_FLAGS(op), IMM_OP, dst, dstw, SLJIT_IMM, 0, src, srcw);
case SLJIT_CLZ:
- return emit_op(compiler, op, 0, dst, dstw, TMP_REG1, 0, src, srcw);
+ return emit_op(compiler, op, (op & SLJIT_INT_OP) ? INT_DATA : WORD_DATA, dst, dstw, TMP_REG1, 0, src, srcw);
}
return SLJIT_SUCCESS;
@@ -2282,7 +2258,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op1(struct sljit_compiler *compiler
SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op2(struct sljit_compiler *compiler, sljit_si op, sljit_si dst, sljit_sw dstw, sljit_si src1, sljit_sw src1w, sljit_si src2, sljit_sw src2w)
{
CHECK_ERROR();
- check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w);
+ CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w));
ADJUST_LOCAL_OFFSET(dst, dstw);
ADJUST_LOCAL_OFFSET(src1, src1w);
ADJUST_LOCAL_OFFSET(src2, src2w);
@@ -2325,7 +2301,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_label * sljit_emit_label(struct sljit_comp
flush_buffer(compiler);
CHECK_ERROR_PTR();
- check_sljit_emit_label(compiler);
+ CHECK_PTR(check_sljit_emit_label(compiler));
if (compiler->last_label && compiler->last_label->size == compiler->size)
return compiler->last_label;
@@ -2344,7 +2320,7 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_ijump(struct sljit_compiler *compil
flush_buffer(compiler);
CHECK_ERROR();
- check_sljit_emit_ijump(compiler, type, src, srcw);
+ CHECK(check_sljit_emit_ijump(compiler, type, src, srcw));
ADJUST_LOCAL_OFFSET(src, srcw);
if (FAST_IS_REG(src)) {
@@ -2404,8 +2380,10 @@ SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_ijump(struct sljit_compiler *compil
return SLJIT_SUCCESS;
- } else if (src & SLJIT_MEM)
+ } else if (src & SLJIT_MEM) {
FAIL_IF(emit_op(compiler, SLJIT_MOV, WORD_DATA, TMP_REG2, 0, TMP_REG1, 0, src, srcw));
+ flush_buffer(compiler);
+ }
FAIL_IF(JR_SOLO(reg_map[src_r]));
@@ -2432,7 +2410,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump * sljit_emit_jump(struct sljit_compil
flush_buffer(compiler);
CHECK_ERROR_PTR();
- check_sljit_emit_jump(compiler, type);
+ CHECK_PTR(check_sljit_emit_jump(compiler, type));
jump = (struct sljit_jump *)ensure_abuf(compiler, sizeof(struct sljit_jump));
PTR_FAIL_IF(!jump);
@@ -2440,48 +2418,42 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump * sljit_emit_jump(struct sljit_compil
type &= 0xff;
switch (type) {
- case SLJIT_C_EQUAL:
- case SLJIT_C_FLOAT_NOT_EQUAL:
+ case SLJIT_EQUAL:
BR_NZ(EQUAL_FLAG);
break;
- case SLJIT_C_NOT_EQUAL:
- case SLJIT_C_FLOAT_EQUAL:
+ case SLJIT_NOT_EQUAL:
BR_Z(EQUAL_FLAG);
break;
- case SLJIT_C_LESS:
- case SLJIT_C_FLOAT_LESS:
+ case SLJIT_LESS:
BR_Z(ULESS_FLAG);
break;
- case SLJIT_C_GREATER_EQUAL:
- case SLJIT_C_FLOAT_GREATER_EQUAL:
+ case SLJIT_GREATER_EQUAL:
BR_NZ(ULESS_FLAG);
break;
- case SLJIT_C_GREATER:
- case SLJIT_C_FLOAT_GREATER:
+ case SLJIT_GREATER:
BR_Z(UGREATER_FLAG);
break;
- case SLJIT_C_LESS_EQUAL:
- case SLJIT_C_FLOAT_LESS_EQUAL:
+ case SLJIT_LESS_EQUAL:
BR_NZ(UGREATER_FLAG);
break;
- case SLJIT_C_SIG_LESS:
+ case SLJIT_SIG_LESS:
BR_Z(LESS_FLAG);
break;
- case SLJIT_C_SIG_GREATER_EQUAL:
+ case SLJIT_SIG_GREATER_EQUAL:
BR_NZ(LESS_FLAG);
break;
- case SLJIT_C_SIG_GREATER:
+ case SLJIT_SIG_GREATER:
BR_Z(GREATER_FLAG);
break;
- case SLJIT_C_SIG_LESS_EQUAL:
+ case SLJIT_SIG_LESS_EQUAL:
BR_NZ(GREATER_FLAG);
break;
- case SLJIT_C_OVERFLOW:
- case SLJIT_C_MUL_OVERFLOW:
+ case SLJIT_OVERFLOW:
+ case SLJIT_MUL_OVERFLOW:
BR_Z(OVERFLOW_FLAG);
break;
- case SLJIT_C_NOT_OVERFLOW:
- case SLJIT_C_MUL_NOT_OVERFLOW:
+ case SLJIT_NOT_OVERFLOW:
+ case SLJIT_MUL_NOT_OVERFLOW:
BR_NZ(OVERFLOW_FLAG);
break;
default:
@@ -2536,7 +2508,7 @@ SLJIT_API_FUNC_ATTRIBUTE struct sljit_const * sljit_emit_const(struct sljit_comp
flush_buffer(compiler);
CHECK_ERROR_PTR();
- check_sljit_emit_const(compiler, dst, dstw, init_value);
+ CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value));
ADJUST_LOCAL_OFFSET(dst, dstw);
const_ = (struct sljit_const *)ensure_abuf(compiler, sizeof(struct sljit_const));
@@ -2572,3 +2544,18 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_consta
inst[3] = (inst[3] & ~(0xFFFFL << 43)) | ((new_constant & 0xFFFFL) << 43);
SLJIT_CACHE_FLUSH(inst, inst + 4);
}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_register_index(sljit_si reg)
+{
+ CHECK_REG_INDEX(check_sljit_get_register_index(reg));
+ return reg_map[reg];
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_custom(struct sljit_compiler *compiler,
+ void *instruction, sljit_si size)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op_custom(compiler, instruction, size));
+ return SLJIT_ERR_UNSUPPORTED;
+}
+
diff --git a/pcre2-10.20/src/sljit/sljitNativeX86_32.c b/pcre2-10.21/src/sljit/sljitNativeX86_32.c
index d7129c8e..d7129c8e 100644
--- a/pcre2-10.20/src/sljit/sljitNativeX86_32.c
+++ b/pcre2-10.21/src/sljit/sljitNativeX86_32.c
diff --git a/pcre2-10.20/src/sljit/sljitNativeX86_64.c b/pcre2-10.21/src/sljit/sljitNativeX86_64.c
index 1790d8a4..1790d8a4 100644
--- a/pcre2-10.20/src/sljit/sljitNativeX86_64.c
+++ b/pcre2-10.21/src/sljit/sljitNativeX86_64.c
diff --git a/pcre2-10.20/src/sljit/sljitNativeX86_common.c b/pcre2-10.21/src/sljit/sljitNativeX86_common.c
index b7bbb038..416c15af 100644
--- a/pcre2-10.20/src/sljit/sljitNativeX86_common.c
+++ b/pcre2-10.21/src/sljit/sljitNativeX86_common.c
@@ -273,7 +273,9 @@ static sljit_si cpu_has_sse2 = -1;
#endif
static sljit_si cpu_has_cmov = -1;
-#if defined(_MSC_VER) && _MSC_VER >= 1400
+#ifdef _WIN32_WCE
+#include <cmnintrin.h>
+#elif defined(_MSC_VER) && _MSC_VER >= 1400
#include <intrin.h>
#endif
@@ -2934,3 +2936,69 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_consta
{
*(sljit_sw*)addr = new_constant;
}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_x86_is_sse2_available(void)
+{
+#if (defined SLJIT_DETECT_SSE2 && SLJIT_DETECT_SSE2)
+ if (cpu_has_sse2 == -1)
+ get_cpu_features();
+ return cpu_has_sse2;
+#else
+ return 1;
+#endif
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_x86_is_cmov_available(void)
+{
+ if (cpu_has_cmov == -1)
+ get_cpu_features();
+ return cpu_has_cmov;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_x86_emit_cmov(struct sljit_compiler *compiler,
+ sljit_si type,
+ sljit_si dst_reg,
+ sljit_si src, sljit_sw srcw)
+{
+ sljit_ub* inst;
+
+ CHECK_ERROR();
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ CHECK_ARGUMENT(sljit_x86_is_cmov_available());
+ CHECK_ARGUMENT(!(type & ~(0xff | SLJIT_INT_OP)));
+ CHECK_ARGUMENT((type & 0xff) >= SLJIT_EQUAL && (type & 0xff) <= SLJIT_D_ORDERED);
+ CHECK_ARGUMENT(FUNCTION_CHECK_IS_REG(dst_reg & ~SLJIT_INT_OP));
+ FUNCTION_CHECK_SRC(src, srcw);
+#endif
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ if (SLJIT_UNLIKELY(!!compiler->verbose)) {
+ fprintf(compiler->verbose, " x86_cmov%s %s%s, ",
+ !(dst_reg & SLJIT_INT_OP) ? "" : ".i",
+ JUMP_PREFIX(type), jump_names[type & 0xff]);
+ sljit_verbose_reg(compiler, dst_reg & ~SLJIT_INT_OP);
+ fprintf(compiler->verbose, ", ");
+ sljit_verbose_param(compiler, src, srcw);
+ fprintf(compiler->verbose, "\n");
+ }
+#endif
+
+ ADJUST_LOCAL_OFFSET(src, srcw);
+ CHECK_EXTRA_REGS(src, srcw, (void)0);
+
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ compiler->mode32 = dst_reg & SLJIT_INT_OP;
+#endif
+ dst_reg &= ~SLJIT_INT_OP;
+
+ if (SLJIT_UNLIKELY(src & SLJIT_IMM)) {
+ EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_IMM, srcw);
+ src = TMP_REG1;
+ srcw = 0;
+ }
+
+ inst = emit_x86_instruction(compiler, 2, dst_reg, 0, src, srcw);
+ FAIL_IF(!inst);
+ *inst++ = GROUP_0F;
+ *inst = get_jump_code(type & 0xff) - 0x40;
+ return SLJIT_SUCCESS;
+}
diff --git a/pcre2-10.20/src/sljit/sljitUtils.c b/pcre2-10.21/src/sljit/sljitUtils.c
index 5294b5f3..5294b5f3 100644
--- a/pcre2-10.20/src/sljit/sljitUtils.c
+++ b/pcre2-10.21/src/sljit/sljitUtils.c
diff --git a/pcre2-10.20/test-driver b/pcre2-10.21/test-driver
index 8e575b01..8e575b01 100755
--- a/pcre2-10.20/test-driver
+++ b/pcre2-10.21/test-driver