From: Ilia Alshanetsky Date: Sun, 23 Nov 2008 18:30:38 +0000 (+0000) Subject: MFB: Fixed bug #46643 (Upgraded PCRElib to 7.8) X-Git-Tag: php-5.2.7RC5~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d8b835620ccbc9e81bab42cd73a90a752c8d13da;p=php MFB: Fixed bug #46643 (Upgraded PCRElib to 7.8) --- diff --git a/ext/pcre/config.w32 b/ext/pcre/config.w32 index b52aa71236..7f50da7808 100644 --- a/ext/pcre/config.w32 +++ b/ext/pcre/config.w32 @@ -1,14 +1,11 @@ // $Id$ // vim:ft=javascript -ARG_WITH("pcre-regex", "Perl Compatible Regular Expressions", "yes"); - -if (PHP_PCRE_REGEX == "yes") { - EXTENSION("pcre", "php_pcre.c", PHP_PCRE_REGEX_SHARED, +EXTENSION("pcre", "php_pcre.c", false /* never shared */, "-DNO_RECURSE -Iext/pcre/pcrelib"); - ADD_SOURCES("ext/pcre/pcrelib", "pcre_chartables.c pcre_ucp_searchfuncs.c pcre_compile.c pcre_config.c pcre_exec.c pcre_fullinfo.c pcre_get.c pcre_globals.c pcre_info.c pcre_maketables.c pcre_newline.c pcre_ord2utf8.c pcre_refcount.c pcre_study.c pcre_tables.c pcre_try_flipped.c pcre_valid_utf8.c pcre_version.c pcre_xclass.c", "pcre"); - ADD_DEF_FILE("ext\\pcre\\php_pcre.def"); +ADD_SOURCES("ext/pcre/pcrelib", "pcre_chartables.c pcre_ucd.c pcre_compile.c pcre_config.c pcre_exec.c pcre_fullinfo.c pcre_get.c pcre_globals.c pcre_info.c pcre_maketables.c pcre_newline.c pcre_ord2utf8.c pcre_refcount.c pcre_study.c pcre_tables.c pcre_try_flipped.c pcre_valid_utf8.c pcre_version.c pcre_xclass.c", "pcre"); +ADD_DEF_FILE("ext\\pcre\\php_pcre.def"); - AC_DEFINE('HAVE_BUNDLED_PCRE', 1, 'Using bundled PCRE library'); - AC_DEFINE('HAVE_PCRE', 1, 'Have PCRE library'); -} +AC_DEFINE('HAVE_BUNDLED_PCRE', 1, 'Using bundled PCRE library'); +AC_DEFINE('HAVE_PCRE', 1, 'Have PCRE library'); +PHP_PCRE="yes"; diff --git a/ext/pcre/config0.m4 b/ext/pcre/config0.m4 index 373af4e9bd..91de0b9dba 100644 --- a/ext/pcre/config0.m4 +++ b/ext/pcre/config0.m4 @@ -5,17 +5,12 @@ dnl dnl By default we'll compile and link against the bundled PCRE library dnl if DIR is supplied, we'll use that for linking -PHP_ARG_WITH(pcre-regex,for PCRE support, -[ --without-pcre-regex Do not include Perl Compatible Regular Expressions support. - DIR is the PCRE install prefix [BUNDLED]], yes) +PHP_ARG_WITH(pcre-regex,, +[ --with-pcre-regex=DIR Include Perl Compatible Regular Expressions support. + DIR is the PCRE install prefix [BUNDLED]], yes, no) -if test "$PHP_PCRE_REGEX" != "no"; then - if test "$PHP_PCRE_REGEX" = "yes"; then - PHP_NEW_EXTENSION(pcre, pcrelib/pcre_chartables.c pcrelib/pcre_ucp_searchfuncs.c pcrelib/pcre_compile.c pcrelib/pcre_config.c pcrelib/pcre_exec.c pcrelib/pcre_fullinfo.c pcrelib/pcre_get.c pcrelib/pcre_globals.c pcrelib/pcre_info.c pcrelib/pcre_maketables.c pcrelib/pcre_newline.c pcrelib/pcre_ord2utf8.c pcrelib/pcre_refcount.c pcrelib/pcre_study.c pcrelib/pcre_tables.c pcrelib/pcre_try_flipped.c pcrelib/pcre_valid_utf8.c pcrelib/pcre_version.c pcrelib/pcre_xclass.c php_pcre.c, $ext_shared,,-I@ext_srcdir@/pcrelib) - PHP_ADD_BUILD_DIR($ext_builddir/pcrelib) - PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h pcrelib/]) - AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ]) - else + if test "$PHP_PCRE_REGEX" != "yes" && test "$PHP_PCRE_REGEX" != "no"; then + AC_MSG_CHECKING([for PCRE headers location]) for i in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/include $PHP_PCRE_REGEX/include/pcre; do test -f $i/pcre.h && PCRE_INCDIR=$i done @@ -23,7 +18,9 @@ if test "$PHP_PCRE_REGEX" != "no"; then if test -z "$PCRE_INCDIR"; then AC_MSG_ERROR([Could not find pcre.h in $PHP_PCRE_REGEX]) fi + AC_MSG_RESULT([$PCRE_INCDIR]) + AC_MSG_CHECKING([for PCRE library location]) for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/$PHP_LIBDIR; do test -f $j/libpcre.a || test -f $j/libpcre.$SHLIB_SUFFIX_NAME && PCRE_LIBDIR=$j done @@ -31,6 +28,7 @@ if test "$PHP_PCRE_REGEX" != "no"; then if test -z "$PCRE_LIBDIR" ; then AC_MSG_ERROR([Could not find libpcre.(a|$SHLIB_SUFFIX_NAME) in $PHP_PCRE_REGEX]) fi + AC_MSG_RESULT([$PCRE_LIBDIR]) changequote({,}) pcre_major=`grep PCRE_MAJOR $PCRE_INCDIR/pcre.h | sed -e 's/[^0-9]//g'` @@ -45,14 +43,24 @@ if test "$PHP_PCRE_REGEX" != "no"; then AC_MSG_ERROR([The PCRE extension requires PCRE library version >= 6.6]) fi - PHP_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR, PCRE_SHARED_LIBADD) + PHP_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR) AC_DEFINE(HAVE_PCRE, 1, [ ]) PHP_ADD_INCLUDE($PCRE_INCDIR) - PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared) + PHP_NEW_EXTENSION(pcre, php_pcre.c, no) PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h]) - PHP_SUBST(PCRE_SHARED_LIBADD) + else + AC_MSG_CHECKING([for PCRE library to use]) + AC_MSG_RESULT([bundled]) + pcrelib_sources="pcrelib/pcre_chartables.c pcrelib/pcre_ucd.c \ + pcrelib/pcre_compile.c pcrelib/pcre_config.c pcrelib/pcre_exec.c \ + pcrelib/pcre_fullinfo.c pcrelib/pcre_get.c pcrelib/pcre_globals.c \ + pcrelib/pcre_info.c pcrelib/pcre_maketables.c pcrelib/pcre_newline.c \ + pcrelib/pcre_ord2utf8.c pcrelib/pcre_refcount.c pcrelib/pcre_study.c \ + pcrelib/pcre_tables.c pcrelib/pcre_try_flipped.c pcrelib/pcre_valid_utf8.c \ + pcrelib/pcre_version.c pcrelib/pcre_xclass.c" + PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, no,,-I@ext_srcdir@/pcrelib) + PHP_ADD_BUILD_DIR($ext_builddir/pcrelib) + PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h pcrelib/]) + AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ]) fi -else - PHP_PCRE=no -fi diff --git a/ext/pcre/pcrelib/ChangeLog b/ext/pcre/pcrelib/ChangeLog index 3ebbb45221..fa137fb74d 100644 --- a/ext/pcre/pcrelib/ChangeLog +++ b/ext/pcre/pcrelib/ChangeLog @@ -1,6 +1,192 @@ ChangeLog for PCRE ------------------ +Version 7.8 05-Sep-08 +--------------------- + +1. Replaced UCP searching code with optimized version as implemented for Ad + Muncher (http://www.admuncher.com/) by Peter Kankowski. This uses a two- + stage table and inline lookup instead of a function, giving speed ups of 2 + to 5 times on some simple patterns that I tested. Permission was given to + distribute the MultiStage2.py script that generates the tables (it's not in + the tarball, but is in the Subversion repository). + +2. Updated the Unicode datatables to Unicode 5.1.0. This adds yet more + scripts. + +3. Change 12 for 7.7 introduced a bug in pcre_study() when a pattern contained + a group with a zero qualifier. The result of the study could be incorrect, + or the function might crash, depending on the pattern. + +4. Caseless matching was not working for non-ASCII characters in back + references. For example, /(\x{de})\1/8i was not matching \x{de}\x{fe}. + It now works when Unicode Property Support is available. + +5. In pcretest, an escape such as \x{de} in the data was always generating + a UTF-8 string, even in non-UTF-8 mode. Now it generates a single byte in + non-UTF-8 mode. If the value is greater than 255, it gives a warning about + truncation. + +6. Minor bugfix in pcrecpp.cc (change "" == ... to NULL == ...). + +7. Added two (int) casts to pcregrep when printing the difference of two + pointers, in case they are 64-bit values. + +8. Added comments about Mac OS X stack usage to the pcrestack man page and to + test 2 if it fails. + +9. Added PCRE_CALL_CONVENTION just before the names of all exported functions, + and a #define of that name to empty if it is not externally set. This is to + allow users of MSVC to set it if necessary. + +10. The PCRE_EXP_DEFN macro which precedes exported functions was missing from + the convenience functions in the pcre_get.c source file. + +11. An option change at the start of a pattern that had top-level alternatives + could cause overwriting and/or a crash. This command provoked a crash in + some environments: + + printf "/(?i)[\xc3\xa9\xc3\xbd]|[\xc3\xa9\xc3\xbdA]/8\n" | pcretest + + This potential security problem was recorded as CVE-2008-2371. + +12. For a pattern where the match had to start at the beginning or immediately + after a newline (e.g /.*anything/ without the DOTALL flag), pcre_exec() and + pcre_dfa_exec() could read past the end of the passed subject if there was + no match. To help with detecting such bugs (e.g. with valgrind), I modified + pcretest so that it places the subject at the end of its malloc-ed buffer. + +13. The change to pcretest in 12 above threw up a couple more cases when pcre_ + exec() might read past the end of the data buffer in UTF-8 mode. + +14. A similar bug to 7.3/2 existed when the PCRE_FIRSTLINE option was set and + the data contained the byte 0x85 as part of a UTF-8 character within its + first line. This applied both to normal and DFA matching. + +15. Lazy qualifiers were not working in some cases in UTF-8 mode. For example, + /^[^d]*?$/8 failed to match "abc". + +16. Added a missing copyright notice to pcrecpp_internal.h. + +17. Make it more clear in the documentation that values returned from + pcre_exec() in ovector are byte offsets, not character counts. + +18. Tidied a few places to stop certain compilers from issuing warnings. + +19. Updated the Virtual Pascal + BCC files to compile the latest v7.7, as + supplied by Stefan Weber. I made a further small update for 7.8 because + there is a change of source arrangements: the pcre_searchfuncs.c module is + replaced by pcre_ucd.c. + + +Version 7.7 07-May-08 +--------------------- + +1. Applied Craig's patch to sort out a long long problem: "If we can't convert + a string to a long long, pretend we don't even have a long long." This is + done by checking for the strtoq, strtoll, and _strtoi64 functions. + +2. Applied Craig's patch to pcrecpp.cc to restore ABI compatibility with + pre-7.6 versions, which defined a global no_arg variable instead of putting + it in the RE class. (See also #8 below.) + +3. Remove a line of dead code, identified by coverity and reported by Nuno + Lopes. + +4. Fixed two related pcregrep bugs involving -r with --include or --exclude: + + (1) The include/exclude patterns were being applied to the whole pathnames + of files, instead of just to the final components. + + (2) If there was more than one level of directory, the subdirectories were + skipped unless they satisfied the include/exclude conditions. This is + inconsistent with GNU grep (and could even be seen as contrary to the + pcregrep specification - which I improved to make it absolutely clear). + The action now is always to scan all levels of directory, and just + apply the include/exclude patterns to regular files. + +5. Added the --include_dir and --exclude_dir patterns to pcregrep, and used + --exclude_dir in the tests to avoid scanning .svn directories. + +6. Applied Craig's patch to the QuoteMeta function so that it escapes the + NUL character as backslash + 0 rather than backslash + NUL, because PCRE + doesn't support NULs in patterns. + +7. Added some missing "const"s to declarations of static tables in + pcre_compile.c and pcre_dfa_exec.c. + +8. Applied Craig's patch to pcrecpp.cc to fix a problem in OS X that was + caused by fix #2 above. (Subsequently also a second patch to fix the + first patch. And a third patch - this was a messy problem.) + +9. Applied Craig's patch to remove the use of push_back(). + +10. Applied Alan Lehotsky's patch to add REG_STARTEND support to the POSIX + matching function regexec(). + +11. Added support for the Oniguruma syntax \g, \g, \g'name', \g'n', + which, however, unlike Perl's \g{...}, are subroutine calls, not back + references. PCRE supports relative numbers with this syntax (I don't think + Oniguruma does). + +12. Previously, a group with a zero repeat such as (...){0} was completely + omitted from the compiled regex. However, this means that if the group + was called as a subroutine from elsewhere in the pattern, things went wrong + (an internal error was given). Such groups are now left in the compiled + pattern, with a new opcode that causes them to be skipped at execution + time. + +13. Added the PCRE_JAVASCRIPT_COMPAT option. This makes the following changes + to the way PCRE behaves: + + (a) A lone ] character is dis-allowed (Perl treats it as data). + + (b) A back reference to an unmatched subpattern matches an empty string + (Perl fails the current match path). + + (c) A data ] in a character class must be notated as \] because if the + first data character in a class is ], it defines an empty class. (In + Perl it is not possible to have an empty class.) The empty class [] + never matches; it forces failure and is equivalent to (*FAIL) or (?!). + The negative empty class [^] matches any one character, independently + of the DOTALL setting. + +14. A pattern such as /(?2)[]a()b](abc)/ which had a forward reference to a + non-existent subpattern following a character class starting with ']' and + containing () gave an internal compiling error instead of "reference to + non-existent subpattern". Fortunately, when the pattern did exist, the + compiled code was correct. (When scanning forwards to check for the + existencd of the subpattern, it was treating the data ']' as terminating + the class, so got the count wrong. When actually compiling, the reference + was subsequently set up correctly.) + +15. The "always fail" assertion (?!) is optimzed to (*FAIL) by pcre_compile; + it was being rejected as not supported by pcre_dfa_exec(), even though + other assertions are supported. I have made pcre_dfa_exec() support + (*FAIL). + +16. The implementation of 13c above involved the invention of a new opcode, + OP_ALLANY, which is like OP_ANY but doesn't check the /s flag. Since /s + cannot be changed at match time, I realized I could make a small + improvement to matching performance by compiling OP_ALLANY instead of + OP_ANY for "." when DOTALL was set, and then removing the runtime tests + on the OP_ANY path. + +17. Compiling pcretest on Windows with readline support failed without the + following two fixes: (1) Make the unistd.h include conditional on + HAVE_UNISTD_H; (2) #define isatty and fileno as _isatty and _fileno. + +18. Changed CMakeLists.txt and cmake/FindReadline.cmake to arrange for the + ncurses library to be included for pcretest when ReadLine support is + requested, but also to allow for it to be overridden. This patch came from + Daniel Bergström. + +19. There was a typo in the file ucpinternal.h where f0_rangeflag was defined + as 0x00f00000 instead of 0x00800000. Luckily, this would not have caused + any errors with the current Unicode tables. Thanks to Peter Kankowski for + spotting this. + + Version 7.6 28-Jan-08 --------------------- diff --git a/ext/pcre/pcrelib/HACKING b/ext/pcre/pcrelib/HACKING index c946cd2bdb..1f30d4c487 100644 --- a/ext/pcre/pcrelib/HACKING +++ b/ext/pcre/pcrelib/HACKING @@ -125,7 +125,8 @@ Opcodes with no following data These items are all just one byte long OP_END end of pattern - OP_ANY match any character + OP_ANY match any one character other than newline + OP_ALLANY match any one character, including newline OP_ANYBYTE match any single byte, even in UTF-8 mode OP_SOD match start of data: \A OP_SOM, start of match (subject + offset): \G @@ -318,9 +319,12 @@ maximally respectively. All three are followed by LINK_SIZE bytes giving (as a positive number) the offset back to the matching bracket opcode. If a subpattern is quantified such that it is permitted to match zero times, it -is preceded by one of OP_BRAZERO or OP_BRAMINZERO. These are single-byte -opcodes which tell the matcher that skipping this subpattern entirely is a -valid branch. +is preceded by one of OP_BRAZERO, OP_BRAMINZERO, or OP_SKIPZERO. These are +single-byte opcodes that tell the matcher that skipping the following +subpattern entirely is a valid branch. In the case of the first two, not +skipping the pattern is also valid (greedy and non-greedy). The third is used +when a pattern has the quantifier {0,0}. It cannot be entirely discarded, +because it may be called as a subroutine from elsewhere in the regex. A subpattern with an indefinite maximum repetition is replicated in the compiled data its minimum number of times (or once with OP_BRAZERO if the @@ -411,4 +415,4 @@ at compile time, and so does not cause anything to be put into the compiled data. Philip Hazel -August 2007 +April 2008 diff --git a/ext/pcre/pcrelib/NEWS b/ext/pcre/pcrelib/NEWS index d274541ba3..43e47b6ed6 100644 --- a/ext/pcre/pcrelib/NEWS +++ b/ext/pcre/pcrelib/NEWS @@ -1,6 +1,21 @@ News about PCRE releases ------------------------ + +Release 7.8 05-Sep-08 +--------------------- + +More bug fixes, plus a performance improvement in Unicode character property +lookup. + + +Release 7.7 07-May-08 +--------------------- + +This is once again mainly a bug-fix release, but there are a couple of new +features. + + Release 7.6 28-Jan-08 --------------------- diff --git a/ext/pcre/pcrelib/NON-UNIX-USE b/ext/pcre/pcrelib/NON-UNIX-USE index e6726faaad..bf5c41a5ee 100644 --- a/ext/pcre/pcrelib/NON-UNIX-USE +++ b/ext/pcre/pcrelib/NON-UNIX-USE @@ -85,8 +85,6 @@ The following are generic comments about building the PCRE C library "by hand". pcre_internal.h ucp.h - ucpinternal.h - ucptable.h (5) Also ensure that you have the following file, which is #included as source when building a debugging version of PCRE, and is also used by pcretest. @@ -113,7 +111,7 @@ The following are generic comments about building the PCRE C library "by hand". pcre_study.c pcre_tables.c pcre_try_flipped.c - pcre_ucp_searchfuncs.c + pcre_ucd.c pcre_valid_utf8.c pcre_version.c pcre_xclass.c @@ -190,6 +188,17 @@ otherwise the pcre_malloc() and pcre_free() exported functions will be declared __declspec(dllimport), with unwanted results. +CALLING CONVENTIONS IN WINDOWS ENVIRONMENTS + +It is possible to compile programs to use different calling conventions using +MSVC. Search the web for "calling conventions" for more information. To make it +easier to change the calling convention for the exported functions in the +PCRE library, the macro PCRE_CALL_CONVENTION is present in all the external +definitions. It can be set externally when compiling (e.g. in CFLAGS). If it is +not set, it defaults to empty; the default calling convention is then used +(which is what is wanted most of the time). + + COMMENTS ABOUT WIN32 BUILDS (see also "BUILDING PCRE WITH CMAKE" below) There are two ways of building PCRE using the "configure, make, make install" @@ -428,5 +437,5 @@ $! Locale could not be set to fr $! ========================= -Last Updated: 25 January 2008 +Last Updated: 05 September 2008 **** diff --git a/ext/pcre/pcrelib/README b/ext/pcre/pcrelib/README index 98d52f13aa..3879038936 100644 --- a/ext/pcre/pcrelib/README +++ b/ext/pcre/pcrelib/README @@ -1,9 +1,12 @@ README file for PCRE (Perl-compatible regular expression library) ----------------------------------------------------------------- -The latest release of PCRE is always available from +The latest release of PCRE is always available in three alternative formats +from: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-xxx.tar.gz + ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-xxx.tar.bz2 + ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-xxx.zip There is a mailing list for discussion about the development of PCRE at @@ -276,6 +279,15 @@ library. You can read more about them in the pcrebuild man page. Note that libreadline is GPL-licenced, so if you distribute a binary of pcretest linked in this way, there may be licensing issues. + Setting this option causes the -lreadline option to be added to the pcretest + build. In many operating environments with a sytem-installed readline + library this is sufficient. However, in some environments (e.g. if an + unmodified distribution version of readline is in use), it may be necessary + to specify something like LIBS="-lncurses" as well. This is because, to quote + the readline INSTALL, "Readline uses the termcap functions, but does not link + with the termcap or curses library itself, allowing applications which link + with readline the to choose an appropriate library." + The "configure" script builds the following files for the basic C library: . Makefile is the makefile that builds the library @@ -631,7 +643,7 @@ The distribution should contain the following files: pcre_study.c ) pcre_tables.c ) pcre_try_flipped.c ) - pcre_ucp_searchfuncs.c ) + pcre_ucd.c ) pcre_valid_utf8.c ) pcre_version.c ) pcre_xclass.c ) @@ -640,9 +652,7 @@ The distribution should contain the following files: pcre.h.in template for pcre.h when built by "configure" pcreposix.h header for the external POSIX wrapper API pcre_internal.h header for internal use - ucp.h ) headers concerned with - ucpinternal.h ) Unicode property handling - ucptable.h ) (this one is the data table) + ucp.h header for Unicode property handling config.h.in template for config.h, which is built by "configure" @@ -716,6 +726,9 @@ The distribution should contain the following files: (D) Auxiliary files for cmake support + cmake/COPYING-CMAKE-SCRIPTS + cmake/FindPackageHandleStandardArgs.cmake + cmake/FindReadline.cmake CMakeLists.txt config-cmake.h.in @@ -740,4 +753,4 @@ The distribution should contain the following files: Philip Hazel Email local part: ph10 Email domain: cam.ac.uk -Last updated: 25 January 2008 +Last updated: 05 September 2008 diff --git a/ext/pcre/pcrelib/config.h b/ext/pcre/pcrelib/config.h index 0b753d686a..dc6f26753b 100644 --- a/ext/pcre/pcrelib/config.h +++ b/ext/pcre/pcrelib/config.h @@ -132,9 +132,7 @@ them both to 0; an emulation function will be used. */ #endif /* Define to 1 if you have the `strtoll' function. */ -#ifndef HAVE_STRTOLL -#define HAVE_STRTOLL 1 -#endif +/* #undef HAVE_STRTOLL */ /* Define to 1 if you have the `strtoq' function. */ #ifndef HAVE_STRTOQ @@ -251,13 +249,13 @@ them both to 0; an emulation function will be used. */ #define PACKAGE_NAME "PCRE" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "PCRE 7.6" +#define PACKAGE_STRING "PCRE 7.8" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "pcre" /* Define to the version of this package. */ -#define PACKAGE_VERSION "7.6" +#define PACKAGE_VERSION "7.8" /* If you are compiling for a system other than a Unix-like system or @@ -310,7 +308,7 @@ them both to 0; an emulation function will be used. */ /* Version number of package */ #ifndef VERSION -#define VERSION "7.6" +#define VERSION "7.8" #endif /* Define to empty if `const' does not conform to ANSI C. */ diff --git a/ext/pcre/pcrelib/doc/pcre.txt b/ext/pcre/pcrelib/doc/pcre.txt index 9be2c6f365..d07bfea006 100644 --- a/ext/pcre/pcrelib/doc/pcre.txt +++ b/ext/pcre/pcrelib/doc/pcre.txt @@ -18,9 +18,11 @@ INTRODUCTION The PCRE library is a set of functions that implement regular expres- sion pattern matching using the same syntax and semantics as Perl, with - just a few differences. (Certain features that appeared in Python and + just a few differences. Certain features that appeared in Python and PCRE before they appeared in Perl are also available using the Python - syntax.) + syntax. There is also some support for certain .NET and Oniguruma syn- + tax items, and there is an option for requesting some minor changes + that give better JavaScript compatibility. The current implementation of PCRE (release 7.x) corresponds approxi- mately with Perl 5.10, including support for UTF-8 encoded strings and @@ -256,8 +258,8 @@ AUTHOR REVISION - Last updated: 09 August 2007 - Copyright (c) 1997-2007 University of Cambridge. + Last updated: 12 April 2008 + Copyright (c) 1997-2008 University of Cambridge. ------------------------------------------------------------------------------ @@ -543,6 +545,24 @@ PCRETEST OPTION FOR LIBREADLINE SUPPORT Note that libreadline is GPL-licenced, so if you distribute a binary of pcretest linked in this way, there may be licensing issues. + Setting this option causes the -lreadline option to be added to the + pcretest build. In many operating environments with a sytem-installed + libreadline this is sufficient. However, in some environments (e.g. if + an unmodified distribution version of readline is in use), some extra + configuration may be necessary. The INSTALL file for libreadline says + this: + + "Readline uses the termcap functions, but does not link with the + termcap or curses library itself, allowing applications which link + with readline the to choose an appropriate library." + + If your environment has not been set up so that an appropriate library + is automatically included, you may need to add something like + + LIBS="-ncurses" + + immediately before the configure command. + SEE ALSO @@ -558,8 +578,8 @@ AUTHOR REVISION - Last updated: 18 December 2007 - Copyright (c) 1997-2007 University of Cambridge. + Last updated: 13 April 2008 + Copyright (c) 1997-2008 University of Cambridge. ------------------------------------------------------------------------------ @@ -707,29 +727,30 @@ THE ALTERNATIVE MATCHING ALGORITHM tive algorithm moves through the subject string one character at a time, for all active paths through the tree. - 8. None of the backtracking control verbs such as (*PRUNE) are sup- - ported. + 8. Except for (*FAIL), the backtracking control verbs such as (*PRUNE) + are not supported. (*FAIL) is supported, and behaves like a failing + negative assertion. ADVANTAGES OF THE ALTERNATIVE ALGORITHM - Using the alternative matching algorithm provides the following advan- + Using the alternative matching algorithm provides the following advan- tages: 1. All possible matches (at a single point in the subject) are automat- - ically found, and in particular, the longest match is found. To find + ically found, and in particular, the longest match is found. To find more than one match using the standard algorithm, you have to do kludgy things with callouts. - 2. There is much better support for partial matching. The restrictions - on the content of the pattern that apply when using the standard algo- - rithm for partial matching do not apply to the alternative algorithm. - For non-anchored patterns, the starting position of a partial match is + 2. There is much better support for partial matching. The restrictions + on the content of the pattern that apply when using the standard algo- + rithm for partial matching do not apply to the alternative algorithm. + For non-anchored patterns, the starting position of a partial match is available. - 3. Because the alternative algorithm scans the subject string just - once, and never needs to backtrack, it is possible to pass very long - subject strings to the matching function in several pieces, checking + 3. Because the alternative algorithm scans the subject string just + once, and never needs to backtrack, it is possible to pass very long + subject strings to the matching function in several pieces, checking for partial matching each time. @@ -737,8 +758,8 @@ DISADVANTAGES OF THE ALTERNATIVE ALGORITHM The alternative algorithm suffers from a number of disadvantages: - 1. It is substantially slower than the standard algorithm. This is - partly because it has to search for all possible matches, but is also + 1. It is substantially slower than the standard algorithm. This is + partly because it has to search for all possible matches, but is also because it is less susceptible to optimization. 2. Capturing parentheses and back references are not supported. @@ -756,8 +777,8 @@ AUTHOR REVISION - Last updated: 08 August 2007 - Copyright (c) 1997-2007 University of Cambridge. + Last updated: 19 April 2008 + Copyright (c) 1997-2008 University of Cambridge. ------------------------------------------------------------------------------ @@ -1244,21 +1265,38 @@ COMPILING A PATTERN before or at the first newline in the subject string, though the matched text may continue over the newline. + PCRE_JAVASCRIPT_COMPAT + + If this option is set, PCRE's behaviour is changed in some ways so that + it is compatible with JavaScript rather than Perl. The changes are as + follows: + + (1) A lone closing square bracket in a pattern causes a compile-time + error, because this is illegal in JavaScript (by default it is treated + as a data character). Thus, the pattern AB]CD becomes illegal when this + option is set. + + (2) At run time, a back reference to an unset subpattern group matches + an empty string (by default this causes the current matching alterna- + tive to fail). A pattern such as (\1)(a) succeeds when this option is + set (assuming it can find an "a" in the subject), whereas it fails by + default, for Perl compatibility. + PCRE_MULTILINE - By default, PCRE treats the subject string as consisting of a single - line of characters (even if it actually contains newlines). The "start - of line" metacharacter (^) matches only at the start of the string, - while the "end of line" metacharacter ($) matches only at the end of + By default, PCRE treats the subject string as consisting of a single + line of characters (even if it actually contains newlines). The "start + of line" metacharacter (^) matches only at the start of the string, + while the "end of line" metacharacter ($) matches only at the end of the string, or before a terminating newline (unless PCRE_DOLLAR_ENDONLY is set). This is the same as Perl. - When PCRE_MULTILINE it is set, the "start of line" and "end of line" - constructs match immediately following or immediately before internal - newlines in the subject string, respectively, as well as at the very - start and end. This is equivalent to Perl's /m option, and it can be + When PCRE_MULTILINE it is set, the "start of line" and "end of line" + constructs match immediately following or immediately before internal + newlines in the subject string, respectively, as well as at the very + start and end. This is equivalent to Perl's /m option, and it can be changed within a pattern by a (?m) option setting. If there are no new- - lines in a subject string, or no occurrences of ^ or $ in a pattern, + lines in a subject string, or no occurrences of ^ or $ in a pattern, setting PCRE_MULTILINE has no effect. PCRE_NEWLINE_CR @@ -1267,81 +1305,81 @@ COMPILING A PATTERN PCRE_NEWLINE_ANYCRLF PCRE_NEWLINE_ANY - These options override the default newline definition that was chosen - when PCRE was built. Setting the first or the second specifies that a - newline is indicated by a single character (CR or LF, respectively). - Setting PCRE_NEWLINE_CRLF specifies that a newline is indicated by the - two-character CRLF sequence. Setting PCRE_NEWLINE_ANYCRLF specifies + These options override the default newline definition that was chosen + when PCRE was built. Setting the first or the second specifies that a + newline is indicated by a single character (CR or LF, respectively). + Setting PCRE_NEWLINE_CRLF specifies that a newline is indicated by the + two-character CRLF sequence. Setting PCRE_NEWLINE_ANYCRLF specifies that any of the three preceding sequences should be recognized. Setting - PCRE_NEWLINE_ANY specifies that any Unicode newline sequence should be + PCRE_NEWLINE_ANY specifies that any Unicode newline sequence should be recognized. The Unicode newline sequences are the three just mentioned, - plus the single characters VT (vertical tab, U+000B), FF (formfeed, - U+000C), NEL (next line, U+0085), LS (line separator, U+2028), and PS - (paragraph separator, U+2029). The last two are recognized only in + plus the single characters VT (vertical tab, U+000B), FF (formfeed, + U+000C), NEL (next line, U+0085), LS (line separator, U+2028), and PS + (paragraph separator, U+2029). The last two are recognized only in UTF-8 mode. - The newline setting in the options word uses three bits that are + The newline setting in the options word uses three bits that are treated as a number, giving eight possibilities. Currently only six are - used (default plus the five values above). This means that if you set - more than one newline option, the combination may or may not be sensi- + used (default plus the five values above). This means that if you set + more than one newline option, the combination may or may not be sensi- ble. For example, PCRE_NEWLINE_CR with PCRE_NEWLINE_LF is equivalent to - PCRE_NEWLINE_CRLF, but other combinations may yield unused numbers and + PCRE_NEWLINE_CRLF, but other combinations may yield unused numbers and cause an error. - The only time that a line break is specially recognized when compiling - a pattern is if PCRE_EXTENDED is set, and an unescaped # outside a - character class is encountered. This indicates a comment that lasts - until after the next line break sequence. In other circumstances, line - break sequences are treated as literal data, except that in + The only time that a line break is specially recognized when compiling + a pattern is if PCRE_EXTENDED is set, and an unescaped # outside a + character class is encountered. This indicates a comment that lasts + until after the next line break sequence. In other circumstances, line + break sequences are treated as literal data, except that in PCRE_EXTENDED mode, both CR and LF are treated as whitespace characters and are therefore ignored. The newline option that is set at compile time becomes the default that - is used for pcre_exec() and pcre_dfa_exec(), but it can be overridden. + is used for pcre_exec() and pcre_dfa_exec(), but it can be overridden. PCRE_NO_AUTO_CAPTURE If this option is set, it disables the use of numbered capturing paren- - theses in the pattern. Any opening parenthesis that is not followed by - ? behaves as if it were followed by ?: but named parentheses can still - be used for capturing (and they acquire numbers in the usual way). + theses in the pattern. Any opening parenthesis that is not followed by + ? behaves as if it were followed by ?: but named parentheses can still + be used for capturing (and they acquire numbers in the usual way). There is no equivalent of this option in Perl. PCRE_UNGREEDY - This option inverts the "greediness" of the quantifiers so that they - are not greedy by default, but become greedy if followed by "?". It is - not compatible with Perl. It can also be set by a (?U) option setting + This option inverts the "greediness" of the quantifiers so that they + are not greedy by default, but become greedy if followed by "?". It is + not compatible with Perl. It can also be set by a (?U) option setting within the pattern. PCRE_UTF8 - This option causes PCRE to regard both the pattern and the subject as - strings of UTF-8 characters instead of single-byte character strings. - However, it is available only when PCRE is built to include UTF-8 sup- - port. If not, the use of this option provokes an error. Details of how - this option changes the behaviour of PCRE are given in the section on + This option causes PCRE to regard both the pattern and the subject as + strings of UTF-8 characters instead of single-byte character strings. + However, it is available only when PCRE is built to include UTF-8 sup- + port. If not, the use of this option provokes an error. Details of how + this option changes the behaviour of PCRE are given in the section on UTF-8 support in the main pcre page. PCRE_NO_UTF8_CHECK When PCRE_UTF8 is set, the validity of the pattern as a UTF-8 string is - automatically checked. There is a discussion about the validity of - UTF-8 strings in the main pcre page. If an invalid UTF-8 sequence of - bytes is found, pcre_compile() returns an error. If you already know + automatically checked. There is a discussion about the validity of + UTF-8 strings in the main pcre page. If an invalid UTF-8 sequence of + bytes is found, pcre_compile() returns an error. If you already know that your pattern is valid, and you want to skip this check for perfor- - mance reasons, you can set the PCRE_NO_UTF8_CHECK option. When it is - set, the effect of passing an invalid UTF-8 string as a pattern is - undefined. It may cause your program to crash. Note that this option - can also be passed to pcre_exec() and pcre_dfa_exec(), to suppress the + mance reasons, you can set the PCRE_NO_UTF8_CHECK option. When it is + set, the effect of passing an invalid UTF-8 string as a pattern is + undefined. It may cause your program to crash. Note that this option + can also be passed to pcre_exec() and pcre_dfa_exec(), to suppress the UTF-8 validity checking of subject strings. COMPILATION ERROR CODES - The following table lists the error codes than may be returned by - pcre_compile2(), along with the error messages that may be returned by - both compiling functions. As PCRE has developed, some error codes have + The following table lists the error codes than may be returned by + pcre_compile2(), along with the error messages that may be returned by + both compiling functions. As PCRE has developed, some error codes have fallen out of use. To avoid confusion, they have not been re-used. 0 no error @@ -1397,21 +1435,22 @@ COMPILATION ERROR CODES 50 [this code is not in use] 51 octal value is greater than \377 (not in UTF-8 mode) 52 internal error: overran compiling workspace - 53 internal error: previously-checked referenced subpattern not + 53 internal error: previously-checked referenced subpattern not found 54 DEFINE group contains more than one branch 55 repeating a DEFINE group is not allowed 56 inconsistent NEWLINE options - 57 \g is not followed by a braced name or an optionally braced - non-zero number - 58 (?+ or (?- or (?(+ or (?(- must be followed by a non-zero number + 57 \g is not followed by a braced, angle-bracketed, or quoted + name/number or by a plain number + 58 a numbered reference must not be zero 59 (*VERB) with an argument is not supported 60 (*VERB) not recognized 61 number is too big 62 subpattern name expected 63 digit expected after (?+ + 64 ] is an invalid data character in JavaScript compatibility mode - The numbers 32 and 10000 in errors 48 and 49 are defaults; different + The numbers 32 and 10000 in errors 48 and 49 are defaults; different values may be used if the limits were changed when PCRE was built. @@ -1420,32 +1459,32 @@ STUDYING A PATTERN pcre_extra *pcre_study(const pcre *code, int options const char **errptr); - If a compiled pattern is going to be used several times, it is worth + If a compiled pattern is going to be used several times, it is worth spending more time analyzing it in order to speed up the time taken for - matching. The function pcre_study() takes a pointer to a compiled pat- + matching. The function pcre_study() takes a pointer to a compiled pat- tern as its first argument. If studying the pattern produces additional - information that will help speed up matching, pcre_study() returns a - pointer to a pcre_extra block, in which the study_data field points to + information that will help speed up matching, pcre_study() returns a + pointer to a pcre_extra block, in which the study_data field points to the results of the study. The returned value from pcre_study() can be passed directly to - pcre_exec(). However, a pcre_extra block also contains other fields - that can be set by the caller before the block is passed; these are + pcre_exec(). However, a pcre_extra block also contains other fields + that can be set by the caller before the block is passed; these are described below in the section on matching a pattern. - If studying the pattern does not produce any additional information + If studying the pattern does not produce any additional information pcre_study() returns NULL. In that circumstance, if the calling program - wants to pass any of the other fields to pcre_exec(), it must set up + wants to pass any of the other fields to pcre_exec(), it must set up its own pcre_extra block. - The second argument of pcre_study() contains option bits. At present, + The second argument of pcre_study() contains option bits. At present, no options are defined, and this argument should always be zero. - The third argument for pcre_study() is a pointer for an error message. - If studying succeeds (even if no data is returned), the variable it - points to is set to NULL. Otherwise it is set to point to a textual + The third argument for pcre_study() is a pointer for an error message. + If studying succeeds (even if no data is returned), the variable it + points to is set to NULL. Otherwise it is set to point to a textual error message. This is a static string that is part of the library. You - must not try to free it. You should test the error pointer for NULL + must not try to free it. You should test the error pointer for NULL after calling pcre_study(), to be sure that it has run successfully. This is a typical call to pcre_study(): @@ -1457,62 +1496,62 @@ STUDYING A PATTERN &error); /* set to NULL or points to a message */ At present, studying a pattern is useful only for non-anchored patterns - that do not have a single fixed starting character. A bitmap of possi- + that do not have a single fixed starting character. A bitmap of possi- ble starting bytes is created. LOCALE SUPPORT - PCRE handles caseless matching, and determines whether characters are - letters, digits, or whatever, by reference to a set of tables, indexed - by character value. When running in UTF-8 mode, this applies only to - characters with codes less than 128. Higher-valued codes never match - escapes such as \w or \d, but can be tested with \p if PCRE is built - with Unicode character property support. The use of locales with Uni- - code is discouraged. If you are handling characters with codes greater - than 128, you should either use UTF-8 and Unicode, or use locales, but + PCRE handles caseless matching, and determines whether characters are + letters, digits, or whatever, by reference to a set of tables, indexed + by character value. When running in UTF-8 mode, this applies only to + characters with codes less than 128. Higher-valued codes never match + escapes such as \w or \d, but can be tested with \p if PCRE is built + with Unicode character property support. The use of locales with Uni- + code is discouraged. If you are handling characters with codes greater + than 128, you should either use UTF-8 and Unicode, or use locales, but not try to mix the two. - PCRE contains an internal set of tables that are used when the final - argument of pcre_compile() is NULL. These are sufficient for many + PCRE contains an internal set of tables that are used when the final + argument of pcre_compile() is NULL. These are sufficient for many applications. Normally, the internal tables recognize only ASCII char- acters. However, when PCRE is built, it is possible to cause the inter- nal tables to be rebuilt in the default "C" locale of the local system, which may cause them to be different. - The internal tables can always be overridden by tables supplied by the + The internal tables can always be overridden by tables supplied by the application that calls PCRE. These may be created in a different locale - from the default. As more and more applications change to using Uni- + from the default. As more and more applications change to using Uni- code, the need for this locale support is expected to die away. - External tables are built by calling the pcre_maketables() function, - which has no arguments, in the relevant locale. The result can then be - passed to pcre_compile() or pcre_exec() as often as necessary. For - example, to build and use tables that are appropriate for the French - locale (where accented characters with values greater than 128 are + External tables are built by calling the pcre_maketables() function, + which has no arguments, in the relevant locale. The result can then be + passed to pcre_compile() or pcre_exec() as often as necessary. For + example, to build and use tables that are appropriate for the French + locale (where accented characters with values greater than 128 are treated as letters), the following code could be used: setlocale(LC_CTYPE, "fr_FR"); tables = pcre_maketables(); re = pcre_compile(..., tables); - The locale name "fr_FR" is used on Linux and other Unix-like systems; + The locale name "fr_FR" is used on Linux and other Unix-like systems; if you are using Windows, the name for the French locale is "french". - When pcre_maketables() runs, the tables are built in memory that is - obtained via pcre_malloc. It is the caller's responsibility to ensure - that the memory containing the tables remains available for as long as + When pcre_maketables() runs, the tables are built in memory that is + obtained via pcre_malloc. It is the caller's responsibility to ensure + that the memory containing the tables remains available for as long as it is needed. The pointer that is passed to pcre_compile() is saved with the compiled - pattern, and the same tables are used via this pointer by pcre_study() + pattern, and the same tables are used via this pointer by pcre_study() and normally also by pcre_exec(). Thus, by default, for any single pat- tern, compilation, studying and matching all happen in the same locale, but different patterns can be compiled in different locales. - It is possible to pass a table pointer or NULL (indicating the use of - the internal tables) to pcre_exec(). Although not intended for this - purpose, this facility could be used to match a pattern in a different + It is possible to pass a table pointer or NULL (indicating the use of + the internal tables) to pcre_exec(). Although not intended for this + purpose, this facility could be used to match a pattern in a different locale from the one in which it was compiled. Passing table pointers at run time is discussed below in the section on matching a pattern. @@ -1522,15 +1561,15 @@ INFORMATION ABOUT A PATTERN int pcre_fullinfo(const pcre *code, const pcre_extra *extra, int what, void *where); - The pcre_fullinfo() function returns information about a compiled pat- + The pcre_fullinfo() function returns information about a compiled pat- tern. It replaces the obsolete pcre_info() function, which is neverthe- less retained for backwards compability (and is documented below). - The first argument for pcre_fullinfo() is a pointer to the compiled - pattern. The second argument is the result of pcre_study(), or NULL if - the pattern was not studied. The third argument specifies which piece - of information is required, and the fourth argument is a pointer to a - variable to receive the data. The yield of the function is zero for + The first argument for pcre_fullinfo() is a pointer to the compiled + pattern. The second argument is the result of pcre_study(), or NULL if + the pattern was not studied. The third argument specifies which piece + of information is required, and the fourth argument is a pointer to a + variable to receive the data. The yield of the function is zero for success, or one of the following negative numbers: PCRE_ERROR_NULL the argument code was NULL @@ -1538,9 +1577,9 @@ INFORMATION ABOUT A PATTERN PCRE_ERROR_BADMAGIC the "magic number" was not found PCRE_ERROR_BADOPTION the value of what was invalid - The "magic number" is placed at the start of each compiled pattern as - an simple check against passing an arbitrary memory pointer. Here is a - typical call of pcre_fullinfo(), to obtain the length of the compiled + The "magic number" is placed at the start of each compiled pattern as + an simple check against passing an arbitrary memory pointer. Here is a + typical call of pcre_fullinfo(), to obtain the length of the compiled pattern: int rc; @@ -1551,76 +1590,76 @@ INFORMATION ABOUT A PATTERN PCRE_INFO_SIZE, /* what is required */ &length); /* where to put the data */ - The possible values for the third argument are defined in pcre.h, and + The possible values for the third argument are defined in pcre.h, and are as follows: PCRE_INFO_BACKREFMAX - Return the number of the highest back reference in the pattern. The - fourth argument should point to an int variable. Zero is returned if + Return the number of the highest back reference in the pattern. The + fourth argument should point to an int variable. Zero is returned if there are no back references. PCRE_INFO_CAPTURECOUNT - Return the number of capturing subpatterns in the pattern. The fourth + Return the number of capturing subpatterns in the pattern. The fourth argument should point to an int variable. PCRE_INFO_DEFAULT_TABLES - Return a pointer to the internal default character tables within PCRE. - The fourth argument should point to an unsigned char * variable. This + Return a pointer to the internal default character tables within PCRE. + The fourth argument should point to an unsigned char * variable. This information call is provided for internal use by the pcre_study() func- - tion. External callers can cause PCRE to use its internal tables by + tion. External callers can cause PCRE to use its internal tables by passing a NULL table pointer. PCRE_INFO_FIRSTBYTE - Return information about the first byte of any matched string, for a - non-anchored pattern. The fourth argument should point to an int vari- - able. (This option used to be called PCRE_INFO_FIRSTCHAR; the old name + Return information about the first byte of any matched string, for a + non-anchored pattern. The fourth argument should point to an int vari- + able. (This option used to be called PCRE_INFO_FIRSTCHAR; the old name is still recognized for backwards compatibility.) - If there is a fixed first byte, for example, from a pattern such as + If there is a fixed first byte, for example, from a pattern such as (cat|cow|coyote), its value is returned. Otherwise, if either - (a) the pattern was compiled with the PCRE_MULTILINE option, and every + (a) the pattern was compiled with the PCRE_MULTILINE option, and every branch starts with "^", or (b) every branch of the pattern starts with ".*" and PCRE_DOTALL is not set (if it were set, the pattern would be anchored), - -1 is returned, indicating that the pattern matches only at the start - of a subject string or after any newline within the string. Otherwise + -1 is returned, indicating that the pattern matches only at the start + of a subject string or after any newline within the string. Otherwise -2 is returned. For anchored patterns, -2 is returned. PCRE_INFO_FIRSTTABLE - If the pattern was studied, and this resulted in the construction of a + If the pattern was studied, and this resulted in the construction of a 256-bit table indicating a fixed set of bytes for the first byte in any - matching string, a pointer to the table is returned. Otherwise NULL is - returned. The fourth argument should point to an unsigned char * vari- + matching string, a pointer to the table is returned. Otherwise NULL is + returned. The fourth argument should point to an unsigned char * vari- able. PCRE_INFO_HASCRORLF - Return 1 if the pattern contains any explicit matches for CR or LF - characters, otherwise 0. The fourth argument should point to an int - variable. An explicit match is either a literal CR or LF character, or + Return 1 if the pattern contains any explicit matches for CR or LF + characters, otherwise 0. The fourth argument should point to an int + variable. An explicit match is either a literal CR or LF character, or \r or \n. PCRE_INFO_JCHANGED - Return 1 if the (?J) or (?-J) option setting is used in the pattern, - otherwise 0. The fourth argument should point to an int variable. (?J) + Return 1 if the (?J) or (?-J) option setting is used in the pattern, + otherwise 0. The fourth argument should point to an int variable. (?J) and (?-J) set and unset the local PCRE_DUPNAMES option, respectively. PCRE_INFO_LASTLITERAL - Return the value of the rightmost literal byte that must exist in any - matched string, other than at its start, if such a byte has been + Return the value of the rightmost literal byte that must exist in any + matched string, other than at its start, if such a byte has been recorded. The fourth argument should point to an int variable. If there - is no such byte, -1 is returned. For anchored patterns, a last literal - byte is recorded only if it follows something of variable length. For + is no such byte, -1 is returned. For anchored patterns, a last literal + byte is recorded only if it follows something of variable length. For example, for the pattern /^a\d+z\d+/ the returned value is "z", but for /^a\dz\d/ the returned value is -1. @@ -1628,34 +1667,34 @@ INFORMATION ABOUT A PATTERN PCRE_INFO_NAMEENTRYSIZE PCRE_INFO_NAMETABLE - PCRE supports the use of named as well as numbered capturing parenthe- - ses. The names are just an additional way of identifying the parenthe- + PCRE supports the use of named as well as numbered capturing parenthe- + ses. The names are just an additional way of identifying the parenthe- ses, which still acquire numbers. Several convenience functions such as - pcre_get_named_substring() are provided for extracting captured sub- - strings by name. It is also possible to extract the data directly, by - first converting the name to a number in order to access the correct + pcre_get_named_substring() are provided for extracting captured sub- + strings by name. It is also possible to extract the data directly, by + first converting the name to a number in order to access the correct pointers in the output vector (described with pcre_exec() below). To do - the conversion, you need to use the name-to-number map, which is + the conversion, you need to use the name-to-number map, which is described by these three values. The map consists of a number of fixed-size entries. PCRE_INFO_NAMECOUNT gives the number of entries, and PCRE_INFO_NAMEENTRYSIZE gives the size - of each entry; both of these return an int value. The entry size - depends on the length of the longest name. PCRE_INFO_NAMETABLE returns - a pointer to the first entry of the table (a pointer to char). The + of each entry; both of these return an int value. The entry size + depends on the length of the longest name. PCRE_INFO_NAMETABLE returns + a pointer to the first entry of the table (a pointer to char). The first two bytes of each entry are the number of the capturing parenthe- - sis, most significant byte first. The rest of the entry is the corre- - sponding name, zero terminated. The names are in alphabetical order. + sis, most significant byte first. The rest of the entry is the corre- + sponding name, zero terminated. The names are in alphabetical order. When PCRE_DUPNAMES is set, duplicate names are in order of their paren- - theses numbers. For example, consider the following pattern (assume - PCRE_EXTENDED is set, so white space - including newlines - is + theses numbers. For example, consider the following pattern (assume + PCRE_EXTENDED is set, so white space - including newlines - is ignored): (? (?(\d\d)?\d\d) - (?\d\d) - (?\d\d) ) - There are four named subpatterns, so the table has four entries, and - each entry in the table is eight bytes long. The table is as follows, + There are four named subpatterns, so the table has four entries, and + each entry in the table is eight bytes long. The table is as follows, with non-printing bytes shows in hexadecimal, and undefined bytes shown as ??: @@ -1664,29 +1703,29 @@ INFORMATION ABOUT A PATTERN 00 04 m o n t h 00 00 02 y e a r 00 ?? - When writing code to extract data from named subpatterns using the - name-to-number map, remember that the length of the entries is likely + When writing code to extract data from named subpatterns using the + name-to-number map, remember that the length of the entries is likely to be different for each compiled pattern. PCRE_INFO_OKPARTIAL - Return 1 if the pattern can be used for partial matching, otherwise 0. - The fourth argument should point to an int variable. The pcrepartial - documentation lists the restrictions that apply to patterns when par- + Return 1 if the pattern can be used for partial matching, otherwise 0. + The fourth argument should point to an int variable. The pcrepartial + documentation lists the restrictions that apply to patterns when par- tial matching is used. PCRE_INFO_OPTIONS - Return a copy of the options with which the pattern was compiled. The - fourth argument should point to an unsigned long int variable. These + Return a copy of the options with which the pattern was compiled. The + fourth argument should point to an unsigned long int variable. These option bits are those specified in the call to pcre_compile(), modified by any top-level option settings at the start of the pattern itself. In - other words, they are the options that will be in force when matching - starts. For example, if the pattern /(?im)abc(?-i)d/ is compiled with - the PCRE_EXTENDED option, the result is PCRE_CASELESS, PCRE_MULTILINE, + other words, they are the options that will be in force when matching + starts. For example, if the pattern /(?im)abc(?-i)d/ is compiled with + the PCRE_EXTENDED option, the result is PCRE_CASELESS, PCRE_MULTILINE, and PCRE_EXTENDED. - A pattern is automatically anchored by PCRE if all of its top-level + A pattern is automatically anchored by PCRE if all of its top-level alternatives begin with one of the following: ^ unless PCRE_MULTILINE is set @@ -1700,7 +1739,7 @@ INFORMATION ABOUT A PATTERN PCRE_INFO_SIZE - Return the size of the compiled pattern, that is, the value that was + Return the size of the compiled pattern, that is, the value that was passed as the argument to pcre_malloc() when PCRE was getting memory in which to place the compiled data. The fourth argument should point to a size_t variable. @@ -1708,9 +1747,9 @@ INFORMATION ABOUT A PATTERN PCRE_INFO_STUDYSIZE Return the size of the data block pointed to by the study_data field in - a pcre_extra block. That is, it is the value that was passed to + a pcre_extra block. That is, it is the value that was passed to pcre_malloc() when PCRE was getting memory into which to place the data - created by pcre_study(). The fourth argument should point to a size_t + created by pcre_study(). The fourth argument should point to a size_t variable. @@ -1718,21 +1757,21 @@ OBSOLETE INFO FUNCTION int pcre_info(const pcre *code, int *optptr, int *firstcharptr); - The pcre_info() function is now obsolete because its interface is too - restrictive to return all the available data about a compiled pattern. - New programs should use pcre_fullinfo() instead. The yield of - pcre_info() is the number of capturing subpatterns, or one of the fol- + The pcre_info() function is now obsolete because its interface is too + restrictive to return all the available data about a compiled pattern. + New programs should use pcre_fullinfo() instead. The yield of + pcre_info() is the number of capturing subpatterns, or one of the fol- lowing negative numbers: PCRE_ERROR_NULL the argument code was NULL PCRE_ERROR_BADMAGIC the "magic number" was not found - If the optptr argument is not NULL, a copy of the options with which - the pattern was compiled is placed in the integer it points to (see + If the optptr argument is not NULL, a copy of the options with which + the pattern was compiled is placed in the integer it points to (see PCRE_INFO_OPTIONS above). - If the pattern is not anchored and the firstcharptr argument is not - NULL, it is used to pass back information about the first character of + If the pattern is not anchored and the firstcharptr argument is not + NULL, it is used to pass back information about the first character of any matched string (see PCRE_INFO_FIRSTBYTE above). @@ -1740,21 +1779,21 @@ REFERENCE COUNTS int pcre_refcount(pcre *code, int adjust); - The pcre_refcount() function is used to maintain a reference count in + The pcre_refcount() function is used to maintain a reference count in the data block that contains a compiled pattern. It is provided for the - benefit of applications that operate in an object-oriented manner, + benefit of applications that operate in an object-oriented manner, where different parts of the application may be using the same compiled pattern, but you want to free the block when they are all done. When a pattern is compiled, the reference count field is initialized to - zero. It is changed only by calling this function, whose action is to - add the adjust value (which may be positive or negative) to it. The + zero. It is changed only by calling this function, whose action is to + add the adjust value (which may be positive or negative) to it. The yield of the function is the new value. However, the value of the count - is constrained to lie between 0 and 65535, inclusive. If the new value + is constrained to lie between 0 and 65535, inclusive. If the new value is outside these limits, it is forced to the appropriate limit value. - Except when it is zero, the reference count is not correctly preserved - if a pattern is compiled on one host and then transferred to a host + Except when it is zero, the reference count is not correctly preserved + if a pattern is compiled on one host and then transferred to a host whose byte-order is different. (This seems a highly unlikely scenario.) @@ -1764,18 +1803,18 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION const char *subject, int length, int startoffset, int options, int *ovector, int ovecsize); - The function pcre_exec() is called to match a subject string against a - compiled pattern, which is passed in the code argument. If the pattern + The function pcre_exec() is called to match a subject string against a + compiled pattern, which is passed in the code argument. If the pattern has been studied, the result of the study should be passed in the extra - argument. This function is the main matching facility of the library, + argument. This function is the main matching facility of the library, and it operates in a Perl-like manner. For specialist use there is also - an alternative matching function, which is described below in the sec- + an alternative matching function, which is described below in the sec- tion about the pcre_dfa_exec() function. - In most applications, the pattern will have been compiled (and option- - ally studied) in the same process that calls pcre_exec(). However, it + In most applications, the pattern will have been compiled (and option- + ally studied) in the same process that calls pcre_exec(). However, it is possible to save compiled patterns and study data, and then use them - later in different processes, possibly even on different hosts. For a + later in different processes, possibly even on different hosts. For a discussion about this, see the pcreprecompile documentation. Here is an example of a simple call to pcre_exec(): @@ -1794,10 +1833,10 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION Extra data for pcre_exec() - If the extra argument is not NULL, it must point to a pcre_extra data - block. The pcre_study() function returns such a block (when it doesn't - return NULL), but you can also create one for yourself, and pass addi- - tional information in it. The pcre_extra block contains the following + If the extra argument is not NULL, it must point to a pcre_extra data + block. The pcre_study() function returns such a block (when it doesn't + return NULL), but you can also create one for yourself, and pass addi- + tional information in it. The pcre_extra block contains the following fields (not necessarily in this order): unsigned long int flags; @@ -1807,7 +1846,7 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION void *callout_data; const unsigned char *tables; - The flags field is a bitmap that specifies which of the other fields + The flags field is a bitmap that specifies which of the other fields are set. The flag bits are: PCRE_EXTRA_STUDY_DATA @@ -1816,83 +1855,83 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION PCRE_EXTRA_CALLOUT_DATA PCRE_EXTRA_TABLES - Other flag bits should be set to zero. The study_data field is set in - the pcre_extra block that is returned by pcre_study(), together with + Other flag bits should be set to zero. The study_data field is set in + the pcre_extra block that is returned by pcre_study(), together with the appropriate flag bit. You should not set this yourself, but you may - add to the block by setting the other fields and their corresponding + add to the block by setting the other fields and their corresponding flag bits. The match_limit field provides a means of preventing PCRE from using up - a vast amount of resources when running patterns that are not going to - match, but which have a very large number of possibilities in their - search trees. The classic example is the use of nested unlimited + a vast amount of resources when running patterns that are not going to + match, but which have a very large number of possibilities in their + search trees. The classic example is the use of nested unlimited repeats. - Internally, PCRE uses a function called match() which it calls repeat- - edly (sometimes recursively). The limit set by match_limit is imposed - on the number of times this function is called during a match, which - has the effect of limiting the amount of backtracking that can take + Internally, PCRE uses a function called match() which it calls repeat- + edly (sometimes recursively). The limit set by match_limit is imposed + on the number of times this function is called during a match, which + has the effect of limiting the amount of backtracking that can take place. For patterns that are not anchored, the count restarts from zero for each position in the subject string. - The default value for the limit can be set when PCRE is built; the - default default is 10 million, which handles all but the most extreme - cases. You can override the default by suppling pcre_exec() with a - pcre_extra block in which match_limit is set, and - PCRE_EXTRA_MATCH_LIMIT is set in the flags field. If the limit is + The default value for the limit can be set when PCRE is built; the + default default is 10 million, which handles all but the most extreme + cases. You can override the default by suppling pcre_exec() with a + pcre_extra block in which match_limit is set, and + PCRE_EXTRA_MATCH_LIMIT is set in the flags field. If the limit is exceeded, pcre_exec() returns PCRE_ERROR_MATCHLIMIT. - The match_limit_recursion field is similar to match_limit, but instead + The match_limit_recursion field is similar to match_limit, but instead of limiting the total number of times that match() is called, it limits - the depth of recursion. The recursion depth is a smaller number than - the total number of calls, because not all calls to match() are recur- + the depth of recursion. The recursion depth is a smaller number than + the total number of calls, because not all calls to match() are recur- sive. This limit is of use only if it is set smaller than match_limit. - Limiting the recursion depth limits the amount of stack that can be + Limiting the recursion depth limits the amount of stack that can be used, or, when PCRE has been compiled to use memory on the heap instead of the stack, the amount of heap memory that can be used. - The default value for match_limit_recursion can be set when PCRE is - built; the default default is the same value as the default for - match_limit. You can override the default by suppling pcre_exec() with - a pcre_extra block in which match_limit_recursion is set, and - PCRE_EXTRA_MATCH_LIMIT_RECURSION is set in the flags field. If the + The default value for match_limit_recursion can be set when PCRE is + built; the default default is the same value as the default for + match_limit. You can override the default by suppling pcre_exec() with + a pcre_extra block in which match_limit_recursion is set, and + PCRE_EXTRA_MATCH_LIMIT_RECURSION is set in the flags field. If the limit is exceeded, pcre_exec() returns PCRE_ERROR_RECURSIONLIMIT. - The pcre_callout field is used in conjunction with the "callout" fea- + The pcre_callout field is used in conjunction with the "callout" fea- ture, which is described in the pcrecallout documentation. - The tables field is used to pass a character tables pointer to - pcre_exec(); this overrides the value that is stored with the compiled - pattern. A non-NULL value is stored with the compiled pattern only if - custom tables were supplied to pcre_compile() via its tableptr argu- + The tables field is used to pass a character tables pointer to + pcre_exec(); this overrides the value that is stored with the compiled + pattern. A non-NULL value is stored with the compiled pattern only if + custom tables were supplied to pcre_compile() via its tableptr argu- ment. If NULL is passed to pcre_exec() using this mechanism, it forces - PCRE's internal tables to be used. This facility is helpful when re- - using patterns that have been saved after compiling with an external - set of tables, because the external tables might be at a different - address when pcre_exec() is called. See the pcreprecompile documenta- + PCRE's internal tables to be used. This facility is helpful when re- + using patterns that have been saved after compiling with an external + set of tables, because the external tables might be at a different + address when pcre_exec() is called. See the pcreprecompile documenta- tion for a discussion of saving compiled patterns for later use. Option bits for pcre_exec() - The unused bits of the options argument for pcre_exec() must be zero. - The only bits that may be set are PCRE_ANCHORED, PCRE_NEWLINE_xxx, + The unused bits of the options argument for pcre_exec() must be zero. + The only bits that may be set are PCRE_ANCHORED, PCRE_NEWLINE_xxx, PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NO_UTF8_CHECK and PCRE_PARTIAL. PCRE_ANCHORED - The PCRE_ANCHORED option limits pcre_exec() to matching at the first - matching position. If a pattern was compiled with PCRE_ANCHORED, or - turned out to be anchored by virtue of its contents, it cannot be made + The PCRE_ANCHORED option limits pcre_exec() to matching at the first + matching position. If a pattern was compiled with PCRE_ANCHORED, or + turned out to be anchored by virtue of its contents, it cannot be made unachored at matching time. PCRE_BSR_ANYCRLF PCRE_BSR_UNICODE These options (which are mutually exclusive) control what the \R escape - sequence matches. The choice is either to match only CR, LF, or CRLF, - or to match any Unicode newline sequence. These options override the + sequence matches. The choice is either to match only CR, LF, or CRLF, + or to match any Unicode newline sequence. These options override the choice that was made or defaulted when the pattern was compiled. PCRE_NEWLINE_CR @@ -1901,118 +1940,119 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION PCRE_NEWLINE_ANYCRLF PCRE_NEWLINE_ANY - These options override the newline definition that was chosen or - defaulted when the pattern was compiled. For details, see the descrip- - tion of pcre_compile() above. During matching, the newline choice - affects the behaviour of the dot, circumflex, and dollar metacharac- - ters. It may also alter the way the match position is advanced after a + These options override the newline definition that was chosen or + defaulted when the pattern was compiled. For details, see the descrip- + tion of pcre_compile() above. During matching, the newline choice + affects the behaviour of the dot, circumflex, and dollar metacharac- + ters. It may also alter the way the match position is advanced after a match failure for an unanchored pattern. - When PCRE_NEWLINE_CRLF, PCRE_NEWLINE_ANYCRLF, or PCRE_NEWLINE_ANY is - set, and a match attempt for an unanchored pattern fails when the cur- - rent position is at a CRLF sequence, and the pattern contains no - explicit matches for CR or LF characters, the match position is + When PCRE_NEWLINE_CRLF, PCRE_NEWLINE_ANYCRLF, or PCRE_NEWLINE_ANY is + set, and a match attempt for an unanchored pattern fails when the cur- + rent position is at a CRLF sequence, and the pattern contains no + explicit matches for CR or LF characters, the match position is advanced by two characters instead of one, in other words, to after the CRLF. The above rule is a compromise that makes the most common cases work as - expected. For example, if the pattern is .+A (and the PCRE_DOTALL + expected. For example, if the pattern is .+A (and the PCRE_DOTALL option is not set), it does not match the string "\r\nA" because, after - failing at the start, it skips both the CR and the LF before retrying. - However, the pattern [\r\n]A does match that string, because it con- + failing at the start, it skips both the CR and the LF before retrying. + However, the pattern [\r\n]A does match that string, because it con- tains an explicit CR or LF reference, and so advances only by one char- acter after the first failure. An explicit match for CR of LF is either a literal appearance of one of - those characters, or one of the \r or \n escape sequences. Implicit - matches such as [^X] do not count, nor does \s (which includes CR and + those characters, or one of the \r or \n escape sequences. Implicit + matches such as [^X] do not count, nor does \s (which includes CR and LF in the characters that it matches). - Notwithstanding the above, anomalous effects may still occur when CRLF + Notwithstanding the above, anomalous effects may still occur when CRLF is a valid newline sequence and explicit \r or \n escapes appear in the pattern. PCRE_NOTBOL This option specifies that first character of the subject string is not - the beginning of a line, so the circumflex metacharacter should not - match before it. Setting this without PCRE_MULTILINE (at compile time) - causes circumflex never to match. This option affects only the behav- + the beginning of a line, so the circumflex metacharacter should not + match before it. Setting this without PCRE_MULTILINE (at compile time) + causes circumflex never to match. This option affects only the behav- iour of the circumflex metacharacter. It does not affect \A. PCRE_NOTEOL This option specifies that the end of the subject string is not the end - of a line, so the dollar metacharacter should not match it nor (except - in multiline mode) a newline immediately before it. Setting this with- + of a line, so the dollar metacharacter should not match it nor (except + in multiline mode) a newline immediately before it. Setting this with- out PCRE_MULTILINE (at compile time) causes dollar never to match. This - option affects only the behaviour of the dollar metacharacter. It does + option affects only the behaviour of the dollar metacharacter. It does not affect \Z or \z. PCRE_NOTEMPTY An empty string is not considered to be a valid match if this option is - set. If there are alternatives in the pattern, they are tried. If all - the alternatives match the empty string, the entire match fails. For + set. If there are alternatives in the pattern, they are tried. If all + the alternatives match the empty string, the entire match fails. For example, if the pattern a?b? - is applied to a string not beginning with "a" or "b", it matches the - empty string at the start of the subject. With PCRE_NOTEMPTY set, this + is applied to a string not beginning with "a" or "b", it matches the + empty string at the start of the subject. With PCRE_NOTEMPTY set, this match is not valid, so PCRE searches further into the string for occur- rences of "a" or "b". Perl has no direct equivalent of PCRE_NOTEMPTY, but it does make a spe- - cial case of a pattern match of the empty string within its split() - function, and when using the /g modifier. It is possible to emulate + cial case of a pattern match of the empty string within its split() + function, and when using the /g modifier. It is possible to emulate Perl's behaviour after matching a null string by first trying the match again at the same offset with PCRE_NOTEMPTY and PCRE_ANCHORED, and then - if that fails by advancing the starting offset (see below) and trying + if that fails by advancing the starting offset (see below) and trying an ordinary match again. There is some code that demonstrates how to do this in the pcredemo.c sample program. PCRE_NO_UTF8_CHECK When PCRE_UTF8 is set at compile time, the validity of the subject as a - UTF-8 string is automatically checked when pcre_exec() is subsequently - called. The value of startoffset is also checked to ensure that it - points to the start of a UTF-8 character. There is a discussion about - the validity of UTF-8 strings in the section on UTF-8 support in the - main pcre page. If an invalid UTF-8 sequence of bytes is found, - pcre_exec() returns the error PCRE_ERROR_BADUTF8. If startoffset con- + UTF-8 string is automatically checked when pcre_exec() is subsequently + called. The value of startoffset is also checked to ensure that it + points to the start of a UTF-8 character. There is a discussion about + the validity of UTF-8 strings in the section on UTF-8 support in the + main pcre page. If an invalid UTF-8 sequence of bytes is found, + pcre_exec() returns the error PCRE_ERROR_BADUTF8. If startoffset con- tains an invalid value, PCRE_ERROR_BADUTF8_OFFSET is returned. - If you already know that your subject is valid, and you want to skip - these checks for performance reasons, you can set the - PCRE_NO_UTF8_CHECK option when calling pcre_exec(). You might want to - do this for the second and subsequent calls to pcre_exec() if you are - making repeated calls to find all the matches in a single subject - string. However, you should be sure that the value of startoffset - points to the start of a UTF-8 character. When PCRE_NO_UTF8_CHECK is - set, the effect of passing an invalid UTF-8 string as a subject, or a - value of startoffset that does not point to the start of a UTF-8 char- + If you already know that your subject is valid, and you want to skip + these checks for performance reasons, you can set the + PCRE_NO_UTF8_CHECK option when calling pcre_exec(). You might want to + do this for the second and subsequent calls to pcre_exec() if you are + making repeated calls to find all the matches in a single subject + string. However, you should be sure that the value of startoffset + points to the start of a UTF-8 character. When PCRE_NO_UTF8_CHECK is + set, the effect of passing an invalid UTF-8 string as a subject, or a + value of startoffset that does not point to the start of a UTF-8 char- acter, is undefined. Your program may crash. PCRE_PARTIAL - This option turns on the partial matching feature. If the subject - string fails to match the pattern, but at some point during the match- - ing process the end of the subject was reached (that is, the subject - partially matches the pattern and the failure to match occurred only - because there were not enough subject characters), pcre_exec() returns - PCRE_ERROR_PARTIAL instead of PCRE_ERROR_NOMATCH. When PCRE_PARTIAL is - used, there are restrictions on what may appear in the pattern. These + This option turns on the partial matching feature. If the subject + string fails to match the pattern, but at some point during the match- + ing process the end of the subject was reached (that is, the subject + partially matches the pattern and the failure to match occurred only + because there were not enough subject characters), pcre_exec() returns + PCRE_ERROR_PARTIAL instead of PCRE_ERROR_NOMATCH. When PCRE_PARTIAL is + used, there are restrictions on what may appear in the pattern. These are discussed in the pcrepartial documentation. The string to be matched by pcre_exec() - The subject string is passed to pcre_exec() as a pointer in subject, a - length in length, and a starting byte offset in startoffset. In UTF-8 - mode, the byte offset must point to the start of a UTF-8 character. - Unlike the pattern string, the subject may contain binary zero bytes. - When the starting offset is zero, the search for a match starts at the - beginning of the subject, and this is by far the most common case. + The subject string is passed to pcre_exec() as a pointer in subject, a + length (in bytes) in length, and a starting byte offset in startoffset. + In UTF-8 mode, the byte offset must point to the start of a UTF-8 char- + acter. Unlike the pattern string, the subject may contain binary zero + bytes. When the starting offset is zero, the search for a match starts + at the beginning of the subject, and this is by far the most common + case. A non-zero starting offset is useful when searching for another match in the same subject by calling pcre_exec() again after a previous suc- @@ -2048,70 +2088,73 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION string. PCRE supports several other kinds of parenthesized subpattern that do not cause substrings to be captured. - Captured substrings are returned to the caller via a vector of integer - offsets whose address is passed in ovector. The number of elements in - the vector is passed in ovecsize, which must be a non-negative number. - Note: this argument is NOT the size of ovector in bytes. + Captured substrings are returned to the caller via a vector of integers + whose address is passed in ovector. The number of elements in the vec- + tor is passed in ovecsize, which must be a non-negative number. Note: + this argument is NOT the size of ovector in bytes. The first two-thirds of the vector is used to pass back captured sub- strings, each substring using a pair of integers. The remaining third of the vector is used as workspace by pcre_exec() while matching cap- turing subpatterns, and is not available for passing back information. - The length passed in ovecsize should always be a multiple of three. If + The number passed in ovecsize should always be a multiple of three. If it is not, it is rounded down. When a match is successful, information about captured substrings is returned in pairs of integers, starting at the beginning of ovector, and continuing up to two-thirds of its length at the most. The first - element of a pair is set to the offset of the first character in a sub- - string, and the second is set to the offset of the first character - after the end of a substring. The first pair, ovector[0] and ovec- - tor[1], identify the portion of the subject string matched by the - entire pattern. The next pair is used for the first capturing subpat- - tern, and so on. The value returned by pcre_exec() is one more than the - highest numbered pair that has been set. For example, if two substrings - have been captured, the returned value is 3. If there are no capturing - subpatterns, the return value from a successful match is 1, indicating - that just the first pair of offsets has been set. + element of each pair is set to the byte offset of the first character + in a substring, and the second is set to the byte offset of the first + character after the end of a substring. Note: these values are always + byte offsets, even in UTF-8 mode. They are not character counts. + + The first pair of integers, ovector[0] and ovector[1], identify the + portion of the subject string matched by the entire pattern. The next + pair is used for the first capturing subpattern, and so on. The value + returned by pcre_exec() is one more than the highest numbered pair that + has been set. For example, if two substrings have been captured, the + returned value is 3. If there are no capturing subpatterns, the return + value from a successful match is 1, indicating that just the first pair + of offsets has been set. If a capturing subpattern is matched repeatedly, it is the last portion of the string that it matched that is returned. - If the vector is too small to hold all the captured substring offsets, + If the vector is too small to hold all the captured substring offsets, it is used as far as possible (up to two-thirds of its length), and the - function returns a value of zero. In particular, if the substring off- - sets are not of interest, pcre_exec() may be called with ovector passed - as NULL and ovecsize as zero. However, if the pattern contains back - references and the ovector is not big enough to remember the related - substrings, PCRE has to get additional memory for use during matching. - Thus it is usually advisable to supply an ovector. - - The pcre_info() function can be used to find out how many capturing - subpatterns there are in a compiled pattern. The smallest size for - ovector that will allow for n captured substrings, in addition to the + function returns a value of zero. If the substring offsets are not of + interest, pcre_exec() may be called with ovector passed as NULL and + ovecsize as zero. However, if the pattern contains back references and + the ovector is not big enough to remember the related substrings, PCRE + has to get additional memory for use during matching. Thus it is usu- + ally advisable to supply an ovector. + + The pcre_info() function can be used to find out how many capturing + subpatterns there are in a compiled pattern. The smallest size for + ovector that will allow for n captured substrings, in addition to the offsets of the substring matched by the whole pattern, is (n+1)*3. - It is possible for capturing subpattern number n+1 to match some part + It is possible for capturing subpattern number n+1 to match some part of the subject when subpattern n has not been used at all. For example, - if the string "abc" is matched against the pattern (a|(z))(bc) the + if the string "abc" is matched against the pattern (a|(z))(bc) the return from the function is 4, and subpatterns 1 and 3 are matched, but - 2 is not. When this happens, both values in the offset pairs corre- + 2 is not. When this happens, both values in the offset pairs corre- sponding to unused subpatterns are set to -1. - Offset values that correspond to unused subpatterns at the end of the - expression are also set to -1. For example, if the string "abc" is - matched against the pattern (abc)(x(yz)?)? subpatterns 2 and 3 are not - matched. The return from the function is 2, because the highest used + Offset values that correspond to unused subpatterns at the end of the + expression are also set to -1. For example, if the string "abc" is + matched against the pattern (abc)(x(yz)?)? subpatterns 2 and 3 are not + matched. The return from the function is 2, because the highest used capturing subpattern number is 1. However, you can refer to the offsets - for the second and third capturing subpatterns if you wish (assuming + for the second and third capturing subpatterns if you wish (assuming the vector is large enough, of course). - Some convenience functions are provided for extracting the captured + Some convenience functions are provided for extracting the captured substrings as separate strings. These are described below. Error return values from pcre_exec() - If pcre_exec() fails, it returns a negative number. The following are + If pcre_exec() fails, it returns a negative number. The following are defined in the header file: PCRE_ERROR_NOMATCH (-1) @@ -2120,7 +2163,7 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION PCRE_ERROR_NULL (-2) - Either code or subject was passed as NULL, or ovector was NULL and + Either code or subject was passed as NULL, or ovector was NULL and ovecsize was not zero. PCRE_ERROR_BADOPTION (-3) @@ -2129,79 +2172,79 @@ MATCHING A PATTERN: THE TRADITIONAL FUNCTION PCRE_ERROR_BADMAGIC (-4) - PCRE stores a 4-byte "magic number" at the start of the compiled code, + PCRE stores a 4-byte "magic number" at the start of the compiled code, to catch the case when it is passed a junk pointer and to detect when a pattern that was compiled in an environment of one endianness is run in - an environment with the other endianness. This is the error that PCRE + an environment with the other endianness. This is the error that PCRE gives when the magic number is not present. PCRE_ERROR_UNKNOWN_OPCODE (-5) While running the pattern match, an unknown item was encountered in the - compiled pattern. This error could be caused by a bug in PCRE or by + compiled pattern. This error could be caused by a bug in PCRE or by overwriting of the compiled pattern. PCRE_ERROR_NOMEMORY (-6) - If a pattern contains back references, but the ovector that is passed + If a pattern contains back references, but the ovector that is passed to pcre_exec() is not big enough to remember the referenced substrings, - PCRE gets a block of memory at the start of matching to use for this - purpose. If the call via pcre_malloc() fails, this error is given. The + PCRE gets a block of memory at the start of matching to use for this + purpose. If the call via pcre_malloc() fails, this error is given. The memory is automatically freed at the end of matching. PCRE_ERROR_NOSUBSTRING (-7) - This error is used by the pcre_copy_substring(), pcre_get_substring(), + This error is used by the pcre_copy_substring(), pcre_get_substring(), and pcre_get_substring_list() functions (see below). It is never returned by pcre_exec(). PCRE_ERROR_MATCHLIMIT (-8) - The backtracking limit, as specified by the match_limit field in a - pcre_extra structure (or defaulted) was reached. See the description + The backtracking limit, as specified by the match_limit field in a + pcre_extra structure (or defaulted) was reached. See the description above. PCRE_ERROR_CALLOUT (-9) This error is never generated by pcre_exec() itself. It is provided for - use by callout functions that want to yield a distinctive error code. + use by callout functions that want to yield a distinctive error code. See the pcrecallout documentation for details. PCRE_ERROR_BADUTF8 (-10) - A string that contains an invalid UTF-8 byte sequence was passed as a + A string that contains an invalid UTF-8 byte sequence was passed as a subject. PCRE_ERROR_BADUTF8_OFFSET (-11) The UTF-8 byte sequence that was passed as a subject was valid, but the - value of startoffset did not point to the beginning of a UTF-8 charac- + value of startoffset did not point to the beginning of a UTF-8 charac- ter. PCRE_ERROR_PARTIAL (-12) - The subject string did not match, but it did match partially. See the + The subject string did not match, but it did match partially. See the pcrepartial documentation for details of partial matching. PCRE_ERROR_BADPARTIAL (-13) - The PCRE_PARTIAL option was used with a compiled pattern containing - items that are not supported for partial matching. See the pcrepartial + The PCRE_PARTIAL option was used with a compiled pattern containing + items that are not supported for partial matching. See the pcrepartial documentation for details of partial matching. PCRE_ERROR_INTERNAL (-14) - An unexpected internal error has occurred. This error could be caused + An unexpected internal error has occurred. This error could be caused by a bug in PCRE or by overwriting of the compiled pattern. PCRE_ERROR_BADCOUNT (-15) - This error is given if the value of the ovecsize argument is negative. + This error is given if the value of the ovecsize argument is negative. PCRE_ERROR_RECURSIONLIMIT (-21) The internal recursion limit, as specified by the match_limit_recursion - field in a pcre_extra structure (or defaulted) was reached. See the + field in a pcre_extra structure (or defaulted) was reached. See the description above. PCRE_ERROR_BADNEWLINE (-23) @@ -2224,78 +2267,78 @@ EXTRACTING CAPTURED SUBSTRINGS BY NUMBER int pcre_get_substring_list(const char *subject, int *ovector, int stringcount, const char ***listptr); - Captured substrings can be accessed directly by using the offsets - returned by pcre_exec() in ovector. For convenience, the functions + Captured substrings can be accessed directly by using the offsets + returned by pcre_exec() in ovector. For convenience, the functions pcre_copy_substring(), pcre_get_substring(), and pcre_get_sub- - string_list() are provided for extracting captured substrings as new, - separate, zero-terminated strings. These functions identify substrings - by number. The next section describes functions for extracting named + string_list() are provided for extracting captured substrings as new, + separate, zero-terminated strings. These functions identify substrings + by number. The next section describes functions for extracting named substrings. - A substring that contains a binary zero is correctly extracted and has - a further zero added on the end, but the result is not, of course, a C - string. However, you can process such a string by referring to the - length that is returned by pcre_copy_substring() and pcre_get_sub- + A substring that contains a binary zero is correctly extracted and has + a further zero added on the end, but the result is not, of course, a C + string. However, you can process such a string by referring to the + length that is returned by pcre_copy_substring() and pcre_get_sub- string(). Unfortunately, the interface to pcre_get_substring_list() is - not adequate for handling strings containing binary zeros, because the + not adequate for handling strings containing binary zeros, because the end of the final string is not independently indicated. - The first three arguments are the same for all three of these func- - tions: subject is the subject string that has just been successfully + The first three arguments are the same for all three of these func- + tions: subject is the subject string that has just been successfully matched, ovector is a pointer to the vector of integer offsets that was passed to pcre_exec(), and stringcount is the number of substrings that - were captured by the match, including the substring that matched the + were captured by the match, including the substring that matched the entire regular expression. This is the value returned by pcre_exec() if - it is greater than zero. If pcre_exec() returned zero, indicating that - it ran out of space in ovector, the value passed as stringcount should + it is greater than zero. If pcre_exec() returned zero, indicating that + it ran out of space in ovector, the value passed as stringcount should be the number of elements in the vector divided by three. - The functions pcre_copy_substring() and pcre_get_substring() extract a - single substring, whose number is given as stringnumber. A value of - zero extracts the substring that matched the entire pattern, whereas - higher values extract the captured substrings. For pcre_copy_sub- - string(), the string is placed in buffer, whose length is given by - buffersize, while for pcre_get_substring() a new block of memory is - obtained via pcre_malloc, and its address is returned via stringptr. - The yield of the function is the length of the string, not including + The functions pcre_copy_substring() and pcre_get_substring() extract a + single substring, whose number is given as stringnumber. A value of + zero extracts the substring that matched the entire pattern, whereas + higher values extract the captured substrings. For pcre_copy_sub- + string(), the string is placed in buffer, whose length is given by + buffersize, while for pcre_get_substring() a new block of memory is + obtained via pcre_malloc, and its address is returned via stringptr. + The yield of the function is the length of the string, not including the terminating zero, or one of these error codes: PCRE_ERROR_NOMEMORY (-6) - The buffer was too small for pcre_copy_substring(), or the attempt to + The buffer was too small for pcre_copy_substring(), or the attempt to get memory failed for pcre_get_substring(). PCRE_ERROR_NOSUBSTRING (-7) There is no substring whose number is stringnumber. - The pcre_get_substring_list() function extracts all available sub- - strings and builds a list of pointers to them. All this is done in a + The pcre_get_substring_list() function extracts all available sub- + strings and builds a list of pointers to them. All this is done in a single block of memory that is obtained via pcre_malloc. The address of - the memory block is returned via listptr, which is also the start of - the list of string pointers. The end of the list is marked by a NULL - pointer. The yield of the function is zero if all went well, or the + the memory block is returned via listptr, which is also the start of + the list of string pointers. The end of the list is marked by a NULL + pointer. The yield of the function is zero if all went well, or the error code PCRE_ERROR_NOMEMORY (-6) if the attempt to get the memory block failed. - When any of these functions encounter a substring that is unset, which - can happen when capturing subpattern number n+1 matches some part of - the subject, but subpattern n has not been used at all, they return an + When any of these functions encounter a substring that is unset, which + can happen when capturing subpattern number n+1 matches some part of + the subject, but subpattern n has not been used at all, they return an empty string. This can be distinguished from a genuine zero-length sub- - string by inspecting the appropriate offset in ovector, which is nega- + string by inspecting the appropriate offset in ovector, which is nega- tive for unset substrings. - The two convenience functions pcre_free_substring() and pcre_free_sub- - string_list() can be used to free the memory returned by a previous + The two convenience functions pcre_free_substring() and pcre_free_sub- + string_list() can be used to free the memory returned by a previous call of pcre_get_substring() or pcre_get_substring_list(), respec- - tively. They do nothing more than call the function pointed to by - pcre_free, which of course could be called directly from a C program. - However, PCRE is used in some situations where it is linked via a spe- - cial interface to another programming language that cannot use - pcre_free directly; it is for these cases that the functions are pro- + tively. They do nothing more than call the function pointed to by + pcre_free, which of course could be called directly from a C program. + However, PCRE is used in some situations where it is linked via a spe- + cial interface to another programming language that cannot use + pcre_free directly; it is for these cases that the functions are pro- vided. @@ -2314,7 +2357,7 @@ EXTRACTING CAPTURED SUBSTRINGS BY NAME int stringcount, const char *stringname, const char **stringptr); - To extract a substring by name, you first have to find associated num- + To extract a substring by name, you first have to find associated num- ber. For example, for this pattern (a+)b(?\d+)... @@ -2323,27 +2366,27 @@ EXTRACTING CAPTURED SUBSTRINGS BY NAME be unique (PCRE_DUPNAMES was not set), you can find the number from the name by calling pcre_get_stringnumber(). The first argument is the com- piled pattern, and the second is the name. The yield of the function is - the subpattern number, or PCRE_ERROR_NOSUBSTRING (-7) if there is no + the subpattern number, or PCRE_ERROR_NOSUBSTRING (-7) if there is no subpattern of that name. Given the number, you can extract the substring directly, or use one of the functions described in the previous section. For convenience, there are also two functions that do the whole job. - Most of the arguments of pcre_copy_named_substring() and - pcre_get_named_substring() are the same as those for the similarly - named functions that extract by number. As these are described in the - previous section, they are not re-described here. There are just two + Most of the arguments of pcre_copy_named_substring() and + pcre_get_named_substring() are the same as those for the similarly + named functions that extract by number. As these are described in the + previous section, they are not re-described here. There are just two differences: - First, instead of a substring number, a substring name is given. Sec- + First, instead of a substring number, a substring name is given. Sec- ond, there is an extra argument, given at the start, which is a pointer - to the compiled pattern. This is needed in order to gain access to the + to the compiled pattern. This is needed in order to gain access to the name-to-number translation table. - These functions call pcre_get_stringnumber(), and if it succeeds, they - then call pcre_copy_substring() or pcre_get_substring(), as appropri- - ate. NOTE: If PCRE_DUPNAMES is set and there are duplicate names, the + These functions call pcre_get_stringnumber(), and if it succeeds, they + then call pcre_copy_substring() or pcre_get_substring(), as appropri- + ate. NOTE: If PCRE_DUPNAMES is set and there are duplicate names, the behaviour may not be what you want (see the next section). @@ -2352,47 +2395,47 @@ DUPLICATE SUBPATTERN NAMES int pcre_get_stringtable_entries(const pcre *code, const char *name, char **first, char **last); - When a pattern is compiled with the PCRE_DUPNAMES option, names for - subpatterns are not required to be unique. Normally, patterns with - duplicate names are such that in any one match, only one of the named - subpatterns participates. An example is shown in the pcrepattern docu- + When a pattern is compiled with the PCRE_DUPNAMES option, names for + subpatterns are not required to be unique. Normally, patterns with + duplicate names are such that in any one match, only one of the named + subpatterns participates. An example is shown in the pcrepattern docu- mentation. - When duplicates are present, pcre_copy_named_substring() and - pcre_get_named_substring() return the first substring corresponding to - the given name that is set. If none are set, PCRE_ERROR_NOSUBSTRING - (-7) is returned; no data is returned. The pcre_get_stringnumber() - function returns one of the numbers that are associated with the name, + When duplicates are present, pcre_copy_named_substring() and + pcre_get_named_substring() return the first substring corresponding to + the given name that is set. If none are set, PCRE_ERROR_NOSUBSTRING + (-7) is returned; no data is returned. The pcre_get_stringnumber() + function returns one of the numbers that are associated with the name, but it is not defined which it is. - If you want to get full details of all captured substrings for a given - name, you must use the pcre_get_stringtable_entries() function. The + If you want to get full details of all captured substrings for a given + name, you must use the pcre_get_stringtable_entries() function. The first argument is the compiled pattern, and the second is the name. The - third and fourth are pointers to variables which are updated by the + third and fourth are pointers to variables which are updated by the function. After it has run, they point to the first and last entries in - the name-to-number table for the given name. The function itself - returns the length of each entry, or PCRE_ERROR_NOSUBSTRING (-7) if - there are none. The format of the table is described above in the sec- - tion entitled Information about a pattern. Given all the relevant - entries for the name, you can extract each of their numbers, and hence + the name-to-number table for the given name. The function itself + returns the length of each entry, or PCRE_ERROR_NOSUBSTRING (-7) if + there are none. The format of the table is described above in the sec- + tion entitled Information about a pattern. Given all the relevant + entries for the name, you can extract each of their numbers, and hence the captured data, if any. FINDING ALL POSSIBLE MATCHES - The traditional matching function uses a similar algorithm to Perl, + The traditional matching function uses a similar algorithm to Perl, which stops when it finds the first match, starting at a given point in - the subject. If you want to find all possible matches, or the longest - possible match, consider using the alternative matching function (see - below) instead. If you cannot use the alternative function, but still - need to find all possible matches, you can kludge it up by making use + the subject. If you want to find all possible matches, or the longest + possible match, consider using the alternative matching function (see + below) instead. If you cannot use the alternative function, but still + need to find all possible matches, you can kludge it up by making use of the callout facility, which is described in the pcrecallout documen- tation. What you have to do is to insert a callout right at the end of the pat- - tern. When your callout function is called, extract and save the cur- - rent matched substring. Then return 1, which forces pcre_exec() to - backtrack and try other alternatives. Ultimately, when it runs out of + tern. When your callout function is called, extract and save the cur- + rent matched substring. Then return 1, which forces pcre_exec() to + backtrack and try other alternatives. Ultimately, when it runs out of matches, pcre_exec() will yield PCRE_ERROR_NOMATCH. @@ -2403,25 +2446,25 @@ MATCHING A PATTERN: THE ALTERNATIVE FUNCTION int options, int *ovector, int ovecsize, int *workspace, int wscount); - The function pcre_dfa_exec() is called to match a subject string - against a compiled pattern, using a matching algorithm that scans the - subject string just once, and does not backtrack. This has different - characteristics to the normal algorithm, and is not compatible with - Perl. Some of the features of PCRE patterns are not supported. Never- - theless, there are times when this kind of matching can be useful. For + The function pcre_dfa_exec() is called to match a subject string + against a compiled pattern, using a matching algorithm that scans the + subject string just once, and does not backtrack. This has different + characteristics to the normal algorithm, and is not compatible with + Perl. Some of the features of PCRE patterns are not supported. Never- + theless, there are times when this kind of matching can be useful. For a discussion of the two matching algorithms, see the pcrematching docu- mentation. - The arguments for the pcre_dfa_exec() function are the same as for + The arguments for the pcre_dfa_exec() function are the same as for pcre_exec(), plus two extras. The ovector argument is used in a differ- - ent way, and this is described below. The other common arguments are - used in the same way as for pcre_exec(), so their description is not + ent way, and this is described below. The other common arguments are + used in the same way as for pcre_exec(), so their description is not repeated here. - The two additional arguments provide workspace for the function. The - workspace vector should contain at least 20 elements. It is used for + The two additional arguments provide workspace for the function. The + workspace vector should contain at least 20 elements. It is used for keeping track of multiple paths through the pattern tree. More - workspace will be needed for patterns and subjects where there are a + workspace will be needed for patterns and subjects where there are a lot of potential matches. Here is an example of a simple call to pcre_dfa_exec(): @@ -2443,47 +2486,47 @@ MATCHING A PATTERN: THE ALTERNATIVE FUNCTION Option bits for pcre_dfa_exec() - The unused bits of the options argument for pcre_dfa_exec() must be - zero. The only bits that may be set are PCRE_ANCHORED, PCRE_NEW- - LINE_xxx, PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NO_UTF8_CHECK, + The unused bits of the options argument for pcre_dfa_exec() must be + zero. The only bits that may be set are PCRE_ANCHORED, PCRE_NEW- + LINE_xxx, PCRE_NOTBOL, PCRE_NOTEOL, PCRE_NOTEMPTY, PCRE_NO_UTF8_CHECK, PCRE_PARTIAL, PCRE_DFA_SHORTEST, and PCRE_DFA_RESTART. All but the last three of these are the same as for pcre_exec(), so their description is not repeated here. PCRE_PARTIAL - This has the same general effect as it does for pcre_exec(), but the - details are slightly different. When PCRE_PARTIAL is set for - pcre_dfa_exec(), the return code PCRE_ERROR_NOMATCH is converted into - PCRE_ERROR_PARTIAL if the end of the subject is reached, there have + This has the same general effect as it does for pcre_exec(), but the + details are slightly different. When PCRE_PARTIAL is set for + pcre_dfa_exec(), the return code PCRE_ERROR_NOMATCH is converted into + PCRE_ERROR_PARTIAL if the end of the subject is reached, there have been no complete matches, but there is still at least one matching pos- - sibility. The portion of the string that provided the partial match is + sibility. The portion of the string that provided the partial match is set as the first matching string. PCRE_DFA_SHORTEST - Setting the PCRE_DFA_SHORTEST option causes the matching algorithm to + Setting the PCRE_DFA_SHORTEST option causes the matching algorithm to stop as soon as it has found one match. Because of the way the alterna- - tive algorithm works, this is necessarily the shortest possible match + tive algorithm works, this is necessarily the shortest possible match at the first possible matching point in the subject string. PCRE_DFA_RESTART - When pcre_dfa_exec() is called with the PCRE_PARTIAL option, and - returns a partial match, it is possible to call it again, with addi- - tional subject characters, and have it continue with the same match. - The PCRE_DFA_RESTART option requests this action; when it is set, the - workspace and wscount options must reference the same vector as before - because data about the match so far is left in them after a partial - match. There is more discussion of this facility in the pcrepartial + When pcre_dfa_exec() is called with the PCRE_PARTIAL option, and + returns a partial match, it is possible to call it again, with addi- + tional subject characters, and have it continue with the same match. + The PCRE_DFA_RESTART option requests this action; when it is set, the + workspace and wscount options must reference the same vector as before + because data about the match so far is left in them after a partial + match. There is more discussion of this facility in the pcrepartial documentation. Successful returns from pcre_dfa_exec() - When pcre_dfa_exec() succeeds, it may have matched more than one sub- + When pcre_dfa_exec() succeeds, it may have matched more than one sub- string in the subject. Note, however, that all the matches from one run - of the function start at the same point in the subject. The shorter - matches are all initial substrings of the longer matches. For example, + of the function start at the same point in the subject. The shorter + matches are all initial substrings of the longer matches. For example, if the pattern <.*> @@ -2498,62 +2541,62 @@ MATCHING A PATTERN: THE ALTERNATIVE FUNCTION - On success, the yield of the function is a number greater than zero, - which is the number of matched substrings. The substrings themselves - are returned in ovector. Each string uses two elements; the first is - the offset to the start, and the second is the offset to the end. In - fact, all the strings have the same start offset. (Space could have - been saved by giving this only once, but it was decided to retain some - compatibility with the way pcre_exec() returns data, even though the + On success, the yield of the function is a number greater than zero, + which is the number of matched substrings. The substrings themselves + are returned in ovector. Each string uses two elements; the first is + the offset to the start, and the second is the offset to the end. In + fact, all the strings have the same start offset. (Space could have + been saved by giving this only once, but it was decided to retain some + compatibility with the way pcre_exec() returns data, even though the meaning of the strings is different.) The strings are returned in reverse order of length; that is, the long- - est matching string is given first. If there were too many matches to - fit into ovector, the yield of the function is zero, and the vector is + est matching string is given first. If there were too many matches to + fit into ovector, the yield of the function is zero, and the vector is filled with the longest matches. Error returns from pcre_dfa_exec() - The pcre_dfa_exec() function returns a negative number when it fails. - Many of the errors are the same as for pcre_exec(), and these are - described above. There are in addition the following errors that are + The pcre_dfa_exec() function returns a negative number when it fails. + Many of the errors are the same as for pcre_exec(), and these are + described above. There are in addition the following errors that are specific to pcre_dfa_exec(): PCRE_ERROR_DFA_UITEM (-16) - This return is given if pcre_dfa_exec() encounters an item in the pat- - tern that it does not support, for instance, the use of \C or a back + This return is given if pcre_dfa_exec() encounters an item in the pat- + tern that it does not support, for instance, the use of \C or a back reference. PCRE_ERROR_DFA_UCOND (-17) - This return is given if pcre_dfa_exec() encounters a condition item - that uses a back reference for the condition, or a test for recursion + This return is given if pcre_dfa_exec() encounters a condition item + that uses a back reference for the condition, or a test for recursion in a specific group. These are not supported. PCRE_ERROR_DFA_UMLIMIT (-18) - This return is given if pcre_dfa_exec() is called with an extra block + This return is given if pcre_dfa_exec() is called with an extra block that contains a setting of the match_limit field. This is not supported (it is meaningless). PCRE_ERROR_DFA_WSSIZE (-19) - This return is given if pcre_dfa_exec() runs out of space in the + This return is given if pcre_dfa_exec() runs out of space in the workspace vector. PCRE_ERROR_DFA_RECURSE (-20) - When a recursive subpattern is processed, the matching function calls - itself recursively, using private vectors for ovector and workspace. - This error is given if the output vector is not large enough. This + When a recursive subpattern is processed, the matching function calls + itself recursively, using private vectors for ovector and workspace. + This error is given if the output vector is not large enough. This should be extremely rare, as a vector of size 1000 is used. SEE ALSO - pcrebuild(3), pcrecallout(3), pcrecpp(3)(3), pcrematching(3), pcrepar- - tial(3), pcreposix(3), pcreprecompile(3), pcresample(3), pcrestack(3). + pcrebuild(3), pcrecallout(3), pcrecpp(3)(3), pcrematching(3), pcrepar- + tial(3), pcreposix(3), pcreprecompile(3), pcresample(3), pcrestack(3). AUTHOR @@ -2565,7 +2608,7 @@ AUTHOR REVISION - Last updated: 23 January 2008 + Last updated: 24 August 2008 Copyright (c) 1997-2008 University of Cambridge. ------------------------------------------------------------------------------ @@ -2893,12 +2936,18 @@ PCRE REGULAR EXPRESSION DETAILS The syntax and semantics of the regular expressions that are supported by PCRE are described in detail below. There is a quick-reference syn- - tax summary in the pcresyntax page. Perl's regular expressions are - described in its own documentation, and regular expressions in general - are covered in a number of books, some of which have copious examples. - Jeffrey Friedl's "Mastering Regular Expressions", published by - O'Reilly, covers regular expressions in great detail. This description - of PCRE's regular expressions is intended as reference material. + tax summary in the pcresyntax page. PCRE tries to match Perl syntax and + semantics as closely as it can. PCRE also supports some alternative + regular expression syntax (which does not conflict with the Perl syn- + tax) in order to provide some compatibility with regular expressions in + Python, .NET, and Oniguruma. + + Perl's regular expressions are described in its own documentation, and + regular expressions in general are covered in a number of books, some + of which have copious examples. Jeffrey Friedl's "Mastering Regular + Expressions", published by O'Reilly, covers regular expressions in + great detail. This description of PCRE's regular expressions is + intended as reference material. The original operation of PCRE was on strings of one-byte characters. However, there is now also support for UTF-8 character strings. To use @@ -3145,6 +3194,15 @@ BACKSLASH named back reference can be coded as \g{name}. Back references are dis- cussed later, following the discussion of parenthesized subpatterns. + Absolute and relative subroutine calls + + For compatibility with Oniguruma, the non-Perl syntax \g followed by a + name or a number enclosed either in angle brackets or single quotes, is + an alternative syntax for referencing a subpattern as a "subroutine". + Details are discussed later. Note that \g{...} (Perl syntax) and + \g<...> (Oniguruma syntax) are not synonymous. The former is a back + reference; the latter is a subroutine call. + Generic character types Another use of backslash is for specifying generic character types. The @@ -3162,28 +3220,28 @@ BACKSLASH \W any "non-word" character Each pair of escape sequences partitions the complete set of characters - into two disjoint sets. Any given character matches one, and only one, + into two disjoint sets. Any given character matches one, and only one, of each pair. These character type sequences can appear both inside and outside char- - acter classes. They each match one character of the appropriate type. - If the current matching point is at the end of the subject string, all + acter classes. They each match one character of the appropriate type. + If the current matching point is at the end of the subject string, all of them fail, since there is no character to match. - For compatibility with Perl, \s does not match the VT character (code - 11). This makes it different from the the POSIX "space" class. The \s - characters are HT (9), LF (10), FF (12), CR (13), and space (32). If + For compatibility with Perl, \s does not match the VT character (code + 11). This makes it different from the the POSIX "space" class. The \s + characters are HT (9), LF (10), FF (12), CR (13), and space (32). If "use locale;" is included in a Perl script, \s may match the VT charac- ter. In PCRE, it never does. - In UTF-8 mode, characters with values greater than 128 never match \d, + In UTF-8 mode, characters with values greater than 128 never match \d, \s, or \w, and always match \D, \S, and \W. This is true even when Uni- - code character property support is available. These sequences retain + code character property support is available. These sequences retain their original meanings from before UTF-8 support was available, mainly for efficiency reasons. The sequences \h, \H, \v, and \V are Perl 5.10 features. In contrast to - the other sequences, these do match certain high-valued codepoints in + the other sequences, these do match certain high-valued codepoints in UTF-8 mode. The horizontal space characters are: U+0009 Horizontal tab @@ -3217,41 +3275,41 @@ BACKSLASH U+2029 Paragraph separator A "word" character is an underscore or any character less than 256 that - is a letter or digit. The definition of letters and digits is con- - trolled by PCRE's low-valued character tables, and may vary if locale- - specific matching is taking place (see "Locale support" in the pcreapi - page). For example, in a French locale such as "fr_FR" in Unix-like - systems, or "french" in Windows, some character codes greater than 128 - are used for accented letters, and these are matched by \w. The use of + is a letter or digit. The definition of letters and digits is con- + trolled by PCRE's low-valued character tables, and may vary if locale- + specific matching is taking place (see "Locale support" in the pcreapi + page). For example, in a French locale such as "fr_FR" in Unix-like + systems, or "french" in Windows, some character codes greater than 128 + are used for accented letters, and these are matched by \w. The use of locales with Unicode is discouraged. Newline sequences - Outside a character class, by default, the escape sequence \R matches + Outside a character class, by default, the escape sequence \R matches any Unicode newline sequence. This is a Perl 5.10 feature. In non-UTF-8 mode \R is equivalent to the following: (?>\r\n|\n|\x0b|\f|\r|\x85) - This is an example of an "atomic group", details of which are given + This is an example of an "atomic group", details of which are given below. This particular group matches either the two-character sequence - CR followed by LF, or one of the single characters LF (linefeed, + CR followed by LF, or one of the single characters LF (linefeed, U+000A), VT (vertical tab, U+000B), FF (formfeed, U+000C), CR (carriage return, U+000D), or NEL (next line, U+0085). The two-character sequence is treated as a single unit that cannot be split. - In UTF-8 mode, two additional characters whose codepoints are greater + In UTF-8 mode, two additional characters whose codepoints are greater than 255 are added: LS (line separator, U+2028) and PS (paragraph sepa- - rator, U+2029). Unicode character property support is not needed for + rator, U+2029). Unicode character property support is not needed for these characters to be recognized. It is possible to restrict \R to match only CR, LF, or CRLF (instead of - the complete set of Unicode line endings) by setting the option + the complete set of Unicode line endings) by setting the option PCRE_BSR_ANYCRLF either at compile time or when the pattern is matched. (BSR is an abbrevation for "backslash R".) This can be made the default - when PCRE is built; if this is the case, the other behaviour can be - requested via the PCRE_BSR_UNICODE option. It is also possible to - specify these settings by starting a pattern string with one of the + when PCRE is built; if this is the case, the other behaviour can be + requested via the PCRE_BSR_UNICODE option. It is also possible to + specify these settings by starting a pattern string with one of the following sequences: (*BSR_ANYCRLF) CR, LF, or CRLF only @@ -3260,9 +3318,9 @@ BACKSLASH These override the default and the options given to pcre_compile(), but they can be overridden by options given to pcre_exec(). Note that these special settings, which are not Perl-compatible, are recognized only at - the very start of a pattern, and that they must be in upper case. If - more than one of them is present, the last one is used. They can be - combined with a change of newline convention, for example, a pattern + the very start of a pattern, and that they must be in upper case. If + more than one of them is present, the last one is used. They can be + combined with a change of newline convention, for example, a pattern can start with: (*ANY)(*BSR_ANYCRLF) @@ -3272,49 +3330,49 @@ BACKSLASH Unicode character properties When PCRE is built with Unicode character property support, three addi- - tional escape sequences that match characters with specific properties - are available. When not in UTF-8 mode, these sequences are of course - limited to testing characters whose codepoints are less than 256, but + tional escape sequences that match characters with specific properties + are available. When not in UTF-8 mode, these sequences are of course + limited to testing characters whose codepoints are less than 256, but they do work in this mode. The extra escape sequences are: \p{xx} a character with the xx property \P{xx} a character without the xx property \X an extended Unicode sequence - The property names represented by xx above are limited to the Unicode + The property names represented by xx above are limited to the Unicode script names, the general category properties, and "Any", which matches any character (including newline). Other properties such as "InMusical- - Symbols" are not currently supported by PCRE. Note that \P{Any} does + Symbols" are not currently supported by PCRE. Note that \P{Any} does not match any characters, so always causes a match failure. Sets of Unicode characters are defined as belonging to certain scripts. - A character from one of these sets can be matched using a script name. + A character from one of these sets can be matched using a script name. For example: \p{Greek} \P{Han} - Those that are not part of an identified script are lumped together as + Those that are not part of an identified script are lumped together as "Common". The current list of scripts is: Arabic, Armenian, Balinese, Bengali, Bopomofo, Braille, Buginese, - Buhid, Canadian_Aboriginal, Cherokee, Common, Coptic, Cuneiform, + Buhid, Canadian_Aboriginal, Cherokee, Common, Coptic, Cuneiform, Cypriot, Cyrillic, Deseret, Devanagari, Ethiopic, Georgian, Glagolitic, - Gothic, Greek, Gujarati, Gurmukhi, Han, Hangul, Hanunoo, Hebrew, Hira- - gana, Inherited, Kannada, Katakana, Kharoshthi, Khmer, Lao, Latin, + Gothic, Greek, Gujarati, Gurmukhi, Han, Hangul, Hanunoo, Hebrew, Hira- + gana, Inherited, Kannada, Katakana, Kharoshthi, Khmer, Lao, Latin, Limbu, Linear_B, Malayalam, Mongolian, Myanmar, New_Tai_Lue, Nko, - Ogham, Old_Italic, Old_Persian, Oriya, Osmanya, Phags_Pa, Phoenician, + Ogham, Old_Italic, Old_Persian, Oriya, Osmanya, Phags_Pa, Phoenician, Runic, Shavian, Sinhala, Syloti_Nagri, Syriac, Tagalog, Tagbanwa, Tai_Le, Tamil, Telugu, Thaana, Thai, Tibetan, Tifinagh, Ugaritic, Yi. - Each character has exactly one general category property, specified by + Each character has exactly one general category property, specified by a two-letter abbreviation. For compatibility with Perl, negation can be - specified by including a circumflex between the opening brace and the + specified by including a circumflex between the opening brace and the property name. For example, \p{^Lu} is the same as \P{Lu}. If only one letter is specified with \p or \P, it includes all the gen- - eral category properties that start with that letter. In this case, in - the absence of negation, the curly brackets in the escape sequence are + eral category properties that start with that letter. In this case, in + the absence of negation, the curly brackets in the escape sequence are optional; these two examples have the same effect: \p{L} @@ -3366,57 +3424,57 @@ BACKSLASH Zp Paragraph separator Zs Space separator - The special property L& is also supported: it matches a character that - has the Lu, Ll, or Lt property, in other words, a letter that is not + The special property L& is also supported: it matches a character that + has the Lu, Ll, or Lt property, in other words, a letter that is not classified as a modifier or "other". - The Cs (Surrogate) property applies only to characters in the range - U+D800 to U+DFFF. Such characters are not valid in UTF-8 strings (see + The Cs (Surrogate) property applies only to characters in the range + U+D800 to U+DFFF. Such characters are not valid in UTF-8 strings (see RFC 3629) and so cannot be tested by PCRE, unless UTF-8 validity check- - ing has been turned off (see the discussion of PCRE_NO_UTF8_CHECK in + ing has been turned off (see the discussion of PCRE_NO_UTF8_CHECK in the pcreapi page). - The long synonyms for these properties that Perl supports (such as - \p{Letter}) are not supported by PCRE, nor is it permitted to prefix + The long synonyms for these properties that Perl supports (such as + \p{Letter}) are not supported by PCRE, nor is it permitted to prefix any of these properties with "Is". No character that is in the Unicode table has the Cn (unassigned) prop- erty. Instead, this property is assumed for any code point that is not in the Unicode table. - Specifying caseless matching does not affect these escape sequences. + Specifying caseless matching does not affect these escape sequences. For example, \p{Lu} always matches only upper case letters. - The \X escape matches any number of Unicode characters that form an + The \X escape matches any number of Unicode characters that form an extended Unicode sequence. \X is equivalent to (?>\PM\pM*) - That is, it matches a character without the "mark" property, followed - by zero or more characters with the "mark" property, and treats the - sequence as an atomic group (see below). Characters with the "mark" - property are typically accents that affect the preceding character. - None of them have codepoints less than 256, so in non-UTF-8 mode \X + That is, it matches a character without the "mark" property, followed + by zero or more characters with the "mark" property, and treats the + sequence as an atomic group (see below). Characters with the "mark" + property are typically accents that affect the preceding character. + None of them have codepoints less than 256, so in non-UTF-8 mode \X matches any one character. - Matching characters by Unicode property is not fast, because PCRE has - to search a structure that contains data for over fifteen thousand + Matching characters by Unicode property is not fast, because PCRE has + to search a structure that contains data for over fifteen thousand characters. That is why the traditional escape sequences such as \d and \w do not use Unicode properties in PCRE. Resetting the match start The escape sequence \K, which is a Perl 5.10 feature, causes any previ- - ously matched characters not to be included in the final matched + ously matched characters not to be included in the final matched sequence. For example, the pattern: foo\Kbar - matches "foobar", but reports that it has matched "bar". This feature - is similar to a lookbehind assertion (described below). However, in - this case, the part of the subject before the real match does not have - to be of fixed length, as lookbehind assertions do. The use of \K does - not interfere with the setting of captured substrings. For example, + matches "foobar", but reports that it has matched "bar". This feature + is similar to a lookbehind assertion (described below). However, in + this case, the part of the subject before the real match does not have + to be of fixed length, as lookbehind assertions do. The use of \K does + not interfere with the setting of captured substrings. For example, when the pattern (foo)\Kbar @@ -3425,10 +3483,10 @@ BACKSLASH Simple assertions - The final use of backslash is for certain simple assertions. An asser- - tion specifies a condition that has to be met at a particular point in - a match, without consuming any characters from the subject string. The - use of subpatterns for more complicated assertions is described below. + The final use of backslash is for certain simple assertions. An asser- + tion specifies a condition that has to be met at a particular point in + a match, without consuming any characters from the subject string. The + use of subpatterns for more complicated assertions is described below. The backslashed assertions are: \b matches at a word boundary @@ -3439,41 +3497,41 @@ BACKSLASH \z matches only at the end of the subject \G matches at the first matching position in the subject - These assertions may not appear in character classes (but note that \b + These assertions may not appear in character classes (but note that \b has a different meaning, namely the backspace character, inside a char- acter class). - A word boundary is a position in the subject string where the current - character and the previous character do not both match \w or \W (i.e. - one matches \w and the other matches \W), or the start or end of the + A word boundary is a position in the subject string where the current + character and the previous character do not both match \w or \W (i.e. + one matches \w and the other matches \W), or the start or end of the string if the first or last character matches \w, respectively. - The \A, \Z, and \z assertions differ from the traditional circumflex + The \A, \Z, and \z assertions differ from the traditional circumflex and dollar (described in the next section) in that they only ever match - at the very start and end of the subject string, whatever options are - set. Thus, they are independent of multiline mode. These three asser- + at the very start and end of the subject string, whatever options are + set. Thus, they are independent of multiline mode. These three asser- tions are not affected by the PCRE_NOTBOL or PCRE_NOTEOL options, which - affect only the behaviour of the circumflex and dollar metacharacters. - However, if the startoffset argument of pcre_exec() is non-zero, indi- + affect only the behaviour of the circumflex and dollar metacharacters. + However, if the startoffset argument of pcre_exec() is non-zero, indi- cating that matching is to start at a point other than the beginning of - the subject, \A can never match. The difference between \Z and \z is + the subject, \A can never match. The difference between \Z and \z is that \Z matches before a newline at the end of the string as well as at the very end, whereas \z matches only at the end. - The \G assertion is true only when the current matching position is at - the start point of the match, as specified by the startoffset argument - of pcre_exec(). It differs from \A when the value of startoffset is - non-zero. By calling pcre_exec() multiple times with appropriate argu- + The \G assertion is true only when the current matching position is at + the start point of the match, as specified by the startoffset argument + of pcre_exec(). It differs from \A when the value of startoffset is + non-zero. By calling pcre_exec() multiple times with appropriate argu- ments, you can mimic Perl's /g option, and it is in this kind of imple- mentation where \G can be useful. - Note, however, that PCRE's interpretation of \G, as the start of the + Note, however, that PCRE's interpretation of \G, as the start of the current match, is subtly different from Perl's, which defines it as the - end of the previous match. In Perl, these can be different when the - previously matched string was empty. Because PCRE does just one match + end of the previous match. In Perl, these can be different when the + previously matched string was empty. Because PCRE does just one match at a time, it cannot reproduce this behaviour. - If all the alternatives of a pattern begin with \G, the expression is + If all the alternatives of a pattern begin with \G, the expression is anchored to the starting match position, and the "anchored" flag is set in the compiled regular expression. @@ -3481,90 +3539,90 @@ BACKSLASH CIRCUMFLEX AND DOLLAR Outside a character class, in the default matching mode, the circumflex - character is an assertion that is true only if the current matching - point is at the start of the subject string. If the startoffset argu- - ment of pcre_exec() is non-zero, circumflex can never match if the - PCRE_MULTILINE option is unset. Inside a character class, circumflex + character is an assertion that is true only if the current matching + point is at the start of the subject string. If the startoffset argu- + ment of pcre_exec() is non-zero, circumflex can never match if the + PCRE_MULTILINE option is unset. Inside a character class, circumflex has an entirely different meaning (see below). - Circumflex need not be the first character of the pattern if a number - of alternatives are involved, but it should be the first thing in each - alternative in which it appears if the pattern is ever to match that - branch. If all possible alternatives start with a circumflex, that is, - if the pattern is constrained to match only at the start of the sub- - ject, it is said to be an "anchored" pattern. (There are also other + Circumflex need not be the first character of the pattern if a number + of alternatives are involved, but it should be the first thing in each + alternative in which it appears if the pattern is ever to match that + branch. If all possible alternatives start with a circumflex, that is, + if the pattern is constrained to match only at the start of the sub- + ject, it is said to be an "anchored" pattern. (There are also other constructs that can cause a pattern to be anchored.) - A dollar character is an assertion that is true only if the current - matching point is at the end of the subject string, or immediately + A dollar character is an assertion that is true only if the current + matching point is at the end of the subject string, or immediately before a newline at the end of the string (by default). Dollar need not - be the last character of the pattern if a number of alternatives are - involved, but it should be the last item in any branch in which it + be the last character of the pattern if a number of alternatives are + involved, but it should be the last item in any branch in which it appears. Dollar has no special meaning in a character class. - The meaning of dollar can be changed so that it matches only at the - very end of the string, by setting the PCRE_DOLLAR_ENDONLY option at + The meaning of dollar can be changed so that it matches only at the + very end of the string, by setting the PCRE_DOLLAR_ENDONLY option at compile time. This does not affect the \Z assertion. The meanings of the circumflex and dollar characters are changed if the - PCRE_MULTILINE option is set. When this is the case, a circumflex - matches immediately after internal newlines as well as at the start of - the subject string. It does not match after a newline that ends the - string. A dollar matches before any newlines in the string, as well as - at the very end, when PCRE_MULTILINE is set. When newline is specified - as the two-character sequence CRLF, isolated CR and LF characters do + PCRE_MULTILINE option is set. When this is the case, a circumflex + matches immediately after internal newlines as well as at the start of + the subject string. It does not match after a newline that ends the + string. A dollar matches before any newlines in the string, as well as + at the very end, when PCRE_MULTILINE is set. When newline is specified + as the two-character sequence CRLF, isolated CR and LF characters do not indicate newlines. - For example, the pattern /^abc$/ matches the subject string "def\nabc" - (where \n represents a newline) in multiline mode, but not otherwise. - Consequently, patterns that are anchored in single line mode because - all branches start with ^ are not anchored in multiline mode, and a - match for circumflex is possible when the startoffset argument of - pcre_exec() is non-zero. The PCRE_DOLLAR_ENDONLY option is ignored if + For example, the pattern /^abc$/ matches the subject string "def\nabc" + (where \n represents a newline) in multiline mode, but not otherwise. + Consequently, patterns that are anchored in single line mode because + all branches start with ^ are not anchored in multiline mode, and a + match for circumflex is possible when the startoffset argument of + pcre_exec() is non-zero. The PCRE_DOLLAR_ENDONLY option is ignored if PCRE_MULTILINE is set. - Note that the sequences \A, \Z, and \z can be used to match the start - and end of the subject in both modes, and if all branches of a pattern - start with \A it is always anchored, whether or not PCRE_MULTILINE is + Note that the sequences \A, \Z, and \z can be used to match the start + and end of the subject in both modes, and if all branches of a pattern + start with \A it is always anchored, whether or not PCRE_MULTILINE is set. FULL STOP (PERIOD, DOT) Outside a character class, a dot in the pattern matches any one charac- - ter in the subject string except (by default) a character that signi- - fies the end of a line. In UTF-8 mode, the matched character may be + ter in the subject string except (by default) a character that signi- + fies the end of a line. In UTF-8 mode, the matched character may be more than one byte long. - When a line ending is defined as a single character, dot never matches - that character; when the two-character sequence CRLF is used, dot does - not match CR if it is immediately followed by LF, but otherwise it - matches all characters (including isolated CRs and LFs). When any Uni- - code line endings are being recognized, dot does not match CR or LF or + When a line ending is defined as a single character, dot never matches + that character; when the two-character sequence CRLF is used, dot does + not match CR if it is immediately followed by LF, but otherwise it + matches all characters (including isolated CRs and LFs). When any Uni- + code line endings are being recognized, dot does not match CR or LF or any of the other line ending characters. - The behaviour of dot with regard to newlines can be changed. If the - PCRE_DOTALL option is set, a dot matches any one character, without + The behaviour of dot with regard to newlines can be changed. If the + PCRE_DOTALL option is set, a dot matches any one character, without exception. If the two-character sequence CRLF is present in the subject string, it takes two dots to match it. - The handling of dot is entirely independent of the handling of circum- - flex and dollar, the only relationship being that they both involve + The handling of dot is entirely independent of the handling of circum- + flex and dollar, the only relationship being that they both involve newlines. Dot has no special meaning in a character class. MATCHING A SINGLE BYTE Outside a character class, the escape sequence \C matches any one byte, - both in and out of UTF-8 mode. Unlike a dot, it always matches any - line-ending characters. The feature is provided in Perl in order to - match individual bytes in UTF-8 mode. Because it breaks up UTF-8 char- - acters into individual bytes, what remains in the string may be a mal- - formed UTF-8 string. For this reason, the \C escape sequence is best + both in and out of UTF-8 mode. Unlike a dot, it always matches any + line-ending characters. The feature is provided in Perl in order to + match individual bytes in UTF-8 mode. Because it breaks up UTF-8 char- + acters into individual bytes, what remains in the string may be a mal- + formed UTF-8 string. For this reason, the \C escape sequence is best avoided. - PCRE does not allow \C to appear in lookbehind assertions (described - below), because in UTF-8 mode this would make it impossible to calcu- + PCRE does not allow \C to appear in lookbehind assertions (described + below), because in UTF-8 mode this would make it impossible to calcu- late the length of the lookbehind. @@ -3573,96 +3631,96 @@ SQUARE BRACKETS AND CHARACTER CLASSES An opening square bracket introduces a character class, terminated by a closing square bracket. A closing square bracket on its own is not spe- cial. If a closing square bracket is required as a member of the class, - it should be the first data character in the class (after an initial + it should be the first data character in the class (after an initial circumflex, if present) or escaped with a backslash. - A character class matches a single character in the subject. In UTF-8 - mode, the character may occupy more than one byte. A matched character + A character class matches a single character in the subject. In UTF-8 + mode, the character may occupy more than one byte. A matched character must be in the set of characters defined by the class, unless the first - character in the class definition is a circumflex, in which case the - subject character must not be in the set defined by the class. If a - circumflex is actually required as a member of the class, ensure it is + character in the class definition is a circumflex, in which case the + subject character must not be in the set defined by the class. If a + circumflex is actually required as a member of the class, ensure it is not the first character, or escape it with a backslash. - For example, the character class [aeiou] matches any lower case vowel, - while [^aeiou] matches any character that is not a lower case vowel. + For example, the character class [aeiou] matches any lower case vowel, + while [^aeiou] matches any character that is not a lower case vowel. Note that a circumflex is just a convenient notation for specifying the - characters that are in the class by enumerating those that are not. A - class that starts with a circumflex is not an assertion: it still con- - sumes a character from the subject string, and therefore it fails if + characters that are in the class by enumerating those that are not. A + class that starts with a circumflex is not an assertion: it still con- + sumes a character from the subject string, and therefore it fails if the current pointer is at the end of the string. - In UTF-8 mode, characters with values greater than 255 can be included - in a class as a literal string of bytes, or by using the \x{ escaping + In UTF-8 mode, characters with values greater than 255 can be included + in a class as a literal string of bytes, or by using the \x{ escaping mechanism. - When caseless matching is set, any letters in a class represent both - their upper case and lower case versions, so for example, a caseless - [aeiou] matches "A" as well as "a", and a caseless [^aeiou] does not - match "A", whereas a caseful version would. In UTF-8 mode, PCRE always - understands the concept of case for characters whose values are less - than 128, so caseless matching is always possible. For characters with - higher values, the concept of case is supported if PCRE is compiled - with Unicode property support, but not otherwise. If you want to use - caseless matching for characters 128 and above, you must ensure that - PCRE is compiled with Unicode property support as well as with UTF-8 + When caseless matching is set, any letters in a class represent both + their upper case and lower case versions, so for example, a caseless + [aeiou] matches "A" as well as "a", and a caseless [^aeiou] does not + match "A", whereas a caseful version would. In UTF-8 mode, PCRE always + understands the concept of case for characters whose values are less + than 128, so caseless matching is always possible. For characters with + higher values, the concept of case is supported if PCRE is compiled + with Unicode property support, but not otherwise. If you want to use + caseless matching for characters 128 and above, you must ensure that + PCRE is compiled with Unicode property support as well as with UTF-8 support. - Characters that might indicate line breaks are never treated in any - special way when matching character classes, whatever line-ending - sequence is in use, and whatever setting of the PCRE_DOTALL and + Characters that might indicate line breaks are never treated in any + special way when matching character classes, whatever line-ending + sequence is in use, and whatever setting of the PCRE_DOTALL and PCRE_MULTILINE options is used. A class such as [^a] always matches one of these characters. - The minus (hyphen) character can be used to specify a range of charac- - ters in a character class. For example, [d-m] matches any letter - between d and m, inclusive. If a minus character is required in a - class, it must be escaped with a backslash or appear in a position - where it cannot be interpreted as indicating a range, typically as the + The minus (hyphen) character can be used to specify a range of charac- + ters in a character class. For example, [d-m] matches any letter + between d and m, inclusive. If a minus character is required in a + class, it must be escaped with a backslash or appear in a position + where it cannot be interpreted as indicating a range, typically as the first or last character in the class. It is not possible to have the literal character "]" as the end charac- - ter of a range. A pattern such as [W-]46] is interpreted as a class of - two characters ("W" and "-") followed by a literal string "46]", so it - would match "W46]" or "-46]". However, if the "]" is escaped with a - backslash it is interpreted as the end of range, so [W-\]46] is inter- - preted as a class containing a range followed by two other characters. - The octal or hexadecimal representation of "]" can also be used to end + ter of a range. A pattern such as [W-]46] is interpreted as a class of + two characters ("W" and "-") followed by a literal string "46]", so it + would match "W46]" or "-46]". However, if the "]" is escaped with a + backslash it is interpreted as the end of range, so [W-\]46] is inter- + preted as a class containing a range followed by two other characters. + The octal or hexadecimal representation of "]" can also be used to end a range. - Ranges operate in the collating sequence of character values. They can - also be used for characters specified numerically, for example - [\000-\037]. In UTF-8 mode, ranges can include characters whose values + Ranges operate in the collating sequence of character values. They can + also be used for characters specified numerically, for example + [\000-\037]. In UTF-8 mode, ranges can include characters whose values are greater than 255, for example [\x{100}-\x{2ff}]. If a range that includes letters is used when caseless matching is set, it matches the letters in either case. For example, [W-c] is equivalent - to [][\\^_`wxyzabc], matched caselessly, and in non-UTF-8 mode, if - character tables for a French locale are in use, [\xc8-\xcb] matches - accented E characters in both cases. In UTF-8 mode, PCRE supports the - concept of case for characters with values greater than 128 only when + to [][\\^_`wxyzabc], matched caselessly, and in non-UTF-8 mode, if + character tables for a French locale are in use, [\xc8-\xcb] matches + accented E characters in both cases. In UTF-8 mode, PCRE supports the + concept of case for characters with values greater than 128 only when it is compiled with Unicode property support. - The character types \d, \D, \p, \P, \s, \S, \w, and \W may also appear - in a character class, and add the characters that they match to the + The character types \d, \D, \p, \P, \s, \S, \w, and \W may also appear + in a character class, and add the characters that they match to the class. For example, [\dABCDEF] matches any hexadecimal digit. A circum- - flex can conveniently be used with the upper case character types to - specify a more restricted set of characters than the matching lower - case type. For example, the class [^\W_] matches any letter or digit, + flex can conveniently be used with the upper case character types to + specify a more restricted set of characters than the matching lower + case type. For example, the class [^\W_] matches any letter or digit, but not underscore. - The only metacharacters that are recognized in character classes are - backslash, hyphen (only where it can be interpreted as specifying a - range), circumflex (only at the start), opening square bracket (only - when it can be interpreted as introducing a POSIX class name - see the - next section), and the terminating closing square bracket. However, + The only metacharacters that are recognized in character classes are + backslash, hyphen (only where it can be interpreted as specifying a + range), circumflex (only at the start), opening square bracket (only + when it can be interpreted as introducing a POSIX class name - see the + next section), and the terminating closing square bracket. However, escaping other non-alphanumeric characters does no harm. POSIX CHARACTER CLASSES Perl supports the POSIX notation for character classes. This uses names - enclosed by [: and :] within the enclosing square brackets. PCRE also + enclosed by [: and :] within the enclosing square brackets. PCRE also supports this notation. For example, [01[:alpha:]%] @@ -3685,18 +3743,18 @@ POSIX CHARACTER CLASSES word "word" characters (same as \w) xdigit hexadecimal digits - The "space" characters are HT (9), LF (10), VT (11), FF (12), CR (13), - and space (32). Notice that this list includes the VT character (code + The "space" characters are HT (9), LF (10), VT (11), FF (12), CR (13), + and space (32). Notice that this list includes the VT character (code 11). This makes "space" different to \s, which does not include VT (for Perl compatibility). - The name "word" is a Perl extension, and "blank" is a GNU extension - from Perl 5.8. Another Perl extension is negation, which is indicated + The name "word" is a Perl extension, and "blank" is a GNU extension + from Perl 5.8. Another Perl extension is negation, which is indicated by a ^ character after the colon. For example, [12[:^digit:]] - matches "1", "2", or any non-digit. PCRE (and Perl) also recognize the + matches "1", "2", or any non-digit. PCRE (and Perl) also recognize the POSIX syntax [.ch.] and [=ch=] where "ch" is a "collating element", but these are not supported, and an error is given if they are encountered. @@ -3706,24 +3764,24 @@ POSIX CHARACTER CLASSES VERTICAL BAR - Vertical bar characters are used to separate alternative patterns. For + Vertical bar characters are used to separate alternative patterns. For example, the pattern gilbert|sullivan - matches either "gilbert" or "sullivan". Any number of alternatives may - appear, and an empty alternative is permitted (matching the empty + matches either "gilbert" or "sullivan". Any number of alternatives may + appear, and an empty alternative is permitted (matching the empty string). The matching process tries each alternative in turn, from left - to right, and the first one that succeeds is used. If the alternatives - are within a subpattern (defined below), "succeeds" means matching the - rest of the main pattern as well as the alternative in the subpattern. + to right, and the first one that succeeds is used. If the alternatives + are within a subpattern (defined below), "succeeds" means matching the + rest of the main pattern as well as the alternative in the subpattern. INTERNAL OPTION SETTING - The settings of the PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, and - PCRE_EXTENDED options (which are Perl-compatible) can be changed from - within the pattern by a sequence of Perl option letters enclosed + The settings of the PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, and + PCRE_EXTENDED options (which are Perl-compatible) can be changed from + within the pattern by a sequence of Perl option letters enclosed between "(?" and ")". The option letters are i for PCRE_CASELESS @@ -3733,44 +3791,44 @@ INTERNAL OPTION SETTING For example, (?im) sets caseless, multiline matching. It is also possi- ble to unset these options by preceding the letter with a hyphen, and a - combined setting and unsetting such as (?im-sx), which sets PCRE_CASE- - LESS and PCRE_MULTILINE while unsetting PCRE_DOTALL and PCRE_EXTENDED, - is also permitted. If a letter appears both before and after the + combined setting and unsetting such as (?im-sx), which sets PCRE_CASE- + LESS and PCRE_MULTILINE while unsetting PCRE_DOTALL and PCRE_EXTENDED, + is also permitted. If a letter appears both before and after the hyphen, the option is unset. - The PCRE-specific options PCRE_DUPNAMES, PCRE_UNGREEDY, and PCRE_EXTRA - can be changed in the same way as the Perl-compatible options by using + The PCRE-specific options PCRE_DUPNAMES, PCRE_UNGREEDY, and PCRE_EXTRA + can be changed in the same way as the Perl-compatible options by using the characters J, U and X respectively. - When an option change occurs at top level (that is, not inside subpat- - tern parentheses), the change applies to the remainder of the pattern + When an option change occurs at top level (that is, not inside subpat- + tern parentheses), the change applies to the remainder of the pattern that follows. If the change is placed right at the start of a pattern, PCRE extracts it into the global options (and it will therefore show up in data extracted by the pcre_fullinfo() function). - An option change within a subpattern (see below for a description of + An option change within a subpattern (see below for a description of subpatterns) affects only that part of the current pattern that follows it, so (a(?i)b)c matches abc and aBc and no other strings (assuming PCRE_CASELESS is not - used). By this means, options can be made to have different settings - in different parts of the pattern. Any changes made in one alternative - do carry on into subsequent branches within the same subpattern. For + used). By this means, options can be made to have different settings + in different parts of the pattern. Any changes made in one alternative + do carry on into subsequent branches within the same subpattern. For example, (a(?i)b|c) - matches "ab", "aB", "c", and "C", even though when matching "C" the - first branch is abandoned before the option setting. This is because - the effects of option settings happen at compile time. There would be + matches "ab", "aB", "c", and "C", even though when matching "C" the + first branch is abandoned before the option setting. This is because + the effects of option settings happen at compile time. There would be some very weird behaviour otherwise. - Note: There are other PCRE-specific options that can be set by the - application when the compile or match functions are called. In some - cases the pattern can contain special leading sequences to override - what the application has set or what has been defaulted. Details are + Note: There are other PCRE-specific options that can be set by the + application when the compile or match functions are called. In some + cases the pattern can contain special leading sequences to override + what the application has set or what has been defaulted. Details are given in the section entitled "Newline sequences" above. @@ -3783,18 +3841,18 @@ SUBPATTERNS cat(aract|erpillar|) - matches one of the words "cat", "cataract", or "caterpillar". Without - the parentheses, it would match "cataract", "erpillar" or an empty + matches one of the words "cat", "cataract", or "caterpillar". Without + the parentheses, it would match "cataract", "erpillar" or an empty string. - 2. It sets up the subpattern as a capturing subpattern. This means - that, when the whole pattern matches, that portion of the subject + 2. It sets up the subpattern as a capturing subpattern. This means + that, when the whole pattern matches, that portion of the subject string that matched the subpattern is passed back to the caller via the - ovector argument of pcre_exec(). Opening parentheses are counted from - left to right (starting from 1) to obtain numbers for the capturing + ovector argument of pcre_exec(). Opening parentheses are counted from + left to right (starting from 1) to obtain numbers for the capturing subpatterns. - For example, if the string "the red king" is matched against the pat- + For example, if the string "the red king" is matched against the pat- tern the ((red|white) (king|queen)) @@ -3802,12 +3860,12 @@ SUBPATTERNS the captured substrings are "red king", "red", and "king", and are num- bered 1, 2, and 3, respectively. - The fact that plain parentheses fulfil two functions is not always - helpful. There are often times when a grouping subpattern is required - without a capturing requirement. If an opening parenthesis is followed - by a question mark and a colon, the subpattern does not do any captur- - ing, and is not counted when computing the number of any subsequent - capturing subpatterns. For example, if the string "the white queen" is + The fact that plain parentheses fulfil two functions is not always + helpful. There are often times when a grouping subpattern is required + without a capturing requirement. If an opening parenthesis is followed + by a question mark and a colon, the subpattern does not do any captur- + ing, and is not counted when computing the number of any subsequent + capturing subpatterns. For example, if the string "the white queen" is matched against the pattern the ((?:red|white) (king|queen)) @@ -3815,80 +3873,80 @@ SUBPATTERNS the captured substrings are "white queen" and "queen", and are numbered 1 and 2. The maximum number of capturing subpatterns is 65535. - As a convenient shorthand, if any option settings are required at the - start of a non-capturing subpattern, the option letters may appear + As a convenient shorthand, if any option settings are required at the + start of a non-capturing subpattern, the option letters may appear between the "?" and the ":". Thus the two patterns (?i:saturday|sunday) (?:(?i)saturday|sunday) match exactly the same set of strings. Because alternative branches are - tried from left to right, and options are not reset until the end of - the subpattern is reached, an option setting in one branch does affect - subsequent branches, so the above patterns match "SUNDAY" as well as + tried from left to right, and options are not reset until the end of + the subpattern is reached, an option setting in one branch does affect + subsequent branches, so the above patterns match "SUNDAY" as well as "Saturday". DUPLICATE SUBPATTERN NUMBERS Perl 5.10 introduced a feature whereby each alternative in a subpattern - uses the same numbers for its capturing parentheses. Such a subpattern - starts with (?| and is itself a non-capturing subpattern. For example, + uses the same numbers for its capturing parentheses. Such a subpattern + starts with (?| and is itself a non-capturing subpattern. For example, consider this pattern: (?|(Sat)ur|(Sun))day - Because the two alternatives are inside a (?| group, both sets of cap- - turing parentheses are numbered one. Thus, when the pattern matches, - you can look at captured substring number one, whichever alternative - matched. This construct is useful when you want to capture part, but + Because the two alternatives are inside a (?| group, both sets of cap- + turing parentheses are numbered one. Thus, when the pattern matches, + you can look at captured substring number one, whichever alternative + matched. This construct is useful when you want to capture part, but not all, of one of a number of alternatives. Inside a (?| group, paren- - theses are numbered as usual, but the number is reset at the start of - each branch. The numbers of any capturing buffers that follow the sub- - pattern start after the highest number used in any branch. The follow- - ing example is taken from the Perl documentation. The numbers under- + theses are numbered as usual, but the number is reset at the start of + each branch. The numbers of any capturing buffers that follow the sub- + pattern start after the highest number used in any branch. The follow- + ing example is taken from the Perl documentation. The numbers under- neath show in which buffer the captured content will be stored. # before ---------------branch-reset----------- after / ( a ) (?| x ( y ) z | (p (q) r) | (t) u (v) ) ( z ) /x # 1 2 2 3 2 3 4 - A backreference or a recursive call to a numbered subpattern always + A backreference or a recursive call to a numbered subpattern always refers to the first one in the pattern with the given number. - An alternative approach to using this "branch reset" feature is to use + An alternative approach to using this "branch reset" feature is to use duplicate named subpatterns, as described in the next section. NAMED SUBPATTERNS - Identifying capturing parentheses by number is simple, but it can be - very hard to keep track of the numbers in complicated regular expres- - sions. Furthermore, if an expression is modified, the numbers may - change. To help with this difficulty, PCRE supports the naming of sub- + Identifying capturing parentheses by number is simple, but it can be + very hard to keep track of the numbers in complicated regular expres- + sions. Furthermore, if an expression is modified, the numbers may + change. To help with this difficulty, PCRE supports the naming of sub- patterns. This feature was not added to Perl until release 5.10. Python - had the feature earlier, and PCRE introduced it at release 4.0, using - the Python syntax. PCRE now supports both the Perl and the Python syn- + had the feature earlier, and PCRE introduced it at release 4.0, using + the Python syntax. PCRE now supports both the Perl and the Python syn- tax. - In PCRE, a subpattern can be named in one of three ways: (?...) - or (?'name'...) as in Perl, or (?P...) as in Python. References + In PCRE, a subpattern can be named in one of three ways: (?...) + or (?'name'...) as in Perl, or (?P...) as in Python. References to capturing parentheses from other parts of the pattern, such as back- - references, recursion, and conditions, can be made by name as well as + references, recursion, and conditions, can be made by name as well as by number. - Names consist of up to 32 alphanumeric characters and underscores. - Named capturing parentheses are still allocated numbers as well as - names, exactly as if the names were not present. The PCRE API provides + Names consist of up to 32 alphanumeric characters and underscores. + Named capturing parentheses are still allocated numbers as well as + names, exactly as if the names were not present. The PCRE API provides function calls for extracting the name-to-number translation table from a compiled pattern. There is also a convenience function for extracting a captured substring by name. - By default, a name must be unique within a pattern, but it is possible + By default, a name must be unique within a pattern, but it is possible to relax this constraint by setting the PCRE_DUPNAMES option at compile - time. This can be useful for patterns where only one instance of the - named parentheses can match. Suppose you want to match the name of a - weekday, either as a 3-letter abbreviation or as the full name, and in + time. This can be useful for patterns where only one instance of the + named parentheses can match. Suppose you want to match the name of a + weekday, either as a 3-letter abbreviation or as the full name, and in both cases you want to extract the abbreviation. This pattern (ignoring the line breaks) does the job: @@ -3898,22 +3956,22 @@ NAMED SUBPATTERNS (?Thu)(?:rsday)?| (?Sat)(?:urday)? - There are five capturing substrings, but only one is ever set after a + There are five capturing substrings, but only one is ever set after a match. (An alternative way of solving this problem is to use a "branch reset" subpattern, as described in the previous section.) - The convenience function for extracting the data by name returns the - substring for the first (and in this example, the only) subpattern of - that name that matched. This saves searching to find which numbered - subpattern it was. If you make a reference to a non-unique named sub- - pattern from elsewhere in the pattern, the one that corresponds to the - lowest number is used. For further details of the interfaces for han- + The convenience function for extracting the data by name returns the + substring for the first (and in this example, the only) subpattern of + that name that matched. This saves searching to find which numbered + subpattern it was. If you make a reference to a non-unique named sub- + pattern from elsewhere in the pattern, the one that corresponds to the + lowest number is used. For further details of the interfaces for han- dling named subpatterns, see the pcreapi documentation. REPETITION - Repetition is specified by quantifiers, which can follow any of the + Repetition is specified by quantifiers, which can follow any of the following items: a literal data character @@ -3926,17 +3984,17 @@ REPETITION a back reference (see next section) a parenthesized subpattern (unless it is an assertion) - The general repetition quantifier specifies a minimum and maximum num- - ber of permitted matches, by giving the two numbers in curly brackets - (braces), separated by a comma. The numbers must be less than 65536, + The general repetition quantifier specifies a minimum and maximum num- + ber of permitted matches, by giving the two numbers in curly brackets + (braces), separated by a comma. The numbers must be less than 65536, and the first must be less than or equal to the second. For example: z{2,4} - matches "zz", "zzz", or "zzzz". A closing brace on its own is not a - special character. If the second number is omitted, but the comma is - present, there is no upper limit; if the second number and the comma - are both omitted, the quantifier specifies an exact number of required + matches "zz", "zzz", or "zzzz". A closing brace on its own is not a + special character. If the second number is omitted, but the comma is + present, there is no upper limit; if the second number and the comma + are both omitted, the quantifier specifies an exact number of required matches. Thus [aeiou]{3,} @@ -3945,20 +4003,23 @@ REPETITION \d{8} - matches exactly 8 digits. An opening curly bracket that appears in a - position where a quantifier is not allowed, or one that does not match - the syntax of a quantifier, is taken as a literal character. For exam- + matches exactly 8 digits. An opening curly bracket that appears in a + position where a quantifier is not allowed, or one that does not match + the syntax of a quantifier, is taken as a literal character. For exam- ple, {,6} is not a quantifier, but a literal string of four characters. - In UTF-8 mode, quantifiers apply to UTF-8 characters rather than to + In UTF-8 mode, quantifiers apply to UTF-8 characters rather than to individual bytes. Thus, for example, \x{100}{2} matches two UTF-8 char- acters, each of which is represented by a two-byte sequence. Similarly, when Unicode property support is available, \X{3} matches three Unicode - extended sequences, each of which may be several bytes long (and they + extended sequences, each of which may be several bytes long (and they may be of different lengths). The quantifier {0} is permitted, causing the expression to behave as if - the previous item and the quantifier were not present. + the previous item and the quantifier were not present. This may be use- + ful for subpatterns that are referenced as subroutines from elsewhere + in the pattern. Items other than subpatterns that have a {0} quantifier + are omitted from the compiled pattern. For convenience, the three most common quantifiers have single-charac- ter abbreviations: @@ -4736,54 +4797,76 @@ SUBPATTERNS AS SUBROUTINES processing option does not affect the called subpattern. +ONIGURUMA SUBROUTINE SYNTAX + + For compatibility with Oniguruma, the non-Perl syntax \g followed by a + name or a number enclosed either in angle brackets or single quotes, is + an alternative syntax for referencing a subpattern as a subroutine, + possibly recursively. Here are two of the examples used above, rewrit- + ten using this syntax: + + (? \( ( (?>[^()]+) | \g )* \) ) + (sens|respons)e and \g'1'ibility + + PCRE supports an extension to Oniguruma: if a number is preceded by a + plus or a minus sign it is taken as a relative reference. For example: + + (abc)(?i:\g<-1>) + + Note that \g{...} (Perl syntax) and \g<...> (Oniguruma syntax) are not + synonymous. The former is a back reference; the latter is a subroutine + call. + + CALLOUTS Perl has a feature whereby using the sequence (?{...}) causes arbitrary - Perl code to be obeyed in the middle of matching a regular expression. + Perl code to be obeyed in the middle of matching a regular expression. This makes it possible, amongst other things, to extract different sub- strings that match the same pair of parentheses when there is a repeti- tion. PCRE provides a similar feature, but of course it cannot obey arbitrary Perl code. The feature is called "callout". The caller of PCRE provides - an external function by putting its entry point in the global variable - pcre_callout. By default, this variable contains NULL, which disables + an external function by putting its entry point in the global variable + pcre_callout. By default, this variable contains NULL, which disables all calling out. - Within a regular expression, (?C) indicates the points at which the - external function is to be called. If you want to identify different - callout points, you can put a number less than 256 after the letter C. - The default value is zero. For example, this pattern has two callout + Within a regular expression, (?C) indicates the points at which the + external function is to be called. If you want to identify different + callout points, you can put a number less than 256 after the letter C. + The default value is zero. For example, this pattern has two callout points: (?C1)abc(?C2)def If the PCRE_AUTO_CALLOUT flag is passed to pcre_compile(), callouts are - automatically installed before each item in the pattern. They are all + automatically installed before each item in the pattern. They are all numbered 255. During matching, when PCRE reaches a callout point (and pcre_callout is - set), the external function is called. It is provided with the number - of the callout, the position in the pattern, and, optionally, one item - of data originally supplied by the caller of pcre_exec(). The callout - function may cause matching to proceed, to backtrack, or to fail alto- + set), the external function is called. It is provided with the number + of the callout, the position in the pattern, and, optionally, one item + of data originally supplied by the caller of pcre_exec(). The callout + function may cause matching to proceed, to backtrack, or to fail alto- gether. A complete description of the interface to the callout function is given in the pcrecallout documentation. BACKTRACKING CONTROL - Perl 5.10 introduced a number of "Special Backtracking Control Verbs", + Perl 5.10 introduced a number of "Special Backtracking Control Verbs", which are described in the Perl documentation as "experimental and sub- - ject to change or removal in a future version of Perl". It goes on to - say: "Their usage in production code should be noted to avoid problems + ject to change or removal in a future version of Perl". It goes on to + say: "Their usage in production code should be noted to avoid problems during upgrades." The same remarks apply to the PCRE features described in this section. - Since these verbs are specifically related to backtracking, they can be - used only when the pattern is to be matched using pcre_exec(), which - uses a backtracking algorithm. They cause an error if encountered by - pcre_dfa_exec(). + Since these verbs are specifically related to backtracking, most of + them can be used only when the pattern is to be matched using + pcre_exec(), which uses a backtracking algorithm. With the exception of + (*FAIL), which behaves like a failing negative assertion, they cause an + error if encountered by pcre_dfa_exec(). The new verbs make use of what was previously invalid syntax: an open- ing parenthesis followed by an asterisk. In Perl, they are generally of @@ -4902,8 +4985,8 @@ AUTHOR REVISION - Last updated: 17 September 2007 - Copyright (c) 1997-2007 University of Cambridge. + Last updated: 19 April 2008 + Copyright (c) 1997-2008 University of Cambridge. ------------------------------------------------------------------------------ @@ -5161,6 +5244,14 @@ SUBROUTINE REFERENCES (POSSIBLY RECURSIVE) (?-n) call subpattern by relative number (?&name) call subpattern by name (Perl) (?P>name) call subpattern by name (Python) + \g call subpattern by name (Oniguruma) + \g'name' call subpattern by name (Oniguruma) + \g call subpattern by absolute number (Oniguruma) + \g'n' call subpattern by absolute number (Oniguruma) + \g<+n> call subpattern by relative number (PCRE extension) + \g'+n' call subpattern by relative number (PCRE extension) + \g<-n> call subpattern by relative number (PCRE extension) + \g'-n' call subpattern by relative number (PCRE extension) CONDITIONAL PATTERNS @@ -5240,8 +5331,8 @@ AUTHOR REVISION - Last updated: 14 November 2007 - Copyright (c) 1997-2007 University of Cambridge. + Last updated: 09 April 2008 + Copyright (c) 1997-2008 University of Cambridge. ------------------------------------------------------------------------------ @@ -5896,8 +5987,9 @@ MATCHING NEWLINE CHARACTERS MATCHING A PATTERN The function regexec() is called to match a compiled pattern preg - against a given string, which is terminated by a zero byte, subject to - the options in eflags. These can be: + against a given string, which is by default terminated by a zero byte + (but see REG_STARTEND below), subject to the options in eflags. These + can be: REG_NOTBOL @@ -5909,6 +6001,17 @@ MATCHING A PATTERN The PCRE_NOTEOL option is set when calling the underlying PCRE matching function. + REG_STARTEND + + The string is considered to start at string + pmatch[0].rm_so and to + have a terminating NUL located at string + pmatch[0].rm_eo (there need + not actually be a NUL at that location), regardless of the value of + nmatch. This is a BSD extension, compatible with but not specified by + IEEE Standard 1003.2 (POSIX.2), and should be used with caution in + software intended to be portable to other systems. Note that a non-zero + rm_so does not imply REG_NOTBOL; REG_STARTEND affects only the location + of the string, not how it is matched. + If the pattern was compiled with the REG_NOSUB flag, no data about any matched strings is returned. The nmatch and pmatch arguments of regexec() are ignored. @@ -5955,8 +6058,8 @@ AUTHOR REVISION - Last updated: 06 March 2007 - Copyright (c) 1997-2007 University of Cambridge. + Last updated: 05 April 2008 + Copyright (c) 1997-2008 University of Cambridge. ------------------------------------------------------------------------------ @@ -6437,6 +6540,8 @@ PCRE DISCUSSION OF STACK USAGE ing long subject strings is to write repeated parenthesized subpatterns to match more than one character whenever possible. + Compiling PCRE to use heap instead of stack + In environments where stack memory is constrained, you might want to compile PCRE to use heap memory instead of stack for remembering back- up points. This makes it run a lot more slowly, however. Details of how @@ -6449,6 +6554,24 @@ PCRE DISCUSSION OF STACK USAGE freed in reverse order, it may be possible to implement customized mem- ory handlers that are more efficient than the standard functions. + Limiting PCRE's stack usage + + PCRE has an internal counter that can be used to limit the depth of + recursion, and thus cause pcre_exec() to give an error code before it + runs out of stack. By default, the limit is very large, and unlikely + ever to operate. It can be changed when PCRE is built, and it can also + be set when pcre_exec() is called. For details of these interfaces, see + the pcrebuild and pcreapi documentation. + + As a very rough rule of thumb, you should reckon on about 500 bytes per + recursion. Thus, if you want to limit your stack usage to 8Mb, you + should set the limit at 16000 recursions. A 64Mb stack, on the other + hand, can support around 128000 recursions. The pcretest test program + has a command line option (-S) that can be used to increase the size of + its stack. + + Changing stack size in Unix-like systems + In Unix-like environments, there is not often a problem with the stack unless very long strings are involved, though the default limit on stack size varies from system to system. Values from 8Mb to 64Mb are @@ -6469,19 +6592,12 @@ PCRE DISCUSSION OF STACK USAGE attempts to increase the soft limit to 100Mb using setrlimit(). You must do this before calling pcre_exec(). - PCRE has an internal counter that can be used to limit the depth of - recursion, and thus cause pcre_exec() to give an error code before it - runs out of stack. By default, the limit is very large, and unlikely - ever to operate. It can be changed when PCRE is built, and it can also - be set when pcre_exec() is called. For details of these interfaces, see - the pcrebuild and pcreapi documentation. + Changing stack size in Mac OS X - As a very rough rule of thumb, you should reckon on about 500 bytes per - recursion. Thus, if you want to limit your stack usage to 8Mb, you - should set the limit at 16000 recursions. A 64Mb stack, on the other - hand, can support around 128000 recursions. The pcretest test program - has a command line option (-S) that can be used to increase the size of - its stack. + Using setrlimit(), as described above, should also work on Mac OS X. It + is also possible to set a stack size when linking a program. There is a + discussion about stack sizes in Mac OS X at this web site: + http://developer.apple.com/qa/qa2005/qa1419.html. AUTHOR @@ -6493,8 +6609,8 @@ AUTHOR REVISION - Last updated: 05 June 2007 - Copyright (c) 1997-2007 University of Cambridge. + Last updated: 09 July 2008 + Copyright (c) 1997-2008 University of Cambridge. ------------------------------------------------------------------------------ diff --git a/ext/pcre/pcrelib/pcre.h b/ext/pcre/pcrelib/pcre.h index c85c32ea3f..29a7345103 100644 --- a/ext/pcre/pcrelib/pcre.h +++ b/ext/pcre/pcrelib/pcre.h @@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE. /* The current PCRE version information. */ #define PCRE_MAJOR 7 -#define PCRE_MINOR 6 +#define PCRE_MINOR 8 #define PCRE_PRERELEASE -#define PCRE_DATE 2008-01-28 +#define PCRE_DATE 2008-09-05 /* When an application links to a PCRE DLL in Windows, the symbols that are imported have to be identified as such. When building PCRE, the appropriate @@ -124,6 +124,7 @@ extern "C" { #define PCRE_NEWLINE_ANYCRLF 0x00500000 #define PCRE_BSR_ANYCRLF 0x00800000 #define PCRE_BSR_UNICODE 0x01000000 +#define PCRE_JAVASCRIPT_COMPAT 0x02000000 /* Exec-time and get/set-time error codes */ diff --git a/ext/pcre/pcrelib/pcre_compile.c b/ext/pcre/pcrelib/pcre_compile.c index 07b6369d6c..99b230e433 100644 --- a/ext/pcre/pcrelib/pcre_compile.c +++ b/ext/pcre/pcrelib/pcre_compile.c @@ -156,7 +156,7 @@ static const char verbnames[] = "SKIP\0" "THEN"; -static verbitem verbs[] = { +static const verbitem verbs[] = { { 6, OP_ACCEPT }, { 6, OP_COMMIT }, { 1, OP_FAIL }, @@ -166,7 +166,7 @@ static verbitem verbs[] = { { 4, OP_THEN } }; -static int verbcount = sizeof(verbs)/sizeof(verbitem); +static const int verbcount = sizeof(verbs)/sizeof(verbitem); /* Tables of names of POSIX character classes and their lengths. The names are @@ -293,14 +293,15 @@ static const char error_texts[] = /* 55 */ "repeating a DEFINE group is not allowed\0" "inconsistent NEWLINE options\0" - "\\g is not followed by a braced name or an optionally braced non-zero number\0" - "(?+ or (?- or (?(+ or (?(- must be followed by a non-zero number\0" + "\\g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number\0" + "a numbered reference must not be zero\0" "(*VERB) with an argument is not supported\0" /* 60 */ "(*VERB) not recognized\0" "number is too big\0" "subpattern name expected\0" - "digit expected after (?+"; + "digit expected after (?+\0" + "] is an invalid data character in JavaScript compatibility mode"; /* Table to identify digits and hex digits. This is used when compiling @@ -452,7 +453,7 @@ static const char * find_error_text(int n) { const char *s = error_texts; -for (; n > 0; n--) while (*s++ != 0); +for (; n > 0; n--) while (*s++ != 0) {}; return s; } @@ -529,14 +530,31 @@ else *errorcodeptr = ERR37; break; - /* \g must be followed by a number, either plain or braced. If positive, it - is an absolute backreference. If negative, it is a relative backreference. - This is a Perl 5.10 feature. Perl 5.10 also supports \g{name} as a - reference to a named group. This is part of Perl's movement towards a - unified syntax for back references. As this is synonymous with \k{name}, we - fudge it up by pretending it really was \k. */ + /* \g must be followed by one of a number of specific things: + + (1) A number, either plain or braced. If positive, it is an absolute + backreference. If negative, it is a relative backreference. This is a Perl + 5.10 feature. + + (2) Perl 5.10 also supports \g{name} as a reference to a named group. This + is part of Perl's movement towards a unified syntax for back references. As + this is synonymous with \k{name}, we fudge it up by pretending it really + was \k. + + (3) For Oniguruma compatibility we also support \g followed by a name or a + number either in angle brackets or in single quotes. However, these are + (possibly recursive) subroutine calls, _not_ backreferences. Just return + the -ESC_g code (cf \k). */ case 'g': + if (ptr[1] == '<' || ptr[1] == '\'') + { + c = -ESC_g; + break; + } + + /* Handle the Perl-compatible cases */ + if (ptr[1] == '{') { const uschar *p; @@ -563,18 +581,24 @@ else while ((digitab[ptr[1]] & ctype_digit) != 0) c = c * 10 + *(++ptr) - '0'; - if (c < 0) + if (c < 0) /* Integer overflow */ { *errorcodeptr = ERR61; break; } - if (c == 0 || (braced && *(++ptr) != '}')) + if (braced && *(++ptr) != '}') { *errorcodeptr = ERR57; break; } + if (c == 0) + { + *errorcodeptr = ERR58; + break; + } + if (negated) { if (c > bracount) @@ -609,7 +633,7 @@ else c -= '0'; while ((digitab[ptr[1]] & ctype_digit) != 0) c = c * 10 + *(++ptr) - '0'; - if (c < 0) + if (c < 0) /* Integer overflow */ { *errorcodeptr = ERR61; break; @@ -950,7 +974,7 @@ be terminated by '>' because that is checked in the first pass. Arguments: ptr current position in the pattern - count current count of capturing parens so far encountered + cd compile background data name name to seek, or NULL if seeking a numbered subpattern lorn name length, or subpattern number if name is NULL xmode TRUE if we are in /x mode @@ -959,10 +983,11 @@ Returns: the number of the named subpattern, or -1 if not found */ static int -find_parens(const uschar *ptr, int count, const uschar *name, int lorn, +find_parens(const uschar *ptr, compile_data *cd, const uschar *name, int lorn, BOOL xmode) { const uschar *thisname; +int count = cd->bracount; for (; *ptr != 0; ptr++) { @@ -975,17 +1000,41 @@ for (; *ptr != 0; ptr++) if (*(++ptr) == 0) return -1; if (*ptr == 'Q') for (;;) { - while (*(++ptr) != 0 && *ptr != '\\'); + while (*(++ptr) != 0 && *ptr != '\\') {}; if (*ptr == 0) return -1; if (*(++ptr) == 'E') break; } continue; } - /* Skip over character classes */ + /* Skip over character classes; this logic must be similar to the way they + are handled for real. If the first character is '^', skip it. Also, if the + first few characters (either before or after ^) are \Q\E or \E we skip them + too. This makes for compatibility with Perl. */ if (*ptr == '[') { + BOOL negate_class = FALSE; + for (;;) + { + int c = *(++ptr); + if (c == '\\') + { + if (ptr[1] == 'E') ptr++; + else if (strncmp((const char *)ptr+1, "Q\\E", 3) == 0) ptr += 3; + else break; + } + else if (!negate_class && c == '^') + negate_class = TRUE; + else break; + } + + /* If the next character is ']', it is a data character that must be + skipped, except in JavaScript compatibility mode. */ + + if (ptr[1] == ']' && (cd->external_options & PCRE_JAVASCRIPT_COMPAT) == 0) + ptr++; + while (*(++ptr) != ']') { if (*ptr == 0) return -1; @@ -994,7 +1043,7 @@ for (; *ptr != 0; ptr++) if (*(++ptr) == 0) return -1; if (*ptr == 'Q') for (;;) { - while (*(++ptr) != 0 && *ptr != '\\'); + while (*(++ptr) != 0 && *ptr != '\\') {}; if (*ptr == 0) return -1; if (*(++ptr) == 'E') break; } @@ -1008,7 +1057,7 @@ for (; *ptr != 0; ptr++) if (xmode && *ptr == '#') { - while (*(++ptr) != 0 && *ptr != '\n'); + while (*(++ptr) != 0 && *ptr != '\n') {}; if (*ptr == 0) return -1; continue; } @@ -1250,6 +1299,7 @@ for (;;) case OP_NOT_WORDCHAR: case OP_WORDCHAR: case OP_ANY: + case OP_ALLANY: branchlength++; cc++; break; @@ -1398,6 +1448,8 @@ for (;;) if (code[-1] >= 0xc0) code += _pcre_utf8_table4[code[-1] & 0x3f]; break; } +#else + (void)(utf8); /* Keep compiler happy by referencing function argument */ #endif } } @@ -1491,6 +1543,8 @@ for (;;) if (code[-1] >= 0xc0) code += _pcre_utf8_table4[code[-1] & 0x3f]; break; } +#else + (void)(utf8); /* Keep compiler happy by referencing function argument */ #endif } } @@ -1542,7 +1596,7 @@ for (code = first_significant_code(code + _pcre_OP_lengths[*code], NULL, 0, TRUE /* Groups with zero repeats can of course be empty; skip them. */ - if (c == OP_BRAZERO || c == OP_BRAMINZERO) + if (c == OP_BRAZERO || c == OP_BRAMINZERO || c == OP_SKIPZERO) { code += _pcre_OP_lengths[c]; do code += GET(code, 1); while (*code == OP_ALT); @@ -1628,6 +1682,7 @@ for (code = first_significant_code(code + _pcre_OP_lengths[*code], NULL, 0, TRUE case OP_NOT_WORDCHAR: case OP_WORDCHAR: case OP_ANY: + case OP_ALLANY: case OP_ANYBYTE: case OP_CHAR: case OP_CHARNC: @@ -1822,11 +1877,12 @@ return -1; 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 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 one of the jobs of this function. Before it is called, -the partially compiled regex must be temporarily terminated with OP_END. +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 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 with the possibility of forward references for recursions and subroutine calls. It must also check the list of such references @@ -1961,7 +2017,7 @@ get_othercase_range(unsigned int *cptr, unsigned int d, unsigned int *ocptr, unsigned int c, othercase, next; for (c = *cptr; c <= d; c++) - { if ((othercase = _pcre_ucp_othercase(c)) != NOTACHAR) break; } + { if ((othercase = UCD_OTHERCASE(c)) != c) break; } if (c > d) return FALSE; @@ -1970,7 +2026,7 @@ next = othercase + 1; for (++c; c <= d; c++) { - if (_pcre_ucp_othercase(c) != next) break; + if (UCD_OTHERCASE(c) != next) break; next++; } @@ -2080,6 +2136,8 @@ if (next >= 0) switch(op_code) case OP_CHAR: #ifdef SUPPORT_UTF8 if (utf8 && item > 127) { GETCHAR(item, utf8_char); } +#else + (void)(utf8_char); /* Keep compiler happy by referencing function argument */ #endif return item != next; @@ -2098,7 +2156,7 @@ if (next >= 0) switch(op_code) unsigned int othercase; if (next < 128) othercase = cd->fcc[next]; else #ifdef SUPPORT_UCP - othercase = _pcre_ucp_othercase((unsigned int)next); + othercase = UCD_OTHERCASE((unsigned int)next); #else othercase = NOTACHAR; #endif @@ -2111,7 +2169,6 @@ if (next >= 0) switch(op_code) /* For OP_NOT, "item" must be a single-byte character. */ case OP_NOT: - if (next < 0) return FALSE; /* Not a character */ if (item == next) return TRUE; if ((options & PCRE_CASELESS) == 0) return FALSE; #ifdef SUPPORT_UTF8 @@ -2120,7 +2177,7 @@ if (next >= 0) switch(op_code) unsigned int othercase; if (next < 128) othercase = cd->fcc[next]; else #ifdef SUPPORT_UCP - othercase = _pcre_ucp_othercase(next); + othercase = UCD_OTHERCASE(next); #else othercase = NOTACHAR; #endif @@ -2614,7 +2671,7 @@ for (;; ptr++) zerofirstbyte = firstbyte; zeroreqbyte = reqbyte; previous = code; - *code++ = OP_ANY; + *code++ = ((options & PCRE_DOTALL) != 0)? OP_ALLANY: OP_ANY; break; @@ -2629,7 +2686,17 @@ for (;; ptr++) opcode is compiled. It may optionally have a bit map for characters < 256, but those above are are explicitly listed afterwards. A flag byte tells whether the bitmap is present, and whether this is a negated class or not. - */ + + In JavaScript compatibility mode, an isolated ']' causes an error. In + default (Perl) mode, it is treated as a data character. */ + + case ']': + if ((cd->external_options & PCRE_JAVASCRIPT_COMPAT) != 0) + { + *errorcodeptr = ERR64; + goto FAILED; + } + goto NORMAL_CHAR; case '[': previous = code; @@ -2663,6 +2730,19 @@ for (;; ptr++) else break; } + /* Empty classes are allowed in JavaScript compatibility mode. Otherwise, + an initial ']' is taken as a data character -- the code below handles + that. In JS mode, [] must always fail, so generate OP_FAIL, whereas + [^] must match any character, so generate OP_ALLANY. */ + + if (c ==']' && (cd->external_options & PCRE_JAVASCRIPT_COMPAT) != 0) + { + *code++ = negate_class? OP_ALLANY : OP_FAIL; + if (firstbyte == REQ_UNSET) firstbyte = REQ_NONE; + zerofirstbyte = firstbyte; + 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). */ @@ -3263,7 +3343,7 @@ for (;; ptr++) if ((options & PCRE_CASELESS) != 0) { unsigned int othercase; - if ((othercase = _pcre_ucp_othercase(c)) != NOTACHAR) + if ((othercase = UCD_OTHERCASE(c)) != c) { *class_utf8data++ = XCL_SINGLE; class_utf8data += _pcre_ord2utf8(othercase, class_utf8data); @@ -3818,28 +3898,38 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */ if (repeat_min == 0) { - /* If the maximum is also zero, we just omit the group from the output - altogether. */ - - if (repeat_max == 0) - { - code = previous; - goto END_REPEAT; - } - - /* 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. */ - - if (repeat_max <= 1) + /* If the maximum is also zero, we used to just omit the group from the + output altogether, like this: + + ** if (repeat_max == 0) + ** { + ** code = previous; + ** goto END_REPEAT; + ** } + + However, that fails when a group is referenced as a subroutine from + elsewhere in the pattern, so now we stick in OP_SKIPZERO in front of it + so that it is skipped on execution. As we don't have a list of which + groups are referenced, we cannot do this 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. */ + + if (repeat_max <= 1) /* Covers 0, 1, and unlimited */ { *code = OP_END; adjust_recurse(previous, 1, utf8, cd, save_hwm); memmove(previous+1, previous, len); code++; + if (repeat_max == 0) + { + *previous++ = OP_SKIPZERO; + goto END_REPEAT; + } *previous++ = OP_BRAZERO + repeat_type; } @@ -4034,6 +4124,13 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */ } } + /* If previous is OP_FAIL, it was generated by an empty class [] in + JavaScript mode. The other ways in which OP_FAIL can be generated, that is + by (*FAIL) or (?!) set previous to NULL, which gives a "nothing to repeat" + error above. We can just ignore the repeat in JS case. */ + + else if (*previous == OP_FAIL) goto END_REPEAT; + /* Else there's some kind of shambles */ else @@ -4123,7 +4220,7 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */ const char *vn = verbnames; const uschar *name = ++ptr; previous = NULL; - while ((cd->ctypes[*++ptr] & ctype_letter) != 0); + while ((cd->ctypes[*++ptr] & ctype_letter) != 0) {}; if (*ptr == ':') { *errorcodeptr = ERR59; /* Not supported */ @@ -4320,7 +4417,7 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */ /* Search the pattern for a forward reference */ - else if ((i = find_parens(ptr, cd->bracount, name, namelen, + else if ((i = find_parens(ptr, cd, name, namelen, (options & PCRE_EXTENDED) != 0)) > 0) { PUT2(code, 2+LINK_SIZE, i); @@ -4566,7 +4663,7 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */ references (?P=name) and recursion (?P>name), as well as falling through from the Perl recursion syntax (?&name). We also come here from the Perl \k or \k'name' back reference syntax and the \k{name} - .NET syntax. */ + .NET syntax, and the Oniguruma \g<...> and \g'...' subroutine syntax. */ NAMED_REF_OR_RECURSE: name = ++ptr; @@ -4617,7 +4714,7 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */ recno = GET2(slot, 0); } else if ((recno = /* Forward back reference */ - find_parens(ptr, cd->bracount, name, namelen, + find_parens(ptr, cd, name, namelen, (options & PCRE_EXTENDED) != 0)) <= 0) { *errorcodeptr = ERR15; @@ -4644,6 +4741,15 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */ case '5': case '6': case '7': case '8': case '9': /* subroutine */ { const uschar *called; + terminator = ')'; + + /* Come here from the \g<...> and \g'...' code (Oniguruma + compatibility). However, the syntax has been checked to ensure that + the ... are a (signed) number, so that neither ERR63 nor ERR29 will + be called on this path, nor with the jump to OTHER_CHAR_AFTER_QUERY + ever be taken. */ + + HANDLE_NUMERICAL_RECURSION: if ((refsign = *ptr) == '+') { @@ -4665,7 +4771,7 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */ while((digitab[*ptr] & ctype_digit) != 0) recno = recno * 10 + *ptr++ - '0'; - if (*ptr != ')') + if (*ptr != terminator) { *errorcodeptr = ERR29; goto FAILED; @@ -4718,8 +4824,8 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */ if (called == NULL) { - if (find_parens(ptr, cd->bracount, NULL, recno, - (options & PCRE_EXTENDED) != 0) < 0) + if (find_parens(ptr, cd, NULL, recno, + (options & PCRE_EXTENDED) != 0) < 0) { *errorcodeptr = ERR15; goto FAILED; @@ -4818,10 +4924,8 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */ both phases. If we are not at the pattern start, compile code to change the ims - options if this setting actually changes any of them. We also pass the - new setting back so that it can be put at the start of any following - branches, and when this group ends (if we are in a group), a resetting - item can be compiled. */ + options if this setting actually changes any of them, and reset the + greedy defaults and the case value for firstbyte and reqbyte. */ if (*ptr == ')') { @@ -4829,7 +4933,6 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */ (lengthptr == NULL || *lengthptr == 2 + 2*LINK_SIZE)) { cd->external_options = newoptions; - options = newoptions; } else { @@ -4838,17 +4941,17 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */ *code++ = OP_OPT; *code++ = newoptions & PCRE_IMS; } - - /* Change options at this level, and pass them back for use - in subsequent branches. Reset the greedy defaults and the case - value for firstbyte and reqbyte. */ - - *optionsptr = options = newoptions; greedy_default = ((newoptions & PCRE_UNGREEDY) != 0); greedy_non_default = greedy_default ^ 1; - req_caseopt = ((options & PCRE_CASELESS) != 0)? REQ_CASELESS : 0; + req_caseopt = ((newoptions & PCRE_CASELESS) != 0)? REQ_CASELESS : 0; } + /* Change options at this level, and pass them back for use + in subsequent branches. When not at the start of the pattern, this + information is also necessary so that a resetting item can be + compiled at the end of a group (if we are in a group). */ + + *optionsptr = options = newoptions; previous = NULL; /* This item can't be repeated */ continue; /* It is complete */ } @@ -5089,6 +5192,64 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */ zerofirstbyte = firstbyte; zeroreqbyte = reqbyte; + /* \g or \g'name' is a subroutine call by name and \g or \g'n' + is a subroutine call by number (Oniguruma syntax). In fact, the value + -ESC_g is returned only for these cases. So we don't need to check for < + or ' if the value is -ESC_g. For the Perl syntax \g{n} the value is + -ESC_REF+n, and for the Perl syntax \g{name} the result is -ESC_k (as + that is a synonym for a named back reference). */ + + if (-c == ESC_g) + { + const uschar *p; + save_hwm = cd->hwm; /* Normally this is set when '(' is read */ + terminator = (*(++ptr) == '<')? '>' : '\''; + + /* These two statements stop the compiler for warning about possibly + unset variables caused by the jump to HANDLE_NUMERICAL_RECURSION. In + fact, because we actually check for a number below, the paths that + would actually be in error are never taken. */ + + skipbytes = 0; + reset_bracount = FALSE; + + /* Test for a name */ + + if (ptr[1] != '+' && ptr[1] != '-') + { + BOOL isnumber = TRUE; + for (p = ptr + 1; *p != 0 && *p != terminator; p++) + { + if ((cd->ctypes[*p] & ctype_digit) == 0) isnumber = FALSE; + if ((cd->ctypes[*p] & ctype_word) == 0) break; + } + if (*p != terminator) + { + *errorcodeptr = ERR57; + break; + } + if (isnumber) + { + ptr++; + goto HANDLE_NUMERICAL_RECURSION; + } + is_recurse = TRUE; + goto NAMED_REF_OR_RECURSE; + } + + /* Test a signed number in angle brackets or quotes. */ + + p = ptr + 2; + while ((digitab[*p] & ctype_digit) != 0) p++; + if (*p != terminator) + { + *errorcodeptr = ERR57; + break; + } + ptr++; + goto HANDLE_NUMERICAL_RECURSION; + } + /* \k or \k'name' is a back reference by name (Perl syntax). We also support \k{name} (.NET syntax) */ @@ -5595,14 +5756,14 @@ do { if (!is_anchored(scode, options, bracket_map, backref_map)) return FALSE; } - /* .* is not anchored unless DOTALL is set and it isn't in brackets that - are or may be referenced. */ + /* .* is not anchored unless DOTALL is set (which generates OP_ALLANY) and + it isn't in brackets that are or may be referenced. */ else if ((op == OP_TYPESTAR || op == OP_TYPEMINSTAR || - op == OP_TYPEPOSSTAR) && - (*options & PCRE_DOTALL) != 0) + op == OP_TYPEPOSSTAR)) { - if (scode[1] != OP_ANY || (bracket_map & backref_map) != 0) return FALSE; + if (scode[1] != OP_ALLANY || (bracket_map & backref_map) != 0) + return FALSE; } /* Check for explicit anchoring */ @@ -5784,7 +5945,7 @@ Returns: pointer to compiled data block, or NULL on error, with errorptr and erroroffset set */ -PCRE_EXP_DEFN pcre * +PCRE_EXP_DEFN pcre * PCRE_CALL_CONVENTION pcre_compile(const char *pattern, int options, const char **errorptr, int *erroroffset, const unsigned char *tables) { @@ -5792,7 +5953,7 @@ return pcre_compile2(pattern, options, NULL, errorptr, erroroffset, tables); } -PCRE_EXP_DEFN pcre * +PCRE_EXP_DEFN pcre * PCRE_CALL_CONVENTION pcre_compile2(const char *pattern, int options, int *errorcodeptr, const char **errorptr, int *erroroffset, const unsigned char *tables) { diff --git a/ext/pcre/pcrelib/pcre_config.c b/ext/pcre/pcrelib/pcre_config.c index 32f9047b0e..d3046ce41f 100644 --- a/ext/pcre/pcrelib/pcre_config.c +++ b/ext/pcre/pcrelib/pcre_config.c @@ -60,7 +60,7 @@ Arguments: Returns: 0 if data returned, negative on error */ -PCRE_EXP_DEFN int +PCRE_EXP_DEFN int PCRE_CALL_CONVENTION pcre_config(int what, void *where) { switch (what) diff --git a/ext/pcre/pcrelib/pcre_exec.c b/ext/pcre/pcrelib/pcre_exec.c index 5520d153b5..eff51c7048 100644 --- a/ext/pcre/pcrelib/pcre_exec.c +++ b/ext/pcre/pcrelib/pcre_exec.c @@ -156,13 +156,39 @@ printf("\n"); if (length > md->end_subject - eptr) return FALSE; -/* Separate the caselesss case for speed */ +/* Separate the caseless case for speed. In UTF-8 mode we can only do this +properly if Unicode properties are supported. Otherwise, we can check only +ASCII characters. */ if ((ims & PCRE_CASELESS) != 0) { +#ifdef SUPPORT_UTF8 +#ifdef SUPPORT_UCP + if (md->utf8) + { + USPTR endptr = eptr + length; + while (eptr < endptr) + { + int c, d; + GETCHARINC(c, eptr); + GETCHARINC(d, p); + if (c != d && c != UCD_OTHERCASE(d)) return FALSE; + } + } + else +#endif +#endif + + /* The same code works when not in UTF-8 mode and in UTF-8 mode when there + is no UCP support. */ + while (length-- > 0) - if (md->lcc[*p++] != md->lcc[*eptr++]) return FALSE; + { if (md->lcc[*p++] != md->lcc[*eptr++]) return FALSE; } } + +/* In the caseful case, we can just compare the bytes, whether or not we +are in UTF-8 mode. */ + else { while (length-- > 0) if (*p++ != *eptr++) return FALSE; } @@ -1146,11 +1172,11 @@ for (;;) do ecode += GET(ecode,1); while (*ecode == OP_ALT); break; - /* BRAZERO and BRAMINZERO occur just before a bracket group, indicating - that it may occur zero times. It may repeat infinitely, or not at all - - i.e. it could be ()* or ()? in the pattern. Brackets with fixed upper - repeat limits are compiled as a number of copies, with the optional ones - preceded by BRAZERO or BRAMINZERO. */ + /* BRAZERO, BRAMINZERO and SKIPZERO occur just before a bracket group, + indicating that it may occur zero times. It may repeat infinitely, or not + at all - i.e. it could be ()* or ()? or even (){0} in the pattern. Brackets + with fixed upper repeat limits are compiled as a number of copies, with the + optional ones preceded by BRAZERO or BRAMINZERO. */ case OP_BRAZERO: { @@ -1172,6 +1198,14 @@ for (;;) } break; + case OP_SKIPZERO: + { + next = ecode+1; + do next += GET(next,1); while (*next == OP_ALT); + ecode = next + 1 + LINK_SIZE; + } + break; + /* End of a group, repeated or non-repeating. */ case OP_KET: @@ -1419,13 +1453,12 @@ for (;;) /* Match a single character type; inline for speed */ case OP_ANY: - if ((ims & PCRE_DOTALL) == 0) - { - if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH); - } + if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH); + /* Fall through */ + + case OP_ALLANY: if (eptr++ >= md->end_subject) RRETURN(MATCH_NOMATCH); - if (utf8) - while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; + if (utf8) while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; ecode++; break; @@ -1644,8 +1677,7 @@ for (;;) if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); GETCHARINCTEST(c, eptr); { - int chartype, script; - int category = _pcre_ucp_findprop(c, &chartype, &script); + const ucd_record * prop = GET_UCD(c); switch(ecode[1]) { @@ -1654,24 +1686,24 @@ for (;;) break; case PT_LAMP: - if ((chartype == ucp_Lu || - chartype == ucp_Ll || - chartype == ucp_Lt) == (op == OP_NOTPROP)) + if ((prop->chartype == ucp_Lu || + prop->chartype == ucp_Ll || + prop->chartype == ucp_Lt) == (op == OP_NOTPROP)) RRETURN(MATCH_NOMATCH); break; case PT_GC: - if ((ecode[2] != category) == (op == OP_PROP)) + if ((ecode[2] != _pcre_ucp_gentype[prop->chartype]) == (op == OP_PROP)) RRETURN(MATCH_NOMATCH); break; case PT_PC: - if ((ecode[2] != chartype) == (op == OP_PROP)) + if ((ecode[2] != prop->chartype) == (op == OP_PROP)) RRETURN(MATCH_NOMATCH); break; case PT_SC: - if ((ecode[2] != script) == (op == OP_PROP)) + if ((ecode[2] != prop->script) == (op == OP_PROP)) RRETURN(MATCH_NOMATCH); break; @@ -1690,8 +1722,7 @@ for (;;) if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); GETCHARINCTEST(c, eptr); { - int chartype, script; - int category = _pcre_ucp_findprop(c, &chartype, &script); + int category = UCD_CATEGORY(c); if (category == ucp_M) RRETURN(MATCH_NOMATCH); while (eptr < md->end_subject) { @@ -1700,7 +1731,7 @@ for (;;) { GETCHARLEN(c, eptr, len); } - category = _pcre_ucp_findprop(c, &chartype, &script); + category = UCD_CATEGORY(c); if (category != ucp_M) break; eptr += len; } @@ -1721,16 +1752,25 @@ for (;;) case OP_REF: { offset = GET2(ecode, 1) << 1; /* Doubled ref number */ - ecode += 3; /* Advance past item */ + ecode += 3; - /* If the reference is unset, set the length to be longer than the amount - of subject left; this ensures that every attempt at a match fails. We - can't just fail here, because of the possibility of quantifiers with zero - minima. */ + /* If the reference is unset, there are two possibilities: - length = (offset >= offset_top || md->offset_vector[offset] < 0)? - md->end_subject - eptr + 1 : - md->offset_vector[offset+1] - md->offset_vector[offset]; + (a) In the default, Perl-compatible state, set the length to be longer + than the amount of subject left; this ensures that every attempt at a + match fails. We can't just fail here, because of the possibility of + quantifiers with zero minima. + + (b) If the JavaScript compatibility flag is set, set the length to zero + so that the back reference matches an empty string. + + Otherwise, set the length to the length of what was matched by the + referenced subpattern. */ + + if (offset >= offset_top || md->offset_vector[offset] < 0) + length = (md->jscript_compat)? 0 : md->end_subject - eptr + 1; + else + length = md->offset_vector[offset+1] - md->offset_vector[offset]; /* Set up for repetition, or handle the non-repeated case */ @@ -2156,7 +2196,7 @@ for (;;) if (fc != dc) { #ifdef SUPPORT_UCP - if (dc != _pcre_ucp_othercase(fc)) + if (dc != UCD_OTHERCASE(fc)) #endif RRETURN(MATCH_NOMATCH); } @@ -2247,7 +2287,7 @@ for (;;) #ifdef SUPPORT_UCP unsigned int othercase; if ((ims & PCRE_CASELESS) != 0 && - (othercase = _pcre_ucp_othercase(fc)) != NOTACHAR) + (othercase = UCD_OTHERCASE(fc)) != fc) oclength = _pcre_ord2utf8(othercase, occhars); else oclength = 0; #endif /* SUPPORT_UCP */ @@ -2567,10 +2607,11 @@ for (;;) { RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM28); if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); GETCHARINC(d, eptr); if (d < 256) d = md->lcc[d]; - if (fi >= max || eptr >= md->end_subject || fc == d) - RRETURN(MATCH_NOMATCH); + if (fc == d) RRETURN(MATCH_NOMATCH); + } } else @@ -2676,9 +2717,9 @@ for (;;) { RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM32); if (rrc != MATCH_NOMATCH) RRETURN(rrc); + if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); GETCHARINC(d, eptr); - if (fi >= max || eptr >= md->end_subject || fc == d) - RRETURN(MATCH_NOMATCH); + if (fc == d) RRETURN(MATCH_NOMATCH); } } else @@ -2852,7 +2893,7 @@ for (;;) { if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); GETCHARINCTEST(c, eptr); - prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); + prop_chartype = UCD_CHARTYPE(c); if ((prop_chartype == ucp_Lu || prop_chartype == ucp_Ll || prop_chartype == ucp_Lt) == prop_fail_result) @@ -2865,7 +2906,7 @@ for (;;) { if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); GETCHARINCTEST(c, eptr); - prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); + prop_category = UCD_CATEGORY(c); if ((prop_category == prop_value) == prop_fail_result) RRETURN(MATCH_NOMATCH); } @@ -2876,7 +2917,7 @@ for (;;) { if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); GETCHARINCTEST(c, eptr); - prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); + prop_chartype = UCD_CHARTYPE(c); if ((prop_chartype == prop_value) == prop_fail_result) RRETURN(MATCH_NOMATCH); } @@ -2887,7 +2928,7 @@ for (;;) { if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); GETCHARINCTEST(c, eptr); - prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); + prop_script = UCD_SCRIPT(c); if ((prop_script == prop_value) == prop_fail_result) RRETURN(MATCH_NOMATCH); } @@ -2906,7 +2947,7 @@ for (;;) for (i = 1; i <= min; i++) { GETCHARINCTEST(c, eptr); - prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); + prop_category = UCD_CATEGORY(c); if (prop_category == ucp_M) RRETURN(MATCH_NOMATCH); while (eptr < md->end_subject) { @@ -2915,7 +2956,7 @@ for (;;) { GETCHARLEN(c, eptr, len); } - prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); + prop_category = UCD_CATEGORY(c); if (prop_category != ucp_M) break; eptr += len; } @@ -2933,14 +2974,22 @@ for (;;) case OP_ANY: for (i = 1; i <= min; i++) { - if (eptr >= md->end_subject || - ((ims & PCRE_DOTALL) == 0 && IS_NEWLINE(eptr))) + if (eptr >= md->end_subject || IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH); eptr++; while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; } break; + case OP_ALLANY: + for (i = 1; i <= min; i++) + { + if (eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); + eptr++; + while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; + } + break; + case OP_ANYBYTE: eptr += min; break; @@ -3149,15 +3198,15 @@ for (;;) switch(ctype) { case OP_ANY: - if ((ims & PCRE_DOTALL) == 0) + for (i = 1; i <= min; i++) { - for (i = 1; i <= min; i++) - { - if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH); - eptr++; - } + if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH); + eptr++; } - else eptr += min; + break; + + case OP_ALLANY: + eptr += min; break; case OP_ANYBYTE: @@ -3323,7 +3372,7 @@ for (;;) if (rrc != MATCH_NOMATCH) RRETURN(rrc); if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); GETCHARINC(c, eptr); - prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); + prop_chartype = UCD_CHARTYPE(c); if ((prop_chartype == ucp_Lu || prop_chartype == ucp_Ll || prop_chartype == ucp_Lt) == prop_fail_result) @@ -3338,7 +3387,7 @@ for (;;) if (rrc != MATCH_NOMATCH) RRETURN(rrc); if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); GETCHARINC(c, eptr); - prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); + prop_category = UCD_CATEGORY(c); if ((prop_category == prop_value) == prop_fail_result) RRETURN(MATCH_NOMATCH); } @@ -3351,7 +3400,7 @@ for (;;) if (rrc != MATCH_NOMATCH) RRETURN(rrc); if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); GETCHARINC(c, eptr); - prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); + prop_chartype = UCD_CHARTYPE(c); if ((prop_chartype == prop_value) == prop_fail_result) RRETURN(MATCH_NOMATCH); } @@ -3364,7 +3413,7 @@ for (;;) if (rrc != MATCH_NOMATCH) RRETURN(rrc); if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); GETCHARINC(c, eptr); - prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); + prop_script = UCD_SCRIPT(c); if ((prop_script == prop_value) == prop_fail_result) RRETURN(MATCH_NOMATCH); } @@ -3386,7 +3435,7 @@ for (;;) if (rrc != MATCH_NOMATCH) RRETURN(rrc); if (fi >= max || eptr >= md->end_subject) RRETURN(MATCH_NOMATCH); GETCHARINCTEST(c, eptr); - prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); + prop_category = UCD_CATEGORY(c); if (prop_category == ucp_M) RRETURN(MATCH_NOMATCH); while (eptr < md->end_subject) { @@ -3395,7 +3444,7 @@ for (;;) { GETCHARLEN(c, eptr, len); } - prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); + prop_category = UCD_CATEGORY(c); if (prop_category != ucp_M) break; eptr += len; } @@ -3414,16 +3463,14 @@ for (;;) RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM42); if (rrc != MATCH_NOMATCH) RRETURN(rrc); if (fi >= max || eptr >= md->end_subject || - (ctype == OP_ANY && (ims & PCRE_DOTALL) == 0 && - IS_NEWLINE(eptr))) + (ctype == OP_ANY && IS_NEWLINE(eptr))) RRETURN(MATCH_NOMATCH); GETCHARINC(c, eptr); switch(ctype) { - case OP_ANY: /* This is the DOTALL case */ - break; - + case OP_ANY: /* This is the non-NL case */ + case OP_ALLANY: case OP_ANYBYTE: break; @@ -3575,15 +3622,14 @@ for (;;) RMATCH(eptr, ecode, offset_top, md, ims, eptrb, 0, RM43); if (rrc != MATCH_NOMATCH) RRETURN(rrc); if (fi >= max || eptr >= md->end_subject || - ((ims & PCRE_DOTALL) == 0 && IS_NEWLINE(eptr))) + (ctype == OP_ANY && IS_NEWLINE(eptr))) RRETURN(MATCH_NOMATCH); c = *eptr++; switch(ctype) { - case OP_ANY: /* This is the DOTALL case */ - break; - + case OP_ANY: /* This is the non-NL case */ + case OP_ALLANY: case OP_ANYBYTE: break; @@ -3716,7 +3762,7 @@ for (;;) int len = 1; if (eptr >= md->end_subject) break; GETCHARLEN(c, eptr, len); - prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); + prop_chartype = UCD_CHARTYPE(c); if ((prop_chartype == ucp_Lu || prop_chartype == ucp_Ll || prop_chartype == ucp_Lt) == prop_fail_result) @@ -3731,7 +3777,7 @@ for (;;) int len = 1; if (eptr >= md->end_subject) break; GETCHARLEN(c, eptr, len); - prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); + prop_category = UCD_CATEGORY(c); if ((prop_category == prop_value) == prop_fail_result) break; eptr+= len; @@ -3744,7 +3790,7 @@ for (;;) int len = 1; if (eptr >= md->end_subject) break; GETCHARLEN(c, eptr, len); - prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); + prop_chartype = UCD_CHARTYPE(c); if ((prop_chartype == prop_value) == prop_fail_result) break; eptr+= len; @@ -3757,7 +3803,7 @@ for (;;) int len = 1; if (eptr >= md->end_subject) break; GETCHARLEN(c, eptr, len); - prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); + prop_script = UCD_SCRIPT(c); if ((prop_script == prop_value) == prop_fail_result) break; eptr+= len; @@ -3786,7 +3832,7 @@ for (;;) { if (eptr >= md->end_subject) break; GETCHARINCTEST(c, eptr); - prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); + prop_category = UCD_CATEGORY(c); if (prop_category == ucp_M) break; while (eptr < md->end_subject) { @@ -3795,7 +3841,7 @@ for (;;) { GETCHARLEN(c, eptr, len); } - prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); + prop_category = UCD_CATEGORY(c); if (prop_category != ucp_M) break; eptr += len; } @@ -3817,7 +3863,7 @@ for (;;) BACKCHAR(eptr); GETCHARLEN(c, eptr, len); } - prop_category = _pcre_ucp_findprop(c, &prop_chartype, &prop_script); + prop_category = UCD_CATEGORY(c); if (prop_category != ucp_M) break; eptr--; } @@ -3837,23 +3883,11 @@ for (;;) case OP_ANY: if (max < INT_MAX) { - if ((ims & PCRE_DOTALL) == 0) - { - for (i = min; i < max; i++) - { - if (eptr >= md->end_subject || IS_NEWLINE(eptr)) break; - eptr++; - while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; - } - } - else + for (i = min; i < max; i++) { - for (i = min; i < max; i++) - { - if (eptr >= md->end_subject) break; - eptr++; - while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; - } + if (eptr >= md->end_subject || IS_NEWLINE(eptr)) break; + eptr++; + while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; } } @@ -3861,20 +3895,26 @@ for (;;) else { - if ((ims & PCRE_DOTALL) == 0) + for (i = min; i < max; i++) { - for (i = min; i < max; i++) - { - if (eptr >= md->end_subject || IS_NEWLINE(eptr)) break; - eptr++; - while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; - } + if (eptr >= md->end_subject || IS_NEWLINE(eptr)) break; + eptr++; + while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; } - else + } + break; + + case OP_ALLANY: + if (max < INT_MAX) + { + for (i = min; i < max; i++) { - eptr = md->end_subject; + if (eptr >= md->end_subject) break; + eptr++; + while (eptr < md->end_subject && (*eptr & 0xc0) == 0x80) eptr++; } } + else eptr = md->end_subject; /* Unlimited UTF-8 repeat */ break; /* The byte case is the same as non-UTF8 */ @@ -4062,17 +4102,14 @@ for (;;) switch(ctype) { case OP_ANY: - if ((ims & PCRE_DOTALL) == 0) + for (i = min; i < max; i++) { - for (i = min; i < max; i++) - { - if (eptr >= md->end_subject || IS_NEWLINE(eptr)) break; - eptr++; - } - break; + if (eptr >= md->end_subject || IS_NEWLINE(eptr)) break; + eptr++; } - /* For DOTALL case, fall through and treat as \C */ + break; + case OP_ALLANY: case OP_ANYBYTE: c = max - min; if (c > (unsigned int)(md->end_subject - eptr)) @@ -4346,7 +4383,7 @@ Returns: > 0 => success; value is the number of elements filled in < -1 => some kind of unexpected problem */ -PCRE_EXP_DEFN int +PCRE_EXP_DEFN int PCRE_CALL_CONVENTION pcre_exec(const pcre *argument_re, const pcre_extra *extra_data, PCRE_SPTR subject, int length, int start_offset, int options, int *offsets, int offsetcount) @@ -4448,6 +4485,7 @@ end_subject = md->end_subject; md->endonly = (re->options & PCRE_DOLLAR_ENDONLY) != 0; utf8 = md->utf8 = (re->options & PCRE_UTF8) != 0; +md->jscript_compat = (re->options & PCRE_JAVASCRIPT_COMPAT) != 0; md->notbol = (options & PCRE_NOTBOL) != 0; md->noteol = (options & PCRE_NOTEOL) != 0; @@ -4657,31 +4695,53 @@ for(;;) if (firstline) { USPTR t = start_match; +#ifdef SUPPORT_UTF8 + if (utf8) + { + while (t < md->end_subject && !IS_NEWLINE(t)) + { + t++; + while (t < end_subject && (*t & 0xc0) == 0x80) t++; + } + } + else +#endif while (t < md->end_subject && !IS_NEWLINE(t)) t++; end_subject = t; } - /* Now test for a unique first byte */ + /* Now advance to a unique first byte if there is one. */ if (first_byte >= 0) { if (first_byte_caseless) - while (start_match < end_subject && - md->lcc[*start_match] != first_byte) - { NEXTCHAR(start_match); } + while (start_match < end_subject && md->lcc[*start_match] != first_byte) + start_match++; else while (start_match < end_subject && *start_match != first_byte) - { NEXTCHAR(start_match); } + start_match++; } - /* Or to just after a linebreak for a multiline match if possible */ + /* Or to just after a linebreak for a multiline match */ else if (startline) { if (start_match > md->start_subject + start_offset) { - while (start_match <= end_subject && !WAS_NEWLINE(start_match)) - { NEXTCHAR(start_match); } +#ifdef SUPPORT_UTF8 + if (utf8) + { + while (start_match < end_subject && !WAS_NEWLINE(start_match)) + { + start_match++; + while(start_match < end_subject && (*start_match & 0xc0) == 0x80) + start_match++; + } + } + else +#endif + while (start_match < end_subject && !WAS_NEWLINE(start_match)) + start_match++; /* If we have just passed a CR and the newline option is ANY or ANYCRLF, and we are now at a LF, advance the match position by one more character. @@ -4695,16 +4755,15 @@ for(;;) } } - /* Or to a non-unique first char after study */ + /* Or to a non-unique first byte after study */ else if (start_bits != NULL) { while (start_match < end_subject) { register unsigned int c = *start_match; - if ((start_bits[c/8] & (1 << (c&7))) == 0) - { NEXTCHAR(start_match); } - else break; + if ((start_bits[c/8] & (1 << (c&7))) == 0) start_match++; + else break; } } diff --git a/ext/pcre/pcrelib/pcre_fullinfo.c b/ext/pcre/pcrelib/pcre_fullinfo.c index b91ea035ec..4b345cf697 100644 --- a/ext/pcre/pcrelib/pcre_fullinfo.c +++ b/ext/pcre/pcrelib/pcre_fullinfo.c @@ -63,7 +63,7 @@ Arguments: Returns: 0 if data returned, negative on error */ -PCRE_EXP_DEFN int +PCRE_EXP_DEFN int PCRE_CALL_CONVENTION pcre_fullinfo(const pcre *argument_re, const pcre_extra *extra_data, int what, void *where) { diff --git a/ext/pcre/pcrelib/pcre_get.c b/ext/pcre/pcrelib/pcre_get.c index c185c331ab..92b3808820 100644 --- a/ext/pcre/pcrelib/pcre_get.c +++ b/ext/pcre/pcrelib/pcre_get.c @@ -63,7 +63,7 @@ Returns: the number of the named parentheses, or a negative number (PCRE_ERROR_NOSUBSTRING) if not found */ -int +PCRE_EXP_DEFN int PCRE_CALL_CONVENTION pcre_get_stringnumber(const pcre *code, const char *stringname) { int rc; @@ -112,7 +112,7 @@ Returns: the length of each entry, or a negative number (PCRE_ERROR_NOSUBSTRING) if not found */ -int +PCRE_EXP_DEFN int PCRE_CALL_CONVENTION pcre_get_stringtable_entries(const pcre *code, const char *stringname, char **firstptr, char **lastptr) { @@ -229,7 +229,7 @@ Returns: if successful: PCRE_ERROR_NOSUBSTRING (-7) no such captured substring */ -int +PCRE_EXP_DEFN int PCRE_CALL_CONVENTION pcre_copy_substring(const char *subject, int *ovector, int stringcount, int stringnumber, char *buffer, int size) { @@ -274,7 +274,7 @@ Returns: if successful: PCRE_ERROR_NOSUBSTRING (-7) no such captured substring */ -int +PCRE_EXP_DEFN int PCRE_CALL_CONVENTION pcre_copy_named_substring(const pcre *code, const char *subject, int *ovector, int stringcount, const char *stringname, char *buffer, int size) { @@ -306,7 +306,7 @@ Returns: if successful: 0 PCRE_ERROR_NOMEMORY (-6) failed to get store */ -int +PCRE_EXP_DEFN int PCRE_CALL_CONVENTION pcre_get_substring_list(const char *subject, int *ovector, int stringcount, const char ***listptr) { @@ -351,7 +351,7 @@ Argument: the result of a previous pcre_get_substring_list() Returns: nothing */ -void +PCRE_EXP_DEFN void PCRE_CALL_CONVENTION pcre_free_substring_list(const char **pointer) { (pcre_free)((void *)pointer); @@ -384,7 +384,7 @@ Returns: if successful: PCRE_ERROR_NOSUBSTRING (-7) substring not present */ -int +PCRE_EXP_DEFN int PCRE_CALL_CONVENTION pcre_get_substring(const char *subject, int *ovector, int stringcount, int stringnumber, const char **stringptr) { @@ -431,7 +431,7 @@ Returns: if successful: PCRE_ERROR_NOSUBSTRING (-7) no such captured substring */ -int +PCRE_EXP_DEFN int PCRE_CALL_CONVENTION pcre_get_named_substring(const pcre *code, const char *subject, int *ovector, int stringcount, const char *stringname, const char **stringptr) { @@ -454,7 +454,7 @@ Argument: the result of a previous pcre_get_substring() Returns: nothing */ -void +PCRE_EXP_DEFN void PCRE_CALL_CONVENTION pcre_free_substring(const char *pointer) { (pcre_free)((void *)pointer); diff --git a/ext/pcre/pcrelib/pcre_info.c b/ext/pcre/pcrelib/pcre_info.c index f653d70bd3..9c709d6f93 100644 --- a/ext/pcre/pcrelib/pcre_info.c +++ b/ext/pcre/pcrelib/pcre_info.c @@ -70,7 +70,7 @@ Returns: number of capturing subpatterns or negative values on error */ -PCRE_EXP_DEFN int +PCRE_EXP_DEFN int PCRE_CALL_CONVENTION pcre_info(const pcre *argument_re, int *optptr, int *first_byte) { real_pcre internal_re; diff --git a/ext/pcre/pcrelib/pcre_internal.h b/ext/pcre/pcrelib/pcre_internal.h index caf7b831dc..dcded9fc34 100644 --- a/ext/pcre/pcrelib/pcre_internal.h +++ b/ext/pcre/pcrelib/pcre_internal.h @@ -132,6 +132,20 @@ PCRE_EXP_DATA_DEFN only if they are not already set. */ # endif #endif +/* When compiling with the MSVC compiler, it is sometimes necessary to include +a "calling convention" before exported function names. (This is secondhand +information; I know nothing about MSVC myself). For example, something like + + void __cdecl function(....) + +might be needed. In order so make this easy, all the exported functions have +PCRE_CALL_CONVENTION just before their names. It is rarely needed; if not +set, we ensure here that it has no effect. */ + +#ifndef PCRE_CALL_CONVENTION +#define PCRE_CALL_CONVENTION +#endif + /* We need to have types that specify unsigned 16-bit and 32-bit integers. We cannot determine these outside the compilation (e.g. by running a program as part of "configure") because PCRE is often cross-compiled for use on other @@ -140,16 +154,20 @@ preprocessor time in standard C environments. */ #if USHRT_MAX == 65535 typedef unsigned short pcre_uint16; + typedef short pcre_int16; #elif UINT_MAX == 65535 typedef unsigned int pcre_uint16; + typedef int pcre_int16; #else #error Cannot determine a type for 16-bit unsigned integers #endif #if UINT_MAX == 4294967295 typedef unsigned int pcre_uint32; + typedef int pcre_int32; #elif ULONG_MAX == 4294967295 typedef unsigned long int pcre_uint32; + typedef long int pcre_int32; #else #error Cannot determine a type for 32-bit unsigned integers #endif @@ -363,7 +381,6 @@ never be called in byte mode. To make sure it can never even appear when UTF-8 support is omitted, we don't even define it. */ #ifndef SUPPORT_UTF8 -#define NEXTCHAR(p) p++; #define GETCHAR(c, eptr) c = *eptr; #define GETCHARTEST(c, eptr) c = *eptr; #define GETCHARINC(c, eptr) c = *eptr++; @@ -373,13 +390,6 @@ support is omitted, we don't even define it. */ #else /* SUPPORT_UTF8 */ -/* Advance a character pointer one byte in non-UTF-8 mode and by one character -in UTF-8 mode. */ - -#define NEXTCHAR(p) \ - p++; \ - if (utf8) { while((*p & 0xc0) == 0x80) p++; } - /* Get the next UTF-8 character, not advancing the pointer. This is called when we know we are in UTF-8 mode. */ @@ -514,7 +524,8 @@ time, run time, or study time, respectively. */ (PCRE_CASELESS|PCRE_EXTENDED|PCRE_ANCHORED|PCRE_MULTILINE| \ PCRE_DOTALL|PCRE_DOLLAR_ENDONLY|PCRE_EXTRA|PCRE_UNGREEDY|PCRE_UTF8| \ PCRE_NO_AUTO_CAPTURE|PCRE_NO_UTF8_CHECK|PCRE_AUTO_CALLOUT|PCRE_FIRSTLINE| \ - PCRE_DUPNAMES|PCRE_NEWLINE_BITS|PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE) + PCRE_DUPNAMES|PCRE_NEWLINE_BITS|PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE| \ + PCRE_JAVASCRIPT_COMPAT) #define PUBLIC_EXEC_OPTIONS \ (PCRE_ANCHORED|PCRE_NOTBOL|PCRE_NOTEOL|PCRE_NOTEMPTY|PCRE_NO_UTF8_CHECK| \ @@ -548,12 +559,15 @@ variable-length repeat, or a anything other than literal characters. */ #define REQ_CASELESS 0x0100 /* indicates caselessness */ #define REQ_VARY 0x0200 /* reqbyte followed non-literal item */ -/* Miscellaneous definitions */ +/* Miscellaneous definitions. The #ifndef is to pacify compiler warnings in +environments where these macros are defined elsewhere. */ +#ifndef FALSE typedef int BOOL; #define FALSE 0 #define TRUE 1 +#endif /* Escape items that are just an encoding of a particular data value. */ @@ -604,16 +618,20 @@ contain UTF-8 characters with values greater than 255. */ value such as \n. They must have non-zero values, as check_escape() returns their negation. Also, they must appear in the same order as in the opcode definitions below, up to ESC_z. There's a dummy for OP_ANY because it -corresponds to "." rather than an escape sequence. The final one must be -ESC_REF as subsequent values are used for backreferences (\1, \2, \3, etc). -There are two tests in the code for an escape greater than ESC_b and less than -ESC_Z to detect the types that may be repeated. These are the types that -consume characters. If any new escapes are put in between that don't consume a -character, that code will have to change. */ +corresponds to "." rather than an escape sequence, and another for OP_ALLANY +(which is used for [^] in JavaScript compatibility mode). + +The final escape must be ESC_REF as subsequent values are used for +backreferences (\1, \2, \3, etc). There are two tests in the code for an escape +greater than ESC_b and less than ESC_Z to detect the types that may be +repeated. These are the types that consume characters. If any new escapes are +put in between that don't consume a character, that code will have to change. +*/ enum { ESC_A = 1, ESC_G, ESC_K, ESC_B, ESC_b, ESC_D, ESC_d, ESC_S, ESC_s, - ESC_W, ESC_w, ESC_dum1, ESC_C, ESC_P, ESC_p, ESC_R, ESC_H, ESC_h, - ESC_V, ESC_v, ESC_X, ESC_Z, ESC_z, ESC_E, ESC_Q, ESC_k, ESC_REF }; + ESC_W, ESC_w, ESC_dum1, ESC_dum2, ESC_C, ESC_P, ESC_p, ESC_R, ESC_H, + ESC_h, ESC_V, ESC_v, ESC_X, ESC_Z, ESC_z, ESC_E, ESC_Q, ESC_g, ESC_k, + ESC_REF }; /* Opcode table: Starting from 1 (i.e. after OP_END), the values up to @@ -639,141 +657,146 @@ enum { OP_WHITESPACE, /* 9 \s */ OP_NOT_WORDCHAR, /* 10 \W */ OP_WORDCHAR, /* 11 \w */ - OP_ANY, /* 12 Match any character */ - OP_ANYBYTE, /* 13 Match any byte (\C); different to OP_ANY for UTF-8 */ - OP_NOTPROP, /* 14 \P (not Unicode property) */ - OP_PROP, /* 15 \p (Unicode property) */ - OP_ANYNL, /* 16 \R (any newline sequence) */ - OP_NOT_HSPACE, /* 17 \H (not horizontal whitespace) */ - OP_HSPACE, /* 18 \h (horizontal whitespace) */ - OP_NOT_VSPACE, /* 19 \V (not vertical whitespace) */ - OP_VSPACE, /* 20 \v (vertical whitespace) */ - OP_EXTUNI, /* 21 \X (extended Unicode sequence */ - OP_EODN, /* 22 End of data or \n at end of data: \Z. */ - OP_EOD, /* 23 End of data: \z */ - - OP_OPT, /* 24 Set runtime options */ - OP_CIRC, /* 25 Start of line - varies with multiline switch */ - OP_DOLL, /* 26 End of line - varies with multiline switch */ - OP_CHAR, /* 27 Match one character, casefully */ - OP_CHARNC, /* 28 Match one character, caselessly */ - OP_NOT, /* 29 Match one character, not the following one */ - - OP_STAR, /* 30 The maximizing and minimizing versions of */ - OP_MINSTAR, /* 31 these six opcodes must come in pairs, with */ - OP_PLUS, /* 32 the minimizing one second. */ - OP_MINPLUS, /* 33 This first set applies to single characters.*/ - OP_QUERY, /* 34 */ - OP_MINQUERY, /* 35 */ - - OP_UPTO, /* 36 From 0 to n matches */ - OP_MINUPTO, /* 37 */ - OP_EXACT, /* 38 Exactly n matches */ - - OP_POSSTAR, /* 39 Possessified star */ - OP_POSPLUS, /* 40 Possessified plus */ - OP_POSQUERY, /* 41 Posesssified query */ - OP_POSUPTO, /* 42 Possessified upto */ - - OP_NOTSTAR, /* 43 The maximizing and minimizing versions of */ - OP_NOTMINSTAR, /* 44 these six opcodes must come in pairs, with */ - OP_NOTPLUS, /* 45 the minimizing one second. They must be in */ - OP_NOTMINPLUS, /* 46 exactly the same order as those above. */ - OP_NOTQUERY, /* 47 This set applies to "not" single characters. */ - OP_NOTMINQUERY, /* 48 */ - - OP_NOTUPTO, /* 49 From 0 to n matches */ - OP_NOTMINUPTO, /* 50 */ - OP_NOTEXACT, /* 51 Exactly n matches */ - - OP_NOTPOSSTAR, /* 52 Possessified versions */ - OP_NOTPOSPLUS, /* 53 */ - OP_NOTPOSQUERY, /* 54 */ - OP_NOTPOSUPTO, /* 55 */ - - OP_TYPESTAR, /* 56 The maximizing and minimizing versions of */ - OP_TYPEMINSTAR, /* 57 these six opcodes must come in pairs, with */ - OP_TYPEPLUS, /* 58 the minimizing one second. These codes must */ - OP_TYPEMINPLUS, /* 59 be in exactly the same order as those above. */ - OP_TYPEQUERY, /* 60 This set applies to character types such as \d */ - OP_TYPEMINQUERY, /* 61 */ - - OP_TYPEUPTO, /* 62 From 0 to n matches */ - OP_TYPEMINUPTO, /* 63 */ - OP_TYPEEXACT, /* 64 Exactly n matches */ - - OP_TYPEPOSSTAR, /* 65 Possessified versions */ - OP_TYPEPOSPLUS, /* 66 */ - OP_TYPEPOSQUERY, /* 67 */ - OP_TYPEPOSUPTO, /* 68 */ - - OP_CRSTAR, /* 69 The maximizing and minimizing versions of */ - OP_CRMINSTAR, /* 70 all these opcodes must come in pairs, with */ - OP_CRPLUS, /* 71 the minimizing one second. These codes must */ - OP_CRMINPLUS, /* 72 be in exactly the same order as those above. */ - OP_CRQUERY, /* 73 These are for character classes and back refs */ - OP_CRMINQUERY, /* 74 */ - OP_CRRANGE, /* 75 These are different to the three sets above. */ - OP_CRMINRANGE, /* 76 */ - - OP_CLASS, /* 77 Match a character class, chars < 256 only */ - OP_NCLASS, /* 78 Same, but the bitmap was created from a negative + OP_ANY, /* 12 Match any character (subject to DOTALL) */ + OP_ALLANY, /* 13 Match any character (not subject to DOTALL) */ + OP_ANYBYTE, /* 14 Match any byte (\C); different to OP_ANY for UTF-8 */ + OP_NOTPROP, /* 15 \P (not Unicode property) */ + OP_PROP, /* 16 \p (Unicode property) */ + OP_ANYNL, /* 17 \R (any newline sequence) */ + OP_NOT_HSPACE, /* 18 \H (not horizontal whitespace) */ + OP_HSPACE, /* 19 \h (horizontal whitespace) */ + OP_NOT_VSPACE, /* 20 \V (not vertical whitespace) */ + OP_VSPACE, /* 21 \v (vertical whitespace) */ + OP_EXTUNI, /* 22 \X (extended Unicode sequence */ + OP_EODN, /* 23 End of data or \n at end of data: \Z. */ + OP_EOD, /* 24 End of data: \z */ + + OP_OPT, /* 25 Set runtime options */ + OP_CIRC, /* 26 Start of line - varies with multiline switch */ + OP_DOLL, /* 27 End of line - varies with multiline switch */ + OP_CHAR, /* 28 Match one character, casefully */ + OP_CHARNC, /* 29 Match one character, caselessly */ + OP_NOT, /* 30 Match one character, not the following one */ + + OP_STAR, /* 31 The maximizing and minimizing versions of */ + OP_MINSTAR, /* 32 these six opcodes must come in pairs, with */ + OP_PLUS, /* 33 the minimizing one second. */ + OP_MINPLUS, /* 34 This first set applies to single characters.*/ + OP_QUERY, /* 35 */ + OP_MINQUERY, /* 36 */ + + OP_UPTO, /* 37 From 0 to n matches */ + OP_MINUPTO, /* 38 */ + OP_EXACT, /* 39 Exactly n matches */ + + OP_POSSTAR, /* 40 Possessified star */ + OP_POSPLUS, /* 41 Possessified plus */ + OP_POSQUERY, /* 42 Posesssified query */ + OP_POSUPTO, /* 43 Possessified upto */ + + OP_NOTSTAR, /* 44 The maximizing and minimizing versions of */ + OP_NOTMINSTAR, /* 45 these six opcodes must come in pairs, with */ + OP_NOTPLUS, /* 46 the minimizing one second. They must be in */ + OP_NOTMINPLUS, /* 47 exactly the same order as those above. */ + OP_NOTQUERY, /* 48 This set applies to "not" single characters. */ + OP_NOTMINQUERY, /* 49 */ + + OP_NOTUPTO, /* 50 From 0 to n matches */ + OP_NOTMINUPTO, /* 51 */ + OP_NOTEXACT, /* 52 Exactly n matches */ + + OP_NOTPOSSTAR, /* 53 Possessified versions */ + OP_NOTPOSPLUS, /* 54 */ + OP_NOTPOSQUERY, /* 55 */ + OP_NOTPOSUPTO, /* 56 */ + + OP_TYPESTAR, /* 57 The maximizing and minimizing versions of */ + OP_TYPEMINSTAR, /* 58 these six opcodes must come in pairs, with */ + OP_TYPEPLUS, /* 59 the minimizing one second. These codes must */ + OP_TYPEMINPLUS, /* 60 be in exactly the same order as those above. */ + OP_TYPEQUERY, /* 61 This set applies to character types such as \d */ + OP_TYPEMINQUERY, /* 62 */ + + OP_TYPEUPTO, /* 63 From 0 to n matches */ + OP_TYPEMINUPTO, /* 64 */ + OP_TYPEEXACT, /* 65 Exactly n matches */ + + OP_TYPEPOSSTAR, /* 66 Possessified versions */ + OP_TYPEPOSPLUS, /* 67 */ + OP_TYPEPOSQUERY, /* 68 */ + OP_TYPEPOSUPTO, /* 69 */ + + OP_CRSTAR, /* 70 The maximizing and minimizing versions of */ + OP_CRMINSTAR, /* 71 all these opcodes must come in pairs, with */ + OP_CRPLUS, /* 72 the minimizing one second. These codes must */ + OP_CRMINPLUS, /* 73 be in exactly the same order as those above. */ + OP_CRQUERY, /* 74 These are for character classes and back refs */ + OP_CRMINQUERY, /* 75 */ + OP_CRRANGE, /* 76 These are different to the three sets above. */ + OP_CRMINRANGE, /* 77 */ + + OP_CLASS, /* 78 Match a character class, chars < 256 only */ + OP_NCLASS, /* 79 Same, but the bitmap was created from a negative class - the difference is relevant only when a UTF-8 character > 255 is encountered. */ - OP_XCLASS, /* 79 Extended class for handling UTF-8 chars within the + OP_XCLASS, /* 80 Extended class for handling UTF-8 chars within the class. This does both positive and negative. */ - OP_REF, /* 80 Match a back reference */ - OP_RECURSE, /* 81 Match a numbered subpattern (possibly recursive) */ - OP_CALLOUT, /* 82 Call out to external function if provided */ + OP_REF, /* 81 Match a back reference */ + OP_RECURSE, /* 82 Match a numbered subpattern (possibly recursive) */ + OP_CALLOUT, /* 83 Call out to external function if provided */ - OP_ALT, /* 83 Start of alternation */ - OP_KET, /* 84 End of group that doesn't have an unbounded repeat */ - OP_KETRMAX, /* 85 These two must remain together and in this */ - OP_KETRMIN, /* 86 order. They are for groups the repeat for ever. */ + OP_ALT, /* 84 Start of alternation */ + OP_KET, /* 85 End of group that doesn't have an unbounded repeat */ + OP_KETRMAX, /* 86 These two must remain together and in this */ + OP_KETRMIN, /* 87 order. They are for groups the repeat for ever. */ /* The assertions must come before BRA, CBRA, ONCE, and COND.*/ - OP_ASSERT, /* 87 Positive lookahead */ - OP_ASSERT_NOT, /* 88 Negative lookahead */ - OP_ASSERTBACK, /* 89 Positive lookbehind */ - OP_ASSERTBACK_NOT, /* 90 Negative lookbehind */ - OP_REVERSE, /* 91 Move pointer back - used in lookbehind assertions */ + OP_ASSERT, /* 88 Positive lookahead */ + OP_ASSERT_NOT, /* 89 Negative lookahead */ + OP_ASSERTBACK, /* 90 Positive lookbehind */ + OP_ASSERTBACK_NOT, /* 91 Negative lookbehind */ + OP_REVERSE, /* 92 Move pointer back - used in lookbehind assertions */ /* ONCE, BRA, CBRA, and COND must come after the assertions, with ONCE first, as there's a test for >= ONCE for a subpattern that isn't an assertion. */ - OP_ONCE, /* 92 Atomic group */ - OP_BRA, /* 93 Start of non-capturing bracket */ - OP_CBRA, /* 94 Start of capturing bracket */ - OP_COND, /* 95 Conditional group */ + OP_ONCE, /* 93 Atomic group */ + OP_BRA, /* 94 Start of non-capturing bracket */ + OP_CBRA, /* 95 Start of capturing bracket */ + OP_COND, /* 96 Conditional group */ /* These three must follow the previous three, in the same order. There's a check for >= SBRA to distinguish the two sets. */ - OP_SBRA, /* 96 Start of non-capturing bracket, check empty */ - OP_SCBRA, /* 97 Start of capturing bracket, check empty */ - OP_SCOND, /* 98 Conditional group, check empty */ + OP_SBRA, /* 97 Start of non-capturing bracket, check empty */ + OP_SCBRA, /* 98 Start of capturing bracket, check empty */ + OP_SCOND, /* 99 Conditional group, check empty */ - OP_CREF, /* 99 Used to hold a capture number as condition */ - OP_RREF, /* 100 Used to hold a recursion number as condition */ - OP_DEF, /* 101 The DEFINE condition */ + OP_CREF, /* 100 Used to hold a capture number as condition */ + OP_RREF, /* 101 Used to hold a recursion number as condition */ + OP_DEF, /* 102 The DEFINE condition */ - OP_BRAZERO, /* 102 These two must remain together and in this */ - OP_BRAMINZERO, /* 103 order. */ + OP_BRAZERO, /* 103 These two must remain together and in this */ + OP_BRAMINZERO, /* 104 order. */ /* These are backtracking control verbs */ - OP_PRUNE, /* 104 */ - OP_SKIP, /* 105 */ - OP_THEN, /* 106 */ - OP_COMMIT, /* 107 */ + OP_PRUNE, /* 105 */ + OP_SKIP, /* 106 */ + OP_THEN, /* 107 */ + OP_COMMIT, /* 108 */ /* These are forced failure and success verbs */ - OP_FAIL, /* 108 */ - OP_ACCEPT /* 109 */ + OP_FAIL, /* 109 */ + OP_ACCEPT, /* 110 */ + + /* This is used to skip a subpattern with a {0} quantifier */ + + OP_SKIPZERO /* 111 */ }; @@ -782,7 +805,7 @@ for debugging. The macro is referenced only in pcre_printint.c. */ #define OP_NAME_LIST \ "End", "\\A", "\\G", "\\K", "\\B", "\\b", "\\D", "\\d", \ - "\\S", "\\s", "\\W", "\\w", "Any", "Anybyte", \ + "\\S", "\\s", "\\W", "\\w", "Any", "AllAny", "Anybyte", \ "notprop", "prop", "\\R", "\\H", "\\h", "\\V", "\\v", \ "extuni", "\\Z", "\\z", \ "Opt", "^", "$", "char", "charnc", "not", \ @@ -798,7 +821,8 @@ for debugging. The macro is referenced only in pcre_printint.c. */ "AssertB", "AssertB not", "Reverse", \ "Once", "Bra", "CBra", "Cond", "SBra", "SCBra", "SCond", \ "Cond ref", "Cond rec", "Cond def", "Brazero", "Braminzero", \ - "*PRUNE", "*SKIP", "*THEN", "*COMMIT", "*FAIL", "*ACCEPT" + "*PRUNE", "*SKIP", "*THEN", "*COMMIT", "*FAIL", "*ACCEPT", \ + "Skip zero" /* This macro defines the length of fixed length operations in the compiled @@ -814,7 +838,7 @@ in UTF-8 mode. The code that uses this table must know about such things. */ 1, /* End */ \ 1, 1, 1, 1, 1, /* \A, \G, \K, \B, \b */ \ 1, 1, 1, 1, 1, 1, /* \D, \d, \S, \s, \W, \w */ \ - 1, 1, /* Any, Anybyte */ \ + 1, 1, 1, /* Any, AllAny, Anybyte */ \ 3, 3, 1, /* NOTPROP, PROP, EXTUNI */ \ 1, 1, 1, 1, 1, /* \R, \H, \h, \V, \v */ \ 1, 1, 2, 1, 1, /* \Z, \z, Opt, ^, $ */ \ @@ -863,7 +887,7 @@ in UTF-8 mode. The code that uses this table must know about such things. */ 1, /* DEF */ \ 1, 1, /* BRAZERO, BRAMINZERO */ \ 1, 1, 1, 1, /* PRUNE, SKIP, THEN, COMMIT, */ \ - 1, 1 /* FAIL, ACCEPT */ + 1, 1, 1 /* FAIL, ACCEPT, SKIPZERO */ /* A magic value for OP_RREF to indicate the "any recursion" condition. */ @@ -879,7 +903,7 @@ enum { ERR0, ERR1, ERR2, ERR3, ERR4, ERR5, ERR6, ERR7, ERR8, ERR9, ERR30, ERR31, ERR32, ERR33, ERR34, ERR35, ERR36, ERR37, ERR38, ERR39, ERR40, ERR41, ERR42, ERR43, ERR44, ERR45, ERR46, ERR47, ERR48, ERR49, ERR50, ERR51, ERR52, ERR53, ERR54, ERR55, ERR56, ERR57, ERR58, ERR59, - ERR60, ERR61, ERR62, ERR63 }; + ERR60, ERR61, ERR62, ERR63, ERR64 }; /* The real format of the start of the pcre block; the index of names and the code vector run on as long as necessary after the end. We store an explicit @@ -1004,6 +1028,7 @@ typedef struct match_data { BOOL notbol; /* NOTBOL flag */ BOOL noteol; /* NOTEOL flag */ BOOL utf8; /* UTF8 flag */ + BOOL jscript_compat; /* JAVASCRIPT_COMPAT flag */ BOOL endonly; /* Dollar not before final \n */ BOOL notempty; /* Empty string match not wanted */ BOOL partial; /* PARTIAL flag */ @@ -1114,13 +1139,38 @@ extern BOOL _pcre_is_newline(const uschar *, int, const uschar *, extern int _pcre_ord2utf8(int, uschar *); extern real_pcre *_pcre_try_flipped(const real_pcre *, real_pcre *, const pcre_study_data *, pcre_study_data *); -extern int _pcre_ucp_findprop(const unsigned int, int *, int *); -extern unsigned int _pcre_ucp_othercase(const unsigned int); extern int _pcre_valid_utf8(const uschar *, int); extern BOOL _pcre_was_newline(const uschar *, int, const uschar *, int *, BOOL); extern BOOL _pcre_xclass(int, const uschar *); + +/* Unicode character database (UCD) */ + +typedef struct { + uschar script; + uschar chartype; + pcre_int32 other_case; +} ucd_record; + +extern const ucd_record _pcre_ucd_records[]; +extern const uschar _pcre_ucd_stage1[]; +extern const pcre_uint16 _pcre_ucd_stage2[]; +extern const int _pcre_ucp_gentype[]; + + +/* UCD access macros */ + +#define UCD_BLOCK_SIZE 128 +#define GET_UCD(ch) (_pcre_ucd_records + \ + _pcre_ucd_stage2[_pcre_ucd_stage1[(ch) / UCD_BLOCK_SIZE] * \ + UCD_BLOCK_SIZE + ch % UCD_BLOCK_SIZE]) + +#define UCD_CHARTYPE(ch) GET_UCD(ch)->chartype +#define UCD_SCRIPT(ch) GET_UCD(ch)->script +#define UCD_CATEGORY(ch) _pcre_ucp_gentype[UCD_CHARTYPE(ch)] +#define UCD_OTHERCASE(ch) (ch + GET_UCD(ch)->other_case) + #endif /* End of pcre_internal.h */ diff --git a/ext/pcre/pcrelib/pcre_ord2utf8.c b/ext/pcre/pcrelib/pcre_ord2utf8.c index dfd88bcdb4..7931241d67 100644 --- a/ext/pcre/pcrelib/pcre_ord2utf8.c +++ b/ext/pcre/pcrelib/pcre_ord2utf8.c @@ -76,8 +76,10 @@ for (j = i; j > 0; j--) *buffer = _pcre_utf8_table2[i] | cvalue; return i + 1; #else -return 0; /* Keep compiler happy; this function won't ever be */ -#endif /* called when SUPPORT_UTF8 is not defined. */ +(void)(cvalue); /* Keep compiler happy; this function won't ever be */ +(void)(buffer); /* called when SUPPORT_UTF8 is not defined. */ +return 0; +#endif } /* End of pcre_ord2utf8.c */ diff --git a/ext/pcre/pcrelib/pcre_refcount.c b/ext/pcre/pcrelib/pcre_refcount.c index f31399ea24..c92d578e6e 100644 --- a/ext/pcre/pcrelib/pcre_refcount.c +++ b/ext/pcre/pcrelib/pcre_refcount.c @@ -66,7 +66,7 @@ Returns: the (possibly updated) count value (a non-negative number), or a negative error number */ -PCRE_EXP_DEFN int +PCRE_EXP_DEFN int PCRE_CALL_CONVENTION pcre_refcount(pcre *argument_re, int adjust) { real_pcre *re = (real_pcre *)argument_re; diff --git a/ext/pcre/pcrelib/pcre_study.c b/ext/pcre/pcrelib/pcre_study.c index b396d72184..226cc65941 100644 --- a/ext/pcre/pcrelib/pcre_study.c +++ b/ext/pcre/pcrelib/pcre_study.c @@ -215,6 +215,14 @@ do tcode += 1 + LINK_SIZE; break; + /* SKIPZERO skips the bracket. */ + + case OP_SKIPZERO: + tcode++; + do tcode += GET(tcode,1); while (*tcode == OP_ALT); + tcode += 1 + LINK_SIZE; + break; + /* Single-char * or ? sets the bit and tries the next item */ case OP_STAR: @@ -339,6 +347,7 @@ do switch(tcode[1]) { case OP_ANY: + case OP_ALLANY: return SSB_FAIL; case OP_NOT_DIGIT: @@ -493,7 +502,7 @@ Returns: pointer to a pcre_extra block, with study_data filled in and the NULL on error or if no optimization possible */ -PCRE_EXP_DEFN pcre_extra * +PCRE_EXP_DEFN pcre_extra * PCRE_CALL_CONVENTION pcre_study(const pcre *external_re, int options, const char **errorptr) { uschar start_bits[32]; diff --git a/ext/pcre/pcrelib/pcre_tables.c b/ext/pcre/pcrelib/pcre_tables.c index 646ddb568a..4ce3c3a8ed 100644 --- a/ext/pcre/pcrelib/pcre_tables.c +++ b/ext/pcre/pcrelib/pcre_tables.c @@ -85,6 +85,19 @@ const uschar _pcre_utf8_table4[] = { 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 }; +/* Table to translate from particular type value to the general value. */ + +const int _pcre_ucp_gentype[] = { + ucp_C, ucp_C, ucp_C, ucp_C, ucp_C, /* Cc, Cf, Cn, Co, Cs */ + ucp_L, ucp_L, ucp_L, ucp_L, ucp_L, /* Ll, Lu, Lm, Lo, Lt */ + ucp_M, ucp_M, ucp_M, /* Mc, Me, Mn */ + ucp_N, ucp_N, ucp_N, /* Nd, Nl, No */ + ucp_P, ucp_P, ucp_P, ucp_P, ucp_P, /* Pc, Pd, Pe, Pf, Pi */ + ucp_P, ucp_P, /* Ps, Po */ + ucp_S, ucp_S, ucp_S, ucp_S, /* Sc, Sk, Sm, So */ + ucp_Z, ucp_Z, ucp_Z /* Zl, Zp, Zs */ +}; + /* The pcre_utt[] table below translates Unicode property names into type and code values. It is searched by binary chop, so must be in collating sequence of name. Originally, the table contained pointers to the name strings in the first @@ -92,7 +105,10 @@ field of each entry. However, that leads to a large number of relocations when a shared library is dynamically loaded. A significant reduction is made by putting all the names into a single, large string and then using offsets in the table itself. Maintenance is more error-prone, but frequent changes to this -data is unlikely. */ +data are unlikely. + +July 2008: There is now a script called maint/GenerateUtt.py which can be used +to generate this data instead of maintaining it entirely by hand. */ const char _pcre_utt_names[] = "Any\0" @@ -106,8 +122,10 @@ const char _pcre_utt_names[] = "Buhid\0" "C\0" "Canadian_Aboriginal\0" + "Carian\0" "Cc\0" "Cf\0" + "Cham\0" "Cherokee\0" "Cn\0" "Co\0" @@ -134,12 +152,14 @@ const char _pcre_utt_names[] = "Inherited\0" "Kannada\0" "Katakana\0" + "Kayah_Li\0" "Kharoshthi\0" "Khmer\0" "L\0" "L&\0" "Lao\0" "Latin\0" + "Lepcha\0" "Limbu\0" "Linear_B\0" "Ll\0" @@ -147,6 +167,8 @@ const char _pcre_utt_names[] = "Lo\0" "Lt\0" "Lu\0" + "Lycian\0" + "Lydian\0" "M\0" "Malayalam\0" "Mc\0" @@ -161,6 +183,7 @@ const char _pcre_utt_names[] = "Nl\0" "No\0" "Ogham\0" + "Ol_Chiki\0" "Old_Italic\0" "Old_Persian\0" "Oriya\0" @@ -175,14 +198,17 @@ const char _pcre_utt_names[] = "Pi\0" "Po\0" "Ps\0" + "Rejang\0" "Runic\0" "S\0" + "Saurashtra\0" "Sc\0" "Shavian\0" "Sinhala\0" "Sk\0" "Sm\0" "So\0" + "Sundanese\0" "Syloti_Nagri\0" "Syriac\0" "Tagalog\0" @@ -195,6 +221,7 @@ const char _pcre_utt_names[] = "Tibetan\0" "Tifinagh\0" "Ugaritic\0" + "Vai\0" "Yi\0" "Z\0" "Zl\0" @@ -202,111 +229,122 @@ const char _pcre_utt_names[] = "Zs\0"; const ucp_type_table _pcre_utt[] = { - { 0, PT_ANY, 0 }, - { 4, PT_SC, ucp_Arabic }, - { 11, PT_SC, ucp_Armenian }, - { 20, PT_SC, ucp_Balinese }, - { 29, PT_SC, ucp_Bengali }, - { 37, PT_SC, ucp_Bopomofo }, - { 46, PT_SC, ucp_Braille }, - { 54, PT_SC, ucp_Buginese }, - { 63, PT_SC, ucp_Buhid }, - { 69, PT_GC, ucp_C }, - { 71, PT_SC, ucp_Canadian_Aboriginal }, - { 91, PT_PC, ucp_Cc }, - { 94, PT_PC, ucp_Cf }, - { 97, PT_SC, ucp_Cherokee }, - { 106, PT_PC, ucp_Cn }, - { 109, PT_PC, ucp_Co }, - { 112, PT_SC, ucp_Common }, - { 119, PT_SC, ucp_Coptic }, - { 126, PT_PC, ucp_Cs }, - { 129, PT_SC, ucp_Cuneiform }, - { 139, PT_SC, ucp_Cypriot }, - { 147, PT_SC, ucp_Cyrillic }, - { 156, PT_SC, ucp_Deseret }, - { 164, PT_SC, ucp_Devanagari }, - { 175, PT_SC, ucp_Ethiopic }, - { 184, PT_SC, ucp_Georgian }, - { 193, PT_SC, ucp_Glagolitic }, - { 204, PT_SC, ucp_Gothic }, - { 211, PT_SC, ucp_Greek }, - { 217, PT_SC, ucp_Gujarati }, - { 226, PT_SC, ucp_Gurmukhi }, - { 235, PT_SC, ucp_Han }, - { 239, PT_SC, ucp_Hangul }, - { 246, PT_SC, ucp_Hanunoo }, - { 254, PT_SC, ucp_Hebrew }, - { 261, PT_SC, ucp_Hiragana }, - { 270, PT_SC, ucp_Inherited }, - { 280, PT_SC, ucp_Kannada }, - { 288, PT_SC, ucp_Katakana }, - { 297, PT_SC, ucp_Kharoshthi }, - { 308, PT_SC, ucp_Khmer }, - { 314, PT_GC, ucp_L }, - { 316, PT_LAMP, 0 }, - { 319, PT_SC, ucp_Lao }, - { 323, PT_SC, ucp_Latin }, - { 329, PT_SC, ucp_Limbu }, - { 335, PT_SC, ucp_Linear_B }, - { 344, PT_PC, ucp_Ll }, - { 347, PT_PC, ucp_Lm }, - { 350, PT_PC, ucp_Lo }, - { 353, PT_PC, ucp_Lt }, - { 356, PT_PC, ucp_Lu }, - { 359, PT_GC, ucp_M }, - { 361, PT_SC, ucp_Malayalam }, - { 371, PT_PC, ucp_Mc }, - { 374, PT_PC, ucp_Me }, - { 377, PT_PC, ucp_Mn }, - { 380, PT_SC, ucp_Mongolian }, - { 390, PT_SC, ucp_Myanmar }, - { 398, PT_GC, ucp_N }, - { 400, PT_PC, ucp_Nd }, - { 403, PT_SC, ucp_New_Tai_Lue }, - { 415, PT_SC, ucp_Nko }, - { 419, PT_PC, ucp_Nl }, - { 422, PT_PC, ucp_No }, - { 425, PT_SC, ucp_Ogham }, - { 431, PT_SC, ucp_Old_Italic }, - { 442, PT_SC, ucp_Old_Persian }, - { 454, PT_SC, ucp_Oriya }, - { 460, PT_SC, ucp_Osmanya }, - { 468, PT_GC, ucp_P }, - { 470, PT_PC, ucp_Pc }, - { 473, PT_PC, ucp_Pd }, - { 476, PT_PC, ucp_Pe }, - { 479, PT_PC, ucp_Pf }, - { 482, PT_SC, ucp_Phags_Pa }, - { 491, PT_SC, ucp_Phoenician }, - { 502, PT_PC, ucp_Pi }, - { 505, PT_PC, ucp_Po }, - { 508, PT_PC, ucp_Ps }, - { 511, PT_SC, ucp_Runic }, - { 517, PT_GC, ucp_S }, - { 519, PT_PC, ucp_Sc }, - { 522, PT_SC, ucp_Shavian }, - { 530, PT_SC, ucp_Sinhala }, - { 538, PT_PC, ucp_Sk }, - { 541, PT_PC, ucp_Sm }, - { 544, PT_PC, ucp_So }, - { 547, PT_SC, ucp_Syloti_Nagri }, - { 560, PT_SC, ucp_Syriac }, - { 567, PT_SC, ucp_Tagalog }, - { 575, PT_SC, ucp_Tagbanwa }, - { 584, PT_SC, ucp_Tai_Le }, - { 591, PT_SC, ucp_Tamil }, - { 597, PT_SC, ucp_Telugu }, - { 604, PT_SC, ucp_Thaana }, - { 611, PT_SC, ucp_Thai }, - { 616, PT_SC, ucp_Tibetan }, - { 624, PT_SC, ucp_Tifinagh }, - { 633, PT_SC, ucp_Ugaritic }, - { 642, PT_SC, ucp_Yi }, - { 645, PT_GC, ucp_Z }, - { 647, PT_PC, ucp_Zl }, - { 650, PT_PC, ucp_Zp }, - { 653, PT_PC, ucp_Zs } + { 0, PT_ANY, 0 }, + { 4, PT_SC, ucp_Arabic }, + { 11, PT_SC, ucp_Armenian }, + { 20, PT_SC, ucp_Balinese }, + { 29, PT_SC, ucp_Bengali }, + { 37, PT_SC, ucp_Bopomofo }, + { 46, PT_SC, ucp_Braille }, + { 54, PT_SC, ucp_Buginese }, + { 63, PT_SC, ucp_Buhid }, + { 69, PT_GC, ucp_C }, + { 71, PT_SC, ucp_Canadian_Aboriginal }, + { 91, PT_SC, ucp_Carian }, + { 98, PT_PC, ucp_Cc }, + { 101, PT_PC, ucp_Cf }, + { 104, PT_SC, ucp_Cham }, + { 109, PT_SC, ucp_Cherokee }, + { 118, PT_PC, ucp_Cn }, + { 121, PT_PC, ucp_Co }, + { 124, PT_SC, ucp_Common }, + { 131, PT_SC, ucp_Coptic }, + { 138, PT_PC, ucp_Cs }, + { 141, PT_SC, ucp_Cuneiform }, + { 151, PT_SC, ucp_Cypriot }, + { 159, PT_SC, ucp_Cyrillic }, + { 168, PT_SC, ucp_Deseret }, + { 176, PT_SC, ucp_Devanagari }, + { 187, PT_SC, ucp_Ethiopic }, + { 196, PT_SC, ucp_Georgian }, + { 205, PT_SC, ucp_Glagolitic }, + { 216, PT_SC, ucp_Gothic }, + { 223, PT_SC, ucp_Greek }, + { 229, PT_SC, ucp_Gujarati }, + { 238, PT_SC, ucp_Gurmukhi }, + { 247, PT_SC, ucp_Han }, + { 251, PT_SC, ucp_Hangul }, + { 258, PT_SC, ucp_Hanunoo }, + { 266, PT_SC, ucp_Hebrew }, + { 273, PT_SC, ucp_Hiragana }, + { 282, PT_SC, ucp_Inherited }, + { 292, PT_SC, ucp_Kannada }, + { 300, PT_SC, ucp_Katakana }, + { 309, PT_SC, ucp_Kayah_Li }, + { 318, PT_SC, ucp_Kharoshthi }, + { 329, PT_SC, ucp_Khmer }, + { 335, PT_GC, ucp_L }, + { 337, PT_LAMP, 0 }, + { 340, PT_SC, ucp_Lao }, + { 344, PT_SC, ucp_Latin }, + { 350, PT_SC, ucp_Lepcha }, + { 357, PT_SC, ucp_Limbu }, + { 363, PT_SC, ucp_Linear_B }, + { 372, PT_PC, ucp_Ll }, + { 375, PT_PC, ucp_Lm }, + { 378, PT_PC, ucp_Lo }, + { 381, PT_PC, ucp_Lt }, + { 384, PT_PC, ucp_Lu }, + { 387, PT_SC, ucp_Lycian }, + { 394, PT_SC, ucp_Lydian }, + { 401, PT_GC, ucp_M }, + { 403, PT_SC, ucp_Malayalam }, + { 413, PT_PC, ucp_Mc }, + { 416, PT_PC, ucp_Me }, + { 419, PT_PC, ucp_Mn }, + { 422, PT_SC, ucp_Mongolian }, + { 432, PT_SC, ucp_Myanmar }, + { 440, PT_GC, ucp_N }, + { 442, PT_PC, ucp_Nd }, + { 445, PT_SC, ucp_New_Tai_Lue }, + { 457, PT_SC, ucp_Nko }, + { 461, PT_PC, ucp_Nl }, + { 464, PT_PC, ucp_No }, + { 467, PT_SC, ucp_Ogham }, + { 473, PT_SC, ucp_Ol_Chiki }, + { 482, PT_SC, ucp_Old_Italic }, + { 493, PT_SC, ucp_Old_Persian }, + { 505, PT_SC, ucp_Oriya }, + { 511, PT_SC, ucp_Osmanya }, + { 519, PT_GC, ucp_P }, + { 521, PT_PC, ucp_Pc }, + { 524, PT_PC, ucp_Pd }, + { 527, PT_PC, ucp_Pe }, + { 530, PT_PC, ucp_Pf }, + { 533, PT_SC, ucp_Phags_Pa }, + { 542, PT_SC, ucp_Phoenician }, + { 553, PT_PC, ucp_Pi }, + { 556, PT_PC, ucp_Po }, + { 559, PT_PC, ucp_Ps }, + { 562, PT_SC, ucp_Rejang }, + { 569, PT_SC, ucp_Runic }, + { 575, PT_GC, ucp_S }, + { 577, PT_SC, ucp_Saurashtra }, + { 588, PT_PC, ucp_Sc }, + { 591, PT_SC, ucp_Shavian }, + { 599, PT_SC, ucp_Sinhala }, + { 607, PT_PC, ucp_Sk }, + { 610, PT_PC, ucp_Sm }, + { 613, PT_PC, ucp_So }, + { 616, PT_SC, ucp_Sundanese }, + { 626, PT_SC, ucp_Syloti_Nagri }, + { 639, PT_SC, ucp_Syriac }, + { 646, PT_SC, ucp_Tagalog }, + { 654, PT_SC, ucp_Tagbanwa }, + { 663, PT_SC, ucp_Tai_Le }, + { 670, PT_SC, ucp_Tamil }, + { 676, PT_SC, ucp_Telugu }, + { 683, PT_SC, ucp_Thaana }, + { 690, PT_SC, ucp_Thai }, + { 695, PT_SC, ucp_Tibetan }, + { 703, PT_SC, ucp_Tifinagh }, + { 712, PT_SC, ucp_Ugaritic }, + { 721, PT_SC, ucp_Vai }, + { 725, PT_SC, ucp_Yi }, + { 728, PT_GC, ucp_Z }, + { 730, PT_PC, ucp_Zl }, + { 733, PT_PC, ucp_Zp }, + { 736, PT_PC, ucp_Zs } }; const int _pcre_utt_size = sizeof(_pcre_utt)/sizeof(ucp_type_table); diff --git a/ext/pcre/pcrelib/pcre_ucd.c b/ext/pcre/pcrelib/pcre_ucd.c new file mode 100644 index 0000000000..33394a0395 --- /dev/null +++ b/ext/pcre/pcrelib/pcre_ucd.c @@ -0,0 +1,2608 @@ +#include "config.h" +#include "pcre_internal.h" + +/* Unicode character database. */ +/* This file was autogenerated by the MultiStage2.py script. */ +/* Total size: 52808 bytes, block size: 128. */ +/* When recompiling tables with a new Unicode version, +please check types in the structure definition from pcre_internal.h: +typedef struct { +uschar property_0; +uschar property_1; +pcre_int32 property_2; +} ucd_record; */ + + +const ucd_record _pcre_ucd_records[] = { /* 3656 bytes, record size 8 */ + { 9, 0, 0, }, /* 0 */ + { 9, 29, 0, }, /* 1 */ + { 9, 21, 0, }, /* 2 */ + { 9, 23, 0, }, /* 3 */ + { 9, 22, 0, }, /* 4 */ + { 9, 18, 0, }, /* 5 */ + { 9, 25, 0, }, /* 6 */ + { 9, 17, 0, }, /* 7 */ + { 9, 13, 0, }, /* 8 */ + { 33, 9, 32, }, /* 9 */ + { 9, 24, 0, }, /* 10 */ + { 9, 16, 0, }, /* 11 */ + { 33, 5, -32, }, /* 12 */ + { 9, 26, 0, }, /* 13 */ + { 33, 5, 0, }, /* 14 */ + { 9, 20, 0, }, /* 15 */ + { 9, 1, 0, }, /* 16 */ + { 9, 15, 0, }, /* 17 */ + { 9, 5, 743, }, /* 18 */ + { 9, 19, 0, }, /* 19 */ + { 33, 5, 121, }, /* 20 */ + { 33, 9, 1, }, /* 21 */ + { 33, 5, -1, }, /* 22 */ + { 33, 9, -199, }, /* 23 */ + { 33, 5, -232, }, /* 24 */ + { 33, 9, -121, }, /* 25 */ + { 33, 5, -300, }, /* 26 */ + { 33, 5, 195, }, /* 27 */ + { 33, 9, 210, }, /* 28 */ + { 33, 9, 206, }, /* 29 */ + { 33, 9, 205, }, /* 30 */ + { 33, 9, 79, }, /* 31 */ + { 33, 9, 202, }, /* 32 */ + { 33, 9, 203, }, /* 33 */ + { 33, 9, 207, }, /* 34 */ + { 33, 5, 97, }, /* 35 */ + { 33, 9, 211, }, /* 36 */ + { 33, 9, 209, }, /* 37 */ + { 33, 5, 163, }, /* 38 */ + { 33, 9, 213, }, /* 39 */ + { 33, 5, 130, }, /* 40 */ + { 33, 9, 214, }, /* 41 */ + { 33, 9, 218, }, /* 42 */ + { 33, 9, 217, }, /* 43 */ + { 33, 9, 219, }, /* 44 */ + { 33, 7, 0, }, /* 45 */ + { 33, 5, 56, }, /* 46 */ + { 33, 9, 2, }, /* 47 */ + { 33, 8, -1, }, /* 48 */ + { 33, 5, -2, }, /* 49 */ + { 33, 5, -79, }, /* 50 */ + { 33, 9, -97, }, /* 51 */ + { 33, 9, -56, }, /* 52 */ + { 33, 9, -130, }, /* 53 */ + { 33, 9, 10795, }, /* 54 */ + { 33, 9, -163, }, /* 55 */ + { 33, 9, 10792, }, /* 56 */ + { 33, 9, -195, }, /* 57 */ + { 33, 9, 69, }, /* 58 */ + { 33, 9, 71, }, /* 59 */ + { 33, 5, 10783, }, /* 60 */ + { 33, 5, 10780, }, /* 61 */ + { 33, 5, -210, }, /* 62 */ + { 33, 5, -206, }, /* 63 */ + { 33, 5, -205, }, /* 64 */ + { 33, 5, -202, }, /* 65 */ + { 33, 5, -203, }, /* 66 */ + { 33, 5, -207, }, /* 67 */ + { 33, 5, -209, }, /* 68 */ + { 33, 5, -211, }, /* 69 */ + { 33, 5, 10743, }, /* 70 */ + { 33, 5, 10749, }, /* 71 */ + { 33, 5, -213, }, /* 72 */ + { 33, 5, -214, }, /* 73 */ + { 33, 5, 10727, }, /* 74 */ + { 33, 5, -218, }, /* 75 */ + { 33, 5, -69, }, /* 76 */ + { 33, 5, -217, }, /* 77 */ + { 33, 5, -71, }, /* 78 */ + { 33, 5, -219, }, /* 79 */ + { 33, 6, 0, }, /* 80 */ + { 9, 6, 0, }, /* 81 */ + { 27, 12, 0, }, /* 82 */ + { 27, 12, 84, }, /* 83 */ + { 19, 9, 1, }, /* 84 */ + { 19, 5, -1, }, /* 85 */ + { 19, 24, 0, }, /* 86 */ + { 9, 2, 0, }, /* 87 */ + { 19, 6, 0, }, /* 88 */ + { 19, 5, 130, }, /* 89 */ + { 19, 9, 38, }, /* 90 */ + { 19, 9, 37, }, /* 91 */ + { 19, 9, 64, }, /* 92 */ + { 19, 9, 63, }, /* 93 */ + { 19, 5, 0, }, /* 94 */ + { 19, 9, 32, }, /* 95 */ + { 19, 5, -38, }, /* 96 */ + { 19, 5, -37, }, /* 97 */ + { 19, 5, -32, }, /* 98 */ + { 19, 5, -31, }, /* 99 */ + { 19, 5, -64, }, /* 100 */ + { 19, 5, -63, }, /* 101 */ + { 19, 9, 8, }, /* 102 */ + { 19, 5, -62, }, /* 103 */ + { 19, 5, -57, }, /* 104 */ + { 19, 9, 0, }, /* 105 */ + { 19, 5, -47, }, /* 106 */ + { 19, 5, -54, }, /* 107 */ + { 19, 5, -8, }, /* 108 */ + { 10, 9, 1, }, /* 109 */ + { 10, 5, -1, }, /* 110 */ + { 19, 5, -86, }, /* 111 */ + { 19, 5, -80, }, /* 112 */ + { 19, 5, 7, }, /* 113 */ + { 19, 9, -60, }, /* 114 */ + { 19, 5, -96, }, /* 115 */ + { 19, 25, 0, }, /* 116 */ + { 19, 9, -7, }, /* 117 */ + { 19, 9, -130, }, /* 118 */ + { 12, 9, 80, }, /* 119 */ + { 12, 9, 32, }, /* 120 */ + { 12, 5, -32, }, /* 121 */ + { 12, 5, -80, }, /* 122 */ + { 12, 9, 1, }, /* 123 */ + { 12, 5, -1, }, /* 124 */ + { 12, 26, 0, }, /* 125 */ + { 12, 12, 0, }, /* 126 */ + { 12, 11, 0, }, /* 127 */ + { 12, 9, 15, }, /* 128 */ + { 12, 5, -15, }, /* 129 */ + { 1, 9, 48, }, /* 130 */ + { 1, 6, 0, }, /* 131 */ + { 1, 21, 0, }, /* 132 */ + { 1, 5, -48, }, /* 133 */ + { 1, 5, 0, }, /* 134 */ + { 1, 17, 0, }, /* 135 */ + { 25, 12, 0, }, /* 136 */ + { 25, 17, 0, }, /* 137 */ + { 25, 21, 0, }, /* 138 */ + { 25, 7, 0, }, /* 139 */ + { 0, 25, 0, }, /* 140 */ + { 0, 21, 0, }, /* 141 */ + { 0, 23, 0, }, /* 142 */ + { 0, 26, 0, }, /* 143 */ + { 0, 12, 0, }, /* 144 */ + { 0, 7, 0, }, /* 145 */ + { 0, 11, 0, }, /* 146 */ + { 0, 6, 0, }, /* 147 */ + { 0, 13, 0, }, /* 148 */ + { 49, 21, 0, }, /* 149 */ + { 49, 1, 0, }, /* 150 */ + { 49, 7, 0, }, /* 151 */ + { 49, 12, 0, }, /* 152 */ + { 55, 7, 0, }, /* 153 */ + { 55, 12, 0, }, /* 154 */ + { 63, 13, 0, }, /* 155 */ + { 63, 7, 0, }, /* 156 */ + { 63, 12, 0, }, /* 157 */ + { 63, 6, 0, }, /* 158 */ + { 63, 26, 0, }, /* 159 */ + { 63, 21, 0, }, /* 160 */ + { 14, 12, 0, }, /* 161 */ + { 14, 10, 0, }, /* 162 */ + { 14, 7, 0, }, /* 163 */ + { 14, 13, 0, }, /* 164 */ + { 14, 6, 0, }, /* 165 */ + { 2, 12, 0, }, /* 166 */ + { 2, 10, 0, }, /* 167 */ + { 2, 7, 0, }, /* 168 */ + { 2, 13, 0, }, /* 169 */ + { 2, 23, 0, }, /* 170 */ + { 2, 15, 0, }, /* 171 */ + { 2, 26, 0, }, /* 172 */ + { 21, 12, 0, }, /* 173 */ + { 21, 10, 0, }, /* 174 */ + { 21, 7, 0, }, /* 175 */ + { 21, 13, 0, }, /* 176 */ + { 20, 12, 0, }, /* 177 */ + { 20, 10, 0, }, /* 178 */ + { 20, 7, 0, }, /* 179 */ + { 20, 13, 0, }, /* 180 */ + { 20, 23, 0, }, /* 181 */ + { 43, 12, 0, }, /* 182 */ + { 43, 10, 0, }, /* 183 */ + { 43, 7, 0, }, /* 184 */ + { 43, 13, 0, }, /* 185 */ + { 43, 26, 0, }, /* 186 */ + { 53, 12, 0, }, /* 187 */ + { 53, 7, 0, }, /* 188 */ + { 53, 10, 0, }, /* 189 */ + { 53, 13, 0, }, /* 190 */ + { 53, 15, 0, }, /* 191 */ + { 53, 26, 0, }, /* 192 */ + { 53, 23, 0, }, /* 193 */ + { 54, 10, 0, }, /* 194 */ + { 54, 7, 0, }, /* 195 */ + { 54, 12, 0, }, /* 196 */ + { 54, 13, 0, }, /* 197 */ + { 54, 15, 0, }, /* 198 */ + { 54, 26, 0, }, /* 199 */ + { 28, 10, 0, }, /* 200 */ + { 28, 7, 0, }, /* 201 */ + { 28, 12, 0, }, /* 202 */ + { 28, 13, 0, }, /* 203 */ + { 36, 10, 0, }, /* 204 */ + { 36, 7, 0, }, /* 205 */ + { 36, 12, 0, }, /* 206 */ + { 36, 13, 0, }, /* 207 */ + { 36, 15, 0, }, /* 208 */ + { 36, 26, 0, }, /* 209 */ + { 47, 10, 0, }, /* 210 */ + { 47, 7, 0, }, /* 211 */ + { 47, 12, 0, }, /* 212 */ + { 47, 21, 0, }, /* 213 */ + { 56, 7, 0, }, /* 214 */ + { 56, 12, 0, }, /* 215 */ + { 56, 6, 0, }, /* 216 */ + { 56, 21, 0, }, /* 217 */ + { 56, 13, 0, }, /* 218 */ + { 32, 7, 0, }, /* 219 */ + { 32, 12, 0, }, /* 220 */ + { 32, 6, 0, }, /* 221 */ + { 32, 13, 0, }, /* 222 */ + { 57, 7, 0, }, /* 223 */ + { 57, 26, 0, }, /* 224 */ + { 57, 21, 0, }, /* 225 */ + { 57, 12, 0, }, /* 226 */ + { 57, 13, 0, }, /* 227 */ + { 57, 15, 0, }, /* 228 */ + { 57, 22, 0, }, /* 229 */ + { 57, 18, 0, }, /* 230 */ + { 57, 10, 0, }, /* 231 */ + { 38, 7, 0, }, /* 232 */ + { 38, 10, 0, }, /* 233 */ + { 38, 12, 0, }, /* 234 */ + { 38, 13, 0, }, /* 235 */ + { 38, 21, 0, }, /* 236 */ + { 38, 26, 0, }, /* 237 */ + { 16, 9, 7264, }, /* 238 */ + { 16, 7, 0, }, /* 239 */ + { 16, 6, 0, }, /* 240 */ + { 23, 7, 0, }, /* 241 */ + { 15, 7, 0, }, /* 242 */ + { 15, 12, 0, }, /* 243 */ + { 15, 26, 0, }, /* 244 */ + { 15, 21, 0, }, /* 245 */ + { 15, 15, 0, }, /* 246 */ + { 8, 7, 0, }, /* 247 */ + { 7, 7, 0, }, /* 248 */ + { 7, 21, 0, }, /* 249 */ + { 40, 29, 0, }, /* 250 */ + { 40, 7, 0, }, /* 251 */ + { 40, 22, 0, }, /* 252 */ + { 40, 18, 0, }, /* 253 */ + { 45, 7, 0, }, /* 254 */ + { 45, 14, 0, }, /* 255 */ + { 50, 7, 0, }, /* 256 */ + { 50, 12, 0, }, /* 257 */ + { 24, 7, 0, }, /* 258 */ + { 24, 12, 0, }, /* 259 */ + { 6, 7, 0, }, /* 260 */ + { 6, 12, 0, }, /* 261 */ + { 51, 7, 0, }, /* 262 */ + { 51, 12, 0, }, /* 263 */ + { 31, 7, 0, }, /* 264 */ + { 31, 1, 0, }, /* 265 */ + { 31, 10, 0, }, /* 266 */ + { 31, 12, 0, }, /* 267 */ + { 31, 21, 0, }, /* 268 */ + { 31, 6, 0, }, /* 269 */ + { 31, 23, 0, }, /* 270 */ + { 31, 13, 0, }, /* 271 */ + { 31, 15, 0, }, /* 272 */ + { 37, 21, 0, }, /* 273 */ + { 37, 17, 0, }, /* 274 */ + { 37, 12, 0, }, /* 275 */ + { 37, 29, 0, }, /* 276 */ + { 37, 13, 0, }, /* 277 */ + { 37, 7, 0, }, /* 278 */ + { 37, 6, 0, }, /* 279 */ + { 34, 7, 0, }, /* 280 */ + { 34, 12, 0, }, /* 281 */ + { 34, 10, 0, }, /* 282 */ + { 34, 26, 0, }, /* 283 */ + { 34, 21, 0, }, /* 284 */ + { 34, 13, 0, }, /* 285 */ + { 52, 7, 0, }, /* 286 */ + { 39, 7, 0, }, /* 287 */ + { 39, 10, 0, }, /* 288 */ + { 39, 13, 0, }, /* 289 */ + { 39, 21, 0, }, /* 290 */ + { 31, 26, 0, }, /* 291 */ + { 5, 7, 0, }, /* 292 */ + { 5, 12, 0, }, /* 293 */ + { 5, 10, 0, }, /* 294 */ + { 5, 21, 0, }, /* 295 */ + { 61, 12, 0, }, /* 296 */ + { 61, 10, 0, }, /* 297 */ + { 61, 7, 0, }, /* 298 */ + { 61, 13, 0, }, /* 299 */ + { 61, 21, 0, }, /* 300 */ + { 61, 26, 0, }, /* 301 */ + { 75, 12, 0, }, /* 302 */ + { 75, 10, 0, }, /* 303 */ + { 75, 7, 0, }, /* 304 */ + { 75, 13, 0, }, /* 305 */ + { 69, 7, 0, }, /* 306 */ + { 69, 10, 0, }, /* 307 */ + { 69, 12, 0, }, /* 308 */ + { 69, 21, 0, }, /* 309 */ + { 69, 13, 0, }, /* 310 */ + { 72, 13, 0, }, /* 311 */ + { 72, 7, 0, }, /* 312 */ + { 72, 6, 0, }, /* 313 */ + { 72, 21, 0, }, /* 314 */ + { 12, 5, 0, }, /* 315 */ + { 12, 6, 0, }, /* 316 */ + { 33, 5, 35332, }, /* 317 */ + { 33, 5, 3814, }, /* 318 */ + { 33, 5, -59, }, /* 319 */ + { 33, 9, -7615, }, /* 320 */ + { 19, 5, 8, }, /* 321 */ + { 19, 9, -8, }, /* 322 */ + { 19, 5, 74, }, /* 323 */ + { 19, 5, 86, }, /* 324 */ + { 19, 5, 100, }, /* 325 */ + { 19, 5, 128, }, /* 326 */ + { 19, 5, 112, }, /* 327 */ + { 19, 5, 126, }, /* 328 */ + { 19, 8, -8, }, /* 329 */ + { 19, 5, 9, }, /* 330 */ + { 19, 9, -74, }, /* 331 */ + { 19, 8, -9, }, /* 332 */ + { 19, 5, -7205, }, /* 333 */ + { 19, 9, -86, }, /* 334 */ + { 19, 9, -100, }, /* 335 */ + { 19, 9, -112, }, /* 336 */ + { 19, 9, -128, }, /* 337 */ + { 19, 9, -126, }, /* 338 */ + { 27, 1, 0, }, /* 339 */ + { 9, 27, 0, }, /* 340 */ + { 9, 28, 0, }, /* 341 */ + { 27, 11, 0, }, /* 342 */ + { 9, 9, 0, }, /* 343 */ + { 9, 5, 0, }, /* 344 */ + { 19, 9, -7517, }, /* 345 */ + { 33, 9, -8383, }, /* 346 */ + { 33, 9, -8262, }, /* 347 */ + { 33, 9, 28, }, /* 348 */ + { 9, 7, 0, }, /* 349 */ + { 33, 5, -28, }, /* 350 */ + { 33, 14, 16, }, /* 351 */ + { 33, 14, -16, }, /* 352 */ + { 33, 14, 0, }, /* 353 */ + { 9, 26, 26, }, /* 354 */ + { 9, 26, -26, }, /* 355 */ + { 4, 26, 0, }, /* 356 */ + { 17, 9, 48, }, /* 357 */ + { 17, 5, -48, }, /* 358 */ + { 33, 9, -10743, }, /* 359 */ + { 33, 9, -3814, }, /* 360 */ + { 33, 9, -10727, }, /* 361 */ + { 33, 5, -10795, }, /* 362 */ + { 33, 5, -10792, }, /* 363 */ + { 33, 9, -10780, }, /* 364 */ + { 33, 9, -10749, }, /* 365 */ + { 33, 9, -10783, }, /* 366 */ + { 10, 5, 0, }, /* 367 */ + { 10, 26, 0, }, /* 368 */ + { 10, 21, 0, }, /* 369 */ + { 10, 15, 0, }, /* 370 */ + { 16, 5, -7264, }, /* 371 */ + { 58, 7, 0, }, /* 372 */ + { 58, 6, 0, }, /* 373 */ + { 22, 26, 0, }, /* 374 */ + { 22, 6, 0, }, /* 375 */ + { 22, 14, 0, }, /* 376 */ + { 26, 7, 0, }, /* 377 */ + { 26, 6, 0, }, /* 378 */ + { 29, 7, 0, }, /* 379 */ + { 29, 6, 0, }, /* 380 */ + { 3, 7, 0, }, /* 381 */ + { 23, 26, 0, }, /* 382 */ + { 29, 26, 0, }, /* 383 */ + { 22, 7, 0, }, /* 384 */ + { 60, 7, 0, }, /* 385 */ + { 60, 6, 0, }, /* 386 */ + { 60, 26, 0, }, /* 387 */ + { 76, 7, 0, }, /* 388 */ + { 76, 6, 0, }, /* 389 */ + { 76, 21, 0, }, /* 390 */ + { 76, 13, 0, }, /* 391 */ + { 12, 7, 0, }, /* 392 */ + { 12, 21, 0, }, /* 393 */ + { 33, 9, -35332, }, /* 394 */ + { 48, 7, 0, }, /* 395 */ + { 48, 12, 0, }, /* 396 */ + { 48, 10, 0, }, /* 397 */ + { 48, 26, 0, }, /* 398 */ + { 64, 7, 0, }, /* 399 */ + { 64, 21, 0, }, /* 400 */ + { 74, 10, 0, }, /* 401 */ + { 74, 7, 0, }, /* 402 */ + { 74, 12, 0, }, /* 403 */ + { 74, 21, 0, }, /* 404 */ + { 74, 13, 0, }, /* 405 */ + { 68, 13, 0, }, /* 406 */ + { 68, 7, 0, }, /* 407 */ + { 68, 12, 0, }, /* 408 */ + { 68, 21, 0, }, /* 409 */ + { 73, 7, 0, }, /* 410 */ + { 73, 12, 0, }, /* 411 */ + { 73, 10, 0, }, /* 412 */ + { 73, 21, 0, }, /* 413 */ + { 67, 7, 0, }, /* 414 */ + { 67, 12, 0, }, /* 415 */ + { 67, 10, 0, }, /* 416 */ + { 67, 13, 0, }, /* 417 */ + { 67, 21, 0, }, /* 418 */ + { 9, 4, 0, }, /* 419 */ + { 9, 3, 0, }, /* 420 */ + { 25, 25, 0, }, /* 421 */ + { 35, 7, 0, }, /* 422 */ + { 19, 14, 0, }, /* 423 */ + { 19, 15, 0, }, /* 424 */ + { 19, 26, 0, }, /* 425 */ + { 70, 7, 0, }, /* 426 */ + { 66, 7, 0, }, /* 427 */ + { 41, 7, 0, }, /* 428 */ + { 41, 15, 0, }, /* 429 */ + { 18, 7, 0, }, /* 430 */ + { 18, 14, 0, }, /* 431 */ + { 59, 7, 0, }, /* 432 */ + { 59, 21, 0, }, /* 433 */ + { 42, 7, 0, }, /* 434 */ + { 42, 21, 0, }, /* 435 */ + { 42, 14, 0, }, /* 436 */ + { 13, 9, 40, }, /* 437 */ + { 13, 5, -40, }, /* 438 */ + { 46, 7, 0, }, /* 439 */ + { 44, 7, 0, }, /* 440 */ + { 44, 13, 0, }, /* 441 */ + { 11, 7, 0, }, /* 442 */ + { 65, 7, 0, }, /* 443 */ + { 65, 15, 0, }, /* 444 */ + { 65, 21, 0, }, /* 445 */ + { 71, 7, 0, }, /* 446 */ + { 71, 21, 0, }, /* 447 */ + { 30, 7, 0, }, /* 448 */ + { 30, 12, 0, }, /* 449 */ + { 30, 15, 0, }, /* 450 */ + { 30, 21, 0, }, /* 451 */ + { 62, 7, 0, }, /* 452 */ + { 62, 14, 0, }, /* 453 */ + { 62, 21, 0, }, /* 454 */ + { 9, 10, 0, }, /* 455 */ + { 19, 12, 0, }, /* 456 */ +}; + +const uschar _pcre_ucd_stage1[] = { /* 8704 bytes */ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, /* U+0000 */ + 16, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, /* U+0800 */ + 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 40, 40, 41, 42, 43, 44, /* U+1000 */ + 45, 46, 47, 48, 49, 16, 50, 51, 52, 16, 53, 54, 55, 56, 57, 58, /* U+1800 */ + 59, 60, 61, 62, 63, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, /* U+2000 */ + 74, 74, 63, 75, 63, 63, 76, 16, 77, 78, 79, 80, 81, 82, 83, 84, /* U+2800 */ + 85, 86, 87, 88, 89, 90, 91, 68, 92, 92, 92, 92, 92, 92, 92, 92, /* U+3000 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+3800 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+4000 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 93, 92, 92, 92, 92, /* U+4800 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+5000 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+5800 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+6000 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+6800 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+7000 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+7800 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+8000 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+8800 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+9000 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 94, /* U+9800 */ + 95, 96, 96, 96, 96, 96, 96, 96, 96, 97, 98, 98, 99,100,101,102, /* U+A000 */ +103,104,105, 16,106, 16, 16, 16,107,107,107,107,107,107,107,107, /* U+A800 */ +107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107, /* U+B000 */ +107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107, /* U+B800 */ +107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107, /* U+C000 */ +107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107, /* U+C800 */ +107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,108, /* U+D000 */ +109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, /* U+D800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+E000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+E800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F000 */ +110,110, 92, 92,111,112,113,114,115,115,116,117,118,119,120,121, /* U+F800 */ +122,123,124,125, 16,126,127,128,129,130, 16, 16, 16, 16, 16, 16, /* U+10000 */ +131, 16,132, 16,133, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+10800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+11000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+11800 */ +134,134,134,134,134,134,135, 16,136, 16, 16, 16, 16, 16, 16, 16, /* U+12000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+12800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+13000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+13800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+14000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+14800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+15000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+15800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+16000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+16800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+17000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+17800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+18000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+18800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+19000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+19800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+1A000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+1A800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+1B000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+1B800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+1C000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+1C800 */ + 68,137,138,139,140, 16,141, 16,142,143,144,145,146,147,148,149, /* U+1D000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+1D800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+1E000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+1E800 */ +150,151, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+1F000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+1F800 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+20000 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+20800 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+21000 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+21800 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+22000 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+22800 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+23000 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+23800 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+24000 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+24800 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+25000 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+25800 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+26000 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+26800 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+27000 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+27800 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+28000 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+28800 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+29000 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+29800 */ + 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,152, 16, 16, /* U+2A000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+2A800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+2B000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+2B800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+2C000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+2C800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+2D000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+2D800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+2E000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+2E800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+2F000 */ + 92, 92, 92, 92,153, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+2F800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+30000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+30800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+31000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+31800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+32000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+32800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+33000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+33800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+34000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+34800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+35000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+35800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+36000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+36800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+37000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+37800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+38000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+38800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+39000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+39800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+3A000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+3A800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+3B000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+3B800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+3C000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+3C800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+3D000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+3D800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+3E000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+3E800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+3F000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+3F800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+40000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+40800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+41000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+41800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+42000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+42800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+43000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+43800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+44000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+44800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+45000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+45800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+46000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+46800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+47000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+47800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+48000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+48800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+49000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+49800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+4A000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+4A800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+4B000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+4B800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+4C000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+4C800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+4D000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+4D800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+4E000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+4E800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+4F000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+4F800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+50000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+50800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+51000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+51800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+52000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+52800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+53000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+53800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+54000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+54800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+55000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+55800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+56000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+56800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+57000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+57800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+58000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+58800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+59000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+59800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+5A000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+5A800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+5B000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+5B800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+5C000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+5C800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+5D000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+5D800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+5E000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+5E800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+5F000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+5F800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+60000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+60800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+61000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+61800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+62000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+62800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+63000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+63800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+64000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+64800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+65000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+65800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+66000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+66800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+67000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+67800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+68000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+68800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+69000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+69800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+6A000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+6A800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+6B000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+6B800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+6C000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+6C800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+6D000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+6D800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+6E000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+6E800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+6F000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+6F800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+70000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+70800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+71000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+71800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+72000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+72800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+73000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+73800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+74000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+74800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+75000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+75800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+76000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+76800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+77000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+77800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+78000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+78800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+79000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+79800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+7A000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+7A800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+7B000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+7B800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+7C000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+7C800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+7D000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+7D800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+7E000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+7E800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+7F000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+7F800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+80000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+80800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+81000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+81800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+82000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+82800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+83000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+83800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+84000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+84800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+85000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+85800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+86000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+86800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+87000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+87800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+88000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+88800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+89000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+89800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+8A000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+8A800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+8B000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+8B800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+8C000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+8C800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+8D000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+8D800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+8E000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+8E800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+8F000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+8F800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+90000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+90800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+91000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+91800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+92000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+92800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+93000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+93800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+94000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+94800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+95000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+95800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+96000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+96800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+97000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+97800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+98000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+98800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+99000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+99800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+9A000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+9A800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+9B000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+9B800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+9C000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+9C800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+9D000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+9D800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+9E000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+9E800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+9F000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+9F800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A0000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A0800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A1000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A1800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A2000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A2800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A3000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A3800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A4000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A4800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A5000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A5800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A6000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A6800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A7000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A7800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A8000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A8800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A9000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A9800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+AA000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+AA800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+AB000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+AB800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+AC000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+AC800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+AD000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+AD800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+AE000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+AE800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+AF000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+AF800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B0000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B0800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B1000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B1800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B2000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B2800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B3000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B3800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B4000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B4800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B5000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B5800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B6000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B6800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B7000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B7800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B8000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B8800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B9000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B9800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+BA000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+BA800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+BB000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+BB800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+BC000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+BC800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+BD000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+BD800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+BE000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+BE800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+BF000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+BF800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C0000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C0800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C1000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C1800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C2000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C2800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C3000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C3800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C4000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C4800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C5000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C5800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C6000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C6800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C7000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C7800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C8000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C8800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C9000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C9800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+CA000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+CA800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+CB000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+CB800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+CC000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+CC800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+CD000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+CD800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+CE000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+CE800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+CF000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+CF800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D0000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D0800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D1000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D1800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D2000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D2800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D3000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D3800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D4000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D4800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D5000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D5800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D6000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D6800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D7000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D7800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D8000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D8800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D9000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D9800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+DA000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+DA800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+DB000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+DB800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+DC000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+DC800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+DD000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+DD800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+DE000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+DE800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+DF000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+DF800 */ +154, 16,155,156, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E0000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E0800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E1000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E1800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E2000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E2800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E3000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E3800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E4000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E4800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E5000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E5800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E6000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E6800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E7000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E7800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E8000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E8800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E9000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E9800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+EA000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+EA800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+EB000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+EB800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+EC000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+EC800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+ED000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+ED800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+EE000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+EE800 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+EF000 */ + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+EF800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F0000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F0800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F1000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F1800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F2000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F2800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F3000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F3800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F4000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F4800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F5000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F5800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F6000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F6800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F7000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F7800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F8000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F8800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F9000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F9800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+FA000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+FA800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+FB000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+FB800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+FC000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+FC800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+FD000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+FD800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+FE000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+FE800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+FF000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,157, /* U+FF800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+100000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+100800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+101000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+101800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+102000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+102800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+103000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+103800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+104000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+104800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+105000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+105800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+106000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+106800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+107000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+107800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+108000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+108800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+109000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+109800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+10A000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+10A800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+10B000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+10B800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+10C000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+10C800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+10D000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+10D800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+10E000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+10E800 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+10F000 */ +110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,157, /* U+10F800 */ +}; + +const pcre_uint16 _pcre_ucd_stage2[] = { /* 40448 bytes, block = 128 */ +/* block 0 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 2, 2, 2, 3, 2, 2, 2, 4, 5, 2, 6, 2, 7, 2, 2, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 2, 6, 6, 6, 2, + 2, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 4, 2, 5, 10, 11, + 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 4, 6, 5, 6, 0, + +/* block 1 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 2, 3, 3, 3, 3, 13, 13, 10, 13, 14, 15, 6, 16, 13, 10, + 13, 6, 17, 17, 10, 18, 13, 2, 10, 17, 14, 19, 17, 17, 17, 2, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 6, 9, 9, 9, 9, 9, 9, 9, 14, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 6, 12, 12, 12, 12, 12, 12, 12, 20, + +/* block 2 */ + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 23, 24, 21, 22, 21, 22, 21, 22, 14, 21, 22, 21, 22, 21, 22, 21, + 22, 21, 22, 21, 22, 21, 22, 21, 22, 14, 21, 22, 21, 22, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 25, 21, 22, 21, 22, 21, 22, 26, + +/* block 3 */ + 27, 28, 21, 22, 21, 22, 29, 21, 22, 30, 30, 21, 22, 14, 31, 32, + 33, 21, 22, 30, 34, 35, 36, 37, 21, 22, 38, 14, 36, 39, 40, 41, + 21, 22, 21, 22, 21, 22, 42, 21, 22, 42, 14, 14, 21, 22, 42, 21, + 22, 43, 43, 21, 22, 21, 22, 44, 21, 22, 14, 45, 21, 22, 14, 46, + 45, 45, 45, 45, 47, 48, 49, 47, 48, 49, 47, 48, 49, 21, 22, 21, + 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 50, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 14, 47, 48, 49, 21, 22, 51, 52, 21, 22, 21, 22, 21, 22, 21, 22, + +/* block 4 */ + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 53, 14, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 21, 22, 14, 14, 14, 14, 14, 14, 54, 21, 22, 55, 56, 14, + 14, 21, 22, 57, 58, 59, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 60, 61, 14, 62, 63, 14, 64, 64, 14, 65, 14, 66, 14, 14, 14, 14, + 64, 14, 14, 67, 14, 14, 14, 14, 68, 69, 14, 70, 14, 14, 14, 69, + 14, 71, 72, 14, 14, 73, 14, 14, 14, 14, 14, 14, 14, 74, 14, 14, + +/* block 5 */ + 75, 14, 14, 75, 14, 14, 14, 14, 75, 76, 77, 77, 78, 14, 14, 14, + 14, 14, 79, 14, 45, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 80, 80, 80, 80, 80, 80, 80, 80, 80, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 10, 10, 10, 10, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, + 81, 81, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 80, 80, 80, 80, 80, 10, 10, 10, 10, 10, 10, 10, 81, 10, 81, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + +/* block 6 */ + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 83, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 84, 85, 84, 85, 81, 86, 84, 85, 87, 87, 88, 89, 89, 89, 2, 87, + +/* block 7 */ + 87, 87, 87, 87, 86, 10, 90, 2, 91, 91, 91, 87, 92, 87, 93, 93, + 94, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, + 95, 95, 87, 95, 95, 95, 95, 95, 95, 95, 95, 95, 96, 97, 97, 97, + 94, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, + 98, 98, 99, 98, 98, 98, 98, 98, 98, 98, 98, 98,100,101,101,102, +103,104,105,105,105,106,107,108, 84, 85, 84, 85, 84, 85, 84, 85, + 84, 85,109,110,109,110,109,110,109,110,109,110,109,110,109,110, +111,112,113, 94,114,115,116, 84, 85,117, 84, 85, 94,118,118,118, + +/* block 8 */ +119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, +121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121, +121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121, +122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122, +123,124,123,124,123,124,123,124,123,124,123,124,123,124,123,124, +123,124,123,124,123,124,123,124,123,124,123,124,123,124,123,124, + +/* block 9 */ +123,124,125,126,126,126,126,126,127,127,123,124,123,124,123,124, +123,124,123,124,123,124,123,124,123,124,123,124,123,124,123,124, +123,124,123,124,123,124,123,124,123,124,123,124,123,124,123,124, +123,124,123,124,123,124,123,124,123,124,123,124,123,124,123,124, +128,123,124,123,124,123,124,123,124,123,124,123,124,123,124,129, +123,124,123,124,123,124,123,124,123,124,123,124,123,124,123,124, +123,124,123,124,123,124,123,124,123,124,123,124,123,124,123,124, +123,124,123,124,123,124,123,124,123,124,123,124,123,124,123,124, + +/* block 10 */ +123,124,123,124,123,124,123,124,123,124,123,124,123,124,123,124, +123,124,123,124,123,124,123,124,123,124,123,124,123,124,123,124, +123,124,123,124, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130, +130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130, +130,130,130,130,130,130,130, 87, 87,131,132,132,132,132,132,132, + 87,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133, +133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133, + +/* block 11 */ +133,133,133,133,133,133,133,134, 87, 2,135, 87, 87, 87, 87, 87, + 87,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136, +136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136, +136,136,136,136,136,136,136,136,136,136,136,136,136,136,137,136, +138,136,136,138,136,136,138,136, 87, 87, 87, 87, 87, 87, 87, 87, +139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, +139,139,139,139,139,139,139,139,139,139,139, 87, 87, 87, 87, 87, +139,139,139,138,138, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 12 */ + 16, 16, 16, 16, 87, 87,140,140,140,141,141,142, 2,141,143,143, +144,144,144,144,144,144,144,144,144,144,144, 2, 87, 87,141, 2, + 87,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, + 81,145,145,145,145,145,145,145,145,145,145, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82,144,144,144,144,144,144,144,144,144, 87, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,141,141,141,141,145,145, + 82,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, + +/* block 13 */ +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,141,145,144,144,144,144,144,144,144, 16,146,144, +144,144,144,144,144,147,147,144,144,143,144,144,144,144,145,145, +148,148,148,148,148,148,148,148,148,148,145,145,145,143,143,145, + +/* block 14 */ +149,149,149,149,149,149,149,149,149,149,149,149,149,149, 87,150, +151,152,151,151,151,151,151,151,151,151,151,151,151,151,151,151, +151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151, +152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152, +152,152,152,152,152,152,152,152,152,152,152, 87, 87,151,151,151, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, + +/* block 15 */ +153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153, +153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153, +153,153,153,153,153,153,154,154,154,154,154,154,154,154,154,154, +154,153, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +155,155,155,155,155,155,155,155,155,155,156,156,156,156,156,156, +156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156, +156,156,156,156,156,156,156,156,156,156,156,157,157,157,157,157, +157,157,157,157,158,158,159,160,160,160,158, 87, 87, 87, 87, 87, + +/* block 16 */ + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 17 */ + 87,161,161,162,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,163,163,163,163, 87, 87,161,163,162,162, +162,161,161,161,161,161,161,161,161,162,162,162,162,161, 87, 87, +163, 82, 82,161,161, 87, 87, 87,163,163,163,163,163,163,163,163, +163,163,161,161, 2, 2,164,164,164,164,164,164,164,164,164,164, + 2,165,163, 87, 87, 87, 87, 87, 87, 87, 87,163,163,163,163,163, + +/* block 18 */ + 87,166,167,167, 87,168,168,168,168,168,168,168,168, 87, 87,168, +168, 87, 87,168,168,168,168,168,168,168,168,168,168,168,168,168, +168,168,168,168,168,168,168,168,168, 87,168,168,168,168,168,168, +168, 87,168, 87, 87, 87,168,168,168,168, 87, 87,166,168,167,167, +167,166,166,166,166, 87, 87,167,167, 87, 87,167,167,166,168, 87, + 87, 87, 87, 87, 87, 87, 87,167, 87, 87, 87, 87,168,168, 87,168, +168,168,166,166, 87, 87,169,169,169,169,169,169,169,169,169,169, +168,168,170,170,171,171,171,171,171,171,172, 87, 87, 87, 87, 87, + +/* block 19 */ + 87,173,173,174, 87,175,175,175,175,175,175, 87, 87, 87, 87,175, +175, 87, 87,175,175,175,175,175,175,175,175,175,175,175,175,175, +175,175,175,175,175,175,175,175,175, 87,175,175,175,175,175,175, +175, 87,175,175, 87,175,175, 87,175,175, 87, 87,173, 87,174,174, +174,173,173, 87, 87, 87, 87,173,173, 87, 87,173,173,173, 87, 87, + 87,173, 87, 87, 87, 87, 87, 87, 87,175,175,175,175, 87,175, 87, + 87, 87, 87, 87, 87, 87,176,176,176,176,176,176,176,176,176,176, +173,173,175,175,175,173, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 20 */ + 87,177,177,178, 87,179,179,179,179,179,179,179,179,179, 87,179, +179,179, 87,179,179,179,179,179,179,179,179,179,179,179,179,179, +179,179,179,179,179,179,179,179,179, 87,179,179,179,179,179,179, +179, 87,179,179, 87,179,179,179,179,179, 87, 87,177,179,178,178, +178,177,177,177,177,177, 87,177,177,178, 87,178,178,177, 87, 87, +179, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +179,179,177,177, 87, 87,180,180,180,180,180,180,180,180,180,180, + 87,181, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 21 */ + 87,182,183,183, 87,184,184,184,184,184,184,184,184, 87, 87,184, +184, 87, 87,184,184,184,184,184,184,184,184,184,184,184,184,184, +184,184,184,184,184,184,184,184,184, 87,184,184,184,184,184,184, +184, 87,184,184, 87,184,184,184,184,184, 87, 87,182,184,183,182, +183,182,182,182,182, 87, 87,183,183, 87, 87,183,183,182, 87, 87, + 87, 87, 87, 87, 87, 87,182,183, 87, 87, 87, 87,184,184, 87,184, +184,184,182,182, 87, 87,185,185,185,185,185,185,185,185,185,185, +186,184, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 22 */ + 87, 87,187,188, 87,188,188,188,188,188,188, 87, 87, 87,188,188, +188, 87,188,188,188,188, 87, 87, 87,188,188, 87,188, 87,188,188, + 87, 87, 87,188,188, 87, 87, 87,188,188,188, 87, 87, 87,188,188, +188,188,188,188,188,188,188,188,188,188, 87, 87, 87, 87,189,189, +187,189,189, 87, 87, 87,189,189,189, 87,189,189,189,187, 87, 87, +188, 87, 87, 87, 87, 87, 87,189, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87,190,190,190,190,190,190,190,190,190,190, +191,191,191,192,192,192,192,192,192,193,192, 87, 87, 87, 87, 87, + +/* block 23 */ + 87,194,194,194, 87,195,195,195,195,195,195,195,195, 87,195,195, +195, 87,195,195,195,195,195,195,195,195,195,195,195,195,195,195, +195,195,195,195,195,195,195,195,195, 87,195,195,195,195,195,195, +195,195,195,195, 87,195,195,195,195,195, 87, 87, 87,195,196,196, +196,194,194,194,194, 87,196,196,196, 87,196,196,196,196, 87, 87, + 87, 87, 87, 87, 87,196,196, 87,195,195, 87, 87, 87, 87, 87, 87, +195,195,196,196, 87, 87,197,197,197,197,197,197,197,197,197,197, + 87, 87, 87, 87, 87, 87, 87, 87,198,198,198,198,198,198,198,199, + +/* block 24 */ + 87, 87,200,200, 87,201,201,201,201,201,201,201,201, 87,201,201, +201, 87,201,201,201,201,201,201,201,201,201,201,201,201,201,201, +201,201,201,201,201,201,201,201,201, 87,201,201,201,201,201,201, +201,201,201,201, 87,201,201,201,201,201, 87, 87,202,201,200,202, +200,200,200,200,200, 87,202,200,200, 87,200,200,202,202, 87, 87, + 87, 87, 87, 87, 87,200,200, 87, 87, 87, 87, 87, 87, 87,201, 87, +201,201,202,202, 87, 87,203,203,203,203,203,203,203,203,203,203, + 87, 13, 13, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 25 */ + 87, 87,204,204, 87,205,205,205,205,205,205,205,205, 87,205,205, +205, 87,205,205,205,205,205,205,205,205,205,205,205,205,205,205, +205,205,205,205,205,205,205,205,205, 87,205,205,205,205,205,205, +205,205,205,205,205,205,205,205,205,205, 87, 87, 87,205,204,204, +204,206,206,206,206, 87,204,204,204, 87,204,204,204,206, 87, 87, + 87, 87, 87, 87, 87, 87, 87,204, 87, 87, 87, 87, 87, 87, 87, 87, +205,205,206,206, 87, 87,207,207,207,207,207,207,207,207,207,207, +208,208,208,208,208,208, 87, 87, 87,209,205,205,205,205,205,205, + +/* block 26 */ + 87, 87,210,210, 87,211,211,211,211,211,211,211,211,211,211,211, +211,211,211,211,211,211,211, 87, 87, 87,211,211,211,211,211,211, +211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211, +211,211, 87,211,211,211,211,211,211,211,211,211, 87,211, 87, 87, +211,211,211,211,211,211,211, 87, 87, 87,212, 87, 87, 87, 87,210, +210,210,212,212,212, 87,212, 87,210,210,210,210,210,210,210,210, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87,210,210,213, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 27 */ + 87,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214, +214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214, +214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214, +214,215,214,214,215,215,215,215,215,215,215, 87, 87, 87, 87, 3, +214,214,214,214,214,214,216,215,215,215,215,215,215,215,215,217, +218,218,218,218,218,218,218,218,218,218,217,217, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 28 */ + 87,219,219, 87,219, 87, 87,219,219, 87,219, 87, 87,219, 87, 87, + 87, 87, 87, 87,219,219,219,219, 87,219,219,219,219,219,219,219, + 87,219,219,219, 87,219, 87,219, 87, 87,219,219, 87,219,219,219, +219,220,219,219,220,220,220,220,220,220, 87,220,220,219, 87, 87, +219,219,219,219,219, 87,221, 87,220,220,220,220,220,220, 87, 87, +222,222,222,222,222,222,222,222,222,222, 87, 87,219,219, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 29 */ +223,224,224,224,225,225,225,225,225,225,225,225,225,225,225,225, +225,225,225,224,224,224,224,224,226,226,224,224,224,224,224,224, +227,227,227,227,227,227,227,227,227,227,228,228,228,228,228,228, +228,228,228,228,224,226,224,226,224,226,229,230,229,230,231,231, +223,223,223,223,223,223,223,223, 87,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, 87, 87, 87, + 87,226,226,226,226,226,226,226,226,226,226,226,226,226,226,231, + +/* block 30 */ +226,226,226,226,226,225,226,226,223,223,223,223, 87, 87, 87, 87, +226,226,226,226,226,226,226,226, 87,226,226,226,226,226,226,226, +226,226,226,226,226,226,226,226,226,226,226,226,226,226,226,226, +226,226,226,226,226,226,226,226,226,226,226,226,226, 87,224,224, +224,224,224,224,224,224,226,224,224,224,224,224,224, 87,224,224, +225,225,225,225,225, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 31 */ +232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232, +232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232, +232,232,232,232,232,232,232,232,232,232,232,233,233,234,234,234, +234,233,234,234,234,234,234,234,233,234,234,233,233,234,234,232, +235,235,235,235,235,235,235,235,235,235,236,236,236,236,236,236, +232,232,232,232,232,232,233,233,234,234,232,232,232,232,234,234, +234,232,233,233,233,232,232,233,233,233,233,233,233,233,232,232, +232,234,234,234,234,232,232,232,232,232,232,232,232,232,232,232, + +/* block 32 */ +232,232,234,233,233,234,234,233,233,233,233,233,233,234,232,233, +235,235,235,235,235,235,235,235,235,235, 87, 87, 87, 87,237,237, +238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238, +238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238, +238,238,238,238,238,238, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239, +239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239, +239,239,239,239,239,239,239,239,239,239,239, 2,240, 87, 87, 87, + +/* block 33 */ +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, +241,241,241,241,241,241,241,241,241,241, 87, 87, 87, 87, 87,241, +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, + +/* block 34 */ +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, +241,241,241, 87, 87, 87, 87, 87,241,241,241,241,241,241,241,241, +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, +241,241,241,241,241,241,241,241,241,241, 87, 87, 87, 87, 87, 87, + +/* block 35 */ +242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, +242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, +242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, +242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, +242,242,242,242,242,242,242,242,242, 87,242,242,242,242, 87, 87, +242,242,242,242,242,242,242, 87,242, 87,242,242,242,242, 87, 87, +242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, +242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, + +/* block 36 */ +242,242,242,242,242,242,242,242,242, 87,242,242,242,242, 87, 87, +242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, +242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, +242, 87,242,242,242,242, 87, 87,242,242,242,242,242,242,242, 87, +242, 87,242,242,242,242, 87, 87,242,242,242,242,242,242,242,242, +242,242,242,242,242,242,242, 87,242,242,242,242,242,242,242,242, +242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, +242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, + +/* block 37 */ +242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, +242, 87,242,242,242,242, 87, 87,242,242,242,242,242,242,242,242, +242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, +242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, +242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, +242,242,242,242,242,242,242,242,242,242,242, 87, 87, 87, 87,243, +244,245,245,245,245,245,245,245,245,246,246,246,246,246,246,246, +246,246,246,246,246,246,246,246,246,246,246,246,246, 87, 87, 87, + +/* block 38 */ +242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, +244,244,244,244,244,244,244,244,244,244, 87, 87, 87, 87, 87, 87, +247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, +247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, +247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, +247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, +247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, +247,247,247,247,247, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 39 */ + 87,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, +248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, +248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, +248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, +248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, +248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, +248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, +248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, + +/* block 40 */ +248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, +248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, +248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, +248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, +248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, +248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, +248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, +248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, + +/* block 41 */ +248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, +248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, +248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, +248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, +248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, +248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, +248,248,248,248,248,248,248,248,248,248,248,248,248,249,249,248, +248,248,248,248,248,248,248, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 42 */ +250,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251, +251,251,251,251,251,251,251,251,251,251,251,252,253, 87, 87, 87, +254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254, +254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254, +254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254, +254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254, +254,254,254,254,254,254,254,254,254,254,254, 2, 2, 2,255,255, +255, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 43 */ +256,256,256,256,256,256,256,256,256,256,256,256,256, 87,256,256, +256,256,257,257,257, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258, +258,258,259,259,259, 2, 2, 87, 87, 87, 87, 87, 87, 87, 87, 87, +260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260, +260,260,261,261, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +262,262,262,262,262,262,262,262,262,262,262,262,262, 87,262,262, +262, 87,263,263, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 44 */ +264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264, +264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264, +264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264, +264,264,264,264,265,265,266,267,267,267,267,267,267,267,266,266, +266,266,266,266,266,266,267,266,266,267,267,267,267,267,267,267, +267,267,267,267,268,268,268,269,268,268,268,270,264,267, 87, 87, +271,271,271,271,271,271,271,271,271,271, 87, 87, 87, 87, 87, 87, +272,272,272,272,272,272,272,272,272,272, 87, 87, 87, 87, 87, 87, + +/* block 45 */ +273,273, 2, 2,273, 2,274,273,273,273,273,275,275,275,276, 87, +277,277,277,277,277,277,277,277,277,277, 87, 87, 87, 87, 87, 87, +278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278, +278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278, +278,278,278,279,278,278,278,278,278,278,278,278,278,278,278,278, +278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278, +278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278, +278,278,278,278,278,278,278,278, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 46 */ +278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278, +278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278, +278,278,278,278,278,278,278,278,278,275,278, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 47 */ +280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, +280,280,280,280,280,280,280,280,280,280,280,280,280, 87, 87, 87, +281,281,281,282,282,282,282,281,281,282,282,282, 87, 87, 87, 87, +282,282,281,282,282,282,282,282,282,281,281,281, 87, 87, 87, 87, +283, 87, 87, 87,284,284,285,285,285,285,285,285,285,285,285,285, +286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, +286,286,286,286,286,286,286,286,286,286,286,286,286,286, 87, 87, +286,286,286,286,286, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 48 */ +287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287, +287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287, +287,287,287,287,287,287,287,287,287,287, 87, 87, 87, 87, 87, 87, +288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288, +288,287,287,287,287,287,287,287,288,288, 87, 87, 87, 87, 87, 87, +289,289,289,289,289,289,289,289,289,289, 87, 87, 87, 87,290,290, +291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291, +291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291, + +/* block 49 */ +292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292, +292,292,292,292,292,292,292,293,293,294,294,294, 87, 87,295,295, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 50 */ +296,296,296,296,297,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,298,298,298,298,298,298,298, +298,298,298,298,296,297,296,296,296,296,296,297,296,297,297,297, +297,297,296,297,297,298,298,298,298,298,298,298, 87, 87, 87, 87, +299,299,299,299,299,299,299,299,299,299,300,300,300,300,300,300, +300,301,301,301,301,301,301,301,301,301,301,296,296,296,296,296, +296,296,296,296,301,301,301,301,301,301,301,301,301, 87, 87, 87, + +/* block 51 */ +302,302,303,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,303,302,302,302,302,303,303,302,302,303, 87, 87, 87,304,304, +305,305,305,305,305,305,305,305,305,305, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 52 */ +306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,306, +306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,306, +306,306,306,306,307,307,307,307,307,307,307,307,308,308,308,308, +308,308,308,308,307,307,308,308, 87, 87, 87,309,309,309,309,309, +310,310,310,310,310,310,310,310,310,310, 87, 87, 87,306,306,306, +311,311,311,311,311,311,311,311,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,313,313,313,313,313,313,314,314, + +/* block 53 */ + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 94, 94, 94, 94, 94,315, 80, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 88, 88, 88, + 88, 88, 14, 14, 14, 14, 94, 94, 94, 94, 94, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14,316,317, 14, 14, 14,318, 14, 14, + +/* block 54 */ + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, + 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 88, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 82, 82, + +/* block 55 */ + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + +/* block 56 */ + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 21, 22, 21, 22, 14, 14, 14, 14, 14,319, 14, 14,320, 14, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + +/* block 57 */ +321,321,321,321,321,321,321,321,322,322,322,322,322,322,322,322, +321,321,321,321,321,321, 87, 87,322,322,322,322,322,322, 87, 87, +321,321,321,321,321,321,321,321,322,322,322,322,322,322,322,322, +321,321,321,321,321,321,321,321,322,322,322,322,322,322,322,322, +321,321,321,321,321,321, 87, 87,322,322,322,322,322,322, 87, 87, + 94,321, 94,321, 94,321, 94,321, 87,322, 87,322, 87,322, 87,322, +321,321,321,321,321,321,321,321,322,322,322,322,322,322,322,322, +323,323,324,324,324,324,325,325,326,326,327,327,328,328, 87, 87, + +/* block 58 */ +321,321,321,321,321,321,321,321,329,329,329,329,329,329,329,329, +321,321,321,321,321,321,321,321,329,329,329,329,329,329,329,329, +321,321,321,321,321,321,321,321,329,329,329,329,329,329,329,329, +321,321, 94,330, 94, 87, 94, 94,322,322,331,331,332, 86,333, 86, + 86, 86, 94,330, 94, 87, 94, 94,334,334,334,334,332, 86, 86, 86, +321,321, 94, 94, 87, 87, 94, 94,322,322,335,335, 87, 86, 86, 86, +321,321, 94, 94, 94,113, 94, 94,322,322,336,336,117, 86, 86, 86, + 87, 87, 94,330, 94, 87, 94, 94,337,337,338,338,332, 86, 86, 87, + +/* block 59 */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16,339,339, 16, 16, + 7, 7, 7, 7, 7, 7, 2, 2, 15, 19, 4, 15, 15, 19, 4, 15, + 2, 2, 2, 2, 2, 2, 2, 2,340,341, 16, 16, 16, 16, 16, 1, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 15, 19, 2, 2, 2, 2, 11, + 11, 2, 2, 2, 6, 4, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 6, 2, 11, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, + 16, 16, 16, 16, 16, 87, 87, 87, 87, 87, 16, 16, 16, 16, 16, 16, + 17, 14, 87, 87, 17, 17, 17, 17, 17, 17, 6, 6, 6, 4, 5, 14, + +/* block 60 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 6, 6, 6, 4, 5, 87, + 80, 80, 80, 80, 80, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,342,342,342, +342, 82,342,342,342, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 61 */ + 13, 13,343, 13, 13, 13, 13,343, 13, 13,344,343,343,343,344,344, +343,343,343,344, 13,343, 13, 13, 13,343,343,343,343,343, 13, 13, + 13, 13, 13, 13,343, 13,345, 13,343, 13,346,347,343,343, 13,344, +343,343,348,343,344,349,349,349,349,344, 13, 13,344,344,343,343, + 6, 6, 6, 6, 6,343,344,344,344,344, 13, 6, 13, 13,350, 13, + 87, 87, 87, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, +351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,351, +352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352, + +/* block 62 */ +353,353,353, 21, 22,353,353,353,353, 87, 87, 87, 87, 87, 87, 87, + 6, 6, 6, 6, 6, 13, 13, 13, 13, 13, 6, 6, 13, 13, 13, 13, + 6, 13, 13, 6, 13, 13, 6, 13, 13, 13, 13, 13, 13, 13, 6, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 6, 6, + 13, 13, 6, 13, 6, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + +/* block 63 */ + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + +/* block 64 */ + 13, 13, 13, 13, 13, 13, 13, 13, 6, 6, 6, 6, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 6, 6, 13, 13, 13, 13, 13, 13, 13, 4, 5, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 6, 13, 13, 13, + +/* block 65 */ + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 6, 6, 6, 6, + 6, 6, 13, 13, 13, 13, 13, 13, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 66 */ + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + +/* block 67 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13,354,354,354,354,354,354,354,354,354,354, +354,354,354,354,354,354,354,354,354,354,354,354,354,354,354,354, +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, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + +/* block 68 */ + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + +/* block 69 */ + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 6, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 6, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 6, 6, 6, 6, 6, 6, 6, 6, + +/* block 70 */ + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 6, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + +/* block 71 */ + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 87, 87, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 87, 87, 87, + 13, 13, 13, 13, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 72 */ + 87, 13, 13, 13, 13, 87, 13, 13, 13, 13, 87, 87, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 87, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 87, 13, 87, 13, + 13, 13, 13, 87, 87, 87, 13, 87, 13, 13, 13, 13, 13, 13, 13, 87, + 87, 13, 13, 13, 13, 13, 13, 13, 4, 5, 4, 5, 4, 5, 4, 5, + 4, 5, 4, 5, 4, 5, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + +/* block 73 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 13, 87, 87, 87, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 87, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 87, + 6, 6, 6, 6, 6, 4, 5, 6, 6, 6, 6, 87, 6, 87, 87, 87, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + +/* block 74 */ +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,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,356,356,356,356,356,356,356,356, +356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356, + +/* block 75 */ + 6, 6, 6, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, + 5, 4, 5, 4, 5, 4, 5, 4, 5, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 4, 5, 4, 5, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 5, 6, 6, + +/* block 76 */ + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 13, 13, 6, 6, 6, 6, 6, 6, 87, 87, 87, + 13, 13, 13, 13, 13, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 77 */ +357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357, +357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357, +357,357,357,357,357,357,357,357,357,357,357,357,357,357,357, 87, +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,358, +358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, 87, + 21, 22,359,360,361,362,363, 21, 22, 21, 22, 21, 22,364,365,366, + 87, 14, 21, 22, 14, 21, 22, 14, 14, 14, 14, 14, 14, 80, 87, 87, + +/* block 78 */ +109,110,109,110,109,110,109,110,109,110,109,110,109,110,109,110, +109,110,109,110,109,110,109,110,109,110,109,110,109,110,109,110, +109,110,109,110,109,110,109,110,109,110,109,110,109,110,109,110, +109,110,109,110,109,110,109,110,109,110,109,110,109,110,109,110, +109,110,109,110,109,110,109,110,109,110,109,110,109,110,109,110, +109,110,109,110,109,110,109,110,109,110,109,110,109,110,109,110, +109,110,109,110,367,368,368,368,368,368,368, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87,369,369,369,369,370,369,369, + +/* block 79 */ +371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371, +371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371, +371,371,371,371,371,371, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372, +372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372, +372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372, +372,372,372,372,372,372, 87, 87, 87, 87, 87, 87, 87, 87, 87,373, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 80 */ +242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, +242,242,242,242,242,242,242, 87, 87, 87, 87, 87, 87, 87, 87, 87, +242,242,242,242,242,242,242, 87,242,242,242,242,242,242,242, 87, +242,242,242,242,242,242,242, 87,242,242,242,242,242,242,242, 87, +242,242,242,242,242,242,242, 87,242,242,242,242,242,242,242, 87, +242,242,242,242,242,242,242, 87,242,242,242,242,242,242,242, 87, +126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126, +126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126, + +/* block 81 */ + 2, 2, 15, 19, 15, 19, 2, 2, 2, 15, 19, 2, 15, 19, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 7, 2, 2, 7, 2, 15, 19, 2, 2, + 15, 19, 4, 5, 4, 5, 4, 5, 4, 5, 2, 2, 2, 2, 2, 81, + 2, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 82 */ +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, 87,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, +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, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 83 */ +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,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,374,374,374,374,374,374, +374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374, + +/* block 84 */ +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,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, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 87, 87, 87, 87, + +/* block 85 */ + 1, 2, 2, 2, 13,375,349,376, 4, 5, 4, 5, 4, 5, 4, 5, + 4, 5, 13, 13, 4, 5, 4, 5, 4, 5, 4, 5, 7, 4, 5, 5, + 13,376,376,376,376,376,376,376,376,376, 82, 82, 82, 82, 82, 82, + 7, 81, 81, 81, 81, 81, 13, 13,376,376,376,375,349, 2, 13, 13, + 87,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377, +377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377, +377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377, +377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377, + +/* block 86 */ +377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377, +377,377,377,377,377,377,377, 87, 87, 82, 82, 10, 10,378,378,377, + 7,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379, +379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379, +379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379, +379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379, +379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379, +379,379,379,379,379,379,379,379,379,379,379, 2, 81,380,380,379, + +/* block 87 */ + 87, 87, 87, 87, 87,381,381,381,381,381,381,381,381,381,381,381, +381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,381, +381,381,381,381,381,381,381,381,381,381,381,381,381,381, 87, 87, + 87,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, + +/* block 88 */ +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, 87, + 13, 13, 17, 17, 17, 17, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, +381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,381, +381,381,381,381,381,381,381,381, 87, 87, 87, 87, 87, 87, 87, 87, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379, + +/* block 89 */ +382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,382, +382,382,382,382,382,382,382,382,382,382,382,382,382,382,382, 87, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 13, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, +382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,382, +382,382,382,382,382,382,382,382,382,382,382,382,382,382,382, 13, + +/* block 90 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, +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, 87, + +/* block 91 */ +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,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, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + +/* block 92 */ +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,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,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, + +/* block 93 */ +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,384, +384,384,384,384,384,384, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + +/* block 94 */ +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,384, +384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, +384,384,384,384, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 95 */ +385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, +385,385,385,385,385,386,385,385,385,385,385,385,385,385,385,385, +385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, +385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, +385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, +385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, +385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, +385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, + +/* block 96 */ +385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, +385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, +385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, +385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, +385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, +385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, +385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, +385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, + +/* block 97 */ +385,385,385,385,385,385,385,385,385,385,385,385,385, 87, 87, 87, +387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387, +387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387, +387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387, +387,387,387,387,387,387,387, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 98 */ +388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388, +388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388, +388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388, +388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388, +388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388, +388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388, +388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388, +388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388, + +/* block 99 */ +388,388,388,388,388,388,388,388,388,388,388,388,389,390,390,390, +388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388, +391,391,391,391,391,391,391,391,391,391,388,388, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +123,124,123,124,123,124,123,124,123,124,123,124,123,124,123,124, +123,124,123,124,123,124,123,124,123,124,123,124,123,124,123,124, + 87, 87,123,124,123,124,123,124,123,124,123,124,123,124,392,126, +127,127,127,393, 87, 87, 87, 87, 87, 87, 87, 87,126,126,393,316, + +/* block 100 */ +123,124,123,124,123,124,123,124,123,124,123,124,123,124,123,124, +123,124,123,124,123,124,123,124, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 101 */ + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 81, 81, 81, 81, 81, 81, 81, 81, 81, + 10, 10, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 14, 14, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 80, 14, 14, 14, 14, 14, 14, 14, 14, 21, 22, 21, 22,394, 21, 22, + +/* block 102 */ + 21, 22, 21, 22, 21, 22, 21, 22, 81, 10, 10, 21, 22, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 45, 45, 45, 45, 45, + +/* block 103 */ +395,395,396,395,395,395,396,395,395,395,395,396,395,395,395,395, +395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395, +395,395,395,397,397,396,396,397,398,398,398,398, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,399, +399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,399, +399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,399, +399,399,399,399,400,400,400,400, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 104 */ +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, +402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402, +402,402,402,402,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,403, 87, 87, 87, 87, 87, 87, 87, 87, 87,404,404, +405,405,405,405,405,405,405,405,405,405, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 105 */ +406,406,406,406,406,406,406,406,406,406,407,407,407,407,407,407, +407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407, +407,407,407,407,407,407,408,408,408,408,408,408,408,408,409,409, +410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410, +410,410,410,410,410,410,410,411,411,411,411,411,411,411,411,411, +411,411,412,412, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,413, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 106 */ +414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414, +414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414, +414,414,414,414,414,414,414,414,414,415,415,415,415,415,415,416, +416,415,415,416,416,415,415, 87, 87, 87, 87, 87, 87, 87, 87, 87, +414,414,414,415,414,414,414,414,414,414,414,414,415,416, 87, 87, +417,417,417,417,417,417,417,417,417,417, 87, 87,418,418,418,418, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 107 */ +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, + +/* block 108 */ +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, +241,241,241,241, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 109 */ +419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419, +419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419, +419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419, +419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419, +419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419, +419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419, +419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419, +419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419, + +/* block 110 */ +420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, +420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, +420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, +420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, +420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, +420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, +420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, +420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, + +/* block 111 */ +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, 87, 87, +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,384, +384,384,384,384,384,384,384,384,384,384,384, 87, 87, 87, 87, 87, +384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, + +/* block 112 */ +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,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, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 113 */ + 14, 14, 14, 14, 14, 14, 14, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87,134,134,134,134,134, 87, 87, 87, 87, 87,139,136,139, +139,139,139,139,139,139,139,139,139,421,139,139,139,139,139,139, +139,139,139,139,139,139,139, 87,139,139,139,139,139, 87,139, 87, +139,139, 87,139,139, 87,139,139,139,139,139,139,139,139,139,139, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, + +/* block 114 */ +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, + +/* block 115 */ +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, + +/* block 116 */ +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145, 4, 5, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, + +/* block 117 */ +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, + 87, 87,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +145,145,145,145,145,145,145,145,145,145,145,145,142, 13, 87, 87, + +/* block 118 */ + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 2, 2, 2, 2, 2, 2, 2, 4, 5, 2, 87, 87, 87, 87, 87, 87, + 82, 82, 82, 82, 82, 82, 82, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 2, 7, 7, 11, 11, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, + 5, 4, 5, 4, 5, 2, 2, 4, 5, 2, 2, 2, 2, 11, 11, 11, + 2, 2, 2, 87, 2, 2, 2, 2, 7, 4, 5, 4, 5, 4, 5, 2, + 2, 2, 6, 7, 6, 6, 6, 87, 2, 3, 2, 2, 87, 87, 87, 87, +145,145,145,145,145, 87,145,145,145,145,145,145,145,145,145,145, + +/* block 119 */ +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +145,145,145,145,145,145,145,145,145,145,145,145,145, 87, 87, 16, + +/* block 120 */ + 87, 2, 2, 2, 3, 2, 2, 2, 4, 5, 2, 6, 2, 7, 2, 2, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 2, 6, 6, 6, 2, + 2, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 4, 2, 5, 10, 11, + 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 4, 6, 5, 6, 4, + 5, 2, 4, 5, 2, 2,379,379,379,379,379,379,379,379,379,379, + 81,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379, + +/* block 121 */ +379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379, +379,379,379,379,379,379,379,379,379,379,379,379,379,379, 81, 81, +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, +241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, 87, + 87, 87,241,241,241,241,241,241, 87, 87,241,241,241,241,241,241, + 87, 87,241,241,241,241,241,241, 87, 87,241,241,241, 87, 87, 87, + 3, 3, 6, 10, 13, 3, 3, 87, 13, 6, 6, 6, 6, 13, 13, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 16, 16, 16, 13, 13, 87, 87, + +/* block 122 */ +422,422,422,422,422,422,422,422,422,422,422,422, 87,422,422,422, +422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422, +422,422,422,422,422,422,422, 87,422,422,422,422,422,422,422,422, +422,422,422,422,422,422,422,422,422,422,422, 87,422,422, 87,422, +422,422,422,422,422,422,422,422,422,422,422,422,422,422, 87, 87, +422,422,422,422,422,422,422,422,422,422,422,422,422,422, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 123 */ +422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422, +422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422, +422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422, +422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422, +422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422, +422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422, +422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422, +422,422,422,422,422,422,422,422,422,422,422, 87, 87, 87, 87, 87, + +/* block 124 */ + 2, 2, 13, 87, 87, 87, 87, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 87, 87, 87, 13, 13, 13, 13, 13, 13, 13, 13, 13, +423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423, +423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423, +423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423, +423,423,423,423,423,424,424,424,424,425,425,425,425,425,425,425, + +/* block 125 */ +425,425,425,425,425,425,425,425,425,425,424, 87, 87, 87, 87, 87, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 82, 87, 87, + +/* block 126 */ +426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426, +426,426,426,426,426,426,426,426,426,426,426,426,426, 87, 87, 87, +427,427,427,427,427,427,427,427,427,427,427,427,427,427,427,427, +427,427,427,427,427,427,427,427,427,427,427,427,427,427,427,427, +427,427,427,427,427,427,427,427,427,427,427,427,427,427,427,427, +427, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 127 */ +428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428, +428,428,428,428,428,428,428,428,428,428,428,428,428,428,428, 87, +429,429,429,429, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +430,430,430,430,430,430,430,430,430,430,430,430,430,430,430,430, +430,431,430,430,430,430,430,430,430,430,431, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 128 */ +432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432, +432,432,432,432,432,432,432,432,432,432,432,432,432,432, 87,433, +434,434,434,434,434,434,434,434,434,434,434,434,434,434,434,434, +434,434,434,434,434,434,434,434,434,434,434,434,434,434,434,434, +434,434,434,434, 87, 87, 87, 87,434,434,434,434,434,434,434,434, +435,436,436,436,436,436, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 129 */ +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,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,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,439,439,439,439, +439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439, + +/* block 130 */ +440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440, +440,440,440,440,440,440,440,440,440,440,440,440,440,440, 87, 87, +441,441,441,441,441,441,441,441,441,441, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 131 */ +442,442,442,442,442,442, 87, 87,442, 87,442,442,442,442,442,442, +442,442,442,442,442,442,442,442,442,442,442,442,442,442,442,442, +442,442,442,442,442,442,442,442,442,442,442,442,442,442,442,442, +442,442,442,442,442,442, 87,442,442, 87, 87, 87,442, 87, 87,442, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 132 */ +443,443,443,443,443,443,443,443,443,443,443,443,443,443,443,443, +443,443,443,443,443,443,444,444,444,444, 87, 87, 87, 87, 87,445, +446,446,446,446,446,446,446,446,446,446,446,446,446,446,446,446, +446,446,446,446,446,446,446,446,446,446, 87, 87, 87, 87, 87,447, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 133 */ +448,449,449,449, 87,449,449, 87, 87, 87, 87, 87,449,449,449,449, +448,448,448,448, 87,448,448,448, 87,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, 87, 87, 87, 87,449,449,449, 87, 87, 87, 87,449, +450,450,450,450,450,450,450,450, 87, 87, 87, 87, 87, 87, 87, 87, +451,451,451,451,451,451,451,451,451, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 134 */ +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,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,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, + +/* block 135 */ +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,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,452,452, +452,452,452,452,452,452,452,452,452,452,452,452,452,452,452, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 136 */ +453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453, +453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453, +453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453, +453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453, +453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453, +453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453, +453,453,453, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +454,454,454,454, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 137 */ + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 138 */ + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 87, 87, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13,455,455, 82, 82, 82, 13, 13, 13,455,455,455, +455,455,455, 16, 16, 16, 16, 16, 16, 16, 16, 82, 82, 82, 82, 82, + +/* block 139 */ + 82, 82, 82, 13, 13, 82, 82, 82, 82, 82, 82, 82, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 82, 82, 82, 82, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 140 */ +425,425,425,425,425,425,425,425,425,425,425,425,425,425,425,425, +425,425,425,425,425,425,425,425,425,425,425,425,425,425,425,425, +425,425,425,425,425,425,425,425,425,425,425,425,425,425,425,425, +425,425,425,425,425,425,425,425,425,425,425,425,425,425,425,425, +425,425,456,456,456,425, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 141 */ + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 142 */ +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,344,344,344,344, +344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344, +344,344,344,344,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, +344,344,344,344,344, 87,344,344,344,344,344,344,344,344,344,344, +344,344,344,344,344,344,344,344,343,343,343,343,343,343,343,343, +343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343, + +/* block 143 */ +343,343,344,344,344,344,344,344,344,344,344,344,344,344,344,344, +344,344,344,344,344,344,344,344,344,344,344,344,343, 87,343,343, + 87, 87,343, 87, 87,343,343, 87, 87,343,343,343,343, 87,343,343, +343,343,343,343,343,343,344,344,344,344, 87,344, 87,344,344,344, +344,344,344,344, 87,344,344,344,344,344,344,344,344,344,344,344, +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,344,344,344,344, +344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344, + +/* block 144 */ +344,344,344,344,343,343, 87,343,343,343,343, 87, 87,343,343,343, +343,343,343,343,343, 87,343,343,343,343,343,343,343, 87,344,344, +344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344, +344,344,344,344,344,344,344,344,343,343, 87,343,343,343,343, 87, +343,343,343,343,343, 87,343, 87, 87, 87,343,343,343,343,343,343, +343, 87,344,344,344,344,344,344,344,344,344,344,344,344,344,344, +344,344,344,344,344,344,344,344,344,344,344,344,343,343,343,343, +343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343, + +/* block 145 */ +343,343,343,343,343,343,344,344,344,344,344,344,344,344,344,344, +344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344, +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,344,344,344,344, +344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344, +344,344,344,344,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, +344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344, + +/* block 146 */ +344,344,344,344,344,344,344,344,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,344,344,344,344,344,344,344,344,344,344,344,344, +344,344,344,344,344,344,344,344,344,344,344,344,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,344,344,344,344,344,344,344,344, +344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344, +343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343, + +/* block 147 */ +343,343,343,343,343,343,343,343,343,343,344,344,344,344,344,344, +344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344, +344,344,344,344,344,344, 87, 87,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, 6,344,344,344,344,344,344,344,344,344,344,344,344,344,344, +344,344,344,344,344,344,344,344,344,344,344, 6,344,344,344,344, +344,344,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, 6,344,344,344,344, + +/* block 148 */ +344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344, +344,344,344,344,344, 6,344,344,344,344,344,344,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, 6,344,344,344,344,344,344,344,344,344,344, +344,344,344,344,344,344,344,344,344,344,344,344,344,344,344, 6, +344,344,344,344,344,344,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, 6, +344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344, + +/* block 149 */ +344,344,344,344,344,344,344,344,344, 6,344,344,344,344,344,344, +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, 6,344,344,344,344,344,344, +344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344, +344,344,344, 6,344,344,344,344,344,344,343,344, 87, 87, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + +/* block 150 */ + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 87, 87, 87, 87, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + +/* block 151 */ + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 152 */ +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,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, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 153 */ +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, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 154 */ + 87, 16, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 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, 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, 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, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + +/* block 155 */ + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + +/* block 156 */ + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + +/* block 157 */ +420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, +420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, +420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, +420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, +420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, +420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, +420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, +420,420,420,420,420,420,420,420,420,420,420,420,420,420, 87, 87, + +}; + +#if UCD_BLOCK_SIZE != 128 +#error Please correct UCD_BLOCK_SIZE in pcre_internal.h +#endif diff --git a/ext/pcre/pcrelib/pcre_ucp_searchfuncs.c b/ext/pcre/pcrelib/pcre_ucp_searchfuncs.c deleted file mode 100644 index 668ae154de..0000000000 --- a/ext/pcre/pcrelib/pcre_ucp_searchfuncs.c +++ /dev/null @@ -1,177 +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 - Copyright (c) 1997-2008 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 code for searching the table of Unicode character -properties. */ - -#include "config.h" - -#include "pcre_internal.h" - -#include "ucp.h" /* Category definitions */ -#include "ucpinternal.h" /* Internal table details */ -#include "ucptable.h" /* The table itself */ - - -/* Table to translate from particular type value to the general value. */ - -static const int ucp_gentype[] = { - ucp_C, ucp_C, ucp_C, ucp_C, ucp_C, /* Cc, Cf, Cn, Co, Cs */ - ucp_L, ucp_L, ucp_L, ucp_L, ucp_L, /* Ll, Lu, Lm, Lo, Lt */ - ucp_M, ucp_M, ucp_M, /* Mc, Me, Mn */ - ucp_N, ucp_N, ucp_N, /* Nd, Nl, No */ - ucp_P, ucp_P, ucp_P, ucp_P, ucp_P, /* Pc, Pd, Pe, Pf, Pi */ - ucp_P, ucp_P, /* Ps, Po */ - ucp_S, ucp_S, ucp_S, ucp_S, /* Sc, Sk, Sm, So */ - ucp_Z, ucp_Z, ucp_Z /* Zl, Zp, Zs */ -}; - - - -/************************************************* -* Search table and return type * -*************************************************/ - -/* Three values are returned: the category is ucp_C, ucp_L, etc. The detailed -character type is ucp_Lu, ucp_Nd, etc. The script is ucp_Latin, etc. - -Arguments: - c the character value - type_ptr the detailed character type is returned here - script_ptr the script is returned here - -Returns: the character type category -*/ - -int -_pcre_ucp_findprop(const unsigned int c, int *type_ptr, int *script_ptr) -{ -int bot = 0; -int top = sizeof(ucp_table)/sizeof(cnode); -int mid; - -/* The table is searched using a binary chop. You might think that using -intermediate variables to hold some of the common expressions would speed -things up, but tests with gcc 3.4.4 on Linux showed that, on the contrary, it -makes things a lot slower. */ - -for (;;) - { - if (top <= bot) - { - *type_ptr = ucp_Cn; - *script_ptr = ucp_Common; - return ucp_C; - } - mid = (bot + top) >> 1; - if (c == (ucp_table[mid].f0 & f0_charmask)) break; - if (c < (ucp_table[mid].f0 & f0_charmask)) top = mid; - else - { - if ((ucp_table[mid].f0 & f0_rangeflag) != 0 && - c <= (ucp_table[mid].f0 & f0_charmask) + - (ucp_table[mid].f1 & f1_rangemask)) break; - bot = mid + 1; - } - } - -/* Found an entry in the table. Set the script and detailed type values, and -return the general type. */ - -*script_ptr = (ucp_table[mid].f0 & f0_scriptmask) >> f0_scriptshift; -*type_ptr = (ucp_table[mid].f1 & f1_typemask) >> f1_typeshift; - -return ucp_gentype[*type_ptr]; -} - - - -/************************************************* -* Search table and return other case * -*************************************************/ - -/* If the given character is a letter, and there is another case for the -letter, return the other case. Otherwise, return -1. - -Arguments: - c the character value - -Returns: the other case or NOTACHAR if none -*/ - -unsigned int -_pcre_ucp_othercase(const unsigned int c) -{ -int bot = 0; -int top = sizeof(ucp_table)/sizeof(cnode); -int mid, offset; - -/* The table is searched using a binary chop. You might think that using -intermediate variables to hold some of the common expressions would speed -things up, but tests with gcc 3.4.4 on Linux showed that, on the contrary, it -makes things a lot slower. */ - -for (;;) - { - if (top <= bot) return -1; - mid = (bot + top) >> 1; - if (c == (ucp_table[mid].f0 & f0_charmask)) break; - if (c < (ucp_table[mid].f0 & f0_charmask)) top = mid; - else - { - if ((ucp_table[mid].f0 & f0_rangeflag) != 0 && - c <= (ucp_table[mid].f0 & f0_charmask) + - (ucp_table[mid].f1 & f1_rangemask)) break; - bot = mid + 1; - } - } - -/* Found an entry in the table. Return NOTACHAR for a range entry. Otherwise -return the other case if there is one, else NOTACHAR. */ - -if ((ucp_table[mid].f0 & f0_rangeflag) != 0) return NOTACHAR; - -offset = ucp_table[mid].f1 & f1_casemask; -if ((offset & f1_caseneg) != 0) offset |= f1_caseneg; -return (offset == 0)? NOTACHAR : c + offset; -} - - -/* End of pcre_ucp_searchfuncs.c */ diff --git a/ext/pcre/pcrelib/pcre_valid_utf8.c b/ext/pcre/pcrelib/pcre_valid_utf8.c index 6b341c195e..7184560d88 100644 --- a/ext/pcre/pcrelib/pcre_valid_utf8.c +++ b/ext/pcre/pcrelib/pcre_valid_utf8.c @@ -152,6 +152,9 @@ for (p = string; length-- > 0; p++) if ((*(++p) & 0xc0) != 0x80) return p - string; } } +#else +(void)(string); /* Keep picky compilers happy */ +(void)(length); #endif return -1; diff --git a/ext/pcre/pcrelib/pcre_version.c b/ext/pcre/pcrelib/pcre_version.c index 36ee93e716..bd63f41e6e 100644 --- a/ext/pcre/pcrelib/pcre_version.c +++ b/ext/pcre/pcrelib/pcre_version.c @@ -77,7 +77,7 @@ I could find no way of detecting that a macro is defined as an empty string at pre-processor time. This hack uses a standard trick for avoiding calling the STRING macro with an empty argument when doing the test. */ -PCRE_EXP_DEFN const char * +PCRE_EXP_DEFN const char * PCRE_CALL_CONVENTION pcre_version(void) { return (XSTRING(Z PCRE_PRERELEASE)[1] == 0)? diff --git a/ext/pcre/pcrelib/pcre_xclass.c b/ext/pcre/pcrelib/pcre_xclass.c index d22d9e6488..5253b857ad 100644 --- a/ext/pcre/pcrelib/pcre_xclass.c +++ b/ext/pcre/pcrelib/pcre_xclass.c @@ -102,8 +102,7 @@ while ((t = *data++) != XCL_END) #ifdef SUPPORT_UCP else /* XCL_PROP & XCL_NOTPROP */ { - int chartype, script; - int category = _pcre_ucp_findprop(c, &chartype, &script); + const ucd_record * prop = GET_UCD(c); switch(*data) { @@ -112,20 +111,20 @@ while ((t = *data++) != XCL_END) break; case PT_LAMP: - if ((chartype == ucp_Lu || chartype == ucp_Ll || chartype == ucp_Lt) == + if ((prop->chartype == ucp_Lu || prop->chartype == ucp_Ll || prop->chartype == ucp_Lt) == (t == XCL_PROP)) return !negated; break; case PT_GC: - if ((data[1] == category) == (t == XCL_PROP)) return !negated; + if ((data[1] == _pcre_ucp_gentype[prop->chartype]) == (t == XCL_PROP)) return !negated; break; case PT_PC: - if ((data[1] == chartype) == (t == XCL_PROP)) return !negated; + if ((data[1] == prop->chartype) == (t == XCL_PROP)) return !negated; break; case PT_SC: - if ((data[1] == script) == (t == XCL_PROP)) return !negated; + if ((data[1] == prop->script) == (t == XCL_PROP)) return !negated; break; /* This should never occur, but compilers may mutter if there is no diff --git a/ext/pcre/pcrelib/pcregrep.c b/ext/pcre/pcrelib/pcregrep.c index f192f0c0c6..92efef1b49 100644 --- a/ext/pcre/pcrelib/pcregrep.c +++ b/ext/pcre/pcrelib/pcregrep.c @@ -137,9 +137,13 @@ static pcre_extra **hints_list = NULL; static char *include_pattern = NULL; static char *exclude_pattern = NULL; +static char *include_dir_pattern = NULL; +static char *exclude_dir_pattern = NULL; static pcre *include_compiled = NULL; static pcre *exclude_compiled = NULL; +static pcre *include_dir_compiled = NULL; +static pcre *exclude_dir_compiled = NULL; static int after_context = 0; static int before_context = 0; @@ -179,15 +183,17 @@ typedef struct option_item { /* Options without a single-letter equivalent get a negative value. This can be used to identify them. */ -#define N_COLOUR (-1) -#define N_EXCLUDE (-2) -#define N_HELP (-3) -#define N_INCLUDE (-4) -#define N_LABEL (-5) -#define N_LOCALE (-6) -#define N_NULL (-7) -#define N_LOFFSETS (-8) -#define N_FOFFSETS (-9) +#define N_COLOUR (-1) +#define N_EXCLUDE (-2) +#define N_EXCLUDE_DIR (-3) +#define N_HELP (-4) +#define N_INCLUDE (-5) +#define N_INCLUDE_DIR (-6) +#define N_LABEL (-7) +#define N_LOCALE (-8) +#define N_NULL (-9) +#define N_LOFFSETS (-10) +#define N_FOFFSETS (-11) static option_item optionlist[] = { { OP_NODATA, N_NULL, NULL, "", " terminate options" }, @@ -220,6 +226,8 @@ static option_item optionlist[] = { { OP_NODATA, 'r', NULL, "recursive", "recursively scan sub-directories" }, { OP_STRING, N_EXCLUDE,&exclude_pattern, "exclude=pattern","exclude matching files when recursing" }, { OP_STRING, N_INCLUDE,&include_pattern, "include=pattern","include matching files when recursing" }, + { OP_STRING, N_EXCLUDE_DIR,&exclude_dir_pattern, "exclude_dir=pattern","exclude matching directories when recursing" }, + { OP_STRING, N_INCLUDE_DIR,&include_dir_pattern, "include_dir=pattern","include matching directories when recursing" }, #ifdef JFRIEDL_DEBUG { OP_OP_NUMBER, 'S', &S_arg, "jeffS", "replace matched (sub)string with X" }, #endif @@ -1044,10 +1052,10 @@ while (ptr < endptr) if (printname != NULL) fprintf(stdout, "%s:", printname); if (number) fprintf(stdout, "%d:", linenumber); if (line_offsets) - fprintf(stdout, "%d,%d", matchptr + offsets[0] - ptr, + fprintf(stdout, "%d,%d", (int)(matchptr + offsets[0] - ptr), offsets[1] - offsets[0]); else if (file_offsets) - fprintf(stdout, "%d,%d", filepos + matchptr + offsets[0] - ptr, + fprintf(stdout, "%d,%d", (int)(filepos + matchptr + offsets[0] - ptr), offsets[1] - offsets[0]); else fwrite(matchptr + offsets[0], 1, offsets[1] - offsets[0], stdout); @@ -1359,8 +1367,9 @@ if (strcmp(pathname, "-") == 0) } /* If the file is a directory, skip if skipping or if we are recursing, scan -each file within it, subject to any include or exclude patterns that were set. -The scanning code is localized so it can be made system-specific. */ +each file and directory within it, subject to any include or exclude patterns +that were set. The scanning code is localized so it can be made +system-specific. */ if ((sep = isdirectory(pathname)) != 0) { @@ -1381,17 +1390,30 @@ if ((sep = isdirectory(pathname)) != 0) while ((nextfile = readdirectory(dir)) != NULL) { - int frc, blen; + int frc, nflen; sprintf(buffer, "%.512s%c%.128s", pathname, sep, nextfile); - blen = strlen(buffer); + nflen = strlen(nextfile); - if (exclude_compiled != NULL && - pcre_exec(exclude_compiled, NULL, buffer, blen, 0, 0, NULL, 0) >= 0) - continue; + if (isdirectory(buffer)) + { + if (exclude_dir_compiled != NULL && + pcre_exec(exclude_dir_compiled, NULL, nextfile, nflen, 0, 0, NULL, 0) >= 0) + continue; - if (include_compiled != NULL && - pcre_exec(include_compiled, NULL, buffer, blen, 0, 0, NULL, 0) < 0) - continue; + if (include_dir_compiled != NULL && + pcre_exec(include_dir_compiled, NULL, nextfile, nflen, 0, 0, NULL, 0) < 0) + continue; + } + else + { + if (exclude_compiled != NULL && + pcre_exec(exclude_compiled, NULL, nextfile, nflen, 0, 0, NULL, 0) >= 0) + continue; + + if (include_compiled != NULL && + pcre_exec(include_compiled, NULL, nextfile, nflen, 0, 0, NULL, 0) < 0) + continue; + } frc = grep_or_recurse(buffer, dir_recurse, FALSE); if (frc > 1) rc = frc; @@ -2287,6 +2309,30 @@ if (include_pattern != NULL) } } +if (exclude_dir_pattern != NULL) + { + exclude_dir_compiled = pcre_compile(exclude_dir_pattern, 0, &error, &errptr, + pcretables); + if (exclude_dir_compiled == NULL) + { + fprintf(stderr, "pcregrep: Error in 'exclude_dir' regex at offset %d: %s\n", + errptr, error); + goto EXIT2; + } + } + +if (include_dir_pattern != NULL) + { + include_dir_compiled = pcre_compile(include_dir_pattern, 0, &error, &errptr, + pcretables); + if (include_dir_compiled == NULL) + { + fprintf(stderr, "pcregrep: Error in 'include_dir' regex at offset %d: %s\n", + errptr, error); + goto EXIT2; + } + } + /* If there are no further arguments, do the business on stdin and exit. */ if (i >= argc) diff --git a/ext/pcre/pcrelib/pcreposix.c b/ext/pcre/pcrelib/pcreposix.c index 4cb5e12a1b..d552abcd1e 100644 --- a/ext/pcre/pcrelib/pcreposix.c +++ b/ext/pcre/pcrelib/pcreposix.c @@ -124,7 +124,8 @@ static const int eint[] = { REG_BADPAT, /* (?+ or (?- must be followed by a non-zero number */ REG_BADPAT, /* number is too big */ REG_BADPAT, /* subpattern name expected */ - REG_BADPAT /* digit expected after (?+ */ + REG_BADPAT, /* digit expected after (?+ */ + REG_BADPAT /* ] is an invalid data character in JavaScript compatibility mode */ }; /* Table of texts corresponding to POSIX error codes */ @@ -157,7 +158,7 @@ static const char *const pstring[] = { * Translate error code to string * *************************************************/ -PCREPOSIX_EXP_DEFN size_t +PCREPOSIX_EXP_DEFN size_t PCRE_CALL_CONVENTION regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size) { const char *message, *addmessage; @@ -192,7 +193,7 @@ return length + addlength; * Free store held by a regex * *************************************************/ -PCREPOSIX_EXP_DEFN void +PCREPOSIX_EXP_DEFN void PCRE_CALL_CONVENTION regfree(regex_t *preg) { (pcre_free)(preg->re_pcre); @@ -215,7 +216,7 @@ Returns: 0 on success various non-zero codes on failure */ -PCREPOSIX_EXP_DEFN int +PCREPOSIX_EXP_DEFN int PCRE_CALL_CONVENTION regcomp(regex_t *preg, const char *pattern, int cflags) { const char *errorptr; @@ -257,11 +258,11 @@ If REG_NOSUB was specified at compile time, the PCRE_NO_AUTO_CAPTURE flag will be set. When this is the case, the nmatch and pmatch arguments are ignored, and the only result is yes/no/error. */ -PCREPOSIX_EXP_DEFN int +PCREPOSIX_EXP_DEFN int PCRE_CALL_CONVENTION regexec(const regex_t *preg, const char *string, size_t nmatch, regmatch_t pmatch[], int eflags) { -int rc; +int rc, so, eo; int options = 0; int *ovector = NULL; int small_ovector[POSIX_MALLOC_THRESHOLD * 3]; @@ -294,7 +295,23 @@ else if (nmatch > 0) } } -rc = pcre_exec((const pcre *)preg->re_pcre, NULL, string, (int)strlen(string), +/* REG_STARTEND is a BSD extension, to allow for non-NUL-terminated strings. +The man page from OS X says "REG_STARTEND affects only the location of the +string, not how it is matched". That is why the "so" value is used to bump the +start location rather than being passed as a PCRE "starting offset". */ + +if ((eflags & REG_STARTEND) != 0) + { + so = pmatch[0].rm_so; + eo = pmatch[0].rm_eo; + } +else + { + so = 0; + eo = strlen(string); + } + +rc = pcre_exec((const pcre *)preg->re_pcre, NULL, string + so, (eo - so), 0, options, ovector, nmatch * 3); if (rc == 0) rc = nmatch; /* All captured slots were filled in */ diff --git a/ext/pcre/pcrelib/pcreposix.h b/ext/pcre/pcrelib/pcreposix.h index 109376d90e..a73ad261de 100644 --- a/ext/pcre/pcrelib/pcreposix.h +++ b/ext/pcre/pcrelib/pcreposix.h @@ -59,6 +59,7 @@ extern "C" { #define REG_DOTALL 0x0010 /* NOT defined by POSIX. */ #define REG_NOSUB 0x0020 #define REG_UTF8 0x0040 /* NOT defined by POSIX. */ +#define REG_STARTEND 0x0080 /* BSD feature: pass subject string by so,eo */ /* This is not used by PCRE, but by defining it we make it easier to slot PCRE into existing programs that make POSIX calls. */ diff --git a/ext/pcre/pcrelib/testdata/testinput1 b/ext/pcre/pcrelib/testdata/testinput1 index 91554ffc49..081575bc7b 100644 --- a/ext/pcre/pcrelib/testdata/testinput1 +++ b/ext/pcre/pcrelib/testdata/testinput1 @@ -4036,4 +4036,7 @@ ] p +/.*[op][xyz]/ + fooabcfoo + / End of testinput1 / diff --git a/ext/pcre/pcrelib/testdata/testinput2 b/ext/pcre/pcrelib/testdata/testinput2 index 1a13fa8dd9..2b64546a8e 100644 --- a/ext/pcre/pcrelib/testdata/testinput2 +++ b/ext/pcre/pcrelib/testdata/testinput2 @@ -1988,10 +1988,10 @@ a random value. /Ix a\rb\ /^abc./mgx - abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 \x{2028}abc8 \x{2029}abc9 JUNK + abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK /abc.$/mgx - abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7\x{2028} abc8\x{2029} abc9 + abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7 abc9 /a/ @@ -2147,7 +2147,7 @@ a random value. /Ix abc\r\n\r\n /abc.$/mgx - abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7\x{2028} abc8\x{2029} abc9 + abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9 /^X/m XABC @@ -2589,4 +2589,141 @@ a random value. /Ix /[[:a\dz:]]/ +/^(?a|b\gc)/ + aaaa + bacxxx + bbaccxxx + bbbacccxx + +/^(?a|b\g'name'c)/ + aaaa + bacxxx + bbaccxxx + bbbacccxx + +/^(a|b\g<1>c)/ + aaaa + bacxxx + bbaccxxx + bbbacccxx + +/^(a|b\g'1'c)/ + aaaa + bacxxx + bbaccxxx + bbbacccxx + +/^(a|b\g'-1'c)/ + aaaa + bacxxx + bbaccxxx + bbbacccxx + +/(^(a|b\g<-1>c))/ + aaaa + bacxxx + bbaccxxx + bbbacccxx + +/(^(a|b\g<-1'c))/ + +/(^(a|b\g{-1}))/ + bacxxx + +/(?-i:\g)(?i:(?a))/ + XaaX + XAAX + +/(?i:\g)(?-i:(?a))/ + XaaX + ** Failers + XAAX + +/(?-i:\g<+1>)(?i:(a))/ + XaaX + XAAX + +/(?=(?(?#simplesyntax)\$(?[a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)(?:\[(?[a-zA-Z0-9_\x{7f}-\x{ff}]+|\$\g)\]|->\g(\(.*?\))?)?|(?#simple syntax withbraces)\$\{(?:\g(?\[(?:\g|'(?:\\.|[^'\\])*'|"(?:\g|\\.|[^"\\])*")\])?|\g|\$\{\g\})\}|(?#complexsyntax)\{(?\$(?\g(\g*|\(.*?\))?)(?:->\g)*|\$\g|\$\{\g\})\}))\{/ + +/(?a|b|c)\g*/ + abc + accccbbb + +/^(?+1)(?x|y){0}z/ + xzxx + yzyy + ** Failers + xxz + +/(\3)(\1)(a)/ + cat + +/(\3)(\1)(a)/ + cat + +/TA]/ + The ACTA] comes + +/TA]/ + The ACTA] comes + +/(?2)[]a()b](abc)/ + abcbabc + +/(?2)[^]a()b](abc)/ + abcbabc + +/(?1)[]a()b](abc)/ + abcbabc + ** Failers + abcXabc + +/(?1)[^]a()b](abc)/ + abcXabc + ** Failers + abcbabc + +/(?2)[]a()b](abc)(xyz)/ + xyzbabcxyz + +/(?&N)[]a(?)](?abc)/ + abc)](abc)/ + abc + ** Failers + ab + +/a[]+b/ + ** Failers + ab + +/a[]*+b/ + ** Failers + ab + +/a[^]b/ + aXb + a\nb + ** Failers + ab + +/a[^]+b/ + aXb + a\nX\nXb + ** Failers + ab + +/a(?!)+b/ + +/a(*FAIL)+b/ + +/(abc|pqr|123){0}[xyz]/SI + / End of testinput2 / diff --git a/ext/pcre/pcrelib/testdata/testinput4 b/ext/pcre/pcrelib/testdata/testinput4 index c98c085205..e5f61946e2 100644 --- a/ext/pcre/pcrelib/testdata/testinput4 +++ b/ext/pcre/pcrelib/testdata/testinput4 @@ -609,4 +609,18 @@ /[^ABCDEFGHIJKLMNOPQRSTUVWXYZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƁƂƄƆƇƉƊƋƎƏƐƑƓƔƖƗƘƜƝƟƠƢƤƦƧƩƬƮƯƱƲƳƵƷƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶǷǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾɁΆΈΉΊΌΎΏΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΪΫϒϓϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽϾϿЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸԀԂԄԆԈԊԌԎԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸἈἉἊἋἌἍἎἏἘἙἚἛἜἝἨἩἪἫἬἭἮἯἸἹἺἻἼἽἾἿὈὉὊὋὌὍὙὛὝὟὨὩὪὫὬὭὮὯᾸᾹᾺΆῈΈῊΉῘῙῚΊῨῩῪΎῬῸΌῺΏabcdefghijklmnopqrstuvwxyzªµºßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżžſƀƃƅƈƌƍƒƕƙƚƛƞơƣƥƨƪƫƭưƴƶƹƺƽƾƿdžljnjǎǐǒǔǖǘǚǜǝǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳȴȵȶȷȸȹȼȿɀɐɑɒɓɔɕɖɗɘəɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯΐάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώϐϑϕϖϗϙϛϝϟϡϣϥϧϩϫϭϯϰϱϲϳϵϸϻϼабвгдежзийклмнопрстуфхцчшщъыьэюяѐёђѓєѕіїјљњћќѝўџѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹԁԃԅԇԉԋԍԏաբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտրցւփքօֆևᴀᴁᴂᴃᴄᴅᴆᴇᴈᴉᴊᴋᴌᴍᴎᴏᴐᴑᴒᴓᴔᴕᴖᴗᴘᴙᴚᴛᴜᴝᴞᴟᴠᴡᴢᴣᴤᴥᴦᴧᴨᴩᴪᴫᵢᵣᵤᵥᵦᵧᵨᵩᵪᵫᵬᵭᵮᵯᵰᵱᵲᵳᵴᵵᵶᵷᵹᵺᵻᵼᵽᵾᵿᶀᶁᶂᶃᶄᶅᶆᶇᶈᶉᶊᶋᶌᶍᶎᶏᶐᶑᶒᶓᶔᶕᶖᶗᶘᶙᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕẖẗẘẙẚẛạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹἀἁἂἃἄἅἆἇἐἑἒἓἔἕἠἡἢἣἤἥἦἧἰἱἲἳἴἵἶἷὀὁὂὃὄὅὐὑὒὓὔὕὖὗὠὡὢὣὤὥὦὧὰάὲέὴήὶίὸόὺύὼώᾀᾁᾂᾃᾄᾅᾆᾇᾐᾑᾒᾓᾔᾕᾖᾗᾠᾡᾢᾣᾤᾥᾦᾧᾰᾱᾲᾳᾴᾶᾷιῂῃῄῆῇῐῑῒΐῖῗῠῡῢΰῤῥῦῧῲῳῴῶῷⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳤⴀⴁⴂⴃⴄⴅⴆⴇⴈⴉⴊⴋⴌⴍⴎⴏⴐⴑⴒⴓⴔⴕⴖⴗⴘⴙⴚⴛⴜⴝⴞⴟⴠⴡⴢⴣⴤⴥfffiflffifflſtstﬓﬔﬕﬖﬗ\d-_^]/8 +/^[^d]*?$/ + abc + +/^[^d]*?$/8 + abc + +/^[^d]*?$/i + abc + +/^[^d]*?$/8i + abc + +/(?i)[\xc3\xa9\xc3\xbd]|[\xc3\xa9\xc3\xbdA]/8 + / End of testinput4 / diff --git a/ext/pcre/pcrelib/testdata/testinput5 b/ext/pcre/pcrelib/testdata/testinput5 index 75a4857b4d..7d64b436fd 100644 --- a/ext/pcre/pcrelib/testdata/testinput5 +++ b/ext/pcre/pcrelib/testdata/testinput5 @@ -461,4 +461,23 @@ can't tell the difference.) --/ /[[:a\x{100}b:]]/8 +/a[^]b/8 + a\x{1234}b + a\nb + ** Failers + ab + +/a[^]+b/8 + aXb + a\nX\nX\x{1234}b + ** Failers + ab + +/(\x{de})\1/ + \x{de}\x{de} + \x{123} + +/X/8f + A\x{1ec5}ABCXYZ + / End of testinput5 / diff --git a/ext/pcre/pcrelib/testdata/testinput6 b/ext/pcre/pcrelib/testdata/testinput6 index 0204a7acae..a8640f9920 100644 --- a/ext/pcre/pcrelib/testdata/testinput6 +++ b/ext/pcre/pcrelib/testdata/testinput6 @@ -763,7 +763,7 @@ of case for anything other than the ASCII letters. / \x{1b00}\x{12000}\x{7c0}\x{a840}\x{10900} /The next two are special cases where the lengths of the different cases of the -same character differ. The first went wrong with heap fram storage; the 2nd +same character differ. The first went wrong with heap frame storage; the 2nd was broken in all cases./ /^\x{023a}+?(\x{0130}+)/8i @@ -907,4 +907,40 @@ was broken in all cases./ /\p{Cc}{2}+/8BZ +/\x{c0}+\x{116}+/8i + \x{c0}\x{e0}\x{116}\x{117} + +/[\x{c0}\x{116}]+/8i + \x{c0}\x{e0}\x{116}\x{117} + +/\p{Carian}\p{Cham}\p{Kayah_Li}\p{Lepcha}\p{Lycian}\p{Lydian}\p{Ol_Chiki}\p{Rejang}\p{Saurashtra}\p{Sundanese}\p{Vai}/8 + \x{102A4}\x{AA52}\x{A91D}\x{1C46}\x{10283}\x{1092E}\x{1C6B}\x{A93B}\x{A8BF}\x{1BA0}\x{A50A}==== + +/\x{a77d}\x{1d79}/8i + \x{a77d}\x{1d79} + \x{1d79}\x{a77d} + +/\x{a77d}\x{1d79}/8 + \x{a77d}\x{1d79} + ** Failers + \x{1d79}\x{a77d} + +/(A)\1/8i + AA + Aa + aa + aA + +/(\x{de})\1/8i + \x{de}\x{de} + \x{de}\x{fe} + \x{fe}\x{fe} + \x{fe}\x{de} + +/(\x{10a})\1/8i + \x{10a}\x{10a} + \x{10a}\x{10b} + \x{10b}\x{10b} + \x{10b}\x{10a} + / End of testinput6 / diff --git a/ext/pcre/pcrelib/testdata/testinput7 b/ext/pcre/pcrelib/testdata/testinput7 index 221bc938b1..5ec48270b0 100644 --- a/ext/pcre/pcrelib/testdata/testinput7 +++ b/ext/pcre/pcrelib/testdata/testinput7 @@ -4151,10 +4151,10 @@ a\rb\ /^abc./mgx - abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 \x{2028}abc8 \x{2029}abc9 JUNK + abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK /abc.$/mgx - abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7\x{2028} abc8\x{2029} abc9 + abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9 /^a\Rb/ a\nb @@ -4364,5 +4364,32 @@ a\r\r\r\r\rb a\x85\85b\ a\x0b\0bb\ + +/a(?!)|\wbc/ + abc + +/a[]b/ + ** Failers + ab + +/a[]+b/ + ** Failers + ab + +/a[]*+b/ + ** Failers + ab + +/a[^]b/ + aXb + a\nb + ** Failers + ab + +/a[^]+b/ + aXb + a\nX\nXb + ** Failers + ab / End of testinput7 / diff --git a/ext/pcre/pcrelib/testdata/testinput8 b/ext/pcre/pcrelib/testdata/testinput8 index 5bcfab5c08..11884adf65 100644 --- a/ext/pcre/pcrelib/testdata/testinput8 +++ b/ext/pcre/pcrelib/testdata/testinput8 @@ -664,4 +664,7 @@ a\x{85}b\ a\x0bb\ +/X/8f + A\x{1ec5}ABCXYZ + / End of testinput 8 / diff --git a/ext/pcre/pcrelib/testdata/testinput9 b/ext/pcre/pcrelib/testdata/testinput9 index 8a606318b7..ab044558d1 100644 --- a/ext/pcre/pcrelib/testdata/testinput9 +++ b/ext/pcre/pcrelib/testdata/testinput9 @@ -819,10 +819,28 @@ /^\x{023a}+([^X])/8i \x{023a}\x{2c65}X +/\x{c0}+\x{116}+/8i + \x{c0}\x{e0}\x{116}\x{117} + +/[\x{c0}\x{116}]+/8i + \x{c0}\x{e0}\x{116}\x{117} + /Check property support in non-UTF-8 mode/ /\p{L}{4}/ 123abcdefg 123abc\xc4\xc5zz +/\p{Carian}\p{Cham}\p{Kayah_Li}\p{Lepcha}\p{Lycian}\p{Lydian}\p{Ol_Chiki}\p{Rejang}\p{Saurashtra}\p{Sundanese}\p{Vai}/8 + \x{102A4}\x{AA52}\x{A91D}\x{1C46}\x{10283}\x{1092E}\x{1C6B}\x{A93B}\x{A8BF}\x{1BA0}\x{A50A}==== + +/\x{a77d}\x{1d79}/8i + \x{a77d}\x{1d79} + \x{1d79}\x{a77d} + +/\x{a77d}\x{1d79}/8 + \x{a77d}\x{1d79} + ** Failers + \x{1d79}\x{a77d} + / End / diff --git a/ext/pcre/pcrelib/testdata/testoutput1 b/ext/pcre/pcrelib/testdata/testoutput1 index 9b8b268edb..208df49bcb 100644 --- a/ext/pcre/pcrelib/testdata/testoutput1 +++ b/ext/pcre/pcrelib/testdata/testoutput1 @@ -6605,4 +6605,8 @@ No match p 0: p +/.*[op][xyz]/ + fooabcfoo +No match + / End of testinput1 / diff --git a/ext/pcre/pcrelib/testdata/testoutput10 b/ext/pcre/pcrelib/testdata/testoutput10 index dbd59241ad..4eaaa39183 100644 --- a/ext/pcre/pcrelib/testdata/testoutput10 +++ b/ext/pcre/pcrelib/testdata/testoutput10 @@ -21,7 +21,7 @@ Memory allocation (code space): 25 ------------------------------------------------------------------ 0 21 Bra 3 9 CBra 1 - 8 Any* + 8 AllAny* 10 X 12 6 Alt 15 ^ @@ -37,7 +37,7 @@ Memory allocation (code space): 29 0 25 Bra 3 9 Bra 6 04 Opt - 8 Any* + 8 AllAny* 10 X 12 8 Alt 15 04 Opt diff --git a/ext/pcre/pcrelib/testdata/testoutput2 b/ext/pcre/pcrelib/testdata/testoutput2 index dba227f503..2ac018b3b6 100644 --- a/ext/pcre/pcrelib/testdata/testoutput2 +++ b/ext/pcre/pcrelib/testdata/testoutput2 @@ -1126,7 +1126,7 @@ Need char = 'X' /.*X/IDZs ------------------------------------------------------------------ Bra - Any* + AllAny* X Ket End @@ -1160,7 +1160,7 @@ No need char ------------------------------------------------------------------ Bra CBra 1 - Any* + AllAny* X Alt ^ @@ -1179,7 +1179,7 @@ No need char ------------------------------------------------------------------ Bra CBra 1 - Any* + AllAny* X Alt ^ @@ -1199,7 +1199,7 @@ No need char Bra Bra 04 Opt - Any* + AllAny* X Alt 04 Opt @@ -1212,8 +1212,8 @@ No need char ------------------------------------------------------------------ Capturing subpattern count = 0 Partial matching not supported -No options -First char at start or follows newline +Options: anchored +No first char No need char /\Biss\B/I+ @@ -7851,7 +7851,7 @@ No match No match /^abc./mgx - abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 \x{2028}abc8 \x{2029}abc9 JUNK + abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK 0: abc1 0: abc2 0: abc3 @@ -7861,7 +7861,7 @@ No match 0: abc7 /abc.$/mgx - abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7\x{2028} abc8\x{2029} abc9 + abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7 abc9 0: abc1 0: abc2 0: abc3 @@ -8074,13 +8074,13 @@ No match Failed: reference to non-existent subpattern at offset 7 /^(a)\g/ -Failed: \g is not followed by a braced name or an optionally braced non-zero number at offset 5 +Failed: a numbered reference must not be zero at offset 5 /^(a)\g{0}/ -Failed: \g is not followed by a braced name or an optionally braced non-zero number at offset 7 +Failed: a numbered reference must not be zero at offset 8 /^(a)\g{3/ -Failed: \g is not followed by a braced name or an optionally braced non-zero number at offset 8 +Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 8 /^(a)\g{4a}/ Failed: reference to non-existent subpattern at offset 9 @@ -8163,7 +8163,7 @@ No match 0+ /abc.$/mgx - abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7\x{2028} abc8\x{2029} abc9 + abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9 0: abc1 0: abc4 0: abc5 @@ -8217,13 +8217,13 @@ No match No match /x(?-0)y/ -Failed: (?+ or (?- or (?(+ or (?(- must be followed by a non-zero number at offset 5 +Failed: a numbered reference must not be zero at offset 5 /x(?-1)y/ Failed: reference to non-existent subpattern at offset 5 /x(?+0)y/ -Failed: (?+ or (?- or (?(+ or (?(- must be followed by a non-zero number at offset 5 +Failed: a numbered reference must not be zero at offset 5 /x(?+1)y/ Failed: reference to non-existent subpattern at offset 5 @@ -9385,4 +9385,257 @@ Failed: unknown POSIX class name at offset 6 /[[:a\dz:]]/ Failed: unknown POSIX class name at offset 3 +/^(?a|b\gc)/ + aaaa + 0: a + 1: a + bacxxx + 0: bac + 1: bac + bbaccxxx + 0: bbacc + 1: bbacc + bbbacccxx + 0: bbbaccc + 1: bbbaccc + +/^(?a|b\g'name'c)/ + aaaa + 0: a + 1: a + bacxxx + 0: bac + 1: bac + bbaccxxx + 0: bbacc + 1: bbacc + bbbacccxx + 0: bbbaccc + 1: bbbaccc + +/^(a|b\g<1>c)/ + aaaa + 0: a + 1: a + bacxxx + 0: bac + 1: bac + bbaccxxx + 0: bbacc + 1: bbacc + bbbacccxx + 0: bbbaccc + 1: bbbaccc + +/^(a|b\g'1'c)/ + aaaa + 0: a + 1: a + bacxxx + 0: bac + 1: bac + bbaccxxx + 0: bbacc + 1: bbacc + bbbacccxx + 0: bbbaccc + 1: bbbaccc + +/^(a|b\g'-1'c)/ + aaaa + 0: a + 1: a + bacxxx + 0: bac + 1: bac + bbaccxxx + 0: bbacc + 1: bbacc + bbbacccxx + 0: bbbaccc + 1: bbbaccc + +/(^(a|b\g<-1>c))/ + aaaa + 0: a + 1: a + 2: a + bacxxx + 0: bac + 1: bac + 2: bac + bbaccxxx + 0: bbacc + 1: bbacc + 2: bbacc + bbbacccxx + 0: bbbaccc + 1: bbbaccc + 2: bbbaccc + +/(^(a|b\g<-1'c))/ +Failed: \g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number at offset 15 + +/(^(a|b\g{-1}))/ + bacxxx +No match + +/(?-i:\g)(?i:(?a))/ + XaaX + 0: aa + 1: a + XAAX + 0: AA + 1: A + +/(?i:\g)(?-i:(?a))/ + XaaX + 0: aa + 1: a + ** Failers +No match + XAAX +No match + +/(?-i:\g<+1>)(?i:(a))/ + XaaX + 0: aa + 1: a + XAAX + 0: AA + 1: A + +/(?=(?(?#simplesyntax)\$(?[a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)(?:\[(?[a-zA-Z0-9_\x{7f}-\x{ff}]+|\$\g)\]|->\g(\(.*?\))?)?|(?#simple syntax withbraces)\$\{(?:\g(?\[(?:\g|'(?:\\.|[^'\\])*'|"(?:\g|\\.|[^"\\])*")\])?|\g|\$\{\g\})\}|(?#complexsyntax)\{(?\$(?\g(\g*|\(.*?\))?)(?:->\g)*|\$\g|\$\{\g\})\}))\{/ + +/(?a|b|c)\g*/ + abc + 0: abc + 1: a + accccbbb + 0: accccbbb + 1: a + +/^(?+1)(?x|y){0}z/ + xzxx + 0: xz + 1: + yzyy + 0: yz + 1: + ** Failers +No match + xxz +No match + +/(\3)(\1)(a)/ + cat +No match + +/(\3)(\1)(a)/ + cat + 0: a + 1: + 2: + 3: a + +/TA]/ + The ACTA] comes + 0: TA] + +/TA]/ +Failed: ] is an invalid data character in JavaScript compatibility mode at offset 2 + +/(?2)[]a()b](abc)/ +Failed: reference to non-existent subpattern at offset 3 + +/(?2)[^]a()b](abc)/ +Failed: reference to non-existent subpattern at offset 3 + +/(?1)[]a()b](abc)/ + abcbabc + 0: abcbabc + 1: abc + ** Failers +No match + abcXabc +No match + +/(?1)[^]a()b](abc)/ + abcXabc + 0: abcXabc + 1: abc + ** Failers +No match + abcbabc +No match + +/(?2)[]a()b](abc)(xyz)/ + xyzbabcxyz + 0: xyzbabcxyz + 1: abc + 2: xyz + +/(?&N)[]a(?)](?abc)/ +Failed: reference to non-existent subpattern at offset 4 + +/(?&N)[]a(?)](abc)/ +Failed: reference to non-existent subpattern at offset 4 + +/a[]b/ +Failed: missing terminating ] for character class at offset 4 + +/a[^]b/ +Failed: missing terminating ] for character class at offset 5 + +/a[]b/ + ** Failers +No match + ab +No match + +/a[]+b/ + ** Failers +No match + ab +No match + +/a[]*+b/ + ** Failers +No match + ab +No match + +/a[^]b/ + aXb + 0: aXb + a\nb + 0: a\x0ab + ** Failers +No match + ab +No match + +/a[^]+b/ + aXb + 0: aXb + a\nX\nXb + 0: a\x0aX\x0aXb + ** Failers +No match + ab +No match + +/a(?!)+b/ +Failed: nothing to repeat at offset 5 + +/a(*FAIL)+b/ +Failed: nothing to repeat at offset 8 + +/(abc|pqr|123){0}[xyz]/SI +Capturing subpattern count = 1 +No options +No first char +No need char +Starting byte set: x y z + / End of testinput2 / diff --git a/ext/pcre/pcrelib/testdata/testoutput4 b/ext/pcre/pcrelib/testdata/testoutput4 index d87ea4bcc4..e67a95895f 100644 --- a/ext/pcre/pcrelib/testdata/testoutput4 +++ b/ext/pcre/pcrelib/testdata/testoutput4 @@ -1071,4 +1071,22 @@ No match /[^ABCDEFGHIJKLMNOPQRSTUVWXYZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƁƂƄƆƇƉƊƋƎƏƐƑƓƔƖƗƘƜƝƟƠƢƤƦƧƩƬƮƯƱƲƳƵƷƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶǷǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾɁΆΈΉΊΌΎΏΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩΪΫϒϓϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽϾϿЀЁЂЃЄЅІЇЈЉЊЋЌЍЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸԀԂԄԆԈԊԌԎԱԲԳԴԵԶԷԸԹԺԻԼԽԾԿՀՁՂՃՄՅՆՇՈՉՊՋՌՍՎՏՐՑՒՓՔՕՖႠႡႢႣႤႥႦႧႨႩႪႫႬႭႮႯႰႱႲႳႴႵႶႷႸႹႺႻႼႽႾႿჀჁჂჃჄჅḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸἈἉἊἋἌἍἎἏἘἙἚἛἜἝἨἩἪἫἬἭἮἯἸἹἺἻἼἽἾἿὈὉὊὋὌὍὙὛὝὟὨὩὪὫὬὭὮὯᾸᾹᾺΆῈΈῊΉῘῙῚΊῨῩῪΎῬῸΌῺΏabcdefghijklmnopqrstuvwxyzªµºßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżžſƀƃƅƈƌƍƒƕƙƚƛƞơƣƥƨƪƫƭưƴƶƹƺƽƾƿdžljnjǎǐǒǔǖǘǚǜǝǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳȴȵȶȷȸȹȼȿɀɐɑɒɓɔɕɖɗɘəɚɛɜɝɞɟɠɡɢɣɤɥɦɧɨɩɪɫɬɭɮɯɰɱɲɳɴɵɶɷɸɹɺɻɼɽɾɿʀʁʂʃʄʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯΐάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώϐϑϕϖϗϙϛϝϟϡϣϥϧϩϫϭϯϰϱϲϳϵϸϻϼабвгдежзийклмнопрстуфхцчшщъыьэюяѐёђѓєѕіїјљњћќѝўџѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹԁԃԅԇԉԋԍԏաբգդեզէըթժիլխծկհձղճմյնշոչպջռսվտրցւփքօֆևᴀᴁᴂᴃᴄᴅᴆᴇᴈᴉᴊᴋᴌᴍᴎᴏᴐᴑᴒᴓᴔᴕᴖᴗᴘᴙᴚᴛᴜᴝᴞᴟᴠᴡᴢᴣᴤᴥᴦᴧᴨᴩᴪᴫᵢᵣᵤᵥᵦᵧᵨᵩᵪᵫᵬᵭᵮᵯᵰᵱᵲᵳᵴᵵᵶᵷᵹᵺᵻᵼᵽᵾᵿᶀᶁᶂᶃᶄᶅᶆᶇᶈᶉᶊᶋᶌᶍᶎᶏᶐᶑᶒᶓᶔᶕᶖᶗᶘᶙᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕẖẗẘẙẚẛạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹἀἁἂἃἄἅἆἇἐἑἒἓἔἕἠἡἢἣἤἥἦἧἰἱἲἳἴἵἶἷὀὁὂὃὄὅὐὑὒὓὔὕὖὗὠὡὢὣὤὥὦὧὰάὲέὴήὶίὸόὺύὼώᾀᾁᾂᾃᾄᾅᾆᾇᾐᾑᾒᾓᾔᾕᾖᾗᾠᾡᾢᾣᾤᾥᾦᾧᾰᾱᾲᾳᾴᾶᾷιῂῃῄῆῇῐῑῒΐῖῗῠῡῢΰῤῥῦῧῲῳῴῶῷⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳤⴀⴁⴂⴃⴄⴅⴆⴇⴈⴉⴊⴋⴌⴍⴎⴏⴐⴑⴒⴓⴔⴕⴖⴗⴘⴙⴚⴛⴜⴝⴞⴟⴠⴡⴢⴣⴤⴥfffiflffifflſtstﬓﬔﬕﬖﬗ\d-_^]/8 +/^[^d]*?$/ + abc + 0: abc + +/^[^d]*?$/8 + abc + 0: abc + +/^[^d]*?$/i + abc + 0: abc + +/^[^d]*?$/8i + abc + 0: abc + +/(?i)[\xc3\xa9\xc3\xbd]|[\xc3\xa9\xc3\xbdA]/8 + / End of testinput4 / diff --git a/ext/pcre/pcrelib/testdata/testoutput5 b/ext/pcre/pcrelib/testdata/testoutput5 index abbe1c87de..9567233703 100644 --- a/ext/pcre/pcrelib/testdata/testoutput5 +++ b/ext/pcre/pcrelib/testdata/testoutput5 @@ -1608,4 +1608,37 @@ No match /[[:a\x{100}b:]]/8 Failed: unknown POSIX class name at offset 3 +/a[^]b/8 + a\x{1234}b + 0: a\x{1234}b + a\nb + 0: a\x{0a}b + ** Failers +No match + ab +No match + +/a[^]+b/8 + aXb + 0: aXb + a\nX\nX\x{1234}b + 0: a\x{0a}X\x{0a}X\x{1234}b + ** Failers +No match + ab +No match + +/(\x{de})\1/ + \x{de}\x{de} + 0: \xde\xde + 1: \xde + \x{123} +** Character \x{123} is greater than 255 and UTF-8 mode is not enabled. +** Truncation will probably give the wrong result. +No match + +/X/8f + A\x{1ec5}ABCXYZ + 0: X + / End of testinput5 / diff --git a/ext/pcre/pcrelib/testdata/testoutput6 b/ext/pcre/pcrelib/testdata/testoutput6 index db825b08c1..caba466bc9 100644 --- a/ext/pcre/pcrelib/testdata/testoutput6 +++ b/ext/pcre/pcrelib/testdata/testoutput6 @@ -1431,7 +1431,7 @@ of case for anything other than the ASCII letters. / 0: \x{1b00}\x{12000}\x{7c0}\x{a840}\x{10900} /The next two are special cases where the lengths of the different cases of the -same character differ. The first went wrong with heap fram storage; the 2nd +same character differ. The first went wrong with heap frame storage; the 2nd was broken in all cases./ /^\x{023a}+?(\x{0130}+)/8i @@ -1679,4 +1679,72 @@ No match End ------------------------------------------------------------------ +/\x{c0}+\x{116}+/8i + \x{c0}\x{e0}\x{116}\x{117} + 0: \x{c0}\x{e0}\x{116}\x{117} + +/[\x{c0}\x{116}]+/8i + \x{c0}\x{e0}\x{116}\x{117} + 0: \x{c0}\x{e0}\x{116}\x{117} + +/\p{Carian}\p{Cham}\p{Kayah_Li}\p{Lepcha}\p{Lycian}\p{Lydian}\p{Ol_Chiki}\p{Rejang}\p{Saurashtra}\p{Sundanese}\p{Vai}/8 + \x{102A4}\x{AA52}\x{A91D}\x{1C46}\x{10283}\x{1092E}\x{1C6B}\x{A93B}\x{A8BF}\x{1BA0}\x{A50A}==== + 0: \x{102a4}\x{aa52}\x{a91d}\x{1c46}\x{10283}\x{1092e}\x{1c6b}\x{a93b}\x{a8bf}\x{1ba0}\x{a50a} + +/\x{a77d}\x{1d79}/8i + \x{a77d}\x{1d79} + 0: \x{a77d}\x{1d79} + \x{1d79}\x{a77d} + 0: \x{1d79}\x{a77d} + +/\x{a77d}\x{1d79}/8 + \x{a77d}\x{1d79} + 0: \x{a77d}\x{1d79} + ** Failers +No match + \x{1d79}\x{a77d} +No match + +/(A)\1/8i + AA + 0: AA + 1: A + Aa + 0: Aa + 1: A + aa + 0: aa + 1: a + aA + 0: aA + 1: a + +/(\x{de})\1/8i + \x{de}\x{de} + 0: \x{de}\x{de} + 1: \x{de} + \x{de}\x{fe} + 0: \x{de}\x{fe} + 1: \x{de} + \x{fe}\x{fe} + 0: \x{fe}\x{fe} + 1: \x{fe} + \x{fe}\x{de} + 0: \x{fe}\x{de} + 1: \x{fe} + +/(\x{10a})\1/8i + \x{10a}\x{10a} + 0: \x{10a}\x{10a} + 1: \x{10a} + \x{10a}\x{10b} + 0: \x{10a}\x{10b} + 1: \x{10a} + \x{10b}\x{10b} + 0: \x{10b}\x{10b} + 1: \x{10b} + \x{10b}\x{10a} + 0: \x{10b}\x{10a} + 1: \x{10b} + / End of testinput6 / diff --git a/ext/pcre/pcrelib/testdata/testoutput7 b/ext/pcre/pcrelib/testdata/testoutput7 index d8e3833f39..aef4b6ceb5 100644 --- a/ext/pcre/pcrelib/testdata/testoutput7 +++ b/ext/pcre/pcrelib/testdata/testoutput7 @@ -6805,7 +6805,7 @@ No match No match /^abc./mgx - abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 \x{2028}abc8 \x{2029}abc9 JUNK + abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x85abc7 JUNK 0: abc1 0: abc2 0: abc3 @@ -6815,7 +6815,7 @@ No match 0: abc7 /abc.$/mgx - abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc7\x{2028} abc8\x{2029} abc9 + abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x85 abc9 0: abc1 0: abc2 0: abc3 @@ -7211,5 +7211,47 @@ No match No match a\x0b\0bb\ No match + +/a(?!)|\wbc/ + abc + 0: abc + +/a[]b/ + ** Failers +No match + ab +No match + +/a[]+b/ + ** Failers +No match + ab +No match + +/a[]*+b/ + ** Failers +No match + ab +No match + +/a[^]b/ + aXb + 0: aXb + a\nb + 0: a\x0ab + ** Failers +No match + ab +No match + +/a[^]+b/ + aXb + 0: aXb + a\nX\nXb + 0: a\x0aX\x0aXb + ** Failers +No match + ab +No match / End of testinput7 / diff --git a/ext/pcre/pcrelib/testdata/testoutput8 b/ext/pcre/pcrelib/testdata/testoutput8 index 631e5b82f9..af10c4ae7d 100644 --- a/ext/pcre/pcrelib/testdata/testoutput8 +++ b/ext/pcre/pcrelib/testdata/testoutput8 @@ -1284,4 +1284,8 @@ No match a\x0bb\ No match +/X/8f + A\x{1ec5}ABCXYZ + 0: X + / End of testinput 8 / diff --git a/ext/pcre/pcrelib/testdata/testoutput9 b/ext/pcre/pcrelib/testdata/testoutput9 index acaeb398dd..04e3873bb8 100644 --- a/ext/pcre/pcrelib/testdata/testoutput9 +++ b/ext/pcre/pcrelib/testdata/testoutput9 @@ -1632,6 +1632,18 @@ No match \x{023a}\x{2c65}X 0: \x{23a}\x{2c65} +/\x{c0}+\x{116}+/8i + \x{c0}\x{e0}\x{116}\x{117} + 0: \x{c0}\x{e0}\x{116}\x{117} + 1: \x{c0}\x{e0}\x{116} + +/[\x{c0}\x{116}]+/8i + \x{c0}\x{e0}\x{116}\x{117} + 0: \x{c0}\x{e0}\x{116}\x{117} + 1: \x{c0}\x{e0}\x{116} + 2: \x{c0}\x{e0} + 3: \x{c0} + /Check property support in non-UTF-8 mode/ /\p{L}{4}/ @@ -1640,4 +1652,22 @@ No match 123abc\xc4\xc5zz 0: abc\xc4 +/\p{Carian}\p{Cham}\p{Kayah_Li}\p{Lepcha}\p{Lycian}\p{Lydian}\p{Ol_Chiki}\p{Rejang}\p{Saurashtra}\p{Sundanese}\p{Vai}/8 + \x{102A4}\x{AA52}\x{A91D}\x{1C46}\x{10283}\x{1092E}\x{1C6B}\x{A93B}\x{A8BF}\x{1BA0}\x{A50A}==== + 0: \x{102a4}\x{aa52}\x{a91d}\x{1c46}\x{10283}\x{1092e}\x{1c6b}\x{a93b}\x{a8bf}\x{1ba0}\x{a50a} + +/\x{a77d}\x{1d79}/8i + \x{a77d}\x{1d79} + 0: \x{a77d}\x{1d79} + \x{1d79}\x{a77d} + 0: \x{1d79}\x{a77d} + +/\x{a77d}\x{1d79}/8 + \x{a77d}\x{1d79} + 0: \x{a77d}\x{1d79} + ** Failers +No match + \x{1d79}\x{a77d} +No match + / End / diff --git a/ext/pcre/pcrelib/ucp.h b/ext/pcre/pcrelib/ucp.h index 3a4179b769..1968e4765c 100644 --- a/ext/pcre/pcrelib/ucp.h +++ b/ext/pcre/pcrelib/ucp.h @@ -121,11 +121,24 @@ enum { ucp_Tifinagh, ucp_Ugaritic, ucp_Yi, - ucp_Balinese, /* New for Unicode 5.0.0 */ - ucp_Cuneiform, /* New for Unicode 5.0.0 */ - ucp_Nko, /* New for Unicode 5.0.0 */ - ucp_Phags_Pa, /* New for Unicode 5.0.0 */ - ucp_Phoenician /* New for Unicode 5.0.0 */ + /* New for Unicode 5.0: */ + ucp_Balinese, + ucp_Cuneiform, + ucp_Nko, + ucp_Phags_Pa, + ucp_Phoenician, + /* New for Unicode 5.1: */ + ucp_Carian, + ucp_Cham, + ucp_Kayah_Li, + ucp_Lepcha, + ucp_Lycian, + ucp_Lydian, + ucp_Ol_Chiki, + ucp_Rejang, + ucp_Saurashtra, + ucp_Sundanese, + ucp_Vai }; #endif diff --git a/ext/pcre/pcrelib/ucpinternal.h b/ext/pcre/pcrelib/ucpinternal.h deleted file mode 100644 index 811a373c88..0000000000 --- a/ext/pcre/pcrelib/ucpinternal.h +++ /dev/null @@ -1,92 +0,0 @@ -/************************************************* -* Unicode Property Table handler * -*************************************************/ - -#ifndef _UCPINTERNAL_H -#define _UCPINTERNAL_H - -/* Internal header file defining the layout of the bits in each pair of 32-bit -words that form a data item in the table. */ - -typedef struct cnode { - pcre_uint32 f0; - pcre_uint32 f1; -} cnode; - -/* Things for the f0 field */ - -#define f0_scriptmask 0xff000000 /* Mask for script field */ -#define f0_scriptshift 24 /* Shift for script value */ -#define f0_rangeflag 0x00f00000 /* Flag for a range item */ -#define f0_charmask 0x001fffff /* Mask for code point value */ - -/* Things for the f1 field */ - -#define f1_typemask 0xfc000000 /* Mask for char type field */ -#define f1_typeshift 26 /* Shift for the type field */ -#define f1_rangemask 0x0000ffff /* Mask for a range offset */ -#define f1_casemask 0x0000ffff /* Mask for a case offset */ -#define f1_caseneg 0xffff8000 /* Bits for negation */ - -/* The data consists of a vector of structures of type cnode. The two unsigned -32-bit integers are used as follows: - -(f0) (1) The most significant byte holds the script number. The numbers are - defined by the enum in ucp.h. - - (2) The 0x00800000 bit is set if this entry defines a range of characters. - It is not set if this entry defines a single character - - (3) The 0x00600000 bits are spare. - - (4) The 0x001fffff bits contain the code point. No Unicode code point will - ever be greater than 0x0010ffff, so this should be OK for ever. - -(f1) (1) The 0xfc000000 bits contain the character type number. The numbers are - defined by an enum in ucp.h. - - (2) The 0x03ff0000 bits are spare. - - (3) The 0x0000ffff bits contain EITHER the unsigned offset to the top of - range if this entry defines a range, OR the *signed* offset to the - character's "other case" partner if this entry defines a single - character. There is no partner if the value is zero. - -------------------------------------------------------------------------------- -| script (8) |.|.|.| codepoint (21) || type (6) |.|.| spare (8) | offset (16) | -------------------------------------------------------------------------------- - | | | | | - | | |-> spare | |-> spare - | | | - | |-> spare |-> spare - | - |-> range flag - -The upper/lower casing information is set only for characters that come in -pairs. The non-one-to-one mappings in the Unicode data are ignored. - -When searching the data, proceed as follows: - -(1) Set up for a binary chop search. - -(2) If the top is not greater than the bottom, the character is not in the - table. Its type must therefore be "Cn" ("Undefined"). - -(3) Find the middle vector element. - -(4) Extract the code point and compare. If equal, we are done. - -(5) If the test character is smaller, set the top to the current point, and - goto (2). - -(6) If the current entry defines a range, compute the last character by adding - the offset, and see if the test character is within the range. If it is, - we are done. - -(7) Otherwise, set the bottom to one element past the current point and goto - (2). -*/ - -#endif /* _UCPINTERNAL_H */ - -/* End of ucpinternal.h */ diff --git a/ext/pcre/upgrade-pcre.php b/ext/pcre/upgrade-pcre.php index 43a98c94be..c128d603d2 100644 --- a/ext/pcre/upgrade-pcre.php +++ b/ext/pcre/upgrade-pcre.php @@ -58,6 +58,7 @@ function recurse($path) if (!is_file($newfile)) { + continue; die("$newfile is not available any more\n"); }